:root {
  --ink: #17324d;
  --ink-2: #29465f;
  --paper: #f7f2e8;
  --paper-2: #fffdf7;
  --terracotta: #c7684f;
  --gold: #f2b35d;
  --sage: #78a897;
  --line: #d8d0c1;
  --muted: #64707a;
  --success: #1d7259;
  --danger: #a13c34;
  --shadow: 0 16px 45px rgba(23, 50, 77, .10);
  --radius: 18px;
  --shell: min(1180px, calc(100% - 40px));
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--paper-2); font: 16px/1.65 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
img { max-width: 100%; height: auto; }
a { color: inherit; text-decoration-thickness: .08em; text-underline-offset: .18em; }
button, input, textarea, select { font: inherit; }
button { color: inherit; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
.shell { width: var(--shell); margin-inline: auto; }
.narrow { max-width: 850px; }
.skip-link { position: fixed; left: 16px; top: -80px; z-index: 100; padding: 10px 16px; background: var(--ink); color: white; border-radius: 8px; }
.skip-link:focus { top: 16px; }

.site-header { position: sticky; top: 0; z-index: 20; background: rgba(255,253,247,.94); backdrop-filter: blur(12px); border-bottom: 1px solid rgba(216,208,193,.85); }
.header-inner { min-height: 74px; display: flex; align-items: center; justify-content: space-between; gap: 28px; }
.brand { display: flex; width: 150px; }
.primary-nav { display: flex; align-items: center; gap: 24px; font-size: .92rem; font-weight: 700; }
.primary-nav a { text-decoration: none; padding-block: 10px; border-bottom: 2px solid transparent; }
.primary-nav a:hover { border-color: var(--terracotta); }
.menu-toggle { display: none; border: 1px solid var(--line); background: white; border-radius: 10px; padding: 8px 12px; gap: 8px; align-items: center; }

h1, h2, h3 { font-family: Georgia, "Times New Roman", serif; line-height: 1.12; letter-spacing: -.025em; margin: 0 0 .7em; }
h1 { font-size: clamp(2.55rem, 6vw, 5.2rem); max-width: 15ch; }
h2 { font-size: clamp(1.8rem, 3vw, 3rem); }
h3 { font-size: 1.35rem; }
p { margin: 0 0 1.25em; }
.kicker, .eyebrow { margin: 0 0 12px; color: var(--terracotta); font-size: .76rem; line-height: 1.2; font-weight: 800; text-transform: uppercase; letter-spacing: .15em; }
.lede { font-size: clamp(1.08rem, 2vw, 1.3rem); color: var(--ink-2); max-width: 65ch; }
.updated { margin-top: 42px; color: var(--muted); font-size: .92rem; }

.hero { min-height: 650px; padding-block: clamp(70px, 10vw, 130px); display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(330px, .8fr); align-items: center; gap: clamp(40px, 8vw, 100px); }
.hero-copy .lede { margin-bottom: 30px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 28px; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 10px 18px; border: 1px solid var(--ink); border-radius: 999px; text-decoration: none; font-weight: 800; cursor: pointer; transition: transform .16s ease, box-shadow .16s ease, background .16s ease; }
.button:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(23,50,77,.12); }
.button.primary { background: var(--ink); color: white; }
.button.secondary { background: transparent; color: var(--ink); }
.button.ghost { background: transparent; border-color: var(--line); }
.button:disabled, .icon-button:disabled { opacity: .48; cursor: not-allowed; transform: none; box-shadow: none; }
.trust-list { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 0; padding: 0; list-style: none; color: var(--muted); font-size: .9rem; }
.trust-list li::before { content: "✓"; color: var(--success); margin-right: 7px; font-weight: 900; }

