/* DarkMath site v2 draft. One stylesheet, no framework. */
:root {
  color-scheme: dark;
  --ink: #0F0E17;
  --ink-2: #13111D;
  --surface: #1A1726;
  --surface-2: #221E31;
  --line: #2D283F;
  --line-2: #40385A;
  --text: #F4F1FB;
  --text-2: #CBC4DD;
  --muted: #9D95B5;
  --brand: #A586E6;
  --brand-ink: #7451C8;
  --brand-ink-hover: #8160D6;
  --brand-deep: #241C3B;
  --lavender: #D8CCFF;
  --mint: #93D6BC;
  --amber: #E8B86A;
  --radius-lg: 18px;
  --radius: 12px;
  --radius-sm: 8px;
  --maxw: 1180px;
  --pad: clamp(20px, 5vw, 48px);
  --font-display: "Oxanium", "Eurostile", "Segoe UI", system-ui, sans-serif;
  --font-text: "Onest", "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  box-sizing: border-box;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
*, *::before, *::after { box-sizing: inherit; }
html { scroll-padding-top: calc(env(safe-area-inset-top, 0px) + 84px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--text-2);
  font-family: var(--font-text);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: var(--brand); text-decoration: underline; text-decoration-color: rgba(165,134,230,.4); text-underline-offset: 3px; }
a:hover { color: var(--lavender); text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid var(--lavender); outline-offset: 3px; border-radius: 4px; }
::selection { background: #4A3A7A; color: #fff; }

h1, h2, h3, h4 { font-family: var(--font-display); color: var(--text); margin: 0 0 .5em; font-weight: 600; }
h1 { font-size: clamp(2.35rem, 1.35rem + 4.1vw, 4.3rem); line-height: 1.03; letter-spacing: -0.025em; }
h2 { font-size: clamp(1.75rem, 1.2rem + 2.1vw, 2.7rem); line-height: 1.1; letter-spacing: -0.015em; }
h3 { font-size: 1.28rem; line-height: 1.25; letter-spacing: -0.005em; }
h4 { font-size: 1.05rem; line-height: 1.3; }
p { margin: 0 0 1em; max-width: 68ch; }
ul, ol { padding-left: 1.2em; margin: 0 0 1em; }
li { margin: .25em 0; max-width: 66ch; }
strong { color: var(--text); font-weight: 600; }
small, .small { font-size: .875rem; }
.num { font-family: var(--font-display); font-variant-numeric: tabular-nums; color: var(--lavender); }
.lead { font-size: clamp(1.1rem, 1rem + .4vw, 1.28rem); line-height: 1.55; color: var(--text-2); max-width: 60ch; }
.muted { color: var(--muted); }
.note { font-size: .875rem; color: var(--muted); }

.skip { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--surface); color: var(--text); padding: 10px 14px; border-radius: var(--radius-sm); }
.skip:focus { left: 12px; }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding-left: var(--pad); padding-right: var(--pad); }
.section { padding-top: clamp(64px, 9vw, 120px); padding-bottom: clamp(64px, 9vw, 120px); }
.section--tight { padding-top: clamp(40px, 6vw, 72px); padding-bottom: clamp(40px, 6vw, 72px); }
.section--band { background: var(--ink-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { max-width: 760px; margin-bottom: clamp(28px, 4vw, 48px); }
.section-head p { color: var(--text-2); }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(24px, 4vw, 56px); }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(20px, 3vw, 36px); }
.grid-5 { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; }
.align-center { align-items: center; }
.stack > * + * { margin-top: 1rem; }
@media (max-width: 960px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .grid-5 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 520px) { .grid-5 { grid-template-columns: 1fr; } }

