@font-face {
  font-family: "Hanken Grotesk";
  src: url("/fonts/hanken-grotesk.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Hanken Grotesk";
  src: url("/fonts/hanken-grotesk-italic.woff2") format("woff2");
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}

:root {
  --paper: #f6f4ef;
  --paper-deep: #ece9e1;
  --ink: #111b30;
  --ink-soft: #394356;
  --muted: #646c7c;
  --line: #dcd8ce;
  --cobalt: #2048df;
  --cobalt-ink: #1836b0;
  --cobalt-wash: #dce3fa;
  --notch: #000;
  --sans: "Hanken Grotesk", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --shell: 1200px;
  --gutter: clamp(18px, 4vw, 40px);
  --bar: 56px;
}

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

html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--bar) + 16px); }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  font-feature-settings: "ss01" on;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
::selection { background: var(--cobalt); color: var(--paper); }

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

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

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--ink); color: var(--paper); padding: 10px 14px; border-radius: 8px; text-decoration: none;
}
.skip-link:focus { top: 12px; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* ───────── Menu bar header with the notch ───────── */

.bar {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s;
}
.bar.is-scrolled { border-bottom-color: var(--line); }

.bar-inner {
  position: relative;
  height: var(--bar);
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}

.brand {
  display: inline-flex; align-items: center; gap: 10px;
  text-decoration: none; font-weight: 800; font-size: 19px; letter-spacing: -0.03em;
}
.brand img { width: 28px; height: 28px; border-radius: 7px; }

.nav { display: flex; gap: 4px; }
.nav a {
  text-decoration: none; font-size: 15px; font-weight: 500; color: var(--ink-soft);
  padding: 6px 10px; border-radius: 7px;
}
.nav a:hover { background: var(--paper-deep); color: var(--ink); }
.nav a[aria-current="page"] { color: var(--ink); background: var(--paper-deep); }

/* The notch: hangs from the top edge of the viewport and opens on hover or focus */
.notch {
  position: absolute; left: 50%; top: 0; transform: translateX(-50%);
  width: 172px; height: 32px;
  background: var(--notch); color: var(--paper);
  border-radius: 0 0 16px 16px;
  text-decoration: none;
  transition: width .38s cubic-bezier(.3,.8,.2,1), height .38s cubic-bezier(.3,.8,.2,1), border-radius .38s;
}
.notch::before, .notch::after {
  content: ""; position: absolute; top: 0; width: 12px; height: 12px;
}
.notch::before { left: -12px; background: radial-gradient(circle at 0 100%, transparent 11.5px, var(--notch) 12px); }
.notch::after { right: -12px; background: radial-gradient(circle at 100% 100%, transparent 11.5px, var(--notch) 12px); }

.notch-cam {
  position: absolute; right: 22px; top: 11px; width: 9px; height: 9px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #33406a 0 25%, #11151f 45%);
  transition: top .38s cubic-bezier(.3,.8,.2,1);
}
.notch-live {
  position: absolute; inset: 0; padding: 14px 44px 0 22px;
  display: grid; grid-template-columns: auto 1fr; gap: 2px 12px; align-content: center;
  opacity: 0; transition: opacity .2s;
  overflow: hidden;
}
.notch-live img { grid-row: span 2; width: 34px; height: 34px; border-radius: 9px; align-self: center; }
.notch-kicker { font-size: 12px; color: #9fb2ff; font-weight: 600; }
.notch-title { font-size: 14.5px; font-weight: 600; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.notch:hover, .notch:focus-visible {
  width: 440px; height: 76px; border-radius: 0 0 28px 28px; outline-offset: 2px;
}
.notch:hover .notch-live, .notch:focus-visible .notch-live { opacity: 1; transition-delay: .14s; }
.notch:hover .notch-cam, .notch:focus-visible .notch-cam { top: 12px; }

@media (max-width: 1180px) { .notch { display: none; } }

@media (max-width: 760px) {
  .bar-inner { height: auto; flex-wrap: wrap; padding-block: 10px 6px; gap: 6px; }
  .nav { width: 100%; overflow-x: auto; scrollbar-width: none; margin-inline: -10px; padding-bottom: 2px; }
  .nav::-webkit-scrollbar { display: none; }
  .nav a:last-child { margin-right: 10px; }
  .nav a { white-space: nowrap; }
}

/* ───────── Home ───────── */

.hero { margin-top: 4px; width: 100%; max-width: 1920px; margin-inline: auto; overflow: hidden; }
.hero picture, .hero img { width: 100%; }
.hero img { aspect-ratio: 2172 / 724; object-fit: cover; }
@media (max-width: 640px) { .hero { padding: 8px var(--gutter) 0; } .hero img { aspect-ratio: 900 / 320; } }

.lead {
  display: grid; grid-template-columns: 1.35fr 1fr; gap: 28px 44px;
  margin-top: clamp(24px, 4vw, 48px);
}
.lead-main { text-decoration: none; display: block; }
.lead-main .fig-svg { border-radius: 18px; }
.lead-main h2 {
  font-size: clamp(28px, 3.2vw, 42px); line-height: 1.04; letter-spacing: -0.035em; font-weight: 800;
  margin: 22px 0 12px; max-width: 24ch; text-wrap: balance;
}
.lead-main p { margin: 0; color: var(--ink-soft); font-size: 18px; max-width: 56ch; }
.lead-main:hover h2 { color: var(--cobalt-ink); }

.lead-side { display: grid; gap: 30px; align-content: start; }
.side-story { display: grid; grid-template-columns: 176px 1fr; gap: 20px; text-decoration: none; align-items: start; }
.side-story .fig-svg { border-radius: 12px; }
.side-story h3 { font-size: 20px; line-height: 1.18; letter-spacing: -0.02em; margin: 0 0 6px; font-weight: 700; text-wrap: balance; }
.side-story p { margin: 0; font-size: 15px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.side-story:hover h3 { color: var(--cobalt-ink); }

.lead-intro {
  border-left: 3px solid var(--cobalt); padding: 2px 0 2px 18px; color: var(--ink-soft); font-size: 16px; margin: 0;
}

.tag { font-size: 14px; font-weight: 600; color: var(--cobalt-ink); }

@media (max-width: 900px) {
  .lead { grid-template-columns: 1fr; }
}
@media (max-width: 460px) {
  .side-story { grid-template-columns: 104px 1fr; gap: 14px; }
  .side-story h3 { font-size: 18px; }
}

/* Quick fixes: a compact two-column index */
.quick {
  margin-top: clamp(48px, 7vw, 88px);
  background: var(--ink); color: var(--paper);
  border-radius: 24px; padding: clamp(24px, 4vw, 48px);
  display: grid; grid-template-columns: 280px 1fr; gap: 24px 48px;
}
.quick h2 { margin: 0; font-size: 30px; letter-spacing: -0.03em; line-height: 1.05; font-weight: 800; }
.quick-head p { color: #b9c0cf; margin: 12px 0 0; font-size: 16px; }
.quick ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 0 32px; }
.quick li { border-top: 1px solid #2b3550; }
.quick li a {
  display: flex; justify-content: space-between; gap: 16px; padding: 14px 0; text-decoration: none; font-weight: 600; font-size: 16.5px;
}
.quick li a span { color: #8f9ab0; font-weight: 400; font-size: 14px; white-space: nowrap; }
.quick li a:hover { color: #a9bbff; }
@media (max-width: 900px) { .quick { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .quick ul { grid-template-columns: 1fr; } }

/* Section index blocks */
.desk { margin-top: clamp(48px, 7vw, 88px); display: grid; gap: clamp(40px, 6vw, 64px); }
.desk-row { display: grid; grid-template-columns: 280px 1fr; gap: 20px 48px; }
.desk-head h2 { margin: 0; font-size: 30px; letter-spacing: -0.03em; font-weight: 800; line-height: 1.05; }
.desk-head h2 a { text-decoration: none; }
.desk-head h2 a:hover { color: var(--cobalt-ink); }
.desk-head p { margin: 10px 0 14px; color: var(--muted); font-size: 16px; }
.more-link { font-weight: 600; color: var(--cobalt-ink); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1.5px; font-size: 15px; }
@media (max-width: 900px) { .desk-row { grid-template-columns: 1fr; } }

/* Story list: used on home rows, section pages, related */
.stories { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 26px 40px; }
.stories.single { grid-template-columns: 1fr; gap: 0; }
.story { display: block; text-decoration: none; }
.story h3 { margin: 0 0 6px; font-size: 20px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.2; text-wrap: balance; }
.story p { margin: 0; color: var(--muted); font-size: 15.5px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.story .meta { margin-top: 8px; }
.story:hover h3 { color: var(--cobalt-ink); text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 4px; }
.stories.single .story { padding: 22px 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 1fr 180px; gap: 8px 32px; }
.stories.single li:first-child .story { border-top: 1px solid var(--line); }
.stories.single .story h3 { font-size: 23px; }
.stories.single .story p { -webkit-line-clamp: 3; }
.stories.single .meta { margin: 0; grid-column: 2; grid-row: 1 / span 2; text-align: right; flex-direction: column; align-items: flex-end; gap: 2px; }
@media (max-width: 700px) {
  .stories { grid-template-columns: 1fr; }
  .stories.single .story { grid-template-columns: 1fr; }
  .stories.single .meta { grid-column: 1; grid-row: auto; text-align: left; flex-direction: row; align-items: center; }
}

.meta { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 14px; color: var(--muted); }
.meta .tag { color: var(--cobalt-ink); }

/* ───────── Page headers (section, info) ───────── */

.page-head { padding-top: clamp(28px, 5vw, 64px); padding-bottom: clamp(24px, 4vw, 40px); }
.page-head h1 {
  font-size: clamp(40px, 6vw, 76px); line-height: .98; letter-spacing: -0.045em; font-weight: 800; margin: 0; max-width: 16ch;
}
.page-head p { font-size: 19px; color: var(--ink-soft); max-width: 58ch; margin: 18px 0 0; }
.page-count { margin-top: 18px; font-size: 15px; color: var(--muted); }

/* ───────── Breadcrumbs ───────── */

.crumbs { padding-top: 22px; font-size: 14px; color: var(--muted); }
.crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.crumbs li + li::before { content: "/"; margin-right: 6px; color: var(--line); }
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--cobalt-ink); text-decoration: underline; }

/* ───────── Article ───────── */

.article-head { padding-top: clamp(20px, 4vw, 44px); }
.article-head h1 { max-width: 22ch; }
.article-head h1 {
  font-size: clamp(34px, 5vw, 60px); line-height: 1.02; letter-spacing: -0.04em; font-weight: 800;
  margin: 14px 0 18px; text-wrap: balance;
}
.deck { font-size: clamp(18px, 2vw, 21px); line-height: 1.5; color: var(--ink-soft); margin: 0; max-width: 62ch; }
.article-head .meta { margin-top: 22px; font-size: 15px; }
.article-head .meta strong { color: var(--ink); font-weight: 600; }

.article-figure { margin: clamp(24px, 4vw, 40px) auto 0; }
.article-figure .fig-svg { border-radius: 20px; width: 100%; }

.article-body {
  display: grid; grid-template-columns: 230px minmax(0, 700px); gap: 64px;
  margin-top: clamp(32px, 5vw, 56px);
}
.rail { position: relative; }
.rail-inner { position: sticky; top: calc(var(--bar) + 24px); }
.toc h2 { font-size: 14px; font-weight: 700; margin: 0 0 10px; color: var(--ink); }
.toc ol { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--line); }
.toc a {
  display: block; padding: 6px 0 6px 14px; margin-left: -2px; border-left: 2px solid transparent;
  text-decoration: none; font-size: 14.5px; line-height: 1.35; color: var(--muted);
}
.toc a:hover { color: var(--ink); }
.toc a.is-active { color: var(--cobalt-ink); border-left-color: var(--cobalt); font-weight: 600; }

.note {
  margin-top: 28px; padding: 16px 18px; background: var(--cobalt-wash); border-radius: 14px; font-size: 14.5px; color: var(--ink-soft);
}
.note strong { display: block; color: var(--ink); margin-bottom: 4px; }
.note p { margin: 0; }

@media (max-width: 980px) {
  .article-body { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .rail-inner { position: static; }
  .toc { background: var(--paper-deep); border-radius: 14px; padding: 16px 18px; }
  .toc ol { border: 0; columns: 2; column-gap: 24px; }
  .toc a { padding-left: 0; border: 0; margin: 0; }
}
@media (max-width: 560px) { .toc ol { columns: 1; } }

/* Prose */
.prose { font-size: 19px; line-height: 1.64; color: var(--ink); }
.prose > * { margin: 0 0 1.05em; }
.prose h2 {
  font-size: 30px; line-height: 1.12; letter-spacing: -0.03em; font-weight: 800;
  margin: 1.9em 0 .6em; text-wrap: balance;
}
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: 22px; letter-spacing: -0.02em; font-weight: 700; margin: 1.5em 0 .5em; line-height: 1.2; }
.prose a { color: var(--cobalt-ink); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
.prose a:hover { color: var(--cobalt); }
.prose strong { font-weight: 700; }
.prose ul, .prose ol { padding-left: 1.25em; }
.prose li { margin: .45em 0; padding-left: .2em; }
.prose ul li::marker { color: var(--cobalt); }
.prose ol li::marker { color: var(--cobalt-ink); font-weight: 700; }

.prose code {
  font-family: var(--mono); font-size: .82em; background: var(--paper-deep); padding: .12em .38em; border-radius: 5px;
}
.prose pre {
  position: relative; background: var(--ink); color: #e7ebf5; border-radius: 14px;
  padding: 18px 20px; overflow-x: auto; font-size: 15px; line-height: 1.6; white-space: pre;
}
.prose pre code { background: none; padding: 0; font-size: 1em; color: inherit; }
.copy-btn {
  position: absolute; top: 10px; right: 10px;
  font: 600 13px/1 var(--sans); color: var(--paper); background: #26314d; border: 0; border-radius: 7px;
  padding: 7px 10px; cursor: pointer;
}
.copy-btn:hover { background: var(--cobalt); }
.prose pre:has(.copy-btn) { padding-right: 84px; }

.article-table-wrap { overflow-x: auto; margin: 0 0 1.4em; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.prose table { border-collapse: collapse; width: 100%; font-size: 16px; line-height: 1.45; }
.prose th, .prose td { text-align: left; vertical-align: top; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.prose th { font-weight: 700; background: var(--paper-deep); white-space: nowrap; }
.prose tr:last-child td { border-bottom: 0; }

/* Related */
.related { margin-top: clamp(56px, 8vw, 96px); padding-top: 32px; border-top: 2px solid var(--ink); }
.related h2 { margin: 0 0 24px; font-size: 26px; letter-spacing: -0.03em; font-weight: 800; }
.related .stories { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 900px) { .related .stories { grid-template-columns: 1fr; } }

/* Info pages */
.info-body { max-width: 700px; padding-bottom: 24px; }

/* 404 */
.lost { padding-block: clamp(48px, 10vw, 120px); }
.lost h1 { font-size: clamp(44px, 7vw, 84px); letter-spacing: -0.05em; line-height: .95; margin: 0 0 18px; font-weight: 800; }
.lost p { font-size: 19px; color: var(--ink-soft); max-width: 50ch; }

/* ───────── Footer ───────── */

.footer { margin-top: clamp(64px, 10vw, 120px); background: var(--ink); color: #c9cfdb; padding-block: 56px 32px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 32px; }
.footer .brand { color: var(--paper); }
.footer-about p { margin: 14px 0 0; max-width: 34ch; font-size: 15px; }
.footer h2 { color: var(--paper); font-size: 15px; font-weight: 700; margin: 4px 0 12px; }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 15px; }
.footer a { text-decoration: none; }
.footer a:hover { color: #fff; text-decoration: underline; }
.footer-base {
  margin-top: 48px; padding-top: 20px; border-top: 1px solid #27314b; font-size: 13.5px; color: #8e97aa;
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px;
}
@media (max-width: 800px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-about { grid-column: 1 / -1; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; transition-delay: 0s !important; }
  html { scroll-behavior: auto; }
}

@media print {
  .bar, .rail, .related, .footer, .copy-btn { display: none !important; }
  .article-body { display: block; }
  body { background: #fff; }
}

/* Article header with a cover image */
.article-head.has-cover { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 400px); gap: 32px 56px; align-items: end; }
.article-head.has-cover h1 { font-size: clamp(32px, 4.2vw, 54px); }
.article-cover { margin: 0; }
.article-cover img { width: 100%; border-radius: 20px; }
@media (max-width: 860px) {
  .article-head.has-cover { grid-template-columns: 1fr; }
  .article-cover { max-width: 460px; }
}

/* Just published: image tiles */
.latest { margin-top: clamp(48px, 7vw, 80px); }
.latest h2 { margin: 0 0 20px; font-size: 30px; letter-spacing: -0.03em; font-weight: 800; }
.latest ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; }
.tile { display: block; text-decoration: none; }
.tile img { width: 100%; aspect-ratio: 7 / 6; object-fit: cover; object-position: top center; border-radius: 16px; margin-bottom: 14px; }
.tile h3 { margin: 6px 0 0; font-size: 18px; line-height: 1.22; letter-spacing: -0.015em; font-weight: 700; text-wrap: balance; }
.tile:hover h3 { color: var(--cobalt-ink); text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 4px; }
@media (max-width: 1000px) { .latest ul { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .latest ul { gap: 20px 14px; } .tile h3 { font-size: 16px; } }

.more-link-light { color: #a9bbff; }
.lost-list { margin-top: 36px; }
.lead-intro a { color: var(--cobalt-ink); font-weight: 600; }

/* All articles index */
.jump { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.jump a { text-decoration: none; font-weight: 600; font-size: 15px; padding: 8px 14px; border-radius: 999px; background: var(--paper-deep); }
.jump a:hover { background: var(--cobalt); color: var(--paper); }
.index-groups { display: grid; gap: clamp(40px, 6vw, 72px); }
.index-group { display: grid; grid-template-columns: 280px 1fr; gap: 20px 48px; scroll-margin-top: calc(var(--bar) + 16px); }
.index-group .desk-head { align-self: start; position: sticky; top: calc(var(--bar) + 24px); }
.index-group .stories.single .story h3 { font-size: 21px; }
@media (max-width: 900px) { .index-group { grid-template-columns: 1fr; } .index-group .desk-head { position: static; } }
