/* ═══ TOKENS ═══ */
/* Values from design/tokens.css (Nicholasbuild, navy). Dark only: the look depends on the near-black page and the glowing edges. */
:root {
  color-scheme: dark;
  --bg: #05070d;
  --surface: #0a0c12;
  --surface-raised: #101319;
  --border: #16181e;
  --border-strong: #2f3137;
  --border-input: #6b7080;
  --text: #e8ecf5;
  --text-muted: #a0a4ad;
  --text-dim: #7c808a;
  --accent: #2f5bd3;
  --accent-strong: #2449b4;
  --accent-ink: #9db8ff;
  --accent-soft: #0b1a42;
  --on-accent: #ffffff;
  --glow: #3d6cf0;
  --success: #4cc38a;
  --danger: #f26b5e;
  --warning: #e2a758;
  --font-display: "Space Grotesk", Inter, system-ui, sans-serif;
  --font-sans: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --fs-h2: clamp(30px, 3.2vw, 46px);
  --fs-display: clamp(36px, 4.6vw, 64px);
  --r-btn: 8px;
  --r-panel: 12px;
  --r-nav: 16px;
  --shadow-glass: inset 0 1px 0 rgba(255, 255, 255, .14), 0 8px 32px rgba(0, 0, 0, .45);
  --shadow-glow-edge: 0 -1px 0 var(--glow), 0 -24px 80px -12px rgba(61, 108, 240, .55);
  --heading-gradient: radial-gradient(855% 46% at 48% 51%, #ffffff 0%, #9aa0ad 100%);
  --glass-fill: linear-gradient(rgba(255, 255, 255, .08), rgba(255, 255, 255, .02));
  --card-fill: rgba(255, 255, 255, .02);
  --ease: cubic-bezier(.4, 0, .2, 1);
  --max: 1200px;
  --gutter: 24px;
  --section-gap: 112px;
}

/* ═══ BASE ═══ */
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-padding-top: 88px; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.6 var(--font-sans); -webkit-font-smoothing: antialiased; }
button, input, select { font: inherit; }
a { color: inherit; }
h1, h2, h3, p, ul, ol { margin: 0; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 500; letter-spacing: -.02em; line-height: 1.1; }
:focus-visible { outline: 2px solid var(--glow); outline-offset: 2px; }
svg.i { flex: none; width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.muted { color: var(--text-muted); }
.fine { margin-top: 8px; color: var(--text-muted); font-size: 13px; }
/* The gradient is decoration; the text colour underneath keeps headings readable if clipping fails */
.grad { color: var(--text); }
@supports (background-clip: text) or (-webkit-background-clip: text) {
  .grad { background: var(--heading-gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }
}

/* ═══ HEADER ═══ */
.bar { position: sticky; top: 0; z-index: 20; display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 24px; padding: 12px max(var(--gutter), calc((100vw - var(--max)) / 2)); background: rgba(5, 7, 13, .72); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.nw-sprite { position: absolute; color: var(--text); }
.mark { display: block; flex: none; width: 26px; height: 22px; }
.logo { justify-self: start; display: inline-flex; align-items: center; gap: 8px; color: var(--text); font: 500 19px var(--font-display); letter-spacing: -.02em; text-decoration: none; white-space: nowrap; }
.logo b { font-weight: 500; color: var(--text-muted); }
.pill-nav { grid-column: 2; display: flex; gap: 2px; padding: 5px; background: var(--glass-fill), rgba(18, 18, 18, .35); border: 1px solid rgba(255, 255, 255, .12); border-radius: var(--r-nav); box-shadow: var(--shadow-glass); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.pill-nav a { padding: 8px 14px; border-radius: 10px; color: var(--text-muted); font-size: 14px; text-decoration: none; transition: color 150ms var(--ease), background 150ms var(--ease); }
.pill-nav a:hover { color: var(--text); background: rgba(255, 255, 255, .05); }
.bar-actions { grid-column: 3; justify-self: end; display: flex; align-items: center; gap: 4px; }
.bar-actions .btn.ghost { min-height: 40px; padding: 0 14px; font-size: 14px; font-weight: 500; }
.bar-actions [data-account] { margin-left: 8px; border-color: var(--border-strong); background: var(--card-fill); color: var(--text); }
.bar-actions [aria-current="page"] { background: var(--accent-soft); color: var(--accent-ink); }

/* ═══ BUTTONS ═══ */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 18px; border: 1px solid transparent; border-radius: var(--r-btn); font: 600 15px var(--font-sans); text-align: center; text-decoration: none; cursor: pointer; transition: background 150ms var(--ease), box-shadow 150ms var(--ease), border-color 150ms var(--ease), transform 150ms; }
.btn:active { transform: scale(.98); }
.btn.primary { background: var(--accent); color: var(--on-accent); }
.btn.primary:hover { background: var(--accent-strong); box-shadow: 0 0 24px rgba(61, 108, 240, .45); }
.btn.primary:disabled { opacity: .6; cursor: wait; }
.btn.secondary { background: var(--card-fill); border-color: var(--border-strong); color: var(--text); }
.btn.secondary:hover { border-color: var(--text-dim); }
.btn.ghost { background: none; color: var(--text-muted); }
.btn.ghost:hover { background: rgba(255, 255, 255, .05); color: var(--text); }
.btn.outline { background: none; border-color: var(--border-strong); color: var(--text); }
.btn.lg { min-height: 52px; padding: 0 26px; font-size: 16px; }
.btn.sm { min-height: 40px; padding: 0 14px; font-size: 14px; }
.btn.is-soon, .btn.is-soon:hover { background: var(--surface-raised); border-color: var(--border); color: var(--text-dim); box-shadow: none; cursor: default; transform: none; }
.wide { width: 100%; }
.link { padding: 0; background: none; border: 0; color: var(--text-muted); font-size: 14px; text-decoration: underline; cursor: pointer; }
.link:hover { color: var(--text); }

/* ═══ SALES PAGE ═══ */
/* 4/8 spacing: 8 inside controls, 24-32 inside panels, --section-gap between sections */
#sales { max-width: calc(var(--max) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter) 64px; }
.hero { padding: 88px 0 0; text-align: center; }
.hero h1 { max-width: 980px; margin: 18px auto 0; font-size: var(--fs-display); line-height: 1.04; }
.lead { max-width: 660px; margin: 20px auto 0; color: var(--text-muted); font-size: 19px; }
.tag { display: inline-flex; align-items: center; padding: 6px 14px; background: var(--accent-soft); border: 1px solid rgba(47, 91, 211, .45); border-radius: 999px; color: var(--accent-ink); font-size: 12px; font-weight: 600; letter-spacing: .02em; }
.buy { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 32px; }
.buy-note { margin-top: 14px; color: var(--text-muted); font-size: 14px; }
.mini-note { margin-top: 12px; color: var(--text-dim); font-size: 12px; text-align: center; }
.block { padding-top: var(--section-gap); text-align: center; }
.block > h2 { max-width: 860px; margin: 16px auto 0; font-size: var(--fs-h2); }
.glow-panel { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-panel); box-shadow: var(--shadow-glow-edge); }

/* Hero app frame */
.app-frame { margin: 72px auto 0; overflow: hidden; text-align: left; }
.frame-bar { display: flex; align-items: center; gap: 6px; padding: 12px 16px; background: var(--surface-raised); border-bottom: 1px solid var(--border); }
.frame-bar i { width: 10px; height: 10px; background: var(--border-strong); border-radius: 50%; }
.frame-bar span { margin-left: 10px; color: var(--text-dim); font-size: 13px; }
.frame-body { display: grid; grid-template-columns: 180px minmax(0, 1fr); min-height: 320px; }
.frame-side { padding: 16px; border-right: 1px solid var(--border); }
.frame-side p { margin-bottom: 4px; padding: 8px 10px; border-radius: 8px; color: var(--text-muted); font-size: 14px; }
.frame-side p.on { background: var(--accent-soft); color: var(--accent-ink); }

/* Hero: a prompt line, then the system it builds */
.prompt-line { display: flex; align-items: center; gap: 10px; max-width: 640px; min-height: 46px; margin: 64px auto 0; padding: 12px 16px; background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--r-btn); color: var(--text); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 14px; text-align: left; }
.prompt-mark { color: var(--accent-ink); }
#hero-prompt::after { content: ''; display: inline-block; width: 8px; height: 16px; margin-left: 3px; vertical-align: -3px; background: var(--glow); animation: caret .9s step-end infinite; }
.prompt-line + .app-frame { margin-top: 20px; }
.scene { animation: scene-in 400ms var(--ease); }
@keyframes scene-in { from { opacity: 0; } to { opacity: 1; } }
.frame-body.scene { min-height: 340px; }

/* Trading calendar */
.legend { display: inline-flex; align-items: center; gap: 6px; color: var(--text-muted); font-size: 12px; font-weight: 500; }
.legend i { width: 8px; height: 8px; border-radius: 2px; }
.legend .w { background: var(--success); }
.legend .l { background: var(--danger); margin-left: 6px; }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.cal b { color: var(--text-dim); font-size: 11px; font-weight: 500; text-align: center; }
.day { display: grid; place-items: center; height: 34px; background: var(--surface-raised); border: 1px solid var(--border); border-radius: 6px; color: var(--text-dim); font-size: 11px; }
.mini.in .day.win { animation: day-win 9s var(--ease) infinite; animation-delay: calc(var(--i) * .22s); }
.mini.in .day.loss { animation: day-loss 9s var(--ease) infinite; animation-delay: calc(var(--i) * .22s); }
@keyframes day-win { 0% { background: var(--surface-raised); color: var(--text-dim); } 4%, 90% { background: rgba(76, 195, 138, .22); border-color: rgba(76, 195, 138, .5); color: var(--text); } 100% { background: var(--surface-raised); } }
@keyframes day-loss { 0% { background: var(--surface-raised); color: var(--text-dim); } 4%, 90% { background: rgba(242, 107, 94, .2); border-color: rgba(242, 107, 94, .5); color: var(--text); } 100% { background: var(--surface-raised); } }

/* Approval queue */
.mini-queue p { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 11px 0; border-top: 1px solid var(--border); color: var(--text-muted); }
.mini-queue b { color: var(--text); font-weight: 500; }
.state { position: relative; display: inline-grid; flex: none; font-size: 12px; font-weight: 500; }
.state > span { grid-area: 1 / 1; padding: 2px 10px; border-radius: 999px; text-align: center; white-space: nowrap; }
.state .wait { background: rgba(226, 167, 88, .15); color: var(--warning); }
.state .ok { background: rgba(76, 195, 138, .15); color: var(--success); opacity: 0; }
.mini.in .state .wait { animation: hide-wait 8s var(--ease) infinite; animation-delay: calc(var(--i) * 1.2s + .6s); }
.mini.in .state .ok { animation: show-ok 8s var(--ease) infinite; animation-delay: calc(var(--i) * 1.2s + .6s); }
@keyframes hide-wait { 0% { opacity: 1; } 5%, 88% { opacity: 0; } 95%, 100% { opacity: 1; } }
@keyframes show-ok { 0% { opacity: 0; } 5%, 88% { opacity: 1; } 95%, 100% { opacity: 0; } }

.offer-note { grid-column: 1 / -1; margin: 0; padding: 12px 14px; background: var(--surface-raised); border-radius: var(--r-btn); color: var(--text-muted); font-size: 14px; }

/* Miniatures: a looping picture of the system working. Paused until on screen. */
.mini { padding: 16px; background: var(--surface-raised); border: 1px solid var(--border); border-radius: 10px; font-size: 13px; text-align: left; }
.mini.big { margin: 20px; padding: 20px; background: var(--card-fill); }
.mini-head { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 18px; color: var(--text); font-weight: 500; }
.pill-live { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border: 1px solid var(--border-strong); border-radius: 999px; color: var(--text-muted); font-size: 12px; font-weight: 500; white-space: nowrap; }
.pill-live::before { content: ''; width: 6px; height: 6px; background: var(--success); border-radius: 50%; }
.flow { position: relative; display: grid; grid-template-columns: repeat(5, 1fr); padding: 0; list-style: none; }
.flow::before { content: ''; position: absolute; top: 6px; left: 10%; right: 10%; height: 2px; background: var(--border-strong); }
.flow li { position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; color: var(--text-dim); font-size: 12px; }
.flow .dot { position: relative; width: 14px; height: 14px; background: var(--surface-raised); border: 2px solid var(--border-strong); border-radius: 50%; }
.mini.in .flow li { animation: step-text 10s var(--ease) infinite; animation-delay: calc(var(--i) * 1.4s); }
.mini.in .flow .dot { animation: step-dot 10s var(--ease) infinite; animation-delay: calc(var(--i) * 1.4s); }
@keyframes step-dot { 0%, 6% { background: var(--surface-raised); border-color: var(--border-strong); box-shadow: none; } 10%, 85% { background: var(--glow); border-color: var(--glow); box-shadow: 0 0 12px rgba(61, 108, 240, .8); } 95%, 100% { background: var(--surface-raised); border-color: var(--border-strong); box-shadow: none; } }
@keyframes step-text { 0%, 6% { color: var(--text-dim); } 10%, 85% { color: var(--text); } 95%, 100% { color: var(--text-dim); } }
.mini-rows { margin-top: 22px; }
.mini-rows p, .mini-list p { display: grid; grid-template-columns: minmax(0, 1fr) 40%; align-items: center; gap: 12px; padding: 9px 0; border-top: 1px solid var(--border); color: var(--text-muted); }
.mini-list p { grid-template-columns: 20px minmax(0, 1fr) 40%; }
.mini-list p:first-child { border-top: 0; }
.meter { height: 6px; background: var(--border); border-radius: 999px; overflow: hidden; }
.meter span { display: block; width: 0; height: 100%; background: var(--glow); border-radius: inherit; }
.mini.in .meter span { animation: fill 8s var(--ease) infinite; animation-delay: calc(var(--i) * .9s); }
@keyframes fill { 0% { width: 0; } 30%, 88% { width: 100%; } 100% { width: 0; } }
.tick { display: grid; place-items: center; width: 18px; height: 18px; border: 1px solid var(--border-strong); border-radius: 50%; color: transparent; }
.tick svg.i { width: 12px; height: 12px; stroke-width: 3; }
.mini.in .tick { animation: tick 8s var(--ease) infinite; animation-delay: calc(var(--i) * .9s + 2s); }
@keyframes tick { 0% { color: transparent; background: none; border-color: var(--border-strong); } 4%, 70% { color: var(--on-accent); background: var(--accent); border-color: var(--accent); } 80%, 100% { color: transparent; background: none; border-color: var(--border-strong); } }
.mini-log p { padding: 6px 0; color: var(--text-muted); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; opacity: .25; }
.hash { margin-right: 10px; color: var(--accent-ink); }
.mini.in.mini-log p { animation: log 9s var(--ease) infinite; animation-delay: calc(var(--i) * 1.1s); }
@keyframes log { 0% { opacity: .25; transform: translateY(4px); } 6%, 82% { opacity: 1; transform: none; } 92%, 100% { opacity: .25; } }

/* USP card: SaaS (locked) next to Nicholasbuild (files you edit) */
.usp { display: grid; grid-template-columns: 1fr 1fr; margin-top: 56px; overflow: hidden; text-align: left; }
.usp-side { display: flex; flex-direction: column; gap: 12px; padding: 32px; }
.usp-side h3 { font-size: 22px; }
.usp-side.mine { background: var(--surface-raised); border-left: 1px solid var(--border-strong); }
.usp-side .mini { margin-top: auto; }
.mini-locked p, .mini-files p { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; border-top: 1px solid var(--border); color: var(--text-dim); }
.mini-locked p:first-child, .mini-files p:first-child { border-top: 0; }
.lock svg.i { width: 15px; height: 15px; }
.mini-files p { justify-content: flex-start; gap: 10px; padding-left: 14px; color: var(--text-muted); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }
.mini-files p.dir { padding-left: 0; color: var(--text); }
.mini-files p.edit { color: var(--text); }
.typing { display: inline-block; overflow: hidden; max-width: 0; color: var(--accent-ink); white-space: nowrap; vertical-align: bottom; border-right: 2px solid var(--glow); }
.mini.in .typing { animation: type 6s steps(15) infinite, caret .8s step-end infinite; }
@keyframes type { 0%, 10% { max-width: 0; } 45%, 90% { max-width: 15ch; } 100% { max-width: 0; } }
@keyframes caret { 50% { border-color: transparent; } }

/* Bento of systems */
.bento { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 56px; text-align: left; }
.card { display: flex; flex-direction: column; gap: 20px; padding: 28px; background: var(--card-fill); border: 1px solid var(--border); border-radius: var(--r-panel); transition: border-color 200ms var(--ease); }
.card:hover { border-color: var(--border-strong); }
.card h3 { font-size: 22px; }
.card p.muted { margin-top: 8px; }
.card .mini { margin-top: auto; }
.card.wide { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); align-items: center; gap: 32px; }
.card.wide .mini { margin: 0; }
.status { display: inline-flex; align-items: center; gap: 6px; margin-top: 16px; padding: 3px 10px; border: 1px solid var(--border-strong); border-radius: 999px; color: var(--text); font-size: 13px; font-weight: 500; }
.status::before { content: ''; width: 6px; height: 6px; background: var(--accent-ink); border-radius: 50%; }
.status.good::before { background: var(--success); }
.status.soon::before { background: var(--warning); }

