/* The public site's stylesheet, camaraderie.cc (owner: PUBLIC in wave 1;
   W2-PAGES and W2-MAP add their page components below the marked line).
   Served at /assets/public.<12 hex>.css (public, a year, immutable) under
   the CSP style-src 'self': no inline style anywhere on a public page.

   Night Drive (angled), the owner's design (a4-design/night_drive/DESIGN.md
   sections 1 to 5; P1 map_public_design.md 1 and 2.2). The :root block is
   static/app.css's, token for token (test_public_css pins them equal): add
   a token to both files or to neither. Every colour below is a token, but
   the system colours of the forced-colours block. No border-radius, no
   drop shadow (inset lines only), no gradient: the only gradients the
   design allows are the road's fade-out mask and its lane dashes, and only
   inside rules whose selector names .pub-road (wave 2). Every diagonal
   runs like "/". 44 px touch targets; the focus ring is the accent, 2 px
   at 2 px (inset inside clipped boxes); chamfered buttons drop their
   clip-path while focused. Motion stops under reduced motion.

   Fonts: the four self-hosted files of static/fonts/ by their hashed
   addresses (staticfiles.asset_href; test_public_css pins each url() to
   it). Archivo and JetBrains Mono are under the SIL Open Font License 1.1
   (static/fonts/OFL-Archivo.txt and OFL-JetBrainsMono.txt).

   Shell classes (public/shell.py): pub-body, pub-skip, pub-sr, pub-header,
   pub-bar, pub-brand(-badge, -name, -small), pub-nav(-list, -link), pub-cta,
   pub-btn(-main, -ghost), pub-arrow, pub-subnav(-inner, -lead, -list,
   -link), pub-main, pub-footer(-inner, -brand, -nav, -list, -link),
   pub-legal, pub-crumbs (pub-crumb, -sep, -here), pub-head, pub-wrap,
   pub-title, pub-lead, pub-actions, pub-accent, pub-section, pub-strip,
   pub-cell (-label, -value, -text, -note; pub-cell-live, -stale, -paused,
   -unavailable, -empty), pub-dot, pub-time, pub-local, pub-name,
   pub-compact. */

/* ------------------------------------------------------------------
   The fonts */
@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-weight: 300 800;
  font-stretch: 62% 125%;
  font-display: swap;
  src: url("/assets/archivo-v25-latin-ext.5717f3705966.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308,
    U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113,
    U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-weight: 300 800;
  font-stretch: 62% 125%;
  font-display: swap;
  src: url("/assets/archivo-v25-latin.e3a28eade21a.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304,
    U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url("/assets/jetbrains-mono-v24-latin-ext.db5ff4db83e5.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308,
    U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113,
    U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url("/assets/jetbrains-mono-v24-latin.83c005d49d8a.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304,
    U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  color-scheme: dark;

  /* Surfaces (DESIGN 2) */
  --bg: #070B1A;              /* page background */
  --surface: #0B1028;         /* cards, panels, grid cells, strips */
  --surface-sunk: #0A0F26;    /* inputs, image wells */
  --surface-deep: #080C20;    /* large image placeholders */
  --band: #0D1336;            /* angled bands (public site) */

  /* Lines */
  --line: #1E2650;            /* hairlines, panel borders, hairline-grid gaps */
  --line-strong: #2A3470;     /* outlined squares, counts, decorative outlines */
  --line-band: #26306A;
  --line-chrome: #161D42;     /* top bar and sidebar dividers */

  /* Text */
  --text: #ECEBFF;
  --text-muted: #A9ADD3;      /* body copy */
  --text-subtle: #8C91BC;     /* mono labels, captions */
  --text-nav: #BFC3E6;        /* nav links, field labels */
  --text-on-band: #B4B8DD;
  --label-on-band: #9A9FCB;

  /* The one accent */
  --accent: #A99BFF;
  --accent-ink: #0B0820;      /* text on accent fills */
  --link: #C9C0FF;
  --link-hover: #FFFFFF;

  /* Signals (tiny and rare) */
  --status-ok: #7BE0B0;
  --taillight: #FFB4C2;

  /* Road motif (public site) */
  --road-verge: #0E1538;
  --road-kerb: #2A3470;
  --road-surface: #04060F;
  --road-lines: #3A4588;
  /* P1 public site (MPG 1.2): the inner-page header road (DESIGN 2's
     bracketed values) and the closing call-to-action's second panel (REF
     index:209); static/public.css repeats this whole block */
  --road-verge-head: #131C4A;
  --road-kerb-head: #2E3A7A;
  --road-surface-head: #05081A;
  --band-panel: #111A45;

  /* Layout */
  --container: 1280px;
  --gutter: 32px;
  --section-gap: 128px;
  --slant: 5vw;
  --slant-head: 4vw;          /* inner-page headers (public site) */

  /* The staff console (DESIGN 9c) */
  --chrome: #0A0F26;          /* top bar, sidebar, table header rows */
  --field: #070B1A;           /* top-bar search, composer textareas */
  --nav-active: #141B45;      /* active nav item, pressed segment */
  --row-selected: #10173A;    /* selected table row */
  --row-line: #161D42;        /* lines between table and key-value rows */
  --label-dim: #7379AB;       /* sidebar group labels, map labels (ND-D2: was #6E74A6) */
  --placeholder: #7D82AE;

  /* Status tags: text / fill / border / square dot */
  --ok-text: #8FE8C0;
  --ok-bg: #0C1F22;
  --ok-line: #24503F;
  --ok-dot: #7BE0B0;
  --warn-text: #FFD27A;
  --warn-bg: #1E1812;
  --warn-line: #4F3F1C;
  --warn-dot: #FFC14D;
  --danger-text: #FF9DAD;
  --danger-bg: #200E1D;
  --danger-line: #5C2236;
  --danger-dot: #FF6B81;
  --info-text: #C9C0FF;
  --info-bg: #13123A;
  --info-line: #3A3480;
  --info-dot: var(--accent);
  --muted-text: #A9ADD3;
  --muted-bg: #0E1433;
  --muted-line: #2A3470;
  --muted-dot: #6A70A8;

  /* ND-D2: control borders at 3:1 or more against their surface */
  --line-control: #5C60A1;          /* inputs, selects, ghost buttons, segments */
  --danger-line-control: #925366;   /* danger buttons */
  --ok-line-control: #426F5C;       /* positive buttons */

  /* Type */
  --font-sans: "Archivo", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial,
    sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", Consolas, "Liberation Mono",
    monospace;

  /* The live map's colours (static/live.js reads them; the key under the
     map shows them): a marker's fill is how it moves (tail-light pink
     moving, grey parked, the accent on autopilot) or amber when the player
     has an active BOLO ([NEW], DESIGN 9c: warn is "has a BOLO" on the
     map); its 2px ring is the page colour, green for the police role,
     white for an in-game admin; the selected one gets the accent crop
     square; zones are the road lines. */
  --map-moving: var(--taillight);
  --map-parked: var(--muted-dot);
  --map-autopilot: var(--accent);
  --map-bolo: var(--warn-dot);
  --map-police: var(--ok-dot);
  --map-admin: var(--text);
  --map-selected: var(--accent);
  --map-zone: var(--road-lines);
  /* The words drawn on the map, zone and driver names (owner 2026-10-29:
     white); a paused map still greys the driver names. */
  --map-text: #FFFFFF;
  /* Map v4 (owner 2026-10-29, both maps): the ADMIN name tag in yellow,
     clearly not a BOLO's amber (text / fill / border / square dot), and the
     outlines of main zones, sub zones and points of interest in a
     translucent white (restricted zones stay red). */
  --tag-admin-text: #FFE45C;
  --tag-admin-bg: #1C1A06;
  --tag-admin-line: #4A4415;
  --tag-admin-dot: #FFE45C;
  --map-zone-line: rgba(255, 255, 255, 0.35);
  /* Map v5 (owner 2026-10-29, both maps): a player responding to a support
     request: the dashed ring around their dot and the dotted line to the
     request (--map-responding), and their RESPONDING tag in a light green
     clearly not REG's (text / fill / border / square dot). */
  --map-responding: #B4F5A8;
  --tag-responding-text: #B4F5A8;
  --tag-responding-bg: #0E2412;
  --tag-responding-line: #2F6B36;
  --tag-responding-dot: #B4F5A8;
  /* Map v7 (owner 2026-11-20): the staff Detective map's colours (app.css
     has the same block; one token file for both sites). */
  --det-p1: var(--taillight);
  --det-p2: #7FD4FF;
  --det-p3: var(--warn-dot);
  --det-p4: var(--ok-dot);
  --det-p5: #D98CFF;
  --det-p6: #FF8A4C;
  --det-p7: #4DE1E1;
  --det-p8: var(--tag-admin-dot);
  --det-p9: var(--accent);
  --det-p10: #FFFFFF;
  --det-sev-light: var(--tag-admin-dot);
  --det-sev-hard: #FF8A4C;
  --det-sev-extreme: var(--danger-dot);
  --det-jump: #4DE1E1;
  --det-offline: #D98CFF;
  --det-vehicle: var(--text-nav);
  --det-stop: var(--text);
  --det-mark: var(--text-nav);
  --det-early: #5B7CFF;
  --det-late: var(--taillight);
  --det-box: var(--accent);
}

/* ------------------------------------------------------------------
   Base */
*, *::before, *::after { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

.pub-body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.6;
}

/* The content box of the 1280 px container, as side padding of a full-width box. */
.pub-body { --edge: max(var(--gutter), calc((100% - var(--container)) / 2 + var(--gutter))); }

a { color: var(--link); }
a:hover { color: var(--link-hover); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
[hidden] { display: none !important; }
p { margin: 0; }

.pub-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.pub-skip {
  position: absolute;
  left: 16px;
  top: -200px;
  z-index: 100;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 18px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 700;
  text-decoration: none;
}
.pub-skip:focus { top: 16px; }
.pub-skip:hover { color: var(--accent-ink); }

.pub-wrap {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.pub-accent { color: var(--accent); }
.pub-name { overflow-wrap: anywhere; }
.pub-time { font-family: var(--font-mono); font-size: 0.9em; letter-spacing: 0.02em; }
/* The viewer's own time: never under 12 px, the smallest mono label (DES-9) */
.pub-local {
  font-family: var(--font-mono);
  font-size: max(12px, 0.75em);
  color: var(--text-subtle);
}

/* ------------------------------------------------------------------
   Buttons (DESIGN 5): primary chamfered, ghost outlined, 44 px or more */
.pub-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 56px;
  padding: 0 30px;
  border: 0;
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
}
.pub-btn-main {
  --cut: 16px;
  background: var(--accent);
  color: var(--accent-ink);
  clip-path: polygon(0 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% 100%, 0 100%);
}
.pub-btn-main:hover { background: var(--link); color: var(--accent-ink); }
.pub-btn-main:focus-visible { clip-path: none; }
.pub-btn-ghost {
  border: 1px solid var(--line-control);
  background: var(--bg);
  color: var(--text);
  font-weight: 600;
}
.pub-btn-ghost:hover { border-color: var(--accent); color: var(--text); }
.pub-arrow { color: var(--accent); }

/* ------------------------------------------------------------------
   Header row 1 (MPG 2.2): badge and wordmark, the Main nav, Join */
.pub-header { position: relative; }

.pub-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 32px;
  padding: 18px var(--edge);
  border-bottom: 1px solid var(--line-chrome);
}

.pub-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  color: var(--text);
  text-decoration: none;
}
.pub-brand:hover { color: var(--text); }
.pub-brand-badge {
  padding: 5px 9px;
  border: 1.5px solid var(--accent);
  background: var(--bg);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: 0.06em;
}
.pub-brand-name {
  font-stretch: 125%;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.pub-brand-small .pub-brand-badge { padding: 4px 8px; font-size: 12px; }
.pub-brand-small .pub-brand-name { font-size: 15px; }

.pub-nav-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 28px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.pub-nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--text-nav);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
}
.pub-nav-link:hover { color: var(--text); }
.pub-nav-link[aria-current] {
  color: var(--accent);
  box-shadow: inset 0 -2px 0 var(--accent);
}

.pub-cta {
  --cut: 12px;
  min-height: 44px;
  padding: 0 22px;
  font-size: 14px;
}

/* ------------------------------------------------------------------
   Header row 2: the Motortown nav, on Motortown pages only (MPG 2.2) */
.pub-subnav {
  background: var(--band);
  border-bottom: 1px solid var(--line-band);
}
.pub-subnav-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 18px;
  padding: 0 var(--edge);
}
.pub-subnav-lead {
  color: var(--label-on-band);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.pub-subnav-list {
  display: flex;
  flex-wrap: wrap;
  margin: 0;
  padding: 0;
  list-style: none;
}
.pub-subnav-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 14px;
  color: var(--text-on-band);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
}
.pub-subnav-link:hover { color: var(--text); }
.pub-subnav-link[aria-current="page"] {
  color: var(--text);
  box-shadow: inset 0 -2px 0 var(--accent);
}
.pub-subnav-link:focus-visible { outline-offset: -2px; }

