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

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

:root {
  --paper: #f2efe7;
  --paper-deep: #e7e1d5;
  --ink: #161714;
  --muted: #66675f;
  --red: #e84727;
  --blue: #1746d1;
  --line: #aaa99f;
  --white: #fffdf7;
  --sans: "DM Sans", Arial, sans-serif;
  --serif: "DM Serif Display", Georgia, serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 300px;
  overflow-x: hidden;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: rgba(232, 71, 39, 0.2);
}

button,
input,
select,
a {
  touch-action: manipulation;
}

button,
input,
select {
  font: inherit;
}

button,
a {
  color: inherit;
}

button {
  border: 0;
}

a {
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

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

:is(h1, h2, h3)[id] {
  scroll-margin-top: 1rem;
}

[hidden] {
  display: none !important;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 12px;
  left: 12px;
  padding: 10px 14px;
  transform: translateY(-180%);
  background: var(--ink);
  color: var(--white);
  font-weight: 700;
}

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

.wrap {
  width: min(1320px, calc(100% - 64px));
  margin-inline: auto;
}

.site-header {
  border-bottom: 1px solid var(--ink);
}

.masthead {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 130px;
}

.brand {
  display: flex;
  width: fit-content;
  align-items: baseline;
  text-decoration: none;
  line-height: 0.78;
  letter-spacing: -0.08em;
}

.brand-common {
  font-size: clamp(2.5rem, 4.8vw, 5rem);
  font-weight: 700;
}

.brand-hour {
  color: var(--red);
  font-family: var(--serif);
  font-size: clamp(2.6rem, 5vw, 5.2rem);
  font-style: italic;
  font-weight: 400;
}

.brand:hover .brand-hour {
  color: var(--blue);
}

.issue {
  display: flex;
  gap: 26px;
  margin: 0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.header-note {
  justify-self: end;
  margin: 0;
  font-family: var(--serif);
  font-size: 1.08rem;
  line-height: 1.08;
  text-align: right;
}

.ticker {
  overflow: hidden;
  border-top: 1px solid var(--ink);
  background: var(--blue);
  color: white;
}

.ticker-track {
  display: flex;
  width: max-content;
  min-width: 100%;
  align-items: center;
  justify-content: space-around;
  gap: 28px;
  padding: 8px 28px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.ticker-track i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--paper);
}

.intro {
  position: relative;
  display: grid;
  min-height: 460px;
  grid-template-columns: minmax(0, 1fr) 310px;
  align-content: center;
  padding: 58px 0 70px;
  border-bottom: 1px solid var(--ink);
}

.eyebrow,
.section-number {
  margin: 0 0 18px;
  color: var(--blue);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.intro h1 {
  max-width: 850px;
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(4.9rem, 9vw, 8.5rem);
  font-weight: 400;
  letter-spacing: -0.055em;
  line-height: 0.76;
  text-wrap: balance;
}

.intro h1 em {
  color: var(--red);
  font-weight: 400;
}

.dek {
  grid-column: 2;
  align-self: end;
  max-width: 290px;
  margin: 0 0 14px;
  font-family: var(--serif);
  font-size: 1.45rem;
  line-height: 1.2;
  text-wrap: pretty;
}

.issue-mark {
  position: absolute;
  top: 40px;
  right: 14px;
  display: flex;
  width: 135px;
  height: 135px;
  transform: rotate(8deg);
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 2px solid var(--red);
  border-radius: 50%;
  color: var(--red);
}

.issue-mark span {
  font-family: var(--serif);
  font-size: 3.2rem;
  line-height: 1;
}

.issue-mark small {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.25;
  text-transform: uppercase;
}

.browse {
  padding: 64px 0 110px;
}

.browse-heading-row {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 38px;
}

.browse-heading-row h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(2.4rem, 4.4vw, 4.8rem);
  font-weight: 400;
  letter-spacing: -0.035em;
  line-height: 0.95;
  text-wrap: balance;
}

.browse-note {
  margin: 0 0 7px;
  color: var(--muted);
  font-size: 0.78rem;
}

.controls {
  display: grid;
  grid-template-columns: minmax(260px, 1.25fr) minmax(210px, 0.75fr) auto;
  align-items: end;
  gap: 12px;
  padding: 18px;
  border: 1px solid var(--ink);
  background: var(--paper-deep);
}

.search-field,
.select-field {
  display: block;
  min-width: 0;
  color: var(--muted);
  font-size: 0.67rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.input-row,
.select-wrap {
  display: flex;
  height: 50px;
  margin-top: 8px;
  align-items: center;
  gap: 9px;
  border-bottom: 1px solid var(--ink);
  background: var(--white);
  color: var(--ink);
}

.input-row {
  padding: 0 16px;
}

.input-row:focus-within,
.select-wrap:focus-within {
  outline: 3px solid var(--blue);
  outline-offset: 2px;
}

.input-row svg,
.select-wrap svg {
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
}

.input-row input,
.select-wrap select {
  width: 100%;
  height: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 0.95rem;
  text-transform: none;
}

.input-row input::placeholder {
  color: #77786f;
}

.select-wrap {
  position: relative;
}

.select-wrap select {
  appearance: none;
  padding: 0 44px 0 16px;
  background-color: var(--white);
}

.select-wrap svg {
  position: absolute;
  right: 16px;
  pointer-events: none;
}

.saved-toggle {
  display: flex;
  min-width: 142px;
  height: 50px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  background: var(--ink);
  color: white;
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.saved-toggle svg {
  fill: none;
  stroke: currentColor;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

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

.saved-toggle[aria-pressed="true"] svg {
  fill: currentColor;
}

.saved-count {
  min-width: 21px;
  padding: 2px 6px;
  border-radius: 12px;
  background: var(--paper);
  color: var(--ink);
  font-size: 0.68rem;
  font-variant-numeric: tabular-nums;
}

.result-bar {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 17px 2px 14px;
  border-bottom: 1px solid var(--ink);
  color: var(--muted);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.result-bar p {
  margin: 0;
}

.story-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: 22px;
}

.story-card {
  position: relative;
  grid-column: span 4;
  min-width: 0;
  padding: 28px 0 34px;
  border-bottom: 1px solid var(--line);
}

.story-card:nth-child(1),
.story-card:nth-child(6) {
  grid-column: span 8;
}

.story-card:nth-child(1) {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 26px;
}

.story-card:nth-child(1) .story-image-wrap {
  grid-row: span 4;
  aspect-ratio: 1.38;
}

.story-card:nth-child(1) .story-title {
  font-size: clamp(2.3rem, 4vw, 4.35rem);
}

.story-card:nth-child(1) .story-summary {
  align-self: end;
}

.story-image-wrap {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1.35;
  margin: 0 0 22px;
  background: #d5d0c5;
}

.story-image-wrap::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(130deg, rgba(23, 70, 209, 0.12), transparent 60%);
  content: "";
  pointer-events: none;
  mix-blend-mode: multiply;
}

.story-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.78) contrast(1.04);
  transition: transform 450ms ease, filter 450ms ease;
}

.story-card:hover .story-image {
  transform: scale(1.025);
  filter: saturate(1) contrast(1.02);
}

.image-label {
  position: absolute;
  z-index: 1;
  right: 8px;
  bottom: 8px;
  padding: 5px 7px;
  background: rgba(242, 239, 231, 0.92);
  color: var(--ink);
  font-size: 0.52rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.story-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  color: var(--blue);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.story-meta span:last-child {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.story-title {
  margin: 0 0 14px;
  font-family: var(--serif);
  font-size: clamp(1.85rem, 2.7vw, 3rem);
  font-weight: 400;
  letter-spacing: -0.025em;
  line-height: 0.98;
  text-wrap: balance;
}

.open-story {
  padding: 0;
  background: transparent;
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.open-story:hover {
  color: var(--red);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.1em;
}

.story-summary {
  max-width: 48ch;
  margin: 0;
  color: #4f504a;
  font-family: var(--serif);
  font-size: 1.03rem;
  line-height: 1.45;
  text-wrap: pretty;
}

.byline {
  margin: 18px 0 0;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.card-saved {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--red);
}

.card-saved svg {
  fill: currentColor;
}

.empty-state {
  padding: 90px 20px;
  border-bottom: 1px solid var(--ink);
  text-align: center;
}

.empty-state > span {
  display: block;
  margin-bottom: 18px;
  color: var(--red);
  font-family: var(--serif);
  font-size: 1.2rem;
  font-style: italic;
}

.empty-state h3 {
  margin: 0 0 10px;
  font-family: var(--serif);
  font-size: clamp(2rem, 5vw, 4rem);
  font-weight: 400;
  text-wrap: balance;
}

.empty-state p {
  margin: 0 auto 24px;
  color: var(--muted);
}

.empty-state button {
  padding: 14px 20px;
  background: var(--blue);
  color: white;
  cursor: pointer;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.empty-state button:hover {
  background: var(--red);
}

.site-footer {
  padding: 54px 0 48px;
  background: var(--ink);
  color: var(--paper);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1.3fr auto;
  align-items: end;
  gap: 50px;
}

.footer-grid p {
  margin: 0;
  color: #cfcec6;
  font-size: 0.7rem;
  line-height: 1.55;
}

.footer-grid .footer-brand {
  color: white;
  font-size: 1.55rem;
  font-weight: 700;
  letter-spacing: -0.05em;
  line-height: 0.75;
}

.footer-brand em {
  color: var(--red);
  font-family: var(--serif);
  font-size: 1.2em;
  font-weight: 400;
}

.footer-grid a {
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
}

.footer-grid a:hover {
  color: #ff8067;
}

.detail-shell {
  position: fixed;
  z-index: 50;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
}

.detail-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(16, 18, 15, 0.68);
  opacity: 0;
  transition: opacity 220ms ease;
}

.detail {
  position: relative;
  display: flex;
  width: min(1180px, 100%);
  height: min(920px, 100%);
  transform: translateY(18px);
  flex-direction: column;
  overflow: hidden;
  overscroll-behavior: contain;
  background: var(--paper);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.3);
  opacity: 0;
  transition: transform 240ms ease, opacity 220ms ease;
}

.detail-shell.is-open .detail-backdrop,
.detail-shell.is-open .detail {
  transform: translateY(0);
  opacity: 1;
}

.detail-topbar {
  display: grid;
  flex: 0 0 auto;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 66px;
  padding: 0 25px;
  border-bottom: 1px solid var(--ink);
}

.detail-brand {
  width: fit-content;
  color: var(--red);
  font-family: var(--serif);
  font-size: 1.5rem;
  font-style: italic;
  text-decoration: none;
}

.detail-topbar p {
  margin: 0;
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.close-detail {
  display: flex;
  justify-self: end;
  align-items: center;
  gap: 10px;
  padding: 9px 4px 9px 12px;
  background: transparent;
  cursor: pointer;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

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

.close-detail svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
}

.detail-scroll {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.article-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.95fr);
  border-bottom: 1px solid var(--ink);
}

.article-heading {
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: center;
  padding: clamp(42px, 7vw, 90px);
}

.article-kicker {
  margin: 0 0 22px;
  color: var(--blue);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.article-heading h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(3rem, 6vw, 6.2rem);
  font-weight: 400;
  letter-spacing: -0.05em;
  line-height: 0.88;
  overflow-wrap: anywhere;
  text-wrap: balance;
}

.article-subtitle {
  max-width: 48ch;
  margin: 28px 0 0;
  color: #53554e;
  font-family: var(--serif);
  font-size: 1.22rem;
  line-height: 1.38;
  text-wrap: pretty;
}

.article-visual {
  position: relative;
  min-height: 520px;
  margin: 0;
  overflow: hidden;
}

.article-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.72) contrast(1.05);
}

.article-visual figcaption {
  position: absolute;
  right: 14px;
  bottom: 14px;
  padding: 6px 8px;
  background: rgba(242, 239, 231, 0.92);
  font-size: 0.57rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.article-info {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 30px;
  align-items: center;
  padding: 24px clamp(28px, 7vw, 90px);
  border-bottom: 1px solid var(--line);
}

.article-byline {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  margin: 0;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.article-byline strong {
  color: var(--ink);
}

.save-item {
  display: flex;
  min-width: 180px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 13px 17px;
  border: 1px solid var(--ink);
  background: transparent;
  cursor: pointer;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.save-item svg {
  fill: none;
  stroke: currentColor;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.save-item:hover,
.save-item[aria-pressed="true"] {
  background: var(--blue);
  color: white;
}

.save-item[aria-pressed="true"] svg {
  fill: currentColor;
}

.article-body {
  max-width: 720px;
  margin: 0 auto;
  padding: 74px 42px 110px;
}

.article-body p {
  margin: 0 0 1.5em;
  font-family: var(--serif);
  font-size: clamp(1.2rem, 1.7vw, 1.47rem);
  line-height: 1.72;
  text-wrap: pretty;
}

.article-body p:first-child::first-letter {
  float: left;
  margin: 0.06em 0.1em 0 0;
  color: var(--red);
  font-family: var(--serif);
  font-size: 4.8em;
  line-height: 0.72;
}

.article-end {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 54px;
  color: var(--blue);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.article-end::before {
  width: 42px;
  height: 2px;
  background: var(--blue);
  content: "";
}

body.modal-open {
  overflow: hidden;
}

@media (max-width: 900px) {
  .masthead {
    grid-template-columns: 1fr auto;
  }

  .issue {
    display: none;
  }

  .intro {
    min-height: 420px;
    grid-template-columns: 1fr 260px;
  }

  .intro h1 {
    font-size: clamp(4.7rem, 12vw, 7.5rem);
  }

  .issue-mark {
    width: 105px;
    height: 105px;
  }

  .story-card,
  .story-card:nth-child(6) {
    grid-column: span 6;
  }

  .story-card:nth-child(1) {
    grid-column: span 12;
  }

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

  .article-hero {
    grid-template-columns: 1fr;
  }

  .article-visual {
    min-height: 420px;
  }
}

@media (max-width: 640px) {
  .wrap {
    width: calc(100% - 32px);
  }

  .masthead {
    min-height: 84px;
  }

  .brand-common {
    font-size: 2.2rem;
  }

  .brand-hour {
    font-size: 2.3rem;
  }

  .header-note {
    font-size: 0.83rem;
  }

  .ticker-track {
    justify-content: flex-start;
    gap: 17px;
    padding: 7px 16px;
    font-size: 0.58rem;
  }

  .ticker-track span:nth-of-type(n + 3),
  .ticker-track i:nth-of-type(n + 3) {
    display: none;
  }

  .intro {
    display: block;
    min-height: 340px;
    padding: 40px 0 34px;
  }

  .intro h1 {
    max-width: 360px;
    font-size: clamp(3.85rem, 19vw, 4.8rem);
    line-height: 0.79;
  }

  .dek {
    max-width: 255px;
    margin-top: 24px;
    font-size: 1.06rem;
  }

  .issue-mark {
    top: auto;
    right: 0;
    bottom: 26px;
    width: 80px;
    height: 80px;
  }

  .issue-mark span {
    font-size: 2.3rem;
  }

  .browse {
    padding: 36px 0 80px;
  }

  .browse-heading-row {
    display: block;
    margin-bottom: 22px;
  }

  .browse-heading-row h2 {
    font-size: 2.55rem;
  }

  .browse-note {
    margin-top: 12px;
  }

  .controls {
    grid-template-columns: 1fr auto;
    padding: 14px;
  }

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

  .select-field {
    min-width: 0;
  }

  .saved-toggle {
    min-width: 112px;
  }

  .result-bar span {
    display: none;
  }

  .story-grid {
    display: block;
  }

  .story-card,
  .story-card:nth-child(1) {
    display: block;
    padding: 26px 0 30px;
  }

  .story-card:nth-child(1) .story-image-wrap,
  .story-image-wrap {
    aspect-ratio: 1.42;
  }

  .story-card:nth-child(1) .story-title,
  .story-title {
    font-size: 2.35rem;
  }

  .site-footer {
    padding: 42px 0;
  }

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

  .detail-shell {
    padding: 0;
  }

  .detail {
    width: 100%;
    height: 100%;
    box-shadow: none;
  }

  .detail-topbar {
    min-height: 59px;
    padding: 0 16px;
  }

  .detail-topbar p {
    display: none;
  }

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

  .article-heading {
    padding: 48px 22px 42px;
  }

  .article-heading h2 {
    font-size: clamp(3.4rem, 16vw, 4.4rem);
  }

  .article-subtitle {
    margin-top: 22px;
    font-size: 1.08rem;
  }

  .article-visual {
    min-height: 380px;
  }

  .article-info {
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 22px;
  }

  .save-item {
    width: 100%;
  }

  .article-body {
    padding: 52px 22px 84px;
  }

  .article-body p {
    font-size: 1.17rem;
    line-height: 1.65;
  }
}

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

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
