/* SheetLeap — "Minimal Luxury" design system (site edition, aligned with SheetLeap 1.1)
   Brand: ink #14213b, accent #c2410c (#f26b2a on dark), secondary blue #1d4ed8. No green.
   Themes: light (default), dark; html[data-theme] is set before first paint, "system" follows the OS. */

:root {
  color-scheme: light;
  --bg: #fbfbfc;
  --surface: #ffffff;
  --surface-2: #f6f7f9;
  --surface-3: #f0f2f5;
  --line: #e6e8ed;
  --line-strong: #d6dae2;
  --ink: #14213b;
  --text: #3b4760;
  --muted: #69738b;
  --accent: #c2410c;
  --accent-soft: #fdf0e8;
  --accent-line: #f3cdb6;
  --blue: #1d4ed8;
  --blue-soft: #eef3ff;
  --blue-line: #c9d8fb;
  --violet: #6b21a8; --violet-soft: #f6efff; --violet-line: #e0cdf6;
  --danger: #b91c1c;
  --btn-bg: #14213b; --btn-fg: #ffffff; --btn-hover: #0b1427;
  --header-bg: rgba(251,251,252,.86);
  --deep: #14213b; --deep-2: #1a2949; --deep-3: #101a31; --deep-line: #2a3a5e; --deep-line-2: #34466d;
  --on-deep: #b9c1d2; --on-deep-strong: #ffffff; --on-deep-muted: #7c88a3; --on-deep-accent: #f59e6b; --on-deep-code: #9fb3d9;
  --footer-bg: #0e182c;
  --chart-1: #14213b; --chart-2: #1d4ed8; --chart-3: #c2410c; --chart-4: #a3acbe;
  --grid-line: #eceef2; --grid-head: #f4f5f7;
  --shadow-sm: 0 1px 2px rgba(20,33,59,.05);
  --shadow-md: 0 1px 2px rgba(20,33,59,.04), 0 12px 28px -18px rgba(20,33,59,.28);
  --shadow-lg: 0 1px 2px rgba(20,33,59,.05), 0 32px 64px -28px rgba(20,33,59,.32);
  --r-sm: 6px; --r-md: 8px; --r-lg: 12px;
  --radius: var(--r-sm);
  --ease: cubic-bezier(.2,.7,.2,1);
  --font: "Segoe UI Variable Text", "Segoe UI", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --mono: "Cascadia Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0f1115;
  --surface: #161920;
  --surface-2: #13161c;
  --surface-3: #1c2029;
  --line: #252a34;
  --line-strong: #313744;
  --ink: #f1f3f7;
  --text: #c2c8d3;
  --muted: #8a92a3;
  --accent: #f26b2a;
  --accent-soft: rgba(242,107,42,.13);
  --accent-line: rgba(242,107,42,.38);
  --blue: #7ea3ff;
  --blue-soft: rgba(126,163,255,.12);
  --blue-line: rgba(126,163,255,.34);
  --violet: #c9a4f5; --violet-soft: rgba(201,164,245,.12); --violet-line: rgba(201,164,245,.32);
  --danger: #f87171;
  --btn-bg: #f1f3f7; --btn-fg: #0f1115; --btn-hover: #ffffff;
  --header-bg: rgba(15,17,21,.82);
  --deep: #0b0d11; --deep-2: #14171e; --deep-3: #0f1116; --deep-line: #252a34; --deep-line-2: #313744;
  --on-deep: #b4bac6; --on-deep-strong: #f1f3f7; --on-deep-muted: #7d8596; --on-deep-accent: #f58a52; --on-deep-code: #a9b8d8;
  --footer-bg: #0b0d11;
  --chart-1: #c9d3e6; --chart-2: #7ea3ff; --chart-3: #f26b2a; --chart-4: #5b6475;
  --grid-line: #232831; --grid-head: #1a1e26;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.3);
  --shadow-md: 0 1px 2px rgba(0,0,0,.3), 0 14px 30px -18px rgba(0,0,0,.6);
  --shadow-lg: 0 1px 2px rgba(0,0,0,.35), 0 32px 64px -28px rgba(0,0,0,.7);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: 72px; background: var(--bg); }
body { margin: 0; font: 16px/1.65 var(--font); color: var(--text); background: var(--bg); transition: background-color .3s, color .3s; }
a { color: var(--ink); }
::selection { background: var(--blue-soft); }
h1, h2, h3 { color: var(--ink); line-height: 1.18; margin: 0 0 .6em; font-weight: 600; letter-spacing: -.01em; }
h1 { font-size: clamp(2.2rem, 4.4vw, 3.5rem); letter-spacing: -.03em; font-weight: 600; }
h2 { font-size: clamp(1.55rem, 2.7vw, 2.2rem); letter-spacing: -.022em; }
h3 { font-size: 1.04rem; letter-spacing: -.005em; }
.h-small { font-size: 1.04rem; }
p { margin: 0 0 1em; }
code { font-family: var(--mono); font-size: .9em; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 28px; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; border-radius: 4px; }

/* reveal */
.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }

/* header */
.site-header { position: sticky; top: 0; z-index: 20; background: var(--header-bg); backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; gap: 28px; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 600; font-size: 1.08rem; color: var(--ink); }
.brand img { display: block; height: 26px; width: auto; }
.logo-dark { display: none !important; }
[data-theme="dark"] .logo-light { display: none !important; }
[data-theme="dark"] .logo-dark { display: block !important; }
.nav { display: flex; gap: 26px; margin-left: auto; }
.nav a { text-decoration: none; color: var(--muted); font-size: .9rem; position: relative; transition: color .2s; }
.nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 1px; background: var(--accent); transform: scaleX(0); transition: transform .25s var(--ease); }
.nav a:hover, .nav a.cur { color: var(--ink); }
.nav a:hover::after, .nav a.cur::after { transform: scaleX(1); }
.progress { position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; }
.progress span { display: block; height: 100%; width: 100%; background: var(--accent); transform-origin: 0 50%; transform: scaleX(0); }

