/* ==========================================================================
   Touching Little Lives — Archive design system
   Phase 4 prototype stylesheet. Zero external dependencies.
   ========================================================================== */

/* --------------------------------------------------------------------------
   TOKENS
   Palette derived from the surviving 2001 logo (tlllogolabel.jpg):
   navy wordmark -> ink + blue accent; coral hands / maroon tagline -> rose.
   Sage is the one added hue, chosen to sit between them without competing.
   -------------------------------------------------------------------------- */
:root {
  /* Backgrounds & surfaces — white page, cool surfaces. No cream, no beige. */
  --bg:             #ffffff;
  --surface:        #f4f6f9;  /* cool mist gray-blue */
  --surface-sunken: #e9edf2;
  --surface-sage:   #eff3ef;  /* very pale desaturated sage */

  /* Text */
  --ink:        #16202e;  /* deep navy-charcoal, 15.9:1 on white */
  --ink-muted:  #41505f;  /*  8.1:1 */
  --ink-faint:  #5f6e7d;  /*  4.9:1 — smallest permitted text colour */

  /* Rules */
  --rule:        #dbe1e8;
  --rule-strong: #b6c0cb;

  /* Accents — each has a text-safe tone and a tint */
  --blue:       #23486f;  /* logo navy, 9.4:1 */
  --blue-tint:  #eef2f8;
  --rose:       #8f4f52;  /* restrained logo coral/maroon, 6.4:1 */
  --rose-tint:  #f9f1f1;
  --sage:       #4c6552;  /*  6.6:1 — secondary accent only */
  --sage-tint:  #eef2ef;

  /* Typography
     Three levels, not two. The archive reads as a modern reference library whose
     SOURCE MATERIAL is set in serif — not as a site that is serif throughout.
     --sans     interface, editorial voice, indexes, metadata
     --display  headings and the site title
     --serif    original pattern instructions and preserved historical text ONLY
     All three are system stacks: no external font request, no runtime dependency. */
  --sans: "Aptos", "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system,
          BlinkMacSystemFont, Roboto, "Helvetica Neue", Arial, sans-serif;
  --display: "Aptos Display", "Segoe UI Variable Display", "Segoe UI", system-ui,
          -apple-system, BlinkMacSystemFont, sans-serif;
  --serif: "Charter", "Bitstream Charter", "Sitka Text", Cambria, Georgia,
          "Iowan Old Style", serif;
  --mono:  ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

  /* Type scale */
  --t-display: clamp(2.35rem, 1.55rem + 3.4vw, 4.75rem);
  --t-h1:      clamp(1.75rem, 1.45rem + 1.3vw, 2.25rem);
  --t-h2:      clamp(1.375rem, 1.24rem + 0.6vw, 1.625rem);
  --t-h3:      1.125rem;
  --t-body:    1.0625rem;  /* 17px — long-read optimised */
  --t-small:   0.9375rem;
  --t-nav:     0.9375rem;  /* 15px — navigation floor */
  --t-meta:    0.8125rem;  /* 13px floor; nothing smaller anywhere */

  /* Spacing scale (4px base) */
  --s1: 0.25rem; --s2: 0.5rem;  --s3: 0.75rem; --s4: 1rem;
  --s5: 1.5rem;  --s6: 2rem;    --s7: 3rem;    --s8: 4rem;  --s9: 6rem;

  /* Widths */
  --w-read:    34rem;   /* ~66ch — pattern instructions */
  --w-content: 46rem;   /* prose + metadata */
  --w-wide:    72rem;   /* indexes, archive tables */

  /* Radius policy: 2px maximum, applied only to interactive affordances.
     No pills, no large radii, no "cards". */
  --radius: 2px;

  /* Shadow policy: none. Depth comes from rules and spacing. */
}

/* The type scale is fluid; no fixed desktop override. An earlier one set
   --t-display to 2.625rem above 64rem, which made the homepage H1 SMALLER at
   1440 (42px) than at 768 (51px). */

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: var(--t-body)/1.65 var(--sans);
  overflow-wrap: break-word;
}

h1, h2, h3, h4 { font-family: var(--display); font-weight: 650; line-height: 1.22; margin: 0;
  letter-spacing: -0.011em; }
