/* ─────────────────────────────────────────────────────────────────────────
   London Uncovered — static plaque pages

   Used only by the generated pages under /plaques/<slug>/, which are plain
   documents rather than part of the app shell. Everything below reads from
   css/tokens.css, so the pages stay in step with the app's palette and type.
   ───────────────────────────────────────────────────────────────────────── */

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

.sp-body {
  margin: 0;
  background: var(--ivory);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
}

/*
 * The default for a link in the body copy. Component links below re-declare
 * their own colour and must out-rank this, so each is written as `a.<class>`:
 * a bare `.sp-cta` loses to `.sp-body a` and paints navy text on the blue
 * button.
 */
.sp-body a { color: var(--blue-800); }

/* ── Brand bar ─────────────────────────────────────────────────────────── */

.sp-header {
  background: var(--white);
  border-bottom: 1px solid var(--ink-100);
  padding: var(--sp-3) var(--sp-4);
  padding-top: calc(var(--sp-3) + var(--safe-t));
}

a.sp-brand {
  display: inline-flex; align-items: center; gap: var(--sp-2);
  font-weight: 700; letter-spacing: -.01em;
  color: var(--ink); text-decoration: none;
}

.sp-brand-disc {
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 0 0 2px var(--white), 0 0 0 3px var(--blue-200);
}

/* ── Layout ────────────────────────────────────────────────────────────── */

.sp-main {
  max-width: 680px;
  margin: 0 auto;
  padding: var(--sp-5) var(--sp-4) var(--sp-10);
}

.sp-card {
  background: var(--white);
  border: 1px solid var(--ink-100);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-1);
  padding: var(--sp-5);
}

.sp-eyebrow {
  margin: 0 0 var(--sp-1);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
  color: var(--ink-400);
}

.sp-card h1 {
  font-family: var(--font-serif);
  font-size: var(--fs-xl);
  line-height: 1.2;
  margin: 0;
}

.sp-dates { margin: var(--sp-1) 0 0; color: var(--ink-400); font-size: var(--fs-sm); }

.sp-badges {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin: var(--sp-4) 0 0;
}

.sp-badge {
  display: inline-flex; align-items: center;
  padding: 3px 9px;
  border-radius: var(--r-pill);
  background: var(--ivory-2); color: var(--ink-600);
  font-size: var(--fs-xs); font-weight: 650; letter-spacing: .02em;
}

.sp-badge-gold { background: var(--gold-100); color: var(--gold-900); }

/* ── Content ───────────────────────────────────────────────────────────── */

.sp-figure { margin: var(--sp-5) 0 0; }

.sp-figure img {
  display: block; width: 100%; height: auto;
  border-radius: var(--r-md);
  background: var(--ivory-2);
}

.sp-figure figcaption {
  margin-top: var(--sp-2);
  font-size: var(--fs-xs); color: var(--ink-400);
}

.sp-inscription {
  font-family: var(--font-serif);
  font-size: var(--fs-base);
  line-height: 1.65;
  color: var(--ink-800);
  margin: var(--sp-5) 0 0;
  padding: var(--sp-4) var(--sp-5);
  background: var(--blue-050);
  border-radius: var(--r-md);
  border-left: 3px solid var(--blue-200);
}

.sp-rows { margin: var(--sp-5) 0 0; }

.sp-row {
  display: flex; gap: var(--sp-4);
  padding: var(--sp-3) 0;
  border-top: 1px solid var(--ink-100);
  font-size: var(--fs-sm);
}

.sp-row dt { flex: 0 0 96px; color: var(--ink-400); }
.sp-row dd { margin: 0; color: var(--ink-800); }

/* ── Back into the app ─────────────────────────────────────────────────── */

a.sp-cta {
  display: block;
  margin: var(--sp-5) 0 0;
  padding: 13px var(--sp-5);
  min-height: var(--tap);
  border-radius: var(--r-pill);
  background: var(--blue);
  color: var(--white);
  font-weight: 650;
  text-align: center;
  text-decoration: none;
}

