/* Chain Home UI stylesheet (built as #183's parallel /new sheet; promoted to
 * the one UI by #185, ADR-0018 — filename kept for browser-cache safety).
 * No govuk-frontend underneath: this sheet owns every class the DOM
 * carries. Three prefixes, all ours: ch-* is the typography and layout kit,
 * chainhome-* the app's components, nu-* the shell chrome. The ch-* names
 * were spelled govuk-* until #354 — bare hooks left behind when #185 deleted
 * the vendored package, renamed so no class is named after a framework this
 * repo does not ship. The shared JS emits them at runtime (status.js table
 * rebuilds, map.js popups and notices, rewind.js bar furniture,
 * timeaxis.js ticks), so its vocabulary must be styled here or
 * those elements render naked.
 *
 * Design system (grilled 2026-07-16): light-mode only; quiet ground/surface
 * neutrals; judgement colours confined to tags, text and strip fills — the
 * map GLYPH palette arrives via theme-new.js (window.chainhomeTheme), never
 * from CSS. IBM Plex Sans/Mono from /static/fonts.css (weights 400/600).
 *
 * HARD BANS (operator constraint — the prod host has no GPU, and every
 * composited effect is CPU raster work): no box-shadow, no backdrop-filter,
 * no filter, no @keyframes/animation, no transition, no gradients, no
 * border-radius above 2px. Hatches (silent / not-observing / unavailable —
 * texture, never a status colour) are tiled inline-SVG data URIs, which the
 * gradient ban does not cover and the renderer rasterises once. Vendored
 * maplibre-gl.css ships box-shadows; the map-furniture section overrides
 * them at higher specificity. Layout is flex/grid; wide tables scroll
 * inside .nu-scroll wrappers so the page body never scrolls horizontally.
 */

/* --- Tokens ---------------------------------------------------------------- */
:root {
  /* Neutrals. */
  --ground: #F6F7F9;          /* page background */
  --surface: #FFFFFF;         /* cards, tables, controls */
  --hairline: #DCE0E5;        /* structural borders */
  --hairline-subtle: #E5E8EB; /* row rules inside tables */
  --ink: #1C2127;             /* body text */
  --muted: #5F6B7C;           /* labels, captions, secondary text */
  /* Links, primary buttons, focus. Blueprint's blue2/blue1 pair, not its
   * blue3: the axe sweep measured blue3 #2D72D2 at 4.40:1 on --ground —
   * under AA 4.5:1 (fine on white at 4.72). #215DB0 is 6.01:1 on ground,
   * 6.45 as button fill under white text (#185). */
  --action: #215DB0;
  --action-hover: #184A90;
  --navy: #14273E;            /* the header band; chrome accents */

  /* Judgement — tiers (tags/text only; glyphs are theme-new.js's). */
  --tier-blue: #006B8C;      --tier-blue-tint: #E3F4FB;
  --tier-red: #C80000;       --tier-red-tint: #FFE9E9;
  --tier-neutral: #5F6B7C;   --tier-neutral-tint: #EEF1F3;

  /* Warning fills (the former severity ladder; the sensing-state tags, the
   * blind notice and the axis ticks still draw with them — every text/fill
   * pair below is computed ≥4.5:1). none/watch borrow the neutral and
   * tier-blue families, as the retired classic sheet did with the GDS
   * pairs (chainhome.css, git history; #185). */
  --sev-none: #C9CFD6;
  --sev-watch: #006B8C;
  --sev-elevated: #F1C21B;   /* ink text on this fill: 9.6:1 */
  --sev-high: #C87619;       /* ink text on this fill: 4.7:1 */
  --sev-critical: #CD4246;   /* white text on this fill: 4.6:1 */

  /* Sensing OK: the judgement palette carries no green — operational
   * health is not a judgement — so one restrained green pair, used only
   * by chainhome-state--ok. */
  --ok: #24713E;             --ok-tint: #E4F3E9;

  /* Flags that must never read as a level: identity-review (purple),
   * response capability (teal-green) — the classic sheet's rule, kept. */
  --review: #5E3B8C;         --review-tint: #EFE9F7;
  --capability: #0E6E5C;     --capability-tint: #DFF2ED;

  /* Honest-degradation notices (map chips): pale amber card, high accent. */
  --notice-bg: #FCF6DF;

  --font-sans: "IBM Plex Sans", -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;

  /* Hatch tiles: not-observing / unavailable are NON-DATA — texture, never
   * a status colour (the classic sheet's doctrine, minus its gradients). */
  --hatch: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8'%3E%3Crect width='8' height='8' fill='%23EEF1F3'/%3E%3Cpath d='M-2 2 L2 -2 M0 8 L8 0 M6 10 L10 6' stroke='%23CBD2DA' stroke-width='2'/%3E%3C/svg%3E");
  --hatch-veil: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8'%3E%3Cpath d='M-2 2 L2 -2 M0 8 L8 0 M6 10 L10 6' stroke='%23B7BEC7' stroke-opacity='0.5' stroke-width='2'/%3E%3C/svg%3E");
  --hatch-broad: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24'%3E%3Crect width='24' height='24' fill='%23F3F2F1'/%3E%3Cpath d='M-6 6 L6 -6 M0 24 L24 0 M18 30 L30 18' stroke='%23E5E4E3' stroke-width='12'/%3E%3C/svg%3E");
}

/* --- Base ------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { height: 100%; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font: 400 14px/1.45 var(--font-sans);
  -webkit-font-smoothing: antialiased;
}
strong, b { font-weight: 600; } /* the sheet ships two weights: 400 and 600 */
code {
  font-family: var(--font-mono);
  font-size: 12.5px;
  background: var(--tier-neutral-tint);
  padding: 1px 4px;
  border-radius: 2px;
}
/* The identifier utility: MMSI, ICAO hex, episode ids, coordinates,
 * timestamps — tabular so columns of them align. */
.mono {
  font-family: var(--font-mono);
  font-size: 0.93em;
  font-variant-numeric: tabular-nums;
}
a { color: var(--action); }
a:hover { color: var(--action-hover); }
/* One focus spelling, everywhere (no box-shadow rings). */
a:focus-visible, button:focus-visible, input:focus-visible,
select:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--action);
  outline-offset: 1px;
}
input[type="checkbox"], input[type="range"] { accent-color: var(--action); }

/* --- Page chrome: skip link, the navy band, footer -------------------------- */
.nu-skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 20;
  background: var(--surface);
  color: var(--ink);
  padding: 8px 12px;
  border: 1px solid var(--hairline);
}
.nu-skip:focus { left: 0; }

.nu-header {
  background: var(--navy);
  display: flex;
  align-items: stretch;
  gap: 24px;
  min-height: 46px;
  padding: 0 20px;
  flex: none; /* a flex-column body (.chainhome-fullbleed) must not squash the band */
  flex-wrap: wrap;
}
.nu-header__wordmark {
  display: flex;
  align-items: center;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-decoration: none;
  white-space: nowrap;
}
/* The wordmark mark (#187 T12): the #109 vessel dart — OUR glyph
 * (aircraft-icons.js VESSEL_ARROW), a mark, not a logo programme. The fill
 * is currentColor, so it rides the anchor's white (15.1:1 on the navy) and
 * would follow any future hover for free; the anchor's flex centring seats
 * the 16px box against the 14px smallcap wordmark — within a pixel of cap
 * centre under either Plex metric set, so no magic-number nudge. */
.nu-header__wordmark svg {
  flex: none;
  width: 16px;
  height: 16px;
  margin-right: 8px;
}
.nu-header :focus-visible { outline-color: #fff; }
.nu-nav {
  display: flex;
  margin-left: auto;
  flex-wrap: wrap;
}
.nu-nav__link {
  display: flex;
  align-items: center;
  padding: 0 12px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 13px;
  text-decoration: none;
  border-bottom: 2px solid transparent;
}
.nu-nav__link:hover { color: #fff; }
.nu-nav__link--active {
  color: #fff;
  font-weight: 600;
  border-bottom-color: #fff;
}

.nu-footer {
  max-width: 1200px;
  margin: 32px auto 0;
  padding: 12px 20px 20px;
  border-top: 1px solid var(--hairline);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  font-size: 12px;
  color: var(--muted);
}
.nu-footer__stamp { white-space: nowrap; }

/* The public pages' footer (#959): the contact address and the privacy
 * notice, under the front, access and privacy pages. */
.nu-site-footer { border-top: 1px solid var(--hairline); margin-top: 32px; }
.nu-site-footer__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 14px 20px 24px;
  font-size: 13px;
  color: var(--muted);
}

.ch-width-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  width: 100%;
}
.ch-main-wrapper { display: block; padding: 24px 0 8px; }

/* Wide-content scroll fence: data tables scroll inside their wrapper; the
 * page body never scrolls horizontally. The wrapper is a BFC, so the
 * table's own bottom margin stays inside it and a [hidden] table costs
 * zero height. */
.nu-scroll { overflow-x: auto; }

/* --- Type vocabulary --------------------------------------------------------- */
/* The classic templates' class names, restyled: h1 20px/600, h2 16px/600,
 * labels 12px/600 muted — density over GDS scale. */