h1 { font-size: var(--t-h1); letter-spacing: -0.01em; }
h2 { font-size: var(--t-h2); }
h3 { font-size: var(--t-h3); }

p, ul, ol, dl, table, figure { margin: 0 0 var(--s4); }

a { color: var(--blue); text-underline-offset: 0.16em; text-decoration-thickness: 1px; }
a:hover { color: var(--ink); }

:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
  border-radius: var(--radius);
}

img { max-width: 100%; height: auto; }

hr { border: 0; border-top: 1px solid var(--rule); margin: var(--s6) 0; }

/* Skip link */
.skip {
  position: absolute; left: var(--s4); top: -3rem;
  background: var(--bg); color: var(--ink);
  padding: var(--s2) var(--s4); border: 1px solid var(--ink);
  z-index: 50; transition: top 150ms;
}
.skip:focus { top: var(--s4); }

/* --------------------------------------------------------------------------
   LAYOUT
   -------------------------------------------------------------------------- */
.wrap { width: 100%; max-width: var(--w-wide); margin-inline: auto; padding-inline: var(--s4); }
@media (min-width: 48rem) { .wrap { padding-inline: var(--s6); } }

.col-read    { max-width: var(--w-read); }
.col-content { max-width: var(--w-content); }

/* A single-column page centres its reading column inside the wrap; a nested
   .col-read stays left-aligned so instructions sit narrower than their metadata. */
main > .col-content { margin-inline: auto; }

.section { padding-block: var(--s7); border-top: 1px solid var(--rule); }
.section:first-of-type { border-top: 0; }
/* Mobile section spacing was ~30% larger than it needed to be, which read as
   emptiness rather than rhythm. */
@media (max-width: 47.99rem) {
  .section { padding-block: var(--s6); }
  .hero { padding-block: var(--s5) var(--s6); }
}
/* A pale surface separates a section instead of yet another hairline rule.
   Applied by the template to alternating sections, never to every one. */
.section--soft {
  background: var(--surface); border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  margin-inline: calc(-1 * var(--s4)); padding-inline: var(--s4);
}
@media (min-width: 48rem) {
  .section--soft { margin-inline: calc(-1 * var(--s6)); padding-inline: var(--s6); }
}
.section__head { margin-bottom: var(--s5); }
.section__head h2 { margin-bottom: var(--s2); }
.section__head p { margin: 0; color: var(--ink-muted); font-size: var(--t-small); max-width: 46rem; }

/* --------------------------------------------------------------------------
   HEADER / NAV
   -------------------------------------------------------------------------- */
.masthead { border-bottom: 1px solid var(--rule); background: var(--bg); }
.masthead__inner {
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--s4);
  padding-block: var(--s4);
}
.brand { display: flex; align-items: center; gap: var(--s3); text-decoration: none; color: inherit; }
.brand img { width: 62px; height: auto; flex: none; }
@media (min-width: 48rem) { .brand img { width: 72px; } }
.brand__name { font-family: var(--display); font-size: 1.25rem; font-weight: 650; line-height: 1.15;
  letter-spacing: -0.012em; }
.brand__kicker {
  display: block; font-family: var(--sans); font-size: var(--t-meta);
  font-weight: 400; color: var(--ink-faint); letter-spacing: 0.06em; text-transform: uppercase;
}

.nav { margin-left: auto; }
.nav ul { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s6); list-style: none; margin: 0; padding: 0; }
.nav a {
  display: block; padding: var(--s2) 0; min-height: 44px; line-height: 28px;
  font-size: var(--t-nav); font-weight: 500; text-decoration: none; color: var(--ink-muted);
  border-bottom: 2px solid transparent; transition: color 150ms, border-color 150ms;
}
.nav a:hover { color: var(--ink); border-bottom-color: var(--rule-strong); }
.nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--blue); }

@media (max-width: 47.99rem) {
  .masthead__inner { padding-block: var(--s3); gap: var(--s2); }
  .nav { margin-left: 0; width: 100%; border-top: 1px solid var(--rule); }
  .nav ul { gap: 0 var(--s5); }
  .nav a { min-height: 42px; line-height: 26px; }
}

/* --------------------------------------------------------------------------
   BREADCRUMB
   -------------------------------------------------------------------------- */
