/* Dozely — night-sky web design system.
   Mirrors App/Sources/Design/Theme.swift: a lock-screen sky (ink to midnight to slate horizon),
   Liquid Glass surfaces, one accent (moonlight periwinkle silver), serif for voice,
   rounded for numbers, calm motion with no overshoot. */

@font-face {
  font-family: "Source Serif 4";
  src: url("../fonts/source-serif-4.woff2") format("woff2");
  font-weight: 500 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Nunito";
  src: url("../fonts/nunito.woff2") format("woff2");
  font-weight: 500 800;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: dark;

  /* Surfaces: the sky runs ink -> midnight -> horizon, top to bottom */
  --ink: #060917;
  --midnight: #10162F;
  --horizon: #2F3B5A;
  --dusk: #26304F;
  --card: rgba(255, 255, 255, 0.06);
  --card-hi: rgba(255, 255, 255, 0.09);
  --stroke: rgba(255, 255, 255, 0.12);
  --stroke-hi: rgba(255, 255, 255, 0.18);

  /* Text: cool white */
  --text: #EEF1FA;
  --text-2: rgba(238, 241, 250, 0.64);
  --text-3: rgba(238, 241, 250, 0.52);   /* small text; the app uses 40%, raised a touch here so 13px copy stays legible */
  --text-deco: rgba(238, 241, 250, 0.40);

  /* The single accent: moonlight, periwinkle silver like frosted lock-screen numerals */
  --moon: #C9CFEE;
  --moon-deep: #8E98C8;
  --moon-grad: linear-gradient(180deg, var(--moon), var(--moon-deep));
  --glass-tint: #7F8BC4;

  /* Liquid Glass */
  --glass-fill: linear-gradient(155deg, rgba(255, 255, 255, 0.09) 0%, rgba(255, 255, 255, 0.05) 45%, rgba(255, 255, 255, 0.06) 100%);
  --glass-edge: inset 1px 1px 0 rgba(255, 255, 255, 0.10), inset -1px -1px 0 rgba(255, 255, 255, 0.03);
  --glass-blur: blur(22px) saturate(160%);
  --glass-tinted: linear-gradient(180deg, rgba(127, 139, 196, 0.62) 0%, rgba(127, 139, 196, 0.44) 100%);

  /* Data colours — charts only */
  --awake: #FF8F70;
  --rem: #B79CFF;
  --core: #6E8BFF;
  --deep: #3A3FA8;
  --deep-text: #8E93FF;
  --good: #7FD6B0;

  /* Type */
  --serif: ui-serif, "New York", "Source Serif 4", Georgia, serif;
  --rounded: ui-rounded, "SF Pro Rounded", "Nunito", system-ui, sans-serif;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;

  /* Layout */
  --radius: 22px;
  --gutter: 20px;
  --max: 1180px;
  --nav-h: 64px;

  /* Motion: calm, ease-in-out, never bouncy */
  --ease: cubic-bezier(0.45, 0, 0.25, 1);
  --ease-out: cubic-bezier(0.22, 0.61, 0.36, 1);
  --calm: 0.9s;
  --soft: 0.7s;
  --quick: 0.25s;
}

@media (min-width: 760px) {
  :root { --gutter: 32px; }
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  color-scheme: dark;
  background: var(--midnight);
  scroll-padding-top: calc(var(--nav-h) + 24px);
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  min-height: 100vh;
  background: transparent;
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--moon); outline-offset: 3px; border-radius: 8px; }
::selection { background: rgba(201, 207, 238, 0.32); color: var(--text); }

.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: var(--moon); color: #1A2042; padding: 10px 16px; border-radius: 999px;
  font-weight: 600; transition: top var(--quick) var(--ease-out);
}
.skip-link:focus { top: 12px; }

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

/* ───────────── Sky backdrop (NightBackground) ───────────── */

.sky {
  position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none;
  background: linear-gradient(180deg, var(--ink) 0%, var(--midnight) 42%, var(--horizon) 100%);
  view-transition-name: sky;
}
/* Faint slate glow near the horizon that drifts slowly (NightBackground). */
.sky__glow {
  position: absolute; width: 180vmax; height: 90vmax; left: -60vmax; top: calc(100vh - 38vmax);
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(47, 59, 90, 0.75), rgba(47, 59, 90, 0) 100%);
  filter: blur(40px);
  animation: glow-drift 28s var(--ease) infinite alternate;
  will-change: transform;
}
.sky__glow--2 {
  left: auto; right: -70vmax; top: calc(100vh - 30vmax); width: 130vmax; height: 70vmax;
  background: radial-gradient(closest-side, rgba(127, 139, 196, 0.10), rgba(127, 139, 196, 0) 100%);
  animation-duration: 34s; animation-direction: alternate-reverse;
}
.sky canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
@keyframes glow-drift {
  0% { transform: translate3d(0, 0, 0); }
  50% { transform: translate3d(8vw, -4vh, 0); }
  100% { transform: translate3d(-4vw, 4vh, 0); }
}

/* ───────────── Layout ───────────── */

.wrap { width: 100%; max-width: calc(var(--max) + var(--gutter) * 2); margin: 0 auto; padding: 0 var(--gutter); }
.section { position: relative; padding: clamp(64px, 8.5vw, 116px) 0; }
.section--tight { padding: clamp(64px, 9vw, 112px) 0; }

.label {
  display: inline-flex; align-items: center; gap: 10px;
  font: 600 12px/1 var(--sans); letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--moon);
}
.label::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--moon); box-shadow: 0 0 10px 2px rgba(201, 207, 238, 0.55);
}

h1, h2, h3, .serif { font-family: var(--serif); font-weight: 600; letter-spacing: -0.015em; margin: 0; }
h1 { font-size: clamp(46px, 7.4vw, 96px); line-height: 1.0; letter-spacing: -0.025em; }
h2 { font-size: clamp(36px, 5.2vw, 64px); line-height: 1.04; letter-spacing: -0.02em; }
h3 { font-size: clamp(22px, 2.1vw, 27px); line-height: 1.2; }
p { margin: 0; text-wrap: pretty; }
h1, h2, h3, .lead, .score-demo__verdict { text-wrap: balance; }
.lead { font-size: clamp(18px, 1.6vw, 21px); line-height: 1.55; color: var(--text-2); max-width: 34em; }
.muted { color: var(--text-2); }
.fine { font-size: 13px; line-height: 1.5; color: var(--text-3); }
.num { font-family: var(--rounded); font-weight: 650; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.unit { font-size: 0.5em; font-weight: 550; color: var(--text-2); margin-left: 0.04em; margin-right: 0.18em; }
.accent { color: var(--moon); }

.section-head { display: grid; gap: 20px; max-width: 760px; }
.section-head--center { text-align: center; margin: 0 auto; justify-items: center; }
.section-head .lead { margin-top: 4px; }

/* ───────────── Buttons ───────────── */

.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 56px; padding: 0 28px; border-radius: 999px;
  font: 650 17px/1 var(--rounded); letter-spacing: 0.005em; white-space: nowrap;
  transition: transform var(--quick) var(--ease-out), box-shadow var(--soft) var(--ease), background-color var(--soft) var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(0.97); }
.btn--primary {
  /* Tinted Liquid Glass capsule (PrimaryButton) */
  color: var(--text);
  background: var(--glass-tinted);
  -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.20), inset 0 1px 0 rgba(255, 255, 255, 0.28), 0 14px 34px -16px rgba(6, 9, 23, 0.9);
  text-shadow: 0 1px 1px rgba(16, 22, 47, 0.25);
}
.btn--primary::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: radial-gradient(120% 140% at 30% -30%, rgba(255, 255, 255, 0.30), transparent 60%);
  opacity: 0.6; transition: opacity var(--soft) var(--ease);
}
.btn--primary:hover { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.34), 0 18px 44px -16px rgba(127, 139, 196, 0.55); }
.btn--primary:hover::after { opacity: 1; }
.btn--ghost {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur);
  box-shadow: inset 0 0 0 1px var(--stroke), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
.btn--ghost:hover { background: rgba(255, 255, 255, 0.10); }
@media (max-width: 360px) { .btn { padding: 0 20px; font-size: 16px; } }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn--sm { min-height: 44px; padding: 0 20px; font-size: 15px; }

.link-arrow {
  display: inline-flex; align-items: center; gap: 8px; color: var(--moon); font-weight: 600;
  font-family: var(--rounded); font-size: 16px;
}
.link-arrow svg { width: 16px; height: 16px; transition: transform var(--soft) var(--ease); }
.link-arrow:hover svg { transform: translateX(4px); }

/* ───────────── Glass card + sky corner (skyCard) ───────────── */

