@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/ibm-plex-sans-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/ibm-plex-sans-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/ibm-plex-sans-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/ibm-plex-mono-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/ibm-plex-mono-latin-500-normal.woff2") format("woff2"); }

:root {
  color-scheme: dark;
  --ground: #101012;
  --page: #0a0a0b;
  --ink: #ece6d6;
  --ink-2: #bdb6a6;
  --muted: #87827a;
  --hairline: #2a2924;
  --panel: rgba(14, 14, 16, 0.94);
  --ring: rgba(253, 230, 138, 0.16);
  --on-ink: #0b0b0b;
  --axis: #34322d;
  --hatch-default: #5c5b57;
  --tint: rgba(236, 230, 214, 0.06);
  --accent: #fde68a;
  --backdrop: rgba(5, 5, 6, 0.6);
  /* stacking, lowest first; the map, the header and the timeline stay at 0, in page order */
  --z-unfold: 1;
  --z-panel: 2;
  --z-card: 3;
  --z-search: 4;
  --z-menu: 5;
  --font: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--page); color: var(--ink); font: 14px/1.45 var(--font); }
#map { position: fixed; inset: 0; background: var(--ground); }
.muted { color: var(--muted); }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.brand { position: fixed; top: 20px; left: 24px; max-width: 360px; pointer-events: none; }
.brand h1 { margin: 0; font-size: 56px; line-height: 1; font-weight: 600; letter-spacing: -0.02em; }
.brand p { margin: 8px 0 0; color: var(--ink-2); text-shadow: 0 1px 2px var(--page), 0 0 6px var(--page); }

/* the mode tabs: mono capitals; the selected one is gold */
.modes { position: fixed; top: 28px; left: 50%; transform: translateX(-50%); display: flex; gap: 4px; }
.modes button { border: 0; border-bottom: 1px solid transparent; background: none; padding: 6px 10px; cursor: pointer; color: var(--ink-2);
  font-family: var(--font-mono); font-size: 11px; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; text-shadow: 0 1px 2px var(--page), 0 0 6px var(--page); }
.modes button:hover { color: var(--ink); }
.modes button[aria-selected="true"] { color: var(--accent); border-bottom-color: var(--accent); }

.now { position: fixed; top: 16px; right: 24px; text-align: right; pointer-events: none; }
#now-year { font-family: var(--font-mono); font-size: 56px; line-height: 1; font-weight: 500; letter-spacing: -0.03em; }
#now-count { margin-top: 6px; color: var(--ink-2); font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.04em; text-shadow: 0 1px 2px var(--page), 0 0 6px var(--page); }

/* the legend: on a desktop it ends 16 px above the timeline footer (156 px) and scrolls inside when taller;
   the layer toggles stay pinned to its bottom edge, so they are on screen at any height, and the scroll padding
   keeps a row that takes keyboard focus clear of them (the pinned block is 63 px high, 82 px with a failed layer) */
.panel { position: fixed; top: 136px; left: 24px; z-index: var(--z-panel); width: 300px; max-height: calc(100vh - 308px); overflow-y: auto; scroll-padding-bottom: 88px; padding: 12px 14px 0; border-radius: 10px;
  background: var(--panel); box-shadow: 0 0 0 1px var(--ring); backdrop-filter: blur(6px); }
.panel h2 { margin: 0 0 8px; color: var(--accent); font-family: var(--font-mono); font-size: 10.5px; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; }
.panel .row { display: grid; grid-template-columns: 12px 1fr auto; column-gap: 10px; row-gap: 3px; align-items: center;
  width: 100%; padding: 3px 4px; border: 0; background: none; border-radius: 6px; text-align: left; cursor: pointer; }
