
:root {
  --navy: #152238;
  --blue: #2D5BFF;
  --blue-dark: #1E3FBF;
  --teal: #2C7A78;
  --amber: #C9872E;
  --amber-bg: #FBF3E6;
  --paper: #F8F6F1;
  --grey: #F2F4F7;
  --ink: #222831;
  --ink-soft: #4A5261;
  --line: #DDE2EA;
  --white: #FFFFFF;
  --max: 1120px;
  --radius: 6px;
  --sans: "IBM Plex Sans", "Source Sans 3", system-ui, -apple-system, sans-serif;
  --serif: "IBM Plex Serif", "Source Serif 4", Georgia, serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 18px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--white);
}
@media (max-width: 640px) { body { font-size: 17px; } }
img { max-width: 100%; }
a { color: var(--blue); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--blue-dark); }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; border-radius: 2px; }
h1, h2, h3, h4 { font-family: var(--sans); color: var(--navy); line-height: 1.2; letter-spacing: -0.01em; margin: 0 0 0.5em; }
h1 { font-size: clamp(2rem, 4.5vw, 3.1rem); font-weight: 600; }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 600; margin-top: 0; }
h3 { font-size: 1.2rem; font-weight: 600; }
p { margin: 0 0 1em; max-width: 46em; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.skip-link { position: absolute; left: -9999px; top: 0; background: var(--navy); color: #fff; padding: 10px 16px; z-index: 100; }
.skip-link:focus { left: 0; }

/* Header */
.site-header { background: var(--navy); color: #fff; }
.header-inner { display: flex; align-items: center; gap: 24px; padding: 14px 24px; max-width: var(--max); margin: 0 auto; flex-wrap: wrap; }
.brand { font-weight: 600; font-size: 1.02rem; color: #fff; text-decoration: none; line-height: 1.25; }
.brand small { display: block; font-weight: 400; font-size: 0.72rem; color: #B9C3D6; letter-spacing: 0.04em; }
.nav-main { display: flex; gap: 4px; flex-wrap: wrap; margin-left: auto; }
.nav-main details { position: relative; }
.nav-main summary { list-style: none; cursor: pointer; color: #E5EAF3; padding: 8px 10px; border-radius: var(--radius); font-size: 0.95rem; }
.nav-main summary::-webkit-details-marker { display: none; }
.nav-main summary:hover { background: rgba(255,255,255,0.08); color: #fff; }
.nav-main details[open] summary { background: rgba(255,255,255,0.12); color: #fff; }
.nav-dropdown { position: absolute; top: 100%; left: 0; min-width: 280px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 10px 30px rgba(21,34,56,0.18); padding: 8px; z-index: 50; }
.nav-dropdown a { display: block; padding: 8px 12px; color: var(--navy); text-decoration: none; border-radius: 4px; font-size: 0.95rem; }
.nav-dropdown a:hover { background: var(--grey); }
.header-actions { display: flex; align-items: center; gap: 12px; }
.lang-switch { color: #E5EAF3; font-size: 0.9rem; text-decoration: none; border: 1px solid rgba(255,255,255,0.35); padding: 6px 12px; border-radius: var(--radius); }
.lang-switch:hover { background: rgba(255,255,255,0.1); color: #fff; }
.btn-cta { background: var(--blue); color: #fff; text-decoration: none; padding: 9px 16px; border-radius: var(--radius); font-weight: 600; font-size: 0.95rem; }
.btn-cta:hover { background: var(--blue-dark); color: #fff; }
@media (max-width: 900px) {
  .nav-main { order: 3; width: 100%; margin-left: 0; }
  .nav-dropdown { position: static; box-shadow: none; }
}

/* Banners */
.banner { padding: 12px 0; font-size: 0.95rem; }
.banner .wrap { display: flex; gap: 10px; align-items: baseline; }
.banner-info { background: var(--grey); color: var(--navy); border-bottom: 1px solid var(--line); }
.banner-draft { background: var(--amber-bg); color: #6E4A15; border-bottom: 1px solid #E8D5B5; }
.banner-draft strong { color: #8A5B1B; }

/* Hero */
.hero { background: var(--navy); color: #fff; padding: 72px 0 64px; }
.hero .eyebrow { color: #9FB4D8; font-size: 0.85rem; letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 18px; }
.hero h1 { color: #fff; max-width: 17em; }
.hero .hero-body { color: #CBD5E5; font-size: 1.15rem; max-width: 38em; }
.hero-ctas { display: flex; gap: 14px; margin-top: 28px; flex-wrap: wrap; }
.btn-primary { background: var(--blue); color: #fff; text-decoration: none; padding: 12px 22px; border-radius: var(--radius); font-weight: 600; }
.btn-primary:hover { background: var(--blue-dark); color: #fff; }
.btn-secondary { border: 1px solid rgba(255,255,255,0.5); color: #fff; text-decoration: none; padding: 12px 22px; border-radius: var(--radius); font-weight: 500; }
.btn-secondary:hover { background: rgba(255,255,255,0.1); }
.hero-paper { background: var(--paper); color: var(--ink); }
.hero-paper h1 { color: var(--navy); }
.hero-paper .eyebrow { color: var(--teal); }
.hero-paper .hero-body { color: var(--ink-soft); }
.hero-paper .btn-secondary { border-color: var(--navy); color: var(--navy); }
.hero-paper .btn-secondary:hover { background: rgba(21,34,56,0.06); }

/* Sections */
.section { padding: 56px 0; }
.section + .section { border-top: 1px solid var(--line); }
.section-grey { background: var(--grey); border-top: none !important; }
.section-paper { background: var(--paper); border-top: none !important; }
.section .eyebrow { color: var(--teal); font-size: 0.8rem; letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 10px; }
.prose { max-width: 46em; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1em; }
.prose li { margin-bottom: 0.4em; }
.prose blockquote { border-left: 3px solid var(--teal); margin: 1.4em 0; padding: 0.2em 0 0.2em 1.1em; font-family: var(--serif); color: var(--navy); }
.prose strong { color: var(--navy); }

/* Cards */
.cards { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); margin-top: 28px; }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; display: flex; flex-direction: column; gap: 8px; }
.section-grey .card, .section-paper .card { border-color: transparent; box-shadow: 0 1px 3px rgba(21,34,56,0.08); }
.card h3 { margin: 0; }
.card h3 a { color: var(--navy); text-decoration: none; }
.card h3 a:hover { color: var(--blue); text-decoration: underline; }
.card p { font-size: 0.97rem; color: var(--ink-soft); margin: 0; }
.card .card-link { margin-top: auto; font-size: 0.93rem; font-weight: 600; }

/* Badges */
.badge { display: inline-block; align-self: flex-start; font-size: 0.74rem; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; padding: 3px 9px; border-radius: 999px; }
.badge-amber { background: var(--amber-bg); color: #8A5B1B; border: 1px solid #E4CBA0; }
.badge-teal { background: #E6F1F1; color: #1F5A58; border: 1px solid #BFDBDA; }
.badge-navy { background: #E8EDF6; color: var(--navy); border: 1px solid #C9D4E6; }

/* Model diagram */
.model { margin-top: 32px; display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); counter-reset: step; }
.model-step { background: #fff; border: 1px solid var(--line); border-top: 3px solid var(--blue); border-radius: var(--radius); padding: 18px; position: relative; }
.model-step:nth-child(2) { border-top-color: var(--navy); }
.model-step:nth-child(3) { border-top-color: var(--teal); }
.model-step:nth-child(4) { border-top-color: var(--amber); }
.model-step:nth-child(5) { border-top-color: var(--blue-dark); }
.model-step .step-num { font-family: var(--serif); font-size: 0.85rem; color: var(--ink-soft); }
.model-step h3 { font-size: 1.02rem; margin: 4px 0 6px; }
.model-step p { font-size: 0.9rem; color: var(--ink-soft); margin: 0; }

/* Quote */
.pull-quote { font-family: var(--serif); font-size: clamp(1.25rem, 2.4vw, 1.6rem); line-height: 1.45; color: var(--navy); border-left: 4px solid var(--amber); padding-left: 24px; max-width: 34em; margin: 0; }

/* Note callout */
.note { background: var(--amber-bg); border: 1px solid #E8D5B5; border-left: 4px solid var(--amber); border-radius: var(--radius); padding: 18px 22px; max-width: 52em; }
.note p { margin: 0 0 0.5em; font-size: 0.97rem; color: #55432A; }
.note h2, .note h3 { color: #6E4A15; font-size: 1rem; }

/* CTA band */
.cta-band { background: var(--navy); color: #fff; padding: 56px 0; }
.cta-band h2 { color: #fff; }
.cta-band p { color: #CBD5E5; }

/* Article */
.article-meta { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; font-size: 0.88rem; color: var(--ink-soft); margin-bottom: 24px; }
.article-body { font-family: var(--serif); font-size: 1.08rem; line-height: 1.75; max-width: 42em; }
.article-body p { max-width: none; }
.article-sources { margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 0.92rem; color: var(--ink-soft); }
.article-sources ul { margin: 8px 0 0; padding-left: 20px; }
.article-sources li { margin-bottom: 6px; }
.provenance { margin-top: 36px; display: grid; gap: 16px; max-width: 52em; }
.provenance-grid { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; margin: 0; padding: 16px 20px; border: 1px solid var(--line); border-radius: var(--radius); background: #FCFBF8; font-size: 0.94rem; }
.provenance-grid dt { font-weight: 600; color: var(--ink-soft); }
.provenance-grid dd { margin: 0; }
.correction-note ul { margin: 6px 0 0; padding-left: 20px; font-size: 0.94rem; color: #55432A; }
.correction-note li { margin-bottom: 4px; }
.insight-list { display: grid; gap: 18px; margin-top: 32px; }
.insight-item { border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 24px; background: #fff; }
.insight-item h2, .insight-item h3 { margin-bottom: 6px; font-size: 1.2rem; font-weight: 600; }
.insight-item .meta { font-size: 0.85rem; color: var(--ink-soft); display: flex; gap: 12px; flex-wrap: wrap; }

/* Curated journeys (existing palette only — no new colours) */
.journey-list { display: grid; gap: 18px; margin-top: 8px; }
.journey-item { border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 24px; background: #fff; }
.journey-item h2 { margin-bottom: 6px; font-size: 1.2rem; font-weight: 600; }
.journey-item .meta { font-size: 0.85rem; color: var(--ink-soft); display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.journey-question { font-family: var(--serif); font-style: italic; color: var(--ink-soft); max-width: 44em; }
.journey-question-block { max-width: 52em; margin-bottom: 24px; }
.journey-steps { list-style: none; padding: 0; margin: 32px 0; display: grid; gap: 20px; max-width: 52em; }
.journey-step { border: 1px solid var(--line); border-left: 4px solid var(--navy); border-radius: var(--radius); padding: 20px 24px; background: #fff; }
.journey-step h3 { margin: 8px 0 6px; font-size: 1.15rem; }
.journey-step-progress { display: flex; gap: 12px; align-items: center; margin: 0; font-size: 0.85rem; color: var(--ink-soft); }
.journey-step-summary { font-size: 0.95rem; color: var(--ink-soft); }
.journey-step-unpublished { font-size: 0.92rem; color: var(--ink-soft); font-style: italic; margin-bottom: 0; }
.journey-commentary { font-size: 0.97rem; }

/* Breadcrumbs */
.breadcrumbs { font-size: 0.85rem; color: var(--ink-soft); padding: 14px 0; }
.breadcrumbs a { color: var(--ink-soft); }
.breadcrumbs span[aria-current] { color: var(--navy); font-weight: 600; }

/* Empty state */
.empty-state { background: var(--grey); border-radius: var(--radius); padding: 40px; text-align: center; color: var(--ink-soft); max-width: 44em; margin: 32px 0; }

/* Footer */
.site-footer { background: var(--navy); color: #B9C3D6; margin-top: 64px; padding: 56px 0 40px; font-size: 0.93rem; }
.footer-grid { display: grid; gap: 32px; grid-template-columns: 2fr 1fr 1fr 1fr; }
@media (max-width: 800px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 500px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer h2, .site-footer h3 { color: #fff; font-size: 0.85rem; letter-spacing: 0.08em; text-transform: uppercase; margin: 0 0 0.5em; }
.site-footer a { color: #CBD5E5; text-decoration: none; display: block; padding: 3px 0; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-mission { font-family: var(--serif); color: #E5EAF3; font-size: 1.02rem; max-width: 26em; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.15); margin-top: 40px; padding-top: 20px; font-size: 0.82rem; color: #8FA0BC; }

/* Language chooser */
.lang-choose { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--paper); }
.lang-choose-card { text-align: center; padding: 40px; }
.lang-choose-card h1 { font-size: 1.6rem; }
.lang-options { display: flex; gap: 20px; justify-content: center; margin-top: 28px; flex-wrap: wrap; }
.lang-options a { display: block; min-width: 220px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; text-decoration: none; color: var(--navy); font-weight: 600; font-size: 1.1rem; }
.lang-options a:hover { border-color: var(--blue); }
.lang-options a.suggested { border-color: var(--blue); box-shadow: 0 0 0 1px var(--blue); }
.lang-options small { display: block; font-weight: 400; color: var(--ink-soft); margin-top: 6px; font-size: 0.85rem; }

/* Pilot registry & results explorer */
/* On light .section backgrounds the secondary button uses navy (as in .hero-paper). */
.section .btn-secondary { border-color: var(--navy); color: var(--navy); }
.section .btn-secondary:hover { background: rgba(21,34,56,0.06); }
.results-table { border-collapse: collapse; width: 100%; max-width: 60em; margin: 16px 0; font-size: 0.95rem; }
.results-table th, .results-table td { border: 1px solid var(--line); padding: 10px 14px; text-align: left; vertical-align: top; }
.results-table thead th { background: var(--grey); color: var(--ink-soft); font-size: 0.88rem; letter-spacing: 0.04em; text-transform: uppercase; }
.results-table tbody th { font-weight: 600; }
.results-note { font-weight: 400; color: var(--ink-soft); font-size: 0.88rem; margin-top: 4px; }
.results-suppressed { color: var(--ink-soft); font-style: italic; background: var(--grey); }

/* Institutional learning dashboard */
.learning-indicator { margin: 24px 0 36px; }
.learning-indicator h3 { margin-bottom: 8px; }
.learning-chart { display: block; max-width: 100%; height: auto; margin: 12px 0 4px; }
.learning-definition { margin: 8px 0 12px; max-width: 60em; }
.learning-definition summary { cursor: pointer; color: var(--navy); font-weight: 600; min-height: 24px; }
.learning-definition p { margin: 8px 0 0; color: var(--ink-soft); font-size: 0.95rem; }

/* Accessibility helpers */
/* WCAG 2.2 target size minimum (2.5.8): every standalone control ≥ 24px */
.chip, .route-link, .pagination a, .pagination .current, .pagination .disabled,
.filter-item select, .lang-switch, .search-link, .btn-cta, .btn-primary,
.btn-secondary, .nav-main summary, .nav-dropdown a, button {
  min-height: 24px;
  box-sizing: border-box;
}
.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; }
.muted-line { color: var(--ink-soft); font-size: 0.95rem; }

/* Header search link */
.search-link { color: #CBD5E5; text-decoration: none; font-size: 0.93rem; padding: 6px 10px; border-radius: var(--radius); border: 1px solid rgba(255,255,255,0.25); }
.search-link:hover { color: #fff; border-color: #fff; }

/* Search page */
.search-form { max-width: 40em; }
.search-row { display: flex; gap: 10px; flex-wrap: wrap; }
.search-row input[type="search"] { flex: 1; min-width: 220px; font-size: 1.05rem; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius); font-family: var(--sans); }
.search-kinds { border: 0; padding: 0; margin: 14px 0 0; display: flex; gap: 18px; flex-wrap: wrap; font-size: 0.93rem; }
.search-kinds label { display: inline-flex; gap: 6px; align-items: center; }
.search-results b { background: #FDF0D7; color: var(--navy); padding: 0 2px; border-radius: 2px; font-weight: 600; }

/* Filter bar */
.filter-bar fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 20px; background: var(--grey); }
.filter-bar legend { font-weight: 600; font-size: 0.9rem; padding: 0 6px; }
.filter-grid { display: flex; gap: 14px; flex-wrap: wrap; align-items: flex-end; }
.filter-item { display: flex; flex-direction: column; gap: 4px; }
.filter-item label { font-size: 0.8rem; font-weight: 600; color: var(--ink-soft); }
.filter-item select { padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--radius); font-family: var(--sans); font-size: 0.92rem; background: #fff; min-width: 140px; }
.filter-actions { display: flex; gap: 14px; align-items: center; font-size: 0.9rem; }

/* Mobile filter drawer (CSS-only: checkbox toggle, no JavaScript) */
.filter-drawer-checkbox { position: absolute; left: -9999px; }
.filter-drawer-label { display: none; cursor: pointer; margin-bottom: 12px; }
@media (max-width: 720px) {
  .filter-drawer-label { display: inline-block; }
  .filter-drawer-checkbox:not(:checked) ~ .filter-bar { display: none; }
  .filter-drawer-checkbox:focus-visible ~ .filter-drawer-label { outline: 2px solid var(--navy); outline-offset: 2px; }
  .filter-grid { flex-direction: column; align-items: stretch; }
  .filter-item select { min-width: 0; width: 100%; }
}

/* List toolbar: result count + active-filter chips */
.list-toolbar { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; margin: 18px 0 6px; }
.result-count { font-size: 0.92rem; color: var(--ink-soft); margin: 0; }
.filter-chips { list-style: none; display: flex; gap: 8px; flex-wrap: wrap; padding: 0; margin: 0; }
.chip { display: inline-block; padding: 5px 12px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--navy); text-decoration: none; font-size: 0.86rem; }
.chip:hover, .chip:focus-visible { border-color: var(--navy); }
.chip-dim { color: var(--ink-soft); }
.chip-clear { background: var(--grey); }

/* Pagination */
.pagination { margin: 28px 0 8px; }
.pagination ul { list-style: none; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; padding: 0; margin: 0; }
.pagination a, .pagination .current, .pagination .disabled { display: inline-block; padding: 7px 12px; border-radius: var(--radius); font-size: 0.92rem; text-decoration: none; }
.pagination a { border: 1px solid var(--line); color: var(--navy); background: #fff; }
.pagination a:hover, .pagination a:focus-visible { border-color: var(--navy); }
.pagination .current { background: var(--navy); color: #fff; font-weight: 600; }
.pagination .disabled { color: var(--ink-soft); opacity: 0.6; }
.pagination .gap { padding: 7px 2px; color: var(--ink-soft); }

/* Search extras */
.did-you-mean a { color: var(--navy); font-weight: 600; }

/* Forms (contact, newsletter manage) */
.contact-form { max-width: 36em; margin-top: 20px; }
.form-row { margin-bottom: 18px; display: flex; flex-direction: column; gap: 6px; }
.form-row label { font-weight: 600; font-size: 0.95rem; }
.form-row input[type="text"], .form-row input[type="email"], .form-row textarea { padding: 11px 13px; border: 1px solid var(--line); border-radius: var(--radius); font-family: var(--sans); font-size: 1rem; }
.form-row textarea { resize: vertical; }
.form-consent label { font-weight: 400; font-size: 0.92rem; display: flex; gap: 10px; align-items: flex-start; }
.form-consent input { margin-top: 4px; }
.privacy-note { font-size: 0.85rem; color: var(--ink-soft); max-width: 40em; }
.hp-field { position: absolute; left: -9999px; top: -9999px; height: 1px; overflow: hidden; }
.route-select { border: 0; padding: 0; margin: 0 0 10px; }
.route-select legend { font-weight: 600; margin-bottom: 10px; }
.route-list { list-style: none; display: flex; gap: 10px; flex-wrap: wrap; padding: 0; margin: 0; }
.route-link { display: inline-block; padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; color: var(--navy); font-size: 0.92rem; background: #fff; }
.route-link.active { background: var(--navy); color: #fff; border-color: var(--navy); }
.banner-error { background: #FBEAEA; border-bottom: 1px solid #E3B8B8; color: #7A2222; padding: 12px 0; }
.banner-error ul { margin: 6px 0 0; }

/* Site-wide feedback button (Report / Suggest) */
.feedback-fab { position: fixed; right: 16px; bottom: 16px; z-index: 60; background: var(--navy); color: #fff; text-decoration: none; font-size: 0.85rem; font-weight: 600; padding: 10px 16px; border-radius: 999px; border: 1px solid rgba(255,255,255,0.25); box-shadow: 0 2px 10px rgba(21,34,56,0.35); }
.feedback-fab:hover { color: #fff; background: var(--blue-dark); }
@media print { .feedback-fab { display: none; } }

/* Newsletter (footer) */
.newsletter-block h2, .newsletter-block h3 { color: #fff; font-size: 0.85rem; letter-spacing: 0.08em; text-transform: uppercase; margin: 0 0 0.5em; }
.newsletter-form label { font-size: 0.85rem; }
.newsletter-row { display: flex; gap: 8px; margin: 6px 0; flex-wrap: wrap; }
.newsletter-row input[type="email"] { flex: 1; min-width: 160px; padding: 9px 11px; border: 1px solid rgba(255,255,255,0.3); border-radius: var(--radius); background: rgba(255,255,255,0.08); color: #fff; font-family: var(--sans); }
.newsletter-row .btn-primary { padding: 9px 14px; font-size: 0.9rem; }
.newsletter-consent { display: flex !important; gap: 8px; font-size: 0.82rem !important; align-items: flex-start; padding: 4px 0 !important; }
.newsletter-consent input { margin-top: 3px; }
.newsletter-block .privacy-note { color: #8FA0BC; }
