/* ------------------------------------------------------------------
   SIDEWALK — a journal of everyday city life
   Newsprint, ink and one long dashed route through the issue.
   ------------------------------------------------------------------ */

@font-face {
  font-family: "DM Serif Display";
  src: url("assets/dm-serif.ttf") format("truetype");
  font-weight: 400;
  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: "Work Sans";
  src: url("assets/work-sans.ttf") format("truetype");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --paper: #f3efe5;
  --paper-deep: #e8e1d2;
  --paper-light: #fbf8f1;
  --ink: #191713;
  --ink-soft: #3b3831;
  --muted: #5b564c;
  --muted-light: #b9b2a4;
  --rule: rgba(25, 23, 19, 0.18);
  --rule-strong: rgba(25, 23, 19, 0.54);
  --accent: #a9321b;
  --accent-deep: #7c2213;
  --accent-light: #e27259;
  --focus: #1e5aa8;
  --max: 1320px;
  --gutter: clamp(20px, 3.8vw, 56px);
  --font-display: "DM Serif Display", "Iowan Old Style", Georgia, serif;
  --font-text: "Literata", "Iowan Old Style", Georgia, serif;
  --font-ui: "Work Sans", "Helvetica Neue", Arial, sans-serif;
}

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

html {
  scroll-behavior: smooth;
  background: var(--paper);
  color-scheme: light;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.detail-open {
  overflow: hidden;
}

img {
  max-width: 100%;
}

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

button {
  cursor: pointer;
}

a {
  color: inherit;
}

p {
  margin: 0;
}

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

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

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

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 100;
  transform: translateY(-160%);
  padding: 12px 18px;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  transition: transform 160ms ease;
}

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

main:focus {
  outline: none;
}

/* ------------------------------------------------------------------
   Masthead
   ------------------------------------------------------------------ */

.utility {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 11px var(--gutter);
  border-bottom: 1px solid var(--ink);
  font-family: var(--font-ui);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.16em;
  line-height: 1.3;
  text-transform: uppercase;
  color: var(--muted);
}

.utility-middle {
  color: var(--ink);
}

.utility a {
  text-decoration: none;
  color: var(--ink);
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
  transition: border-color 150ms ease, color 150ms ease;
}

.utility a:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.masthead {
  position: relative;
  padding: clamp(22px, 3.2vw, 42px) var(--gutter) 7px;
  text-align: center;
}

.wordmark {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(4.4rem, 16.25vw, 15rem);
  font-weight: 400;
  line-height: 0.72;
  letter-spacing: -0.035em;
  text-transform: uppercase;
  white-space: nowrap;
}

.masthead-side {
  position: absolute;
  bottom: 14px;
  left: var(--gutter);
  margin: 0;
  font-family: var(--font-ui);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.17em;
  line-height: 1.65;
  text-transform: uppercase;
  color: var(--muted);
  text-align: left;
}

.masthead-side--right {
  left: auto;
  right: var(--gutter);
  text-align: right;
}

@media (max-width: 1399px) {
  .masthead-side {
    display: none;
  }

  .masthead {
    padding-top: 30px;
    padding-bottom: 10px;
  }
}

.tagline-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin: 0 var(--gutter);
  padding: 12px 0;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
}

.tagline {
  font-family: var(--font-display);
  font-size: clamp(0.95rem, 1.3vw, 1.15rem);
  letter-spacing: 0.005em;
}

.browse-link {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-ui);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
}

.browse-link span {
  display: inline-block;
  transition: transform 180ms ease;
}

.browse-link:hover {
  color: var(--accent);
}

.browse-link:hover span {
  transform: translateY(3px);
}

/* ------------------------------------------------------------------
   Issue introduction
   ------------------------------------------------------------------ */

.issue-intro {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(270px, 0.8fr);
  gap: clamp(28px, 5vw, 88px);
  align-items: end;
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(34px, 5vw, 68px) var(--gutter) clamp(28px, 3.6vw, 48px);
}

