/* ==========================================================================
   STREET LEVEL — a journal of the everyday city
   Visual world: municipal wayfinding / transit diagram on a concrete field.
   ========================================================================== */

/* --- Face declarations (self-hosted, OFL) --------------------------------- */
@font-face {
  font-family: "Oswald";
  src: url("assets/oswald.ttf") format("truetype");
  font-weight: 200 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Literata";
  src: url("assets/literata.ttf") format("truetype");
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Literata";
  src: url("assets/literata.ttf") format("truetype");
  font-weight: 200 900;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("assets/ibm-plex-mono.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* --- Tokens --------------------------------------------------------------- */
:root {
  --paper: #e9eae3;
  --paper-2: #dfe0d8;
  --paper-3: #f3f3ee;
  --ink: #14171a;
  --ink-2: #2e3236;
  --muted: #565b5c;
  --rule: #c7c9c0;
  --rule-2: #9fa29a;

  --cat-culture: #b5322a;
  --cat-food: #9a5b0a;
  --cat-movement: #14639e;
  --cat-people: #6c3fa0;
  --cat-places: #1b6f46;

  --font-display: "Oswald", "Arial Narrow", "Helvetica Neue", sans-serif;
  --font-body: "Literata", Georgia, "Times New Roman", serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --pad: clamp(1rem, 4vw, 2.75rem);
  --maxw: 1180px;
  --focus: var(--ink);

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  font-kerning: normal;
  font-variant-numeric: oldstyle-nums;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a { text-underline-offset: 3px; }

html {
  scrollbar-color: var(--rule-2) var(--paper-2);
  scrollbar-width: thin;
}
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: var(--paper-2); }
::-webkit-scrollbar-thumb {
  background: var(--rule-2);
  border: 3px solid var(--paper-2);
}
::-webkit-scrollbar-thumb:hover { background: var(--ink-2); }

h1, h2, h3, p, figure { margin: 0; }

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

button { cursor: pointer; }

input, select { caret-color: var(--ink); }

::selection { background: var(--ink); color: var(--paper); }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-radius: 0;
}

/* Numbers read as data in this world. */
.tabular { font-variant-numeric: tabular-nums; }

/* --- Utilities ------------------------------------------------------------ */
.skip-link {
  position: absolute;
  left: 0.75rem;
  top: -4rem;
  z-index: 100;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 0.65rem 0.9rem;
  transition: top 0.2s var(--ease);
}
.skip-link:focus { top: 0.75rem; }

.wrap {
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--pad);
}

/* --- Masthead ------------------------------------------------------------- */
.masthead { background: var(--paper); }

.utility {
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.utility__inner {
  max-width: var(--maxw);
  margin-inline: auto;
  padding: 0.55rem var(--pad);
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-height: 2.4rem;
}
.utility__rule {
  width: 1.6rem;
  height: 1px;
  background: rgba(233, 234, 227, 0.45);
  flex: none;
}
.utility__item--note { opacity: 0.72; }
.utility__saved {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}
.utility__saved[hidden] { display: none; }
.utility__dot {
  width: 0.5rem;
  height: 0.5rem;
  background: var(--paper);
  opacity: 0.7;
  display: inline-block;
}

.masthead__inner {
  max-width: var(--maxw);
  margin-inline: auto;
  padding: 1.6rem var(--pad) 0;
}

.brand-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
  border-bottom: 1px solid var(--rule-2);
  padding-bottom: 1rem;
}
.brand-heading {
  margin: 0;
  line-height: 1;
  font-weight: inherit;
}
.brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.5rem, 8.5vw, 5.1rem);
  line-height: 0.82;
  letter-spacing: 0.005em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.14em;
}
.brand__tick {
  width: clamp(0.9rem, 2.6vw, 1.5rem);
  height: clamp(0.9rem, 2.6vw, 1.5rem);
  background: var(--cat-culture);
  display: inline-block;
  flex: none;
  transform: translateY(-0.02em);
}
.brand:hover .brand__tick { background: var(--cat-movement); }

