/* Lorg Labs: shared styles. Tokens and rules are described in design-system/lorg-labs/MASTER.md */

/* The two fonts, served from this site (assets/fonts, saved by tools/fetch-fonts.mjs): no visitor's
   browser contacts a third party. Each file is a variable font covering the weights used, 400 to 600. */
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 400 600; font-display: swap; src: url("fonts/jetbrains-mono-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 400 600; font-display: swap; src: url("fonts/jetbrains-mono-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Schibsted Grotesk"; font-style: normal; font-weight: 400 600; font-display: swap; src: url("fonts/schibsted-grotesk-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Schibsted Grotesk"; font-style: normal; font-weight: 400 600; font-display: swap; src: url("fonts/schibsted-grotesk-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  /* light is the default; the switch in the nav offers dark */
  --bg: #FFFFFF;
  --surface: #F5F6F4;
  --surface-2: #ECEEEB;
  --ink: #0F1211;
  --ink-2: #3D4441;
  --muted: #646C68;
  --line: rgba(15, 18, 17, .11);
  --line-strong: rgba(15, 18, 17, .3);

  /* the palette: the four squares of the logo */
  --allow-fill: #1B7A3D;    --allow: #1B7A3D;    --allow-bg: #E6F4EA;
  --caution-fill: #E8A317;  --caution: #8F5600;  --caution-bg: #FCF2DA;
  --block-fill: #C0281F;    --block: #C0281F;    --block-bg: #FBE7E4;
  --unknown-fill: #5F6763;  --unknown: #5F6763;  --unknown-bg: #EDEFEC;

  /* code panels are dark in both themes */
  --code-bg: #0F1211;
  --code-ink: #E7EBE6;
  --code-muted: #8D9690;

  --sans: "Schibsted Grotesk", "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Consolas, monospace;

  --r-sm: 2px;
  --r-md: 4px;
  --wrap: 1160px;
  --nav-h: 64px;
  --four: linear-gradient(180deg, var(--allow-fill) 0 25%, var(--caution-fill) 25% 50%, var(--block-fill) 50% 75%, var(--unknown-fill) 75% 100%);
}
[data-theme="dark"] {
  --bg: #090B0A;
  --surface: #111413;
  --surface-2: #191D1B;
  --ink: #EEF1EC;
  --ink-2: #BFC6C0;
  --muted: #8D9690;
  --line: rgba(255, 255, 255, .09);
  --line-strong: rgba(255, 255, 255, .22);
  --allow-fill: #27A85A;    --allow: #5BD98A;    --allow-bg: rgba(91, 217, 138, .11);
  --caution-fill: #F0AE2A;  --caution: #F2B84B;  --caution-bg: rgba(242, 184, 75, .11);
  --block-fill: #E5483D;    --block: #FF7B6E;    --block-bg: rgba(255, 123, 110, .11);
  --unknown-fill: #7E8882;  --unknown: #A3ACA6;  --unknown-bg: rgba(154, 163, 157, .11);
  --code-bg: #111413;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
p, h1, h2, h3, ul, ol { margin: 0; }
h1, h2, h3 { font-weight: 500; text-wrap: balance; }
code { font-family: var(--mono); font-size: .88em; background: var(--surface-2); padding: 1px 6px; border-radius: var(--r-sm); color: var(--ink); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 32px; }

/* the field: one swarm of dots that travels the whole page */
#field { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; display: block; }
main, footer { position: relative; z-index: 1; }

.label {
  font-family: var(--mono); font-size: 11px; font-weight: 500;
  letter-spacing: .16em; text-transform: uppercase; color: var(--muted);
}

/* ---------- the opening screen: once per visit, while the fonts arrive ---------- */
.intro { display: none; }
html.intro-on .intro {
  position: fixed; inset: 0; z-index: 100; display: grid; place-items: center;
  background-color: var(--bg);
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 240px 240px; background-position: center;
  transition: transform .62s cubic-bezier(.7, 0, .2, 1);
}
html.intro-out .intro { transform: translateY(-100%); }
.intro-lock { display: flex; align-items: center; gap: 24px; }
.intro-mark { display: grid; grid-template-columns: 38px 38px; gap: 7px; }
.intro-mark i { width: 38px; height: 38px; display: block; opacity: 0; transform: scale(.55); animation: intro-in .45s cubic-bezier(.2, .8, .2, 1) forwards; }
.intro-mark i:nth-child(1) { background: var(--allow-fill); animation-delay: .08s; }
.intro-mark i:nth-child(2) { background: var(--caution-fill); animation-delay: .18s; }
.intro-mark i:nth-child(3) { background: var(--block-fill); animation-delay: .28s; }
.intro-mark i:nth-child(4) { background: var(--unknown-fill); animation-delay: .38s; }
.intro-name { font-size: 50px; font-weight: 600; letter-spacing: -.03em; line-height: 1; opacity: 0; transform: translateX(-12px); animation: intro-in .45s ease .54s forwards; }
.intro-foot { position: absolute; left: 0; right: 0; bottom: 13vh; display: flex; flex-direction: column; align-items: center; gap: 16px; }
.intro-bar { width: 240px; height: 2px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 2px; }
.intro-bar span { background: var(--surface-2); overflow: hidden; }
/* the four segments fill in turn and finish as the screen's 1.8 seconds run out */
.intro-bar i { display: block; height: 100%; transform: scaleX(0); transform-origin: left; animation: intro-fill .41s linear forwards; }
.intro-bar span:nth-child(1) i { background: var(--allow-fill); animation-delay: .14s; }
.intro-bar span:nth-child(2) i { background: var(--caution-fill); animation-delay: .55s; }
.intro-bar span:nth-child(3) i { background: var(--block-fill); animation-delay: .96s; }
.intro-bar span:nth-child(4) i { background: var(--unknown-fill); animation-delay: 1.37s; }
.intro-count { font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); font-variant-numeric: tabular-nums; }
.intro-count b { font-weight: 500; color: var(--ink); margin-left: 10px; }
@keyframes intro-in { to { opacity: 1; transform: none; } }
@keyframes intro-fill { to { transform: scaleX(1); } }
@media (max-width: 520px) {
  .intro-lock { gap: 16px; }
  .intro-mark { grid-template-columns: 26px 26px; gap: 5px; }
  .intro-mark i { width: 26px; height: 26px; }
  .intro-name { font-size: 34px; }
  .intro-bar { width: 180px; }
}

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 30; height: var(--nav-h);
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; padding: 0 28px;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.brand { display: inline-flex; align-items: center; gap: 11px; font-weight: 600; letter-spacing: -.01em; text-decoration: none; justify-self: start; }
.mark { display: grid; grid-template-columns: 8px 8px; gap: 2px; }
.mark i { width: 8px; height: 8px; display: block; }
.mark i:nth-child(1) { background: var(--allow-fill); }
.mark i:nth-child(2) { background: var(--caution-fill); }
.mark i:nth-child(3) { background: var(--block-fill); }
.mark i:nth-child(4) { background: var(--unknown-fill); }
.tabs-nav { display: flex; gap: 2px; }
.tabs-nav a {
  font-family: var(--mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; text-decoration: none;
  color: var(--muted); padding: 12px 9px; border-radius: var(--r-sm); white-space: nowrap; transition: color .15s ease, background .15s ease;
}
.tabs-nav a:hover { color: var(--ink); background: var(--surface); }
.tabs-nav a[aria-current="page"] { color: var(--ink); box-shadow: inset 0 -1px 0 var(--ink); }
.nav-right { justify-self: end; display: flex; align-items: center; gap: 10px; }
.icon-btn {
  appearance: none; width: 44px; height: 44px; display: grid; place-items: center; cursor: pointer;
  background: none; border: 1px solid var(--line); border-radius: var(--r-sm); color: var(--muted);
  transition: color .15s ease, border-color .15s ease;
}
.icon-btn:hover { color: var(--ink); border-color: var(--line-strong); }
.icon-btn svg { width: 16px; height: 16px; }

/* ---------- buttons ---------- */
.btn {
  position: relative; display: inline-flex; align-items: center; gap: 12px;
  min-height: 48px; padding: 0 22px 0 26px;
  font-family: var(--mono); font-size: 12px; font-weight: 500;
  letter-spacing: .16em; text-transform: uppercase; text-decoration: none; white-space: nowrap;
  border: 1px solid var(--ink); border-radius: var(--r-sm);
  background: var(--ink); color: var(--bg); cursor: pointer; overflow: hidden;
  transition: background .18s ease, color .18s ease, transform .15s ease, border-color .18s ease;
}
.btn::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 6px; background: var(--four); transition: width .18s ease; }
.btn:hover::before { width: 10px; }
.btn:active { transform: translateY(1px); }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); padding-left: 22px; }
.btn.ghost::before { display: none; }
.btn.ghost:hover { border-color: var(--ink); }
.btn.sm { min-height: 44px; padding: 0 16px 0 20px; font-size: 11px; }
.btn .arr { transition: transform .15s ease; }
.btn:hover .arr { transform: translateX(4px); }
.cta-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.textlink { font-family: var(--mono); font-size: 11.5px; letter-spacing: .14em; text-transform: uppercase; text-underline-offset: 5px; color: var(--ink); }

