/* --------------------------------------------------------------------------
   Sidewalk — a city journal
   Local type: DM Serif Display, Literata, DM Sans, IBM Plex Mono
   -------------------------------------------------------------------------- */

@font-face {
  font-family: "DM Serif Display";
  src: url("assets/dm-serif.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

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

@font-face {
  font-family: "DM Sans";
  src: url("assets/dm-sans.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Mono";
  src: url("assets/ibm-plex-mono.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

:root {
  --paper: #f4efe5;
  --paper-deep: #ebe3d4;
  --card: #fbf8f1;
  --ink: #1c1a16;
  --ink-soft: #4f4a40;
  --muted: #5f584b;
  --rule: #c9bfae;
  --rule-soft: #dbd2c1;
  --accent: #9e3520;
  --accent-bright: #b4452d;
  --on-accent: #fff8ec;
  --olive: #4c5b3a;

  --serif: "DM Serif Display", Georgia, "Times New Roman", serif;
  --body-serif: "Literata", Georgia, "Times New Roman", serif;
  --sans: "DM Sans", "Helvetica Neue", Arial, sans-serif;
  --mono: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;

  --page-gutter: clamp(20px, 4vw, 64px);
  --max-width: 1320px;
  --focus: 2px solid var(--ink);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 24px;
}

body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--paper);
  background-image: radial-gradient(rgba(28, 26, 22, 0.035) 0.55px, transparent 0.55px);
  background-size: 5px 5px;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.has-dialog {
  overflow: hidden;
}

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

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

button {
  cursor: pointer;
}

a {
  color: inherit;
}

[hidden] {
  display: none !important;
}

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

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

.container {
  width: min(calc(100% - (var(--page-gutter) * 2)), var(--max-width));
  margin-inline: auto;
}

.visually-hidden {
  position: absolute !important;
  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;
  padding: 12px 18px;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--mono);
  font-size: 12px;
  text-decoration: none;
  transform: translateY(-160%);
  transition: transform 180ms ease;
}

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

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

.utility-bar {
  background: var(--ink);
  color: var(--paper);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.13em;
  line-height: 1;
  text-transform: uppercase;
}

.utility-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 35px;
}

.utility-note {
  color: #d8cdb8;
}

.masthead-grid {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 48px;
  padding-block: clamp(24px, 3.5vw, 42px) clamp(18px, 2.5vw, 30px);
}

.eyebrow,
.kicker,
.toolbar-label {
  margin: 0;
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 400;
  letter-spacing: 0.16em;
  line-height: 1.4;
  text-transform: uppercase;
}

.eyebrow {
  margin-bottom: 10px;
  color: var(--accent);
}

.wordmark {
  margin: 0;
  color: var(--ink);
  font-family: var(--serif);
  font-size: clamp(58px, 8.5vw, 104px);
  font-weight: 400;
  letter-spacing: -0.055em;
  line-height: 0.72;
}

.wordmark-link {
  display: inline-block;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  line-height: inherit;
  text-decoration: none;
}

.wordmark-dot {
  color: var(--accent);
}

.issue-block {
  display: flex;
  flex-direction: column;
  flex: 0 0 auto;
  gap: 3px;
  padding-left: 20px;
  border-left: 1px solid var(--rule);
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  line-height: 1.55;
  text-align: right;
  text-transform: uppercase;
}

.issue-line:last-child {
  color: var(--muted);
}

.navstrip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  min-height: 53px;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--rule);
}

.topic-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 26px;
}

.nav-topic {
  position: relative;
  min-height: 44px;
  padding: 12px 0 10px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: none;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transition: color 160ms ease, border-color 160ms ease;
}

.nav-topic:hover {
  color: var(--accent);
}

.nav-topic[aria-current="true"] {
  border-bottom-color: var(--accent);
  color: var(--accent);
}