.ch-caption-xl {
  display: block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 4px;
}
.ch-heading-xl, .ch-heading-l { font-size: 20px; font-weight: 600; margin: 0 0 16px; }
.ch-heading-m { font-size: 16px; font-weight: 600; margin: 28px 0 10px; }
.ch-heading-s { font-size: 13px; font-weight: 600; margin: 20px 0 8px; }
.ch-body { font-size: 14px; margin: 0 0 12px; }
.ch-body-l { font-size: 15px; margin: 0 0 16px; }
.ch-body-s { font-size: 13px; margin: 0 0 10px; }
/* A page of running text (the privacy notice, #959), held to a reading measure. */
.chainhome-prose { max-width: 72ch; padding-top: 24px; }
.ch-hint { font-size: 13px; color: var(--muted); margin: 0 0 12px; }
/* Per-feed connection detail on /status (#263): a muted subline under the feed
   name — the AISStream time-relaxed-TLS note, or the backoff reason when down. */
.chainhome-feed-detail { display: block; font-size: 12px; font-weight: 400; color: var(--muted); margin-top: 2px; }
.ch-link { color: var(--action); text-decoration: underline; text-underline-offset: 2px; }
.ch-link:hover { color: var(--action-hover); }
.ch-list { list-style: none; margin: 0 0 14px; padding: 0; }
.ch-list li { margin-bottom: 4px; }
.ch-list--bullet { list-style: disc; padding-left: 20px; }
.ch-inset-text {
  border-left: 3px solid var(--navy);
  padding: 8px 16px;
  margin: 0 0 16px;
}
.ch-inset-text > :last-child { margin-bottom: 0; }
.ch-warning-text {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 0 0 16px;
}
.ch-warning-text__icon {
  flex: none;
  width: 20px;
  height: 20px;
  border-radius: 2px;
  background: var(--navy);
  color: #fff;
  font-weight: 600;
  text-align: center;
  line-height: 20px;
}
.ch-warning-text__text { font-weight: 400; }
/* The standard clip pattern — the templates and JS both lean on it. */
.ch-visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: 0;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  border: 0;
  white-space: nowrap;
}

/* --- Tags & badges ------------------------------------------------------------ */
/* Base tag: JS composes ch-tag with a chainhome modifier at runtime
 * (status.js gnss rows), so the base must stand
 * alone; the neutral tint is the no-modifier fallback. */
.ch-tag {
  display: inline-block;
  padding: 1px 8px 2px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0.02em;
  border-radius: 2px;
  color: var(--ink);
  background: var(--tier-neutral-tint);
}

/* Sensing state tags: degraded/blind translate the classic sheet's
 * yellow/red families to elevated/critical; ok gets the one green pair. */
.chainhome-state--ok       { color: var(--ok); background: var(--ok-tint); }
.chainhome-state--degraded { color: var(--ink); background: var(--sev-elevated); }
.chainhome-state--blind    { color: #fff; background: var(--sev-critical); }

/* GNSS cell states (issue #32): DEGRADED is the layer's strongest claim
 * (critical hue), MARGINAL its honesty band (high hue) — the classic
 * sheet's mapping, re-toned. status.js emits these onto rebuilt zone rows. */
.chainhome-state--gnss-degraded { color: #fff; background: var(--sev-critical); }
.chainhome-state--gnss-marginal { color: var(--ink); background: var(--sev-high); }

/* Tier badges in the map's blue/red/neutral language — a contact's tier
 * reads the same family on these pages and on the map glyphs. */
.chainhome-tier--blue    { color: var(--tier-blue); background: var(--tier-blue-tint); }
.chainhome-tier--red     { color: var(--tier-red); background: var(--tier-red-tint); }
.chainhome-tier--neutral { color: var(--tier-neutral); background: var(--tier-neutral-tint); }

/* Flags that are metadata, never a level. */
.chainhome-badge--review     { color: var(--review); background: var(--review-tint); }
.chainhome-badge--capability { color: var(--capability); background: var(--capability-tint); }

/* Custody block on the asset page (#220, ADR-0023): the GUR block's summary-
 * list furniture with a blue left accent — the "held by blue" signal, the same
 * disposition the map pip and the selection row carry. The tag reads blue
 * (custody is blue's control now); the review note is the loud exception when a
 * custody hull broadcasts way on and the label may be stale. */
.chainhome-custody {
  border-left: 3px solid var(--tier-blue);
  padding-left: 12px;
}
.chainhome-custody__tag  { color: var(--tier-blue); background: var(--tier-blue-tint); }
.chainhome-custody__warn { color: var(--tier-red); font-weight: 600; }

/* --- Tables --------------------------------------------------------------------- */
/* Density spec: full-width surfaces, 32px rows, hairline rules, no zebra.
 * Column headers are 12px/600 muted labels; row headers (th[scope=row] —
 * the JS-rebuilt feed/zone/ledger rows emit them too) read as data. */
.ch-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border: 1px solid var(--hairline);
  margin: 0 0 20px;
}
.ch-table__caption {
  caption-side: top;
  text-align: left;
  font-weight: 600;
  color: var(--ink);
  padding: 0 0 6px;
}
.ch-table__caption--m { font-size: 14px; }
.ch-table__caption--s { font-size: 13px; }
.ch-table__header, .ch-table__cell {
  padding: 7px 12px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--hairline-subtle);
}
.ch-table__head .ch-table__header {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--muted);
  border-bottom: 1px solid var(--hairline);
  white-space: nowrap;
}
.ch-table__body .ch-table__header { font-size: 14px; font-weight: 600; }
.ch-table__body .ch-table__row:last-child .ch-table__header,
.ch-table__body .ch-table__row:last-child .ch-table__cell { border-bottom: 0; }
.ch-table__body .ch-table__row:hover { background: #FAFBFC; }
.ch-table__header--numeric { text-align: right; }
.ch-table__cell--numeric {
  text-align: right;
  font-family: var(--font-mono);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}
/* Id-shaped row headers the JS rebuilds without a .mono hook: GNSS zone
 * ids and cost-ledger episode ids. */
#gnss-zones-body .ch-table__header,
#paid-ledger-body .ch-table__header {
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
}

/* Compact density (#187 T11): ?density=compact stamps data-density on the
 * browse tables — 24px rows (Carbon xs: 12px text in the body's 1.45 line
 * box + 3px pads + the row rule), tag chips trimmed to hold the line. The
 * default attr renders empty, so default density is untouched. Descendant
 * selectors on purpose: the attr may sit on the table or its wrapper, and
 * these rules sit AFTER the base cell rules so the specificity ties break
 * compact's way. */
[data-density="compact"] .ch-table__header,
[data-density="compact"] .ch-table__cell {
  padding: 3px 12px;
  font-size: 12px;
}
[data-density="compact"] .ch-tag { padding: 0 6px 1px; }

/* --- Controls & forms -------------------------------------------------------------- */
.ch-button {
  display: inline-flex;
  align-items: center;
  height: 30px;
  padding: 0 14px;
  border: 1px solid var(--action);
  border-radius: 2px;
  background: var(--action);
  color: #fff;
  font: 600 13px/1 var(--font-sans);
  text-decoration: none;
  cursor: pointer;
  margin: 0 8px 10px 0;
}
.ch-button:hover { background: var(--action-hover); border-color: var(--action-hover); color: #fff; }
.ch-button--secondary {
  background: var(--surface);
  border-color: var(--hairline);
  color: var(--ink);
}
.ch-button--secondary:hover { background: var(--ground); border-color: var(--muted); color: var(--ink); }
.ch-button[disabled] {
  background: var(--tier-neutral-tint);
  border-color: var(--hairline);
  color: var(--muted);
  cursor: default;
}

/* The access page (#959): Sign in and Request access side by side. Without
 * a request form, Request access is a disclosure whose button is its
 * summary, and the contact address opens beneath it as selectable text. */
.chainhome-access { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 0 8px; }
.chainhome-access__request > summary { list-style: none; }
.chainhome-access__request > summary::-webkit-details-marker { display: none; }
.chainhome-access__request > p { margin: 2px 0 0; }
.chainhome-access__contact { user-select: all; }
.ch-select {
  height: 30px;
  padding: 0 6px;
  border: 1px solid var(--hairline);
  border-radius: 2px;
  background: var(--surface);
  color: var(--ink);
  font: 400 13px var(--font-sans);
}
.ch-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--muted);
  margin: 0 0 4px;
}
.ch-form-group { margin-bottom: 15px; }
.ch-checkboxes__item { display: flex; align-items: center; gap: 6px; min-height: 30px; }
.ch-checkboxes__input { width: 16px; height: 16px; margin: 0; }
.ch-checkboxes__label { font-size: 13px; font-weight: 400; color: var(--ink); margin: 0; }

/* The filter strip (#187 T5): both browse pages' filter form as ONE inline
 * white card — labels beside their controls as the sheet's 12px muted
 * smallcaps (5.41:1 on the surface), select VALUES in the action blue
 * (6.45:1; hover 8.67:1), groups separated by a muted middot — never
 * before the first group or the trailing submit. The ch-select chrome
 * flattens to inline text: a transparent border keeps the box metrics
 * under the focus outline. No new colours; the form semantics underneath
 * are byte-unchanged — a plain GET reload. */