/* ------------------------------------------------------------------
   Main, the plain page head of the placeholders and error pages, crumbs */
.pub-main { display: block; }
.pub-main:focus { outline: none; }

.pub-head { background: var(--band); }
.pub-head > .pub-wrap { padding-top: 56px; padding-bottom: 64px; }
.pub-compact .pub-head > .pub-wrap { padding-top: 32px; padding-bottom: 40px; }
.pub-title {
  max-width: 10em;
  margin: 16px 0 0;
  font-stretch: 125%;
  font-size: clamp(42px, 5.6vw, 84px);
  font-weight: 800;
  line-height: 0.98;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}
.pub-lead {
  max-width: 34em;
  margin-top: 24px;
  color: var(--text-on-band);
  font-size: 19px;
}
.pub-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 36px;
}
.pub-section > .pub-wrap { padding-top: 48px; padding-bottom: 48px; }

.pub-crumbs {
  color: var(--label-on-band);
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
/* 44 px tall to the touch with no layout shift: the padding is given back
   by the negative margin (DES-12) */
.pub-crumb {
  display: inline-block;
  padding: 12px 0;
  margin: -12px 0;
  color: var(--link);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.pub-crumb:hover { color: var(--link-hover); }
.pub-crumb-sep { color: var(--accent); }
.pub-crumb-here { color: var(--label-on-band); }

/* ------------------------------------------------------------------
   The live strip (DESIGN 5 status strip; MPG 2.3: five states, each with
   words: the state classes only quieten the value, they never carry the
   meaning alone) */
.pub-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 1px;
  border: 1px solid var(--line);
  background: var(--line);
}
.pub-cell {
  flex: 1 1 220px;
  min-width: 0;
  padding: 22px 26px;
  background: var(--surface);
}
.pub-cell-label {
  color: var(--text-subtle);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.pub-cell-value {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
  color: var(--text);
  font-size: 20px;
  font-weight: 600;
  overflow-wrap: anywhere;
}
.pub-cell-note {
  margin-top: 4px;
  color: var(--text-subtle);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
}
.pub-cell-text { min-width: 0; }
.pub-dot {
  flex: 0 0 8px;
  width: 8px;
  height: 8px;
  background: var(--status-ok);
}
.pub-cell-live .pub-cell-value { color: var(--text); }
.pub-cell-stale .pub-cell-value,
.pub-cell-paused .pub-cell-value { color: var(--text-muted); }
.pub-cell-unavailable .pub-cell-value,
.pub-cell-empty .pub-cell-value { color: var(--text-muted); font-weight: 500; }

/* ------------------------------------------------------------------
   Footer (MPG 2.2) */
.pub-footer {
  margin-top: 96px;
  border-top: 1px solid var(--line-chrome);
}
.pub-footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 24px;
  padding: 40px var(--edge) 48px;
}
.pub-footer-brand { flex: 1 1 360px; min-width: 0; }
.pub-footer-nav { flex: 0 1 auto; min-width: 0; }
.pub-legal {
  max-width: 38em;
  margin-top: 16px;
  color: var(--text-subtle);
  font-size: 13px;
}
.pub-footer-list {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 0 28px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.pub-footer-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--text-nav);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
}
.pub-footer-link:hover { color: var(--text); }

/* ------------------------------------------------------------------
   Phones, 640 px and under (MPG 2.2 and 4; owner Q5: a 16 px gutter):
   row 1 is the badge, then the four links across the width, then Join: the
   DOM order, so what you see is the tab order (WCAG 1.3.2, DES-13). The
   Motortown row is a two-column hairline grid of 44 px cells without its
   decorative lead-in (DES-5: the Live Map starts above the fold). No
   sideways scroll. */
@media (max-width: 640px) {
  .pub-body { --gutter: 16px; }
  .pub-nav { flex: 1 1 100%; }
  .pub-nav-list { justify-content: space-between; gap: 0 20px; }
  .pub-subnav-inner { display: block; padding: 0; }
  .pub-subnav-lead { display: none; }
  .pub-subnav-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1px;
    border-top: 1px solid var(--line-band);
    background: var(--line-band);
  }
  .pub-subnav-list > li { background: var(--band); }
  /* five tabs (resources v1): the last one takes the whole third row */
  .pub-subnav-list > li:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .pub-subnav-link { display: flex; padding: 0 var(--gutter); }
  .pub-btn { min-height: 52px; padding: 0 22px; }
  .pub-cta { min-height: 44px; }
  .pub-head > .pub-wrap { padding-top: 40px; padding-bottom: 48px; }
}

/* Under 375 px the four links keep one row (DES-13; at 360 px, a common
   phone width, they need 333 px of 328) */
@media (max-width: 374px) {
  .pub-nav-link { font-size: 13px; letter-spacing: 0.04em; }
  .pub-nav-list { gap: 0 12px; }
}

/* ------------------------------------------------------------------
   Reduced motion: nothing moves (HD 8) */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition: none !important;
    animation: none !important;
    scroll-behavior: auto !important;
  }
}

/* ------------------------------------------------------------------
   Forced colours: shapes drawn by fills get outlines, the current link an
   underline (MPG 4) */
@media (forced-colors: active) {
  .pub-btn-main { clip-path: none; border: 1px solid ButtonText; }
  .pub-brand-badge { border-color: CanvasText; }
  .pub-dot { outline: 1px solid CanvasText; }
  .pub-nav-link[aria-current],
  .pub-subnav-link[aria-current="page"] { text-decoration: underline 2px; }
}

/* ==================================================================
   Wave 2: page components below this line (W2-PAGES, W2-MAP). */

/* ------------------------------------------------------------------
   W2-PAGES (public/pages/parts.py and the page modules): the page
   components of MPG 1.5 on the Night Drive tokens. Every class a page
   emits has a rule here (test_public_pages). Colours are tokens only; the
   road's mask and lane dashes are the only gradients (.pub-road rules);
   decorative pieces are aria-hidden in the markup; text is never clamped
   (long words wrap anywhere); 44 px or more for every link and control. */

/* Buttons and text links (DESIGN 5) */
.pub-btn { text-align: center; }
.pub-btn-wrap { padding-top: 10px; padding-bottom: 10px; line-height: 1.35; }
.pub-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  margin-top: 8px;
  color: var(--accent);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
}
.pub-link:hover { color: var(--link-hover); text-decoration: underline; text-underline-offset: 4px; }
.pub-link:hover .pub-arrow { color: var(--link-hover); }
.pub-mono { font-family: var(--font-mono); }
/* JetBrains Mono is loaded at 400-500 only: mono inside a bold value or
   heading stays at 500, never a synthesised bold (DES-11) */
.pub-time, .pub-mono, .pub-tag, .pub-local, .pub-toc-code { font-weight: 500; }

/* A live value inline (key-value rows, meta rows): words carry the state;
   the classes only quieten them */
.pub-state-note {
  color: var(--text-subtle);
  font-family: var(--font-mono);
  font-size: 0.8em;
  font-weight: 400;
}
.pub-state-live { color: inherit; }
.pub-state-stale,
.pub-state-paused { color: var(--text-muted); }
.pub-state-unavailable,
.pub-state-empty { color: var(--text-muted); font-weight: 500; }
.pub-meta .pub-state { color: inherit; font-weight: inherit; }

/* The inner-page header (DESIGN 4b): the band on the accent, its bottom
   edge rising "/" with a 4 px accent line; the road behind the text on the
   right, clipped like the band. Also the error and compact headers. */
.pub-head {
  position: relative;
  overflow: hidden;
  background: var(--accent);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - var(--slant-head)), 0 100%);
}
.pub-head::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--band);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - var(--slant-head) - 4px), 0 calc(100% - 4px));
}
.pub-head-deco {
  position: absolute;
  inset: 0;
  overflow: hidden;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - var(--slant-head) - 4px), 0 calc(100% - 4px));
}
.pub-head > .pub-wrap {
  position: relative;
  z-index: 1;
  padding-top: 64px;
  padding-bottom: calc(var(--slant-head) + 80px);
}
.pub-head .pub-title { margin-top: 24px; }
.pub-compact .pub-head > .pub-wrap {
  padding-top: 40px;
  padding-bottom: calc(var(--slant-head) + 40px);
}
.pub-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
  color: var(--label-on-band);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* The road (DESIGN 4c): top-down, skewed "/", faded at both ends. The page
   header's is 300 px at right 7 percent (hidden under 760 px); the home
   hero's is 620 px in its own column. Static: nothing moves. */
.pub-road {
  position: absolute;
  display: flex;
  transform: skewX(-14deg);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, var(--bg) 20%, var(--bg) 72%,
    transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0%, var(--bg) 20%, var(--bg) 72%,
    transparent 100%);
}
.pub-road-head { top: -60px; bottom: -60px; right: 7%; width: 300px; }
.pub-road-verge { flex: 0 0 56px; background: var(--road-verge-head); }
.pub-road-kerb { flex: 0 0 2px; background: var(--road-kerb-head); }
.pub-road-lines {
  display: flex;
  flex: 0 0 22px;
  gap: 4px;
  padding-left: 7px;
  background: var(--road-surface-head);
}
.pub-road-lines-r { justify-content: flex-end; padding-left: 0; padding-right: 7px; }
.pub-road-line { flex: 0 0 2px; background: var(--road-lines); }
.pub-road-lane { position: relative; flex: 1 1 auto; background: var(--road-surface-head); }
.pub-road-dashes {
  flex: 0 0 5px;
  opacity: 0.8;
  background: repeating-linear-gradient(to bottom, var(--accent) 0 36px, transparent 36px 76px);
}
.pub-road-light { position: absolute; top: 52%; width: 6px; height: 4px; background: var(--taillight); }
.pub-road-light-a { left: 26px; }
.pub-road-light-b { left: 46px; }
.pub-road-hero {
  top: -88px;
  bottom: -420px;
  left: 0;
  width: 620px;
  transform-origin: 50% 40%;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, var(--bg) 14%, var(--bg) 78%,
    transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0%, var(--bg) 14%, var(--bg) 78%,
    transparent 100%);
}
.pub-road-hero .pub-road-verge { flex-basis: 110px; background: var(--road-verge); }
.pub-road-hero .pub-road-kerb { background: var(--road-kerb); }
.pub-road-hero .pub-road-lines { flex-basis: 28px; gap: 5px; padding-left: 9px;
  background: var(--road-surface); }
.pub-road-hero .pub-road-lines-r { padding-left: 0; padding-right: 9px; }
.pub-road-hero .pub-road-lane { background: var(--road-surface); }
.pub-road-hero .pub-road-dashes {
  flex-basis: 6px;
  background: repeating-linear-gradient(to bottom, var(--accent) 0 44px, transparent 44px 92px);
}
.pub-road-hero .pub-road-light { top: 46%; width: 7px; }
.pub-road-hero .pub-road-light-a { left: 34px; }
.pub-road-hero .pub-road-light-b { left: 60px; }

/* The home hero (DESIGN 6 Home 1-2): text left, the road right, the live
   strip under both (the road fades out behind it) */
.pub-hero { position: relative; overflow: hidden; }
.pub-hero-inner {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 56px;
  max-width: var(--container);
  margin: 0 auto;
  padding: 88px var(--gutter) 56px;
}
/* The text column is a size container (owner 2026-10-29): the title's size
   follows the column, so CAMARADERIE never breaks inside the word */
.pub-hero-text { position: relative; z-index: 1; flex: 1 1 600px; min-width: 0;
  container-type: inline-size; }
.pub-hero-art { position: relative; flex: 1 1 400px; min-width: 0; min-height: 440px;
  align-self: stretch; }
