/* Haven Daily: one stylesheet, no build step.

   Harbour Light (#102, the owner's pick, 20 Nov 2026): calm and maritime, like a pilot's chart
   in daylight. Fog-white page, deep navy ink, white cards with soft corners, a pale-blue sea with
   fine lines that follow the coast, sand-coloured land drawn flat, deep teal ships. map.js reads
   the chart colours from the same tokens.

   Colour carries meaning only: severity (red / amber / slate), status (green / amber / red),
   ships, the plum label of an interpretation, and one harbour blue for what you can press or
   have selected. Nothing is coloured for decoration.

   Layout: on wide screens the chart fills the first screen and today's items sit in a panel over
   its western side (open sea); selecting one flies the chart there. On phones the panel comes
   first and the chart follows. On a day with nothing on the chart it is only a short strip. The
   full brief and the port status follow below, as cards.
   Type: Manrope for text, headlines and labels; IBM Plex Mono for data only (times, readings,
   AIS text); IBM Plex Serif only for the planner impact (with a plum label) and water names on
   the chart, so interpretation never looks like fact. */

/* Fonts, self-hosted (#27): the files sit in static/fonts/, so a page never asks Google (or
   anyone else) for a font and no visitor's IP address leaves the site. Latin and Latin Extended
   only: the browser fetches a file only when a page uses a letter in its unicode-range.
   - Manrope: one variable file for every weight, 400-800 (Fontsource @fontsource-variable/manrope
     5.3.0, from Google Fonts; licence static/fonts/OFL-Manrope.txt).
   - IBM Plex Mono 400, Plex Serif 400 and Serif italic 400: the files Google Fonts served on
     2 Nov 2026 (licence static/fonts/OFL.txt).
   Four Latin files, about 80 KB, where IBM Plex needed eleven (230 KB): the fonts no longer hold
   up the chart on a slow phone (#102, docs/site-speed.md). */

@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("fonts/manrope-variable-latin.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: "Manrope";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("fonts/manrope-variable-latin-ext.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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/ibm-plex-mono-400-latin.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: "IBM Plex Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/ibm-plex-mono-400-latin-ext.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: "IBM Plex Serif";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/ibm-plex-serif-400-latin.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: "IBM Plex Serif";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/ibm-plex-serif-400-latin-ext.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: "IBM Plex Serif";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/ibm-plex-serif-italic-400-latin.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: "IBM Plex Serif";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/ibm-plex-serif-italic-400-latin-ext.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;
}

:root {
  --bg: #f3f5f4;            /* page: fog white */
  --surface: #ffffff;       /* cards, panel, header, popups */
  --surface-2: #e4eef1;     /* hovered rows, the sample-data note */
  --ink: #0f2231;           /* deep navy */
  --ink-2: #4b5e6d;
  --rule: #d6dee2;          /* hairlines between things */
  --edge: #728390;          /* the outline of a control: 3:1 on every background it sits on */
  --shadow: rgba(15, 34, 49, 0.14);
  --overprint: #8a3a6c;     /* interpretation: the "Impact for planners" label */
  --overprint-wash: #f8f2f6; /* under the impact text */
  --gauge-water: rgba(46, 120, 170, 0.3);
  --gauge-line: #2e78aa;

  /* Chart (read by map.js) */
  --water: #dbe7ed;
  --water-line: #6f97ad;    /* the lines that follow the coast */
  --land: #efebe3;
  --land-shadow: rgba(15, 34, 49, 0.16);
  --coast: #8fa6b3;
  --road: #d9d2c5;
  --rail: #cbc2b2;
  --tank: #c2b8a6;
  --water-label: #35627d;
  --land-label: #23384a;
  --label-halo: rgba(255, 255, 255, 0.92);
  --ship: #0f8a7c;          /* deep teal */

  /* Controls: one button set (.btn). The accent marks what is pressed or selected, nothing else. */
  --accent: #0f6e8c;        /* harbour blue */
  --on-accent: #ffffff;
  --btn-h: 2.25rem;         /* 36 px; 44 px on touch screens, below */
  --btn-radius: 8px;
  --radius: 14px;           /* cards */

  /* Severity: fills for the numbered squares, inks for text */
  --high: #c8321e;
  --on-high: #ffffff;
  --high-ink: #ad2a17;
  --medium: #eaa419;
  --on-medium: #231800;
  --medium-ink: #875800;
  --low: #5d7186;
  --on-low: #ffffff;
  --low-ink: #475a6d;
  --ok-ink: #1b7a4c;
  --nodata-ink: #5f6b77;

  /* Logo: signal flags H and D */
  --flag-white: #ffffff;
  --flag-red: #d7262e;
  --flag-yellow: #f5c400;
  --flag-blue: #1c4fa0;
  --flag-edge: #0f2231;

  /* Manrope for text, headlines and labels; Mono for data; Serif for interpretation. */
  --font-sans: "Manrope", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, Consolas, monospace;
  --font-serif: "IBM Plex Serif", Georgia, "Times New Roman", serif;

  --gutter: 16px;
  --page-width: 96rem;
  --measure: 62ch;
  --panel-width: 25rem;
  --topbar-h: 3.5rem;       /* the header bar; things scrolled to stay clear of it */
  color-scheme: light;
}

@media (pointer: coarse) {
  :root { --btn-h: 2.75rem; }
}

@media (min-width: 40rem) {
  :root { --gutter: 28px; }
}

/* ---------- Base ---------- */

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  overflow-wrap: break-word;
}

h1, h2, h3, p, dl, dd {
  margin: 0;
}

