:root {
  color-scheme: light;
  --wine: #9b2335;
  --wine-dark: #681627;
  --ink: #1a1a20;
  --ink-soft: #53525a;
  --paper: #ffffff;
  --mist: #eff0ec;
  --mist-deep: #e2e3dd;
  --umber: #715313;
  --line: #d7d8d2;
  --line-dark: #aaa9a2;
  --success: #315d49;
  --header-height: 70px;
  --archive-width: 410px;
  --ease: cubic-bezier(.22, .61, .36, 1);
  --font-ui: Inter, "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-display: Georgia, Cambria, "Times New Roman", serif;
  --font-data: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

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

html,
body {
  height: 100%;
}

.noscript-message {
  position: relative;
  z-index: 2000;
  padding: 12px 18px;
  border-bottom: 1px solid var(--line-dark);
  color: var(--paper);
  background: var(--ink);
  font-size: 13px;
  text-align: center;
}

.noscript-message a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

html {
  background: var(--mist);
  text-size-adjust: 100%;
}

body {
  margin: 0;
  overflow: hidden;
  color: var(--ink);
  background: var(--mist);
  font-family: var(--font-ui);
  font-size: 15px;
  line-height: 1.45;
}

button,
input,
select,
summary {
  color: inherit;
  font: inherit;
}

button,
select,
summary {
  cursor: pointer;
}

button {
  border: 0;
}

a {
  color: inherit;
}

img {
  display: block;
  max-width: 100%;
}

[hidden] {
  display: none !important;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

:focus-visible {
  outline: 3px solid #1769aa;
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 3000;
  padding: 10px 14px;
  color: var(--paper);
  background: var(--ink);
  font-weight: 750;
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

.app-shell {
  height: 100dvh;
  min-height: 500px;
}

.site-masthead {
  position: relative;
  z-index: 1400;
  display: grid;
  grid-template-columns: minmax(250px, 1fr) auto auto;
  align-items: center;
  height: var(--header-height);
  padding: 0 clamp(16px, 2.5vw, 38px);
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}

.brand {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-width: 0;
  color: var(--ink);
  text-decoration: none;
}

.brand-mark {
  position: relative;
  display: grid;
  flex: 0 0 46px;
  width: 46px;
  height: 46px;
  place-items: center;
  overflow: hidden;
  color: var(--paper);
  background: var(--wine);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .08em;
}

.brand-mark img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.brand-copy {
  display: grid;
  min-width: 0;
  margin-left: 12px;
}

.brand-copy strong {
  overflow: hidden;
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 650;
  line-height: 1.05;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand-copy small {
  margin-top: 4px;
  color: var(--wine);
  font-size: 9px;
  font-weight: 750;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-right: clamp(12px, 2vw, 30px);
}

.site-nav a,
.method-button {
  padding: 10px 12px;
  color: var(--ink);
  background: transparent;
  font-size: 12px;
  font-weight: 730;
  letter-spacing: .06em;
  text-decoration: none;
  text-transform: uppercase;
}

.site-nav a:hover,
.method-button:hover {
  color: var(--wine);
}

.site-nav .nav-accent {
  margin-left: 6px;
  color: var(--paper);
  background: var(--wine);
}

.site-nav .nav-accent:hover {
  color: var(--paper);
  background: var(--wine-dark);
}

.method-button {
  min-height: 44px;
  border-left: 1px solid var(--line);
  white-space: nowrap;
}

.atlas-workspace {
  position: relative;
  display: grid;
  grid-template-areas: "archive map";
  grid-template-columns: var(--archive-width) minmax(0, 1fr);
  height: calc(100dvh - var(--header-height));
  min-height: 430px;
  transition: grid-template-columns 320ms var(--ease);
}

.archive-panel {
  position: relative;
  z-index: 700;
  grid-area: archive;
  display: flex;
  min-width: 0;
  min-height: 0;
  flex-direction: column;
  overflow: hidden;
  border-right: 1px solid var(--line-dark);
  background: var(--paper);
}

.archive-heading,
.discovery-form,
.scope-filter,
.filter-disclosure,
.filter-actions,
.results-heading,
.list-footer {
  flex: 0 0 auto;
  margin-right: 22px;
  margin-left: 22px;
}

.archive-heading {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding-top: 22px;
  padding-bottom: 17px;
  border-bottom: 1px solid var(--line);
}

.archive-heading > div {
  padding-right: 56px;
  pointer-events: none;
}

.archive-heading-toggle {
  position: absolute;
  z-index: 2;
  inset: 0;
  display: block;
  width: 100%;
  border: 0;
  background: transparent;
}

.archive-heading-toggle::after {
  position: absolute;
  top: 0;
  right: 0;
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid var(--line-dark);
  border-radius: 50%;
  background: var(--paper);
  content: "←";
  font-size: 19px;
}

.archive-heading-toggle:hover::after {
  color: var(--paper);
  border-color: var(--wine);
  background: var(--wine);
}

.archive-heading-toggle:focus-visible {
  outline-offset: -4px;
}

.section-index {
  margin: 0 0 7px;
  color: var(--wine);
  font-family: var(--font-data);
  font-size: 10px;
  font-weight: 760;
  letter-spacing: .11em;
  text-transform: uppercase;
}

.archive-heading h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(25px, 2vw, 31px);
  font-weight: 520;
  line-height: 1.03;
}

.icon-button {
  display: inline-grid;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  place-items: center;
  border: 1px solid var(--line-dark);
  border-radius: 50%;
  background: var(--paper);
  font-size: 19px;
}

.icon-button:hover {
  color: var(--paper);
  border-color: var(--wine);
  background: var(--wine);
}

.discovery-form {
  padding-top: 17px;
}

.discovery-form > label,
.scope-filter legend,
.filter-grid label {
  display: block;
  margin-bottom: 7px;
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 780;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.search-control {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) auto;
  align-items: center;
  min-height: 48px;
  border-bottom: 2px solid var(--ink);
}

.search-control svg {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 1.7;
}

.search-control input {
  width: 100%;
  min-width: 0;
  padding: 12px 8px;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 16px;
}

.search-control input::placeholder {
  color: #69686e;
}

.search-control:focus-within {
  border-color: var(--wine);
}

#clear-search {
  min-height: 44px;
  padding: 8px 0 8px 8px;
  color: var(--wine);
  background: transparent;
  font-size: 11px;
  font-weight: 780;
  text-transform: uppercase;
}

.scope-filter {
  min-width: 0;
  margin-top: 18px;
  padding: 0 0 17px;
  border: 0;
  border-bottom: 1px solid var(--line);
}

.scope-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.scope-options label {
  position: relative;
  min-width: 0;
}

.scope-options label:first-child {
  grid-column: 1 / -1;
}

.scope-options input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.scope-options span {
  display: flex;
  min-height: 44px;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--paper);
  transition: color 140ms ease, background 140ms ease;
}

.scope-options b {
  overflow: hidden;
  font-size: 11px;
  font-weight: 730;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.scope-options small {
  color: var(--ink-soft);
  font-family: var(--font-data);
  font-size: 10px;
}

.scope-options input:checked + span {
  color: var(--paper);
  background: var(--ink);
}

.scope-options input:checked + span small {
  color: var(--paper);
}

.scope-options input:focus-visible + span {
  position: relative;
  z-index: 1;
  outline: 3px solid #1769aa;
  outline-offset: -3px;
}

.filter-disclosure {
  border-bottom: 1px solid var(--line);
}

.filter-disclosure summary,
.description-disclosure summary {
  display: flex;
  min-height: 44px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  list-style: none;
  font-size: 11px;
  font-weight: 780;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.filter-disclosure summary::-webkit-details-marker,
.description-disclosure summary::-webkit-details-marker {
  display: none;
}

.filter-disclosure[open] summary span,
.description-disclosure[open] summary span {
  transform: rotate(45deg);
}

.filter-grid {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  align-items: center;
  gap: 8px 12px;
  padding: 6px 0 15px;
}

.filter-grid label {
  margin: 0;
}

.filter-grid select {
  width: 100%;
  min-height: 40px;
  padding: 7px 30px 7px 10px;
  border: 1px solid var(--line-dark);
  border-radius: 0;
  background: var(--paper);
}

.filter-actions {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 13px 0;
}

.button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 9px 14px;
  border: 1px solid transparent;
  border-radius: 0;
  background: transparent;
  font-size: 10px;
  font-weight: 790;
  letter-spacing: .08em;
  text-decoration: none;
  text-transform: uppercase;
}

.button-dark {
  color: var(--paper);
  background: var(--ink);
}

.button-dark:hover {
  background: var(--wine);
}

.button-outline {
  border-color: var(--line-dark);
  background: var(--paper);
}

.button-outline:hover {
  color: var(--wine);
  border-color: var(--wine);
}

.button-text {
  color: var(--wine);
}

.filter-actions .button-dark {
  flex: 1;
}

.results-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 3px 0 11px;
}

.results-heading p {
  margin: 0;
  font-size: 12px;
  font-weight: 710;
}

.results-key {
  color: var(--ink-soft);
  font-family: var(--font-data);
  font-size: 10px;
  letter-spacing: .07em;
}

.episode-list {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  margin: 0;
  padding: 0 22px 0 34px;
  overflow-y: auto;
  overscroll-behavior: contain;
  list-style: none;
  scrollbar-color: var(--line-dark) transparent;
}

.episode-list::before {
  position: absolute;
  top: 11px;
  bottom: 0;
  left: 27px;
  width: 1px;
  background: var(--wine);
  content: "";
  opacity: .36;
}

.episode-item {
  position: relative;
  margin: 0 0 7px;
}

.episode-item::before {
  position: absolute;
  z-index: 2;
  top: 20px;
  left: -11px;
  width: 8px;
  height: 8px;
  border: 2px solid var(--paper);
  border-radius: 50%;
  background: var(--wine);
  box-shadow: 0 0 0 1px var(--wine);
  content: "";
}

.episode-item.scope-association::before {
  border-radius: 0;
  background: var(--paper);
  box-shadow: 0 0 0 1px var(--umber);
  transform: rotate(45deg);
}

.episode-item.scope-unlocated::before {
  background: var(--paper);
  box-shadow: 0 0 0 1px var(--line-dark);
}

.episode-card {
  display: block;
  width: 100%;
  padding: 12px 12px 13px;
  border: 1px solid transparent;
  background: var(--paper);
  text-align: left;
}

.episode-card:hover {
  border-color: var(--line-dark);
  background: #fafaf8;
}

.episode-card[aria-current="true"] {
  border-color: var(--wine);
  box-shadow: inset 3px 0 0 var(--wine);
}

.episode-card-top {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 6px;
  color: var(--ink-soft);
  font-family: var(--font-data);
  font-size: 10px;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.episode-number {
  color: var(--wine);
  font-weight: 760;
}

.episode-scope {
  margin-left: auto;
  padding-left: 7px;
  border-left: 1px solid var(--line);
}

.episode-card h3 {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 570;
  line-height: 1.15;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.episode-card p {
  margin: 7px 0 0;
  overflow: hidden;
  color: var(--ink-soft);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.episode-card .geo-line {
  color: var(--umber);
  font-size: 10px;
  font-weight: 680;
  letter-spacing: .02em;
}

.empty-results {
  padding: 30px 12px;
  border-top: 1px solid var(--line);
}

.empty-results h3 {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 520;
}

.empty-results p {
  margin: 0 0 15px;
  color: var(--ink-soft);
}

.list-footer {
  padding: 11px 0 16px;
  border-top: 1px solid var(--line);
  background: var(--paper);
  text-align: center;
}

.list-footer .button {
  width: 100%;
}

.list-footer p {
  margin: 10px 4px 0;
  color: var(--ink-soft);
  font-size: 10px;
}

.map-stage {
  position: relative;
  z-index: 1;
  grid-area: map;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: var(--mist);
}

#map {
  width: 100%;
  height: 100%;
  background: var(--mist);
}

#map .leaflet-tile-pane {
  filter: saturate(.62) contrast(.94) brightness(1.03);
}

#map .leaflet-control-zoom {
  overflow: hidden;
  border: 1px solid var(--line-dark);
  border-radius: 0;
  box-shadow: none;
}

#map .leaflet-control-zoom a {
  width: 44px;
  height: 44px;
  color: var(--ink);
  border-color: var(--line);
  line-height: 44px;
}