.tagline {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  line-height: 1.5;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: right;
  flex: none;
  padding-bottom: 0.35rem;
}

/* Topic-line legend */
.lines {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.15rem;
  padding: 0.75rem 0 0.7rem;
  border-bottom: 2px solid var(--ink);
}
.line {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: none;
  border: 0;
  padding: 0.2rem 0;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
  position: relative;
}
.line::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -0.1rem;
  height: 2px;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s var(--ease);
}
.line:hover { color: var(--ink); }
.line[aria-pressed="true"] { color: var(--ink); }
.line[aria-pressed="true"]::after { transform: scaleX(1); }
.line__swatch {
  width: 1.35rem;
  height: 0.32rem;
  background: var(--c);
  display: inline-block;
  flex: none;
}
.line__swatch--all {
  background: repeating-linear-gradient(
    90deg,
    var(--cat-culture) 0 4px,
    var(--cat-food) 4px 8px,
    var(--cat-movement) 8px 12px,
    var(--cat-people) 12px 16px,
    var(--cat-places) 16px 20px
  );
}

/* --- Control deck --------------------------------------------------------- */
.controls {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--paper);
  border-bottom: 1px solid var(--rule-2);
  transition: box-shadow 0.25s var(--ease);
}
.controls.is-stuck { box-shadow: 0 10px 24px -18px rgba(20, 23, 26, 0.65); }

.controls__inner {
  max-width: var(--maxw);
  margin-inline: auto;
  padding: 0.85rem var(--pad);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 13.5rem auto;
  gap: 0.75rem;
  align-items: end;
}

.field { min-width: 0; }
.field__label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.4rem;
}
.field__box {
  position: relative;
  display: flex;
  align-items: center;
  background: var(--paper-3);
  border: 2px solid var(--ink);
  height: 3rem;
}
.field__icon {
  position: absolute;
  left: 0.7rem;
  color: var(--ink-2);
  pointer-events: none;
}
.field__box input {
  width: 100%;
  height: 100%;
  border: 0;
  background: transparent;
  padding: 0 2.6rem 0 2.45rem;
  font-family: var(--font-body);
  font-size: 1rem;
  min-width: 0;
}
.field__box input::placeholder { color: var(--muted); opacity: 1; }
.field__box input:focus { outline: none; }
.field__box:focus-within {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}
/* Search field clear button */
.field__clear {
  position: absolute;
  right: 0.35rem;
  top: 50%;
  transform: translateY(-50%);
  width: 2rem;
  height: 2rem;
  display: grid;
  place-items: center;
  border: 0;
  background: transparent;
  color: var(--ink-2);
}
.field__clear:hover { background: var(--paper-2); }
.field__clear[hidden] { display: none; }

.field__box--select { padding-right: 2.4rem; }
.field__box--select select {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  height: 100%;
  border: 0;
  background: transparent;
  padding: 0 0.6rem 0 0.8rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.field__box--select select:focus { outline: none; }
.field__chevron {
  position: absolute;
  right: 0.6rem;
  color: var(--ink);
  pointer-events: none;
}

/* Saved toggle */
.saved-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  height: 3rem;
  padding: 0 0.9rem;
  background: var(--paper-3);
  border: 2px solid var(--ink);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
  white-space: nowrap;
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}
.saved-toggle:hover { background: var(--paper-2); }
.saved-toggle[aria-pressed="true"] {
  background: var(--ink);
  color: var(--paper);
}
.saved-toggle__icon { flex: none; }
.saved-toggle__count {
  font-variant-numeric: tabular-nums;
  min-width: 1.5rem;
  padding: 0.1rem 0.4rem;
  background: var(--paper-2);
  color: var(--ink);
  text-align: center;
  font-size: 0.72rem;
}
.saved-toggle[aria-pressed="true"] .saved-toggle__count {
  background: var(--paper);
  color: var(--ink);
}

