/* ---------- Claude-themed design tokens ---------- */
:root {
  /* light — Claude cream */
  --bg:         hsl(40 30% 96%);          /* #faf9f5 */
  --bg-2:       hsl(40 26% 92%);          /* #f1ede4 */
  --surface:    hsl(40 30% 99%);          /* near-white cream */
  --popover:    hsl(40 30% 99%);
  --ink:        hsl(24 8% 11%);           /* warm near-black */
  --ink-2:      hsl(24 7% 28%);
  --ink-3:      hsl(24 5% 46%);
  --line:       hsl(40 14% 84%);
  --line-2:     hsl(40 12% 76%);
  --line-soft:  hsl(40 14% 84%);
  --muted:      hsl(40 22% 94%);
  --muted-fg:   hsl(24 5% 46%);
  --accent:     hsl(15 63% 59%);          /* Claude coral #d97757 */
  --accent-2:   hsl(15 70% 94%);
  --accent-ink: hsl(0 0% 100%);
  --primary:    hsl(15 63% 59%);          /* same coral — active states */
  --primary-fg: hsl(0 0% 100%);
  --primary-2:  hsl(15 65% 52%);          /* hover */
  --warn:       hsl(38 75% 48%);
  --warn-bg:    hsl(38 75% 94%);
  --ok:         hsl(150 50% 38%);
  --ok-bg:      hsl(150 45% 93%);
  --info:       hsl(208 65% 48%);
  --info-bg:    hsl(208 70% 95%);
  --neutral:    hsl(24 5% 46%);
  --hover:      hsl(40 22% 94%);

  --radius:     0.5rem;
  --radius-sm:  0.375rem;
  --radius-xs:  0.25rem;
  --radius-lg:  0.625rem;
  --radius-full: 9999px;

  --shadow-sm:  0 1px 2px 0 rgb(24 18 12 / 0.06);
  --shadow:     0 1px 3px 0 rgb(24 18 12 / 0.08), 0 1px 2px -1px rgb(24 18 12 / 0.06);
  --shadow-md:  0 4px 8px -2px rgb(24 18 12 / 0.10), 0 2px 4px -2px rgb(24 18 12 / 0.06);
  --shadow-lg:  0 12px 24px -6px rgb(24 18 12 / 0.14), 0 4px 8px -4px rgb(24 18 12 / 0.08);
  --shadow-xl:  0 24px 40px -8px rgb(24 18 12 / 0.18), 0 8px 16px -8px rgb(24 18 12 / 0.10);
}

[data-theme="dark"] {
  --bg:         hsl(24 10% 9%);           /* warm near-black */
  --bg-2:       hsl(24 8% 12%);
  --surface:    hsl(24 9% 13%);
  --popover:    hsl(24 9% 13%);
  --ink:        hsl(40 25% 94%);          /* warm cream text */
  --ink-2:      hsl(40 15% 80%);
  --ink-3:      hsl(40 8% 60%);
  --line:       hsl(24 8% 22%);
  --line-2:     hsl(24 8% 28%);
  --line-soft:  hsl(24 8% 22%);
  --muted:      hsl(24 8% 16%);
  --muted-fg:   hsl(40 8% 60%);
  --accent:     hsl(15 65% 62%);          /* slightly lighter coral on dark */
  --accent-2:   hsl(15 35% 22%);
  --accent-ink: hsl(0 0% 100%);
  --primary:    hsl(15 65% 62%);
  --primary-fg: hsl(0 0% 100%);
  --primary-2:  hsl(15 70% 68%);
  --warn:       hsl(38 78% 60%);
  --warn-bg:    hsl(38 35% 18%);
  --ok:         hsl(150 55% 50%);
  --ok-bg:      hsl(150 30% 16%);
  --info:       hsl(208 70% 60%);
  --info-bg:    hsl(208 35% 18%);
  --hover:      hsl(24 8% 16%);
}

* { box-sizing: border-box; }
html, body, #root { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 14px/1.5 "Geist", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "ss01", "cv11";
}
.mono { font-family: "JetBrains Mono", "Geist Mono", ui-monospace, monospace; }
button { font: inherit; color: inherit; }
::selection { background: hsl(240 5.9% 10% / .15); }

/* ---------- app shell ---------- */
.app {
  min-height: 100%;
  display: grid;
  grid-template-columns: var(--sb-w, 240px) 1fr;
  transition: grid-template-columns 220ms cubic-bezier(.2,.7,.3,1);
}
.app.sb-collapsed { --sb-w: 64px; }

.sidebar {
  position: sticky; top: 0;
  height: 100vh;
  border-right: 1px solid var(--line);
  background: var(--bg-2);
  display: flex; flex-direction: column;
  overflow: hidden;
  z-index: 40;
}

.brand-mark {
  width: 28px; height: 28px;
  background: var(--primary);
  color: var(--primary-fg);
  border-radius: var(--radius-sm);
  display: grid; place-items: center;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: -.02em;
  flex-shrink: 0;
}

.sb-brand {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  font-weight: 600;
  letter-spacing: -.01em;
  white-space: nowrap;
  overflow: hidden;
  min-height: 56px;
}
.sb-brand-text {
  display: flex; flex-direction: column;
  gap: 0;
  min-width: 0;
  opacity: 1;
  transition: opacity 140ms;
}
.app.sb-collapsed .sb-brand-text { opacity: 0; pointer-events: none; }
.sb-brand-text .name {
  font-size: 14px; font-weight: 600; letter-spacing: -.005em;
}
.sb-brand-text .sub {
  font-size: 11.5px;
  color: var(--ink-3);
  font-weight: 400;
}

