/* Website (R12). Paper Grove (designs/b/SPEC.md): colours, fonts and radii come from tokens.css.
   CSP: this file is the only styling. No style attributes, no <style>, no script.
   No ambient motion: the only transitions answer a hover, a press or an opened <details>, and reduced motion drops them. */

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
:root {
  /* Paper grain tile, the same value as web/base.css (tiled SVG noise, no raster file). */
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .32 0 0 0 0 .2 0 0 0 0 .1 0 0 0 .6 -.22'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E");
  --page: 1180px;
  --side: clamp(16px, 4vw, 40px);
  --sec: clamp(64px, 8vw, 112px);
  --clay-lip: color-mix(in srgb, var(--color-clay) 62%, black);
  /* The eight finger colours as one ribbon: the course's own key colours, left pinky to right pinky. */
  --fingers: linear-gradient(90deg, var(--zone-left-pinky) 0 12.5%, var(--zone-left-ring) 0 25%, var(--zone-left-middle) 0 37.5%, var(--zone-left-index) 0 50%, var(--zone-right-index) 0 62.5%, var(--zone-right-middle) 0 75%, var(--zone-right-ring) 0 87.5%, var(--zone-right-pinky) 0);
  scroll-padding-top: var(--space-5);
}
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; overflow-x: clip;
  background: var(--grain), var(--color-bg); color: var(--color-text);
  font: 400 17px/1.6 var(--font-ui);
}
img, svg { display: block; max-width: 100%; }
img { height: auto; }
h1, h2, h3 {
  margin: 0; font-family: var(--font-display); font-variation-settings: var(--font-soft); font-optical-sizing: auto;
  font-weight: 600; text-wrap: balance; color: var(--color-ink);
}
h1 { font-size: clamp(40px, 5.1vw, 66px); line-height: 1.02; letter-spacing: -0.024em; }
h2 { font-size: clamp(30px, 3.3vw, 44px); line-height: 1.08; letter-spacing: -0.016em; }
h3 { font-size: clamp(20px, 1.7vw, 23px); line-height: 1.3; letter-spacing: -0.006em; }
p, li, dd { margin: 0; text-wrap: pretty; }
ul, ol { margin: 0; padding: 0; list-style: none; }
a { color: var(--color-dusk-blue); text-underline-offset: 3px; text-decoration-thickness: 1.5px; }
a:hover { text-decoration-thickness: 2.5px; }
strong, b { font-weight: 700; color: var(--color-ink); }
:focus-visible { outline: var(--focus-ring); outline-offset: var(--focus-offset); border-radius: 6px; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.name { white-space: nowrap; } /* the product name (R9 brand hook): never split across lines */
.skip { position: absolute; left: var(--space-4); top: -80px; z-index: 10; padding: var(--space-2) var(--space-4); border-radius: var(--radius-md); background: var(--color-rice); color: var(--color-ink); font-weight: 700; box-shadow: var(--shadow-floating); }
.skip:focus { top: var(--space-3); }
main:focus { outline: none; } /* skip-link target only; it is not a control */
.wrap { width: min(var(--page), 100% - 2 * var(--side)); margin-inline: auto; }
.sprite { overflow: visible; }

/* ---------- text helpers ---------- */
.eyebrow { font: 700 15px/1.4 var(--font-ui); color: var(--color-clay); margin-bottom: var(--space-4); }
.lead { font-size: clamp(18px, 1.5vw, 20px); line-height: 1.55; color: var(--color-dusk-ink); max-width: 33em; }
.small { font-size: 15px; line-height: 1.5; color: var(--color-dusk-ink); max-width: 54ch; }
.prose { display: grid; gap: var(--space-4); max-width: 62ch; color: var(--color-dusk-ink); }
.sec-head { display: grid; gap: var(--space-4); max-width: 46rem; margin-bottom: clamp(32px, 4vw, 48px); }


/* Lists. Ticks = a moss leaf-dot; plain rows otherwise. */
.ticks { display: grid; gap: var(--space-3); align-content: start; }
.ticks li { position: relative; padding-left: 30px; max-width: 62ch; }
.ticks li::before {
  content: ""; position: absolute; left: 0; top: 0.32em; width: 18px; height: 18px; border-radius: 50%;
  background: var(--color-moss) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath d='M5 9.4 7.8 12 13 6.4' fill='none' stroke='%23FBF6EA' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 18px no-repeat;
}
.rows { display: grid; }
.rows li { padding: var(--space-4) 0; border-top: 1px dashed var(--color-oat-edge); }
.rows li:last-child { border-bottom: 1px dashed var(--color-oat-edge); }
.rows b { color: var(--color-ink); }

/* UI names inside the teacher steps: the words on the app's own buttons. */
.ui { display: inline; padding: 1px 7px; border-radius: var(--radius-sm); background: var(--color-rice); box-shadow: inset 0 0 0 1.5px var(--color-sage), 0 2px 0 var(--color-oat-edge); font-weight: 650; color: var(--color-ink); white-space: nowrap; -webkit-box-decoration-break: clone; box-decoration-break: clone; }

/* ---------- buttons (SPEC §6: lip underneath, primary = clay, one per view) ---------- */
.actions { display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: center; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  min-height: 48px; padding: 0 var(--space-5); border-radius: var(--radius-md);
  font: 650 16px/1.2 var(--font-ui); text-decoration: none; text-align: center;
  color: var(--color-ink); background: var(--color-rice); border: 2px solid var(--color-moss);
  box-shadow: 0 var(--button-lip) 0 var(--color-deep-moss);
}
.btn:hover { transform: translateY(-1px); text-decoration: none; }
.btn:active { transform: translateY(var(--button-lip)); box-shadow: none; }
.btn-primary { min-height: 54px; padding: 0 var(--space-6); font-size: 17px; color: var(--color-rice); background: var(--color-clay); border-color: var(--color-clay); box-shadow: 0 var(--button-lip) 0 var(--clay-lip); }
.btn-quiet { border-color: transparent; background: transparent; box-shadow: none; text-decoration: underline; text-decoration-color: var(--color-oat-edge); text-underline-offset: 5px; padding-inline: var(--space-3); }
.btn-quiet:hover { text-decoration: underline; text-decoration-color: var(--color-moss); }

/* ---------- header ---------- */
.site-head { position: relative; z-index: 5; border-bottom: 1px solid color-mix(in srgb, var(--color-oat-edge) 70%, transparent); }
.site-head .wrap { display: flex; align-items: center; gap: var(--space-5); min-height: 76px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--color-ink); text-decoration: none; border-radius: var(--radius-md); flex: none; }
.brand svg { width: 42px; height: 42px; }
.wordmark { font: 650 23px/1 var(--font-display); font-variation-settings: var(--font-soft); letter-spacing: -0.01em; }
.nav { display: flex; gap: 2px; margin-left: auto; }
.nav a, .menu-panel a:not(.btn) { display: inline-flex; align-items: center; min-height: 44px; padding: 0 var(--space-3); border-radius: var(--radius-md); color: var(--color-dusk-ink); font: 600 16px/1.2 var(--font-ui); text-decoration: none; white-space: nowrap; }
.nav a:hover { color: var(--color-ink); background: color-mix(in srgb, var(--color-rice) 70%, transparent); }
.nav a[aria-current="page"] { color: var(--color-ink); box-shadow: inset 0 -3px 0 var(--color-clay); border-radius: 0; }
.head-app { min-height: 44px; flex: none; }
.menu { display: none; margin-left: auto; }
.menu summary {
  display: inline-flex; align-items: center; gap: var(--space-2); min-height: 44px; padding: 0 var(--space-4); cursor: pointer; list-style: none;
  border-radius: var(--radius-md); background: var(--color-rice); border: var(--edge); font-weight: 650; color: var(--color-ink);
}
.menu summary::-webkit-details-marker { display: none; }
.menu summary::before { content: ""; width: 16px; height: 12px; background: linear-gradient(currentColor 0 0) top / 100% 2px no-repeat, linear-gradient(currentColor 0 0) center / 100% 2px no-repeat, linear-gradient(currentColor 0 0) bottom / 100% 2px no-repeat; }
.menu[open] summary { background: var(--color-oat); }
.menu-panel {
  position: absolute; left: var(--side); right: var(--side); top: calc(100% - 6px); display: grid; gap: 2px; padding: var(--space-3);
  border-radius: var(--radius-lg); background: var(--grain), var(--color-rice); border: var(--edge); box-shadow: var(--shadow-floating);
}
.menu-panel a:not(.btn) { color: var(--color-ink); padding: 0 var(--space-4); }
.menu-panel a[aria-current="page"] { background: var(--color-oat); }
.menu-panel .btn { margin-top: var(--space-2); }

