/* CoinBundleCap. Colours, type, spacing and radii come from the design system (design-system/, served as
   /static/tokens.css, loaded first). The names below are aliases kept so older rules read the tokens:
   Terminal (dark) is the default, Paper (light) via [data-theme="light"]. */
:root {
  --bg: var(--ground);
  --panel: var(--surface);
  --panel-2: var(--surface-raised);
  --line-2: var(--line-strong);
  --text: var(--ink);
  --text-2: var(--ink-muted);
  --text-3: var(--ink-faint);
  --accent: var(--cap-text);
  --accent-ink: var(--on-cap);
  --accent-soft: color-mix(in srgb, var(--cap-text) 14%, transparent);
  --info: var(--safe);
  --grey: var(--ink-faint);
  --shadow: none;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--ground); color: var(--ink);
  font: 400 14px/1.5 var(--font-sans); -webkit-font-smoothing: antialiased;
  font-variant-numeric: tabular-nums;
}
a { color: inherit; text-decoration: none; }
a:hover { color: var(--cap-text); }
/* Focus: 2px solid focus ring, 2px offset, on every interactive element (lime in Terminal, blue in Paper). */
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: var(--radius-sm); }
th[tabindex]:focus-visible { outline-offset: -2px; }
.wrap { max-width: 1320px; margin: 0 auto; padding: 0 var(--space-6); }
@media (max-width: 640px) { .wrap { padding: 0 var(--space-4); } }
.muted { color: var(--ink-muted); }
.faint { color: var(--ink-faint); }
.up { color: var(--up); }
.down { color: var(--down); }
.mono { font-family: var(--font-mono); font-size: 12px; font-variant-numeric: tabular-nums; }
.loading, .empty { padding: 48px 0; text-align: center; color: var(--text-2); }
.error-box { padding: 16px; border: 1px solid var(--down); border-radius: 10px; color: var(--down); margin: 16px 0; }

/* Header */
.top { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.top-row { display: flex; align-items: center; gap: 20px; height: 56px; }
.brand { display: flex; align-items: center; gap: 8px; font-size: 17px; font-weight: 600; white-space: nowrap; }
.brand b { color: var(--accent); }
.nav { display: flex; gap: 4px; }
.nav a { padding: 6px 12px; border-radius: 8px; color: var(--text-2); font-weight: 500; }
.nav a.active { color: var(--text); background: var(--panel-2); }
.search { position: relative; flex: 1; max-width: 380px; margin-left: auto; }
.search input { width: 100%; height: 36px; padding: 0 34px 0 12px; border-radius: 9px; border: 1px solid var(--line); background: var(--panel); color: var(--text); font: inherit; }
.search input:focus { outline: 2px solid var(--accent-soft); border-color: var(--accent); }
.search kbd { position: absolute; right: 10px; top: 8px; font-size: 11px; color: var(--text-3); border: 1px solid var(--line-2); border-radius: 4px; padding: 0 5px; }
.search-results { position: absolute; top: 42px; left: 0; right: 0; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 8px 30px rgba(0,0,0,.25); overflow: hidden; }
.search-results a { display: flex; justify-content: space-between; gap: 12px; padding: 8px 12px; }
.search-results a:hover, .search-results a.sel { background: var(--panel-2); color: var(--text); }
.search-results .grp { padding: 6px 12px; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--text-3); }
.icon-btn { height: 36px; width: 36px; border-radius: 9px; border: 1px solid var(--line); background: var(--panel); color: var(--text); cursor: pointer; font-size: 16px; }
.ticker { display: flex; gap: 22px; overflow-x: auto; white-space: nowrap; padding-bottom: 8px; font-size: 12.5px; color: var(--text-2); scrollbar-width: none; }
.ticker::-webkit-scrollbar { display: none; }
.ticker b { color: var(--text); font-weight: 600; }
.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 5px; background: var(--up); vertical-align: middle; }
.dot.warn { background: var(--accent); }
.dot.bad { background: var(--down); }

