/* NicStack landing page. Tokens first; every value below uses them. */
:root {
  --ink: #14161a;
  --ink-soft: #3b4049;
  --paper: #fbfaf6;
  --paper-alt: #f1efe7;
  --line: #d9d5c8;
  --accent: #c6f36b;        /* fill only; text on it is --ink */
  --accent-ink: #3d6b00;    /* accent used as text on paper, 6.1:1 */
  --focus: #1f6feb;

  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  --text-sm: 0.9375rem;
  --text-md: 1.0625rem;
  --text-lg: 1.25rem;
  --text-xl: clamp(1.5rem, 1.2rem + 1.2vw, 2rem);
  --text-hero: clamp(2.5rem, 1.6rem + 4vw, 4.25rem);

  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-24: 6rem;

  --radius: 10px;
  --wrap: 68rem;
  --wrap-narrow: 42rem;
  --tap: 44px;
  --ease: 160ms ease-out;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #f1efe7;
    --ink-soft: #b9b6ab;
    --paper: #14161a;
    --paper-alt: #1c1f24;
    --line: #2f333b;
    --accent-ink: #c6f36b;
    --focus: #79b8ff;
  }
}

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 var(--text-md)/1.6 var(--font-body);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: var(--font-display); line-height: 1.1; margin: 0 0 var(--space-4); }
h1 { font-size: var(--text-hero); font-weight: 700; letter-spacing: -0.02em; }
h2 { font-size: var(--text-xl); font-weight: 700; margin-bottom: var(--space-6); }
h3 { font-size: var(--text-lg); font-weight: 500; margin-bottom: var(--space-2); }
p { margin: 0 0 var(--space-4); }

a { color: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 4px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--space-4); }
.wrap.narrow { max-width: var(--wrap-narrow); }
@media (min-width: 640px) { .wrap { padding: 0 var(--space-8); } }

.skip {
  position: absolute; left: var(--space-4); top: -100px;
  background: var(--ink); color: var(--paper); padding: var(--space-2) var(--space-4);
  border-radius: var(--radius); z-index: 10;
}
.skip:focus { top: var(--space-4); }

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

/* Header */
.site-header { border-bottom: 1px solid var(--line); }
.header-row { display: flex; align-items: center; justify-content: space-between; min-height: 64px; }
.brand {
  display: inline-flex; align-items: center; gap: var(--space-2);
  font: 700 var(--text-lg) var(--font-display); text-decoration: none;
  min-height: var(--tap);
}
.brand-mark { width: 28px; height: 28px; }
.brand-mark rect:first-child { fill: var(--ink); }
.brand-mark .l1, .brand-mark .l2, .brand-mark .l3 { fill: var(--accent); }
.brand-mark .l2 { opacity: 0.7; }
.brand-mark .l3 { opacity: 0.4; }
@media (prefers-color-scheme: dark) { .brand-mark rect:first-child { fill: var(--paper-alt); } }
.header-link {
  font-weight: 600; font-size: var(--text-sm);
  display: inline-flex; align-items: center; min-height: var(--tap);
  text-underline-offset: 4px;
}

/* Hero */
.hero { padding: var(--space-16) 0 var(--space-12); }
@media (min-width: 640px) { .hero { padding: var(--space-24) 0 var(--space-16); } }
.eyebrow {
  font-weight: 600; font-size: var(--text-sm); color: var(--accent-ink);
  text-transform: uppercase; letter-spacing: 0.06em;
}
.lede { font-size: var(--text-lg); color: var(--ink-soft); max-width: 36rem; }
.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-4) var(--space-6); margin: var(--space-8) 0 var(--space-4); }
.fine { font-size: var(--text-sm); color: var(--ink-soft); }

.button {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 0 var(--space-6);
  border-radius: var(--radius); font-weight: 600; text-decoration: none;
  transition: transform var(--ease), box-shadow var(--ease);
}
.button.primary { background: var(--accent); color: #14161a; box-shadow: 0 0 0 2px #14161a; }
.button.primary:hover { transform: translateY(-1px); box-shadow: 0 0 0 2px #14161a, 0 6px 0 -1px #14161a; }
.button.primary:active { transform: translateY(0); box-shadow: 0 0 0 2px #14161a; }
.text-link { font-weight: 600; text-underline-offset: 4px; min-height: var(--tap); display: inline-flex; align-items: center; }

/* Sections */
.section { padding: var(--space-16) 0; border-top: 1px solid var(--line); }
.section.alt { background: var(--paper-alt); }

.pain { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--space-6); }
@media (min-width: 720px) { .pain { grid-template-columns: 1fr 1fr; gap: var(--space-8) var(--space-12); } }
.pain li { padding-left: var(--space-4); border-left: 3px solid var(--accent); }
.pain strong { display: block; font-family: var(--font-display); font-size: var(--text-lg); font-weight: 500; }

.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--space-8); }
@media (min-width: 880px) { .steps { grid-template-columns: repeat(3, 1fr); gap: var(--space-8); } }
.steps li { display: flex; gap: var(--space-4); align-items: flex-start; }
.step-num {
  flex: none; width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--ink); color: var(--paper);
  font: 700 var(--text-md) var(--font-display);
}
.tag { font-size: var(--text-sm); font-weight: 600; color: var(--accent-ink); margin: 0; }