.chainhome-filters {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: 2px;
  padding: 6px 14px;
  margin: 0 0 10px;
}
.chainhome-filters__row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  align-items: center;
}
.chainhome-filters__group {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
}
/* 8px + the group's own 6px gap = the row's 14px — the dot sits centred. */
.chainhome-filters__group + .chainhome-filters__group:not(:last-child)::before {
  content: "·";
  color: var(--muted);
  margin-right: 8px;
}
.chainhome-filters .ch-label {
  margin: 0;
  text-transform: uppercase;
}
.chainhome-filters .ch-select {
  border-color: transparent;
  background: transparent;
  color: var(--action);
  font-weight: 600;
  padding: 0 2px;
}
.chainhome-filters .ch-select:hover { color: var(--action-hover); }
.chainhome-filters__group .ch-button { margin-bottom: 0; }
/* The Reason menu (#625): the catalogue's headings run to 80 characters, so
 * the closed select is capped and shrinks with the row on a phone; the open
 * list shows each line whole. Headings read bold above their subheadings,
 * which sit indented beneath them. No new colours. */
.chainhome-filters__group--reason { min-width: 0; max-width: 100%; }
.chainhome-filters__reason { min-width: 0; max-width: 22rem; text-overflow: ellipsis; }
.chainhome-filters__reason--category { font-weight: 600; }
.chainhome-filters__reason--subcategory { font-weight: 400; }

/* Density toggle (#187 T11): a quiet caption line under the strip — the
 * current state bold ink, the alternative an action link (existing pairs
 * on the ground: 15.1:1 and 6.01:1). */
.chainhome-density,
.chainhome-rows {
  font-size: 12px;
  color: var(--muted);
  margin: 0 0 14px;
}
.chainhome-density__sep,
.chainhome-rows__sep { margin: 0 2px; }
.chainhome-density strong,
.chainhome-rows strong { color: var(--ink); }
/* The two caption lines stack, so the density line closes up against the
 * row-size line beneath it. */
.chainhome-density { margin-bottom: 2px; }

/* Rows per page and the pager (#335). The pager sits under the table and
 * reads as one quiet line; an unavailable direction stays in place as muted
 * text, so the line does not reflow between the first page and the last. */
.chainhome-pager {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 13px;
  margin: 10px 0 20px;
}
.chainhome-pager__where { color: var(--muted); }
.chainhome-pager__off { color: var(--muted); opacity: 0.55; }

/* --- Omnisearch on /assets (#212) --------------------------------------------------- */
/* The find box: one plain-GET form (?q=) above the filter strip, the approved
 * mockup's values on the sheet's tokens. The hint names WHAT the box searches
 * and nothing else — the ordering fence is code + unit test, never chrome
 * copy (operator ruling 2026-07-25). */
.chainhome-find {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: 2px;
  padding: 8px 14px 10px;
  margin: 0 0 10px;
}
.chainhome-find__row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.chainhome-find .ch-label { margin: 0; text-transform: uppercase; }
.chainhome-find__input {
  flex: 1;
  max-width: 34em;
  height: 30px;
  padding: 0 8px;
  border: 1px solid var(--hairline);
  border-radius: 2px;
  font: 400 13px var(--font-sans);
  color: var(--ink);
  background: var(--surface);
}
.chainhome-find__input::placeholder { color: #9AA4B0; }
.chainhome-find .ch-button { margin: 0; }
.chainhome-find__hint {
  margin: 6px 0 0;
  font-size: 12px;
  color: var(--muted);
}
/* Typed result cards: the multi-match always renders this list, never a
 * guess. Glyphs type by SILHOUETTE alone (vessel dart / aircraft plan) in
 * chrome grey — the class palette has one spelling (map.js paints at boot,
 * ADR-0010) and a server-rendered page must not fork it. */
.chainhome-findcard {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: 2px;
  padding: 10px 14px;
  margin: 0 0 8px;
}
.chainhome-findcard__glyph {
  flex: none;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--ground);
  border: 1px solid var(--hairline-subtle);
  border-radius: 2px;
  color: var(--muted);
}
.chainhome-findcard__main { flex: 1; min-width: 0; }
.chainhome-findcard__name { font-size: 14px; font-weight: 600; margin: 0; }
.chainhome-findcard__id { margin: 1px 0 2px; font-size: 12px; color: var(--muted); }
.chainhome-findcard__match { margin: 2px 0 0; font-size: 12px; color: var(--muted); }
.chainhome-findcard__side { flex: none; text-align: right; font-size: 12px; color: var(--muted); }
.chainhome-findcard__side .ch-tag { display: inline-block; margin-bottom: 4px; }

/* --- Status page ------------------------------------------------------------------ */
/* Collector-silent banner: an attention card, not GDS's blue block. */
.ch-notification-banner {
  background: var(--surface);
  border: 1px solid var(--sev-critical);
  border-left-width: 3px;
  border-radius: 2px;
  margin: 0 0 20px;
}
.ch-notification-banner__header { padding: 8px 14px 0; }
.ch-notification-banner__title {
  font-size: 13px;
  font-weight: 600;
  color: var(--sev-critical);
  margin: 0;
}
.ch-notification-banner__content { padding: 4px 14px 10px; }
.ch-notification-banner__heading { font-size: 14px; font-weight: 600; margin: 0; }

.chainhome-headline { max-width: 44em; }

.chainhome-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: baseline;
}
.chainhome-legend li { margin: 0; }
.chainhome-legend__silent {
  display: inline-block;
  padding: 2px 8px 3px;
  background: var(--hatch);
  border-radius: 2px;
  color: var(--ink);
  font-size: 12px;
}