.eyebrow {
  font-family: var(--font-ui);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.19em;
  line-height: 1.4;
  text-transform: uppercase;
  color: var(--muted);
}

.issue-intro h2 {
  max-width: 15ch;
  margin: 14px 0 0;
  font-family: var(--font-display);
  font-size: clamp(2.55rem, 4.65vw, 4.3rem);
  font-weight: 400;
  line-height: 0.98;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.period {
  color: var(--accent);
}

.issue-note {
  max-width: 46ch;
}

.issue-note > p {
  font-family: var(--font-text);
  font-size: 16px;
  line-height: 1.58;
  color: var(--ink-soft);
}

.stats {
  display: flex;
  margin: 22px 0 0;
  padding-top: 13px;
  border-top: 1px solid var(--rule);
}

.stats > div {
  min-width: 64px;
  margin-right: 16px;
  padding-right: 16px;
  border-right: 1px solid var(--rule);
}

.stats > div:last-child {
  margin-right: 0;
  padding-right: 0;
  border-right: 0;
}

.stats dt {
  margin: 0;
  font-family: var(--font-ui);
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.stats dd {
  margin: 3px 0 0;
  font-family: var(--font-display);
  font-size: 26px;
  line-height: 1;
}

/* ------------------------------------------------------------------
   Search / filter toolbar
   ------------------------------------------------------------------ */

.toolbar {
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--paper);
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
}

.toolbar-inner {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) 188px auto auto;
  gap: 22px;
  align-items: end;
  max-width: var(--max);
  margin: 0 auto;
  padding: 13px var(--gutter) 12px;
}

.field-label {
  display: block;
  margin-bottom: 5px;
  font-family: var(--font-ui);
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.18em;
  line-height: 1.2;
  text-transform: uppercase;
  color: var(--muted);
}

.search-box {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 3px 0 8px;
  border-bottom: 1px solid var(--ink);
}

.search-box svg {
  width: 15px;
  height: 15px;
  flex: none;
}

.search-box input {
  width: 100%;
  min-width: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  font-family: var(--font-ui);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.4;
  color: var(--ink);
  outline: none;
}

.search-box input::placeholder {
  color: #6b6559;
  opacity: 1;
}

.search-box:focus-within {
  box-shadow: 0 2px 0 var(--accent);
}

.search-box input:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 4px;
}

.search-box input::-webkit-search-cancel-button {
  cursor: pointer;
}

.select-wrap {
  position: relative;
}

.select-wrap::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 13px;
  width: 7px;
  height: 7px;
  border-right: 1.5px solid var(--ink);
  border-bottom: 1.5px solid var(--ink);
  transform: translateY(-68%) rotate(45deg);
  pointer-events: none;
}

.select-field select {
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
  padding: 9px 34px 9px 11px;
  border: 1px solid var(--ink);
  border-radius: 2px;
  background: transparent;
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--ink);
  cursor: pointer;
}

.saved-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  align-self: end;
  padding: 9px 12px;
  border: 1px solid var(--ink);
  border-radius: 2px;
  background: transparent;
  font-family: var(--font-ui);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.11em;
  line-height: 1.3;
  text-transform: uppercase;
  white-space: nowrap;
  transition: background 150ms ease, color 150ms ease, border-color 150ms ease;
}

.saved-toggle svg {
  width: 12px;
  height: 14px;
  flex: none;
}

.saved-toggle:hover {
  background: var(--paper-deep);
}

.saved-toggle[aria-pressed="true"] {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}

.saved-toggle[aria-pressed="true"]:hover {
  background: var(--accent);
  border-color: var(--accent);
}

.saved-count {
  display: inline-grid;
  place-items: center;
  min-width: 17px;
  height: 17px;
  padding: 0 3px;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-size: 8px;
  letter-spacing: 0;
}

.result-count {
  margin: 0 0 10px auto;
  font-family: var(--font-ui);
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.14em;
  line-height: 1.4;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}