h1, h2, h3 {
  line-height: 1.15;
  text-wrap: balance;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a:hover {
  text-decoration-thickness: 2px;
}

button {
  font: inherit;
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.icon {
  width: 1em;
  height: 1em;
  flex: none;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Shown only when the script that powers them has run */
html:not(.js) .needs-js,
html:not(.has-map) .needs-map,
.has-map .no-map {
  display: none;
}

.wrap {
  width: 100%;
  max-width: calc(var(--page-width) + 2 * var(--gutter));
  margin-inline: auto;
  padding-left: max(var(--gutter), env(safe-area-inset-left, 0px));
  padding-right: max(var(--gutter), env(safe-area-inset-right, 0px));
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 2000;
  padding: 0.5rem 0.75rem;
  background: var(--ink);
  color: var(--bg);
}

.skip-link:focus {
  top: 1rem;
}

/* Grey, upright: Manrope has no italic, and a slanted copy of it looks like a mistake. */
.is-empty {
  color: var(--ink-2);
}

.ais-text {
  font-family: var(--font-mono);
  font-size: 0.85em;
}

.link-button {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0;
  border: 0;
  background: none;
  font-weight: 700;
  text-align: left;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  cursor: pointer;
}

.link-button:hover {
  text-decoration-thickness: 2px;
}

/* ---------- Buttons: one set ----------
   Every button and button-like link has the same height, corners, border and type: white with a
   navy label and a grey-blue edge. Pressed or selected, it turns harbour blue. Leaflet makes the
   zoom buttons itself, so they are named here too. Each button's own rules set only its layout. */
.btn,
.leaflet-container .leaflet-bar a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: var(--btn-h);
  height: auto;
  margin: 0;
  padding: 0 0.85rem;
  border: 1px solid var(--edge);
  border-radius: var(--btn-radius);
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}

.btn:hover,
.leaflet-container .leaflet-bar a:hover {
  background: var(--surface-2);
  color: var(--ink);
  text-decoration: none;
}

.btn[aria-pressed="true"] {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
}

/* Over the chart, buttons float a little */
.chart .btn,
.leaflet-container .leaflet-bar a {
  box-shadow: 0 2px 8px var(--shadow);
}

/* Numbered squares: an item in the list and on the chart */
.num {
  display: inline-grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  flex: none;
  border-radius: 7px;
  font-size: 1.25rem;
  font-weight: 800;
  font-family: var(--font-sans);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.num-high { background: var(--high); color: var(--on-high); }
.num-medium { background: var(--medium); color: var(--on-medium); }
.num-low { background: var(--low); color: var(--on-low); }
/* Unrated (the AI failed for the item): outlined, no fill, in the "No data" grey of the
   status line. Empty vs filled is the shape cue, so it never relies on colour alone.
   An inset outline keeps the square the same size as the filled ones. */
.num-unrated {
  background: transparent;
  color: var(--nodata-ink);
  outline: 2px solid var(--nodata-ink);
  outline-offset: -2px;
}

.sev {
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sev-high { color: var(--high-ink); }
.sev-medium { color: var(--medium-ink); }
.sev-low { color: var(--low-ink); }
.sev-unrated { color: var(--nodata-ink); }

.lvl {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 700;
}

.lvl-ok { color: var(--ok-ink); }
.lvl-watch { color: var(--medium-ink); }
.lvl-alert { color: var(--high-ink); }
.lvl-nodata { color: var(--nodata-ink); }

/* What the level means for a planner, after "Alert:" in plain ink (design review S6, #83) */
.lvl-meaning {
  color: var(--ink);
}

/* ---------- Top bar ----------
   One white bar: the brand and the navigation. With JavaScript it stays at the top of the window
   but slides away while you scroll down, and comes back when you scroll up, move the cursor to the
   top of the screen or tab into it (site.js, #102). Without JavaScript it scrolls away with the
   page. The one-liner and the sample-data note sit right under it and scroll with the page. */

.topbar {
  position: relative;
  z-index: 1100;
  background: var(--surface);
  border-bottom: 1px solid var(--rule);
}

html.js .topbar {
  position: sticky;
  top: 0;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.topbar.is-stuck {
  box-shadow: 0 6px 20px rgba(15, 34, 49, 0.08);
}

.topbar.is-hidden {
  transform: translateY(-100%);
  box-shadow: none;
}

/* Keyboard focus inside the bar always shows it (also before site.js reacts). */
.topbar:focus-within {
  transform: none;
}

.topbar-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 1rem;
  min-height: 3.5rem;
  max-width: calc(var(--page-width) + 2 * var(--gutter));
  margin-inline: auto;
  padding: 0 max(var(--gutter), env(safe-area-inset-right, 0px)) 0 max(var(--gutter), env(safe-area-inset-left, 0px));
}

.brand {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 44px;
  text-decoration: none;
}

/* The logo (#117): flags H over D on a halyard, 3 px apart. Each flag about 18 CSS px on a laptop,
   16 on a phone. */
.hoist {
  width: auto;
  height: 2.75rem;
  flex: none;
  overflow: visible;
}

.halyard,
.clip line,
.clip circle {
  fill: none;
  stroke: var(--ink);
  stroke-width: 1;
  stroke-linecap: round;
}

/* The flags' letters beside them, on every screen (owner's pick, PR #120): each centred on its flag.
   The hoist is 58 units high; H's centre is at 15 of them, D's at 43. */
.hoist-letters {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 2.75rem;
  padding-block: 0.37rem;
  margin-left: -0.3rem;
  color: var(--ink-2);
  font-size: 0.6875rem;
  font-weight: 800;
  line-height: 1;
}

/* What the flags say, on hover and keyboard focus (#117) */
.brand-hint {
  position: absolute;
  top: calc(100% + 0.25rem);
  left: 0;
  z-index: 1;
  padding: 0.3rem 0.55rem;
  border-radius: 6px;
  background: var(--ink);
  color: var(--surface);
  font-size: 0.8125rem;
  font-weight: 600;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.15s ease, visibility 0.15s;
}

.brand:hover .brand-hint,
.brand:focus-visible .brand-hint {
  opacity: 1;
  visibility: visible;
}

@media (prefers-reduced-motion: reduce) {
  .brand-hint { transition: none; }
}

/* One flag on its own: the 404 page and the flag key on How it works (#117) */
.signal-flag {
  display: block;
  flex: none;
}

.page-not-found .not-found {
  display: flex;
  align-items: flex-start;
  gap: 2rem;
  max-width: 46rem;
  padding-block: 2.5rem 4rem;
}

.not-found .signal-flag {
  width: 7rem;
  height: 7rem;
}

.not-found-text h1 {
  margin: 0.25rem 0 0.75rem;
}

.not-found-text p + p {
  margin-top: 0.75rem;
}

.not-found-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.5rem;
  margin-top: 1.5rem;
}

@media (max-width: 40rem) {
  .page-not-found .not-found {
    flex-direction: column;
    gap: 1.25rem;
    padding-block: 1.5rem 3rem;
  }

  .not-found .signal-flag {
    width: 5rem;
    height: 5rem;
  }
}

/* The flag key on How it works */
.signal-key {
  display: grid;
  gap: 1.25rem;
  margin: 1.25rem 0 0;
  padding: 0;
  list-style: none;
}

.signal-key li {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.signal-key .signal-flag {
  width: 3rem;
  height: 3rem;
}

.signal-name {
  font-weight: 800;
}

.signal-letter {
  display: inline-block;
  min-width: 1.4em;
}

.signal-used {
  color: var(--ink-2);
  font-size: 0.875rem;
}

.flag-white { fill: var(--flag-white); }
.flag-red { fill: var(--flag-red); }
.flag-yellow { fill: var(--flag-yellow); }
.flag-blue { fill: var(--flag-blue); }
.flag-edge { fill: none; stroke: var(--flag-edge); stroke-width: 1; vector-effect: non-scaling-stroke; } /* 1 px at any size */

/* The name in words, not a code in spaced capitals */
.brand-name {
  font-size: 1.125rem;
  font-weight: 800;
  letter-spacing: -0.015em;
  white-space: nowrap;
}

.topbar-note {
  color: var(--ink-2);
  font-size: 0.8125rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.topbar-tools {
  display: flex;
  align-items: center;
  margin-left: auto;
}

.site-nav ul {
  display: flex;
  gap: 0.1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding-inline: 0.6rem;
  color: var(--ink-2);
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.site-nav a:hover {
  color: var(--ink);
}

.site-nav a[aria-current="page"] {
  color: var(--ink);
  box-shadow: inset 0 -3px 0 var(--accent);
}

/* Phones: brand and nav share one row while they fit; the date is in the panel just below. */
@media (max-width: 47.99rem) {
  .topbar-note {
    display: none;
  }
}

@media (max-width: 30rem) {
  .topbar-inner {
    gap: 0 0.5rem;
  }

  .brand {
    gap: 0.45rem;
  }

  .hoist {
    height: 2.5rem;
  }

  .hoist-letters {
    height: 2.5rem;
    padding-block: 0.3rem;
  }

  .brand-name {
    font-size: 1rem;
  }

  .site-nav a {
    padding-inline: 0.4rem;
    font-size: 0.8125rem;
  }

  .topbar-tools {
    margin-right: -0.4rem;
  }
}

/* The sample-data note (hard rule 10), right under the bar. (The one-liner left the page, #138.) */
.masthead {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem 1.5rem;
  max-width: calc(var(--page-width) + 2 * var(--gutter));
  margin-inline: auto;
  padding: 0.55rem max(var(--gutter), env(safe-area-inset-right, 0px)) 0.6rem max(var(--gutter), env(safe-area-inset-left, 0px));
}

.sample-note {
  padding: 0.2rem 0.65rem;
  background: var(--surface-2);
  border-radius: 999px;
  color: var(--ink);
  font-size: 0.8125rem;
  line-height: 1.4;
}

@media (max-width: 40rem) {
  .sample-note {
    border-radius: 10px;
  }
}

/* ---------- Stage: the chart, with today's items in a panel over it ---------- */

.stage {
  position: relative;
}

.chart {
  /* map.js scrolls up to the chart when an item below is selected; the header comes back then */
  scroll-margin-top: var(--topbar-h);
}

.chart-frame {
  position: relative;
}

.chart-map {
  height: 62vh;
  min-height: 340px;
  max-height: 560px;
  background: var(--water);
}

/* A faint shade at the edges, so the chart reads as a sheet. Above the map, below its panels and buttons. */
.chart-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 401;
  box-shadow: inset 0 0 80px 0 rgba(15, 34, 49, 0.1);
  pointer-events: none;
}

/* Wide screens: the chart fills the first screen and the panel floats over the open sea.
   Full width (owner's option E, 24 Nov 2026, #134: a chart at most 80rem wide hid more pin pairs
   at the opening view). Main's height: #138 tried the window minus the top bar (843 px at 1440 x 900),
   but a taller chart can't zoom out as far (the map sheet's north-south extent is fixed), so more
   pin pairs were hidden; the owner chose this size again (option A, review of PR #139). With the
   one-liner gone it ends 31 px above the window's edge, so all of it shows when the page opens. */
@media (min-width: 64rem) {
  .stage {
    height: clamp(36rem, calc(100vh - 5.5rem), 62rem);
  }

  .chart,
  .chart-frame {
    position: absolute;
    inset: 0;
  }

  .chart-map {
    height: 100%;
    max-height: none;
  }

  .panel {
    position: absolute;
    top: 1rem;
    bottom: 1rem;
    left: max(1rem, env(safe-area-inset-left, 0px));
    z-index: 460;
    display: flex;
    flex-direction: column;
    width: var(--panel-width);
    /* Nearly opaque instead of a blurred glass panel: a blur behind the panel would
       have to be recomputed on every frame while the chart moves. */
    overflow: hidden;
    background: rgba(255, 255, 255, 0.97);
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    box-shadow: 0 18px 50px rgba(15, 34, 49, 0.18);
  }
}

.panel-head {
  display: grid;
  gap: 0.45rem;
  padding: 1.5rem max(var(--gutter), env(safe-area-inset-left, 0px)) 1.1rem;
  border-bottom: 1px solid var(--rule);
}

.panel-head h1 {
  color: var(--ink-2);
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.3;
}

.panel-head h1 span {
  display: block;
  margin-bottom: 0.2rem;
  color: var(--ink);
  font-size: clamp(2.3rem, 1.9rem + 1.2vw, 2.9rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.035em;
}

/* When the list is longer than the panel, a soft shade at the edge that has more shows that it
   scrolls (critique 7: item 4 was cut mid-line with no hint). The white covers scroll with the
   list ("local"), the shades stay put, so a shade shows only where there is more to see. */
.panel-items {
  flex: 1;
  min-height: 0;
  margin: 0;
  padding: 0.35rem 0;
  overflow-y: auto;
  list-style: none;
  scrollbar-width: thin;
  scrollbar-color: var(--rule) transparent;
}

@media (min-width: 64rem) {
  .panel-items {
    background:
      linear-gradient(var(--surface) 30%, rgba(255, 255, 255, 0)) top / 100% 2.5rem no-repeat local,
      linear-gradient(rgba(255, 255, 255, 0), var(--surface) 70%) bottom / 100% 2.5rem no-repeat local,
      linear-gradient(rgba(15, 34, 49, 0.12), rgba(15, 34, 49, 0)) top / 100% 0.9rem no-repeat scroll,
      linear-gradient(rgba(15, 34, 49, 0), rgba(15, 34, 49, 0.16)) bottom / 100% 1.4rem no-repeat scroll;
  }
}

.panel-item {
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
  padding: 0.75rem 1.25rem 0.8rem calc(1.25rem - 3px);
  border-left: 3px solid transparent;
  text-decoration: none;
  transition: background-color 0.2s;
}

.panel-item:hover {
  background: var(--bg);
}

.panel-item.is-active {
  background: var(--surface-2);
  border-left-color: var(--accent);
}

.panel-item .num {
  width: 1.8rem;
  height: 1.8rem;
  border-radius: 6px;
  font-size: 1.05rem;
}

.panel-text {
  display: grid;
  gap: 0.2rem;
  min-width: 0;
}

.panel-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.1rem 0.6rem;
  color: var(--ink-2);
  font-size: 0.75rem;
}

/* Panel text a step bigger (S11, #82): 13 px, where the 5-second reading happens. */
.panel-meta .sev {
  font-size: 0.8125rem;
}

.panel .kicker {
  font-size: 0.8125rem;
}

.panel-title {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.3;
}

.panel-summary {
  display: none;
  margin-top: 0.25rem;
  color: var(--ink-2);
  font-size: 0.875rem;
  line-height: 1.45;
}

.panel-item.is-active .panel-summary {
  display: block;
}

/* An English headline the AI wrote for a Dutch item (#134): said right under it, always. */
.panel-translated {
  display: block;
  margin-top: 0.125rem;
  color: var(--ink-2);
  font-size: 0.8125rem;
  line-height: 1.4;
}

.panel-quiet {
  flex: 1;
  padding: 1.25rem;
  color: var(--ink-2);
  font-size: 1.25rem;
  font-weight: 700;
}

/* Port status in brief, like the weather corner of a map */
.panel-status {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--rule);
}

.panel-status li {
  display: grid;
  align-content: start;
  gap: 0.15rem;
  min-width: 0;
  padding: 0.65rem 1rem 0.7rem max(var(--gutter), env(safe-area-inset-left, 0px));
  border-bottom: 1px solid var(--rule);
}

.panel-status li:nth-child(even) {
  padding-left: 1rem;
  border-left: 1px solid var(--rule);
}

/* Three cells in v1 (no Ships cell until v2, #138): the last one takes the whole row */
.panel-status li:last-child:nth-child(odd) {
  grid-column: 1 / -1;
}

.mini-label {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--ink-2);
  font-size: 0.8125rem;
}

.mini-value {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 1.0625rem;
  font-weight: 800;
  line-height: 1.2;
}

/* Second small line of a mini status cell: what the level means (design review S6, #83) */
.mini-meaning {
  color: var(--ink-2);
  font-size: 0.8125rem;
  line-height: 1.3;
}

.panel-more {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 44px;
  padding: 0 1.25rem;
  font-size: 0.875rem;
  font-weight: 700;
  text-decoration: none;
}

.panel-more:hover {
  background: var(--bg);
}

@media (min-width: 64rem) {
  .panel-head,
  .panel-status li:nth-child(odd) {
    padding-left: 1.25rem;
  }

  /* The bottom row: the last cell, and the one before it when both share the row */
  .panel-status li:last-child,
  .panel-status li:nth-last-child(2):nth-child(odd) {
    border-bottom: 0;
  }

  .panel-more {
    border-top: 1px solid var(--rule);
  }
}

/* Phones and tablets: the brief comes first (#81). The panel, with its item list, sits above
   the chart in the page flow; the chart follows as the index of the list just read. */
@media (max-width: 63.99rem) {
  .panel {
    background: var(--surface);
    border-block: 1px solid var(--rule);
  }

  .panel-item {
    padding-right: var(--gutter);
    padding-left: calc(var(--gutter) - 3px);
  }

  /* The ship filter fits one row on a phone: the same buttons, a little narrower */
  .chart-filter {
    gap: 4px;
  }

  .chart-filter .btn {
    padding-inline: 0.55rem;
  }
}

/* ---------- A day with nothing on the chart, on a phone: a short strip (#81) ----------
   No item of the day has a place and there are no ships, so a phone shows about a third of the
   screen of map, enough for the zoom buttons. Wide screens have no layout of their own for such a
   day since #138: the same full-width map with the panel floating over it as on any day (owner,
   before merging PR #139). */
@media (max-width: 63.99rem) {
  .stage-empty .chart-map {
    height: 30vh;
    min-height: 15rem;
    max-height: 20rem;
  }

  .stage-empty .chart-frame::after {
    box-shadow: inset 0 0 40px 0 rgba(15, 34, 49, 0.08);
  }
}

/* ---------- The brief and port status, below the stage ---------- */

.brief-layout {
  display: grid;
  gap: 2.5rem;
  padding-top: 2.5rem;
}

/* The port status column is wider than before (24rem), so two dials fit side by side without
   12 px text (critique 6). It stays put while the brief scrolls, below the header when it shows. */
@media (min-width: 64rem) {
  .brief-layout {
    grid-template-columns: minmax(0, 1fr) 28rem;
    column-gap: 3.5rem;
    padding-top: 3.5rem;
  }

  .brief-layout .status {
    position: sticky;
    top: calc(var(--topbar-h) + 1rem);
    align-self: start;
  }
}

.brief-col {
  min-width: 0;
}

.section-title {
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--rule);
  letter-spacing: -0.03em;
  font-size: clamp(1.75rem, 1.5rem + 1vw, 2.25rem);
  font-weight: 800;
}

.brief-intro {
  margin-top: 0.8rem;
  color: var(--ink-2);
}

/* Ship filter: a row of ordinary buttons; the one pressed shows which ships are on the chart. */
.chart-filter {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 450;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-width: calc(100% - 20px);
}

.chart-filter button span {
  color: var(--ink-2);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.chart-filter button[aria-pressed="true"] span {
  color: inherit;
}

.chart-focus {
  position: absolute;
  top: calc(var(--btn-h) + 20px);
  left: 10px;
  z-index: 450;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  max-width: calc(100% - 20px);
  padding: 0.4rem 0.4rem 0.4rem 0.6rem;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--btn-radius);
  box-shadow: 0 4px 14px var(--shadow);
}

.chart-focus .btn {
  box-shadow: none;
}

.chart-focus[hidden] {
  display: none;
}

.chart-focus-text {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.875rem;
  line-height: 1.3;
}

.chart-focus-text .num {
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 5px;
  font-size: 0.95rem;
}

@media (min-width: 40rem) {
  .chart-focus {
    top: 10px;
    left: auto;
    right: 10px;
    max-width: 60%;
  }
}

/* Wide screens: filter and legend sit just right of the panel, the focus box top right */
@media (min-width: 64rem) {
  .chart-filter {
    top: 1rem;
    left: calc(var(--panel-width) + 2rem);
  }

  .chart-focus {
    top: 1rem;
    right: 1rem;
    max-width: calc(100% - var(--panel-width) - 30rem);
  }
}

/* v2 only: the day's AIS snapshot failed (hard rule 9). Pinned to the chart's top-left corner,
   where the ship filter would be, so it never covers the port (#81). In v1 nothing is said
   about ships (#138). */
.chart-note {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 450;
  max-width: min(22rem, calc(100% - 20px));
  padding: 0.45rem 0.7rem;
  background: var(--surface);
  border: 1px solid var(--medium-ink);
  border-radius: var(--btn-radius);
  box-shadow: 0 4px 14px var(--shadow);
  font-size: 0.8125rem;
  font-weight: 600;
}

/* While the chart is on its way (map-loader.js hides it once the chart is drawn). Quiet: grey
   letters on the water, in the middle of the part of the chart that the panel doesn't cover. */
.chart-loading {
  position: absolute;
  inset: 0;
  z-index: 402;
  display: grid;
  place-items: center;
  margin: 0;
  color: var(--ink-2);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  pointer-events: none;
}

.chart-loading[hidden] {
  display: none;
}

/* "Use Ctrl + scroll to zoom the chart": shown for a moment when the wheel scrolls the page over
   the chart (map.js, #111). Over the chart, above the canvas and below the panel and buttons;
   never in the way of a click. On wide screens centred right of the panel, like the note above. */
.chart-hint {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 455;
  margin: 0;
  padding: 0.55rem 0.95rem;
  background: var(--ink);
  color: var(--surface);
  border-radius: var(--btn-radius);
  box-shadow: 0 6px 20px rgba(15, 34, 49, 0.18);
  font-size: 0.875rem;
  font-weight: 700;
  white-space: nowrap;
  transform: translate(-50%, -50%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.chart-hint.is-shown {
  opacity: 1;
}

@media (min-width: 64rem) {
  .chart-hint {
    left: calc(50% + var(--panel-width) / 2);
  }
}

@media (min-width: 64rem) {
  .chart-loading {
    padding-left: var(--panel-width);
  }

  .chart-note {
    top: 1rem;
    left: calc(var(--panel-width) + 2rem);
  }
}

.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 1.1rem;
  padding: 0.65rem max(var(--gutter), env(safe-area-inset-right, 0px)) 0.75rem max(var(--gutter), env(safe-area-inset-left, 0px));
  color: var(--ink-2);
  font-size: 0.8125rem;
}

@media (min-width: 64rem) {
  .chart-legend {
    position: absolute;
    bottom: 1rem;
    left: calc(var(--panel-width) + 2rem);
    z-index: 450;
    max-width: calc(100% - var(--panel-width) - 9rem);
    padding: 0.45rem 0.8rem;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid var(--rule);
    border-radius: var(--btn-radius);
  }
}

.chart-legend > span {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

/* How to move and zoom the chart (#111): the mouse and touchpad line, or the touch screen one. */
.how-touch {
  display: none;
}

@media (pointer: coarse) {
  .how-fine {
    display: none;
  }

  .how-touch {
    display: inline;
  }
}

/* Plain grey notes in the legend: why the chart is empty */
.chart-legend > .legend-note {
  color: var(--ink-2);
}

.ship-symbol {
  width: 1.6rem;
  height: 0.5rem;
  overflow: visible;
}

.legend-num {
  display: inline-grid;
  place-items: center;
  width: 1.1rem;
  height: 1.1rem;
  border-radius: 4px;
  background: var(--ink);
  color: var(--surface);
  font-size: 0.75rem;
  font-weight: 800;
}

/* ---------- Leaflet, restyled for the chart ---------- */

/* The water and its lines: a picture under the basemap's canvas (map.js, #111). Never in the way. */
.chart-water {
  pointer-events: none;
}

.leaflet-container {
  background: var(--water);
  font-family: var(--font-sans);
  font-size: 0.8125rem;
}

/* Zoom: two square buttons from the shared set (.btn, above); above them "Whole port", another
   button of the same set. It used to be the only filled orange button, beside amber squares that
   mean Medium, so it read like a severity (critique 10). */
.leaflet-container .leaflet-bar {
  display: grid;
  gap: 6px;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.leaflet-container .leaflet-bar a {
  width: var(--btn-h);
  padding: 0;
}

/* The + and - are Leaflet's own text: drawn larger, like the icon in the button above them. */
.leaflet-container .leaflet-bar a.leaflet-control-zoom-in,
.leaflet-container .leaflet-bar a.leaflet-control-zoom-out {
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1;
}

.leaflet-container .leaflet-bar a.leaflet-disabled {
  background: var(--bg);
  color: var(--nodata-ink);
  cursor: default;
}

.chart-home {
  width: var(--btn-h);
  padding: 0;
}

/* "Whole port" in words on wide screens only (S10, #82); phones keep the icon square. */
.chart-home-label {
  display: none;
}

@media (min-width: 64rem) {
  .chart-home {
    width: auto;
    padding: 0 0.8rem 0 0.65rem;
  }

  .chart-home-label {
    display: inline;
  }
}

.leaflet-container .leaflet-control-scale-line {
  background: transparent;
  border-color: var(--ink-2);
  color: var(--ink-2);
  font-size: 0.6875rem;
}

.leaflet-container .leaflet-control-attribution {
  background: rgba(255, 255, 255, 0.85);
  color: var(--ink-2);
  font-size: 0.6875rem;
}

.leaflet-container .leaflet-control-attribution a {
  color: var(--ink);
}

/* ---------- Full screen and the expanded chart (#134) ----------
   The button sits above "Whole port". Where the browser can't show the chart full screen
   (iPhone Safari) the frame is fixed over the whole window instead, and the page behind it
   doesn't scroll. A close button shows in both, top right; the ship filter moves to the left
   edge (no panel in the way) and the focus box makes room for the close button. */
.chart-fullscreen {
  width: var(--btn-h);
  padding: 0;
}

.chart-close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 470;
  display: none;
  width: var(--btn-h);
  padding: 0;
  box-shadow: 0 4px 14px var(--shadow);
}

.chart-frame.is-full .chart-close {
  display: inline-flex;
}

.chart-frame.is-expanded {
  position: fixed;
  inset: 0;
  z-index: 2100;
  background: var(--water);
}

html.chart-expanded {
  overflow: hidden;
}

.chart-frame:fullscreen {
  width: 100%;
  height: 100%;
  background: var(--water);
}

.chart-frame.is-full .chart-map {
  height: 100%;
  min-height: 0;
  max-height: none;
}

.chart-frame.is-full .chart-filter {
  left: 10px;
}

.chart-frame.is-full .chart-focus {
  right: calc(var(--btn-h) + 20px);
}

/* ---------- The pin card (#134): a clicked number's item, next to it on the chart ---------- */
.chart-card .leaflet-popup-content {
  margin: 0.8rem 0.9rem 0.9rem;
}

.chart-card-body:focus:not(:focus-visible) {
  outline: none;
}

.chart-card-top {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.chart-card-top .num {
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 5px;
  font-size: 0.95rem;
}

.chart-card-close {
  width: var(--btn-h);
  margin-left: auto;
  padding: 0;
}

.chart-card-title {
  margin-top: 0.5rem;
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.25;
}

.chart-card-original {
  margin-top: 0.25rem;
  color: var(--ink-2);
  font-size: 0.8125rem;
  line-height: 1.4;
}

.chart-card-summary {
  margin-top: 0.45rem;
}

.chart-card-summary.is-empty {
  color: var(--ink-2);
}

.chart-card-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 0.75rem;
}

/* On a phone the chart is short: the card shows the first three lines of the summary
   ("Full item" has the rest), so it stays small next to its number. */
@media (max-width: 40rem) {
  .chart-card-summary {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    overflow: hidden;
  }

  /* The item line on top says what the open card says: it makes way, and is back when the card closes. */
  .chart-frame.has-card .chart-focus {
    display: none;
  }
}

.chart-popup .leaflet-popup-content-wrapper,
.chart-popup .leaflet-popup-tip {
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--rule);
  box-shadow: 0 12px 32px var(--shadow);
}

.chart-popup .leaflet-popup-content-wrapper {
  border-radius: var(--radius);
}

.chart-popup .leaflet-popup-content {
  margin: 0.9rem 1.1rem;
  font-size: 0.875rem;
  line-height: 1.4;
}

.leaflet-container a.leaflet-popup-close-button {
  color: var(--ink-2);
}

.pop-name {
  font-size: 1.2rem;
  font-weight: 800;
  line-height: 1.2;
}

.pop-type {
  color: var(--ink-2);
}

.pop-facts {
  display: grid;
  gap: 0.3rem;
  margin-top: 0.6rem;
}

.pop-facts div {
  display: grid;
  grid-template-columns: 5.5rem 1fr;
  gap: 0.5rem;
}

.pop-facts dt {
  color: var(--ink-2);
}

.pop-facts .ais-text {
  display: block;
  color: var(--ink-2);
}

/* A button of the shared set, full width, with the item's severity colour down its left edge */
.pop-news {
  justify-content: flex-start;
  width: 100%;
  margin-top: 0.85rem;
  border-left: 4px solid var(--low);
  text-align: left;
  white-space: normal;
}

.pop-news.sev-high { border-left-color: var(--high); }
.pop-news.sev-medium { border-left-color: var(--medium); }
.pop-news.sev-unrated { border-left-color: var(--nodata-ink); }

/* Place names: water in serif italic (the chart convention), land in small spaced capitals,
   the city in bold capitals; a white halo keeps each clear of the lines under it. */
.chart-label span {
  position: absolute;
  left: 0;
  top: 0;
  transform: translate(-50%, -50%) rotate(var(--angle, 0deg));
  white-space: nowrap;
  text-shadow: 0 1px 2px var(--label-halo), 0 0 6px var(--label-halo), 0 0 12px var(--label-halo);
  pointer-events: none;
}

.chart-label-water span {
  color: var(--water-label);
  font-family: var(--font-serif);
  font-size: 0.9375rem;
  font-style: italic;
  letter-spacing: 0.02em;
}

.chart-label-land span {
  color: var(--land-label);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.chart-label-city span {
  color: var(--ink);
  font-size: 1.0625rem;
  font-weight: 800;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

/* Ships: hulls seen from above, turned to their heading. Each is drawn at its real
   length (map.js sets --px-per-m when the zoom changes), but never smaller than
   --ship-min, so ships stay visible when the chart is zoomed out. */
.chart-map {
  --ship-min: 26px;
  --px-per-m: 0px;
}

.chart-map[data-zoom="far"] {
  --ship-min: 19px;
}

.ship {
  color: var(--ink);
  transition: opacity 0.3s;
}

.ship svg {
  --len: max(var(--ship-min), calc(var(--length-m, 200) * var(--px-per-m)));
  position: absolute;
  left: 0;
  top: 0;
  width: calc(var(--len) / 2);
  height: var(--len);
  overflow: visible;
  transform: translate(-50%, -50%) rotate(var(--heading, 0deg));
  cursor: pointer;
}

/* A white outline instead of a drop shadow (filters on 40 moving symbols are slow): it lifts the
   hull off the pale sea and off the lines in the water */
.ship .hull {
  fill: var(--ship);
  stroke: rgba(255, 255, 255, 0.9);
  stroke-width: 1.2px;
  vector-effect: non-scaling-stroke;
}

.ship .deck {
  fill: rgba(255, 255, 255, 0.35);
}

/* Under way: a wake behind the stern, longer when faster */
.ship .wake {
  fill: none;
  stroke: var(--ship);
  stroke-width: 1.2px;
  stroke-linecap: round;
  opacity: 0.7;
  vector-effect: non-scaling-stroke;
}

/* At anchor: drawn hollow */
.ship-anchored .hull {
  fill: var(--bg);
  stroke: var(--ship);
  stroke-width: 1.6px;
}

.ship-anchored .deck {
  fill: var(--ship);
  opacity: 0.45;
}

/* At a terminal named in the news: the item's colour */
.ship.sev-high { color: var(--high); }
.ship.sev-high .hull { fill: var(--high); }
.ship.sev-high .wake { stroke: var(--high); }
.ship.sev-medium { color: var(--medium); }
.ship.sev-medium .hull { fill: var(--medium); }
.ship.sev-medium .wake { stroke: var(--medium); }

/* Ring around ships picked out by a selection */
.ship .ring {
  display: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2px;
  vector-effect: non-scaling-stroke;
}

.ship.is-hot .ring {
  display: inline;
}

.chart-map[data-zoom="far"] .chart-label-land span { font-size: 0.625rem; }

/* Focus: one item or one group of ships stands out, the rest steps back */
.chart-map.is-focused .ship:not(.is-hot) { opacity: 0.3; }
.chart-map.is-focused .callout:not(.is-active),
.chart-map.is-focused .callout.is-active .callout-item:not(.is-active) { opacity: 0.45; }

/* Numbered item markers. Items whose markers would overlap share one marker (#85): their
   numbers side by side, then their places ("2 4 Europoort · Calandkanaal"); in rows when that
   is too wide for the chart. Each number is a button; map.js measures these boxes to merge them. */
.callout {
  transition: opacity 0.3s;
}

.callout-inner {
  position: absolute;
  left: 0;
  top: 0;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  transform: translate(-1.125rem, -50%);
  white-space: nowrap;
}

.callout-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
  pointer-events: auto; /* Leaflet turns clicks off on markers that aren't interactive themselves */
  transition: opacity 0.3s;
}

.callout-item:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

/* The numbers of a shared marker, and of several items at one place in rows */
.callout-nums,
.callout-place {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.callout-place {
  gap: 0.375rem;
}

/* Label on the left of the number, where the right side is crowded or would run off the chart */
.callout-left .callout-inner,
.callout-left .callout-item,
.callout-left .callout-place {
  flex-direction: row-reverse;
}

.callout-left .callout-inner {
  transform: translate(calc(-100% + 1.125rem), -50%);
}

/* Shared marker, labels on the left: the first number (not the last) stays on its place */
.callout-merged.callout-left .callout-inner {
  transform: translate(calc(-100% + var(--nums) * 2.5rem - 0.25rem - 1.125rem), -50%);
}

/* A shared marker too wide for the chart: one row per place, running down from the first */
.callout-rows .callout-inner,
.callout-rows.callout-left .callout-inner {
  flex-direction: column;
  align-items: flex-start;
  gap: 0.25rem;
  transform: translate(-1.125rem, -1.125rem);
}

.callout-rows.callout-left .callout-inner {
  align-items: flex-end;
  transform: translate(calc(-100% + 1.125rem), -1.125rem);
}

.callout .num {
  position: relative;
  box-shadow: 0 0 0 2px var(--surface), 0 4px 10px rgba(15, 34, 49, 0.25);
  transition: transform 0.2s;
}

/* On the chart an unrated square is filled white, so lines and ships don't show through it */
.callout .num-unrated {
  background: var(--surface);
}

.callout-item.is-hover .num,
.callout-item.is-active .num {
  transform: scale(1.2);
  box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--ink);
}

.callout-item.sev-high .num::after {
  content: "";
  position: absolute;
  inset: -2px;
  border: 2px solid var(--high);
  border-radius: 9px;
  animation: ping 2.6s ease-out 3; /* three times, then a still ring (#104) */
}

/* map.js adds .ping-done after the three pings: markers rebuilt after a move don't ping again. */
.ping-done .callout-item.sev-high .num::after {
  animation: none;
}

@keyframes ping {
  0% { transform: scale(1); opacity: 0.9; }
  70%, 100% { transform: scale(2); opacity: 0; }
}

/* The item's label on its own small card, so it stays readable over place names and lines
   ("Terminal strike" sat over "MAASVLAKTE 2", critique 8). */
.callout-label {
  padding: 0.1rem 0.45rem;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(15, 34, 49, 0.15);
  color: var(--ink);
  font-size: 0.875rem;
  font-weight: 700;
}

/* ---------- Port status ---------- */

.status {
  min-width: 0;
}

.status-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.25rem 1rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--rule);
}

.status-head h2 {
  letter-spacing: -0.03em;
  font-size: clamp(1.75rem, 1.5rem + 1vw, 2.25rem);
  font-weight: 800;
}

.status-head a {
  color: var(--ink-2);
  font-size: 0.8125rem;
}

/* Each dial a card. Two side by side; four on a tablet; one on a narrow phone. */
.dials {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
}

@media (max-width: 24rem) {
  .dials { grid-template-columns: minmax(0, 1fr); }
}

@media (min-width: 40rem) and (max-width: 63.99rem) {
  .dials { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .dials.no-ships { grid-template-columns: repeat(3, minmax(0, 1fr)); } /* v1: no Ships dial (#138) */
}

.dial {
  display: grid;
  align-content: start;
  gap: 0.4rem;
  min-width: 0;
  padding: 0.9rem 1rem 1rem;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
}

.dial-label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--ink-2);
  font-size: 0.875rem;
  font-weight: 700;
}

.dial-reading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.75rem;
  min-height: 3.6rem;
}