.crumb { font-size: var(--t-meta); color: var(--ink-faint); padding-block: var(--s4) 0; }
.crumb ol { display: flex; flex-wrap: wrap; gap: var(--s2); list-style: none; margin: 0; padding: 0; }
.crumb li + li::before { content: "/"; margin-right: var(--s2); color: var(--rule-strong); }
.crumb a { color: var(--ink-muted); }
.crumb [aria-current="page"] { color: var(--ink-faint); }

/* --------------------------------------------------------------------------
   PAGE HEAD
   -------------------------------------------------------------------------- */
.page-head { padding-block: var(--s5) var(--s6); }
.page-head__eyebrow {
  font-size: var(--t-meta); letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--ink-faint); margin: 0 0 var(--s3);
}
.page-head h1 { margin-bottom: var(--s3); }
.page-head__lede { font-size: 1.125rem; color: var(--ink-muted); max-width: var(--w-content); margin: 0; }

/* --------------------------------------------------------------------------
   NOTICES — severity ladder by ENCLOSURE, not hue alone.
   quietest: provenance (hairline) -> historical -> archived -> rights -> safety (full box)
   -------------------------------------------------------------------------- */
.note { font-family: var(--sans); font-size: var(--t-small); margin-block: var(--s5); }
.note__label {
  display: block; font-size: var(--t-meta); font-weight: 600;
  letter-spacing: 0.07em; text-transform: uppercase; margin-bottom: var(--s2);
}
.note p:last-child { margin-bottom: 0; }

/* 1. Provenance — quietest. A hairline, nothing more. */
.note--source {
  border-top: 1px solid var(--rule);
  padding-top: var(--s3);
  color: var(--ink-faint);
  font-size: var(--t-meta);
}
.note--source .note__label { color: var(--ink-faint); }

/* 2. Historical context — sage rule + tint */
.note--historical {
  border-left: 3px solid var(--sage);
  background: var(--sage-tint);
  padding: var(--s4);
  color: var(--ink-muted);
}
.note--historical .note__label { color: var(--sage); }

/* 3. Archived document — blue rule + tint */
.note--archived {
  border-left: 3px solid var(--blue);
  background: var(--blue-tint);
  padding: var(--s4);
  color: var(--ink-muted);
}
.note--archived .note__label { color: var(--blue); }

/* 3b. Privacy redaction — same weight as an archived note, but this one MUST
   survive printing. The page keeps "[personal medical detail redacted]" markers
   in the text; without the note explaining them, a printed copy would show the
   redaction with no reason for it. */
.note--privacy {
  border-left: 3px solid var(--blue);
  background: var(--blue-tint);
  padding: var(--s4);
  color: var(--ink-muted);
}
.note--privacy .note__label { color: var(--blue); }

/* 4. Rights restriction — rose rule + tint + heavier body */
.note--rights {
  border-left: 3px solid var(--rose);
  background: var(--rose-tint);
  padding: var(--s4);
  color: var(--ink);
}
.note--rights .note__label { color: var(--rose); }
.note--rights blockquote {
  margin: var(--s3) 0 0; padding-left: var(--s4);
  border-left: 1px solid var(--rose);
  font-family: var(--serif); font-style: italic; color: var(--ink-muted);
}

/* 5. Modern safety note — loudest. Full border, more padding. */
.note--safety {
  border: 1px solid var(--rule-strong);
  border-top: 3px solid var(--ink);
  background: var(--surface);
  padding: var(--s5);
  color: var(--ink);
}
.note--safety .note__label { color: var(--ink); }

/* --------------------------------------------------------------------------
   PATTERN PAGE
   -------------------------------------------------------------------------- */
.pattern__provenance {
  font-size: var(--t-meta); color: var(--ink-faint);
  margin: 0 0 var(--s5);
}

/* Metadata — definition list, no card. Only rendered fields that exist. */
.meta {
  display: grid; grid-template-columns: max-content 1fr;
  gap: var(--s2) var(--s5);
  margin: 0 0 var(--s6); padding: var(--s4) 0;
  border-block: 1px solid var(--rule);
  font-size: var(--t-small);
}
.meta dt {
  font-size: var(--t-meta); letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--ink-faint); font-weight: 600;
}
.meta dd { margin: 0; color: var(--ink); }