/* ------------------------------------------------------------------
   Story route / index
   ------------------------------------------------------------------ */

.issue {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter) clamp(56px, 8vw, 108px);
  scroll-margin-top: 88px;
}

.stories {
  position: relative;
}

.stories:not(:empty)::before {
  content: "";
  position: absolute;
  top: 50px;
  bottom: 50px;
  left: 26px;
  border-left: 1px dashed var(--rule-strong);
  pointer-events: none;
}

.stories:not(:empty)::after {
  content: "";
  position: absolute;
  bottom: 46px;
  left: 23px;
  width: 7px;
  height: 7px;
  border: 1px solid var(--paper);
  background: var(--accent);
  pointer-events: none;
}

.story {
  position: relative;
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) 330px;
  gap: clamp(20px, 3vw, 40px);
  align-items: start;
  padding: 34px 0;
  border-bottom: 1px solid var(--rule);
}

.story--lead {
  grid-template-columns: 52px minmax(0, 1.04fr) minmax(360px, 0.96fr);
  padding: 38px 0 48px;
  border-bottom: 1px solid var(--ink);
}

.story-node {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border: 1px solid var(--ink);
  border-radius: 50%;
  background: var(--paper);
  font-family: var(--font-ui);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  line-height: 1;
}

.story--lead .story-node {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--paper);
}

.story-copy {
  min-width: 0;
}

.story-kicker {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 10px;
  font-family: var(--font-ui);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.14em;
  line-height: 1.4;
  text-transform: uppercase;
  color: var(--muted);
}

.category {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--cat, var(--ink));
  font-weight: 600;
  letter-spacing: 0.14em;
}

.category::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.category--culture {
  --cat: #a9321b;
}

.category--food {
  --cat: #8a5614;
}

.category--movement {
  --cat: #2f556e;
}

.category--people {
  --cat: #6a3f5b;
}

.category--places {
  --cat: #3e4e3a;
}

.kicker-sep {
  color: var(--rule-strong);
}

.story-title {
  max-width: 22ch;
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.55rem, 2.4vw, 2.1rem);
  font-weight: 400;
  line-height: 1.03;
  letter-spacing: -0.012em;
  text-wrap: balance;
}

.story--lead .story-title {
  max-width: 14ch;
  font-size: clamp(2.35rem, 4.15vw, 3.8rem);
  line-height: 0.98;
  letter-spacing: -0.024em;
}

.title-button {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  letter-spacing: inherit;
  line-height: inherit;
  text-align: left;
  color: inherit;
  text-decoration: underline;
  text-decoration-color: transparent;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.1em;
  transition: color 150ms ease, text-decoration-color 150ms ease;
}

.title-button:hover {
  color: var(--accent);
  text-decoration-color: var(--accent);
}

.story-summary {
  max-width: 58ch;
  margin: 10px 0 0;
  font-family: var(--font-text);
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink-soft);
}

.story--lead .story-summary {
  max-width: 44ch;
  margin-top: 17px;
  font-size: 19px;
  line-height: 1.5;
}

.story-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px 24px;
  margin-top: 22px;
}

.story-byline {
  margin: 0;
  font-family: var(--font-ui);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.05em;
  line-height: 1.5;
  color: var(--muted);
}

.story-byline .byline-sep {
  margin: 0 6px;
  color: var(--rule-strong);
}

.read-story {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 0 3px;
  border: 0;
  border-bottom: 1px solid var(--ink);
  border-radius: 0;
  background: none;
  font-family: var(--font-ui);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.15em;
  line-height: 1.4;
  text-transform: uppercase;
  white-space: nowrap;
  transition: color 150ms ease, border-color 150ms ease;
}

.read-story .arrow {
  display: inline-block;
  font-size: 14px;
  letter-spacing: 0;
  transition: transform 180ms ease;
}

.read-story:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.read-story:hover .arrow {
  transform: translateX(3px);
}

.story--lead .read-story {
  padding: 12px 18px;
  border: 1px solid var(--ink);
  border-radius: 2px;
  background: var(--ink);
  color: var(--paper);
}