/* Page blocks */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin: 22px 0 14px; flex-wrap: wrap; }
.page-head h1 { margin: 0; font-size: 24px; letter-spacing: -.01em; }
.page-head p { margin: 4px 0 0; color: var(--text-2); }
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; margin-bottom: 18px; }
.kpi { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; box-shadow: var(--shadow); min-width: 0; }
.kpi .l { font-size: 12px; color: var(--text-2); display: flex; justify-content: space-between; gap: 8px; }
.kpi .v { font-size: 20px; font-weight: 650; margin-top: 2px; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi .s { font-size: 12px; color: var(--text-3); margin-top: 2px; }
.kpi.hl { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; margin-bottom: 14px; box-shadow: var(--shadow); min-width: 0; }
.card h2 { font-size: 15px; margin: 0 0 2px; }
.card .sub { font-size: 12.5px; color: var(--text-2); margin: 0 0 10px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grid3 { display: grid; grid-template-columns: 2fr 1fr; gap: 14px; }
.chart { width: 100%; height: 300px; }
.chart.tall { height: 380px; }
.chart.short { height: 220px; }
.note { font-size: 12px; color: var(--text-3); margin-top: 6px; }

/* Tabs & controls */
.tabs { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 10px; }
.tabs button { border: 1px solid transparent; background: none; color: var(--text-2); padding: 6px 11px; border-radius: 8px; cursor: pointer; font: inherit; font-weight: 500; }
.tabs button.on { background: var(--panel-2); color: var(--text); border-color: var(--line); }
.tabs button:hover { color: var(--text); }
.controls { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }
.controls label { font-size: 12.5px; color: var(--text-2); display: flex; align-items: center; gap: 6px; }
select, .controls input[type=number] { height: 30px; background: var(--panel); border: 1px solid var(--line); color: var(--text); border-radius: 7px; padding: 0 8px; font: inherit; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.seg button { border: 0; background: none; color: var(--text-2); padding: 4px 10px; cursor: pointer; font: inherit; font-size: 12.5px; }
.seg button.on { background: var(--panel-2); color: var(--text); }

/* Tables */
.tbl-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 10px 10px; text-align: right; white-space: nowrap; border-bottom: 1px solid var(--line); }
th { position: sticky; top: 0; background: var(--panel); font-size: 12px; font-weight: 600; color: var(--text-2); cursor: pointer; user-select: none; z-index: 1; }
th.l, td.l { text-align: left; }
th.sorted { color: var(--text); }
th .arr { font-size: 10px; margin-left: 3px; }
.col-hidden { display: none; }
tbody tr:hover { background: var(--panel-2); }
tbody tr:last-child td { border-bottom: 0; }
td.sticky, th.sticky { position: sticky; left: 0; background: inherit; z-index: 2; }
tbody td.sticky { background: var(--panel); }
tbody tr:hover td.sticky { background: var(--panel-2); }
.tok { display: flex; align-items: center; gap: 10px; min-width: 0; }
.tok img, .tok .ph { width: 24px; height: 24px; border-radius: 50%; flex: none; background: var(--panel-2); object-fit: cover; }
.tok .ph { display: inline-grid; place-items: center; font-size: 11px; font-weight: 700; color: var(--text-2); }
.tok .nm { font-weight: 600; overflow: hidden; text-overflow: ellipsis; max-width: 180px; }
.tok .sym { color: var(--text-2); font-size: 12px; }
.star { cursor: pointer; color: var(--text-3); font-size: 15px; background: none; border: 0; padding: 0 2px; }
.star.on { color: var(--accent); }
.badge { display: inline-block; font-size: 11px; font-weight: 600; padding: 1px 7px; border-radius: 999px; background: var(--panel-2); color: var(--text-2); border: 1px solid var(--line); }
.badge.acc { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.badge.ok { color: var(--up); }
.badge.bad { color: var(--down); }
.badge.info { color: var(--info); }
.bar { height: 6px; border-radius: 3px; background: var(--panel-2); overflow: hidden; min-width: 60px; }
.bar > i { display: block; height: 100%; background: var(--accent); border-radius: 3px; }
.bar.grey > i { background: var(--grey); }
.spark { display: block; }
.pager { display: flex; justify-content: space-between; align-items: center; margin: 10px 0 20px; color: var(--text-2); font-size: 12.5px; }
.pager button { background: var(--panel); border: 1px solid var(--line); color: var(--text); border-radius: 7px; padding: 4px 10px; cursor: pointer; }
.pager button:disabled { opacity: .4; cursor: default; }

/* Token header */
.th { display: flex; align-items: center; gap: 14px; margin: 22px 0 6px; flex-wrap: wrap; }
.th img, .th .ph { width: 44px; height: 44px; border-radius: 50%; background: var(--panel-2); object-fit: cover; }
.th h1 { margin: 0; font-size: 24px; }
.th .px { font-size: 30px; font-weight: 700; letter-spacing: -.02em; }
.links { display: flex; gap: 8px; flex-wrap: wrap; margin: 6px 0 16px; }
.links a, .links span { font-size: 12.5px; color: var(--text-2); background: var(--panel); border: 1px solid var(--line); border-radius: 7px; padding: 3px 9px; }
.about { color: var(--text-2); max-width: 760px; margin: 0 0 14px; }
.kv { display: grid; grid-template-columns: 1fr auto; gap: 8px 16px; font-size: 13px; }
.kv dt { color: var(--text-2); }
.kv dd { margin: 0; text-align: right; font-weight: 500; }
.scorebar { display: grid; grid-template-columns: 140px 1fr 44px; gap: 10px; align-items: center; font-size: 12.5px; margin: 6px 0; }
.method { font-size: 12.5px; color: var(--text-2); }
.method li { margin: 3px 0; }

@media (max-width: 960px) {
  .grid2, .grid3 { grid-template-columns: 1fr; }
  .search kbd { display: none; }
}
@media (max-width: 640px) {
  .top-row { gap: 10px; height: auto; padding: 8px 0; flex-wrap: wrap; }
  .search { order: 3; max-width: none; flex-basis: 100%; }
  .nav a { padding: 6px 8px; }
  .brand span { display: none; }
  .kpis { grid-template-columns: 1fr 1fr; }
  .kpi .v { font-size: 17px; }
  .th .px { font-size: 24px; }
  .chart { height: 260px; }
  .hide-sm { display: none; }
  .scorebar { grid-template-columns: 110px 1fr 40px; }
}

/* 0.3.0 */
.ext { margin-left: 4px; font-size: 11px; color: var(--text-3); }
.csv { font-size: 12.5px; color: var(--accent); }
@keyframes flashUp { from { background: color-mix(in srgb, var(--up) 30%, transparent); } to { background: transparent; } }
@keyframes flashDown { from { background: color-mix(in srgb, var(--down) 30%, transparent); } to { background: transparent; } }
.flash-up { animation: flashUp 1.6s ease-out; border-radius: 4px; }
.flash-down { animation: flashDown 1.6s ease-out; border-radius: 4px; }
.since { border-left: 3px solid var(--accent); }
.badge.new { background: var(--accent); color: var(--accent-ink); }
.kind { font-size: 11px; font-weight: 600; padding: 1px 6px; border-radius: 4px; background: var(--panel-2); color: var(--text-2); }
.kind.buy { color: var(--up); } .kind.sell { color: var(--down); }
.kind.to_vault, .kind.from_vault { color: var(--accent); }
pre.code { background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; overflow-x: auto; font-size: 12.5px; }
.review button, .hreview button { font: inherit; font-size: 12px; padding: 2px 8px; border-radius: 6px; border: 1px solid var(--line); background: var(--panel); color: var(--text); cursor: pointer; }
.review button.on, .hreview button.on { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.bubblemap { width: 100%; height: 640px; border: 0; border-radius: 10px; background: var(--panel-2); }
@media (max-width: 640px) { .bubblemap { height: 520px; } }

/* 0.4.0: the two main tabs */
.nav a.main { color: var(--text); font-weight: 600; }
.nav a.main.active { background: var(--accent-soft); color: var(--accent); }
.scorecell { display: flex; align-items: center; gap: 8px; }
.verdict { min-width: 58px; text-align: center; }
td.wrapcell { white-space: normal; min-width: 240px; max-width: 420px; text-align: left; }
.why { display: flex; flex-direction: column; gap: 2px; font-size: 12.5px; line-height: 1.35; }
.why .bad { color: var(--down); }
.why .ok { color: var(--up); }
.card .why { font-size: 13.5px; gap: 4px; margin-top: 8px; }
@media (max-width: 900px) { .nav { overflow-x: auto; scrollbar-width: none; } .nav a { white-space: nowrap; } }
@media (max-width: 640px) {
  .brand { order: 1; }
  #theme { order: 2; margin-left: auto; }
  .search { order: 3; }
  .nav { order: 4; flex-basis: 100%; }
}

/* 0.5.0: evidence links, pre-funding, follow, alerts */
.why .ev { font-size: 11.5px; white-space: nowrap; }
.why .ev a { color: var(--accent); }
.why-more { display: flex; flex-direction: column; gap: 2px; }
.why-more[hidden] { display: none; }
.linkish { background: none; border: 0; padding: 0; color: var(--text-2); font: inherit; font-size: 12px; cursor: pointer; text-align: left; text-decoration: underline dotted; }
.linkish:hover { color: var(--accent); }
.follow { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 4px 0 10px; }
.btn-small { display: inline-block; font-size: 12.5px; padding: 4px 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel-2); color: var(--text); }
.btn-small:hover { border-color: var(--accent); }
ul.alerts { list-style: none; margin: 0; padding: 0; }
ul.alerts li { padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
ul.alerts li:last-child { border-bottom: 0; }
ul.alerts .muted { font-size: 12.5px; margin-top: 2px; }
.h3 { font-size: 13px; margin: 14px 0 6px; color: var(--text-2); font-weight: 600; }
code { font-size: 12px; background: var(--panel-2); padding: 1px 5px; border-radius: 4px; }

/* 0.6.0: reason icons with a dialog (Why column) */
.ricons { display: flex; gap: 4px; flex-wrap: nowrap; }
.ri { width: 22px; height: 22px; border-radius: 50%; border: 0; padding: 0; cursor: pointer; font: 700 11px/20px inherit; color: #fff; display: inline-grid; place-items: center; }
.ri-bad { background: var(--down); }
.ri-good { background: var(--up); }
.ri-note { background: var(--grey); }
.ri-mixed { background: linear-gradient(90deg, var(--down) 50%, var(--up) 50%); }
.reason-tip { max-height: 60vh; overflow-y: auto; }
.reason-tip .tip-head { font-size: 12px; font-weight: 600; margin-bottom: 6px; }
.reason-tip .tip-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.reason-tip .tip-list li { display: flex; gap: 8px; align-items: flex-start; }
.reason-tip .tip-list .ev { font-size: 12px; }
.dotk { flex: none; width: 8px; height: 8px; border-radius: 50%; margin-top: 6px; }
.dot-bad { background: var(--down); } .dot-good { background: var(--up); } .dot-note { background: var(--grey); }
.ri:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.reason-tip { position: fixed; z-index: 50; background: var(--panel); color: var(--text); border: 1px solid var(--line-2); border-radius: 10px; padding: 10px 12px; box-shadow: 0 8px 30px rgba(0,0,0,.3); font-size: 13px; line-height: 1.4; }
.reason-tip .bad { color: var(--down); }
.reason-tip .ok { color: var(--up); }
.reason-tip .ev { margin-top: 6px; font-size: 12px; }
.reason-tip .ev a { color: var(--accent); }

/* 0.7.0: donate */
.heart-btn { width: auto; padding: 0 10px; display: inline-flex; align-items: center; gap: 6px; color: var(--rug); font-weight: 600; }
.heart-btn .lbl { color: var(--text); font-size: 13px; }
.heart-btn:hover { border-color: var(--rug); }
@media (max-width: 640px) { .heart-btn .lbl { display: none; } }
@media (max-width: 640px) { .heart-btn { order: 2; margin-left: auto; } #theme { margin-left: 0; } }
.donate-dlg { border: 1px solid var(--line-2); border-radius: 14px; background: var(--panel); color: var(--text); padding: 0; width: min(460px, calc(100vw - 32px)); box-shadow: 0 20px 60px rgba(0,0,0,.4); }
.donate-dlg::backdrop { background: rgba(0,0,0,.5); }
.donate-form { padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; }
.donate-form .dh { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.donate-form h2 { margin: 0; font-size: 17px; }
.donate-form .heart { color: var(--rug); }
.donate-form .sub { margin: 0; font-size: 13px; color: var(--text-2); }
.donate-form .dl { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; color: var(--text-2); }
.donate-form input[type=number] { height: 36px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel-2); color: var(--text); padding: 0 10px; font: inherit; font-size: 15px; }
.donate-form input[type=range] { width: 100%; accent-color: var(--rug); }
.donate-form .split { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; font-size: 13px; }
.donate-form .split .burn { color: var(--accent); }
.donate-form .split .site { color: var(--rug); }
.donate-form .dq { font-size: 13.5px; padding: 8px 10px; border-radius: 8px; background: var(--panel-2); }
.donate-form .dactions { display: flex; justify-content: flex-end; }
.btn-primary { height: 38px; padding: 0 18px; border-radius: 9px; border: 0; background: var(--rug); color: #fff; font: inherit; font-weight: 600; cursor: pointer; }
.btn-primary:disabled { opacity: .5; cursor: default; }
/* Header between phone and wide desktop: search gets its own row instead of shrinking to nothing (QA-104). */
/* 0.10.1: brand, search, Donate and theme share the first row; the nav gets the full second row, so nothing wraps
   on its own (QA-205) and the sixth tab (Swarms) fits. */
@media (min-width: 641px) and (max-width: 1220px) {
  .top-row { flex-wrap: wrap; height: auto; padding: 8px 0; row-gap: 6px; column-gap: 12px; }
  .brand { order: 1; }
  .search { order: 2; flex: 1 1 200px; max-width: none; margin-left: auto; }
  .heart-btn { order: 3; margin-left: 0; }
  #theme { order: 4; margin-left: 0; }
  .nav { order: 5; flex-basis: 100%; overflow-x: auto; scrollbar-width: none; }
  .nav a { white-space: nowrap; }
}
/* Donate dialog keeps one size while the slider, quote and status change (0.7.3): every changing line has a
   fixed height, and the dialog is pinned to the top instead of re-centring. */
.donate-dlg { margin-top: max(16px, 8vh); margin-bottom: auto; }
.donate-form .split { grid-template-rows: 1.5em 1.5em; white-space: nowrap; font-variant-numeric: tabular-nums; }
.donate-form .split > * { overflow: hidden; text-overflow: ellipsis; }
.donate-form .dq { height: calc(2 * 1.45em + 16px); line-height: 1.45; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.donate-form #d-totals { height: calc(2 * 1.4em); line-height: 1.4; overflow: hidden; }
.donate-form #d-status { height: calc(3 * 1.4em); line-height: 1.4; overflow: hidden; margin: 0; }

/* 0.8.0: clusters next to Bubblemaps */
.clusters-split { align-items: start; }
.clusters-split .bubblemap { height: 380px; }

/* 0.9.0: column names stay visible while scrolling a long table. A table that also scrolls sideways can't stick its
   header to the page, so long tables scroll inside their own box (at most one screen tall) and the header sticks there. */
.tbl-wrap { max-height: calc(100vh - 150px); overflow: auto; overscroll-behavior: contain; }
.tbl-wrap thead th { position: sticky; top: 0; z-index: 3; box-shadow: inset 0 -1px 0 var(--line); }
.tbl-wrap thead th.sticky { z-index: 4; left: 0; }
@media (max-width: 640px) { .tbl-wrap { max-height: calc(100vh - 190px); } }
/* Rugs tab chain switch */
.chain-switch { display: inline-flex; gap: 6px; padding: 4px; border-radius: 12px; background: var(--panel-2); border: 1px solid var(--line); }
.chain-switch button { font: inherit; font-size: 15px; font-weight: 650; padding: 8px 18px; border-radius: 9px; border: 0; background: transparent; color: var(--text-2); cursor: pointer; }
.chain-switch button:hover { color: var(--text); }
.chain-switch button.on { background: var(--accent); color: var(--accent-ink); box-shadow: 0 1px 4px rgba(0,0,0,.25); }
.chain-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 4px 0 14px; }
.chain-bar .lbl { font-weight: 600; color: var(--text-2); }

/* 0.10.0: BUN hero image */
.th.bun-hero img { width: 96px; height: 96px; border-radius: 18px; object-fit: cover; box-shadow: 0 2px 10px rgba(0,0,0,.25); }
@media (max-width: 640px) { .th.bun-hero img { width: 64px; height: 64px; border-radius: 14px; } }
#bmap .bubblemap { height: 560px; }
.bm-open { margin: 0 0 8px; font-size: 12.5px; }

/* 0.11.0: sell pressure, weekly report, funder return */
.press { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.press::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.press.none, .press.low { color: var(--text-3); background: var(--panel-2); }
.press.elevated { color: var(--warn); background: color-mix(in srgb, var(--warn) 14%, transparent); }
.press.high { color: var(--down); background: color-mix(in srgb, var(--down) 14%, transparent); }
.week-nav { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 4px 0 14px; }
.week-nav select { height: 32px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel); color: var(--text); font: inherit; padding: 0 8px; }
.wk-list { margin: 6px 0 0; padding-left: 18px; }
.wk-list li { margin: 3px 0; }
.basis-today { color: var(--text-3); font-size: 11px; }

/* ===== 0.12.0: CoinBundleCap design system (design-system/README.md, BRAND.md). Components rebuilt from
   design-system/components: type classes, Button, RiskBadge, PriceChange, MarketTable, RugCounter, Logo. ===== */

/* Type */
h1, .page-head h1, .th h1 { font: 700 32px/38px var(--font-sans); letter-spacing: -0.02em; margin: 0; }
.card h2, .donate-form h2 { font: 600 17px/24px var(--font-sans); letter-spacing: 0; margin: 0 0 var(--space-1); }
.h3, h3.h3 { font: 500 11px/16px var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-faint); margin: var(--space-4) 0 var(--space-2); }
#funded { font: 700 22px/28px var(--font-sans) !important; letter-spacing: -0.01em; margin: var(--space-8) 0 var(--space-3) !important; }
.page-head { margin: var(--space-8) 0 var(--space-6); }
.page-head p, .about { font: 400 15px/22px var(--font-sans); color: var(--ink-muted); }
.card .sub, .note, .method { font: 400 13px/18px var(--font-sans); color: var(--ink-muted); }
.note { color: var(--ink-faint); }
.label, .lbl-type { font: 500 11px/16px var(--font-mono); letter-spacing: .08em; text-transform: uppercase; }
.num { font: 400 13px/20px var(--font-mono); font-variant-numeric: tabular-nums; }

/* Header and logo */
.top { background: color-mix(in srgb, var(--ground) 92%, transparent); border-bottom: 1px solid var(--line); }
.top-row { height: 64px; gap: var(--space-6); }
.brand { gap: 0; }
.brand .logo { height: 30px; width: auto; display: block; }
.brand .logo-mark { height: 28px; width: auto; display: none; }
.brand .logo-light { display: none; }
[data-theme="light"] .brand .logo-dark { display: none; }
[data-theme="light"] .brand .logo.logo-light { display: block; }
.nav { gap: var(--space-1); }
.nav a, .nav a.main { font: 500 11px/16px var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-muted); padding: var(--space-2) var(--space-3); border-radius: var(--radius-md); white-space: nowrap; transition: background .12s ease-out, color .12s ease-out; }
.nav a:hover { color: var(--ink); background: var(--surface-raised); }
.nav a.active, .nav a.main.active { color: var(--ink); background: var(--surface-raised); box-shadow: inset 0 -2px 0 var(--cap); }
.search input { height: 40px; border-radius: var(--radius-md); border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: 400 14px var(--font-sans); padding-left: 36px; }
.search input::placeholder { color: var(--ink-faint); }
.search input:focus { outline: 2px solid var(--focus); outline-offset: 2px; border-color: var(--line-strong); }
.search .s-ico { position: absolute; left: 12px; top: 12px; width: 16px; height: 16px; color: var(--ink-faint); pointer-events: none; }
.search kbd { top: 11px; font-family: var(--font-mono); border-color: var(--line-strong); color: var(--ink-faint); }
.search-results { top: 46px; border-radius: var(--radius-lg); box-shadow: var(--shadow-pop); background: var(--surface); }
.search-results .grp { font: 500 11px/16px var(--font-mono); letter-spacing: .08em; color: var(--ink-faint); }
.icon-btn { height: 40px; width: 40px; border-radius: var(--radius-md); border: 1px solid var(--line-strong); background: transparent; color: var(--ink); display: inline-grid; place-items: center; transition: background .12s ease-out; }
.icon-btn:hover { background: var(--surface-raised); }
.icon-btn svg { width: 16px; height: 16px; }
.ticker { font: 400 12px/20px var(--font-mono); color: var(--ink-faint); gap: var(--space-6); padding-bottom: var(--space-2); }
.ticker b { color: var(--ink); font-weight: 500; }
.dot { background: var(--up); } .dot.warn { background: var(--warn); } .dot.bad { background: var(--rug); }

/* Button (secondary by default; primary = cap fill) */
.btn, .heart-btn, .btn-small, .pager button, .review button, .hreview button {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2); font: 500 11px/16px var(--font-mono); letter-spacing: .08em; text-transform: uppercase;
  border: 1px solid var(--line-strong); background: transparent; color: var(--ink); border-radius: var(--radius-md); cursor: pointer; transition: background .12s ease-out; }
.btn:hover, .heart-btn:hover, .btn-small:hover, .pager button:hover:not(:disabled), .review button:hover, .hreview button:hover { background: var(--surface-raised); border-color: var(--line-strong); color: var(--ink); }
.heart-btn { height: 40px; width: auto; padding: 0 var(--space-4); }
.heart-btn .lbl { color: inherit; font: inherit; }
.heart-btn svg { width: 14px; height: 14px; color: var(--rug); }
.btn-small, .pager button { height: 32px; padding: 0 var(--space-3); }
.review button, .hreview button { height: 28px; padding: 0 var(--space-2); }
.btn-primary, .review button.on, .hreview button.on { height: 40px; padding: 0 var(--space-4); border: 1px solid transparent; border-radius: var(--radius-md); background: var(--cap); color: var(--on-cap);
  font: 500 11px/16px var(--font-mono); letter-spacing: .08em; text-transform: uppercase; cursor: pointer; }
.review button.on, .hreview button.on { height: 28px; padding: 0 var(--space-2); }
.btn-primary:hover:not(:disabled) { filter: brightness(.92); }
.btn-primary:disabled, .pager button:disabled { opacity: .4; cursor: not-allowed; }
.linkish { color: var(--ink-muted); font: 500 11px/16px var(--font-mono); letter-spacing: .08em; text-transform: uppercase; text-decoration: none; }
.linkish:hover { color: var(--ink); }
.csv { font: 500 11px/16px var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--cap-text); }

/* Cards and KPI tiles (RugCounter) */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: var(--space-6); margin-bottom: var(--space-4); box-shadow: none; }
.grid2, .grid3 { gap: var(--space-4); }
.kpis { gap: var(--space-4); grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); margin-bottom: var(--space-6); }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: var(--space-6); box-shadow: none; }
.kpi .l { font: 500 11px/16px var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-faint); align-items: center; }
.kpi .v { font: 500 28px/32px var(--font-mono); letter-spacing: -0.02em; margin-top: var(--space-3); font-variant-numeric: tabular-nums; }
.kpi .s { font: 400 13px/18px var(--font-sans); color: var(--ink-muted); margin-top: var(--space-2); }
.kpi .s a { color: var(--cap-text); }
/* One hero tile per row of tiles: the first highlighted one sits on the navy field. */
.kpi.hl { background: var(--navy); border-color: var(--navy); color: var(--on-navy); }
.kpi.hl .l, .kpi.hl .s { color: var(--on-navy); opacity: .85; }
.kpi.hl .s a { color: var(--on-navy); text-decoration: underline; }
.kpi.hl .v.down { color: var(--rug-on-navy); }
.kpi.hl ~ .kpi.hl { background: var(--surface); border-color: var(--line); color: var(--ink); }
.kpi.hl ~ .kpi.hl .l { color: var(--ink-faint); opacity: 1; }
.kpi.hl ~ .kpi.hl .s { color: var(--ink-muted); opacity: 1; }
.kpi.hl ~ .kpi.hl .s a { color: var(--cap-text); text-decoration: none; }
.kpi.hl ~ .kpi.hl .v.down { color: var(--down); }
.kpi.safe .v { color: var(--safe); }
@media (max-width: 640px) { .kpis { grid-template-columns: 1fr 1fr; gap: var(--space-2); } .kpi { padding: var(--space-4); } .kpi .v { font-size: 20px; line-height: 26px; } .card { padding: var(--space-4); } }

