/* Layout: one reading column (about 68ch) inside a 1160px frame; a sticky road-sign nav; sections divided by a
   painted stall-line rule. Asphalt and safety yellow, as in the Pavement Pro app (#485); concrete for light.
   Real numbers wear a solid yellow chip, simulated ones the diagonal hatch of a painted no-parking aisle. */
:root {
  --bg: #131312;
  --panel: #1b1b1a;
  --raised: #232321;
  --line: #2f2f2c;
  --line-strong: #3a3a36;
  --fg: #f4f1ea;
  --muted: #a8a297;
  --accent: #f2c230;
  --accent-text: #f4c842;
  --on-accent: #141414;
  --accent-tint: #2b2a1a;
  --ok: #5fd08a;
  --warn: #fb923c;
  --bad: #f87171;
  --hatch: rgb(244 241 234 / 0.16);
  --shadow: 0 1px 0 rgb(0 0 0 / 0.4), 0 12px 32px -18px rgb(0 0 0 / 0.7);
  /* the lidar figure stays dark in both themes, so its marks are fixed */
  --ov-stall: #f2c230;
  --figure-bg: #0b0b10;
  /* tracks (marks only, never text) and chart series, validated per theme (dataviz slots 1-3) */
  --tr-project: #c9c2b5; --tr-app: #5ad1f0; --tr-geosynth: #b48ef0; --tr-rig: #f2c230; --tr-rtk: #5fd08a; --tr-field: #ff8a3d;
  --s1: #3987e5; --s2: #d95926; --s3: #199e70;

  --display: "Barlow Condensed", Bahnschrift, "DIN Alternate", "Arial Narrow", sans-serif;
  --body: "IBM Plex Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  --mono: "IBM Plex Mono", "Cascadia Mono", Consolas, ui-monospace, monospace;

  --step--1: 0.8125rem;
  --step-0: 1rem;
  --step-1: 1.1875rem;
  --step-2: 1.5rem;
  --step-3: 2rem;
  --step-4: clamp(2.5rem, 6vw, 4.25rem);
  --frame: 1160px;
  --measure: 68ch;
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #eeece6; --panel: #f7f6f2; --raised: #ffffff; --line: #dad6cc; --line-strong: #c4bfb3;
    --fg: #1a1a18; --muted: #5c584f; --accent: #f2c230; --accent-text: #845f00; --on-accent: #141414;
    --accent-tint: #f6ecc6; --ok: #1d7a45; --warn: #b4520e; --bad: #b42318; --hatch: rgb(26 26 24 / 0.14);
    --shadow: 0 1px 0 rgb(0 0 0 / 0.06), 0 12px 32px -20px rgb(0 0 0 / 0.35);
    --tr-project: #6b665c; --tr-app: #1b7fa1; --tr-geosynth: #7a52c7; --tr-rig: #9a7300; --tr-rtk: #1d7a45; --tr-field: #c4561a;
    --s1: #2a78d6; --s2: #eb6834; --s3: #1baf7a;
    color-scheme: light;
  }
}
:root[data-theme="light"] {
  --bg: #eeece6; --panel: #f7f6f2; --raised: #ffffff; --line: #dad6cc; --line-strong: #c4bfb3;
  --fg: #1a1a18; --muted: #5c584f; --accent: #f2c230; --accent-text: #845f00; --on-accent: #141414;
  --accent-tint: #f6ecc6; --ok: #1d7a45; --warn: #b4520e; --bad: #b42318; --hatch: rgb(26 26 24 / 0.14);
  --shadow: 0 1px 0 rgb(0 0 0 / 0.06), 0 12px 32px -20px rgb(0 0 0 / 0.35);
  --tr-project: #6b665c; --tr-app: #1b7fa1; --tr-geosynth: #7a52c7; --tr-rig: #9a7300; --tr-rtk: #1d7a45; --tr-field: #c4561a;
  --s1: #2a78d6; --s2: #eb6834; --s3: #1baf7a;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 92px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; animation: none !important; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--body);
  font-size: var(--step-0);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 30; background: var(--panel);
}
a { color: var(--accent-text); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 3px; }
::selection { background: var(--accent); color: var(--on-accent); }
h1, h2, h3, h4 { font-family: var(--display); font-weight: 600; line-height: 1.08; text-wrap: balance; margin: 0; letter-spacing: 0.005em; }
p { margin: 0; }
code, .mono { font-family: var(--mono); font-size: 0.875em; }
.num { font-variant-numeric: tabular-nums; }

.wrap {
  max-width: var(--frame);
  margin-inline: auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}

