/* ============================================================
 * Agent Watch — release stability dashboard
 * Themes: light · dark · ocean · terminal · rose
 * Typography: Fira Code + Fira Sans
 * ============================================================ */

/* ── LIGHT (default) ── */
:root {
  --bg:           #F1F5F9;
  --bg-elev:      #FFFFFF;
  --bg-glass:     rgba(241, 245, 249, 0.92);
  --bg-soft:      #E2E8F0;
  --border:       #CBD5E1;
  --border-strong:#94A3B8;

  --text:         #0F172A;
  --text-dim:     #334155;
  --text-mute:    #64748B;

  --accent:       #0369A1;
  --accent-soft:  #E0F2FE;
  --accent-dim:   #075985;
  --accent-glow:  rgba(3, 105, 161, 0.12);

  --danger:       #DC2626;
  --good:         #059669;
  --neutral:      #64748B;

  --grid:         rgba(3, 105, 161, 0.035);
  --shadow-card:  0 1px 3px rgba(15, 23, 42, 0.06), 0 4px 16px rgba(15, 23, 42, 0.04);
  --shadow-hover: 0 0 0 1px var(--accent-glow), 0 12px 32px rgba(15, 23, 42, 0.09);

  --font-sans:    "Fira Sans", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --font-mono:    "Fira Code", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --radius:       6px;
  --radius-lg:    12px;
}

/* ── DARK — Amber Night ── */
[data-theme="dark"] {
  --bg:           #08080b;
  --bg-elev:      #131318;
  --bg-glass:     rgba(13, 13, 18, 0.88);
  --bg-soft:      #16161d;
  --border:       #25252e;
  --border-strong:#3a3a45;

  --text:         #ededed;
  --text-dim:     #9a9aa3;
  --text-mute:    #6f7079;

  --accent:       #fbbf24;
  --accent-soft:  #2d1f00;
  --accent-dim:   #b8881a;
  --accent-glow:  rgba(251, 191, 36, 0.18);

  --danger:       #ef4444;
  --good:         #10b981;
  --neutral:      #94a3b8;

  --grid:         rgba(255, 255, 255, 0.018);
  --shadow-card:  0 1px 0 rgba(255,255,255,0.02) inset, 0 8px 24px rgba(0,0,0,0.5);
  --shadow-hover: 0 0 0 1px var(--accent-glow), 0 12px 32px rgba(0, 0, 0, 0.7);
}

/* ── OCEAN — Deep Pacific ── */
[data-theme="ocean"] {
  --bg:           #060f1e;
  --bg-elev:      #0b1a30;
  --bg-glass:     rgba(6, 15, 30, 0.92);
  --bg-soft:      #0f2040;
  --border:       #162e50;
  --border-strong:#1e4470;

  --text:         #dbeafe;
  --text-dim:     #93c5fd;
  --text-mute:    #4b7ab5;

  --accent:       #38bdf8;
  --accent-soft:  #082540;
  --accent-dim:   #7dd3fc;
  --accent-glow:  rgba(56, 189, 248, 0.18);

  --danger:       #f87171;
  --good:         #34d399;
  --neutral:      #64748b;

  --grid:         rgba(56, 189, 248, 0.04);
  --shadow-card:  0 1px 0 rgba(255,255,255,0.03) inset, 0 8px 24px rgba(0,0,0,0.6);
  --shadow-hover: 0 0 0 1px var(--accent-glow), 0 12px 36px rgba(0, 0, 0, 0.8);
}

/* ── TERMINAL — Retro Green ── */
[data-theme="terminal"] {
  --bg:           #080e08;
  --bg-elev:      #0c140c;
  --bg-glass:     rgba(8, 14, 8, 0.92);
  --bg-soft:      #101c10;
  --border:       #182818;
  --border-strong:#1e3c1e;

  --text:         #a8ffb0;
  --text-dim:     #6adc78;
  --text-mute:    #3a7a42;

  --accent:       #22c55e;
  --accent-soft:  #052210;
  --accent-dim:   #16a34a;
  --accent-glow:  rgba(34, 197, 94, 0.18);

  --danger:       #f87171;
  --good:         #4ade80;
  --neutral:      #6b7280;

  --grid:         rgba(34, 197, 94, 0.05);
  --shadow-card:  0 1px 0 rgba(34,197,94,0.04) inset, 0 8px 24px rgba(0,0,0,0.65);
  --shadow-hover: 0 0 0 1px var(--accent-glow), 0 12px 36px rgba(0, 0, 0, 0.8);
}

