:root {
  color-scheme: light dark;
  --bg: #f7f7fb;
  --bg-elevated: #ffffff;
  --bg-sunken: #eef0f6;
  --border: #e2e4ec;
  --text: #1a1b2b;
  --muted: #6b6e85;
  --primary: #5b56e8;
  --primary-hover: #4944c9;
  --primary-text: #ffffff;
  --success-bg: #dcf6e6;
  --success-text: #157347;
  --warning-bg: #fff3d6;
  --warning-text: #92600a;
  --danger-bg: #fde3e1;
  --danger-text: #b02a20;
  --info-bg: #dbe8fe;
  --info-text: #1d4fb8;
  --shadow-sm: 0 1px 2px rgba(20, 20, 40, 0.06);
  --shadow-md: 0 4px 14px rgba(20, 20, 40, 0.08);
  --radius: 10px;
  --radius-sm: 6px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14151f;
    --bg-elevated: #1c1d2b;
    --bg-sunken: #101119;
    --border: #2c2e42;
    --text: #eceefc;
    --muted: #9b9dbd;
    --primary: #8b85ff;
    --primary-hover: #a29cff;
    --primary-text: #12102b;
    --success-bg: #113828;
    --success-text: #5fe3a1;
    --warning-bg: #3a2c0c;
    --warning-text: #f2c14e;
    --danger-bg: #3a1616;
    --danger-text: #ff8f85;
    --info-bg: #16233f;
    --info-text: #8db4ff;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.35);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.45);
  }
}

* { box-sizing: border-box; }

body {
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.page {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 1.75rem 4rem;
}

/* ---- top navigation ---- */
.topnav {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.9rem 1.75rem;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
  margin-bottom: 2rem;
  position: sticky;
  top: 0;
  z-index: 10;
  box-shadow: var(--shadow-sm);
}
.topnav .brand {
  font-weight: 700;
  font-size: 1rem;
  margin-right: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--text);
  white-space: nowrap;
}
.topnav .brand::before {
  content: "◆";
  color: var(--primary);
  font-size: 0.9rem;
}
.topnav a {
  text-decoration: none;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 500;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  transition: background 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}
.topnav a:hover { color: var(--text); background: var(--bg-sunken); }
.topnav a.active { color: var(--primary-text); background: var(--primary); font-weight: 600; }

/* ---- headings ---- */
h1 {
  font-size: 1.55rem;
  font-weight: 700;
  margin: 0 0 0.3rem;
  letter-spacing: -0.01em;
}
h2 { font-size: 1.05rem; font-weight: 700; margin: 0 0 0.6rem; }
h3 { font-size: 0.85rem; font-weight: 700; margin: 0; }
.subtitle { color: var(--muted); font-size: 0.94rem; margin: 0 0 1.6rem; max-width: 62ch; }

section { margin-bottom: 2.4rem; }

/* ---- toolbar / controls ---- */
.toolbar { display: flex; gap: 0.6rem; align-items: center; margin-bottom: 1.1rem; flex-wrap: wrap; }

button, select, input[type="number"], input[type="file"], input[type="text"], textarea {
  font: inherit;
  color: var(--text);
}

button {
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  cursor: pointer;
  font-weight: 600;
  font-size: 0.88rem;
  box-shadow: var(--shadow-sm);
  transition: transform 0.08s ease, box-shadow 0.15s ease, background 0.15s ease;
}
button:hover { background: var(--bg-sunken); }
button:active { transform: translateY(1px); }
button.primary { background: var(--primary); color: var(--primary-text); border-color: var(--primary); }
button.primary:hover { background: var(--primary-hover); }
button:disabled { opacity: 0.5; cursor: default; transform: none; box-shadow: none; }

a > button { display: inline-flex; }

select, input[type="number"], input[type="text"] {
  padding: 0.45rem 0.65rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
}
select:focus, input:focus, textarea:focus, button:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 1px;
}

textarea {
  padding: 0.7rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  resize: vertical;
}

