/* ==========================================================================
   PersonaQuiz — design system
   Fonts: Geist (Vercel, OFL) + Instrument Serif (OFL), self-hosted.
   ========================================================================== */
@font-face { font-family: 'Geist'; src: url('/assets/fonts/Geist-Variable.woff2') format('woff2'); font-weight: 100 900; font-display: swap; }
@font-face { font-family: 'Instrument Serif'; src: url('/assets/fonts/instrument-serif-latin-400-normal.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Instrument Serif'; src: url('/assets/fonts/instrument-serif-latin-400-italic.woff2') format('woff2'); font-weight: 400; font-style: italic; font-display: swap; }

:root {
  --bg: #07070a;
  --bg-2: #0d0d12;
  --surface: rgba(255, 255, 255, 0.04);
  --surface-2: rgba(255, 255, 255, 0.07);
  --line: rgba(255, 255, 255, 0.09);
  --line-2: rgba(255, 255, 255, 0.16);
  --text: #f4f2ee;
  --muted: #a19ea8;
  --faint: #8a8792;
  --body: #cfccd4;
  --accent: #4db8ff;
  --accent-2: #8dfcd4;
  --accent-ink: #0a0a0a;
  --good: #7ee2a8;
  --bad: #ff8f8f;
  --sans: 'Geist', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --serif: 'Instrument Serif', ui-serif, Georgia, serif;
  --mono: ui-monospace, 'SF Mono', Menlo, monospace;
  --r-lg: 28px;
  --r-md: 18px;
  --r-sm: 12px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  --maxw: 1160px;
  --accent-text: var(--accent);
  --glass-1: rgba(255, 255, 255, .08);
  --glass-2: rgba(255, 255, 255, .02);
  --shadow: 0 40px 120px -40px rgba(0, 0, 0, .8);
  --aurora: .45;
  --grain: .07;
  color-scheme: dark;
}
/* Re-declare on each themed body so it follows that test's own accent colour. */
[data-theme] { --accent-text: var(--accent); }
/* ---------- Light theme (auto from the device, or chosen with the toggle) ---------- */
html[data-mode="light"] {
  --bg: #f6f4ef; --bg-2: #ffffff;
  --surface: rgba(24, 20, 36, 0.035); --surface-2: rgba(24, 20, 36, 0.065);
  --line: rgba(24, 20, 36, 0.10); --line-2: rgba(24, 20, 36, 0.17);
  --text: #16141b; --body: #34313b; --muted: #55525d; --faint: #6b6873;
  --good: #0b5e35; --bad: #b3332a;
  --glass-1: rgba(255, 255, 255, .92); --glass-2: rgba(255, 255, 255, .7);
  --shadow: 0 30px 80px -40px rgba(40, 30, 70, .35);
  --aurora: .32; --grain: .035;
  color-scheme: light;
}
html[data-mode="light"] [data-theme="iq"] { --accent: #3aa8f5; --accent-text: #0a68b0; --accent-2: #4a5bdc; }
html[data-mode="light"] [data-theme="eq"] { --accent-text: #a8321f; --accent-2: #f2a531; }
html[data-mode="light"] [data-theme="personality"] { --accent-text: #5a3cc8; --accent-2: #e66db2; }
html[data-mode="light"] [data-theme="hub"] { --glow: #c9b8ff; --accent: #16141b; --accent-ink: #f6f4ef; --accent-text: #16141b; --accent-2: #7b61ff; }
html[data-mode="light"] .aurora i { mix-blend-mode: multiply; }
html[data-mode="light"] .q-seq, html[data-mode="light"] .opt { color: var(--text); }
html[data-mode="light"] .score-big, html[data-mode="light"] .big-num { text-shadow: none; }
.mode-toggle { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line-2); background: var(--surface); color: var(--text); display: grid; place-items: center; cursor: pointer; transition: background .2s, transform .3s var(--spring); }
.mode-toggle:hover { background: var(--surface-2); }
.mode-toggle:active { transform: scale(.92) rotate(-20deg); }
.mode-toggle svg { width: 18px; height: 18px; }
.mode-toggle .sun { display: none; } html[data-mode="dark"] .mode-toggle .sun, html:not([data-mode="light"]) .mode-toggle .sun { display: block; }
html:not([data-mode="light"]) .mode-toggle .moon { display: none; }
.nav-right { display: flex; align-items: center; gap: 18px; }
[data-theme="iq"] { --accent: #4db8ff; --accent-2: #8b9bff; }
[data-theme="eq"] { --accent: #ff8a7a; --accent-2: #ffc46b; }
[data-theme="personality"] { --accent: #b9a2ff; --accent-2: #ff9ad5; }
[data-theme="hub"] { --accent: #f4f2ee; --accent-2: #b9a2ff; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; overflow-x: clip; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 400 16px/1.55 var(--sans); letter-spacing: -0.006em;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden; min-height: 100vh;
}
body.locked { overflow: hidden; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; }
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Ambient background: aurora + grain ---------- */
.aurora { position: fixed; inset: 0; z-index: -2; overflow: hidden; pointer-events: none; }
.aurora i { position: absolute; border-radius: 50%; filter: blur(90px); opacity: var(--aurora); will-change: transform; }
.aurora i:nth-child(1) { width: 60vmax; height: 60vmax; left: -20vmax; top: -25vmax; background: radial-gradient(circle, color-mix(in oklab, var(--glow, var(--accent)) 70%, transparent), transparent 65%); animation: drift1 26s var(--ease) infinite alternate; }
.aurora i:nth-child(2) { width: 50vmax; height: 50vmax; right: -18vmax; top: 10vh; background: radial-gradient(circle, color-mix(in oklab, var(--accent-2) 55%, transparent), transparent 65%); animation: drift2 32s var(--ease) infinite alternate; opacity: .3; }
.aurora i:nth-child(3) { width: 40vmax; height: 40vmax; left: 20vw; bottom: -25vmax; background: radial-gradient(circle, rgba(120, 90, 255, .5), transparent 65%); animation: drift1 38s var(--ease) infinite alternate-reverse; opacity: .25; }
@keyframes drift1 { to { transform: translate3d(8vw, 6vh, 0) scale(1.12); } }
@keyframes drift2 { to { transform: translate3d(-6vw, 10vh, 0) scale(.9); } }
.grain { position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: var(--grain); mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }

/* ---------- Layout ---------- */
.wrap { width: min(100% - 40px, var(--maxw)); margin-inline: auto; }
.nav { position: sticky; top: 0; z-index: 30; backdrop-filter: blur(18px) saturate(140%); -webkit-backdrop-filter: blur(18px) saturate(140%);
  background: color-mix(in oklab, var(--bg) 62%, transparent); border-bottom: 1px solid transparent; transition: border-color .3s; }
.nav.scrolled { border-bottom-color: var(--line); }
.nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; letter-spacing: -0.02em; text-decoration: none; font-size: 17px; }
.logo .dot { width: 22px; height: 22px; border-radius: 50%; background: conic-gradient(from 200deg, var(--accent), var(--accent-2), #7b61ff, var(--accent)); box-shadow: 0 0 22px color-mix(in oklab, var(--accent) 45%, transparent); }
.nav-meta { display: flex; gap: 8px; align-items: center; color: var(--muted); font-size: 13px; }
/* Test switcher: a segmented pill bar with each test's colour */
.nav .wrap { gap: 12px; }
.nav .logo { margin-right: auto; }
.nav-links { display: flex; gap: 2px; padding: 4px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line-2);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04); font-size: 14px; font-weight: 500; }
.nav-links a { --c: var(--text); display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 7px 14px; border-radius: 999px;
  color: var(--muted); text-decoration: none; white-space: nowrap; transition: color .2s, background .2s, box-shadow .2s; }
.nav-links a[data-k="iq"] { --c: #4db8ff; } .nav-links a[data-k="eq"] { --c: #ff8a7a; } .nav-links a[data-k="personality"] { --c: #b9a2ff; }
.nav-links a i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); box-shadow: 0 0 10px color-mix(in oklab, var(--c) 70%, transparent); flex: none; }
.nav-links a:hover { color: var(--text); background: var(--surface-2); }
[data-theme="iq"] .nav-links a[data-k="iq"], [data-theme="eq"] .nav-links a[data-k="eq"], [data-theme="personality"] .nav-links a[data-k="personality"] {
  color: var(--text); background: color-mix(in oklab, var(--c) 18%, transparent); box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--c) 45%, transparent); }
html[data-mode="light"] .nav-links { background: rgba(255,255,255,.7); box-shadow: 0 6px 20px -12px rgba(40,30,70,.35); }
html[data-mode="light"] .nav-links a i { box-shadow: none; }

/* ---------- Type ---------- */
.eyebrow { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px 7px 10px; border: 1px solid var(--line-2); border-radius: 999px;
  font-size: 13px; color: var(--muted); background: var(--surface); }
.eyebrow b { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 12px var(--accent); animation: pulse 2.4s infinite; }
@keyframes pulse { 50% { opacity: .35; } }
.display { font-family: var(--serif); font-weight: 400; letter-spacing: -0.025em; line-height: .95; margin: 0; }
.display em { font-style: italic; color: var(--accent-text); }
h1.display { font-size: clamp(46px, 8.2vw, 104px); }
h2.display { font-size: clamp(36px, 5.4vw, 64px); }
h3 { font-size: 19px; font-weight: 600; letter-spacing: -0.02em; margin: 0 0 6px; }
.lead { font-size: clamp(17px, 1.9vw, 20px); color: var(--muted); max-width: 34ch; margin: 22px 0 0; line-height: 1.5; }
.muted { color: var(--muted); }
.small { font-size: 13px; color: var(--muted); }
.kicker { font-size: 12px; text-transform: uppercase; letter-spacing: .14em; color: var(--faint); font-weight: 600; }

/* ---------- Buttons ---------- */
.btn { --h: 56px; position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: var(--h); padding: 0 26px;
  border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface); text-decoration: none; font-weight: 600; font-size: 16px;
  cursor: pointer; transition: transform .25s var(--spring), background .2s, box-shadow .3s, opacity .2s; -webkit-tap-highlight-color: transparent; user-select: none; }
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--accent); color: var(--accent-ink); border-color: transparent; overflow: hidden;
  box-shadow: 0 10px 40px -10px color-mix(in oklab, var(--accent) 70%, transparent), inset 0 1px 0 rgba(255, 255, 255, .5); }
