/* ==== base:begin ==========================================================
 * 02AI Workbench design system: tokens, reset and shared primitives.
 *
 * Canonical copy. This file is NOT served: every page stylesheet
 * (web/studio/style.css, web/admin/style.css, web/auth/style.css) starts with a
 * verbatim copy of everything between the base:begin and base:end markers, so
 * each page stays one same-origin stylesheet (CSP style-src 'self', and the
 * sign-in page is served before the sign-in gate). tests/frontend-base.test.ts
 * fails when a copy drifts. Edit here, then paste into all three.
 *
 * Rules the browser code follows (tests/server.test.ts, admin-routes.test.ts):
 * no inline styles and no `.style.` from script. Dynamic visuals use classes,
 * SVG attributes, <progress>/<meter> or data-* attributes.
 * ======================================================================== */

:root {
  color-scheme: light;
  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI Variable Text", "Segoe UI", Inter, Roboto,
    "Helvetica Neue", Arial, sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI Variable Display", "Segoe UI", Inter,
    Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-serif: "Iowan Old Style", Charter, "Source Serif 4", "Source Serif Pro", "Palatino Linotype", Georgia, serif;
  --font-mono: ui-monospace, "SF Mono", SFMono-Regular, "JetBrains Mono", "Cascadia Code", Menlo, Consolas, monospace;

  --fs-2xs: 10.5px;
  --fs-xs: 11.5px;
  --fs-sm: 12.5px;
  --fs-base: 13.5px;
  --fs-md: 15px;
  --fs-lg: 17px;
  --fs-xl: 20px;
  --fs-2xl: 26px;
  --fs-3xl: 34px;
  --lh-tight: 1.25;
  --lh-base: 1.5;
  --lh-prose: 1.65;

  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 20px;
  --s-6: 24px;
  --s-8: 32px;
  --s-10: 40px;
  --s-12: 48px;

  --r-xs: 4px;
  --r-sm: 6px;
  --r-md: 8px;
  --r-lg: 12px;
  --r-xl: 16px;
  --r-full: 999px;

  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --dur-fast: 120ms;
  --dur: 180ms;
  --dur-slow: 280ms;

  /* Light theme (default). */
  --bg: #fafafb;
  --bg-sunken: #f4f4f6;
  --surface: #ffffff;
  --surface-2: #f7f7f9;
  --surface-3: #efeff3;
  --overlay: rgba(14, 14, 22, 0.32);
  --border: #e8e8ed;
  --border-strong: #d7d7df;
  --text: #17171f;
  --text-2: #4b4b59;
  --text-3: #6b6b78;
  --text-inverse: #ffffff;

  --accent: #5b4cdb;
  --accent-hover: #4c3ec6;
  --accent-text: #4b3dc0;
  --accent-soft: #f2f0fd;
  --accent-soft-2: #e7e3fb;
  --accent-border: #d6d0f6;
  --accent-solid: #5b4cdb;
  --accent-solid-hover: #4c3ec6;

  --success: #16794c;
  --success-soft: #eaf6ef;
  --success-border: #c5e5d3;
  --warning: #93590a;
  --warning-soft: #fcf4e4;
  --warning-border: #efd9ac;
  --danger: #c0352c;
  --danger-hover: #a82c24;
  --danger-soft: #fdeeec;
  --danger-border: #f3c9c4;
  --info: #2a62c4;
  --info-soft: #ecf2fd;
  --info-border: #c9daf7;

  --chart-1: #5b4cdb;
  --chart-2: #0e9384;
  --chart-3: #dc8a1c;
  --chart-4: #d4466c;
  --chart-5: #3878e0;
  --chart-6: #8b8b99;
  --chart-grid: #ececf1;

  --shadow-xs: 0 1px 2px rgba(17, 17, 32, 0.04);
  --shadow-sm: 0 1px 2px rgba(17, 17, 32, 0.05), 0 1px 3px rgba(17, 17, 32, 0.05);
  --shadow-md: 0 1px 2px rgba(17, 17, 32, 0.04), 0 6px 16px -4px rgba(17, 17, 32, 0.1);
  --shadow-lg: 0 2px 6px rgba(17, 17, 32, 0.05), 0 22px 48px -12px rgba(17, 17, 32, 0.22);
  --ring: 0 0 0 3px rgba(91, 76, 219, 0.24);
  --scrollbar: #d4d4dc;
}