/* ---- tables ---- */
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.9rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
th, td { text-align: left; padding: 0.65rem 0.8rem; border-bottom: 1px solid var(--border); }
th {
  color: var(--muted);
  font-weight: 700;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: var(--bg-sunken);
}
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: var(--bg-sunken); }
table.no-select th:first-child, table.no-select td:first-child { display: none; }

th.sortable { cursor: pointer; user-select: none; }
th.sortable:hover { color: var(--text); }
th.sortable::after { content: ""; display: inline-block; width: 0.7em; opacity: 0.5; }
th.sortable.sort-asc::after { content: "▲"; opacity: 1; }
th.sortable.sort-desc::after { content: "▼"; opacity: 1; }

.hint-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 1.15em; height: 1.15em; margin-left: 0.4em;
  border-radius: 50%; border: 1px solid var(--border); background: var(--bg-elevated);
  color: var(--muted); font-size: 0.72rem; font-weight: 700; line-height: 1;
  cursor: pointer; box-shadow: none; padding: 0; vertical-align: middle;
  text-transform: none; letter-spacing: normal;
}
.hint-icon:hover { color: var(--primary-text); border-color: var(--primary); background: var(--primary); }

/* ---- real-market traffic hover popup (bar chart) -- see daily.js realmarket-badge ---- */
.realmarket-popup {
  position: fixed;
  z-index: 1000;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 0.7rem 0.9rem;
  min-width: 220px;
  max-width: 300px;
  font-size: 0.82rem;
  pointer-events: none; /* hover-only, never intercepts the mouseout that hides it */
}
.realmarket-popup .rm-title { font-weight: 700; margin-bottom: 0.55rem; color: var(--text); }
.realmarket-popup .rm-row { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.4rem; }
.realmarket-popup .rm-row:last-child { margin-bottom: 0; }
.realmarket-popup .rm-country { width: 2.4em; flex-shrink: 0; font-weight: 600; color: var(--muted); }
.realmarket-popup .rm-bar-track { display: block; flex: 1; background: var(--bg-sunken); border-radius: 999px; height: 9px; overflow: hidden; }
.realmarket-popup .rm-bar-fill { display: block; height: 100%; background: var(--primary); border-radius: 999px; }
.realmarket-popup .rm-value { flex-shrink: 0; min-width: 3.6em; text-align: right; font-variant-numeric: tabular-nums; color: var(--text); }

/* ---- tier badges ---- */
.tier-best_fit, .tier-mid, .tier-aspirational {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
}
.tier-best_fit { background: var(--success-bg); color: var(--success-text); }
.tier-mid { background: var(--warning-bg); color: var(--warning-text); }
.tier-aspirational { background: var(--danger-bg); color: var(--danger-text); }
.tier-best_fit::before { content: "🟢"; }
.tier-mid::before { content: "🟡"; }
.tier-aspirational::before { content: "🔴"; }

/* ---- status messages ---- */
.status-msg { padding: 0.55rem 0.9rem; color: var(--muted); font-size: 0.88rem; }
.status-msg:not(:empty) {
  background: var(--bg-sunken);
  border-radius: var(--radius-sm);
  display: inline-block;
}
.status-msg.error { color: var(--danger-text); background: var(--danger-bg); }

/* ---- generic cards (action board / sequence queue) + shared message-display bits (also used inside .modal-box) ---- */
.card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.15rem;
  margin-bottom: 0.75rem;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.15s ease;
}
.card:hover { box-shadow: var(--shadow-md); }
.meta { color: var(--muted); font-size: 0.83rem; margin-bottom: 0.5rem; line-height: 1.6; }
.meta a { color: var(--primary); }
pre {
  white-space: pre-wrap;
  background: var(--bg-sunken);
  padding: 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  margin: 0.5rem 0 0;
  font-family: inherit;
}
.actions { margin-top: 0.75rem; display: flex; gap: 0.5rem; flex-wrap: wrap; }

.group { margin-bottom: 2.2rem; }
.group h2 { display: flex; align-items: center; gap: 0.5rem; }

