/* Stackblade design system. Tokens first; every component reads from them. Base components
   follow uncovered/public/style.css; Stackblade's own parts are at the end of the file.
   Brand: graphite neutrals, one accent (signal blue, also chart series 1), orange for
   "started recently" in charts, green and red only for up and down. */
:root {
  /* palette */
  --accent: #2a6fd6;
  --accent-hover: #215fbc;
  --accent-ink: #ffffff;
  --accent-soft: #edf3fd;
  --accent-line: #2a6fd6;
  --accent-text: #1d5ab8;

  --bg: #ffffff;
  --surface: #f9fafb;
  --surface-2: #f2f3f5;
  --surface-3: #e8eaee;
  --border: #e3e5e9;
  --border-strong: #d0d4da;
  --text: #0e1014;
  --text-2: #484d57;
  --text-3: #686e79;
  --link: #0e1014;
  --focus: #2a6fd6;

  --gap: #0f7a35;
  --gap-bg: #e9f6ee;
  --gap-line: #9bd5ae;
  --up: #12792f;
  --up-bg: #e9f6ee;
  --down: #c0352f;
  --down-bg: #fdeeed;
  --warn: #9a5b00;
  --warn-bg: #fff4e0;
  --info: #1d5ab8;
  --info-bg: #edf3fd;

  --series-1: #2a78d6;   /* the subject series (dataviz slot 1, blue) */
  --series-2: #eb6834;   /* "started in the last 30 days" (slot 2, orange) */
  --series-ctx: #a3a8b2; /* context: recessive gray */
  --chart-1: var(--series-1);
  --chart-2: var(--series-ctx);
  --chart-grid: #eceef1;
  /* sequential ramp for heatmaps (dataviz blue 100 -> 650) */
  --seq-1: #f2f6fc; --seq-2: #cde2fb; --seq-3: #9ec5f4; --seq-4: #6da7ec; --seq-5: #3987e5; --seq-6: #256abf; --seq-7: #104281;
  --ink-7: #ffffff; --ink-6: #ffffff; --ink-5: #0e1014; --ink-4: #0e1014; --ink-3: #0e1014; --ink-2: #0e1014;

  /* type */
  --font: "IBM Plex Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;
  --fs-12: 12px; --fs-13: 13px; --fs-14: 14px; --fs-16: 16px; --fs-18: 18px;
  --fs-22: 22px; --fs-28: 28px; --fs-36: 36px; --fs-44: 46px;
  --lh: 1.5;

  /* space, radius, depth */
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 20px; --s6: 24px; --s8: 32px; --s10: 40px; --s12: 48px; --s16: 64px; --s20: 80px;
  --r-sm: 4px; --r-md: 6px; --r-lg: 10px; --r-full: 999px;
  --shadow-sm: 0 1px 2px rgba(14, 16, 20, .05);
  --shadow-md: 0 4px 14px rgba(14, 16, 20, .07), 0 1px 3px rgba(14, 16, 20, .05);
  --shadow-lg: 0 18px 50px rgba(14, 16, 20, .16), 0 2px 6px rgba(14, 16, 20, .06);
  --ease: cubic-bezier(.2, .7, .3, 1);
  --t: 120ms;

  --w-page: 1240px;
  --w-prose: 720px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --accent: #3d82e6; --accent-hover: #5794ec; --accent-ink: #ffffff; --accent-soft: #14233c; --accent-line: #3d82e6; --accent-text: #7fb0f2;
    --bg: #0c0d10; --surface: #121418; --surface-2: #191b20; --surface-3: #22252b; --border: #262930; --border-strong: #383c45;
    --text: #f1f2f4; --text-2: #b6bac3; --text-3: #8f949e; --link: #f1f2f4; --focus: #6aa0ff;
    --gap: #4ade80; --gap-bg: #0f2618; --gap-line: #1f6b3a; --up: #4ade80; --up-bg: #0f2618; --down: #f87171; --down-bg: #2c1212;
    --warn: #fbbf24; --warn-bg: #2a1f06; --info: #7fb0f2; --info-bg: #14233c;
    --series-1: #3987e5; --series-2: #d95926; --series-ctx: #5d626c; --chart-grid: #1d2026;
    --seq-1: #15181e; --seq-2: #172a45; --seq-3: #184f95; --seq-4: #1c5cab; --seq-5: #2a78d6; --seq-6: #5598e7; --seq-7: #9ec5f4;
    --ink-7: #0c0d10; --ink-6: #0c0d10; --ink-5: #0c0d10; --ink-4: #f1f2f4; --ink-3: #f1f2f4; --ink-2: #f1f2f4;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .5); --shadow-md: 0 6px 18px rgba(0, 0, 0, .5), 0 0 0 1px rgba(255, 255, 255, .04);
    --shadow-lg: 0 20px 60px rgba(0, 0, 0, .7), 0 0 0 1px rgba(255, 255, 255, .05);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --accent: #3d82e6; --accent-hover: #5794ec; --accent-ink: #ffffff; --accent-soft: #14233c; --accent-line: #3d82e6; --accent-text: #7fb0f2;
  --bg: #0c0d10; --surface: #121418; --surface-2: #191b20; --surface-3: #22252b; --border: #262930; --border-strong: #383c45;
  --text: #f1f2f4; --text-2: #b6bac3; --text-3: #8f949e; --link: #f1f2f4; --focus: #6aa0ff;
  --gap: #4ade80; --gap-bg: #0f2618; --gap-line: #1f6b3a; --up: #4ade80; --up-bg: #0f2618; --down: #f87171; --down-bg: #2c1212;
  --warn: #fbbf24; --warn-bg: #2a1f06; --info: #7fb0f2; --info-bg: #14233c;
  --series-1: #3987e5; --series-2: #d95926; --series-ctx: #5d626c; --chart-grid: #1d2026;
  --seq-1: #15181e; --seq-2: #172a45; --seq-3: #184f95; --seq-4: #1c5cab; --seq-5: #2a78d6; --seq-6: #5598e7; --seq-7: #9ec5f4;
  --ink-7: #0c0d10; --ink-6: #0c0d10; --ink-5: #0c0d10; --ink-4: #f1f2f4; --ink-3: #f1f2f4; --ink-2: #f1f2f4;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .5); --shadow-md: 0 6px 18px rgba(0, 0, 0, .5), 0 0 0 1px rgba(255, 255, 255, .04);
  --shadow-lg: 0 20px 60px rgba(0, 0, 0, .7), 0 0 0 1px rgba(255, 255, 255, .05);
  color-scheme: dark;
}

/* base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 72px; }
body { margin: 0; background: var(--bg); color: var(--text); font: var(--fs-14)/var(--lh) var(--font); font-feature-settings: "cv11", "ss01"; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img, svg { max-width: 100%; }
img { height: auto; }
a { color: var(--link); text-decoration: underline; text-decoration-color: var(--border-strong); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 3px; }
h1, h2, h3, h4 { margin: 0; line-height: 1.2; letter-spacing: -0.011em; font-weight: 650; }
h1 { font-size: var(--fs-36); letter-spacing: -0.022em; }
h2 { font-size: var(--fs-22); letter-spacing: -0.017em; }
h3 { font-size: var(--fs-16); }
h4 { font-size: var(--fs-14); }
p { margin: 0 0 var(--s3); }
code, kbd, pre, .mono { font-family: var(--mono); font-size: 0.92em; }
code { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-sm); padding: 0 4px; }
kbd { display: inline-block; min-width: 20px; padding: 0 5px; border: 1px solid var(--border-strong); border-bottom-width: 2px; border-radius: var(--r-sm); background: var(--surface); font-size: 11px; line-height: 18px; text-align: center; color: var(--text-2); }
hr { border: 0; border-top: 1px solid var(--border); margin: var(--s6) 0; }
.num, .tnum { font-variant-numeric: tabular-nums; }
.muted { color: var(--text-2); }
.faint { color: var(--text-3); }
.small { font-size: var(--fs-13); color: var(--text-2); }
.xs { font-size: var(--fs-12); color: var(--text-3); }
.up { color: var(--up); }
.down { color: var(--down); }
.gaptext { color: var(--gap); }
.nowrap { white-space: nowrap; }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }
.i { display: inline-block; vertical-align: -0.18em; flex: none; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }

/* layout */
.wrap { max-width: var(--w-page); margin: 0 auto; padding: 0 var(--s6); }
.wrap-prose { max-width: var(--w-prose); }
main { display: block; min-height: 60vh; }
.section { padding: var(--s16) 0; border-top: 1px solid var(--border); }
.section:first-child { border-top: 0; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: var(--s4); margin-bottom: var(--s6); flex-wrap: wrap; }
.section-head p { margin: var(--s2) 0 0; color: var(--text-2); max-width: 640px; }
.eyebrow { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-12); font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--text-3); margin-bottom: var(--s2); }
.grid { display: grid; gap: var(--s4); }
.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) minmax(0, 1fr); gap: var(--s12); align-items: center; }
.stack > * + * { margin-top: var(--s3); }
.row { display: flex; align-items: center; gap: var(--s2); flex-wrap: wrap; }
.spacer { flex: 1; }
.page-head { padding: var(--s10) 0 var(--s6); }
.page-head h1 { font-size: var(--fs-28); }
.page-head .lede { margin-top: var(--s2); color: var(--text-2); font-size: var(--fs-16); max-width: 720px; }
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: var(--fs-13); color: var(--text-3); margin-bottom: var(--s3); }
.crumbs a { color: var(--text-2); text-decoration: none; }
.crumbs a:hover { color: var(--text); text-decoration: underline; }
.crumbs .i { color: var(--text-3); }

