:root {
  --bg: #faf7f2;
  --surface: #ffffff;
  --surface-2: #f2eee6;
  --ink: #15212e;
  --ink-2: #44515f;
  --line: #e2dccf;
  --brand: #0f6b62;
  --brand-ink: #0b4f48;
  --brand-soft: #e3f1ee;
  --warn: #9a4a07;
  --warn-soft: #fdf1e2;
  --danger: #a3261b;
  --danger-soft: #fbe9e6;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(21,33,46,.06), 0 6px 20px rgba(21,33,46,.06);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --display: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 18px;
  line-height: 1.6;
}
img, svg { max-width: 100%; }
a { color: var(--brand-ink); text-underline-offset: 3px; }
a:hover { color: var(--brand); }
:focus-visible { outline: 3px solid var(--brand-ink); outline-offset: 2px; border-radius: 6px; }
h1, h2, h3 { font-family: var(--display); line-height: 1.2; letter-spacing: -0.01em; margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 5vw, 3rem); }
h2 { font-size: clamp(1.45rem, 3vw, 1.9rem); }
h3 { font-size: 1.2rem; font-family: var(--font); font-weight: 700; letter-spacing: 0; }
p { margin: 0 0 1em; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 760px; }
.muted { color: var(--ink-2); }
.small { font-size: .9rem; }

/* Prototype banner */

/* Header */
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.header-row { display: flex; align-items: center; gap: 16px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-family: var(--display); font-weight: 600; letter-spacing: -0.01em; font-size: 1.4rem; }
.main-nav { display: flex; gap: 4px; margin-left: auto; }
.main-nav a, .mobile-nav a { text-decoration: none; color: var(--ink-2); padding: 8px 12px; border-radius: 10px; font-weight: 700; font-size: .95rem; }
.main-nav a:hover, .main-nav a.active, .mobile-nav a.active, .main-nav a[aria-current], .mobile-nav a[aria-current] { background: var(--brand-soft); color: var(--brand-ink); }
.lang-toggle { display: inline-flex; align-items: center; border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 2px 6px; font-size: .9rem; font-weight: 700; color: var(--ink-2); }
.lang-toggle a { color: inherit; text-decoration: none; padding: 6px 8px; border-radius: 999px; }
.lang-toggle a[aria-current] { color: var(--brand); }
.lang-toggle a:not([aria-current]):hover { color: var(--ink); }
.lang-toggle .sep { margin: 0 2px; color: var(--line); }
.menu-btn { display: none; background: none; border: 0; color: var(--ink); padding: 6px; cursor: pointer; }
.mobile-nav { display: none; }
@media (max-width: 860px) {
  .no-js .mobile-nav { display: flex; flex-wrap: wrap; padding: 0 16px 12px; }
  .no-js .menu-btn { display: none; }
  .main-nav { display: none; }
  .lang-toggle { margin-left: auto; }
  .menu-btn { display: block; }
  .mobile-nav:not([hidden]) { display: flex; flex-direction: column; padding: 8px 16px 16px; border-top: 1px solid var(--line); }
}