.card {
  /* Liquid Glass: frosted fill, hairline edge, a soft top-left highlight */
  position: relative; overflow: hidden;
  background: var(--glass-fill);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--glass-edge), 0 24px 60px -36px rgba(6, 9, 23, 0.9);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
}
.card--sky::after {
  content: ""; position: absolute; top: 0; right: 0; width: 110px; height: 80px; pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='110' height='80'%3E%3Cg fill='none' stroke='%23C9CFEE'%3E%3Ccircle cx='110' cy='0' r='30' stroke-opacity='.055'/%3E%3Ccircle cx='110' cy='0' r='52' stroke-opacity='.04'/%3E%3Ccircle cx='110' cy='0' r='74' stroke-opacity='.025'/%3E%3C/g%3E%3Cg fill='%23fff' fill-opacity='.35'%3E%3Ccircle cx='60.5' cy='22.4' r='1.6'/%3E%3Ccircle cx='85.8' cy='44' r='1.2'/%3E%3Ccircle cx='41.8' cy='49.6' r='1'/%3E%3Ccircle cx='99' cy='14.4' r='1.8'/%3E%3C/g%3E%3C/svg%3E") no-repeat;
}

.card-head { display: flex; align-items: center; gap: 12px; }
.card-icon {
  width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: rgba(255, 255, 255, 0.08); color: var(--moon);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}
.card-icon svg { width: 16px; height: 16px; }
.micro {
  font: 600 11px/1.2 var(--sans); letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-3);
}

.badge-sample {
  display: inline-flex; align-items: center; padding: 5px 10px; border-radius: 999px;
  border: 1px solid rgba(201, 207, 238, 0.6); color: var(--moon);
  font: 600 10.5px/1 var(--sans); letter-spacing: 0.1em; text-transform: uppercase; white-space: nowrap;
}

.pill {
  display: inline-flex; align-items: center; gap: 10px; padding: 10px 16px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.06); border: 1px solid var(--stroke); color: var(--text-2);
  -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur);
  font: 600 14px/1.2 var(--rounded);
}
.pill svg { width: 16px; height: 16px; color: var(--moon); flex: none; }

/* ───────────── Navigation (floating glass pill, like the tab bar) ───────────── */

.nav {
  position: fixed; z-index: 50; left: 0; right: 0; top: 14px;
  display: flex; justify-content: center; pointer-events: none;
  padding: 0 12px;
}
.nav__bar {
  pointer-events: auto;
  position: relative; display: flex; align-items: center; gap: 6px;
  width: 100%; max-width: 980px; height: var(--nav-h); padding: 0 8px 0 14px;
  border-radius: 999px;
  background: rgba(38, 48, 79, 0.42);
  border: 1px solid var(--stroke);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  box-shadow: var(--glass-edge), 0 18px 40px -18px rgba(0, 0, 0, 0.7);
  view-transition-name: nav;
  transition: background-color var(--soft) var(--ease), box-shadow var(--soft) var(--ease), max-width var(--calm) var(--ease);
}
.nav.is-scrolled .nav__bar { background: rgba(22, 29, 58, 0.66); box-shadow: var(--glass-edge), 0 18px 50px -16px rgba(0, 0, 0, 0.85); }

.brand { display: inline-flex; align-items: center; gap: 10px; padding: 6px; border-radius: 999px; flex: none; }
.brand img { width: 34px; height: 34px; border-radius: 9px; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 4px 14px rgba(0, 0, 0, 0.4); }
.brand span { font: 600 21px/1 var(--serif); letter-spacing: -0.01em; }

.nav__links { position: relative; display: none; align-items: center; gap: 2px; margin: 0 auto; }
.nav__links a {
  position: relative; z-index: 1; padding: 10px 15px; border-radius: 999px;
  font: 600 14.5px/1 var(--rounded); color: var(--text-2);
  transition: color var(--soft) var(--ease);
}
.nav__links a:hover { color: var(--text); }
.nav__links a.is-active { color: var(--text); }
.nav__indicator {
  position: absolute; z-index: 0; top: 50%; left: 0; height: 36px; width: 0; margin-top: -18px;
  border-radius: 999px; background: rgba(255, 255, 255, 0.13);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  opacity: 0;
  transition: transform var(--soft) var(--ease), width var(--soft) var(--ease), opacity var(--soft) var(--ease);
}
.nav__cta { display: none; margin-left: 4px; }
.nav__menu-btn {
  margin-left: auto; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(255, 255, 255, 0.06); border: 1px solid var(--stroke);
}
.nav__menu-btn span { position: relative; display: block; width: 18px; height: 1.6px; background: var(--text); border-radius: 2px; transition: transform var(--soft) var(--ease), background-color var(--quick); }
.nav__menu-btn span::before, .nav__menu-btn span::after {
  content: ""; position: absolute; left: 0; width: 18px; height: 1.6px; background: var(--text); border-radius: 2px;
  transition: transform var(--soft) var(--ease), top var(--soft) var(--ease);
}
.nav__menu-btn span::before { top: -6px; }
.nav__menu-btn span::after { top: 6px; }
.nav-open .nav__menu-btn span { background: transparent; }
.nav-open .nav__menu-btn span::before { top: 0; transform: rotate(45deg); }
.nav-open .nav__menu-btn span::after { top: 0; transform: rotate(-45deg); }

@media (min-width: 900px) {
  .nav__links { display: flex; }
  .nav__cta { display: inline-flex; }
  .nav__menu-btn { display: none; }
}

.sheet {
  position: fixed; inset: 0; z-index: 45; display: flex; flex-direction: column; justify-content: center;
  padding: calc(var(--nav-h) + 40px) 28px 40px;
  background: rgba(10, 14, 32, 0.80);
  -webkit-backdrop-filter: blur(24px) saturate(150%); backdrop-filter: blur(24px) saturate(150%);
  opacity: 0; visibility: hidden; transition: opacity var(--soft) var(--ease), visibility 0s linear var(--soft);
}
.nav-open .sheet { opacity: 1; visibility: visible; transition: opacity var(--soft) var(--ease), visibility 0s; }
.sheet a:not(.btn) {
  display: block; padding: 12px 0; font: 600 clamp(30px, 8vw, 40px)/1.15 var(--serif); color: var(--text);
  opacity: 0; transform: translateY(14px);
  transition: opacity var(--soft) var(--ease-out), transform var(--soft) var(--ease-out);
}
.nav-open .sheet a:not(.btn) { opacity: 1; transform: none; }
.nav-open .sheet a:nth-child(2) { transition-delay: 0.05s; }
.nav-open .sheet a:nth-child(3) { transition-delay: 0.1s; }
.nav-open .sheet a:nth-child(4) { transition-delay: 0.15s; }
.nav-open .sheet a:nth-child(5) { transition-delay: 0.2s; }
.nav-open .sheet a:nth-child(6) { transition-delay: 0.25s; }
.sheet .btn { margin-top: 28px; align-self: stretch; white-space: normal; text-align: center; line-height: 1.2; opacity: 0; transition: opacity var(--soft) var(--ease) 0.3s; }
.nav-open .sheet .btn { opacity: 1; }
.nav-open { overflow: hidden; }

/* ───────────── Reveal (buildIn: fade + 14px rise, 0.7s ease-out) ───────────── */

.js [data-reveal] {
  opacity: 0; transform: translate3d(0, 14px, 0);
  transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out), filter 0.9s var(--ease-out);
  transition-delay: var(--d, 0s);
}
.js [data-reveal="blur"] { filter: blur(8px); }
.js [data-reveal="scale"] { transform: scale(0.96); }
.js [data-reveal].is-in { opacity: 1; transform: none; filter: none; }

.js [data-split] .w {
  display: inline-block; opacity: 0; transform: translate3d(0, 0.32em, 0); filter: blur(6px);
  transition: opacity 1s var(--ease-out), transform 1s var(--ease-out), filter 1s var(--ease-out);
  transition-delay: calc(var(--d, 0s) + var(--i) * 70ms);
}
.js [data-split].is-in .w { opacity: 1; transform: none; filter: none; }

/* ───────────── Hero ───────────── */

.hero {
  position: relative; min-height: 100svh; display: grid; align-items: center;
  padding: calc(var(--nav-h) + 40px) 0 72px; text-align: center; overflow: hidden;
}
.hero__scene {
  position: relative; width: min(520px, 92vw, 46svh); aspect-ratio: 1; margin: 0 auto calc(min(520px, 92vw, 46svh) * -0.1);
  will-change: transform, opacity;
}
.hero__scene canvas { width: 100%; height: 100%; }
.hero__scene .luna { width: 38%; }
.hero__copy { position: relative; display: grid; justify-items: center; gap: 22px; }
.hero__eyebrow { margin-bottom: 4px; }
.hero h1 { max-width: 11.5em; }
.hero .lead { text-align: center; max-width: 36em; }
.hero__ctas { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 10px; }
.hero__trust { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 22px; margin-top: 8px; font: 600 14px/1.4 var(--rounded); color: var(--text-3); }
.hero__trust span { display: inline-flex; align-items: center; gap: 8px; }
.hero__trust span::before { content: ""; width: 4px; height: 4px; border-radius: 50%; background: var(--moon); opacity: 0.8; }

.scroll-cue {
  position: absolute; left: 50%; bottom: 22px; width: 26px; height: 42px; margin-left: -13px;
  border-radius: 999px; border: 1.5px solid rgba(238, 241, 250, 0.25);
}
.scroll-cue::after {
  content: ""; position: absolute; left: 50%; top: 9px; width: 4px; height: 8px; margin-left: -2px; border-radius: 4px;
  background: var(--moon); animation: cue 2.4s var(--ease) infinite;
}
@keyframes cue { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: 1; } 70% { opacity: 0.2; transform: translateY(12px); } 100% { opacity: 0; transform: translateY(12px); } }

