@import url("https://fonts.googleapis.com/css2?family=Sorts+Mill+Goudy:ital@0;1&display=swap");
/* Exploring the Soul of London */
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; }
img { max-width: 100%; }
[hidden] { display: none !important; }
:root { padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); }
/* Layout: the page is a walker's annotated map. Buff paper the colour of London stock brick, soot-black print, and the author's notes in fountain-pen blue. One typeface throughout, as in an old guidebook. */
:root {
  --paper: #E2D8C2;
  --paper-2: #D8CDB2;
  --plate: #ECE5D4;
  --ink: #26221D;
  --muted: #615749;
  --rule: #B9AA8B;
  --red: #1F3C74;
  --red-wash: rgba(31, 60, 116, 0.11);
  --water: #9CB0AB;
  --water-edge: #889E99;
  --park: #C3C59E;
  --grid: rgba(38, 34, 29, 0.08);
  --on-red: #F1EBDD;
  --face: "Sorts Mill Goudy", "Goudy Old Style", "Iowan Old Style", Georgia, serif;
  --display: var(--face); --body: var(--face); --mono: var(--face);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #1B1916; --paper-2: #23201B; --plate: #26231E; --ink: #E8DFCB; --muted: #A69C8A; --rule: #3D372E;
    --red: #97B1E4; --red-wash: rgba(151, 177, 228, 0.15); --water: #2E3E40; --water-edge: #3A4C4E; --park: #2C3123;
    --grid: rgba(232, 223, 203, 0.06); --on-red: #1B1916;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #1B1916; --paper-2: #23201B; --plate: #26231E; --ink: #E8DFCB; --muted: #A69C8A; --rule: #3D372E;
  --red: #97B1E4; --red-wash: rgba(151, 177, 228, 0.15); --water: #2E3E40; --water-edge: #3A4C4E; --park: #2C3123;
  --grid: rgba(232, 223, 203, 0.06); --on-red: #1B1916;
  color-scheme: dark;
}
* { box-sizing: border-box; }
body {
  background: var(--paper); color: var(--ink);
  font-family: var(--face); font-size: 18px; line-height: 1.62;
  font-variant-numeric: oldstyle-nums;
  -webkit-font-smoothing: antialiased;
}
.wrap {
  max-width: 1220px; margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
a { color: inherit; text-decoration-color: var(--rule); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--red); text-decoration-color: var(--red); }
a:focus-visible, button:focus-visible, [tabindex]:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }
.sc { font-variant: small-caps; letter-spacing: 0.06em; }

/* Masthead */
.mast { padding-block: 36px 8px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px 40px; align-items: end; }
@media (max-width: 700px) { .mast { grid-template-columns: 1fr; } }
.mast h1 span { margin: 0 0 6px; font-style: italic; font-size: 19px; color: var(--muted); }
.mast h1 { margin: 0; font-weight: 400; font-size: clamp(42px, 7.4vw, 92px); line-height: 0.96; letter-spacing: -0.015em; text-wrap: balance; }
.mast nav { display: flex; flex-wrap: wrap; gap: 6px 22px; font-style: italic; font-size: 18px; padding-bottom: 10px; }
.mast nav a { text-decoration: none; color: var(--muted); }
.mast nav a:hover { color: var(--red); }

.thesis { padding-block: 20px 28px; max-width: 38rem; }
.thesis p { margin: 0; font-size: clamp(20px, 2.2vw, 24px); line-height: 1.42; text-wrap: pretty; }

/* Map + notes */
.atlas { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); gap: 28px 36px; padding-bottom: 48px; align-items: start; }
@media (max-width: 900px) { .atlas { grid-template-columns: 1fr; } }

