/* MVC Stream Observatory — dark diagnostics console.
   Layout follows the reference mockup: player + status rail on top,
   timelines in the middle, network log across the bottom. */

:root {
  --bg: #070910;
  --bg-2: #0a0e17;
  --panel: #0e131e;
  --panel-2: #121926;
  --panel-3: #172033;
  --line: #1c2536;
  --line-2: #27334a;
  --text: #e8eefb;
  --text-2: #b9c6dd;
  --muted: #8494af;
  --dim: #5d6b84;

  --green: #2fd47f;
  --green-bg: #0d2b1d;
  --green-line: #1c5c3c;
  --blue: #5aa9f8;
  --blue-bg: #0e2338;
  --purple: #a98bfa;
  --purple-bg: #1d1636;
  --amber: #f0b23e;
  --amber-bg: #2e2310;
  --red: #f87070;
  --red-bg: #2e1216;
  --cyan: #4fd3cf;

  --radius: 10px;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  background:
    radial-gradient(1200px 600px at 78% -10%, #101a2e 0%, transparent 60%),
    radial-gradient(900px 500px at 8% 0%, #0d1626 0%, transparent 55%),
    var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 13px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

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

.topbar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #0c1220 0%, #080c15 100%);
  position: sticky;
  top: 0;
  z-index: 40;
}

.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }

.brand .logo {
  width: 26px; height: 26px;
  display: grid; place-items: center;
  border-radius: 7px;
  background: linear-gradient(145deg, #16304a, #0e1c2e);
  border: 1px solid #23415f;
  color: var(--cyan);
  flex: none;
}

.brand h1 {
  font-size: 15px;
  font-weight: 620;
  letter-spacing: -0.01em;
  margin: 0;
  white-space: nowrap;
}

.badge {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.09em;
  padding: 3px 7px;
  border-radius: 5px;
  border: 1px solid var(--green-line);
  background: var(--green-bg);
  color: var(--green);
  flex: none;
}

.topbar .subtitle {
  color: var(--dim);
  font-size: 12px;
  border-left: 1px solid var(--line-2);
  padding-left: 14px;
  margin-left: 2px;
}

.topbar .spacer { flex: 1 1 auto; }

.live-clock {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-2);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 3px rgba(47, 212, 127, 0.16);
  flex: none;
}
.dot.stale { background: var(--amber); box-shadow: 0 0 0 3px rgba(240, 178, 62, 0.16); }
.dot.dead { background: var(--red); box-shadow: 0 0 0 3px rgba(248, 112, 112, 0.16); }

.btn {
  font: inherit;
  font-size: 11.5px;
  padding: 5px 10px;
  border-radius: 6px;
  border: 1px solid var(--line-2);
  background: var(--panel-2);
  color: var(--text-2);
  cursor: pointer;
  white-space: nowrap;
}
.btn:hover { background: var(--panel-3); color: var(--text); border-color: #34435e; }
.btn.primary { border-color: #2a5f8f; background: #10243a; color: #9fd0f7; }
.btn.primary:hover { background: #14304b; }
.btn:disabled { opacity: 0.45; cursor: default; }

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

.wrap { padding: 14px 18px 40px; max-width: 1760px; margin: 0 auto; }

.grid {
  display: grid;
  grid-template-columns: minmax(0, 1.82fr) minmax(340px, 1fr);
  gap: 14px;
  align-items: start;
}

.mid-row {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1.82fr) minmax(340px, 1fr);
  gap: 14px;
  align-items: start;
}

.card {
  background: linear-gradient(180deg, var(--panel-2) 0%, var(--panel) 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.card-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-bottom: 1px solid var(--line);
  background: #0b101a;
}

.card-head h2 {
  margin: 0;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
}

.card-head .head-actions { margin-left: auto; display: flex; gap: 6px; align-items: center; }

/* ---------- player ---------- */

.player-card { padding: 0; }

.player-frame {
  position: relative;
  background: #04060b;
  aspect-ratio: 16 / 9;
  display: block;
  width: 100%;
}

.player-frame video {
  width: 100%;
  height: 100%;
  display: block;
  background: #04060b;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(4, 6, 11, 0.82);
  color: var(--muted);
  font-size: 12.5px;
  text-align: center;
  padding: 20px;
  gap: 10px;
  align-content: center;
}

.player-overlay[hidden] { display: none; }

.player-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 14px;
  padding: 8px 12px;
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--text-2);
  font-variant-numeric: tabular-nums;
}

.player-meta .kv { display: inline-flex; gap: 5px; align-items: baseline; }
.player-meta .k { color: var(--dim); }
.player-meta .v { color: var(--text); }

.player-meta .tag {
  margin-left: auto;
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--cyan);
  border: 1px solid #1e4a52;
  background: #0b2224;
  padding: 2px 7px;
  border-radius: 4px;
}

.player-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 12px;
  border-top: 1px solid var(--line);
  background: rgba(11, 16, 26, 0.6);
  flex-wrap: wrap;
}

.toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  color: var(--text-2);
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}
.toggle input { accent-color: var(--green); cursor: pointer; margin: 0; }

.toggle-hint {
  font-size: 10.5px;
  color: var(--dim);
  line-height: 1.4;
}

/* ---------- status card ---------- */

.status-card .verdict {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 13px 14px;
}

.verdict-icon {
  width: 34px; height: 34px;
  border-radius: 50%;
  display: grid; place-items: center;
  flex: none;
  border: 1px solid var(--line-2);
  background: var(--panel-3);
  color: var(--muted);
  font-size: 17px;
  line-height: 1;
}

.verdict-text { min-width: 0; }
.verdict-text .h {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.verdict-text .s { font-size: 11px; color: var(--dim); margin-top: 1px; }

.status-card[data-status="HEALTHY"] .verdict-icon { background: var(--green-bg); border-color: var(--green-line); color: var(--green); }
.status-card[data-status="HEALTHY"] .verdict-text .h { color: var(--green); }
.status-card[data-status="WARNING"] .verdict-icon { background: var(--amber-bg); border-color: #5c4517; color: var(--amber); }
.status-card[data-status="WARNING"] .verdict-text .h { color: var(--amber); }
.status-card[data-status="DEGRADED"] .verdict-icon,
.status-card[data-status="DOWN"] .verdict-icon { background: var(--red-bg); border-color: #5c2228; color: var(--red); }
.status-card[data-status="DEGRADED"] .verdict-text .h,
.status-card[data-status="DOWN"] .verdict-text .h { color: var(--red); }
.status-card[data-status="UNVERIFIED"] .verdict-icon,
.status-card[data-status="UNKNOWN"] .verdict-icon { background: var(--purple-bg); border-color: #3a2d63; color: var(--purple); }
.status-card[data-status="UNVERIFIED"] .verdict-text .h,
.status-card[data-status="UNKNOWN"] .verdict-text .h { color: var(--purple); }

.reasons {
  list-style: none;
  margin: 0;
  padding: 0 14px 12px;
  display: grid;
  gap: 5px;
}
.reasons li {
  font-size: 11.5px;
  color: var(--amber);
  background: var(--amber-bg);
  border: 1px solid #4a3a13;
  border-radius: 6px;
  padding: 5px 8px;
  word-break: break-word;
}
.reasons li.crit { color: var(--red); background: var(--red-bg); border-color: #532026; }
.reasons:empty { display: none; }

.lane-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-top: 1px solid var(--line);
  font-size: 11.5px;
}
.lane-row .lane-name { color: var(--muted); min-width: 92px; }
.lane-pill {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid var(--line-2);
  color: var(--muted);
  background: var(--panel-3);
}
.lane-pill.HEALTHY { color: var(--green); background: var(--green-bg); border-color: var(--green-line); }
.lane-pill.WARNING { color: var(--amber); background: var(--amber-bg); border-color: #5c4517; }
.lane-pill.DEGRADED, .lane-pill.DOWN { color: var(--red); background: var(--red-bg); border-color: #5c2228; }
.lane-pill.UNVERIFIED, .lane-pill.UNKNOWN { color: var(--purple); background: var(--purple-bg); border-color: #3a2d63; }
.lane-note { color: var(--dim); font-size: 11px; margin-left: auto; }

/* ---------- viewer lag (origin vs player copy) ---------- */

.vantage {
  border-top: 1px solid var(--line);
  padding: 10px 14px 12px;
  background: rgba(14, 19, 30, 0.55);
}
.vantage[hidden] { display: none; }

.vantage.is-bad { background: rgba(46, 18, 22, 0.5); }
.vantage.is-warn { background: rgba(46, 35, 16, 0.45); }

.vantage-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 8px;
}

.vantage-title {
  font-size: 9.5px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--dim);
}

.vantage-verdict {
  margin-left: auto;
  font-size: 11px;
  font-weight: 600;
  color: var(--green);
}
.vantage.is-bad .vantage-verdict { color: var(--red); }
.vantage.is-warn .vantage-verdict { color: var(--amber); }

.vantage-body {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.vantage-label {
  font-size: 9.5px;
  color: var(--dim);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.vantage-value {
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--text);
  margin-top: 2px;
  font-variant-numeric: tabular-nums;
}
.vantage.is-bad .vantage-value#vantageLag { color: var(--red); }
.vantage.is-warn .vantage-value#vantageLag { color: var(--amber); }

.vantage-note {
  margin-top: 8px;
  font-size: 10.5px;
  color: var(--muted);
  line-height: 1.5;
  word-break: break-word;
}

/* ---------- detail rows ---------- */

.dl {
  margin: 0;
  padding: 4px 14px 12px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 4px 12px;
  font-size: 11.5px;
  border-top: 1px solid var(--line);
  padding-top: 10px;
}
.dl dt { color: var(--dim); white-space: nowrap; }
.dl dd {
  margin: 0;
  color: var(--text-2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.dl dd a { color: var(--blue); text-decoration: none; }
.dl dd a:hover { text-decoration: underline; }
.dl dd.mono { font-family: var(--mono); font-size: 11px; }

/* ---------- metrics ---------- */

.metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
}

.metric {
  background: var(--panel);
  padding: 9px 11px;
  min-width: 0;
}
.metric .label {
  font-size: 9.5px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.metric .value {
  font-family: var(--mono);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  color: var(--text);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.metric .value.ok { color: var(--green); }
.metric .value.warn { color: var(--amber); }
.metric .value.bad { color: var(--red); }
.metric .value.na { color: var(--dim); font-style: italic; font-size: 12px; }
.metric .sub { font-size: 10px; color: var(--dim); margin-top: 1px; }

/* ---------- timeline ---------- */

.timeline-card canvas {
  display: block;
  width: 100%;
  height: 168px;
}

.legend {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 7px 12px;
  border-top: 1px solid var(--line);
  font-size: 10.5px;
  color: var(--muted);
  flex-wrap: wrap;
}
.legend .item { display: inline-flex; align-items: center; gap: 5px; }
.legend .swatch { width: 9px; height: 9px; border-radius: 2px; flex: none; }

/* ---------- events ---------- */

.events {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 236px;
  overflow-y: auto;
  font-size: 11.5px;
}

.events li {
  display: grid;
  grid-template-columns: 62px 1fr;
  gap: 9px;
  padding: 6px 12px;
  border-bottom: 1px solid rgba(28, 37, 54, 0.7);
  align-items: baseline;
}
.events li:last-child { border-bottom: none; }

.events .t {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--dim);
  font-variant-numeric: tabular-nums;
}

.events .m { min-width: 0; }
.events .m .code {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 1px 5px;
  border-radius: 3px;
  margin-right: 6px;
  border: 1px solid var(--line-2);
  color: var(--muted);
  background: var(--panel-3);
  white-space: nowrap;
}
.events .m .msg { color: var(--text-2); word-break: break-word; }

.events li.level-critical .code { color: var(--red); background: var(--red-bg); border-color: #5c2228; }
.events li.level-critical .msg { color: #f3b3b3; }
.events li.level-warn .code { color: var(--amber); background: var(--amber-bg); border-color: #5c4517; }
.events li.level-warn .msg { color: #e8cf9e; }
.events li.level-info .code { color: var(--blue); background: var(--blue-bg); border-color: #2a5f8f; }
.events li.src-probe .m .code { border-style: dashed; }

.empty {
  padding: 18px 12px;
  color: var(--dim);
  font-size: 11.5px;
  text-align: center;
}

/* ---------- network log ---------- */

.net-card { grid-column: 1 / -1; }

.toolbar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}

.chips { display: flex; gap: 4px; }

.chip {
  font: inherit;
  font-size: 11px;
  padding: 4px 9px;
  border-radius: 5px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  white-space: nowrap;
}
.chip:hover { color: var(--text); background: var(--panel-3); }
.chip[aria-pressed="true"] {
  background: var(--panel-3);
  border-color: var(--line-2);
  color: var(--text);
}

.toolbar .sep { width: 1px; height: 18px; background: var(--line-2); margin: 0 4px; }
.toolbar .grow { flex: 1 1 auto; }

.table-wrap {
  max-height: 340px;
  overflow: auto;
}

table.log {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

table.log thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  text-align: left;
  font-size: 9.5px;
  font-weight: 650;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--dim);
  background: #0b101a;
  border-bottom: 1px solid var(--line);
  padding: 7px 10px;
  white-space: nowrap;
}

table.log tbody td {
  padding: 5px 10px;
  border-bottom: 1px solid rgba(28, 37, 54, 0.6);
  color: var(--text-2);
  vertical-align: baseline;
}
table.log tbody tr:hover td { background: rgba(23, 32, 51, 0.5); }

table.log td.time, table.log td.num { font-family: var(--mono); font-size: 10.5px; }
table.log td.req { font-family: var(--mono); font-size: 10.5px; max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
table.log td.hdr { font-family: var(--mono); font-size: 10px; color: var(--dim); max-width: 300px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.pill {
  display: inline-block;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 1.5px 6px;
  border-radius: 4px;
  border: 1px solid var(--line-2);
  white-space: nowrap;
}
.pill.m3u8 { color: var(--blue); background: var(--blue-bg); border-color: #2a5f8f; }
.pill.ts { color: var(--purple); background: var(--purple-bg); border-color: #3f3170; }
.pill.other { color: var(--muted); background: var(--panel-3); }
.pill.ok { color: var(--green); background: var(--green-bg); border-color: var(--green-line); }
.pill.bad { color: var(--red); background: var(--red-bg); border-color: #5c2228; }
.pill.warn { color: var(--amber); background: var(--amber-bg); border-color: #5c4517; }
.pill.lane-player { color: var(--cyan); background: #0b2224; border-color: #1e4a52; }
.pill.lane-probe { color: var(--amber); background: var(--amber-bg); border-color: #5c4517; }
.pill.na { color: var(--dim); background: transparent; border-style: dashed; }

.note {
  padding: 7px 12px;
  border-top: 1px solid var(--line);
  font-size: 10.5px;
  color: var(--dim);
  line-height: 1.5;
}
.note strong { color: var(--muted); font-weight: 600; }

.unavail { color: var(--dim); font-style: italic; }

/* ---------- login ---------- */

.login-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.login-card {
  width: min(380px, 100%);
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 24px;
}

.login-card h1 {
  margin: 0 0 4px;
  font-size: 16px;
  font-weight: 620;
}

.login-card p.sub {
  margin: 0 0 18px;
  font-size: 12px;
  color: var(--dim);
}

.login-card label {
  display: block;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}

.login-card input {
  width: 100%;
  font: inherit;
  font-size: 13px;
  padding: 9px 11px;
  border-radius: 7px;
  border: 1px solid var(--line-2);
  background: #080c14;
  color: var(--text);
  margin-bottom: 14px;
}
.login-card input:focus { outline: none; border-color: #2f6fa8; }

.login-card .btn { width: 100%; padding: 9px; font-size: 12.5px; }

.login-err {
  font-size: 11.5px;
  color: var(--red);
  background: var(--red-bg);
  border: 1px solid #532026;
  border-radius: 6px;
  padding: 7px 9px;
  margin-bottom: 12px;
}
.login-err[hidden] { display: none; }

@media (max-width: 1120px) {
  .grid, .mid-row { grid-template-columns: minmax(0, 1fr); }
  .net-card { grid-column: auto; }
  .topbar .subtitle { display: none; }
}

@media (max-width: 720px) {
  .wrap { padding: 10px; }
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .live-clock { font-size: 11px; }
}

/* ---------- independent area verdicts ---------- */

.area-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border-top: 1px solid var(--line);
}

.area {
  background: var(--panel);
  padding: 8px 11px;
  min-width: 0;
}

.area-head {
  display: flex;
  align-items: center;
  gap: 8px;
}

.area-name {
  font-size: 9.5px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}

.area-head .lane-pill { margin-left: auto; }

.area-note {
  font-size: 10px;
  color: var(--dim);
  margin-top: 3px;
  line-height: 1.4;
  word-break: break-word;
}

/* verdict pill colours for the OK/WARN/BAD/UNKNOWN vocabulary */
.lane-pill.OK { color: var(--green); background: var(--green-bg); border-color: var(--green-line); }
.lane-pill.WARN { color: var(--amber); background: var(--amber-bg); border-color: #5c4517; }
.lane-pill.BAD { color: var(--red); background: var(--red-bg); border-color: #5c2228; }
.lane-pill.UNKNOWN { color: var(--purple); background: var(--purple-bg); border-color: #3a2d63; }

/* overall card states keyed to the combined verdict */
.status-card[data-status="OK"] .verdict-icon { background: var(--green-bg); border-color: var(--green-line); color: var(--green); }
.status-card[data-status="OK"] .verdict-text .h { color: var(--green); }
.status-card[data-status="WARN"] .verdict-icon { background: var(--amber-bg); border-color: #5c4517; color: var(--amber); }
.status-card[data-status="WARN"] .verdict-text .h { color: var(--amber); }
.status-card[data-status="BAD"] .verdict-icon { background: var(--red-bg); border-color: #5c2228; color: var(--red); }
.status-card[data-status="BAD"] .verdict-text .h { color: var(--red); }
.status-card[data-status="UNKNOWN"] .verdict-icon { background: var(--purple-bg); border-color: #3a2d63; color: var(--purple); }
.status-card[data-status="UNKNOWN"] .verdict-text .h { color: var(--purple); }

/* ---------- snapshot ---------- */

.head-hint { text-transform: none; color: var(--dim); font-weight: 400; letter-spacing: 0; }

.snap-status {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 4px;
  border: 1px solid var(--line-2);
  color: var(--muted);
  background: var(--panel-3);
}
.snap-status.matched { color: var(--green); background: var(--green-bg); border-color: var(--green-line); }
.snap-status.skewed { color: var(--amber); background: var(--amber-bg); border-color: #5c4517; }
.snap-status.unpaired,
.snap-status.stale { color: var(--purple); background: var(--purple-bg); border-color: #3a2d63; }

.snap-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
}

.snap-col {
  background: var(--panel);
  padding: 8px 10px;
  min-width: 0;
}

.snap-label {
  font-size: 9px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.snap-value {
  font-family: var(--mono);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  color: var(--text);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.snap-value.ok { color: var(--green); }
.snap-value.warn { color: var(--amber); }
.snap-value.bad { color: var(--red); }
.snap-value.na { color: var(--dim); font-style: italic; font-size: 12px; }

.snap-sub { font-size: 9.5px; color: var(--dim); margin-top: 2px; font-variant-numeric: tabular-nums; }

.snap-note {
  padding: 7px 12px;
  border-top: 1px solid var(--line);
  font-size: 10.5px;
  color: var(--dim);
  line-height: 1.5;
  word-break: break-word;
}

/* ---------- playback progression ---------- */

.pb-meaning {
  padding: 8px 12px;
  font-size: 11px;
  color: var(--text-2);
  border-bottom: 1px solid var(--line);
}

.pb-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
}

.pb-cell { background: var(--panel); padding: 7px 10px; min-width: 0; }

.pb-label {
  font-size: 9px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---------- provenance badges ---------- */

.prov {
  display: inline-block;
  font-family: var(--mono);
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 0 3px;
  border-radius: 3px;
  border: 1px solid var(--line-2);
  vertical-align: middle;
  margin-left: 2px;
}
.prov-browser { color: var(--cyan); border-color: #1e4a52; background: #0b2224; }
.prov-probe { color: var(--amber); border-color: #5c4517; background: var(--amber-bg); }
.prov-inferred { color: var(--purple); border-color: #3f3170; background: var(--purple-bg); }
.prov-na { color: var(--dim); border-style: dashed; background: transparent; }

@media (max-width: 1120px) {
  .snap-grid, .pb-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- primary bug-report action ---------- */

.btn.bug-report {
  border-color: #2a5f8f;
  background: linear-gradient(180deg, #16375a, #10243a);
  color: #b6dcff;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.btn.bug-report:hover { background: linear-gradient(180deg, #1a4269, #133052); color: #d6ecff; border-color: #3a7ab5; }
.btn.bug-report:disabled { opacity: 0.55; }
.btn.bug-report.busy { position: relative; padding-left: 24px; }
.btn.bug-report.busy::before {
  content: '';
  position: absolute;
  left: 9px; top: 50%;
  width: 9px; height: 9px;
  margin-top: -4.5px;
  border: 1.5px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: obs-spin 0.7s linear infinite;
}
@keyframes obs-spin { to { transform: rotate(360deg); } }

/* ---------- recovery row ---------- */

.recovery-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-top: 1px solid var(--line);
  font-size: 11.5px;
  background: rgba(11, 16, 26, 0.5);
}
.recovery-row .lane-name { color: var(--muted); min-width: 68px; }
.recovery-row .lane-note { color: var(--dim); font-size: 11px; margin-left: auto; text-align: right; }
.recovery-row.active { background: rgba(46, 35, 16, 0.45); }
.recovery-row.exhausted { background: rgba(46, 18, 22, 0.5); }
.recovery-row.exhausted .lane-note { color: var(--red); }
.recovery-row.resumed { background: rgba(13, 43, 29, 0.5); }