/* ── ROSE — Warm Blush ── */
[data-theme="rose"] {
  --bg:           #fff0f3;
  --bg-elev:      #ffffff;
  --bg-glass:     rgba(255, 240, 243, 0.92);
  --bg-soft:      #ffe4eb;
  --border:       #ffc9d5;
  --border-strong:#f49fb5;

  --text:         #3b0a16;
  --text-dim:     #7a1e34;
  --text-mute:    #a8506a;

  --accent:       #e11d48;
  --accent-soft:  #ffe4eb;
  --accent-dim:   #be123c;
  --accent-glow:  rgba(225, 29, 72, 0.14);

  --danger:       #dc2626;
  --good:         #059669;
  --neutral:      #78716c;

  --grid:         rgba(225, 29, 72, 0.04);
  --shadow-card:  0 1px 3px rgba(59, 10, 22, 0.06), 0 4px 16px rgba(59, 10, 22, 0.04);
  --shadow-hover: 0 0 0 1px var(--accent-glow), 0 12px 32px rgba(59, 10, 22, 0.09);
}

/* ── BASE ── */
*, *::before, *::after { box-sizing: border-box; }
::selection { background: var(--accent); color: var(--bg-elev); }

html, body {
  margin: 0; padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body::before {
  content: '';
  position: fixed; inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 48px 48px;
  z-index: 0;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.15s;
}
a:hover {
  color: var(--accent-dim);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.muted { color: var(--text-mute); }

/* ── TOPBAR ── */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 1.2rem;
  padding: 0 2rem;
  height: 52px;
  background: var(--bg-elev);
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}

.brand {
  display: flex; align-items: center; gap: 0.5rem;
  font-family: var(--font-mono);
  flex-shrink: 0;
}
.brand-mark {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
  animation: signalPulse 3s ease-in-out infinite;
  flex-shrink: 0;
}
.brand-name {
  font-weight: 600;
  font-size: 0.82rem;
  letter-spacing: 0.07em;
  color: var(--text);
  text-transform: uppercase;
}
.brand-tag {
  color: var(--text-mute);
  font-size: 0.68rem;
  font-weight: 400;
}
@keyframes signalPulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 3px var(--accent-glow); }
  50%      { opacity: 0.45; box-shadow: 0 0 0 5px var(--accent-glow); }
}

/* PROJECT TABS */
.project-tabs {
  display: flex; gap: 0.15rem;
  flex: 1;
  justify-content: center;
  flex-wrap: wrap;
}
.tab-btn {
  font-family: var(--font-mono);
  font-size: 0.73rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background: transparent;
  border: none;
  color: var(--text-mute);
  padding: 0.32rem 0.9rem;
  cursor: pointer;
  border-radius: var(--radius);
  transition: color 0.15s, background 0.15s;
  white-space: nowrap;
  position: relative;
}
.tab-btn::after {
  content: '';
  position: absolute;
  bottom: -1px; left: 20%; right: 20%;
  height: 2px;
  background: var(--accent);
  border-radius: 999px;
  opacity: 0;
  transition: opacity 0.15s;
}
.tab-btn:hover { color: var(--text-dim); background: var(--bg-soft); }
.tab-btn.active { color: var(--accent); font-weight: 600; }
.tab-btn.active::after { opacity: 1; }