/* Buttons and chips */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5em; font-family: var(--font-text); font-weight: 600; font-size: 1rem; line-height: 1; padding: .95em 1.3em; border-radius: 10px; border: 1px solid transparent; text-decoration: none; cursor: pointer; transition: background-color .15s ease, border-color .15s ease, color .15s ease; }
.btn--primary { background: var(--brand-ink); color: #fff; }
.btn--primary:hover { background: var(--brand-ink-hover); color: #fff; }
.btn--ghost { background: transparent; color: var(--text); border-color: var(--line-2); }
.btn--ghost:hover { border-color: var(--brand); color: var(--text); }
.btn--small { font-size: .9rem; padding: .7em 1em; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.chip { display: inline-flex; align-items: center; gap: .45em; font-size: .8rem; font-weight: 600; line-height: 1; padding: .5em .8em; border-radius: 999px; border: 1px solid var(--line-2); color: var(--text-2); background: transparent; white-space: nowrap; }
.chip--new { border-color: var(--brand); color: var(--lavender); }
.chip--pilot { border-color: var(--line-2); color: var(--muted); }
.chip--rec { border-color: var(--lavender); color: var(--lavender); }
.chip--prep { background: var(--brand-deep); border-color: var(--brand); color: var(--lavender); }
.chip--done { border-color: var(--mint); color: var(--mint); }
.chip--warn { border-color: var(--amber); color: var(--amber); }
.dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; display: inline-block; }

/* Header */
.site-header { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50; background: rgba(15,14,23,.86); -webkit-backdrop-filter: saturate(140%) blur(12px); backdrop-filter: saturate(140%) blur(12px); border-bottom: 1px solid var(--line); }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10; background: rgba(15,14,23,.86); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.nav { display: flex; align-items: center; gap: 28px; min-height: 72px; }
.brand { display: inline-flex; align-items: center; text-decoration: none; flex: none; }
.brand img { height: 46px; width: auto; }
.nav-list { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0 0 0 auto; padding: 0; }
.nav-list > li { position: relative; margin: 0; }
.nav-link, .nav-trigger { display: inline-flex; align-items: center; gap: 6px; padding: 10px 12px; border-radius: 8px; color: var(--text-2); font-weight: 500; font-size: .98rem; text-decoration: none; background: none; border: 0; font-family: inherit; cursor: pointer; }
.nav-link:hover, .nav-trigger:hover, .nav-link[aria-current="page"] { color: var(--text); background: var(--surface); }
.nav-trigger svg { width: 12px; height: 12px; transition: transform .15s ease; }
.nav-trigger[aria-expanded="true"] svg { transform: rotate(180deg); }
.menu { position: absolute; top: calc(100% + 8px); left: -8px; min-width: 260px; background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--radius); padding: 8px; box-shadow: 0 18px 40px rgba(0,0,0,.45); display: none; list-style: none; margin: 0; }
.menu.open { display: block; }
.menu a { display: block; padding: 10px 12px; border-radius: 8px; color: var(--text); text-decoration: none; }
.menu a span { display: block; color: var(--muted); font-size: .85rem; margin-top: 2px; }
.menu a:hover { background: var(--surface-2); }
.nav-cta { margin-left: 8px; }
.nav-toggle { display: none; margin-left: auto; background: none; border: 1px solid var(--line-2); color: var(--text); border-radius: 10px; padding: 10px 12px; font: inherit; cursor: pointer; }
@media (max-width: 1080px) {
  .nav-toggle { display: inline-flex; }
  .nav-list, .nav-cta { display: none; }
  .site-header.open .nav { flex-wrap: wrap; }
  .site-header.open .nav-list { display: flex; flex-direction: column; align-items: stretch; width: 100%; margin: 0 0 12px; gap: 2px; }
  .site-header.open .nav-cta { display: inline-flex; width: 100%; margin: 0 0 16px; }
  .menu { position: static; display: none; box-shadow: none; border: 0; background: transparent; padding: 0 0 0 12px; min-width: 0; }
  .menu.open { display: block; }
  .nav-link, .nav-trigger { width: 100%; justify-content: space-between; padding: 12px; }
  .brand img { height: 40px; }
}

/* Draft banner and review layer */
.draft-banner { background: #2A2213; color: #F3DDB0; border-bottom: 1px solid #5A4520; font-size: .875rem; }
.draft-banner .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; padding-top: 8px; padding-bottom: 8px; }
.draft-banner button { background: transparent; color: #F3DDB0; border: 1px solid #7A5E2C; border-radius: 8px; padding: 6px 10px; font: inherit; cursor: pointer; }
.draft-banner button:hover { border-color: var(--amber); }
html.review-on .claim { outline: 1px dashed var(--amber); outline-offset: 2px; border-radius: 3px; cursor: help; background: rgba(232,184,106,.08); }
html.review-on .claim::after { content: attr(data-claim); font-family: var(--font-text); font-size: .62em; font-weight: 700; color: var(--amber); vertical-align: super; margin-left: 2px; letter-spacing: .02em; }
html.review-on [data-review-flag] { outline: 1px dashed var(--amber); outline-offset: 6px; }
.review-drawer { position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); z-index: 60; width: min(440px, calc(100vw - 32px)); max-height: min(70vh, 640px); overflow: auto; background: #1C1810; border: 1px solid #6B5326; color: #F3E6C8; border-radius: 14px; padding: 18px 18px 8px; box-shadow: 0 24px 60px rgba(0,0,0,.55); display: none; font-size: .9rem; line-height: 1.5; }
html.review-on .review-drawer { display: block; }
.review-drawer h2 { font-family: var(--font-text); font-size: 1rem; color: #FFE7B8; margin: 0 0 8px; letter-spacing: 0; }
.review-drawer h3 { font-family: var(--font-text); font-size: .8rem; color: var(--amber); margin: 14px 0 6px; letter-spacing: .02em; }
.review-drawer ul { padding-left: 1.1em; }
.review-drawer li { margin: .35em 0; }
.review-drawer .rid { font-weight: 700; color: var(--amber); }
.review-drawer .rstatus { display: inline-block; font-size: .75rem; border: 1px solid #7A5E2C; border-radius: 999px; padding: 1px 8px; margin-left: 4px; color: #F3DDB0; }
.claim-pop { position: absolute; z-index: 70; max-width: 340px; background: #1C1810; color: #F3E6C8; border: 1px solid #6B5326; border-radius: 10px; padding: 12px 14px; font-size: .85rem; line-height: 1.45; box-shadow: 0 16px 40px rgba(0,0,0,.5); }
.claim-pop strong { color: #FFE7B8; }

/* Hero */
.hero { padding-top: clamp(48px, 7vw, 96px); padding-bottom: clamp(56px, 8vw, 110px); position: relative; overflow: hidden; }
.hero::before { content: ""; position: absolute; inset: -20% -10% auto auto; width: 720px; height: 720px; background: radial-gradient(closest-side, rgba(116,81,200,.22), rgba(116,81,200,0)); pointer-events: none; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: clamp(32px, 5vw, 72px); align-items: center; position: relative; }
@media (max-width: 960px) { .hero-grid { grid-template-columns: 1fr; } }
.hero h1 { margin-bottom: .45em; }
.hero .lead { margin-bottom: 0; }
.product-mark { font-family: var(--font-display); font-weight: 600; color: var(--lavender); font-size: 1.05rem; margin: 0 0 14px; display: inline-flex; align-items: center; gap: 10px; }
.crumbs { font-size: .875rem; color: var(--muted); margin: 0 0 18px; }
.crumbs a { color: var(--muted); }
.crumbs ol { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.crumbs li { margin: 0; }
.crumbs li + li::before { content: "/"; margin-right: 6px; color: var(--line-2); }

/* Resolution board (home hero) */
.board-shell { background: linear-gradient(180deg, var(--surface), var(--ink-2)); border: 1px solid var(--line-2); border-radius: var(--radius-lg); padding: 18px; position: relative; }
.board-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; }
.board-title { font-weight: 600; color: var(--text); font-size: .95rem; }
.board { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; align-items: start; }
.slip { background: var(--ink); border: 1px solid var(--line-2); border-left: 3px solid var(--line-2); border-radius: 10px; padding: 10px 12px; font-size: .85rem; line-height: 1.4; position: relative; }
.slip .s-name { font-weight: 600; color: var(--text); }
.slip .s-meta { color: var(--muted); }
.slip .s-src { position: absolute; top: 9px; right: 10px; font-size: .72rem; color: var(--muted); }
.board-label { display: none; font-size: .82rem; color: var(--lavender); font-weight: 600; margin: 0 0 6px; }
.board.resolved { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); grid-template-rows: auto auto; }
.board.resolved .board-label { display: block; }
.board.resolved .label-a { grid-column: 1; grid-row: 1; }
.board.resolved .label-b { grid-column: 2; grid-row: 1; color: var(--muted); }
.board.resolved .slip[data-person="a"] { grid-column: 1; grid-row: 2; top: calc(var(--i) * 30px); border-left-color: var(--brand); box-shadow: 0 -6px 16px rgba(0,0,0,.35); }
.board.resolved .slip[data-person="b"] { grid-column: 2; grid-row: 2; border-left-color: var(--muted); }
.board-stack-space { display: none; }
.board.resolved .board-stack-space { display: block; grid-column: 1; grid-row: 3; height: 92px; }
.board-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; }
.answer { border: 1px solid var(--brand); border-radius: var(--radius); padding: 18px 20px; background: var(--brand-deep); max-width: 820px; }
.answer p { margin: 0; color: var(--text); }
.answer .q { font-family: var(--font-display); font-weight: 600; color: var(--lavender); margin-bottom: 6px; display: block; }
.tier .price { font-family: var(--font-display); color: var(--lavender); font-size: 1.1rem; margin: 0 0 10px; }
.split-note { display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: start; border-left: 3px solid var(--brand); padding: 4px 0 4px 16px; }
.agent-line { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 14px; display: grid; gap: 10px; opacity: 0; transform: translateY(6px); transition: opacity .5s ease, transform .5s ease; }
.agent-line.show { opacity: 1; transform: none; }
.bubble { border-radius: 12px; padding: 10px 12px; font-size: .9rem; line-height: 1.45; }
.bubble--user { background: var(--surface-2); color: var(--text); justify-self: end; max-width: 85%; }
.bubble--agent { background: var(--brand-deep); color: var(--text); border: 1px solid #3A2E5E; max-width: 95%; }
.bubble--agent .chip { margin-top: 8px; }
@media (max-width: 560px) {
  .board, .board.resolved { grid-template-columns: 1fr; }
  .board.resolved .label-b, .board.resolved .slip[data-person="b"] { grid-column: 1; }
  .board.resolved .label-b { grid-row: 4; }
  .board.resolved .slip[data-person="b"] { grid-row: 5; }
}

/* Flow rail (three products) */
.rail { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border: 1px solid var(--line-2); border-radius: var(--radius-lg); overflow: hidden; background: var(--ink-2); }
.station { padding: clamp(24px, 3vw, 40px); position: relative; display: flex; flex-direction: column; gap: 10px; }
.station + .station { border-left: 1px solid var(--line-2); }
.station .verb { font-family: var(--font-display); font-size: .95rem; color: var(--muted); display: flex; align-items: center; gap: 10px; }
.station .verb::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, var(--line-2), transparent); }
.station h3 { font-size: clamp(1.5rem, 1.1rem + 1.2vw, 2rem); margin: 4px 0 0; }
.station .job { color: var(--text); font-size: 1.05rem; font-weight: 500; margin: 0; }
.station p { margin: 0; }
.station ul { margin: 6px 0 0; padding-left: 1.1em; font-size: .95rem; }
.station .more { margin-top: auto; padding-top: 14px; font-weight: 600; }
.station--focus { background: linear-gradient(180deg, rgba(116,81,200,.16), rgba(116,81,200,0) 70%); }
@media (max-width: 960px) {
  .rail { grid-template-columns: 1fr; }
  .station + .station { border-left: 0; border-top: 1px solid var(--line-2); }
}

/* Panels, lists, tables */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: clamp(20px, 3vw, 32px); }
.panel--quiet { background: transparent; }
.panel h3 { margin-bottom: .4em; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; font-size: .92rem; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; color: var(--text); }
.ticks { list-style: none; padding: 0; }
.ticks li { position: relative; padding-left: 1.5em; }
.ticks li::before { content: ""; position: absolute; left: 0; top: .62em; width: .7em; height: .38em; border-left: 2px solid var(--brand); border-bottom: 2px solid var(--brand); transform: rotate(-45deg); }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; font-size: .95rem; min-width: 560px; }
caption { text-align: left; padding: 14px 16px 0; color: var(--muted); font-size: .875rem; }
th, td { text-align: left; padding: 13px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--text); font-weight: 600; background: var(--ink-2); font-size: .9rem; }
tbody tr:last-child td { border-bottom: 0; }
td .num, td strong { white-space: nowrap; }
.col-us { background: rgba(116,81,200,.08); }

