:root {
  color-scheme: dark;
  --bg: #060a12;
  --bg-elevated: #0c1222;
  --surface: rgba(18, 26, 42, 0.72);
  --surface-solid: #121a2a;
  --border: rgba(148, 163, 184, 0.12);
  --border-strong: rgba(148, 163, 184, 0.22);
  --text: #f1f5f9;
  --muted: #94a3b8;
  --muted-dim: #64748b;
  --accent: #38bdf8;
  --accent-2: #5eead4;
  --accent-dim: #0ea5e9;
  --ok: #34d399;
  --warn: #fbbf24;
  --danger: #fb7185;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 24px 48px rgba(0, 0, 0, 0.35);
  --font: "Inter", system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  font-family: var(--font);
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}

.bg-glow {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 80% 50% at 20% -10%, rgba(56, 189, 248, 0.18), transparent 55%),
    radial-gradient(ellipse 60% 40% at 90% 10%, rgba(94, 234, 212, 0.12), transparent 50%),
    radial-gradient(ellipse 50% 30% at 50% 100%, rgba(129, 140, 248, 0.08), transparent 45%),
    var(--bg);
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.15s ease;
}

a:hover {
  color: var(--accent-2);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1.5rem;
  border-bottom: 1px solid var(--border);
  background: rgba(6, 10, 18, 0.82);
  backdrop-filter: blur(16px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: inherit;
}

.brand:hover {
  text-decoration: none;
}

.brand-logo {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  box-shadow: 0 0 24px rgba(56, 189, 248, 0.25);
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
}

.brand-title {
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}

.brand-sub {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.nav {
  display: flex;
  gap: 0.25rem;
  flex-wrap: wrap;
}

.nav a {
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition:
    background 0.15s ease,
    color 0.15s ease;
}

.nav a:hover {
  color: var(--text);
  background: rgba(148, 163, 184, 0.08);
  text-decoration: none;
}

.nav a.active {
  color: var(--text);
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.2), rgba(94, 234, 212, 0.12));
  border: 1px solid rgba(56, 189, 248, 0.25);
}

.main {
  max-width: 1120px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

.footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  flex-wrap: wrap;
  padding: 1.25rem;
  font-size: 0.8rem;
  color: var(--muted-dim);
  border-top: 1px solid var(--border);
}

.footer-meta {
  color: var(--muted);
  font-weight: 500;
}

.loading,
.muted {
  color: var(--muted);
}

.error {
  color: var(--danger);
  padding: 1rem 1.15rem;
  background: rgba(251, 113, 133, 0.1);
  border-radius: var(--radius);
  border: 1px solid rgba(251, 113, 133, 0.3);
}

/* ── Home dashboard ───────────────────────────────────────────── */

.home-hero {
  margin-bottom: 2rem;
}

.home-hero h1 {
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin: 0 0 0.5rem;
  line-height: 1.15;
}

.home-hero h1 span {
  background: linear-gradient(135deg, var(--accent-2), var(--accent), #a78bfa);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.home-lead {
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 36rem;
  margin: 0 0 1.25rem;
  line-height: 1.6;
}

.home-status-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  border: 1px solid var(--border);
  background: var(--surface);
}

.status-pill::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 10px var(--ok);
}

.status-pill--warn::before {
  background: var(--warn);
  box-shadow: 0 0 10px var(--warn);
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 1.75rem;
}

@media (max-width: 900px) {
  .kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .kpi-grid {
    grid-template-columns: 1fr;
  }
}

.kpi-card {
  position: relative;
  padding: 1.15rem 1.2rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  backdrop-filter: blur(8px);
  overflow: hidden;
  transition:
    border-color 0.2s ease,
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.kpi-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.kpi-card::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  opacity: 0.6;
}