#map .leaflet-control-attribution {
  padding: 2px 6px;
  background: rgba(255, 255, 255, .9);
  font-size: 10px;
}

#map .leaflet-control-attribution a {
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.atlas-intro {
  position: absolute;
  z-index: 500;
  top: 26px;
  left: 26px;
  width: min(360px, calc(100% - 52px));
  padding: 20px 22px;
  border-top: 4px solid var(--wine);
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 13px 40px rgba(26, 26, 32, .08);
  transition: opacity 180ms ease, transform 220ms var(--ease);
}

.atlas-intro h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(31px, 3vw, 46px);
  font-weight: 500;
  letter-spacing: -.025em;
  line-height: .97;
}

.atlas-intro > p:not(.section-index) {
  max-width: 31em;
  margin: 13px 0 18px;
  color: var(--ink-soft);
  font-size: 12px;
}

.atlas-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  margin: 0;
  border-top: 1px solid var(--line);
}

.atlas-stats div {
  min-width: 0;
  padding: 11px 9px 0 0;
}

.atlas-stats div + div {
  padding-left: 9px;
  border-left: 1px solid var(--line);
}

.atlas-stats dt {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  line-height: 1;
}

.atlas-stats dd {
  margin: 5px 0 0;
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 720;
  letter-spacing: .06em;
  line-height: 1.25;
  text-transform: uppercase;
}

