/* ============================================================
   loop-sided — Design System
   Font: Hanken Grotesk (display) + Inter (body)
   Palette: Dark Nebula
   ============================================================ */

/* ── Reset ──────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

/* Belt-and-suspenders for prefers-reduced-motion (Section 11, Part C) —
   main.js's own smoothScrollTo already picks 'auto' for any anchor/
   back-to-top click it wires under reduced motion, and skips initialising
   Lenis entirely; this covers any native anchor jump that isn't explicitly
   wired (or fires before JS runs) so the browser never smooth-scrolls on
   its own here regardless. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  font-family: var(--ff-body);
  font-weight: 400;
  color: var(--c-text);
  background: var(--c-base);
  overflow-x: hidden;
  line-height: 1.65;
}

img, svg, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, textarea, select { font-family: inherit; font-size: inherit; }

::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--c-base); }
::-webkit-scrollbar-thumb { background: var(--c-violet); border-radius: 3px; }

/* ── Metric-matched web-font fallbacks ──────────────────────
   While Hanken Grotesk / Inter are still downloading (font-display: swap),
   text renders in these local faces instead: Arial (or its metric-identical
   clones Liberation Sans / Arimo), scaled with size-adjust so each line
   takes the same width as the real font (derived from the homepage's own
   copy, per weight) and with ascent/descent overridden to the real font's
   vertical metrics. Headlines therefore wrap identically before and after
   the swap, nothing reflows when the real font arrives, and spine.js's
   first measurement is already the final one. Latin range only (same as
   Google's latin subset), so Greek text keeps exactly its current fallback.
   Purely local fonts: no download, nothing render-blocking. */
@font-face { font-family: 'Hanken Grotesk Fallback'; font-weight: 700; src: local('Arial Bold'), local('Arial-BoldMT'), local('Liberation Sans Bold'), local('Arimo Bold');
  size-adjust: 94.6%;  ascent-override: 105.71%; descent-override: 32.03%; line-gap-override: 0%;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Hanken Grotesk Fallback'; font-weight: 800; src: local('Arial Bold'), local('Arial-BoldMT'), local('Liberation Sans Bold'), local('Arimo Bold');
  size-adjust: 94.4%;  ascent-override: 105.93%; descent-override: 32.1%; line-gap-override: 0%;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Hanken Grotesk Fallback'; font-weight: 900; src: local('Arial Bold'), local('Arial-BoldMT'), local('Liberation Sans Bold'), local('Arimo Bold');
  size-adjust: 94%;    ascent-override: 106.38%; descent-override: 32.23%; line-gap-override: 0%;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Inter Fallback'; font-weight: 400; src: local('Arial'), local('ArialMT'), local('Liberation Sans'), local('Arimo');
  size-adjust: 106.4%; ascent-override: 91.07%; descent-override: 22.65%; line-gap-override: 0%;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Inter Fallback'; font-weight: 500; src: local('Arial'), local('ArialMT'), local('Liberation Sans'), local('Arimo');
  size-adjust: 107.35%; ascent-override: 90.27%; descent-override: 22.45%; line-gap-override: 0%;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Inter Fallback'; font-weight: 600; src: local('Arial'), local('ArialMT'), local('Liberation Sans'), local('Arimo');
  size-adjust: 106.87%; ascent-override: 90.67%; descent-override: 22.55%; line-gap-override: 0%;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Inter Fallback'; font-weight: 700; src: local('Arial Bold'), local('Arial-BoldMT'), local('Liberation Sans Bold'), local('Arimo Bold');
  size-adjust: 96.32%; ascent-override: 100.6%; descent-override: 25.02%; line-gap-override: 0%;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* ── Design Tokens (Dark Nebula) ────────────────────────── */
:root {
  --c-base:#00010D; --c-indigo:#010326; --c-violet-d:#2D0140;
  --c-purple:#660273; --c-magenta:#A305A6;
  --c-violet:#9D5BFF; --c-violet-hi:#C77DFF;
  --c-text:#ECE8F5; --c-muted:#8A85A0; --c-line:rgba(236,232,245,0.08);
  --ff-display:'Hanken Grotesk','Hanken Grotesk Fallback','Helvetica Neue',Arial,sans-serif;
  --ff-body:'Inter','Inter Fallback',system-ui,sans-serif;
  --container:1200px; --nav-h:76px;
  --ease-out:cubic-bezier(0.22,1,0.36,1);
}

/* ── Layout Utility ─────────────────────────────────────── */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 2.5rem;
}

/* Word-reveal technique (ANIMATIONS.md) — starts hidden so GSAP can stagger it in */
.hw { display: inline-block; opacity: 0; }

/* ── Site-wide orb background ──────────────────────────────
   Fixed behind every section; travels via orbState (orb.js).
   Negative z-index keeps it below static/auto-stacked content
   without needing z-index bumps on nav/main/footer. ────── */
.site-canvas {
  position: fixed;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  display: block;
}

/* ── PCB spine ──────────────────────────────────────────────
   One continuous circuit running the full document height, computed from
   real section/node positions (spine.js) — not per-section diagrams.
   position:absolute (not fixed) so it scrolls naturally with the page; its
   paths are static, so no JS is needed to keep it aligned while scrolling.
   Sits in DOM order right after .site-canvas and shares its z-index: -1
   paints it above the orb (later in a tied stacking level) while both stay
   safely below every static in-flow content (negative z-index always paints
   under normal-flow boxes — the same rule that already keeps the orb from
   covering anything, see the comment above). No z-index bump needed on any
   text/card selector. ────────────────────────────────────── */
.pcb-spine {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  z-index: -1;
  overflow: visible;
  pointer-events: none;
}

.pcb-trace {
  fill: none;
  stroke: #660273;
  stroke-width: 1.6;
  stroke-opacity: 0.4;
  stroke-linecap: round;
}
.pcb-trace--fade {
  stroke-opacity: 0.16;
}
/* Geometry-only helper (mobile's reverse-direction loop-back pulse rides
   this) — kept attached and rendered (not display:none) so getTotalLength()
   stays reliable, just fully transparent. */
.pcb-trace--invisible {
  opacity: 0;
}

/* Junction "vias" — small glowing solder points at every place the circuit
   actually connects to something, same bright-magenta family and glow as
   the packets (shared #pcbGlow filter) so routing reads as deliberate
   connections, not lines that just happen to touch. */