/* ---- action board: compact card grid + modal ---- */
.card-grid { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.mini-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.85rem 1rem;
  width: 220px;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: box-shadow 0.15s ease, transform 0.08s ease;
}
.mini-card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.mini-card .domain { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini-card .meta { color: var(--muted); font-size: 0.8rem; margin-top: 0.3rem; }
.mini-card .flag {
  display: inline-block; margin-top: 0.5rem; font-size: 0.74rem; font-weight: 600;
  padding: 0.1rem 0.5rem; border-radius: 999px; background: var(--bg-sunken); color: var(--muted);
}
.mini-card.has-message .flag { background: var(--info-bg); color: var(--info-text); }

/* ---- Action Board: "Where things stand" domain status overview ---- */
.filter-tabs { display: flex; gap: 0.4rem; margin-bottom: 1rem; flex-wrap: wrap; }
.filter-tab {
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  font-size: 0.82rem;
  transition: background 150ms ease, color 150ms ease, border-color 150ms ease;
}
.filter-tab.active { background: var(--primary); color: var(--primary-text); border-color: var(--primary); }

.domain-status-list { display: flex; flex-direction: column; gap: 0.5rem; margin-bottom: 1.2rem; }

.domain-status-row {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.65rem 0.95rem;
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  opacity: 0;
  transform: translateY(6px);
  animation: row-in 240ms cubic-bezier(0.23, 1, 0.32, 1) forwards;
}
.domain-status-row .domain-status-name {
  font-weight: 600;
  color: var(--text);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1 1 160px;
}
.domain-status-row .domain-status-meta {
  color: var(--muted);
  font-size: 0.82rem;
  flex: 2 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@keyframes row-in {
  to { opacity: 1; transform: translateY(0); }
}

/* Stage badges -- one consistent color per pipeline stage, reused nowhere
   else, so "what stage is this domain at" reads at a glance without
   opening anything (Pipeline used to be the only place this was visible). */
.stage-badge {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  white-space: nowrap;
  flex-shrink: 0;
}
.stage-badge.stage-contacted { background: var(--info-bg); color: var(--info-text); }
.stage-badge.stage-follow_up { background: var(--warning-bg); color: var(--warning-text); }
.stage-badge.stage-replied { background: var(--success-bg); color: var(--success-text); }
.stage-badge.stage-negotiating { background: var(--bg-sunken); color: var(--primary); }
.stage-badge.stage-signed, .stage-badge.stage-live { background: var(--success-bg); color: var(--success-text); }
.stage-badge.stage-lost, .stage-badge.stage-parked { background: var(--bg-sunken); color: var(--muted); }

/* A reply that landed recently gets a soft expanding ring -- state
   indication only (a new, actionable fact appeared), not decoration, so
   it earns the motion per the "should this animate" test. */
.stage-badge.is-new::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: inherit;
  border: 2px solid var(--success-text);
  animation: reply-ping 1.8s cubic-bezier(0.77, 0, 0.175, 1) infinite;
}

@keyframes reply-ping {
  0% { transform: scale(1); opacity: 0.7; }
  100% { transform: scale(1.4); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .domain-status-row { animation: none; opacity: 1; transform: none; }
  .stage-badge.is-new::after { animation: none; }
}

/* ---- Domain status row: small external-link affordance next to the name,
   separate from the row's own click (which opens the chat thread) ---- */
.domain-status-visit {
  color: var(--muted);
  font-size: 0.85rem;
  text-decoration: none;
  flex-shrink: 0;
  padding: 0.15rem 0.3rem;
  border-radius: var(--radius-sm);
}
.domain-status-visit:hover { color: var(--primary); background: var(--bg-sunken); }

/* ---- Conversation thread (real Gmail thread, read + reply from the app) ----
   #thread-modal-content is a flex column (header / messages / reply box);
   .thread-messages is the only flexible, shrinkable piece (flex + min-height
   0), so it's normally the only thing that scrolls -- the header and reply
   box keep their natural size (flex-shrink: 0 below). .modal-box's own
   overflow-y: auto (shared with the other modal) only ever shows a second
   scrollbar as a last resort, if someone drags the reply textarea tall
   enough that even a collapsed message list doesn't leave enough room. */
#thread-modal-overlay .modal-box {
  display: flex;
  flex-direction: column;
}
#thread-modal-content {
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.thread-messages {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  flex: 1 1 auto;
  min-height: 100px;
  overflow-y: auto;
  padding: 0.15rem;
  margin-bottom: 1rem;
}
.thread-message {
  display: inline-block;
  max-width: 82%;
  width: fit-content;
  padding: 0.3rem 0.55rem;
  border-radius: var(--radius-sm);
  font-size: 0.86rem;
  line-height: 1.3;
  word-break: break-word;
  opacity: 0;
  transform: translateY(6px);
  animation: row-in 200ms cubic-bezier(0.23, 1, 0.32, 1) forwards;
}
.thread-message-meta {
  display: block;
  font-size: 0.7rem;
  margin-bottom: 0.1rem;
  opacity: 0.75;
}
.thread-message.sent {
  align-self: flex-end;
  background: var(--primary);
  color: var(--primary-text);
  border-bottom-right-radius: 3px;
}
.thread-message.received {
  align-self: flex-start;
  background: var(--bg-sunken);
  color: var(--text);
  border-bottom-left-radius: 3px;
}
.thread-reply-box {
  flex-shrink: 0;
}
.thread-reply-box textarea {
  width: 100%;
  min-height: 90px;
  resize: vertical;
  padding: 0.6rem 0.75rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  font: inherit;
  color: var(--text);
  margin-bottom: 0.6rem;
}

@media (prefers-reduced-motion: reduce) {
  .thread-message { animation: none; opacity: 1; transform: none; }
}

.modal-overlay {
  position: fixed; inset: 0; background: rgba(10, 10, 20, 0.55);
  display: flex; align-items: flex-start; justify-content: center;
  padding: 4vh 1rem; z-index: 100; overflow-y: auto;
}
.modal-box {
  background: var(--bg-elevated); border-radius: var(--radius);
  box-shadow: var(--shadow-md); padding: 1.5rem; max-width: 640px; width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  position: relative;
}
.modal-close {
  position: absolute; top: 0.75rem; right: 0.75rem;
  background: none; border: none; box-shadow: none; font-size: 1.4rem;
  line-height: 1; padding: 0.2rem 0.5rem; color: var(--muted);
}
.modal-close:hover { color: var(--text); }
.modal-header {
  flex-shrink: 0;
  padding-right: 1.5rem; margin-bottom: 0.9rem; padding-bottom: 0.9rem;
  border-bottom: 1px solid var(--border);
}
.modal-header .domain-line { color: var(--text); font-size: 1rem; margin-bottom: 0.3rem; }

/* ---- Template picker (Action Board message modal) -- a plain <select>'s
   native popup can't be capped/made to scroll via CSS, and .modal-box's own
   overflow-y:auto would clip an absolutely-positioned list anyway, so this
   is a small custom dropdown instead, positioned fixed (same escape-the-
   container technique as .realmarket-popup above) and given a real
   max-height + scroll. ---- */
.tpl-dropdown-trigger {
  min-width: 240px;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  text-align: left;
}
.tpl-dropdown-trigger::after { content: "▾"; color: var(--muted); flex-shrink: 0; }
.tpl-dropdown-list {
  position: fixed;
  z-index: 200;
  min-width: 240px;
  max-height: 260px;
  overflow-y: auto;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  padding: 0.3rem;
}
.tpl-dropdown-item {
  padding: 0.4rem 0.6rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.88rem;
  white-space: nowrap;
}
.tpl-dropdown-item:hover { background: var(--bg-sunken); }
.tpl-dropdown-item.active { background: var(--primary); color: var(--primary-text); }

.empty {
  color: var(--muted);
  font-size: 0.92rem;
  padding: 2rem;
  text-align: center;
  background: var(--bg-elevated);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
}

/* ---- pipeline: scoreboard + kanban ---- */
.scoreboard { display: flex; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.75rem; }
.stat {
  position: relative;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.85rem 1.2rem;
  min-width: 130px;
  box-shadow: var(--shadow-sm);
}
.stat .n { font-size: 1.6rem; font-weight: 800; color: var(--primary); line-height: 1.2; }
.stat .label { color: var(--muted); font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.03em; margin-top: 0.15rem; }
.stat-badge {
  position: absolute;
  top: -0.5rem;
  right: -0.5rem;
  background: var(--danger-bg);
  color: var(--danger-text);
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
}

.stat-clickable { cursor: pointer; transition: border-color 0.15s, box-shadow 0.15s; }
.stat-clickable:hover { border-color: var(--primary); box-shadow: var(--shadow-md); }

/* ---- pipeline: stage detail popup (checkbox list + bulk move) ---- */
.pipeline-item {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  padding: 0.6rem 0.5rem;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
}
.pipeline-item:last-child { border-bottom: none; }
.pipeline-item:hover { background: var(--bg-sunken); }
.pipeline-item input[type="checkbox"] { margin-top: 0.2rem; }
.pipeline-item-body { flex: 1; font-size: 0.88rem; }
.pipeline-item-body .domain-line { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.15rem; }
#stage-items { max-height: 55vh; overflow-y: auto; border: 1px solid var(--border); border-radius: var(--radius-sm); }

/* ---- settings page ---- */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  margin-right: 0.5rem;
}
.status-pill.ok { background: var(--success-bg); color: var(--success-text); }
.status-pill.ok::before { content: "●"; }
.status-pill.missing { background: var(--danger-bg); color: var(--danger-text); }
.status-pill.missing::before { content: "○"; }

