:root {
  color-scheme: light;
  --paper: #f7f3e8;
  --paper-deep: #e8dfca;
  --paper-wash: rgba(222, 208, 179, .45);
  --ink: #1d1a16;
  --ink-2: #514b42;
  --muted: #8b8171;
  --hairline: rgba(29, 26, 22, .16);
  --vermilion: #a1432f;
  --indigo: #344b5e;
  --moss: #61705a;
  --ochre: #b07b37;
  --lift: rgba(255, 255, 255, .38);
  --shadow: 0 18px 70px rgba(49, 39, 23, .12), inset 0 0 0 1px rgba(255, 255, 255, .7);
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --mono: ui-monospace, "SFMono-Regular", Menlo, monospace;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #171815;
  --paper-deep: #24241f;
  --paper-wash: rgba(87, 79, 62, .22);
  --ink: #eee6d6;
  --ink-2: #bbb1a0;
  --muted: #867d6e;
  --hairline: rgba(238, 230, 214, .17);
  --vermilion: #d16c53;
  --indigo: #7890a1;
  --moss: #8b9e80;
  --ochre: #c99953;
  --lift: rgba(255, 255, 255, .04);
  --shadow: 0 18px 70px rgba(0, 0, 0, .42), inset 0 0 0 1px rgba(255, 255, 255, .04);
}

* { box-sizing: border-box; }
html, body { width: 100%; height: 100%; margin: 0; }
body {
  overflow: hidden;
  background:
    radial-gradient(circle at 20% 12%, var(--paper-wash), transparent 28%),
    radial-gradient(circle at 80% 76%, var(--paper-wash), transparent 26%),
    var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  -webkit-font-smoothing: antialiased;
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .11;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='90' height='90' viewBox='0 0 90 90'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.82' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.22'/%3E%3C/svg%3E");
}
button, select, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }

.topbar {
  position: fixed;
  z-index: 30;
  top: 20px;
  left: 24px;
  right: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
}
.topbar > * { pointer-events: auto; }
.segmented {
  position: relative;
  display: inline-flex;
  align-items: stretch;
  padding: 4px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--paper-deep) 78%, transparent);
  box-shadow: inset 0 1px 3px rgba(29, 26, 22, .12);
  backdrop-filter: blur(12px);
}
.segmented button {
  position: relative;
  z-index: 1;
  border: 0;
  border-radius: 999px;
  padding: 9px 15px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font: 9px/1 var(--mono);
  letter-spacing: .14em;
  text-transform: uppercase;
  white-space: nowrap;
}
.segmented button[aria-current="true"] { color: var(--ink); }
.seg-pill {
  position: absolute;
  z-index: 0;
  top: 4px;
  bottom: 4px;
  left: 0;
  width: 0;
  border-radius: 999px;
  background: var(--paper);
  box-shadow: 0 1px 4px rgba(29, 26, 22, .15), inset 0 0 0 1px rgba(255, 255, 255, .5);
  transition: transform 300ms cubic-bezier(.7, .05, .2, 1), width 300ms cubic-bezier(.7, .05, .2, 1);
}
.about-button {
  border: 0;
  padding: 10px 15px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  color: var(--ink-2);
  box-shadow: 0 1px 5px rgba(29, 26, 22, .12);
  cursor: pointer;
  font: 10px/1 var(--mono);
  letter-spacing: .16em;
}

.stage { position: fixed; inset: 0; display: flex; flex-direction: column; overflow: hidden; }
.masthead { position: relative; z-index: 5; flex: 0 0 auto; padding: 78px 24px 16px; text-align: center; }
.eyebrow {
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--ink-2);
  cursor: pointer;
  font: italic 15px/1.2 var(--serif);
  letter-spacing: .06em;
}
.masthead h1 {
  margin: 7px 0 0;
  font: 700 clamp(25px, 3.2vw, 42px)/.95 var(--serif);
  letter-spacing: .08em;
  text-transform: uppercase;
}
.masthead p { margin: 8px 0 0; color: var(--muted); font-size: 13px; font-style: italic; }
.views {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  transition: transform 480ms cubic-bezier(.7, .05, .2, 1);
}
.view { flex: 0 0 100%; min-width: 0; height: 100%; padding: 8px 42px 124px; overflow: auto; }
.collage-view { display: flex; overflow: hidden; padding-bottom: 90px; }
.gcollage { position: relative; width: 100%; flex: 1; min-height: 0; }

