/* Same type and colours as the app: Plus Jakarta Sans for text, Geist Mono for the small print,
   the logo's #070606 and #99ACFF (app/src/theme). */
:root {
  --bg: #F6F7F9;
  --card: #FFFFFF;
  --card-2: #F0F2F6;
  --text: #0B0D12;
  --muted: #5B6472;
  --border: #E3E6EB;
  --primary: #99ACFF;
  --on-primary: #070606;
  --accent: #3A55C8;
  --ok: #12805C;
  --warn: #B45309;
  --bad: #C62828;
  --glow: rgba(58, 85, 200, 0.14);
  --nav-bg: rgba(246, 247, 249, 0.72);
  --sans: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #070606; --card: #131212; --card-2: #1b1a1a; --text: #F3F2F2; --muted: #9C9A9A; --border: #292727;
    --accent: #99ACFF; --ok: #4CD7A0; --warn: #F5B25B; --bad: #FF7A7A;
    --glow: rgba(153, 172, 255, 0.16); --nav-bg: rgba(7, 6, 6, 0.7);
  }
}
:root[data-theme="dark"] {
  --bg: #070606; --card: #131212; --card-2: #1b1a1a; --text: #F3F2F2; --muted: #9C9A9A; --border: #292727;
  --accent: #99ACFF; --ok: #4CD7A0; --warn: #F5B25B; --bad: #FF7A7A;
  --glow: rgba(153, 172, 255, 0.16); --nav-bg: rgba(7, 6, 6, 0.7);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 64px; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--sans); font-size: 16px; line-height: 1.55;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
code { font-family: var(--mono); font-size: 0.92em; }

/* ---------- nav: a compact bar split into cells by hairlines ---------- */
.nav, .hero, .section, .footer { width: 100%; padding-inline: var(--gutter); }
.nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: stretch; height: 56px; padding-block: 0;
  background: var(--nav-bg);
  -webkit-backdrop-filter: saturate(160%) blur(14px); backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--border);
}
.brand { display: inline-flex; align-items: center; gap: 10px; padding: 0 18px; border-inline: 1px solid var(--border); }
.mark { width: 26px; height: 26px; border-radius: 7px; overflow: hidden; display: block; }
.mark .mk-dark { display: none; }
.mark { mix-blend-mode: multiply; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .mark { mix-blend-mode: normal; }
  :root:not([data-theme="light"]) .mark .mk-light { display: none; }
  :root:not([data-theme="light"]) .mark .mk-dark { display: block; }
}
:root[data-theme="dark"] .mark { mix-blend-mode: normal; }
:root[data-theme="dark"] .mark .mk-light { display: none; }
:root[data-theme="dark"] .mark .mk-dark { display: block; }
.mark img { width: 100%; height: 100%; display: block; }
.brand-name { font-weight: 400; font-size: 18px; letter-spacing: -0.01em; }
.links { display: flex; margin-right: auto; font-size: 13.5px; color: var(--muted); }
.links a { display: flex; align-items: center; padding: 0 16px; border-right: 1px solid var(--border); transition: color .15s, background-color .15s; }
.links a:hover { color: var(--text); background: var(--card); }
.nav-cta { display: flex; align-items: center; border-inline: 1px solid var(--border); font-size: 13.5px; }
.nav-link { display: flex; align-items: center; height: 100%; padding: 0 16px; color: var(--muted); border-right: 1px solid var(--border); }
.nav-link:hover { color: var(--text); }
.nav-cta .btn { margin-inline: 10px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 22px; border-radius: 14px;
  font-weight: 500; font-size: 15px; border: 1px solid transparent;
  transition: transform .15s ease, border-color .15s ease, background-color .15s ease, box-shadow .2s ease;
}
.btn.small { min-height: 38px; padding: 0 16px; border-radius: 11px; font-size: 14px; }
.btn:active { transform: scale(0.98); }
.btn .and { flex: none; margin-right: 10px; margin-left: -2px; }
.btn .and-eye { fill: var(--primary); }
.btn.primary { background: var(--primary); color: var(--on-primary); box-shadow: 0 0 0 0 var(--glow); }
.btn.primary:hover { background: #AEBDFF; box-shadow: 0 8px 30px -6px var(--glow), 0 0 0 4px var(--glow); }
.btn.ghost { border-color: var(--border); color: var(--text); background: var(--card); }
.btn.ghost:hover { border-color: var(--accent); }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* ---------- hero ---------- */
.eyebrow {
  margin: 0 0 16px; font-family: var(--mono); font-size: 12px;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted);
}
.pulse { position: relative; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); }
.pulse::after {
  content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 1px solid var(--ok);
  animation: ping 2s ease-out infinite;
}
@keyframes ping { from { transform: scale(.5); opacity: .9; } to { transform: scale(1.8); opacity: 0; } }

