/* Продуктовые кейсы — editorial layout как Design_Blog (journal-essay) */

body.case-study.journal.journal-essay.product-case .article-sidebar-nav {
    display: none !important;
}

body.case-study.journal.journal-essay.product-case .site-shell:has(> .article-sidebar-nav) {
    grid-template-columns: var(--site-sidebar-w) minmax(0, 1fr) !important;
}

/* Hero: без старой обёртки Mintlify */
body.case-study.journal.journal-essay.product-case .hero-header-wrapper {
    display: contents;
}

body.case-study.journal.journal-essay.product-case .article-header-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

body.case-study.journal.journal-essay.product-case .article-header .article-title {
    order: 1;
}

body.case-study.journal.journal-essay.product-case .article-header .article-description {
    order: 2;
}

body.case-study.journal.journal-essay.product-case .article-description.journal-article-date {
    margin: 0 0 0 0 !important;
}

body.case-study.journal.journal-essay.product-case .article-lead {
    margin: 0 0 40px 0 !important;
    max-width: 38ch;
}

body.case-study.journal.journal-essay.product-case .case-intro-duplicate {
    display: none !important;
}

/* Hero media */
body.case-study.journal.journal-essay.product-case .case-hero-figure {
    margin: 0 0 48px 0;
    padding: 0;
    border: none !important;
    background: transparent !important;
}

body.case-study.journal.journal-essay.product-case .case-hero-figure .hero-image-section {
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    border-radius: 0 !important;
    overflow: visible !important;
    background: transparent !important;
}

body.case-study.journal.journal-essay.product-case .case-hero-figure img,
body.case-study.journal.journal-essay.product-case .case-hero-figure video {
    width: 100%;
    height: auto;
    display: block;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

/* Секции кейса = essay prose */
body.case-study.journal.journal-essay.product-case .journal-prose .article-section {
    margin-top: clamp(56px, 10vw, 80px);
    padding: 0 !important;
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
    column-span: unset !important;
}

body.case-study.journal.journal-essay.product-case .journal-prose .article-section:first-of-type {
    margin-top: 0;
}

body.case-study.journal.journal-essay.product-case .journal-prose .article-section > h2 {
    margin: 0 0 28px 0 !important;
    padding: 0 !important;
    font-family: 'Playfair Display', Georgia, serif !important;
    font-size: clamp(28px, 4.2vw, 38px) !important;
    font-weight: 700 !important;
    line-height: 1.12 !important;
    letter-spacing: -0.02em !important;
    text-transform: none !important;
    color: var(--color-text, #111) !important;
    border: none !important;
    max-width: 22ch;
    text-wrap: balance;
}

[data-theme="dark"] body.case-study.journal.journal-essay.product-case .journal-prose .article-section > h2 {
    color: var(--color-text, #f5f5f5) !important;
}

body.case-study.journal.journal-essay.product-case .journal-prose .article-section > p,
body.case-study.journal.journal-essay.product-case .journal-prose .article-section > ul,
body.case-study.journal.journal-essay.product-case .journal-prose .article-section > ol {
    font-family: 'Libre Baskerville', Georgia, serif !important;
    font-size: 18px !important;
    line-height: 1.68 !important;
    margin: 0 0 1.05em 0 !important;
    color: var(--color-text, #1a1a1a) !important;
}

body.case-study.journal.journal-essay.product-case .journal-prose .article-section > p:last-child {
    margin-bottom: 0 !important;
}

[data-theme="dark"] body.case-study.journal.journal-essay.product-case .journal-prose .article-section > p {
    color: #e8e8e8 !important;
}

body.case-study.journal.journal-essay.product-case .journal-prose .section-divider {
    display: none !important;
}

/* Галереи и медиа */
body.case-study.journal.journal-essay.product-case .journal-prose .image-gallery {
    margin: 40px 0 48px 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 48px;
    border: none !important;
    background: transparent !important;
}

body.case-study.journal.journal-essay.product-case .journal-prose .image-item {
    margin: 0;
    padding: 0;
    border: none !important;
    background: transparent !important;
}

body.case-study.journal.journal-essay.product-case .journal-prose .media-frame {
    margin: 0 0 14px 0;
    padding: 0;
    border: none !important;
    border-radius: 0 !important;
    background: transparent !important;
    overflow: visible !important;
}

body.case-study.journal.journal-essay.product-case .journal-prose .case-image,
body.case-study.journal.journal-essay.product-case .journal-prose .case-video {
    width: 100%;
    height: auto;
    display: block;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

body.case-study.journal.journal-essay.product-case .journal-prose .image-caption {
    margin: 14px 0 0 0 !important;
    padding: 0 !important;
    font-family: var(--font-body, 'Inter', sans-serif) !important;
    font-size: 13px !important;
    font-weight: 400 !important;
    line-height: 1.5 !important;
    color: var(--color-text-muted, #737373) !important;
    text-align: left !important;
}

/* Таблицы результатов */
body.case-study.journal.journal-essay.product-case .journal-prose .results-table-container {
    margin: 32px 0 40px 0;
    overflow-x: auto;
}

body.case-study.journal.journal-essay.product-case .journal-prose .results-table {
    width: 100%;
    font-family: var(--font-body, 'Inter', sans-serif);
    font-size: 14px;
    border-collapse: collapse;
}

body.case-study.journal.journal-essay.product-case .journal-prose .results-table th,
body.case-study.journal.journal-essay.product-case .journal-prose .results-table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

[data-theme="dark"] body.case-study.journal.journal-essay.product-case .journal-prose .results-table th,
[data-theme="dark"] body.case-study.journal.journal-essay.product-case .journal-prose .results-table td {
    border-bottom-color: rgba(255, 255, 255, 0.12);
}

/* TradersLab video block в hero */
body.case-study.journal.journal-essay.product-case .case-hero-figure .hero-video-block {
    border-radius: 0 !important;
}