.pcb-via {
  fill: #A305A6;
  filter: url(#pcbGlow);
  opacity: 0.75;
}
.pcb-via--branch { opacity: 0.9; }
.pcb-via--dim {
  fill: #2D0140;
  filter: none;
  opacity: 0.45;
}

/* One-shot "packet arrived" flash — Section 4's card-entry vias (spine.js's
   armToolsReveal) add this class the moment their branch pulse lands.
   Single iteration, no forwards fill: settles back to the normal .pcb-via
   idle state on its own. */
.pcb-via--fire {
  animation: pcbViaFire 0.9s ease-out 1;
}
@keyframes pcbViaFire {
  0%   { opacity: 0.75; filter: url(#pcbGlow); }
  35%  { opacity: 1; filter: url(#pcbGlow) brightness(1.7); }
  100% { opacity: 0.85; filter: url(#pcbGlow); }
}

/* Ambient "current arriving" breathing pulse — Section 4's four card-entry
   vias carry this always, independent of reveal, so the grid keeps reading
   as powered after every card has already appeared. Combined with
   .pcb-via--fire in a compound selector (rather than relying on two
   same-specificity single-class rules, which would let whichever is later
   in the sheet win the 'animation' shorthand outright and permanently mute
   the other) so the one-shot arrival flash layers on top of, rather than
   replacing, the ambient loop — the flash's keyframe wins the shared
   opacity/filter properties only while it's actively running, then the
   loop keeps going underneath exactly as before. */
.pcb-via--live {
  animation: pcbViaLive 2.6s ease-in-out infinite;
}
.pcb-via--live.pcb-via--fire {
  animation: pcbViaLive 2.6s ease-in-out infinite, pcbViaFire 0.9s ease-out 1;
}
@keyframes pcbViaLive {
  0%, 100% { opacity: 0.7; filter: url(#pcbGlow); }
  50%      { opacity: 1;   filter: url(#pcbGlow) brightness(1.35); }
}

/* Junction glow synced to the packet actually passing through it (Section
   11, Part B) — spine.js's addPulseToVia sets animation-name/duration/delay
   inline per via so this keyframe's own cycle lines up exactly with that
   via's feeding pulse: mostly at rest, one soft brief flash right as the
   packet's leading edge reaches it, settled again for the rest of that
   pulse's own loop. Never combined with .pcb-via--live/--fire on the same
   element (addPulseToVia is only used on vias that don't carry those — see
   its own comment in spine.js) so there's no shorthand conflict to resolve.
   Reduced motion: addPulseToVia never sets these inline properties at all
   (same guard as addPulse/addOneShotPulse elsewhere), so those vias simply
   keep their plain static .pcb-via look — nothing further needed here. */
@keyframes pcbViaPulse {
  0%   { opacity: 0.75; filter: url(#pcbGlow); }
  4%   { opacity: 1;    filter: url(#pcbGlow) brightness(1.7); }
  14%  { opacity: 0.8;  filter: url(#pcbGlow); }
  100% { opacity: 0.8;  filter: url(#pcbGlow); }
}

.pcb-pulse {
  fill: none;
  stroke: #A305A6;
  stroke-width: 2.2;
  stroke-linecap: round;
  filter: url(#pcbGlow);
  opacity: 0.55;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
  /* animation-name/duration/delay are set inline per pulse (spine.js) —
     each needs its own literal, non-shared @keyframes rule; see spine.js's
     addPulse() for why. */
  transition: opacity 0.5s ease, stroke-width 0.5s ease;
}

/* Scroll-active state — packets read a little brighter/bolder while the user
   is actively scrolling, calm again shortly after they stop (see spine.js's
   ScrollTrigger, which just toggles this class — no per-frame JS). */
.pcb-spine--active .pcb-pulse {
  opacity: 0.95;
  stroke-width: 2.8;
}

/* "Comet-head" packet (Section 2 node legs) — a second, brighter, shorter
   lit segment riding the SAME path as the ambient packet, phase-locked to it
   (spine.js's addCometHead reuses the main packet's period/speed/delay so the
   two never drift apart). Reads as a hot leading core without touching any
   routing. Brighter than the base packet via full opacity + a tighter glow
   (a compact CSS drop-shadow instead of the broader shared #pcbGlow filter),
   locked accent only. Kept BEFORE the reduced-motion block below so that
   block's `.pcb-pulse { opacity: 0 }` still wins and freezes it out, exactly
   like every other packet. */
.pcb-pulse--head {
  stroke: #A305A6;
  stroke-width: 2.4;
  opacity: 0.95;
  filter: drop-shadow(0 0 2px #A305A6) drop-shadow(0 0 1px #A305A6);
}

@media (max-width: 767px) {
  .pcb-trace { stroke-width: 1.4; }
}

@media (prefers-reduced-motion: reduce) {
  /* Match the orb's reduced-motion approach: freeze the moving element,
     keep the static structure (traces + vias) fully visible. spine.js also
     leaves animation-name unset for every pulse when this is on, so this is
     belt-and-suspenders against any stylesheet/inline-style specificity
     edge case rather than the only thing stopping the animation. */
  .pcb-pulse { animation: none; opacity: 0; }
  .pcb-via--fire { animation: none; }
  /* Ambient via breathing also freezes — but stays softly lit (a touch
     brighter than the plain resting .pcb-via) instead of going fully inert,
     so Section 4's docking points still read as "on", just static. */
  .pcb-via--live { animation: none; opacity: 0.9; }
}

/* ── Cursor ─────────────────────────────────────────────── */
.cursor {
  display: none;
  pointer-events: none;
  position: fixed;
  top: 0; left: 0;
  z-index: 9999;
}
.cursor-inner {
  position: absolute;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--c-violet-hi);
  transition: width .18s var(--ease-out), height .18s var(--ease-out), background .18s var(--ease-out);
}
.cursor-outer {
  position: absolute;
  width: 24px; height: 24px;
  border-radius: 50%;
  border: 1px solid var(--c-violet);
  opacity: 0.4;
  transition: width .22s var(--ease-out), height .22s var(--ease-out), opacity .22s, border-color .22s var(--ease-out);
}
/* Hover state (Section 11, Part E; resized Section 12, Part C) — the ring
   grows and shifts to the magenta accent, same "hot" language as the
   spine's own packet-arrival flash (.pcb-via--fire) and the language-menu's
   active state, so a hovered interactive element reads consistently across
   the whole site. Resting size dropped from 40px to 24px (Senthora-scale —
   small, thin, close to the dot); hover growth scaled down to match so it
   still reads as a modest grow, not a big halo. */
.cursor--hover .cursor-inner { width: 12px; height: 12px; background: var(--c-magenta); }
.cursor--hover .cursor-outer { width: 36px; height: 36px; opacity: 0.5; border-color: var(--c-magenta); }
.cursor--hidden .cursor-inner,
.cursor--hidden .cursor-outer { opacity: 0; }

/* ── Navigation ─────────────────────────────────────────── */
.nav {
  opacity: 0; /* entrance timeline fades this in */
  position: fixed;
  /* --fbar-offset: height of the founding bar still on screen (founding-bar.js);
     0 when the bar is dismissed or has scrolled away. */
  top: var(--fbar-offset, 0px); left: 0; right: 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2.5rem;
  transition: background .4s, box-shadow .4s;
}

.nav--scrolled {
  background: rgba(0, 1, 13, 0.80);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 1px 0 var(--c-line);
}

.nav-logo {
  display: flex;
  align-items: center;
}
.nav-logo:focus { outline: none; }
.nav-logo:focus-visible { outline: 1px solid var(--c-violet); outline-offset: 6px; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 2.2rem;
}

.nav-link {
  font-family: var(--ff-body);
  font-weight: 500;
  font-size: 0.85rem;
  color: var(--c-text);
  position: relative;
  transition: opacity .2s;
}
.nav-link:hover { opacity: 0.7; }
.nav-link--login { color: var(--c-muted); }

/* Five nav-links + lang menu + login + CTA no longer clear 2.2rem gaps
   without wrapping at 1024px once the header gained a Contact item
   alongside About — tightens just enough to keep everything (including EL,
   whose labels run longer — "Δημιουργία λογαριασμού" vs "Open account") on
   one line down to 1024px (the mobile nav overlay below 768px already
   replaces this row entirely, so this range only ever covers the
   in-between desktop/tablet row). Below ~950px EL was already wrapping
   here pre-existing (long Greek labels, e.g. "Συχνές ερωτήσεις" for the
   old FAQ item) — out of scope to chase further; this only has to hold at
   1024 and above, which it does with room to spare. Placed after the base
   .nav-link rule above so its font-size actually wins the cascade. */
@media (min-width: 769px) and (max-width: 1200px) {
  .nav { padding: 0 1.5rem; }
  .nav-links { gap: 1.1rem; }
  .nav-link { font-size: 0.8rem; }
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--ff-body);
  font-weight: 600;
  font-size: 0.82rem;
  padding: 0.6rem 1.4rem;
  border-radius: 8px;
  transition: opacity .2s, transform .2s;
}

.btn--gradient {
  background: linear-gradient(135deg, var(--c-violet), var(--c-magenta));
  color: var(--c-text);
}
.btn--gradient:hover { opacity: 0.88; }

/* ── Language dropdown (Section 10, Part B) ────────────────────────────
   Senthora-style: a compact globe+code pill that opens a small dropdown.
   Same component in the header and footer (lang-menu.js owns the
   open/close/current-label UI; picking an option still calls the site's
   existing i18n.setLanguage — see index.html's onclick on each option and
   i18n.js's own [data-lang-btn] active-state wiring, both untouched). */
.lang-menu {
  position: relative;
  margin-left: 0.5rem;
}

/* Greek is switched off for now (see ENABLED_LANGS in i18n.js): both the
   header and footer switchers stay in the markup but are hidden on every
   page. Delete this rule to bring the switcher back. */
.lang-menu { display: none; }

.lang-menu-trigger {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.42rem 0.7rem;
  border-radius: 999px;
  border: 1px solid rgba(157, 91, 255, 0.28);
  background: rgba(1, 3, 38, 0.4);
  color: var(--c-text);
  font-family: var(--ff-body);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  transition: border-color .2s, background .2s;
}
.lang-menu-trigger:hover,
.lang-menu--open .lang-menu-trigger {
  border-color: rgba(199, 125, 255, 0.6);
  background: rgba(45, 1, 64, 0.55);
}
.lang-menu-trigger:focus-visible {
  outline: 1px solid var(--c-violet);
  outline-offset: 3px;
}

.lang-menu-globe { width: 15px; height: 15px; flex-shrink: 0; color: var(--c-violet); }
.lang-menu-chevron {
  width: 12px; height: 12px; flex-shrink: 0;
  transition: transform .2s var(--ease-out);
}
.lang-menu--open .lang-menu-chevron { transform: rotate(180deg); }
.lang-menu-current { min-width: 1.4em; text-align: center; }

.lang-menu-list {
  position: absolute;
  top: calc(100% + 0.6rem);
  right: 0;
  z-index: 20;
  min-width: 152px;
  padding: 0.4rem;
  border-radius: 12px;
  border: 1px solid rgba(157, 91, 255, 0.28);
  background: rgba(1, 3, 38, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 20px 48px -16px rgba(0, 0, 0, 0.6);
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
/* [hidden] and the class rule above are equal specificity, and author
   styles beat the UA stylesheet — without this, display:flex silently wins
   and lang-menu.js's `list.hidden = true` stops actually hiding anything. */
.lang-menu-list[hidden] { display: none; }
/* Footer instance opens upward so it never clips against the viewport
   bottom (see index.html's data-lang-menu="footer"). */
.lang-menu--up .lang-menu-list {
  top: auto;
  bottom: calc(100% + 0.6rem);
}

.lang-menu-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
  padding: 0.55rem 0.7rem;
  border-radius: 8px;
  font-family: var(--ff-body);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--c-muted);
  text-align: left;
  transition: color .2s, background .2s;
}
.lang-menu-option-name { font-weight: 500; color: var(--c-muted); font-size: 0.74rem; }
.lang-menu-option:hover { color: var(--c-violet-hi); background: rgba(157, 91, 255, 0.1); }
.lang-menu-option:focus-visible { outline: 1px solid var(--c-violet); outline-offset: -2px; }
/* .lang-btn--active is added/removed by i18n.js's own existing
   updateLanguageSwitcherState() — see its [data-lang-btn] query, which
   matches these options by attribute regardless of class name. */
.lang-menu-option.lang-btn--active,
.lang-menu-option.lang-btn--active .lang-menu-option-name {
  color: var(--c-magenta);
}

@media (max-width: 768px) {
  /* Centered under the trigger instead of right-anchored — inside the
     full-screen mobile nav overlay the trigger sits near the horizontal
     center, so a right:0 dropdown can run past the edge. */
  .lang-menu-list {
    left: 50%;
    right: auto;
    transform: translateX(-50%);
  }
}

.nav-menu-btn {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 28px;
  height: 28px;
  padding: 4px;
}
.nav-menu-btn span {
  display: block;
  width: 100%;
  height: 1.5px;
  background: var(--c-text);
  transition: transform .28s var(--ease-out), opacity .28s;
}
.menu-btn--open span:first-child { transform: translateY(6.5px) rotate(45deg); }
.menu-btn--open span:last-child  { transform: translateY(-6.5px) rotate(-45deg); }

@media (max-width: 768px) {
  :root { --nav-h: 62px; }

  .nav-menu-btn { display: flex; z-index: 100; position: relative; }

  .nav-links {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 100vh;
    height: 100dvh;
    background: var(--c-base);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2.5rem;
    z-index: 99;
    overflow-y: auto;
    padding-top: max(5rem, env(safe-area-inset-top));
    padding-bottom: max(3rem, env(safe-area-inset-bottom));
  }
  .nav-links--open {
    display: flex;
    animation: navOverlayIn 0.38s var(--ease-out);
  }

  .nav-link {
    font-family: var(--ff-display);
    font-weight: 800;
    font-size: 1.6rem;
  }

  .btn--gradient { padding: 0.7rem 2rem; }
}

@keyframes navOverlayIn {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Founding announcement bar (founding-bar.js) ────────────
   Slim, in normal flow at the top of <body>, scrolls away with the page;
   the fixed nav rests under it via --fbar-offset (see .nav). Colours: the
   five palette values only (plus the site text token for legible copy).
   No layout animation: it fades in/out on opacity alone. */
.fbar {
  position: relative;
  z-index: 1; /* above the spine/orb layers; the nav (z 100) stays on top */
  overflow: hidden;
  background:
    radial-gradient(55% 160% at 50% 0%, rgba(102, 2, 115, 0.55) 0%, rgba(102, 2, 115, 0) 70%),
    linear-gradient(90deg, #010326 0%, #2D0140 50%, #010326 100%);
  border-bottom: 1px solid rgba(163, 5, 166, 0.38);
  box-shadow: 0 8px 28px -14px rgba(163, 5, 166, 0.55);
  animation: fbarIn 0.6s var(--ease-out) both;
  transition: opacity 0.24s ease;
}

/* Soft violet glow drifting slowly along the bar, never a flash. */
.fbar::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(30% 220% at 50% 50%, rgba(163, 5, 166, 0.22) 0%, rgba(163, 5, 166, 0) 70%);
  background-size: 200% 100%;
  animation: fbarGlow 14s ease-in-out infinite alternate;
  pointer-events: none;
}

.fbar--leaving { opacity: 0; }
/* Dismissed < 7 days ago: set on <html> by the inline <head> guard before
   first paint, so a dismissed bar is never painted (founding-bar.js). */
.fbar-off .fbar { display: none; }
/* A non-EN language is saved: the static EN copy stays invisible (the bar
   itself still paints at full height) until i18n.js has swapped it, so the
   re-wrap of the copy is never seen or counted as a layout shift. */
.fbar-i18n-wait .fbar-inner { visibility: hidden; }

.fbar-inner {
  position: relative;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0.62rem 3.25rem;
  text-align: center;
  /* Type set on the block, not the inline link, so the line box isn't
     stretched by the body's taller line-height strut. */
  font-family: var(--ff-body);
  font-size: 0.8rem;
  line-height: 1.45;
}

.fbar-link {
  color: var(--c-text);
  text-decoration: none;
}
.fbar-text strong { font-weight: 600; }

.fbar-cta {
  white-space: nowrap;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: #A305A6;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: text-decoration-color 0.2s;
}
.fbar-link:hover .fbar-cta { text-decoration-color: currentColor; }
.fbar-link:focus-visible { outline: 1px solid #A305A6; outline-offset: 3px; border-radius: 2px; }

.fbar-close {
  position: absolute;
  top: 50%;
  right: 1rem;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--c-text);
  opacity: 0.7;
  cursor: pointer;
  transition: opacity 0.2s, background 0.2s;
}
.fbar-close svg { width: 14px; height: 14px; }
.fbar-close:hover { opacity: 1; background: rgba(102, 2, 115, 0.45); }
.fbar-close:focus-visible { opacity: 1; outline: 1px solid #A305A6; outline-offset: 0; }

@keyframes fbarIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fbarGlow { from { background-position: 0% 50%; } to { background-position: 100% 50%; } }

@media (max-width: 768px) {
  .fbar-inner { padding: 0.6rem 3rem 0.6rem 1.25rem; text-align: left; font-size: 0.76rem; }
  .fbar-close { right: 0.35rem; width: 40px; height: 40px; }
  /* The open mobile menu is a full-screen layer inside the nav: pin the
     nav to the very top while it is open so the overlay covers the bar too. */
  body:has(.nav-links--open) .nav { top: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .fbar, .fbar::before { animation: none; }
  .fbar { transition: none; }
}

/* ── Hero ───────────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  isolation: isolate;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 760px;
  margin: 0 auto;
  padding: calc(var(--nav-h) + 2rem) 2rem 4rem;
  text-align: center;
  pointer-events: none; /* clicks pass through to the orb canvas beneath, except the CTAs */
}

.hero-overline {
  opacity: 0;
  font-family: var(--ff-body);
  font-weight: 500;
  font-size: 0.72rem;
  letter-spacing: 0.17em;
  text-transform: uppercase;
  color: var(--c-muted);
}

.hero-headline {
  font-family: var(--ff-display);
  font-weight: 900;
  font-size: clamp(2.75rem, 6.5vw, 6.25rem);
  line-height: 1.04;
  letter-spacing: -0.03em;
  color: var(--c-text);
  margin: 1.1rem 0 1.6rem;
}
.hero-headline .hl-line { display: block; }
.hero-headline .hl-line.grad .hw {
  background: linear-gradient(135deg, var(--c-violet-hi), var(--c-magenta));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Greek runs ~25-30% longer than English — a smaller cap keeps each
   .hl-line on its own single visual line at tablet/desktop widths
   instead of wrapping into 4 lines (see hero-content max-width below). */
html[lang="el"] .hero-headline {
  font-size: clamp(2.3rem, 4.8vw, 4rem);
}

.hero-sub {
  opacity: 0;
  font-family: var(--ff-body);
  font-size: clamp(1rem, 1.3vw, 1.15rem);
  line-height: 1.7;
  color: var(--c-muted);
  max-width: 52ch;
  margin: 0 auto 2.5rem;
}

.hero-ctas {
  opacity: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  pointer-events: auto;
}

.btn--ghost {
  border: 1px solid var(--c-line);
  color: var(--c-text);
  background: transparent;
}
.btn--ghost:hover {
  border-color: var(--c-violet);
  background: rgba(157, 91, 255, 0.08);
}

/* ── loop-sided logo (registered mark) ─────────────────────
   Official motion layers from brand/loop-sided/motion/ (see its README):
   each pair stacks on one canvas and, at rest, is pixel-identical to the
   official logo/mark. Never recolour, crop, stretch, filter or restyle
   either layer, and never size one layer alone: both always fill the same
   shared box. Only the arcs layer moves, and only by rotation around its
   own origin; the base (which carries the name) never moves or scales.
   CSS only, compositor-friendly transforms; reduced motion = fully still.
   Browsers stop painting CSS animations in hidden tabs on their own, so no
   visibility JS is needed to pause it. */
.brand-lockup {
  --brand-h: 44px;
  position: relative;
  display: block;
  flex: none;
  width: calc(var(--brand-h) * 900 / 290); /* canvas is 900 x 290 */
  height: var(--brand-h);
}
.brand-lockup img,
.brand-mark img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
}
/* The rotating arcs canvas is far wider than its visible arcs: it must never
   catch clicks meant for whatever sits under it. */
.brand-lockup-arcs { transform-origin: 17.28% 50%; pointer-events: none; }

.brand-mark {
  position: relative;
  display: block;
  overflow: hidden; /* arcs reach r=247 of 256: clips only empty canvas corners */
}
.brand-mark-rings,
.brand-mark-arcs { transform-origin: 50% 50%; }
.brand-mark-svg image { transform-box: fill-box; transform-origin: 50% 50%; }

@media (prefers-reduced-motion: no-preference) {
  .brand-lockup-arcs,
  .brand-mark-arcs { animation: brand-orbit 24s linear infinite; will-change: transform; }
  .brand-mark-rings { animation: brand-breathe 6s ease-in-out infinite; }
  .brand-lockup--static .brand-lockup-arcs { animation: none; will-change: auto; }
}
@keyframes brand-orbit   { to { transform: rotate(360deg); } }
@keyframes brand-breathe { 50% { transform: scale(1.015); } }

@media (max-width: 768px) {
  .nav .brand-lockup { --brand-h: 38px; }
}

@media (max-width: 768px) {
  .hero-content { padding: calc(var(--nav-h) + 1.5rem) 1.5rem 3rem; }
  .hero-sub { margin-bottom: 2rem; }
}

/* Desktop — give the hero room to spread out instead of wrapping the H1
   inside the same narrow column used at tablet/mobile widths. */
@media (min-width: 1025px) {
  .hero-content { max-width: 1040px; }
}

/* ── Section header (DESIGN-SYSTEM.md eyebrow pattern) ──────
   Reusable above any major section headline — Dark Nebula tokens. */
.section-eyebrow {
  opacity: 0;
  font-family: var(--ff-body);
  font-weight: 500;
  font-size: 0.72rem;
  letter-spacing: 0.17em;
  text-transform: uppercase;
  color: var(--c-muted);
  text-align: center;
}

.section-headline {
  opacity: 0;
  font-family: var(--ff-display);
  font-weight: 900;
  font-size: clamp(2rem, 3.8vw, 4.25rem);
  line-height: 1.16;
  letter-spacing: -0.02em;
  color: var(--c-text);
  text-align: center;
  max-width: 640px;
  margin: 1rem auto 0;
}

/* ── How it works ───────────────────────────────────────── */
.how {
  padding: 8rem 0;
  position: relative;
}

.how-header {
  margin-bottom: 4rem;
}

.how-diagram {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4rem;
  max-width: 700px;
  margin: 0 auto;
}

.how-traces {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
  z-index: 0;
  /* The site-wide PCB spine (spine.js) now draws these exact same
     node-to-node connections as part of one continuous circuit, with its
     own pulses — having both rendered at once was the main source of the
     "tangled/overlapping" look reported after the first spine pass. Hiding
     this diagram-local SVG (not deleting how.js — it still measures/ticks
     harmlessly underneath) leaves a single, clean circuit. Flagged in the
     handoff notes; revert by deleting this line if the old per-diagram
     traces are wanted back. */
  display: none;
}

.how-trace {
  fill: none;
  stroke: var(--c-line);
  stroke-width: 2;
  stroke-linecap: round;
}
.how-trace--loop { stroke: rgba(157, 91, 255, 0.24); }

.how-pulse {
  fill: none;
  stroke: url(#howTraceGrad);
  stroke-width: 3;
  stroke-linecap: round;
  filter: url(#howPulseGlow);
  opacity: 0; /* faded in once its trace finishes drawing */
}
.how-pulse--loop {
  stroke: var(--c-violet-hi);
  stroke-width: 3.6;
}

.how-node {
  opacity: 0;
  position: relative;
  z-index: 1;
  width: 100%;
  /* Locked palette only — #660273 (mid) for the structural fill/edge,
     #A305A6 (bright accent) for the inner lift. (Was the old unlocked
     --c-violet #9D5BFF family — rgba(157,91,255).) */
  background: linear-gradient(180deg, rgba(102, 2, 115, 0.10), rgba(163, 5, 166, 0.04));
  border: 1px solid rgba(102, 2, 115, 0.30);
  border-radius: 16px;
  /* Depth: a soft downward elevation shadow in the base colour (#00010D)
     plus the existing inner glow, now in the locked mid tone. */
  box-shadow:
    0 18px 40px -24px rgba(0, 1, 13, 0.90),
    inset 0 0 24px rgba(102, 2, 115, 0.08);
  padding: 2rem 2.1rem;
  text-align: center;
  /* Hover lift is paint-only (transform) — never reflow — so the spine's
     baked vias (measured at layout() time, not during hover) don't drift. */
  transition: transform 0.35s var(--ease-out),
              box-shadow 0.35s var(--ease-out),
              border-color 0.35s var(--ease-out);
}

/* Soft animated edge-glow — a 1px gradient "border" that breathes, drawn as
   a ::before with the mask-composite border trick so it adds NO layout box
   (padding:1px + exclude mask leaves only the 1px ring painted). Locked
   colours only. Slow ease-in-out opacity loop; the engine node runs a touch
   faster + brighter below so it stays the clear hero. */
.how-node::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(140deg,
    rgba(163, 5, 166, 0.60),
    rgba(102, 2, 115, 0.15) 45%,
    rgba(163, 5, 166, 0.55));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
          mask-composite: exclude;
  pointer-events: none;
  opacity: 0.4;
  animation: howEdgeGlow 4.3s ease-in-out infinite;
}
@keyframes howEdgeGlow {
  0%, 100% { opacity: 0.30; }
  50%      { opacity: 0.68; }
}

.how-node:hover {
  transform: translateY(-4px);
  border-color: rgba(163, 5, 166, 0.50);
  box-shadow:
    0 26px 54px -22px rgba(0, 1, 13, 0.95),
    0 0 30px rgba(163, 5, 166, 0.18),
    inset 0 0 26px rgba(102, 2, 115, 0.12);
}
.how-node:hover::before { opacity: 0.85; }

.how-node h3 {
  font-family: var(--ff-display);
  font-weight: 800;
  font-size: 1.2rem;
  letter-spacing: -0.01em;
  color: var(--c-text);
  margin-bottom: 0.5rem;
}

.how-node p {
  font-family: var(--ff-body);
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--c-muted);
}

.how-node--1 { max-width: 360px; }

.how-node--engine {
  max-width: 400px;
  padding: 2.4rem 2.1rem;
  /* Hero node — brightest of the three. Locked palette only (was the old
     --c-violet / --c-violet-hi family): #A305A6 accent + #660273 mid. */
  border-color: rgba(163, 5, 166, 0.45);
  background: linear-gradient(180deg, rgba(163, 5, 166, 0.14), rgba(102, 2, 115, 0.08));
  box-shadow:
    0 22px 48px -24px rgba(0, 1, 13, 0.95),
    0 0 36px rgba(163, 5, 166, 0.22),
    inset 0 0 28px rgba(163, 5, 166, 0.12);
}
/* Brighter, slightly faster breathing edge on the hero so it reads as the
   most "powered" panel of the three. */
.how-node--engine::before {
  background: linear-gradient(140deg,
    rgba(163, 5, 166, 0.85),
    rgba(102, 2, 115, 0.25) 45%,
    rgba(163, 5, 166, 0.80));
  opacity: 0.6;
  animation-duration: 3.6s;
}
@keyframes howEdgeGlowEngine { 0%, 100% { opacity: 0.45; } 50% { opacity: 0.90; } }
.how-node--engine::before { animation-name: howEdgeGlowEngine; }
.how-node--engine:hover {
  box-shadow:
    0 30px 60px -22px rgba(0, 1, 13, 1),
    0 0 44px rgba(163, 5, 166, 0.30),
    inset 0 0 30px rgba(163, 5, 166, 0.16);
}

.how-node-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 1rem;
}

.how-node-tag {
  display: inline-block;
  margin-top: 1rem;
  font-family: var(--ff-body);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #A305A6; /* locked bright accent (was --c-violet-hi #C77DFF) */
}

.how-outputs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  width: 100%;
}

.how-loop-label {
  opacity: 0;
  font-family: var(--ff-body);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: #A305A6; /* locked bright accent (was --c-violet-hi #C77DFF) */
  text-align: center;
}

/* Reduced motion: the breathing edge-glow freezes to a static, still-lit
   state (same intent as .pcb-via--live's reduced-motion rule) — the hero
   stays a touch brighter so the three panels keep their lit hierarchy. */
@media (prefers-reduced-motion: reduce) {
  .how-node::before { animation: none; opacity: 0.40; }
  .how-node--engine::before { animation: none; opacity: 0.60; }
}

@media (max-width: 1024px) {
  .how { padding: 6rem 0; }
}

@media (max-width: 768px) {
  .how { padding: 5rem 0; }
  .how-header { margin-bottom: 2.5rem; }
}

@media (max-width: 767px) {
  /* Cards stay enlarged but pull back from the desktop/tablet scale so they
     don't overwhelm a narrow stacked column. */
  .how-node { padding: 1.6rem 1.6rem; border-radius: 14px; }
  .how-node h3 { font-size: 1.05rem; }
  .how-node p { font-size: 0.86rem; }
  .how-node--1 { max-width: 100%; }
  .how-node--engine { max-width: 100%; padding: 1.9rem 1.7rem; }
  .how-node-icon { width: 42px; height: 42px; }
}

@media (max-width: 480px) {
  .how { padding: 4rem 0; }
  .how-header { margin-bottom: 2rem; }
  .how-diagram { gap: 3rem; }
  .how-outputs { grid-template-columns: 1fr; gap: 2.5rem; }
}

/* Desktop — let the heading and the node column use more of the
   available width instead of sitting in the same narrow column used
   at tablet/mobile widths. */
@media (min-width: 1025px) {
  .section-headline { max-width: 1000px; }
  .how-diagram { max-width: 1000px; }
  .how-node { padding: 2.5rem 2.75rem; }
  .how-node h3 { font-size: 1.4rem; }
  .how-node p { font-size: 1.02rem; }
  .how-node--1 { max-width: 440px; }
  .how-node--engine { max-width: 480px; padding: 3rem 2.75rem; }
  .how-node-icon { width: 58px; height: 58px; }
  .how-outputs { gap: 3rem; }
}

/* ── CEFR proof — Section 3's single framed "station" ──────
   The circuit continues down from section 2's outputs, enters this frame's
   top edge and exits its bottom edge (spine.js — one in, one out). Inside,
   an animated A1→C2 level bar proves CEFR accuracy: a magenta packet runs
   the bar left to right, lighting each level as it arrives, holds all six
   lit for a calm ~1.5s pause, then loops. 100% CSS — transform + opacity
   keyframes only, no JS, no per-frame cost — stays cheap alongside the orb
   and the section-2 packets. */
.cefr {
  padding: 8rem 0;
  position: relative;
}

.cefr-header {
  margin-bottom: 4rem;
}

.cefr-frame {
  opacity: 0;
  position: relative;
  max-width: 760px;
  margin: 0 auto;
  /* Locked palette only — #660273 (mid) fill/inner-glow, #A305A6 (bright
     accent) border/outer-glow. (Was the old unlocked --c-violet #9D5BFF /
     --c-violet-hi #C77DFF family.) Same visual family as Section 2's panels:
     a base-colour (#00010D) elevation shadow for depth + the existing glow. */
  background: linear-gradient(180deg, rgba(102, 2, 115, 0.11), rgba(163, 5, 166, 0.05));
  border: 1px solid rgba(163, 5, 166, 0.40);
  border-radius: 18px;
  box-shadow:
    0 22px 48px -26px rgba(0, 1, 13, 0.90),
    0 0 32px rgba(163, 5, 166, 0.16),
    inset 0 0 28px rgba(102, 2, 115, 0.10);
  /* Equal top/bottom padding — even breathing room around the bar+caption,
     not crammed toward either edge. (2-value shorthand keeps this
     guaranteed symmetric; don't switch back to 3/4-value shorthand here.) */
  padding: 2.9rem 3rem;
  /* Gentle, restrained hover lift (paint-only transform — never reflow, so
     the spine's baked top/bottom dock vias, measured at layout() time not on
     hover, don't drift). Kept softer than the tool cards — this frame is
     barely interactive. */
  transition: transform 0.4s var(--ease-out),
              box-shadow 0.4s var(--ease-out),
              border-color 0.4s var(--ease-out);
}

/* Soft animated breathing edge-glow — a 1px gradient "border" drawn as a
   ::before with the mask-composite trick so it adds NO layout box (padding:1px
   + exclude mask leaves only the 1px ring painted). Locked colours only; slow
   ~4s ease-in-out loop, same family as Section 2's .how-node edge-glow. */
.cefr-frame::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(140deg,
    rgba(163, 5, 166, 0.55),
    rgba(102, 2, 115, 0.15) 45%,
    rgba(163, 5, 166, 0.50));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
          mask-composite: exclude;
  pointer-events: none;
  opacity: 0.4;
  animation: cefrFrameGlow 4s ease-in-out infinite;
}
@keyframes cefrFrameGlow {
  0%, 100% { opacity: 0.28; }
  50%      { opacity: 0.60; }
}
.cefr-frame:hover {
  transform: translateY(-3px);
  border-color: rgba(163, 5, 166, 0.50);
  box-shadow:
    0 28px 56px -24px rgba(0, 1, 13, 0.95),
    0 0 36px rgba(163, 5, 166, 0.20),
    inset 0 0 28px rgba(102, 2, 115, 0.12);
}
.cefr-frame:hover::before { opacity: 0.80; }

.cefr-bar {
  position: relative;
  padding: 0 16px;
  /* The packet-rail below is a 100%-width proxy element whose own
     transformed bounding box swings a full track-width to the right (see
     its comment) — only the small dot inside it is meant to be visible.
     Clipping here (not on .cefr-track) keeps that oversized proxy box from
     ever contributing to page-level horizontal scroll/overflow, while
     .cefr-levels — a normal sibling that never exceeds this box — stays
     fully visible. */
  overflow: hidden;
}

/* Static resting line — same dim-purple family as the site-wide spine's
   .pcb-trace resting state, so the bar reads as part of the same circuit. */
.cefr-track {
  position: relative;
  height: 2px;
  border-radius: 2px;
  background: rgba(102, 2, 115, 0.5);
}

/* Percentage-of-parent translateX trick: the rail is 100% of the track's
   width, so animating its own transform by 0%→100% moves the dot (pinned at
   the rail's local x:0) the full width of the track — parent-relative
   travel via a pure `transform`, no JS measurement, no layout thrash. Its
   own bounding box swings a full track-width past the track at 100% (only
   the small dot inside it should render) — .cefr-bar clips that, see above. */
.cefr-packet-rail {
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  height: 0;
  transform: translate(0%, -50%);
  animation: cefrPacketRun 7s linear infinite;
}

.cefr-packet-dot {
  position: absolute;
  left: 0;
  top: 0;
  width: 12px;
  height: 12px;
  margin: -6px 0 0 -6px;
  border-radius: 50%;
  background: #A305A6;
  box-shadow: 0 0 9px 3px rgba(163, 5, 166, 0.8);
}

/* Travel (0–60%) → hold at C2, all levels lit (60–82%, ~1.5s of the 7s
   cycle) → fade out and silently snap back to the start while invisible
   (82–92%) → fade back in exactly at the loop point (92–100%/0%) so the
   restart never pops. */
@keyframes cefrPacketRun {
  0%    { transform: translate(0%,   -50%); opacity: 1; }
  60%   { transform: translate(100%, -50%); opacity: 1; }
  82%   { transform: translate(100%, -50%); opacity: 1; }
  84%   { transform: translate(100%, -50%); opacity: 0; }
  84.5% { transform: translate(0%,   -50%); opacity: 0; }
  92%   { transform: translate(0%,   -50%); opacity: 0; }
  100%  { transform: translate(0%,   -50%); opacity: 1; }
}

.cefr-levels {
  display: flex;
  justify-content: space-between;
  margin-top: 20px;
}

.cefr-level {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  opacity: 0.35; /* unlit resting state; the six keyframes below light each one in turn */
}

.cefr-level-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #A305A6;
  box-shadow: 0 0 8px 2px rgba(163, 5, 166, 0.7);
}

.cefr-level-label {
  font-family: var(--ff-body);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.03em;
  color: var(--c-text);
}

/* One literal @keyframes rule per level (same discipline as spine.js's
   addPulse — see its comment on why calc()/shared-keyframes silently break
   stroke/opacity interpolation). Each lights up at the moment the packet
   above reaches its position (0%, 12%, 24%, 36%, 48%, 60% of the 7s cycle —
   matching cefrPacketRun's own 0→60% travel window), stays lit through the
   82% hold, then fades out together with the packet at 82–84%. */
.cefr-level--1 { animation: cefrLit1 7s linear infinite; }
.cefr-level--2 { animation: cefrLit2 7s linear infinite; }
.cefr-level--3 { animation: cefrLit3 7s linear infinite; }
.cefr-level--4 { animation: cefrLit4 7s linear infinite; }
.cefr-level--5 { animation: cefrLit5 7s linear infinite; }
.cefr-level--6 { animation: cefrLit6 7s linear infinite; }

@keyframes cefrLit1 {
  0%   { opacity: 1; }
  82%  { opacity: 1; }
  84%  { opacity: 0.35; }
  100% { opacity: 0.35; }
}
@keyframes cefrLit2 {
  0%   { opacity: 0.35; }
  10%  { opacity: 0.35; }
  12%  { opacity: 1; }
  82%  { opacity: 1; }
  84%  { opacity: 0.35; }
  100% { opacity: 0.35; }
}
@keyframes cefrLit3 {
  0%   { opacity: 0.35; }
  22%  { opacity: 0.35; }
  24%  { opacity: 1; }
  82%  { opacity: 1; }
  84%  { opacity: 0.35; }
  100% { opacity: 0.35; }
}
@keyframes cefrLit4 {
  0%   { opacity: 0.35; }
  34%  { opacity: 0.35; }
  36%  { opacity: 1; }
  82%  { opacity: 1; }
  84%  { opacity: 0.35; }
  100% { opacity: 0.35; }
}
@keyframes cefrLit5 {
  0%   { opacity: 0.35; }
  46%  { opacity: 0.35; }
  48%  { opacity: 1; }
  82%  { opacity: 1; }
  84%  { opacity: 0.35; }
  100% { opacity: 0.35; }
}
@keyframes cefrLit6 {
  0%   { opacity: 0.35; }
  58%  { opacity: 0.35; }
  60%  { opacity: 1; }
  82%  { opacity: 1; }
  84%  { opacity: 0.35; }
  100% { opacity: 0.35; }
}

/* "Lock-in" pop — each level's dot gives a brief scale bump at the EXACT
   instant its own cefrLitN lights it (same cycle %s: 0, 12, 24, 36, 48, 60 of
   the 7s loop — the same 0→60% travel window cefrPacketRun uses). One literal
   @keyframes per level, each ramping up over that level's own 2% light-up
   window and peaking on its light %, so the pop is always locked to the light
   and the packet's arrival — same literal-per-level discipline as cefrLitN
   above (no shared/calc keyframes). Transform-only (paint-cheap) and on the
   child .cefr-level-dot, so it never fights the parent .cefr-level opacity
   sweep. Reads as each level "locking in" as the current reaches it. No new
   colours, no progress-fill. */
.cefr-level--1 .cefr-level-dot { animation: cefrPop1 7s linear infinite; }
.cefr-level--2 .cefr-level-dot { animation: cefrPop2 7s linear infinite; }
.cefr-level--3 .cefr-level-dot { animation: cefrPop3 7s linear infinite; }
.cefr-level--4 .cefr-level-dot { animation: cefrPop4 7s linear infinite; }
.cefr-level--5 .cefr-level-dot { animation: cefrPop5 7s linear infinite; }
.cefr-level--6 .cefr-level-dot { animation: cefrPop6 7s linear infinite; }

@keyframes cefrPop1 {
  0%   { transform: scale(1.45); } /* A1 lights at 0% (cefrLit1) */
  4%   { transform: scale(1); }
  100% { transform: scale(1); }
}
@keyframes cefrPop2 {
  0%, 10% { transform: scale(1); }
  12%     { transform: scale(1.45); } /* matches cefrLit2's 12% light-up */
  16%     { transform: scale(1); }
  100%    { transform: scale(1); }
}
@keyframes cefrPop3 {
  0%, 22% { transform: scale(1); }
  24%     { transform: scale(1.45); } /* matches cefrLit3's 24% */
  28%     { transform: scale(1); }
  100%    { transform: scale(1); }
}
@keyframes cefrPop4 {
  0%, 34% { transform: scale(1); }
  36%     { transform: scale(1.45); } /* matches cefrLit4's 36% */
  40%     { transform: scale(1); }
  100%    { transform: scale(1); }
}
@keyframes cefrPop5 {
  0%, 46% { transform: scale(1); }
  48%     { transform: scale(1.45); } /* matches cefrLit5's 48% */
  52%     { transform: scale(1); }
  100%    { transform: scale(1); }
}
@keyframes cefrPop6 {
  0%, 58% { transform: scale(1); }
  60%     { transform: scale(1.45); } /* matches cefrLit6's 60% (C2) */
  64%     { transform: scale(1); }
  100%    { transform: scale(1); }
}

.cefr-caption {
  margin-top: 2rem;
  text-align: center;
  font-family: var(--ff-body);
  font-size: 0.86rem;
  color: var(--c-muted);
}

@media (max-width: 1024px) {
  .cefr { padding: 6rem 0; }
}

@media (max-width: 768px) {
  .cefr { padding: 5rem 0; }
  .cefr-header { margin-bottom: 2.5rem; }
  .cefr-frame { padding: 2.3rem 2rem; }
}

@media (max-width: 767px) {
  /* Six levels must stay on one line and never wrap or overflow — shrink
     the label/dot/gap scale instead. */
  .cefr-frame { border-radius: 14px; }
  .cefr-level-label { font-size: 0.64rem; letter-spacing: 0.01em; }
  .cefr-level-dot { width: 8px; height: 8px; }
  .cefr-level { gap: 0.4rem; }
  .cefr-caption { font-size: 0.8rem; margin-top: 1.5rem; }
}

@media (max-width: 480px) {
  .cefr { padding: 4rem 0; }
  .cefr-header { margin-bottom: 2rem; }
  .cefr-frame { padding: 1.9rem 1.2rem; }
  .cefr-bar { padding: 0 12px; }
  .cefr-level-label { font-size: 0.58rem; }
}

@media (min-width: 1025px) {
  .cefr-header .section-headline { max-width: 700px; }
  .cefr-frame { max-width: 860px; padding: 3.3rem 3.5rem; }
  .cefr-level-label { font-size: 0.88rem; }
}

@media (prefers-reduced-motion: reduce) {
  /* Freeze on the final all-levels-lit state — still proves the point,
     no traveling packet. Matches the spine's own reduced-motion approach:
     freeze the moving element, keep the static structure fully visible. */
  .cefr-packet-rail { animation: none; opacity: 0; }
  .cefr-level--1, .cefr-level--2, .cefr-level--3,
  .cefr-level--4, .cefr-level--5, .cefr-level--6 {
    animation: none;
    opacity: 1;
  }
  /* New in this pass: the dot "lock-in" pops freeze at rest (scale 1) and the
     frame's breathing edge-glow freezes to a static lit ring — same freeze-the-
     motion, keep-the-structure approach as everything above. */
  .cefr-level-dot { animation: none; transform: none; }
  .cefr-frame::before { animation: none; opacity: 0.40; }
}

/* ── AI tools grid — Section 4's 2x2 card grid ─────────────
   The circuit continues from the CEFR frame's exit trace, branches to feed
   each of the four cards, then leaves its own exit trace for Section 5
   (spine.js). Each card reveals via a plain CSS opacity/transform
   transition (not GSAP) so it can be sequenced off the branch pulse's own
   `animationend` event — see spine.js's armToolsReveal(). Equal card height
   comes from the grid's own default row-stretch behavior (no hardcoded
   px height), so longer Greek copy grows the row instead of clipping. */
.tools {
  padding: 8rem 0;
  position: relative;
}

.tools-header {
  margin-bottom: 4rem;
}

.tools-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  max-width: 1000px;
  margin: 0 auto;
}

.tool-card {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.4s var(--ease-out), transform 0.4s var(--ease-out);
  display: flex;
  flex-direction: column;
  justify-content: center;   /* centers header+divider+preview as a group —
                                 leftover row height splits evenly above/below
                                 instead of opening a gap in the middle */
  position: relative;
  background: linear-gradient(180deg, rgba(45, 1, 64, 0.55) 0%, rgba(1, 3, 38, 0.60) 100%);
  border: 1px solid rgba(157, 91, 255, 0.22);
  border-top-color: rgba(199, 125, 255, 0.40); /* brighter top edge — catches "light" */
  border-radius: 16px;
  box-shadow: 0 22px 44px -22px rgba(163, 5, 166, 0.38),
              inset 0 1px 0 rgba(236, 232, 245, 0.05);
  padding: 2.2rem 2rem;
}
.tool-card--revealed {
  opacity: 1;
  transform: translateY(0);
  animation: toolCardArrive 0.65s var(--ease-out) 1;
}
/* One pulse brighter as the packet lands, then settle to the resting
   surface values above — CSS-cheap, single run per card. */
@keyframes toolCardArrive {
  0%   { border-color: rgba(157, 91, 255, 0.22); box-shadow: 0 22px 44px -22px rgba(163, 5, 166, 0.38), inset 0 1px 0 rgba(236, 232, 245, 0.05); }
  40%  { border-color: rgba(199, 125, 255, 0.65); box-shadow: 0 24px 56px -18px rgba(163, 5, 166, 0.65), 0 0 0 1px rgba(199, 125, 255, 0.35), inset 0 1px 0 rgba(236, 232, 245, 0.08); }
  100% { border-color: rgba(157, 91, 255, 0.26); box-shadow: 0 22px 44px -22px rgba(163, 5, 166, 0.40), inset 0 1px 0 rgba(236, 232, 245, 0.05); }
}

.tool-card-header {
  display: flex;
  flex-direction: column;
}

.tool-card-icon {
  width: 44px;
  height: 44px;
  padding: 10px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--c-violet-hi);
  background: linear-gradient(135deg, rgba(157, 91, 255, 0.18), rgba(163, 5, 166, 0.12));
  border: 1px solid rgba(157, 91, 255, 0.26);
  border-radius: 12px;
  margin-bottom: 1.2rem;
}
.tool-card-icon svg { width: 100%; height: 100%; stroke-width: 1.6; }

.tool-card-title {
  font-family: var(--ff-display);
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
  color: var(--c-text);
  margin-bottom: 0.5rem;
}

.tool-card-desc {
  font-family: var(--ff-body);
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--c-muted);
  margin-bottom: 1.1rem;
}

.tool-card-bullets {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.tool-card-bullets li {
  position: relative;
  padding-left: 1.1rem;
  font-family: var(--ff-body);
  font-size: 0.82rem;
  line-height: 1.5;
  color: var(--c-muted);
}
.tool-card-bullets li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.5em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--c-magenta);
}

/* Divider between the header block and the preview "output window" below —
   normal document-flow spacing, never pushed to the bottom of the card. */
.tool-card-divider {
  width: 100%;
  height: 1px;
  margin: 1.6rem 0 0;
  border: none;
  background: rgba(157, 91, 255, 0.16);
}

/* The output-window "family" every preview mock-up shares: same radius,
   same inner surface, same padding, so all four read as one system. */
.tool-preview {
  margin-top: 1.3rem;
  padding: 1.15rem 1.1rem 1rem;
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(1, 3, 38, 0.55), rgba(0, 1, 13, 0.35));
  border: 1px solid rgba(157, 91, 255, 0.14);
}

/* Shared chip language — every preview's pills/badges are the same rounded,
   bordered, tinted "chip" so the four output windows read as one family. */
.tp-pill,
.tp-badge {
  font-family: var(--ff-body);
  font-size: 0.68rem;
  font-weight: 600;
  padding: 0.32rem 0.65rem;
  border-radius: 20px;
  background: rgba(157, 91, 255, 0.14);
  border: 1px solid rgba(199, 125, 255, 0.3);
  color: var(--c-text);
  white-space: nowrap;
}

/* Preview 1 — Lesson Plan Builder: a "plan strip" (topic/level/duration) + phase pills */
.tp-plan-meta {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--ff-body);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--c-violet-hi);
  margin-bottom: 0.9rem;
}
.tp-dot { color: var(--c-muted); }
.tp-plan-pills {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
}
.tp-arrow { color: var(--c-muted); font-size: 0.7rem; }
/* Each arrow travels with the stage it points to, so a wrapped row starts
   with "→ Stage" and no line ever ends on a bare arrow. */
.tp-step {
  display: inline-flex;
  align-items: center;
  gap: inherit;
  white-space: nowrap;
}

/* Preview 2 — Writing Feedback: score chip + 4-bar rubric mini-chart */
.tp-score-chip {
  display: flex;
  align-items: baseline;
  gap: 0.3rem;
  margin-bottom: 1.1rem;
}
.tp-score-num {
  font-family: var(--ff-display);
  font-weight: 900;
  font-size: 2rem;
  background: linear-gradient(135deg, var(--c-violet-hi), var(--c-magenta));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.tp-score-den { font-family: var(--ff-body); font-size: 0.9rem; color: var(--c-muted); }
.tp-score-sep { color: var(--c-muted); }
.tp-score-band { font-family: var(--ff-body); font-size: 0.9rem; font-weight: 700; color: var(--c-violet-hi); }
/* Chart frame — a baseline under the bars so they read as a rubric readout,
   not four disconnected blocks. */
.tp-rubric {
  display: flex;
  align-items: flex-end;
  gap: 0.55rem;
  height: 58px;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(157, 91, 255, 0.22);
}
.tp-rubric-bar {
  flex: 1;
  border-radius: 3px 3px 0 0;
  background: linear-gradient(180deg, var(--c-violet-hi), var(--c-magenta));
  opacity: 0.88;
}
/* SAMPLE-SYNC: update with the new WF sample. One bar per app criterion,
   each /5, summing to the chip's 9/20: Grammar & Vocabulary 3,
   Organisation 2, Task Achievement 2, Register 2. */
.tp-rubric-bar:nth-child(1) { height: 60%; }
.tp-rubric-bar:nth-child(2) { height: 40%; }
.tp-rubric-bar:nth-child(3) { height: 40%; }
.tp-rubric-bar:nth-child(4) { height: 40%; }

/* Preview 3 — Text Level Adaptor: level-shift chip + before/after text hint */
.tp-level-chip {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--ff-body);
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--c-text);
  margin-bottom: 1rem;
}
.tp-level-arrow { color: var(--c-muted); }
.tp-level-chip-end {
  padding: 0.18rem 0.55rem;
  border-radius: 20px;
  font-weight: 700;
  background: linear-gradient(135deg, var(--c-violet-hi), var(--c-magenta));
  color: var(--c-base);
}
.tp-level-textdiff {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.tp-level-before,
.tp-level-after {
  font-family: var(--ff-body);
  font-size: 0.78rem;
  line-height: 1.45;
  padding: 0.45rem 0.65rem;
  border-radius: 8px;
}
.tp-level-before {
  color: var(--c-muted);
  background: rgba(236, 232, 245, 0.04);
  text-decoration: line-through;
  text-decoration-color: rgba(138, 133, 160, 0.5);
}
.tp-level-after { color: var(--c-text); background: rgba(157, 91, 255, 0.10); }

/* Preview 4 — Speaking Booster: activity chip + Student A/B role badges */
.tp-speak-chip {
  display: inline-block;
  font-family: var(--ff-body);
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--c-violet-hi);
  margin-bottom: 1rem;
}
.tp-speak-badges {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}
.tp-badge--a { background: rgba(157, 91, 255, 0.14); }
.tp-badge--b { background: rgba(163, 5, 166, 0.14); border-color: rgba(163, 5, 166, 0.4); }

/* Exercise / Library preview chips — mirror .tp-speak-chip (same font,
   weight, size, tracking, uppercase, violet). No margin-bottom: the chip is
   the preview's only child, so nothing follows it. Reuses existing palette. */
.tp-exercise-chip,
.tp-library-chip {
  display: inline-block;
  font-family: var(--ff-body);
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--c-violet-hi);
}

@media (max-width: 1024px) {
  .tools { padding: 6rem 0; }
}

@media (max-width: 768px) {
  .tools { padding: 5rem 0; }
  .tools-header { margin-bottom: 2.5rem; }
  .tools-grid { gap: 1.5rem; }
}

@media (max-width: 767px) {
  /* Single column — the circuit becomes one straight vertical trace feeding
     each stacked card in turn (spine.js), no branching. */
  .tools-grid { grid-template-columns: 1fr; }
  .tool-card { padding: 1.8rem 1.7rem; border-radius: 14px; }
}

@media (max-width: 480px) {
  .tools { padding: 4rem 0; }
  .tools-header { margin-bottom: 2rem; }
  .tool-card { padding: 1.6rem 1.4rem; }
  .tool-preview { padding: 1rem 0.9rem 0.85rem; }
  .tp-plan-pills { gap: 0.3rem; }
  .tp-pill, .tp-badge { font-size: 0.62rem; padding: 0.26rem 0.5rem; }
}

@media (min-width: 1025px) {
  .tools-header .section-headline { max-width: 760px; }
  .tools-grid { max-width: 1080px; gap: 2.5rem; }
  .tool-card { padding: 2.6rem 2.4rem; }
}

@media (prefers-reduced-motion: reduce) {
  /* Cards appear static from the start — no rise, no transition, no glow
     pulse. Traces and vias (drawn by spine.js) stay fully visible either way. */
  .tool-card { opacity: 1; transform: none; transition: none; }
  .tool-card--revealed { animation: none; }
}

/* ── The Loop — Section 5, the site's signature section ────
   A single real generation flowing left→right: four small equal-weight
   "station" nodes (Input/CEFR/Structure/Generate) sitting ON the circuit
   line, then the OUTPUT panel — deliberately much heavier — as the climax.
   spine.js sequences the five arrivals off the same one-shot pulse + via
   system as Section 4 (fireJourneyReveal); this file only owns the static
   look of each state. Ambient flow keeps running after the cascade via the
   same addPulse()/pcb-via--live mechanics reused from Section 4. */
.journey {
  padding: 10rem 0;
  position: relative;
}

/* This is the site's signature moment, deliberately wider than the standard
   1200px .container used elsewhere — at the generous sizes below (152px
   stations + big gaps + a 480-560px OUTPUT), the true side-by-side desktop
   layout needs more like ~1130px of pure content width, which doesn't
   survive the standard container's 1200px cap once its own 2.5rem side
   padding is subtracted. Widening just this section's container is what
   lets "five across" actually happen at real desktop widths instead of
   .journey-body's flex-wrap silently forcing the stacked layout everywhere. */
.journey .container { max-width: 1520px; }

.journey-header {
  margin-bottom: 3.5rem;
}

/* This section's headline reveals word-by-word via its own .hw children
   (main.js), not as one block like every other .section-headline — so the
   wrapper itself must not sit at the shared rule's opacity:0, or the words'
   opacity:1 would still multiply out to invisible under an opacity:0 parent. */
.journey .section-headline { opacity: 1; }

.journey-sub {
  opacity: 0;
  font-family: var(--ff-body);
  font-size: clamp(0.95rem, 1.2vw, 1.05rem);
  line-height: 1.7;
  color: var(--c-muted);
  max-width: 54ch;
  text-align: center;
  margin: 1.1rem auto 0;
}

/* The journey's two halves — the stations and OUTPUT — as two independent
   blocks, not five flat siblings. Centering two blocks against each other is
   fine (OUTPUT is meant to be visually heavier); centering five items of
   wildly different heights in one shared row is what caused the original
   layout to misbalance (dead space above/below the short stations, journey
   reading as pinned low-right) and, worse, let flexbox center each station
   *individually* against OUTPUT's own great height — so different-content
   stations (Input has a chip, the rest don't) ended up with their icons at
   different Y positions, which is exactly what put the circuit line through
   station labels instead of clear of them. Wrapping the four stations in
   their own row (.journey-stages, below) fixes that at the source: every
   station now shares an identical internal structure, so all four icons —
   and the line drawn through them — land on the exact same Y regardless of
   what's rendered elsewhere in the section. flex-wrap here (not a fixed
   pixel breakpoint) is also what lets OUTPUT drop to its own row the moment
   there genuinely isn't room, rather than the two squeezing into
   overlapping text at in-between window widths nobody explicitly tested. */
.journey-body {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  column-gap: 4.5rem;
  row-gap: 4rem;
  max-width: 1400px;
  margin: 0 auto;
}

/* ── Stations (Input / CEFR / Structure / Generate) — small, equal weight,
   arrive in sequence as the packet reaches each one. flex: 0 0 auto so this
   whole row reports its true (never-shrunk) minimum width to .journey-body's
   flex-wrap above — the real trigger for dropping OUTPUT to its own row. */
.journey-stages {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 2.75rem;
  flex: 0 0 auto;
}

.journey-stage {
  opacity: 0;
  transform: translateY(14px) scale(0.94);
  transition: opacity 0.4s var(--ease-out), transform 0.4s var(--ease-out);
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 152px;
  flex-shrink: 0;
  text-align: center;
}
.journey-stage--arrived { opacity: 1; transform: translateY(0) scale(1); }

/* Reserved slot above every station's icon — identical height whether or
   not that station actually holds a chip (only Input's does; the rest sit
   empty). This is what guarantees every icon centers on the exact same Y —
   see the .journey-body comment above — and it doubles as the clear gap
   between the circuit line and anything above it. */
.journey-stage-chip-slot {
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.journey-stage-icon {
  width: 64px;
  height: 64px;
  padding: 15px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--c-violet-hi);
  background: linear-gradient(135deg, rgba(157, 91, 255, 0.18), rgba(163, 5, 166, 0.12));
  border: 1px solid rgba(157, 91, 255, 0.26);
  border-radius: 16px;
  /* Clear gap below, matching the reserved slot above — the circuit line
     lands at this icon's own vertical center, comfortably clear of the
     label under it. */
  margin-bottom: 1.5rem;
}
.journey-stage-icon svg { width: 100%; height: 100%; stroke-width: 1.6; }

.journey-stage-label {
  font-family: var(--ff-body);
  font-weight: 600;
  font-size: 0.94rem;
  letter-spacing: 0.01em;
  color: var(--c-text);
  white-space: nowrap;
}

.journey-stage-chip {
  font-family: var(--ff-body);
  font-size: 0.74rem;
  font-weight: 600;
  padding: 0.36rem 0.75rem;
  border-radius: 20px;
  background: rgba(157, 91, 255, 0.14);
  border: 1px solid rgba(199, 125, 255, 0.3);
  color: var(--c-text);
  white-space: nowrap;
}

/* ── Tool-neutral request chip (tool-cycle.js) ────────────────────────
   Shared by the homepage Input chip and the how-it-works hero token. All
   labels sit in ONE grid cell, so the cell (and the chip around it) is
   always exactly as wide as the longest label: the crossfade never moves
   anything. Only opacity animates (CSS transition); tool-cycle.js just
   moves .is-active every 2.5s. The swap is sequential, never a crossfade:
   the outgoing label fades out over 0.3s with no delay, and the incoming
   label's fade-in is delayed 0.35s, so it only starts once the old one is
   fully gone. Two labels are never visible at the same time. The static
   "Any tool · Any level" label is the screen-reader text and the
   reduced-motion state. */
.tool-cycle {
  display: inline-grid;
  vertical-align: middle;
}
.tool-cycle > span {
  grid-area: 1 / 1;
  justify-self: center;
  white-space: nowrap;
  opacity: 0;
}
.tool-cycle-item { transition: opacity 0.3s ease-in; }
.tool-cycle-item.is-active {
  opacity: 1;
  transition: opacity 0.3s var(--ease-out) 0.35s;
}
@media (prefers-reduced-motion: reduce) {
  .tool-cycle-item { display: none; }
  .tool-cycle > .tool-cycle-any { opacity: 1; }
}

/* ── OUTPUT — the climax. Same surface language as Section 4's cards
   (gradient fill, brighter top edge, magenta outer glow), scaled up well
   past any individual station — this is the panel the whole section builds
   toward, so it needs to visibly outweigh them. */
.journey-output {
  opacity: 0;
  transform: translateY(22px) scale(0.97);
  transition: opacity 0.5s var(--ease-out), transform 0.5s var(--ease-out);
  flex: 1 1 480px;
  max-width: 560px;
  min-width: 320px;
  position: relative;
  background: linear-gradient(180deg, rgba(45, 1, 64, 0.55) 0%, rgba(1, 3, 38, 0.60) 100%);
  border: 1px solid rgba(157, 91, 255, 0.22);
  border-top-color: rgba(199, 125, 255, 0.45);
  border-radius: 20px;
  box-shadow: 0 32px 72px -22px rgba(163, 5, 166, 0.42),
              inset 0 1px 0 rgba(236, 232, 245, 0.05);
  padding: 2.2rem 2.2rem 2rem;
}
.journey-output--arrived {
  opacity: 1;
  transform: translateY(0) scale(1);
  animation: journeyOutputArrive 0.7s var(--ease-out) 1;
}
@keyframes journeyOutputArrive {
  0%   { border-color: rgba(157, 91, 255, 0.22); box-shadow: 0 32px 72px -22px rgba(163, 5, 166, 0.42), inset 0 1px 0 rgba(236, 232, 245, 0.05); }
  40%  { border-color: rgba(199, 125, 255, 0.68); box-shadow: 0 34px 80px -18px rgba(163, 5, 166, 0.68), 0 0 0 1px rgba(199, 125, 255, 0.35), inset 0 1px 0 rgba(236, 232, 245, 0.08); }
  100% { border-color: rgba(157, 91, 255, 0.26); box-shadow: 0 32px 72px -22px rgba(163, 5, 166, 0.44), inset 0 1px 0 rgba(236, 232, 245, 0.05); }
}

.journey-output-head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.1rem;
}
.journey-output-icon {
  width: 42px;
  height: 42px;
  padding: 9px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--c-violet-hi);
  background: linear-gradient(135deg, rgba(157, 91, 255, 0.18), rgba(163, 5, 166, 0.12));
  border: 1px solid rgba(157, 91, 255, 0.26);
  border-radius: 12px;
}
.journey-output-icon svg { width: 100%; height: 100%; stroke-width: 1.6; }
.journey-output-label {
  font-family: var(--ff-body);
  font-weight: 700;
  font-size: 0.74rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--c-violet-hi);
}

.journey-output-title {
  font-family: var(--ff-display);
  font-weight: 800;
  font-size: 1.4rem;
  letter-spacing: -0.01em;
  color: var(--c-text);
  margin-bottom: 1.1rem;
}

/* Plan rows — "material being written" one-by-one. Stylised hints (a short
   label + a decorative content-hint bar), not fabricated lesson text. All
   five build in via one class toggle on the panel (.journey-output--arrived)
   plus a plain per-row transition-delay stagger below — no JS scheduling
   needed for this part at all. */
.journey-plan {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1.3rem;
}
.journey-plan-row {
  opacity: 0;
  transform: translateX(-10px);
  transition: opacity 0.4s var(--ease-out), transform 0.4s var(--ease-out);
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-family: var(--ff-body);
  font-size: 0.88rem;
  color: var(--c-text);
  padding: 0.55rem 0.8rem;
  border-radius: 9px;
  background: rgba(1, 3, 38, 0.4);
  border: 1px solid rgba(157, 91, 255, 0.10);
}
.journey-plan-row::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--c-magenta);
  flex-shrink: 0;
}
/* Row labels stay on one line (the tool-neutral labels, e.g. "Editable
   before download", are longer than the old lesson-stage names); the
   decorative bar beside them shrinks instead (min-width 24px below), so
   every row keeps its single-line height at every width. */
.journey-plan-row > span:first-child { white-space: nowrap; }
.journey-plan-row-fill {
  margin-left: auto;
  height: 7px;
  min-width: 24px;
  max-width: 220px;
  border-radius: 3px;
  background: linear-gradient(90deg, rgba(157, 91, 255, 0.35), rgba(163, 5, 166, 0.2));
}
.journey-plan-row:nth-child(1) .journey-plan-row-fill { width: 36%; }
.journey-plan-row:nth-child(2) .journey-plan-row-fill { width: 52%; }
.journey-plan-row:nth-child(3) .journey-plan-row-fill { width: 64%; }
.journey-plan-row:nth-child(4) .journey-plan-row-fill { width: 44%; }
.journey-plan-row:nth-child(5) .journey-plan-row-fill { width: 32%; }

.journey-output--arrived .journey-plan-row {
  opacity: 1;
  transform: translateX(0);
}
.journey-output--arrived .journey-plan-row:nth-child(1) { transition-delay: 0.16s; }
.journey-output--arrived .journey-plan-row:nth-child(2) { transition-delay: 0.28s; }
.journey-output--arrived .journey-plan-row:nth-child(3) { transition-delay: 0.40s; }
.journey-output--arrived .journey-plan-row:nth-child(4) { transition-delay: 0.52s; }
.journey-output--arrived .journey-plan-row:nth-child(5) { transition-delay: 0.64s; }

.journey-output-badges {
  display: flex;
  gap: 0.7rem;
  flex-wrap: wrap;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.4s var(--ease-out), transform 0.4s var(--ease-out);
}
.journey-output-badges .tp-badge {
  font-size: 0.8rem;
  padding: 0.42rem 0.85rem;
}
.journey-output--arrived .journey-output-badges {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.78s;
}

/* ── Below ~1150-1250px of real content width (see .journey-body's own
   comment — this isn't a fixed breakpoint match, flex-wrap decides it), the
   four stations stay in a row and OUTPUT wraps to a full-width row beneath
   them instead of squeezing. spine.js detects this itself by comparing
   OUTPUT's measured position to the stations' — see layoutJourneyHorizontal's
   isStacked. These tablet-range rules just tune spacing for that state. */
@media (max-width: 1024px) {
  .journey { padding: 9rem 0; }
  /* flex-basis: 100% forces OUTPUT to actually fill its wrapped row (rather
     than sizing to its normal 480px-ish basis and leaving dead space beside
     it) whenever .journey-body's own flex-wrap has genuinely dropped it to
     its own line — which in practice is this whole range and below. */
  .journey-output { flex-basis: 100%; max-width: 680px; }
}

@media (max-width: 768px) {
  .journey { padding: 7rem 0; }
  .journey-header { margin-bottom: 4rem; }
}

/* ── Mobile (≤767): one vertical sequence, OUTPUT heaviest at the bottom.
   Each station becomes icon-left / text-right via CSS grid so the chip (only
   Input has one) sits cleanly above its label without needing the desktop
   reserved-slot trick — on a vertical trace that trick isn't needed, since
   station order down the page is set by DOM order, not a shared Y. */
@media (max-width: 767px) {
  .journey { padding: 6rem 0; }
  .journey-body { flex-direction: column; align-items: stretch; gap: 2.5rem; }
  .journey-stages { flex-direction: column; align-items: stretch; gap: 1.75rem; }
  .journey-stage {
    display: grid;
    grid-template-columns: 60px 1fr;
    grid-template-rows: auto auto;
    column-gap: 1.1rem;
    row-gap: 0.35rem;
    width: 100%;
    text-align: left;
  }
  .journey-stage-chip-slot {
    grid-column: 2;
    grid-row: 1;
    height: auto;
    margin-bottom: 0;
    justify-content: flex-start;
  }
  .journey-stage-chip { white-space: normal; }
  .journey-stage-icon {
    grid-column: 1;
    grid-row: 1 / span 2;
    width: 60px;
    height: 60px;
    margin-bottom: 0;
  }
  .journey-stage-label { grid-column: 2; grid-row: 2; }
  .journey-output { flex-basis: auto; max-width: 100%; min-width: 0; }
}

@media (max-width: 480px) {
  .journey { padding: 5rem 0; }
  .journey-header { margin-bottom: 3rem; }
  .journey-output { padding: 1.8rem 1.5rem 1.6rem; }
  .journey-output-title { font-size: 1.3rem; }
  .journey-plan-row { font-size: 0.82rem; padding: 0.55rem 0.7rem; }
}

@media (prefers-reduced-motion: reduce) {
  /* Every stage, the OUTPUT panel, its plan rows and badges render already
     arrived — no rise, no stagger, no glow pulse. Traces/vias stay visible
     either way (spine.js's own reduced-motion branch). */
  .journey-stage,
  .journey-output,
  .journey-plan-row,
  .journey-output-badges {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .journey-output--arrived { animation: none; }
  .journey-output--arrived .journey-plan-row,
  .journey-output--arrived .journey-output-badges {
    transition-delay: 0s;
  }
}

/* ── Get your Sundays back (Section 6) ─────────────────────
   A deliberate change of rhythm from every section above it: one calm,
   centered framed panel instead of a circuit running through cards. The PCB
   spine (spine.js's layoutSundaysFrame) only touches the frame's own top
   edge with a single feed trace + via; nothing here is wired to it beyond
   that. Everything else — the running border, the count-up, the slider — is
   plain CSS/JS local to this section (see sundays.js), no per-frame cost. */
.sundays {
  padding: 9rem 0;
  position: relative;
}

/* Static — never carries its own reveal transform (only the content inside
   it does), so spine.js can measure it with a plain rectDoc() and so the
   panel itself is always present the instant the section is in view; only
   the words/stats inside build in. */
.sundays-frame {
  position: relative;
  isolation: isolate;
  max-width: 980px;
  margin: 0 auto;
  border-radius: 32px;
  background: linear-gradient(160deg, rgba(45, 1, 64, 0.55) 0%, rgba(1, 3, 38, 0.72) 100%);
  border: 1px solid rgba(157, 91, 255, 0.22);
  border-top-color: rgba(199, 125, 255, 0.4); /* top-edge catch-light, same trick as .journey-output */
  box-shadow: 0 48px 120px -32px rgba(163, 5, 166, 0.4), inset 0 1px 0 rgba(236, 232, 245, 0.07);
}

/* The slow "powered frame" running border — a conic-gradient ring, masked
   down to just its own edge via mask-composite: exclude, animated purely by
   rotating the --sundays-angle custom property (see @property below). Pure
   CSS, no JS, no per-frame cost — the browser compositor drives this exactly
   like any other CSS animation. Without @property support the gradient
   simply renders at its static initial angle instead of animating — a
   harmless degrade, not a broken one. */
.sundays-border {
  position: absolute;
  inset: 0;
  z-index: 2;
  border-radius: inherit;
  padding: 1.5px;
  background: conic-gradient(from var(--sundays-angle, 0deg),
    transparent 0deg,
    rgba(199, 125, 255, 0.85) 40deg,
    rgba(163, 5, 166, 0.85) 90deg,
    transparent 150deg,
    transparent 360deg);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  animation: sundaysBorderRun 9s linear infinite;
}
@property --sundays-angle {
  syntax: '<angle>';
  inherits: false;
  initial-value: 0deg;
}
@keyframes sundaysBorderRun {
  to { --sundays-angle: 360deg; }
}

.sundays-content {
  position: relative;
  z-index: 3;
  padding: 4.5rem 5rem;
  text-align: center;
}

/* Shared hidden-until-entrance state for every reveal group except the
   headline (which uses the site's own global .hw word-span technique) —
   sundays.js's playEntrance()/setFinalState() bring these in. */
.sundays-reveal { opacity: 0; }

.sundays-eyebrow {
  font-family: var(--ff-body);
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--c-muted);
  margin-bottom: 1.1rem;
}

.sundays-headline {
  opacity: 1; /* own .hw children carry the reveal, same convention as .journey .section-headline */
  font-family: var(--ff-display);
  font-weight: 900;
  font-size: clamp(2.1rem, 3.6vw, 3.5rem);
  line-height: 1.14;
  letter-spacing: -0.02em;
  color: var(--c-text);
  margin-bottom: 1.4rem;
}

.sundays-lead {
  font-family: var(--ff-body);
  font-size: clamp(1rem, 1.2vw, 1.1rem);
  line-height: 1.7;
  color: var(--c-muted);
  max-width: 48ch;
  margin: 0 auto 3rem;
}

.sundays-contrast {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 3rem;
}

.sundays-contrast-before,
.sundays-contrast-after {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}

.sundays-contrast-value {
  font-family: var(--ff-display);
  font-weight: 800;
  font-size: clamp(1.5rem, 2.4vw, 2rem);
  color: var(--c-muted);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.sundays-contrast-before .sundays-contrast-value {
  text-decoration: line-through;
  text-decoration-color: rgba(138, 133, 160, 0.55);
  opacity: 0.65;
}

.sundays-contrast-value--grad {
  font-size: clamp(2.6rem, 5vw, 4rem);
  background: linear-gradient(135deg, var(--c-violet-hi), var(--c-magenta));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  opacity: 1;
}

.sundays-contrast-label {
  font-family: var(--ff-body);
  font-size: 0.82rem;
  color: var(--c-muted);
  max-width: 22ch;
}

.sundays-contrast-arrow {
  color: var(--c-violet);
  width: 26px;
  height: 26px;
  flex-shrink: 0;
}
.sundays-contrast-arrow svg { width: 100%; height: 100%; }

.sundays-slider-block {
  max-width: 480px;
  margin: 0 auto 3rem;
}

/* A quiet research-context caption that frames the slider: a fixed general
   average (7.5 h/week), deliberately smaller and dimmer than the live readout
   so it reads as background fact, not a competing calculation. Same palette
   tokens, no new colour. Inherits the slider block's reveal/opacity. */
.sundays-slider-research {
  font-family: var(--ff-body);
  font-size: 0.8rem;
  line-height: 1.55;
  color: var(--c-muted);
  opacity: 0.68;
  margin-bottom: 1.3rem;
}

.sundays-slider-question {
  display: block;
  font-family: var(--ff-body);
  font-weight: 600;
  font-size: 0.96rem;
  color: var(--c-text);
  margin-bottom: 1.1rem;
}

.sundays-slider-row {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Filled-track trick: --sundays-fill is a plain CSS custom property, updated
   once per drag event by sundays.js (not per frame) — the gradient stop
   position is the only thing that moves. */
.sundays-slider {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 6px;
  border-radius: 3px;
  background: linear-gradient(to right,
    var(--c-violet-hi) 0%, var(--c-magenta) var(--sundays-fill, 20%),
    rgba(157, 91, 255, 0.16) var(--sundays-fill, 20%), rgba(157, 91, 255, 0.16) 100%);
  outline: none;
  cursor: pointer;
}
.sundays-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--c-violet-hi), var(--c-magenta));
  box-shadow: 0 0 12px rgba(163, 5, 166, 0.6);
  border: 2px solid rgba(236, 232, 245, 0.85);
  cursor: pointer;
}
.sundays-slider::-moz-range-track {
  height: 6px;
  border-radius: 3px;
  background: rgba(157, 91, 255, 0.16);
}
.sundays-slider::-moz-range-progress {
  height: 6px;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--c-violet-hi), var(--c-magenta));
}
.sundays-slider::-moz-range-thumb {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--c-violet-hi), var(--c-magenta));
  box-shadow: 0 0 12px rgba(163, 5, 166, 0.6);
  border: 2px solid rgba(236, 232, 245, 0.85);
  cursor: pointer;
}

