/* Website/site.css — Moo Dreams on the web: the Night Stand as a website.
   Layout: one sky behind every page that follows the visitor's own sun (night, dawn, day, dusk; a dial in the nav to
   play with it), a single 72rem column of copy on it, and cards only where something is a thing to pick up. The
   app's own cream, hay gold and ember carry the accents; Moo walks the bottom of the hero and leaps the moon at night.
   Modern CSS on purpose: cascade layers, registered custom properties so the sky can crossfade, scroll-driven reveals,
   offset-path for the leap, container queries, :has(), cross-document view transitions. Everything degrades: no JS
   still gives a readable night page. */

@layer tokens, base, sky, chrome, components, pages, motion;

/* ---------- tokens ---------- */
@layer tokens {
  @property --sky-1 { syntax: "<color>"; inherits: true; initial-value: #070b1e; }
  @property --sky-2 { syntax: "<color>"; inherits: true; initial-value: #0f1636; }
  @property --sky-3 { syntax: "<color>"; inherits: true; initial-value: #1c1b30; }
  @property --star-alpha { syntax: "<number>"; inherits: true; initial-value: 1; }
  @property --moon-alpha { syntax: "<number>"; inherits: true; initial-value: 1; }
  @property --sun-alpha { syntax: "<number>"; inherits: true; initial-value: 0; }
  @property --glow-alpha { syntax: "<number>"; inherits: true; initial-value: 0; }
  @property --spin { syntax: "<angle>"; inherits: false; initial-value: 0deg; }

  /* Night is the home key (dark-first). The app's palette: moon cream, hay gold, ember, the kid palettes. */
  :root {
    --sky-1: #070b1e; --sky-2: #0f1636; --sky-3: #1c1b30;
    --star-alpha: 1; --moon-alpha: 1; --sun-alpha: 0; --glow-alpha: 0;
    --ink: #fff4d6; --ink-soft: #e6dcc4; --muted: #b3ab9b;
    --paper: rgb(255 244 214 / 0.07); --paper-strong: rgb(255 244 214 / 0.12); --line: rgb(255 244 214 / 0.16);
    --panel: #121a3a; --panel-ink: #fff4d6;
    --hay: #f2b84b; --gold: #e0a33a; --ember: #ff9a5c; --mint: #9df2c8; --lavender: #d6c3ff; --sky-blue: #8fd3ff;
    --accent: var(--hay); --accent-ink: #1a1408; --link: #ffd27a;
    --good: #7fe0a8; --warn: #ffb36b;
    --moo-hide: #f6ead2; --moo-patch: #6b4a2b; --moo-muzzle: #e0a7a2; --moo-ink: #3a2a1e; --moo-horn: #e8cf9a;
    --star: #fff4d6;
    --display: "Baloo 2", "Arial Rounded MT Bold", ui-rounded, system-ui, sans-serif;
    --body: "Mulish", "Avenir Next", system-ui, sans-serif;
    --digits: "Mulish", ui-rounded, system-ui, sans-serif;
    --radius-card: 24px; --radius-panel: 16px; --radius-pill: 999px;
    --shadow: 0 20px 60px rgb(0 0 0 / 0.35);
    --col: 72rem;
    color-scheme: dark;
  }
  :root[data-sky="dawn"] {
    --sky-1: #1a1f4a; --sky-2: #6e4f7a; --sky-3: #f2b84b;
    --star-alpha: 0.35; --moon-alpha: 0.5; --sun-alpha: 0.3; --glow-alpha: 1;
    --paper: rgb(255 244 214 / 0.1); --paper-strong: rgb(255 244 214 / 0.16); --line: rgb(255 244 214 / 0.22);
    --panel: #2a2452;
  }
  :root[data-sky="day"] {
    --sky-1: #8fd3ff; --sky-2: #cfeaff; --sky-3: #fff4d6;
    --star-alpha: 0; --moon-alpha: 0; --sun-alpha: 1; --glow-alpha: 0;
    --ink: #1e2a4a; --ink-soft: #2f3b5c; --muted: #536083;
    --paper: rgb(255 255 255 / 0.55); --paper-strong: rgb(255 255 255 / 0.78); --line: rgb(30 42 74 / 0.14);
    --panel: #ffffff; --panel-ink: #1e2a4a;
    --accent: #e0a33a; --accent-ink: #1a1408; --link: #7a5214;
    --good: #2e8b57; --warn: #b8641a;
    --star: #ffffff;
    --shadow: 0 20px 50px rgb(30 42 74 / 0.18);
    color-scheme: light;
  }
  :root[data-sky="dusk"] {
    --sky-1: #22304f; --sky-2: #b8616b; --sky-3: #ff9a5c;
    --star-alpha: 0.3; --moon-alpha: 0.45; --sun-alpha: 0.35; --glow-alpha: 1;
    --paper: rgb(255 244 214 / 0.1); --paper-strong: rgb(255 244 214 / 0.16); --line: rgb(255 244 214 / 0.22);
    --panel: #3a2a4a;
  }
  /* Before the script picks a sky, follow the system: a light system gets the day. */
  @media (prefers-color-scheme: light) {
    :root:not([data-sky]):not([data-theme="dark"]) {
      --sky-1: #8fd3ff; --sky-2: #cfeaff; --sky-3: #fff4d6;
      --star-alpha: 0; --moon-alpha: 0; --sun-alpha: 1; --glow-alpha: 0;
      --ink: #1e2a4a; --ink-soft: #2f3b5c; --muted: #536083;
      --paper: rgb(255 255 255 / 0.55); --paper-strong: rgb(255 255 255 / 0.78); --line: rgb(30 42 74 / 0.14);
      --panel: #ffffff; --panel-ink: #1e2a4a;
      --accent: #e0a33a; --accent-ink: #1a1408; --link: #7a5214;
      --good: #2e8b57; --warn: #b8641a; --star: #ffffff;
      --shadow: 0 20px 50px rgb(30 42 74 / 0.18);
      color-scheme: light;
    }
  }
  :root[data-theme="light"]:not([data-sky]) {
    --sky-1: #8fd3ff; --sky-2: #cfeaff; --sky-3: #fff4d6;
    --star-alpha: 0; --moon-alpha: 0; --sun-alpha: 1; --glow-alpha: 0;
    --ink: #1e2a4a; --ink-soft: #2f3b5c; --muted: #536083;
    --paper: rgb(255 255 255 / 0.55); --paper-strong: rgb(255 255 255 / 0.78); --line: rgb(30 42 74 / 0.14);
    --panel: #ffffff; --panel-ink: #1e2a4a;
    --accent: #e0a33a; --accent-ink: #1a1408; --link: #7a5214;
    --good: #2e8b57; --warn: #b8641a; --star: #ffffff;
    --shadow: 0 20px 50px rgb(30 42 74 / 0.18);
    color-scheme: light;
  }
}

/* ---------- base ---------- */
@layer base {
  *, *::before, *::after { box-sizing: border-box; }
  [hidden] { display: none !important; }
  html {
    scroll-behavior: smooth;
    transition: --sky-1 1.6s ease, --sky-2 1.6s ease, --sky-3 1.6s ease, --star-alpha 1.2s ease, --moon-alpha 1.2s ease,
                --sun-alpha 1.2s ease, --glow-alpha 1.2s ease, color 0.8s ease;
  }
  @view-transition { navigation: auto; }
  body {
    margin: 0; min-height: 100dvh;
    background: var(--sky-2); color: var(--ink);
    font-family: var(--body); font-size: 1.0625rem; line-height: 1.55;
    -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
    overflow-x: clip;
    transition: color 0.8s ease, background 1.6s ease;
  }
  body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 30; background: var(--sky-1); }
  h1, h2, h3, h4 { font-family: var(--display); font-weight: 700; line-height: 1.05; margin: 0; text-wrap: balance; letter-spacing: -0.01em; }
  h1 { font-size: clamp(2.5rem, 2rem + 4vw, 5rem); }
  h2 { font-size: clamp(1.9rem, 1.5rem + 2.2vw, 3rem); }
  h3 { font-size: clamp(1.25rem, 1.1rem + 0.6vw, 1.55rem); }
  h4 { font-size: 1.1rem; }
  p, li { text-wrap: pretty; }
  p { margin: 0; }
  a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 0.15em; }
  a:hover { text-decoration-thickness: 2px; }
  strong { font-weight: 700; color: var(--ink); }
  small { font-size: 0.875em; }
  img, svg { max-width: 100%; display: block; }
  button { font: inherit; color: inherit; }
  :focus-visible { outline: 3px solid var(--hay); outline-offset: 3px; border-radius: 10px; }
  ::selection { background: var(--hay); color: var(--accent-ink); }
  .wrap { width: min(var(--col), 100%); margin-inline: auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
  .muted { color: var(--muted); }
  .soft { color: var(--ink-soft); }
  .eyebrow { font-family: var(--display); font-weight: 600; font-size: 0.85rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--hay); }
  .lede { font-size: clamp(1.15rem, 1.05rem + 0.5vw, 1.4rem); line-height: 1.5; max-width: 38em; color: var(--ink-soft); }
  .measure { max-width: 62ch; }
  .stack { display: grid; gap: var(--gap, 1rem); }
  .cluster { display: flex; flex-wrap: wrap; gap: var(--gap, 0.75rem); align-items: center; }
  .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; }
  section { padding-block: clamp(3.5rem, 6vw, 7rem); }
  .section-head { display: grid; gap: 0.9rem; max-width: 46rem; margin-bottom: clamp(2rem, 4vw, 3.5rem); }
  .tnum { font-variant-numeric: tabular-nums; }
  kbd { font: 600 0.85em var(--body); padding: 0.1em 0.45em; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 6px; background: var(--paper); }
}

