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

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

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

:root {
  --ink: #11110f;
  --paper: #f4f1e8;
  --blue: #1749ff;
  --yellow: #e8ff45;
  --orange: #ff5b35;
  --line: 2px solid var(--ink);
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "Space Grotesk", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.45;
}

button, input, select { font: inherit; }
button, a, input, select { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }

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

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

.site-header {
  display: grid;
  grid-template-columns: 300px 1fr minmax(320px, 430px);
  min-height: 132px;
  border-bottom: var(--line);
  background: var(--blue);
  color: white;
}

.brand {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 15px 28px;
  border-right: var(--line);
  font-family: "Oswald", Impact, sans-serif;
  font-size: 43px;
  font-weight: 700;
  line-height: .72;
  letter-spacing: -.03em;
  text-decoration: none;
}
.brand span:last-child { margin-left: 1.42em; }

.issue-mark {
  display: flex;
  justify-content: space-between;
  align-items: end;
  padding: 24px 28px;
  border-right: var(--line);
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
  letter-spacing: .05em;
}

.header-note {
  display: flex;
  align-items: flex-end;
  margin: 0;
  padding: 24px 30px;
  font-size: 14px;
  max-width: 42ch;
}

.intro {
  display: grid;
  grid-template-columns: 56% 44%;
  min-height: 640px;
  border-bottom: var(--line);
}

.intro-copy {
  display: flex;
  flex-direction: column;
  padding: 66px 5vw 44px;
  background: var(--yellow);
}

.eyebrow {
  margin: 0 0 30px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.intro h1 {
  margin: 0;
  max-width: 760px;
  font-family: "Oswald", Impact, sans-serif;
  font-size: clamp(74px, 8.2vw, 126px);
  font-weight: 600;
  line-height: .85;
  letter-spacing: -.045em;
  text-transform: uppercase;
}
.intro h1 span {
  color: var(--blue);
  text-decoration: underline;
  text-decoration-thickness: .07em;
  text-underline-offset: .06em;
}

.standfirst {
  max-width: 580px;
  margin: 44px 0 30px;
  font-size: 21px;
  line-height: 1.38;
}

.jump-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: min(100%, 380px);
  margin-top: auto;
  padding: 14px 0;
  border-top: var(--line);
  border-bottom: var(--line);
  font-weight: 700;
  text-decoration: none;
}
.jump-link span { font-size: 22px; }

.cover-art {
  position: relative;
  min-height: 640px;
  margin: 0;
  overflow: hidden;
  background: var(--orange);
}
.cover-art::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 48%, rgba(23,73,255,.72) 48% 66%, transparent 66%);
  mix-blend-mode: hard-light;
  pointer-events: none;
}
.cover-art img {
  width: 100%;
  height: 100%;
  min-height: 640px;
  display: block;
  object-fit: cover;
  filter: grayscale(1) contrast(1.25);
  mix-blend-mode: multiply;
}
.cover-art figcaption {
  position: absolute;
  z-index: 2;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  justify-content: space-between;
  padding: 12px 18px;
  border-top: var(--line);
  background: var(--paper);
  font-family: "IBM Plex Mono", monospace;
  font-size: 10px;
  text-transform: uppercase;
}
.cover-badge {
  position: absolute;
  z-index: 2;
  top: 28px;
  right: 28px;
  display: grid;
  place-items: center;
  width: 84px;
  aspect-ratio: 1;
  border: 2px solid white;
  border-radius: 50%;
  color: white;
  font-family: "Oswald", sans-serif;
  font-size: 40px;
}

.browse { padding: 78px 4vw 110px; }
.section-heading {
  display: grid;
  grid-template-columns: 180px minmax(300px, 700px) 1fr;
  align-items: end;
  gap: 30px;
  margin-bottom: 55px;
}
.section-heading .eyebrow { align-self: start; margin-top: 8px; }
.section-heading h2 {
  margin: 0;
  font-family: "Oswald", Impact, sans-serif;
  font-size: clamp(48px, 5.5vw, 80px);
  font-weight: 500;
  line-height: .95;
  letter-spacing: -.035em;
  text-transform: uppercase;
}
.result-count {
  justify-self: end;
  margin: 0 0 4px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
  text-transform: uppercase;
}