.dial-value {
  font-size: 2.4rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 0.95;
  font-variant-numeric: tabular-nums;
}

.dial-value.is-text {
  font-size: 1.5rem;
  letter-spacing: -0.02em;
  line-height: 1.05;
}

.dial-value.is-missing {
  color: var(--nodata-ink);
}

.dial-value .unit {
  margin-left: 0.2em;
  color: var(--ink-2);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0;
}

/* 13 px at the smallest, where it was 12 and 11 px (critique 6) */
.dial-place,
.dial-note,
.dial-meta {
  color: var(--ink-2);
  font-size: 0.8125rem;
  line-height: 1.4;
}

.dial-place {
  margin-top: 0.25rem;
}

.dial-status {
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem 0.8rem;
  font-size: 0.875rem;
}

/* Level + meaning wrap as one sentence; the change since yesterday goes on its own line */
.dial-level {
  flex-basis: 100%;
  line-height: 1.35;
}

.dial-level .lvl {
  display: inline;
}

.dial-level .lvl .icon {
  margin-right: 0.35rem;
  vertical-align: -0.15em;
}

.dial-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.1rem 0.8rem;
}

.dial-meta a,
.dial-snapshot a {
  display: inline-flex;
  align-items: center;
  gap: 0.3em;
  color: var(--ink);
}