/* skip link */
.skip { position: absolute; left: 8px; top: -60px; background: var(--text); color: var(--bg); padding: 8px 12px; border-radius: var(--r-md); z-index: 100; }
.skip:focus { top: 8px; }

/* brand */
.brand { display: inline-flex; align-items: center; gap: 9px; color: var(--text); text-decoration: none; font-weight: 700; font-size: 16px; letter-spacing: -0.02em; }
.brand svg { width: 22px; height: 22px; }
.mark .c { fill: var(--text); }
.mark .o { fill: var(--accent); }

/* nav */
.nav { position: sticky; top: 0; z-index: 40; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: saturate(1.4) blur(8px); border-bottom: 1px solid var(--border); }
.nav .wrap { display: flex; align-items: center; gap: var(--s5); height: 56px; }
.nav-links { display: flex; align-items: center; gap: 2px; }
.nav-links > a, .nav-links > .menu-wrap > button { display: inline-flex; align-items: center; gap: 4px; height: 32px; padding: 0 10px; border-radius: var(--r-md); color: var(--text-2); text-decoration: none; font: 500 var(--fs-14) var(--font); background: none; border: 0; cursor: pointer; }
.nav-links > a:hover, .nav-links > .menu-wrap > button:hover { color: var(--text); background: var(--surface-2); }
.nav-links a[aria-current="page"], .nav-links button[aria-current="page"] { color: var(--text); background: var(--surface-2); }
.nav-right { margin-left: auto; display: flex; align-items: center; gap: var(--s2); }
.kbtn { display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 8px 0 10px; min-width: 200px; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface); color: var(--text-3); font: inherit; font-size: var(--fs-13); cursor: pointer; }
.kbtn:hover { border-color: var(--border-strong); color: var(--text-2); }
.kbtn kbd { margin-left: auto; }
.icon-btn { position: relative; display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: var(--r-md); border: 1px solid transparent; background: none; color: var(--text-2); cursor: pointer; text-decoration: none; }
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.icon-btn .dot { position: absolute; top: 7px; right: 7px; min-width: 8px; height: 8px; border-radius: var(--r-full); background: var(--accent); box-shadow: 0 0 0 2px var(--bg); }
.nav-burger { display: none; }
.mobile-menu { position: fixed; inset: 56px 0 0; z-index: 39; background: var(--bg); padding: var(--s4) var(--s4) var(--s10); overflow-y: auto; border-top: 1px solid var(--border); }
.mobile-menu a { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 var(--s2); color: var(--text); text-decoration: none; font-size: var(--fs-16); border-bottom: 1px solid var(--border); }
.mobile-menu .mm-h { margin: var(--s5) 0 var(--s1); font-size: var(--fs-12); text-transform: uppercase; letter-spacing: .05em; color: var(--text-3); }

/* buttons */
.btn { --h: 36px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: var(--h); padding: 0 14px; border-radius: var(--r-md); border: 1px solid var(--border-strong); background: var(--bg); color: var(--text); font: 550 var(--fs-14) var(--font); text-decoration: none; cursor: pointer; white-space: nowrap; transition: background var(--t) var(--ease), border-color var(--t) var(--ease), transform var(--t) var(--ease); box-shadow: var(--shadow-sm); }
.btn:hover { background: var(--surface-2); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); border-color: var(--accent-line); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent-hover); }
.btn-dark { background: var(--text); border-color: var(--text); color: var(--bg); }
.btn-dark:hover { background: var(--text-2); }
.btn-ghost { background: transparent; border-color: transparent; box-shadow: none; color: var(--text-2); }
.btn-ghost:hover { background: var(--surface-2); color: var(--text); }
.btn-danger { color: var(--down); }
.btn-sm { --h: 30px; padding: 0 10px; font-size: var(--fs-13); gap: 5px; }
.btn-lg { --h: 44px; padding: 0 20px; font-size: var(--fs-16); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; transform: none; }
.btn[aria-busy="true"] { color: transparent !important; position: relative; pointer-events: none; }
.btn[aria-busy="true"]::after { content: ""; position: absolute; width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--text-3); border-right-color: transparent; animation: spin .7s linear infinite; }
.btn-primary[aria-busy="true"]::after { border-color: var(--accent-ink); border-right-color: transparent; }
@keyframes spin { to { transform: rotate(360deg); } }
.linkbtn { background: none; border: 0; padding: 0; font: inherit; color: var(--link); text-decoration: underline; text-decoration-color: var(--border-strong); text-underline-offset: 3px; cursor: pointer; }
.linkbtn:hover { text-decoration-color: currentColor; }

/* forms */
.field { display: grid; gap: 6px; margin-bottom: var(--s4); }
.field > span, .label { font-size: var(--fs-13); font-weight: 550; color: var(--text); }
.field .hint { font-size: var(--fs-12); color: var(--text-3); }
.input, .select, textarea.input { height: 36px; width: 100%; padding: 0 10px; border: 1px solid var(--border-strong); border-radius: var(--r-md); background: var(--bg); color: var(--text); font: var(--fs-14) var(--font); transition: border-color var(--t), box-shadow var(--t); }
textarea.input { height: auto; min-height: 80px; padding: 8px 10px; resize: vertical; }
.input.mono { font-family: var(--mono); font-size: var(--fs-13); }
.input:focus, .select:focus { outline: none; border-color: var(--focus); box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 22%, transparent); }
.input[aria-invalid="true"] { border-color: var(--down); }
.select { appearance: none; padding-right: 30px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2' 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 8px center; cursor: pointer; }
.select-sm, .input-sm { height: 30px; font-size: var(--fs-13); }
.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: var(--fs-14); min-height: 32px; }
.check input { width: 16px; height: 16px; accent-color: var(--text); margin: 0; }
.input-group { display: flex; gap: var(--s2); }
.input-group .input { flex: 1; }
.form-msg { min-height: 20px; font-size: var(--fs-13); margin: var(--s2) 0 0; color: var(--text-2); }
.form-msg.err { color: var(--down); }
.form-msg.ok { color: var(--up); }

/* segmented control and tabs */
.seg { display: inline-flex; padding: 2px; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface-2); gap: 2px; }
.seg button, .seg a { height: 28px; padding: 0 10px; border: 0; border-radius: 4px; background: none; color: var(--text-2); font: 500 var(--fs-13) var(--font); cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; }
.seg [aria-pressed="true"], .seg [aria-current="page"], .seg [aria-selected="true"] { background: var(--bg); color: var(--text); box-shadow: var(--shadow-sm); }
.tabs { display: flex; gap: var(--s5); border-bottom: 1px solid var(--border); margin-bottom: var(--s5); overflow-x: auto; scrollbar-width: none; }
.tabs a, .tabs button { display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0; border: 0; background: none; color: var(--text-2); font: 500 var(--fs-14) var(--font); text-decoration: none; border-bottom: 2px solid transparent; margin-bottom: -1px; cursor: pointer; white-space: nowrap; }
.tabs a:hover, .tabs button:hover { color: var(--text); }
.tabs [aria-current="page"], .tabs [aria-selected="true"] { color: var(--text); border-bottom-color: var(--text); }
.tabs .count { font-size: var(--fs-12); color: var(--text-3); background: var(--surface-2); border-radius: var(--r-full); padding: 0 6px; }

/* badges */
.badge { display: inline-flex; align-items: center; gap: 4px; height: 20px; padding: 0 7px; border-radius: var(--r-full); font-size: 11.5px; font-weight: 600; line-height: 1; white-space: nowrap; background: var(--surface-2); color: var(--text-2); border: 1px solid var(--border); }
.badge-gap { background: var(--gap-bg); color: var(--gap); border-color: var(--gap-line); }
.badge-up { color: var(--up); background: var(--gap-bg); border-color: transparent; }
.badge-down { color: var(--down); background: var(--down-bg); border-color: transparent; }
.badge-warn { color: var(--warn); background: var(--warn-bg); border-color: transparent; }
.badge-info { color: var(--info); background: var(--info-bg); border-color: transparent; }
.badge-accent { background: var(--accent); color: var(--accent-ink); border-color: var(--accent-line); }
.badge-live::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--up); box-shadow: 0 0 0 3px color-mix(in srgb, var(--up) 25%, transparent); }
.tag { display: inline-flex; align-items: center; height: 24px; padding: 0 8px; border-radius: var(--r-sm); background: var(--surface-2); color: var(--text-2); font-size: var(--fs-12); text-decoration: none; border: 1px solid var(--border); }
a.tag:hover { color: var(--text); border-color: var(--border-strong); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }

/* tooltips: data-tip on any element */
[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%); width: max-content; max-width: 260px; padding: 6px 8px; border-radius: var(--r-md); background: var(--text); color: var(--bg); font: 500 12px/1.35 var(--font); text-align: left; white-space: normal; z-index: 60; pointer-events: none; box-shadow: var(--shadow-md); }
[data-tip-pos="below"]:hover::after { bottom: auto; top: calc(100% + 6px); }