/* theme switch */
.theme { display: inline-flex; padding: 2px; border: 1px solid var(--line); border-radius: 99px; background: var(--surface); }
.theme button { all: unset; cursor: pointer; width: 26px; height: 24px; display: grid; place-items: center; border-radius: 99px; color: var(--muted); transition: color .2s, background .2s; }
.theme button:hover { color: var(--ink); }
.theme button[aria-pressed="true"] { background: var(--surface-3); color: var(--ink); }
.theme button:focus-visible { outline: 2px solid var(--blue); }
.theme svg { width: 14px; height: 14px; }

/* buttons */
.btn { display: inline-block; background: var(--btn-bg); color: var(--btn-fg); text-decoration: none; padding: 11px 20px; border-radius: var(--r-sm); font-weight: 500; font-size: .94rem; border: 1px solid var(--btn-bg); transition: background .2s, transform .2s var(--ease), box-shadow .2s; cursor: pointer; font-family: inherit; }
.btn:hover { background: var(--btn-hover); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-small { padding: 7px 14px; font-size: .86rem; }
.btn-light { background: #fff; color: #14213b; border-color: #fff; }
.btn-light:hover { background: #eef0f4; }
.link-arrow { color: var(--ink); text-decoration: none; font-weight: 500; font-size: .94rem; }
.link-arrow::after { content: " →"; display: inline-block; transition: transform .2s; }
.link-arrow:hover::after { transform: translateX(3px); }
kbd { font: 500 .72em var(--mono); padding: 1px 6px; border: 1px solid var(--line-strong); border-bottom-width: 2px; border-radius: 5px; color: var(--muted); background: var(--surface); }

/* hero */
.hero { position: relative; padding: 96px 0 104px; border-bottom: 1px solid var(--line); overflow: hidden; }
.hero-bg { position: absolute; inset: 0; background: radial-gradient(60% 55% at 78% 40%, var(--blue-soft), transparent 70%), radial-gradient(40% 40% at 10% 0%, var(--accent-soft), transparent 70%); opacity: .7; }
.hero-grid { position: relative; display: grid; grid-template-columns: .92fr 1.32fr; gap: 56px; align-items: center; }
.hero-copy .reveal:nth-child(2) { transition-delay: .08s; } .hero-copy .reveal:nth-child(3) { transition-delay: .16s; }
.hero-copy .reveal:nth-child(4) { transition-delay: .24s; } .hero-copy .reveal:nth-child(5) { transition-delay: .32s; }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .72rem; font-weight: 600; color: var(--accent); margin-bottom: 16px; }
.lede { font-size: 1.1rem; max-width: 33em; }
.hero-actions { display: flex; align-items: center; gap: 22px; margin: 30px 0 28px; }
.note { font-size: .85rem; color: var(--muted); border-left: 1px solid var(--line-strong); padding-left: 14px; max-width: 32em; }
.ver { display: inline-flex; align-items: center; gap: 8px; font-size: .78rem; color: var(--muted); border: 1px solid var(--line); background: var(--surface); border-radius: 99px; padding: 4px 12px 4px 6px; margin-bottom: 22px; text-decoration: none; }
.ver b { font-weight: 600; color: var(--accent); background: var(--accent-soft); border-radius: 99px; padding: 1px 8px; }

/* hero mock: SheetLeap 1.1 application shell (no ribbon) */
.mock { margin: 0; border: 1px solid var(--line-strong); border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow-lg); overflow: hidden; font-size: 12.5px; transition-delay: .2s; color: var(--text); }
.app-top { display: flex; align-items: center; gap: 12px; padding: 8px 12px; border-bottom: 1px solid var(--line); background: var(--surface); }
.app-top .mk { width: 18px; height: 18px; flex: none; }
.mock-title { color: var(--ink); font-weight: 500; white-space: nowrap; font-size: 12.5px; }
.mock-title small { color: var(--muted); font-weight: 400; margin-left: 6px; }
.app-search { margin-left: auto; display: flex; align-items: center; gap: 8px; min-width: 0; width: 44%; padding: 5px 8px 5px 10px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface-2); color: var(--muted); font-size: 11.5px; white-space: nowrap; overflow: hidden; }
.app-search svg { width: 12px; height: 12px; flex: none; }
.app-search kbd { margin-left: auto; font-size: 10px; }
.app-avatar { width: 22px; height: 22px; border-radius: 50%; background: var(--surface-3); color: var(--ink); display: grid; place-items: center; font-size: 10px; font-weight: 600; flex: none; }
.app-main { display: grid; grid-template-columns: 44px minmax(0, 1fr) 168px; }
.app-rail { border-right: 1px solid var(--line); background: var(--surface-2); display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 0; }
.app-rail i { width: 30px; height: 30px; display: grid; place-items: center; border-radius: var(--r-sm); color: var(--muted); position: relative; }
.app-rail i svg { width: 16px; height: 16px; }
.app-rail i.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); border: 1px solid var(--line); }
.app-rail i.on::before { content: ""; position: absolute; left: -7px; top: 8px; bottom: 8px; width: 2px; border-radius: 2px; background: var(--accent); }
.app-rail .sp { flex: 1; }
.app-work { position: relative; min-width: 0; display: flex; flex-direction: column; }
.app-tools { display: flex; align-items: center; gap: 2px; padding: 5px 8px; border-bottom: 1px solid var(--line); color: var(--muted); }
.app-tools span { width: 24px; height: 22px; display: grid; place-items: center; border-radius: 5px; }
.app-tools span svg { width: 13px; height: 13px; }
.app-tools span.on { background: var(--surface-3); color: var(--ink); }
.app-tools .sep { width: 1px; height: 14px; background: var(--line); margin: 0 5px; border-radius: 0; }
.app-tools em { margin-left: auto; font-style: normal; font-size: 10.5px; color: var(--muted); padding-right: 2px; }
.mock-formula { display: flex; align-items: center; border-bottom: 1px solid var(--line); background: var(--surface); height: 30px; }
.mock-formula .ref { width: 50px; padding: 6px 10px; border-right: 1px solid var(--line); font-weight: 600; color: var(--ink); }
.mock-formula .fx { padding: 6px 9px; color: var(--muted); font-style: italic; border-right: 1px solid var(--line); }
.mock-formula code { padding: 6px 0 6px 10px; color: var(--ink); white-space: nowrap; overflow: hidden; font-size: 11.5px; }
.caret { width: 1px; height: 14px; background: var(--ink); margin-left: 1px; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.mock-body { position: relative; }
.mock-grid { width: 100%; border-collapse: collapse; table-layout: fixed; font-variant-numeric: tabular-nums; }
.mock-grid th, .mock-grid td { border: 1px solid var(--grid-line); padding: 4px 7px; height: 27px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mock-grid thead th, .mock-grid tbody th { background: var(--grid-head); color: var(--muted); font-weight: 500; font-size: 11px; text-align: center; }
.mock-grid thead th:first-child, .mock-grid tbody th { width: 30px; }
.mock-grid tr > :first-child { border-left: 0; }
.mock-grid tr > :last-child { border-right: 0; }
.mock-grid td { color: var(--ink); transition: background .6s; }
.mock-grid .n { text-align: right; }
.mock-grid .b { font-weight: 600; }
.mock-grid .h { font-weight: 600; font-size: 13px; }
.mock-grid .tot td { border-top: 1px solid var(--line-strong); }
.mock-grid td.flash { background: var(--accent-soft); transition: none; }
.mock-grid td.dep { background: var(--blue-soft); }
.sel-box { position: absolute; border: 2px solid var(--blue); pointer-events: none; transition: all .35s var(--ease); opacity: 0; border-radius: 2px; }
.sel-box::after { content: ""; position: absolute; right: -4px; bottom: -4px; width: 6px; height: 6px; background: var(--blue); border: 1px solid var(--surface); }
.mock-sheets { display: flex; align-items: center; gap: 2px; padding: 0 8px; background: var(--surface-2); border-top: 1px solid var(--line); font-size: 11px; margin-top: auto; }
.mock-sheets b, .mock-sheets i, .mock-sheets span { padding: 6px 12px; font-style: normal; color: var(--muted); }
.mock-sheets b { background: var(--surface); color: var(--ink); font-weight: 500; box-shadow: inset 0 2px 0 var(--accent); }
.mock-sheets small { margin-left: auto; font-size: 10.5px; color: var(--muted); padding-right: 4px; display: inline-flex; align-items: center; gap: 6px; }
.mock-sheets small::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--line-strong); }
.mock-sheets small.busy { color: var(--accent); }
.mock-sheets small.busy::before { background: var(--accent); }
.app-panel { border-left: 1px solid var(--line); background: var(--surface); padding: 12px 12px 10px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.app-panel h4 { margin: 0; font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.app-panel dl { margin: 0; display: grid; gap: 6px; }
.app-panel dl div { display: flex; justify-content: space-between; gap: 8px; font-size: 11px; }
.app-panel dt { color: var(--muted); }
.app-panel dd { margin: 0; color: var(--ink); font-weight: 500; font-variant-numeric: tabular-nums; white-space: nowrap; }
.app-panel .rule { height: 1px; background: var(--line); }
.mock-chart { padding: 0; }
.mc-head { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin-bottom: 8px; }
.mc-bars { display: flex; align-items: flex-end; gap: 8px; height: 70px; }
.mc-bars span { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; }
.mc-bars i { width: 100%; max-width: 26px; background: var(--chart-1); border-radius: 3px 3px 0 0; height: 0; transition: height .8s var(--ease); }
.mc-bars span:nth-child(2) i { background: var(--accent); }
.mc-bars em { font-style: normal; font-size: 9.5px; color: var(--muted); margin-top: 4px; }
.app-hint { margin-top: auto; font-size: 10.5px; color: var(--muted); line-height: 1.45; }
.app-hint kbd { font-size: 9.5px; }
.app-status { display: flex; gap: 14px; justify-content: flex-end; padding: 4px 12px; border-top: 1px solid var(--line); background: var(--surface-2); color: var(--muted); font-size: 10.5px; font-variant-numeric: tabular-nums; }
.app-status b { font-weight: 500; color: var(--ink); }
/* Command Center overlay */
.cmdk { position: absolute; left: 50%; top: 34px; width: min(330px, 88%); transform: translate(-50%, -6px) scale(.98); opacity: 0; pointer-events: none; transition: opacity .25s var(--ease), transform .25s var(--ease); background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--r-md); box-shadow: var(--shadow-lg); overflow: hidden; z-index: 3; }
.cmdk.on { opacity: 1; transform: translate(-50%, 0) scale(1); }
.cmdk-in { display: flex; align-items: center; gap: 8px; padding: 9px 12px; border-bottom: 1px solid var(--line); color: var(--ink); font-size: 12px; }
.cmdk-in svg { width: 13px; height: 13px; color: var(--muted); }
.cmdk-in span:empty::before { content: "Type a command"; color: var(--muted); }
.cmdk ul { list-style: none; margin: 0; padding: 4px; }
.cmdk li { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 5px; font-size: 11.5px; color: var(--text); }
.cmdk li small { margin-left: auto; color: var(--muted); font-size: 10px; }
.cmdk li.on { background: var(--blue-soft); color: var(--ink); }
.cmdk li i { width: 6px; height: 6px; border-radius: 2px; background: var(--line-strong); }
.cmdk li.on i { background: var(--blue); }
.cmdk-k { padding: 6px 12px; border-top: 1px solid var(--line); font-size: 10px; color: var(--muted); }
.mock figcaption { font-size: 10.5px; color: var(--muted); padding: 6px 12px; border-top: 1px solid var(--line); text-align: right; background: var(--surface); }

/* facts */
.facts { border-bottom: 1px solid var(--line); padding: 48px 0 26px; }
.facts-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; }
.fact { border-left: 1px solid var(--line-strong); padding-left: 18px; }
.fact strong { display: block; font-size: clamp(1.6rem, 3vw, 2.2rem); color: var(--ink); font-weight: 600; letter-spacing: -.025em; font-variant-numeric: tabular-nums; }
.fact span { font-size: .88rem; color: var(--muted); }
.facts-grid .fact:nth-child(2) { transition-delay: .08s; } .facts-grid .fact:nth-child(3) { transition-delay: .16s; } .facts-grid .fact:nth-child(4) { transition-delay: .24s; }
.facts-note { font-size: .75rem; color: var(--muted); margin-top: 20px; }

