/* Intelligence Chain explorer — plain CSS, light + dark themes via tokens. */
:root {
  color-scheme: light;
  --bg: #f5f6f8;
  --surface: #ffffff;
  --surface-2: #f2f4f7;
  --surface-3: #e9ecf1;
  --border: #e2e5ea;
  --border-strong: #cfd4dc;
  --text: #10151c;
  --text-2: #475161;
  --muted: #778190;
  --brand: #3355d6;
  --link: #2c4fcf;
  --link-hover: #1b39a8;
  --focus: #3355d6;
  --code-bg: #f2f4f7;
  --shadow: 0 1px 2px rgba(16, 21, 28, .05), 0 1px 1px rgba(16, 21, 28, .03);
  /* status (fixed roles; always paired with an icon + label) */
  --good: #0a7d25; --good-bg: #e5f5e9;
  --warn: #8a5a00; --warn-bg: #fdf1d6;
  --bad: #b42323; --bad-bg: #fbe6e6;
  --info: #2554c7; --info-bg: #e5ecfc;
  --neutral: #535c69; --neutral-bg: #eceef2;
  /* charts (validated categorical slots) */
  --series-1: #2a78d6;
  --series-2: #eb6834;
  --series-3: #1baf7a;
  --series-muted: #c3c2b7;
  --grid: #e8e9ed;
  --axis: #c3c6cd;
  --chart-ink: #52514e;
  --chart-muted: #898781;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0b0e13; --surface: #12161d; --surface-2: #181d26; --surface-3: #202633;
    --border: #232a35; --border-strong: #323b49;
    --text: #edf0f4; --text-2: #b2bbc8; --muted: #7f8998;
    --brand: #4b6ef0; --link: #86a6ff; --link-hover: #b3c7ff; --focus: #86a6ff; --code-bg: #0f1319;
    --shadow: none;
    --good: #4cc76a; --good-bg: rgba(76, 199, 106, .12);
    --warn: #f0b545; --warn-bg: rgba(240, 181, 69, .12);
    --bad: #f07272; --bad-bg: rgba(240, 114, 114, .12);
    --info: #86a6ff; --info-bg: rgba(134, 166, 255, .12);
    --neutral: #aab3c0; --neutral-bg: rgba(170, 179, 192, .12);
    --series-1: #3987e5; --series-2: #d95926; --series-3: #199e70; --series-muted: #4a4d52;
    --grid: #232833; --axis: #3a404b; --chart-ink: #c3c2b7; --chart-muted: #898781;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0b0e13; --surface: #12161d; --surface-2: #181d26; --surface-3: #202633;
  --border: #232a35; --border-strong: #323b49;
  --text: #edf0f4; --text-2: #b2bbc8; --muted: #7f8998;
  --brand: #4b6ef0; --link: #86a6ff; --link-hover: #b3c7ff; --focus: #86a6ff; --code-bg: #0f1319;
  --shadow: none;
  --good: #4cc76a; --good-bg: rgba(76, 199, 106, .12);
  --warn: #f0b545; --warn-bg: rgba(240, 181, 69, .12);
  --bad: #f07272; --bad-bg: rgba(240, 114, 114, .12);
  --info: #86a6ff; --info-bg: rgba(134, 166, 255, .12);
  --neutral: #aab3c0; --neutral-bg: rgba(170, 179, 192, .12);
  --series-1: #3987e5; --series-2: #d95926; --series-3: #199e70; --series-muted: #4a4d52;
  --grid: #232833; --axis: #3a404b; --chart-ink: #c3c2b7; --chart-muted: #898781;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 14px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  overflow-x: hidden; min-height: 100vh; display: flex; flex-direction: column;
}
a { color: var(--link); text-decoration: none; }
a:hover { color: var(--link-hover); text-decoration: underline; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 3px; }
h1, h2, h3 { line-height: 1.25; margin: 0; }
h1 { font-size: 22px; font-weight: 650; letter-spacing: -.01em; }
h2 { font-size: 16px; font-weight: 620; }
h3 { font-size: 14px; font-weight: 620; }
p { margin: 0 0 10px; }
code, pre, .mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace; font-size: 12.5px; }
code { background: var(--code-bg); padding: 1px 5px; border-radius: 4px; border: 1px solid var(--border); word-break: break-word; }
.wrap { width: 100%; max-width: 1280px; margin: 0 auto; padding: 0 16px; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 8px; top: 8px; background: var(--surface); padding: 8px; z-index: 99; }
.muted { color: var(--muted); }
.t2 { color: var(--text-2); }
.small { font-size: 12.5px; }
.nowrap { white-space: nowrap; }
.num { font-variant-numeric: tabular-nums; }
.right { text-align: right; }
.hide { display: none !important; }