@media (max-width: 600px) {
  .hero { padding-top: calc(var(--nav-h) + 24px); }
  .hero__scene { width: min(400px, 100%, 46svh); margin-bottom: calc(min(400px, 100%, 46svh) * -0.1); }
  .scroll-cue { display: none; }
}

/* ───────────── Luna (the mascot) ───────────── */

.luna { position: relative; display: block; aspect-ratio: 1; --glow: 0.38; }
.luna svg { position: relative; width: 100%; height: 100%; overflow: visible; }
/* Soft moonlight around him, brighter the fuller he is. */
.luna::before {
  content: ""; position: absolute; inset: -38%; border-radius: 50%; pointer-events: none;
  background: radial-gradient(closest-side, rgba(184, 194, 242, 0.75), rgba(184, 194, 242, 0.28) 55%, rgba(184, 194, 242, 0) 100%);
  opacity: var(--glow);
}
.luna--flat::before { display: none; }
.luna__eye { transform-box: fill-box; transform-origin: 50% 100%; }
.luna-center { position: absolute; left: 50%; top: 50%; translate: -50% -50%; }

@media (prefers-reduced-motion: no-preference) {
  /* A slow float; happier Luna bobs a little more, drowsy Luna barely moves. */
  .luna--float { animation: luna-float 5s ease-in-out infinite; }
  .luna--float[data-luna-mood="happy"] { animation-duration: 2.6s; --bob: -3.5%; }
  .luna--float[data-luna-mood="happy"] svg { animation: luna-sway 3.2s ease-in-out infinite; }
  .luna--float[data-luna-mood="drowsy"], .luna--float[data-luna-mood="asleep"] { animation-duration: 7s; --bob: -1.5%; }
  .luna[data-luna-mood="content"] .luna__eye, .luna[data-luna-mood="neutral"] .luna__eye { animation: luna-blink 4.7s infinite; }
  .luna__spark { transform-box: fill-box; transform-origin: center; animation: luna-twinkle 2.4s ease-in-out infinite; animation-delay: calc(var(--i) * -0.8s); }
}
@keyframes luna-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(var(--bob, -2.5%)); } }
@keyframes luna-sway { 0%, 100% { transform: rotate(-3deg); } 50% { transform: rotate(3deg); } }
@keyframes luna-blink { 0%, 94.5% { transform: scaleY(1); } 96.8% { transform: scaleY(0.12); } 99%, 100% { transform: scaleY(1); } }
@keyframes luna-twinkle { 0%, 100% { opacity: 0.15; transform: scale(0.6); } 50% { opacity: 1; transform: scale(1); } }

/* Meet Luna section */
.luna-sec__phases {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: clamp(6px, 1.6vw, 16px); margin-top: 10px;
  padding: clamp(16px, 2.4vw, 24px) clamp(10px, 2vw, 22px) clamp(14px, 2vw, 20px);
}
.luna-pick {
  display: grid; justify-items: center; gap: 10px; padding: 8px 0 6px; border-radius: 18px;
  transition: background-color var(--soft) var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.luna-pick .luna { width: min(100%, 76px); }
.luna-pick b { font: 650 15px/1 var(--rounded); font-variant-numeric: tabular-nums; color: var(--text-3); transition: color var(--soft) var(--ease); }
.luna-pick:hover { background: rgba(255, 255, 255, 0.04); }
.luna-pick[aria-pressed="true"] { background: rgba(255, 255, 255, 0.08); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12); }
.luna-pick[aria-pressed="true"] b { color: var(--text); }
.luna-sec__caption { grid-column: 1 / -1; min-height: 1.4em; margin-top: 6px; text-align: center; font: 600 clamp(17px, 1.7vw, 19px)/1.35 var(--serif); color: var(--text); }
.luna-sec__scale { grid-column: 1 / -1; display: flex; justify-content: space-between; font: 600 12.5px/1 var(--sans); color: var(--text-3); padding: 0 4px; }
.luna-sec__visual { display: grid; justify-items: center; }
.luna-sec__visual .phone { --pw: clamp(240px, 26vw, 310px); }

/* ───────────── Phone mockups ───────────── */