/* THEME SELECT */
.theme-select {
  appearance: none;
  -webkit-appearance: none;
  padding: 4px 28px 4px 10px;
  background: var(--bg-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23888'/%3E%3C/svg%3E") no-repeat right 9px center;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font: inherit;
  font-size: 0.75rem;
  cursor: pointer;
  outline: none;
}
.theme-select:focus { border-color: var(--accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 20%, transparent); }
.theme-toggle { display: none; }
.theme-icon-light, .theme-icon-dark { display: none; }

/* ── AUTH ── */
.auth-area { display: flex; gap: 0.35rem; align-items: center; }
.auth-loading {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-mute);
  letter-spacing: 0.06em;
}
.auth-btn {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  color: var(--text-dim);
  padding: 0.35rem 0.85rem;
  cursor: pointer;
  border-radius: var(--radius);
  transition: all 0.15s;
  text-decoration: none;
}
.auth-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
  text-decoration: none;
}
.user-chip {
  display: flex; align-items: center; gap: 0.45rem;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.2rem 0.8rem 0.2rem 0.28rem;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--text-dim);
}
.user-chip img { width: 20px; height: 20px; border-radius: 50%; }

/* ── MAIN ── */
.main {
  position: relative; z-index: 1;
  max-width: 1400px;
  margin: 0 auto;
  padding: 2.5rem 2rem 4rem;
}

/* ── OVERVIEW ── */
.overview { margin-bottom: 2rem; }
.overview-eyebrow {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.28em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 0.55rem;
}
.overview-eyebrow::before {
  content: '';
  display: inline-block;
  width: 18px; height: 1px;
  background: var(--accent);
  opacity: 0.7;
}
.overview h1 {
  margin: 0 0 0.4rem;
  font-family: var(--font-mono);
  font-size: clamp(1.55rem, 3vw, 2.3rem);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.1;
  color: var(--text);
}
#project-meta {
  font-size: 0.875rem;
  color: var(--text-mute);
  margin: 0;
}
#project-meta a {
  color: var(--text-mute);
  border-bottom: 1px solid var(--border-strong);
  padding-bottom: 1px;
}
#project-meta a:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
  text-decoration: none;
}

/* STAT RAIL */
.stat-rail {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  margin: 1.4rem 0 0;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.stat-cell {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: 1rem 1.3rem;
  border-right: 1px solid var(--border);
}
.stat-cell:last-child { border-right: none; }
.stat-value {
  font-family: var(--font-mono);
  font-size: 1.55rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.03em;
  line-height: 1;
}
.stat-label {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.17em;
  text-transform: uppercase;
  color: var(--text-mute);
}

/* ── LEGEND ── */
.legend {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  flex-wrap: wrap;
  margin: 1.5rem 0 1.4rem;
  padding: 0.6rem 1rem;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-size: 0.67rem;
  letter-spacing: 0.07em;
  color: var(--text-mute);
}
.legend-item { display: flex; align-items: center; gap: 0.45rem; }
.legend-item .legend-range { color: var(--border-strong); }
.dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.dot-critical { background: var(--danger); }
.dot-neutral  { background: var(--neutral); }
.dot-prime    { background: var(--good); }
.legend-spacer { flex: 1; min-width: 0; }
.legend-pulse {
  display: flex; align-items: center; gap: 0.5rem;
  color: var(--good);
}
.legend-pulse-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--good);
  animation: signalPing 1.8s ease-out infinite;
}
@keyframes signalPing {
  0%   { box-shadow: 0 0 0 0 color-mix(in srgb, var(--good) 55%, transparent); }
  100% { box-shadow: 0 0 0 8px transparent; }
}

/* ── VERSIONS GRID ── */
.versions {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 1rem;
}

/* ── VERSION CARD ── */
.version-card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.4rem 1.4rem 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.95rem;
  box-shadow: var(--shadow-card);
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
  animation: cardIn 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) backwards;
  overflow: hidden;
  position: relative;
}
.version-card:hover {
  border-color: color-mix(in srgb, var(--accent) 60%, var(--border));
  box-shadow: var(--shadow-card), var(--shadow-hover);
  transform: translateY(-2px);
}

@keyframes cardIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
.version-card:nth-child(1)  { animation-delay: 0.02s; }
.version-card:nth-child(2)  { animation-delay: 0.06s; }
.version-card:nth-child(3)  { animation-delay: 0.10s; }
.version-card:nth-child(4)  { animation-delay: 0.14s; }
.version-card:nth-child(5)  { animation-delay: 0.18s; }
.version-card:nth-child(6)  { animation-delay: 0.22s; }
.version-card:nth-child(7)  { animation-delay: 0.26s; }
.version-card:nth-child(8)  { animation-delay: 0.30s; }
.version-card:nth-child(9)  { animation-delay: 0.34s; }
.version-card:nth-child(10) { animation-delay: 0.38s; }
.version-card:nth-child(11) { animation-delay: 0.42s; }
.version-card:nth-child(12) { animation-delay: 0.46s; }