.hero {
  --k: min(44vw, 620px, calc((100svh - 56px) * 0.85));
  position: relative; overflow: hidden;
  min-height: calc(100svh - 56px);
  display: block; text-align: left;
  padding-block: clamp(40px, 11vh, 120px) 128px;
  /* the same vertical rules as the framed column below */
  background-image: linear-gradient(var(--border), var(--border)), linear-gradient(var(--border), var(--border));
  background-size: 1px 100%; background-repeat: no-repeat;
  background-position: left var(--gutter) top 0, right var(--gutter) top 0;
}
.hero-copy { position: relative; z-index: 1; max-width: 46rem; margin-left: clamp(20px, 3vw, 48px); }
h1 {
  margin: 0; font-weight: 400;
  font-size: clamp(34px, 4.8vw, 68px); line-height: 1.06; letter-spacing: -0.035em; text-wrap: balance;
}
.accent { color: var(--accent); }
.lede { margin: 22px 0 0; max-width: 34em; font-size: clamp(15px, 1.25vw, 18px); color: var(--muted); }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

/* The knot emerges from the bottom-right corner; the hero clips whatever runs past the edge. */
.hero-art { position: absolute; right: calc(var(--k) * -0.16); bottom: calc(var(--k) * -0.18); width: var(--k); z-index: 0; }
#knot { width: 100%; aspect-ratio: 1 / 1; display: block; }

.dither-word { position: relative; display: inline-block; }
.dither-word canvas { position: absolute; left: 0; top: 0; pointer-events: none; }
.dither-word.is-ready .dither-text { color: transparent; }

/* ---------- shared ---------- */
:root { --r: 6px; --gutter: clamp(16px, 4vw, 72px); }
h2 {
  margin: 0; font-weight: 400;
  font-size: clamp(24px, 2.6vw, 36px); line-height: 1.14; letter-spacing: -0.03em; text-wrap: balance;
}
h2.center { text-align: center; margin-inline: auto; max-width: 30em; }
h3 { margin: 0 0 12px; font-weight: 400; font-size: clamp(20px, 1.9vw, 26px); line-height: 1.2; letter-spacing: -0.02em; }
h4 { margin: 0; font-weight: 500; font-size: 15px; }
p { color: var(--muted); }
.lede { margin: 18px 0 0; font-size: 16px; color: var(--muted); }
.ticks { list-style: none; margin: 22px 0 0; padding: 0; display: grid; gap: 10px; }
.ticks li { position: relative; padding-left: 20px; color: var(--text); font-size: 14.5px; }
.ticks li::before { content: ""; position: absolute; left: 0; top: 0.55em; width: 7px; height: 7px; background: var(--accent); }
.dot-ok, .dot-bad { flex: none; display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 10px; }
.dot-ok { background: var(--ok); } .dot-bad { background: var(--bad); }
.unit { font-size: 15px; color: var(--muted); letter-spacing: 0; }
.ico { font-family: var(--mono); color: var(--accent); }
.ico.big { display: block; font-size: 20px; margin-bottom: 14px; }

.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }

/* ---------- facts strip: cells split by hairlines ---------- */
.strip { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); border-block: 1px solid var(--border); }
.strip-cell {
  display: flex; align-items: center; justify-content: center; gap: 12px; padding: 22px 12px; text-align: left;
  font-size: 13px; line-height: 1.3; color: var(--text); border-right: 1px solid var(--border);
}
.strip-cell:last-child { border-right: 0; }
.strip-cell .ico { font-size: 18px; }

/* ---------- framed column: vertical rules, sections divided by hairlines ---------- */
.frame { margin-inline: var(--gutter); border-inline: 1px solid var(--border); }
.band { padding: clamp(48px, 9vh, 96px) clamp(20px, 3vw, 48px); border-bottom: 1px solid var(--border); }
.band.nopad { padding-inline: 0; padding-bottom: 0; }
.band-top { padding-inline: clamp(20px, 3vw, 48px); padding-bottom: 28px; }
.band.nopad .band-top { border-bottom: 1px solid var(--border); }
.eyebrow { margin: 0 0 14px; font-family: var(--mono); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }

/* statement: tags on rays */
.statement { overflow: hidden; }
.strings { position: relative; margin-top: 40px; min-height: 260px; display: grid; place-items: center; }
.strings svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.strings svg line { stroke: var(--border); stroke-width: 1; vector-effect: non-scaling-stroke; }
.chips-cloud { position: relative; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 14px; max-width: 640px; }
.chips-cloud span {
  position: relative; padding: 7px 14px; background: var(--bg); border: 1px solid var(--border);
  font-size: 13.5px; color: var(--muted); transition: color .4s ease, border-color .4s ease, background-color .4s ease, transform .4s var(--ease);
}
.chips-cloud span::before, .chips-cloud span::after { content: ""; position: absolute; top: 50%; width: 3px; height: 3px; background: var(--muted); opacity: .6; transform: translateY(-50%); }
.chips-cloud span::before { left: -8px; } .chips-cloud span::after { right: -8px; }
.chips-cloud span.hot { color: var(--text); border-color: var(--accent); background: var(--card); transform: translateY(-2px); }

