/* Ad Growth dashboard. Colours are tokens; dark mode redefines them.
   Light values match the prototype; dark values follow the same ramps. */

:root {
  color-scheme: light;
  --bg: #f6f7f9;
  --surface: #ffffff;
  --surface-2: #f9fafb;
  --border: #e4e7ec;
  --border-strong: #d0d5dd;
  --ink: #0b0b0b;
  --ink-2: #52514e;
  --link: #1c5cab;
  --accent: #2a78d6;
  --accent-ink: #ffffff;
  --accent-wash: #e8f1fc;
  --good-bg: #e3f4e3;  --good-ink: #006300;
  --warn-bg: #fef0c7;  --warn-ink: #93370d;
  --bad-bg: #fee4e2;   --bad-ink: #b42318;
  --neutral-bg: #f2f4f7; --neutral-ink: #344054;
  --ink-3: #898781;
  --series-1: #2a78d6; --series-2: #eb6834; --series-3: #1baf7a; --series-4: #eda100; --series-5: #e87ba4;
  --series-other: #898781;
  --grid: #e1e0d9; --baseline: #c3c2b7;
  --status-good: #0ca30c; --status-warn: #fab219; --status-crit: #d03b3b;
  --seq-1: #e8f1fc; --seq-2: #cde2fb; --seq-3: #b7d3f6; --seq-4: #9ec5f4; --seq-5: #86b6ef; --seq-6: #6da7ec;
  --seq-ink: #0b0b0b;
  --shadow: 0 16px 40px rgba(16, 24, 40, 0.14);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0d0d0d;
    --surface: #1a1a19;
    --surface-2: #222221;
    --border: #2c2c2a;
    --border-strong: #383835;
    --ink: #f0efec;
    --ink-2: #c3c2b7;
    --link: #86b6ef;
    --accent: #3987e5;
    --accent-ink: #ffffff;
    --accent-wash: #1d2b3e;
    --good-bg: #13301a;  --good-ink: #7fd67f;
    --warn-bg: #3a2c0c;  --warn-ink: #f5c35a;
    --bad-bg: #3d1717;   --bad-ink: #f19191;
    --neutral-bg: #2c2c2a; --neutral-ink: #d7d6cf;
    --ink-3: #898781;
    --series-1: #3987e5; --series-2: #d95926; --series-3: #199e70; --series-4: #c98500; --series-5: #d55181;
    --series-other: #6e6d68;
    --grid: #2c2c2a; --baseline: #383835;
    --status-good: #0ca30c; --status-warn: #fab219; --status-crit: #d03b3b;
    --seq-1: #16243a; --seq-2: #184f95; --seq-3: #1c5cab; --seq-4: #256abf; --seq-5: #2a78d6; --seq-6: #3987e5;
    --seq-ink: #f0efec;
    --shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0d0d0d;
  --surface: #1a1a19;
  --surface-2: #222221;
  --border: #2c2c2a;
  --border-strong: #383835;
  --ink: #f0efec;
  --ink-2: #c3c2b7;
  --link: #86b6ef;
  --accent: #3987e5;
  --accent-ink: #ffffff;
  --accent-wash: #1d2b3e;
  --good-bg: #13301a;  --good-ink: #7fd67f;
  --warn-bg: #3a2c0c;  --warn-ink: #f5c35a;
  --bad-bg: #3d1717;   --bad-ink: #f19191;
  --neutral-bg: #2c2c2a; --neutral-ink: #d7d6cf;
  --ink-3: #898781;
  --series-1: #3987e5; --series-2: #d95926; --series-3: #199e70; --series-4: #c98500; --series-5: #d55181;
  --series-other: #6e6d68;
  --grid: #2c2c2a; --baseline: #383835;
  --status-good: #0ca30c; --status-warn: #fab219; --status-crit: #d03b3b;
  --seq-1: #16243a; --seq-2: #184f95; --seq-3: #1c5cab; --seq-4: #256abf; --seq-5: #2a78d6; --seq-6: #3987e5;
  --seq-ink: #f0efec;
  --shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
}

* { box-sizing: border-box; }

/* Anything marked hidden stays hidden, even when its class sets display
   (search results, chart tooltips, the columns panel). */
[hidden] { display: none !important; }

html, body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 15px;
}

a { color: var(--link); }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
.skip { position: absolute; left: -999px; top: 8px; }
.skip:focus { left: 8px; z-index: 50; background: var(--surface); padding: 8px 12px; }
.muted { color: var(--ink-2); }
.spacer { flex-grow: 1; }