.map-actions {
  position: absolute;
  z-index: 520;
  right: 68px;
  bottom: 78px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.map-home {
  box-shadow: 0 5px 18px rgba(26, 26, 32, .12);
}

.map-home svg,
.search-control svg {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 1.7;
}

.map-legend {
  position: absolute;
  z-index: 500;
  bottom: 28px;
  left: 24px;
  width: 275px;
  border: 1px solid var(--line-dark);
  background: rgba(255, 255, 255, .95);
}

.map-legend summary {
  padding: 10px 12px;
  font-size: 10px;
  font-weight: 790;
  letter-spacing: .09em;
  list-style-position: inside;
  text-transform: uppercase;
}

.legend-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 12px;
  padding: 4px 12px 11px;
  border-top: 1px solid var(--line);
}

.legend-grid span {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 10px;
}

.legend-mark {
  display: block;
  width: 10px;
  height: 10px;
  flex: 0 0 10px;
}

.mark-place {
  border-radius: 50%;
  background: var(--wine);
}

.mark-region {
  border: 2px solid var(--wine);
  border-radius: 50%;
  background: var(--paper);
}

.mark-country {
  background: var(--ink);
}

.mark-association {
  border: 2px solid var(--umber);
  background: var(--paper);
  transform: rotate(45deg);
}

