/* Hushmoon — site styles. No external fonts, no trackers.
   Brand type is Nunito (SIL OFL, see brand/BRAND.md). To self-host it, drop the woff2 files into
   assets/fonts/ and uncomment the block below; the CSP already allows font-src 'self'.

@font-face { font-family: "Nunito"; src: url(../fonts/Nunito-Variable.woff2) format("woff2"); font-weight: 200 1000; font-display: swap; }
*/

:root {
  --night-950: #060a1c;
  --night-900: #0a1030;
  --night-850: #0e1640;
  --night-800: #131c4c;
  --night-700: #1d2763;
  --line: rgba(201, 184, 255, 0.16);
  --line-strong: rgba(201, 184, 255, 0.32);
  --glass: rgba(29, 39, 99, 0.45);
  --text: #f7f4ff;
  --muted: #b3b8de;
  --dim: #8c92c2;
  --lavender-100: #efe9ff;
  --lavender-200: #e2d9ff;
  --lavender-300: #c9b8ff;
  --lavender-400: #b8a9e8;
  --moon: #ffd98a;
  --moon-strong: #f7c55c;
  --rose: #ff9fb5;
  --radius-s: 14px;
  --radius: 22px;
  --radius-l: 32px;
  --shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.7), 0 0 0 1px var(--line);
  --font: "Nunito", ui-rounded, "SF Pro Rounded", "Quicksand", "Varela Round", "Hiragino Maru Gothic ProN", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Nunito", ui-rounded, "SF Pro Rounded", "Quicksand", "Varela Round", "Arial Rounded MT Bold", system-ui, -apple-system, "Segoe UI", sans-serif;
  --wrap: 1160px;
  --gutter: clamp(16px, 4vw, 32px);
  color-scheme: dark;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
  background:
    radial-gradient(1200px 700px at 80% -10%, rgba(169, 155, 240, 0.22), transparent 60%),
    radial-gradient(900px 600px at -10% 30%, rgba(80, 96, 200, 0.18), transparent 60%),
    linear-gradient(180deg, var(--night-900) 0%, var(--night-950) 100%);
  background-color: var(--night-950);
  background-attachment: fixed;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--text);
  /* The sky gradient lives on <html> so the fixed star layer (.sky) can sit between it and the content. */
  background: transparent;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; height: auto; }

