/* Riddles and Ratios / FrontierClass
   Palette from the FrontierClass deck. All text pairs meet WCAG 2.1 AA (most AAA). */

@font-face {
  font-family: "Atkinson Hyperlegible";
  src: url("/assets/fonts/AtkinsonHyperlegible-Regular.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Atkinson Hyperlegible";
  src: url("/assets/fonts/AtkinsonHyperlegible-Bold.woff2") format("woff2");
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Atkinson Hyperlegible";
  src: url("/assets/fonts/AtkinsonHyperlegible-Italic.woff2") format("woff2");
  font-weight: 400; font-style: italic; font-display: swap;
}

:root {
  --ink: #182230;          /* body text */
  --navy: #17324D;         /* primary brand */
  --navy-2: #102438;
  --blue: #1676A3;         /* 5.06:1 on white */
  --blue-dark: #0F5C80;
  --teal: #1F9D8B;         /* decorative only */
  --teal-text: #12705F;    /* 5.9:1 on white */
  --gold: #F5B335;         /* on navy 7:1; ink on gold 8.7:1 */
  --gold-dark: #C98A12;
  --coral: #D65A4A;        /* decorative only */
  --error: #B42318;        /* 6.5:1 on white */
  --muted: #475467;        /* 7.7:1 on white */
  --line: #D5E0E8;
  --mist: #EAF3F7;
  --paper: #F7F9FB;
  --white: #FFFFFF;
  --on-dark: #E8EEF4;      /* 11:1 on navy */

  --radius: 14px;
  --radius-small: 8px;
  --shadow: 0 1px 2px rgba(16, 36, 56, .06), 0 8px 24px rgba(16, 36, 56, .08);
  --measure: 66ch;
  --space-section: clamp(3.5rem, 8vw, 6.5rem);
  --lh: 1.65;
  --ls: 0.01em;
  --ws: normal;
  --para-gap: 1.1em;
  --focus: #0F5C80;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  font-size: 106.25%; /* 17px base */
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
@media (min-width: 48em) { html { font-size: 112.5%; } } /* 18px */

html.pref-large-text { font-size: 131.25%; }
@media (min-width: 48em) { html.pref-large-text { font-size: 137.5%; } }
html.pref-extra-spacing { --lh: 1.95; --ls: 0.06em; --ws: 0.16em; --para-gap: 2em; }

@media (prefers-reduced-motion: no-preference) {
  html:not(.pref-calm) { scroll-behavior: smooth; }
}

body {
  margin: 0;
  font-family: "Atkinson Hyperlegible", "Atkinson Hyperlegible Next", Verdana, "Segoe UI", system-ui, -apple-system, sans-serif;
  font-size: 1rem;
  line-height: var(--lh);
  letter-spacing: var(--ls);
  word-spacing: var(--ws);
  color: var(--ink);
  background: var(--white);
  text-rendering: optimizeLegibility;
}

img, svg { max-width: 100%; height: auto; }
img { display: block; }

h1, h2, h3 {
  line-height: 1.2;
  letter-spacing: 0;
  margin: 0 0 .6em;
  color: var(--navy);
  text-wrap: balance;
}
html.pref-extra-spacing h1, html.pref-extra-spacing h2, html.pref-extra-spacing h3 { line-height: 1.45; letter-spacing: .03em; }
h1 { font-size: clamp(2.1rem, 1.4rem + 3.2vw, 3.5rem); }
h2 { font-size: clamp(1.65rem, 1.25rem + 1.8vw, 2.5rem); }
h3 { font-size: 1.2rem; }

p { margin: 0 0 var(--para-gap); max-width: var(--measure); }
p:last-child { margin-bottom: 0; }
ul, ol { padding: 0; margin: 0; }

a { color: var(--blue-dark); text-underline-offset: .18em; text-decoration-thickness: .08em; }
a:hover { color: var(--navy); text-decoration-thickness: .14em; }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 4px;
}
.hero, .section-dark, .section-beta .beta-intro, .site-footer { --focus: var(--gold); }
.hero a:not(.btn), .section-dark a, .site-footer a { color: var(--white); }

#main:focus { outline: none; }

.container {
  width: min(100% - 2.5rem, 74rem);
  margin-inline: auto;
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute;
  left: 1rem; top: -100px;
  z-index: 100;
  background: var(--gold);
  color: var(--ink);
  font-weight: 700;
  padding: .75rem 1.1rem;
  border-radius: var(--radius-small);
  text-decoration: none;
}
.skip-link:focus { top: 1rem; outline: 3px solid var(--ink); outline-offset: 2px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  min-height: 48px;
  padding: .7rem 1.35rem;
  border-radius: 999px;
  border: 2px solid transparent;
  font: inherit;
  font-weight: 700;
  line-height: 1.25;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.btn-primary { background: var(--gold); border-color: var(--gold-dark); color: var(--ink); }
.btn-primary:hover { background: #FFC75A; color: var(--ink); }
.btn-ghost { background: transparent; border-color: rgba(255,255,255,.75); color: var(--white); }
.btn-ghost:hover { background: rgba(255,255,255,.12); color: var(--white); border-color: var(--white); }
.btn-small { min-height: 44px; padding: .5rem 1.05rem; font-size: .95rem; }
.btn-large { font-size: 1.08rem; padding: .85rem 1.6rem; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .7; cursor: progress; }

/* ---------- Header ---------- */
.site-header {
  background: var(--white);
  border-top: 6px solid var(--gold);
  border-bottom: 1px solid var(--line);
  position: relative;
  z-index: 20;
}
.header-inner {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .75rem 1rem;
  padding-block: .8rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  text-decoration: none;
  color: var(--navy);
  margin-right: auto;
  min-height: 44px;
}
.brand-mark { width: 40px; height: 40px; flex: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name { font-weight: 700; font-size: 1.15rem; color: var(--navy); }
.brand-by { font-size: .82rem; color: var(--muted); }

.site-nav { order: 3; width: 100%; }
.nav-toggle { display: none; }
.nav-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: .25rem 1.1rem;
  align-items: center;
}
.nav-list a:not(.btn) {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
  border-bottom: 3px solid transparent;
}
.nav-list a:not(.btn):hover { border-bottom-color: var(--gold); color: var(--navy); }

/* JS-enhanced mobile menu */
.js .site-nav { order: 2; width: auto; }
.js .nav-toggle {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  min-height: 44px;
  padding: .45rem .9rem;
  border: 2px solid var(--navy);
  border-radius: 999px;
  background: var(--white);
  color: var(--navy);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after {
  display: block; width: 18px; height: 2px; background: currentColor; border-radius: 2px; position: relative;
}
.nav-toggle-bars::before, .nav-toggle-bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle-bars::before { top: -6px; }
.nav-toggle-bars::after { top: 6px; }
.js .nav-list {
  display: none;
  position: absolute;
  left: 0; right: 0; top: 100%;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  padding: .5rem 1.25rem 1.25rem;
  background: var(--white);
  border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.js .nav-list.is-open { display: flex; }
.js .nav-list li { border-bottom: 1px solid var(--line); }
.js .nav-list li:last-child { border-bottom: 0; padding-top: 1rem; }
.js .nav-list a:not(.btn) { width: 100%; min-height: 52px; }
.js .nav-list .btn { width: 100%; }

/* Desktop nav. Media-query em units use the browser default (16px), so with the larger-text
   or extra-spacing reading options the menu button stays until there is room for the full nav. */
@media (min-width: 75em) {
  html:not(.pref-large-text):not(.pref-extra-spacing) .site-nav { order: 2; width: auto; }
  html:not(.pref-large-text):not(.pref-extra-spacing) .nav-toggle { display: none; }
  html:not(.pref-large-text):not(.pref-extra-spacing) .nav-list {
    display: flex; position: static; flex-direction: row; align-items: center;
    padding: 0; gap: 0 1.3rem; background: none; border: 0; box-shadow: none;
  }
  html:not(.pref-large-text):not(.pref-extra-spacing) .nav-list li { border: 0; }
  html:not(.pref-large-text):not(.pref-extra-spacing) .nav-list li:last-child { padding-top: 0; }
  html:not(.pref-large-text):not(.pref-extra-spacing) .nav-list a:not(.btn) { width: auto; min-height: 44px; }
  html:not(.pref-large-text):not(.pref-extra-spacing) .nav-list .btn { width: auto; }
}
@media (min-width: 100em) {
  html.pref-large-text .site-nav { order: 2; width: auto; }
  html.pref-large-text .nav-toggle { display: none; }
  html.pref-large-text .nav-list {
    display: flex; position: static; flex-direction: row; align-items: center;
    padding: 0; gap: 0 1.3rem; background: none; border: 0; box-shadow: none;
  }
  html.pref-large-text .nav-list li { border: 0; }
  html.pref-large-text .nav-list li:last-child { padding-top: 0; }
  html.pref-large-text .nav-list a:not(.btn) { width: auto; min-height: 44px; }
  html.pref-large-text .nav-list .btn { width: auto; }
  html.pref-extra-spacing .site-nav { order: 2; width: auto; }
  html.pref-extra-spacing .nav-toggle { display: none; }
  html.pref-extra-spacing .nav-list {
    display: flex; position: static; flex-direction: row; align-items: center;
    padding: 0; gap: 0 1.3rem; background: none; border: 0; box-shadow: none;
  }
  html.pref-extra-spacing .nav-list li { border: 0; }
  html.pref-extra-spacing .nav-list li:last-child { padding-top: 0; }
  html.pref-extra-spacing .nav-list a:not(.btn) { width: auto; min-height: 44px; }
  html.pref-extra-spacing .nav-list .btn { width: auto; }
}

/* Reading options */
.prefs { order: 2; }
.js .prefs { order: 3; }
.prefs-toggle {
  display: inline-flex; align-items: center; gap: .45rem;
  min-height: 44px; min-width: 44px; justify-content: center;
  padding: .45rem .8rem;
  border: 2px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  color: var(--navy);
  font: inherit; font-size: .92rem; font-weight: 700;
  cursor: pointer;
}
.prefs-toggle:hover { border-color: var(--navy); }
@media (max-width: 29.99em) {
  .header-inner { gap: .6rem .5rem; }
  .brand { gap: .5rem; }
  .brand-mark { width: 36px; height: 36px; }
  .brand-name { font-size: 1.05rem; }
  .brand-by { font-size: .78rem; }
  .js .nav-toggle { padding: .45rem .75rem; }
}
@media (max-width: 85.99em) {
  .prefs-toggle span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .prefs-toggle { padding: .45rem; }
}
.prefs:not(.is-ready) .prefs-toggle { display: none; } /* needs JS */
.prefs-panel {
  position: absolute;
  right: max(1.25rem, calc((100% - 74rem) / 2)); top: calc(100% + .5rem);
  width: min(20rem, calc(100vw - 2.5rem));
  padding: 1rem 1.1rem;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  z-index: 30;
}
.prefs-title { font-weight: 700; color: var(--navy); margin-bottom: .5rem; }
.prefs-note { font-size: .88rem; color: var(--muted); margin-top: .6rem; }
.switch { display: flex; align-items: flex-start; gap: .6rem; padding: .45rem 0; cursor: pointer; line-height: 1.4; }
.switch input { width: 1.3rem; height: 1.3rem; margin: .1rem 0 0; accent-color: var(--blue); flex: none; }

/* ---------- Hero ---------- */
.hero {
  background:
    radial-gradient(60rem 30rem at 85% -10%, rgba(22,118,163,.45), transparent 60%),
    radial-gradient(40rem 24rem at -10% 110%, rgba(31,157,139,.28), transparent 60%),
    var(--navy);
  color: var(--on-dark);
  padding-block: clamp(2.75rem, 7vw, 5.5rem);
  overflow: hidden;
}
.hero-grid { display: grid; gap: clamp(2rem, 4vw, 3.5rem); align-items: center; }
@media (min-width: 60em) { .hero-grid { grid-template-columns: 1.05fr 1fr; } }
.hero h1 { color: var(--white); max-width: 22ch; }
.hero h1 .accent { color: var(--gold); display: block; }
.lede { font-size: clamp(1.08rem, 1rem + .4vw, 1.25rem); color: var(--on-dark); max-width: 38em; }
.eyebrow {
  display: inline-flex; align-items: center; gap: .6rem;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 999px;
  padding: .4rem .95rem;
  font-weight: 700; font-size: .92rem;
  color: var(--white);
  margin-bottom: 1.4rem;
}
.status-dot { width: .7rem; height: .7rem; border-radius: 50%; background: #5DD3B6; box-shadow: 0 0 0 4px rgba(93,211,182,.25); flex: none; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .85rem; margin: 1.9rem 0 1.6rem; }
.pill-list { list-style: none; display: flex; flex-wrap: wrap; gap: .55rem; }
.pill {
  font-size: .82rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  padding: .35rem .8rem; border-radius: 6px; color: var(--white);
}
.pill-teal { background: #12705F; }
.pill-blue { background: #1676A3; }
.pill-gold { background: var(--gold); color: var(--ink); }
.hero-media { margin: 0; }
.hero-media img {
  width: 100%;
  border-radius: 20px;
  box-shadow: 0 20px 50px rgba(0,0,0,.35);
  border: 1px solid rgba(255,255,255,.15);
}
html.pref-calm .hero-media img { filter: saturate(.5) brightness(.95); }

/* ---------- Sections ---------- */
.section { padding-block: var(--space-section); }
.section-light { background: var(--paper); border-block: 1px solid #E6EDF2; }
.section-dark { background: var(--navy); color: var(--on-dark); }
.section-dark h2 { color: var(--white); }
.section-head { margin-bottom: clamp(2rem, 4vw, 3rem); max-width: 50rem; }
.section-lede { font-size: 1.1rem; color: var(--muted); }
.section-dark .section-lede { color: var(--on-dark); }
.kicker {
  display: inline-block;
  font-size: .85rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--teal-text);
  margin-bottom: .7rem;
}
.kicker::before { content: ""; display: inline-block; width: 1.6rem; height: 3px; background: var(--gold); vertical-align: middle; margin-right: .6rem; border-radius: 2px; }
.kicker-light { color: var(--gold); }

/* Cards */
.card-grid { list-style: none; display: grid; gap: 1.25rem; }
@media (min-width: 48em) { .card-grid-3 { grid-template-columns: repeat(3, 1fr); } }
.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem 1.4rem 1.6rem;
  box-shadow: var(--shadow);
}
.card h3 { font-size: 1.15rem; }
.card p { color: var(--muted); }
.card-icon {
  display: inline-grid; place-items: center;
  width: 2.9rem; height: 2.9rem; border-radius: 12px;
  margin-bottom: 1rem;
}
.icon-blue { background: #E2F0F8; color: var(--blue-dark); }
.icon-teal { background: #DFF3EF; color: var(--teal-text); }
.icon-coral { background: #FBE7E4; color: var(--error); }
.icon-gold { background: #FDF0D5; color: #8A5A00; }

/* Problem */
.problem-grid { display: grid; gap: 2rem; align-items: center; }
@media (min-width: 64em) { .problem-grid { grid-template-columns: 300px 1fr; } .problem-cards { grid-template-columns: repeat(3, 1fr); } }
.gap-figure { margin: 0 auto; max-width: 300px; }

/* Loop */
.loop { list-style: none; display: grid; gap: 1rem; counter-reset: loop; position: relative; }
.loop-step {
  position: relative;
  background: var(--white);
  border: 1px solid var(--line);
  border-top: 5px solid var(--blue);
  border-radius: var(--radius);
  padding: 1.35rem 1.3rem 1.4rem;
  box-shadow: var(--shadow);
}
.loop-step:nth-child(even) { border-top-color: var(--teal); }
.loop-step:nth-child(5) { border-top-color: var(--gold); }
.loop-num {
  display: inline-grid; place-items: center;
  width: 2.4rem; height: 2.4rem; border-radius: 50%;
  background: var(--navy); color: var(--white); font-weight: 700;
  margin-bottom: .75rem;
}
.loop-step h3 { margin-bottom: .35rem; }
.loop-step p { color: var(--muted); font-size: .98rem; }
@media (min-width: 40em) and (max-width: 63.99em) { .loop { grid-template-columns: repeat(2, 1fr); } .loop-step:last-child { grid-column: 1 / -1; } }
@media (min-width: 64em) {
  .loop { grid-template-columns: repeat(5, 1fr); gap: 1.6rem; }
  .loop-step:not(:last-child)::after {
    content: "";
    position: absolute; top: 2.55rem; right: -1.35rem;
    width: 1.1rem; height: 1.1rem;
    border-top: 3px solid var(--blue); border-right: 3px solid var(--blue);
    transform: rotate(45deg);
  }
}
.loop-repeat { display: flex; align-items: center; gap: .55rem; margin-top: 1.3rem; font-weight: 700; color: var(--teal-text); max-width: none; }
.loop-repeat svg { flex: none; }
.callout {
  margin-top: 2.5rem;
  background: var(--mist);
  border-left: 6px solid var(--gold);
  border-radius: var(--radius);
  padding: 1.5rem 1.6rem;
}
.callout h3 { margin-bottom: .45rem; }

/* Who */
.later-note {
  margin-top: 1.75rem;
  background: var(--white);
  border: 2px dashed #AAB7C4;
  border-radius: var(--radius);
  padding: 1.1rem 1.3rem;
  max-width: none;
}
.tag {
  display: inline-block;
  background: var(--navy); color: var(--white);
  font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  padding: .15rem .55rem; border-radius: 5px; margin-right: .35rem;
  vertical-align: .1em;
}

/* Accessibility */
.a11y-grid { display: grid; gap: 2.5rem; align-items: start; }
@media (min-width: 60em) { .a11y-grid { grid-template-columns: 1fr 1.1fr; gap: 4rem; } }
.check-list { list-style: none; display: grid; gap: .9rem; }
.check-list li {
  position: relative;
  padding: 1rem 1.2rem 1rem 3.4rem;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.16);
  border-radius: var(--radius);
}
.check-list li::before {
  content: "";
  position: absolute; left: 1.15rem; top: 1.2rem;
  width: 1.35rem; height: 1.35rem; border-radius: 50%;
  background: var(--gold) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23182230' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 70% no-repeat;
}
.check-list strong { color: var(--white); }

/* Addition100 spine */
.spine { list-style: none; display: grid; gap: .6rem; }
.spine-stage {
  display: flex; flex-direction: column; gap: .15rem;
  padding: 1rem 1.1rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-left: 6px solid var(--c, var(--blue));
  border-radius: var(--radius-small);
}
.spine-range { font-size: .85rem; font-weight: 700; color: var(--muted); letter-spacing: .03em; }
.spine-name { font-weight: 700; color: var(--navy); font-size: 1.05rem; line-height: 1.3; }
.s1 { --c: #1F9D8B; } .s2 { --c: #2A8F9A; } .s3 { --c: #1676A3; }
.s4 { --c: #1D5D8C; } .s5 { --c: #17324D; } .s6 { --c: #F5B335; }
@media (min-width: 64em) {
  .spine { grid-template-columns: 1.45fr 1.45fr 2fr 2fr 2fr 2fr; gap: .4rem; }
  html:not(.pref-large-text):not(.pref-extra-spacing) .spine-range { white-space: nowrap; }
  html.pref-large-text .spine, html.pref-extra-spacing .spine { grid-template-columns: repeat(3, 1fr); }
  html.pref-large-text .spine-stage, html.pref-extra-spacing .spine-stage { border-radius: var(--radius-small) !important; }
  .spine-stage { border-left: 1px solid var(--line); border-top: 8px solid var(--c); min-height: 7.5rem; }
  .spine-stage:first-child { border-radius: 14px 6px 6px 14px; }
  .spine-stage:last-child { border-radius: 6px 14px 14px 6px; }
}
.spine-caption { margin-top: 1.4rem; font-weight: 700; }

/* About */
.about-grid { display: grid; gap: 2.5rem; align-items: start; }
@media (min-width: 60em) { .about-grid { grid-template-columns: 1.3fr 1fr; gap: 4rem; } }
.facts {
  margin: 0;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: .5rem 1.4rem;
}
.facts div { padding: .95rem 0; border-bottom: 1px solid var(--line); }
.facts div:last-child { border-bottom: 0; }
.facts dt { font-size: .85rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--teal-text); }
.facts dd { margin: .15rem 0 0; font-weight: 700; color: var(--navy); overflow-wrap: anywhere; }

/* ---------- Beta ---------- */
.section-beta {
  background:
    radial-gradient(50rem 28rem at 100% 0%, rgba(22,118,163,.4), transparent 60%),
    linear-gradient(180deg, var(--navy), var(--navy-2));
  color: var(--on-dark);
}
.section-beta h2 { color: var(--white); }
.beta-grid { display: grid; gap: 2.5rem; align-items: start; }
@media (min-width: 60em) { .beta-grid { grid-template-columns: 1fr 1.15fr; gap: 4rem; } .beta-intro { position: sticky; top: 2rem; } }
.beta-points { list-style: none; display: grid; gap: .6rem; margin: 1.5rem 0; }
.beta-points li { position: relative; padding-left: 2rem; }
.beta-points li::before {
  content: ""; position: absolute; left: 0; top: .35em;
  width: 1.1rem; height: 1.1rem; border-radius: 50%;
  border: 3px solid var(--gold);
}
.beta-honest {
  font-size: .95rem;
  border-left: 4px solid var(--gold);
  padding-left: 1rem;
  color: var(--on-dark);
}

.form-card {
  background: var(--white);
  color: var(--ink);
  border-radius: 20px;
  padding: clamp(1.4rem, 4vw, 2.4rem);
  box-shadow: 0 24px 60px rgba(0,0,0,.3);
}
.required-note { font-size: .92rem; color: var(--muted); margin-bottom: 1.2rem; }
.req { color: var(--error); font-weight: 700; }
.optional { font-weight: 400; color: var(--muted); }

.field { margin: 0 0 1.35rem; padding: 0; border: 0; min-width: 0; }
.field > label, .field legend {
  display: block;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: .4rem;
  padding: 0;
}
input[type="text"], input[type="email"], textarea {
  width: 100%;
  font: inherit;
  letter-spacing: inherit;
  word-spacing: inherit;
  color: var(--ink);
  background: var(--white);
  border: 2px solid #7A8795;   /* 3.7:1 against white, meets 1.4.11 */
  border-radius: var(--radius-small);
  padding: .75rem .85rem;
  min-height: 52px;
}
textarea { resize: vertical; min-height: 7.5rem; line-height: var(--lh); }
input[type="text"]:hover, input[type="email"]:hover, textarea:hover { border-color: var(--navy); }
input:focus-visible, textarea:focus-visible { border-color: var(--blue-dark); outline: 3px solid var(--focus); outline-offset: 2px; }
.field-hint { font-size: .92rem; color: var(--muted); margin: .4rem 0 0; }
.field-error {
  display: flex; gap: .45rem; align-items: flex-start;
  font-size: .95rem; font-weight: 700; color: var(--error);
  margin: .45rem 0 0;
}
.field-error::before {
  content: "!"; flex: none;
  display: inline-grid; place-items: center;
  width: 1.25rem; height: 1.25rem; margin-top: .1em;
  border-radius: 50%; background: var(--error); color: var(--white);
  font-size: .8rem; line-height: 1;
}
.field-error[hidden] { display: none; }
[aria-invalid="true"] { border-color: var(--error) !important; background: #FFF8F7 !important; }

.radio-grid { display: grid; gap: .55rem; }
@media (min-width: 30em) { .radio-grid { grid-template-columns: 1fr 1fr; } }
.radio, .checkbox {
  display: flex; align-items: flex-start; gap: .7rem;
  cursor: pointer;
  line-height: 1.4;
}
.radio {
  border: 2px solid var(--line);
  border-radius: var(--radius-small);
  padding: .75rem .85rem;
  min-height: 52px;
  align-items: center;
}
.radio:hover { border-color: var(--navy); }
.radio:has(input:checked) { border-color: var(--blue); background: #F0F7FB; }
.radio input, .checkbox input {
  width: 1.3rem; height: 1.3rem; margin: 0; flex: none;
  accent-color: var(--blue);
}
.checkbox input { margin-top: .12em; }
.field-radios[aria-invalid="true"] .radio { border-color: var(--error); }
.field-radios[aria-invalid="true"] { background: none !important; }
.field-consent {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-small);
  padding: 1rem;
}

.hp { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.btn-submit { width: 100%; }
.btn-submit .spinner {
  width: 1.1rem; height: 1.1rem; border-radius: 50%;
  border: 3px solid rgba(24,34,48,.25); border-top-color: var(--ink);
}
@media (prefers-reduced-motion: no-preference) {
  html:not(.pref-calm) .btn-submit .spinner { animation: spin .9s linear infinite; }
}
@keyframes spin { to { transform: rotate(360deg); } }

.privacy-note {
  margin-top: 1.25rem;
  font-size: .9rem;
  color: var(--muted);
  max-width: none;
}

.form-errors, .form-status {
  border-radius: var(--radius-small);
  padding: 1rem 1.1rem;
  margin-bottom: 1.3rem;
}
.form-errors { background: #FEF3F2; border: 2px solid var(--error); color: var(--ink); }
.form-errors-title { font-size: 1.02rem; color: var(--error); margin-bottom: .4rem; }
.form-errors ul { padding-left: 1.2rem; }
.form-errors li { margin: .2rem 0; }
.form-errors a { color: var(--error); font-weight: 700; }
.form-status.is-error { background: #FEF3F2; border: 2px solid var(--error); }
.form-status:focus { outline: 3px solid var(--focus); outline-offset: 2px; }

.form-success { text-align: left; padding: .5rem 0; }
.form-success:focus { outline: none; }
.success-icon {
  display: grid; place-items: center;
  width: 3.5rem; height: 3.5rem; border-radius: 50%;
  background: #DFF3EF; color: var(--teal-text);
  margin-bottom: 1rem;
}
.form-success h3 { font-size: 1.5rem; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--navy-2);
  color: var(--on-dark);
  padding-top: 3.5rem;
}
.footer-grid { display: grid; gap: 2rem; padding-bottom: 2.5rem; }
@media (min-width: 48em) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; } }
.brand-footer, .brand-footer .brand-name { color: var(--white); }
.brand-footer .brand-by { color: #C3CFDB; }
.footer-tag { margin-top: .8rem; color: #C3CFDB; }
.footer-heading { font-size: .9rem; letter-spacing: .1em; text-transform: uppercase; color: var(--gold); margin-bottom: .7rem; }
.footer-links { list-style: none; display: grid; gap: .25rem; }
.footer-links a { display: inline-block; padding: .2rem 0; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.14); padding-block: 1.4rem 2rem; font-size: .9rem; color: #C3CFDB; }
.footer-bottom p { max-width: none; }

/* Simple pages (thanks, 404, no-JS error) */
.simple-page { width: min(100% - 2.5rem, 42rem); margin: 4rem auto; }
.simple-page h1 { font-size: clamp(1.9rem, 1.4rem + 2vw, 2.6rem); }

/* Calm mode and reduced motion */
html.pref-calm *, html.pref-calm *::before, html.pref-calm *::after { transition: none !important; animation: none !important; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

@media (forced-colors: active) {
  .btn, .card, .loop-step, .spine-stage, .radio, .form-card { border: 2px solid CanvasText; }
  .check-list li::before { forced-color-adjust: none; }
}

@media print {
  .site-header nav, .prefs, .hero-actions, .section-beta { display: none; }
  .hero, .section-dark { background: none; color: #000; }
  .hero h1, .section-dark h2 { color: #000; }
}

/* Consent label sits inside .field, so restate its flex layout with enough specificity. */
.field > label.checkbox { display: flex; align-items: flex-start; gap: .7rem; margin-bottom: 0; color: var(--ink); }

/* Team card (About) */
.team-heading { margin-top: 2rem; font-size: 1.25rem; }
.team-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem 1.25rem;
  align-items: start;
  background: var(--white);
  border: 1px solid var(--line);
  border-left: 6px solid var(--gold);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.4rem 1.4rem 1.5rem;
}
.team-avatar {
  display: grid; place-items: center;
  width: 4rem; height: 4rem; border-radius: 50%;
  background: var(--navy); color: var(--white);
  font-weight: 700; font-size: 1.25rem; letter-spacing: .04em;
  border: 3px solid var(--gold);
}
.team-name { font-size: 1.2rem; color: var(--navy); margin: 0 0 .1rem; line-height: 1.25; }
.team-role { font-weight: 700; color: var(--teal-text); margin: 0 0 .7rem; font-size: .95rem; }
.team-bio { color: var(--ink); margin-bottom: .8rem; }
.team-links { margin: 0; font-weight: 700; }
.team-links a { display: inline-flex; align-items: center; min-height: 44px; }
@media (max-width: 29.99em) {
  .team-card { grid-template-columns: 1fr; }
}
.team-list { display: grid; gap: 1.25rem; }
