@font-face {
  font-family: "Inter";
  src: url("/fonts/inter-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
}
@font-face {
  font-family: "Space Grotesk";
  src: url("/fonts/space-grotesk-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 500 700;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --bg: #0a0d10;
  --panel: #121820;
  --panel2: #1b232d;
  --screen: #080c10;
  --border: #1f2a34;
  --text: #e2e9ee;
  --muted: #7d8b98;
  --accent: #38d3c4;
  --accent-deep: #1aa095;
  --accent2: #f2a93b;
  --action: #ff6a3d;
  --action-deep: #d94a1b;
  --action-text: #080c10;
  --good: #7bd87f;
  --warn: #f5c245;
  --bad: #f4737f;
  --wave-original: #6f8391;
  --r-sm: 4px;
  --r-md: 12px;
  --r-lg: 20px;
  font-family: "Inter", "Segoe UI", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(900px 500px at 12% -5%, rgba(56, 211, 196, 0.10), transparent 60%),
    radial-gradient(800px 500px at 95% 15%, rgba(92, 141, 246, 0.06), transparent 55%),
    radial-gradient(700px 600px at 50% 110%, rgba(56, 211, 196, 0.06), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  font: 16px/1.68 "Inter", "Segoe UI", system-ui, sans-serif;
}
a { color: var(--accent); }
h1, h2, h3, .brand-name { font-family: "Space Grotesk", "Inter", sans-serif; }

.sitebar {
  width: min(1320px, calc(100% - 56px));
  min-height: 86px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid var(--border);
}
.brand-wordmark { display: inline-flex; align-items: center; gap: 8px; color: var(--text); text-decoration: none; }
.brand-mark { width: 33px; height: 33px; flex: 0 0 auto; fill: none; stroke: var(--accent); stroke-width: 3.3; stroke-linecap: round; stroke-linejoin: round; }
.brand-name { font: 700 25px/1 "Space Grotesk", "Inter", sans-serif; letter-spacing: -.7px; }
.brand-name > span { color: var(--accent); font-weight: 500; }
.sitebar nav { display: flex; flex-wrap: wrap; align-items: center; gap: 24px; }
.sitebar nav a { color: var(--muted); font-size: 13px; font-weight: 700; text-decoration: none; }
.sitebar nav a:hover { color: var(--text); }

.article, .journal { width: min(1120px, calc(100% - 56px)); margin: 0 auto; }
.article { display: grid; grid-template-columns: minmax(0, 740px) minmax(220px, 300px); gap: 60px; padding: 76px 0 100px; }
.article-main { min-width: 0; }
.eyebrow { color: var(--accent); font-size: 11px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.article h1, .journal h1 { margin: 14px 0 20px; font-size: clamp(45px, 6.2vw, 72px); line-height: .99; letter-spacing: -.06em; }
.dek { color: color-mix(in srgb, var(--text) 82%, var(--muted)); font-size: clamp(19px, 2.6vw, 24px); line-height: 1.55; }
.byline { padding: 16px 0 26px; color: var(--muted); border-bottom: 1px solid var(--border); font-size: 13px; }
.article h2 { margin: 54px 0 14px; font-size: clamp(30px, 4vw, 42px); line-height: 1.08; letter-spacing: -.045em; }
.article h3 { margin: 34px 0 8px; font-size: 21px; }
.article p, .article li { color: color-mix(in srgb, var(--text) 78%, var(--muted)); font-size: 17px; }
.article strong { color: var(--text); }
.article ul, .article ol { padding-left: 22px; }
.lead { color: var(--text) !important; font-size: 20px !important; }

.figure {
  margin: 38px 0;
  padding: 24px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--screen);
}
.figure img, .figure svg { display: block; width: 100%; height: auto; }
.figure figcaption { margin-top: 14px; color: var(--muted); font-size: 13px; }
.note, .method, .cta { margin: 32px 0; padding: 22px 24px; border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--panel); }
.note { border-left: 4px solid var(--warn); }
.method { border-left: 4px solid var(--accent); }
.cta { border-color: rgba(56, 211, 196, .3); background: linear-gradient(145deg, rgba(56, 211, 196, .08), rgba(255, 255, 255, .02)); }
.cta h2 { margin: 0 0 8px; font-size: 24px; }
.cta a {
  min-height: 52px;
  margin-top: 8px;
  padding: 0 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-md);
  color: var(--action-text);
  background: linear-gradient(135deg, var(--action-deep), var(--action));
  box-shadow: 0 12px 30px rgba(255, 106, 61, .16);
  font-weight: 800;
  text-decoration: none;
}
.cta a:hover { filter: brightness(1.08); transform: translateY(-1px); }

.article-aside { position: sticky; top: 24px; align-self: start; }
.article-aside .aside-card { margin-bottom: 14px; padding: 20px; border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--panel); }
.article-aside strong { display: block; margin-bottom: 8px; }
.article-aside p, .article-aside li { color: var(--muted); font-size: 13px; }
.article-aside ul { padding-left: 18px; }
.source-list a { color: var(--accent); word-break: break-word; }

.journal { padding: 80px 0 110px; }
.journal-intro { max-width: 760px; color: color-mix(in srgb, var(--text) 82%, var(--muted)); font-size: 21px; }
.story-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-top: 48px; }
.story-card {
  min-height: 260px;
  padding: 26px;
  display: flex;
  flex-direction: column;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--panel);
  text-decoration: none;
  transition: transform .18s ease, border-color .18s ease, background .18s ease;
}
.story-card:hover { transform: translateY(-3px); border-color: rgba(56, 211, 196, .42); background: var(--panel2); }
.story-card small { color: var(--accent); font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.story-card h2 { margin: 18px 0 12px; font-size: 27px; line-height: 1.15; letter-spacing: -.035em; }
.story-card p { margin: 0; color: var(--muted); }
.story-card span { margin-top: auto; padding-top: 20px; color: var(--accent); font-weight: 700; }

.editorial-footer { padding: 36px 28px 52px; color: var(--muted); border-top: 1px solid var(--border); text-align: center; font-size: 13px; }
.editorial-footer a { margin: 0 8px; color: var(--muted); text-decoration: none; }
.editorial-footer a:hover { color: var(--accent); }
.chart-label { fill: var(--text); font: 700 13px "Inter", system-ui, sans-serif; }
.chart-small { fill: var(--muted); font: 12px "Inter", system-ui, sans-serif; }

a:focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; border-radius: var(--r-sm); }
.cta a:focus-visible { outline-color: var(--text); }

@media (prefers-contrast: more) {
  :root { --border: #53616d; --muted: #aeb9c1; }
  .story-card, .aside-card, .figure, .note, .method, .cta { border-width: 2px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .story-card, .cta a { transition: none; }
  .story-card:hover, .cta a:hover { transform: none; }
}
@media (max-width: 820px) {
  .article { grid-template-columns: 1fr; padding-top: 45px; }
  .article-aside { position: static; }
  .story-grid { grid-template-columns: 1fr; }
  .sitebar nav { display: none; }
}
@media (max-width: 520px) {
  .sitebar, .article, .journal { width: min(100% - 28px, 1120px); }
  .sitebar { min-height: 70px; }
  .brand-mark { width: 27px; height: 27px; }
  .brand-name { font-size: 20px; }
  .article h1, .journal h1 { font-size: clamp(36px, 11vw, 43px); overflow-wrap: anywhere; }
  .figure { padding: 15px; }
  .article { gap: 28px; }
  .cta a { width: 100%; }
}
