/* =====================================================================
   nightshift-analytics.css — Workers ▸ Analytics (NS-ANALYTICS v2.2).
   `.nsa-*` only. Semantic tokens only (--rt-*, --nsf-*): amber = in
   flight / measured-mix warning / below the crown floor; coral = failed.
   Green is NOT a rank colour here — yield green belongs to the Jobs
   board; rank is a badge and a bar in the accent. Podium cards are
   ns-card, not trophies. No animation beyond the 120ms hover the rest
   of the cockpit already uses.
   ===================================================================== */

.nsa-root { display: flex; flex-direction: column; gap: 16px; min-height: 0; }
.nsa-root > * { flex: 0 0 auto; }
.nsa-root.loading { opacity: 0.92; }
.nsa-mono { font-family: var(--mono); font-size: 9px; letter-spacing: 0.06em; }
.nsa-dim { color: var(--rt-fg-3); }
.nsa-warn { color: var(--rt-amber); }
.nsa-coral { color: var(--rt-coral, #d4576b); }
.nsa-empty {
  padding: 36px 16px; text-align: center; color: var(--rt-fg-3); font-size: 12px;
  background: var(--rt-bg-sunk); border: 1px dashed var(--rt-border); border-radius: 8px; margin: 10px;
  display: flex; flex-direction: column; align-items: center; gap: 8px; line-height: 1.5;
}
.nsa-empty-fatal { margin: 0; padding: 48px 20px; gap: 10px; }
.nsa-ghost-wide {
  width: auto; height: auto; padding: 8px 14px; gap: 8px; margin-top: 6px;
  font-family: var(--mono); font-size: 9px; letter-spacing: 0.1em; text-transform: uppercase;
}

/* ── header row: window chips + honesty note + refresh ───────────── */
.nsa-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.nsa-windows { display: inline-flex; gap: 4px; background: var(--rt-bg-sunk); border: 1px solid var(--rt-border); padding: 4px; border-radius: 8px; }
.nsa-windows .nsf-tab { color: var(--rt-fg-3); font-family: var(--mono); font-size: 9px; text-transform: uppercase; letter-spacing: 0.08em; border-radius: 6px; }
.nsa-windows .nsf-tab:hover { color: var(--rt-fg); background: var(--rt-bg-alt); }
.nsa-windows .nsf-tab.active { background: var(--rt-fg); color: var(--rt-bg); box-shadow: none; }
.nsa-topnote { font-size: 11px; color: var(--rt-fg-3); flex: 1 1 280px; text-align: right; line-height: 1.5; }
.nsa-actions { display: inline-flex; align-items: center; gap: 6px; }
.nsa-ghost {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; padding: 0; cursor: pointer;
  background: var(--rt-panel); border: 1px solid var(--rt-border); border-radius: 8px;
  color: var(--rt-fg-3); transition: border-color 120ms ease, color 120ms ease, background 120ms ease;
}
.nsa-ghost:hover { color: var(--rt-fg); border-color: var(--rt-border-strong); background: var(--rt-bg-alt); }
.nsa-ghost:focus-visible { outline: 2px solid var(--rt-accent); outline-offset: 2px; }

/* ── stat tiles: glyph + key, the number, one sub line ───────────── */
.nsa-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.nsa-tile {
  display: flex; flex-direction: column; gap: 8px; min-width: 0;
  padding: 16px 18px; text-align: left;
  background: var(--rt-panel); border: 1px solid var(--rt-border); border-radius: 10px;
  box-shadow: var(--rt-shadow);
}
.nsa-tile-k { display: flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 8px; letter-spacing: 0.15em; text-transform: uppercase; color: var(--rt-fg-3); }
.nsa-tile-g {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; border-radius: 6px; letter-spacing: 0;
  color: var(--rt-accent); background: color-mix(in srgb, var(--rt-accent) 14%, transparent);
}
.nsa-tile-go { margin-left: auto; color: var(--rt-fg-3); letter-spacing: 0; }
.nsa-tile-v { font-family: var(--mono); font-size: 28px; font-weight: 700; line-height: 1.05; letter-spacing: -0.03em; color: var(--rt-fg); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nsa-tile-s { font-family: var(--mono); font-size: 9px; color: var(--rt-fg-3); min-height: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nsa-tile-btn { cursor: pointer; font: inherit; color: inherit; transition: border-color 120ms ease, background 120ms ease; }
.nsa-tile-btn:hover { border-color: var(--rt-accent); background: color-mix(in srgb, var(--rt-accent) 6%, var(--rt-panel)); }
.nsa-tile-btn:focus-visible { outline: 2px solid var(--rt-accent); outline-offset: 2px; }
.nsa-tile-makes .nsa-tile-v { color: var(--rt-accent); }
.nsa-tile-spend .nsa-tile-v { color: var(--rt-amber); }
.nsa-tile-spend .nsa-tile-g { color: var(--rt-amber); background: color-mix(in srgb, var(--rt-amber) 16%, transparent); }
.nsa-tile-makes .nsa-tile-g { color: var(--rt-accent); background: color-mix(in srgb, var(--rt-accent) 16%, transparent); }

/* ── podium: role-style cards, 2–3 wide, crown + stats + top three ─ */
.nsa-podium { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; align-items: start; }
.nsa-podium-card { padding: 0; gap: 0; min-width: 0; overflow: hidden; border-radius: 10px; transition: border-color 120ms ease, box-shadow 120ms ease; }
.nsa-podium-card:hover { border-color: var(--rt-border-strong); }
.nsa-podium-card.on { border-color: var(--rt-accent); box-shadow: var(--rt-shadow), inset 0 0 0 1px var(--rt-accent); }
.nsa-podium-hit {
  display: flex; flex-direction: column; gap: 8px; width: 100%; min-width: 0;
  padding: 14px 16px 12px; text-align: left; cursor: pointer;
  font: inherit; color: inherit; background: transparent; border: 0;
}
.nsa-podium-card.on .nsa-podium-hit { background: color-mix(in srgb, var(--rt-accent) 7%, transparent); }
.nsa-podium-hit:focus-visible { outline: 2px solid var(--rt-accent); outline-offset: -2px; }
.nsa-podium-k { display: flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 8px; letter-spacing: 0.15em; text-transform: uppercase; color: var(--rt-fg-3); }
.nsa-podium-ico {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; border-radius: 6px; flex: none; letter-spacing: 0;
  color: var(--rt-violet); background: color-mix(in srgb, var(--rt-violet) 16%, transparent);
}
.nsa-podium-top { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; flex: 1 1 auto; }
.nsa-podium-n { flex: none; letter-spacing: 0.06em; }
.nsa-podium-bar { text-transform: none; letter-spacing: 0.04em; }
.nsa-podium-bestk { font-family: var(--mono); font-size: 8px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--rt-fg-3); }
.nsa-podium-idrow { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; min-width: 0; }
.nsa-podium-id { font-size: 15px; font-weight: 600; color: var(--rt-fg); line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.nsa-podium-m { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-family: var(--mono); font-size: 9px; color: var(--rt-fg-3); }
.nsa-podium-metric { letter-spacing: 0.04em; }
.nsa-podium-score { font-family: var(--mono); font-size: 22px; font-weight: 700; letter-spacing: -0.03em; color: var(--rt-accent); line-height: 1; flex: none; }
.nsa-podium-scorebar { flex: 1 1 40px; min-width: 40px; max-width: 120px; }
.nsa-podium-more {
  display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%;
  padding: 7px 16px; border: 0; border-top: 1px solid var(--rt-border);
  background: var(--rt-bg-alt); color: var(--rt-fg-3); cursor: pointer;
  font-family: var(--mono); font-size: 8px; letter-spacing: 0.15em; text-transform: uppercase;
}
.nsa-podium-more:hover { color: var(--rt-fg); }
.nsa-podium-list { list-style: none; margin: 0; padding: 6px 8px 8px; border-top: 1px solid var(--rt-border); background: var(--rt-bg-alt); display: flex; flex-direction: column; gap: 2px; }
.nsa-podium-li {
  position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; width: 100%;
  padding: 7px 10px; border: 0; border-radius: 6px; background: transparent; color: inherit; cursor: pointer; text-align: left; font: inherit; overflow: hidden;
}
.nsa-podium-li:hover { background: color-mix(in srgb, var(--rt-accent) 10%, transparent); }
.nsa-podium-li-fill { position: absolute; inset: 0 auto 0 0; background: color-mix(in srgb, var(--rt-accent) 16%, transparent); pointer-events: none; border-radius: 6px; }
.nsa-podium-li-b { display: flex; flex-direction: column; gap: 1px; min-width: 0; position: relative; }
.nsa-podium-li-id { font-size: 12px; font-weight: 500; color: var(--rt-fg); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nsa-podium-li-n { font-family: var(--mono); font-size: 8px; color: var(--rt-fg-3); }
.nsa-podium-li-s { font-family: var(--mono); font-size: 12px; font-weight: 700; color: var(--rt-accent); min-width: 34px; text-align: right; position: relative; }

/* ── four-up mini stats (podium + inspector) ─────────────────────── */
.nsa-statstrip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.nsa-stat { min-width: 0; padding: 8px 8px 7px; background: var(--rt-bg-sunk); border: 1px solid var(--rt-border); border-radius: 6px; }
.nsa-stat-k { font-family: var(--mono); font-size: 8px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--rt-fg-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nsa-stat-v { font-family: var(--mono); font-size: 13px; font-weight: 700; color: var(--rt-fg); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nsa-stat.warn .nsa-stat-v { color: var(--rt-coral); }

/* ── rank badge + share bar — the two rank marks, both in the accent ── */
.nsa-rank {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; border-radius: 50%; flex: none; position: relative;
  font-family: var(--mono); font-size: 9px; font-weight: 700; line-height: 1;
  color: var(--rt-fg-3); background: var(--rt-bg-sunk); border: 1px solid var(--rt-border);
}
.nsa-rank-1 { color: var(--rt-bg); background: var(--rt-fg); border-color: var(--rt-fg); }
.nsa-rank-2 { color: var(--rt-fg); background: color-mix(in srgb, var(--rt-accent) 26%, transparent); border-color: var(--rt-accent); }
.nsa-rank-3 { color: var(--rt-fg); background: color-mix(in srgb, var(--rt-accent) 12%, transparent); border-color: color-mix(in srgb, var(--rt-accent) 60%, transparent); }
.nsa-score { display: inline-flex; align-items: center; gap: 8px; justify-content: flex-end; }
.nsa-score-bar { display: inline-block; width: 56px; height: 5px; border-radius: 999px; background: var(--rt-border); overflow: hidden; vertical-align: middle; }
.nsa-score-bar > span { display: block; height: 100%; background: var(--rt-accent); border-radius: 999px; }
.nsa-score-v { min-width: 32px; text-align: right; }

/* ── axis underline tabs + value chips + rank-by ─────────────────── */
.nsa-axis { display: flex; flex-direction: column; gap: 10px; }
.nsa-axis-tabs {
  display: flex; flex-wrap: wrap; gap: 0;
  border-bottom: 1px solid var(--rt-border);
}
.nsa-axis-tab {
  appearance: none; background: transparent; border: 0; border-bottom: 2px solid transparent;
  padding: 10px 14px 9px; margin-bottom: -1px; cursor: pointer;
  font-family: var(--font); font-size: 13px; font-weight: 500; color: var(--rt-fg-3);
  transition: color 120ms ease, border-color 120ms ease;
}
.nsa-axis-tab:hover { color: var(--rt-fg); }
.nsa-axis-tab.on { color: var(--rt-accent); border-bottom-color: var(--rt-accent); font-weight: 600; }
.nsa-axis-tab:focus-visible { outline: 2px solid var(--rt-accent); outline-offset: -2px; border-radius: 4px; }
.nsa-plane-tabs { max-width: 100%; }
.nsa-values, .nsa-rank-row, .nsa-chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 11px; }
.nsa-rank-row { font-family: var(--mono); font-size: 9px; }
.nsa-rank-k { color: var(--rt-fg-3); letter-spacing: 0.1em; text-transform: uppercase; font-size: 8px; }
.nsa-crownline { display: inline-flex; align-items: center; gap: 6px; margin-left: 6px; color: var(--rt-fg-2); }
.nsa-crown-g { color: var(--rt-accent); display: inline-flex; }
.nsa-chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--mono); font-size: 9px; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 4px 10px; border-radius: 999px; cursor: pointer;
  background: var(--rt-bg-alt); border: 1px solid var(--rt-border); color: var(--rt-fg-2);
  transition: border-color 120ms ease, color 120ms ease, background 120ms ease;
}
.nsa-chip:hover { color: var(--rt-fg); border-color: var(--rt-border-strong); }
.nsa-chip.on { background: color-mix(in srgb, var(--rt-accent) 18%, transparent); border-color: var(--rt-accent); color: var(--rt-fg); font-weight: 700; }
.nsa-chip.muted { opacity: 0.6; }
.nsa-chip-id { text-transform: none; letter-spacing: 0.02em; }
.nsa-chip-n { font-size: 8px; color: var(--rt-fg-3); letter-spacing: 0.04em; padding-left: 6px; border-left: 1px solid var(--rt-border); }
.nsa-chip.on .nsa-chip-n { color: var(--rt-fg-2); border-left-color: color-mix(in srgb, var(--rt-accent) 40%, transparent); }

/* ── the leaderboard + inspector ─────────────────────────────────── */
.nsa-main { display: grid; grid-template-columns: minmax(0, 2.4fr) minmax(300px, 1fr); gap: 14px; align-items: start; }
.nsa-main-l { min-width: 0; }
.nsa-main-r { min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.nsa-lb { overflow: auto; border: 1px solid var(--rt-border); border-radius: 10px; background: var(--rt-panel); box-shadow: var(--rt-shadow); }
.nsa-lb-h {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  padding: 12px 14px 10px; border-bottom: 1px solid var(--rt-border); position: sticky; top: 0; z-index: 2;
  background: var(--rt-panel);
}
.nsa-lb-title { font-size: 14px; font-weight: 600; color: var(--rt-fg); }
.nsa-lb-sub { font-family: var(--mono); font-size: 9px; letter-spacing: 0.06em; color: var(--rt-fg-3); }
.nsa-table { font-size: 11px; }
.nsa-table th { padding: 8px; background: var(--rt-panel); }
.nsa-lb .nsa-table th { position: sticky; top: 0; z-index: 1; box-shadow: inset 0 -1px 0 var(--rt-border); }
.nsa-lb-h + .nsa-table th { top: 41px; }
.nsa-table td { padding: 9px 8px; vertical-align: middle; }
.nsa-table .nsa-c-num { text-align: right; white-space: nowrap; }
.nsa-table .nsa-c-rank { width: 28px; padding-right: 0; }
.nsa-table .nsa-c-score { font-weight: 700; color: var(--rt-fg); }
.nsa-table .nsa-c-model { min-width: 200px; }
.nsa-table .nsa-c-fam { color: var(--rt-fg-3); }
.nsa-table .nsa-c-models { font-family: var(--mono); font-size: 9px; max-width: 420px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nsa-row { cursor: pointer; }
.nsa-row > td { transition: background 120ms ease; }
.nsa-row:hover td { background: color-mix(in srgb, var(--rt-accent) 6%, transparent); }
.nsa-row.on td { background: color-mix(in srgb, var(--rt-accent) 12%, transparent); }
.nsa-row.on > td:first-child { box-shadow: inset 2px 0 0 var(--rt-accent); }
.nsa-row:focus-visible { outline: 2px solid var(--rt-accent); outline-offset: -2px; }
.nsa-row.muted td { color: var(--rt-fg-3); }
.nsa-row.muted .nsa-model-id { color: var(--rt-fg-2); }
.nsa-lb-group + .nsa-lb-group .nsa-group-h td { border-top: 1px solid var(--rt-border-strong, var(--rt-border)); }
.nsa-group-h td { background: var(--rt-bg-alt); padding: 0; }
.nsa-group-hit {
  display: flex; align-items: center; gap: 10px; width: 100%; min-width: 0;
  padding: 8px 12px; border: 0; background: transparent; color: inherit; cursor: pointer; text-align: left; font: inherit;
}
.nsa-group-hit:hover { background: color-mix(in srgb, var(--rt-accent) 8%, transparent); }
.nsa-group-chev { font-family: var(--mono); font-size: 9px; color: var(--rt-fg-3); width: 10px; flex: none; }
.nsa-group-name { font-family: var(--mono); font-size: 9px; letter-spacing: 0.15em; text-transform: uppercase; color: var(--rt-fg); font-weight: 700; }
.nsa-group-meta { display: flex; flex-wrap: wrap; gap: 0 12px; margin-left: auto; font-family: var(--mono); font-size: 8px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--rt-fg-3); }
.nsa-model-id { display: block; font-family: var(--font); font-size: 12px; color: var(--rt-fg); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 360px; }
.nsa-model-sub { display: flex; align-items: center; gap: 6px; margin-top: 2px; min-width: 0; }
.nsa-model-path { font-family: var(--mono); font-size: 9px; color: var(--rt-fg-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 300px; }
.nsa-kind { display: inline-block; flex: none; font-family: var(--mono); font-size: 8px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--rt-fg-3); border: 1px solid var(--rt-border); border-radius: 999px; padding: 1px 6px; }
.nsa-n-chip { display: inline-block; flex: none; font-family: var(--mono); font-size: 8px; color: var(--rt-amber); border: 1px solid color-mix(in srgb, var(--rt-amber) 40%, transparent); border-radius: 999px; padding: 1px 6px; }
.nsa-lb-foot { padding: 6px 12px; border-top: 1px solid var(--rt-border); font-family: var(--mono); font-size: 8px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--rt-fg-3); }

/* ── inspector: title, meters, facts, fleets, spark, lanes, nights ── */
.nsa-insp { background: var(--rt-panel); border: 1px solid var(--rt-border); border-radius: 10px; padding: 16px; display: flex; flex-direction: column; gap: 14px; box-shadow: var(--rt-shadow); }
.nsa-insp-idle { justify-content: center; min-height: 180px; }
.nsa-insp-empty { display: flex; flex-direction: column; align-items: center; gap: 6px; color: var(--rt-fg-3); font-size: 12px; padding: 18px 8px; text-align: center; line-height: 1.5; }
.nsa-insp-empty-g { color: var(--rt-border-strong); display: flex; }
.nsa-insp-empty-t { font-size: 13px; font-weight: 600; color: var(--rt-fg-2); }
.nsa-insp-h { display: flex; flex-direction: column; gap: 6px; }
.nsa-insp-title { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.nsa-insp-id { font-size: 16px; font-weight: 600; color: var(--rt-fg); line-height: 1.3; word-break: break-word; min-width: 0; flex: 1 1 auto; }
.nsa-insp-score { font-family: var(--mono); font-size: 22px; font-weight: 700; letter-spacing: -0.03em; color: var(--rt-accent); line-height: 1; flex: none; }
.nsa-insp-close { flex: none; border: 0; background: transparent; padding: 2px 0; cursor: pointer; color: var(--rt-fg-3); font-family: var(--mono); font-size: 9px; letter-spacing: 0.08em; text-transform: uppercase; }
.nsa-insp-close:hover { color: var(--rt-fg); }
.nsa-insp-sub { color: var(--rt-fg-3); word-break: break-all; }
.nsa-insp-sec { display: flex; flex-direction: column; gap: 8px; }
.nsa-insp-k { font-family: var(--mono); font-size: 8px; letter-spacing: 0.15em; text-transform: uppercase; color: var(--rt-fg-3); }
.nsa-meter { display: flex; flex-direction: column; gap: 4px; }
.nsa-meter-h { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-size: 11px; color: var(--rt-fg-2); }
.nsa-meter-h b { font-family: var(--mono); font-size: 10px; font-weight: 700; color: var(--rt-fg); white-space: nowrap; }
.nsa-meter-bar { height: 5px; border-radius: 999px; background: var(--rt-border); overflow: hidden; }
.nsa-meter-bar > span { display: block; height: 100%; border-radius: 999px; background: var(--rt-accent); }
.nsa-meter-a .nsa-meter-bar > span { background: var(--rt-accent); }
.nsa-meter-b .nsa-meter-bar > span { background: var(--rt-violet); }
.nsa-meter-c .nsa-meter-bar > span { background: var(--rt-amber); }
.nsa-meter-d .nsa-meter-bar > span { background: var(--rt-cyan); }
.nsa-meter.warn .nsa-meter-bar > span { background: var(--rt-amber); }
.nsa-meter.warn .nsa-meter-h b { color: var(--rt-amber); }
.nsa-sigs { display: flex; flex-direction: column; gap: 10px; }
.nsa-sigs-col { display: flex; flex-direction: column; gap: 6px; }
.nsa-sigs-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.nsa-sig {
  display: inline-flex; align-items: center;
  font-size: 11px; line-height: 1.3; padding: 4px 10px; border-radius: 999px;
  border: 1px solid var(--rt-border); background: var(--rt-bg-alt); color: var(--rt-fg-2);
}
.nsa-sig-up { border-color: color-mix(in srgb, var(--rt-accent) 45%, transparent); color: var(--rt-fg); background: color-mix(in srgb, var(--rt-accent) 12%, transparent); }
.nsa-sig-dn { border-color: color-mix(in srgb, var(--rt-amber) 50%, transparent); color: var(--rt-amber); background: color-mix(in srgb, var(--rt-amber) 10%, transparent); }
.nsa-facts { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 12px; row-gap: 5px; margin: 0; padding: 10px 12px; font-size: 11px; background: var(--rt-bg-alt); border: 1px solid var(--rt-border); border-radius: 8px; }
.nsa-facts dt { font-family: var(--mono); font-size: 8px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--rt-fg-3); align-self: baseline; }
.nsa-facts dd { margin: 0; font-family: var(--mono); font-size: 10px; color: var(--rt-fg); text-align: right; }
.nsa-spark { display: flex; align-items: flex-end; gap: 2px; height: 28px; }
.nsa-spark > span { flex: 1 1 0; min-width: 3px; max-width: 14px; background: color-mix(in srgb, var(--rt-accent) 55%, var(--rt-fg-3)); border-radius: 1px; }
.nsa-nights { display: flex; flex-direction: column; gap: 4px; }
.nsa-night {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: 8px; cursor: pointer;
  background: var(--rt-bg-alt); border: 1px solid var(--rt-border); color: inherit; text-decoration: none;
  transition: border-color 120ms ease;
}
.nsa-night:hover { border-color: var(--rt-accent); }
.nsa-night:focus-visible { outline: 2px solid var(--rt-accent); outline-offset: 1px; }
.nsa-night-g { width: 20px; height: 20px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 10px; color: var(--rt-fg-3); border: 1px solid var(--rt-border); background: var(--rt-bg-sunk); }
.nsa-night.st-completed .nsa-night-g, .nsa-night.st-done .nsa-night-g { color: var(--rt-accent); border-color: color-mix(in srgb, var(--rt-accent) 50%, transparent); background: color-mix(in srgb, var(--rt-accent) 12%, transparent); }
.nsa-night.st-running .nsa-night-g, .nsa-night.st-open .nsa-night-g, .nsa-night.st-paused .nsa-night-g { color: var(--rt-amber); border-color: color-mix(in srgb, var(--rt-amber) 50%, transparent); }
.nsa-night.st-failed .nsa-night-g, .nsa-night.st-cancelled .nsa-night-g { color: var(--rt-coral); border-color: color-mix(in srgb, var(--rt-coral) 50%, transparent); }
.nsa-night-b { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.nsa-night-t { font-size: 11px; color: var(--rt-fg); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nsa-night-s { font-family: var(--mono); font-size: 8px; letter-spacing: 0.04em; color: var(--rt-fg-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nsa-night-n { font-family: var(--mono); font-size: 12px; font-weight: 700; color: var(--rt-accent); }
.nsa-lanecard { gap: 8px; }

/* ── volume by class: one stacked bar + legend, class ladder order ── */
.nsa-mix { display: flex; flex-direction: column; gap: 8px; padding: 14px 16px; background: var(--rt-panel); border: 1px solid var(--rt-border); border-radius: 10px; box-shadow: var(--rt-shadow); }
.nsa-mix-bar { display: flex; height: 7px; border-radius: 999px; overflow: hidden; background: var(--rt-border); gap: 1px; }
.nsa-mix-seg { display: block; height: 100%; min-width: 2px; }
.nsa-mix-legend { display: flex; flex-direction: column; gap: 2px; }
.nsa-mix-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 5px 6px; border: 0; border-radius: 6px; background: transparent; color: inherit; cursor: pointer; text-align: left; font: inherit; }
.nsa-mix-row:hover { background: color-mix(in srgb, var(--rt-accent) 8%, transparent); }
.nsa-mix-row.on { background: color-mix(in srgb, var(--rt-accent) 14%, transparent); }
.nsa-mix-dot { width: 8px; height: 8px; border-radius: 2px; }
.nsa-mix-l { font-size: 11px; color: var(--rt-fg-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nsa-mix-n { font-family: var(--mono); font-size: 10px; color: var(--rt-fg); }
.nsa-mix-0 { background: var(--rt-accent); }
.nsa-mix-1 { background: color-mix(in srgb, var(--rt-accent) 70%, var(--rt-fg-3)); }
.nsa-mix-2 { background: color-mix(in srgb, var(--rt-accent) 45%, var(--rt-fg-3)); }
.nsa-mix-3 { background: color-mix(in srgb, var(--rt-violet) 70%, var(--rt-fg-3)); }
.nsa-mix-4 { background: var(--rt-violet); }
.nsa-mix-5 { background: var(--rt-fg-3); }

/* ── lower strip: the supporting planes ──────────────────────────── */
.nsa-lower { display: flex; flex-direction: column; gap: 10px; border-top: 1px solid var(--rt-border); padding-top: 12px; }
.nsa-plane { display: flex; flex-direction: column; gap: 10px; font-size: 12px; }
.nsa-line { line-height: 1.55; color: var(--rt-fg-2); }
.nsa-line b { color: var(--rt-fg); }
.nsa-link { cursor: pointer; color: var(--rt-accent); }
.nsa-link:hover { text-decoration: underline; }
.nsa-lanes td { white-space: nowrap; }
.nsa-lb-plane { max-height: 46vh; }
.nsa-plane-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.nsa-plane-cell { display: flex; flex-direction: column; gap: 4px; min-width: 0; padding: 14px 16px; background: var(--rt-panel); border: 1px solid var(--rt-border); border-radius: 10px; color: inherit; text-decoration: none; }
.nsa-plane-cell-k { display: flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 8px; letter-spacing: 0.15em; text-transform: uppercase; color: var(--rt-fg-3); }
.nsa-plane-cell-v { font-family: var(--mono); font-size: 22px; font-weight: 700; line-height: 1.1; letter-spacing: -0.02em; color: var(--rt-fg); }
.nsa-plane-cell-u { font-size: 9px; font-weight: 500; color: var(--rt-fg-3); margin-left: 6px; }
.nsa-plane-cell-s { display: flex; flex-wrap: wrap; gap: 4px 10px; font-family: var(--mono); font-size: 9px; color: var(--rt-fg-3); }
.nsa-plane-link { cursor: pointer; transition: border-color 120ms ease; }
.nsa-plane-link:hover { border-color: var(--rt-accent); }
.nsa-plane-go { margin-left: auto; letter-spacing: 0; }

/* ── below the fit breakpoint: podium 1-wide, table above inspector ── */
@media (max-width: 979px) {
  .nsa-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nsa-podium { grid-template-columns: minmax(0, 1fr); }
  .nsa-statstrip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nsa-main { grid-template-columns: minmax(0, 1fr); }
  .nsa-topnote { text-align: left; }
  .nsa-axis-tab { padding: 10px 10px 9px; font-size: 12px; }
}

/* ── NS-JUDGE-ASSESS §11.4 — the quality ribbon and the judges table ── */
.nsa-ribbon-wrap { margin: 4px 0 10px; }
.nsa-ribbon { display: flex; height: 8px; border-radius: 4px; overflow: hidden; background: color-mix(in srgb, var(--rt-fg) 8%, transparent); }
.nsa-ribbon-seg { display: block; min-width: 2px; }
.nsa-ribbon-seg.tone-a { background: var(--rt-accent); }
.nsa-ribbon-seg.tone-c { background: var(--rt-amber); }
.nsa-ribbon-seg.tone-d { background: var(--rt-coral, #e06c75); }
.nsa-ribbon-legend { display: flex; gap: 12px; font-size: 11px; color: var(--rt-fg-3); margin-top: 4px; }
.nsa-judgetbl td, .nsa-judgetbl th { white-space: nowrap; }