/* principles */
.principles { padding: 72px 0; border-bottom: 1px solid var(--line); }
.cols-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 44px; }
.cols-3 > :nth-child(2) { transition-delay: .1s; } .cols-3 > :nth-child(3) { transition-delay: .2s; }
.principles p { font-size: .95rem; margin: 0; }
.ico { width: 38px; height: 38px; color: var(--ink); margin-bottom: 16px; }

/* sections */
.section { padding: 112px 0; }
.section-alt { background: var(--surface-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { max-width: 700px; margin-bottom: 52px; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 72px; align-items: start; }
.split-mid { align-items: center; }
.split-top { margin-top: 72px; }

/* 1.1 experience */
.x-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.x-item { background: var(--surface); padding: 28px 28px 30px; transition: background .25s; }
.x-item:hover { background: var(--surface-2); }
.x-item svg { width: 26px; height: 26px; color: var(--ink); margin-bottom: 18px; }
.x-item h3 { margin-bottom: 6px; }
.x-item p { margin: 0; font-size: .93rem; }
.x-grid .x-item:nth-child(3n+2) { transition-delay: .06s; } .x-grid .x-item:nth-child(3n) { transition-delay: .12s; }
.x-note { font-size: .82rem; color: var(--muted); margin: 22px 0 0; max-width: 60em; }

/* dark demo */
.section-dark { background: var(--deep); color: var(--on-deep); }
.section-dark h2 { color: var(--on-deep-strong); }
.section-dark .eyebrow { color: var(--on-deep-accent); }
.demo { display: grid; grid-template-columns: 300px 1fr; gap: 32px; background: var(--deep-2); border: 1px solid var(--deep-line); border-radius: var(--r-lg); padding: 30px; }
.demo-inputs label { display: block; margin-bottom: 14px; }
.demo-inputs label span { display: block; font-size: .85rem; margin-bottom: 5px; }
.demo-inputs b { color: var(--on-deep-strong); font-family: var(--mono); font-weight: 600; margin-right: 6px; }
.demo-inputs input { width: 100%; font: 500 1rem var(--mono); color: var(--on-deep-strong); background: var(--deep-3); border: 1px solid var(--deep-line-2); border-radius: var(--r-sm); padding: 9px 12px; transition: border-color .2s, box-shadow .2s; }
.demo-inputs input:focus { outline: none; border-color: var(--on-deep-accent); box-shadow: 0 0 0 3px rgba(245,158,107,.2); }
.demo-formulas { margin-top: 20px; border-top: 1px solid var(--deep-line); padding-top: 14px; font-size: .85rem; }
.demo-formulas div { display: flex; gap: 10px; padding: 3px 0; }
.demo-formulas code { color: var(--on-deep-code); }
.demo-graph svg { width: 100%; height: auto; display: block; }
.demo-log { font: .85rem var(--mono); color: var(--on-deep-code); margin: 12px 0 0; min-height: 1.5em; }
.demo-log b { color: var(--on-deep-accent); font-weight: 600; }
.demo-note { font-size: .78rem; color: var(--on-deep-muted); margin: 14px 0 0; }
.g-edge { fill: none; stroke: var(--deep-line-2); stroke-width: 1.6; }
.g-edge.hot { stroke: var(--on-deep-accent); stroke-width: 2.2; stroke-dasharray: 6 6; animation: flow .6s linear infinite; }
@keyframes flow { to { stroke-dashoffset: -12; } }
.g-node rect { fill: var(--deep-3); stroke: var(--deep-line-2); stroke-width: 1.4; transition: fill .3s, stroke .3s; }
.g-node.input rect { stroke: #5b6f99; }
.g-node .nm { fill: var(--on-deep-muted); font: 600 11px var(--mono); }
.g-node .vl { fill: var(--on-deep-strong); font: 600 15px var(--mono); }
.g-node .tt { fill: var(--on-deep-muted); font: 11px var(--font); }
.g-node.src rect { fill: #3b2414; stroke: var(--on-deep-accent); }
.g-node.hit rect { fill: #2a1d16; stroke: var(--on-deep-accent); animation: pop .5s var(--ease); }
@keyframes pop { 40% { transform: scale(1.06); } }
.g-node { transform-box: fill-box; transform-origin: center; }

/* pipeline */
.pipe { border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; background: var(--surface); box-shadow: var(--shadow-md); }
.pipe-steps { display: grid; grid-template-columns: repeat(3, 1fr); border-bottom: 1px solid var(--line); }
.pipe-steps button { all: unset; cursor: pointer; display: flex; align-items: center; gap: 10px; padding: 16px 22px; font-weight: 500; color: var(--muted); position: relative; transition: color .2s, background .2s; }
.pipe-steps button + button { border-left: 1px solid var(--line); }
.pipe-steps button span { width: 24px; height: 24px; border-radius: 50%; border: 1px solid currentColor; display: grid; place-items: center; font-size: .8rem; }
.pipe-steps button::after { content: ""; position: absolute; left: 0; bottom: -1px; height: 2px; width: 100%; background: var(--accent); transform: scaleX(0); transform-origin: 0 50%; }
.pipe-steps button.on { color: var(--ink); background: var(--surface-2); }
.pipe-steps button.on::after { animation: stepbar var(--dur, 4.5s) linear forwards; }
.pipe.paused .pipe-steps button.on::after { animation: none; transform: scaleX(1); }
@keyframes stepbar { to { transform: scaleX(1); } }
.pipe-steps button:focus-visible { outline: 2px solid var(--blue); outline-offset: -2px; }
.pipe-src { padding: 18px 24px; border-bottom: 1px dashed var(--line); font-size: 1.05rem; color: var(--ink); overflow-x: auto; white-space: nowrap; }
.pipe-stage { display: grid; }
.pane { grid-area: 1 / 1; padding: 28px 24px; opacity: 0; visibility: hidden; transition: opacity .35s; min-width: 0; }
.pane.on { opacity: 1; visibility: visible; }
.tokens { display: flex; flex-wrap: wrap; gap: 8px; }
.tok { font: 500 .95rem var(--mono); padding: 7px 11px; border-radius: var(--r-sm); border: 1px solid; opacity: 0; transform: translateY(8px); transition: opacity .3s, transform .3s var(--ease); position: relative; }
.tok small { position: absolute; left: 0; top: 100%; margin-top: 3px; font: 10px var(--font); color: var(--muted); white-space: nowrap; }
.pane.on .tok { opacity: 1; transform: none; }
.tk-fn { color: var(--ink); background: var(--surface-3); border-color: var(--line-strong); }
.tk-ref { color: var(--blue); background: var(--blue-soft); border-color: var(--blue-line); }
.tk-num { color: var(--ink); background: var(--surface); border-color: var(--ink); }
.tk-str { color: var(--accent); background: var(--accent-soft); border-color: var(--accent-line); }
.tk-op { color: var(--violet); background: var(--violet-soft); border-color: var(--violet-line); }
.tk-p { color: var(--muted); background: var(--surface-2); border-color: var(--line); }
.legend { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 44px; }
.legend span { font-size: .75rem; padding: 3px 8px; border-radius: 4px; border: 1px solid; }
.ast, .ast ul { list-style: none; margin: 0; padding: 0; }
.ast ul { padding-left: 28px; }
.ast li { position: relative; padding: 6px 0 6px 18px; }
.ast ul li::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; border-left: 1px solid var(--line-strong); }
.ast ul li:last-child::before { bottom: auto; height: 22px; }
.ast ul li::after { content: ""; position: absolute; left: 0; top: 22px; width: 14px; border-top: 1px solid var(--line-strong); }
.ast > li { padding-left: 0; }
.nd { display: inline-block; font: 600 .9rem var(--mono); padding: 5px 10px; border-radius: var(--r-sm); border: 1px solid; opacity: 0; transform: translateX(-8px); transition: opacity .35s, transform .35s var(--ease); }
.pane.on .nd { opacity: 1; transform: none; }
.evalsteps { list-style: none; margin: 0; padding: 0; counter-reset: s; }
.evalsteps li { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); opacity: 0; transform: translateY(6px); transition: opacity .35s, transform .35s var(--ease); }
.pane.on .evalsteps li { opacity: 1; transform: none; }
.evalsteps li::before { counter-increment: s; content: counter(s); font: 600 .75rem var(--mono); color: var(--muted); width: 18px; }
.evalsteps span { color: var(--accent); }
.evalsteps code { color: var(--ink); }
.evalsteps .res { background: var(--accent-soft); color: var(--accent); padding: 3px 8px; border-radius: 4px; font-weight: 600; }

.checks { list-style: none; padding: 0; margin: 0; }
.checks li { position: relative; padding: 12px 0 12px 28px; border-top: 1px solid var(--line); font-size: .95rem; }
.checks li::before { content: ""; position: absolute; left: 2px; top: 20px; width: 10px; height: 6px; border-left: 1.5px solid var(--accent); border-bottom: 1.5px solid var(--accent); transform: rotate(-45deg); }
.fn-table { border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); overflow: hidden; }
.fn-table [role="row"] { display: grid; grid-template-columns: 104px 1fr; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); transition: background .2s; }
.fn-table [role="row"]:hover { background: var(--surface-2); }
.fn-table [role="rowheader"] { font-size: .85rem; font-weight: 600; color: var(--ink); }
.fn-table code { font-size: .8rem; color: var(--text); line-height: 1.7; }
.fn-note { font-size: .8rem; color: var(--muted); padding: 10px 16px; margin: 0; }

/* virtual grid */
.meters { margin: 28px 0 0; display: grid; gap: 0; }
.meters div { display: flex; justify-content: space-between; padding: 11px 0; border-top: 1px solid var(--line); }
.meters dt { color: var(--muted); font-size: .92rem; }
.meters dd { margin: 0; font: 600 .95rem var(--mono); color: var(--ink); font-variant-numeric: tabular-nums; }
.vr { display: flex; gap: 10px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--r-md); padding: 10px; box-shadow: var(--shadow-md); }
.vr-sheet { flex: 1; font: 12.5px var(--mono); font-variant-numeric: tabular-nums; }
.vr-row { display: grid; grid-template-columns: 76px repeat(4, 1fr); border-bottom: 1px solid var(--grid-line); height: 30px; align-items: center; }
.vr-row > * { padding: 0 8px; overflow: hidden; white-space: nowrap; }
.vr-row .rn { color: var(--muted); background: var(--grid-head); height: 100%; display: flex; align-items: center; justify-content: flex-end; font-size: 11.5px; }
.vr-row .v { text-align: right; color: var(--ink); }
.vr-row .v.e { color: transparent; }
.vr-row.hd { font: 500 11px var(--font); color: var(--muted); background: var(--grid-head); }
.vr-row.hd > * { text-align: center; }
.vr-track { width: 8px; background: var(--surface-3); border-radius: 4px; position: relative; }
.vr-track span { position: absolute; left: 0; right: 0; height: 18px; background: var(--ink); border-radius: 4px; top: 0; }