/* ---------- sections ---------- */
.section { padding-block: var(--sec); }
.notice { padding-block: var(--space-3); }
.section:not(.band) + .section:not(.band), .hero + .section:not(.band) { padding-top: 0; }
.band { background: var(--grain), var(--color-rice); border-block: 1px solid color-mix(in srgb, var(--color-oat-edge) 75%, transparent); }
.band-oat { background: var(--grain), var(--color-oat-deep); }
.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(32px, 5vw, 72px); align-items: start; }
.split-rev > :first-child { order: 2; }
.stack { display: grid; gap: var(--space-5); align-content: start; }
.stack-lg { display: grid; gap: var(--space-6); align-content: start; }

/* Screenshots: a real app screen mounted on a rice sheet. */
.shot { margin: 0; }
.shot-link { display: block; border-radius: 16px; cursor: zoom-in; text-decoration: none; } /* tap a shot to see it full size (phones) */
.shot img { width: 100%; padding: 6px; border-radius: 16px; background: var(--color-rice); border: 1px solid rgba(74, 50, 25, 0.16); box-shadow: var(--shadow-floating); }
.shot figcaption { margin-top: var(--space-3); font: 500 15px/1.45 var(--font-ui); color: var(--color-fog-ink); padding-left: 6px; }
.band .card { background: var(--grain), var(--color-cream); }
.after-pair { margin-top: clamp(28px, 4vw, 44px); }
.shot-pair { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(16px, 2.5vw, 32px); }