.sound-tile {
  position: absolute;
  border: 0;
  padding: 0;
  pointer-events: none;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  transform-origin: center;
  transition: filter 160ms ease, transform 160ms ease;
  animation: woodcut-in 560ms cubic-bezier(.2, .72, .3, 1) backwards;
}
.sound-tile.is-hover, .sound-tile:focus-visible { z-index: 3; transform: scale(1.045); filter: saturate(1.14) contrast(1.04); outline: 0; }
.sound-tile svg { width: 100%; height: 100%; overflow: visible; filter: drop-shadow(0 3px 2px rgba(29, 26, 22, .08)); }
.collage-raster-art { display: block; width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 3px 2px rgba(29, 26, 22, .08)); }
.woodblock-art .ink { fill: var(--ink); }
.woodblock-art .wash { fill: var(--tile-wash, var(--indigo)); opacity: .83; }
.woodblock-art .wash-soft { fill: var(--tile-soft, var(--ochre)); opacity: .7; }
.woodblock-art .line { fill: none; stroke: var(--ink); stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round; }
.woodblock-art .line.fine { stroke-width: 2.1; }
.woodblock-art .grain { fill: none; stroke: color-mix(in srgb, var(--ink) 52%, transparent); stroke-width: 1.1; stroke-linecap: round; }
.woodblock-art .light-grain { stroke: color-mix(in srgb, var(--paper) 62%, transparent); }
.woodblock-art .carve { fill: none; stroke: var(--paper); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.woodblock-art .carve-fill { fill: var(--paper); }
.tile-label {
  position: absolute;
  left: 50%;
  bottom: -5px;
  max-width: 100%;
  transform: translateX(-50%);
  color: var(--ink-2);
  font: italic clamp(8px, 1vw, 12px)/1 var(--serif);
  white-space: nowrap;
  text-shadow: 0 1px var(--paper), 1px 0 var(--paper), -1px 0 var(--paper);
}
/* An instruction, not a caption: the window picker's mono voice. Its top is
   set in renderCollage, just under the lowest tile. */
.collage-hint { position: absolute; z-index: 4; left: 0; right: 0; margin: 0; color: var(--muted); font: 9px var(--mono); letter-spacing: .12em; text-align: center; text-transform: uppercase; }
.hint-tap { display: none; }
@media (hover: none) {
  .hint-click { display: none; }
  .hint-tap { display: inline; }
}
@keyframes woodcut-in { from { opacity: 0; transform: scale(.78) rotate(-1deg); } to { opacity: 1; transform: scale(1) rotate(0); } }

.hover-label {
  position: fixed;
  z-index: 40;
  left: 50%;
  bottom: 88px;
  transform: translateX(-50%) translateY(5px);
  opacity: 0;
  pointer-events: none;
  padding: 9px 15px;
  border-radius: 999px;
  background: var(--paper);
  box-shadow: var(--shadow);
  color: var(--ink);
  font: 11px/1 var(--mono);
  letter-spacing: .04em;
  transition: opacity 140ms ease, transform 140ms ease;
}
.hover-label[aria-hidden="false"] { opacity: 1; transform: translateX(-50%) translateY(0); }
.hover-label strong { font-family: var(--serif); font-size: 14px; }

.first-contact {
  width: min(520px, 92%);
  margin: auto;
  text-align: center;
  color: var(--ink-2);
}
.first-contact .empty-mark { display: block; margin-bottom: 18px; color: var(--hairline); font-size: clamp(90px, 16vw, 180px); line-height: .65; }
.first-contact h2 { margin: 0; color: var(--ink); font-size: clamp(22px, 3vw, 34px); font-weight: 500; }
.first-contact p { margin: 10px auto 0; max-width: 390px; color: var(--muted); font-style: italic; }

.kicker { margin: 0 0 5px; color: var(--muted); font: 9px/1 var(--mono); letter-spacing: .18em; text-transform: uppercase; }

/* The stats page: one scroll, a story from the headline down. */
.stats-page { width: min(980px, 100%); margin: 0 auto; display: flex; flex-direction: column; gap: 40px; }
.stats-lede { margin: 4px auto 0; max-width: 820px; font-size: clamp(18px, 2.4vw, 23px); line-height: 1.38; text-align: center; text-wrap: balance; }
/* Bold words are not links: nothing in the headline is underlined unless it
   can be pressed (operator, 2026-09-24). */
.stats-lede b { font-weight: 600; }
/* A phrase that plays a clip (the loudest minute and moment): underlined, a
   tooltip naming the sound on hover, on keyboard focus and while it plays. */
.clip-link { position: relative; padding: 0; border: 0; background: none; color: inherit; font: inherit; text-align: inherit; cursor: pointer; text-decoration: underline; text-decoration-thickness: 1.5px; text-decoration-color: color-mix(in srgb, var(--vermilion) 65%, transparent); text-underline-offset: 4px; }
.clip-link:hover, .clip-link[aria-pressed="true"] { color: var(--vermilion); text-decoration-color: currentColor; }
.clip-link:focus { outline: none; }
.clip-link:focus-visible { outline: 2px solid var(--ink-2); outline-offset: 3px; border-radius: 2px; }
.clip-link::after { content: attr(data-tip); position: absolute; z-index: 5; left: 50%; bottom: calc(100% + 6px); transform: translateX(-50%); padding: 3px 8px; border: 1px solid var(--hairline); border-radius: 3px; background: var(--paper); box-shadow: 0 4px 14px rgba(49, 39, 23, .08); color: var(--ink); font: 400 13px/1.3 var(--serif); letter-spacing: 0; text-transform: none; white-space: nowrap; pointer-events: none; opacity: 0; transition: opacity 120ms ease; }
.clip-link:hover::after, .clip-link:focus-visible::after, .clip-link[aria-pressed="true"]::after { opacity: 1; }
.stats-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--hairline); border-bottom: 1px solid var(--hairline); }
.stats-tile { min-width: 0; padding: 16px 14px 14px; border-right: 1px solid var(--hairline); }
.stats-tile:last-child { border-right: 0; }
.stats-tile strong { display: block; font: 600 clamp(26px, 3.6vw, 38px)/1 var(--serif); }
.stats-tile strong small { font-size: .42em; font-weight: 500; }
.stats-tile span { display: block; margin-top: 7px; color: var(--muted); font: 9px/1.2 var(--mono); letter-spacing: .13em; text-transform: uppercase; }
.stats-tile em { display: block; margin-top: 6px; color: var(--ink-2); font-size: 12px; line-height: 1.3; }
.stats-section h2 { margin: 0; font: 500 22px/1.05 var(--serif); }
.chart-readout { min-height: 17px; margin: 12px 0 4px; color: var(--ink-2); font: 11px/1.4 var(--mono); letter-spacing: .03em; }
.chart-readout strong { color: var(--ink); font: 600 14px var(--serif); letter-spacing: 0; }
.landmark-chart { position: relative; height: 300px; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.landmark-chart svg { display: block; width: 100%; height: 100%; overflow: visible; }
.landmark-chart:focus { outline: none; }
.landmark-chart:focus-visible { outline: 2px solid var(--ink-2); outline-offset: 6px; }
.landmark-empty { position: absolute; inset: 0; display: grid; place-items: center; margin: 0; color: var(--muted); font: italic 14px var(--serif); pointer-events: none; }
/* One colour per line, shared by its path, its legend swatch and its list bar. */
.line-traffic { --line: var(--indigo); }
.line-nature { --line: var(--moss); }
.line-emergency { --line: var(--vermilion); }
.line-music { --line: var(--ink); }
.line-construction { --line: var(--ochre); }
.line-other, .line-human { --line: var(--muted); }
.stats-line { fill: none; stroke: var(--line, var(--ink-2)); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; transition: opacity 140ms ease, stroke-width 140ms ease; }
.stats-line.is-dashed { stroke-dasharray: 5 4; }
.has-hi .stats-line { opacity: .22; }
.has-hi .stats-line.is-hi { opacity: 1; stroke-width: 3.2; }
.stats-dot { fill: var(--paper); stroke: var(--line, var(--ink)); stroke-width: 2.4; pointer-events: none; }
.line-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 7px 8px; margin-top: 12px; }
/* A pill follows its line when pressed (the other lines fade); an added
   sound's pill carries a separate × that removes it. */
