:root {
  --bg: #eef2f6;
  --surface: rgba(255, 255, 255, 0.94);
  --surface-strong: #ffffff;
  --surface-alt: #f5f8fc;
  --border: #dbe3ec;
  --border-strong: #c2cedd;
  --text: #111d2e;
  --text-soft: #45596e;
  --text-faint: #6e828f;
  --text-muted: #6e828f;
  --primary: #0f5bd7;
  --primary-strong: #0a47ab;
  --primary-light: rgba(15, 91, 215, 0.08);
  --danger: #d04040;
  --success: #1c8a5a;
  --warning: #c07c14;
  --shadow-sm: 0 1px 3px rgba(15, 33, 58, 0.07), 0 1px 2px rgba(15, 33, 58, 0.04);
  --shadow: 0 4px 16px rgba(15, 33, 58, 0.09), 0 1px 4px rgba(15, 33, 58, 0.05);
  --shadow-lg: 0 20px 48px rgba(15, 33, 58, 0.13), 0 6px 14px rgba(15, 33, 58, 0.07);
  --radius: 18px;
  --radius-sm: 12px;
  --max-width: 1180px;
  --transition: 130ms ease;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: "Aptos", "Segoe UI", "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.55;
  color: var(--text);
  background:
    radial-gradient(ellipse 80% 40% at 10% 0%, rgba(15, 91, 215, 0.11) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 90% 5%, rgba(31, 143, 95, 0.09) 0%, transparent 55%),
    radial-gradient(ellipse 50% 60% at 50% 100%, rgba(15, 91, 215, 0.05) 0%, transparent 60%),
    linear-gradient(180deg, #f5f8fb 0%, var(--bg) 100%);
  min-height: 100vh;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

.page-shell {
  width: min(100% - 24px, var(--max-width));
  margin: 0 auto;
}

.container {
  width: min(100% - 24px, var(--max-width));
  margin: 0 auto;
  padding: 20px 0 48px;
}

/* ── Navigation ── */

.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  background: rgba(8, 15, 28, 0.88);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.12), 0 4px 16px rgba(0, 0, 0, 0.1);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 62px;
}

/* ── Brand / Logo ── */

.nav-brand {
  display: flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  flex-shrink: 0;
}

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

.nav-logo-icon {
  flex-shrink: 0;
  transition: opacity var(--transition);
}

.nav-logo-image {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.nav-wordmark-image {
  width: 156px;
  height: 64px;
  max-height: 64px;
  object-fit: contain;
  display: block;
}

.nav-brand:hover .nav-logo-icon { opacity: 0.85; }

.nav-brand-text {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: rgba(255, 255, 255, 0.92);
  line-height: 1;
}

.nav-brand-accent {
  background: linear-gradient(135deg, #93c5fd 0%, #60a5fa 50%, #a78bfa 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-left: 1px;
}

.nav-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
}

.nav-links a,
.nav-links button {
  color: rgba(255, 255, 255, 0.75);
  background: none;
  border: 0;
  cursor: pointer;
  font: inherit;
  font-size: 13.5px;
  padding: 7px 11px;
  border-radius: 999px;
  transition: color var(--transition), background var(--transition);
}

.nav-links a:hover,
.nav-links button:hover {
  color: #fff;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.09);
}

.nav-user {
  color: rgba(255, 255, 255, 0.55);
  font-size: 12.5px;
  padding: 0 6px;
}

/* ── Page header ── */

.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.page-header.compact {
  margin-bottom: 14px;
}

.page-title-block {
  min-width: 0;
}

.page-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  color: var(--primary);
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  opacity: 0.72;
}

h1, h2, h3 {
  margin: 0;
  line-height: 1.2;
}

h1 {
  font-size: clamp(1.4rem, 2vw, 1.95rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--text);
}

h2 {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.012em;
}

h3 {
  font-size: 0.925rem;
  font-weight: 600;
}

.muted,
.helper,
.section-note {
  color: var(--text-soft);
  font-size: 12.5px;
}

.helper { margin-top: 5px; }
.section-note { margin: 0; }

.lede {
  color: var(--text-soft);
  max-width: 68ch;
  margin-top: 7px;
  font-size: 13.5px;
  line-height: 1.6;
}

/* ── Alerts ── */

.error,
.notice {
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  margin-bottom: 14px;
  border: 1px solid transparent;
  font-size: 13.5px;
}

.error {
  color: #8b2020;
  background: #fff1f1;
  border-color: #f5c0c0;
}

.notice {
  color: #154a78;
  background: #ebf4ff;
  border-color: #bdd6f8;
}

/* ── Panels ── */

/* Step wizard nav */

.step-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  flex-wrap: wrap;
}

.step-nav-item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-soft);
  text-decoration: none;
  padding: 4px 8px;
  border-radius: 6px;
  transition: background 0.1s;
}

a.step-nav-item:hover {
  background: var(--surface-hover);
  color: var(--text);
}

.step-nav-item.active {
  color: var(--primary);
}

.step-nav-item.done {
  color: var(--colour-fact);
}

.step-nav-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--border);
  color: var(--text-soft);
  font-weight: 800;
  font-size: 12px;
  flex-shrink: 0;
}

.step-nav-item.active .step-nav-num {
  background: var(--primary);
  color: #fff;
}

.step-nav-item.done .step-nav-num {
  background: var(--colour-fact);
  color: #fff;
}

.step-nav-sep {
  color: var(--border);
  font-size: 16px;
}

/* Setup guide */

.setup-guide {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.setup-step {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: start;
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.setup-step-number {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--primary);
  color: #fff;
  font-weight: 800;
  font-size: 13px;
}

.setup-step h2 {
  margin: 0 0 5px 0;
  font-size: 0.96rem;
}

.setup-step p {
  margin: 0;
  color: var(--text-soft);
  font-size: 13px;
  line-height: 1.5;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  margin-bottom: 16px;
  position: relative;
  overflow: hidden;
}

.panel::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.9) 30%, rgba(255,255,255,0.9) 70%, transparent 100%);
  pointer-events: none;
}

.panel.compact { padding: 14px; }

.panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.ai-wizard-panel {
  border-color: rgba(59, 130, 246, 0.34);
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.14), var(--surface) 52%);
}

.panel-header.compact {
  margin-bottom: 9px;
}

.panel-title {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

/* ── Toolbar / actions ── */

.toolbar,
.card-actions,
.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.toolbar.tight,
.button-row.tight { gap: 6px; }

/* ── Buttons ── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 36px;
  padding: 0 15px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: var(--primary);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 1px 3px rgba(15, 91, 215, 0.25), 0 1px 1px rgba(0,0,0,0.06);
  transition: background var(--transition), box-shadow var(--transition), transform var(--transition);
}

.btn:hover {
  background: var(--primary-strong);
  color: #fff;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(15, 91, 215, 0.32), 0 1px 2px rgba(0,0,0,0.07);
  transform: translateY(-1px);
}

.btn:active { transform: translateY(0); }

.btn[aria-disabled="true"] {
  cursor: wait;
  opacity: 0.92;
}

.btn.is-loading {
  pointer-events: none;
}

.btn-inline-spinner {
  display: none;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.32);
  border-top-color: #ffffff;
  animation: progress-spin 800ms linear infinite;
}

.btn.is-loading .btn-inline-spinner {
  display: inline-block;
}

.btn-secondary {
  background: var(--surface-strong);
  color: var(--text);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
  background: #edf3fb;
  color: var(--text);
  box-shadow: 0 2px 6px rgba(15, 33, 58, 0.09);
}

.btn-secondary .btn-inline-spinner {
  border-color: rgba(17, 29, 46, 0.2);
  border-top-color: var(--text);
}

.btn-next-step {
  background: linear-gradient(135deg, #2f6cff 0%, #4d7bff 100%);
  border-color: rgba(112, 152, 255, 0.6);
  box-shadow: 0 6px 18px rgba(47, 108, 255, 0.28);
}

.btn-next-step:hover {
  background: linear-gradient(135deg, #245de4 0%, #3f6eee 100%);
  border-color: rgba(128, 165, 255, 0.75);
}

.btn-danger {
  background: var(--danger);
  color: #fff;
  box-shadow: 0 1px 3px rgba(208, 64, 64, 0.25);
}

.btn-danger:hover {
  background: #b83030;
  box-shadow: 0 2px 8px rgba(208, 64, 64, 0.3);
}

.btn-success {
  background: var(--success);
  color: #fff;
  box-shadow: 0 1px 3px rgba(28, 138, 90, 0.25);
}

.btn-link {
  background: none;
  border: none;
  padding: 0;
  color: inherit;
  font: inherit;
  cursor: pointer;
  box-shadow: none;
}

.btn-link:hover { transform: none; box-shadow: none; }

/* Progress overlay */

.progress-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(8, 15, 28, 0.5);
  backdrop-filter: blur(6px);
}

.progress-overlay.is-visible {
  display: flex;
}

.progress-dialog {
  width: min(100%, 420px);
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 16px;
  align-items: center;
  padding: 20px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface-strong);
  box-shadow: var(--shadow-lg);
}

.progress-dialog h2 {
  margin: 0 0 4px 0;
  font-size: 1rem;
}

.progress-dialog p {
  margin: 0;
  color: var(--text-soft);
  font-size: 13px;
}

.progress-spinner {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 3px solid rgba(15, 91, 215, 0.16);
  border-top-color: var(--primary);
  animation: progress-spin 800ms linear infinite;
}

@keyframes progress-spin {
  to { transform: rotate(360deg); }
}

/* ── Grids ── */

.stats-grid,
.summary-grid,
.form-grid,
.split-grid {
  display: grid;
  gap: 12px;
}

.summary-grid {
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

/* ── Stats / info cards ── */

.stats-card {
  background: linear-gradient(145deg, var(--surface-strong) 0%, var(--surface-alt) 100%);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px 16px;
  position: relative;
  overflow: hidden;
  transition: box-shadow var(--transition), transform var(--transition);
}

.stats-card::after {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), rgba(15, 91, 215, 0.3));
  opacity: 0.4;
}

.stats-label {
  color: var(--text-faint);
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 7px;
}

.stats-value {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
}

.stack { display: grid; gap: 12px; }
.stack.tight { gap: 8px; }

form { margin: 0; }

.form-grid.two-col { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid.three-col { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.field,
.field-span-2,
.field-span-3 {
  min-width: 0;
}

.field-span-2 { grid-column: span 2; }
.field-span-3 { grid-column: span 3; }

label {
  display: block;
  margin-bottom: 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.01em;
}

input[type="text"],
input[type="email"],
input[type="url"],
input[type="number"],
input[type="password"],
input[type="time"],
select,
textarea {
  width: 100%;
  min-height: 40px;
  padding: 9px 12px;
  border-radius: 11px;
  border: 1px solid var(--border-strong);
  background: rgba(255, 255, 255, 0.98);
  color: var(--text);
  font: inherit;
  transition: border-color var(--transition), box-shadow var(--transition);
}

textarea {
  min-height: 90px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: rgba(15, 91, 215, 0.5);
  box-shadow: 0 0 0 3px rgba(15, 91, 215, 0.1);
}

input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
}

input[type="range"] {
  width: 100%;
  accent-color: var(--primary);
}

.checkbox-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-weight: 600;
}

.section-block {
  border-top: 1px solid var(--border);
  padding-top: 14px;
  margin-top: 14px;
}

.section-block:first-child {
  border-top: 0;
  padding-top: 0;
  margin-top: 0;
}

/* ── Tables ── */

.table-scroll {
  overflow-x: auto;
  border-radius: 12px;
}

.item-table {
  width: 100%;
  min-width: 720px;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
}