a.sp-cta:hover { background: var(--blue-800); }

/* The secondary of the pair — deliberately quieter than the CTA, because
   opening the map is what these pages are for and passing the link on is the
   bonus. Ships `hidden`; js/static-page.js reveals it only where it works. */
.sp-share {
  display: block;
  width: 100%;
  margin-top: var(--sp-2);
  padding: 12px var(--sp-5);
  min-height: var(--tap);
  border: 1px solid var(--ink-100);
  border-radius: var(--r-pill);
  background: var(--ivory-2);
  color: var(--ink-800);
  font: inherit;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
}

.sp-share:hover:not(:disabled) { background: var(--ivory-3); }
.sp-share:disabled { color: var(--ink-500); cursor: default; }

.sp-links {
  display: flex; flex-wrap: wrap; gap: var(--sp-2);
  margin-top: var(--sp-3);
}

a.sp-link {
  flex: 1 1 auto;
  padding: 10px var(--sp-4);
  min-height: var(--tap);
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--r-pill);
  background: var(--ivory-2);
  color: var(--ink-800);
  font-size: var(--fs-sm); font-weight: 600;
  text-decoration: none;
}

a.sp-link:hover { background: var(--ivory-3); }

/* ── Nearby ────────────────────────────────────────────────────────────── */

.sp-near { margin-top: var(--sp-6); }

.sp-near h2 {
  font-family: var(--font-serif);
  font-size: var(--fs-lg);
  margin: 0 0 var(--sp-3);
}

.sp-near ul { list-style: none; margin: 0; padding: 0; }

.sp-near li {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: var(--sp-3);
  padding: var(--sp-3) 0;
  border-top: 1px solid var(--ink-200);
}

.sp-near a { font-weight: 600; text-decoration: none; }
.sp-near a:hover { text-decoration: underline; }
.sp-near-meta { color: var(--ink-400); font-size: var(--fs-xs); white-space: nowrap; }

/* ── Footer ────────────────────────────────────────────────────────────── */

.sp-footer {
  max-width: 680px;
  margin: 0 auto;
  padding: 0 var(--sp-4) calc(var(--sp-10) + var(--safe-b));
  color: var(--ink-400);
  font-size: var(--fs-xs);
  line-height: 1.6;
}

.sp-footer p { margin: 0 0 var(--sp-2); }

/* ── Breadcrumb ────────────────────────────────────────────────────────── */

.sp-crumbs {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px;
  margin: 0 0 var(--sp-3);
  font-size: var(--fs-xs);
  color: var(--ink-400);
}

.sp-crumbs a { color: var(--ink-400); text-decoration: none; }
.sp-crumbs a:hover { color: var(--blue-800); text-decoration: underline; }

/* ── "More in this category" ───────────────────────────────────────────── */

.sp-more { margin-top: var(--sp-6); }

.sp-more h2 {
  font-family: var(--font-serif);
  font-size: var(--fs-lg);
  margin: 0 0 var(--sp-2);
}

.sp-more p { margin: 0; }

/* ─────────────────────────────────────────────────────────────────────────
   Category landing pages — /categories/<slug>/
   ───────────────────────────────────────────────────────────────────────── */

.cat-main h1 {
  font-family: var(--font-serif);
  font-size: var(--fs-xl);
  line-height: 1.2;
  margin: 0;
}

.cat-intro {
  margin: var(--sp-3) 0 var(--sp-5);
  color: var(--ink-800);
  max-width: 60ch;
}

.cat-list {
  list-style: none;
  margin: var(--sp-6) 0 0;
  padding: 0;
  /* One column on a phone; two once there is room for them to breathe. */
  display: grid;
  gap: 0 var(--sp-6);
  grid-template-columns: 1fr;
}

@media (min-width: 620px) {
  .cat-main { max-width: 860px; }
  .cat-list { grid-template-columns: 1fr 1fr; }
}