/* Weather: KNMI's own level next to ours (MeteoAlarm requirement): data, so mono */
.dial-mapping {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
}

/* Strike flag: the item(s) that decided it */
.dial-links {
  display: grid;
  gap: 0.45rem;
  margin: 0.1rem 0 0;
  padding: 0;
  list-style: none;
  font-size: 0.875rem;
  line-height: 1.4;
}

.dial-links a { color: var(--ink); }
.dial-links .icon { margin-left: 0.25em; vertical-align: -0.1em; }

.dial-link-role {
  display: block;
  color: var(--ink-2);
  font-size: 0.8125rem;
  font-weight: 700;
}

.dial-link-meta {
  display: block;
  color: var(--ink-2);
  font-size: 0.8125rem;
}

.dial-link-meta a { color: var(--ink-2); }

/* MeteoAlarm's conditions for the daily snapshot (#115), then its disclaimer, verbatim, under the
   weather dial */
.dial-snapshot {
  color: var(--ink-2);
  font-size: 0.8125rem;
  line-height: 1.4;
}

.dial-disclaimer {
  color: var(--ink-2);
  font-size: 0.75rem;
  line-height: 1.45;
}

/* River gauge: a board with alternating marks on its left half, water rising from below, and
   lines at the Watch and Alert thresholds (design review S7, #83) labelled in cm beside it.
   Tall enough that the 80 and 150 cm labels don't touch on a 0-700 cm scale. */