/* decide: side list + stacked rows */
.decide { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: clamp(20px, 3vw, 48px); margin-top: 48px; align-items: start; }
.side { position: sticky; top: 90px; display: grid; border: 1px solid var(--border); border-radius: var(--r); overflow: hidden; background: var(--bg); }
.side button {
  display: flex; justify-content: space-between; align-items: center; gap: 8px; width: 100%; text-align: left;
  font: inherit; font-size: 13.5px; color: var(--muted); background: transparent; border: 0; border-top: 1px solid var(--border);
  padding: 11px 14px; cursor: pointer; transition: color .2s, background-color .2s;
}
.side button:first-child { border-top: 0; }
.side button i { font-style: normal; opacity: 0; transform: translateX(-4px); transition: opacity .2s, transform .25s var(--ease); }
.side button:hover { color: var(--text); }
.side button[aria-current="true"] { color: var(--text); background: var(--card); }
.side button[aria-current="true"] i { opacity: 1; transform: none; }

.rows { border: 1px solid var(--border); border-radius: var(--r); overflow: hidden; }
.row { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(20px, 3vw, 40px); padding: clamp(18px, 2.4vw, 28px); align-items: center; border-top: 1px solid var(--border); }
.row:first-child { border-top: 0; }
.row.flip .row-text { order: 2; }
.row-text p { margin: 0; font-size: 14.5px; }
.more { display: inline-flex; gap: 8px; margin-top: 20px; font-size: 14px; color: var(--text); }
.more i { font-style: normal; transition: transform .25s var(--ease); }
.more:hover i { transform: translateX(4px); }