/* Tiles: white cards, hairline borders, tabular numbers. */
.chainhome-tiles {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 0 0 20px;
}
.chainhome-tile {
  flex: 1 1 180px;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: 2px;
  padding: 10px 14px 12px;
}
.chainhome-tile dt {
  margin: 0 0 6px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--muted);
}
.chainhome-tile dd { margin: 0; }
.chainhome-tile .chainhome-tile__number {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 20px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.chainhome-tile__denominator {
  display: block;
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 400;
  color: var(--muted);
  margin-top: 2px;
}

/* --- The map home ------------------------------------------------------------------- */
/* Structural rules ported from the retired classic sheet — load-bearing, not
 * cosmetic. Full-bleed (#134): the flex-column body makes band + shell sum
 * to exactly the viewport at any chrome height; these pages drop the
 * footer. Below the shell's floor the page overflows and scrolls — honest
 * reachability beats clipping. */
.chainhome-fullbleed {
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
}
.chainhome-fullbleed .chainhome-map-main {
  flex: 1;
  display: flex;
  flex-direction: column;
}
.chainhome-map-main { display: block; }
.chainhome-map-shell {
  position: relative;
  flex: 1;
  min-height: 480px;
  overflow: hidden;
}
/* height/width 100% are load-bearing (#26/#27): MapLibre stamps
 * .maplibregl-map{position:relative} onto this same element at boot, and
 * maplibre-gl.css loads AFTER this sheet — on the specificity tie it wins,
 * under which `inset: 0` only shifts the box and height collapses to 0.
 * Explicit 100% fills the shell regardless of the position keyword. */
.chainhome-map { position: absolute; inset: 0; height: 100%; width: 100%; }
.chainhome-map--unavailable { background: var(--hatch-broad); }

/* The Layers control (#218): a 38px reveal button in the old card's slot
 * (top-right, INSIDE the shell — structurally below the nav band) and the
 * grouped flyout it opens. Values are the approved mockup's, mapped onto
 * the sheet's tokens where a token exists (#DCE0E5=--hairline,
 * #E5E8EB=--hairline-subtle, #5F6B7C=--muted, #215DB0=--action); the
 * greys without tokens (#8F99A8 sect labels, #F1F4F6 hover) stay literal,
 * as chrome, not judgement colour. The flyout APPEARS — display toggles,
 * no transition/shadow (ADR-0018 §6). Tier/CNI/limits marks are tinted by
 * map.js at boot (ADR-0010's one-spelling rule; the themed cni/limits
 * tables) — this sheet carries no judgement hex. */
.chainhome-layers-button {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 3;
  width: 38px;
  height: 38px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.97);
  border: 1px solid var(--hairline);
  border-radius: 2px;
  cursor: pointer;
}
.chainhome-layers-button:hover { background: #F1F4F6; }
.chainhome-layers-button svg { display: block; }
.chainhome-layers-button__badge {
  position: absolute;
  right: -5px;
  bottom: -5px;
  min-width: 16px;
  height: 16px;
  /* 8px: the #218 spec's pill badge — a static 16px disc. The sheet
   * header's 2px-radius line yields to the operator-approved mockup here;
   * ADR-0018 §6 (the enforced ban) covers shadows/filters/animation/
   * transitions/gradients, not radii. */
  border-radius: 8px;
  background: var(--action);
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  line-height: 16px;
  text-align: center;
  padding: 0 3px;
}

/* The flyout panel — the same fieldset#layer-toggles as ever (the input
 * contract is byte-identical; #190 reads the checkboxes through
 * display:none untouched). 46px below the button top, right-aligned. */
.chainhome-layers {
  position: absolute;
  top: 56px;
  right: 10px;
  z-index: 3;
  width: 200px;
  margin: 0;
  padding: 8px 0 6px;
  background: rgba(255, 255, 255, 0.97);
  border: 1px solid var(--hairline);
  border-radius: 2px;
}
/* An explicit display would defeat the hidden attribute (the map-notice
 * lesson): pin the guard so [hidden] always wins. */
.chainhome-layers[hidden] { display: none; }
.chainhome-layers__hd {
  margin: 0 0 2px;
  padding: 0 12px 4px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--muted);
  border-bottom: 1px solid var(--hairline-subtle);
}
.chainhome-layers__sect {
  margin: 7px 12px 2px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #8F99A8;
}
.chainhome-layers__row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 3px 12px;
  font-size: 12.5px;
  line-height: 1.3;
  cursor: pointer;
  user-select: none;
}
.chainhome-layers__row:hover { background: #F1F4F6; }
.chainhome-layers__input { margin: 0; }
/* Identification marks. Judgement swatches + the CNI halves + the limits
 * line samples ship colourless — map.js paints them at boot from the one
 * palette authority and the themed cni/limits tables (ADR-0010). */
.chainhome-layers__swatch {
  display: inline-flex;
  width: 9px;
  height: 9px;
  border-radius: 1px;
  flex: none;
  overflow: hidden;
}
.chainhome-layers__swatch-half { flex: 1 1 50%; }
/* GNSS: the amber warning hatch — a non-data texture, so a tiled
 * inline-SVG data URI per the sheet's hatch-token precedent (the gradient
 * ban does not cover it, and data URIs cannot read var()). The stripe
 * amber is by value the --sev-elevated amber; the border is the #218
 * spec's #D9C23A. */
.chainhome-layers__swatch--gnss {
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='6' height='6'%3E%3Crect width='6' height='6' fill='%23FFFFFF'/%3E%3Cpath d='M-1.5 1.5 L1.5 -1.5 M0 6 L6 0 M4.5 7.5 L7.5 4.5' stroke='%23F1C21B' stroke-width='2'/%3E%3C/svg%3E");
  border: 1px solid #D9C23A;
}
.chainhome-layers__line { width: 18px; height: 0; flex: none; }
/* Dash grammar echoes the map's own limit dashes (ts12 [3,2] dashed, eez
 * dash-dot — dotted is the closest border-style spelling, per the
 * approved mockup); colours land at boot from the themed limits table. */
.chainhome-layers__line--ts12 { border-top: 2px dashed currentColor; }
.chainhome-layers__line--eez { border-top: 2px dotted currentColor; }
/* The satellite picture rows (#412): one flat kind-tone chip each,
 * painted at boot by map.js from the satellite pair (data-sat-kind),
 * wider than a tier dot. */
.chainhome-layers__swatch--coverage { width: 18px; }
.chainhome-layers__swatch--optical { width: 18px; }
/* Sea and wind (#556, ADR-0039): the wash row's chip is a wide flat
 * swatch like the picture rows', painted at boot by map.js with the
 * middle wave band. The Barbs and arrows row below it sits flush since
 * #761: it draws on its own, and an indented row reads as depending on
 * the row above it. */
.chainhome-layers__swatch--conditions { width: 18px; }
/* The nested rows: the CNI categories alone (#732, #761), indented past
 * the parent's checkbox so they read as parts of the CNI layer. */
.chainhome-layers__row--nested { padding-left: 32px; }
/* The CNI routes row (#732): three class colours in thirds, so the parent
 * swatch widens past the 9px dot to keep each third legible; its nested
 * category rows carry a short solid line in their class colour, the
 * limits rows' sample shape. map.js paints all four from the themed cni
 * table, so the dark palette needs no rule of its own here. */
.chainhome-layers__swatch--cni-routes { width: 12px; }
.chainhome-layers__swatch-third { flex: 1 1 33.333%; }
.chainhome-layers__line--cni { border-top: 2.5px solid currentColor; }
/* Seabed depth (#749): three steps of the depth ramp side by side, shallow
 * to deep, painted at boot by map.js from the themed seabed bands. The
 * hairline keeps the chip legible where the ramp meets the panel's own
 * ground: the light shallows on white, the dark deeps on the dark panel. */
.chainhome-layers__swatch--seabed { width: 18px; border: 1px solid var(--hairline); }

/* The blind notice (#263): the TOP-anchored twin of the bottom degradation
 * chips — a whole sensing domain gone dark is a stronger coverage caveat than
 * a stale feed, so it wears the critical (blind) accent, not amber, and sits
 * where the eye lands first. Still a coverage caveat, NOT a posture assertion
 * (ADR-0018): the map stays a pure tactical view. Ships hidden; status.js
 * fills and reveals it. max-content + a max cap keeps a one-line chip snug and
 * wraps the both-blind line rather than spanning the whole canvas. */
.chainhome-blind-notices {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 6; /* above the layers button (3) and bottom notices (4) */
  width: max-content;
  max-width: min(92%, 52em);
}
.chainhome-blind-notice {
  display: flex;
  align-items: baseline;
  gap: 9px;
  background: var(--surface);
  /* No box-shadow: the no-GPU sheet bans it (#183). An opaque surface + a
   * full hairline border + the critical left accent separate the chip from
   * the map without one — the bottom degradation chips do the same. */
  border: 1px solid var(--hairline);
  border-left: 4px solid var(--sev-critical);
  border-radius: 3px;
  padding: 9px 13px;
  font-size: 13px;
  line-height: 1.4;
}
.chainhome-blind-notice__tag {
  flex: none;
  align-self: center;
  background: var(--sev-critical);
  color: #fff;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  padding: 3px 7px;
  border-radius: 2px;
  white-space: nowrap;
}
.chainhome-blind-notice__text { color: var(--ink); }
.chainhome-blind-notice__text strong { font-weight: 600; }
.chainhome-blind-notice__text a { color: var(--action); }
/* The DEGRADED variant (#452): the bottom degradation chips' amber accent
 * against blind's critical red, with the tag on the
 * ink-on-amber pair (4.7:1; the dark sheet overrides the ink below). */
.chainhome-blind-notice--degraded { border-left-color: var(--sev-high); }
.chainhome-blind-notice--degraded .chainhome-blind-notice__tag {
  background: var(--sev-high);
  color: var(--ink);
}
.chainhome-blind-notices[hidden] { display: none; }

/* Honest degradation chips: amber-tinted cards with a high-hue accent
 * bar — attention without asserting severity. Anchored ABOVE the rewind
 * strip, not at the classic 24px: at 24px a multi-line #166 focus-miss
 * notice buries its lower lines under the bar (measured on the #183
 * integration drive; the classic sheet shares the tie and the quirk —
 * left as-is there, classic is byte-frozen under this issue). */
.chainhome-map-notices {
  position: absolute;
  bottom: calc(var(--rewind-bar-h) + 10px); /* above the docked bar (#227) */
  left: 50%;
  transform: translateX(-50%);
  z-index: 4;
  text-align: center;
}
.chainhome-map-notice {
  display: inline-block;
  margin: 4px 0 0;
  background: var(--notice-bg);
  border: 1px solid var(--hairline);
  border-left: 3px solid var(--sev-high);
  border-radius: 2px;
  padding: 6px 12px;
  font-size: 13px;
  max-width: 44em;
}
/* An explicit display would defeat the hidden attribute (measured on the
 * classic sheet: the no-WebGL notice shone through on a healthy page). */
.chainhome-map-notice[hidden] { display: none; }

/* The #166 focus-miss notice: same chip, left-aligned multi-line, with a
 * dismiss affordance. map.js emits this class pair at runtime. */
.chainhome-map-notice--focus {
  position: relative;
  padding-right: 34px;
  text-align: left;
}
/* The same idiom on the dossier (#212): the map search's expired hit lands
 * on /assets/{id}?focus_miss=1 — block flow with breathing room below,
 * nothing else changes. */
.chainhome-map-notice--dossier { margin: 4px 0 16px; }
.chainhome-map-notice__dismiss {
  position: absolute;
  top: 2px;
  right: 6px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  padding: 2px 4px;
}
.chainhome-map-notice__dismiss:hover { color: var(--ink); }

/* --- Map omnisearch (#212): the find box folded to the top-left button ------ */
/* The layers-control idiom mirrored to the map chrome's one unclaimed
 * corner: a 38px reveal button, and the dropdown that replaces it while
 * open. Rows are ANCHORS (a live hit navigates ?focus=, an expired hit
 * the dossier) — ink text, no underline, hover per the flyout rows. The
 * expired treatment is the declared-absence pair the selection panel
 * already speaks: action-blue italic line, muted name. */
.chainhome-search-button {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 3;
  width: 38px;
  height: 38px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.97);
  border: 1px solid var(--hairline);
  border-radius: 2px;
  cursor: pointer;
}
.chainhome-search-button:hover { background: #F1F4F6; }
.chainhome-search-button svg { display: block; }
.chainhome-search {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 5;
  width: 340px;
  background: rgba(255, 255, 255, 0.97);
  border: 1px solid var(--hairline);
  border-radius: 2px;
  font-family: var(--font-sans);
}
/* An explicit display would defeat the hidden attribute (the map-notice
 * lesson): pin the guard so [hidden] always wins. */
.chainhome-search[hidden] { display: none; }
.chainhome-search__row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
}
.chainhome-search__row svg { flex: none; }
.chainhome-search__input {
  flex: 1;
  border: 0;
  background: transparent;
  font: 400 13px var(--font-sans);
  color: var(--ink);
  outline: none;
}
.chainhome-search__hd {
  margin: 0;
  padding: 5px 12px 4px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #8F99A8;
  border-top: 1px solid var(--hairline-subtle);
}
.chainhome-search__result {
  display: flex;
  gap: 9px;
  padding: 6px 12px;
  align-items: flex-start;
  cursor: pointer;
  color: var(--ink);
  text-decoration: none;
  border-top: 1px solid transparent;
}
.chainhome-search__result:hover { background: #F1F4F6; }
.chainhome-search__glyph { flex: none; color: var(--muted); display: inline-flex; }
.chainhome-search__rmain { flex: 1; min-width: 0; }
.chainhome-search__rname { font-size: 13px; font-weight: 600; margin: 0; }
.chainhome-search__rid { font-weight: 400; color: var(--muted); }
.chainhome-search__result--record .chainhome-search__rname { color: var(--muted); }
.chainhome-search__rmeta { font-size: 11.5px; color: var(--muted); margin: 1px 0 0; }
.chainhome-search__rlive { font-size: 11.5px; margin: 1px 0 0; color: var(--muted); }
.chainhome-search__rlive--live { color: var(--ink); }
.chainhome-search__rlive--record { color: var(--action); font-style: italic; }
.chainhome-search__foot {
  margin: 0;
  padding: 6px 12px 8px;
  font-size: 11px;
  color: var(--muted);
  border-top: 1px solid var(--hairline-subtle);
}
/* While the selection panel is open the top-left slot sits under it: the
 * button and the open dropdown take the standing left-lane jump (ADR-0019
 * geometry; the #map-legend and ctrl-bottom-left rules below move the
 * legend and attribution the same way). */
html.chainhome-selection-open .chainhome-search-button,
html.chainhome-selection-open .chainhome-search { left: 370px; }

/* Popups (map.js's context popups + playback.js's T14 identify popups —
 * both DOM-built): a white card with a hairline border and 13px type.
 * maplibre-gl.css loads after this sheet, so its box-shadow and 3px
 * radius are beaten on specificity, not order. */
.chainhome-popup { font-size: 13px; }
.chainhome-popup p { margin: 0 0 2px; font-size: 13px; }
.chainhome-popup p strong { font-weight: 600; }
.chainhome-popup__link { display: inline-block; margin-top: 4px; }
.maplibregl-popup .maplibregl-popup-content {
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: 2px;
  box-shadow: none;
  padding: 10px 12px 12px;
}
.maplibregl-popup .maplibregl-popup-close-button {
  font-size: 16px;
  color: var(--muted);
  padding: 0 6px;
}
.maplibregl-popup .maplibregl-popup-close-button:hover { color: var(--ink); background: transparent; }
/* MapLibre's zoom control ships a box-shadow ring — flatten it. */
.chainhome-map .maplibregl-ctrl-group {
  box-shadow: none;
  border: 1px solid var(--hairline);
  border-radius: 2px;
  background: var(--surface);
}

/* --- GNSS witness roster (#213): the zone popup's enumeration ----------------- */
/* Approved mockup 213-witness-variant-A (operator ruling 2026-07-25), class
 * names as mocked. Never-good rows take the app's hatch veil — the declared-
 * absence treatment, distinct by texture and prose, no new judgement colour
 * (ADR-0010 / ADR-0020 rule 3) — with the action-blue italic declaration. */
.chainhome-witnesses {
  width: 100%;
  border-collapse: collapse;
  margin: 8px 0 4px;
  font-size: 12.5px;
}
.chainhome-witnesses th {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--muted);
  text-align: left;
  padding: 3px 14px 3px 0;
  border-bottom: 1px solid var(--hairline);
  white-space: nowrap;
}
.chainhome-witnesses td {
  padding: 3px 14px 3px 0;
  border-bottom: 1px solid var(--hairline-subtle);
  vertical-align: top;
}
.chainhome-witnesses th:last-child, .chainhome-witnesses td:last-child { padding-right: 0; }
.chainhome-witnesses tr:last-child td { border-bottom: 0; }
.chainhome-witnesses .num {
  text-align: right;
  font-family: var(--font-mono);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.chainhome-witnesses th.num { text-align: right; }
.chainhome-witnesses td.mono { font-size: 12px; }
.chainhome-witness--nevergood td { color: var(--muted); background: var(--hatch-veil); }
.chainhome-witness__standing--acquitting { color: var(--muted); }
.chainhome-witness__standing--nevergood { color: var(--action); font-style: italic; }
.chainhome-witness-caveat { font-size: 12px; color: var(--muted); margin: 6px 0 0; max-width: 56em; }

/* --- The selection panel (#187 T2, ADR-0019) ---------------------------------- */
/* The one docked detail surface: an OVERLAY on the shell's LEFT edge (right
 * at first build; operator ruling 2026-07-17, #208 — ADR-0019 geometry line
 * amended in place), never a map-shrink — resizing re-rasterises the whole
 * canvas on the no-GPU host (ADR-0019 geometry ruling). No transition
 * either way: the panel appears.
 * bottom: 85px sits the panel exactly on the rewind strip's top edge —
 * measured, not guessed: the strip's shipped bottom: 30px anchor + its
 * 55px rendered height (8px padding-top + the 45px scrub column: 20px
 * range + 5px posture strip + 20px timeaxis + 2px borders; Firefox, the
 * e2e browser). The zoom control (bottom-right) tops out at 70px (10px
 * margin + two 29px buttons + 2px border) — below the panel's bottom edge
 * AND on the opposite edge since the left dock, doubly outside its
 * footprint. No display property here: the aside hides via the UA [hidden]
 * rule, which an author display would defeat (the sheet's twice-measured
 * trap). */
.chainhome-selection-panel {
  position: absolute;
  top: 0;
  left: 0;
  bottom: var(--rewind-bar-h); /* flush on the docked bar's top edge (#227) */
  width: 360px;
  z-index: 4; /* over map + furniture; the later-DOM degradation chips still paint above */
  padding: 10px 14px 12px;
  background: var(--surface);
  border-right: 1px solid var(--hairline);
  overflow-y: auto;
}
.chainhome-selection-panel__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}
.chainhome-selection-panel__overline {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
}
.chainhome-selection-panel__close {
  flex: none;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}