.cat-item {
  padding: var(--sp-3) 0;
  border-top: 1px solid var(--ink-200);
}

.cat-item a { font-weight: 600; text-decoration: none; }
.cat-item a:hover { text-decoration: underline; }

.cat-meta {
  display: block;
  margin-top: 2px;
  color: var(--ink-400);
  font-size: var(--fs-xs);
  line-height: 1.45;
}

.cat-nav {
  margin-top: var(--sp-8);
  display: flex; flex-wrap: wrap; gap: var(--sp-2);
}

.cat-nav h2 {
  flex-basis: 100%;
  font-family: var(--font-serif);
  font-size: var(--fs-lg);
  margin: 0 0 var(--sp-1);
}

.cat-nav a {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: var(--tap);
  padding: 8px var(--sp-4);
  border-radius: var(--r-pill);
  background: var(--white);
  border: 1px solid var(--ink-100);
  color: var(--ink-800);
  font-size: var(--fs-sm); font-weight: 600;
  text-decoration: none;
}

.cat-nav a:hover { background: var(--ivory-2); }
.cat-nav-n { color: var(--ink-400); font-weight: 600; font-variant-numeric: tabular-nums; }

/* ── Walks ─────────────────────────────────────────────────────────────────
   The generated walk pages: an index at walks/ and one page per walk. They
   reuse the plaque page's shell, header and footer, and add only what an
   ordered route needs.
   ───────────────────────────────────────────────────────────────────────── */

.walk-tagline {
  font-family: var(--font-serif);
  font-size: var(--fs-md);
  color: var(--ink-600);
  margin: 0 0 var(--sp-4);
  line-height: 1.5;
}

.walk-intro {
  font-size: var(--fs-base);
  line-height: 1.7;
  color: var(--ink-800);
  margin: 0 0 var(--sp-3);
}

.walk-hint {
  font-size: var(--fs-sm);
  color: var(--ink-500);
  margin: 0 0 var(--sp-5);
}

.walk-links { margin-top: var(--sp-3); }

.sp-route { margin-top: var(--sp-6); }
.sp-route h2 {
  font-family: var(--font-serif); font-size: var(--fs-lg); margin: 0 0 var(--sp-2);
}

/* The ordered route. Numbers are drawn from the list counter rather than
   written into the markup, so the HTML stays the plain <ol> a crawler reads. */
.walk-stops {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: walk-stop;
}

.walk-stop {
  counter-increment: walk-stop;
  position: relative;
  padding: var(--sp-4) 0 var(--sp-4) 44px;
  border-top: 1px solid var(--ink-100);
}
.walk-stop:first-child { border-top: 0; }