/* ---------- the sky ---------- */
@layer sky {
  .sky { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none;
         background: linear-gradient(180deg, var(--sky-1) 0%, var(--sky-2) 55%, var(--sky-3) 100%); }
  .sky__stars { position: absolute; inset: 0; opacity: var(--star-alpha); }
  .star { position: absolute; width: var(--s, 2px); height: var(--s, 2px); border-radius: 50%; background: var(--star);
          opacity: var(--o, 0.8); left: var(--x); top: var(--y);
          animation: twinkle var(--d, 4s) ease-in-out var(--delay, 0s) infinite alternate; }
  .star--bright { box-shadow: 0 0 6px 1px color-mix(in oklab, var(--star) 60%, transparent); }
  .sky__glow { position: absolute; inset: auto 0 0 0; height: 55%; opacity: var(--glow-alpha);
               background: linear-gradient(180deg, transparent 0%, rgb(255 154 92 / 0.35) 55%, rgb(242 184 75 / 0.7) 100%); }
  .sky__moon, .sky__sun { position: absolute; width: clamp(56px, 7vw, 96px); aspect-ratio: 1; top: clamp(5rem, 12vh, 8rem); }
  .sky__moon { right: 12%; opacity: var(--moon-alpha); color: var(--moo-hide); filter: drop-shadow(0 0 18px rgb(255 244 214 / 0.25)); }
  .sky__sun { right: 12%; opacity: var(--sun-alpha); }
  .sky__sun::before { content: ""; position: absolute; inset: -40%; border-radius: 50%;
                      background: radial-gradient(circle, rgb(255 212 122 / 0.55), rgb(255 212 122 / 0) 70%); }
  .sky__sun::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--hay);
                     box-shadow: 0 0 30px 6px rgb(242 184 75 / 0.45); }
  .shooting { position: absolute; left: var(--x, 60%); top: var(--y, 20%); width: 140px; height: 2px; opacity: 0;
              background: linear-gradient(90deg, transparent, var(--star)); border-radius: 2px;
              transform: rotate(-24deg); transform-origin: right center;
              animation: shoot 1.1s ease-out var(--delay, 6s) infinite; }
  @keyframes twinkle { from { opacity: calc(var(--o, 0.8) * 0.35); } to { opacity: var(--o, 0.8); } }
  @keyframes shoot {
    0% { opacity: 0; transform: translate(0, 0) rotate(-24deg) scaleX(0.3); }
    8% { opacity: calc(0.9 * var(--star-alpha)); }
    100% { opacity: 0; transform: translate(-260px, 118px) rotate(-24deg) scaleX(1); }
  }
}

