:root {
  --bg-dark: #0f0c20;
  --bg-gradient: linear-gradient(135deg, #130f2c 0%, #05030e 100%);
  --gold: #d4af37;
  --gold-dim: rgba(212, 175, 55, 0.3);
  --text-main: #f0e6ff;
  --text-muted: #a395b5;
  --card-bg: rgba(255, 255, 255, 0.03);
  --glass-blur: blur(12px);
  --accent: #8b5cf6;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-gradient);
  background-attachment: fixed;
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

h1, h2, h3 {
  font-weight: 600;
  color: var(--gold);
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 2rem;
  padding: 0.85rem 1.5rem;
  border-bottom: 1px solid var(--gold-dim);
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: var(--glass-blur);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-left {
  flex: 1;
  min-width: 0;
}

.header h1 {
  font-size: 1.5rem;
  letter-spacing: 1.5px;
  margin: 0;
  text-shadow: 0 0 12px rgba(212, 175, 55, 0.4);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.header-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin: 0.2rem 0 0;
}

.header-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.45rem;
}

.header-controls {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.scores-btn {
  background: rgba(212, 175, 55, 0.08);
  border: 1px solid var(--gold-dim);
  color: var(--gold);
  padding: 0.35rem 0.85rem;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.82rem;
  letter-spacing: 0.5px;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s ease;
}
.scores-btn:hover {
  background: rgba(212, 175, 55, 0.18);
  box-shadow: 0 0 12px rgba(212, 175, 55, 0.25);
}
.scores-btn.active {
  background: rgba(212, 175, 55, 0.25);
  border-color: var(--gold);
}

.version-dropdown {
  background: rgba(212, 175, 55, 0.12);
  border: 1px solid var(--gold);
  color: var(--gold);
  padding: 0.35rem 2.2rem 0.35rem 0.85rem;
  border-radius: 6px;
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 1px;
  cursor: pointer;
  font-family: inherit;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'><path fill='%23d4af37' d='M0 0l5 6 5-6z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 0.7rem center;
  transition: box-shadow 0.2s ease;
}
.version-dropdown:hover,
.version-dropdown:focus {
  box-shadow: 0 0 12px rgba(212, 175, 55, 0.35);
  outline: none;
}
.version-dropdown option {
  background: #1a1530;
  color: var(--text-main);
}

.overall-scores-strip {
  display: flex;
  align-items: stretch;
  gap: 0;
  border: 1px solid var(--gold-dim);
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.3);
  overflow: hidden;
}
.score-chip {
  display: flex;
  align-items: baseline;
  gap: 0.3rem;
  padding: 0.35rem 0.7rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  border-right: 1px solid rgba(212, 175, 55, 0.15);
  white-space: nowrap;
}
.score-chip:last-child {
  border-right: none;
}
.score-chip-label {
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
}
.score-chip-value {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--gold);
}
.score-chip.overall {
  background: rgba(139, 92, 246, 0.1);
}
.score-chip.overall .score-chip-value {
  color: var(--accent);
  font-size: 1.05rem;
}
.score-chip.overall .score-chip-label {
  color: var(--accent);
  opacity: 0.85;
}

.container {
  display: flex;
  flex: 1;
  overflow: hidden;
  max-width: 1600px;
  margin: 0 auto;
  width: 100%;
}

.sidebar {
  width: 350px;
  border-right: 1px solid var(--gold-dim);
  overflow-y: auto;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.2);
}

.sidebar::-webkit-scrollbar {
  width: 6px;
}
.sidebar::-webkit-scrollbar-thumb {
  background: var(--gold-dim);
  border-radius: 3px;
}

.filter-tabs {
  display: flex;
  flex-wrap: wrap;
  margin-bottom: 1rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  overflow: hidden;
  gap: 1px;
}