.gauge {
  display: flex;
  flex: none;
  gap: 0.25rem;
  height: 7.5rem;
}

.gauge-board {
  position: relative;
  width: 1.25rem;
  overflow: hidden;
  border: 1px solid var(--ink-2);
  border-radius: 3px;
  background:
    linear-gradient(to right, transparent 50%, var(--surface) 50%),
    repeating-linear-gradient(to top, var(--ink) 0 2.5%, var(--surface) 2.5% 5%);
}

.gauge-water {
  position: absolute;
  inset: auto 0 0 0;
  height: var(--level);
  background: var(--gauge-water);
  border-top: 2px solid var(--gauge-line);
}

/* Colour and line style both say which: dashed = Watch, solid = Alert (spec §2.2) */
.gauge-mark {
  position: absolute;
  left: 0;
  right: 0;
  height: 0;
  margin-bottom: -1px;
}

.gauge-mark.mark-watch {
  border-top: 2px dashed var(--medium-ink);
}

.gauge-mark.mark-alert {
  border-top: 2px solid var(--high-ink);
}

.gauge-scale {
  position: relative;
  width: 1.9rem;
}

.gauge-tick {
  position: absolute;
  left: 0;
  transform: translateY(50%);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  line-height: 1;
}

.gauge-tick.tick-watch { color: var(--medium-ink); }
.gauge-tick.tick-alert { color: var(--high-ink); }