/* ---------- chrome: nav and footer ---------- */
@layer chrome {
  .nav { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; padding-block: 0.6rem; view-transition-name: site-nav; }
  .nav__bar { display: flex; align-items: center; gap: 0.5rem 1rem; flex-wrap: wrap;
              padding: 0.5rem 0.6rem 0.5rem 0.75rem; border-radius: var(--radius-pill);
              background: color-mix(in oklab, var(--panel) 72%, transparent); border: 1px solid var(--line);
              backdrop-filter: blur(16px) saturate(1.3); -webkit-backdrop-filter: blur(16px) saturate(1.3);
              box-shadow: 0 10px 40px rgb(0 0 0 / 0.18); }
  .brand { display: inline-flex; align-items: center; gap: 0.6rem; text-decoration: none; color: var(--ink);
           font-family: var(--display); font-weight: 700; font-size: 1.25rem; letter-spacing: -0.01em; }
  .brand img { width: 34px; height: 34px; border-radius: 9px; }
  .nav__links { display: flex; gap: 0.15rem; margin-inline: auto; overflow-x: auto; scrollbar-width: none; max-width: 100%; }
  .nav__links::-webkit-scrollbar { display: none; }
  .nav__links a { white-space: nowrap; text-decoration: none; color: var(--ink-soft); font-weight: 600; font-size: 0.95rem;
                  padding: 0.45rem 0.8rem; border-radius: var(--radius-pill); transition: background 0.2s, color 0.2s; }
  .nav__links a:hover { background: var(--paper-strong); color: var(--ink); }
  .nav__links a[aria-current="page"] { background: var(--hay); color: var(--accent-ink); }
  .dial { display: inline-flex; align-items: center; gap: 0.5rem; border: 1px solid var(--line); background: var(--paper);
          border-radius: var(--radius-pill); padding: 0.4rem 0.8rem 0.4rem 0.5rem; cursor: pointer; font-weight: 600; font-size: 0.9rem;
          color: var(--ink); transition: background 0.2s, transform 0.2s; }
  .dial:hover { background: var(--paper-strong); }
  .dial:active { transform: scale(0.97); }
  .dial__icon { width: 26px; height: 26px; border-radius: 50%; position: relative; overflow: hidden; background: var(--sky-1);
                border: 1px solid var(--line); }
  .dial__icon::before { content: ""; position: absolute; width: 14px; height: 14px; border-radius: 50%; left: 6px; top: 6px;
                        background: var(--hay); transform: translateY(var(--dial-sun, 14px)); transition: transform 0.6s cubic-bezier(.2,.9,.3,1.2); }
  .dial__icon::after { content: ""; position: absolute; width: 12px; height: 12px; border-radius: 50%; left: 7px; top: 7px;
                       background: var(--moo-hide); box-shadow: 4px -3px 0 0 var(--sky-1) inset; transform: translateY(var(--dial-moon, 0px));
                       transition: transform 0.6s cubic-bezier(.2,.9,.3,1.2); }
  :root[data-sky="day"] .dial__icon { --dial-sun: 0px; --dial-moon: -16px; }
  :root[data-sky="dawn"] .dial__icon, :root[data-sky="dusk"] .dial__icon { --dial-sun: 7px; --dial-moon: -8px; }
  @media (max-width: 640px) {
    .nav__bar { border-radius: 22px; }
    .nav__links { order: 3; flex-basis: 100%; margin-inline: 0; padding-top: 0.2rem; }
    .dial { margin-left: auto; }
    .dial__label { display: none; }
  }
  .footer { padding-block: 3rem 4rem; color: var(--muted); font-size: 0.95rem; }
  .footer__grid { display: grid; gap: 2rem; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); align-items: start; }
  .footer h4 { color: var(--ink); margin-bottom: 0.6rem; }
  .footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.35rem; }
  .footer a { color: var(--ink-soft); text-decoration: none; }
  .footer a:hover { color: var(--ink); text-decoration: underline; }
  .footer__legal { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; justify-content: space-between; font-size: 0.85rem; }
  .footer__moo { width: 120px; opacity: 0.9; }
}