/* --- Result head ---------------------------------------------------------- */
.result-head {
  max-width: var(--maxw);
  margin-inline: auto;
  padding: 2.4rem var(--pad) 1rem;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.result-head__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.15rem, 2.4vw, 1.5rem);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.result-head__count {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

/* --- List + route spine --------------------------------------------------- */
.list {
  max-width: var(--maxw);
  margin-inline: auto;
  padding: 0 var(--pad) 4rem;
}

/* Category colour binding */
[data-cat="Culture"]  { --c: var(--cat-culture); }
[data-cat="Food"]     { --c: var(--cat-food); }
[data-cat="Movement"] { --c: var(--cat-movement); }
[data-cat="People"]   { --c: var(--cat-people); }
[data-cat="Places"]   { --c: var(--cat-places); }

/* Lead story */
.lead {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr);
  gap: clamp(1.5rem, 4vw, 3.4rem);
  align-items: center;
  padding: 0.6rem 0 2.6rem;
  border-bottom: 3px solid var(--ink);
  margin-bottom: 0.4rem;
}
.lead__media {
  position: relative;
  overflow: hidden;
  background: var(--paper-2);
}
.lead__media img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  filter: saturate(0.92) contrast(1.02);
  transition: transform 0.8s var(--ease);
}
.lead:hover .lead__media img { transform: scale(1.03); }
.lead__media::after {
  content: "";
  position: absolute;
  inset: 0;
  box-shadow: inset 0 0 0 1px rgba(20, 23, 26, 0.12);
}
.lead__body { min-width: 0; }

.lead__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2.1rem, 5.4vw, 3.7rem);
  line-height: 0.98;
  letter-spacing: -0.01em;
  margin: 0 0 0.7rem;
  text-wrap: balance;
}
.lead .meta,
.stop .meta { margin-bottom: 0.75rem; }
.lead__open,
.stop__open {
  background: none;
  border: 0;
  padding: 0;
  text-align: left;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  line-height: inherit;
  display: inline;
}
.lead__open::after,
.stop__open::after {
  content: "";
  display: block;
  height: 2px;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease);
  margin-top: 0.12em;
}
.lead__open:hover::after,
.lead__open:focus-visible::after,
.stop__open:hover::after,
.stop__open:focus-visible::after { transform: scaleX(1); }

.lead__summary {
  font-size: 1.06rem;
  color: var(--ink-2);
  max-width: 44ch;
  margin-bottom: 1.1rem;
}

/* Meta row */
.meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.55rem 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
}
.meta__dot {
  width: 0.28rem;
  height: 0.28rem;
  background: var(--rule-2);
  border-radius: 50%;
  flex: none;
}
.tag {
  display: inline-flex;
  align-items: center;
  background: var(--c, var(--ink));
  color: #fff;
  padding: 0.22rem 0.5rem 0.18rem;
  font-size: 0.66rem;
  letter-spacing: 0.1em;
  line-height: 1.2;
}
.meta__by { color: var(--ink-2); }

/* Route stops */
.route {
  position: relative;
  padding-top: 0.2rem;
}
.route::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: calc(1.35rem - 1px);
  width: 2px;
  background: var(--rule-2);
}
.stop {
  position: relative;
  display: grid;
  grid-template-columns: 2.7rem minmax(0, 1fr) 12rem;
  gap: 0 1.4rem;
  align-items: start;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--rule);
}
.stop__marker {
  position: relative;
  display: flex;
  justify-content: center;
  padding-top: 0.35rem;
}
.stop__dot {
  width: 0.95rem;
  height: 0.95rem;
  border-radius: 50%;
  background: var(--c, var(--ink));
  box-shadow: 0 0 0 4px var(--paper);
  position: relative;
  z-index: 1;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.stop:hover .stop__dot,
.stop:focus-within .stop__dot {
  transform: scale(1.35);
  box-shadow: 0 0 0 4px var(--paper), 0 0 0 6px var(--c);
}
.stop__body { min-width: 0; }
.stop__title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.3rem, 2.6vw, 1.7rem);
  line-height: 1.08;
  letter-spacing: -0.005em;
  margin: 0 0 0.4rem;
  text-wrap: balance;
}
.stop__summary {
  font-size: 1rem;
  color: var(--ink-2);
  max-width: 52ch;
  margin-bottom: 0.85rem;
}
.stop__media {
  align-self: start;
  overflow: hidden;
  background: var(--paper-2);
  position: relative;
}
.stop__media img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  filter: saturate(0.92) contrast(1.02);
  transition: transform 0.7s var(--ease);
}
.stop:hover .stop__media img { transform: scale(1.04); }