.story--lead .read-story:hover {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--paper);
}

.story-plate {
  min-width: 0;
  margin: 0;
}

.plate {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--rule-strong);
  background: var(--paper-deep);
}

.story-plate .plate {
  aspect-ratio: 3 / 2;
}

.story--lead .story-plate .plate {
  aspect-ratio: 4 / 3;
}

.plate img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.78) contrast(0.98) sepia(0.05);
  transition: transform 520ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

.story:hover .plate img {
  transform: scale(1.025);
}

.quote-plate {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  padding: 18px 20px;
  border: 1px solid var(--rule-strong);
  background: #e4ddce;
}

.quote-plate::before {
  content: "“";
  position: absolute;
  right: 10px;
  bottom: -26px;
  font-family: var(--font-display);
  font-size: 138px;
  line-height: 1;
  color: rgba(169, 50, 27, 0.14);
  pointer-events: none;
}

.quote-plate-label {
  position: relative;
  z-index: 1;
  font-family: var(--font-ui);
  font-size: 7.5px;
  font-weight: 600;
  letter-spacing: 0.17em;
  text-transform: uppercase;
  color: var(--muted);
}

.quote-plate blockquote {
  position: relative;
  z-index: 1;
  max-width: 18ch;
  margin: auto 0;
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 1.75vw, 1.65rem);
  line-height: 1.06;
  letter-spacing: -0.01em;
}

.quote-rule {
  position: relative;
  z-index: 1;
  display: block;
  width: 26px;
  height: 2px;
  background: var(--accent);
}

.story--lead .quote-plate {
  aspect-ratio: 4 / 3;
  padding: 24px 26px;
}

.story--lead .quote-plate blockquote {
  max-width: 15ch;
  font-size: clamp(1.8rem, 2.8vw, 2.6rem);
}

.story-plate figcaption {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 7px;
  font-family: var(--font-ui);
  font-size: 7.5px;
  font-weight: 600;
  letter-spacing: 0.13em;
  line-height: 1.4;
  text-transform: uppercase;
  color: var(--muted);
}

/* ------------------------------------------------------------------
   Empty state
   ------------------------------------------------------------------ */

.empty-state {
  max-width: 760px;
  margin: clamp(40px, 6vw, 72px) auto 20px;
  padding: clamp(32px, 5vw, 60px);
  border: 1px dashed var(--rule-strong);
  background: rgba(251, 248, 241, 0.36);
  text-align: center;
}

.empty-mark {
  display: grid;
  place-items: center;
  width: 68px;
  height: 68px;
  margin: 0 auto 20px;
  border: 1px solid var(--ink);
  border-radius: 50%;
  color: var(--accent);
}

.empty-mark svg {
  width: 38px;
  height: 38px;
}

.empty-state h2 {
  margin: 12px 0 10px;
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 3.4vw, 2.8rem);
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.02em;
}

.empty-state > p:not(.eyebrow) {
  max-width: 46ch;
  margin: 0 auto 24px;
  font-family: var(--font-text);
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink-soft);
}

.btn-ink {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 18px;
  border: 1px solid var(--ink);
  border-radius: 2px;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-ui);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.14em;
  line-height: 1.4;
  text-transform: uppercase;
  transition: background 150ms ease, border-color 150ms ease;
}

.btn-ink:hover {
  border-color: var(--accent);
  background: var(--accent);
}

[hidden] {
  display: none !important;
}

/* ------------------------------------------------------------------
   Footer
   ------------------------------------------------------------------ */

.site-footer {
  margin-top: clamp(40px, 6vw, 72px);
  padding: clamp(38px, 5vw, 66px) 0 24px;
  background: var(--ink);
  color: var(--paper);
}

.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.footer-topline {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-bottom: 22px;
  border-bottom: 1px solid rgba(243, 239, 229, 0.22);
}

.eyebrow--light {
  color: var(--muted-light);
  white-space: nowrap;
}

