/* Maestro by Transformix — landing page.
   Tokens follow the product's DESIGN.md (navy ink, cyan = "this figure is traceable").
   Motion follows Emil Kowalski's rules: custom ease-out curves, transform/opacity only,
   transitions (interruptible) over keyframes, scale 0.97 on press, blur to bridge crossfades.

   NOTE: there is deliberately NO prefers-reduced-motion block in this file. The owner decided
   that decorative motion plays for every visitor (Windows "Animation effects: off" was silently
   killing it on earlier Transformix sites). Do not re-add one. */

:root {
  --ink: #14305e;
  --ink-2: #1d4180;
  --ink-deep: #0b2447;
  --ink-soft: #edf2fa;
  --ground: #f5f7fa;
  --sheet: #ffffff;
  --line: #e2e7ef;
  --line-strong: #cbd3df;
  --text: #18212f;
  --muted: #576176;
  --trace: #0e74a4;
  --trace-bright: #5cc3e8;
  --trace-soft: #e5f3f9;
  --series: #34509a;

  --provided: #14305e;   --provided-soft: #eaf0f9;
  --extracted: #0c716e;  --extracted-soft: #e2f3f1;
  --inferred: #95600c;   --inferred-soft: #fbf0dc;
  --missing: #b4381f;    --missing-soft: #fbe8e3;
  --verified: #1f7546;   --verified-soft: #e3f2e9;

  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);

  --r-sheet: 14px;
  --r-ctl: 9px;
  --shadow-sheet: 0 1px 2px rgb(16 32 64 / 0.05), 0 10px 28px -14px rgb(16 32 64 / 0.16);
  --shadow-pop: 0 28px 64px -22px rgb(11 36 71 / 0.38), 0 2px 8px rgb(11 36 71 / 0.08);

  --dir: 1;            /* +1 in LTR, -1 in RTL: lets one transform serve both directions */
  --origin: left;      /* inline-start, for scaleX bars */
  --wrap: 1200px;
  --gutter: clamp(18px, 4vw, 40px);

  --font: "IBM Plex Sans", "IBM Plex Sans Arabic", system-ui, sans-serif;
  --font-num: "IBM Plex Sans", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;
}
[dir="rtl"] {
  --dir: -1;
  --origin: right;
  --font: "IBM Plex Sans Arabic", "IBM Plex Sans", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  background: var(--sheet);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
[dir="rtl"] body { line-height: 1.8; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--trace); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--trace-soft); color: var(--ink-deep); }

