:root {
  --bg: #0e1113;
  --surface: #161b1f;
  --surface-2: #1d2429;
  --line: #2a333a;
  --text: #e7ebee;
  --muted: #9aa6af;
  --accent: #f2a33a;
  --accent-ink: #14100a;
  --ok: #7fc48a;
  --radius: 10px;
  --wrap: 760px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.65 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 8px; background: var(--accent); color: var(--accent-ink); padding: 6px 10px; z-index: 10; }

.site-header { border-bottom: 1px solid var(--line); background: var(--surface); position: sticky; top: 0; z-index: 5; }
.header-inner { display: flex; align-items: center; gap: 20px; min-height: 58px; flex-wrap: wrap; }
.logo { color: var(--text); font-weight: 800; letter-spacing: .02em; text-decoration: none; white-space: nowrap; }
.logo-mark { color: var(--accent); }
.site-header nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px 16px; flex-wrap: wrap; }
.site-header nav a { color: var(--muted); text-decoration: none; font-size: 15px; }
.site-header nav a:hover, .site-header nav a[aria-current="page"] { color: var(--text); }
@media (max-width: 640px) {
  .header-inner { padding-block: 10px; gap: 8px; }
  .site-header { position: static; }
  .site-header nav ul { gap: 4px 12px; }
}

main { padding-block: 28px 56px; }
.crumbs { font-size: 14px; color: var(--muted); margin-bottom: 12px; }
.crumbs a { color: var(--muted); }
h1 { font-size: clamp(28px, 6vw, 40px); line-height: 1.15; margin: 0 0 12px; letter-spacing: -.01em; }
h2 { font-size: 24px; line-height: 1.25; margin: 40px 0 12px; padding-top: 8px; border-top: 1px solid var(--line); }
h3 { font-size: 19px; margin: 26px 0 6px; }
.lede { font-size: 19px; color: var(--text); margin: 0 0 8px; }
.meta { font-size: 14px; color: var(--muted); margin: 0 0 24px; }
p, ul, ol { margin: 0 0 16px; }
li { margin-bottom: 6px; }
code { background: var(--surface-2); padding: 1px 6px; border-radius: 5px; font-size: .92em; }
strong { color: #fff; }

.toc { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 18px; margin-bottom: 24px; }
.toc p { margin: 0 0 6px; font-weight: 700; font-size: 14px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.toc ul { margin: 0; padding-left: 18px; }

.callout { background: var(--surface); border-left: 4px solid var(--accent); border-radius: 0 var(--radius) var(--radius) 0; padding: 14px 18px; margin: 0 0 20px; }
.callout p { margin: 0; }
.note { color: var(--muted); font-style: italic; }

.table-wrap { overflow-x: auto; margin: 0 0 20px; border: 1px solid var(--line); border-radius: var(--radius); }
table { border-collapse: collapse; width: 100%; font-size: 15px; }
caption { text-align: left; padding: 10px 14px; color: var(--muted); font-size: 13px; caption-side: bottom; }
th, td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { background: var(--surface-2); font-weight: 700; }
tbody tr:last-child td { border-bottom: 0; }
td:first-child { font-variant-numeric: tabular-nums; }

.cta-wrap { margin: 20px 0 28px; }
.cta { display: inline-flex; align-items: center; gap: 8px; background: var(--accent); color: var(--accent-ink); font-weight: 800; padding: 13px 22px; border-radius: var(--radius); text-decoration: none; }
.cta:hover { filter: brightness(1.08); }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; margin: 0 0 24px; }
.card { display: flex; flex-direction: column; gap: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; text-decoration: none; color: var(--text); }
.card:hover { border-color: var(--accent); }
.card-title { font-weight: 800; color: var(--accent); }
.card-text { font-size: 15px; color: var(--muted); }

.site-footer { border-top: 1px solid var(--line); background: var(--surface); padding: 32px 0 40px; }
.sponsor { margin-bottom: 18px; }
.sponsor-heading { font-weight: 800; color: var(--accent); margin: 0 0 4px; }
.sponsor p:last-child { margin: 0; color: var(--text); }
.footer-links { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0 0 14px; }
.footer-links a { color: var(--muted); font-size: 14px; }
.fine { font-size: 13px; color: var(--muted); margin: 0 0 6px; }