/* ---------- hero ---------- */
.hero { padding: clamp(28px, 4.5vw, 64px) 0 clamp(56px, 7vw, 96px); overflow-x: clip; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6.2fr); gap: clamp(32px, 4.5vw, 64px); align-items: center; }
.hero-grid.hero-wide { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); } /* home: the lesson screen reads larger */
.hero-copy { display: grid; justify-items: start; }
.hero-copy h1 { margin-bottom: var(--space-5); }
.hero-copy .lead { margin-bottom: var(--space-6); }
.hero-copy .actions { margin-bottom: var(--space-5); }
.phone-note { display: none; }
.path-links { margin-top: var(--space-4); display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-5); font-size: 15px; font-weight: 600; }
/* The hero screen sits on a sage paper sheet that runs off the right edge of the page. */
.hero-art { position: relative; isolation: isolate; padding: clamp(20px, 3vw, 40px) 0 clamp(20px, 3vw, 40px) clamp(20px, 3vw, 40px); }
.hero-art::before { content: ""; position: absolute; z-index: -1; inset: 0 -50vw 0 0; border-radius: var(--radius-xl) 0 0 var(--radius-xl); background: var(--grain), var(--color-sage-leaf); box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.35), inset 0 -3px 6px rgba(74, 50, 25, 0.12); }
.hero-art .momo { position: absolute; left: -6%; bottom: -8%; width: 15%; min-width: 72px; filter: drop-shadow(0 6px 8px rgba(59, 38, 20, 0.22)); }
.hero-art.has-momo .shot { margin-left: 5%; }
.hero-mascot { width: min(100%, 340px); margin-inline: auto; }

/* ---------- home: in 30 seconds ---------- */
.card {
  position: relative; border-radius: var(--radius-xl); background: var(--grain), var(--color-card);
  border: var(--edge); box-shadow: var(--shadow-card); padding: clamp(24px, 4vw, 48px);
}
.facts-grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: clamp(24px, 4vw, 64px); align-items: start; }
.facts { margin: 0; display: grid; }
.facts div { display: grid; grid-template-columns: 11em 1fr; gap: var(--space-4); padding: 14px 0; border-top: 1px dashed var(--color-oat-edge); }
.facts div:first-child { border-top: 0; padding-top: 0; }
.facts dt { font: 600 19px/1.4 var(--font-display); font-variation-settings: var(--font-soft); color: var(--color-ink); }
.facts dd { margin: 0; color: var(--color-dusk-ink); }

