/* Per Scholas brand 2026 for the MobilityOS document pages (docs/pending/brand-themes.md in the training repo
   is the source for the rules). Palette: Slate #26282e · Cloud #f0f0f0 · White · Sky #71e2fd · Luminous #e7fd82 ·
   UV #724dfd · Plum #611940. Brand colors are never tinted; surfaces layer White over Slate. Light = the Cloud
   pairing (Slate type, Plum links, Sky and Luminous as fills with Slate text). Dark = the Slate pairing (White
   type, Sky links, Luminous as the signal). Status colors (decided = green, open = amber) stay functional.
   Type: Parabolica for headlines and body; Mandrel Condensed for the kickers; a system mono for code. */
@font-face { font-family: "Parabolica"; font-weight: 400; font-style: normal; font-display: swap; src: url("fonts/Parabolica_Regular.otf") format("opentype"); }
@font-face { font-family: "Parabolica"; font-weight: 500; font-style: normal; font-display: swap; src: url("fonts/Parabolica_Medium.otf") format("opentype"); }
@font-face { font-family: "Parabolica"; font-weight: 600 700; font-style: normal; font-display: swap; src: url("fonts/Parabolica_Bold.otf") format("opentype"); }
@font-face { font-family: "Mandrel Condensed"; font-weight: 500; font-style: normal; font-display: swap; src: url("fonts/Mandrel_Cond_Medium.otf") format("opentype"); }

/* Layout: a Slate header band carrying the Luminous wordmark and the Arc; then one reading column (68ch) that lets figures and tables widen to 1040px. */
:root {
  --slate: #26282e; --cloud: #f0f0f0; --white: #ffffff; --sky: #71e2fd; --luminous: #e7fd82; --uv: #724dfd; --plum: #611940;
  --bg: var(--cloud); --surface: var(--white); --ink: var(--slate); --muted: rgba(38, 40, 46, 0.72); --line: rgba(38, 40, 46, 0.14);
  --band: var(--slate); --band-ink: var(--white); --band-muted: rgba(240, 240, 240, 0.78); --band-signal: var(--luminous);
  --accent: var(--plum);            /* links and emphasis text on Cloud and White */
  --accent-fill: var(--sky);        /* a Sky fill always carries Slate type */
  --accent-soft: var(--sky);
  --owner-soft: var(--luminous);    /* the signal: an entity's owner */
  --on-fill: var(--slate);
  --kicker: var(--plum);
  --open: #8f5a10; --open-soft: #f6e6c9;
  --ok: #276b45; --ok-soft: #d9efe1;
  --focus: var(--uv);               /* the focus ring: UV on Cloud and White, Luminous on Slate */
  --font-display: "Parabolica", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-body: "Parabolica", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-serif: "Mandrel Condensed", "Book Antiqua", Georgia, serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: var(--slate); --surface: rgba(255, 255, 255, 0.06); --ink: var(--white); --muted: rgba(255, 255, 255, 0.72); --line: rgba(255, 255, 255, 0.14);
    --band: #1d1f24; --band-ink: var(--white); --band-muted: rgba(255, 255, 255, 0.72); --band-signal: var(--luminous);
    --accent: var(--sky); --accent-fill: var(--sky); --accent-soft: rgba(255, 255, 255, 0.08); --owner-soft: rgba(255, 255, 255, 0.08); --on-fill: var(--white);
    --kicker: var(--luminous);
    --focus: var(--luminous);
    --open: #e0a450; --open-soft: rgba(224, 164, 80, 0.16);
    --ok: #6ccb92; --ok-soft: rgba(108, 203, 146, 0.16);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: var(--slate); --surface: rgba(255, 255, 255, 0.06); --ink: var(--white); --muted: rgba(255, 255, 255, 0.72); --line: rgba(255, 255, 255, 0.14);
  --band: #1d1f24; --band-ink: var(--white); --band-muted: rgba(255, 255, 255, 0.72); --band-signal: var(--luminous);
  --accent: var(--sky); --accent-fill: var(--sky); --accent-soft: rgba(255, 255, 255, 0.08); --owner-soft: rgba(255, 255, 255, 0.08); --on-fill: var(--white);
  --kicker: var(--luminous);
  --focus: var(--luminous);
  --open: #e0a450; --open-soft: rgba(224, 164, 80, 0.16);
  --ok: #6ccb92; --ok-soft: rgba(108, 203, 146, 0.16);
  color-scheme: dark;
}
* { box-sizing: border-box; }
body { background: var(--bg); color: var(--ink); font-family: var(--font-body); font-size: 16px; line-height: 1.55; }
.wrap { max-width: 1040px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
a { color: var(--accent); text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }

/* Header band: Slate, the Luminous wordmark (one color, never stretched), the Arc rays in Sky as a watermark */
.band { background: var(--band); color: var(--band-ink); position: relative; overflow: hidden; border-bottom: 3px solid var(--band-signal); }
.band .wrap { padding-block: 28px 30px; display: grid; gap: 14px; position: relative; z-index: 1; }
.band .brand-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 6px; }
.band .wordmark { width: 320px; max-width: 100%; height: auto; display: block; }
.band .arc { position: absolute; right: -40px; top: -30px; width: 460px; max-width: 70%; height: auto; opacity: 0.25; pointer-events: none; z-index: 0; }
.eyebrow { font-family: var(--font-serif); font-size: 1.05rem; letter-spacing: 0.02em; color: var(--band-muted); margin: 0; }
h1 { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.9rem, 5vw, 2.8rem); line-height: 1.05; margin: 0; text-wrap: balance; }
.band p.lede { color: var(--band-muted); max-width: 70ch; font-size: 1.05rem; }
.band p.lede b { color: var(--band-ink); font-weight: 600; }
.meta { display: flex; flex-wrap: wrap; gap: 6px 22px; margin: 0; padding: 0; list-style: none; font-size: 0.92rem; color: var(--band-muted); }
.meta b { color: var(--band-ink); font-weight: 600; }
.meta a { color: var(--band-signal); }
.legend { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; font-size: 0.88rem; color: var(--band-muted); }
.legend .sw { display: inline-block; width: 26px; height: 14px; border-radius: 3px; vertical-align: -2px; margin-right: 6px; border: 2px solid var(--band-ink); background: transparent; }
.legend .sw.open { border-color: var(--open); border-style: dashed; }
.legend .sw.ok { border-color: var(--luminous); background: var(--luminous); }
.legend .sw.ac { border-color: var(--sky); border-style: dashed; }