.num, .mono {
  font-family: var(--font-num);
  font-variant-numeric: tabular-nums lining-nums;
  unicode-bidi: isolate;
}
.mono { font-family: var(--font-mono); font-size: 0.92em; letter-spacing: 0; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { width: min(100%, var(--wrap)); margin-inline: auto; padding-inline: var(--gutter); }
.ico { width: 1em; height: 1em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
[dir="rtl"] .flip { transform: scaleX(-1); }

/* ───────── Type ───────── */
h1, h2, h3, h4 { margin: 0; color: var(--ink-deep); font-weight: 600; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
.kicker {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 13px; font-weight: 600; letter-spacing: 0.04em;
  color: var(--trace);
}
[dir="ltr"] .kicker { text-transform: uppercase; letter-spacing: 0.09em; font-size: 12px; }
.kicker::before { content: ""; width: 18px; height: 2px; background: currentColor; border-radius: 2px; }
.h1 { font-size: clamp(2.15rem, 4.6vw, 3.7rem); line-height: 1.12; letter-spacing: -0.025em; font-weight: 600; }
[dir="rtl"] .h1 { line-height: 1.38; letter-spacing: 0; font-size: clamp(2rem, 4.1vw, 3.3rem); }
.h2 { font-size: clamp(1.7rem, 3.1vw, 2.6rem); line-height: 1.16; letter-spacing: -0.02em; }
[dir="rtl"] .h2 { line-height: 1.45; letter-spacing: 0; font-size: clamp(1.6rem, 2.8vw, 2.35rem); }
.lede { font-size: clamp(1.02rem, 1.35vw, 1.16rem); color: var(--muted); max-width: 62ch; }

/* ───────── Buttons ───────── */
.btn {
  --bg: var(--ink); --fg: #fff; --bd: transparent;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 46px; padding: 0 20px;
  border-radius: var(--r-ctl);
  background: var(--bg); color: var(--fg);
  border: 1px solid var(--bd);
  font-weight: 600; font-size: 15px; white-space: nowrap;
  transition: transform 160ms var(--ease-out), background-color 200ms ease, border-color 200ms ease, box-shadow 200ms ease;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}
.btn:active { transform: scale(0.97); }
.btn .ico { width: 18px; height: 18px; }
.btn-ghost { --bg: transparent; --fg: var(--ink-deep); --bd: var(--line-strong); }
.btn-sm { min-height: 38px; padding: 0 14px; font-size: 14px; }
@media (hover: hover) and (pointer: fine) {
  .btn:hover { --bg: var(--ink-2); box-shadow: 0 6px 18px -8px rgb(20 48 94 / 0.55); }
  .btn-ghost:hover { --bg: var(--ink-soft); --bd: var(--line-strong); box-shadow: none; }
}

/* ───────── Header ───────── */
.top {
  position: sticky; top: 0; z-index: 50;
  background: rgb(255 255 255 / 0.82);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 200ms ease;
}
.top.is-scrolled { border-bottom-color: var(--line); }
.top-in { display: flex; align-items: center; gap: 28px; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; color: var(--ink-deep); font-size: 18px; }
.brand small { font-weight: 500; font-size: 12px; color: var(--muted); margin-inline-start: 2px; }
.mark { width: 30px; height: 30px; }
.top-nav { display: flex; gap: 4px; margin-inline-start: auto; }
.top-nav a {
  padding: 8px 12px; border-radius: 8px; font-size: 14.5px; color: var(--muted);
  transition: color 160ms ease, background-color 160ms ease;
}
@media (hover: hover) and (pointer: fine) { .top-nav a:hover { color: var(--ink-deep); background: var(--ground); } }
.top-act { display: flex; align-items: center; gap: 8px; }
.lang { font-size: 14px; font-weight: 600; color: var(--ink); padding: 8px 10px; border-radius: 8px; }
@media (hover: hover) and (pointer: fine) { .lang:hover { background: var(--ground); } }
@media (max-width: 920px) { .top-nav { display: none; } .top-act { margin-inline-start: auto; } }
@media (max-width: 420px) { .brand small { display: none; } .top-act .btn { padding: 0 12px; } }

/* ───────── Hero ───────── */
.hero { position: relative; padding-top: clamp(40px, 7vw, 84px); isolation: isolate; }
.hero::before {
  /* ledger grid: the product's world is a spreadsheet, so the backdrop is too */
  content: ""; position: absolute; inset: 0 0 18% 0; z-index: -1;
  background-image:
    linear-gradient(to right, rgb(20 48 94 / 0.055) 1px, transparent 1px),
    linear-gradient(to bottom, rgb(20 48 94 / 0.055) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 75% 70% at 50% 30%, #000 30%, transparent 78%);
  mask-image: radial-gradient(ellipse 75% 70% at 50% 30%, #000 30%, transparent 78%);
}
.hero::after {
  content: ""; position: absolute; inset: auto 0 0 0; height: 46%; z-index: -1;
  background: linear-gradient(to bottom, transparent, var(--ground));
}
.hero-copy { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 28px 56px; align-items: end; }
.hero-copy .h1 { margin-top: 18px; }
.hero-side { display: grid; gap: 24px; padding-bottom: 6px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 10px; }
@media (max-width: 960px) { .hero-copy { grid-template-columns: 1fr; } }

.hero-stage { margin-top: clamp(36px, 5vw, 60px); padding-bottom: clamp(48px, 6vw, 80px); }
.stage-cap {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  margin-top: 16px; font-size: 13.5px; color: var(--muted); text-align: center;
}
.stage-cap .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--trace); box-shadow: 0 0 0 4px var(--trace-soft); flex: none; }

/* ───────── Workspace mock (the product) ───────── */
.ws {
  position: relative; overflow: hidden;
  display: grid; grid-template-columns: 228px minmax(0, 1fr);
  min-height: 560px;
  background: var(--ground);
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  box-shadow: var(--shadow-pop);
  font-size: 13px; line-height: 1.55;
  isolation: isolate;
}
.ws-rail {
  background: var(--ink-deep); color: #c9d6ea;
  padding: 18px 14px; display: flex; flex-direction: column; gap: 14px;
}
.ws-brand { display: flex; align-items: center; gap: 8px; color: #fff; font-weight: 700; font-size: 14px; }
.ws-brand .mark { width: 22px; height: 22px; }
.ws-back { font-size: 12px; color: #8fa6c8; display: flex; align-items: center; gap: 6px; }
.ws-proj { color: #fff; font-weight: 600; font-size: 14px; padding: 10px 10px; background: rgb(255 255 255 / 0.06); border-radius: 9px; }
.ws-proj span { color: #8fa6c8; font-weight: 400; font-size: 12px; }
.ws-nav { display: grid; gap: 2px; }
.ws-nav span { padding: 6px 10px; border-radius: 7px; font-size: 12.5px; }
.ws-nav .is-on { background: rgb(255 255 255 / 0.1); color: #fff; }
.ws-jr { list-style: none; margin: 4px 0 0; padding: 12px 0 0; border-top: 1px solid rgb(255 255 255 / 0.1); display: grid; gap: 7px; font-size: 12px; }
.ws-jr li { display: flex; align-items: center; gap: 9px; color: #b9c8df; }
.ws-jr i {
  width: 18px; height: 18px; border-radius: 50%; flex: none;
  display: grid; place-items: center; font-style: normal; font-size: 10px; font-family: var(--font-num);
  border: 1.5px solid var(--trace-bright); color: var(--ink-deep); background: var(--trace-bright);
}
.ws-jr li.is-gate i { border-radius: 5px; }
.ws-jr li.is-now i { background: transparent; color: var(--trace-bright); }
.ws-jr li.is-now { color: #fff; font-weight: 600; }
.ws-jr .ico { width: 11px; height: 11px; stroke-width: 2.6; }
.ws-jr em { font-style: normal; margin-inline-start: auto; font-size: 10.5px; color: var(--trace-bright); }

.ws-main { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.ws-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; color: var(--muted); font-size: 12px; }
.ws-top b { color: var(--text); font-weight: 600; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 99px; background: var(--sheet); border: 1px solid var(--line); font-size: 11.5px; color: var(--muted); }
.pill-demo { margin-inline-start: auto; background: var(--inferred-soft); border-color: transparent; color: var(--inferred); font-weight: 600; }

.ws-next {
  position: relative; background: var(--sheet); border-radius: 12px; box-shadow: var(--shadow-sheet);
  padding: 13px 16px; display: flex; align-items: center; gap: 16px;
  border-inline-start: 4px solid var(--trace);
}
.ws-next small { display: block; font-size: 11px; font-weight: 600; color: var(--trace); letter-spacing: 0.02em; }
.ws-next p { font-weight: 600; color: var(--ink-deep); font-size: 14px; }
.ws-next .btn { margin-inline-start: auto; min-height: 32px; font-size: 12.5px; padding: 0 12px; border-radius: 7px; }

.ws-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 14px; flex: 1; min-height: 0; }
.sheet { background: var(--sheet); border-radius: 12px; box-shadow: var(--shadow-sheet); }
.ws-slide { padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; }
.slide-h { display: flex; align-items: baseline; gap: 10px; }
.slide-h .mono { color: var(--muted); font-size: 11px; }
.slide-h h4 { font-size: 15px; }
.slide-fig { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; color: var(--muted); }

/* Figure link — the product's signature: cyan, dotted underline, opens the evidence drawer */
.fig {
  position: relative;
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--trace); font-weight: 700; font-size: 22px; line-height: 1.2;
  border-bottom: 2px dotted currentColor; padding-bottom: 1px;
  transition: transform 140ms var(--ease-out), color 160ms ease;
  -webkit-tap-highlight-color: transparent;
}
.fig .ico { width: 15px; height: 15px; stroke-width: 2.2; }
.fig:active, .fig.is-pressed { transform: scale(0.97); }
.fig::after {
  content: ""; position: absolute; inset: -6px -8px; border-radius: 9px;
  box-shadow: 0 0 0 2px var(--trace); opacity: 0;
  transition: opacity 200ms ease;
}
.ws.is-open .fig::after { opacity: 0.35; }
@media (hover: hover) and (pointer: fine) { .fig:hover { color: var(--ink-2); } }

.chart { position: relative; flex: 1; min-height: 168px; display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; align-items: end; padding-top: 18px; border-bottom: 1px solid var(--line); }
.chart::before { content: ""; position: absolute; inset: 18px 0 auto; border-top: 1px dashed var(--line); }
.bar { position: relative; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; }
.bar b {
  display: block; width: min(100%, 46px); height: calc(var(--h) * 1%);
  background: var(--series); border-radius: 5px 5px 2px 2px;
  transform-origin: bottom; transform: scaleY(0);
  transition: transform 900ms var(--ease-out);
  transition-delay: calc(var(--i) * 70ms + 250ms);
}
.bar.is-key b { background: var(--trace); }
.bar span { position: absolute; bottom: calc(var(--h) * 1% + 4px); font-size: 10.5px; color: var(--muted); font-family: var(--font-num); opacity: 0; transition: opacity 300ms ease; transition-delay: calc(var(--i) * 70ms + 700ms); }
.bar.is-key span { color: var(--trace); font-weight: 700; }
.chart-x { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; font-size: 10.5px; color: var(--muted); text-align: center; font-family: var(--font-num); }
.is-live .bar b { transform: scaleY(1); }
.is-live .bar span { opacity: 1; }

.ws-board { padding: 8px 0; display: flex; flex-direction: column; }
.ws-board h5 { margin: 0; padding: 6px 16px 8px; font-size: 12px; color: var(--muted); font-weight: 600; display: flex; justify-content: space-between; }
.ws-row { display: flex; align-items: center; gap: 10px; padding: 7.5px 16px; border-top: 1px solid var(--line); font-size: 12.5px; }
.ws-row > span:first-child { color: var(--muted); font-family: var(--font-num); font-size: 11px; width: 16px; }
.ws-row > b { font-weight: 500; color: var(--text); }
.ws-row .chip { margin-inline-start: auto; }

/* State chips: icon + word, never colour alone */
.chip {
  --c: var(--provided); --s: var(--provided-soft);
  display: inline-flex; align-items: center; gap: 5px; white-space: nowrap;
  padding: 2px 9px 2px 8px; border-radius: 99px;
  background: var(--s); color: var(--c);
  font-size: 11px; font-weight: 600; line-height: 1.6;
}
.chip .ico { width: 11px; height: 11px; stroke-width: 2.4; }
.chip[data-s="extracted"] { --c: var(--extracted); --s: var(--extracted-soft); }
.chip[data-s="inferred"]  { --c: var(--inferred);  --s: var(--inferred-soft); }
.chip[data-s="missing"]   { --c: var(--missing);   --s: var(--missing-soft); }
.chip[data-s="verified"]  { --c: var(--verified);  --s: var(--verified-soft); }
.chip[data-s="review"]    { --c: var(--ink);       --s: var(--ink-soft); }

/* Evidence drawer: inline-end side, iOS drawer curve in, faster out */
.ws-drawer {
  position: absolute; z-index: 5; inset-block: 10px; inset-inline-end: 10px;
  width: min(392px, calc(100% - 20px));
  background: var(--sheet); border-radius: 14px; box-shadow: var(--shadow-pop);
  border: 1px solid var(--line);
  display: flex; flex-direction: column;
  transform: translateX(calc(var(--dir) * 106%));
  transition: transform 220ms var(--ease-out), visibility 0s 220ms;
  visibility: hidden;
  overflow: hidden;
}
.ws.is-open .ws-drawer { transform: translateX(0); visibility: visible; transition: transform 520ms var(--ease-drawer), visibility 0s; }
.ws-scrim { position: absolute; inset: 0; z-index: 4; background: rgb(11 36 71 / 0.16); opacity: 0; pointer-events: none; transition: opacity 220ms ease; }
.ws.is-open .ws-scrim { opacity: 1; pointer-events: auto; transition-duration: 400ms; }
.dr-h { padding: 16px 18px 12px; border-bottom: 1px solid var(--line); display: flex; align-items: flex-start; gap: 12px; }
.dr-h small { display: block; color: var(--trace); font-weight: 600; font-size: 11px; }
.dr-h h4 { font-size: 16px; }
.dr-x { margin-inline-start: auto; width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; color: var(--muted); transition: background-color 160ms ease, transform 140ms var(--ease-out); }
.dr-x:active { transform: scale(0.94); }
@media (hover: hover) and (pointer: fine) { .dr-x:hover { background: var(--ground); } }
.dr-b { padding: 6px 18px 14px; overflow: auto; flex: 1; }
.chain { list-style: none; margin: 0; padding: 0; position: relative; }
.chain::before { content: ""; position: absolute; inset-block: 18px 22px; inset-inline-start: 8px; border-inline-start: 1.5px dashed var(--line-strong); }
.chain > li {
  position: relative; padding: 11px 0 11px; padding-inline-start: 28px;
  opacity: 0; transform: translateY(8px); filter: blur(3px);
  transition: opacity 160ms ease, transform 160ms var(--ease-out), filter 160ms ease;
}
.ws.is-open .chain > li { opacity: 1; transform: none; filter: none; transition-duration: 420ms; transition-delay: calc(var(--i) * 70ms + 200ms); }
.chain > li::before { content: ""; position: absolute; inset-inline-start: 3px; top: 16px; width: 11px; height: 11px; border-radius: 50%; background: var(--sheet); border: 2px solid var(--trace); }
.chain small { display: block; font-size: 10.5px; font-weight: 600; color: var(--muted); letter-spacing: 0.02em; }
.chain .v { font-weight: 700; color: var(--ink-deep); font-size: 14px; }
.chain .calc { margin-top: 4px; font-size: 11.5px; color: var(--muted); }
.facts { display: grid; gap: 6px; margin-top: 6px; }
.fact { border: 1px solid var(--line); border-radius: 9px; padding: 7px 10px; display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; align-items: center; }
.fact b { font-weight: 500; font-size: 12px; }
.fact .val { font-weight: 700; color: var(--ink-deep); font-family: var(--font-num); font-size: 12.5px; }
.fact p { grid-column: 1 / -1; font-size: 10.8px; color: var(--muted); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.dr-f { padding: 10px 18px; border-top: 1px solid var(--line); font-size: 11px; color: var(--muted); }

.ws-cursor {
  position: absolute; z-index: 6; top: 0; left: 0; width: 22px; height: 22px; pointer-events: none;
  transform: translate(var(--x, 80%), var(--y, 90%));
  opacity: 0;
  transition: transform 900ms var(--ease-in-out), opacity 240ms ease;
  filter: drop-shadow(0 2px 4px rgb(11 36 71 / 0.35));
}
.ws-cursor svg { width: 22px; height: 22px; transition: transform 120ms var(--ease-out); transform-origin: 4px 3px; }
.ws-cursor.is-on { opacity: 1; }
.ws-cursor.is-down svg { transform: scale(0.86); }

@media (max-width: 980px) {
  .ws { grid-template-columns: 1fr; min-height: 0; }
  .ws-rail { flex-direction: row; align-items: center; padding: 10px 14px; gap: 12px; }
  .ws-rail > :not(.ws-brand):not(.ws-proj) { display: none; }
  .ws-proj { padding: 4px 10px; font-size: 12.5px; }
}
@media (max-width: 720px) {
  .ws-grid { grid-template-columns: 1fr; }
  .ws-board .ws-row:nth-of-type(n + 5) { display: none; }
  .ws-next .btn { display: none; }
  .ws-main { padding: 14px; }
  .chart { min-height: 130px; }
}

/* ───────── Sections ───────── */
.sec { padding-block: clamp(72px, 10vw, 128px); }
.sec-ground { background: var(--ground); }
.sec-head { display: grid; gap: 16px; max-width: 760px; margin-bottom: clamp(36px, 5vw, 56px); }

/* Contrast: general AI vs Maestro */
.cmp-bar { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 22px; }
.seg {
  position: relative; display: inline-grid; grid-auto-flow: column; grid-auto-columns: 1fr;
  padding: 4px; border-radius: 12px; background: var(--sheet); border: 1px solid var(--line);
}
.seg button { position: relative; z-index: 1; padding: 9px 20px; font-weight: 600; font-size: 14.5px; color: var(--muted); border-radius: 9px; transition: color 200ms ease, transform 140ms var(--ease-out); }
.seg button:active { transform: scale(0.97); }
.seg button[aria-pressed="true"] { color: #fff; }
.seg-pill {
  position: absolute; z-index: 0; inset-block: 4px; inset-inline-start: 4px; width: calc(50% - 4px);
  border-radius: 9px; background: var(--missing);
  transition: transform 380ms var(--ease-out), background-color 300ms ease;
}
[data-mode="maestro"] .seg-pill { transform: translateX(calc(var(--dir) * 100%)); background: var(--ink); }
.cmp-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.doc {
  position: relative; background: var(--sheet); border-radius: var(--r-sheet); box-shadow: var(--shadow-sheet);
  padding: 22px 22px 20px; display: grid; gap: 14px; min-height: 196px;
  border: 1.5px solid transparent; transition: border-color 300ms ease;
}
[data-mode="general"] .doc { border-color: rgb(180 56 31 / 0.35); }
.doc-h { display: flex; align-items: center; gap: 10px; font-size: 13.5px; color: var(--muted); }
.doc-h .ico { width: 18px; height: 18px; color: var(--ink); }
.doc-lbl { font-size: 13px; color: var(--muted); }
.swap { display: grid; }
.swap > * { grid-area: 1 / 1; transition: opacity 260ms ease, transform 360ms var(--ease-out), filter 260ms ease; }
.doc-v .g { color: var(--missing); }
.doc-v .m { color: var(--trace); }
[data-mode="general"] .swap .m, [data-mode="maestro"] .swap .g { opacity: 0; transform: translateY(6px); filter: blur(4px); }
.doc-v { font-size: clamp(1.7rem, 3vw, 2.2rem); font-weight: 600; font-family: var(--font-num); line-height: 1.15; }
.doc-v .m span { border-bottom: 2px dotted currentColor; }
.doc-flag { position: absolute; inset-block-start: 16px; inset-inline-end: 16px; }
.cmp-cap { margin-top: 18px; min-height: 56px; }
.cmp-cap > p { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-weight: 500; }
.cmp-cap .g { color: var(--missing); }
.cmp-cap .m { color: var(--ink); }
.cmp-cap s { color: var(--muted); text-decoration-thickness: 1.5px; }
@media (max-width: 860px) { .cmp-grid { grid-template-columns: 1fr; } .doc { min-height: 0; } }

/* Principles */
.prin { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; margin-top: clamp(56px, 8vw, 96px); border-top: 1px solid var(--line-strong); }
.prin > div { padding: 22px 24px 4px 0; padding-inline-end: 24px; padding-inline-start: 0; display: grid; gap: 10px; align-content: start; }
.prin > div + div { padding-inline-start: 24px; border-inline-start: 1px solid var(--line); }
.prin .mono { color: var(--trace); font-size: 13px; }
.prin h3 { font-size: 17px; }
.prin p { color: var(--muted); font-size: 14.5px; }
@media (max-width: 980px) {
  .prin { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .prin > div:nth-child(3) { padding-inline-start: 0; border-inline-start: 0; }
  .prin > div:nth-child(n + 3) { border-top: 1px solid var(--line); }
}
@media (max-width: 600px) {
  .prin { grid-template-columns: 1fr; }
  .prin > div + div { padding-inline-start: 0; border-inline-start: 0; border-top: 1px solid var(--line); }
}

/* Journey: sticky product stage + scrolling steps */
.jr { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(32px, 5vw, 72px); align-items: start; }
.jr-steps { list-style: none; margin: 0; padding: 0; }
.jr-step { min-height: 72vh; display: grid; align-content: center; gap: 12px; padding-block: 32px; opacity: 0.38; transition: opacity 300ms ease; }
.jr-step:first-child { min-height: 56vh; align-content: start; padding-top: 8vh; }
.jr-step:last-child { min-height: 64vh; }
.jr-step.is-current { opacity: 1; }
.jr-n { display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 600; color: var(--muted); }
.jr-n .mono { color: var(--trace); }
.gate { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: 99px; background: var(--ink); color: #fff; font-size: 11.5px; font-weight: 600; }
.gate .ico { width: 12px; height: 12px; }
.jr-step h3 { font-size: clamp(1.3rem, 2vw, 1.6rem); line-height: 1.3; }
.jr-step p { color: var(--muted); max-width: 52ch; }
.jr-slot { display: none; }

.jr-stage { position: sticky; top: 104px; height: min(560px, calc(100vh - 140px)); }
.jr-track { display: flex; align-items: center; gap: 6px; margin-bottom: 14px; }
.jr-track span { flex: 1; height: 4px; border-radius: 4px; background: var(--line); position: relative; overflow: hidden; }
.jr-track span::after { content: ""; position: absolute; inset: 0; background: var(--trace); transform-origin: var(--origin); transform: scaleX(0); transition: transform 420ms var(--ease-out); }
.jr-track span.is-done::after { transform: scaleX(1); }
.jr-track span.is-gate { flex: 0 0 22px; height: 22px; border-radius: 6px; display: grid; place-items: center; background: var(--line); color: var(--muted); }
.jr-track span.is-gate::after { display: none; }
.jr-track span.is-gate .ico { width: 12px; height: 12px; }
.jr-track span.is-gate.is-done { background: var(--ink); color: #fff; }
.jr-panels { position: relative; height: calc(100% - 36px); }

.pn {
  position: absolute; inset: 0;
  background: var(--sheet); border-radius: 16px; box-shadow: var(--shadow-pop); border: 1px solid var(--line);
  padding: 22px; display: flex; flex-direction: column; gap: 14px; overflow: hidden;
  opacity: 0; transform: translateY(10px) scale(0.985); filter: blur(4px);
  transition: opacity 200ms ease, transform 200ms var(--ease-out), filter 200ms ease;
  pointer-events: none;
}
.pn.is-active { opacity: 1; transform: none; filter: none; pointer-events: auto; transition-duration: 420ms; }
.pn-h { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); }
.pn-h b { color: var(--ink-deep); font-size: 15px; }
.pn-h .pill { margin-inline-start: auto; }
/* Panel internals animate in when their panel becomes active, reset instantly once hidden */
.pn .a {
  opacity: 0; transform: translateY(8px);
  transition: opacity 0s, transform 0s; transition-delay: 240ms;
}
.pn.is-active .a {
  opacity: 1; transform: none;
  transition: opacity 380ms ease, transform 480ms var(--ease-out);
  transition-delay: calc(var(--i, 0) * 80ms + 160ms);
}
.pn .grow { transform-origin: var(--origin); transform: scaleX(0); transition: transform 0s; transition-delay: 240ms; }
.pn.is-active .grow { transform: scaleX(var(--w, 1)); transition: transform 1100ms var(--ease-out); transition-delay: calc(var(--i, 0) * 80ms + 300ms); }

.file { display: grid; grid-template-columns: 36px 1fr auto; gap: 4px 12px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 11px; }
.file-t { grid-row: span 2; width: 36px; height: 40px; border-radius: 7px; display: grid; place-items: center; font-size: 10px; font-weight: 700; color: #fff; font-family: var(--font-num); }
.file b { font-weight: 600; font-size: 14px; }
.file small { color: var(--muted); font-size: 12px; }
.file .prog { grid-column: 2 / -1; height: 4px; border-radius: 4px; background: var(--line); overflow: hidden; }
.file .prog i { display: block; height: 100%; background: var(--verified); }

.frow { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 11px; }
.frow b { font-weight: 500; font-size: 14px; }
.frow .val { font-weight: 700; font-family: var(--font-num); color: var(--ink-deep); }
.frow p { grid-column: 1 / -1; font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.meter { display: grid; gap: 8px; padding: 14px; border-radius: 12px; background: var(--ground); }
.meter-top { display: flex; align-items: baseline; gap: 10px; font-size: 13px; color: var(--muted); }
.meter-top b { font-size: 26px; color: var(--ink-deep); font-family: var(--font-num); line-height: 1; }
.meter-top .gate { margin-inline-start: auto; }
.meter-bar { height: 8px; border-radius: 8px; background: var(--line); overflow: hidden; }
.meter-bar i { display: block; height: 100%; background: var(--trace); border-radius: 8px; }
.q { display: grid; gap: 8px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 11px; }
.q-top { display: flex; align-items: center; gap: 8px; font-size: 11.5px; color: var(--muted); }
.q-top .imp { margin-inline-start: auto; font-weight: 600; color: var(--missing); }
.q p { font-size: 14px; font-weight: 500; color: var(--text); }
.q-opts { display: flex; gap: 6px; flex-wrap: wrap; }
.q-opts > span { padding: 3px 11px; border-radius: 99px; border: 1px solid var(--line-strong); font-size: 12px; color: var(--muted); }
.q-opts > span.is-picked { background: var(--ink); color: #fff; border-color: var(--ink); }

.conv { display: grid; gap: 12px; padding: 14px; border-radius: 12px; background: var(--ground); }
.conv-row { display: grid; grid-template-columns: 110px 1fr auto; gap: 12px; align-items: center; font-size: 13px; }
.conv-row .track { height: 14px; border-radius: 5px; background: var(--line); overflow: hidden; }
.conv-row .track i { display: block; height: 100%; border-radius: 5px; background: var(--series); }
.conv-row:nth-child(2) .track i { background: var(--trace); }
.conv-row .num { font-weight: 700; color: var(--ink-deep); }
.src { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; font-size: 13px; }
.src .mono { color: var(--trace); font-weight: 600; }
.src small { margin-inline-start: auto; color: var(--muted); font-size: 12px; }

.dlist { display: grid; gap: 6px; }
.drow { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; font-size: 14px; }
.drow .mono { color: var(--muted); font-size: 12px; }
.drow .chip { margin-inline-start: auto; }
.stamp { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; background: var(--ink-soft); color: var(--ink); font-size: 13px; }

.check { display: grid; grid-template-columns: 28px 1fr auto; gap: 2px 12px; align-items: center; padding: 11px 12px; border: 1px solid var(--line); border-radius: 11px; }
.check-i { grid-row: span 2; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--verified-soft); color: var(--verified); }
.check-i .ico { width: 15px; height: 15px; stroke-width: 2.4; }
.check b { font-size: 14px; font-weight: 600; }
.check small { color: var(--muted); font-size: 12px; }
.check .chip { grid-row: span 2; }
/* Timed state changes inside panels (critic objects then passes; meter fills and gate opens):
   the "before" (.g) shows first, the "after" (.m) replaces it at 2.6s. Animations are removed
   when the panel deactivates, so the story replays next time. */
.check .sw-chip { grid-row: span 2; justify-items: end; }
.pn .swap .m { opacity: 0; }
.pn.is-active .swap .g { animation: crit-out 320ms var(--ease-out) 2600ms forwards; }
.pn.is-active .swap .m { animation: crit-in 420ms var(--ease-out) 2600ms forwards; }
.pn .swap .m { transform: translateY(6px); filter: blur(4px); }
.pn.is-active .fill { animation: meter-full 800ms var(--ease-out) 2600ms forwards; }
@keyframes meter-full { from { transform: scaleX(var(--w)); } to { transform: scaleX(1); } }
.gate-sw { justify-self: start; }
.check.crit .check-i { background: var(--inferred-soft); color: var(--inferred); transition: background-color 300ms ease, color 300ms ease; }
.pn.is-active .check.crit .check-i { animation: crit-ok 300ms ease 2600ms forwards; }
@keyframes crit-out { from { opacity: 1; transform: none; filter: none; } to { opacity: 0; transform: translateY(-6px); filter: blur(4px); } }
@keyframes crit-in { from { opacity: 0; transform: translateY(6px); filter: blur(4px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes crit-ok { to { background: var(--verified-soft); color: var(--verified); } }
.log { font-size: 12px; color: var(--muted); padding: 10px 12px; border-radius: 10px; background: var(--ground); line-height: 1.8; }
.log b { color: var(--inferred); font-weight: 500; }
.log i { color: var(--verified); font-style: normal; }

.sign { display: grid; gap: 8px; }
.sign-row { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 11px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--ink-soft); color: var(--ink); font-weight: 700; font-size: 13px; flex: none; }
.sign-row b { display: block; font-size: 14px; font-weight: 600; }
.sign-row small { color: var(--muted); font-size: 12px; }
.sign-row .chip { margin-inline-start: auto; }
.exports { display: flex; gap: 8px; flex-wrap: wrap; }
.exports span { display: inline-flex; align-items: center; gap: 7px; padding: 7px 12px; border-radius: 9px; border: 1px solid var(--line-strong); font-size: 13px; font-weight: 600; color: var(--ink); }
.exports .ico { width: 14px; height: 14px; }

@media (max-width: 999px) {
  .jr { grid-template-columns: 1fr; }
  .jr-stage { display: none; }
  .jr-step, .jr-step:first-child, .jr-step:last-child { min-height: 0; opacity: 1; padding-block: 28px; padding-top: 28px; }
  .jr-slot { display: block; position: relative; }
  .jr-slot .pn { position: relative; inset: auto; min-height: 0; margin-top: 8px; }
}

/* Seven documents board */
.board { background: var(--sheet); border-radius: var(--r-sheet); box-shadow: var(--shadow-sheet); overflow: hidden; }
.b-row {
  display: grid; grid-template-columns: 44px minmax(150px, 0.8fr) minmax(0, 1.6fr) minmax(0, 1.15fr) 74px;
  gap: 20px; align-items: start; padding: 20px 24px; border-top: 1px solid var(--line);
  transition: background-color 200ms ease;
}
.b-row:first-child { border-top: 0; }
.b-head { padding-block: 14px; font-size: 12.5px; font-weight: 600; color: var(--muted); background: var(--ground); }
.b-row .mono { color: var(--trace); font-size: 14px; padding-top: 2px; }
.b-row h3 { font-size: 16.5px; }
.b-row p { font-size: 14.5px; color: var(--muted); }
.b-row .ok { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; color: var(--text); }
.b-row .ok .ico { color: var(--verified); width: 16px; height: 16px; margin-top: 4px; stroke-width: 2.3; }
.fmt { justify-self: end; font-family: var(--font-num); font-size: 11.5px; font-weight: 700; padding: 3px 8px; border-radius: 6px; background: var(--ink-soft); color: var(--ink); }
@media (hover: hover) and (pointer: fine) { .b-row:not(.b-head):hover { background: #fafbfd; } }
@media (max-width: 900px) {
  .b-head { display: none; }
  .b-row { grid-template-columns: 34px 1fr auto; gap: 6px 14px; }
  .b-row p, .b-row .ok { grid-column: 2 / -1; }
  .b-row .fmt { grid-row: 1; grid-column: 3; }
}

/* Valuation strip */
.valn { margin-top: 20px; display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.4fr); gap: 32px; align-items: center; background: var(--sheet); border-radius: var(--r-sheet); box-shadow: var(--shadow-sheet); padding: clamp(22px, 3vw, 34px); }
.valn h3 { font-size: clamp(1.15rem, 1.7vw, 1.35rem); line-height: 1.4; }
.val-copy { display: grid; gap: 12px; }
.val-copy p { color: var(--muted); font-size: 14.5px; }
.vs { position: relative; padding: 70px 0 8px; }
.vs-axis { position: relative; height: 10px; border-radius: 10px; background: var(--ground); border: 1px solid var(--line); }
.vs-range { position: absolute; inset-block: -1px; inset-inline-start: var(--a); width: var(--w); border-radius: 10px; background: var(--trace-soft); border: 1.5px solid var(--trace); transform-origin: var(--origin); transform: scaleX(0); transition: transform 900ms var(--ease-out) 200ms; }
.vs-dot { position: absolute; top: 50%; inset-inline-start: var(--p); width: 12px; height: 12px; margin-inline-start: -6px; margin-top: -6px; border-radius: 50%; background: var(--sheet); border: 2px solid var(--series); opacity: 0; transform: scale(0.6); transition: opacity 300ms ease, transform 400ms var(--ease-out); transition-delay: calc(var(--i) * 90ms + 700ms); }
.vs-dot { z-index: 1; }
.vs-dot > span { background: var(--sheet); padding: 0 5px; border-radius: 4px; }
.vs-dot > span { position: absolute; bottom: 16px; inset-inline-start: 50%; transform: translateX(calc(var(--dir) * -50%)); white-space: nowrap; font-size: 11.5px; color: var(--muted); }
.vs-dot:nth-child(odd) > span { bottom: auto; top: 16px; }
.vs-pt { position: absolute; z-index: 0; top: -62px; bottom: -6px; inset-inline-start: var(--p); width: 2px; margin-inline-start: -1px; background: var(--ink); opacity: 0; transition: opacity 300ms ease 900ms; }
.vs-pt b { position: absolute; top: -6px; inset-inline-start: 8px; white-space: nowrap; font-size: 13px; color: var(--ink-deep); }
.vs-scale { display: flex; justify-content: space-between; margin-top: 30px; font-size: 11.5px; color: var(--muted); }
.vs-x { margin-top: 14px; display: flex; gap: 10px; align-items: center; font-size: 13px; color: var(--muted); flex-wrap: wrap; }
.vs-x s { color: var(--text); }
.in .vs-range { transform: scaleX(1); }
.in .vs-dot { opacity: 1; transform: none; }
.in .vs-pt { opacity: 1; }
@media (max-width: 900px) { .valn { grid-template-columns: 1fr; } }

/* Who it's for */
.offers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.offer { background: var(--sheet); border: 1px solid var(--line); border-radius: var(--r-sheet); padding: 26px; display: grid; gap: 12px; align-content: start; border-top: 3px solid var(--ink); }
.offer small { font-size: 12.5px; font-weight: 600; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.offer h3 { font-size: 20px; }
.offer p { color: var(--muted); font-size: 15px; }
.offer.is-next { border-top-color: var(--trace); }
.tag { display: inline-flex; padding: 1px 9px; border-radius: 99px; font-size: 11.5px; font-weight: 600; background: var(--trace-soft); color: var(--trace); }
.tag-amber { background: var(--inferred-soft); color: var(--inferred); }
@media (max-width: 900px) { .offers { grid-template-columns: 1fr; } }

.funnel { margin-top: 18px; background: var(--sheet); border: 1px solid var(--line); border-radius: var(--r-sheet); padding: clamp(22px, 3vw, 32px); }
.funnel-h { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
.funnel-h h3 { font-size: 17px; }
.f-row { display: grid; grid-template-columns: minmax(150px, 0.9fr) minmax(0, 2.2fr) minmax(0, 1.3fr); gap: 18px; align-items: center; padding-block: 9px; }
.f-row b { font-weight: 600; font-size: 14.5px; }
.f-bar { display: flex; align-items: center; gap: 12px; }
.f-bar i { display: block; height: 22px; width: calc(max(var(--w), 0.018) * 86%); border-radius: 4px; background: #93b4d8; transform-origin: var(--origin); transform: scaleX(0); transition: transform 1000ms var(--ease-out); transition-delay: calc(var(--i) * 110ms + 150ms); }
.f-row:nth-child(n + 4) .f-bar i { background: var(--ink); }
.f-bar .num { font-weight: 600; color: var(--ink-deep); opacity: 0; transition: opacity 300ms ease; transition-delay: calc(var(--i) * 110ms + 700ms); }
.f-row small { color: var(--muted); font-size: 13px; }
.in .f-bar i { transform: scaleX(1); }
.in .f-bar .num { opacity: 1; }
.loop { margin-top: 18px; font-size: 15px; color: var(--ink); font-weight: 500; max-width: 70ch; }
@media (max-width: 760px) {
  .f-row { grid-template-columns: 1fr; gap: 4px; padding-block: 10px; }
}

/* Trust */
.trust { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.trust > div { display: grid; gap: 10px; align-content: start; padding: 24px; border-radius: var(--r-sheet); background: var(--sheet); border: 1px solid var(--line); }
.trust .ic { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; background: var(--ink-soft); color: var(--ink); }
.trust .ic .ico { width: 20px; height: 20px; }
.trust h3 { font-size: 16.5px; }
.trust p { color: var(--muted); font-size: 14.5px; }
@media (max-width: 1000px) { .trust { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .trust { grid-template-columns: 1fr; } }

/* CTA + footer */
.cta { background: var(--ink-deep); color: #c9d6ea; position: relative; overflow: hidden; isolation: isolate; }
.cta::before {
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0.6;
  background-image:
    linear-gradient(to right, rgb(255 255 255 / 0.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgb(255 255 255 / 0.05) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 60% 90% at 50% 100%, #000 20%, transparent 75%);
  mask-image: radial-gradient(ellipse 60% 90% at 50% 100%, #000 20%, transparent 75%);
}
.cta-in { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 32px 64px; align-items: end; padding-block: clamp(72px, 9vw, 112px); }
.cta .h2 { color: #fff; }
.cta p { color: #a9bbd6; font-size: 17px; max-width: 52ch; margin-top: 16px; }
.cta .hero-cta { justify-content: flex-start; }
.cta .btn { --bg: #fff; --fg: var(--ink-deep); }
.cta .btn-ghost { --bg: transparent; --fg: #fff; --bd: rgb(255 255 255 / 0.28); }
@media (hover: hover) and (pointer: fine) {
  .cta .btn:hover { --bg: #e8eef8; box-shadow: none; }
  .cta .btn-ghost:hover { --bg: rgb(255 255 255 / 0.08); }
}
@media (max-width: 860px) { .cta-in { grid-template-columns: 1fr; } }
.foot { background: var(--ink-deep); color: #8fa6c8; border-top: 1px solid rgb(255 255 255 / 0.08); font-size: 13.5px; }
.foot-in { display: flex; align-items: center; gap: 14px 28px; flex-wrap: wrap; padding-block: 26px; }
.foot .brand { color: #fff; font-size: 15px; }
.foot .brand small { color: #8fa6c8; }
.foot a { transition: color 160ms ease; }
@media (hover: hover) and (pointer: fine) { .foot a:hover { color: #fff; } }
.foot-note { flex-basis: 100%; font-size: 12.5px; color: #6f86a8; }
.tfx { height: 22px; width: auto; }

/* Scroll reveal: only once JS has loaded, so the page is complete without it */
.js [data-r] { opacity: 0; transform: translateY(14px); }
.js [data-r].in { opacity: 1; transform: none; transition: opacity 600ms ease, transform 800ms var(--ease-out); transition-delay: calc(var(--d, 0) * 60ms); }