.walk-stop::before {
  content: counter(walk-stop);
  position: absolute;
  left: 0; top: var(--sp-4);
  width: 28px; height: 28px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: var(--blue-050);
  color: var(--blue);
  font-size: var(--fs-xs);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.walk-stop h3 {
  font-family: var(--font-serif);
  font-size: var(--fs-md);
  font-weight: 600;
  margin: 0;
}
.walk-stop h3 a { text-decoration: none; }
.walk-stop h3 a:hover { text-decoration: underline; }

.walk-stop-meta {
  margin: 3px 0 0;
  font-size: var(--fs-xs);
  color: var(--ink-400);
}

.walk-stop-note {
  margin: var(--sp-2) 0 0;
  font-size: var(--fs-sm);
  color: var(--ink-600);
  line-height: 1.6;
}

.walk-leg {
  display: block;
  margin-bottom: var(--sp-2);
  font-size: var(--fs-xs);
  color: var(--ink-300);
}

/* The cross-link from a plaque page up to the walks it is a stop on. It looks
   like "Plaques nearby" but carries its own class, so the two sections are
   never confused — by a stylesheet or by a test reading the markup. */
.sp-walks { margin-top: var(--sp-6); }
.sp-walks h2 {
  font-family: var(--font-serif); font-size: var(--fs-lg); margin: 0 0 var(--sp-2);
}
.sp-walks ul { list-style: none; margin: 0; padding: 0; }
.sp-walks li {
  display: flex; flex-wrap: wrap; align-items: baseline;
  justify-content: space-between; gap: var(--sp-2);
  padding: var(--sp-3) 0; border-top: 1px solid var(--ink-100);
}
.sp-walks a { font-weight: 600; text-decoration: none; }
.sp-walks a:hover { text-decoration: underline; }

.walk-others { list-style: none; margin: 0; padding: 0; }
.walk-others li {
  display: flex; flex-wrap: wrap; align-items: baseline;
  justify-content: space-between; gap: var(--sp-2);
  padding: var(--sp-3) 0;
  border-top: 1px solid var(--ink-100);
}
.walk-others a { font-weight: 600; text-decoration: none; }
.walk-others a:hover { text-decoration: underline; }

/* The index at walks/ */
.walk-cards {
  list-style: none;
  margin: var(--sp-6) 0 0;
  padding: 0;
  display: grid;
  gap: var(--sp-4);
}

.walk-cards .walk-card {
  background: var(--white);
  border: 1px solid var(--ink-100);
  border-radius: var(--r-lg);
  padding: var(--sp-5);
}

.walk-cards h2 {
  font-family: var(--font-serif);
  font-size: var(--fs-md);
  font-weight: 600;
  margin: 0;
}
.walk-cards h2 a { text-decoration: none; }
.walk-cards h2 a:hover { text-decoration: underline; }

.walk-card-area {
  margin: 4px 0 var(--sp-2);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
  color: var(--ink-400);
}

.walk-card-tag {
  margin: 0;
  font-size: var(--fs-sm);
  color: var(--ink-600);
  line-height: 1.55;
}

.walk-card-meta {
  margin: var(--sp-3) 0 0;
  font-size: var(--fs-xs);
  color: var(--ink-400);
  font-variant-numeric: tabular-nums;
}

@media (min-width: 720px) {
  .walk-cards { grid-template-columns: 1fr 1fr; }
}

/* ─────────────────────────────────────────────────────────────────────────
   The A–Z directory — /blue-plaques/

   About 1,000 rows, so each one is a compact line rather than a card: name,
   then category · address, with a small "Show on map" beside it. The search
   and category controls ship hidden and js/directory.js reveals them; the
   A–Z bar and the list work without it.
   ───────────────────────────────────────────────────────────────────────── */

/* Several directory elements set their own display, which would otherwise
   beat the `hidden` attribute the filters toggle. */
.dir-main [hidden] { display: none !important; }

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

.dir-main a:focus-visible,
.dir-main button:focus-visible,
.dir-main input:focus-visible,
.dir-main select:focus-visible {
  outline: 3px solid var(--blue-400);
  outline-offset: 2px;
}

.dir-tools { margin-top: var(--sp-6); scroll-margin-top: var(--sp-4); }

.dir-controls {
  display: grid;
  gap: var(--sp-3);
  grid-template-columns: 1fr;
}

@media (min-width: 620px) {
  .dir-controls { grid-template-columns: 2fr 1fr; }
}

.dir-field label {
  display: block;
  margin-bottom: var(--sp-1);
  font-size: var(--fs-sm);
  font-weight: 650;
  color: var(--ink-800);
}

/* 16px text: anything smaller makes iOS Safari zoom the page on focus. */
.dir-field input,
.dir-field select {
  display: block;
  width: 100%;
  min-height: var(--tap);
  padding: 0 var(--sp-3);
  border: 1px solid var(--ink-200);
  border-radius: var(--r-md);
  background: var(--white);
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
}

.dir-field input::placeholder { color: var(--ink-400); }

/* A–Z wraps onto a few rows on a phone rather than scrolling sideways. */
.dir-az {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(32px, 1fr));
  gap: 4px;
  margin-top: var(--sp-4);
}