.chainhome-selection-panel__close:hover { color: var(--ink); }
.chainhome-selection-panel__title {
  margin: 2px 0 10px;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.25;
}
.chainhome-selection-panel__body { border-top: 1px solid var(--hairline); }
/* Key/value rows at the summary-list's density; values wrap — AIS names
 * are wild data and must never push the panel wide. */
.chainhome-selection-row {
  display: flex;
  gap: 12px;
  padding: 6px 0;
  border-bottom: 1px solid var(--hairline-subtle);
}
.chainhome-selection-row__key {
  flex: 0 0 96px;
  padding-top: 1px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--muted);
}
.chainhome-selection-row__value {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
}
.chainhome-selection-panel__freshness {
  margin: 10px 0 0;
  font-size: 12px;
  color: var(--muted);
}
/* Value treatments. --mono mirrors the .mono utility so identifiers read
 * as one family everywhere. --absent is a DECLARED absence ("No SOG
 * broadcast") — the action blue (6.45:1 on white, #185) in italic, never
 * underlined: underline is the link treatment, and a declaration must not
 * read clickable. map.js also flips the freshness line to --absent on
 * expiry — this rule sits after the freshness one so the tie breaks its
 * way. */
.chainhome-selection-row__value--mono {
  font-family: var(--font-mono);
  font-size: 0.93em;
  font-variant-numeric: tabular-nums;
}
.chainhome-selection-row__value--absent {
  color: var(--action);
  font-style: italic;
}
/* Tier word in the tier row: the dark-set tier text tokens (#163), no new
 * colours — all three clear AA on the white panel surface. */
.chainhome-selection-tier--blue    { color: var(--tier-blue); font-weight: 600; }
.chainhome-selection-tier--red     { color: var(--tier-red); font-weight: 600; }
.chainhome-selection-tier--neutral { color: var(--tier-neutral); font-weight: 600; }
/* Custody row (#220, ADR-0023): a blue-held red hull. The row reads as "held
 * by blue" — the blue-tint fill + a blue left accent, the panel's chip-row of
 * the "In custody" disposition. The split pip echoes the map mark (blue LEFT /
 * red RIGHT); the under-way line is the loud exception when the label may be
 * stale. Hues on the pip are the map-glyph tier spelling (GROUP_COLOURS on the
 * /new theme, #00A8DC / #FF3031) so panel and pip read as one mark; the row
 * chrome uses the panel's AA-legible text tokens. */
.chainhome-selection-custody {
  background: var(--tier-blue-tint);
  border-bottom: none;
  border-left: 3px solid var(--tier-blue);
  padding-left: 9px;
  margin: 4px 0;
}
.chainhome-selection-custody__pip {
  flex: none;
  position: relative;
  overflow: hidden;
  display: inline-block;
  width: 11px;
  height: 11px;
  margin-right: 7px;
  border-radius: 50%;
  vertical-align: -1px;
  background: #ff3031; /* red — the RIGHT half of the custody seam */
}
/* The blue LEFT half. Two solid halves via a pseudo-element, NOT a
 * linear-gradient: the no-GPU sheet bans gradient() (ADR-0018 §6). Same
 * blue-left/red-right seam as the canvas pip images. */
.chainhome-selection-custody__pip::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 50%;
  background: #00a8dc;
}
/* The CNI route's Category row (#732): a short line in the route's class
 * colour before the category words, the map line in miniature. map.js
 * sets the colour inline from the themed cni table (currentColor), so the
 * one rule serves both palettes. */
.chainhome-selection-cni-mark {
  display: inline-block;
  width: 14px;
  height: 0;
  margin-right: 7px;
  vertical-align: 4px;
  border-top: 3px solid currentColor;
}
.chainhome-selection-custody__warn {
  display: block;
  margin-top: 3px;
  font-size: 12px;
  font-weight: 600;
  color: var(--tier-red);
}
/* Expired from the live picture (ADR-0019: the panel never closes itself):
 * last-known values dim to muted; declared absences keep their accent —
 * the freshness declaration is the loudest line on a stale panel. */