.sb-nav {
  display: flex; flex-direction: column;
  padding: 12px 8px 8px;
  gap: 1px;
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
}
.sb-nav-label {
  font-size: 11px;
  color: var(--ink-3);
  padding: 10px 12px 6px;
  font-weight: 500;
  white-space: nowrap;
  opacity: 1;
  transition: opacity 140ms;
}
.app.sb-collapsed .sb-nav-label { opacity: 0; height: 0; padding: 0; overflow: hidden; }

.sb-item {
  appearance: none; border: 0; background: transparent;
  display: flex; align-items: center; gap: 10px;
  padding: 7px 10px;
  font: inherit; color: var(--ink-2);
  cursor: pointer;
  text-align: left;
  position: relative;
  white-space: nowrap;
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: -.003em;
  min-height: 34px;
  border-radius: var(--radius-sm);
  transition: background 100ms, color 100ms;
}
.sb-item:hover { background: var(--hover); color: var(--ink); }
.sb-item.active {
  background: var(--primary);
  color: var(--primary-fg);
}
.sb-item .ic {
  width: 20px; height: 20px;
  display: grid; place-items: center;
  flex-shrink: 0;
  color: currentColor;
}
.sb-item .ic svg { width: 18px; height: 18px; }
.sb-item .label {
  flex: 1; min-width: 0;
  overflow: hidden; text-overflow: ellipsis;
  opacity: 1; transition: opacity 140ms;
}
.sb-item .badge {
  font-size: 10.5px;
  background: var(--accent);
  color: var(--accent-ink);
  padding: 1px 6px;
  font-weight: 600;
  letter-spacing: 0;
  flex-shrink: 0;
  border-radius: var(--radius-full);
  font-variant-numeric: tabular-nums;
  min-width: 18px;
  text-align: center;
}
.sb-item.active .badge { background: var(--bg); color: var(--ink); }
.app.sb-collapsed .sb-item .label,
.app.sb-collapsed .sb-item .badge { opacity: 0; pointer-events: none; }
.app.sb-collapsed .sb-item { padding: 8px 0; justify-content: center; }

.sb-foot {
  border-top: 1px solid var(--line);
  padding: 8px;
  display: flex; flex-direction: column;
  gap: 4px;
}
.sb-run {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px;
  font-size: 11.5px;
  color: var(--ink-2);
  background: var(--muted);
  border-radius: var(--radius-sm);
  white-space: nowrap;
  overflow: hidden;
}
.app.sb-collapsed .sb-run {
  justify-content: center;
  padding: 8px;
  background: transparent;
}
.app.sb-collapsed .sb-run-text { opacity: 0; pointer-events: none; width: 0; }
.sb-run-text {
  display: flex; flex-direction: column;
  gap: 0;
  min-width: 0;
}
.sb-run-text .l1 { font-weight: 500; color: var(--ink); font-size: 12px; }
.sb-run-text .l2 { color: var(--ink-3); font-size: 11px; }

.run-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 3px hsl(142 71% 36% / 0.18);
  animation: pulse 2.4s ease-in-out infinite;
  flex-shrink: 0;
}
@keyframes pulse { 0%, 100% { opacity: .9; } 50% { opacity: .4; } }

.sb-user {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px;
  white-space: nowrap;
  overflow: hidden;
  border-radius: var(--radius-sm);
}
.sb-user:hover { background: var(--hover); }
.app.sb-collapsed .sb-user { justify-content: center; padding: 8px; }
.sb-user-text { display: flex; flex-direction: column; gap: 0; min-width: 0; }
.app.sb-collapsed .sb-user-text { opacity: 0; pointer-events: none; width: 0; }
.sb-user-text .nm { font-size: 12.5px; font-weight: 500; }
.sb-user-text .em { font-size: 11px; color: var(--ink-3); }
.avatar {
  width: 30px; height: 30px;
  background: var(--muted);
  color: var(--ink);
  display: grid; place-items: center;
  font-weight: 600;
  font-size: 11.5px;
  border-radius: 50%;
  flex-shrink: 0;
  border: 1px solid var(--line);
}

.sb-collapse {
  appearance: none;
  background: transparent;
  margin: 4px 8px 10px;
  padding: 6px 10px;
  font-size: 11.5px;
  color: var(--ink-3);
  cursor: pointer;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; gap: 8px;
  justify-content: center;
  white-space: nowrap;
  font-weight: 500;
}
.sb-collapse:hover { color: var(--ink); border-color: var(--line-2); background: var(--hover); }
.app.sb-collapsed .sb-collapse .lbl { display: none; }
.sb-collapse .arrow { transition: transform 200ms; display: grid; place-items: center; }
.app.sb-collapsed .sb-collapse .arrow { transform: rotate(180deg); }

/* ---------- main ---------- */
.main { padding: 24px 32px 80px; max-width: 1400px; margin: 0 auto; width: 100%; min-width: 0; }

.page-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  margin-bottom: 24px;
  gap: 24px;
  flex-wrap: wrap;
}
.eyebrow {
  font-size: 12px;
  color: var(--ink-3);
  margin-bottom: 6px;
  display: flex; align-items: center; gap: 8px;
  font-weight: 500;
  white-space: nowrap;
}
.eyebrow .accent-bar { display: none; }
h1.page-title {
  margin: 0;
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.15;
}
.page-sub {
  color: var(--ink-3);
  font-size: 14px;
  margin-top: 6px;
  max-width: 580px;
  line-height: 1.5;
}

/* page-head right slot used for inline controls (date picker) */
.page-head-actions {
  display: flex; align-items: center; gap: 8px;
  flex-shrink: 0;
}