.usage-ok { color: var(--muted); }
.usage-warning { color: var(--warning-text); font-weight: 600; }
.usage-danger { color: var(--danger-text); font-weight: 600; }

.row { display: flex; gap: 0.6rem; align-items: center; margin-bottom: 0.7rem; }
table.deals th, table.deals td { font-size: 0.85rem; }

/* ---- daily checklist paste box ---- */
#alt-paste-box {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.15rem;
  box-shadow: var(--shadow-sm);
}
#alt-paste-box textarea { width: 100%; }

/* ---- Seeds page ------------------------------------------------------- */

.seed-group { margin-bottom: 1.6rem; }
.seed-group h3 { margin: 0 0 0.6rem; font-size: 0.95rem; }
.seed-group h3 .meta { font-weight: 400; }
.seed-inactive td { opacity: 0.5; }
.seed-actions { white-space: nowrap; }
.seed-actions button { padding: 0.3rem 0.6rem; font-size: 0.8rem; margin-left: 0.25rem; }

/* Score bar: the number alone invites false precision, so it is always shown
   next to a proportional bar -- and the title attribute carries the full
   component breakdown so a score can be interrogated, never just trusted. */
.score-cell { display: flex; align-items: center; gap: 0.45rem; cursor: help; min-width: 110px; }
.score-track {
  flex: 1;
  height: 7px;
  background: var(--bg-sunken);
  border-radius: 999px;
  overflow: hidden;
  min-width: 60px;
}
.score-fill { height: 100%; border-radius: 999px; }
.bar-strong { background: var(--success-text); }
.bar-healthy { background: var(--warning-text); }
.bar-weak { background: var(--danger-text); }
.score-num { font-variant-numeric: tabular-nums; font-weight: 700; font-size: 0.82rem; min-width: 1.6rem; text-align: right; }