/* Toggles: tabs, segmented controls, chain pills */
.tabs, .seg, .chain-switch { display: inline-flex; gap: var(--space-1); padding: var(--space-1); border: 1px solid var(--line); border-radius: var(--radius-pill); background: var(--surface); }
.tabs { margin-bottom: var(--space-3); }
.tabs button, .seg button, .chain-switch button { font: 500 11px/16px var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-muted); background: none; border: 0;
  padding: var(--space-2) var(--space-4); border-radius: var(--radius-pill); cursor: pointer; transition: background .12s ease-out, color .12s ease-out; }
.tabs button:hover, .seg button:hover, .chain-switch button:hover { color: var(--ink); background: var(--surface-raised); }
.tabs button.on, .seg button.on, .chain-switch button.on { background: var(--cap); color: var(--on-cap); border-color: transparent; box-shadow: none; }
.chain-bar .lbl { font: 500 11px/16px var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-faint); }
select, .controls input[type=number], .week-nav select, .donate-form input[type=number] { height: 40px; border-radius: var(--radius-md); border: 1px solid var(--line); background: var(--surface-raised); color: var(--ink); font: 400 13px var(--font-mono); padding: 0 var(--space-3); }
.controls label { font: 400 13px/18px var(--font-sans); color: var(--ink-muted); }