.chainhome-selection-panel[data-stale="true"]
  .chainhome-selection-row__value:not(.chainhome-selection-row__value--absent) {
  color: var(--muted);
}
/* Open state (map.js stamps the root class): the LEFT-lane furniture jumps
 * right of the 360px panel in one step — no transition (ADR-0018 §6). The
 * legend keeps its shipped 10px inset, now off the panel's edge; the
 * bottom-left MapLibre container (attribution + scale row) moves by the
 * panel width so its controls' own 10px margins land the same 370px line.
 * The degradation chips re-centre over the free half (half the panel
 * width); centred over the full shell they run under the panel below
 * ~1292px widths. The layers card, zoom stack and cursor readout live on
 * the right edge — outside the panel's footprint since the left dock
 * (#208), the open state no longer moves them. */
html.chainhome-selection-open #map-legend,
html.chainhome-selection-open #map-legend-class,
html.chainhome-selection-open #map-legend-button { left: 370px; }
html.chainhome-selection-open .chainhome-map-shell .maplibregl-ctrl-bottom-left { left: 360px; }
html.chainhome-selection-open .chainhome-map-notices { left: calc(50% + 180px); }
/* The top notices re-centre over the same free half and give up the panel's
 * width, so a long sensing chip never lies across the panel's close button. */
html.chainhome-selection-open .chainhome-blind-notices {
  left: calc(50% + 180px);
  max-width: min(calc(92% - 360px), 52em);
}

/* --- Tier legend + cursor readout (#187 T3 + T7) -------------------------------- */
/* One shared floor, measured not guessed. The rewind strip owns y 30–85px
 * (30px anchor + 55px rendered height — the panel comment above carries the
 * breakdown), and BOTH corner lanes it spares are too small for this
 * furniture: bottom-left, the compact ODbL attribution (map.js adds it
 * compact) is a 24px box (20px content-box min-height + 2×2px padding,
 * vendored maplibre-gl.css) with 10px margins — top edge 34px, expanding
 * rightward on one line, never upward — but the legend is a ~97px-tall card
 * overlapping the strip's x-range (strip left: 12px), so the attribution's
 * 34px line is not the binding constraint, the strip's 85px edge is.
 * Bottom-right, the zoom stack tops out at 70px but its lane is only ~46px
 * wide (strip right: 56px) against a ~162px readout (20 glyphs of 12px
 * Plex Mono at 7.2px advance + padding + border) — anchored at 76px it
 * would cross the strip's top band. So the readout anchors at bottom:
 * 92px — the degradation notices' measured above-strip line (85px + 7px
 * clearance) — and the legend at 126px, above the raised control row
 * (next rule). */
/* The bottom-left MapLibre container (compact attribution + the T7 scale)
 * rises above the rewind strip as one row: stacked at the vendored
 * bottom:0 the SECOND control lands at ~y[42,66] — wholly inside the
 * strip's opaque band (y 30–85) and invisible (the B2 measurement that
 * caught it). A flex row at bottom:85px puts both on one line at
 * y[95,119], attribution first, scale beside it. */
.chainhome-map-shell .maplibregl-ctrl-bottom-left {
  bottom: calc(var(--rewind-bar-h) + 10px); /* above the docked bar (#227) */
  display: flex;
  flex-direction: row;
  align-items: flex-end;
}
/* The zoom stack lifts above the docked bar's right end (#227): the bar is
 * full-width now, so the old right:56px inset that cleared it is gone — the
 * control rides above it instead (operator ruling). */
.chainhome-map-shell .maplibregl-ctrl-bottom-right {
  bottom: calc(var(--rewind-bar-h) + 10px);
}
/* Scoped by id: the bare .chainhome-legend is the status page's posture
 * legend (a flex row of tags); the id styles the map card without renaming
 * the class the #187 DOM contract fixes. The card sits ABOVE the raised
 * control row (its 24px line + margins top out at 119px). */
/* Both map keys share the corner card (#215): the class legend (the default
 * view) and the tier legend swap in the same slot, one hidden at a time. */
/* The legend collapses behind a bottom-left button (#227 follow-on): the card
 * shows only when opened, so it affords bigger swatches and more room. Both the
 * button and the opened card anchor above the docked bar off the one knob. */
#map-legend,
#map-legend-class {
  position: absolute;
  left: 10px; /* MapLibre's corner inset — reads as control furniture */
  bottom: calc(var(--rewind-bar-h) + 68px); /* clear of the bottom-left attribution/scale row (+10, ~44px tall) */
  z-index: 3;
  display: block; /* overrides the status-legend flex row */
  margin: 0;
  padding: 11px 14px 12px;
  background: rgba(255, 255, 255, 0.97);
  border: 1px solid var(--hairline);
  border-radius: 2px;
}
.chainhome-legend-button {
  position: absolute;
  left: 10px;
  bottom: calc(var(--rewind-bar-h) + 68px); /* clear of the bottom-left attribution/scale row (+10, ~44px tall) */
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 11px;
  background: rgba(255, 255, 255, 0.97);
  border: 1px solid var(--hairline);
  border-radius: 2px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}
.chainhome-legend-button[hidden] { display: none; }
.chainhome-legend-button:hover { background: #F1F4F6; }
.chainhome-legend-button__swatches { display: inline-flex; gap: 3px; }
/* Header (title + close ×) inside each opened card. */
.chainhome-legend__hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 8px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
}
.chainhome-legend__close {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 16px;
  line-height: 1;
  padding: 0;
  cursor: pointer;
}
.chainhome-legend__close:hover { color: var(--ink); }
/* Bigger swatches now the key is out of the way (operator: the squares were
 * cramped) — scoped to the map cards, so the button preview and the status
 * page's posture legend keep the base 10px. */
#map-legend .chainhome-legend__chip,
#map-legend-class .chainhome-legend__chip {
  width: 14px;
  height: 14px;
}
#map-legend .chainhome-legend__chip--ring,
#map-legend-class .chainhome-legend__chip--ring {
  border-width: 3px;
}
/* The custody legend chip: the blue-held-red split, two solid halves via a
 * pseudo-element (NOT a gradient — the no-GPU sheet bans gradient(),
 * ADR-0018 §6). Painted by CSS, not paintLegend, in both keys. */
.chainhome-legend__chip--custody {
  position: relative;
  overflow: hidden;
  background: #ff3031; /* red RIGHT half */
}
.chainhome-legend__chip--custody::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 50%;
  background: #00a8dc; /* blue LEFT half */
}
#map-legend .chainhome-legend__row,
#map-legend-class .chainhome-legend__row {
  font-size: 13px;
  gap: 9px;
}
/* An explicit display would defeat the hidden attribute the swap toggles
 * (the same trap #map-nogl and the notices guard against). */
#map-legend[hidden],
#map-legend-class[hidden] {
  display: none;
}
.chainhome-legend__row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  font-size: 12px;
  line-height: 1.4;
}
.chainhome-legend__row + .chainhome-legend__row { margin-top: 4px; }
/* Sea / Air dividers in the colour-by-type key (#215): the flyout __sect
 * tone, scoped to the legend card. Breaks the __row adjacency above, so the
 * first row of each section reads under its label with no double gap. */
.chainhome-legend__sect {
  margin: 6px 0 2px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.chainhome-legend__sect:first-child { margin-top: 0; }
/* Chips ship COLOURLESS (ADR-0010: one spelling of tier colour) — map.js
 * paints backgrounds and ring colours at boot, before the WebGL check, so
 * the key is tinted even on the no-GL degradation page. CSS owns geometry
 * only: 10px squares; the ring variant renders as a 2px ring once the
 * JS sets its border colour over the white it paints. */
.chainhome-legend__chip {
  flex: none;
  width: 10px;
  height: 10px;
}
.chainhome-legend__chip--ring { border: 2px solid transparent; }
/* The sea and wind key (#556): its own card in the same corner, stacked
 * above the Legend button, shown whenever the wash row is on and hidden
 * when it is off (map.js flips hidden; the Legend button's own state
 * is not consulted). The base offset clears the button's ~32px box plus
 * an 8px gap; while an opened key card stands in the button's place,
 * map.js restates the offset from that card's measured height. Chips
 * ship colourless and take the five wave bands at boot, like the tier
 * chips. Flat colour, no shadow (ADR-0018). */
#map-legend-conditions {
  position: absolute;
  left: 10px;
  bottom: calc(var(--rewind-bar-h) + 108px);
  z-index: 3;
  display: block;
  margin: 0;
  padding: 11px 14px 12px;
  background: rgba(255, 255, 255, 0.97);
  border: 1px solid var(--hairline);
  border-radius: 2px;
}
#map-legend-conditions[hidden] { display: none; }
#map-legend-conditions .chainhome-legend__chip {
  width: 14px;
  height: 14px;
}
#map-legend-conditions .chainhome-legend__row {
  font-size: 13px;
  gap: 9px;
}
/* The caption under the bands: the run and its age, or the declared
 * absence, in the muted tone. */