.sundays-slider-value {
  font-family: var(--ff-display);
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--c-text);
  min-width: 2.2ch;
  text-align: right;
}

.sundays-slider-result {
  margin-top: 1.2rem;
  font-family: var(--ff-body);
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--c-muted);
}
.sundays-slider-result strong {
  font-family: var(--ff-display);
  font-weight: 800;
  color: var(--c-violet-hi);
}

/* A quiet sign-off under the live readout — smaller and dimmer than it, a
   soft brand beat, not another stat. Same palette tokens, no new colour. */
.sundays-slider-closing {
  margin-top: 0.55rem;
  font-family: var(--ff-body);
  font-size: 0.82rem;
  line-height: 1.55;
  color: var(--c-muted);
  opacity: 0.72;
}

.sundays-ctas {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.4rem;
  flex-wrap: wrap;
}

.btn--lg {
  padding: 0.85rem 2.2rem;
  font-size: 0.92rem;
}

.sundays-cta-secondary {
  font-family: var(--ff-body);
  font-size: 0.86rem;
  font-weight: 500;
  color: var(--c-muted);
  border-bottom: 1px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}
.sundays-cta-secondary:hover {
  color: var(--c-text);
  border-bottom-color: var(--c-line);
}

@media (max-width: 1024px) {
  .sundays { padding: 7rem 0; }
  .sundays-content { padding: 3.6rem 3rem; }
}