/* Tested tag and real token cost on system cards */
.tested { display: inline-flex; align-items: center; gap: 5px; margin-left: 8px; padding: 2px 9px; vertical-align: 3px; background: rgba(76, 195, 138, .12); border: 1px solid rgba(76, 195, 138, .45); border-radius: 999px; color: var(--success); font: 600 11px var(--font-sans); letter-spacing: .04em; text-transform: uppercase; }
.tested::before { content: '✓'; font-size: 10px; }
.build-cost { display: flex; gap: 24px; margin: 18px 0 0; padding-top: 14px; border-top: 1px solid var(--border); }
.build-cost dt { color: var(--text-muted); font-size: 12px; }
.build-cost dd { margin: 2px 0 0; font: 500 20px var(--font-display); }
.cost-note { max-width: 760px; margin: 8px auto 0; color: var(--text-dim); font-size: 12px; text-align: center; }

/* Offer */
.offer { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 360px); gap: 40px; max-width: 940px; margin: 64px auto 0; padding: 40px; text-align: left; }
.includes { display: flex; flex-direction: column; gap: 16px; padding: 0; list-style: none; }
.includes li { display: flex; gap: 12px; font-size: 17px; }
.includes svg.i { margin-top: 3px; color: var(--accent-ink); }
.offer-buy { display: flex; flex-direction: column; gap: 10px; padding-left: 40px; border-left: 1px solid var(--border); }
.price { font: 500 44px/1 var(--font-display); letter-spacing: -.02em; }
.offer-buy .muted { font-size: 14px; }
.offer-buy .btn { margin-top: 12px; }
.chapters { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; max-width: 940px; margin: 24px auto 0; padding: 0; list-style: none; counter-reset: chapter; text-align: left; }
.chapters li { padding: 20px; background: var(--card-fill); border: 1px solid var(--border); border-radius: var(--r-panel); counter-increment: chapter; }
.chapters li::before { content: 'Bab ' counter(chapter); display: block; margin-bottom: 8px; color: var(--accent-ink); font-size: 12px; font-weight: 600; }
.chapters h3 { margin-bottom: 6px; font-size: 17px; }
.chapters p { font-size: 14px; }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 32px; padding: 0; list-style: none; counter-reset: step; text-align: left; }
.steps li { padding: 28px; border-top: 2px solid var(--border-strong); counter-increment: step; transition: border-color 600ms var(--ease); }
.steps li::before { content: '0' counter(step); display: block; margin-bottom: 12px; color: var(--accent-ink); font: 500 40px/1 var(--font-display); }
.steps h3 { margin-bottom: 6px; font-size: 20px; }
.reveal.in .steps li { border-top-color: var(--glow); }

