/* ═══════════════════════════════════════════════════════════════════════════
   cdp-console skin, v3 (2026-09-23 overhaul).

   Quiet chrome, loud data. Hierarchy comes from size, weight and space — not
   from boxes, pills and colour. One accent; status colours mean status only.

   Rules this file is built around (each was a reported defect):

   1. NO TYPEWRITER FONT, anywhere. A test asserts the stylesheet never names
      one. Identifiers get `.ident` (medium weight + tabular figures).
   2. NOTHING OVERFLOWS, and nothing breaks mid-word. Cells use
      `overflow-wrap: break-word`, which only breaks a token that cannot fit on
      its own line (a 64-char id) and — unlike `anywhere` — does not lower
      min-content, so "Standard" never renders as "Standar d". Wide tables sit
      in `.table-wrap`; low-priority columns hide by breakpoint (`.col-opt`).
   3. AXES ARE NAMED, AND THEIR LABELS ARE HTML. A viewBox scales text, so tick
      labels live in HTML around the SVG, positioned by `charts.py` percentages.

   Colours live ONLY in the two token blocks; a re-skin is a token edit.
   ═══════════════════════════════════════════════════════════════════════════ */

/* ═════════════════════════════ tokens — light (base) ══════════════════════ */
:root {
  color-scheme: light;
  --bg: #f6f7f9;
  --surface: #ffffff;
  --surface-2: #f3f4f6;
  --panel: #eceef2;        /* a section's tint: a shade darker than the page, cards sit on it white */
  --panel-border: #e1e4e9;
  --hover: #eef0f3;
  --border: #e4e6ea;
  --border-strong: #d3d6dc;
  --text: #14161a;
  --text-2: #4d535e;
  --muted: #737a86;
  --accent: #3b5bdb;
  --accent-2: #2f4ac0;
  --accent-soft: #eaeefc;
  --accent-fg: #ffffff;
  --pos: #177245;
  --pos-soft: #e5f4ec;
  --warn: #9a5b00;
  --warn-soft: #fcf1de;
  --neg: #c0342c;
  --neg-soft: #fce9e7;
  --info: #3b5bdb;
  --info-soft: #eaeefc;
  --s1: #3b5bdb;   /* primary series */
  --s2: #0e9384;   /* teal */
  --s3: #c77700;   /* amber */
  --s4: #8b5cd6;   /* violet */
  --grid: #eceef1;
  --shadow: 0 1px 2px rgba(20, 22, 26, 0.04);
  --r-l: 12px;
  --r-m: 8px;
  --r-s: 6px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* ═════════════════════════════ tokens — dark ══════════════════════════════ */
/* Light is the default everywhere (owner decision 2026-09-24): the OS dark preference is NOT
   followed. Dark stays available only as an explicit opt-in on <html data-theme="dark">. */
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0e0f12;
  --surface: #16181c;
  --surface-2: #1c1f24;
  --panel: #121418;
  --panel-border: #22262c;
  --hover: #22262c;
  --border: #272b31;
  --border-strong: #353a42;
  --text: #eceef1;
  --text-2: #b4b9c2;
  --muted: #8a909b;
  --accent: #7c96ff;
  --accent-2: #9aafff;
  --accent-soft: #1d2542;
  --accent-fg: #0e0f12;
  --pos: #4cc38a;
  --pos-soft: #13291e;
  --warn: #f0b45b;
  --warn-soft: #2e2413;
  --neg: #f2777a;
  --neg-soft: #33191a;
  --info: #7c96ff;
  --info-soft: #1d2542;
  --s1: #7c96ff;
  --s2: #3cc6b5;
  --s3: #f0b45b;
  --s4: #b494f2;
  --grid: #22262c;
  --shadow: none;
}

/* ═══════════════════════════════════ base ═════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; }
html { height: 100%; }
body {
  margin: 0; min-height: 100%;
  background: var(--bg); color: var(--text);
  font: 14px/1.45 var(--font);
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "cv11", "ss01";
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: 22px; font-weight: 650; letter-spacing: -0.015em; line-height: 1.25; }
h2 { font-size: 15px; font-weight: 600; letter-spacing: -0.005em; }
h3 { font-size: 13.5px; font-weight: 600; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.num, .kpi-value, .tile-value, td.num, th.num { font-variant-numeric: tabular-nums; }
.ident { font-weight: 500; font-variant-numeric: tabular-nums; overflow-wrap: break-word; }

/* ═══════════════════════════════════ shell ════════════════════════════════ */
.app { display: flex; min-height: 100vh; min-width: 0; }