@media (max-width: 767px) {
  .sundays { padding: 5rem 0; }
  .sundays-frame { border-radius: 24px; }
  .sundays-content { padding: 2.6rem 1.6rem; }
  .sundays-contrast { flex-direction: column; gap: 1.3rem; margin-bottom: 2.5rem; }
  .sundays-contrast-arrow { transform: rotate(90deg); }
  /* Greek unit ("λεπτά/εβδομάδα") is far wider than "mins/week": on one
     line the value was ~420px in a 200-360px column and spilled out of the
     section. The number keeps its size; the unit drops below it, smaller. */
  html[lang="el"] .sundays-contrast-value--grad {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    line-height: 1.05;
  }
  html[lang="el"] .sundays-contrast-value--grad [data-i18n="sundays.after.unit"] { font-size: 0.5em; }
  .sundays-ctas { flex-direction: column; align-items: stretch; gap: 1rem; }
  .sundays-ctas .btn { width: 100%; }
  .sundays-cta-secondary { text-align: center; }
}

@media (max-width: 480px) {
  .sundays-content { padding: 2.2rem 1.2rem; }
  .sundays-headline { font-size: clamp(1.7rem, 7vw, 2.2rem); }
  .sundays-lead { margin-bottom: 2.2rem; }
}

@media (prefers-reduced-motion: reduce) {
  .sundays-border { animation: none; }
  .sundays-reveal,
  .sundays-headline .hw {
    opacity: 1;
    transform: none;
  }
}

/* ── FAQ (Section 7) ────────────────────────────────────────
   Calm, trust-building close before the footer. The orb grows to its
   largest scale on the page directly behind the stack (see main.js's
   ORB_JOURNEY '#faq' entry) — still painted below both the PCB spine and
   this section's own cards (.pcb-spine's negative z-index, unchanged), so
   it reads as atmosphere behind the questions, never competing with them. */
.faq {
  padding: 9rem 0;
  position: relative;
}

.faq-header {
  margin-bottom: 4rem;
}

.faq-sub {
  opacity: 0;
  font-family: var(--ff-body);
  font-size: clamp(1rem, 1.2vw, 1.05rem);
  line-height: 1.6;
  color: var(--c-muted);
  text-align: center;
  max-width: 46ch;
  margin: 1rem auto 0;
}

.faq-stack {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  max-width: 760px;
  margin: 0 auto;
}

.faq-item {
  opacity: 0;
  border-radius: 20px;
  background: linear-gradient(160deg, rgba(45, 1, 64, 0.5) 0%, rgba(1, 3, 38, 0.65) 100%);
  border: 1px solid rgba(157, 91, 255, 0.20);
  transition: border-color 0.35s var(--ease-out), box-shadow 0.35s var(--ease-out);
}
/* Open card visually lifted — brighter border + soft magenta glow, same
   surface language as .tool-card / .sundays-frame's own top-edge catch-light
   and glow, just applied per-card here instead of once for the whole panel. */
.faq-item--open {
  border-color: rgba(199, 125, 255, 0.55);
  box-shadow: 0 24px 56px -22px rgba(163, 5, 166, 0.5), inset 0 1px 0 rgba(236, 232, 245, 0.08);
}

.faq-item-q { margin: 0; }

.faq-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.5rem 1.8rem;
  text-align: left;
  border-radius: 20px;
}
.faq-toggle:focus-visible {
  outline: 2px solid var(--c-violet-hi);
  outline-offset: -2px;
}

.faq-toggle-text {
  font-family: var(--ff-display);
  font-weight: 700;
  font-size: clamp(1rem, 1.3vw, 1.15rem);
  letter-spacing: -0.01em;
  color: var(--c-text);
}

/* +/x toggle — a plus built from two pseudo-element bars; rotating the
   whole thing 45deg on open turns the plus into an x, no separate icon or
   crossfade needed. */
.faq-toggle-icon {
  position: relative;
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid rgba(157, 91, 255, 0.35);
  background: rgba(157, 91, 255, 0.08);
  transition: transform 0.35s var(--ease-out), border-color 0.35s var(--ease-out), background 0.35s var(--ease-out);
}
.faq-toggle-icon::before,
.faq-toggle-icon::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  background: var(--c-violet-hi);
  transform: translate(-50%, -50%);
}
.faq-toggle-icon::before { width: 10px; height: 1.5px; }
.faq-toggle-icon::after  { width: 1.5px; height: 10px; }
.faq-item--open .faq-toggle-icon {
  transform: rotate(45deg);
  border-color: rgba(199, 125, 255, 0.6);
  background: rgba(163, 5, 166, 0.18);
}

/* The height animation itself — grid-template-rows 0fr -> 1fr. This is what
   makes the slide-open exact for any answer length (EL runs longer than EN)
   without ever measuring anything in JS: the grid track just resolves to
   the content's own intrinsic height. faq.js only ever toggles the
   .faq-item--open class; it never touches height/max-height directly. */
.faq-answer {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.45s var(--ease-out);
}
.faq-item--open .faq-answer {
  grid-template-rows: 1fr;
}
.faq-answer-inner {
  overflow: hidden;
}
.faq-answer-inner p {
  font-family: var(--ff-body);
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--c-muted);
  padding: 0 1.8rem 1.6rem;
  max-width: 60ch;
}

@media (max-width: 1024px) {
  .faq { padding: 7rem 0; }
}

@media (max-width: 767px) {
  .faq { padding: 5rem 0; }
  .faq-header { margin-bottom: 2.5rem; }
  .faq-stack { gap: 0.9rem; }
  .faq-toggle { padding: 1.2rem 1.3rem; gap: 1rem; }
  .faq-answer-inner p { padding: 0 1.3rem 1.4rem; font-size: 0.9rem; }
}

@media (max-width: 480px) {
  .faq-toggle-icon { width: 24px; height: 24px; }
  .faq-toggle-text { font-size: 0.96rem; }
}

@media (prefers-reduced-motion: reduce) {
  /* Accordion still opens/closes (faq.js's class toggle is unconditional),
     just instantly — no height slide, no icon rotation. */
  .faq-answer,
  .faq-toggle-icon {
    transition: none;
  }
  .faq-sub,
  .faq-item {
    opacity: 1;
    transform: none;
  }
}

/* ── Manifesto (Section 8) ───────────────────────────────────
   The page's climax: one large, quiet, full-bleed statement, then the CTA
   — and the moment the page-wide PCB spine finally closes its loop (see
   spine.js's layoutManifestoClose). The orb settles to its calmest,
   most-resolved state directly behind the statement (main.js's
   '#manifesto' ORB_JOURNEY entry) — same behind-content atmosphere role as
   every prior section (.pcb-spine's negative z-index, unchanged), so it
   never competes with the text. */
.manifesto {
  position: relative;
  min-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 11rem 0 13rem;
  text-align: center;
}

.manifesto-inner {
  max-width: 1040px;
  margin: 0 auto;
}

.manifesto-line {
  font-family: var(--ff-display);
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.28;
  font-size: clamp(1.9rem, 4.4vw, 3.4rem);
}
.manifesto-line--1 {
  color: var(--c-text);
  margin-bottom: 0.65em;
}
/* Whole-line softening for the second line — never a single accented word
   (that reads as an AI tell); a calmer close to the statement, as a line,
   not a shout. */
.manifesto-line--2 {
  color: var(--c-muted);
}

.manifesto-ctas {
  margin-top: 3.4rem;
}

@media (max-width: 1024px) {
  .manifesto { padding: 8rem 0 10rem; }
}

@media (max-width: 767px) {
  .manifesto { padding: 6rem 0 8rem; min-height: 70vh; }
  .manifesto-line { font-size: clamp(1.5rem, 6.4vw, 2.1rem); }
  .manifesto-line--1 { margin-bottom: 0.55em; }
  .manifesto-ctas { margin-top: 2.4rem; }
  .manifesto-ctas .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .manifesto-line .hw,
  .manifesto-ctas {
    opacity: 1;
    transform: none;
  }
}

/* ── Footer (Section 9) — frosted-glass panel ──────────────────────────
   Normal document flow (no z-index of its own), same as every other
   section — the orb (.site-canvas) and the PCB spine (.pcb-spine) both sit
   on z-index:-1, so they already paint *behind* the footer exactly like
   behind every other section; a translucent fill + backdrop-filter here is
   what actually lets them show through instead of being fully hidden.
   Adds no circuit of its own: the page-wide spine already closed its loop
   at Section 8's manifesto CTA (see spine.js's layoutManifestoClose — it's
   the last section the spine routes to). Fill + top catch-light reuse the
   exact rgba values already established by .sundays-frame's own glass
   surface, so this reads as the same "glass panel" language, not a new one. */
.footer {
  position: relative;
  background: linear-gradient(180deg, rgba(45, 1, 64, 0.42) 0%, rgba(1, 3, 38, 0.7) 100%);
  backdrop-filter: blur(22px) saturate(130%);
  -webkit-backdrop-filter: blur(22px) saturate(130%);
  border-top: 1px solid rgba(199, 125, 255, 0.28);
  color: var(--c-muted);
  font-family: var(--ff-body);
  font-size: 0.85rem;
}

/* Graceful degrade for browsers without backdrop-filter: a near-solid dark
   fill instead of a half-transparent one — still dark/violet-tinted and
   on-brand, just without the blur-through. */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .footer {
    background: linear-gradient(180deg, rgba(20, 1, 32, 0.96) 0%, rgba(1, 3, 38, 0.98) 100%);
  }
}

/* Spread wide across the full width at desktop (Fluently reference — logo
   left, columns + social/language grouped right, generous space between —
   not centre-bunched), a bit wider than the site's standard 1200px
   container so the three groups have real room to breathe. */
.footer .container { max-width: 1360px; }

.footer-inner {
  display: grid;
  grid-template-columns: minmax(240px, 0.9fr) auto minmax(260px, 1fr);
  gap: 4rem;
  align-items: start;
  padding: 4.5rem 0 3rem;
}

.footer-brand { opacity: 0; }

.footer-logo {
  display: flex;
  align-items: center;
}
.footer-logo .brand-lockup { --brand-h: 32px; } /* = old 32px mark row: footer height unchanged */

.footer-tagline {
  margin-top: 0.9rem;
  max-width: 26ch;
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--c-muted);
}

.footer-cols {
  display: flex;
  gap: 4.5rem;
}

.footer-col { opacity: 0; }

.footer-col-title {
  font-family: var(--ff-body);
  font-weight: 600;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--c-text);
  margin-bottom: 1rem;
}

.footer-col ul { display: flex; flex-direction: column; gap: 0.65rem; }
.footer-col a {
  font-size: 0.85rem;
  color: var(--c-muted);
  transition: color .2s;
}
.footer-col a:hover { color: var(--c-violet-hi); }

.footer-aside {
  opacity: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1.3rem;
}

.footer-social { display: flex; align-items: center; gap: 1rem; }
.footer-social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(157, 91, 255, 0.28);
  color: var(--c-violet);
  transition: color .2s, border-color .2s, background .2s;
}
.footer-social-link svg { width: 20px; height: 20px; }
.footer-social-link:hover {
  color: var(--c-magenta);
  border-color: rgba(199, 125, 255, 0.55);
  background: rgba(163, 5, 166, 0.1);
}

.footer-ai-note {
  opacity: 0;
  padding-top: 1.6rem;
  padding-bottom: 1.6rem;
  border-top: 1px solid var(--c-line);
  max-width: 60ch;
  font-size: 0.72rem;
  line-height: 1.6;
  color: var(--c-muted);
}

.footer-bottom {
  opacity: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding-top: 1.6rem;
  padding-bottom: 2.4rem;
  border-top: 1px solid var(--c-line);
  font-size: 0.78rem;
}

/* Reserves room for the fixed back-to-top button (Part G) — without it, the
   right-aligned "Powered by Cerebro Software" credit sits directly under
   the button once the page is scrolled all the way down, at exactly the
   widths (1440 down through 768) where .footer-bottom stays a single row;
   the ≤767px stack below moves the credit to its own left-aligned line, so
   it doesn't need this. */
@media (min-width: 768px) {
  .footer-bottom { padding-right: 90px; }
}

.footer-credit {
  margin-top: 0;
  color: var(--c-muted);
  font-size: 0.72rem;
}

.footer-credit-link {
  font-weight: 600;
  color: var(--c-muted);
  transition: color .22s;
}
.footer-credit-link:hover {
  color: var(--c-violet-hi);
}

@media (max-width: 1024px) {
  .footer-inner {
    grid-template-columns: 1fr 1fr;
    row-gap: 3rem;
    /* Same 2.5rem side gutter as the footer's AI note and bottom bar. */
    padding-left: 2.5rem;
    padding-right: 2.5rem;
  }
  .footer-brand { grid-column: 1 / -1; }
  .footer-cols { flex-wrap: wrap; gap: 2rem 2.5rem; }
  .footer-col { flex: 1 1 140px; }
  .footer-aside { align-items: flex-start; }
}

/* With the gutter above, a 768px footer has 312px for Product + Trust;
   a 130px basis keeps them side by side there (both columns grow
   equally, so wider tablet widths look exactly the same). */
@media (min-width: 768px) and (max-width: 1024px) {
  .footer-col { flex-basis: 130px; }
}

@media (max-width: 767px) {
  .footer-inner {
    grid-template-columns: 1fr;
    /* Same 2.5rem side gutter as .container (and the footer's own note and
       bottom bar); the vertical-only shorthand used to zero it. */
    padding: 3.5rem 2.5rem 2.5rem;
    gap: 2.6rem;
  }
  .footer-brand { grid-column: auto; }
  .footer-cols { flex-direction: column; gap: 2.2rem; }
  .footer-aside { align-items: flex-start; }
  .footer-bottom { flex-direction: column; align-items: flex-start; gap: 0.6rem; }
}

@media (prefers-reduced-motion: reduce) {
  .footer-brand,
  .footer-col,
  .footer-aside,
  .footer-ai-note,
  .footer-bottom {
    opacity: 1;
    transform: none;
  }
}

/* ── Contact (Section 10, form added Section 11 Part D) — sits between the
   manifesto and the footer ── Adds no spine geometry of its own: the
   page-wide loop already closed at the Start Free CTA (spine.js's
   layoutManifestoClose), so this section stays visually quiet — no frame,
   no orb state, reusing the standard section-header pattern
   (.section-eyebrow + .section-headline, see the "How it works" comment
   near the top of this file) above a real working form. */
.contact {
  padding: 8rem 0 9rem;
  text-align: center;
}

.contact-inner {
  opacity: 0;
  max-width: 820px;
  margin: 0 auto;
}
/* The whole block reveals as one unit via .contact-inner above (main.js) —
   these children must not carry their own independent opacity:0 (the
   default every other section's per-child .section-eyebrow/.section-headline
   reveal relies on, see main.js's reveal() calls elsewhere), or they'd stay
   invisible forever since nothing ever targets them directly. Same
   "own reveal already covers me" override as .journey .section-headline. */
.contact .section-eyebrow,
.contact .section-headline {
  opacity: 1;
}

.contact-sub {
  margin-top: 1.2rem;
  font-size: clamp(0.95rem, 1.2vw, 1.05rem);
  line-height: 1.7;
  color: var(--c-muted);
}

.contact-hint {
  margin-top: 1.4rem;
  font-size: 0.78rem;
  color: var(--c-muted);
}

.contact-alt-email {
  margin-top: 0.4rem;
  font-size: 0.78rem;
  color: var(--c-muted);
}
.contact-alt-email-link {
  color: var(--c-violet-hi);
  font-weight: 600;
  transition: opacity .2s;
}
.contact-alt-email-link:hover { opacity: 0.75; }

/* ── Contact form (Section 11, Part D) ───────────────────────────────────
   Dark glassy inputs, violet resting border, magenta focus glow, the
   site's own gradient submit button — same nebula/glass language as
   .lang-menu-trigger and .sundays-frame, not a generic form treatment. */
.contact-form {
  margin-top: 2.8rem;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.6rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.form-label {
  font-family: var(--ff-body);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--c-muted);
}

.form-input {
  width: 100%;
  padding: 1rem 1.15rem;
  border-radius: 10px;
  border: 1px solid rgba(157, 91, 255, 0.24);
  background: rgba(1, 3, 38, 0.45);
  color: var(--c-text);
  font-size: 0.92rem;
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.form-input::placeholder { color: var(--c-muted); opacity: 0.75; }
.form-input:hover { border-color: rgba(157, 91, 255, 0.42); }
.form-input:focus {
  outline: none;
  border-color: var(--c-magenta);
  box-shadow: 0 0 0 3px rgba(163, 5, 166, 0.22);
  background: rgba(45, 1, 64, 0.32);
}

.form-textarea {
  min-height: 170px;
  resize: vertical;
  font-family: inherit;
  line-height: 1.6;
}

/* Honeypot spam trap (main.js's submit handler) — off-screen, not
   display:none (some bots specifically skip hidden/display:none fields),
   so it stays invisible to real users but still fillable by less careful
   bots. tabindex="-1" + aria-hidden also keep it out of keyboard/AT flow. */
.form-hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-submit {
  align-self: flex-start;
  margin-top: 0.3rem;
}
.form-submit:disabled { opacity: 0.6; cursor: not-allowed; }

.form-status {
  min-height: 1.2em;
  margin-top: -0.4rem;
  font-size: 0.82rem;
  color: var(--c-muted);
}
.form-privacy {
  font-size: 0.78rem;
  line-height: 1.5;
  color: var(--c-muted);
}
.form-privacy a {
  color: var(--c-violet-hi);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.form-status--error   { color: var(--c-magenta); }
.form-status--success { color: var(--c-violet-hi); }

@media (max-width: 1024px) {
  .contact { padding: 6rem 0 7rem; }
}

@media (max-width: 767px) {
  .contact { padding: 5rem 0 6rem; }
  .form-row { grid-template-columns: 1fr; gap: 1.1rem; }
  .form-submit { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .contact-inner { opacity: 1; transform: none; }
}

/* ── Back to top (Section 10, Part G) ────────────────────────────────────
   Fixed bottom-right; hidden until main.js's IntersectionObserver marks the
   hero fully scrolled past (.back-to-top--visible), then fades/slides in.
   Above the footer's own content (z-index) but positioned clear of the
   footer language dropdown, which opens upward from further left in the
   footer-aside column. */
.back-to-top {
  position: fixed;
  right: 2rem;
  bottom: 2rem;
  z-index: 60;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid rgba(157, 91, 255, 0.28);
  background: rgba(1, 3, 38, 0.55);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  color: var(--c-text);
  opacity: 0;
  transform: translateY(16px);
  pointer-events: none;
  transition: opacity .35s var(--ease-out), transform .35s var(--ease-out), border-color .2s, box-shadow .2s;
}
.back-to-top svg { width: 20px; height: 20px; }
.back-to-top--visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.back-to-top:hover {
  border-color: rgba(199, 125, 255, 0.7);
  box-shadow: 0 0 24px rgba(163, 5, 166, 0.45);
}
.back-to-top:focus-visible {
  outline: 1px solid var(--c-violet);
  outline-offset: 3px;
}

@media (max-width: 767px) {
  .back-to-top { right: 1.2rem; bottom: 1.2rem; width: 44px; height: 44px; }
  .back-to-top svg { width: 18px; height: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  .back-to-top { transition: opacity .2s ease; transform: none; }
}

/* ══════════════════════════════════════════════════════════════════════
   AUTH PAGES (Section 14, widened + brand-panel filled in Section 15;
   brand panel REMOVED in Section 17 — client wants these pages minimal,
   just the centered card) — login.html / open-account.html. Fully in our
   own dark nebula skin — NOT a white panel. The form is a glass card
   (same language as .sundays-frame/.contact-form), now centered alone in
   the viewport with the page's own orb (.site-canvas, loaded identically
   to every other page — see each auth page's own script list) showing
   through behind it. No PCB spine on these pages — single-viewport
   utility pages, not a page-wide circuit journey; the orb alone carries
   the "same universe as the homepage" feel without needing literal trace
   geometry.

   The former right-hand .auth-brand-side panel (loop mark, name, tagline,
   mini-flow) and its CSS are commented out below rather than deleted, in
   case the client wants it reinstated later — see each commented block's
   own note. i18n.js's authFlow.* keys are likewise commented out, not
   removed.

   Row sizing note (Section 15, Part A, still true as a single column):
   .auth-page is a single-row grid with only a min-height floor (100svh)
   — never a fixed height — so when the signup form's extra fields make
   .auth-card taller than one viewport, the row grows to fit it. Nothing
   here clips overflow (no max-height/overflow:hidden anywhere in this
   chain) and the page simply scrolls; verified at 625–900px viewport
   heights against the signup card specifically, since it's the taller of
   the two. If the cut-off ever recurs, check this file first for a
   reintroduced max-height/overflow:hidden before touching auth.js. */
.auth-page {
  min-height: 100svh;
  display: grid;
  grid-template-columns: 1fr; /* was 1.3fr 0.7fr (form + brand panel) — single centered column since Section 17's brand-panel removal */
}

/* Was ".auth-form-side, .auth-brand-side" — .auth-brand-side dropped from
   this selector since its element no longer exists (Section 17); the flex
   centering here is what centers .auth-card (max-width, see below) inside
   the now-full-width column. */
.auth-form-side {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(var(--nav-h) + 3rem) 3rem 3rem;
}

.auth-card {
  opacity: 0; /* auth.js fades this in alongside .nav on load */
  width: 100%;
  max-width: 560px; /* widened from 480px (Section 16, Part A) — the real ceiling on card width; the grid ratio above only decides how much of the *column* it gets to use */
  border-radius: 24px;
  background: linear-gradient(160deg, rgba(45, 1, 64, 0.55) 0%, rgba(1, 3, 38, 0.72) 100%);
  border: 1px solid rgba(157, 91, 255, 0.22);
  border-top-color: rgba(199, 125, 255, 0.4); /* top-edge catch-light, same trick as .sundays-frame */
  box-shadow: 0 48px 120px -32px rgba(163, 5, 166, 0.32), inset 0 1px 0 rgba(236, 232, 245, 0.07);
  padding: 3rem 3.6rem; /* roomier than the original 3rem 3.2rem (Section 16, Part A) */
}

.auth-eyebrow {
  font-family: var(--ff-body);
  font-weight: 500;
  font-size: 0.68rem;
  letter-spacing: 0.17em;
  text-transform: uppercase;
  color: var(--c-muted);
  margin-bottom: 0.9rem;
}

.auth-heading {
  font-family: var(--ff-display);
  font-weight: 800;
  font-size: clamp(1.8rem, 2.6vw, 2.4rem);
  letter-spacing: -0.01em;
  margin-bottom: 0.7rem;
}

.auth-sub {
  color: var(--c-muted);
  font-size: 0.92rem;
  line-height: 1.6;
  margin-bottom: 2rem;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1.6rem; /* roomier than the original 1.4rem (Section 15, Part B) */
}

/* Scoped (not the shared .form-row/.form-input used by the homepage
   contact form — Section 15, Part B widens auth inputs only). */
.auth-card .form-row { gap: 1.8rem; }
.auth-card .form-input { padding: 1.05rem 1.2rem; }

.auth-submit { width: 100%; margin-top: 0.2rem; }

.auth-links {
  margin-top: 1.6rem;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  font-size: 0.85rem;
}

.auth-link-muted {
  align-self: flex-start;
  color: var(--c-muted);
  transition: color .2s;
}
.auth-link-muted:hover { color: var(--c-text); }

.auth-switch { color: var(--c-muted); }
.auth-switch a { color: var(--c-violet-hi); font-weight: 600; transition: opacity .2s; }
.auth-switch a:hover { opacity: 0.75; }

/* ── UNUSED since Section 17's auth brand-panel removal — the client
   wants login.html/open-account.html minimal: just the centered card, no
   right-side panel. .auth-brand-side and its contents no longer exist in
   either page's markup. Commented out rather than deleted in case it's
   reinstated later; re-add the HTML block (see login.html/open-account.html
   git history) and uncomment everything from here through
   .auth-flow-outputs below to bring it back.

.auth-brand-side {
  position: relative;
  background: linear-gradient(160deg, rgba(45, 1, 64, 0.28) 0%, rgba(1, 3, 38, 0.4) 100%);
  border-left: 1px solid rgba(157, 91, 255, 0.14);
}

.auth-brand-content {
  opacity: 0;
  text-align: center;
  max-width: 340px;
}

.auth-brand-mark {
  width: 72px;
  height: 72px;
  margin: 0 auto 1.4rem;
}

.auth-brand-name {
  font-family: var(--ff-display);
  font-weight: 800;
  font-size: 1.3rem;
  letter-spacing: -0.01em;
  margin-bottom: 0.6rem;
}

.auth-brand-tagline {
  color: var(--c-muted);
  font-size: 0.92rem;
  line-height: 1.6;
}

.auth-flow {
  margin-top: 2.4rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
  width: 100%;
}

.auth-flow-trace {
  width: 1px;
  height: 18px;
  background: linear-gradient(180deg, rgba(157, 91, 255, 0.5), rgba(163, 5, 166, 0.45));
}

.auth-flow-step {
  width: 100%;
  max-width: 250px;
  background: linear-gradient(180deg, rgba(157, 91, 255, 0.07), rgba(163, 5, 166, 0.03));
  border: 1px solid rgba(157, 91, 255, 0.22);
  border-radius: 12px;
  padding: 0.8rem 1.1rem;
  text-align: center;
}

.auth-flow-step--engine {
  border-color: rgba(199, 125, 255, 0.45);
  background: linear-gradient(180deg, rgba(157, 91, 255, 0.13), rgba(163, 5, 166, 0.06));
  box-shadow: 0 0 22px rgba(157, 91, 255, 0.16);
}

.auth-flow-engine-icon { width: 26px; height: 26px; margin: 0 auto 0.4rem; }

.auth-flow-step-title {
  font-family: var(--ff-display);
  font-weight: 700;
  font-size: 0.86rem;
  letter-spacing: -0.005em;
  color: var(--c-text);
}

.auth-flow-step-sub {
  font-family: var(--ff-body);
  font-size: 0.72rem;
  line-height: 1.4;
  color: var(--c-muted);
  margin-top: 0.2rem;
}

.auth-flow-outputs {
  display: flex;
  gap: 0.7rem;
  width: 100%;
  max-width: 250px;
}
.auth-flow-outputs .auth-flow-step { padding: 0.7rem 0.5rem; }
*/

@media (max-width: 900px) {
  .auth-page { grid-template-columns: 1fr; min-height: auto; } /* grid-template-columns redundant with the base rule now both are 1fr, kept for min-height: auto */
  /* UNUSED since Section 17's auth brand-panel removal — .auth-brand-side
     no longer exists in the markup. Commented out, not deleted; see the
     matching note near the desktop .auth-brand-side rules above.
  .auth-brand-side {
    order: -1;
    padding: calc(var(--nav-h) + 1.6rem) 1.5rem 1.6rem;
    border-left: none;
    border-bottom: 1px solid rgba(157, 91, 255, 0.14);
  }
  .auth-brand-mark { width: 44px; height: 44px; margin-bottom: 0.7rem; }
  .auth-brand-name { font-size: 1.05rem; }
  .auth-brand-tagline { display: none; }
  .auth-flow { display: none; }
  */
  .auth-form-side { padding: 2.4rem 1.5rem 3.5rem; }
  .auth-card { padding: 2rem 1.6rem; }
}

@media (max-width: 480px) {
  .auth-card { padding: 1.7rem 1.3rem; border-radius: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  /* .auth-brand-content dropped — unused since Section 17's auth brand-
     panel removal; kept as a note in case it's reinstated. */
  .nav, .auth-card { opacity: 1; transform: none; }
}

/* ══════════════════════════════════════════════════════════════════════
   ACCESSIBILITY UTILITY ─────────────────────────────────────────────────
   Visually-hidden but still announced to screen readers — used by the
   pricing comparison table's <caption> (Section 16, Part B). */
.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;
}

/* ── Generic button width utility ──────────────────────────────────────
   Used by the pricing cards' CTAs (Section 16, Part B) — .btn itself is
   inline-flex/auto-width, this just stretches it to fill its container. */
.btn--full { width: 100%; }

/* ══════════════════════════════════════════════════════════════════════
   PRICING PAGE (Section 16) — pricing.html. Cerebrium-style structure
   (hero → three tiers → detailed comparison table → FAQ), fully in our own
   dark-nebula skin. No per-second compute calculator (Cerebrium has one;
   doesn't fit a flat-tier model, skipped entirely per this section's own
   brief). ALL prices/features here are PLACEHOLDERS — see the
   "PRICING PLACEHOLDER" comment in i18n.js. No PCB spine on this page
   (spine.js is hardcoded to the homepage's own section ids/elements) — the
   orb alone carries the "same universe" feel, same reasoning as the auth
   pages' own comment, just with a short ORB_JOURNEY (pricing.js) instead of
   a single resting state, since this page scrolls through several sections.
   ══════════════════════════════════════════════════════════════════════ */

.pricing-hero {
  position: relative;
  padding: calc(var(--nav-h) + 6rem) 0 3rem;
  text-align: center;
}

.pricing-hero-sub {
  opacity: 0;
  font-family: var(--ff-body);
  font-size: clamp(1rem, 1.2vw, 1.1rem);
  line-height: 1.7;
  color: var(--c-muted);
  max-width: 52ch;
  margin: 1.6rem auto 0;
}

.pricing-tiers {
  padding: 2rem 0 8rem;
  position: relative;
}

/* ── Billing toggle (Monthly / Annual) ─────────────────────────────────
   A plain class-toggle control (pricing.js) built only from the existing
   palette tokens — no new colours. The "−20%" pill (.pricing-billing-save)
   is hidden by the [hidden] attribute in the monthly state and shown by
   pricing.js in the annual state. */
.pricing-billing {
  opacity: 0; /* revealed by pricing.js's reveal(), same as the cards below */
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.9rem;
  margin: 0 auto 3rem;
}

.pricing-billing-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.35rem;
  border-radius: 999px;
  border: 1px solid rgba(157, 91, 255, 0.22);
  background: rgba(45, 1, 64, 0.35);
}

.pricing-billing-opt {
  appearance: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem 1.4rem;
  border-radius: 999px;
  background: transparent;
  color: var(--c-muted);
  font-family: var(--ff-body);
  font-weight: 600;
  font-size: 0.85rem;
  transition: color .2s, background .2s;
}

.pricing-billing-opt:hover { color: var(--c-violet-hi); }

.pricing-billing-opt.is-active {
  background: linear-gradient(135deg, var(--c-violet), var(--c-magenta));
  color: var(--c-text);
}

.pricing-billing-opt:focus-visible {
  outline: 1px solid var(--c-violet);
  outline-offset: 3px;
}

.pricing-billing-save {
  margin-left: 0.3rem;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  background: rgba(163, 5, 166, 0.18);
  border: 1px solid rgba(199, 125, 255, 0.45);
  color: var(--c-violet-hi);
  font-family: var(--ff-body);
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.02em;
}

/* Phones: the pill doesn't fit beside the two buttons, so it wraps onto
   its own centred line inside the toggle instead of being squeezed. */
@media (max-width: 480px) {
  .pricing-billing-toggle { flex-wrap: wrap; justify-content: center; border-radius: 24px; }
  .pricing-billing-save { margin: 0.2rem auto 0.15rem; white-space: nowrap; }
}

.pricing-billing-vat {
  font-family: var(--ff-body);
  font-size: 0.78rem;
  color: var(--c-muted);
}

.pricing-tiers-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  max-width: 1120px;
  margin: 0 auto;
  align-items: stretch;
}

.pricing-card {
  opacity: 0;
  position: relative;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, rgba(45, 1, 64, 0.55) 0%, rgba(1, 3, 38, 0.60) 100%);
  border: 1px solid rgba(157, 91, 255, 0.22);
  border-top-color: rgba(199, 125, 255, 0.40);
  border-radius: 20px;
  box-shadow: 0 22px 44px -22px rgba(163, 5, 166, 0.38), inset 0 1px 0 rgba(236, 232, 245, 0.05);
  padding: 2.6rem 2.2rem;
}

/* The middle tier, lifted and brightened so it reads as the recommended
   choice — same border/glow language as .faq-item--open's "lifted" state,
   just applied to a whole card instead of an accordion row. */
.pricing-card--featured {
  border-color: rgba(199, 125, 255, 0.55);
  box-shadow: 0 28px 64px -22px rgba(163, 5, 166, 0.5), inset 0 1px 0 rgba(236, 232, 245, 0.08);
}

.pricing-badge {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  padding: 0.35rem 1rem;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--c-violet), var(--c-magenta));
  color: var(--c-text);
  font-family: var(--ff-body);
  font-weight: 700;
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