.route-dashes {
  flex: 1;
  height: 1px;
  background: repeating-linear-gradient(
    90deg,
    rgba(243, 239, 229, 0.4) 0 5px,
    transparent 5px 11px
  );
}

.footer-node {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid rgba(243, 239, 229, 0.5);
  border-radius: 50%;
  font-family: var(--font-ui);
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.06em;
}

.footer-mark {
  margin: clamp(26px, 3.6vw, 40px) 0 clamp(24px, 3.6vw, 42px);
  font-family: var(--font-display);
  font-size: clamp(3.6rem, 10.7vw, 9.5rem);
  line-height: 0.76;
  letter-spacing: -0.035em;
  text-transform: uppercase;
  color: var(--paper);
}

.footer-mark span {
  color: var(--accent-light);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1.1fr;
  gap: clamp(28px, 5vw, 72px);
  padding-top: 26px;
  border-top: 1px solid rgba(243, 239, 229, 0.22);
}

.footer-grid h2 {
  margin: 0 0 10px;
  font-family: var(--font-ui);
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted-light);
}

.footer-grid p {
  max-width: 42ch;
  font-family: var(--font-text);
  font-size: 13px;
  line-height: 1.62;
  color: #ddd6c8;
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: clamp(32px, 5vw, 56px);
  padding-top: 16px;
  border-top: 1px solid rgba(243, 239, 229, 0.22);
  font-family: var(--font-ui);
  font-size: 8px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted-light);
}

.footer-bottom a {
  color: var(--paper);
  text-decoration: none;
  border-bottom: 1px solid rgba(243, 239, 229, 0.4);
  padding-bottom: 2px;
}

.footer-bottom a:hover {
  color: var(--accent-light);
  border-color: var(--accent-light);
}

.site-footer :focus-visible {
  outline-color: var(--accent-light);
}

/* ------------------------------------------------------------------
   Detail reader
   ------------------------------------------------------------------ */

.detail-dialog {
  position: fixed;
  inset: 0;
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--paper);
  color: var(--ink);
}

.detail-dialog::backdrop {
  background: rgba(19, 17, 13, 0.58);
}

.detail-bar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  padding: 11px var(--gutter);
  border-bottom: 1px solid var(--ink);
  background: rgba(243, 239, 229, 0.97);
  backdrop-filter: blur(5px);
}

.close-detail {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  justify-self: start;
  padding: 8px 0;
  border: 0;
  background: none;
  font-family: var(--font-ui);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.14em;
  line-height: 1.4;
  text-transform: uppercase;
}

.close-detail svg {
  width: 13px;
  height: 13px;
  transition: transform 160ms ease;
}

.close-detail:hover {
  color: var(--accent);
}

.close-detail:hover svg {
  transform: translateX(-3px);
}

.detail-bar-mark {
  justify-self: center;
  font-family: var(--font-display);
  font-size: 19px;
  line-height: 1;
  letter-spacing: 0.015em;
}

.detail-bar-mark span {
  font-family: var(--font-ui);
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.save-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  justify-self: end;
  padding: 9px 12px;
  border: 1px solid var(--ink);
  border-radius: 2px;
  background: transparent;
  font-family: var(--font-ui);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.1em;
  line-height: 1.3;
  text-transform: uppercase;
  white-space: nowrap;
  transition: background 150ms ease, color 150ms ease, border-color 150ms ease;
}

.save-button svg {
  width: 12px;
  height: 14px;
  flex: none;
}

.save-button:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.save-button[aria-pressed="true"] {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--paper);
}

.save-button[aria-pressed="true"]:hover {
  border-color: var(--accent-deep);
  background: var(--accent-deep);
  color: var(--paper);
}

.save-button[aria-pressed="true"] .bookmark-shape {
  fill: currentColor;
}

.detail-article {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(34px, 5vw, 66px) var(--gutter) clamp(56px, 7vw, 96px);
}

.detail-kicker {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
  margin: 0;
  font-family: var(--font-ui);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
}