.btn-primary::after { content: ''; position: absolute; inset: 0; background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, .55) 50%, transparent 65%);
  transform: translateX(-120%); animation: shine 3.6s 1.2s infinite; }
@keyframes shine { 0%, 55% { transform: translateX(-120%); } 85%, 100% { transform: translateX(120%); } }
.btn-primary:hover { box-shadow: 0 14px 50px -10px color-mix(in oklab, var(--accent) 85%, transparent), inset 0 1px 0 rgba(255, 255, 255, .5); }
.btn-lg { --h: 62px; font-size: 17px; padding: 0 32px; }
.btn-block { width: 100%; }
.btn .arrow { transition: transform .25s var(--spring); }
.btn:hover .arrow { transform: translateX(4px); }
.btn[disabled] { opacity: .65; cursor: progress; }
.link { background: none; border: 0; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; padding: 8px; font-size: 14px; }

/* ---------- Hero ---------- */
.hero { padding: clamp(36px, 7vw, 90px) 0 60px; }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(28px, 5vw, 70px); align-items: center; }
.hero-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 18px; margin-top: 34px; }
.price-note { font-size: 13.5px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 16px; }
.price-note span { display: inline-flex; align-items: center; gap: 6px; }
.price-note span::before { content: ''; width: 4px; height: 4px; border-radius: 50%; background: var(--faint); }
.price-note span:first-child::before { display: none; }

.hero-card { position: relative; border-radius: var(--r-lg); padding: 26px; border: 1px solid var(--line-2);
  background: linear-gradient(160deg, var(--glass-1), var(--glass-2)); box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, .08);
  backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); }
.hero-card::before { content: ''; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; pointer-events: none;
  background: conic-gradient(from var(--ang, 0deg), transparent 0 70%, var(--accent) 80%, transparent 90%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; animation: spin 6s linear infinite; }
@property --ang { syntax: '<angle>'; initial-value: 0deg; inherits: false; }
@keyframes spin { to { --ang: 360deg; } }
.hero-card .hc-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; font-size: 13px; color: var(--muted); }
.hero-card .hc-hint { margin-top: 16px; font-size: 13px; color: var(--muted); text-align: center; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); font-size: 12.5px; color: var(--text); }
.chip i { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }

/* ---------- Question UI (shared by hero card + stage) ---------- */
.q-text:focus { outline: none; }
.q-text { font-size: clamp(20px, 2.6vw, 26px); font-weight: 500; letter-spacing: -0.02em; line-height: 1.3; margin: 0 0 18px; text-wrap: balance; }
.q-seq { font-family: var(--serif); font-size: clamp(30px, 5vw, 46px); letter-spacing: 0.02em; margin: -4px 0 20px; color: var(--text); white-space: nowrap; overflow-x: auto; }
.q-seq .gap { color: var(--accent-text); font-style: italic; }
.q-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; max-width: 300px; margin: 0 auto 20px; }
.q-grid .cell { aspect-ratio: 1; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); display: grid; place-items: center; color: var(--text); }
.q-grid .cell svg { width: 72%; height: 72%; }
.q-grid .cell.missing { border: 1.5px dashed var(--accent); color: var(--accent-text); font-family: var(--serif); font-size: 34px; font-style: italic; }
.opts { display: grid; gap: 10px; }
.opts.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.opts.four-visual { grid-template-columns: repeat(4, 1fr); }
.opt { position: relative; display: flex; align-items: center; gap: 14px; min-height: 58px; width: 100%; padding: 14px 18px; text-align: left; cursor: pointer;
  border-radius: var(--r-md); border: 1px solid var(--line-2); background: var(--surface); font-size: 16.5px; font-weight: 500; line-height: 1.35;
  transition: transform .2s var(--spring), background .15s, border-color .15s; -webkit-tap-highlight-color: transparent; }
.opt:hover { background: var(--surface-2); border-color: color-mix(in oklab, var(--accent) 45%, var(--line-2)); }
.opt:active { transform: scale(.98); }
.opt .k { flex: none; width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; font-size: 13px; font-weight: 600; color: var(--muted); border: 1px solid var(--line-2); }
.opt.visual { flex-direction: column; justify-content: center; padding: 10px; aspect-ratio: 1; min-height: 0; }
.opt.visual svg { width: 70%; height: 70%; }
.opt.visual .k { position: absolute; top: 6px; left: 6px; width: 22px; height: 22px; font-size: 11px; border-radius: 7px; }
.opt.selected { background: color-mix(in oklab, var(--accent) 18%, transparent); border-color: var(--accent); }
.opt.selected .k { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.opt.pop { animation: pop .35s var(--spring); }
@keyframes pop { 40% { transform: scale(1.03); } }
.likert { display: grid; gap: 9px; }
.likert .opt { justify-content: space-between; }
.likert .opt .bar { flex: none; display: flex; gap: 3px; }
.likert .opt .bar i { width: 6px; height: 16px; border-radius: 3px; background: var(--line-2); }
.likert .opt .bar i.on { background: var(--accent); }

/* ---------- Stage (full-screen test) ---------- */
.stage { position: fixed; inset: 0; z-index: 100; display: flex; flex-direction: column; background: var(--bg); opacity: 0; visibility: hidden; transition: opacity .35s var(--ease), visibility 0s .35s; }
.stage.open { opacity: 1; visibility: visible; transition: opacity .35s var(--ease); }
.stage .aurora i { opacity: .22; }
.stage-top { display: flex; align-items: center; gap: 12px; padding: max(14px, env(safe-area-inset-top)) 18px 10px; }
.icon-btn { width: 44px; height: 44px; flex: none; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); display: grid; place-items: center; cursor: pointer; transition: background .2s, opacity .2s; }
.icon-btn:hover { background: var(--surface-2); }
.icon-btn[disabled] { opacity: .3; cursor: default; }
.icon-btn svg { width: 18px; height: 18px; }
.progress { flex: 1; height: 6px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.progress span { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--accent-2), var(--accent)); transition: width .5s var(--ease); box-shadow: 0 0 16px var(--accent); }
.counter { font-size: 13px; font-variant-numeric: tabular-nums; color: var(--muted); min-width: 44px; text-align: right; }
.timer { font-size: 13px; font-variant-numeric: tabular-nums; padding: 6px 10px; border-radius: 99px; border: 1px solid var(--line); color: var(--muted); }
.timer.low { color: var(--bad); border-color: color-mix(in oklab, var(--bad) 50%, transparent); }
.stage-body { flex: 1; overflow-y: auto; display: flex; justify-content: center; padding: 10px 18px max(24px, env(safe-area-inset-bottom)); }
.stage-inner { width: min(100%, 620px); margin: auto 0; padding: 12px 0 30px; }
.q-enter { animation: qin .5s var(--ease) both; }
.q-enter .opt, .q-enter-back .opt { animation: optin .5s var(--ease) both; }
.q-enter .opt:nth-child(2), .q-enter-back .opt:nth-child(2) { animation-delay: .06s; }
.q-enter .opt:nth-child(3), .q-enter-back .opt:nth-child(3) { animation-delay: .12s; }
.q-enter .opt:nth-child(4), .q-enter-back .opt:nth-child(4) { animation-delay: .18s; }
.q-enter .opt:nth-child(5), .q-enter-back .opt:nth-child(5) { animation-delay: .24s; }
@keyframes optin { from { opacity: 0; transform: translateY(14px); } }
.stage-inner.q-exit { animation: qout .23s cubic-bezier(.4, 0, 1, 1) forwards; }
@keyframes qout { to { opacity: 0; transform: translateX(-56px) scale(.97); filter: blur(3px); } }
.chosen .opt:not(.selected) { opacity: .32; transform: scale(.985); transition: opacity .25s, transform .25s; }
.opt .tick { position: absolute; right: 16px; top: 50%; width: 26px; height: 26px; margin-top: -13px; border-radius: 50%; background: var(--accent); transform: scale(0); transition: transform .35s var(--spring); }
.opt .tick::after { content: ''; position: absolute; left: 8px; top: 7px; width: 10px; height: 6px; border-left: 2.5px solid var(--accent-ink); border-bottom: 2.5px solid var(--accent-ink); transform: rotate(-45deg); }
.opt.selected .tick { transform: scale(1); }
.opt.selected { box-shadow: 0 0 0 1px var(--accent), 0 10px 40px -14px var(--accent); }
.counter.bump { animation: bump .4s var(--spring); }
@keyframes bump { 40% { transform: scale(1.35); color: var(--accent-text); } }
.progress.glow span { animation: barglow .7s var(--ease); }
@keyframes barglow { 30% { box-shadow: 0 0 26px var(--accent); filter: brightness(1.4); } }
.q-num { display: flex; align-items: baseline; gap: 12px; }
.q-big { font-family: var(--serif); font-size: 54px; line-height: .8; color: var(--accent-text); letter-spacing: -0.03em; }
.q-enter-back { animation: qinb .45s var(--ease) both; }
@keyframes qin { from { opacity: 0; transform: translateX(64px); } }
@keyframes qinb { from { opacity: 0; transform: translateX(-64px); } }
.q-num { font-size: 13px; color: var(--accent-text); font-weight: 600; letter-spacing: .02em; margin-bottom: 10px; }

.timer.paused { opacity: .55; }
.toast { position: fixed; left: 50%; top: calc(76px + env(safe-area-inset-top)); transform: translateX(-50%); z-index: 6; padding: 12px 18px; border-radius: 99px;
  background: var(--accent); color: var(--accent-ink); font-weight: 600; font-size: 15px; box-shadow: 0 12px 40px -10px var(--accent); animation: toastin .4s var(--spring); transition: opacity .5s, transform .5s; }
.toast.out { opacity: 0; transform: translate(-50%, -10px); }
@keyframes toastin { from { opacity: 0; transform: translate(-50%, -16px) scale(.9); } }

