:root {
  color-scheme: dark;
  --bg: #0b0a09;
  --panel: #12100e;
  --panel-2: #17130f;
  --line: #302820;
  --line-bright: #554536;
  --text: #f4eee6;
  --muted: #a69b90;
  --dim: #746b63;
  --accent: #ff8a00;
  --accent-soft: #d7b790;
  --win: #8fcf91;
  --warn: #d7b790;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--text); }
body {
  background:
    radial-gradient(circle at 74% 8%, #351c09 0, transparent 24rem),
    linear-gradient(180deg, #0b0a09, #090807 55%, #0b0907);
}
a { color: var(--accent); }
code, .mono { color: var(--accent-soft); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(18px, 4vw, 70px);
  background: #0b0a09e8;
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}
.brand { display: flex; align-items: center; gap: 11px; color: inherit; text-decoration: none; text-transform: uppercase; letter-spacing: .26em; font-size: 14px; font-weight: 650; }
.brand img { filter: drop-shadow(0 0 8px #ff8a0066); }
.nav { display: flex; align-items: center; gap: clamp(8px, 1.35vw, 16px); }
.nav a { color: var(--muted); font: 600 10px ui-monospace, monospace; letter-spacing: .12em; text-decoration: none; text-transform: uppercase; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--accent); }
.nav span { color: var(--text); font: 700 9px ui-monospace, monospace; letter-spacing: .1em; text-transform: uppercase; }
.nav i { color: var(--line-bright); font: 10px ui-monospace, monospace; font-style: normal; }

.article-hero {
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(56px, 7vw, 92px) clamp(20px, 5vw, 70px) 52px;
}
.eyebrow { margin: 0 0 20px; color: var(--accent); font: 11px ui-monospace, monospace; letter-spacing: .18em; text-transform: uppercase; }
.article-hero h1 { max-width: 930px; margin: 0; font-size: clamp(34px, 4.5vw, 56px); line-height: 1.02; letter-spacing: -.04em; }
.hero-result { max-width: 950px; margin: 28px 0 0; font-size: clamp(22px, 3vw, 40px); font-weight: 720; line-height: 1.12; letter-spacing: -.03em; }
.hero-result strong { color: var(--accent); }
.hero-lede { max-width: 800px; margin: 24px 0 0; color: var(--muted); font-size: clamp(16px, 1.7vw, 21px); line-height: 1.65; }
.hero-aside { max-width: 800px; margin: 18px 0 0; color: var(--dim); font-size: 12px; line-height: 1.55; }
.metric-aside { box-sizing: content-box; margin: 14px auto 0; padding: 0 clamp(20px, 5vw, 70px); }

.metric-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; max-width: 1180px; margin: 0 auto; padding: 0 clamp(20px, 5vw, 70px); background: var(--line); }
.metric { min-height: 118px; padding: 22px; background: #0e0c0b; }
.metric strong { display: block; color: var(--text); font: 700 clamp(20px, 2.3vw, 31px) ui-monospace, monospace; letter-spacing: -.04em; }
.metric span { display: block; margin-top: 9px; color: var(--dim); font: 10px/1.45 ui-monospace, monospace; letter-spacing: .08em; text-transform: uppercase; }

.article-layout { max-width: 1180px; display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: clamp(32px, 6vw, 86px); margin: 0 auto; padding: 88px clamp(20px, 5vw, 70px) 110px; }
.toc { position: sticky; top: 92px; align-self: start; padding: 14px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.toc p { margin: 0 0 10px; color: var(--dim); font: 10px ui-monospace, monospace; letter-spacing: .12em; text-transform: uppercase; }
.toc a { display: block; padding: 6px 0; color: var(--muted); font-size: 11px; line-height: 1.3; text-decoration: none; }
.toc a:hover { color: var(--accent); }

.article { min-width: 0; }
.article section { scroll-margin-top: 84px; margin: 0 0 100px; }
.section-no { display: block; margin-bottom: 12px; color: var(--accent); font: 10px ui-monospace, monospace; letter-spacing: .16em; text-transform: uppercase; }
.article h2 { max-width: 760px; margin: 0 0 23px; font-size: clamp(25px, 2.7vw, 34px); line-height: 1.12; letter-spacing: -.03em; }
.article h3 { margin: 38px 0 13px; font-size: 19px; letter-spacing: -.02em; }
.article p { max-width: 800px; margin: 0 0 18px; color: var(--muted); font-size: 15px; line-height: 1.72; }
.article p strong { color: var(--text); }
.pullquote { margin: 34px 0; padding: 22px 26px; color: var(--text) !important; background: linear-gradient(90deg, #1d1209, #12100e); border-left: 3px solid var(--accent); font-size: clamp(19px, 2.3vw, 27px) !important; line-height: 1.35 !important; letter-spacing: -.02em; }
.author-note { max-width: 800px; margin: 32px 0; padding: 25px 28px 8px; background: linear-gradient(135deg, #18130f, #100e0c); border: 1px solid var(--line-bright); border-left: 3px solid var(--accent); }
.author-note p { font-size: 14px; }
.author-note .author-label { margin-bottom: 16px; color: var(--accent); font: 700 10px ui-monospace, monospace; letter-spacing: .12em; text-transform: uppercase; }
.author-note cite { color: var(--text); }
.author-note kbd { padding: 1px 5px; color: var(--text); background: #080706; border: 1px solid var(--line-bright); font: 11px ui-monospace, monospace; }
.dependency-aside { max-width: 720px; margin: 25px 0; padding: 18px 22px; background: var(--panel); border-left: 2px solid var(--accent); }
.dependency-aside p { margin: 0 0 6px; font-size: 13px; line-height: 1.55; }
.dependency-aside p:first-child { margin-bottom: 10px; color: var(--text); font-weight: 700; }
.dependency-aside p:last-child { margin-bottom: 0; }
.dependency-aside kbd { padding: 1px 5px; color: var(--text); background: var(--bg); border: 1px solid var(--line-bright); font: 11px ui-monospace, monospace; }

.config-example span { display: block; margin-bottom: 10px; color: var(--accent); font: 9px ui-monospace, monospace; letter-spacing: .12em; text-transform: uppercase; }
.config-example small { display: block; margin-top: 8px; color: var(--dim); font-size: 11px; line-height: 1.5; }

.config-example { display: grid; grid-template-columns: minmax(150px, 1fr) minmax(230px, 1.3fr) minmax(150px, 1fr); align-items: stretch; gap: 1px; margin: 30px 0; background: var(--line); border: 1px solid var(--line); }
.config-example > div, .config-example pre { min-width: 0; margin: 0; padding: 20px; background: var(--panel); }
.config-example pre { display: grid; align-items: center; overflow-x: auto; color: var(--accent-soft); font: 12px/1.7 ui-monospace, monospace; }
.config-example > div > code { color: var(--text); font-size: 14px; }

.save-layout { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; margin: 30px 0; background: var(--line); border: 1px solid var(--line); }
.save-layout > div { min-width: 0; padding: 22px; background: var(--panel); }
.save-layout figcaption { margin-bottom: 18px; color: var(--accent); font: 700 10px ui-monospace, monospace; letter-spacing: .12em; text-transform: uppercase; }
.save-layout pre { margin: 0; overflow-x: auto; color: var(--muted); font: 12px/1.7 ui-monospace, monospace; }
.save-layout-player { box-shadow: inset 3px 0 0 var(--accent); }
.save-layout-player pre { color: var(--text); }
.save-layout small { display: block; margin-top: 18px; color: var(--dim); font-size: 11px; line-height: 1.5; }

.architecture { display: grid; grid-template-columns: repeat(5, minmax(115px, 1fr)); gap: 24px; margin: 34px 0 10px; }
.architecture div { position: relative; min-height: 116px; padding: 17px; background: var(--panel); border: 1px solid var(--line); }
.architecture div:not(:last-child)::after { position: absolute; top: 49%; left: calc(100% + 7px); color: var(--accent); content: "→"; font: 17px ui-monospace, monospace; }
.architecture span { display: block; margin-bottom: 9px; color: var(--accent); font: 9px ui-monospace, monospace; letter-spacing: .12em; text-transform: uppercase; }
.architecture strong { display: block; font-size: 13px; }
.architecture small { display: block; margin-top: 7px; color: var(--dim); font-size: 10px; line-height: 1.45; }

.table-wrap { margin: 26px 0; overflow-x: auto; border: 1px solid var(--line); }
table { width: 100%; min-width: 650px; border-collapse: collapse; color: var(--muted); font: 11px/1.45 ui-monospace, monospace; }
caption { padding: 13px 15px; color: var(--text); background: var(--panel-2); border-bottom: 1px solid var(--line); font-weight: 700; text-align: left; }
th, td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: right; vertical-align: top; }
tbody tr:last-child td { border-bottom: 0; }
th { color: var(--dim); background: #0f0d0b; font-size: 9px; letter-spacing: .08em; text-transform: uppercase; }
th:first-child, td:first-child { text-align: left; }
tr.shipped td { color: var(--text); background: #151108; }
.win { color: var(--win); }
.warn { color: var(--warn); }
.dim { color: var(--dim); }
.note { margin-top: -14px !important; color: var(--dim) !important; font-size: 11px !important; line-height: 1.55 !important; }

.waterfall { display: grid; gap: 13px; margin: 30px 0; padding: 24px; background: var(--panel); border: 1px solid var(--line); }
.waterfall-row { display: grid; grid-template-columns: 180px minmax(140px, 1fr) 78px; align-items: center; gap: 13px; }
.waterfall-label { color: var(--muted); font: 10px ui-monospace, monospace; }
.waterfall-track { height: 22px; overflow: hidden; background: #0a0908; border: 1px solid #282018; }
.waterfall-bar { width: var(--w); height: 100%; min-width: 5px; background: linear-gradient(90deg, #7e3f00, var(--accent)); }
.waterfall-row:last-child .waterfall-bar { box-shadow: 0 0 20px #ff8a0044; background: linear-gradient(90deg, #b75f00, #ffad46); }
.waterfall-time { color: var(--text); font: 11px ui-monospace, monospace; text-align: right; }

.chart { margin: 30px 0; padding: 24px; background: radial-gradient(circle at 80% 20%, #261507, #11100e 55%); border: 1px solid var(--line-bright); }
.chart h3 { margin: 0 0 4px; }
.chart > p { margin: 0 0 20px; font-size: 11px; }
.chart svg { width: 100%; height: auto; display: block; overflow: visible; }
.chart .axis { stroke: #493a2d; stroke-width: 1; }
.chart .grid { stroke: #302820; stroke-width: 1; stroke-dasharray: 3 5; }
.chart .label { fill: #a69b90; font: 12px ui-monospace, monospace; }
.chart .value { fill: #f4eee6; font: 700 13px ui-monospace, monospace; }
.chart .minor { fill: #746b63; font: 10px ui-monospace, monospace; }

.cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; margin: 28px 0; background: var(--line); border: 1px solid var(--line); }
.card { min-height: 168px; padding: 22px; background: var(--panel); }
.card span { color: var(--accent); font: 9px ui-monospace, monospace; letter-spacing: .11em; text-transform: uppercase; }
.card h3 { margin: 12px 0 8px; font-size: 17px; }
.card p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.6; }

.status-list { margin: 25px 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.status-list li { display: grid; grid-template-columns: 86px 1fr; gap: 18px; padding: 15px 0; border-bottom: 1px solid var(--line); }
.status-list strong { color: var(--win); font: 10px ui-monospace, monospace; letter-spacing: .08em; text-transform: uppercase; }
.status-list span { color: var(--muted); font-size: 13px; line-height: 1.55; }
.status-list .candidate { color: var(--warn); }

.roadmap { counter-reset: step; margin: 28px 0; padding: 0; list-style: none; }
.roadmap li { position: relative; min-height: 90px; margin-left: 23px; padding: 0 0 30px 39px; border-left: 1px solid var(--line-bright); }
.roadmap li::before { position: absolute; top: -4px; left: -17px; width: 32px; height: 32px; display: grid; place-items: center; content: counter(step); counter-increment: step; color: #140b03; background: var(--accent); border-radius: 50%; font: 800 11px ui-monospace, monospace; }
.roadmap li:last-child { border-left-color: transparent; }
.roadmap strong { display: block; margin-bottom: 6px; font-size: 15px; }
.roadmap span { color: var(--muted); font-size: 13px; line-height: 1.6; }

.article-footer { padding: 45px clamp(20px, 5vw, 70px) 70px; background: #080706; border-top: 1px solid var(--line); }
.footer-inner { max-width: 1040px; margin: 0 auto; }
.article-footer h2 { max-width: 680px; margin: 0; font-size: clamp(27px, 3.4vw, 42px); line-height: 1.04; letter-spacing: -.04em; }
.article-footer p { max-width: 700px; color: var(--muted); line-height: 1.6; }
.footer-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 25px; }
.footer-links a, .footer-links button { padding: 11px 14px; color: var(--text); background: transparent; border: 1px solid var(--line-bright); font: 10px ui-monospace, monospace; letter-spacing: .07em; text-decoration: none; text-transform: uppercase; cursor: pointer; }
.footer-links a:hover, .footer-links button:hover { color: #130b03; background: var(--accent); border-color: var(--accent); }
.footer-links .footer-cta { color: #130b03; background: var(--accent); border-color: var(--accent); font-weight: 800; }
.footer-links .footer-cta:last-child { margin-left: auto; }

.legal-footer { min-height: 42px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 0 clamp(20px, 5vw, 70px); color: var(--muted); background: #060504; border-top: 1px solid var(--line); font: 600 9px ui-monospace, monospace; letter-spacing: .08em; text-transform: uppercase; }
.legal-footer a, .legal-footer button { color: inherit; }
.legal-footer a { text-decoration: none; }
.legal-footer a:hover, .legal-footer button:hover { color: var(--accent); }
.legal-links { display: flex; align-items: center; gap: 12px; }
.legal-links button { padding: 0; background: none; border: 0; font: inherit; letter-spacing: inherit; text-transform: inherit; cursor: pointer; }
.legal-links i { color: var(--line-bright); font-style: normal; }
.piracy-mark { width: 14px; height: 14px; margin-left: 4px; vertical-align: -3px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2; }
.piracy-mark .icon-fill { fill: currentColor; stroke: none; }
.piracy-mark .icon-cut { fill: var(--bg); stroke: none; }
.piracy-modal-mark { width: 22px; height: 22px; margin-left: 8px; vertical-align: -4px; }
.legal-dialog { width: min(520px, calc(100vw - 32px)); padding: 0; color: var(--text); background: var(--panel); border: 1px solid var(--line); box-shadow: 0 24px 90px #000b; }
.legal-dialog::backdrop { background: #000a; backdrop-filter: blur(3px); }
.legal-dialog div { padding: 28px; }
.legal-dialog h2 { margin: 0 0 14px; font-size: 22px; }
.legal-dialog p { margin: 0 0 22px; color: var(--muted); line-height: 1.6; }
.legal-dialog button { padding: 10px 14px; color: #130b03; background: var(--accent); border: 0; font: 700 11px ui-monospace, monospace; text-transform: uppercase; cursor: pointer; }

@media (max-width: 900px) {
  .metric-strip { grid-template-columns: repeat(2, 1fr); }
  .article-layout { grid-template-columns: 1fr; padding-top: 60px; }
  .toc { position: static; display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 18px; }
  .toc p { grid-column: 1 / -1; }
  .architecture { grid-template-columns: 1fr; gap: 10px; }
  .architecture div { min-height: auto; }
  .architecture div:not(:last-child)::after { top: calc(100% - 2px); left: 50%; transform: rotate(90deg); }
  .config-example { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .site-header { height: 54px; }
  .nav a:not([aria-current="page"]) { display: none; }
  .nav span, .nav i { display: none; }
  .article-hero { padding-top: 48px; padding-bottom: 46px; }
  .article section { margin-bottom: 76px; }
  .metric-strip { grid-template-columns: 1fr; }
  .metric { min-height: 95px; }
  .cards { grid-template-columns: 1fr; }
  .save-layout { grid-template-columns: 1fr; }
  .save-layout-player { box-shadow: inset 0 3px 0 var(--accent); }
  .waterfall { padding: 16px; }
  .waterfall-row { grid-template-columns: 1fr 62px; gap: 7px 10px; }
  .waterfall-track { grid-column: 1 / -1; grid-row: 2; }
  .waterfall-time { grid-column: 2; grid-row: 1; }
  .status-list li { grid-template-columns: 1fr; gap: 6px; }
  .chart { padding: 15px; }
  .legal-footer { padding-inline: 16px; }
}