/* Dark theme: follows the system unless the page set data-theme="light". */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0f0f13;
    --bg-sunken: #0b0b0e;
    --surface: #16161c;
    --surface-2: #1c1c24;
    --surface-3: #25252f;
    --overlay: rgba(0, 0, 0, 0.55);
    --border: #282832;
    --border-strong: #383844;
    --text: #ededf2;
    --text-2: #b7b7c3;
    --text-3: #8e8e9c;
    --text-inverse: #101015;
    --accent: #8f84f6;
    --accent-hover: #a198f8;
    --accent-text: #aca4f9;
    --accent-soft: rgba(143, 132, 246, 0.13);
    --accent-soft-2: rgba(143, 132, 246, 0.2);
    --accent-border: rgba(143, 132, 246, 0.36);
    --accent-solid: #6656e0;
    --accent-solid-hover: #5a4ad6;
    --success: #4cc48c;
    --success-soft: rgba(76, 196, 140, 0.12);
    --success-border: rgba(76, 196, 140, 0.32);
    --warning: #e2a543;
    --warning-soft: rgba(226, 165, 67, 0.12);
    --warning-border: rgba(226, 165, 67, 0.32);
    --danger: #f0716a;
    --danger-hover: #f48a84;
    --danger-soft: rgba(240, 113, 106, 0.12);
    --danger-border: rgba(240, 113, 106, 0.34);
    --info: #6ea0f2;
    --info-soft: rgba(110, 160, 242, 0.12);
    --info-border: rgba(110, 160, 242, 0.32);
    --chart-1: #8f84f6;
    --chart-2: #2cc2ae;
    --chart-3: #eba443;
    --chart-4: #ef6f92;
    --chart-5: #6ea0f2;
    --chart-6: #8a8a98;
    --chart-grid: #26262f;
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.35), 0 1px 3px rgba(0, 0, 0, 0.25);
    --shadow-md: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 20px -6px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 2px 6px rgba(0, 0, 0, 0.35), 0 24px 56px -12px rgba(0, 0, 0, 0.7);
    --ring: 0 0 0 3px rgba(143, 132, 246, 0.32);
    --scrollbar: #3a3a46;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0f0f13;
  --bg-sunken: #0b0b0e;
  --surface: #16161c;
  --surface-2: #1c1c24;
  --surface-3: #25252f;
  --overlay: rgba(0, 0, 0, 0.55);
  --border: #282832;
  --border-strong: #383844;
  --text: #ededf2;
  --text-2: #b7b7c3;
  --text-3: #8e8e9c;
  --text-inverse: #101015;
  --accent: #8f84f6;
  --accent-hover: #a198f8;
  --accent-text: #aca4f9;
  --accent-soft: rgba(143, 132, 246, 0.13);
  --accent-soft-2: rgba(143, 132, 246, 0.2);
  --accent-border: rgba(143, 132, 246, 0.36);
  --accent-solid: #6656e0;
  --accent-solid-hover: #5a4ad6;
  --success: #4cc48c;
  --success-soft: rgba(76, 196, 140, 0.12);
  --success-border: rgba(76, 196, 140, 0.32);
  --warning: #e2a543;
  --warning-soft: rgba(226, 165, 67, 0.12);
  --warning-border: rgba(226, 165, 67, 0.32);
  --danger: #f0716a;
  --danger-hover: #f48a84;
  --danger-soft: rgba(240, 113, 106, 0.12);
  --danger-border: rgba(240, 113, 106, 0.34);
  --info: #6ea0f2;
  --info-soft: rgba(110, 160, 242, 0.12);
  --info-border: rgba(110, 160, 242, 0.32);
  --chart-1: #8f84f6;
  --chart-2: #2cc2ae;
  --chart-3: #eba443;
  --chart-4: #ef6f92;
  --chart-5: #6ea0f2;
  --chart-6: #8a8a98;
  --chart-grid: #26262f;
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.35), 0 1px 3px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 20px -6px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 2px 6px rgba(0, 0, 0, 0.35), 0 24px 56px -12px rgba(0, 0, 0, 0.7);
  --ring: 0 0 0 3px rgba(143, 132, 246, 0.32);
  --scrollbar: #3a3a46;
}

/* ---- Reset ------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  line-height: var(--lh-base);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
h1,
h2,
h3,
h4,
p,
ul,
ol,
figure,
dl,
dd {
  margin: 0;
}
h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: var(--lh-tight);
}
img,
svg {
  display: block;
  max-width: 100%;
}
button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
  letter-spacing: inherit;
}
a {
  color: var(--accent-text);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
}
code,
kbd,
pre,
samp {
  font-family: var(--font-mono);
  font-size: 0.92em;
}
::selection {
  background: var(--accent-soft-2);
}
* {
  scrollbar-width: thin;
  scrollbar-color: var(--scrollbar) transparent;
}
:focus {
  outline: none;
}
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--r-xs);
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---- Accessibility helpers -------------------------------------------- */
/* !important: it must beat element rules such as input[type="email"] { width: 100% }. */
.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  min-height: 0 !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
  box-shadow: none !important;
}
.skip-link {
  position: fixed;
  top: -80px;
  left: var(--s-4);
  z-index: 100;
  padding: var(--s-2) var(--s-3);
  border-radius: var(--r-md);
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-md);
  font-weight: 500;
}
.skip-link:focus {
  top: var(--s-3);
}

/* ---- Icons (inline <svg><use href="#i-…"></svg>, sprite in each page) ---- */
.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}
.icon {
  width: 16px;
  height: 16px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.icon-sm {
  width: 14px;
  height: 14px;
}
.icon-lg {
  width: 20px;
  height: 20px;
}

/* ---- Buttons ------------------------------------------------------------
 * <button> is a quiet secondary button by default; .primary, .danger, .ghost,
 * .small and .icon-button modify it. Links styled as buttons use .button.
 */
button,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface);
  color: var(--text);
  font-size: var(--fs-base);
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  box-shadow: var(--shadow-xs);
  transition:
    background var(--dur-fast) var(--ease),
    border-color var(--dur-fast) var(--ease),
    color var(--dur-fast) var(--ease),
    box-shadow var(--dur-fast) var(--ease);
  -webkit-tap-highlight-color: transparent;
}
button:hover:not(:disabled),
.button:hover {
  background: var(--surface-2);
  border-color: var(--border-strong);
  text-decoration: none;
}
button:active:not(:disabled) {
  background: var(--surface-3);
}
button:focus-visible,
.button:focus-visible {
  outline: none;
  box-shadow: var(--ring);
  border-color: var(--accent);
}
button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
button.primary,
.button.primary {
  background: var(--accent-solid);
  border-color: var(--accent-solid);
  color: #fff;
  box-shadow: var(--shadow-sm);
}
button.primary:hover:not(:disabled),
.button.primary:hover {
  background: var(--accent-solid-hover);
  border-color: var(--accent-solid-hover);
}
button.danger,
.button.danger {
  color: var(--danger);
  border-color: var(--danger-border);
  background: var(--surface);
}
button.danger:hover:not(:disabled) {
  background: var(--danger-soft);
  border-color: var(--danger);
}
button.danger-solid {
  background: var(--danger);
  border-color: var(--danger);
  color: #fff;
}
button.danger-solid:hover:not(:disabled) {
  background: var(--danger-hover);
  border-color: var(--danger-hover);
}
button.ghost,
.button.ghost {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
  color: var(--text-2);
}
button.ghost:hover:not(:disabled),
.button.ghost:hover {
  background: var(--surface-3);
  border-color: transparent;
  color: var(--text);
}
button.small,
.button.small {
  min-height: 26px;
  padding: 0 9px;
  font-size: var(--fs-sm);
  border-radius: var(--r-sm);
}
button.icon-button,
.icon-button {
  width: 32px;
  min-width: 32px;
  padding: 0;
  background: transparent;
  border-color: transparent;
  box-shadow: none;
  color: var(--text-3);
}
button.icon-button:hover:not(:disabled) {
  background: var(--surface-3);
  border-color: transparent;
  color: var(--text);
}
button.icon-button.small {
  width: 26px;
  min-width: 26px;
}