.map-legend p {
  margin: 0;
  padding: 10px 12px;
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 10px;
  line-height: 1.45;
}

.map-context {
  position: absolute;
  z-index: 500;
  right: 68px;
  bottom: 25px;
  max-width: 260px;
  padding: 8px 10px;
  border-left: 3px solid var(--wine);
  background: rgba(255, 255, 255, .94);
  font-family: var(--font-data);
  font-size: 10px;
  letter-spacing: .02em;
}

.app-status {
  position: absolute;
  z-index: 800;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  padding: 28px;
  background: rgba(239, 240, 236, .94);
  text-align: center;
}

.app-status strong {
  margin-top: 18px;
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 540;
}

.app-status small {
  margin: 4px 0 16px;
  color: var(--ink-soft);
}

.app-status.is-error .status-orbit {
  border-color: var(--wine);
  animation: none;
}

.status-orbit {
  width: 38px;
  height: 38px;
  border: 1px solid var(--line-dark);
  border-top: 4px solid var(--wine);
  border-radius: 50%;
  animation: orbit 850ms linear infinite;
}

@keyframes orbit {
  to { transform: rotate(360deg); }
}

.iwp-marker-shell {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
}

.iwp-marker {
  display: block;
  width: 14px;
  height: 14px;
  border: 2px solid var(--paper);
  border-radius: 50%;
  background: var(--wine);
  box-shadow: 0 0 0 1px var(--wine), 0 3px 8px rgba(26, 26, 32, .28);
  transition: transform 160ms ease, opacity 160ms ease;
}