.nav-meta {
  flex: 0 0 auto;
  margin: 0;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* --------------------------------------------------------------------------
   Editor's dispatch
   -------------------------------------------------------------------------- */

.dispatch {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(260px, 0.55fr);
  gap: clamp(32px, 6vw, 96px);
  padding-block: clamp(40px, 5vw, 66px) clamp(42px, 5vw, 64px);
  border-bottom: 1px solid var(--rule);
}

.dispatch-lead .kicker {
  margin-bottom: 18px;
  color: var(--accent);
}

.dispatch-title {
  max-width: 17ch;
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(36px, 4.6vw, 62px);
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: 0.98;
}

.dispatch-title em {
  color: var(--accent);
  font-style: normal;
  text-decoration: underline;
  text-decoration-color: rgba(158, 53, 32, 0.32);
  text-decoration-thickness: 0.06em;
  text-underline-offset: 0.12em;
}

.dispatch-copy {
  align-self: end;
  max-width: 42ch;
  padding-top: 22px;
  border-top: 1px solid var(--ink);
}

.dispatch-copy p {
  margin: 0 0 16px;
  color: var(--ink-soft);
  font-family: var(--body-serif);
  font-size: 16px;
  line-height: 1.68;
}

.dispatch-copy .dispatch-sign {
  margin: 0;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* --------------------------------------------------------------------------
   Feed head and controls
   -------------------------------------------------------------------------- */

.feed {
  padding-block: clamp(38px, 4vw, 52px) clamp(64px, 8vw, 104px);
}

.feed-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--ink);
}

.feed-head .kicker {
  margin-bottom: 8px;
  color: var(--accent);
}

.feed-head h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(30px, 3.6vw, 43px);
  font-weight: 400;
  letter-spacing: -0.025em;
  line-height: 1;
}

.result-count {
  flex: 0 0 auto;
  margin: 0 0 4px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 218px minmax(196px, auto);
  align-items: end;
  gap: 18px;
  padding-block: 18px;
  border-bottom: 1px solid var(--rule);
}

.field {
  min-width: 0;
}

.field label,
.toolbar-label {
  display: block;
  margin-bottom: 7px;
  color: var(--ink-soft);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.input-wrap,
.select-wrap {
  position: relative;
}

.input-icon {
  position: absolute;
  top: 50%;
  left: 15px;
  width: 18px;
  height: 18px;
  color: var(--muted);
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 1.6;
  transform: translateY(-50%);
  pointer-events: none;
}

#search,
#topic {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--rule);
  border-radius: 1px;
  background: var(--card);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
}

#search {
  padding: 11px 14px 11px 44px;
}

#search::placeholder {
  color: #756d5e;
  opacity: 1;
}

#search:hover,
#topic:hover {
  border-color: #a79a85;
}

#search:focus-visible,
#topic:focus-visible {
  outline: var(--focus);
  outline-offset: 2px;
  border-color: var(--ink);
}

#topic {
  appearance: none;
  padding: 11px 42px 11px 14px;
  cursor: pointer;
}

.select-chevron {
  position: absolute;
  top: 50%;
  right: 14px;
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.6;
  transform: translateY(-50%);
  pointer-events: none;
}

.saved-filter {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  min-height: 48px;
  padding: 10px 14px;
  border: 1px solid var(--ink);
  border-radius: 1px;
  background: transparent;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 13.5px;
  font-weight: 500;
  text-align: left;
  transition: background-color 160ms ease, color 160ms ease;
}

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

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

.bookmark-icon {
  flex: 0 0 auto;
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-linejoin: round;
  stroke-width: 1.65;
}

.saved-filter[aria-pressed="true"] .bookmark-icon,
.save-button[aria-pressed="true"] .bookmark-icon {
  fill: currentColor;
}

.saved-count {
  display: inline-grid;
  min-width: 23px;
  height: 23px;
  margin-left: auto;
  padding-inline: 6px;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-family: var(--mono);
  font-size: 9.5px;
  line-height: 1;
}