.kpi-card--pending::after {
  background: linear-gradient(90deg, var(--warn), #f97316);
}

.kpi-icon {
  font-size: 1.35rem;
  margin-bottom: 0.5rem;
  opacity: 0.9;
}

.kpi-label {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 0.35rem;
}

.kpi-value {
  font-size: 2rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.kpi-hint {
  margin-top: 0.5rem;
  font-size: 0.78rem;
  color: var(--muted-dim);
}

.home-panels {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

@media (max-width: 800px) {
  .home-panels {
    grid-template-columns: 1fr;
  }
}

.panel {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  padding: 1.35rem 1.4rem;
}

.panel-title {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
  margin: 0 0 1rem;
}

.pipeline-bar {
  display: flex;
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.8);
  margin-bottom: 0.75rem;
}

.pipeline-seg {
  min-width: 2px;
  transition: width 0.4s ease;
}

.pipeline-seg--done {
  background: linear-gradient(90deg, var(--accent-dim), var(--accent));
}

.pipeline-seg--queue {
  background: linear-gradient(90deg, var(--warn), #f97316);
}

.pipeline-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.8rem;
  color: var(--muted);
}

.pipeline-legend span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.dot--done {
  background: var(--accent);
}

.dot--queue {
  background: var(--warn);
}

.digest-feature {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.digest-feature-type {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent-2);
}

.digest-feature-date {
  font-size: 0.85rem;
  color: var(--muted);
}

.digest-feature-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 0.25rem;
}

.quick-links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}

@media (max-width: 640px) {
  .quick-links {
    grid-template-columns: 1fr;
  }
}

.quick-link {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 1rem 1.1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: rgba(12, 18, 34, 0.5);
  text-decoration: none;
  color: inherit;
  transition:
    border-color 0.15s ease,
    background 0.15s ease;
}

.quick-link:hover {
  border-color: rgba(56, 189, 248, 0.35);
  background: rgba(56, 189, 248, 0.08);
  text-decoration: none;
}

.quick-link strong {
  font-size: 0.95rem;
  font-weight: 600;
}

.quick-link span {
  font-size: 0.8rem;
  color: var(--muted);
}

/* ── Legacy shared components ─────────────────────────────────── */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
}

.card-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin-bottom: 0.25rem;
}