/* Interstitial */
.inter { text-align: center; padding: 30px 6px; }
.inter .big { font-family: var(--serif); font-size: clamp(40px, 7vw, 64px); line-height: 1; margin: 0 0 16px; }
.inter .big em { color: var(--accent-text); }
.inter p { color: var(--muted); font-size: 17px; max-width: 30ch; margin: 0 auto 28px; }
.ring { width: 46px; height: 46px; margin: 0 auto 22px; }
.ring circle { fill: none; stroke-width: 3; }
.ring .bg { stroke: var(--surface-2); }
.ring .fg { stroke: var(--accent); stroke-linecap: round; stroke-dasharray: 126; stroke-dashoffset: 126; transform: rotate(-90deg); transform-origin: center; }
.ring.go .fg { animation: ringfill 2.6s linear forwards; }
@keyframes ringfill { to { stroke-dashoffset: 0; } }

/* Name step */
.field { display: block; width: 100%; height: 62px; padding: 0 20px; border-radius: var(--r-md); border: 1px solid var(--line-2); background: var(--surface); color: var(--text); font: 500 19px var(--sans); outline: none; transition: border-color .2s, box-shadow .2s; }
.field:focus { border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in oklab, var(--accent) 18%, transparent); }

.ask { text-align: left; margin-top: 18px; padding: 16px; border-radius: var(--r-md); border: 1px dashed var(--line-2); background: var(--surface); }
.ask label { font-size: 16px; }
.field.area { height: auto; min-height: 76px; padding: 14px 16px; font-size: 16px; resize: none; line-height: 1.4; }
.ideas { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.idea { border: 1px solid var(--line-2); background: transparent; color: var(--muted); border-radius: 999px; padding: 8px 12px; font-size: 13.5px; cursor: pointer; transition: all .2s; }
.idea:hover { color: var(--text); border-color: var(--accent); }
.ai-tag { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); padding: 4px 10px; border-radius: 99px; border: 1px solid var(--line); }
.qa { border-left: 3px solid var(--accent); padding: 14px 18px; background: color-mix(in oklab, var(--accent) 8%, transparent); border-radius: 12px; margin: 14px 0; }
.qa .qq { font-family: var(--serif); font-style: italic; font-size: 22px; margin-bottom: 8px; }
.skel { height: 14px; border-radius: 7px; background: linear-gradient(90deg, var(--surface), var(--surface-2), var(--surface)); background-size: 200% 100%; animation: sk 1.4s infinite; margin: 10px 0; }
@keyframes sk { to { background-position: -200% 0; } }
.vid-wrap { display: grid; grid-template-columns: 220px 1fr; gap: 22px; align-items: center; }
.vid-wrap video { width: 100%; aspect-ratio: 9/16; border-radius: 16px; background: #000; border: 1px solid var(--line); }
.vid-ph { width: 100%; aspect-ratio: 9/16; border-radius: 16px; border: 1px dashed var(--line-2); display: grid; place-items: center; color: var(--muted); font-size: 14px; text-align: center; padding: 16px; }
@media (max-width: 560px) { .vid-wrap { grid-template-columns: 1fr; } .vid-wrap video, .vid-ph { max-width: 260px; margin: 0 auto; } }

/* Analysing */
.analyse { text-align: center; }
.orb { width: 120px; height: 120px; margin: 0 auto 28px; border-radius: 50%; background: conic-gradient(from 0deg, var(--accent), var(--accent-2), #7b61ff, var(--accent)); filter: blur(1px);
  animation: spinr 2.4s linear infinite; box-shadow: 0 0 80px color-mix(in oklab, var(--accent) 50%, transparent); mask: radial-gradient(circle, transparent 46%, #000 48%); -webkit-mask: radial-gradient(circle, transparent 46%, #000 48%); }
@keyframes spinr { to { transform: rotate(360deg); } }
.steps { list-style: none; padding: 0; margin: 24px auto 0; max-width: 320px; text-align: left; }
.steps li { display: flex; align-items: center; gap: 12px; padding: 9px 0; color: var(--faint); transition: color .3s; font-size: 15.5px; }
.steps li .s { width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--line-2); flex: none; display: grid; place-items: center; transition: all .3s; }
.steps li.active { color: var(--text); }
.steps li.active .s { border-color: var(--accent); border-top-color: transparent; animation: spinr .8s linear infinite; }
.steps li.done { color: var(--muted); }
.steps li.done .s { background: var(--accent); border-color: var(--accent); animation: none; }
.steps li.done .s::after { content: ''; width: 8px; height: 4px; border-left: 2px solid var(--accent-ink); border-bottom: 2px solid var(--accent-ink); transform: rotate(-45deg) translate(1px, -1px); }

/* ---------- Teaser / paywall ---------- */
.opts .opt:not(.visual) { padding-right: 52px; }
.cert2 { position: relative; overflow: hidden; margin: 22px auto 26px; max-width: 460px; aspect-ratio: 1.414; border-radius: 12px; background: #fbf7ef; color: #1a1a1a; text-align: left;
  padding: 5.5% 6%; box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .9); transform: rotate(-1.5deg); display: flex; flex-direction: column; font-size: clamp(9px, 2.3vw, 11px); }
.cert2::before { content: ''; position: absolute; inset: 3%; border: 1px solid #1a1a1a; border-radius: 8px; pointer-events: none; }
.cert2 .b1 { position: absolute; right: -14%; top: -30%; width: 46%; aspect-ratio: 1; border-radius: 50%; background: color-mix(in oklab, var(--accent) 28%, #fbf7ef); }
.cert2 .b2 { position: absolute; left: -12%; bottom: -34%; width: 38%; aspect-ratio: 1; border-radius: 50%; background: color-mix(in oklab, var(--accent-2) 25%, #fbf7ef); }
.cert2 .cf { position: absolute; width: 7px; height: 7px; background: var(--accent); filter: brightness(.75); opacity: .7; }
.cert2 .c1 { left: 40%; top: 8%; border-radius: 50%; } .cert2 .c2 { left: 60%; top: 13%; transform: rotate(30deg); }
.cert2 .c3 { left: 30%; bottom: 9%; transform: rotate(20deg); } .cert2 .c4 { right: 12%; bottom: 12%; border-radius: 50%; }
.cert2 > * { position: relative; }
.c-head b { display: block; letter-spacing: .25em; font-size: 1em; }
.c-head span { color: #666; letter-spacing: .12em; text-transform: uppercase; font-size: .85em; }
.c-body { flex: 1; display: grid; grid-template-columns: 1.55fr 1fr; align-items: center; gap: 4%; }
.c-small { color: #555; font-size: 1.1em; }
.c-name { font-family: var(--serif); font-size: clamp(30px, 8vw, 44px); line-height: 1; margin: 2px 0 4px; word-break: break-word; }
.c-title { font-family: var(--serif); font-style: italic; font-size: 1.7em; color: #555; }
.c-quote { font-family: var(--serif); font-style: italic; font-size: 1.3em; margin: 6px 0; }
.c-stk { display: flex; gap: 5px; flex-wrap: wrap; }
.c-stk span { padding: 3px 9px; border-radius: 99px; border: 1px solid #1a1a1a; background: color-mix(in oklab, var(--accent) 20%, #fbf7ef); font-size: .9em; }
.cert2 .blur { color: transparent !important; text-shadow: 0 0 9px rgba(40,40,40,.45); user-select: none; }
.c-title .blur { text-shadow: 0 0 9px color-mix(in oklab, var(--accent) 70%, #000); }
.c-seal { aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; transform: rotate(-6deg);
  background: radial-gradient(circle, #fffdf8 0 62%, transparent 63%), conic-gradient(from 0deg, var(--accent) 0 5deg, color-mix(in oklab, var(--accent) 70%, #000) 5deg 10deg);
  background-size: 100% 100%, 100% 100%; box-shadow: 0 0 0 4px color-mix(in oklab, var(--accent) 60%, #fff) inset; text-align: center; }
.c-seal small { display: block; font-size: .8em; letter-spacing: .14em; text-transform: uppercase; color: #555; }
.c-seal b { font-family: var(--serif); font-weight: 400; font-size: 3.6em; line-height: 1; }
.c-lock { display: flex; align-items: center; gap: 6px; font-size: .95em; color: #555; margin-top: 2%; }
.c-lock svg { width: 1.2em; height: 1.2em; color: #1a1a1a; }
.teaser { text-align: center; }
.done-badge { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px; background: color-mix(in oklab, var(--good) 14%, transparent); color: var(--good); font-size: 13px; font-weight: 600; margin-bottom: 16px; }
.reveal { font-family: var(--serif); font-size: clamp(42px, 8vw, 70px); line-height: .98; margin: 8px 0 10px; letter-spacing: -0.02em; animation: rise .8s var(--ease) both; }
.reveal em { color: var(--accent-text); }
@keyframes rise { from { opacity: 0; transform: translateY(18px); filter: blur(8px); } }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin: 22px 0; }
.fact { text-align: left; padding: 14px 16px; border-radius: var(--r-sm); background: var(--surface); border: 1px solid var(--line); }
.fact .k { font-size: 12px; color: var(--faint); text-transform: uppercase; letter-spacing: .08em; font-weight: 600; }
.fact .v { font-size: 16px; font-weight: 600; margin-top: 3px; }
.cert-mini { position: relative; margin: 18px auto 26px; max-width: 360px; aspect-ratio: 1.414; border-radius: 10px; background: #f7f3ea; color: #1a1a1a; padding: 7% 8%; text-align: center;
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .9); transform: rotate(-1.2deg); display: flex; flex-direction: column; justify-content: center; }
.cert-mini::before { content: ''; position: absolute; inset: 10px; border: 1px solid #1a1a1a; border-radius: 4px; }
.cert-mini::after { content: ''; position: absolute; left: 14px; right: 14px; top: 14px; height: 4px; background: var(--accent); filter: saturate(.8) brightness(.8); }
.cert-mini .t1 { font-size: 9px; letter-spacing: .3em; font-weight: 600; }
.cert-mini .t2 { font-family: var(--serif); font-size: clamp(18px, 4vw, 24px); margin-top: 4px; }
.cert-mini .t3 { font-size: 10px; color: #666; margin-top: 8px; }
.cert-mini .t4 { font-family: var(--serif); font-size: clamp(24px, 6vw, 36px); margin-top: 2px; word-break: break-word; line-height: 1.05; }
.cert-mini .t5 { margin: 10px auto 0; font-weight: 600; font-size: 13px; padding: 4px 10px; border-radius: 6px; background: #e8e2d4; color: transparent; text-shadow: 0 0 8px rgba(0, 0, 0, .6); user-select: none; }
.locked { list-style: none; padding: 0; margin: 10px auto 24px; max-width: 420px; text-align: left; }
.locked li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 15.5px; }
.locked li:last-child { border-bottom: 0; }
.locked li svg { width: 16px; height: 16px; flex: none; color: var(--accent-text); }
.paybox { border-radius: var(--r-lg); padding: 22px; background: linear-gradient(160deg, var(--glass-1), var(--glass-2)); box-shadow: var(--shadow); border: 1px solid var(--line-2); }
.paybox .price { font-family: var(--serif); font-size: 56px; line-height: 1; }
.paybox .locked { margin: 0 auto 20px; }
.facts.n2 { grid-template-columns: 1fr 1fr; }
.facts.n3 { grid-template-columns: repeat(3, 1fr); }
.paybar { position: fixed; left: 12px; right: 12px; bottom: max(12px, env(safe-area-inset-bottom)); z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 10px 10px 20px; border-radius: 999px; background: color-mix(in oklab, var(--bg) 78%, transparent); border: 1px solid var(--line-2);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); transform: translateY(160%); transition: transform .45s var(--spring); max-width: 560px; margin: 0 auto; }
.paybar.show { transform: none; }
.paybar .pb-price { font-family: var(--serif); font-size: 26px; line-height: 1; }
.paybar .pb-sub { font-size: 12px; color: var(--muted); }
.paybar .btn { --h: 50px; padding: 0 22px; }
.paybox .per { color: var(--muted); font-size: 14px; margin: 6px 0 18px; }
.trust { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 16px; margin-top: 16px; font-size: 13px; color: var(--muted); }
.trust span { display: inline-flex; align-items: center; gap: 6px; }
.trust svg { width: 14px; height: 14px; color: var(--good); }
.fineprint { font-size: 12px; color: var(--faint); margin-top: 14px; line-height: 1.5; }
.fineprint a { color: var(--muted); }
.err { color: var(--bad); font-size: 14px; margin-top: 12px; min-height: 1em; }

.paybox .price .was { font-size: .5em; color: var(--muted); text-decoration: line-through; margin-right: 12px; vertical-align: middle; }
.buyer-badge { display: inline-block; margin-bottom: 12px; padding: 6px 12px; border-radius: 99px; background: color-mix(in oklab, var(--good) 15%, transparent); color: var(--good); font-size: 13px; font-weight: 600; }

/* Upsell + share kit (result page) */
.upsell .segs { display: flex; gap: 6px; margin: 6px 0 18px; }
.upsell .segs i { flex: 1; height: 8px; border-radius: 99px; background: var(--surface-2); }
.upsell .segs i.on { background: linear-gradient(90deg, var(--accent-2), var(--accent)); box-shadow: 0 0 14px var(--accent); }
.up-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 18px; }
.up-card { --c: var(--accent); position: relative; display: flex; flex-direction: column; gap: 10px; padding: 22px; border-radius: var(--r-md); border: 1px solid var(--line-2); text-decoration: none;
  background: linear-gradient(160deg, color-mix(in oklab, var(--c) 16%, transparent), transparent 70%); transition: transform .4s var(--spring), border-color .3s; }
.up-card:hover { transform: translateY(-4px); border-color: var(--c); }
.up-card .t { font-family: var(--serif); font-size: 34px; line-height: 1; }
.up-card .h { color: var(--text); font-size: 16px; line-height: 1.45; }
.up-card .m { color: var(--muted); font-size: 13.5px; }
.up-card .pr { font-size: 14px; } .up-card .pr s { color: var(--faint); margin-left: 6px; }
.up-card .go { margin-top: auto; align-self: flex-start; display: inline-flex; align-items: center; gap: 8px; padding: 12px 18px; border-radius: 99px; background: var(--c); color: #0a0a0a; font-weight: 600; font-size: 15px; }
.tabs { display: flex; flex-wrap: wrap; gap: 8px; padding-bottom: 4px; margin: 6px 0 18px; }
.tabs button .ti { display: inline-grid; place-items: center; width: 18px; height: 18px; }
.tabs button .ti svg, .tabs button .ti img { width: 18px; height: 18px; }
.tabs button { display: inline-flex; align-items: center; gap: 8px; flex: none; padding: 10px 14px; border-radius: 99px; border: 1px solid var(--line-2); background: var(--surface); color: var(--muted); font-size: 14px; cursor: pointer; }
.tabs button[aria-selected="true"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 600; }
.share-body { display: grid; grid-template-columns: 220px 1fr; gap: 22px; align-items: start; }
.share-body > div:only-child { grid-column: 1 / -1; }
.share-body .asset img, .share-body .asset video { width: 100%; border-radius: 14px; border: 1px solid var(--line); background: #000; }
.share-body textarea { width: 100%; min-height: 150px; padding: 14px; border-radius: 14px; border: 1px solid var(--line-2); background: var(--surface); color: var(--text); font: 15px/1.5 var(--sans); resize: vertical; }
.share-body .row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.share-body .row .btn { --h: 46px; font-size: 14.5px; padding: 0 18px; }
.share-tip { font-size: 13.5px; color: var(--muted); margin: 0 0 10px; }
@media (max-width: 640px) { .up-cards { grid-template-columns: 1fr; } .share-body { grid-template-columns: 1fr; } .share-body .asset { max-width: 240px; } }

/* ---------- Sections ---------- */
section.block { padding: clamp(60px, 9vw, 120px) 0; }
.sec-head { max-width: 640px; margin-bottom: 44px; }
.sec-head p { color: var(--muted); font-size: 18px; margin: 14px 0 0; }
.bento { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; }
.tile { position: relative; overflow: hidden; border-radius: var(--r-lg); padding: 26px; background: var(--surface); border: 1px solid var(--line); min-height: 210px; display: flex; flex-direction: column; justify-content: flex-end; transition: border-color .3s, transform .4s var(--ease); }
.tile:hover { border-color: var(--line-2); }
.tile p { color: var(--muted); margin: 0; font-size: 15px; }
.tile .art { position: relative; flex: 1; min-height: 110px; margin: -6px -6px 20px; display: grid; place-items: center; }
.span-2 { grid-column: span 2; } .span-3 { grid-column: span 3; } .span-4 { grid-column: span 4; } .span-6 { grid-column: span 6; }
.big-num { font-family: var(--serif); font-size: 92px; line-height: 1; color: var(--accent-text); }
.bars { display: grid; gap: 8px; width: 70%; }
.bars div { height: 10px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.bars div span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--accent-2), var(--accent)); }

.steps-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; counter-reset: s; }
.step { padding: 26px; border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--surface); }
.step::before { counter-increment: s; content: '0' counter(s); font-family: var(--serif); font-size: 40px; color: var(--accent-text); display: block; margin-bottom: 18px; line-height: 1; }
.step p { color: var(--muted); margin: 0; font-size: 15px; }

.faq { max-width: 760px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; padding: 22px 40px 22px 0; font-size: 18px; font-weight: 500; position: relative; letter-spacing: -0.015em; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; position: absolute; right: 4px; top: 50%; transform: translateY(-50%); font-size: 26px; font-weight: 300; color: var(--muted); transition: transform .3s var(--ease); }
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq details p { color: var(--muted); margin: 0 0 22px; max-width: 64ch; }

.final { text-align: center; padding: clamp(70px, 10vw, 130px) 0; }
.final .display { max-width: 14ch; margin: 0 auto; }

/* ---------- Footer ---------- */
footer.site { border-top: 1px solid var(--line); padding: 40px 0 calc(40px + env(safe-area-inset-bottom)); color: var(--muted); font-size: 13.5px; }
footer.site .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 18px; }
footer.site nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
footer.site a { text-decoration: none; }
footer.site a:hover { color: var(--text); }
footer.site .disc { flex-basis: 100%; color: var(--faint); font-size: 12.5px; max-width: 80ch; }

/* ---------- Sticky mobile CTA ---------- */
.sticky-cta { position: fixed; left: 12px; right: 12px; bottom: max(12px, env(safe-area-inset-bottom)); z-index: 40; display: none; padding: 10px; border-radius: 999px;
  background: color-mix(in oklab, var(--bg) 70%, transparent); border: 1px solid var(--line-2); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  transform: translateY(140%); transition: transform .45s var(--spring); }
.sticky-cta.show { transform: none; }
.sticky-cta .btn { width: 100%; --h: 52px; }

/* ---------- Hub ---------- */
.hub-hero { text-align: center; padding: clamp(50px, 9vw, 120px) 0 40px; }
.hub-hero .display { max-width: 13ch; margin: 18px auto 0; }
.hub-hero .lead { margin: 22px auto 0; text-align: center; }
.cards3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; padding-bottom: 40px; }
.pcard { --accent: var(--c); position: relative; overflow: hidden; border-radius: var(--r-lg); padding: 28px; min-height: 420px; display: flex; flex-direction: column; text-decoration: none;
  border: 1px solid var(--line); background: linear-gradient(170deg, color-mix(in oklab, var(--c) 14%, transparent), var(--glass-2) 55%); transition: transform .5s var(--spring), border-color .3s; }
.pcard:hover { transform: translateY(-6px); border-color: color-mix(in oklab, var(--c) 50%, transparent); }
.pcard .glyph { width: 76px; height: 76px; border-radius: 22px; display: grid; place-items: center; background: color-mix(in oklab, var(--c) 18%, transparent); color: var(--c); margin-bottom: auto; }
.pcard .glyph svg { width: 40px; height: 40px; }
.pcard h2 { font-family: var(--serif); font-weight: 400; font-size: 44px; line-height: 1; margin: 30px 0 10px; letter-spacing: -0.02em; }
.pcard p { color: var(--muted); margin: 0 0 22px; }
.pcard .meta { display: flex; justify-content: space-between; align-items: center; font-size: 14px; color: var(--muted); padding-top: 18px; border-top: 1px solid var(--line); }
.pcard .go { color: var(--c); font-weight: 600; display: inline-flex; gap: 6px; align-items: center; }

/* ---------- Result page ---------- */
.result-hero { text-align: center; padding: 48px 0 20px; }
.score-big { font-family: var(--serif); font-size: clamp(110px, 22vw, 200px); line-height: .9; color: var(--accent-text); letter-spacing: -0.04em; }
.panel { border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--surface); padding: clamp(20px, 3.5vw, 32px); margin: 16px 0; }
.panel h2 { font-family: var(--serif); font-weight: 400; font-size: 34px; margin: 0 0 16px; letter-spacing: -0.02em; }
.meter { margin: 18px 0; }
.meter .row { display: flex; justify-content: space-between; font-size: 15px; margin-bottom: 7px; gap: 12px; }
.meter .row b { font-weight: 600; }
.meter .track { height: 10px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.meter .fill { height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--accent-2), var(--accent)); width: 0; transition: width 1.2s var(--ease); }
.meter p { color: var(--muted); font-size: 15px; margin: 10px 0 0; }
.review-item { padding: 18px 0; border-bottom: 1px solid var(--line); }
.review-item:last-child { border-bottom: 0; }
.review-item .rq { font-weight: 500; margin-bottom: 6px; }
.review-item .ra { font-size: 14.5px; color: var(--muted); }
.review-item .ok { color: var(--good); } .review-item .no { color: var(--bad); }
.review-item .why { margin-top: 8px; font-size: 14.5px; padding: 10px 14px; border-radius: 10px; background: var(--surface); border-left: 2px solid var(--accent); }
.mini-grid { display: grid; grid-template-columns: repeat(3, 34px); gap: 4px; margin: 8px 0; }
.mini-grid .cell { width: 34px; height: 34px; border-radius: 6px; background: var(--surface); border: 1px solid var(--line); display: grid; place-items: center; }
.mini-grid .cell svg { width: 70%; }
.mini-opts { display: flex; gap: 6px; margin: 4px 0 8px; }
.mini-opts .mo { position: relative; width: 44px; height: 44px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); display: grid; place-items: center; }
.mini-opts .mo svg { width: 62%; }
.mini-opts .mo span { position: absolute; top: 1px; left: 4px; font-size: 9px; color: var(--muted); }
.mini-opts .mo.right { border-color: var(--good); box-shadow: 0 0 0 1px var(--good); }
.mini-opts .mo.wrong { border-color: var(--bad); box-shadow: 0 0 0 1px var(--bad); }
.actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin: 26px 0 10px; }
.curve { width: 100%; height: auto; margin: 10px 0 0; }
.pill-list { display: flex; flex-wrap: wrap; gap: 8px; }
.pill-list span { padding: 8px 14px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); font-size: 14.5px; }
.xsell { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.xsell a { padding: 20px; border-radius: var(--r-md); border: 1px solid var(--line); text-decoration: none; background: var(--surface); transition: border-color .2s; }
.xsell a:hover { border-color: var(--line-2); }
.xsell b { display: block; font-size: 17px; margin-bottom: 4px; }
.center-msg { text-align: center; padding: 120px 0; }
.center-msg .orb { width: 80px; height: 80px; }

/* ---------- Legal pages ---------- */
.legal { width: min(100% - 40px, 760px); margin: 0 auto; padding: 50px 0 80px; }
.legal h1 { font-family: var(--serif); font-weight: 400; font-size: clamp(40px, 6vw, 60px); letter-spacing: -0.02em; margin: 0 0 6px; line-height: 1; }
.legal h2 { font-size: 20px; margin: 38px 0 10px; letter-spacing: -0.015em; }
.legal p, .legal li, .legal td { color: var(--body, #cfccd4); }
.legal ul { padding-left: 20px; }
.legal li { margin: 6px 0; }
.legal .updated { color: var(--faint); font-size: 14px; margin-bottom: 30px; }
.legal table { width: 100%; border-collapse: collapse; font-size: 14.5px; margin: 12px 0; }
.legal td, .legal th { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.legal th { color: var(--muted); font-weight: 600; }
body.mock .legal { text-align: center; padding-top: 120px; }

/* ---------- Reveal on scroll ---------- */
.rv { opacity: 0; transform: translateY(24px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.rv.in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-copy { text-align: left; }
  .bento { grid-template-columns: 1fr 1fr; }
  .span-2, .span-3, .span-4 { grid-column: span 1; } .span-6 { grid-column: span 2; }
  .steps-row, .cards3 { grid-template-columns: 1fr; }
  .pcard { min-height: 340px; }
  .sticky-cta { display: block; }
}
@media (max-width: 560px) {
  .wrap { width: calc(100% - 32px); }
  /* Phone header: logo + theme button on top, the test switcher full width underneath. Scrolls away to save space. */
  .nav { position: relative; }
  .nav .wrap { flex-wrap: wrap; height: auto; padding: 10px 0 12px; row-gap: 10px; }
  .nav .mode-toggle { order: 2; }
  .nav-links { order: 3; width: 100%; font-size: 14px; }
  .nav-links a { flex: 1; padding: 9px 8px; }
  .hero { padding-top: 26px; }
  .hero-card { padding: 20px; border-radius: 24px; }
  .bento { grid-template-columns: 1fr; }
  .span-6 { grid-column: span 1; }
  .facts.n3 .fact { padding: 12px; } .facts.n3 .fact .v { font-size: 14.5px; } .facts.n3 .fact .k { font-size: 10.5px; }
  .opts.four-visual { grid-template-columns: repeat(2, 1fr); max-width: 300px; margin: 0 auto; }
  .xsell { grid-template-columns: 1fr; }
  .nav-meta .hide-sm { display: none; }
  .btn-lg { --h: 58px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .rv { opacity: 1; transform: none; }
}
.stage-top .mode-toggle { width: 44px; height: 44px; flex: none; }
@media (max-width: 380px) { .stage-top .mode-toggle { display: none; } }

/* ---------- Reviews ---------- */
.stars { color: #f5b301; letter-spacing: 2px; } .stars i { color: var(--line-2); font-style: normal; }
.rev-top { display: flex; flex-wrap: wrap; gap: 30px; align-items: center; margin-bottom: 26px; }
.rev-avg { display: grid; gap: 4px; } .rev-avg b { font-family: var(--serif); font-weight: 400; font-size: 64px; line-height: 1; } .rev-avg span:last-child { color: var(--muted); font-size: 14px; }
.rev-dist { flex: 1; min-width: 220px; max-width: 360px; display: grid; gap: 6px; font-size: 13px; color: var(--muted); }
.rev-dist div { display: grid; grid-template-columns: 30px 1fr 30px; gap: 8px; align-items: center; }
.rev-dist i { height: 6px; border-radius: 99px; background: var(--surface-2); overflow: hidden; } .rev-dist em { display: block; height: 100%; background: #f5b301; }
.rev-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.rev-card { margin: 0; padding: 22px; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--surface); display: flex; flex-direction: column; gap: 10px; }
.rev-card blockquote { margin: 0; font-size: 15.5px; line-height: 1.5; }
.rev-card figcaption { margin-top: auto; font-size: 13px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; }
.rev-card .vb { padding: 2px 8px; border-radius: 99px; background: color-mix(in oklab, var(--good) 15%, transparent); color: var(--good); font-size: 11.5px; font-weight: 600; }
.rate { display: flex; gap: 6px; margin: 4px 0 14px; }
.rate button { width: 46px; height: 46px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--surface); font-size: 22px; color: var(--line-2); cursor: pointer; transition: transform .2s var(--spring), color .2s; }
.rate button.on { color: #f5b301; border-color: #f5b301; } .rate button:active { transform: scale(.9); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--muted); margin: 12px 0; cursor: pointer; } .check input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--accent); flex: none; }
@media (max-width: 900px) { .rev-grid { grid-template-columns: 1fr; } }

/* ---------- Personality: this-or-that + trait tags ---------- */
.picks { display: grid; gap: 10px; }
.picks.n2 { grid-template-columns: 1fr 1fr; } .picks.n3 { grid-template-columns: 1fr 1fr 1fr; }
.opt.pick { flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 10px; min-height: 140px; padding: 18px 12px; font-size: 15.5px; }
.opt.pick .pe { font-size: 40px; line-height: 1; transition: transform .35s var(--spring); }
.opt.pick:hover .pe, .opt.pick.selected .pe { transform: scale(1.15) rotate(-6deg); }
.opt.pick .tick { top: 14px; right: 14px; margin-top: 0; }
@media (max-width: 560px) { .picks.n3 { grid-template-columns: 1fr; } .picks.n3 .opt.pick { flex-direction: row; min-height: 64px; justify-content: flex-start; text-align: left; } .picks.n3 .opt.pick .pe { font-size: 30px; } }
.tagrow { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.tag { display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 99px; border: 1px solid var(--line-2); background: var(--surface); font-weight: 600; font-size: 15px; animation: tagin .5s var(--spring) both; }
.tag b { font-size: 18px; font-weight: 400; }
@keyframes tagin { from { opacity: 0; transform: translateY(10px) scale(.9); } }
.type4 { margin: 18px 0 0; font-size: 16px; } .type4 b { font-family: var(--serif); font-weight: 400; font-size: 30px; color: var(--accent-text); letter-spacing: .04em; margin-left: 6px; }
.type4 span { color: var(--muted); }
.tagcards { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tagcard { padding: 18px; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--surface); }
.tagcard h3 { display: flex; align-items: center; gap: 10px; font-size: 18px; } .tagcard h3 b { font-size: 24px; font-weight: 400; }
.tagcard p { margin: 6px 0 0; color: var(--text); font-size: 15px; } .tagcard .why { color: var(--muted); font-size: 13.5px; }
.letters { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.letters div { padding: 16px; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--surface); }
.letters b { display: block; font-family: var(--serif); font-weight: 400; font-size: 44px; line-height: 1; color: var(--accent-text); }
.letters i { display: block; font-style: normal; font-weight: 600; margin: 6px 0 4px; } .letters span { color: var(--muted); font-size: 14px; }
@media (max-width: 640px) { .tagcards { grid-template-columns: 1fr; } .letters { grid-template-columns: 1fr 1fr; } }

/* ---------- Paywall + book picks (hybrid) ---------- */
.paywall { text-align: center; }
.paywall .price { font-family: var(--serif); font-size: clamp(44px, 9vw, 60px); line-height: 1; }
.paywall .price .was { margin-right: 10px; }
.paywall .per { color: var(--muted); font-size: 14px; margin: 6px 0 14px; }
.paywall .trust { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 18px; margin: 16px 0 6px; font-size: 13.5px; color: var(--muted); }
.paywall .trust span { display: inline-flex; align-items: center; gap: 6px; }
.paywall .trust svg { width: 16px; height: 16px; color: var(--good); }
.paywall .fineprint { font-size: 12.5px; color: var(--faint); max-width: 520px; margin: 10px auto 0; }
.paywall .err { color: var(--bad, #ff6b6b); font-size: 14px; min-height: 1em; margin-top: 8px; }
.book-grid { display: grid; gap: 14px; margin-top: 16px; }
.book { display: flex; flex-direction: column; gap: 10px; padding: 18px; border-radius: var(--r-sm); background: var(--surface); border: 1px solid var(--line); }
.book .bhead { display: grid; grid-template-columns: 72px 1fr; gap: 16px; align-items: center; }
.book .cover { aspect-ratio: .66; border-radius: 4px 8px 8px 4px; padding: 8px 7px; display: flex; flex-direction: column; justify-content: space-between;
  color: #fff; font-family: var(--serif); font-size: 11.5px; line-height: 1.1; box-shadow: inset 5px 0 0 rgba(0,0,0,.18), 0 14px 30px -14px rgba(0,0,0,.7); overflow: hidden; }
.book .cover i { font-family: var(--sans, inherit); font-style: normal; font-size: 9px; opacity: .85; letter-spacing: .04em; }
.book .cover.c0 { background: linear-gradient(160deg, color-mix(in oklab, var(--accent) 70%, #111), #1b1b2a); }
.book .cover.c1 { background: linear-gradient(160deg, #3b4a8f, #14182b); }
.book .cover.c2 { background: linear-gradient(160deg, #8a4b3a, #2a1612); }
.book .skill { font-size: 11.5px; text-transform: uppercase; letter-spacing: .08em; font-weight: 700; color: var(--accent-text); }
.book h3 { margin: 4px 0 0; font-size: 18px; line-height: 1.2; }
.book .by { margin: 3px 0 0; color: var(--muted); font-size: 14px; }
.book .why { margin: 4px 0 0; font-size: 15px; font-weight: 500; }
.book .blurb { margin: 0; font-size: 14.5px; color: var(--muted); }
.book .row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 4px; }
.book .row .btn { --h: 42px; padding: 0 10px; font-size: 14px; justify-content: center; }
@media (min-width: 700px) { .book-grid { grid-template-columns: repeat(3, 1fr); } .book .row { grid-template-columns: 1fr; } .book .blurb { flex: 1; } }
.paywall .price .was { font-size: .5em; color: var(--muted); text-decoration: line-through; margin-right: 12px; vertical-align: middle; }

/* Card text colours readable on the light theme */
html[data-mode="light"] .pcard .glyph, html[data-mode="light"] .pcard .go { color: var(--ct); }

/* ---------- Result page loading: no jumps ---------- */
#result { min-height: 72vh; }
.loading-ph { min-height: 72vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: var(--muted); font-size: 15px; animation: phin .4s ease .15s both; }
.loading-ph .orb { width: 56px; height: 56px; margin: 0 0 14px; }
@keyframes phin { from { opacity: 0; } }
#result.entering > * { animation: enterup .55s var(--ease) both; }
#result.entering > *:nth-child(2) { animation-delay: .08s; }
#result.entering > *:nth-child(3) { animation-delay: .16s; }
#result.entering > *:nth-child(n+4) { animation-delay: .24s; }
@keyframes enterup { from { opacity: 0; transform: translateY(14px); } }
@media (prefers-reduced-motion: reduce) { #result.entering > *, .loading-ph { animation: none; } }

/* ---------- Phone polish ---------- */
.paybar .btn { white-space: nowrap; }
@media (max-width: 900px) {
  .tile { min-height: 0; }
  .tile .art { min-height: 120px; }
  .pcard { min-height: 0; } .pcard .glyph { margin-bottom: 26px; } .pcard h2 { margin-top: 0; }
}
.tile .art .tagrow { width: 100%; max-width: 100% !important; justify-content: center; gap: 6px; }
.tile .art .tag { padding: 8px 12px; font-size: 14px; }
@media (max-width: 560px) {
  section.block { padding: 56px 0; }
  .final { padding: 64px 0; }
  .tabs button { padding: 9px 12px; font-size: 13.5px; }
}
.paywall [data-pay] .label { white-space: nowrap; }
@media (max-width: 380px) { .paywall [data-pay] { font-size: 16px; padding: 0 18px; } .cert2 { transform: none; } }

/* ---------- Email capture + consent ---------- */
.emailbox { margin-top: 12px; text-align: left; }
.emailbox .hint { margin: 6px 4px 0; }
.consent { display: flex; gap: 10px; align-items: flex-start; margin: 12px 2px 0; font-size: 14px; line-height: 1.45; color: var(--muted); cursor: pointer; text-align: left; }
.consent input { width: 18px; height: 18px; margin: 2px 0 0; flex: none; accent-color: var(--accent); }
.consent[hidden] { display: none; }
.emailbox .err, .mailbox .err { color: var(--bad, #ff6b6b); font-size: 14px; min-height: 1em; margin: 6px 4px 0; }
.mailrow { display: flex; gap: 10px; }
.mailrow .field { flex: 1; min-width: 0; height: 54px; }
.mailrow .btn { flex: none; }
.mailnote { border-color: color-mix(in oklab, var(--good) 40%, var(--line)); background: color-mix(in oklab, var(--good) 8%, var(--surface)); }
.mailnote p { margin: 6px 0 0; }
@media (max-width: 480px) { .mailrow { flex-direction: column; } .mailrow .btn { width: 100%; justify-content: center; } }

/* ---------- Account pages ---------- */
.nav .acct { order: 0; text-decoration: none; }
.nav .acct svg { width: 18px; height: 18px; }
@media (max-width: 560px) { .nav .acct { order: 1; } }
.acct-wrap { max-width: 560px; margin: 0 auto; padding: 56px 0 80px; }
.acct-wrap h1 { font-family: var(--serif); font-weight: 400; font-size: clamp(40px, 7vw, 60px); line-height: 1; margin: 0 0 12px; letter-spacing: -0.02em; }
.acct-wrap .panel + .panel { margin-top: 14px; }
.acct-wrap form .field { height: 54px; margin-top: 10px; }
.acct-wrap .err { color: var(--bad, #ff6b6b); font-size: 14px; min-height: 1em; margin-top: 8px; }
.acct-wrap .ok { color: var(--good); font-size: 14.5px; margin-top: 8px; }
.res-list { display: grid; gap: 10px; margin-top: 12px; }
.res-item { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--surface); text-decoration: none; color: var(--text); }
.res-item:hover { border-color: var(--line-2); }
.res-item i { width: 10px; height: 10px; border-radius: 50%; background: var(--c); flex: none; }
.res-item .t { flex: 1; min-width: 0; } .res-item .t b { display: block; } .res-item .t span { color: var(--muted); font-size: 14px; }
.res-item .badge { font-size: 12px; padding: 3px 9px; border-radius: 99px; border: 1px solid var(--line-2); color: var(--muted); white-space: nowrap; }
.res-item .badge.paid { color: var(--good); border-color: color-mix(in oklab, var(--good) 40%, transparent); }
.toggle-row { display: flex; gap: 12px; align-items: flex-start; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--accent-text); font: inherit; cursor: pointer; text-decoration: underline; }
.ideas-label { margin: 12px 0 0; }

/* ---------- Result: one compact email row under the result ---------- */
.mailrow2 { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px 14px; max-width: 620px; margin: 6px auto 22px;
  padding: 12px 14px; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--surface); }
.mailrow2 .mi { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: color-mix(in oklab, var(--accent) 16%, transparent); color: var(--accent-text); }
.mailrow2 .mi svg { width: 18px; height: 18px; }
.mailrow2 .mt { min-width: 0; font-size: 14.5px; line-height: 1.4; }
.mailrow2 .mt b { display: block; font-weight: 600; overflow-wrap: anywhere; }
.mailrow2 .mt span { display: block; color: var(--muted); font-size: 13.5px; margin-top: 2px; }
.mailrow2 > .btn { --h: 40px; padding: 0 16px; font-size: 14px; white-space: nowrap; }
.mailrow2 form { grid-column: 1 / -1; }
.mailrow2.sent { border-color: color-mix(in oklab, var(--good) 40%, var(--line)); background: color-mix(in oklab, var(--good) 7%, var(--surface)); }
.mailrow2.sent .mi { background: color-mix(in oklab, var(--good) 16%, transparent); color: var(--good); }
.mailrow2 .err { color: var(--bad, #ff6b6b); font-size: 14px; min-height: 1em; margin: 6px 2px 0; }
@media (max-width: 520px) { .mailrow2 { grid-template-columns: auto 1fr; } .mailrow2 > .btn { grid-column: 1 / -1; width: 100%; justify-content: center; } }
.mailrow2 [hidden] { display: none !important; }

/* ---------- Videos and share previews keep their real shape (even while loading) ---------- */
#result video { aspect-ratio: 9 / 16; object-fit: cover; background: #000; }
.share-body .asset.tall video, .share-body .asset.tall img { aspect-ratio: 9 / 16; object-fit: cover; }
.share-body .asset.sq img { aspect-ratio: 1; object-fit: cover; }
.share-body .asset { max-width: 240px; }
.vid-error { aspect-ratio: 9 / 16; width: 100%; max-width: 240px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 16px;
  border-radius: 14px; border: 1px dashed var(--line-2); background: var(--surface); text-align: center; color: var(--muted); font-size: 14px; }
.vid-error p { margin: 0; }
.book .cover-img { width: 100%; aspect-ratio: .66; object-fit: cover; border-radius: 4px 8px 8px 4px; box-shadow: 0 14px 30px -14px rgba(0,0,0,.7); background: var(--surface-2); }

/* ---------- Account: purchases ---------- */
.buy { padding: 14px 16px; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--surface); }
.buy .res-item i { width: 10px; height: 10px; border-radius: 50%; background: var(--c); flex: none; }
.buy-actions { margin-top: 10px; gap: 8px; flex-wrap: wrap; align-items: center; }
.buy-actions .btn { --h: 38px; padding: 0 14px; font-size: 14px; }
.res-item .badge.warn { color: var(--warn, #b7791f); border-color: color-mix(in oklab, var(--warn, #b7791f) 40%, transparent); }
.paywall .testmode { margin: 12px auto 0; max-width: 520px; padding: 10px 14px; border-radius: 12px; border: 1px dashed var(--warn, #b7791f); color: var(--text); font-size: 13.5px; }

/* ---------- Contact form ---------- */
.contact-card { margin: 22px 0 8px; }
.contact-form label { display: block; font-weight: 600; font-size: 14.5px; margin: 14px 0 6px; color: var(--text); }
.contact-form .field { width: 100%; }
.contact-form select.field { height: 52px; padding: 0 14px; }
.contact-form .btn { margin-top: 16px; }
.contact-form .err { color: var(--bad, #ff6b6b); font-size: 14px; min-height: 1em; margin-top: 8px; }
.contact-form.sent { border-color: color-mix(in oklab, var(--good) 40%, var(--line)); }
.cf-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
@media (max-width: 560px) { .cf-row { grid-template-columns: 1fr; } }

/* ---------- Sale (real end time from Admin → Prices & sales) ---------- */
:root { --hot: #ff4d3d; --hot2: #ff9a3d; }
.paywall.on-sale { border-color: color-mix(in oklab, var(--hot) 55%, var(--line)); box-shadow: 0 0 0 1px color-mix(in oklab, var(--hot) 30%, transparent), 0 24px 70px -30px color-mix(in oklab, var(--hot) 60%, transparent); }
.sale-hero { text-align: center; margin: 6px 0 18px; }
.sale-tag { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 99px; font-weight: 800; letter-spacing: .06em; font-size: 14px; color: #fff;
  background: linear-gradient(90deg, var(--hot), var(--hot2)); box-shadow: 0 6px 22px -8px var(--hot); animation: sale-glow 2.4s ease-in-out infinite; }
@keyframes sale-glow { 50% { box-shadow: 0 6px 30px -4px var(--hot); transform: scale(1.03); } }
.sale-ends { margin: 14px 0 8px; font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.cd { display: flex; justify-content: center; gap: 8px; }
.cd .cd-u { min-width: 66px; padding: 10px 6px 8px; border-radius: 14px; background: var(--bg-2, rgba(127,127,127,.08)); border: 1px solid color-mix(in oklab, var(--hot) 35%, var(--line)); display: grid; gap: 2px; }
.cd .cd-u b { font: 700 clamp(26px, 6vw, 38px)/1 var(--sans, inherit); font-variant-numeric: tabular-nums; color: var(--text); }
.cd .cd-u i { font-style: normal; font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.cd .cd-s b { color: var(--hot); }
.cd.cd-hot .cd-u { border-color: var(--hot); animation: cd-pulse 1s ease-in-out infinite; }
@keyframes cd-pulse { 50% { background: color-mix(in oklab, var(--hot) 14%, transparent); } }
.paywall.on-sale .price .was { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--hot); text-decoration-thickness: 2px; }
.paywall.on-sale .price .now { color: var(--hot); }
[data-mode="light"] .paywall.on-sale .price .now { color: #d42a1b; }
.save-pill { width: max-content; margin: 6px auto 4px; padding: 4px 12px; border-radius: 99px; font-weight: 700; font-size: 13.5px; color: var(--good); background: color-mix(in oklab, var(--good) 14%, transparent); }
.paywall.on-sale [data-pay] { background: linear-gradient(90deg, var(--hot), var(--hot2)); border-color: transparent; color: #fff; box-shadow: 0 10px 30px -10px var(--hot); }
.sale-fine { text-align: center; font-size: 13px; color: var(--muted); margin: 10px 0 0; }
.sale-over { text-align: center; color: var(--muted); font-size: 13px; margin: 0 0 4px; }
.paybar.sale { border-color: color-mix(in oklab, var(--hot) 50%, var(--line)); }
.paybar.sale .pb-price s { font-size: .6em; color: var(--muted); text-decoration-color: var(--hot); margin-right: 4px; }
.paybar .pb-sale { color: var(--hot); font-weight: 700; font-variant-numeric: tabular-nums; }
[data-mode="light"] .paybar .pb-sale { color: #d42a1b; }
.paybar.sale .btn { background: linear-gradient(90deg, var(--hot), var(--hot2)); border-color: transparent; color: #fff; }
@media (max-width: 420px) { .cd { gap: 6px; } .cd .cd-u { min-width: 58px; } }

.salebar { position: relative; z-index: 20; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px 12px; padding: 9px 44px; font-size: 14px; color: #fff; text-align: center;
  background: linear-gradient(90deg, #e1352a, #ff7a2f); transform: translateY(-100%); opacity: 0; transition: transform .35s ease, opacity .35s ease; }
.salebar.show { transform: none; opacity: 1; }
.salebar .sb-cd b { font-variant-numeric: tabular-nums; background: rgba(0,0,0,.22); padding: 2px 8px; border-radius: 6px; margin-left: 4px; }
.salebar .sb-cd { white-space: nowrap; }
@media (max-width: 560px) { .salebar { font-size: 13px; padding: 7px 38px 7px 12px; gap: 2px 8px; } .salebar .sb-free { display: none; } }
.salebar .sb-x { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); background: none; border: 0; color: #fff; font-size: 22px; line-height: 1; cursor: pointer; padding: 4px 8px; opacity: .8; }
@media (prefers-reduced-motion: reduce) { .sale-tag, .cd.cd-hot .cd-u { animation: none; } .salebar { transition: none; } }

/* ---------- Receipt & invoice page ---------- */
.acct-wrap .back { color: var(--muted); text-decoration: none; font-size: 14px; }
.acct-wrap .back:hover { color: var(--text); }
.od-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-bottom: 12px; margin-bottom: 6px; border-bottom: 1px solid var(--line); }
.od-head b { font-size: 18px; }
.od-row { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; color: var(--muted); }
.od-row b { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.od-row.od-total { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 12px; color: var(--text); font-weight: 700; }
.od-row.od-total b { font-size: 18px; font-weight: 800; }
.docs { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); margin: 14px 0; }
.docs .panel { margin: 0; }
.doc { display: grid; grid-template-columns: auto 1fr; gap: 12px 14px; align-items: start; }
.doc .doc-ic { font-size: 28px; line-height: 1; width: 48px; height: 48px; display: grid; place-items: center; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--line); }
.doc .doc-t { display: grid; gap: 2px; }
.doc .doc-t b { font-size: 17px; }
.doc .doc-t span { color: var(--muted); font-size: 13.5px; }
.doc .row { grid-column: 1 / -1; display: flex; gap: 8px; flex-wrap: wrap; }
.doc .row .btn { --h: 40px; padding: 0 16px; font-size: 14px; }
.acct-wrap .lbl { display: block; font-weight: 600; font-size: 13.5px; margin: 12px 0 6px; }
.acct-wrap .two { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.acct-wrap select.field { width: 100%; }
@media (max-width: 480px) { .acct-wrap .two { grid-template-columns: 1fr; } }
.acct-wrap [data-inv-form] .field { height: 50px; font-size: 16px; padding: 0 14px; }
.acct-wrap [data-inv-form] h2 { font-size: 22px; line-height: 1.25; }
.acct-wrap [data-inv-form] .row { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }

/* ---------- Review: sent state + sending spinner ---------- */
.btn.is-loading { opacity: .85; cursor: progress; }
.btn.is-loading .label::before { content: ""; display: inline-block; width: 14px; height: 14px; margin-right: 8px; vertical-align: -2px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spinr .7s linear infinite; }
.rv-sent { text-align: center; }
.rv-sent h2 { margin: 10px 0 14px; }
.rv-ok { width: 52px; height: 52px; margin: 0 auto; border-radius: 50%; display: grid; place-items: center; font-size: 24px; font-weight: 800; color: var(--good); background: color-mix(in oklab, var(--good) 16%, transparent); }
.rv-sent.pop .rv-ok { animation: rv-pop .45s cubic-bezier(.2,1.4,.4,1); }
@keyframes rv-pop { from { transform: scale(.3); opacity: 0; } }
.rv-card { max-width: 520px; margin: 0 auto; padding: 16px 18px; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--bg-2); text-align: left; }
.rv-card blockquote { margin: 8px 0 0; font-size: 16px; line-height: 1.5; }
.rv-card .rv-by { margin-top: 8px; color: var(--muted); font-size: 14px; }
.rv-stars { color: #f5b301; letter-spacing: 2px; font-size: 18px; } .rv-stars i { color: var(--line-2); font-style: normal; }
.rv-status { max-width: 520px; margin: 14px auto 10px; color: var(--muted); font-size: 14.5px; }
.rv-status b { color: var(--text); }
@media (prefers-reduced-motion: reduce) { .rv-sent.pop .rv-ok, .btn.is-loading .label::before { animation: none; } }
.nf-links { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }

/* ---------- Book library (drawn covers, /library pages, result-page book cards) ---------- */
.lb-cover { --h: 260; position: relative; aspect-ratio: 2 / 3; border-radius: 4px 10px 10px 4px; padding: 12% 11%; display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; color: #fff;
  background: linear-gradient(160deg, hsl(var(--h) 45% 34%), hsl(calc(var(--h) + 30) 40% 14%)); box-shadow: inset 6px 0 0 rgba(0,0,0,.18), 0 18px 40px -18px rgba(0,0,0,.7); }
.lb-cover::after { content: ""; position: absolute; inset: 7% 7%; border: 1px solid rgba(255,255,255,.22); border-radius: 2px 6px 6px 2px; pointer-events: none; }
.lb-cv-mark { font: 600 .5em/1.2 var(--sans, inherit); letter-spacing: .12em; text-transform: uppercase; opacity: .75; }
.lb-cv-title { font: 400 1.45em/1.05 var(--serif); letter-spacing: -.01em; }
.lb-cv-author { font: 500 .62em/1.3 var(--sans, inherit); opacity: .85; }
.lb-cover.sm { font-size: 11px; } .lb-cover.md { font-size: 13px; } .lb-cover.lg { font-size: clamp(16px, 2.4vw, 22px); }
.lb-cover-img { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 4px 10px 10px 4px; box-shadow: 0 18px 40px -18px rgba(0,0,0,.7); background: var(--surface-2); display: block; height: auto; }
.lb-badge { display: inline-block; padding: 3px 10px; border-radius: 99px; font-size: 12px; font-weight: 700; letter-spacing: .02em; vertical-align: middle; }
.lb-badge.free { color: var(--good); background: color-mix(in oklab, var(--good) 15%, transparent); }
.lb-badge.premium { color: #c98a00; background: color-mix(in oklab, #f5b301 16%, transparent); }
[data-mode="light"] .lb-badge.premium { color: #8a5a00; }

.lib { padding-bottom: 60px; }
.crumbs { font-size: 13.5px; color: var(--muted); margin: 22px 0 0; } .crumbs a { color: var(--muted); } .crumbs span { color: var(--text); }
.lb-intro { padding: clamp(30px, 6vw, 70px) 0 10px; max-width: 760px; }
.lb-intro .lead { max-width: 60ch; }
.lb-tests { display: flex; flex-wrap: wrap; gap: 10px; margin: 22px 0 14px; }
.lb-hero { display: grid; grid-template-columns: minmax(150px, 240px) 1fr; gap: clamp(20px, 4vw, 48px); align-items: start; padding: clamp(24px, 5vw, 56px) 0 10px; }
.lb-hero h1 { font-size: clamp(38px, 6vw, 68px); margin: 14px 0 0; }
.lb-meta { color: var(--muted); margin: 12px 0 0; }
.lb-hero .lead { max-width: 52ch; }
.lb-practise { display: inline-flex; flex-direction: column; gap: 2px; margin: 18px 0 0; padding: 10px 14px; border-left: 3px solid var(--accent); background: var(--surface); border-radius: 0 10px 10px 0; font-weight: 600; }
.lb-practise span { font-size: 11.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; }
.lb-dl { display: flex; flex-wrap: wrap; gap: 10px; margin: 22px 0 6px; }
.lb-included { margin-top: 20px; padding: 16px 18px; border-radius: var(--r-md); border: 1px solid color-mix(in oklab, #f5b301 40%, var(--line)); background: color-mix(in oklab, #f5b301 6%, transparent); }
.lb-included p { margin: 8px 0 12px; }
.lb-hook, .lb-cta-box { display: flex; flex-wrap: wrap; gap: 16px 28px; align-items: center; justify-content: space-between; margin: 34px 0; padding: 22px 24px; border-radius: var(--r-md);
  background: linear-gradient(120deg, color-mix(in oklab, var(--accent-2, #7b61ff) 18%, transparent), color-mix(in oklab, var(--accent, #7b61ff) 8%, transparent)); border: 1px solid var(--line-2); }
.lb-hook h2 { margin: 0 0 6px; font-size: 22px; } .lb-hook p, .lb-cta-box p { margin: 0; max-width: 60ch; }
.lb-sec { margin: 40px 0 0; } .lb-sec h2 { font-size: 24px; margin: 0 0 12px; } .lb-sec p { max-width: 70ch; line-height: 1.65; }
.lb-two { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.lb-ideas { padding-left: 1.2em; line-height: 1.6; } .lb-ideas li { margin: 6px 0; }
.lb-plan .lb-start { margin: 0 0 10px; }
.lb-plan ol { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.lb-plan li { padding: 14px 16px; border-radius: var(--r-sm); background: var(--surface); border: 1px solid var(--line); }
.lb-plan li p { margin: 6px 0 0; } .lb-plan li span { font-weight: 700; color: var(--accent-text); }
.lb-plan li.lb-lock { opacity: .75; border-style: dashed; }
.lb-value { margin: 44px 0 0; padding: clamp(20px, 3vw, 30px); border-radius: var(--r-md); border: 1px solid var(--line-2); background: var(--surface); }
.lb-value h2 { margin: 0 0 16px; font-size: 24px; }
.lb-value-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.lb-value h3 { margin: 10px 0 6px; font-size: 18px; } .lb-value ul { margin: 0; padding-left: 1.2em; line-height: 1.6; } .lb-value li { margin: 5px 0; }
.lb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.lb-card { display: grid; grid-template-columns: 74px 1fr; gap: 14px; align-items: start; padding: 14px; border-radius: var(--r-sm); background: var(--surface); border: 1px solid var(--line); color: var(--text); text-decoration: none; transition: border-color .2s, transform .2s; }
.lb-card:hover { border-color: var(--line-2); transform: translateY(-2px); }
.lb-card h3 { margin: 6px 0 0; font-size: 16px; line-height: 1.25; } .lb-card .by { margin: 3px 0 0; color: var(--muted); font-size: 13.5px; } .lb-skill { margin: 6px 0 0; font-size: 13px; color: var(--accent-text); font-weight: 600; }
.lb-fine { margin-top: 30px; color: var(--muted); } .lb-fine p { margin: 6px 0; }
@media (max-width: 760px) {
  .lb-hero { grid-template-columns: 110px 1fr; } .lb-hero h1 { font-size: 34px; } .lb-two, .lb-value-grid { grid-template-columns: 1fr; }
  .lb-hero-info .lead { font-size: 16px; }
  .lb-sticky { display: block; transform: none; } .lib { padding-bottom: 110px; }
}

/* Result page: "Your book to work on" + 9-week growth path */
.yb { margin-top: 22px; }
.yb-card { display: grid; grid-template-columns: 120px 1fr; grid-template-areas: "cv head" "cv body"; gap: 4px 20px; align-items: start; }
.yb-cv { grid-area: cv; } .yb-head { grid-area: head; } .yb-body { grid-area: body; }
.yb-card h3 { margin: 6px 0 0; font-size: 22px; line-height: 1.2; } .yb-card .by { color: var(--muted); margin: 4px 0 0; }
.yb-why { margin: 12px 0 0; font-weight: 500; } .yb-blurb { margin: 8px 0 0; color: var(--muted); }
.yb-btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; align-items: center; } .yb-btns .btn { --h: 44px; padding: 0 16px; font-size: 14.5px; }
.yb-free { font-size: 13px; color: var(--good); font-weight: 700; }
.yb details { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 12px; }
.yb summary { cursor: pointer; font-weight: 700; } .yb summary::marker { color: var(--accent-text); }
.yb-week { margin: 12px 0 0; padding: 12px 14px; border-radius: var(--r-sm); background: var(--surface); border: 1px solid var(--line); }
.yb-week h4 { margin: 0 0 6px; font-size: 14px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.yb-check { display: flex; gap: 10px; align-items: flex-start; margin: 6px 0; cursor: pointer; line-height: 1.45; }
.yb-check input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--accent); flex: none; }
.yb-check b { color: var(--accent-text); }
.yb-check input:checked + span { color: var(--muted); text-decoration: line-through; text-decoration-color: color-mix(in oklab, var(--muted) 60%, transparent); }
.gp-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; align-items: baseline; }
.gp-progress { font-weight: 700; color: var(--accent-text); }
.gp-bar { height: 8px; border-radius: 9px; background: var(--surface-2); overflow: hidden; margin: 10px 0 4px; } .gp-bar i { display: block; height: 100%; background: var(--accent); width: 0; transition: width .4s; }
.gp-list { display: grid; gap: 14px; margin-top: 14px; }
.gp-item { padding: 16px; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--surface); }
.gp-weeks { font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.gp-locked .gp-item { position: relative; }
.gp-locked .gp-lock { display: flex; gap: 8px; align-items: center; margin-top: 10px; font-size: 14px; color: var(--muted); }
.gp-locked .gp-lock svg { width: 16px; height: 16px; flex: none; }
.gp-cta { margin-top: 16px; display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.gp-note { font-size: 13px; color: var(--muted); margin: 12px 0 0; }
@media (max-width: 600px) { .yb-card { grid-template-columns: 76px 1fr; grid-template-areas: "cv head" "body body"; gap: 12px 14px; align-items: center; } .yb-card h3 { font-size: 19px; } .yb-body { margin-top: 4px; } }
.nav-links a[data-k="lib"] { --c: #f5b301; }
.lb-hub { display: grid; grid-template-columns: auto 1fr auto; gap: 6px 14px; align-items: center; padding: 18px 22px; border-radius: var(--r-md); border: 1px solid var(--line-2); background: var(--surface); color: var(--text); text-decoration: none; }
.lb-hub b { font-size: 18px; } .lb-hub span:not(.lb-badge):not(.go) { grid-column: 1 / -1; color: var(--muted); } .lb-hub .go { grid-column: 3; grid-row: 1; font-weight: 700; color: var(--accent-text); }
.lb-hub:hover { border-color: var(--accent); }
@media (max-width: 760px) { .lb-hub { grid-template-columns: auto 1fr; } .lb-hub .go { grid-column: 1 / -1; grid-row: auto; } }

/* ---------- Guides ---------- */
.guide article { max-width: 760px; }
.guide h1 { font-size: clamp(36px, 5.5vw, 60px); margin: 18px 0 0; }
.guide .g-meta { color: var(--muted); font-size: 14px; margin: 10px 0 0; }
.guide .g-answer { margin: 22px 0 8px; padding: 18px 20px; border-radius: var(--r-md); border-left: 4px solid var(--accent); background: var(--surface); }
.guide .g-answer p { margin: 6px 0 0; font-size: 17.5px; line-height: 1.6; }
.guide article h2 { font-size: 24px; margin: 34px 0 10px; }
.guide article p, .guide article li { line-height: 1.7; }
.guide table { border-collapse: collapse; width: 100%; margin: 10px 0; } .guide th, .guide td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.g-list { list-style: none; padding: 0; display: grid; gap: 10px; }
.g-list a { display: grid; gap: 4px; padding: 14px 16px; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--surface); color: var(--text); text-decoration: none; }
.g-list a:hover { border-color: var(--line-2); } .g-list span { color: var(--muted); font-size: 14.5px; }