/* Fit, about, FAQ */
.two-col { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; text-align: left; }
.ticks, .crosses { display: flex; flex-direction: column; gap: 12px; padding: 0; list-style: none; }
.ticks li, .crosses li { position: relative; padding-left: 28px; color: var(--text-muted); }
.ticks li::before, .crosses li::before { position: absolute; left: 0; top: 0; font-weight: 700; }
.ticks li::before { content: '✓'; color: var(--success); }
.crosses li::before { content: '✕'; color: var(--danger); }
.about { max-width: 760px; margin: 20px auto 0; font: 500 clamp(22px, 2.4vw, 30px)/1.35 var(--font-display); letter-spacing: -.01em; }
#faq { max-width: 860px; margin: 0 auto; }
#faq .tag { margin-bottom: 24px; }
#faq details { border-bottom: 1px solid var(--border); text-align: left; }
#faq summary { display: flex; justify-content: space-between; gap: 16px; padding: 20px 0; font-size: 17px; font-weight: 500; list-style: none; cursor: pointer; }
#faq summary::-webkit-details-marker { display: none; }
#faq summary::after { content: '+'; color: var(--accent-ink); font-size: 22px; line-height: 1; transition: transform 200ms var(--ease); }
#faq details[open] summary::after { transform: rotate(45deg); }
#faq details p { padding-bottom: 20px; }
.closing { margin-top: var(--section-gap); padding: 72px 24px; text-align: center; }
.closing h2 { max-width: 760px; margin: 0 auto; font-size: var(--fs-h2); }