/* Stats */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); }
.stat { padding: 22px 20px 22px 0; }
.stat + .stat { padding-left: 20px; border-left: 1px solid var(--line); }
.stat .big { font-family: var(--font-display); font-size: clamp(2rem, 1.4rem + 2vw, 3rem); line-height: 1; color: var(--text); font-variant-numeric: tabular-nums; }
.stat .big small { font-size: .45em; color: var(--muted); margin-left: 4px; }
.stat p { margin: 8px 0 0; font-size: .92rem; color: var(--text-2); }
@media (max-width: 860px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } .stat:nth-child(3) { border-left: 0; padding-left: 0; } .stat:nth-child(n+3) { border-top: 1px solid var(--line); } }

/* Steps (true sequences only) */
.steps { list-style: none; padding: 0; margin: 0; counter-reset: step; display: grid; gap: 0; }
.steps > li { counter-increment: step; display: grid; grid-template-columns: 56px 1fr; gap: 0 18px; padding: 20px 0; border-top: 1px solid var(--line); max-width: none; margin: 0; }
.steps > li:last-child { border-bottom: 1px solid var(--line); }
.steps > li::before { content: counter(step); font-family: var(--font-display); font-weight: 600; font-size: 1.1rem; color: var(--lavender); width: 40px; height: 40px; border: 1px solid var(--line-2); border-radius: 50%; display: grid; place-items: center; }
.steps h3 { margin: 6px 0 4px; font-size: 1.12rem; }
.steps p { margin: 0; }
.steps .gate { grid-column: 2; margin-top: 10px; }