/* ---------- top bar ---------- */
.topbar { background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 20; }
.topbar-in { display: flex; align-items: center; gap: 16px; height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); flex: none; }
.brand:hover { text-decoration: none; color: var(--text); }
.brand-mark { width: 30px; height: 30px; }
.brand-name { font-weight: 700; font-size: 16px; letter-spacing: -.01em; }
.brand-net { font-size: 11px; font-weight: 600; color: var(--info); background: var(--info-bg); padding: 2px 7px; border-radius: 99px; text-transform: lowercase; }
.search { flex: 1; display: flex; max-width: 560px; margin-left: auto; position: relative; }
.search input {
  width: 100%; height: 38px; border: 1px solid var(--border-strong); background: var(--surface-2); color: var(--text);
  border-radius: 8px; padding: 0 42px 0 12px; font: inherit; min-width: 0;
}
.search input:focus { outline: none; border-color: var(--focus); background: var(--surface); }
.search button { position: absolute; right: 3px; top: 3px; height: 32px; width: 36px; border: 0; background: transparent; color: var(--muted); cursor: pointer; border-radius: 6px; }
.search button:hover { color: var(--text); background: var(--surface-3); }
.top-actions { display: flex; align-items: center; gap: 6px; flex: none; }
.icon-btn { width: 36px; height: 36px; display: grid; place-items: center; border: 1px solid var(--border); background: var(--surface); color: var(--text-2); border-radius: 8px; cursor: pointer; }
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.menu-btn { display: none; }
.live-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--muted); margin: 0 6px; flex: none; }
.live-dot.on { background: var(--good); box-shadow: 0 0 0 3px var(--good-bg); }
.live-dot.poll { background: var(--warn); }
.nav { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; padding-bottom: 0; }
.nav::-webkit-scrollbar { display: none; }
.nav a { color: var(--text-2); padding: 10px 11px; white-space: nowrap; border-bottom: 2px solid transparent; font-weight: 520; font-size: 13.5px; }
.nav a:hover { color: var(--text); text-decoration: none; }
.nav a.active { color: var(--text); border-bottom-color: var(--brand); }
.nav a.nav-docs { margin-left: auto; color: var(--link); }

main.wrap { flex: 1; padding-top: 22px; padding-bottom: 40px; }
main:focus { outline: none; }
.loading { color: var(--muted); padding: 40px 0; }
.footer { border-top: 1px solid var(--border); background: var(--surface); color: var(--text-2); font-size: 13px; }
.footer-in { display: flex; gap: 16px; justify-content: space-between; flex-wrap: wrap; padding-top: 18px; padding-bottom: 18px; }
.footer-links { display: flex; gap: 14px; flex-wrap: wrap; }

