/* RulesWatch design system. Tokens first, then base, components, pages.
   Light and dark are both designed; dark is selected steps, not an inversion. */
:root {
  color-scheme: light;
  --bg: #ffffff;
  --bg-subtle: #f7f7f8;
  --surface: #ffffff;
  --surface-2: #f4f4f6;
  --surface-3: #ececef;
  --border: #e4e4e8;
  --border-strong: #d1d1d7;
  --fg: #0b0b0d;
  --fg-2: #3c3c43;
  --muted: #6b6b74;
  --faint: #9c9ca5;
  --accent: #2557d6;
  --accent-hover: #1c47b5;
  --accent-fg: #ffffff;
  --accent-soft: #edf2fd;
  --accent-line: #b9cbf5;
  --add: #0f5c2a;
  --add-bg: #d8f5df;
  --add-strong: #1f9d4c;
  --del: #9e1426;
  --del-bg: #ffe5e3;
  --del-strong: #d23a3a;
  --warn: #8a5300;
  --warn-bg: #fff3d6;
  --warn-line: #f0c46c;
  --up: #157a36;
  --down: #c42b2b;
  --grid: #ececef;
  --axis: #c9c9d0;
  --shadow-1: 0 1px 2px rgba(15, 15, 20, .05);
  --shadow-2: 0 1px 2px rgba(15, 15, 20, .05), 0 4px 12px rgba(15, 15, 20, .06);
  --shadow-3: 0 2px 6px rgba(15, 15, 20, .08), 0 16px 40px rgba(15, 15, 20, .14);
  --ring: 0 0 0 3px rgba(37, 87, 214, .28);

  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Consolas, monospace;
  --t-xs: 12px; --t-sm: 13px; --t-base: 15px; --t-md: 16px; --t-lg: 18px; --t-xl: 22px; --t-2xl: 28px; --t-3xl: 36px; --t-4xl: 46px;
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 20px; --s-6: 24px; --s-8: 32px; --s-10: 40px; --s-12: 48px; --s-16: 64px; --s-20: 80px;
  --r-sm: 4px; --r: 6px; --r-md: 8px; --r-lg: 12px; --r-full: 999px;
  --w-prose: 680px; --w-page: 1200px; --w-wide: 1360px;
  --nav-h: 56px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0c0d0f; --bg-subtle: #101114; --surface: #15161a; --surface-2: #1b1d21; --surface-3: #24262b;
    --border: #26282e; --border-strong: #353840;
    --fg: #ededf0; --fg-2: #c6c6cc; --muted: #8e9099; --faint: #5f626b;
    --accent: #6d95f7; --accent-hover: #8aaaf8; --accent-fg: #0b1430; --accent-soft: #152037; --accent-line: #2b4580;
    --add: #84e3a5; --add-bg: #12301e; --add-strong: #3fb867; --del: #ffa59c; --del-bg: #3e1619; --del-strong: #f0605c;
    --warn: #f3c46a; --warn-bg: #33270e; --warn-line: #6b5420;
    --up: #4fcf7a; --down: #ff7b72; --grid: #202227; --axis: #3a3d45;
    --shadow-1: 0 1px 2px rgba(0, 0, 0, .4); --shadow-2: 0 1px 2px rgba(0, 0, 0, .4), 0 6px 16px rgba(0, 0, 0, .35); --shadow-3: 0 4px 10px rgba(0, 0, 0, .5), 0 20px 50px rgba(0, 0, 0, .55);
    --ring: 0 0 0 3px rgba(109, 149, 247, .35);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0c0d0f; --bg-subtle: #101114; --surface: #15161a; --surface-2: #1b1d21; --surface-3: #24262b;
  --border: #26282e; --border-strong: #353840;
  --fg: #ededf0; --fg-2: #c6c6cc; --muted: #8e9099; --faint: #5f626b;
  --accent: #6d95f7; --accent-hover: #8aaaf8; --accent-fg: #0b1430; --accent-soft: #152037; --accent-line: #2b4580;
  --add: #84e3a5; --add-bg: #12301e; --add-strong: #3fb867; --del: #ffa59c; --del-bg: #3e1619; --del-strong: #f0605c;
  --warn: #f3c46a; --warn-bg: #33270e; --warn-line: #6b5420;
  --up: #4fcf7a; --down: #ff7b72; --grid: #202227; --axis: #3a3d45;
  --shadow-1: 0 1px 2px rgba(0, 0, 0, .4); --shadow-2: 0 1px 2px rgba(0, 0, 0, .4), 0 6px 16px rgba(0, 0, 0, .35); --shadow-3: 0 4px 10px rgba(0, 0, 0, .5), 0 20px 50px rgba(0, 0, 0, .55);
  --ring: 0 0 0 3px rgba(109, 149, 247, .35);
}

/* Base */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--nav-h) + 16px); }
body { margin: 0; background: var(--bg); color: var(--fg); font: 400 var(--t-base)/1.55 var(--font); font-feature-settings: "cv11", "ss01"; -webkit-font-smoothing: antialiased; overflow-x: hidden; overflow-wrap: break-word; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }
h1, h2, h3, h4 { color: var(--fg); letter-spacing: -0.015em; margin: 0; }
h1 { font-size: var(--t-2xl); line-height: 1.2; font-weight: 650; }
h2 { font-size: var(--t-xl); line-height: 1.25; font-weight: 640; }
h3 { font-size: var(--t-md); line-height: 1.35; font-weight: 620; }
p { margin: 0 0 var(--s-3); }
code, kbd, pre, .mono { font-family: var(--mono); font-size: 0.9em; }
code { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-sm); padding: 0.05em 0.35em; }
pre code { background: none; border: 0; padding: 0; }
kbd { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 5px; border: 1px solid var(--border-strong); border-bottom-width: 2px; border-radius: var(--r-sm); background: var(--surface); color: var(--fg-2); font-size: 11px; line-height: 1; font-family: var(--font); font-weight: 500; }
hr { border: 0; border-top: 1px solid var(--border); margin: var(--s-8) 0; }
img, svg { max-width: 100%; }
.num, .tnum, td.r, th.r { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: var(--t-sm); }
.xs { font-size: var(--t-xs); }
.up { color: var(--up); }
.down { color: var(--down); }
.nowrap { white-space: nowrap; }
.sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 3px; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--fg); color: var(--bg); padding: 8px 12px; border-radius: var(--r); }
.skip:focus { top: 8px; }