.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: var(--space-3) var(--space-4) var(--space-3) 0; border-bottom: 1px solid var(--line); vertical-align: top; }
thead th { font-size: var(--text-sm); color: var(--ink-soft); font-weight: 600; }
tbody th { font-weight: 500; width: 50%; }
.note { margin-top: var(--space-6); color: var(--ink-soft); }

.founding { background: var(--ink); color: var(--paper); border-top: 0; }
.founding .fine { color: inherit; opacity: 0.8; margin-top: var(--space-4); }
.founding :focus-visible { outline-color: var(--accent); }
@media (prefers-color-scheme: dark) { .founding { background: var(--paper-alt); color: var(--ink); } }

details { border-bottom: 1px solid var(--line); }
summary {
  cursor: pointer; font-weight: 600; min-height: var(--tap);
  display: flex; align-items: center; padding: var(--space-3) 0;
}
details p { color: var(--ink-soft); }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: var(--space-8) 0; font-size: var(--text-sm); color: var(--ink-soft); }
.footer-row { display: flex; justify-content: space-between; align-items: center; }
.footer-row a { min-height: var(--tap); display: inline-flex; align-items: center; }

/* ---------- Desktop mock-up ----------
   An illustration of the user's screen. It has its own small palette
   (editor colours) scoped here, because it depicts other software rather
   than our UI. It is the same in light and dark mode on purpose. */
.wrap.wide { max-width: 76rem; }
.desk {
  --m-wall-1: #2a3a1c;
  --m-wall-2: #14161a;
  --m-win: #1e2126;
  --m-win-2: #262a30;
  --m-bar: #2d3138;
  --m-line: #3a3f47;
  --m-text: #e8e6df;
  --m-dim: #9da3ad;
  --m-key: #c792ea;
  --m-fn: #82aaff;
  --m-tag: #f07178;
  --m-attr: #ffcb6b;
  --m-str: #c3e88d;
  --m-ok: #c6f36b;
  --m-app-bg: #fbfaf6;
  --m-app-ink: #14161a;
  --m-app-btn: #2f9e44;
  --mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
  margin: var(--space-12) 0 0;
}
.desk-screen {
  position: relative;
  display: grid;
  gap: var(--space-4);
  padding: var(--space-4);
  border-radius: 16px;
  background: radial-gradient(120% 90% at 20% 0%, var(--m-wall-1), var(--m-wall-2) 70%);
  box-shadow: 0 30px 60px -30px rgba(0,0,0,.5), 0 0 0 1px rgba(255,255,255,.06) inset;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--m-text);
}
.desk-screen p { margin: 0; }
.desk-caption { margin-top: var(--space-4); font-size: var(--text-sm); color: var(--ink-soft); text-align: center; }