/* MarketTable */
.tbl-wrap { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); }
th, td { padding: var(--space-3) var(--space-4); border-bottom: 1px solid var(--line); }
th { background: var(--surface); font: 500 11px/16px var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-faint); }
th.sorted { color: var(--ink); }
td { font: 400 13px/20px var(--font-mono); font-variant-numeric: tabular-nums; }
td.l, td.wrapcell, td .why, td .tok { font-family: var(--font-sans); }
tbody tr { transition: background .12s ease-out; }
tbody tr:hover, tbody tr:hover td.sticky { background: var(--surface-raised); }
tbody td.sticky { background: var(--surface); }
.tok { gap: var(--space-3); }
.tok img, .tok .ph { width: 28px; height: 28px; border-radius: var(--radius-pill); background: var(--surface-raised); border: 1px solid var(--line); }
.tok .ph { font: 700 12px var(--font-sans); color: var(--ink-muted); }
.tok .nm { font: 600 15px/20px var(--font-sans); }
.tok .sym { font: 400 11px/16px var(--font-mono); color: var(--ink-muted); }
.th img, .th .ph { background: var(--surface-raised); border: 1px solid var(--line); }
.th .px { font: 500 28px/32px var(--font-mono); letter-spacing: -0.02em; }
.pager { font: 400 12px var(--font-mono); color: var(--ink-faint); }
.star.on { color: var(--cap-text); }