/* ---- Form controls ----------------------------------------------------- */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
input[type="date"],
input[type="number"],
input[type="url"],
select,
textarea {
  width: 100%;
  min-height: 36px;
  padding: 7px 11px;
  border: 1px solid var(--border-strong);
  border-radius: var(--r-md);
  background: var(--surface);
  color: var(--text);
  font-size: var(--fs-base);
  line-height: var(--lh-base);
  box-shadow: var(--shadow-xs);
  transition:
    border-color var(--dur-fast) var(--ease),
    box-shadow var(--dur-fast) var(--ease);
}
input::placeholder,
textarea::placeholder {
  color: var(--text-3);
}
input:hover,
select:hover,
textarea:hover {
  border-color: var(--text-3);
}
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: var(--ring);
}
input[type="radio"],
input[type="checkbox"] {
  accent-color: var(--accent);
}
label {
  font-weight: 500;
}

/* ---- Pills, badges, status dots --------------------------------------- */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 22px;
  padding: 0 8px;
  border: 1px solid var(--border);
  border-radius: var(--r-full);
  background: var(--surface-2);
  color: var(--text-2);
  font-size: var(--fs-xs);
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
}
.dot {
  width: 7px;
  height: 7px;
  flex: none;
  border-radius: 50%;
  background: currentColor;
}
.tone-success {
  color: var(--success);
  background: var(--success-soft);
  border-color: var(--success-border);
}
.tone-warning {
  color: var(--warning);
  background: var(--warning-soft);
  border-color: var(--warning-border);
}
.tone-danger {
  color: var(--danger);
  background: var(--danger-soft);
  border-color: var(--danger-border);
}
.tone-info {
  color: var(--info);
  background: var(--info-soft);
  border-color: var(--info-border);
}
.tone-accent {
  color: var(--accent-text);
  background: var(--accent-soft);
  border-color: var(--accent-border);
}
.tone-neutral {
  color: var(--text-2);
  background: var(--surface-2);
  border-color: var(--border);
}
kbd {
  display: inline-flex;
  align-items: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border: 1px solid var(--border);
  border-bottom-width: 2px;
  border-radius: var(--r-xs);
  background: var(--surface);
  color: var(--text-2);
  font-family: var(--font-sans);
  font-size: var(--fs-2xs);
  font-weight: 500;
}

/* ---- Spinner ----------------------------------------------------------- */
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.35;
  }
}
.spinner {
  width: 14px;
  height: 14px;
  flex: none;
  border: 2px solid var(--accent-soft-2);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* ---- Cards, menus, dialogs -------------------------------------------- */
.card {
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow-xs);
}
.menu {
  min-width: 200px;
  padding: var(--s-1);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
}
.menu-item {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  min-height: 32px;
  padding: 0 10px;
  border: 0;
  border-radius: var(--r-sm);
  background: transparent;
  box-shadow: none;
  color: var(--text);
  font-size: var(--fs-base);
  font-weight: 400;
  text-align: left;
  text-decoration: none;
}
.menu-item:hover:not(:disabled),
a.menu-item:hover {
  background: var(--surface-3);
  text-decoration: none;
}
.menu-item:focus-visible {
  box-shadow: none;
  background: var(--surface-3);
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}
.menu-item .icon {
  color: var(--text-3);
}
.menu-item.danger,
button.menu-item.danger {
  color: var(--danger);
  border: 0;
}
.menu-item.danger .icon {
  color: var(--danger);
}
.menu-sep {
  height: 1px;
  margin: var(--s-1) calc(-1 * var(--s-1));
  background: var(--border);
}
dialog {
  width: min(440px, calc(100vw - 32px));
  padding: var(--s-6);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-lg);
}
dialog::backdrop {
  background: var(--overlay);
  backdrop-filter: blur(2px);
}
dialog[open] {
  animation: dialog-in var(--dur-slow) var(--ease);
}
@keyframes dialog-in {
  from {
    opacity: 0;
    transform: translateY(6px) scale(0.98);
  }
}
dialog h2 {
  font-size: var(--fs-lg);
  margin-bottom: var(--s-2);
}
dialog p {
  color: var(--text-2);
  line-height: var(--lh-base);
}
.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: var(--s-2);
  margin-top: var(--s-6);
}

/* ---- Brand ------------------------------------------------------------- */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.015em;
  text-decoration: none;
  white-space: nowrap;
}
.brand:hover {
  text-decoration: none;
}
.brand-mark {
  width: 26px;
  height: 27px;
  object-fit: contain;
  flex: none;
}
/* ==== base:end ========================================================== */

/* ==== landing: line map ===================================================
 * The public landing page (served at / to signed-out visitors). Overpass and
 * Overpass Mono are self-hosted (SIL OFL, fonts/*-OFL.txt); the page CSP adds
 * font-src 'self'. Colours are --lm-* tokens with a dark set below.
 */
@font-face {
  font-family: "Overpass";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/landing/fonts/overpass-latin-wght-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Overpass Mono";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("/landing/fonts/overpass-mono-latin-wght-normal.woff2") format("woff2");
}