/* ---------- buttons ---------- */
.btn {
  appearance: none;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border-radius: var(--radius-sm);
  display: inline-flex; align-items: center; gap: 6px;
  transition: background 100ms, border-color 100ms;
  white-space: nowrap;
  height: 34px;
  letter-spacing: -.003em;
}
.btn:hover { background: var(--muted); }
.btn:active { background: var(--hover); }
.btn.primary {
  background: var(--primary); color: var(--primary-fg);
  border-color: var(--primary);
}
.btn.primary:hover { background: var(--primary-2); border-color: var(--primary-2); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--hover); }
.btn.danger { color: var(--accent); border-color: var(--accent); }
.btn.danger:hover { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn.sm { padding: 4px 10px; font-size: 12px; height: 28px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

/* ---------- stat cards ---------- */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
}
.stat {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px 14px;
  cursor: pointer;
  position: relative;
  transition: border-color 120ms, background 120ms;
  display: flex; flex-direction: column;
  gap: 6px;
  min-height: 132px;
  overflow: hidden;
  min-width: 0;
  text-align: left;
}
.stat:hover { border-color: var(--line-2); background: var(--bg-2); }
.stat.active {
  background: var(--primary);
  color: var(--primary-fg);
  border-color: var(--primary);
}
.stat.active .stat-label,
.stat.active .stat-delta { color: hsl(0 0% 100% / .65); }
.stat.active .stat-delta.up { color: hsl(142 71% 65%); }
.stat.active .stat-delta.down { color: hsl(0 84% 75%); }
.stat-label {
  font-size: 12.5px;
  color: var(--ink-3);
  font-weight: 500;
  letter-spacing: -.003em;
}
.stat-value {
  font-size: 32px;
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.stat-delta {
  font-size: 11.5px;
  color: var(--ink-3);
  display: flex; align-items: center; gap: 4px;
  margin-top: auto;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.stat-delta.up { color: var(--ok); }
.stat-delta.down { color: var(--accent); }
.stat-trend {
  position: absolute;
  right: 14px; top: 16px;
  width: 50px; height: 22px;
  opacity: .35;
}
.stat.active .stat-trend { opacity: .8; }

/* needs-attention callout */
.callout {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px;
  border: 1px solid hsl(15 55% 80%);
  background: var(--accent-2);
  margin-top: 18px;
  font-size: 13.5px;
  border-radius: var(--radius);
  color: hsl(15 50% 30%);
}
[data-theme="dark"] .callout {
  border-color: hsl(15 35% 32%);
  color: hsl(15 80% 82%);
}
.callout .tag {
  background: var(--accent); color: var(--accent-ink);
  padding: 2px 9px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
  border-radius: var(--radius-full);
}
.callout-text { flex: 1; }
.callout-text b { font-weight: 600; color: var(--ink); }

/* ---------- table toolbar ---------- */
.toolbar {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.search {
  flex: 1; min-width: 240px;
  display: flex; align-items: center; gap: 8px;
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 0 12px;
  height: 36px;
  border-radius: var(--radius-sm);
}
.search:focus-within { border-color: var(--ink-3); box-shadow: 0 0 0 3px hsl(240 5.9% 10% / .08); }
.search input {
  flex: 1; appearance: none; border: 0; background: transparent;
  font: inherit; color: inherit; outline: none;
  padding: 2px 0;
}
.search .kbd {
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  padding: 1px 5px;
  border: 1px solid var(--line);
  color: var(--ink-3);
  border-radius: var(--radius-xs);
  background: var(--muted);
}

.filters {
  display: inline-flex; gap: 0;
  border: 1px solid var(--line);
  background: var(--muted);
  padding: 3px;
  border-radius: var(--radius-sm);
  height: 36px;
}
.filter-btn {
  appearance: none; background: transparent; border: 0;
  padding: 0 12px;
  font: inherit;
  color: var(--ink-3);
  cursor: pointer;
  font-size: 12.5px;
  font-weight: 500;
  white-space: nowrap;
  flex-shrink: 0;
  border-radius: var(--radius-xs);
  display: inline-flex; align-items: center; gap: 6px;
  transition: background 100ms, color 100ms;
  height: 100%;
}
.filter-btn:hover { color: var(--ink); }
.filter-btn.active {
  background: var(--surface); color: var(--ink);
  box-shadow: var(--shadow-sm);
}
.filter-btn .count {
  font-size: 11px;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
  font-weight: 500;
}
.filter-btn.active .count { color: var(--ink-2); }

/* ---------- table ---------- */
.table-wrap {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: var(--radius);
  /* DO NOT clip — popovers (sources) must be able to escape */
}
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}
.table thead th {
  text-align: left;
  font-size: 12px;
  color: var(--ink-3);
  font-weight: 500;
  padding: 10px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--bg-2);
  white-space: nowrap;
  letter-spacing: -.003em;
}
.table thead th.sortable { cursor: pointer; user-select: none; }
.table thead th.sortable:hover { color: var(--ink); }
.table thead th .arr { opacity: .4; margin-left: 4px; font-size: 10px; }
.table thead th.sorted .arr { opacity: 1; color: var(--ink); }

.table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
.table tbody tr:last-child td { border-bottom: none; }
.table tbody tr { transition: background 80ms; }
.table tbody tr.clickable { cursor: pointer; }
.table tbody tr.clickable:hover { background: var(--bg-2); }
.table tbody tr.selected { background: var(--accent-2); }
.table tbody tr.disabled { opacity: .55; }
.table tbody tr.disabled.clickable { cursor: default; }

/* density variants */
.density-compact .table td { padding: 8px 16px; font-size: 12.5px; }
.density-compact .table thead th { padding: 8px 16px; }
.density-compact .agent-why { display: none; }

.density-comfortable .table td { padding: 16px; }

.density-cards .table thead { display: none; }
.density-cards .table tr,
.density-cards .table tbody,
.density-cards .table { display: block; }
.density-cards .table-wrap { border: 0; background: transparent; padding: 0; overflow: visible; }
.density-cards .table tr {
  display: grid;
  grid-template-columns: 32px 1fr auto;
  gap: 14px;
  align-items: start;
  padding: 18px 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 10px;
}
.density-cards .table tr.clickable:hover { border-color: var(--line-2); }
.density-cards .table td { border: 0; padding: 0; display: block; }
.density-cards .col-select { grid-row: 1; }
.density-cards .col-topic { grid-row: 1; grid-column: 2; }
.density-cards .col-actions { grid-row: 1; grid-column: 3; align-self: center; }
.density-cards .col-source,
.density-cards .col-metrics,
.density-cards .col-status,
.density-cards .col-time {
  grid-column: 2;
  display: flex; align-items: center; gap: 8px;
  font-size: 12px;
  color: var(--ink-3);
}
.density-cards .col-source::before { content: "Sources"; color: var(--ink-3); margin-right: 4px; opacity: .7; }
.density-cards .col-metrics::before { content: "Metrics"; color: var(--ink-3); margin-right: 4px; opacity: .7; }
.density-cards .col-status::before { content: "Status"; color: var(--ink-3); margin-right: 4px; opacity: .7; }
.density-cards .col-time::before { content: "Found"; color: var(--ink-3); margin-right: 4px; opacity: .7; }

.topic-name {
  font-weight: 500;
  letter-spacing: -.005em;
  color: var(--ink);
}
.agent-why {
  font-size: 12px;
  color: var(--ink-3);
  margin-top: 4px;
  display: flex; align-items: flex-start; gap: 6px;
  max-width: 540px;
  line-height: 1.45;
}
.agent-why::before {
  content: "✦";
  color: var(--accent);
  font-size: 9px;
  margin-top: 4px;
}

.checkbox {
  appearance: none;
  width: 16px; height: 16px;
  border: 1px solid var(--line-2);
  background: var(--surface);
  display: inline-grid; place-items: center;
  cursor: pointer;
  flex-shrink: 0;
  border-radius: var(--radius-xs);
  transition: background 100ms, border-color 100ms;
}
.checkbox:hover { border-color: var(--ink-3); }
.checkbox:checked {
  background: var(--primary); border-color: var(--primary);
}
.checkbox:checked::after {
  content: "";
  width: 8px; height: 4px;
  border-left: 1.5px solid var(--primary-fg);
  border-bottom: 1.5px solid var(--primary-fg);
  transform: rotate(-45deg) translate(1px, -1px);
}

/* sources */
.sources { display: inline-flex; align-items: center; gap: 4px; cursor: pointer; }
.src-icon {
  width: 24px; height: 24px;
  display: inline-grid; place-items: center;
  border: 1px solid var(--line);
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  font-weight: 600;
  background: var(--surface);
  border-radius: var(--radius-sm);
  transition: border-color 100ms, background 100ms;
}
.sources:hover .src-icon { border-color: var(--ink-3); background: var(--muted); }
.src-icon.gt { color: #4285F4; }
.src-icon.x  { color: var(--ink); }
.src-icon.rd { color: #ff4500; }

/* metrics */
.metrics { display: flex; align-items: center; gap: 14px; }
.metric { display: flex; flex-direction: column; gap: 1px; }
.metric .v {
  font-size: 13px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}
.metric .l {
  font-size: 10.5px;
  color: var(--ink-3);
  font-weight: 500;
}
.momentum {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  font-weight: 500;
}
.momentum.rising  { color: var(--ok); }
.momentum.falling { color: var(--accent); }
.momentum.steady  { color: var(--ink-3); }

/* score bar */
.score-bar {
  width: 64px; height: 4px;
  background: var(--muted);
  position: relative;
  border-radius: var(--radius-full);
  overflow: hidden;
}
.score-bar > span {
  position: absolute; left: 0; top: 0; bottom: 0;
  background: var(--ink);
  border-radius: var(--radius-full);
}
.score-bar.high > span { background: var(--accent); }

/* ---------- pills / badges (shadcn) ---------- */
.pill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 2px 9px;
  font-size: 11.5px;
  font-weight: 500;
  white-space: nowrap;
  border-radius: var(--radius-full);
  letter-spacing: -.003em;
}
/* shadcn subtle badge: tinted bg + same-hue text */
.pill-solid.pill-pending   { background: var(--warn-bg);   color: hsl(28 75% 32%); }
.pill-solid.pill-approved  { background: var(--ok-bg);     color: hsl(150 50% 26%); }
.pill-solid.pill-rejected  { background: var(--accent-2);  color: hsl(15 55% 38%); }
.pill-solid.pill-queue     { background: var(--info-bg);   color: hsl(208 65% 32%); }
.pill-solid.pill-completed { background: var(--muted);     color: var(--ink-2); }

[data-theme="dark"] .pill-solid.pill-pending   { color: hsl(38 90% 75%); }
[data-theme="dark"] .pill-solid.pill-approved  { color: hsl(150 55% 75%); }
[data-theme="dark"] .pill-solid.pill-rejected  { color: hsl(15 80% 78%); }
[data-theme="dark"] .pill-solid.pill-queue     { color: hsl(208 80% 78%); }

/* outline variant */
.pill-outline {
  border: 1px solid var(--line-2);
  padding: 1px 8px;
  background: transparent;
  color: var(--ink-2);
}
.pill-outline.pill-pending   { color: var(--warn);   border-color: var(--warn); }
.pill-outline.pill-approved  { color: var(--ok);     border-color: var(--ok); }
.pill-outline.pill-rejected  { color: var(--accent); border-color: var(--accent); }
.pill-outline.pill-queue     { color: var(--info);   border-color: var(--info); }
.pill-outline.pill-completed { color: var(--ink-2);  border-color: var(--line-2); }

/* dot variant — minimal */
.pill-dot {
  background: transparent;
  padding: 2px 0;
  color: var(--ink-2);
  font-weight: 500;
  border-radius: 0;
}
.pill-dot .dot {
  width: 7px; height: 7px;
  display: inline-block;
  border-radius: 50%;
}
.pill-dot.pill-pending   .dot { background: var(--warn); }
.pill-dot.pill-approved  .dot { background: var(--ok); }
.pill-dot.pill-rejected  .dot { background: var(--accent); }
.pill-dot.pill-queue     .dot { background: var(--info); }
.pill-dot.pill-completed .dot { background: var(--ink-3); }

/* ticket variant — left bar accent */
.pill-ticket {
  background: var(--muted);
  padding: 2px 9px 2px 11px;
  position: relative;
  color: var(--ink-2);
  border-radius: var(--radius-xs);
  border: 1px solid var(--line);
}
.pill-ticket::before {
  content: "";
  position: absolute; left: 0; top: 2px; bottom: 2px;
  width: 3px;
  border-radius: var(--radius-full);
}
.pill-ticket.pill-pending::before   { background: var(--warn); }
.pill-ticket.pill-approved::before  { background: var(--ok); }
.pill-ticket.pill-rejected::before  { background: var(--accent); }
.pill-ticket.pill-queue::before     { background: var(--info); }
.pill-ticket.pill-completed::before { background: var(--ink-2); }

/* ---------- bulk action bar ---------- */
.bulkbar {
  position: sticky; bottom: 16px;
  margin: 16px auto 0;
  background: var(--primary);
  color: var(--primary-fg);
  padding: 8px 8px 8px 16px;
  display: flex; align-items: center; gap: 10px;
  z-index: 30;
  box-shadow: var(--shadow-xl);
  max-width: max-content;
  border-radius: var(--radius);
}
.bulkbar .count {
  font-size: 13px;
  font-weight: 500;
}
.bulkbar .count b { color: var(--bg); font-variant-numeric: tabular-nums; }
.bulkbar .btn { background: transparent; color: var(--primary-fg); border-color: hsl(0 0% 100% / .2); }
.bulkbar .btn:hover { background: hsl(0 0% 100% / .12); border-color: hsl(0 0% 100% / .3); }
.bulkbar .btn.danger { color: hsl(0 90% 80%); border-color: hsl(0 90% 80% / .4); }
.bulkbar .btn.danger:hover { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }

/* ---------- empty / loading ---------- */
.empty {
  border: 1px dashed var(--line-2);
  padding: 64px 24px;
  text-align: center;
  background: var(--bg-2);
  border-radius: var(--radius);
}
.empty h3 {
  margin: 0 0 6px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -.01em;
}
.empty p { color: var(--ink-3); margin: 0 auto; max-width: 380px; font-size: 13px; }

.skel {
  background: linear-gradient(90deg, var(--muted) 25%, var(--hover) 50%, var(--muted) 75%);
  background-size: 200% 100%;
  animation: skel 1.4s linear infinite;
  height: 12px;
  border-radius: var(--radius-xs);
}
@keyframes skel { 0%{background-position:200% 0} 100%{background-position:-200% 0} }

/* ---------- toast ---------- */
.toast-stack {
  position: fixed; bottom: 24px; right: 24px;
  z-index: 9999;
  display: flex; flex-direction: column; gap: 8px;
  pointer-events: none;
}
.toast {
  pointer-events: auto;
  background: var(--popover);
  color: var(--ink);
  padding: 12px 16px;
  font-size: 13.5px;
  display: flex; align-items: center; gap: 12px;
  min-width: 320px;
  max-width: 420px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  animation: toast-in 220ms cubic-bezier(.2,.9,.3,1);
}
.toast .ic {
  width: 18px; height: 18px;
  display: grid; place-items: center;
  border-radius: 50%;
  color: var(--primary-fg);
  background: var(--ink-3);
  font-size: 10px;
  font-weight: 700;
  flex-shrink: 0;
}
.toast.ok   .ic { background: var(--ok); }
.toast.warn .ic { background: var(--warn); }
.toast-undo {
  appearance: none; border: 1px solid var(--line); background: transparent;
  color: var(--ink-2); padding: 4px 10px;
  font-size: 12px;
  font-weight: 500;
  border-radius: var(--radius-sm);
  cursor: pointer;
  margin-left: auto;
  height: 26px;
}
.toast-undo:hover { background: var(--muted); color: var(--ink); }
@keyframes toast-in {
  from { transform: translateY(20px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}

/* ---------- detail view ---------- */
.detail-back {
  display: inline-flex; align-items: center; gap: 6px;
  background: transparent; border: 0;
  font-size: 12.5px;
  color: var(--ink-3);
  cursor: pointer;
  padding: 0; margin-bottom: 18px;
  white-space: nowrap;
  font-weight: 500;
}
.detail-back:hover { color: var(--ink); }

.detail-head {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  margin-bottom: 16px;
  position: relative;
}
.detail-head h1 {
  margin: 6px 0 14px;
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -.028em;
  line-height: 1.2;
  text-wrap: balance;
  max-width: 820px;
}
.detail-meta {
  display: flex; align-items: center; gap: 14px;
  flex-wrap: wrap;
  font-size: 12.5px;
  color: var(--ink-3);
}
.detail-meta > span { white-space: nowrap; }
.detail-meta b { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.detail-meta .sep { width: 1px; height: 14px; background: var(--line); flex-shrink: 0; }

/* layout variants */
.detail-grid { display: grid; gap: 16px; }
.layout-split .detail-grid {
  grid-template-columns: 340px 1fr;
}
.layout-stacked .detail-grid { grid-template-columns: 1fr; }
.layout-focus .detail-grid {
  grid-template-columns: 1fr;
  max-width: 760px; margin: 0 auto;
}
.layout-focus .titles-rail,
.layout-focus .images-rail { order: 2; }
.layout-focus .article-card { order: 1; }

.titles-rail {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
}
.titles-rail h3 {
  margin: 0 0 12px;
  font-size: 13px;
  color: var(--ink);
  font-weight: 600;
  letter-spacing: -.005em;
  white-space: nowrap;
}
.title-opt {
  border: 1px solid var(--line);
  padding: 10px 12px;
  cursor: pointer;
  margin-bottom: 8px;
  background: var(--surface);
  display: flex; align-items: flex-start; gap: 10px;
  border-radius: var(--radius-sm);
  transition: border-color 100ms, background 100ms;
  position: relative;
}
.title-opt:hover { background: var(--bg-2); }
.title-opt.selected {
  border-color: var(--ink);
  background: var(--bg-2);
}
.title-opt .num {
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  color: var(--ink-3);
  flex-shrink: 0;
  margin-top: 2px;
}
.title-opt .txt {
  flex: 1;
  font-size: 13.5px;
  line-height: 1.4;
  letter-spacing: -.005em;
}
.title-opt.selected .txt { font-weight: 500; }
.title-opt .copy {
  opacity: 0;
  transition: opacity 100ms;
  font-size: 12px;
  color: var(--ink-3);
  background: transparent; border: 0;
  cursor: pointer;
  padding: 2px 4px;
}
.title-opt:hover .copy { opacity: 1; }
.title-opt .copy:hover { color: var(--ink); }

.article-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 32px 36px;
  position: relative;
}
.article-meta {
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
  font-size: 12.5px;
  color: var(--ink-3);
  flex-wrap: wrap;
}
.article-meta > span { white-space: nowrap; }
.article-meta b { color: var(--ink); font-weight: 600; }
.article-meta .sep { width: 1px; height: 12px; background: var(--line); flex-shrink: 0; }
.article-meta .edit-btn {
  margin-left: auto;
  appearance: none; background: transparent; border: 1px solid var(--line);
  font: inherit; color: var(--ink-2);
  padding: 4px 10px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 500;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  flex-shrink: 0;
  height: 28px;
}
.article-meta .edit-btn:hover { background: var(--muted); color: var(--ink); }
.article-meta .edit-btn.editing { background: var(--primary); color: var(--primary-fg); border-color: var(--primary); }
.article-body { max-width: 680px; }
.article-body h2 {
  margin: 22px 0 10px;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -.02em;
}
.article-body p {
  margin: 0 0 14px;
  line-height: 1.65;
  font-size: 15px;
  color: var(--ink);
}
.article-body[contenteditable="true"] {
  outline: 0;
  background: var(--bg-2);
  padding: 14px;
  margin: -14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--ink-3);
}
.article-sources {
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.article-sources h4 {
  margin: 0 0 10px;
  font-size: 12px;
  color: var(--ink-3);
  font-weight: 500;
}
.article-sources ol { margin: 0; padding-left: 20px; font-size: 13px; color: var(--ink-2); }
.article-sources li { margin-bottom: 4px; }
.article-sources a { color: var(--info); text-decoration: none; }
.article-sources a:hover { text-decoration: underline; }

/* image rail */
.images-rail {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
}
.images-rail h3 {
  margin: 0 0 12px;
  font-size: 13px;
  color: var(--ink);
  font-weight: 600;
  display: flex; align-items: center; gap: 8px;
  white-space: nowrap;
}
.images-rail h3 .count { color: var(--ink-3); opacity: .7; font-weight: 500; }
.image-strip {
  display: flex; gap: 10px;
  overflow-x: auto;
  padding-bottom: 6px;
  scrollbar-width: thin;
}
.image-strip::-webkit-scrollbar { height: 6px; }
.image-strip::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: var(--radius-full); }
.img-thumb {
  flex-shrink: 0;
  width: 140px; height: 100px;
  position: relative;
  cursor: pointer;
  border: 1px solid var(--line);
  background: var(--muted);
  overflow: hidden;
  border-radius: var(--radius-sm);
}
.img-thumb svg { width: 100%; height: 100%; display: block; }
.img-thumb.primary { border: 2px solid var(--ink); }
.img-thumb .badge {
  position: absolute; top: 6px; left: 6px;
  background: var(--ink); color: var(--bg);
  font-size: 10px;
  padding: 2px 6px;
  font-weight: 500;
  border-radius: var(--radius-full);
}
.img-thumb:hover::after {
  content: "Open";
  position: absolute; inset: 0;
  background: rgba(0,0,0,.5); color: #fff;
  display: grid; place-items: center;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .02em;
}

/* lightbox */
.lightbox-backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.78);
  z-index: 100;
  display: grid; place-items: center;
  padding: 40px;
  animation: fade-in 180ms ease-out;
  backdrop-filter: blur(2px);
}
@keyframes fade-in { from { opacity: 0 } to { opacity: 1 } }
.lightbox {
  background: var(--popover);
  border: 1px solid var(--line);
  max-width: 1080px; width: 100%;
  max-height: 90vh;
  display: grid;
  grid-template-columns: 1fr 320px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-xl);
}
.lightbox-img {
  background: var(--muted);
  display: grid; place-items: center;
  position: relative;
}
.lightbox-img svg { width: 100%; height: 100%; max-height: 80vh; }
.lightbox-side {
  padding: 24px;
  border-left: 1px solid var(--line);
  display: flex; flex-direction: column;
  gap: 18px;
}
.lightbox-side .label {
  font-size: 11.5px;
  color: var(--ink-3);
  font-weight: 500;
  margin-bottom: 4px;
}
.lightbox-side .alt { font-size: 14px; line-height: 1.5; }
.lightbox-side .url {
  font-family: "JetBrains Mono", monospace;
  font-size: 11.5px;
  color: var(--ink-2);
  word-break: break-all;
}
.lightbox-close {
  position: absolute; top: 16px; right: 16px;
  appearance: none; background: var(--surface); border: 1px solid var(--line);
  width: 32px; height: 32px;
  display: grid; place-items: center;
  cursor: pointer;
  z-index: 2;
  border-radius: var(--radius-sm);
}
.lightbox-close:hover { background: var(--muted); }

/* detail footer actions */
.detail-footer {
  margin-top: 18px;
  display: flex; gap: 8px;
  flex-wrap: wrap;
  padding: 18px 0 0;
  border-top: 1px solid var(--line);
}

/* progress banner during regen */
.progress-banner {
  border: 1px solid hsl(15 55% 80%);
  background: var(--accent-2);
  padding: 12px 16px;
  margin-bottom: 16px;
  display: flex; align-items: center; gap: 14px;
  font-size: 13.5px;
  border-radius: var(--radius);
  color: hsl(15 50% 30%);
}
[data-theme="dark"] .progress-banner {
  border-color: hsl(15 35% 32%);
  color: hsl(15 80% 82%);
}
.progress-spinner {
  width: 14px; height: 14px;
  border: 2px solid hsl(15 63% 59% / .25);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 800ms linear infinite;
  flex-shrink: 0;
}
@keyframes spin { to { transform: rotate(360deg) } }
.progress-banner .label {
  font-size: 11.5px;
  color: var(--accent);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* approve/reject row buttons */
.row-actions { display: flex; gap: 6px; opacity: 0; transition: opacity 100ms; justify-content: flex-end; }
.table tr:hover .row-actions { opacity: 1; }
.density-cards .row-actions { opacity: 1; }
.row-actions .ra {
  appearance: none;
  border: 1px solid var(--line);
  background: var(--surface);
  width: 30px; height: 30px;
  display: grid; place-items: center;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  transition: background 100ms, border-color 100ms;
}
.row-actions .ra:hover { background: var(--muted); }
.row-actions .ra.approve:hover { background: var(--ok); border-color: var(--ok); color: #fff; }
.row-actions .ra.reject:hover  { background: var(--accent); border-color: var(--accent); color: #fff; }

/* responsive squeeze */
@media (max-width: 1100px) {
  .stats-grid { grid-template-columns: repeat(3, 1fr); }
  .layout-split .detail-grid { grid-template-columns: 1fr; }
}

/* footnote line */
.tablefoot {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 14px;
  font-size: 12.5px;
  color: var(--ink-3);
}
.tablefoot b { color: var(--ink); font-variant-numeric: tabular-nums; }
.tablefoot .pager { display: flex; gap: 4px; }
.tablefoot .pager button {
  appearance: none;
  border: 1px solid var(--line);
  background: var(--surface);
  width: 30px; height: 30px;
  cursor: pointer;
  font: inherit; color: var(--ink-2);
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.tablefoot .pager button:hover:not(:disabled) { background: var(--muted); color: var(--ink); }
.tablefoot .pager button.active { background: var(--primary); color: var(--primary-fg); border-color: var(--primary); }
.tablefoot .pager button:disabled { opacity: .4; cursor: not-allowed; }

/* ---------- date range picker ---------- */
.dr-wrap { position: relative; }
.dr-trigger {
  appearance: none;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  padding: 0 12px;
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex; align-items: center; gap: 10px;
  white-space: nowrap;
  height: 36px;
  border-radius: var(--radius-sm);
  transition: background 100ms, border-color 100ms;
}
.dr-trigger:hover { background: var(--muted); }
.dr-trigger.open { background: var(--muted); border-color: var(--ink-3); }
.dr-trigger .ic { color: var(--ink-3); display: grid; place-items: center; }
.dr-trigger .ic svg { width: 14px; height: 14px; }
.dr-trigger .caret { color: var(--ink-3); font-size: 9px; opacity: .7; }

.dr-popover {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 60;
  background: var(--popover);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
  display: grid;
  grid-template-columns: 160px 1fr;
  min-width: 660px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  opacity: 1;
  animation: dr-in 140ms ease-out forwards;
  isolation: isolate;
}
@keyframes dr-in {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}
.dr-presets {
  border-right: 1px solid var(--line);
  padding: 10px 8px;
  display: flex; flex-direction: column;
  gap: 1px;
  background: var(--bg-2);
}
.dr-presets-label {
  font-size: 11px;
  color: var(--ink-3);
  padding: 6px 10px 6px;
  font-weight: 500;
}
.dr-preset {
  appearance: none; border: 0; background: transparent;
  padding: 7px 10px;
  text-align: left;
  font: inherit;
  font-size: 12.5px;
  color: var(--ink-2);
  cursor: pointer;
  font-weight: 500;
  white-space: nowrap;
  border-radius: var(--radius-xs);
}
.dr-preset:hover { background: var(--muted); color: var(--ink); }
.dr-preset.active {
  color: var(--primary-fg);
  background: var(--primary);
}

.dr-cal-wrap { padding: 16px 18px; background: var(--popover); }
.dr-cal-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 10px;
}
.dr-nav-btn {
  appearance: none; border: 1px solid var(--line); background: var(--surface);
  width: 28px; height: 28px;
  cursor: pointer; color: var(--ink-2);
  display: grid; place-items: center;
  font-size: 13px;
  border-radius: var(--radius-sm);
}
.dr-nav-btn:hover { background: var(--muted); color: var(--ink); }

.dr-months {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}
.dr-month {
  display: flex; flex-direction: column; gap: 8px;
}
.dr-month-h {
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 4px;
  letter-spacing: -.005em;
}
.dr-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}
.dr-weekday {
  text-align: center;
  font-size: 11px;
  color: var(--ink-3);
  padding: 4px 0;
  font-weight: 500;
}
.dr-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}
.dr-day {
  appearance: none; border: 0; background: transparent;
  height: 32px;
  cursor: pointer;
  font-size: 12.5px;
  color: var(--ink);
  display: grid; place-items: center;
  position: relative;
  font-variant-numeric: tabular-nums;
  border-radius: var(--radius-sm);
  transition: background 80ms;
}
.dr-day.muted { color: var(--ink-3); opacity: .35; }
.dr-day:hover:not(.disabled):not(.range-start):not(.range-end) { background: var(--muted); }
.dr-day.in-range {
  background: var(--bg-2);
  color: var(--ink);
  border-radius: 0;
}
.dr-day.range-start, .dr-day.range-end {
  background: var(--primary);
  color: var(--primary-fg);
  font-weight: 600;
}
.dr-day.range-start { border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.dr-day.range-end   { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.dr-day.range-start.range-end { border-radius: var(--radius-sm); }
.dr-day.today { box-shadow: inset 0 0 0 1px var(--accent); }
.dr-day.disabled { opacity: .2; cursor: not-allowed; }

.dr-foot {
  grid-column: 1 / -1;
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 18px;
  border-top: 1px solid var(--line);
  background: var(--bg-2);
  font-size: 12.5px;
  color: var(--ink-3);
}
.dr-foot .range-readout b { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.dr-foot .actions { display: flex; gap: 8px; }

/* ---------- source popover (FORCE solid bg) ---------- */
.sources-wrap { position: relative; display: inline-block; }

.sp-popover {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 200;
  width: 400px;
  background-color: var(--popover);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-xl);
  border-radius: var(--radius-lg);
  overflow: hidden;
  isolation: isolate;
  opacity: 1;
}
.sp-header {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  background-color: var(--bg-2);
}
.sp-tabs {
  display: flex; gap: 2px; flex: 1;
  background-color: var(--muted);
  padding: 3px;
  border-radius: var(--radius-sm);
}
.sp-tab {
  appearance: none; border: 0; background-color: transparent;
  padding: 5px 10px;
  font-size: 12px;
  color: var(--ink-3);
  cursor: pointer;
  font-weight: 500;
  display: inline-flex; align-items: center; gap: 6px;
  border-radius: var(--radius-xs);
  transition: background 100ms;
}
.sp-tab:hover { color: var(--ink); }
.sp-tab.active {
  color: var(--ink);
  font-weight: 600;
  background-color: var(--surface);
  box-shadow: var(--shadow-sm);
}
.sp-tab .ct {
  background-color: var(--muted);
  padding: 0 5px;
  font-size: 10.5px;
  color: var(--ink-2);
  border-radius: var(--radius-full);
  font-variant-numeric: tabular-nums;
  min-width: 18px;
  text-align: center;
}
.sp-tab.active .ct { background-color: var(--accent); color: var(--accent-ink); }

.sp-list {
  max-height: 320px;
  overflow-y: auto;
  padding: 4px 0;
  background-color: var(--popover);
}
.sp-link {
  display: grid;
  grid-template-columns: 24px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  border-bottom: 1px solid var(--line);
  background-color: var(--popover);
  transition: background 100ms;
}
.sp-link:last-child { border-bottom: 0; }
.sp-link:hover { background-color: var(--bg-2); }
.sp-link .n {
  font-family: "JetBrains Mono", monospace;
  font-size: 10.5px;
  color: var(--ink-3);
}
.sp-link .info { min-width: 0; }
.sp-link .ttl {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -.005em;
  color: var(--ink);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.sp-link .url {
  font-family: "JetBrains Mono", monospace;
  font-size: 10.5px;
  color: var(--ink-3);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  margin-top: 2px;
}
.sp-link .v {
  font-size: 11.5px;
  color: var(--ok);
  font-weight: 600;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.sp-link .v.falling { color: var(--accent); }

.sp-foot {
  padding: 10px 14px;
  border-top: 1px solid var(--line);
  font-size: 11.5px;
  color: var(--ink-3);
  display: flex; align-items: center; justify-content: space-between;
  background-color: var(--bg-2);
}
.sp-foot a {
  color: var(--ink-2);
  text-decoration: none;
  font-weight: 500;
}
.sp-foot a:hover { color: var(--ink); }

/* table needs to allow popovers to escape */
.table-wrap { position: relative; }
.table { position: relative; }

/* ---------- backdrop for popovers ---------- */
.popover-backdrop {
  position: fixed; inset: 0;
  z-index: 50;
  background: transparent;
}

/* Responsive */
@media (max-width: 900px) {
  .app { --sb-w: 64px; }
  .app .sb-brand-text,
  .app .sb-item .label,
  .app .sb-item .badge,
  .app .sb-run-text,
  .app .sb-user-text,
  .app .sb-nav-label { opacity: 0; pointer-events: none; }
  .app .sb-collapse .lbl { display: none; }
}