.saved-filter[aria-pressed="true"] .saved-count {
  border-color: rgba(244, 239, 229, 0.55);
}

/* --------------------------------------------------------------------------
   Story grid
   -------------------------------------------------------------------------- */

.stories {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(34px, 4vw, 52px) clamp(22px, 2.6vw, 34px);
  padding-top: clamp(30px, 3.5vw, 44px);
}

.story {
  min-width: 0;
  --cat: var(--ink-soft);
}

.story[data-category="Places"] {
  --cat: #4c5b3a;
}

.story[data-category="Movement"] {
  --cat: #24596a;
}

.story[data-category="People"] {
  --cat: #9e3520;
}

.story[data-category="Food"] {
  --cat: #7a4a0a;
}

.story[data-category="Culture"] {
  --cat: #6c3d66;
}

.story-link {
  display: flex;
  flex-direction: column;
  height: 100%;
  color: inherit;
  text-decoration: none;
}

.story-media {
  position: relative;
  aspect-ratio: 4 / 3;
  margin: 0 0 18px;
  overflow: hidden;
  background: var(--paper-deep);
}

.story-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.84) contrast(0.97) sepia(0.07);
  transition: transform 600ms cubic-bezier(0.2, 0.7, 0.2, 1), filter 300ms ease;
}

.story-number {
  position: absolute;
  top: 10px;
  left: 10px;
  display: inline-block;
  padding: 4px 7px 3px;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.08em;
  line-height: 1;
}

.story-copy {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: flex-start;
}

.story-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  width: 100%;
  margin-bottom: 11px;
}

.story-category,
.topic-label {
  color: var(--cat, var(--accent));
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.14em;
  line-height: 1;
  text-transform: uppercase;
}

.story-category {
  padding: 5px 7px 4px;
  border: 1px solid currentColor;
}

.saved-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.saved-badge svg {
  width: 12px;
  height: 12px;
  fill: currentColor;
  stroke: currentColor;
  stroke-linejoin: round;
  stroke-width: 1.4;
}

.story-title {
  margin: 0 0 12px;
  font-family: var(--serif);
  font-size: clamp(25px, 2.2vw, 29px);
  font-weight: 400;
  letter-spacing: -0.018em;
  line-height: 1.04;
  transition: color 160ms ease;
}

.story-summary {
  margin: 0 0 20px;
  color: var(--ink-soft);
  font-family: var(--body-serif);
  font-size: 15px;
  line-height: 1.58;
}

.story-foot {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  width: 100%;
  margin-top: auto;
  padding-top: 13px;
  border-top: 1px solid var(--rule-soft);
}

.story-byline {
  margin: 0;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.03em;
  line-height: 1.65;
  text-transform: uppercase;
}

.read-cue {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 5px;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.read-cue svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.5;
  transition: transform 180ms ease;
}

.story-link:hover .story-media img {
  filter: saturate(1) contrast(1) sepia(0.02);
  transform: scale(1.028);
}

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

.story-link:hover .read-cue svg {
  transform: translateX(4px);
}

/* Featured lead story */

.story--lead {
  grid-column: 1 / -1;
  padding-bottom: 8px;
}

.story--lead .story-link {
  display: grid;
  grid-template-columns: minmax(0, 1.13fr) minmax(0, 0.87fr);
  background: var(--card);
  border: 1px solid var(--rule);
}

.story--lead .story-media {
  height: 100%;
  min-height: clamp(340px, 38vw, 486px);
  margin: 0;
  aspect-ratio: auto;
}

.story--lead .story-copy {
  justify-content: flex-start;
  padding: clamp(28px, 3.3vw, 48px);
}

.story--lead .story-title {
  max-width: 12.5ch;
  margin-bottom: 18px;
  font-size: clamp(38px, 4.25vw, 60px);
  letter-spacing: -0.032em;
  line-height: 0.98;
}

.story--lead .story-summary {
  max-width: 39ch;
  margin-bottom: 24px;
  font-size: clamp(16px, 1.35vw, 18px);
  line-height: 1.55;
}