/* Proof: Oliver's own numbers, stated as his result and never as a promise */
.proof { max-width: 940px; margin: 56px auto 0; padding: 40px; text-align: left; }
.proof-stats { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 24px; padding-bottom: 28px; border-bottom: 1px solid var(--border); }
.stat-label { color: var(--text-muted); font-size: 14px; }
.stat-num { margin-top: 6px; font: 500 clamp(30px, 4vw, 48px)/1.05 var(--font-display); letter-spacing: -.02em; color: var(--text-muted); }
.stat-num small { font-size: .45em; letter-spacing: 0; }
.stat-num.now { color: var(--text); }
.stat-arrow { color: var(--accent-ink); font-size: 28px; }
.proof-body { margin-top: 24px; font-size: 18px; }
.proof .fine { margin-top: 12px; }

/* Audiences: who each system is for; the ones not on sale collect a waitlist */
.audiences { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-top: 56px; text-align: left; }
.audience { gap: 12px; }
.audience .status { align-self: flex-start; margin: 0; }
.audience p.muted { margin: 0; flex: 1; }
.audience > .btn { align-self: flex-start; }
.waitlist { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.waitlist.done input, .waitlist.done button { display: none; }
.wl-msg { color: var(--text-muted); font-size: 13px; }
.waitlist.done .wl-msg { color: var(--success); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Where the dashboard runs */
.where { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 56px; text-align: left; }
.mini-browser { padding: 0; overflow: hidden; }
.mini-browser .url { margin: 0; padding: 8px 14px; background: var(--surface); border-bottom: 1px solid var(--border); color: var(--text-dim); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }
.mini-browser .mini-rows { margin: 0; padding: 4px 14px 10px; }
.mini-browser .mini-rows p:first-child { border-top: 0; }

/* What Oliver spent building, measured rows apart from the estimate */
.spent { max-width: 940px; margin: 16px auto 0; text-align: left; }
.spent h3 { font-size: 22px; }
.spent-list { display: flex; flex-direction: column; margin: 8px 0 0; padding: 0; list-style: none; }
.spent-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 16px; padding: 12px 0; border-top: 1px solid var(--border); }
.spent-what small { display: block; margin-top: 2px; color: var(--text-dim); font-size: 12px; }
.spent-usd { font: 500 18px var(--font-display); white-space: nowrap; }
.spent-kind { padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 500; white-space: nowrap; }
.spent-kind.measured { background: rgba(76, 195, 138, .12); color: var(--success); }
.spent-kind.estimate { background: rgba(226, 167, 88, .14); color: var(--warning); }

/* Library teaser on the landing page */
.library-teaser { max-width: 940px; margin: 16px auto 0; text-align: left; }
.library-teaser .tag { align-self: flex-start; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { padding: 4px 12px; background: var(--surface-raised); border: 1px solid var(--border-strong); border-radius: 999px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; }
.chip.more { color: var(--text-muted); font-family: var(--font-sans); }

/* Scroll reveal, once */
.reveal { opacity: 0; transform: translateY(12px); transition: opacity 600ms var(--ease), transform 600ms var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ═══ APP PAGES ═══ */
.page { max-width: 1040px; margin: 0 auto; padding: 48px var(--gutter) 64px; }
.page h1 { margin-bottom: 8px; font-size: clamp(28px, 3vw, 36px); }
.lead-sm { margin-bottom: 24px; color: var(--text-muted); }
.sub-title { margin: 40px 0 12px; font-size: 22px; }
.error { color: var(--danger); font-size: 14px; }
.notice { margin-bottom: 16px; padding: 10px 12px; background: rgba(242, 107, 94, .1); border-radius: var(--r-btn); color: var(--danger); font-size: 14px; }
.empty-note { margin-top: 16px; padding: 24px 16px; border: 1px dashed var(--border-strong); border-radius: var(--r-panel); color: var(--text-muted); text-align: center; }
.panel { padding: 24px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-panel); }
.owned { display: flex; flex-direction: column; gap: 12px; margin: 24px 0 12px; padding: 0; list-style: none; }
.owned li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 16px; }
.owned h2 { font-size: 19px; }
.form-stack { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; }
.form-stack .form-grid { width: 100%; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; }
label span { display: block; margin-bottom: 6px; color: var(--text-muted); font-size: 14px; }
input, select { width: 100%; min-height: 44px; padding: 8px 12px; background: var(--surface); color: var(--text); border: 1px solid var(--border-input); border-radius: var(--r-btn); color-scheme: dark; }
input:focus, select:focus { outline: none; border-color: var(--glow); box-shadow: 0 0 0 3px rgba(61, 108, 240, .35); }
td .tag { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; background: none; border: 1px solid var(--border-strong); color: var(--text); font-size: 12px; font-weight: 500; letter-spacing: 0; }
td .tag::before { content: ''; width: 6px; height: 6px; border-radius: 50%; }
td .tag.good::before { background: var(--success); }
td .tag.wait::before { background: var(--warning); }
td .tag.bad::before { background: var(--danger); }
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-panel); }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 12px 14px; border-bottom: 1px solid var(--border); text-align: left; white-space: nowrap; }
th { background: var(--surface-raised); color: var(--text-muted); font-size: 12px; font-weight: 500; }
table > :last-child > tr:last-child > td { border-bottom: 0; }