.verdict-strong, .verdict-healthy, .verdict-fading, .verdict-exhausted, .verdict-unproven {
  display: inline-block;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: help;
  white-space: nowrap;
}
.verdict-strong { background: var(--success-bg); color: var(--success-text); }
.verdict-healthy { background: var(--info-bg); color: var(--info-text); }
.verdict-fading { background: var(--warning-bg); color: var(--warning-text); }
.verdict-exhausted { background: var(--danger-bg); color: var(--danger-text); }
.verdict-unproven { background: var(--bg-sunken); color: var(--muted); }

.coverage-card { border-left: 3px solid var(--warning-text); }
.coverage-row { display: flex; gap: 0.7rem; align-items: baseline; padding: 0.3rem 0; font-size: 0.88rem; }
.coverage-country {
  font-weight: 700;
  background: var(--warning-bg);
  color: var(--warning-text);
  padding: 0.05rem 0.45rem;
  border-radius: var(--radius-sm);
  flex: 0 0 auto;
}

.stat-value { font-size: 1.5rem; font-weight: 700; line-height: 1.1; }
.stat-label { color: var(--muted); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.04em; }

/* ---- Seeds: explore/exploit + provenance ------------------------------ */

.balance-card { display: flex; flex-direction: column; gap: 0.6rem; }
.balance-bar {
  display: flex;
  height: 26px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-sunken);
}
.balance-seg {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--primary-text);
  white-space: nowrap;
  overflow: hidden;
}
.balance-explore { background: var(--primary); }
.balance-exploit { background: var(--success-text); }
.balance-curated { background: var(--muted); }
.balance-legend { display: flex; gap: 1rem; flex-wrap: wrap; font-size: 0.82rem; color: var(--muted); }
.balance-key { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 0.35rem; }