main.wrap { padding-block: 28px 56px; display: grid; gap: 40px; }
section { display: grid; gap: 14px; }
h2 { font-family: var(--font-display); font-weight: 700; font-size: 1.45rem; margin: 0; line-height: 1.2; text-wrap: balance; }
h3 { font-family: var(--font-display); font-weight: 500; font-size: 1.1rem; margin: 0; }
.kicker { font-family: var(--font-serif); font-size: 1.05rem; letter-spacing: 0.02em; color: var(--kicker); margin: 0; }
p { margin: 0; max-width: 68ch; }
p.lede { font-size: 1.08rem; max-width: 70ch; }
ul.plain { margin: 0; padding-left: 1.2em; max-width: 72ch; display: grid; gap: 6px; }

/* Status pills: functional colors for decided / open; brand fills for the owner types */
.pill { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-body); font-weight: 500; font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase; border-radius: 999px; padding: 2px 10px; white-space: nowrap; border: 1px solid transparent; vertical-align: middle; }
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.p-decided, .p-live { color: var(--ok); background: var(--ok-soft); }
.p-directed, .p-draft { color: var(--accent); background: var(--accent-soft); }
.p-proposed { color: var(--accent); border-color: var(--accent); }
.p-open, .p-next { color: var(--open); background: var(--open-soft); }
.p-sf { color: var(--slate); background: var(--sky); }        /* Sky carries Slate type in both themes (p54) */
.p-pl { color: var(--slate); background: var(--luminous); }   /* Luminous carries Slate type in both themes */
.p-pl::before, .p-sf::before { background: var(--slate); }
.p-lk { color: var(--ink); border-color: var(--line); background: var(--bg); }
.p-ex { color: var(--muted); border-color: var(--line); }