/* ---------- progress in the logo's colours ---------- */
.prog { position: fixed; top: var(--nav-h); left: 0; right: 0; height: 2px; z-index: 29; display: grid; grid-template-columns: repeat(4, 1fr); pointer-events: none; }
.prog i { display: block; height: 100%; transform: scaleX(0); transform-origin: left; }
.prog span:nth-child(1) i { background: var(--allow-fill); }
.prog span:nth-child(2) i { background: var(--caution-fill); }
.prog span:nth-child(3) i { background: var(--block-fill); }
.prog span:nth-child(4) i { background: var(--unknown-fill); }

/* ---------- fixed instruments ---------- */
/* they stand upright in the page margins, reading bottom to top, so they never sit on the text */
.hud { position: fixed; z-index: 20; bottom: 22px; writing-mode: vertical-rl; transform: rotate(180deg); font-family: var(--mono); font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); pointer-events: none; white-space: nowrap; }
.hud-count { left: 12px; display: flex; align-items: center; gap: 14px; }
.hud-count .box {
  display: inline-flex; align-items: center; gap: 10px; padding: 12px 6px; color: var(--ink);
  background: repeating-linear-gradient(135deg, var(--line) 0 1px, transparent 1px 5px);
  border: 1px solid var(--line);
}
.hud-count .box em { font-style: normal; color: var(--muted); }
.hud-count .dash { width: 1px; height: 22px; background: var(--line-strong); }
.hud-xy { right: 12px; font-variant-numeric: tabular-nums; }
.next {
  position: fixed; right: 12px; top: 50%; transform: translateY(-50%); z-index: 20;
  width: 44px; height: 44px; padding: 0; border: 0; background: none; color: var(--ink); cursor: pointer; display: grid; place-items: center;
}
.next svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.next circle { fill: none; stroke-width: 1; }
.next .track { stroke: var(--line-strong); }
.next .arc { stroke: var(--ink); stroke-dasharray: 163.4; stroke-dashoffset: 163.4; }
.next span { font-family: var(--mono); font-size: 14px; transition: transform .2s ease; }
.next:hover span { transform: translateY(3px); }