/* Layout */
.wrap { max-width: var(--w-page); margin: 0 auto; padding: 0 var(--s-6); }
.wrap.wide { max-width: var(--w-wide); }
.wrap.narrow { max-width: 860px; }
main { display: block; min-height: 60vh; }
.page { padding: var(--s-8) 0 var(--s-16); }
.page-head { padding: var(--s-8) 0 var(--s-6); border-bottom: 1px solid var(--border); margin-bottom: var(--s-6); }
.page-head h1 { margin-bottom: var(--s-2); }
.page-head .lede { color: var(--fg-2); font-size: var(--t-md); max-width: 720px; margin: 0; }
.eyebrow { font-size: var(--t-xs); font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: var(--s-2); }
.grid { display: grid; gap: var(--s-6); }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.split { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: var(--s-8); align-items: start; }
.stack > * + * { margin-top: var(--s-4); }
.row { display: flex; align-items: center; gap: var(--s-2); flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.sec { padding: var(--s-16) 0; border-top: 1px solid var(--border); }
.sec-head { max-width: 720px; margin-bottom: var(--s-8); }
.sec-head h2 { font-size: var(--t-2xl); margin-bottom: var(--s-3); }
.sec-head p { color: var(--fg-2); font-size: var(--t-md); margin: 0; }

/* Nav */
.nav { position: sticky; top: 0; z-index: 40; height: var(--nav-h); background: color-mix(in srgb, var(--bg) 92%, transparent); border-bottom: 1px solid var(--border); backdrop-filter: saturate(1.4) blur(8px); }
.nav .wrap { display: flex; align-items: center; height: 100%; gap: var(--s-6); max-width: var(--w-wide); }
.brand { display: inline-flex; align-items: center; gap: 9px; color: var(--fg); font-weight: 680; font-size: 16px; letter-spacing: -0.02em; text-decoration: none !important; flex: none; }
.brand svg { width: 24px; height: 24px; flex: none; }
.brand .mark-bg { fill: var(--fg); }
.nav-links { display: flex; align-items: center; gap: 2px; min-width: 0; }
.nav-links a { color: var(--fg-2); font-size: 14px; font-weight: 500; padding: 6px 10px; border-radius: var(--r); text-decoration: none; white-space: nowrap; }
.nav-links a:hover { background: var(--surface-2); color: var(--fg); }
.nav-links a[aria-current="page"] { color: var(--fg); background: var(--surface-2); }
.nav-right { margin-left: auto; display: flex; align-items: center; gap: var(--s-2); }
.search-btn { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 8px 0 10px; min-width: 210px; border: 1px solid var(--border); border-radius: var(--r); background: var(--surface); color: var(--muted); font: inherit; font-size: 13.5px; cursor: pointer; }
.search-btn:hover { border-color: var(--border-strong); color: var(--fg-2); }
.search-btn .kbds { margin-left: auto; display: inline-flex; gap: 3px; }
.nav .menu-btn { display: none; }
.hide-sm { }
.grid.g2 { align-items: start; }
.nav-drawer { display: none; }

/* Icons */
.i { width: 16px; height: 16px; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: -3px; }
.i.sm { width: 14px; height: 14px; }
.i.lg { width: 20px; height: 20px; }

/* Buttons */
.btn { --h: 36px; position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: var(--h); padding: 0 14px; border-radius: var(--r); border: 1px solid transparent; font: inherit; font-size: 14px; font-weight: 560; line-height: 1; white-space: nowrap; cursor: pointer; text-decoration: none !important; transition: background-color .12s, border-color .12s, color .12s, box-shadow .12s; user-select: none; }
.btn-primary { background: var(--accent); color: var(--accent-fg); }
.btn-primary:hover { background: var(--accent-hover); }
.btn-secondary { background: var(--surface); color: var(--fg); border-color: var(--border-strong); box-shadow: var(--shadow-1); }
.btn-secondary:hover { background: var(--surface-2); }
.btn-ghost { background: transparent; color: var(--fg-2); }
.btn-ghost:hover { background: var(--surface-2); color: var(--fg); }
.btn-danger { background: var(--surface); color: var(--down); border-color: var(--border-strong); }
.btn-danger:hover { background: var(--del-bg); }
.btn-sm { --h: 30px; padding: 0 10px; font-size: 13px; gap: 6px; }
.btn-lg { --h: 44px; padding: 0 20px; font-size: 15px; }
.btn-icon { width: var(--h); padding: 0; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; pointer-events: none; }
.btn.is-loading { color: transparent !important; pointer-events: none; }
.btn.is-loading::after { content: ""; position: absolute; width: 14px; height: 14px; border-radius: 50%; border: 2px solid currentColor; border-color: var(--muted) transparent var(--muted) transparent; animation: spin .7s linear infinite; }
.btn-primary.is-loading::after { border-color: var(--accent-fg) transparent var(--accent-fg) transparent; }
.btn[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent); }
.linkbtn { background: none; border: 0; padding: 0; font: inherit; color: var(--accent); cursor: pointer; }
.linkbtn:hover { text-decoration: underline; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Forms */
.input, .select, textarea.input { height: 36px; width: 100%; padding: 0 11px; border: 1px solid var(--border-strong); border-radius: var(--r); background: var(--surface); color: var(--fg); font: inherit; font-size: 14px; transition: border-color .12s, box-shadow .12s; }
textarea.input { height: auto; padding: 9px 11px; min-height: 90px; resize: vertical; }
.input::placeholder { color: var(--faint); }
.input:hover, .select:hover { border-color: var(--faint); }
.input:focus, .select:focus { outline: none; border-color: var(--accent); box-shadow: var(--ring); }
.select { appearance: none; padding-right: 30px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238e9099' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; cursor: pointer; }
.field { display: grid; gap: 6px; }
.field > span, .label { font-size: 13px; font-weight: 550; color: var(--fg-2); }
.help { font-size: 12.5px; color: var(--muted); }
.input-group { display: flex; gap: var(--s-2); }
.input-group .input { flex: 1; min-width: 0; }
.check { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; cursor: pointer; }
.check input { width: 16px; height: 16px; accent-color: var(--accent); margin: 0; }
.msg { font-size: 13px; color: var(--muted); margin: 6px 0 0; min-height: 0; }
.msg:empty { display: none; }
.msg.err { color: var(--down); }
.msg.ok { color: var(--up); }

/* Segmented control and tabs */
.seg { display: inline-flex; max-width: 100%; overflow-x: auto; scrollbar-width: none; padding: 2px; gap: 2px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-md); }
.seg button, .seg a { height: 28px; padding: 0 11px; border: 0; border-radius: 6px; background: transparent; color: var(--muted); font: inherit; font-size: 13px; font-weight: 550; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; text-decoration: none !important; white-space: nowrap; }
.seg button:hover, .seg a:hover { color: var(--fg); }
.seg [aria-pressed="true"], .seg [aria-selected="true"], .seg [aria-current="page"] { background: var(--surface); color: var(--fg); box-shadow: var(--shadow-1); }
.tabs { display: flex; gap: var(--s-1); border-bottom: 1px solid var(--border); margin-bottom: var(--s-6); overflow-x: auto; scrollbar-width: none; }
.tabs a, .tabs button { position: relative; padding: 10px 12px; color: var(--muted); font-size: 14px; font-weight: 550; text-decoration: none !important; border: 0; background: none; font-family: inherit; cursor: pointer; white-space: nowrap; }
.tabs a:hover, .tabs button:hover { color: var(--fg); }
.tabs [aria-current="page"], .tabs [aria-selected="true"] { color: var(--fg); }
.tabs [aria-current="page"]::after, .tabs [aria-selected="true"]::after { content: ""; position: absolute; left: 8px; right: 8px; bottom: -1px; height: 2px; background: var(--fg); border-radius: 2px; }
.tabs .count { margin-left: 6px; font-size: 12px; color: var(--faint); font-variant-numeric: tabular-nums; }

/* Badges */
.badge { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: var(--r-full); font-size: 12px; font-weight: 560; line-height: 1; white-space: nowrap; background: var(--surface-2); color: var(--fg-2); border: 1px solid var(--border); }
.badge .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.k-clarification, .badge.k-rules, .badge.k-source { background: var(--warn-bg); color: var(--warn); border-color: var(--warn-line); }
.badge.k-dispute { background: var(--del-bg); color: var(--del); border-color: color-mix(in srgb, var(--del-strong) 40%, transparent); }
.badge.k-dates, .badge.k-title { background: var(--accent-soft); color: var(--accent); border-color: var(--accent-line); }
.badge.venue { background: var(--surface); }
.badge.live { color: var(--up); background: var(--surface); }
.badge.live .dot { animation: pulse 2s ease-in-out infinite; }
.badge.pro { background: var(--fg); color: var(--bg); border-color: var(--fg); }
@keyframes pulse { 50% { opacity: .35; } }
.vmark { display: inline-flex; width: 16px; height: 16px; border-radius: 4px; align-items: center; justify-content: center; font-size: 10px; font-weight: 700; color: #fff; flex: none; }
.vmark.pm { background: #2c5cdc; }
.vmark.kalshi { background: #0d9c6b; }

/* Tooltip (CSS, for short hints). Data tooltips in charts are drawn by chart.js. */
[data-tip] { position: relative; }
[data-tip]:hover::after, [data-tip]:focus-visible::after { content: attr(data-tip); position: absolute; left: 50%; bottom: calc(100% + 6px); transform: translateX(-50%); z-index: 60; width: max-content; max-width: 260px; padding: 6px 9px; border-radius: var(--r); background: var(--fg); color: var(--bg); font-size: 12px; font-weight: 450; line-height: 1.4; white-space: normal; text-align: left; pointer-events: none; box-shadow: var(--shadow-2); }

/* Dropdown menu */
.dd { position: relative; display: inline-block; }
.dd > summary { list-style: none; }
.dd > summary::-webkit-details-marker { display: none; }
.dd-menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 50; min-width: 220px; padding: 5px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); box-shadow: var(--shadow-3); }
.dd-menu a, .dd-menu button { display: flex; align-items: center; gap: 9px; width: 100%; padding: 8px 10px; border: 0; border-radius: 5px; background: none; color: var(--fg); font: inherit; font-size: 13.5px; text-align: left; cursor: pointer; text-decoration: none !important; }
.dd-menu a:hover, .dd-menu button:hover { background: var(--surface-2); }
.dd-menu .sep { height: 1px; background: var(--border); margin: 5px 0; }

/* Cards */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow-1); }
.card-pad { padding: var(--s-5); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); padding: 14px var(--s-5); border-bottom: 1px solid var(--border); }
.card-head h2, .card-head h3 { font-size: 15px; font-weight: 620; letter-spacing: -0.005em; }
.card-head .sub { font-size: 12.5px; color: var(--muted); }
.card-body { padding: var(--s-5); }
.card-foot { padding: 12px var(--s-5); border-top: 1px solid var(--border); font-size: 13px; color: var(--muted); }
.card.flat { box-shadow: none; }
.card.inset { background: var(--bg-subtle); box-shadow: none; }

