/* Editorial display system for the long-form assessment */
:root {
  --brand: #18384f;
  --brand-2: #275d78;
  --brand-3: #d4a84f;
  --ink: #17232c;
  --muted: #5f6f7a;
  --paper: #fbfaf7;
  --surface: #ffffff;
  --surface-alt: #f3f5f5;
  --line: #d9e0e3;
  --line-strong: #bdc9cf;
  --official: #2c7394;
  --official-soft: #eaf4f8;
  --doctrine: #6c568f;
  --doctrine-soft: #f1edf7;
  --evidence: #39765a;
  --evidence-soft: #edf6f0;
  --risk: #9b563e;
  --risk-soft: #fbf0eb;
  --analysis: #7b6b3d;
  --analysis-soft: #f8f4e8;
  --source: #546674;
  --source-soft: #eef2f4;
  --shadow: 0 18px 50px rgba(17, 39, 53, .09);
  --shadow-sm: 0 8px 24px rgba(17, 39, 53, .07);
  --radius: 18px;
  --content-width: 800px;
  --font-scale: 1;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --brand: #d6e7ef;
  --brand-2: #8bc0d8;
  --brand-3: #e2bd6f;
  --ink: #e9f0f3;
  --muted: #a8b8c0;
  --paper: #0f171d;
  --surface: #172229;
  --surface-alt: #1d2a32;
  --line: #31434d;
  --line-strong: #49606c;
  --official: #79bbda;
  --official-soft: #183849;
  --doctrine: #b7a0d4;
  --doctrine-soft: #302b3d;
  --evidence: #88c5a2;
  --evidence-soft: #21382c;
  --risk: #e19a7e;
  --risk-soft: #422b25;
  --analysis: #d4bf7b;
  --analysis-soft: #373324;
  --source: #aac0cd;
  --source-soft: #28353c;
  --shadow: 0 18px 50px rgba(0, 0, 0, .28);
  --shadow-sm: 0 8px 24px rgba(0, 0, 0, .2);
  color-scheme: dark;
}
:root[data-text-size="small"] { --font-scale: .92; }
:root[data-text-size="large"] { --font-scale: 1.10; }
:root[data-reading-width="wide"] { --content-width: 980px; }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: calc(16px * var(--font-scale));
  line-height: 1.72;
  text-rendering: optimizeLegibility;
}
a { color: var(--brand-2); text-decoration-thickness: .08em; text-underline-offset: .18em; }
a:hover { text-decoration-thickness: .13em; }
button, input { font: inherit; }
button { color: inherit; }
img, svg { display: block; max-width: 100%; }
::selection { color: #10212b; background: #f2d58f; }

.skip-link { position: fixed; left: 1rem; top: -80px; z-index: 1000; padding: .7rem 1rem; color: white; background: #111; border-radius: 8px; }
.skip-link:focus { top: 1rem; }
.noscript { padding: .75rem 1rem; background: #fff2c7; color: #372d13; text-align: center; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.reading-progress { position: fixed; inset: 0 0 auto; z-index: 1001; height: 3px; background: transparent; }
.reading-progress span { display: block; width: 0; height: 100%; background: linear-gradient(90deg, var(--brand-3), var(--brand-2)); }

.utility-bar { position: sticky; top: 0; z-index: 40; border-bottom: 1px solid rgba(255,255,255,.14); background: rgba(18,43,58,.96); backdrop-filter: blur(18px); }
.utility-inner { width: min(1360px, calc(100% - 2rem)); min-height: 56px; margin: auto; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.utility-title { min-width: 0; display: flex; align-items: center; gap: .7rem; color: #edf5f7; font-weight: 700; font-size: .88rem; text-decoration: none; }
.utility-title > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.utility-mark { display: grid; place-items: center; width: 30px; height: 30px; border: 1px solid rgba(255,255,255,.3); border-radius: 9px; color: #f1d58f; font-size: .72rem; letter-spacing: .06em; }
.utility-links { display: flex; align-items: center; gap: .9rem; }
.utility-links a { color: #dce9ed; font-size: .82rem; text-decoration: none; }
.utility-links a:hover { color: white; }
.utility-pdf { padding: .4rem .72rem; border: 1px solid rgba(255,255,255,.28); border-radius: 999px; }

.report-hero { position: relative; overflow: hidden; color: white; background:
  radial-gradient(circle at 85% 20%, rgba(212,168,79,.18), transparent 25%),
  linear-gradient(135deg, #102d40 0%, #1b465f 58%, #224e62 100%); }
.report-hero::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .16; background-image: linear-gradient(rgba(255,255,255,.08) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.08) 1px, transparent 1px); background-size: 38px 38px; mask-image: linear-gradient(to left, black, transparent 75%); }
.report-hero-inner { position: relative; z-index: 1; width: min(1240px, calc(100% - 3rem)); margin: auto; padding: clamp(4rem, 8vw, 7.5rem) 0 clamp(3.5rem, 7vw, 6.5rem); display: grid; grid-template-columns: minmax(0,1.55fr) minmax(320px,.72fr); gap: clamp(2.5rem, 6vw, 6rem); align-items: end; }
.overline { margin-bottom: 1rem; color: #f0d58f; font-size: .74rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.overline.dark { color: var(--brand-2); }
.report-hero h1 { max-width: 830px; margin: 0; font-family: Iowan Old Style, Charter, Georgia, serif; font-size: clamp(3.2rem, 7vw, 6.7rem); line-height: .98; letter-spacing: -.052em; font-weight: 700; }
.report-hero h1 span { color: #f0d58f; }
.hero-subtitle { max-width: 760px; margin: 1.4rem 0 .8rem; color: #e1edf1; font-family: Iowan Old Style, Charter, Georgia, serif; font-size: clamp(1.25rem, 2.2vw, 1.65rem); line-height: 1.4; }
.hero-deck { max-width: 760px; margin: 0 0 1.7rem; color: #c7d9df; font-size: 1.02rem; line-height: 1.68; }
.hero-meta { display: flex; flex-wrap: wrap; gap: .5rem 1.2rem; margin-bottom: 1.7rem; color: #c4d6dc; font-size: .82rem; }
.hero-meta span { display: inline-flex; gap: .35rem; }
.hero-meta b { color: white; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: .7rem 1.05rem; border: 1px solid transparent; border-radius: 10px; font-weight: 750; font-size: .88rem; text-decoration: none; cursor: pointer; }
.button-primary { color: #102d40; background: #f0d58f; }
.button-primary:hover { background: #f5dfa5; }
.button-secondary { color: white; border-color: rgba(255,255,255,.38); background: rgba(255,255,255,.07); }
.button-secondary:hover { background: rgba(255,255,255,.13); }
.button-compact { min-height: 38px; padding: .5rem .72rem; color: var(--ink); border-color: var(--line); background: var(--surface); font-size: .8rem; }
.hero-panel { padding: 1.6rem; border: 1px solid rgba(255,255,255,.2); border-radius: 18px; background: rgba(8,27,39,.42); box-shadow: 0 18px 48px rgba(0,0,0,.18); backdrop-filter: blur(12px); }
.hero-panel-label { color: #f0d58f; font-size: .7rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.hero-panel h2 { margin: .65rem 0 1.3rem; font-family: Iowan Old Style, Charter, Georgia, serif; font-size: 1.55rem; line-height: 1.25; }
.hero-panel ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .85rem; }
.hero-panel li { display: grid; grid-template-columns: auto 1fr; align-items: start; gap: .7rem; }
.hero-panel strong { display: block; line-height: 1.25; }
.hero-panel small { display: block; margin-top: .1rem; color: #bcd0d7; line-height: 1.35; }
.legend-mark { width: 10px; height: 10px; margin-top: .28rem; border-radius: 50%; box-shadow: 0 0 0 4px rgba(255,255,255,.05); }
.legend-mark.official { background: var(--official); }
.legend-mark.doctrine { background: var(--doctrine); }
.legend-mark.evidence { background: var(--evidence); }
.legend-mark.risk { background: var(--risk); }

.scope-banner { width: min(1180px, calc(100% - 3rem)); margin: -1.45rem auto 0; position: relative; z-index: 3; display: grid; grid-template-columns: auto 1fr; gap: 1rem; align-items: start; padding: 1.05rem 1.2rem; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); box-shadow: var(--shadow-sm); }
.scope-banner strong { display: block; line-height: 1.35; }
.scope-banner p { margin: .25rem 0 0; color: var(--muted); font-size: .84rem; line-height: 1.5; }
.scope-badge { padding: .22rem .55rem; border-radius: 999px; color: var(--brand); background: var(--source-soft); font-size: .7rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }

.key-findings { width: min(1180px, calc(100% - 3rem)); margin: clamp(3rem, 6vw, 5.5rem) auto; }
.key-findings-heading { max-width: 720px; margin-bottom: 1.5rem; }
.key-findings h2 { margin: 0; font-family: Iowan Old Style, Charter, Georgia, serif; font-size: clamp(2rem,4vw,3.15rem); line-height: 1.08; letter-spacing: -.035em; }
.key-findings-heading p { margin: .8rem 0 0; color: var(--muted); }
.findings-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 1rem; }
.finding-card { min-height: 190px; padding: 1.25rem 1.35rem; border: 1px solid var(--line); border-top: 4px solid; border-radius: 14px; background: var(--surface); box-shadow: var(--shadow-sm); }
.finding-card.tone-official { border-top-color: var(--official); }
.finding-card.tone-doctrine { border-top-color: var(--doctrine); }
.finding-card.tone-risk { border-top-color: var(--risk); }
.finding-card.tone-evidence { border-top-color: var(--evidence); }
.finding-topline { display: flex; justify-content: space-between; gap: .8rem; color: var(--muted); font-size: .7rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.finding-topline b { color: inherit; text-align: right; }
.finding-card p { margin: 1.05rem 0 0; font-family: Iowan Old Style, Charter, Georgia, serif; font-size: 1.15rem; line-height: 1.5; }

.site-shell { width: min(1360px, calc(100% - 2rem)); margin: 0 auto; display: grid; grid-template-columns: 280px minmax(0,1fr); gap: clamp(2rem,4vw,4.5rem); align-items: start; }
.sidebar { position: sticky; top: 76px; max-height: calc(100vh - 92px); overflow: hidden; }
.sidebar-inner { max-height: inherit; overflow-y: auto; padding: .9rem; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); box-shadow: var(--shadow-sm); scrollbar-width: thin; }
.sidebar-tools label, .toc-title, .control-label { display: block; margin-bottom: .45rem; color: var(--muted); font-size: .68rem; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
.search-box { position: relative; }
.search-box svg { position: absolute; left: .72rem; top: 50%; width: 17px; transform: translateY(-50%); fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; }
.search-box input { width: 100%; padding: .68rem .7rem .68rem 2.15rem; color: var(--ink); border: 1px solid var(--line); border-radius: 10px; outline: 0; background: var(--surface-alt); font-size: .82rem; }
.search-box input:focus { border-color: var(--brand-2); box-shadow: 0 0 0 3px rgba(39,93,120,.14); }
.search-status { min-height: 1.25rem; margin: .35rem 0 .2rem; color: var(--muted); font-size: .72rem; }
.search-navigation { display: grid; grid-template-columns: 1fr 1fr; gap: .4rem; }
.search-navigation button, .segmented-control button, .report-toolbar button, .section-copy { border: 1px solid var(--line); border-radius: 8px; background: var(--surface-alt); cursor: pointer; }
.search-navigation button { padding: .35rem .45rem; font-size: .72rem; }
.search-navigation button:disabled { opacity: .45; cursor: default; }
.toc { margin-top: 1.25rem; padding-top: 1.05rem; border-top: 1px solid var(--line); }
.toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: .16rem; }
.toc li { margin: 0; padding: 0; }
.toc a { display: block; padding: .42rem .5rem; border-left: 2px solid transparent; border-radius: 0 7px 7px 0; color: var(--muted); font-size: .77rem; line-height: 1.35; text-decoration: none; }
.toc a:hover { color: var(--ink); background: var(--surface-alt); }
.toc a.active { color: var(--brand); border-left-color: var(--brand-3); background: var(--surface-alt); font-weight: 750; }
.toc-sub a { padding-left: 1rem; font-size: .71rem; }
.display-controls { margin-top: 1.1rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.segmented-control { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; margin-bottom: .8rem; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; }
.segmented-control button { min-height: 34px; border: 0; border-right: 1px solid var(--line); border-radius: 0; font-size: .72rem; }
.segmented-control button:last-child { border-right: 0; }
.segmented-control button.active { color: white; background: var(--brand-2); }
.sidebar-actions { margin-top: 1rem; }
.icon-button { width: 100%; display: flex; align-items: center; gap: .55rem; margin-top: .45rem; padding: .55rem .65rem; border: 1px solid var(--line); border-radius: 9px; color: var(--ink); background: var(--surface); cursor: pointer; font-size: .76rem; }
.icon-button svg { width: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.main-content { min-width: 0; padding-bottom: 4rem; }
.mobile-toolbar { display: none; }
.reading-guide { margin-bottom: 1rem; padding: 1.25rem 1.35rem; display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 1.4rem; align-items: center; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); box-shadow: var(--shadow-sm); }
.reading-guide h2 { margin: 0; font-family: Iowan Old Style, Charter, Georgia, serif; font-size: 1.55rem; line-height: 1.2; }
.reading-guide p { margin: .45rem 0 0; color: var(--muted); font-size: .84rem; }
.reading-guide-legend { display: grid; grid-template-columns: repeat(2,auto); gap: .55rem 1rem; color: var(--muted); font-size: .72rem; }
.reading-guide-legend span { display: flex; align-items: center; gap: .45rem; white-space: nowrap; }
.reading-guide-legend .legend-mark { margin: 0; }
.report-toolbar { position: sticky; top: 68px; z-index: 22; max-width: var(--content-width); margin: 0 0 1rem; padding: .75rem .9rem; display: flex; justify-content: space-between; gap: 1rem; align-items: center; border: 1px solid var(--line); border-radius: 12px; background: color-mix(in srgb, var(--surface) 92%, transparent); box-shadow: var(--shadow-sm); backdrop-filter: blur(16px); }
.report-toolbar > div:first-child { min-width: 0; display: flex; align-items: baseline; gap: .6rem; }
.report-toolbar strong { white-space: nowrap; font-size: .78rem; }
.report-toolbar span { overflow: hidden; color: var(--muted); font-size: .72rem; text-overflow: ellipsis; white-space: nowrap; }
.report-toolbar-actions { display: flex; gap: .45rem; align-items: center; }
.report-toolbar button, .report-toolbar a { padding: .38rem .58rem; color: var(--muted); border-radius: 7px; font-size: .7rem; text-decoration: none; white-space: nowrap; }
.report-toolbar a { border: 1px solid var(--line); background: var(--surface-alt); }
.report { width: min(100%, var(--content-width)); transition: max-width .25s ease; }
.report-section { position: relative; margin: 0 0 1.2rem; padding: clamp(1.4rem,3vw,2.6rem); border: 1px solid var(--line); border-left: 5px solid var(--line-strong); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-sm); }
.report-section[data-tone="official"] { border-left-color: var(--official); }
.report-section[data-tone="doctrine"] { border-left-color: var(--doctrine); }
.report-section[data-tone="evidence"] { border-left-color: var(--evidence); }
.report-section[data-tone="risk"] { border-left-color: var(--risk); }
.report-section[data-tone="analysis"] { border-left-color: var(--analysis); }
.report-section[data-tone="source"] { border-left-color: var(--source); }
.section-heading { position: relative; margin: 0 0 1.4rem; padding-bottom: 1.25rem; border-bottom: 1px solid var(--line); }
.section-heading-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .55rem; margin-bottom: .75rem; }
.section-kicker { color: var(--muted); font-size: .68rem; font-weight: 850; letter-spacing: .11em; text-transform: uppercase; }
.section-type { padding: .18rem .48rem; border-radius: 999px; font-size: .66rem; font-weight: 800; }
.section-type.tone-official { color: var(--official); background: var(--official-soft); }
.section-type.tone-doctrine { color: var(--doctrine); background: var(--doctrine-soft); }
.section-type.tone-evidence { color: var(--evidence); background: var(--evidence-soft); }
.section-type.tone-risk { color: var(--risk); background: var(--risk-soft); }
.section-type.tone-analysis { color: var(--analysis); background: var(--analysis-soft); }
.section-type.tone-source { color: var(--source); background: var(--source-soft); }
.section-title { max-width: 92%; margin: 0; color: var(--brand); font-family: Iowan Old Style, Charter, Georgia, serif; font-size: clamp(2rem,4vw,3rem); line-height: 1.08; letter-spacing: -.035em; }
.section-copy { position: absolute; right: 0; top: 0; padding: .35rem .55rem; color: var(--muted); background: var(--surface-alt); font-size: .68rem; opacity: .78; }
.section-copy:hover { opacity: 1; }
.section-lead { margin: 0 0 1.45rem !important; color: var(--ink); font-family: Iowan Old Style, Charter, Georgia, serif; font-size: 1.14rem; line-height: 1.62; }
.report h3 { margin: 2.25rem 0 .8rem; color: var(--brand); font-family: Iowan Old Style, Charter, Georgia, serif; font-size: clamp(1.35rem,2.4vw,1.72rem); line-height: 1.25; letter-spacing: -.015em; }
.report h2[id], .report h3[id] { scroll-margin-top: 118px; }
.report p { margin: 0 0 1.08rem; }
.report strong { color: var(--ink); }
.report ul, .report ol { margin: .6rem 0 1.25rem; padding-left: 1.35rem; }
.report li { margin: .42rem 0; padding-left: .18rem; }
.report li::marker { color: var(--brand-2); }
.report blockquote { margin: 1.4rem 0; padding: 1.1rem 1.25rem; border-left: 4px solid var(--brand-2); background: var(--source-soft); }
.heading-link { display: inline-flex; margin-left: .45rem; opacity: 0; color: var(--muted); text-decoration: none; font-family: ui-sans-serif,sans-serif; font-size: .72em; vertical-align: middle; }
h2:hover .heading-link, h3:hover .heading-link, .heading-link:focus { opacity: 1; }

.callout { margin: 1.7rem 0; padding: 1.25rem 1.4rem 1.35rem; border: 1px solid var(--line); border-radius: 13px; background: var(--surface-alt); }
.callout[data-tone="official"] { background: var(--official-soft); border-color: color-mix(in srgb,var(--official) 30%,var(--line)); }
.callout[data-tone="doctrine"] { background: var(--doctrine-soft); border-color: color-mix(in srgb,var(--doctrine) 30%,var(--line)); }
.callout[data-tone="evidence"] { background: var(--evidence-soft); border-color: color-mix(in srgb,var(--evidence) 30%,var(--line)); }
.callout[data-tone="risk"] { background: var(--risk-soft); border-color: color-mix(in srgb,var(--risk) 30%,var(--line)); }
.callout-label { margin-bottom: .55rem; color: var(--muted); font-size: .67rem; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
.callout p { margin: 0; color: var(--ink); font-family: Iowan Old Style, Charter, Georgia, serif; font-size: 1.16rem; line-height: 1.55; }

.table-wrap { position: relative; margin: 1.05rem 0 1.8rem; overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); box-shadow: 0 4px 14px rgba(17,39,53,.04); }
.table-meta { position: sticky; left: 0; display: flex; justify-content: space-between; gap: 1rem; padding: .5rem .7rem; color: var(--muted); border-bottom: 1px solid var(--line); background: var(--surface-alt); font-size: .66rem; font-weight: 750; letter-spacing: .05em; text-transform: uppercase; }
.data-table { width: 100%; min-width: 660px; border-collapse: separate; border-spacing: 0; font-size: .84rem; line-height: 1.48; }
.data-table th, .data-table td { padding: .78rem .82rem; vertical-align: top; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); text-align: left; }
.data-table th:last-child, .data-table td:last-child { border-right: 0; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table thead th { position: sticky; top: 0; z-index: 1; color: var(--brand); background: var(--source-soft); font-size: .72rem; line-height: 1.3; letter-spacing: .02em; }
.data-table tbody tr:nth-child(even) { background: var(--surface-alt); }
.data-table tbody tr:hover { background: color-mix(in srgb,var(--brand-2) 7%,var(--surface)); }
.data-table td:first-child { font-weight: 720; }

.warning-grid { list-style: none; padding: 0 !important; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .75rem; }
.warning-grid li { position: relative; margin: 0; padding: .85rem .9rem .85rem 2.25rem; border: 1px solid var(--line); border-radius: 10px; background: var(--risk-soft); font-size: .84rem; line-height: 1.48; }
.warning-grid li::before { content: "!"; position: absolute; left: .85rem; top: .9rem; display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; color: white; background: var(--risk); font-size: .68rem; font-weight: 900; }

.source-group { margin: .8rem 0; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-alt); overflow: clip; }
.source-group summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 1.05rem; cursor: pointer; }
.source-group summary::-webkit-details-marker { display: none; }
.source-group summary h3 { margin: 0; font-size: 1.15rem; }
.source-toggle { color: var(--muted); font-size: .68rem; text-transform: uppercase; letter-spacing: .07em; }
.source-group[open] .source-toggle::before { content: "Collapse "; }
.source-group:not([open]) .source-toggle::before { content: "Expand "; }
.source-group-body { padding: 0 1rem 1rem; border-top: 1px solid var(--line); background: var(--surface); }
.source-group-body ul { list-style: none; padding: 0; }
.source-group-body li { padding: .75rem 0; border-bottom: 1px solid var(--line); }
.source-group-body li:last-child { border-bottom: 0; }
.source-group-body li p { margin: 0; }
.source-link { display: inline-flex; margin-left: .35rem; padding: .18rem .44rem; border: 1px solid var(--line); border-radius: 999px; color: var(--brand-2); background: var(--surface-alt); font-size: .68rem; font-weight: 750; text-decoration: none; white-space: nowrap; }
.scripture-source-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: .5rem; }
.scripture-source-grid li { padding: .55rem .65rem; border: 1px solid var(--line); border-radius: 8px; }
.scripture-source-grid strong { font-size: .8rem; }

mark { padding: .05em .15em; border-radius: .15em; color: #241e0a; background: #f5d678; }
mark.current-match { outline: 3px solid var(--risk); outline-offset: 2px; }
.site-footer { width: min(100%, var(--content-width)); padding: 1.7rem .2rem 2.5rem; display: flex; justify-content: space-between; gap: 1.5rem; color: var(--muted); border-top: 1px solid var(--line); font-size: .8rem; }
.site-footer p { margin: .2rem 0 0; }
.footer-actions { display: flex; gap: .85rem; white-space: nowrap; }
.back-to-top { position: fixed; right: 1.1rem; bottom: 1.1rem; z-index: 25; display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 50%; color: var(--ink); background: var(--surface); box-shadow: var(--shadow-sm); opacity: 0; pointer-events: none; transform: translateY(8px); transition: .2s; cursor: pointer; }
.back-to-top.visible { opacity: 1; pointer-events: auto; transform: none; }
.back-to-top svg { width: 19px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

@media (max-width: 1040px) {
  .report-hero-inner { grid-template-columns: 1fr; }
  .hero-panel { max-width: 680px; }
  .site-shell { grid-template-columns: 240px minmax(0,1fr); gap: 1.6rem; }
  .reading-guide { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  .utility-title > span:last-child { max-width: 55vw; }
  .report-hero-inner { width: min(100% - 2rem, 720px); padding: 3.5rem 0 4.5rem; }
  .report-hero h1 { font-size: clamp(2.8rem,12vw,4.8rem); }
  .scope-banner, .key-findings { width: min(100% - 2rem, 720px); }
  .findings-grid { grid-template-columns: 1fr; }
  .site-shell { width: min(100% - 1rem, 760px); display: block; }
  .sidebar { position: fixed; inset: 56px auto 0 0; z-index: 50; width: min(88vw, 340px); max-height: none; padding: .55rem; background: rgba(15,23,29,.45); transform: translateX(-110%); transition: transform .22s ease; }
  .sidebar.open { transform: translateX(0); }
  .sidebar-inner { max-height: calc(100vh - 70px); border-radius: 13px; }
  .mobile-toolbar { position: sticky; top: 62px; z-index: 30; display: flex; justify-content: space-between; gap: .5rem; margin: 0 0 .7rem; padding: .55rem; border: 1px solid var(--line); border-radius: 11px; background: rgba(251,250,247,.92); backdrop-filter: blur(12px); }
  :root[data-theme="dark"] .mobile-toolbar { background: rgba(23,34,41,.92); }
  .report-toolbar { top: 118px; }
  .reading-guide { margin-top: .7rem; }
  .reading-guide-legend { grid-template-columns: 1fr 1fr; }
  .warning-grid { grid-template-columns: 1fr; }
  .scripture-source-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .site-footer { flex-direction: column; }
}
@media (max-width: 620px) {
  body { line-height: 1.66; }
  .utility-links > a:first-child { display: none; }
  .report-hero h1 br { display: none; }
  .hero-panel { padding: 1.2rem; }
  .hero-meta { display: grid; gap: .25rem; }
  .hero-actions .button { flex: 1 1 160px; }
  .key-findings { margin: 3rem auto; }
  .finding-card { min-height: 0; }
  .reading-guide { padding: 1rem; }
  .reading-guide-legend { grid-template-columns: 1fr; }
  .report-toolbar-actions button { display: none; }
  .report-section { padding: 1.2rem 1rem 1.45rem; border-left-width: 4px; border-radius: 14px; }
  .section-title { max-width: 100%; font-size: 2rem; }
  .section-copy { position: static; margin-top: .8rem; }
  .section-lead { font-size: 1.05rem; }
  .callout { padding: 1.05rem; }
  .callout p { font-size: 1.06rem; }
  .table-wrap { overflow: visible; border: 0; background: transparent; box-shadow: none; }
  .table-meta { position: static; border: 1px solid var(--line); border-radius: 8px; margin-bottom: .5rem; }
  .data-table { min-width: 0; display: block; }
  .data-table thead, .data-table colgroup { display: none; }
  .data-table tbody { display: grid; gap: .7rem; }
  .data-table tr { display: block; overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: var(--surface) !important; box-shadow: 0 4px 12px rgba(17,39,53,.04); }
  .data-table td { display: grid; grid-template-columns: minmax(105px,35%) 1fr; gap: .7rem; padding: .65rem .7rem; border: 0; border-bottom: 1px solid var(--line); font-size: .8rem; }
  .data-table td:last-child { border-bottom: 0; }
  .data-table td::before { content: attr(data-label); color: var(--muted); font-size: .65rem; font-weight: 850; letter-spacing: .04em; text-transform: uppercase; }
  .scripture-source-grid { grid-template-columns: 1fr; }
  .source-link { display: table; margin: .5rem 0 0; }
  .footer-actions { flex-wrap: wrap; }
}
@media print {
  :root { --ink: #111; --muted: #444; --paper: #fff; --surface: #fff; --surface-alt: #f4f4f4; --line: #bbb; --content-width: 100%; }
  .utility-bar, .reading-progress, .sidebar, .mobile-toolbar, .report-toolbar, .back-to-top, .hero-actions, .scope-banner, .key-findings, .reading-guide, .section-copy, .source-toggle { display: none !important; }
  .report-hero { color: #111; background: #fff; }
  .report-hero::after, .hero-panel { display: none; }
  .report-hero-inner { width: 100%; padding: 0 0 1.5rem; display: block; }
  .report-hero h1, .report-hero h1 span, .hero-subtitle, .hero-deck, .hero-meta, .hero-meta b { color: #111; }
  .site-shell { width: 100%; display: block; }
  .report-section { break-inside: avoid-page; margin-bottom: .6rem; padding: 1rem; box-shadow: none; }
  .source-group { break-inside: auto; }
  .source-group[open] .source-group-body { display: block; }
  .data-table { min-width: 0; font-size: 8.5pt; }
  a { color: #111; text-decoration: none; }
  .site-footer { width: 100%; }
}