/* Admin: sidebar on the left, the chosen pane on the right; on a phone the sidebar becomes a row of tabs */
.admin { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 32px; max-width: 1200px; margin: 0 auto; padding: 40px var(--gutter) 64px; }
.side { position: sticky; top: 88px; align-self: start; }
.side-title { margin-bottom: 12px; color: var(--text-dim); font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.side nav { display: flex; flex-direction: column; gap: 2px; }
.side a { padding: 10px 12px; border-radius: var(--r-btn); color: var(--text-muted); font-size: 14px; font-weight: 500; text-decoration: none; }
.side a:hover { background: var(--surface); color: var(--text); }
.side a[aria-current="page"] { background: var(--accent-soft); color: var(--accent-ink); }
.admin-main h1 { margin-bottom: 8px; font-size: clamp(26px, 3vw, 32px); }
.form-grid .full { grid-column: 1 / -1; }
.form-msg.good { color: var(--success); font-size: 14px; }
/* Admin cards, after Mayar: eyebrow over title, mini outlined action on the right, centred empty row */
.acard { margin-top: 16px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-panel); overflow: hidden; }
.acard-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 24px; }
.acard-head.strip { background: var(--surface-raised); border-bottom: 1px solid var(--border); }
.acard-head h2 { font: 500 19px var(--font-display); }
.acard-eyebrow { margin-bottom: 4px; color: var(--text-muted); font-size: 12px; }
.acard-body { padding: 0 24px 24px; }
.acard-head.strip + .acard-body { padding-top: 20px; }
.acard-empty { padding: 20px 24px; color: var(--text-muted); font-size: 14px; text-align: center; }
.acard-list { margin: 0; padding: 0 24px 12px; list-style: none; }
.acard-list li { display: flex; justify-content: space-between; padding: 10px 0; border-top: 1px solid var(--border); font-size: 14px; }
.acard-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; align-items: start; }
.acard-grid .acard:first-child { grid-column: 1 / -1; }
.btn-mini { flex-shrink: 0; padding: 6px 12px; border: 1px solid var(--border-strong); border-radius: 6px; color: var(--text); font-size: 11px; font-weight: 600; letter-spacing: .06em; text-decoration: none; text-transform: uppercase; }
.btn-mini:hover { border-color: var(--glow); color: var(--accent-ink); }
.tag-mini { flex-shrink: 0; padding: 4px 10px; border: 1px solid var(--border-strong); border-radius: 999px; color: var(--text-muted); font-size: 12px; }
.tag-mini.good { border-color: rgba(76, 195, 138, .4); color: var(--success); }
.table-wrap.flush { border: 0; border-radius: 0; }
.upload { padding-top: 20px; border-top: 1px solid var(--border); }
progress { width: 100%; height: 6px; accent-color: var(--accent); }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 16px 0 0; }
.stats .acard { margin: 0; padding: 20px 24px; }
.stat-label { color: var(--text-muted); font-size: 13px; }
.stat-value { margin-top: 4px; font: 500 28px var(--font-display); }
.file-links { display: flex; flex-wrap: wrap; gap: 8px; }
.file-links small { margin-left: 6px; opacity: .75; font-weight: 400; }