.pricing-tier-name {
  font-family: var(--ff-display);
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.01em;
  color: var(--c-text);
}

.pricing-tier-sub {
  margin-top: 0.5rem;
  font-family: var(--ff-body);
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--c-muted);
  min-height: 2.6em; /* keeps the price row aligned across cards even when one sub wraps to a second line */
}

.pricing-price {
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
  margin: 1.5rem 0 1.8rem;
}

.pricing-price-main {
  font-family: var(--ff-display);
  font-weight: 900;
  font-size: clamp(2.1rem, 2.6vw, 2.7rem);
  letter-spacing: -0.02em;
  color: var(--c-text);
}

/* The figure is filled from pricing-config.js by pricing.js; until then the
   empty span still holds its line box so the row never changes height. */
.pricing-price-main:empty::before { content: '\00a0'; }

.pricing-card--featured .pricing-price-main {
  background: linear-gradient(135deg, var(--c-violet-hi), var(--c-magenta));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.pricing-price-per {
  font-family: var(--ff-body);
  font-size: 0.92rem;
  color: var(--c-muted);
}

/* The note under the price on every card (Free: no card needed; Pro/Max:
   the founding "then" line monthly, the per-month figure annually). Negative
   top margin tucks it into .pricing-price's bottom margin; a fixed two-line
   slot (wrapping allowed, the founding lines need it at 1024px and in
   Greek) keeps every card's feature list starting at the same height. */
.pricing-price-note {
  margin: -1.6rem 0 0.5rem;
  font-family: var(--ff-body);
  font-size: 0.8rem;
  line-height: 1.1rem;
  min-height: 2.2rem;
  color: var(--c-violet-hi);
}

/* Tier name + "Founding price" badge on one row (badge monthly only). */
.pricing-tier-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem 0.65rem;
}

.pricing-founding-badge {
  padding: 0.28rem 0.7rem;
  border-radius: 999px;
  background: rgba(102, 2, 115, 0.45);
  border: 1px solid rgba(163, 5, 166, 0.6);
  box-shadow: 0 0 14px -4px rgba(163, 5, 166, 0.6);
  color: var(--c-text);
  font-family: var(--ff-body);
  font-weight: 600;
  font-size: 0.64rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}
.pricing-founding-badge[hidden] { display: none; }

/* ── Founding offer block (above the billing toggle and plan cards) ───── */
.founding {
  opacity: 0; /* revealed by pricing.js's reveal() */
  position: relative;
  max-width: 760px;
  margin: 0 auto 3rem;
  padding: 2.2rem 2.4rem 2rem;
  text-align: center;
  border-radius: 20px;
  border: 1px solid rgba(163, 5, 166, 0.42);
  background:
    radial-gradient(70% 120% at 50% 0%, rgba(102, 2, 115, 0.5) 0%, rgba(102, 2, 115, 0) 70%),
    linear-gradient(180deg, rgba(45, 1, 64, 0.7) 0%, rgba(1, 3, 38, 0.75) 100%);
  box-shadow: 0 24px 56px -26px rgba(163, 5, 166, 0.55), inset 0 1px 0 rgba(163, 5, 166, 0.35);
  scroll-margin-top: calc(var(--nav-h) + 1.5rem);
}

.founding-title {
  font-family: var(--ff-display);
  font-weight: 800;
  font-size: clamp(1.5rem, 2.4vw, 2rem);
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--c-text);
}

.founding-text {
  max-width: 56ch;
  margin: 0.9rem auto 0;
  font-family: var(--ff-body);
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--c-text);
  opacity: 0.86;
}

.founding-small {
  margin-top: 1rem;
  font-family: var(--ff-body);
  font-size: 0.74rem;
  color: var(--c-muted);
}

.pricing-features {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-bottom: 2.2rem;
  flex: 1; /* pushes the CTA to the bottom of the card regardless of feature-list length */
}

.pricing-features li {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  font-family: var(--ff-body);
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--c-muted);
}

.pricing-check {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin-top: 0.15em;
  color: var(--c-violet-hi);
}

.pricing-cta { margin-top: auto; }

@media (max-width: 1024px) {
  .pricing-hero { padding: calc(var(--nav-h) + 4rem) 0 2.5rem; }
  .pricing-tiers { padding: 1.5rem 0 6rem; }
}

@media (max-width: 900px) {
  .pricing-tiers-grid { grid-template-columns: 1fr; max-width: 460px; }
  .pricing-card--featured { order: -1; } /* the recommended plan leads on a single column */
}

@media (max-width: 767px) {
  .pricing-hero { padding: calc(var(--nav-h) + 3rem) 0 2rem; }
  .pricing-tiers { padding: 1rem 0 5rem; }
  .pricing-tiers-grid { gap: 1.5rem; }
  .pricing-card { padding: 2rem 1.7rem; }
  .pricing-badge { font-size: 0.62rem; padding: 0.3rem 0.85rem; }
  .founding { padding: 1.8rem 1.4rem 1.6rem; margin-bottom: 2.25rem; }
  .founding-text { font-size: 0.9rem; }
}

@media (prefers-reduced-motion: reduce) {
  .pricing-hero-sub, .pricing-billing, .pricing-card, .founding { opacity: 1; transform: none; }
}

/* ── Comparison table ──────────────────────────────────────────────────
   Wrapped in its own horizontally-scrolling container so a wide 4-column
   table never causes page-level horizontal overflow on narrow viewports
   (CEREBRO-MOBILE.md) — the table itself keeps a comfortable min-width and
   scrolls inside that container instead of squeezing illegibly thin. */
.pricing-compare {
  padding: 2rem 0 9rem;
  position: relative;
}

.pricing-compare-header {
  margin-bottom: 3.5rem;
}

.pricing-compare-scroll {
  opacity: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  max-width: 1000px;
  margin: 0 auto;
  border-radius: 18px;
  border: 1px solid rgba(157, 91, 255, 0.20);
  background: linear-gradient(160deg, rgba(45, 1, 64, 0.4) 0%, rgba(1, 3, 38, 0.55) 100%);
}

.pricing-compare-table {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
  font-family: var(--ff-body);
}

.pricing-compare-table th,
.pricing-compare-table td {
  padding: 1.1rem 1.4rem;
  text-align: center;
  border-bottom: 1px solid rgba(157, 91, 255, 0.14);
  font-size: 0.86rem;
  color: var(--c-muted);
}

.pricing-compare-table thead th {
  padding-top: 1.6rem;
  font-family: var(--ff-display);
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--c-text);
  border-bottom-color: rgba(157, 91, 255, 0.28);
}

.pricing-compare-table tbody th {
  text-align: left;
  font-weight: 500;
  color: var(--c-text);
}

.pricing-compare-table tbody tr:last-child th,
.pricing-compare-table tbody tr:last-child td {
  border-bottom: none;
  padding-bottom: 1.6rem;
}

/* The "Pro" column (3rd of 4: feature label + 3 tiers) reads as the
   recommended path here too, same column the featured card highlights. */
.pricing-compare-table th:nth-child(3),
.pricing-compare-table td:nth-child(3) {
  background: rgba(157, 91, 255, 0.07);
}

.pricing-compare-table .pc-yes {
  color: var(--c-violet-hi);
  font-size: 1.05rem;
  font-weight: 700;
}

.pricing-compare-table .pc-no {
  color: var(--c-muted);
  opacity: 0.5;
}

@media (max-width: 767px) {
  .pricing-compare { padding: 1rem 0 6rem; }
  .pricing-compare-header { margin-bottom: 2.2rem; }
  .pricing-compare-table th, .pricing-compare-table td { padding: 0.9rem 1rem; font-size: 0.82rem; }
}

@media (prefers-reduced-motion: reduce) {
  .pricing-compare-scroll { opacity: 1; transform: none; }
}

/* ══════════════════════════════════════════════════════════════════════
   PAGE-ENTRANCE TRANSITION (Section 16, Part C) — site-wide "rise up + fade
   in" on arrival at every page. NOT implemented via the CSS cross-document
   View Transitions API (@view-transition) despite that being the initial,
   preferred approach: testing (Playwright + Chromium 149, reproduced over
   both file:// and http://, headed and headless) found that enabling
   `@view-transition { navigation: auto }` site-wide caused the page to
   freeze completely on a browser back-button navigation specifically —
   requestAnimationFrame stopped firing entirely and the nav never finished
   fading in, with no further script execution recovering it. This
   reproduced identically regardless of the transition's own animation
   content (tested with and without a transform, opacity-only included) and
   was not prevented by the spec's own pagereveal/pageswap
   `event.viewTransition.skipTransition()` escape hatch for back/forward
   ("traverse") navigations — the browser had already decided not to build a
   transition object for that navigation, yet the freeze still occurred, so
   the defect sits below the level either script hook can influence. Given
   the project's own hard requirement that the back button must keep
   working, shipping that rule was not acceptable.
   Implemented instead as a per-page load-time entrance instead: each page's
   own existing GSAP entrance timeline (main.js's runHeroEntrance,
   auth.js's/pricing.js's own entrance block) now also rises+fades in
   <main> as its first beat, alongside the nav fade already there. Same
   visible "rise up from below and fades in" result on every navigation —
   forward link clicks AND the back/forward button alike, since it's driven
   by the page's own load, not by which direction the user arrived from —
   with zero dependency on an experimental navigation API, so it cannot
   affect the back button, anchor links, or Lenis (none of which this
   touches) and it works in every browser, not just Chromium. See each
   script's own copy of the entrance timeline for the reduced-motion gate
   (skipped entirely, per this section's own accessibility requirement). */

/* ══════════════════════════════════════════════════════════════════════
   SERVICES HUB (services.html) — "The Assembly Line": a pinned scroll-
   storytelling rebuild, replacing the earlier dossier-card grid entirely.
   One INTRO scene, then four full-viewport PINNED tool scenes (desktop
   only — see services.js's gsap.matchMedia gating, the exact pin-gating
   rule documented in CEREBRO-ANIMATIONS.md), then the shared Why-trust
   strip and CTA band. No card borders, no bracket corners, no left-accent
   spines — the four tools' real output "assembles" itself in open space
   using the site's existing .tool-preview/.tp-* output-window family
   (the same component the homepage's S4 tools grid and The Loop's OUTPUT
   panel already use — see style.css ~L1184), stepped in by a single
   scrubbed GSAP timeline per scene (services.js) that only ever animates
   opacity + transform. Mobile (<768px) degrades to plain staggered
   scroll-reveals with no pin (MOBILE.md's documented pin-gating rule);
   prefers-reduced-motion shows every scene fully assembled and static.
   Same universe as every other page: same five-color palette + derived
   tokens, same orb/cursor/header/footer, same button and section-eyebrow/
   headline system.
   ══════════════════════════════════════════════════════════════════════ */

/* ── Intro scene ─────────────────────────────────────────────────────── */
.asm-intro {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: calc(var(--nav-h) + 4rem) 2.5rem 4rem;
}

.asm-intro-sub {
  opacity: 0;
  font-family: var(--ff-body);
  font-size: clamp(0.95rem, 1.2vw, 1.05rem);
  line-height: 1.7;
  color: var(--c-muted);
  max-width: 56ch;
  margin: 1.2rem auto 0;
}

.asm-scroll-hint {
  opacity: 0;
  margin-top: 3.5rem;
  font-family: var(--ff-body);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--c-muted);
}

/* ── Pinned tool scenes ───────────────────────────────────────────────── */
.asm-scene {
  position: relative;
  height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.asm-scene .container { max-width: 1360px; }

.asm-scene-grid {
  display: grid;
  grid-template-columns: minmax(300px, 0.82fr) minmax(360px, 1fr);
  gap: clamp(3rem, 5.5vw, 6rem);
  align-items: center;
  width: 100%;
}

.asm-scene-input { max-width: 500px; }

.asm-scene-index {
  display: block;
  font-family: var(--ff-body);
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--c-muted);
  margin-bottom: 1.6rem;
}
.asm-scene-index strong { color: var(--c-violet-hi); font-weight: 700; font-size: 1.05em; }

.asm-scene-title {
  font-family: var(--ff-display);
  font-weight: 900;
  font-size: clamp(2.2rem, 3.6vw, 3.5rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--c-text);
  margin-bottom: 1.1rem;
}

.asm-scene-desc {
  font-family: var(--ff-body);
  font-size: clamp(1rem, 1.25vw, 1.15rem);
  line-height: 1.65;
  color: var(--c-muted);
  margin-bottom: 1.7rem;
  max-width: 46ch;
}

.asm-scene-bullets {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-bottom: 2.4rem;
}
.asm-scene-bullets li {
  position: relative;
  padding-left: 1.3rem;
  font-family: var(--ff-body);
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--c-muted);
}
.asm-scene-bullets li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.58em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--c-magenta);
}

/* A real gradient button — the site's existing .btn/.btn--gradient pattern
   (style.css ~L317-333, the same family "Open account"/CTA buttons use),
   not a new style. .asm-scene-cta only adjusts size to fit the scene (a
   touch bigger than the base .btn used in nav, well short of .btn--lg's
   hero-CTA size). No arrow glyph in the label (project rule) — the
   gradient fill is the affordance.

   Hover: every .btn--gradient on the site (this one included, automatically
   — cursor.js's bindHoverTargets() queries '.btn--gradient' generically) is
   already "magnetic": cursor.js nudges it toward the pointer via GSAP
   x/y (a transform), snapping back with a soft elastic on mouseleave. That
   IS this button's lift/movement feedback — confirmed against a real
   render that it fires. Declaring a competing CSS `transform` here would
   just lose to GSAP's inline-applied one (fighting it, not adding to it),
   so the only new thing added on top is the glow the brief also asked
   for — filter-only, so it layers cleanly under cursor.js's transform
   rather than colliding with it. Desktop-only in practice (cursor.js skips
   binding entirely on touch and under prefers-reduced-motion), which is
   fine: touch has no hover state to speak of, and reduced-motion getting
   only the plain gradient fill — no glow, no magnetic pull — is exactly
   the "static" outcome that preference asks for. Function never depends on
   any of this: the href navigates on click regardless of hover state. */
.asm-scene-cta {
  margin-top: 0.4rem;
  padding: 0.75rem 1.8rem;
  font-size: 0.88rem;
  transition: filter 0.3s var(--ease-out);
}
.asm-scene-cta:hover,
.asm-scene-cta:focus-visible {
  opacity: 1; /* overrides the base .btn--gradient:hover dim — this button glows instead of fading */
  filter: brightness(1.12) drop-shadow(0 6px 18px rgba(157, 91, 255, 0.35));
}
.asm-scene-cta:focus-visible { outline: 1px solid var(--c-violet); outline-offset: 4px; }

.asm-scene-output { position: relative; }

.asm-output-label {
  font-family: var(--ff-body);
  font-weight: 600;
  font-size: 0.74rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--c-muted);
  margin-bottom: 1.1rem;
}

/* .tool-preview/.tp-* below reuse the site's shared output-window family
   (style.css ~L1184) — the scene wants this to be the hero of the
   composition, not a compact echo of the homepage grid card, so both the
   frame and the type inside it (scoped overrides below) scale up well
   past the shared family's base sizes. Desktop only (min-width:768px) —
   these selectors are more specific than the shared family's own
   max-width:767/480 shrink rules further down style.css, so without this
   gate they'd win there too and blow past the mobile-tuned sizes the
   graceful degrade below depends on. */
@media (min-width: 768px) {
  .asm-scene-output .tool-preview {
    margin-top: 0;
    padding: 2.6rem 2.6rem 2.3rem;
    border-radius: 16px;
  }

  /* Scoped enlargements of the shared .tp-*/output-window type — kept local
     to .asm-scene-output so the homepage's own S4 tools grid (which reuses
     the same base classes at their original compact size) is untouched. */
  .asm-scene-output .tp-plan-meta { font-size: 0.88rem; margin-bottom: 1.3rem; }
  .asm-scene-output .tp-pill,
  .asm-scene-output .tp-badge { font-size: 0.85rem; padding: 0.48rem 0.95rem; }
  .asm-scene-output .tp-arrow { font-size: 0.85rem; }
  .asm-scene-output .tp-score-chip { margin-bottom: 1.5rem; }
  .asm-scene-output .tp-score-num { font-size: 3rem; }
  .asm-scene-output .tp-score-den,
  .asm-scene-output .tp-score-band { font-size: 1.1rem; }
  .asm-scene-output .tp-rubric { height: 88px; gap: 0.75rem; padding-bottom: 0.7rem; }
  .asm-scene-output .tp-level-chip { font-size: 1.15rem; margin-bottom: 1.3rem; }
  .asm-scene-output .tp-level-chip-end { padding: 0.24rem 0.7rem; }
  .asm-scene-output .tp-level-before,
  .asm-scene-output .tp-level-after { font-size: 0.92rem; padding: 0.6rem 0.85rem; }
  .asm-scene-output .tp-speak-chip { font-size: 0.92rem; margin-bottom: 1.3rem; }
  .asm-scene-output .tp-speak-badges { gap: 0.8rem; }
  .asm-scene-output .tp-speak-phrase { font-size: 0.94rem; margin-top: 1rem; }
}

/* Rubric bars grow in via transform (scaleY from a fixed transform-origin),
   never via animating `height` — their real height stays the static
   nth-child percentage set in the shared .tp-rubric-bar rule; only opacity/
   transform are scroll-scrubbed (services.js), keeping the compositor-only
   animation rule intact even for a "bars filling up" moment. */
.asm-scene-output .tp-rubric-bar {
  transform-origin: bottom;
}

/* Speaking Booster scene — one useful-language fragment beneath the role
   badges (real output, not just labels). Reuses the muted/italic quote
   treatment already in the palette. */
.tp-speak-phrase {
  margin-top: 0.7rem;
  font-family: var(--ff-body);
  font-size: 0.8rem;
  font-style: italic;
  line-height: 1.5;
  color: var(--c-muted);
}

/* Exercise Generator scene — a compact student-copy snippet under the chip:
   title plus three gap-fill items, no answers. Palette only. */
.tp-exercise-sheet {
  margin-top: 0.9rem;
  padding: 0.85rem 1rem;
  border-radius: 10px;
  background: rgba(236, 232, 245, 0.04);
  border: 1px solid rgba(157, 91, 255, 0.14);
}
.tp-exercise-sheet-title {
  font-family: var(--ff-display);
  font-weight: 800;
  font-size: 0.86rem;
  color: var(--c-text);
  margin-bottom: 0.55rem;
}
.tp-exercise-sheet-items {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.tp-exercise-sheet-items li {
  font-family: var(--ff-body);
  font-size: 0.8rem;
  line-height: 1.5;
  color: var(--c-muted);
}
@media (min-width: 768px) {
  .asm-scene-output .tp-exercise-sheet { margin-top: 1.3rem; padding: 1.2rem 1.4rem; }
  .asm-scene-output .tp-exercise-sheet-title { font-size: 1rem; margin-bottom: 0.75rem; }
  .asm-scene-output .tp-exercise-sheet-items li { font-size: 0.92rem; }
}

/* Fragments — start hidden, GSAP steps each one to visible as the scene
   scrubs (services.js buildPinnedScenes/buildMobileReveal). transform +
   opacity only, per this section's performance brief. */
[data-asm-frag] { opacity: 0; }

/* ── Loop-closing transition motif ───────────────────────────────────────
   A small corner arc (NOT the big centred black-hole mark — that has been
   removed entirely; it competed with the assembling output, per this page's
   refinement brief). One loop-sided mark pair (arcs turn, rings stay)
   (services.html), pulsed via opacity + rotation only at each scene handoff
   (services.js pulseSceneTransition) — never per-frame, just a handful of
   short tweens at the moments the page actually changes scenes. Same
   z-index convention as the orb/PCB spine elsewhere on the site: negative,
   so it always paints under normal-flow content without needing a z-index
   bump on any text/panel. ─────────────────────────────────────────────── */
.asm-sweep {
  position: fixed;
  right: clamp(1.5rem, 4vw, 3rem);
  bottom: clamp(1.5rem, 4vw, 3rem);
  width: 84px;
  height: 84px;
  opacity: 0;
  z-index: -1;
  pointer-events: none;
  will-change: transform, opacity;
}
.asm-sweep .brand-mark { width: 100%; height: 100%; }
/* services.js turns the arcs on each scene handoff; no idle CSS motion here. */
.asm-sweep .brand-mark img { animation: none; }

/* ── Assembly-line progress readout ──────────────────────────────────────
   A persistent, quiet "which of the 4 am I on" indicator (services.js),
   separate from each scene's own static inline "0X — 04" label. Opacity-
   only visibility toggle + a transform:scaleX fill, both driven off the
   same pin ScrollTriggers already in place — no extra scroll-scrubbed work.
   Desktop-only chrome (see the mobile/reduced-motion rules below), so it
   sits at a real z-index above content rather than the orb/sweep's -1. ─── */
.asm-progress {
  position: fixed;
  left: clamp(1.5rem, 4vw, 3rem);
  bottom: clamp(1.5rem, 4vw, 3rem);
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-family: var(--ff-body);
  font-weight: 600;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--c-muted);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s var(--ease-out);
}
.asm-progress--visible { opacity: 1; }
.asm-progress-current {
  min-width: 1.3em;
  font-family: var(--ff-display);
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--c-violet-hi);
}
.asm-progress-track {
  position: relative;
  width: 56px;
  height: 2px;
  border-radius: 2px;
  background: var(--c-line);
  overflow: hidden;
}
.asm-progress-fill {
  position: absolute;
  inset: 0;
  transform: scaleX(0);
  transform-origin: left;
  background: linear-gradient(90deg, var(--c-violet-hi), var(--c-magenta));
}

/* ── Mobile / no-pin degrade (MOBILE.md pin-gating rule: no pin under
   768px — see services.js's gsap.matchMedia branches) ──────────────────── */
@media (max-width: 767px) {
  .asm-scene {
    height: auto;
    padding: 4.5rem 0;
  }
  .asm-scene-grid {
    grid-template-columns: 1fr;
    gap: 2.2rem;
  }
  .asm-scene-input { max-width: none; }
  .asm-scene-output .tool-preview { padding: 1.7rem 1.6rem 1.4rem; }
  /* No pin, no scene handoffs to track — both are desktop-only chrome. */
  .asm-sweep, .asm-progress { display: none; }
}

@media (max-width: 480px) {
  .asm-intro { padding: calc(var(--nav-h) + 3rem) 1.5rem 3rem; }
  .asm-scene { padding: 3.5rem 0; }
}

@media (prefers-reduced-motion: reduce) {
  .asm-intro-sub,
  .asm-scroll-hint,
  [data-asm-frag] {
    opacity: 1;
    transform: none;
  }
  .asm-sweep, .asm-progress { display: none; }
}

/* ── Why it's different ──────────────────────────────────────────────── */

.services-why {
  padding: 5rem 0 6rem;
}

.svc-why-header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 3rem;
}

.svc-why-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  max-width: 900px;
  margin: 0 auto;
  border: 1px solid var(--c-line);
  border-radius: 12px;
  overflow: hidden;
}
.svc-why-item {
  opacity: 0;
  padding: 2.4rem 2.2rem;
  background: linear-gradient(180deg, rgba(45, 1, 64, 0.30), rgba(1, 3, 38, 0.40));
}
.svc-why-item:first-child { border-right: 1px solid var(--c-line); }
.svc-why-item h3 {
  font-family: var(--ff-display);
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--c-text);
  margin-bottom: 0.7rem;
}
.svc-why-item p {
  font-family: var(--ff-body);
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--c-muted);
}