.filter-tab {
  flex: 1 1 auto;
  min-width: 0;
  padding: 0.6rem 0.4rem;
  text-align: center;
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 500;
  transition: all 0.2s ease;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.filter-tab.active {
  background: var(--gold);
  color: #000;
}

.persona-item {
  padding: 1rem;
  border-radius: 8px;
  cursor: pointer;
  margin-bottom: 0.5rem;
  border: 1px solid transparent;
  transition: all 0.2s ease;
}

.persona-item:hover {
  background: var(--card-bg);
  border-color: rgba(212, 175, 55, 0.2);
}

.persona-item.active {
  background: rgba(212, 175, 55, 0.1);
  border-color: var(--gold);
}

.persona-item .name {
  font-weight: 600;
  margin-bottom: 0.25rem;
  color: #fff;
}

.persona-item .subtitle {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.main-content {
  flex: 1;
  padding: 2rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.main-content::-webkit-scrollbar {
  width: 8px;
}
.main-content::-webkit-scrollbar-thumb {
  background: var(--gold-dim);
  border-radius: 4px;
}

.details-card {
  background: var(--card-bg);
  border: 1px solid var(--gold-dim);
  border-radius: 16px;
  padding: 2rem;
  backdrop-filter: var(--glass-blur);
  margin-bottom: 2rem;
  animation: fadeIn 0.4s ease-out;
}

.details-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.5rem;
}

.details-scores {
  display: flex;
  gap: 1.5rem;
}

.d-score {
  text-align: center;
}
.d-score .val {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--gold);
}
.d-score .lbl {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.details-comment {
  font-size: 1.1rem;
  line-height: 1.6;
  padding: 1rem;
  background: rgba(212, 175, 55, 0.05);
  border-left: 4px solid var(--gold);
  border-radius: 0 8px 8px 0;
  margin-top: 1rem;
}

.chat-history {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.chat-bubble {
  max-width: 80%;
  padding: 1.25rem;
  border-radius: 16px;
  line-height: 1.6;
  position: relative;
  animation: slideUp 0.3s ease-out forwards;
  opacity: 0;
}

.chat-bubble.q {
  align-self: flex-end;
  background: linear-gradient(135deg, #2d1f4d 0%, #1e1338 100%);
  border: 1px solid rgba(139, 92, 246, 0.3);
  border-bottom-right-radius: 4px;
}

.chat-bubble.a {
  align-self: flex-start;
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.1) 0%, rgba(212, 175, 55, 0.02) 100%);
  border: 1px solid var(--gold-dim);
  border-bottom-left-radius: 4px;
}

.chat-bubble .label {
  font-size: 0.75rem;
  font-weight: bold;
  color: var(--gold);
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.chat-bubble.q .label {
  color: var(--accent);
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.empty-state {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--text-muted);
  font-size: 1.2rem;
  text-align: center;
  padding: 2rem;
}

/* Responsive Layout */
/* mobile-only widgets hidden on desktop */
#mobile-navbar, #sidebar-overlay { display: none; }

@media (max-width: 900px) {
  .overall-scores-strip {
    flex-wrap: wrap;
  }
  .score-chip {
    flex: 1 1 auto;
  }
}

@media (max-width: 768px) {
  body {
    display: block;
    height: auto;
  }
  .header {
    flex-direction: column;
    align-items: stretch;
    padding: 0.75rem 1rem;
    position: relative;
    gap: 0.6rem;
  }
  .header-right {
    align-items: stretch;
  }
  .header h1 {
    font-size: 1.3rem;
  }
  .header-sub {
    display: none;
  }
  .container {
    flex-direction: column;
    height: auto;
    overflow: visible;
  }
  /* sidebar becomes a slide-in drawer (off-canvas) */
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 86%;
    max-width: 330px;
    max-height: none;
    border-right: 2px solid var(--gold);
    border-bottom: none;
    background: #14102a;
    z-index: 200;
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.5);
  }
  .sidebar.drawer-open { transform: translateX(0); }

  #sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 150;
  }
  #sidebar-overlay.show { display: block; }

  .main-content {
    padding: 1rem 1rem 5rem 1rem;  /* bottom space for navbar */
    overflow-y: visible;
  }

  /* bottom nav: ‹ prev · ☰ list · next › — reachable right where you finish reading */
  #mobile-navbar {
    display: flex;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 120;
    gap: 0.5rem;
    padding: 0.55rem 0.7rem;
    background: rgba(15, 12, 30, 0.97);
    border-top: 1px solid var(--gold-dim);
    backdrop-filter: blur(8px);
  }
  #mobile-navbar button {
    background: rgba(212, 175, 55, 0.12);
    color: var(--gold);
    border: 1px solid var(--gold-dim);
    border-radius: 8px;
    padding: 0.7rem 0.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
  }
  #mobile-navbar button:active { background: rgba(212, 175, 55, 0.25); }
  #mobile-navbar button:disabled { opacity: 0.35; }
  #nav-prev, #nav-next { flex: 0 0 56px; font-size: 1.3rem; line-height: 1; }
  #nav-list {
    flex: 1 1 auto;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .details-header {
    flex-direction: column;
    gap: 1rem;
    align-items: center;
    text-align: center;
  }
  .details-scores {
    width: 100%;
    justify-content: space-around;
    background: rgba(0,0,0,0.2);
    padding: 1rem;
    border-radius: 8px;
  }
  .details-comment {
    font-size: 1rem;
  }
  .chat-bubble {
    max-width: 95%;
  }
}