/* Belajarku tabs and the Library */
.tabs { display: flex; gap: 4px; margin: 16px 0 24px; padding: 4px; width: fit-content; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-btn); }
.tabs a { padding: 8px 16px; border-radius: 6px; color: var(--text-muted); font-size: 14px; font-weight: 500; text-decoration: none; }
.tabs a[aria-current="page"] { background: var(--accent-soft); color: var(--accent-ink); }
.skills { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding: 0; list-style: none; }
.skill { gap: 6px; height: 100%; text-decoration: none; }
.skill h2 { font-size: 19px; }
.skill .repo { color: var(--accent-ink); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }
.skill p.muted { margin: 0; font-size: 14px; }
.recent { margin-top: 12px; }
.recent summary { color: var(--text-muted); font-size: 14px; cursor: pointer; }
.recent p { margin-top: 8px; font-size: 13px; }

/* ═══ FOOTER ═══ */
.footer { max-width: calc(var(--max) + 2 * var(--gutter)); margin: 0 auto; padding: 32px var(--gutter) 48px; border-top: 1px solid var(--border); color: var(--text-dim); font-size: 13px; }
.footer-brand { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; }

/* ═══ ACCOUNT DIALOG ═══ */
dialog { width: min(420px, calc(100vw - 32px)); padding: 24px; background: var(--surface); color: var(--text); border: 1px solid var(--border-strong); border-radius: var(--r-panel); box-shadow: var(--shadow-glow-edge); }
dialog::backdrop { background: rgba(0, 0, 0, .7); backdrop-filter: blur(4px); }
.dialog-head { position: relative; display: flex; align-items: center; justify-content: center; margin-bottom: 16px; }
dialog h2 { margin-bottom: 20px; font-size: 24px; text-align: center; }
#signed-in h2 { margin-bottom: 8px; }
#signed-in p { margin-bottom: 16px; color: var(--text-muted); text-align: center; }
#account-close { position: absolute; top: -6px; right: -6px; display: grid; place-items: center; width: 44px; height: 44px; padding: 0; background: none; border: 0; border-radius: 10px; color: var(--text-muted); cursor: pointer; }
#account-close:hover { background: rgba(255, 255, 255, .05); color: var(--text); }
.float { position: relative; display: block; margin-bottom: 12px; }
.float label { display: block; margin: 0; }
.float input { height: 56px; padding: 22px 16px 6px; }
.float span { position: absolute; top: 17px; left: 17px; margin: 0; color: var(--text); font-size: 15px; font-weight: 500; line-height: 22px; pointer-events: none; transition: top .12s, font-size .12s; }
.float input:focus + span, .float input:not(:placeholder-shown) + span { top: 8px; color: var(--text-muted); font-size: 12px; line-height: 16px; }
#password-field input { padding-right: 52px; }
#pw-toggle { position: absolute; top: 6px; right: 6px; display: grid; place-items: center; width: 44px; height: 44px; padding: 0; background: none; border: 0; border-radius: 10px; color: var(--text-muted); cursor: pointer; }
#pw-toggle[aria-pressed="true"] { color: var(--accent-ink); }
#pw-hint { margin: -6px 0 12px; }
#error { margin-bottom: 12px; }
#auth-form .btn.wide { min-height: 52px; }
.auth-switch { margin-top: 20px; padding: 16px; background: var(--surface-raised); border-radius: var(--r-btn); color: var(--text-muted); font-size: 14px; text-align: center; }
.auth-switch button { padding: 0; background: none; border: 0; color: var(--accent-ink); font-weight: 600; text-decoration: underline; cursor: pointer; }