/* ---------- parts ---------- */
.beat { min-height: calc(100vh - var(--nav-h)); display: flex; align-items: center; padding: 104px 0; }
.beat.auto { min-height: 0; padding: 88px 0; }
.beat.top { min-height: 78vh; }
.beat > .wrap { width: 100%; }
.cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 72px; align-items: center; }
.cols.start { align-items: start; }
.beat.flip .copy { order: 2; }
.viz { width: 100%; aspect-ratio: 4 / 3; max-height: 60vh; }
.viz.band { aspect-ratio: auto; height: 210px; max-height: none; margin: 44px 0 40px; }
.viz.band.tall { height: 330px; }
.viz.band.thin { height: 110px; margin: 30px 0 34px; }

.kicker { display: flex; align-items: center; gap: 14px; margin-bottom: 26px; font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.kicker .bar { width: 4px; height: 20px; background: var(--four); flex: none; }
.kicker .num { color: var(--ink); }
.kicker .num em { font-style: normal; color: var(--muted); }
.copy h1, .head h1 { font-size: clamp(42px, 5.4vw, 76px); line-height: 1; letter-spacing: -.035em; }
.copy h2, .head h2 { font-size: clamp(32px, 4vw, 54px); line-height: 1.04; letter-spacing: -.03em; }
.copy h2.sm, .head h2.sm { font-size: clamp(26px, 2.8vw, 38px); line-height: 1.1; letter-spacing: -.025em; }
.copy p, .head p { color: var(--ink-2); max-width: 33em; margin-top: 22px; }
.copy p.big, .head p.big { font-size: 19px; }
.copy p strong, .head p strong { color: var(--ink); font-weight: 600; }
.copy .cta-row { margin-top: 36px; }
.head { max-width: 860px; }
.center { text-align: center; margin-left: auto; margin-right: auto; }
.center .kicker, .center .cta-row { justify-content: center; }
.center p { margin-left: auto; margin-right: auto; }
.head p.label, .copy p.label { max-width: none; color: var(--muted); }

/* reveal */
.js .rv { opacity: 0; transform: translateY(18px); transition: opacity .7s cubic-bezier(.2, .7, .2, 1), transform .7s cubic-bezier(.2, .7, .2, 1); }
.js .in .rv { opacity: 1; transform: none; }
.js .in .rv:nth-child(2) { transition-delay: .07s; }
.js .in .rv:nth-child(3) { transition-delay: .14s; }
.js .in .rv:nth-child(4) { transition-delay: .21s; }
.js .in .rv:nth-child(5) { transition-delay: .28s; }
.js .in .rv:nth-child(6) { transition-delay: .35s; }

/* ---------- pieces ---------- */
.quote { margin-top: 30px; padding: 22px 24px; border: 1px solid var(--line); border-left: 4px solid var(--block-fill); background: var(--surface); max-width: 33em; }
.quote.plain { border-left-color: var(--ink); }
.quote q { display: block; quotes: none; font-size: 22px; line-height: 1.3; letter-spacing: -.015em; color: var(--ink); margin: 14px 0 12px; }
.quote p { margin-top: 12px; }
.stamp {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 12px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase;
  padding: 6px 11px; border-radius: var(--r-sm); border: 1px solid currentColor;
}
.stamp::before { content: ""; width: 8px; height: 8px; background: currentColor; }
.stamp.allow { color: var(--allow); background: var(--allow-bg); }
.stamp.caution { color: var(--caution); background: var(--caution-bg); }
.stamp.block { color: var(--block); background: var(--block-bg); }
.stamp.unknown { color: var(--unknown); background: var(--unknown-bg); }
.tag { display: inline-block; font-family: var(--mono); font-size: 10px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; padding: 4px 8px; border: 1px solid var(--line-strong); border-radius: var(--r-sm); color: var(--ink-2); }
.tag.now { color: var(--allow); border-color: currentColor; }
.tag.later { color: var(--caution); border-color: currentColor; }
code.key { word-break: break-all; }
.btn.copy { margin-top: 12px; cursor: pointer; }

.grid4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.cell { padding: 26px 26px 6px 0; border-right: 1px solid var(--line); margin-right: 26px; }
.cell:last-child { border-right: 0; margin-right: 0; padding-right: 0; }
.cell h3 { font-size: 20px; letter-spacing: -.01em; margin: 16px 0 8px; }
.cell > h3:first-child { margin-top: 0; }
.cell p { font-size: 15.5px; color: var(--ink-2); }
.cell p + p { margin-top: 10px; }
.cell p.do { margin-top: 12px; font-family: var(--mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink); }
.cell .n { font-family: var(--mono); font-size: 12px; letter-spacing: .16em; color: var(--muted); }
.cell .price { font-size: 34px; letter-spacing: -.03em; font-weight: 500; line-height: 1.1; margin: 14px 0 6px; }
.sub { margin: 56px 0 18px; }

.catch, .rows { list-style: none; padding: 0; margin: 26px 0 0; border-top: 1px solid var(--line); }
.catch li, .rows li { padding: 13px 0; border-bottom: 1px solid var(--line); font-size: 15.5px; color: var(--ink-2); }
.catch li strong, .rows li strong { color: var(--ink); font-weight: 600; }
.rows.kv li { display: grid; grid-template-columns: 190px 1fr; gap: 20px; }
.rows.legal li > div p + p, .rows.legal li > div ul, .rows.legal li > div ul + p { margin-top: 10px; }
.rows.legal li > div ul { padding-left: 18px; list-style: disc; }
.rows.legal li > div li { display: list-item; border: 0; padding: 2px 0; }
.rows.kv li > :first-child { font-family: var(--mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink); padding-top: 4px; }

.points { list-style: none; padding: 0; margin: 30px 0 0; border-top: 1px solid var(--line); }
.points li { display: grid; grid-template-columns: 34px 1fr; gap: 6px; padding: 16px 0; border-bottom: 1px solid var(--line); font-size: 16px; color: var(--ink-2); }
.points li i { width: 9px; height: 9px; margin-top: 8px; display: block; }
.points li strong { color: var(--ink); font-weight: 600; }

.score { display: flex; align-items: baseline; gap: 18px 40px; flex-wrap: wrap; margin-top: 8px; }
.score .n { font-size: clamp(56px, 8vw, 112px); line-height: .95; letter-spacing: -.045em; font-weight: 500; }
.score .n small { font-size: .32em; letter-spacing: -.01em; color: var(--muted); margin-left: 10px; }
.score .v { max-width: 22em; color: var(--ink-2); }
.strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--line); margin-top: 36px; }
.strip div { padding: 20px 20px 0 0; }
.strip b { display: block; font-family: var(--mono); font-size: 22px; font-weight: 500; letter-spacing: -.02em; color: var(--ink); font-variant-numeric: tabular-nums; }
.strip span { font-size: 14.5px; color: var(--ink-2); }
.strip b span { font-size: inherit; color: inherit; }