.sidebar {
  position: sticky; top: 0; align-self: flex-start;
  width: 220px; flex-shrink: 0; height: 100vh;
  display: flex; flex-direction: column; gap: 2px;
  padding: 16px 12px;
  background: var(--surface); border-right: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 18px; font-weight: 650; font-size: 15px; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand-mark { width: 26px; height: 26px; border-radius: 7px; background: var(--accent); color: var(--accent-fg); display: grid; place-items: center; flex-shrink: 0; }
.brand-mark svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.brand-sub { color: var(--muted); font-weight: 500; }

.nav-group { display: flex; flex-direction: column; gap: 1px; }
.nav-group + .nav-group { margin-top: 14px; }
.nav-group-label { font-size: 11.5px; font-weight: 600; color: var(--muted); padding: 0 10px 6px; letter-spacing: 0.02em; }
.nav-item {
  display: flex; align-items: center; gap: 10px;
  height: 32px; padding: 0 10px; border-radius: var(--r-m);
  color: var(--text-2); font-weight: 500; font-size: 13.5px; white-space: nowrap;
}
.nav-item:hover { background: var(--hover); color: var(--text); text-decoration: none; }
.nav-item[aria-current="page"] { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.nav-item svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }

.sidebar-foot { margin-top: auto; display: flex; flex-direction: column; gap: 8px; }
.actor { display: flex; align-items: center; gap: 10px; padding: 12px 8px 0; border-top: 1px solid var(--border); }
.actor-email { font-weight: 500; font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.actor-meta { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.actor-meta .small { color: var(--muted); font-size: 12px; }
.avatar {
  width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0;
  background: var(--surface-2); color: var(--text-2); border: 1px solid var(--border);
  display: grid; place-items: center; font-weight: 600; font-size: 11px; text-transform: uppercase;
}
.avatar-lg { display: none; }

.main { flex-grow: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; gap: 12px;
  height: 56px; padding: 0 28px;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: 1px solid var(--border);
}
.content { flex-grow: 1; min-width: 0; width: 100%; max-width: 1440px; margin: 0 auto; padding: 24px 28px 48px; display: flex; flex-direction: column; gap: 20px; }
.content > * { min-width: 0; }

/* the lookup — the console's one verb, in the top bar on every page */
.lookup { display: flex; align-items: center; gap: 8px; flex: 1 1 auto; max-width: 640px; min-width: 0; }
.lookup .field { flex: 1 1 240px; min-width: 0; display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-m); }
.lookup .field:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.lookup .field label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.lookup .field svg { width: 16px; height: 16px; stroke: var(--muted); fill: none; stroke-width: 2; stroke-linecap: round; flex-shrink: 0; }
.lookup input { flex-grow: 1; min-width: 0; border: 0; outline: none; background: transparent; color: var(--text); font: 400 13.5px var(--font); }
.lookup input::placeholder { color: var(--muted); }
/* Suggestions under the lookup box (POST /suggest, L1-09 §11.5). */
.lookup .field { position: relative; }
.suggest { position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 50; }
.suggest:empty { display: none; }
.suggest-list { list-style: none; margin: 0; padding: 4px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-m); box-shadow: 0 8px 24px rgba(0, 0, 0, .12); max-height: 360px; overflow-y: auto; }
.suggest-list form { margin: 0; }
.suggest-item { display: flex; align-items: baseline; gap: 8px; width: 100%; padding: 7px 8px; border: 0; border-radius: 6px; background: transparent; color: var(--text); font: 400 13px var(--font); text-align: left; cursor: pointer; }
.suggest-item:hover, .suggest-item:focus { background: var(--accent-soft); outline: none; }
.suggest-kind { flex: 0 0 64px; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.suggest-label { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.suggest-detail { flex: 0 0 auto; font-size: 12px; color: var(--muted); }
.suggest-empty { padding: 10px 12px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-m); color: var(--muted); font-size: 12.5px; }

.data-label { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; background: var(--warn-soft); color: var(--warn); border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; margin-left: auto; }
.data-label::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* ═════════════════════════════════ buttons ════════════════════════════════ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 32px; padding: 0 12px; border-radius: var(--r-m);
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
  font: 500 13px var(--font); cursor: pointer; white-space: nowrap;
}
.btn:hover { background: var(--hover); text-decoration: none; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-fg); height: 36px; padding: 0 16px; font-weight: 600; }
.btn-primary:hover { background: var(--accent-2); border-color: var(--accent-2); }
.btn-secondary { background: transparent; }
.btn-block { width: 100%; }
.btn-sm { height: 28px; padding: 0 10px; font-size: 12.5px; }

/* ═════════════════════════════════ cards ══════════════════════════════════ */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-l); padding: 18px 20px; min-width: 0; box-shadow: var(--shadow); }
.card + .card { margin-top: 0; }
.card-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; row-gap: 2px; }
.card-head h2 { font-size: 14px; }
.card-meta { color: var(--muted); font-size: 12.5px; }
.card-body { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.card-body > .table { margin: 0; }
.card-flush { padding: 18px 0 6px; }
.card-flush > .card-head, .card-flush > .card-body, .card-flush > .card-foot, .card-flush > .pager { padding-left: 20px; padding-right: 20px; }
.card-flush .table th:first-child, .card-flush .table td:first-child { padding-left: 20px; }
.card-flush .table th:last-child, .card-flush .table td:last-child { padding-right: 20px; }
.card-foot { padding-top: 10px; color: var(--muted); font-size: 12px; }
.card-link { color: var(--muted); font-size: 12.5px; font-weight: 500; white-space: nowrap; }
.card-link:hover { color: var(--accent); text-decoration: none; }
.spacer { flex-grow: 1; }

.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: start; }
.grid-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.grid-2 > .card, .grid-3 > .card, .grid-cards > .card { margin: 0; }
.stack-v { display: flex; flex-direction: column; gap: 16px; min-width: 0; }