.story--lead .story-foot {
  border-top-color: var(--rule);
}

.story--lead .story-number {
  top: 14px;
  left: 14px;
}

/* Loading state */

.stories[aria-busy="true"]::before {
  content: "Gathering the September stories…";
  grid-column: 1 / -1;
  padding: 60px 0;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-align: center;
  text-transform: uppercase;
}

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

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-top: clamp(30px, 4vw, 48px);
  padding: clamp(46px, 7vw, 86px) 24px;
  border: 1px solid var(--rule);
  background: var(--card);
  text-align: center;
}

.empty-icon {
  width: 58px;
  height: 58px;
  margin-bottom: 22px;
  fill: none;
  stroke: var(--accent);
  stroke-linecap: round;
  stroke-width: 1.4;
}

.empty-state .kicker {
  color: var(--accent);
}

.empty-state h3 {
  margin: 12px 0 10px;
  font-family: var(--serif);
  font-size: clamp(30px, 3.2vw, 40px);
  font-weight: 400;
  letter-spacing: -0.025em;
  line-height: 1.05;
}

.empty-hint {
  max-width: 44ch;
  margin: 0 0 26px;
  color: var(--ink-soft);
  font-family: var(--body-serif);
  font-size: 16px;
  line-height: 1.6;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 11px 20px;
  border: 1px solid var(--ink);
  border-radius: 1px;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: background-color 160ms ease, color 160ms ease;
}

.button-accent {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--on-accent);
}

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

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

.site-footer {
  background: var(--ink);
  color: var(--paper);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: clamp(34px, 5vw, 80px);
  padding-block: clamp(52px, 6vw, 76px) 42px;
}

.footer-wordmark {
  margin: 0 0 14px;
  font-family: var(--serif);
  font-size: 46px;
  letter-spacing: -0.045em;
  line-height: 0.85;
}

.footer-wordmark span {
  color: #cf684c;
}

.footer-grid p {
  max-width: 38ch;
  margin: 0;
  color: #d7cdbb;
  font-family: var(--body-serif);
  font-size: 14px;
  line-height: 1.65;
}

.footer-heading {
  margin: 0 0 14px;
  color: #cf684c;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.footer-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-top: 8px;
  color: var(--paper);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-underline-offset: 4px;
  text-transform: uppercase;
}

.footer-link:hover {
  color: #f0a58d;
}

.footer-link:focus-visible {
  outline-color: var(--paper);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding-block: 18px 26px;
  border-top: 1px solid rgba(244, 239, 229, 0.24);
  color: #bdb2a0;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

/* --------------------------------------------------------------------------
   Detail dialog
   -------------------------------------------------------------------------- */

.detail {
  width: min(900px, calc(100vw - 48px));
  max-width: none;
  max-height: min(92vh, 1020px);
  margin: auto;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--ink);
  border-radius: 1px;
  background: var(--paper);
  color: var(--ink);
}

.detail::backdrop {
  background: rgba(20, 18, 14, 0.63);
}

.detail-shell {
  display: flex;
  flex-direction: column;
  min-height: 0;
  max-height: inherit;
}

.detail-bar {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 12px 16px 12px 22px;
  border-bottom: 1px solid var(--ink);
  background: var(--paper);
}

.detail-kicker {
  margin: 0;
  color: var(--ink-soft);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.detail-kicker span {
  margin-right: 6px;
}

.detail-kicker span:first-child {
  color: var(--accent);
}

.detail-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.save-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 9px 14px;
  border: 1px solid var(--ink);
  border-radius: 1px;
  background: transparent;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  transition: background-color 160ms ease, color 160ms ease, border-color 160ms ease;
}

.save-button:hover {
  background: var(--paper-deep);
}

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

.icon-button {
  display: inline-grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 1px;
  background: transparent;
  transition: background-color 160ms ease;
}