.detail-title {
  max-width: 18ch;
  margin: 14px 0 0;
  font-family: var(--font-display);
  font-size: clamp(2.65rem, 5.4vw, 5.15rem);
  font-weight: 400;
  line-height: 0.95;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.detail-dek {
  max-width: 50ch;
  margin: 23px 0 0;
  font-family: var(--font-text);
  font-size: clamp(1.05rem, 1.55vw, 1.32rem);
  line-height: 1.5;
  color: var(--ink-soft);
}

.detail-byline {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  max-width: 860px;
  margin: 27px 0 0;
  padding-top: 13px;
  border-top: 1px solid var(--rule);
  font-family: var(--font-ui);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.11em;
  line-height: 1.5;
  text-transform: uppercase;
  color: var(--muted);
}

.detail-byline strong {
  color: var(--ink);
  font-weight: 600;
}

.detail-byline .kicker-sep {
  color: var(--rule-strong);
}

.detail-figure {
  margin: clamp(28px, 4vw, 46px) 0 0;
}

.detail-figure .plate,
.detail-figure .quote-plate--detail {
  aspect-ratio: 16 / 7;
  max-height: 520px;
}

.detail-figure .quote-plate--detail {
  padding: clamp(26px, 4vw, 48px);
}

.detail-figure .quote-plate--detail blockquote {
  max-width: 20ch;
  font-size: clamp(2rem, 4.2vw, 4rem);
  line-height: 1.02;
}

.detail-figure .quote-plate--detail::before {
  right: 24px;
  bottom: -52px;
  font-size: 260px;
}

.detail-figure figcaption {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 8px;
  font-family: var(--font-ui);
  font-size: 7.5px;
  font-weight: 600;
  letter-spacing: 0.13em;
  line-height: 1.5;
  text-transform: uppercase;
  color: var(--muted);
}

.detail-grid {
  display: grid;
  grid-template-columns: 190px minmax(0, 660px);
  justify-content: center;
  gap: clamp(28px, 5vw, 72px);
  align-items: start;
  margin-top: clamp(34px, 5vw, 62px);
}

.detail-rail {
  position: sticky;
  top: 84px;
}

.rail-label {
  margin: 0 0 3px;
  font-family: var(--font-ui);
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.17em;
  text-transform: uppercase;
  color: var(--muted);
}

.rail-value {
  margin: 0 0 18px;
  font-family: var(--font-text);
  font-size: 14px;
  line-height: 1.45;
  color: var(--ink-soft);
}

.rail-value:last-child {
  margin-bottom: 0;
}

.detail-body {
  min-width: 0;
  font-family: var(--font-text);
  font-size: 19px;
  line-height: 1.65;
  color: var(--ink);
}

.detail-body p {
  margin: 0 0 1.35em;
}

.detail-body p:last-child {
  margin-bottom: 0;
}

.detail-body p:first-child::first-letter {
  float: left;
  margin: 0.08em 0.1em 0 0;
  font-family: var(--font-display);
  font-size: 4.15em;
  line-height: 0.76;
  color: var(--accent);
}

.detail-end {
  max-width: 940px;
  margin: clamp(48px, 7vw, 80px) auto 0;
  padding-top: 26px;
  border-top: 1px solid var(--ink);
}

.end-mark {
  width: 10px;
  height: 10px;
  margin: 0 0 24px;
  background: var(--accent);
}

.detail-fiction-note {
  margin: 0 0 22px;
  font-family: var(--font-ui);
  font-size: 8px;
  font-weight: 500;
  letter-spacing: 0.12em;
  line-height: 1.5;
  text-transform: uppercase;
  color: var(--muted);
}

.detail-end-grid {
  display: grid;
  grid-template-columns: 1fr minmax(0, 1.4fr);
  gap: 32px;
  align-items: start;
}

.back-issue {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 0 4px;
  border: 0;
  border-bottom: 1px solid var(--ink);
  background: none;
  font-family: var(--font-ui);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.14em;
  line-height: 1.5;
  text-transform: uppercase;
}

.back-issue:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.next-story {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  text-align: right;
}

.next-label {
  display: block;
  font-family: var(--font-ui);
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.17em;
  text-transform: uppercase;
  color: var(--muted);
}

.next-title {
  display: block;
  margin-top: 7px;
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2.2vw, 1.8rem);
  line-height: 1.05;
  letter-spacing: -0.01em;
  transition: color 150ms ease;
}