:root {
  --lm-paper: #ffffff;
  --lm-surface: #ffffff;
  --lm-ink: #1b2a41;
  --lm-ink-2: #4a5a72;
  --lm-rail: #dce1e8;
  --lm-hover: #f1f3f7;
  --lm-agent: #5b4cdb;
  --lm-pipe: #00897b;
  --lm-quant: #e3a008;
  --lm-red: #d7263d;
  --lm-btn: #5b4cdb;
  --lm-btn-hover: #4a3cc4;
  --lm-head-bg: #1b2a41;
  --lm-head-fg: #ffffff;
  --lm-head-fg-2: #c4cddb;
  --lm-ref-text: #8a5f00;
  --lm-pipe-text: #00695c;
  --lm-gutter: clamp(16px, 4vw, 56px);
  --lm-rail-x: calc(var(--lm-gutter) + 14px);
  --lm-sans: "Overpass", "Helvetica Neue", Arial, sans-serif;
  --lm-code: "Overpass Mono", ui-monospace, Menlo, monospace;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --lm-paper: #121a28;
    --lm-surface: #172233;
    --lm-ink: #e6ebf3;
    --lm-ink-2: #a9b4c6;
    --lm-rail: #2b374b;
    --lm-hover: #1c2739;
    --lm-agent: #8f84f6;
    --lm-pipe: #2bb3a1;
    --lm-quant: #f0b429;
    --lm-red: #f05a6b;
    --lm-btn: #6656e0;
    --lm-btn-hover: #5a4ad6;
    --lm-head-bg: #22304a;
    --lm-head-fg: #ffffff;
    --lm-head-fg-2: #b5c0d2;
    --lm-ref-text: #f0b429;
    --lm-pipe-text: #2bb3a1;
  }
}
:root[data-theme="dark"] {
  --lm-paper: #121a28;
  --lm-surface: #172233;
  --lm-ink: #e6ebf3;
  --lm-ink-2: #a9b4c6;
  --lm-rail: #2b374b;
  --lm-hover: #1c2739;
  --lm-agent: #8f84f6;
  --lm-pipe: #2bb3a1;
  --lm-quant: #f0b429;
  --lm-red: #f05a6b;
  --lm-btn: #6656e0;
  --lm-btn-hover: #5a4ad6;
  --lm-head-bg: #22304a;
  --lm-head-fg: #ffffff;
  --lm-head-fg-2: #b5c0d2;
  --lm-ref-text: #f0b429;
  --lm-pipe-text: #2bb3a1;
}

body.landing {
  background: var(--lm-paper);
  color: var(--lm-ink);
  font-family: var(--lm-sans);
  font-size: 17px;
  line-height: 1.55;
}
body.landing h1,
body.landing h2,
body.landing h3 {
  font-family: var(--lm-sans);
}
a {
  color: inherit;
}
:focus-visible {
  outline: 3px solid var(--lm-agent);
  outline-offset: 3px;
}

/* ---- Buttons: signage plates ------------------------------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  height: 46px;
  padding: 2px 22px 0;
  border: 2px solid var(--lm-ink);
  border-radius: 23px;
  font-weight: 700;
  font-size: 16px;
  text-decoration: none;
  white-space: nowrap;
}
.btn:hover {
  background: var(--lm-hover);
}
.btn-solid {
  border-color: var(--lm-btn);
  background: var(--lm-btn);
  color: #fff;
}
.btn-solid:hover {
  background: var(--lm-btn-hover);
  border-color: var(--lm-btn-hover);
}

/* ---- Nav ---------------------------------------------------------------- */
.nav {
  display: flex;
  align-items: center;
  gap: 32px;
  padding: 18px var(--lm-gutter);
  border-bottom: 2px solid var(--lm-ink);
}
.brand {
  white-space: nowrap;
  font-weight: 800;
  font-size: 19px;
  text-decoration: none;
}
.nav-links {
  display: flex;
  gap: 24px;
  margin-right: auto;
  font-weight: 600;
  font-size: 15px;
}
.nav-links a {
  text-decoration: none;
}
.nav-links a:hover {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 5px;
}
.nav .btn {
  height: 40px;
}