/* CARD HEADER — score left (dominant), tag right */
.vc-header {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 1rem;
}
.vc-score-block {
  flex-shrink: 0;
  order: -1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.2rem;
  min-width: 88px;
}
.vc-rank {
  font-family: var(--font-mono);
  font-size: 0.56rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-mute);
  padding: 0.14rem 0.45rem;
  border: 1px solid var(--border);
  border-radius: 3px;
  background: var(--bg-soft);
  white-space: nowrap;
}
.vc-rank:empty { display: none; }
.vc-score {
  font-family: var(--font-mono);
  font-size: 3.2rem;
  font-weight: 700;
  line-height: 0.9;
  letter-spacing: -0.04em;
  color: var(--score-color, var(--text));
}
.vc-state {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-mute);
  margin-top: 0.12rem;
}
.vc-tag-block {
  flex: 1;
  min-width: 0;
  padding-top: 0.25rem;
}
.vc-tag-block .vc-tag {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
  line-height: 1.25;
  word-break: break-all;
}
.vc-tag-block .vc-name {
  display: block;
  font-size: 0.76rem;
  color: var(--text-mute);
  margin-top: 0.18rem;
  font-style: italic;
}
.vc-tag-block .vc-name:empty { display: none; }

/* GAUGE */
.vc-gauge { display: flex; flex-direction: column; gap: 0.3rem; }
.vc-bar {
  height: 10px;
  background: var(--bg-soft);
  border-radius: 999px;
  overflow: hidden;
  position: relative;
}
.vc-bar-fill {
  height: 100%;
  transition: width 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
  border-radius: 999px;
  position: relative;
}
.vc-bar-fill::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent 50%, rgba(255,255,255,0.28) 100%);
  border-radius: 999px;
}
.vc-bar-ticks {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  font-family: var(--font-mono);
  font-size: 0.58rem;
  color: var(--text-mute);
  letter-spacing: 0.03em;
}
.vc-bar-ticks span { text-align: center; }
.vc-bar-ticks span:first-child { text-align: left; }
.vc-bar-ticks span:last-child  { text-align: right; }

/* META */
.vc-meta {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-mute);
  line-height: 1.5;
}

/* ACTIONS */
.vc-actions {
  display: flex; gap: 0.35rem; flex-wrap: wrap; align-items: center;
  padding-top: 0.65rem;
  border-top: 1px solid var(--border);
  margin-top: 0.1rem;
}
.vc-actions a, .vc-actions button {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.38rem 0.75rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-dim);
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s;
}
.vc-actions a:hover, .vc-actions button:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
  text-decoration: none;
}
.vc-toggle { margin-left: auto; }
.vc-download {
  background: var(--accent);
  color: var(--bg-elev);
  border-color: var(--accent);
}
.vc-download:hover {
  background: var(--accent-dim);
  border-color: var(--accent-dim);
  color: var(--bg-elev) !important;
}

/* DETAIL PANEL */
.vc-detail {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  padding-top: 0.85rem;
  border-top: 1px dashed var(--border);
  margin-top: 0.15rem;
}
.vc-detail h3 {
  margin: 0 0 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.22em;
  color: var(--text-mute);
  text-transform: uppercase;
  font-weight: 500;
}