/* Stat tiles */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--surface); overflow: hidden; }
.stat { padding: 16px 18px; border-left: 1px solid var(--border); min-width: 0; }
.stat:first-child { border-left: 0; }
.stakes { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); margin-top: var(--s-6); overflow: hidden; }
.stakes-text { padding: var(--s-6); }
.stakes-text h2 { font-size: var(--t-xl); letter-spacing: -0.01em; margin-bottom: var(--s-3); }
.stakes-text p { color: var(--fg-2); max-width: 640px; }
.stakes-nums { display: grid; border-left: 1px solid var(--border); background: var(--bg-subtle); }
.stakes-nums > div { padding: var(--s-4) var(--s-6); border-top: 1px solid var(--border); display: flex; flex-direction: column; justify-content: center; }
.stakes-nums > div:first-child { border-top: 0; }
.stakes-nums b { font-size: 26px; font-weight: 680; letter-spacing: -0.02em; color: var(--del-strong); }
.stakes-nums span { font-size: var(--t-sm); color: var(--muted); }
@media (max-width: 760px) {
  .stakes { grid-template-columns: 1fr; }
  .stakes-nums { border-left: 0; border-top: 1px solid var(--border); grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .stakes-nums > div { border-top: 0; border-left: 1px solid var(--border); padding: var(--s-3); }
  .stakes-nums > div:first-child { border-left: 0; }
  .stakes-nums b { font-size: 20px; }
}
.stat .label { font-size: 12.5px; font-weight: 500; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.stat .value { font-size: 24px; font-weight: 640; letter-spacing: -0.02em; margin-top: 4px; line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat .sub { font-size: 12.5px; color: var(--muted); margin-top: 3px; }
.stat svg.spark { display: block; margin-top: 8px; width: 100%; height: 28px; }

/* Tables */
.table-wrap { border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--surface); overflow: auto; max-width: 100%; }
.table-wrap.tall { max-height: 720px; }
table.t { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14px; }
table.t th { position: sticky; top: 0; z-index: 2; background: var(--bg-subtle); text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); padding: 9px 12px; border-bottom: 1px solid var(--border); white-space: nowrap; }
table.t td { padding: 11px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
table.t tr:last-child td { border-bottom: 0; }
table.t tbody tr:hover td { background: var(--bg-subtle); }
table.t td.r, table.t th.r { text-align: right; }
table.t .title-cell { min-width: 260px; }
table.t .title-cell a { color: var(--fg); font-weight: 520; }
table.t .title-cell .sub { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
th .sort { display: inline-flex; align-items: center; gap: 4px; background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; }
th .sort:hover { color: var(--fg); }
th[aria-sort] .sort { color: var(--fg); }
th[aria-sort="ascending"] .sort::after { content: "↑"; }
th[aria-sort="descending"] .sort::after { content: "↓"; }
.pricebar { position: relative; display: inline-block; width: 64px; height: 6px; border-radius: 3px; background: var(--surface-3); vertical-align: middle; margin-right: 8px; }
.pricebar > i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 3px; background: var(--accent); }

/* Pagination */
.pager { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); margin-top: var(--s-4); font-size: 13px; color: var(--muted); }
.pager .row { gap: 6px; }

/* Skeletons, empty, error */
.skel { display: block; background: linear-gradient(90deg, var(--surface-2) 0, var(--surface-3) 50%, var(--surface-2) 100%); background-size: 200% 100%; animation: shimmer 1.4s ease-in-out infinite; border-radius: var(--r-sm); }
.skel.line { height: 12px; margin: 8px 0; }
.skel.block { height: 100%; min-height: 60px; }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }
.empty { display: grid; justify-items: center; text-align: center; gap: 6px; padding: var(--s-10) var(--s-6); color: var(--muted); }
.empty .i { width: 28px; height: 28px; stroke-width: 1.5; color: var(--faint); margin-bottom: 4px; }
.empty h3 { color: var(--fg); font-size: 15px; }
.empty p { max-width: 460px; margin: 0 0 6px; font-size: 14px; }
.error-box { display: flex; gap: 10px; padding: 12px 14px; border: 1px solid color-mix(in srgb, var(--del-strong) 35%, transparent); background: var(--del-bg); color: var(--del); border-radius: var(--r-md); font-size: 14px; }
.callout { display: flex; gap: 12px; padding: 14px 16px; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--bg-subtle); font-size: 14px; color: var(--fg-2); }
.callout.accent { background: var(--accent-soft); border-color: var(--accent-line); }
.callout.warn { background: var(--warn-bg); border-color: var(--warn-line); color: var(--fg-2); }
.callout > .i { margin-top: 2px; color: var(--muted); }
.callout p:last-child { margin-bottom: 0; }