/* ---------- page head ---------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.page-head .sub { color: var(--text-2); margin-top: 4px; }
.crumbs { color: var(--muted); font-size: 12.5px; margin-bottom: 4px; }
.crumbs a { color: var(--muted); }
.title-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.head-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- cards / grids ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow); min-width: 0; }
.card-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px 10px; flex-wrap: wrap; }
.card-h .sub { color: var(--muted); font-size: 12.5px; font-weight: 400; }
.card-b { padding: 0 16px 16px; }
.card-b.flush { padding: 0; }
.card + .card, .grid + .card, .card + .grid, .grid + .grid, .note + .card, .card + .note, .tiles + .grid, .tiles + .card { margin-top: 16px; }
.grid { display: grid; gap: 16px; min-width: 0; }
.grid > .card, .grid > .note { margin-top: 0 !important; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g-7-5 { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
@media (max-width: 960px) { .g2, .g3, .g-7-5 { grid-template-columns: minmax(0, 1fr); } }

.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; margin-bottom: 16px; }
.tile { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 13px 15px; box-shadow: var(--shadow); min-width: 0; }
.tile .lbl { color: var(--text-2); font-size: 12.5px; display: flex; align-items: center; gap: 6px; }
.tile .val { font-size: 21px; font-weight: 640; margin-top: 3px; letter-spacing: -.01em; overflow-wrap: anywhere; }
.tile .val small { font-size: 13px; font-weight: 500; color: var(--text-2); }
.tile .foot { color: var(--muted); font-size: 12px; margin-top: 3px; }
.tile.hero .val { font-size: 30px; }

/* meter */
.meter { height: 8px; background: var(--surface-3); border-radius: 99px; overflow: hidden; display: flex; gap: 2px; margin-top: 8px; }
.meter > span { display: block; height: 100%; min-width: 0; }
.meter .m1 { background: var(--series-1); }
.meter .m2 { background: var(--series-muted); }
.meter .m3 { background: var(--series-3); }

/* key/value details */
.kv { display: grid; grid-template-columns: minmax(130px, 220px) minmax(0, 1fr); border-top: 1px solid var(--border); }
.kv > div { padding: 9px 16px; border-bottom: 1px solid var(--border); min-width: 0; overflow-wrap: anywhere; }
.kv > .k { color: var(--text-2); }
.kv > .k .hint { display: block; color: var(--muted); font-size: 11.5px; }
.kv > div:nth-last-child(-n+2) { border-bottom: 0; }
@media (max-width: 640px) {
  .kv { grid-template-columns: minmax(0, 1fr); }
  .kv > .k { padding-bottom: 0; border-bottom: 0; font-size: 12.5px; }
  .kv > .v { padding-top: 2px; }
  .kv > div:nth-last-child(2) { border-bottom: 0; }
}

/* tables */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; }
table { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; }
th, td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--border); white-space: nowrap; vertical-align: middle; }
th { font-size: 12px; font-weight: 600; color: var(--text-2); background: var(--surface-2); position: sticky; top: 0; }
th:first-child, td:first-child { padding-left: 16px; }
th:last-child, td:last-child { padding-right: 16px; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: var(--surface-2); }
td.r, th.r { text-align: right; }
td.wrap-cell { white-space: normal; min-width: 220px; }
.empty { color: var(--muted); padding: 20px 16px; text-align: center; }
table.compact td, table.compact th { padding: 7px 10px; }
table.compact td:first-child, table.compact th:first-child { padding-left: 16px; }

/* pills */
.pill { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 620; padding: 2px 8px 2px 7px; border-radius: 99px; letter-spacing: .01em; white-space: nowrap; line-height: 1.5; }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }
.pill.good { color: var(--good); background: var(--good-bg); }
.pill.warn { color: var(--warn); background: var(--warn-bg); }
.pill.bad { color: var(--bad); background: var(--bad-bg); }
.pill.info { color: var(--info); background: var(--info-bg); }
.pill.neutral { color: var(--neutral); background: var(--neutral-bg); }
.pill.good::before { content: "✓"; width: auto; height: auto; background: none; font-size: 10px; }
.pill.bad::before { content: "✕"; width: auto; height: auto; background: none; font-size: 9px; }
.tag { display: inline-block; font-size: 11.5px; font-weight: 600; padding: 1px 7px; border-radius: 5px; background: var(--surface-3); color: var(--text-2); white-space: nowrap; }
.tag.tier { font-family: ui-monospace, Menlo, monospace; }

