/* demand-lab design system. Per-idea theme tokens (--accent, --hero-*, fonts) are injected
   in each page's <head>; everything else is shared so pages stay comparable. */
:root {
  --bg: #fafaf8;
  --surface: #ffffff;
  --surface-2: #f3f3ef;
  --ink: #15171c;
  --muted: #5b606d;
  --line: #e3e2dc;
  --ok: #12804a;   --ok-soft: #e3f5ea;
  --warn: #9a5800; --warn-soft: #fff1d6;
  --bad: #b42318;  --bad-soft: #fde8e6;
  --info: #3355c8; --info-soft: #e7ecff;
  --max: 1140px;
  --shadow: 0 1px 2px rgba(16,18,24,.06), 0 12px 32px -12px rgba(16,18,24,.18);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e1014; --surface: #161920; --surface-2: #1c2029; --ink: #eceef2; --muted: #a0a6b3; --line: #2a2f39;
    --ok: #4cc27a; --ok-soft: #14301f; --warn: #e6a74a; --warn-soft: #33260f; --bad: #f2786b; --bad-soft: #3a1a17;
    --info: #8aa4ff; --info-soft: #1c2548;
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 16px 40px -16px rgba(0,0,0,.7);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0e1014; --surface: #161920; --surface-2: #1c2029; --ink: #eceef2; --muted: #a0a6b3; --line: #2a2f39;
  --ok: #4cc27a; --ok-soft: #14301f; --warn: #e6a74a; --warn-soft: #33260f; --bad: #f2786b; --bad-soft: #3a1a17;
  --info: #8aa4ff; --info-soft: #1c2548; color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 17px/1.6 var(--font-body, system-ui, sans-serif); }
h1, h2, h3, .brand, .stat, .price { font-family: var(--font-head, inherit); }
a { color: inherit; }
.mono { font-family: var(--font-mono, ui-monospace, monospace); font-size: .92em; }
.wrap { max-width: var(--max); margin: 0 auto; padding-left: 16px; padding-right: 16px; }
@media (min-width: 720px) { .wrap { padding-left: 28px; padding-right: 28px; } }
.muted { color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ── Nav ─────────────────────────────── */
.nav { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.nav .wrap { display: flex; align-items: center; gap: 20px; height: 62px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 19px; text-decoration: none; letter-spacing: -0.01em; }
.logo { width: 30px; height: 30px; border-radius: var(--radius, 8px); background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font-size: 15px; }
.nav-links { display: none; gap: 22px; margin-left: auto; font-size: 15px; }
.nav-links a { text-decoration: none; color: var(--muted); }
.nav-links a:hover, .nav-links a[aria-current] { color: var(--ink); }
@media (min-width: 820px) { .nav-links { display: flex; } }
.nav .btn { margin-left: auto; min-height: 40px; padding: 0 16px; font-size: 15px; }
@media (min-width: 820px) { .nav .btn { margin-left: 0; } }

/* ── Buttons ─────────────────────────── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; padding: 0 22px;
  border-radius: var(--radius, 10px); border: 2px solid var(--accent); background: var(--accent); color: var(--accent-ink);
  font: 700 16px/1 var(--font-body, system-ui); text-decoration: none; cursor: pointer; transition: transform .15s, box-shadow .15s; }
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.btn.ghost { background: transparent; color: inherit; border-color: currentColor; }
.btn:focus-visible, input:focus-visible, textarea:focus-visible, .chip-opt input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }

/* ── Hero ────────────────────────────── */
.hero { background: var(--hero-bg); color: var(--hero-ink); position: relative; overflow: hidden; }
.hero::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5; }
.hero.p-grid::before { background-image: linear-gradient(var(--hero-line) 1px, transparent 1px), linear-gradient(90deg, var(--hero-line) 1px, transparent 1px); background-size: 40px 40px; mask-image: linear-gradient(180deg, #000 30%, transparent); }
.hero.p-hazard::before { top: auto; height: 12px; opacity: 1; background: repeating-linear-gradient(-45deg, var(--accent) 0 16px, transparent 16px 32px); }
.hero.p-glow::before { opacity: 1; background: radial-gradient(circle at 85% 15%, color-mix(in srgb, var(--accent) 35%, transparent), transparent 55%); }
.hero.p-dots::before { background-image: radial-gradient(var(--hero-line) 1.5px, transparent 1.5px); background-size: 22px 22px; mask-image: linear-gradient(180deg, #000 20%, transparent 90%); }
.hero .wrap { position: relative; display: grid; gap: 40px; padding-top: 56px; padding-bottom: 64px; }
@media (min-width: 960px) { .hero .wrap { grid-template-columns: 1.1fr .9fr; align-items: center; padding-top: 80px; padding-bottom: 88px; } }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--hero-muted); }
.eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 30%, transparent); }
.hero h1 { font-size: clamp(36px, 5.6vw, 62px); line-height: 1.04; letter-spacing: -0.03em; margin: 16px 0 18px; font-weight: 800; }
.hero .sub { font-size: clamp(17px, 1.9vw, 20px); color: var(--hero-muted); max-width: 58ch; margin: 0 0 30px; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.hero .btn.ghost { color: var(--hero-ink); border-color: color-mix(in srgb, var(--hero-ink) 35%, transparent); }
.hero-meta { margin-top: 22px; font-size: 14px; color: var(--hero-muted); display: flex; flex-wrap: wrap; gap: 6px 18px; }
.hero-meta b { color: var(--hero-ink); }

/* ── Mockup primitives ───────────────── */
.mk-stack { position: relative; max-width: 440px; margin: 0 auto; padding-bottom: 112px; }
.device, .panel { background: var(--surface); color: var(--ink); border-radius: 28px; box-shadow: 0 30px 60px -20px rgba(0,0,0,.45); }
.device { border: 10px solid #111; border-radius: 38px; padding: 18px 16px 16px; max-width: 320px; margin: 0 auto; }
.panel { border-radius: calc(var(--radius, 12px) + 4px); border: 1px solid var(--line); overflow: hidden; }
.dv-bar, .pn-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.dv-bar { font-size: 13px; color: var(--muted); }
.dv-title { font-family: var(--font-head); font-weight: 700; font-size: 20px; margin: 8px 0 10px; }
.dv-meta { font-size: 13px; color: var(--muted); margin: 6px 0 12px; }
.dv-btn { margin-top: 14px; text-align: center; background: var(--accent); color: var(--accent-ink); border-radius: 12px; padding: 12px; font-weight: 700; font-size: 15px; }
.bar { height: 8px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--accent); border-radius: inherit; }
.pn-bar { display: flex; align-items: center; gap: 6px; padding: 12px 14px; border-bottom: 1px solid var(--line); background: var(--surface-2); font-size: 13px; color: var(--muted); }
.pn-bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--line); }
.pn-bar span { margin-left: 8px; }
.pn-head { justify-content: flex-start; gap: 14px; padding: 18px 18px 8px; }
.pn-title { font-family: var(--font-head); font-weight: 800; font-size: 18px; }
.pn-sub { font-size: 13px; color: var(--muted); }
.ring { --p: 50; width: 58px; height: 58px; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: conic-gradient(var(--accent) calc(var(--p) * 1%), var(--surface-2) 0); }
.ring span { width: 44px; height: 44px; border-radius: 50%; background: var(--surface); display: grid; place-items: center; font-weight: 800; font-size: 14px; }
.mk-list { list-style: none; margin: 0; padding: 0; }
.panel .mk-list { padding: 6px 10px 12px; }
.mk-list li { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items: center; padding: 10px 8px; border-bottom: 1px solid var(--line); font-size: 14px; }
.panel .mk-list li { grid-template-columns: 70px 1fr auto; }
.mk-list li:last-child { border-bottom: 0; }
.mk-list .muted { font-size: 13px; }
.badge { display: inline-flex; align-items: center; justify-content: center; min-width: 26px; padding: 3px 9px; border-radius: 99px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.bad { background: var(--bad-soft); color: var(--bad); }
.badge.info { background: var(--info-soft); color: var(--info); }
.pulse { animation: pulse 2.4s ease-in-out infinite; border-radius: 10px; }
@keyframes pulse { 50% { background: var(--warn-soft); } }
@media (prefers-reduced-motion: reduce) { .pulse { animation: none; } html { scroll-behavior: auto; } }
.mk-float { position: absolute; right: -6px; bottom: 0; z-index: 2; max-width: 270px; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; box-shadow: var(--shadow); font-size: 14px; }
@media (max-width: 480px) { .mk-float { position: relative; right: auto; margin: -24px auto 0; } .mk-stack { padding-bottom: 0; } }
.mk-float-h { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 6px; }
.mk-flow { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; color: var(--muted); }
.chip { display: inline-block; padding: 4px 9px; border-radius: 8px; background: var(--accent-soft); color: var(--ink); font-weight: 600; font-size: 13px; }

/* ── Sections ────────────────────────── */
section.block { padding: 72px 0; }
section.block.alt { background: var(--surface-2); }
.kicker { font-size: 13px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 0 0 10px; }
h2 { font-size: clamp(28px, 3.6vw, 42px); line-height: 1.1; letter-spacing: -0.025em; margin: 0 0 14px; font-weight: 800; }
.lead { font-size: 19px; color: var(--muted); max-width: 62ch; margin: 0 0 36px; }

.stats { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.stat-card { background: var(--surface); border: 1px solid var(--line); border-top: 4px solid var(--accent); border-radius: var(--radius, 12px); padding: 26px 24px; box-shadow: var(--shadow); }
.stat { font-size: clamp(34px, 4vw, 44px); font-weight: 800; letter-spacing: -0.03em; line-height: 1; margin-bottom: 12px; }
.stat-card p { margin: 0; color: var(--muted); }

.ba { display: grid; gap: 16px; }
@media (min-width: 820px) { .ba { grid-template-columns: 1fr 1fr; } }
.ba-col { border-radius: var(--radius, 12px); padding: 26px; border: 1px solid var(--line); background: var(--surface); }
.ba-col.after { border: 2px solid var(--accent); box-shadow: var(--shadow); }
.ba-col h3 { margin: 0 0 14px; font-size: 20px; }
.ba-col ul { list-style: none; padding: 0; margin: 0; }
.ba-col li { position: relative; padding: 10px 0 10px 34px; border-top: 1px solid var(--line); }
.ba-col li:first-child { border-top: 0; }
.ba-col li::before { position: absolute; left: 0; top: 10px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 800; }
.ba-col.before li::before { content: "✕"; background: var(--bad-soft); color: var(--bad); }
.ba-col.after li::before { content: "✓"; background: var(--ok-soft); color: var(--ok); }

.steps { display: grid; gap: 16px; counter-reset: s; }
@media (min-width: 820px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.step { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius, 12px); padding: 26px 24px; }
.step::before { counter-increment: s; content: counter(s, decimal-leading-zero); font-family: var(--font-mono, var(--font-head)); font-size: 14px; font-weight: 700; color: var(--accent-strong, var(--ink)); background: var(--accent-soft); padding: 4px 10px; border-radius: 99px; display: inline-block; margin-bottom: 14px; }
.step h3 { margin: 0 0 8px; font-size: 20px; }
.step p { margin: 0; color: var(--muted); }

/* ── Compare table ───────────────────── */
.cmp { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius, 12px); overflow: hidden; font-size: 16px; }
.cmp th, .cmp td { text-align: left; vertical-align: top; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.cmp tr:last-child th, .cmp tr:last-child td { border-bottom: 0; }
.cmp thead th { background: var(--surface-2); font-size: 14px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.cmp thead th.us { color: var(--ink); background: var(--accent-soft); }
.cmp td.us { background: color-mix(in srgb, var(--accent-soft) 45%, transparent); font-weight: 600; }
.cmp tbody th { font-weight: 700; width: 24%; }
@media (max-width: 719px) {
  .cmp, .cmp tbody, .cmp tr, .cmp th, .cmp td { display: block; width: 100%; }
  .cmp thead { display: none; }
  .cmp tr { border-bottom: 1px solid var(--line); padding: 6px 0; }
  .cmp tbody th { border: 0; padding-bottom: 4px; width: 100%; }
  .cmp td { border: 0; padding-top: 6px; padding-bottom: 6px; }
  .cmp td::before { content: attr(data-label); display: block; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
}
.more { display: inline-flex; align-items: center; gap: 6px; margin-top: 18px; font-weight: 700; text-decoration: none; border-bottom: 2px solid var(--accent); }

.answer { background: var(--surface); border: 1px solid var(--line); border-left: 5px solid var(--accent); border-radius: var(--radius, 12px); padding: 22px 24px; box-shadow: var(--shadow); font-size: 18px; }
.answer strong { display: block; font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }

.calc { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius, 12px); padding: 24px; }
.calc h3 { margin-top: 0; }
.calc dl { margin: 0; display: grid; grid-template-columns: 1fr auto; }
.calc dt, .calc dd { padding: 10px 0; border-bottom: 1px solid var(--line); margin: 0; }
.calc dd { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; padding-left: 12px; }
.calc .total dt, .calc .total dd { font-weight: 800; border-bottom: 0; }
.calc .ours dt, .calc .ours dd { font-weight: 800; color: var(--ok); border-bottom: 0; }
.two { display: grid; gap: 16px; }
@media (min-width: 820px) { .two { grid-template-columns: 1fr 1fr; } }
.plain-list { margin: 0; padding-left: 20px; }
.plain-list li { margin: 8px 0; }
.crumbs { font-size: 14px; color: var(--hero-muted); margin-bottom: 8px; }
.crumbs a { color: var(--hero-ink); }

/* ── Offer + form ────────────────────── */
.offer { display: grid; gap: 20px; }
@media (min-width: 900px) { .offer { grid-template-columns: .9fr 1.1fr; align-items: start; } }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius, 12px); padding: 28px; box-shadow: var(--shadow); }
.card.seat { background: var(--hero-bg); color: var(--hero-ink); border: 0; }
.card.seat .fine, .card.seat .anchor { color: var(--hero-muted); }
.price { font-size: 52px; font-weight: 800; letter-spacing: -0.04em; line-height: 1; margin: 8px 0; }
.anchor { color: var(--muted); }
ul.ticks { padding: 0; margin: 18px 0; list-style: none; }
ul.ticks li { padding-left: 28px; position: relative; margin: 10px 0; }
ul.ticks li::before { content: "✓"; position: absolute; left: 0; color: var(--accent); font-weight: 900; }
.fine { font-size: 14px; color: var(--muted); }
form.signup { display: grid; gap: 14px; }
form.signup label, fieldset legend { font-size: 15px; font-weight: 700; }
fieldset { border: 0; padding: 0; margin: 0; }
fieldset legend { margin-bottom: 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-opt { position: relative; }
.chip-opt input { position: absolute; opacity: 0; inset: 0; }
.chip-opt span { display: inline-block; padding: 9px 14px; border: 1.5px solid var(--line); border-radius: 99px; font-size: 15px; cursor: pointer; background: var(--bg); }
.chip-opt input:checked + span { border-color: var(--accent); background: var(--accent-soft); font-weight: 700; }
input[type=email], input[type=text], textarea { width: 100%; min-height: 48px; padding: 10px 14px; border-radius: 10px; border: 1.5px solid var(--line); background: var(--bg); color: var(--ink); font: inherit; }
textarea { min-height: 84px; resize: vertical; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.msg { min-height: 1.5em; font-weight: 700; margin: 0; }
.msg.ok { color: var(--ok); }
.msg.warn { color: var(--warn); }
.card.seat .msg.warn { color: var(--accent); }

/* ── FAQ, sources, footer ────────────── */
.faq details { border-bottom: 1px solid var(--line); padding: 18px 0; max-width: 820px; }
.faq summary { cursor: pointer; font-weight: 700; font-size: 18px; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::after { content: "+"; font-size: 22px; line-height: 1; color: var(--muted); }
.faq details[open] summary::after { content: "–"; }
.faq summary::-webkit-details-marker { display: none; }
.faq details p { color: var(--muted); margin: 12px 0 0; }
.sources { font-size: 14px; color: var(--muted); padding: 36px 0; }
.sources ul { padding-left: 18px; margin: 8px 0 0; }
.updated { font-size: 14px; color: var(--muted); }
footer { border-top: 1px solid var(--line); padding: 32px 0 48px; color: var(--muted); font-size: 14px; }
footer a { color: var(--muted); }

/* ── Simple pages (lab, legal, 404) ──── */
.simple { padding: 56px 0; max-width: 760px; }
.simple h1 { font-size: clamp(32px, 5vw, 48px); letter-spacing: -0.02em; margin: 0 0 12px; }
table.stats { width: 100%; border-collapse: collapse; font-size: 15px; }
table.stats th, table.stats td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); }
table.stats td.num, table.stats th.num { text-align: right; font-variant-numeric: tabular-nums; }
.table-scroll { overflow-x: auto; }
