/* Editorial surfaces: warm canvas outside, lighter modules inside. */
:root {
    --editorial-canvas: #efeee9;
    --editorial-module: #fbfaf8;
    --editorial-inset: #f3f2ed;
    --editorial-highlight: #ffffff;
    --editorial-hover: #f7f6f2;
    --editorial-ink: #171713;
    --editorial-muted: #6f6d66;
    --editorial-radius: 24px;
    --editorial-card-radius: 20px;
}

html:has(body.page-record),
html:has(body.page-article),
html body.page-record,
html body.page-article,
html body.page-record .main-container,
html body.page-record .content-area,
html body.page-record .page-content,
html body.page-record .record-page,
html body.page-record .record-page-content,
html body.page-article .main-container,
html body.page-article .content-area,
html body.page-article .page-content {
    background: var(--editorial-canvas) !important;
    background-color: var(--editorial-canvas) !important;
}

body.page-record .main,
body.page-record .record-page,
body.page-record .record-page-content,
body.page-article .page-content {
    background: transparent !important;
}

body.page-record .site-footer,
body.page-article .site-footer {
    background: var(--editorial-canvas) !important;
}

/* Article and briefing hubs. */
body.page-record .record-articles-search {
    margin: 0 auto clamp(24px, 3vw, 38px) !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
}

body.page-record .record-articles-search__inner {
    width: min(760px, 100%) !important;
    max-width: none !important;
    margin-inline: auto !important;
    gap: 9px !important;
}

body.page-record .record-articles-search__input {
    min-height: 54px !important;
    padding: 0 18px !important;
    border: 0 !important;
    border-radius: 17px !important;
    background: rgba(251, 250, 248, .76) !important;
    box-shadow: none !important;
}

body.page-record .record-grid,
body.page-briefings .briefings-grid {
    gap: clamp(16px, 2vw, 24px) !important;
}

body.page-record .record-grid .record-card,
body.page-briefings .briefings-grid .briefing-record-card {
    gap: 11px !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    overflow: visible !important;
    transform: translateY(0);
    transition: transform 160ms ease, color 160ms ease !important;
}

body.page-record .record-grid .record-card:hover,
body.page-briefings .briefings-grid .briefing-record-card:hover {
    background: transparent !important;
    transform: translateY(-2px) !important;
}

body.page-record .record-grid .record-media,
body.page-briefings .briefings-grid .briefing-record-card .record-media {
    margin: 0 !important;
    border: 0 !important;
    border-radius: var(--editorial-card-radius) !important;
    background: var(--editorial-inset) !important;
    box-shadow: none !important;
    overflow: hidden !important;
}

body.page-record .record-grid .record-card__body.record-content,
body.page-briefings .briefings-grid .briefing-record-card .record-card__body.record-content {
    padding: 0 2px !important;
    background: transparent !important;
}

body.page-record .record-grid .record-card:hover .record-title,
body.page-briefings .briefings-grid .briefing-record-card:hover .record-title {
    text-decoration: none !important;
}

body.page-briefings .briefings-record-cta,
body.page-briefings .briefing-circulation {
    border: 0 !important;
    background: var(--editorial-module) !important;
    box-shadow: none !important;
}

body.page-briefings .briefings-record-cta:hover,
body.page-briefings .briefing-circulation:hover {
    background: var(--editorial-highlight) !important;
}

body.page-briefings .briefing-cta-form input {
    border: 0 !important;
    background: var(--editorial-inset) !important;
}

/* Briefing details: prose sits directly on the warm canvas. */
body.page-briefings .briefing-detail__hero {
    border: 0 !important;
    border-radius: var(--editorial-card-radius) !important;
    background: transparent !important;
    box-shadow: none !important;
}