/* ---------- home: how it works (a real sequence, so numbers) ---------- */
.steps3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(20px, 3vw, 40px); counter-reset: step; position: relative; }
.steps3 li { counter-increment: step; display: grid; gap: var(--space-3); align-content: start; position: relative; }
.steps3 li::before {
  content: counter(step); display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; margin-bottom: var(--space-2);
  background: var(--color-honey); color: var(--color-ink); font: 600 24px/1 var(--font-display); box-shadow: 0 3px 0 var(--color-amber-ink); position: relative; z-index: 1;
}
/* the stitched path between the stops, as on the app's map */
.steps3 li:not(:last-child)::after { content: ""; position: absolute; top: 26px; left: 64px; right: calc(-1 * clamp(20px, 3vw, 40px) + 8px); border-top: 3px dashed var(--color-oat-edge); }
.steps3 p { color: var(--color-dusk-ink); }
.aside-note { margin-top: clamp(28px, 4vw, 44px); padding: var(--space-4) var(--space-5); border-radius: var(--radius-md); background: var(--color-sage-mist); color: var(--color-deep-moss); font-weight: 500; max-width: 46rem; }
.aside-note b { color: var(--color-deep-moss); }


/* ---------- home: grown-ups ---------- */
.features { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-5) clamp(24px, 4vw, 56px); margin-bottom: clamp(36px, 5vw, 56px); }
.features li { padding-top: var(--space-4); border-top: 2px solid var(--color-oat-edge); color: var(--color-dusk-ink); }
.features b { display: block; margin-bottom: 4px; font: 600 19px/1.35 var(--font-display); font-variation-settings: var(--font-soft); }

.cast { display: flex; justify-content: center; align-items: end; gap: 0; margin-top: var(--space-2); }
.cast svg { width: 25%; max-width: 120px; aspect-ratio: 240 / 270; }
.cast svg + svg { margin-left: -3%; }

/* ---------- home: rewards ---------- */
.rewards { display: grid; gap: var(--space-5); }
.rewards li { display: grid; grid-template-columns: 56px 1fr; gap: var(--space-4); align-items: start; color: var(--color-dusk-ink); }
.rewards svg { width: 56px; height: 56px; }
.rewards b { display: block; color: var(--color-ink); }

/* ---------- FAQ ---------- */
.faq { display: grid; gap: var(--space-3); max-width: 50rem; }
.faq details { border-radius: var(--radius-lg); background: var(--grain), var(--color-card); border: var(--edge); box-shadow: var(--shadow-card); }
.faq summary {
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); min-height: 60px; padding: var(--space-3) var(--space-5);
  cursor: pointer; list-style: none; font: 600 19px/1.35 var(--font-display); font-variation-settings: var(--font-soft); color: var(--color-ink); border-radius: var(--radius-lg);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; flex: none; width: 10px; height: 10px; margin-top: -4px; border-right: 2.5px solid var(--color-moss); border-bottom: 2.5px solid var(--color-moss); transform: rotate(45deg); }
.faq details[open] summary::after { transform: rotate(225deg); margin-top: 4px; }
.faq details > p { padding: 0 var(--space-5) var(--space-5); color: var(--color-dusk-ink); max-width: 64ch; }
.faq-wrap { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: clamp(28px, 4vw, 64px); align-items: start; }

/* ---------- finale ---------- */
.finale { text-align: center; padding: var(--sec) 0 0; overflow: clip; }
.finale .wrap { display: grid; justify-items: center; gap: var(--space-5); }
.finale h2 { font-size: clamp(32px, 4vw, 52px); max-width: 16em; }
.finale p { max-width: 34em; color: var(--color-dusk-ink); font-size: 19px; }
.finale .actions { justify-content: center; }
.finale-cast { display: flex; justify-content: center; align-items: end; margin-top: clamp(28px, 4vw, 48px); padding: 0 var(--side); background: linear-gradient(transparent 70%, var(--color-sage-leaf) 70%); }
.finale-cast svg { width: clamp(52px, 11vw, 132px); aspect-ratio: 240 / 270; margin-bottom: -2px; }
.finale-cast svg + svg { margin-left: clamp(-14px, -1vw, -6px); }