/* Source text is SERIF — it is historical material.
   Editorial layers stay sans. This is the primary source/editorial signal. */
.source-text {
  font-family: var(--serif); font-size: 1.0625rem; line-height: 1.7;
  /* Georgia defaults to old-style figures. In a pattern the stitch counts and row
     numbers are the most-scanned elements, so force lining figures for precision. */
  font-variant-numeric: lining-nums;
  font-feature-settings: "lnum" 1;
}
.source-text h2 {
  font-size: var(--t-h3); letter-spacing: 0.04em; text-transform: uppercase;
  font-family: var(--sans); font-weight: 600; color: var(--ink-muted);
  margin: var(--s7) 0 var(--s4); padding-bottom: var(--s2);
  border-bottom: 1px solid var(--rule);
}
.source-text h2:first-child { margin-top: 0; }

/* Instruction rows — numbered source lines, not cards */
.rows { list-style: none; margin: 0 0 var(--s5); padding: 0; }
.rows li {
  padding: var(--s2) 0 var(--s2) var(--s5);
  border-bottom: 1px solid var(--surface-sunken);
  text-indent: calc(var(--s5) * -1);
}
.rows li:last-child { border-bottom: 0; }
.rows strong { font-family: var(--sans); font-size: var(--t-small); font-weight: 600; }

/* Materials / abbreviations */
.plainlist { list-style: none; margin: 0 0 var(--s5); padding: 0; }
.plainlist li { padding: var(--s2) 0; border-bottom: 1px solid var(--surface-sunken); }
.plainlist li:last-child { border-bottom: 0; }

.abbr { display: grid; grid-template-columns: max-content 1fr; gap: var(--s2) var(--s4);
        margin: 0 0 var(--s5); font-size: var(--t-small); }
.abbr dt { font-family: var(--mono); font-weight: 600; }
.abbr dd { margin: 0; color: var(--ink-muted); }

/* Pattern figure — respects the asset's real size, never upscaled */
.figure { margin: 0 0 var(--s6); }
.figure img { display: block; border: 1px solid var(--rule); background: var(--surface); }
.figure figcaption { font-size: var(--t-meta); color: var(--ink-faint); margin-top: var(--s2); }

/* --------------------------------------------------------------------------
   ACTIONS
   -------------------------------------------------------------------------- */
.actions { display: flex; flex-wrap: wrap; gap: var(--s3); margin: var(--s6) 0; }
/* The print hint replaced a button that could never work: the site ships no
   JavaScript, so an onclick handler was dead markup. It is a note, not a control,
   and like every .actions block it is removed from the printed page. */
.actions--print {
  display: block; font: var(--t-small)/1.6 var(--sans);
  color: var(--ink-muted); border-top: 1px solid var(--rule);
  padding-top: var(--s3);
}
.actions--print kbd {
  font: 600 0.95em/1 var(--sans); color: var(--ink);
  border: 1px solid var(--rule-strong); border-radius: 3px;
  padding: 0.15em 0.4em; white-space: nowrap;
}
.btn {
  display: inline-flex; align-items: center; gap: var(--s2);
  min-height: 44px; padding: var(--s2) var(--s4);
  font: 600 var(--t-small)/1.4 var(--sans);
  color: var(--ink); background: var(--bg);
  border: 1px solid var(--rule-strong); border-radius: var(--radius);
  text-decoration: none; cursor: pointer;
}
.btn:hover { background: var(--surface); border-color: var(--ink-muted); color: var(--ink); }

/* --------------------------------------------------------------------------
   INDEX / CATALOGUE  (text-forward, not image cards)
   -------------------------------------------------------------------------- */