.win { background: var(--m-win); border-radius: 10px; overflow: hidden; box-shadow: 0 18px 40px -18px rgba(0,0,0,.7), 0 0 0 1px var(--m-line); }
.win-bar { display: flex; align-items: center; gap: var(--space-3); height: 30px; padding: 0 var(--space-3); background: var(--m-bar); color: var(--m-dim); font-size: 0.75rem; }
.dots { display: inline-flex; gap: 6px; }
.dots i { width: 10px; height: 10px; border-radius: 50%; background: #ff5f57; }
.dots i:nth-child(2) { background: #febc2e; }
.dots i:nth-child(3) { background: #28c840; }
.win-title { flex: 1; text-align: center; margin-right: 42px; }
.url { flex: 1; background: var(--m-win); border-radius: 6px; padding: 2px var(--space-3); font-family: var(--mono); font-size: 0.7rem; color: var(--m-text); }

/* NicStack app window */
.nic { padding: var(--space-4); display: grid; gap: var(--space-3); }
.nic-hello { font-family: var(--font-display); font-weight: 700; font-size: 1rem; }
.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.checks li { display: flex; align-items: center; gap: var(--space-2); color: var(--m-text); }
.checks li::before { content: ""; width: 16px; height: 16px; border-radius: 50%; flex: none; box-sizing: border-box; }
.checks li.done::before { background: var(--m-ok) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.5l2.5 2.5L12 5.5' fill='none' stroke='%2314161a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/100% no-repeat; }
.checks li.next { color: var(--m-ok); font-weight: 600; }
.checks li.next::before { border: 2px solid var(--m-ok); }
.xp { display: flex; align-items: center; gap: var(--space-2); font-size: 0.7rem; color: var(--m-dim); }
.xp-bar { flex: 1; height: 6px; border-radius: 3px; background: var(--m-line); overflow: hidden; }
.xp-bar b { display: block; width: 62%; height: 100%; background: var(--m-ok); }
.proj { background: var(--m-win-2); border-radius: 8px; padding: var(--space-3); display: grid; gap: var(--space-2); }
.proj-name { font-family: var(--mono); font-weight: 500; }
.pill-local { display: inline-block; font-size: 0.7rem; padding: 1px 8px; border-radius: 999px; border: 1px solid var(--m-dim); color: var(--m-dim); }
.proj-btn { justify-self: start; background: var(--m-ok); color: var(--m-app-ink); font-weight: 600; border-radius: 6px; padding: 4px 12px; }

/* VS Code window */
.code { display: grid; grid-template-columns: 1fr; font-family: var(--mono); font-size: 0.72rem; }
.tree { display: none; }
.editor { padding: var(--space-3) var(--space-4); white-space: nowrap; overflow: hidden; }
.editor .k { color: var(--m-key); } .editor .f { color: var(--m-fn); } .editor .t { color: var(--m-tag); }
.editor .a { color: var(--m-attr); } .editor .s { color: var(--m-str); }
.editor .changed { background: rgba(198,243,107,.12); box-shadow: inset 2px 0 0 var(--m-ok); }
.chat { border-top: 1px solid var(--m-line); padding: var(--space-3); display: grid; gap: var(--space-2); font-family: var(--font-body); font-size: 0.78rem; background: var(--m-win-2); }
.chat-head { color: var(--m-dim); font-size: 0.7rem; text-transform: uppercase; letter-spacing: .06em; }
.msg { border-radius: 8px; padding: 6px 10px; max-width: 85%; }
.msg.you { justify-self: end; background: var(--m-line); }
.msg.ai { background: rgba(198,243,107,.14); border: 1px solid rgba(198,243,107,.35); }
.chat-input { border: 1px solid var(--m-line); border-radius: 6px; padding: 6px 10px; color: var(--m-dim); }

/* Browser window with the user's app */
.app { background: var(--m-app-bg); color: var(--m-app-ink); padding: var(--space-6) var(--space-4); display: grid; gap: var(--space-3); justify-items: start; font-family: var(--font-body); }
.app-logo { font-family: var(--font-display); font-weight: 700; font-size: 0.8rem; color: #555b64; }
.app-h { font-family: var(--font-display); font-weight: 700; font-size: 1.35rem; line-height: 1.1; }
.app-field { width: 100%; border: 1px solid #d9d5c8; border-radius: 8px; padding: 6px 10px; font-size: 0.8rem; background: #fff; }
.app-btn { background: var(--m-app-btn); color: #fff; font-weight: 600; font-size: 0.95rem; border-radius: 10px; padding: 10px 22px; }

/* Phone: code window first, then the app, then the NicStack panel. */
.win-code { order: 1; } .win-app { order: 2; } .win-nic { order: 3; }

@media (min-width: 900px) {
  .desk-screen {
    grid-template-columns: 15rem 1fr 16rem;
    align-items: start;
    padding: var(--space-8);
    gap: var(--space-6);
    min-height: 30rem;
  }
  .win-nic { order: 0; margin-top: var(--space-8); }
  .win-code { order: 0; }
  .win-app { order: 0; margin-top: var(--space-16); margin-left: -1.5rem; position: relative; }
  .code { grid-template-columns: 8.5rem 1fr; grid-template-rows: auto auto; }
  .tree { display: grid; gap: 4px; padding: var(--space-3); border-right: 1px solid var(--m-line); color: var(--m-dim); grid-row: span 2; align-content: start; font-size: 0.7rem; }
  .tree .t-dir { color: var(--m-text); font-weight: 500; }
  .tree .t-on { color: var(--m-text); background: var(--m-win-2); border-radius: 4px; padding: 0 4px; margin-left: -4px; }
  .tree p:not(.t-dir) { padding-left: var(--space-2); }
}

/* Comparison table */
.compare thead th:nth-child(3) { color: var(--accent-ink); }
.compare td:nth-child(3) { font-weight: 500; }
.compare tbody th { width: 22%; }

/* Guides */
.prose-page { border-top: 0; }
.prose-title { font-size: var(--text-xl); line-height: 1.15; }
@media (min-width: 640px) { .prose-title { font-size: 2.5rem; } }
.prose h2 { margin-top: var(--space-12); font-size: var(--text-lg); }
.prose ol, .prose ul { padding-left: var(--space-6); margin: 0 0 var(--space-4); display: grid; gap: var(--space-2); }
.prose a { text-underline-offset: 3px; }
.prose code { font-variant-ligatures: none; font-family: "JetBrains Mono", ui-monospace, Menlo, monospace; font-size: 0.9em; background: var(--paper-alt); border: 1px solid var(--line); border-radius: 4px; padding: 0 4px; }
.prose pre { background: var(--paper-alt); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--space-4); overflow-x: auto; margin: 0 0 var(--space-4); }
.prose pre code { border: 0; padding: 0; background: none; }
.toc { border: 1px solid var(--line); border-radius: var(--radius); padding: var(--space-4) var(--space-6); margin: var(--space-8) 0; }
.toc ol { margin: 0; }
.callout { border-left: 3px solid var(--accent); padding-left: var(--space-4); }
.guide-cta { margin-top: var(--space-16); padding: var(--space-8); border-radius: var(--radius); background: var(--ink); color: var(--paper); }
.guide-cta h2 { margin-top: 0; }
@media (prefers-color-scheme: dark) { .guide-cta { background: var(--paper-alt); color: var(--ink); } }
.footer-row a { text-underline-offset: 3px; }

/* Tetris */
.play-note { color: var(--ink-soft); max-width: 40rem; }
.tetris {
  display: grid; gap: var(--space-4); margin-top: var(--space-6);
  grid-template-columns: minmax(0, 1fr); justify-items: center;
}
@media (min-width: 720px) {
  .tetris { grid-template-columns: auto 16rem; justify-content: center; align-items: start; gap: var(--space-8); }
  .tt-pad { grid-column: 1 / -1; }
}
.tt-stage { width: min(100%, 280px); border-radius: var(--radius); outline-offset: 4px; line-height: 0; }
.tt-board { border-radius: var(--radius); box-shadow: 0 0 0 1px var(--line); }
.tt-side { display: grid; gap: var(--space-4); width: min(100%, 280px); }
.tt-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-2); margin: 0; }
@media (min-width: 720px) { .tt-stats { grid-template-columns: 1fr 1fr; } }
.tt-stats div { border: 1px solid var(--line); border-radius: var(--radius); padding: var(--space-2) var(--space-3); }
.tt-stats dt { font-size: 0.75rem; color: var(--ink-soft); }
.tt-stats dd { margin: 0; font: 700 var(--text-lg) var(--font-display); font-variant-numeric: tabular-nums; }
.tt-next-wrap { display: flex; align-items: center; gap: var(--space-3); font-size: var(--text-sm); color: var(--ink-soft); }
.tt-next { background: #1e2126; border-radius: 8px; }
.tt-status { font-size: var(--text-sm); color: var(--ink-soft); min-height: 3em; margin: 0; }
.tt-pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-2); width: min(100%, 280px); }
@media (min-width: 720px) { .tt-pad { grid-template-columns: repeat(6, 1fr); width: min(100%, 36rem); } }
.tt-pad button {
  min-height: 52px; border-radius: var(--radius); border: 1px solid var(--line);
  background: var(--paper); color: var(--ink); font: 600 var(--text-md) var(--font-body);
  touch-action: manipulation; cursor: pointer;
}
.tt-pad button:active { background: var(--accent); color: #14161a; }
.tt-stage { position: relative; }
.tt-gate {
  position: absolute; inset: 0; border-radius: var(--radius);
  background: rgba(20, 22, 26, .92); color: #f1efe7; line-height: 1.5;
  display: grid; align-content: center; justify-items: center; gap: var(--space-3);
  padding: var(--space-6); text-align: center; font-size: var(--text-sm);
}
.tt-gate[hidden] { display: none; }
.tt-gate p { margin: 0; }
.tt-gate-title { font: 700 var(--text-lg)/1.2 var(--font-display); }
.tt-gate-join { color: #c6f36b; text-underline-offset: 3px; min-height: var(--tap); display: inline-flex; align-items: center; }

/* ---------- One-screen hero: Tetris in the middle, the pitch around it ---------- */
.play-hero { padding: var(--space-4) 0 var(--space-8); }
.hero-grid { display: grid; gap: var(--space-4); }
.hero-pitch h1 { font-size: clamp(2rem, 1.4rem + 2.6vw, 3.5rem); margin-bottom: var(--space-2); }
.hero-pitch .lede { font-size: var(--text-md); margin-bottom: var(--space-4); }
.hero-pitch .eyebrow { margin-bottom: var(--space-2); font-size: 0.8125rem; }
.proof { font-size: var(--text-sm); color: var(--ink-soft); margin: var(--space-4) 0 0; }

.tetris { display: grid; gap: var(--space-2); justify-items: center; margin: 0; grid-template-columns: none; }
.tt-bar { display: flex; gap: var(--space-4); font-size: var(--text-sm); color: var(--ink-soft); }
.tt-bar b { color: var(--ink); font: 700 var(--text-md) var(--font-display); font-variant-numeric: tabular-nums; }
.tt-stage {
  --bh: clamp(300px, calc(100svh - 420px), 640px);
  height: var(--bh); width: calc(var(--bh) / 2);
}
.tt-cover {
  position: absolute; inset: 0; border-radius: var(--radius);
  display: grid; align-content: center; justify-items: center; gap: var(--space-3);
  background: rgba(20, 22, 26, .55); text-align: center; padding: var(--space-4);
}
.tt-cover[hidden] { display: none; }
.tt-cover-hint { color: #f1efe7; font-size: var(--text-sm); margin: 0; }
.tt-pad { width: calc(var(--bh, 440px) / 2 + 120px); max-width: 100%; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.tt-pad button { min-height: 48px; font-size: var(--text-sm); padding: 0; }

.hero-side { display: none; }
.hero-side .gets { list-style: none; padding: 0; margin: 0 0 var(--space-6); display: grid; gap: var(--space-4); }
.hero-side .gets li { padding-left: var(--space-4); border-left: 3px solid var(--accent); font-size: var(--text-sm); }
.hero-side .gets strong { display: block; font-family: var(--font-display); font-size: var(--text-md); font-weight: 500; }
.side-founding { font-size: var(--text-sm); color: var(--ink-soft); }
.hero-side .tt-next-wrap { margin-bottom: var(--space-6); }

/* Phone: headline, one line of pitch, then the game fills the rest of the screen. */
@media (max-width: 999px) {
  .hero-pitch { text-align: center; display: grid; justify-items: center; }
  .hero-pitch .lede, .proof, .hero-pitch .eyebrow { display: none; }
  .hero-pitch h1 { font-size: 1.75rem; }
  .hero-pitch .button { min-height: 44px; }
  .tt-stage { --bh: clamp(300px, calc(100svh - 330px), 560px); }
  .tt-pad { grid-template-columns: repeat(6, 1fr); }
}
@media (max-width: 999px) and (min-height: 760px) {
  .hero-pitch .lede { display: block; font-size: var(--text-sm); margin-bottom: var(--space-3); }
  .tt-stage { --bh: clamp(300px, calc(100svh - 400px), 560px); }
}

/* Desktop: pitch | game | side, all within one screen. */
@media (min-width: 1000px) {
  .play-hero { padding: var(--space-6) 0; min-height: calc(100svh - 65px); display: grid; align-items: center; }
  .hero-grid { grid-template-columns: 1fr auto 1fr; align-items: center; gap: var(--space-12); }
  .tt-stage { --bh: clamp(360px, calc(100svh - 230px), 680px); }
  .hero-side { display: block; }
  .tt-pad { display: none; }
}
@media (min-width: 1000px) and (pointer: coarse) { .tt-pad { display: grid; } }
.tt-stage { background: #1e2126; display: grid; place-items: center; overflow: hidden; }
.tt-cover, .tt-gate { line-height: 1.5; }
.tt-board { box-shadow: none; }
@media (min-width: 1000px) { .hero-pitch h1 { font-size: clamp(2.25rem, 1.2rem + 1.8vw, 3.25rem); } }

/* Tetris polish */
.tt-stage {
  border-radius: 14px;
  box-shadow: 0 0 0 1px rgba(198,243,107,.18), 0 0 0 6px var(--paper-alt), 0 24px 50px -20px rgba(20,22,26,.55);
}
.tt-stage:focus-visible { outline: 3px solid var(--accent); outline-offset: 8px; }
.tt-board { border-radius: 12px; }
.tt-cover {
  background: radial-gradient(80% 60% at 50% 40%, rgba(29,33,39,.72), rgba(19,21,25,.94));
  backdrop-filter: blur(2px);
}
.tt-cover-mark { width: 64px; height: auto; }
.tt-cover-title { margin: 0; color: #f1efe7; font: 700 clamp(1.5rem, 1rem + 1.5vw, 2rem) var(--font-display); letter-spacing: .04em; text-transform: uppercase; }
.tt-cover .tt-start { min-width: 9rem; }
.tt-bar { gap: var(--space-2); flex-wrap: wrap; justify-content: center; }
.tt-bar span {
  display: inline-flex; align-items: baseline; gap: 6px;
  padding: 4px 10px; border-radius: 999px; background: var(--paper-alt); border: 1px solid var(--line);
  font-size: 0.8125rem;
}
.tt-bar b { font-size: var(--text-md); }
.tt-next { background: #1a1d22; border-radius: 10px; box-shadow: 0 0 0 1px var(--line); }
.tt-pad button { background: var(--paper-alt); box-shadow: 0 2px 0 var(--line); transition: transform 80ms ease-out; }
.tt-pad button:active { transform: translateY(2px); box-shadow: none; }
@media (max-width: 380px) { .tt-bar-best { display: none !important; } }
.hint-touch { display: none; }
@media (pointer: coarse) { .hint-keys { display: none; } .hint-touch { display: inline; } }
/* Gate on small boards: keep it to title, button and link. */
.tt-gate { padding: var(--space-4); gap: var(--space-2); }
.tt-gate .tt-signin { min-height: 44px; padding: 0 var(--space-4); font-size: var(--text-sm); }
@media (max-height: 760px) {
  .tt-gate > p:not(.tt-gate-title) { display: none; }
  .tt-gate-title { font-size: var(--text-md); }
}
.desk.mini { margin: 0 0 var(--space-3); }
.desk.mini .win { font-size: 0.8125rem; line-height: 1.5; color: var(--m-text); max-width: 17rem; box-shadow: 0 24px 50px -24px rgba(0,0,0,.55), 0 0 0 1px var(--m-line); }
.desk.mini p { margin: 0; }
.mini-caption { font-size: var(--text-sm); color: var(--ink-soft); max-width: 17rem; margin-bottom: var(--space-4); }
.hero-side .tt-next-wrap { margin-bottom: var(--space-4); }
.tt-bar-next { align-items: center !important; padding-top: 2px !important; padding-bottom: 2px !important; }
.tt-bar-next .tt-next { width: 30px !important; height: 30px !important; border-radius: 6px; box-shadow: none; }
@media (max-width: 999px) { .tt-bar-next { display: none !important; } }
@media (min-width: 1000px) and (max-height: 820px) { .mini-caption { display: none; } .desk.mini .win { font-size: 0.75rem; } .desk.mini .checks { gap: 3px; } }

/* ---------- Hero v3: pitch left, game right ---------- */
.hero-side { display: none !important; }
.hero-grid { align-items: center; }
.points { list-style: none; padding: 0; margin: 0 0 var(--space-6); display: grid; gap: var(--space-3); }
.points li { position: relative; padding-left: 30px; color: var(--ink-soft); }
.points li::before {
  content: ""; position: absolute; left: 0; top: 3px; width: 20px; height: 20px; border-radius: 50%;
  background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.5l2.5 2.5L12 5.5' fill='none' stroke='%2314161a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/100% no-repeat;
}
.points strong { color: var(--ink); font-weight: 600; }
.hero-pitch .cta-row { margin: 0; gap: var(--space-3) var(--space-4); }
.cta-note { font-size: var(--text-sm); font-weight: 600; color: var(--accent-ink); }
.hero-game { display: grid; justify-items: center; gap: var(--space-3); }
.hero-game .proof { max-width: 24rem; text-align: center; margin: 0; }
.hero-game .proof strong { color: var(--ink); }
.lede-short { display: none; }

@media (min-width: 1000px) {
  .hero-grid { grid-template-columns: minmax(0, 34rem) auto; justify-content: space-between; gap: var(--space-16); }
  .hero-pitch h1 { font-size: clamp(2.75rem, 1.4rem + 2.6vw, 4rem); margin-bottom: var(--space-4); }
  .hero-pitch .lede-long { font-size: var(--text-lg); margin-bottom: var(--space-6); }
  .tt-stage { --bh: clamp(360px, calc(100svh - 250px), 620px); }
}
@media (min-width: 1000px) and (max-height: 800px) {
  .hero-pitch .lede-long { font-size: var(--text-md); margin-bottom: var(--space-4); }
  .points { gap: var(--space-2); margin-bottom: var(--space-4); }
  .hero-game .proof { font-size: 0.8125rem; }
}

@media (max-width: 999px) {
  .lede-long, .points, .cta-note { display: none; }
  .lede-short { display: block; font-size: var(--text-sm); margin-bottom: var(--space-3); max-width: 22rem; }
  .hero-pitch .cta-row { justify-content: center; }
  .hero-game .proof { font-size: 0.8125rem; padding: 0 var(--space-2); }
  .tt-stage { --bh: clamp(300px, calc(100svh - 360px), 560px); }
}
@media (max-width: 999px) and (min-height: 760px) { .tt-stage { --bh: clamp(300px, calc(100svh - 390px), 560px); } }
@media (max-width: 999px) {
  .hero-pitch .lede-long { display: none !important; }
  .hero-pitch .lede-short { display: block !important; }
  .hero-game .proof { display: block !important; }
}
/* Desk v2: success, plain English */
.chat-only { padding: var(--space-4); display: grid; gap: var(--space-3); font-family: var(--font-body); font-size: 0.82rem; background: var(--m-win-2); }
.chat-only .msg { max-width: 88%; }
.pill-live, .live-dot { display: inline-flex; align-items: center; gap: 6px; font-size: 0.7rem; font-weight: 600; color: var(--m-ok); }
.pill-live::before, .live-dot::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--m-ok); box-shadow: 0 0 0 3px rgba(198,243,107,.25); }
.proj-meta { color: var(--m-dim); font-size: 0.72rem; display: flex; gap: var(--space-2); align-items: center; }
.win-app .win-bar .url { flex: 1; }
@media (min-width: 900px) { .desk-screen { grid-template-columns: 15rem 1fr 17rem; } }
@media (max-width: 999px) and (max-height: 700px) { .tt-stage { --bh: clamp(280px, calc(100svh - 400px), 560px); } }
.points-title { font-weight: 600; margin-bottom: var(--space-2); }
.your-turn { color: var(--ink-soft); margin-bottom: var(--space-6); }
.your-turn strong { color: var(--ink); }
.section-lede { color: var(--ink-soft); margin: calc(-1 * var(--space-4)) 0 var(--space-6); }
@media (min-width: 1000px) and (max-height: 800px) {
  .hero-pitch h1 { font-size: clamp(2.5rem, 1.4rem + 2vw, 3.25rem); }
  .points li { font-size: var(--text-sm); }
  .your-turn { font-size: var(--text-sm); margin-bottom: var(--space-4); }
}
@media (max-width: 999px) { .points-title, .your-turn { display: none; } }

/* One-step waitlist form */
.join-form { display: grid; gap: var(--space-2); max-width: 30rem; }
.join-row { display: flex; gap: var(--space-2); }
.join-row input {
  flex: 1; min-width: 0; min-height: 52px; padding: 0 var(--space-4);
  border: 2px solid var(--ink); border-radius: var(--radius); background: var(--paper); color: var(--ink);
  font: 500 var(--text-md) var(--font-body);
}
.join-row input::placeholder { color: var(--ink-soft); opacity: .7; }
.join-row .button { flex: none; }
.join-row .button:disabled { opacity: .7; cursor: progress; }
.join-error { color: #b42318; font-size: var(--text-sm); margin: 0; min-height: 0; }
.join-error:empty { display: none; }
.join-note { font-size: var(--text-sm); color: var(--ink-soft); margin: 0; }
.join-done { margin: 0; padding: var(--space-3) var(--space-4); border-radius: var(--radius); background: var(--accent); color: #14161a; }
.join-form.is-done .join-row, .join-form.is-done .join-note, .join-form.is-done .join-error { display: none; }
.cta-note { display: block; margin-top: var(--space-3); }
.on-dark .join-row input { background: #1e2126; color: #f1efe7; border-color: rgba(241,239,231,.5); }
.on-dark .join-row input::placeholder { color: #b9b6ab; }
.on-dark .join-note { color: inherit; opacity: .8; }
.on-dark .join-error { color: #ffb4ab; }
@media (prefers-color-scheme: dark) { .join-error { color: #ffb4ab; } }
.tt-gate .join-form { width: 100%; max-width: 17rem; }
.tt-gate .join-row { flex-direction: column; }
.tt-gate .join-row input { min-height: 44px; font-size: var(--text-sm); }
.tt-gate .join-row .button { min-height: 44px; }
.text-button { background: none; border: 0; color: #c6f36b; text-decoration: underline; text-underline-offset: 3px; font: 500 var(--text-sm) var(--font-body); min-height: var(--tap); cursor: pointer; }
@media (max-width: 999px) {
  .hero-pitch .join-form { margin: 0 auto; width: 100%; }
  .hero-pitch .join-note { display: none; }
  .hero-pitch .cta-note { display: none; }
}
@media (max-width: 420px) { .hero-pitch .join-row .button { padding: 0 var(--space-4); } }

/* ---------- Landing v4: say less, show more ---------- */
.button-sm { min-height: 40px; padding: 0 var(--space-4); font-size: var(--text-sm); }
.center { text-align: center; }
.tt-stage { width: calc(var(--bh) * var(--cols, 10) / 20); }

.hero.v4 { padding: var(--space-6) 0 var(--space-12); }
.hero-v4 { display: grid; gap: var(--space-6); align-items: center; }
.v4-copy h1 { font-size: clamp(2.25rem, 1.4rem + 3vw, 4.25rem); margin-bottom: var(--space-3); }
.v4-lede { font-size: var(--text-lg); color: var(--ink-soft); margin-bottom: var(--space-4); max-width: 26rem; }
.chips { list-style: none; padding: 0; margin: 0 0 var(--space-6); display: flex; flex-wrap: wrap; gap: var(--space-2); }
.chips li {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px;
  background: var(--paper-alt); border: 1px solid var(--line); font-size: var(--text-sm); font-weight: 600;
}
.chips li::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent-ink); }
.v4-cta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3) var(--space-4); }
.v4-cta .button { min-width: 11rem; font-size: var(--text-lg); }
.v4-note { font-size: var(--text-sm); color: var(--ink-soft); }
.v4-game { display: grid; justify-items: center; gap: var(--space-3); }
.play-hint { margin: 0; font-size: var(--text-sm); font-weight: 600; color: var(--ink-soft); }

@media (min-width: 1000px) {
  .hero.v4 { min-height: calc(100svh - 65px); display: grid; align-items: center; padding: var(--space-6) 0; }
  .hero-v4 { grid-template-columns: minmax(0, 28rem) auto; justify-content: space-between; gap: var(--space-12); }
  .v4-game .tt-stage { --bh: clamp(420px, calc(100svh - 190px), 760px); }
  .v4-game .tt-pad { display: none; }
}
@media (min-width: 1000px) and (pointer: coarse) { .v4-game .tt-pad { display: grid; } }
@media (max-width: 999px) {
  .v4-copy { text-align: center; display: grid; justify-items: center; }
  .v4-copy .eyebrow, .v4-note { display: none; }
  .v4-copy h1 { font-size: 2rem; margin-bottom: var(--space-2); }
  .v4-lede { font-size: var(--text-sm); margin-bottom: var(--space-3); }
  .chips { justify-content: center; margin-bottom: var(--space-3); }
  .chips li { padding: 4px 10px; font-size: 0.8125rem; }
  .v4-cta { justify-content: center; }
  .v4-cta .button { min-height: 46px; font-size: var(--text-md); }
  .hero-v4 { gap: var(--space-4); }
  .v4-game .tt-stage { --bh: clamp(300px, calc(100svh - 420px), 560px); }
  .v4-game .tt-pad { width: min(100%, 360px); }
}

.how { list-style: none; padding: 0; margin: var(--space-8) 0 0; display: grid; gap: var(--space-6); }
@media (min-width: 760px) { .how { grid-template-columns: repeat(3, 1fr); } }
.how li { text-align: center; display: grid; justify-items: center; gap: var(--space-2); }
.how h3 { margin: var(--space-2) 0 0; }
.how p { margin: 0; color: var(--ink-soft); }
.how .tag { color: var(--accent-ink); font-weight: 600; }
.how-icon { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; background: var(--ink); color: var(--accent); }
.how-icon svg { width: 28px; height: 28px; }
@media (prefers-color-scheme: dark) { .how-icon { background: var(--paper-alt); } }

.cta-band { background: var(--ink); color: var(--paper); border-top: 0; }
.cta-band h2 { margin-bottom: var(--space-6); }
@media (prefers-color-scheme: dark) { .cta-band { background: var(--paper-alt); color: var(--ink); } }
@media (max-width: 999px) {
  .v4-lede { display: none; }
  .hero.v4 { padding-top: var(--space-4); }
  .v4-game .tt-stage { --bh: clamp(280px, calc(100svh - 385px), 600px); }
  .v4-game .tt-bar span { padding: 2px 8px; }
}
@media (min-width: 1000px) {
  .hero-v4 { grid-template-columns: minmax(0, 36rem) auto; }
  .v4-copy h1 { font-size: clamp(2.75rem, 1.6rem + 2.4vw, 4rem); white-space: nowrap; }
}
@media (max-width: 999px) { .chips { flex-wrap: nowrap; } .chips li { padding: 4px 9px; } }
.legal-links { display: inline-flex; gap: var(--space-4); flex-wrap: wrap; }
.legal-links a { min-height: var(--tap); display: inline-flex; align-items: center; color: inherit; }
.contact-form { display: grid; gap: var(--space-2); max-width: 32rem; margin-top: var(--space-6); }
.contact-form label { font-weight: 600; margin-top: var(--space-2); }
.contact-form input, .contact-form textarea { border: 2px solid var(--ink); border-radius: var(--radius); padding: var(--space-3); font: 500 var(--text-md) var(--font-body); background: var(--paper); color: var(--ink); }
.contact-form input { min-height: 48px; }
.contact-form .button { justify-self: start; margin-top: var(--space-3); }
@media (max-width: 380px) { .chips { gap: 4px; } .chips li { padding: 3px 7px; font-size: 0.75rem; white-space: nowrap; } .chips li::before { width: 6px; height: 6px; } }