/* ---------- schools ---------- */
.timeline { display: grid; counter-reset: step; }
.timeline li { counter-increment: step; position: relative; display: grid; gap: var(--space-2); padding: 0 0 clamp(28px, 3.5vw, 40px) 72px; }
.timeline li::before {
  content: counter(step); position: absolute; left: 0; top: -4px; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%;
  background: var(--color-honey); color: var(--color-ink); font: 600 22px/1 var(--font-display); box-shadow: 0 3px 0 var(--color-amber-ink); z-index: 1;
}
.timeline li:not(:last-child)::after { content: ""; position: absolute; left: 23px; top: 52px; bottom: 4px; border-left: 3px dashed var(--color-oat-edge); }
.timeline p { color: var(--color-dusk-ink); line-height: 1.75; max-width: 60ch; }
.timeline .btn { justify-self: start; margin-top: var(--space-2); }
.sticky { position: sticky; top: var(--space-6); }
.split > .shot { align-self: center; }
.split-mid { align-items: center; }
.after-split { display: grid; gap: var(--space-5); margin-top: clamp(40px, 5vw, 64px); }
.ticks-2 { grid-template-columns: 1fr 1fr; gap: var(--space-4) clamp(24px, 4vw, 56px); }
.rewards-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-6) clamp(24px, 3vw, 40px); margin-top: clamp(40px, 5vw, 64px); }
.rows-2 { grid-template-columns: 1fr 1fr; column-gap: clamp(24px, 4vw, 56px); }
.rows-2 li:last-child { border-bottom: 0; }
.two-cards { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(16px, 2.5vw, 32px); margin-bottom: var(--space-6); }
.two-cards .card { display: grid; gap: var(--space-4); align-content: start; padding: clamp(22px, 3vw, 36px); }
.note-box { padding: var(--space-5); border-radius: var(--radius-lg); border: 2px dashed var(--color-oat-edge); display: grid; gap: var(--space-2); color: var(--color-dusk-ink); font-size: 15px; }
.note-box h3 { font-size: 19px; }
.def-list { display: grid; gap: 0; }
.def-list li { padding: var(--space-4) 0; border-top: 1px dashed var(--color-oat-edge); color: var(--color-dusk-ink); }
.def-list li:first-child { border-top: 0; padding-top: 0; }
.sso { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(16px, 2.5vw, 32px); margin-bottom: var(--space-5); }
.sso .card { display: grid; gap: var(--space-3); align-content: start; padding: clamp(22px, 3vw, 32px); }
.sso p { color: var(--color-dusk-ink); }

/* Homework marks: the staff area's own status chips (web/admin/admin.css .chip tones), with what each one means. */
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: var(--radius-pill); font: 600 15px/1.45 var(--font-ui); white-space: nowrap; }
.chip.ok { background: var(--color-sage-mist); color: var(--color-deep-moss); }
.chip.wait { background: var(--color-honey-wash); color: var(--color-amber-ink); }
.chip.info { background: var(--color-dusk-wash); color: var(--color-ink); }
.chip.none { background: var(--color-oat); color: var(--color-dusk-ink); }
.marks { margin: 0; display: grid; }
.marks div { display: grid; grid-template-columns: 11.5rem 1fr; gap: var(--space-4); align-items: baseline; padding: 10px 0; border-top: 1px dashed var(--color-oat-edge); }
.marks dd { margin: 0; color: var(--color-dusk-ink); }

.never { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 4vw, 56px); }

/* ---------- about ---------- */
.hero-about { grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); }
.lead-prose { font-size: clamp(18px, 1.5vw, 20px); line-height: 1.6; }
.delete-card { align-items: start; }
.store-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(16px, 2.5vw, 32px); }
.store-cols .card { display: grid; gap: var(--space-4); align-content: start; padding: clamp(22px, 3vw, 32px); }
.store-cols .card.never-card { background: var(--grain), var(--color-sage-mist); }