/* Toasts */
.toasts { position: fixed; right: 16px; bottom: 16px; z-index: 90; display: grid; gap: 8px; max-width: min(380px, calc(100vw - 32px)); }
.toast { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; background: var(--fg); color: var(--bg); border-radius: var(--r-md); box-shadow: var(--shadow-3); font-size: 14px; animation: rise .14s ease-out; }
.toast.err { background: var(--del-strong); color: #fff; }
.toast a { color: inherit; text-decoration: underline; }
@keyframes rise { from { transform: translateY(6px); opacity: 0; } }

/* Modal */
dialog.modal { padding: 0; border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--surface); color: var(--fg); box-shadow: var(--shadow-3); width: min(520px, calc(100vw - 32px)); max-height: calc(100vh - 48px); }
dialog.modal::backdrop { background: rgba(8, 8, 12, .45); }
dialog.modal .m-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--border); }
dialog.modal .m-head h2 { font-size: 16px; }
dialog.modal .m-body { padding: 20px; }
dialog.modal .m-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 20px; border-top: 1px solid var(--border); background: var(--bg-subtle); border-radius: 0 0 var(--r-lg) var(--r-lg); }

/* Command palette */
dialog.palette { padding: 0; border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--surface); color: var(--fg); box-shadow: var(--shadow-3); width: min(640px, calc(100vw - 24px)); margin-top: 12vh; }
dialog.palette::backdrop { background: rgba(8, 8, 12, .4); }
.pal-in { display: flex; align-items: center; gap: 10px; padding: 0 16px; border-bottom: 1px solid var(--border); }
.pal-in input { flex: 1; height: 52px; border: 0; background: none; color: var(--fg); font: inherit; font-size: 16px; outline: none; }
.pal-list { max-height: min(420px, 60vh); overflow: auto; padding: 6px; margin: 0; list-style: none; }
.pal-list .grp { padding: 10px 10px 4px; font-size: 11.5px; font-weight: 600; color: var(--faint); text-transform: uppercase; letter-spacing: .05em; }
.pal-list a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 6px; color: var(--fg); text-decoration: none !important; font-size: 14px; }
.pal-list a .meta { margin-left: auto; font-size: 12px; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.pal-list a .t { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pal-list a[aria-selected="true"] { background: var(--accent-soft); }
.pal-foot { display: flex; gap: 14px; padding: 9px 14px; border-top: 1px solid var(--border); font-size: 12px; color: var(--muted); }

/* Diff: the product's face */
.diff-legend { display: inline-flex; gap: 10px; align-items: center; font-size: 12.5px; color: var(--muted); }
.diff-legend ins, .diff-legend del { padding: 1px 6px; border-radius: 3px; font-size: 12px; text-decoration: none; }
.diff-legend ins { background: var(--add-bg); color: var(--add); }
.diff-legend del { background: var(--del-bg); color: var(--del); text-decoration: line-through; }
.dfield + .dfield { border-top: 1px solid var(--border); }
.dfield-head { display: flex; align-items: center; gap: 8px; padding: 10px 16px; background: var(--bg-subtle); border-bottom: 1px solid var(--border); font-size: 12.5px; color: var(--muted); }
.dfield-head b { color: var(--fg-2); font-weight: 600; }
.dfield-head .counts { margin-left: auto; display: inline-flex; gap: 8px; font-family: var(--mono); font-size: 12px; }
.dfield-head .counts .a { color: var(--add-strong); }
.dfield-head .counts .d { color: var(--del-strong); }
.dtext { margin: 0; padding: 14px 16px; font: 13.5px/1.75 var(--mono); white-space: pre-wrap; overflow-wrap: anywhere; color: var(--fg-2); }
.dtext ins { background: var(--add-bg); color: var(--add); text-decoration: none; border-radius: 2px; box-shadow: inset 0 -1px 0 color-mix(in srgb, var(--add-strong) 50%, transparent); padding: 1px 0; }
.dtext del { background: var(--del-bg); color: var(--del); text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--del) 60%, transparent); border-radius: 2px; padding: 1px 0; }
.dtext .fold { display: inline-block; color: var(--faint); background: var(--surface-2); border: 1px dashed var(--border-strong); border-radius: 3px; padding: 0 6px; margin: 0 2px; font-size: 11.5px; line-height: 1.6; cursor: default; }
.dtext del::before, .dtext ins::before, .dtext del::after, .dtext ins::after { position: absolute; clip-path: inset(50%); width: 1px; height: 1px; overflow: hidden; white-space: nowrap; }
.dtext del::before { content: " [removed: "; }
.dtext ins::before { content: " [added: "; }
.dtext del::after, .dtext ins::after { content: "] "; }
.dsplit { display: grid; grid-template-columns: 1fr 1fr; }
.dsplit > div { min-width: 0; }
.dsplit > div + div { border-left: 1px solid var(--border); }
.dsplit .side-h { padding: 6px 16px; font-size: 11.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--faint); border-bottom: 1px dashed var(--border); }
.dval { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; padding: 14px 16px; font-family: var(--mono); font-size: 13.5px; }
.dval .from { color: var(--del); background: var(--del-bg); padding: 6px 10px; border-radius: var(--r); text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--del) 50%, transparent); }
.dval .to { color: var(--add); background: var(--add-bg); padding: 6px 10px; border-radius: var(--r); }
.dval .arrow { color: var(--faint); }
.usteps { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 14px 16px; }
.ustep { display: inline-flex; align-items: center; height: 26px; padding: 0 10px; border-radius: var(--r); font: 500 12.5px var(--mono); background: var(--surface-2); color: var(--muted); border: 1px solid var(--border); }
.ustep.new { background: var(--add-bg); color: var(--add); border-color: color-mix(in srgb, var(--add-strong) 40%, transparent); font-weight: 600; }
.ustep.new.bad { background: var(--del-bg); color: var(--del); border-color: color-mix(in srgb, var(--del-strong) 40%, transparent); }
.ustep.new::before { content: "+ "; }
.uarr { color: var(--faint); font-size: 12px; }
.diff-card { border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--surface); overflow: hidden; box-shadow: var(--shadow-1); }
.diff-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 12px 10px 16px; border-bottom: 1px solid var(--border); }
.diff-bar .grow { flex: 1; }
.chgbar { display: inline-flex; gap: 2px; vertical-align: middle; }
.chgbar i { width: 7px; height: 7px; border-radius: 1.5px; background: var(--surface-3); }
.chgbar i.a { background: var(--add-strong); }
.chgbar i.d { background: var(--del-strong); }