.hero-board { position: relative; padding: 32px; border: 1px solid var(--ink); border-radius: 3px 30px 3px 30px; background: var(--paper); box-shadow: 22px 22px 0 var(--sage); transform: rotate(1deg); }
.hero-board::before { content: ""; position: absolute; inset: 12px; border: 1px solid var(--line); pointer-events: none; }
.specimen-head { display: flex; justify-content: space-between; text-transform: uppercase; letter-spacing: .12em; font-size: .7rem; font-weight: 800; }
.specimen-word { position: relative; margin: 48px 0 30px; font: 700 clamp(2rem, 5vw, 3.7rem)/1 Georgia, serif; letter-spacing: -.04em; }
.hero-board dl { display: grid; grid-template-columns: repeat(3, 1fr); margin: 0 0 22px; }
.hero-board dl div { border-left: 1px solid var(--line); padding-left: 12px; }
.hero-board dt { color: var(--muted); font-size: .72rem; text-transform: uppercase; }
.hero-board dd { margin: 4px 0 0; font-weight: 800; }
.meter { height: 8px; background: #e5ddce; border-radius: 99px; overflow: hidden; margin-bottom: 14px; }
.meter span { display: block; height: 100%; background: var(--terracotta); }
.hero-board > p { position: relative; margin: 0; color: var(--muted); font-size: .88rem; }

.band { background: var(--ink); color: white; }
.process { display: grid; grid-template-columns: repeat(4, 1fr); }
.process > div { padding: 38px 28px; border-left: 1px solid rgba(255,255,255,.16); }
.process > div:last-child { border-right: 1px solid rgba(255,255,255,.16); }
.process span { color: var(--gold); font-size: .78rem; font-weight: 800; }
.process h2 { margin: 7px 0 4px; font-size: 1.4rem; }
.process p { margin: 0; color: #d5e1e8; font-size: .9rem; }

.section { padding-block: clamp(64px, 9vw, 110px); }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 32px; }
.section-heading h2 { margin-bottom: 0; }
.text-link { font-weight: 800; color: var(--ink); }
.card-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.card { min-height: 260px; display: flex; flex-direction: column; padding: 25px; background: white; border: 1px solid var(--line); border-radius: var(--radius); transition: transform .18s ease, box-shadow .18s ease; }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card h3 a { text-decoration: none; }
.card p:not(.eyebrow) { color: var(--muted); font-size: .93rem; }
.card .text-link { margin-top: auto; }
.topic-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.topic-card { min-height: 210px; display: flex; flex-direction: column; padding: 28px; border-radius: var(--radius); background: var(--paper); text-decoration: none; border: 1px solid transparent; }
.topic-card:hover { border-color: var(--terracotta); }
.topic-card span { color: var(--terracotta); font-size: .78rem; font-weight: 800; text-transform: uppercase; letter-spacing: .12em; }
.topic-card strong { margin: auto 0 8px; font: 700 1.5rem/1.15 Georgia, serif; }
.topic-card small { color: var(--muted); font-size: .9rem; }
.split-feature { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(40px, 9vw, 120px); align-items: center; }
.note-stack { display: grid; gap: 12px; }
.note-stack a { display: flex; align-items: center; gap: 20px; padding: 20px 24px; background: var(--paper); border-left: 6px solid var(--gold); text-decoration: none; }
.note-stack span { color: var(--terracotta); font-weight: 900; }
.source-callout { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; border-top: 1px solid var(--line); }

.breadcrumbs { padding-top: 18px; color: var(--muted); font-size: .8rem; }
.breadcrumbs ol { display: flex; flex-wrap: wrap; gap: 7px; margin: 0; padding: 0; list-style: none; }
.breadcrumbs li:not(:last-child)::after { content: "/"; margin-left: 7px; color: var(--line); }
.page-hero { padding-block: clamp(70px, 9vw, 118px) clamp(42px, 6vw, 72px); }
.page-hero h1 { max-width: 18ch; }
.hub-page .page-hero { border-bottom: 1px solid var(--line); }
.filter-bar { display: flex; align-items: center; gap: 12px; margin-bottom: 28px; }
.filter-bar label { font-weight: 800; }
.filter-bar input { min-width: min(420px, 60vw); padding: 12px 15px; border: 1px solid var(--line); border-radius: 99px; background: white; }
.filter-bar span { margin-left: auto; color: var(--muted); font-size: .88rem; }
.library-grid .card[hidden] { display: none; }

.tool-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .9fr); gap: 22px; align-items: start; padding-bottom: 60px; }
.tool-panel, .result-panel { border: 1px solid var(--line); border-radius: var(--radius); background: white; box-shadow: 0 8px 30px rgba(23,50,77,.06); }
.tool-panel { padding: clamp(22px, 4vw, 38px); }
#tool-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
#tool-form label { display: flex; flex-direction: column; gap: 7px; font-weight: 750; }
#tool-form label:has(textarea), #tool-form .form-actions, #tool-form .form-message { grid-column: 1 / -1; }
input, textarea, select { width: 100%; color: var(--ink); border: 1px solid #b8b1a5; border-radius: 10px; background: #fffefa; padding: 12px 13px; }
textarea { min-height: 116px; resize: vertical; }
input:invalid:not(:placeholder-shown), textarea:invalid:not(:placeholder-shown) { border-color: var(--danger); }
label small { color: var(--muted); font-weight: 400; }
.form-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }
.form-message { min-height: 1.4em; margin: 0; color: var(--danger); font-weight: 700; }
.result-panel { position: sticky; top: 96px; overflow: hidden; }
.result-head { display: flex; justify-content: space-between; align-items: start; padding: 26px 28px 18px; border-bottom: 1px solid var(--line); }
.result-head h2 { margin: 0; font-size: 1.55rem; }
.icon-button { border: 1px solid var(--line); border-radius: 99px; background: transparent; padding: 7px 12px; font-size: .82rem; font-weight: 800; cursor: pointer; }
#tool-result { min-height: 330px; padding: 28px; }
.empty-result { display: grid; place-items: center; text-align: center; color: var(--muted); }
.result-actions { padding: 18px 28px 26px; border-top: 1px solid var(--line); }
.result-list { display: grid; gap: 10px; padding: 0; list-style: none; }
.result-item { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 12px; padding: 13px 14px; background: var(--paper); border-radius: 10px; }
.result-item strong { font-family: Georgia, serif; font-size: 1.13rem; }
.result-item small { color: var(--muted); }
.detailed-results .result-item { align-items: start; }
.detailed-results .result-item div { display: grid; gap: 4px; }
.detailed-results .result-item span { color: var(--ink); font-size: .78rem; }
.detailed-results .result-item em { color: var(--muted); font-size: .78rem; font-style: normal; }
.button:disabled, .icon-button:disabled { cursor: not-allowed; opacity: .48; }
.result-section { margin-bottom: 26px; }
.result-section h3 { font-size: 1.1rem; margin-bottom: 9px; }
.result-section p, .result-section li { font-size: .93rem; }
.score { min-width: 38px; text-align: center; border-radius: 99px; background: var(--ink); color: white; padding: 5px 8px; font-weight: 800; }