.dir-az a,
.dir-az span {
  display: flex; align-items: center; justify-content: center;
  min-height: 40px;
  border-radius: var(--r-sm);
  font-size: var(--fs-sm);
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

.dir-az a {
  background: var(--white);
  border: 1px solid var(--ink-100);
  color: var(--ink-800);
  text-decoration: none;
}

.dir-az a:hover { background: var(--ivory-2); }
.dir-az .dir-az-all { grid-column: span 2; }

.dir-az a[aria-current="true"] {
  background: var(--blue);
  border-color: var(--blue);
  color: var(--white);
}

/* A letter with nothing under it — in the data, or under the current filters. */
.dir-az .dir-az-off,
.dir-az a.is-off {
  background: transparent;
  border: 1px dashed var(--ink-200);
  color: var(--ink-400);
  opacity: .55;
  cursor: default;
}

/* Sits under the intro: says the list is our dataset, not the whole scheme. */
.dir-coverage {
  margin: calc(-1 * var(--sp-2)) 0 var(--sp-5);
  max-width: 60ch;
  font-size: var(--fs-sm);
  color: var(--ink-400);
}

.dir-hint {
  margin: var(--sp-2) 0 0;
  font-size: var(--fs-xs);
  color: var(--ink-400);
}

.dir-main .sp-share { margin-top: var(--sp-6); }

.dir-status {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: var(--sp-2);
  margin-top: var(--sp-4);
  min-height: var(--tap);
}

.dir-count {
  margin: 0;
  scroll-margin-top: var(--sp-3);
  font-weight: 650;
  color: var(--ink-600);
  font-variant-numeric: tabular-nums;
}

.dir-clear {
  min-height: 40px;
  padding: 0 var(--sp-4);
  border: 1px solid var(--ink-100);
  border-radius: var(--r-pill);
  background: var(--ivory-2);
  color: var(--ink-800);
  font: inherit;
  font-size: var(--fs-sm);
  font-weight: 600;
  cursor: pointer;
}

.dir-clear:hover { background: var(--ivory-3); }

.dir-empty {
  margin-top: var(--sp-4);
  padding: var(--sp-5);
  background: var(--white);
  border: 1px solid var(--ink-100);
  border-radius: var(--r-lg);
  text-align: center;
}

.dir-empty p { margin: 0 0 var(--sp-3); color: var(--ink-800); }

.dir-letter h2 {
  font-family: var(--font-serif);
  font-size: var(--fs-lg);
  margin: var(--sp-6) 0 var(--sp-1);
  scroll-margin-top: var(--sp-4);
}

.dir-letter { scroll-margin-top: var(--sp-4); }

.dir-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0 var(--sp-6);
}

@media (min-width: 720px) {
  .dir-list { grid-template-columns: 1fr 1fr; }
}

/* The map link sits to the right of the text, so a row stays two short lines. */
.dir-list li {
  position: relative;
  padding: var(--sp-2) 116px var(--sp-2) 0;
  min-height: 56px;
  border-top: 1px solid var(--ink-200);
}

.dir-list a.dir-name {
  font-weight: 600;
  text-decoration: none;
  line-height: 1.4;
}

.dir-list a.dir-name:hover { text-decoration: underline; }

.dir-dates {
  color: var(--ink-400);
  font-size: var(--fs-xs);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.dir-meta {
  display: block;
  margin-top: 1px;
  color: var(--ink-400);
  font-size: var(--fs-xs);
  line-height: 1.45;
}

.dir-list a.dir-map {
  position: absolute;
  right: 0; top: 50%;
  transform: translateY(-50%);
  display: inline-flex; align-items: center;
  min-height: 40px;
  padding: 0 var(--sp-3);
  border-radius: var(--r-pill);
  background: var(--blue-050);
  color: var(--blue-800);
  font-size: var(--fs-xs);
  font-weight: 650;
  text-decoration: none;
  white-space: nowrap;
}

.dir-list a.dir-map:hover { background: var(--blue-100); }

.dir-walks { margin: var(--sp-6) 0 0; }