body.page-briefings .briefing-detail__header {
    margin-top: 16px !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

body.page-briefings .briefing-detail__content {
    gap: clamp(22px, 3vw, 34px) !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

body.page-briefings .briefing-nav {
    padding: 14px !important;
    border: 0 !important;
    border-radius: var(--editorial-card-radius) !important;
    background: var(--editorial-module) !important;
    box-shadow: none !important;
}

body.page-briefings .briefing-nav__links a,
body.page-briefings :is(.briefing-chart-card, .briefing-chart-card--stream, .briefing-signal--table) {
    background: var(--editorial-inset) !important;
}

body.page-briefings :is(.briefing-chart-card__row, .briefing-signal-table__row) {
    background: var(--editorial-highlight) !important;
}

/* Research article details use the canvas as the reading surface. */
body.page-article .page-content {
    max-width: 1120px !important;
    padding-top: clamp(28px, 4vw, 48px) !important;
}

body.page-article .intel-post {
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

body.page-article .intel-post__hero-inner,
body.page-article .intel-post__body.article-content :is(blockquote, .intel-post__twitter-fallback-inner) {
    background: var(--editorial-inset) !important;
}

body.page-article .circulation,
body.page-article .from-record-rail__nav {
    border: 0 !important;
    border-radius: var(--editorial-card-radius) !important;
    background: var(--editorial-module) !important;
    box-shadow: none !important;
}

body.page-article .intel-post-linked {
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

body.page-article .circulation {
    padding: 24px !important;
}

body.page-article .circulation-input {
    border: 0 !important;
    background: var(--editorial-inset) !important;
}

body.page-article .from-record-rail .from-record-rail__card.record-card {
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    overflow: visible !important;
}

body.page-article .from-record-rail .record-card__body.record-content {
    padding: 0 2px !important;
    background: transparent !important;
}

body.page-article .from-record-rail__nav {
    border: 0 !important;
    border-radius: 999px !important;
    background: rgba(251, 250, 248, .94) !important;
}

body.page-article .status-row:not(:empty) {
    width: min(100%, 760px);
    margin: 18px auto 0 max(0px, calc((100% - 920px) / 2));
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

/* Inline editorial links: visible in prose without a heavy black rule. */
body.page-briefings .briefing-body a,
body.page-article .intel-post__body.article-content a {
    color: inherit !important;
    text-decoration-line: underline !important;
    text-decoration-style: solid !important;
    text-decoration-thickness: 1px !important;
    text-decoration-color: rgba(23, 23, 19, .22) !important;
    text-underline-offset: 3px !important;
    transition: text-decoration-color 150ms ease, background-color 150ms ease !important;
}

body.page-briefings .briefing-body a:hover,
body.page-briefings .briefing-body a:focus-visible,
body.page-article .intel-post__body.article-content a:hover,
body.page-article .intel-post__body.article-content a:focus-visible {
    color: inherit !important;
    text-decoration-color: rgba(23, 23, 19, .3) !important;
    background: transparent !important;
    box-shadow: none !important;
}

@media (min-width: 1120px) {
    body.page-briefings .briefing-detail__content {
        gap: clamp(64px, 6vw, 88px) !important;
    }
}

@media (min-width: 980px) {
    body.page-article .intel-post__column,
    body.page-article .intel-post__body.article-content {
        max-width: 820px !important;
    }

    body.page-article .intel-post__body.article-content {
        font-size: 21px !important;
        line-height: 1.62 !important;
    }
}

@media (max-width: 760px) {
    body.page-record .record-page {
        padding-inline: 14px !important;
    }

    body.page-record .record-articles-search {
        margin-bottom: 22px !important;
        padding: 0 !important;
        border-radius: 0 !important;
    }

    body.page-record .record-articles-search__input {
        min-height: 50px !important;
        border-radius: 15px !important;
    }

    body.page-record .record-grid .record-card,
    body.page-briefings .briefings-grid .briefing-record-card {
        border-radius: 18px !important;
    }

    body.page-briefings .briefing-detail__header,
    body.page-briefings .briefing-detail__content {
        padding: 0 !important;
        border-radius: 0 !important;
    }

    body.page-briefings .briefing-nav {
        padding: 12px !important;
        border-radius: 18px !important;
    }

    body.page-article .page-content {
        padding: 18px 14px 72px !important;
    }

    body.page-article .intel-post {
        padding: 0 !important;
        border-radius: 0 !important;
    }

    body.page-article .circulation {
        border-radius: 18px !important;
    }

    body.page-article .intel-post-linked,
    body.page-article .status-row:not(:empty) {
        padding: 0 !important;
        border-radius: 0 !important;
    }
}