/* dropdown menus */
.menu-wrap { position: relative; }
.menu { position: absolute; top: calc(100% + 6px); left: 0; min-width: 220px; padding: 6px; background: var(--bg); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow-md); z-index: 50; }
.menu.right { left: auto; right: 0; }
.menu a, .menu button { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 34px; padding: 6px 10px; border: 0; border-radius: var(--r-md); background: none; color: var(--text); font: var(--fs-14) var(--font); text-decoration: none; text-align: left; cursor: pointer; }
.menu a:hover, .menu button:hover, .menu a:focus-visible { background: var(--surface-2); outline: none; }
.menu .menu-sub { display: block; font-size: var(--fs-12); color: var(--text-3); }
.menu .i { color: var(--text-3); }
.menu hr { margin: 6px 0; }
.menu-h { padding: 6px 10px 2px; font-size: var(--fs-12); color: var(--text-3); }

/* modal */
dialog.modal { width: min(520px, calc(100vw - 32px)); max-height: calc(100vh - 64px); padding: 0; border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--bg); color: var(--text); box-shadow: var(--shadow-lg); }
dialog.modal::backdrop { background: rgba(10, 10, 10, .45); }
dialog.modal[open] { animation: pop var(--t) var(--ease); }
@keyframes pop { from { opacity: 0; transform: translateY(4px) scale(.99); } }
.modal-h { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); padding: var(--s4) var(--s5); border-bottom: 1px solid var(--border); }
.modal-h h2 { font-size: var(--fs-16); }
.modal-b { padding: var(--s5); overflow-y: auto; }
.modal-f { display: flex; justify-content: flex-end; gap: var(--s2); padding: var(--s3) var(--s5); border-top: 1px solid var(--border); background: var(--surface); border-radius: 0 0 var(--r-lg) var(--r-lg); }

/* command palette */
dialog.palette { width: min(640px, calc(100vw - 24px)); margin-top: 12vh; padding: 0; border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--bg); color: var(--text); box-shadow: var(--shadow-lg); overflow: hidden; }
dialog.palette::backdrop { background: rgba(10, 10, 10, .4); }
.pal-in { display: flex; align-items: center; gap: 10px; padding: 0 var(--s4); border-bottom: 1px solid var(--border); }
.pal-in input { flex: 1; height: 52px; border: 0; background: none; color: var(--text); font: var(--fs-16) var(--font); outline: none; }
.pal-list { max-height: min(420px, 60vh); overflow-y: auto; padding: 6px; margin: 0; list-style: none; }
.pal-list li[role="option"] { display: flex; align-items: center; gap: 10px; min-height: 42px; padding: 6px 10px; border-radius: var(--r-md); cursor: pointer; }
.pal-list li[aria-selected="true"] { background: var(--surface-2); }
.pal-list .pal-h { padding: 8px 10px 4px; font-size: var(--fs-12); color: var(--text-3); }
.pal-list img { width: 46px; height: 21px; object-fit: cover; border-radius: 2px; background: var(--surface-2); }
.pal-list .pal-meta { margin-left: auto; font-size: var(--fs-12); color: var(--text-3); white-space: nowrap; }
.pal-foot { display: flex; gap: var(--s4); padding: 8px var(--s4); border-top: 1px solid var(--border); background: var(--surface); font-size: var(--fs-12); color: var(--text-3); }

/* toasts */
.toasts { position: fixed; right: 16px; bottom: 16px; z-index: 80; display: grid; gap: 8px; width: min(360px, calc(100vw - 32px)); }
.toast { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border-radius: var(--r-lg); background: var(--text); color: var(--bg); box-shadow: var(--shadow-lg); font-size: var(--fs-14); animation: pop var(--t) var(--ease); }
.toast.err { background: var(--down); color: #fff; }
.toast button { margin-left: auto; background: none; border: 0; color: inherit; opacity: .7; cursor: pointer; padding: 0; }

/* cards */
.card { border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--bg); padding: var(--s5); box-shadow: var(--shadow-sm); }
.card-flat { box-shadow: none; }
.card-muted { background: var(--surface); box-shadow: none; }
.card-h { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); margin-bottom: var(--s3); }
.card-h h3 { font-size: var(--fs-14); }
.card-link { display: block; color: inherit; text-decoration: none; transition: border-color var(--t); }
.card-link:hover { border-color: var(--border-strong); }

/* stat tiles */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; background: var(--border); gap: 1px; }
.stat { background: var(--bg); padding: var(--s4) var(--s4) var(--s3); min-width: 0; }
.stat dt, .stat .k { font-size: var(--fs-12); color: var(--text-3); font-weight: 500; display: flex; align-items: center; gap: 4px; }
.stat dd, .stat .v { margin: 4px 0 0; font-size: var(--fs-22); font-weight: 650; letter-spacing: -0.02em; line-height: 1.15; }
.stat .spark { margin-top: 6px; width: 100%; height: 24px; }
.stat .d { font-size: var(--fs-12); color: var(--text-3); margin-top: 2px; }
.stat .v .up, .stat .v .down { font-size: inherit; }
dl.stats { margin: 0; }