/* Compare bars */
.bars { display: grid; gap: 14px; }
.bar-row { display: grid; grid-template-columns: 150px 1fr 64px; gap: 12px; align-items: center; font-size: .92rem; }
.bar-track { height: 14px; background: var(--ink); border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.bar-fill { display: block; height: 100%; background: var(--line-2); border-radius: 999px; width: var(--w); }
.bar-fill--us { background: var(--brand); }
.bar-row .v { text-align: right; font-family: var(--font-display); color: var(--text); font-variant-numeric: tabular-nums; }
@media (max-width: 560px) { .bar-row { grid-template-columns: 1fr 56px; } .bar-row .bar-track { grid-column: 1 / -1; grid-row: 2; } }

/* FAQ */
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; padding: 20px 40px 20px 0; position: relative; font-family: var(--font-display); font-weight: 600; color: var(--text); font-size: 1.12rem; line-height: 1.35; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 16px; font-size: 1.5rem; color: var(--brand); font-weight: 400; }
.faq details[open] summary::after { content: "\2212"; }
.faq .a { padding: 0 0 20px; }
.faq .a p:last-child { margin-bottom: 0; }

/* CTA band */
.cta-band { border: 1px solid var(--line-2); border-radius: var(--radius-lg); padding: clamp(28px, 5vw, 56px); background: radial-gradient(120% 140% at 100% 0%, rgba(116,81,200,.25), rgba(116,81,200,0) 55%), var(--surface); display: grid; grid-template-columns: minmax(0, 1.4fr) auto; gap: 24px; align-items: end; }
.cta-band h2 { margin-bottom: .3em; }
.cta-band p { margin: 0; }
.cta-band .actions { margin-top: 0; }
@media (max-width: 860px) { .cta-band { grid-template-columns: 1fr; } }