/* ---------- contact (site/contact.js drives the states; [hidden] must beat the display rules here) ---------- */
.contact .split { grid-template-columns: minmax(0, 4fr) minmax(0, 6fr); }
.contact-card [hidden] { display: none !important; }
.contact h1 { font-size: clamp(36px, 4vw, 52px); }
.contact-mascot { width: 150px; margin-top: var(--space-6); }
.turnstile:empty { display: none; } /* no gap before the widget arrives */
.contact-card { padding: clamp(20px, 3.5vw, 44px); }
@media (max-width: 380px) { .contact-card { padding: 10px; } } /* Turnstile is at least 300px wide; at 360px the card has ~328px */
.contact-form {
  /* the field edge: warm grey at 3.8:1 on the field (WCAG 1.4.11), not the decorative oat line */
  --field-edge: color-mix(in srgb, var(--color-ink) 45%, var(--color-oat-edge));
  --field-bg: color-mix(in srgb, var(--color-rice) 35%, white);
  display: grid; gap: var(--space-5);
}
.field { display: grid; gap: 6px; }
.field label { font: 650 16px/1.3 var(--font-ui); color: var(--color-ink); }
.field-hint { margin-top: -2px; font-size: 15px; line-height: 1.4; color: var(--color-dusk-ink); }
.contact-form input, .contact-form textarea {
  width: 100%; min-height: 48px; padding: 10px 14px; border-radius: var(--radius-sm);
  font: 400 17px/1.45 var(--font-ui); color: var(--color-ink); background: var(--field-bg);
  border: 1.5px solid var(--field-edge); box-shadow: inset 0 2px 3px rgba(74, 50, 25, 0.08);
}
.contact-form textarea { min-height: 10em; resize: vertical; }
.contact-form :is(input, textarea):hover { border-color: var(--color-dusk-ink); }
.contact-form :is(input, textarea):focus-visible { border-radius: var(--radius-sm); border-color: var(--color-focus); outline-offset: 2px; }
/* An error is never colour alone: a thicker border with a bar on the left, and the message below starts with a "!" mark. */
.contact-form [aria-invalid="true"] { border: 2px solid var(--color-danger); box-shadow: inset 5px 0 0 var(--color-danger); padding-left: 18px; }
.field-error, .error-summary li {
  font: 600 15px/1.4 var(--font-ui); color: var(--color-danger);
}
.field-error { display: flex; gap: 8px; align-items: start; }
.field-error::before {
  content: ""; flex: none; width: 18px; height: 18px; margin-top: 1px; border-radius: 50%; background: var(--color-danger)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath d='M9 4.6v5.2' stroke='%23FBF6EA' stroke-width='2.2' stroke-linecap='round'/%3E%3Ccircle cx='9' cy='13.1' r='1.3' fill='%23FBF6EA'/%3E%3C/svg%3E") center / 18px no-repeat;
}
.error-summary { display: grid; gap: var(--space-2); padding: var(--space-4) var(--space-5); border-radius: var(--radius-md); background: var(--color-danger-wash); border: 2px solid var(--color-danger); color: var(--color-ink); }
.error-summary :is(h2, h3, p) { font: 700 16px/1.4 var(--font-ui); color: var(--color-ink); }
.error-summary ul { display: grid; gap: 4px; padding-left: 1.2em; list-style: disc; }
.error-summary a { color: var(--color-danger); }
.form-privacy { font-size: 15px; line-height: 1.5; color: var(--color-dusk-ink); }
#contact-submit { justify-self: start; min-width: 9em; cursor: pointer; }
#contact-submit:disabled { cursor: progress; transform: none; color: var(--color-dusk-ink); background: var(--color-oat); border-color: var(--color-oat-edge); box-shadow: none; }
/* #contact-status sits after the form: a line under Send, or the card's only text while the form is hidden (loading, not set up, sent). */
.form-status { font-weight: 600; color: var(--color-ink); }
.form-status:not(:empty) { margin-top: var(--space-4); }
#contact-form[hidden] + .form-status { margin: 0; padding: var(--space-5); border-radius: var(--radius-md); border: 2px dashed var(--color-oat-edge); font-size: 18px; line-height: 1.5; }

/* ---------- footer ---------- */
.site-foot { position: relative; background: var(--color-ink); color: color-mix(in srgb, var(--color-rice) 82%, var(--color-ink)); padding: clamp(48px, 6vw, 72px) 0 var(--space-7); font-size: 15px; }
.site-foot::before { content: ""; position: absolute; inset: 0 0 auto; height: 6px; background: var(--fingers); }
.foot-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: var(--space-6) clamp(32px, 5vw, 72px); }
.site-foot .brand { color: var(--color-rice); margin-bottom: var(--space-4); }
.site-foot p { max-width: 52ch; }
.site-foot .first { color: var(--color-rice); font-size: 17px; }
.foot-links { display: grid; grid-template-columns: repeat(2, minmax(0, max-content)); gap: 4px var(--space-7); align-content: start; }
.foot-links a { display: inline-flex; min-height: 40px; align-items: center; color: var(--color-honey-wash); font-weight: 600; text-decoration: none; }
.foot-links a:hover { text-decoration: underline; }
.foot-small { grid-column: 1 / -1; display: grid; gap: 6px; padding-top: var(--space-5); border-top: 1px solid rgba(251, 246, 234, 0.16); font-size: 14px; }
.site-foot :focus-visible { outline-color: var(--color-honey); }
.analytics-choice { border: 0; padding: 0; min-height: 40px; background: none; color: var(--color-honey-wash); font: inherit; text-align: left; text-decoration: underline; cursor: pointer; }