.pub-eyebrow {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 28px;
  color: var(--text-subtle);
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.pub-eyebrow-bar { flex: 0 0 28px; height: 2px; background: var(--accent); }
.pub-hero-title {
  margin: 0;
  font-stretch: 125%;
  font-size: clamp(30px, 4.4vw, 60px);   /* a browser without container units */
  font-size: clamp(30px, 8.8cqi, 92px);  /* the longest word in about 90% of the column */
  font-weight: 800;
  line-height: 0.98;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}
.pub-hero-lead { max-width: 32em; margin-top: 28px; color: var(--text-muted); font-size: 19px; }
/* the definition, then the lead (owner 2026-10-29): one idea, two lines */
.pub-hero-lead + .pub-hero-lead { margin-top: 14px; }
.pub-hero-strip {
  position: relative;
  z-index: 1;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter) 72px;
}

/* Content sections in the 1280 px container */
.pub-segment {
  max-width: var(--container);
  margin: 0 auto;
  padding: 112px var(--gutter) 0;
  scroll-margin-top: 16px;
}
.pub-head + .pub-segment,
.pub-segment-first { padding-top: 64px; }
.pub-segment-crew + .pub-segment-crew { padding-top: 88px; }
.pub-empty { color: var(--text-muted); }

/* The junction-sign section header (DESIGN 5): the chamfered code, the
   label (mono) or title (uppercase H2), the dashed connector */
.pub-junction { display: flex; align-items: center; gap: 14px; margin-bottom: 48px; }
.pub-junction-code {
  --cut: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  min-width: 50px;
  height: 32px;
  padding: 0 14px 0 10px;
  background: var(--accent);
  color: var(--accent-ink);
  font-stretch: 125%;
  font-size: 14px;
  font-weight: 800;
  clip-path: polygon(0 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% 100%, 0 100%);
}
.pub-junction-label {
  margin: 0;
  min-width: 0;
  color: var(--text-subtle);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}
.pub-junction-title {
  margin: 0;
  min-width: 0;
  font-stretch: 125%;
  font-size: 26px;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}
.pub-junction-dash { flex: 1 1 auto; min-width: 24px; border-top: 2px dashed var(--line); }
.pub-band .pub-junction-label { color: var(--label-on-band); }
.pub-band .pub-junction-dash { border-top-color: var(--line-strong); }

/* J1: the statement and the numbered principles; numbered rows everywhere
   (DESIGN 5) */
.pub-idea { display: flex; flex-wrap: wrap; gap: 40px 72px; }
.pub-statement {
  flex: 1 1 440px;
  min-width: 0;
  margin: 0;
  font-stretch: 112%;
  font-size: clamp(32px, 3.6vw, 52px);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.01em;
  overflow-wrap: anywhere;
}
.pub-rows { min-width: 0; margin: 0; padding: 0; list-style: none; }
.pub-row {
  display: flex;
  gap: 24px;
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
  scroll-margin-top: 16px;
}
.pub-rows-idea { flex: 1 1 440px; }
.pub-rows-idea .pub-row { padding: 26px 0; border-top: 1px solid var(--line); border-bottom: 0; }
.pub-rows-idea .pub-row:last-child { border-bottom: 1px solid var(--line); }
.pub-row-code {
  flex: 0 0 44px;
  padding-top: 3px;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 13px;
}
.pub-row-body { flex: 1 1 auto; min-width: 0; }
.pub-row-title { margin: 0; font-size: 19px; font-weight: 700; line-height: 1.35;
  overflow-wrap: anywhere; }
.pub-rows-idea .pub-row-title { font-size: 20px; }
.pub-rows-privacy .pub-row-title { font-stretch: 112%; font-size: 22px; }
.pub-row-text { margin-top: 6px; color: var(--text-muted); overflow-wrap: anywhere; }
/* Long rule texts keep a readable line, about 80 to 90 characters (DES-17) */
.pub-rows-rules .pub-row-text { max-width: 44em; }
.pub-row-body > .pub-row-text:first-child { margin-top: 0; }
.pub-row-title .pub-tag { margin-right: 6px; vertical-align: 3px; }

/* Rule texts (markup.rule_html: p, br, ul, li, strong, em, a), prose and
   square-bullet lists (DESIGN 3: bullets are 8 px squares) */
.pub-md p + p,
.pub-md p + ul,
.pub-md ul + p,
.pub-md ul + ul,
.pub-prose p + p,
.pub-prose p + ul,
.pub-prose ul + p { margin-top: 12px; }
.pub-md ul,
.pub-list,
.pub-checklist { margin: 0; padding: 0; list-style: none; }
.pub-md li,
.pub-list li,
.pub-checklist li { position: relative; padding-left: 22px; }
.pub-md li + li,
.pub-list li + li { margin-top: 6px; }
.pub-md li::before,
.pub-list li::before,
.pub-checklist li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.58em;
  width: 8px;
  height: 8px;
  background: var(--accent);
}
.pub-md strong { color: var(--text); font-weight: 700; }
.pub-md a,
.pub-prose a,
.pub-point-text a,
.pub-checklist a { color: var(--link); text-underline-offset: 3px; }
.pub-md a:hover,
.pub-prose a:hover,
.pub-point-text a:hover,
.pub-checklist a:hover { color: var(--link-hover); }
.pub-prose { max-width: 52em; }
.pub-intro { max-width: 46em; margin: 0 0 12px; color: var(--text-muted); }
.pub-updated {
  margin-top: 16px;
  color: var(--text-subtle);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* The angled band (DESIGN 4a): two clipped layers, the accent line showing
   along the top edge; the closing call to action: straight bottom and the
   faint second slanted panel */
.pub-band {
  margin-top: 128px;
  background: var(--accent);
  clip-path: polygon(0 var(--slant), 100% 0, 100% calc(100% - var(--slant)), 0 100%);
  scroll-margin-top: 16px;
}
.pub-band-inner {
  position: relative;
  background: var(--band);
  clip-path: polygon(0 calc(var(--slant) + 4px), 100% 4px, 100% calc(100% - var(--slant)), 0 100%);
}
.pub-band-body {
  position: relative;
  max-width: var(--container);
  margin: 0 auto;
  padding: calc(var(--slant) + 88px) var(--gutter) calc(var(--slant) + 96px);
  color: var(--text-on-band);
}
.pub-band-cta { clip-path: polygon(0 var(--slant), 100% 0, 100% 100%, 0 100%); }
.pub-band-cta:last-child { margin-bottom: -96px; }
.pub-band-cta > .pub-band-inner {
  overflow: hidden;
  clip-path: polygon(0 calc(var(--slant) + 4px), 100% 4px, 100% 100%, 0 100%);
}
.pub-band-panel {
  position: absolute;
  inset: 0;
  background: var(--band-panel);
  clip-path: polygon(78% 0, 100% 0, 100% 100%, 62% 100%);
}
.pub-band-cta .pub-band-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: calc(var(--slant) + 104px) var(--gutter) 112px;
  text-align: center;
}
.pub-band-cta .pub-actions { justify-content: center; }
.pub-cta-title {
  margin: 0;
  color: var(--text);
  font-stretch: 125%;
  font-size: clamp(36px, 5vw, 72px);
  font-weight: 800;
  line-height: 1;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}