/* Save control (list) */
.save-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: none;
  border: 0;
  padding: 0.2rem 0;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.save-btn svg { flex: none; }
.save-btn:hover { color: var(--ink); }
.save-btn[aria-pressed="true"] { color: var(--ink); }
.save-btn[aria-pressed="true"] svg { fill: var(--ink); }

/* --- Empty state ---------------------------------------------------------- */
.empty {
  max-width: var(--maxw);
  margin: 0 auto 4rem;
  padding: 3.4rem var(--pad);
  border: 2px dashed var(--rule-2);
  text-align: center;
  color: var(--ink);
}
.empty[hidden] { display: none; }
.empty__mark { color: var(--rule-2); display: flex; justify-content: center; margin-bottom: 1rem; }
.empty__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.5rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 0.5rem;
}
.empty__text {
  color: var(--muted);
  max-width: 42ch;
  margin: 0 auto 1.4rem;
}

/* --- Buttons -------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  padding: 0.8rem 1.15rem;
  border: 2px solid var(--ink);
  background: transparent;
  color: var(--ink);
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}
.btn:hover { background: var(--ink); color: var(--paper); }
.btn--solid { background: var(--ink); color: var(--paper); }
.btn--solid:hover { background: #000; }

/* --- Skeleton ------------------------------------------------------------- */
.skeleton {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr);
  gap: 3rem;
  align-items: center;
  padding: 1rem 0 3rem;
}
.skeleton__media {
  aspect-ratio: 4 / 3;
  background: linear-gradient(90deg, var(--paper-2), var(--paper-3), var(--paper-2));
  background-size: 200% 100%;
  animation: shimmer 1.4s linear infinite;
}
.skeleton__lines { display: grid; gap: 0.8rem; }
.skeleton__lines span {
  height: 1.1rem;
  background: linear-gradient(90deg, var(--paper-2), var(--paper-3), var(--paper-2));
  background-size: 200% 100%;
  animation: shimmer 1.4s linear infinite;
}
.skeleton__lines span:nth-child(1) { height: 2.4rem; width: 90%; }
.skeleton__lines span:nth-child(2) { width: 70%; }
.skeleton__lines span:nth-child(3) { width: 50%; }
@keyframes shimmer {
  from { background-position: 200% 0; }
  to { background-position: -200% 0; }
}

/* ==========================================================================
   Detail / reading view
   ========================================================================== */
.article {
  min-height: 100vh;
  background: var(--paper);
}
.detail-open .browse { display: none; }
.detail-open .masthead,
.detail-open .controls,
.detail-open .footer { display: none; }

.article__bar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--paper);
  border-bottom: 1px solid var(--rule-2);
}
.article__bar-inner {
  max-width: var(--maxw);
  margin-inline: auto;
  padding: 0.6rem var(--pad);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  background: none;
  border: 0;
  padding: 0.4rem 0;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink);
}
.back-btn:hover { text-decoration: underline; text-underline-offset: 4px; }
.back-btn svg { flex: none; }

/* Save control (detail) */
.save-item {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border: 2px solid var(--ink);
  background: var(--paper-3);
  color: var(--ink);
  padding: 0.55rem 0.85rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}