a { color: var(--lavender-200); text-decoration-color: rgba(226, 217, 255, 0.4); text-underline-offset: 3px; }
a:hover { color: #fff; text-decoration-color: currentColor; }

:focus-visible { outline: 3px solid var(--moon); outline-offset: 3px; border-radius: 8px; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.12;
  letter-spacing: -0.015em;
  margin: 0 0 0.5em;
  font-weight: 700;
  text-wrap: balance;
}

p { margin: 0 0 1em; text-wrap: pretty; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  padding: 10px 16px; border-radius: 12px; background: var(--moon); color: var(--night-900);
  font-weight: 700; text-decoration: none;
}
.skip-link:focus { top: 12px; }

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

/* ---------- Starry sky ---------- */

.sky {
  position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden;
}
.sky::before,
.sky::after,
.sky span {
  content: ""; position: absolute; inset: -10%;
  background-repeat: repeat;
}
.sky::before {
  background-image:
    radial-gradient(2.6px 2.6px at 23px 41px, rgba(255,255,255,.9), transparent 60%),
    radial-gradient(1.7px 1.7px at 141px 97px, rgba(255,255,255,.7), transparent 60%),
    radial-gradient(2.0px 2.0px at 77px 183px, rgba(226,217,255,.8), transparent 60%),
    radial-gradient(1.7px 1.7px at 199px 29px, rgba(255,255,255,.6), transparent 60%),
    radial-gradient(2.2px 2.2px at 211px 211px, rgba(255,240,200,.8), transparent 60%);
  background-size: 233px 233px;
  animation: twinkle 7s ease-in-out infinite alternate;
}
.sky::after {
  background-image:
    radial-gradient(1.7px 1.7px at 61px 13px, rgba(255,255,255,.7), transparent 60%),
    radial-gradient(2.7px 2.7px at 263px 151px, rgba(255,236,190,.9), transparent 60%),
    radial-gradient(1.7px 1.7px at 151px 269px, rgba(226,217,255,.7), transparent 60%),
    radial-gradient(2.0px 2.0px at 307px 47px, rgba(255,255,255,.6), transparent 60%);
  background-size: 331px 331px;
  animation: twinkle 11s ease-in-out -4s infinite alternate;
}
.sky span {
  background-image:
    radial-gradient(3.4px 3.4px at 113px 71px, rgba(255,226,160,.95), transparent 60%),
    radial-gradient(2.5px 2.5px at 383px 293px, rgba(255,255,255,.85), transparent 60%),
    radial-gradient(3.1px 3.1px at 251px 401px, rgba(226,217,255,.9), transparent 60%);
  background-size: 457px 457px;
  animation: twinkle 5s ease-in-out -2s infinite alternate;
}
@keyframes twinkle {
  0%   { opacity: 0.35; }
  50%  { opacity: 1; }
  100% { opacity: 0.55; }
}

/* ---------- Header ---------- */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(8, 13, 40, 0.72);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  min-height: 68px;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--text); text-decoration: none;
  font-family: var(--font-display); font-weight: 700; font-size: 1.3rem; letter-spacing: -0.01em;
}
.brand:hover { color: #fff; }
.brand img { width: auto; height: 36px; }
.site-footer .brand img { height: 34px; }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a {
  color: var(--muted); text-decoration: none; font-weight: 600; font-size: 0.97rem;
  padding: 10px 14px; border-radius: 999px;
}
.nav a:hover { color: var(--text); background: rgba(201, 184, 255, 0.08); }
.nav a[aria-current="page"] { color: var(--text); }
.nav .btn { margin-left: 8px; }
@media (max-width: 860px) {
  .nav a:not(.btn) { display: none; }
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 12px 22px; border-radius: 999px;
  font-family: var(--font-display); font-weight: 700; font-size: 1rem; line-height: 1.1;
  text-decoration: none; cursor: pointer; border: 0;
  transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-moon {
  background: linear-gradient(180deg, #ffe4a6, var(--moon-strong));
  color: #1a1640;
  box-shadow: 0 10px 30px -10px rgba(247, 197, 92, 0.65), inset 0 1px 0 rgba(255,255,255,.6);
}
.btn-moon:hover { color: #1a1640; box-shadow: 0 14px 34px -10px rgba(247, 197, 92, 0.8), inset 0 1px 0 rgba(255,255,255,.6); }
.btn-ghost {
  color: var(--text); background: rgba(201, 184, 255, 0.08);
  box-shadow: inset 0 0 0 1px var(--line-strong);
}
.btn-ghost:hover { color: #fff; background: rgba(201, 184, 255, 0.14); }
.btn-small { min-height: 40px; padding: 9px 16px; font-size: 0.93rem; }
.nav .btn-moon { color: #1a1640; }
.nav .btn-moon:hover { color: #1a1640; background: linear-gradient(180deg, #ffe9b6, #f9cd6c); }

/* App Store badge (placeholder styling — swap for Apple's official badge artwork) */
.store-badge {
  display: inline-flex; align-items: center; gap: 12px;
  min-height: 58px; padding: 9px 22px 9px 16px; border-radius: 16px;
  background: #000; color: #fff; text-decoration: none;
  box-shadow: 0 0 0 1px rgba(255,255,255,.28), 0 18px 40px -18px rgba(0,0,0,.9);
  transition: transform .2s ease, box-shadow .2s ease;
}
.store-badge:hover { color: #fff; transform: translateY(-1px); box-shadow: 0 0 0 1px rgba(255,255,255,.5), 0 18px 40px -18px rgba(0,0,0,.9); }
.store-badge svg { width: 26px; height: 26px; flex: none; }
.store-badge span { display: flex; flex-direction: column; line-height: 1.1; text-align: left; }
.store-badge small { font-size: 0.72rem; letter-spacing: 0.02em; opacity: .85; font-family: system-ui, -apple-system, sans-serif; }
.store-badge strong { font-size: 1.32rem; font-weight: 600; letter-spacing: -0.01em; font-family: system-ui, -apple-system, sans-serif; }

/* ---------- Common section bits ---------- */

section { position: relative; }
.section { padding: clamp(56px, 8vw, 104px) 0; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 0.82rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--moon); margin: 0 0 14px;
}
.section-head { max-width: 680px; margin: 0 auto clamp(40px, 6vw, 64px); text-align: center; }
.section-head h2 { font-size: clamp(2rem, 4.6vw, 3.1rem); }
.section-head .eyebrow { color: var(--moon); font-size: 0.82rem; margin-bottom: 14px; }
.section-head p:not(.eyebrow) { color: var(--muted); font-size: clamp(1.05rem, 1.6vw, 1.2rem); margin: 0; }

.card {
  background: linear-gradient(180deg, rgba(29, 39, 99, 0.55), rgba(19, 28, 76, 0.35));
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* ---------- Hero ---------- */

.hero { padding: clamp(40px, 7vw, 96px) 0 clamp(56px, 8vw, 112px); }
.hero .wrap {
  display: grid; grid-template-columns: 1.05fr 1fr; align-items: center; gap: clamp(24px, 5vw, 72px);
}
.hero h1 {
  font-size: clamp(3rem, 8.4vw, 6rem);
  line-height: 0.98; letter-spacing: -0.035em; margin-bottom: 24px;
}
.hero h1 .accent {
  background: linear-gradient(100deg, var(--lavender-200) 0%, var(--moon) 90%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero .lede {
  font-size: clamp(1.15rem, 2vw, 1.4rem); line-height: 1.5; color: var(--muted);
  max-width: 34ch; margin-bottom: 32px;
}
.hero .lede strong { color: var(--text); font-weight: 600; }
.hero-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 18px; }
.hero-note { margin: 18px 0 0; font-size: 0.95rem; color: var(--dim); }

.hero-art { position: relative; aspect-ratio: 1 / 1.02; max-width: 560px; justify-self: center; width: 100%; }
.hero-art .glow {
  position: absolute; left: 8%; right: 8%; top: 18%; bottom: 14%; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255, 217, 138, 0.20), rgba(184, 169, 232, 0.10) 55%, transparent);
}
.hero-art .moon {
  position: absolute; width: 80%; left: 10%; bottom: 20%;
  filter: drop-shadow(0 0 36px rgba(255, 217, 138, 0.35));
}
.hero-art .nimbo {
  position: absolute; width: 96%; left: 2%; top: -2.7%;
  animation: float 6s ease-in-out infinite;
}
.now-playing {
  position: absolute; right: -2%; bottom: 0; width: min(280px, 56%);
  padding: 16px 18px; border-radius: 20px;
  background: rgba(14, 22, 64, 0.72);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  box-shadow: 0 0 0 1px var(--line-strong), 0 30px 60px -20px rgba(0,0,0,.7);
}
.now-playing .np-label { font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--moon); font-weight: 700; margin: 0 0 4px; }
.now-playing .np-title { font-family: var(--font-display); font-weight: 700; font-size: 1.02rem; margin: 0 0 12px; line-height: 1.3; }
.np-bar { height: 5px; border-radius: 5px; background: rgba(201,184,255,.18); overflow: hidden; }
.np-bar i { display: block; height: 100%; width: 42%; border-radius: inherit; background: linear-gradient(90deg, var(--lavender-300), var(--moon)); }
.np-meta { display: flex; justify-content: space-between; margin-top: 10px; font-size: 0.82rem; color: var(--muted); }

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}
@keyframes drift {
  0%, 100% { transform: translate(0, 0) rotate(-4deg); opacity: .85; }
  50% { transform: translate(6px, -10px) rotate(4deg); opacity: 1; }
}

/* ---------- Trust strip ---------- */

.trust { border-block: 1px solid var(--line); background: rgba(8, 13, 40, 0.4); }
.trust ul {
  list-style: none; margin: 0 auto; padding: 18px var(--gutter); max-width: var(--wrap);
  display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 36px;
  color: var(--muted); font-weight: 600; font-size: 0.97rem;
}
.trust li { display: inline-flex; align-items: center; gap: 10px; }
.trust li::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%;
  background: var(--moon); box-shadow: 0 0 10px rgba(255, 217, 138, .8);
}

/* ---------- Inside the app ---------- */

.screens { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(16px, 3vw, 36px); list-style: none; margin: 0 auto; padding: 0; max-width: 960px; }
.screens figure { margin: 0; text-align: center; }
.screens img {
  display: block; width: 100%; height: auto; border-radius: 34px;
  box-shadow: 0 0 0 1px var(--line-strong), 0 24px 60px rgba(4, 6, 24, 0.55);
}
.screens figcaption { margin-top: 16px; color: var(--muted); font-size: 0.98rem; }

/* ---------- Steps ---------- */

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; counter-reset: step; list-style: none; margin: 0; padding: 0; }
.step { padding: 30px 28px 32px; }
.step .num {
  display: grid; place-items: center; width: 48px; height: 48px; border-radius: 16px; margin-bottom: 22px;
  font-family: var(--font-display); font-weight: 800; font-size: 1.25rem; color: var(--night-900);
  background: linear-gradient(180deg, var(--lavender-200), var(--lavender-400));
}
.step h3 { font-size: 1.35rem; }
.step p { color: var(--muted); margin: 0; }

/* ---------- Features ---------- */

.features { display: grid; grid-template-columns: repeat(12, 1fr); gap: 20px; }
.feature { padding: 32px; grid-column: span 6; position: relative; overflow: hidden; }
.feature.wide { grid-column: span 12; display: grid; grid-template-columns: 1fr 1.1fr; gap: 40px; align-items: center; }
.feature .icon {
  width: 56px; height: 56px; border-radius: 18px; margin-bottom: 20px;
  display: grid; place-items: center;
  background: rgba(201, 184, 255, 0.12); box-shadow: inset 0 0 0 1px var(--line-strong);
}
.feature .icon svg { width: 28px; height: 28px; }
.feature h3 { font-size: clamp(1.35rem, 2.2vw, 1.65rem); }
.feature p { color: var(--muted); }
.feature ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; color: var(--muted); }
.feature li { display: flex; gap: 10px; align-items: baseline; }
.feature li::before { content: "✦"; color: var(--moon); font-size: 0.8em; flex: none; }

.feature .chips, .chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 0; padding: 0; list-style: none; }
.chips li {
  padding: 6px 13px; border-radius: 999px; font-size: 0.9rem; font-weight: 600;
  background: rgba(201,184,255,.10); color: var(--lavender-200);
  box-shadow: inset 0 0 0 1px var(--line);
}
.feature .chips li::before { content: none; }

/* Story preview (mirrors the in-app reading screen) */
.story-preview {
  margin: 0;
  padding: 28px 30px; border-radius: 26px;
  background: linear-gradient(180deg, #0a0f2c, #070b22);
  box-shadow: 0 0 0 1px var(--line-strong), 0 40px 80px -40px rgba(0,0,0,.9);
}
.story-preview .sp-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; font-size: 0.85rem; color: var(--dim); }
.story-preview .sp-title { font-family: var(--font-display); font-size: 1.15rem; font-weight: 700; color: var(--lavender-200); margin: 0 0 14px; }
.story-preview p { font-size: clamp(1.05rem, 1.8vw, 1.22rem); line-height: 1.6; color: rgba(179, 184, 222, 0.38); margin: 0 0 14px; }
.story-preview p.current { color: var(--text); }
.story-preview p:last-child { margin-bottom: 0; }
.story-preview mark { background: none; color: var(--moon); font-weight: 700; }
.story-preview p:not(.current) mark { color: rgba(255, 217, 138, 0.5); }

/* ---------- Privacy promise ---------- */

.promise {
  padding: clamp(36px, 6vw, 72px);
  border-radius: var(--radius-l);
  background:
    radial-gradient(600px 300px at 90% 0%, rgba(255, 217, 138, 0.14), transparent 70%),
    linear-gradient(160deg, rgba(43, 52, 128, 0.7), rgba(16, 23, 66, 0.7));
  box-shadow: var(--shadow);
  display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(28px, 5vw, 64px); align-items: center;
}
.promise blockquote {
  margin: 0; font-family: var(--font-display); font-weight: 700;
  font-size: clamp(1.6rem, 3.4vw, 2.5rem); line-height: 1.2; letter-spacing: -0.02em;
}
.promise blockquote em { font-style: normal; color: var(--moon); }
.promise .sub { color: var(--muted); margin: 20px 0 0; }
.promise ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.promise li {
  display: grid; grid-template-columns: 28px 1fr; gap: 12px; align-items: start;
  color: var(--lavender-100);
}
.promise li svg { width: 24px; height: 24px; margin-top: 2px; }
.promise li span { color: var(--muted); display: block; font-size: 0.95rem; }

/* ---------- Pricing ---------- */

.plans { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; align-items: stretch; }
.plan { padding: 30px 26px; display: flex; flex-direction: column; position: relative; }
.plan h3 { font-size: 1.2rem; margin-bottom: 14px; color: var(--lavender-200); }
.plan .price { font-family: var(--font-display); font-weight: 800; font-size: 2.6rem; letter-spacing: -0.03em; line-height: 1; margin: 0; }
.plan .price small { font-size: 1rem; font-weight: 600; color: var(--muted); letter-spacing: 0; }
.plan .per { color: var(--dim); font-size: 0.92rem; margin: 8px 0 22px; min-height: 1.5em; }
.plan ul { list-style: none; margin: 0 0 26px; padding: 0; display: grid; gap: 10px; color: var(--muted); font-size: 0.97rem; }
.plan li { display: flex; gap: 10px; align-items: baseline; }
.plan li::before { content: "✓"; color: var(--lavender-300); font-weight: 800; flex: none; }
.plan .btn { margin-top: auto; width: 100%; }
.plan.featured {
  background:
    radial-gradient(400px 200px at 50% 0%, rgba(255, 217, 138, 0.18), transparent 70%),
    linear-gradient(180deg, rgba(52, 60, 140, 0.85), rgba(25, 33, 90, 0.75));
  box-shadow: 0 0 0 1.5px rgba(255, 217, 138, 0.6), 0 40px 80px -30px rgba(0,0,0,.8);
}
.plan.featured h3 { color: var(--moon); }
.plan .tag {
  position: absolute; top: -13px; left: 50%; transform: translateX(-50%); white-space: nowrap;
  padding: 5px 14px; border-radius: 999px; font-size: 0.78rem; font-weight: 800; letter-spacing: 0.04em;
  background: var(--moon); color: #1a1640;
}
.fine { color: var(--dim); font-size: 0.9rem; text-align: center; max-width: 760px; margin: 32px auto 0; }

/* ---------- FAQ ---------- */

.faq { max-width: 820px; margin: 0 auto; display: grid; gap: 12px; }
.faq details {
  border-radius: 18px; background: rgba(29, 39, 99, 0.38);
  box-shadow: inset 0 0 0 1px var(--line);
  transition: background-color .2s ease;
}
.faq details[open] { background: rgba(29, 39, 99, 0.6); }
.faq summary {
  list-style: none; cursor: pointer; padding: 20px 56px 20px 24px; position: relative;
  font-family: var(--font-display); font-weight: 700; font-size: 1.1rem; line-height: 1.35;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 24px; top: 50%; width: 10px; height: 10px; margin-top: -7px;
  border-right: 2.5px solid var(--lavender-300); border-bottom: 2.5px solid var(--lavender-300);
  transform: rotate(45deg); transition: transform .2s ease;
}
.faq details[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
.faq .answer { padding: 0 24px 22px; color: var(--muted); }
.faq .answer p:last-child { margin-bottom: 0; }

/* ---------- Final CTA ---------- */

.cta-band { text-align: center; padding-bottom: clamp(80px, 10vw, 140px); }
.cta-band img.nimbo-small { width: 300px; margin: -40px auto -8px; animation: float 6s ease-in-out infinite; }
.cta-band h2 { font-size: clamp(2.2rem, 5vw, 3.6rem); }
.cta-band p { color: var(--muted); font-size: 1.15rem; max-width: 520px; margin: 0 auto 30px; }

/* ---------- Footer ---------- */

.site-footer { border-top: 1px solid var(--line); padding: 48px 0 40px; color: var(--dim); font-size: 0.95rem; background: rgba(6, 10, 28, 0.6); }
.site-footer .wrap { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
.site-footer .brand { font-size: 1.15rem; margin-bottom: 12px; }
.site-footer p { margin: 0 0 8px; max-width: 36ch; }
.site-footer h2 { font-size: 0.8rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); margin: 6px 0 14px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.site-footer ul a { display: inline-block; padding: 6px 0; color: var(--lavender-200); text-decoration: none; }
.site-footer ul a:hover { color: #fff; text-decoration: underline; }
.site-footer .legal { grid-column: 1 / -1; border-top: 1px solid var(--line); padding-top: 24px; margin-top: 8px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; }

/* ---------- Document pages (privacy, terms, support) ---------- */

.doc-hero { padding: clamp(48px, 8vw, 96px) 0 clamp(24px, 4vw, 40px); }
.doc-hero h1 { font-size: clamp(2.4rem, 6vw, 4rem); letter-spacing: -0.03em; }
.doc-hero .meta { color: var(--muted); margin: 0; }
.doc-hero .lede { color: var(--muted); font-size: clamp(1.1rem, 1.8vw, 1.25rem); max-width: 60ch; }

.doc-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: clamp(32px, 5vw, 64px); align-items: start; padding-bottom: clamp(64px, 9vw, 120px); }
.toc { position: sticky; top: 96px; font-size: 0.93rem; }
.toc h2 { font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); margin: 0 0 12px; }
.toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; border-left: 1px solid var(--line); }
.toc a { display: block; padding: 6px 0 6px 16px; color: var(--muted); text-decoration: none; line-height: 1.35; }
.toc a:hover { color: var(--text); }

.prose { max-width: 720px; }
.prose h2 { font-size: clamp(1.45rem, 2.6vw, 1.8rem); margin: 2.2em 0 0.6em; padding-top: 8px; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: 1.15rem; margin: 1.6em 0 0.5em; color: var(--lavender-200); }
.prose p, .prose li { color: #d3d6f0; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1.2em; }
.prose li { margin-bottom: 0.45em; }
.prose li::marker { color: var(--lavender-400); }
.prose strong { color: var(--text); }
.prose .caps { text-transform: uppercase; font-size: 0.95rem; letter-spacing: 0.01em; }

.summary-box {
  padding: 26px 28px; margin: 0 0 40px; border-radius: var(--radius);
  background: linear-gradient(160deg, rgba(43, 52, 128, 0.6), rgba(16, 23, 66, 0.6));
  box-shadow: 0 0 0 1px var(--line-strong);
}
.summary-box h2 { margin-top: 0 !important; font-size: 1.25rem !important; color: var(--moon); }
.summary-box ul { margin: 0; }

.table-wrap { overflow-x: auto; margin: 0 0 1.4em; border-radius: 16px; box-shadow: 0 0 0 1px var(--line); }
.prose table { width: 100%; border-collapse: collapse; font-size: 0.95rem; min-width: 520px; }
.prose th, .prose td { text-align: left; vertical-align: top; padding: 14px 16px; border-bottom: 1px solid var(--line); color: #d3d6f0; }
.prose th { background: rgba(29, 39, 99, 0.6); color: var(--text); font-weight: 700; }
.prose tr:last-child td { border-bottom: 0; }

/* Support page */
.contact-card { padding: 32px; display: grid; grid-template-columns: auto 1fr; gap: 24px; align-items: center; margin-bottom: 48px; }
.contact-card img { width: 150px; margin: -16px; }
.contact-card h2 { margin: 0 0 6px !important; font-size: 1.5rem !important; }
.contact-card p { margin: 0 0 14px; color: var(--muted); }
.contact-card .btn { margin-top: 4px; }

/* 404 */
.lost { min-height: calc(100vh - 69px - 220px); display: grid; place-items: center; text-align: center; padding: 64px 0; }
.lost img { width: 220px; margin: 0 auto 28px; animation: float 6s ease-in-out infinite; }
.lost h1 { font-size: clamp(2.2rem, 6vw, 3.6rem); }
.lost p { color: var(--muted); font-size: 1.15rem; margin-bottom: 28px; }

/* ---------- Responsive ---------- */

@media (max-width: 1040px) {
  .plans { grid-template-columns: repeat(2, 1fr); row-gap: 28px; }
}

@media (max-width: 900px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .hero-copy { text-align: center; }
  .hero .lede { margin-left: auto; margin-right: auto; }
  .hero-cta { justify-content: center; }
  .hero-art { max-width: 460px; order: -1; margin-bottom: -8px; }
  .steps { grid-template-columns: 1fr; }
  .feature, .feature.wide { grid-column: span 12; }
  .feature.wide { grid-template-columns: 1fr; gap: 28px; }
  .promise { grid-template-columns: 1fr; }
  .doc-layout { grid-template-columns: minmax(0, 1fr); }
  .toc { position: static; padding: 20px 22px; border-radius: 18px; background: rgba(29, 39, 99, 0.35); box-shadow: inset 0 0 0 1px var(--line); }
  .toc ol { border-left: 0; grid-template-columns: 1fr 1fr; column-gap: 16px; }
  .toc a { padding-left: 0; }
  .site-footer .wrap { grid-template-columns: 1fr 1fr; }
  .site-footer .about { grid-column: 1 / -1; }
}

@media (max-width: 560px) {
  body { font-size: 1rem; }
  .brand { font-size: 1.2rem; }
  .hero h1 { font-size: clamp(2.9rem, 14vw, 3.6rem); }
  .hero-art { max-width: 300px; margin-bottom: 60px; }
  .now-playing { width: 84%; padding: 12px 14px; right: 8%; bottom: -14%; }
  .now-playing .np-title { font-size: 0.92rem; margin-bottom: 8px; }
  .np-meta { font-size: 0.74rem; gap: 8px; }
  .np-meta span { white-space: nowrap; }
  .plans { grid-template-columns: 1fr; }
  .screens { grid-template-columns: minmax(0, 300px); justify-content: center; row-gap: 36px; }
  .feature, .step, .plan { padding: 26px 22px; }
  .story-preview { padding: 22px 20px; }
  .promise { border-radius: 26px; }
  .toc ol { grid-template-columns: 1fr; }
  .contact-card { grid-template-columns: 1fr; text-align: center; }
  .contact-card img { margin: -16px auto; width: 140px; }
  .site-footer .legal { flex-direction: column; }
}

/* ---------- Motion preferences ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* FAQ blocks inside document pages */
.prose .faq { margin: 0 0 8px; max-width: none; }
.prose .faq .answer p { color: var(--muted); }

/* 404 artwork comes from CSS so it resolves at any URL depth */
.logo-bg { display: inline-block; width: 157px; height: 36px; background: url(../logo-horizontal.svg) left center / contain no-repeat; }
.lost .nimbo-bg { width: 260px; aspect-ratio: 1; margin: -30px auto 0; background: url(../nimbo-sleeping.svg) center / contain no-repeat; animation: float 6s ease-in-out infinite; }