.panel .row.static { cursor: default; }
.panel .row:hover { background: var(--tint); }
.panel .row.static:hover { background: none; }
.panel .row[aria-pressed="false"] { opacity: 0.35; }
.panel .sw { align-self: start; margin-top: 2px; width: 12px; height: 12px; border-radius: 3px; }
.panel .sw.hatch { --hatch: var(--hatch-default); background: repeating-linear-gradient(45deg, var(--hatch) 0 2px, transparent 2px 5px); box-shadow: inset 0 0 0 1px var(--hatch); }
.panel .lbl { font-size: 12px; line-height: 1.2; }
.panel .lbl small { display: block; margin-top: 1px; color: var(--muted); font-family: var(--font-mono); font-size: 9.5px; line-height: 1.25; letter-spacing: 0.04em; }
.panel .num { align-self: start; color: var(--ink-2); font-family: var(--font-mono); font-size: 11.5px; line-height: 1.25; }
.panel .bar { grid-column: 2 / 4; display: block; height: 2px; border-radius: 1px; }
.panel .icon { font-size: 11px; font-weight: 700; display: grid; place-items: center; color: var(--on-ink); }
.panel .note { margin: 8px 4px 0; color: var(--muted); font-size: 11.5px; line-height: 1.4; }
/* the layer toggles: pinned to the bottom of the panel while the rows above scroll under them */
.panel .layers { position: sticky; bottom: 0; margin: 10px -14px 0; padding: 8px 18px 12px; border-top: 1px solid var(--hairline); background: var(--panel); }
.panel .toggle { display: flex; align-items: center; gap: 8px; color: var(--ink-2); font-size: 13px; cursor: pointer; }
.panel .toggle + .toggle { margin-top: 4px; }
.panel .toggle .num { align-self: center; margin-left: auto; }
.panel input[type="checkbox"] { accent-color: var(--accent); }

.card { position: fixed; right: 24px; top: 128px; z-index: var(--z-card); width: 300px; max-height: calc(100vh - 144px); overflow-y: auto; padding: 14px 16px; border-radius: 10px;
  background: var(--panel); box-shadow: 0 0 0 1px var(--ring); backdrop-filter: blur(6px); }
.card h3 { margin: 0; font-size: 16px; line-height: 1.3; font-weight: 600; overflow-wrap: anywhere; }
.card .addr { color: var(--ink-2); margin-top: 2px; }
.card .year { margin-top: 10px; font-family: var(--font-mono); font-size: 40px; line-height: 1.1; font-weight: 500; letter-spacing: -0.02em; }
.card .era { display: flex; align-items: center; gap: 8px; color: var(--ink-2); }
.card .era i { width: 10px; height: 10px; border-radius: 2px; display: inline-block; }
.card dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin: 12px 0 0; padding-top: 10px; border-top: 1px solid var(--hairline); }
.card dt { color: var(--muted); font-family: var(--font-mono); font-size: 10.5px; line-height: 1.9; letter-spacing: 0.12em; text-transform: uppercase; }
.card dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.card .flag { margin-top: 10px; padding: 8px 10px; border-radius: 6px; background: var(--tint); color: var(--ink-2); font-size: 13px; }
.card a { color: var(--ink); text-decoration-color: var(--muted); text-underline-offset: 2px; }
.card .close { position: absolute; top: 8px; right: 10px; border: 0; background: none; color: var(--muted); cursor: pointer; font-size: 18px; }
.card .street-link { display: block; margin-top: 12px; padding: 0; border: 0; background: none; color: var(--accent); cursor: pointer; text-align: left;
  text-decoration: underline; text-decoration-color: var(--ring); text-underline-offset: 3px; }
.card .street-link:hover { text-decoration-color: var(--accent); }
.card:not(.pinned) .street-link { color: var(--muted); text-decoration: none; }  /* a hover card takes no pointer: the offer only says the street is there */
/* a hover card must not take the pointer: the canvas would see the pointer leave and end the hover the card shows */
.card:not(.pinned) { pointer-events: none; }
.card:not(.pinned) .close { display: none; }  /* it could not be clicked anyway */

/* the timeline: full width over a gradient; only its controls take the pointer */
.timeline { position: fixed; left: 0; right: 0; bottom: 0; height: 156px; padding: 0 24px 18px; display: flex; align-items: flex-end; gap: 18px;
  background: linear-gradient(to top, var(--page) 30%, transparent); pointer-events: none; }
