/* Anim Board: dark/gold playtest animation vetting hub (same DNA as Sound Board & Banter Board).
   Responsive from 1280x720 up to 32:9 ultrawide & 4K. */
:root {
  --bg: #121418;
  --bg2: #15181d;
  --panel: #1a1d23;
  --panel2: #20242b;
  --line: #2b3039;
  --line2: #363c47;
  --text: #e4e6ea;
  --muted: #939ca8;
  --faint: #626a76;
  --gold: #d4a24c;
  --gold2: #f0c674;
  --bad: #e5534b;
  --bad-bg: #2b1615;
  --bad-line: #6d2c28;
  --warn: #f0a030;
  --warn-bg: #2a2010;
  --warn-line: #6b4b17;
  --ok: #57ab5a;
  --ok-bg: #162618;
  --ok-line: #2d5a2f;
  --info: #6cb6ff;
  --info-bg: #13202e;
  --info-line: #2b4a6b;
  --radius: 8px;
  --side: 244px;
  font-size: 14px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body {
  margin: 0;
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  overflow: hidden;
}
a { color: var(--gold2); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, textarea, select { font: inherit; color: inherit; }

.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: 12px; }
.tiny { font-size: 11px; }
.mono { font-family: ui-monospace, Consolas, monospace; font-variant-numeric: tabular-nums; }
.row { display: flex; align-items: center; gap: 8px; }
.wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.right { margin-left: auto; }
.nowrap { white-space: nowrap; }

/* ------------------------------------------------------------------------------------------------ top bar */
#top {
  height: 54px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 16px;
  border-bottom: 1px solid var(--line);
  background: var(--bg2);
  position: sticky;
  top: 0;
  z-index: 25;
}
#top .brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 650;
  letter-spacing: 0.2px;
  color: var(--text);
  white-space: nowrap;
}
#top .brand:hover { text-decoration: none; color: var(--gold2); }
#top .brand img { width: 24px; height: 24px; }
#top .search { flex: 1; max-width: 380px; min-width: 150px; }
#top .search input {
  width: 100%;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 6px 14px;
  color: var(--text);
  outline: none;
}
#top .search input:focus { border-color: var(--gold); }