#conditions-analysis {
  margin-top: 8px;
  font-size: 12px;
  color: var(--muted);
}
html.chainhome-selection-open #map-legend-conditions { left: 370px; }
/* The seabed depth key (#749): the sea and wind card's twin, stacked above
 * it when both show (map.js restates the offset from the measured cards
 * beneath). A nine-step ramp with the depth each step starts at beneath
 * it, the estimated-seabed dot chip, the wash note and GEBCO's credit.
 * Chips ship colourless and take the themed seabed table at boot; the dot
 * chip's texture is a canvas tile map.js sets inline. Flat colour, no
 * shadow (ADR-0018). */
#map-legend-seabed {
  position: absolute;
  left: 10px;
  bottom: calc(var(--rewind-bar-h) + 108px);
  z-index: 3;
  display: block;
  margin: 0;
  padding: 11px 14px 12px;
  background: rgba(255, 255, 255, 0.97);
  border: 1px solid var(--hairline);
  border-radius: 2px;
}
#map-legend-seabed[hidden] { display: none; }
#map-legend-seabed .chainhome-legend__chip {
  width: 14px;
  height: 14px;
}
#map-legend-seabed .chainhome-legend__row {
  margin-top: 8px;
  font-size: 13px;
  gap: 9px;
}
/* 32 px steps: "1,000" in the 10 px mono is 29 px wide, so each figure
 * keeps a clear gap before the next. */
.chainhome-seabed-ramp {
  display: grid;
  grid-template-columns: repeat(9, 32px);
}
.chainhome-seabed-ramp__step { display: flex; flex-direction: column; min-width: 0; }
.chainhome-seabed-ramp__chip {
  height: 12px;
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
}
.chainhome-seabed-ramp__step:first-child .chainhome-seabed-ramp__chip {
  border-left: 1px solid var(--hairline);
}
.chainhome-seabed-ramp__step:last-child .chainhome-seabed-ramp__chip {
  border-right: 1px solid var(--hairline);
}
.chainhome-seabed-ramp__edge {
  margin-top: 3px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  white-space: nowrap;
  color: var(--muted);
}
.chainhome-seabed-note {
  max-width: 288px;
  margin: 6px 0 0;
  font-size: 11.5px;
  line-height: 1.35;
  color: var(--muted);
}
.chainhome-seabed-note[hidden] { display: none; }
html.chainhome-selection-open #map-legend-seabed { left: 370px; }
/* The #211 U6 hover chip, three lines since #278 — floated beside the
 * pointer over a hovered glyph; map.js creates it inside #map and
 * positions it per mousemove (left/top inline). pointer-events none: it
 * trails the cursor, so it must never steal the click or hover it
 * annotates. No transition, no shadow (zero-GPU doctrine, ADR-0018 §6).
 * No author display on the base, so [hidden] works; the explicit rule is
 * the notices' belt-and-braces against a later display slipping in.
 *
 * The box wraps (max-width) where it used to be nowrap: the curated class
 * on line two runs long — "Multi-role ocean surveillance ship (MROSS)" —
 * and a chip that runs off the frame says less than one that wraps. The
 * name and fix lines keep nowrap: neither has a break worth taking. */
.chainhome-map-hover {
  position: absolute;
  z-index: 3;
  padding: 4px 8px;
  max-width: 340px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--hairline);
  border-radius: 2px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  line-height: 1.4;
  color: var(--muted);
  pointer-events: none;
}
.chainhome-map-hover[hidden] { display: none; }
.chainhome-map-hover__name,
.chainhome-map-hover__type,
.chainhome-map-hover__fix,
.chainhome-map-hover__more { display: block; }
/* A CNI route's chip (#732) swaps the fix line for a count of the other
 * routes under the pointer, kept on one line like the fix it replaces. */
.chainhome-map-hover__more { white-space: nowrap; }
/* The advertised name is the chip's headline — ink over the muted body,
 * at the mono 500 the sheet vendors (fonts.css ships Mono 400 + 500). */
.chainhome-map-hover__name { color: var(--ink); font-weight: 500; white-space: nowrap; }
.chainhome-map-hover__fix { white-space: nowrap; }
/* The feed prefix is a label, not the name — it drops back to the body
 * weight and colour so the eye lands on what the contact calls itself. */
.chainhome-map-hover__feed { color: var(--muted); font-weight: 400; }
/* A declared absence, in the panel's established spelling: action blue,
 * italic, never underlined (underline is the link treatment and a
 * declaration must not read clickable — .chainhome-selection-row__value
 * --absent carries the same rule and the same reasoning). */
.chainhome-map-hover__absent {
  color: var(--action);
  font-weight: 400;
  font-style: italic;
}

/* --- Asset text pages -------------------------------------------------------- */
.chainhome-timeline__ts {
  white-space: nowrap;
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
}

/* Summary lists (asset identity): key/value rows at table
 * density, keys as 12px labels. */
.ch-summary-list {
  margin: 0 0 24px;
  border-top: 1px solid var(--hairline);
}
.ch-summary-list__row {
  display: flex;
  gap: 16px;
  margin: 0;
  padding: 7px 0;
  border-bottom: 1px solid var(--hairline-subtle);
}
.ch-summary-list__key {
  flex: 0 0 220px;
  margin: 0;
  padding-top: 1px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--muted);
}
.ch-summary-list__value { flex: 1; margin: 0; }

/* The provenance line: the WHY behind the tier — quiet but complete. */
.chainhome-provenance { color: var(--muted); }
/* The selection panel's conditions row (#556): the figure on its own
 * line, the run and offset beneath it in the muted tone. */
.chainhome-selection-row[data-field="conditions"] .chainhome-provenance {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  line-height: 1.35;
}
/* The asset page's kind pill (vessel / aircraft) beside the name. */
.chainhome-asset__kind { margin: 0 8px 0 4px; color: var(--muted); }
/* The listing reason after the kind (#625): the base tag's neutral tint and
 * ink at regular weight, so it stays below the 600-weight tier tag in
 * emphasis. A long subcategory wraps inside the chip on a narrow screen. */
.chainhome-asset__reason { font-weight: 400; max-width: 100%; }

.chainhome-assets__meta { display: block; font-size: 12px; font-weight: 400; color: var(--muted); }

/* --- Methodology page -------------------------------------------------------------------- */
.chainhome-contents {
  border-left: 3px solid var(--navy);
  padding: 4px 0 4px 15px;
  margin-bottom: 30px;
}
.chainhome-contents .ch-heading-s { margin-top: 0; }
.chainhome-doctrine .ch-body-l { margin-bottom: 0; font-weight: 600; }
/* Key column is a code identifier (no wrap); the value stays on one line;
 * provenance carries the dense reason at a quieter size. */
.chainhome-thresholds code { white-space: nowrap; }
.chainhome-thresholds td[data-threshold] { white-space: nowrap; }
.chainhome-thresholds .ch-table__cell:last-child {
  font-size: 13px;
  color: var(--muted);
}

/* --- Rewind transport (the player-control classes the rewind bar shares) ---------------- */
.chainhome-playback-controls__toggle {
  margin: 0;
  min-width: 90px;
  justify-content: center;
}
.chainhome-playback-controls__speed { min-width: 80px; }
.chainhome-playback-controls__clock {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 13px;
  min-width: 12.5em;
  text-align: right;
}
.chainhome-playback-scrub {
  position: relative;
  flex: 1 1 auto;
  min-width: 160px;
}
.chainhome-playback-scrub input[type="range"] { width: 100%; display: block; margin: 0; }
.chainhome-playback-markers {
  position: absolute;
  left: 0;
  right: 0;
  top: -7px;
  height: 8px;
  pointer-events: none;
}
/* --- Map rewind bar (#129) -------------------------------------------------------------------- */
/* The docked two-row height is ONE knob (#227): the selection panel, the
 * bottom-left attribution/scale row, the legend button and the zoom stack all
 * anchor off it, so moving the bar re-measures them together — the fragility
 * the issue warned about (five hand-measured anchors) collapses to this line. */
:root { --rewind-bar-h: 98px; } /* measured: 9px seek lift + 45px seek + 43px transport + 1px border (Firefox) */
/* The rewind bar is a media player (#227): the scrub timeline is the top row
 * edge-to-edge, transport + readout the row below. Docked flush and full-width
 * — no hover gap, no side insets. The timeline owning its own row is what kills
 * the scrub-entry reflow (the tag/chip live below it now, not beside it). */
.chainhome-rewind {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  background: rgba(255, 255, 255, 0.97);
  border-top: 1px solid var(--hairline);
}
/* Row 1 — the seek timeline. The shared .chainhome-playback-scrub is a
 * full-width block here (column child, stretched), so flex has no
 * remainder to fight over. */
.chainhome-rewind__scrub {
  flex: none;
  /* MARGIN, not padding: the rail overlays and the axis are absolute at
   * left:0/right:0 of this element's box, while the range input is a normal-flow
   * width:100% child — padding would inset the input but not the overlay,
   * sliding the thumb off the marks. Margin insets both together. The 9px top
   * clears the markers' top:-7px lift above the scrubber. */
  margin: 9px 14px 0;
}
/* Row 2 — transport + readout. A hair of --ground under a hairline divider
 * reads as player chrome with no shadow (the zero-GPU bans hold). */
.chainhome-rewind__transport {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px;
  background: var(--ground);
  border-top: 1px solid var(--hairline-subtle);
}
/* The readout rides the right edge; the clock is rightmost and holds its place
 * while the tag/loading appear to its left. */
.chainhome-rewind__readout {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}
.chainhome-rewind__live {
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.04em;
  padding: 4px 10px;
  border: 1px solid var(--muted);
  border-radius: 2px;
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
  white-space: nowrap;
}
.chainhome-rewind__live::before { content: "\25CF\00A0"; }
/* Lit = the map above is real time; the recording-red pill. rewind.js
 * swaps the modifier on scrub/goLive. */