.iwp-marker-shell:hover .iwp-marker {
  transform: scale(1.24);
}

.iwp-marker-shell.scope-region .iwp-marker {
  border: 3px solid var(--wine);
  background: var(--paper);
  box-shadow: 0 0 0 1px var(--paper), 0 3px 8px rgba(26, 26, 32, .25);
}

.iwp-marker-shell.scope-country .iwp-marker {
  border-radius: 1px;
  background: var(--ink);
  box-shadow: 0 0 0 1px var(--ink), 0 3px 8px rgba(26, 26, 32, .25);
}

.iwp-marker-shell.scope-association .iwp-marker {
  border: 3px solid var(--umber);
  border-radius: 1px;
  background: var(--paper);
  box-shadow: 0 0 0 1px var(--paper), 0 3px 8px rgba(26, 26, 32, .24);
  transform: rotate(45deg);
}

.iwp-marker-shell.is-muted .iwp-marker {
  opacity: .28;
}

.iwp-marker-shell.is-active::before,
.iwp-marker-shell.is-active::after {
  position: absolute;
  width: 27px;
  height: 27px;
  border: 1px solid var(--wine);
  border-radius: 50%;
  content: "";
  pointer-events: none;
}

.iwp-marker-shell.is-active::after {
  width: 37px;
  height: 37px;
  border-color: rgba(155, 35, 53, .48);
  animation: voice-ring 720ms var(--ease) 1;
}

@keyframes voice-ring {
  from { opacity: 0; transform: scale(.55); }
  65% { opacity: 1; }
  to { opacity: .52; transform: scale(1); }
}

.iwp-cluster {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 2px solid var(--paper);
  border-radius: 50%;
  color: var(--paper);
  background: var(--ink);
  box-shadow: 0 0 0 1px var(--wine), 0 5px 14px rgba(26, 26, 32, .25);
  font-family: var(--font-data);
  font-size: 10px;
  font-weight: 780;
}

.iwp-tooltip.leaflet-tooltip {
  max-width: 280px;
  padding: 9px 11px;
  border: 0;
  border-radius: 0;
  box-shadow: 0 7px 22px rgba(26, 26, 32, .17);
  font-family: var(--font-ui);
}

.iwp-tooltip strong {
  display: block;
  margin-bottom: 3px;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.15;
}

.iwp-tooltip span {
  color: var(--wine);
  font-family: var(--font-data);
  font-size: 10px;
  letter-spacing: .03em;
  text-transform: uppercase;
}

body.panel-collapsed .atlas-workspace {
  grid-template-columns: 64px minmax(0, 1fr);
}

body.panel-collapsed .archive-panel > :not(.archive-heading) {
  display: none;
}

body.panel-collapsed .archive-heading {
  height: 100%;
  margin: 0;
  align-items: flex-start;
  justify-content: center;
  padding: 16px 0;
  border: 0;
}

body.panel-collapsed .archive-heading > div {
  display: none;
}

body.panel-collapsed .archive-heading-toggle::after {
  top: 0;
  right: 10px;
  content: "→";
}

body.detail-open .atlas-intro {
  opacity: 0;
  pointer-events: none;
  transform: translateY(-14px);
}