.item-table th {
  padding: 10px 12px;
  background: linear-gradient(180deg, #eff4fa 0%, #e8f0f8 100%);
  color: var(--text-faint);
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.item-table td {
  padding: 12px;
  border-bottom: 1px solid #ecf0f5;
  vertical-align: top;
  background: rgba(255, 255, 255, 0.8);
  transition: background var(--transition);
}

.item-table tbody tr:last-child td {
  border-bottom: none;
}

.item-table tbody tr:hover td {
  background: #f4f8ff;
}

.headline {
  max-width: 320px;
  font-weight: 600;
  white-space: normal;
  color: var(--text);
}

.source-cell,
.summary-cell {
  color: var(--text-soft);
}

.summary-cell {
  max-width: 340px;
  font-size: 12.5px;
}

.table-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.table-actions form {
  display: inline-flex;
}

.source-table {
  min-width: 980px;
}

.source-table .source-col-source { width: 20%; }
.source-table .source-col-type { width: 12%; }
.source-table .source-col-url { width: 30%; }
.source-table .source-col-priority { width: 8%; }
.source-table .source-col-status { width: 16%; }
.source-table .source-col-actions { width: 14%; }

.source-table td,
.source-table th {
  vertical-align: top;
}

.source-url-cell {
  min-width: 280px;
}

.source-url-link {
  display: block;
  overflow-wrap: anywhere;
  word-break: break-word;
  color: var(--primary);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.5;
}

.source-url-link:hover {
  text-decoration: underline;
}

.source-primary {
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}

.source-secondary {
  color: var(--text-soft);
  font-size: 11.5px;
  overflow-wrap: anywhere;
}

.source-type-stack,
.source-status-stack,
.source-action-stack {
  display: grid;
  gap: 8px;
}

.source-mini-pill {
  justify-self: start;
  min-height: 20px;
  font-size: 10px;
  padding: 0 8px;
}

.source-priority {
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
}

.source-status-note {
  font-size: 11px;
  line-height: 1.4;
  color: var(--text-soft);
  overflow-wrap: anywhere;
}

.source-status-note strong {
  color: var(--text);
}

.source-edit-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.source-edit-grid .field {
  margin-bottom: 0;
}

.source-edit-grid .field span {
  display: block;
  margin-bottom: 5px;
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-faint);
}

.source-edit-grid input[type="text"],
.source-edit-grid input[type="url"],
.source-edit-grid input[type="number"],
.source-edit-grid select {
  font-size: 12px;
}

.source-enabled-check {
  margin-top: 4px;
}

.source-modal {
  width: min(100% - 24px, 720px);
  padding: 0;
  border: 0;
  background: transparent;
}

.source-modal::backdrop {
  background: rgba(8, 15, 28, 0.58);
  backdrop-filter: blur(6px);
}

.source-modal-card {
  background: var(--surface-strong);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 20px;
}

.source-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.source-modal-kicker {
  color: var(--primary);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 6px;
}

.source-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 16px;
}

.source-recommendation-group {
  margin-top: 12px;
}

.source-recommendation-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-strong);
  padding: 14px;
}

.source-recommendation-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 10px;
}

.source-recommendation-body {
  display: grid;
  gap: 6px;
  margin-bottom: 12px;
}
.keyword-added-box {
  margin-top: 10px;
  padding: 12px;
  border-radius: 14px;
  background: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(96, 165, 250, 0.22);
}
.keyword-added-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}
.keyword-added-pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.2);
  color: #dbe7ff;
  font-size: 12px;
  font-weight: 700;
}

.btn:disabled,
.btn[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
  pointer-events: none;
  transform: none;
  box-shadow: none;
}

/* ── Pills / Badges ── */

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: #fff;
}