.origin-manual, .origin-approved, .origin-curated {
  display: inline-block;
  padding: 0.05rem 0.45rem;
  border-radius: var(--radius-sm);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.origin-manual { background: var(--info-bg); color: var(--info-text); }
.origin-approved { background: var(--success-bg); color: var(--success-text); }
.origin-curated { background: var(--bg-sunken); color: var(--muted); }

.rotation-grid { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.rotation-card {
  flex: 1 1 200px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.7rem 0.85rem;
  background: var(--bg-elevated);
}
.rotation-card h4 { margin: 0 0 0.45rem; font-size: 0.85rem; }
.rotation-slot {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.28rem 0;
  font-size: 0.85rem;
  border-top: 1px solid var(--border);
}
.rotation-slot:first-of-type { border-top: 0; }
.rotation-slot .slot-domain { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rotation-warn { font-size: 0.8rem; color: var(--warning-text); margin-top: 0.4rem; }

/* The seed table carries 12 columns, so on any realistic width the row
   actions were the first thing to scroll out of reach -- which made the
   primary controls the least reachable part of the page. Pinning the action
   cell to the right keeps Edit/Disable usable while the metrics scroll. */
.seed-group table { position: relative; }
.seed-group th:last-child,
.seed-group td.seed-actions {
  position: sticky;
  right: 0;
  background: var(--bg-elevated);
  box-shadow: -6px 0 6px -6px rgba(20, 20, 40, 0.25);
  z-index: 1;
}
.seed-group th:last-child { background: var(--bg-sunken); }
.seed-inactive td.seed-actions { background: var(--bg-elevated); }

/* ---- Seeds: search schedule calendar ---------------------------------- */

.schedule-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin: 1rem 0 0.6rem;
}
.schedule-nav button { padding: 0.3rem 0.7rem; font-size: 0.95rem; line-height: 1; }
.schedule-nav strong { font-size: 0.9rem; min-width: 11ch; text-align: center; }

.schedule-calendar {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.35rem;
}
.schedule-weekday {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  text-align: center;
  padding-bottom: 0.2rem;
}
.schedule-day {
  position: relative;
  min-height: 52px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  padding: 0.3rem 0.35rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  transition: box-shadow 0.15s ease;
}
.schedule-day[data-date] { cursor: pointer; }
.schedule-day[data-date]:hover { box-shadow: var(--shadow-sm); }
.schedule-day.is-empty { border: none; background: none; }
.schedule-day.is-today { border-color: var(--primary); border-width: 2px; }
.schedule-day-num { font-size: 0.78rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.schedule-day-country {
  align-self: flex-start;
  padding: 0.05rem 0.4rem;
  border-radius: var(--radius-sm);
  font-size: 0.68rem;
  font-weight: 700;
  color: #fff;
}
.schedule-legend { display: flex; gap: 1rem; flex-wrap: wrap; font-size: 0.82rem; color: var(--muted); margin-top: 0.7rem; }
.schedule-legend-key { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 0.35rem; }