/* layers */
.layers { display: grid; gap: 8px; }
.layer { display: grid; grid-template-columns: 200px 1fr; gap: 24px; align-items: center; padding: 18px 22px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); position: relative; overflow: hidden; transition: border-color .25s, transform .25s var(--ease), box-shadow .25s; }
.layer::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 2px; background: var(--ink); transform: scaleY(0); transition: transform .3s var(--ease); }
.layer:hover { border-color: var(--line-strong); transform: translateX(4px); box-shadow: var(--shadow-md); }
.layer:hover::before { transform: scaleY(1); }
.layer:nth-child(2)::before, .layer:nth-child(3)::before { background: var(--accent); }
.layer h3 { margin: 0; }
.layer p { margin: 0; font-size: .93rem; }
.layers .layer:nth-child(2) { transition-delay: .05s; } .layers .layer:nth-child(3) { transition-delay: .1s; } .layers .layer:nth-child(4) { transition-delay: .15s; }
.layers .layer:nth-child(5) { transition-delay: .2s; } .layers .layer:nth-child(6) { transition-delay: .25s; } .layers .layer:nth-child(7) { transition-delay: .3s; }
.layers .layer.in { transition-delay: 0s; }

/* format + save */
.tree { margin: 0; background: var(--deep); color: #dfe4ee; border-radius: var(--r-lg); padding: 28px 30px; font: 14px/1.85 var(--mono); overflow-x: auto; border: 1px solid var(--deep-line); }
.t-root { color: #fff; font-weight: 600; }
.t-c { color: #8a95ab; }
.save { margin-top: 72px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 30px 32px 32px; }
.save h3 { margin-bottom: 24px; }
.save-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; position: relative; }
.save-steps li { position: relative; padding-top: 30px; }
.save-steps b { display: block; color: var(--ink); margin-bottom: 4px; }
.save-steps small { font-size: .86rem; line-height: 1.5; display: block; }
.dot { position: absolute; top: 0; left: 0; width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid var(--line-strong); background: var(--surface); transition: all .3s; z-index: 1; }
.save-steps li.done .dot { background: var(--ink); border-color: var(--ink); }
.save-steps li.now .dot { border-color: var(--accent); box-shadow: 0 0 0 5px var(--accent-soft); }
.save-steps li.done:last-child .dot { background: var(--accent); border-color: var(--accent); }
.save-steps::before, .save-steps::after { content: ""; position: absolute; left: 0; top: 8px; height: 2px; }
.save-steps::before { right: 0; background: var(--line); }
.save-steps::after { width: var(--sp, 0%); background: var(--ink); transition: width .6s var(--ease); }

/* charts */
.charts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.chart { margin: 0; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px 20px 14px; background: var(--surface); }
.chart svg { width: 100%; height: auto; display: block; }
.chart figcaption { font-size: .85rem; color: var(--muted); margin-top: 6px; }
.charts .chart:nth-child(2) { transition-delay: .1s; } .charts .chart:nth-child(3) { transition-delay: .2s; }
.axis line { stroke: var(--grid-line); stroke-width: 1; }
.lbl text, .lgd text { font: 11px var(--font); fill: var(--muted); text-anchor: middle; }
.lgd text { text-anchor: start; fill: var(--text); }
.cols rect { fill: var(--chart-1); transform-box: fill-box; transform-origin: 50% 100%; transform: scaleY(0); transition: transform .8s var(--ease); transition-delay: calc(var(--d) * 70ms + .2s); }
.cols rect.c2 { fill: var(--chart-3); }
.chart.in .cols rect { transform: scaleY(1); }
.line { fill: none; stroke: var(--chart-1); stroke-width: 2.2; stroke-linejoin: round; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 1.6s var(--ease) .2s; }
.line.l2 { stroke: var(--chart-2); stroke-width: 1.8; transition-delay: .5s; }
.chart.in .line { stroke-dashoffset: 0; }
.area { fill: var(--chart-1); fill-opacity: .07; opacity: 0; transition: opacity 1s .9s; }
.chart.in .area { opacity: 1; }
.ring { fill: none; stroke: var(--surface-3); stroke-width: 22; }
.seg { fill: none; stroke: var(--c); stroke-width: 22; stroke-dasharray: 0 100; stroke-dashoffset: var(--off); transition: stroke-dasharray 1s var(--ease) .3s; }
.chart.in .seg { stroke-dasharray: var(--len) calc(100 - var(--len)); }
.chips { list-style: none; padding: 0; margin: 28px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { font-size: .84rem; padding: 5px 12px; border: 1px solid var(--line); border-radius: 99px; color: var(--text); background: var(--surface); }
.cards { gap: 24px; }
.cards-top { margin-top: 64px; }
.card { border: 1px solid var(--line); border-radius: var(--r-lg); padding: 28px; background: var(--surface); transition: border-color .25s, box-shadow .25s; }
.card:hover { border-color: var(--line-strong); box-shadow: var(--shadow-md); }
.card p { font-size: .95rem; margin: 0; }

/* roadmap: two tracks (1.0 and 1.1) */
.rm-tracks { display: grid; gap: 64px; }
.rm-track > header { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.rm-track > header h3 { font-size: 1.25rem; margin: 0; letter-spacing: -.015em; }
.rm-track > header p { margin: 0; color: var(--muted); font-size: .9rem; }
.rm-badge { font-size: .72rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; padding: 3px 9px; border-radius: 99px; margin-left: 10px; vertical-align: 3px; border: 1px solid var(--line-strong); color: var(--muted); }
.rm-badge.on { color: var(--accent); border-color: var(--accent-line); background: var(--accent-soft); }
.rm-badge.done { color: var(--blue); border-color: var(--blue-line); background: var(--blue-soft); }
.rm-bar { position: relative; height: 4px; background: var(--line); border-radius: 2px; margin-bottom: 30px; }
.rm-bar span { position: absolute; left: 0; top: 0; bottom: 0; width: calc(var(--p) / var(--n, 8) * 100%); background: var(--accent); border-radius: 2px; transform-origin: 0 50%; transform: scaleX(0); transition: transform 1.2s var(--ease) .3s; }
.rm-bar.done span { background: var(--ink); }
.rm-bar.in span { transform: scaleX(1); }
.rm-bar i { position: absolute; right: 0; top: 10px; font: normal .76rem var(--font); color: var(--muted); }
.roadmap { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line-strong); background: var(--surface); border-radius: 0 0 var(--r-md) var(--r-md); }
.roadmap li { display: grid; grid-template-columns: 64px 1fr auto; gap: 16px; align-items: baseline; padding: 18px 20px 18px 0; border-bottom: 1px solid var(--line); }
.roadmap li > :first-child { padding-left: 20px; }
.roadmap h3 { margin: 0 0 2px; font-size: 1rem; }
.roadmap p { margin: 0; font-size: .92rem; }
.stage { font: 600 .85rem var(--mono); color: var(--muted); }
.status { font-size: .8rem; color: var(--muted); text-align: right; display: flex; align-items: center; justify-content: flex-end; gap: 8px; white-space: nowrap; }
.roadmap .is-active .stage, .roadmap .is-active .status { color: var(--accent); font-weight: 600; }
.roadmap .is-active { background: linear-gradient(90deg, var(--accent-soft), transparent 60%); }
.roadmap .is-done .stage { color: var(--ink); }
.roadmap .is-done .status { color: var(--blue); }
.roadmap.compact li { padding-top: 13px; padding-bottom: 13px; }
.roadmap.compact p { font-size: .86rem; }
.tick { width: 11px; height: 6px; border-left: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(-45deg) translateY(-2px); display: inline-block; }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); position: relative; }
.pulse::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--accent); animation: ping 1.8s var(--ease) infinite; }
@keyframes ping { 80%, 100% { transform: scale(2.8); opacity: 0; } }
.rm-auto { font-size: .8rem; color: var(--muted); margin: 26px 0 0; }