/* ---- Hero ---------------------------------------------------------------- */
.hero {
  padding: clamp(40px, 7vw, 96px) var(--lm-gutter) 0;
}
.hero-text {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 4fr);
  gap: 56px;
  align-items: end;
  max-width: 1280px;
}
h1 {
  font-size: clamp(44px, 7.4vw, 104px);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.025em;
  text-wrap: balance;
}
.lead {
  max-width: 34em;
  color: var(--lm-ink-2);
  font-size: 18px;
  line-height: 1.6;
}
.ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.map {
  max-width: 1440px;
  margin-top: clamp(40px, 6vw, 72px);
}
.map-scroll {
  overflow-x: auto;
  padding-bottom: 8px;
}
.map-svg {
  display: block;
  width: 100%;
  min-width: 980px;
  height: auto;
}
.ln {
  fill: none;
  stroke-width: 12;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.ln-agent {
  stroke: var(--lm-agent);
}
.ln-pipe {
  stroke: var(--lm-pipe);
}
.ln-quant {
  stroke: var(--lm-quant);
}
.ln-key {
  stroke-width: 10;
}
.st {
  fill: var(--lm-paper);
  stroke: var(--lm-ink);
  stroke-width: 4;
}
.xchg {
  fill: var(--lm-paper);
  stroke: var(--lm-ink);
  stroke-width: 5;
}
.term {
  fill: var(--lm-ink);
}
.lbl {
  fill: var(--lm-ink);
  font-family: var(--lm-sans);
  font-size: 15px;
  font-weight: 600;
}
.lbl-strong {
  font-weight: 800;
}
.key {
  fill: var(--lm-ink-2);
  font-family: var(--lm-sans);
  font-size: 14px;
  font-weight: 500;
}

/* ---- Stops: sections hung on a single rail ------------------------------ */
.stop {
  position: relative;
  padding: clamp(56px, 8vw, 112px) var(--lm-gutter) clamp(56px, 8vw, 112px) calc(var(--lm-rail-x) + 56px);
}
.stop::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--lm-rail-x);
  width: 12px;
  margin-left: -6px;
  background: var(--lm-agent);
}
.hero + .stop::before {
  top: calc(clamp(56px, 8vw, 112px) - 40px);
  border-radius: 6px 6px 0 0;
}
.stop-head {
  position: relative;
  max-width: 820px;
}
.stop-head::before {
  content: "";
  position: absolute;
  top: 0.12em;
  left: calc(-56px - 18px);
  width: 36px;
  height: 36px;
  border: 5px solid var(--lm-ink);
  border-radius: 50%;
  background: var(--lm-paper);
  box-sizing: border-box;
}
h2 {
  font-size: clamp(30px, 3.8vw, 48px);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.stop-head .lead {
  margin-top: 18px;
}
.stop-end .stop-head::before {
  background: var(--lm-ink);
}
.stop-end::before {
  bottom: auto;
  height: calc(clamp(56px, 8vw, 112px) + 18px);
}

/* Provenance: copy and a departure-board style record */
.prov {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 56px;
  margin-top: 48px;
  max-width: 1200px;
}
.facts {
  display: grid;
  gap: 22px;
  padding: 0;
  list-style: none;
  color: var(--lm-ink-2);
  font-size: 16px;
}
.facts strong {
  display: block;
  color: var(--lm-ink);
  font-size: 17px;
  font-weight: 700;
}
.board {
  align-self: start;
  border: 3px solid var(--lm-ink);
  border-radius: 14px;
  overflow: hidden;
}
.board-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px 20px;
  padding: 16px 22px 12px;
  background: var(--lm-head-bg);
  color: var(--lm-head-fg);
}
.board-title {
  font-size: 20px;
  font-weight: 800;
}
.board-run {
  color: var(--lm-head-fg-2);
  font-size: 14px;
  font-weight: 600;
}
.board-facts {
  display: grid;
  padding: 6px 22px;
}
.board-facts div {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid var(--lm-rail);
  font-size: 15px;
}
.board-facts dt {
  color: var(--lm-ink-2);
  font-weight: 600;
}
.board-facts dd {
  font-weight: 600;
}
.params {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.params caption {
  padding: 16px 22px 6px;
  color: var(--lm-ink-2);
  font-weight: 700;
  font-size: 14px;
  text-align: left;
}
.params th,
.params td {
  padding: 9px 0 9px 22px;
  border-top: 1px solid var(--lm-rail);
  text-align: left;
  font-weight: 500;
}
.params td:last-child {
  padding-right: 22px;
  text-align: right;
}
.code {
  font-family: var(--lm-code);
  font-size: 0.9em;
}
.params td.code {
  overflow-wrap: anywhere;
}
.who {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 13px;
  white-space: nowrap;
}
.who::before {
  content: "";
  width: 22px;
  height: 8px;
  border-radius: 4px;
  background: currentColor;
}
.who-r {
  color: var(--lm-agent);
}
.who-s {
  color: var(--lm-pipe-text);
}
.who-ref {
  color: var(--lm-ref-text);
}

/* Pipeline catalogue as line diagrams, one colour per area */
.lines {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 40px 56px;
  margin-top: 48px;
  max-width: 1200px;
}
.zone {
  --line: var(--lm-agent);
}
.zone-mg {
  --line: var(--lm-pipe);
}
.zone-gp {
  --line: var(--lm-quant);
}
.zone-sp {
  --line: var(--lm-red);
}
.zone h3 {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 18px;
  font-weight: 800;
}
.zone h3::before {
  content: "";
  width: 36px;
  height: 12px;
  border-radius: 6px;
  background: var(--line);
}
.zone ul {
  position: relative;
  margin-top: 14px;
  padding: 0 0 0 48px;
  list-style: none;
}
.zone ul::before {
  content: "";
  position: absolute;
  top: 18px;
  bottom: 0;
  left: 12px;
  width: 8px;
  border-radius: 4px;
  background: var(--line);
}
.zone li {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0 16px;
  padding: 8px 0;
}
.zone li::before {
  content: "";
  position: absolute;
  top: 12px;
  left: -43px;
  width: 22px;
  height: 22px;
  border: 4px solid var(--lm-ink);
  border-radius: 50%;
  background: var(--lm-paper);
  box-sizing: border-box;
}
.zone li .code {
  font-weight: 600;
  font-size: 16px;
}
.zone li .what {
  grid-column: 1;
  color: var(--lm-ink-2);
  font-size: 15px;
}
.zone li .ver {
  grid-column: 2;
  grid-row: 1;
  color: var(--lm-ink-2);
  font-size: 14px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* Capabilities: the structure viewer as a station, with a CSS-only colouring switch */
.viewer {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 4fr);
  gap: 56px;
  align-items: start;
  margin-top: 48px;
  max-width: 1200px;
}
.vw {
  position: relative;
  border: 3px solid var(--lm-ink);
  border-radius: 14px;
  overflow: hidden;
  background: var(--lm-surface);
}
.vw-radio {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.vw-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 4px 20px;
  padding: 14px 22px 11px;
  background: var(--lm-head-bg);
  color: var(--lm-head-fg);
}
.vw-file {
  font-family: var(--lm-code);
  font-size: 15px;
  font-weight: 600;
}
.vw-path {
  color: var(--lm-head-fg-2);
  font-family: var(--lm-code);
  font-size: 13px;
}
.vw-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-bottom: 1px solid var(--lm-rail);
}
.vw-bar-label {
  margin-right: 6px;
  color: var(--lm-ink-2);
  font-size: 14px;
  font-weight: 600;
}
.seg {
  display: inline-flex;
  align-items: center;
  height: 32px;
  padding: 2px 14px 0;
  border: 2px solid var(--lm-ink);
  border-radius: 16px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  user-select: none;
}
.seg:hover {
  background: var(--lm-hover);
}
#vw-plddt:checked ~ .vw-bar label[for="vw-plddt"],
#vw-spectrum:checked ~ .vw-bar label[for="vw-spectrum"] {
  background: var(--lm-ink);
  color: var(--lm-paper);
}
#vw-plddt:focus-visible ~ .vw-bar label[for="vw-plddt"],
#vw-spectrum:focus-visible ~ .vw-bar label[for="vw-spectrum"] {
  outline: 3px solid var(--lm-agent);
  outline-offset: 3px;
}