/* ---------- top bar ---------- */

.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px;
  padding: 12px 24px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); min-height: 44px; }
.brand-mark {
  width: 32px; height: 32px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  background: var(--accent); color: var(--accent-ink); font-weight: 700; font-size: 13px;
}
.brand-name { font-weight: 700; font-size: 16px; }

.search { position: relative; flex: 1 1 280px; max-width: 520px; }
.search input, .field {
  width: 100%; height: 44px; padding: 0 14px;
  border: 1px solid var(--border-strong); border-radius: 10px;
  background: var(--surface-2);
}
.search-results {
  position: absolute; top: 50px; left: 0; right: 0; z-index: 40;
  display: flex; flex-direction: column; padding: 6px;
  background: var(--surface); border: 1px solid var(--border-strong);
  border-radius: 12px; box-shadow: var(--shadow);
}
.search-results a, .search-results p {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  min-height: 44px; padding: 8px 10px; margin: 0;
  border-radius: 8px; text-decoration: none; color: var(--ink);
}
.search-results a:hover, .search-results a:focus-visible { background: var(--accent-wash); }
.search-results .meta { font-size: 13px; color: var(--ink-2); }

.segmented {
  display: flex; overflow: hidden;
  border: 1px solid var(--border-strong); border-radius: 10px; background: var(--surface);
}
.segmented button {
  border: 0; background: transparent; padding: 0 14px; height: 40px; cursor: pointer;
  font-size: 14px; font-weight: 500;
}
.segmented button + button { border-left: 1px solid var(--border-strong); }
.segmented button[aria-pressed="true"] { background: var(--accent-wash); font-weight: 700; }

/* ---------- layout ---------- */

main {
  max-width: 1360px; margin: 0 auto; padding: 24px;
  display: flex; flex-direction: column; gap: 20px;
}
main:focus { outline: none; }

h1 { margin: 0; font-size: 26px; font-weight: 700; }
h2 { margin: 0; font-size: 18px; font-weight: 700; }
h3 { margin: 0; font-size: 15px; font-weight: 600; }
.page-head { display: flex; flex-direction: column; gap: 4px; }
.page-head p { margin: 0; }

.crumbs { display: flex; align-items: center; gap: 6px; font-size: 14px; color: var(--ink-2); }
.crumbs a { font-weight: 600; text-decoration: none; padding: 8px 4px; }
.crumbs .here { color: var(--ink); font-weight: 600; }

.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; padding: 18px 22px;
  display: flex; flex-direction: column; gap: 12px;
}
.card-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 8px; }
.note {
  margin: 0; padding: 12px 16px; border-radius: 10px;
  background: var(--accent-wash); font-size: 14px; line-height: 1.5;
}
.error { background: var(--bad-bg); color: var(--bad-ink); }

.grid-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }

.company-card {
  display: flex; flex-direction: column; gap: 12px;
  text-decoration: none; color: var(--ink);
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; padding: 18px 20px;
}
.company-card:hover { border-color: var(--border-strong); }
.company-card .title { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.company-card .name { font-size: 19px; font-weight: 700; }
.company-card .open { font-size: 14px; font-weight: 600; color: var(--link); }
.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.stat { display: flex; flex-direction: column; gap: 2px; background: var(--surface-2); border-radius: 8px; padding: 8px 10px; }
.stat .label { font-size: 12px; color: var(--ink-2); }
.stat .value { font-size: 16px; font-weight: 700; }

.pill {
  display: inline-block; font-size: 12px; font-weight: 700;
  padding: 3px 10px; border-radius: 999px;
  background: var(--neutral-bg); color: var(--neutral-ink); white-space: nowrap;
}
.pill.good { background: var(--good-bg); color: var(--good-ink); }
.pill.warn { background: var(--warn-bg); color: var(--warn-ink); }
.pill.bad { background: var(--bad-bg); color: var(--bad-ink); }

/* ---------- toolbar and table ---------- */

.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.toolbar .field { flex: 1 1 260px; max-width: 360px; background: var(--surface); }

.table-card { padding: 0; overflow: hidden; gap: 0; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 760px; }
th {
  text-align: left; padding: 12px 16px;
  font-size: 12px; font-weight: 600; color: var(--ink-2);
  text-transform: uppercase; letter-spacing: 0.03em;
  background: var(--surface-2);
}
td { padding: 10px 16px; border-top: 1px solid var(--border); vertical-align: middle; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.app-cell { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); min-height: 44px; }
.app-cell .name { font-weight: 600; color: var(--link); }
.app-cell .sub { font-size: 12px; color: var(--ink-2); }
.empty { padding: 20px 16px; margin: 0; color: var(--ink-2); }

.icon {
  width: 36px; height: 36px; border-radius: 9px; flex-shrink: 0; object-fit: cover;
  display: flex; align-items: center; justify-content: center;
  background: var(--accent-wash); color: var(--link); font-weight: 700; font-size: 13px;
}
.icon.large { width: 56px; height: 56px; border-radius: 14px; font-size: 18px; }

/* ---------- app page ---------- */

.app-head { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 16px 24px; }
.app-head .info { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.app-head .line { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.kv { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; }
.kv div { background: var(--surface-2); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; }
.kv .label { font-size: 12px; color: var(--ink-2); }
.kv .value { font-size: 15px; font-weight: 600; overflow-wrap: anywhere; }

.placeholder {
  min-height: 120px; border: 1px dashed var(--border-strong); border-radius: 10px;
  display: flex; align-items: center; justify-content: center; padding: 16px;
  color: var(--ink-2); font-size: 14px; text-align: center;
}

@media (max-width: 640px) {
  .topbar { padding: 10px 16px; }
  main { padding: 16px; }
}

/* ---------- charts ---------- */

.chart { display: flex; flex-direction: column; gap: 10px; width: 100%; }
.chart-row { display: flex; gap: 8px; }
.chart-yaxis { position: relative; width: 44px; flex-shrink: 0; }
.chart-tick {
  position: absolute; right: 0; transform: translateY(-50%);
  font-size: 11px; color: var(--ink-2); font-variant-numeric: tabular-nums; white-space: nowrap;
}
.chart-plot { position: relative; flex: 1 1 auto; min-width: 0; outline-offset: 4px; touch-action: pan-y; }
.chart-plot.with-end-label { margin-right: 52px; }
.chart-grid { position: absolute; left: 0; right: 0; height: 1px; background: var(--grid); }
.chart-grid.base { background: var(--baseline); }
.chart-layer { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.chart-line { fill: none; stroke-width: 2px; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.chart-area { fill-opacity: 0.1; stroke: none; }
.chart-dot {
  position: absolute; width: 8px; height: 8px; border-radius: 6px;
  border: 2px solid var(--surface); transform: translate(-50%, -50%); pointer-events: none;
}
.chart-end-label {
  position: absolute; left: calc(100% + 10px); transform: translateY(-50%);
  font-size: 12px; font-weight: 600; white-space: nowrap;
}
.chart-ref { position: absolute; left: 0; right: 0; border-top: 1px solid var(--status-crit); }
.chart-ref-label, .chart-marker-label {
  position: absolute; font-size: 11px; font-weight: 600; color: var(--ink-2);
  background: var(--surface); padding: 0 4px; border-radius: 3px; white-space: nowrap; opacity: 0.92;
}
.chart-ref-label { right: 4px; transform: translateY(-120%); }
.chart-marker { position: absolute; top: 0; bottom: 0; border-left: 1px solid var(--ink-3); }
.chart-marker-label { top: 0; transform: translateX(6px); }
.chart-cross { position: absolute; top: 0; bottom: 0; border-left: 1px solid var(--ink-2); pointer-events: none; }
.chart-tip {
  position: absolute; top: 4px; z-index: 5; pointer-events: none; min-width: 140px;
  display: flex; flex-direction: column; gap: 4px; padding: 8px 10px;
  background: var(--surface); border: 1px solid var(--border-strong); border-radius: 8px; box-shadow: var(--shadow);
}
.tip-title { font-size: 11px; color: var(--ink-2); }
.tip-row { display: flex; align-items: center; gap: 8px; font-size: 12px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.tip-name { color: var(--ink-2); }
.key-line { width: 12px; height: 2px; border-radius: 1px; flex-shrink: 0; }
.key-box { width: 10px; height: 10px; border-radius: 2px; flex-shrink: 0; }
.chart-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12px; color: var(--ink-2); }
.chart-legend-item { display: flex; align-items: center; gap: 6px; }
.chart-xaxis { position: relative; height: 16px; }
.chart-xlabel { position: absolute; font-size: 11px; color: var(--ink-2); white-space: nowrap; }
.chart-bars { position: absolute; inset: 0; display: flex; align-items: flex-end; }
.chart-bar-group {
  flex: 1 1 0; height: 100%; display: flex; align-items: flex-end; justify-content: center; gap: 2px;
  border-radius: 4px; outline-offset: -2px;
}
.chart-bar-group.hover { background: color-mix(in srgb, var(--ink) 5%, transparent); }
.chart-bar { flex: 0 1 24px; max-width: 24px; border-radius: 4px 4px 0 0; }
.chart-bar.narrow { flex-basis: 12px; max-width: 12px; }
.chart-bar-labels { display: flex; }
.chart-bar-labels span { flex: 1 1 0; text-align: center; font-size: 11px; color: var(--ink-2); white-space: nowrap; }

.donut { display: flex; flex-wrap: wrap; align-items: center; gap: 20px; }
.donut-ring { position: relative; width: 168px; height: 168px; border-radius: 50%; flex-shrink: 0; }
.donut-hole {
  position: absolute; inset: 26px; border-radius: 50%; background: var(--surface);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
}
.donut-hole strong { font-size: 20px; }
.donut-hole span { font-size: 11px; color: var(--ink-2); }
.donut-legend { flex: 1 1 160px; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.donut-row { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto 44px; gap: 8px; align-items: center; font-size: 13px; }
.donut-row .muted { text-align: right; }
.donut-name { color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.spark { position: relative; display: inline-block; width: 96px; height: 30px; flex-shrink: 0; }
.spark svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.spark-line { fill: none; stroke-width: 1.5px; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.spark-dot {
  position: absolute; right: 0; width: 8px; height: 8px; border-radius: 6px;
  background: var(--accent); border: 2px solid var(--surface); transform: translate(50%, -50%);
}
.spark.wide { width: 100%; height: 44px; }

/* ---------- dashboard pieces ---------- */

.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; }
.kpi {
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
  padding: 16px 18px; display: flex; flex-direction: column; gap: 6px;
}
.kpi.inner { border-radius: 12px; }
.kpi .label { font-size: 13px; font-weight: 500; color: var(--ink-2); }
.kpi .line { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; }
.kpi .value { font-size: 28px; font-weight: 700; letter-spacing: -0.01em; }
.kpi .delta { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.up { color: var(--good-ink) !important; }
.down { color: var(--bad-ink) !important; }
.warn-text { color: var(--warn-ink) !important; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.tile { background: var(--surface-2); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; }
.tile .label { font-size: 12px; color: var(--ink-2); }
.tile .value { font-size: 17px; font-weight: 700; }
.tile .sub { font-size: 12px; color: var(--ink-2); }

.split { display: flex; flex-wrap: wrap; gap: 20px; }
.split > * { flex: 1 1 420px; min-width: 0; }
.split > .wide { flex: 3 1 520px; }
.split > .narrow { flex: 2 1 360px; }

.loader {
  max-width: 560px; width: 100%; margin: 40px auto; padding: 28px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 16px;
  display: flex; flex-direction: column; gap: 14px;
}
.progress { height: 6px; border-radius: 3px; background: var(--accent-wash); overflow: hidden; }
.progress > span { display: block; height: 6px; width: 0; background: var(--accent); border-radius: 3px; transition: width 0.2s; }
.step { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; padding: 10px 12px; background: var(--surface-2); border-radius: 8px; }
.step .state { font-weight: 600; color: var(--ink-2); }
.step .state.done { color: var(--good-ink); }
.step .state.active { color: var(--link); }
.step .state.failed { color: var(--bad-ink); }

.attention-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; padding: 12px 0; border-top: 1px solid var(--border); }
.attention-row .what { flex: 1 1 240px; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.attention-row .what .meta { font-size: 12px; color: var(--ink-2); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 38px; padding: 0 14px;
  border: 1px solid var(--border-strong); border-radius: 8px; background: var(--surface);
  font-size: 13px; font-weight: 600; color: var(--ink); text-decoration: none; cursor: pointer;
}
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }

.bar-list { display: flex; flex-direction: column; gap: 6px; }
.bar-item {
  display: grid; grid-template-columns: minmax(120px, 1.2fr) minmax(80px, 2fr); gap: 12px; align-items: center;
  min-height: 40px; text-decoration: none; color: var(--ink);
}
.bar-item .track { display: flex; align-items: center; gap: 8px; }
.bar-item .fill { height: 16px; min-width: 2px; background: var(--series-1); border-radius: 0 4px 4px 0; }
.bar-item .name { font-size: 14px; font-weight: 600; }
.bar-item .meta { display: block; font-size: 12px; color: var(--ink-2); font-weight: 400; }

.scatter { position: relative; height: 260px; flex: 1 1 auto; min-width: 0; }
.scatter-zone { position: absolute; background: color-mix(in srgb, var(--status-crit) 8%, transparent); }
.scatter-limit-x { position: absolute; top: 0; bottom: 0; border-left: 1px solid var(--status-crit); }
.scatter-limit-y { position: absolute; left: 0; right: 0; border-top: 1px solid var(--status-crit); }
.scatter-axis-x { position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--baseline); }
.scatter-axis-y { position: absolute; left: 0; top: 0; bottom: 0; width: 1px; background: var(--baseline); }
.scatter-label { position: absolute; font-size: 11px; font-weight: 600; color: var(--ink-2); white-space: nowrap; }
.scatter-dot {
  position: absolute; width: 28px; height: 28px; transform: translate(-50%, 50%);
  border: 0; padding: 0; background: transparent; cursor: pointer; display: flex; align-items: center; justify-content: center; z-index: 2;
}
.scatter-dot span { width: 12px; height: 12px; border-radius: 8px; border: 2px solid var(--surface); box-shadow: 0 0 0 1px var(--border-strong); }
.scatter-name { position: absolute; transform: translate(12px, 50%); font-size: 12px; font-weight: 600; white-space: nowrap; pointer-events: none; }
.legend-row { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 12px; color: var(--ink-2); align-items: center; }
.legend-row .dot { width: 10px; height: 10px; border-radius: 6px; display: inline-block; margin-right: 6px; vertical-align: -1px; }

.cohort { display: grid; grid-template-columns: 90px repeat(5, minmax(0, 1fr)); gap: 4px; font-size: 13px; align-items: center; font-variant-numeric: tabular-nums; }
.cohort .head { font-size: 12px; font-weight: 600; color: var(--ink-2); text-align: center; }
.cohort .cell { text-align: center; padding: 7px 0; border-radius: 4px; color: var(--seq-ink); }

.limit-card { border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.limit-card .big { font-size: 30px; font-weight: 700; }
.limit-track { position: relative; height: 10px; background: var(--surface-2); border-radius: 5px; }
.limit-track .fill { position: absolute; left: 0; top: 0; height: 10px; border-radius: 5px; }
.limit-track .mark { position: absolute; top: -4px; width: 2px; height: 18px; background: var(--ink); }

.review { border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; }
.review .stars { color: var(--warn-ink); letter-spacing: 2px; }
.reviews { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 12px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; overflow-wrap: anywhere; }

.segbar { display: flex; gap: 2px; height: 28px; }
.segbar span {
  min-width: 0; border-radius: 4px; display: flex; align-items: center; padding: 0 8px;
  font-size: 12px; font-weight: 700; color: #ffffff; white-space: nowrap; overflow: hidden;
}

.checks { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 18px; }
.checks label { display: flex; align-items: center; gap: 8px; font-size: 14px; min-height: 36px; cursor: pointer; }
.checks input { width: 18px; height: 18px; margin: 0; accent-color: var(--accent); }
.checks .group-label { width: 110px; font-weight: 700; font-size: 13px; }

.userbox { display: flex; align-items: center; gap: 8px; }
.userbox .who { font-size: 13px; color: var(--ink-2); }
.dot-status { width: 9px; height: 9px; border-radius: 5px; flex-shrink: 0; display: inline-block; }
.table-spark { width: 110px; height: 30px; }
.field.compact { flex: 0 0 auto; width: auto; max-width: none; height: 42px; }
.head-rating { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.head-rating strong { font-size: 26px; }
.kpi.bad-kpi .value { color: var(--bad-ink); }
.pill.admin { background: color-mix(in srgb, var(--series-5) 20%, transparent); color: var(--ink); }
.card.money { border-color: color-mix(in srgb, var(--series-5) 45%, var(--border)); }
.table-legend { padding: 12px 16px; border-top: 1px solid var(--border); }
.card h3 { margin-top: 4px; margin-bottom: 8px; }
.page-head-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 12px; }
.head-rating .btn { margin-top: 4px; }
