/* hhabits landing — tokens mirror frontend/src/styles.css */
:root {
  --bg: #f4f5f9; --surface: #ffffff; --surface-2: #f0f1f6; --line: #e3e5ee;
  --text: #16171d; --muted: #5f6372; --primary: #5b5bf0; --on-primary: #fff;
  --good: #1e8f50; --bad: #d63c31; --bad-soft: rgba(224,72,61,.08);
  --card-a: #fff3cf; --card-b: #e6c260; --card-t: #4e3b06;
  --shadow: 0 1px 2px rgba(20,22,40,.04), 0 8px 24px rgba(20,22,40,.06);
  --shadow-lg: 0 2px 6px rgba(20,22,40,.05), 0 30px 60px -20px rgba(40,40,110,.25);
  --tint: 13%;
  --glow-a: rgba(91,91,240,.22); --glow-b: rgba(230,194,96,.22); --glow-c: rgba(236,91,140,.14);
  --header: rgba(244,245,249,.72);
  --radius: 20px;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #171923; --surface: #212432; --surface-2: #2b2f40; --line: #363b4f;
  --text: #f2f3f8; --muted: #a6abbe; --primary: #8f8fff; --on-primary: #12131a;
  --good: #45d483; --bad: #ff6b5f; --bad-soft: rgba(255,107,95,.12);
  --card-a: #5a4512; --card-b: #e2b94c; --card-t: #ffe7a3;
  --shadow: 0 1px 0 rgba(255,255,255,.04) inset, 0 8px 28px rgba(0,0,0,.25);
  --shadow-lg: 0 1px 0 rgba(255,255,255,.05) inset, 0 40px 80px -20px rgba(0,0,0,.6);
  --tint: 22%;
  --glow-a: rgba(124,124,255,.30); --glow-b: rgba(226,185,76,.20); --glow-c: rgba(236,91,140,.18);
  --header: rgba(23,25,35,.7);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #171923; --surface: #212432; --surface-2: #2b2f40; --line: #363b4f;
    --text: #f2f3f8; --muted: #a6abbe; --primary: #8f8fff; --on-primary: #12131a;
    --good: #45d483; --bad: #ff6b5f; --bad-soft: rgba(255,107,95,.12);
    --card-a: #5a4512; --card-b: #e2b94c; --card-t: #ffe7a3;
    --shadow: 0 1px 0 rgba(255,255,255,.04) inset, 0 8px 28px rgba(0,0,0,.25);
    --shadow-lg: 0 1px 0 rgba(255,255,255,.05) inset, 0 40px 80px -20px rgba(0,0,0,.6);
    --tint: 22%;
    --glow-a: rgba(124,124,255,.30); --glow-b: rgba(226,185,76,.20); --glow-c: rgba(236,91,140,.18);
    --header: rgba(23,25,35,.7);
    color-scheme: dark;
  }
}

/* sphere colors */
.c-health { --c: #22b46a; } .c-money { --c: #e0a91f; } .c-mind { --c: #4f7cff; }
.c-rel { --c: #ec5b8c; } .c-career { --c: #9b6bff; } .c-fun { --c: #ff8a3d; }
.bad { --c: var(--bad); }

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { -webkit-tap-highlight-color: transparent; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; -webkit-text-size-adjust: 100%; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--text); overflow-x: hidden;
  font: 16px/1.55 ui-sans-serif, -apple-system, BlinkMacSystemFont, "SF Pro Text", Inter, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased; transition: background-color .35s, color .35s; }
@supports (overflow: clip) { body { overflow-x: clip; } }
img, svg { display: block; max-width: 100%; }
button { font: inherit; color: inherit; }
a { color: var(--primary); }
h1, h2, h3 { letter-spacing: -.025em; line-height: 1.1; margin: 0; }
p { margin: 0; }
:focus-visible { outline: 3px solid var(--primary); outline-offset: 3px; border-radius: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--primary); color: var(--on-primary); padding: 10px 14px; border-radius: 12px; font-weight: 700; text-decoration: none; transition: top .2s; }
.skip:focus { top: 12px; }

.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.wrap.narrow { max-width: 760px; }
@media (min-width: 640px) { .wrap { padding: 0 28px; } }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; cursor: pointer;
  border: 1px solid var(--line); background: var(--surface); color: var(--text); border-radius: 12px; padding: 9px 14px;
  font-weight: 650; font-size: 14px; white-space: nowrap; transition: transform .18s ease, box-shadow .2s ease, background-color .2s, border-color .2s; }
.btn:hover { transform: translateY(-1px); border-color: color-mix(in srgb, var(--primary) 40%, var(--line)); }
.btn:active { transform: translateY(0) scale(.98); }
.btn.primary { background: var(--primary); color: var(--on-primary); border-color: transparent;
  box-shadow: 0 6px 20px -6px color-mix(in srgb, var(--primary) 70%, transparent); }
.btn.primary:hover { box-shadow: 0 10px 28px -6px color-mix(in srgb, var(--primary) 85%, transparent); }
.btn.ghost { background: none; border-color: transparent; color: var(--muted); }
.btn.ghost:hover { color: var(--text); }
.btn.lg { padding: 14px 22px; font-size: 16px; border-radius: 14px; }
.btn.sm { padding: 6px 12px; font-size: 13px; border-radius: 10px; }
.btn.block { width: 100%; }
.btn .arr { transition: transform .2s; }
.btn:hover .arr { transform: translateX(3px); }