.card-value {
  font-size: 1.75rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.section-title {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 1.25rem;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

th,
td {
  padding: 0.65rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

th {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

tr:last-child td {
  border-bottom: none;
}

tr:hover td {
  background: rgba(56, 189, 248, 0.05);
}

.badge {
  display: inline-block;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.badge-daily {
  background: rgba(56, 189, 248, 0.15);
  color: var(--accent);
}

.badge-decision {
  text-transform: uppercase;
  font-size: 0.7rem;
  letter-spacing: 0.04em;
}

.badge-adopt {
  background: rgba(52, 211, 153, 0.15);
  color: var(--ok);
}

.badge-test {
  background: rgba(56, 189, 248, 0.15);
  color: var(--accent);
}

.badge-monitor {
  background: rgba(251, 191, 36, 0.15);
  color: var(--warn);
}

.badge-ignore {
  background: rgba(148, 163, 184, 0.12);
  color: var(--muted);
}

.badge-weekly {
  background: rgba(52, 211, 153, 0.12);
  color: var(--ok);
}

.filter-row {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.filter-row select {
  background: var(--surface-solid);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.4rem 0.6rem;
  font-family: inherit;
}

.item-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.actions {
  margin: 1rem 0;
}

.score-history {
  list-style: none;
  padding: 0;
  margin: 0;
}

.score-history li {
  padding: 0.35rem 0;
  border-bottom: 1px solid var(--border);
}

.digest-report {
  max-width: 100%;
}

.digest-header {
  margin-bottom: 1.25rem;
}

.digest-back {
  margin: 0 0 0.5rem;
}

.digest-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0 0 0.35rem;
}

.digest-meta {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0;
}

.digest-summary-cards {
  margin-bottom: 1.5rem;
}

.digest-section {
  margin-bottom: 2rem;
}

.digest-section-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0 0 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.digest-section-count {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--muted);
  background: var(--bg-elevated);
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
}

.digest-item-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 0.75rem;
}

.digest-item-card {
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
}

.digest-item-head {
  margin-bottom: 0.5rem;
}

.digest-item-badges {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}

.digest-score-pill {
  font-size: 0.85rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--accent);
}

.digest-item-title {
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 0.2rem;
  line-height: 1.3;
}

.digest-item-category {
  display: inline-block;
  font-size: 0.75rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.digest-item-links {
  font-size: 0.85rem;
  margin-bottom: 0.6rem;
}

.digest-reasons {
  margin: 0;
  padding: 0;
  list-style: none;
}

.digest-reasons li {
  font-size: 0.85rem;
  padding: 0.25rem 0.5rem;
  margin-bottom: 0.25rem;
  background: rgba(56, 189, 248, 0.06);
  border-radius: 6px;
  border-left: 2px solid var(--accent-dim);
}

.digest-label {
  display: block;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin-bottom: 0.15rem;
}

.digest-risks ul {
  margin: 0;
  padding-left: 1rem;
  font-size: 0.85rem;
  color: var(--warn);
}

.digest-next {
  margin: 0.6rem 0 0;
  font-size: 0.85rem;
}

.digest-empty {
  grid-column: 1 / -1;
  padding: 0.5rem 0;
}

.digest-article {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
}

.digest-article--legacy {
  max-width: 42rem;
}

.digest-article h1 {
  font-size: 1.35rem;
  margin-top: 0;
}

.digest-article h2 {
  font-size: 1.05rem;
  margin-top: 1.5rem;
  color: var(--accent);
}

.digest-article h3 {
  font-size: 0.95rem;
  margin-top: 1rem;
}

.digest-article ul {
  padding-left: 1.25rem;
}

.digest-article code {
  background: var(--bg-elevated);
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  font-size: 0.85em;
  font-family: var(--mono);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.55rem 1.15rem;
  background: linear-gradient(135deg, var(--accent-dim), #0284c7);
  color: #fff;
  border-radius: 999px;
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease,
    filter 0.15s ease;
  box-shadow: 0 4px 20px rgba(14, 165, 233, 0.35);
}

.btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
  text-decoration: none;
  color: #fff;
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border-strong);
  box-shadow: none;
}

.btn-ghost:hover {
  background: rgba(148, 163, 184, 0.08);
  color: var(--text);
}

.item-detail {
  max-width: 52rem;
}

.item-back {
  margin: 0 0 0.75rem;
}

.item-hero {
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.item-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
  line-height: 1.25;
}

.item-hero-meta {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
}

.item-points {
  font-size: 0.85rem;
}

.item-source-link {
  font-size: 0.9rem;
}

.item-section {
  margin-bottom: 1.5rem;
}

.item-section-title {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin: 0 0 0.6rem;
}

.item-dl {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr));
  gap: 0.5rem 1rem;
  margin: 0;
  padding: 0.85rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.item-dl-row {
  display: contents;
}

.item-dl dt {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin: 0;
}

.item-dl dd {
  margin: 0 0 0.5rem;
  font-size: 0.9rem;
}

.item-text-block {
  margin-bottom: 1rem;
}

.item-text-block p {
  margin: 0.35rem 0 0;
  line-height: 1.55;
}

.item-reasons {
  margin-top: 0.25rem;
}

.item-risks-list {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--warn);
  font-size: 0.9rem;
}

.item-next {
  margin: 0;
  font-size: 0.95rem;
}

.item-next-hint {
  font-size: 0.85rem;
  margin: 0 0 1rem;
}

.item-raw-details {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.5rem 0.75rem;
}

.item-raw-details summary {
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--accent);
}

.item-feedback-history {
  margin: 0 0 1rem;
  padding: 0;
  list-style: none;
}

.item-feedback-history li {
  font-size: 0.85rem;
  padding: 0.35rem 0;
  border-bottom: 1px solid var(--border);
}

.item-feedback-form textarea {
  width: 100%;
  max-width: 28rem;
  background: var(--bg-elevated);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.5rem;
  font-family: inherit;
}

.item-raw-pre {
  margin: 0.75rem 0 0;
  padding: 0.75rem;
  background: var(--bg-elevated);
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  line-height: 1.45;
  overflow-x: auto;
  max-height: 24rem;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: var(--mono);
}

.explorer-header {
  margin-bottom: 1rem;
}

.explorer-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  margin-bottom: 1.25rem;
  padding: 1rem 1.1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.filter-row--check input {
  margin-right: 0.35rem;
}