/* Decision list */
.decisions { margin: 0; padding: 0; list-style: none; display: grid; gap: 0; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); overflow: hidden; }
.decisions li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 16px; padding: 12px 16px; border-top: 1px solid var(--line); align-items: start; }
.decisions li:first-child { border-top: 0; }
.decisions b { font-weight: 600; }
.decisions .why { color: var(--muted); font-size: 0.92rem; max-width: 68ch; }
.decisions .src { font-family: var(--font-mono); font-size: 0.78rem; color: var(--muted); }

/* Figures: solid = decided, dashed amber = open, Luminous = the owner, Sky = ours / an event */
figure { margin: 0; display: grid; gap: 10px; }
.fig { border: 1px solid var(--line); border-radius: 8px; background: var(--surface); padding: 14px; overflow-x: auto; }
.fig svg { display: block; max-width: 100%; height: auto; min-width: 640px; color: var(--ink); font-family: var(--font-body); }
.fig svg text { fill: currentColor; font-size: 12px; }
.fig svg text.t { font-weight: 600; font-size: 13px; }
.fig svg text.s { font-size: 11px; fill: var(--muted); }
.fig svg text.lab { font-size: 11px; fill: var(--muted); font-family: var(--font-serif); font-size: 13px; }
.fig svg text.ac { fill: var(--accent); }
.fig svg text.ok { fill: var(--ok); }
.fig svg text.op { fill: var(--open); }
.fig svg rect.box { fill: var(--surface); stroke: currentColor; stroke-width: 1.4; rx: 4; }
.fig svg rect.zone { fill: var(--bg); stroke: var(--muted); stroke-width: 1; stroke-dasharray: 5 4; rx: 8; }
.fig svg rect.accent { fill: var(--accent-soft); stroke: var(--sky); stroke-width: 1.8; rx: 4; }
.fig svg rect.open { fill: var(--open-soft); stroke: var(--open); stroke-width: 1.6; stroke-dasharray: 6 4; rx: 4; }
.fig svg rect.owner { fill: var(--owner-soft); stroke: var(--luminous); stroke-width: 1.8; rx: 4; }
.fig svg line, .fig svg path.flow, .fig svg polyline.flow { stroke: currentColor; stroke-width: 1.4; fill: none; }
.fig svg path.ev, .fig svg polyline.ev { stroke: var(--sky); stroke-width: 1.6; fill: none; stroke-dasharray: 5 4; }
.fig svg path.blocked { stroke: var(--open); stroke-width: 1.4; fill: none; stroke-dasharray: 2 4; }
.fig svg marker path { fill: currentColor; }
.fig svg marker.evm path { fill: var(--sky); }
figcaption { color: var(--muted); font-size: 0.92rem; max-width: 72ch; }
figcaption b { color: var(--ink); font-weight: 600; }

/* Tables */
.tbl { overflow-x: auto; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
table { border-collapse: collapse; width: 100%; font-size: 0.94rem; }
th, td { text-align: left; vertical-align: top; padding: 10px 14px; border-top: 1px solid var(--line); }
th { font-family: var(--font-body); font-weight: 500; font-size: 0.74rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); border-top: 0; }
td.k { font-family: var(--font-mono); font-size: 0.86rem; white-space: nowrap; }
td .who { font-family: var(--font-mono); font-size: 0.8rem; color: var(--muted); white-space: nowrap; }

/* Notes, code */
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.note { border: 1px solid var(--line); border-radius: 8px; background: var(--surface); padding: 14px 16px; display: grid; gap: 8px; min-width: 0; }
.note p, .note li { font-size: 0.95rem; }
.note ul { margin: 0; padding-left: 1.1em; display: grid; gap: 4px; }
pre { margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 14px 16px; font-family: var(--font-mono); font-size: 0.82rem; line-height: 1.5; overflow-x: auto; color: var(--ink); }
pre b { color: var(--accent); font-weight: 500; }
code { font-family: var(--font-mono); font-size: 0.9em; }
.rule { border-left: 3px solid var(--luminous); padding: 4px 0 4px 14px; max-width: 70ch; }
.rule p { font-size: 1rem; }