.section { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.section-title { font-size: 15px; font-weight: 600; }
.section-note { color: var(--muted); font-size: 12.5px; }

.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.toolbar-note { color: var(--muted); font-size: 12.5px; }

/* page header */
.page-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.page-header-main { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.page-title { font-size: 22px; font-weight: 650; letter-spacing: -0.015em; overflow-wrap: break-word; }
.page-subtitle { color: var(--muted); font-size: 13px; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.crumb { color: var(--muted); font-size: 12.5px; }
.crumb a { color: var(--muted); }

/* legacy header card (company / app pages) */
.hero { display: flex; flex-direction: column; gap: 18px; }
.hero-row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.hero-main { flex: 1 1 260px; min-width: 0; }
.hero-pills { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.hero-actions { display: flex; gap: 8px; flex-shrink: 0; }
.subject-line { color: var(--muted); font-size: 13px; margin-top: 4px; overflow-wrap: break-word; }
.standing { font-size: 13.5px; color: var(--text-2); }
.reading { font-size: 13.5px; color: var(--text-2); }

/* ═══════════════════════════ KPI strip (one card) ═════════════════════════ */
/* A row of numbers divided by hairlines inside ONE surface — not a row of
   grey boxes nested inside a white box. */
.kpi-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(148px, 1fr));
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-l);
  box-shadow: var(--shadow); overflow: hidden;
}
.kpi { padding: 14px 18px 14px; min-width: 0; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); margin: 0 -1px -1px 0; display: flex; flex-direction: column; gap: 2px; }
.kpi-label { font-size: 12.5px; color: var(--muted); font-weight: 500; display: flex; gap: 6px; align-items: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi-value { font-size: 24px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.2; white-space: nowrap; }
.kpi-value .unit { font-size: 13px; font-weight: 500; color: var(--muted); letter-spacing: 0; margin-left: 4px; }
.kpi-hint { color: var(--muted); font-size: 12px; overflow-wrap: break-word; }
.kpi-grid-lg .kpi-value { font-size: 26px; }
a.kpi { color: inherit; }
a.kpi:hover { background: var(--hover); text-decoration: none; }
.kpi .spark { margin-top: 6px; }
.kpi-bar { height: 4px; border-radius: 2px; background: var(--surface-2); margin-top: 8px; overflow: hidden; }
.kpi-bar > span { display: block; height: 100%; background: var(--s1); border-radius: 2px; }
.kpi-bar > span.warn { background: var(--warn); }
.delta { display: inline-flex; align-items: center; gap: 2px; font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; }
.delta.up { color: var(--pos); }
.delta.down { color: var(--neg); }
.delta.flat { color: var(--muted); }

/* ═════════════════════════════════ badges ═════════════════════════════════ */
/* A small tinted label with a dot. It never wraps, so its column is sized to
   fit it; the old 999px pill wrapped onto two lines in narrow cells. */
.pill, .badge {
  display: inline-flex; align-items: center; gap: 6px;
  height: 22px; padding: 0 8px; border-radius: var(--r-s);
  background: var(--surface-2); color: var(--text-2);
  font-weight: 500; font-size: 12px; line-height: 1; white-space: nowrap; vertical-align: middle;
}
.pill::before, .badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: 0.9; flex-shrink: 0; }
.pill.ok, .badge.ok { background: var(--pos-soft); color: var(--pos); }
.pill.err, .badge.err { background: var(--neg-soft); color: var(--neg); }
.pill.warn, .badge.warn { background: var(--warn-soft); color: var(--warn); }
.pill.info, .badge.info { background: var(--info-soft); color: var(--info); }
.pill.muted, .pill.neutral, .badge.muted { background: var(--surface-2); color: var(--muted); }
.pill-lg { height: 26px; padding: 0 10px; font-size: 12.5px; }
.tone-ok { color: var(--pos); }
.tone-warn { color: var(--warn); }
.tone-err { color: var(--neg); }
.tone-muted { color: var(--muted); }
.consent-row { display: flex; flex-wrap: wrap; gap: 6px; }

/* ═════════════════════════════════ tables ═════════════════════════════════ */
.table-wrap { overflow-x: auto; }
.table-scroll { max-height: 520px; overflow-y: auto; }
.table { border-collapse: collapse; width: 100%; font-size: 13.5px; }
.table th {
  text-align: left; font-size: 12px; color: var(--muted); font-weight: 500;
  padding: 8px 12px; border-bottom: 1px solid var(--border); white-space: nowrap;
}
.table td { padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; overflow-wrap: break-word; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: var(--hover); }
.table .num { text-align: right; white-space: nowrap; }
.table .nowrap { white-space: nowrap; }
.table-dense td, .table-dense th { padding: 7px 10px; font-size: 13px; }
.cell-sub { display: block; color: var(--muted); font-size: 12px; margin-top: 1px; }
.util { display: inline-block; width: 44px; height: 4px; border-radius: 2px; background: var(--surface-2); vertical-align: middle; margin-left: 8px; overflow: hidden; }
.util > span { display: block; height: 100%; background: var(--s1); }
.util > span.warn { background: var(--warn); }

/* key/value */
.table-kv { table-layout: fixed; }
.table-kv th { width: 132px; color: var(--muted); font-weight: 400; font-size: 13px; padding: 7px 0; border: 0; white-space: normal; vertical-align: top; }
.table-kv td { padding: 7px 0; border: 0; overflow-wrap: break-word; font-size: 13px; }
.table-kv tbody tr:hover td { background: transparent; }

.table-sortable th[data-sort] { cursor: pointer; user-select: none; }
.table-sortable th[data-sort]:hover { color: var(--text); }
.table-sortable th[aria-sort="ascending"]::after { content: " ↑"; }
.table-sortable th[aria-sort="descending"]::after { content: " ↓"; }

/* facts: a compact definition grid for the side column */
.facts { display: grid; grid-template-columns: minmax(96px, 38%) minmax(0, 1fr); column-gap: 12px; row-gap: 8px; margin: 0; font-size: 13px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; overflow-wrap: break-word; }

.kv-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.kv-list li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
.kv-list li:last-child { border-bottom: 0; }
.kv-list-name { font-weight: 500; overflow-wrap: break-word; }
.kv-list-note { color: var(--muted); font-size: 12px; }

