@font-face {
  font-family: "Space Grotesk";
  src: url("assets/space-grotesk.ttf") format("truetype");
  font-display: swap;
}

@font-face {
  font-family: "Literata";
  src: url("assets/literata.ttf") format("truetype");
  font-display: swap;
}

:root {
  --paper: #f2f0e8;
  --paper-light: #fbfaf5;
  --ink: #111310;
  --muted-ink: #55584f;
  --line: #1d1f1b;
  --culture: #a90f72;
  --food: #a63a0d;
  --movement: #145e9c;
  --people: #69409e;
  --places: #116d4d;
  --yellow: #ecf25a;
  --focus: #005fcc;
  --display: "Space Grotesk", Arial, sans-serif;
  --reading: "Literata", Georgia, serif;
  --ease: cubic-bezier(.22, 1, .36, 1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(17, 19, 16, .04) 1px, transparent 1px) 0 0 / 32px 32px,
    var(--paper);
  font-family: var(--display);
  font-size: 16px;
  line-height: 1.5;
}

button, input, select { font: inherit; }
button, select { cursor: pointer; }
button, input, select, a { touch-action: manipulation; }

button:focus-visible, input:focus-visible, select:focus-visible, a:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 8px;
  left: 8px;
  padding: 10px 14px;
  color: #fff;
  background: var(--ink);
  transform: translateY(-150%);
}
.skip-link:focus { transform: translateY(0); }

.masthead {
  min-height: 112px;
  border-bottom: 2px solid var(--line);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 32px;
  padding: 16px clamp(20px, 4vw, 64px);
  background: var(--paper-light);
}

.brand {
  width: max-content;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  font-size: 22px;
  font-weight: 700;
  line-height: .86;
  letter-spacing: -.04em;
  text-decoration: none;
  text-transform: uppercase;
}
.brand-mark { width: 48px; height: 48px; overflow: visible; }
.brand-mark path { fill: none; stroke: var(--ink); stroke-width: 2; }
.brand-mark circle { fill: var(--yellow); stroke: var(--ink); stroke-width: 2; }

