/* OpenCustoms Core — стили Этапа 5 */

/* Карта рисков — матрица */
.oc-risk-matrix-wrap { max-width: 1200px; margin: 0 auto; padding: 20px; }
.oc-filters { background: #f7f7f7; padding: 15px; border-radius: 8px; margin-bottom: 20px; }
.oc-filters form { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.oc-filters select { min-width: 150px; }
.oc-risk-matrix { width: 100%; border-collapse: collapse; table-layout: fixed; }
.oc-risk-matrix th { padding: 10px; text-align: center; font-size: 14px; background: #f0f0f0; }
.oc-matrix-cell { padding: 12px; vertical-align: top; border-radius: 6px; min-height: 120px; }
.oc-cell-count { font-weight: 600; font-size: 13px; display: block; margin-bottom: 8px; }
.oc-cell-risks { list-style: none; padding: 0; margin: 0; }
.oc-cell-risks li { margin-bottom: 6px; font-size: 13px; line-height: 1.4; }
.oc-cell-risks a { color: #2271b1; text-decoration: none; }
.oc-cell-risks a:hover { text-decoration: underline; }
.oc-cell-empty { color: #ccc; text-align: center; display: block; }
.oc-matrix-legend { display: flex; gap: 15px; margin-top: 20px; flex-wrap: wrap; }
.oc-legend-item { display: inline-block; padding: 4px 12px; border-radius: 4px; color: #fff; font-size: 12px; }

/* Страница риска */
.oc-risk-single { max-width: 900px; margin: 0 auto; padding: 20px; }
.oc-risk-header h1 { margin-bottom: 10px; }
.oc-risk-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.oc-tag { display: inline-block; padding: 3px 10px; border-radius: 12px; font-size: 12px; background: #e0e0e0; }
.oc-tag-category { background: #d4edda; color: #155724; }
.oc-tag-status { background: #cce5ff; color: #004085; }
.oc-tag-prob { background: #fff3cd; color: #856404; }
.oc-tag-imp { background: #f8d7da; color: #721c24; }
.oc-risk-open { margin-bottom: 30px; line-height: 1.7; }
.oc-risk-history-public { background: #f9f9f9; padding: 15px; border-radius: 8px; margin-bottom: 20px; }
.oc-history-more { color: #999; }

/* Закрытая часть */
.oc-access-locked { background: #fff8e5; border: 2px dashed #f0b400; border-radius: 8px; padding: 30px; text-align: center; }
.oc-access-locked h2 { margin-top: 0; }
.oc-access-cta { margin-top: 15px; }
.oc-access-cta .button { display: inline-block; padding: 8px 20px; border-radius: 4px; text-decoration: none; font-weight: 600; }
.oc-access-cta .button-primary { background: #2271b1; color: #fff; }

/* Связанные материалы */
.oc-risk-related { background: #f5f5f5; padding: 20px; border-radius: 8px; margin-top: 30px; }
.oc-risk-related h3 { font-size: 15px; margin-bottom: 8px; }

/* Адаптивность */
@media (max-width: 768px) {
    .oc-risk-matrix { font-size: 12px; }
    .oc-filters form { flex-direction: column; }
    .oc-filters select { width: 100%; }
    .oc-risk-single { padding: 15px; }
    .oc-access-locked { padding: 20px; }
}

/* Кейсы — архив */
.oc-cases-archive { max-width: 1200px; margin: 0 auto; padding: 20px; }
.oc-cases-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 20px; margin-top: 20px; }
.oc-case-card { background: #fff; border: 1px solid #e0e0e0; border-radius: 8px; overflow: hidden; transition: box-shadow 0.2s; }
.oc-case-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.08); }
.oc-case-thumb img { width: 100%; height: 180px; object-fit: cover; }
.oc-case-body { padding: 15px; }
.oc-case-title { font-size: 18px; margin: 0 0 8px; }
.oc-case-title a { color: #2271b1; text-decoration: none; }
.oc-case-topics { margin-bottom: 8px; }
.oc-case-excerpt { font-size: 14px; color: #555; line-height: 1.5; margin-bottom: 12px; }
.oc-case-footer { display: flex; justify-content: space-between; align-items: center; }
.oc-badge { font-size: 11px; padding: 2px 8px; border-radius: 10px; }
.oc-badge-open { background: #d4edda; color: #155724; }
.oc-badge-locked { background: #fff3cd; color: #856404; }
.oc-badge-info { background: #e0e0e0; color: #333; }
.oc-read-more { font-size: 14px; color: #2271b1; text-decoration: none; }
.oc-read-more:hover { text-decoration: underline; }
.oc-pagination { margin-top: 30px; text-align: center; }
.oc-pagination .page-numbers { display: inline-block; padding: 6px 12px; margin: 0 2px; border: 1px solid #ddd; border-radius: 4px; text-decoration: none; }
.oc-pagination .page-numbers.current { background: #2271b1; color: #fff; border-color: #2271b1; }

/* Кейсы — страница */
.oc-case-single { max-width: 900px; margin: 0 auto; padding: 20px; }
.oc-case-header h1 { margin-bottom: 10px; }
.oc-case-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.oc-tag-access { background: #cce5ff; color: #004085; }
.oc-case-section { margin-bottom: 30px; }
.oc-case-section h2 { font-size: 22px; margin-bottom: 12px; }
.oc-related-list { list-style: none; padding: 0; }
.oc-related-list li { padding: 6px 0; border-bottom: 1px solid #f0f0f0; }
.oc-related-list li:last-child { border-bottom: none; }
.oc-risk-quick { font-size: 12px; color: #888; margin-left: 8px; }
.oc-docs-note { color: #666; font-style: italic; }
.oc-severity { font-size: 12px; color: #dc3232; }
.oc-priority { font-size: 11px; color: #888; }

/* Эксперты */
.oc-experts-grid { display: flex; flex-wrap: wrap; gap: 15px; }
.oc-expert-card { display: flex; align-items: center; gap: 12px; background: #f9f9f9; padding: 12px; border-radius: 8px; min-width: 250px; }
.oc-expert-photo { width: 60px; height: 60px; border-radius: 50%; object-fit: cover; }
.oc-expert-info a { font-weight: 600; color: #2271b1; text-decoration: none; }
.oc-expert-spec { font-size: 13px; color: #666; margin: 4px 0 0; }

/* Адаптивность кейсов */
@media (max-width: 768px) {
    .oc-cases-grid { grid-template-columns: 1fr; }
    .oc-case-single { padding: 15px; }
    .oc-experts-grid { flex-direction: column; }
}

/* Курсы */
.oc-courses-archive { max-width: 1200px; margin: 0 auto; padding: 20px; }
.oc-courses-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 20px; margin-top: 20px; }
.oc-course-card { background: #fff; border: 1px solid #e0e0e0; border-radius: 8px; overflow: hidden; transition: box-shadow 0.2s; }
.oc-course-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.08); }
.oc-course-thumb img { width: 100%; height: 180px; object-fit: cover; }
.oc-course-body { padding: 15px; }
.oc-course-title { font-size: 18px; margin: 0 0 8px; }
.oc-course-title a { color: #2271b1; text-decoration: none; }
.oc-course-offer { font-size: 14px; color: #555; margin-bottom: 8px; }
.oc-course-meta { display: flex; flex-wrap: wrap; gap: 8px; font-size: 13px; color: #666; margin-bottom: 8px; }
.oc-course-price { font-size: 20px; font-weight: 700; color: #2271b1; }
.oc-course-price.oc-free { color: #46b450; }
.oc-course-single { max-width: 900px; margin: 0 auto; padding: 20px; }
.oc-course-header h1 { margin-bottom: 10px; }
.oc-course-details { background: #f9f9f9; padding: 15px; border-radius: 8px; margin-bottom: 20px; }
.oc-detail-row { padding: 4px 0; }
.oc-detail-label { font-weight: 600; color: #555; }
.oc-course-buy { display: flex; align-items: center; gap: 12px; margin: 20px 0; }
.oc-price { font-size: 28px; font-weight: 700; color: #2271b1; }
.oc-price.oc-free { color: #46b450; }
.oc-btn-buy, .oc-btn-invoice { padding: 10px 24px; border-radius: 4px; text-decoration: none; font-weight: 600; display: inline-block; }
.oc-btn-buy { background: #2271b1; color: #fff; }
.oc-btn-invoice { background: #f0f0f0; color: #333; }
.oc-program-module { padding: 12px; border-left: 3px solid #2271b1; margin-bottom: 10px; background: #f9f9f9; border-radius: 0 6px 6px 0; }
.oc-program-module h3 { margin: 0 0 5px; font-size: 16px; }
.oc-program-module p { margin: 0; font-size: 14px; color: #555; }
.oc-spur-block { background: #eef7ff; border: 1px solid #cce5ff; padding: 15px; border-radius: 8px; }
.oc-discounts li { padding: 4px 0; }
.oc-discounts code { background: #f0f0f0; padding: 2px 6px; border-radius: 3px; }

/* Мероприятия */
.oc-events-archive { max-width: 1200px; margin: 0 auto; padding: 20px; }
.oc-events-list { display: flex; flex-direction: column; gap: 15px; }
.oc-event-card { display: flex; gap: 15px; background: #fff; border: 1px solid #e0e0e0; border-radius: 8px; padding: 15px; transition: box-shadow 0.2s; }
.oc-event-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.08); }
.oc-event-past { opacity: 0.7; }
.oc-event-date { min-width: 60px; text-align: center; background: #2271b1; color: #fff; border-radius: 8px; padding: 8px; height: fit-content; }
.oc-date-day { font-size: 24px; font-weight: 700; display: block; }
.oc-date-month { font-size: 12px; text-transform: uppercase; }
.oc-event-body { flex: 1; }
.oc-event-title { font-size: 18px; margin: 0 0 5px; }
.oc-event-title a { color: #2271b1; text-decoration: none; }
.oc-event-meta { display: flex; flex-wrap: wrap; gap: 8px; font-size: 13px; color: #666; margin-bottom: 5px; }
.oc-badge-past { background: #ddd; color: #666; }
.oc-event-tariffs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 5px; }
.oc-tariff { font-size: 12px; background: #f0f0f0; padding: 3px 8px; border-radius: 10px; }
.oc-event-actions { display: flex; flex-direction: column; gap: 8px; align-items: flex-end; justify-content: center; }
.oc-event-single { max-width: 900px; margin: 0 auto; padding: 20px; }
.oc-event-details { background: #f9f9f9; padding: 15px; border-radius: 8px; margin-bottom: 20px; }
.oc-event-buy { display: flex; gap: 12px; margin: 20px 0; }
.oc-tariffs-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 15px; }
.oc-tariff-card { border: 1px solid #e0e0e0; border-radius: 8px; padding: 15px; text-align: center; }
.oc-tariff-card h3 { margin: 0 0 8px; }
.oc-tariff-price { font-size: 22px; font-weight: 700; color: #2271b1; margin-bottom: 8px; }
.oc-tariff-includes { font-size: 13px; color: #666; margin-bottom: 10px; }
.oc-auto-open { font-size: 13px; color: #888; margin-top: 10px; }

/* Материалы */
.oc-materials-archive { max-width: 1200px; margin: 0 auto; padding: 20px; }
.oc-materials-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 15px; }
.oc-material-card { display: flex; gap: 12px; background: #fff; border: 1px solid #e0e0e0; border-radius: 8px; padding: 15px; }
.oc-material-icon { font-size: 32px; }
.oc-material-body { flex: 1; }
.oc-material-title { font-size: 16px; margin: 0 0 5px; }
.oc-material-title a { color: #2271b1; text-decoration: none; }
.oc-material-comp { font-size: 13px; color: #666; margin: 5px 0; }
.oc-material-single { max-width: 900px; margin: 0 auto; padding: 20px; }
.oc-files-list { list-style: none; padding: 0; }
.oc-files-list li { padding: 8px 0; border-bottom: 1px solid #f0f0f0; }
.oc-files-list a { color: #2271b1; text-decoration: none; }
.oc-files-list a:hover { text-decoration: underline; }
.oc-links-list { list-style: none; padding: 0; }
.oc-links-list li { padding: 6px 0; }
.oc-links-list a { color: #2271b1; text-decoration: none; }

/* Эксперт */
.oc-expert-single { max-width: 900px; margin: 0 auto; padding: 20px; }
.oc-expert-top { display: flex; gap: 20px; align-items: flex-start; margin-bottom: 20px; }
.oc-expert-photo-lg { width: 120px; height: 120px; border-radius: 50%; object-fit: cover; }
.oc-expert-roles { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.oc-expert-section { margin-bottom: 25px; }

/* Общая адаптивность */
@media (max-width: 768px) {
    .oc-courses-grid, .oc-materials-grid { grid-template-columns: 1fr; }
    .oc-event-card { flex-direction: column; }
    .oc-event-actions { flex-direction: row; align-items: flex-start; }
    .oc-expert-top { flex-direction: column; }
    .oc-tariffs-grid { grid-template-columns: 1fr; }
    .oc-course-buy, .oc-event-buy { flex-direction: column; }
}

/* ============================================
 * OpenCustoms Core v1.0.3 — стили шаблона кейса
 * ============================================ */

/* Шапка кейса */
.oc-case-header {
    max-width: 780px;
    margin: 0 auto 32px;
    padding: 0 20px;
}
.oc-case-title {
    font-size: 28px;
    line-height: 1.3;
    margin: 12px 0 0;
    color: #1a3a6c;
}
.oc-case-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 8px;
}
.oc-tag-training {
    background: #e8f5e9;
    color: #2e7d32;
}
.oc-tag-topic {
    background: #e3f2fd;
    color: #1565c0;
}

/* Основной макет: оглавление + контент */
.oc-case-layout {
    display: flex;
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Боковое оглавление (desktop) */
.oc-case-toc {
    flex: 0 0 240px;
    position: sticky;
    top: 24px;
    align-self: flex-start;
    max-height: calc(100vh - 48px);
    overflow-y: auto;
    padding: 16px 0;
}
.oc-toc-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.oc-toc-nav li {
    margin-bottom: 4px;
}
.oc-toc-nav a {
    color: #555;
    text-decoration: none;
    font-size: 13px;
    line-height: 1.4;
    display: block;
    padding: 4px 8px;
    border-left: 2px solid transparent;
    transition: all 0.15s ease;
}
.oc-toc-nav a:hover {
    color: #1a3a6c;
    border-left-color: #1a3a6c;
    padding-left: 12px;
}
.oc-toc-toggle {
    display: none; /* only visible on mobile */
}

/* Колонка контента */
.oc-case-content {
    flex: 1 1 780px;
    max-width: 780px;
    min-width: 0; /* prevent overflow */
}

/* Секции контента */
.oc-case-section {
    margin-bottom: 32px;
}
.oc-case-section h2 {
    font-size: 22px;
    margin-top: 40px;
    margin-bottom: 16px;
    color: #1a3a6c;
    scroll-margin-top: 24px;
}
.oc-case-section h2:first-child {
    margin-top: 0;
}
.oc-case-section p {
    line-height: 1.7;
    margin-bottom: 16px;
}

/* Таблицы — защита от переполнения */
.oc-case-content table,
.oc-case-content .wp-block-table {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 24px;
}
.oc-case-content table th,
.oc-case-content table td {
    white-space: nowrap;
    padding: 8px 12px;
    border: 1px solid #ddd;
}
.oc-case-content table th {
    background: #f5f7fa;
    font-weight: 600;
}

/* Чек-листы — защита от переполнения */
.oc-case-content ul.wp-block-list,
.oc-case-content ol.wp-block-list {
    padding-left: 24px;
    word-break: break-word;
    overflow-wrap: break-word;
}
.oc-case-content li {
    margin-bottom: 8px;
    line-height: 1.6;
}

/* Изображения */
.oc-case-content img {
    max-width: 100%;
    height: auto;
}

/* Продуктовый блок (закрытая часть) */
/* ═══ Locked block (v1.0.4) ═══ */
.oc-locked-block {
    background: #fff;
    border: 1px solid #e0e4ec;
    border-radius: 10px;
    padding: 32px 36px;
    margin: 40px 0 32px;
    box-shadow: 0 2px 12px rgba(10,22,40,.06);
    position: relative;
    overflow: hidden;
}
.oc-locked-block::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 4px; height: 100%;
    background: linear-gradient(180deg, #0a1628 0%, #0a4a8f 100%);
}
.oc-locked-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}
.oc-locked-icon {
    width: 18px; height: 18px;
    flex-shrink: 0;
    opacity: 0.45;
    color: #0a1628;
}
.oc-locked-eyebrow {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #6b7280;
}
.oc-locked-title {
    font-size: 22px;
    font-weight: 700;
    color: #0a1628;
    margin: 0 0 12px;
    line-height: 1.35;
}
.oc-locked-fallback {
    font-size: 14px;
    color: #6b7280;
    margin: 0 0 20px;
    line-height: 1.5;
}
.oc-locked-features {
    list-style: none;
    padding: 0;
    margin: 0 0 24px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px 24px;
}
.oc-locked-features li {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 14px;
    color: #1a1a2e;
    line-height: 1.5;
}
.oc-locked-check {
    flex-shrink: 0;
    width: 20px; height: 20px;
    border-radius: 50%;
    background: #e8f5e9;
    color: #2e7d32;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    margin-top: 1px;
}
.oc-locked-cta {
    display: flex;
    align-items: center;
    gap: 14px;
}

/* ═══ Buttons ═══ */
.oc-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 26px;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s, box-shadow 0.2s;
    cursor: pointer;
    border: none;
}
.oc-btn-primary {
    background: #0a1628;
    color: #fff;
    box-shadow: 0 2px 8px rgba(10,22,40,.15);
}
.oc-btn-primary:hover {
    background: #0a4a8f;
    box-shadow: 0 4px 12px rgba(10,22,40,.2);
    color: #fff;
}

/* ═══ Related zone (v1.0.4) ═══ */
.oc-related-zone {
    margin-top: 48px;
    padding-top: 32px;
    border-top: 1px solid #e0e4ec;
}
.oc-related-section {
    margin-bottom: 28px;
}
.oc-related-section:last-child { margin-bottom: 0; }
.oc-related-heading {
    font-size: 17px;
    font-weight: 700;
    color: #0a1628;
    margin: 0 0 12px;
}
.oc-related-grid {
    display: grid;
    gap: 10px;
}
.oc-related-risks {
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}
.oc-related-materials {
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}
.oc-related-experts {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

/* Risk cards */
.oc-risk-card {
    background: #fff;
    border: 1px solid #e0e4ec;
    border-radius: 6px;
    padding: 12px 14px;
    text-decoration: none;
    color: inherit;
    display: block;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.oc-risk-card:hover {
    border-color: #c0cfe0;
    box-shadow: 0 1px 4px rgba(10,22,40,.06);
}
.oc-risk-card-title {
    font-size: 14px;
    font-weight: 600;
    color: #0a1628;
    margin-bottom: 6px;
}
.oc-risk-card-meta { display: flex; gap: 6px; align-items: center; }
.oc-risk-badge { font-size: 11px; padding: 2px 8px; border-radius: 12px; font-weight: 600; }
.oc-risk-high { background: #fef2f2; color: #c62828; }
.oc-risk-medium { background: #fff8e1; color: #e65100; }
.oc-risk-low { background: #e8f5e9; color: #2e7d32; }
.oc-risk-prob { background: #f3f4f6; color: #6b7280; }

/* Material cards */
.oc-material-card {
    background: #fff;
    border: 1px solid #e0e4ec;
    border-radius: 6px;
    padding: 12px 14px;
    text-decoration: none;
    color: inherit;
    display: flex;
    gap: 10px;
    align-items: flex-start;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.oc-material-card:hover { border-color: #c0cfe0; box-shadow: 0 1px 4px rgba(10,22,40,.06); }
.oc-material-type {
    flex-shrink: 0; width: 32px; height: 32px;
    border-radius: 6px; background: #e3f2fd;
    display: flex; align-items: center; justify-content: center;
    font-size: 15px;
}
.oc-material-title { font-size: 14px; font-weight: 600; color: #0a1628; }

/* Expert cards */
.oc-expert-card {
    background: #fff;
    border: 1px solid #e0e4ec;
    border-radius: 6px;
    padding: 14px;
    display: flex;
    gap: 12px;
    align-items: flex-start;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.oc-expert-card:hover { border-color: #c0cfe0; box-shadow: 0 1px 4px rgba(10,22,40,.06); }
.oc-expert-photo {
    flex-shrink: 0; width: 48px; height: 48px;
    border-radius: 50%; overflow: hidden;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, #0a1628, #0a4a8f);
}
.oc-expert-photo img { width: 100%; height: 100%; object-fit: cover; }
.oc-expert-initials { color: #fff; font-size: 16px; font-weight: 700; }
.oc-expert-info { flex: 1; min-width: 0; }
.oc-expert-name {
    font-size: 14px; font-weight: 600; color: #0a1628;
    text-decoration: none; display: block; margin-bottom: 2px;
}
.oc-expert-name:hover { color: #0a4a8f; }
.oc-expert-comp { font-size: 12px; color: #6b7280; line-height: 1.4; }


/* Legacy-вспомогательные классы */
.oc-closed-header h2 {
    margin-top: 0;
}

/* ============== МОБИЛЬНАЯ ВЕРСИЯ ============== */
@media (max-width: 768px) {
    .oc-case-header {
        padding: 0 16px;
        margin-bottom: 24px;
    }
    .oc-case-title {
        font-size: 22px;
    }

    /* Оглавление — кнопка на мобильном */
    .oc-case-toc {
        flex: none;
        width: 100%;
        position: relative;
        top: auto;
        max-height: none;
        padding: 0 16px;
        margin-bottom: 16px;
    }
    .oc-toc-toggle {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        padding: 10px 16px;
        background: #f5f7fa;
        border: 1px solid #e0e4ec;
        border-radius: 8px;
        cursor: pointer;
        font-size: 14px;
        color: #1a3a6c;
        font-weight: 500;
    }
    .oc-toc-toggle:hover {
        background: #eef0f5;
    }
    .oc-toc-label {
        font-weight: 600;
    }
    .oc-toc-nav {
        display: none;
        padding: 12px 0;
    }
    .oc-toc-open .oc-toc-nav {
        display: block;
    }

    .oc-case-layout {
        flex-direction: column;
        gap: 0;
        padding: 0;
    }
    .oc-case-content {
        max-width: 100%;
        padding: 0 16px;
    }

    .oc-locked-block {
        padding: 24px 20px;
        margin: 28px 0 24px;
    }
    .oc-locked-title {
        font-size: 19px;
    }
    .oc-locked-features {
        grid-template-columns: 1fr;
        gap: 6px;
    }
    .oc-locked-cta {
        flex-direction: column;
        align-items: stretch;
    }
    .oc-locked-cta .oc-btn {
        justify-content: center;
        padding: 13px 20px;
    }

    .oc-related-zone {
        margin-top: 32px;
        padding-top: 24px;
    }
    .oc-related-risks,
    .oc-related-materials,
    .oc-related-experts {
        grid-template-columns: 1fr;
    }

    .oc-case-section h2 {
        font-size: 19px;
        margin-top: 28px;
    }

    /* Таблицы на мобильном */
    .oc-case-content table,
    .oc-case-content .wp-block-table {
        font-size: 13px;
        margin-left: -16px;
        margin-right: -16px;
        width: calc(100% + 32px);
        border-radius: 0;
    }
}

@media (max-width: 480px) {
    .oc-case-title {
        font-size: 20px;
    }
    .oc-locked-block {
        padding: 20px 16px;
    }
    .oc-btn {
        width: 100%;
        text-align: center;
    }
}

/* ============================================
 * Существующие стили (личный кабинет, риски и т.д.)
 * ============================================ */

/* Личный кабинет */
.oc-cabinet { max-width: 1000px; margin: 0 auto; padding: 20px; }
.oc-cabinet-header { margin-bottom: 20px; }
.oc-tabs { display: flex; flex-wrap: wrap; gap: 4px; border-bottom: 2px solid #2271b1; margin-bottom: 20px; }
.oc-tab { background: none; border: none; padding: 10px 16px; cursor: pointer; font-size: 14px; border-bottom: 2px solid transparent; margin-bottom: -2px; }
.oc-tab.active { border-bottom-color: #2271b1; font-weight: 600; color: #2271b1; }
.oc-tab-content { display: none; }
.oc-tab-content.active { display: block; }
.oc-grants-list { display: flex; flex-wrap: wrap; gap: 12px; }
.oc-grant-card { background: #f9f9f9; padding: 15px; border-radius: 8px; min-width: 250px; border-left: 3px solid #46b450; }
.oc-grant-expired { border-left-color: #dc3232; opacity: 0.75; }
.oc-items-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.oc-item-card { background: #f9f9f9; padding: 12px; border-radius: 6px; }
.oc-item-card a { color: #2271b1; text-decoration: none; font-weight: 500; }
.oc-recommendations { margin-top: 30px; padding: 20px; background: #eef7ff; border-radius: 8px; }
.oc-recommendations h2 { margin-top: 0; }
.oc-cabinet-login { max-width: 400px; margin: 40px auto; text-align: center; }

/* Сертификаты */
.oc-cert-check { max-width: 600px; margin: 0 auto; padding: 20px; }
.oc-cert-check form { display: flex; gap: 8px; margin: 15px 0; }
.oc-cert-result { padding: 20px; border-radius: 8px; margin-top: 15px; }
.oc-cert-valid { background: #d4edda; border: 1px solid #c3e6cb; }
.oc-cert-invalid { background: #f8d7da; border: 1px solid #f5c6cb; }

@media (max-width: 768px) {
    .oc-tabs { flex-direction: column; }
    .oc-tab { border-bottom: none; text-align: left; }
    .oc-cert-check form { flex-direction: column; }
}

/* ══════════════════════════════════════════════
 * v1.0.7 — Events, Experts, Widget CSS
 * ══════════════════════════════════════════════ */

/* === Event single === */
.oc-event-single {
    max-width: 900px;
    margin: 0 auto;
    padding: 24px 20px 48px;
}
.oc-event-header { margin-bottom: 24px; }
.oc-event-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 8px;
}
.oc-event-date-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 14px;
    color: #0a4a8f;
    font-weight: 600;
}
.oc-event-format-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    background: #e3f2fd;
    color: #0a4a8f;
}
.oc-event-title {
    font-size: 28px;
    font-weight: 700;
    color: #0a1628;
    margin: 0 0 8px;
    line-height: 1.3;
}
.oc-event-short-desc {
    font-size: 16px;
    color: #555;
    margin: 0 0 16px;
    line-height: 1.5;
}
.oc-event-content { margin-bottom: 24px; line-height: 1.7; }

/* Event program */
.oc-event-program {
    background: #f8f9fb;
    border: 1px solid #e0e4ec;
    border-radius: 8px;
    padding: 20px 24px;
    margin: 24px 0;
}
.oc-event-program h3 {
    font-size: 17px;
    font-weight: 700;
    color: #0a1628;
    margin: 0 0 12px;
}
.oc-program-list { list-style: none; padding: 0; margin: 0; }
.oc-program-item {
    display: grid;
    grid-template-columns: 60px 1fr auto;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid #eef0f5;
    font-size: 14px;
    align-items: start;
}
.oc-program-item:last-child { border-bottom: none; }
.oc-program-time { font-weight: 600; color: #0a4a8f; }
.oc-program-topic { color: #1a1a2e; }
.oc-program-speaker { color: #6b7280; font-size: 13px; }
.oc-program-item-single {
    padding: 8px 0;
    border-bottom: 1px solid #eef0f5;
    font-size: 14px;
    color: #1a1a2e;
}

/* Event notice */
.oc-event-notice {
    padding: 16px 20px;
    background: #f0f4fa;
    border-radius: 8px;
    color: #555;
    font-size: 14px;
    margin: 16px 0;
}

/* Event CTA */
.oc-event-cta { margin: 24px 0; }

/* === Events archive === */
.oc-events-archive { max-width: 1200px; margin: 0 auto; padding: 24px 20px; }
.oc-events-section { margin-bottom: 40px; }
.oc-events-section-title {
    font-size: 20px;
    font-weight: 700;
    color: #0a1628;
    margin: 0 0 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e0e4ec;
}
.oc-events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
}
.oc-event-archive-card {
    background: #fff;
    border: 1px solid #e0e4ec;
    border-radius: 8px;
    padding: 16px;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.oc-event-archive-card:hover {
    border-color: #c0cfe0;
    box-shadow: 0 2px 8px rgba(10,22,40,.06);
}
.oc-event-archive-date {
    font-size: 13px;
    font-weight: 600;
    color: #0a4a8f;
    margin-bottom: 4px;
}
.oc-event-archive-title {
    font-size: 16px;
    font-weight: 600;
    color: #0a1628;
    margin-bottom: 4px;
}
.oc-event-archive-desc {
    font-size: 13px;
    color: #6b7280;
    line-height: 1.4;
}

/* === Expert single === */
.oc-expert-single-v2 {
    max-width: 900px;
    margin: 0 auto;
    padding: 24px 20px 48px;
}
.oc-expert-top-v2 {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    margin-bottom: 24px;
}
.oc-expert-photo-v2 {
    flex-shrink: 0;
    width: 96px; height: 96px;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0a1628, #0a4a8f);
}
.oc-expert-photo-v2 img {
    width: 100%; height: 100%;
    object-fit: cover;
}
.oc-expert-initials-v2 {
    color: #fff;
    font-size: 32px;
    font-weight: 700;
}
.oc-expert-info-v2 { flex: 1; min-width: 0; }
.oc-expert-name-v2 {
    font-size: 24px;
    font-weight: 700;
    color: #0a1628;
    margin: 0 0 4px;
}
.oc-expert-role-v2 {
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 4px;
}
.oc-expert-org-v2 {
    font-size: 14px;
    color: #0a4a8f;
    font-weight: 500;
}
.oc-expert-bio-v2 {
    font-size: 15px;
    line-height: 1.7;
    color: #333;
    margin-bottom: 16px;
}
.oc-expert-links-v2 {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
}
.oc-expert-link-v2 {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    color: #0a4a8f;
    text-decoration: none;
}
.oc-expert-link-v2:hover { text-decoration: underline; }
.oc-expert-ask-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 22px;
    border-radius: 6px;
    background: #0a1628;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s;
}
.oc-expert-ask-btn:hover { background: #0a4a8f; color: #fff; }

/* === Experts archive === */
.oc-experts-archive-v2 { max-width: 1200px; margin: 0 auto; padding: 24px 20px; }
.oc-experts-grid-v2 {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}
.oc-expert-card-v2 {
    background: #fff;
    border: 1px solid #e0e4ec;
    border-radius: 8px;
    padding: 20px;
    text-decoration: none;
    color: inherit;
    display: flex;
    gap: 14px;
    align-items: flex-start;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.oc-expert-card-v2:hover {
    border-color: #c0cfe0;
    box-shadow: 0 2px 8px rgba(10,22,40,.06);
}
.oc-expert-card-avatar {
    flex-shrink: 0;
    width: 56px; height: 56px;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0a1628, #0a4a8f);
}
.oc-expert-card-avatar img { width: 100%; height: 100%; object-fit: cover; }
.oc-expert-card-initials { color: #fff; font-size: 18px; font-weight: 700; }
.oc-expert-card-name { font-size: 15px; font-weight: 600; color: #0a1628; margin-bottom: 2px; }
.oc-expert-card-role { font-size: 13px; color: #6b7280; }

/* === Upcoming events widget === */
.oc-upcoming-events {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: 600px;
}
.oc-event-card-min {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    padding: 12px 14px;
    background: #fff;
    border: 1px solid #e0e4ec;
    border-radius: 6px;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.oc-event-card-min:hover {
    border-color: #c0cfe0;
    box-shadow: 0 1px 4px rgba(10,22,40,.06);
}
.oc-event-card-date {
    flex-shrink: 0;
    width: 56px;
    text-align: center;
    border-right: 1px solid #eef0f5;
    padding-right: 12px;
}
.oc-event-day {
    display: block;
    font-size: 15px;
    font-weight: 700;
    color: #0a1628;
}
.oc-event-time {
    display: block;
    font-size: 11px;
    color: #999;
    margin-top: 2px;
}
.oc-event-card-body {
    flex: 1;
    min-width: 0;
}
.oc-event-card-title {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #0a1628;
    margin-bottom: 2px;
}
.oc-event-card-desc {
    display: block;
    font-size: 12px;
    color: #6b7280;
    line-height: 1.4;
}
.oc-event-card-format {
    display: inline-block;
    margin-top: 4px;
    font-size: 11px;
    color: #0a4a8f;
    background: #e3f2fd;
    padding: 1px 8px;
    border-radius: 8px;
}
.oc-events-all-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 14px;
    color: #0a4a8f;
    text-decoration: none;
    font-weight: 500;
    margin-top: 8px;
}
.oc-events-all-link:hover { text-decoration: underline; }

/* === Mobile for events/experts === */
@media (max-width: 768px) {
    .oc-event-title { font-size: 22px; }
    .oc-events-grid { grid-template-columns: 1fr; }
    .oc-expert-top-v2 { flex-direction: column; align-items: center; text-align: center; }
    .oc-experts-grid-v2 { grid-template-columns: 1fr; }
    .oc-program-item {
        grid-template-columns: 50px 1fr;
    }
    .oc-program-speaker { grid-column: 2; }
    .oc-event-card-min { flex-direction: column; gap: 8px; }
    .oc-event-card-date {
        border-right: none;
        border-bottom: 1px solid #eef0f5;
        padding-right: 0;
        padding-bottom: 8px;
        width: 100%;
        text-align: left;
        display: flex;
        gap: 8px;
        align-items: baseline;
    }
    .oc-event-day, .oc-event-time { display: inline; }
}

/* ══════════════════════════════════════════════
 * v1.0.8 — Access page + Publications
 * ══════════════════════════════════════════════ */

/* === Access page === */
.oc-access-page { max-width: 900px; margin: 0 auto; padding: 24px 20px 48px; }
.oc-access-login-prompt {
    text-align: center;
    padding: 32px 24px;
    background: #f8f9fb;
    border: 1px solid #e0e4ec;
    border-radius: 8px;
    margin-bottom: 32px;
}
.oc-access-login-prompt h2 {
    font-size: 22px; font-weight: 700; color: #0a1628;
    margin: 0 0 8px;
}
.oc-access-login-prompt p {
    font-size: 15px; color: #555; margin: 0 0 16px;
}
.oc-access-actions {
    display: flex; gap: 12px; justify-content: center; flex-wrap: wrap;
}
.oc-access-actions .oc-btn {
    padding: 10px 28px; border-radius: 6px; font-size: 14px; font-weight: 600;
    text-decoration: none; display: inline-block;
}
.oc-btn-secondary {
    background: #fff; color: #0a1628; border: 1px solid #c0cfe0;
}
.oc-btn-secondary:hover { border-color: #0a4a8f; color: #0a4a8f; }

.oc-access-active h2, .oc-access-no-grants h2 {
    font-size: 20px; font-weight: 700; color: #0a1628; margin: 0 0 16px;
}

/* Plans grid */
.oc-access-plans { margin: 32px 0; }
.oc-access-plans h2 {
    font-size: 20px; font-weight: 700; color: #0a1628; margin: 0 0 16px;
}
.oc-plans-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
}
.oc-plan-card {
    background: #fff;
    border: 1px solid #e0e4ec;
    border-radius: 8px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.oc-plan-title {
    font-size: 16px; font-weight: 700; color: #0a1628; margin: 0;
}
.oc-plan-price {
    font-size: 20px; font-weight: 700; color: #0a4a8f;
}
.oc-plan-desc {
    font-size: 13px; color: #6b7280; line-height: 1.5; flex: 1;
}
.oc-plan-btn {
    margin-top: 8px;
    text-align: center;
}

/* Catalog grid */
.oc-access-catalog { margin: 32px 0; }
.oc-access-catalog h2 {
    font-size: 20px; font-weight: 700; color: #0a1628; margin: 0 0 16px;
}
.oc-catalog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
}
.oc-catalog-card {
    background: #f8f9fb;
    border: 1px solid #e0e4ec;
    border-radius: 8px;
    padding: 16px;
    text-decoration: none;
    color: inherit;
    text-align: center;
    transition: border-color 0.15s;
}
.oc-catalog-card:hover { border-color: #0a4a8f; }
.oc-catalog-label { font-size: 14px; color: #6b7280; }
.oc-catalog-count { font-size: 24px; font-weight: 700; color: #0a1628; }

/* === Publications filter (on native posts archive) === */
.oc-pub-filters {
    display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px;
}
.oc-pub-filter {
    padding: 6px 14px;
    border-radius: 16px;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    background: #f0f4fa;
    color: #555;
    transition: background 0.15s, color 0.15s;
}
.oc-pub-filter:hover,
.oc-pub-filter-active {
    background: #0a4a8f;
    color: #fff;
}

@media (max-width: 768px) {
    .oc-plans-grid { grid-template-columns: 1fr; }
    .oc-catalog-grid { grid-template-columns: repeat(2, 1fr); }
}
