/* FSX docs site. Tokens follow brand/BRAND.md. Dark only, like every L2 surface. */
:root {
  color-scheme: dark;
  --void: #07090D;        /* page */
  --slab: #10151C;        /* elevated surface: dL* ~ +7 over page, cool tint */
  --slab-2: #151B24;      /* code, nested */
  --rule: #222A35;
  --ink: #FFFFFF;         /* headlines: pure white top step */
  --body: #C3CBD4;        /* body text */
  --mute: #7E8A97;        /* labels, captions */
  --sig: #00E5FF;         /* FSX cyan: the only hue */
  --sig-dim: rgba(0, 229, 255, .14);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --sans: "Inter", "Segoe UI", system-ui, sans-serif;
  --mono: "JetBrains Mono", "Cascadia Mono", Consolas, monospace;
  --r: 2px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; animation: none !important; } }
body { margin: 0; background: var(--void); color: var(--body); font: 400 16px/1.65 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: var(--ink); text-decoration-color: var(--sig); text-underline-offset: 3px; }
a:hover { color: var(--sig); }
:focus-visible { outline: 2px solid var(--sig); outline-offset: 2px; }
code, pre, kbd { font-family: var(--mono); font-size: .88em; }
:not(pre) > code { background: var(--slab-2); border: 1px solid var(--rule); border-radius: var(--r); padding: .08em .38em; color: var(--ink); }

/* ---------- top bar ---------- */
.bar { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 24px; height: 56px; padding: 0 24px;
       background: rgba(7, 9, 13, .82); backdrop-filter: blur(16px) saturate(140%); border-bottom: 1px solid var(--rule); }
.bar .brand { display: flex; align-items: center; height: 22px; }
.bar .brand svg { height: 22px; width: auto; }
.bar nav { display: flex; gap: 20px; margin-left: auto; font-size: 14px; }
.bar nav a { color: var(--mute); text-decoration: none; }
.bar nav a:hover { color: var(--ink); }
.bar .gh { font: 500 12px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--ink); text-decoration: none;
           border: 1px solid var(--rule); padding: 6px 10px; border-radius: var(--r); }
.bar .gh:hover { border-color: var(--sig); color: var(--sig); }
@media (max-width: 760px) { .bar nav { display: none; } .bar .gh { margin-left: auto; } }