.tally-pill {
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--muted);
  white-space: nowrap;
}
.mode-pill {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--info-bg);
  border: 1px solid var(--info-line);
  color: #9ecbff;
  white-space: nowrap;
}
.job-pill {
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--warn-bg);
  border: 1px solid var(--warn-line);
  color: var(--gold2);
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.job-pill.done { background: var(--ok-bg); border-color: var(--ok-line); color: #9ae19e; }
.job-pill.failed { background: var(--bad-bg); border-color: var(--bad-line); color: #ff9b94; }
.pulse {
  width: 8px; height: 8px; border-radius: 50%; background: var(--gold2);
  animation: pulse 1.2s ease-in-out infinite;
}
@keyframes pulse { 0%,100% { opacity: 1; transform: scale(1); } 50% { opacity: .35; transform: scale(.75); } }

.btn {
  background: var(--panel2);
  border: 1px solid var(--line2);
  border-radius: 6px;
  padding: 5px 11px;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color .12s, background .12s;
}
.btn:hover { border-color: var(--gold); }
.btn.primary { background: #3a2d14; border-color: #7a5c22; color: var(--gold2); font-weight: 550; }
.btn.primary:hover { background: #4a3918; border-color: var(--gold2); }
.btn.small { padding: 3px 8px; font-size: 12px; }
.btn.tiny { padding: 2px 6px; font-size: 11px; }
.btn.on { border-color: var(--gold); color: var(--gold2); background: #2b2313; }
.btn.ok-on { border-color: var(--ok); color: #9ae19e; background: var(--ok-bg); }
.btn.warn-on { border-color: var(--warn); color: #ffc874; background: var(--warn-bg); }
.btn.bad-on { border-color: var(--bad); color: #ff9b94; background: var(--bad-bg); }
.btn.danger:hover { border-color: var(--bad); color: #ff9b94; }
.btn:disabled { opacity: 0.42; cursor: default; border-color: var(--line); }

.iconbtn {
  background: none;
  border: 1px solid var(--line);
  border-radius: 6px;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  cursor: pointer;
}
.iconbtn:hover { color: var(--gold2); border-color: var(--gold); }

/* ------------------------------------------------------------------------------------------------ shell */
#shell {
  display: grid;
  grid-template-columns: var(--side) minmax(0, 1fr);
  height: calc(100vh - 54px);
}
#side {
  border-right: 1px solid var(--line);
  overflow-y: auto;
  padding: 12px 10px 44px;
  background: var(--bg2);
}
#main {
  overflow-y: auto;
  overflow-x: hidden;
  position: relative;
}

#side h4 {
  margin: 16px 10px 6px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--faint);
  font-weight: 600;
}
#side a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 6px;
  color: var(--muted);
  text-decoration: none;
  margin-bottom: 1px;
}
#side a:hover { background: var(--panel); color: var(--text); }
#side a.on { background: var(--panel2); color: var(--text); box-shadow: inset 3px 0 0 var(--gold); }
#side a .count { margin-left: auto; font-size: 11px; color: var(--faint); font-variant-numeric: tabular-nums; }
#side a .badge-fix {
  font-size: 10px; padding: 0 5px; border-radius: 999px;
  background: var(--bad-bg); border: 1px solid var(--bad-line); color: #ff9b94;
}
#side a .badge-polish {
  font-size: 10px; padding: 0 5px; border-radius: 999px;
  background: var(--warn-bg); border: 1px solid var(--warn-line); color: #ffc874;
}

/* ------------------------------------------------------------------------------------------------ views */
.view {
  padding: 20px 26px 80px;
  max-width: 1920px;
  margin: 0 auto;
}
.view-wide {
  padding: 16px 22px 64px;
  max-width: 2400px;
  margin: 0 auto;
}
.view h1, .view-wide h1 { font-size: 21px; margin: 0 0 4px; font-weight: 650; }
.view h2, .view-wide h2 { font-size: 15px; margin: 22px 0 10px; font-weight: 650; color: var(--gold2); }
.lede { color: var(--muted); margin: 0 0 16px; line-height: 1.5; max-width: 980px; }

.box {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 14px;
}
.box.gold { border-color: #6b5427; }

/* KPI strip */
.kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}
.kpi {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 11px 14px;
}
.kpi .val { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.1; }
.kpi .lbl { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.6px; margin-top: 4px; }
.kpi.fix .val { color: #ff8e86; }
.kpi.polish .val { color: #ffc874; }
.kpi.pass .val { color: #8fd694; }
.kpi.total .val { color: var(--gold2); }

/* Filter bar */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-bottom: 14px;
}
.chip {
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--line2);
  background: var(--panel);
  color: var(--muted);
  cursor: pointer;
  white-space: nowrap;
}
.chip:hover { border-color: var(--gold); color: var(--text); }
.chip.on { background: #302614; border-color: var(--gold); color: var(--gold2); }
.chip.tag-on { background: var(--bad-bg); border-color: var(--bad); color: #ffb3ad; }

/* Badges */
.tag {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.55px;
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid var(--line2);
  color: var(--muted);
  white-space: nowrap;
}
.tag.framing-total { color: #9ae19e; border-color: var(--ok-line); background: var(--ok-bg); }
.tag.framing-upper { color: #9ecbff; border-color: var(--info-line); background: var(--info-bg); }
.tag.framing-closeup { color: var(--gold2); border-color: #6b5427; background: #292112; }

.verdict-badge {
  font-size: 10px;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.55px;
  padding: 2px 7px;
  border-radius: 4px;
  white-space: nowrap;
}
.verdict-badge.v-fix { background: var(--bad-bg); color: #ff9b94; border: 1px solid var(--bad-line); }
.verdict-badge.v-polish { background: var(--warn-bg); color: #ffc874; border: 1px solid var(--warn-line); }
.verdict-badge.v-pass { background: var(--ok-bg); color: #9ae19e; border: 1px solid var(--ok-line); }
.verdict-badge.v-unreviewed { background: var(--panel2); color: var(--faint); border: 1px solid var(--line); }

/* ------------------------------------------------------------------------------------------------ cards grid */
.cards-clips {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 14px;
}
.cards-stills {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color .14s, transform .14s;
  cursor: pointer;
}
.card:hover { border-color: var(--gold); }
.card.v-fix { border-left: 3px solid var(--bad); }
.card.v-polish { border-left: 3px solid var(--warn); }
.card.v-pass { border-left: 3px solid var(--ok); }
.card.missing { opacity: 0.65; }

.card-thumb {
  background: #0c0e11;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}
.card-thumb.strip { aspect-ratio: 16 / 4.4; }
.card-thumb.still { aspect-ratio: 16 / 9; }
.card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.card-thumb .empty-thumb {
  height: 100%;
  min-height: 92px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--faint);
  font-size: 12px;
  padding: 12px;
  text-align: center;
}
.card-thumb .corner-badges {
  position: absolute;
  top: 7px;
  left: 7px;
  right: 7px;
  display: flex;
  justify-content: space-between;
  gap: 6px;
  pointer-events: none;
}
.card-body {
  padding: 11px 13px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}
.card-title { font-weight: 650; font-size: 14px; line-height: 1.25; }
.card-focus { font-size: 12px; color: var(--muted); line-height: 1.4; }
.card-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  font-size: 11px;
  color: var(--muted);
  margin-top: auto;
  padding-top: 4px;
}
.card-metrics .bad { color: #ff9b94; }
.card-metrics .warn { color: #ffc874; }
.card-metrics .ok { color: #9ae19e; }
.card-footer {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 8px 12px;
  border-top: 1px solid #22262e;
  background: #16191f;
}

/* ------------------------------------------------------------------------------------------------ inspector workspace */
.inspector-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(330px, 0.9fr);
  gap: 16px;
  align-items: start;
}
.inspector-grid.comparing {
  grid-template-columns: minmax(0, 2.25fr) minmax(320px, 0.85fr);
}
@media (max-width: 1180px) {
  .inspector-grid, .inspector-grid.comparing { grid-template-columns: minmax(0, 1fr); }
}

.stage-wrap {
  background: #0a0c0f;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
}
.video-viewport {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: 66vh;
  background: #080a0d;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
}
.video-viewport.zoomed { cursor: grab; }
.video-viewport.zoomed.dragging { cursor: grabbing; }
.video-viewport video,
.video-viewport img.stage-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transform-origin: center center;
  transition: transform .05s linear;
  pointer-events: none;
}
.stage-overlay-top {
  position: absolute;
  top: 10px;
  left: 12px;
  right: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  pointer-events: none;
  z-index: 3;
}
.stage-overlay-top > * { pointer-events: auto; }
.plumb-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 2;
}
.zoom-badge {
  background: rgba(14, 16, 20, 0.78);
  border: 1px solid var(--line2);
  border-radius: 5px;
  padding: 2px 7px;
  font-size: 11px;
  color: var(--gold2);
}

/* Transport bar + scrubber + pop timeline */
.transport {
  padding: 10px 14px 12px;
  background: var(--panel);
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.scrubber-wrap {
  position: relative;
  padding: 6px 0 12px;
}
.scrubber-track {
  position: relative;
  height: 10px;
  background: #0e1014;
  border: 1px solid var(--line2);
  border-radius: 6px;
  cursor: pointer;
}
.scrubber-ab {
  position: absolute;
  top: 0;
  bottom: 0;
  background: rgba(212, 162, 76, 0.25);
  border-left: 2px solid var(--gold2);
  border-right: 2px solid var(--gold2);
  pointer-events: none;
}
.scrubber-fill {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  background: linear-gradient(90deg, #916d2b, var(--gold2));
  border-radius: 5px;
  pointer-events: none;
}
.scrubber-head {
  position: absolute;
  top: -4px;
  width: 10px;
  height: 16px;
  margin-left: -5px;
  background: var(--gold2);
  border: 1px solid #121418;
  border-radius: 3px;
  pointer-events: none;
}
.timeline-markers {
  position: relative;
  height: 14px;
  margin-top: 4px;
}
.tm-dot {
  position: absolute;
  top: 1px;
  width: 8px;
  height: 11px;
  margin-left: -4px;
  border-radius: 2px;
  cursor: pointer;
  border: 1px solid rgba(0,0,0,0.5);
  transition: transform .1s;
}
.tm-dot:hover { transform: scale(1.35); z-index: 4; }
.tm-dot.pop { background: var(--bad); }
.tm-dot.pop-mid { background: var(--warn); }
.tm-dot.pin { background: var(--info); border-radius: 50%; width: 9px; height: 9px; top: 2px; }

.controls-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.controls-group {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding-right: 6px;
  border-right: 1px solid var(--line);
}
.controls-group:last-child { border-right: none; padding-right: 0; }

/* Live diag telemetry bar */
.telemetry-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
  gap: 6px 10px;
  padding: 9px 12px;
  background: #101318;
  border-top: 1px solid var(--line);
  font-size: 12px;
}
.tele-cell { min-width: 0; }
.tele-cell .k { font-size: 10px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--faint); }
.tele-cell .v {
  font-family: ui-monospace, Consolas, monospace;
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Keyframes filmstrip */
.keyframes-strip {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(145px, 1fr));
  gap: 8px;
  margin-top: 10px;
}
.kf-item {
  background: #0d0f13;
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
  cursor: pointer;
}
.kf-item:hover { border-color: var(--gold); }
.kf-item img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; }
.kf-item .kf-cap {
  padding: 3px 6px;
  font-size: 11px;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
}

/* Right vetting panel */
.vet-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.verdict-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}
.verdict-row .btn {
  padding: 8px 6px;
  text-align: center;
  font-weight: 600;
}
.tag-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.pin-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 260px;
  overflow-y: auto;
}
.pin-item {
  background: #14171c;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 7px 9px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.pin-item:hover { border-color: var(--line2); }
.pin-head { display: flex; align-items: center; gap: 6px; font-size: 11px; }
.pin-time {
  color: var(--gold2);
  font-family: ui-monospace, Consolas, monospace;
  cursor: pointer;
  padding: 1px 5px;
  border-radius: 4px;
  background: #272013;
  border: 1px solid #59451f;
}
.pin-time:hover { background: #3b2f17; }
.pin-text { font-size: 12.5px; line-height: 1.4; white-space: pre-wrap; word-break: break-word; }

input.field, textarea.field, select.field {
  width: 100%;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 6px 9px;
  outline: none;
}
input.field:focus, textarea.field:focus, select.field:focus { border-color: var(--gold); }
textarea.field { resize: vertical; min-height: 76px; line-height: 1.45; }

/* Compare two stills */
.compare-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
@media (max-width: 980px) {
  .compare-grid { grid-template-columns: 1fr; }
}
.compare-slot {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.compare-slot .slot-head {
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 8px;
}
.compare-slot .slot-img-wrap {
  background: #080a0d;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: zoom-in;
}
.compare-slot img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Modal & Lightbox */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(6, 8, 12, 0.74);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 60;
  padding: 20px;
}
.modal-card {
  background: var(--panel);
  border: 1px solid var(--line2);
  border-radius: 10px;
  width: min(860px, 95vw);
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.65);
}
.modal-head {
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg2);
}
.modal-head h3 { margin: 0; font-size: 15px; }
.modal-body {
  padding: 16px;
  overflow-y: auto;
  flex: 1;
}
.modal-foot {
  padding: 11px 16px;
  border-top: 1px solid var(--line);
  background: var(--bg2);
  display: flex;
  align-items: center;
  gap: 8px;
}
pre.brief-pre {
  background: #0d0f13;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 12px;
  font-family: ui-monospace, Consolas, monospace;
  font-size: 12px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 58vh;
  overflow-y: auto;
  margin: 0;
}
pre.job-log {
  background: #0b0d11;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px;
  font-family: ui-monospace, Consolas, monospace;
  font-size: 11.5px;
  line-height: 1.45;
  max-height: 280px;
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-word;
  margin: 8px 0 0;
}

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(5, 7, 10, 0.94);
  z-index: 80;
  display: flex;
  flex-direction: column;
}
.lightbox-bar {
  height: 46px;
  padding: 0 16px;
  background: var(--bg2);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 12px;
}
.lightbox-stage {
  flex: 1;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: grab;
  user-select: none;
}
.lightbox-stage.dragging { cursor: grabbing; }
.lightbox-stage img {
  max-width: 96vw;
  max-height: calc(100vh - 64px);
  object-fit: contain;
  transform-origin: center center;
  pointer-events: none;
}

.toast {
  position: fixed;
  bottom: 20px;
  right: 22px;
  z-index: 90;
  background: #232832;
  border: 1px solid var(--gold);
  color: var(--gold2);
  padding: 9px 14px;
  border-radius: 8px;
  font-size: 13px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.55);
}

/* ------------------------------------------------------------------------------------------------ updates, versions & split compare */
.updates-pill {
  font-size: 12px;
  font-weight: 600;
  padding: 4px 11px;
  border-radius: 999px;
  background: linear-gradient(135deg, #3a2d12, #2a200d);
  border: 1px solid var(--gold);
  color: var(--gold2);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 0 12px rgba(212, 162, 76, 0.22);
  text-decoration: none;
}
.updates-pill:hover {
  background: #483715;
  border-color: var(--gold2);
  text-decoration: none;
}
.updates-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gold2);
  box-shadow: 0 0 6px var(--gold2);
}

#side a .badge-update {
  font-size: 10px;
  font-weight: 650;
  padding: 0 6px;
  border-radius: 999px;
  background: #3a2d14;
  border: 1px solid var(--gold);
  color: var(--gold2);
}

.tag.updated-badge {
  color: var(--gold2);
  border-color: var(--gold);
  background: #342812;
  font-weight: 650;
}
.tag.ver-pill {
  color: #cbd5e1;
  border-color: #3e4656;
  background: #1d212a;
  font-family: ui-monospace, Consolas, monospace;
}
.card.needs-reverify {
  box-shadow: inset 0 0 0 1px rgba(212, 162, 76, 0.45);
}

/* Version / Take History Bar */
.take-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 12px;
}
.take-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  border-radius: 6px;
  border: 1px solid var(--line2);
  background: var(--bg2);
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
  transition: border-color .12s, background .12s;
}
.take-pill:hover { border-color: var(--gold); color: var(--text); }
.take-pill.on {
  border-color: var(--gold);
  background: #2f2512;
  color: var(--gold2);
  font-weight: 600;
}
.take-pill.cmp {
  border-color: var(--info);
  background: var(--info-bg);
  color: #a9d4ff;
}

