:root {
    --evidence-ink: #151714;
    --evidence-paper: #fbf5ea;
    --evidence-paper-2: #f5ecdd;
    --evidence-white: #fffdf8;
    --evidence-line: #d9cfbd;
    --evidence-muted: #756f64;
    --evidence-gold: #c9a84c;
    --evidence-cyan: #82e8e6;
    --evidence-violet: #b5a1ff;
    --evidence-coral: #ff806b;
    --evidence-deep: #080810;

    --evidence-shadow:
        0 24px 80px rgba(27, 26, 22, 0.12);

    --evidence-max: 1240px;
}

/* Page foundation */

body.evidence-detail-page {
    margin: 0;
    color: var(--evidence-ink);
    background: var(--evidence-paper);
    font-family:
        "DM Sans",
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
    line-height: 1.5;
}

.evidence-detail-page *,
.evidence-detail-page *::before,
.evidence-detail-page *::after {
    box-sizing: border-box;
}



.evidence-detail-shell {
    width: 100%;
    max-width: var(--evidence-max);
    margin-inline: auto;
    padding-inline: 24px;
}

/* Administrator preview */

.evidence-preview-notice {
    padding: 13px 24px;
    color: var(--evidence-ink);
    background: var(--evidence-gold);
    font-size: 13px;
    font-weight: 850;
    text-align: center;
}

/* Hero */
/* =========================================================
   BOOK-STYLE EVIDENCE HERO
========================================================= */

.evidence-detail-hero {
    position: relative;
    overflow: hidden;
    color: var(--evidence-ink);
    background: var(--evidence-paper);
    border-bottom: 1px solid var(--evidence-line);
}

/*
 * The previous Evidence design used decorative circles.
 * They are disabled so the heading matches the Book page.
 */
.evidence-detail-hero::before,
.evidence-detail-hero::after {
    display: none;
    content: none;
}

.evidence-detail-hero-inner {
    position: relative;
    padding-block: 76px 50px;
}

/* Back link */

.evidence-back-link {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 38px;
    color: var(--evidence-muted);
    font-size: 12px;
    font-weight: 850;
    line-height: 1;
    letter-spacing: 0.08em;
    text-decoration: none;
    text-transform: uppercase;
    transition:
        color 0.2s ease,
        transform 0.2s ease;
}

.evidence-back-link:hover,
.evidence-back-link:focus-visible {
    color: var(--evidence-ink);
    transform: translateX(-2px);
}

/* Same eyebrow style as the Book page */

.evidence-detail-eyebrow {
    margin-bottom: 14px;
    color: var(--evidence-gold);
    font-size: 13px;
    font-weight: 900;
    line-height: 1.2;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

/* Same title proportions as the Book page */

.evidence-detail-title {
    max-width: 1080px;
    margin: 0;
    color: var(--evidence-ink);
    font-family:
        "DM Sans",
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
    font-size: clamp(50px, 7vw, 94px);
    font-weight: 900;
    line-height: 0.92;
    letter-spacing: -0.065em;
    overflow-wrap: anywhere;
    text-wrap: balance;
}

/* Citation/summary underneath the heading */

.evidence-detail-citation {
    max-width: 880px;
    margin: 28px 0 0;
    color: #4f4d46;
    font-size: 20px;
    line-height: 1.65;
}

/* Record metadata */

.evidence-detail-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 30px;
}

.evidence-detail-chip {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 7px 11px;
    color: var(--evidence-ink);
    background: var(--evidence-white);
    border: 1px solid var(--evidence-line);
    border-radius: 999px;
    font-size: 10px;
    font-weight: 900;
    line-height: 1;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.evidence-detail-chip--gold {
    color: var(--evidence-ink);
    background: var(--evidence-gold);
    border-color: var(--evidence-gold);
}

/* Hero buttons */

.evidence-detail-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 28px;
}

.evidence-detail-actions .site-cta-button {
    min-height: 46px;
}

/* Black action button */

.evidence-action-dark {
    color: var(--evidence-paper);
    background: var(--evidence-ink);
    border-color: var(--evidence-ink);
}

.evidence-action-dark:hover,
.evidence-action-dark:focus-visible {
    color: var(--evidence-paper);
    background: #242620;
    box-shadow: 0 10px 25px rgba(21, 23, 20, 0.16);
}

/* Cream/white secondary button */

.evidence-action-light {
    color: var(--evidence-ink);
    background: var(--evidence-white);
    border-color: var(--evidence-line);
}

.evidence-action-light:hover,
.evidence-action-light:focus-visible {
    color: var(--evidence-ink);
    background: #ffffff;
    box-shadow: 0 10px 25px rgba(21, 23, 20, 0.12);
}

/* Featured image */

/* =========================================================
   FEATURED IMAGE
========================================================= */