/* Industry links */
.ind { display: flex; flex-direction: column; gap: 6px; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--text-2); background: var(--ink-2); transition: border-color .15s ease; }
.ind strong { font-family: var(--font-display); font-size: 1.08rem; }
.ind:hover { border-color: var(--brand); color: var(--text-2); }

/* Context example */
.context-viz { display: grid; gap: 18px; }
.context-viz .verdict { font-family: var(--font-display); color: var(--text); font-size: 1.2rem; }

/* Demo shells */
.demo { border: 1px solid var(--line-2); border-radius: var(--radius-lg); background: var(--ink-2); overflow: hidden; }
.demo-top { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid var(--line); background: var(--surface); font-size: .88rem; }
.demo-top .who { color: var(--text); font-weight: 600; }
.demo-body { display: grid; grid-template-columns: 300px minmax(0, 1fr); min-height: 520px; }
.demo-side { border-right: 1px solid var(--line); padding: 18px; display: flex; flex-direction: column; gap: 10px; background: var(--ink-2); }
.demo-side h3 { font-family: var(--font-text); font-size: .85rem; color: var(--muted); font-weight: 600; margin: 4px 0 2px; }
.q-btn { text-align: left; background: var(--surface); color: var(--text); border: 1px solid var(--line-2); border-radius: 10px; padding: 12px 14px; font: inherit; font-size: .93rem; line-height: 1.4; cursor: pointer; }
.q-btn:hover { border-color: var(--brand); }
.q-btn[aria-pressed="true"] { border-color: var(--brand); background: var(--brand-deep); }
.fake-input { margin-top: auto; border: 1px dashed var(--line-2); border-radius: 10px; padding: 12px; font-size: .85rem; color: var(--muted); }
.modes { display: inline-flex; border: 1px solid var(--line-2); border-radius: 10px; overflow: hidden; }
.modes button { background: transparent; color: var(--text-2); border: 0; padding: 8px 12px; font: inherit; font-size: .85rem; cursor: pointer; }
.modes button + button { border-left: 1px solid var(--line-2); }
.modes button[aria-pressed="true"] { background: var(--brand-deep); color: var(--lavender); font-weight: 600; }
.demo-thread { padding: 20px; display: flex; flex-direction: column; gap: 14px; overflow: auto; max-height: 760px; }
.demo-thread .bubble--user { align-self: flex-end; max-width: 85%; }
.demo-empty { margin: auto; text-align: center; color: var(--muted); max-width: 40ch; }
.step-card { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; background: var(--surface); animation: rise .35s ease both; }
.step-card .sc-head { display: flex; align-items: center; gap: 10px; font-size: .8rem; color: var(--muted); font-weight: 600; margin-bottom: 6px; }
.step-card .sc-head b { color: var(--lavender); font-family: var(--font-display); }
.step-card p { margin: 0 0 .5em; font-size: .95rem; }
.step-card p:last-child { margin-bottom: 0; }
.step-card .kv { font-size: .88rem; }
.audience { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 10px; }
.audience > div { border: 1px solid var(--line); border-radius: 10px; padding: 10px; }
.audience .n { font-family: var(--font-display); font-size: 1.3rem; color: var(--text); }
.audience .l { font-size: .78rem; color: var(--muted); }
.action-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; border: 1px solid var(--line-2); border-radius: 12px; padding: 12px 14px; background: var(--ink); animation: rise .35s ease both; }
.action-bar .msg { flex: 1 1 260px; font-size: .9rem; }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.demo-foot { padding: 12px 18px; border-top: 1px solid var(--line); font-size: .82rem; color: var(--muted); background: var(--surface); }
@media (max-width: 900px) {
  .demo-body { grid-template-columns: 1fr; }
  .demo-side { border-right: 0; border-bottom: 1px solid var(--line); }
  .fake-input { margin-top: 6px; }
  .demo-thread { max-height: none; }
  .audience { grid-template-columns: 1fr 1fr; }
}

