/* Fonts are served next to the site at deploy time and are not part of this repository (see site/README.md). */
@font-face { font-family: "Durandir Display"; src: url("fonts/satoshi-300.woff2") format("woff2"); font-weight: 300; font-display: swap; }
@font-face { font-family: "Durandir Display"; src: url("fonts/satoshi-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Durandir Display"; src: url("fonts/satoshi-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --ink: #181818;
  --ink-deep: #0e0e0e;
  --fill: rgba(255, 255, 255, 0.045);
  --fill-strong: rgba(255, 255, 255, 0.08);
  --text: #f6f6f2;
  --text-78: rgba(255, 255, 255, 0.78);
  --text-55: rgba(255, 255, 255, 0.55);
  --text-35: rgba(255, 255, 255, 0.35);
  --steel: #909eae;
  --track: rgba(94, 98, 107, 0.55);
  /* Chart hues of the Durandir blog charts, stepped into the dark-surface lightness band and validated in this order. */
  --c1: #238dff;
  --c2: #d9700a;
  --c3: #9562ff;
  --c4: #1c9e50;
  --c5: #e0418c;
  --font: "Durandir Display", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
  --shell: 1240px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 74px; overscroll-behavior-y: none; }
body {
  margin: 0; background: var(--ink); color: var(--text); font-family: var(--font); font-size: 17px; line-height: 1.6;
  -webkit-font-smoothing: antialiased; overflow-x: clip;
}
a { color: var(--text); text-decoration: none; }
a:hover { color: #e9e9e9; }
:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
img { max-width: 100%; height: auto; }
.shell { width: min(100% - 48px, var(--shell)); margin-inline: auto; }
.skip { position: absolute; left: -9999px; top: 0; z-index: 2000; padding: 10px 16px; background: var(--ink-deep); }
.skip:focus { left: 12px; top: 12px; }

/* Navigation: the shared Durandir bar, fixed, translucent grey over a 20px blur. */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000; height: 58px; padding-inline: 24px;
  display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; isolation: isolate;
}
.nav::before {
  content: ""; position: absolute; inset: 0; z-index: -1; background: rgba(24, 24, 24, 0.62);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
}
.brand { justify-self: start; font-size: 21px; font-weight: 400; letter-spacing: -0.01em; }
.nav-links { display: flex; gap: 26px; }
.nav-links a, .nav-actions a { font-size: 14px; color: rgba(255, 255, 255, 0.92); }
.nav-links a:hover, .nav-actions a:hover { color: var(--steel); }
.nav-actions { justify-self: end; display: flex; align-items: center; gap: 8px; }
.nav-actions a { display: inline-flex; align-items: center; gap: 7px; padding: 9px 18px; line-height: 1; }
.nav-actions a.cta { background: #fff; color: #000; }
.nav-actions a.cta:hover { background: rgba(255, 255, 255, 0.86); color: #000; }
.nav-actions svg, .pill svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.burger { display: none; width: 26px; height: 16px; padding: 0; border: 0; background: none; cursor: pointer; flex-direction: column; justify-content: space-between; justify-self: end; }
.burger i { display: block; height: 2px; width: 100%; background: #fff; border-radius: 2px; transition: transform 200ms ease, opacity 200ms ease; }
.mobile-menu {
  position: fixed; top: 58px; left: 0; right: 0; bottom: 0; z-index: 990; display: none; flex-direction: column; gap: 18px;
  padding: 40px max(18px, 7%); background: rgba(24, 24, 24, 0.9); backdrop-filter: blur(28px) saturate(120%);
  -webkit-backdrop-filter: blur(28px) saturate(120%);
}
.mobile-menu a { font-size: 24px; line-height: 1.25; }
body.menu-open .mobile-menu { display: flex; }
body.menu-open .burger i:nth-child(1) { transform: translateY(7px) rotate(45deg); }
body.menu-open .burger i:nth-child(2) { opacity: 0; }
body.menu-open .burger i:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Hero: case-file text under the blog cards' progressive blur, headline centred as on the Durandir home. */
.hero { position: relative; min-height: min(92vh, 860px); display: flex; align-items: center; justify-content: center; overflow: hidden; background: var(--ink-deep); text-align: center; }
.hero-bg {
  position: absolute; inset: -20px; margin: 0; padding: 80px 4vw 0; color: rgba(255, 255, 255, 0.34); text-align: left;
  font: 15px/1.7 var(--mono); white-space: pre-wrap; overflow: hidden; user-select: none;
}
.hero-bg mark { background: rgba(144, 158, 174, 0.28); color: rgba(255, 255, 255, 0.72); padding: 0 3px; }
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(70% 60% at 50% 50%, transparent 0%, rgba(14, 14, 14, 0.45) 70%, rgba(14, 14, 14, 0.9) 100%);
}
.hero-blur, .card-blur { position: absolute; inset: 0; pointer-events: none; backdrop-filter: blur(26px); -webkit-backdrop-filter: blur(26px); }
.hero-blur {
  mask-image: radial-gradient(62% 58% at 50% 56%, #000 38%, transparent 100%);
  -webkit-mask-image: radial-gradient(62% 58% at 50% 56%, #000 38%, transparent 100%);
}
.hero-copy { position: relative; z-index: 2; padding: 120px 0 80px; display: flex; flex-direction: column; align-items: center; }
.kicker { margin: 0 0 20px; color: var(--text-55); font-size: 14px; }
.hero h1 { margin: 0; max-width: 18ch; font-weight: 300; font-size: clamp(44px, 6.4vw, 92px); line-height: 1.02; letter-spacing: -0.03em; }
.hero h1 u { text-decoration-thickness: 2px; text-underline-offset: 0.12em; }
.lede { max-width: 640px; margin: 26px 0 0; color: var(--text-78); font-size: 19px; line-height: 1.55; }
.actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 34px; }
.pill {
  display: inline-flex; align-items: center; gap: 8px; padding: 11px 20px; border-radius: 999px; font-size: 14px;
  background: rgba(255, 255, 255, 0.1); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
}
.pill-light { background: #fff; color: #000; }
.pill-light:hover { color: #000; background: rgba(255, 255, 255, 0.86); }

/* Section rhythm */
section { padding-block: 110px 0; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 34px; }
h2 { margin: 0; font-weight: 300; font-size: clamp(32px, 3.8vw, 50px); line-height: 1.08; letter-spacing: -0.025em; }
h3 { margin: 0; font-weight: 400; font-size: 26px; line-height: 1.15; letter-spacing: -0.01em; }
.meta { color: var(--text-55); font-size: 14px; }

.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px; padding-top: 88px; }
.stat strong { display: block; font-weight: 300; font-size: 64px; line-height: 1; letter-spacing: -0.03em; }
.stat span { display: block; margin-top: 12px; color: var(--text-55); font-size: 15px; max-width: 260px; }

/* Leaderboard: plain rows as in the blog charts, label and value above a thin bar on a grey track. */
.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 30px; }
.tabs button {
  padding: 10px 18px; border: 0; border-radius: 3px; background: var(--fill); color: var(--text-78);
  font: 400 14px var(--font); cursor: pointer;
}
.tabs button:hover { background: var(--fill-strong); }
.tabs button[aria-selected="true"] { background: rgba(255, 255, 255, 0.18); color: #fff; }
.legend { display: flex; flex-wrap: wrap; gap: 18px; margin: -6px 0 26px; color: var(--text-78); font-size: 14px; }
.legend span { display: inline-flex; align-items: center; gap: 8px; }
.legend i { width: 14px; height: 6px; border-radius: 3px; background: var(--c); }
.board-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th { padding: 0 20px 12px 0; text-align: left; color: var(--text-55); font-weight: 400; font-size: 13px; white-space: nowrap; }
td { padding: 14px 16px 14px 0; vertical-align: top; white-space: nowrap; }
tr.group td { padding: 34px 0 6px; color: var(--text-55); font-size: 14px; }
td.system { min-width: 220px; white-space: normal; }
td.system strong { display: block; font-weight: 400; font-size: 16px; }
td.system span { display: block; color: var(--text-55); font-size: 13px; max-width: 340px; }
.num { font-variant-numeric: tabular-nums; }
.metric { min-width: 92px; }
.metric .row { display: flex; justify-content: space-between; gap: 12px; font-variant-numeric: tabular-nums; }
.metric .row small { color: var(--text-35); font-size: 12px; }
.metric i { display: block; position: relative; height: 6px; margin-top: 7px; border-radius: 3px; background: var(--track); overflow: hidden; }
.metric i::after { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--v); border-radius: 3px; background: var(--c); }
.badge { display: inline-block; padding: 4px 10px; border-radius: 3px; background: var(--fill-strong); color: var(--text-78); font-size: 12px; }
.badge.verified { color: #8fd99b; }
.empty { padding: 14px 0 6px; color: var(--text-55); white-space: normal; }
.empty strong { display: block; margin-bottom: 4px; color: var(--text); font-weight: 300; font-size: 26px; }
.board-note { margin: 30px 0 0; color: var(--text-55); font-size: 15px; max-width: 900px; }

/* Track cards: excerpts from the world under the blog cards' progressive blur, title on the blurred band. */
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.card { position: relative; aspect-ratio: 4 / 5; overflow: hidden; border-radius: 6px; background: #111; }
.card-bg { position: absolute; inset: 0; margin: 0; padding: 22px; color: rgba(255, 255, 255, 0.5); font: 13px/1.7 var(--mono); white-space: pre-wrap; overflow: hidden; }
.card-bg em { font-style: normal; color: rgba(255, 255, 255, 0.88); background: rgba(144, 158, 174, 0.22); }
.card-blur { mask-image: linear-gradient(to bottom, transparent 34%, #000 64%); -webkit-mask-image: linear-gradient(to bottom, transparent 34%, #000 64%); }
.card-copy { position: absolute; left: 24px; right: 24px; bottom: 24px; z-index: 2; }
.card-copy .tag { display: inline-block; margin-bottom: 12px; color: var(--text-78); font-size: 13px; }
.card-copy h3 { font-size: 30px; }
.card-copy p { margin: 10px 0 0; color: var(--text-78); font-size: 15px; line-height: 1.5; }

/* Long-form sections */
.prose { max-width: 820px; }
.prose h2 { margin-bottom: 26px; }
.prose p { color: var(--text-78); margin: 0 0 18px; }
.prose p strong { color: var(--text); font-weight: 700; }
.prose .lead-in { display: block; margin: 30px 0 8px; color: var(--text); font-weight: 700; font-size: 17px; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 64px; align-items: start; }
.facts-table td { padding: 12px 20px 12px 0; white-space: normal; color: var(--text-78); }
.facts-table td:first-child { color: var(--text); width: 34%; }
pre.code { margin: 0 0 18px; padding: 22px 24px; overflow-x: auto; border-radius: 6px; background: var(--fill); color: #dfe4e8; font: 13.5px/1.7 var(--mono); }

/* Footer, as on durandir.com */
footer { margin-top: 140px; padding: 64px 0 40px; background: var(--ink); }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 32px; }
.footer-grid span { display: block; margin-bottom: 14px; color: var(--text-55); font-size: 14px; }
.footer-grid a { display: block; margin-bottom: 10px; color: rgba(255, 255, 255, 0.88); font-size: 15px; }
.footer-grid a:hover { color: var(--steel); }
.powered { display: inline-flex; align-items: center; gap: 12px; color: var(--text-55); font-size: 14px; }
.powered img { height: 22px; width: auto; }
.powered:hover { color: var(--text); }
.footer-base { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; margin-top: 56px; color: var(--text-55); font-size: 13px; }

@media (max-width: 1100px) {
  .nav { grid-template-columns: 1fr auto; }
  .nav-links, .nav-actions { display: none; }
  .burger { display: flex; }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split { grid-template-columns: 1fr; gap: 24px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 680px) {
  body { font-size: 16px; }
  .shell { width: calc(100% - 32px); }
  .hero-bg { font-size: 12px; }
  .stat strong { font-size: 44px; }
  .cards { grid-template-columns: 1fr; }
  .section-head { flex-direction: column; align-items: start; }
  .footer-grid { grid-template-columns: 1fr; }
  section { padding-top: 80px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .burger i { transition: none; } }