.phone {
  container-type: inline-size;
  position: relative; width: var(--pw, 300px); aspect-ratio: 1206 / 2622;
  flex: none;
}
.phone__frame {
  position: absolute; inset: 0; border-radius: 16.5cqw; padding: 3.2cqw;
  background: linear-gradient(150deg, #2a2d42 0%, #0c0e1a 38%, #05060c 62%, #23263a 100%);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.10),
    inset 0 0 0 2.4cqw #04050b,
    0 50px 90px -30px rgba(0, 0, 0, 0.85),
    0 30px 60px -40px rgba(201, 207, 238, 0.25);
}
.phone__frame::before {
  /* side buttons */
  content: ""; position: absolute; left: -1.1cqw; top: 23%; width: 1.2cqw; height: 9%; border-radius: 2px 0 0 2px;
  background: linear-gradient(90deg, #1c1f2e, #34374a);
  box-shadow: 0 13cqw 0 #2a2d3f, 0 25cqw 0 #2a2d3f;
}
.phone__frame::after {
  content: ""; position: absolute; right: -1.1cqw; top: 30%; width: 1.2cqw; height: 14%; border-radius: 0 2px 2px 0;
  background: linear-gradient(270deg, #1c1f2e, #34374a);
}
.phone__screen {
  position: relative; width: 100%; height: 100%; border-radius: 13.4cqw; overflow: hidden; background: var(--ink);
}
.phone__screen img { width: 100%; height: 100%; object-fit: cover; }
.phone__screen::after {
  /* faint glass sheen */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(115deg, rgba(255, 255, 255, 0.07) 0%, rgba(255, 255, 255, 0) 32%);
}

/* Phone fan (scroll-linked spread) */
.fan { position: relative; padding: 24px 0 clamp(80px, 10vw, 130px); overflow-x: clip; }
.fan__stage {
  --p: 0; --spread: clamp(120px, 24vw, 300px);
  position: relative; height: calc(var(--pw) * 2.174 + 40px); --pw: clamp(220px, 27vw, 310px);
  display: flex; justify-content: center;
}
.fan__stage .phone { position: absolute; top: 0; left: 50%; margin-left: calc(var(--pw) / -2); will-change: transform; }
.fan__stage .phone--l {
  transform: translate3d(calc(var(--p) * var(--spread) * -1), calc(30px + var(--p) * 22px), 0) rotate(calc(var(--p) * -7deg)) scale(0.86);
  filter: brightness(calc(1 - var(--p) * 0.22));
}
.fan__stage .phone--r {
  transform: translate3d(calc(var(--p) * var(--spread)), calc(30px + var(--p) * 22px), 0) rotate(calc(var(--p) * 7deg)) scale(0.86);
  filter: brightness(calc(1 - var(--p) * 0.22));
}
.fan__stage .phone--c { z-index: 2; transform: translate3d(0, calc((1 - var(--p)) * 40px), 0); }
.fan__halo {
  position: absolute; left: 50%; top: 42%; width: min(1100px, 150vw); aspect-ratio: 1; transform: translate(-50%, -50%);
  pointer-events: none; opacity: 0.9;
}
.fan__caption { text-align: center; margin-top: 26px; }
.trust-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 42px; }

@media (max-width: 600px) {
  .fan__stage { --pw: 200px; --spread: 104px; }
}

/* ───────────── Split feature layout ───────────── */

.split { display: grid; gap: clamp(40px, 6vw, 88px); align-items: center; }
@media (min-width: 980px) {
  .split { grid-template-columns: 1fr 1fr; }
  .split--wide-right { grid-template-columns: 0.9fr 1.1fr; }
  .split--flip > :first-child { order: 2; }
}
.split__copy { display: grid; gap: 22px; align-content: start; }
.bullets { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 14px; }
.bullets li { display: grid; grid-template-columns: 22px 1fr; gap: 12px; color: var(--text-2); }
.bullets li strong { color: var(--text); font-weight: 600; }
.bullets li::before {
  content: ""; width: 9px; height: 9px; margin: 8px 0 0 6px; border-radius: 50%; background: var(--c, var(--moon));
  box-shadow: 0 0 12px 1px color-mix(in srgb, var(--c, var(--moon)) 60%, transparent);
}

/* Score section layout */
.score-head { display: grid; gap: 28px; align-items: end; margin-bottom: clamp(36px, 5vw, 56px); }
@media (min-width: 980px) { .score-head { grid-template-columns: 1.1fr 0.9fr; gap: 64px; } }
.score-demo__grid { display: grid; gap: 28px; }
@media (min-width: 980px) {
  .score-demo__grid { grid-template-columns: 0.95fr 1.05fr; gap: 48px; align-items: start; }
  .breakdown-wrap { padding-left: 48px; border-left: 1px solid var(--stroke); }
  .breakdown-wrap .breakdown { margin-top: 18px; padding-top: 0; border-top: 0; }
}
.breakdown-wrap { display: grid; align-content: start; }

/* Score points legend */
.score-legend { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
@media (max-width: 560px) { .score-legend { grid-template-columns: repeat(2, 1fr); } }
.score-legend div { padding: 14px 16px; border-radius: 16px; background: rgba(255, 255, 255, 0.04); border: 1px solid var(--stroke); }
.score-legend b { display: block; font: 650 26px/1 var(--rounded); color: var(--moon); }
.score-legend span { font-size: 14px; color: var(--text-2); }

/* ───────────── Score demo (ArcGauge + breakdown) ───────────── */

.score-demo { padding: 26px 22px 22px; }
@media (min-width: 560px) { .score-demo { padding: 30px 30px 26px; } }
.score-demo__top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.gauge { position: relative; width: min(300px, 100%); margin: 6px auto 0; aspect-ratio: 1 / 0.9; }
.gauge canvas { width: 100%; height: 100%; }
.gauge__center {
  position: absolute; left: 0; right: 0; top: 0; aspect-ratio: 1; display: grid; place-content: center; justify-items: center; text-align: center; gap: 2px;
  padding-top: 4%;
}
.gauge__center .luna { width: 27%; min-width: 64px; margin-bottom: 6px; }
.gauge__num { font: 650 clamp(52px, 7.4vw, 64px)/1 var(--rounded); font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.gauge__band { font: 650 18px/1.2 var(--rounded); color: var(--moon); transition: opacity var(--soft) var(--ease); }
.score-demo__verdict {
  text-align: center; font: 600 clamp(19px, 2vw, 22px)/1.3 var(--serif); margin: 4px auto 0; max-width: 22em; min-height: 2.6em;
  transition: opacity 0.4s var(--ease);
}
.score-demo__partial { text-align: center; margin-top: 8px; font: 600 13px/1 var(--rounded); color: var(--moon); min-height: 13px; transition: opacity var(--soft) var(--ease); }

.breakdown { display: grid; gap: 20px; margin-top: 16px; padding-top: 18px; border-top: 1px solid var(--stroke); }
.comp { transition: opacity var(--soft) var(--ease); }
.comp__row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.comp__title { font: 650 16px/1.2 var(--rounded); }
.comp__pts { font: 650 16px/1.2 var(--rounded); font-variant-numeric: tabular-nums; color: var(--text); }
.comp__pts small { color: var(--text-3); font-weight: 600; }
.comp__bar { position: relative; height: 6px; margin: 9px 0 8px; border-radius: 6px; background: rgba(255, 255, 255, 0.08); overflow: hidden; }
.comp__bar i {
  position: absolute; inset: 0 auto 0 0; width: 100%; border-radius: inherit; background: var(--moon-grad);
  background: linear-gradient(90deg, var(--moon-deep), var(--moon));
  transform-origin: left center; transform: scaleX(var(--f, 0));
  transition: transform 1.1s var(--ease);
}
.comp__detail { font-size: 14.5px; color: var(--text-2); line-height: 1.45; }
.comp__tip { display: flex; gap: 8px; margin-top: 4px; font-size: 14px; color: var(--moon); line-height: 1.45; }
.comp__tip::before { content: "+"; font-weight: 700; }
.comp__tip[hidden] { display: none; }
.comp.is-off { opacity: 0.5; }
.comp.is-off .comp__bar i { transform: scaleX(0); }

.controls { display: grid; gap: 16px; margin-top: 24px; padding: 18px; border-radius: 18px; background: rgba(255, 255, 255, 0.035); border: 1px solid var(--stroke); }
.controls__title { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.slider { display: grid; gap: 8px; }
.slider label { display: flex; justify-content: space-between; font-size: 14.5px; color: var(--text-2); }
.slider output { font: 650 15px/1.2 var(--rounded); color: var(--text); font-variant-numeric: tabular-nums; }
input[type="range"] {
  -webkit-appearance: none; appearance: none; width: 100%; height: 28px; background: transparent; cursor: pointer; margin: 0;
}
input[type="range"]::-webkit-slider-runnable-track {
  height: 6px; border-radius: 6px;
  background: linear-gradient(90deg, var(--moon-deep) 0, var(--moon) var(--fill, 50%), rgba(255, 255, 255, 0.1) var(--fill, 50%));
}
input[type="range"]::-moz-range-track { height: 6px; border-radius: 6px; background: rgba(255, 255, 255, 0.1); }
input[type="range"]::-moz-range-progress { height: 6px; border-radius: 6px; background: linear-gradient(90deg, var(--moon-deep), var(--moon)); }
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 24px; height: 24px; margin-top: -9px; border-radius: 50%;
  background: var(--ink); border: 2px solid var(--moon); box-shadow: 0 0 0 6px rgba(201, 207, 238, 0.14);
  transition: box-shadow var(--quick) var(--ease-out);
}
input[type="range"]:active::-webkit-slider-thumb { box-shadow: 0 0 0 10px rgba(201, 207, 238, 0.18); }
input[type="range"]::-moz-range-thumb { width: 20px; height: 20px; border-radius: 50%; background: var(--ink); border: 2px solid var(--moon); }

.toggles { display: flex; flex-wrap: wrap; gap: 8px; }
.toggle {
  display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px; border-radius: 999px;
  font: 600 14px/1 var(--rounded); color: var(--text-2);
  background: rgba(255, 255, 255, 0.05); border: 1px solid var(--stroke);
  transition: background-color var(--soft) var(--ease), color var(--soft) var(--ease), border-color var(--soft) var(--ease);
}
.toggle::before {
  content: ""; width: 14px; height: 14px; border-radius: 50%; border: 1.5px solid currentColor; opacity: 0.7;
  transition: background-color var(--soft) var(--ease), border-color var(--soft) var(--ease), box-shadow var(--soft) var(--ease);
}
.toggle[aria-pressed="true"] { color: var(--text); border-color: rgba(201, 207, 238, 0.45); background: rgba(201, 207, 238, 0.10); }
.toggle[aria-pressed="true"]::before { background: var(--moon); border-color: var(--moon); opacity: 1; box-shadow: 0 0 10px rgba(201, 207, 238, 0.6); }

/* ───────────── Hypnogram ───────────── */

.hyp { padding: 22px; }
@media (min-width: 560px) { .hyp { padding: 26px 28px; } }
.hyp__readout { display: flex; gap: 12px; align-items: flex-start; min-height: 66px; margin-top: 16px; }
.hyp__dot { width: 11px; height: 11px; border-radius: 50%; margin-top: 6px; flex: none; transition: background-color var(--quick); }
.hyp__stage { font: 650 18px/1.25 var(--rounded); }
.hyp__time { font-size: 14px; color: var(--text-2); }
.hyp__metric { font: 600 14px/1.4 var(--sans); color: var(--moon); min-height: 1.4em; }
.hyp__hint { display: flex; gap: 10px; color: var(--text-3); font-size: 14.5px; align-items: center; }
.hyp__hint svg { width: 18px; height: 18px; flex: none; }

.hyp__chart { display: grid; grid-template-columns: 50px 1fr; gap: 8px; margin-top: 10px; }
.hyp__lanes { display: grid; grid-template-rows: repeat(4, 1fr); padding: 8px 0; height: 160px; }
.hyp__lanes span { display: flex; align-items: center; font: 650 12.5px/1 var(--rounded); }
.hyp__plot { position: relative; height: 160px; touch-action: pan-y; cursor: ew-resize; user-select: none; -webkit-user-select: none; }
.hyp__plot svg { width: 100%; height: 100%; overflow: visible; }
.hyp__seg { transform-box: fill-box; transform-origin: left center; }
.js .hyp:not(.is-drawn) .hyp__seg { transform: scaleX(0); opacity: 0; }
.hyp__seg { transition: transform 0.9s var(--ease-out), opacity 0.9s var(--ease-out); transition-delay: var(--sd, 0s); }
.hyp__conn { transition: opacity 0.9s var(--ease-out); transition-delay: var(--sd, 0s); }
.js .hyp:not(.is-drawn) .hyp__conn { opacity: 0; }
.hyp__line { fill: none; stroke: var(--moon); stroke-width: 2; vector-effect: non-scaling-stroke; stroke-linejoin: round; stroke-linecap: round; transition: opacity 0.6s var(--ease); }
.hyp__area { transition: opacity 0.6s var(--ease); }
.hyp__scrub {
  position: absolute; top: -4px; bottom: -4px; width: 2px; margin-left: -1px; border-radius: 2px; left: 0;
  background: var(--moon); box-shadow: 0 0 12px rgba(201, 207, 238, 0.8);
  opacity: 0; transition: opacity var(--quick) var(--ease);
}
.hyp__scrub::before {
  content: ""; position: absolute; left: 50%; top: -6px; width: 10px; height: 10px; margin-left: -5px; border-radius: 50%;
  background: var(--moon); box-shadow: 0 0 0 4px rgba(201, 207, 238, 0.2);
}
.hyp__plot.is-scrubbing .hyp__scrub, .hyp__plot.is-hint .hyp__scrub { opacity: 1; }
.hyp__axis { display: flex; justify-content: space-between; padding-left: 58px; margin-top: 8px; font: 600 12.5px/1 var(--sans); color: var(--text-3); }
.hyp__chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.hyp__chips::-webkit-scrollbar { display: none; }
.chip {
  display: inline-flex; align-items: center; gap: 7px; min-height: 40px; padding: 0 14px; border-radius: 999px; flex: none;
  font: 650 14px/1 var(--rounded); color: var(--text-2); background: rgba(255, 255, 255, 0.05); border: 1px solid var(--stroke);
  transition: background-color var(--soft) var(--ease), color var(--soft) var(--ease);
}
.chip svg { width: 15px; height: 15px; }
.chip[aria-pressed="true"] { color: var(--text); background: var(--glass-tinted); border-color: rgba(255, 255, 255, 0.2); }
.hyp__totals { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px 18px; margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--stroke); }
@media (min-width: 560px) { .hyp__totals { grid-template-columns: repeat(4, 1fr); } }
.hyp__totals div { display: grid; gap: 2px; }
.hyp__totals .k { display: flex; align-items: center; gap: 7px; font-size: 13.5px; color: var(--text-2); }
.hyp__totals .k::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.hyp__totals .v { font: 650 19px/1.2 var(--rounded); font-variant-numeric: tabular-nums; }
.hyp__totals .v small { font-size: 12.5px; color: var(--text-3); font-weight: 600; margin-left: 4px; }

/* ───────────── Steps (moon phases) ───────────── */

.steps { display: grid; gap: 18px; margin-top: clamp(40px, 6vw, 64px); counter-reset: s; }
@media (min-width: 860px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.step { padding: 28px 24px 26px; display: grid; gap: 14px; align-content: start; }
.step__moon { width: 64px; margin: 2px 0 4px 2px; }
.step__n { font: 650 13px/1 var(--rounded); color: var(--text-3); letter-spacing: 0.08em; }
.step h3 { font-size: 24px; }
.step p { color: var(--text-2); font-size: 16px; }
.steps__line {
  display: none;
}

/* ───────────── Bento ───────────── */

.bento { display: grid; gap: 16px; margin-top: clamp(40px, 6vw, 64px); grid-template-columns: 1fr; }
@media (min-width: 760px) {
  .bento { grid-template-columns: repeat(12, 1fr); }
  .b-7 { grid-column: span 7; } .b-5 { grid-column: span 5; }
  .b-4 { grid-column: span 4; } .b-6 { grid-column: span 6; }
  .b-12 { grid-column: span 12; }
}
@media (min-width: 760px) and (max-width: 1060px) {
  .b-4 { grid-column: span 6; }
  .b-4:last-child { grid-column: span 12; }
}
.tile { display: flex; flex-direction: column; gap: 16px; padding: 24px; min-height: 100%; transition: border-color var(--soft) var(--ease), background-color var(--soft) var(--ease), transform var(--soft) var(--ease); }
.tile:hover { border-color: rgba(201, 207, 238, 0.22); background: var(--card-hi); }
.tile h3 { font-size: 24px; }
.tile p { color: var(--text-2); font-size: 15.5px; }
.tile__visual { margin-top: auto; }

/* Debt tile */
.debt__num { font: 650 clamp(48px, 6vw, 64px)/1 var(--rounded); font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.debt__plan { margin-top: 14px; padding: 14px 16px; border-radius: 16px; background: rgba(201, 207, 238, 0.08); display: grid; gap: 4px; }
.debt__plan b { font: 650 15.5px/1.3 var(--rounded); display: flex; align-items: center; gap: 8px; }
.debt__plan b svg { width: 16px; height: 16px; color: var(--moon); }
.debt__plan span { font-size: 14.5px; color: var(--text-2); }
.debt__bars { display: grid; grid-template-columns: repeat(14, 1fr); gap: 5px; align-items: end; height: 64px; margin-top: 18px; }
.debt__bars i {
  display: block; border-radius: 4px 4px 2px 2px; background: linear-gradient(180deg, rgba(201, 207, 238, 0.85), rgba(142, 152, 200, 0.35));
  height: calc(var(--h) * 1%); transform-origin: bottom; transform: scaleY(0); transition: transform 0.9s var(--ease-out); transition-delay: calc(var(--i) * 45ms + 0.2s);
}
.debt__bars i.z { background: rgba(255, 255, 255, 0.12); height: 6%; }
.is-in .debt__bars i, .no-js .debt__bars i { transform: scaleY(1); }

/* Metric tiles */
.metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.metric { padding: 14px; border-radius: 16px; background: rgba(255, 255, 255, 0.04); border: 1px solid var(--stroke); display: grid; gap: 6px; }
.metric__k { display: flex; align-items: center; gap: 6px; font: 600 13px/1.2 var(--rounded); color: var(--text-2); }
.metric__k svg { width: 13px; height: 13px; color: var(--moon); }
.metric__v { font: 650 26px/1 var(--rounded); font-variant-numeric: tabular-nums; }
.metric__v small { font-size: 13px; font-weight: 600; color: var(--text-2); margin-left: 3px; }
.range { position: relative; height: 4px; border-radius: 4px; background: rgba(255, 255, 255, 0.1); margin: 6px 0 2px; }
.range b { position: absolute; top: 0; bottom: 0; left: var(--a); right: calc(100% - var(--b)); border-radius: 4px; background: rgba(127, 214, 176, 0.55); }
.range i {
  position: absolute; top: 50%; left: 0; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%;
  background: var(--moon); box-shadow: 0 0 0 3px rgba(6, 9, 23, 0.9), 0 0 10px rgba(201, 207, 238, 0.7);
  transition: left 1.2s var(--ease); transition-delay: 0.3s;
}
.is-in .range i, .no-js .range i { left: var(--v); }
.metric__t { font-size: 12px; color: var(--text-3); }

/* Tonight tile */
.tonight { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tonight__k { display: flex; align-items: center; gap: 6px; font-size: 13.5px; color: var(--text-2); }
.tonight__k svg { width: 14px; height: 14px; color: var(--moon); }
.tonight__v { font: 650 28px/1.1 var(--rounded); font-variant-numeric: tabular-nums; }
.tonight__v small { font-size: 15px; font-weight: 650; margin-left: 3px; }
.tonight__v.accent { color: var(--moon); }
.tonight__hint { display: flex; gap: 8px; font-size: 14px; color: var(--moon); margin-top: 12px; line-height: 1.45; }
.tonight__hint svg { width: 16px; height: 16px; flex: none; margin-top: 2px; }
.fake-btn {
  display: flex; align-items: center; justify-content: center; min-height: 48px; margin-top: 16px; border-radius: 999px;
  background: var(--glass-tinted); color: var(--text); font: 650 16px/1 var(--rounded);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

/* Tags tile */
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tag {
  display: inline-flex; align-items: center; gap: 7px; min-height: 38px; padding: 0 13px; border-radius: 999px;
  font: 650 13.5px/1 var(--rounded); color: var(--text); background: rgba(255, 255, 255, 0.05); border: 1px solid var(--stroke);
  transition: background-color var(--soft) var(--ease), border-color var(--soft) var(--ease), color var(--soft) var(--ease);
}
.tag svg { width: 14px; height: 14px; }
.tag[aria-pressed="true"] { background: rgba(201, 207, 238, 0.14); border-color: rgba(201, 207, 238, 0.55); color: var(--moon); }
.tag--new { border-style: dashed; color: var(--text-2); }

/* Breathing tile */
.breath { position: relative; display: grid; place-items: center; height: 210px; }
.breath canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.breath__orb {
  position: relative; width: 120px; height: 120px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #F1F3FD, rgba(201, 207, 238, 0.92) 50%, rgba(142, 152, 200, 0.75));
  box-shadow: 0 0 60px 10px rgba(184, 194, 242, 0.22), inset 0 0 0 1.5px rgba(255, 255, 255, 0.5);
  transform: scale(0.62);
}
.breath__label { position: absolute; font: 650 16px/1 var(--rounded); color: #1A2042; text-align: center; transition: opacity 0.5s var(--ease); }
.breath.is-running .breath__orb { animation: breathe 10s infinite; }
@keyframes breathe {
  0% { transform: scale(0.62); animation-timing-function: cubic-bezier(0.45, 0, 0.55, 1); }
  40% { transform: scale(1); animation-timing-function: cubic-bezier(0.45, 0, 0.55, 1); }
  100% { transform: scale(0.62); }
}

/* Fix-night tile */
.fix { display: grid; gap: 10px; }
.fix__row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 13px 16px; border-radius: 16px; background: rgba(255, 255, 255, 0.04); border: 1px solid var(--stroke); }
.fix__row span { font-size: 15px; color: var(--text-2); }
.fix__row b { font: 650 17px/1 var(--rounded); font-variant-numeric: tabular-nums; }
.fix__row b s { color: var(--text-3); font-weight: 600; margin-right: 8px; text-decoration-thickness: 1.5px; }
.switch { width: 46px; height: 28px; border-radius: 999px; background: rgba(255, 255, 255, 0.14); position: relative; flex: none; transition: background-color var(--soft) var(--ease); }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: var(--text); transition: transform var(--soft) var(--ease); }
.switch[aria-checked="true"] { background: var(--glass-tint); }
.switch[aria-checked="true"]::after { transform: translateX(18px); }

/* Export tile */
.export { position: relative; display: flex; gap: 16px; align-items: flex-end; justify-content: center; min-height: 200px; padding-top: 10px; }
.doc {
  position: relative; width: 168px; aspect-ratio: 8.5 / 11; border-radius: 10px; padding: 14px 13px; display: grid; gap: 7px; align-content: start;
  background: linear-gradient(180deg, #F5F7FD, #E6EAF7); color: #1A2042; box-shadow: 0 24px 40px -18px rgba(0, 0, 0, 0.8);
  transform: rotate(-4deg) translateY(6px); transition: transform var(--calm) var(--ease);
}
.doc--2 { width: 150px; transform: rotate(5deg) translate(-24px, 14px); background: linear-gradient(180deg, #E4E8F5, #D5DBEE); z-index: -1; position: absolute; left: calc(50% - 20px); bottom: 0; }
.tile:hover .doc { transform: rotate(-2deg) translateY(0); }
.tile:hover .doc--2 { transform: rotate(8deg) translate(-8px, 12px); }
.doc h4 { margin: 0; font: 700 11px/1.2 var(--serif); }
.doc .l { height: 4px; border-radius: 3px; background: rgba(38, 48, 79, 0.18); }
.doc .l.s { width: 60%; }
.doc .row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; margin-top: 3px; }
.doc .row i { height: 22px; border-radius: 4px; background: rgba(38, 48, 79, 0.08); display: grid; place-items: center; font: 700 8px/1 var(--rounded); font-style: normal; color: #3A3FA8; }
.doc .bars { display: flex; gap: 3px; align-items: flex-end; height: 26px; margin-top: 4px; }
.doc .bars b { flex: 1; background: #8E98C8; border-radius: 2px 2px 0 0; opacity: 0.85; }
.csv { align-self: center; padding: 8px 12px; border-radius: 10px; font: 700 12px/1 var(--rounded); background: rgba(127, 214, 176, 0.14); color: var(--good); border: 1px solid rgba(127, 214, 176, 0.35); position: absolute; right: 12%; top: 18px; }
.pdf { padding: 3px 7px; border-radius: 6px; font: 800 8px/1 var(--rounded); background: #3A3FA8; color: #EEF1FA; justify-self: start; }

/* ───────────── Trends ───────────── */

.trend-card { padding: 22px; }
.trend-card__head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.seg {
  position: relative; display: inline-grid; grid-template-columns: 1fr 1fr; padding: 4px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.05); border: 1px solid var(--stroke);
}
.seg button { position: relative; z-index: 1; min-width: 74px; min-height: 36px; padding: 0 12px; border-radius: 999px; font: 650 14px/1 var(--rounded); color: var(--text-2); transition: color var(--soft) var(--ease); }
.seg button[aria-pressed="true"] { color: var(--text); }
.seg__pill { position: absolute; z-index: 0; top: 4px; bottom: 4px; left: 4px; width: calc(50% - 4px); border-radius: 999px; background: rgba(255, 255, 255, 0.14); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.12); transition: transform var(--soft) var(--ease); }
.seg[data-v="30"] .seg__pill { transform: translateX(100%); }
.chart { position: relative; height: 190px; margin-top: 22px; }
.chart__goal { position: absolute; left: 0; right: 0; border-top: 1.5px dashed rgba(238, 241, 250, 0.35); }
.chart__goal span { position: absolute; right: 0; top: -20px; font: 600 11.5px/1 var(--sans); color: var(--text-3); }
.chart__bars { position: absolute; inset: 0; display: flex; align-items: flex-end; gap: var(--gap, 8px); }
.chart__bars i {
  flex: 1; border-radius: 6px 6px 3px 3px; background: linear-gradient(180deg, var(--moon), var(--moon-deep));
  height: var(--h); transform-origin: bottom; transform: scaleY(0);
  transition: transform 0.9s var(--ease-out), height 0.9s var(--ease); transition-delay: calc(var(--i) * 18ms);
}
.chart__bars i.under { opacity: 0.72; }
.is-in .chart__bars i, .no-js .chart__bars i { transform: scaleY(1); }
.trend-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 18px; }
.trend-stats div { padding: 12px 14px; border-radius: 14px; background: rgba(255, 255, 255, 0.04); border: 1px solid var(--stroke); }
.trend-stats .k { display: flex; align-items: center; gap: 7px; font-size: 13px; color: var(--text-2); }
.trend-stats .k::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--c); }
.trend-stats .v { font: 650 24px/1.2 var(--rounded); font-variant-numeric: tabular-nums; }
.trend-visual { position: relative; display: grid; gap: 22px; justify-items: center; }
.trend-visual .phone { --pw: clamp(240px, 24vw, 300px); }
.trend-visual .trend-card { width: min(100%, 360px); }
@media (min-width: 980px) {
  .trend-visual { display: block; min-height: calc(clamp(240px, 24vw, 300px) * 2.174); }
  .trend-visual .phone { position: absolute; left: 0; top: 0; }
  .trend-visual .trend-card {
    position: absolute; right: 0; bottom: 10%; width: 330px; z-index: 2;
    background: rgba(38, 48, 79, 0.55);
    box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.85);
  }
}

/* ───────────── Watch + widgets ───────────── */

.watch-stage { display: grid; gap: 24px; justify-items: center; }
@media (min-width: 980px) { .watch-stage { grid-template-columns: 0.8fr 1.2fr; align-items: center; gap: 40px; } }

.watch { position: relative; width: 244px; height: 296px; flex: none; margin: 120px 0; }
@media (min-width: 980px) { .watch { transform-origin: center; scale: 1.14; } }
.watch__band {
  position: absolute; left: 50%; width: 164px; margin-left: -82px; height: 150px;
  background:
    linear-gradient(90deg, rgba(255,255,255,0.05), rgba(255,255,255,0) 18%, rgba(255,255,255,0) 82%, rgba(255,255,255,0.05)),
    linear-gradient(180deg, #232a44, #181d31);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}
.watch__band--t { top: -118px; border-radius: 34px 34px 10px 10px; -webkit-mask: linear-gradient(0deg, #000 45%, transparent 100%); mask: linear-gradient(0deg, #000 45%, transparent 100%); }
.watch__band--b { bottom: -118px; border-radius: 10px 10px 34px 34px; -webkit-mask: linear-gradient(180deg, #000 45%, transparent 100%); mask: linear-gradient(180deg, #000 45%, transparent 100%); }
.watch__case {
  position: absolute; inset: 0; border-radius: 64px; padding: 14px;
  background: linear-gradient(145deg, #3a3e55 0%, #12141f 30%, #07080e 60%, #2c3045 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12), 0 40px 80px -30px rgba(0, 0, 0, 0.9), 0 0 80px -20px rgba(184, 194, 242, 0.18);
}
.watch__crown {
  position: absolute; right: -9px; top: 70px; width: 14px; height: 46px; border-radius: 5px;
  background: repeating-linear-gradient(180deg, #4a4e66 0 2px, #23263a 2px 4px);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
  transition: background-position 0.2s linear;
}
.watch__btn { position: absolute; right: -5px; top: 140px; width: 8px; height: 50px; border-radius: 4px; background: #23263a; }
.watch__screen {
  position: relative; width: 100%; height: 100%; border-radius: 52px; overflow: hidden;
  background: linear-gradient(180deg, var(--ink) 0%, var(--midnight) 50%, var(--dusk) 100%);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.6);
}
.watch__screen::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0.6;
  background-image: radial-gradient(1px 1px at 20% 30%, #fff 50%, transparent 51%), radial-gradient(1px 1px at 78% 18%, #fff 50%, transparent 51%),
    radial-gradient(1.2px 1.2px at 64% 72%, #fff 50%, transparent 51%), radial-gradient(1px 1px at 30% 84%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 88% 56%, #fff 50%, transparent 51%);
}
.watch__status { position: absolute; z-index: 2; top: 14px; left: 26px; right: 26px; display: flex; justify-content: space-between; font: 650 13px/1 var(--sans); }
.watch__status b { color: var(--moon); font-weight: 650; }
.watch__viewport { position: absolute; inset: 36px 0 0; overflow: hidden; -webkit-mask: linear-gradient(180deg, transparent 0, #000 16px); mask: linear-gradient(180deg, transparent 0, #000 16px); }
.watch__scroll { position: absolute; left: 12px; right: 12px; top: 8px; transform: translateY(var(--ws, 0px)); will-change: transform; }
.watch__hero { display: grid; justify-items: center; gap: 4px; padding-top: 4px; }
.watch__hero .luna { width: 92px; margin: 2px 0 4px; }
.wscore { display: flex; align-items: baseline; gap: 6px; }
.wscore b { font: 700 28px/1 var(--rounded); }
.wscore span { font: 600 16px/1 var(--serif); color: var(--moon); }
.wcap { font: 550 12.5px/1.3 var(--sans); color: rgba(238, 241, 250, 0.7); text-align: center; max-width: 180px; }
.wdetails { display: grid; justify-items: center; gap: 4px; margin-top: 16px; padding: 12px 0; border-radius: 18px; background: rgba(255, 255, 255, 0.07); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.10); }
.wring { position: relative; width: 104px; height: 104px; }
.wring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.wring circle { fill: none; stroke-width: 10; }
.wring .bg { stroke: rgba(255, 255, 255, 0.12); }
.wring .fg { stroke: var(--moon); stroke-linecap: round; stroke-dasharray: 100 100; stroke-dashoffset: 100; transition: stroke-dashoffset 1.6s var(--ease); }
.is-in .wring .fg, .no-js .wring .fg { stroke-dashoffset: calc(100 - var(--score)); }
.wring__c { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.wring__c b { font: 700 40px/0.95 var(--rounded); }
.wring__c span { font: 600 14px/1 var(--serif); color: var(--moon); }
.wdur { font: 650 28px/1.1 var(--rounded); margin-top: 4px; }
.wdur small { font-size: 15px; color: rgba(238, 241, 250, 0.7); font-weight: 550; margin: 0 4px 0 1px; }
.wtimes { font: 550 13.5px/1 var(--sans); color: rgba(238, 241, 250, 0.7); }
.wrows { display: grid; gap: 7px; margin-top: 14px; }
.wrow { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 12px; border-radius: 16px; background: rgba(255, 255, 255, 0.08); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.10); font: 600 15px/1 var(--sans); }
.wrow svg { width: 17px; height: 17px; color: var(--moon); }

.widgets { display: grid; gap: 16px; justify-items: center; }
.widgets__row { display: flex; flex-wrap: wrap; gap: 16px; justify-content: center; }
.wg {
  position: relative; overflow: hidden; border-radius: 26px; padding: 16px;
  background: linear-gradient(170deg, var(--ink) 0%, var(--midnight) 50%, var(--dusk) 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08), 0 24px 50px -24px rgba(0, 0, 0, 0.8);
}
.wg::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0.55;
  background-image: radial-gradient(1px 1px at 82% 14%, #fff 50%, transparent 51%), radial-gradient(1px 1px at 66% 84%, #fff 50%, transparent 51%),
    radial-gradient(1.2px 1.2px at 92% 62%, #fff 50%, transparent 51%), radial-gradient(1px 1px at 12% 90%, #fff 50%, transparent 51%);
}
.wg--s { width: 158px; height: 158px; display: grid; justify-items: center; align-content: center; gap: 6px; text-align: center; }
.wg--s .luna { width: 62px; }
.wg--m .luna { width: 100px; flex: none; }
.wg__label { font: 600 10.5px/1 var(--sans); letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-2); }
.wg__row { display: flex; align-items: baseline; gap: 6px; }
.wg__row b { font: 700 20px/1 var(--rounded); }
.lock .luna { width: 44px; flex: none; }
.wg--m { width: 338px; height: 158px; display: flex; align-items: center; gap: 18px; }
@media (max-width: 400px) { .wg--m { width: 100%; } }
.ring { position: relative; width: 84px; height: 84px; flex: none; }
.wg--m .ring { width: 116px; height: 116px; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 9; }
.ring .bg { stroke: rgba(255, 255, 255, 0.1); }
.ring .fg { stroke: var(--moon); stroke-linecap: round; stroke-dasharray: 100 100; stroke-dashoffset: 100; transition: stroke-dashoffset 1.6s var(--ease) 0.2s; }
.is-in .ring .fg, .no-js .ring .fg { stroke-dashoffset: calc(100 - var(--score)); }
.ring b { position: absolute; inset: 0; display: grid; place-items: center; font: 700 30px/1 var(--rounded); }
.wg--m .ring b { font-size: 40px; }
.wg__dur { font: 650 22px/1 var(--rounded); }
.wg__dur small { font-size: 13px; color: var(--text-2); margin: 0 3px 0 1px; }
.wg__band { font: 600 22px/1.15 var(--serif); color: var(--moon); margin-top: 4px; }
.wg__times { font: 550 14px/1.3 var(--sans); color: var(--text-2); }
.wg__bed { display: flex; align-items: center; gap: 6px; font: 650 14px/1 var(--sans); margin-top: 6px; }
.wg__bed svg { width: 15px; height: 15px; color: var(--moon); }
.lock { display: flex; align-items: center; gap: 12px; padding: 10px 16px 10px 12px; border-radius: 18px; background: rgba(255, 255, 255, 0.12); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); }
.lock .ring { width: 58px; height: 58px; }
.lock .ring b { font-size: 21px; }
.lock .ring .fg { stroke: var(--text); }
.lock__t { display: grid; gap: 1px; font: 650 16px/1.15 var(--rounded); }
.lock__t em { font: 600 15px/1.1 var(--serif); font-style: normal; }
.lock__t span { font: 550 12.5px/1.2 var(--sans); color: var(--text-2); }
.inline-w { display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; border-radius: 999px; background: rgba(255, 255, 255, 0.1); font: 600 15px/1 var(--sans); }
.inline-w svg { width: 15px; height: 15px; }

/* ───────────── Privacy ───────────── */

.privacy-hero { position: relative; display: grid; justify-items: center; text-align: center; gap: 22px; }
.privacy-hero__art { position: relative; width: min(340px, 80vw); aspect-ratio: 1; margin-bottom: -40px; }
.privacy-hero__art canvas { width: 100%; height: 100%; }
.privacy-hero__art .luna { width: 36%; }
.privacy-grid { display: grid; gap: 16px; margin-top: clamp(40px, 6vw, 64px); }
@media (min-width: 760px) { .privacy-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .privacy-grid { grid-template-columns: repeat(4, 1fr); } }
.privacy-grid .card { padding: 26px 22px; display: grid; gap: 12px; align-content: start; }
.privacy-grid h3 { font-size: 21px; }
.privacy-grid p { color: var(--text-2); font-size: 15.5px; }
.privacy-grid .card-icon { width: 40px; height: 40px; }
.privacy-grid .card-icon svg { width: 19px; height: 19px; }

/* ───────────── Pricing ───────────── */

.pricing { display: grid; gap: clamp(32px, 5vw, 64px); align-items: start; }
@media (min-width: 980px) { .pricing { grid-template-columns: 1fr 1fr; } }
.benefits { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 16px; }
.benefits li { display: grid; grid-template-columns: 40px 1fr; gap: 14px; align-items: center; font: 600 17px/1.35 var(--rounded); }
.benefits .card-icon { width: 40px; height: 40px; }
.benefits .card-icon svg { width: 18px; height: 18px; }
.plans { position: relative; display: grid; gap: 12px; }
.plan {
  position: relative; display: grid; grid-template-columns: 28px 1fr auto; gap: 14px; align-items: center; text-align: left;
  min-height: 84px; padding: 16px 20px; border-radius: 22px; width: 100%;
  background: rgba(255, 255, 255, 0.04); border: 1px solid var(--stroke);
  transition: background-color var(--soft) var(--ease);
}
.plan:hover { background: rgba(255, 255, 255, 0.07); }
.plan__radio { width: 26px; height: 26px; border-radius: 50%; border: 2px solid rgba(238, 241, 250, 0.35); display: grid; place-items: center; transition: border-color var(--soft) var(--ease); }
.plan__radio::after { content: ""; width: 12px; height: 12px; border-radius: 50%; background: var(--moon); transform: scale(0); transition: transform var(--soft) var(--ease); }
.plan[aria-checked="true"] .plan__radio { border-color: var(--moon); }
.plan[aria-checked="true"] .plan__radio::after { transform: scale(1); }
.plan__name { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font: 650 18px/1.2 var(--rounded); }
.plan__badge { padding: 4px 9px; border-radius: 999px; background: var(--moon); color: #1A2042; font: 800 10.5px/1 var(--rounded); letter-spacing: 0.06em; text-transform: uppercase; }
.plan__sub { font-size: 14px; color: var(--text-2); margin-top: 3px; }
.plan__price { font: 700 26px/1 var(--rounded); font-variant-numeric: tabular-nums; white-space: nowrap; }
.plan__price small { font-size: 14px; color: var(--text-2); font-weight: 600; margin-left: 2px; }
@media (max-width: 440px) {
  .plan { grid-template-columns: 24px 1fr auto; gap: 12px; padding: 14px 16px; }
  .plan__price { font-size: 22px; }
  .plan__radio { width: 22px; height: 22px; }
  .plan__radio::after { width: 10px; height: 10px; }
}
.plans__ring {
  position: absolute; left: 0; right: 0; top: 0; height: 84px; border-radius: 22px; pointer-events: none;
  border: 2px solid rgba(201, 207, 238, 0.85); background: rgba(127, 139, 196, 0.16);
  box-shadow: 0 0 0 4px rgba(201, 207, 238, 0.08), 0 14px 40px -14px rgba(127, 139, 196, 0.5);
  transition: transform var(--soft) var(--ease), height var(--soft) var(--ease);
}
.pricing__card { padding: 28px 22px 24px; display: grid; gap: 18px; }
@media (min-width: 560px) { .pricing__card { padding: 34px 32px 28px; } }
.pricing__terms { text-align: center; font-size: 13.5px; color: var(--text-3); line-height: 1.55; }
.pricing__terms a { color: var(--text-2); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(238, 241, 250, 0.3); }
.pricing__cta { width: 100%; }
.pricing__note { display: flex; justify-content: center; gap: 8px 12px; flex-wrap: wrap; font: 600 13.5px/1.2 var(--rounded); color: var(--text-2); }
.pricing__note span + span::before { content: "·"; margin-right: 12px; color: var(--text-3); }

/* ───────────── FAQ ───────────── */

.faq { max-width: 860px; margin: clamp(40px, 6vw, 64px) auto 0; display: grid; gap: 12px; }
.faq details { border-radius: 20px; background: var(--card); border: 1px solid var(--stroke); overflow: hidden; transition: background-color var(--soft) var(--ease), border-color var(--soft) var(--ease); }
.faq details[open] { background: var(--card-hi); border-color: rgba(201, 207, 238, 0.2); }
.faq summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 20px 22px; font: 650 18px/1.35 var(--rounded);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary .plus { position: relative; width: 28px; height: 28px; flex: none; border-radius: 50%; background: rgba(201, 207, 238, 0.12); }
.faq summary .plus::before, .faq summary .plus::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 12px; height: 1.8px; margin: -0.9px 0 0 -6px; border-radius: 2px; background: var(--moon);
  transition: transform var(--soft) var(--ease);
}
.faq summary .plus::after { transform: rotate(90deg); }
.faq details[open] summary .plus::after { transform: rotate(0deg); }
.faq .answer { padding: 0 22px 22px; color: var(--text-2); display: grid; gap: 10px; }
.faq .answer a { color: var(--moon); }

/* ───────────── Final CTA + footer ───────────── */

.final { position: relative; text-align: center; overflow: hidden; }
.final__art { position: relative; width: min(300px, 70vw); aspect-ratio: 1; margin: 0 auto -18px; }
.final__art canvas { width: 100%; height: 100%; }
.final__art .luna { width: 38%; }
.final .lead { margin: 18px auto 0; text-align: center; }
.final .hero__ctas { margin-top: 30px; }

.footer { position: relative; padding: 64px 0 40px; border-top: 1px solid var(--stroke); background: linear-gradient(180deg, rgba(6, 9, 23, 0), rgba(6, 9, 23, 0.6)); }
.footer__grid { display: grid; gap: 36px; }
@media (min-width: 760px) { .footer__grid { grid-template-columns: 1.5fr 1fr 1fr 1fr; } }
.footer__brand p { margin-top: 14px; color: var(--text-2); max-width: 22em; font-size: 15px; }
.footer h4 { margin: 0 0 14px; font: 600 12px/1 var(--sans); letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-3); }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer ul a { color: var(--text-2); font-size: 15px; transition: color var(--quick); }
.footer ul a:hover { color: var(--moon); }
.footer__base { display: grid; gap: 8px; margin-top: 48px; padding-top: 22px; border-top: 1px solid var(--stroke); font-size: 13px; color: var(--text-3); }
@media (min-width: 760px) { .footer__base { grid-template-columns: 1fr auto; } }

/* ───────────── Legal pages ───────────── */

.legal-hero { padding: calc(var(--nav-h) + 84px) 0 40px; text-align: center; }
.legal-hero__moon { position: relative; width: 150px; height: 150px; margin: 0 auto 6px; }
.legal-hero__moon canvas { width: 100%; height: 100%; }
.legal-hero__moon .luna { width: 40%; }
.legal-hero h1 { font-size: clamp(42px, 6.6vw, 76px); margin-top: 14px; }
.legal-hero .lead { margin: 18px auto 0; text-align: center; }
.legal-hero .meta { margin-top: 18px; display: inline-flex; gap: 10px; flex-wrap: wrap; justify-content: center; }

.legal { display: grid; gap: 32px; padding-bottom: 120px; }
@media (min-width: 1000px) { .legal { grid-template-columns: 250px 1fr; gap: 56px; align-items: start; } }
.toc { display: none; }
@media (min-width: 1000px) {
  .toc { display: block; position: sticky; top: calc(var(--nav-h) + 40px); padding: 20px 8px 20px 0; }
  .toc h4 { margin: 0 0 12px 16px; font: 600 11.5px/1 var(--sans); letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-3); }
  .toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; position: relative; }
  .toc a { display: block; padding: 8px 14px; border-radius: 12px; font-size: 14.5px; line-height: 1.35; color: var(--text-2); border-left: 2px solid transparent; transition: color var(--soft) var(--ease), background-color var(--soft) var(--ease), border-color var(--soft) var(--ease); }
  .toc a:hover { color: var(--text); }
  .toc a.is-active { color: var(--moon); background: rgba(201, 207, 238, 0.07); border-left-color: var(--moon); border-radius: 4px 12px 12px 4px; }
}
.prose { padding: clamp(26px, 4vw, 52px); max-width: 820px; }
.prose .summary { display: grid; gap: 10px; padding: 22px 24px; margin-bottom: 36px; border-radius: 18px; background: rgba(201, 207, 238, 0.07); border: 1px solid rgba(201, 207, 238, 0.2); }
.prose .summary h2 { font-size: 22px; margin: 0; }
.prose .summary ul { margin: 0; }
.prose section { scroll-margin-top: calc(var(--nav-h) + 40px); }
.prose section + section { margin-top: 40px; padding-top: 36px; border-top: 1px solid var(--stroke); }
.prose h2 { font-size: clamp(25px, 2.6vw, 30px); line-height: 1.2; margin-bottom: 14px; display: flex; gap: 12px; align-items: baseline; }
.prose h2 .n { font: 650 15px/1 var(--rounded); color: var(--moon); min-width: 22px; }
.prose h3 { font-size: 19px; margin: 22px 0 8px; }
.prose p, .prose li { color: var(--text-2); font-size: 16.5px; line-height: 1.7; }
.prose p + p { margin-top: 12px; }
.prose ul { padding-left: 20px; margin: 12px 0; display: grid; gap: 8px; }
.prose li::marker { color: var(--moon); }
.prose strong { color: var(--text); font-weight: 600; }
.prose a { color: var(--moon); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(201, 207, 238, 0.4); }
.prose table { width: 100%; border-collapse: collapse; margin: 14px 0; font-size: 15px; }
.prose th, .prose td { text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--stroke); vertical-align: top; color: var(--text-2); }
.prose th { color: var(--text); font: 650 14px/1.3 var(--rounded); }
.prose .table-wrap { overflow-x: auto; }
.prose .callout { margin: 16px 0; padding: 16px 18px; border-radius: 14px; background: rgba(255, 255, 255, 0.04); border: 1px solid var(--stroke); }

/* Support page */
.support-grid { display: grid; gap: 16px; padding-bottom: 40px; }
@media (min-width: 760px) { .support-grid { grid-template-columns: repeat(2, 1fr); } }
.support-grid .card { padding: 26px 24px; display: grid; gap: 12px; align-content: start; }
.support-grid h3 { font-size: 22px; }
.support-grid p, .support-grid li { color: var(--text-2); font-size: 16px; }
.support-grid ol { margin: 0; padding-left: 20px; display: grid; gap: 6px; }
.support-grid li::marker { color: var(--moon); font-family: var(--rounded); font-weight: 700; }
.contact-card { text-align: center; padding: clamp(32px, 5vw, 56px) 24px; display: grid; justify-items: center; gap: 16px; margin-bottom: 120px; }

/* ───────────── Page transitions ───────────── */

@view-transition { navigation: auto; }

::view-transition-old(root) { animation: vt-out 0.42s var(--ease) both; }
::view-transition-new(root) { animation: vt-in 0.8s var(--ease-out) both; }
::view-transition-old(sky) { display: none; }
::view-transition-new(sky) { animation: none; }
::view-transition-group(nav) { animation-duration: 0.6s; animation-timing-function: var(--ease); }

@keyframes vt-out { to { opacity: 0; filter: blur(10px); transform: translateY(-10px) scale(0.99); } }
@keyframes vt-in { from { opacity: 0; filter: blur(10px); transform: translateY(16px); } }

/* Fallback for browsers without cross-document view transitions */
html.js:not(.vt) main, html.js:not(.vt) .footer { animation: vt-in 0.8s var(--ease-out) both; }
html.is-leaving main, html.is-leaving .footer { animation: vt-out 0.38s var(--ease) both !important; }

/* ───────────── Reduced motion: everything static ───────────── */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.15s !important; transition-delay: 0s !important; }
  .sky__glow { animation: none; }
  .js [data-reveal], .js [data-split] .w { opacity: 1; transform: none; filter: none; }
  .fan__stage { --p: 1 !important; }
  .scroll-cue::after { animation: none; opacity: 1; }
  .luna, .luna svg, .luna__eye, .luna__spark { animation: none !important; }
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
}