.line-pill { display: inline-flex; align-items: stretch; border: 1px solid var(--hairline); border-radius: 999px; background: color-mix(in srgb, var(--paper) 70%, transparent); }
.line-pill.is-locked { border-color: var(--line, var(--ink-2)); background: var(--paper); box-shadow: inset 0 0 0 1px var(--line, var(--ink-2)); }
.line-chip { display: inline-flex; align-items: center; gap: 7px; min-height: 32px; padding: 6px 11px; border: 0; border-radius: 999px; background: transparent; color: var(--ink); cursor: pointer; font: 9px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; }
.line-chip small { color: var(--muted); font-size: 9px; letter-spacing: .04em; }
.line-chip:disabled { color: var(--muted); cursor: default; }
.line-chip:disabled .chip-swatch { opacity: .3; }
.line-chip:focus { outline: none; }
.line-chip:focus-visible, .chip-remove:focus-visible { outline: 2px solid var(--ink-2); outline-offset: 2px; }
.line-pill.is-sound .line-chip { padding-right: 5px; }
.chip-swatch { width: 16px; height: 0; border-top: 2.5px solid var(--line, var(--ink-2)); }
.chip-swatch.is-dashed { border-top-style: dashed; }
.chip-remove { min-width: 28px; padding: 0 11px 0 4px; border: 0; border-radius: 0 999px 999px 0; background: transparent; color: var(--muted); cursor: pointer; font: 14px/1 var(--serif); }
.chip-remove:hover { color: var(--ink); }
.add-sound { min-height: 32px; max-width: 200px; padding: 6px 11px; border: 1px dashed var(--hairline); border-radius: 999px; background: transparent; color: var(--ink-2); font: 9px var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.add-sound:disabled { opacity: .55; }
/* The loudness section (public/loudness.js, public/loudness-chart.js). */
.how-loud .loud-tiles { margin-top: 16px; }
.loud-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; margin-top: 28px; }
.loud-head h3, .rhythm-card h3 { margin: 0; font: 500 19px/1.1 var(--serif); }
.loud-sub { margin: 0; color: var(--muted); font: 9px/1.5 var(--mono); letter-spacing: .1em; text-transform: uppercase; }
.loud-note { margin: 8px 0 0; color: var(--ink-2); font: italic 14px/1.4 var(--serif); }
.loud-note[hidden] { display: none; }
/* The hover label rides in a strip above the plot, so it never covers the
   lines or sits under a finger. */