/* ═════════════════════════════════ tabs ═══════════════════════════════════ */
.tabs { display: flex; flex-wrap: wrap; gap: 2px; border-bottom: 1px solid var(--border); }
.tab { height: 34px; padding: 0 12px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--muted); font: 500 13.5px var(--font); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; margin-bottom: -1px; }
.tab[aria-selected="true"] { color: var(--text); border-bottom-color: var(--accent); }
.tab-count { font-size: 11.5px; font-weight: 600; padding: 1px 6px; border-radius: 999px; background: var(--surface-2); color: var(--text-2); }
.tab-panel { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.tab-panel[hidden] { display: none; }
.tab-panel > .card { margin: 0; }

/* in-page anchor bar (the 360) */
.anchors { display: flex; gap: 2px; flex-wrap: wrap; border-bottom: 1px solid var(--border); }
.anchors a { height: 34px; display: inline-flex; align-items: center; padding: 0 10px; color: var(--muted); font-size: 13px; font-weight: 500; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.anchors a:hover { color: var(--text); text-decoration: none; border-bottom-color: var(--border-strong); }

/* ═══════════════════════════ banners / notes / misc ═══════════════════════ */
.banner { padding: 10px 14px; border-radius: var(--r-m); background: var(--surface-2); color: var(--text-2); font-size: 13px; overflow-wrap: break-word; border: 1px solid var(--border); }
.banner.warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.banner.err { background: var(--neg-soft); color: var(--neg); border-color: transparent; }
.banner.info { background: var(--info-soft); color: var(--info); border-color: transparent; }
.banner-title { font-weight: 600; }
.empty { padding: 20px; border-radius: var(--r-l); background: var(--surface); border: 1px dashed var(--border-strong); color: var(--muted); display: flex; flex-direction: column; gap: 2px; font-size: 13px; }
.empty strong { color: var(--text); font-weight: 600; }
.note { color: var(--muted); font-size: 12.5px; }
.strip { color: var(--muted); font-size: 12px; margin-top: 4px; overflow-wrap: break-word; }
.strip-row { display: flex; gap: 14px; flex-wrap: wrap; }
.data-note { color: var(--muted); font-size: 12px; padding-top: 4px; overflow-wrap: break-word; }
.muted { color: var(--muted); }
.faint { color: var(--muted); }
.small { font-size: 12.5px; }
.micro { font-size: 11.5px; }
.prose { max-width: 70ch; color: var(--text-2); }
.verdict { font-size: 13.5px; line-height: 1.55; color: var(--text-2); }
.sources { margin: 0; padding-left: 16px; color: var(--muted); font-size: 12px; }
.sources li { overflow-wrap: anywhere; }
.inline-list { display: flex; gap: 6px; flex-wrap: wrap; list-style: none; margin: 0; padding: 0; }
.tag { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: var(--r-s); background: var(--surface-2); color: var(--text-2); font-size: 12px; font-weight: 500; white-space: nowrap; }
.chips { display: flex; flex-wrap: wrap; gap: 4px; }
/* A clue key the CDP classifier said DECIDED its answer (the 360 Industry row). */
.tag.tag-evidence { background: var(--info-soft); color: var(--info); }
.shadow-industry { display: block; margin-top: 6px; }
.shadow-industry .chips { margin-top: 4px; }

.subject-link { display: inline; margin: 0; }
.subject-link button:not(.btn) {
  background: none; border: 0; padding: 0; color: var(--text); font: inherit; font-weight: 500; cursor: pointer;
  text-align: left; overflow-wrap: break-word;
}
.subject-link button:not(.btn):hover { color: var(--accent); text-decoration: underline; }

/* timeline */
.timeline { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 0 14px; }
.timeline .tl-d { color: var(--muted); font-size: 12.5px; padding: 8px 0; border-bottom: 1px solid var(--border); white-space: nowrap; font-variant-numeric: tabular-nums; }
.timeline .tl-e { padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 13px; display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.timeline .tl-e small { color: var(--muted); font-size: 12px; }
.timeline .tl-d:nth-last-child(2), .timeline .tl-e:last-child { border-bottom: 0; }
.tl-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--border-strong); flex-shrink: 0; align-self: center; }
.tl-dot.k-signup { background: var(--s1); }
.tl-dot.k-screen { background: var(--s2); }
.tl-dot.k-content, .tl-dot.k-app { background: var(--s4); }
.tl-dot.k-billing { background: var(--s3); }
.tl-dot.k-signal { background: var(--neg); }
.tl-dot.k-research { background: var(--muted); }

/* insights: the "what should I know" list at the top of the 360 */
.insights { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.insight { display: grid; grid-template-columns: 8px minmax(0, 1fr) auto; gap: 12px; align-items: baseline; padding: 9px 0; border-bottom: 1px solid var(--border); }
.insight:last-child { border-bottom: 0; }
.insight::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--muted); align-self: center; }
.insight.err::before { background: var(--neg); }
.insight.warn::before { background: var(--warn); }
.insight.ok::before { background: var(--pos); }
.insight.info::before { background: var(--info); }
.insight-text { font-size: 13.5px; }
.insight-text b { font-weight: 600; }
.insight-kind { color: var(--muted); font-size: 12px; white-space: nowrap; }

/* ═════════════════════════════ data health (/sync) ════════════════════════ */
/* One verdict card whose left edge and mark carry the tone; the word is the answer. */
.health-verdict { border-left: 4px solid var(--muted); display: flex; flex-direction: column; gap: 10px; }
.health-verdict.ok { border-left-color: var(--pos); }
.health-verdict.warn { border-left-color: var(--warn); }
.health-verdict.err { border-left-color: var(--neg); }
.health-verdict-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; row-gap: 6px; }
.health-verdict-mark { width: 12px; height: 12px; border-radius: 50%; background: var(--muted); flex-shrink: 0; }
.health-verdict.ok .health-verdict-mark { background: var(--pos); }
.health-verdict.warn .health-verdict-mark { background: var(--warn); }
.health-verdict.err .health-verdict-mark { background: var(--neg); }
.health-verdict-title { font-size: 18px; font-weight: 650; letter-spacing: -0.01em; }
.health-verdict.ok .health-verdict-title { color: var(--pos); }
.health-verdict.warn .health-verdict-title { color: var(--warn); }
.health-verdict.err .health-verdict-title { color: var(--neg); }
.health-verdict-count { color: var(--muted); font-size: 13px; }
.health-problems { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; font-size: 13.5px; color: var(--text); }
.health-problems li { overflow-wrap: break-word; }
.health-verdict-foot { font-size: 13.5px; color: var(--text-2); }
.lane-name { font-weight: 500; }
.lane-what { display: none; }
@media (max-width: 1024px) { .lane-what { display: block; } }
.health-queue { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 8px; }
.health-queue-cell { min-width: 0; }
.health-verify > summary { list-style: none; cursor: pointer; margin-bottom: 0; padding-bottom: 12px; }
.health-verify > summary::-webkit-details-marker { display: none; }
.health-verify > summary h2::after { content: " ▸"; color: var(--muted); font-weight: 400; }
.health-verify[open] > summary h2::after { content: " ▾"; }
.health-passing { padding: 8px 20px 0; }
.health-passing > summary { cursor: pointer; color: var(--muted); font-size: 12.5px; font-weight: 500; padding: 4px 0 8px; }
.health-passing .table td:first-child { padding-left: 0; }
.health-alerts p { color: var(--text-2); max-width: 80ch; }
/* verify names and details carry long unbroken tokens (freshness[cdp-derive-domains],
   last_run=2026-…); let them break anywhere so a phone row never scrolls */