.evidence-featured-section {
    position: relative;
    z-index: 1;
    margin-top: 0;
    padding: 42px 0 0;
    background: var(--evidence-paper);
}

.evidence-featured-frame {
    width: 100%;
    max-width: 1120px;
    margin: 0 auto;
    padding: 12px;
    overflow: hidden;
    border: 1px solid var(--evidence-line);
    border-radius: 30px;
    background: var(--evidence-white);
    box-shadow: var(--evidence-shadow);
}

.evidence-featured-image {
    display: block;
    width: 100%;
    height: auto;
    max-height: 720px;
    margin: 0 auto;
    border-radius: 20px;
    background: #ffffff;
    object-fit: contain;
    object-position: center;
}

/*
 * object-fit: contain ensures research charts,
 * diagrams and screenshots are not cropped.
 */

/* Main content */

.evidence-detail-body {
    padding-block: clamp(54px, 7vw, 92px);
}

.evidence-detail-layout {
    display: grid;
    grid-template-columns:
        minmax(0, 1fr)
        minmax(230px, 300px);
    gap: 26px;
    align-items: start;
}

.evidence-article-card {
    min-width: 0;
    padding: clamp(26px, 5vw, 64px);
    border: 1px solid var(--evidence-line);
    border-radius: 30px;
    background: var(--evidence-white);
}

.evidence-record-sidebar {
    position: sticky;
    top: 106px;
    display: grid;
    gap: 14px;
}

.evidence-record-card {
    padding: 22px;
    border: 1px solid var(--evidence-line);
    border-radius: 24px;
    background: var(--evidence-paper-2);
}

.evidence-record-card h2 {
    margin: 0 0 18px;
    font-size: 18px;
    font-weight: 900;
    letter-spacing: -0.035em;
}

.evidence-record-list {
    display: grid;
    gap: 15px;
    margin: 0;
}

.evidence-record-item {
    padding-top: 15px;
    border-top: 1px solid rgba(21, 23, 20, 0.1);
}

.evidence-record-item:first-child {
    padding-top: 0;
    border-top: 0;
}