.loud-readout { position: relative; min-height: 52px; margin-top: 4px; }
.loud-hint { position: absolute; left: 0; bottom: 8px; color: var(--ink-2); font: 11px/1.4 var(--mono); letter-spacing: .03em; }
.loud-tip { position: absolute; bottom: 4px; max-width: 100%; padding: 6px 10px 7px; border: 1px solid var(--hairline); border-radius: 3px; background: var(--paper); box-shadow: 0 6px 20px rgba(49, 39, 23, .10); color: var(--ink); font: 14px/1.35 var(--serif); }
.loud-tip small { display: block; color: var(--muted); font: 9px/1.6 var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.loud-tip span { display: block; }
.loud-tip b { font-weight: 600; }
.loud-tip-sound { color: var(--ink-2); }
.loud-chart { position: relative; height: 260px; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.loud-chart svg { display: block; width: 100%; height: 100%; overflow: visible; }
.loud-chart:focus, .rhythm:focus { outline: none; }
.loud-chart:focus-visible, .rhythm:focus-visible { outline: 2px solid var(--ink-2); outline-offset: 6px; }
.loud-night { fill: var(--ink); opacity: .05; }
.loud-grid { stroke: var(--hairline); stroke-width: 1; opacity: .55; }
.loud-axis { fill: var(--muted); font: 9px var(--mono); }
.loud-axis.is-strong { fill: var(--ink-2); font-weight: 600; }
.loud-hatch { stroke: var(--muted); stroke-width: 1; }
.loud-gap { opacity: .55; }
.loud-ref { stroke: var(--ink-2); stroke-width: 1; stroke-dasharray: 5 4; opacity: .65; }
/* In-plot words wear a paper halo so a line crossing them stays readable. */
.loud-ref-label, .loud-top-label { paint-order: stroke; stroke: var(--paper); stroke-width: 3px; stroke-linejoin: round; }
.loud-ref-label { fill: var(--ink-2); font: italic 11px var(--serif); }
.loud-tick { stroke: var(--muted); }
.loud-notch { stroke: var(--muted); opacity: .5; }
.loud-peak { fill: none; stroke: var(--vermilion); stroke-width: 1; opacity: .5; stroke-linejoin: round; stroke-linecap: round; }
.loud-avg { fill: none; stroke: var(--ink); stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; }
.loud-top { fill: var(--vermilion); }
.loud-top-label { fill: var(--vermilion); font: italic 12px var(--serif); }
/* With a clip, the loudest moment's callout plays its sound. */
.loud-top-play { cursor: pointer; }
.loud-top-play .loud-top-label { text-decoration: underline; text-underline-offset: 3px; }
.loud-top-play[aria-pressed="true"] .loud-top-label { font-weight: 600; }
.loud-cursor { stroke: var(--ink); opacity: .28; }
.loud-dot-avg { fill: var(--ink); stroke: var(--paper); stroke-width: 1.5; pointer-events: none; }
.loud-dot-peak { fill: var(--vermilion); stroke: var(--paper); stroke-width: 1.5; pointer-events: none; }
.loud-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 10px 0 0; color: var(--muted); font: 9px var(--mono); letter-spacing: .1em; text-transform: uppercase; }
.loud-legend[hidden] { display: none; }
.loud-legend i { display: inline-block; width: 18px; height: 0; margin-right: 6px; vertical-align: middle; border-top: 2px solid var(--ink); }
.loud-legend .swatch-peak { border-top: 1.5px solid var(--vermilion); opacity: .7; }
.rhythm-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 36px; margin-top: 36px; }
/* Room above the bars for the label of the chosen bar. */
.rhythm { position: relative; padding-top: 40px; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.rhythm-plot { height: 110px; display: flex; align-items: stretch; gap: 3px; border-bottom: 1px solid var(--hairline); }
.rhythm-hours { --bar: var(--indigo); }
.rhythm-days { --bar: var(--ochre); gap: 8px; }
.rhythm-bar { flex: 1; min-width: 0; display: flex; align-items: flex-end; cursor: pointer; }
.rhythm-bar i { display: block; width: 100%; height: var(--h); min-height: 1px; background: var(--bar); opacity: .5; transition: opacity 120ms ease; }
.rhythm-bar.is-hi i { opacity: 1; }
.rhythm-axis { position: relative; height: 22px; }
.rhythm-axis span { position: absolute; top: 6px; transform: translateX(-50%); color: var(--muted); font: 9px var(--mono); white-space: nowrap; }
.rhythm-label { position: absolute; left: 0; bottom: 0; z-index: 2; margin: 0; padding: 3px 8px; border: 1px solid var(--hairline); border-radius: 3px; background: var(--paper); box-shadow: 0 4px 14px rgba(49, 39, 23, .08); color: var(--ink); font: 14px/1.3 var(--serif); white-space: nowrap; pointer-events: none; }
.rhythm-label:empty { display: none; }
.rhythm-label b { font-weight: 600; }
.heard-list { list-style: none; margin: 12px 0 0; padding: 0; }
.heard-row { width: 100%; display: grid; grid-template-columns: minmax(0, 170px) minmax(0, 1fr) 48px 64px; align-items: center; gap: 10px; padding: 8px 0; border: 0; border-bottom: 1px solid var(--hairline); background: transparent; color: var(--ink); cursor: pointer; font: 14px/1.2 var(--serif); text-align: left; }
.heard-row:hover .heard-name, .heard-row:focus-visible .heard-name { text-decoration: underline; text-underline-offset: 3px; }
.heard-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.heard-bar { height: 9px; background: color-mix(in srgb, var(--ink) 6%, transparent); }
.heard-bar i { display: block; height: 100%; background: var(--line, var(--ink-2)); }
.heard-count { font: 11px var(--mono); text-align: right; }
.heard-ago { color: var(--muted); font: 9px var(--mono); letter-spacing: .05em; text-align: right; white-space: nowrap; }
.arrivals .heard-row { grid-template-columns: minmax(0, 1fr) auto; }
.heard-empty { padding: 10px 0; color: var(--muted); font-style: italic; }
.stats-policy-note { margin: 10px 0 0; padding: 7px 10px; border-left: 2px solid var(--ochre); color: var(--muted); font: 9px/1.45 var(--mono); letter-spacing: .06em; text-transform: uppercase; }
.stats-policy-note[hidden] { display: none; }
.stats-pair { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 44px; }
/* Room above the bars for the chosen day's label (the rhythms' label). */
.since-chart { position: relative; margin-top: 14px; padding-top: 34px; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.since-chart:focus { outline: none; }
.since-chart:focus-visible { outline: 2px solid var(--ink-2); outline-offset: 6px; }
.since-spark { height: 96px; }
.since-spark svg { display: block; width: 100%; height: 100%; cursor: pointer; }
.day-bar { fill: var(--ink-2); opacity: .22; }
.day-bar.is-window { opacity: .72; }
.day-bar.is-today { opacity: .4; }
.day-bar.is-hi { opacity: 1; }
.first-contact.compact { padding: 26px 0; }
.first-contact.compact h2 { font-size: clamp(18px, 2.2vw, 24px); }

.atlas-toolbar { width: min(1200px, 100%); margin: 0 auto 26px; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.category-filter { display: flex; align-items: center; gap: 9px; color: var(--muted); font: 9px var(--mono); letter-spacing: .14em; text-transform: uppercase; }
.category-filter select { border: 0; border-bottom: 1px solid var(--hairline); border-radius: 0; padding: 7px 22px 7px 5px; color: var(--ink); background: transparent; font: 11px var(--mono); }
.atlas-grid { width: min(1200px, 100%); margin: 0 auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
.sound-card { position: relative; min-height: 310px; padding: 16px; border: 0; background: color-mix(in srgb, var(--paper) 70%, transparent); box-shadow: inset 0 0 0 1px var(--hairline); color: var(--ink); cursor: pointer; text-align: left; transition: transform 180ms ease, background 180ms ease; }
.sound-card:hover { transform: translateY(-3px); background: var(--paper); }
.card-art { height: 180px; display: grid; place-items: center; }
.card-art svg { width: 85%; height: 85%; }
.card-art .collage-raster-art { width: 85%; height: 85%; }
.sound-card h3 { margin: 6px 0 3px; font: 600 20px/1.05 var(--serif); }
.class-key { margin: 0; color: var(--muted); font: 9px/1.35 var(--mono); letter-spacing: .04em; overflow-wrap: anywhere; }
.category-badge { display: inline-flex; padding: 5px 8px; border: 1px solid currentColor; border-radius: 999px; color: var(--category-color, var(--ink-2)); font: 8px/1 var(--mono); letter-spacing: .13em; text-transform: uppercase; }
.card-count { position: absolute; top: 17px; right: 17px; color: var(--ink-2); font: 11px var(--mono); }

.chart-grid { stroke: var(--hairline); stroke-width: 1; }
.chart-axis { fill: var(--muted); font: 8px var(--mono); }

.view-nav { position: fixed; z-index: 30; left: 50%; bottom: 30px; transform: translateX(-50%); }
.credit { position: fixed; z-index: 20; left: 22px; bottom: 12px; max-width: 330px; color: var(--muted); font: 7px/1.3 var(--mono); letter-spacing: .03em; }
.credit a { text-underline-offset: 2px; }

.modal { width: 100%; max-width: none; height: 100%; max-height: none; margin: 0; padding: 24px; border: 0; background: rgba(29, 26, 22, .42); color: var(--ink); backdrop-filter: blur(9px); }
.modal::backdrop { background: transparent; }
.detail-card, .about-card { position: relative; width: min(900px, 100%); max-height: calc(100vh - 48px); max-height: calc(100dvh - 48px); margin: auto; overflow: auto; border-radius: 4px; background: var(--paper); box-shadow: var(--shadow); }
.modal-close { position: absolute; z-index: 3; top: 14px; right: 16px; border: 0; background: transparent; color: var(--muted); cursor: pointer; font: 30px/1 var(--serif); }
/* A dialog's title takes the focus when it opens (showDialog in detail.js), only
   ever from script (tabindex -1), so it never draws a ring. */
.modal h2[tabindex="-1"]:focus { outline: none; }
/* The sound detail dialog (public/detail.js): the art beside the story on a
   wide screen, stacked under 700 px; the log spans the whole card. */
.detail-card { display: grid; grid-template-columns: minmax(230px, .8fr) minmax(0, 1.2fr); }
.detail-art { min-height: 320px; display: grid; place-items: center; padding: 30px; background: var(--paper-deep); }
.detail-art svg { width: 80%; max-height: 300px; }
.detail-art .collage-raster-art { width: 80%; height: auto; max-height: 300px; }
.detail-copy { min-width: 0; padding: 40px 40px 22px; }
.detail-copy h2 { margin: 10px 0 2px; font: 600 clamp(30px, 4.2vw, 38px)/1.05 var(--serif); }
.detail-latin { margin: 0; color: var(--muted); font-size: 14px; }
.detail-latin[hidden] { display: none; }
.external-link { margin-left: 8px; color: var(--indigo); font: 9px var(--mono); letter-spacing: .1em; text-transform: uppercase; text-underline-offset: 4px; white-space: nowrap; }
.external-link[hidden] { display: none; }
.detail-blurb { margin: 10px 0 18px; color: var(--ink-2); font-size: 15px; line-height: 1.5; }
.detail-hero { display: flex; align-items: center; gap: 14px; margin: 0 0 18px; padding: 12px 14px; border: 1px solid var(--hairline); border-radius: 6px; background: var(--lift); }
.detail-hero[hidden] { display: none; }
.detail-hero-words { min-width: 0; }
.detail-hero-words b { display: block; font-size: 15px; font-weight: 600; }
.detail-hero-words small { display: block; margin-top: 2px; color: var(--muted); font: 10px/1.5 var(--mono); letter-spacing: .06em; }
/* Play buttons draw their own triangle and square (a text arrow turns into an
   emoji on phones). A playing button is aria-pressed. */
.detail-play { position: relative; flex: none; display: inline-grid; place-items: center; width: 30px; height: 30px; padding: 0; border: 1px solid var(--ink); border-radius: 50%; background: var(--paper); color: var(--ink); cursor: pointer; }
.detail-play::before { content: ""; position: absolute; inset: -7px; }
.detail-play svg { width: 12px; height: 12px; fill: currentColor; pointer-events: none; }
.detail-play .icon-stop, .detail-play[aria-pressed="true"] .icon-play { display: none; }
.detail-play[aria-pressed="true"] .icon-stop { display: block; }
.detail-play.is-big { width: 46px; height: 46px; background: var(--ink); color: var(--paper); }
.detail-play.is-big svg { width: 16px; height: 16px; }
.detail-play[aria-pressed="true"] { border-color: var(--vermilion); background: var(--vermilion); color: var(--paper); }
.detail-play:focus-visible { outline: 2px solid var(--ink-2); outline-offset: 3px; }
.detail-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0 0 18px; border-top: 1px solid var(--hairline); border-bottom: 1px solid var(--hairline); }
.detail-tile { min-width: 0; padding: 12px 8px 12px 0; border-right: 1px solid var(--hairline); }
.detail-tile + .detail-tile { padding-left: 10px; }
.detail-tile:last-child { border-right: 0; }
.detail-tile strong { display: block; font: 600 24px/1.05 var(--serif); }
.detail-tile strong small { font-size: .62em; font-weight: 500; }
.detail-tile span { display: block; margin-top: 6px; color: var(--muted); font: 8px/1.2 var(--mono); letter-spacing: .13em; text-transform: uppercase; }
.detail-tile em { display: block; margin-top: 5px; color: var(--ink-2); font-size: 11px; line-height: 1.3; }
.detail-copy h3, .detail-log h3 { margin: 16px 0 8px; font: 600 15px/1.3 var(--serif); }
.detail-copy h3 small, .detail-log h3 small { margin-left: 8px; color: var(--muted); font: 8px/1.4 var(--mono); letter-spacing: .12em; text-transform: uppercase; }
.detail-note { margin: 0; padding: 10px 0; color: var(--muted); font: italic 13px var(--serif); }
.detail-plot { display: flex; align-items: stretch; gap: 2px; height: 64px; border-bottom: 1px solid var(--hairline); }
.detail-plot.is-days { height: 46px; }
.detail-bar { flex: 1; min-width: 0; display: flex; align-items: flex-end; }
.detail-bar i { display: block; width: 100%; background: var(--line, var(--ink-2)); opacity: .5; }
.detail-bar.is-peak i { opacity: .9; }
.detail-bar.is-today i { opacity: .28; }
.detail-bar:hover i, .detail-bar.is-hi i { opacity: 1; }
/* Hover, tap or the arrow keys show a bar's words above it, like the rhythms. */
.detail-bars { position: relative; padding-top: 30px; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.detail-bars:focus { outline: none; }
.detail-bars:focus-visible { outline: 2px solid var(--ink-2); outline-offset: 4px; }
.detail-bar-label { font-size: 13px; }
.detail-axis { position: relative; height: 18px; }
.detail-axis span { position: absolute; top: 5px; color: var(--muted); font: 9px var(--mono); white-space: nowrap; }
.detail-axis span.is-end { transform: translateX(-100%); }
.detail-log { grid-column: 1 / -1; padding: 24px 40px 34px; border-top: 1px solid var(--hairline); }
.detail-log ol { list-style: none; margin: 0; padding: 0; }
.detail-row { display: grid; grid-template-columns: 90px 70px 50px 44px 40px; gap: 10px; align-items: center; padding: 7px 0; border-bottom: 1px solid var(--hairline); font-size: 13px; }
.detail-day { padding: 14px 0 4px; color: var(--muted); font: 9px var(--mono); letter-spacing: .13em; text-transform: uppercase; }
.detail-empty { padding: 10px 0; color: var(--muted); font-style: italic; }
.detail-db { font: 11px var(--mono); }
.detail-conf, .detail-len { color: var(--muted); font: 10px var(--mono); }
.detail-noclip { color: var(--muted); font: 9px var(--mono); white-space: nowrap; }
.load-more { display: block; margin: 16px auto 0; padding: 8px 18px; border: 1px solid var(--hairline); border-radius: 999px; background: transparent; color: var(--muted); font-family: var(--mono); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; cursor: pointer; }
.load-more:hover { color: inherit; border-color: currentColor; }
/* display: block above would otherwise beat the hidden attribute. */
.load-more[hidden], .detail-log-hint[hidden] { display: none; }
.about-card { top: 50%; transform: translateY(-50%); max-width: 610px; padding: 55px; }
.about-card h2 { margin: 6px 0 22px; font: 600 clamp(34px, 6vw, 58px)/.98 var(--serif); }
.about-card > p { color: var(--ink-2); line-height: 1.55; }
.about-card .attribution { margin-top: 30px; padding-top: 18px; border-top: 1px solid var(--hairline); color: var(--muted); font-size: 11px; }

@media (max-width: 850px) {
  .rhythm-grid { grid-template-columns: 1fr; }
}

@media (max-width: 700px) {
  .detail-card { grid-template-columns: 1fr; }
  .detail-art { min-height: 0; padding: 26px 0 16px; }
  .detail-art svg { width: min(62%, 200px); height: auto; }
  .detail-art .collage-raster-art { width: auto; max-width: 62%; max-height: 190px; }
  .detail-copy, .detail-log { padding: 22px 18px; }
  .detail-tile strong { font-size: 20px; }
  .detail-copy h3 small, .detail-log h3 small { display: block; margin: 3px 0 0; }
  .detail-row { grid-template-columns: 74px 58px 40px minmax(0, 1fr) 36px; gap: 8px; }
}

@media (max-width: 620px) {
  .topbar { top: 10px; left: 10px; right: 10px; }
  .about-button { padding: 7px 10px; font-size: 8px; }
  .window-picker button { padding: 7px 8px; font-size: 7.5px; letter-spacing: .09em; }
  .masthead { padding: 67px 14px 12px; }
  .masthead p { display: none; }
  .view { padding: 6px 14px 118px; }
  .collage-view { padding-bottom: 84px; }
  .view-nav { bottom: 27px; max-width: calc(100vw - 16px); }
  .view-nav button { padding: 9px 10px; font-size: 7px; letter-spacing: .09em; }
  .credit { display: none; }
  .stats-page { gap: 30px; }
  .stats-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats-tile:nth-child(2) { border-right: 0; }
  .stats-tile:nth-child(-n+2) { border-bottom: 1px solid var(--hairline); }
  .landmark-chart { height: 220px; }
  .heard-row { grid-template-columns: minmax(0, 120px) minmax(0, 1fr) 40px 58px; gap: 8px; font-size: 13px; }
  .stats-pair { grid-template-columns: 1fr; gap: 30px; }
  .atlas-toolbar { align-items: stretch; flex-direction: column; }
  .atlas-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sound-card { min-height: 235px; padding: 11px; }
  .card-art { height: 130px; }
  .sound-card h3 { font-size: 15px; }
  .card-count { top: 12px; right: 12px; font-size: 9px; }
  .loud-chart { height: 220px; }
  .loud-readout { min-height: 70px; }
  .rhythm-grid { gap: 30px; }
  .modal { padding: 10px; }
  .detail-card { max-height: calc(100vh - 20px); max-height: calc(100dvh - 20px); }
  .about-card { padding: 42px 27px 30px; }
}

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