/* Match demo */
.mdemo-controls { display: flex; flex-wrap: wrap; gap: 8px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.mdemo-controls button { background: var(--surface); color: var(--text-2); border: 1px solid var(--line-2); border-radius: 10px; padding: 9px 13px; font: inherit; font-size: .9rem; cursor: pointer; }
.mdemo-controls button[aria-pressed="true"] { border-color: var(--brand); color: var(--lavender); background: var(--brand-deep); }
.clusters { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; padding: 18px; }
.cluster { border: 1px solid var(--line-2); border-radius: 12px; padding: 12px; background: var(--ink); display: grid; gap: 8px; align-content: start; }
.cluster h4 { font-family: var(--font-text); font-size: .85rem; color: var(--muted); margin: 0; font-weight: 600; }
.cluster.bad { border-color: #6B4A2A; }
.cluster.bad h4 { color: var(--amber); }
.cluster.good { border-color: #2F5A4A; }
.cluster.good h4 { color: var(--mint); }
.mdemo-summary { padding: 0 18px 18px; display: grid; gap: 10px; }
.reasons { font-size: .88rem; margin: 0; }

/* Mirror demo */
.mirror-panel { padding: 18px; display: grid; gap: 18px; }
.seg { display: inline-flex; border: 1px solid var(--line-2); border-radius: 10px; overflow: hidden; flex-wrap: wrap; }
.seg button { background: transparent; color: var(--text-2); border: 0; padding: 9px 13px; font: inherit; font-size: .9rem; cursor: pointer; }
.seg button + button { border-left: 1px solid var(--line-2); }
.seg button[aria-pressed="true"] { background: var(--brand-deep); color: var(--lavender); font-weight: 600; }
.reach { height: 28px; border-radius: 8px; background: var(--ink); border: 1px solid var(--line); display: flex; overflow: hidden; }
.reach .base { background: var(--line-2); }
.reach .add { background: var(--brand); transition: width .4s ease; }
.mirror-out { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.mirror-out div { border: 1px solid var(--line); border-radius: 12px; padding: 12px; }
.mirror-out .n { font-family: var(--font-display); font-size: 1.5rem; color: var(--text); font-variant-numeric: tabular-nums; }
.mirror-out .l { font-size: .82rem; color: var(--muted); }
@media (max-width: 700px) { .mirror-out { grid-template-columns: 1fr; } }

/* Video (click to load) */
.video { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line-2); background: #000; }
.video button { all: unset; cursor: pointer; position: absolute; inset: 0; display: grid; place-items: center; }
.video img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .7; }
.video .play { position: relative; width: 72px; height: 72px; border-radius: 50%; background: var(--brand-ink); display: grid; place-items: center; box-shadow: 0 10px 30px rgba(0,0,0,.4); }
.video .play svg { width: 26px; height: 26px; margin-left: 4px; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-cap { font-size: .875rem; color: var(--muted); margin-top: 10px; }

/* Forms */
form .field { display: grid; gap: 6px; margin-bottom: 16px; }
label { font-weight: 600; color: var(--text); font-size: .95rem; }
input, select, textarea { width: 100%; font: inherit; color: var(--text); background: var(--ink); border: 1px solid var(--line-2); border-radius: 10px; padding: 12px 14px; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--brand); outline-offset: 1px; border-color: transparent; }
textarea { min-height: 120px; resize: vertical; }
fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px 6px; margin: 0 0 16px; }
legend { padding: 0 6px; color: var(--text); font-weight: 600; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; color: var(--text-2); margin-bottom: 10px; }
.check input { width: auto; margin-top: 5px; }
.form-result { border: 1px solid var(--brand); background: var(--brand-deep); border-radius: var(--radius); padding: 16px 18px; display: none; }
.form-result.show { display: block; }

/* Article */
.article { max-width: 760px; }
.article h1 { font-size: clamp(2rem, 1.3rem + 2.6vw, 3.2rem); line-height: 1.08; }
.article h2 { font-size: clamp(1.45rem, 1.15rem + 1.1vw, 1.9rem); margin-top: 1.6em; }
.article blockquote { margin: 1.5em 0; padding: 4px 0 4px 20px; border-left: 3px solid var(--brand); color: var(--text); font-size: 1.15rem; }
.byline { color: var(--muted); font-size: .92rem; margin-bottom: 28px; }
.legal h2 { font-size: 1.4rem; margin-top: 1.6em; }
.legal h3 { font-size: 1.1rem; margin-top: 1.3em; }

/* Glossary */
.terms { display: grid; gap: 0; border-top: 1px solid var(--line); }
.term { display: grid; grid-template-columns: minmax(0, 260px) minmax(0, 1fr); gap: 8px 32px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.term dt { font-family: var(--font-display); font-weight: 600; color: var(--text); font-size: 1.08rem; }
.term dd { margin: 0; }
@media (max-width: 700px) { .term { grid-template-columns: 1fr; } }

/* Footer */
.site-footer { border-top: 1px solid var(--line); background: var(--ink-2); padding: 56px 0 32px; font-size: .92rem; }
.foot-grid { display: grid; grid-template-columns: 1.4fr repeat(4, minmax(0, 1fr)); gap: 28px; }
.foot-grid h2 { font-family: var(--font-text); font-size: .85rem; color: var(--text); font-weight: 600; margin: 0 0 12px; letter-spacing: 0; }
.foot-grid ul { list-style: none; padding: 0; margin: 0; }
.foot-grid li { margin: 0 0 8px; }
.foot-grid a { color: var(--text-2); text-decoration: none; }
.foot-grid a:hover { color: var(--text); text-decoration: underline; }
.foot-brand img { height: 52px; width: auto; margin-bottom: 14px; }
.foot-brand p { color: var(--muted); max-width: 36ch; }
.foot-legal { margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 10px 24px; justify-content: space-between; color: var(--muted); font-size: .85rem; }
.foot-legal p { margin: 0; max-width: 90ch; }
@media (max-width: 960px) { .foot-grid { grid-template-columns: 1fr 1fr; } .foot-brand { grid-column: 1 / -1; } }

/* Utilities */
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; } .mt-1 { margin-top: 12px; } .mt-2 { margin-top: 24px; } .mt-3 { margin-top: 40px; }
.hide-sm { } @media (max-width: 700px) { .hide-sm { display: none; } }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