.health-verify .ident, .health-verify td.small, .verify-detail { overflow-wrap: anywhere; }
.verify-detail { display: none; }
@media (max-width: 1200px) { .health-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 560px) {
  .verify-detail { display: block; }
  .health-lanes td, .health-lanes th { padding-left: 8px; padding-right: 8px; }
  .card-flush .health-lanes td:first-child, .card-flush .health-lanes th:first-child { padding-left: 14px; }
  .card-flush .health-lanes td:last-child, .card-flush .health-lanes th:last-child { padding-right: 14px; }
  .health-passing { padding-left: 12px; padding-right: 12px; }
}
/* the top-bar link, only rendered when the verdict is not All good */
.health-dot { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; margin-left: auto; background: var(--surface-2); color: var(--text-2); }
.health-dot::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.health-dot.warn { background: var(--warn-soft); color: var(--warn); }
.health-dot.err { background: var(--neg-soft); color: var(--neg); }
.health-dot:hover { text-decoration: none; filter: brightness(0.97); }
.health-dot + .data-label { margin-left: 0; }

/* ═════════════════════════════ onboarding rail ════════════════════════════ */
.milestones { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 0; }
.milestone { flex: 1 1 120px; min-width: 0; display: flex; flex-direction: column; gap: 3px; padding-right: 8px; }
.milestone-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--s1); }
.milestone.pending .milestone-dot { background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--border-strong); }
.milestone-label { font-weight: 500; font-size: 13px; }
.milestone.pending .milestone-label { color: var(--muted); }
.milestone-when { color: var(--muted); font-size: 12px; }
.milestone-gap { align-self: center; font-size: 11.5px; color: var(--muted); padding: 0 8px; white-space: nowrap; }

/* ═══════════════════════════════ meters ═══════════════════════════════════ */
.meters { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; }
.meter { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.meter-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; align-items: baseline; }
.meter-label { font-weight: 500; font-size: 13px; }
.meter-caption { color: var(--muted); font-size: 12px; }
.meter-track { height: 6px; border-radius: 3px; background: var(--surface-2); overflow: hidden; }
.meter-fill { display: block; height: 100%; border-radius: 3px; background: var(--s1); }
.meter-fill.warn { background: var(--warn); }
.meter-ends { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--muted); }