/* tables */
.tbl-wrap { border: 1px solid var(--border); border-radius: var(--r-lg); overflow: auto; background: var(--bg); }
.tbl { width: 100%; border-collapse: separate; border-spacing: 0; font-variant-numeric: tabular-nums; font-size: var(--fs-14); }
.tbl th { position: sticky; top: 0; z-index: 2; background: var(--surface); text-align: left; font-size: var(--fs-12); font-weight: 550; color: var(--text-3); padding: 0 12px; height: 36px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.tbl-wrap.page-sticky { overflow: visible; }
.tbl-wrap.page-sticky .tbl th { top: 56px; }
.tbl-wrap.page-sticky .tbl thead tr th:first-child { border-top-left-radius: var(--r-lg); }
.tbl-wrap.page-sticky .tbl thead tr th:last-child { border-top-right-radius: var(--r-lg); }
.tbl td { padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr:hover td { background: var(--surface); }
.tbl .r { text-align: right; }
.tbl .c { text-align: center; }
.tbl th button.sort { display: inline-flex; align-items: center; gap: 4px; height: 100%; padding: 0; border: 0; background: none; color: inherit; font: inherit; cursor: pointer; }
.tbl th.r button.sort { flex-direction: row-reverse; }
.tbl th button.sort:hover { color: var(--text); }
.tbl th[aria-sort] { color: var(--text); }
.tbl th .sort-i { opacity: .35; }
.tbl th[aria-sort] .sort-i { opacity: 1; }
.tbl td.rank { color: var(--text-3); width: 36px; }
.gamecell { display: flex; align-items: center; gap: 12px; min-width: 220px; }
.gamecell img { width: 80px; height: 37px; object-fit: cover; border-radius: var(--r-sm); background: var(--surface-2); flex: none; }
.gamecell a { color: var(--text); text-decoration: none; font-weight: 600; }
.gamecell a:hover { text-decoration: underline; }
.gamecell .sub { display: block; font-size: var(--fs-12); color: var(--text-3); font-weight: 400; margin-top: 1px; }
.scorecell { font-weight: 650; }
.score { display: inline-grid; place-items: center; min-width: 34px; height: 24px; padding: 0 6px; border-radius: var(--r-sm); font-weight: 700; font-size: var(--fs-13); background: var(--surface-2); color: var(--text); font-variant-numeric: tabular-nums; }
.score.hot { background: var(--accent); color: var(--accent-ink); }
.score-lg { min-width: 56px; height: 40px; font-size: var(--fs-22); border-radius: var(--r-md); }

/* coverage strip: one cell per place I check, green where nothing exists yet */
.strip { display: inline-flex; gap: 3px; vertical-align: middle; }
.strip .s { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 4px; font-size: 10.5px; font-weight: 700; border: 1px solid transparent; font-family: var(--font); }
.strip .has { background: var(--surface-2); color: var(--text-3); border-color: var(--border); }
.strip .gap { background: var(--gap-bg); color: var(--gap); border-color: var(--gap-line); }
.strip .unk { color: var(--text-3); border: 1px dashed var(--border-strong); }
.strip.lg .s { width: 28px; height: 28px; font-size: 12px; border-radius: 6px; }
.gaps-line { display: block; font-size: var(--fs-12); color: var(--gap); margin-top: 3px; }
.gaps-line .none { color: var(--text-3); }
.legend { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s4); font-size: var(--fs-12); color: var(--text-3); align-items: center; }
.legend .strip .s { width: 16px; height: 16px; font-size: 9px; }

/* sparkline and charts */
.spark { display: block; width: 112px; height: 28px; overflow: visible; }
.spark path.l { fill: none; stroke: var(--chart-1); stroke-width: 1.5; stroke-linejoin: round; stroke-linecap: round; }
.spark path.a { fill: var(--chart-1); opacity: .1; stroke: none; }
.spark circle { fill: var(--chart-1); stroke: var(--bg); stroke-width: 1.5; }
.spark-empty { font-size: 11px; color: var(--text-3); }
.chart-box { position: relative; }
.chart { display: block; width: 100%; height: auto; overflow: visible; touch-action: pan-y; user-select: none; }
.chart .grid { stroke: var(--chart-grid); stroke-width: 1; shape-rendering: crispEdges; }
.chart .axis { stroke: var(--border-strong); shape-rendering: crispEdges; }
.chart text { font: 11px var(--font); fill: var(--text-3); font-variant-numeric: tabular-nums; }
.chart .ylab { text-anchor: end; }
.chart .xlab { text-anchor: middle; }
.chart .line { fill: none; stroke: var(--chart-1); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .line.raw { stroke: var(--chart-2); stroke-width: 1; }
.chart .line.ctx { stroke: var(--chart-2); stroke-width: 1.5; }
.chart .area { fill: var(--chart-1); opacity: .1; }
.chart .bar { fill: var(--chart-1); }
.chart .bar.ctx { fill: var(--chart-2); }
.chart .bar:hover, .chart .bar:focus { opacity: .8; outline: none; }
.chart .end-dot { fill: var(--chart-1); stroke: var(--bg); stroke-width: 2; }
.chart .ev-line { stroke: var(--text-3); stroke-width: 1; shape-rendering: crispEdges; }
.chart .ev-dot { fill: var(--bg); stroke: var(--text); stroke-width: 2; }
.chart .ev-dot.flag { fill: var(--accent); stroke: var(--accent-ink); }
.chart text.ev-lab { fill: var(--text); font-weight: 600; font-size: 11px; }
.chart text.ev-sub { fill: var(--text-3); font-size: 10.5px; }
.chart text.val { fill: var(--text); font-weight: 650; font-size: 12px; }
.chart text.dlab { fill: var(--text-2); font-size: 11px; }
.chart .hit { fill: transparent; }
.chart .cross { stroke: var(--text-2); stroke-width: 1; pointer-events: none; shape-rendering: crispEdges; }
.chart .hover-dot { fill: var(--chart-1); stroke: var(--bg); stroke-width: 2; pointer-events: none; }
.chart-skel { position: relative; border-radius: var(--r-md); overflow: hidden; background: linear-gradient(to top, var(--surface-2) 1px, transparent 1px) 0 0 / 100% 25%; }
.chart-skel::after { content: ""; position: absolute; inset: 20% 0 12% 0; background: var(--surface-2); clip-path: polygon(0 80%, 12% 66%, 25% 72%, 38% 50%, 52% 56%, 65% 30%, 80% 38%, 100% 20%, 100% 100%, 0 100%); animation: shimmer 1.4s ease infinite; opacity: .8; }
details.tableview { margin-top: var(--s2); font-size: var(--fs-13); }
details.tableview summary { cursor: pointer; color: var(--text-2); min-height: 32px; display: inline-flex; align-items: center; }
details.tableview .tbl-wrap { max-height: 320px; margin-top: var(--s2); }
/* gap matrix: games x six sources */
.matrix { width: 100%; border-collapse: separate; border-spacing: 0 2px; font-size: var(--fs-13); }
.matrix th { font-size: 11px; font-weight: 550; color: var(--text-3); padding: 0 2px 6px; text-align: center; white-space: nowrap; }
.matrix th.g { text-align: left; }
.matrix td { padding: 0 1px; height: 34px; }
.matrix td.g { padding-right: 12px; max-width: 260px; }
.matrix td.g a { color: var(--text); text-decoration: none; font-weight: 550; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.matrix td.g a:hover { text-decoration: underline; }
.matrix td.g .sub { font-size: 11px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.matrix .cell { display: grid; place-items: center; height: 30px; border-radius: 4px; font-size: 11px; font-weight: 600; background: var(--surface-2); color: var(--text-3); }
.matrix .cell.gap { background: var(--gap-bg); color: var(--gap); box-shadow: inset 0 0 0 1px var(--gap-line); }
.matrix .cell.unk { background: transparent; box-shadow: inset 0 0 0 1px var(--border-strong); color: var(--text-3); }
.matrix td.n { text-align: right; padding-left: 10px; color: var(--text-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.matrix tfoot td { font-size: 11px; color: var(--text-3); text-align: center; padding-top: 6px; font-variant-numeric: tabular-nums; }
/* small multiples */
.multiples { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: var(--s3); }
.multiple { border: 1px solid var(--border); border-radius: var(--r-lg); padding: var(--s3); background: var(--bg); min-width: 0; }
.multiple h3 { font-size: var(--fs-13); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.multiple h3 a { color: var(--text); text-decoration: none; }
.multiple h3 a:hover { text-decoration: underline; }
.multiple .m-meta { display: flex; justify-content: space-between; font-size: var(--fs-12); color: var(--text-3); margin: 2px 0 6px; }
.multiple .m-meta b { color: var(--text); font-weight: 650; }
.chart-tip { position: absolute; top: 0; left: 0; padding: 6px 9px; border-radius: var(--r-md); background: var(--text); color: var(--bg); font-size: 12px; line-height: 1.35; white-space: nowrap; pointer-events: none; box-shadow: var(--shadow-md); font-variant-numeric: tabular-nums; z-index: 5; }
.chart-tip b { font-weight: 650; }
.chart-legend { display: flex; gap: var(--s4); font-size: var(--fs-12); color: var(--text-3); margin-top: var(--s2); flex-wrap: wrap; }
.chart-legend span::before { content: ""; display: inline-block; width: 12px; height: 2px; margin-right: 6px; vertical-align: middle; background: var(--chart-1); }
.chart-legend .thin::before { opacity: .35; }
.chart-legend .alt::before { background: var(--chart-2); }
.chart-legend .mark::before { height: 8px; width: 8px; border-radius: 50%; background: var(--accent); }
.hbar { display: grid; grid-template-columns: minmax(90px, 160px) 1fr 64px; align-items: center; gap: 10px; font-size: var(--fs-13); }
.hbar + .hbar { margin-top: 6px; }
.hbar .track { display: block; height: 10px; background: var(--surface-2); border-radius: 0 4px 4px 0; overflow: hidden; }
.hbar .fill { display: block; height: 100%; background: var(--chart-1); border-radius: 0 4px 4px 0; }
.hbar .fill.gap { background: var(--gap); }
.hbar .val { text-align: right; font-variant-numeric: tabular-nums; color: var(--text-2); }

/* timeline */
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline li { position: relative; padding: 0 0 var(--s4) 28px; }
.timeline li::before { content: ""; position: absolute; left: 7px; top: 18px; bottom: -2px; width: 1px; background: var(--border); }
.timeline li:last-child::before { display: none; }
.timeline .dot { position: absolute; left: 0; top: 3px; width: 15px; height: 15px; border-radius: 50%; border: 2px solid var(--border-strong); background: var(--bg); }
.timeline .dot.gap { border-color: var(--gap); background: var(--gap-bg); }
.timeline .dot.acc { border-color: var(--accent-line); background: var(--accent); }
.timeline .dot.ink { border-color: var(--text); background: var(--text); }
.timeline .t { font-size: var(--fs-12); color: var(--text-3); }
.timeline .w { font-size: var(--fs-14); }

/* skeletons, empty, error */
.skel { display: block; border-radius: var(--r-sm); background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface-3) 37%, var(--surface-2) 63%); background-size: 400% 100%; animation: shimmer 1.4s ease infinite; min-height: 12px; }
@keyframes shimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }
.empty { display: grid; justify-items: center; gap: var(--s2); text-align: center; padding: var(--s12) var(--s5); border: 1px dashed var(--border-strong); border-radius: var(--r-lg); color: var(--text-2); }
.empty .i { color: var(--text-3); }
.empty h3 { color: var(--text); }
.empty p { max-width: 420px; margin: 0; }
.alert { display: flex; gap: var(--s3); align-items: flex-start; padding: var(--s3) var(--s4); border-radius: var(--r-lg); border: 1px solid var(--border); background: var(--surface); font-size: var(--fs-14); }
.alert > .i { margin-top: 2px; color: var(--text-3); }
.alert p { margin: 0; }
.alert-err { border-color: color-mix(in srgb, var(--down) 35%, transparent); background: var(--down-bg); color: var(--down); }
.alert-err > .i { color: var(--down); }
.alert-warn { border-color: color-mix(in srgb, var(--warn) 30%, transparent); background: var(--warn-bg); }
.alert-warn > .i { color: var(--warn); }
.alert-gap { border-color: var(--gap-line); background: var(--gap-bg); }
.alert-gap > .i { color: var(--gap); }
.alert-accent { border-color: var(--accent-line); background: var(--accent-soft); }
.offline-bar { position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 90; display: flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: var(--r-full); background: var(--text); color: var(--bg); font-size: var(--fs-13); box-shadow: var(--shadow-lg); }

/* pagination */
.pager { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); margin-top: var(--s4); flex-wrap: wrap; font-size: var(--fs-13); color: var(--text-2); }
.pager .row { gap: 4px; }

/* prose (docs, legal, articles) */
.prose { max-width: var(--w-prose); font-size: 15.5px; line-height: 1.65; }
.prose h2 { font-size: var(--fs-22); margin: var(--s10) 0 var(--s3); }
.prose h3 { font-size: var(--fs-18); margin: var(--s8) 0 var(--s2); }
.prose p, .prose ul, .prose ol { margin: 0 0 var(--s4); }
.prose ul, .prose ol { padding-left: 22px; }
.prose li { margin-bottom: 6px; }
.prose pre { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: var(--s4); overflow-x: auto; font-size: 13px; line-height: 1.55; }
.prose pre code { background: none; border: 0; padding: 0; }
.prose table { border-collapse: collapse; width: 100%; font-size: var(--fs-14); margin: 0 0 var(--s4); }
.prose th, .prose td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--border); vertical-align: top; }
.prose th { font-size: var(--fs-12); color: var(--text-3); font-weight: 550; }
.prose dl dt { font-weight: 650; margin-top: var(--s4); }
.prose dl dd { margin: 4px 0 0; color: var(--text-2); }
.prose .figure { margin: var(--s6) 0; }
.prose .figure figcaption, .figcap { font-size: var(--fs-13); color: var(--text-3); margin-top: var(--s2); }
pre.code { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 12px 14px; font: 12.5px/1.6 var(--mono); overflow-x: auto; white-space: pre; margin: 0 0 var(--s3); }
.copy-btn { position: absolute; top: 6px; right: 6px; }
pre.code:has(.copy-btn) { padding-top: 42px; }
.docs { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: var(--s10); padding: var(--s8) 0 var(--s16); }
.docs-nav { position: sticky; top: 76px; align-self: start; font-size: var(--fs-14); max-height: calc(100vh - 96px); overflow-y: auto; }
.docs-nav h4 { font-size: var(--fs-12); text-transform: uppercase; letter-spacing: .05em; color: var(--text-3); margin: var(--s5) 0 var(--s2); }
.docs-nav h4:first-child { margin-top: 0; }
.docs-nav a { display: block; padding: 5px 10px; margin-left: -10px; border-radius: var(--r-md); color: var(--text-2); text-decoration: none; }
.docs-nav a:hover { color: var(--text); background: var(--surface-2); }
.docs-nav a[aria-current="page"] { color: var(--text); background: var(--surface-2); font-weight: 550; }

/* hero and landing */
.hero { padding: var(--s16) 0 var(--s10); }
.hero h1 { font-size: var(--fs-44); line-height: 1.08; letter-spacing: -0.03em; max-width: 820px; }
.hero .lede { font-size: var(--fs-18); color: var(--text-2); max-width: 680px; margin: var(--s4) 0 var(--s6); line-height: 1.5; }
.hero .cta { display: flex; gap: var(--s3); flex-wrap: wrap; align-items: center; }
.hero-meta { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s5); margin-top: var(--s5); font-size: var(--fs-13); color: var(--text-3); align-items: center; }
.live-board { margin-top: var(--s8); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow-md); overflow: hidden; background: var(--bg); }
.live-board-h { display: flex; align-items: center; gap: var(--s3); padding: 10px var(--s4); border-bottom: 1px solid var(--border); background: var(--surface); font-size: var(--fs-13); color: var(--text-2); flex-wrap: wrap; }
.live-board-h b { color: var(--text); }
.picks { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-bottom: 1px solid var(--border); }
.pick { padding: var(--s4); min-width: 0; border-right: 1px solid var(--border); display: grid; gap: 10px; align-content: start; }
.pick:last-child { border-right: 0; }
.pick-art { position: relative; aspect-ratio: 460 / 215; border-radius: var(--r-md); overflow: hidden; background: var(--surface-2); }
.pick-art img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pick-art .score { position: absolute; top: 8px; left: 8px; box-shadow: var(--shadow-md); }
.pick h3 { font-size: var(--fs-16); }
.pick h3 a { color: var(--text); text-decoration: none; }
.pick h3 a:hover { text-decoration: underline; }
.pick .meta { font-size: var(--fs-12); color: var(--text-3); margin-top: 2px; }
.pick .nums { display: flex; gap: var(--s4); font-size: var(--fs-13); color: var(--text-2); flex-wrap: wrap; }
.pick .nums b { color: var(--text); font-size: var(--fs-16); font-weight: 650; }
.pick .missing { font-size: var(--fs-13); color: var(--gap); font-weight: 550; }
.steps { counter-reset: step; }
.step { position: relative; padding-top: var(--s10); }
.step::before { counter-increment: step; content: counter(step); position: absolute; top: 0; left: 0; width: 28px; height: 28px; display: grid; place-items: center; border-radius: var(--r-md); background: var(--text); color: var(--bg); font-weight: 700; font-size: var(--fs-13); }
.step h3 { margin-bottom: var(--s2); }
.step p { color: var(--text-2); margin: 0; }
.feature { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--s12); align-items: center; padding: var(--s10) 0; }
.feature.flip { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.feature.flip .feature-copy { order: 2; }
.feature-copy h3 { font-size: var(--fs-22); letter-spacing: -0.017em; margin-bottom: var(--s3); }
.feature-copy p { color: var(--text-2); font-size: var(--fs-16); }
.feature-copy ul { padding-left: 18px; color: var(--text-2); margin: 0; }
.feature-copy li { margin-bottom: 4px; }
.shot { border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--bg); box-shadow: var(--shadow-md); padding: var(--s4); overflow: hidden; }
.shot-bar { display: flex; gap: 6px; align-items: center; margin: calc(-1 * var(--s4)) calc(-1 * var(--s4)) var(--s4); padding: 8px var(--s4); border-bottom: 1px solid var(--border); background: var(--surface); font-size: var(--fs-12); color: var(--text-3); }
.audience { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; }
.audience > div { background: var(--bg); padding: var(--s5); }
.audience h3 { display: flex; align-items: center; gap: 8px; margin-bottom: var(--s2); }
.audience p { color: var(--text-2); margin: 0; font-size: var(--fs-14); }
.audience .ex { margin-top: var(--s3); font-size: var(--fs-13); }
.bigstats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s6); }
.bigstat .v { font-size: var(--fs-36); font-weight: 700; letter-spacing: -0.03em; line-height: 1; }
.bigstat .k { margin-top: var(--s2); color: var(--text-2); font-size: var(--fs-14); }
.price-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s4); align-items: stretch; }
.price { display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: var(--r-lg); padding: var(--s6); background: var(--bg); }
.price.featured { border-color: var(--text); box-shadow: var(--shadow-md); }
.price h3 { font-size: var(--fs-16); display: flex; align-items: center; gap: var(--s2); }
.price .amt { font-size: var(--fs-36); font-weight: 700; letter-spacing: -0.03em; margin: var(--s3) 0 0; }
.price .amt small { font-size: var(--fs-14); font-weight: 500; color: var(--text-3); letter-spacing: 0; }
.price .was { font-size: var(--fs-13); color: var(--text-3); min-height: 20px; }
.price ul { list-style: none; padding: 0; margin: var(--s5) 0; display: grid; gap: 8px; font-size: var(--fs-14); flex: 1; align-content: start; }
.price li { display: flex; gap: 8px; align-items: flex-start; }
.price li .i { color: var(--up); margin-top: 3px; }
.price li.no { color: var(--text-3); }
.price li.no .i { color: var(--text-3); }
.faq details { border-bottom: 1px solid var(--border); }
.faq summary { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); min-height: 52px; cursor: pointer; font-weight: 600; font-size: var(--fs-16); list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .i { color: var(--text-3); transition: transform var(--t); }
.faq details[open] summary .i { transform: rotate(180deg); }
.faq details > div { padding: 0 0 var(--s4); color: var(--text-2); max-width: 720px; }
.cta-band { display: flex; align-items: center; justify-content: space-between; gap: var(--s6); padding: var(--s10); border-radius: var(--r-lg); background: var(--text); color: var(--bg); flex-wrap: wrap; }
.cta-band h2 { color: var(--bg); }
.cta-band p { color: color-mix(in srgb, var(--bg) 70%, transparent); margin: var(--s2) 0 0; }
.cta-band .btn:not(.btn-primary) { background: transparent; color: var(--bg); border-color: color-mix(in srgb, var(--bg) 35%, transparent); }
.feed { list-style: none; margin: 0; padding: 0; }
.feed li { display: flex; gap: var(--s3); align-items: baseline; padding: 9px 0; border-bottom: 1px solid var(--border); font-size: var(--fs-14); }
.feed li:last-child { border-bottom: 0; }
.feed .t { flex: none; width: 74px; font-size: var(--fs-12); color: var(--text-3); font-variant-numeric: tabular-nums; }
.feed a { color: var(--text); font-weight: 550; text-decoration: none; }
.feed a:hover { text-decoration: underline; }