/* ── CTA band ─────────────────────────────────────────────────────────── */

.services-cta {
  padding: 3rem 0 8rem;
}
.services-cta-inner {
  opacity: 0;
  max-width: 640px;
  margin: 0 auto;
  padding: 3.5rem 2.5rem;
  text-align: center;
  border-radius: 20px;
  background: linear-gradient(160deg, rgba(45, 1, 64, 0.55), rgba(1, 3, 38, 0.6));
  border: 1px solid rgba(157, 91, 255, 0.22);
}
.services-cta-sub {
  font-family: var(--ff-body);
  font-size: 0.95rem;
  color: var(--c-muted);
  margin: 1rem 0 1.8rem;
}

@media (max-width: 1024px) {
  .asm-intro { padding: calc(var(--nav-h) + 3.5rem) 2rem 3rem; }
}

@media (max-width: 900px) {
  .svc-why-grid { grid-template-columns: 1fr; }
  .svc-why-item:first-child { border-right: none; border-bottom: 1px solid var(--c-line); }
}

@media (max-width: 767px) {
  .services-cta { padding: 2rem 0 6rem; }
  .services-cta-inner { padding: 2.6rem 1.6rem; }
}

@media (max-width: 480px) {
  .svc-why-item { padding: 2rem 1.6rem; }
}

@media (prefers-reduced-motion: reduce) {
  .svc-why-item,
  .services-cta-inner {
    opacity: 1;
    transform: none;
  }
}

/* ============================================================
   TOOL SUBPAGES — service-lesson-plan.html (FIRST of four, and the
   TEMPLATE the other three — Writing Feedback / Text Level Adaptor /
   Speaking Booster — are copied from). Every class below is deliberately
   generic (.tool-*) rather than plan-specific, so copying the page only
   means swapping content, not class names. The one content-shaped
   exception is the vocab table's extra teacher columns (word/pos/category
   vs meaning/definition) and the exercises — those follow this file's own
   .tool-demo-* naming too, since every tool's demo will need its own
   section/exercise shapes anyway.

   Palette: five source tokens + their derived tints/neutrals only (see
   :root above) — no blue/green anywhere, including the demo's own chrome
   (the client's real product uses blue/green; this is deliberately
   re-skinned into the site's own palette).
   ============================================================ */

/* ── Hero ───────────────────────────────────────────────── */
.tool-hero {
  padding: calc(var(--nav-h) + 6rem) 0 5rem;
  position: relative;
}
.tool-hero-inner {
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
}
.tool-hero-eyebrow { margin-bottom: 0.9rem; }
.tool-hero-heading { margin-top: 0; }
.tool-hero-sub {
  font-family: var(--ff-body);
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--c-muted);
  max-width: 620px;
  margin: 1.4rem auto 0;
}
.tool-hero-ctas {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.6rem;
  margin-top: 2.2rem;
}
.tool-hero-cta-secondary {
  font-family: var(--ff-body);
  font-size: 0.86rem;
  font-weight: 500;
  color: var(--c-muted);
  border-bottom: 1px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}
.tool-hero-cta-secondary:hover { color: var(--c-text); border-bottom-color: var(--c-line); }

/* ── How it works ───────────────────────────────────────── */
.tool-how { padding: 5rem 0; }
.tool-how-header { text-align: center; margin-bottom: 3.5rem; }
.tool-how-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.6rem;
  max-width: 1000px;
  margin: 0 auto;
}
.tool-how-step {
  opacity: 0;
  transform: translateY(28px);
  background: linear-gradient(180deg, rgba(45, 1, 64, 0.4) 0%, rgba(1, 3, 38, 0.45) 100%);
  border: 1px solid rgba(157, 91, 255, 0.18);
  border-radius: 14px;
  padding: 1.8rem 1.6rem;
  text-align: center;
}
.tool-how-step-num {
  display: block;
  font-family: var(--ff-display);
  font-weight: 800;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  color: var(--c-violet-hi);
  opacity: 0.75;
  margin-bottom: 0.7rem;
}
.tool-how-step-title {
  font-family: var(--ff-display);
  font-weight: 800;
  font-size: 1.08rem;
  color: var(--c-text);
  margin-bottom: 0.45rem;
}
.tool-how-step-desc {
  font-family: var(--ff-body);
  font-size: 0.86rem;
  line-height: 1.55;
  color: var(--c-muted);
}

/* ── The scripted demo — "stage" chrome ─────────────────── */
.tool-demo { padding: 5rem 0 6rem; }
.tool-demo-head { text-align: center; margin-bottom: 3rem; }

.tool-demo-stage {
  opacity: 0;
  max-width: 880px;
  margin: 0 auto;
  background: linear-gradient(180deg, rgba(45, 1, 64, 0.55) 0%, rgba(1, 3, 38, 0.62) 100%);
  border: 1px solid rgba(157, 91, 255, 0.22);
  border-top-color: rgba(199, 125, 255, 0.40);
  border-radius: 18px;
  box-shadow: 0 26px 60px -26px rgba(163, 5, 166, 0.42),
              inset 0 1px 0 rgba(236, 232, 245, 0.05);
  overflow: hidden;
}

.tool-demo-chrome {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.9rem 1.3rem;
  border-bottom: 1px solid var(--c-line);
  background: rgba(1, 3, 38, 0.35);
}
.tool-demo-dots { display: flex; gap: 0.4rem; }
.tool-demo-dots span {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--c-muted);
  opacity: 0.5;
}
.tool-demo-dots span:nth-child(2) { background: var(--c-violet); opacity: 0.8; }
.tool-demo-dots span:nth-child(3) { background: var(--c-magenta); opacity: 0.8; }
.tool-demo-tab {
  font-family: var(--ff-body);
  font-weight: 600;
  font-size: 0.78rem;
  color: var(--c-text);
  opacity: 0.85;
}
.tool-demo-status {
  margin-left: auto;
  font-family: var(--ff-body);
  font-weight: 600;
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--c-violet-hi);
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  border: 1px solid rgba(157, 91, 255, 0.3);
  background: rgba(157, 91, 255, 0.1);
  transition: color 0.3s, border-color 0.3s, background 0.3s;
}

.tool-demo-body { padding: 1.6rem 1.5rem 2rem; }

/* ── Demo — input phase (scripted, never real form controls) ───────── */
.tool-demo-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
/* Only the now-irrelevant field values dim/disable once a result exists —
   scoped to the field wrappers, NOT the whole form, so the Generate/Replay
   button (a direct child of .tool-demo-form, doubling as Replay after the
   first play) never inherits pointer-events:none and stays clickable. */
.tool-demo-form.is-done > .tool-demo-field,
.tool-demo-form.is-done > .tool-demo-field-row {
  opacity: 0.5;
  pointer-events: none;
  transition: opacity 0.4s var(--ease-out);
}

.tool-demo-field { display: flex; flex-direction: column; gap: 0.4rem; }
.tool-demo-field-row { display: flex; gap: 1rem; }
.tool-demo-field--half { flex: 1 1 0; }

.tool-demo-field-label {
  font-family: var(--ff-body);
  font-weight: 600;
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--c-muted);
}
.tool-demo-field-value {
  display: flex;
  align-items: center;
  min-height: 2.5rem;
  padding: 0 0.9rem;
  border: 1px solid rgba(236, 232, 245, 0.14);
  border-radius: 9px;
  background: rgba(1, 3, 38, 0.4);
  font-family: var(--ff-body);
  font-size: 0.9rem;
  color: var(--c-text);
}
.tool-demo-caret {
  display: inline-block;
  width: 2px;
  height: 1.05em;
  margin-left: 2px;
  background: var(--c-violet-hi);
  animation: toolDemoCaretBlink 0.9s steps(1) infinite;
}
@keyframes toolDemoCaretBlink { 50% { opacity: 0; } }

.tool-demo-chipgroup { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.tool-demo-chip {
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.35s var(--ease-out), transform 0.35s var(--ease-out);
  font-family: var(--ff-body);
  font-weight: 600;
  font-size: 0.76rem;
  color: var(--c-violet-hi);
  padding: 0.34rem 0.8rem;
  border-radius: 999px;
  border: 1px solid rgba(157, 91, 255, 0.28);
  background: rgba(157, 91, 255, 0.1);
}
.tool-demo-chip.is-shown { opacity: 1; transform: translateY(0); }

.tool-demo-generate {
  align-self: flex-start;
  margin-top: 0.6rem;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.85rem 2rem;
  font-size: 0.94rem;
  border-radius: 999px;
  box-shadow: 0 14px 34px -16px rgba(163, 5, 166, 0.55);
  animation: toolDemoGenerateGlow 2.6s ease-in-out infinite;
  transition: opacity 0.2s, transform 0.15s var(--ease-out), filter 0.2s, box-shadow 0.3s var(--ease-out);
}
.tool-demo-generate-bolt { flex-shrink: 0; }
.tool-demo-generate:hover { filter: brightness(1.08); }
.tool-demo-generate:disabled {
  opacity: 0.7;
  cursor: default;
  animation-play-state: paused;
}
.tool-demo-generate.is-charging {
  transform: scale(0.97);
  animation: toolDemoGenerateGlow 2.6s ease-in-out infinite, toolDemoGenerateCharge 0.42s ease-out;
}
.tool-demo-generate.is-charging .tool-demo-generate-bolt {
  animation: toolDemoBoltCharge 0.42s ease-in-out;
}

@keyframes toolDemoGenerateGlow {
  0%, 100% { box-shadow: 0 14px 34px -16px rgba(163, 5, 166, 0.55); }
  50%      { box-shadow: 0 0 0 9px rgba(199, 125, 255, 0.10), 0 18px 40px -16px rgba(163, 5, 166, 0.65); }
}
@keyframes toolDemoGenerateCharge {
  0%   { box-shadow: 0 14px 34px -16px rgba(163, 5, 166, 0.55); }
  45%  { box-shadow: 0 0 0 14px rgba(199, 125, 255, 0.24), 0 20px 46px -16px rgba(163, 5, 166, 0.78); }
  100% { box-shadow: 0 14px 34px -16px rgba(163, 5, 166, 0.55); }
}
@keyframes toolDemoBoltCharge {
  0%   { filter: drop-shadow(0 0 0 rgba(199, 125, 255, 0)); transform: scale(1); }
  45%  { filter: drop-shadow(0 0 6px rgba(199, 125, 255, 0.95)); transform: scale(1.25); }
  100% { filter: drop-shadow(0 0 0 rgba(199, 125, 255, 0)); transform: scale(1); }
}

.tool-demo-progress {
  height: 4px;
  border-radius: 999px;
  background: rgba(236, 232, 245, 0.08);
  overflow: hidden;
  opacity: 0;
  transition: opacity 0.3s var(--ease-out);
}
.tool-demo-progress.is-active { opacity: 1; }
.tool-demo-progress-fill {
  display: block;
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--c-violet), var(--c-magenta));
  transition: width 2.6s linear;
}

/* ── Demo — result phase ─────────────────────────────────────────── */
/* Plain `hidden` (display:none) until Generate's sweep completes — nothing
   reserved, nothing sitting in the layout or hit-test tree while inactive,
   so there's never a blank gap or a stray invisible layer eating clicks.
   Once shown, .is-shown just fades it in; the Student<->Teacher flip's own
   height change is animated separately in JS (settleResultHeight). */
.tool-demo-result {
  margin-top: 2rem;
  padding-top: 1.8rem;
  border-top: 1px solid var(--c-line);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.7s var(--ease-out);
}
.tool-demo-result.is-shown { opacity: 1; pointer-events: auto; }

.tool-demo-result-header { margin-bottom: 1.8rem; }
.tool-demo-result-title-row {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.7rem 1rem;
  margin-bottom: 1rem;
}
.tool-demo-result-title {
  font-family: var(--ff-display);
  font-weight: 800;
  font-size: 1.3rem;
  color: var(--c-text);
}
.tool-demo-result-meta { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.tool-demo-result-pill {
  font-family: var(--ff-body);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--c-muted);
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  border: 1px solid var(--c-line);
}

.tool-demo-toggle {
  display: inline-flex;
  padding: 0.25rem;
  border-radius: 999px;
  border: 1px solid var(--c-line);
  background: rgba(1, 3, 38, 0.4);
  margin-bottom: 0.9rem;
}
.tool-demo-toggle-btn {
  font-family: var(--ff-body);
  font-weight: 600;
  font-size: 0.78rem;
  color: var(--c-muted);
  padding: 0.5rem 1.1rem;
  border-radius: 999px;
  transition: color 0.25s, background 0.25s;
}
.tool-demo-toggle-btn.is-active {
  color: var(--c-text);
  background: linear-gradient(135deg, var(--c-violet), var(--c-magenta));
}

.tool-demo-result-note {
  font-family: var(--ff-body);
  font-size: 0.82rem;
  color: var(--c-muted);
  font-style: italic;
}

/* Version visibility — the single mechanism the whole demo's Student/
   Teacher switch relies on. Works on inline spans, table header/cells
   (plain `display:none` removes just that column, leaving the row's other
   cells to occupy the same position either way — see the vocab table's own
   comment in service-lesson-plan.html) and whole section wrappers alike. */
.tool-demo-result:not(.is-teacher) .teacher-only { display: none; }
.tool-demo-result.is-teacher .student-only { display: none; }

.tool-demo-sections { display: flex; flex-direction: column; gap: 2.2rem; }

.tool-demo-section {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.85s var(--ease-out), transform 0.85s var(--ease-out);
}
.tool-demo-section.is-revealed { opacity: 1; transform: translateY(0); }

/* Inner-item stagger — table rows / list items / exercises ease in just
   after their parent section, keyed off the section's own is-revealed
   class. transform+opacity only, so — like the section reveal itself —
   this never touches layout height (a hidden row still occupies its row
   box; only its paint position/opacity animate). */
.tool-demo-objectives li,
.tool-demo-list li,
.tool-demo-table tbody tr,
.tool-demo-exercise {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.5s var(--ease-out), transform 0.5s var(--ease-out);
}
.tool-demo-section.is-revealed .tool-demo-objectives li,
.tool-demo-section.is-revealed .tool-demo-list li,
.tool-demo-section.is-revealed .tool-demo-table tbody tr,
.tool-demo-section.is-revealed .tool-demo-exercise {
  opacity: 1;
  transform: translateY(0);
}
.tool-demo-objectives li:nth-child(1), .tool-demo-list li:nth-child(1),
.tool-demo-table tbody tr:nth-child(1), .tool-demo-exercise:nth-child(1) { transition-delay: 0.05s; }
.tool-demo-objectives li:nth-child(2), .tool-demo-list li:nth-child(2),
.tool-demo-table tbody tr:nth-child(2), .tool-demo-exercise:nth-child(2) { transition-delay: 0.13s; }
.tool-demo-objectives li:nth-child(3), .tool-demo-list li:nth-child(3),
.tool-demo-table tbody tr:nth-child(3), .tool-demo-exercise:nth-child(3) { transition-delay: 0.21s; }
.tool-demo-table tbody tr:nth-child(4), .tool-demo-exercise:nth-child(4) { transition-delay: 0.29s; }
.tool-demo-table tbody tr:nth-child(5) { transition-delay: 0.37s; }

.tool-demo-section-titlebar {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.6rem;
}
.tool-demo-section-title {
  font-family: var(--ff-display);
  font-weight: 800;
  font-size: 1.02rem;
  color: var(--c-text);
  margin-bottom: 0.6rem;
}
.tool-demo-section-titlebar .tool-demo-section-title { margin-bottom: 0; }
.tool-demo-section-time {
  flex-shrink: 0;
  font-family: var(--ff-body);
  font-weight: 600;
  font-size: 0.7rem;
  color: var(--c-muted);
  border: 1px solid var(--c-line);
  border-radius: 999px;
  padding: 0.22rem 0.6rem;
}

.tool-demo-section-body {
  font-family: var(--ff-body);
  font-size: 0.88rem;
  line-height: 1.65;
  color: var(--c-muted);
  margin-bottom: 0.7rem;
}

.tool-demo-objectives,
.tool-demo-list {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.tool-demo-objectives li,
.tool-demo-list li {
  position: relative;
  padding-left: 1.15rem;
  font-family: var(--ff-body);
  font-size: 0.86rem;
  line-height: 1.55;
  color: var(--c-muted);
}
.tool-demo-objectives li::before,
.tool-demo-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--c-magenta);
}

.tool-demo-procedure {
  margin-top: 0.8rem;
  padding: 0.8rem 1rem;
  border-radius: 10px;
  border: 1px solid rgba(157, 91, 255, 0.22);
  background: rgba(157, 91, 255, 0.06);
  font-family: var(--ff-body);
  font-size: 0.82rem;
  line-height: 1.55;
  color: var(--c-muted);
}
.tool-demo-procedure-label {
  display: inline-block;
  font-weight: 700;
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--c-violet-hi);
  margin-right: 0.4rem;
}

/* ── Tables (Grammar Focus / vocabulary) — internally scrollable so a
   wide table (5-6 columns, longer in Greek) never overflows the page. ── */
.tool-demo-table-wrap {
  margin-top: 0.9rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--c-line);
  border-radius: 10px;
}
.tool-demo-table {
  width: 100%;
  min-width: 480px;
  border-collapse: collapse;
  font-family: var(--ff-body);
  font-size: 0.8rem;
}
.tool-demo-table--vocab { min-width: 620px; }
.tool-demo-table th,
.tool-demo-table td {
  text-align: left;
  padding: 0.6rem 0.8rem;
  border-bottom: 1px solid var(--c-line);
  white-space: normal;
}
.tool-demo-table th {
  font-weight: 600;
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--c-muted);
  background: rgba(157, 91, 255, 0.06);
}
.tool-demo-table td { color: var(--c-muted); }
.tool-demo-table td:first-child { color: var(--c-text); font-weight: 600; }
.tool-demo-table tbody tr:last-child td { border-bottom: none; }

/* ── Exercises ────────────────────────────────────────────────────── */
.tool-demo-exercises {
  margin-top: 1.1rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.9rem;
}
.tool-demo-exercise {
  padding: 0.9rem 1rem;
  border-radius: 10px;
  border: 1px solid var(--c-line);
  background: rgba(1, 3, 38, 0.3);
}
.tool-demo-exercise-head {
  font-family: var(--ff-body);
  font-weight: 600;
  font-size: 0.74rem;
  color: var(--c-violet-hi);
  margin-bottom: 0.4rem;
}
.tool-demo-exercise-num { text-transform: uppercase; letter-spacing: 0.04em; }
.tool-demo-exercise-prompt {
  font-family: var(--ff-body);
  font-size: 0.86rem;
  color: var(--c-text);
}
.tool-demo-exercise-answer {
  margin-top: 0.5rem;
  font-family: var(--ff-body);
  font-size: 0.82rem;
  color: var(--c-muted);
}
/* Multi-item exercises (Lesson Builder): one exercise per row, its items
   numbered inside the card. The whole card fades in as one group, so eight
   items never add eight reveal beats. */
.tool-demo-exercises--stack { grid-template-columns: 1fr; }
.tool-demo-ex-items {
  margin-top: 0.6rem;
  padding-left: 1.4rem;
  list-style: decimal;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  font-family: var(--ff-body);
  font-size: 0.85rem;
  line-height: 1.55;
  color: var(--c-text);
}
.tool-demo-ex-items li::marker { color: var(--c-violet-hi); font-weight: 600; }
.tool-demo-ex-options {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.8rem;
  color: var(--c-muted);
}
.tool-demo-ex-answers { margin-top: 0.4rem; font-size: 0.82rem; color: var(--c-muted); }

/* ── Teacher-only sections divider + Common Mistakes/Feedback Moves ─── */
.tool-demo-teacher-divider {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  font-family: var(--ff-body);
  font-weight: 600;
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--c-violet-hi);
}
.tool-demo-teacher-divider::before,
.tool-demo-teacher-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(157, 91, 255, 0.25);
}

.tool-demo-mistake {
  padding: 0.8rem 1rem;
  border-radius: 10px;
  border: 1px solid rgba(157, 91, 255, 0.18);
  background: rgba(157, 91, 255, 0.05);
  margin-bottom: 0.7rem;
  font-family: var(--ff-body);
  font-size: 0.84rem;
  line-height: 1.55;
  color: var(--c-muted);
}
.tool-demo-mistake:last-child { margin-bottom: 0; }
.tool-demo-mistake-section {
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: var(--c-text);
  margin-bottom: 0.35rem;
}

/* ── Key features / Who it's for — shared card grid language ────────── */
.tool-features, .tool-audience { padding: 5rem 0; }
.tool-features-header, .tool-audience-header { text-align: center; margin-bottom: 3.5rem; }

.tool-features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.4rem;
}
.tool-audience-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.6rem;
  max-width: 1000px;
  margin: 0 auto;
}
.tool-audience-grid--two {
  grid-template-columns: repeat(2, 1fr);
  max-width: 680px;
}

.tool-feature-card,
.tool-audience-card {
  opacity: 0;
  transform: translateY(28px);
  background: linear-gradient(180deg, rgba(45, 1, 64, 0.45) 0%, rgba(1, 3, 38, 0.5) 100%);
  border: 1px solid rgba(157, 91, 255, 0.2);
  border-top-color: rgba(199, 125, 255, 0.36);
  border-radius: 14px;
  padding: 1.7rem 1.5rem;
}
.tool-feature-title,
.tool-audience-title {
  font-family: var(--ff-display);
  font-weight: 800;
  font-size: 1.02rem;
  color: var(--c-text);
  margin-bottom: 0.55rem;
}
.tool-feature-desc,
.tool-audience-desc {
  font-family: var(--ff-body);
  font-size: 0.84rem;
  line-height: 1.6;
  color: var(--c-muted);
}

/* ── Final CTA ────────────────────────────────────────────────────── */
.tool-final-cta { padding: 3rem 0 7rem; }
.tool-final-cta-inner {
  opacity: 0;
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
  padding: 3rem 2.5rem;
  border-radius: 20px;
  border: 1px solid rgba(157, 91, 255, 0.22);
  background: linear-gradient(180deg, rgba(45, 1, 64, 0.5) 0%, rgba(1, 3, 38, 0.55) 100%);
}
.tool-final-cta-inner .section-headline { margin-bottom: 1.6rem; }

/* ── Responsive — tablet ─────────────────────────────────────────── */
@media (max-width: 1024px) {
  .tool-hero { padding: calc(var(--nav-h) + 4.5rem) 0 4rem; }
  .tool-how-steps { gap: 1.2rem; }
  .tool-demo-stage { max-width: 92%; }
  .tool-features-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ── Responsive — mobile ─────────────────────────────────────────── */
@media (max-width: 767px) {
  .tool-hero { padding: calc(var(--nav-h) + 3rem) 1.5rem 3rem; }
  .tool-hero-ctas { flex-direction: column; gap: 1.1rem; }
  .tool-hero-ctas .btn { width: 100%; }

  .tool-how { padding: 3.5rem 0; }
  .tool-how-steps { grid-template-columns: 1fr; }

  .tool-demo { padding: 3.5rem 0 4rem; }
  .tool-demo-stage { max-width: 100%; border-radius: 14px; }
  .tool-demo-body { padding: 1.2rem 1rem 1.6rem; }
  .tool-demo-field-row { flex-direction: column; gap: 0.9rem; }
  .tool-demo-generate { padding: 0.78rem 1.7rem; font-size: 0.9rem; }
  .tool-demo-exercises { grid-template-columns: 1fr; }
  .tool-demo-result-title { font-size: 1.12rem; }

  .tool-features, .tool-audience { padding: 3.5rem 0; }
  .tool-features-grid { grid-template-columns: 1fr; }
  .tool-audience-grid { grid-template-columns: 1fr; }

  .tool-final-cta { padding: 1.5rem 0 5rem; }
  .tool-final-cta-inner { padding: 2.4rem 1.6rem; }
}

@media (prefers-reduced-motion: reduce) {
  .tool-hero-eyebrow, .tool-hero-heading, .tool-hero-sub, .tool-hero-ctas,
  .tool-how-header .section-eyebrow, .tool-how-header .section-headline, .tool-how-step,
  .tool-demo-head .section-eyebrow, .tool-demo-head .section-headline, .tool-demo-stage,
  .tool-features-header .section-eyebrow, .tool-features-header .section-headline, .tool-feature-card,
  .tool-audience-header .section-eyebrow, .tool-audience-header .section-headline, .tool-audience-card,
  .tool-final-cta-inner, .tool-final-cta .section-headline {
    opacity: 1;
    transform: none;
  }
  /* Demo chrome: no typing caret, no progress sweep animation, no chip/
     section fade-in, no resting glow/charge on Generate, no cross-fade on
     flip — service-lesson-plan.js's playFilmInstant() renders the final
     state directly with these classes already applied, so this just
     removes the transition/animation that would otherwise still fire once. */
  .tool-demo-caret { animation: none; opacity: 0; }
  .tool-demo-progress-fill { transition: none; }
  .tool-demo-chip, .tool-demo-section, .tool-demo-result,
  .tool-demo-objectives li, .tool-demo-list li,
  .tool-demo-table tbody tr, .tool-demo-exercise { transition: none; }
  .tool-demo-generate,
  .tool-demo-generate.is-charging,
  .tool-demo-generate.is-charging .tool-demo-generate-bolt { animation: none; }
}

/* ============================================================
   TEXT LEVEL ADAPTOR — demo-only additions (service-text-adaptor.html).
   Everything shared with the tool-subpage family (hero/how/features/
   audience/final-cta, the demo stage chrome, the form/result/toggle
   machinery, the section reveal + inner-item stagger, the Generate button)
   is the exact same .tool-* system above — untouched, not duplicated. Only
   this tool's own content shapes get new classes here: a multi-line source-
   text field, a static on/off switch, the level-transition chip, the
   Original/Adapted compare block, and MCQ options + an answer "blank" for
   the comprehension questions. Same palette rule as above — five source
   tokens + derived only, no blue/green.
   ============================================================ */

/* ── Multi-line source-text field (vs. the single-line field-value) ──── */
.tool-demo-field-value--text {
  align-items: flex-start;
  min-height: auto;
  padding: 0.75rem 0.9rem;
  line-height: 1.6;
  white-space: normal;
}

/* ── Static on/off switch (the "add glossary + questions" toggle) ────── */
.tool-demo-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 2.5rem;
}
.tool-demo-switch-track {
  position: relative;
  width: 34px;
  height: 18px;
  border-radius: 999px;
  background: rgba(236, 232, 245, 0.12);
  border: 1px solid rgba(236, 232, 245, 0.16);
}
.tool-demo-switch-thumb {
  position: absolute;
  top: 1px;
  left: 1px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--c-muted);
}
.tool-demo-switch.is-on .tool-demo-switch-track {
  background: linear-gradient(135deg, var(--c-violet), var(--c-magenta));
  border-color: transparent;
}
.tool-demo-switch.is-on .tool-demo-switch-thumb { transform: translateX(16px); background: var(--c-text); }
.tool-demo-switch-state {
  font-family: var(--ff-body);
  font-weight: 600;
  font-size: 0.76rem;
  color: var(--c-violet-hi);
}

/* ── Detected-level transition chip ("B2–C1 → C2") ────────────────────── */
.tool-demo-level-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem 1.1rem;
  border-radius: 999px;
  border: 1px solid rgba(157, 91, 255, 0.32);
  background: rgba(157, 91, 255, 0.1);
  font-family: var(--ff-display);
  font-weight: 800;
  font-size: 1rem;
  color: var(--c-text);
}
.tool-demo-level-chip-arrow { color: var(--c-violet-hi); }
/* "estimated" next to the source level, as the app labels it: the source
   level is an estimate, the target is the teacher's choice. */
