:root {
  --paper: #fcfcfb;
  --paper-2: #f3f3f1;
  --ink: #141311;
  --ink-2: #4e4b45;
  --ink-3: #8a867d;
  --rule: #dcdcd8;
  --accent: #c4532a;
  --accent-ink: #ffffff;
  --mark: #fff1c2;
  --s1: #2a78d6; --s2: #eb6834; --s3: #1baf7a;
  --serif: "Newsreader", Georgia, serif;
  --sans: "Instrument Sans", "Helvetica Neue", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
  --max: 960px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #15161a; --paper-2: #1d1e23; --ink: #ecebe6; --ink-2: #b4b2aa; --ink-3: #7c7a73;
    --rule: #2d2e34; --accent: #e5693d; --accent-ink: #15161a; --mark: #3a2f1a;
    --s1: #3987e5; --s2: #d95926; --s3: #199e70;
  }
}
:root[data-theme="dark"] {
  --paper: #15161a; --paper-2: #1d1e23; --ink: #ecebe6; --ink-2: #b4b2aa; --ink-3: #7c7a73;
  --rule: #2d2e34; --accent: #e5693d; --accent-ink: #15161a; --mark: #3a2f1a;
  --s1: #3987e5; --s2: #d95926; --s3: #199e70;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--sans); font-size: 17px; line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: underline; text-decoration-color: var(--rule); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--accent); }
code, pre, kbd { font-family: var(--mono); font-size: 0.86em; }
code { background: var(--paper-2); padding: 0.1em 0.35em; border-radius: 3px; }
pre { background: var(--paper-2); border: 1px solid var(--rule); padding: 14px 16px; overflow-x: auto; border-radius: 4px; line-height: 1.5; }
pre code { background: none; padding: 0; }
kbd { background: var(--paper-2); border: 1px solid var(--rule); border-bottom-width: 2px; padding: 1px 6px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; letter-spacing: -0.01em; line-height: 1.12; margin: 0 0 0.5em; }
h2 { font-size: 1.7rem; margin-bottom: 0.6em; }
h3 { font-size: 1.25rem; }
.muted { color: var(--ink-2); }
.small { font-size: 0.9rem; }
mark { background: var(--mark); color: inherit; padding: 0 2px; border-radius: 2px; }
table { border-collapse: collapse; width: 100%; }
td, th { padding: 8px 10px; border-bottom: 1px solid var(--rule); text-align: left; vertical-align: top; }
th { font-weight: 600; font-size: 0.85rem; color: var(--ink-2); }

.top {
  max-width: var(--max); margin: 0 auto; padding: 22px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
}
.brand { font-family: var(--serif); font-size: 1.35rem; text-decoration: none; display: inline-flex; align-items: center; gap: 10px; }
.pill { width: 26px; height: 12px; border-radius: 6px; background: var(--ink); position: relative; display: inline-block; }
.pill::after { content: ""; position: absolute; right: 4px; top: 4px; width: 4px; height: 4px; border-radius: 50%; background: var(--accent); }
.top nav { display: flex; gap: 22px; font-size: 0.95rem; }
.top nav a { text-decoration: none; color: var(--ink-2); }
.top nav a:hover { color: var(--ink); }

main { max-width: var(--max); margin: 0 auto; padding: 0 24px 80px; }
section { padding: 44px 0; border-top: 1px solid var(--rule); }
section:first-child { border-top: 0; }

.hero { padding: 48px 0 36px; max-width: 760px; }
.hero h1 { font-size: clamp(1.8rem, 3.6vw, 2.5rem); max-width: 22em; }
.lede { font-size: 1.08rem; color: var(--ink-2); max-width: 40em; margin: 14px 0 24px; }
.cta { display: flex; gap: 12px; flex-wrap: wrap; align-items: stretch; }
.btn {
  display: inline-flex; flex-direction: column; justify-content: center; gap: 2px;
  padding: 12px 20px; border: 1px solid var(--ink); border-radius: 6px; text-decoration: none;
  font-weight: 500; line-height: 1.2;
}
.btn:hover { text-decoration: underline; }
.btn.primary { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.btn.primary small { color: var(--paper); opacity: 0.7; font-weight: 400; font-size: 0.78rem; font-family: var(--mono); }
.fineprint { font-size: 0.88rem; color: var(--ink-3); max-width: 44em; margin-top: 18px; }

.demo { display: grid; grid-template-columns: 1fr auto 1fr; gap: 20px; align-items: stretch; }
.demo figure { margin: 0; border: 1px solid var(--rule); border-radius: 4px; padding: 16px 18px; }
.demo figcaption { font-size: 0.85rem; color: var(--ink-3); margin-bottom: 8px; }
.demo .raw { font-family: var(--mono); font-size: 0.98rem; color: var(--ink-2); margin: 0; line-height: 1.6; }
.demo .clean { font-family: var(--serif); font-size: 1.3rem; margin: 0; line-height: 1.35; }
.demo .arrow { align-self: center; font-size: 1.6rem; color: var(--ink-3); }
.demo-note { grid-column: 1 / -1; color: var(--ink-2); margin: 6px 0 0; max-width: 56em; }

.features { max-width: 680px; }
.features div { margin-bottom: 20px; }
.features h3 { display: inline; font-size: 1.05rem; font-family: var(--sans); font-weight: 600; }
.features h3::after { content: " "; }
.features p { display: inline; color: var(--ink-2); margin: 0; }

.dl-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 28px; }
.dl-card { border: 1px solid var(--rule); border-radius: 4px; padding: 20px 22px; }
.dl-card h3 + h3 { margin-top: 26px; }
.dl-card #rel-tag { font-family: var(--mono); font-size: 0.95em; color: var(--accent); }
.assets td { padding: 9px 6px; font-size: 0.95rem; }
.assets td:first-child a { font-family: var(--mono); font-size: 0.86rem; }
.assets td:nth-child(2) { white-space: nowrap; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.sub { margin-top: 36px; }
.steps { color: var(--ink-2); padding-left: 1.2em; max-width: 56em; }
.steps li { margin: 6px 0; }
.keys { max-width: 520px; margin-top: 16px; }
.keys td:first-child { white-space: nowrap; width: 160px; }

.pipeline { margin: 0 0 16px; padding-left: 1.4em; max-width: 680px; }
.pipeline li { margin: 8px 0; }
.pipeline b { font-weight: 600; }
.pipeline b::after { content: ". "; }
.pipeline span { color: var(--ink-2); }

.lede-sm { color: var(--ink-2); max-width: 46em; margin: 0 0 16px; }
.lede-sm + .controls { margin-top: 24px; }

.controls { display: flex; gap: 0; margin-bottom: 20px; border: 1px solid var(--rule); border-radius: 6px; width: max-content; overflow: hidden; }
.seg { font: inherit; font-size: 0.9rem; padding: 8px 14px; background: var(--paper-2); color: var(--ink-2); border: 0; cursor: pointer; }
.seg + .seg { border-left: 1px solid var(--rule); }
.seg.active { background: var(--ink); color: var(--paper); }

.charts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.chart { margin: 0; border: 1px solid var(--rule); border-radius: 4px; padding: 14px 16px 8px; position: relative; }
.chart.wide { margin-top: 36px; }
.chart figcaption { font-weight: 600; font-size: 0.95rem; margin-bottom: 8px; }
.chart figcaption .muted { font-weight: 400; font-size: 0.85rem; margin-left: 6px; }
.chart svg { width: 100%; height: auto; display: block; overflow: visible; }
.chart text { font-family: var(--sans); fill: var(--ink-2); font-size: 11px; }
.chart .val { fill: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.chart .grid { stroke: var(--rule); stroke-width: 1; }
.chart .axis { stroke: var(--ink-3); stroke-width: 1; }
.chart .bar { transition: opacity .15s; }
.chart .bar:hover, .chart .dot:hover { opacity: 0.8; }
.chart .ring { fill: none; stroke: var(--paper); stroke-width: 2; }
.legend { display: flex; gap: 22px; flex-wrap: wrap; margin: 14px 2px 0; font-size: 0.9rem; color: var(--ink-2); }
.legend span { display: inline-flex; align-items: center; gap: 8px; }
.legend i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.tip {
  position: fixed; pointer-events: none; z-index: 9; background: var(--ink); color: var(--paper);
  font-size: 0.82rem; padding: 6px 9px; border-radius: 4px; transform: translate(-50%, calc(-100% - 10px));
  white-space: nowrap; opacity: 0; transition: opacity .1s;
}
.tip.on { opacity: 1; }
.tableview { margin-top: 24px; }
.tableview summary { cursor: pointer; font-weight: 600; font-size: 0.95rem; color: var(--ink-2); }
.tableview table { margin-top: 12px; font-size: 0.88rem; font-variant-numeric: tabular-nums; }
.tableview td:not(:first-child):not(:nth-child(2)) { text-align: right; }
.tableview th:not(:first-child):not(:nth-child(2)) { text-align: right; }

.plans { max-width: 820px; margin-top: 12px; }
.plans td:not(:first-child), .plans th:not(:first-child) { text-align: center; white-space: nowrap; }
.plans td:first-child { color: var(--ink-2); }

footer { border-top: 1px solid var(--rule); max-width: var(--max); margin: 0 auto; padding: 32px 24px 60px; display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; color: var(--ink-2); font-size: 0.92rem; }
footer nav { display: flex; gap: 18px; }

@media (max-width: 820px) {
  .dl-grid, .charts { grid-template-columns: 1fr 1fr; }
  .demo { grid-template-columns: 1fr; }
  .demo .arrow { transform: rotate(90deg); justify-self: center; }
}
@media (max-width: 560px) {
  .dl-grid, .charts { grid-template-columns: 1fr; }
  body { font-size: 16px; }
  .controls { width: 100%; }
  .seg { flex: 1; }
  .top nav { gap: 14px; font-size: 0.88rem; }
}