/* The hub's cards: a glyph column beside the body */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.card { border: 1px solid var(--line); border-radius: 10px; background: var(--surface); padding: 18px 18px 16px; display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 14px; min-width: 0; align-content: start; }
.card .glyph { width: 52px; height: 52px; color: var(--ink); }
.card .glyph svg { width: 52px; height: 52px; display: block; }
.card .glyph .f { fill: var(--accent-fill); }
.card .glyph .g { fill: var(--luminous); }
.card .glyph .l { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.card .body { display: grid; gap: 10px; min-width: 0; }
.card h3, .card p, .card .answers li, .card .foot span, .card .foot a { min-width: 0; overflow-wrap: anywhere; }   /* a long path or package name wraps instead of leaving the card */
.card .top { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.card .num { font-family: var(--font-serif); font-size: 1rem; color: var(--muted); letter-spacing: 0.02em; }
.card h3 a { color: var(--ink); text-decoration: none; }
.card h3 a:hover { color: var(--accent); text-decoration: underline; }
.card p { font-size: 0.95rem; }
.card .answers { color: var(--muted); font-size: 0.9rem; display: grid; gap: 4px; margin: 0; padding-left: 1.1em; }
.card .foot { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 10px; font-family: var(--font-mono); font-size: 0.78rem; color: var(--muted); }
.card .foot a.go { font-family: var(--font-body); font-size: 0.92rem; font-weight: 600; }
.card.next { border-style: dashed; background: var(--bg); }

/* The decision ledger */
.ledger { margin: 0; padding: 0; list-style: none; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); overflow: hidden; }
.ledger li { display: grid; grid-template-columns: 7.5rem minmax(0, 1fr) auto; gap: 8px 16px; padding: 11px 16px; border-top: 1px solid var(--line); align-items: start; font-size: 0.95rem; }
.ledger li:first-child { border-top: 0; }
.ledger .id { font-family: var(--font-mono); font-size: 0.8rem; color: var(--muted); padding-top: 2px; }
.ledger .when { font-family: var(--font-mono); font-size: 0.78rem; color: var(--muted); white-space: nowrap; padding-top: 2px; }
.ledger b { font-weight: 600; }

footer.wrap { padding-block: 0 48px; color: var(--muted); font-size: 0.88rem; display: grid; gap: 8px; }
@media (max-width: 560px) {
  .decisions li { grid-template-columns: 1fr; }
  .ledger li { grid-template-columns: 1fr; gap: 4px; }
  .fig { padding: 10px; }
  .band .arc { display: none; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto; } }

/* Paper stamps (27 Oct 2026): which contract paper pays for a box or a module.
   signed = PXP-1 / PXP-2 (the component: X-3a, X-1a, X-2, 1a, RCP-1h); drafted = PXP-3 / PXP-4 / PXP-5 with the component number;
   later = no paper names it (the seam is designed, nothing is built). Functional colors: green, the accent, amber. */
.p-signed { color: var(--ok); background: var(--ok-soft); }
.p-drafted { color: var(--accent); background: var(--accent-soft); }
.p-later { color: var(--open); border-color: var(--open); border-style: dashed; }
.st-signed { color: var(--ok); fill: var(--ok); }
.st-drafted { color: var(--accent); fill: var(--accent); }
.st-later { color: var(--open); fill: var(--open); }
.fig svg text.stamp { font-size: 10px; font-weight: 600; letter-spacing: 0.02em; }
.fig svg tspan.st-signed { fill: var(--ok); }
.fig svg tspan.st-drafted { fill: var(--accent); }
.fig svg tspan.st-later { fill: var(--open); }
.legend .st-signed, .legend .st-drafted, .legend .st-later { font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; font-size: 0.8rem; }
.legend .st-signed { color: #6ccb92; }   /* the band is Slate in both themes: the dark-theme functional colors read on it */
.legend .st-drafted { color: var(--sky); }
.legend .st-later { color: #e0a450; }