.tool-demo-level-chip-note {
  margin-left: -0.3rem;
  font-family: var(--ff-body);
  font-weight: 500;
  font-size: 0.72rem;
  font-style: italic;
  color: var(--c-muted);
}
.tool-demo-level-chip-end {
  background: linear-gradient(135deg, var(--c-violet-hi), var(--c-magenta));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ── The Transformation — Original / Adapted compare block. Side by side
   on desktop; stacks on mobile (see the responsive rule below) — never
   shrinks to unreadable, never causes page-level horizontal overflow (the
   grid columns themselves wrap text normally, no min-width forcing scroll
   the way the vocab table needs it). ──────────────────────────────────── */
.tool-demo-compare {
  margin-top: 0.9rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.tool-demo-compare-col {
  padding: 1rem 1.1rem;
  border-radius: 10px;
  border: 1px solid var(--c-line);
  background: rgba(1, 3, 38, 0.3);
}
.tool-demo-compare-col--adapted {
  border-color: rgba(157, 91, 255, 0.35);
  background: rgba(157, 91, 255, 0.07);
}
.tool-demo-section.is-revealed .tool-demo-compare-col--adapted {
  animation: toolDemoAdaptedEmphasis 1.4s var(--ease-out) 0.3s 1 both;
}
@keyframes toolDemoAdaptedEmphasis {
  0%   { box-shadow: 0 0 0 0 rgba(199, 125, 255, 0); }
  35%  { box-shadow: 0 0 0 6px rgba(199, 125, 255, 0.18); }
  100% { box-shadow: 0 0 0 0 rgba(199, 125, 255, 0); }
}
.tool-demo-compare-label {
  font-family: var(--ff-body);
  font-weight: 700;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--c-muted);
  margin-bottom: 0.6rem;
}
.tool-demo-compare-col--adapted .tool-demo-compare-label { color: var(--c-violet-hi); }
.tool-demo-compare-text {
  font-family: var(--ff-body);
  font-size: 0.87rem;
  line-height: 1.7;
  color: var(--c-muted);
}
.tool-demo-compare-col--adapted .tool-demo-compare-text { color: var(--c-text); }

/* ── Reading comprehension — MCQ options + the Student-view answer
   "blank" (an empty worksheet-style box; teacher view shows the real
   answer line instead — see .tool-demo-exercise-answer, reused as-is). ── */
.tool-demo-questions {
  margin-top: 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}
.tool-demo-mcq-options {
  margin-top: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
.tool-demo-mcq-options li {
  font-family: var(--ff-body);
  font-size: 0.85rem;
  color: var(--c-muted);
}
.tool-demo-answer-blank {
  margin-top: 0.6rem;
  height: 2.3rem;
  border-radius: 8px;
  border: 1px dashed rgba(236, 232, 245, 0.16);
}

/* ── Responsive — tablet/mobile ───────────────────────────────────────── */
@media (max-width: 1024px) {
  .tool-demo-compare { gap: 0.8rem; }
}
@media (max-width: 767px) {
  .tool-demo-compare { grid-template-columns: 1fr; gap: 0.9rem; }
}

@media (prefers-reduced-motion: reduce) {
  .tool-demo-compare-col--adapted { animation: none; }
}

/* ============================================================
   SPEAKING BOOSTER — demo-only additions (service-speaking-booster.html).
   Everything else — hero/how/features/audience/final-cta, the demo stage
   chrome, the form/result/toggle machinery, the section reveal + inner-item
   stagger, the Generate button, and the Student A / Student B two-role
   block (which reuses .tool-demo-compare verbatim, no --adapted modifier
   since both roles carry equal weight) — is the shared .tool-* system
   above, untouched. Only two small content shapes are new: a "selected"
   state for the activity-type chip group, and a scenario title / guidance
   sub-label pair. Same palette rule — five source tokens + derived only,
   no blue/green/orange.
   ============================================================ */

.tool-demo-chip.is-selected {
  background: linear-gradient(135deg, var(--c-violet), var(--c-magenta));
  border-color: transparent;
  color: var(--c-text);
}

.tool-demo-scenario-title {
  font-family: var(--ff-display);
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--c-text);
  margin-bottom: 0.5rem;
}

.tool-demo-guidance-label {
  margin-top: 1rem;
  font-family: var(--ff-body);
  font-weight: 700;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--c-violet-hi);
  margin-bottom: 0.5rem;
}

/* Speaking Studio: each student's card carries a stance line and its own
   Key Vocabulary (phrase + usage note), as the app's student cards do. */
.tool-demo-speaking-stance {
  display: inline-block;
  margin-bottom: 0.55rem;
  padding: 0.18rem 0.6rem;
  border-radius: 999px;
  border: 1px solid rgba(163, 5, 166, 0.35);
  background: rgba(163, 5, 166, 0.1);
  font-family: var(--ff-body);
  font-weight: 600;
  font-size: 0.72rem;
  color: var(--c-text);
}
.tool-demo-vocab {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.55rem;
}
.tool-demo-vocab li {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
  padding-left: 0.7rem;
  border-left: 2px solid rgba(157, 91, 255, 0.4);
}
.tool-demo-vocab-phrase {
  font-family: var(--ff-body);
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--c-text);
}
.tool-demo-vocab-note {
  font-family: var(--ff-body);
  font-size: 0.8rem;
  line-height: 1.5;
  color: var(--c-muted);
}

/* Speaking Studio: separate student sheets. Student A's sheet shows only
   .sheet-a, Student B's only .sheet-b (full width); the teacher edition
   shows both cards side by side. */
.tool-demo-result:not(.is-teacher) .tool-demo-compare--sheets { grid-template-columns: 1fr; }
.tool-demo-result:not(.is-teacher):not(.is-sheet-b) .sheet-b { display: none; }
.tool-demo-result.is-sheet-b:not(.is-teacher) .sheet-a { display: none; }
.tool-demo-toggle--three { max-width: 100%; }
.tool-demo-toggle--three .tool-demo-toggle-btn { white-space: nowrap; }
@media (max-width: 480px) {
  .tool-demo-toggle--three .tool-demo-toggle-btn { padding: 0.5rem 0.7rem; font-size: 0.74rem; }
}

/* ============================================================
   WRITING FEEDBACK — demo-only additions (service-writing-feedback.html).
   FOURTH and final tool subpage. Everything else — hero/how/features/
   audience/final-cta, the demo stage chrome, the form/result machinery, the
   section reveal + inner-item stagger, the Generate button — is the shared
   .tool-* system above, untouched. This is the one tool in the family with
   NO Student/Teacher toggle (a single report), so none of the toggle/
   student-only/teacher-only classes appear on this page at all. Four new
   content shapes: the score-chip centerpiece (with a stable-width count-up
   number), the rubric rows, the correction card, and the decorative
   download affordance. Same palette rule as the rest of the file — five
   source tokens + derived only, no blue/green/orange.
   ============================================================ */

/* ── Score chip — the page's visual centerpiece. Deliberately built as a
   large standalone readout, not reusing .tool-demo-result-pill's small
   type. .tool-demo-score-num reserves its own box width (tabular-nums +
   min-width sized for 1 digit) so the JS count-up (0 -> 9) only ever
   changes textContent inside an already-sized box — the chip never
   reflows, and nothing else on the page shifts as the digits change. ──── */
.tool-demo-score-row {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.7rem 1.2rem;
}
.tool-demo-score-chip {
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
}
.tool-demo-score-num {
  display: inline-block;
  min-width: 1ch;
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-family: var(--ff-display);
  font-weight: 900;
  font-size: 3.4rem;
  line-height: 1;
  background: linear-gradient(135deg, var(--c-violet-hi), var(--c-magenta));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.tool-demo-score-den {
  font-family: var(--ff-body);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--c-muted);
}
.tool-demo-score-band {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.4rem 0.9rem;
  border-radius: 10px;
  border: 1px solid rgba(157, 91, 255, 0.28);
  background: rgba(157, 91, 255, 0.09);
}
.tool-demo-score-band-label {
  font-family: var(--ff-body);
  font-weight: 600;
  font-size: 0.64rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--c-muted);
}
.tool-demo-score-band-value {
  font-family: var(--ff-display);
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--c-text);
}

/* ── Assessment rubric — a set of stacking rows, not a wide <table>. Long
   comments (and longer still in Greek) would force a horizontal-scroll
   wrapper the way the vocabulary table needs one; rows sidestep that
   entirely, since a flex column always fits the available width and wraps
   its own head row on narrow screens instead of scrolling the page. ──── */
.tool-demo-rubric {
  margin-top: 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}
.tool-demo-rubric-row {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.5s var(--ease-out), transform 0.5s var(--ease-out);
}
.tool-demo-section.is-revealed .tool-demo-rubric-row { opacity: 1; transform: translateY(0); }
.tool-demo-rubric-row:nth-child(1) { transition-delay: 0.05s; }
.tool-demo-rubric-row:nth-child(2) { transition-delay: 0.13s; }
.tool-demo-rubric-row:nth-child(3) { transition-delay: 0.21s; }
.tool-demo-rubric-row:nth-child(4) { transition-delay: 0.29s; }

.tool-demo-rubric-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.25rem 0.75rem;
  margin-bottom: 0.4rem;
}
.tool-demo-rubric-crit {
  font-family: var(--ff-body);
  font-weight: 700;
  font-size: 0.86rem;
  color: var(--c-text);
}
.tool-demo-rubric-score {
  flex-shrink: 0;
  font-family: var(--ff-display);
  font-weight: 800;
  font-size: 0.92rem;
  color: var(--c-violet-hi);
}
.tool-demo-rubric-score-den { color: var(--c-muted); font-weight: 600; }

.tool-demo-rubric-bar-track {
  height: 5px;
  border-radius: 999px;
  background: rgba(236, 232, 245, 0.08);
  overflow: hidden;
  margin-bottom: 0.5rem;
}
.tool-demo-rubric-bar-fill {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--c-violet), var(--c-magenta));
  transition: width 1s var(--ease-out);
}
.tool-demo-section.is-revealed .tool-demo-rubric-bar-fill { width: var(--fill); }

.tool-demo-rubric-comment {
  font-family: var(--ff-body);
  font-size: 0.84rem;
  line-height: 1.6;
  color: var(--c-muted);
}

/* ── Detailed corrections — one card per flagged issue: a category tag, a
   before/after diff line, and the explanation underneath. ─────────────── */
.tool-demo-correction {
  padding: 0.9rem 1rem;
  border-radius: 10px;
  border: 1px solid rgba(157, 91, 255, 0.2);
  background: rgba(1, 3, 38, 0.3);
}
.tool-demo-correction-tag {
  display: inline-block;
  font-family: var(--ff-body);
  font-weight: 700;
  font-size: 0.64rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--c-violet-hi);
  padding: 0.22rem 0.6rem;
  border-radius: 999px;
  border: 1px solid rgba(157, 91, 255, 0.3);
  background: rgba(157, 91, 255, 0.1);
  margin-bottom: 0.55rem;
}
.tool-demo-correction-diff {
  font-family: var(--ff-body);
  font-size: 0.92rem;
  margin-bottom: 0.5rem;
}
.tool-demo-correction-before { color: var(--c-muted); text-decoration: line-through; }
.tool-demo-correction-arrow { color: var(--c-violet-hi); margin: 0 0.5rem; }
.tool-demo-correction-after { color: var(--c-text); font-weight: 700; }
.tool-demo-correction-explain {
  font-family: var(--ff-body);
  font-size: 0.84rem;
  line-height: 1.6;
  color: var(--c-muted);
}
.tool-demo-correction + .tool-demo-correction { margin-top: 0.7rem; }
/* Upgrades to reach the level: the original is correct, just simpler than
   the target, so it isn't struck through, and the card leans magenta to
   read apart from the Errors above it. */
.tool-demo-correction--upgrade {
  border-color: rgba(163, 5, 166, 0.3);
  background: rgba(163, 5, 166, 0.06);
}
.tool-demo-correction--upgrade .tool-demo-correction-before { text-decoration: none; }

/* Writing Feedback: the Task line under the report header, and the
   "against B2 criteria" note under the score. */
.tool-demo-result-task {
  margin-top: 0.7rem;
  font-family: var(--ff-body);
  font-size: 0.86rem;
  line-height: 1.55;
  color: var(--c-text);
}
.tool-demo-score-against {
  margin-top: 0.5rem;
  font-family: var(--ff-body);
  font-size: 0.8rem;
  color: var(--c-muted);
}
.tool-demo-score-note {
  margin-top: 0.6rem;
  max-width: 52ch;
  font-family: var(--ff-body);
  font-size: 0.74rem;
  line-height: 1.5;
  font-style: italic;
  color: var(--c-muted);
}
/* Corrected Version: one-line reminder that only errors are fixed here
   (upgrades stay suggestions). Same quiet type as the score note. */
.tool-demo-corrected-note {
  font-family: var(--ff-body);
  font-size: 0.78rem;
  line-height: 1.5;
  font-style: italic;
  color: var(--c-muted);
}

/* ── Download affordance — static and decorative (no file actually
   downloads); a lighter, outlined treatment on purpose so it never reads
   as a second Generate button. aria-hidden in markup, sits outside the
   section cascade so it's simply visible whenever the report is. ──────── */
.tool-demo-download {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin-top: 1.8rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--c-line);
  font-family: var(--ff-body);
  font-weight: 600;
  font-size: 0.84rem;
  color: var(--c-violet-hi);
}

@media (max-width: 767px) {
  .tool-demo-score-num { font-size: 2.6rem; }
  .tool-demo-score-den { font-size: 1rem; }
}

@media (prefers-reduced-motion: reduce) {
  .tool-demo-rubric-row, .tool-demo-rubric-bar-fill { transition: none; }
}

/* ============================================================
   ABOUT — about.html. NOT a tool subpage: no demo stage, no toggle, no
   Generate button, none of the .tool-demo-* machinery above applies here.
   Reuses .tool-hero/.tool-hero-inner/.tool-hero-eyebrow/.tool-hero-heading
   (nav-clearing padding + centered column, unchanged) and .section-eyebrow/
   .section-headline/.tool-final-cta/.tool-final-cta-inner verbatim from the
   shared system. Only this page's own shapes are new: the Sunday->Monday
   atmosphere layer, the hero's three-nodes mark, the prose column, the
   five-problem tint transition + tab-collapse humour beat, a quiet reuse of
   the homepage's CEFR level-bar structure, the library badge, and the
   closing mark/lines. Same palette rule as the rest of the file — five
   source tokens + derived only, no blue/green/orange.
   ============================================================ */

/* ── Sunday -> Monday atmosphere layer — see about.js for the scrub. Paint-
   only; never animated via transform/opacity, so it adds no compositing
   work beyond the color repaint itself. ─────────────────────────────── */
.about-atmosphere {
  position: fixed;
  inset: 0;
  z-index: -2;
  background: var(--c-base);
  pointer-events: none;
}

.about-hero .about-mark {
  display: block;
  width: 100%;
  max-width: 360px;
  height: auto;
  margin: 3.2rem auto 0;
}

/* ── Three-nodes hero mark ────────────────────────────────────────────
   Progressive-enhancement pattern: base rules already render the settled
   state (full opacity, no dash-offset), so prefers-reduced-motion needs no
   override of its own — only the "no-preference" query below adds the
   on-load draw-in. Nodes/traces sit in a roughly square viewBox so the mark
   scales as one unit at any width (no separate mobile markup, no text
   squashing at 390px). ─────────────────────────────────────────────── */
.about-mark-trace {
  fill: none;
  stroke: var(--c-magenta);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-opacity: 0.6;
  stroke-dasharray: 100;
  stroke-dashoffset: 0;
}
.about-mark-trace--2 { stroke: var(--c-violet); }

.about-mark-node { transform-box: fill-box; transform-origin: 50% 50%; opacity: 1; transform: scale(1); }
.about-mark-dot {
  fill: var(--c-violet-hi);
  filter: url(#aboutMarkGlow);
}
.about-mark-label {
  font-family: var(--ff-body);
  font-weight: 600;
  font-size: 12px;
  fill: var(--c-muted);
}

.about-mark-junction { transform-box: fill-box; transform-origin: 50% 50%; opacity: 1; transform: scale(1); }

@media (prefers-reduced-motion: no-preference) {
  .about-mark-trace { stroke-dashoffset: 100; animation: aboutMarkTrace 0.9s ease-out forwards; }
  .about-mark-trace--1 { animation-delay: 0.55s; }
  .about-mark-trace--2 { animation-delay: 0.68s; }
  .about-mark-trace--3 { animation-delay: 0.81s; }

  .about-mark-node { opacity: 0; transform: scale(0.6); animation: aboutMarkNode 0.6s ease-out forwards; }
  .about-mark-node--1 { animation-delay: 0.10s; }
  .about-mark-node--2 { animation-delay: 0.28s; }
  .about-mark-node--3 { animation-delay: 0.46s; }

  .about-mark-junction { opacity: 0; transform: scale(0.5); animation: aboutMarkJunction 0.7s ease-out forwards; animation-delay: 1.55s; }
}

@keyframes aboutMarkTrace    { to { stroke-dashoffset: 0; } }
@keyframes aboutMarkNode     { to { opacity: 1; transform: scale(1); } }
@keyframes aboutMarkJunction { to { opacity: 1; transform: scale(1); } }

/* ── Shared prose column — Who we are / CEFR / Library / Philosophy /
   Closing all read from this one narrow, left-aligned column for calm,
   generous-whitespace reading. Headline/eyebrow above stay centered (the
   shared .section-eyebrow/.section-headline rule), only the paragraphs
   below switch to a left-aligned reading measure. ──────────────────── */
.about-prose {
  max-width: 680px;
  margin: 0 auto;
  text-align: center;
}
.about-prose-p {
  text-align: left;
  font-family: var(--ff-body);
  font-size: 1rem;
  line-height: 1.8;
  color: var(--c-muted);
  margin-top: 1.3rem;
}
.about-prose-p--lead {
  color: var(--c-text);
  font-size: 1.08rem;
}
.about-cefr .section-headline,
.about-library .section-headline,
.about-philosophy .section-headline,
.about-closing .section-headline {
  margin-bottom: 0;
}

.about-who { padding: 6rem 0; }
.about-cefr, .about-library { padding: 5rem 0; }

/* ── What we're trying to solve ──────────────────────────────────────── */
.about-problems { padding: 5rem 0; }
.about-problems-header { text-align: center; margin-bottom: 3.5rem; }
.about-problems-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.4rem;
  max-width: 900px;
  margin: 0 auto;
}
/* Five cards in a two-column grid would otherwise leave the fifth sitting
   alone with a big empty gap beside it (2+2+1-orphan) — span it across both
   columns instead, so the block reads as 2+2+1-full. Harmless at the single-
   column mobile breakpoint below, where "both columns" is just the one. */
.about-problems-list .about-problem:last-child { grid-column: 1 / -1; }
.about-problem {
  padding: 1.6rem 1.8rem;
  border-radius: 14px;
  border-left: 3px solid var(--c-magenta);
  background: linear-gradient(180deg, rgba(45, 1, 64, 0.4) 0%, rgba(1, 3, 38, 0.45) 100%);
  transition: border-color 1.1s var(--ease-out);
}
.about-problem.is-revealed { border-left-color: var(--c-violet-hi); }
.about-problem-title {
  font-family: var(--ff-display);
  font-weight: 800;
  font-size: 1.08rem;
  color: var(--c-magenta);
  margin-bottom: 0.5rem;
  transition: color 1.1s var(--ease-out);
}
.about-problem.is-revealed .about-problem-title { color: var(--c-violet-hi); }
.about-problem-desc {
  font-family: var(--ff-body);
  font-size: 0.9rem;
  line-height: 1.65;
  color: var(--c-muted);
}

/* ── CEFR level-bar reuse — same dot/label shapes as the homepage's
   cefr-levels (visual consistency) but the flashy infinite pulse/packet-
   rail is deliberately left out: every dot just sits calmly lit, honest and
   secondary to the text. ────────────────────────────────────────────── */
.about-cefr-levels {
  margin: 2.2rem auto 0;
  max-width: 480px;
}
.about-cefr-levels .cefr-level { opacity: 0.85; }

/* ── Worksheet Library badge ──────────────────────────────────────────── */
.about-library-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.6rem;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  border: 1px solid rgba(157, 91, 255, 0.28);
  background: rgba(157, 91, 255, 0.09);
  color: var(--c-violet-hi);
  font-family: var(--ff-body);
  font-weight: 600;
  font-size: 0.78rem;
}

/* ── The teacher has the final word — the emotional core. Generous
   whitespace, no card/border chrome, deliberately the plainest section on
   the page. ──────────────────────────────────────────────────────────── */
.about-philosophy { padding: 7rem 0; }
.about-philosophy-inner .about-prose-p:first-of-type { color: var(--c-text); font-size: 1.1rem; }

/* ── Where we're going — the closing arc. "Monday warmth" here is
   expressed as feathered, low-opacity radial-gradient glow blooms — never a
   filled background — so the accent colours stay points of light rather
   than a coloured wall. Both blooms are static (no animation), so they cost
   nothing beyond the one-time paint of a background-image; position:relative
   + z-index:0 on the containing element gives each ::before its own
   stacking context, so its z-index:-1 stays scoped to sit behind that
   element's own content without reaching past it into the page's global
   fixed layers (.site-canvas/.about-atmosphere) or neighbouring sections. */
.about-closing { position: relative; z-index: 0; padding: 6rem 0 3rem; text-align: center; }
.about-closing::before {
  content: '';
  position: absolute;
  z-index: -1;
  left: 50%;
  top: 8%;
  width: min(640px, 92vw);
  height: min(640px, 92vw);
  transform: translateX(-50%);
  background: radial-gradient(circle, rgba(163, 5, 166, 0.14) 0%, rgba(102, 2, 115, 0.07) 45%, transparent 72%);
  pointer-events: none;
}
.about-closing-mark { position: relative; margin: 2.4rem 0 1.6rem; }
.about-closing-brand-mark {
  width: 52px;
  height: 52px;
  margin: 0 auto;
}
.about-closing-line {
  position: relative;
  font-family: var(--ff-display);
  font-weight: 800;
  line-height: 1.35;
  letter-spacing: -0.01em;
}
.about-closing-line--1 {
  font-size: clamp(1.3rem, 2.6vw, 1.7rem);
  color: var(--c-text);
  margin-top: 0.5rem;
}
.about-closing-line--2 {
  z-index: 0;
  font-size: clamp(1.5rem, 3vw, 2rem);
  color: var(--c-violet-hi);
  margin-top: 0.9rem;
}
.about-closing-line--2::before {
  content: '';
  position: absolute;
  z-index: -1;
  left: 50%;
  top: 50%;
  width: min(520px, 96vw);
  height: 180px;
  transform: translate(-50%, -50%);
  background: radial-gradient(ellipse, rgba(163, 5, 166, 0.20) 0%, transparent 70%);
  pointer-events: none;
}

.about-cta { padding: 2rem 0 7rem; }
.about-cta-inner { display: flex; justify-content: center; }

/* ── Responsive — tablet ─────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .about-problems-list { max-width: 640px; }
}

/* ── Responsive — mobile ─────────────────────────────────────────────── */
@media (max-width: 767px) {
  .about-hero .about-mark { max-width: 300px; margin-top: 2.4rem; }
  .about-who { padding: 4rem 0; }
  .about-cefr, .about-library { padding: 3.5rem 0; }
  .about-philosophy { padding: 4.5rem 0; }
  .about-problems { padding: 3.5rem 0; }
  .about-problems-list { grid-template-columns: 1fr; }
  .about-closing { padding: 4rem 0 1rem; }
  .about-cta { padding: 1.5rem 0 5rem; }
}

@media (prefers-reduced-motion: reduce) {
  .tool-hero-eyebrow, .tool-hero-heading, .about-mark,
  #about-who .section-eyebrow, #about-who .about-prose-p,
  .about-problems-header .section-eyebrow, .about-problems-header .section-headline,
  .about-problem,
  #about-cefr .section-eyebrow, #about-cefr .section-headline, #about-cefr .about-prose-p, .about-cefr-levels,
  #about-library .section-eyebrow, #about-library .section-headline, #about-library .about-prose-p, .about-library-badge,
  .about-philosophy .section-eyebrow, .about-philosophy .section-headline, .about-philosophy-inner,
  #about-closing .section-headline, #about-closing .about-prose-p, .about-closing-mark, .about-closing-line--1, .about-closing-line--2,
  .about-cta-inner {
    opacity: 1;
    transform: none;
  }
  /* Five-problem tint: resolved state only, no animated transition. */
  .about-problem, .about-problem-title { transition: none; }
  .about-problem { border-left-color: var(--c-violet-hi); }
  .about-problem-title { color: var(--c-violet-hi); }
}

/* ============================================================
   LEGAL PAGES (Privacy / Terms / Cookies) — plain content pages,
   no orb/spine/hero, no GSAP entrance or scroll-reveal timeline
   (see legal.js). The shared nav/footer default to opacity:0
   pending a scroll timeline these pages never run, so
   .legal-page forces that shared chrome visible on load.
   ============================================================ */
.legal-page .nav,
.legal-page .footer-brand,
.legal-page .footer-col,
.legal-page .footer-aside,
.legal-page .footer-ai-note,
.legal-page .footer-bottom {
  opacity: 1 !important;
}

.legal { padding: calc(var(--nav-h) + 6rem) 0 6rem; }
.legal .container { max-width: 720px; }

.legal-back {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  font-family: var(--ff-body);
  font-size: 0.85rem;
  color: var(--c-muted);
  transition: color 0.2s ease;
  margin-bottom: 3rem;
}
.legal-back:hover { color: var(--c-violet-hi); }

/* ── Return-loop back control — a curved "undo" arrow (~270° arc +
   arrowhead) standing in for the old plain ← glyph. The arrowhead
   (.legal-back-head) is a static polyline; only the arc
   (.legal-back-arc) animates. Uses the same pathLength="100" +
   stroke-dasharray draw-on trick as .about-mark-trace, but instead of
   an on-load reveal it sits at a small default offset (an open gap,
   reading as "back") and closes to 0 on hover (the loop completing).
   currentColor ties the icon to the link's own color transition above
   — no new palette token needed. ─────────────────────────────────── */
.legal-back-icon {
  width: 1.1em;
  height: 1.1em;
  flex-shrink: 0;
}
.legal-back-arc,
.legal-back-head {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.legal-back-arc {
  stroke-dasharray: 100;
  stroke-dashoffset: 16;
}

@media (prefers-reduced-motion: no-preference) {
  .legal-back-arc { transition: stroke-dashoffset 0.35s var(--ease-out); }
  .legal-back:hover .legal-back-arc { stroke-dashoffset: 0; }
}

.legal-title {
  font-family: var(--ff-display);
  font-weight: 900;
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: var(--c-text);
  margin: 0 0 0.9rem;
}

.legal-updated {
  font-family: var(--ff-body);
  font-size: 0.82rem;
  color: var(--c-muted);
  margin: 0 0 3rem;
}

.legal-intro {
  font-family: var(--ff-body);
  font-size: 1.05rem;
  line-height: 1.75;
  color: var(--c-muted);
  margin: 0 0 3rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--c-line);
}

.legal-h2 {
  font-family: var(--ff-display);
  font-weight: 800;
  font-size: 1.3rem;
  letter-spacing: -0.01em;
  color: var(--c-text);
  margin: 2.8rem 0 1rem;
}

.legal-p {
  font-family: var(--ff-body);
  font-size: 0.96rem;
  line-height: 1.8;
  color: var(--c-muted);
  margin: 0 0 1.1rem;
}
.legal-p a { color: var(--c-violet-hi); text-decoration: underline; text-underline-offset: 2px; }
.legal-p a:hover { color: var(--c-magenta); }
.legal-p strong, .legal-intro strong { color: var(--c-text); font-weight: 600; }

@media (max-width: 767px) {
  .legal { padding: calc(var(--nav-h) + 3rem) 0 4rem; }
  .legal-title { margin-bottom: 0.7rem; }
  .legal-updated { margin-bottom: 2.2rem; }
  .legal-intro { margin-bottom: 2.2rem; padding-bottom: 1.8rem; }
  .legal-h2 { margin: 2.2rem 0 0.85rem; }
}