.mapbox { min-width: 0; border: 1.5px solid var(--ink); padding: 5px; background: var(--paper-2); }
.mapframe { border: 1px solid var(--rule); }
.maptools { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; justify-content: space-between; padding: 8px 12px; border-bottom: 1px solid var(--rule); font-size: 16px; color: var(--muted); }
.maptools .sheet { font-style: italic; }
.toggle { font: inherit; font-size: 16px; color: var(--ink); background: none; border: 0; padding: 4px 0; cursor: pointer; display: inline-flex; gap: 9px; align-items: center; }
.toggle .dot { width: 14px; height: 14px; border: 1.5px solid var(--ink); display: grid; place-items: center; }
.toggle[aria-pressed="true"] .dot::after { content: ""; width: 7px; height: 7px; background: var(--red); }
.toggle:hover { color: var(--red); }
.scroller { overflow-x: auto; -webkit-overflow-scrolling: touch; }
#map { display: block; width: 100%; min-width: 720px; height: auto; }
.mapnote { padding: 7px 12px; font-size: 14.5px; font-style: italic; color: var(--muted); border-top: 1px solid var(--rule); display: flex; flex-wrap: wrap; gap: 4px 18px; justify-content: space-between; }

/* SVG */
.grid line { stroke: var(--grid); stroke-width: 1; }
.park { fill: var(--park); }
.thames-edge { fill: none; stroke: var(--water-edge); stroke-width: 26; stroke-linecap: round; stroke-linejoin: round; }
.thames { fill: none; stroke: var(--water); stroke-width: 22; stroke-linecap: round; stroke-linejoin: round; }
.district { font-family: var(--face); font-size: 15px; font-variant: small-caps; letter-spacing: 0.14em; fill: var(--muted); }
.river-label { font-family: var(--face); font-style: italic; font-size: 17px; fill: var(--muted); letter-spacing: 0.06em; }
.patch { fill: transparent; stroke-dasharray: none; stroke: var(--red); stroke-width: 1.6; opacity: 0.5; transition: fill .3s, opacity .3s; }
.pin { cursor: pointer; }
.pin .core { fill: var(--red); stroke: var(--paper-2); stroke-width: 2.5; }
.pin .tag { font-family: var(--face); font-style: italic; font-size: 17px; fill: var(--ink); paint-order: stroke; stroke: var(--paper-2); stroke-width: 5px; stroke-linejoin: round; }
.pin.active .patch { fill: var(--red-wash); opacity: 1; stroke-width: 2.4; }
.pin.active .tag { fill: var(--red); }
.pin:hover .patch { opacity: 1; }
.pin:focus { outline: none; }
.pin:focus-visible .core { stroke: var(--ink); }
.extra circle { fill: var(--paper-2); stroke: var(--red); stroke-width: 2; }
.extra text { font-family: var(--face); font-style: italic; font-size: 14px; fill: var(--muted); paint-order: stroke; stroke: var(--paper-2); stroke-width: 4px; }
.homes path { fill: none; stroke: var(--ink); stroke-width: 1.4; stroke-dasharray: 1 6; stroke-linecap: round; }
.homes circle { fill: var(--paper-2); stroke: var(--ink); stroke-width: 1.4; }
.homes text { font-family: var(--face); font-size: 14px; fill: var(--ink); }
.homes .num { font-size: 12px; text-anchor: middle; dominant-baseline: central; font-variant-numeric: lining-nums; }
.homes .lbl { font-style: italic; paint-order: stroke; stroke: var(--paper-2); stroke-width: 4px; }
.scalebar line { stroke: var(--ink); stroke-width: 2; }
.scalebar text { font-family: var(--face); font-size: 15px; fill: var(--ink); }

/* Notes beside the map */
.panel { min-width: 0; display: grid; gap: 14px; padding-top: 4px; }
.story h2 { margin: 0 0 6px; font-weight: 400; font-size: clamp(26px, 2.6vw, 32px); line-height: 1.15; text-wrap: balance; }
.story .meta { font-size: 15px; color: var(--muted); margin-bottom: 14px; display: flex; flex-wrap: wrap; gap: 2px 14px; }
.story .dek { font-style: italic; margin: 0 0 12px; font-size: 19px; }
.story p { margin: 0 0 14px; max-width: 64ch; }
.fieldnotes { display: grid; margin: 6px 0 18px; padding: 0; list-style: none; }
.fieldnotes li { display: grid; grid-template-columns: 5.5em minmax(0, 1fr); gap: 14px; padding: 9px 0; border-top: 1px solid var(--rule); }
.fieldnotes li:last-child { border-bottom: 1px solid var(--rule); }
.fieldnotes .k { font-style: italic; color: var(--red); }
.fieldnotes .v { font-size: 17px; line-height: 1.5; min-width: 0; }
.read { display: inline-block; font-size: 18px; text-decoration: none; background: var(--red); color: var(--on-red); padding: 9px 18px 10px; }
.read:hover { background: var(--ink); color: var(--paper); }
.ghost { font-size: 18px; font-style: italic; }
.actions { display: flex; flex-wrap: wrap; gap: 12px 22px; align-items: center; }
.source { font-size: 15px; font-style: italic; color: var(--muted); margin-top: 14px !important; }