/* ---------- The brief ---------- */

.kicker {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1rem;
  color: var(--ink-2);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* "Archived. Go to today": a link, so the link colour, not amber (amber means Medium/Watch) */
.kicker a {
  color: var(--accent);
}

.publication {
  color: var(--ink-2);
  font-size: 0.8125rem;
}

.publication a {
  color: var(--ink-2);
  white-space: nowrap;
}

/* Each item a white card with soft corners (the page below the first screen used to be one
   flat column with 1 px rules, critique 3). The selected one gets a harbour-blue edge. */
.items {
  display: grid;
  gap: 1rem;
  margin: 1.25rem 0 0;
  padding: 0;
  list-style: none;
}

.item {
  padding: 1.35rem 1.5rem 1.45rem;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  box-shadow: 0 1px 2px rgba(15, 34, 49, 0.05);
  scroll-margin-top: calc(var(--topbar-h) + 1rem);
  transition: border-color 0.2s, box-shadow 0.2s;
}

@media (max-width: 40rem) {
  .item {
    padding: 1.1rem 1rem 1.2rem;
  }
}

.has-map .item[data-place] {
  cursor: pointer;
}

.has-map .item[data-place]:hover {
  border-color: var(--edge);
}

.item.is-active {
  box-shadow: inset 4px 0 0 var(--accent), 0 6px 20px rgba(15, 34, 49, 0.1);
}

.item article {
  display: grid;
  gap: 0.6rem;
}

.item-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.7rem;
}