/* explore */
.toolbar { display: flex; flex-wrap: wrap; gap: var(--s2); align-items: center; margin-bottom: var(--s3); }
.toolbar .input { width: 240px; }
.filters-panel { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: var(--s3); padding: var(--s4); border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--surface); margin-bottom: var(--s3); }
.filters-panel .field { margin: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 4px; height: 30px; padding: 0 10px; border-radius: var(--r-full); border: 1px solid var(--border-strong); background: var(--bg); color: var(--text-2); font: 500 var(--fs-13) var(--font); cursor: pointer; text-decoration: none; }
.chip[aria-pressed="true"] { background: var(--gap-bg); color: var(--gap); border-color: var(--gap-line); }
.chip.dark[aria-pressed="true"] { background: var(--text); color: var(--bg); border-color: var(--text); }
.result-meta { display: flex; justify-content: space-between; align-items: center; gap: var(--s3); flex-wrap: wrap; font-size: var(--fs-13); color: var(--text-2); margin: var(--s2) 0 var(--s3); }
.row-detail td { background: var(--surface) !important; }
.watch-btn[aria-pressed="true"] { color: var(--text); }
.watch-btn[aria-pressed="true"] .i { fill: var(--accent); stroke: var(--accent-line); }

/* game page */
.g-hero { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: var(--s8); padding: var(--s6) 0 var(--s6); align-items: start; }
.g-hero h1 { font-size: var(--fs-36); }
.g-sub { color: var(--text-2); margin: var(--s2) 0 var(--s3); font-size: var(--fs-14); }
.g-answer { font-size: var(--fs-16); color: var(--text); max-width: 720px; line-height: 1.55; }
.g-art { border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--border); background: var(--surface-2); aspect-ratio: 460 / 215; }
.g-art img { width: 100%; height: 100%; object-fit: cover; display: block; }
.g-actions { display: flex; flex-wrap: wrap; gap: var(--s2); margin-top: var(--s4); }
.gapbox { display: flex; align-items: center; gap: var(--s4); padding: var(--s4); border: 1px solid var(--gap-line); background: var(--gap-bg); border-radius: var(--r-lg); margin: var(--s4) 0; flex-wrap: wrap; }
.gapbox.covered { border-color: var(--border); background: var(--surface); }
.gapbox p { margin: 0; font-size: var(--fs-16); }
.gapbox b { color: var(--gap); }
.g-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: var(--s8); align-items: start; padding-bottom: var(--s16); }
.g-main > section { padding: var(--s8) 0; border-top: 1px solid var(--border); }
.g-main > section:first-child { border-top: 0; padding-top: 0; }
.g-main h2 { font-size: var(--fs-18); margin-bottom: var(--s3); display: flex; align-items: center; gap: var(--s2); }
.g-main h2 .badge { font-weight: 600; }
.g-side { position: sticky; top: 76px; display: grid; gap: var(--s4); }
.g-side .card h3 { font-size: var(--fs-13); margin-bottom: var(--s3); }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px var(--s4); margin: 0; font-size: var(--fs-13); }
.kv dt { color: var(--text-3); }
.kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.covtbl td:first-child { white-space: nowrap; font-weight: 550; }
.covtbl .gaprow td:nth-child(2) { color: var(--gap); font-weight: 550; }
.covtbl .when { white-space: nowrap; color: var(--text-3); font-size: var(--fs-12); }
.cov-grid { display: grid; grid-template-columns: 110px repeat(var(--days, 7), minmax(0, 1fr)); gap: 3px; font-size: var(--fs-12); align-items: center; }
.cov-grid .h { color: var(--text-3); text-align: center; font-size: 11px; }
.cov-grid .lbl { color: var(--text-2); }
.cov-grid .c { height: 22px; border-radius: 3px; background: var(--surface-2); border: 1px solid var(--border); }
.cov-grid .c.has { background: var(--text-3); border-color: var(--text-3); }
.cov-grid .c.gap { background: var(--gap-bg); border-color: var(--gap-line); }
.cov-grid .c.unk { background: transparent; border-style: dashed; }
.shots { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s2); }
.shots img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--r-md); border: 1px solid var(--border); background: var(--surface-2); }
.claim-kinds { display: flex; flex-wrap: wrap; gap: 6px; }
.mini-list { list-style: none; margin: 0; padding: 0; }
.mini-list li { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: var(--fs-13); }
.mini-list li:last-child { border-bottom: 0; }
.mini-list img { width: 64px; height: 30px; object-fit: cover; border-radius: 3px; background: var(--surface-2); flex: none; }
.mini-list a { color: var(--text); text-decoration: none; font-weight: 550; }
.mini-list a:hover { text-decoration: underline; }
.mini-list .r { margin-left: auto; text-align: right; color: var(--text-3); font-variant-numeric: tabular-nums; white-space: nowrap; }
.embed-preview { padding: var(--s4); border: 1px dashed var(--border-strong); border-radius: var(--r-lg); background: var(--surface); }