/* Synced Split-Screen Before vs After Compare */
.split-stage {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  background: var(--line);
}
@media (max-width: 980px) {
  .split-stage { grid-template-columns: 1fr; }
}
.split-pane {
  position: relative;
  background: #080a0d;
  min-width: 0;
}
.split-pane .video-viewport {
  aspect-ratio: 16 / 9;
  max-height: 56vh;
}
.pane-badge {
  font-size: 11px;
  font-weight: 650;
  padding: 2px 8px;
  border-radius: 5px;
  font-family: ui-monospace, Consolas, monospace;
}
.pane-badge.before {
  background: rgba(19, 32, 46, 0.88);
  border: 1px solid var(--info-line);
  color: #9ecbff;
}
.pane-badge.after {
  background: rgba(22, 38, 24, 0.88);
  border: 1px solid var(--ok-line);
  color: #9ae19e;
}
.pane-metrics {
  background: rgba(12, 14, 18, 0.82);
  border: 1px solid var(--line2);
  border-radius: 5px;
  padding: 2px 7px;
  font-size: 10.5px;
  color: var(--muted);
  font-family: ui-monospace, Consolas, monospace;
}

/* Changelog & Updates View */
.changelog-box {
  background: linear-gradient(180deg, #211c12, var(--panel));
  border: 1px solid #755b26;
  border-radius: var(--radius);
  padding: 12px 14px;
}
.changelog-box.resolved {
  background: var(--panel);
  border-color: var(--line);
}
.change-list {
  margin: 6px 0 0;
  padding-left: 17px;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--text);
}
.change-list li { margin-bottom: 3px; }