.controls {
  display: grid;
  grid-template-columns: 1fr 260px 220px;
  border: var(--line);
  margin-bottom: 42px;
  background: white;
}
.controls label {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  min-height: 74px;
  padding-left: 20px;
  gap: 18px;
  border-right: var(--line);
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
}
.input-wrap, .select-wrap { position: relative; height: 100%; }
.input-wrap svg {
  position: absolute;
  left: 4px;
  top: 50%;
  width: 20px;
  transform: translateY(-50%);
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}
.controls input, .controls select {
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font-family: "Space Grotesk", sans-serif;
  font-size: 17px;
}
.controls input { padding: 0 18px 0 36px; }
.controls select {
  padding: 0 42px 0 10px;
  appearance: none;
  cursor: pointer;
}
.select-wrap::after {
  content: "↓";
  position: absolute;
  top: 50%;
  right: 18px;
  font-size: 17px;
  transform: translateY(-50%);
  pointer-events: none;
}
.saved-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 74px;
  padding: 0 20px;
  border: 0;
  border-radius: 0;
  background: var(--paper);
  cursor: pointer;
  font-weight: 700;
}
.saved-toggle svg { width: 19px; fill: none; stroke: currentColor; stroke-width: 2; }
.saved-toggle[aria-pressed="true"] { background: var(--blue); color: white; }
.saved-toggle[aria-pressed="true"] svg { fill: var(--yellow); stroke: var(--yellow); }
.saved-count {
  display: grid;
  place-items: center;
  min-width: 25px;
  height: 25px;
  margin-left: auto;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
}

.story-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  border-top: var(--line);
  border-left: var(--line);
}
.story-card {
  grid-column: span 3;
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 430px;
  padding: 20px;
  border-right: var(--line);
  border-bottom: var(--line);
  background: var(--paper);
  transition: background .15s ease, color .15s ease;
}
.story-card:nth-child(1), .story-card:nth-child(6),
.story-card:nth-child(7), .story-card:nth-child(8) { grid-column: span 6; }
.story-card:nth-child(1) { background: var(--blue); color: white; }
.story-card:nth-child(4), .story-card:nth-child(7) { background: var(--yellow); }
.story-card:nth-child(6) { background: var(--orange); }
.story-card:hover { background: var(--ink); color: white; }
.card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  text-transform: uppercase;
}
.card-number {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid currentColor;
  border-radius: 50%;
}
.saved-indicator { font-size: 17px; }
.story-card h3 {
  margin: 60px 0 18px;
  max-width: 15ch;
  font-family: "Oswald", Impact, sans-serif;
  font-size: clamp(32px, 3.1vw, 49px);
  font-weight: 500;
  line-height: .98;
  letter-spacing: -.025em;
  text-transform: uppercase;
}
.story-card:nth-child(1) h3, .story-card:nth-child(6) h3 { max-width: 20ch; }
.card-summary { max-width: 46ch; margin: 0 0 30px; font-size: 14px; }
.card-footer {
  display: flex;
  align-items: end;
  gap: 14px;
  margin-top: auto;
  padding-top: 18px;
  border-top: 1px solid currentColor;
}
.card-byline {
  font-family: "IBM Plex Mono", monospace;
  font-size: 10px;
  line-height: 1.5;
  text-transform: uppercase;
}
.open-item {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-left: auto;
  flex: 0 0 auto;
  border: 2px solid currentColor;
  border-radius: 50%;
  color: inherit;
  background: transparent;
  cursor: pointer;
  font-size: 24px;
  line-height: 1;
}
.open-item:hover { color: var(--ink); background: white; }

.empty-state {
  min-height: 400px;
  padding: 48px;
  border: var(--line);
  background: var(--yellow);
}
.empty-symbol { font-size: 72px; }
.empty-state h3 {
  margin: 15px 0;
  font-family: "Oswald", sans-serif;
  font-size: 52px;
  text-transform: uppercase;
}
.empty-state button {
  margin-top: 20px;
  padding: 14px 20px;
  border: var(--line);
  border-radius: 0;
  color: white;
  background: var(--ink);
  cursor: pointer;
}