/* ═══════════════════════════════ bar lists ════════════════════════════════ */
.barlist { display: flex; flex-direction: column; gap: 8px; }
.bar-row { display: grid; grid-template-columns: minmax(0, 170px) minmax(0, 1fr) minmax(64px, auto); align-items: center; gap: 12px; }
.bar-name { font-size: 13px; font-weight: 500; overflow-wrap: break-word; min-width: 0; }
.bar-name a { color: var(--text); }
.bar-name a:hover { color: var(--accent); }
.bar-note { display: block; font-size: 11.5px; color: var(--muted); font-weight: 400; overflow-wrap: break-word; }
.bar-track { position: relative; height: 10px; border-radius: 3px; background: var(--surface-2); min-width: 0; }
.bar-fill { display: block; height: 100%; border-radius: 3px; background: var(--s1); }
.bar-row.is-seeded .bar-fill { background: var(--border-strong); }
.bar-marker { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--text-2); border-radius: 1px; }
.bar-value { font-variant-numeric: tabular-nums; color: var(--text-2); white-space: nowrap; font-size: 12.5px; text-align: right; }
.bar-scale { display: grid; grid-template-columns: minmax(0, 170px) minmax(0, 1fr) minmax(64px, auto); gap: 12px; padding-top: 6px; }
.bar-scale-track { grid-column: 2; position: relative; height: 26px; border-top: 1px solid var(--border); padding-top: 4px; min-width: 0; }
.bar-tick { position: absolute; top: 5px; transform: translateX(-50%); font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.bar-tick.is-first { transform: translateX(0); }
.bar-tick.is-last { transform: translateX(-100%); }
.bar-marker-label { position: absolute; top: 18px; transform: translateX(-50%); font-size: 11px; color: var(--text-2); font-weight: 600; white-space: nowrap; }
.bar-marker-label.is-start { transform: translateX(0); }
.bar-marker-label.is-end { transform: translateX(-100%); }

/* ═══════════════════════════ stacked route bar ════════════════════════════ */
.stack { display: flex; height: 26px; border-radius: var(--r-s); overflow: hidden; gap: 2px; }
.stack-seg { display: grid; place-items: center; font-size: 11.5px; font-weight: 600; min-width: 0; overflow: hidden; color: #fff; }
.stack-seg-asset { background: var(--s3); }
.stack-seg-playlist { background: var(--s2); }
.stack-seg-schedule { background: var(--s1); }

/* ═══════════════════════════════ big numbers ══════════════════════════════ */
.bignum-row { display: flex; flex-wrap: wrap; gap: 28px; }
.bignum { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.bignum-value { font-size: 24px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.15; font-variant-numeric: tabular-nums; }
.bignum-label { color: var(--muted); font-size: 12.5px; }

/* ═══════════════════════════════ login / error ════════════════════════════ */
.login { min-height: 100vh; display: grid; place-items: center; padding: 24px; width: 100%; }
.login-card { width: 400px; max-width: 100%; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-l); padding: 32px 28px; display: flex; flex-direction: column; gap: 16px; text-align: center; }
.login-card h1 { font-size: 20px; }
.gsi { display: flex; justify-content: center; }
.error-card { max-width: 640px; }
.error-card h1 { font-size: 20px; margin-bottom: 6px; }

/* ═══════════════════════════════ customer list ════════════════════════════ */
.filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px; }
.filter { display: flex; flex-direction: column; gap: 4px; min-width: 130px; }
.filter-label { font-size: 12px; color: var(--muted); font-weight: 500; }
.filter select {
  height: 32px; padding: 0 30px 0 10px; border-radius: var(--r-m); border: 1px solid var(--border);
  background-color: var(--surface); color: var(--text);
  font: 500 13px var(--font);
  appearance: none; -webkit-appearance: none; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 15px) 13px, calc(100% - 11px) 13px;
  background-size: 4px 4px, 4px 4px; background-repeat: no-repeat;
}
.filters .btn { height: 32px; }
.pager { display: flex; align-items: center; gap: 6px; padding: 12px 0 6px; flex-wrap: wrap; font-size: 12.5px; }
/* companies: the definition line and the three one-click questions */
.companies-def { margin: -4px 0 12px; max-width: 80ch; }
.quick-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 10px 0 14px; }
.seg { display: inline-flex; border: 1px solid var(--border); border-radius: var(--r-m); overflow: hidden; background: var(--surface); }
.seg a { padding: 0 10px; height: 28px; display: inline-flex; align-items: center; font-size: 12.5px; color: var(--text-2); border-left: 1px solid var(--border); }
.seg a:first-child { border-left: 0; }
.seg a[aria-current="true"] { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.seg a:hover { text-decoration: none; background: var(--hover); }

/* ═════════════════════════════════ charts ═════════════════════════════════ */
.chart-box { min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.chart-title { font-size: 13px; font-weight: 600; }
.chart-sub { color: var(--muted); font-size: 12px; }

.chart-frame { display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: auto auto auto auto; column-gap: 8px; }
.axis-title { font-size: 11px; font-weight: 500; color: var(--muted); }
.axis-y { grid-column: 1 / -1; grid-row: 1; padding-bottom: 4px; }
.axis-x { grid-column: 2; grid-row: 4; text-align: center; padding-top: 2px; }
.axis-left { text-align: left; }
.chart-ycol { grid-column: 1; grid-row: 2; position: relative; width: 40px; }
.chart-ytick { position: absolute; right: 0; transform: translateY(-50%); font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.chart-frame > .chart { grid-column: 2; grid-row: 2; }
.chart-xrow { grid-column: 2; grid-row: 3; position: relative; height: 18px; }
.chart-xtick { position: absolute; transform: translateX(-50%); font-size: 11px; color: var(--muted); white-space: nowrap; top: 3px; }
.chart-xtick.is-first { transform: translateX(0); }
.chart-xtick.is-last { transform: translateX(-100%); }

.chart { display: block; width: 100%; height: auto; overflow: visible; }
.chart-grid { stroke: var(--grid); stroke-width: 1; }
.chart-axis { stroke: var(--border-strong); stroke-width: 1; }
.chart-tickmark { stroke: var(--border-strong); stroke-width: 1; }
.chart-line { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; stroke: var(--s1); }
.chart-line-used, .chart-line-cumulative, .chart-line-mrr, .chart-line-s1 { stroke: var(--s1); }
.chart-line-reporting, .chart-line-online, .chart-line-s2 { stroke: var(--s2); }
.chart-line-s3 { stroke: var(--s3); }
.chart-line-s4 { stroke: var(--s4); }
.chart-line-licensed { stroke: var(--muted); stroke-width: 1.5; }
.chart-dashed { stroke-dasharray: 4 4; }
.chart-area { opacity: 0.10; fill: var(--s1); }
.chart-dot { fill: var(--s1); stroke: var(--surface); stroke-width: 2; }
.chart-dot-online, .chart-dot-reporting { fill: var(--s2); }
.chart-hit { fill: transparent; }
.chart-hit:hover { fill: var(--text); opacity: 0.05; }
.chart-empty { color: var(--muted); font-size: 13px; padding: 20px 0; }

.legend { display: flex; flex-wrap: wrap; gap: 14px; row-gap: 4px; color: var(--text-2); font-size: 12px; }
.legend .swatch { display: inline-block; width: 12px; height: 3px; border-radius: 2px; vertical-align: middle; margin-right: 6px; background: var(--s1); }
.legend .swatch-licensed { background: var(--muted); }
.legend .swatch-reporting, .legend .swatch-online, .legend .swatch-s2 { background: var(--s2); }
.legend .swatch-s3 { background: var(--s3); }
.legend .swatch-s4 { background: var(--s4); }
.legend .swatch-dashed { background: repeating-linear-gradient(90deg, var(--muted) 0 3px, transparent 3px 6px); }
.legend .swatch-playlist, .legend .swatch-schedule, .legend .swatch-asset { width: 10px; height: 10px; border-radius: 2px; }
.legend .swatch-asset { background: var(--s3); }
.legend .swatch-playlist { background: var(--s2); }
.legend .swatch-schedule { background: var(--s1); }

/* column chart (HTML bars in a chart-frame plot cell) */
.cols-frame > .cols { grid-column: 2; grid-row: 2; }
.cols { position: relative; display: flex; align-items: flex-end; gap: 3px; height: 160px; min-width: 0; border-bottom: 1px solid var(--border-strong); }
.cols::before { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(to top, var(--grid) 0 1px, transparent 1px 25%); pointer-events: none; }
.col { position: relative; flex: 1 1 0; background: var(--s1); border-radius: 3px 3px 0 0; min-height: 1px; min-width: 0; }
.col:hover { background: var(--accent-2); }
.col.is-partial { opacity: 0.45; }
.cols.cols-sm { height: 120px; }

.spark { display: block; overflow: visible; }
.spark-line { fill: none; stroke: var(--s1); stroke-width: 1.5; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.spark-line-alt { fill: none; stroke: var(--s2); stroke-width: 1.5; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.spark-area { fill: var(--s1); opacity: 0.08; }

.swatch-upsell_fit { color: var(--pos); }
.swatch-underutilized { color: var(--warn); }
.swatch-issue_flagged { color: var(--info); }
.swatch-critical_risk { color: var(--neg); }
.quadrant { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.queue-card { background: var(--surface-2); border-radius: var(--r-m); padding: 14px 16px; min-width: 0; }
.hist-frame > .histogram { grid-column: 2; grid-row: 2; }
.histogram { display: flex; align-items: flex-end; gap: 3px; height: 92px; min-width: 0; border-bottom: 1px solid var(--border-strong); }
.hist-bar { flex: 1 1 0; background: var(--s1); border-radius: 3px 3px 0 0; min-height: 2px; min-width: 0; }
.reasons { margin: 0; padding-left: 18px; color: var(--text-2); }

/* ════════════════════════════════ the 360 ═════════════════════════════════ */
.c360-head { display: flex; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.c360-title { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.c360-title h1 { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.c360-facts { color: var(--muted); font-size: 13px; display: flex; flex-wrap: wrap; gap: 4px 12px; }
.c360-facts span + span::before { content: "·"; margin-right: 12px; color: var(--border-strong); }
.c360-badges { display: flex; gap: 6px; flex-wrap: wrap; }
.c360-actions { display: flex; gap: 8px; flex-shrink: 0; align-items: center; }
.c360-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; }
.c360-main, .c360-side { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.c360-side .card { padding: 16px 18px; }
.anchor-target { scroll-margin-top: 72px; }
.link-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 7px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
.link-row:last-child { border-bottom: 0; }
.link-row .sys { display: flex; align-items: center; gap: 8px; min-width: 0; white-space: nowrap; }
.link-row .ok-mark { color: var(--pos); font-weight: 700; }
.link-row .no-mark { color: var(--muted); }
.link-row .ident { color: var(--text-2); font-size: 12.5px; text-align: right; }
.compare { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; }
.two-charts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }

/* portfolio */
.portfolio-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; }
.span-4 { grid-column: span 4; }
.span-5 { grid-column: span 5; }
.span-6 { grid-column: span 6; }
.span-7 { grid-column: span 7; }
.span-8 { grid-column: span 8; }
.span-12 { grid-column: span 12; }
.coverage-row { display: grid; grid-template-columns: minmax(0, 220px) minmax(0, 1fr) 64px; gap: 12px; align-items: center; font-size: 13px; padding: 6px 0; }
.coverage-row .bar-track { height: 8px; }
.coverage-row .bar-value { text-align: right; }

/* ── axis-tick thinning ─────────────────────────────────────────────────── */
@media (max-width: 1100px) {
  .chart-xtick:not(:first-child):not(:last-child):nth-child(even) { display: none; }
}
@media (max-width: 380px) {
  .chart-xtick:not(:first-child):not(:last-child) { display: none; }
  .bar-tick:not(.is-first):not(.is-last) { display: none; }
}

/* ═══════════════════════════════ responsive ═══════════════════════════════ */
@media (max-width: 1200px) {
  .c360-grid { grid-template-columns: minmax(0, 1fr); }
  .span-4, .span-5, .span-6, .span-7, .span-8 { grid-column: span 12; }
}
@media (max-width: 1024px) {
  .col-opt { display: none; }
}
/* Phone width: the list tables keep only name, status/count and money, so no row scrolls. */
@media (max-width: 560px) {
  .col-sm { display: none; }
}
@media (max-width: 1024px) {
  .two-charts { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 900px) {
  .app { flex-direction: column; }
  .sidebar {
    position: static; align-self: stretch; width: auto; max-width: 100%; height: auto;
    padding: 8px 12px; border-right: 0; border-bottom: 1px solid var(--border);
    flex-direction: row; align-items: center; gap: 6px; overflow-x: auto;
  }
  .brand { padding: 0 8px 0 0; flex-shrink: 0; }
  .nav-group { flex-direction: row; flex-shrink: 0; }
  .nav-group + .nav-group { margin: 0 0 0 8px; padding: 0 0 0 8px; border-left: 1px solid var(--border); }
  .nav-group-label { display: none; }
  .sidebar-foot { margin: 0 0 0 auto; flex-shrink: 0; }
  .actor { border-top: 0; padding-top: 0; }
  .actor-meta { display: none; }
  .topbar { position: static; padding: 0 16px; height: auto; min-height: 56px; flex-wrap: wrap; padding-top: 10px; padding-bottom: 10px; }
  .content { padding: 16px 16px 40px; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .table-kv th { width: 110px; }
}
@media (max-width: 560px) {
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lookup { max-width: none; flex-basis: 100%; }
  .data-label, .health-dot { margin-left: 0; }
  .milestones { flex-direction: column; }
  .milestone-gap { align-self: flex-start; padding: 2px 0 2px 2px; }
  .milestone { flex: 0 0 auto; padding: 0 0 12px; }
  .bar-row { grid-template-columns: minmax(0, 1fr) auto; }
  .bar-row .bar-name { grid-column: 1; grid-row: 1; }
  .bar-row .bar-value { grid-column: 2; grid-row: 1; }
  .bar-row .bar-track { grid-column: 1 / -1; grid-row: 2; }
  .bar-scale { grid-template-columns: minmax(0, 1fr); }
  .bar-scale-track { grid-column: 1; }
  .coverage-row { grid-template-columns: minmax(0, 1fr) 56px; }
  .coverage-row .bar-track { grid-column: 1 / -1; }
  .card { padding: 14px 16px; }
  .chart-xtick, .chart-ytick, .bar-tick { font-size: 10.5px; }
  .chart-ycol { width: 30px; }
  .kpi-value { font-size: 20px; }
}

@media print {
  .sidebar, .topbar, .btn { display: none !important; }
  .tab-panel[hidden] { display: flex; }
  .card { box-shadow: none; }
}

/* 360: company description + "Why Grok thinks this" (L1-09 §11.6). */
.company-description { margin: 4px 0 0; color: var(--text-2); font-size: 13px; line-height: 1.55; }
.reasoning { display: grid; gap: 8px; margin-top: 4px; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--r-m); background: var(--surface-2); }
.reasoning h3 { margin: 0; }
.reasoning p { margin: 0; font-size: 13px; line-height: 1.55; }
.reasoning .sources { display: flex; flex-wrap: wrap; gap: 6px 12px; margin: 0; padding: 0; list-style: none; font-size: 12.5px; }


/* ═════════════════════════ 360 v4 — tinted sections (2026-09-24) ═════════════════════════
   A section is a tinted panel with a heading; the cards inside it stay white. The tint is what
   groups things, so cards inside a panel carry no shadow and a lighter border. */
.panel { background: var(--panel); border: 1px solid var(--panel-border); border-radius: var(--r-l); padding: 14px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.panel-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; row-gap: 2px; padding: 2px 4px 0; }
.panel-head h2 { font-size: 13px; font-weight: 650; text-transform: uppercase; letter-spacing: .05em; color: var(--text-2); margin: 0; }
.panel-meta { color: var(--muted); font-size: 12.5px; }
.panel-foot { color: var(--muted); font-size: 12px; margin: 0; padding: 0 4px; }
.panel .card { box-shadow: none; border-color: var(--panel-border); }
.panel-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.panel-grid > .card:only-child { grid-column: 1 / -1; }
.card-head h3 { font-size: 13.5px; font-weight: 600; margin: 0; }
.mini-title { font-size: 12px; font-weight: 600; color: var(--text-2); margin-bottom: 6px; }
.c360-grid { gap: 16px; }
.c360-main { gap: 16px; }
.c360-side.panel { align-self: start; }
.c360-side .card { padding: 14px 16px; }
.anchors-sticky { position: sticky; top: 52px; z-index: 5; background: var(--bg); }
.more > summary { cursor: pointer; color: var(--accent); font-size: 12.5px; font-weight: 500; padding: 10px 0 2px; list-style: none; }
.more > summary::-webkit-details-marker { display: none; }

/* fleet right now */
.fleet-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-bottom: 12px; }
.fleet-stat { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: var(--r-m); background: var(--surface-2); }
.fleet-num { font-size: 22px; font-weight: 650; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.fleet-label { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.fleet-swatch { width: 8px; height: 8px; border-radius: 2px; background: var(--border-strong); }
.fleet-bar { display: flex; height: 10px; border-radius: 5px; overflow: hidden; gap: 2px; background: var(--surface-2); margin-bottom: 8px; }
.fleet-active .fleet-swatch, .fleet-seg.fleet-active { background: var(--pos); }
.fleet-quiet .fleet-swatch, .fleet-seg.fleet-quiet { background: var(--warn); }
.fleet-offline .fleet-swatch, .fleet-seg.fleet-offline { background: var(--neg); }
.fleet-never .fleet-swatch, .fleet-seg.fleet-never { background: var(--border-strong); }
.reading .muted { font-size: 12px; }

.facet-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; }

/* compact app list */
.applist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.applist-row { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
.applist-row:last-child { border-bottom: 0; }
.applist-name { min-width: 0; overflow-wrap: break-word; }
.applist-note { display: block; color: var(--muted); font-size: 11.5px; }
.applist-track { height: 6px; border-radius: 3px; background: var(--surface-2); overflow: hidden; }
.applist-fill { display: block; height: 100%; background: var(--s1); border-radius: 3px; }
.applist-row.is-seeded .applist-fill { background: var(--border-strong); }
.applist-value { color: var(--text-2); font-size: 12.5px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.stack-slim { display: flex; height: 8px; border-radius: 4px; overflow: hidden; gap: 2px; margin-bottom: 6px; }
.legend b { font-weight: 600; color: var(--text); }

/* activity */
.activity { display: flex; flex-direction: column; }
.act-month { font-size: 11.5px; font-weight: 650; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding: 12px 0 4px; border-bottom: 1px solid var(--border); }
.act-month:first-child { padding-top: 0; }
.act-row { display: grid; grid-template-columns: 52px 76px minmax(0, 1fr); gap: 10px; align-items: baseline; padding: 7px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
.act-row:last-child { border-bottom: 0; }
.act-day { color: var(--muted); font-size: 12.5px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.act-kind { justify-self: start; font-size: 11px; font-weight: 600; padding: 1px 7px; border-radius: 999px; background: var(--surface-2); color: var(--text-2); white-space: nowrap; }
.act-kind.k-billing { background: var(--warn-soft); color: var(--warn); }
.act-kind.k-screen, .act-kind.k-fleet { background: var(--pos-soft); color: var(--pos); }
.act-kind.k-app, .act-kind.k-content { background: var(--accent-soft); color: var(--accent); }
.act-kind.k-signal { background: var(--neg-soft); color: var(--neg); }
.act-text { min-width: 0; overflow-wrap: break-word; }
.act-note { color: var(--muted); font-size: 12px; margin-left: 8px; }

/* linked systems: name left, id right, the id wraps under instead of colliding */
.systems { display: flex; flex-direction: column; }
.sys-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 12px; padding: 7px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
.sys-row:last-child { border-bottom: 0; }
.sys-name { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.sys-name .ok-mark { color: var(--pos); font-weight: 700; }
.sys-name .no-mark { color: var(--muted); }
.sys-id { color: var(--text-2); font-size: 12.5px; min-width: 0; overflow-wrap: anywhere; margin-left: auto; text-align: right; }

/* the research reasoning is a disclosure now, not a wall of text */
details.reasoning { display: block; }
details.reasoning > summary { cursor: pointer; font-size: 12.5px; font-weight: 600; color: var(--text-2); list-style: none; }
details.reasoning > summary::before { content: "▸ "; color: var(--muted); }
details.reasoning[open] > summary::before { content: "▾ "; }
details.reasoning[open] > summary { margin-bottom: 8px; }

@media (max-width: 1100px) {
}
@media (max-width: 760px) {
  .panel-grid { grid-template-columns: minmax(0, 1fr); }
  .fleet-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .act-row { grid-template-columns: 48px minmax(0, 1fr); }
  .act-kind { display: none; }
  .anchors-sticky { position: static; }
}