/* RiskBadge and other badges: label type, radius-sm, signal on its -surface tint */
.badge, .kind, .press { display: inline-flex; align-items: center; gap: var(--space-1); padding: 3px var(--space-2); border-radius: var(--radius-sm); border: 0;
  font: 500 11px/16px var(--font-mono); letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; background: var(--surface-raised); color: var(--ink-muted); }
.badge svg, .press svg { width: 12px; height: 12px; flex: none; }
.badge.ok, .kind.buy { background: color-mix(in srgb, var(--up) 14%, transparent); color: var(--up); }
.badge.bad, .kind.sell, .press.high { background: var(--rug-surface); color: var(--rug); }
.badge.warn, .badge.watch, .press.elevated { background: var(--warn-surface); color: var(--warn); }
.badge.info, .badge.safe { background: var(--safe-surface); color: var(--safe); }
.badge.acc, .kind.to_vault, .kind.from_vault { background: color-mix(in srgb, var(--cap-text) 14%, transparent); color: var(--cap-text); }
.badge.new { background: var(--cap); color: var(--on-cap); }
.press::before { display: none; }
.press.none, .press.low { background: var(--surface-raised); color: var(--ink-faint); }

/* Bars, links, misc */
.bar { background: var(--surface-raised); border-radius: var(--radius-pill); }
.bar > i { background: var(--cap); border-radius: var(--radius-pill); }
.links a, .links span { font: 500 11px/16px var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-muted); background: transparent; border: 1px solid var(--line-strong);
  border-radius: var(--radius-md); padding: var(--space-2) var(--space-3); }