/* ---------- hero ---------- */
.hero { position: relative; min-height: 600px; display: grid; align-items: center; overflow: hidden; border-bottom: 1px solid var(--rule); }
.hero canvas { position: absolute; inset: 0; width: 100%; height: 100%;
  -webkit-mask-image: linear-gradient(90deg, transparent 0 44%, #000 74%); mask-image: linear-gradient(90deg, transparent 0 44%, #000 74%); }
@media (max-width: 900px) { .hero canvas { -webkit-mask-image: linear-gradient(180deg, transparent 0 55%, #000 100%); mask-image: linear-gradient(180deg, transparent 0 55%, #000 100%); opacity: .7; } }
.hero .in { position: relative; max-width: 1180px; width: 100%; margin: 0 auto; padding: 72px 24px; }
.hero .col { max-width: 640px; }
.hero h1 { margin: 0 0 20px; color: var(--ink); font-weight: 800; font-size: clamp(34px, 6.2vw, 68px); line-height: 1.02; letter-spacing: -.028em; }
.hero p.lede { margin: 0 0 32px; font-size: clamp(17px, 2vw, 20px); color: var(--body); max-width: 560px; }
.cmd { display: flex; align-items: center; gap: 12px; width: max-content; max-width: 100%; overflow-x: auto; background: var(--slab); border: 1px solid var(--rule);
       border-radius: var(--r); padding: 12px 14px 12px 16px; font: 500 15px var(--mono); color: var(--ink); }
.cmd .p { color: var(--sig); user-select: none; }
.cmd button { margin-left: 8px; background: none; border: 1px solid var(--rule); color: var(--mute); font: 500 11px var(--mono);
              letter-spacing: .12em; text-transform: uppercase; padding: 5px 8px; border-radius: var(--r); cursor: pointer; }
.cmd button:hover { color: var(--ink); border-color: var(--mute); }
.metrics { display: grid; grid-template-columns: repeat(4, auto); margin-top: 36px; width: max-content; max-width: 100%;
           background: var(--slab); border: 1px solid var(--rule); border-radius: var(--r); }
.metrics div { padding: 14px 20px; border-left: 1px solid var(--rule); }
.metrics div:first-child { border-left: 0; }
.metrics b { display: block; font: 600 22px var(--mono); font-variant-numeric: tabular-nums; color: var(--ink); }
.metrics b.sig { color: var(--sig); }
.metrics span { display: block; margin-top: 2px; font: 500 11px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--mute); }
.metrics + .src { margin-top: 10px; font-size: 13px; color: var(--mute); }
@media (max-width: 640px) { .metrics { grid-template-columns: repeat(2, 1fr); width: 100%; } .metrics div:nth-child(3) { border-left: 0; }
  .metrics div:nth-child(n+3) { border-top: 1px solid var(--rule); } }

/* ---------- layout ---------- */
.page { max-width: 1180px; margin: 0 auto; padding: 0 24px; display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 56px; }
@media (max-width: 900px) { .page { grid-template-columns: minmax(0, 1fr); gap: 0; } .toc { display: none; } }
.toc { position: sticky; top: 80px; align-self: start; padding-top: 72px; font-size: 14px; }
.toc a { display: block; padding: 5px 0 5px 12px; border-left: 1px solid var(--rule); color: var(--mute); text-decoration: none; }
.toc a:hover, .toc a.on { color: var(--ink); border-left-color: var(--sig); }
main { min-width: 0; padding-bottom: 96px; }
section { padding-top: 72px; }
h2 { margin: 0 0 8px; color: var(--ink); font-size: 30px; font-weight: 700; letter-spacing: -.018em; line-height: 1.2; }
h2 + .sub { margin: 0 0 28px; color: var(--mute); }
h3 { margin: 32px 0 10px; color: var(--ink); font-size: 18px; font-weight: 600; }
p { margin: 0 0 16px; max-width: 720px; }
ul { padding-left: 20px; max-width: 720px; } li { margin: 6px 0; }

pre { position: relative; margin: 0 0 20px; background: var(--slab); border: 1px solid var(--rule); border-radius: var(--r);
      padding: 16px 18px; overflow-x: auto; color: var(--ink); line-height: 1.6; }
pre .c { color: var(--mute); }
pre .p { color: var(--sig); user-select: none; }

table { width: 100%; border-collapse: collapse; margin: 0 0 24px; font-size: 15px; }
.tw { overflow-x: auto; margin-bottom: 24px; } .tw table { margin: 0; }
th { text-align: left; font: 500 11px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--mute);
     padding: 10px 14px; border-bottom: 1px solid var(--rule); }
td { padding: 11px 14px; border-bottom: 1px solid var(--rule); vertical-align: top; }
td:first-child { white-space: nowrap; }
td.n { font-family: var(--mono); font-variant-numeric: tabular-nums; color: var(--ink); text-align: right; white-space: nowrap; }
tr.win td.n { color: var(--sig); }

/* demo */
.demo { background: var(--slab); border: 1px solid var(--rule); border-radius: var(--r); padding: 8px; }
.demo img { display: block; width: 100%; height: auto; }
.caption { margin-top: 10px; font-size: 13px; color: var(--mute); }

/* du block: the mark's branches, at data scale */
.du { background: var(--slab); border: 1px solid var(--rule); border-radius: var(--r); padding: 20px 22px; margin-bottom: 24px; }
.du .row { display: grid; grid-template-columns: 76px minmax(0, 1fr) 96px; align-items: center; gap: 14px; height: 32px; font: 500 14px var(--mono); }
.du .name { color: var(--ink); }
.du .track { position: relative; height: 3px; border-left: 3px solid var(--ink); height: 18px; display: flex; align-items: center; }
.du .fill { height: 3px; background: var(--ink); width: 0; transition: width 900ms var(--ease); }
.du .row:first-child .fill { background: var(--sig); }
.du .val { text-align: right; color: var(--body); font-variant-numeric: tabular-nums; }
.du .head { font: 500 11px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--mute); margin-bottom: 8px; }

.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 24px; }
@media (max-width: 760px) { .grid2 { grid-template-columns: 1fr; } }
.card { background: var(--slab); border: 1px solid var(--rule); border-radius: var(--r); padding: 18px 20px; }
.card h3 { margin: 0 0 6px; font-size: 16px; }
.card p { margin: 0; font-size: 15px; }

footer { border-top: 1px solid var(--rule); padding: 32px 24px 48px; }
footer .in { max-width: 1180px; margin: 0 auto; display: flex; flex-wrap: wrap; gap: 16px 32px; align-items: center;
             font: 500 12px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--mute); }
footer a { color: var(--mute); text-decoration: none; } footer a:hover { color: var(--ink); }