.issue, .coordinates { margin: 0; font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.issue { text-align: center; }
.issue span { color: var(--muted-ink); }
.coordinates { justify-self: end; text-align: right; }

.intro {
  position: relative;
  min-height: 460px;
  overflow: hidden;
  padding: 72px clamp(20px, 8vw, 136px) 80px;
  border-bottom: 2px solid var(--line);
  background: var(--ink);
  color: var(--paper-light);
}
.eyebrow, .kicker {
  margin: 0 0 12px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.intro .eyebrow { color: var(--yellow); }
.intro h1 {
  position: relative;
  z-index: 2;
  max-width: 980px;
  margin: 0;
  font-size: clamp(62px, 8.8vw, 132px);
  font-weight: 500;
  line-height: .79;
  letter-spacing: -.075em;
  text-wrap: balance;
}
.dek {
  position: relative;
  z-index: 2;
  max-width: 500px;
  margin: 36px 0 0 auto;
  font-family: var(--reading);
  font-size: clamp(18px, 1.5vw, 23px);
  line-height: 1.45;
}
.intro-map {
  position: absolute;
  z-index: 1;
  right: -30px;
  top: 48px;
  width: 48vw;
  min-width: 560px;
  height: 260px;
  opacity: .56;
}
.imap { fill: none; stroke-width: 4; }
.imap-a { stroke: var(--culture); }.imap-b { stroke: var(--food); }.imap-c { stroke: var(--movement); }.imap-d { stroke: var(--people); }.imap-e { stroke: var(--places); }

.route-planner {
  display: grid;
  grid-template-columns: .75fr 1.55fr 1fr .8fr;
  border-bottom: 2px solid var(--line);
  background: var(--yellow);
}
.planner-heading, .field, .saved-filter { min-height: 126px; padding: 22px 24px; border-right: 2px solid var(--line); }
.planner-heading h2 { margin: 0; font-size: 32px; line-height: 1; letter-spacing: -.045em; }
.field label { display: block; margin-bottom: 9px; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.input-wrap, .select-wrap { position: relative; }
.input-wrap svg, .select-wrap svg {
  position: absolute;
  top: 50%;
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  pointer-events: none;
  transform: translateY(-50%);
}
.input-wrap svg { left: 14px; }.select-wrap svg { right: 14px; }
input, select {
  width: 100%;
  min-height: 52px;
  border: 2px solid var(--line);
  border-radius: 0;
  color: var(--ink);
  background: var(--paper-light);
}
input { padding: 10px 14px 10px 46px; }
select { appearance: none; padding: 10px 46px 10px 14px; }
input::placeholder { color: #6a6d64; opacity: 1; }
.saved-filter {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 0;
  border-right: 0;
  color: var(--ink);
  background: transparent;
  text-align: left;
  transition: color .18s ease, background-color .18s ease;
}
.saved-filter:hover, .saved-filter[aria-pressed="true"] { color: #fff; background: var(--ink); }
.saved-filter svg { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.saved-filter[aria-pressed="true"] svg { fill: var(--yellow); stroke: var(--yellow); }
.saved-filter b, .saved-filter small { display: block; }
.saved-filter b { font-size: 17px; }.saved-filter small { font-size: 12px; }

.map-section { padding: 68px clamp(20px, 4vw, 64px) 96px; }
.map-topline { display: flex; align-items: end; justify-content: space-between; gap: 24px; padding-bottom: 24px; }
.map-topline h2 { margin: 0; font-size: clamp(38px, 5vw, 72px); line-height: .95; letter-spacing: -.055em; }
.result-count { margin: 0; font-family: var(--reading); font-size: 15px; font-style: italic; }

.line-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  min-height: 49px;
  padding: 12px 0;
  border-top: 2px solid var(--line);
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.legend-item { display: inline-flex; align-items: center; gap: 8px; }
.legend-item i { width: 20px; height: 5px; background: var(--route); }
.culture { --route: var(--culture); }.food { --route: var(--food); }.movement { --route: var(--movement); }.people { --route: var(--people); }.places { --route: var(--places); }

.story-map { position: relative; }
.story-item {
  --route: var(--ink);
  position: relative;
  min-height: 184px;
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  border-bottom: 1px solid var(--line);
  animation: arrive .42s var(--ease) both;
}
.story-item[data-category="Culture"] { --route: var(--culture); --lane: 22px; }
.story-item[data-category="Food"] { --route: var(--food); --lane: 68px; }
.story-item[data-category="Movement"] { --route: var(--movement); --lane: 114px; }
.story-item[data-category="People"] { --route: var(--people); --lane: 160px; }
.story-item[data-category="Places"] { --route: var(--places); --lane: 206px; }

.rail {
  position: relative;
  background-image:
    linear-gradient(90deg, transparent 21px, var(--culture) 21px, var(--culture) 25px, transparent 25px),
    linear-gradient(90deg, transparent 67px, var(--food) 67px, var(--food) 71px, transparent 71px),
    linear-gradient(90deg, transparent 113px, var(--movement) 113px, var(--movement) 117px, transparent 117px),
    linear-gradient(90deg, transparent 159px, var(--people) 159px, var(--people) 163px, transparent 163px),
    linear-gradient(90deg, transparent 205px, var(--places) 205px, var(--places) 209px, transparent 209px);
}
.station {
  position: absolute;
  top: 50%;
  left: var(--lane);
  width: 26px;
  height: 26px;
  border: 5px solid var(--route);
  border-radius: 50%;
  background: var(--paper);
  transform: translate(-11px, -50%);
}
.station::after {
  content: "";
  position: absolute;
  top: 6px;
  left: 21px;
  width: calc(228px - var(--lane));
  height: 2px;
  background: var(--route);
}
.stop-number {
  position: absolute;
  top: calc(50% + 22px);
  left: var(--lane);
  width: 42px;
  font-family: var(--display);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  text-align: center;
  transform: translateX(-21px);
}
.story-copy { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) 128px; align-items: center; gap: 24px; padding: 28px 8px 28px 0; }
.story-category { margin: 0 0 8px; color: var(--route); font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.story-item h3 { max-width: 780px; margin: 0; font-size: clamp(27px, 3.3vw, 48px); font-weight: 520; line-height: 1; letter-spacing: -.045em; text-wrap: balance; }
.story-summary { max-width: 650px; margin: 12px 0 0; color: var(--muted-ink); font-family: var(--reading); font-size: 15px; line-height: 1.55; }
.story-meta { display: flex; gap: 8px 16px; flex-wrap: wrap; margin-top: 14px; font-size: 11px; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; }
.story-meta span + span::before { content: "/"; margin-right: 16px; color: #8b8d84; }
.open-item {
  width: 96px;
  height: 96px;
  border: 2px solid var(--line);
  border-radius: 50%;
  justify-self: center;
  color: var(--ink);
  background: transparent;
  font-size: 12px;
  font-weight: 750;
  letter-spacing: .06em;
  text-transform: uppercase;
  transition: color .18s ease, background-color .18s ease, transform .12s ease;
}
.story-item:hover .open-item { color: #fff; background: var(--ink); }
.open-item:active { transform: scale(.95); }
.saved-pin { display: inline-flex; align-items: center; gap: 5px; }
.saved-pin svg { width: 13px; height: 13px; fill: var(--ink); stroke: var(--ink); }

.empty-state { max-width: 620px; margin: 72px auto 0; padding: 48px; border: 2px solid var(--line); background: var(--paper-light); text-align: center; }
.empty-state svg { width: 64px; height: 64px; fill: none; stroke: var(--ink); stroke-width: 2; }
.empty-code { margin-bottom: 4px; color: var(--muted-ink); font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.empty-state h3 { margin: 0; font-size: 36px; letter-spacing: -.04em; }
.empty-state p { font-family: var(--reading); }
.empty-state button { min-height: 48px; padding: 10px 18px; border: 2px solid var(--line); color: #fff; background: var(--ink); font-weight: 700; }

footer {
  min-height: 220px;
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: end;
  gap: 40px;
  padding: 56px clamp(20px, 4vw, 64px);
  color: #fff;
  background: var(--ink);
}
footer p, footer a { margin: 0; }
.footer-brand { font-size: clamp(32px, 5vw, 72px); font-weight: 700; line-height: .8; letter-spacing: -.06em; text-transform: uppercase; }
footer > p:not(.footer-brand) { max-width: 260px; font-family: var(--reading); font-size: 14px; }
footer a { min-height: 44px; display: flex; align-items: center; color: var(--yellow); font-size: 13px; font-weight: 700; text-transform: uppercase; }

.story-dialog {
  width: min(1060px, calc(100vw - 48px));
  max-width: none;
  max-height: calc(100dvh - 48px);
  margin: auto;
  padding: 0;
  border: 2px solid var(--line);
  border-radius: 0;
  color: var(--ink);
  background: var(--paper-light);
  box-shadow: 18px 18px 0 rgba(0, 0, 0, .35);
}
.story-dialog::backdrop { background: rgba(17, 19, 16, .78); }
.detail-content { --route: var(--ink); position: relative; min-height: 100%; overflow: hidden; }
.detail-content[data-category="Culture"] { --route: var(--culture); }.detail-content[data-category="Food"] { --route: var(--food); }.detail-content[data-category="Movement"] { --route: var(--movement); }.detail-content[data-category="People"] { --route: var(--people); }.detail-content[data-category="Places"] { --route: var(--places); }
.detail-route { position: absolute; top: 0; left: 36px; bottom: 0; width: 28px; }
.detail-line { position: absolute; top: 0; bottom: 0; left: 12px; width: 5px; background: var(--route); }
.detail-stop { position: absolute; top: 176px; left: 0; width: 29px; height: 29px; border: 5px solid var(--route); border-radius: 50%; background: var(--paper-light); }
.detail-header { padding: 0 72px 48px 96px; border-bottom: 1px solid var(--line); }
.detail-toolbar { min-height: 80px; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.close-detail, .save-item {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  border: 0;
  color: var(--ink);
  background: transparent;
  font-size: 12px;
  font-weight: 750;
  letter-spacing: .05em;
  text-transform: uppercase;
  transition: color .18s ease, background-color .18s ease;
}
.close-detail svg, .save-item svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.close-detail:hover, .save-item:hover { text-decoration: underline; text-underline-offset: 4px; }
.save-item { padding: 0 14px; border: 2px solid var(--line); }
.save-item[aria-pressed="true"] { color: #fff; background: var(--ink); }
.save-item[aria-pressed="true"] svg { fill: var(--yellow); stroke: var(--yellow); }
.detail-category { margin: 26px 0 12px; color: var(--route); font-size: 13px; font-weight: 750; letter-spacing: .12em; text-transform: uppercase; }
.detail-header h2 { max-width: 800px; margin: 0; font-size: clamp(44px, 6.2vw, 82px); font-weight: 520; line-height: .88; letter-spacing: -.065em; text-wrap: balance; }
.detail-summary { max-width: 660px; margin: 28px 0; font-family: var(--reading); font-size: 20px; line-height: 1.5; }
.detail-byline { display: flex; flex-wrap: wrap; gap: 8px 24px; font-size: 12px; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; }
.detail-body { max-width: 730px; margin: 0 auto; padding: 64px 48px 72px; font-family: var(--reading); font-size: clamp(18px, 1.7vw, 21px); line-height: 1.78; }
.detail-body p { margin: 0 0 1.5em; }
.detail-body p:first-child::first-letter { float: left; margin: .04em .12em 0 0; color: var(--route); font-family: var(--display); font-size: 4.2em; font-weight: 600; line-height: .76; }
.end-note { padding: 38px 64px 48px 96px; border-top: 2px solid var(--line); background: var(--yellow); }
.end-note p { margin: 0 0 8px; font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.close-detail-bottom { padding: 0; font-size: 17px; }

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

@keyframes arrive { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 900px) {
  .masthead { grid-template-columns: 1fr auto; min-height: 94px; }
  .issue { display: none; }
  .route-planner { grid-template-columns: 1fr 1fr; }
  .planner-heading, .field, .saved-filter { min-height: 112px; }
  .planner-heading, .search-field { border-bottom: 2px solid var(--line); }
  .search-field { border-right: 0; }
  .saved-filter { border-right: 0; }
  .story-item { grid-template-columns: 180px minmax(0, 1fr); }
  .story-item[data-category="Culture"] { --lane: 18px; }.story-item[data-category="Food"] { --lane: 50px; }.story-item[data-category="Movement"] { --lane: 82px; }.story-item[data-category="People"] { --lane: 114px; }.story-item[data-category="Places"] { --lane: 146px; }
  .rail { background-image: linear-gradient(90deg, transparent 17px, var(--culture) 17px, var(--culture) 21px, transparent 21px), linear-gradient(90deg, transparent 49px, var(--food) 49px, var(--food) 53px, transparent 53px), linear-gradient(90deg, transparent 81px, var(--movement) 81px, var(--movement) 85px, transparent 85px), linear-gradient(90deg, transparent 113px, var(--people) 113px, var(--people) 117px, transparent 117px), linear-gradient(90deg, transparent 145px, var(--places) 145px, var(--places) 149px, transparent 149px); }
  .station::after { width: calc(164px - var(--lane)); }
  .story-copy { grid-template-columns: 1fr; }
  .open-item { width: auto; height: 48px; padding: 0 20px; border-radius: 0; justify-self: start; }
}

@media (max-width: 600px) {
  .masthead { min-height: 80px; padding: 12px 16px; }
  .brand { font-size: 17px; }.brand-mark { width: 38px; height: 38px; }
  .coordinates { font-size: 9px; }
  .intro { min-height: 420px; padding: 56px 20px 58px; }
  .intro h1 { font-size: clamp(54px, 17vw, 72px); line-height: .83; }
  .dek { max-width: 330px; margin-top: 34px; margin-left: 0; font-size: 17px; }
  .intro-map { top: 122px; right: -220px; min-width: 620px; opacity: .38; }
  .route-planner { display: block; }
  .planner-heading, .field, .saved-filter { width: 100%; min-height: auto; padding: 18px 20px; border-right: 0; border-bottom: 2px solid var(--line); }
  .planner-heading { display: flex; align-items: baseline; justify-content: space-between; }
  .planner-heading .kicker { margin: 0; }.planner-heading h2 { font-size: 28px; }
  .saved-filter { min-height: 72px; justify-content: flex-start; border-bottom: 0; }
  .map-section { padding: 48px 16px 64px; }
  .map-topline { display: block; }
  .result-count { margin-top: 12px; }
  .line-legend { gap: 8px 14px; font-size: 10px; }
  .legend-item i { width: 14px; }
  .story-item { min-height: 0; grid-template-columns: 70px minmax(0, 1fr); }
  .story-item[data-category="Culture"], .story-item[data-category="Food"], .story-item[data-category="Movement"], .story-item[data-category="People"], .story-item[data-category="Places"] { --lane: 26px; }
  .rail { background-image: linear-gradient(90deg, transparent 25px, var(--route) 25px, var(--route) 29px, transparent 29px); }
  .station::after { width: 36px; }
  .stop-number { left: 28px; }
  .story-copy { gap: 20px; padding: 28px 0 32px; }
  .story-item h3 { font-size: 28px; line-height: 1.02; }
  .story-summary { font-size: 14px; }
  .story-meta { display: block; }
  .story-meta span { display: block; margin-top: 3px; }
  .story-meta span + span::before { display: none; }
  footer { display: block; min-height: 300px; padding: 48px 20px; }
  footer > p:not(.footer-brand) { margin-top: 28px; }
  footer a { margin-top: 36px; }
  .story-dialog { width: 100vw; height: 100dvh; max-height: none; border: 0; box-shadow: none; }
  .detail-route { left: 14px; }.detail-header { padding: 0 20px 40px 55px; }
  .detail-toolbar { min-height: 74px; align-items: center; }
  .close-detail { width: 48px; padding: 0; justify-content: center; }
  .close-detail > svg { width: 26px; height: 26px; }
  .detail-toolbar .close-detail { font-size: 0; }
  .save-item { min-height: 46px; }
  .detail-category { margin-top: 18px; }
  .detail-header h2 { font-size: clamp(44px, 13.6vw, 62px); }
  .detail-summary { font-size: 17px; }
  .detail-byline { display: block; }
  .detail-byline span { display: block; margin-top: 3px; }
  .detail-body { padding: 48px 24px 56px 55px; font-size: 17px; line-height: 1.72; }
  .end-note { padding: 32px 20px 40px 55px; }
  .close-detail-bottom { width: auto; justify-content: flex-start; font-size: 15px; }
}

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