.metric-deltas {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 7px;
}
.delta-chip {
  font-family: ui-monospace, Consolas, monospace;
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 4px;
  background: var(--bg2);
  border: 1px solid var(--line2);
  color: var(--muted);
}
.delta-chip.good {
  background: var(--ok-bg);
  border-color: var(--ok-line);
  color: #9ae19e;
}
.delta-chip.bad {
  background: var(--bad-bg);
  border-color: var(--bad-line);
  color: #ff9b94;
}

.update-batch {
  background: var(--panel);
  border: 1px solid #594620;
  border-radius: var(--radius);
  padding: 16px 18px;
  margin-bottom: 16px;
}
.update-batch.done {
  border-color: var(--line);
}
.update-items {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 12px;
}
.update-item-card {
  background: #14171d;
  border: 1px solid var(--line);
  border-left: 3px solid var(--gold);
  border-radius: 7px;
  padding: 11px 14px;
}
.update-item-card.verified {
  border-left-color: var(--ok);
  opacity: 0.78;
}
.addressed-pin-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px;
  font-size: 12px;
  padding: 5px 8px;
  margin-top: 5px;
  background: #1a1d24;
  border: 1px solid #2b303a;
  border-radius: 5px;
}

/* Pin Lifecycle */
.pin-section-head {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.55px;
  color: var(--muted);
  margin: 10px 0 6px;
}
.pin-section-head.addressed { color: var(--gold2); }
.pin-item.pin-addressed {
  background: #1f1b12;
  border-color: #6b5324;
}
.pin-item.pin-verified {
  background: #131815;
  border-color: #253b27;
  opacity: 0.78;
}
.pin-resolution {
  font-size: 11.5px;
  color: #b7e4ba;
  background: rgba(22, 38, 24, 0.55);
  border-left: 2px solid var(--ok);
  padding: 4px 7px;
  border-radius: 3px;
  line-height: 1.4;
}
.pin-actions {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 3px;
}
.verified-details {
  margin-top: 8px;
}
.verified-details summary {
  cursor: pointer;
  font-size: 11.5px;
  color: var(--muted);
  padding: 4px 0;
  user-select: none;
}
.verified-details summary:hover { color: var(--text); }
.tm-dot.pin-addressed {
  background: var(--gold2);
  border-radius: 50%;
  width: 9px;
  height: 9px;
  top: 2px;
}
.tm-dot.pin-verified {
  background: var(--ok);
  opacity: 0.45;
  border-radius: 50%;
  width: 7px;
  height: 7px;
  top: 3px;
}

.kbd {
  display: inline-block;
  font-family: ui-monospace, Consolas, monospace;
  font-size: 11px;
  padding: 1px 5px;
  border-radius: 4px;
  background: var(--bg);
  border: 1px solid var(--line2);
  color: var(--gold2);
}

@media (max-width: 920px) {
  :root { --side: 196px; }
  .tally-pill, .mode-pill { display: none; }
  .cards-clips { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  html, body { overflow: auto; }
  #top { height: auto; flex-wrap: wrap; padding: 8px 10px; gap: 8px; }
  #top .search { max-width: none; order: 3; flex: 1 1 100%; }
  #shell { grid-template-columns: 1fr; height: auto; min-height: calc(100dvh - 54px); }
  #side { border-right: none; border-bottom: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 4px; padding: 8px; overflow: visible; }
  #side h4 { display: none; }
  #side a { margin-bottom: 0; padding: 4px 8px; font-size: 12px; }
  #main { overflow: visible; }
  .view, .view-wide { padding: 12px 12px 48px; }
}