/* Sections */
section.band { border-top: 1.5px solid var(--ink); padding-block: 36px 44px; }
.band h3, .s-block h3 { margin: 0 0 4px; font-weight: 400; font-size: clamp(28px, 3vw, 36px); line-height: 1.15; text-wrap: balance; }
.band .lede, .s-block .lede { margin: 0 0 26px; font-style: italic; font-size: clamp(19px, 2vw, 22px); line-height: 1.4; color: var(--muted); max-width: 38rem; text-wrap: balance; }

.two { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 44px; }
.two p { margin: 0 0 14px; max-width: 60ch; }
.homes-list { list-style: none; padding: 0; margin: 0; }
.homes-list li { display: grid; grid-template-columns: 2em minmax(0, 1fr); padding: 7px 0; border-bottom: 1px solid var(--rule); font-size: 17px; }
.homes-list .n { color: var(--red); font-style: italic; }
.email { font-style: italic; font-size: 19px; color: var(--red); user-select: all; word-break: break-all; }

.shelf { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 0 40px; }
.shelf li { padding: 13px 0; border-bottom: 1px solid var(--rule); }
.shelf .bk { font-style: italic; font-size: 20px; }
.shelf .au { color: var(--muted); }
.shelf .au::before { content: ", "; }
.shelf .why { font-size: 16.5px; display: block; margin-top: 3px; color: var(--muted); }

footer { border-top: 1.5px solid var(--ink); padding-block: 28px 18px; display: flex; flex-wrap: wrap; gap: 14px 32px; justify-content: space-between; align-items: center; }
footer .sig { font-style: italic; font-size: 19px; }
footer .sig span { display: block; font-size: 15.5px; color: var(--muted); }
.proto { font-size: 14.5px; font-style: italic; color: var(--muted); max-width: 62ch; padding-bottom: 36px; margin: 0; }