/* Change cards in feeds */
.feed { display: grid; gap: var(--s-4); }
.chg { border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--surface); overflow: hidden; box-shadow: var(--shadow-1); }
.chg:focus-within, .chg.kfocus { border-color: var(--accent-line); box-shadow: var(--ring); }
.chg-head { padding: 14px 16px 12px; }
.chg-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); }
.chg-meta .sep::before { content: "·"; color: var(--faint); }
.chg h3 { font-size: 15.5px; margin-top: 7px; line-height: 1.4; font-weight: 600; }
.chg h3 a { color: var(--fg); }
.chg-price { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 8px; font-size: 13px; color: var(--muted); }
.chg .dtext { max-height: 260px; overflow: hidden; position: relative; border-top: 1px solid var(--border); }
.chg-foot { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; padding: 8px 10px; border-top: 1px solid var(--border); background: var(--bg-subtle); }
.chg-foot .grow { flex: 1; }
.chg .dfield-head { padding: 7px 16px; }

/* Price steps (before, at detection, after) */
.psteps { display: inline-flex; align-items: center; gap: 6px; font-variant-numeric: tabular-nums; font-size: 13px; }
.psteps .p { padding: 2px 7px; border-radius: var(--r-sm); background: var(--surface-2); color: var(--fg-2); font-weight: 560; }
.psteps .arrow { color: var(--faint); }
.psteps .delta { font-weight: 650; padding: 2px 6px; border-radius: var(--r-sm); }
.psteps .delta.up { background: color-mix(in srgb, var(--up) 12%, transparent); }
.psteps .delta.down { background: color-mix(in srgb, var(--down) 12%, transparent); }

/* Timeline */
.tl { list-style: none; margin: 0; padding: 0; position: relative; }
.tl::before { content: ""; position: absolute; left: 11px; top: 6px; bottom: 6px; width: 2px; background: var(--border); border-radius: 1px; }
.tl > li { position: relative; padding: 0 0 22px 36px; }
.tl > li:last-child { padding-bottom: 0; }
.tl .node { position: absolute; left: 0; top: 0; width: 24px; height: 24px; border-radius: 50%; background: var(--surface); border: 2px solid var(--border-strong); display: grid; place-items: center; font-size: 11px; font-weight: 700; color: var(--fg-2); font-variant-numeric: tabular-nums; }
.tl .node.cur { background: var(--fg); border-color: var(--fg); color: var(--bg); }
.tl .node.edit { border-color: var(--warn-line); background: var(--warn-bg); color: var(--warn); }
.tl .tl-h { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-height: 24px; font-size: 13.5px; }
.tl .tl-h b { font-weight: 600; }
.tl .tl-b { margin-top: 8px; }

/* Resolution strip */
.rstrip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--surface); overflow: hidden; }
.rstep { position: relative; padding: 12px 14px 12px 16px; border-left: 1px solid var(--border); font-size: 13px; color: var(--muted); }
.rstep:first-child { border-left: 0; }
.rstep .n { display: flex; align-items: center; gap: 7px; font-weight: 600; color: var(--fg-2); font-size: 13px; }
.rstep .n i { width: 9px; height: 9px; border-radius: 50%; border: 2px solid var(--border-strong); background: var(--surface); flex: none; }
.rstep.done .n i { background: var(--fg-2); border-color: var(--fg-2); }
.rstep.now { background: var(--accent-soft); }
.rstep.now .n { color: var(--accent); }
.rstep.now .n i { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent); }
.rstep.bad.now { background: var(--del-bg); }
.rstep.bad.now .n { color: var(--del); }
.rstep.bad.now .n i { background: var(--del-strong); border-color: var(--del-strong); }
.rstep .d { margin-top: 3px; font-size: 12.5px; }
.rnote { margin-top: 8px; font-size: 13px; color: var(--muted); }