/* faq */
.faq-wrap { display: grid; grid-template-columns: 1fr 2fr; gap: 72px; }
.faq details { border-top: 1px solid var(--line); }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; padding: 19px 36px 19px 0; font-weight: 500; color: var(--ink); position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; position: absolute; right: 8px; top: 50%; width: 8px; height: 8px; border-right: 1.5px solid var(--ink); border-bottom: 1.5px solid var(--ink); transform: translateY(-70%) rotate(45deg); transition: transform .25s; }
.faq details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.faq details p { margin: 0 0 20px; max-width: 46em; }

/* suggestions */
.suggest { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 30px; box-shadow: var(--shadow-md); }
.suggest label { display: block; margin-bottom: 16px; }
.suggest label > span { display: block; font-size: .85rem; font-weight: 500; color: var(--ink); margin-bottom: 6px; }
.suggest label em { font-style: normal; font-weight: 400; color: var(--muted); margin-left: 4px; }
.suggest input, .suggest select, .suggest textarea { width: 100%; font: inherit; font-size: .95rem; color: var(--ink); background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--r-sm); padding: 10px 12px; transition: border-color .2s, box-shadow .2s; }
.suggest textarea { resize: vertical; min-height: 130px; }
.suggest input:focus, .suggest select:focus, .suggest textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-soft); }
.suggest .sg-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.suggest .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.sg-foot { display: flex; gap: 20px; align-items: center; justify-content: space-between; }
.sg-foot .btn { white-space: nowrap; }
.sg-legal { font-size: .8rem; color: var(--muted); margin: 0; max-width: 30em; }
.sg-status { margin: 14px 0 0; font-size: .9rem; min-height: 1.4em; }
.sg-status.ok { color: var(--blue); } .sg-status.err { color: var(--danger); }
.suggest button[disabled] { opacity: .6; cursor: default; }