.vw-stage {
  padding: 28px 22px 24px;
  container-type: inline-size;
}
.vw .spec {
  position: relative;
  width: 50%;
}
.vw .spec-img {
  position: relative;
  display: grid;
}
/* Both renders share one grid cell, so switching never changes the height and the
   second image is already loaded (it keeps a layout box while hidden). */
.vw .spec-img img {
  display: block;
  grid-area: 1 / 1;
  width: 100%;
  height: auto;
}
.vw .spec-img img.mode-spectrum,
#vw-spectrum:checked ~ .vw-stage img.mode-plddt {
  visibility: hidden;
}
#vw-spectrum:checked ~ .vw-stage img.mode-spectrum {
  visibility: visible;
}
.vw .pin {
  position: absolute;
  z-index: 1;
  width: 18px;
  height: 18px;
  margin: -9px 0 0 -9px;
  border: 4px solid var(--lm-ink);
  border-radius: 50%;
  background: var(--lm-paper);
}
.vw .pin-tail,
.vw .note-tail {
  left: 32.8%;
  top: 12.2%;
}
.vw .pin-chromo,
.vw .note-chromo {
  left: 45.2%;
  top: 56.8%;
}
.vw .pin-barrel,
.vw .note-barrel {
  left: 57.7%;
  top: 69.5%;
}
.vw .notes {
  margin: 0;
  padding: 0;
  list-style: none;
}
.vw .note {
  position: absolute;
  right: -12%;
  height: 0;
  border-top: 2px solid var(--lm-ink);
  box-shadow: 0 0 0 1.5px var(--lm-surface);
}
.vw .note > span {
  position: absolute;
  top: 0;
  left: 100%;
  width: clamp(170px, 44cqi, 280px);
  padding-left: 12px;
  transform: translateY(-50%);
  color: var(--lm-ink-2);
  font-size: 14px;
  line-height: 1.4;
}
.vw .note-chromo > span {
  transform: translateY(calc(-100% + 0.8em));
}
.vw .note-barrel > span {
  transform: translateY(-0.8em);
}
.nobr {
  font-style: normal;
  white-space: nowrap;
}
.vw .note b {
  display: block;
  color: var(--lm-ink);
  font-size: 16px;
  font-weight: 800;
  line-height: 1.25;
}

.vw-key {
  display: grid;
  align-items: center;
  padding: 12px 22px;
  border-top: 1px solid var(--lm-rail);
  font-size: 13px;
  font-weight: 600;
}
.vw-key > * {
  grid-area: 1 / 1;
}
.key-plddt {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  padding: 0;
  list-style: none;
}
.key-plddt li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.key-plddt li::before {
  content: "";
  width: 26px;
  height: 8px;
  border-radius: 4px;
}
.k-vh::before {
  background: #0053d6;
}
.k-hi::before {
  background: #65cbf3;
}
.k-lo::before {
  background: #ffdb13;
}
.k-vl::before {
  background: #ff7d45;
}
.key-spectrum {
  display: flex;
  align-items: center;
  gap: 12px;
  visibility: hidden;
}
.grad {
  flex: 1;
  max-width: 320px;
  height: 8px;
  border-radius: 4px;
  background: linear-gradient(90deg, #b015d8, #3a3ce0 22%, #18c2a2 42%, #4af641 60%, #d3a80e 82%, #f75a31 94%, #ed3d3d);
}
#vw-spectrum:checked ~ .vw-key .key-plddt {
  visibility: hidden;
}
#vw-spectrum:checked ~ .vw-key .key-spectrum {
  visibility: visible;
}
.vw figcaption {
  padding: 12px 22px 18px;
  border-top: 1px solid var(--lm-rail);
  color: var(--lm-ink-2);
  font-size: 14.5px;
  line-height: 1.5;
}
.vw figcaption b {
  color: var(--lm-ink);
  font-weight: 700;
}

.vw-does {
  display: grid;
  gap: 18px;
  padding: 0;
  list-style: none;
  color: var(--lm-ink-2);
  font-size: 16px;
}
.vw-does strong {
  display: block;
  color: var(--lm-ink);
  font-size: 17px;
  font-weight: 700;
}
.formats {
  display: grid;
  gap: 16px;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 2px solid var(--lm-ink);
}
.fmt {
  --line: var(--lm-agent);
}
.fmt-small {
  --line: var(--lm-pipe);
}
.fmt-aln {
  --line: var(--lm-quant);
}
.fmt-rep {
  --line: var(--lm-red);
}
.fmt dt {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  font-weight: 800;
}
.fmt dt::before {
  content: "";
  flex: none;
  width: 26px;
  height: 8px;
  border-radius: 4px;
  background: var(--line);
}
.fmt dd {
  margin-left: 36px;
  color: var(--lm-ink-2);
  font-size: 15px;
}
.fmt dd.code {
  font-size: 13.5px;
}

.foot {
  padding: 32px var(--lm-gutter);
  border-top: 2px solid var(--lm-ink);
  color: var(--lm-ink-2);
  font-size: 14px;
}