/* ---------- header ---------- */
.topbar { position: sticky; top: 0; z-index: 40; background: var(--header);
  backdrop-filter: saturate(160%) blur(14px); -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent; transition: border-color .3s; }
.topbar.scrolled { border-bottom-color: var(--line); }
.topbar-in { display: flex; align-items: center; gap: 8px; height: 62px; }
.brand { display: inline-flex; align-items: center; gap: 9px; font-weight: 800; font-size: 19px; letter-spacing: -.02em; color: var(--text); text-decoration: none; }
.links { display: none; gap: 4px; margin: 0 auto; }
.links a { color: var(--muted); text-decoration: none; font-weight: 550; font-size: 14px; padding: 8px 12px; border-radius: 10px; transition: color .2s, background-color .2s; }
.links a:hover { color: var(--text); background: color-mix(in srgb, var(--surface) 70%, transparent); }
.top-cta { display: flex; align-items: center; gap: 2px; margin-left: auto; }
.top-cta .btn.ghost { padding: 9px 10px; }
.theme-btn { width: 38px; height: 38px; border-radius: 11px; border: 0; background: none; color: var(--muted); cursor: pointer; display: grid; place-items: center; transition: color .2s, background-color .2s; }
.theme-btn:hover { color: var(--text); background: var(--surface); }
.theme-btn svg { width: 19px; height: 19px; }
.theme-btn .i-sun { display: none; }
.is-dark .theme-btn .i-sun { display: block; }
.is-dark .theme-btn .i-moon { display: none; }
@media (max-width: 380px) { .theme-btn { display: none; } }
@media (min-width: 900px) { .links { display: flex; } .top-cta { gap: 6px; } }

/* ---------- ambient ---------- */
.spotlight { position: fixed; left: 0; top: 0; width: 640px; height: 640px; margin: -320px 0 0 -320px; border-radius: 50%; pointer-events: none; z-index: 0;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--primary) 13%, transparent), transparent);
  opacity: 0; transition: opacity .5s; will-change: transform; }
.spotlight.on { opacity: 1; }
main, .footer { position: relative; z-index: 1; }

.aurora { position: absolute; inset: -10% -20% auto; height: 120%; pointer-events: none; overflow: hidden; z-index: -1; }
.aurora i { position: absolute; border-radius: 50%; filter: blur(60px); will-change: transform; }
.aurora i:nth-child(1) { width: 60vmax; height: 60vmax; left: -10%; top: -25%; background: radial-gradient(closest-side, var(--glow-a), transparent); animation: drift1 18s ease-in-out infinite alternate; }
.aurora i:nth-child(2) { width: 50vmax; height: 50vmax; right: -15%; top: -10%; background: radial-gradient(closest-side, var(--glow-b), transparent); animation: drift2 22s ease-in-out infinite alternate; }
.aurora i:nth-child(3) { width: 40vmax; height: 40vmax; left: 30%; top: 30%; background: radial-gradient(closest-side, var(--glow-c), transparent); animation: drift3 26s ease-in-out infinite alternate; }
@keyframes drift1 { to { transform: translate3d(12%, 10%, 0) scale(1.1); } }
@keyframes drift2 { to { transform: translate3d(-14%, 12%, 0) scale(.9); } }
@keyframes drift3 { to { transform: translate3d(-10%, -14%, 0) scale(1.15); } }