.links a:hover { background: var(--surface-raised); color: var(--ink); }
.links span a { border: 0; padding: 0; }
.kv { font: 400 13px/20px var(--font-sans); }
.kv dd { font-family: var(--font-mono); font-weight: 400; }
code, pre.code { font-family: var(--font-mono); background: var(--surface-raised); border-radius: var(--radius-sm); }
.error-box { border-color: var(--rug); color: var(--rug); background: var(--rug-surface); border-radius: var(--radius-lg); }
.since { border-left-color: var(--cap); }
@keyframes flashUp { from { background: color-mix(in srgb, var(--up) 22%, transparent); } to { background: transparent; } }
@keyframes flashDown { from { background: var(--rug-surface); } to { background: transparent; } }
.flash-up, .flash-down { animation-duration: .6s; }

/* Why: reason icons and their dialog */
.ri { width: 22px; height: 22px; color: var(--on-cap); }
.ri-bad { background: var(--rug); color: #fff; }
.ri-good { background: var(--cap); color: var(--on-cap); }
.ri-mixed { background: linear-gradient(90deg, var(--rug) 50%, var(--cap) 50%); }
.ri-note { background: var(--ink-faint); }
.dot-bad { background: var(--rug); } .dot-good { background: var(--up); } .dot-note { background: var(--ink-faint); }
.why .bad, .reason-tip .bad { color: var(--rug); }
.why .ok, .reason-tip .ok { color: var(--up); }
.why .ev a, .reason-tip .ev a { color: var(--cap-text); }
.reason-tip { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-pop); padding: var(--space-4); font: 400 13px/18px var(--font-sans); }
.reason-tip .tip-head { font: 500 11px/16px var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-faint); }