/* dashboard */
.dash { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: var(--s6); padding-bottom: var(--s16); align-items: start; }
.dash-side { display: grid; gap: var(--s4); }
.notif { list-style: none; margin: 0; padding: 0; }
.notif li { display: grid; grid-template-columns: 28px 1fr; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--border); font-size: var(--fs-13); }
.notif li.unread .ic { background: var(--accent-soft); color: var(--text); border-color: var(--accent-line); }
.notif .ic { width: 28px; height: 28px; display: grid; place-items: center; border-radius: var(--r-md); background: var(--surface-2); color: var(--text-3); border: 1px solid var(--border); }
.notif .t { color: var(--text-3); font-size: var(--fs-12); }
.notif a { color: var(--text); font-weight: 600; text-decoration: none; }
.notif a:hover { text-decoration: underline; }
.onboard { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s3); align-items: start; }
.onboard .card { position: relative; }
.onboard .done { position: absolute; top: 14px; right: 14px; color: var(--up); }
.settings { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: var(--s10); padding-bottom: var(--s16); }
.settings section { padding: var(--s6) 0; border-bottom: 1px solid var(--border); }
.settings section:first-child { padding-top: 0; }
.settings h2 { font-size: var(--fs-18); margin-bottom: var(--s2); }
.channel { display: flex; align-items: center; gap: var(--s3); padding: var(--s3) 0; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.channel .who { flex: 1; min-width: 200px; }
.channel .who b { display: block; }
.channel .who span { font: 12px var(--mono); color: var(--text-3); overflow-wrap: anywhere; }

/* footer */
.foot { border-top: 1px solid var(--border); background: var(--surface); margin-top: var(--s16); }
.foot .wrap { padding-top: var(--s10); padding-bottom: var(--s8); }
.foot-grid { display: grid; grid-template-columns: 1.4fr repeat(4, minmax(0, 1fr)); gap: var(--s6); }
.foot h4 { font-size: var(--fs-13); margin-bottom: var(--s3); }
.foot ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; }
.foot a { color: var(--text-2); text-decoration: none; font-size: var(--fs-13); display: inline-flex; min-height: 28px; align-items: center; }
.foot a:hover { color: var(--text); }
.foot-about p { font-size: var(--fs-13); color: var(--text-2); max-width: 300px; margin-top: var(--s3); }
.foot-bottom { display: flex; justify-content: space-between; align-items: center; gap: var(--s3); margin-top: var(--s8); padding-top: var(--s4); border-top: 1px solid var(--border); font-size: var(--fs-12); color: var(--text-3); flex-wrap: wrap; }
.theme-seg .i { margin: 0; }

/* embeds */
body.embed { background: var(--bg); padding: 12px; overflow: hidden; }

.show-sm { display: none; }