.timeline > * { pointer-events: auto; }
.play { flex: none; width: 52px; height: 52px; margin-bottom: 26px; border-radius: 50%; border: 0; background: var(--ink); color: var(--on-ink); cursor: pointer; display: grid; place-items: center; }
.play[data-playing="true"] { background: var(--accent); }
.chart { position: relative; flex: 1; height: 120px; }
#hist { position: absolute; left: 0; right: 0; top: 0; width: 100%; height: 96px; cursor: ew-resize; touch-action: none; }
.axis { position: absolute; left: 0; right: 0; bottom: 0; height: 20px; border-top: 1px solid var(--axis); color: var(--muted); font-family: var(--font-mono); font-size: 11px; }
.axis span { position: absolute; top: 5px; transform: translateX(-50%); }
/* the data credit sits under the axis, so it is on screen whatever the legend does */
.credit { position: absolute; right: 24px; bottom: 3px; margin: 0; color: var(--muted); font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.02em; }
.credit a { color: var(--ink-2); text-decoration: underline; text-decoration-color: var(--muted); text-underline-offset: 2px; }

.hint { position: fixed; right: 24px; top: 108px; margin: 0; color: var(--muted); font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.04em; pointer-events: none;
  text-shadow: 0 1px 2px var(--page), 0 0 6px var(--page); }
/* dragging, right-dragging and scrolling are mouse words: on a touch screen the line means nothing */
@media (hover: none) { .hint { display: none; } }

.about-open { pointer-events: auto; padding: 0; border: 0; background: none; color: var(--ink); cursor: pointer; white-space: nowrap; text-shadow: inherit;
  text-decoration: underline; text-decoration-color: var(--ring); text-underline-offset: 3px; }
.about-open:hover { text-decoration-color: var(--accent); }
.about-open:disabled { cursor: default; }

.about { width: min(560px, calc(100vw - 48px)); max-height: calc(100vh - 96px); padding: 22px 26px 24px; border: 0; border-radius: 12px;
  background: var(--page); color: var(--ink); box-shadow: 0 0 0 1px var(--ring); }
.about::backdrop { background: var(--backdrop); }
.about h2 { margin: 0 0 12px; color: var(--accent); font-family: var(--font-mono); font-size: 11px; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; }
.about h2:focus { outline: none; }  /* the page focuses the title on open, not the reader: the open dialog shows where focus is */
.about h3 { margin: 18px 0 6px; font-size: 14px; line-height: 1.3; font-weight: 600; }
.about p, .about li { color: var(--ink-2); }
.about ul { margin: 0; padding-left: 18px; }
.about li + li { margin-top: 4px; }
.about a { color: var(--ink); }
.about .close { position: absolute; top: 10px; right: 12px; border: 0; background: none; color: var(--muted); cursor: pointer; font-size: 20px; }

.legend-toggle { display: none; }