.item-meta {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.1rem 0.7rem;
  color: var(--ink-2);
  font-size: 0.8125rem;
}

.item-title {
  font-size: clamp(1.3rem, 1.15rem + 0.5vw, 1.6rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.18;
}

.item-title a {
  text-decoration: none;
}

.item-title a:hover {
  text-decoration: underline;
  text-decoration-thickness: 2px;
}

.item-summary {
  max-width: var(--measure);
}

/* Under an English headline the AI wrote: who translated it, and the original (#134). */
.item-original {
  max-width: var(--measure);
  margin-top: 0.25rem;
  color: var(--ink-2);
  font-size: 0.8125rem;
  line-height: 1.45;
}

/* The publisher's note under a summary written with its permission (#107). */
.item-permission {
  max-width: var(--measure);
  color: var(--ink-2);
  font-size: 0.8125rem;
  line-height: 1.45;
}

.permission-statement {
  color: var(--ink-2);
}

/* The interpretation on a faint plum wash, under its plum label: never mistaken for the facts above */
.item-impact {
  display: grid;
  gap: 0.4rem;
  padding: 0.8rem 1rem 0.9rem;
  background: var(--overprint-wash);
  border-radius: 10px;
}

.impact-label {
  color: var(--overprint);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.impact-label em {
  margin-left: 0.3rem;
  color: var(--ink-2);
  font-family: var(--font-serif);
  font-size: 0.9375rem;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
}

.impact-text {
  max-width: var(--measure);
  font-family: var(--font-serif);
  font-size: 1.125rem;
  line-height: 1.48;
}

.affects {
  color: var(--ink-2);
  font-size: 0.8125rem;
}

.affects strong {
  margin-right: 0.4rem;
  color: var(--ink);
}

/* "Show on chart", "Read original", "Read in English": buttons of the shared set, side by side */
.item-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.35rem;
}

.quiet {
  display: grid;
  gap: 0.75rem;
  margin-top: 1.25rem;
  padding: 1.75rem 1.5rem;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
}

.quiet h3 {
  font-size: clamp(1.75rem, 1.4rem + 1.5vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.05;
}

.quiet p {
  max-width: var(--measure);
  color: var(--ink-2);
}

/* ---------- Ship list ---------- */

.ship-list {
  padding-top: 3rem;
}

.ship-list summary {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.2rem 1rem;
  padding-block: 0.9rem;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  cursor: pointer;
  list-style: none;
}

/* display: flex hides the browser's own marker, so the summary draws its own ▸ (S10, #82). */
.ship-list summary::-webkit-details-marker {
  display: none;
}

.summary-marker {
  flex: none;
  align-self: center;
  width: 0.75rem;
  height: 0.75rem;
  fill: currentColor;
  transition: transform 0.2s;
}

.ship-list details[open] > summary .summary-marker {
  transform: rotate(90deg);
}

.ship-list summary h2 {
  display: inline;
  font-size: 1.375rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.ship-list summary span {
  color: var(--ink-2);
  font-size: 0.875rem;
}

.ship-list .table-scroll {
  margin-top: 1rem;
}

tr.is-linked th {
  box-shadow: inset 4px 0 0 var(--high);
  padding-left: 0.6rem;
}

.ship-news {
  margin-left: 0.35rem;
  color: var(--high-ink);
  font-size: 0.8125rem;
  font-weight: 700;
}

/* ---------- Tables (ship list, Method page) ---------- */

.table-scroll {
  overflow-x: auto;
  border-top: 1px solid var(--edge);
}

table {
  width: 100%;
  min-width: 40rem;
  border-collapse: collapse;
  font-size: 0.9375rem;
  line-height: 1.4;
}

th,
td {
  padding: 0.6rem 0.75rem 0.6rem 0;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--rule);
}

thead th {
  color: var(--ink-2);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

tbody th {
  font-weight: 700;
}

td.num-col,
th.num-col {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

td.ais-text {
  color: var(--ink-2);
}

/* ---------- About this project (Today page, L2, #86): laid out like the build notes ---------- */

/* About and "How this brief was made": sections with a heading on the left, set off by a rule */
.about {
  display: grid;
  gap: 1.25rem;
  margin-top: 3.5rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--rule);
}

@media (min-width: 64rem) {
  .about { grid-template-columns: 16rem minmax(0, 1fr); column-gap: 2.5rem; }
}

.about h2 {
  font-size: 1.375rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.about-body {
  display: grid;
  gap: 0.9rem;
}

.about-body p {
  max-width: var(--measure);
}

.about-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.about-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 600;
}

/* ---------- Build notes, day navigation ---------- */

.notes {
  display: grid;
  gap: 1.25rem;
  margin-top: 3rem;
  padding-block: 2.5rem;
  border-top: 1px solid var(--rule);
}

@media (min-width: 64rem) {
  .notes { grid-template-columns: 16rem minmax(0, 1fr); column-gap: 2.5rem; }
}

.notes h2 {
  font-size: 1.375rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.notes-body {
  display: grid;
  gap: 1rem;
}

.stats {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2.75rem;
}

.stats dt {
  color: var(--ink-2);
  font-size: 0.8125rem;
}

.stats dd {
  font-size: 2.1rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

/* A stat that is a sentence, not a number ("Summaries: 9 by Claude Sonnet 5.5, ...", #84). */
.stats .stat-text dd {
  margin-top: 0.35rem;
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.3;
}

.failures {
  display: grid;
  gap: 0.4rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.corrections {
  display: grid;
  gap: 0.4rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.corrections strong { white-space: nowrap; }

.corrections li,
.failures li,
.all-ok,
.draft,
.reduced-note {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  font-size: 0.9375rem;
}

.failures li,
.draft,
.reduced-note { color: var(--medium-ink); }
.all-ok { color: var(--ok-ink); }

.corrections .icon,
.failures .icon,
.all-ok .icon,
.draft .icon,
.reduced-note .icon {
  position: relative;
  top: 0.15em;
}

/* "The AI step was unavailable this morning": under the publication line and above the brief */
.panel-head .reduced-note {
  margin-top: 0.6rem;
  font-size: 0.875rem;
}

.brief-col .reduced-note {
  margin-top: 1rem;
}

.day-nav {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
  padding-block: 1rem 3rem;
  border-top: 1px solid var(--rule);
  font-weight: 700;
}

.day-nav a {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 44px;
  text-decoration: none;
}

.day-nav a:hover span,
.day-nav > a:not([class]):hover {
  text-decoration: underline;
}

.day-nav-newer {
  justify-self: end;
}

/* ---------- Footer ---------- */

/* White, in two columns on wide screens: what this is and the privacy note on the left, the
   links and credits on the right (it was a block of small grey text, critique 5). */
.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--rule);
  color: var(--ink-2);
  font-size: 0.875rem;
}

.footer-inner {
  display: grid;
  gap: 1rem;
  padding-block: 2.5rem 3rem;
}

@media (min-width: 52rem) {
  .footer-inner {
    grid-template-columns: minmax(0, 1fr) minmax(14rem, 22rem);
    column-gap: 4rem;
    align-items: start;
  }

  .footer-inner > .disclaimer,
  .footer-inner > .privacy,
  .footer-inner > .identity { grid-column: 1; }

  .footer-inner > .footer-links { grid-column: 2; grid-row: 1 / span 3; }

  .footer-inner > .credits { grid-column: 2; }
}

.disclaimer {
  max-width: var(--measure);
  color: var(--ink);
  font-size: 1rem;
  font-weight: 600;
}

.privacy,
.identity {
  max-width: var(--measure);
}

/* Who the owner is, one sentence (#138): under the disclaimer and in the About texts */
.about-identity { font-weight: 600; }

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 52rem) {
  .footer-links {
    flex-direction: column;
  }
}

.footer-links a {
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  color: var(--ink);
}

/* ---------- Archive and Method pages ---------- */

/* A page title, not a poster: it was 88 px over small body text (critique 4). */
.page-head {
  display: grid;
  gap: 0.75rem;
  padding-block: 2.5rem 2rem;
}

.page-title {
  font-size: clamp(2.25rem, 1.6rem + 2.4vw, 3.5rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.05;
}

.page-lede {
  max-width: 40em;
  color: var(--ink-2);
  font-size: 1.1875rem;
  line-height: 1.5;
}

/* Archive: each month a white card of day rows, the full width of the page */
.month {
  padding-bottom: 2.5rem;
}

.month h2 {
  padding-bottom: 0.6rem;
  font-size: 1.375rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.days {
  margin: 0;
  padding: 0;
  list-style: none;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  overflow: hidden;
}

.days li + li {
  border-top: 1px solid var(--rule);
}

.day-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.6rem;
  padding: 1.1rem 1.25rem;
  text-decoration: none;
  transition: background-color 0.15s;
}

.day-row:hover {
  background: var(--bg);
}

@media (min-width: 52rem) {
  .day-row {
    grid-template-columns: 9rem auto minmax(0, 1fr) auto;
    column-gap: 2rem;
    align-items: center;
    padding-inline: 1.5rem;
  }
}

.day-when {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
}

@media (min-width: 52rem) {
  .day-when { display: grid; gap: 0.15rem; }
}

.day-date {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1;
}

.day-edition {
  color: var(--ink-2);
  font-size: 0.8125rem;
}

.strip {
  display: inline-flex;
  gap: 3px;
}

.slot {
  display: inline-grid;
  place-items: center;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 5px;
  font-size: 0.8125rem;
  font-weight: 800;
}

/* No item in this slot: a short dash, not a box. Unrated items keep their outlined square, so the
   two no longer look alike (critique 12). */
.slot-empty::before {
  content: "";
  width: 0.6rem;
  height: 2px;
  border-radius: 1px;
  background: var(--rule);
}

.day-top {
  font-size: 1.0625rem;
  font-weight: 700;
  line-height: 1.35;
}

.day-top.is-quiet {
  color: var(--ink-2);
  font-weight: 500;
}

.day-row:hover .day-top {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.2em;
}

.day-status {
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
  color: var(--ink-2);
  font-size: 0.875rem;
}

.status-marks {
  display: inline-flex;
  gap: 0.3rem;
  font-size: 1.125rem;
}

.mark { display: inline-flex; align-items: center; }
.mark-ok { color: var(--ok-ink); }
.mark-watch { color: var(--medium-ink); }
.mark-alert { color: var(--high-ink); }
.mark-nodata { color: var(--nodata-ink); }

/* Contents list at the top of "How it works" (S3, #86): a white card. On wide screens it stands
   beside the text and stays in view while you read (the page used half the width, critique 4). */
.contents {
  max-width: 48rem;
  margin-bottom: 2.5rem;
  padding: 1rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
}

.contents ol {
  columns: 2 14rem;
  column-gap: 2rem;
  margin: 0;
  padding-left: 1.5rem;
}

.contents li {
  break-inside: avoid;
}

.contents li {
  padding-block: 0.3rem;
}

.contents a {
  font-weight: 600;
  text-decoration: none;
}

.contents a:hover {
  text-decoration: underline;
}

@media (min-width: 72rem) {
  .page-method {
    display: grid;
    grid-template-columns: 18rem minmax(0, 50rem);
    column-gap: 4rem;
    align-items: start;
  }

  .page-method .page-head {
    grid-column: 1 / -1;
  }

  .page-method .contents {
    position: sticky;
    top: calc(var(--topbar-h) + 1.5rem);
    margin-bottom: 0;
  }

  .page-method .contents ol {
    columns: auto;
  }

  .page-method .prose {
    grid-column: 2;
  }
}

/* Phones: each status icon gets its short name as text (design review S9, #84), since a
   mouse-over title shows nothing on a touch screen. Wide rows have the legend line above. */
.mark-label {
  margin-left: 0.25rem;
  color: var(--ink-2);
  font-size: 0.8125rem;
}

@media (max-width: 51.99rem) {
  .status-marks { gap: 0.9rem; }
}

@media (min-width: 52rem) {
  .mark-label { display: none; }
}

/* One line above the archive list: what the squares and icons mean (S9, #84). */
.archive-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.25rem;
  max-width: 64rem;
  margin: 0 0 2rem;
  color: var(--ink-2);
  font-size: 0.875rem;
}

.legend-levels {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.9rem;
}

.legend-levels .icon { margin-right: 0.3rem; }

.prose {
  display: grid;
  gap: 2.75rem;
  max-width: 48rem;
  padding-bottom: 4rem;
}

.prose section {
  display: grid;
  gap: 0.9rem;
}

.prose section {
  scroll-margin-top: calc(var(--topbar-h) + 1rem);
}

.prose h2 {
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--rule);
  font-size: clamp(1.5rem, 1.3rem + 0.9vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.03em;
}

.prose p,
.prose li {
  max-width: var(--measure);
}

.prose ul,
.prose ol {
  display: grid;
  gap: 0.55rem;
  margin: 0;
  padding-left: 1.25rem;
}

/* The links under "Who makes this" stay one row, as on the Today page (#86) */
.prose .about-links {
  display: flex;
  gap: 0.25rem 1.5rem;
  padding-left: 0;
}

.steps li::marker {
  font-weight: 700;
}

.rules {
  display: grid;
}

.rules > div {
  display: grid;
  grid-template-columns: 7.5rem minmax(0, 1fr);
  gap: 1rem;
  align-items: baseline;
  padding-block: 0.8rem;
  border-bottom: 1px solid var(--rule);
}

.rules dt {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}

/* Method page: the sources by verdict, generated from config/sources.toml (#24) */
.source-group {
  display: grid;
  gap: 0.55rem;
}

/* "(feed)" / "(page)": the address the job reads, after the link to the source's public page */
.source-feed {
  font-size: 0.875em;
  color: var(--ink-2);
}

.source-group h3 {
  font-size: 0.8125rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-2);
}

.swatch {
  display: inline-block;
  width: 1rem;
  height: 1rem;
  border-radius: 4px;
}

/* ---------- Motion ---------- */

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