.catalogue { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule-strong); }
.cat-item { border-bottom: 1px solid var(--rule); padding: var(--s4) 0; }
@media (min-width: 48rem) {
  .catalogue { display: grid; grid-template-columns: repeat(2, 1fr); column-gap: var(--s7); }
  .catalogue .cat-item:nth-last-child(-n+2):nth-child(odd) { border-bottom: 0; }
}
.cat-item__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--s2) var(--s4); }
.cat-item__title { font-family: var(--display); font-size: var(--t-h3); font-weight: 650; margin: 0; }
.cat-item__title a { text-decoration: none; }
.cat-item__title a:hover { text-decoration: underline; }
.cat-item__desc { margin: var(--s2) 0 0; color: var(--ink-muted); font-size: var(--t-small); max-width: var(--w-content); }
.cat-item__meta {
  display: flex; flex-wrap: wrap; gap: var(--s2) var(--s3);
  margin-top: var(--s3); font-size: var(--t-meta); color: var(--ink-faint);
}
/* separator so adjacent facets don't read as one phrase */
.cat-item__meta span + span::before {
  content: "·"; margin-right: var(--s3); color: var(--rule-strong);
}

/* Status is stated, not outlined. A filled tint with a single leading rule reads
   at a glance; the old 1px outline box disappeared against the page. */
.tag {
  display: inline-block; padding: 2px var(--s3) 2px calc(var(--s3) - 2px);
  font-size: var(--t-meta); font-weight: 600; letter-spacing: 0.02em;
  border: 0; border-left: 3px solid var(--rule-strong); border-radius: 0;
  color: var(--ink-muted); background: var(--surface);
}
.tag--restricted { border-left-color: var(--rose); color: var(--rose); background: var(--rose-tint); }
.tag--recovered  { border-left-color: var(--blue); color: var(--blue); background: var(--blue-tint); }

/* §11 two complementary editorial panels: the newsletter run and the organisation
   itself. Distinct from the resource sections by surface, not by another rule. */
.panels { display: grid; gap: var(--s5); }
@media (min-width: 48rem) { .panels { grid-template-columns: repeat(2, 1fr); gap: var(--s7); } }
.panel { background: var(--bg); border: 1px solid var(--rule); padding: var(--s5); }
.panel h2 { margin-bottom: var(--s3); }
.panel p { font-size: var(--t-small); color: var(--ink-muted); line-height: 1.6; }
.panel__kicker {
  font-size: var(--t-meta); font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--ink-faint); margin: 0 0 var(--s2);
}
.panel__link { margin: 0; font-weight: 500; }
.panel__link a { color: var(--blue); }

.group-head {
  display: flex; align-items: baseline; gap: var(--s3);
  margin: var(--s7) 0 var(--s3);
}
.group-head h2 { font-size: var(--t-h2); }
.group-head__count { font-size: var(--t-meta); color: var(--ink-faint); }

/* --------------------------------------------------------------------------
   TABLES
   -------------------------------------------------------------------------- */
.table-scroll { overflow-x: auto; margin: 0 0 var(--s5); }
/* A photograph inside a table cell — make.html pairs each item type with a
   picture of it. The archival files are full-resolution scans, so the display
   size is capped here rather than by re-encoding the original. */
.cell-img-wrap { width: 1%; padding-right: var(--s4); }
.cell-img {
  display: block; width: 180px; height: auto;
  border: 1px solid var(--rule);
}
@media (max-width: 30rem) { .cell-img { width: 120px; } }
table { border-collapse: collapse; width: 100%; font-size: var(--t-small); }
caption { text-align: left; font-size: var(--t-meta); color: var(--ink-faint); padding-bottom: var(--s3); }
th, td { padding: var(--s3) var(--s4); text-align: left; border-bottom: 1px solid var(--rule); }
thead th {
  font-size: var(--t-meta); letter-spacing: 0.05em; text-transform: uppercase;
  color: var(--ink-muted); border-bottom: 1px solid var(--rule-strong); vertical-align: bottom;
}
tbody tr:nth-child(even) { background: var(--surface); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }

/* --------------------------------------------------------------------------
   ARCHIVE LISTING
   -------------------------------------------------------------------------- */
.archive-year { margin: var(--s7) 0 var(--s3); display: flex; align-items: baseline; gap: var(--s3); }
.archive-year h2 { font-family: var(--sans); font-size: var(--t-h3); letter-spacing: 0.04em; }
.issues { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.issue {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--s2) var(--s4);
  padding: var(--s3) 0; border-bottom: 1px solid var(--rule);
}
.issue__id { font-family: var(--mono); font-size: var(--t-meta); color: var(--ink-faint); min-width: 4.5rem; }
.issue__title { flex: 1 1 14rem; }
.issue__formats { display: flex; gap: var(--s2); }
.issue--unavailable .issue__title { color: var(--ink-faint); }