.chainhome-rewind__live--on {
  border-color: var(--sev-critical);
  background: var(--sev-critical);
  color: #fff;
}
.chainhome-rewind__day {
  display: flex;
  align-items: center;
  gap: 2px;
}
.chainhome-rewind__step {
  border: 1px solid var(--hairline);
  border-radius: 2px;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  padding: 2px 8px;
  font-size: 14px;
  line-height: 1.2;
}
.chainhome-rewind__step[disabled] {
  color: var(--hairline);
  cursor: default;
}
.chainhome-rewind__date {
  border: 1px solid var(--hairline);
  border-radius: 2px;
  background: var(--surface);
  color: var(--ink);
  padding: 2px 4px;
  font-family: var(--font-mono);
  font-size: 12px;
}
.chainhome-rewind .chainhome-playback-controls__toggle { min-width: 72px; }
/* The readout's anchor (#227): the cursor stamp reads as a mission clock —
 * larger, ink, tabular. min-width holds it steady as LIVE ↔ the timestamp. */
.chainhome-rewind__clock {
  min-width: 12.5em;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
}
/* The not-yet future of today's bar: translucent hatch — non-data, the
 * silent texture's see-through cousin. */
.chainhome-rewind__future {
  position: absolute;
  top: 2px;
  height: 22px;
  right: 0;
  background: var(--hatch-veil);
  pointer-events: none;
}
/* .ch-tag's display (author origin) beats the UA [hidden] rule —
 * restate it, or a hidden tag in the readout could never hide. */
.chainhome-rewind__tag[hidden] { display: none; }
.chainhome-rewind__loading {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}
/* --- Shared time-of-day axis (#129): both scrubbers, one spelling ------------------------------ */
.chainhome-timeaxis {
  position: relative;
  height: 20px;
  pointer-events: none;
}
.chainhome-timeaxis__tick {
  position: absolute;
  top: 0;
  width: 1px;
  height: 4px;
  background: var(--sev-none);
}
.chainhome-timeaxis__tick--major {
  height: 7px;
  background: var(--muted);
}
.chainhome-timeaxis__label {
  position: absolute;
  top: 8px;
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1;
  color: var(--muted);
  white-space: nowrap;
}

/* --- The satellite card's two additions (#384). ---------------------------
 * A section heading inside the panel body, and the look rows beneath it.
 * Both follow the selection-row rhythm: the same hairline rule, the same
 * 96px first column, so the card reads as one table rather than two. */
.chainhome-selection-panel__sect {
  margin: 14px 0 2px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.chainhome-selection-look {
  display: flex;
  gap: 12px;
  padding: 6px 0;
  border-bottom: 1px solid var(--hairline-subtle);
  font-size: 14px;
}
.chainhome-selection-look__when {
  flex: 0 0 96px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
}
.chainhome-selection-look__what {
  flex: 1 1 auto;
  min-width: 0;
}

/* --- The dark palette (ADR-0033). -------------------------------------------
 * One token flip on the server-stamped html.ch-dark: the neutrals move to
 * the Blueprint dark ladder (the same source the light set was drawn from),
 * judgement text/tint pairs re-cut for the dark ground, and the hatch tiles
 * re-cut to the dark neutrals. Fills that already clear their text pairing
 * (elevated, high, critical) keep their hue; the tag rules below re-pin the
 * ink-paired text colours the flipped --ink would otherwise break. The map
 * glyph palette is NOT here (ADR-0010: one spelling, theme-new.js's), and
 * the band stays navy in both palettes. Every pair is computed; the
 * measured set lives with the ADR. No new compositing: the flip is a class
 * on <html>, and the zero-GPU bans hold unchanged. */
html.ch-dark {
  color-scheme: dark; /* native select/date/scrollbar chrome follows */
  --ground: #111418;
  --surface: #1C2127;
  --hairline: #404854;
  --hairline-subtle: #2F343C;
  --ink: #F6F7F9;
  --muted: #ABB3BF;
  --action: #4C90F0;
  --action-hover: #8ABBFF;

  --tier-blue: #35C4EC;      --tier-blue-tint: #0B2933;
  --tier-red: #FF6B6B;       --tier-red-tint: #391114;
  --tier-neutral: #ABB3BF;   --tier-neutral-tint: #252A31;

  --sev-none: #4A525C;
  --sev-watch: #2FA9CF;
  --sev-critical: #E0666A;   /* text/border use must clear the dark surface */

  --ok: #4CBB7F;             --ok-tint: #14291D;
  --review: #B49BDE;         --review-tint: #221A33;
  --capability: #3AB89E;     --capability-tint: #0F2B25;

  --notice-bg: #2B2612;

  --hatch: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8'%3E%3Crect width='8' height='8' fill='%23252A31'/%3E%3Cpath d='M-2 2 L2 -2 M0 8 L8 0 M6 10 L10 6' stroke='%23404854' stroke-width='2'/%3E%3C/svg%3E");
  --hatch-veil: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8'%3E%3Cpath d='M-2 2 L2 -2 M0 8 L8 0 M6 10 L10 6' stroke='%2358616D' stroke-opacity='0.5' stroke-width='2'/%3E%3C/svg%3E");
  --hatch-broad: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24'%3E%3Crect width='24' height='24' fill='%2315181D'/%3E%3Cpath d='M-6 6 L6 -6 M0 24 L24 0 M18 30 L30 18' stroke='%231E232A' stroke-width='12'/%3E%3C/svg%3E");
}
/* Warm fills keep DARK text whichever way --ink flips: elevated and high
 * carry ink text by computed pairing (9.6:1 / 4.7:1) and that pairing is
 * to the LIGHT ink. */
html.ch-dark .chainhome-state--degraded,
html.ch-dark .chainhome-blind-notice--degraded .chainhome-blind-notice__tag,
html.ch-dark .chainhome-state--gnss-marginal { color: #1C2127; }
/* --sev-critical lifts for TEXT/border use (4.8:1 on the dark surface), but
 * a lifted FILL would drop its white text to 3.3:1 — the critical tags keep
 * the shipped fill, whose white pairing is the computed 4.7:1. */
html.ch-dark .chainhome-state--blind,
html.ch-dark .chainhome-state--gnss-degraded { background: #CD4246; }
/* Same split for --action: it lifts for link/text use, but as a button fill
 * the lift would drop white text to 3.2:1 — primary buttons keep the shipped
 * pair (6.45:1 / 8.0:1 under white). */
html.ch-dark .ch-button:not(.ch-button--secondary):not([disabled]) {
  background: #215DB0;
  border-color: #215DB0;
}
html.ch-dark .ch-button:not(.ch-button--secondary):not([disabled]):hover {
  background: #184A90;
  border-color: #184A90;
}
/* The white-.97 corner cards and their hovers, re-cut to the dark surface. */
html.ch-dark .chainhome-layers-button,
html.ch-dark .chainhome-layers,
html.ch-dark .chainhome-search-button,
html.ch-dark .chainhome-search { background: rgba(28, 33, 39, 0.97); }
html.ch-dark .chainhome-layers-button:hover,
html.ch-dark .chainhome-layers__row:hover,
html.ch-dark .chainhome-search-button:hover { background: #252A31; }
/* The band's palette control (ADR-0033): the mock's segmented pair. */
.nu-palette {
  display: flex;
  margin-left: 16px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 2px;
  overflow: hidden;
  flex: none;
}
.nu-palette__opt {
  border: 0;
  margin: 0;
  padding: 4px 11px;
  font: 400 12px/1.2 var(--font-sans);
  background: transparent;
  color: rgba(255, 255, 255, 0.82);
  cursor: pointer;
}
.nu-palette__opt[aria-pressed="true"] {
  background: #fff;
  color: var(--navy);
  font-weight: 600;
}
.nu-palette__opt:focus-visible { outline: 2px solid #fff; outline-offset: -2px; }
/* Dark cuts for the furniture whose grounds are literal rather than
 * tokenised: the rewind bar, the map key cards, and MapLibre's shipped
 * attribution/scale chrome (vendored defaults are white-on-white). */
html.ch-dark .chainhome-rewind,
html.ch-dark #map-legend,
html.ch-dark #map-legend-class,
html.ch-dark #map-legend-conditions,
html.ch-dark #map-legend-seabed,
html.ch-dark .chainhome-legend-button { background: rgba(28, 33, 39, 0.97); }
/* The pointer chips (the contact and route chip, and the depth chip,
 * #749) wrote the flipped light --ink on a white ground; the dark surface
 * restores the pairing. */
html.ch-dark .chainhome-map-hover { background: rgba(28, 33, 39, 0.96); }
/* Links in the credit line carry an underline, since colour alone does not
 * set them apart from the text around them. */
.chainhome-map .maplibregl-ctrl-attrib a { text-decoration: underline; }
html.ch-dark .chainhome-map .maplibregl-ctrl-attrib {
  background: rgba(28, 33, 39, 0.8);
}
html.ch-dark .chainhome-map .maplibregl-ctrl-attrib,
html.ch-dark .chainhome-map .maplibregl-ctrl-attrib a { color: var(--muted); }
html.ch-dark .chainhome-map .maplibregl-ctrl-scale {
  background: rgba(28, 33, 39, 0.8);
  color: var(--muted);
  border-color: var(--muted);
}