/* Charts (drawn by /s/chart.js). One accent hue for the subject; grays for context. */
.chart { position: relative; width: 100%; user-select: none; -webkit-user-select: none; }
.chart svg { display: block; width: 100%; overflow: visible; }
.chart .grid line { stroke: var(--grid); stroke-width: 1; shape-rendering: crispEdges; }
.chart .axis text, .chart text.tick { fill: var(--muted); font-size: 11px; font-family: var(--font); font-variant-numeric: tabular-nums; }
.chart .baseline { stroke: var(--axis); stroke-width: 1; shape-rendering: crispEdges; }
.chart .line { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .area { fill: var(--accent); opacity: .09; }
.chart .ctx { fill: none; stroke: var(--faint); stroke-width: 1.5; }
.chart .bar { fill: var(--accent); transition: opacity .1s; }
.chart .bar.ctx { fill: var(--faint); opacity: .55; }
.chart .bar.alt { fill: color-mix(in srgb, var(--accent) 45%, var(--surface)); }
.chart .hit { fill: transparent; cursor: pointer; }
.chart g.hov .bar, .chart .bar.hov { opacity: .75; }
.chart .xhair { stroke: var(--fg-2); stroke-width: 1; opacity: .5; shape-rendering: crispEdges; }
.chart .dot { fill: var(--accent); stroke: var(--surface); stroke-width: 2; }
.chart .ev-line { stroke: var(--fg); stroke-width: 1; opacity: .28; shape-rendering: crispEdges; }
.chart .ev { cursor: pointer; }
.chart .ev circle { fill: var(--fg); stroke: var(--surface); stroke-width: 2; }
.chart .ev text { fill: var(--bg); font-size: 10.5px; font-weight: 700; text-anchor: middle; font-family: var(--font); }
.chart .ev:hover circle, .chart .ev:focus circle, .chart .ev.on circle { fill: var(--accent); }
.chart .ev:focus { outline: none; }
.chart .lbl { fill: var(--fg-2); font-size: 11.5px; font-weight: 600; font-family: var(--font); font-variant-numeric: tabular-nums; }
.chart .cell { stroke: var(--surface); stroke-width: 2; }
.chart .cell.hov { stroke: var(--fg); stroke-width: 1.5; }
.ctip { position: absolute; z-index: 30; pointer-events: none; min-width: 140px; max-width: 320px; padding: 9px 11px; background: var(--surface); color: var(--fg); border: 1px solid var(--border); border-radius: var(--r-md); box-shadow: var(--shadow-3); font-size: 12.5px; line-height: 1.45; }
.ctip .v { font-size: 15px; font-weight: 650; font-variant-numeric: tabular-nums; }
.ctip .k { color: var(--muted); }
.ctip .snip { margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--border); font-family: var(--mono); font-size: 11.5px; color: var(--fg-2); }
.ctip .snip ins { background: var(--add-bg); color: var(--add); text-decoration: none; }
.ctip .snip del { background: var(--del-bg); color: var(--del); }
.chart-skel { position: relative; border-radius: var(--r-md); overflow: hidden; }
.chart-skel svg path { fill: none; stroke: var(--surface-3); stroke-width: 3; }
.chart-empty { display: grid; place-items: center; text-align: center; color: var(--muted); font-size: 13.5px; border: 1px dashed var(--border-strong); border-radius: var(--r-md); padding: 24px; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); }
.legend .k { display: inline-flex; align-items: center; gap: 6px; }
.legend .sw { width: 10px; height: 10px; border-radius: 2px; background: var(--accent); }
.legend .ln { width: 14px; height: 2px; background: var(--accent); border-radius: 1px; }
.legend .ev { width: 14px; height: 14px; border-radius: 50%; background: var(--fg); color: var(--bg); font-size: 9px; font-weight: 700; display: inline-grid; place-items: center; }
.scale { display: inline-flex; align-items: center; gap: 3px; font-size: 11.5px; color: var(--muted); }
.scale i { width: 12px; height: 12px; border-radius: 2px; }
svg.spark .line { fill: none; stroke: var(--faint); stroke-width: 1.5; }
svg.spark .line.acc { stroke: var(--accent); }
svg.spark circle { fill: var(--accent); }

/* Prose (docs, about, legal) */
.prose { max-width: var(--w-prose); font-size: 15.5px; line-height: 1.7; color: var(--fg-2); }
.prose h1 { font-size: var(--t-2xl); margin: 0 0 var(--s-3); color: var(--fg); }
.prose h2 { font-size: 20px; margin: var(--s-10) 0 var(--s-3); color: var(--fg); }
.prose h3 { font-size: 16px; margin: var(--s-6) 0 var(--s-2); color: var(--fg); }
.prose p, .prose ul, .prose ol { margin: 0 0 var(--s-4); }
.prose ul, .prose ol { padding-left: 22px; }
.prose li { margin-bottom: 6px; }
.prose li::marker { color: var(--faint); }
.prose strong, .prose b { color: var(--fg); font-weight: 600; }
.prose pre { background: var(--bg-subtle); border: 1px solid var(--border); border-radius: var(--r-md); padding: 14px 16px; overflow-x: auto; font-size: 13px; line-height: 1.6; margin: 0 0 var(--s-4); }
.prose table { width: 100%; border-collapse: collapse; font-size: 14px; margin: 0 0 var(--s-4); }
.prose th, .prose td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--border); vertical-align: top; }
.prose th { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.prose dl { margin: 0 0 var(--s-4); }
.prose dt { font-weight: 620; color: var(--fg); margin-top: var(--s-5); }
.prose dd { margin: 4px 0 0; }
.prose .lede { font-size: 17px; color: var(--fg-2); }
.docs { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: var(--s-10); padding: var(--s-8) 0 var(--s-16); }
.docs-nav { position: sticky; top: calc(var(--nav-h) + 24px); align-self: start; font-size: 14px; }
.docs-nav .grp { font-size: 11.5px; font-weight: 600; color: var(--faint); text-transform: uppercase; letter-spacing: .05em; margin: 18px 0 6px; }
.docs-nav .grp:first-child { margin-top: 0; }
.docs-nav a { display: block; padding: 5px 10px; margin-left: -10px; border-radius: var(--r); color: var(--fg-2); }
.docs-nav a:hover { background: var(--surface-2); text-decoration: none; }
.docs-nav a[aria-current="page"] { background: var(--surface-2); color: var(--fg); font-weight: 560; }
.endpoint { display: inline-flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 13px; padding: 6px 10px; border: 1px solid var(--border); border-radius: var(--r); background: var(--bg-subtle); margin-bottom: var(--s-3); }
.endpoint .m { font-weight: 700; color: var(--up); }
.endpoint .m.post { color: var(--accent); }

/* Breadcrumbs */
.crumbs { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 13px; color: var(--muted); margin-bottom: var(--s-3); }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--fg); }
.crumbs .i { width: 13px; height: 13px; color: var(--faint); }

