/* =====================================================================
   Quantgens — landing page template
   Visual language mirrors cf0.ai: light "paper" canvas, white cards with
   hairline borders, sharp (0px) corners, serif display headlines, Inter
   Tight body, JetBrains Mono labels/numbers, a single confident blue accent.
   Copy is from the Quantgens website spec. Self-contained: no build step.
   ===================================================================== */

/* ---------- Fonts (self-hosted, from cf0's own faces) ---------- */
@font-face { font-family: "Inter Tight"; src: url("fonts/InterTight-Regular.ttf") format("truetype");  font-weight: 400; font-display: swap; }
@font-face { font-family: "Inter Tight"; src: url("fonts/InterTight-Medium.ttf") format("truetype");   font-weight: 500; font-display: swap; }
@font-face { font-family: "Inter Tight"; src: url("fonts/InterTight-SemiBold.ttf") format("truetype"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Source Serif 4"; src: url("fonts/SourceSerif4-Variable.ttf") format("truetype"); font-weight: 300 800; font-style: normal; font-display: swap; }
@font-face { font-family: "Source Serif 4"; src: url("fonts/SourceSerif4-Italic.ttf") format("truetype"); font-weight: 300 800; font-style: italic; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("fonts/JetBrainsMono-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("fonts/JetBrainsMono-Medium.ttf") format("truetype");  font-weight: 500; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("fonts/JetBrainsMono-Bold.ttf") format("truetype");    font-weight: 700; font-display: swap; }
/* Body type system: Open Sans (body), Lora (serif leads), Instrument Serif (elegant statement lines) */
@font-face { font-family: "Open Sans"; src: url("fonts/OpenSans.ttf") format("truetype"); font-weight: 300 800; font-style: normal; font-display: swap; }
@font-face { font-family: "Lora"; src: url("fonts/Lora.ttf") format("truetype"); font-weight: 400 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Lora"; src: url("fonts/Lora-Italic.ttf") format("truetype"); font-weight: 400 700; font-style: italic; font-display: swap; }
@font-face { font-family: "Instrument Serif"; src: url("fonts/InstrumentSerif-Regular.ttf") format("truetype"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Instrument Serif"; src: url("fonts/InstrumentSerif-Italic.ttf") format("truetype"); font-weight: 400; font-style: italic; font-display: swap; }
/* OPTIONAL — drop a licensed "The Seasons" file in /fonts to override --font-fancy automatically:
@font-face { font-family: "The Seasons"; src: url("fonts/TheSeasons.woff2") format("woff2"); font-weight: 400; font-display: swap; } */

/* ---------- Design tokens ---------- */
:root {
  /* Surfaces — cf0's light paper canvas */
  --canvas:        #f5f5f5;   /* page background */
  --paper:         #ffffff;   /* cards / panels */
  --paper-2:       #fafafa;   /* nested / subtle fills */
  --band:          #eceef2;   /* alternating section band (cards still pop on it) */
  --ink:           #09090b;   /* primary text (near-black) */
  --ink-2:         #3f3f46;   /* secondary text */
  --ink-3:         #71717a;   /* tertiary / captions */
  --ink-4:         #a1a1aa;   /* faint */
  --hairline:      #e4e4e7;   /* default borders */
  --hairline-2:    #d4d4d8;   /* stronger borders */

  /* Brand accent — confident blue (cf0 brand-700) */
  --brand:         #1d4ed8;
  --brand-hover:   #2563eb;
  --brand-deep:    #172554;
  --brand-tint:    #eff6ff;
  --on-brand:      #ffffff;

  /* Citation-pill semantics (the signature product element) */
  --cite:          #1d4ed8;   /* clean / supported  */
  --cite-tint:     #eff6ff;
  --cite-mismatch: #dc2626;   /* numeric mismatch — the showstopper red */
  --cite-mismatch-tint: #fef2f2;
  --ok:            #15803d;

  /* Dark band (the single high-contrast moment — the pilot CTA) */
  --night:         #0b1220;
  --night-2:       #111a2e;

  /* Knowledge-graph node kinds (the company brain) */
  --kg-thesis:     #1d4ed8;
  --kg-sector:     #0891b2;
  --kg-deal:       #d97706;
  --kg-person:     #7c3aed;
  --kg-firm:       #64748b;
  --kg-dejavu:     #dc2626;

  /* Type — unified on Source Serif 4 across the whole site (one consistent voice).
     JetBrains Mono is retained only for functional data bits: citation pills,
     eyebrow labels, stat numerals and the graph's data badges. */
  --font-display: "Source Serif 4", Georgia, "Times New Roman", serif;  /* headings */
  --font-sans:    "Source Serif 4", Georgia, "Times New Roman", serif;  /* body / UI */
  --font-serif:   "Source Serif 4", Georgia, "Times New Roman", serif;  /* leads */
  --font-fancy:   "Source Serif 4", Georgia, "Times New Roman", serif;  /* statement lines */
  --font-mono:    "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;

  /* Layout */
  --maxw:   1200px;
  --gutter: 24px;
  --radius: 0px;       /* cf0 is sharp-cornered */
  --radius-pill: 3px;  /* the only thing with a hint of round */
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
[hidden] { display: none !important; }   /* must beat component display:grid/flex */
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-sans);
  background: var(--canvas);
  color: var(--ink);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: var(--ink);
}
::selection { background: var(--brand); color: #fff; }

/* ---------- Layout helpers ---------- */
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
section[id], main[id] { scroll-margin-top: 80px; }
.section { padding-block: 84px; }
@media (min-width: 768px) { .section { padding-block: 120px; } }
.section--tight { padding-block: 56px; }
.divider { border: 0; border-top: 1px solid var(--hairline); }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--brand);
}
.eyebrow--muted { color: var(--ink-3); }

.lead { font-family: var(--font-serif); font-size: clamp(18px, 2vw, 22px); line-height: 1.6; color: var(--ink-2); }
.mono { font-family: var(--font-mono); }
.center { text-align: center; }
.muted { color: var(--ink-3); }

/* Headings scale */
.h1 { font-size: clamp(40px, 6vw, 68px); }
.h2 { font-size: clamp(30px, 4.2vw, 46px); text-wrap: balance; }
.h3 { font-size: 22px; }
.shead p { text-wrap: pretty; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 20px; border: 1px solid transparent;
  font-family: var(--font-sans); font-size: 15px; font-weight: 500;
  border-radius: var(--radius); transition: background .15s, color .15s, border-color .15s, transform .15s;
  white-space: nowrap;
}
.btn--primary { background: var(--brand); color: var(--on-brand); }
.btn--primary:hover { background: var(--brand-hover); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--hairline-2); }
.btn--ghost:hover { background: var(--paper); border-color: var(--ink-3); }
.btn--onnight { background: #fff; color: var(--night); }
.btn--onnight:hover { background: #e7ecf5; }
.btn--ghost-night { background: transparent; color: #fff; border-color: rgba(255,255,255,.28); }
.btn--ghost-night:hover { border-color: rgba(255,255,255,.6); }
.btn--sm { padding: 9px 16px; font-size: 14px; }

/* ---------- Scroll progress (coherence cue) ---------- */
.scrollprog { position: fixed; top: 0; left: 0; height: 3px; width: 0; background: var(--brand); z-index: 100; transition: width .08s linear; }
@media (prefers-reduced-motion: reduce) { .scrollprog { transition: none; } }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--canvas) 82%, transparent);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s, background .2s;
}
.nav.is-scrolled { border-bottom-color: var(--hairline); }
.nav__inner { display: flex; align-items: center; gap: 24px; height: 64px; }
.brand { display: flex; align-items: center; gap: 9px; font-family: var(--font-display); font-weight: 600; font-size: 21px; letter-spacing: -0.02em; }
.brand__mark { width: 22px; height: 22px; }
.nav__links { display: none; gap: 28px; margin-left: 12px; }
.nav__links a { font-size: 15px; color: var(--ink-2); transition: color .15s; }
.nav__links a:hover { color: var(--ink); }
.nav__right { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.nav__signin { display: none; font-size: 15px; color: var(--ink-2); }
.nav__signin:hover { color: var(--ink); }
.nav__burger { display: inline-flex; flex-direction: column; gap: 4px; background: none; border: 0; padding: 8px; }
.nav__burger span { width: 20px; height: 1.5px; background: var(--ink); display: block; }
@media (min-width: 900px) {
  .nav__links { display: flex; }
  .nav__signin { display: inline; }
  .nav__burger { display: none; }
}

/* Mobile sheet */
.sheet { position: fixed; inset: 0; z-index: 60; background: var(--canvas); transform: translateY(-100%); transition: transform .3s var(--ease, ease); display: flex; flex-direction: column; }
.sheet.is-open { transform: translateY(0); }
.sheet__top { display: flex; align-items: center; height: 64px; }
.sheet__close { margin-left: auto; background: none; border: 0; font-size: 28px; line-height: 1; color: var(--ink); }
.sheet__links { display: flex; flex-direction: column; gap: 4px; padding: 24px; }
.sheet__links a { font-family: var(--font-display); font-size: 30px; padding: 10px 0; border-bottom: 1px solid var(--hairline); }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; }
.hero__bg { position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(900px 460px at 82% -12%, color-mix(in srgb, var(--brand-tint) 70%, transparent), transparent 62%),
    radial-gradient(620px 360px at 2% 0%, #f4f7fd, transparent 60%);
}
.hero__inner { position: relative; display: grid; grid-template-columns: 1fr; gap: 48px; align-items: start; padding-block: 32px 72px; }
.hero__inner > * { min-width: 0; }
@media (min-width: 1000px) { .hero__inner { grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.92fr); gap: 48px; padding-block: 40px 96px; } }
.hero__copy { padding-top: 0; }
.hero h1 { margin-top: 14px; max-width: 13ch; line-height: 1.04; letter-spacing: -0.025em; text-wrap: balance; }
.hero__sub { margin-top: 16px; max-width: 34em; }
.hero__cta { margin-top: 24px; display: flex; flex-wrap: wrap; gap: 12px; }
.hero__trust { margin-top: 40px; font-family: var(--font-mono); font-size: 12px; color: var(--ink-3); }
.hero__trust .row { line-height: 1.7; }
.hero__trust .rule { height: 1px; background: var(--hairline); margin: 12px 0; max-width: 360px; }
.hero__trust .row--faint { color: var(--ink-4); }

/* Crafted first-paint entrance: hero copy rises in a gentle stagger, memo card fades up */
@keyframes heroRise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.hero__copy > * { opacity: 0; animation: heroRise .6s cubic-bezier(.16,1,.3,1) forwards; }
.hero__copy > .regionbar { animation-delay: .04s; }
.hero__copy > .eyebrow { animation-delay: .12s; }
.hero__copy > h1 { animation-delay: .20s; }
.hero__copy > .hero__sub { animation-delay: .30s; }
.hero__copy > .hero__cta { animation-delay: .40s; }
.hero__copy > .hero__trust { animation-delay: .50s; }
.herostack { opacity: 0; animation: heroRise .7s cubic-bezier(.16,1,.3,1) .28s forwards; }
@media (prefers-reduced-motion: reduce) { .hero__copy > *, .herostack { opacity: 1; animation: none; } }

/* ---------- Memo card (the signature hero visual) ---------- */
.memo {
  position: relative; background: var(--paper); border: 1px solid var(--hairline);
  box-shadow: 0 1px 2px rgba(9,9,11,.04), 0 24px 48px -28px rgba(9,9,11,.22);
}
.memo__bar { display: flex; align-items: center; justify-content: space-between; padding: 13px 18px; border-bottom: 1px solid var(--hairline); font-family: var(--font-mono); font-size: 11px; color: var(--ink-3); letter-spacing: .04em; }
.memo__bar .dot { color: var(--ok); }
.memo__body { padding: 22px 24px; }
.memo__line { font-size: 14.5px; line-height: 2; color: var(--ink-2); margin-bottom: 14px; }
.memo__line:last-of-type { margin-bottom: 0; }
.memo__line b { color: var(--ink); font-weight: 600; }
.memo__sources { margin-top: 18px; border: 1px solid var(--hairline); background: var(--paper-2); padding: 14px 16px; }
.memo__sources .lbl { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); }
.memo__sources ul { list-style: none; margin-top: 9px; display: grid; gap: 6px; font-family: var(--font-mono); font-size: 12px; color: var(--ink-2); line-height: 1.4; }

/* ---------- Hero stacked deck (memo + brain map + peer comps) ---------- */
.herostack { position: relative; --peek-x: 28px; --peek-y: 19px; }
.herostack__vp { position: relative; min-height: 380px; touch-action: pan-y; } /* exact height set by JS (sizeVp) to the tallest card */
.hslide {
  position: absolute; inset: 0;
  transform-origin: 50% 0;
  transition: transform .5s cubic-bezier(.16,1,.3,1), opacity .45s ease, box-shadow .45s ease;
  will-change: transform, opacity;
}
/* No-JS / pre-init fallback: first card front, the next two peek behind */
.hslide:nth-child(1) { z-index: 3; }
.hslide:nth-child(2) { z-index: 2; opacity: .8; transform: translate(var(--peek-x), calc(var(--peek-y) * -1)) scale(.955); }
.hslide:nth-child(3) { z-index: 1; opacity: .58; transform: translate(calc(var(--peek-x) * 2), calc(var(--peek-y) * -2)) scale(.91); }
/* JS-driven state (data-depth wins via later source order at equal specificity) */
.hslide[data-depth="0"] { z-index: 3; opacity: 1;   transform: none; box-shadow: 0 1px 2px rgba(9,9,11,.04), 0 24px 48px -28px rgba(9,9,11,.22); }
.hslide[data-depth="1"] { z-index: 2; opacity: .8; transform: translate(var(--peek-x), calc(var(--peek-y) * -1)) scale(.955); box-shadow: 0 22px 44px -30px rgba(9,9,11,.2); cursor: pointer; }
.hslide[data-depth="2"] { z-index: 1; opacity: .58; transform: translate(calc(var(--peek-x) * 2), calc(var(--peek-y) * -2)) scale(.91); box-shadow: 0 16px 34px -28px rgba(9,9,11,.16); cursor: pointer; }
.hslide[data-depth="1"]:hover, .hslide[data-depth="2"]:hover { opacity: .9; }

.herostack__nav { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 18px; }
.hstack__arrow { width: 30px; height: 30px; display: grid; place-items: center; font-size: 17px; line-height: 1; color: var(--ink-3); background: var(--paper); border: 1px solid var(--hairline-2); border-radius: var(--radius-pill); cursor: pointer; transition: color .14s, border-color .14s; }
.hstack__arrow:hover { color: var(--brand); border-color: var(--brand); }
.hstack__dots { display: inline-flex; align-items: center; gap: 8px; }
.hstack__dots button { width: 7px; height: 7px; padding: 0; border: 0; border-radius: 1px; background: var(--hairline-2); cursor: pointer; transition: background .14s, transform .14s; }
.hstack__dots button:hover { background: var(--ink-4); }
.hstack__dots button.is-active { background: var(--brand); transform: scale(1.3); }
.herostack:focus-visible { outline: none; }
.herostack:focus-visible .herostack__vp { outline: 2px solid var(--brand); outline-offset: 6px; }

/* Peer-comps table card */
.comps { width: 100%; border-collapse: collapse; }
.comps th { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); font-weight: 500; text-align: right; padding: 0 0 11px; border-bottom: 1px solid var(--hairline-2); }
.comps th:first-child { text-align: left; }
.comps td { padding: 12px 0; border-bottom: 1px solid var(--hairline); text-align: right; font-family: var(--font-mono); font-size: 12.5px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.comps td:first-child { text-align: left; font-family: var(--font-sans); font-size: 14.5px; color: var(--ink); }
.comps tbody tr:last-child td { border-bottom: 0; }
.comps tr.is-target td, .comps tr.is-target td:first-child { color: var(--brand); }
.comps tr.is-target td:first-child { font-weight: 600; }

/* Brain map card — an interactive, force-directed knowledge network (rendered by app.js).
   Institutional palette: navy hubs, a brand-blue primary tier, slate satellites, one red accent
   (the déjà-vu match). Hover/tap a node to trace it: neighbours stay lit, the rest dims. */
/* centre the graph vertically in the card so the (uniform) extra height reads as balanced padding */
.hslide--brain { display: flex; flex-direction: column; }
.hslide--brain .memo__body { flex: 1; display: flex; flex-direction: column; justify-content: center; }
.kgmini__canvas { line-height: 0; }
.kgmini__svg { width: 100%; height: auto; display: block; overflow: visible; }
@keyframes kgminidash { to { stroke-dashoffset: -16; } }

.kgmini__edges line { stroke: var(--hairline-2); stroke-width: .8; opacity: .9; transition: opacity .2s ease, stroke .2s ease; }
.kgmini__dejavu { stroke: var(--kg-dejavu); stroke-width: 1.4; stroke-dasharray: 4 4; opacity: .85; animation: kgminidash 1.2s linear infinite; }

.kgnode { stroke: #fff; stroke-width: 1.4; cursor: pointer; transition: opacity .2s ease; }
.kgnode--hub   { fill: var(--brand-deep); }
.kgnode--key   { fill: var(--brand); }
.kgnode--sub   { fill: var(--kg-firm); }
.kgnode--match { fill: #fff; stroke: var(--kg-dejavu); stroke-width: 1.6; stroke-dasharray: 3 3; }
.kgnode__ring  { fill: none; stroke: var(--brand-deep); stroke-width: 1; opacity: .15; }

/* hover / focus trace state */
.kgmini__svg.is-tracing .kgnode.is-dim { opacity: .22; }
.kgmini__svg.is-tracing .kgmini__edges line.is-dim { opacity: .1; }
.kgmini__svg.is-tracing .kgmini__edges line.is-lit { stroke: var(--brand); opacity: .95; }
.kgnode.is-lit { stroke: var(--brand); stroke-width: 2; }

.kglbl { font-family: "Inter Tight", system-ui, -apple-system, "Segoe UI", sans-serif; font-weight: 500; font-size: 10px; fill: var(--ink-2); text-anchor: middle; letter-spacing: -0.005em; pointer-events: none; }
.kglbl--dv { fill: var(--kg-dejavu); }
.kgmini__tip { font-family: "Inter Tight", system-ui, -apple-system, "Segoe UI", sans-serif; font-weight: 500; font-size: 10px; fill: var(--ink); text-anchor: middle; pointer-events: none; paint-order: stroke; stroke: var(--paper); stroke-width: 3px; stroke-linejoin: round; }

/* nodes on a peeking (non-front) card shouldn't grab the pointer */
.hslide:not([data-depth="0"]) .kgnode { pointer-events: none; }

.kgmini__foot { margin-top: 12px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.kgmini__chip { display: inline-block; font-family: var(--font-mono); font-size: 11px; color: var(--kg-dejavu); background: color-mix(in srgb, var(--kg-dejavu) 7%, transparent); border: 1px solid color-mix(in srgb, var(--kg-dejavu) 22%, transparent); padding: 6px 10px; }
.kgmini__hint { font-family: var(--font-mono); font-size: 10.5px; color: var(--ink-4); letter-spacing: .02em; }

@media (prefers-reduced-motion: reduce) {
  .hslide { transition: none; }
  .kgmini__dejavu { animation: none; }
}
@media (max-width: 999px) {
  .herostack { --peek-x: 15px; --peek-y: 11px; }
}

/* Citation pill — the brand-defining element */
.pill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 1.5px 8px; border-radius: var(--radius-pill);
  font-family: var(--font-mono); font-weight: 500; font-size: 13px;
  background: var(--cite-tint); color: var(--cite);
  border: 1px solid color-mix(in srgb, var(--cite) 24%, transparent);
  white-space: nowrap; vertical-align: baseline; line-height: 1.4;
}
.pill .tag { opacity: .72; font-size: 11px; }
.pill--mismatch { background: var(--cite-mismatch-tint); color: var(--cite-mismatch); border-color: color-mix(in srgb, var(--cite-mismatch) 30%, transparent); }
.pill--unverified { background: transparent; color: var(--ink-3); border-color: var(--hairline-2); text-decoration: line-through; }

/* ---------- Marquee ---------- */
.marquee { border-block: 1px solid var(--hairline); background: var(--paper); overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent); }
.marquee + .marquee { border-top: 0; }
.marquee__track { display: flex; gap: 0; white-space: nowrap; width: max-content; animation: marquee 38s linear infinite; }
.marquee__track--slow { animation-duration: 52s; }
.marquee__track span { font-family: var(--font-mono); font-size: 13px; color: var(--ink-3); padding: 16px 26px; display: inline-flex; align-items: center; gap: 26px; }
.marquee__track span::after { content: "·"; color: var(--ink-4); }
.marquee:hover .marquee__track { animation-play-state: paused; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .marquee__track { animation: none; } }

/* ---------- Generic section header ---------- */
.shead { max-width: 760px; }
.shead.center { margin-inline: auto; }
.shead h2 { margin-top: 14px; }
.shead p { margin-top: 16px; }

/* ---------- Problem (stat chips + day comparison) ---------- */
.stats { margin-top: 48px; display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 760px) { .stats { grid-template-columns: repeat(3, 1fr); } }
.statchip { background: var(--paper); border: 1px solid var(--hairline); padding: 26px 24px; }
.statchip__big { font-family: var(--font-mono); font-size: clamp(24px, 3vw, 32px); font-weight: 500; letter-spacing: -0.01em; color: var(--ink); display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.statchip__big .from { color: var(--ink-3); font-weight: 400; text-decoration: line-through; text-decoration-thickness: 2px; text-decoration-color: color-mix(in srgb, var(--ink-3) 65%, transparent); }
.statchip__big .arrow { color: var(--brand); }
.statchip__big .to { color: var(--brand); }
.statchip__label { margin-top: 10px; font-size: 14px; color: var(--ink-3); }
.problem__foot { margin-top: 28px; font-size: 16px; color: var(--ink-2); }

/* Animated day-flip (one 8-hour day, segmented) */
:root {
  --seg-1: #8b97a8; --seg-2: #aab4c2; --seg-3: #c4ccd7; --seg-4: #dce1e8;
  --seg-auto: #93c5fd; --seg-val: #1d4ed8;
}
.dayflip { margin-top: 48px; display: grid; gap: 24px; }
.flip__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.flip__lbl { font-family: var(--font-mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2); }
.flip__hi { font-family: var(--font-mono); font-size: 12px; color: var(--ink-3); }
.flip__hi--good { color: var(--brand); }
.flip__bar { display: flex; width: 100%; height: 46px; border: 1px solid var(--hairline); background: var(--paper); overflow: hidden; }
.dseg { width: 0; flex: 0 0 auto; background: var(--c); position: relative; overflow: hidden;
  border-right: 2px solid var(--paper); display: flex; flex-direction: column; justify-content: center;
  padding: 0 10px; cursor: default; transition: width .85s cubic-bezier(.16,1,.3,1), filter .15s;
  transition-delay: calc(var(--i, 0) * 0.09s); }
.dseg:last-child { border-right: 0; }
.dayflip.is-in .dseg { width: var(--pct); }
@media (prefers-reduced-motion: reduce) { .dseg { transition: none; width: var(--pct); } }
.dseg b { font-family: var(--font-sans); font-size: 12px; font-weight: 600; line-height: 1.1; color: #fff; white-space: nowrap; }
.dseg i { font-family: var(--font-mono); font-size: 11px; font-style: normal; color: rgba(255,255,255,.82); white-space: nowrap; }
.dseg:not(.dseg--value):not(.dseg--auto) b { color: var(--ink); }       /* dark text on light slate segments */
.dseg:not(.dseg--value):not(.dseg--auto) i { color: var(--ink-2); }
.dseg:hover { filter: brightness(1.05); }
.dseg:hover::after { content: attr(data-seg); position: absolute; left: 50%; top: -34px; transform: translateX(-50%);
  background: var(--ink); color: #fff; font-family: var(--font-mono); font-size: 11px; white-space: nowrap; padding: 5px 9px; z-index: 5; pointer-events: none; }
.flip__legend { display: flex; flex-wrap: wrap; gap: 10px 18px; padding-top: 4px; }
.flip__legend .lg { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--ink-3); }
.flip__legend .lg i { width: 11px; height: 11px; flex: none; display: inline-block; }

.daygrid { margin-top: 48px; display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 860px) { .daygrid { grid-template-columns: 1fr 1fr; } }
.daycard { background: var(--paper); border: 1px solid var(--hairline); padding: 24px; }
.daycard h4 { font-family: var(--font-mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); font-weight: 500; }
.daycard.is-after { border-color: color-mix(in srgb, var(--brand) 35%, var(--hairline)); background: var(--brand-tint); }
.bar { margin-top: 14px; display: grid; gap: 8px; }
.bar__row { display: grid; grid-template-columns: 130px 1fr auto; gap: 12px; align-items: center; font-size: 13.5px; color: var(--ink-2); }
.bar__track { height: 8px; background: #e9e9ee; position: relative; }
.is-after .bar__track { background: #dbe6ff; }
.bar__fill { height: 100%; background: var(--ink-4); }
.bar__fill--accent { background: var(--brand); }
.bar__val { font-family: var(--font-mono); font-size: 12.5px; color: var(--ink-3); }

/* ---------- Brain diagram ---------- */
.brainwrap { margin-top: 48px; background: var(--paper); border: 1px solid var(--hairline); padding: 28px; }
@media (min-width: 768px) { .brainwrap { padding: 44px; } }
.brain { display: grid; gap: 28px; grid-template-columns: 1fr; align-items: center; }
@media (min-width: 880px) { .brain { grid-template-columns: 1fr auto 1fr; gap: 40px; } }
.brain__col .col-lbl { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 12px; }
.chiplist { display: grid; gap: 8px; }
.chiplist > [data-r-list] { display: grid; gap: 8px; }
.chip { background: var(--paper-2); border: 1px solid var(--hairline); padding: 9px 12px; font-family: var(--font-mono); font-size: 13px; color: var(--ink-2); }
.chip--dashed { border-style: dashed; color: var(--ink-3); }
.brain__core { display: flex; flex-direction: column; align-items: center; gap: 14px; color: var(--ink-4); }
.brain__node { width: 168px; height: 168px; border-radius: 999px; display: grid; place-items: center; text-align: center;
  background: radial-gradient(circle at 50% 40%, var(--brand-tint), #fff 72%); border: 1px solid color-mix(in srgb, var(--brand) 40%, var(--hairline));
  box-shadow: 0 24px 50px -28px rgba(29,78,216,.5); animation: corepulse 3.8s ease-in-out infinite; }
.brain__node .t { font-family: var(--font-display); font-size: 20px; font-weight: 600; color: var(--ink); }
.brain__node .s { font-family: var(--font-mono); font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--brand); margin-top: 4px; }
.brain__arrow { width: 40px; height: 40px; }
@media (max-width: 879px) { .brain__arrow { transform: rotate(90deg); } }
@keyframes corepulse { 0%,100% { box-shadow: 0 24px 50px -28px rgba(29,78,216,.4); } 50% { box-shadow: 0 24px 64px -22px rgba(29,78,216,.7); } }
@media (prefers-reduced-motion: reduce) { .brain__node { animation: none; } }
.brain__quote { margin-top: 40px; }
.pullquote { font-family: var(--font-fancy); font-weight: 400; font-size: clamp(26px, 3.6vw, 40px); line-height: 1.2; letter-spacing: -0.005em; color: var(--ink); max-width: 18em; }

/* ---------- Desk ---------- */
.split { display: grid; gap: 44px; grid-template-columns: 1fr; align-items: center; }
@media (min-width: 980px) { .split { grid-template-columns: 1fr 1fr; gap: 64px; } }
.featurelist { margin-top: 28px; display: grid; gap: 22px; }
.feature { display: grid; grid-template-columns: 22px 1fr; gap: 14px; }
.feature svg { width: 20px; height: 20px; stroke: var(--brand); margin-top: 3px; }
.feature h4 { font-family: var(--font-sans); font-size: 16px; font-weight: 600; }
.feature p { margin-top: 4px; font-size: 14.5px; color: var(--ink-3); }

.deskmock { background: var(--paper); border: 1px solid var(--hairline); box-shadow: 0 30px 60px -38px rgba(9,9,11,.28); }
.deskmock__input { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--hairline); font-family: var(--font-mono); font-size: 13px; color: var(--ink-2); }
.deskmock__input .ph { color: var(--ink-4); }
.deskmock__input .send { margin-left: auto; width: 26px; height: 26px; background: var(--brand); display: grid; place-items: center; }
.deskmock__input .send svg { width: 14px; height: 14px; stroke: #fff; }
.deskmock__out { padding: 18px 18px 22px; }
.deskmock__tag { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
.deskmock__row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px dashed var(--hairline); font-size: 14px; }
.deskmock__row .k { color: var(--ink-2); }

/* ---------- Agents ---------- */
.agents { margin-top: 48px; display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .agents { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1040px) { .agents { grid-template-columns: repeat(5, 1fr); } }
.agent { background: var(--paper); border: 1px solid var(--hairline); padding: 22px 20px; transition: transform .15s, border-color .15s, box-shadow .15s; }
.agent:hover { transform: translateY(-3px); border-color: var(--hairline-2); box-shadow: 0 18px 40px -28px rgba(9,9,11,.25); }
.agent__name { font-family: var(--font-display); font-size: 21px; font-weight: 600; }
.agent__role { margin-top: 8px; font-size: 14px; color: var(--ink-2); line-height: 1.5; min-height: 3.5em; }
.agent__seg { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 6px; }
.seg { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .04em; color: var(--ink-3); border: 1px solid var(--hairline); padding: 2px 7px; }

/* ---------- Why (pillars) ---------- */
.pillars { margin-top: 48px; display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 860px) { .pillars { grid-template-columns: repeat(3, 1fr); } }
.pillar { background: var(--paper); border: 1px solid var(--hairline); padding: 30px 26px; }
.pillar__n { font-family: var(--font-mono); font-size: 12px; color: var(--brand); letter-spacing: .1em; }
.pillar h3 { margin-top: 16px; font-family: var(--font-display); font-size: 22px; }
.pillar p { margin-top: 12px; font-size: 15px; color: var(--ink-2); line-height: 1.6; }
.why__foot { margin-top: 28px; font-size: 16px; color: var(--ink-3); }

/* ---------- How it works (step flow) — subtle inverse tint band ---------- */
/* alternating section bands give the page a coherent scroll rhythm */
.band, .band-soft { background: var(--band); border-block: 1px solid var(--hairline); }
.band + .band, .band-soft + .band, .band + .band-soft { border-top: 0; }
.steps { margin-top: 48px; display: grid; gap: 16px; grid-template-columns: 1fr; counter-reset: step; position: relative; }
@media (min-width: 980px) { .steps { grid-template-columns: repeat(4, 1fr); } }
.step { background: var(--paper); border: 1px solid var(--hairline); padding: 24px 22px; position: relative; }
.step__n { font-family: var(--font-mono); font-size: 12px; color: var(--brand); }
.step h4 { margin-top: 12px; font-family: var(--font-display); font-size: 20px; }
.step p { margin-top: 8px; font-size: 14px; color: var(--ink-3); line-height: 1.55; }
.step__t { margin-top: 12px; font-family: var(--font-mono); font-size: 12px; color: var(--ink-4); }
.how__proof { margin-top: 28px; font-family: var(--font-mono); font-size: 13px; color: var(--ink-3); letter-spacing: .02em; }

/* ---------- Security ---------- */
.badges { margin-top: 40px; display: flex; flex-wrap: wrap; gap: 12px; }
.badge { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--hairline); background: var(--paper); padding: 10px 14px; font-family: var(--font-mono); font-size: 13px; color: var(--ink-2); }
.badge svg { width: 14px; height: 14px; stroke: var(--ok); }
.sec__link { margin-top: 28px; display: inline-flex; gap: 6px; color: var(--brand); font-weight: 500; font-size: 15px; }

/* ---------- Pricing ---------- */
.pricing { margin-top: 48px; display: grid; gap: 20px; grid-template-columns: 1fr; align-items: start; }
@media (min-width: 860px) { .pricing { grid-template-columns: 1fr 1fr; } }
.plan { background: var(--paper); border: 1px solid var(--hairline); padding: 32px 28px; display: flex; flex-direction: column; height: 100%; }
.plan--featured { border-color: color-mix(in srgb, var(--brand) 42%, var(--hairline)); box-shadow: 0 24px 60px -38px rgba(29,78,216,.35); position: relative; }
.plan__tag { position: absolute; top: -1px; right: 24px; transform: translateY(-50%); background: var(--brand); color: #fff; font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; padding: 4px 10px; }
.plan__name { font-family: var(--font-display); font-size: 26px; font-weight: 600; }
.plan__for { margin-top: 6px; font-size: 14px; color: var(--ink-3); }
.plan__price { margin-top: 22px; padding-top: 22px; border-top: 1px solid var(--hairline); }
.plan__price .amt { font-family: var(--font-display); font-size: 30px; font-weight: 600; letter-spacing: -0.02em; }
.plan__price .note { display: block; margin-top: 4px; font-size: 13.5px; color: var(--ink-3); }
.plan__feat { list-style: none; margin: 24px 0; display: grid; gap: 12px; flex: 1; }
.plan__feat li { position: relative; padding-left: 28px; font-size: 14.5px; color: var(--ink-2); line-height: 1.45; }
.plan__feat svg { position: absolute; left: 0; top: 3px; width: 16px; height: 16px; stroke: var(--brand); }
.plan__feat li.is-head { padding-left: 0; font-family: var(--font-mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-4); margin-top: 4px; }
.plan__cta { margin-top: auto; }
.plan__cta .btn { width: 100%; justify-content: center; }
.pricing__foot { margin-top: 24px; font-size: 14.5px; color: var(--ink-3); }
.pricing__foot a { color: var(--brand); font-weight: 500; }

/* ---------- Pilot CTA (the single dark band — emotional peak) ---------- */
.pilot { background: var(--night); color: #fff; position: relative; overflow: hidden; }
.pilot__bg { position: absolute; inset: 0; background: radial-gradient(700px 360px at 50% -20%, rgba(59,110,229,.35), transparent 60%); pointer-events: none; }
.pilot .wrap { position: relative; }
.pilot__grid { display: grid; gap: 40px; grid-template-columns: 1fr; align-items: center; }
@media (min-width: 1000px) { .pilot__grid { grid-template-columns: 1.05fr 0.95fr; gap: 56px; } }
.pilot__pitch h2 { color: #fff; }
.pilot__pitch .eyebrow { margin-bottom: 16px; }
.pilot__pitch > p { margin: 16px 0 0; max-width: 36em; color: #c7cfdd; font-size: 16px; }
.pilot__cta { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 12px; }
.prove { list-style: none; margin: 24px 0 0; display: grid; gap: 14px; }
.prove li { display: grid; grid-template-columns: 26px 1fr; gap: 12px; align-items: start; font-size: 14.5px; color: #c7cfdd; line-height: 1.5; }
.prove b { color: #fff; font-weight: 600; }
.prove__n { width: 24px; height: 24px; border-radius: 999px; border: 1px solid rgba(255,255,255,.25); display: grid; place-items: center; font-family: var(--font-mono); font-size: 12px; color: #9db2dd; }

/* The ROI / usage dashboard mock */
.dash { background: var(--paper); color: var(--ink); border: 1px solid rgba(255,255,255,.12); box-shadow: 0 40px 90px -40px rgba(0,0,0,.7); overflow: hidden; }
.dash__bar { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid var(--hairline); }
.dash__brand { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-mono); font-size: 11px; letter-spacing: .04em; color: var(--ink-2); text-transform: uppercase; }
.dash__brand img { width: 16px; height: 16px; }
.dash__live { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-mono); font-size: 10.5px; color: var(--ok); text-transform: uppercase; letter-spacing: .08em; }
.dash__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); animation: kgpulse 1.6s ease-in-out infinite; }
.dash__body { padding: 20px; }
.dash__lbl { font-family: var(--font-mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); }
.dash__hero { margin-top: 8px; font-family: var(--font-display); font-size: clamp(20px, 2.4vw, 26px); font-weight: 600; line-height: 1.2; }
.dash__hero b { color: var(--brand); }
.dash__sub { margin-top: 6px; font-family: var(--font-mono); font-size: 12.5px; color: var(--ink-3); }
.dash__kpis { margin-top: 18px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.kpi { border: 1px solid var(--hairline); background: var(--paper-2); padding: 10px 12px; }
.kpi__n { font-family: var(--font-mono); font-size: 17px; font-weight: 500; color: var(--ink); }
.kpi__l { margin-top: 3px; font-size: 11px; color: var(--ink-3); line-height: 1.3; }
.dash__cols { margin-top: 16px; display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 560px) { .dash__cols { grid-template-columns: 1fr 1fr; } }
.dash__panel { border: 1px solid var(--hairline); padding: 12px 14px; }
.dash__h { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; font-size: 13px; font-weight: 600; color: var(--ink); margin-bottom: 10px; }
.dash__h span { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-4); font-weight: 400; }
.adopt { display: grid; gap: 8px; }
.adopt__row { display: grid; grid-template-columns: 1fr auto auto auto; gap: 8px; align-items: center; font-size: 12px; }
.adopt__row .who { color: var(--ink); font-weight: 500; }
.adopt__row .ag { font-family: var(--font-mono); font-size: 9.5px; color: var(--ink-3); border: 1px solid var(--hairline); padding: 1px 5px; }
.adopt__row .rn { font-family: var(--font-mono); font-size: 11px; color: var(--ink-3); }
.adopt__row .hr { font-family: var(--font-mono); font-size: 11.5px; color: var(--ok); font-weight: 500; }
.acc { display: grid; gap: 9px; }
.acc__row { display: grid; grid-template-columns: 54px 1fr 34px; gap: 8px; align-items: center; }
.acc__a { font-size: 12px; color: var(--ink-2); }
.acc__bar { height: 6px; background: #e9e9ee; position: relative; }
.acc__bar i { position: absolute; inset: 0 auto 0 0; width: 0; background: var(--brand); transition: width 1s cubic-bezier(.16,1,.3,1); }
.dash.is-in .acc__bar i { width: var(--p); }
@media (prefers-reduced-motion: reduce) { .acc__bar i { transition: none; width: var(--p); } }
.acc__p { font-family: var(--font-mono); font-size: 11.5px; color: var(--ink); text-align: right; }

/* ---------- Footer ---------- */
.footer { background: var(--canvas); border-top: 1px solid var(--hairline); }
.footer__tag { font-family: var(--font-fancy); font-size: clamp(28px, 3.8vw, 46px); font-weight: 400; letter-spacing: -0.005em; padding-block: 56px 40px; border-bottom: 1px solid var(--hairline); }
.footer__cols { display: grid; gap: 32px; grid-template-columns: 1fr 1fr; padding-block: 44px; }
@media (min-width: 760px) { .footer__cols { grid-template-columns: 2fr 1fr 1fr 1fr; } }
.footer__brand .brand { margin-bottom: 12px; }
.footer__brand p { font-size: 14px; color: var(--ink-3); max-width: 26em; }
.footer__col h5 { font-family: var(--font-mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); font-weight: 500; margin-bottom: 14px; }
.footer__col a { display: block; font-size: 14.5px; color: var(--ink-2); padding: 5px 0; }
.footer__col a:hover { color: var(--ink); }
.footer__bottom { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; padding-block: 24px; border-top: 1px solid var(--hairline); font-family: var(--font-mono); font-size: 12.5px; color: var(--ink-3); }
.footer__bottom .sp { margin-left: auto; }

/* ---------- Scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s ease-out, transform .6s ease-out; }
.reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

/* Pill type-in animation (hero) */
@keyframes pillin { from { opacity: 0; transform: translateY(3px); } to { opacity: 1; transform: none; } }
.pill-anim { opacity: 0; animation: pillin .4s ease-out forwards; }
@media (prefers-reduced-motion: reduce) { .pill-anim { opacity: 1; animation: none; } }

/* =====================================================================
   INTERACTION LAYER
   ===================================================================== */

/* ---- Active nav link (scroll-spy) ---- */
.nav__links a.is-active { color: var(--ink); }
.nav__links a.is-active::after { content: ""; display: block; height: 1.5px; background: var(--brand); margin-top: 3px; }

/* ---- Animated problem bars ---- */
.bar__fill { width: 0; transition: width .9s cubic-bezier(.16,1,.3,1); }
.daycard.is-in .bar__fill { width: var(--w, 0); }
@media (prefers-reduced-motion: reduce) { .bar__fill { transition: none; width: var(--w, 0); } }

/* ---- Citation pill: now a real button ---- */
button.pill { cursor: pointer; font-family: var(--font-mono); }
button.pill:hover { filter: brightness(.97); }
button.pill:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.pill.is-open { box-shadow: 0 0 0 2px color-mix(in srgb, var(--cite) 35%, transparent); }

/* ---- Source popover ---- */
.popover {
  position: absolute; z-index: 70; width: 290px; max-width: calc(100vw - 24px);
  background: var(--paper); border: 1px solid var(--hairline-2);
  box-shadow: 0 20px 50px -20px rgba(9,9,11,.35); padding: 14px 16px;
  animation: pop .14s ease-out;
}
@keyframes pop { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.popover__head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; font-family: var(--font-mono); }
.popover__src { font-size: 12px; color: var(--ink); font-weight: 500; }
.popover__pg { font-size: 11px; color: var(--brand); }
.popover__quote { margin-top: 8px; font-size: 13px; line-height: 1.5; color: var(--ink-2); }
.popover__open { margin-top: 12px; width: 100%; background: var(--brand-tint); color: var(--brand); border: 1px solid color-mix(in srgb, var(--brand) 26%, transparent); font-family: var(--font-mono); font-size: 12px; padding: 7px; }
.popover__open:hover { background: #e3ecff; }

/* ---- Interactive Desk ---- */
.deskmock__input { gap: 8px; }
.deskmock__field { flex: 1; border: 0; outline: 0; background: transparent; font-family: var(--font-mono); font-size: 13px; color: var(--ink); min-width: 0; }
.deskmock__field::placeholder { color: var(--ink-4); }
.send { border: 0; }
.send:disabled { opacity: .5; cursor: default; }
.deskmock__chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--hairline); }
.chipbtn {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-mono); font-size: 11.5px; color: var(--brand);
  background: var(--brand-tint);
  border: 1px solid color-mix(in srgb, var(--brand) 30%, transparent);
  border-radius: var(--radius-pill);
  padding: 5px 11px; cursor: pointer;
  transition: background .14s, color .14s, border-color .14s, transform .14s, box-shadow .14s;
}
.chipbtn::before { content: "\2192"; font-size: 12px; line-height: 1; opacity: .55; transition: transform .14s, opacity .14s; }
.chipbtn:hover {
  background: var(--brand); color: var(--on-brand); border-color: var(--brand);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px color-mix(in srgb, var(--brand) 22%, transparent);
}
.chipbtn:hover::before { opacity: 1; transform: translateX(2px); }
.chipbtn:active { transform: translateY(0); box-shadow: none; }
.chipbtn:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.deskmock__status { padding: 16px; font-family: var(--font-mono); font-size: 12.5px; color: var(--ink-3); display: grid; gap: 7px; }
.deskmock__status .stat-row { display: flex; align-items: center; gap: 9px; opacity: 0; animation: pillin .3s ease-out forwards; }
.deskmock__status .stat-row .tick { color: var(--ok); }
.deskmock__status .stat-row .spin { width: 11px; height: 11px; border: 1.5px solid var(--hairline-2); border-top-color: var(--brand); border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.deskmock__row { opacity: 0; }
.deskmock__row.is-in { animation: pillin .3s ease-out forwards; }
.deskmock__actions { display: flex; gap: 10px; padding-top: 16px; }
@media (prefers-reduced-motion: reduce) { .deskmock__status .stat-row, .deskmock__row.is-in { opacity: 1; animation: none; } }

/* ---- Agent cards as buttons ---- */
.agent { text-align: left; font: inherit; cursor: pointer; display: block; width: 100%; }
.agent__more { display: inline-block; margin-top: 14px; font-family: var(--font-mono); font-size: 11.5px; color: var(--brand); opacity: 0; transform: translateX(-4px); transition: opacity .15s, transform .15s; }
.agent:hover .agent__more, .agent:focus-visible .agent__more { opacity: 1; transform: none; }
.agent:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

/* ---- Footer social / region ---- */
.footer__bottom .sp { flex: 1; }
.footer__region { color: var(--ink-3); }
.footer__social { color: var(--ink-2); }
.footer__social:hover { color: var(--brand); }

/* =====================================================================
   MODALS
   ===================================================================== */
.modal-root { position: fixed; inset: 0; z-index: 100; display: none; }
.modal-root.is-open { display: grid; place-items: center; padding: 20px; }
.modal-overlay { position: fixed; inset: 0; background: rgba(9,12,18,.55); backdrop-filter: blur(3px); animation: fade .2s ease-out; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.modal {
  position: relative; z-index: 1; width: 100%; max-width: 520px; max-height: 88vh; overflow-y: auto;
  background: var(--paper); border: 1px solid var(--hairline); padding: 32px;
  box-shadow: 0 40px 90px -30px rgba(9,9,11,.5); animation: modalin .22s cubic-bezier(.16,1,.3,1);
}
.modal--narrow { max-width: 420px; }
@keyframes modalin { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .modal, .modal-overlay { animation: none; } }
.modal__x { position: absolute; top: 14px; right: 16px; background: none; border: 0; font-size: 26px; line-height: 1; color: var(--ink-3); }
.modal__x:hover { color: var(--ink); }
.modal__title { font-size: 26px; margin-top: 10px; }
.modal__sub { margin-top: 12px; color: var(--ink-2); font-size: 15px; line-height: 1.55; }

/* Forms */
.form { margin-top: 22px; display: grid; gap: 16px; }
.field { display: grid; gap: 6px; }
.field label { font-size: 13px; color: var(--ink-2); font-weight: 500; }
.field input, .field select, .field textarea {
  font: inherit; font-size: 15px; color: var(--ink); background: var(--paper-2);
  border: 1px solid var(--hairline-2); padding: 11px 13px; border-radius: var(--radius); width: 100%; outline: 0;
  transition: border-color .12s, box-shadow .12s;
}
.field textarea { resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-tint); }
.field.has-err input, .field.has-err select { border-color: var(--cite-mismatch); }
.field__err { font-size: 12px; color: var(--cite-mismatch); min-height: 0; }
.field.has-err .field__err { min-height: 1em; }
.form .btn { margin-top: 4px; justify-content: center; }
.form__fine { font-size: 12.5px; color: var(--ink-3); text-align: center; }

.form__success { text-align: center; padding: 18px 0 6px; animation: pillin .3s ease-out; }
.form__check { width: 52px; height: 52px; margin: 0 auto 16px; border-radius: 50%; background: color-mix(in srgb, var(--ok) 14%, transparent); display: grid; place-items: center; }
.form__check svg { width: 26px; height: 26px; stroke: var(--ok); }
.form__success h4 { font-family: var(--font-display); font-size: 22px; }
.form__success p { margin: 10px 0 20px; color: var(--ink-2); font-size: 15px; }

.seclist { list-style: none; margin: 22px 0; display: grid; gap: 14px; }
.seclist li { font-size: 14.5px; line-height: 1.55; color: var(--ink-2); padding-left: 22px; position: relative; }
.seclist li::before { content: ""; position: absolute; left: 0; top: 8px; width: 8px; height: 8px; background: var(--brand); }
.seclist b { color: var(--ink); font-weight: 600; }

/* =====================================================================
   TOASTS
   ===================================================================== */
.toasts { position: fixed; right: 20px; bottom: 20px; z-index: 120; display: grid; gap: 10px; }
.toast {
  background: var(--ink); color: #fff; padding: 12px 16px; font-size: 14px; max-width: 340px;
  box-shadow: 0 18px 40px -18px rgba(0,0,0,.5); animation: toastin .26s cubic-bezier(.16,1,.3,1);
  display: flex; align-items: center; gap: 10px;
}
.toast .t-dot { width: 7px; height: 7px; background: var(--brand); flex: none; }
.toast.is-out { animation: toastout .25s ease-in forwards; }
@keyframes toastin { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes toastout { to { opacity: 0; transform: translateY(10px); } }
@media (prefers-reduced-motion: reduce) { .toast { animation: none; } }

body.modal-open { overflow: hidden; }

/* =====================================================================
   POLISH PASS — restrained, consistent hovers + softer ambient effects
   ===================================================================== */
/* Consistent subtle card lift (kept gentle, not bouncy) */
.statchip, .pillar, .step { transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease; }
.statchip:hover, .pillar:hover, .step:hover {
  transform: translateY(-2px); border-color: var(--hairline-2);
  box-shadow: 0 16px 36px -28px rgba(9,9,11,.22);
}
.agent:hover { box-shadow: 0 16px 36px -28px rgba(9,9,11,.22); }

/* Soften the Brain node so it reads as ambient, not flashing */
.brain__node { box-shadow: 0 18px 44px -30px rgba(29,78,216,.42); animation-duration: 5s; }
@keyframes corepulse { 0%,100% { box-shadow: 0 18px 44px -30px rgba(29,78,216,.34); } 50% { box-shadow: 0 20px 52px -26px rgba(29,78,216,.5); } }

/* Soften the Pilot radial */
.pilot__bg { background: radial-gradient(620px 320px at 50% -25%, rgba(59,110,229,.22), transparent 62%); }

/* Buttons: consistent gentle hover lift */
.btn--primary:hover, .btn--onnight:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

/* =====================================================================
   REGION SWITCHER (India / US / UK)
   ===================================================================== */
.regionbar { display: inline-flex; align-items: center; gap: 4px; padding: 4px; margin-bottom: 16px;
  border: 1px solid var(--hairline-2); background: var(--paper); }
.regionbar__lbl { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-4); padding: 0 10px 0 8px; }
.regionbtn { display: inline-flex; align-items: center; gap: 7px; padding: 7px 14px; border: 0; background: transparent;
  font-family: var(--font-sans); font-size: 14px; font-weight: 500; color: var(--ink-2); transition: background .15s, color .15s; }
.regionbtn .fl { font-size: 15px; line-height: 1; filter: saturate(1.05); }
.regionbtn:hover { color: var(--ink); }
.regionbtn.is-active { background: var(--brand); color: var(--on-brand); }
.regionbtn:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

/* Smooth content swap when region changes */
.r-swapping [data-r],
.r-swapping [data-r-list] { opacity: 0; transform: translateY(4px); }
[data-r], [data-r-list] { transition: opacity .28s ease, transform .28s ease; }
@media (prefers-reduced-motion: reduce) { [data-r], [data-r-list] { transition: none; } }

/* A small region tag used in section headers (e.g. "for India") */
.rtag { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-mono); font-size: 11px;
  letter-spacing: .04em; color: var(--brand); border: 1px solid color-mix(in srgb, var(--brand) 26%, transparent);
  background: var(--brand-tint); padding: 2px 9px; vertical-align: middle; }

@media (max-width: 520px) {
  .regionbar { width: 100%; justify-content: space-between; }
  .regionbar__lbl { display: none; }
  .regionbtn { flex: 1; justify-content: center; }
}

/* =====================================================================
   THE COMPANY BRAIN — interactive knowledge graph
   ===================================================================== */
/* Region-aware ingest strip (the fuel) */
.ingest { margin-top: 40px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.ingest__lbl { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); margin-right: 4px; }
.ingest__chips { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.ingest__chips .chip { background: var(--paper); border: 1px solid var(--hairline); padding: 5px 10px; font-family: var(--font-mono); font-size: 12px; color: var(--ink-2); }
.ingest__plus { font-family: var(--font-mono); font-size: 12px; color: var(--brand); border: 1px dashed color-mix(in srgb, var(--brand) 40%, var(--hairline)); padding: 5px 10px; }

.kg { margin-top: 20px; display: grid; grid-template-columns: 1fr; align-items: start; border: 1px solid var(--hairline); background: var(--paper); overflow: hidden; }
@media (min-width: 940px) { .kg { grid-template-columns: minmax(0, 1fr) 360px; } }

.kg__canvas { position: relative; aspect-ratio: 1000 / 600; min-height: 340px;
  background:
    radial-gradient(circle at 1px 1px, color-mix(in srgb, var(--ink) 7%, transparent) 1px, transparent 0) 0 0 / 26px 26px,
    var(--paper-2);
}
/* desktop: fixed height so the canvas can't grow its own width via aspect-ratio
   when the (taller) match panel stretches the grid row */
@media (min-width: 940px) { .kg__canvas { aspect-ratio: auto; height: 480px; border-right: 1px solid var(--hairline); } }
#kgSvg { position: absolute; inset: 0; width: 100%; height: 100%; }

/* edges (curved paths) */
.kg-edge { fill: none; stroke: var(--hairline-2); stroke-width: 1.25; stroke-opacity: .8; transition: stroke .25s, stroke-width .25s, stroke-opacity .25s; }
.kg-edge.is-hot { stroke: var(--brand); stroke-width: 2; stroke-opacity: 1; }
.kg-edge-label { font-family: var(--font-mono); font-size: 10px; fill: var(--ink-3); paint-order: stroke; stroke: var(--paper-2); stroke-width: 3px; }
.kg-dv { fill: none; stroke: var(--kg-dejavu); stroke-width: 1.8; stroke-dasharray: 6 5; stroke-linecap: round; animation: kgdash 1.1s linear infinite; cursor: pointer; }
.kg-dv.is-active { stroke-width: 2.8; }
@keyframes kgdash { to { stroke-dashoffset: -22; } }
@media (prefers-reduced-motion: reduce) { .kg-dv { animation: none; } }
.kg-dv-badge rect { fill: var(--paper); stroke: var(--kg-dejavu); stroke-opacity: .85; filter: drop-shadow(0 2px 5px rgba(220,38,38,.18)); }
.kg-dv-badge text { font-family: var(--font-mono); font-size: 10px; font-weight: 500; fill: var(--kg-dejavu); }

/* nodes */
.kg-node { cursor: pointer; }
.kg-node .glow { opacity: 0; transition: opacity .3s, r .3s; }
.kg-node .halo { transition: r .25s, opacity .25s; }
.kg-node .core { stroke: var(--paper); stroke-width: 1.5; transition: r .25s; }
.kg-node text { font-family: var(--font-display); font-size: 12.5px; font-weight: 500; fill: var(--ink-2);
  paint-order: stroke; stroke: var(--paper-2); stroke-width: 3.5px; stroke-linejoin: round;
  transition: fill .2s; pointer-events: none; }
.kg-node text.sub { font-family: var(--font-mono); font-size: 9px; font-weight: 400; fill: var(--kg-dejavu); }
.kg-node.is-active text { fill: var(--ink); font-weight: 600; }
.kg-node.is-active .glow { opacity: .2; }
.kg-node:hover .glow { opacity: .12; }
.kg-node .ring { stroke-dasharray: 3 3; stroke-width: 1; fill: none; }

/* overlays */
.kg__legend { position: absolute; top: 14px; left: 14px; background: color-mix(in srgb, var(--paper) 88%, transparent); backdrop-filter: blur(6px); border: 1px solid var(--hairline); padding: 11px 13px; font-size: 12px; }
.kg__legend-h { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 8px; }
.kg__leg { display: flex; align-items: center; gap: 8px; padding: 2px 0; color: var(--ink-2); }
.kg__leg .dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.kg__leg--dv { padding-top: 7px; margin-top: 5px; border-top: 1px solid var(--hairline); }
.kg__chip { position: absolute; top: 14px; right: 14px; display: inline-flex; align-items: center; gap: 7px;
  background: var(--cite-mismatch-tint); border: 1px solid color-mix(in srgb, var(--kg-dejavu) 40%, transparent); color: var(--kg-dejavu);
  padding: 7px 12px; font-size: 12.5px; font-weight: 500; transition: background .15s; }
.kg__chip svg { width: 15px; height: 15px; stroke: var(--kg-dejavu); }
.kg__chip:hover { background: color-mix(in srgb, var(--kg-dejavu) 16%, transparent); }
.kg__stat { position: absolute; bottom: 14px; left: 14px; font-family: var(--font-mono); font-size: 10.5px; color: var(--ink-3);
  background: color-mix(in srgb, var(--paper) 80%, transparent); padding: 4px 8px; }
.kg__hint { position: absolute; bottom: 14px; right: 14px; display: flex; align-items: center; gap: 7px; font-family: var(--font-mono); font-size: 10.5px; color: var(--ink-4); }
.kg__hint.is-hidden { opacity: 0; }
.kg__pulse { width: 7px; height: 7px; border-radius: 50%; background: var(--brand); animation: kgpulse 1.6s ease-in-out infinite; }
@keyframes kgpulse { 0%,100% { opacity: .4; transform: scale(.8); } 50% { opacity: 1; transform: scale(1.15); } }
@media (prefers-reduced-motion: reduce) { .kg__pulse { animation: none; } }

/* side panel */
.kg__panel { padding: 22px; min-height: 340px; overflow-y: auto; overflow-x: hidden; font-size: 14px; }
@media (min-width: 940px) { .kg__panel { height: 480px; } }
.kg__kind { font-family: var(--font-mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); }
.kg__title { font-family: var(--font-display); font-size: 21px; font-weight: 600; margin-top: 4px; line-height: 1.15; }
.kg__recall { margin-top: 16px; background: var(--cite-mismatch-tint); border: 1px solid color-mix(in srgb, var(--kg-dejavu) 35%, transparent); padding: 12px 14px; }
.kg__recall-h { display: flex; align-items: center; gap: 6px; font-family: var(--font-mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--kg-dejavu); font-weight: 600; }
.kg__recall p { margin-top: 7px; font-size: 13px; color: var(--ink-2); line-height: 1.45; }
.kg__matchbtn { width: 100%; text-align: left; display: flex; justify-content: space-between; gap: 10px; align-items: center;
  margin-top: 8px; padding: 8px 10px; background: var(--paper); border: 1px solid var(--hairline); font-size: 12.5px; color: var(--ink-2); transition: border-color .12s; }
.kg__matchbtn:hover { border-color: var(--kg-dejavu); }
.kg__matchbtn .sc { font-family: var(--font-mono); color: var(--kg-dejavu); flex: none; }
.kg__block { margin-top: 14px; border: 1px solid var(--hairline); background: var(--paper-2); padding: 12px 14px; }
.kg__block-h { font-family: var(--font-mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--brand); margin-bottom: 7px; }
.kg__block p, .kg__block li { font-size: 13px; color: var(--ink-2); line-height: 1.5; }
.kg__block ul { list-style: none; display: grid; gap: 5px; }
.kg__back { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-mono); font-size: 11px; color: var(--ink-3); background: none; border: 0; padding: 0; margin-bottom: 12px; }
.kg__back:hover { color: var(--ink); }
.kg__arrowrow { display: flex; align-items: center; gap: 8px; margin-top: 6px; font-size: 14px; font-weight: 600; }
.kg__arrowrow .to { color: var(--ink-3); font-weight: 400; }
.kg__meta { margin-top: 6px; font-family: var(--font-mono); font-size: 11px; color: var(--ink-3); }
.kg__meta .sc { color: var(--kg-dejavu); }
.kg__diff { margin-top: 14px; border: 1px solid var(--hairline); width: 100%; border-collapse: collapse; font-size: 12.5px; }
.kg__diff th { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); font-weight: 400; text-align: right; padding: 7px 10px; border-bottom: 1px solid var(--hairline); }
.kg__diff th:first-child { text-align: left; }
.kg__diff td { padding: 6px 10px; border-bottom: 1px solid var(--hairline); font-family: var(--font-mono); }
.kg__diff td:first-child { font-family: var(--font-sans); color: var(--ink-2); }
.kg__diff td.num { text-align: right; color: var(--ink-3); }
.kg__diff td.up { color: var(--ok); }
.kg__diff td.down { color: var(--kg-dejavu); }
.kg__acts { margin-top: 14px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.kg__acts .btn { justify-content: center; font-size: 12.5px; padding: 9px; }