@media (max-width: 900px) {
  .hero-text,
  .prov,
  .lines,
  .viewer {
    grid-template-columns: minmax(0, 1fr);
  }
  .hero-text {
    gap: 24px;
  }
  .nav-links {
    display: none;
  }
  .nav {
    justify-content: space-between;
  }
}
@media (max-width: 600px) {
  .vw .spec {
    width: auto;
  }
  .vw .spec-img {
    width: 78%;
    margin: 0 auto;
  }
  .vw .pin {
    width: 24px;
    height: 24px;
    margin: -12px 0 0 -12px;
    border-width: 3px;
    font-size: 12px;
    font-weight: 800;
    line-height: 18px;
    text-align: center;
  }
  .vw .pin-tail::before {
    content: "1";
  }
  .vw .pin-chromo::before {
    content: "2";
  }
  .vw .pin-barrel::before {
    content: "3";
  }
  .vw .notes {
    margin-top: 20px;
    padding-left: 24px;
    list-style: decimal;
  }
  .vw .note {
    position: static;
    height: auto;
    padding: 4px 0;
    border: 0;
    box-shadow: none;
  }
  .vw .note::marker {
    font-weight: 800;
  }
  .vw .note > span,
  .vw .note-chromo > span,
  .vw .note-barrel > span {
    position: static;
    display: block;
    width: auto;
    padding: 0;
    transform: none;
  }
}
@media (max-width: 520px) {
  :root {
    --lm-rail-x: 26px;
  }
  .stop {
    padding-left: 64px;
    padding-right: 16px;
  }
  .stop-head::before {
    left: -52px;
    width: 28px;
    height: 28px;
    border-width: 4px;
  }
  .board-facts div {
    grid-template-columns: minmax(0, 1fr);
    gap: 2px;
  }
  .params tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 8px 18px;
    border-top: 1px solid var(--lm-rail);
  }
  .params th,
  .params td,
  .params td:last-child {
    padding: 0;
    border: 0;
  }
  .params td.code {
    grid-column: 1 / -1;
    grid-row: 2;
  }
  .vw-stage,
  .vw-bar,
  .vw-key,
  .vw figcaption,
  .vw-head {
    padding-left: 16px;
    padding-right: 16px;
  }
}
@media (forced-colors: active) {
  #vw-plddt:checked ~ .vw-bar label[for="vw-plddt"],
  #vw-spectrum:checked ~ .vw-bar label[for="vw-spectrum"] {
    forced-color-adjust: none;
    border-color: Highlight;
    background: Highlight;
    color: HighlightText;
  }
  .key-plddt li::before,
  .fmt dt::before,
  .grad {
    forced-color-adjust: none;
  }
}

/* ---- Landing additions: brand, sources, compute, access, footer ---------- */
.btn:hover,
.nav-links a:hover,
.nav-signin:hover {
  text-decoration: none;
}
.nav .brand,
.foot .brand {
  gap: 10px;
  color: var(--lm-ink);
  font-family: var(--lm-sans);
  font-size: 19px;
  font-weight: 800;
}
.nav-links {
  margin-right: auto;
}
.nav-signin {
  color: var(--lm-ink);
  font-size: 15px;
  font-weight: 700;
  white-space: nowrap;
}
.nav-signin:hover {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 5px;
}

.facts-row {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px 32px;
  max-width: 1200px;
  margin-top: 40px;
}

/* Sources: an answer board with numbered stations for its references */
.src {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 56px;
  align-items: start;
  margin-top: 48px;
  max-width: 1200px;
}
.answer {
  background: var(--lm-surface);
}
.answer-body {
  padding: 18px 22px 6px;
}
.answer-q {
  justify-self: end;
  margin-left: auto;
  max-width: 85%;
  padding: 10px 16px 9px;
  border: 2px solid var(--lm-rail);
  border-radius: 18px 18px 4px 18px;
  font-weight: 600;
  font-size: 15.5px;
  width: fit-content;
}
.answer-a {
  margin-top: 16px;
  font-size: 16px;
  line-height: 1.65;
}
.cite-link {
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: var(--lm-agent);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}
.answer-sources {
  margin: 14px 22px 20px;
  padding-top: 14px;
  border-top: 1px solid var(--lm-rail);
}
.answer-sources-h {
  color: var(--lm-ink-2);
  font-size: 14px;
  font-weight: 700;
}
.refs {
  display: grid;
  gap: 12px;
  margin-top: 12px;
  padding: 0;
  list-style: none;
  counter-reset: ref;
}
.refs li {
  position: relative;
  padding-left: 40px;
  counter-increment: ref;
  font-size: 15px;
}
.refs li::before {
  content: counter(ref);
  position: absolute;
  top: -1px;
  left: 0;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border: 4px solid var(--lm-ink);
  border-radius: 50%;
  background: var(--lm-paper);
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
}
.refs b {
  display: block;
  font-weight: 700;
}
.refs span {
  color: var(--lm-ink-2);
  font-size: 14px;
}
.tag {
  margin-left: 6px;
  padding: 1px 8px 0;
  border-radius: 10px;
  background: var(--lm-hover);
  color: var(--lm-ref-text);
  font-style: normal;
  font-size: 12.5px;
  font-weight: 700;
  white-space: nowrap;
}
.answer-more {
  margin-top: 12px;
  padding-left: 40px;
  color: var(--lm-ink-2);
  font-size: 14px;
  font-weight: 600;
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 28px;
  padding: 20px 0 0;
  border-top: 2px solid var(--lm-ink);
  list-style: none;
}
.chips li {
  padding: 5px 12px 3px;
  border: 2px solid var(--lm-rail);
  border-radius: 16px;
  font-size: 14px;
  font-weight: 600;
}