.next-story:hover .next-title {
  color: var(--accent);
}

.next-arrow {
  display: block;
  margin-top: 10px;
  font-size: 18px;
  line-height: 1;
  transition: transform 180ms ease;
}

.next-story:hover .next-arrow {
  transform: translateX(4px);
}

/* ------------------------------------------------------------------
   Responsive
   ------------------------------------------------------------------ */

@media (max-width: 980px) {
  .issue {
    scroll-margin-top: 128px;
  }

  .toolbar-inner {
    grid-template-columns: minmax(220px, 1fr) 178px auto;
    gap: 16px;
  }

  .result-count {
    grid-column: 1 / -1;
    margin: -4px 0 0;
    padding-top: 8px;
    border-top: 1px solid var(--rule);
  }

  .story,
  .story--lead {
    grid-template-columns: 52px minmax(0, 1fr);
    gap: 18px 24px;
  }

  .story-plate,
  .story--lead .story-plate {
    grid-column: 2;
    margin-top: 6px;
  }

  .story-plate .plate,
  .story--lead .story-plate .plate {
    aspect-ratio: 16 / 8;
  }

  .story--lead .story-title {
    max-width: 19ch;
  }

  .story--lead .quote-plate {
    aspect-ratio: 16 / 8;
  }
}

@media (max-width: 760px) {
  .utility {
    padding-top: 10px;
    padding-bottom: 10px;
  }

  .utility-middle {
    display: none;
  }

  .masthead {
    padding-top: 22px;
  }

  .tagline-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 7px;
    padding: 10px 0 11px;
  }

  .issue-intro {
    grid-template-columns: 1fr;
    gap: 24px;
    padding-top: 30px;
    padding-bottom: 28px;
  }

  .issue-intro h2 {
    max-width: 17ch;
    font-size: clamp(2.25rem, 10.8vw, 3rem);
  }

  .issue-note > p {
    font-size: 15px;
    max-width: 50ch;
  }

  .stats {
    margin-top: 18px;
  }

  .stats > div {
    min-width: 64px;
    margin-right: 16px;
    padding-right: 16px;
  }

  .toolbar {
    position: static;
  }

  .issue {
    scroll-margin-top: 16px;
  }

  .toolbar-inner {
    grid-template-columns: 1fr 1fr;
    gap: 13px 14px;
    padding-top: 12px;
    padding-bottom: 12px;
  }

  .search-field {
    grid-column: 1 / -1;
  }

  .search-box input,
  .select-field select {
    font-size: 16px;
  }

  .select-field {
    grid-column: 1;
  }

  .saved-toggle {
    grid-column: 2;
    justify-self: end;
  }

  .result-count {
    grid-column: 1 / -1;
    margin: 0;
    padding-top: 9px;
  }

  .stories:not(:empty)::before {
    top: 34px;
    bottom: 34px;
    left: 18px;
  }

  .stories:not(:empty)::after {
    bottom: 30px;
    left: 15px;
  }

  .story,
  .story--lead {
    grid-template-columns: 36px minmax(0, 1fr);
    gap: 14px 16px;
    padding: 28px 0;
  }

  .story--lead {
    padding-top: 32px;
    padding-bottom: 36px;
  }

  .story-node {
    width: 36px;
    height: 36px;
    font-size: 8px;
  }

  .story-kicker {
    margin-bottom: 8px;
    font-size: 8px;
  }

  .story-title,
  .story--lead .story-title {
    max-width: 20ch;
    font-size: clamp(1.55rem, 6.6vw, 2rem);
    line-height: 1.01;
  }

  .story-summary,
  .story--lead .story-summary {
    max-width: 52ch;
    margin-top: 9px;
    font-size: 14.5px;
    line-height: 1.55;
  }

  .story-foot {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
    margin-top: 18px;
  }

  .story-plate .plate,
  .story--lead .story-plate .plate,
  .story--lead .quote-plate {
    aspect-ratio: 3 / 2;
  }

  .quote-plate blockquote,
  .story--lead .quote-plate blockquote {
    max-width: 20ch;
    font-size: clamp(1.5rem, 6.5vw, 2rem);
  }

  .story-plate figcaption {
    font-size: 7px;
  }

  .story-byline {
    font-size: 9px;
  }

  .read-story {
    font-size: 8.5px;
  }

  .story--lead .read-story {
    padding: 11px 15px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 26px;
  }

  .footer-grid p {
    max-width: 48ch;
  }

  .footer-bottom {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .detail-bar {
    grid-template-columns: auto 1fr auto;
    gap: 8px;
    padding: 10px 16px;
  }

  .detail-bar-mark {
    display: none;
  }

  .close-detail,
  .save-button {
    font-size: 8px;
    letter-spacing: 0.08em;
  }

  .save-button {
    padding: 8px 9px;
  }

  .detail-kicker {
    font-size: 8px;
  }

  .detail-title {
    max-width: 17ch;
    font-size: clamp(2.4rem, 11vw, 3.3rem);
  }

  .detail-dek {
    margin-top: 18px;
    font-size: 1.02rem;
  }

  .detail-byline {
    margin-top: 20px;
  }

  .detail-figure .plate,
  .detail-figure .quote-plate--detail {
    aspect-ratio: 4 / 3;
  }

  .detail-figure .quote-plate--detail {
    padding: 24px;
  }

  .detail-figure .quote-plate--detail blockquote {
    font-size: clamp(1.8rem, 8.4vw, 2.5rem);
  }

  .detail-figure .quote-plate--detail::before {
    right: 12px;
    bottom: -30px;
    font-size: 170px;
  }

  .detail-figure figcaption {
    font-size: 7px;
  }

  .detail-grid {
    grid-template-columns: 1fr;
    gap: 28px;
    margin-top: 30px;
  }

  .detail-rail {
    position: static;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    padding: 14px 0;
    border-top: 1px solid var(--rule);
    border-bottom: 1px solid var(--rule);
  }

  .rail-label {
    margin-bottom: 3px;
  }

  .rail-value {
    margin-bottom: 0;
    font-size: 12.5px;
  }

  .detail-body {
    font-size: 18px;
    line-height: 1.66;
  }

  .detail-body p:first-child::first-letter {
    font-size: 3.7em;
  }

  .detail-end-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .next-story {
    text-align: left;
    padding-top: 18px;
    border-top: 1px solid var(--rule);
  }

  .next-arrow {
    font-size: 16px;
  }
}

@media (max-width: 420px) {
  .masthead {
    padding-top: 20px;
  }

  .wordmark {
    font-size: clamp(4.1rem, 17vw, 4.9rem);
  }

  .tagline {
    font-size: 0.92rem;
  }

  .saved-toggle {
    padding: 8px 9px;
    gap: 6px;
  }

  .saved-toggle span:not(.saved-count) {
    font-size: 8px;
  }

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

  .detail-rail > div:last-child {
    display: none;
  }
}

@media (max-width: 360px) {
  .wordmark {
    font-size: 15.8vw;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .detail-dialog[open] {
    animation: dialog-fade 220ms ease-out;
  }

  .detail-dialog[open] .detail-article {
    animation: article-rise 380ms cubic-bezier(0.2, 0.7, 0.2, 1);
  }

  @keyframes dialog-fade {
    from {
      opacity: 0;
    }
  }

  @keyframes article-rise {
    from {
      opacity: 0;
      transform: translateY(10px);
    }
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