/* --------------------------------------------------------------------------
   HOMEPAGE
   -------------------------------------------------------------------------- */
.hero { padding-block: var(--s6) var(--s7); border-bottom: 1px solid var(--rule); }
/* The homepage hero sits directly under the masthead rule and leads into the
   route grid, so it needs neither. This was an inline style on the element,
   which `style-src 'self'` blocked — the rule never applied and each page load
   logged a CSP error. */
.hero--home { border-bottom: 0; padding-top: 0; }
.hero__inner { display: grid; gap: var(--s5); }
@media (min-width: 48rem) {
  .hero__inner { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
    align-items: center; gap: var(--s8); }
}
.hero h1 {
  font-size: var(--t-display); margin-bottom: var(--s4);
  letter-spacing: -0.022em; line-height: 1.08; max-width: 18ch;
}
.hero__eyebrow {
  font-size: var(--t-meta); font-weight: 600; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--rose); margin: 0 0 var(--s3);
}
.hero__lede { font-size: 1.1875rem; line-height: 1.6; color: var(--ink-muted);
  max-width: 34rem; margin: 0 0 var(--s4); }
.hero__note {
  font-size: var(--t-small); line-height: 1.6; color: var(--ink-faint);
  max-width: 34rem; margin: 0; padding-left: var(--s4);
  border-left: 2px solid var(--rule-strong);
}
.hero__figure { margin: 0; justify-self: start; }
.hero__figure img {
  display: block; width: 100%; max-width: 340px; height: auto;
  border: 1px solid var(--rule);
}
.hero__figure figcaption {
  margin-top: var(--s2); font-size: var(--t-meta); line-height: 1.5;
  color: var(--ink-faint); max-width: 340px;
}
/* Placed AFTER the base rules: this override previously sat above them and the
   cascade ignored it, so the phone rendered the photograph at full column width.
   On a phone it follows the words rather than competing with them, and stays
   small enough not to push the resource routes down the page. */
@media (max-width: 47.99rem) {
  .hero__figure img { max-width: 168px; }
  .hero__figure figcaption { max-width: 22rem; }
}
/* At 375px a fixed 19px lede wraps to ~39 characters a line — short enough to
   break reading rhythm, and it pushed the pattern routes 324px below the fold.
   Stepping down on narrow screens restores a usable measure; the desktop size
   is unchanged. */
@media (max-width: 30rem) { .hero__lede { font-size: 1.0625rem; } }
/* .hero__mark is retired: the brand logo appears once, in the header. */

.routes { list-style: none; display: grid; gap: 1px; margin: 0; padding: 0;
  background: var(--rule); border: 1px solid var(--rule); }
@media (min-width: 40rem) { .routes { grid-template-columns: repeat(2, 1fr); } }
/* Four across reads as a toolbar, not a library. Two columns keeps each entry
   wide enough for its description at every desktop width. */
.route {
  background: var(--bg); padding: var(--s5) var(--s5) var(--s4);
  border-top: 3px solid var(--blue); transition: background 150ms;
}
.route:hover { background: var(--surface); }
.route a {
  font-family: var(--display); font-size: 1.1875rem; font-weight: 650;
  text-decoration: none; color: var(--ink); display: inline-flex; align-items: baseline; gap: var(--s2);
}
.route a::after { content: "→"; color: var(--blue); font-weight: 400; transition: transform 150ms; }
.route a:hover { color: var(--blue); }
.route a:hover::after { transform: translateX(3px); }
.route p { margin: var(--s2) 0 var(--s3); font-size: var(--t-small); color: var(--ink-muted); line-height: 1.55; }
.route__count {
  font-size: var(--t-meta); font-weight: 600; letter-spacing: 0.05em;
  text-transform: uppercase; color: var(--ink-faint);
}