.filter-row--search {
  flex: 1 1 100%;
  min-width: min(100%, 20rem);
}

.filter-row--search input[type="search"] {
  width: 100%;
  max-width: 36rem;
  margin-top: 0.25rem;
  padding: 0.45rem 0.65rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
}

.badge-similarity {
  background: rgba(52, 211, 153, 0.18);
  color: #6ee7b7;
  font-variant-numeric: tabular-nums;
}

.search-mode-hint {
  margin: 0.5rem 0 1rem;
}

.item-related-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.item-related-list li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
  padding: 0.35rem 0;
  border-bottom: 1px solid var(--border);
}

.item-related-list li:last-child {
  border-bottom: none;
}

.item-related-hint {
  margin-top: 0.5rem;
  font-size: 0.85rem;
}

.item-related-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.65rem;
  font-size: 0.9rem;
  cursor: pointer;
}

.item-related-empty {
  margin: 0.25rem 0 0.5rem;
  line-height: 1.45;
}

.search-empty-hint {
  margin: 0.35rem 0 1rem;
  padding: 0.65rem 0.85rem;
  border-left: 3px solid var(--accent, #38bdf8);
  background: color-mix(in srgb, var(--surface-elevated, #1e293b) 92%, transparent);
  font-size: 0.9rem;
  line-height: 1.45;
}

.semantic-dup-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.75rem 1.25rem;
  margin: 0 0 1rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-elevated, rgba(30, 41, 59, 0.5));
}

.semantic-dup-threshold-label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.9rem;
  min-width: min(100%, 280px);
}

.semantic-dup-threshold-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.semantic-dup-threshold-row input[type="range"] {
  flex: 1;
  min-width: 120px;
}

.semantic-dup-threshold-row output {
  font-variant-numeric: tabular-nums;
  min-width: 3ch;
  font-weight: 600;
}

.semantic-dup-table th,
.semantic-dup-table td {
  vertical-align: middle;
}

.semantic-dup-actions {
  white-space: nowrap;
}

.semantic-dup-actions .btn-sm {
  padding: 0.2rem 0.45rem;
  font-size: 0.8rem;
  margin-right: 0.25rem;
}

.search-empty {
  margin: 0.5rem 0 1rem;
}

.signal-cell {
  white-space: nowrap;
}

.signal-cell .badge {
  margin-right: 0.25rem;
  margin-bottom: 0.15rem;
}

.badge-tier-viral {
  background: rgba(167, 139, 250, 0.2);
  color: #c4b5fd;
}

.badge-tier-popular {
  background: rgba(56, 189, 248, 0.18);
  color: var(--accent);
}

.badge-tier-growing {
  background: rgba(52, 211, 153, 0.15);
  color: var(--ok);
}

.badge-tier-niche {
  background: rgba(148, 163, 184, 0.12);
  color: var(--muted);
}

.badge-activity-active {
  background: rgba(52, 211, 153, 0.12);
  color: var(--ok);
}

.badge-activity-dormant {
  background: rgba(248, 113, 113, 0.12);
  color: #fca5a5;
}

.badge-embed-missing {
  background: rgba(251, 191, 36, 0.15);
  color: #b45309;
  border: 1px solid rgba(251, 191, 36, 0.35);
}

.badge-quality-warn {
  background: rgba(251, 191, 36, 0.15);
  color: var(--warn);
}

.badge-health-healthy {
  background: rgba(52, 211, 153, 0.12);
  color: var(--ok);
}

.badge-health-degraded {
  background: rgba(251, 191, 36, 0.15);
  color: var(--warn);
}

.badge-health-noisy {
  background: rgba(248, 113, 113, 0.12);
  color: #fca5a5;
}

.badge-health-unknown {
  background: rgba(148, 163, 184, 0.12);
  color: var(--muted);
}

.compare-form {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: flex-end;
  margin: 1rem 0 1.5rem;
}

.compare-form label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.compare-form input {
  min-width: 12rem;
  padding: 0.45rem 0.6rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
}

.item-adoption .badge {
  margin-right: 0.35rem;
}