/* Story page */
.crumb { display: inline-block; margin-top: 26px; font-style: italic; font-size: 17px; color: var(--muted); text-decoration: none; }
.crumb:hover { color: var(--red); }
.s-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 300px); gap: 24px 48px; align-items: end; padding-block: 14px 30px; border-bottom: 1.5px solid var(--ink); }
@media (max-width: 820px) { .s-head { grid-template-columns: 1fr; } }
.s-head h2 { margin: 0 0 12px; font-weight: 400; font-size: clamp(38px, 5.6vw, 66px); line-height: 1.02; letter-spacing: -0.01em; text-wrap: balance; }
.s-head .dek { margin: 0 0 12px; font-style: italic; font-size: clamp(19px, 2vw, 22px); color: var(--muted); max-width: 40rem; }
.s-head .by { font-size: 16px; color: var(--muted); }
.s-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 340px); gap: 40px 48px; padding-block: 34px; }
@media (max-width: 820px) { .s-body { grid-template-columns: 1fr; } }
.opening p { font-size: clamp(19px, 1.9vw, 21px); line-height: 1.72; margin: 0 0 18px; max-width: 62ch; }
.opening p:first-child::first-letter { float: left; font-size: 3.6em; line-height: 0.82; padding: 7px 10px 0 0; color: var(--red); }
.fade { position: relative; }
.fade::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 80px; background: linear-gradient(to bottom, transparent, var(--paper)); pointer-events: none; }
.cont { margin: 6px 0 0; display: grid; gap: 12px; justify-items: start; }
.cont .note { font-size: 16px; font-style: italic; color: var(--muted); margin: 0; }
.side { display: grid; gap: 22px; align-content: start; min-width: 0; }
.locator { border: 1.5px solid var(--ink); padding: 4px; background: var(--paper-2); }
.locator > svg { display: block; width: 100%; height: auto; border: 1px solid var(--rule); }
.locator .cap { padding: 7px 6px 3px; font-size: 14.5px; font-style: italic; color: var(--muted); }
.street-line { fill: none; stroke: var(--plate); stroke-width: 9; stroke-linecap: round; }
.street-edge { fill: none; stroke: var(--rule); stroke-width: 11; stroke-linecap: round; }
.street-name { font-family: var(--face); font-size: 17px; font-variant: small-caps; letter-spacing: 0.1em; fill: var(--muted); }
.route { fill: none; stroke: var(--red); stroke-width: 3; stroke-dasharray: 1 7; stroke-linecap: round; }
.stop circle { fill: var(--red); stroke: var(--paper-2); stroke-width: 2; }
.stop text { font-family: var(--face); font-size: 18px; fill: var(--on-red); text-anchor: middle; dominant-baseline: central; font-variant-numeric: lining-nums; }
.s-block { border-top: 1px solid var(--rule); padding-block: 34px; }
.timeline { overflow-x: auto; }
.timeline svg { display: block; width: 100%; min-width: 640px; height: auto; }
.tl-axis { stroke: var(--ink); stroke-width: 1.5; }
.tl-tick { stroke: var(--muted); stroke-width: 1; }
.tl-year { font-family: var(--face); font-size: 14px; font-style: italic; fill: var(--muted); }
.tl-band { fill: var(--red); }
.tl-name { font-family: var(--face); font-size: 16px; fill: var(--ink); }
.tl-date { font-family: var(--face); font-size: 15px; fill: var(--red); }
.walk { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 0 40px; }
.walk li { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--rule); }
.walk .n { width: 26px; height: 26px; border-radius: 50%; background: var(--red); color: var(--on-red); font-size: 15px; display: grid; place-items: center; margin-top: 2px; font-variant-numeric: lining-nums; }
.walk .nm { display: block; font-size: 19px; }
.walk .ds { font-size: 16.5px; display: block; margin-top: 2px; color: var(--muted); }
.walkmeta { font-size: 15.5px; font-style: italic; color: var(--muted); margin: -14px 0 18px; }
.listen { display: grid; grid-template-columns: 50px minmax(0, 1fr); gap: 16px; align-items: center; max-width: 560px; }
.listen .play { width: 50px; height: 50px; border-radius: 50%; border: 1.5px dashed var(--muted); display: grid; place-items: center; color: var(--muted); font-size: 15px; }
.listen .t { display: block; font-size: 19px; }
.listen .s { font-size: 15.5px; font-style: italic; color: var(--muted); }
.reading { list-style: none; padding: 0; margin: 0; max-width: 46rem; }
.reading li { padding: 11px 0; border-bottom: 1px solid var(--rule); font-size: 17.5px; }
.reading .w { color: var(--muted); font-size: 16px; display: block; font-style: italic; }
.nearby { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); gap: 22px 32px; }
.nearby a { text-decoration: none; display: grid; gap: 4px; align-content: start; padding-top: 12px; border-top: 1px solid var(--rule); }
.nearby .t { font-size: 19px; }
.nearby .dist { font-size: 15px; font-style: italic; color: var(--muted); }
.nearby a:hover .t { color: var(--red); }

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

/* Live-page markup */
.mast h1 span { display: block; font-size: 19px; line-height: 1.4; font-style: italic; color: var(--muted); letter-spacing: 0; }
.mast { border-bottom: 0; }
.thesis p em { font-style: normal; color: inherit; }

/* Street names: set as a guidebook entry, not a sign */
.plate { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 8px; margin: 0; color: var(--muted); font-size: 18px; }
.plate .street { order: 1; flex: 1 0 100%; font-style: italic; font-size: 1.5em; line-height: 1.1; color: var(--red); }
.plate .district-name { order: 2; }
.plate .pc { order: 3; font-variant: small-caps; text-transform: lowercase; letter-spacing: 0.06em; }
.plate .rule { display: none; }
.s-head .plate { padding-bottom: 6px; }