/* hashes */
.hash { display: inline-flex; align-items: center; gap: 4px; max-width: 100%; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12.5px; }
.hash .full { overflow-wrap: anywhere; word-break: break-all; }
.copy { border: 0; background: transparent; color: var(--muted); cursor: pointer; padding: 2px; border-radius: 4px; line-height: 0; flex: none; }
.copy:hover { color: var(--text); background: var(--surface-3); }
.copy svg { width: 13px; height: 13px; }

/* buttons / forms */
.btn { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 13px; border-radius: 8px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); font: inherit; font-weight: 550; cursor: pointer; white-space: nowrap; }
.btn:hover { background: var(--surface-2); text-decoration: none; color: var(--text); }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:hover { filter: brightness(1.08); color: #fff; }
.btn[aria-disabled="true"] { opacity: .45; pointer-events: none; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.filters select, .filters input { height: 34px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); border-radius: 8px; padding: 0 10px; font: inherit; max-width: 100%; }
.filters label { color: var(--text-2); font-size: 12.5px; display: flex; gap: 6px; align-items: center; }
.seg { display: inline-flex; border: 1px solid var(--border-strong); border-radius: 8px; overflow: hidden; }
.seg button { border: 0; background: var(--surface); color: var(--text-2); padding: 5px 10px; font: inherit; font-size: 12.5px; cursor: pointer; }
.seg button + button { border-left: 1px solid var(--border); }
.seg button.on { background: var(--surface-3); color: var(--text); font-weight: 600; }
.pager { display: flex; gap: 8px; justify-content: flex-end; align-items: center; padding: 12px 16px; border-top: 1px solid var(--border); flex-wrap: wrap; }

/* notes / callouts */
.note { border: 1px solid var(--border); border-left: 3px solid var(--info); background: var(--surface); padding: 12px 14px; border-radius: 8px; color: var(--text-2); }
.note strong { color: var(--text); }
.note.warn { border-left-color: var(--warn); }
.note.good { border-left-color: var(--good); }
.note p:last-child { margin-bottom: 0; }

/* lists (latest blocks/events) */
.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; align-items: center; gap: 12px; padding: 10px 16px; border-top: 1px solid var(--border); min-width: 0; }
.list li:first-child { border-top: 0; }
.list .icon { width: 34px; height: 34px; border-radius: 8px; background: var(--surface-2); display: grid; place-items: center; font-size: 11px; font-weight: 700; color: var(--text-2); flex: none; }
.list .main { flex: 1; min-width: 0; overflow: hidden; }
.list .main > div { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list .side { text-align: right; flex: none; font-size: 12.5px; color: var(--text-2); }
.flash { animation: flash 1.2s ease-out; }
@keyframes flash { from { background: var(--info-bg); } to { background: transparent; } }
@media (prefers-reduced-motion: reduce) { .flash { animation: none; } }

/* ticker */
.tickers { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 0; }
.ticker { padding: 12px 16px; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ticker .sym { font-weight: 650; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.ticker .px { font-size: 18px; font-weight: 620; font-variant-numeric: tabular-nums; }
.up { color: var(--good); }
.down { color: var(--bad); }

/* timeline */
.timeline { list-style: none; margin: 0; padding: 4px 16px 12px; position: relative; }
.timeline li { position: relative; padding: 0 0 16px 30px; min-width: 0; }
.timeline li::before { content: ""; position: absolute; left: 8px; top: 20px; bottom: -2px; width: 2px; background: var(--border-strong); }
.timeline li:last-child::before { display: none; }
.timeline li.done::before { background: var(--good); }
.timeline .dot { position: absolute; left: 0; top: 2px; width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--border-strong); background: var(--surface); display: grid; place-items: center; font-size: 10px; color: #fff; }
.timeline li.done .dot { border-color: var(--good); background: var(--good); }
.timeline li.current .dot { border-color: var(--info); box-shadow: 0 0 0 4px var(--info-bg); }
.timeline li.bad .dot { border-color: var(--bad); background: var(--bad); }
.timeline .tl-h { font-weight: 620; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.timeline .tl-b { color: var(--text-2); font-size: 12.5px; }

/* sealed claim */
.sealed { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 10px; background: var(--surface-2); border: 1px dashed var(--border-strong); }
.sealed svg { flex: none; color: var(--text-2); }
.claim { font-size: 20px; font-weight: 650; }

/* factor bars */
.factor { display: grid; grid-template-columns: 140px minmax(0, 1fr) 64px; gap: 10px; align-items: center; padding: 6px 0; }
.factor .bar { height: 8px; background: var(--surface-3); border-radius: 99px; overflow: hidden; }
.factor .bar span { display: block; height: 100%; background: var(--series-1); border-radius: 99px; }
.factor .bar.pen span { background: var(--series-2); }
@media (max-width: 480px) { .factor { grid-template-columns: 110px minmax(0, 1fr) 52px; } }

/* bar list */
.barlist { display: grid; gap: 8px; }
.barlist .row { display: grid; grid-template-columns: 130px minmax(0, 1fr) 48px; gap: 10px; align-items: center; font-size: 13px; }
.barlist .track { height: 10px; background: var(--surface-3); border-radius: 3px; overflow: hidden; }
.barlist .track span { display: block; height: 100%; background: var(--series-1); border-radius: 0 4px 4px 0; }

/* charts */
.chart { position: relative; width: 100%; min-height: 60px; }
.chart svg { display: block; overflow: visible; }
.chart text { fill: var(--chart-muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.chart .grid-line { stroke: var(--grid); stroke-width: 1; shape-rendering: crispEdges; }
.chart .axis-line { stroke: var(--axis); stroke-width: 1; shape-rendering: crispEdges; }
.chart .ref { stroke: var(--chart-muted); stroke-width: 1; }
.chart .xhair { stroke: var(--chart-muted); stroke-width: 1; pointer-events: none; }
.chart .hit { fill: transparent; cursor: crosshair; }
.chart .col:hover, .chart .col.hover { opacity: .8; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12.5px; color: var(--text-2); margin-bottom: 8px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; }
.legend i.line { height: 2px; width: 14px; border-radius: 1px; }
.legend i.dot { width: 9px; height: 9px; border-radius: 50%; }
.data-table { margin-top: 10px; }
.data-table summary { cursor: pointer; color: var(--muted); font-size: 12.5px; }
.data-table .table-wrap { max-height: 280px; overflow: auto; border: 1px solid var(--border); border-radius: 8px; margin-top: 8px; }
.tip { position: fixed; z-index: 50; pointer-events: none; background: var(--surface); color: var(--text); border: 1px solid var(--border-strong); border-radius: 8px; padding: 8px 10px; font-size: 12.5px; box-shadow: 0 6px 20px rgba(0, 0, 0, .14); max-width: 280px; }
.tip .tt { color: var(--muted); font-size: 11.5px; margin-bottom: 4px; }
.tip .tr { display: flex; align-items: center; gap: 7px; }
.tip .tr b { font-variant-numeric: tabular-nums; }
.tip .tr i { width: 12px; height: 2px; display: inline-block; border-radius: 1px; }
.tip .tr i.sq { height: 9px; width: 9px; border-radius: 2px; }
.spark { display: block; }
.spark path { fill: none; stroke: var(--series-1); stroke-width: 1.5; stroke-linejoin: round; stroke-linecap: round; }

/* tier diagram */
.tierbar { position: relative; overflow: hidden; height: 22px; background: var(--surface-2); border-radius: 6px; margin: 4px 0; }
.tierbar .seg-fill { position: absolute; top: 0; bottom: 0; background: var(--info-bg); border-radius: 6px; }
.tierbar .mark { position: absolute; top: 3px; bottom: 3px; width: 3px; border-radius: 2px; background: var(--series-1); }
.tierbar .lab { position: absolute; top: 4px; font-size: 11.5px; color: var(--text-2); white-space: nowrap; }

/* docs */
.docs { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 24px; }
.docs-nav { position: sticky; top: 120px; align-self: start; display: flex; flex-direction: column; gap: 2px; }
.docs-nav a { padding: 7px 10px; border-radius: 7px; color: var(--text-2); font-weight: 520; }
.docs-nav a:hover { background: var(--surface-2); text-decoration: none; color: var(--text); }
.docs-nav a.active { background: var(--info-bg); color: var(--info); }
.docs-nav .grp { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 12px 10px 4px; font-weight: 650; }
.prose { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 24px 28px; max-width: 860px; min-width: 0; line-height: 1.65; font-size: 14.5px; }
.prose h1 { font-size: 24px; margin-bottom: 8px; }
.prose h2 { font-size: 18px; margin: 28px 0 10px; padding-top: 4px; }
.prose h3 { font-size: 15px; margin: 20px 0 8px; }
.prose ul, .prose ol { padding-left: 22px; margin: 0 0 12px; }
.prose li { margin: 3px 0; }
.prose .lead { font-size: 16px; color: var(--text-2); }
.prose table { margin: 8px 0 14px; border: 1px solid var(--border); border-radius: 8px; }
.prose table td { white-space: normal; }
.prose table td:first-child { white-space: nowrap; }
.prose .note { margin: 12px 0; }
.codeblock { position: relative; margin: 8px 0 14px; }
.codeblock pre { background: var(--code-bg); border: 1px solid var(--border); border-radius: 8px; padding: 12px 44px 12px 14px; overflow-x: auto; margin: 0; line-height: 1.55; white-space: pre; }
.codeblock .copy { position: absolute; top: 7px; right: 7px; background: var(--surface); border: 1px solid var(--border); padding: 5px; }
.cards-links { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin: 14px 0; }
.cards-links a { display: block; border: 1px solid var(--border); border-radius: 10px; padding: 14px; color: var(--text); background: var(--surface-2); }
.cards-links a:hover { border-color: var(--focus); text-decoration: none; }
.cards-links a b { display: block; margin-bottom: 4px; }
.cards-links a span { color: var(--text-2); font-size: 13px; }
.steps { counter-reset: s; list-style: none; padding-left: 0 !important; }
.steps > li { counter-increment: s; position: relative; padding-left: 34px; margin: 10px 0 !important; }
.steps > li::before { content: counter(s); position: absolute; left: 0; top: 1px; width: 22px; height: 22px; border-radius: 50%; background: var(--info-bg); color: var(--info); font-size: 12px; font-weight: 700; display: grid; place-items: center; }

.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--text); color: var(--bg); padding: 8px 14px; border-radius: 8px; font-size: 13px; z-index: 60; }
.err { padding: 40px 20px; text-align: center; }
.err h1 { margin-bottom: 8px; }

@media (max-width: 860px) {
  .docs { grid-template-columns: minmax(0, 1fr); }
  .docs-nav { position: static; flex-direction: row; flex-wrap: wrap; gap: 4px; }
  .docs-nav .grp { display: none; }
  .prose { padding: 18px 16px; }
}
@media (max-width: 760px) {
  .topbar-in { height: auto; flex-wrap: wrap; padding-top: 10px; padding-bottom: 10px; gap: 10px; }
  .search { order: 3; flex-basis: 100%; max-width: none; }
  .top-actions { margin-left: auto; }
  .menu-btn { display: grid; }
  .nav { display: none; flex-direction: column; padding-bottom: 8px; }
  .nav.open { display: flex; }
  .nav a { border-bottom: 0; border-left: 2px solid transparent; padding: 9px 10px; }
  .nav a.active { border-left-color: var(--brand); background: var(--surface-2); }
  .nav a.nav-docs { margin-left: 0; }
  .brand-name { font-size: 15px; }
  h1 { font-size: 19px; }
  .tile .val { font-size: 18px; }
  .tile.hero .val { font-size: 24px; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .tile { padding: 11px 12px; }
}
@media (max-width: 360px) { .tiles { grid-template-columns: minmax(0, 1fr); } }
@media (forced-colors: active) { .pill::before, .live-dot { forced-color-adjust: none; } }