/* cta + footer */
.cta { background: var(--deep); padding: 88px 0; position: relative; overflow: hidden; }
.cta::before { content: ""; position: absolute; inset: 0; background: radial-gradient(50% 80% at 90% 0%, rgba(242,107,42,.16), transparent 70%); }
.cta-inner { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 32px; }
.cta h2 { color: var(--on-deep-strong); margin: 0; max-width: 18em; }
.site-footer { background: var(--footer-bg); color: #aab3c5; font-size: .9rem; border-top: 1px solid rgba(255,255,255,.08); padding: 48px 0 30px; }
.site-footer p { margin: 0; }
.site-footer a { color: #fff; }
.brand-footer { color: #fff; }
.brand-footer img { height: 24px; }
.footer-top { display: flex; justify-content: space-between; align-items: center; gap: 32px; padding-bottom: 28px; border-bottom: 1px solid rgba(255,255,255,.1); }
.footer-nav { display: flex; flex-wrap: wrap; gap: 8px 28px; }
.site-footer .footer-nav a { color: #c3cad8; text-decoration: none; font-size: .9rem; }
.site-footer .footer-nav a:hover { color: #fff; }
.footer-bottom { display: flex; justify-content: space-between; align-items: baseline; gap: 24px; padding-top: 20px; font-size: .85rem; }
.fine { font-size: .85rem; text-align: right; color: #c3cad8; }
.notfound { min-height: 60vh; display: flex; flex-direction: column; justify-content: center; padding: 80px 0; }

/* responsive */
@media (max-width: 1100px) { .nav { gap: 18px; } .nav a { font-size: .86rem; } .app-main { grid-template-columns: 44px minmax(0, 1fr); } .app-panel { display: none; } }
@media (max-width: 960px) {
  .hero-grid, .split, .faq-wrap { grid-template-columns: 1fr; gap: 48px; }
  .cols-3, .charts { grid-template-columns: 1fr; gap: 24px; }
  .x-grid { grid-template-columns: 1fr 1fr; }
  .facts-grid { grid-template-columns: repeat(2, 1fr); }
  .nav { display: none; }
  .theme { margin-left: auto; }
  .demo { grid-template-columns: 1fr; }
  .layer { grid-template-columns: 1fr; gap: 4px; }
  .save-steps { grid-template-columns: 1fr 1fr; }
  .save-steps::before, .save-steps::after { display: none; }
  .cta-inner { flex-direction: column; align-items: flex-start; }
  .app-main { grid-template-columns: 44px minmax(0, 1fr) 168px; }
  .app-panel { display: flex; }
}
@media (max-width: 760px) {
  .footer-top, .footer-bottom { flex-direction: column; align-items: flex-start; }
  .fine { text-align: left; }
  .app-main { grid-template-columns: 40px minmax(0, 1fr); }
  .app-panel { display: none; }
}
@media (max-width: 560px) {
  .wrap { padding: 0 20px; }
  .hero { padding: 56px 0 64px; }
  .section { padding: 76px 0; }
  .header-inner .btn-small { display: none; }
  .x-grid { grid-template-columns: 1fr; }
  .mock { font-size: 10.5px; }
  .app-search { width: auto; flex: 1; }
  .app-search span, .app-avatar, .mock-title small { display: none; }
  .app-tools span:nth-child(n+8) { display: none; }
  .mock-grid th, .mock-grid td { padding: 3px 4px; height: 24px; }
  .mock-grid thead th:first-child, .mock-grid tbody th { width: 22px; }
  .mock-grid .h { font-size: 11px; }
  .mock-formula code { font-size: 10px; }
  .demo { padding: 18px; }
  .demo-graph { overflow-x: auto; margin: 0 -18px; padding: 0 18px; }
  .demo-graph svg { min-width: 600px; }
  .pipe-steps button { padding: 12px; font-size: .85rem; gap: 6px; }
  .pane { overflow-x: auto; }
  .vr-row { grid-template-columns: 62px repeat(3, 1fr); }
  .vr-row > :nth-child(5) { display: none; }
  .save-steps { grid-template-columns: 1fr; }
  .roadmap li { grid-template-columns: 44px 1fr; }
  .status { grid-column: 2; justify-content: flex-start; }
  .fn-table [role="row"] { grid-template-columns: 1fr; gap: 2px; }
  .suggest { padding: 20px; }
  .suggest .sg-row { grid-template-columns: 1fr; gap: 0; }
  .sg-foot { flex-direction: column; align-items: stretch; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}

/* roadmap: version tabs */
.rm-tabs { display: none; gap: 4px; padding: 4px; margin-bottom: 32px; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-md); }
.js .rm-tabs { display: inline-flex; }
.rm-tabs button { font: 600 .95rem var(--font); color: var(--muted); background: none; border: 0; border-radius: var(--r-sm); padding: 9px 18px; cursor: pointer; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; transition: background .2s, color .2s, box-shadow .2s; }
.rm-tabs button small { font-weight: 500; font-size: .74rem; color: var(--muted); }
.rm-tabs button:hover { color: var(--ink); }
.rm-tabs button[aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }
.rm-tabs button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.js .rm-track[data-off] { display: none; }
@media (max-width: 560px) { .js .rm-tabs { display: flex; } .rm-tabs button { flex: 1; padding: 8px 10px; } }