@media (max-width: 480px) {
  .score-chip {
    flex: 1 1 50%;
  }
}

/* === V6/V7 additions === */

.badge {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 600;
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  margin-left: 0.3rem;
  vertical-align: middle;
  letter-spacing: 0.5px;
}
.badge.danger {
  background: rgba(239, 68, 68, 0.2);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.4);
}
.badge.vip {
  background: rgba(34, 197, 94, 0.15);
  color: #86efac;
  border: 1px solid rgba(34, 197, 94, 0.4);
}
.badge.meta {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-family: 'SF Mono', 'Monaco', monospace;
  font-size: 0.6rem;
}

.bucket-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.5rem;
}
.meta-tag {
  display: inline-block;
  font-size: 0.7rem;
  padding: 0.2rem 0.6rem;
  border-radius: 10px;
  background: rgba(139, 92, 246, 0.1);
  color: #c4b5fd;
  border: 1px solid rgba(139, 92, 246, 0.3);
}

.vip-info {
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  background: rgba(34, 197, 94, 0.06);
  border-left: 4px solid #22c55e;
  border-radius: 0 6px 6px 0;
  font-size: 0.9rem;
  color: #bbf7d0;
}
.vip-info code {
  background: rgba(0,0,0,0.4);
  padding: 0.1rem 0.4rem;
  border-radius: 3px;
  color: #86efac;
}
.vip-info.vip-not-promoted {
  background: rgba(239, 68, 68, 0.06);
  border-left-color: #ef4444;
  color: #fca5a5;
}

.danger-warning {
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  background: rgba(239, 68, 68, 0.1);
  border-left: 4px solid #ef4444;
  border-radius: 0 6px 6px 0;
  font-size: 0.95rem;
  color: #fca5a5;
}

.findings {
  margin-top: 1rem;
  padding: 1rem;
  border-radius: 8px;
  font-size: 0.9rem;
}
.findings h4 {
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
  color: var(--gold);
}
.findings ul {
  list-style: none;
  padding: 0;
}
.findings li {
  padding: 0.4rem 0 0.4rem 1.5rem;
  position: relative;
  line-height: 1.5;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.findings li:last-child {
  border-bottom: none;
}
.findings li::before {
  content: '';
  position: absolute;
  left: 0.3rem;
  top: 0.95rem;
  width: 6px;
  height: 6px;
  border-radius: 50%;
}
.findings.issues {
  background: rgba(239, 68, 68, 0.04);
  border-left: 3px solid rgba(239, 68, 68, 0.5);
}
.findings.issues li::before {
  background: #ef4444;
}
.findings.highlights {
  background: rgba(34, 197, 94, 0.04);
  border-left: 3px solid rgba(34, 197, 94, 0.5);
}
.findings.highlights li::before {
  background: #22c55e;
}

/* === Bucket A attachment / B fake_timestamp / B-C digest_edit === */

.badge.timestamp {
  background: rgba(56, 189, 248, 0.12);
  color: #7dd3fc;
  border: 1px solid rgba(56, 189, 248, 0.4);
}

.attachment {
  margin: 0.75rem 0;
  border: 1px solid rgba(139, 92, 246, 0.4);
  border-radius: 8px;
  background: rgba(139, 92, 246, 0.06);
  overflow: hidden;
}
.attachment-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0.75rem;
  cursor: pointer;
  font-size: 0.85rem;
  color: #c4b5fd;
  user-select: none;
  transition: background 0.2s ease;
}
.attachment-header:hover {
  background: rgba(139, 92, 246, 0.1);
}
.attachment-toggle {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 600;
}
.attachment-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  background: rgba(0, 0, 0, 0.25);
}
.attachment-body.expanded {
  max-height: 600px;
  overflow-y: auto;
}
.attachment-body pre {
  padding: 1rem;
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--text-main);
  margin: 0;
}
.attachment-body::-webkit-scrollbar {
  width: 6px;
}
.attachment-body::-webkit-scrollbar-thumb {
  background: var(--gold-dim);
}

.chat-question {
  margin-top: 0.5rem;
}