/* Story index: a contents list */
.index { display: grid; grid-template-columns: 1fr; max-width: 54rem; }
.card { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "t d" "p p"; gap: 2px 20px; padding: 14px 0; border-bottom: 1px solid var(--rule); text-align: left; background: none; border-left: 0; border-right: 0; border-top: 0; color: inherit; font: inherit; cursor: pointer; text-decoration: none; }
.index .card:first-child { border-top: 1px solid var(--rule); }
.card .t { grid-area: t; font-size: clamp(20px, 2.1vw, 24px); line-height: 1.25; }
.card .d { grid-area: d; font-size: 15px; font-style: italic; color: var(--muted); white-space: nowrap; padding-top: 6px; }
.card .plate { grid-area: p; font-size: 16px; }
.card .plate .street { flex: 0 0 auto; font-size: 1em; color: var(--muted); }
.card:hover .t { color: var(--red); }
@media (max-width: 520px) { .card { grid-template-columns: 1fr; grid-template-areas: "t" "p" "d"; } .card .d { padding-top: 0; } }

.nearby .plate { font-size: 15.5px; }
.nearby .plate .street { font-size: 1.35em; }
.nearby a .t { color: var(--ink); }

.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--paper); padding: 8px 12px; z-index: 20; }
.skip:focus { left: 16px; }
.pin-link { text-decoration: none; }
.mast h1 a { text-decoration: none; }
.mast h1 a:hover span { color: var(--red); }
.homes-on #homes { display: inline; }
a.card { text-decoration: none; }
.source { margin: 0 0 8px; }
.mast nav a { white-space: nowrap; }
.shelf a.bk { color: var(--ink); text-decoration-color: var(--rule); }
.shelf a.bk:hover { color: var(--red); text-decoration-color: var(--red); }
.shelf .au { display: inline; }

/* Then-and-now map */
.tn-map { width: 100%; aspect-ratio: 6 / 5; max-width: 100%; background: var(--paper-2); }
.tn-ready > svg { display: none; }
.tn-controls { display: none; grid-template-columns: auto minmax(0, 1fr) auto auto; gap: 10px; align-items: center; padding: 8px 6px 4px; font-size: 15px; font-style: italic; color: var(--muted); }
.tn-ready .tn-controls { display: grid; }
.tn-controls input { width: 100%; accent-color: var(--red); }
.tn-controls output { font-style: normal; color: var(--ink); min-width: 3.5em; text-align: right; }
.tn-stop { background: var(--red); color: var(--on-red); border: 2px solid var(--paper-2); border-radius: 50%; font-family: var(--face); font-size: 14px; display: grid !important; place-items: center; box-shadow: 0 1px 2px rgba(38, 34, 29, .35); }
.leaflet-container { font-family: var(--face); }
.leaflet-control-attribution { font-size: 11px; }

/* Story pages: a smaller running head so the story title leads */
body:has(.s-head) .mast { padding-block: 24px 4px; }
body:has(.s-head) .mast h1 { font-size: clamp(28px, 3.4vw, 40px); line-height: 1.05; }
body:has(.s-head) .mast h1 span { font-size: 16px; margin-bottom: 2px; }
.card .plate .street::after { content: ","; font-style: normal; }

/* Portrait beside the field notes */
.portrait { margin: 0; display: grid; gap: 6px; }
.portrait img { display: block; width: 100%; height: auto; border: 1.5px solid var(--ink); padding: 4px; background: var(--paper-2); }
.portrait figcaption { font-style: italic; font-size: 15.5px; color: var(--muted); }

/* Full story text on story pages */
.opening h3 { font-size: 1.12em; font-weight: normal; font-style: italic; margin: 32px 0 12px; max-width: 62ch;}
.opening a { color: inherit; text-decoration-color: var(--red); text-underline-offset: 3px;}
.opening a:hover { color: var(--red);}
.opening strong { font-weight: 600;}
.story + .cont { margin-top: 30px; padding-top: 24px; border-top: 1px solid var(--muted);}
.cont .note a { color: inherit; text-underline-offset: 3px;}
