






    /* Page-local styles. Colour comes entirely from tokens.css; this block is
       layout, type, motion and the dark-fantasy motifs carried over from the
       author's original League-of-Legends-inspired landing (the expand-from-
       centre divider, the hollow triangle scroll-cue, underline-grows nav hover,
       gold-glow buttons). Inline <style> is CSP-permitted (style-src). */

    :root {
      --maxw: 70rem;
      --pad: clamp(1rem, 4vw, 3rem);
      /* System font stack — no web font to host (Montserrat is unreachable to
         self-host and blocked from Google by the CSP). Resolves to San Francisco
         on Apple, Segoe UI on Windows, Roboto on Android/Linux — all clean and
         render the uppercase-bold hero well. Zero downloads, zero 404s. */
      --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
      --ease: cubic-bezier(0.22, 1, 0.36, 1);
    }

    * { box-sizing: border-box; }

    /* The hidden attribute must always win over any element's display. */
    [hidden] { display: none !important; }

    html { scroll-behavior: smooth; }

    body {
      margin: 0;
      background: var(--surface);
      color: var(--text);
      font-family: var(--font-body);
      font-weight: 400;
      line-height: 1.6;
      -webkit-font-smoothing: antialiased;
    }

    /* Smooth theme crossfade. Only applies AFTER first paint (.theme-ready is
       added by landing.js on the next frame), so the initial theme is set
       instantly with no flash — the transition is for user toggles only.

       Applied GLOBALLY (every element) rather than a hand-picked list, because a
       list always leaves gaps: some theme-coloured elements (rules, taglines,
       feature borders, status text) were snapping instantly while others faded,
       which read as glitchy in Chrome. Only colour properties transition — never
       layout — and transform/opacity are excluded so the parallax and the art
       crossfade keep their own timing. box-shadow is deliberately NOT transitioned
       (it caused Chrome repaint jank). */
    .theme-ready * {
      transition: background-color 0.7s ease, color 0.7s ease, border-color 0.7s ease;
    }
    /* Buttons keep their faster hover feedback; combine both so theme change and
       hover don't clobber each other's transition declaration. */
    .theme-ready .btn {
      transition: background-color 0.7s ease, color 0.7s ease, border-color 0.7s ease, box-shadow 0.2s var(--ease);
    }
    /* The art crossfade and the effects fade keep their own opacity transitions. */
    .theme-ready .leaves, .theme-ready .fireflies { transition: opacity 0.6s ease; }

    /* Chrome/labels/wordmark/CTA text are not meant to be selected — they are UI,
       not content. Body copy (about/thesis) stays selectable. */
    .no-select { user-select: none; -webkit-user-select: none; }

    h1, h2, h3 { line-height: 1.12; font-weight: 700; }

    a { color: var(--link); text-decoration: none; }
    main a:not(.btn) { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }

    /* Global keyboard-focus indicator. Every interactive element gets a clear,
       consistent 2px outline in the theme's focus colour (WCAG 2.2 SC 2.4.7 Focus
       Visible, 2.4.13 Focus Appearance) rather than relying on the browser default,
       which is inconsistent and low-contrast on this custom palette. The offset
       keeps the ring clear of the element so it stays visible (2.4.11). Uses
       :focus-visible so it shows for keyboard/AT users, not on mouse click. */
    :focus-visible {
      outline: 2px solid var(--focus);
      outline-offset: 2px;
      border-radius: 2px;
    }
    /* Buttons already have a border-radius; match the ring to it. */
    .btn:focus-visible { outline-offset: 3px; }
    main a:not(.btn):hover { color: var(--text); }

    /* Skip link — first focusable, appears on focus (WCAG bypass block). */
    .skip {
      position: absolute; left: 12px; top: -56px;
      background: var(--surface-raised); color: var(--text);
      padding: 10px 16px; border: 1px solid var(--rule); border-radius: 2px;
      z-index: 100; transition: top 0.18s var(--ease);
    }
    .skip:focus { top: 12px; }

    /* ── Header: fixed, transparent-over-hero, nav left / auth right ── */
    .site-header {
      position: fixed; inset: 0 0 auto 0; z-index: 50;
      display: flex; align-items: center; justify-content: space-between;
      gap: 1rem; padding: 0 var(--pad);
      /* Unified header height across landing / dashboard / game (64px). A fixed
         height + centred contents means all three bars match regardless of what
         sits in them (plain buttons here, an avatar on the dashboard). */
      height: 64px; box-sizing: border-box;
      /* Solid bar so the chrome always has consistent contrast, regardless of
         the hero art scrolling underneath. */
      background: var(--surface);
      border-bottom: 1px solid var(--border);
    }
    .wordmark {
      font-weight: 800; font-size: 0.95rem; letter-spacing: 0.22em;
      text-transform: uppercase; color: var(--accent);
      display: inline-flex; align-items: center; gap: 0.55rem;
    }
    .wordmark::before {
      content: ""; width: 22px; height: 22px; flex: none;
      background: var(--accent);
      -webkit-mask: var(--d20) center / contain no-repeat;
      mask: var(--d20) center / contain no-repeat;
    }
    /* d20 glyph reused as a mask so the wordmark mark follows theme colour. */
    :root { --d20: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cpath d='M16 3 L27 9.5 L27 22.5 L16 29 L5 22.5 L5 9.5 Z M16 3 L16 29 M5 9.5 L27 22.5 M27 9.5 L5 22.5' fill='none' stroke='black' stroke-width='1.6'/%3E%3C/svg%3E"); }

    .header-actions { display: flex; align-items: center; gap: 0.5rem; }

    /* ── Buttons: gold-glow hover carried from the original ── */
    .btn {
      font: inherit; font-weight: 600; cursor: pointer;
      border-radius: 2px; padding: 0.6rem 1.2rem;
      min-height: 44px; min-width: 44px;   /* WCAG 2.2 target size, generous */
      display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
      border: 1px solid transparent; background: transparent; color: inherit;
      text-decoration: none; letter-spacing: 0.02em;
      transition: color 0.2s var(--ease), background-color 0.2s var(--ease),
                  box-shadow 0.2s var(--ease), border-color 0.2s var(--ease);
    }
    .btn.secondary { border-color: var(--rule); color: var(--accent); background: transparent; }
    .btn.secondary:hover { color: var(--on-accent); background: var(--accent); }
    .btn.secondary:hover {
      color: var(--on-accent); background: var(--accent);
      box-shadow: 0 0 6px color-mix(in srgb, var(--accent) 70%, transparent),
                  0 0 18px color-mix(in srgb, var(--accent) 40%, transparent);
    }
    .btn.primary {
      background: var(--accent); color: var(--on-accent); border-color: var(--accent);
    }
    .btn.primary:hover {
      box-shadow: 0 0 8px color-mix(in srgb, var(--accent) 80%, transparent),
                  0 0 22px color-mix(in srgb, var(--accent) 45%, transparent);
      transform: translateY(-1px);
    }
    .btn.icon { padding: 0.55rem; }
    .btn.icon svg { width: 20px; height: 20px; }
    .btn:disabled { opacity: 0.55; cursor: default; box-shadow: none; transform: none; }

    /* ── Hero: parallax scene, low-anchored title, over-scrim ── */
    .hero {
      position: relative; min-height: max(100svh, 52rem);
      display: flex; flex-direction: column; align-items: center; justify-content: flex-end;
      overflow: hidden; text-align: center;
      padding: 7rem var(--pad) 5.5rem;
    }
    .hero-layers { position: absolute; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
    /* Separate day/night planes preserve transparency during theme changes.
       Landscape fills the viewport; the party scales with the scene width. */
    .layer {
      position: absolute; inset: -4%;
      transform: translate3d(0, 0, 0) scale(1.06);
      will-change: transform;
      isolation: isolate;
    }
    .layer::before, .layer::after {
      content: ""; position: absolute; inset: 0;
      background-size: cover; background-position: center 42%; background-repeat: no-repeat;
    }
    .layer.mid::before, .layer.mid::after {
      /* Width-driven scale gives the party presence in the clearing. The lower
         anchor moves both themes together without changing the parallax plane. */
      background-size: min(86%, 101rem) auto;
      background-position: center calc(78% + 4rem);
    }
    @media (max-aspect-ratio: 1/1) {
      .layer.mid::before, .layer.mid::after {
        background-size: 100% auto;
        background-position: center 44%;
      }
    }
    .layer.front::before, .layer.front::after { background-size: 100% 100%; }
    /* Lift the artwork without filtering the heading, buttons, or particles.
       Night gets more light; daylight keeps its warm, restrained highlights. */
    .layer::before { opacity: 1; filter: brightness(1.24) saturate(1.32); }
    .layer.mid::before { filter: brightness(1.32) saturate(1.36); }
    .layer::after  { opacity: 0; filter: brightness(1.10) saturate(1.30); }
    html[data-theme="light"] .layer::before { opacity: 0; }
    html[data-theme="light"] .layer::after  { opacity: 1; }

    .layer.back::before  { background-image: url("/assets/layer-back-night.jpg"); }
    .layer.mid::before   { background-image: url("/assets/layer-mid-night.webp"); }
    .layer.front::before { background-image: url("/assets/layer-front-night.webp"); }
    .layer.back::after  { background-image: url("/assets/layer-back.jpg"); }
    .layer.mid::after   { background-image: url("/assets/layer-mid.webp"); }
    .layer.front::after { background-image: url("/assets/layer-front.webp"); }

    .theme-ready .layer::before, .theme-ready .layer::after {
      transition: opacity 0.9s ease;
    }
    /* Normal source-over blending makes two half-opacity cutouts only 75%
       opaque. Add their complementary weights inside each isolated plane so
       solid character pixels remain opaque throughout the theme transition. */
    @supports (mix-blend-mode: plus-lighter) {
      .layer::after { mix-blend-mode: plus-lighter; }
    }
    /* Older browsers swap cutouts directly instead of showing a ghosted party. */
    @supports not (mix-blend-mode: plus-lighter) {
      .theme-ready .layer.mid::before, .theme-ready .layer.mid::after,
      .theme-ready .layer.front::before, .theme-ready .layer.front::after {
        transition: none;
      }
    }
    /* Vignette + scrim: darken toward the edges and bottom so the title reads,
       without hiding the art. Two stacked gradients, no flat overlay. */
    .scrim {
      position: absolute; inset: 0; z-index: 1; opacity: 0.82;
      background:
        /* central pool of shade behind the title, strongest where the text sits */
        radial-gradient(90% 70% at 50% 52%, var(--scrim) 0%, transparent 70%),
        /* edge vignette, kept clear of the bottom */
        radial-gradient(130% 80% at 50% 10%, transparent 48%, var(--scrim) 100%);
    }
    /* Dedicated bottom dissolve to the page surface, ABOVE the scrim so nothing
       tints it — this is what makes the hero melt into the section with no seam.
       Reaches solid --surface before the hero's edge. */
    .hero::after {
      content: ""; position: absolute; left: 0; right: 0; bottom: 0; z-index: 2;
      height: 38%; pointer-events: none;
      background: linear-gradient(to bottom,
        transparent 0%,
        color-mix(in srgb, var(--surface) 55%, transparent) 55%,
        color-mix(in srgb, var(--surface) 88%, transparent) 78%,
        var(--surface) 96%);
    }

    /* Woodland atmosphere: leaves in daylight, fireflies after dusk.
       All particles stay decorative, non-interactive, and away from the copy. */
    .fx { position: absolute; inset: 0; z-index: 3; pointer-events: none; overflow: hidden; }
    .leaves, .fireflies { position: absolute; inset: 0; opacity: 0; }
    html[data-theme="light"] .leaves,
    html[data-theme="dark"] .fireflies { opacity: 1; }
    .leaves span, .fireflies span { position: absolute; opacity: 0; animation-play-state: paused; }
    html[data-theme="light"] .leaves span,
    html[data-theme="dark"] .fireflies span { animation-play-state: running; }
    .leaves span {
      top: 8%; width: 18px; height: 9px;
      border: 1px solid #48513b; border-radius: 0 80% 0 80%;
      background: #c3ad62; box-shadow: 0 1px 3px rgb(30 40 24 / 25%); transform-origin: center;
      animation: leafDrift 13s linear infinite; animation-play-state: paused;
    }
    .leaves span:nth-child(1) { left: 9%; animation-delay: -3s; }
    .leaves span:nth-child(2) { left: 18%; animation-delay: -11s; animation-duration: 21s; }
    .leaves span:nth-child(3) { left: 27%; animation-delay: -7s; animation-duration: 19s; }
    .leaves span:nth-child(4) { left: 73%; animation-delay: -14s; animation-duration: 23s; }
    .leaves span:nth-child(5) { left: 82%; animation-delay: -5s; animation-duration: 18s; }
    .leaves span:nth-child(6) { left: 91%; animation-delay: -16s; animation-duration: 22s; }
    .leaves span:nth-child(7) { left: 6%; animation-delay: -9s; animation-duration: 14s; }
    .leaves span:nth-child(8) { left: 36%; animation-delay: -4s; animation-duration: 16s; width: 14px; height: 7px; }
    .leaves span:nth-child(9) { left: 64%; animation-delay: -12s; animation-duration: 15s; }
    .leaves span:nth-child(10) { left: 95%; animation-delay: -6s; animation-duration: 18s; width: 22px; height: 11px; }
    @keyframes leafDrift {
      0% { opacity: 0; transform: translate3d(0, 0, 0) rotate(-25deg); }
      12%, 75% { opacity: 0.9; }
      45% { transform: translate3d(-42px, 23svh, 0) rotate(90deg); }
      100% { opacity: 0; transform: translate3d(58px, 52svh, 0) rotate(210deg); }
    }
    .fireflies span {
      width: 5px; height: 5px; border-radius: 50%; background: #fff3b8;
      box-shadow: 0 0 8px 3px rgb(223 235 151 / 65%), 0 0 20px 6px rgb(205 217 154 / 25%);
      animation: fireflyWander 11s ease-in-out infinite; animation-play-state: paused;
    }
    .fireflies span:nth-child(1) { left: 12%; top: 35%; animation-delay: -2s; }
    .fireflies span:nth-child(2) { left: 22%; top: 48%; animation-delay: -7s; animation-duration: 13s; }
    .fireflies span:nth-child(3) { left: 30%; top: 25%; animation-delay: -4s; animation-duration: 15s; }
    .fireflies span:nth-child(4) { left: 42%; top: 18%; animation-delay: -9s; animation-duration: 12s; }
    .fireflies span:nth-child(5) { left: 66%; top: 22%; animation-delay: -6s; animation-duration: 14s; }
    .fireflies span:nth-child(6) { left: 77%; top: 44%; animation-delay: -1s; animation-duration: 16s; }
    .fireflies span:nth-child(7) { left: 87%; top: 33%; animation-delay: -10s; animation-duration: 13s; }
    .fireflies span:nth-child(8) { left: 92%; top: 52%; animation-delay: -5s; animation-duration: 17s; }
    .fireflies span:nth-child(9) { left: 7%; top: 56%; animation-delay: -3s; animation-duration: 12s; }
    .fireflies span:nth-child(10) { left: 18%; top: 23%; animation-delay: -8s; animation-duration: 14s; }
    .fireflies span:nth-child(11) { left: 52%; top: 16%; animation-delay: -5s; animation-duration: 13s; }
    .fireflies span:nth-child(12) { left: 72%; top: 31%; animation-delay: -11s; animation-duration: 16s; }
    .fireflies span:nth-child(13) { left: 83%; top: 57%; animation-delay: -4s; animation-duration: 15s; }
    .fireflies span:nth-child(14) { left: 95%; top: 19%; animation-delay: -7s; animation-duration: 12s; }
    @keyframes fireflyWander {
      0%, 100% { opacity: 0; transform: translate3d(0, 8px, 0); }
      20% { opacity: 0.9; }
      45% { opacity: 0.2; transform: translate3d(28px, -24px, 0); }
      65% { opacity: 1; }
      80% { opacity: 0.15; transform: translate3d(-20px, -38px, 0); }
    }

    .hero-inner { position: relative; z-index: 3; color: var(--hero-text); max-width: 54rem; }
    .hero h1 {
      font-size: clamp(2.1rem, 6.2vw, 4.6rem); font-weight: 800;
      letter-spacing: 0.02em; text-transform: uppercase; margin: 0;
      text-shadow: 0 2px 24px rgba(0,0,0,0.55);
      animation: fadeUp 0.9s var(--ease) both;
    }
    .tagline { font-size: clamp(1rem, 2.4vw, 1.35rem); margin: 1rem 0 0; color: var(--hero-text); opacity: 0.92; animation: fadeUp 0.9s var(--ease) 0.1s both; }
    .subline { font-size: 0.85rem; letter-spacing: 0.04em; text-transform: uppercase; opacity: 0.72; margin: 0.6rem 0 0; animation: fadeUp 0.9s var(--ease) 0.2s both; }

    /* The signature gold divider that expands from centre. */
    .divider {
      height: 2px; width: min(60%, 26rem); margin: 1.6rem auto 0;
      background: linear-gradient(to right, transparent, var(--rule) 20%, var(--rule) 80%, transparent);
      transform: scaleX(0); transform-origin: center;
      animation: expandLine 0.9s var(--ease) 0.3s forwards;
    }

    .cta-row { display: flex; gap: 0.8rem; justify-content: center; flex-wrap: wrap; margin-top: 2rem; animation: fadeUp 0.9s var(--ease) 0.45s both; }
    /* The one big hero CTA reads larger than header buttons. */
    .cta-row .btn { font-size: 1.05rem; padding: 0.85rem 2rem; letter-spacing: 0.06em; text-transform: uppercase; }

    /* Hollow downward triangle scroll-cue, from the original. */
    .scroll-cue {
      position: absolute; bottom: 1.6rem; left: 50%; transform: translateX(-50%);
      z-index: 3; width: 44px; height: 44px; display: grid; place-items: center;
      animation: nudge 2s var(--ease) infinite;
    }
    .scroll-cue::before {
      content: ""; width: 0; height: 0;
      border-left: 9px solid transparent; border-right: 9px solid transparent;
      border-top: 12px solid var(--accent);
    }
    .scroll-cue:focus-visible { outline: 2px solid var(--focus); outline-offset: 4px; border-radius: 2px; }

    @keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
    @keyframes expandLine { to { transform: scaleX(1); } }
    @keyframes nudge { 0%, 100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, 7px); } }

    /* ── Content sections ── */
    main { position: relative; z-index: 1; background: var(--surface); }
    .section { max-width: var(--maxw); margin: 0 auto; padding: 5rem var(--pad); }
    .section > h2 {
      font-size: clamp(1.5rem, 3.6vw, 2.2rem); text-transform: uppercase;
      letter-spacing: 0.06em; color: var(--accent); margin: 0 0 0.4rem;
    }
    /* Each section heading gets the short gold rule under it — the divider motif,
       reused at smaller scale. Intentional repetition, not uniform padding. */
    .section > h2 + .rule { height: 2px; width: 4rem; background: var(--rule); margin-bottom: 1.6rem; }
    .section p { max-width: 46rem; color: var(--text); }

    /* Thesis section: seal beside the text. The seal is single-colour line art,
       rendered as a CSS mask filled with a theme colour — always legible in both
       themes (gold-brown, following --accent-strong), never black-on-black or
       white-on-white. A masked <span role="img"> keeps it accessible. */
    .thesis-body { display: flex; align-items: flex-start; gap: 2rem; flex-wrap: wrap; }
    .thesis-body p { flex: 1; min-width: 18rem; margin: 0; }
    .ionio-seal {
      flex: none; width: 132px; height: 132px; display: block;
      background-color: var(--accent-strong);
      -webkit-mask: url("/assets/ionio-seal.png") center / contain no-repeat;
      mask: url("/assets/ionio-seal.png") center / contain no-repeat;
    }
    @media (max-width: 640px) { .ionio-seal { width: 104px; height: 104px; } }

    .feature-list { list-style: none; padding: 0; margin: 2.4rem 0 0; display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); }
    .feature-list li { border-left: 2px solid var(--rule); padding: 0.2rem 0 0.2rem 1.1rem; }
    .feature-list h3 { margin: 0 0 0.4rem; font-size: 1.05rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text); }
    .feature-list p { margin: 0; color: var(--text-muted); }

    footer { border-top: 1px solid var(--border); background: var(--surface); }
    footer .foot { max-width: var(--maxw); margin: 0 auto; padding: 2rem var(--pad); color: var(--text-muted); font-size: 0.85rem; }
    /* Links in running text must not rely on colour alone (WCAG 1.4.1). */
    footer .foot a { text-decoration: underline; text-underline-offset: 2px; }

    /* ── Auth card (dialog) ── */
    dialog#authCard {
      width: min(29rem, 92vw); border: 1px solid var(--rule); border-radius: 3px;
      padding: 0; background: var(--surface-raised); color: var(--text);
      box-shadow: 0 0 0 1px color-mix(in srgb, var(--rule) 30%, transparent), 0 24px 60px rgba(0,0,0,0.5);
    }
    dialog#authCard::backdrop { background: rgba(6, 7, 10, 0.7); backdrop-filter: blur(2px); }
    .card-inner { padding: 2rem; position: relative; }
    .card-close {
      position: absolute; top: 0.6rem; right: 0.6rem;
      width: 44px; height: 44px; display: grid; place-items: center;
      background: transparent; border: none; color: var(--text-muted);
      font-size: 1.5rem; line-height: 1; cursor: pointer; border-radius: 2px;
    }
    .card-close:hover { color: var(--accent); }
    .card-inner h2 { font-size: 1.3rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--accent); margin: 0 0 0.3rem; }
    .card-inner h2 + .rule { height: 2px; width: 3rem; background: var(--rule); margin-bottom: 1.4rem; }
    .field { display: grid; gap: 0.35rem; margin-bottom: 1rem; }
    .field label { font-size: 0.8rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); }
    .field .help { font-size: 0.78rem; color: var(--text-muted); }
    .field input {
      font: inherit; padding: 0.65rem 0.75rem; border-radius: 2px;
      border: 1px solid var(--border); background: var(--surface); color: var(--text);
      min-height: 44px;
    }
    .field input:focus-visible { border-color: var(--accent); outline: 2px solid var(--focus); outline-offset: 1px; }
    .field input[aria-invalid="true"] { border-color: var(--danger); }
    .pw-wrap { position: relative; display: flex; }
    .pw-wrap input { flex: 1; padding-right: 4rem; }
    .pw-toggle {
      position: absolute; right: 0.3rem; top: 50%; transform: translateY(-50%);
      min-height: 38px; padding: 0 0.6rem; font: inherit; font-size: 0.78rem;
      background: transparent; border: none; color: var(--link); cursor: pointer;
    }
    .status { min-height: 1.2em; margin: 0.4rem 0 1rem; color: var(--text); font-size: 0.88rem; }
    /* Re-submit feedback: a brief pulse so an identical status message visibly
       re-appears (e.g. requesting a reset for a second email). */
    .status.flash { animation: statusFlash 0.55s ease; }
    @keyframes statusFlash {
      0% { opacity: 0.25; transform: translateY(-2px); }
      100% { opacity: 1; transform: none; }
    }
    @media (prefers-reduced-motion: reduce) { .status.flash { animation: none; } }
    /* Text for screen readers only (e.g. "opens in a new tab"). */
    .visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
    .card-note { margin: 0 0 0.6rem; font-size: 0.875rem; color: var(--text-muted); }
    .card-note a { text-decoration: underline; text-underline-offset: 2px; }
    .card-footer { margin-top: 0.6rem; font-size: 0.88rem; color: var(--text-muted); }
    .switch-face {
      font: inherit; background: none; border: none; color: var(--link);
      cursor: pointer; padding: 0.2rem; text-decoration: underline; text-underline-offset: 3px;
    }
    .switch-face:hover { color: var(--text); }
    .card-inner .btn { width: 100%; margin-top: 0.3rem; }
    form[hidden] { display: none; }

    /* ── Reduced motion: kill all the entrance + idle animation, keep layout ── */
    @media (prefers-reduced-motion: reduce) {
      html { scroll-behavior: auto; }
      .hero h1, .tagline, .subline, .divider, .cta-row { animation: none; opacity: 1; transform: none; }
      .divider { transform: scaleX(1); }
      .scroll-cue { animation: none; }
      .layer { transition: none; }
      /* Atmospheric effects are motion — hide entirely under reduced-motion. */
      .fx { display: none; }
      .theme-ready .layer::before, .theme-ready .layer::after { transition: none; }
      * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; }
    }

    /* ── Mobile ── */
    @media (max-width: 640px) {
      .wordmark { font-size: 0.8rem; letter-spacing: 0.15em; }
      .cta-row { flex-direction: column; width: 100%; }
      .cta-row .btn { width: 100%; }
      .header-actions .btn.secondary#headerSignup { display: none; }  /* keep header light on small screens */
      .card-inner { padding: 1.5rem; }
    }