/* ---- nav ---- */
.nav {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20;
  background: color-mix(in srgb, var(--panel) 94%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.nav .wrap { display: flex; align-items: center; gap: 28px; min-height: 76px; }
.brand {
  font-family: var(--display); font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; font-size: 1.35rem;
  color: var(--fg); text-decoration: none; white-space: nowrap; display: flex; align-items: center; gap: 12px;
}
.brand .mark { width: 30px; height: 30px; flex: none; background: url(favicon.svg) center / contain no-repeat; }
.navlinks { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; min-width: 0; flex: 1; }
.navlinks::-webkit-scrollbar { display: none; }
.navlinks a {
  font-family: var(--display); font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; font-size: 1.15rem;
  color: var(--muted); text-decoration: none; padding: 10px 14px; border-radius: 8px; white-space: nowrap;
}
.navlinks a:hover { color: var(--fg); background: var(--raised); }
.navlinks a.on { color: var(--accent-text); }
.theme-btn {
  flex: none; border: 1px solid var(--line-strong); background: transparent; color: var(--muted); border-radius: 999px;
  height: 42px; width: 42px; cursor: pointer; display: grid; place-items: center;
}
.theme-btn:hover { color: var(--fg); }

/* ---- sections ---- */
section { padding-block: 72px 24px; }
.sec-head { display: grid; gap: 12px; margin-bottom: 32px; max-width: var(--measure); }
.eyebrow {
  font-family: var(--display); font-weight: 600; text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.9rem;
  color: var(--accent-text); display: flex; align-items: center; gap: 12px;
}
.eyebrow .no { font-family: var(--mono); font-size: 0.8rem; letter-spacing: 0; color: var(--muted); }
h2 { font-size: var(--step-3); text-transform: uppercase; letter-spacing: 0.02em; }
h3 { font-size: var(--step-2); }
h4 { font-size: var(--step-1); }
.lede { font-size: var(--step-1); color: var(--fg); line-height: 1.5; }
.prose { display: grid; gap: 14px; max-width: var(--measure); }
.prose p, .muted { color: var(--muted); }
.prose strong { color: var(--fg); font-weight: 600; }
.prose ul { margin: 0; padding-left: 1.2em; display: grid; gap: 6px; color: var(--muted); }

/* the painted rule between sections: a row of 4 in stall lines */
.stalls { height: 30px; margin-top: 40px; opacity: 0.5;
  background-image: repeating-linear-gradient(90deg, var(--line-strong) 0 3px, transparent 3px 54px);
  border-bottom: 3px solid var(--line-strong); }

/* ---- chips ---- */
.chip {
  display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 8px; border-radius: 4px;
  font-family: var(--display); font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.75rem;
  white-space: nowrap; vertical-align: 2px;
}
.chip.real { background: var(--accent); color: var(--on-accent); }
.chip.sim { color: var(--fg); border: 1px solid var(--line-strong);
  background-image: repeating-linear-gradient(-45deg, var(--hatch) 0 3px, transparent 3px 8px); }
.chip.plan { color: var(--muted); border: 1px dashed var(--line-strong); }
.chip.est { color: var(--muted); border: 1px solid var(--line-strong); }
.chip.ok { color: var(--ok); border: 1px solid currentColor; }
.chip.warn { color: var(--warn); border: 1px solid currentColor; }

/* ---- hero ---- */
.hero { padding-block: 48px 8px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: 48px; align-items: start; }
.hero h1 { font-size: var(--step-4); text-transform: uppercase; letter-spacing: 0.01em; line-height: 0.95; }
.hero h1 span { color: var(--accent-text); }
.hero .lede { margin-top: 20px; max-width: 34em; }
.hero .prose { margin-top: 18px; }
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--line);
  border: 1px solid var(--line); border-radius: 10px; overflow: hidden; margin-top: 28px; }
.fact { background: var(--panel); padding: 14px 16px; display: grid; gap: 2px; align-content: start; }
.fact b { font-family: var(--display); font-weight: 600; font-size: 1.9rem; line-height: 1.05; font-variant-numeric: tabular-nums; }
.fact span { color: var(--muted); font-size: var(--step--1); line-height: 1.4; }
.fact .chip { margin-top: 6px; justify-self: start; }
.fact-k { font-style: normal; font-family: var(--display); font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.08em; font-size: 0.8rem; color: var(--accent-text); }
.flow { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; }
.flow li { position: relative; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 18px 16px;
  display: grid; gap: 6px; align-content: start; }
.flow li + li::before { content: ""; position: absolute; left: -13px; top: 50%; width: 8px; height: 8px;
  border-top: 2px solid var(--accent); border-right: 2px solid var(--accent); transform: translateY(-50%) rotate(45deg); }