/* ISSUES LIST */
.vc-issues-list {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: 0.25rem;
  max-height: 260px;
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border-strong) transparent;
}
.vc-issues-list::-webkit-scrollbar { width: 4px; }
.vc-issues-list::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 999px; }
.vc-issues-list li {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.6rem;
  align-items: baseline;
  font-size: 0.83rem;
  padding: 0.4rem 0.65rem;
  border-radius: var(--radius);
  background: var(--bg-soft);
  border-left: 2px solid var(--border-strong);
  transition: background 0.12s;
}
.vc-issues-list li:hover { background: color-mix(in srgb, var(--accent) 5%, var(--bg-soft)); }
.vc-issues-list li.sentiment-negative { border-left-color: var(--danger); }
.vc-issues-list li.sentiment-positive { border-left-color: var(--good); }
.vc-issues-list li.sentiment-neutral  { border-left-color: var(--neutral); }
.vc-issues-list li.sentiment-unknown  { border-left-color: var(--border-strong); }
.issue-num { color: var(--text-mute); font-family: var(--font-mono); font-size: 0.68rem; }
.issue-title { color: var(--text); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.issue-title a { color: inherit; }
.issue-title a:hover { color: var(--accent); text-decoration: none; }
.issue-state {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--text-mute);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

/* RATING */
.rating-form { display: flex; flex-direction: column; gap: 0.65rem; }
.stars { display: flex; gap: 3px; font-size: 1.25rem; }
.star {
  cursor: pointer;
  color: var(--border-strong);
  user-select: none;
  transition: color 0.1s, transform 0.1s;
  line-height: 1;
}
.star:hover { transform: translateY(-1px); }
.star.active, .star.hover { color: var(--accent); }
.rating-comment {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  padding: 0.55rem 0.75rem;
  font-size: 0.85rem;
  font-family: var(--font-sans);
  line-height: 1.5;
  resize: vertical;
  min-height: 60px;
  transition: border-color 0.15s;
}
.rating-comment:focus { outline: none; border-color: var(--accent); }
.rating-comment::placeholder { color: var(--text-mute); }
.rating-submit {
  align-self: flex-start;
  background: var(--accent);
  color: var(--bg-elev);
  border: none;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.48rem 1rem;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.15s;
}
.rating-submit:hover { background: var(--accent-dim); }
.rating-submit:disabled { opacity: 0.5; cursor: not-allowed; }
.rating-status { font-family: var(--font-mono); font-size: 0.7rem; }
.rating-summary { font-family: var(--font-mono); font-size: 0.68rem; color: var(--text-mute); margin-top: 0.4rem; }
.rating-login { font-size: 0.82rem; color: var(--text-mute); font-style: italic; }

/* ── LOADING / EMPTY / FOOTER ── */
.loading {
  font-family: var(--font-mono);
  padding: 4rem 1rem;
  text-align: center;
  color: var(--text-mute);
  letter-spacing: 0.2em;
  font-size: 0.74rem;
  text-transform: uppercase;
  animation: sweep 1.8s ease-in-out infinite;
}
@keyframes sweep {
  0%, 100% { opacity: 0.35; }
  50%      { opacity: 1; }
}
.empty {
  font-family: var(--font-mono);
  padding: 3rem 1rem;
  text-align: center;
  color: var(--text-mute);
  font-size: 0.84rem;
}
.empty code {
  background: var(--bg-soft);
  padding: 0.12em 0.45em;
  border-radius: 3px;
  color: var(--accent);
  border: 1px solid var(--border);
}

.footer {
  position: relative; z-index: 1;
  max-width: 1400px;
  margin: 3rem auto 0;
  padding: 1.2rem 2rem 2rem;
  font-family: var(--font-mono);
  font-size: 0.67rem;
  color: var(--text-mute);
  letter-spacing: 0.04em;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}
.footer-mark { color: var(--accent); }
.footer-sep { opacity: 0.4; }
.footer a { color: var(--text-mute); }
.footer a:hover { color: var(--accent); text-decoration: none; }

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .topbar { padding: 0 1.25rem; }
  .main { padding: 2rem 1.25rem 3rem; }
  .footer { padding: 1.2rem 1.25rem 2rem; }
}
@media (max-width: 640px) {
  .topbar { padding: 0 1rem; height: auto; min-height: 52px; flex-wrap: wrap; gap: 0.6rem; }
  .brand-tag { display: none; }
  .main { padding: 1.5rem 1rem 2.5rem; }
  .versions { grid-template-columns: 1fr; gap: 0.75rem; }
  .legend { font-size: 0.62rem; gap: 0.7rem; }
  .legend-spacer { display: none; }
  .vc-score { font-size: 2.6rem; }
  .stat-rail { grid-template-columns: repeat(2, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  .version-card,
  .brand-mark,
  .legend-pulse-dot,
  .loading { animation: none !important; }
  .vc-bar-fill { transition: none !important; }
}