/* ═══ PHONE AND TABLET ═══ */
@media (max-width: 900px) {
  .pill-nav { display: none; }
  .bar { grid-template-columns: auto minmax(0, 1fr); }
  .bar-actions { grid-column: 2; }
  .audiences { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card.wide, .offer { grid-template-columns: minmax(0, 1fr); }
  .offer-buy { padding: 32px 0 0; border-left: 0; border-top: 1px solid var(--border); }
  .chapters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  :root { --gutter: 16px; --section-gap: 72px; }
  .bar { padding-top: 8px; padding-bottom: 8px; }
  .logo { font-size: 17px; }
  .hero { padding-top: 40px; }
  .lead { font-size: 17px; }
  .buy .btn { width: 100%; }
  .app-frame { margin-top: 48px; }
  .frame-body { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .frame-side { display: none; }
  .mini.big { margin: 12px; padding: 14px; }
  .flow li { font-size: 11px; }
  .prompt-line { margin-top: 40px; font-size: 13px; }
  .frame-body.scene { min-height: 300px; }
  .day { height: 28px; }
  .mini-queue p { font-size: 12px; }
  .usp, .bento, .chapters, .steps, .two-col, .form-grid, .audiences, .where, .skills { grid-template-columns: minmax(0, 1fr); }
  .proof { padding: 24px; }
  .admin { grid-template-columns: minmax(0, 1fr); gap: 20px; padding-top: 24px; }
  .side { position: static; }
  .side-title { display: none; }
  .side nav { flex-direction: row; overflow-x: auto; }
  .side a { white-space: nowrap; }
  .hide-sm { display: none; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .acard-grid { grid-template-columns: minmax(0, 1fr); }
  .acard-head, .acard-body, .stats .acard { padding-inline: 16px; }
  .spent-list li { grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; }
  .spent-kind { grid-column: 2; justify-self: end; }
  .proof-stats { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .stat-arrow { transform: rotate(90deg); justify-self: start; }
  .proof-body { font-size: 16px; }
  .bar-actions .btn.ghost { padding: 0 10px; }
  .bar-actions [data-account] { margin-left: 4px; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; line-height: 40px; }
  .usp-side { padding: 24px; }
  .usp-side.mine { border-left: 0; border-top: 1px solid var(--border-strong); }
  .card, .offer { padding: 24px; }
  .closing { padding: 48px 16px; }
}

/* Motion off: every loop and reveal shows its final state */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
  .meter span { width: 100%; }
  .flow .dot { background: var(--glow); border-color: var(--glow); }
  .typing { max-width: 15ch; border-right: 0; }
  .day.win { background: rgba(76, 195, 138, .22); color: var(--text); }
  .day.loss { background: rgba(242, 107, 94, .2); color: var(--text); }
  .state .wait { opacity: 0; }
  .state .ok { opacity: 1; }
  .mini-log p { opacity: 1; }
}