.pill-FACT         { background: linear-gradient(135deg, #1c8a5a, #16a671); }
.pill-STRONG_REPORT{ background: linear-gradient(135deg, #0f5bd7, #1a78f5); }
.pill-RUMOUR       { background: linear-gradient(135deg, #c07c14, #e09a20); }
.pill-OPINION      { background: linear-gradient(135deg, #6b7785, #8a96a6); }
.pill-OK           { background: linear-gradient(135deg, #1c8a5a, #16a671); }
.pill-PARTIAL      { background: linear-gradient(135deg, #c07c14, #e09a20); }
.pill-FAILED       { background: linear-gradient(135deg, #c03030, #e04545); }

/* ── Topic / agent card (legacy) ── */

.topic-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
  margin-bottom: 14px;
}

/* ── Agent grid & tiles ── */

.agent-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.agent-tile {
  display: grid;
  gap: 12px;
  background: linear-gradient(155deg, rgba(255,255,255,0.99) 0%, rgba(246,250,255,0.97) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
  position: relative;
  overflow: hidden;
  transition: box-shadow var(--transition), transform var(--transition);
}

.agent-tile::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary) 0%, rgba(99, 179, 237, 0.8) 60%, transparent 100%);
  opacity: 0;
  transition: opacity var(--transition);
}

.agent-tile:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.agent-tile:hover::before {
  opacity: 1;
}

.agent-tile-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.agent-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.agent-title-row h3 a {
  color: var(--text);
  font-weight: 700;
  letter-spacing: -0.01em;
}

.agent-title-row h3 a:hover {
  color: var(--primary);
  text-decoration: none;
}

.tile-actions {
  padding-top: 2px;
}

.tile-run-preview {
  border-top: 1px solid var(--border);
  padding-top: 12px;
}

.tile-run-preview .item-table {
  min-width: 420px;
}

.tile-run-preview .summary-cell,
.tile-run-preview .item-table th:nth-child(5),
.tile-run-preview .item-table th:nth-child(6),
.tile-run-preview .item-table td:nth-child(5) {
  display: none;
}

.compact-empty {
  padding: 14px 10px 4px;
  text-align: left;
}

.inline-form {
  display: inline-flex;
}

.topic-card + .topic-card { margin-top: 0; }

.topic-card-header {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 12px;
}

/* ── Detail / meta layout ── */

.detail-list {
  display: grid;
  gap: 8px;
}

.detail-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 13px;
}

.detail-label {
  color: var(--text-faint);
  min-width: 108px;
}

/* ── Empty states ── */

.empty-state {
  padding: 36px 24px;
  text-align: center;
}

.empty-state h2 {
  font-size: 1.25rem;
  margin-bottom: 10px;
  color: var(--text);
}

.empty-state .lede {
  margin: 0 auto;
  text-align: center;
}

/* ── Day / archive layout ── */

.day-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.date-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 8px;
  padding: 0;
  margin: 0;
}

.date-list a {
  display: block;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  transition: background var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.date-list a:hover {
  background: #edf3fb;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
  text-decoration: none;
  color: var(--primary);
}

/* ── Breadcrumbs ── */

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  color: var(--text-faint);
  font-size: 12px;
  margin-bottom: 12px;
}

/* ── Article detail ── */

.article-detail {
  width: 100%;
  max-width: none;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin: 12px 0;
  color: var(--text-soft);
}

.article-section {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.feedback-form {
  margin-top: 18px;
}

.feedback-form form {
  display: grid;
  grid-template-columns: minmax(0, 180px) minmax(0, 1fr) auto;
  gap: 8px;
}

/* ── Search ── */

.search-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.search-input {
  font-size: 14px;
}

/* ── Auth ── */

.auth-card {
  max-width: 420px;
  margin: 54px auto;
}

/* ── Footer ── */

.footer {
  text-align: center;
  padding: 22px 0 30px;
  font-size: 12px;
  color: var(--text-faint);
  border-top: 1px solid rgba(219, 227, 236, 0.5);
  margin-top: 8px;
}

/* ── Log viewer ── */

.log-view {
  margin: 0;
  padding: 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: linear-gradient(180deg, #0d1521 0%, #0a1019 100%);
  color: #c8daf0;
  font-family: "Cascadia Code", "Consolas", "SFMono-Regular", monospace;
  font-size: 12px;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 420px;
  overflow: auto;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.4);
}

.email-preview-frame {
  width: 100%;
  min-height: 720px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #ffffff;
  box-shadow: var(--shadow-sm);
}

code {
  background: rgba(15, 91, 215, 0.09);
  padding: 2px 6px;
  border-radius: 6px;
  font-size: 0.93em;
  border: 1px solid rgba(15, 91, 215, 0.12);
}

/* ── Page hero (dark header strip for inner pages) ── */

.page-hero {
  background:
    radial-gradient(ellipse 55% 120% at 0% 50%, rgba(15,91,215,0.16) 0%, transparent 65%),
    radial-gradient(ellipse 40% 80% at 100% 20%, rgba(99,179,237,0.08) 0%, transparent 60%),
    linear-gradient(160deg, #06101e 0%, #0d1929 55%, #111d2e 100%);
  border-bottom: 1px solid rgba(255,255,255,0.07);
  padding: 20px 0 16px;
}

.page-hero-inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.page-hero .page-kicker {
  color: rgba(147,197,253,0.88);
  opacity: 1;
  background: rgba(15,91,215,0.18);
  border: 1px solid rgba(15,91,215,0.28);
  padding: 3px 10px;
  border-radius: 999px;
}

.page-hero h1 {
  background: linear-gradient(135deg, #ffffff 0%, rgba(196,220,255,0.88) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-size: clamp(1.45rem, 3vw, 2.1rem);
}

.page-hero .lede {
  color: rgba(255,255,255,0.55);
  margin-top: 6px;
}

.page-hero .helper {
  color: rgba(255,255,255,0.4);
}

.page-hero code {
  background: rgba(15,91,215,0.3);
  border-color: rgba(15,91,215,0.4);
  color: rgba(196,220,255,0.9);
}

.page-hero .btn-secondary {
  background: rgba(255,255,255,0.09);
  border-color: rgba(255,255,255,0.2);
  color: rgba(255,255,255,0.85);
  box-shadow: none;
}

.page-hero .btn-secondary:hover {
  background: rgba(255,255,255,0.16);
  border-color: rgba(255,255,255,0.32);
  color: #fff;
  box-shadow: none;
}

.page-hero .btn {
  box-shadow: 0 2px 14px rgba(15,91,215,0.45);
}

.hero-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  color: rgba(255,255,255,0.35);
  font-size: 12px;
  margin-bottom: 6px;
}

.hero-breadcrumb a {
  color: rgba(147,197,253,0.65);
}

.hero-breadcrumb a:hover {
  color: rgba(147,197,253,1);
  text-decoration: none;
}

.page-hero .article-meta {
  color: rgba(255,255,255,0.5);
  margin: 8px 0 0;
}

.page-hero .article-meta .pill {
  vertical-align: middle;
}

/* ── Landing page ── */

.landing-main {
  /* No container padding — sections handle their own layout */
}

.public-landing {
  color: #e6edf8;
  background:
    radial-gradient(ellipse 75% 45% at 12% 0%, rgba(31, 228, 215, 0.09) 0%, transparent 58%),
    radial-gradient(ellipse 55% 45% at 88% 8%, rgba(169, 77, 255, 0.08) 0%, transparent 52%),
    linear-gradient(180deg, #060b16 0%, #0b1322 100%);
}

.public-landing .footer {
  color: #96a7bf;
}

.public-landing .footer a {
  color: #c9d7f0;
}

/* Hero */
.landing-hero {
  background:
    radial-gradient(ellipse 70% 60% at 80% 50%, rgba(15, 91, 215, 0.18) 0%, transparent 65%),
    radial-gradient(ellipse 50% 80% at 10% 20%, rgba(124, 58, 237, 0.12) 0%, transparent 60%),
    linear-gradient(180deg, #080f1c 0%, #0d1929 100%);
  padding: 72px 0 80px;
  overflow: hidden;
  position: relative;
}

.landing-hero::after {
  content: "";
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 64px;
  background: linear-gradient(180deg, transparent, var(--bg));
  pointer-events: none;
}

.landing-hero-inner {
  display: grid;
  grid-template-columns: 1fr 480px;
  gap: 48px;
  align-items: center;
}

.landing-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(15, 91, 215, 0.18);
  border: 1px solid rgba(15, 91, 215, 0.35);
  color: rgba(147, 197, 253, 0.9);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 5px 13px;
  border-radius: 999px;
  margin-bottom: 24px;
}

.landing-wordmark {
  display: block;
  width: min(360px, 100%);
  height: auto;
  margin-bottom: 18px;
}

.auth-wordmark {
  display: block;
  width: min(300px, 100%);
  height: auto;
  margin-bottom: 18px;
}

.landing-heading {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.1;
  color: #fff;
  margin-bottom: 20px;
  background: linear-gradient(135deg, #fff 0%, rgba(196, 220, 255, 0.9) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.landing-sub {
  font-size: 1.05rem;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.62);
  max-width: 52ch;
  margin-bottom: 36px;
}

.landing-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.landing-btn-primary {
  background: linear-gradient(135deg, #1a6ef7 0%, #0f5bd7 100%);
  color: #fff;
  border: none;
  box-shadow: 0 4px 20px rgba(15, 91, 215, 0.45), 0 1px 4px rgba(0,0,0,0.2);
  padding: 0 24px;
  min-height: 44px;
  font-size: 14px;
}

.landing-btn-primary:hover {
  background: linear-gradient(135deg, #2078ff 0%, #1a6ef7 100%);
  box-shadow: 0 6px 28px rgba(15, 91, 215, 0.55), 0 2px 6px rgba(0,0,0,0.2);
  color: #fff;
}

.landing-btn-ghost {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: rgba(255, 255, 255, 0.8);
  min-height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  text-decoration: none;
  transition: background var(--transition), border-color var(--transition);
}

.landing-btn-ghost:hover {
  background: rgba(255, 255, 255, 0.13);
  border-color: rgba(255, 255, 255, 0.28);
  color: #fff;
  text-decoration: none;
}

.landing-btn-lg {
  min-height: 50px;
  padding: 0 32px;
  font-size: 15px;
}

.landing-hero-graphic {
  display: flex;
  align-items: center;
  justify-content: center;
}

.landing-hero-console {
  width: 100%;
  max-width: 460px;
  display: grid;
  gap: 16px;
  padding: 24px;
  border-radius: 24px;
  background: #142133;
  border: 1px solid rgba(148, 163, 184, 0.14);
  box-shadow: 0 24px 48px rgba(4, 9, 19, 0.3);
}

.landing-console-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.landing-console-kicker {
  color: #8fb4ff;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.landing-console-top strong {
  color: #f8fbff;
  font-size: 1.2rem;
  line-height: 1.3;
}

.landing-console-pill {
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  background: rgba(59, 130, 246, 0.18);
  color: #dbe7ff;
  font-size: 0.88rem;
  font-weight: 700;
  white-space: nowrap;
}

.landing-console-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.landing-console-card {
  display: grid;
  gap: 8px;
  padding: 16px;
  border-radius: 18px;
  background: #172437;
  border: 1px solid rgba(148, 163, 184, 0.14);
}

.landing-console-card-wide {
  grid-column: 1 / -1;
}

.landing-console-label {
  color: #96a7bf;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.landing-console-value {
  color: #f8fbff;
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
}

.landing-console-meta {
  color: #c2cee0;
  font-size: 0.94rem;
}

.landing-console-list {
  display: grid;
  gap: 10px;
}

.landing-console-list span {
  display: block;
  color: #d7e2f4;
  font-size: 0.95rem;
  line-height: 1.45;
}

.landing-email-sample {
  display: grid;
  gap: 14px;
}

.landing-email-header {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
}

.landing-email-subject {
  color: #f8fbff;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.35;
}

.landing-email-meta {
  margin-top: 4px;
  color: #96a7bf;
  font-size: 0.84rem;
}

.landing-email-list {
  display: grid;
  gap: 10px;
}

.landing-email-card {
  display: grid;
  gap: 8px;
  padding: 14px;
  border-radius: 16px;
  background: #101a29;
  border: 1px solid rgba(148, 163, 184, 0.12);
}

.landing-email-card-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.landing-email-card-top strong {
  color: #edf3ff;
  font-size: 0.95rem;
  line-height: 1.4;
}

.landing-email-card-top span {
  color: #8fb4ff;
  font-size: 0.8rem;
  font-weight: 700;
  white-space: nowrap;
}

.landing-email-card p {
  margin: 0;
  color: #c2cee0;
  font-size: 0.9rem;
  line-height: 1.55;
}

/* Sections */
.landing-section {
  padding: 72px 0;
}

.public-landing .landing-section-heading {
  color: #f8fbff;
}

.public-landing .landing-section-sub {
  color: #96a7bf;
}

.landing-section-header {
  text-align: center;
  margin-bottom: 36px;
}

.landing-section-label {
  display: inline-block;
  color: var(--primary);
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 12px;
  opacity: 0.85;
}

.landing-section-heading {
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text);
  margin-bottom: 10px;
}

.landing-section-sub {
  color: var(--text-soft);
  font-size: 1rem;
  max-width: 56ch;
  margin: 0 auto;
  line-height: 1.65;
}

/* Feature grid */
.landing-feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  align-items: stretch;
}

.landing-feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition), transform var(--transition);
  position: relative;
  overflow: hidden;
  min-height: 100%;
}

.landing-feature-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.9), transparent);
}

.landing-feature-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-3px);
}

.landing-feature-card h3 {
  font-size: 1rem;
  font-weight: 700;
  margin: 14px 0 8px;
  letter-spacing: -0.01em;
}

.landing-feature-card p {
  color: var(--text-soft);
  font-size: 13.5px;
  line-height: 1.65;
  margin: 0;
}

.public-landing .landing-feature-card {
  background: #142133;
  border-color: rgba(148, 163, 184, 0.14);
  box-shadow: none;
}

.public-landing .landing-feature-card h3 {
  color: #f8fbff;
}

.public-landing .landing-feature-card p {
  color: #96a7bf;
}

.landing-feature-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.landing-icon-blue  { background: rgba(15, 91, 215, 0.1); color: #1a6ef7; }
.landing-icon-green { background: rgba(28, 138, 90, 0.1); color: #1c8a5a; }
.landing-icon-purple{ background: rgba(124, 58, 237, 0.1); color: #7c3aed; }
.landing-icon-amber { background: rgba(192, 124, 20, 0.1); color: #c07c14; }

/* How it works */
.landing-how {
  background: var(--surface-alt);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.public-landing .landing-how {
  background: transparent;
  border-top-color: rgba(148, 163, 184, 0.1);
  border-bottom-color: rgba(148, 163, 184, 0.1);
}

.landing-steps {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  gap: 0;
  align-items: start;
  max-width: 900px;
  margin: 0 auto;
}

.landing-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 16px;
  padding: 8px 20px;
}

.landing-step-number {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1a6ef7 0%, #0f5bd7 100%);
  color: #fff;
  font-size: 1.1rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(15, 91, 215, 0.35);
  flex-shrink: 0;
}

.landing-step-body h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}

.landing-step-body p {
  color: var(--text-soft);
  font-size: 13.5px;
  line-height: 1.65;
  margin: 0;
}

.public-landing .landing-step-body h3 {
  color: #f8fbff;
}

.public-landing .landing-step-body p {
  color: #96a7bf;
}

.landing-step-connector {
  width: 60px;
  height: 2px;
  background: linear-gradient(90deg, rgba(15, 91, 215, 0.4), rgba(15, 91, 215, 0.15));
  border-radius: 999px;
  margin-top: 32px;
}

/* Final CTA */
.landing-final {
  padding: 80px 0 96px;
  text-align: center;
}

.landing-final-inner {
  max-width: 600px;
  margin: 0 auto;
  background: linear-gradient(145deg, #0d1929 0%, #111d2e 100%);
  border: 1px solid rgba(15, 91, 215, 0.25);
  border-radius: 28px;
  padding: 56px 48px;
  box-shadow: 0 24px 64px rgba(15, 33, 58, 0.2), 0 0 0 1px rgba(255,255,255,0.04) inset;
  position: relative;
  overflow: hidden;
}

.landing-final-inner::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(15, 91, 215, 0.2) 0%, transparent 70%);
  pointer-events: none;
}

.landing-final-heading {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #fff;
  margin-bottom: 12px;
  position: relative;
}

.landing-final-sub {
  color: rgba(255, 255, 255, 0.55);
  font-size: 1rem;
  line-height: 1.65;
  margin-bottom: 32px;
  position: relative;
}

.landing-final .landing-cta-row {
  justify-content: center;
  position: relative;
}

/* ── Run progress (live) ── */

.run-progress-panel {
  background: linear-gradient(145deg, #0d1521 0%, #0f1d2e 100%);
  border: 1px solid rgba(15, 91, 215, 0.25);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
  color: #c8daf0;
}

/* ── Responsive ── */

body.app-body {
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.15), transparent 28%),
    linear-gradient(180deg, #07111f 0%, #0a1625 100%);
  color: #e6edf8;
}

.app-body {
  --bg: #08111e;
  --surface: #121f31;
  --surface-strong: #182538;
  --surface-alt: #1b2a3f;
  --border: rgba(148, 163, 184, 0.14);
  --border-strong: rgba(148, 163, 184, 0.22);
  --text: #e6edf8;
  --text-soft: #b7c3d8;
  --text-faint: #90a0b8;
  --primary: #3b82f6;
  --primary-strong: #2563eb;
  --primary-light: rgba(59, 130, 246, 0.14);
  --success: #34d399;
  --warning: #fbbf24;
  --danger: #f87171;
  --shadow-sm: none;
  --shadow: none;
  --shadow-lg: 0 20px 60px rgba(3, 8, 18, 0.42);
}

.app-body a { color: #c5d5ff; }
.app-shell { display: grid; grid-template-columns: 210px minmax(0, 1fr); min-height: 100vh; }
.app-sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 14px; padding: 18px 14px; background: #060d1a; border-right: 1px solid rgba(148, 163, 184, 0.12); }
.app-sidebar-top { display: grid; gap: 16px; }
.app-sidebar-nav { display: flex; flex: 1; min-height: 0; flex-direction: column; gap: 12px; }
.app-nav-section { display: grid; gap: 6px; }
.app-admin-nav-section { margin-top: auto; padding-top: 14px; border-top: 1px solid rgba(148, 163, 184, 0.12); }
.app-nav-heading { padding: 0 12px 4px; color: #7f8fa8; font-size: 0.72rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; }
.app-sidebar-footer { display: grid; gap: 14px; padding-top: 18px; border-top: 1px solid rgba(148, 163, 184, 0.12); }
.app-brand { display: flex; gap: 12px; align-items: center; color: #fff; text-decoration: none; min-height: 54px; }
.app-brand:hover { text-decoration: none; }
.app-brand-full { align-items: center; justify-content: center; min-height: 0; width: 100%; }
.app-brand-icon-only { justify-content: flex-start; min-height: 0; }
.app-brand-mark { width: 42px; height: 42px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; background: #020617; color: #f8fbff; }
.app-brand-mark-image { background: transparent; border-radius: 0; object-fit: contain; width: 42px; height: 42px; }
.app-brand-icon { width: 58px; height: 38px; display: block; object-fit: contain; flex: 0 0 auto; }
.app-brand-icon-large { width: 72px; height: 46px; display: block; object-fit: contain; object-position: left center; }
.app-brand-copy { display: grid; gap: 2px; min-width: 0; }
.app-brand-wordmark { width: 100%; max-width: 182px; height: 70px; display: block; object-fit: contain; object-position: center center; }
.app-brand-wordmark-light { display: none; }
.app-brand-title { display: block; font-size: 1.08rem; font-weight: 700; letter-spacing: 0.08em; color: #f8fbff; text-transform: uppercase; line-height: 1.05; }
.app-brand-subtitle { display: block; color: #94a3b8; font-size: 0.72rem; letter-spacing: 0.02em; line-height: 1.2; }
.app-sidebar-cta { width: 100%; justify-content: center; min-height: 40px; padding-inline: 10px; }
.app-nav-link { display: flex; align-items: center; min-height: 44px; padding: 0 12px; border-radius: 12px; color: #aebbd0; font-size: 0.92rem; font-weight: 600; text-decoration: none; background: transparent; border: 1px solid transparent; }
.app-nav-link:hover { text-decoration: none; color: #f8fbff; background: rgba(37, 99, 235, 0.1); }
.app-nav-link.active { color: #f8fbff; background: rgba(37, 99, 235, 0.16); border-color: rgba(59, 130, 246, 0.22); box-shadow: inset 3px 0 0 #3b82f6; }
.app-user-card { display: flex; align-items: center; gap: 12px; }
.app-user-avatar, .app-topbar-profile { width: 38px; height: 38px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #1d4ed8, #60a5fa); color: #fff; font-weight: 700; text-decoration: none; }
.app-user-name { color: #f8fbff; font-weight: 700; }
.app-user-role { color: #90a0b8; font-size: 0.82rem; }
.app-logout-btn { width: 100%; }
.app-main { min-width: 0; }
.app-topbar { position: sticky; top: 0; z-index: 18; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px; min-height: 54px; padding: 8px 28px; background: rgba(7, 13, 25, 0.82); border-bottom: 1px solid rgba(148, 163, 184, 0.08); backdrop-filter: blur(10px); }
.app-topbar-title-row { display: flex; align-items: center; gap: 14px; }
.app-topbar-logo { display: none; width: 34px; height: 28px; object-fit: contain; }
.app-menu-button { display: none; width: 40px; height: 40px; border: 1px solid rgba(148, 163, 184, 0.18); border-radius: 12px; background: #121b2a; padding: 0; }
.app-menu-button span { display: block; width: 18px; height: 2px; margin: 4px auto; background: #c8d3e7; }
.app-topbar-actions { display: flex; justify-content: flex-end; align-items: center; gap: 10px; }
.app-icon-button { width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; border-radius: 11px; background: #121b2a; border: 1px solid rgba(148, 163, 184, 0.16); color: #d9e3f5; text-decoration: none; }
.app-icon-button:hover { text-decoration: none; background: #172336; }
.app-content.container { width: 100%; max-width: none; margin: 0; padding: 18px 28px 96px; }
.dashboard-hero, .app-body .page-hero { margin: 0 28px; padding: 10px 0 6px; background: transparent; border-bottom: 0; }
.app-body .page-hero .page-shell { width: 100%; max-width: none; margin: 0; }
.dashboard-hero { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.dashboard-hero-copy h1, .app-body .page-hero h1 { color: #f8fbff; background: none; -webkit-text-fill-color: initial; }
.dashboard-hero .lede, .app-body .page-hero .lede { color: #a9b9cf; }
.app-body .page-hero .shared-agents-lede { max-width: none; white-space: nowrap; }
.dashboard-hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.app-body .panel, .app-body .ops-card, .app-body .stats-card, .app-body .assistant-lead-card, .app-body .assistant-mini-card, .app-body .intel-agent-card, .app-body .mini-agent-card { background: #142133; border: 1px solid rgba(148, 163, 184, 0.14); border-radius: 18px; box-shadow: none; }
.app-body .panel::before, .app-body .stats-card::after { display: none; }
.assistant-panel { display: grid; gap: 12px; margin-bottom: 22px; }
.dashboard-section-card {
  margin-top: 24px;
  padding: 20px;
  background: #101c2d;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 22px;
}
.dashboard-section-card-grid {
  padding: 24px;
}
.dashboard-section-card:first-child {
  margin-top: 0;
}
.assistant-header, .agent-section-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; }
.agent-section-header .panel-title { display: grid; gap: 5px; }
.assistant-pill { min-height: 30px; padding: 0 12px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; background: rgba(59, 130, 246, 0.18); color: #dbe7ff; font-size: 0.88rem; font-weight: 700; }
.assistant-pill-button {
  border: 1px solid rgba(96, 165, 250, 0.22);
  cursor: pointer;
}
.assistant-pill-button:hover {
  background: rgba(59, 130, 246, 0.28);
}
.assistant-status-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  color: #90a0b8;
  font-size: 0.88rem;
}
.assistant-list {
  display: grid;
  gap: 10px;
}
.assistant-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 16px;
  background: #142133;
  border: 1px solid rgba(148, 163, 184, 0.14);
}
.assistant-item-copy {
  min-width: 0;
}
.assistant-item-action {
  flex-shrink: 0;
  align-self: center;
}
.assistant-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(260px, 0.8fr); gap: 16px; }
.assistant-side-grid, .agent-strip-grid, .agent-card-grid, .network-grid, .ops-grid { display: grid; gap: 16px; }
.assistant-lead-card, .assistant-mini-card, .mini-agent-card, .intel-agent-card, .ops-card { padding: 20px; }
.assistant-lead-top, .mini-agent-top, .intel-agent-top, .intel-agent-title-row { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.assistant-card-title, .mini-agent-title, .intel-agent-card h3 { color: #f8fbff; font-size: 1.05rem; font-weight: 800; }
.assistant-card-meta, .assistant-card-due, .intel-agent-subline, .intel-agent-footnote { color: #90a0b8; font-size: 0.92rem; }
.assistant-card-body, .intel-agent-description { color: #c2cee0; font-size: 1rem; line-height: 1.55; }
.assistant-link-action { display: inline-flex; margin-top: 8px; color: #b9ccff; font-weight: 700; text-decoration: none; }
.assistant-link-action:hover { text-decoration: none; color: #dce7ff; }
.assistant-dialog {
  width: min(100% - 24px, 760px);
  padding: 0;
  border: 0;
  background: transparent;
}
.assistant-dialog::backdrop {
  background: rgba(5, 10, 19, 0.72);
  backdrop-filter: blur(6px);
}
.assistant-dialog-card {
  background: #142133;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(3, 8, 18, 0.42);
  padding: 20px;
}
.assistant-dialog-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 16px;
}
.assistant-dialog-list {
  display: grid;
  gap: 12px;
  max-height: min(70vh, 640px);
  overflow-y: auto;
  padding-right: 4px;
}
.assistant-dialog-item {
  display: grid;
  gap: 12px;
  padding: 16px;
  border-radius: 16px;
  background: #172437;
  border: 1px solid rgba(148, 163, 184, 0.14);
}
.assistant-dialog-item-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}
.assistant-dialog-badge {
  min-height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(59, 130, 246, 0.16);
  color: #dbe7ff;
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
}
.agent-section { display: grid; gap: 12px; margin-top: 0; }
.dashboard-section-card .agent-section {
  margin-top: 0;
}
.agent-card-grid { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.intel-agent-card { display: grid; gap: 14px; }
.agent-row-list {
  display: grid;
  gap: 12px;
}
.agent-table-section {
  display: grid;
  gap: 14px;
}
.agent-table-panel {
  padding: 0;
  overflow: hidden;
}
.agent-data-table {
  min-width: 980px;
}
.agent-data-table td {
  vertical-align: middle;
}
.agent-select-col {
  width: 92px;
}
.agent-name-cell {
  min-width: 260px;
}
.agent-table-name-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}
.intel-agent-icon.compact {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  font-size: 0.9rem;
}
.agent-table-title {
  color: #f8fbff;
  font-weight: 800;
  line-height: 1.2;
}
.agent-table-description {
  max-width: 560px;
  margin-top: 3px;
  color: #90a0b8;
  font-size: 0.86rem;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.agent-table-primary {
  color: #e6edf8;
  font-weight: 700;
}
.agent-table-status,
.agent-table-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.agent-table-actions {
  min-width: 260px;
}
.btn-compact {
  min-height: 32px;
  padding: 7px 10px;
  border-radius: 10px;
  font-size: 0.82rem;
}

.btn-small {
  min-height: 28px;
  padding: 5px 8px;
  border-radius: 8px;
  font-size: 0.76rem;
}

.table-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.agent-table-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  color: #cbd7e8;
  font-weight: 700;
}
.agent-table-check input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.agent-table-check span[aria-hidden="true"] {
  width: 24px;
  height: 24px;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(15, 23, 36, 0.8);
  display: inline-grid;
  place-items: center;
}
.agent-table-check span[aria-hidden="true"]::after {
  content: "";
  width: 10px;
  height: 6px;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(-45deg) translateY(-1px);
  opacity: 0;
}
.agent-table-check input:checked + span[aria-hidden="true"] {
  background: linear-gradient(135deg, #2563eb, #06b6d4);
  border-color: rgba(96, 165, 250, 0.85);
}
.agent-table-check input:checked + span[aria-hidden="true"]::after {
  opacity: 1;
}
.agent-table-check-label {
  font-size: 0.82rem;
}
.agent-selection-bar {
  margin-top: 12px;
}
.intel-agent-row-card {
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  align-items: start;
}
.intel-agent-row-main {
  display: grid;
  gap: 14px;
}
.intel-agent-icon { width: 44px; height: 44px; border-radius: 14px; display: inline-flex; align-items: center; justify-content: center; background: #202f46; color: #f8fbff; font-weight: 800; }
.intel-agent-meta { display: grid; gap: 6px; min-width: 0; flex: 1; }
.intel-agent-title-row { justify-content: flex-start; align-items: center; flex-wrap: wrap; }
.intel-agent-checkbox { position: relative; display: inline-flex; align-items: center; }
.intel-agent-checkbox input { position: absolute; inset: 0; opacity: 0; }
.intel-agent-checkbox span { width: 22px; height: 22px; border-radius: 7px; border: 1px solid rgba(148, 163, 184, 0.28); background: #0e1725; display: inline-block; }
.intel-agent-checkbox input:checked + span { background: linear-gradient(135deg, #2563eb, #3b82f6); border-color: transparent; }
.intel-agent-checkbox input:checked + span::after { content: "✓"; display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; color: #ffffff; font-size: 14px; font-weight: 800; line-height: 1; }
.intel-agent-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.agent-helper-stack { display: grid; gap: 0; }
.agent-helper-stack .global-filter-bar {
  border-bottom-right-radius: 0;
  border-bottom-left-radius: 0;
}
.agent-helper-stack .agent-helper-card {
  border-top-right-radius: 0;
  border-top-left-radius: 0;
  border-top-color: rgba(148, 163, 184, 0.08);
}
.agent-helper-stack .agent-helper-card .helper {
  margin-top: 3px;
}
.global-filter-bar { display: flex; justify-content: space-between; align-items: end; gap: 16px; }
.global-filter-controls { display: flex; gap: 10px; align-items: end; flex: 1; }
.global-filter-field { display: grid; gap: 6px; flex: 1; margin: 0; }
.global-filter-field input { min-width: 260px; }
.global-agent-row[hidden],
.agent-filter-row[hidden] { display: none !important; }
.global-filter-empty { margin-top: 0; }
.agent-results {
  display: grid;
  gap: 12px;
  align-self: stretch;
  padding: 16px;
  border-radius: 16px;
  background: #172437;
  border: 1px solid rgba(148, 163, 184, 0.12);
}
.agent-results-empty {
  align-content: start;
}
.agent-results-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}
.agent-results-list {
  display: grid;
  gap: 10px;
}
.agent-result-item {
  display: grid;
  gap: 8px;
  padding: 12px 14px;
  border-radius: 14px;
  background: #101a29;
  border: 1px solid rgba(148, 163, 184, 0.1);
}
.agent-result-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}
.agent-result-title {
  color: #edf3ff;
  font-weight: 700;
  text-decoration: none;
}
.agent-result-title:hover {
  text-decoration: underline;
}
.agent-result-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 4px;
  color: #90a0b8;
  font-size: 0.86rem;
}
.agent-result-body {
  margin: 0;
  color: #c2cee0;
  font-size: 0.95rem;
  line-height: 1.55;
}
.dashboard-agent-card {
  align-content: start;
  gap: 12px;
  padding: 18px;
}
.dashboard-results-panel {
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  padding-top: 12px;
}
.dashboard-drag-handle {
  min-width: 74px;
  cursor: grab;
}
.dashboard-agent-card[draggable="true"] {
  cursor: grab;
}
.dashboard-agent-card.is-dragging {
  opacity: 0.7;
  border-color: rgba(96, 165, 250, 0.55);
}
.dashboard-agent-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.dashboard-agent-summary-pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.12);
  color: #aebbd0;
  font-size: 0.76rem;
  font-weight: 700;
}
.dashboard-agent-actions {
  display: grid;
  gap: 8px;
}
.dashboard-agent-actions-primary,
.dashboard-agent-actions-secondary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.dashboard-agent-actions-primary .btn {
  min-height: 34px;
  padding: 0 13px;
}
.dashboard-agent-actions-secondary {
  gap: 10px 14px;
  padding-top: 2px;
}
.dashboard-agent-link,
.dashboard-agent-link-button {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 0;
  color: #9fb1ca;
  font-size: 0.83rem;
  font-weight: 700;
  text-decoration: none;
  background: none;
  border: 0;
  cursor: pointer;
}
.dashboard-agent-link:hover,
.dashboard-agent-link-button:hover {
  color: #f8fbff;
  text-decoration: none;
}
.dashboard-agent-link-button {
  font: inherit;
}
.dashboard-agent-card .intel-agent-description {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.5;
}
.dashboard-agent-card .intel-agent-subline {
  font-size: 0.82rem;
}
.dashboard-agent-card .intel-agent-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
}
.dashboard-agent-card .intel-agent-top {
  gap: 12px;
}
.dashboard-agent-card .intel-agent-title-row h3 {
  font-size: 1rem;
}
.selection-bar { position: sticky; bottom: 24px; display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-top: 18px; padding: 16px 20px; border-radius: 24px; background: linear-gradient(135deg, rgba(18, 31, 49, 0.98), rgba(24, 37, 56, 0.96)); color: #e6edf8; border: 1px solid rgba(96, 165, 250, 0.28); box-shadow: 0 18px 36px rgba(3, 8, 18, 0.38); backdrop-filter: blur(18px) saturate(160%); -webkit-backdrop-filter: blur(18px) saturate(160%); }
.selection-bar .stats-label { color: #9ec3ff; }
.selection-bar .helper { color: #b7c3d8; }
.selection-count { font-size: 1.15rem; font-weight: 800; }
.network-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 24px; }
.dashboard-section-card > .network-grid:first-child,
.dashboard-section-card > .ops-grid:first-child {
  margin-top: 0;
}
.ops-grid { grid-template-columns: 320px minmax(0, 1fr) minmax(0, 1fr); margin-top: 24px; }
.ops-card-span-2 { grid-column: span 2; }
.integrity-metric { margin-top: 20px; font-size: 3rem; line-height: 1; font-weight: 800; color: #34d399; }
.throughput-chart { margin-top: 20px; height: 280px; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); align-items: end; gap: 10px; }
.throughput-chart span { display: block; border-radius: 10px 10px 0 0; background: linear-gradient(180deg, #a5b7ff 0%, #5f7096 100%); opacity: 0.82; }
.app-body .item-table { min-width: 0; border-spacing: 0; }
.app-body .item-table th { background: #1a2738; color: #98a8bf; border-bottom: 1px solid rgba(148, 163, 184, 0.12); }
.app-body .item-table td { background: #142133; border-bottom: 1px solid rgba(148, 163, 184, 0.08); }
.app-body .item-table tbody tr:hover td { background: #17273b; }
.app-body input[type="text"], .app-body input[type="email"], .app-body input[type="url"], .app-body input[type="number"], .app-body input[type="password"], .app-body input[type="time"], .app-body select, .app-body textarea { background: #0f1724; border-color: rgba(148, 163, 184, 0.18); color: #e6edf8; }
.app-body .btn-secondary { background: #243246; border-color: rgba(148, 163, 184, 0.14); color: #edf3ff; }
.app-body .btn-secondary:hover { background: #2b3b52; color: #fff; }
.app-body .btn-next-step {
  background: linear-gradient(135deg, #2f6cff 0%, #6a7cff 100%);
  border-color: rgba(125, 151, 255, 0.42);
  color: #fff;
}
.app-body .btn-next-step:hover {
  background: linear-gradient(135deg, #245de4 0%, #596be9 100%);
  color: #fff;
}
.app-body .muted, .app-body .helper, .app-body .section-note { color: #96a7bf; }
.app-body .error, .app-body .notice { background: #142133; border-color: rgba(148, 163, 184, 0.16); color: #e8effa; }
.app-body .page-title-block h1,
.app-body .panel-title h2,
.app-body .panel-title h3,
.app-body .field label,
.app-body .source-primary,
.app-body .source-modal-card h3,
.app-body .step-nav-item {
  color: #f8fbff;
}
.app-body .panel-title h2,
.app-body .panel-title h3 {
  letter-spacing: 0;
}
.app-body .step-nav {
  background: #142133;
  border-color: rgba(148, 163, 184, 0.14);
  border-radius: 18px;
}
.app-body .step-nav-item {
  border-radius: 999px;
}
.app-body .step-nav-item.active {
  background: rgba(37, 99, 235, 0.16);
}
.app-body .step-nav-sep {
  color: #51627b;
}
.app-body .source-modal-card,
.app-body .source-recommendation-card {
  background: #172437;
  border-color: rgba(148, 163, 184, 0.14);
}
.app-body .source-url-link {
  color: #9dc0ff;
}
.app-body .source-url-link:hover {
  color: #d6e6ff;
}
.app-body .article-detail {
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
}
.article-detail-grid {
  display: grid;
  grid-template-columns: minmax(240px, 320px) minmax(0, 1fr);
  gap: 16px;
  margin-bottom: 16px;
}
.article-meta-stack {
  display: grid;
  gap: 8px;
}
.article-content-card .article-section + .article-section {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
}
.feedback-form-grid {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}
.email-style-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.email-style-card {
  appearance: none;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: #172437;
  border-radius: 18px;
  padding: 18px;
  display: grid;
  gap: 12px;
  text-align: left;
  color: #e6edf8;
  cursor: pointer;
  transition: border-color 120ms ease, transform 120ms ease, background 120ms ease;
}
.email-style-card input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.email-style-card:hover {
  background: #1a2a40;
  border-color: rgba(96, 165, 250, 0.4);
  transform: translateY(-1px);
}
.email-style-card.is-selected {
  border-color: rgba(59, 130, 246, 0.8);
  box-shadow: inset 0 0 0 1px rgba(59, 130, 246, 0.35);
}
.email-style-title {
  font-size: 1rem;
  font-weight: 800;
  color: #f8fbff;
}
.email-style-note {
  font-size: 0.92rem;
  color: #96a7bf;
}
.email-style-preview {
  min-height: 102px;
  border-radius: 14px;
  background: #0f1724;
  border: 1px solid rgba(148, 163, 184, 0.14);
  padding: 12px;
}
.email-style-preview-table {
  display: block;
}
.email-style-example-table {
  display: grid;
  grid-template-columns: 1fr 1.35fr 0.85fr;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.16);
}
.email-style-example-header,
.email-style-example-cell {
  display: flex;
  align-items: flex-start;
  min-height: 28px;
  padding: 7px 8px;
  font-size: 10px;
  line-height: 1.35;
  text-align: left;
}
.email-style-example-header {
  background: rgba(59, 130, 246, 0.2);
  color: #dce8ff;
  font-weight: 700;
}
.email-style-example-cell {
  background: rgba(15, 23, 36, 0.85);
  color: #b7c6dc;
  border-top: 1px solid rgba(148, 163, 184, 0.14);
}
.email-style-example-table > *:not(:nth-child(3n)) {
  border-right: 1px solid rgba(148, 163, 184, 0.14);
}
.email-style-preview-cards {
  display: grid;
  gap: 8px;
}
.email-style-example-story-card {
  display: grid;
  gap: 4px;
  padding: 10px;
  border-radius: 10px;
  background: rgba(15, 23, 36, 0.85);
  border: 1px solid rgba(148, 163, 184, 0.14);
}
.email-style-example-title {
  color: #edf3ff;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.3;
}
.email-style-example-body {
  color: #b7c6dc;
  font-size: 10px;
  line-height: 1.4;
}
.email-style-example-meta {
  color: #8fb4ff;
  font-size: 10px;
  font-weight: 600;
}
.email-style-preview-text {
  display: block;
}
.email-style-example-text {
  display: block;
  margin: 0;
  padding: 10px;
  border-radius: 10px;
  background: rgba(15, 23, 36, 0.85);
  border: 1px solid rgba(148, 163, 184, 0.14);
  color: #b7c6dc;
  font-size: 10px;
  line-height: 1.55;
  white-space: pre-wrap;
  font-family: "Aptos", "Segoe UI", "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
}
.app-profile-menu {
  position: relative;
}

.app-profile-trigger {
  border: 0;
  cursor: pointer;
}

.app-profile-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: min(340px, calc(100vw - 32px));
  padding: 16px;
  border-radius: 18px;
  background: #142133;
  border: 1px solid rgba(148, 163, 184, 0.16);
  box-shadow: 0 20px 48px rgba(3, 8, 18, 0.4);
  display: grid;
  gap: 14px;
  z-index: 35;
}

.app-profile-panel[hidden] {
  display: none;
}

.app-profile-panel-header {
  display: grid;
  gap: 3px;
}

.app-profile-panel-name {
  color: #f8fbff;
  font-size: 0.98rem;
  font-weight: 800;
}

.app-profile-panel-role,
.app-profile-pref-note {
  color: #96a7bf;
  font-size: 0.84rem;
}

.app-profile-pref-group {
  display: grid;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
}

.app-profile-pref-group:first-of-type {
  padding-top: 0;
  border-top: 0;
}

.app-profile-pref-row {
  display: grid;
  gap: 10px;
}

.app-profile-pref-title {
  color: #f8fbff;
  font-size: 0.88rem;
  font-weight: 700;
}

.app-profile-segmented {
  display: inline-flex;
  gap: 8px;
  flex-wrap: wrap;
}

.app-pref-chip {
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: #0f1724;
  color: #cfe0ff;
  font: inherit;
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
}

.app-pref-chip.is-active {
  background: rgba(37, 99, 235, 0.24);
  border-color: rgba(96, 165, 250, 0.4);
  color: #ffffff;
}

.app-profile-toggle {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: start;
  margin: 0;
}

.app-profile-panel-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.app-profile-panel-actions form {
  display: inline-flex;
}

html[data-app-motion="reduced"] *,
body.app-body[data-motion="reduced"] * {
  animation-duration: 0.01ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: 0.01ms !important;
  scroll-behavior: auto !important;
}

body.app-body[data-density="compact"] .app-content.container {
  padding: 10px 18px 74px;
}

body.app-body[data-density="compact"] .app-topbar {
  min-height: 46px;
  padding-top: 5px;
  padding-bottom: 5px;
}

body.app-body[data-density="compact"] .app-sidebar {
  gap: 10px;
  padding-top: 14px;
  padding-bottom: 14px;
}

body.app-body[data-density="compact"] .app-brand-wordmark {
  height: 54px;
  max-width: 164px;
}

body.app-body[data-density="compact"] .app-sidebar-top {
  gap: 10px;
}

body.app-body[data-density="compact"] .app-nav-link {
  min-height: 36px;
  padding-inline: 10px;
  border-radius: 10px;
  font-size: 0.86rem;
}

body.app-body[data-density="compact"] .app-sidebar-cta {
  min-height: 34px;
  font-size: 0.82rem;
}

body.app-body[data-density="compact"] .dashboard-hero,
body.app-body[data-density="compact"] .app-body .page-hero,
body.app-body[data-density="compact"] .page-hero {
  margin-inline: 18px;
  padding-top: 4px;
  padding-bottom: 0;
}

body.app-body[data-density="compact"] .dashboard-hero-copy h1,
body.app-body[data-density="compact"] .page-hero h1 {
  font-size: clamp(1.6rem, 2.4vw, 2.2rem);
}

body.app-body[data-density="compact"] .dashboard-hero .lede,
body.app-body[data-density="compact"] .page-hero .lede {
  margin-top: 2px;
  font-size: 0.92rem;
}

body.app-body[data-density="compact"] .dashboard-section-card,
body.app-body[data-density="compact"] .panel,
body.app-body[data-density="compact"] .intel-agent-card,
body.app-body[data-density="compact"] .assistant-lead-card,
body.app-body[data-density="compact"] .assistant-mini-card,
body.app-body[data-density="compact"] .mini-agent-card,
body.app-body[data-density="compact"] .agent-results,
body.app-body[data-density="compact"] .ops-card,
body.app-body[data-density="compact"] .roundup-card,
body.app-body[data-density="compact"] .insight-card,
body.app-body[data-density="compact"] .source-table-card {
  padding: 12px;
  border-radius: 12px;
}

body.app-body[data-density="compact"] .panel-header,
body.app-body[data-density="compact"] .agent-section-header {
  margin-bottom: 8px;
}

body.app-body[data-density="compact"] .panel-title,
body.app-body[data-density="compact"] .field {
  gap: 3px;
}

body.app-body[data-density="compact"] .section-note,
body.app-body[data-density="compact"] .helper,
body.app-body[data-density="compact"] .muted {
  font-size: 0.82rem;
}

body.app-body[data-density="compact"] .assistant-item {
  padding: 9px 11px;
}

body.app-body[data-density="compact"] .assistant-grid,
body.app-body[data-density="compact"] .agent-card-grid,
body.app-body[data-density="compact"] .agent-row-list,
body.app-body[data-density="compact"] .assistant-side-grid,
body.app-body[data-density="compact"] .agent-strip-grid,
body.app-body[data-density="compact"] .stack {
  gap: 8px;
}

body.app-body[data-density="compact"] .dashboard-section-card,
body.app-body[data-density="compact"] .dashboard-section-card-grid {
  margin-top: 10px;
}

body.app-body[data-density="compact"] .agent-section {
  gap: 8px;
  margin-top: 0;
}

body.app-body[data-density="compact"] .item-table {
  font-size: 12px;
}

body.app-body[data-density="compact"] .item-table th {
  padding: 7px 9px;
}

body.app-body[data-density="compact"] .item-table td {
  padding: 8px 9px;
}

body.app-body[data-density="compact"] .btn {
  min-height: 30px;
  padding-inline: 11px;
  font-size: 12px;
}

body.app-body[data-density="compact"] .btn-compact,
body.app-body[data-density="compact"] .btn-small {
  min-height: 26px;
  padding: 4px 7px;
}

body.app-body[data-density="compact"] input,
body.app-body[data-density="compact"] select,
body.app-body[data-density="compact"] textarea {
  font-size: 13px;
}

body.app-body[data-density="compact"] .form-grid {
  gap: 10px;
}

body.app-body[data-density="compact"] .insight-card {
  gap: 8px;
}

body.app-body[data-density="compact"] .insight-title {
  font-size: 0.98rem;
}

body.app-body[data-density="compact"] .insight-summary,
body.app-body[data-density="compact"] .insight-why {
  font-size: 0.9rem;
}

html[data-app-theme="light"] body.app-body,
body.app-body[data-theme="light"] {
  --text: #111d2e;
  --text-soft: #34495e;
  --text-faint: #4b5f74;
  --text-muted: #415367;
  --surface: #ffffff;
  --surface-strong: #ffffff;
  --surface-alt: #f5f8fc;
  --surface-hover: #eef4fb;
  --border: rgba(15, 33, 58, 0.1);
  --border-strong: rgba(15, 33, 58, 0.16);
  --primary: #0f4fbf;
  --primary-strong: #123b89;
  background:
    radial-gradient(ellipse 80% 40% at 10% 0%, rgba(15, 91, 215, 0.07) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 90% 5%, rgba(31, 143, 95, 0.05) 0%, transparent 55%),
    linear-gradient(180deg, #f7f9fc 0%, #eef2f7 100%);
  color: #111d2e;
}

html[data-app-theme="light"] body.app-body a,
body.app-body[data-theme="light"] a {
  color: #1c5ed8;
}

html[data-app-theme="light"] body.app-body .btn:not(.btn-secondary):not(.btn-link),
html[data-app-theme="light"] body.app-body a.btn:not(.btn-secondary):not(.btn-link),
body.app-body[data-theme="light"] .btn:not(.btn-secondary):not(.btn-link),
body.app-body[data-theme="light"] a.btn:not(.btn-secondary):not(.btn-link) {
  color: #ffffff;
}

html[data-app-theme="light"] body.app-body .btn:not(.btn-secondary):not(.btn-link):hover,
html[data-app-theme="light"] body.app-body a.btn:not(.btn-secondary):not(.btn-link):hover,
body.app-body[data-theme="light"] .btn:not(.btn-secondary):not(.btn-link):hover,
body.app-body[data-theme="light"] a.btn:not(.btn-secondary):not(.btn-link):hover {
  color: #ffffff;
}

html[data-app-theme="light"] body.app-body .app-sidebar,
body.app-body[data-theme="light"] .app-sidebar {
  background: #f6f9fd;
  border-right-color: rgba(15, 33, 58, 0.08);
}

html[data-app-theme="light"] body.app-body .app-main,
body.app-body[data-theme="light"] .app-main {
  background: transparent;
}

html[data-app-theme="light"] body.app-body .app-topbar,
body.app-body[data-theme="light"] .app-topbar {
  background: rgba(247, 249, 252, 0.9);
  border-bottom-color: rgba(15, 33, 58, 0.08);
}

html[data-app-theme="light"] body.app-body .app-brand-title,
html[data-app-theme="light"] body.app-body .app-nav-link,
html[data-app-theme="light"] body.app-body .app-user-name,
html[data-app-theme="light"] body.app-body .dashboard-hero-copy h1,
html[data-app-theme="light"] body.app-body .page-hero h1,
html[data-app-theme="light"] body.app-body .panel-title h2,
html[data-app-theme="light"] body.app-body .panel-title h3,
html[data-app-theme="light"] body.app-body .page-title-block h1,
html[data-app-theme="light"] body.app-body .field label,
body.app-body[data-theme="light"] .app-brand-title,
body.app-body[data-theme="light"] .app-nav-link,
body.app-body[data-theme="light"] .app-user-name,
body.app-body[data-theme="light"] .dashboard-hero-copy h1,
body.app-body[data-theme="light"] .page-hero h1,
body.app-body[data-theme="light"] .panel-title h2,
body.app-body[data-theme="light"] .panel-title h3,
body.app-body[data-theme="light"] .page-title-block h1,
body.app-body[data-theme="light"] .field label {
  color: #111d2e;
}

html[data-app-theme="light"] body.app-body .app-brand-subtitle,
html[data-app-theme="light"] body.app-body .app-user-role,
html[data-app-theme="light"] body.app-body .dashboard-hero .lede,
html[data-app-theme="light"] body.app-body .page-hero .lede,
html[data-app-theme="light"] body.app-body .muted,
html[data-app-theme="light"] body.app-body .helper,
html[data-app-theme="light"] body.app-body .section-note,
body.app-body[data-theme="light"] .app-brand-subtitle,
body.app-body[data-theme="light"] .app-user-role,
body.app-body[data-theme="light"] .dashboard-hero .lede,
body.app-body[data-theme="light"] .page-hero .lede,
body.app-body[data-theme="light"] .muted,
body.app-body[data-theme="light"] .helper,
body.app-body[data-theme="light"] .section-note {
  color: #415367;
}

html[data-app-theme="light"] body.app-body .app-nav-link:hover,
body.app-body[data-theme="light"] .app-nav-link:hover {
  background: rgba(15, 91, 215, 0.1);
  color: #123b89;
}

html[data-app-theme="light"] body.app-body .app-nav-link.active,
body.app-body[data-theme="light"] .app-nav-link.active {
  background: rgba(37, 99, 235, 0.14);
  color: #123b89;
  box-shadow: inset 3px 0 0 #2563eb;
}

html[data-app-theme="light"] body.app-body .app-brand-wordmark-dark,
body.app-body[data-theme="light"] .app-brand-wordmark-dark {
  display: none;
}

html[data-app-theme="light"] body.app-body .app-brand-wordmark-light,
body.app-body[data-theme="light"] .app-brand-wordmark-light {
  display: block;
}

html[data-app-theme="light"] body.app-body .app-admin-nav-section,
body.app-body[data-theme="light"] .app-admin-nav-section {
  border-top-color: rgba(15, 33, 58, 0.1);
}

html[data-app-theme="light"] body.app-body .app-nav-heading,
body.app-body[data-theme="light"] .app-nav-heading {
  color: #52667a;
}

html[data-app-theme="light"] body.app-body input[type="text"],
html[data-app-theme="light"] body.app-body input[type="search"],
html[data-app-theme="light"] body.app-body input[type="email"],
html[data-app-theme="light"] body.app-body input[type="url"],
html[data-app-theme="light"] body.app-body input[type="number"],
html[data-app-theme="light"] body.app-body input[type="password"],
html[data-app-theme="light"] body.app-body input[type="time"],
html[data-app-theme="light"] body.app-body select,
html[data-app-theme="light"] body.app-body textarea,
body.app-body[data-theme="light"] input[type="text"],
body.app-body[data-theme="light"] input[type="search"],
body.app-body[data-theme="light"] input[type="email"],
body.app-body[data-theme="light"] input[type="url"],
body.app-body[data-theme="light"] input[type="number"],
body.app-body[data-theme="light"] input[type="password"],
body.app-body[data-theme="light"] input[type="time"],
body.app-body[data-theme="light"] select,
body.app-body[data-theme="light"] textarea {
  background: rgba(255, 255, 255, 0.98);
  border-color: #d8e1ec;
  color: #111d2e;
}

html[data-app-theme="light"] body.app-body .global-filter-bar,
html[data-app-theme="light"] body.app-body .global-filter-empty,
body.app-body[data-theme="light"] .global-filter-bar,
body.app-body[data-theme="light"] .global-filter-empty {
  background: #ffffff;
  border-color: rgba(15, 33, 58, 0.1);
}

html[data-app-theme="light"] body.app-body .global-filter-field input,
body.app-body[data-theme="light"] .global-filter-field input {
  background: #f8fbff;
  border-color: #cbd8e6;
  color: #111d2e;
}

html[data-app-theme="light"] body.app-body .global-filter-field input::placeholder,
body.app-body[data-theme="light"] .global-filter-field input::placeholder {
  color: #60748a;
}

html[data-app-theme="light"] body.app-body .app-icon-button,
body.app-body[data-theme="light"] .app-icon-button {
  background: #ffffff;
  border-color: rgba(15, 33, 58, 0.1);
  color: #31445b;
}

html[data-app-theme="light"] body.app-body .app-icon-button:hover,
body.app-body[data-theme="light"] .app-icon-button:hover {
  background: #eef4fb;
}

html[data-app-theme="light"] body.app-body .panel,
html[data-app-theme="light"] body.app-body .ops-card,
html[data-app-theme="light"] body.app-body .dashboard-section-card,
html[data-app-theme="light"] body.app-body .stats-card,
html[data-app-theme="light"] body.app-body .feed-stat,
html[data-app-theme="light"] body.app-body .agent-summary-chip,
html[data-app-theme="light"] body.app-body .insight-card,
html[data-app-theme="light"] body.app-body .insight-chip,
html[data-app-theme="light"] body.app-body .roundup-card,
html[data-app-theme="light"] body.app-body .roundup-agent-select-row,
html[data-app-theme="light"] body.app-body .email-style-card,
html[data-app-theme="light"] body.app-body .email-style-preview,
html[data-app-theme="light"] body.app-body .assistant-lead-card,
html[data-app-theme="light"] body.app-body .assistant-mini-card,
html[data-app-theme="light"] body.app-body .assistant-item,
html[data-app-theme="light"] body.app-body .assistant-dialog-card,
html[data-app-theme="light"] body.app-body .assistant-dialog-item,
html[data-app-theme="light"] body.app-body .intel-agent-card,
html[data-app-theme="light"] body.app-body .agent-row-card,
html[data-app-theme="light"] body.app-body .mini-agent-card,
html[data-app-theme="light"] body.app-body .agent-results,
html[data-app-theme="light"] body.app-body .source-edit-card,
html[data-app-theme="light"] body.app-body .source-status-card,
html[data-app-theme="light"] body.app-body .source-table-card,
html[data-app-theme="light"] body.app-body .source-modal-card,
html[data-app-theme="light"] body.app-body .source-recommendation-card,
html[data-app-theme="light"] body.app-body .app-profile-panel,
html[data-app-theme="light"] body.app-body .app-pref-chip,
html[data-app-theme="light"] body.app-body .item-table td,
body.app-body[data-theme="light"] .panel,
body.app-body[data-theme="light"] .ops-card,
body.app-body[data-theme="light"] .dashboard-section-card,
body.app-body[data-theme="light"] .stats-card,
body.app-body[data-theme="light"] .feed-stat,
body.app-body[data-theme="light"] .agent-summary-chip,
body.app-body[data-theme="light"] .insight-card,
body.app-body[data-theme="light"] .insight-chip,
body.app-body[data-theme="light"] .roundup-card,
body.app-body[data-theme="light"] .roundup-agent-select-row,
body.app-body[data-theme="light"] .email-style-card,
body.app-body[data-theme="light"] .email-style-preview,
body.app-body[data-theme="light"] .assistant-lead-card,
body.app-body[data-theme="light"] .assistant-mini-card,
body.app-body[data-theme="light"] .assistant-item,
body.app-body[data-theme="light"] .assistant-dialog-card,
body.app-body[data-theme="light"] .assistant-dialog-item,
body.app-body[data-theme="light"] .intel-agent-card,
body.app-body[data-theme="light"] .agent-row-card,
body.app-body[data-theme="light"] .mini-agent-card,
body.app-body[data-theme="light"] .agent-results,
body.app-body[data-theme="light"] .source-edit-card,
body.app-body[data-theme="light"] .source-status-card,
body.app-body[data-theme="light"] .source-table-card,
body.app-body[data-theme="light"] .source-modal-card,
body.app-body[data-theme="light"] .source-recommendation-card,
body.app-body[data-theme="light"] .app-profile-panel,
body.app-body[data-theme="light"] .app-pref-chip,
body.app-body[data-theme="light"] .item-table td {
  background: rgba(255, 255, 255, 0.94);
  border-color: rgba(15, 33, 58, 0.08);
}

html[data-app-theme="light"] body.app-body .insight-card-top,
body.app-body[data-theme="light"] .insight-card-top {
  background: linear-gradient(180deg, rgba(37, 99, 235, 0.08), rgba(255, 255, 255, 0.96));
  border-color: rgba(37, 99, 235, 0.18);
}

html[data-app-theme="light"] body.app-body .email-style-card:hover,
body.app-body[data-theme="light"] .email-style-card:hover {
  background: #f4f7fb;
  border-color: rgba(37, 99, 235, 0.22);
}

html[data-app-theme="light"] body.app-body .email-style-example-cell,
html[data-app-theme="light"] body.app-body .email-style-example-story-card,
html[data-app-theme="light"] body.app-body .email-style-example-text,
body.app-body[data-theme="light"] .email-style-example-cell,
body.app-body[data-theme="light"] .email-style-example-story-card,
body.app-body[data-theme="light"] .email-style-example-text {
  background: #f7f9fc;
  border-color: rgba(15, 33, 58, 0.08);
  color: #52667a;
}

html[data-app-theme="light"] body.app-body .email-style-example-header,
body.app-body[data-theme="light"] .email-style-example-header {
  background: rgba(37, 99, 235, 0.12);
  color: #1746a1;
}

html[data-app-theme="light"] body.app-body .email-style-title,
html[data-app-theme="light"] body.app-body .email-style-example-title,
html[data-app-theme="light"] body.app-body .app-profile-panel-name,
html[data-app-theme="light"] body.app-body .app-profile-pref-title,
body.app-body[data-theme="light"] .email-style-title,
body.app-body[data-theme="light"] .email-style-example-title,
body.app-body[data-theme="light"] .app-profile-panel-name,
body.app-body[data-theme="light"] .app-profile-pref-title {
  color: #102033;
}

html[data-app-theme="light"] body.app-body .email-style-note,
html[data-app-theme="light"] body.app-body .email-style-example-body,
html[data-app-theme="light"] body.app-body .app-profile-panel-role,
html[data-app-theme="light"] body.app-body .app-profile-pref-note,
body.app-body[data-theme="light"] .email-style-note,
body.app-body[data-theme="light"] .email-style-example-body,
body.app-body[data-theme="light"] .app-profile-panel-role,
body.app-body[data-theme="light"] .app-profile-pref-note {
  color: #5c6d81;
}

html[data-app-theme="light"] body.app-body .app-pref-chip,
body.app-body[data-theme="light"] .app-pref-chip {
  color: #31445b;
}

html[data-app-theme="light"] body.app-body .feed-filter-bar,
html[data-app-theme="light"] body.app-body .insight-why,
html[data-app-theme="light"] body.app-body .dashboard-results-panel,
html[data-app-theme="light"] body.app-body .source-health-panel,
html[data-app-theme="light"] body.app-body .source-review-panel,
body.app-body[data-theme="light"] .feed-filter-bar,
body.app-body[data-theme="light"] .insight-why,
body.app-body[data-theme="light"] .dashboard-results-panel,
body.app-body[data-theme="light"] .source-health-panel,
body.app-body[data-theme="light"] .source-review-panel {
  background: transparent;
  border-color: rgba(15, 33, 58, 0.08);
}

html[data-app-theme="light"] body.app-body .feed-filter-toggle,
body.app-body[data-theme="light"] .feed-filter-toggle {
  background: #ffffff;
  border-color: rgba(15, 33, 58, 0.12);
  color: #17263a;
}

html[data-app-theme="light"] body.app-body .feed-filter-toggle::after,
body.app-body[data-theme="light"] .feed-filter-toggle::after {
  color: #1746a1;
}

html[data-app-theme="light"] body.app-body .feed-filter-toggle-summary,
body.app-body[data-theme="light"] .feed-filter-toggle-summary {
  color: #5b6b7d;
}

html[data-app-theme="light"] body.app-body .muted-chip,
html[data-app-theme="light"] body.app-body .insight-confidence,
html[data-app-theme="light"] body.app-body .insight-meta-row,
html[data-app-theme="light"] body.app-body .roundup-agent-select-row small,
body.app-body[data-theme="light"] .muted-chip,
body.app-body[data-theme="light"] .insight-confidence,
body.app-body[data-theme="light"] .insight-meta-row,
body.app-body[data-theme="light"] .roundup-agent-select-row small {
  color: #415367;
}

html[data-app-theme="light"] body.app-body .app-menu-button,
body.app-body[data-theme="light"] .app-menu-button {
  background: #ffffff;
  border-color: rgba(15, 33, 58, 0.1);
}

html[data-app-theme="light"] body.app-body .app-menu-button span,
body.app-body[data-theme="light"] .app-menu-button span {
  background: #31445b;
}

html[data-app-theme="light"] body.app-body .intel-agent-icon,
body.app-body[data-theme="light"] .intel-agent-icon {
  background: #e8f0fb;
  color: #1746a1;
}

html[data-app-theme="light"] body.app-body .intel-agent-checkbox span,
body.app-body[data-theme="light"] .intel-agent-checkbox span {
  background: #ffffff;
  border-color: rgba(15, 33, 58, 0.18);
}

html[data-app-theme="light"] body.app-body .item-table th,
body.app-body[data-theme="light"] .item-table th {
  background: linear-gradient(180deg, #eff4fa 0%, #e8f0f8 100%);
  color: #6a7c8d;
  border-bottom-color: rgba(15, 33, 58, 0.08);
}

html[data-app-theme="light"] body.app-body .item-table tbody tr:hover td,
body.app-body[data-theme="light"] .item-table tbody tr:hover td {
  background: #f4f8ff;
}

html[data-app-theme="light"] body.app-body .agent-result-item,
body.app-body[data-theme="light"] .agent-result-item {
  background: #f7faff;
  border-color: rgba(15, 33, 58, 0.08);
}

html[data-app-theme="light"] body.app-body .agent-result-title,
html[data-app-theme="light"] body.app-body .source-primary,
html[data-app-theme="light"] body.app-body .assistant-card-title,
html[data-app-theme="light"] body.app-body .mini-agent-title,
html[data-app-theme="light"] body.app-body .intel-agent-card h3,
html[data-app-theme="light"] body.app-body .agent-table-title,
html[data-app-theme="light"] body.app-body .agent-table-primary,
html[data-app-theme="light"] body.app-body .article-detail,
body.app-body[data-theme="light"] .agent-result-title,
body.app-body[data-theme="light"] .source-primary,
body.app-body[data-theme="light"] .assistant-card-title,
body.app-body[data-theme="light"] .mini-agent-title,
body.app-body[data-theme="light"] .intel-agent-card h3,
body.app-body[data-theme="light"] .agent-table-title,
body.app-body[data-theme="light"] .agent-table-primary,
body.app-body[data-theme="light"] .article-detail {
  color: #17263a;
}

html[data-app-theme="light"] body.app-body .agent-result-body,
html[data-app-theme="light"] body.app-body .intel-agent-description,
html[data-app-theme="light"] body.app-body .assistant-card-body,
body.app-body[data-theme="light"] .agent-result-body,
body.app-body[data-theme="light"] .intel-agent-description,
body.app-body[data-theme="light"] .assistant-card-body {
  color: #34495e;
}

html[data-app-theme="light"] body.app-body .agent-table-description,
html[data-app-theme="light"] body.app-body .agent-table-check,
body.app-body[data-theme="light"] .agent-table-description,
body.app-body[data-theme="light"] .agent-table-check {
  color: #5b6b7d;
}

html[data-app-theme="light"] body.app-body .agent-table-check span[aria-hidden="true"],
body.app-body[data-theme="light"] .agent-table-check span[aria-hidden="true"] {
  background: #fff;
  border-color: rgba(15, 33, 58, 0.22);
}

html[data-app-theme="light"] body.app-body .agent-table-check input:checked + span[aria-hidden="true"],
body.app-body[data-theme="light"] .agent-table-check input:checked + span[aria-hidden="true"] {
  background: linear-gradient(135deg, #2563eb, #06b6d4);
  border-color: rgba(37, 99, 235, 0.78);
}

html[data-app-theme="light"] body.app-body .agent-table-check input:checked + span[aria-hidden="true"]::after,
body.app-body[data-theme="light"] .agent-table-check input:checked + span[aria-hidden="true"]::after {
  border-left-color: #ffffff;
  border-bottom-color: #ffffff;
  opacity: 1;
}

html[data-app-theme="light"] body.app-body .assistant-pill,
html[data-app-theme="light"] body.app-body .assistant-dialog-badge,
body.app-body[data-theme="light"] .assistant-pill,
body.app-body[data-theme="light"] .assistant-dialog-badge {
  background: rgba(37, 99, 235, 0.12);
  color: #1746a1;
}

html[data-app-theme="light"] body.app-body .selection-bar,
body.app-body[data-theme="light"] .selection-bar {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(239, 245, 255, 0.96));
  color: #17263a;
  border-color: rgba(37, 99, 235, 0.2);
  box-shadow: 0 16px 32px rgba(15, 33, 58, 0.18);
}

html[data-app-theme="light"] body.app-body .selection-bar .stats-label,
body.app-body[data-theme="light"] .selection-bar .stats-label {
  color: #1746a1;
}

html[data-app-theme="light"] body.app-body .selection-bar .helper,
body.app-body[data-theme="light"] .selection-bar .helper {
  color: #415367;
}

html[data-app-theme="light"] body.app-body .app-profile-panel,
body.app-body[data-theme="light"] .app-profile-panel {
  background: #ffffff;
  border-color: rgba(15, 33, 58, 0.08);
  box-shadow: 0 20px 40px rgba(15, 33, 58, 0.18);
}

html[data-app-theme="light"] body.app-body .app-profile-panel-name,
html[data-app-theme="light"] body.app-body .app-profile-pref-title,
body.app-body[data-theme="light"] .app-profile-panel-name,
body.app-body[data-theme="light"] .app-profile-pref-title {
  color: #111d2e;
}

html[data-app-theme="light"] body.app-body .app-profile-panel-role,
html[data-app-theme="light"] body.app-body .app-profile-pref-note,
body.app-body[data-theme="light"] .app-profile-panel-role,
body.app-body[data-theme="light"] .app-profile-pref-note {
  color: #415367;
}

html[data-app-theme="light"] body.app-body .app-pref-chip,
body.app-body[data-theme="light"] .app-pref-chip {
  background: #f5f8fc;
  border-color: #d8e1ec;
  color: #31445b;
}

html[data-app-theme="light"] body.app-body .app-pref-chip.is-active,
body.app-body[data-theme="light"] .app-pref-chip.is-active {
  background: rgba(37, 99, 235, 0.12);
  border-color: rgba(37, 99, 235, 0.22);
  color: #123b89;
}

html[data-app-theme="light"] body.app-body .btn-secondary,
body.app-body[data-theme="light"] .btn-secondary {
  background: #ffffff;
  border-color: rgba(15, 33, 58, 0.14);
  color: #17263a;
}

html[data-app-theme="light"] body.app-body .btn-secondary:hover,
body.app-body[data-theme="light"] .btn-secondary:hover {
  background: #eef4fb;
  border-color: rgba(15, 91, 215, 0.22);
  color: #123b89;
}

html[data-app-theme="light"] body.app-body .btn-secondary .btn-inline-spinner,
body.app-body[data-theme="light"] .btn-secondary .btn-inline-spinner {
  border-color: rgba(17, 29, 46, 0.22);
  border-top-color: #17263a;
}

html[data-app-theme="light"] body.app-body .page-hero .btn-secondary,
body.app-body[data-theme="light"] .page-hero .btn-secondary {
  background: #ffffff;
  border-color: rgba(15, 33, 58, 0.14);
  color: #17263a;
}

html[data-app-theme="light"] body.app-body .page-hero .btn-secondary:hover,
body.app-body[data-theme="light"] .page-hero .btn-secondary:hover {
  background: #eef4fb;
  color: #123b89;
}

html[data-app-theme="light"] body.app-body .page-hero .page-kicker,
html[data-app-theme="light"] body.app-body .page-kicker,
body.app-body[data-theme="light"] .page-hero .page-kicker,
body.app-body[data-theme="light"] .page-kicker {
  background: rgba(37, 99, 235, 0.1);
  color: #123b89;
  border-color: rgba(37, 99, 235, 0.18);
}

html[data-app-theme="light"] body.app-body .stats-label,
body.app-body[data-theme="light"] .stats-label {
  color: #4b5f74;
}

html[data-app-theme="light"] body.app-body .source-modal-card h3,
html[data-app-theme="light"] body.app-body .step-nav-item,
body.app-body[data-theme="light"] .source-modal-card h3,
body.app-body[data-theme="light"] .step-nav-item {
  color: #17263a;
}

html[data-app-theme="light"] body.app-body .step-nav,
body.app-body[data-theme="light"] .step-nav {
  background: #ffffff;
  border-color: rgba(15, 33, 58, 0.1);
}

html[data-app-theme="light"] body.app-body a.step-nav-item:hover,
body.app-body[data-theme="light"] a.step-nav-item:hover {
  background: #eef4fb;
  color: #123b89;
}

html[data-app-theme="light"] body.app-body .step-nav-item.active,
body.app-body[data-theme="light"] .step-nav-item.active {
  background: rgba(37, 99, 235, 0.12);
  color: #123b89;
}

html[data-app-theme="light"] body.app-body .step-nav-item.done,
body.app-body[data-theme="light"] .step-nav-item.done {
  color: #146c43;
}

html[data-app-theme="light"] body.app-body .step-nav-sep,
body.app-body[data-theme="light"] .step-nav-sep {
  color: rgba(65, 83, 103, 0.42);
}

html[data-app-theme="light"] body.app-body .source-url-link,
body.app-body[data-theme="light"] .source-url-link,
html[data-app-theme="light"] body.app-body .assistant-link-action,
body.app-body[data-theme="light"] .assistant-link-action {
  color: #0f4fbf;
}

html[data-app-theme="light"] body.app-body .source-url-link:hover,
body.app-body[data-theme="light"] .source-url-link:hover,
html[data-app-theme="light"] body.app-body .assistant-link-action:hover,
body.app-body[data-theme="light"] .assistant-link-action:hover {
  color: #123b89;
}

html[data-app-theme="light"] body.app-body .source-secondary,
html[data-app-theme="light"] body.app-body .source-status-note,
html[data-app-theme="light"] body.app-body .source-priority,
html[data-app-theme="light"] body.app-body .agent-result-meta,
html[data-app-theme="light"] body.app-body .dashboard-agent-summary-pill,
html[data-app-theme="light"] body.app-body .article-meta,
html[data-app-theme="light"] body.app-body .article-meta-stack,
body.app-body[data-theme="light"] .source-secondary,
body.app-body[data-theme="light"] .source-status-note,
body.app-body[data-theme="light"] .source-priority,
body.app-body[data-theme="light"] .agent-result-meta,
body.app-body[data-theme="light"] .dashboard-agent-summary-pill,
body.app-body[data-theme="light"] .article-meta,
body.app-body[data-theme="light"] .article-meta-stack {
  color: #415367;
}

html[data-app-theme="light"] body.app-body .dashboard-agent-link,
html[data-app-theme="light"] body.app-body .dashboard-agent-link-button,
body.app-body[data-theme="light"] .dashboard-agent-link,
body.app-body[data-theme="light"] .dashboard-agent-link-button {
  color: #0f4fbf;
}

html[data-app-theme="light"] body.app-body .dashboard-agent-link:hover,
html[data-app-theme="light"] body.app-body .dashboard-agent-link-button:hover,
body.app-body[data-theme="light"] .dashboard-agent-link:hover,
body.app-body[data-theme="light"] .dashboard-agent-link-button:hover {
  color: #123b89;
}

html[data-app-theme="light"] body.app-body .source-mini-pill,
body.app-body[data-theme="light"] .source-mini-pill,
html[data-app-theme="light"] body.app-body .button-status-dot,
body.app-body[data-theme="light"] .button-status-dot {
  background: #dcfce7;
  border: 1px solid #bbf7d0;
  color: #146c43;
}

html[data-app-theme="light"] body.app-body .pill,
body.app-body[data-theme="light"] .pill {
  border: 1px solid transparent;
}

html[data-app-theme="light"] body.app-body .pill-FACT,
html[data-app-theme="light"] body.app-body .pill-OK,
body.app-body[data-theme="light"] .pill-FACT,
body.app-body[data-theme="light"] .pill-OK {
  background: #dcfce7;
  border-color: #bbf7d0;
  color: #146c43;
}

html[data-app-theme="light"] body.app-body .pill-STRONG_REPORT,
body.app-body[data-theme="light"] .pill-STRONG_REPORT {
  background: #dbeafe;
  border-color: #bfdbfe;
  color: #1746a1;
}

html[data-app-theme="light"] body.app-body .pill-RUMOUR,
html[data-app-theme="light"] body.app-body .pill-PARTIAL,
body.app-body[data-theme="light"] .pill-RUMOUR,
body.app-body[data-theme="light"] .pill-PARTIAL {
  background: #fef3c7;
  border-color: #fde68a;
  color: #92400e;
}

html[data-app-theme="light"] body.app-body .pill-OPINION,
body.app-body[data-theme="light"] .pill-OPINION {
  background: #e5e7eb;
  border-color: #d1d5db;
  color: #374151;
}

html[data-app-theme="light"] body.app-body .pill-FAILED,
html[data-app-theme="light"] body.app-body .pill-REJECTED,
body.app-body[data-theme="light"] .pill-FAILED,
body.app-body[data-theme="light"] .pill-REJECTED {
  background: #fee2e2;
  border-color: #fecaca;
  color: #991b1b;
}

html[data-app-theme="light"] body.app-body .email-style-card,
html[data-app-theme="light"] body.app-body .email-style-preview,
body.app-body[data-theme="light"] .email-style-card,
body.app-body[data-theme="light"] .email-style-preview {
  color: #111d2e;
}

html[data-app-theme="light"] body.app-body .email-style-example-meta,
body.app-body[data-theme="light"] .email-style-example-meta {
  color: #415367;
}

@media (max-width: 920px) {
  .setup-guide,
  .form-grid.two-col,
  .form-grid.three-col,
  .feedback-form form {
    grid-template-columns: 1fr;
  }

  .field-span-2,
  .field-span-3 {
    grid-column: auto;
  }

  .page-header,
  .page-hero-inner,
  .panel-header,
  .agent-tile-header,
  .topic-card-header,
  .day-header {
    flex-direction: column;
  }

  .assistant-grid,
  .network-grid,
  .ops-grid {
    grid-template-columns: 1fr;
  }
  .assistant-status-row,
  .assistant-item {
    flex-direction: column;
    align-items: stretch;
  }
  .intel-agent-row-card,
  .agent-results-header,
  .agent-result-top {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: stretch;
  }
  .assistant-dialog-header,
  .assistant-dialog-item-top {
    flex-direction: column;
    align-items: stretch;
  }
  .article-detail-grid,
  .email-style-grid,
  .feedback-form-grid {
    grid-template-columns: 1fr;
  }

  .ops-card-span-2 {
    grid-column: auto;
  }
}

@media (max-width: 720px) {
  .container { padding-top: 16px; }

  .app-shell {
    display: block;
  }

  .app-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 40;
    display: flex;
    width: min(78vw, 260px);
    max-width: 260px;
    transform: translateX(-104%);
    transition: transform 180ms ease;
    box-shadow: 18px 0 48px rgba(3, 8, 18, 0.42);
    overflow-y: auto;
  }

  body.app-body.mobile-sidebar-open .app-sidebar {
    transform: translateX(0);
  }

  body.app-body.mobile-sidebar-open::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 35;
    background: rgba(2, 6, 23, 0.58);
    backdrop-filter: blur(2px);
  }

  .app-topbar {
    grid-template-columns: 1fr auto;
    min-height: 50px;
    padding: 7px 16px;
  }

  .app-menu-button {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }

  .app-topbar-logo {
    display: block;
  }

  .app-content.container {
    padding: 14px 16px calc(22px + env(safe-area-inset-bottom));
    scroll-padding-bottom: calc(22px + env(safe-area-inset-bottom));
  }

  .dashboard-hero,
  .app-body .page-hero {
    margin: 0 16px 6px;
    padding-top: 10px;
  }

  .app-body .page-hero .shared-agents-lede {
    white-space: normal;
  }

  .selection-bar {
    position: static;
    bottom: auto;
    border-radius: 22px;
    padding: 14px 16px;
    flex-direction: column;
    align-items: stretch;
    box-shadow: none;
  }

  .nav-inner {
    min-height: auto;
    padding: 11px 0;
    flex-direction: column;
    align-items: flex-start;
  }

  .nav-links {
    width: 100%;
    gap: 4px;
  }

  .nav-links a,
  .nav-links button {
    padding: 6px 9px;
  }

  .panel,
  .topic-card,
  .agent-tile {
    padding: 14px;
    border-radius: 16px;
  }

  .item-table,
  .item-table thead,
  .item-table tbody,
  .item-table th,
  .item-table td,
  .item-table tr {
    display: block;
    min-width: 0;
  }

  .item-table thead {
    display: none;
  }

  .item-table tbody {
    display: grid;
    gap: 10px;
  }

  .item-table tr {
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    background: var(--surface-strong);
  }

  .item-table td {
    border-bottom: 1px solid #ecf0f5;
    padding: 10px 12px;
    background: transparent;
  }

  .item-table td:last-child {
    border-bottom: 0;
  }

  .item-table td::before {
    content: attr(data-label);
    display: block;
    color: var(--text-faint);
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    margin-bottom: 4px;
  }

  .headline,
  .summary-cell {
    max-width: none;
  }

  .search-form {
    grid-template-columns: 1fr;
  }

  .tile-run-preview .summary-cell,
  .tile-run-preview .item-table th:nth-child(5),
  .tile-run-preview .item-table th:nth-child(6),
  .tile-run-preview .item-table td:nth-child(5) {
    display: block;
  }

  .source-table {
    min-width: 0;
  }

  .source-url-cell {
    min-width: 0;
  }

  .source-edit-grid {
    grid-template-columns: 1fr;
  }

  .source-modal-card {
    padding: 14px;
  }

  .source-modal-header,
  .source-modal-actions,
  .source-recommendation-head {
    flex-direction: column;
    align-items: stretch;
  }

  .insight-card .insight-why-inline {
    display: none;
  }
}

@media (max-width: 960px) {
  .landing-hero-inner {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .landing-hero-graphic {
    display: none;
  }

  .landing-sub {
    margin: 0 auto 32px;
  }

  .landing-wordmark {
    margin-left: auto;
    margin-right: auto;
  }

  .landing-cta-row {
    justify-content: center;
  }

  .landing-feature-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .landing-steps {
    grid-template-columns: 1fr;
    max-width: 480px;
  }

  .landing-step-connector {
    width: 2px;
    height: 32px;
    margin: 0 auto;
    background: linear-gradient(180deg, rgba(15, 91, 215, 0.4), rgba(15, 91, 215, 0.15));
  }

  .landing-final-inner {
    padding: 40px 28px;
  }
}

@media (max-width: 560px) {
  .landing-feature-grid {
    grid-template-columns: 1fr;
  }

  .landing-console-grid {
    grid-template-columns: 1fr;
  }

  .landing-email-header,
  .landing-email-card-top {
    flex-direction: column;
    align-items: flex-start;
  }

  .landing-hero {
    padding: 48px 0 56px;
  }

  .landing-section {
    padding: 48px 0;
  }
}

.feed-overview {
  display: grid;
  gap: 16px;
}

.feed-overview-secondary {
  opacity: 0.92;
}

.top-insights-section {
  display: grid;
  gap: 14px;
  border-color: rgba(96, 165, 250, 0.24);
}

.top-insights-grid {
  display: grid;
  gap: 12px;
}

.feed-overview-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.compact-feed-stats {
  grid-template-columns: repeat(4, minmax(110px, 1fr));
  gap: 8px;
}

.feed-stat {
  border: 1px solid var(--border);
  background: var(--surface-strong);
  border-radius: 8px;
  padding: 14px;
}

.agent-summary-strip {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.agent-summary-chip {
  min-width: 180px;
  display: grid;
  gap: 3px;
  border: 1px solid var(--border);
  background: var(--surface-strong);
  border-radius: 8px;
  padding: 9px 10px;
  color: var(--text);
  text-decoration: none;
  font-size: 0.82rem;
}

.compact-agent-summary {
  gap: 8px;
}

.agent-summary-name {
  font-weight: 800;
}

.insight-feed-section {
  display: grid;
  gap: 16px;
}

.feed-filter-bar {
  display: grid;
  grid-template-columns: minmax(220px, 1.45fr) minmax(150px, 1fr) minmax(130px, 0.8fr) minmax(150px, 1fr) minmax(150px, 1fr) minmax(150px, 1fr) auto auto;
  gap: 10px;
  align-items: end;
}

.feed-filter-shell {
  display: grid;
  gap: 10px;
}

.feed-filter-toggle {
  display: flex;
  width: 100%;
  min-height: 44px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 14px;
  border-radius: 14px;
  border: 1px solid rgba(96, 165, 250, 0.22);
  background: rgba(15, 23, 36, 0.86);
  color: #e6edf8;
  font-weight: 800;
}

.feed-filter-toggle::after {
  content: "Hide";
  color: #9ec3ff;
  font-size: 0.78rem;
  font-weight: 800;
}

.feed-filter-shell.is-collapsed .feed-filter-toggle::after {
  content: "Show";
}

.feed-filter-toggle-summary {
  margin-left: auto;
  color: #94a3b8;
  font-size: 0.78rem;
  font-weight: 700;
}

.feed-filter-shell.is-collapsed .feed-filter-bar {
  display: none;
}

.feed-filter-bar label {
  display: grid;
  gap: 6px;
}

.insight-feed-list {
  display: grid;
  gap: 12px;
}

.insight-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  border: 1px solid var(--border);
  background: var(--surface-strong);
  border-radius: 8px;
  padding: 16px;
}

.insight-card-top {
  border-color: rgba(96, 165, 250, 0.28);
  background: linear-gradient(180deg, rgba(37, 99, 235, 0.12), rgba(20, 33, 51, 0.96));
}

.insight-card-main {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.insight-card-topline,
.insight-meta-row,
.insight-chip-row {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.insight-card h3 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.42;
}

.insight-headline-link {
  color: inherit;
  text-decoration: none;
}

.insight-headline-link:hover {
  color: var(--primary);
}

.insight-summary,
.insight-why p,
.insight-why-inline {
  margin: 0;
}

.insight-summary {
  color: var(--text);
  font-size: 1rem;
  line-height: 1.55;
}

.insight-why-inline {
  color: var(--text-muted);
  font-size: 0.94rem;
  line-height: 1.5;
}

.insight-why-inline strong {
  color: var(--text);
}

.insight-why {
  display: grid;
  gap: 4px;
  border-left: 3px solid var(--primary);
  padding-left: 10px;
}

.insight-confidence {
  color: var(--text-muted);
  font-weight: 700;
}

.insight-meta-row {
  color: var(--text-muted);
  font-size: 13px;
}

.insight-chip {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
  background: var(--surface);
}

.insight-unified-meta .insight-chip {
  padding: 3px 7px;
}

.button-status-dot {
  display: inline-flex;
  align-items: center;
  margin-left: 6px;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(34, 197, 94, 0.16);
  color: #86efac;
  font-size: 11px;
  font-weight: 800;
}

.muted-chip {
  color: var(--text-muted);
}

.insight-card-actions {
  display: flex;
  align-items: flex-start;
}

.insight-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 16px;
  align-items: start;
}

.insight-detail-main {
  display: grid;
  gap: 14px;
}

.insight-detail-main h1 {
  margin: 0;
  font-size: 30px;
  line-height: 1.18;
}

.assistant-page-panel {
  max-width: 980px;
}

.assistant-page-list {
  display: grid;
  gap: 12px;
}

.assistant-page-item {
  grid-template-columns: minmax(0, 1fr) auto;
}

.roundup-list {
  display: grid;
  gap: 12px;
}

.roundup-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: start;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-strong);
}

.roundup-card-main {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.roundup-card-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.roundup-agent-select-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 10px;
}

.roundup-agent-select-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-strong);
}

.roundup-agent-select-row small {
  display: block;
  margin-top: 3px;
  color: var(--text-muted);
}

html[data-app-theme="light"] body.app-body .roundup-card,
html[data-app-theme="light"] body.app-body .roundup-agent-select-row,
body.app-body[data-theme="light"] .roundup-card,
body.app-body[data-theme="light"] .roundup-agent-select-row {
  background: #ffffff;
  border-color: rgba(15, 33, 58, 0.1);
  color: #111d2e;
}

html[data-app-theme="light"] body.app-body .roundup-card h3,
html[data-app-theme="light"] body.app-body .roundup-agent-select-row strong,
body.app-body[data-theme="light"] .roundup-card h3,
body.app-body[data-theme="light"] .roundup-agent-select-row strong {
  color: #102033;
}

html[data-app-theme="light"] body.app-body .roundup-agent-select-row small,
body.app-body[data-theme="light"] .roundup-agent-select-row small {
  color: #415367;
}

@media (max-width: 900px) {
  .feed-overview-stats,
  .feed-filter-bar,
  .insight-card,
  .insight-detail-grid {
    grid-template-columns: 1fr;
  }

  .insight-card-actions {
    align-items: stretch;
  }

  .roundup-card,
  .assistant-page-item {
    grid-template-columns: 1fr;
  }

  .roundup-card-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 860px) {
  html[data-app-theme="light"] body.app-body .feed-filter-toggle,
  body.app-body[data-theme="light"] .feed-filter-toggle {
    background: #ffffff;
    color: #0f213a;
    border-color: rgba(37, 99, 235, 0.16);
    box-shadow: 0 12px 28px rgba(15, 33, 58, 0.12);
  }

  html[data-app-theme="light"] body.app-body .feed-filter-toggle-summary,
  body.app-body[data-theme="light"] .feed-filter-toggle-summary {
    color: #5c6d83;
  }
}