.icon-button:hover {
  background: var(--paper-deep);
}

.icon-button svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 1.6;
}

.detail-scroll {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-color: var(--rule) transparent;
}

.detail-figure {
  position: relative;
  margin: 0;
  aspect-ratio: 16 / 7.4;
  overflow: hidden;
  background: var(--paper-deep);
}

.detail-figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.85) contrast(0.97) sepia(0.06);
}

.detail-figure figcaption {
  position: absolute;
  right: 12px;
  bottom: 12px;
  padding: 5px 8px;
  background: rgba(28, 26, 22, 0.82);
  color: var(--paper);
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.detail-content {
  width: min(100%, 770px);
  margin-inline: auto;
  padding: clamp(30px, 4vw, 48px) clamp(24px, 6vw, 68px) clamp(42px, 5vw, 60px);
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 18px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.detail-meta .topic-label {
  color: var(--accent);
}

.detail h1 {
  max-width: 18ch;
  margin: 0 0 20px;
  font-family: var(--serif);
  font-size: clamp(40px, 5.1vw, 64px);
  font-weight: 400;
  letter-spacing: -0.035em;
  line-height: 0.98;
}

.detail-dek {
  max-width: 50ch;
  margin: 0 0 28px;
  color: var(--ink-soft);
  font-family: var(--body-serif);
  font-size: clamp(18px, 1.8vw, 21px);
  line-height: 1.48;
}

.detail-byline {
  margin: 0 0 32px;
  padding-block: 15px;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  color: var(--ink-soft);
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.09em;
  line-height: 1.5;
  text-transform: uppercase;
}

.detail-byline span {
  margin-inline: 5px;
}

.article-body {
  max-width: 66ch;
  font-family: var(--body-serif);
  font-size: clamp(17px, 1.35vw, 18.5px);
  line-height: 1.76;
}

.article-body p {
  margin: 0 0 1.25em;
}

.article-body p:first-child::first-letter {
  float: left;
  margin: 0.08em 0.12em 0 0;
  color: var(--accent);
  font-family: var(--serif);
  font-size: 3.9em;
  line-height: 0.76;
}

.detail-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 44px;
  padding-top: 18px;
  border-top: 1px solid var(--ink);
}

.detail-footer p {
  margin: 0;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.text-button {
  min-height: 44px;
  padding: 10px 0;
  border: 0;
  border-bottom: 1px solid currentColor;
  background: none;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

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

@keyframes detail-in {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.992);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes backdrop-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .detail[open] {
    animation: detail-in 260ms cubic-bezier(0.2, 0.75, 0.2, 1);
  }

  .detail[open]::backdrop {
    animation: backdrop-in 220ms ease-out;
  }

  .story {
    animation: story-in 420ms ease-out both;
  }

  .story:nth-child(2) {
    animation-delay: 40ms;
  }

  .story:nth-child(3) {
    animation-delay: 80ms;
  }
}

@keyframes story-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

@media (max-width: 1080px) {
  .stories {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .story--lead .story-link {
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr);
  }

  .dispatch {
    grid-template-columns: minmax(0, 1.25fr) minmax(240px, 0.75fr);
    gap: 44px;
  }
}

@media (max-width: 880px) {
  .toolbar {
    grid-template-columns: minmax(0, 1fr) 200px;
  }

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

  .field-saved .saved-filter {
    max-width: 300px;
  }

  .dispatch {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .dispatch-copy {
    max-width: 58ch;
  }

  .story--lead .story-link {
    grid-template-columns: 1fr;
  }

  .story--lead .story-media {
    min-height: 0;
    aspect-ratio: 16 / 9;
  }

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

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

  .footer-brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 720px) {
  :root {
    --page-gutter: 18px;
  }

  .utility-inner {
    min-height: 32px;
    font-size: 8.5px;
    letter-spacing: 0.09em;
  }

  .utility-note {
    display: none;
  }

  .masthead-grid {
    align-items: flex-start;
    gap: 20px;
    padding-block: 24px 18px;
  }

  .eyebrow {
    margin-bottom: 8px;
    font-size: 9px;
  }

  .wordmark {
    font-size: clamp(52px, 16vw, 72px);
  }

  .issue-block {
    gap: 1px;
    padding-left: 12px;
    font-size: 8px;
    letter-spacing: 0.07em;
  }

  .issue-line:last-child {
    display: none;
  }

  .navstrip {
    min-height: 46px;
    gap: 12px;
  }

  .topic-nav {
    display: none;
  }

  .nav-meta {
    width: 100%;
    font-size: 8.5px;
    letter-spacing: 0.09em;
    text-align: left;
  }

  .dispatch {
    grid-template-columns: 1fr;
    gap: 0;
    padding-block: 30px 34px;
  }

  .dispatch-lead .kicker {
    margin-bottom: 13px;
  }

  .dispatch-title {
    max-width: 18ch;
    font-size: clamp(31px, 9vw, 40px);
  }

  .dispatch-copy {
    display: none;
  }

  .feed {
    padding-block: 34px 62px;
  }

  .feed-head {
    align-items: flex-end;
    gap: 12px;
  }

  .feed-head h2 {
    font-size: clamp(29px, 8vw, 36px);
  }

  .result-count {
    font-size: 9px;
    line-height: 1.35;
    text-align: right;
  }

  .toolbar {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 14px;
    padding-block: 16px;
  }

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

  .field-saved {
    grid-column: auto;
  }

  .field-saved .toolbar-label {
    display: none;
  }

  .field-saved .saved-filter {
    min-height: 48px;
    max-width: none;
    justify-content: space-between;
    margin-top: 21px;
    padding-inline: 10px;
    font-size: 12px;
    gap: 6px;
  }

  .saved-filter > span:not(.saved-count) {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .stories {
    grid-template-columns: 1fr;
    gap: 38px;
    padding-top: 30px;
  }

  .story--lead {
    grid-column: auto;
    padding-bottom: 0;
  }

  .story--lead .story-link {
    border: 0;
    background: transparent;
  }

  .story--lead .story-media {
    aspect-ratio: 4 / 3;
    margin-bottom: 18px;
  }

  .story--lead .story-copy {
    padding: 0;
  }

  .story--lead .story-title {
    max-width: none;
    font-size: clamp(34px, 9.8vw, 43px);
    line-height: 1;
  }

  .story--lead .story-summary {
    font-size: 16px;
  }

  .story-title {
    font-size: clamp(27px, 8vw, 32px);
  }

  .story-summary {
    font-size: 15.5px;
  }

  .story-media {
    aspect-ratio: 16 / 10;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
    padding-block: 46px 34px;
  }

  .footer-brand {
    grid-column: auto;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 6px;
  }

  .detail {
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    max-height: none;
    margin: 0;
    border: 0;
  }

  .detail-shell {
    height: 100%;
    max-height: none;
  }

  .detail-bar {
    padding: max(10px, env(safe-area-inset-top)) 12px 10px 16px;
  }

  .detail-kicker {
    max-width: 86px;
    font-size: 8px;
    line-height: 1.5;
  }

  .save-button {
    padding-inline: 10px;
    font-size: 12px;
  }

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

  .detail-content {
    padding: 26px 20px calc(48px + env(safe-area-inset-bottom));
  }

  .detail h1 {
    font-size: clamp(36px, 10.5vw, 46px);
    line-height: 1;
  }

  .detail-dek {
    font-size: 18px;
  }

  .article-body {
    font-size: 17px;
    line-height: 1.74;
  }

  .detail-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    margin-top: 38px;
  }
}

@media (max-width: 400px) {
  .field-saved .saved-filter {
    font-size: 11.5px;
  }

  .saved-count {
    min-width: 21px;
    height: 21px;
    padding-inline: 5px;
  }

  .save-button span {
    max-width: 94px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

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

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