/* responsive */
@media (max-width: 1100px) {
  .kbtn { min-width: 0; }
  .kbtn .kbtn-label, .kbtn kbd { display: none; }
  .g-hero { grid-template-columns: minmax(0, 1fr) 300px; }
  .g-layout { grid-template-columns: minmax(0, 1fr); }
  .g-side { position: static; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dash { grid-template-columns: minmax(0, 1fr); }
  .foot-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .foot-about { grid-column: 1 / -1; }
}
@media (max-width: 900px) {
  .nav-links { display: none; }
  .nav-burger { display: inline-grid; }
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g3, .audience, .price-grid, .onboard { grid-template-columns: minmax(0, 1fr); }
  .split, .feature, .feature.flip { grid-template-columns: minmax(0, 1fr); gap: var(--s6); }
  .feature.flip .feature-copy { order: 0; }
  .picks { grid-template-columns: minmax(0, 1fr); }
  .pick { border-right: 0; border-bottom: 1px solid var(--border); grid-template-columns: 140px minmax(0, 1fr); column-gap: var(--s3); }
  .pick:last-child { border-bottom: 0; }
  .pick-art { grid-row: span 4; align-self: start; }
  .bigstats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g-hero { grid-template-columns: minmax(0, 1fr); }
  .g-hero .g-art { order: -1; max-width: 460px; }
  .docs, .settings { grid-template-columns: minmax(0, 1fr); gap: var(--s4); }
  .docs-nav { position: static; max-height: none; border-bottom: 1px solid var(--border); padding-bottom: var(--s4); }
  .docs-nav .dn-group { display: flex; flex-wrap: wrap; gap: 4px; }
  .docs-nav a { margin-left: 0; border: 1px solid var(--border); }
}
@media (max-width: 640px) {
  .wrap { padding: 0 var(--s4); }
  h1 { font-size: var(--fs-28); }
  .hero { padding: var(--s10) 0 var(--s6); }
  .hero h1 { font-size: 32px; }
  .hero .lede { font-size: var(--fs-16); }
  .section { padding: var(--s12) 0; }
  .g2, .g4 { grid-template-columns: minmax(0, 1fr); }
  .pick { grid-template-columns: 104px minmax(0, 1fr); }
  .g-side { grid-template-columns: minmax(0, 1fr); }
  .shots { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .foot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cta-band { padding: var(--s6); }
  .toolbar .input { width: 100%; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat dd, .stat .v { font-size: var(--fs-18); }
  .bigstat .v { font-size: var(--fs-28); }
  .nav .wrap { gap: var(--s2); }
  .hide-sm { display: none !important; }
  .show-sm { display: block; }
  /* 40px touch targets on phones */
  .btn-sm, .input-sm, .select-sm { --h: 40px; height: 40px; }
  .chip, .seg button, .seg a { height: 38px; }
  .icon-btn { width: 40px; height: 40px; }
  .foot a, .crumbs a, details.tableview summary { min-height: 40px; display: inline-flex; align-items: center; }
  .tags .tag { height: 32px; }
  .pick { row-gap: 6px; }
  /* tables collapse to rows */
  .tbl-wrap.collapse { border: 0; border-radius: 0; overflow: visible; background: none; }
  .tbl.collapse thead { display: none; }
  .tbl.collapse, .tbl.collapse tbody, .tbl.collapse tr, .tbl.collapse td { display: block; }
  .tbl.collapse tr { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px 10px; padding: var(--s3) 0; border-bottom: 1px solid var(--border); }
  .tbl.collapse td { border: 0; padding: 0; background: none !important; min-width: 0; }
  .tbl.collapse td.rank, .tbl.collapse td.sm-hide { display: none; }
  .tbl.collapse td.sm-full { grid-column: 1 / -1; }
  .tbl.collapse td[data-label]::before { content: attr(data-label); display: block; font-size: 11px; color: var(--text-3); }
  .tbl.collapse td.r { text-align: left; }
  .tbl.collapse td.sm-corner { position: absolute; top: var(--s3); right: 0; }
  .tbl.collapse .gamecell { min-width: 0; padding-right: 48px; }
  .tbl.collapse tr.row-detail { display: block; }
  .tbl.collapse tbody tr:hover td { background: none; }
}
@media print { .nav, .foot, .toasts { display: none; } }

/* ===== Stackblade parts ===== */
.mark .e { stroke: var(--text-3); stroke-width: 2.2; stroke-linecap: round; fill: none; }
.mark .n { fill: var(--text); }
.mark .a { fill: var(--accent); }
a { text-decoration-color: color-mix(in srgb, var(--text) 25%, transparent); }
.strong { font-weight: 600; text-decoration: none; }
.strong:hover { text-decoration: underline; }
.sec { padding: var(--s10) 0 0; }
.sec + .sec { border-top: 1px solid var(--border); margin-top: var(--s10); }
.h-sub { font-size: var(--fs-14); margin: var(--s6) 0 var(--s3); color: var(--text); }
.lede-sm { font-size: var(--fs-16); color: var(--text-2); max-width: 760px; }
.fig { margin: var(--s4) 0 0; }
.fig.wide { margin-top: var(--s2); }
.figcap { font-size: var(--fs-12); color: var(--text-3); margin-top: var(--s2); max-width: 760px; }
.key-new { color: var(--series-2); font-weight: 600; }
.badge-new { background: color-mix(in srgb, var(--series-2) 14%, transparent); color: color-mix(in srgb, var(--series-2) 80%, var(--text)); border-color: transparent; }
.badge-xs { height: 17px; padding: 0 5px; font-size: 10.5px; }
.alert-info { border-color: color-mix(in srgb, var(--accent) 30%, transparent); background: var(--accent-soft); }
.alert-info > .i { color: var(--accent-text); }
.card-accent { border-color: color-mix(in srgb, var(--accent) 40%, var(--border)); background: var(--accent-soft); box-shadow: none; }
.card-accent h3 { display: flex; gap: 6px; align-items: center; }
.btn-primary { border-color: var(--accent); }
.fresh { display: inline-flex; align-items: center; gap: 4px; color: var(--text-3); font-size: var(--fs-12); }
.pending { font-size: var(--fs-13); font-weight: 500; color: var(--text-3); letter-spacing: 0; }

/* avatars and writer cells */
.av { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; background: var(--surface-2); flex: none; display: inline-block; vertical-align: middle; box-shadow: 0 0 0 1px var(--border); }
.av-i { display: inline-grid; place-items: center; font-weight: 650; color: var(--text-2); background: var(--surface-3); }
.wcell { display: flex; align-items: center; gap: 10px; min-width: 0; }
.wcell-t { min-width: 0; display: flex; flex-direction: column; }
.wcell-t > a, .wcell-t > b { color: var(--text); font-weight: 600; text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wcell-t > a:hover { text-decoration: underline; }
.wcell .sub { font-size: var(--fs-12); color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wcell-t { flex-direction: row; flex-wrap: wrap; align-items: center; column-gap: 4px; }
.wcell-t .sub { flex-basis: 100%; }
.vmark { color: var(--accent); display: inline-flex; }
.vmark.lg { vertical-align: -2px; }
.tbl td .wcell { min-width: 200px; max-width: 340px; }

/* lookup */
.lookup { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--s2); max-width: 620px; }
.lookup .form-msg { grid-column: 1 / -1; margin: 0; min-height: 0; }
.lookup-in { position: relative; display: block; }
.lookup-in .i { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--text-3); pointer-events: none; }
.lookup-in .input { padding-left: 34px; }
.lookup.big .input { height: 48px; font-size: var(--fs-16); padding-left: 40px; border-radius: var(--r-lg); }
.lookup.big .lookup-in .i { left: 14px; }
.lookup.big .btn { height: 48px; border-radius: var(--r-lg); }

/* landing */
.home .hero { padding: var(--s12) 0 var(--s10); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: var(--s10); align-items: start; }
.hero h1 { font-size: 42px; line-height: 1.1; letter-spacing: -0.028em; font-weight: 650; }
.hero .lede { font-size: 17px; }
.hero .hero-meta a { color: var(--text-2); }
.live-panel { border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--bg); box-shadow: var(--shadow-md); overflow: hidden; }
.live-h { display: flex; align-items: center; gap: var(--s2); padding: 10px var(--s4); border-bottom: 1px solid var(--border); background: var(--surface); font-size: var(--fs-13); }
.live-list { list-style: none; margin: 0; padding: 4px var(--s4); }
.live-list li { display: flex; align-items: center; gap: var(--s3); padding: 9px 0; border-bottom: 1px solid var(--border); }
.live-list li:last-child { border-bottom: 0; }
.live-list .lr { width: 16px; color: var(--text-3); font-size: var(--fs-12); font-variant-numeric: tabular-nums; flex: none; }
.live-list .wcell { flex: 1; }
.live-list .lv { margin-left: auto; text-align: right; display: grid; font-variant-numeric: tabular-nums; }
.live-list .lv b { color: color-mix(in srgb, var(--series-2) 80%, var(--text)); font-size: var(--fs-16); }
.live-f { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 42px; border-top: 1px solid var(--border); font-size: var(--fs-13); font-weight: 550; color: var(--text); text-decoration: none; background: var(--surface); }
.live-f:hover { background: var(--surface-2); }
.bigstats { margin: var(--s12) 0 0; padding-top: var(--s8); border-top: 1px solid var(--border); }
.bigstat dd { margin: 0; }
.bigstat dt { font-weight: 400; }
.feature .shot { min-width: 0; }
.feature.wide { grid-template-columns: minmax(0, 1fr); gap: var(--s5); }
.feature.wide .feature-copy { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 4fr); gap: 0 var(--s10); align-items: start; }
.feature.wide .feature-copy h3 { grid-column: 1 / -1; }
.feature.wide .feature-copy ul { margin-top: 2px; }
.feature.wide .feature-copy p:last-child { grid-column: 1; }
.hero-meta { display: block; }
@media (max-width: 900px) { .feature.wide .feature-copy { grid-template-columns: minmax(0, 1fr); } }
.shot .multiples.movers { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.steps .step p { font-size: var(--fs-14); }

/* writer page */
.w-hero { padding: var(--s8) 0 var(--s5); }
.w-head { display: flex; align-items: center; gap: var(--s4); flex-wrap: wrap; }
.w-head > .av { width: 72px; height: 72px; }
.w-id { flex: 1; min-width: 240px; }
.w-id h1 { font-size: var(--fs-36); }
.w-sub { margin: 6px 0 0; color: var(--text-2); display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: center; }
.w-sub a { color: var(--text-2); }
.w-actions { display: flex; flex-wrap: wrap; gap: var(--s2); }
.w-actions .menu button .badge { margin-left: auto; }
.w-answer { font-size: var(--fs-18); line-height: 1.55; margin: var(--s5) 0 var(--s2); max-width: 860px; color: var(--text); }
.w-hero .alert { margin-top: var(--s4); }
dl.stats.stats-8 { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: var(--s8); }
.stat dd.d { margin: 2px 0 0; font-size: var(--fs-12); color: var(--text-3); display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.w-layout { padding-top: 0; }
.g-main > section > .alert { margin-bottom: var(--s4); }
.rec-cols { gap: var(--s8); margin-top: var(--s4); }
.rec-list { list-style: none; margin: 0; padding: 0; }
.rec-list li { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--border); font-size: var(--fs-13); }
.rec-list li .av { width: 24px; height: 24px; }
.rec-list .rl-t { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.rec-list .rl-t a { color: var(--text); font-weight: 550; text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rec-list .rl-t a:hover { text-decoration: underline; }
.rec-list .sub { color: var(--text-3); font-size: var(--fs-12); }
details.more summary { cursor: pointer; min-height: 36px; display: inline-flex; align-items: center; font-size: var(--fs-13); color: var(--text-2); }
.timeline .dot.new { border-color: var(--series-2); background: color-mix(in srgb, var(--series-2) 25%, var(--bg)); }
.timeline .dot.acc { border-color: var(--accent); background: var(--accent); }
.mini-list img.av, .notif img.av { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; }
.mini-list .wcell { flex: 1; min-width: 0; }
.mini-list .r .av { width: 20px; height: 20px; margin-left: -6px; box-shadow: 0 0 0 2px var(--bg); }

/* charts */
.chart .line { stroke: var(--series-1); }
.chart .area { fill: var(--series-1); opacity: .08; }
.chart .end-dot, .chart .hover-dot { fill: var(--series-1); }
.chart .bar { fill: var(--series-ctx); }
.chart .bar.hi { fill: var(--series-1); }
.chart.mini .bar { fill: var(--series-1); opacity: .55; }
.chart.mini .bar.hi { opacity: 1; fill: var(--series-2); }
.chart .bar.part { fill: transparent; stroke: var(--series-ctx); stroke-dasharray: 2 2; }
.chart.mini .part { fill: none; stroke: var(--border-strong); stroke-dasharray: 2 2; }
.chart text.val.sm { font-size: 10px; font-weight: 500; fill: var(--text-3); }
.chart g[data-tip]:hover .bar, .chart g[data-tip]:focus .bar { fill: var(--series-1); }
.chart g[data-tip]:focus { outline: none; }
.chart .future { fill: var(--surface); stroke: var(--border); stroke-dasharray: 3 3; }
.chart text.future-lab { fill: var(--text-3); font-size: 12px; }
.chart .ev-dot { fill: var(--bg); stroke: var(--accent); stroke-width: 2; }
.chart-tip.float { position: absolute; z-index: 70; white-space: normal; max-width: 280px; }
.spark path.l { stroke: var(--series-1); }
.spark circle { fill: var(--series-1); }
/* network */
.net-box { overflow: hidden; }
.net .edge { fill: none; stroke: var(--series-ctx); stroke-width: 1.4; opacity: .7; }
.net .edge.new { stroke: var(--series-2); opacity: 1; stroke-width: 1.8; }
.net .arr { fill: var(--series-ctx); }
.net .arr.new { fill: var(--series-2); }
.net .node { fill: var(--text-2); stroke: var(--bg); stroke-width: 2; }
.net .node.untracked { fill: var(--series-ctx); }
.net .node.subject { fill: var(--series-1); stroke: var(--bg); stroke-width: 3; }
.net text.nlab { fill: var(--text); font-size: 12px; font-weight: 550; }
.net text.nsub { fill: var(--text-3); font-size: 10.5px; }
.net text.colh { fill: var(--text-3); font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.net text.slab { fill: var(--text); font-size: 13px; font-weight: 650; }
.net a { text-decoration: none; }
.net .nnode:hover .node, .net .nnode:focus .node { stroke: var(--text); }
.net .nnode:hover text.nlab { text-decoration: underline; }
.net .nnode:focus { outline: none; }
/* heatmap */
.heat-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--bg); }
.heat { border-collapse: separate; border-spacing: 2px; font-size: var(--fs-12); font-variant-numeric: tabular-nums; width: 100%; padding: 6px; }
.heat th { font-weight: 500; color: var(--text-3); padding: 2px 2px 6px; text-align: center; white-space: nowrap; font-size: 11px; }
.heat th .hs { display: block; color: var(--text-3); opacity: .8; }
.heat th.hw { text-align: left; padding-right: 10px; }
.heat tbody th.hw { font-size: var(--fs-13); max-width: 220px; overflow: hidden; text-overflow: ellipsis; padding: 0 10px 0 2px; }
.heat tbody th.hw a { color: var(--text); text-decoration: none; font-weight: 550; white-space: nowrap; }
.heat tbody th.hw a:hover { text-decoration: underline; }
.heat td { padding: 0; min-width: 34px; }
.heat .hc { display: grid; place-items: center; height: 26px; border-radius: 4px; font-weight: 600; font-size: 11.5px; }
/* Each step has its own ink so every number clears 4.5:1 in both themes. */
.hc.s7 { background: var(--seq-7); color: var(--ink-7); }
.hc.s6 { background: var(--seq-6); color: var(--ink-6); }
.hc.s5 { background: var(--seq-5); color: var(--ink-5); }
.hc.s4 { background: var(--seq-4); color: var(--ink-4); }
.hc.s3 { background: var(--seq-3); color: var(--ink-3); }
.hc.s2 { background: var(--seq-2); color: var(--ink-2); }
.hc.sx { background: transparent; box-shadow: inset 0 0 0 1px var(--border); }
.heat td.hm, .heat th.hm { text-align: right; padding-left: 10px; white-space: nowrap; min-width: 48px; font-size: var(--fs-12); }
.heat-legend { margin-top: var(--s2); }
.heat-legend .key { width: 18px; height: 12px; display: inline-block; border-radius: 3px; }
.heat.flow td { min-width: 40px; }
.heat.flow th span { display: inline-block; max-width: 64px; overflow: hidden; text-overflow: ellipsis; }
/* movers */
.multiples.movers { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.mover-h { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; min-width: 0; }
.mover-h .av { width: 28px; height: 28px; }
.mover-t { min-width: 0; }
.mover-t h3 { font-size: var(--fs-13); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mover-t .sub { display: block; font-size: 11.5px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mover .chart.mini { height: 56px; }
.mover .m-meta { margin: 6px 0 0; }
.mover .m-meta b { color: color-mix(in srgb, var(--series-2) 80%, var(--text)); }
/* feeds */
.day-h { font-size: var(--fs-13); color: var(--text-3); font-weight: 600; margin: var(--s6) 0 var(--s1); text-transform: uppercase; letter-spacing: .04em; }
.feed-list li .ic { color: var(--text-3); }
.feed-list li.rec .ic { color: color-mix(in srgb, var(--series-2) 85%, var(--text)); border-color: color-mix(in srgb, var(--series-2) 30%, var(--border)); }
.feed-list li.rank .ic { color: var(--accent-text); border-color: color-mix(in srgb, var(--accent) 30%, var(--border)); }
.notif a { font-weight: 550; }
.hbars { display: grid; gap: 4px; max-width: 760px; }
.hbar .track { background: var(--surface-2); }
.hbar .fill { background: var(--series-1); }
.hbar.inline { grid-template-columns: 1fr 52px; min-width: 140px; }
/* compare, vs, claim */
.filters-d > summary { display: none; }
@media (max-width: 640px) {
  .filters-d > summary { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 var(--s3); border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--surface); font-weight: 600; cursor: pointer; list-style: none; margin-bottom: var(--s2); }
  .filters-d > summary::-webkit-details-marker { display: none; }
}
.cmp-form { display: flex; gap: var(--s2); align-items: end; flex-wrap: wrap; max-width: 760px; }
.tbl.cmp th[scope="row"], .tbl.vs th[scope="row"] { font-size: var(--fs-13); color: var(--text-2); font-weight: 550; white-space: nowrap; background: var(--surface); position: static; height: auto; padding: 10px 12px; border-bottom: 1px solid var(--border); }
.tbl.cmp thead th { position: static; height: auto; padding: 10px 12px; }
.tbl.vs td { vertical-align: top; }
.claim-steps { padding-left: 20px; margin: 0 0 var(--s4); display: grid; gap: 10px; }
.claim-code { font-size: 16px; font-weight: 600; padding: 2px 8px; }
/* embed */
body.embed { padding: 0; background: transparent; }
.embed-card { display: grid; gap: 10px; max-width: 360px; padding: 14px 16px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg); color: var(--text); text-decoration: none; }
.ec-name { display: block; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ec-sub { display: block; font-size: 12px; color: var(--text-3); }
.ec-nums { display: flex; gap: 14px; font-size: 13px; color: var(--text-2); flex-wrap: wrap; }
.ec-nums b { color: var(--text); font-size: 16px; }
.ec-foot { font-size: 11px; color: var(--text-3); }
.ec-foot .brand { font-size: 12px; }
.ec-foot .brand svg { width: 16px; height: 16px; }
.embed-card .spark { width: 100%; height: 32px; }
/* misc */
.sg-swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.sg-swatches div { display: flex; gap: 8px; align-items: center; font-size: 12px; }
.sg-swatches span { width: 28px; height: 28px; border-radius: 6px; box-shadow: inset 0 0 0 1px var(--border); }
.timeline.cl > li { padding-bottom: var(--s8); }
.cl-h { font-size: var(--fs-18); margin: 4px 0 8px; }
.timeline.cl ul { margin: 0; padding-left: 18px; color: var(--text-2); }
.report-grid { gap: var(--s10); margin-top: var(--s10); }
.report-grid h2 { font-size: var(--fs-18); margin-bottom: 6px; }
html.compact .tbl td { padding-top: 6px; padding-bottom: 6px; }
.tbl td.num .up, .tbl td.num .down { font-weight: 550; }
.tbl th a.sort { color: inherit; text-decoration: none; display: inline-flex; align-items: center; gap: 4px; min-height: 36px; }
.tbl th a.sort:hover { color: var(--text); text-decoration: underline; }
.tbl th[aria-sort] a.sort { color: var(--text); }
.empty .lookup { margin-top: var(--s3); width: 100%; }

@media (max-width: 1100px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); }
  .live-panel { max-width: 640px; }
}
@media (max-width: 900px) {
  .stats-8 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rec-cols { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .hero h1 { font-size: 30px; }
  .w-id h1 { font-size: var(--fs-28); }
  .w-head > .av { width: 56px; height: 56px; }
  .w-answer { font-size: var(--fs-16); }
  .w-actions { width: 100%; }
  .w-actions .btn { flex: 1; }
  .lookup { grid-template-columns: minmax(0, 1fr); }
  .lookup .btn { width: 100%; }
  .shot .multiples.movers { grid-template-columns: minmax(0, 1fr); }
  .shot { padding: var(--s3); }
  .shot-bar { margin: calc(-1 * var(--s3)) calc(-1 * var(--s3)) var(--s3); }
  .tbl td .wcell { min-width: 0; max-width: none; }
  .tbl.collapse td.sm-corner { top: var(--s3); }
  .heat tbody th.hw { max-width: 120px; }
  .live-list .wcell .sub { max-width: 190px; }
  .tbl.cmp, .tbl.vs { font-size: var(--fs-13); }
  .rec-list li { min-height: 44px; }
}

/* Home modules */
.empty-note { margin: 0; padding: var(--s4); color: var(--text-2); font-size: var(--fs-14); line-height: 1.5; }
.live-list + .empty-note { padding-top: 0; font-size: var(--fs-12); }
.live-list .lv-l { display: grid; gap: 2px; min-width: 0; font-size: var(--fs-14); }
.live-list .lv-l .xs { color: var(--text-3); }
.vs { margin-top: var(--s4); }
@media (max-width: 760px) { .g3, .g2.vs { grid-template-columns: minmax(0, 1fr); } }