.save-item:hover { background: var(--paper-2); }
.save-item[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.save-item[aria-pressed="true"] svg { fill: var(--paper); }
.save-item__stamp { display: inline-block; }
.save-item.is-stamping .save-item__stamp { animation: stamp 0.42s var(--ease); }
@keyframes stamp {
  0% { transform: scale(1); }
  35% { transform: scale(1.28); }
  100% { transform: scale(1); }
}

.progress {
  height: 3px;
  background: transparent;
  position: sticky;
  top: 3.55rem;
  z-index: 49;
}
.progress__fill {
  height: 100%;
  width: 0;
  background: var(--c, var(--ink));
  transition: width 0.12s linear;
}

.article__inner {
  max-width: 760px;
  margin-inline: auto;
  padding: clamp(2rem, 6vw, 4rem) var(--pad) 5rem;
}
.article__head { margin-bottom: 1.6rem; }
.article__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2.3rem, 6.4vw, 3.9rem);
  line-height: 0.99;
  letter-spacing: -0.012em;
  text-wrap: balance;
  margin: 0.6rem 0 1rem;
}
.article__meta { margin-bottom: 0; }

.article__figure { margin: 0 0 2rem; }
.article__figure img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: var(--paper-2);
  border: 1px solid var(--rule-2);
}
.article__figure figcaption {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  padding-top: 0.6rem;
}

.article__body {
  font-size: 1.14rem;
  line-height: 1.72;
  max-width: 68ch;
}
.article__body p + p { margin-top: 1.25em; }
.article__body p:first-of-type::first-letter {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 3.15em;
  line-height: 0.78;
  float: left;
  padding: 0.06em 0.1em 0 0;
}
.article__body p:first-of-type { text-indent: 0; }

.article__foot {
  margin-top: 3rem;
  padding-top: 1.4rem;
  border-top: 2px solid var(--ink);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.article__finish {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
}

/* detail entrance wipe */
@media (prefers-reduced-motion: no-preference) {
  .article.is-entering .article__inner { animation: wipe 0.5s var(--ease) both; }
  .article.is-entering .article__inner > * { animation: rise 0.55s var(--ease) both; }
  .article.is-entering .article__inner > *:nth-child(2) { animation-delay: 0.06s; }
  .article.is-entering .article__inner > *:nth-child(3) { animation-delay: 0.12s; }
  .article.is-entering .article__inner > *:nth-child(4) { animation-delay: 0.18s; }
}
@keyframes wipe {
  from { clip-path: inset(0 0 100% 0); }
  to { clip-path: inset(0 0 0 0); }
}
@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

/* --- Footer --------------------------------------------------------------- */
.footer {
  border-top: 3px solid var(--ink);
  background: var(--paper);
}
.footer__inner {
  max-width: var(--maxw);
  margin-inline: auto;
  padding: 2.2rem var(--pad) 3rem;
  display: grid;
  gap: 0.65rem;
}
.footer__brand {
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 1.3rem;
  letter-spacing: 0.03em;
}
.footer__note {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  line-height: 1.7;
  letter-spacing: 0.02em;
  color: var(--muted);
  max-width: 74ch;
}
.footer__meta {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

/* --- Responsive ----------------------------------------------------------- */
@media (max-width: 900px) {
  .controls__inner {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
  .saved-toggle { grid-column: 1 / -1; justify-content: center; }
  .stop { grid-template-columns: 2.7rem minmax(0, 1fr); }
  .stop__media { grid-column: 2; margin-top: 0.9rem; max-width: 20rem; }
}

@media (max-width: 640px) {
  .utility__item--note { display: none; }
  .brand-row { align-items: flex-start; flex-direction: column; gap: 0.7rem; }
  .tagline { text-align: left; }
  .lines { gap: 0.3rem 0.9rem; }

  .controls__inner {
    grid-template-columns: 1fr;
    gap: 0.7rem;
  }
  .field--select { display: grid; }
  .saved-toggle { width: 100%; }

  .lead { grid-template-columns: 1fr; gap: 1.1rem; padding-bottom: 1.8rem; }
  .lead__media { order: -1; }
  .lead__summary { font-size: 1rem; }

  .stop { grid-template-columns: 2.2rem minmax(0, 1fr); gap: 0 0.9rem; }
  .route::before { left: calc(1.1rem - 1px); }
  .stop__media { max-width: none; }
  .stop__summary { font-size: 0.97rem; }

  .article__body { font-size: 1.07rem; }
  .article__foot { flex-direction: column; align-items: flex-start; }
}

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