.article-layout { display: grid; grid-template-columns: minmax(0, 730px) minmax(240px, 320px); justify-content: space-between; gap: clamp(40px, 9vw, 120px); padding-bottom: clamp(70px, 10vw, 130px); }
.prose { font-size: 1.06rem; }
.prose h2 { margin-top: 2em; font-size: clamp(1.65rem, 3vw, 2.3rem); }
.prose h3 { margin-top: 1.8em; }
.prose li { margin-bottom: .65em; }
.side-note { position: sticky; top: 100px; align-self: start; padding: 26px; background: var(--paper); border-top: 5px solid var(--sage); }
.side-note h2 { font-size: 1.45rem; }
.side-note hr { border: 0; border-top: 1px solid var(--line); margin: 24px 0; }
.side-note .button { width: 100%; margin-bottom: 16px; }
.steps { padding-left: 0; list-style: none; counter-reset: steps; }
.steps li { position: relative; min-height: 48px; padding: 8px 0 12px 54px; counter-increment: steps; }
.steps li::before { content: counter(steps, decimal-leading-zero); position: absolute; left: 0; top: 5px; color: var(--terracotta); font-size: .82rem; font-weight: 900; border-bottom: 2px solid var(--gold); }
.worked-example { padding: 24px; background: var(--paper); border-left: 5px solid var(--gold); }
.worked-example p:last-child { margin-bottom: 0; color: var(--muted); font-size: .88rem; }
.notice { margin: 28px 0; padding: 20px 22px; border: 1px solid var(--gold); border-radius: 12px; background: #fff8e8; }
.notice strong { display: block; margin-bottom: 4px; }
.notice p { margin: 0; }
.check-list { padding: 0; list-style: none; display: grid; gap: 10px; }
.check-list li { display: grid; grid-template-columns: minmax(100px, .35fr) 1fr; gap: 18px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.check-list span { color: var(--muted); }
.table-wrap { max-width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .94rem; }
th, td { text-align: left; padding: 13px; border-bottom: 1px solid var(--line); vertical-align: top; }
thead th { background: var(--ink); color: white; }
.faq-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.faq-list details { padding: 20px; border: 1px solid var(--line); border-radius: 12px; background: white; }
.faq-list summary { font-weight: 800; cursor: pointer; }
.faq-list p { margin: 12px 0 0; color: var(--muted); }
.contact-email { font: 700 clamp(1.15rem, 3vw, 2rem)/1.2 Georgia, serif; overflow-wrap: anywhere; }
.byline { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 24px; color: var(--muted); font-size: .82rem; }
.byline span::before { content: "✓"; margin-right: 7px; color: var(--sage); font-weight: 900; }
.value-strip, .capability-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.value-strip article, .capability-grid article { padding: 26px; border: 1px solid var(--line); border-radius: var(--radius); background: white; }
.value-strip strong { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--ink); color: white; }
.value-strip h3, .capability-grid h3 { margin: 20px 0 8px; }
.value-strip p, .capability-grid p { margin: 0; color: var(--muted); }

.guide-workbook { margin: 48px 0 18px; padding: clamp(22px, 4vw, 34px); border: 1px solid var(--line); border-radius: var(--radius); background: white; box-shadow: 0 8px 30px rgba(23,50,77,.06); }
.workbook-head { display: flex; justify-content: space-between; align-items: start; gap: 20px; margin-bottom: 22px; }
.workbook-head h2 { margin: 0; }
.workbook-head > span { color: var(--muted); font-size: .75rem; }
.guide-workbook label { display: grid; gap: 7px; margin-top: 16px; font-weight: 750; }
.guide-workbook textarea { min-height: 92px; }
.form-message.is-success { color: #236246; }
.related-list { display: grid; gap: 10px; }
.related-list a { display: grid; gap: 3px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 10px; text-decoration: none; }
.related-list a:hover { border-color: var(--terracotta); }
.related-list span { color: var(--muted); font-size: .86rem; }
.flagship-section { margin-top: 48px; padding: clamp(24px, 5vw, 40px); border: 1px solid var(--line); border-top: 6px solid var(--terracotta); border-radius: var(--radius); background: #fffdf8; }
.flagship-section h2 { margin-top: 0; }
.flagship-summary { font: 700 1.16rem/1.6 Georgia, serif; color: var(--ink); }
.deliverable { margin-top: 24px; padding: 18px 20px; border-radius: 12px; background: var(--ink); color: white; }
.deliverable p { margin: 6px 0 0; color: #dce6ec; }
.wide-table table { min-width: 920px; }
.evidence-note { color: var(--muted); font-size: .86rem; }

.lab-layout { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(360px, .92fr); gap: 24px; align-items: start; padding-bottom: 72px; }
.lab-form { display: grid; gap: 18px; }
.lab-step { display: grid; grid-template-columns: 52px 1fr; gap: 18px; padding: clamp(22px, 4vw, 36px); border: 1px solid var(--line); border-radius: var(--radius); background: white; }
.step-marker { display: grid; place-items: center; align-self: start; width: 44px; height: 44px; border-radius: 50%; background: var(--ink); color: white; font-weight: 900; }
.lab-step h2 { margin: 0 0 6px; }
.lab-step > div > p { margin-top: 0; color: var(--muted); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-grid label, .lab-step label { display: grid; gap: 7px; font-weight: 750; }
.form-grid .wide { grid-column: 1 / -1; }
.lab-output { position: sticky; top: 90px; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: white; box-shadow: 0 8px 30px rgba(23,50,77,.06); }
.lab-output > .empty-result { min-height: 280px; padding: 34px; }
.local-badge { padding: 5px 10px; border-radius: 99px; background: #e2efe6; color: #236246; font-size: .75rem; font-weight: 900; text-transform: uppercase; }
.lab-report { max-height: 68vh; overflow: auto; padding: 24px; }
.report-brief { padding: 18px; background: var(--paper); border-radius: 10px; }
.report-brief p { margin: 0 0 6px; font-size: .86rem; }
.candidate-matrix { display: grid; gap: 14px; margin-top: 18px; }
.candidate-matrix article { padding: 18px; border: 1px solid var(--line); border-radius: 12px; }
.candidate-head { display: flex; justify-content: space-between; align-items: start; gap: 12px; }
.candidate-head span { color: var(--terracotta); font-size: .7rem; font-weight: 900; text-transform: uppercase; }
.candidate-head h3 { margin: 3px 0 0; }
.candidate-head select { width: auto; min-width: 100px; padding: 7px; }
.candidate-matrix dl { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 16px 0; }
.candidate-matrix dl div { padding: 8px; background: var(--paper); }
.candidate-matrix dt { color: var(--muted); font-size: .66rem; text-transform: uppercase; }
.candidate-matrix dd { margin: 3px 0 0; font-weight: 850; }
.candidate-matrix .signal { margin: 7px 0; font-size: .8rem; }
.candidate-matrix label { display: grid; gap: 6px; margin-top: 14px; font-size: .78rem; font-weight: 800; }
.candidate-matrix textarea { min-height: 74px; }
.lab-export { display: flex; flex-wrap: wrap; gap: 8px; padding: 18px 24px 24px; border-top: 1px solid var(--line); }
.lab-export .button { flex: 1 1 130px; }

.data-layout { display: grid; grid-template-columns: minmax(320px, .74fr) minmax(0, 1.26fr); gap: 24px; align-items: start; padding-bottom: 72px; }
.data-query-panel, .data-results { border: 1px solid var(--line); border-radius: var(--radius); background: white; box-shadow: 0 8px 30px rgba(23,50,77,.06); }
.data-query-panel { padding: clamp(22px, 4vw, 32px); }
.data-query-panel form { display: grid; gap: 18px; }
.data-query-panel label { display: grid; gap: 7px; font-weight: 800; }
.data-disclosure { margin-bottom: 24px; padding: 18px; border-left: 5px solid var(--gold); background: #fff8e8; }
.data-disclosure p { margin: 6px 0 0; color: var(--muted); font-size: .9rem; }
.field-note { margin: -7px 0 0; color: var(--muted); font-size: .82rem; }
.data-results { overflow: hidden; }
.data-results > .empty-result, .data-results > .data-loading { min-height: 300px; padding: 34px; }
.source-badge { padding: 5px 10px; border-radius: 99px; background: #e2efe6; color: #236246; font-size: .75rem; font-weight: 900; }
.name-data-grid { display: grid; gap: 18px; padding: 20px; }
.name-data-card { overflow: hidden; border: 1px solid var(--line); border-radius: 14px; }
.name-data-card > header { padding: 22px; background: var(--paper); }
.name-data-card > header h3 { margin: 3px 0; font-size: 2rem; }
.name-data-card > header > span { color: var(--muted); font-size: .78rem; }
.metric-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; margin: 0; background: var(--line); }
.metric-grid div { min-width: 0; padding: 15px; background: white; }
.metric-grid dt { color: var(--muted); font-size: .7rem; font-weight: 800; text-transform: uppercase; }
.metric-grid dd { margin: 4px 0 0; font-weight: 900; }
.metric-grid small { display: block; margin-top: 3px; color: var(--muted); font-size: .66rem; }
.data-subsection { padding: 20px 22px; border-top: 1px solid var(--line); }
.data-subsection h4 { margin: 0 0 14px; }
.decade-chart { display: grid; gap: 7px; }
.decade-row { display: grid; grid-template-columns: 72px 1fr 72px; gap: 10px; align-items: center; font-size: .78rem; }
.decade-row > div, .sex-bars > div > div { height: 9px; overflow: hidden; border-radius: 99px; background: #e9e6de; }
.decade-row i, .sex-bars i { display: block; height: 100%; border-radius: inherit; background: var(--terracotta); }
.decade-row strong { text-align: right; }
.sex-bars { display: grid; gap: 9px; }
.sex-bars > div { display: grid; grid-template-columns: 72px 1fr 72px; gap: 10px; align-items: center; font-size: .78rem; }
.sex-bars strong { text-align: right; }
.data-columns { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); }
.data-columns .data-subsection { border-top: 0; border-right: 1px solid var(--line); }
.data-columns .data-subsection:last-child { border-right: 0; }
.rank-list { display: grid; gap: 7px; margin: 0; padding-left: 20px; }
.rank-list li { padding-left: 3px; }
.rank-list small { display: block; color: var(--muted); }
.name-data-card > footer { padding: 16px 22px; border-top: 1px solid var(--line); font-size: .84rem; }
.inline-warning { padding: 14px 16px; border: 1px solid var(--gold); border-radius: 10px; background: #fff8e8; }
.data-source-line { margin: 0; color: var(--muted); font-size: .76rem; }

.search-shell { max-width: 920px; padding-bottom: 100px; }
.site-search { padding: clamp(22px, 5vw, 38px); border: 1px solid var(--line); border-radius: var(--radius); background: white; }
.site-search > label, .site-search legend { font-weight: 850; }
.site-search > div { display: grid; grid-template-columns: 1fr auto; gap: 10px; margin: 8px 0 20px; }
.site-search fieldset { display: flex; flex-wrap: wrap; gap: 12px 20px; margin: 0; padding: 16px 0 0; border: 0; border-top: 1px solid var(--line); }
.site-search fieldset label { display: flex; align-items: center; gap: 6px; }
.site-search input[type="radio"] { width: auto; }
.search-status { margin: 24px 0; color: var(--muted); }
.search-results { display: grid; gap: 12px; }
.search-results article { padding: 20px 24px; border: 1px solid var(--line); border-radius: 12px; background: white; }
.search-results span { color: var(--terracotta); font-size: .72rem; font-weight: 900; text-transform: uppercase; }
.search-results h2 { margin: 6px 0; font-size: 1.3rem; }
.search-results p { margin: 0; color: var(--muted); }

.site-footer { background: #10283d; color: white; padding: 62px 0 24px; }
.site-footer img { filter: brightness(0) invert(1); }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 60px; }
.footer-grid p { color: #c8d5de; max-width: 36ch; }
.footer-grid h2 { font: 800 .78rem/1.2 system-ui, sans-serif; text-transform: uppercase; letter-spacing: .13em; color: var(--gold); }
.footer-grid a { display: block; color: #e8f0f4; margin-bottom: 8px; }
.footer-bottom { display: flex; justify-content: space-between; gap: 20px; margin-top: 42px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.16); color: #aebfca; font-size: .78rem; }

@media (max-width: 960px) {
  .menu-toggle { display: inline-flex; }
  .primary-nav { display: none; position: absolute; top: 65px; left: 20px; right: 20px; flex-direction: column; align-items: stretch; gap: 0; padding: 12px; background: white; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); }
  .primary-nav.is-open { display: flex; }
  .primary-nav a { padding: 12px; }
  .hero { min-height: auto; grid-template-columns: 1fr; }
  .hero-board { max-width: 650px; }
  .process { grid-template-columns: repeat(2, 1fr); }
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .topic-grid { grid-template-columns: repeat(2, 1fr); }
  .tool-layout { grid-template-columns: 1fr; }
  .result-panel { position: static; }
  .article-layout { grid-template-columns: 1fr; }
  .side-note { position: static; }
  .lab-layout { grid-template-columns: 1fr; }
  .lab-output { position: static; }
  .data-layout { grid-template-columns: 1fr; }
  .data-columns { grid-template-columns: 1fr; }
  .data-columns .data-subsection { border-right: 0; border-top: 1px solid var(--line); }
}

@media (max-width: 640px) {
  :root { --shell: min(100% - 28px, 1180px); }
  .site-header { position: relative; }
  .header-inner { min-height: 64px; }
  .brand { width: 130px; }
  h1 { font-size: clamp(2.25rem, 13vw, 3.5rem); }
  .hero { padding-block: 58px 80px; }
  .hero-board { padding: 24px; box-shadow: 12px 12px 0 var(--sage); }
  .hero-board dl { grid-template-columns: 1fr; gap: 10px; }
  .process, .card-grid, .topic-grid, .faq-list, .footer-grid, .source-callout, .split-feature, .value-strip, .capability-grid { grid-template-columns: 1fr; }
  .process > div { border-right: 1px solid rgba(255,255,255,.16); }
  .section-heading { align-items: start; flex-direction: column; }
  .filter-bar { align-items: stretch; flex-direction: column; }
  .filter-bar input { min-width: 0; }
  .filter-bar span { margin-left: 0; }
  #tool-form { grid-template-columns: 1fr; }
  #tool-form label { grid-column: 1; }
  .form-actions .button { flex: 1; }
  .check-list li { grid-template-columns: 1fr; gap: 2px; }
  .footer-bottom { flex-direction: column; }
  .workbook-head, .candidate-head { flex-direction: column; }
  .lab-step { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .wide { grid-column: 1; }
  .candidate-matrix dl { grid-template-columns: repeat(2, 1fr); }
  .site-search > div { grid-template-columns: 1fr; }
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .decade-row, .sex-bars > div { grid-template-columns: 62px 1fr 60px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