.flow-n { font-family: var(--mono); font-size: 0.8rem; color: var(--muted); }
.flow h3 { margin: 0; font-family: var(--display); font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; font-size: 1.3rem; }
.flow p { margin: 0; color: var(--muted); font-size: var(--step--1); line-height: 1.45; }
.flow-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; margin: 28px 0 14px; }
.flow-head h3 { font-family: var(--display); font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; font-size: 1.15rem; }
.flow-head p { font-size: var(--step--1); }
.flow-x { gap: 18px; }
.flow-x li { gap: 10px; }
.flow .chip { justify-self: start; }
.flow .flow-sum { color: var(--fg); }
.flow .flow-uses { font-family: var(--mono); font-size: 0.74rem; line-height: 1.5; color: var(--accent-text);
  padding-top: 8px; border-top: 1px solid var(--line); }
.flow ul { list-style: disc; margin: 0; padding-left: 1.05em; display: grid; gap: 6px; color: var(--muted); font-size: var(--step--1); line-height: 1.45; }
.flow ul li { display: list-item; background: none; border: 0; border-radius: 0; padding: 0; }
.flow ul li::before { content: none; }
@media (max-width: 960px) {
  .flow { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .flow li + li::before { left: 50%; top: -14px; transform: translateX(-50%) rotate(135deg); }
}
.note { color: var(--muted); font-size: var(--step--1); line-height: 1.5; }
.proof { list-style: none; margin: 22px 0 0; padding: 0; display: grid; gap: 12px; max-width: 36em; }
.proof li { position: relative; padding-left: 22px; color: var(--muted); line-height: 1.5; }
.proof li::before { content: ""; position: absolute; left: 0; top: 0.3em; width: 4px; height: 1.05em; border-radius: 1px; background: var(--accent); }
.proof b { color: var(--fg); font-weight: 600; }
.prob-more { margin-top: 16px; }
.prob-more:empty { display: none; }

/* ---- the lidar figure ---- */
.figure { background: var(--figure-bg); border-radius: 12px; overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow); }
.figure .stage { position: relative; }
.figure img { display: block; width: 100%; height: auto; }
.figure svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.figure svg polygon { stroke-width: 2.2; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.figure .g-stall polygon { fill: var(--ov-stall); stroke: var(--ov-stall); }
.figure .controls { display: flex; flex-wrap: wrap; gap: 6px; padding: 12px; border-top: 1px solid #26262b; }
.figure figcaption { padding: 0 12px 14px; color: #b9b3a8; font-size: var(--step--1); line-height: 1.5; }
.figure figcaption strong { color: #f4f1ea; font-weight: 600; }
.tog {
  display: inline-flex; align-items: center; gap: 8px; height: 30px; padding: 0 10px; border-radius: 999px;
  border: 1px solid #3a3a40; background: transparent; color: #b9b3a8; cursor: pointer; font: 500 0.8125rem var(--body);
}
.tog i { width: 14px; height: 4px; border-radius: 2px; background: currentColor; }
.tog[aria-pressed="true"] { color: #f4f1ea; border-color: #6a6a70; background: #1c1c22; }
.tog[data-layer="stall"] i { background: var(--ov-stall); }

/* ---- generic cards and grids ---- */
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 20px; display: grid; gap: 10px; align-content: start; min-width: 0; }
.card h3 { font-size: var(--step-1); }
.card p { color: var(--muted); font-size: 0.95rem; }

/* ---- eras strip (before the repo) ---- */
.eras { display: grid; gap: 6px; margin-top: 8px; }
.era { display: grid; grid-template-columns: 9.5rem minmax(0, 1fr); gap: 16px; align-items: start; padding: 12px 0; border-top: 1px solid var(--line); }
.era:first-child { border-top: 0; }
.era .when { font-family: var(--mono); font-size: 0.8rem; color: var(--muted); padding-top: 3px; }
.era h4 { font-size: 1.15rem; text-transform: uppercase; letter-spacing: 0.03em; }
.era p { color: var(--muted); font-size: 0.95rem; margin-top: 4px; }
.era .why { color: var(--fg); }
.era .why::before { content: "Ended: "; color: var(--muted); }

/* ---- timeline ---- */
.tl-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 18px; }
.fbtn {
  height: 32px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--panel);
  color: var(--muted); cursor: pointer; font: 500 0.85rem var(--body); display: inline-flex; align-items: center; gap: 8px;
}
.fbtn i { width: 10px; height: 10px; border-radius: 50%; background: var(--c, var(--muted)); }
.fbtn[aria-pressed="true"] { color: var(--fg); border-color: var(--fg); background: var(--raised); }
.fbtn.key[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.tl-count { color: var(--muted); font-size: var(--step--1); margin-left: auto; }
.tl { position: relative; display: grid; gap: 0; padding-left: 34px; }
.tl::before { /* the centre line: a broken yellow line, 4 in paint and gaps */
  content: ""; position: absolute; left: 11px; top: 6px; bottom: 6px; width: 3px;
  background-image: repeating-linear-gradient(180deg, var(--accent) 0 18px, transparent 18px 34px); opacity: 0.85; }
.tl-month { font-family: var(--display); font-weight: 700; text-transform: uppercase; letter-spacing: 0.12em; color: var(--fg);
  font-size: 1rem; padding: 22px 0 8px; position: relative; }
.tl-month::before { content: ""; position: absolute; left: -31px; top: 27px; width: 17px; height: 9px; border-radius: 2px; background: var(--bg); border: 2px solid var(--accent); }
.ev { position: relative; display: grid; grid-template-columns: 6.2rem minmax(0, 1fr); gap: 14px; padding: 10px 0; border-top: 1px solid var(--line); }
.ev::before { content: ""; position: absolute; left: -27px; top: 17px; width: 9px; height: 9px; border-radius: 50%; background: var(--c, var(--muted)); box-shadow: 0 0 0 3px var(--bg); }
.ev.key::before { width: 13px; height: 13px; left: -29px; top: 15px; border-radius: 2px; transform: rotate(45deg); background: var(--accent); }
.ev .d { font-family: var(--mono); font-size: 0.8rem; color: var(--muted); padding-top: 3px; white-space: nowrap; }
.ev .t { font-weight: 600; color: var(--fg); }
.ev.key .t { color: var(--accent-text); }
.ev .x { color: var(--muted); font-size: 0.93rem; margin-top: 2px; }
.ev .meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; align-items: center; }
.tag { font-family: var(--mono); font-size: 0.72rem; color: var(--muted); border: 1px solid var(--line); border-radius: 4px; padding: 1px 6px; }
.track { font-family: var(--display); font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.72rem; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.track::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--c, var(--muted)); }

/* ---- figures: swimlane, charts, tooltip, diagram ---- */
.viz { position: relative; margin: 0 0 28px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 16px 16px 12px; }
.viz figcaption { color: var(--muted); font-size: var(--step--1); line-height: 1.5; margin-top: 8px; }
.viz figcaption strong { color: var(--fg); font-weight: 600; }
.viz-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 16px; align-items: baseline; margin-bottom: 8px; }
.viz-head h3 { font-size: 1.15rem; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; color: var(--muted); font-size: var(--step--1); }
.legend span { display: inline-flex; align-items: center; gap: 8px; }
.legend i { width: 16px; height: 2px; border-radius: 1px; background: var(--k); }
.legend i.dot { width: 9px; height: 9px; border-radius: 50%; }
.legend i.hollow { width: 9px; height: 9px; border-radius: 50%; background: transparent; border: 2px solid var(--muted); }
.sw-scroll, .dia-scroll { overflow-x: auto; }
.sw-scroll svg { display: block; width: 100%; min-width: 760px; height: auto; }
.dia-scroll svg { display: block; width: 100%; min-width: 820px; height: auto; }
.sw-grid { stroke: var(--line); stroke-width: 1; }
.sw-lane { stroke: var(--line-strong); stroke-width: 1; }
.sw-tick { fill: var(--muted); font: 500 11px var(--mono); }
.sw-today { stroke: var(--accent); stroke-width: 1.5; }
.sw-today-t { fill: var(--accent-text); font: 600 11px var(--mono); }
.sw-name { fill: var(--fg); font: 600 13px var(--display); text-transform: uppercase; letter-spacing: 0.06em; }
.sw-mark { cursor: default; outline: none; }
.sw-hit { fill: transparent; }
.sw-dot { fill: var(--c); stroke: var(--panel); stroke-width: 2; }
.sw-mark.planned .sw-dot { fill: var(--panel); stroke: var(--c); stroke-width: 2; }
.sw-mark:hover .sw-dot, .sw-mark:focus-visible .sw-dot { stroke: var(--fg); }
.sw-label { fill: var(--muted); font: 500 11px var(--body); }
.viz-grid-wrap { display: grid; grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr)); gap: 12px 20px; }
.viz-panel svg { display: block; width: 100%; height: auto; overflow: visible; }
.viz-title { fill: var(--fg); font: 600 13px var(--body); }
.viz-unit { fill: var(--muted); font: 400 11px var(--body); }
.viz-tick { fill: var(--muted); font: 400 11px var(--mono); }
.viz-end { fill: var(--muted); font: 500 11px var(--mono); }
.viz-grid { stroke: var(--line); stroke-width: 1; }
.viz-base { stroke: var(--line-strong); stroke-width: 1; }
.viz-cross { stroke: var(--muted); stroke-width: 1; }
.viz-line { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.viz-dot { stroke: var(--panel); stroke-width: 2; }
.viz-hitarea { fill: transparent; outline: none; }
.viz-hitarea:focus-visible { stroke: var(--accent); stroke-width: 1; }
.viz-tip {
  position: absolute; z-index: 5; pointer-events: none; background: var(--raised); border: 1px solid var(--line-strong);
  border-radius: 8px; padding: 8px 10px; box-shadow: var(--shadow); font-size: 0.8rem; max-width: 280px; display: grid; gap: 4px;
}
.viz-tip-h { color: var(--muted); font: 500 0.72rem var(--mono); }
.viz-tip-r { display: flex; align-items: baseline; gap: 8px; }
.viz-tip-r i { width: 12px; height: 2px; border-radius: 1px; flex: none; align-self: center; }
.viz-tip-r b { color: var(--fg); font-weight: 600; white-space: nowrap; }
.viz-tip-r span { color: var(--muted); }
details.viz-table { margin-top: 10px; }
details.viz-table summary { cursor: pointer; color: var(--accent-text); font-size: var(--step--1); }
details.viz-table .tbl-wrap { margin-top: 8px; }
.dia-box { fill: currentColor; fill-opacity: 0.045; stroke: currentColor; stroke-opacity: 0.45; stroke-width: 1.2; }
.dia-box.plan { stroke-dasharray: 5 4; fill-opacity: 0; }
.dia-band { fill: currentColor; fill-opacity: 0.025; }
.dia-t { fill: currentColor; font: 600 13px var(--body); }
.dia-s { fill: currentColor; fill-opacity: 0.7; font: 400 11px var(--body); }
.dia-lane { fill: currentColor; fill-opacity: 0.6; font: 700 12px var(--display); letter-spacing: 0.12em; }
.dia-arrow { fill: none; stroke: currentColor; stroke-opacity: 0.55; stroke-width: 1.4; }
.dia-arrow.plan { stroke-dasharray: 5 4; }
.dia-arrow.hot { stroke: var(--accent-text); stroke-opacity: 1; stroke-width: 2.2; }
.dia-lbl { fill: currentColor; fill-opacity: 0.75; font: 500 11px var(--body); }
.dia-lbl.hot { fill: var(--accent-text); fill-opacity: 1; font-weight: 600; }
.dia-head { fill: currentColor; fill-opacity: 0.55; }
.dia-head.hot { fill: var(--accent-text); fill-opacity: 1; }
.swap { display: flex; gap: 6px; padding: 10px 12px 0; flex-wrap: wrap; }

/* ---- tables ---- */
.tbl-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
table { border-collapse: collapse; width: 100%; font-size: 0.92rem; }
th, td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
th { font-family: var(--display); font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.78rem; color: var(--muted); background: var(--raised); white-space: nowrap; }
td.n, th.n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
td .src { display: block; font-family: var(--mono); font-size: 0.72rem; color: var(--muted); margin-top: 2px; }
td.big { font-family: var(--display); font-size: 1.15rem; font-weight: 600; white-space: nowrap; }

/* ---- products ---- */
.prod-tabs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin-bottom: 20px; border-bottom: 1px solid var(--line); }
.prod-tabs::-webkit-scrollbar { display: none; }
.ptab {
  font-family: var(--display); font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; font-size: 1rem;
  background: none; border: 0; border-bottom: 3px solid transparent; color: var(--muted); padding: 10px 12px; cursor: pointer; white-space: nowrap;
}
.ptab[aria-selected="true"] { color: var(--fg); border-bottom-color: var(--accent); }
.prod { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; align-items: start; }
.prod .prose { max-width: none; }
.shots { display: grid; gap: 12px; }
.shot { margin: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--panel); }
.shot img { display: block; width: 100%; height: auto; }
.shot figcaption { padding: 8px 12px 10px; color: var(--muted); font-size: var(--step--1); display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.versions { margin-top: 6px; }

/* ---- training data: render beside mask ---- */
.labels { display: grid; gap: 22px; margin-top: 28px; }
.lbl { margin: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--panel); }
.lbl-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px; background: var(--line); }
.lbl-pair a { position: relative; display: block; }
.lbl-pair img { display: block; width: 100%; height: auto; }
.lbl-tag { position: absolute; left: 8px; top: 8px; font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.04em;
  color: #f4f1ea; background: rgba(15, 15, 14, 0.72); padding: 2px 7px; border-radius: 4px; }
.lbl figcaption { padding: 12px 14px 14px; display: grid; gap: 10px; }
.lbl figcaption p { margin: 0; color: var(--muted); font-size: var(--step--1); line-height: 1.5; }
.lbl figcaption strong { color: var(--fg); font-weight: 600; }
.legend i.sw { width: 12px; height: 12px; border-radius: 3px; box-shadow: inset 0 0 0 1px rgba(128, 128, 128, 0.45); }
.lbl-key { gap: 6px 14px; font-size: 0.8rem; }
.lbl-credit { margin-top: 16px; }
@media (max-width: 600px) { .lbl-pair { grid-template-columns: minmax(0, 1fr); } }

/* ---- problems ---- */
.prob-tools { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.probs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.prob { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 18px 20px; display: grid; gap: 10px; align-content: start; min-width: 0; }
.prob header { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.prob h3 { font-size: 1.2rem; }
.prob dl { margin: 0; display: grid; gap: 8px; }
.prob dt { font-family: var(--display); font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; font-size: 0.72rem; color: var(--muted); }
.prob dd { margin: 0; color: var(--fg); font-size: 0.93rem; }
.prob .refs { font-family: var(--mono); font-size: 0.72rem; color: var(--muted); }

/* ---- schedule / milestones ---- */
.path { display: grid; gap: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.step { display: grid; grid-template-columns: 7.5rem minmax(0, 1fr) auto; gap: 16px; padding: 14px 18px; background: var(--panel); border-top: 1px solid var(--line); align-items: start; }
.step:first-child { border-top: 0; }
.step .d { font-family: var(--mono); font-size: 0.82rem; color: var(--muted); padding-top: 2px; }
.step .t { font-weight: 600; }
.step .x { color: var(--muted); font-size: 0.92rem; }
.step.done .t { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--line-strong); }
.step.next { background: var(--accent-tint); }
.ladder { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.rung { border: 1px solid var(--line); border-radius: 8px; padding: 12px; background: var(--panel); display: grid; gap: 6px; align-content: start; min-width: 0; }
.rung b { font-family: var(--display); font-size: 1.4rem; }
.rung .chip { justify-self: start; }
.rung p { color: var(--muted); font-size: 0.84rem; line-height: 1.4; }
.rung.prog { border-color: var(--accent); }

/* ---- costs ---- */
.bars { display: grid; gap: 14px; }
.bar { display: grid; grid-template-columns: 11rem minmax(0, 1fr) 6.5rem; gap: 14px; align-items: center; }
.bar .lbl { font-weight: 600; font-size: 0.95rem; }
.bar .lbl small { display: block; font-weight: 400; color: var(--muted); font-size: 0.8rem; }
.bar .track-bg { height: 14px; background: var(--raised); border-radius: 3px; position: relative; overflow: hidden; }
.bar .fill { position: absolute; inset: 0 auto 0 0; background: var(--accent); border-radius: 3px; }
.bar .fill.planned { background-image: repeating-linear-gradient(-45deg, var(--hatch) 0 3px, transparent 3px 8px); background-color: transparent; border: 1px solid var(--line-strong); }
.bar .v { text-align: right; font-family: var(--display); font-weight: 600; font-size: 1.15rem; font-variant-numeric: tabular-nums; }

/* ---- build (details) ---- */
details.build { border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
details.build + details.build { margin-top: 12px; }
details.build summary { cursor: pointer; padding: 16px 20px; list-style: none; display: flex; justify-content: space-between; gap: 12px; align-items: center; }
details.build summary::-webkit-details-marker { display: none; }
details.build summary h3 { font-size: 1.25rem; }
details.build summary .muted { font-size: 0.85rem; }
details.build summary::after { content: "+"; font-family: var(--display); font-size: 1.6rem; color: var(--accent-text); line-height: 1; }
details.build[open] summary::after { content: "\2212"; }
details.build .body { padding: 0 20px 20px; display: grid; gap: 18px; }
ol.steps { margin: 0; padding: 0; list-style: none; counter-reset: s; display: grid; gap: 10px; }
ol.steps li { counter-increment: s; display: grid; grid-template-columns: 2rem minmax(0, 1fr); gap: 10px; color: var(--muted); font-size: 0.95rem; }
ol.steps li::before { content: counter(s); font-family: var(--display); font-weight: 700; color: var(--on-accent); background: var(--accent); border-radius: 4px; height: 1.6rem; display: grid; place-items: center; font-size: 0.95rem; }
ol.steps li strong { color: var(--fg); font-weight: 600; }

/* ---- method ---- */
.method { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.method .fact { padding: 18px; }


/* ---- responsive ---- */
@media (max-width: 960px) {
  .hero-grid, .prod, .grid2 { grid-template-columns: minmax(0, 1fr); }
  .grid3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ladder { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .method { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .probs { grid-template-columns: minmax(0, 1fr); }
  .viz-grid-wrap { grid-template-columns: minmax(0, 1fr); }
  .viz-panel { max-width: 480px; }
}
@media (max-width: 600px) {
  .viz-grid-wrap { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 600px) {
  section { padding-block: 52px 16px; }
  .grid3 { grid-template-columns: minmax(0, 1fr); }
  .ladder { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .era { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .ev { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .step { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .bar { grid-template-columns: minmax(0, 1fr) auto; }
  .bar .track-bg { grid-column: 1 / -1; grid-row: 2; }
  .brand .word { display: none; }
  .prod-tabs { flex-wrap: wrap; overflow-x: visible; }
  .ptab { padding: 8px 10px; font-size: 0.95rem; }
  .nav .wrap { gap: 10px; }
}

/* ---- the way to the takeoff page ---- */
.navlinks a.nav-try { color: var(--accent-text); }
@media (max-width: 480px) {
  .nav .wrap { min-height: 64px; }
  .brand .mark { width: 26px; height: 26px; }
  .navlinks a { padding: 8px 8px; letter-spacing: 0.05em; font-size: 1rem; }
  .theme-btn { height: 38px; width: 38px; }
  .nav-try .nt-long { display: none; }
}
.try-cta { margin-top: 22px; display: grid; gap: 6px; justify-items: start; max-width: 36em; }
.try-cta a {
  display: inline-flex; align-items: center; gap: 10px; padding: 11px 16px; border-radius: 8px; text-decoration: none;
  background: var(--accent); color: var(--on-accent); font-family: var(--display); font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.06em; font-size: 1.05rem;
}
.try-cta a:hover { filter: brightness(1.06); }
.try-cta small { color: var(--muted); font-size: var(--step--1); }

/* ---- pages: the nav marks the page you are on ---- */
.navlinks a[aria-current="page"] { color: var(--fg); background: var(--raised); }
.contact { color: var(--muted); font-size: var(--step--1); overflow-wrap: anywhere; }
.card-link { text-decoration: none; color: inherit; transition: border-color 0.15s; }
.card-link:hover { border-color: var(--accent); }
.card-link h3 { color: var(--accent-text); }

/* ---- the story: one row a role, the date on a rail at the left, what the project did meanwhile beneath it ---- */
.career { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; max-width: 960px; }
.cr { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 24px; position: relative; padding-bottom: 32px; }
.cr::before { content: ""; position: absolute; left: 201px; top: 8px; bottom: 0; width: 2px; background: var(--line-strong); }
.cr:last-child::before { bottom: 32px; }
.cr::after { content: ""; position: absolute; left: 196px; top: 6px; width: 12px; height: 12px; border-radius: 2px; background: var(--accent); }
.cr-when { font-family: var(--mono); font-size: var(--step--1); color: var(--muted); text-align: right; padding-top: 2px; }
.cr-body { padding-left: 24px; display: grid; gap: 8px; max-width: var(--measure); }
.cr-body h3 { font-size: var(--step-1); }
.cr-where { color: var(--muted); font-size: 0.95rem; margin-top: -6px; }
.cr-body > p { color: var(--muted); }
.cr-gave { border-left: 3px solid var(--accent); padding: 6px 0 6px 12px; background: var(--accent-tint); border-radius: 0 6px 6px 0; }
.cr-gave b { color: var(--fg); font-weight: 600; }
.cr-proj { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 6px; }
.cr-proj li { color: var(--muted); font-size: 0.95rem; line-height: 1.45; display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 10px; }
.cr-proj li > span { font-family: var(--mono); font-size: var(--step--1); color: var(--accent-text); padding-top: 2px; }
@media (max-width: 600px) {
  .cr { grid-template-columns: minmax(0, 1fr); gap: 6px; padding-left: 22px; }
  .cr::before { left: 5px; }
  .cr::after { left: 0; }
  .cr-when { text-align: left; }
  .cr-body { padding-left: 0; }
  .cr-proj li { grid-template-columns: minmax(0, 1fr); gap: 0; }
}

/* ---- figures inside a dated list, and the calibration cards ---- */
.cr-fig { margin: 4px 0 0; max-width: 420px; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: #2a2a2a; }
.cr-fig img { display: block; width: 100%; height: auto; }
.cal { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; counter-reset: cal; }
.cal > li { counter-increment: cal; position: relative; padding-top: 44px; }
.cal > li::before { content: counter(cal, decimal-leading-zero); position: absolute; top: 16px; left: 20px; font-family: var(--mono); font-size: var(--step--1); color: var(--accent-text); }
.steps-s { margin: 0; padding-left: 1.2em; display: grid; gap: 4px; color: var(--muted); font-size: 0.95rem; }
.cal-r { color: var(--fg) !important; border-left: 3px solid var(--accent); padding-left: 10px; }
.cal .cr-fig { max-width: 260px; }
@media (max-width: 960px) { .cal { grid-template-columns: minmax(0, 1fr); } }

/* ---- the Story's problem and the demo band ---- */
.hero .lede b { color: var(--accent-text); font-weight: 600; }
.demo-band { align-items: center; gap: 32px; }
.demo-shot img { display: block; width: 100%; height: auto; border: 1px solid var(--line); border-radius: 10px; }
.demo-shot:hover img { border-color: var(--accent); }

/* ---- 3D viewers (viewer3d.js): a stage for the canvas, a bar of buttons and the tapped part's name ---- */
.v3d { --v3d-bg: var(--panel); border: 1px solid var(--line); border-radius: 10px; background: var(--panel); overflow: hidden; }
.v3d-stage { position: relative; height: min(68vh, 560px); }
.v3d-stage canvas { display: block; width: 100%; height: 100%; touch-action: none; }
.v3d:not(.ready) .v3d-stage::after { content: "Loading the 3D model…"; position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); font-size: var(--step--1); }
.v3d.failed .v3d-stage::after { content: ""; }
.v3d-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 10px 12px; border-top: 1px solid var(--line); }
.v3d-label { margin-left: auto; color: var(--muted); font-size: var(--step--1); }
.v3d-pod .v3d-stage { height: 340px; }
.pods3d { gap: 16px; }
@media (max-width: 600px) { .v3d-stage { height: 420px; } .v3d-label { margin-left: 0; flex-basis: 100%; } }

/* ---- the assembly guide's pages ---- */
.guide { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.guide-page { display: grid; gap: 6px; text-decoration: none; color: var(--muted); font-size: var(--step--1); }
.guide-page img { display: block; width: 100%; height: auto; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.guide-page:hover img { border-color: var(--accent); }

/* ---- images and PDFs opened over the page ---- */
html.lb-open { overflow: hidden; }
.lb { position: fixed; inset: 0; z-index: 1000; background: #0d0d0c; display: grid; grid-template-rows: auto minmax(0, 1fr); color: #f4f1ea; }
.lb[hidden] { display: none; }
.lb-bar { display: flex; align-items: center; gap: 14px; padding: 10px 16px; border-bottom: 1px solid #2f2f2c; min-width: 0; }
.lb-back {
  font-family: var(--display); font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; font-size: 1.05rem;
  background: var(--accent); color: var(--on-accent); border: 0; border-radius: 8px; padding: 10px 16px; cursor: pointer; flex: none;
}
.lb-cap { margin: 0; flex: 1 1 auto; min-width: 0; color: #d9d4ca; font-size: var(--step--1); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-count { font-family: var(--mono); font-size: 0.8rem; color: #a8a297; flex: none; }
.lb-dl { color: #f4c842; font-size: var(--step--1); flex: none; }
.lb-dl[hidden] { display: none; }
.lb-body { display: grid; place-items: center; padding: 16px; min-height: 0; overflow: auto; }
.lb-img { display: block; max-width: 100%; max-height: calc(100vh - 110px); object-fit: contain; border-radius: 6px; background: #1b1b1a; }
.lb-pdf { width: min(1200px, 100%); height: 100%; min-height: 60vh; border: 0; border-radius: 6px; background: #fff; }
.lb-nav {
  position: fixed; top: 50%; transform: translateY(-50%); width: 48px; height: 64px; border: 1px solid #3a3a36; border-radius: 10px;
  background: rgb(27 27 26 / 0.85); color: #f4f1ea; font-size: 2rem; line-height: 1; cursor: pointer;
}
.lb-prev { left: 12px; }
.lb-next { right: 12px; }
.lb-nav[hidden] { display: none; }
@media (max-width: 600px) {
  .lb-bar { gap: 10px; padding: 8px 12px; }
  .lb-back { font-size: 0.95rem; padding: 9px 12px; }
  .lb-body { padding: 8px; }
  .lb-nav { top: auto; bottom: 14px; transform: none; width: 52px; height: 48px; }
}

/* ---- the one-minute video (Story and /video) ---- */
.vid { margin: 24px 0 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #000; box-shadow: var(--shadow);
  max-width: min(100%, max(640px, calc((100vh - var(--vid-top, 200px)) * 16 / 9))); }
.vid video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; background: #000; }