.items { list-style: none; display: grid; gap: 0 var(--s7); margin: 0; padding: 0; }
@media (min-width: 40rem) { .items { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 64rem) { .items { grid-template-columns: repeat(3, 1fr); } }
.items li {
  display: flex; align-items: baseline; justify-content: space-between; gap: var(--s4);
  border-bottom: 1px solid var(--rule); padding: var(--s3) 0;
}
.items a { text-decoration: none; color: var(--ink); font-weight: 500; }
.items a:hover { color: var(--blue); text-decoration: underline; }
/* The count is secondary: tabular figures so the column aligns, never bold. */
.items .route__count {
  float: none; flex: none; font-variant-numeric: tabular-nums lining-nums;
  font-weight: 400; text-transform: none; letter-spacing: 0; color: var(--ink-faint);
}

/* --------------------------------------------------------------------------
   FOOTER
   -------------------------------------------------------------------------- */
/* A compact navigation footer. The long "about this archive" paragraph that used
   to live here repeated the homepage; the footer now closes the page instead of
   re-explaining it. */
.foot { border-top: 1px solid var(--rule); background: var(--surface); margin-top: var(--s8); }
.foot__inner {
  padding-block: var(--s5); display: flex; flex-wrap: wrap;
  align-items: baseline; justify-content: space-between; gap: var(--s4) var(--s6);
}
.foot__brand { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--s2) var(--s4); }
.foot__name {
  font-family: var(--display); font-size: var(--t-small); font-weight: 650; color: var(--ink);
}
.foot__legal { font-size: var(--t-meta); color: var(--ink-faint); margin: 0; }
.foot__nav ul {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: var(--s2) var(--s5); font-size: var(--t-small);
}
.foot__nav a { color: var(--ink-muted); text-decoration: none; }
.foot__nav a:hover { color: var(--blue); text-decoration: underline; }
@media (max-width: 47.99rem) {
  .foot__inner { flex-direction: column; align-items: flex-start; gap: var(--s4); }
  .foot__nav ul { gap: var(--s3) var(--s5); }
  .foot__nav a { display: inline-block; padding-block: var(--s1); }
}

/* --------------------------------------------------------------------------
   ERROR PAGES
   -------------------------------------------------------------------------- */
.error { padding-block: var(--s8) var(--s9); max-width: var(--w-content); }
.error__code {
  font-family: var(--mono); font-size: var(--t-meta); letter-spacing: 0.12em;
  color: var(--ink-faint); margin: 0 0 var(--s3);
}
.error h1 { font-size: var(--t-display); margin-bottom: var(--s4); }
.error p { color: var(--ink-muted); }

/* --------------------------------------------------------------------------
   MOTION
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* --------------------------------------------------------------------------
   PRINT — first-class. Pattern, credit, provenance survive; UI does not.
   -------------------------------------------------------------------------- */
@media print {
  :root { --ink: #000; --ink-muted: #000; --ink-faint: #333; }

  .masthead, .nav, .crumb, .foot, .actions, .skip,
  .related, .note--archived, .hero__mark { display: none !important; }

  body { background: #fff; color: #000; font-size: 11pt; line-height: 1.45; }
  .wrap { max-width: none; padding: 0; }
  .col-read, .col-content { max-width: none; }

  h1 { font-size: 18pt; }
  h2 { font-size: 12pt; }

  a { color: #000; text-decoration: none; }
  /* keep source URLs verifiable on paper without cluttering instruction text */
  .source-text a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 9pt; color: #333; }

  .meta { border-color: #000; }
  /* note--privacy was added in Phase 7 and must normalise like the rest: printed
     on a mono printer a tinted panel is wasted ink and can grey out its own text. */
  .note--source, .note--rights, .note--safety, .note--historical, .note--privacy {
    background: none !important; border-color: #000 !important;
    padding-left: 0.5em; page-break-inside: avoid;
  }
  .figure img { border: 1px solid #000; }

  /* do not split a row-group, a table or a note across pages */
  .rows li, tr, .note, .figure, .abbr { page-break-inside: avoid; }
  h2, h3 { page-break-after: avoid; }
  table { page-break-inside: auto; }

  .print-only { display: block !important; }
}
.print-only { display: none; }

/* A citation whose destination no longer exists or could not be verified.
   It reads as a deliberate reference, not a broken link. */
.cite {
  border-bottom: 1px dotted var(--rule-strong);
  color: var(--ink-muted);
}