/* search: under the mode tabs; the results open below the field */
.search { position: fixed; top: 64px; left: 50%; z-index: var(--z-search); width: 320px; transform: translateX(-50%); }
.search input { width: 100%; padding: 8px 14px; border: 0; border-radius: 999px; background: var(--panel); box-shadow: 0 0 0 1px var(--ring); color: var(--ink); font: 13px/1.3 var(--font); }
.search input::placeholder { color: var(--muted); }
.search input:disabled { opacity: 0.6; }
.search-results { max-height: 360px; margin: 6px 0 0; padding: 4px; overflow-y: auto; list-style: none; border-radius: 10px; background: var(--panel); box-shadow: 0 0 0 1px var(--ring); }
.search-results[hidden] { display: none; }
.search-results li { padding: 6px 10px; border-radius: 6px; cursor: pointer; }
.search-results li[aria-selected="true"], .search-results li:hover { background: var(--tint); }
.search-results .lbl { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search-results small { display: block; color: var(--muted); font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.04em; }
/* a window under 1100 px wide: the centred field would run over the line under the title, so it heads the legend's column */
@media (min-width: 761px) and (max-width: 1100px) and (min-height: 501px) {
  .search { top: 136px; left: 24px; width: 300px; transform: none; }
  .panel { top: 180px; max-height: calc(100vh - 352px); }
}

/* tours: the Tours button sits with the mode tabs, its menu drops under them */
.tours-open { margin-left: 10px; }
.tours-open[aria-expanded="true"] { color: var(--accent); }
.tours { position: fixed; top: 62px; left: 50%; z-index: var(--z-menu); width: 320px; margin: 0; padding: 4px; list-style: none; transform: translateX(-50%);
  border-radius: 10px; background: var(--panel); box-shadow: 0 0 0 1px var(--ring); }
.tours[hidden] { display: none; }
.tours button { display: block; width: 100%; padding: 10px 12px; border: 0; border-radius: 6px; background: none; color: var(--ink); text-align: left; cursor: pointer; }
.tours button:hover { background: var(--tint); }
.tours b { display: block; font-size: 14px; font-weight: 600; }
.tours span { display: block; margin-top: 3px; color: var(--ink-2); font-size: 12px; line-height: 1.35; }
.tours small { display: block; margin-top: 6px; color: var(--muted); font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.04em; }
.tours .empty { padding: 10px 12px; color: var(--muted); }

/* the tour card: in the legend's column on a desktop (the legend hides during a tour), 16 px above the timeline */
.tour { position: fixed; left: 24px; bottom: 172px; z-index: var(--z-card); width: 300px; padding: 14px 16px 12px; border-radius: 10px;
  background: var(--panel); box-shadow: 0 0 0 1px var(--ring); }
.tour[hidden] { display: none; }
.tour-step { margin: 0 0 6px; color: var(--accent); font-family: var(--font-mono); font-size: 10.5px; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; }
.tour h2 { margin: 0; font-size: 18px; line-height: 1.25; font-weight: 600; }
.tour-text { margin: 8px 0 0; color: var(--ink-2); font-size: 13px; line-height: 1.45; }
.tour-figures { display: flex; gap: 16px; margin-top: 12px; }
.tour-figure { flex: 1; min-width: 0; }
.tour-figure b { display: block; font-family: var(--font-mono); font-size: 28px; font-weight: 500; line-height: 1; letter-spacing: -0.02em; }
.tour-figure span { display: block; margin-top: 4px; color: var(--muted); font-size: 11px; line-height: 1.3; }
.tour-source { margin: 10px 0 0; color: var(--muted); font-size: 10.5px; line-height: 1.35; }
.tour-nav { display: flex; align-items: center; gap: 6px; margin-top: 12px; }
.tour-nav button { min-width: 34px; height: 34px; padding: 0 12px; border: 0; border-radius: 999px; background: var(--tint); color: var(--ink); cursor: pointer; font-size: 17px; line-height: 1; }
.tour-nav button:disabled { opacity: 0.35; cursor: default; }
.tour-nav .tour-next:not(:disabled) { background: var(--accent); color: var(--page); }
.tour-nav .tour-back { font-size: 12px; }
.tour-nav .tour-close { margin-left: auto; background: none; color: var(--ink-2); }
/* a callout: a label on a short leader, its foot (a dot) on the middle of the building's roof; tour.js moves it
   every frame by a transform to the roof's point, and the element's own box hangs above that point */
.callout { position: absolute; top: 0; left: 0; display: flex; flex-direction: column; align-items: center; width: 0; pointer-events: none; }
.callout[hidden] { display: none; }
.callout span { position: absolute; bottom: calc(30px + var(--lift, 0px)); padding: 3px 7px; border-radius: 4px; background: var(--page); box-shadow: 0 0 0 1px var(--ring);
  color: var(--ink); font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.02em; white-space: nowrap; }
.callout i { position: absolute; bottom: 2px; width: 1px; height: calc(28px + var(--lift, 0px)); background: var(--accent); }
.callout b { position: absolute; bottom: -2px; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }

/* the Capitol views' names at their viewpoints (ui/views.js): a dot on the viewpoint, the name to its right */
.view-labels { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.view-labels[hidden], .view-label[hidden] { display: none; }
.view-label { position: absolute; top: 0; left: 0; width: 0; height: 0; }
.view-label b { position: absolute; left: -3px; top: -3px; width: 6px; height: 6px; border-radius: 50%; background: var(--ink); box-shadow: 0 0 0 2px var(--page); }
.view-label span { position: absolute; left: 8px; top: -8px; color: var(--ink); font-family: var(--font-mono); font-size: 11px; line-height: 16px; letter-spacing: 0.02em;
  white-space: nowrap; text-shadow: 0 0 3px var(--page), 0 0 3px var(--page), 0 0 6px var(--page); }
.view-label em { color: var(--muted); font-style: normal; }

/* the side-by-side view of a street: over the darkened map, right of the legend, 16 px above the timeline */
.dim { position: fixed; inset: 0; background: var(--backdrop); }
.unfold { position: fixed; top: 136px; left: 340px; right: 24px; bottom: 172px; z-index: var(--z-unfold); display: flex; flex-direction: column;
  border-radius: 10px; background: var(--panel); box-shadow: 0 0 0 1px var(--ring); }
.unfold[hidden] { display: none; }
.unfold-head { display: flex; align-items: baseline; gap: 12px; padding: 12px 14px 6px; }
.unfold-head h2 { margin: 0; font-size: 18px; line-height: 1.2; font-weight: 600; }
.unfold-sub { margin: 0; color: var(--ink-2); font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.04em; }
/* the way out comes first in the head: a pinned card (300 px at the right) reaches over the rest of it on a narrow window */
.unfold-close { order: -1; margin-left: 0; padding: 4px 0; border: 0; background: none; color: var(--accent); cursor: pointer; font-size: 12px; white-space: nowrap;
  text-decoration: underline; text-decoration-color: var(--ring); text-underline-offset: 3px; }
.unfold-close:hover { text-decoration-color: var(--accent); }
.unfold-view { position: relative; flex: 1; min-height: 0; overflow: hidden; cursor: grab; touch-action: none; }
.unfold-view:active { cursor: grabbing; }
.unfold-view:focus-visible { outline-offset: -2px; }
.unfold-svg { position: relative; display: block; }
/* the lit buildings under the SVG (view/elevation.js); the SVG keeps names, ticks and hit areas over them */
.unfold-gl { position: absolute; top: 0; left: 0; pointer-events: none; }
.unfold-svg.solid rect, .unfold-svg.solid rect.later { fill: transparent; stroke: none; }
.unfold-svg.solid rect.hover, .unfold-svg.solid rect.picked { stroke: var(--accent); stroke-width: 2px; stroke-dasharray: none; }
.unfold-svg.solid .terminus { display: none; }
/* a thin cut between neighbours; the width does not grow with the zoom */
.unfold rect { stroke: var(--ground); stroke-width: 0.5px; vector-effect: non-scaling-stroke; }
.unfold rect.later { fill: none; stroke: var(--muted); stroke-dasharray: 2 2; }  /* not standing in the chosen year, or its period is off */
.unfold .terminus { stroke: var(--ground); stroke-width: 0.5px; vector-effect: non-scaling-stroke; }  /* the Capitol at the head of Congress Avenue */
.unfold .terminus.later { fill: none; stroke: var(--muted); stroke-dasharray: 2 2; }
.unfold .terminus-label { text-anchor: middle; }
.unfold rect.hover, .unfold rect.picked { stroke: var(--accent); stroke-width: 2px; stroke-dasharray: none; }
.unfold .tick { fill: var(--muted); font-family: var(--font-mono); font-size: 10px; text-anchor: middle; dominant-baseline: middle; }
.unfold .side { fill: var(--muted); font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.12em; paint-order: stroke; stroke: var(--panel); stroke-width: 3px; }
.unfold .label { fill: var(--ink); font-size: 11px; paint-order: stroke; stroke: var(--page); stroke-width: 3px; stroke-linejoin: round; pointer-events: none; }
.unfold-tip { position: absolute; max-width: 300px; padding: 6px 8px; border-radius: 6px; background: var(--page); box-shadow: 0 0 0 1px var(--ring);
  color: var(--ink); font-size: 12px; line-height: 1.35; pointer-events: none; }

/* phone: title and year on top; legend button and tabs in a row above the timeline;
   the legend opens as a sheet above that row, a building's card as a sheet over the bottom.
   A phone on its side (under 500 px high) gets the same layout: the desktop one runs off a screen that short */
@media (max-width: 760px), (max-height: 500px) {
  .brand { left: 16px; top: 12px; max-width: calc(100vw - 168px); }
  .brand h1 { font-size: 32px; }
  .brand p { margin-top: 6px; font-size: 12px; line-height: 1.35; }
  .now { right: 16px; top: 12px; }
  #now-year { font-size: 32px; }
  #now-count { font-size: 11px; }
  .hint { display: none; }

  .timeline { height: 124px; padding: 0 12px 16px; gap: 10px; }
  .play { width: 44px; height: 44px; margin-bottom: 24px; }
  .chart { height: 96px; }
  #hist { height: 72px; }
  .credit { right: 12px; bottom: 2px; font-size: 9px; }

  .legend-toggle { display: block; position: fixed; left: 12px; bottom: 128px; padding: 7px 12px; border: 0; border-radius: 999px;
    background: var(--panel); box-shadow: 0 0 0 1px var(--ring); color: var(--ink); cursor: pointer;
    font-family: var(--font-mono); font-size: 11px; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; }
  .legend-toggle[aria-expanded="true"] { color: var(--accent); }
  .modes { top: auto; bottom: 128px; left: auto; right: 12px; transform: none; gap: 0; }
  .modes button { padding: 7px 8px; }

  .panel { display: none; top: auto; left: 0; right: 0; bottom: 166px; width: auto; max-height: min(52vh, calc(100vh - 182px)); overflow-y: auto; border-radius: 12px 12px 0 0; }
  .panel.open { display: block; }

  .card { left: 0; right: 0; top: auto; bottom: 0; width: auto; max-height: 62vh; overflow-y: auto; padding: 16px 18px 20px; border-radius: 14px 14px 0 0; }
  /* the × takes no room in the flow (the margins cancel its height), sits 2 px from the card's top and right edges
     (the card has 16 px and 18 px of padding there) and sticks to that spot while the card scrolls: a sticky offset
     is measured from the inside of the padding, hence -14px */
  .card .close { position: sticky; top: -14px; right: auto; display: block; width: 44px; height: 44px; margin: -14px -16px -30px auto; outline-offset: -4px; }  /* the ring would be clipped at the card edge */
  .card h3 { padding-right: 30px; }  /* the × (44 px) sits over the end of a long name */

  .search { top: 108px; left: 12px; right: 12px; z-index: auto; width: auto; transform: none; }  /* under the street view, which covers the top */
  .search input { font-size: 16px; }  /* iOS zooms the page into a field set smaller than 16 px */
  .search:has(.search-results:not([hidden])) { z-index: var(--z-search); }  /* open results run over the tabs and the timeline: a phone on its side has no room above them */
  .search-results { max-height: min(360px, calc(100vh - 170px)); }

  /* the view covers the screen down to the row of the legend button: the legend opens over it, the timeline stays */
  .unfold { top: 0; left: 0; right: 0; bottom: 166px; border-radius: 0 0 12px 12px; background: var(--page); }
  .unfold-head { flex-wrap: wrap; row-gap: 2px; padding: 10px 12px 4px; }
  .unfold-head h2 { font-size: 16px; }
  .unfold-close { order: -1; flex-basis: 100%; text-align: right; }

  .about { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0; padding: 18px 18px 28px; border-radius: 0; }
  .about .close { position: fixed; top: 4px; right: 4px; width: 44px; height: 44px; border-radius: 50%; background: var(--page); }  /* the only way out: it stays on screen while the text scrolls */
}

/* phone: the tour card is a sheet over the timeline, where the legend button and the tabs were */
@media (max-width: 760px), (max-height: 500px) {
  .tour { left: 0; right: 0; bottom: 124px; width: auto; max-height: 46vh; overflow-y: auto; padding: 12px 16px; border-radius: 12px 12px 0 0; }
  .tours { top: auto; bottom: 170px; left: auto; right: 12px; width: min(320px, calc(100vw - 24px)); transform: none; }
  /* the card names the tour; the map's own title would sit on the skyline a scene looks at */
  .touring .brand { display: none; }
}

/* during a tour the card speaks: the legend, the tabs and the search step aside; the year and the timeline stay */
.touring .panel, .touring .panel.open, .touring .modes, .touring .legend-toggle, .touring .search, .touring .hint { display: none; }