.evidence-record-item dt {
    margin-bottom: 4px;
    color: var(--evidence-muted);
    font-size: 9px;
    font-weight: 900;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.evidence-record-item dd {
    margin: 0;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.evidence-record-card .site-cta-button {
    width: 100%;
    margin-top: 18px;
}

/* Empty content */

.evidence-content-empty {
    margin: 0;
    padding: 28px;
    border: 1px dashed var(--evidence-line);
    border-radius: 20px;
    color: var(--evidence-muted);
    background: var(--evidence-paper);
    text-align: center;
}

/* =========================================================
   HTML EDITOR CONTENT
   These rules style the semantic HTML entered by the admin.
========================================================= */

.evidence-content {
    color: var(--evidence-ink);
    font-family:
        "DM Sans",
        system-ui,
        sans-serif;
    font-size: 17px;
    line-height: 1.82;
    overflow-wrap: anywhere;
}

.evidence-content > :first-child {
    margin-top: 0;
}

.evidence-content > :last-child {
    margin-bottom: 0;
}

.evidence-content h2,
.evidence-content h3,
.evidence-content h4 {
    color: var(--evidence-ink);
    font-family:
        "DM Sans",
        system-ui,
        sans-serif;
    font-weight: 900;
    letter-spacing: -0.045em;
}

.evidence-content h2 {
    margin: 2.2em 0 0.65em;
    padding-top: 0.9em;
    border-top: 1px solid var(--evidence-line);
    font-size: clamp(30px, 4vw, 48px);
    line-height: 1.02;
}

.evidence-content h2:first-child {
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
}

.evidence-content h3 {
    margin: 1.8em 0 0.6em;
    font-size: clamp(24px, 3vw, 33px);
    line-height: 1.08;
}

.evidence-content h4 {
    margin: 1.6em 0 0.55em;
    font-size: 21px;
    line-height: 1.2;
}

.evidence-content p {
    margin: 0 0 1.25em;
}

.evidence-content strong {
    font-weight: 850;
}

.evidence-content em {
    font-family:
        "Playfair Display",
        Georgia,
        serif;
    font-size: 1.03em;
}

.evidence-content a {
    color: var(--evidence-ink);
    text-decoration-color: var(--evidence-gold);
    text-decoration-line: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 4px;
}

.evidence-content a:hover {
    color: #8c7027;
}

.evidence-content ul,
.evidence-content ol {
    margin: 0 0 1.4em;
    padding-left: 1.5em;
}

.evidence-content li {
    margin-bottom: 0.55em;
    padding-left: 0.3em;
}

.evidence-content li::marker {
    color: var(--evidence-gold);
    font-weight: 800;
}

.evidence-content blockquote {
    margin: 2em 0;
    padding: 24px 26px;
    border-left: 5px solid var(--evidence-gold);
    border-radius: 0 20px 20px 0;
    color: #4c4943;
    background: var(--evidence-paper-2);
    font-family:
        "Playfair Display",
        Georgia,
        serif;
    font-size: 20px;
    font-style: italic;
    line-height: 1.65;
}

.evidence-content blockquote > :last-child {
    margin-bottom: 0;
}

.evidence-content hr {
    height: 1px;
    margin: 2.6em 0;
    border: 0;
    background: var(--evidence-line);
}

.evidence-content table {
    display: block;
    width: 100%;
    margin: 2em 0;
    overflow-x: auto;
    border-spacing: 0;
    border-collapse: collapse;
    font-size: 14px;
}

.evidence-content th,
.evidence-content td {
    min-width: 140px;
    padding: 13px 15px;
    border: 1px solid var(--evidence-line);
    text-align: left;
    vertical-align: top;
}

.evidence-content th {
    background: var(--evidence-paper-2);
    font-weight: 850;
}

.evidence-content sup,
.evidence-content sub {
    font-size: 0.72em;
}

/* PDF reader */

.evidence-pdf-section {
    padding-block: clamp(42px, 6vw, 76px);
}

.evidence-pdf-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 24px;
}

.evidence-pdf-header h1 {
    max-width: 850px;
    margin: 8px 0 0;
    font-size: clamp(34px, 5vw, 62px);
    font-weight: 900;
    line-height: 0.98;
    letter-spacing: -0.055em;
}

.evidence-pdf-frame {
    padding: 10px;
    border: 1px solid var(--evidence-line);
    border-radius: 26px;
    background: var(--evidence-white);
    box-shadow: var(--evidence-shadow);
}

.evidence-pdf-frame iframe {
    display: block;
    width: 100%;
    height: 82vh;
    min-height: 620px;
    border: 0;
    border-radius: 18px;
    background: #fff;
}

.evidence-pdf-fallback {
    margin: 18px 0 0;
    color: var(--evidence-muted);
    font-size: 13px;
}

/* Responsive */

@media (max-width: 960px) {
    .evidence-detail-layout {
        grid-template-columns: 1fr;
    }

    .evidence-record-sidebar {
        position: static;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 700px) {
    .evidence-detail-shell {
        padding-inline: 16px;
    }

   

    .evidence-detail-hero-inner {
        padding-block: 54px 64px;
    }

    .evidence-back-link {
        margin-bottom: 26px;
    }

    .evidence-detail-title {
        font-size: clamp(40px, 13vw, 58px);
        letter-spacing: -0.055em;
    }

    .evidence-detail-citation {
        margin-top: 22px;
        font-size: 16px;
    }

    .evidence-detail-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .evidence-detail-actions .site-cta-button {
        width: 100%;
    }

    .evidence-featured-section {
        margin-top: 0;
        padding-top: 28px;
    }

    .evidence-featured-frame {
        max-width: 100%;
        padding: 7px;
        border-radius: 22px;
    }

    .evidence-featured-image {
        max-height: none;
        border-radius: 16px;
    }

    .evidence-featured-frame {
        padding: 7px;
        border-radius: 22px;
    }

    .evidence-featured-image {
        border-radius: 16px;
    }

    .evidence-article-card {
        padding: 24px 20px;
        border-radius: 24px;
    }

    .evidence-content {
        font-size: 16px;
        line-height: 1.75;
    }

    .evidence-record-sidebar {
        grid-template-columns: 1fr;
    }

    .evidence-pdf-header {
        align-items: stretch;
        flex-direction: column;
    }

    .evidence-pdf-header .site-cta-button {
        width: 100%;
    }

    .evidence-pdf-frame {
        padding: 6px;
        border-radius: 20px;
    }

    .evidence-pdf-frame iframe {
        height: 72vh;
        min-height: 480px;
        border-radius: 14px;
    }
}

@media (max-width: 700px) {
    .evidence-detail-shell {
        padding-inline: 16px;
    }

    .evidence-detail-hero-inner {
        padding-block: 54px 42px;
    }

    .evidence-back-link {
        margin-bottom: 30px;
    }

    .evidence-detail-eyebrow {
        margin-bottom: 12px;
        font-size: 11px;
    }

    .evidence-detail-title {
        font-size: clamp(42px, 13vw, 60px);
        line-height: 0.94;
        letter-spacing: -0.055em;
    }

    .evidence-detail-citation {
        margin-top: 22px;
        font-size: 17px;
        line-height: 1.6;
    }

    .evidence-detail-meta {
        margin-top: 24px;
    }

    .evidence-detail-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .evidence-detail-actions .site-cta-button {
        width: 100%;
    }

    /*
     * Keep the rest of your existing responsive
     * featured-image, article, sidebar and PDF rules here.
     */
}