/* A slim bottom strip; DOM order keeps its buttons right after the skip link. Allow is the primary button. */
.site-consent { position: fixed; z-index: 8; left: 0; right: 0; bottom: 0; max-height: 50dvh; overflow-y: auto; padding: var(--space-3) 0; background: var(--color-rice); color: var(--color-ink); border-top: var(--edge); box-shadow: var(--shadow-floating); font-size: 15px; }
.site-consent .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-2) var(--space-4); }
.site-consent p { margin: 0; flex: 1 1 320px; }
.site-consent .actions { flex-wrap: nowrap; gap: var(--space-2); }
.site-consent .btn { min-height: 40px; padding: 0 var(--space-4); font-size: 15px; cursor: pointer; }
body:has(> .site-consent) .site-foot { padding-bottom: 96px; } /* the open strip must not cover the footer links */
@media (max-width: 699px) { body:has(> .site-consent) .site-foot { padding-bottom: 190px; } }

/* ---------- responsive ---------- */
@media (max-width: 1099px) {
  .facts div { grid-template-columns: 9.5em 1fr; }
  .nav, .head-app { display: none; }
  .menu { display: block; }
}
@media (max-width: 939px) {
  .hero-grid, .hero-grid.hero-wide, .split, .facts-grid, .faq-wrap, .foot-grid { grid-template-columns: minmax(0, 1fr); }
  .split-rev > :first-child { order: 0; }
  .hero-art .momo { left: -2%; bottom: -12%; width: 18%; }
  .store-cols { grid-template-columns: minmax(0, 1fr); }
  .sticky { position: static; }
  .rewards-grid { grid-template-columns: 1fr 1fr; }
  .contact .split { grid-template-columns: minmax(0, 1fr); }
  .contact-mascot { display: none; }
}
@media (max-width: 760px) {
  .shot-pair, .two-cards, .sso, .never, .features, .ticks-2, .rewards-grid, .rows-2 { grid-template-columns: minmax(0, 1fr); }
  .steps3 { grid-template-columns: minmax(0, 1fr); gap: var(--space-6); }
  .steps3 li { padding-left: 72px; }
  .steps3 li::before { position: absolute; left: 0; top: -6px; margin: 0; }
  .steps3 li:not(:last-child)::after { top: 52px; left: 25px; right: auto; bottom: calc(-1 * var(--space-6)); border-top: 0; border-left: 3px dashed var(--color-oat-edge); }
  .facts div, .marks div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .marks dt { justify-self: start; }
}
@media (max-width: 699px) {
  body { font-size: 16px; }
  .site-head .wrap { min-height: 64px; gap: var(--space-3); }
  .brand svg { width: 36px; height: 36px; }
  .wordmark { font-size: 20px; }
  .hero { padding-top: var(--space-5); }
  h1 { font-size: clamp(34px, 9.6vw, 44px); }
  .hero-copy h1 { margin-bottom: var(--space-4); }
  .hero-copy .lead { margin-bottom: var(--space-5); font-size: 17px; }
  .hero-copy .actions { margin-bottom: var(--space-4); width: 100%; }
  .hero-copy .actions .btn { flex: 1 1 auto; }
  .eyebrow { margin-bottom: var(--space-3); }
  .phone-note { display: block; margin-top: var(--space-3); font-size: 14.5px; color: var(--color-dusk-ink); }
  .hero-art .momo { display: none; }
  .hero-art.has-momo .shot { margin-left: 0; }
  .timeline li { padding-left: 60px; }
  .timeline li::before { width: 42px; height: 42px; font-size: 19px; }
  .timeline li:not(:last-child)::after { left: 20px; top: 46px; }
  .rewards li { grid-template-columns: 44px 1fr; }
  .rewards svg { width: 44px; height: 44px; }
  .foot-links { grid-template-columns: minmax(0, 1fr); }
  .hero-mascot { width: 120px; margin-inline: 0; }
  .shot-link::after { content: "Tap to see full size"; display: block; text-decoration: underline; margin-top: 6px; padding-left: 6px; font: 500 14px/1.4 var(--font-ui); color: var(--color-dusk-ink); }
}

/* ---------- motion: only answers to the visitor (hover, press, open) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .btn { transition: transform 120ms cubic-bezier(.3, .7, .3, 1), box-shadow 120ms; }
  .faq summary::after { transition: transform 200ms ease-out, margin 200ms ease-out; }
}