/* Entity header */
.ent-head { padding: var(--s-6) 0 var(--s-5); }
.ent-head h1 { font-size: 26px; line-height: 1.25; max-width: 920px; }
.ent-head .sub { margin-top: var(--s-2); color: var(--muted); font-size: 14px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.ent-actions { display: flex; gap: var(--s-2); flex-wrap: wrap; margin-top: var(--s-4); }
.kv { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 8px 18px; margin: 0; font-size: 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; min-width: 0; color: var(--fg); }
.rules-text { font-size: 14.5px; line-height: 1.7; color: var(--fg-2); }
.rules-text p { margin: 0 0 10px; }
.side .card + .card { margin-top: var(--s-4); }

/* Landing */
.hero { padding: var(--s-16) 0 var(--s-12); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: var(--s-12); align-items: center; }
.hero h1 { font-size: var(--t-4xl); line-height: 1.08; letter-spacing: -0.03em; font-weight: 700; }
.hero .lede { margin-top: var(--s-5); font-size: 18px; line-height: 1.55; color: var(--fg-2); max-width: 520px; }
.hero .ctas { display: flex; gap: var(--s-3); flex-wrap: wrap; margin-top: var(--s-8); }
.hero .fine { margin-top: var(--s-4); font-size: 13px; color: var(--muted); }
.live-card { position: relative; }
.live-card .diff-card { box-shadow: var(--shadow-3); }
.live-top { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--border); font-size: 12.5px; color: var(--muted); }
.live-top .grow { flex: 1; }
.live-title { padding: 14px 16px 4px; font-weight: 620; font-size: 16px; line-height: 1.4; }
.live-title a { color: var(--fg); }
.live-meta { padding: 0 16px 12px; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; font-size: 13px; color: var(--muted); }
.live-card .dtext { max-height: 300px; overflow: auto; border-top: 1px solid var(--border); }
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-6); counter-reset: step; }
.step { padding: var(--s-6); border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--surface); }
.step .n { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--fg); color: var(--bg); font-size: 13px; font-weight: 700; margin-bottom: var(--s-4); }
.step h3 { margin-bottom: var(--s-2); }
.step p { color: var(--fg-2); font-size: 14.5px; margin: 0; }
.feature { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: var(--s-12); align-items: center; padding: var(--s-12) 0; }
.feature + .feature { border-top: 1px dashed var(--border); }
.feature.flip > :first-child { order: 2; }
.feature h3 { font-size: var(--t-xl); margin-bottom: var(--s-3); }
.feature p { color: var(--fg-2); }
.feature ul { padding-left: 18px; color: var(--fg-2); margin: 0; }
.feature li { margin-bottom: 6px; }
.uses { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-6); }
.use { padding: var(--s-6); border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--surface); }
.use .i { width: 22px; height: 22px; color: var(--accent); margin-bottom: var(--s-3); }
.use h3 { margin-bottom: var(--s-2); }
.use p { font-size: 14.5px; color: var(--fg-2); margin: 0; }
.plans { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-6); max-width: 860px; }
.plan { padding: var(--s-8); border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--surface); display: flex; flex-direction: column; }
.plan.pro { border-color: var(--fg); box-shadow: var(--shadow-2); }
.plan h3 { font-size: 17px; }
.plan .price { font-size: 40px; font-weight: 700; letter-spacing: -0.03em; margin: var(--s-3) 0 2px; }
.plan .price small { font-size: 14px; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.plan ul { list-style: none; padding: 0; margin: var(--s-5) 0 var(--s-6); display: grid; gap: 9px; font-size: 14.5px; color: var(--fg-2); }
.plan li { display: flex; gap: 9px; align-items: flex-start; }
.plan li .i { color: var(--up); margin-top: 3px; }
.plan .btn { margin-top: auto; }
.faq { max-width: 820px; }
.faq details { border-bottom: 1px solid var(--border); }
.faq summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 0; font-weight: 580; cursor: pointer; font-size: 15.5px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 20px; color: var(--muted); font-weight: 400; }
.faq details[open] summary::after { content: "−"; }
.faq .a { padding: 0 0 16px; color: var(--fg-2); max-width: 720px; }
.cta-final { text-align: center; padding: var(--s-16) var(--s-6); border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--bg-subtle); }
.cta-final h2 { font-size: var(--t-2xl); margin-bottom: var(--s-3); }
.cta-final p { color: var(--fg-2); max-width: 560px; margin: 0 auto var(--s-6); }
.alert-mock { border-radius: var(--r-lg); background: #313338; color: #dbdee1; padding: 14px 16px; font-size: 14px; font-family: "gg sans", var(--font); }
.alert-mock .who { display: flex; align-items: center; gap: 8px; font-weight: 600; color: #f2f3f5; }
.alert-mock .who .bot { font-size: 10px; background: #5865f2; color: #fff; border-radius: 3px; padding: 1px 4px; font-weight: 600; }
.alert-mock .emb { margin-top: 8px; border-left: 4px solid #e8a33d; background: #2b2d31; border-radius: 4px; padding: 10px 14px; }
.alert-mock .emb a { color: #00a8fc; font-weight: 600; }
.alert-mock pre { margin: 8px 0 0; background: #1e1f22; border-radius: 4px; padding: 8px 10px; font-size: 12.5px; white-space: pre-wrap; color: #dbdee1; }
.alert-mock .plus { color: #57f287; }
.alert-mock .minus { color: #ed4245; }

/* Countdown */
.countdown { display: inline-flex; gap: 10px; font-variant-numeric: tabular-nums; }
.countdown div { display: grid; justify-items: center; min-width: 54px; padding: 8px 10px; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface); }
.countdown b { font-size: 22px; font-weight: 680; letter-spacing: -0.02em; line-height: 1.1; }
.countdown span { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }

/* Filters bar */
.filters { display: flex; gap: var(--s-2); flex-wrap: wrap; align-items: center; margin-bottom: var(--s-4); }
.filters .input[type="search"] { width: 280px; }
.filters .select { width: auto; }
.filters .grow { flex: 1; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border: 1px solid var(--border); border-radius: var(--r-full); background: var(--surface); color: var(--fg-2); font-size: 13px; font-weight: 520; cursor: pointer; text-decoration: none !important; }
.chip:hover { border-color: var(--border-strong); color: var(--fg); }
.chip[aria-pressed="true"], .chip[aria-current="page"] { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.chip .n { font-size: 11.5px; color: var(--faint); font-variant-numeric: tabular-nums; }
.chip[aria-pressed="true"] .n, .chip[aria-current="page"] .n { color: color-mix(in srgb, var(--bg) 70%, transparent); }

/* Dashboard */
.dash { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: var(--s-8); padding: var(--s-8) 0 var(--s-16); }
.dash-nav { position: sticky; top: calc(var(--nav-h) + 24px); align-self: start; display: grid; gap: 2px; }
.dash-nav a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--r); color: var(--fg-2); font-size: 14px; font-weight: 520; }
.dash-nav a:hover { background: var(--surface-2); text-decoration: none; }
.dash-nav a[aria-current="page"] { background: var(--surface-2); color: var(--fg); }
.dash-nav .count { margin-left: auto; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.dash-nav .count.unread { color: var(--accent-fg); background: var(--accent); border-radius: var(--r-full); padding: 0 7px; font-weight: 650; }
.notif { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--border); align-items: start; }
.notif:last-child { border-bottom: 0; }
.notif.unread { background: color-mix(in srgb, var(--accent-soft) 60%, transparent); }
.notif .dot { width: 8px; height: 8px; border-radius: 50%; background: transparent; margin-top: 7px; }
.notif.unread .dot { background: var(--accent); }
.notif .t { font-weight: 560; color: var(--fg); }
.notif .s { font-size: 13px; color: var(--muted); margin-top: 2px; }
.chan { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.chan:last-child { border-bottom: 0; }
.chan .ic { width: 32px; height: 32px; border-radius: var(--r); background: var(--surface-2); display: grid; place-items: center; }

/* Footer */
.foot { border-top: 1px solid var(--border); background: var(--bg-subtle); margin-top: var(--s-16); padding: var(--s-12) 0 var(--s-8); font-size: 14px; }
.foot-grid { display: grid; grid-template-columns: 1.4fr repeat(4, minmax(0, 1fr)); gap: var(--s-8); }
.foot h4 { font-size: 12.5px; font-weight: 600; color: var(--fg); margin-bottom: var(--s-3); }
.foot ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.foot a { color: var(--muted); }
.foot a:hover { color: var(--fg); }
.foot .about { color: var(--muted); font-size: 13.5px; max-width: 300px; }
.foot-bottom { display: flex; gap: var(--s-4); flex-wrap: wrap; align-items: center; justify-content: space-between; margin-top: var(--s-10); padding-top: var(--s-5); border-top: 1px solid var(--border); font-size: 13px; color: var(--muted); }
.fresh { display: inline-flex; align-items: center; gap: 7px; }
.fresh .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--up); }
.fresh.stale .dot { background: var(--warn); }

/* Embeds */
body.embed { background: var(--surface); }
.embed-box { padding: 12px 14px; font-size: 13px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* Responsive */
@media (max-width: 1100px) {
  .nav-links a.opt { display: none; }
  .search-btn { min-width: 0; }
  .search-btn .lbl, .search-btn .kbds { display: none; }
  .hero-grid { grid-template-columns: 1fr; gap: var(--s-10); }
  .split { grid-template-columns: 1fr; }
  .foot-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .foot-grid > :first-child { grid-column: 1 / -1; }
}
@media (max-width: 860px) {
  :root { --nav-h: 54px; }
  .wrap { padding: 0 var(--s-4); }
  .nav-links { display: none; }
  .nav .menu-btn { display: inline-flex; }
  .hide-sm { display: none; }
  .nav-drawer:not([hidden]) { display: block; position: fixed; inset: var(--nav-h) 0 0 0; z-index: 39; background: var(--bg); padding: var(--s-4); overflow: auto; }
  .nav-drawer a { display: flex; align-items: center; min-height: 46px; padding: 0 var(--s-2); border-bottom: 1px solid var(--border); color: var(--fg); font-size: 16px; font-weight: 520; }
  .g2, .g3, .g4, .steps, .uses, .plans { grid-template-columns: 1fr; }
  .feature, .feature.flip { grid-template-columns: 1fr; gap: var(--s-6); }
  .feature.flip > :first-child { order: 0; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat:nth-child(3) { border-left: 0; }
  .stat:nth-child(n + 3) { border-top: 1px solid var(--border); }
  .docs, .dash { grid-template-columns: minmax(0, 1fr); gap: var(--s-6); }
  .docs-nav, .dash-nav { position: static; }
  .dash-nav { display: flex; overflow-x: auto; gap: 4px; border-bottom: 1px solid var(--border); padding-bottom: 8px; }
  .dash-nav a { white-space: nowrap; }
  .docs-nav { display: flex; flex-wrap: wrap; gap: 4px 6px; }
  .docs-nav .grp { width: 100%; margin: 8px 0 0; }
  .docs-nav a { margin-left: 0; border: 1px solid var(--border); }
  .rstrip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rstep:nth-child(3) { border-left: 0; }
  .rstep:nth-child(n + 3) { border-top: 1px solid var(--border); }
  .dsplit { grid-template-columns: 1fr; }
  .dsplit > div + div { border-left: 0; border-top: 1px solid var(--border); }
  .hero { padding: var(--s-10) 0 var(--s-8); }
  .hero h1 { font-size: 34px; }
  .hero .lede { font-size: 16.5px; }
  .sec { padding: var(--s-12) 0; }
  .foot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .filters .input[type="search"] { width: 100%; }
  .filters .select { flex: 1 1 140px; }
  .btn { --h: 40px; }
  .btn-sm { --h: 36px; }
  .input, .select { height: 40px; font-size: 16px; }
  .seg button, .seg a { height: 34px; }
  .chip { height: 34px; }
  .page-head { padding-top: var(--s-6); }
  h1, .ent-head h1 { font-size: 22px; }
  table.t.stack thead { display: none; }
  table.t.stack, table.t.stack tbody, table.t.stack tr, table.t.stack td { display: block; width: 100%; }
  table.t.stack tr { padding: 12px 14px; border-bottom: 1px solid var(--border); }
  table.t.stack tr:last-child { border-bottom: 0; }
  table.t.stack td { border: 0; padding: 2px 0; text-align: left !important; }
  table.t.stack td.title-cell { min-width: 0; padding-bottom: 6px; }
  table.t.stack td[data-label] { display: inline-flex; gap: 6px; width: auto; margin-right: 14px; font-size: 13px; }
  table.t.stack td[data-label]::before { content: attr(data-label); color: var(--muted); }
  table.t.stack td.hide-m { display: none; }
  table.t.stack td.act { display: block; margin-top: 8px; }
  .dval { grid-template-columns: 1fr; }
  .dval .arrow { transform: rotate(90deg); justify-self: start; }
  .countdown div { min-width: 46px; padding: 6px 8px; }
  .countdown b { font-size: 18px; }
  .toasts { left: 16px; right: 16px; max-width: none; }
}