/* Sections */
main { display: block; min-height: 60vh; outline: none; }
.section { padding: 48px 0; }
.hero { padding: 64px 0 56px; background: linear-gradient(180deg, var(--surface) 0%, var(--bg) 100%); border-bottom: 1px solid var(--line); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 48px; align-items: center; }
.hero h1 { font-size: clamp(2.4rem, 6vw, 3.8rem); line-height: 1.05; letter-spacing: -0.02em; margin-bottom: .35em; }
.hero-note { margin: 18px 0 0; font-size: .95rem; color: var(--ink-2); }
.hero-stop { margin: 0; padding: 24px 26px; box-shadow: var(--shadow); }
.hero-stop h2 { font-size: 1.35rem; }
.hero-stop ol { margin: .6em 0 0; padding: 0; list-style: none; counter-reset: s; }
.hero-stop li { counter-increment: s; position: relative; padding-left: 40px; margin: 0 0 14px; }
.hero-stop li:last-child { margin-bottom: 0; }
.hero-stop li::before { content: counter(s); position: absolute; left: 0; top: 1px; width: 26px; height: 26px; border-radius: 50%; background: var(--danger); color: #fff; font-weight: 700; font-size: .85rem; display: grid; place-items: center; }
@media (max-width: 860px) { .hero { padding: 40px 0; } .hero-grid { grid-template-columns: 1fr; gap: 28px; } }
.section-head { max-width: 680px; margin-bottom: 24px; }
.section-head p { margin: 0; }
.section-head.row { max-width: none; display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.section-head.row h2 { margin-bottom: .2em; }
.section-head .more { font-weight: 700; text-decoration: none; white-space: nowrap; }
.section.alt { background: var(--surface-2); }
.band-dark { background: var(--ink); color: #e9eef2; padding: 56px 0; }
.band-dark h2 { color: #fff; font-size: clamp(1.7rem, 4vw, 2.3rem); }
.band-dark p { font-size: 1.1rem; color: #cfd8df; }
.band-dark a { color: #f2b84b; font-weight: 700; }
.band-dark a:hover { color: #ffd17a; }
.hero .kicker { display: inline-block; background: var(--brand-soft); color: var(--brand-ink); font-weight: 700; font-size: .9rem; padding: 4px 12px; border-radius: 999px; margin-bottom: 16px; }
.hero p.lead { font-size: 1.2rem; color: var(--ink-2); max-width: 680px; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.btn { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; font: inherit; font-weight: 700; border-radius: 12px; padding: 14px 22px; border: 2px solid transparent; cursor: pointer; }
.btn.primary { background: var(--brand); color: #fff; }
.btn.primary:hover { background: var(--brand-ink); color: #fff; }
.btn.ghost { background: var(--surface); border-color: var(--line); color: var(--ink); }
.btn.ghost:hover { border-color: var(--brand); color: var(--brand-ink); }

/* Callouts */
.callout { border-radius: var(--radius); padding: 20px 22px; border: 1px solid; margin: 0 0 20px; }
.callout h2, .callout h3 { margin-top: 0; }
.callout.stop { background: var(--danger-soft); border-color: #efc2bb; }
.callout.stop h2, .callout.stop h3 { color: var(--danger); }
.callout.warn { background: var(--warn-soft); border-color: #f0d3ad; }
.callout.warn h3, .callout.warn h2 { color: var(--warn); }
.callout.calm { background: var(--brand-soft); border-color: #c7e2dc; }
.callout ul { margin: .4em 0 0; padding-left: 1.2em; }
.callout li { margin: .25em 0; }

/* Grid cards */
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); text-decoration: none; color: var(--ink); display: flex; flex-direction: column; gap: 6px; }
a.card:hover { border-color: var(--brand); transform: translateY(-1px); }
.card .icon { width: 40px; height: 40px; border-radius: 10px; background: var(--brand-soft); color: var(--brand-ink); display: grid; place-items: center; margin-bottom: 6px; }
.card h3 { margin: 0; }
.card p { margin: 0; color: var(--ink-2); font-size: .95rem; }

/* Flags list */
.flags { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 440px), 1fr)); }
.flags li { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px 14px 48px; }
.flags li::before { content: "!"; position: absolute; left: 14px; top: 14px; width: 22px; height: 22px; border-radius: 50%; background: var(--danger-soft); color: var(--danger); font-weight: 800; font-size: .8rem; display: grid; place-items: center; }

/* Contacts strip */
.contacts { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.contact { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.contact .org { font-weight: 700; }
.contact .num { font-size: 1.25rem; font-weight: 700; color: var(--brand-ink); display: block; margin: 4px 0; text-decoration: none; }
.contact .meta { font-size: .9rem; color: var(--ink-2); }

/* Steps */
.steps { counter-reset: s; list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.steps > li { counter-increment: s; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px 18px 64px; position: relative; }
.steps > li::before { content: counter(s); position: absolute; left: 18px; top: 16px; width: 32px; height: 32px; border-radius: 50%; background: var(--brand); color: #fff; font-weight: 700; display: grid; place-items: center; }
.steps h3 { margin: 0 0 .3em; }
.steps ul { margin: .4em 0 0; padding-left: 1.2em; }
.phase { font-size: .85rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--brand-ink); margin: 26px 0 10px; }

/* Wizard */
.wizard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.q { margin: 0 0 22px; border: 0; padding: 0; }
.q legend { font-weight: 700; font-size: 1.1rem; margin-bottom: 10px; padding: 0; }
.opts { display: flex; flex-wrap: wrap; gap: 10px; }
.opt { position: relative; }
.opt input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.opt span { display: inline-block; border: 2px solid #8f8878; border-radius: 12px; padding: 10px 14px; background: var(--surface); font-weight: 700; font-size: .95rem; cursor: pointer; }
.opt input:checked + span { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-ink); }
.opt input:focus-visible + span { outline: 3px solid var(--brand-ink); outline-offset: 2px; }

/* Evidence checklist */
.checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.checklist label { display: flex; gap: 10px; align-items: flex-start; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; cursor: pointer; }
.checklist input { width: 20px; height: 20px; margin-top: 3px; accent-color: var(--brand); flex: none; }

/* Platform blocks */
.platform { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; margin-bottom: 14px; }
.platform h3 { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: .4em; }

/* Platform link list */
.plat-links { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.plat-links a { display: flex; justify-content: space-between; align-items: center; gap: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; text-decoration: none; color: var(--ink); }
.plat-links a:hover { border-color: var(--brand); }
.plat-links .pname { font-weight: 700; font-size: 1.1rem; }
.plat-links .plink { color: var(--brand-ink); font-size: .95rem; white-space: nowrap; }

/* Blog */
.tagchip { display: inline-block; font-size: .8rem; font-weight: 700; color: var(--brand-ink); background: var(--brand-soft); padding: 3px 10px; border-radius: 999px; margin-bottom: 8px; }
.post-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 440px), 1fr)); }
.post-card h3 { font-family: var(--display); font-size: 1.2rem; line-height: 1.3; margin: 2px 0 4px; }
.post h1 { font-size: clamp(1.9rem, 4.5vw, 2.6rem); }
.story { background: var(--surface); border: 1px solid var(--line); border-left: 5px solid var(--brand); border-radius: var(--radius); padding: 22px 26px; margin: 0 0 12px; }
.story h2 { margin-top: 0; font-size: 1.2rem; font-family: var(--font); text-transform: uppercase; letter-spacing: .06em; color: var(--brand-ink); }
.story p { font-size: 1.08rem; }
.storynote { font-size: .85rem; color: var(--ink-2); margin: 0; font-style: italic; }
.post .todo li { margin: .5em 0; }
.post .already { margin-top: 28px; }
.post .already .btn { margin-top: 6px; }

/* Article */
.post h2 { margin-top: 1.6em; }
.post .story h2 { margin-top: 0; }
.post ul { padding-left: 1.3em; }
.post li { margin: .35em 0; }
.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; }
.crumbs { font-size: .9rem; color: var(--ink-2); margin-bottom: 12px; }
.crumbs a { color: var(--ink-2); }


/* Footer */
.site-footer { background: #15212e; color: #dfe6ec; margin-top: 56px; padding: 40px 0 28px; }
.site-footer h2 { color: #fff; font-size: 1.3rem; }
.signature { display: flex; gap: 14px; align-items: center; padding-bottom: 24px; margin-bottom: 24px; border-bottom: 1px solid #2c3b4b; }
.sig-name { font-family: var(--display); font-weight: 600; font-size: 1.4rem; color: #fff; letter-spacing: -0.01em; }
.sig-tag { color: #f4c26b; font-weight: 700; }
.sig-trust { color: #aab6c2; font-size: .95rem; }
.site-footer ul { padding-left: 1.2em; margin: 0 0 20px; }
.site-footer a { color: #bfe3dc; }
.site-footer .fine { font-size: .85rem; color: #aab6c2; }

/* Print: only the plan */
@media print {
  .site-header, .site-footer, .lang-banner, .no-print, .cta-row { display: none !important; }
  body { background: #fff; font-size: 12pt; }
  .steps > li, .wizard, .card, .platform { box-shadow: none; break-inside: avoid; }
}

/* Space between the steps list and the warning-signs box in articles */
.post .steps + .callout { margin-top: 28px; }

/* Skip link, language banner, plan jump, misc */
.skip { position: absolute; left: 8px; top: -60px; background: var(--ink); color: #fff; padding: 10px 14px; border-radius: 8px; z-index: 50; text-decoration: none; font-weight: 700; }
.skip:focus { top: 8px; }
.lang-banner { background: var(--brand-soft); text-align: center; padding: 8px 16px; font-size: .95rem; }
.lang-banner a { font-weight: 700; }
.plan-jump { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
.inline-link { display: inline-block; padding: 8px 0; font-weight: 700; }
.contact .ext { display: inline-block; margin-top: 6px; padding: 6px 0; font-size: .9rem; font-weight: 700; min-height: 24px; }
.contact .num { padding: 2px 0; }
.post-links { margin: 8px 0 28px; font-weight: 700; }
.brand-lg { font-family: var(--display); font-size: 2.4rem; font-weight: 600; margin: 0 0 12px; }
h1, h2 { text-wrap: balance; }
.hero-note a { padding: 8px 0; }

/* Motion: small hover and focus feedback only, none for people who ask for less */
a.card, .btn, .plat-links a, .main-nav a, .mobile-nav a, .opt span, .lang-toggle a, .flags li {
  transition: background-color .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease;
}
a.card:hover { transform: none; box-shadow: 0 2px 4px rgba(21,33,46,.08), 0 10px 26px rgba(21,33,46,.09); }
.opt span:hover { border-color: var(--brand); }
.btn:active { transform: translateY(1px); }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; scroll-behavior: auto !important; }
  .btn:active { transform: none; }
}
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
.steps li, .contact, .platform, .callout, .checklist li { overflow-wrap: anywhere; }

/* ---------- Motion ----------
   Everything below runs only for visitors who have not asked for reduced motion.
   Content is always readable without it: reveal classes are added by app.js only when it can run. */
@media (prefers-reduced-motion: no-preference) {
  /* Smooth fade between pages; the header stays put */
  @view-transition { navigation: auto; }
  .site-header { view-transition-name: site-header; }
  ::view-transition-old(root) { animation: .18s ease both vt-out; }
  ::view-transition-new(root) { animation: .28s ease both vt-in; }
  @keyframes vt-out { to { opacity: 0; } }
  @keyframes vt-in { from { opacity: 0; } }

  /* Hero: text enters in sequence */
  .hero-text > * { animation: rise .6s cubic-bezier(.2,.7,.2,1) both; }
  .hero-text > :nth-child(1) { animation-delay: .05s; }
  .hero-text > :nth-child(2) { animation-delay: .12s; }
  .hero-text > :nth-child(3) { animation-delay: .2s; }
  .hero-text > :nth-child(4) { animation-delay: .28s; }
  .hero-text > :nth-child(5) { animation-delay: .34s; }
  .hero { background-size: 100% 200%; animation: hero-in .8s ease both; }
  @keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
  @keyframes hero-in { from { background-position: 0 100%; } to { background-position: 0 0; } }

  /* Scroll reveal, with a short stagger inside groups */
  .reveal-ready .reveal { opacity: 0; transform: translateY(16px); transition: opacity .55s ease, transform .55s cubic-bezier(.2,.7,.2,1); transition-delay: calc(var(--i, 0) * 70ms); }
  .reveal-ready .reveal.in { opacity: 1; transform: none; }

  /* Hover and press feedback */
  a.card, .contact, .platform, .plat-links a { transition: transform .2s ease, box-shadow .2s ease, border-color .15s ease, background-color .15s ease, color .15s ease; }
  a.card:hover, .contact:hover { transform: translateY(-3px); box-shadow: 0 4px 8px rgba(21,33,46,.08), 0 16px 32px rgba(21,33,46,.1); }
  a.card .icon { transition: transform .25s ease, background-color .2s ease; }
  a.card:hover .icon { transform: scale(1.08) rotate(-4deg); background: var(--brand); color: #fff; }
  .btn.primary { transition: transform .15s ease, box-shadow .2s ease, background-color .15s ease; }
  .btn.primary:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(15,107,98,.28); }
  .btn.ghost:hover { transform: translateY(-2px); }
  .btn:active { transform: translateY(0); box-shadow: none; }
  .flags li:hover { border-color: #efc2bb; box-shadow: var(--shadow); }
  .more:hover, .band-dark a:hover { letter-spacing: .01em; }
  .main-nav a { position: relative; }
  .main-nav a::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 4px; height: 2px; background: var(--brand); border-radius: 2px; transform: scaleX(0); transform-origin: left; transition: transform .22s ease; }
  .main-nav a:hover::after, .main-nav a[aria-current]::after { transform: scaleX(1); }

  /* Header gains a soft shadow once the page is scrolled */
  .site-header { transition: box-shadow .25s ease; }
  .site-header.scrolled { box-shadow: 0 6px 20px rgba(21,33,46,.08); }

  /* Mobile menu and language banner */
  .mobile-nav:not([hidden]) { animation: menu-in .22s ease both; }
  @keyframes menu-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
  .lang-banner { animation: banner-in .4s ease .3s both; }
  @keyframes banner-in { from { opacity: 0; transform: translateY(-100%); } to { opacity: 1; transform: none; } }

  /* Wizard answers and evidence checkboxes */
  .opt input:checked + span { animation: pop .22s ease; }
  @keyframes pop { 50% { transform: scale(1.05); } }
  .checklist li label { transition: color .2s ease; }
  .checklist input:checked + span { color: var(--ink-2); text-decoration: line-through; text-decoration-color: rgba(21,33,46,.35); }
}
@media print { .reveal { opacity: 1 !important; transform: none !important; } }

/* ---------- Mascot ----------
   Decorative and calm: small, on cream, never inside urgent (red) or contact blocks, never printed. */
.mascot { display: block; height: auto; filter: drop-shadow(0 8px 10px rgba(21,33,46,.12)); }
.hero-brand { display: flex; align-items: flex-end; gap: 14px; margin-bottom: 16px; }
.hero-brand .kicker { margin: 0 0 8px; }
.hero-brand .mascot { width: 112px; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 28px; }
.page-head > div:not(.mascot-card) { flex: 1; min-width: 0; }
.page-head .mascot { flex: none; margin-top: 4px; }
.page-head-mid { align-items: center; }
.mascot-card { flex: none; width: 180px; }
.mascot-video { display: block; width: 100%; height: auto; aspect-ratio: 3 / 4; mix-blend-mode: darken; }
@media (max-width: 860px) {
  .mascot-desk { display: none; }
  .hero-brand .mascot { width: 72px; }
  .page-head-mid { flex-direction: column-reverse; align-items: flex-start; }
  .mascot-card { width: 140px; }
}

/* Focus ring on dark surfaces */
.band-dark :focus-visible, .site-footer :focus-visible { outline-color: #f2b84b; }
.skip:focus-visible { outline: 3px solid #fff; outline-offset: 0; }

/* English descriptor next to the name */
.brand { flex-direction: column; align-items: flex-start; justify-content: center; gap: 0; line-height: 1.1; }
.brand-sub { display: none; font-family: var(--font); font-size: .72rem; font-weight: 600; letter-spacing: .02em; color: var(--ink-2); }
@media (min-width: 420px) { .brand-sub { display: block; } }

/* Source line under articles that quote a figure */
.sources { margin: 40px 0 0; padding-top: 16px; border-top: 1px solid var(--line); font-size: .9rem; color: var(--ink-2); }