/* ============================================================
   HOW IT WORKS — how-it-works.html. STAGE 1B — "The Machine Line": a full
   relayout replacing Stage 1's centred/rail/card shell (which read too
   much like about.html). Deliberately a DIFFERENT visual system from every
   other page on the site:

     - Background is a single deep constant (var(--c-base)) — no scroll
       colour-scrub layer at all (about.js's #aboutAtmosphere trick is not
       used here; there is no atmosphere element on this page).
     - Layout is an asymmetric two-column "station" row for the two step
       scenes (Input / CEFR-lock) that genuinely alternate sides, plus
       three wider centred "module" scenes (Generation placeholder /
       Output split / Loop closes) that need more horizontal room than a
       single alternating column could give the CEFR gauge, the Stage-2
       demo bench, or two side-by-side output panels — a deliberate,
       disclosed departure from literal 1-2-3-4-5 alternation, not an
       oversight (see the project report). Every scene still shares the
       SAME new module-frame language, so nothing anywhere on the page
       reads as About's soft rounded tint cards.
     - The connective "line" is a NEW two-layer treatment, distinct from
       both about.html's single thin rail and the homepage spine's dotted
       packet traces: a dim, permanently-visible DASHED guide (
       .hiw-conn-guide) plus a brighter SOLID "energised" overlay
       (.hiw-conn-energy) that draws on via stroke-dashoffset as the user
       scrolls that segment into view. It runs in diagonal elbow segments
       between stations (.hiw-gap) and straight through each station's own
       "visual" column (.hiw-corridor) — always inside its own dedicated
       column/strip, never behind a text block.
     - The travelling request is a NEW bracketed "data-token"
       (.hiw-token), not About's plain glowing dot.
     - Module frame (.hiw-module) is a NEW schematic/engineering-diagram
       treatment: sharp corners with four CSS-only corner-bracket ticks, a
       header strip carrying a step index ("01 / INPUT"), and a faint
       inner grid texture — nothing rounded, nothing tinted like an About
       card.

   Palette: five source tokens + their derived tints/neutrals only (see
   :root above) — no blue/green/orange anywhere on this page.
   ============================================================ */

/* ── Shared: hero token + scroll hint ──────────────────────────────────── */
.hiw-hero { padding-bottom: 3rem; }

.hiw-token {
  opacity: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 2.2rem auto 0;
  padding: 0.5rem 0.9rem;
  border-radius: 3px;
  border: 1px solid rgba(199, 125, 255, 0.5);
  background: linear-gradient(180deg, rgba(1, 3, 38, 0.7), rgba(0, 1, 13, 0.8));
  box-shadow: 0 0 20px rgba(157, 91, 255, 0.20);
  font-family: var(--ff-body);
  font-weight: 600;
  font-size: 0.86rem;
  letter-spacing: 0.01em;
  color: var(--c-text);
}
.hiw-token-bracket {
  color: var(--c-violet-hi);
  font-family: var(--ff-display);
  font-weight: 700;
  opacity: 0.85;
}
.hiw-token-core {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--c-magenta);
  box-shadow: 0 0 8px 2px rgba(163, 5, 166, 0.75);
  flex-shrink: 0;
}

.hiw-scroll-hint {
  opacity: 0;
  margin-top: 2.6rem;
  font-family: var(--ff-body);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--c-muted);
}

/* ── The machine line — outer wrapper, plain (no absolute trace layer of
   its own; every connector below owns its own precisely-sized box). ──── */
.hiw-machine { position: relative; }

/* ── Gap connectors — the diagonal/elbow segments BETWEEN stations. Full
   page width, fixed height, so the elbow's proportions never depend on
   text reflow. Two stacked SVGs share one viewBox stretched via
   preserveAspectRatio="none" (same technique as Stage 1's straight
   trace) so the same normalised path coordinates always land on the
   correct station edges regardless of actual pixel width/height. ────── */
.hiw-gap {
  position: relative;
  height: 4.5rem;
  pointer-events: none;
}
.hiw-gap-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.hiw-conn-guide {
  fill: none;
  stroke: var(--c-purple);
  stroke-width: 1.5;
  stroke-opacity: 0.55;
  stroke-dasharray: 3 4;
  stroke-linecap: round;
}
.hiw-conn-energy {
  fill: none;
  stroke: var(--c-violet-hi);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
  filter: drop-shadow(0 0 3px rgba(199, 125, 255, 0.6));
}

/* The travelling data-token proxy inside a gap — position:absolute with
   top/left animated in % by how-it-works.js (a single small, out-of-flow
   decorative element; cheap enough that transform-only purity isn't worth
   the added complexity of chaining multiple nested percentage-of-parent
   proxies through a multi-segment elbow — see that file's own comment). */
.hiw-gap-token {
  opacity: 0;
  position: absolute;
  top: 0;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1;
}

/* ── Stations — the two genuinely alternating step scenes (Input / CEFR
   lock): an asymmetric two-column grid, content one side, the schematic
   module + its corridor line the other. ──────────────────────────────── */
.hiw-station {
  padding: 1rem 0;
}
.hiw-station-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 3rem;
  align-items: center;
}
.hiw-station--right .hiw-station-grid { grid-template-columns: 0.95fr 1.05fr; }

.hiw-station-content {
  opacity: 0;
  text-align: left;
}
/* Stations reuse the shared .section-eyebrow/.section-headline tokens but
   left-align them here — the site-wide default centres them for the
   single-column pages; this page's whole point is an asymmetric layout. */
.hiw-station-content .section-eyebrow,
.hiw-station-content .section-headline { text-align: left; margin-left: 0; }
.hiw-station-body {
  opacity: 0;
  font-family: var(--ff-body);
  font-size: 0.98rem;
  line-height: 1.75;
  color: var(--c-muted);
  max-width: 460px;
  margin-top: 1.1rem;
}
.hiw-station-note {
  opacity: 0;
  font-family: var(--ff-body);
  font-size: 0.86rem;
  line-height: 1.7;
  color: var(--c-muted);
  max-width: 440px;
  margin-top: 1rem;
}

.hiw-station-visual {
  opacity: 0;
  position: relative;
  min-height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* The corridor line — straight, confined to this one column's own width,
   stretched to the full row height via grid's default row-stretch on
   .hiw-station-visual. Same dashed-guide + energised-overlay language as
   the gap connectors above, just vertical and single-segment. */
.hiw-corridor {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.hiw-corridor-svg { position: absolute; inset: 0; width: 100%; height: 100%; }

/* ── Module frame — the new schematic/engineering-diagram panel used for
   every visual/demo element on the page (port, gauge, placeholder bench,
   output panels, closing graphic). Sharp corners, four CSS-only corner
   ticks (no border-radius, no soft tint — the opposite of About's cards),
   a header strip carrying a step index, and a faint inner grid texture. */
.hiw-module {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 380px;
  background: linear-gradient(180deg, rgba(1, 3, 38, 0.62) 0%, rgba(0, 1, 13, 0.72) 100%);
  border: 1px solid rgba(157, 91, 255, 0.16);
}
.hiw-module--wide { max-width: 720px; }
.hiw-module::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-repeat: no-repeat;
  background-image:
    linear-gradient(var(--c-violet-hi), var(--c-violet-hi)), linear-gradient(var(--c-violet-hi), var(--c-violet-hi)),
    linear-gradient(var(--c-violet-hi), var(--c-violet-hi)), linear-gradient(var(--c-violet-hi), var(--c-violet-hi)),
    linear-gradient(var(--c-violet-hi), var(--c-violet-hi)), linear-gradient(var(--c-violet-hi), var(--c-violet-hi)),
    linear-gradient(var(--c-violet-hi), var(--c-violet-hi)), linear-gradient(var(--c-violet-hi), var(--c-violet-hi));
  background-size:
    2px 16px, 16px 2px,
    2px 16px, 16px 2px,
    2px 16px, 16px 2px,
    2px 16px, 16px 2px;
  background-position:
    left 8px top 8px, left 8px top 8px,
    right 8px top 8px, right 8px top 8px,
    left 8px bottom 8px, left 8px bottom 8px,
    right 8px bottom 8px, right 8px bottom 8px;
  opacity: 0.8;
}
.hiw-module.is-docked::before { opacity: 1; }
.hiw-module.is-docked {
  border-color: rgba(199, 125, 255, 0.4);
  box-shadow: 0 0 26px rgba(157, 91, 255, 0.22);
  transition: border-color 0.6s var(--ease-out), box-shadow 0.6s var(--ease-out);
}

.hiw-module-header {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.75rem 1.2rem;
  border-bottom: 1px solid rgba(157, 91, 255, 0.18);
  font-family: var(--ff-body);
  font-weight: 700;
  font-size: 0.66rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--c-violet-hi);
}
.hiw-module-header::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--c-muted);
  flex-shrink: 0;
  transition: background 0.5s var(--ease-out), box-shadow 0.5s var(--ease-out);
}
.hiw-module.is-docked .hiw-module-header::before {
  background: var(--c-magenta);
  box-shadow: 0 0 8px 2px rgba(163, 5, 166, 0.75);
}

.hiw-module-body {
  position: relative;
  z-index: 1;
  padding: 1.7rem 1.4rem;
  background-image:
    linear-gradient(rgba(157, 91, 255, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(157, 91, 255, 0.055) 1px, transparent 1px);
  background-size: 18px 18px;
  text-align: center;
}

/* ── Station 1 — Input: a "port" the token docks into ─────────────────── */
.hiw-port { display: flex; align-items: center; justify-content: center; gap: 0.5rem; }
.hiw-port-bracket {
  font-family: var(--ff-display);
  font-weight: 700;
  font-size: 1.6rem;
  color: var(--c-violet);
  opacity: 0.7;
}
.hiw-port-slot {
  position: relative;
  width: 56px;
  height: 34px;
  border: 1px dashed rgba(157, 91, 255, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.5s var(--ease-out), background 0.5s var(--ease-out);
}
.hiw-port-token {
  width: 14px;
  height: 14px;
  border-radius: 2px;
  background: var(--c-magenta);
  box-shadow: 0 0 10px 3px rgba(163, 5, 166, 0.7);
  opacity: 0;
  transform: scale(0.4);
  transition: opacity 0.4s var(--ease-out), transform 0.4s var(--ease-out);
}
.hiw-module.is-docked .hiw-port-slot { border-style: solid; border-color: var(--c-violet-hi); background: rgba(157, 91, 255, 0.08); }
.hiw-module.is-docked .hiw-port-token { opacity: 1; transform: scale(1); }
.hiw-port-readout {
  margin-top: 1.1rem;
  font-family: var(--ff-body);
  font-weight: 600;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--c-muted);
  transition: color 0.5s var(--ease-out);
}
.hiw-module.is-docked .hiw-port-readout { color: var(--c-violet-hi); }

/* ── Station 2 — CEFR lock: a calibrated gauge, not a row of dots ──────── */
.hiw-gauge { text-align: left; }
.hiw-gauge-track {
  position: relative;
  height: 2px;
  background: rgba(102, 2, 115, 0.5);
  margin: 0 6px;
}
.hiw-gauge-tick {
  position: absolute;
  top: 0;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}
.hiw-gauge-tick-mark {
  width: 2px;
  height: 10px;
  background: var(--c-muted);
  opacity: 0.5;
  transition: background 0.6s var(--ease-out), opacity 0.6s var(--ease-out);
}
.hiw-gauge-tick-label {
  font-family: var(--ff-body);
  font-weight: 700;
  font-size: 0.68rem;
  color: var(--c-muted);
  margin-top: 0.9rem;
}
.hiw-gauge.is-locked[data-locked-level="B2"] .hiw-gauge-tick[data-level="B2"] .hiw-gauge-tick-mark { background: var(--c-violet-hi); opacity: 1; }
.hiw-gauge.is-locked[data-locked-level="B2"] .hiw-gauge-tick[data-level="B2"] .hiw-gauge-tick-label { color: var(--c-violet-hi); }
.hiw-gauge-needle {
  position: absolute;
  top: -14px;
  left: 0%;
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 7px solid var(--c-violet-hi);
  filter: drop-shadow(0 0 5px rgba(199, 125, 255, 0.75));
  opacity: 0;
  transition: left 0.9s var(--ease-out), opacity 0.5s var(--ease-out);
}
.hiw-gauge.is-locked .hiw-gauge-needle { opacity: 1; }
.hiw-gauge-readout {
  margin-top: 2.6rem;
  text-align: center;
  font-family: var(--ff-body);
  font-weight: 600;
  font-size: 0.82rem;
  color: var(--c-muted);
  opacity: 0;
  transition: opacity 0.5s var(--ease-out);
}
.hiw-gauge.is-locked .hiw-gauge-readout { opacity: 1; }
.hiw-gauge-readout strong { color: var(--c-violet-hi); font-weight: 800; }

/* ── Station 3 — Generation: STAGE-2 PLACEHOLDER bench, wide module ────── */
.hiw-station--wide { text-align: center; }
.hiw-station--wide .hiw-station-header { max-width: 620px; margin: 0 auto 2.2rem; }
.hiw-station--wide .section-eyebrow,
.hiw-station--wide .section-headline { text-align: center; }
.hiw-station--wide .hiw-station-body { margin-left: auto; margin-right: auto; text-align: center; }
.hiw-module-wrap { opacity: 0; display: flex; justify-content: center; margin-top: 2rem; }

.hiw-proof-body { min-height: 300px; display: flex; flex-direction: column; align-items: center; justify-content: center; }

/* STAGE 2 — CEFR proof demo. Reuses the exact gauge visual language from
   Station 2 (.hiw-gauge-tick/-mark/-label/-needle are the same shared
   classes, unscoped in the CSS above — no duplication needed), just wider
   and with three of its six ticks promoted to real <button> elements so
   the gauge itself doubles as the level selector. .is-current (JS-toggled)
   marks whichever level is on screen; the small always-on tag under B2 in
   .hiw-proof-gauge-track::after marks it as the request's own level,
   independent of whatever the visitor is currently previewing. */
.hiw-proof-gauge-hint {
  margin-bottom: 1.6rem;
  font-family: var(--ff-body);
  font-weight: 500;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--c-muted);
}
.hiw-proof-gauge { width: 100%; max-width: 460px; }
.hiw-proof-gauge-track {
  position: relative;
  height: 2px;
  background: rgba(102, 2, 115, 0.5);
  margin: 0 6px;
}
/* Interactive ticks — same footprint/position as the inert .hiw-gauge-tick
   spans (both share that class), just reset to plain buttons so they carry
   no browser chrome of their own. */
.hiw-gauge-tick.hiw-gauge-tick--select {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font: inherit;
}
.hiw-gauge-tick--select .hiw-gauge-tick-mark,
.hiw-gauge-tick--select .hiw-gauge-tick-label {
  transition: background 0.35s var(--ease-out), opacity 0.35s var(--ease-out), color 0.35s var(--ease-out);
}
.hiw-gauge-tick--select:hover .hiw-gauge-tick-mark,
.hiw-gauge-tick--select:focus-visible .hiw-gauge-tick-mark { opacity: 0.85; }
.hiw-gauge-tick--select:focus-visible { outline: 2px solid var(--c-violet-hi); outline-offset: 4px; }
.hiw-gauge-tick--select.is-current .hiw-gauge-tick-mark { background: var(--c-violet-hi); opacity: 1; }
.hiw-gauge-tick--select.is-current .hiw-gauge-tick-label { color: var(--c-violet-hi); }
/* The request's own level (B2) carries a permanent faint ring around its
   own tick-mark — contained entirely inside that 2x10px box, so it can
   never spill into the readout line below — on top of whichever tick
   .is-current highlights. This is the "rests on B2 with a subtle
   highlight" cue surviving manual exploration to other levels. */
.hiw-gauge-tick--select[data-level="B2"] .hiw-gauge-tick-mark {
  box-shadow: 0 0 0 1px rgba(163, 5, 166, 0.6);
}
.hiw-proof-gauge .hiw-gauge-needle { opacity: 1; }

.hiw-proof-readout {
  margin-top: 1.6rem;
  font-family: var(--ff-body);
  font-weight: 600;
  font-size: 0.82rem;
  color: var(--c-muted);
}
.hiw-proof-readout strong { color: var(--c-violet-hi); font-weight: 800; }

/* The sentence/note slot — the SAME box regardless of which level is
   showing. Each .hiw-proof-level is absolutely stacked inside a fixed-
   min-height box so swapping the active one never reflows the module
   (same discipline as the Writing-Feedback score chip's reserved-width
   count-up — see that file section's own comment). Heights verified by
   eye at 1440/1024/768/390 in EN + EL (EL notes run longest). */
.hiw-proof-slot {
  position: relative;
  width: 100%;
  max-width: 560px;
  margin: 1.8rem auto 0;
  min-height: 132px;
}
.hiw-proof-level {
  position: absolute;
  inset: 0;
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 0.7rem;
  opacity: 0;
}
.hiw-proof-level.is-active { display: flex; opacity: 1; }
.hiw-proof-sentence {
  font-family: var(--ff-display);
  font-weight: 700;
  font-size: clamp(1.05rem, 1.9vw, 1.35rem);
  line-height: 1.42;
  color: var(--c-text);
}
.hiw-proof-note {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.4rem 0.5rem;
  font-family: var(--ff-body);
  font-size: 0.82rem;
  line-height: 1.6;
  color: var(--c-muted);
  max-width: 440px;
}
.hiw-proof-note-tag {
  flex-shrink: 0;
  padding: 0.15rem 0.4rem;
  border: 1px solid rgba(157, 91, 255, 0.35);
  font-family: var(--ff-body);
  font-weight: 700;
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  color: var(--c-violet-hi);
}

/* ── Station 4 — Output: fork + two module panels ──────────────────────── */
.hiw-output-fork {
  opacity: 0;
  display: block;
  width: 100%;
  max-width: 260px;
  height: auto;
  margin: 0 auto 1.4rem;
}
.hiw-output-fork-line {
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
}
.hiw-output-fork-line--student { stroke: var(--c-violet-hi); }
.hiw-output-fork-line--teacher { stroke: var(--c-magenta); }
.hiw-output-fork.is-revealed .hiw-output-fork-line { transition: stroke-dashoffset 0.9s var(--ease-out); stroke-dashoffset: 0; }
.hiw-output-fork.is-revealed .hiw-output-fork-line--teacher { transition-delay: 0.12s; }

.hiw-output-grid {
  opacity: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.4rem;
  max-width: 640px;
  margin: 0 auto;
  text-align: left;
}
.hiw-output-panel { max-width: none; }
.hiw-output-panel .hiw-module-header { color: var(--c-violet-hi); }
.hiw-output-panel--teacher .hiw-module-header { color: var(--c-magenta); }
.hiw-output-panel--teacher .hiw-module-header::before { background: var(--c-magenta); }
.hiw-output-panel .hiw-module-body { text-align: left; }
.hiw-output-desc {
  font-family: var(--ff-body);
  font-size: 0.86rem;
  line-height: 1.6;
  color: var(--c-muted);
  margin-bottom: 0.9rem;
}
.hiw-output-list li {
  position: relative;
  padding-left: 1.1rem;
  font-family: var(--ff-body);
  font-size: 0.84rem;
  line-height: 1.7;
  color: var(--c-text);
}
.hiw-output-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 5px;
  height: 5px;
  background: currentColor;
  opacity: 0.6;
}

/* ── Station 5 — The loop closes: a closing-loop graphic module ────────── */
.hiw-closing-graphic {
  opacity: 0;
  display: block;
  width: 120px;
  height: 120px;
  margin: 0 auto;
}
.hiw-closing-loop-path {
  fill: none;
  stroke: var(--c-violet-hi);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
  filter: drop-shadow(0 0 4px rgba(199, 125, 255, 0.5));
}
.hiw-closing-graphic.is-closed .hiw-closing-loop-path { transition: stroke-dashoffset 1.1s var(--ease-out); stroke-dashoffset: 0; }
.hiw-closing-mark-use {
  opacity: 0.35;
  transition: opacity 1.1s var(--ease-out);
}
.hiw-closing-graphic.is-closed .hiw-closing-mark-use { opacity: 1; }
.hiw-closing-cta { opacity: 0; margin-top: 2rem; }

/* ── Responsive — tablet ─────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .hiw-station-grid { gap: 2rem; }
  .hiw-module { max-width: 340px; }
  .hiw-output-grid { max-width: 540px; }
  .hiw-proof-slot { min-height: 148px; }
}

/* ── Responsive — mobile: stations stack single-column (content, then
   module) in the SAME new visual language — corner-bracket module frame,
   dashed-guide/energised-overlay connectors — never About's centred/rail
   look. The zig-zag geometry collapses to a straight run since there is
   no side to alternate to on a single column, but the connector element
   itself stays a distinct, dedicated strip between blocks, so it is never
   behind text at this width either. ───────────────────────────────────── */
@media (max-width: 767px) {
  .hiw-gap { height: 2.2rem; }
  /* The elbow SVG's diagonal proportions only read correctly at the full
     station width the desktop gap is sized for — at mobile widths the same
     coordinates would just flatten into a near-illegible sideways sliver,
     so it's swapped for a simple straight dashed link instead (still the
     same "new style" dashed-guide language, just not diagonal). */
  .hiw-gap-svg, .hiw-gap-token { display: none; }
  .hiw-gap::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    border-left: 2px dashed rgba(102, 2, 115, 0.6);
    transform: translateX(-50%);
  }

  .hiw-station-grid,
  .hiw-station--right .hiw-station-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .hiw-station-content, .hiw-station--right .hiw-station-content { order: 1; }
  .hiw-station-visual, .hiw-station--right .hiw-station-visual { order: 2; min-height: 0; padding: 1.5rem 0 0; }
  /* Same simple straight dashed link, now between the stacked content and
     module blocks within one station (never behind either block's text —
     it sits in the dedicated gap above the module, not underneath it). */
  .hiw-station-visual { position: relative; }
  .hiw-station-visual::before {
    content: '';
    display: block;
    height: 1.6rem;
    width: 0;
    margin: 0 auto;
    border-left: 2px dashed rgba(102, 2, 115, 0.6);
  }
  .hiw-corridor { display: none; }
  .hiw-module { max-width: 100%; }
  .hiw-module--wide { max-width: 100%; }
  .hiw-output-grid { grid-template-columns: 1fr; max-width: 320px; }
  .hiw-station { padding: 0.6rem 0; }
  .hiw-proof-slot { min-height: 168px; }
}

@media (max-width: 480px) {
  .hiw-token { font-size: 0.78rem; padding: 0.45rem 0.8rem; }
  .hiw-gauge-tick-label { font-size: 0.6rem; }
  .hiw-proof-gauge { max-width: 300px; }
  .hiw-proof-slot { min-height: 190px; }
}

@media (prefers-reduced-motion: reduce) {
  .hiw-token, .hiw-scroll-hint,
  .hiw-station-content, .hiw-station-body, .hiw-station-note, .hiw-station-visual,
  .hiw-module-wrap, .hiw-output-grid,
  .hiw-output-fork, .hiw-closing-graphic, .hiw-closing-cta {
    opacity: 1;
    transform: none;
  }
  .hiw-gap-token { display: none; }
  .hiw-conn-energy { transition: none; stroke-dashoffset: 0; }
  .hiw-output-fork-line { transition: none; stroke-dashoffset: 0; }
  .hiw-closing-loop-path { transition: none; stroke-dashoffset: 0; }
  .hiw-closing-mark-use { opacity: 1; transition: none; }
  .hiw-module { border-color: rgba(199, 125, 255, 0.4); box-shadow: 0 0 26px rgba(157, 91, 255, 0.22); }
  .hiw-module::before { opacity: 1; }
  .hiw-module-header::before { background: var(--c-magenta); box-shadow: 0 0 8px 2px rgba(163, 5, 166, 0.75); }
  .hiw-port-slot { border-style: solid; border-color: var(--c-violet-hi); background: rgba(157, 91, 255, 0.08); }
  .hiw-port-token { opacity: 1; transform: scale(1); }
  .hiw-port-readout { color: var(--c-violet-hi); }
  .hiw-gauge-needle, .hiw-gauge-readout { opacity: 1; transition: none; }
  .hiw-gauge-tick[data-level="B2"] .hiw-gauge-tick-mark { background: var(--c-violet-hi); opacity: 1; }
  .hiw-gauge-tick[data-level="B2"] .hiw-gauge-tick-label { color: var(--c-violet-hi); }

  /* STAGE 2 proof demo — static fallback: needle pinned at B2 (no sweep),
     all three levels shown open/stacked at once (no swap/scrub), and the
     selector ticks turned inert since there's nothing left to compare via
     tapping — everything is already on screen together. */
  .hiw-proof-gauge-needle, .hiw-proof-readout { transition: none; }
  .hiw-gauge-tick--select { pointer-events: none; cursor: default; }
  .hiw-proof-gauge-hint { display: none; }
  .hiw-proof-slot { position: static; min-height: 0; }
  .hiw-proof-level {
    position: static;
    display: flex;
    opacity: 1;
    padding: 1.3rem 0;
    border-top: 1px dashed rgba(157, 91, 255, 0.18);
  }
  .hiw-proof-level:first-child { border-top: none; padding-top: 0; }
}

/* ═══════════════════════════════════════════════════════════════════════
   COOKIE CONSENT BANNER (consent.js injects the markup site-wide)

   A frosted bottom panel in the brand palette — same five colours and the
   same backdrop-blur treatment as the nav/footer, so it never clashes with
   the orb or the PCB spine (both of which sit at z-index:-1). Sits at
   z-index:90: above page content and the back-to-top button (60), below the
   nav and the mobile menu overlay (100/99). Hidden entirely once dismissed,
   so it never permanently covers the footer links.
   ═══════════════════════════════════════════════════════════════════════ */
.cookie-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 90;
  background: rgba(1, 3, 38, 0.86);          /* --c-indigo #010326, frosted */
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--c-line);
  box-shadow: 0 -8px 40px rgba(0, 1, 13, 0.55); /* --c-base #00010D */
}
.cookie-banner[hidden] { display: none; }

.cookie-banner-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.1rem 2rem;
  flex-wrap: wrap;
  padding-top: 1.1rem;
  padding-bottom: 1.1rem;
}

.cookie-banner-copy { flex: 1 1 400px; min-width: 0; }

.cookie-banner-title {
  font-family: var(--ff-display);
  font-weight: 800;
  font-size: 0.98rem;
  color: var(--c-text);
  margin-bottom: 0.3rem;
}

.cookie-banner-body {
  font-size: 0.82rem;
  line-height: 1.6;
  color: var(--c-muted);
  max-width: 70ch;
}

.cookie-banner-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.cookie-banner-details {
  font-size: 0.8rem;
  color: var(--c-muted);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color .2s;
}
.cookie-banner-details:hover { color: var(--c-violet-hi); }

.cookie-banner-btn { white-space: nowrap; }

/* Gentle rise on appearance — motion only when the user allows it. With
   reduced motion, the banner simply appears in place (no slide). */
@media (prefers-reduced-motion: no-preference) {
  .cookie-banner { animation: cookieBannerIn 0.4s var(--ease-out) both; }
  @keyframes cookieBannerIn {
    from { transform: translateY(100%); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
  }
}

@media (max-width: 767px) {
  .cookie-banner-inner { gap: 0.9rem; }
  .cookie-banner-actions { width: 100%; }
  .cookie-banner-btn { flex: 1 1 auto; }
  .cookie-banner-details { order: 3; width: 100%; text-align: center; }
}

/* Footer "Cookie settings" — a <button> that re-opens the banner, styled to
   match the plain text links in the footer Legal column. */
.footer-col .footer-linklike {
  font-family: var(--ff-body);
  font-size: 0.85rem;
  color: var(--c-muted);
  background: none;
  border: 0;
  padding: 0;
  text-align: left;
  cursor: pointer;
  transition: color .2s;
}
.footer-col .footer-linklike:hover { color: var(--c-violet-hi); }