.digest-edit {
  align-self: center;
  max-width: 70%;
  margin: 0.5rem 0;
  padding: 0.6rem 0.9rem;
  background: rgba(251, 191, 36, 0.06);
  border: 1px dashed rgba(251, 191, 36, 0.4);
  border-radius: 8px;
  font-size: 0.8rem;
  color: #fde68a;
}
.digest-edit-header {
  font-weight: 600;
  margin-bottom: 0.3rem;
}
.digest-edit ul {
  list-style: none;
  padding-left: 0.5rem;
  margin: 0;
}
.digest-edit li {
  padding: 0.2rem 0;
  line-height: 1.4;
}
.digest-edit li strong {
  color: #fcd34d;
  font-family: 'SF Mono', monospace;
  font-size: 0.75rem;
  text-transform: uppercase;
}

/* === Scores overview table === */
.scores-overview {
  padding: 1.4rem 1.2rem;
  max-width: 1100px;
  margin: 0 auto;
}
.scores-overview h2 {
  font-size: 1.35rem;
  font-weight: 700;
  margin: 0 0 0.4rem 0;
  color: var(--gold);
  letter-spacing: 0.5px;
}
.scores-overview .so-sub {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 1.2rem;
}
.scores-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: rgba(26, 21, 48, 0.55);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 18px rgba(0,0,0,0.18);
}
.scores-table thead th {
  background: rgba(212, 175, 55, 0.12);
  color: var(--gold);
  font-weight: 700;
  text-align: left;
  padding: 0.7rem 0.8rem;
  font-size: 0.82rem;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--gold-dim);
  position: sticky;
  top: 0;
  z-index: 2;
}
.scores-table tbody td {
  padding: 0.65rem 0.8rem;
  font-size: 0.88rem;
  border-bottom: 1px solid rgba(212, 175, 55, 0.08);
  vertical-align: top;
}
.scores-table tbody tr:hover {
  background: rgba(212, 175, 55, 0.06);
  cursor: pointer;
}
.scores-table .ver {
  font-family: 'SF Mono', monospace;
  font-weight: 700;
  color: var(--gold);
  white-space: nowrap;
}
.scores-table .num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-family: 'SF Mono', monospace;
}
.scores-table .num.overall {
  font-weight: 700;
  color: var(--gold);
}
.scores-table .num.delta-pos { color: #34d399; }
.scores-table .num.delta-neg { color: #f87171; }
.scores-table .cohort {
  color: var(--text-muted);
  font-size: 0.78rem;
  max-width: 240px;
  line-height: 1.35;
}
.scores-table .bucket-row td {
  background: rgba(20, 16, 42, 0.6);
  padding: 0.5rem 0.8rem 0.5rem 1.6rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  border-bottom: 1px solid rgba(212, 175, 55, 0.05);
}
.scores-table .bucket-pill {
  display: inline-block;
  padding: 0.1rem 0.5rem;
  border-radius: 4px;
  background: rgba(212, 175, 55, 0.1);
  color: var(--gold);
  font-family: 'SF Mono', monospace;
  font-size: 0.72rem;
  margin-right: 0.5rem;
}

/* === Scores overview — new grid-aligned design === */
.scores-overview {
  padding: 1.4rem 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
}
.so-header { margin-bottom: 1.2rem; }
.scores-overview h2 {
  font-size: 1.35rem;
  font-weight: 700;
  margin: 0 0 0.3rem 0;
  color: var(--gold);
  letter-spacing: 0.5px;
}
.so-sub {
  color: var(--text-muted);
  font-size: 0.82rem;
}

.scores-grid {
  display: grid;
  grid-template-columns: 1fr;
  background: rgba(20, 16, 42, 0.55);
  border: 1px solid var(--gold-dim);
  border-radius: 10px;
  overflow: hidden;
}

/* shared grid template for header + row — Version | n | R | T | C | Overall | Tested | Notes */
.sg-header, .sg-row {
  display: grid;
  grid-template-columns: minmax(96px, 0.7fr) 40px 58px 58px 58px 78px 116px minmax(150px, 1.7fr);
  align-items: stretch;
  gap: 0;
  padding: 0;
}
/* full grid lines: vertical borders between every cell, horizontal between rows */
.sg-header > div, .sg-row > div {
  padding: 0.6rem 0.6rem;
  border-right: 1px solid rgba(212, 175, 55, 0.18);
  display: flex;
  align-items: center;
  overflow: hidden;   /* never bleed across the cell border */
  min-width: 0;       /* allow flex/grid child to shrink so overflow:hidden works */
}
.sg-header > div.num, .sg-row > div.num { justify-content: flex-end; }
.sg-header > div:last-child, .sg-row > div:last-child { border-right: none; }

.sg-header {
  background: rgba(212, 175, 55, 0.12);
  color: var(--gold);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--gold-dim);
  position: sticky;
  top: 0;
  z-index: 2;
}

.sg-row {
  border-bottom: 1px solid rgba(212, 175, 55, 0.18);
  cursor: pointer;
  transition: background 0.15s ease;
  font-size: 0.9rem;
}
.sg-row:hover {
  background: rgba(212, 175, 55, 0.06);
}
.sg-row.expanded {
  background: rgba(212, 175, 55, 0.05);
  border-bottom-color: transparent;
}

.sg-ver {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.ver-label {
  font-family: 'SF Mono', monospace;
  font-weight: 700;
  color: var(--gold);
  font-size: 0.92rem;
}
.toggle {
  color: var(--gold-dim);
  font-size: 0.75rem;
  width: 14px;
  display: inline-block;
  text-align: center;
  cursor: pointer;
  user-select: none;
  transition: color 0.15s, transform 0.15s;
}
.toggle:hover { color: var(--gold); }
.toggle-spacer { width: 14px; display: inline-block; }

.sg-row .num,
.sg-header .num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-family: 'SF Mono', monospace;
  padding-right: 0.5rem;
}
.sg-row .num.overall {
  font-weight: 700;
  font-size: 0.98rem;
}
.sg-row .num.sc-high { color: #34d399; }
.sg-row .num.sc-mid { color: #fcd34d; }
.sg-row .num.sc-low { color: #f87171; }

.delta {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 600;
  margin-left: 0.3rem;
  padding: 0 0.25rem;
  border-radius: 3px;
  vertical-align: 0.1em;
  font-family: 'SF Mono', monospace;
}
.delta.delta-pos {
  color: #34d399;
  background: rgba(52, 211, 153, 0.12);
}
.delta.delta-neg {
  color: #f87171;
  background: rgba(248, 113, 113, 0.12);
}

.tested {
  color: var(--text-muted);
  font-size: 0.72rem;
  font-family: 'SF Mono', monospace;
  flex-direction: column;
  align-items: flex-start !important;
  justify-content: center;
  gap: 0.05rem;
  line-height: 1.2;
}
.tested .t-date { white-space: nowrap; }
.tested .t-time { color: var(--gold-dim); font-size: 0.68rem; }
.pastro-commit {
  color: var(--gold-dim);
  font-size: 0.66rem;
  opacity: 0.85;
}
.cohort {
  color: var(--text-muted);
  font-size: 0.76rem;
  line-height: 1.4;
}
/* Notes column: wrap fully (no clamp), show all lines */
.sg-row > div.cohort, .sg-header > div.cohort {
  display: block;
  overflow: visible;
  white-space: normal;
  word-break: break-word;
  align-self: center;
}

/* Bucket sub-table */
.sg-buckets {
  background: rgba(15, 12, 30, 0.7);
  border-bottom: 1px solid rgba(212, 175, 55, 0.08);
  padding: 0.5rem 1.2rem 0.7rem 2.4rem;
}
.sg-buckets-inner {
  background: rgba(0, 0, 0, 0.25);
  border-radius: 6px;
  border: 1px solid rgba(212, 175, 55, 0.1);
}
.sgb-header, .sgb-row {
  display: grid;
  grid-template-columns: minmax(80px, 1fr) 50px 60px 60px 60px 60px;
  padding: 0.4rem 0.7rem;
  font-size: 0.8rem;
}
.sgb-header {
  color: var(--gold-dim);
  font-weight: 600;
  font-size: 0.72rem;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  border-bottom: 1px solid rgba(212, 175, 55, 0.1);
}
.sgb-row {
  border-top: 1px dashed rgba(212, 175, 55, 0.06);
  font-family: 'SF Mono', monospace;
}
.sgb-row:first-of-type { border-top: none; }
.sgb-row .num.sc-high { color: #34d399; }
.sgb-row .num.sc-mid { color: #fcd34d; }
.sgb-row .num.sc-low { color: #f87171; }
.sgb-row .num {
  text-align: right;
  padding-right: 0.4rem;
  font-variant-numeric: tabular-nums;
}

.bucket-pill {
  display: inline-block;
  padding: 0.12rem 0.5rem;
  border-radius: 4px;
  background: rgba(212, 175, 55, 0.14);
  color: var(--gold);
  font-family: 'SF Mono', monospace;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.3px;
}