.pub-cta-text { max-width: 30em; margin-top: 20px; color: var(--text-muted); font-size: 18px; }
.pub-band-split {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}
.pub-band-copy { flex: 1 1 480px; min-width: 0; }
.pub-band-split > .pub-actions { margin-top: 0; }
.pub-band-kicker {
  margin: 0 0 14px;
  color: var(--label-on-band);
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.pub-band-title {
  margin: 0;
  max-width: 16em;
  color: var(--text);
  font-stretch: 125%;
  font-size: clamp(30px, 3.6vw, 52px);
  font-weight: 800;
  line-height: 1.02;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}
.pub-band-text { max-width: 32em; margin-top: 16px; color: var(--text-on-band); font-size: 18px; }
.pub-band .pub-strip { background: var(--line-band); border-color: var(--line-band); }
.pub-band .pub-cell { background: var(--surface-sunk); }
.pub-band .pub-panel { background: var(--surface-sunk); border-color: var(--line-band); }

/* The feature panel (DESIGN 5) and crop marks (DESIGN 3) */
.pub-panel {
  position: relative;
  padding: 36px;
  border: 1px solid var(--line);
  background: var(--surface);
}
.pub-crop::before,
.pub-crop::after {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  pointer-events: none;
}
.pub-crop::before {
  left: -8px;
  top: -8px;
  border-left: 2px solid var(--accent);
  border-top: 2px solid var(--accent);
}
.pub-crop::after {
  right: -8px;
  bottom: -8px;
  border-right: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
}
.pub-crop-tl::after { display: none; }
.pub-panel-title {
  margin: 0;
  font-stretch: 125%;
  font-size: clamp(24px, 2.6vw, 32px);
  font-weight: 800;
  line-height: 1.05;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}
.pub-panel-subtitle {
  margin: 0;
  font-stretch: 125%;
  font-size: 20px;
  font-weight: 800;
  text-transform: uppercase;
}
.pub-panel-text { max-width: 34em; margin-top: 10px; color: var(--text-muted); }
.pub-cta-panel {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.pub-cta-panel-body { flex: 1 1 340px; min-width: 0; }
.pub-cta-panel .pub-link { margin-top: 0; }
.pub-notice { max-width: 46em; padding: 28px; border: 1px solid var(--line);
  background: var(--surface); }
.pub-notice-title { margin: 0; font-stretch: 112%; font-size: 20px; font-weight: 700;
  text-transform: uppercase; overflow-wrap: anywhere; }
.pub-notice-text { margin-top: 8px; color: var(--text-muted); }
.pub-notice .pub-actions { margin-top: 24px; }

/* Activity tiles (DESIGN 5), also the help tiles */
.pub-tiles {
  display: flex;
  flex-wrap: wrap;
  gap: 1px;
  margin: 0;
  padding: 0;
  list-style: none;
  border: 1px solid var(--line);
  background: var(--line);
}
.pub-tile { flex: 1 1 260px; min-width: 0; padding: 32px; background: var(--surface); }
.pub-band .pub-tiles { border-color: var(--line-band); background: var(--line-band); }
.pub-band .pub-tile { background: var(--surface-sunk); }
.pub-tile-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.pub-tile-index { margin-left: auto; color: var(--text-subtle); font-family: var(--font-mono);
  font-size: 12px; }
.pub-tile-title {
  margin: 28px 0 0;
  font-stretch: 112%;
  font-size: 21px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}
.pub-tile-text { margin-top: 8px; color: var(--text-muted); overflow-wrap: anywhere; }
/* Headings inside a band are --text like every card heading, not the
   band's body colour (DES-1) */
.pub-tile-title, .pub-game-title { color: var(--text); }
/* A tile without an icon: the title right under the index (DES-16) */
.pub-tile-plain .pub-tile-title { margin-top: 6px; }
.pub-icon {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  color: var(--accent);
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: square;
  stroke-linejoin: miter;
}

/* Steps (DESIGN 5): numbered squares and dashed connectors; the last square
   filled and chamfered (the destination) */
.pub-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 40px 32px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.pub-step { flex: 1 1 300px; min-width: 0; }
.pub-step-top { display: flex; align-items: center; gap: 14px; }
.pub-step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  border: 2px solid var(--accent);
  color: var(--accent);
  font-stretch: 125%;
  font-size: 18px;
  font-weight: 800;
}
.pub-step-end .pub-step-num {
  --cut: 12px;
  border: 0;
  background: var(--accent);
  color: var(--accent-ink);
  clip-path: polygon(0 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% 100%, 0 100%);
}
.pub-step-dash { flex: 1 1 auto; border-top: 2px dashed var(--line-strong); }
.pub-step-title {
  margin: 24px 0 0;
  font-stretch: 112%;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}
.pub-step-text { margin-top: 8px; color: var(--text-muted); overflow-wrap: anywhere; }
/* The steps as one hairline strip (REF appeals 59-77; Support's appeals,
   DES-3): three cells on one row wherever the content column is 542 px or
   more, so beside the sidebar too; stacked on phones */
.pub-steps-strip {
  gap: 1px;
  border: 1px solid var(--line);
  background: var(--line);
}
.pub-steps-strip .pub-step { flex: 1 1 180px; padding: 28px; background: var(--surface); }
.pub-steps-strip .pub-step-top { gap: 12px; }
.pub-steps-strip .pub-step-num { flex-basis: 40px; width: 40px; height: 40px; font-size: 16px; }
.pub-steps-strip .pub-step-end .pub-step-num { --cut: 10px; }
.pub-steps-strip .pub-step-title { margin-top: 18px; font-size: 20px; }
.pub-steps-strip .pub-step-text { margin-top: 6px; font-size: 15px; }

/* J2: the games area, designed to grow (MPG 2.4.1) */
.pub-games { display: flex; flex-direction: column; gap: 40px; margin: 0; padding: 0;
  list-style: none; }
.pub-game {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 32px 48px;
  padding: 40px;
}
.pub-game-featured { padding: 48px 40px; }
.pub-game-text { flex: 1 1 420px; min-width: 0; }
.pub-game-live { flex: 1 1 360px; min-width: 0; }
.pub-game-live .pub-cell { flex-basis: 160px; }
.pub-kicker {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 12px;
  margin: 0;
  color: var(--label-on-band);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.pub-kicker-code { color: var(--accent); }
.pub-game-title {
  margin: 14px 0 0;
  font-stretch: 125%;
  font-size: clamp(32px, 3.6vw, 48px);
  font-weight: 800;
  line-height: 1;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}
.pub-game-line { max-width: 30em; margin-top: 12px; color: var(--text-muted); font-size: 18px; }

/* Sidebar layouts (Rules, Support; REF rules 61-76): contents, notes */
.pub-layout {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 48px 72px;
  max-width: var(--container);
  margin: 0 auto;
  padding: 64px var(--gutter) 0;
}
.pub-aside { flex: 1 1 220px; min-width: 0; }
.pub-content { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 72px; }
.pub-rule-section { min-width: 0; scroll-margin-top: 16px; }
.pub-rule-section .pub-junction { margin-bottom: 12px; }
.pub-rows-rules { margin-top: 4px; }
.pub-toc { min-width: 0; }
.pub-toc-title,
.pub-note-title {
  margin: 0;
  color: var(--text-subtle);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.pub-toc-title { margin-bottom: 12px; }
.pub-toc-list { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.pub-toc-link {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 52px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  color: var(--text);
  font-weight: 600;
  line-height: 1.35;
  text-decoration: none;
}
.pub-toc-link:hover { color: var(--link-hover); }
.pub-toc-link:hover .pub-toc-text { text-decoration: underline; text-underline-offset: 3px; }
.pub-toc-code { flex: 0 0 auto; color: var(--accent); font-family: var(--font-mono);
  font-size: 12px; }
.pub-toc-text { min-width: 0; overflow-wrap: anywhere; }
.pub-note { margin-top: 24px; padding: 20px 22px; border: 1px solid var(--line);
  background: var(--surface); }
.pub-note-text { margin-top: 6px; color: var(--text-muted); font-size: 15px; }
.pub-note .pub-link { margin-top: 4px; }
.pub-note-wide { max-width: 46em; margin-top: 32px; }
.pub-section-lead { max-width: 40em; margin: 0 0 20px; color: var(--text-muted); font-size: 18px; }
.pub-section-text { max-width: 40em; margin-top: 16px; color: var(--text-muted); }
.pub-section-text + .pub-tiles { margin-top: 20px; }
.pub-rule-section .pub-steps { margin-top: 32px; }
.pub-before { max-width: 46em; margin-top: 40px; padding: 28px; }
.pub-checklist { display: flex; flex-direction: column; gap: 14px; margin-top: 18px; }
.pub-checklist li { color: var(--text-muted); font-size: 15px; }

/* Key-value rows (DESIGN 9e kv, Overview's server details) */
.pub-details-panel { max-width: 860px; }
.pub-kv { display: flex; flex-direction: column; margin: 0; }
.pub-kv-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 24px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}
.pub-kv-row:last-child { border-bottom: 1px solid var(--line); }
.pub-kv-key {
  flex: 0 0 180px;
  padding-top: 3px;
  color: var(--text-subtle);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.pub-kv-value { flex: 1 1 240px; min-width: 0; margin: 0; color: var(--text); font-weight: 600;
  overflow-wrap: anywhere; }

/* Events (DESIGN 5: event rows, the countdown; MPG 2.4.4) */
.pub-next { display: flex; flex-wrap: wrap; gap: 40px 48px; padding: 40px; }
.pub-next-main { flex: 1 1 460px; min-width: 0; }
.pub-next-side { flex: 1 1 380px; min-width: 0; }
.pub-next-head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; }
.pub-badge {
  --cut: 10px;
  display: inline-flex;
  align-items: center;
  height: 30px;
  padding: 0 16px 0 12px;
  background: var(--accent);
  color: var(--accent-ink);
  font-stretch: 125%;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  clip-path: polygon(0 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% 100%, 0 100%);
}
.pub-badge-live { background: var(--link); }
.pub-next-date {
  color: var(--text-subtle);
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.pub-next-title {
  margin: 22px 0 0;
  font-stretch: 125%;
  font-size: clamp(32px, 3.6vw, 48px);
  font-weight: 800;
  line-height: 1.02;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}
/* Event names are user content: long words break with a hyphen where the
   language allows (lang="en"), not just anywhere (DES-27) */
.pub-next-title,
.pub-event-title { -webkit-hyphens: auto; hyphens: auto; }
.pub-next-series { margin-top: 10px; color: var(--accent); font-family: var(--font-mono);
  font-size: 13px; letter-spacing: 0.08em; }
.pub-next-text { max-width: 36em; margin-top: 14px; color: var(--text-muted);
  overflow-wrap: anywhere; }
.pub-next-main .pub-tags { margin-top: 14px; }
.pub-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.pub-tag {
  display: inline-block;
  padding: 2px 10px;
  border: 1px solid var(--line-strong);
  color: var(--text-nav);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  line-height: 1.6;
  text-transform: uppercase;
}
.pub-tag-live { border-color: var(--accent); color: var(--accent); }
.pub-tag-role { border-color: var(--line-control); }
.pub-info {
  display: flex;
  flex-wrap: wrap;
  gap: 1px;
  margin: 0;
  border: 1px solid var(--line);
  background: var(--line);
}
.pub-info-cell { flex: 1 1 160px; min-width: 0; padding: 14px 18px; background: var(--surface-sunk); }
/* Next up: the four cells as an even 2x2 grid (DES-14) */
.pub-next .pub-info-cell { flex: 1 1 calc(50% - 1px); }
.pub-info-label {
  color: var(--text-subtle);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.pub-info-value { margin: 2px 0 0; font-weight: 600; overflow-wrap: anywhere; }
/* The countdown block (public.js recomputes it while the page is open, DES-4) */
.pub-count-block { min-width: 0; }
.pub-countdown { display: flex; gap: 8px; margin-top: 24px; }
.pub-count {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 0 0 auto;
  min-width: 84px;
  padding: 10px 14px;
  border: 1px solid var(--line-strong);
}
.pub-count-value { font-stretch: 125%; font-size: 28px; font-weight: 800; line-height: 1.1; }
.pub-count-mins .pub-count-value { color: var(--accent); }
.pub-count-unit {
  color: var(--text-subtle);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.pub-count-text { margin-top: 12px; color: var(--text-muted); font-size: 15px; }
.pub-next-side .pub-actions { margin-top: 28px; }
.pub-events {
  display: flex;
  flex-direction: column;
  gap: 1px;
  margin: 0;
  padding: 0;
  list-style: none;
  border: 1px solid var(--line);
  background: var(--line);
}
.pub-event {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 16px 32px;
  padding: 24px 28px;
  background: var(--surface);
  scroll-margin-top: 16px;
}
.pub-event-date { display: flex; flex-direction: column; flex: 0 0 88px; }
.pub-event-day { font-stretch: 125%; font-size: 34px; font-weight: 800; line-height: 1; }
.pub-event-month {
  margin-top: 4px;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.pub-event-main { flex: 1 1 320px; min-width: 0; }
.pub-event-title {
  margin: 8px 0 0;
  font-stretch: 112%;
  font-size: 21px;
  font-weight: 700;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}
.pub-event-meta { margin-top: 2px; color: var(--text-muted); overflow-wrap: anywhere; }
.pub-event-time {
  flex: 0 1 auto;
  min-width: 0;
  padding-top: 4px;
  color: var(--text-nav);
  font-family: var(--font-mono);
  font-size: 14px;
}
.pub-details { margin-top: 6px; }
.pub-details-summary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  list-style: none;
}
.pub-details-summary::-webkit-details-marker { display: none; }
.pub-details-summary:hover { color: var(--link-hover); }
.pub-details-summary .pub-arrow { display: inline-block; }
.pub-details[open] .pub-details-summary .pub-arrow { transform: rotate(90deg); }
.pub-details-body { max-width: 44em; padding: 4px 0 8px; color: var(--text-muted);
  overflow-wrap: anywhere; }
.pub-details-body p + p { margin-top: 10px; }

/* Events v2 (the owner, 2026-10-26; events_v2 CONTRACT 2.3): banners, E2
   championship standings, E3 the rear-view mirror (REF events E2). A banner
   is the host's picture: object-fit crops it to its box, and a
   --surface-deep well shows while it loads. Tables scroll sideways inside
   their own box, never the page. */
/* Banners: across the top of Next up at its own aspect ratio (at most
   360 px tall), a 16:9 thumbnail beside an E1 row's text */
.pub-next-banner {
  flex: 0 0 calc(100% + 80px);
  min-width: 0;
  margin: -40px -40px 0;
  border-bottom: 1px solid var(--line);
  background: var(--surface-deep);
}
.pub-next-img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 360px;
  object-fit: cover;
}
.pub-event-thumb { flex: 0 0 176px; min-width: 0; }
.pub-event-img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border: 1px solid var(--line);
  background: var(--surface-deep);
}

/* E2: one panel per championship: the head, the standings, then the rounds
   and the races side by side where there is room */
.pub-champs { display: flex; flex-direction: column; gap: 40px; }
.pub-champ { min-width: 0; padding: 36px 40px 40px; }
.pub-champ-head { max-width: 60em; }
.pub-champ-status {
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.pub-champ-title {
  margin: 12px 0 0;
  font-stretch: 125%;
  font-size: clamp(26px, 2.8vw, 36px);
  font-weight: 800;
  line-height: 1.05;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}
.pub-champ-meta { margin-top: 10px; color: var(--text-muted); overflow-wrap: anywhere; }
.pub-champ-empty { max-width: 40em; margin-top: 28px; color: var(--text-muted); }
.pub-champ-cols { display: flex; flex-wrap: wrap; gap: 32px 56px; margin-top: 40px; }
.pub-champ-col { flex: 1 1 360px; min-width: 0; }
.pub-champ-label {
  margin: 0 0 12px;
  color: var(--text-subtle);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
/* Data tables (DESIGN 9e at the public site's weight): mono column heads,
   hairline rows, numbers right-aligned in mono; the top three places in the
   accent with an inset bar (the medals, in words) */
.pub-table-wrap {
  max-width: 100%;
  margin-top: 28px;
  overflow-x: auto;
  border: 1px solid var(--line);
}
.pub-table { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 1.45; }
.pub-table-standings { min-width: 640px; }
.pub-table-caption {
  padding: 14px 16px;
  caption-side: top;
  color: var(--text-subtle);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-align: left;
  text-transform: uppercase;
}
.pub-table th,
.pub-table td {
  padding: 11px 16px;
  border-top: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}
.pub-table thead th {
  background: var(--surface-sunk);
  color: var(--text-subtle);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
}
.pub-table-results th,
.pub-table-results td { padding: 9px 14px; }
.pub-table .pub-num { text-align: right; font-family: var(--font-mono); white-space: nowrap; }
.pub-table tbody .pub-num { font-weight: 500; }
.pub-driver { color: var(--text); font-weight: 600; overflow-wrap: anywhere; }
.pub-pos {
  color: var(--text-nav);
  font-family: var(--font-mono);
  font-weight: 500;
  white-space: nowrap;
}
.pub-podium .pub-pos { color: var(--accent); box-shadow: inset 3px 0 0 var(--accent); }
.pub-podium .pub-driver { font-weight: 700; }
.pub-adj { color: var(--text-subtle); font-size: 0.85em; }
.pub-round-tags { gap: 6px; }
.pub-race-time { font-family: var(--font-mono); font-weight: 500; }
.pub-rounds { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.pub-round {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.pub-round-code {
  flex: 0 0 auto;
  min-width: 72px;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 13px;
}
.pub-round-name { flex: 1 1 180px; min-width: 0; color: var(--text); font-weight: 600;
  overflow-wrap: anywhere; }
.pub-round-state { flex: 0 1 auto; min-width: 0; color: var(--text-muted); font-size: 15px; }
.pub-round-live { color: var(--accent); }
.pub-race .pub-details-body { max-width: none; }
.pub-race .pub-table-wrap { margin-top: 4px; }

/* E3 the rear-view mirror (REF events E2): the newest event large over two
   thirds of the row and two rows tall, the next two beside it (picture
   left, words right), the rest three to a row. A picture fills its well; a
   plain well shows the type word, like the reference's placeholder. */
.pub-past {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.pub-past-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  border: 1px solid var(--line);
  background: var(--surface);
}
.pub-past-lead { grid-column: span 2; grid-row: span 2; }
.pub-past-lead:only-child { grid-column: 1 / -1; }
.pub-past-side { flex-direction: row; }
/* Two past events: the second is as tall as the first, picture above words */
.pub-past-lead + .pub-past-side:last-child { grid-row: span 2; flex-direction: column; }
.pub-past-media {
  position: relative;
  flex: 0 0 auto;
  overflow: hidden;
  background: var(--surface-deep);
}
.pub-past-side .pub-past-media { flex: 0 0 42%; border-right: 1px solid var(--line); }
.pub-past-lead + .pub-past-side:last-child .pub-past-media { border-right: 0; }
/* A banner's well: 16:9; the large card's grows (at least 360 px), as does
   the second of two */
.pub-past-pic { aspect-ratio: 16 / 9; }
.pub-past-lead .pub-past-pic { flex: 1 1 auto; min-height: 360px; aspect-ratio: auto; }
.pub-past-side .pub-past-pic { aspect-ratio: auto; }
.pub-past-lead + .pub-past-side:last-child .pub-past-pic { flex: 1 1 auto; }
.pub-past-img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
/* No banner (orchestrator 2026-10-26): a short plain well, about 120 px on
   every card size, the type word in it; a stacked horizontal card keeps its
   narrow, full-height well */
.pub-past-plain {
  display: flex;
  align-items: flex-end;
  height: 120px;
  padding: 20px 22px;
  background: var(--surface-sunk);
}
.pub-past-side .pub-past-plain { height: auto; }
.pub-past-lead + .pub-past-side:last-child .pub-past-plain { flex: 0 0 auto; height: 120px; }
.pub-past-word,
.pub-past-date {
  color: var(--text-subtle);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.pub-past-body { flex: 1 1 auto; min-width: 0; padding: 18px 22px 22px; }
/* where the picture grows to fill the card, the words keep their height */
.pub-past-lead .pub-past-body,
.pub-past-lead + .pub-past-side:last-child .pub-past-body { flex: 0 0 auto; }
.pub-past-title {
  margin: 6px 0 0;
  font-stretch: 112%;
  font-size: 19px;
  font-weight: 700;
  line-height: 1.25;
  text-transform: uppercase;
  overflow-wrap: anywhere;
  -webkit-hyphens: auto;
  hyphens: auto;
}
.pub-past-lead .pub-past-title {
  font-stretch: 125%;
  font-size: clamp(24px, 2.4vw, 32px);
  font-weight: 800;
  line-height: 1.05;
}
.pub-past-series { margin-top: 6px; color: var(--accent); font-family: var(--font-mono);
  font-size: 13px; letter-spacing: 0.08em; }
.pub-past-body .pub-tags { margin-top: 12px; }
.pub-past-meta,
.pub-past-haul { margin-top: 12px; color: var(--text-muted); font-size: 15px;
  overflow-wrap: anywhere; }
.pub-past-haul { margin-top: 4px; }

/* Crew (DESIGN 5 team cards; MPG 2.4.6) */
.pub-rank-line { max-width: 40em; margin: -28px 0 32px; color: var(--text-muted); }
.pub-leads { display: flex; flex-wrap: wrap; gap: 40px; margin: 0; padding: 0; list-style: none; }
.pub-lead-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  flex: 1 1 520px;
  min-width: 0;
  gap: 28px 40px;
  padding: 40px;
}
.pub-lead-body { flex: 1 1 260px; min-width: 0; }
.pub-lead-body .pub-panel-text { margin-top: 12px; }
.pub-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 64px;
  width: 64px;
  height: 64px;
  border: 1.5px solid var(--line-strong);
  color: var(--text-subtle);
  font-stretch: 125%;
  font-size: 24px;
  font-weight: 800;
}
.pub-avatar-lead {
  --cut: 28px;
  flex-basis: 168px;
  width: 168px;
  height: 168px;
  border: 0;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 72px;
  clip-path: polygon(0 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% 100%, 0 100%);
}
.pub-rank-tag {
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 14px 0 10px;
  border: 1.5px solid var(--accent);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.pub-lead-name {
  margin: 14px 0 0;
  font-stretch: 125%;
  font-size: clamp(28px, 3vw, 40px);
  font-weight: 800;
  line-height: 1.05;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}
/* The team grid: three cards to a row, hairlines drawn by each card's own
   border (overlapping by 1 px), so a lone card keeps its third instead of
   stretching across the row (DES-15) */
.pub-team {
  display: flex;
  flex-wrap: wrap;
  margin: 0;
  padding: 0 1px 1px 0;
  list-style: none;
}
.pub-member {
  display: flex;
  align-items: flex-start;
  flex: 0 1 33.333%;
  min-width: 0;
  gap: 20px;
  margin: 0 -1px -1px 0;
  padding: 28px;
  border: 1px solid var(--line);
  background: var(--surface);
}
.pub-member-body { min-width: 0; }
.pub-member-name {
  margin: 0;
  font-stretch: 112%;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.25;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}
.pub-member-rank {
  margin-top: 4px;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.pub-points { display: flex; flex-wrap: wrap; gap: 32px 48px; margin: 56px 0 0; padding: 0;
  list-style: none; }
.pub-point { flex: 1 1 280px; min-width: 0; padding-top: 22px; border-top: 2px solid var(--line-strong); }
.pub-point:first-child { border-top-color: var(--accent); }
.pub-point-code { color: var(--accent); font-family: var(--font-mono); font-size: 13px; }
.pub-point-title {
  margin: 8px 0 0;
  color: var(--text);
  font-stretch: 112%;
  font-size: 21px;
  font-weight: 700;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}
.pub-point-text { margin-top: 8px; color: var(--text-on-band); }
.pub-apply {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  padding: 48px 40px;
}
.pub-apply-body { flex: 1 1 480px; min-width: 0; }
.pub-apply .pub-actions { margin-top: 0; }
.pub-status-line {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  color: var(--text-subtle);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* At 1080 px and under the page header's road goes: below that the lead
   keeps its width and the road would run behind it, which DESIGN 4c
   forbids (DES-6) */
@media (max-width: 1080px) {
  .pub-head-deco { display: none; }
}

/* The team grid: two cards to a row on tablets, one on phones (DES-15); the
   rear-view mirror: the newest event across the row, then two to a row,
   every card picture above words (events v2) */
@media (max-width: 1000px) {
  .pub-member { flex-basis: 50%; }
  .pub-past { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pub-past-lead { grid-column: 1 / -1; grid-row: auto; }
  .pub-past-lead + .pub-past-side:last-child { grid-row: auto; }
  .pub-past-lead .pub-past-pic { min-height: 300px; }
  .pub-past-side { flex-direction: column; }
  .pub-past-side .pub-past-media { flex: 0 0 auto; border-right: 0; }
  .pub-past-side .pub-past-pic,
  .pub-past-lead + .pub-past-side:last-child .pub-past-pic { flex: 0 0 auto;
    aspect-ratio: 16 / 9; }
  .pub-past-side .pub-past-plain { height: 120px; }
}
@media (max-width: 760px) {
  .pub-member { flex-basis: 100%; }
}

/* Phones, 640 px and under (MPG 2.2 and 4): smaller padding, one column,
   nothing wider than the screen */
@media (max-width: 640px) {
  .pub-head > .pub-wrap { padding-top: 40px; padding-bottom: calc(var(--slant-head) + 48px); }
  .pub-compact .pub-head > .pub-wrap { padding-top: 28px;
    padding-bottom: calc(var(--slant-head) + 28px); }
  .pub-hero-inner { gap: 24px; padding-top: 48px; padding-bottom: 24px; }
  .pub-hero-art { min-height: 220px; }
  .pub-road-hero { top: 0; bottom: -160px; }
  .pub-hero-strip { padding-bottom: 48px; }
  .pub-segment { padding-top: 80px; }
  .pub-head + .pub-segment,
  .pub-segment-first { padding-top: 40px; }
  .pub-segment-crew + .pub-segment-crew { padding-top: 64px; }
  .pub-junction { margin-bottom: 32px; }
  .pub-junction-title { font-size: 22px; }
  .pub-band { margin-top: 96px; }
  .pub-band-body { padding: calc(var(--slant) + 56px) var(--gutter) calc(var(--slant) + 64px); }
  .pub-band-cta .pub-band-body { padding: calc(var(--slant) + 64px) var(--gutter) 72px; }
  .pub-panel,
  .pub-game,
  .pub-game-featured,
  .pub-next,
  .pub-lead-card,
  .pub-apply,
  .pub-notice,
  .pub-before { padding: 24px 20px; }
  .pub-tile { padding: 24px 20px; }
  .pub-tile-title { margin-top: 20px; }
  .pub-row { gap: 16px; }
  .pub-row-code { flex-basis: 36px; }
  .pub-layout { padding-top: 40px; }
  .pub-content { gap: 56px; }
  .pub-kv-key { flex-basis: 100%; }
  .pub-event { padding: 20px; }
  .pub-next-title { font-size: 26px; }
  .pub-steps-strip .pub-step { flex-basis: 100%; padding: 24px 20px; }
  .pub-countdown { gap: 6px; }
  .pub-count { flex: 1 1 0; min-width: 0; padding: 8px 4px; }
  .pub-avatar-lead { --cut: 18px; flex-basis: 112px; width: 112px; height: 112px; font-size: 48px; }
  .pub-member { padding: 20px; gap: 16px; }
  .pub-rank-line { margin-top: -20px; }
  /* events v2: the banner meets the panel's phone padding; thumbnails go
     above the row's words; one past event to a row */
  .pub-next-banner { flex-basis: calc(100% + 40px); margin: -24px -20px 0; }
  .pub-next-img { max-height: 240px; }
  .pub-event-thumb { flex-basis: 100%; }
  .pub-champ-cols { margin-top: 32px; }
  .pub-table th,
  .pub-table td { padding: 10px 12px; }
  /* a long name wraps, so place, driver and points fit the first screenful;
     the round tags stay on one line further right (the box scrolls) */
  .pub-table .pub-driver .pub-name { display: block; max-width: 9em; }
  .pub-table .pub-round-tags { flex-wrap: nowrap; }
  .pub-past { grid-template-columns: minmax(0, 1fr); }
  .pub-past-lead .pub-past-pic { flex: 0 0 auto; min-height: 0; aspect-ratio: 16 / 9; }
  .pub-past-body { padding: 16px 18px 20px; }
}

/* Forced colours: shapes drawn by fills get outlines; the decorative road
   and panel go (MPG 4) */
@media (forced-colors: active) {
  .pub-junction-code,
  .pub-badge,
  .pub-step-end .pub-step-num,
  .pub-avatar-lead { clip-path: none; border: 1px solid CanvasText; }
  .pub-md li::before,
  .pub-list li::before,
  .pub-checklist li::before,
  .pub-eyebrow-bar { forced-color-adjust: none; background: CanvasText; }
  .pub-head-deco,
  .pub-hero-art,
  .pub-band-panel { display: none; }
  .pub-details-summary { text-decoration: underline; }
}
/* End of W2-PAGES. */

/* ==================================================================
   Resources v2 (the owner 2026-10-30, after v1 of 2026-10-29): the
   Motortown Resources page (public/pages/resources.py,
   static/public_resources.js). Less on screen, calm: the picker, then one
   view (the overview board, a product, the warehouses); compact rows and
   site boxes whose detail opens in place; every state in words with its
   colour (never the colour alone), spacing over borders. Classes:
   pub-res-segment, pub-res-pick, pub-res-picker, pub-res-group (-solo,
   -title), pub-res-chips, pub-res-chip, pub-res-dot (-ok, -low, -stalled,
   -full, -unknown, -idle), pub-res-legend, pub-res-view (-title, -text),
   pub-res-v-head, pub-res-v-board, pub-res-v-urgent, pub-res-v-haul,
   pub-res-v-chain, pub-res-v-restock, pub-res-v-grid, pub-res-sub,
   pub-res-state-line, pub-res-state-note, pub-res-board-group (-title,
   -list, -row, -name, -note), pub-res-list, pub-res-hauls, pub-res-hrow
   (-stalled, -out, -low; -main, -cargo, -to, -bring, -sub, -site, -chains),
   pub-res-hlink, pub-haul-dist, pub-haul-order, pub-haul-none, pub-res-none,
   pub-res-more, pub-res-show, pub-res-tag (-ok, -low, -stalled, -full,
   -unknown, -idle, -out), pub-res-tiers, pub-res-tier (-title, -num),
   pub-res-nodes, pub-res-node (-ok, -low, -stalled, -full, -unknown,
   -idle), pub-res-box (-sum, -name, -line, -key, -body), pub-res-node-meta,
   pub-res-note (-about), pub-res-part (-title), pub-res-items,
   pub-res-item, pub-res-cargo, pub-res-amount, pub-res-per, pub-res-mark
   (-out, -low, -full, -empty), pub-res-recipes, pub-res-boosts,
   pub-res-grid (-wrap), pub-res-cell (-ok, -low, -empty, -full, -none). */

.pub-segment.pub-res-segment { padding-top: 40px; }
.pub-res-view,
.pub-res-v-board,
.pub-res-v-urgent,
.pub-res-v-haul,
.pub-res-v-chain,
.pub-res-v-restock,
.pub-res-v-grid { min-width: 0; }
.pub-res-list { min-width: 0; }
.pub-res-none { color: var(--text-muted); }
.pub-res-more { margin-top: 10px; color: var(--text-muted); font-size: 14px; }

/* A state as a tag: the word in mono capitals, a square dot, the state's
   colours (public.css's status tokens) */
.pub-res-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 1px 8px;
  border: 1px solid var(--muted-line);
  background: var(--muted-bg);
  color: var(--muted-text);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  line-height: 1.6;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}
.pub-res-tag::before {
  content: "";
  flex: 0 0 6px;
  width: 6px;
  height: 6px;
  background: var(--muted-dot);
}
.pub-res-tag-ok { border-color: var(--ok-line); background: var(--ok-bg); color: var(--ok-text); }
.pub-res-tag-ok::before { background: var(--ok-dot); }
.pub-res-tag-low {
  border-color: var(--warn-line);
  background: var(--warn-bg);
  color: var(--warn-text);
}
.pub-res-tag-low::before { background: var(--warn-dot); }
.pub-res-tag-stalled,
.pub-res-tag-out {
  border-color: var(--danger-line);
  background: var(--danger-bg);
  color: var(--danger-text);
}
.pub-res-tag-stalled::before,
.pub-res-tag-out::before { background: var(--danger-dot); }
.pub-res-tag-full {
  border-color: var(--info-line);
  background: var(--info-bg);
  color: var(--info-text);
}
.pub-res-tag-full::before { background: var(--info-dot); }
.pub-res-tag-unknown,
.pub-res-tag-idle { color: var(--text-subtle); }

/* The picker: Overview, the products in their groups (each with its state's
   dot), Warehouses; the dots' legend in words under it */
.pub-res-pick { margin-bottom: 8px; }
.pub-res-picker { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 24px; }
.pub-res-group { min-width: 0; }
.pub-res-group-solo { align-self: flex-end; }
.pub-res-group-title {
  margin-bottom: 6px;
  color: var(--text-subtle);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.pub-res-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.pub-res-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line-control);
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}
.pub-res-chip:hover { border-color: var(--accent); color: var(--text); }
.pub-res-chip[aria-current="true"] {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--accent-ink);
}
.pub-res-dot {
  display: inline-block;
  flex: 0 0 8px;
  width: 8px;
  height: 8px;
  background: var(--muted-dot);
}
.pub-res-dot-ok { background: var(--ok-dot); }
.pub-res-dot-low { background: var(--warn-dot); }
.pub-res-dot-stalled { background: var(--danger-dot); }
.pub-res-dot-full { background: var(--info-dot); }
.pub-res-dot-unknown,
.pub-res-dot-idle { background: var(--muted-dot); }
.pub-res-chip[aria-current="true"] .pub-res-dot { box-shadow: inset 0 0 0 1px var(--accent-ink); }
.pub-res-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
  color: var(--text-subtle);
  font-size: 12px;
}
.pub-res-legend li { display: inline-flex; align-items: center; gap: 6px; }

/* The view: its title, a product's state line and description, the
   sub-headings */
.pub-res-view { margin-top: 32px; }
.pub-res-v-head { min-width: 0; }
.pub-res-view-title {
  margin: 0;
  font-stretch: 112%;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}
.pub-res-state-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 10px;
  margin-top: 10px;
}
.pub-res-state-note { color: var(--text); font-weight: 600; }
.pub-res-view-text { max-width: 46em; margin-top: 8px; color: var(--text-muted); }
.pub-res-sub {
  margin: 36px 0 12px;
  color: var(--text-nav);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* The overview board: every product in one line, in the picker's groups */
.pub-res-v-board {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 28px 40px;
  margin-top: 20px;
}
.pub-res-board-group { min-width: 0; }
.pub-res-board-title {
  margin: 0 0 6px;
  color: var(--text-subtle);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.pub-res-board-list { margin: 0; padding: 0; list-style: none; }
.pub-res-board-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 2px 12px;
  padding: 8px 0;
  box-shadow: inset 0 -1px 0 var(--line);
}
.pub-res-board-name {
  min-height: 28px;
  color: var(--text);
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
  overflow-wrap: anywhere;
}
.pub-res-board-name:hover { color: var(--link-hover); text-decoration: underline; }
.pub-res-board-note { flex: 1 0 100%; color: var(--text-muted); font-size: 13px; }

/* A compact haul row: what, where, how many; where to load it; what it holds
   up. The level's colour as an edge, its word in the tag */
.pub-res-hauls { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.pub-res-hrow { padding: 8px 0 8px 14px; }
.pub-res-hrow-low { box-shadow: inset 3px 0 0 var(--warn-dot); }
.pub-res-hrow-stalled,
.pub-res-hrow-out { box-shadow: inset 3px 0 0 var(--danger-dot); }
.pub-res-hrow-main {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 6px;
  color: var(--text-muted);
}
.pub-res-hrow-cargo,
.pub-res-hrow-to { color: var(--text); font-weight: 700; overflow-wrap: break-word; }
.pub-res-hrow-bring {
  margin-left: 6px;
  color: var(--text);
  font-family: var(--font-mono);
  font-weight: 500;
  white-space: nowrap;
}
.pub-res-hrow-sub { margin-top: 3px; color: var(--text-muted); font-size: 14px; }
.pub-res-hrow-site { color: var(--text); font-weight: 600; }
.pub-res-hrow-chains { margin-top: 2px; color: var(--text-subtle); font-size: 13px; }
.pub-res-hlink { color: var(--link); text-underline-offset: 3px; }
.pub-res-hlink:hover { color: var(--link-hover); }
.pub-haul-dist,
.pub-haul-order { white-space: nowrap; }
.pub-haul-order { color: var(--ok-text); font-weight: 600; }
.pub-haul-none { color: var(--text-subtle); }
.pub-res-show {
  margin-top: 12px;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid var(--line-control);
  border-radius: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
}
.pub-res-show:hover { border-color: var(--accent); }

/* A product's chain: its tiers left to right where there is room (wrapping,
   never a sideways scroll), stacked on phones; each site a compact box */
.pub-res-tiers {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 20px 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.pub-res-tier { min-width: 0; }
.pub-res-tier-title {
  margin: 0 0 8px;
  color: var(--text-nav);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.pub-res-tier-num { color: var(--accent); }
.pub-res-nodes { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.pub-res-node {
  min-width: 0;
  background: var(--surface);
  box-shadow: inset 3px 0 0 var(--muted-dot);
}
.pub-res-node-ok { box-shadow: inset 3px 0 0 var(--ok-dot); }
.pub-res-node-low { box-shadow: inset 3px 0 0 var(--warn-dot); }
.pub-res-node-stalled { box-shadow: inset 3px 0 0 var(--danger-dot); }
.pub-res-node-full { box-shadow: inset 3px 0 0 var(--info-dot); }
.pub-res-node-unknown,
.pub-res-node-idle { box-shadow: inset 3px 0 0 var(--muted-dot); }
/* The box's summary: its name (and the arrow) on the first line, its state
   and key number on the next, the key under the tag in a narrow box */
.pub-res-box-sum {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 6px 10px;
  min-height: 44px;
  padding: 10px 12px 10px 15px;
  cursor: pointer;
  list-style: none;
}
.pub-res-box-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
  grid-column: 1 / -1;
  min-width: 0;
}
.pub-res-box-sum::-webkit-details-marker { display: none; }
.pub-res-box-sum:focus-visible { outline-offset: -2px; }
.pub-res-box-name {
  color: var(--text);
  font-size: 15px;
  font-weight: 700;
  overflow-wrap: anywhere;
}
.pub-res-box-key { color: var(--text-muted); font-size: 13px; overflow-wrap: anywhere; }
.pub-res-box-sum .pub-arrow {
  grid-column: 2;
  grid-row: 1;
  justify-self: end;
  color: var(--accent);
  font-family: var(--font-mono);
}
.pub-res-box[open] .pub-res-box-sum .pub-arrow { transform: rotate(90deg); }
.pub-res-box-body { padding: 0 12px 12px 15px; }
.pub-res-node-meta {
  color: var(--text-subtle);
  font-family: var(--font-mono);
  font-size: 12px;
}
.pub-res-note { margin-top: 6px; color: var(--text); font-size: 14px; font-weight: 600; }
/* A note that describes the node (not why it is stalled, low or full) */
.pub-res-note-about { color: var(--text-muted); font-weight: 400; }
.pub-res-part { margin-top: 8px; }
.pub-res-part-title {
  color: var(--text-subtle);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.pub-res-items,
.pub-res-recipes,
.pub-res-boosts { margin: 2px 0 0; padding: 0; list-style: none; font-size: 14px; }
.pub-res-item { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 8px; }
.pub-res-cargo { color: var(--text); overflow-wrap: anywhere; }
.pub-res-amount {
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 13px;
  white-space: nowrap;
}
.pub-res-box-key .pub-res-cargo,
.pub-res-box-key .pub-res-amount { color: var(--text-muted); }
.pub-res-per { color: var(--text-subtle); font-family: var(--font-mono); font-size: 12px; }
.pub-res-mark {
  padding: 0 6px;
  border: 1px solid var(--muted-line);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  line-height: 1.6;
  text-transform: uppercase;
}
.pub-res-mark-out {
  border-color: var(--danger-line);
  background: var(--danger-bg);
  color: var(--danger-text);
}
.pub-res-mark-low,
.pub-res-mark-empty {
  border-color: var(--warn-line);
  background: var(--warn-bg);
  color: var(--warn-text);
}
.pub-res-mark-full {
  border-color: var(--info-line);
  background: var(--info-bg);
  color: var(--info-text);
}
.pub-res-recipes { color: var(--text-muted); font-family: var(--font-mono); font-size: 12px; }
.pub-res-recipes li + li,
.pub-res-boosts li + li { margin-top: 2px; }
.pub-res-boosts { color: var(--text-muted); }

/* The warehouses grid: warehouses down, pallets across, in its own
   sideways-scrolling box with the first column fixed */
/* position: relative keeps the cells' screen-reader words (pub-sr, placed
   absolutely) inside the box, so a wide grid never widens the page */
.pub-res-grid-wrap { position: relative; }
.pub-table.pub-res-grid { width: auto; min-width: 100%; }
.pub-res-grid thead th { white-space: nowrap; }
.pub-res-grid th[scope="row"] {
  position: sticky;
  left: 0;
  z-index: 1;
  background: var(--surface);
  color: var(--text);
  font-weight: 600;
  white-space: nowrap;
  box-shadow: inset -1px 0 0 var(--line);
}
.pub-res-grid thead th:first-child {
  position: sticky;
  left: 0;
  z-index: 2;
  box-shadow: inset -1px 0 0 var(--line);
}
.pub-res-cell { font-family: var(--font-mono); text-align: right; white-space: nowrap; }
.pub-res-cell-ok { color: var(--text); }
.pub-res-cell-low { background: var(--warn-bg); color: var(--warn-text); }
.pub-res-cell-empty { background: var(--danger-bg); color: var(--danger-text); }
.pub-res-cell-full { background: var(--info-bg); color: var(--info-text); }
.pub-res-cell-none { color: var(--text-subtle); text-align: center; }

/* Phones: the tiers stacked, one under the other (a box keeps the width to
   read), the view's title a little smaller */
@media (max-width: 700px) {
  .pub-res-tiers { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 600px) {
  .pub-res-view { margin-top: 24px; }
  .pub-res-view-title { font-size: 22px; }
  .pub-res-picker { gap: 10px 18px; }
}

/* Forced colours: the dots, the tags' dots and the cells' fills get outlines */
@media (forced-colors: active) {
  .pub-res-dot,
  .pub-res-tag::before { forced-color-adjust: none; outline: 1px solid CanvasText; }
  .pub-res-tag,
  .pub-res-mark,
  .pub-res-chip,
  .pub-res-show { border-color: ButtonText; }
  .pub-res-chip[aria-current="true"] { outline: 2px solid Highlight; outline-offset: -2px; }
  .pub-res-cell-low,
  .pub-res-cell-empty,
  .pub-res-cell-full { outline: 1px solid CanvasText; outline-offset: -4px; }
}
/* End of resources v2. */

/* ==================================================================
   MotorPedia (the owner 2026-11-22: "show all information possible in an
   easy way to digest" and compare up to 10 vehicles): the list, one
   vehicle's cards and the compare table (public/pages/motorpedia.py,
   static/public_motorpedia.js). Calm, like Resources: hairlines, the one
   accent for what is chosen or best, muted words for what is not known yet
   (never a blank), square corners, no gradient. Classes: pub-mp-segment,
   pub-mp-types, pub-mp-type-list, pub-mp-type (-count), pub-mp-tools,
   pub-mp-search, pub-mp-label, pub-mp-input, pub-mp-filters, pub-mp-fgroup
   (-title), pub-mp-chips, pub-mp-chip, pub-mp-clear, pub-mp-hint,
   pub-mp-tools-row, pub-mp-filter-toggle,
   pub-mp-count, pub-mp-key, pub-mp-table (-wrap), pub-mp-row, pub-mp-col-
   (pick, name, type, levels, cost, speed, mass, fuel, cargo, seats),
   pub-mp-sort (-mark), pub-mp-tick, pub-mp-name, pub-mp-insp, pub-mp-sub
   (-inline), pub-mp-unknown, pub-mp-none, pub-mp-levels, pub-mp-level
   (-kind, -num), pub-mp-tray (-list, -item, -name, -remove, -actions, -go,
   -clear, -msg), pub-mp-cards, pub-mp-card (-about, -basics, -drive, -fuel,
   -weight, -performance, -passengers, -cargo, -dealers, -builds,
   -community; -head, -title, -note, -action), pub-mp-edit, pub-mp-facts,
   pub-mp-fact (-label, -value), pub-mp-desc, pub-mp-empty, pub-mp-stars
   (-text), pub-mp-star (-on), pub-mp-limits, pub-mp-limit (-name, -max),
   pub-mp-dealers, pub-mp-dealer (-num, -text, -map), pub-mp-map (-note),
   pub-mp-pin (-num), pub-mp-builds, pub-mp-build (-head, -text, -by),
   pub-mp-code, pub-mp-rating, pub-mp-votes, pub-mp-tags, pub-mp-tag,
   pub-mp-guide, pub-mp-note, pub-mp-cmp (-wrap, -head, -row, -list,
   -tools), pub-mp-corner, pub-mp-remove, pub-mp-group, pub-mp-best (-tag), pub-mp-wide,
   pub-mp-diff, pub-mp-add (-box, -list, -item, -none, -close),
   pub-mp-tools-msg. */

.pub-segment.pub-mp-segment { padding-top: 40px; }
/* Compare: the whole window width (16 px gutters), so 10 vehicles fit side by
   side at 1920 px; a narrower window scrolls the table inside its box */
.pub-segment.pub-mp-wide { max-width: none; padding-right: 16px; padding-left: 16px; }
.pub-mp-unknown,
.pub-mp-none { color: var(--text-subtle); font-size: 0.92em; }
.pub-mp-sub,
.pub-mp-insp {
  display: block;
  margin-top: 2px;
  color: var(--text-subtle);
  font-size: 13px;
  font-weight: 400;
}
.pub-mp-sub-inline { color: var(--text-subtle); font-size: 0.92em; }
.pub-mp-empty { color: var(--text-muted); }
.pub-mp-note { margin: 0 0 12px; color: var(--warn-text); }

/* The type links (no script: each a page with ?type=) */
.pub-mp-types { min-width: 0; }
.pub-mp-type-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.pub-mp-type {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line-control);
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}
.pub-mp-type:hover { border-color: var(--accent); color: var(--text); }
.pub-mp-type[aria-current="true"] {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--accent-ink);
}
.pub-mp-type-count { color: var(--text-subtle); font-family: var(--font-mono); font-size: 12px; }
.pub-mp-type[aria-current="true"] .pub-mp-type-count { color: var(--accent-ink); }

/* The script's tools: the search box, the filter chips, the hint */
.pub-mp-tools { min-width: 0; margin-top: 24px; }
.pub-mp-tools-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; }
.pub-mp-search { flex: 0 1 420px; min-width: 0; }
.pub-btn.pub-mp-filter-toggle { min-height: 44px; padding: 0 18px; font-size: 13px; cursor: pointer; }
.pub-mp-filter-toggle[aria-expanded="true"] { border-color: var(--accent); }
.pub-mp-filters[hidden] { display: none; }
.pub-mp-label {
  display: block;
  margin-bottom: 6px;
  color: var(--text-nav);
  font-size: 14px;
  font-weight: 600;
}
.pub-mp-input {
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line-control);
  border-radius: 0;
  background: var(--surface-sunk);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  -webkit-appearance: none;
  appearance: none;
}
.pub-mp-input::placeholder { color: var(--placeholder); }
.pub-mp-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px 24px;
  margin-top: 18px;
}
.pub-mp-fgroup { min-width: 0; }
.pub-mp-fgroup-title {
  margin-bottom: 6px;
  color: var(--text-subtle);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.pub-mp-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.pub-mp-chip {
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line-control);
  border-radius: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.pub-mp-chip:hover { border-color: var(--accent); }
.pub-mp-chip[aria-pressed="true"] {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--accent-ink);
}
.pub-mp-clear { min-height: 44px; padding: 0 18px; font-size: 13px; cursor: pointer; }
.pub-mp-hint { margin-top: 14px; color: var(--text-muted); font-size: 14px; }
.pub-mp-count {
  margin-top: 18px;
  color: var(--text-nav);
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.04em;
}
.pub-mp-key { margin-top: 12px; color: var(--text-subtle); font-size: 13px; }

/* The table: the name column wide, numbers right in mono, a light row */
.pub-mp-table-wrap { margin-top: 10px; }
.pub-table.pub-mp-table { min-width: 980px; font-size: 14px; }
.pub-mp-table th,
.pub-mp-table td { padding: 10px 12px; }
.pub-mp-table tbody th { font-weight: 400; text-align: left; }
.pub-mp-row:hover { background: var(--row-selected); }
.pub-mp-col-name { min-width: 270px; }       /* the thumbnail and the name */
.pub-mp-col-type,
.pub-mp-col-cargo { min-width: 110px; }
.pub-mp-col-levels { min-width: 120px; }
.pub-mp-col-cost,
.pub-mp-col-speed,
.pub-mp-col-mass,
.pub-mp-col-fuel,
.pub-mp-col-seats { white-space: nowrap; }
.pub-mp-col-pick { width: 52px; text-align: center; }
.pub-mp-tick {
  width: 22px;
  height: 22px;
  margin: 0;
  accent-color: var(--accent);
  cursor: pointer;
}
.pub-mp-sort {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  color: inherit;
  text-decoration: none;
}
.pub-mp-sort:hover { color: var(--text); }
.pub-mp-sort-mark { color: var(--accent); font-size: 10px; }
.pub-mp-table th[aria-sort] { color: var(--text); }
.pub-mp-name {
  color: var(--text);
  font-weight: 700;
  text-decoration: none;
  overflow-wrap: anywhere;
}
.pub-mp-name:hover { color: var(--link-hover); text-decoration: underline;
  text-underline-offset: 3px; }

/* Level chips ("Truck 150") */
.pub-mp-levels {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.pub-mp-level {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 1px 8px;
  border: 1px solid var(--info-line);
  background: var(--info-bg);
  color: var(--info-text);
  font-size: 12px;
  line-height: 1.6;
  white-space: nowrap;
}
.pub-mp-level-kind { font-weight: 600; }
.pub-mp-level-num { font-family: var(--font-mono); font-weight: 500; }

/* The compare tray: under the table, kept at the bottom of the window while
   the list is in view */
.pub-mp-tray {
  position: sticky;
  bottom: 0;
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  margin-top: 12px;
  padding: 12px 16px;
  border: 1px solid var(--accent);
  background: var(--surface);
  box-shadow: inset 0 3px 0 var(--accent);
}
.pub-mp-tray[hidden] { display: none; }
.pub-mp-tray-list {
  display: flex;
  flex: 1 1 320px;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}
.pub-mp-tray-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding-left: 10px;
  border: 1px solid var(--line-control);
  background: var(--bg);
  font-size: 13px;
  font-weight: 600;
}
.pub-mp-tray-name { overflow-wrap: anywhere; }
.pub-mp-tray-remove {
  min-width: 44px;
  min-height: 44px;
  padding: 0 10px;
  border: 0;
  border-left: 1px solid var(--line);
  border-radius: 0;
  background: none;
  color: var(--text-subtle);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}
.pub-mp-tray-remove:hover { color: var(--text); }
.pub-mp-tray-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.pub-btn.pub-mp-tray-go,
.pub-btn.pub-mp-tray-clear { min-height: 44px; padding: 0 20px; font-size: 13px; }
.pub-mp-tray-clear { cursor: pointer; }
.pub-mp-tray-msg { flex: 1 0 100%; color: var(--warn-text); font-size: 14px; }
.pub-mp-tray-msg:empty { display: none; }

/* One vehicle: the cards in a grid, the wide ones across two columns */
.pub-mp-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.pub-mp-card {
  min-width: 0;
  padding: 20px 22px 22px;
  border: 1px solid var(--line);
  background: var(--surface);
}
.pub-mp-card-dealers { grid-column: span 2; }
.pub-mp-card-about,
.pub-mp-card-builds,
.pub-mp-card-basics,
.pub-mp-card-drive,
.pub-mp-card-fuel,
.pub-mp-card-weight,
.pub-mp-card-performance,
.pub-mp-card-passengers,
.pub-mp-card-cargo,
.pub-mp-card-community { grid-column: span 1; }
.pub-mp-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}
.pub-mp-card-title {
  margin: 0;
  font-stretch: 112%;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.pub-mp-edit {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line-control);
  color: var(--text-nav);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-decoration: none;
  text-transform: uppercase;
}
.pub-mp-edit:hover { border-color: var(--accent); color: var(--text); }
.pub-mp-card-note { margin-bottom: 10px; color: var(--text-muted); font-size: 14px; }
.pub-mp-card-action { margin-top: 16px; }
.pub-mp-facts { margin: 0; }
.pub-mp-fact {
  display: grid;
  grid-template-columns: minmax(6.5em, 38%) minmax(0, 1fr);
  gap: 12px;
  padding: 8px 0;
  border-top: 1px solid var(--row-line);
}
.pub-mp-fact:first-child { border-top: 0; }
.pub-mp-fact-label { color: var(--text-subtle); font-size: 14px; }
.pub-mp-fact-value { margin: 0; color: var(--text); overflow-wrap: anywhere; }
.pub-mp-desc { max-width: 60em; margin-bottom: 10px; color: var(--text-muted); }
.pub-mp-stars { display: inline-flex; gap: 3px; margin-right: 10px; vertical-align: -1px; }
.pub-mp-star {
  display: inline-block;
  width: 12px;
  height: 12px;
  border: 1px solid var(--line-strong);
}
.pub-mp-star-on { border-color: var(--accent); background: var(--accent); }
.pub-mp-stars-text {
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 13px;
  white-space: nowrap;
}
.pub-mp-limits { margin: 0; padding: 0; list-style: none; }
.pub-mp-limit { display: flex; justify-content: space-between; gap: 12px; padding: 2px 0; }
.pub-mp-limit-name { min-width: 0; overflow-wrap: anywhere; }
.pub-mp-limit-max { font-family: var(--font-mono); font-weight: 500; }

/* Dealers: the numbered list beside the small map */
.pub-mp-dealers { margin: 0; padding: 0; list-style: none; }
.pub-mp-dealer { display: flex; gap: 12px; padding: 6px 0; border-top: 1px solid var(--row-line); }
.pub-mp-dealer:first-child { border-top: 0; }
.pub-mp-dealer-num {
  display: inline-flex;
  flex: 0 0 26px;
  align-items: center;
  justify-content: center;
  height: 26px;
  border: 1px solid var(--accent);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
}
.pub-mp-dealer-text { min-width: 0; padding-top: 2px; overflow-wrap: anywhere; }
.pub-mp-dealer-map {
  margin-right: 6px;
  color: var(--text-subtle);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.pub-mp-map {
  position: relative;
  height: 300px;
  margin-top: 14px;
  border: 1px solid var(--line);
  background: var(--surface-deep);
}
.pub-mp-map.leaflet-container { background: var(--surface-deep); font: inherit; }
.pub-mp-map.leaflet-container:focus-visible { outline-offset: -2px; }
.pub-mp-map .leaflet-tile-pane { filter: brightness(0.55) saturate(0.6); }
.pub-mp-map-note { margin: 0; padding: 14px 16px; color: var(--text-muted); font-size: 14px; }
.leaflet-marker-icon.pub-mp-pin {
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--bg);
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: inset 0 0 0 1px var(--accent-ink);
}
.pub-mp-pin-num { font-family: var(--font-mono); font-size: 12px; font-weight: 500; }

/* Builds */
.pub-mp-builds { margin: 0; padding: 0; list-style: none; }
.pub-mp-build { padding: 12px 0; border-top: 1px solid var(--row-line); }
.pub-mp-build:first-child { padding-top: 0; border-top: 0; }
.pub-mp-build-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px; }
.pub-mp-code {
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.04em;
}
.pub-mp-rating { color: var(--text); font-family: var(--font-mono); font-weight: 500; }
.pub-mp-votes { color: var(--text-subtle); font-size: 13px; }
.pub-mp-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}
.pub-mp-tag {
  padding: 0 8px;
  border: 1px solid var(--muted-line);
  background: var(--muted-bg);
  color: var(--muted-text);
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.8;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.pub-mp-build-text { margin-top: 8px; color: var(--text-muted); }
.pub-mp-build-by { margin-top: 6px; color: var(--text-subtle); font-size: 14px; }
.pub-mp-guide { margin-left: 8px; color: var(--link); font-weight: 600; }
.pub-mp-guide:hover { color: var(--link-hover); }

/* Compare: the tools, then the table that scrolls sideways in its own box
   with the row heads fixed on the left */
.pub-mp-cmp-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.pub-btn.pub-mp-diff,
.pub-btn.pub-mp-add,
.pub-btn.pub-mp-add-close { min-height: 44px; padding: 0 18px; font-size: 13px; cursor: pointer; }
.pub-mp-diff[aria-pressed="true"] {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--accent-ink);
}
.pub-mp-diff:disabled,
.pub-mp-add:disabled { border-color: var(--line); color: var(--text-subtle); cursor: default; }
.pub-mp-tools-msg { flex: 1 0 100%; color: var(--text-muted); font-size: 14px; }
.pub-mp-tools-msg:empty { display: none; }
.pub-mp-add-box {
  max-width: 480px;
  margin-top: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  background: var(--surface);
}
.pub-mp-add-list { margin: 10px 0; padding: 0; list-style: none; }
.pub-mp-add-item {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0 10px;
  border-top: 1px solid var(--row-line);
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
}
.pub-mp-add-item:hover { background: var(--row-selected); color: var(--link-hover); }
.pub-mp-add-none { margin: 10px 0; color: var(--text-muted); }
.pub-mp-cmp-wrap { margin-top: 18px; }
.pub-table.pub-mp-cmp { width: auto; min-width: 100%; font-size: 14px; }
.pub-mp-cmp th,
.pub-mp-cmp td { min-width: 150px; padding: 10px 14px; }
.pub-mp-cmp tbody th[scope="row"],
.pub-mp-corner {
  position: sticky;
  left: 0;
  z-index: 1;
  min-width: 130px;
  max-width: 170px;
  background: var(--surface);
  box-shadow: inset -1px 0 0 var(--line);
}
.pub-mp-cmp tbody th[scope="row"] { color: var(--text-subtle); font-weight: 400; }
.pub-mp-cmp-head { vertical-align: bottom; }
.pub-mp-cmp thead .pub-mp-cmp-head {
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 14px;
  letter-spacing: 0;
  text-transform: none;
  white-space: normal;
}
.pub-mp-remove {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  margin-top: 6px;
  color: var(--text-subtle);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.pub-mp-remove:hover { color: var(--text); }
.pub-mp-group th {
  padding-top: 18px;
  background: var(--bg);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-align: left;
  text-transform: uppercase;
}
.pub-mp-cmp-row td { color: var(--text); }
/* The best value: a tinted cell with the accent bar, the value in the accent
   and a small BEST tag (screen readers hear "(best)" instead) */
.pub-mp-cmp td.pub-mp-best {
  background: var(--info-bg);
  box-shadow: inset 3px 0 0 var(--accent), inset 0 0 0 1px var(--info-line);
  color: var(--accent);
  font-weight: 700;
}
.pub-mp-cmp td.pub-mp-best .pub-mp-sub { color: var(--info-text); }
.pub-mp-best-tag {
  display: table;
  margin-bottom: 4px;
  padding: 0 6px;
  background: var(--accent);
  color: var(--accent-ink);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  line-height: 1.6;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.pub-mp-cmp-list { margin: 0; padding: 0; list-style: none; }

/* Pictures (MotorPedia pictures, the owner 2026-11-22). One vehicle: the
   Pictures panel above the cards (pub-mp-pics-segment, pub-mp-details), its
   count (pub-mp-pics-count), the main picture (pub-mp-stage: a fixed 16:9
   frame the picture fits inside, so turning to another never moves the
   page: -frame, -link, -pic, -cap, -by; the script's -bar, -btn, -prev,
   -next, -pause, -count, pub-mp-dots, pub-mp-dot), the gallery
   (pub-mp-gallery, pub-mp-shot, -link, -pic, -by) and the empty state
   (pub-mp-pics-none, -title). The list's thumbnails (pub-mp-name-cell,
   pub-mp-name-text, pub-mp-row-pic, pub-mp-row-img) and compare's
   (pub-mp-cmp-pic, pub-mp-cmp-img) sit in fixed boxes: no layout shift
   while they load. */
.pub-segment.pub-mp-pics-segment { padding-bottom: 0; }
.pub-segment.pub-mp-details { padding-top: 16px; }
.pub-mp-pics {
  min-width: 0;
  padding: 20px 22px 22px;
  border: 1px solid var(--line);
  background: var(--surface);
}
.pub-mp-pics-count {
  margin-right: auto;
  color: var(--text-subtle);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.pub-mp-pics-none {
  padding: 28px 24px 24px;
  border: 1px dashed var(--line-strong);
  background: var(--surface-sunk);
}
.pub-mp-pics-none-title {
  margin: 0 0 6px;
  color: var(--text);
  font-size: 17px;
  font-weight: 700;
}
.pub-mp-pics-none .pub-actions { margin-top: 18px; }
.pub-mp-stage { margin: 0; }
.pub-mp-stage-frame {
  width: 100%;
  max-height: 600px;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface-deep);
}
.pub-mp-stage-link { display: block; width: 100%; height: 100%; }
.pub-mp-stage-pic {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.pub-mp-stage-cap { margin-top: 10px; color: var(--text-muted); font-size: 14px; }
.pub-mp-stage-by { overflow-wrap: anywhere; }
.pub-mp-stage-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
  margin-top: 10px;
}
.pub-mp-stage-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line-control);
  background: var(--surface-sunk);
  color: var(--text-nav);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
}
.pub-mp-stage-prev,
.pub-mp-stage-next { padding: 0; font-family: var(--font-sans); font-size: 26px; line-height: 1; }
.pub-mp-stage-btn:hover { border-color: var(--accent); color: var(--text); }
.pub-mp-stage-pause[aria-pressed="true"] { border-color: var(--accent); color: var(--accent); }
.pub-mp-dots { display: flex; flex-wrap: wrap; }
.pub-mp-dot {
  width: 30px;
  height: 44px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}
.pub-mp-dot::before {
  content: "";
  display: block;
  width: 10px;
  height: 10px;
  margin: 0 auto;
  border: 1px solid var(--line-strong);
  background: var(--surface-sunk);
}
.pub-mp-dot:hover::before { border-color: var(--accent); }
.pub-mp-dot[aria-current="true"]::before { border-color: var(--accent); background: var(--accent); }
.pub-mp-stage-count {
  margin-left: auto;
  color: var(--text-subtle);
  font-family: var(--font-mono);
  font-size: 12px;
  white-space: nowrap;
}
.pub-mp-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  gap: 14px 12px;
  margin: 20px 0 0;
  padding: 18px 0 0;
  border-top: 1px solid var(--line);
  list-style: none;
}
.pub-mp-shot { min-width: 0; }
.pub-mp-shot-link {
  display: block;
  border: 1px solid var(--line);
  background: var(--surface-deep);
}
.pub-mp-shot-link:hover { border-color: var(--accent); }
.pub-mp-shot-pic {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}
.pub-mp-shot-by {
  margin: 6px 0 0;
  color: var(--text-subtle);
  font-size: 13px;
  overflow-wrap: anywhere;
}
.pub-mp-name-cell { display: flex; align-items: center; gap: 12px; }
.pub-mp-name-text { min-width: 0; }
.pub-mp-row-pic {
  display: block;
  flex: 0 0 72px;
  width: 72px;
  height: 40px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface-deep);
}
.pub-mp-row-img,
.pub-mp-cmp-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.pub-mp-cmp-pic {
  display: block;
  width: 100%;
  max-width: 200px;
  aspect-ratio: 16 / 9;
  margin-bottom: 8px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface-deep);
}

/* Narrower screens: two columns of cards, then one; the facts stacked */
@media (max-width: 1000px) {
  .pub-mp-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .pub-mp-cards { grid-template-columns: minmax(0, 1fr); }
  .pub-mp-card-dealers { grid-column: span 1; }
  .pub-mp-card { padding: 16px; }
  .pub-mp-fact { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .pub-mp-filters { gap: 10px 18px; }
  .pub-mp-map { height: 240px; }
  .pub-mp-cmp th,
  .pub-mp-cmp td { min-width: 130px; padding: 9px 10px; }
  .pub-mp-cmp tbody th[scope="row"],
  .pub-mp-corner { min-width: 96px; max-width: 110px; }
  .pub-mp-pics { padding: 16px; }
  .pub-mp-gallery { grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); }
  .pub-mp-dot { width: 26px; }
}

/* Forced colours: the chosen chips and links, the best cells, the stars */
@media (forced-colors: active) {
  .pub-mp-chip,
  .pub-mp-type,
  .pub-mp-edit,
  .pub-mp-tray-item { border-color: ButtonText; }
  .pub-mp-chip[aria-pressed="true"],
  .pub-mp-type[aria-current="true"],
  .pub-mp-diff[aria-pressed="true"] { outline: 2px solid Highlight; outline-offset: -2px; }
  .pub-mp-best { outline: 2px solid Highlight; outline-offset: -3px; }
  .pub-mp-best-tag { forced-color-adjust: none; outline: 1px solid CanvasText; }
  .pub-mp-star-on,
  .pub-mp-pin { forced-color-adjust: none; outline: 1px solid CanvasText; }
  .pub-mp-stage-btn { border-color: ButtonText; }
  .pub-mp-dot::before { forced-color-adjust: none; border-color: CanvasText; background: Canvas; }
  .pub-mp-dot[aria-current="true"]::before { background: Highlight; border-color: Highlight; }
}
/* End of MotorPedia. */