/* Donate dialog */
.donate-dlg { border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-pop); }
.donate-dlg::backdrop { background: color-mix(in srgb, var(--ground) 70%, transparent); }
.donate-form { padding: var(--space-6); gap: var(--space-3); }
.donate-form .heart { color: var(--rug); }
.donate-form input[type=range] { accent-color: var(--cap); }
.donate-form .split .burn { color: var(--cap-text); }
.donate-form .split .site { color: var(--ink); }
.donate-form .dq { background: var(--surface-raised); border-radius: var(--radius-md); font-family: var(--font-mono); font-size: 12px; }

/* Charts and maps */
.bubblemap { border-radius: var(--radius-lg); background: var(--surface-raised); }
.th.bun-hero img { border-radius: var(--radius-lg); box-shadow: none; border: 1px solid var(--line); }

/* Powered by Mosh: the only place Mosh orange appears */
.powered { font: 500 11px/16px var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-faint); }
.powered a { color: var(--mosh); }
.foot { font: 400 12px/18px var(--font-sans); color: var(--ink-faint); border-top: 1px solid var(--line); padding-top: var(--space-6); margin-top: var(--space-8); }

@media (max-width: 640px) {
  h1, .page-head h1, .th h1 { font-size: 24px; line-height: 30px; }
  .brand .logo { display: none !important; }
  .brand .logo-mark { display: block; }
  .top-row { height: auto; }
}
.foot { display: flex; justify-content: space-between; gap: var(--space-3) var(--space-6); flex-wrap: wrap; padding-bottom: var(--space-8); }
.foot a { color: var(--ink-muted); } .foot .powered a { color: var(--mosh); }
.search { position: relative; }
.chg { font: 400 13px/20px var(--font-mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
/* The header wraps to two rows at tablet widths and three on phones: its height follows the content there. */
@media (max-width: 1220px) { .top-row { height: auto; padding: var(--space-3) 0; } }

/* Cover (design-system/components/Cover.html): the colour-band strip and the wordmark in display type. */
.cover { margin: var(--space-8) 0 0; }
.cover-strip { display: block; width: 100%; height: 128px; border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
.cover .c-navy { fill: var(--navy); } .cover .c-cap, .cover .c-capp { fill: var(--cap); } .cover .c-rug { fill: var(--rug); } .cover .c-safe { fill: var(--safe); }
.cover .c-ink { fill: var(--on-navy); } .cover .c-cut { fill: var(--ground); }
.cover-text { padding: var(--space-6) 0 0; }
.cover-title { margin: 0; font: 800 64px/60px var(--font-sans); letter-spacing: -0.03em; color: var(--ink); }
.cover-line { margin: var(--space-3) 0 0; font: 400 15px/22px var(--font-sans); color: var(--ink-muted); }
.cover + .page-head { margin-top: var(--space-8); }
@media (max-width: 640px) {
  .cover { margin-top: var(--space-4); }
  .cover-strip { height: 88px; }
  .cover-title { font-size: 40px; line-height: 40px; }
}
/* Phones: the logo mark per theme (white bars vanish on Paper), and the whole cover strip, scaled, so every colour shows. */
@media (max-width: 640px) {
  .brand .logo-mark.logo-dark { display: block; } .brand .logo-mark.logo-light { display: none; }
  [data-theme="light"] .brand .logo-mark.logo-dark { display: none; } [data-theme="light"] .brand .logo-mark.logo-light { display: block; }
  .cover-strip { height: auto; aspect-ratio: 960 / 128; }
}

/* 0.13.0: private-beta wall */
.wall-main { max-width: 760px; padding-top: var(--space-8); padding-bottom: var(--space-12); }
.wall-main .brand { display: inline-flex; margin-bottom: var(--space-2); }
.wall-card { margin-top: var(--space-8); }
.wall-form { display: flex; flex-direction: column; gap: var(--space-2); margin-top: var(--space-4); }
.wall-form .label { color: var(--ink-faint); }
.wall-row { display: flex; gap: var(--space-3); flex-wrap: wrap; }
.wall-row input { flex: 1 1 260px; height: 40px; border-radius: var(--radius-md); border: 1px solid var(--line); background: var(--surface-raised); color: var(--ink); font: 400 13px var(--font-mono); padding: 0 var(--space-3); }
.wall-row input:focus { outline: 2px solid var(--focus); outline-offset: 2px; }
.wall-status { min-height: 18px; margin: 0; font: 400 13px/18px var(--font-sans); color: var(--ink-muted); }
.wall-status.err, .wall-err { color: var(--rug); }
.wall-err { margin: var(--space-6) 0 0; padding: var(--space-3) var(--space-4); background: var(--rug-surface); border-radius: var(--radius-md); font: 400 14px/20px var(--font-sans); }
.wall .cover-strip { height: auto; aspect-ratio: 960 / 128; }

/* ===== 0.14.0: terminal layout. Stats sit in one strip with hairline dividers instead of a grid of separate cards;
   ranked tables lead with #; loading is a skeleton of coin bars, not a word. ===== */
.kpis { gap: 0; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); overflow: hidden;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.kpi, .kpi.hl ~ .kpi.hl { border: 0; border-radius: 0; background: transparent; box-shadow: 1px 0 0 var(--line), 0 1px 0 var(--line); padding: var(--space-6); }
.kpi.hl { background: var(--navy); }
.kpi .s { color: var(--ink-faint); font-size: 12px; line-height: 17px; }
.kpi .l .ico { flex: none; }
.kpi .l { justify-content: flex-start; gap: var(--space-2); }
@media (max-width: 640px) { .kpis { grid-template-columns: 1fr 1fr; gap: 0; } .kpi { padding: var(--space-4); } }
td.rk, th.rk { width: 1%; color: var(--ink-faint); padding-right: 0; }
td.rk { font: 400 12px/20px var(--font-mono); }
.loading { padding: var(--space-12) 0; color: transparent; font-size: 0; display: flex; flex-direction: column; gap: var(--space-4); }
.loading::before, .loading::after { content: ''; display: block; height: 12px; border-radius: var(--radius-pill); background: var(--surface-raised); animation: skel 1.2s ease-in-out infinite alternate; }
.loading::before { width: 38%; height: 32px; border-radius: var(--radius-md); }
.loading::after { width: 72%; box-shadow: 0 28px 0 var(--surface-raised), 0 56px 0 var(--surface-raised); margin-bottom: 56px; }
@keyframes skel { from { opacity: .45; } to { opacity: 1; } }
/* Headings: a page title and one line; section titles carry their period and source on the right. */
.page-head p { max-width: 720px; }
.card h2 .src, .sec-src { float: right; font: 500 11px/24px var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-faint); }
.card .sub { max-width: 760px; }
.method-kv { grid-template-columns: 140px 1fr; gap: var(--space-2) var(--space-6); margin: var(--space-4) 0 0; }
.method-kv dt { font: 500 11px/20px var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-faint); }
.method-kv dd { font: 400 14px/20px var(--font-sans); text-align: left; color: var(--ink-muted); }
@media (max-width: 640px) { .method-kv { grid-template-columns: 1fr; gap: 0 0; } .method-kv dd { margin-bottom: var(--space-3); } }
/* RugCounter hero: the count in display type, rug on navy. */
.kpi.hero .v { font: 800 64px/60px var(--font-sans); letter-spacing: -0.03em; color: var(--rug-on-navy); margin-top: var(--space-4); }
@media (max-width: 640px) { .kpi.hero .v { font-size: 44px; line-height: 46px; } }
/* Tile figures scale with the tile so a long figure ($4,191.39) never ends in an ellipsis. */
.kpi .v { font-size: clamp(18px, 1.7vw, 28px); line-height: 1.15; overflow: visible; text-overflow: clip; }
.kpi.hero .v { font-size: clamp(40px, 4.4vw, 64px); line-height: 1; }
input[type=checkbox], input[type=radio] { accent-color: var(--cap); }
/* RugCounter strip (Rugs page): the hero takes two columns so its label stays on one line; the other tiles share
   the rest of the row. Narrower screens: the hero spans the whole first row, the rest go two by two. */
.kpis.rugcounter.n6 { grid-template-columns: 2fr repeat(5, 1fr); }
.kpis.rugcounter.n5 { grid-template-columns: 2fr repeat(4, 1fr); }
.kpis.rugcounter .kpi.hero .l { white-space: nowrap; }
@media (max-width: 1220px) {
  .kpis.rugcounter.n6, .kpis.rugcounter.n5 { grid-template-columns: repeat(3, 1fr); }
  .kpis.rugcounter .kpi.hero { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .kpis.rugcounter.n6, .kpis.rugcounter.n5 { grid-template-columns: 1fr 1fr; }
  .kpis.rugcounter .kpi.hero .l { white-space: normal; }
}
/* 0.14.4: card headers with controls; Bubblemaps fallback; Cover stretched (navy + Cap only). */
.card-head { display: flex; justify-content: space-between; align-items: center; gap: var(--space-3); flex-wrap: wrap; }
.card-head h2 { flex: 1 1 auto; margin: 0; }
.card-head h2 .src { float: right; }
.bm-fallback { display: flex; align-items: center; gap: var(--space-3) var(--space-4); flex-wrap: wrap; padding: var(--space-4) 0; }
.bm-fallback .btn { height: 40px; padding: 0 var(--space-4); }
.cover-strip, .wall .cover-strip { height: 128px; aspect-ratio: auto; }
@media (max-width: 640px) { .cover-strip, .wall .cover-strip { height: 72px; } }
.cell-sub { font: 400 11px/14px var(--font-sans); color: var(--ink-faint); margin-top: 2px; white-space: nowrap; }

/* 0.15.3: legal page and the first-visit notice */
.legal-callout { border-color: var(--warn); background: var(--warn-surface); }
.legal-callout h2, .legal-callout p { color: var(--ink); }
.legal { max-width: 860px; }
.legal-sec h2 { font: 600 17px/24px var(--font-sans); margin: var(--space-6) 0 var(--space-2); }
.legal-sec p { font: 400 14px/22px var(--font-sans); color: var(--ink-muted); margin: 0 0 var(--space-2); }
.legal-dlg { border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); color: var(--ink); padding: 0; width: min(560px, calc(100vw - 32px)); box-shadow: var(--shadow-pop); }
.legal-dlg::backdrop { background: color-mix(in srgb, var(--ground) 80%, transparent); backdrop-filter: blur(4px); }
.legal-form { padding: var(--space-6); display: flex; flex-direction: column; gap: var(--space-3); }
.legal-form h2 { margin: 0; font: 700 22px/28px var(--font-sans); }
.legal-points { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: var(--space-2); font: 400 14px/20px var(--font-sans); color: var(--ink-muted); }
.legal-points b { color: var(--ink); }
.legal-actions { display: flex; justify-content: flex-end; }
.foot b { color: var(--ink-muted); }
.legal-form a, .legal a, .foot a[href="/legal"] { color: var(--cap-text); text-decoration: underline; text-underline-offset: 2px; }