.site-footer {
  display: grid;
  grid-template-columns: 300px 1fr 220px 150px;
  min-height: 210px;
  border-top: var(--line);
  background: var(--ink);
  color: white;
}
.site-footer > * { margin: 0; padding: 38px 28px; border-right: 1px solid #676761; }
.footer-brand { font-size: 40px; }
.site-footer > p, .site-footer > a:last-child { display: flex; align-items: end; font-size: 13px; }
.site-footer > a:last-child { border-right: 0; text-decoration: none; }

.detail-shell {
  position: fixed;
  z-index: 50;
  inset: 0;
}
.detail-shell[hidden] { display: none; }
.detail-scrim {
  position: absolute;
  inset: 0;
  background: rgba(17,17,15,.7);
  backdrop-filter: blur(3px);
}
.detail {
  position: absolute;
  top: 0;
  right: 0;
  width: min(910px, 75vw);
  height: 100%;
  overflow-y: auto;
  background: var(--paper);
  box-shadow: -20px 0 60px rgba(0,0,0,.25);
}
.close-detail {
  position: sticky;
  z-index: 3;
  top: 0;
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  height: 68px;
  padding: 0 34px;
  border: 0;
  border-bottom: var(--line);
  border-radius: 0;
  color: white;
  background: var(--blue);
  cursor: pointer;
  font-weight: 700;
  text-align: left;
}
.close-detail span { font-size: 22px; }
.detail-hero { padding: 58px 7vw 46px; border-bottom: var(--line); background: var(--yellow); }
.detail-meta {
  display: flex;
  justify-content: space-between;
  margin-bottom: 42px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  text-transform: uppercase;
}
.detail h2 {
  max-width: 800px;
  margin: 0;
  font-family: "Oswald", Impact, sans-serif;
  font-size: clamp(56px, 6vw, 88px);
  font-weight: 500;
  line-height: .94;
  letter-spacing: -.035em;
  text-transform: uppercase;
}
.detail-deck { max-width: 620px; margin: 30px 0 0; font-size: 20px; }
.detail-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 7vw;
  border-bottom: var(--line);
}
.detail-author { font-family: "IBM Plex Mono", monospace; font-size: 11px; text-transform: uppercase; }
.save-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border: var(--line);
  border-radius: 0;
  background: white;
  cursor: pointer;
  font-weight: 700;
}
.save-item svg { width: 18px; fill: none; stroke: currentColor; stroke-width: 2; }
.save-item[aria-pressed="true"] { color: white; background: var(--blue); }
.save-item[aria-pressed="true"] svg { fill: var(--yellow); stroke: var(--yellow); }
.article-body {
  max-width: 720px;
  margin: 0 auto;
  padding: 64px 7vw 100px;
  font-size: 19px;
  line-height: 1.72;
}
.article-body p { margin: 0 0 1.5em; }
.article-body p:first-child::first-letter {
  float: left;
  margin: .07em .12em 0 0;
  color: var(--blue);
  font-family: "Oswald", sans-serif;
  font-size: 4.4em;
  font-weight: 600;
  line-height: .72;
}
.article-end {
  display: flex;
  justify-content: space-between;
  margin-top: 58px;
  padding-top: 16px;
  border-top: var(--line);
  font-family: "IBM Plex Mono", monospace;
  font-size: 10px;
  text-transform: uppercase;
}
body.detail-open { overflow: hidden; }

@media (max-width: 1000px) {
  .site-header { grid-template-columns: 230px 1fr; }
  .header-note { display: none; }
  .issue-mark { border-right: 0; }
  .intro { grid-template-columns: 1fr 40%; }
  .story-card { grid-column: span 6; }
  .story-card:nth-child(1), .story-card:nth-child(6) { grid-column: span 6; }
  .controls { grid-template-columns: 1fr 240px; }
  .saved-toggle { grid-column: 1 / -1; border-top: var(--line); }
  .controls label:nth-child(2) { border-right: 0; }
}

@media (max-width: 700px) {
  .site-header { grid-template-columns: 145px 1fr; min-height: 92px; }
  .brand { padding: 12px 18px; font-size: 29px; }
  .issue-mark { align-items: center; padding: 15px; font-size: 9px; }
  .issue-mark span:first-child { display: none; }
  .intro { display: block; min-height: auto; }
  .intro-copy { min-height: 535px; padding: 42px 20px 30px; }
  .eyebrow { margin-bottom: 24px; font-size: 10px; }
  .intro h1 { font-size: clamp(62px, 21vw, 82px); }
  .standfirst { margin: 30px 0; font-size: 17px; }
  .cover-art, .cover-art img { min-height: 400px; height: 400px; }
  .cover-badge { top: 20px; right: 20px; width: 64px; font-size: 30px; }
  .browse { padding: 58px 14px 80px; }
  .section-heading { display: block; margin-bottom: 36px; }
  .section-heading h2 { max-width: 330px; font-size: 52px; }
  .result-count { margin-top: 22px; }
  .controls { display: block; margin-bottom: 28px; }
  .controls label { grid-template-columns: 105px 1fr; min-height: 66px; padding-left: 12px; border-right: 0; border-bottom: var(--line); font-size: 9px; gap: 4px; }
  .controls input, .controls select { font-size: 16px; }
  .saved-toggle { width: 100%; min-height: 62px; border-top: 0; }
  .story-grid { display: block; border-top: var(--line); }
  .story-card { min-height: 390px; }
  .story-card h3 { margin-top: 48px; font-size: 39px; }
  .story-card:nth-child(1) h3, .story-card:nth-child(6) h3 { max-width: 15ch; }
  .empty-state { padding: 30px 22px; }
  .empty-state h3 { font-size: 40px; }
  .site-footer { display: grid; grid-template-columns: 1fr 1fr; min-height: 270px; }
  .site-footer > * { padding: 25px 18px; }
  .site-footer .footer-brand { grid-column: 1 / -1; border-bottom: 1px solid #676761; }
  .site-footer > p:first-of-type { display: none; }
  .site-footer > p, .site-footer > a:last-child { border-right: 0; }
  .detail { width: 100%; }
  .close-detail { height: 60px; padding: 0 18px; }
  .detail-hero { padding: 38px 20px 34px; }
  .detail-meta { margin-bottom: 30px; }
  .detail h2 { font-size: 54px; }
  .detail-deck { font-size: 17px; }
  .detail-tools { align-items: flex-start; gap: 15px; padding: 14px 20px; }
  .detail-author { max-width: 120px; }
  .save-item { padding: 10px 12px; font-size: 14px; }
  .article-body { padding: 48px 22px 80px; font-size: 17px; line-height: 1.7; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