/* ---------- hero ---------- */
.hero { position: relative; isolation: isolate; padding: 36px 0 56px; overflow: hidden; }
.hero::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: .5;
  background-image: radial-gradient(color-mix(in srgb, var(--text) 14%, transparent) 1px, transparent 1px);
  background-size: 22px 22px;
  -webkit-mask-image: radial-gradient(70% 60% at 50% 30%, #000, transparent); mask-image: radial-gradient(70% 60% at 50% 30%, #000, transparent); }
.hero-in { display: grid; gap: 44px; align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; color: var(--text);
  background: color-mix(in srgb, var(--surface) 75%, transparent); border: 1px solid var(--line); padding: 6px 12px 6px 10px; border-radius: 99px; }
.eyebrow.small { font-size: 12px; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--good); position: relative; }
.live-dot::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--good); animation: ping 2s ease-out infinite; }
@keyframes ping { 0% { transform: scale(1); opacity: .7; } 80%, 100% { transform: scale(2.8); opacity: 0; } }
.hero h1 { font-size: clamp(46px, 13vw, 92px); font-weight: 850; letter-spacing: -.05em; line-height: .95; margin: 18px 0 18px; }
.grad { background: linear-gradient(100deg, var(--primary) 0%, #ec5b8c 45%, #e0a91f 90%); -webkit-background-clip: text; background-clip: text; color: transparent;
  background-size: 200% 100%; animation: sheen 8s ease-in-out infinite alternate; padding-right: .04em; }
@keyframes sheen { to { background-position: 100% 0; } }
.lead { font-size: 18px; color: var(--muted); max-width: 34em; }
.cta-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.hero-points { list-style: none; padding: 0; margin: 22px 0 0; display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 14px; color: var(--muted); font-weight: 550; }
.hero-points li { display: inline-flex; align-items: center; gap: 6px; }
.hero-points svg { width: 18px; height: 18px; color: var(--good); }
@media (max-width: 420px) { .cta-row .btn { flex: 1 1 100%; } }

.hero-card-wrap { position: relative; justify-self: center; width: min(100%, 360px); perspective: 900px; padding: 40px 0 34px; }
.card-glow { position: absolute; inset: 12% 6% 4%; border-radius: 40px; filter: blur(40px); z-index: -1;
  background: conic-gradient(from 0deg, var(--card-b), #ec5b8c, var(--primary), var(--card-b)); opacity: .45; animation: spin 14s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* player card (from the app) */
.player { margin: 0; border-radius: 22px; padding: 18px; position: relative; overflow: hidden; color: var(--card-t);
  background: linear-gradient(145deg, var(--card-a) 0%, color-mix(in srgb, var(--card-a) 35%, var(--surface)) 70%);
  border: 1px solid color-mix(in srgb, var(--card-b) 60%, transparent); box-shadow: var(--shadow-lg); }
[data-tier="silver"] { --card-a: #e7ebf1; --card-b: #a3adba; --card-t: #2e3540; }
[data-tier="bronze"] { --card-a: #f3d8c2; --card-b: #c08356; --card-t: #4d2b12; }
[data-tier="elite"]  { --card-a: #e0dbff; --card-b: #7b6cf0; --card-t: #261b6e; }
:root[data-theme="dark"] [data-tier="silver"] { --card-a: #3e4656; --card-b: #aab4c3; --card-t: #eef2f8; }
:root[data-theme="dark"] [data-tier="bronze"] { --card-a: #5b3a22; --card-b: #d0915f; --card-t: #ffdcc0; }
:root[data-theme="dark"] [data-tier="elite"]  { --card-a: #3b3180; --card-b: #9d90ff; --card-t: #e6e1ff; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) [data-tier="silver"] { --card-a: #3e4656; --card-b: #aab4c3; --card-t: #eef2f8; }
  :root:not([data-theme="light"]) [data-tier="bronze"] { --card-a: #5b3a22; --card-b: #d0915f; --card-t: #ffdcc0; }
  :root:not([data-theme="light"]) [data-tier="elite"]  { --card-a: #3b3180; --card-b: #9d90ff; --card-t: #e6e1ff; }
}
[data-tier="gold"] { --card-a: #fff3cf; --card-b: #e6c260; --card-t: #4e3b06; }
:root[data-theme="dark"] [data-tier="gold"] { --card-a: #5a4512; --card-b: #e2b94c; --card-t: #ffe7a3; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) [data-tier="gold"] { --card-a: #5a4512; --card-b: #e2b94c; --card-t: #ffe7a3; } }

.hero-player { transform-style: preserve-3d; transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform .5s cubic-bezier(.2,.8,.2,1); will-change: transform; }
.hero-player.tracking { transition: transform .08s linear; }
.hero-player .shine { position: absolute; inset: -40%; pointer-events: none; z-index: 2; opacity: 0; mix-blend-mode: soft-light;
  background: radial-gradient(closest-side, rgba(255,255,255,.65), transparent 70%);
  transform: translate3d(var(--gx, 0%), var(--gy, 0%), 0); transition: opacity .4s; }
.hero-player.tracking .shine { opacity: 1; }
.hero-player.flash::before { content: ""; position: absolute; inset: 0; z-index: 3; pointer-events: none;
  background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,.55) 50%, transparent 70%); animation: sweep .9s ease-out forwards; }
@keyframes sweep { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
.player .top { display: flex; justify-content: space-between; gap: 8px; }
.ovr { font-size: 64px; font-weight: 850; line-height: .95; letter-spacing: -.045em; font-variant-numeric: tabular-nums; }
.tier { font-size: 11px; font-weight: 750; letter-spacing: .16em; text-transform: uppercase; opacity: .8; margin-top: 6px; }
.pname { font-weight: 750; font-size: 18px; margin-top: 10px; color: var(--text); }
.delta { font-size: 13px; font-weight: 700; min-height: 1.3em; }
.delta.up { color: var(--good); } .delta.down { color: var(--bad); }
.player .radar { width: 150px; height: 150px; flex: none; margin: -8px -8px 0 0; overflow: visible; }
.radar .ring { fill: none; stroke: currentColor; stroke-opacity: .2; }
.radar .axis { stroke: currentColor; stroke-opacity: .14; }
.radar .shape { fill: currentColor; fill-opacity: .16; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; }
.radar .vtx { stroke: none; }
.stats6 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 16px; }
.stat { background: color-mix(in srgb, var(--surface) 70%, transparent); border-radius: 12px; padding: 8px 10px; min-width: 0; transition: background-color .3s; }
.stat b { display: block; font-size: 21px; line-height: 1.1; font-variant-numeric: tabular-nums; color: var(--text); }
.stat span { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat .ar { font-size: 10px; font-style: normal; margin-left: auto; }
.stat .ar.up { color: var(--good); } .stat .ar.down { color: var(--bad); }
.stat.bump { background: color-mix(in srgb, var(--c) 28%, var(--surface)); }
.dot { width: 9px; height: 9px; border-radius: 50%; flex: none; background: var(--c); display: inline-block; }

.float-chip { position: absolute; display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 650; padding: 7px 12px; border-radius: 99px;
  background: color-mix(in srgb, var(--surface) 88%, transparent); border: 1px solid var(--line); box-shadow: var(--shadow);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); white-space: nowrap; animation: bob 6s ease-in-out infinite; }
.float-chip b { color: var(--good); }
.float-chip.bad b { color: var(--bad); }
.fc-1 { left: 4px; top: 0; }
.fc-2 { right: 4px; bottom: 4px; animation-delay: -2s; }
.fc-3 { display: none; left: -48px; bottom: 30%; animation-delay: -4s; }
@keyframes bob { 50% { transform: translateY(-8px); } }

@media (min-width: 900px) {
  .hero { padding: 64px 0 88px; }
  .hero-in { grid-template-columns: 1.1fr .9fr; gap: 40px; }
  .hero-card-wrap { width: 380px; justify-self: end; margin-right: 30px; padding: 48px 0 44px; }
  .fc-1 { left: 24px; top: 4px; } .fc-2 { right: -36px; bottom: 16px; } .fc-3 { display: inline-flex; left: -128px; bottom: 50%; }
  .lead { font-size: 19px; }
}

/* ---------- marquee ---------- */
.marquee { position: relative; overflow: hidden; padding: 6px 0 10px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee-track { display: flex; width: max-content; }
.js .marquee-track { animation: marquee 48s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-row { display: flex; gap: 10px; list-style: none; margin: 0; padding: 0 10px 0 0; }
@keyframes marquee { to { transform: translateX(-50%); } }
.chip { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; font-size: 14px; font-weight: 600; padding: 8px 14px; border-radius: 99px;
  background: color-mix(in srgb, var(--c) 12%, var(--surface)); border: 1px solid color-mix(in srgb, var(--c) 28%, var(--line)); }
.chip.bad { background: var(--bad-soft); border-style: dashed; }

/* ---------- sections ---------- */
.section { padding: 72px 0; position: relative; }
@media (min-width: 900px) { .section { padding: 104px 0; } }
.sec-head { max-width: 680px; margin-bottom: 36px; }
.sec-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.kicker { font-size: 13px; font-weight: 750; letter-spacing: .12em; text-transform: uppercase; color: var(--primary); margin-bottom: 12px; }
.kicker.red { color: var(--bad); }
.section h2 { font-size: clamp(32px, 7.5vw, 52px); font-weight: 820; letter-spacing: -.04em; }
.sec-sub { color: var(--muted); font-size: 17px; margin-top: 14px; max-width: 38em; }
.center .sec-sub { margin-left: auto; margin-right: auto; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.label { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; }
.fine { font-size: 13px; color: var(--muted); margin-top: 14px; }
.t-good { color: var(--good); } .t-bad { color: var(--bad); }
.up { color: var(--good); }

/* reveal */
.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s ease, transform .8s cubic-bezier(.2,.8,.2,1); transition-delay: var(--d, 0s); }
.js .reveal.in { opacity: 1; transform: none; }

/* ---------- how ---------- */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
@media (min-width: 820px) { .steps { grid-template-columns: repeat(3, 1fr); gap: 20px; } }
.step-card { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 22px; box-shadow: var(--shadow); transition: transform .3s cubic-bezier(.2,.8,.2,1), box-shadow .3s; }
.step-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.step-n { display: inline-grid; place-items: center; margin-top: 18px; font-size: 13px; font-weight: 800; color: var(--primary); width: 28px; height: 28px; border-radius: 9px; background: color-mix(in srgb, var(--primary) 16%, transparent); }
.step-card h3 { font-size: 20px; margin: 10px 0 8px; }
.step-card p { color: var(--muted); font-size: 15px; }
.step-vis { height: 128px; border-radius: 16px; background: var(--surface-2); padding: 14px; display: flex; overflow: hidden; }
.spheres-vis { flex-wrap: wrap; align-content: center; gap: 6px; }
.sp { font-size: 12px; font-weight: 700; padding: 5px 10px; border-radius: 99px; background: color-mix(in srgb, var(--c) 18%, var(--surface)); color: var(--text); }
.sp.add { background: none; border: 1px dashed var(--line); color: var(--muted); }
.track-vis { flex-direction: column; justify-content: center; gap: 6px; }
.mini-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; background: var(--surface); border-radius: 10px; padding: 6px 8px 6px 12px; font-size: 13px; font-weight: 600; min-height: 34px; }
.mini-chk { width: 22px; height: 22px; border-radius: 7px; border: 2px solid var(--line); display: grid; place-items: center; font-style: normal; font-size: 12px; font-weight: 800; color: #fff; flex: none; }
.mini-chk.on { background: var(--c); border-color: var(--c); }
.mini-step { font-size: 12px; padding: 2px 8px; border-radius: 7px; background: color-mix(in srgb, var(--c) 22%, transparent); font-variant-numeric: tabular-nums; }
.mini-pill { font-style: normal; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 99px; background: var(--surface-2); color: var(--muted); white-space: nowrap; }
.mini-pill.red { background: var(--bad-soft); color: var(--bad); }
.move-vis { position: relative; padding: 0; align-items: flex-end; }
.spark { width: 100%; height: 80%; }
.spark-line { fill: none; stroke: var(--good); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.js .spark-line { stroke-dasharray: 400; stroke-dashoffset: 400; transition: stroke-dashoffset 1.6s ease .2s; }
.spark-fill { fill: color-mix(in srgb, var(--good) 16%, transparent); }
.js .spark-fill { opacity: 0; transition: opacity 1s ease 1s; }
.js .reveal.in .spark-line { stroke-dashoffset: 0; }
.js .reveal.in .spark-fill { opacity: 1; }
.move-badge { position: absolute; top: 12px; left: 12px; font-size: 13px; font-weight: 750; color: var(--good); background: var(--surface); padding: 4px 10px; border-radius: 99px; }

/* ---------- demo ---------- */
.demo-sec { background: linear-gradient(180deg, transparent, color-mix(in srgb, var(--primary) 5%, transparent) 30%, transparent); }
.demo { display: grid; gap: 16px; }
@media (min-width: 900px) { .demo { grid-template-columns: 1.05fr 1fr; gap: 24px; align-items: start; } }
.demo-board { padding: 18px; }
.demo-top { display: flex; justify-content: space-between; align-items: flex-start; }
.demo-ovr { display: flex; align-items: center; gap: 10px; margin-top: 4px; }
.demo-ovr b { font-size: 48px; font-weight: 850; letter-spacing: -.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.tier-badge { font-size: 11px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; padding: 5px 10px; border-radius: 99px;
  background: var(--card-a); color: var(--card-t); border: 1px solid var(--card-b); transition: background-color .3s, color .3s; }
.demo-radar { width: 100%; max-width: 340px; margin: 6px auto 0; overflow: visible; color: var(--primary); }
.demo-radar text { fill: var(--muted); font-size: 11.5px; font-weight: 650; }
.demo-radar .lbl-val { fill: var(--text); font-weight: 800; }
.demo-bars { list-style: none; padding: 0; margin: 10px 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px 16px; }
.demo-bars li { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; min-width: 0; }
.demo-bars .nm { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 7.5em; }
.demo-bars .bar { grid-column: 1 / -1; }
.demo-bars b { font-variant-numeric: tabular-nums; }
.demo-bars li.hit b { animation: pop .5s; }
@keyframes pop { 40% { transform: scale(1.35); } }
.demo-bars b { display: inline-block; }
.bar { display: block; height: 6px; background: var(--surface-2); border-radius: 99px; overflow: hidden; }
.bar i { display: block; height: 100%; width: 100%; border-radius: 99px; background: var(--c); transform-origin: left; transform: scaleX(var(--v, 0)); transition: transform .6s cubic-bezier(.2,.8,.2,1); }
.demo-chips { display: grid; gap: 12px; }
.chip-group { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 6px 14px 16px; box-shadow: var(--shadow); }
.chip-group.neg { background: color-mix(in srgb, var(--bad) 6%, var(--surface)); border: 1px dashed color-mix(in srgb, var(--bad) 40%, transparent); }
.chip-group .sub-h { padding-left: 2px; padding-right: 2px; }
.chip-group.neg .sub-h { color: var(--bad); }
.chip-list { display: flex; flex-wrap: wrap; gap: 8px; }
.hchip { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 14px; font-weight: 600; padding: 9px 12px 9px 10px; border-radius: 12px; min-height: 44px;
  background: var(--surface-2); border: 1px solid transparent; color: var(--text); transition: transform .15s, background-color .2s, border-color .2s; }
.hchip:hover { border-color: color-mix(in srgb, var(--c) 50%, transparent); }
.hchip:active { transform: scale(.96); }
.hchip .box { width: 20px; height: 20px; border-radius: 6px; border: 2px solid color-mix(in srgb, var(--c) 70%, var(--line)); display: grid; place-items: center; font-size: 11px; font-weight: 900; color: #fff; flex: none; transition: background-color .2s; }
.hchip .pts { font-size: 12px; font-weight: 800; color: var(--muted); }
.hchip[aria-pressed="true"] { background: color-mix(in srgb, var(--c) 18%, var(--surface)); border-color: color-mix(in srgb, var(--c) 55%, transparent); }
.hchip[aria-pressed="true"] .box { background: var(--c); border-color: var(--c); }
.neg .hchip[aria-pressed="true"] .box::after { content: "!"; }
.hchip[aria-pressed="true"] .pts { color: var(--good); }
.neg .hchip[aria-pressed="true"] .pts { color: var(--bad); }

.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); z-index: 60; pointer-events: none;
  display: flex; align-items: center; gap: 8px; white-space: nowrap; padding: 11px 18px; border-radius: 14px; font-weight: 800; font-size: 15px;
  background: var(--text); color: var(--bg); box-shadow: 0 16px 40px rgba(0,0,0,.3);
  opacity: 0; transform: translate(-50%, 16px) scale(.96); transition: opacity .22s, transform .3s cubic-bezier(.2,.8,.2,1); }
.toast.show { opacity: 1; transform: translate(-50%, 0) scale(1); }
.toast .dot { width: 10px; height: 10px; }
.float-pts { position: fixed; z-index: 61; pointer-events: none; font-weight: 850; font-size: 16px; color: var(--good); animation: floatUp 1s ease-out forwards; }
.float-pts.neg { color: var(--bad); }
@keyframes floatUp { from { transform: translate(-50%, 0); opacity: 1; } to { transform: translate(-50%, -46px); opacity: 0; } }

/* ---------- build / avoid sphere (from the app) ---------- */
.ba { display: grid; gap: 32px; align-items: center; }
@media (min-width: 900px) { .ba { grid-template-columns: 1fr 1fr; gap: 56px; } }
.ticks { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 10px; }
.ticks li { position: relative; padding-left: 30px; color: var(--muted); }
.ticks li b { color: var(--text); }
.ticks li::before { content: ""; position: absolute; left: 0; top: 3px; width: 20px; height: 20px; border-radius: 7px;
  background: color-mix(in srgb, var(--primary) 16%, transparent) no-repeat center / 12px; }
.ticks li::after { content: ""; position: absolute; left: 6px; top: 8px; width: 8px; height: 5px; border: solid var(--primary); border-width: 0 0 2px 2px; transform: rotate(-45deg); }
.sphere { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-lg); }
.shead { display: flex; align-items: center; gap: 10px; padding: 14px 16px 12px; background: linear-gradient(180deg, color-mix(in srgb, var(--c) var(--tint), transparent), transparent); }
.shead .name { font-weight: 750; font-size: 16px; }
.shead .prog { flex: 1; display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.shead .prog .bar { flex: 1; max-width: 160px; }
.rchip { min-width: 42px; text-align: center; font-weight: 800; font-size: 15px; padding: 3px 9px; border-radius: 10px; background: color-mix(in srgb, var(--c) 22%, transparent); font-variant-numeric: tabular-nums; display: inline-block; }
.rchip.bump { animation: pop .5s; }
.sub-h { display: flex; align-items: center; gap: 8px; padding: 12px 16px 4px; font-size: 11px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); margin: 0; }
.sub-h .pts { margin-left: auto; letter-spacing: 0; font-size: 12px; font-weight: 750; text-transform: none; font-variant-numeric: tabular-nums; }
.neg-zone { background: var(--bad-soft); border-top: 1px dashed color-mix(in srgb, var(--bad) 35%, transparent); padding-bottom: 6px; margin-top: 6px; }
.neg-zone .sub-h { color: var(--bad); }
.neg-zone .sub-h .pts.hit { color: var(--bad); }
.item { display: grid; grid-template-columns: minmax(0, 1fr) 140px; align-items: center; gap: 10px; padding: 9px 14px; min-height: 58px; }
.item + .item { border-top: 1px solid var(--line); }
.neg-zone .item + .item { border-top-color: color-mix(in srgb, var(--bad) 18%, transparent); }
.item .title { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: color .2s; }
.item.done .title { color: var(--muted); text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--muted) 60%, transparent); }
.item .meta { color: var(--muted); font-size: 12px; display: flex; gap: 8px; flex-wrap: wrap; margin-top: 1px; }
.item .meta .w { font-weight: 750; }
.ctl { display: flex; justify-content: flex-end; align-items: center; }
.chk { width: 36px; height: 36px; border-radius: 10px; border: 2px solid var(--line); background: var(--surface); cursor: pointer; padding: 0;
  display: grid; place-items: center; font-weight: 800; color: transparent; transition: transform .12s, background-color .15s, border-color .15s; }
.chk:active { transform: scale(.9); }
.chk.on { background: var(--c); border-color: var(--c); color: #fff; }
.stepper { display: flex; align-items: center; background: var(--surface-2); border-radius: 11px; height: 36px; transition: background-color .2s, color .2s; }
.stepper button { width: 36px; height: 36px; border: 0; background: none; cursor: pointer; font-size: 18px; color: var(--muted); border-radius: 10px; padding: 0; }
.stepper button:hover { color: var(--text); }
.stepper b { min-width: 60px; text-align: center; font-size: 13px; font-variant-numeric: tabular-nums; }
.stepper b small { color: var(--muted); font-weight: 500; }
.stepper.full { background: color-mix(in srgb, var(--c) 22%, transparent); }
.stepper.neg { background: color-mix(in srgb, var(--bad) 12%, var(--surface)); }
.stepper.neg.hit { background: var(--bad); color: #fff; }
.stepper.neg.hit button, .stepper.neg.hit small { color: #fff; }
.stars { display: flex; }
.stars button { width: 28px; height: 36px; border: 0; background: none; cursor: pointer; font-size: 20px; padding: 0; color: var(--line); transition: color .15s, transform .15s; }
.stars button:hover { transform: scale(1.15); }
.stars button.on { color: #f0ad1f; }

/* ---------- features ---------- */
.features { display: grid; gap: 16px; }
@media (min-width: 640px) { .features { grid-template-columns: 1fr 1fr; } }
@media (min-width: 980px) { .features { grid-template-columns: repeat(3, 1fr); gap: 20px; } }
.feat { position: relative; overflow: hidden; transition: transform .3s cubic-bezier(.2,.8,.2,1), box-shadow .3s, border-color .3s; }
.feat::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .3s;
  background: radial-gradient(400px circle at var(--px, 50%) var(--py, 0%), color-mix(in srgb, var(--primary) 10%, transparent), transparent 60%); }
.feat:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: color-mix(in srgb, var(--primary) 30%, var(--line)); }
.feat:hover::before { opacity: 1; }
.feat h3 { font-size: 19px; margin: 18px 0 6px; }
.feat p { color: var(--muted); font-size: 15px; }
.feat-vis { height: 112px; border-radius: 14px; background: var(--surface-2); padding: 14px; display: flex; flex-direction: column; justify-content: center; gap: 8px; position: relative; }
.tiers { flex-direction: row; align-items: center; gap: 6px; }
.tierchip { flex: 1; min-width: 0; text-align: center; border-radius: 12px; padding: 10px 2px; font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
  background: linear-gradient(160deg, var(--card-a), color-mix(in srgb, var(--card-a) 40%, var(--surface))); color: var(--card-t); border: 1px solid color-mix(in srgb, var(--card-b) 60%, transparent); transition: transform .3s; }
.tierchip small { display: block; font-size: 11px; letter-spacing: 0; opacity: .85; margin-top: 2px; font-weight: 700; }
.feat:hover .tierchip:nth-child(1) { transform: translateY(4px); } .feat:hover .tierchip:nth-child(2) { transform: translateY(0); }
.feat:hover .tierchip:nth-child(3) { transform: translateY(-4px); } .feat:hover .tierchip:nth-child(4) { transform: translateY(-8px); }
.heatmap { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; grid-template-rows: repeat(7, 1fr); gap: 3px; height: 100%; }
.heatmap i { border-radius: 3px; background: var(--line); }
.heatmap i[data-l="1"] { background: color-mix(in srgb, #22b46a 30%, var(--surface)); }
.heatmap i[data-l="2"] { background: color-mix(in srgb, #22b46a 55%, var(--surface)); }
.heatmap i[data-l="3"] { background: color-mix(in srgb, #22b46a 80%, var(--surface)); }
.heatmap i[data-l="4"] { background: #22b46a; }
.money .mrow { display: grid; grid-template-columns: 82px 1fr auto; align-items: center; gap: 8px; font-size: 12px; font-weight: 600; }
.money .mrow b { font-variant-numeric: tabular-nums; color: var(--muted); font-weight: 650; font-size: 11px; }
.w-62 { --v: .62; } .w-88 { --v: .88; } .w-41 { --v: .41; }
.tasks .trow { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; }
.tasks .trow span { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tasks .trow.done span { color: var(--muted); text-decoration: line-through; }
.tasks .trow:first-child .mini-chk { border-color: color-mix(in srgb, var(--bad) 60%, var(--line)); }
.phone-vis { align-items: center; padding-bottom: 0; justify-content: flex-end; overflow: hidden; }
.phone { width: 96px; height: 104px; border-radius: 18px 18px 0 0; border: 3px solid var(--text); border-bottom: 0; background: var(--bg); padding: 12px 8px 0; position: relative; transition: transform .4s cubic-bezier(.2,.8,.2,1); transform: translateY(10px); }
.feat:hover .phone { transform: translateY(0); }
.phone-notch { position: absolute; top: 4px; left: 50%; width: 28px; height: 5px; margin-left: -14px; border-radius: 9px; background: var(--text); }
.phone-card { border-radius: 9px; padding: 6px 8px; display: flex; align-items: baseline; gap: 5px; background: linear-gradient(145deg, var(--card-a), color-mix(in srgb, var(--card-a) 40%, var(--surface))); color: var(--card-t); }
.phone-card b { font-size: 20px; font-weight: 850; letter-spacing: -.04em; line-height: 1; }
.phone-card span { font-size: 8px; font-weight: 800; letter-spacing: .12em; }
.phone-lines { display: grid; gap: 5px; margin-top: 8px; }
.phone-lines i { height: 9px; border-radius: 4px; background: var(--surface-2); border: 1px solid var(--line); }
.theme-vis { flex-direction: row; align-items: center; justify-content: center; gap: 14px;
  background: linear-gradient(90deg, #f4f5f9 0 50%, #171923 50% 100%); border: 1px solid var(--line); }
.theme-switch { width: 76px; height: 40px; border-radius: 99px; border: 2px solid var(--primary); background: var(--surface); cursor: pointer; position: relative; padding: 0; }
.theme-switch .knob { position: absolute; top: 4px; left: 4px; width: 28px; height: 28px; border-radius: 50%; background: var(--primary); transition: transform .35s cubic-bezier(.2,.8,.2,1); }
.is-dark .theme-switch .knob { transform: translateX(36px); }
.theme-label { font-weight: 800; font-size: 14px; padding: 4px 10px; border-radius: 99px; background: var(--surface); color: var(--text); border: 1px solid var(--line); }

/* ---------- penalties ---------- */
.penalty { display: grid; gap: 28px; padding: 24px 20px; border-color: color-mix(in srgb, var(--bad) 30%, var(--line));
  background: radial-gradient(120% 80% at 100% 0%, var(--bad-soft), transparent 60%), var(--surface); }
@media (min-width: 900px) { .penalty { grid-template-columns: 1.1fr 1fr; padding: 44px; gap: 44px; align-items: center; } }
.pen-list { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 16px; }
.pen-list li { display: grid; grid-template-columns: 30px 1fr; gap: 12px; color: var(--muted); font-size: 15px; }
.pen-list b { color: var(--text); }
.minus, .lock { width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; font-weight: 900; font-size: 18px; background: var(--bad-soft); color: var(--bad); }
.lock { background: var(--surface-2); color: var(--muted); }
.lock svg { width: 17px; height: 17px; }
.pen-vis { background: var(--surface-2); border-radius: 18px; padding: 16px; min-width: 0; }
.days { display: grid; grid-template-columns: repeat(3, 1fr) 1.9fr 1.3fr; gap: 5px; }
.day { font-size: 11px; font-weight: 750; text-align: center; padding: 7px 2px; border-radius: 9px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.day.locked { color: var(--muted); background: var(--surface); opacity: .75; }
.day.open { background: color-mix(in srgb, var(--primary) 18%, var(--surface)); color: var(--text); }
.day.now { background: var(--primary); color: var(--on-primary); }
.pen-chart { width: 100%; height: 150px; margin-top: 12px; overflow: visible; }
.pen-chart .grid-l { stroke: var(--line); stroke-width: 1; vector-effect: non-scaling-stroke; }
.pc-line { fill: none; stroke: var(--primary); stroke-width: 3; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.js .pc-line { stroke-dasharray: 600; stroke-dashoffset: 600; transition: stroke-dashoffset 2s ease .3s; }
.js .reveal.in .pc-line { stroke-dashoffset: 0; }
.pc-dot { fill: var(--bad); transform-box: fill-box; transform-origin: center; }
.js .pc-dot { opacity: 0; transform: scale(0); transition: opacity .3s, transform .4s cubic-bezier(.3,1.6,.5,1); }
.js .reveal.in .pc-dot { opacity: 1; transform: scale(1); }
.reveal.in .pc-dot:nth-of-type(1) { transition-delay: 1.3s; } .reveal.in .pc-dot:nth-of-type(2) { transition-delay: 1.5s; } .reveal.in .pc-dot:nth-of-type(3) { transition-delay: 1.7s; }
.pen-legend { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); margin-top: 8px; }
.bad-dot { --c: var(--bad); }

/* ---------- pricing ---------- */
.price-wrap { display: flex; justify-content: center; }
.price-card { position: relative; width: min(100%, 460px); border-radius: 26px; padding: 2px; overflow: hidden; isolation: isolate; box-shadow: var(--shadow-lg); }
.price-card::before { content: ""; position: absolute; left: 50%; top: 50%; width: 200%; aspect-ratio: 1; margin: -100% 0 0 -100%; z-index: -1;
  background: conic-gradient(from 0deg, transparent 0 60%, var(--primary) 75%, #ec5b8c 85%, #e0a91f 95%, transparent 100%); animation: spin 6s linear infinite; }
.price-card::after { content: ""; position: absolute; inset: 0; z-index: -2; background: var(--line); }
.price-in { background: var(--surface); border-radius: 24px; padding: 28px 22px 22px; }
.price { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin: 18px 0 4px; }
.price b { font-size: 60px; font-weight: 850; letter-spacing: -.05em; line-height: 1; }
.price span { color: var(--muted); font-weight: 600; }
.price-in .ticks { margin-bottom: 26px; }
.price-in .fine { text-align: center; }

/* ---------- faq ---------- */
.faq { display: grid; gap: 10px; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); transition: border-color .2s; }
.faq details[open] { border-color: color-mix(in srgb, var(--primary) 35%, var(--line)); }
.faq summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 18px; font-weight: 700; font-size: 16px; border-radius: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; flex: none; width: 28px; height: 28px; border-radius: 9px; background: var(--surface-2);
  background-image: linear-gradient(var(--text), var(--text)), linear-gradient(var(--text), var(--text));
  background-size: 12px 2px, 2px 12px; background-position: center; background-repeat: no-repeat; transition: transform .3s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 18px 18px; color: var(--muted); }
.faq details[open] p { animation: faqIn .35s ease; }
@keyframes faqIn { from { opacity: 0; transform: translateY(-6px); } }

/* ---------- final ---------- */
.final { padding-top: 24px; }
.final-card { position: relative; isolation: isolate; overflow: hidden; text-align: center; border-radius: 28px; padding: 56px 20px; border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow-lg); }
.final-card .aurora { inset: -40% -20%; height: auto; }
.final-card .aurora i:nth-child(1) { width: 420px; height: 420px; left: -60px; top: -80px; }
.final-card .aurora i:nth-child(2) { width: 380px; height: 380px; right: -60px; top: 40px; left: auto; }
.final-logo { margin: 0 auto 20px; border-radius: 16px; box-shadow: 0 14px 34px -10px color-mix(in srgb, #5b5bf0 80%, transparent); animation: bob 5s ease-in-out infinite; }
.final-card .sec-sub { margin: 14px auto 28px; }

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--line); padding: 28px 0 calc(28px + env(safe-area-inset-bottom)); margin-top: 40px; }
.footer-in { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 24px; }
.foot-links { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.foot-links a { color: var(--muted); text-decoration: none; font-weight: 550; font-size: 14px; padding: 6px 0; }
.foot-links a:hover { color: var(--text); text-decoration: underline; }
.copy { color: var(--muted); font-size: 13px; }
@media (min-width: 720px) { .copy { margin-left: auto; } }

/* ---------- simple pages (privacy, 404) ---------- */
.doc { padding: 40px 0 60px; }
.doc h1 { font-size: clamp(34px, 8vw, 48px); font-weight: 820; letter-spacing: -.04em; margin-bottom: 8px; }
.doc h2 { font-size: 21px; margin: 32px 0 8px; }
.doc p, .doc li { color: var(--muted); }
.doc p + p { margin-top: 10px; }
.doc ul { padding-left: 20px; margin: 8px 0 0; }
.doc li + li { margin-top: 6px; }
.doc strong { color: var(--text); }
.nf { overflow: hidden; min-height: 70vh; display: grid; place-items: center; text-align: center; padding: 40px 0; position: relative; isolation: isolate; }
.nf .ovr { font-size: clamp(96px, 30vw, 160px); color: var(--primary); }
.nf h1 { font-size: 28px; margin: 12px 0 10px; }
.nf p { color: var(--muted); margin-bottom: 26px; }

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; transition-delay: 0s !important; }
  .js .reveal { opacity: 1; transform: none; }
  .marquee { -webkit-mask-image: none; mask-image: none; }
  .js .marquee-track { animation: none; width: auto; }
  .marquee-row { flex-wrap: wrap; justify-content: center; padding: 0 16px; }
  .marquee-row[aria-hidden="true"] { display: none; }
  .spotlight { display: none; }
  .spark-line, .pc-line { stroke-dashoffset: 0; }
  .js .spark-line, .js .pc-line { stroke-dashoffset: 0; }
  .js .spark-fill, .js .pc-dot { opacity: 1; transform: none; }
}