/* colour tiles with a dithered square field (painted by app.js) */
.tile, .fit-big { --t1: #99ACFF; --t2: #B9C6FF; position: relative; overflow: hidden; border-radius: 4px; min-height: 340px; display: grid; place-items: center; padding: clamp(16px, 2.4vw, 28px); background: var(--t1); }
.tile[data-hue="lavender"], .fit-big[data-hue="lavender"] { --t1: #8DA2FF; --t2: #B3C1FF; }
.tile[data-hue="mint"] { --t1: #5FD6A6; --t2: #8BE6C2; }
.tile[data-hue="amber"] { --t1: #F2B24D; --t2: #F7CB7E; }
.tile[data-hue="blue"] { --t1: #6C8CF7; --t2: #93AAFB; }
.tile-bg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.tile > :not(.tile-bg) { position: relative; width: 100%; }
.tile p, .fit-big p { color: inherit; }

/* widgets inside tiles use the page tokens on solid cards */
.term-card, .compare, .limits, .phone { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 18px; max-width: 460px; margin-inline: auto; box-shadow: 0 24px 60px -30px rgba(0, 0, 0, .55); }
.term { display: grid; margin: 0; padding: 16px 18px; background: var(--card-2); border: 1px solid var(--border); border-radius: 8px; font-family: var(--mono); font-size: 13px; line-height: 1.8; color: var(--text); overflow: hidden; }
.term b { color: var(--accent); font-weight: 500; } .term u { text-decoration: none; color: var(--ok); } .term em { font-style: normal; color: var(--muted); }
.tl { display: block; white-space: pre; overflow: hidden; clip-path: inset(0 100% 0 0); }
.tile.play .tl { animation: type .7s steps(30, end) both; animation-delay: calc(var(--i) * .5s + .2s); }
@keyframes type { to { clip-path: inset(0 0 0 0); } }
.sent { margin: 14px 2px 0; font-size: 13.5px; display: flex; align-items: center; opacity: 0; }
.tile.play .sent { animation: fadeUp .5s var(--ease) 2.6s both; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.seg { display: inline-flex; padding: 3px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg); gap: 2px; }
.seg button { font: inherit; font-size: 13px; border: 0; background: transparent; color: var(--muted); padding: 7px 12px; border-radius: 6px; cursor: pointer; transition: background-color .2s, color .2s; }
.seg button[aria-selected="true"] { background: var(--card-2); color: var(--text); }
.cmp-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.cmp-card { border: 1px solid var(--border); border-radius: 8px; padding: 14px; background: var(--bg); transition: border-color .35s ease, box-shadow .35s ease; }
.cmp-label { margin: 0 0 10px; font-family: var(--mono); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; }
.cmp-big { margin: 0; font-size: 15.5px; color: var(--text); letter-spacing: -0.01em; display: grid; }
.cmp-sub { margin: 6px 0 0; font-size: 13px; display: grid; }
.swap { grid-area: 1 / 1; transition: opacity .4s ease, transform .4s var(--ease); }
.compare[data-mode="honest"] .swap-liar, .compare[data-mode="liar"] .swap-honest { opacity: 0; transform: translateY(8px); pointer-events: none; }
.verdict { margin: 14px 2px 0; display: grid; font-size: 13.5px; color: var(--text); }
.verdict .swap { display: flex; align-items: flex-start; } .verdict .dot-ok, .verdict .dot-bad { margin-top: 6px; }
.compare[data-mode="honest"] .cmp-card.real { border-color: color-mix(in srgb, var(--ok) 55%, var(--border)); }
.compare[data-mode="liar"] .cmp-card.real { border-color: color-mix(in srgb, var(--bad) 65%, var(--border)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--bad) 14%, transparent); }
.cmp-note { margin: 12px 2px 0; font-family: var(--mono); font-size: 11px; color: var(--muted); }

.slider-amount { margin: 0; font-family: var(--mono); font-size: 34px; letter-spacing: -0.03em; color: var(--text); line-height: 1.1; }
#limitRange { -webkit-appearance: none; appearance: none; width: 100%; height: 28px; background: transparent; margin: 14px 0 2px; cursor: pointer; }
#limitRange::-webkit-slider-runnable-track { height: 6px; border-radius: 6px; background: linear-gradient(90deg, var(--ok) 0 2%, var(--accent) 2% 60%, var(--bad) 60% 100%); opacity: .85; }
#limitRange::-moz-range-track { height: 6px; border-radius: 6px; background: linear-gradient(90deg, var(--ok) 0 2%, var(--accent) 2% 60%, var(--bad) 60% 100%); opacity: .85; }
#limitRange::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; margin-top: -8px; border-radius: 50%; background: var(--text); border: 4px solid var(--card); box-shadow: 0 0 0 1px var(--border); }
#limitRange::-moz-range-thumb { width: 16px; height: 16px; border-radius: 50%; background: var(--text); border: 4px solid var(--card); }
.slider-scale { position: relative; height: 18px; font-family: var(--mono); font-size: 10.5px; color: var(--muted); }
.slider-scale span { position: absolute; top: 0; white-space: nowrap; }
.tiers { margin-top: 14px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.tiers article { border: 1px solid var(--border); border-radius: 8px; padding: 12px; background: var(--bg); opacity: .5; transition: opacity .3s ease, border-color .3s ease, box-shadow .3s ease; }
.tiers article.active { opacity: 1; border-color: var(--accent); box-shadow: 0 0 0 3px var(--glow); }
.tiers article[data-tier="block"].active { border-color: var(--bad); box-shadow: 0 0 0 3px color-mix(in srgb, var(--bad) 14%, transparent); }
.tier-tag { margin: 0 0 14px; font-family: var(--mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); }
.tier-tag.warn { color: var(--warn); }
.outcome { margin: 14px 2px 0; font-size: 13.5px; color: var(--text); min-height: 2.8em; }

.phone { position: relative; overflow: hidden; max-width: 380px; }
.phone p { margin: 0; }
.mock-top { display: flex; justify-content: space-between; align-items: center; font-size: 14px; }
.mock-agent { font-weight: 500; }
.mock-timer { font-family: var(--mono); font-size: 11.5px; color: var(--warn); border: 1px solid var(--border); border-radius: 999px; padding: 3px 9px; }
.mock-verb { margin-top: 18px !important; font-size: 13.5px; }
.mock-amount { font-family: var(--mono); font-size: 34px; letter-spacing: -0.03em; color: var(--text) !important; line-height: 1.2; }
.mock-rows { margin: 14px 0 0; display: grid; }
.mock-rows div { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-top: 1px solid var(--border); font-size: 13.5px; }
.mock-rows dt { color: var(--muted); } .mock-rows dd { margin: 0; font-family: var(--mono); font-size: 12.5px; text-align: right; }
.phone[data-state="decode"] .mock-rows div { animation: fadeUp .5s var(--ease) both; animation-delay: calc(var(--i) * .25s + .2s); }
/* fingerprint: appears over the rows only while "Hold to approve" is being pressed */
.mid { position: static; } /* so .fp covers the whole card, like .signed */
.mock-rows { transition: opacity .35s ease; }
.fp { position: absolute; z-index: 2; inset: 0; display: grid; place-content: center; justify-items: center; gap: 8px; opacity: 0; pointer-events: none; transition: opacity .25s ease; color: var(--accent); background: var(--card); }
.phone[data-state="scan"] .fp { opacity: 1; }
.fp-art { position: relative; width: 84px; height: 84px; }
.fp-art::before { content: ""; position: absolute; left: 50%; top: 50%; width: 76px; height: 76px; margin: -38px 0 0 -38px; border-radius: 50%; border: 1px solid currentColor; opacity: 0; }
.fp-art svg { position: relative; display: block; }
.fp-base { opacity: .22; }
.fp-draw path { stroke-dasharray: 1; stroke-dashoffset: 1; }
.phone[data-state="scan"] .fp-draw path { animation: ridge .7s ease-out forwards; animation-delay: calc(var(--i) * .17s + .05s); }
@keyframes ridge { to { stroke-dashoffset: 0; } }
.phone[data-state="scan"] .fp-art { animation: fpglow .9s ease-in-out 1.7s 1; }
@keyframes fpglow { 50% { filter: drop-shadow(0 0 5px currentColor); } }
.fp-cap { margin: 0; font-family: var(--mono); font-size: 11px; letter-spacing: .06em; color: var(--muted); }
.mock-actions { display: grid; grid-template-columns: 1fr 1.7fr; gap: 8px; margin-top: 14px; }
.mock-btn { position: relative; overflow: hidden; display: grid; place-items: center; min-height: 44px; border-radius: 8px; border: 1px solid var(--border); font-size: 14px; font-weight: 500; }
.mock-btn.primary { background: var(--primary); color: var(--on-primary); border-color: transparent; }
.hold-fill { position: absolute; inset: 0; background: rgba(7, 6, 6, .22); transform: scaleX(0); transform-origin: left; }
.phone[data-state="hold"] .hold-fill { animation: fill 1.5s cubic-bezier(.4, 0, .2, 1) .2s forwards; }
.phone[data-state="scan"] .hold-fill, .phone[data-state="signed"] .hold-fill { transform: scaleX(1); }
@keyframes fill { to { transform: scaleX(1); } }
.hold-label { position: relative; display: grid; } .hold-label > span { grid-area: 1 / 1; transition: opacity .25s ease; }
.l-ver, .l-done { opacity: 0; }
.phone[data-state="scan"] .l-hold, .phone[data-state="signed"] .l-hold { opacity: 0; }
.phone[data-state="scan"] .l-ver, .phone[data-state="signed"] .l-done { opacity: 1; }
.signed { position: absolute; z-index: 3; inset: 0; display: grid; place-content: center; justify-items: center; gap: 4px; text-align: center; background: var(--card); opacity: 0; transform: scale(.97); pointer-events: none; transition: opacity .45s var(--ease), transform .45s var(--ease); }
.phone[data-state="signed"] .signed { opacity: 1; transform: none; transition-delay: .5s; }
.check { width: 52px; height: 52px; border-radius: 50%; border: 2px solid var(--ok); position: relative; margin-bottom: 12px; }
.check::after { content: ""; position: absolute; left: 15px; top: 9px; width: 10px; height: 19px; border: solid var(--ok); border-width: 0 2.5px 2.5px 0; transform: rotate(45deg) scale(0); transition: transform .35s var(--ease) .9s; }
.phone[data-state="signed"] .check::after { transform: rotate(45deg) scale(1); }
.signed-title { font-size: 17px; color: var(--text) !important; }
.signed-sig { font-family: var(--mono); font-size: 13.5px; color: var(--accent) !important; }
.signed-sub { font-size: 11.5px; font-family: var(--mono); }

/* fit */
.band-top h2 { margin: 0; }
.fit { display: grid; grid-template-columns: 240px minmax(0, 1fr); border: 1px solid var(--border); border-radius: var(--r); margin: 0 clamp(20px, 3vw, 48px); overflow: hidden; }
.band#fit { padding-bottom: clamp(24px, 4vw, 48px); }
.fit-tabs { display: grid; align-content: start; border-right: 1px solid var(--border); }
.fit-tabs button { display: flex; align-items: center; gap: 12px; text-align: left; font: inherit; font-size: 15px; color: var(--muted); background: transparent; border: 0; border-top: 1px solid var(--border); padding: 22px 20px; cursor: pointer; transition: color .2s, background-color .2s; }
.fit-tabs button:first-child { border-top: 0; }
.fit-tabs button[aria-selected="true"] { color: var(--text); background: var(--card); box-shadow: inset 2px 0 0 var(--accent); }
.fit-tabs button:hover { color: var(--text); }
.fit-body { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 12px; padding: 12px; }
.fit-small { display: grid; gap: 12px; grid-template-rows: 1fr 1fr; }
.fit-card { border: 1px solid var(--border); border-radius: 4px; padding: 18px; display: flex; flex-direction: column; justify-content: space-between; min-height: 150px; background: var(--card); }
.fit-card p { margin: 0; font-size: 15px; color: var(--text); display: grid; }
.fit-big { min-height: 320px; align-items: end; justify-items: stretch; }
.fit-quote { position: relative; color: #070606; }
.fit-quote p { margin: 0; font-size: clamp(16px, 1.5vw, 20px); line-height: 1.4; letter-spacing: -0.01em; display: grid; color: #070606; }
.fit-quote .cmp-note { color: rgba(7, 6, 6, .7); display: block; }
.case { grid-area: 1 / 1; opacity: 0; transform: translateY(8px); pointer-events: none; transition: opacity .4s ease, transform .4s var(--ease); }
.fit-body[data-case="0"] .case-0, .fit-body[data-case="1"] .case-1, .fit-body[data-case="2"] .case-2 { opacity: 1; transform: none; pointer-events: auto; }

/* developers */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 80px); align-items: center; }
.code { background: var(--card); border: 1px solid var(--border); border-radius: var(--r); overflow: hidden; }
.code-bar { display: flex; align-items: center; gap: 14px; padding: 10px 14px; border-bottom: 1px solid var(--border); }
.dots { display: inline-flex; gap: 6px; } .dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--border); display: block; }
.code-title { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.copy { margin-left: auto; font: inherit; font-family: var(--mono); font-size: 12px; color: var(--text); background: var(--card-2); border: 1px solid var(--border); border-radius: 6px; padding: 5px 9px; cursor: pointer; transition: border-color .2s; }
.copy:hover { border-color: var(--accent); }
.code pre { margin: 0; padding: 18px 20px; overflow-x: auto; font-family: var(--mono); font-size: 13px; line-height: 1.75; color: var(--text); }
.code pre code { display: grid; }
.code .c { color: var(--muted); } .code .k { color: var(--accent); } .code .s { color: var(--ok); } .code .n { color: var(--warn); }
.ln { display: block; }
.js .code .ln { opacity: 0; transform: translateX(-6px); transition: opacity .4s ease, transform .4s var(--ease); transition-delay: calc(var(--i) * 70ms + 150ms); }
.js .code.in .ln { opacity: 1; transform: none; }

/* go deeper */
.deeper { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.deeper article { padding: clamp(20px, 2.4vw, 32px); min-height: 280px; display: flex; flex-direction: column; border-right: 1px solid var(--border); }
.deeper article:last-child { border-right: 0; }
.deeper h3 { font-size: 24px; margin-bottom: 0; }
.deeper p { margin: auto 0 20px; padding-top: 48px; font-size: 14px; }
.btns { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { display: inline-flex; gap: 8px; align-items: center; padding: 9px 14px; font-size: 13.5px; background: var(--card); border: 1px solid var(--border); border-radius: 6px; transition: border-color .2s; }
.pill:hover { border-color: var(--accent); }
.pill i { font-style: normal; }

/* cta + footer */
.cta-band { text-align: left; }
.cta-band h2 { font-size: clamp(26px, 3.4vw, 46px); }
.fineprint { margin: 32px 0 0; max-width: 40rem; font-size: 13px; }
.foot { padding: 0; }
.foot-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.foot-cols > div { padding: 28px clamp(20px, 3vw, 32px) 40px; display: grid; gap: 8px; align-content: start; border-right: 1px solid var(--border); font-size: 14px; }
.foot-cols > div:last-child { border-right: 0; }
.foot-h { margin: 0 0 8px; font-size: 13px; color: var(--muted); }
.foot-cols a:hover { color: var(--accent); }
.foot-cols span { color: var(--muted); font-size: 13px; }

.band-foot { position: relative; margin-top: 0; padding-top: 56px; overflow: hidden;
  /* carry the frame's vertical rules down to the stripes */
  background-image: linear-gradient(var(--border), var(--border)), linear-gradient(var(--border), var(--border));
  background-size: 1px 100%; background-repeat: no-repeat;
  background-position: left var(--gutter) top 0, right var(--gutter) top 0; }
#footKnot { display: block; width: min(360px, 60vw); aspect-ratio: 1 / 1; margin: 0 auto -124px; position: relative; z-index: 1; }
.stripes { position: relative; z-index: 2; display: grid; height: 190px; }
.stripes i { display: block; }
.stripes i:nth-child(1) { background: #B9C6FF; } .stripes i:nth-child(2) { background: #99ACFF; }
.stripes i:nth-child(3) { background: #7F94F5; } .stripes i:nth-child(4) { background: #667BE6; }

/* ---------- responsive ---------- */
@media (max-width: 1000px) {
  .nav { grid-template-columns: 1fr auto; }
  .links { display: none; }
  .strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .strip-cell:nth-child(3) { border-right: 0; }
  .strip-cell:nth-child(n+4) { border-top: 1px solid var(--border); }
  .decide, .split, .fit, .fit-body { grid-template-columns: 1fr; }
  .side { position: static; grid-auto-flow: column; overflow-x: auto; }
  .side button { border-top: 0; border-left: 1px solid var(--border); white-space: nowrap; }
  .side button:first-child { border-left: 0; }
  .row { grid-template-columns: 1fr; }
  .row.flip .row-text { order: 0; }
  .fit-tabs { border-right: 0; border-bottom: 1px solid var(--border); grid-auto-flow: column; overflow-x: auto; }
  .fit-tabs button { border-top: 0; border-left: 1px solid var(--border); white-space: nowrap; }
  .fit-tabs button:first-child { border-left: 0; }
  .deeper, .foot-cols { grid-template-columns: 1fr; }
  .deeper article, .foot-cols > div { border-right: 0; border-bottom: 1px solid var(--border); }
}
@media (max-width: 860px) {
  .hero { --k: min(86vw, 460px); padding-bottom: calc(var(--k) * 0.6 + 40px); background-image: none; }
  .hero-copy { margin-left: 0; }
  .nav-link { display: none; }
}
@media (max-width: 560px) {
  .cmp-cols { grid-template-columns: 1fr; }
  .strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .strip-cell { border-top: 1px solid var(--border); border-right: 1px solid var(--border) !important; }
  .strip-cell:nth-child(2n) { border-right: 0 !important; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .pulse::after { animation: none; }
  .js .reveal, .js .code .ln { opacity: 1; transform: none; transition: none; }
  .tl { clip-path: none; animation: none !important; } .sent { opacity: 1; animation: none !important; }
  .phone *, .tile * { transition: none !important; }
  .fp { display: none; }
}

/* ---------- humans / agents switch ---------- */
.switch { display: flex; align-items: center; padding: 0 10px; border-left: 1px solid var(--border); }
.switch button {
  font: inherit; font-size: 13px; color: var(--muted); background: transparent; border: 1px solid transparent;
  padding: 6px 12px; border-radius: 6px; cursor: pointer; transition: color .2s, background-color .2s, border-color .2s;
}
.switch button:hover { color: var(--text); }
.switch button[aria-selected="true"] { color: var(--text); background: var(--card); border-color: var(--border); }
.agents-view { display: none; }
html[data-view="agents"] .humans-view { display: none; }
html[data-view="agents"] .agents-view { display: block; }
html[data-view="agents"] .links { display: none; }
html[data-view="agents"] .nav .switch { margin-left: auto; }

/* ---------- agents view: a plain document ---------- */
.agents-view { margin-inline: var(--gutter); border-inline: 1px solid var(--border); min-height: calc(100svh - 56px); }
.agents-head { padding: clamp(40px, 9vh, 96px) clamp(20px, 3vw, 48px) 40px; border-bottom: 1px solid var(--border); }
.agents-head h1 { font-size: clamp(30px, 3.6vw, 52px); }
.doc { max-width: 52rem; padding: 40px clamp(20px, 3vw, 48px) 96px; font-size: 15px; }
.doc h1, .doc h2, .doc h3 { font-weight: 400; letter-spacing: -0.02em; margin: 2em 0 .6em; }
.doc h1 { font-size: 28px; margin-top: 0; }
.doc h2 { font-size: 22px; padding-top: .6em; border-top: 1px solid var(--border); }
.doc h3 { font-size: 17px; }
.doc p, .doc li { color: var(--muted); line-height: 1.65; }
.doc p { margin: 0 0 1em; }
.doc ul { margin: 0 0 1.2em; padding-left: 1.2em; display: grid; gap: .45em; }
.doc li::marker { color: var(--accent); }
.doc code { font-family: var(--mono); font-size: .9em; color: var(--text); background: var(--card); border: 1px solid var(--border); border-radius: 4px; padding: .1em .35em; }
.doc pre { margin: 0 0 1.4em; padding: 16px 18px; overflow-x: auto; background: var(--card); border: 1px solid var(--border); border-radius: var(--r); }
.doc pre code { display: block; padding: 0; border: 0; background: transparent; font-size: 13px; line-height: 1.7; color: var(--text); white-space: pre; }
.doc strong { font-weight: 500; color: var(--text); }
.doc-loading { color: var(--muted); }
@media (max-width: 1000px) {
  .switch { margin-left: auto; border-left: 0; }
  .switch button { padding: 6px 9px; }
}

/* ---------- Geist Mono, uppercase, for buttons and the header bar. Headings stay Plus Jakarta Sans. ---------- */
.nav, .brand-name, .links a, .nav-link, .switch button,
.btn, .pill, .more, .copy, .seg button, .side button, .fit-tabs button, .mock-btn {
  font-family: var(--mono); text-transform: uppercase; letter-spacing: 0.04em;
}
.brand-name { font-size: 15px; letter-spacing: 0.06em; }
.btn { font-size: 12.5px; font-weight: 500; }
.btn.small { font-size: 12px; }
.links, .nav-cta, .switch button { font-size: 11.5px; }
.side button, .seg button { font-size: 11.5px; }
.fit-tabs button { font-size: 12px; }
.pill, .more, .copy { font-size: 11.5px; }
.mock-btn { font-size: 12.5px; }

/* ---------- footer bar and theme control ---------- */
.foot-bar { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 14px clamp(20px, 3vw, 32px); border-top: 1px solid var(--border); font-family: var(--mono); font-size: 12px; color: var(--muted); }
.theme { display: inline-flex; padding: 3px; border: 1px solid var(--border); border-radius: 8px; background: var(--card); gap: 2px; }
.theme button { display: grid; place-items: center; width: 30px; height: 26px; color: var(--muted); background: transparent; border: 0; border-radius: 6px; cursor: pointer; transition: color .2s, background-color .2s; }
.theme button:hover { color: var(--text); }
.theme button[aria-pressed="true"] { color: var(--text); background: var(--card-2); }

/* ---------- documentation page ---------- */
.docs-page { margin-inline: var(--gutter); border-inline: 1px solid var(--border); }
.docs-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); }
.toc { position: sticky; top: 57px; align-self: start; height: calc(100svh - 57px); overflow-y: auto; padding: 28px 20px; border-right: 1px solid var(--border); display: grid; gap: 2px; align-content: start; font-size: 14px; }
.toc p { margin: 18px 10px 6px; font-family: var(--mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.toc p:first-child { margin-top: 0; }
.toc a { padding: 7px 10px; border-radius: 6px; color: var(--muted); transition: color .15s, background-color .15s; }
.toc a:hover { color: var(--text); }
.toc a[aria-current="true"] { color: var(--text); background: var(--card); box-shadow: inset 2px 0 0 var(--accent); }
.dc { padding: clamp(32px, 6vh, 64px) clamp(20px, 4vw, 64px) 96px; max-width: 58rem; }
.dc .eyebrow { margin-bottom: 12px; }
.dc > h1 { font-size: clamp(30px, 3.6vw, 48px); margin: 0 0 12px; }
.dc .lede { margin-top: 0; }
.dc section { padding-top: 40px; scroll-margin-top: 72px; }
.dc h2 { font-size: 24px; margin: 0 0 14px; padding-top: 28px; border-top: 1px solid var(--border); }
.dc h3 { font-size: 17px; margin: 28px 0 8px; font-weight: 500; }
.dc p, .dc li { color: var(--muted); line-height: 1.7; font-size: 15px; }
.dc p { margin: 0 0 1em; }
.dc ul, .dc ol { margin: 0 0 1.2em; padding-left: 1.3em; display: grid; gap: .5em; }
.dc li::marker { color: var(--accent); }
.dc strong { font-weight: 500; color: var(--text); }
.dc code { font-family: var(--mono); font-size: .88em; color: var(--text); background: var(--card); border: 1px solid var(--border); border-radius: 4px; padding: .1em .35em; }
.dc pre { margin: 0 0 1.4em; padding: 16px 18px; overflow-x: auto; background: var(--card); border: 1px solid var(--border); border-radius: var(--r); }
.dc pre code { display: block; padding: 0; border: 0; background: transparent; font-size: 13px; line-height: 1.7; white-space: pre; }
.dc table { width: 100%; border-collapse: collapse; margin: 0 0 1.4em; font-size: 14px; }
.dc th, .dc td { text-align: left; vertical-align: top; padding: 10px 12px; border-top: 1px solid var(--border); color: var(--muted); }
.dc th { font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 400; border-top: 0; border-bottom: 1px solid var(--border); }
.dc td:first-child { color: var(--text); white-space: nowrap; }
.dc .note { padding: 14px 16px; border: 1px solid var(--border); border-left: 2px solid var(--warn); border-radius: var(--r); background: var(--card); margin: 0 0 1.4em; }
.dc .note p { margin: 0; }
@media (max-width: 900px) {
  .docs-layout { grid-template-columns: 1fr; }
  .toc { position: static; height: auto; border-right: 0; border-bottom: 1px solid var(--border); grid-auto-flow: column; overflow-x: auto; padding: 12px 16px; }
  .toc p { display: none; }
  .toc a { white-space: nowrap; }
}

/* header: logo only; hero title in bold */
.nav .brand-name { display: none; }
.hero h1 { font-weight: 600; }

/* footer quick links: Geist Mono, uppercase */
.foot-h, .foot-cols a, .foot-cols span { font-family: var(--mono); text-transform: uppercase; letter-spacing: 0.05em; }
.foot-h { font-size: 11px; color: var(--muted); }
.foot-cols a { font-size: 12px; color: var(--text); }
.foot-cols span { font-size: 11px; line-height: 1.5; }
.foot-cols > div { gap: 10px; }

/* header mark: the Braille knot, drawn on a small canvas (theme.js) */
.mark { width: 26px; height: 26px; border-radius: 0; background: none; mix-blend-mode: normal !important; overflow: visible; }
.mark-knot { display: block; width: 26px; height: 26px; }