/* Compute: three machines and the lifecycle of one analysis as a line */
.machines {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin-top: 48px;
  max-width: 1200px;
}
.machine {
  --line: var(--lm-pipe);
  padding: 22px 22px 18px;
  border: 3px solid var(--lm-ink);
  border-radius: 14px;
  background: var(--lm-surface);
}
.m-gpu {
  --line: var(--lm-red);
}
.m-ws {
  --line: var(--lm-agent);
}
.machine-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 12px;
}
.machine h3 {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 15px;
  font-weight: 700;
}
.machine h3::before {
  content: "";
  width: 30px;
  height: 10px;
  border-radius: 5px;
  background: var(--line);
}
.machine-head p {
  color: var(--lm-ink-2);
  font-size: 13px;
  font-weight: 600;
}
.machine-spec {
  margin-top: 14px;
  font-size: clamp(24px, 2.4vw, 30px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.015em;
}
.specs {
  margin-top: 14px;
}
.specs div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 0;
  border-top: 1px solid var(--lm-rail);
  font-size: 14.5px;
}
.specs dt {
  color: var(--lm-ink-2);
}
.specs dd {
  white-space: nowrap;
  font-weight: 700;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.life {
  max-width: 1200px;
  margin-top: 48px;
}
.life figcaption {
  font-size: 17px;
  font-weight: 800;
}
.life-line {
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-top: 22px;
  padding: 0;
  list-style: none;
}
.life-line::before {
  content: "";
  position: absolute;
  top: 12px;
  left: 0;
  right: calc(20% - 7px);
  height: 10px;
  border-radius: 5px;
  background: var(--lm-pipe);
}
.life-line li {
  position: relative;
  padding-top: 46px;
  padding-right: 12px;
  font-size: 14.5px;
}
.life-line li::before {
  content: "";
  position: absolute;
  top: 6px;
  left: 0;
  width: 22px;
  height: 22px;
  border: 4px solid var(--lm-ink);
  border-radius: 50%;
  background: var(--lm-paper);
}
.life-line .life-xchg::before {
  top: 2px;
  width: 30px;
  height: 30px;
  border-width: 5px;
}
.life-line .life-end::before {
  top: 0;
  width: 14px;
  height: 34px;
  border: 0;
  border-radius: 3px;
  background: var(--lm-ink);
}
.life-line b {
  display: block;
  font-weight: 800;
}
.life-line span {
  color: var(--lm-ink-2);
}
.life-note {
  max-width: 46em;
  margin-top: 20px;
  color: var(--lm-ink-2);
  font-size: 16px;
}

/* Access: the end of the line, with the three steps to an account */
.access {
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
  gap: 56px;
  align-items: start;
  max-width: 1200px;
}
.steps {
  position: relative;
  display: grid;
  gap: 22px;
  padding: 4px 0 0 52px;
  list-style: none;
  counter-reset: step;
}
.steps::before {
  content: "";
  position: absolute;
  top: 18px;
  bottom: 18px;
  left: 13px;
  width: 8px;
  border-radius: 4px;
  background: var(--lm-agent);
}
.steps li {
  position: relative;
  counter-increment: step;
  color: var(--lm-ink-2);
  font-size: 16px;
}
.steps li::before {
  content: counter(step);
  position: absolute;
  top: -2px;
  left: -52px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 4px solid var(--lm-ink);
  border-radius: 50%;
  background: var(--lm-paper);
  color: var(--lm-ink);
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
}
.steps b {
  display: block;
  color: var(--lm-ink);
  font-size: 17px;
  font-weight: 800;
}

.foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 32px;
}
.foot .brand {
  font-size: 16px;
}

@media (max-width: 1100px) {
  .facts-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .machines {
    grid-template-columns: minmax(0, 1fr);
    max-width: 640px;
  }
}
@media (max-width: 900px) {
  .src,
  .access {
    grid-template-columns: minmax(0, 1fr);
  }
  .nav-signin {
    margin-left: auto;
  }
  .life-line {
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
    padding-left: 48px;
  }
  /* Vertical form: one segment per stop, from its roundel to the next one. */
  .life-line::before {
    display: none;
  }
  .life-line li {
    padding-top: 0;
  }
  .life-line li:not(:last-child)::after {
    content: "";
    position: absolute;
    z-index: -1;
    top: 11px;
    left: -42px;
    width: 10px;
    height: calc(100% + 18px);
    background: var(--lm-pipe);
  }
  .life-line li::before {
    top: 0;
    left: -48px;
  }
  .life-line .life-xchg::before {
    top: -4px;
    left: -52px;
  }
  .life-line .life-end::before {
    top: 4px;
    left: -54px;
    width: 34px;
    height: 14px;
  }
}
@media (max-width: 600px) {
  .facts-row {
    grid-template-columns: minmax(0, 1fr);
  }
  .answer-body,
  .answer-sources {
    padding-left: 16px;
    padding-right: 16px;
  }
  .answer-sources {
    margin-left: 0;
    margin-right: 0;
  }
  .nav .btn {
    display: none;
  }
}

/* ---- Review fixes: nav width, map cue, small screens, dark logo ---------- */
.nav-signin {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 6px;
}
.life-line li {
  isolation: isolate;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .brand > .brand-mark {
    filter: brightness(1.85) saturate(0.9);
  }
}
:root[data-theme="dark"] .brand > .brand-mark {
  filter: brightness(1.85) saturate(0.9);
}
@media (max-width: 1100px) {
  .nav-links {
    display: none;
  }
  .nav-signin {
    margin-left: auto;
  }
  /* The map keeps readable labels and scrolls; the fade says there is more to the right. */
  .map-svg {
    min-width: 1100px;
  }
  .map-scroll {
    -webkit-mask-image: linear-gradient(90deg, #000 88%, transparent);
    mask-image: linear-gradient(90deg, #000 88%, transparent);
  }
}
@media (max-width: 600px) {
  .zone li {
    grid-template-columns: minmax(0, 1fr);
  }
  .zone li .ver {
    grid-column: 1;
    grid-row: auto;
  }
}