.codeblock { background: var(--code-bg); color: var(--code-ink); border: 1px solid var(--line); border-radius: var(--r-md); font-family: var(--mono); font-size: 13px; line-height: 1.8; padding: 20px 22px; overflow-x: auto; white-space: pre; }
.codeblock .m { color: var(--code-muted); }
.codeblock .r { color: #FF7B6E; }
.codeblock .g { color: #5BD98A; }

.tbl-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--bg); margin-top: 26px; }
.tbl { width: 100%; border-collapse: collapse; font-size: 15px; }
.tbl th { text-align: left; font-family: var(--mono); font-size: 10.5px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); padding: 13px 16px; border-bottom: 1px solid var(--line-strong); white-space: nowrap; }
.tbl td { padding: 14px 16px; border-bottom: 1px solid var(--line); color: var(--ink-2); vertical-align: top; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl td.num, .tbl th.r { text-align: right; font-family: var(--mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
.tbl tr.us td { color: var(--ink); background: var(--surface); font-weight: 500; }
.tbl td code { white-space: nowrap; }
.note { margin-top: 14px; }

.qa { border-top: 1px solid var(--line); margin-top: 8px; }
.qa details { border-bottom: 1px solid var(--line); }
.qa summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: 1fr 24px; gap: 20px; align-items: center; padding: 20px 0; font-size: 20px; letter-spacing: -.01em; color: var(--ink); min-height: 44px; }
.qa summary::-webkit-details-marker { display: none; }
.qa summary::after { content: "+"; font-family: var(--mono); font-size: 18px; color: var(--muted); text-align: center; transition: transform .2s ease; }
.qa details[open] summary::after { transform: rotate(45deg); }
.qa details p { color: var(--ink-2); max-width: 38em; padding: 0 0 22px; }

.todo { margin-top: 30px; padding: 18px 20px; border: 1px dashed var(--line-strong); max-width: 33em; }
.todo p { margin-top: 8px; font-size: 15px; color: var(--ink-2); }

footer { border-top: 1px solid var(--line); padding: 40px 0 96px; background: var(--bg); }
footer .wrap { display: grid; grid-template-columns: auto 1fr; gap: 28px 56px; align-items: start; }
footer p { font-size: 13.5px; color: var(--muted); max-width: 46em; }
.foot-links { display: flex; flex-wrap: wrap; gap: 6px 22px; margin-bottom: 18px; }
.foot-links a { font-family: var(--mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; text-decoration: none; color: var(--ink-2); padding: 6px 0; }
.foot-links a:hover { color: var(--ink); }

@media (max-width: 1240px) { .tabs-nav, .hud, .next { display: none; } .nav { grid-template-columns: 1fr auto; } }
@media (max-width: 900px) {
  body { font-size: 16px; }
  .wrap { padding: 0 20px; }
  .nav { padding: 0 16px; }
  .cols { grid-template-columns: 1fr; gap: 28px; }
  .beat { padding: 72px 0; min-height: 0; }
  .beat.auto { padding: 60px 0; }
  .beat.top { min-height: 0; }
  .beat.flip .copy { order: 0; }
  .viz { max-height: 300px; aspect-ratio: auto; height: 280px; }
  .viz.band { height: 150px; margin: 30px 0 28px; }
  .viz.band.tall { height: 270px; }
  .viz.band.thin { height: 70px; }
  .grid4, .grid3, .strip { grid-template-columns: 1fr 1fr; }
  .grid2 { grid-template-columns: 1fr; }
  .cell { border-right: 0; margin-right: 0; padding-right: 16px; }
  .rows.kv li { grid-template-columns: 1fr; gap: 4px; }
  .hud, .next { display: none; }
  footer .wrap { grid-template-columns: 1fr; }
  .qa summary { font-size: 18px; }
}
@media (max-width: 520px) {
  .grid4, .grid3 { grid-template-columns: 1fr; }
  .btn { padding: 0 16px 0 22px; letter-spacing: .12em; }
  .nav .btn.sm { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  .js .rv { opacity: 1; transform: none; }
  .intro-mark i, .intro-name { opacity: 1; transform: none; }
  .intro-bar i { transform: scaleX(1); }
}

/* ---------- the AI view button (every page) and the AI view itself ---------- */
.ai-btn { width: auto; min-width: 44px; padding: 0 10px; font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: .14em; text-decoration: none; }
.ai-btn[aria-pressed="true"] { color: var(--bg); background: var(--ink); border-color: var(--ink); }
.aiview { position: fixed; inset: var(--nav-h) 0 0 0; z-index: 40; display: flex; flex-direction: column; background: var(--bg); border-top: 1px solid var(--line); }
.aiview[hidden] { display: none; }
.aiview-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 14px 28px; border-bottom: 1px solid var(--line); }
.aiview-tools { display: flex; gap: 10px; flex-wrap: wrap; }
.aiview-text { flex: 1; margin: 0; overflow: auto; padding: 28px; font-family: var(--mono); font-size: 13.5px; line-height: 1.75; color: var(--ink); white-space: pre-wrap; word-break: break-word; max-width: 980px; width: 100%; align-self: center; }
.aiview-text:focus-visible { outline-offset: -2px; }
.aiview-foot { padding: 12px 28px 18px; border-top: 1px solid var(--line); }
html.ai-on body { overflow: hidden; }

/* ---------- the check box (home page, quickstart) ---------- */
.checker { margin-top: 26px; padding: 18px; border: 1px solid var(--line-strong); border-radius: var(--r-md); background: var(--bg); max-width: 36em; }
.checker-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; }
.seg { display: inline-flex; border: 1px solid var(--line-strong); border-radius: var(--r-sm); }
.seg button { appearance: none; background: none; border: 0; min-height: 40px; padding: 0 16px; font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); cursor: pointer; }
.seg button + button { border-left: 1px solid var(--line-strong); }
.seg button[aria-checked="true"] { background: var(--ink); color: var(--bg); }
.checker-chain { appearance: none; min-height: 40px; padding: 0 30px 0 12px; border: 1px solid var(--line-strong); border-radius: var(--r-sm); background: var(--bg) linear-gradient(45deg, transparent 50%, var(--muted) 50%) no-repeat right 14px center / 5px 5px; color: var(--ink); font-family: var(--mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; cursor: pointer; }
.checker-row { display: flex; gap: 10px; }
.checker-input { flex: 1; min-width: 0; min-height: 48px; padding: 0 14px; border: 1px solid var(--line-strong); border-radius: var(--r-sm); background: var(--surface); color: var(--ink); font-family: var(--mono); font-size: 13px; }
.checker-input:focus { outline: 2px solid var(--ink); outline-offset: 1px; border-color: var(--ink); }
.checker .btn.sm { min-height: 48px; }
.checker.busy .btn { opacity: .6; cursor: progress; }
.checker-try { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin-top: 12px !important; font-size: 13px; max-width: none !important; }
.checker-try .label { margin-right: 4px; }
.checker-try button { appearance: none; background: none; border: 1px solid var(--line); border-radius: var(--r-sm); min-height: 32px; padding: 0 10px; font: inherit; font-size: 13px; color: var(--ink-2); cursor: pointer; }
.checker-try button:hover { border-color: var(--ink); color: var(--ink); }
.checker-out { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.checker-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.checker-sum { margin-top: 12px !important; font-size: 16px; color: var(--ink) !important; max-width: none !important; }
.checker-reasons { list-style: none; padding: 0; margin: 12px 0 0; border-top: 1px solid var(--line); }
.checker-reasons li { display: grid; grid-template-columns: 74px auto 1fr; gap: 10px; align-items: baseline; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 14px; color: var(--ink-2); }
.checker-reasons code { font-size: 11.5px; white-space: nowrap; }
.checker-meta, .checker-wait { margin-top: 12px !important; }
.checker-note { margin-top: 14px !important; font-size: 13px !important; color: var(--muted) !important; }
.sev { font-family: var(--mono); font-size: 10px; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.sev.critical { color: var(--block); }
.sev.high { color: var(--caution); }
.sev.info, .sev.low { color: var(--unknown); }
@media (max-width: 520px) {
  .checker { padding: 14px; }
  .checker-row { flex-direction: column; }
  .checker-reasons li { grid-template-columns: 1fr; gap: 2px; }
}

/* ---------- the docs: sidebar, page, contents ---------- */
.docs-page .hud, .docs-page .next { display: none; }
.docs { position: relative; z-index: 1; display: grid; grid-template-columns: 280px minmax(0, 1fr) 220px; max-width: 1440px; margin: 0 auto; background: var(--bg); min-height: calc(100vh - var(--nav-h)); }
.docs-side { position: sticky; top: var(--nav-h); align-self: start; height: calc(100vh - var(--nav-h)); overflow-y: auto; border-right: 1px solid var(--line); }
.docs-menu > summary { display: none; }
.docs-side-in { padding: 30px 22px 40px; }
.docs-home { display: flex; align-items: center; gap: 14px; text-decoration: none; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.docs-ico { width: 44px; height: 44px; display: grid; place-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm); }
.docs-home b { display: block; font-size: 20px; font-weight: 600; letter-spacing: -.01em; line-height: 1.1; }
.docs-home em { display: block; font-style: normal; font-family: var(--mono); font-size: 11px; color: var(--muted); letter-spacing: .06em; margin-top: 4px; }
.docs-search { position: relative; display: flex; align-items: center; margin: 22px 0 18px; }
.docs-search svg { position: absolute; left: 12px; width: 15px; height: 15px; color: var(--muted); pointer-events: none; }
.docs-search input { width: 100%; min-height: 44px; padding: 0 36px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); color: var(--ink); font: inherit; font-size: 15px; }
.docs-search input::-webkit-search-cancel-button { display: none; }
.docs-search input:focus { outline: 2px solid var(--ink); outline-offset: 1px; }
.docs-search kbd { position: absolute; right: 10px; font-family: var(--mono); font-size: 11px; color: var(--muted); border: 1px solid var(--line-strong); border-radius: var(--r-sm); padding: 1px 6px; pointer-events: none; }
.docs-group { margin-top: 18px; }
.docs-group p { font-family: var(--mono); font-size: 10.5px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin: 0 0 6px 12px; }
.docs-group a { position: relative; display: block; padding: 9px 12px 9px 14px; font-size: 15px; color: var(--ink-2); text-decoration: none; border-left: 1px solid var(--line); overflow: hidden; }
.docs-group a:hover { color: var(--ink); background: var(--surface); }
.docs-group a[aria-current="page"] { color: var(--bg); background: var(--ink); border-left-color: var(--ink); border-radius: 0 var(--r-sm) var(--r-sm) 0; }
.docs-group a[aria-current="page"]::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--four); }
.docs-group a[hidden], .docs-group[hidden] { display: none; }
.docs-none { font-size: 14px; color: var(--muted); margin: 16px 12px 0; }

.docs-main { min-width: 0; padding: 34px 56px 80px; max-width: 860px; width: 100%; justify-self: center; }
.docs-tools { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 30px; }
.docs-tools-r { display: flex; gap: 8px; flex-wrap: wrap; }
.docs-tools .btn.sm { min-height: 36px; font-size: 10.5px; padding: 0 12px; }
.docs-main h1 { font-size: clamp(34px, 3.6vw, 48px); line-height: 1.05; letter-spacing: -.03em; }
.docs-main .lead { font-size: 19px; line-height: 1.55; color: var(--ink-2); margin-top: 20px; }
.docs-main .lead strong, .docs-main p strong { color: var(--ink); font-weight: 600; }
.docs-main h2 { font-size: 26px; letter-spacing: -.02em; line-height: 1.15; margin-top: 56px; padding-top: 22px; border-top: 1px solid var(--line); scroll-margin-top: calc(var(--nav-h) + 16px); display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.docs-main h2 .sev { font-size: 11px; }
.docs-main h3 { font-size: 18px; letter-spacing: -.01em; }
.docs-main > p, .docs-main .callout p { color: var(--ink-2); margin-top: 16px; font-size: 16.5px; }
.docs-main .codeblock { margin-top: 18px; }
.docs-main .tbl-wrap { margin-top: 18px; }
.docs-main .rows { margin-top: 18px; }
.docs-main .rows.kv li { grid-template-columns: 200px 1fr; }
.docs-main a:not(.btn):not(.card) { text-decoration-thickness: 1px; text-underline-offset: 3px; }
.docs-main .label.note { margin-top: 10px; }
.callout { margin-top: 30px; padding: 18px 22px; border: 1px solid var(--line); border-left: 4px solid var(--allow-fill); background: var(--surface); }
.callout-title { font-weight: 600; color: var(--ink) !important; margin-top: 0 !important; }
.callout p + p { margin-top: 8px !important; }
.steps { list-style: none; padding: 0; margin: 22px 0 0; counter-reset: step; }
.steps li { position: relative; counter-increment: step; padding: 0 0 26px 58px; }
.steps li::before { content: counter(step); position: absolute; left: 0; top: -4px; width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid var(--line-strong); border-radius: 50%; background: var(--bg); font-family: var(--mono); font-size: 13px; color: var(--ink); }
.steps li::after { content: ""; position: absolute; left: 17px; top: 34px; bottom: 2px; width: 1px; background: var(--line); }
.steps li:last-child::after { display: none; }
.steps li p { color: var(--ink-2); margin-top: 6px; font-size: 16px; }
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 20px; }
.card { display: block; padding: 18px; border: 1px solid var(--line); border-radius: var(--r-md); text-decoration: none; transition: border-color .15s ease; }
.card:hover { border-color: var(--ink); }
.card h3 { margin-top: 14px; }
.card p { font-size: 15px; color: var(--ink-2); margin-top: 8px; }
.keybox { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 18px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); }
.keybox code { font-size: 13px; word-break: break-all; }
.keybox .btn.copy { margin-top: 0; }
.docs-main .checker { max-width: none; }
.docs-pager { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 64px; padding-top: 24px; border-top: 1px solid var(--line); }
.docs-pager a { display: block; padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--r-md); text-decoration: none; font-size: 17px; color: var(--ink); }
.docs-pager a:hover { border-color: var(--ink); }
.docs-pager .label { display: block; margin-bottom: 4px; }
.docs-pager .next-page { text-align: right; grid-column: 2; }
.docs-toc { position: sticky; top: var(--nav-h); align-self: start; max-height: calc(100vh - var(--nav-h)); overflow-y: auto; padding: 40px 22px 40px 6px; }
.docs-toc .label { margin-bottom: 10px; }
.docs-toc a { display: block; padding: 6px 0 6px 12px; font-size: 13.5px; line-height: 1.35; color: var(--muted); text-decoration: none; border-left: 1px solid var(--line); }
.docs-toc a:hover { color: var(--ink); }
.docs-toc a[aria-current="true"] { color: var(--ink); border-left: 2px solid var(--ink); padding-left: 11px; }
.docs-page footer { position: relative; z-index: 2; }

@media (max-width: 1240px) { .docs { grid-template-columns: 260px minmax(0, 1fr); } .docs-toc { display: none; } .docs-main { padding: 30px 40px 72px; } }
@media (max-width: 900px) {
  .docs { grid-template-columns: 1fr; }
  .docs-side { position: static; height: auto; overflow: visible; border-right: 0; border-bottom: 1px solid var(--line); }
  .docs-menu > summary { display: flex; align-items: center; justify-content: space-between; min-height: 52px; padding: 0 20px; cursor: pointer; list-style: none; font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: var(--ink); }
  .docs-menu > summary::-webkit-details-marker { display: none; }
  .docs-menu > summary::after { content: "+"; font-size: 16px; color: var(--muted); }
  .docs-menu[open] > summary::after { content: "\2212"; }
  .docs-side-in { padding: 4px 20px 24px; }
  .docs-main { padding: 26px 20px 64px; }
  .docs-main .rows.kv li { grid-template-columns: 1fr; }
  .cards { grid-template-columns: 1fr; }
  .docs-pager { grid-template-columns: 1fr; }
  .docs-pager .next-page { grid-column: auto; }
  .aiview-bar, .aiview-text, .aiview-foot { padding-left: 16px; padding-right: 16px; }
}