.detail-panel {
  position: fixed;
  z-index: 1600;
  top: var(--header-height);
  right: 0;
  bottom: 0;
  width: min(470px, calc(100vw - 64px));
  border-left: 1px solid var(--line-dark);
  background: var(--paper);
  box-shadow: -14px 0 45px rgba(26, 26, 32, .14);
}

.detail-rail {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  display: grid;
  width: 32px;
  place-items: center;
  color: var(--paper);
  background: var(--wine);
  overflow: hidden;
}

.detail-rail span {
  font-family: var(--font-data);
  font-size: 8px;
  letter-spacing: .12em;
  text-transform: uppercase;
  transform: rotate(-90deg);
  white-space: nowrap;
}

.close-detail {
  position: absolute;
  z-index: 2;
  top: 15px;
  right: 15px;
}

.detail-scroll {
  height: 100%;
  padding: 66px 30px 40px 62px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.detail-header {
  display: grid;
  grid-template-columns: 94px minmax(0, 1fr);
  align-items: start;
  gap: 20px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}

.detail-art-wrap {
  position: relative;
  display: grid;
  width: 94px;
  aspect-ratio: 1;
  place-items: center;
  overflow: hidden;
  color: var(--paper);
  background: var(--wine);
  font-family: var(--font-display);
  font-size: 25px;
}

.detail-art-wrap img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-header h2 {
  margin: 0;
  overflow-wrap: anywhere;
  font-family: var(--font-display);
  font-size: clamp(24px, 2vw, 29px);
  font-weight: 520;
  letter-spacing: -.02em;
  line-height: 1.02;
  text-wrap: balance;
}

.detail-series {
  margin: 10px 0 0;
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 700;
}

.detail-people {
  margin: 18px 0;
  color: var(--ink-soft);
  font-size: 12px;
}

.location-note {
  padding: 16px;
  border: 1px solid var(--line-dark);
  border-left: 4px solid var(--wine);
  background: #fafaf8;
}

.location-note.scope-association {
  border-left-color: var(--umber);
}

.location-note.scope-unlocated {
  border-left-color: var(--line-dark);
}

.location-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.scope-badge {
  color: var(--wine);
  font-family: var(--font-data);
  font-size: 10px;
  font-weight: 780;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.location-heading strong {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 620;
  text-align: right;
}

.location-note p {
  margin: 10px 0 0;
  color: var(--ink-soft);
  font-size: 12px;
}

.evidence-line {
  padding-top: 10px;
  border-top: 1px solid var(--line);
  font-family: var(--font-data);
  font-size: 10px !important;
}

.listen-block {
  display: grid;
  gap: 11px;
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.listen-block h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 23px;
  font-weight: 540;
}

.listen-block audio {
  width: 100%;
  min-height: 44px;
}

.audio-status {
  min-height: 1.4em;
  margin: 0;
  color: var(--wine);
  font-size: 10px;
}

.detail-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 12px;
}

.transcript-note {
  margin: 10px 0 0;
  padding-left: 10px;
  border-left: 2px solid var(--line-dark);
  color: var(--ink-soft);
  font-size: 10px;
  line-height: 1.5;
}

.description-disclosure {
  margin-top: 20px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.detail-description {
  padding: 2px 0 18px;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.65;
  white-space: pre-line;
}

.method-dialog {
  width: min(650px, calc(100vw - 32px));
  max-height: calc(100dvh - 40px);
  padding: 0;
  border: 1px solid var(--line-dark);
  border-top: 7px solid var(--wine);
  border-radius: 0;
  color: var(--ink);
  background: var(--paper);
  box-shadow: 0 24px 80px rgba(26, 26, 32, .25);
}

.method-dialog::backdrop {
  background: rgba(26, 26, 32, .64);
}

.method-dialog form {
  position: relative;
  max-height: calc(100dvh - 47px);
  padding: clamp(28px, 5vw, 54px);
  overflow-y: auto;
}

.method-dialog .icon-button {
  position: absolute;
  top: 17px;
  right: 17px;
}

.method-dialog h2 {
  max-width: 10em;
  margin: 0 0 16px;
  font-family: var(--font-display);
  font-size: clamp(34px, 5vw, 52px);
  font-weight: 520;
  letter-spacing: -.025em;
  line-height: .98;
}

.method-dialog > form > p:not(.section-index) {
  max-width: 48em;
  color: var(--ink-soft);
}

.method-list {
  margin: 26px 0;
  border-top: 1px solid var(--line-dark);
}

.method-list div {
  display: grid;
  grid-template-columns: 145px 1fr;
  gap: 18px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.method-list dt {
  color: var(--wine);
  font-family: var(--font-data);
  font-size: 10px;
  font-weight: 780;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.method-list dd {
  margin: 0;
  color: var(--ink-soft);
  font-size: 12px;
}

.method-footnote {
  padding-left: 12px;
  border-left: 3px solid var(--wine);
  font-family: var(--font-data);
  font-size: 10px;
}

.toast {
  position: fixed;
  z-index: 2500;
  right: 18px;
  bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  max-width: min(340px, calc(100vw - 36px));
  padding: 12px 16px;
  color: var(--paper);
  background: var(--ink);
  font-size: 11px;
  font-weight: 680;
  box-shadow: 0 9px 30px rgba(26, 26, 32, .24);
}

.mobile-sheet-handle {
  display: none;
}

@media (max-width: 1180px) {
  :root {
    --archive-width: 380px;
  }

  .site-nav a:not(.nav-accent) {
    display: none;
  }

  .atlas-intro {
    width: 315px;
  }

  .atlas-intro h1 {
    font-size: 36px;
  }
}

@media (max-width: 820px) {
  :root {
    --header-height: 60px;
  }

  body {
    overflow: hidden;
  }

  .app-shell {
    min-height: 0;
  }

  .site-masthead {
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 0 13px;
  }

  .brand-mark {
    width: 40px;
    height: 40px;
    flex-basis: 40px;
  }

  .brand-copy strong {
    font-size: 16px;
  }

  .brand-copy small,
  .site-nav {
    display: none;
  }

  .method-button {
    max-width: 116px;
    padding: 9px 0 9px 12px;
    overflow: hidden;
    font-size: 9px;
    text-overflow: ellipsis;
  }

  .atlas-workspace,
  body.panel-collapsed .atlas-workspace {
    display: block;
    height: calc(100dvh - var(--header-height));
    min-height: 0;
  }

  .map-stage {
    position: absolute;
    inset: 0;
  }

  .archive-panel {
    position: absolute;
    z-index: 900;
    right: 0;
    bottom: 0;
    left: 0;
    display: flex !important;
    width: 100%;
    height: min(86dvh, 100%, 760px);
    overflow-y: auto;
    overscroll-behavior: contain;
    border-top: 1px solid var(--line-dark);
    border-right: 0;
    transform: translateY(calc(100% - 72px));
    transition: transform 300ms var(--ease);
  }

  body.mobile-panel-open .archive-panel {
    transform: translateY(0);
  }

  body.panel-collapsed .archive-panel > :not(.archive-heading) {
    display: initial;
  }

  .archive-heading,
  body.panel-collapsed .archive-heading {
    position: sticky;
    z-index: 4;
    top: 0;
    height: 72px;
    min-height: 72px;
    margin: 0 18px;
    align-items: center;
    justify-content: flex-start;
    padding: 13px 0 10px;
    border-bottom: 1px solid var(--line);
    background: var(--paper);
  }

  body.panel-collapsed .archive-heading > div {
    display: block;
  }

  .archive-heading .section-index {
    display: none;
  }

  .archive-heading h2 {
    font-size: 23px;
  }

  .archive-heading-toggle::after {
    top: 50%;
    right: 0;
    content: "↑";
    transform: translateY(-50%);
  }

  body.mobile-panel-open .archive-heading-toggle::after {
    content: "↓";
  }

  .mobile-sheet-handle {
    position: absolute;
    top: 7px;
    left: 50%;
    display: block;
    width: 38px;
    height: 3px;
    border-radius: 4px;
    background: var(--line-dark);
    transform: translateX(-50%);
  }

  .archive-heading,
  .discovery-form,
  .scope-filter,
  .filter-disclosure,
  .filter-actions,
  .results-heading,
  .list-footer {
    margin-right: 18px;
    margin-left: 18px;
  }

  .episode-list {
    flex: 0 0 auto;
    padding-right: 18px;
    padding-left: 30px;
    overflow: visible;
  }

  .episode-list::before {
    left: 23px;
  }

  .atlas-intro {
    top: 14px;
    left: 14px;
    width: min(330px, calc(100% - 28px));
    padding: 15px 17px;
  }

  .atlas-intro h1 {
    font-size: 32px;
  }

  .atlas-intro > p:not(.section-index) {
    margin: 9px 0 13px;
  }

  .atlas-stats dt {
    font-size: 19px;
  }

  body.atlas-engaged .atlas-intro {
    display: flex;
    width: min(340px, calc(100% - 28px));
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-top-width: 3px;
  }

  body.atlas-engaged .atlas-intro .section-index,
  body.atlas-engaged .atlas-intro > p:not(.section-index) {
    display: none;
  }

  body.atlas-engaged .atlas-intro h1 {
    min-width: 0;
    flex: 1;
    overflow: hidden;
    font-size: 18px;
    line-height: 1.1;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body.atlas-engaged .atlas-stats {
    display: block;
    flex: 0 0 auto;
    border-top: 0;
  }

  body.atlas-engaged .atlas-stats div {
    display: none;
  }

  body.atlas-engaged .atlas-stats div:nth-child(2) {
    display: block;
    padding: 0 0 0 12px;
    border-left: 1px solid var(--line);
  }

  body.mobile-panel-open .atlas-intro {
    visibility: hidden;
    opacity: 0;
  }

  .map-actions {
    right: 64px;
    bottom: calc(88px + env(safe-area-inset-bottom, 0px));
  }

  #map .leaflet-bottom {
    bottom: calc(72px + env(safe-area-inset-bottom, 0px));
  }

  .map-legend {
    bottom: calc(137px + env(safe-area-inset-bottom, 0px));
    left: 12px;
    width: min(275px, calc(100% - 24px));
  }

  .map-context {
    display: none;
  }

  .detail-panel {
    top: var(--header-height);
    width: 100%;
    border-left: 0;
  }

  .detail-scroll {
    padding-right: 25px;
    padding-bottom: calc(38px + env(safe-area-inset-bottom, 0px));
  }
}

@media (max-width: 520px) {
  .brand-copy {
    margin-left: 8px;
  }

  .brand-copy strong {
    font-size: 14px;
  }

  .method-button {
    max-width: 92px;
    font-size: 8px;
  }

  .atlas-intro {
    width: calc(100% - 28px);
  }

  .atlas-intro h1 {
    max-width: 8em;
    font-size: 29px;
  }

  .atlas-intro > p:not(.section-index) {
    display: none;
  }

  .atlas-stats {
    margin-top: 12px;
  }

  .scope-options b {
    font-size: 10px;
  }

  .detail-scroll {
    padding: 62px 18px calc(32px + env(safe-area-inset-bottom, 0px)) 45px;
  }

  .detail-header {
    grid-template-columns: 82px minmax(0, 1fr);
    gap: 13px;
  }

  .detail-art-wrap {
    width: 82px;
  }

  .detail-header h2 {
    font-size: 23px;
  }

  .detail-actions {
    grid-template-columns: 1fr;
  }

  .location-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .location-heading strong {
    text-align: left;
  }

  .method-dialog form {
    padding: 56px 23px 28px;
  }

  .method-list div {
    grid-template-columns: 1fr;
    gap: 5px;
  }
}

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

@media (forced-colors: active) {
  .iwp-marker,
  .legend-mark,
  .episode-item::before {
    border: 2px solid CanvasText !important;
    background: Canvas !important;
  }

  .iwp-cluster {
    border: 2px solid CanvasText;
    color: Canvas;
    background: CanvasText;
  }
}