/* ---------- components ---------- */
@layer components {
  .btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; min-height: 3.1rem; padding: 0.75rem 1.35rem;
         border-radius: var(--radius-pill); font-family: var(--display); font-weight: 700; font-size: 1.05rem; text-decoration: none;
         border: 1px solid transparent; cursor: pointer; transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s; }
  .btn:active { transform: translateY(1px) scale(0.99); }
  .btn--primary { background: var(--hay); color: var(--accent-ink); box-shadow: 0 10px 30px rgb(242 184 75 / 0.3); }
  .btn--primary:hover { background: #ffc85f; box-shadow: 0 14px 36px rgb(242 184 75 / 0.4); }
  .btn--ghost { background: var(--paper); color: var(--ink); border-color: var(--line); backdrop-filter: blur(10px); }
  .btn--ghost:hover { background: var(--paper-strong); }
  .btn svg { width: 1.2em; height: 1.2em; }

  .chip { display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.35rem 0.75rem; border-radius: var(--radius-pill);
          background: var(--paper); border: 1px solid var(--line); font-size: 0.9rem; font-weight: 600; color: var(--ink-soft); }
  .chip svg { width: 1em; height: 1em; }
  .chip--good { color: var(--good); }
  .chip--warn { color: var(--warn); }

  .card { position: relative; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-card);
          padding: clamp(1.25rem, 2vw, 1.75rem); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); container-type: inline-size; }
  .card h3 { margin-bottom: 0.5rem; }
  .card p + p { margin-top: 0.6rem; }
  .card--solid { background: var(--panel); color: var(--panel-ink); box-shadow: var(--shadow); }
  .card--glow::before { content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; pointer-events: none;
                        background: conic-gradient(from var(--spin), transparent 0 62%, var(--hay) 80%, var(--ember) 88%, transparent 100%);
                        -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
                        opacity: 0; transition: opacity 0.4s; }
  .card--glow:hover::before { opacity: 1; animation: spin 5s linear infinite; }
  @keyframes spin { to { --spin: 360deg; } }

  .grid { display: grid; gap: clamp(1rem, 2vw, 1.5rem); }
  .grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr)); }
  .grid--3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr)); }
  .grid > * { min-width: 0; }

  .bento { display: grid; gap: clamp(0.9rem, 1.6vw, 1.25rem); grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .bento > * { grid-column: span 2; min-width: 0; }
  .bento > .span-3 { grid-column: span 3; }
  .bento > .span-4 { grid-column: span 4; }
  .bento > .span-6 { grid-column: span 6; }
  @media (max-width: 900px) { .bento > *, .bento > .span-3, .bento > .span-4 { grid-column: span 3; } }
  @media (max-width: 600px) { .bento > *, .bento > .span-3, .bento > .span-4, .bento > .span-6 { grid-column: span 6; } }

  .icon { width: 2.6rem; height: 2.6rem; border-radius: 14px; display: grid; place-items: center; background: var(--paper-strong);
          color: var(--hay); margin-bottom: 0.9rem; }
  .icon svg { width: 1.4rem; height: 1.4rem; }

  /* Definition grid used on the features page */
  .defs { display: grid; gap: 1.25rem 2rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr)); }
  .def { display: grid; gap: 0.35rem; padding-top: 1rem; border-top: 1px solid var(--line); min-width: 0; }
  .def dt { font-family: var(--display); font-weight: 700; font-size: 1.1rem; color: var(--ink); }
  .def dd { margin: 0; color: var(--ink-soft); }
  .def .how { font-size: 0.9rem; color: var(--muted); }
  .def .how strong { color: var(--hay); font-weight: 700; }

  /* Steps with a line that draws as you scroll */
  .steps { position: relative; display: grid; gap: clamp(1.5rem, 3vw, 2.5rem); padding-left: 3.25rem; }
  .steps::before { content: ""; position: absolute; left: 1.1rem; top: 1rem; bottom: 1rem; width: 3px; border-radius: 3px;
                   background: linear-gradient(var(--hay), var(--ember)); transform-origin: top; }
  .step { position: relative; display: grid; gap: 0.5rem; }
  .step::before { content: attr(data-n); position: absolute; left: -3.25rem; top: -0.1rem; width: 2.3rem; height: 2.3rem; border-radius: 50%;
                  display: grid; place-items: center; background: var(--panel); color: var(--panel-ink); border: 2px solid var(--hay);
                  font-family: var(--display); font-weight: 700; }
  .step h3 { font-size: 1.35rem; }
  .step p, .step li { color: var(--ink-soft); }
  .step ul { margin: 0.25rem 0 0; padding-left: 1.2rem; display: grid; gap: 0.3rem; }

  /* Accordion (tips, support) */
  details.tip { border-top: 1px solid var(--line); }
  details.tip:last-child { border-bottom: 1px solid var(--line); }
  details.tip summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 1rem;
                        padding: 1rem 0.25rem; font-family: var(--display); font-weight: 700; font-size: 1.15rem; color: var(--ink); }
  details.tip summary::-webkit-details-marker { display: none; }
  details.tip summary::after { content: ""; width: 0.7rem; height: 0.7rem; flex: none; border-right: 2px solid var(--hay); border-bottom: 2px solid var(--hay);
                               transform: rotate(45deg); transition: transform 0.3s; margin-right: 0.3rem; }
  details.tip[open] summary::after { transform: rotate(-135deg); }
  details.tip .tip__body { padding: 0 0.25rem 1.25rem; color: var(--ink-soft); display: grid; gap: 0.7rem; max-width: 62ch; }
  details.tip .tip__body ol, details.tip .tip__body ul { margin: 0; padding-left: 1.25rem; display: grid; gap: 0.4rem; }
  @supports (interpolate-size: allow-keywords) {
    details.tip { interpolate-size: allow-keywords; }
    details.tip::details-content { block-size: 0; overflow: clip; transition: block-size 0.35s ease, content-visibility 0.35s allow-discrete; }
    details.tip[open]::details-content { block-size: auto; }
  }

  /* The mini Night Stand used in demos */
  .stand { position: relative; overflow: hidden; border-radius: 28px; aspect-ratio: 9 / 16; max-width: 100%;
           background: linear-gradient(180deg, var(--d1, #070b1e), var(--d2, #0f1636) 55%, var(--d3, #1c1b30));
           box-shadow: var(--shadow); border: 6px solid #0b0b10; color: #fff4d6; container-type: size; }
  .stand__time { position: absolute; left: 0; right: 0; top: 34%; text-align: center; font-family: var(--digits); font-weight: 200;
                 font-size: 22cqw; letter-spacing: -0.02em; line-height: 1; color: var(--stand-digits, #d6c3ff); font-variant-numeric: tabular-nums;
                 text-shadow: 0 0 24px color-mix(in oklab, var(--stand-digits, #d6c3ff) 60%, transparent); }
  .stand__date { position: absolute; left: 0; right: 0; top: 58%; text-align: center; font-size: 5.2cqw; color: var(--stand-digits, #d6c3ff); opacity: 0.8; }
  .stand__details { position: absolute; left: 0; right: 0; top: 70%; display: grid; gap: 0.3em; justify-items: center; font-size: 4.2cqw; opacity: 0.85; }
  .stand__details b { font-weight: 700; font-size: 1.15em; }
  .stand__sun { position: absolute; left: 14%; top: 14%; width: 14cqw; aspect-ratio: 1; border-radius: 50%; background: var(--hay);
                box-shadow: 0 0 0 10cqw rgb(242 184 75 / 0.18), 0 0 30px 6px rgb(242 184 75 / 0.5); opacity: var(--s-sun, 0); transition: opacity 0.8s; }
  .stand__moon { position: absolute; left: 14%; top: 14%; width: 11cqw; color: #f6ead2; opacity: var(--s-moon, 1); transition: opacity 0.8s; }
  .stand__glow { position: absolute; inset: auto 0 0 0; height: 55%; opacity: var(--s-glow, 0); transition: opacity 0.8s;
                 background: linear-gradient(180deg, transparent, rgb(255 154 92 / 0.45) 55%, rgb(242 184 75 / 0.85)); }
  .stand__veil { position: absolute; inset: 0; background: #000; opacity: var(--s-veil, 0); transition: opacity 0.8s; pointer-events: none; }
  .stand__moo { position: absolute; bottom: 3%; left: var(--moo-x, 58%); width: 34cqw; transition: left 2s ease, opacity 0.6s; opacity: var(--s-moo, 1); }
  .stand__stars { position: absolute; inset: 0; opacity: var(--s-stars, 1); transition: opacity 0.8s; }

  /* Moo herself */
  .moo { display: block; width: 100%; height: auto; overflow: visible; }
  .moo .eyes { transform-box: fill-box; transform-origin: center; animation: blink 4.6s ease-in-out infinite; }
  .moo .tail { transform-box: fill-box; transform-origin: left bottom; animation: swish 3.4s ease-in-out infinite; }
  .moo .ear { transform-box: fill-box; transition: transform 0.3s; }
  .moo .ear--l { transform-origin: right center; }
  .moo .ear--r { transform-origin: left center; }
  .moo:hover .ear--r, .moo.is-perky .ear--r { transform: rotate(-18deg); }
  .moo:hover .ear--l, .moo.is-perky .ear--l { transform: rotate(18deg); }
  .moo--walking .leg { transform-box: fill-box; transform-origin: center top; animation: stride 0.72s ease-in-out infinite; }
  .moo--walking .leg--2, .moo--walking .leg--3 { animation-delay: -0.36s; }
  .moo--walking .body { transform-box: fill-box; transform-origin: center; animation: bob 0.72s ease-in-out infinite; }
  .moo--sleeping .eyes { animation: none; transform: scaleY(0.12); }
  .moo--sleeping .tail { animation: none; }
  @keyframes blink { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(0.08); } }
  @keyframes swish { 0%, 100% { transform: rotate(0deg); } 50% { transform: rotate(-16deg); } }
  @keyframes stride { 0%, 100% { transform: rotate(14deg); } 50% { transform: rotate(-14deg); } }
  @keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-1.5px); } }
  .moo-bubble { position: absolute; padding: 0.35rem 0.8rem; border-radius: var(--radius-pill); background: var(--moo-hide); color: var(--moo-ink);
                font-family: var(--display); font-weight: 700; font-size: 1rem; pointer-events: none; opacity: 0; transform: translateY(6px) scale(0.9);
                transition: opacity 0.25s, transform 0.25s; white-space: nowrap; }
  .moo-bubble.is-on { opacity: 1; transform: translateY(0) scale(1); }
  .moo-bubble::after { content: ""; position: absolute; left: 50%; bottom: -6px; width: 12px; height: 12px; background: inherit; transform: translateX(-50%) rotate(45deg); border-radius: 2px; }
  .hop { animation: hop 0.5s cubic-bezier(.3,1.6,.4,1) 1; }
  @keyframes hop { 30% { transform: translateY(-14%); } 100% { transform: translateY(0); } }

  /* Scroll reveal: a settled frame by default, a lift as it enters where the browser can time it by scroll */
  .reveal { --lift: 22px; }
  @supports (animation-timeline: view()) {
    .reveal { animation: rise linear both; animation-timeline: view(); animation-range: entry 5% entry 45%; }
  }
  @keyframes rise { from { opacity: 0; transform: translateY(var(--lift)); } to { opacity: 1; transform: none; } }
  html.js.no-scroll-timeline .reveal { opacity: 0; transform: translateY(var(--lift)); transition: opacity 0.7s ease, transform 0.7s ease; }
  html.js.no-scroll-timeline .reveal.in { opacity: 1; transform: none; }

  .notice { display: flex; gap: 0.75rem; align-items: flex-start; padding: 1rem 1.1rem; border-radius: var(--radius-panel);
            background: var(--paper); border: 1px solid var(--line); color: var(--ink-soft); font-size: 0.95rem; }
  .notice svg { width: 1.3rem; height: 1.3rem; flex: none; color: var(--hay); margin-top: 0.1rem; }

  .table { width: 100%; border-collapse: collapse; font-size: 0.98rem; }
  .table th, .table td { text-align: left; padding: 0.75rem 0.5rem; border-bottom: 1px solid var(--line); vertical-align: top; }
  .table th { font-family: var(--display); font-weight: 700; color: var(--ink); }
  .table td { color: var(--ink-soft); }
  .table-wrap { overflow-x: auto; }
  .check { color: var(--good); font-weight: 700; }
  .dash { color: var(--muted); }

  .toc { position: sticky; top: calc(env(safe-area-inset-top, 0px) + 5.5rem); align-self: start; display: grid; gap: 0.2rem; }
  .toc a { text-decoration: none; color: var(--ink-soft); padding: 0.4rem 0.75rem; border-radius: 10px; font-weight: 600; font-size: 0.95rem; }
  .toc a:hover, .toc a.is-here { background: var(--paper-strong); color: var(--ink); }
  .with-toc { display: grid; gap: clamp(1.5rem, 4vw, 4rem); grid-template-columns: 13rem minmax(0, 1fr); align-items: start; }
  @media (max-width: 860px) {
    .with-toc { grid-template-columns: 1fr; }
    .toc { position: static; display: flex; flex-wrap: wrap; gap: 0.4rem; }
    .toc a { border: 1px solid var(--line); background: var(--paper); }
  }
}

/* ---------- page pieces ---------- */
@layer pages {
  /* Hero: the Night Stand itself */
  .hero { position: relative; padding-block: clamp(2rem, 6vw, 4rem) 0; }
  .hero__stage { position: relative; min-height: clamp(30rem, 66vh, 40rem); display: grid; align-content: center; justify-items: center; text-align: center; gap: 1.1rem; padding-bottom: 7.5rem; }
  .hero__clock { font-family: var(--digits); font-weight: 200; font-size: clamp(5.5rem, 24vw, 15rem); line-height: 0.95; letter-spacing: -0.03em;
                 color: var(--ink); font-variant-numeric: tabular-nums; text-shadow: 0 0 40px color-mix(in oklab, var(--ink) 35%, transparent);
                 display: inline-flex; align-items: baseline; gap: 0.1em; }
  .hero__clock small { font-family: var(--body); font-weight: 400; font-size: 0.22em; letter-spacing: 0.04em; color: var(--muted); }
  .hero__date { font-size: clamp(1rem, 0.9rem + 0.6vw, 1.35rem); color: var(--muted); margin-top: -0.4rem; }
  .hero h1 { margin-top: 1.4rem; max-width: 14ch; }
  .hero .lede { margin-inline: auto; }
  .hero__ctas { margin-top: 0.5rem; justify-content: center; }
  .hero__note { font-size: 0.9rem; color: var(--muted); }
  .hero__ground { position: absolute; inset: auto 0 0 0; height: 7rem; pointer-events: none; container-type: inline-size; }
  .hero__walker { position: absolute; bottom: 0.5rem; left: 4cqw; width: clamp(96px, 14cqw, 150px); --span: calc(92cqw - 100%);
                  animation: stroll 46s ease-in-out infinite; transition: opacity 0.6s; }
  .hero__walker .moo { pointer-events: auto; cursor: pointer; }
  .sky__leaper { position: absolute; width: clamp(40px, 4.5vw, 64px); top: clamp(5rem, 12vh, 8rem); right: 12%; pointer-events: none; opacity: 0; }
  .sky__leaper .moo { transform: scaleX(-1); }
  .sky__leaper.is-leaping { animation: leap 3.2s cubic-bezier(.4,0,.6,1) both; }
  .is-leaping-now .hero__walker { opacity: 0; }
  @keyframes stroll {
    0% { transform: translateX(0) scaleX(-1); } 44% { transform: translateX(var(--span)) scaleX(-1); }
    50% { transform: translateX(var(--span)) scaleX(1); } 94% { transform: translateX(0) scaleX(1); } 100% { transform: translateX(0) scaleX(-1); }
  }
  @keyframes leap {
    0% { opacity: 0; offset-distance: 0%; } 12% { opacity: 1; } 88% { opacity: 1; } 100% { opacity: 0; offset-distance: 100%; }
  }
  @supports (offset-path: path("M0 0 L1 1")) {
    .sky__leaper { offset-path: path("M -90 110 Q 40 -150 170 110"); offset-rotate: auto 0deg; }
  }

  /* The morning strip */
  .morning { timeline-scope: --strip; }
  .strip { display: grid; grid-auto-flow: column; grid-auto-columns: min(78vw, 22rem); gap: 1rem; overflow-x: auto; overscroll-behavior-x: contain;
           scroll-snap-type: x mandatory; padding: 0.5rem 0 1.5rem; scrollbar-width: thin; scrollbar-color: var(--hay) transparent; scroll-timeline: --strip x; }
  .strip > * { scroll-snap-align: start; }
  .strip__sun { position: relative; height: 10px; border-radius: 10px; background: var(--paper); overflow: visible; margin-bottom: 1.25rem; }
  .strip__sun::before { content: ""; position: absolute; left: 0; top: 50%; width: 26px; height: 26px; border-radius: 50%; background: var(--hay);
                        transform: translate(0, -50%); box-shadow: 0 0 20px 4px rgb(242 184 75 / 0.5); }
  @supports (animation-timeline: scroll()) {
    .strip__sun::before { animation: slide-sun linear both; animation-timeline: --strip; }
  }
  @keyframes slide-sun { to { left: calc(100% - 26px); } }
  .panel { display: grid; grid-template-rows: auto 1fr; gap: 0.9rem; }
  .panel__art { aspect-ratio: 16 / 10; border-radius: 18px; overflow: hidden; position: relative; background: var(--panel); border: 1px solid var(--line); }
  .panel__k { font-family: var(--display); font-weight: 700; color: var(--hay); font-size: 0.85rem; letter-spacing: 0.1em; text-transform: uppercase; }
  .panel p { color: var(--ink-soft); font-size: 0.98rem; }

  /* little art pieces inside panels */
  .art-sunrise { background: linear-gradient(180deg, #070b1e 0%, #2a1f3a 50%, #ff9a5c 85%, #f2b84b 100%); }
  .art-sunrise::after { content: ""; position: absolute; left: 50%; bottom: -30%; width: 55%; aspect-ratio: 1; border-radius: 50%; transform: translateX(-50%);
                        background: radial-gradient(circle, #ffe08a, #f2b84b 50%, rgb(242 184 75 / 0) 72%); }
  .art-ring { display: grid; place-items: center; }
  .art-ring i { position: absolute; width: 42%; aspect-ratio: 1; border-radius: 50%; border: 3px solid var(--hay); opacity: 0; animation: ping 2.4s ease-out infinite; }
  .art-ring i:nth-child(2) { animation-delay: 0.8s; } .art-ring i:nth-child(3) { animation-delay: 1.6s; }
  .art-ring b { font-family: var(--display); font-size: 2rem; color: var(--panel-ink); z-index: 1; }
  @keyframes ping { 0% { transform: scale(0.5); opacity: 0.9; } 100% { transform: scale(1.9); opacity: 0; } }
  .art-chain { display: flex; align-items: center; justify-content: center; gap: 6%; padding: 0 8%; }
  .art-chain i { width: 12%; aspect-ratio: 1; border-radius: 50%; background: var(--paper-strong); border: 2px solid var(--hay); position: relative; animation: light 4s ease-in-out infinite; }
  .art-chain i:nth-child(2) { animation-delay: 0.8s; } .art-chain i:nth-child(3) { animation-delay: 1.6s; } .art-chain i:nth-child(4) { animation-delay: 2.4s; } .art-chain i:nth-child(5) { animation-delay: 3.2s; }
  @keyframes light { 0%, 100% { background: var(--paper-strong); box-shadow: none; } 15%, 30% { background: var(--hay); box-shadow: 0 0 18px var(--hay); } }
  .art-math { display: grid; place-items: center; font-family: var(--digits); font-weight: 300; font-size: 2.4rem; color: var(--panel-ink); letter-spacing: 0.05em; }
  .art-math em { font-style: normal; color: var(--hay); display: inline-block; width: 1.4ch; border-bottom: 3px solid var(--hay); animation: caret 1.1s steps(2) infinite; }
  @keyframes caret { 50% { border-color: transparent; } }
  .art-heart { display: grid; place-items: center; }
  .art-heart svg { width: 32%; color: var(--ember); animation: beat 1.6s ease-in-out infinite; }
  @keyframes beat { 0%, 100% { transform: scale(1); } 14% { transform: scale(1.12); } 28% { transform: scale(1); } 42% { transform: scale(1.08); } }
  .art-report { display: grid; align-content: center; gap: 10%; padding: 10% 14%; }
  .art-report i { display: block; height: 10%; border-radius: 6px; background: var(--paper-strong); position: relative; overflow: hidden; }
  .art-report i::after { content: ""; position: absolute; inset: 0; width: var(--w); background: var(--good); border-radius: inherit; }

  /* feature tiles */
  .tile { display: grid; grid-template-rows: auto 1fr; gap: 0.6rem; }
  .tile h3 { font-size: 1.3rem; }
  .tile p { color: var(--ink-soft); }
  .tile__art { height: 7rem; border-radius: 16px; position: relative; overflow: hidden; background: var(--paper-strong); margin-bottom: 0.4rem; }
  .wave { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 4px; }
  .wave i { width: 5px; height: 30%; border-radius: 3px; background: var(--hay); animation: wave 1.1s ease-in-out infinite; }
  .wave i:nth-child(odd) { background: var(--ember); }
  @keyframes wave { 0%, 100% { height: 22%; } 50% { height: 78%; } }
  .notif { position: absolute; left: 6%; right: 6%; top: 50%; transform: translateY(-50%); background: var(--panel); color: var(--panel-ink); border-radius: 14px; padding: 0.7rem 0.85rem;
           display: grid; grid-template-columns: auto 1fr; gap: 0.6rem; align-items: center; box-shadow: var(--shadow); font-size: 0.85rem; }
  .notif img { width: 30px; height: 30px; border-radius: 8px; }
  .notif b { display: block; font-size: 0.9rem; }
  .palettes { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 10px; }
  .palettes i { width: 16%; aspect-ratio: 1; border-radius: 50%; box-shadow: 0 0 18px 2px color-mix(in oklab, var(--c) 60%, transparent); background: var(--c); transition: transform 0.3s; }
  .tile:hover .palettes i { transform: translateY(-4px); }
  .upby { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--digits); font-weight: 200; font-size: 2.6rem; color: var(--ink); }
  .upby small { font: 600 0.8rem var(--body); color: var(--hay); letter-spacing: 0.08em; text-transform: uppercase; margin-left: 0.5rem; }
  .lock { position: absolute; inset: 0; display: grid; place-items: center; color: var(--mint); }
  .lock svg { width: 34%; }
  .devices { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 8%; }
  .devices i { display: block; border: 2px solid var(--line); border-radius: 8px; background: var(--panel); position: relative; }
  .devices i::after { content: ""; position: absolute; left: 50%; bottom: 3px; width: 30%; height: 2px; background: var(--line); transform: translateX(-50%); border-radius: 2px; }
  .devices .phone { width: 22%; aspect-ratio: 9 / 18; }
  .devices .tablet { width: 36%; aspect-ratio: 10 / 13; }
  .devices .link { width: 10%; height: 2px; background: linear-gradient(90deg, var(--hay), var(--ember)); border: 0; border-radius: 2px; animation: pulse-link 1.6s ease-in-out infinite; }
  @keyframes pulse-link { 50% { opacity: 0.3; } }

  /* sun demo */
  .sundemo { display: grid; gap: clamp(1.5rem, 3vw, 3rem); grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); align-items: center; }
  @media (max-width: 760px) { .sundemo { grid-template-columns: 1fr; } }
  .sundemo .stand { width: min(100%, 20rem); margin-inline: auto; }
  .slider { display: grid; gap: 0.5rem; }
  .slider input { width: 100%; accent-color: var(--hay); }
  .slider output { font-family: var(--display); font-weight: 700; font-size: 1.3rem; }
  .phases { display: flex; justify-content: space-between; font-size: 0.8rem; color: var(--muted); }

  /* pricing */
  .plans { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr)); align-items: start; }
  .plan ul { list-style: none; margin: 1rem 0 0; padding: 0; display: grid; gap: 0.55rem; }
  .plan li { display: flex; gap: 0.6rem; align-items: flex-start; color: var(--ink-soft); }
  .plan li::before { content: ""; width: 0.55rem; height: 0.55rem; flex: none; margin-top: 0.5rem; border-radius: 50%; background: var(--hay); }
  .plan .price { font-family: var(--display); font-weight: 700; font-size: 2rem; margin-top: 0.3rem; }

  /* mood row */
  .moods { display: flex; flex-wrap: wrap; gap: 0.6rem; }
  .mood { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.55rem 0.9rem; border-radius: var(--radius-pill); background: var(--paper); border: 1px solid var(--line); font-weight: 700; }
  .mood span { font-size: 1.3rem; }

  /* challenge picker */
  .picker { display: grid; gap: 1.25rem; }
  .picker__chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }
  .picker__chips input { position: absolute; opacity: 0; pointer-events: none; }
  .picker__chips label { cursor: pointer; padding: 0.5rem 0.95rem; border-radius: var(--radius-pill); border: 1px solid var(--line); background: var(--paper); font-weight: 700; transition: background 0.2s, color 0.2s; }
  .picker__chips input:focus-visible + label { outline: 3px solid var(--hay); outline-offset: 3px; }
  .picker__chips input:checked + label { background: var(--hay); color: var(--accent-ink); border-color: var(--hay); }
  .picker__demos > * { display: none; }
  .picker:has(#c-hold:checked) .demo-hold, .picker:has(#c-pairs:checked) .demo-pairs, .picker:has(#c-math:checked) .demo-math, .picker:has(#c-type:checked) .demo-type,
  .picker:has(#c-say:checked) .demo-say, .picker:has(#c-shake:checked) .demo-shake, .picker:has(#c-walk:checked) .demo-walk,
  .picker:has(#c-scan:checked) .demo-scan, .picker:has(#c-photo:checked) .demo-photo, .picker:has(#c-sticker:checked) .demo-sticker { display: grid; }
  .demo { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1.5rem; align-items: center; }
  @media (max-width: 700px) { .demo { grid-template-columns: 1fr; } }
  .demo__art { aspect-ratio: 1; max-width: 18rem; margin-inline: auto; width: 100%; border-radius: 24px; background: var(--panel); color: var(--panel-ink); display: grid; place-items: center; position: relative; overflow: hidden; }
  .holdring { width: 60%; aspect-ratio: 1; border-radius: 50%; background: conic-gradient(var(--hay) var(--p, 0%), var(--paper-strong) 0); display: grid; place-items: center; cursor: pointer; user-select: none; -webkit-user-select: none; touch-action: none; }
  .holdring::after { content: ""; width: 86%; aspect-ratio: 1; border-radius: 50%; background: var(--panel); }
  .holdring svg { position: absolute; width: 30%; color: var(--hay); }
  .holdring.is-done { background: var(--good); }
  .pairs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6%; width: 66%; }
  .pairs i { aspect-ratio: 1; border-radius: 12px; background: var(--paper-strong); display: grid; place-items: center; font-style: normal; font-size: 1.5rem; }
  .pairs i.up { background: var(--hay); }
  .mission { position: relative; width: 62%; aspect-ratio: 4 / 3; border-radius: 16px; background: var(--paper-strong); display: grid; place-items: center; }
  .mission .spot { font-style: normal; font-size: 2.4rem; }
  .mission .frame { position: absolute; inset: 10%; border: 3px solid var(--hay); border-radius: 12px; animation: frame 2.4s ease-in-out infinite; }
  @keyframes frame { 0%, 100% { inset: 10%; } 50% { inset: 16% 14%; } }
  .sticker { position: relative; width: 56%; aspect-ratio: 1; display: grid; place-items: center; }
  .sticker .tag { width: 38%; aspect-ratio: 1; border-radius: 50%; background: var(--hay); }
  .sticker i { position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--hay); opacity: 0; animation: ping 2.4s ease-out infinite; }
  .sticker i:nth-child(2) { animation-delay: 0.8s; }
  .sticker i:nth-child(3) { animation-delay: 1.6s; }
  @keyframes ping { 0% { transform: scale(0.4); opacity: 0.8; } 100% { transform: scale(1); opacity: 0; } }
  .keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; width: 60%; }
  .keypad i { aspect-ratio: 1; border-radius: 10px; background: var(--paper-strong); display: grid; place-items: center; font: 700 1rem var(--display); }
  .mathq { position: absolute; top: 10%; font: 300 1.6rem var(--digits); }
  .typed { font: 500 1.05rem var(--body); padding: 1rem; text-align: center; max-width: 90%; }
  .typed::after { content: "|"; color: var(--hay); animation: caret 1s steps(2) infinite; }
  .shakephone { width: 28%; aspect-ratio: 9 / 18; border-radius: 14px; border: 3px solid var(--line); animation: shake 1.2s ease-in-out infinite; }
  @keyframes shake { 0%, 100% { transform: rotate(0); } 20% { transform: rotate(-9deg) translateX(-4px); } 40% { transform: rotate(9deg) translateX(4px); } 60% { transform: rotate(-6deg); } 80% { transform: rotate(6deg); } }
  .steps-art { display: flex; gap: 8%; align-items: flex-end; }
  .steps-art i { width: 12%; aspect-ratio: 1 / 1.6; border-radius: 50% 50% 40% 40%; background: var(--hay); opacity: 0.25; animation: foot 1.6s ease-in-out infinite; }
  .steps-art i:nth-child(2) { animation-delay: 0.4s; transform: translateY(-30%); } .steps-art i:nth-child(3) { animation-delay: 0.8s; } .steps-art i:nth-child(4) { animation-delay: 1.2s; transform: translateY(-30%); }
  @keyframes foot { 0%, 100% { opacity: 0.25; } 30% { opacity: 1; } }
  .qr { width: 50%; aspect-ratio: 1; display: grid; grid-template-columns: repeat(7, 1fr); gap: 4%; }
  .qr i { background: var(--panel-ink); border-radius: 2px; }
  .qr i:nth-child(3n) { background: transparent; }
  .qr i:nth-child(5n) { background: transparent; }
  .scanline { position: absolute; left: 20%; right: 20%; height: 3px; background: var(--hay); box-shadow: 0 0 12px var(--hay); animation: scan 2s ease-in-out infinite; }
  @keyframes scan { 0%, 100% { top: 26%; } 50% { top: 72%; } }

  /* snooze chain diagram */
  .chain { display: grid; gap: 1rem; }
  .chain__row { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
  .chain__dot { display: inline-grid; place-items: center; min-width: 3rem; height: 3rem; padding: 0 0.6rem; border-radius: var(--radius-pill); font-weight: 700; font-size: 0.85rem; background: var(--paper-strong); border: 2px solid var(--line); }
  .chain__dot--ring { border-color: var(--hay); background: var(--hay); color: var(--accent-ink); }
  .chain__dot--done { border-color: var(--good); color: var(--good); }
  .chain__arrow { color: var(--muted); font-size: 0.85rem; }

  /* Moo page */
  .moo-stage { position: relative; display: grid; place-items: center; min-height: 22rem; border-radius: 32px; overflow: hidden; background: linear-gradient(180deg, #070b1e, #1c1b30); border: 1px solid var(--line); box-shadow: var(--shadow); }
  .moo-stage .moo-big { width: min(70%, 28rem); cursor: pointer; }
  .moo-stage .moo-bubble { top: 18%; left: 50%; transform: translate(-50%, 6px) scale(0.9); }
  .moo-stage .moo-bubble.is-on { transform: translate(-50%, 0) scale(1); }
  .day-ring { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr)); gap: 1rem; }
  .hour { display: grid; gap: 0.4rem; padding: 1rem; border-radius: 18px; background: var(--paper); border: 1px solid var(--line); }
  .hour b { font-family: var(--display); font-size: 1.1rem; }
  .hour small { color: var(--muted); letter-spacing: 0.08em; text-transform: uppercase; font-weight: 700; font-size: 0.75rem; }

  /* privacy / support */
  .prose { max-width: 66ch; display: grid; gap: 1rem; color: var(--ink-soft); }
  .prose h2 { color: var(--ink); margin-top: 1.5rem; font-size: 1.6rem; }
  .prose h3 { color: var(--ink); margin-top: 0.5rem; }
  .prose ul, .prose ol { margin: 0; padding-left: 1.25rem; display: grid; gap: 0.45rem; }
  .prose dl { display: grid; gap: 0.6rem; margin: 0; }
  .prose dt { font-weight: 700; color: var(--ink); }
  .prose dd { margin: 0 0 0.4rem; }
  .cta-band { text-align: center; display: grid; gap: 1rem; justify-items: center; padding: clamp(2rem, 5vw, 3.5rem); border-radius: 32px; background: var(--paper); border: 1px solid var(--line); position: relative; overflow: hidden; }
  .cta-band h2 { max-width: 18ch; }
  .cta-band .moo-peek { position: absolute; right: -2%; bottom: -4%; width: clamp(110px, 16vw, 180px); opacity: 0.95; }
  @media (max-width: 700px) { .cta-band .moo-peek { display: none; } }
}

/* ---------- motion budget ---------- */
@layer motion {
  @media (prefers-reduced-motion: reduce) {
    html { transition: none; }
    *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
    .reveal { opacity: 1 !important; transform: none !important; animation: none !important; }
    .hero__walker { animation: none; left: 8%; }
    .shooting { display: none; }
  }
}

/* ---------- host guard ----------
   Everything above lives in cascade layers, which any unlayered stylesheet a host injects (a preview frame's reset,
   a reader mode) would beat. The few rules a page cannot lose are repeated here outside the layers. */
body { margin: 0; font-family: var(--body); font-size: 1.0625rem; line-height: 1.55; background: var(--sky-2); color: var(--ink); }
:root:not([data-sky="day"]) { color-scheme: dark; }
:root[data-sky="day"] { color-scheme: light; }
