:root {
  --bg: #edf2f7;
  --bg-soft: #ffffff;
  --bg-panel: #0f172a;
  --card: rgba(255, 255, 255, 0.96);
  --card-muted: #f8fafc;
  --border: rgba(15, 23, 42, 0.1);
  --border-strong: rgba(15, 23, 42, 0.18);
  --text: #102033;
  --muted: #526277;
  --muted-strong: #314154;

  --cyan: #0f9db6;
  --blue: #295fd6;
  --purple: #5b58d6;
  --indigo: #384fc5;
  --amber: #c58817;
  --green: #128164;
  --red: #d64b4b;
  --shadow-soft: 0 18px 40px rgba(15, 23, 42, 0.08);
  --shadow-strong: 0 28px 60px rgba(15, 23, 42, 0.14);

  /* Status colors */
  --status-queued: #2563eb;
  --status-running: #06b6d4;
  --status-completed: #10b981;
  --status-failed: #ef4444;
  --status-cancelled: #64748b;
  --status-blocked: #ef4444;
  --status-review: #f59e0b;
  --status-picked-up: #7c3aed;
  --status-needs-review: #f59e0b;
  --status-completed-with-gaps: #0ea5e9;
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  background:
    radial-gradient(circle at top left, rgba(41, 95, 214, 0.08), transparent 34%),
    linear-gradient(180deg, #f7faff 0%, var(--bg) 100%);
  color: var(--text);
  font-family: 'Manrope', 'Inter', system-ui, sans-serif;
}
body { min-height: 100vh; }
a { color: inherit; }

.app-shell { display: grid; grid-template-columns: 280px 1fr; min-height: 100vh; }
.sidebar {
  border-right: 1px solid rgba(255,255,255,0.08);
  background:
    radial-gradient(circle at top right, rgba(34, 211, 238, 0.18), transparent 28%),
    linear-gradient(180deg, #111b2d 0%, #0f172a 100%);
  color: #e5eefc;
  padding: 26px 18px;
  position: sticky;
  top: 0;
  height: 100vh;
  box-shadow: inset -1px 0 0 rgba(255,255,255,0.04);
}
.brand {
  display: flex; align-items: center; gap: 12px; margin-bottom: 28px;
}
.brand-badge {
  width: 44px; height: 44px; border-radius: 16px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, rgba(86, 108, 255, 0.98), rgba(16, 185, 129, 0.8));
  box-shadow: 0 12px 28px rgba(3, 10, 24, 0.42);
  font-weight: 800;
}
.brand h1 { font-size: 1rem; margin: 0; color: #f8fbff; }
.brand p { margin: 2px 0 0; color: rgba(226, 232, 240, 0.74); font-size: 0.85rem; }

.nav-list { display: flex; flex-direction: column; gap: 10px; }
.nav-btn {
  width: 100%;
  border: 1px solid transparent;
  background: transparent;
  color: #e2e8f0;
  padding: 13px 14px;
  border-radius: 16px;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s ease;
}
.nav-btn:hover { background: rgba(255,255,255,0.05); border-color: rgba(255,255,255,0.08); }
.nav-btn.active {
  background: linear-gradient(135deg, rgba(41,95,214,0.2), rgba(15,157,182,0.12));
  border-color: rgba(125, 164, 255, 0.22);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.02), 0 10px 30px rgba(3, 10, 24, 0.24);
}
.nav-btn .title { font-weight: 600; display: block; }
.nav-btn .desc { font-size: 0.82rem; color: rgba(226, 232, 240, 0.64); display: block; margin-top: 2px; }

.sidebar-footer {
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid rgba(255,255,255,0.08);
  color: rgba(226, 232, 240, 0.72);
  font-size: 0.84rem;
}

.main { padding: 30px; }
.page { display: none; animation: fadeIn 0.24s ease; }
.page.active { display: block; }
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 24px;
}
.page-header h2 { margin: 0; font-size: 1.9rem; letter-spacing: -0.02em; }
.page-header p { margin: 8px 0 0; color: var(--muted); max-width: 780px; line-height: 1.5; }

.status-pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 14px; border-radius: 999px;
  border: 1px solid rgba(15, 23, 42, 0.08); color: var(--muted-strong);
  background: rgba(255,255,255,0.9);
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.05);
  font-size: 0.85rem;
}
.dot { width: 9px; height: 9px; border-radius: 999px; background: var(--green); box-shadow: 0 0 0 4px rgba(18,129,100,0.12); }

/* Status pills */
.status-pill.status-queued .dot { background: var(--status-queued); }
.status-pill.status-running .dot { background: var(--status-running); }
.status-pill.status-picked_up .dot,
.status-pill.status-picked-up .dot { background: var(--status-picked-up); }
.status-pill.status-completed .dot { background: var(--status-completed); }
.status-pill.status-completed_with_gaps .dot,
.status-pill.status-completed-with-gaps .dot { background: var(--status-completed-with-gaps); }
.status-pill.status-failed .dot { background: var(--status-failed); }
.status-pill.status-cancelled .dot { background: var(--status-cancelled); }
.status-pill.status-review .dot,
.status-pill.status-needs_review .dot,
.status-pill.status-needs-review .dot { background: var(--status-needs-review); }
.status-pill.status-blocked .dot { background: var(--status-blocked); }
.status-pill.status-open .dot { background: var(--amber); }
.status-pill.status-resolved .dot,
.status-pill.status-closed .dot,
.status-pill.status-done .dot { background: var(--green); }

.grid { display: grid; gap: 18px; }
.grid.cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.research-rule-preview {
  max-width: 42rem;
  max-height: 8rem;
  overflow: auto;
  margin: 8px 0 0;
  padding: 8px 10px;
  background: var(--surface-muted, rgba(0, 0, 0, 0.16));
  border: 1px solid var(--border);
  border-radius: 8px;
  white-space: pre-wrap;
  word-break: break-word;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 20px;
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-soft);
}

.metric-card {
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  position: relative;
  overflow: hidden;
}
.metric-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: linear-gradient(90deg, var(--blue), var(--cyan));
  opacity: 0.95;
}
.metric-card:hover {
  transform: translateY(-2px);
  border-color: rgba(56,79,197,0.24);
  box-shadow: var(--shadow-strong);
}
.card h3, .card h4 { margin: 0 0 10px; }
.card-subtle { color: var(--muted); font-size: 0.9rem; }
.metric { font-size: 2.1rem; font-weight: 800; margin: 12px 0 4px; letter-spacing: -0.03em; }
.metric-label { color: var(--muted); font-size: 0.9rem; line-height: 1.45; }

/* Improve label/input spacing inside filter cards */
.card label span.small { display: block; margin-bottom: 10px; }

/* Hidden is a behavioral state. Keep component display rules from overriding it. */
[hidden] { display: none !important; }
.card label input, .card label select { margin-top: 2px; }

/* Connected operating picture */
#page-ontology .inline-form { display: grid; grid-template-columns: minmax(0, 1fr) minmax(170px, 220px) auto; gap: 10px; align-items: end; }
#page-ontology .inline-form input, #page-ontology .inline-form select { min-height: 44px; }
.ontology-result-list, .ontology-neighbor-list, .ontology-relation-list, .ontology-timeline-list, .ontology-risk-findings { display: grid; gap: 10px; margin-top: 14px; }
.ontology-result, .ontology-neighbor { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px; text-align: left; border: 1px solid var(--border); border-radius: 14px; padding: 12px 14px; background: rgba(248,250,252,0.8); color: inherit; cursor: pointer; }
.ontology-result:hover, .ontology-neighbor:hover { border-color: rgba(41,95,214,0.45); background: rgba(239,246,255,0.9); }
.ontology-result-main, .ontology-neighbor span:first-child { min-width: 0; display: grid; gap: 4px; }
.ontology-result-main code, .ontology-neighbor code { color: var(--muted); font-size: 0.76rem; overflow-wrap: anywhere; }
.ontology-result-meta { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; color: var(--muted); font-size: 0.78rem; }
.ontology-result-meta span + span::before { content: '·'; margin-right: 8px; color: var(--border-strong); }
.ontology-entity-title { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; }
.ontology-entity-title h4 { font-size: 1.35rem; margin: 4px 0; }
.ontology-facts { margin: 18px 0; }
.ontology-facts > div, .ontology-quality-grid .metric { display: grid; gap: 5px; min-width: 0; }
.ontology-facts strong, .ontology-quality-grid strong { overflow-wrap: anywhere; }
.ontology-subsection { display: grid; gap: 6px; border-top: 1px solid var(--border); padding-top: 12px; margin-top: 12px; }
.ontology-chip-list { display: flex; gap: 7px; flex-wrap: wrap; }
.ontology-chip-list .chip { display: inline-flex; gap: 6px; align-items: center; border: 1px solid var(--border); border-radius: 999px; padding: 5px 9px; background: var(--card-muted); font-size: 0.8rem; }
.ontology-chip-list small { color: var(--muted); }
.ontology-properties { margin-top: 14px; border-top: 1px solid var(--border); padding-top: 12px; }
.ontology-properties summary { cursor: pointer; color: var(--muted-strong); font-weight: 600; }
.ontology-properties dl { display: grid; gap: 7px; margin: 12px 0 0; }
.ontology-properties dl > div { display: grid; grid-template-columns: minmax(100px, 0.35fr) minmax(0, 1fr); gap: 12px; border-top: 1px solid var(--border); padding-top: 7px; }
.ontology-properties dt { color: var(--muted); overflow-wrap: anywhere; }
.ontology-properties dd { margin: 0; overflow-wrap: anywhere; }
.ontology-relation { display: grid; grid-template-columns: auto minmax(0, 1fr) auto minmax(0, 1fr); gap: 7px; align-items: center; border-top: 1px solid var(--border); padding-top: 9px; }
.ontology-relation .small { grid-column: 1 / -1; }
.ontology-relation code { overflow-wrap: anywhere; font-size: 0.76rem; }
.ontology-lineage { border-top: 1px solid var(--border); margin-top: 14px; padding-top: 12px; }
.ontology-lineage ol { margin: 8px 0 0; padding-left: 20px; display: grid; gap: 7px; }
.ontology-lineage li { overflow-wrap: anywhere; color: var(--muted-strong); }
.ontology-lineage code { font-size: 0.73rem; }
.ontology-timeline-item { display: grid; grid-template-columns: 12px minmax(0, 1fr); gap: 10px; position: relative; }
.ontology-timeline-marker { width: 9px; height: 9px; border-radius: 999px; margin-top: 6px; background: var(--cyan); box-shadow: 0 0 0 4px rgba(15,157,182,0.12); }
.ontology-timeline-head { display: flex; justify-content: space-between; gap: 10px; }
.ontology-timeline-head time { color: var(--muted); font-size: 0.78rem; white-space: nowrap; }
.ontology-timeline-item p { margin: 5px 0 0; color: var(--muted-strong); overflow-wrap: anywhere; }
.ontology-risk-score { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px; border: 1px solid var(--border); border-radius: 16px; background: linear-gradient(135deg, rgba(239,246,255,0.9), rgba(248,250,252,0.9)); }
.ontology-risk-score strong { display: block; font-size: 2rem; letter-spacing: -0.04em; margin-top: 3px; }
.ontology-risk-findings > div { display: grid; gap: 3px; border-top: 1px solid var(--border); padding-top: 9px; }
.ontology-action-contract { display: grid; gap: 6px; border: 1px solid rgba(15,157,182,0.2); border-radius: 14px; padding: 12px; margin-top: 14px; background: rgba(236,254,255,0.58); }
.ontology-quality-grid .metric { border: 1px solid var(--border); border-radius: 14px; padding: 11px; background: var(--card-muted); }
.text-warning { color: #9a6500 !important; }

@media (max-width: 720px) {
  #page-ontology .inline-form { grid-template-columns: 1fr; }
  .ontology-result, .ontology-neighbor, .ontology-entity-title, .ontology-risk-score { align-items: flex-start; flex-direction: column; }
  .ontology-result-meta { justify-content: flex-start; }
  .ontology-result-meta span + span::before { margin-right: 5px; }
  .ontology-relation { grid-template-columns: 1fr; }
  .ontology-relation span[aria-hidden="true"] { display: none; }
  .ontology-relation .small { grid-column: auto; }
  .ontology-timeline-head { display: grid; gap: 4px; }
}

.kv-list { display: grid; gap: 10px; }
.kv-row { display: flex; justify-content: space-between; gap: 16px; border-top: 1px solid rgba(15,23,42,0.06); padding-top: 10px; }
.kv-row:first-child { border-top: 0; padding-top: 0; }
.coverage-collector { border-top: 1px solid rgba(15,23,42,0.06); padding: 12px 0; }
.coverage-collector:first-child { border-top: 0; padding-top: 0; }
.kv-key { color: var(--muted); }
.kv-val { text-align: right; word-break: break-word; color: var(--muted-strong); font-weight: 600; }

.feed { display: grid; gap: 12px; }
.feed-item {
  border: 1px solid var(--border);
  border-left: 4px solid var(--cyan);
  border-radius: 16px;
  padding: 14px;
  background: linear-gradient(180deg, rgba(248,250,252,0.95), rgba(255,255,255,0.95));
}
.feed-item .meta { color: var(--muted); font-size: 0.84rem; margin-top: 6px; }

.role-group { margin-top: 26px; }
.role-group h3 { margin: 0 0 12px; color: var(--muted); font-size: 0.92rem; text-transform: uppercase; letter-spacing: 0.08em; }
.role-card .role { font-weight: 700; }
.role-card .dept { color: var(--muted); font-size: 0.9rem; margin-top: 4px; }
.role-card .mini { margin-top: 12px; display: grid; gap: 8px; font-size: 0.92rem; }
.role-card .mini span { color: var(--muted); }

.kanban { display: grid; grid-template-columns: repeat(6, minmax(220px, 1fr)); gap: 16px; overflow-x: auto; padding-bottom: 8px; }
.column {
  min-height: 420px; background: rgba(255,255,255,0.76);
  border: 1px solid rgba(15,23,42,0.08); border-radius: 22px; padding: 16px;
  transition: border-color 0.16s ease, background 0.16s ease, transform 0.16s ease;
  box-shadow: 0 12px 26px rgba(15,23,42,0.05);
}
.column.drag-over {
  border-color: rgba(99,102,241,0.45);
  background: rgba(99,102,241,0.08);
  transform: translateY(-2px);
}
.column h3 { margin: 0 0 14px; font-size: 1rem; }
.task-list { display: grid; gap: 12px; min-height: 80px; }
.task-card {
  background: linear-gradient(180deg, rgba(255,255,255,1), rgba(248,250,252,0.98));
  border: 1px solid rgba(15,23,42,0.10);
  border-radius: 18px;
  padding: 15px;
  box-shadow: 0 10px 24px rgba(15,23,42,0.06);
}
.task-card.dragging {
  opacity: 0.7;
  border-color: rgba(6,182,212,0.5);
}
.task-card .title { font-weight: 700; margin-bottom: 8px; }
.badges { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.badge {
  padding: 5px 10px; border-radius: 999px; font-size: 0.74rem; font-weight: 600;
  border: 1px solid rgba(148,163,184,0.20);
  background: rgba(148,163,184,0.10);
  color: var(--text);
}

/* Domain badges */
.badge.domain-exec { border-color: rgba(34,211,238,0.35); background: rgba(34,211,238,0.12); }
.badge.domain-platform { border-color: rgba(96,165,250,0.35); background: rgba(96,165,250,0.12); }
.badge.domain-security { border-color: rgba(167,139,250,0.35); background: rgba(167,139,250,0.12); }
.badge.external { border-color: rgba(251,191,36,0.35); background: rgba(251,191,36,0.12); }
.badge.review { border-color: rgba(251,113,133,0.35); background: rgba(251,113,133,0.12); }

/* Priority badges */
.badge.priority-urgent { border-color: rgba(251,113,133,0.45); background: rgba(251,113,133,0.14); }
.badge.priority-high { border-color: rgba(251,191,36,0.45); background: rgba(251,191,36,0.14); }
.badge.priority-normal { border-color: rgba(96,165,250,0.45); background: rgba(96,165,250,0.14); }
.badge.priority-low { border-color: rgba(52,211,153,0.45); background: rgba(52,211,153,0.14); }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 13px 10px; border-bottom: 1px solid rgba(15,23,42,0.06); }
th {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
tr.artifact-row { cursor: pointer; transition: background 0.15s ease; }
tr.artifact-row:hover { background: rgba(15,23,42,0.02); }
.compact-header { margin-bottom: 16px; }
.checkbox-card { display: flex; align-items: center; }
.selected-row { background: rgba(37,99,235,0.08); }
.finding-row { cursor: pointer; }
.finding-row:hover { background: rgba(37,99,235,0.05); }
.finding-origin {
  display: inline-flex;
  margin-left: 8px;
  padding: 2px 6px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 4px;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 700;
  vertical-align: middle;
}
.finding-origin.core {
  color: #7ee7d8;
  border-color: rgba(53, 214, 196, 0.3);
  background: rgba(53, 214, 196, 0.08);
}
.finding-detail-header { display:flex; justify-content:space-between; gap:12px; align-items:flex-start; margin-bottom:14px; }
.finding-detail-header h4 { margin:0 0 6px; }
.detail-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(41,95,214,0.08);
  color: var(--blue);
  font-size: 0.73rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.detail-status-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}
.finding-meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 0.85rem;
}
.finding-meta-line span:not(:last-child)::after {
  content: "•";
  margin-left: 8px;
  color: rgba(15,23,42,0.28);
}
.native-close-panel {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(15,23,42,0.08);
}
.native-close-grid {
  grid-template-columns: minmax(0, 260px) minmax(0, 1fr);
}
.finding-detail-grid { display:grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap:14px; }
.finding-review-drawer { position: fixed; z-index: 120; top: 0; right: 0; width: min(620px, 94vw); height: 100dvh; overflow: auto; padding: 22px; border-left: 1px solid var(--border); background: var(--bg); box-shadow: -24px 0 70px rgba(2,6,23,.28); transform: translateX(105%); transition: transform .2s ease; }
.finding-review-drawer.open { transform: translateX(0); }
.finding-review-drawer-head { position: sticky; top: -22px; z-index: 2; display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin: -22px -22px 18px; padding: 18px 22px; border-bottom: 1px solid var(--border); background: var(--bg); }
.finding-review-drawer-head h3 { margin: 4px 0 0; }
.professional-ui :is(button, a, input, select, textarea, summary):focus-visible { outline: 3px solid rgba(6,182,212,.72); outline-offset: 2px; }
.publication-lane-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.saved-view-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.finding-detail-card { padding:16px; }
.detail-summary {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(15,23,42,0.03);
  border: 1px solid rgba(15,23,42,0.06);
  color: var(--text);
  line-height: 1.45;
}
.compact-feed-item {
  padding: 12px 13px;
}
.compact-empty {
  padding: 16px;
  font-size: 0.88rem;
  line-height: 1.5;
}
.action-cluster {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(15,23,42,0.08);
}
.action-cluster-label {
  font-weight: 700;
  color: var(--muted-strong);
}
.muted-inline { color: var(--muted); }

.empty {
  border: 1px dashed rgba(15,23,42,0.12);
  border-radius: 16px;
  padding: 20px;
  color: var(--muted);
  background: linear-gradient(180deg, rgba(248,250,252,0.92), rgba(255,255,255,0.92));
}
.small { font-size: 0.85rem; color: var(--muted); }
.error { color: #fca5a5; }
.good { color: #86efac; }

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

@media (max-width: 1200px) {
  .grid.cols-5 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid.cols-4, .grid.cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { position: relative; height: auto; border-right: 0; border-bottom: 1px solid var(--border); }
}

.task-card { cursor: pointer; transition: transform 0.15s ease, border-color 0.15s ease; }
.task-card:hover { transform: translateY(-2px); border-color: rgba(56,79,197,0.22); box-shadow: var(--shadow-strong); }

.task-card-actions { display: flex; gap: 8px; margin-top: 12px; }
.mini-btn {
  background: rgba(255,255,255,0.04);
  color: var(--text);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.12s ease, border-color 0.12s ease, background 0.12s ease;
}
.mini-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(99,102,241,0.35);
  background: rgba(99,102,241,0.10);
}

.modal.hidden { display: none; }
.modal {
  position: fixed; inset: 0;
  background: rgba(15, 23, 42, 0.35);
  backdrop-filter: blur(6px);
  display: grid; place-items: center; z-index: 1000; padding: 20px;
}
.modal-card {
  width: min(860px, 100%);
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 24px;
  box-shadow: 0 34px 80px rgba(15, 23, 42, 0.22);
}
.modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.icon-btn, .primary-btn, .secondary-btn, .danger-btn {
  border-radius: 14px;
  border: 1px solid var(--border);
  cursor: pointer;
  font: inherit;
  transition: transform 0.14s ease, border-color 0.14s ease, box-shadow 0.14s ease, background 0.14s ease;
}
.icon-btn { background: rgba(15,23,42,0.04); color: var(--text); width: 40px; height: 40px; }
.primary-btn { background: linear-gradient(135deg, #214cc8, #0f9db6); color: white; padding: 10px 15px; border: 0; box-shadow: 0 14px 28px rgba(41,95,214,0.2); }
.secondary-btn { background: rgba(255,255,255,0.88); color: var(--muted-strong); padding: 10px 14px; }
.danger-btn { background: rgba(239,68,68,0.10); color: var(--red); padding: 10px 14px; }
.icon-btn:hover, .primary-btn:hover, .secondary-btn:hover, .danger-btn:hover { transform: translateY(-1px); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.form-grid label { display: grid; gap: 7px; font-size: 0.9rem; color: var(--muted); }
.form-grid label.full { grid-column: 1 / -1; }
.form-grid input, .form-grid select, .form-grid textarea {
  width: 100%;
  background: rgba(15,23,42,0.03);
  color: var(--text);
  border: 1px solid rgba(15,23,42,0.12);
  border-radius: 12px;
  padding: 11px 12px;
  font: inherit;
}
.form-grid input:focus, .form-grid select:focus, .form-grid textarea:focus {
  outline: none;
  border-color: rgba(37,99,235,0.35);
  box-shadow: 0 0 0 3px rgba(37,99,235,0.12);
}
.checkbox-row { display: flex !important; align-items: center; gap: 10px; margin-top: 18px; }
.checkbox-row input { width: auto; }
.modal-actions { display: flex; justify-content: space-between; align-items: center; margin-top: 18px; }
.modal-actions-right { display: flex; gap: 10px; }
.integration-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.blog-filter-group { display: flex; gap: 10px; align-items: end; flex-wrap: wrap; }
.credential-status-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 16px; }
.credential-status-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 12px; border: 1px solid var(--border); border-radius: 12px; background: rgba(15,23,42,0.025); color: var(--muted-strong); }
.credential-status-row .status-pill { white-space: nowrap; }
.mission-queues { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.research-stage-stepper { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 18px 0 12px; padding: 0; list-style: none; }
.research-stage-step { min-width: 0; min-height: 72px; display: grid; grid-template-columns: 24px minmax(0, 1fr); align-items: center; gap: 9px; padding: 10px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg-soft); color: var(--muted); font-size: .78rem; font-weight: 650; }
.research-stage-step > span:last-child { min-width: 0; line-height: 1.3; overflow-wrap: anywhere; }
.research-stage-step.complete { border-color: rgba(16,185,129,.45); color: var(--text); background: rgba(16,185,129,.08); }
.research-stage-step.current { border-color: rgba(6,182,212,.55); color: var(--text); background: rgba(6,182,212,.1); box-shadow: inset 0 0 0 1px rgba(6,182,212,.18); }
.research-stage-index { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 999px; border: 1px solid currentColor; font-size: .72rem; }
.research-candidate-facts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.research-candidate-facts span { padding: 4px 7px; border: 1px solid var(--border); border-radius: 6px; background: var(--bg-soft); color: var(--muted); font-size: .72rem; }
.mission-queue { display: flex; align-items: center; gap: 10px; min-height: 76px; text-align: left; border: 1px solid var(--border); border-radius: 12px; background: var(--bg-soft); color: var(--text); padding: 12px; cursor: pointer; }
.mission-queue:hover { border-color: rgba(37,99,235,0.35); box-shadow: var(--shadow-soft); }
.mission-queue-count { font-size: 1.55rem; font-weight: 750; color: var(--accent); }
.mission-queue strong, .mission-queue small { display: block; }
.mission-queue small { margin-top: 4px; color: var(--muted); line-height: 1.3; }
.asset-view-summary { display: flex; align-items: baseline; gap: 10px; margin: 16px 0 0; padding: 11px 14px; border: 1px solid var(--border); border-left: 3px solid var(--accent); border-radius: 4px; background: var(--bg-soft); color: var(--muted-strong); }
.asset-view-summary strong { color: var(--text); }
.asset-view-summary span:last-child { color: var(--muted); }
.timeline { display: grid; gap: 0; padding: 8px 0; }
.timeline-item { display: flex; gap: 12px; padding: 11px 0 11px 3px; border-bottom: 1px solid var(--border); }
.timeline-item:last-child { border-bottom: 0; }
.timeline-marker { width: 10px; height: 10px; margin-top: 5px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px rgba(37,99,235,0.12); flex: 0 0 auto; }
.research-inbox-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.research-inbox-card { border: 1px solid var(--border); border-radius: 12px; padding: 14px; background: var(--bg-soft); }
.research-inbox-card-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.research-inbox-card p { margin: 10px 0; color: var(--muted-strong); line-height: 1.45; }
.asset-detail-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-top: 16px; }
.compact-list { margin: 8px 0 0; padding-left: 18px; color: var(--muted-strong); }
.compact-list li { margin: 5px 0; }

@media (max-width: 720px) {
  .main { padding: 18px; }
  .grid.cols-5, .grid.cols-4, .grid.cols-3, .grid.cols-2 { grid-template-columns: 1fr; }
  .page-header { flex-direction: column; }
  .form-grid { grid-template-columns: 1fr; }
  .finding-detail-grid { grid-template-columns: 1fr; }
  .finding-detail-header { flex-direction: column; }
  .detail-status-stack { align-items: flex-start; }
  .credential-status-grid { grid-template-columns: 1fr; }
  .mission-queues, .research-inbox-grid { grid-template-columns: 1fr; }
  .research-stage-stepper { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .publication-lane-grid { grid-template-columns: 1fr; }
  .asset-detail-columns { grid-template-columns: 1fr; }
  .asset-view-summary { display: block; }
  .asset-view-summary > * { display: block; margin: 2px 0; }
  .blog-filter-group { align-items: stretch; width: 100%; }
  .blog-filter-group .blog-filter-label { flex: 1 1 150px; }
}

@media (max-width: 360px) {
  .research-stage-stepper { grid-template-columns: 1fr; }
}

/* Mission Control redesign: clear workspace context and resilient narrow screens. */
.professional-ui .research-view-summary {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 16px 0 0;
  padding: 11px 14px;
  border: 1px solid #344452;
  border-left: 3px solid #62b8cf;
  border-radius: 4px;
  background: #131d24;
  color: #cbd7df;
}
.professional-ui .research-view-summary strong { color: #f3f7f9; }
.professional-ui .research-view-summary span:last-child { color: #aebbc7; }
.professional-ui .publication-view-summary {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 16px 0 0;
  padding: 11px 14px;
  border: 1px solid #344452;
  border-left: 3px solid #8b7de3;
  border-radius: 4px;
  background: #151b29;
  color: #cbd7df;
}
.professional-ui .publication-view-summary strong { color: #f3f7f9; }
.professional-ui .publication-view-summary span:last-child { color: #aebbc7; }
.professional-ui .system-view-summary {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 16px 0 0;
  padding: 11px 14px;
  border: 1px solid #344452;
  border-left: 3px solid #62b8cf;
  border-radius: 4px;
  background: #131d24;
  color: #cbd7df;
}
.professional-ui .system-view-summary strong { color: #f3f7f9; }
.professional-ui .system-view-summary span:last-child { color: #aebbc7; }
.professional-ui #page-integrations [hidden] { display: none !important; }
.professional-ui #page-blog-ops [hidden] { display: none !important; }
.professional-ui .research-next-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 16px 0;
  padding: 16px 18px;
  border: 1px solid #3c6571;
  border-left: 4px solid #62b8cf;
  border-radius: 4px;
  background: #14242b;
}
.professional-ui .research-next-action h4 { margin: 3px 0 4px; color: #f3f7f9; }
.professional-ui .research-next-action p { margin: 0; color: #b7c7d0; line-height: 1.5; }
.professional-ui .metric-scope {
  margin-top: 5px;
  color: #8397a6;
  font-size: 0.68rem;
  line-height: 1.35;
  letter-spacing: 0.02em;
}
.professional-ui .heading-scope {
  display: inline-block;
  margin-left: 7px;
  color: #8397a6;
  font-size: .68rem;
  font-weight: 500;
  letter-spacing: .03em;
  text-transform: uppercase;
  vertical-align: middle;
}
.professional-ui .finding-actions { align-items: flex-start; }
.professional-ui .inline-action-menu { position: relative; }
.professional-ui .inline-action-menu summary {
  min-height: 36px;
  padding: 8px 10px;
  border: 1px solid #40515f;
  border-radius: 3px;
  color: #cbd7df;
  cursor: pointer;
  list-style: none;
  white-space: nowrap;
}
.professional-ui .inline-action-menu summary::-webkit-details-marker { display: none; }
.professional-ui .inline-action-menu > div {
  position: absolute;
  right: 0;
  z-index: 10;
  display: grid;
  min-width: 190px;
  gap: 5px;
  padding: 8px;
  border: 1px solid #40515f;
  border-radius: 4px;
  background: #151e25;
  box-shadow: 0 12px 26px rgba(0,0,0,.28);
}
.professional-ui .inline-action-menu button { width: 100%; text-align: left; }
.professional-ui #page-research-cases [hidden] { display: none !important; }

@media (max-width: 720px) {
  .professional-ui .research-view-summary { display: block; }
  .professional-ui .research-view-summary > * { display: block; margin: 2px 0; }
  .professional-ui .publication-view-summary { display: block; }
  .professional-ui .publication-view-summary > * { display: block; margin: 2px 0; }
  .professional-ui .system-view-summary { display: block; }
  .professional-ui .system-view-summary > * { display: block; margin: 2px 0; }
  .professional-ui .topbar-primary { overflow: hidden; }
  .professional-ui .workspace-context { max-width: 42vw; overflow: hidden; }
  .professional-ui .top-strip .operator-identity { display: none; }
  .professional-ui .context-nav { overflow-x: auto; overflow-y: hidden; white-space: nowrap; scrollbar-width: thin; }
  .professional-ui .context-nav-btn { min-height: 40px; flex: 0 0 auto; }
  .professional-ui button,
  .professional-ui select,
  .professional-ui input,
  .professional-ui textarea { min-height: 44px; }
  .professional-ui .table-wrap { overflow-x: auto; overflow-y: visible; -webkit-overflow-scrolling: touch; }
  .professional-ui .table-wrap table { display: table; min-width: 720px; width: 100%; }
  .professional-ui .table-wrap table thead { display: table-header-group; }
  .professional-ui .table-wrap table tbody { display: table-row-group; }
  .professional-ui .table-wrap table tr { display: table-row; padding: 0; }
  .professional-ui .table-wrap table td,
  .professional-ui .table-wrap table th { display: table-cell; width: auto; padding: 10px 12px; white-space: normal; vertical-align: top; }
  .professional-ui .mobile-card-table { min-width: 0 !important; display: block !important; }
  .professional-ui .mobile-card-table thead { display: none !important; }
  .professional-ui .mobile-card-table tbody,
  .professional-ui .mobile-card-table tr,
  .professional-ui .mobile-card-table td { display: block !important; width: auto !important; }
  .professional-ui .mobile-card-table tr { margin: 10px 0; padding: 11px 12px; border: 1px solid var(--border); border-radius: 12px; background: var(--bg-soft); }
  .professional-ui .mobile-card-table td { display: flex !important; justify-content: space-between; gap: 12px; padding: 8px 0; border: 0; text-align: right; }
  .professional-ui .mobile-card-table td::before { content: attr(data-label); color: var(--muted); font-size: 0.76rem; font-weight: 650; text-align: left; }
  .professional-ui .metric-card { min-height: 108px; padding: 16px; }
  .professional-ui .metric-card .metric { font-size: 1.8rem; margin: 6px 0 2px; }
  .professional-ui .research-next-action { align-items: stretch; flex-direction: column; }
  .professional-ui .research-next-action button { width: 100%; }
}

.prompt-actions { display:flex; gap:10px; flex-wrap:wrap; margin-top:10px; }

.prompt-output {
  width: 100%;
  background: rgba(248,250,252,0.95);
  color: var(--text);
  border: 1px solid rgba(15,23,42,0.12);
  border-radius: 16px;
  padding: 14px;
  font: inherit;
  line-height: 1.45;
}

.task-card-actions { display:flex; gap:8px; margin-top:12px; flex-wrap:wrap; }
.mini-btn {
  background: rgba(255,255,255,0.9);
  color: var(--muted-strong);
  border: 1px solid rgba(15,23,42,0.10);
  border-radius: 999px;
  padding: 7px 11px;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
}
.mini-btn:hover { border-color: rgba(41,95,214,0.32); background: rgba(41,95,214,0.06); }


.run-requests-grid td { vertical-align: top; }
.rr-main { font-weight: 600; }
.rr-sub { margin-top: 4px; color: var(--muted); }
.rr-meta { margin-top: 8px; color: var(--muted); }
.rr-result { max-width: 340px; line-height: 1.45; color: var(--text); }
.rr-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.rr-proof-list { margin-top: 8px; display: grid; gap: 4px; color: var(--muted); line-height: 1.4; }
.rr-proof-list strong { color: var(--text); font-weight: 600; }


.primary-btn.is-loading, .secondary-btn.is-loading, .danger-btn.is-loading, .status-pill.is-loading {
  opacity: 0.8;
  cursor: wait !important;
}
.primary-btn:disabled, .secondary-btn:disabled, .danger-btn:disabled, .icon-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}


html, body { width: 100%; overflow-x: hidden; }
.main { min-width: 0; overflow-x: hidden; }
.page-header { flex-wrap: wrap; }
.page-header > div { min-width: 0; }
.grid { min-width: 0; }
.card { min-width: 0; }
input, select, textarea { width: 100%; max-width: 100%; }

#page-tasks .page-header {
  align-items: center;
}

#page-tasks .grid.cols-4 {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

@media (max-width: 1280px) {
  .app-shell { grid-template-columns: 240px minmax(0, 1fr); }
  .main { padding: 22px; }
}

@media (max-width: 1024px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar {
    position: static;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }
  .grid.cols-5, .grid.cols-4, .grid.cols-3, .grid.cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* OKComputer_Sec reference skin.
   Translates the local/live Vite reference into this static dashboard without
   importing the Kimi runtime, external trackers, or generated React bundle. */
.okcomputer-skin {
  --void-black: #050507;
  --surface: #0d0d12;
  --surface-elevated: #14141a;
  --surface-soft: #191922;
  --border-color: #1e1e28;
  --border-active: #2a2a38;
  --teal-primary: #00d4c8;
  --teal-glow: rgba(0, 212, 200, 0.4);
  --teal-muted: #0a3d3a;
  --cyan: #38bdf8;
  --amber: #f59e0b;
  --rose: #f43f5e;
  --emerald: #10b981;
  --violet: #8b5cf6;
  --text-primary: #f0f0f5;
  --text-secondary: #a2a2b7;
  --text-tertiary: #6b6b80;
  --text-inverse: #050507;
  --bg: var(--void-black);
  --bg-soft: var(--surface);
  --bg-panel: var(--surface);
  --card: var(--surface);
  --card-muted: var(--surface-elevated);
  --border: var(--border-color);
  --border-strong: var(--border-active);
  --text: var(--text-primary);
  --muted: var(--text-secondary);
  --muted-strong: var(--text-primary);
  --blue: var(--cyan);
  --green: var(--emerald);
  --red: var(--rose);
  --shadow-soft: 0 4px 24px rgba(0, 0, 0, 0.4);
  --shadow-strong: 0 8px 32px rgba(0, 0, 0, 0.5);
  background: var(--void-black);
  color: var(--text-primary);
}

.okcomputer-skin,
.okcomputer-skin input,
.okcomputer-skin textarea,
.okcomputer-skin select,
.okcomputer-skin button {
  font-family: 'Inter', 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.okcomputer-skin code,
.okcomputer-skin pre,
.okcomputer-skin .font-mono-data,
.okcomputer-skin .brand-overline,
.okcomputer-skin .small,
.okcomputer-skin .metric-label,
.okcomputer-skin .kv-key,
.okcomputer-skin .top-strip,
.okcomputer-skin .status-pill,
.okcomputer-skin .badge,
.okcomputer-skin .triage-rec-pill,
.okcomputer-skin .blog-draft-meta,
.okcomputer-skin .campaign-table,
.okcomputer-skin .triage-cli-fallback {
  font-family: 'JetBrains Mono', 'SF Mono', ui-monospace, monospace;
}

.okcomputer-skin::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background:
    radial-gradient(circle at 18% 8%, rgba(0, 212, 200, 0.12), transparent 26%),
    radial-gradient(circle at 88% 18%, rgba(56, 189, 248, 0.08), transparent 28%),
    linear-gradient(180deg, #050507 0%, #07070b 100%);
}

.okcomputer-skin * {
  scrollbar-color: rgba(255,255,255,0.18) transparent;
}

.okcomputer-skin::-webkit-scrollbar,
.okcomputer-skin *::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

.okcomputer-skin::-webkit-scrollbar-track,
.okcomputer-skin *::-webkit-scrollbar-track {
  background: transparent;
}

.okcomputer-skin::-webkit-scrollbar-thumb,
.okcomputer-skin *::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.16);
  border-radius: 999px;
}

.okcomputer-skin .app-shell {
  grid-template-columns: 260px minmax(0, 1fr);
  min-height: 100vh;
  background: var(--void-black);
}

.okcomputer-skin .sidebar {
  width: 260px;
  padding: 0;
  color: var(--text-primary);
  background: var(--void-black);
  border-right: 1px solid var(--border-color);
  box-shadow: none;
}

.okcomputer-skin .brand {
  min-height: 73px;
  margin: 0;
  padding: 16px;
  border-bottom: 1px solid var(--border-color);
}

.okcomputer-skin .brand-badge {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  color: var(--void-black);
  background: linear-gradient(135deg, var(--teal-primary), var(--cyan));
  box-shadow: 0 0 24px rgba(0, 212, 200, 0.28);
}

.okcomputer-skin .brand-badge svg {
  width: 21px;
  height: 21px;
  stroke-width: 2.1;
}

.okcomputer-skin .brand-overline {
  color: var(--teal-primary);
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.okcomputer-skin .brand h1 {
  color: var(--text-primary);
  font-size: 0.92rem;
  font-weight: 700;
}

.okcomputer-skin .brand p {
  color: var(--text-secondary);
  font-size: 0.76rem;
}

.okcomputer-skin .nav-list {
  gap: 4px;
  padding: 12px 8px;
}

.okcomputer-skin .nav-btn {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-height: 56px;
  padding: 8px 10px;
  border: 0;
  border-left: 3px solid transparent;
  border-radius: 10px;
  color: var(--text-secondary);
  background: transparent;
}

.okcomputer-skin .nav-btn:hover {
  color: var(--text-primary);
  background: rgba(255,255,255,0.035);
  border-left-color: rgba(255,255,255,0.08);
}

.okcomputer-skin .nav-btn.active {
  color: var(--teal-primary);
  background: rgba(0, 212, 200, 0.055);
  border-left-color: var(--teal-primary);
  box-shadow: none;
}

.okcomputer-skin .nav-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: var(--text-tertiary);
  background: var(--surface-elevated);
  border: 1px solid rgba(255,255,255,0.03);
}

.okcomputer-skin .nav-icon svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.okcomputer-skin .nav-btn.active .nav-icon {
  color: var(--teal-primary);
  background: rgba(0, 212, 200, 0.14);
  border-color: rgba(0, 212, 200, 0.2);
}

.okcomputer-skin .nav-btn .title {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.okcomputer-skin .nav-btn .desc {
  margin-top: 2px;
  color: var(--text-tertiary);
  font-size: 0.66rem;
  line-height: 1.25;
}

.okcomputer-skin .sidebar-footer {
  margin: auto 12px 12px;
  padding: 12px;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  background: var(--surface);
}

.okcomputer-skin .sidebar-footer-label {
  color: var(--text-tertiary);
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.okcomputer-skin #global-status {
  color: var(--text-secondary);
  font-size: 0.72rem;
  line-height: 1.45;
}

.okcomputer-skin .main {
  min-width: 0;
  padding: 0;
  background: var(--void-black);
}

.okcomputer-skin .top-strip {
  height: 48px;
  padding: 0 20px;
  color: var(--text-secondary);
  background: var(--void-black);
  border-bottom: 1px solid var(--border-color);
  box-shadow: none;
  border-radius: 0;
}

.okcomputer-skin .top-strip-live {
  color: var(--teal-primary);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.okcomputer-skin .dot {
  width: 8px;
  height: 8px;
  background: var(--teal-primary);
  box-shadow: 0 0 0 5px rgba(0, 212, 200, 0.12), 0 0 18px rgba(0, 212, 200, 0.35);
}

.okcomputer-skin .top-strip-meta {
  color: var(--text-secondary);
  font-size: 0.74rem;
}

.okcomputer-skin #top-strip-time {
  color: var(--text-tertiary);
}

.okcomputer-skin .page {
  padding: 32px;
}

.okcomputer-skin .page.active {
  animation: okc-page-in 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes okc-page-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.okcomputer-skin .page-header {
  margin-bottom: 20px;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  box-shadow: var(--shadow-soft);
}

.okcomputer-skin .page-header h2 {
  color: var(--text-primary);
  font-size: clamp(1.65rem, 2.4vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.035em;
}

.okcomputer-skin .page-header p {
  color: var(--text-secondary);
  font-size: 0.82rem;
}

.okcomputer-skin .card,
.okcomputer-skin .column,
.okcomputer-skin .modal-card,
.okcomputer-skin .blog-auth-card,
.okcomputer-skin .triage-ops-auth-card,
.okcomputer-skin .campaign-research-card,
.okcomputer-skin .campaign-discovery-box,
.okcomputer-skin .campaign-result-section,
.okcomputer-skin .triage-review-section,
.okcomputer-skin .triage-campaign-dock {
  color: var(--text-primary);
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  box-shadow: var(--shadow-soft);
  backdrop-filter: none;
}

.okcomputer-skin .card h3,
.okcomputer-skin .card h4,
.okcomputer-skin .modal-card h3,
.okcomputer-skin .triage-review-panel h3,
.okcomputer-skin .campaign-result-section h4 {
  color: var(--text-primary);
  font-weight: 650;
}

.okcomputer-skin .small,
.okcomputer-skin .card-subtle,
.okcomputer-skin .metric-label,
.okcomputer-skin .feed-item .meta,
.okcomputer-skin .task-card-desc,
.okcomputer-skin .blog-draft-summary,
.okcomputer-skin .triage-rationale {
  color: var(--text-secondary);
}

.okcomputer-skin .metric-card {
  position: relative;
  overflow: hidden;
  padding: 20px;
  border-color: var(--border-color);
  background: var(--surface);
}

.okcomputer-skin .metric-card::before {
  inset: 16px auto 16px 0;
  width: 3px;
  height: auto;
  border-radius: 999px;
  background: var(--teal-primary);
}

.okcomputer-skin .metric-card:hover {
  transform: translateY(-1px);
  border-color: var(--border-active);
  box-shadow: 0 0 24px rgba(0, 212, 200, 0.08), var(--shadow-soft);
}

.okcomputer-skin .metric {
  color: var(--text-primary);
  font-size: clamp(2rem, 3.2vw, 2.55rem);
  font-weight: 760;
}

.okcomputer-skin input,
.okcomputer-skin textarea,
.okcomputer-skin select {
  color: var(--text-primary);
  background: var(--surface-elevated);
  border: 1px solid var(--border-color);
  border-radius: 10px;
}

.okcomputer-skin input::placeholder,
.okcomputer-skin textarea::placeholder {
  color: var(--text-tertiary);
}

.okcomputer-skin input:focus,
.okcomputer-skin textarea:focus,
.okcomputer-skin select:focus,
.okcomputer-skin button:focus-visible,
.okcomputer-skin summary:focus-visible {
  outline: 0;
  border-color: var(--teal-primary);
  box-shadow: 0 0 0 3px rgba(0, 212, 200, 0.14);
}

.okcomputer-skin .primary-btn {
  color: var(--void-black);
  background: var(--teal-primary);
  border: 1px solid rgba(0, 212, 200, 0.78);
  box-shadow: 0 0 20px rgba(0, 212, 200, 0.12);
}

.okcomputer-skin .primary-btn:hover {
  color: var(--void-black);
  background: #00e5d9;
  box-shadow: 0 0 24px rgba(0, 212, 200, 0.2);
}

.okcomputer-skin .secondary-btn,
.okcomputer-skin .mini-btn,
.okcomputer-skin .status-pill {
  color: var(--text-secondary);
  background: transparent;
  border: 1px solid var(--border-color);
  box-shadow: none;
}

.okcomputer-skin .secondary-btn:hover,
.okcomputer-skin .mini-btn:hover,
.okcomputer-skin .status-pill:hover {
  color: var(--teal-primary);
  border-color: var(--teal-primary);
  background: rgba(0, 212, 200, 0.05);
}

.okcomputer-skin .danger-btn {
  color: var(--rose);
  background: rgba(244, 63, 94, 0.08);
  border: 1px solid rgba(244, 63, 94, 0.28);
}

.okcomputer-skin .danger-btn:hover {
  color: #ff6b85;
  border-color: rgba(244, 63, 94, 0.46);
  background: rgba(244, 63, 94, 0.12);
}

.okcomputer-skin .badge,
.okcomputer-skin .triage-rec-pill,
.okcomputer-skin .blog-readiness-pill,
.okcomputer-skin .finding-status {
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.045);
  color: var(--text-secondary);
}

.okcomputer-skin .badge.priority-urgent,
.okcomputer-skin .badge.status-critical,
.okcomputer-skin .triage-rec-pill.critical,
.okcomputer-skin .triage-rec-pill.false_positive,
.okcomputer-skin .triage-rec-pill.false-positive,
.okcomputer-skin .triage-rec-pill.failed {
  color: var(--rose);
  background: rgba(244, 63, 94, 0.09);
  border-color: rgba(244, 63, 94, 0.28);
}

.okcomputer-skin .badge.priority-high,
.okcomputer-skin .triage-rec-pill.open,
.okcomputer-skin .triage-rec-pill.high,
.okcomputer-skin .triage-rec-pill.needs_review,
.okcomputer-skin .triage-rec-pill.needs-review {
  color: var(--amber);
  background: rgba(245, 158, 11, 0.08);
  border-color: rgba(245, 158, 11, 0.22);
}

.okcomputer-skin .triage-rec-pill.expected_behavior,
.okcomputer-skin .triage-rec-pill.expected-behavior,
.okcomputer-skin .triage-rec-pill.completed,
.okcomputer-skin .badge.status-completed,
.okcomputer-skin .blog-readiness-pill.ready_to_review {
  color: var(--emerald);
  background: rgba(16, 185, 129, 0.08);
  border-color: rgba(16, 185, 129, 0.24);
}

.okcomputer-skin .triage-rec-pill.not_applicable,
.okcomputer-skin .triage-rec-pill.not-applicable {
  color: var(--text-secondary);
  background: rgba(134, 142, 150, 0.1);
  border-color: rgba(134, 142, 150, 0.28);
}

.okcomputer-skin .kv-row,
.okcomputer-skin .feed-item,
.okcomputer-skin .blog-draft-item,
.okcomputer-skin .triage-alert-card,
.okcomputer-skin .campaign-package-row,
.okcomputer-skin .campaign-inline-row,
.okcomputer-skin .evidence-score-card,
.okcomputer-skin .blog-meta-grid > div,
.okcomputer-skin .blog-review-checklist,
.okcomputer-skin .finding-detail-card {
  color: var(--text-primary);
  background: var(--surface-elevated);
  border-color: var(--border-color);
}

.okcomputer-skin .feed-item {
  border-left-color: var(--teal-primary);
}

.okcomputer-skin .task-card {
  color: var(--text-primary);
  background: var(--surface-elevated);
  border-color: var(--border-color);
  box-shadow: var(--shadow-soft);
}

.okcomputer-skin .task-card:hover,
.okcomputer-skin .blog-draft-item:hover,
.okcomputer-skin .triage-alert-card:hover {
  border-color: var(--border-active);
  transform: translateY(-1px);
}

.okcomputer-skin .task-card .title,
.okcomputer-skin .blog-draft-title,
.okcomputer-skin .triage-alert-title {
  color: var(--text-primary);
}

.okcomputer-skin .kv-key {
  color: var(--text-tertiary);
  text-transform: uppercase;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
}

.okcomputer-skin .kv-val {
  color: var(--text-secondary);
}

.okcomputer-skin table {
  color: var(--text-primary);
}

.okcomputer-skin th {
  color: var(--text-tertiary);
  background: var(--surface-elevated);
  border-color: var(--border-color);
}

.okcomputer-skin td {
  color: var(--text-secondary);
  border-color: var(--border-color);
}

.okcomputer-skin tr:hover td {
  background: rgba(255,255,255,0.025);
  color: var(--text-primary);
}

.okcomputer-skin pre,
.okcomputer-skin .triage-cli-fallback,
.okcomputer-skin .campaign-cli-output pre,
.okcomputer-skin .blog-preview-body,
.okcomputer-skin .run-output,
.okcomputer-skin .prompt-output {
  color: var(--text-secondary);
  background: var(--void-black);
  border: 1px solid var(--border-color);
  border-radius: 10px;
}

.okcomputer-skin .modal-backdrop {
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(8px);
}

.okcomputer-skin .modal-card {
  box-shadow: var(--shadow-strong);
}

.okcomputer-skin .empty-state {
  color: var(--text-secondary);
  background: var(--surface-elevated);
  border: 1px dashed var(--border-active);
  border-radius: 12px;
}

.okcomputer-skin .form-error,
.okcomputer-skin .error,
.okcomputer-skin .last-action-failed {
  color: var(--rose);
}

.okcomputer-skin .success,
.okcomputer-skin .ok,
.okcomputer-skin .approved {
  color: var(--emerald);
}

.okcomputer-skin #page-triage-ops {
  --triage-panel: var(--surface);
  --triage-panel-2: var(--surface-elevated);
  --triage-panel-3: var(--surface-soft);
  --triage-line: var(--border-color);
  --triage-line-strong: var(--border-active);
  --triage-text: var(--text-primary);
  --triage-muted: var(--text-secondary);
  --triage-subtle: var(--text-tertiary);
}

.okcomputer-skin .triage-alert-card.selected,
.okcomputer-skin .blog-draft-item.selected,
.okcomputer-skin .campaign-candidate-card.selected {
  border-color: rgba(0, 212, 200, 0.5);
  box-shadow: 0 0 24px rgba(0, 212, 200, 0.12);
}

.okcomputer-skin .triage-section-heading span,
.okcomputer-skin .campaign-list-head strong,
.okcomputer-skin .campaign-package-header h4 {
  color: var(--text-primary);
}

.okcomputer-skin .triage-section-heading small,
.okcomputer-skin .campaign-list-head small {
  color: var(--text-tertiary);
}

.okcomputer-skin .triage-filter-drawer,
.okcomputer-skin .triage-cli-drawer,
.okcomputer-skin .campaign-json-box {
  background: var(--surface-elevated);
  border-color: var(--border-color);
}

.okcomputer-skin .triage-campaign-dock > summary {
  color: var(--text-primary);
}

.okcomputer-skin .triage-campaign-dock > summary small {
  color: var(--text-secondary);
}

.okcomputer-skin .blog-review-note textarea,
.okcomputer-skin #campaign-json-input {
  min-height: 118px;
}

.okcomputer-skin .blog-preview-actions,
.okcomputer-skin .triage-ops-actions,
.okcomputer-skin .campaign-actions,
.okcomputer-skin .blog-actions {
  gap: 10px;
}

.okcomputer-skin .toast,
.okcomputer-skin .toast-container > * {
  background: var(--surface);
  border-color: var(--border-color);
  color: var(--text-primary);
  box-shadow: var(--shadow-strong);
}

@media (prefers-reduced-motion: reduce) {
  .okcomputer-skin *,
  .okcomputer-skin *::before,
  .okcomputer-skin *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

@media (max-width: 1024px) {
  .okcomputer-skin .app-shell {
    display: block;
  }

  .okcomputer-skin .sidebar {
    position: sticky;
    top: 0;
    width: 100%;
    height: auto;
    z-index: 80;
    border-right: 0;
    border-bottom: 1px solid var(--border-color);
  }

  .okcomputer-skin .brand {
    min-height: 64px;
  }

  .okcomputer-skin .mobile-menu-btn {
    display: inline-flex;
    border-color: var(--border-color);
    background: var(--surface-elevated);
  }

  .okcomputer-skin .mobile-menu-btn span:not(.sr-only) {
    background: var(--teal-primary);
  }

  .okcomputer-skin .nav-list {
    padding: 0 12px;
  }

  .okcomputer-skin.mobile-nav-open .nav-list {
    padding-bottom: 12px;
  }

  .okcomputer-skin .top-strip {
    top: 65px;
  }

  .okcomputer-skin .page {
    padding: 20px;
  }
}

@media (max-width: 720px) {
  .okcomputer-skin .page {
    padding: 12px;
  }

  .okcomputer-skin .page-header {
    padding: 18px;
  }

  .okcomputer-skin .nav-btn {
    grid-template-columns: 36px minmax(0, 1fr);
  }

  .okcomputer-skin .card,
  .okcomputer-skin .column,
  .okcomputer-skin .modal-card,
  .okcomputer-skin .page-header {
    border-radius: 14px;
  }

  .okcomputer-skin .top-strip {
    top: 62px;
  }
}

@media (max-width: 720px) {
  .main { padding: 16px; }
  .page-header h2 { font-size: 1.45rem; }
  .grid.cols-5, .grid.cols-4, .grid.cols-3, .grid.cols-2,
  #page-tasks .grid.cols-4,
  .finding-detail-grid {
    grid-template-columns: 1fr;
  }
  .status-pill { max-width: 100%; }
}


#page-tasks .kanban {
  align-items: start;
  scroll-padding-left: 8px;
}

#page-tasks .column {
  min-width: 260px;
}

#page-tasks .task-card {
  min-width: 0;
}

#page-tasks .task-card .title,
#page-tasks .task-card .small,
#page-tasks .task-card .meta,
#page-tasks .task-card .muted-inline {
  overflow-wrap: anywhere;
  word-break: break-word;
}

@media (max-width: 1440px) {
  #page-tasks .kanban {
    grid-template-columns: repeat(6, minmax(260px, 1fr));
  }
}

@media (max-width: 980px) {
  #page-tasks .kanban {
    grid-template-columns: repeat(6, minmax(240px, 1fr));
  }
  #page-tasks .column {
    min-width: 240px;
  }
}

@media (max-width: 720px) {
  #page-tasks .kanban {
    grid-template-columns: 1fr;
    overflow-x: visible;
  }
  #page-tasks .column {
    min-width: 0;
  }
}


.column {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.column-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(15,23,42,0.08);
}
.column-head h3 {
  margin: 0;
}
.column-subtitle {
  margin-top: 6px;
  font-size: 0.78rem;
  color: var(--muted);
}
.column-count {
  min-width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(79,70,229,0.10);
  color: var(--indigo);
  font-weight: 700;
}
.column-inbox { border-top: 3px solid rgba(37,99,235,0.55); }
.column-planned { border-top: 3px solid rgba(6,182,212,0.55); }
.column-in_progress { border-top: 3px solid rgba(124,58,237,0.55); }
.column-review { border-top: 3px solid rgba(245,158,11,0.55); }
.column-blocked { border-top: 3px solid rgba(239,68,68,0.55); }
.column-done { border-top: 3px solid rgba(16,185,129,0.55); }
.task-card-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
}
.task-card-status {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--muted);
  background: rgba(148,163,184,0.12);
  border: 1px solid rgba(148,163,184,0.18);
  border-radius: 999px;
  padding: 4px 8px;
  white-space: nowrap;
}
.task-card-desc {
  line-height: 1.45;
  margin-top: 6px;
}
.task-list .empty {
  padding: 16px;
  font-size: 0.84rem;
}


#page-tasks .kanban {
  scroll-snap-type: x proximity;
}

#page-tasks .column {
  scroll-snap-align: start;
}

#page-tasks .column-head {
  position: sticky;
  top: 0;
  z-index: 2;
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(8px);
}

.task-card.priority-urgent {
  border-color: rgba(239,68,68,0.28);
  box-shadow: 0 10px 24px rgba(239,68,68,0.08);
}
.task-card.priority-high {
  border-color: rgba(245,158,11,0.24);
}


.task-status-subtle > span {
  color: var(--muted);
}
.task-status-subtle select {
  border-color: rgba(15,23,42,0.08) !important;
  background: rgba(15,23,42,0.02) !important;
}
#task-status-help {
  margin-top: 8px;
}


.is-disabled-soft {
  opacity: 0.72;
}


.task-card-top-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}
.task-card-live {
  font-size: 0.68rem;
  font-weight: 700;
  border-radius: 999px;
  padding: 4px 8px;
  border: 1px solid rgba(59,130,246,0.18);
  background: rgba(59,130,246,0.10);
  color: #1d4ed8;
  white-space: nowrap;
}
.task-card-live.queued,
.task-card-live.picked_up,
.task-card-live.running {
  background: rgba(6,182,212,0.10);
  border-color: rgba(6,182,212,0.20);
  color: #0f766e;
}
.task-card-live.needs_review,
.task-card-live.completed_with_gaps {
  background: rgba(245,158,11,0.12);
  border-color: rgba(245,158,11,0.22);
  color: #b45309;
}
.task-card-live.failed,
.task-card-live.cancelled {
  background: rgba(239,68,68,0.10);
  border-color: rgba(239,68,68,0.18);
  color: #b91c1c;
}
.task-card-live.completed {
  background: rgba(16,185,129,0.10);
  border-color: rgba(16,185,129,0.20);
  color: #047857;
}

/* Paperclip-style Org Map */
.org-tree {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 20px 0;
}

.org-executive {
  display: flex;
  justify-content: center;
  margin-bottom: 40px;
}

.org-executive-card {
  background: linear-gradient(135deg, rgba(124,58,237,0.15), rgba(79,70,229,0.1));
  border: 2px solid rgba(124,58,237,0.3);
  border-radius: 16px;
  padding: 20px 32px;
  text-align: center;
  min-width: 280px;
  box-shadow: 0 8px 32px rgba(124,58,237,0.15);
}

.org-executive-card .role-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--purple);
  margin-bottom: 4px;
}

.org-executive-card .role-dept {
  font-size: 0.9rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.org-departments {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
  position: relative;
}

.org-dept-column {
  background: rgba(255,255,255,0.6);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
  position: relative;
}

.org-dept-column::before {
  content: '';
  position: absolute;
  top: -32px;
  left: 50%;
  width: 2px;
  height: 32px;
  background: linear-gradient(to bottom, var(--purple), transparent);
  transform: translateX(-50%);
}

.org-dept-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 16px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.org-dept-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 1.2rem;
}

.org-dept-title {
  font-weight: 600;
  font-size: 1.1rem;
}

.org-dept-subtitle {
  font-size: 0.8rem;
  color: var(--muted);
}

.org-role-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.org-role-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.org-role-item:hover {
  border-color: rgba(37,99,235,0.3);
  box-shadow: 0 4px 16px rgba(37,99,235,0.08);
  transform: translateY(-1px);
}

.org-role-item.active {
  border-color: var(--blue);
  background: rgba(37,99,235,0.05);
}

.org-role-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 600;
  font-size: 0.9rem;
  color: white;
  flex-shrink: 0;
}

.org-role-info {
  flex: 1;
  min-width: 0;
}

.org-role-name {
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.org-role-meta {
  font-size: 0.78rem;
  color: var(--muted);
  display: flex;
  gap: 12px;
}

.org-role-status {
  display: flex;
  align-items: center;
  gap: 6px;
}

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

.org-role-status-dot.online {
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
}

.org-role-status-dot.busy {
  background: var(--amber);
  box-shadow: 0 0 8px var(--amber);
}

.org-role-status-dot.offline {
  background: var(--muted);
}

.org-role-actions {
  display: flex;
  gap: 6px;
  opacity: 0;
  transition: opacity 0.2s;
}

.org-role-item:hover .org-role-actions {
  opacity: 1;
}

/* Role Detail Panel */
.org-role-detail {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  margin-top: 24px;
}

.org-role-detail-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.org-role-detail-avatar {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  font-size: 1.5rem;
  font-weight: 700;
  color: white;
}

.org-role-detail-info h3 {
  margin: 0 0 4px 0;
  font-size: 1.3rem;
}

.org-role-detail-info p {
  margin: 0;
  color: var(--muted);
}

.org-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.org-stat-card {
  background: rgba(148,163,184,0.06);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  text-align: center;
}

.org-stat-value {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}

.org-stat-label {
  font-size: 0.8rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Tactical redesign overrides */

html,
body {
  background:
    radial-gradient(circle at top, rgba(0, 217, 255, 0.1), transparent 28%),
    radial-gradient(circle at 80% 10%, rgba(91, 88, 214, 0.14), transparent 34%),
    linear-gradient(180deg, #05070a 0%, #030508 100%);
  color: #e1e3e6;
  font-family: "Inter", system-ui, sans-serif;
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

body::before {
  background:
    linear-gradient(rgba(74, 78, 85, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(74, 78, 85, 0.08) 1px, transparent 1px);
  background-size: 96px 96px;
  mask-image: radial-gradient(circle at 50% 14%, black 18%, transparent 74%);
  opacity: 0.18;
}

body::after {
  background:
    radial-gradient(circle at 50% 16%, rgba(0, 217, 255, 0.1), transparent 24%),
    url("./radar-texture.png") center top / cover no-repeat;
  mix-blend-mode: screen;
  opacity: 0.08;
}

.app-shell {
  position: relative;
  z-index: 1;
}

.sidebar {
  background:
    linear-gradient(180deg, rgba(8, 11, 15, 0.94), rgba(5, 7, 10, 0.98)),
    radial-gradient(circle at top right, rgba(0, 217, 255, 0.12), transparent 28%);
  border-right: 1px solid rgba(74, 78, 85, 0.28);
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.03);
}

.brand {
  align-items: center;
  gap: 14px;
}

.brand-badge {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(0, 217, 255, 0.95), rgba(91, 88, 214, 0.68));
  color: #030508;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.34);
}

.brand-badge svg {
  width: 22px;
  height: 22px;
}

.brand-copy {
  min-width: 0;
}

.brand-overline {
  color: #00d9ff;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.64rem;
  letter-spacing: 0.16em;
  margin-bottom: 6px;
}

.brand h1 {
  color: #f8fbff;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.08rem;
  letter-spacing: 0.02em;
}

.brand p {
  color: rgba(225, 227, 230, 0.72);
}

.nav-list {
  gap: 8px;
}

.nav-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  border-radius: 8px;
  border: 1px solid transparent;
  border-left: 2px solid transparent;
  background: rgba(11, 13, 16, 0.2);
}

.nav-btn:hover,
.nav-btn.active {
  background: rgba(17, 19, 24, 0.92);
  border-color: rgba(36, 40, 48, 0.96);
}

.nav-btn.active {
  border-left-color: #00d9ff;
}

.nav-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 34px;
  border-radius: 6px;
  border: 1px solid rgba(36, 40, 48, 0.96);
  background: rgba(11, 13, 16, 0.95);
  color: #00d9ff;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.nav-copy {
  display: block;
  flex: 1;
  min-width: 0;
}

.nav-btn .title {
  color: inherit;
  font-family: "Inter", sans-serif;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav-btn .desc {
  margin-top: 4px;
  color: rgba(225, 227, 230, 0.62);
  font-size: 0.75rem;
  line-height: 1.35;
}

.sidebar-footer-label {
  color: rgba(139, 143, 150, 0.64);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.64rem;
  letter-spacing: 0.14em;
  margin-bottom: 10px;
  text-transform: uppercase;
}

.main {
  background: rgba(11, 13, 16, 0.76);
}

.top-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
  padding: 8px 12px;
  border: 1px solid rgba(74, 78, 85, 0.28);
  border-radius: 8px;
  background: rgba(11, 13, 16, 0.84);
}

.top-strip-live,
.top-strip-meta {
  display: flex;
  align-items: center;
  gap: 10px;
}

.top-strip-live {
  color: #00d9ff;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.16em;
}

.top-strip-meta {
  color: #8b8f96;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.72rem;
}

#top-strip-time {
  color: #e1e3e6;
}

.card,
.column,
.modal-card,
.feed-item,
.empty {
  background: linear-gradient(180deg, rgba(11, 13, 16, 0.96), rgba(17, 19, 24, 0.94));
  border-color: rgba(36, 40, 48, 0.96);
  color: #e1e3e6;
}

.metric-card {
  overflow: hidden;
}

.metric-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  background: linear-gradient(90deg, rgba(0, 217, 255, 0.4), transparent 68%);
}

.metric,
.card h3,
.card h4,
.page-header h2 {
  color: #f8fbff;
}

.page-header h2 {
  font-family: "Space Grotesk", sans-serif;
}

.small,
.metric-label,
.status-pill,
.top-strip,
#global-status,
th {
  font-family: "JetBrains Mono", monospace;
}

table,
td,
.kv-val {
  color: #e1e3e6;
}

th,
.metric-label,
.small,
.kv-key {
  color: #8b8f96;
}

.status-pill,
.mini-btn,
.secondary-btn,
.icon-btn {
  background: rgba(17, 19, 24, 0.96);
  border-color: rgba(36, 40, 48, 0.96);
  color: #e1e3e6;
}

.primary-btn {
  background: linear-gradient(135deg, rgba(0, 217, 255, 0.92), rgba(91, 88, 214, 0.72));
  color: #030508;
}

@media (max-width: 720px) {
  .top-strip {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* High-contrast readability pass for the hosted dark dashboard. */
.brand-overline,
.top-strip-live,
.nav-icon {
  color: #67e8f9;
}

.brand h1,
.nav-btn,
.nav-btn .title,
.sidebar-footer-label,
.page-header h2,
.card h3,
.card h4,
.column h3,
.metric,
#top-strip-time {
  color: #f8fafc;
}

.brand p,
.nav-btn .desc,
.page-header p,
.top-strip-meta,
.metric-label,
.card .small,
.column .small,
.feed-item .meta,
.kv-key,
.muted-inline,
.column-subtitle,
th,
.rr-sub,
.rr-meta,
.rr-proof-list,
.org-role-meta,
.org-role-detail-info p,
.org-dept-subtitle,
.org-stat-label {
  color: #dbeafe;
}

.nav-btn {
  background: rgba(15, 23, 42, 0.68);
  border-color: rgba(148, 163, 184, 0.18);
}

.nav-btn:hover,
.nav-btn.active {
  background: rgba(30, 41, 59, 0.96);
  border-color: rgba(103, 232, 249, 0.42);
}

.sidebar-footer-label {
  font-weight: 800;
  opacity: 1;
}

#global-status {
  display: block;
  padding: 10px 12px;
  border: 1px solid rgba(103, 232, 249, 0.24);
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.92);
  color: #f8fafc;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.top-strip {
  color: #e0f2fe;
}

.status-pill,
.mini-btn,
.secondary-btn,
.icon-btn {
  color: #f8fafc;
}

input,
select,
textarea,
.form-grid input,
.form-grid select,
.form-grid textarea,
.prompt-output {
  background: #f8fafc;
  color: #0f172a;
  border-color: rgba(148, 163, 184, 0.9);
}

input::placeholder,
textarea::placeholder {
  color: #475569;
  opacity: 1;
}

label,
.form-grid label,
.card label span.small,
.checkbox-row span {
  color: #e0f2fe;
}

.task-card {
  color: #0f172a;
}

.task-card .title,
.task-card .small,
.task-card .meta,
.task-card .muted-inline,
.task-card-status,
.task-card-desc {
  color: #334155;
}

.task-card .title {
  color: #0f172a;
}

.empty {
  color: #e0f2fe;
  border-color: rgba(148, 163, 184, 0.36);
}

.task-list .empty {
  background: rgba(15, 23, 42, 0.72);
  color: #e0f2fe;
}

.column-count {
  background: rgba(103, 232, 249, 0.16);
  color: #a5f3fc;
}

/* SecOps Command upgrade: stronger hierarchy, denser analyst panels, clearer data surfaces. */
:root {
  --command-canvas: #030508;
  --command-panel: #0b0d10;
  --command-panel-2: #111827;
  --command-line: rgba(100, 116, 139, 0.36);
  --command-line-strong: rgba(103, 232, 249, 0.38);
  --command-text: #f8fafc;
  --command-subtext: #dbeafe;
  --command-muted: #a8b3c7;
  --command-cyan: #67e8f9;
  --command-amber: #fbbf24;
  --command-red: #fb7185;
  --command-green: #34d399;
}

html,
body {
  background:
    radial-gradient(circle at 18% 0%, rgba(14, 165, 233, 0.16), transparent 34%),
    radial-gradient(circle at 96% 18%, rgba(251, 191, 36, 0.09), transparent 26%),
    linear-gradient(135deg, #030508 0%, #08111f 44%, #030508 100%);
  color: var(--command-text);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(rgba(103, 232, 249, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(103, 232, 249, 0.035) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(180deg, rgba(0,0,0,0.72), rgba(0,0,0,0.16));
}

.app-shell {
  position: relative;
  z-index: 1;
  grid-template-columns: 312px minmax(0, 1fr);
}

.sidebar {
  background:
    linear-gradient(180deg, rgba(3, 5, 8, 0.98), rgba(11, 13, 16, 0.96)),
    radial-gradient(circle at top right, rgba(103, 232, 249, 0.14), transparent 32%);
  border-right: 1px solid var(--command-line);
  padding: 24px 18px;
}

.brand {
  margin-bottom: 22px;
  padding: 14px;
  border: 1px solid rgba(103, 232, 249, 0.18);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.8), rgba(2, 6, 23, 0.42));
}

.brand-badge {
  border-radius: 10px;
  background:
    linear-gradient(135deg, rgba(103, 232, 249, 1), rgba(34, 211, 238, 0.58)),
    #67e8f9;
  color: #020617;
}

.brand-overline {
  color: var(--command-cyan);
  text-shadow: 0 0 18px rgba(103, 232, 249, 0.28);
}

.nav-list {
  gap: 9px;
}

.nav-btn {
  min-height: 72px;
  border-radius: 12px;
  border: 1px solid rgba(100, 116, 139, 0.22);
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.82), rgba(2, 6, 23, 0.52));
  color: var(--command-text);
}

.nav-btn:hover,
.nav-btn.active {
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.22), rgba(15, 23, 42, 0.94));
  border-color: var(--command-line-strong);
  box-shadow: 0 12px 36px rgba(8, 47, 73, 0.34), inset 0 0 0 1px rgba(103, 232, 249, 0.08);
}

.nav-btn .title {
  font-size: 0.82rem;
  color: #ffffff;
}

.nav-btn .desc {
  color: #dbeafe;
  font-size: 0.77rem;
}

.nav-icon {
  border-color: rgba(103, 232, 249, 0.3);
  background: rgba(8, 47, 73, 0.42);
  color: var(--command-cyan);
}

.sidebar-footer {
  border-top-color: rgba(100, 116, 139, 0.3);
}

.main {
  padding: 24px;
  background: linear-gradient(180deg, rgba(3, 7, 18, 0.72), rgba(2, 6, 23, 0.86));
}

.top-strip {
  min-height: 44px;
  border-color: rgba(103, 232, 249, 0.24);
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.92), rgba(8, 47, 73, 0.28));
  box-shadow: 0 16px 44px rgba(2, 6, 23, 0.24);
}

.top-strip-meta,
.page-header p,
.small,
.metric-label,
.column-subtitle,
.kv-key,
.muted-inline {
  color: var(--command-subtext);
}

.page-header {
  padding: 18px 18px 20px;
  border: 1px solid rgba(100, 116, 139, 0.24);
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(15, 23, 42, 0.9), rgba(8, 13, 24, 0.74)),
    radial-gradient(circle at top right, rgba(103, 232, 249, 0.09), transparent 35%);
}

.page-header h2 {
  font-size: clamp(1.65rem, 2.6vw, 2.45rem);
  letter-spacing: -0.04em;
}

.status-pill,
.mini-btn,
.secondary-btn,
.icon-btn {
  border-color: rgba(103, 232, 249, 0.22);
  background: rgba(15, 23, 42, 0.86);
  color: #f8fafc;
}

.status-pill:hover,
.mini-btn:hover {
  border-color: rgba(103, 232, 249, 0.48);
  background: rgba(8, 47, 73, 0.5);
}

.card,
.column,
.modal-card,
.feed-item,
.empty {
  border-radius: 14px;
  border-color: rgba(100, 116, 139, 0.3);
  background:
    linear-gradient(180deg, rgba(15, 23, 42, 0.96), rgba(2, 6, 23, 0.92));
  box-shadow: 0 22px 54px rgba(0, 0, 0, 0.26);
}

.card h3,
.card h4,
.column h3 {
  letter-spacing: 0.01em;
}

.grid.cols-5,
.grid.cols-4 {
  gap: 14px;
}

.metric-card {
  min-height: 118px;
  border-color: rgba(103, 232, 249, 0.18);
}

.metric-card::before {
  height: 2px;
  background: linear-gradient(90deg, rgba(103, 232, 249, 0.88), rgba(251, 191, 36, 0.5), transparent);
}

.metric {
  color: var(--command-text);
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(2rem, 4vw, 3.15rem);
}

#finding-summary {
  grid-template-columns: repeat(auto-fit, minmax(178px, 1fr));
}

#finding-summary .card {
  padding: 16px 18px;
  min-height: 112px;
}

#page-findings > .grid.cols-2 {
  grid-template-columns: minmax(680px, 1.35fr) minmax(420px, 0.75fr);
  align-items: start;
}

#page-findings > .grid.cols-2 > .card {
  min-height: 640px;
}

#findings-table .table-wrap {
  max-height: min(76vh, 860px);
  overflow: auto;
  border: 1px solid rgba(100, 116, 139, 0.32);
  border-radius: 12px;
  background: rgba(2, 6, 23, 0.82);
}

#findings-table table {
  min-width: 1040px;
  border-collapse: separate;
  border-spacing: 0;
}

#findings-table thead th {
  position: sticky;
  top: 0;
  z-index: 3;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(103, 232, 249, 0.22);
  background: rgba(3, 7, 18, 0.98);
  color: #bae6fd;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
}

#findings-table tbody tr {
  background: rgba(15, 23, 42, 0.64);
}

#findings-table tbody tr:nth-child(even) {
  background: rgba(8, 13, 24, 0.74);
}

#findings-table tbody tr:hover,
#findings-table tbody tr.selected-row {
  background: rgba(8, 47, 73, 0.66);
}

#findings-table td {
  padding: 16px 14px;
  border-bottom: 1px solid rgba(100, 116, 139, 0.22);
  color: #f8fafc;
  vertical-align: top;
}

#findings-table td strong {
  color: #ffffff;
  font-size: 0.95rem;
}

#findings-table td .small {
  color: #cbd5e1;
  line-height: 1.5;
}

#findings-table td:nth-child(1) {
  min-width: 280px;
}

#findings-table td:nth-child(4),
#findings-table td:nth-child(5) {
  min-width: 210px;
}

#findings-table td:nth-child(6) {
  min-width: 180px;
}

.badge,
.task-card-status,
.task-card-live,
.status-pill {
  font-family: "JetBrains Mono", monospace;
}

.badge {
  border-color: rgba(103, 232, 249, 0.28);
  background: rgba(8, 47, 73, 0.34);
  color: #e0f2fe;
}

.badge.priority-urgent,
.badge.priority-critical {
  color: #fecdd3;
  border-color: rgba(251, 113, 133, 0.52);
  background: rgba(127, 29, 29, 0.36);
}

.badge.priority-high {
  color: #fde68a;
  border-color: rgba(251, 191, 36, 0.5);
  background: rgba(120, 53, 15, 0.36);
}

.badge.priority-normal,
.badge.priority-low {
  color: #bae6fd;
  border-color: rgba(103, 232, 249, 0.38);
  background: rgba(8, 47, 73, 0.36);
}

.finding-detail-header,
.finding-detail-card,
.action-cluster,
.native-close-panel {
  border-color: rgba(100, 116, 139, 0.26);
}

.detail-summary {
  background: rgba(15, 23, 42, 0.68);
  border-color: rgba(100, 116, 139, 0.28);
  color: #f8fafc;
}

input,
select,
textarea,
.form-grid input,
.form-grid select,
.form-grid textarea,
.prompt-output {
  background: rgba(2, 6, 23, 0.86);
  color: #f8fafc;
  border-color: rgba(148, 163, 184, 0.5);
}

input::placeholder,
textarea::placeholder {
  color: #cbd5e1;
}

select option {
  background: #020617;
  color: #f8fafc;
}

.checkbox-row {
  color: #e0f2fe;
}

.task-card {
  border-color: rgba(148, 163, 184, 0.24);
  background: linear-gradient(180deg, #f8fafc, #e2e8f0);
  color: #0f172a;
}

.task-card:hover {
  border-color: rgba(103, 232, 249, 0.58);
  box-shadow: 0 22px 42px rgba(8, 47, 73, 0.24);
}

.column-head {
  border-bottom-color: rgba(103, 232, 249, 0.18);
  background: rgba(15, 23, 42, 0.96);
}

.column-count {
  background: rgba(103, 232, 249, 0.2);
  color: #e0f2fe;
}

@media (max-width: 1320px) {
  #page-findings > .grid.cols-2 {
    grid-template-columns: 1fr;
  }

  #page-findings > .grid.cols-2 > .card {
    min-height: 0;
  }
}

@media (max-width: 1024px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    height: auto;
    position: static;
  }

  .nav-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .main {
    padding: 14px;
  }

  .nav-list {
    grid-template-columns: 1fr;
  }

  #finding-summary {
    grid-template-columns: 1fr;
  }
}

/* Tasks board refinement: consistent, readable command cards. */
#page-tasks .kanban {
  gap: 18px;
  padding: 4px 4px 18px;
}

#page-tasks .column {
  min-width: 292px;
  padding: 14px;
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(15, 23, 42, 0.94), rgba(2, 6, 23, 0.88));
  border-color: rgba(100, 116, 139, 0.34);
}

#page-tasks .column-head {
  position: sticky;
  top: 0;
  z-index: 4;
  margin: -2px -2px 0;
  padding: 12px 12px 14px;
  border: 1px solid rgba(100, 116, 139, 0.22);
  border-radius: 12px;
  background:
    linear-gradient(135deg, rgba(8, 47, 73, 0.58), rgba(15, 23, 42, 0.98));
}

#page-tasks .column-head h3 {
  color: #ffffff;
  font-size: 0.92rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

#page-tasks .column-subtitle {
  color: #cbd5e1;
  font-size: 0.76rem;
  line-height: 1.35;
}

#page-tasks .column-count {
  min-width: 36px;
  height: 36px;
  border: 1px solid rgba(103, 232, 249, 0.34);
  background: rgba(8, 47, 73, 0.74);
  color: #ffffff;
}

#page-tasks .task-list {
  gap: 14px;
  align-content: start;
}

#page-tasks .task-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 232px;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-left: 4px solid rgba(103, 232, 249, 0.72);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(248, 250, 252, 0.98), rgba(226, 232, 240, 0.96));
  color: #0f172a;
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.24);
}

#page-tasks .task-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: linear-gradient(90deg, rgba(14, 165, 233, 0.92), rgba(103, 232, 249, 0.24));
}

#page-tasks .task-card:hover {
  transform: translateY(-3px);
  border-color: rgba(103, 232, 249, 0.68);
  box-shadow: 0 24px 52px rgba(8, 47, 73, 0.38);
}

#page-tasks .task-card.priority-urgent {
  border-left-color: #fb7185;
}

#page-tasks .task-card.priority-urgent::before {
  background: linear-gradient(90deg, #fb7185, rgba(251, 113, 133, 0.18));
}

#page-tasks .task-card.priority-high {
  border-left-color: #fbbf24;
}

#page-tasks .task-card.priority-high::before {
  background: linear-gradient(90deg, #fbbf24, rgba(251, 191, 36, 0.18));
}

#page-tasks .task-card.priority-low {
  border-left-color: #34d399;
}

#page-tasks .task-card.priority-low::before {
  background: linear-gradient(90deg, #34d399, rgba(52, 211, 153, 0.18));
}

#page-tasks .task-card-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  padding: 18px 16px 10px;
  align-items: start;
}

#page-tasks .task-card .title {
  margin: 0;
  color: #0f172a;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.02rem;
  font-weight: 800;
  line-height: 1.18;
  letter-spacing: -0.015em;
}

#page-tasks .task-card-top-right {
  align-items: flex-end;
  max-width: 112px;
}

#page-tasks .task-card-status,
#page-tasks .task-card-live {
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: rgba(15, 23, 42, 0.08);
  color: #0f172a;
  font-size: 0.66rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

#page-tasks .task-card-desc {
  min-height: 58px;
  margin: 0;
  padding: 0 16px;
  color: #334155;
  font-size: 0.84rem;
  line-height: 1.48;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

#page-tasks .badges {
  min-height: 58px;
  margin: 12px 0 0;
  padding: 0 16px;
  align-content: flex-start;
}

#page-tasks .badge {
  border-color: rgba(15, 23, 42, 0.12);
  background: rgba(15, 23, 42, 0.07);
  color: #1e293b;
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.025em;
}

#page-tasks .badge.domain-exec,
#page-tasks .badge.domain-platform,
#page-tasks .badge.domain-security {
  background: rgba(14, 165, 233, 0.12);
  border-color: rgba(14, 165, 233, 0.22);
  color: #075985;
}

#page-tasks .badge.priority-urgent {
  background: rgba(244, 63, 94, 0.12);
  border-color: rgba(244, 63, 94, 0.28);
  color: #9f1239;
}

#page-tasks .badge.priority-high {
  background: rgba(245, 158, 11, 0.16);
  border-color: rgba(245, 158, 11, 0.34);
  color: #92400e;
}

#page-tasks .badge.priority-normal {
  background: rgba(37, 99, 235, 0.12);
  border-color: rgba(37, 99, 235, 0.26);
  color: #1d4ed8;
}

#page-tasks .badge.priority-low {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.28);
  color: #047857;
}

#page-tasks .task-card > .small:not(.task-card-desc) {
  margin-top: auto;
  padding: 12px 16px 0;
  color: #475569;
  font-size: 0.76rem;
}

#page-tasks .task-card-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
  padding: 12px 16px 16px;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
  background: rgba(15, 23, 42, 0.035);
}

#page-tasks .task-card-actions .mini-btn {
  justify-content: center;
  min-height: 34px;
  padding: 7px 8px;
  border-color: rgba(15, 23, 42, 0.14);
  background: #ffffff;
  color: #0f172a;
  font-size: 0.69rem;
  line-height: 1.15;
  white-space: normal;
}

#page-tasks .task-card-actions .mini-btn:last-child:nth-child(odd) {
  grid-column: 1 / -1;
}

#page-tasks .task-card-actions .mini-btn:hover {
  background: #0f172a;
  border-color: #0f172a;
  color: #f8fafc;
}

#page-tasks .task-list .empty {
  min-height: 128px;
  display: grid;
  place-items: center;
  padding: 18px;
  border-style: solid;
  color: #dbeafe;
  text-align: center;
}

@media (max-width: 980px) {
  #page-tasks .column {
    min-width: 270px;
  }

  #page-tasks .task-card {
    min-height: 210px;
  }
}

/* Kimi-inspired task-card palette correction: no washed-out cards, only signal colors. */
#page-tasks .column {
  background:
    linear-gradient(180deg, rgba(11, 13, 16, 0.98), rgba(5, 7, 10, 0.96));
  border-color: rgba(36, 40, 48, 0.96);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03), 0 18px 44px rgba(0, 0, 0, 0.32);
}

#page-tasks .column-head {
  background:
    linear-gradient(180deg, rgba(17, 19, 24, 0.98), rgba(11, 13, 16, 0.96));
  border-color: rgba(74, 78, 85, 0.58);
}

#page-tasks .column-inbox .column-head,
#page-tasks .column-planned .column-head,
#page-tasks .column-in_progress .column-head {
  box-shadow: inset 3px 0 0 #00d9ff;
}

#page-tasks .column-review .column-head {
  box-shadow: inset 3px 0 0 #ffb627;
}

#page-tasks .column-blocked .column-head {
  box-shadow: inset 3px 0 0 #ff2a2a;
}

#page-tasks .column-done .column-head {
  box-shadow: inset 3px 0 0 #36b37e;
}

#page-tasks .task-card {
  min-height: 224px;
  border: 1px solid rgba(36, 40, 48, 0.96);
  border-left: 3px solid #00d9ff;
  background:
    linear-gradient(180deg, rgba(17, 19, 24, 0.99), rgba(11, 13, 16, 0.98));
  color: #e1e3e6;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.36);
}

#page-tasks .task-card::before {
  height: 1px;
  background: linear-gradient(90deg, rgba(0, 217, 255, 0.62), rgba(0, 217, 255, 0.08), transparent);
}

#page-tasks .task-card:hover {
  background:
    linear-gradient(180deg, rgba(26, 29, 35, 0.99), rgba(11, 13, 16, 0.98));
  border-color: rgba(0, 217, 255, 0.48);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.46), 0 0 0 1px rgba(0, 217, 255, 0.08);
}

#page-tasks .task-card.priority-urgent {
  border-left-color: #ff2a2a;
}

#page-tasks .task-card.priority-urgent::before {
  background: linear-gradient(90deg, rgba(255, 42, 42, 0.72), rgba(255, 42, 42, 0.1), transparent);
}

#page-tasks .task-card.priority-high {
  border-left-color: #ffb627;
}

#page-tasks .task-card.priority-high::before {
  background: linear-gradient(90deg, rgba(255, 182, 39, 0.72), rgba(255, 182, 39, 0.1), transparent);
}

#page-tasks .task-card.priority-low {
  border-left-color: #36b37e;
}

#page-tasks .task-card.priority-low::before {
  background: linear-gradient(90deg, rgba(54, 179, 126, 0.72), rgba(54, 179, 126, 0.1), transparent);
}

#page-tasks .task-card .title {
  color: #f8fbff;
}

#page-tasks .task-card-desc,
#page-tasks .task-card .small,
#page-tasks .task-card .meta,
#page-tasks .task-card .muted-inline {
  color: #b8c2d6;
}

#page-tasks .task-card > .small:not(.task-card-desc) {
  color: #8b8f96;
}

#page-tasks .task-card-status,
#page-tasks .task-card-live {
  border-color: rgba(74, 78, 85, 0.72);
  background: rgba(3, 5, 8, 0.72);
  color: #e1e3e6;
}

#page-tasks .task-card-live.queued,
#page-tasks .task-card-live.picked_up,
#page-tasks .task-card-live.running {
  border-color: rgba(0, 217, 255, 0.38);
  background: rgba(0, 217, 255, 0.12);
  color: #7ee9ff;
}

#page-tasks .task-card-live.needs_review,
#page-tasks .task-card-live.completed_with_gaps {
  border-color: rgba(255, 182, 39, 0.42);
  background: rgba(255, 182, 39, 0.12);
  color: #ffd166;
}

#page-tasks .task-card-live.failed,
#page-tasks .task-card-live.cancelled {
  border-color: rgba(255, 42, 42, 0.42);
  background: rgba(255, 42, 42, 0.12);
  color: #ff8a8a;
}

#page-tasks .task-card-live.completed {
  border-color: rgba(54, 179, 126, 0.42);
  background: rgba(54, 179, 126, 0.12);
  color: #8df0c1;
}

#page-tasks .badge {
  border-color: rgba(74, 78, 85, 0.76);
  background: rgba(5, 7, 10, 0.72);
  color: #cbd5e1;
}

#page-tasks .badge.domain-exec,
#page-tasks .badge.domain-platform,
#page-tasks .badge.domain-security {
  border-color: rgba(0, 217, 255, 0.32);
  background: rgba(0, 217, 255, 0.1);
  color: #9ff2ff;
}

#page-tasks .badge.external,
#page-tasks .badge.priority-high {
  border-color: rgba(255, 182, 39, 0.38);
  background: rgba(255, 182, 39, 0.12);
  color: #ffd166;
}

#page-tasks .badge.review,
#page-tasks .badge.priority-urgent {
  border-color: rgba(255, 42, 42, 0.38);
  background: rgba(255, 42, 42, 0.12);
  color: #ff9a9a;
}

#page-tasks .badge.priority-normal {
  border-color: rgba(0, 217, 255, 0.32);
  background: rgba(0, 217, 255, 0.1);
  color: #9ff2ff;
}

#page-tasks .badge.priority-low {
  border-color: rgba(54, 179, 126, 0.38);
  background: rgba(54, 179, 126, 0.12);
  color: #9af2ca;
}

#page-tasks .task-card-actions {
  border-top-color: rgba(74, 78, 85, 0.42);
  background: rgba(3, 5, 8, 0.34);
}

#page-tasks .task-card-actions .mini-btn {
  border-color: rgba(74, 78, 85, 0.86);
  background: rgba(11, 13, 16, 0.94);
  color: #e1e3e6;
}

#page-tasks .task-card-actions .mini-btn:hover {
  border-color: rgba(0, 217, 255, 0.6);
  background: rgba(0, 217, 255, 0.12);
  color: #ffffff;
}

/* Full-dashboard command surface pass: apply the same readable SecOps Command style everywhere. */
:root {
  --signal-canvas: #030508;
  --signal-panel: #0b0d10;
  --signal-panel-2: #111318;
  --signal-panel-3: #1a1d23;
  --signal-panel-4: #242830;
  --signal-line: rgba(74, 78, 85, 0.72);
  --signal-line-soft: rgba(74, 78, 85, 0.42);
  --signal-line-bright: rgba(0, 217, 255, 0.42);
  --signal-text: #e1e3e6;
  --signal-text-strong: #f8fbff;
  --signal-muted: #b8c2d6;
  --signal-muted-2: #8b8f96;
  --signal-cyan: #00d9ff;
  --signal-cyan-soft: rgba(0, 217, 255, 0.12);
  --signal-amber: #ffb627;
  --signal-amber-soft: rgba(255, 182, 39, 0.14);
  --signal-red: #ff2a2a;
  --signal-red-soft: rgba(255, 42, 42, 0.14);
  --signal-green: #36b37e;
  --signal-green-soft: rgba(54, 179, 126, 0.14);
}

html,
body {
  background:
    radial-gradient(circle at 14% 0%, rgba(0, 217, 255, 0.14), transparent 28%),
    radial-gradient(circle at 96% 12%, rgba(255, 182, 39, 0.1), transparent 24%),
    radial-gradient(circle at 58% 100%, rgba(54, 179, 126, 0.08), transparent 26%),
    linear-gradient(135deg, var(--signal-canvas) 0%, #070b10 46%, var(--signal-canvas) 100%);
  color: var(--signal-text);
}

body::before {
  background:
    linear-gradient(rgba(0, 217, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 217, 255, 0.035) 1px, transparent 1px),
    radial-gradient(circle at 20% 8%, rgba(0, 217, 255, 0.08), transparent 24%);
  background-size: 48px 48px, 48px 48px, auto;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.12));
  opacity: 1;
}

body::after {
  background:
    radial-gradient(circle at 50% 0%, rgba(0, 217, 255, 0.08), transparent 24%),
    radial-gradient(circle at 100% 18%, rgba(255, 182, 39, 0.05), transparent 22%);
  mix-blend-mode: screen;
  opacity: 1;
}

.app-shell {
  grid-template-columns: 312px minmax(0, 1fr);
}

.main {
  background:
    linear-gradient(180deg, rgba(11, 13, 16, 0.78), rgba(3, 5, 8, 0.92));
}

.sidebar {
  background:
    radial-gradient(circle at top right, rgba(0, 217, 255, 0.12), transparent 30%),
    linear-gradient(180deg, rgba(5, 7, 10, 0.99), rgba(11, 13, 16, 0.98));
  border-right-color: rgba(74, 78, 85, 0.62);
}

.brand {
  border-color: rgba(0, 217, 255, 0.2);
  background:
    linear-gradient(135deg, rgba(17, 19, 24, 0.96), rgba(11, 13, 16, 0.78)),
    radial-gradient(circle at top right, rgba(0, 217, 255, 0.12), transparent 36%);
}

.brand-badge {
  background:
    linear-gradient(135deg, rgba(0, 217, 255, 0.98), rgba(54, 179, 126, 0.72));
  color: #030508;
}

.brand-overline,
.top-strip-live,
.nav-icon,
.detail-eyebrow {
  color: var(--signal-cyan);
}

.nav-btn {
  border-color: rgba(74, 78, 85, 0.44);
  background:
    linear-gradient(135deg, rgba(17, 19, 24, 0.9), rgba(11, 13, 16, 0.68));
}

.nav-btn:hover,
.nav-btn.active {
  border-color: rgba(0, 217, 255, 0.42);
  background:
    linear-gradient(135deg, rgba(0, 217, 255, 0.14), rgba(17, 19, 24, 0.98));
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.32), inset 2px 0 0 var(--signal-cyan);
}

.nav-btn .title,
.brand h1,
.page-header h2,
.card h3,
.card h4,
.column h3,
.metric,
table strong,
.feed-item strong,
.action-cluster-label,
.kv-val,
.rr-proof-list strong,
label,
.form-grid label {
  color: var(--signal-text-strong);
}

.brand p,
.nav-btn .desc,
.page-header p,
.small,
.metric-label,
.feed-item .meta,
.kv-key,
.muted-inline,
.column-subtitle,
.rr-sub,
.rr-meta,
.rr-proof-list,
.org-role-meta,
.org-role-detail-info p,
.org-dept-subtitle,
.org-stat-label,
th {
  color: var(--signal-muted);
}

.top-strip,
.page-header,
.card,
.column,
.modal-card,
.feed-item,
.empty,
.table-wrap,
.detail-summary,
.status-pill,
.mini-btn,
.secondary-btn,
.icon-btn,
.prompt-output {
  border-color: var(--signal-line-soft);
  background:
    linear-gradient(180deg, rgba(17, 19, 24, 0.98), rgba(11, 13, 16, 0.96));
  color: var(--signal-text);
  box-shadow: 0 20px 54px rgba(0, 0, 0, 0.3);
}

.page-header {
  position: relative;
  overflow: hidden;
  margin-bottom: 20px;
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(17, 19, 24, 0.98), rgba(5, 7, 10, 0.9)),
    radial-gradient(circle at top right, rgba(0, 217, 255, 0.12), transparent 36%);
}

.page-header::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  background: linear-gradient(90deg, rgba(0, 217, 255, 0.72), rgba(255, 182, 39, 0.34), transparent);
}

.top-strip {
  border-color: rgba(0, 217, 255, 0.24);
  background:
    linear-gradient(90deg, rgba(17, 19, 24, 0.96), rgba(0, 217, 255, 0.08), rgba(17, 19, 24, 0.9));
}

.top-strip-meta,
#global-status {
  color: var(--signal-text);
}

#global-status {
  border-color: rgba(0, 217, 255, 0.26);
  background: rgba(3, 5, 8, 0.72);
}

.dot {
  background: var(--signal-green);
  box-shadow: 0 0 0 4px rgba(54, 179, 126, 0.14), 0 0 18px rgba(54, 179, 126, 0.32);
}

.status-pill {
  min-height: 38px;
  border-color: rgba(0, 217, 255, 0.28);
  background:
    linear-gradient(180deg, rgba(17, 19, 24, 0.98), rgba(3, 5, 8, 0.82));
}

.status-pill:hover,
.mini-btn:hover,
.secondary-btn:hover,
.icon-btn:hover {
  border-color: rgba(0, 217, 255, 0.58);
  background: rgba(0, 217, 255, 0.12);
  color: #ffffff;
}

.primary-btn {
  border: 1px solid rgba(0, 217, 255, 0.55);
  background: linear-gradient(135deg, var(--signal-cyan), rgba(54, 179, 126, 0.86));
  color: #030508;
  font-weight: 800;
  box-shadow: 0 18px 42px rgba(0, 217, 255, 0.16);
}

.danger-btn {
  border-color: rgba(255, 42, 42, 0.46);
  background: rgba(255, 42, 42, 0.12);
  color: #ff9a9a;
}

.mini-btn {
  border-color: rgba(74, 78, 85, 0.86);
  background: rgba(11, 13, 16, 0.94);
  color: var(--signal-text);
  font-family: "JetBrains Mono", monospace;
  letter-spacing: 0.01em;
}

.card {
  position: relative;
  overflow: hidden;
}

.card::before,
.feed-item::before,
.modal-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  background: linear-gradient(90deg, rgba(0, 217, 255, 0.36), rgba(0, 217, 255, 0.06), transparent);
  pointer-events: none;
}

.metric-card,
#mission-stats .card,
#finding-summary .card,
#integration-summary .card {
  min-height: 126px;
  border-color: rgba(0, 217, 255, 0.18);
  background:
    linear-gradient(180deg, rgba(17, 19, 24, 0.99), rgba(11, 13, 16, 0.96));
}

.metric-card:hover,
#mission-stats .card:hover,
#finding-summary .card:hover,
#integration-summary .card:hover {
  transform: translateY(-2px);
  border-color: rgba(0, 217, 255, 0.46);
  box-shadow: 0 24px 58px rgba(0, 0, 0, 0.42), 0 0 0 1px rgba(0, 217, 255, 0.08);
}

.metric-card::before,
#mission-stats .card::before,
#finding-summary .card::before,
#integration-summary .card::before {
  height: 2px;
  background: linear-gradient(90deg, rgba(0, 217, 255, 0.82), rgba(255, 182, 39, 0.42), transparent);
}

.metric {
  color: var(--signal-text-strong);
  text-shadow: 0 0 24px rgba(0, 217, 255, 0.12);
}

#mission-overview {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

#mission-events,
#mission-runs {
  max-height: 560px;
  overflow: auto;
  padding-right: 2px;
}

.feed-item {
  position: relative;
  border-left-color: var(--signal-cyan);
  background:
    linear-gradient(180deg, rgba(11, 13, 16, 0.98), rgba(17, 19, 24, 0.94));
}

.compact-feed-item {
  border-radius: 12px;
  margin-bottom: 10px;
}

.empty,
.compact-empty {
  border-style: dashed;
  border-color: rgba(0, 217, 255, 0.22);
  background:
    repeating-linear-gradient(135deg, rgba(0, 217, 255, 0.035) 0 8px, transparent 8px 16px),
    linear-gradient(180deg, rgba(11, 13, 16, 0.94), rgba(17, 19, 24, 0.9));
  color: var(--signal-muted);
}

.kv-list {
  gap: 8px;
}

.kv-row {
  align-items: flex-start;
  border-top-color: rgba(74, 78, 85, 0.34);
  padding: 10px 0 0;
}

.kv-key {
  flex: 0 0 auto;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.76rem;
  letter-spacing: 0.02em;
}

.kv-val {
  min-width: 0;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.78rem;
  line-height: 1.45;
}

.detail-eyebrow {
  border: 1px solid rgba(0, 217, 255, 0.26);
  background: rgba(0, 217, 255, 0.1);
  font-family: "JetBrains Mono", monospace;
}

.finding-detail-header {
  padding: 14px;
  border: 1px solid rgba(74, 78, 85, 0.38);
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(17, 19, 24, 0.96), rgba(3, 5, 8, 0.8));
}

.finding-meta-line {
  color: var(--signal-muted);
}

.finding-meta-line span:not(:last-child)::after {
  color: rgba(0, 217, 255, 0.34);
}

.detail-status-stack {
  min-width: 160px;
}

.finding-detail-grid {
  gap: 14px;
}

.finding-detail-card {
  border-color: rgba(74, 78, 85, 0.42);
  background:
    linear-gradient(180deg, rgba(17, 19, 24, 0.98), rgba(11, 13, 16, 0.96));
}

.detail-summary {
  border-color: rgba(0, 217, 255, 0.18);
  background:
    linear-gradient(180deg, rgba(3, 5, 8, 0.86), rgba(11, 13, 16, 0.72));
  color: var(--signal-text);
}

.action-cluster,
.native-close-panel {
  border-top-color: rgba(0, 217, 255, 0.18);
}

.native-close-grid {
  grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
}

#finding-summary,
#integration-summary,
#mission-stats {
  grid-template-columns: repeat(auto-fit, minmax(174px, 1fr));
}

#page-findings > .grid.cols-2 {
  grid-template-columns: minmax(680px, 1.25fr) minmax(430px, 0.75fr);
  align-items: start;
}

#page-findings > .grid.cols-2 > .card,
#page-integrations > .card,
#mission-overview > .card,
#page-mission-control > .grid.cols-2 > .card {
  border-color: rgba(74, 78, 85, 0.48);
}

#page-findings > .grid.cols-2 > .card > h3,
#page-integrations > .card h3,
#mission-overview > .card h3,
#page-mission-control > .grid.cols-2 > .card h3 {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 16px;
}

#page-findings > .grid.cols-2 > .card > h3::before,
#page-integrations > .card h3::before,
#mission-overview > .card h3::before,
#page-mission-control > .grid.cols-2 > .card h3::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--signal-cyan);
  box-shadow: 0 0 16px rgba(0, 217, 255, 0.48);
}

.table-wrap,
#findings-table .table-wrap,
#run-requests-table .table-wrap,
#native-sessions-table .table-wrap,
#routes-table .table-wrap {
  overflow: auto;
  border: 1px solid rgba(74, 78, 85, 0.54);
  border-radius: 14px;
  background: rgba(3, 5, 8, 0.76);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03), 0 18px 46px rgba(0, 0, 0, 0.28);
}

table {
  border-collapse: separate;
  border-spacing: 0;
}

thead th {
  position: sticky;
  top: 0;
  z-index: 3;
  border-bottom: 1px solid rgba(0, 217, 255, 0.2);
  background: rgba(3, 5, 8, 0.98);
  color: #9ff2ff;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
}

td {
  border-bottom-color: rgba(74, 78, 85, 0.28);
  color: var(--signal-text);
  vertical-align: top;
}

tbody tr {
  background: rgba(17, 19, 24, 0.68);
}

tbody tr:nth-child(even) {
  background: rgba(11, 13, 16, 0.82);
}

tbody tr:hover,
.finding-row:hover,
.selected-row {
  background: rgba(0, 217, 255, 0.1);
}

td .small,
td .muted-inline,
.rr-result {
  color: var(--signal-muted);
  line-height: 1.5;
}

#findings-table table,
#run-requests-table table,
#native-sessions-table table,
#routes-table table {
  min-width: 940px;
}

#findings-table .task-card-actions,
#run-requests-table .task-card-actions,
#native-sessions-table .task-card-actions,
#native-session-detail .task-card-actions,
#intel-summary .task-card-actions {
  gap: 7px;
  align-items: center;
}

#findings-table .mini-btn,
#run-requests-table .mini-btn,
#native-sessions-table .mini-btn,
#native-session-detail .mini-btn,
#intel-summary .mini-btn {
  min-height: 32px;
  padding: 7px 10px;
  border-radius: 9px;
  white-space: normal;
}

#integration-summary {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

#integration-summary .card:nth-child(3),
#integration-summary .card:nth-child(6) {
  border-color: rgba(255, 182, 39, 0.28);
}

#integration-summary .card:nth-child(3)::before,
#integration-summary .card:nth-child(6)::before {
  background: linear-gradient(90deg, rgba(255, 182, 39, 0.76), rgba(255, 182, 39, 0.08), transparent);
}

#integration-config {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

#integration-config .card {
  min-height: 278px;
}

#native-session-detail > .finding-detail-card {
  padding: 0;
}

#native-session-detail > .finding-detail-card > .finding-detail-header {
  margin-bottom: 14px;
}

#native-session-detail .finding-detail-grid,
#intel-summary .finding-detail-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

#intel-summary > .finding-detail-header {
  margin-bottom: 14px;
}

#intel-summary .card[style],
#native-session-detail .card[style] {
  background:
    linear-gradient(180deg, rgba(17, 19, 24, 0.99), rgba(11, 13, 16, 0.96)) !important;
  border-color: rgba(74, 78, 85, 0.46) !important;
}

.badge {
  border-color: rgba(0, 217, 255, 0.28);
  background: rgba(0, 217, 255, 0.1);
  color: #9ff2ff;
  font-family: "JetBrains Mono", monospace;
}

.badge.priority-urgent,
.badge.priority-critical,
.status-pill.status-failed,
.status-pill.status-blocked {
  border-color: rgba(255, 42, 42, 0.42);
  background: var(--signal-red-soft);
  color: #ff9a9a;
}

.badge.priority-high,
.status-pill.status-review,
.status-pill.status-needs_review,
.status-pill.status-needs-review,
.status-pill.status-open {
  border-color: rgba(255, 182, 39, 0.42);
  background: var(--signal-amber-soft);
  color: #ffd166;
}

.status-pill.status-completed,
.status-pill.status-completed_with_gaps,
.status-pill.status-completed-with-gaps,
.status-pill.status-resolved,
.status-pill.status-closed,
.status-pill.status-done {
  border-color: rgba(54, 179, 126, 0.42);
  background: var(--signal-green-soft);
  color: #9af2ca;
}

.status-pill.status-queued,
.status-pill.status-running,
.status-pill.status-picked_up,
.status-pill.status-picked-up,
.badge.priority-normal,
.badge.priority-low {
  border-color: rgba(0, 217, 255, 0.36);
  background: var(--signal-cyan-soft);
  color: #9ff2ff;
}

input,
select,
textarea,
.form-grid input,
.form-grid select,
.form-grid textarea,
.prompt-output {
  border-color: rgba(74, 78, 85, 0.86);
  background: rgba(3, 5, 8, 0.86);
  color: var(--signal-text-strong);
  caret-color: var(--signal-cyan);
}

input:focus,
select:focus,
textarea:focus,
.form-grid input:focus,
.form-grid select:focus,
.form-grid textarea:focus,
.prompt-output:focus {
  outline: none;
  border-color: rgba(0, 217, 255, 0.62);
  box-shadow: 0 0 0 3px rgba(0, 217, 255, 0.12);
}

input::placeholder,
textarea::placeholder {
  color: var(--signal-muted-2);
}

select option {
  background: #030508;
  color: var(--signal-text-strong);
}

label span,
.form-grid label span,
.card label span.small,
.checkbox-row span {
  color: var(--signal-muted);
}

.modal {
  background:
    radial-gradient(circle at top, rgba(0, 217, 255, 0.14), transparent 36%),
    rgba(3, 5, 8, 0.76);
}

.modal-card {
  position: relative;
  border-color: rgba(0, 217, 255, 0.24);
  background:
    linear-gradient(180deg, rgba(17, 19, 24, 0.99), rgba(5, 7, 10, 0.98));
}

.modal-head {
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(74, 78, 85, 0.38);
}

.modal-head h3 {
  color: var(--signal-text-strong);
}

.form-grid {
  gap: 16px;
}

.modal-actions {
  padding-top: 16px;
  border-top: 1px solid rgba(74, 78, 85, 0.32);
}

.prompt-output {
  min-height: 260px;
  font-family: "JetBrains Mono", monospace;
  line-height: 1.55;
}

.checkbox-row input {
  accent-color: var(--signal-cyan);
}

#page-tasks .grid.cols-4 .card,
#page-tasks .small + .grid.cols-4 .card {
  min-height: 108px;
}

#page-tasks > .small,
#page-tasks .small[style*="margin-top:14px"] {
  display: block;
  padding: 12px 14px;
  border: 1px solid rgba(0, 217, 255, 0.18);
  border-radius: 12px;
  background: rgba(3, 5, 8, 0.42);
  color: var(--signal-muted);
}

::-webkit-scrollbar {
  width: 11px;
  height: 11px;
}

::-webkit-scrollbar-track {
  background: rgba(3, 5, 8, 0.86);
}

::-webkit-scrollbar-thumb {
  border: 3px solid rgba(3, 5, 8, 0.86);
  border-radius: 999px;
  background: rgba(0, 217, 255, 0.38);
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 217, 255, 0.62);
}

@media (max-width: 1320px) {
  #page-findings > .grid.cols-2,
  #native-session-detail .finding-detail-grid,
  #intel-summary .finding-detail-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1024px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
  }

  .nav-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .main {
    padding: 14px;
  }

  .page-header {
    padding: 16px;
  }

  .nav-list,
  #finding-summary,
  #integration-summary,
  #mission-stats,
  #integration-config,
  .native-close-grid {
    grid-template-columns: 1fr;
  }

  .table-wrap,
  #findings-table .table-wrap,
  #run-requests-table .table-wrap,
  #native-sessions-table .table-wrap,
  #routes-table .table-wrap {
    max-width: calc(100vw - 28px);
  }

  .modal-actions,
  .modal-actions-right {
    align-items: stretch;
    flex-direction: column;
  }
}

/* Blog Ops control plane */
.blog-auth-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 520px);
  gap: 18px;
  align-items: center;
}
.blog-auth-controls,
.blog-actions,
.blog-preview-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: end;
}
.blog-actions label {
  width: 110px;
  display: grid;
  gap: 8px;
}
.blog-filter-label {
  min-width: 180px;
  display: grid;
  gap: 8px;
}
.blog-draft-list {
  display: grid;
  gap: 12px;
  max-height: 720px;
  overflow: auto;
  padding-right: 4px;
}
.blog-draft-card {
  width: 100%;
  text-align: left;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255,255,255,0.96), rgba(248,250,252,0.94));
  padding: 16px;
  cursor: pointer;
  color: var(--text);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
  transition: transform 0.14s ease, border-color 0.14s ease, box-shadow 0.14s ease;
}
.blog-draft-card:hover,
.blog-draft-card.selected-row {
  transform: translateY(-1px);
  border-color: rgba(15,157,182,0.32);
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.1);
}
.blog-draft-card h4 {
  margin: 12px 0 8px;
  font-size: 1rem;
}
.blog-draft-card p {
  margin: 0;
  color: #334155;
  line-height: 1.5;
}
.blog-draft-topline,
.blog-draft-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  color: #475569;
  font-size: 0.82rem;
}
.blog-draft-meta {
  margin-top: 12px;
  justify-content: space-between;
}
.readiness-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border: 1px solid rgba(15, 23, 42, 0.1);
  color: #164e63;
  background: rgba(236, 254, 255, 0.95);
}
.readiness-pill.blocked {
  color: #991b1b;
  background: rgba(254, 226, 226, 0.95);
  border-color: rgba(248, 113, 113, 0.38);
}
.readiness-pill.needs-edits {
  color: #92400e;
  background: rgba(254, 243, 199, 0.95);
  border-color: rgba(245, 158, 11, 0.35);
}
.readiness-pill.ready-to-review {
  color: #065f46;
  background: rgba(209, 250, 229, 0.95);
  border-color: rgba(16, 185, 129, 0.35);
}
.readiness-pill.not-scored {
  color: #475569;
  background: rgba(241, 245, 249, 0.98);
  border-color: rgba(100, 116, 139, 0.32);
}
.blog-preview-status-stack {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}
.blog-extracted-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.blog-extracted-grid > div {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px;
  background: rgba(255,255,255,0.9);
  color: var(--text);
}
.blog-field-label {
  display: block;
  margin-bottom: 8px;
  color: #0f172a;
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.blog-empty-value {
  display: inline-flex;
  margin-top: 2px;
  border: 1px dashed rgba(100, 116, 139, 0.38);
  border-radius: 10px;
  padding: 7px 9px;
  background: rgba(248, 250, 252, 0.92);
  color: #334155;
  font-size: 0.84rem;
  font-weight: 800;
}
.blog-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.mini-chip {
  display: inline-flex;
  border-radius: 999px;
  padding: 5px 8px;
  background: rgba(15, 23, 42, 0.06);
  color: var(--text);
  font-size: 0.75rem;
  font-weight: 700;
}
.blog-blocker-list,
.blog-checklist {
  margin: 8px 0 0;
  padding-left: 18px;
  color: var(--text);
}
.blog-checklist li {
  margin: 6px 0;
}
.blog-checklist em {
  margin-left: 8px;
  color: #475569;
  font-style: normal;
  font-size: 0.78rem;
}
.blog-reference-list {
  display: grid;
  gap: 8px;
  word-break: break-word;
}
.blog-reference-list a {
  color: #0369a1;
  font-size: 0.88rem;
  font-weight: 750;
}
.blog-source-media-panel {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 16px;
  background: rgba(248, 250, 252, 0.9);
}
.blog-media-attached,
.blog-source-media-candidates {
  display: grid;
  gap: 8px;
}
.blog-source-media-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.08);
}
.blog-source-media-url {
  color: #334155;
  font-size: 0.82rem;
  font-weight: 750;
  overflow-wrap: anywhere;
}
.blog-source-media-custom {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr) auto;
  gap: 10px;
  align-items: center;
}
.blog-preview-body {
  white-space: pre-wrap;
  overflow: auto;
  max-height: 420px;
  padding: 16px;
  border-radius: 16px;
  border: 1px solid rgba(15,23,42,0.08);
  background: #0f172a;
  color: #dbeafe;
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.84rem;
  line-height: 1.55;
}
.blog-review-note {
  display: grid;
  gap: 8px;
  margin-top: 16px;
}
.blog-publish-ready-callout {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  background: rgba(248, 250, 252, 0.9);
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.45;
}
.blog-publish-ready-callout.ready {
  border-color: rgba(16, 185, 129, 0.3);
  background: rgba(236, 253, 245, 0.92);
  color: #047857;
}
.campaign-action-hint {
  margin: -2px 0 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(248, 250, 252, 0.82);
  border: 1px solid rgba(15, 23, 42, 0.08);
}
.research-recommendation {
  display: grid;
  gap: 14px;
  margin-top: 16px;
  padding: 16px;
  border: 1px solid rgba(14, 116, 144, 0.32);
  border-radius: 16px;
  background: rgba(240, 249, 255, 0.72);
}
.research-recommendation.dismissed {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  border-style: dashed;
  opacity: 0.88;
}
.research-recommendation-header,
.research-recommendation-draft,
.research-recommendation-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}
.research-recommendation-header h4 {
  margin: 3px 0 5px;
}
.research-recommendation-header > div:first-child {
  min-width: min(100%, 520px);
  flex: 1 1 480px;
}
.research-recommendation-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.research-recommendation-summary > div {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid rgba(14, 116, 144, 0.18);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.66);
}
.research-recommendation-summary strong {
  overflow-wrap: anywhere;
}
.research-recommendation-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.research-recommendation-columns > div {
  min-width: 0;
}
.research-recommendation-columns h5 {
  margin: 0 0 7px;
  font-size: 0.84rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.research-recommendation-list {
  display: grid;
  gap: 6px;
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.45;
}
.research-recommendation-draft {
  align-items: end;
  padding-top: 12px;
  border-top: 1px solid rgba(14, 116, 144, 0.18);
}
.research-recommendation-draft > div:first-child {
  min-width: min(100%, 360px);
  flex: 1 1 420px;
}
.research-recommendation-draft strong,
.research-recommendation-draft p {
  display: block;
  overflow-wrap: anywhere;
}
.research-recommendation-actions {
  justify-content: flex-start;
}
.research-recommendation-link-select {
  display: grid;
  gap: 5px;
  min-width: min(100%, 250px);
}
.research-recommendation-link-select select {
  max-width: 360px;
}
.research-recommendation-safety {
  margin: 0;
  color: var(--muted);
}
.research-recommendation.create_draft_case {
  border-color: rgba(16, 185, 129, 0.42);
  background: rgba(236, 253, 245, 0.76);
}
.research-recommendation.needs_human_review {
  border-color: rgba(245, 158, 11, 0.42);
  background: rgba(255, 251, 235, 0.78);
}
.research-recommendation.keep_in_triage {
  border-color: rgba(100, 116, 139, 0.34);
}
@media (max-width: 760px) {
  .research-recommendation-summary,
  .research-recommendation-columns {
    grid-template-columns: 1fr;
  }
  .research-recommendation.dismissed {
    grid-template-columns: 1fr;
  }
}
.blog-edit-modal-card {
  max-width: min(1120px, calc(100vw - 28px));
  max-height: calc(100vh - 40px);
  overflow: auto;
}
.blog-edit-body {
  min-height: 360px;
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  line-height: 1.55;
}
.blog-metric-card .metric {
  font-size: 1.6rem;
}
.empty-state {
  padding: 18px;
  border: 1px dashed var(--border-strong);
  border-radius: 16px;
  color: var(--muted);
  background: rgba(255,255,255,0.68);
}

/* Triage Ops supply-chain control plane */
#page-triage-ops {
  --triage-panel: rgba(11, 13, 16, 0.97);
  --triage-panel-2: rgba(17, 19, 24, 0.96);
  --triage-panel-3: rgba(26, 29, 35, 0.92);
  --triage-line: rgba(97, 112, 132, 0.46);
  --triage-line-strong: rgba(0, 217, 255, 0.42);
  --triage-text: #edf7ff;
  --triage-muted: #b9c7d9;
  --triage-subtle: #93a4b8;
}

#page-triage-ops .page-header,
#page-triage-ops .card,
#page-triage-ops .campaign-research-card,
#page-triage-ops .campaign-list-field,
#page-triage-ops .campaign-json-box,
#page-triage-ops .campaign-discovery-box,
#page-triage-ops .campaign-result-section,
#page-triage-ops .campaign-package-row,
#page-triage-ops .campaign-candidate-card,
#page-triage-ops .research-recommendation,
#page-triage-ops .research-recommendation-summary > div,
#page-triage-ops .triage-output,
#page-triage-ops .evidence-score-card,
#page-triage-ops .evidence-row,
#page-triage-ops .score-breakdown-row {
  border-color: var(--triage-line);
  background:
    radial-gradient(circle at top right, rgba(0, 217, 255, 0.08), transparent 34%),
    linear-gradient(180deg, var(--triage-panel-2), var(--triage-panel));
  color: var(--triage-text);
}

#page-triage-ops .small,
#page-triage-ops .metric-label,
#page-triage-ops .triage-rationale,
#page-triage-ops .research-recommendation-safety,
#page-triage-ops .research-recommendation-list,
#page-triage-ops .kv-key,
#page-triage-ops .campaign-result-section p,
#page-triage-ops .evidence-score-card span,
#page-triage-ops .score-breakdown-row p,
#page-triage-ops .campaign-candidate-card .small {
  color: var(--triage-muted);
}

#page-triage-ops h3,
#page-triage-ops h4,
#page-triage-ops h5,
#page-triage-ops strong,
#page-triage-ops label,
#page-triage-ops .metric,
#page-triage-ops .kv-val,
#page-triage-ops .campaign-table th,
#page-triage-ops .campaign-table td,
#page-triage-ops .evidence-score-card strong,
#page-triage-ops .evidence-row strong,
#page-triage-ops .score-breakdown-row strong {
  color: var(--triage-text);
}

#page-triage-ops input,
#page-triage-ops select,
#page-triage-ops textarea {
  border-color: rgba(97, 112, 132, 0.72);
  background: rgba(3, 5, 8, 0.88);
  color: var(--triage-text);
}

#page-triage-ops input::placeholder,
#page-triage-ops textarea::placeholder {
  color: var(--triage-subtle);
}

#page-triage-ops .campaign-table {
  background: rgba(11, 13, 16, 0.94);
}

#page-triage-ops .campaign-table th,
#page-triage-ops .campaign-table td {
  border-bottom-color: rgba(97, 112, 132, 0.32);
}

.triage-ops-stats-grid {
  margin-top: 18px;
}

.triage-ops-layout {
  margin-top: 18px;
  grid-template-columns: minmax(320px, 0.88fr) minmax(420px, 1.12fr);
  align-items: start;
}

.triage-alerts-panel,
.triage-review-panel {
  min-width: 0;
}

.triage-ops-auth-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 520px);
  gap: 18px;
  align-items: center;
}

.triage-ops-auth-controls,
.triage-ops-filters,
.triage-ops-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: end;
}

.triage-ops-filters label {
  min-width: 180px;
  display: grid;
  gap: 8px;
}

.triage-filter-drawer,
.triage-cli-drawer,
.triage-campaign-dock {
  border: 1px solid var(--triage-line);
  border-radius: 18px;
  background: rgba(3, 5, 8, 0.28);
}

.triage-filter-drawer {
  margin: 12px 0 14px;
  padding: 10px;
}

.triage-filter-drawer summary,
.triage-cli-drawer summary,
.triage-campaign-dock > summary {
  cursor: pointer;
  color: var(--triage-text);
  font-weight: 900;
  letter-spacing: -0.01em;
}

.triage-filter-drawer summary {
  margin-bottom: 10px;
}

.triage-filter-drawer:not([open]) summary {
  margin-bottom: 0;
}

.triage-campaign-dock {
  margin-top: 18px;
}

.triage-campaign-dock > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  list-style: none;
}

.triage-campaign-dock > summary::-webkit-details-marker {
  display: none;
}

.triage-campaign-dock > summary::after {
  content: "Expand";
  flex: 0 0 auto;
  border: 1px solid var(--triage-line-strong);
  border-radius: 999px;
  color: #9ff2ff;
  background: rgba(0, 217, 255, 0.1);
  padding: 7px 11px;
  font-size: 0.78rem;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.triage-campaign-dock[open] > summary::after {
  content: "Collapse";
}

.triage-campaign-dock small {
  display: block;
  margin-top: 4px;
  color: var(--triage-muted);
  font-weight: 750;
}

.triage-campaign-dock #triage-ops-campaign-research {
  margin-top: 16px;
}

.triage-alert-list {
  display: grid;
  gap: 12px;
  max-height: 760px;
  overflow: auto;
  padding-right: 4px;
}

.triage-alert-card {
  width: 100%;
  text-align: left;
  border: 1px solid var(--triage-line);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(17, 19, 24, 0.98), rgba(11, 13, 16, 0.96));
  padding: 16px;
  color: var(--triage-text);
  cursor: pointer;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
  transition: transform 0.14s ease, border-color 0.14s ease, box-shadow 0.14s ease;
  overflow-wrap: anywhere;
}

.triage-alert-card:hover,
.triage-alert-card.selected-row {
  transform: translateY(-1px);
  border-color: var(--triage-line-strong);
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.24), inset 3px 0 0 var(--signal-cyan);
}

.triage-alert-card h4 {
  margin: 12px 0 8px;
  font-size: 1rem;
  color: var(--triage-text);
}

.triage-alert-card p,
.triage-rationale {
  margin: 0;
  line-height: 1.55;
}

.triage-alert-topline,
.triage-alert-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.triage-alert-meta {
  margin-top: 12px;
  justify-content: space-between;
  color: var(--triage-muted);
  font-size: 0.82rem;
  font-weight: 750;
  overflow-wrap: anywhere;
}

.triage-rec-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border: 1px solid rgba(15, 23, 42, 0.1);
  color: #164e63;
  background: rgba(236, 254, 255, 0.96);
}

.triage-rec-pill.false-positive,
.triage-rec-pill.expected-behavior {
  color: #065f46;
  background: rgba(209, 250, 229, 0.96);
  border-color: rgba(16, 185, 129, 0.35);
}

.triage-rec-pill.not-applicable,
.triage-rec-pill.not_applicable {
  color: #4b5563;
  background: rgba(243, 244, 246, 0.96);
  border-color: rgba(156, 163, 175, 0.35);
}

.triage-rec-pill.true-positive {
  color: #991b1b;
  background: rgba(254, 226, 226, 0.96);
  border-color: rgba(248, 113, 113, 0.42);
}

.triage-rec-pill.needs-review {
  color: #92400e;
  background: rgba(254, 243, 199, 0.96);
  border-color: rgba(245, 158, 11, 0.38);
}

#page-triage-ops .status-pill,
#page-triage-ops .triage-rec-pill,
#page-triage-ops .triage-rec-pill.needs_review {
  color: #dff7ff;
  background: rgba(0, 217, 255, 0.12);
  border-color: rgba(0, 217, 255, 0.36);
  box-shadow: none;
}

#page-triage-ops .status-pill.status-critical,
#page-triage-ops .status-pill.status-failed,
#page-triage-ops .status-pill.status-blocked,
#page-triage-ops .triage-rec-pill.true-positive {
  color: #ffd6d6;
  background: rgba(255, 42, 42, 0.16);
  border-color: rgba(255, 42, 42, 0.42);
}

#page-triage-ops .status-pill.status-open,
#page-triage-ops .status-pill.status-high,
#page-triage-ops .triage-rec-pill.needs-review,
#page-triage-ops .triage-rec-pill.needs_review {
  color: #ffe8a8;
  background: rgba(255, 182, 39, 0.16);
  border-color: rgba(255, 182, 39, 0.42);
}

#page-triage-ops .status-pill.status-closed,
#page-triage-ops .status-pill.status-done,
#page-triage-ops .triage-rec-pill.false-positive,
#page-triage-ops .triage-rec-pill.expected-behavior {
  color: #bff7dc;
  background: rgba(54, 179, 126, 0.15);
  border-color: rgba(54, 179, 126, 0.42);
}

#page-triage-ops .triage-rec-pill.not-applicable,
#page-triage-ops .triage-rec-pill.not_applicable {
  color: #868e96;
  background: rgba(134, 142, 150, 0.15);
  border-color: rgba(134, 142, 150, 0.42);
}

#page-triage-ops .triage-rec-pill.actionability-actionable {
  color: #b8f7ff;
  background: rgba(0, 217, 255, 0.16);
  border-color: rgba(0, 217, 255, 0.42);
}

#page-triage-ops .triage-rec-pill.actionability-no_local_impact,
#page-triage-ops .triage-rec-pill.actionability-review_only,
#page-triage-ops .triage-rec-pill.scanner-severity {
  color: #b9c0c8;
  background: rgba(134, 142, 150, 0.12);
  border-color: rgba(134, 142, 150, 0.28);
}

.triage-actionability-no_local_impact,
.triage-actionability-review_only {
  opacity: 0.82;
}

.triage-actionability-callout {
  margin-top: 14px;
  padding: 13px 15px;
  border-radius: 14px;
  color: #d1d5db;
  border: 1px solid rgba(134, 142, 150, 0.35);
  background: rgba(17, 24, 39, 0.72);
  line-height: 1.5;
  font-size: 0.88rem;
}

.triage-review-section {
  margin-top: 16px;
  padding: 14px;
  border: 1px solid var(--triage-line);
  border-radius: 18px;
  background: rgba(3, 5, 8, 0.28);
}

.triage-section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.triage-section-heading span {
  color: var(--triage-text);
  font-weight: 950;
}

.triage-section-heading small {
  color: var(--triage-subtle);
  font-weight: 750;
  text-align: right;
}

.triage-kv-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.triage-kv-grid .kv-row {
  min-width: 0;
  border: 1px solid rgba(97, 112, 132, 0.28);
  border-radius: 14px;
  background: rgba(17, 19, 24, 0.74);
  padding: 10px;
  overflow-wrap: anywhere;
}

.triage-output {
  margin-top: 18px;
  padding: 14px;
  border-radius: 16px;
}

.triage-output-compact {
  display: grid;
  gap: 12px;
}

.triage-output-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.triage-output-summary span {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: 7px 10px;
  border: 1px solid rgba(13, 148, 136, 0.22);
  border-radius: 999px;
  background: rgba(20, 184, 166, 0.1);
  color: var(--triage-text);
  overflow-wrap: anywhere;
  font-size: 0.82rem;
}

.triage-raw-drawer {
  border: 1px solid var(--triage-line);
  border-radius: 14px;
  background: rgba(2, 6, 23, 0.38);
  overflow: hidden;
}

.triage-raw-drawer summary {
  cursor: pointer;
  padding: 10px 12px;
  color: var(--triage-muted);
  font-weight: 800;
}

.triage-raw-drawer pre {
  margin: 0;
  border-radius: 0;
  max-height: 260px;
}

.triage-output.error {
  border-color: rgba(239,68,68,0.38);
  background: rgba(80, 16, 16, 0.42);
  color: #ffd6d6;
}

.triage-output pre,
.triage-cli-fallback {
  white-space: pre-wrap;
  overflow: auto;
  max-height: 360px;
  padding: 14px;
  border-radius: 14px;
  background: #0f172a;
  color: #dbeafe;
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.82rem;
  line-height: 1.55;
}

.campaign-research-card {
  background:
    radial-gradient(circle at top left, rgba(20, 184, 166, 0.12), transparent 32%),
    linear-gradient(180deg, rgba(255,255,255,0.98), rgba(242,250,247,0.96));
}

.campaign-fixture-actions,
.campaign-actions,
.campaign-list-head,
.campaign-inline-row,
.campaign-package-header {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.campaign-fixture-actions {
  justify-content: flex-end;
}

.campaign-form-grid,
.campaign-list-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.campaign-list-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.campaign-wide,
.campaign-json-box,
.campaign-result-host {
  grid-column: 1 / -1;
}

.campaign-list-field,
.campaign-json-box,
.campaign-review-drawer,
.campaign-discovery-box,
.campaign-result-section {
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(255,255,255,0.78);
  padding: 12px;
}

.campaign-list-head {
  justify-content: space-between;
  margin-bottom: 8px;
}

.campaign-inline-row {
  margin-top: 8px;
}

.campaign-inline-row input {
  min-width: min(100%, 280px);
  flex: 1;
}

.campaign-package-header {
  justify-content: space-between;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.campaign-package-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.campaign-package-header h4,
.campaign-result-host h4,
.campaign-result-section h4 {
  margin: 0 0 8px;
}

.campaign-packages {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

.campaign-package-row {
  display: grid;
  grid-template-columns: 150px minmax(180px, 1fr) minmax(130px, 0.65fr) minmax(160px, 0.75fr) minmax(220px, 1fr) auto;
  gap: 10px;
  align-items: end;
  padding: 12px;
  border: 1px solid rgba(13, 148, 136, 0.16);
  border-radius: 16px;
  background: rgba(240,253,250,0.62);
}

.campaign-package-row.campaign-package-noise {
  border-color: rgba(245, 158, 11, 0.42);
  background:
    linear-gradient(135deg, rgba(245, 158, 11, 0.12), transparent 52%),
    rgba(255, 251, 235, 0.72);
}

.campaign-noise-note,
.campaign-noise-summary {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 6px;
  padding: 6px 9px;
  border: 1px solid rgba(245, 158, 11, 0.34);
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.11);
  color: #92400e;
  font-size: 0.78rem;
  line-height: 1.25;
}

.campaign-noise-note {
  grid-column: 1 / -1;
}

.campaign-package-notes textarea {
  min-height: 44px;
}

.campaign-json-box {
  margin-top: 14px;
}

.campaign-review-drawer {
  margin-top: 14px;
}

.campaign-review-drawer summary {
  cursor: pointer;
  color: var(--triage-text);
  font-weight: 900;
}

.campaign-discovery-box {
  margin-top: 14px;
  background:
    radial-gradient(circle at top right, rgba(15, 118, 110, 0.11), transparent 32%),
    rgba(255,255,255,0.82);
}

.campaign-watchlist-row {
  display: grid;
  grid-template-columns: 160px minmax(220px, 1fr) auto;
  gap: 10px;
  align-items: center;
  margin-top: 12px;
}

.campaign-watchlist-suggestions {
  display: grid;
  gap: 10px;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid rgba(13, 148, 136, 0.16);
  border-radius: 16px;
  background: rgba(240, 253, 250, 0.62);
}

.campaign-orchestrator-review {
  display: grid;
  gap: 12px;
  margin-top: 12px;
  padding: 14px;
  border: 1px solid rgba(13, 148, 136, 0.22);
  border-radius: 18px;
  background:
    radial-gradient(circle at top left, rgba(16, 185, 129, 0.12), transparent 34%),
    rgba(248, 250, 252, 0.88);
}

.campaign-suggestion-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.campaign-candidate-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.campaign-candidate-card {
  width: 100%;
  display: grid;
  gap: 5px;
  text-align: left;
  border: 1px solid rgba(13, 148, 136, 0.18);
  border-radius: 15px;
  background: rgba(240, 253, 250, 0.7);
  color: var(--text);
  padding: 11px 12px;
  cursor: pointer;
}

.campaign-candidate-card.selected,
.campaign-candidate-card:focus-visible {
  outline: 2px solid rgba(13, 148, 136, 0.35);
  border-color: rgba(13, 148, 136, 0.58);
  background: rgba(204, 251, 241, 0.82);
}

.campaign-json-box textarea {
  min-height: 180px;
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.84rem;
}

.campaign-actions {
  margin-top: 14px;
}

.campaign-result-host {
  margin-top: 16px;
}

.campaign-result-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.campaign-result-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.campaign-table-wrap {
  overflow: auto;
  border-radius: 14px;
  border: 1px solid var(--border);
}

.campaign-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
  background: rgba(255,255,255,0.92);
}

.campaign-table th,
.campaign-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
  color: var(--text);
  font-size: 0.86rem;
}

.campaign-table th {
  color: #0f766e;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.campaign-cli-output {
  margin-top: 12px;
}

.campaign-cli-output pre {
  white-space: pre-wrap;
  max-height: 280px;
  overflow: auto;
  background: #0f172a;
  color: #dbeafe;
  border-radius: 14px;
  padding: 12px;
}

.evidence-verdict-panel {
  background: linear-gradient(180deg, rgba(240,253,250,0.98), rgba(248,250,252,0.98));
}

.evidence-score-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0;
}

.evidence-score-card {
  border: 1px solid rgba(13, 148, 136, 0.2);
  border-radius: 16px;
  background: rgba(255,255,255,0.86);
  padding: 12px;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.05);
}

.evidence-score-card span {
  display: block;
  color: #475569;
  font-size: 0.76rem;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.evidence-score-card strong {
  display: block;
  margin-top: 5px;
  color: #0f172a;
  font-size: 1rem;
}

.evidence-notice {
  border: 1px solid rgba(245, 158, 11, 0.36);
  border-radius: 14px;
  background: rgba(255, 251, 235, 0.96);
  color: #78350f;
  padding: 11px 12px;
  font-weight: 800;
}

.evidence-section {
  margin-top: 16px;
}

.evidence-section h4 {
  margin: 0 0 8px;
}

.evidence-list,
.score-breakdown-list {
  display: grid;
  gap: 8px;
}

.evidence-row,
.score-breakdown-row {
  display: grid;
  gap: 4px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 14px;
  background: rgba(255,255,255,0.86);
  padding: 10px 12px;
  color: #334155;
}

.evidence-row strong,
.score-breakdown-row strong {
  color: #0f172a;
}

.score-breakdown-row {
  grid-template-columns: 56px minmax(0, 1fr);
  align-items: start;
}

.score-breakdown-row p {
  margin: 2px 0 0;
  color: #475569;
}

.score-plus,
.score-minus {
  display: inline-flex;
  justify-content: center;
  border-radius: 999px;
  padding: 4px 6px;
  font-weight: 950;
}

.score-plus {
  color: #065f46;
  background: rgba(209, 250, 229, 0.96);
}

.score-minus {
  color: #991b1b;
  background: rgba(254, 226, 226, 0.96);
}

.triage-ops-actions {
  margin-top: 16px;
}

.triage-ops-actions.grouped {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.triage-cli-drawer {
  margin-top: 16px;
  padding: 12px;
}

.triage-cli-drawer .mini-btn {
  margin-top: 10px;
}

@media (max-width: 980px) {
  .blog-auth-card { grid-template-columns: 1fr; }
  .triage-ops-auth-card { grid-template-columns: 1fr; }
  .blog-actions label { width: 100%; }
  .triage-ops-filters label { width: 100%; }
  .blog-extracted-grid { grid-template-columns: 1fr; }
  .evidence-score-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Mobile navigation and responsive dashboard polish */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.mobile-menu-btn {
  display: none;
  margin-left: auto;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(103, 232, 249, 0.32);
  border-radius: 14px;
  background: rgba(11, 13, 16, 0.86);
  color: #e1e3e6;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.22);
}

.mobile-menu-btn span:not(.sr-only) {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: #67e8f9;
  transition: transform 0.18s ease, opacity 0.18s ease;
}

.mobile-nav-open .mobile-menu-btn span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.mobile-nav-open .mobile-menu-btn span:nth-child(2) {
  opacity: 0;
}

.mobile-nav-open .mobile-menu-btn span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 1024px) {
  html, body {
    overflow-x: hidden;
  }

  .app-shell {
    display: block;
    min-height: 100vh;
  }

  .sidebar {
    position: sticky;
    top: 0;
    z-index: 50;
    height: auto;
    padding: 14px;
    border-right: 0;
    border-bottom: 1px solid rgba(255,255,255,0.08);
  }

  .brand {
    margin-bottom: 0;
  }

  .mobile-menu-btn {
    display: inline-flex;
  }

  .nav-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    margin-top: 0;
    transform: translateY(-6px);
    transition: max-height 0.22s ease, opacity 0.18s ease, margin-top 0.18s ease, transform 0.18s ease;
  }

  .mobile-nav-open .nav-list {
    max-height: 520px;
    opacity: 1;
    margin-top: 14px;
    transform: translateY(0);
  }

  .sidebar-footer {
    display: none;
  }

  .main {
    padding: 16px;
  }

  .top-strip {
    position: sticky;
    top: 82px;
    z-index: 30;
    backdrop-filter: blur(12px);
  }

  .grid.cols-5,
  .grid.cols-4,
  .grid.cols-3,
  .grid.cols-2,
  #page-blog-ops > .grid.cols-2,
  #page-triage-ops > .grid.cols-2 {
    grid-template-columns: 1fr 1fr;
  }

  .kanban {
    grid-template-columns: repeat(2, minmax(260px, 1fr));
  }
}

@media (max-width: 720px) {
  .sidebar {
    padding: 12px;
  }

  .brand-badge {
    width: 38px;
    height: 38px;
    border-radius: 12px;
  }

  .brand h1 {
    font-size: 0.96rem;
  }

  .brand p,
  .brand-overline {
    font-size: 0.68rem;
  }

  .main {
    padding: 12px;
  }

  .okcomputer-skin .top-strip {
    position: static;
    top: auto;
    gap: 8px;
    padding: 10px;
    height: auto;
    min-height: 48px;
    flex-wrap: nowrap;
    flex-direction: row;
    align-items: center;
  }

  .okcomputer-skin .top-strip-live,
  .okcomputer-skin .top-strip-meta {
    width: auto;
    justify-content: space-between;
  }

  .okcomputer-skin .top-strip-live {
    flex: 0 0 auto;
  }

  .okcomputer-skin .top-strip-meta {
    min-width: 0;
    flex: 1 1 auto;
    justify-content: flex-end;
  }

  #top-strip-context {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  #top-strip-time {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .page-header {
    display: grid;
    gap: 14px;
    padding: 16px;
    margin-bottom: 16px;
  }

  .page-header h2 {
    font-size: 1.45rem;
  }

  .grid.cols-5,
  .grid.cols-4,
  .grid.cols-3,
  .grid.cols-2,
  #page-blog-ops > .grid.cols-2,
  #page-triage-ops > .grid.cols-2,
  #finding-summary,
  #integration-summary,
  #mission-stats,
  #integration-config,
  .native-close-grid {
    grid-template-columns: 1fr;
  }

  .card,
  .column,
  .modal-card {
    border-radius: 18px;
    padding: 16px;
  }

  .metric {
    font-size: 1.55rem;
  }

  .kanban {
    grid-template-columns: 1fr;
    overflow: visible;
  }

  .blog-auth-controls,
  .blog-actions,
  .blog-preview-actions,
  .triage-ops-auth-controls,
  .triage-ops-filters,
  .triage-ops-actions,
  .campaign-actions,
  .campaign-fixture-actions,
  .campaign-inline-row,
  .task-card-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .blog-actions label,
  .blog-filter-label,
  .blog-auth-controls input,
  .blog-auth-controls button,
  .blog-preview-actions button,
  .triage-ops-auth-controls input,
  .triage-ops-auth-controls button,
  .triage-ops-filters label,
  .triage-ops-actions button,
  .campaign-actions button,
  .campaign-fixture-actions select,
  .campaign-fixture-actions button,
  .campaign-inline-row input,
  .campaign-inline-row button,
  .task-card-actions button,
  .status-pill,
  .primary-btn,
  .secondary-btn,
  .danger-btn,
  .mini-btn {
    width: 100%;
  }

  .blog-draft-list {
    max-height: none;
  }

  .blog-draft-meta,
  .finding-detail-header,
  .kv-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .kv-val {
    text-align: left;
  }

  .blog-preview-body {
    max-height: 320px;
    font-size: 0.78rem;
  }

  .campaign-form-grid,
  .campaign-list-grid,
  .campaign-result-grid,
  .campaign-result-columns,
  .campaign-watchlist-row,
  .triage-kv-grid,
  .triage-ops-actions.grouped {
    grid-template-columns: 1fr;
  }

  .triage-section-heading {
    display: grid;
  }

  .triage-section-heading small {
    text-align: left;
  }

  .campaign-package-row {
    grid-template-columns: 1fr;
  }

  .table-wrap,
  #findings-table .table-wrap,
  #run-requests-table .table-wrap,
  #native-sessions-table .table-wrap,
  #routes-table .table-wrap,
  #blog-workflow-runs .table-wrap,
  .campaign-table-wrap {
    max-width: calc(100vw - 24px);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

/* OKComputer final pass.
   This sits at the true end of the bundle so older section-specific rules cannot
   reintroduce low-contrast cards, fields, or action groups. */
.okcomputer-skin {
  background:
    radial-gradient(circle at 15% 0%, rgba(0, 212, 200, 0.1), transparent 28rem),
    radial-gradient(circle at 85% 8%, rgba(139, 92, 246, 0.1), transparent 30rem),
    var(--void-black);
  color: var(--text-primary);
}

.okcomputer-skin .app-shell,
.okcomputer-skin .page,
.okcomputer-skin .page.active {
  background: transparent;
  color: var(--text-primary);
}

.okcomputer-skin .sidebar {
  background: rgba(5, 5, 7, 0.97);
  border-right: 1px solid var(--border-color);
}

.okcomputer-skin .card,
.okcomputer-skin .column,
.okcomputer-skin .modal-card,
.okcomputer-skin .blog-draft-card,
.okcomputer-skin .triage-alert-card,
.okcomputer-skin .campaign-panel,
.okcomputer-skin .campaign-result-panel,
.okcomputer-skin .task-card,
.okcomputer-skin .toast {
  background: linear-gradient(180deg, rgba(20, 20, 26, 0.96), rgba(13, 13, 18, 0.98));
  border: 1px solid var(--border-color);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.26);
  color: var(--text-primary);
}

.okcomputer-skin .top-strip,
.okcomputer-skin .page-header {
  background: rgba(5, 5, 7, 0.78);
  border-color: var(--border-color);
  color: var(--text-primary);
}

.okcomputer-skin h1,
.okcomputer-skin h2,
.okcomputer-skin h3,
.okcomputer-skin h4,
.okcomputer-skin .card-title,
.okcomputer-skin .column-title,
.okcomputer-skin .metric,
.okcomputer-skin .task-title,
.okcomputer-skin .finding-title,
.okcomputer-skin .blog-draft-title,
.okcomputer-skin .triage-alert-title,
.okcomputer-skin .triage-detail-title,
.okcomputer-skin .campaign-title {
  color: var(--text-primary);
}

.okcomputer-skin p,
.okcomputer-skin label,
.okcomputer-skin .muted,
.okcomputer-skin .small,
.okcomputer-skin .hint,
.okcomputer-skin .task-meta,
.okcomputer-skin .finding-meta,
.okcomputer-skin .blog-draft-meta,
.okcomputer-skin .triage-alert-summary,
.okcomputer-skin .triage-detail-copy,
.okcomputer-skin .campaign-help,
.okcomputer-skin .campaign-empty,
.okcomputer-skin .section-subtitle {
  color: var(--text-secondary);
}

.okcomputer-skin input,
.okcomputer-skin select,
.okcomputer-skin textarea {
  background: rgba(5, 5, 7, 0.78);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
}

.okcomputer-skin input::placeholder,
.okcomputer-skin textarea::placeholder {
  color: var(--text-tertiary);
}

.okcomputer-skin input:focus,
.okcomputer-skin select:focus,
.okcomputer-skin textarea:focus,
.okcomputer-skin button:focus-visible,
.okcomputer-skin a:focus-visible,
.okcomputer-skin .nav-btn:focus-visible {
  border-color: rgba(0, 212, 200, 0.72);
  box-shadow: 0 0 0 3px rgba(0, 212, 200, 0.17);
  outline: none;
}

.okcomputer-skin .primary-btn,
.okcomputer-skin button.primary-btn {
  background: var(--teal-primary);
  border-color: transparent;
  color: #041011;
}

.okcomputer-skin .secondary-btn,
.okcomputer-skin .mini-btn,
.okcomputer-skin button.secondary-btn,
.okcomputer-skin button.mini-btn {
  background: rgba(20, 20, 26, 0.95);
  border-color: var(--border-active);
  color: var(--text-primary);
}

.okcomputer-skin .danger-btn,
.okcomputer-skin button.danger-btn {
  background: rgba(244, 63, 94, 0.14);
  border-color: rgba(244, 63, 94, 0.36);
  color: #fecdd3;
}

.okcomputer-skin .status-pill,
.okcomputer-skin .badge,
.okcomputer-skin .pill,
.okcomputer-skin .severity-pill,
.okcomputer-skin .triage-status-pill,
.okcomputer-skin .blog-status-pill {
  background: rgba(20, 20, 26, 0.95);
  border: 1px solid var(--border-active);
  color: var(--text-secondary);
}

.okcomputer-skin .status-pill.critical,
.okcomputer-skin .severity-critical,
.okcomputer-skin .badge.critical {
  background: rgba(244, 63, 94, 0.14);
  border-color: rgba(244, 63, 94, 0.36);
  color: #fecdd3;
}

.okcomputer-skin .status-pill.open,
.okcomputer-skin .badge.open,
.okcomputer-skin .badge.needs_review {
  background: rgba(245, 158, 11, 0.14);
  border-color: rgba(245, 158, 11, 0.36);
  color: #fde68a;
}

.okcomputer-skin .status-pill.success,
.okcomputer-skin .badge.success,
.okcomputer-skin .badge.approved {
  background: rgba(16, 185, 129, 0.14);
  border-color: rgba(16, 185, 129, 0.36);
  color: #a7f3d0;
}

.okcomputer-skin pre,
.okcomputer-skin code,
.okcomputer-skin .cli-block,
.okcomputer-skin .output-block,
.okcomputer-skin .json-output {
  background: rgba(5, 5, 7, 0.86);
  border-color: var(--border-color);
  color: #d8fff9;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.okcomputer-skin .nav-btn {
  color: var(--text-secondary);
}

.okcomputer-skin .nav-btn:hover,
.okcomputer-skin .nav-btn.active {
  background: rgba(0, 212, 200, 0.1);
  border-color: rgba(0, 212, 200, 0.2);
  color: var(--text-primary);
}

.okcomputer-skin .nav-btn.active .nav-icon {
  background: rgba(0, 212, 200, 0.18);
  color: var(--teal-primary);
}

/* Operator guide */
.guide-start-pill {
  text-decoration: none;
}

.guide-header-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.guide-layout {
  display: grid;
  grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.guide-toc {
  position: sticky;
  top: 96px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.guide-toc h3 {
  margin: 0 0 8px;
}

.guide-toc a {
  display: block;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-secondary, rgba(226, 232, 240, 0.78));
  text-decoration: none;
  transition: border-color 160ms ease, color 160ms ease, background 160ms ease;
}

.guide-toc a:hover,
.guide-toc a:focus-visible {
  background: rgba(0, 212, 200, 0.1);
  border-color: rgba(0, 212, 200, 0.32);
  color: var(--text-primary, #f8fafc);
}

.guide-main {
  display: grid;
  gap: 18px;
}

.guide-section {
  scroll-margin-top: 90px;
}

.guide-section-head {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
}

.guide-section-head h3 {
  margin: 0;
  font-size: clamp(1.15rem, 1.7vw, 1.55rem);
}

.guide-section-head p {
  margin: 0;
  max-width: 78ch;
}

.guide-pill {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border: 1px solid rgba(0, 212, 200, 0.28);
  border-radius: 999px;
  background: rgba(0, 212, 200, 0.1);
  color: #98fff6;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.guide-steps {
  display: grid;
  gap: 10px;
}

.guide-step {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.035);
}

.guide-step > span {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 10px;
  background: rgba(0, 212, 200, 0.14);
  border: 1px solid rgba(0, 212, 200, 0.26);
  color: #98fff6;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.78rem;
  font-weight: 800;
}

.guide-step p {
  margin: 2px 0 0;
  color: var(--text-secondary, rgba(226, 232, 240, 0.78));
  line-height: 1.58;
  overflow-wrap: anywhere;
}

.guide-step strong {
  color: var(--text-primary, #f8fafc);
}

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

.guide-mini-card {
  display: grid;
  gap: 6px;
  min-height: 112px;
  padding: 14px;
  border: 1px solid rgba(0, 212, 200, 0.18);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(0, 212, 200, 0.08), transparent 52%),
    rgba(255, 255, 255, 0.035);
}

.guide-mini-card .guide-automation-btn {
  width: fit-content;
  margin-top: 8px;
}

.guide-mini-card strong {
  color: var(--text-primary, #f8fafc);
}

.guide-mini-card span {
  color: var(--text-secondary, rgba(226, 232, 240, 0.78));
  line-height: 1.5;
}

.guide-callout {
  margin-top: 14px;
  padding: 13px 14px;
  border: 1px solid rgba(0, 212, 200, 0.2);
  border-radius: 16px;
  background: rgba(0, 212, 200, 0.08);
  color: #d8fff9;
  line-height: 1.55;
}

.guide-callout.guide-good {
  border-color: rgba(16, 185, 129, 0.32);
  background: rgba(16, 185, 129, 0.1);
  color: #d1fae5;
}

.guide-callout.guide-warning {
  border-color: rgba(245, 158, 11, 0.34);
  background: rgba(245, 158, 11, 0.1);
  color: #fde68a;
}

.guide-callout.guide-danger {
  border-color: rgba(244, 63, 94, 0.36);
  background: rgba(244, 63, 94, 0.1);
  color: #fecdd3;
}

@media (max-width: 1100px) {
  .guide-layout {
    grid-template-columns: 1fr;
  }

  .guide-toc {
    position: static;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .guide-toc h3 {
    grid-column: 1 / -1;
  }

  .guide-card-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .guide-header-actions {
    justify-content: stretch;
  }

  .guide-header-actions > * {
    width: 100%;
    justify-content: center;
  }

  .guide-toc {
    grid-template-columns: 1fr;
  }

  .guide-step {
    grid-template-columns: 1fr;
  }

  .guide-step > span {
    width: 32px;
    height: 32px;
  }
}
#page-edge .page-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

#page-edge .edge-health .kv-val .status-pill {
  display: inline-flex;
}

#page-edge .edge-table table {
  min-width: 680px;
}

#page-edge #edge-findings table {
  min-width: 760px;
}

#page-edge code {
  overflow-wrap: anywhere;
}

@media (max-width: 640px) {
  #page-edge .page-actions,
  #page-edge .page-actions > * {
    width: 100%;
  }
}

.research-page-actions,
.research-form-actions,
.research-detail-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.research-auth-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.7fr);
  gap: 18px;
  align-items: center;
}

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

.research-create-panel {
  margin-top: 18px;
}

.research-watchlist-panel {
  margin-top: 18px;
}

.research-watchlist-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.research-watchlist-controls {
  display: grid;
  grid-template-columns: minmax(240px, 0.8fr) minmax(220px, 1fr);
  gap: 14px;
  align-items: end;
  margin-top: 16px;
}

.research-watchlist-controls label {
  display: grid;
  gap: 7px;
}

.research-watchlist-controls label > span,
.research-watchlist-all span {
  color: var(--signal-muted, #9ca3af);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.research-watchlist-controls select {
  min-height: 130px;
}

.research-watchlist-all {
  display: flex !important;
  align-items: center;
  gap: 8px;
}

.research-watchlist-all input {
  width: auto;
}

.research-watchlist-result {
  margin-top: 14px;
  min-height: 22px;
}

.research-watchlist-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  color: var(--signal-muted, #9ca3af);
}

.research-watchlist-summary strong {
  color: var(--signal-text-strong, #f8fafc);
}

.research-create-panel > summary,
.research-action-drawer > summary {
  cursor: pointer;
  color: var(--signal-text-strong, #f8fafc);
  font-weight: 800;
}

.research-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.research-form-grid label {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.research-form-grid label > span {
  color: var(--signal-muted, #9ca3af);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.research-span-2 {
  grid-column: 1 / -1;
}

.research-form-actions {
  justify-content: flex-end;
  margin-top: 14px;
}

.research-pipeline-actions {
  align-items: stretch;
}

.research-pipeline-actions > button {
  flex: 1 1 220px;
  min-width: 0;
  max-width: 100%;
  min-height: 42px;
  line-height: 1.3;
  overflow-wrap: anywhere;
  white-space: normal;
}

.research-rule-workflow-head {
  align-items: center;
  margin-bottom: 14px;
}

.research-rule-review-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.research-rule-history {
  margin-top: 16px;
}

.research-rule-history > summary {
  cursor: pointer;
  font-weight: 750;
}

.research-case-layout {
  align-items: start;
  margin-top: 18px;
  grid-template-columns: minmax(320px, 0.75fr) minmax(0, 1.45fr) !important;
}

.research-case-list-panel,
.research-case-detail-panel {
  min-width: 0;
}

.research-case-filters {
  display: grid;
  grid-template-columns: minmax(150px, 0.7fr) minmax(0, 1.3fr);
  gap: 8px;
  margin: 14px 0;
}

.research-case-list {
  display: grid;
  gap: 8px;
  max-height: 780px;
  overflow: auto;
}

.research-case-row {
  display: grid;
  gap: 7px;
  width: 100%;
  padding: 13px;
  border: 1px solid var(--signal-line-soft, rgba(74, 78, 85, 0.45));
  border-radius: 8px;
  background: rgba(3, 5, 8, 0.5);
  color: var(--signal-text, #e5e7eb);
  text-align: left;
  cursor: pointer;
}

.research-case-row:hover,
.research-case-row.selected {
  border-color: rgba(0, 217, 255, 0.55);
  background: rgba(0, 217, 255, 0.08);
}

.research-case-row-head,
.research-detail-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.research-detail-head h3 {
  margin: 5px 0;
}

.research-readiness {
  margin-top: 16px;
  padding: 13px 14px;
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: 8px;
  background: rgba(245, 158, 11, 0.08);
}

.research-readiness.ready {
  border-color: rgba(16, 185, 129, 0.38);
  background: rgba(16, 185, 129, 0.08);
}

.research-readiness ul {
  margin-bottom: 0;
}

.research-detail-section {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--signal-line-soft, rgba(74, 78, 85, 0.45));
}

.research-detail-section h4 {
  margin: 0 0 10px;
}

.research-pipeline-panel {
  margin: 14px 0 22px;
  padding: 16px;
  border: 1px solid rgba(20, 207, 199, 0.34);
  border-left: 3px solid var(--accent, #14cfc7);
  background: rgba(20, 207, 199, 0.035);
}

.research-pipeline-heading,
.research-pipeline-summary,
.research-review-head,
.research-list-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
}

.research-pipeline-heading h5,
.research-list-head h5 {
  margin: 4px 0 5px;
  font-size: 1rem;
}

.research-pipeline-summary {
  align-items: center;
  margin-top: 14px;
  padding: 10px 12px;
  border-top: 1px solid var(--signal-line-soft, rgba(74, 78, 85, 0.45));
  border-bottom: 1px solid var(--signal-line-soft, rgba(74, 78, 85, 0.45));
}

.research-pipeline-summary span,
.research-pipeline-boundary {
  color: var(--signal-muted, #9ca3af);
}

.research-pipeline-targets {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.research-pipeline-notice {
  margin-top: 12px;
  padding: 10px 12px;
  border-left: 3px solid var(--warning, #f59e0b);
  background: rgba(245, 158, 11, 0.08);
  color: var(--signal-text, #e5e7eb);
}

.research-pipeline-steps {
  display: grid;
  gap: 0;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--signal-line-soft, rgba(74, 78, 85, 0.45));
}

.research-pipeline-step {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) auto;
  gap: 6px 12px;
  align-items: center;
  padding: 9px 4px;
  border-bottom: 1px solid var(--signal-line-soft, rgba(74, 78, 85, 0.35));
}

.research-pipeline-step > small {
  grid-column: 1 / -1;
  color: var(--signal-muted, #9ca3af);
}

.research-review-list {
  margin-top: 18px;
}

.research-review-item {
  margin-top: 10px;
  padding: 12px;
  border: 1px solid var(--signal-line-soft, rgba(74, 78, 85, 0.45));
  background: rgba(3, 5, 8, 0.3);
}

.research-review-item.accepted {
  border-left: 3px solid var(--success, #10b981);
}

.research-review-item.rejected {
  opacity: 0.72;
  border-left: 3px solid var(--signal-muted, #9ca3af);
}

.research-review-head code {
  display: block;
  margin-top: 4px;
}

.research-review-item textarea {
  width: 100%;
  margin: 10px 0 7px;
  resize: vertical;
}

.research-review-item textarea[readonly] {
  color: var(--signal-muted, #9ca3af);
  background: rgba(3, 5, 8, 0.55);
}

.research-pipeline-boundary {
  margin: 16px 0 0;
  padding-top: 12px;
  border-top: 1px solid var(--signal-line-soft, rgba(74, 78, 85, 0.45));
}

.research-automation-status {
  display: grid;
  gap: 8px;
  margin-top: 16px;
  padding: 12px 14px;
  border: 1px solid var(--signal-line-soft, rgba(74, 78, 85, 0.45));
  border-radius: 8px;
  background: rgba(3, 5, 8, 0.32);
}

.research-sandbox-provider-status {
  margin: 12px 0 14px;
}

.research-sandbox-provider-card,
.research-sandbox-recommendation {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--signal-line-soft, rgba(74, 78, 85, 0.45));
  border-radius: 8px;
  background: rgba(3, 5, 8, 0.22);
}

.research-sandbox-provider-card p,
.research-sandbox-recommendation p {
  margin: 0;
}

.research-sandbox-recommendation {
  margin: 14px 0 4px;
  border-left: 3px solid var(--signal-amber, #d6b56c);
}

.research-sandbox-recommendation-head,
.research-sandbox-recommendation-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.research-sandbox-recommendation-head {
  justify-content: space-between;
}

.research-sandbox-recommendation h5 {
  margin: 3px 0 0;
  font-size: 0.95rem;
}

.research-sandbox-recommendation ul {
  margin: 0;
  padding-left: 18px;
}

.research-sandbox-blockers {
  color: var(--signal-amber, #d6b56c);
}

.research-automation-status .feed-item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 7px 0;
  border-top: 1px solid var(--signal-line-soft, rgba(74, 78, 85, 0.3));
}

.research-table table {
  min-width: 640px;
}

.research-action-drawer {
  margin-top: 12px;
  padding: 13px 0;
  border-top: 1px solid var(--signal-line-soft, rgba(74, 78, 85, 0.45));
}

.research-row-retracted {
  opacity: 0.58;
}

.research-row-retracted td {
  text-decoration: line-through;
  text-decoration-color: rgba(156, 163, 175, 0.45);
}

.research-retract-modal-card {
  width: min(560px, calc(100vw - 28px));
}

.research-retract-modal-card label {
  display: grid;
  gap: 8px;
}

@media (max-width: 1100px) {
  .research-auth-card,
  .research-case-layout,
  .research-watchlist-controls {
    grid-template-columns: 1fr !important;
  }

  .research-pipeline-targets {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .research-page-actions,
  .research-page-actions > *,
  .research-form-actions,
  .research-form-actions > *,
  .research-watchlist-head > * {
    width: 100%;
  }

  .research-rule-workflow-head,
  .research-rule-workflow-head > *,
  .research-rule-review-actions,
  .research-rule-review-actions > * {
    width: 100%;
  }

  .research-auth-controls,
  .research-form-grid,
  .research-case-filters {
    grid-template-columns: 1fr;
  }

  .research-span-2 {
    grid-column: auto;
  }

  .research-case-row-head,
  .research-detail-head,
  .research-pipeline-heading,
  .research-pipeline-summary,
  .research-review-head,
  .research-list-head {
    display: grid;
  }

  .research-pipeline-targets,
  .research-pipeline-step {
    grid-template-columns: 1fr;
  }

  .research-pipeline-step > small {
    grid-column: auto;
  }
}
/* Authenticated operator boundary */
.auth-gate {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 20px;
  background: #050507;
  color: #f5f7fa;
}

.auth-gate.hidden,
.auth-form.hidden {
  display: none;
}

.app-shell.auth-pending {
  display: none;
}

.auth-panel {
  width: min(100%, 420px);
  padding: 28px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: #0d0e12;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.42);
}

.local-auth-gate-panel {
  margin: 18px 0 20px;
  padding: 16px;
  border: 1px solid rgba(15, 157, 182, 0.28);
  border-radius: 14px;
  background: rgba(236, 254, 255, 0.58);
}
.local-auth-gate-panel[hidden] { display: none; }
.local-auth-gate-panel h2 { margin: 5px 0 8px; font-size: 1.05rem; color: #102033; }
.local-auth-gate-panel p { margin: 7px 0 0; line-height: 1.45; }
.local-auth-gate-panel label { display: block; margin-top: 12px; font-size: 0.82rem; font-weight: 700; color: #314154; }
.local-auth-gate-controls { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; margin-top: 6px; }
.local-auth-gate-controls input { min-width: 0; }
.local-auth-gate-panel code { overflow-wrap: anywhere; }

@media (max-width: 520px) {
  .local-auth-gate-controls { grid-template-columns: 1fr; }
  .local-auth-gate-controls button { width: 100%; }
}

.auth-brand {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  color: #041311;
  border-radius: 8px;
  background: #35d6c4;
}

.auth-brand svg {
  width: 23px;
  height: 23px;
}

.auth-heading {
  margin: 20px 0 24px;
}

.auth-heading h1 {
  margin: 7px 0 8px;
  color: #f5f7fa;
  font-size: 24px;
  line-height: 1.25;
  letter-spacing: 0;
}

.auth-heading p,
.auth-boundary {
  margin: 0;
  color: #a7adb8;
  font-size: 14px;
  line-height: 1.55;
}

.auth-form {
  display: grid;
  gap: 10px;
}

.auth-form label {
  margin-top: 4px;
  color: #d8dce3;
  font-size: 13px;
  font-weight: 600;
}

.auth-form input {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  color: #f5f7fa;
  border: 1px solid rgba(255, 255, 255, 0.17);
  border-radius: 6px;
  outline: none;
  background: #08090c;
}

.auth-form input:focus {
  border-color: #35d6c4;
  box-shadow: 0 0 0 3px rgba(53, 214, 196, 0.14);
}

.auth-primary {
  margin-top: 8px;
}

.auth-form button {
  min-height: 42px;
}

.auth-form button:disabled {
  cursor: wait;
  opacity: 0.65;
}

.auth-message {
  min-height: 22px;
  margin: 4px 0 0;
  color: #a7adb8;
  font-size: 13px;
  line-height: 1.45;
}

.auth-message.error {
  color: #ff8f9b;
}

.auth-locked-message {
  padding: 14px;
  color: #ffd6da;
  border: 1px solid rgba(255, 93, 113, 0.34);
  border-radius: 6px;
  background: rgba(255, 93, 113, 0.08);
  font-size: 13px;
  line-height: 1.5;
}

.auth-boundary {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 12px;
}

.operator-identity {
  max-width: 240px;
  overflow: hidden;
  color: #c7cbd3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.top-strip-action {
  padding: 3px 8px;
  color: #d8dce3;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 4px;
  background: transparent;
  cursor: pointer;
}

.top-strip-action:hover,
.top-strip-action:focus-visible {
  color: #ffffff;
  border-color: #35d6c4;
}

@media (max-width: 520px) {
  .auth-gate {
    align-items: start;
    padding: 20px 14px;
  }

  .auth-panel {
    padding: 22px 18px;
  }

  .operator-identity {
    max-width: 132px;
  }
}

/* Professional console layer. This is intentionally scoped so the legacy
   renderers can be migrated screen by screen without changing API contracts. */
body.professional-ui {
  background: #0f141a;
  color: #e7edf3;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body.professional-ui::before {
  display: none;
}

.professional-ui .app-shell {
  grid-template-columns: 232px minmax(0, 1fr);
  background: #0f141a;
}

.professional-ui .sidebar {
  position: sticky;
  width: auto;
  padding: 18px 12px;
  background: #0b1015;
  border-right: 1px solid #26313c;
  box-shadow: none;
}

.professional-ui .brand {
  margin: 0 4px 24px;
  padding: 8px 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  box-shadow: none;
}

.professional-ui .brand-badge {
  width: 34px;
  height: 34px;
  border-radius: 6px;
  background: #35d6c4;
  box-shadow: none;
}

.professional-ui .brand h1 {
  font-size: 15px;
  letter-spacing: 0;
}

.professional-ui .brand p {
  color: #91a0af;
  font-size: 11px;
}

.professional-ui .brand-overline {
  color: #7de2d4;
  font-size: 9px;
  letter-spacing: 0;
}

.professional-ui .nav-list {
  gap: 3px;
  max-height: calc(100vh - 122px);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #344452 transparent;
}

.professional-ui .nav-group-label {
  margin: 18px 10px 6px;
  color: #788695;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0;
}

.professional-ui .nav-group-label:first-child {
  margin-top: 0;
}

.professional-ui .nav-btn {
  position: relative;
  min-height: 44px;
  padding: 9px 10px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  box-shadow: none;
}

.professional-ui .nav-btn[aria-controls="sidebar-subnav"] {
  padding-right: 32px;
}

.professional-ui .nav-btn[aria-controls="sidebar-subnav"]::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 12px;
  width: 7px;
  height: 7px;
  border-right: 1.5px solid #91a0af;
  border-bottom: 1.5px solid #91a0af;
  transform: translateY(-65%) rotate(45deg);
  transform-origin: center;
  transition: transform 140ms ease, border-color 140ms ease;
}

.professional-ui .nav-btn[aria-expanded="true"]::after {
  border-color: #7de2d4;
  transform: translateY(-35%) rotate(225deg);
}

.professional-ui .nav-btn:hover {
  background: #141d25;
  border-color: #2a3945;
}

.professional-ui .nav-btn.active {
  background: #17252a;
  border-color: #2e5d5a;
  box-shadow: inset 3px 0 0 #35d6c4;
}

.professional-ui .nav-btn .title {
  color: #e7edf3;
  font-size: 13px;
  font-weight: 600;
}

.professional-ui .nav-btn .desc {
  display: none;
}

.professional-ui .nav-icon {
  width: 18px;
  height: 18px;
  color: #91a0af;
}

.professional-ui .nav-btn.active .nav-icon {
  color: #7de2d4;
}

/* Direct subsection navigation keeps long operator pages scannable. The
   primary section stays in the normal sidebar flow and its children appear
   immediately below it, so the hierarchy is visible instead of hidden in a
   distant top-bar tab. */
.professional-ui .sidebar-subnav {
  display: grid;
  gap: 2px;
  margin: 2px 0 7px 18px;
  padding: 4px 0 4px 12px;
  border-left: 1px solid #2e5d5a;
}

.professional-ui .sidebar-subnav-heading {
  margin: 5px 8px 2px;
  color: #687885;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.professional-ui .sidebar-subnav-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  min-height: 30px;
  padding: 5px 8px;
  color: #91a0af;
  border: 1px solid transparent;
  border-radius: 5px;
  background: transparent;
  cursor: pointer;
  font: inherit;
  font-size: 11px;
  text-align: left;
  white-space: normal;
}

.professional-ui .sidebar-subnav-btn:hover,
.professional-ui .sidebar-subnav-btn:focus-visible,
.professional-ui .sidebar-subnav-btn.active {
  color: #dce5ec;
  border-color: #2a4e4d;
  background: #142321;
  outline: 0;
}

.professional-ui .sidebar-subnav-marker {
  flex: 0 0 auto;
  width: 5px;
  height: 5px;
  border: 1px solid #647582;
  border-radius: 50%;
}

.professional-ui .sidebar-subnav-btn.active .sidebar-subnav-marker {
  border-color: #35d6c4;
  background: #35d6c4;
}

.professional-ui .sidebar-subnav-route {
  font-weight: 600;
}

/* Leave room for the sticky top strip when a nested action jumps to a panel. */
.professional-ui [id$="-section"],
.professional-ui [id^="mission-"],
.professional-ui [id^="work-"],
.professional-ui [id^="finding-"],
.professional-ui [id^="automation-"],
.professional-ui [id^="system-"],
.professional-ui [id^="coverage-"],
.professional-ui [id^="blog-"] {
  scroll-margin-top: 112px;
}

.professional-ui .sidebar-footer {
  margin: 22px 6px 0;
  padding: 14px 10px 0;
  border-top-color: #26313c;
  color: #91a0af;
}

.professional-ui .main {
  min-width: 0;
  padding: 0;
  background: #11171d;
  overflow-x: hidden;
}

.professional-ui .top-strip {
  position: sticky;
  top: 0;
  z-index: 20;
  display: block;
  padding: 0 32px;
  background: #11171d;
  border-bottom: 1px solid #26313c;
  box-shadow: none;
}

.professional-ui .topbar-primary,
.professional-ui .topbar-secondary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 54px;
}

.professional-ui .topbar-secondary {
  min-height: 38px;
  justify-content: flex-start;
  color: #8d9baa;
  font-size: 12px;
}

.professional-ui .workspace-context,
.professional-ui .topbar-actions,
.professional-ui .top-strip-live,
.professional-ui .context-nav {
  display: flex;
  align-items: center;
  gap: 10px;
}

.professional-ui .top-strip-live {
  color: #9aa8b7;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0;
}

.professional-ui .workspace-switcher,
.professional-ui .topbar-action,
.professional-ui .top-strip-action {
  min-height: 32px;
  padding: 6px 9px;
  color: #dce5ec;
  border: 1px solid #2a3743;
  border-radius: 6px;
  background: #151d25;
  cursor: pointer;
  font: inherit;
  font-size: 12px;
}

.professional-ui .workspace-switcher:hover,
.professional-ui .topbar-action:hover,
.professional-ui .top-strip-action:hover,
.professional-ui .workspace-switcher:focus-visible,
.professional-ui .topbar-action:focus-visible,
.professional-ui .top-strip-action:focus-visible {
  border-color: #35d6c4;
  outline: 0;
}

.professional-ui .topbar-action {
  color: #aebbc7;
  background: transparent;
  border-color: transparent;
}

.professional-ui .topbar-action kbd,
.professional-ui .command-palette-foot kbd {
  margin-left: 5px;
  padding: 2px 5px;
  color: #8998a7;
  border: 1px solid #354451;
  border-radius: 4px;
  background: #0c1217;
  font: 11px JetBrains Mono, monospace;
}

.professional-ui .health-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #35d6c4;
}

.professional-ui .context-nav {
  margin-left: 8px;
  overflow-x: auto;
}

.professional-ui .context-nav-btn {
  padding: 4px 8px;
  color: #8d9baa;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  white-space: nowrap;
}

.professional-ui .context-nav-btn:hover,
.professional-ui .context-nav-btn.active {
  color: #dce5ec;
  border-bottom-color: #35d6c4;
}

.professional-ui #top-strip-time {
  margin-left: auto;
  color: #6e7d8a;
  font: 11px JetBrains Mono, monospace;
  white-space: nowrap;
}

.professional-ui .page {
  padding: 32px;
}

.professional-ui .page-header {
  margin-bottom: 22px;
}

.professional-ui .page-toolbar {
  display: flex;
  align-items: end;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
  padding: 10px;
  border: 1px solid #293642;
  border-radius: 8px;
  background: #141c23;
}

.professional-ui .page-toolbar label {
  min-width: 150px;
}

.professional-ui .page-toolbar .toolbar-search {
  flex: 1 1 280px;
}

.professional-ui .page-toolbar input,
.professional-ui .page-toolbar select {
  width: 100%;
}

.professional-ui .page-actions,
.professional-ui .view-switcher {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.professional-ui .view-switcher {
  gap: 0;
  padding: 2px;
  border: 1px solid #344452;
  border-radius: 6px;
  background: #0f151b;
}

.professional-ui .view-switch-btn {
  min-height: 29px;
  padding: 5px 9px;
  color: #91a0af;
  border: 0;
  border-radius: 4px;
  background: transparent;
  cursor: pointer;
  font: inherit;
  font-size: 11px;
}

.professional-ui .view-switch-btn.active,
.professional-ui .view-switch-btn:hover {
  color: #e7edf3;
  background: #24343b;
}

.professional-ui .page-header h2 {
  color: #f1f5f8;
  font-size: 24px;
  font-weight: 650;
  letter-spacing: 0;
}

.professional-ui .page-header p,
.professional-ui .small,
.professional-ui .metric-label,
.professional-ui .meta,
.professional-ui .muted-inline {
  color: #9aa8b7;
}

.professional-ui .card,
.professional-ui .metric-card,
.professional-ui .empty-state {
  border: 1px solid #293642;
  border-radius: 8px;
  background: #171f27;
  box-shadow: none;
}

.professional-ui .card h3,
.professional-ui .card h4,
.professional-ui .card h5 {
  color: #edf3f7;
  letter-spacing: 0;
}

.professional-ui input,
.professional-ui select,
.professional-ui textarea {
  min-height: 38px;
  color: #e7edf3;
  border: 1px solid #344452;
  border-radius: 6px;
  background: #0f151b;
}

.professional-ui input:focus,
.professional-ui select:focus,
.professional-ui textarea:focus,
.professional-ui button:focus-visible,
.professional-ui a:focus-visible {
  border-color: #35d6c4;
  outline: 3px solid rgba(53, 214, 196, 0.2);
  outline-offset: 1px;
}

.professional-ui .primary-btn,
.professional-ui .secondary-btn,
.professional-ui .mini-btn,
.professional-ui .danger-btn {
  min-height: 34px;
  border-radius: 6px;
  box-shadow: none;
  font-size: 12px;
}

.professional-ui .primary-btn {
  color: #06211e;
  background: #35d6c4;
  border-color: #35d6c4;
}

.professional-ui .secondary-btn,
.professional-ui .mini-btn {
  color: #dce5ec;
  background: #1b2730;
  border-color: #344452;
}

.professional-ui .danger-btn {
  color: #ffd9de;
  background: #3a1d24;
  border-color: #87414e;
}

.professional-ui .status-pill {
  min-height: 30px;
  padding: 6px 9px;
  color: #c4d0da;
  border: 1px solid #344452;
  border-radius: 6px;
  background: #151d25;
  box-shadow: none;
}

.professional-ui table th {
  color: #9eacb8;
  background: #121920;
  border-bottom-color: #344452;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0;
}

.professional-ui table td {
  color: #dce5ec;
  border-bottom-color: #293642;
}

.professional-ui tr:hover td,
.professional-ui .finding-row.selected-row td {
  background: #1c2931;
}

.professional-ui .operations-cockpit {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(260px, 0.75fr);
  gap: 12px;
  margin-bottom: 16px;
}

.professional-ui .cockpit-panel {
  min-width: 0;
  padding: 16px;
}

.professional-ui .cockpit-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.professional-ui .cockpit-panel h3 {
  margin: 4px 0 0;
  font-size: 15px;
}

.professional-ui .cockpit-items {
  display: grid;
  gap: 6px;
}

.professional-ui .cockpit-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 10px 11px;
  color: #dce5ec;
  border: 1px solid #2e3d49;
  border-left: 3px solid #6e7d8a;
  border-radius: 6px;
  background: #141c23;
  text-align: left;
  cursor: pointer;
}

.professional-ui .cockpit-item:hover { background: #1b2a31; border-color: #47616c; }
.professional-ui .cockpit-item strong,
.professional-ui .cockpit-item small { display: block; }
.professional-ui .cockpit-item strong { font-size: 12px; }
.professional-ui .cockpit-item small { margin-top: 3px; color: #9aa8b7; font-size: 11px; }
.professional-ui .cockpit-item.tone-critical { border-left-color: #f06c79; }
.professional-ui .cockpit-item.tone-high { border-left-color: #f0a84f; }
.professional-ui .cockpit-item.tone-medium { border-left-color: #dfc05d; }
.professional-ui .cockpit-item.tone-info { border-left-color: #62b8cf; }

.professional-ui .cockpit-clear {
  display: grid;
  gap: 4px;
  padding: 12px;
  color: #b9c7d2;
  border: 1px dashed #36505a;
  border-radius: 6px;
  background: #121b21;
  font-size: 12px;
}

.professional-ui .cockpit-clear span { color: #91a0af; }
.professional-ui .cockpit-summary { display: grid; align-content: start; }
.professional-ui .cockpit-summary h3 { margin-bottom: 18px; }
.professional-ui .cockpit-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.professional-ui .cockpit-facts span { display: grid; gap: 3px; min-width: 0; }
.professional-ui .cockpit-facts strong { color: #dce5ec; font-size: 12px; }
.professional-ui .cockpit-facts small { color: #91a0af; font-size: 10px; }

.professional-ui .work-table-wrap { margin-top: 0; }
.professional-ui .table-link {
  padding: 0;
  color: #9cece1;
  border: 0;
  background: transparent;
  cursor: pointer;
  font: inherit;
  font-weight: 650;
  text-align: left;
}
.professional-ui .table-link:hover { text-decoration: underline; }
.professional-ui .severity-label { text-transform: capitalize; }
.professional-ui .severity-urgent,
.professional-ui .severity-critical { color: #ff8f9b; }
.professional-ui .severity-high { color: #f4b96d; }
.professional-ui .severity-normal { color: #a8c4d4; }
.professional-ui .severity-low { color: #93c6e4; }

.toast-region {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 100;
  display: grid;
  gap: 8px;
  width: min(380px, calc(100vw - 32px));
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 12px;
  color: #e7edf3;
  border: 1px solid #344452;
  border-radius: 8px;
  background: #18222a;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
  font-size: 12px;
}

.toast button {
  margin-left: auto;
  color: #91a0af;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.toast-icon {
  display: grid;
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  place-items: center;
  border-radius: 50%;
  background: #2b7470;
  color: #d9fffa;
  font-weight: 700;
}

.toast-error { border-color: #87414e; }
.toast-error .toast-icon { background: #873a49; }
.toast-success { border-color: #2f7067; }

.overlay {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: start center;
  padding: 12vh 20px 20px;
  background: rgba(4, 7, 10, 0.72);
}
.professional-ui .overlay.hidden { display: none; }

.command-palette-card {
  width: min(620px, 100%);
  overflow: hidden;
  border: 1px solid #415361;
  border-radius: 8px;
  background: #151d25;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.48);
}

.command-palette-head,
.help-drawer-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  border-bottom: 1px solid #293642;
}

.command-palette-head h2,
.help-drawer-head h2 {
  margin: 4px 0 0;
  color: #f1f5f8;
  font-size: 18px;
  letter-spacing: 0;
}

.eyebrow {
  color: #7de2d4;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.command-search-label {
  display: block;
  padding: 14px 20px;
}

.command-search-label input {
  width: 100%;
  min-height: 42px;
  font-size: 14px;
}

.command-palette-list {
  max-height: min(440px, 52vh);
  overflow-y: auto;
  padding: 0 10px 10px;
}

.command-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 11px 10px;
  color: #dce5ec;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.command-item:hover,
.command-item.selected {
  border-color: #315a59;
  background: #1b2d32;
}

.command-item strong,
.command-item small {
  display: block;
}

.command-item strong { font-size: 13px; }
.command-item small { margin-top: 3px; color: #91a0af; font-size: 11px; }
.command-item kbd { color: #8d9baa; }
.command-empty { padding: 22px 12px; color: #91a0af; text-align: center; }

.command-palette-foot {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 10px 20px;
  color: #788695;
  border-top: 1px solid #293642;
  font-size: 11px;
}

.help-drawer {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 85;
  width: min(420px, 100vw);
  height: 100vh;
  color: #dce5ec;
  border-left: 1px solid #415361;
  background: #151d25;
  box-shadow: -18px 0 46px rgba(0, 0, 0, 0.38);
}

.help-drawer-body {
  padding: 20px;
  color: #aebbc7;
  font-size: 13px;
  line-height: 1.65;
}

.help-drawer-links {
  display: grid;
  gap: 8px;
  margin-top: 20px;
}

.help-drawer-links a {
  padding: 10px 12px;
  color: #7de2d4;
  border: 1px solid #344452;
  border-radius: 6px;
  text-decoration: none;
}

.help-drawer-links a:hover { background: #1b2d32; }

body.professional-ui.modal-open { overflow: hidden; }
.professional-ui .intelligence-result-modal-card {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: min(1120px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  padding: 0;
  overflow: hidden;
  border-color: #41515e;
  border-radius: 8px;
  background: #111920;
}

.professional-ui .intelligence-result-head,
.professional-ui .intelligence-result-actions {
  margin: 0;
  padding: 18px 20px;
  background: #111920;
}

.professional-ui .intelligence-result-head {
  border-bottom: 1px solid #2b3945;
}

.professional-ui .intelligence-result-head h3 {
  margin: 3px 0 0;
  color: #f1f5f8;
  font-size: 20px;
}

.professional-ui .intelligence-result-actions {
  border-top: 1px solid #2b3945;
}

.professional-ui .intelligence-result-body {
  min-height: 0;
  padding: 20px;
  overflow-y: auto;
}

.professional-ui .intelligence-result-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.professional-ui .intelligence-result-meta span {
  padding: 4px 8px;
  color: #aebbc7;
  border: 1px solid #344452;
  border-radius: 4px;
  background: #151f27;
  font-size: 11px;
}

.professional-ui .intelligence-verdict {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  padding: 13px 14px;
  border: 1px solid #397068;
  border-left: 4px solid #35d6c4;
  border-radius: 6px;
  background: #142523;
}

.professional-ui .intelligence-verdict span {
  color: #9fb0bc;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.professional-ui .intelligence-verdict strong { color: #f1f5f8; }
.professional-ui .intelligence-verdict b { color: #7de2d4; font-size: 12px; }

.professional-ui .intelligence-result-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.professional-ui .intelligence-result-section {
  min-width: 0;
  padding: 15px 16px;
  border: 1px solid #2b3945;
  border-radius: 6px;
  background: #151f27;
}

.professional-ui .intelligence-result-section.wide { grid-column: 1 / -1; }
.professional-ui .intelligence-result-section.tone-fact { border-left: 3px solid #36b37e; }
.professional-ui .intelligence-result-section.tone-warning { border-left: 3px solid #e4ad42; }
.professional-ui .intelligence-result-section.tone-gap { border-left: 3px solid #d96d7a; }
.professional-ui .intelligence-result-section.tone-action { border-left: 3px solid #62b8cf; }
.professional-ui .intelligence-result-section.tone-decision { border-left: 3px solid #35d6c4; }

.professional-ui .intelligence-result-section h4 {
  margin: 0 0 10px;
  color: #f1f5f8;
  font-size: 13px;
}

.professional-ui .intelligence-result-section p,
.professional-ui .intelligence-result-list {
  margin: 0;
  color: #c5d0d9;
  font-size: 13px;
  line-height: 1.65;
}

.professional-ui .intelligence-result-list {
  display: grid;
  gap: 8px;
  padding-left: 20px;
}

.professional-ui .intelligence-result-empty { color: #8796a3; }
.professional-ui .intelligence-result-draft,
.professional-ui .intelligence-result-json {
  max-height: 420px;
  margin: 0;
  padding: 13px;
  overflow: auto;
  color: #d6e0e7;
  border: 1px solid #344452;
  border-radius: 4px;
  background: #0b1116;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 12px;
  line-height: 1.55;
}

.professional-ui .intelligence-result-section details summary {
  color: #7de2d4;
  cursor: pointer;
}

.professional-ui .intelligence-result-section details[open] summary { margin-bottom: 10px; }
.professional-ui .intelligence-full-analysis { margin-top: 14px; border-top: 1px solid #2b3945; }
.professional-ui .intelligence-full-analysis > summary { padding: 13px 2px; color: #7de2d4; cursor: pointer; font-size: 12px; font-weight: 700; }
.professional-ui .intelligence-decision-card { margin: 14px 0 4px; padding: 18px; border: 1px solid #397068; border-left: 4px solid #35d6c4; border-radius: 8px; background: linear-gradient(135deg, #142523 0%, #162b2b 100%); }
.professional-ui .intelligence-decision-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.professional-ui .intelligence-decision-card-head strong { display: block; margin-top: 4px; color: #f1f5f8; font-size: 20px; }
.professional-ui .intelligence-decision-card-head p { max-width: 800px; margin: 8px 0 0; color: #c5d0d9; line-height: 1.55; }
.professional-ui .decision-card-badge { flex: 0 0 auto; padding: 5px 9px; border: 1px solid #73bda9; border-radius: 999px; color: #7de2d4; font-size: 11px; font-weight: 700; text-transform: uppercase; }
.professional-ui .intelligence-decision-metrics { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; margin-top: 16px; }
.professional-ui .intelligence-decision-metrics > div { min-width: 0; padding: 9px 10px; border: 1px solid #31544e; border-radius: 5px; background: rgba(8, 17, 22, .28); }
.professional-ui .intelligence-decision-metrics span { display: block; color: #9fb0bc; font-size: 10px; font-weight: 700; text-transform: uppercase; }
.professional-ui .intelligence-decision-metrics b { display: block; margin-top: 4px; color: #f1f5f8; font-size: 13px; overflow-wrap: anywhere; }
.professional-ui .intelligence-decision-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 18px; margin-top: 14px; }
.professional-ui .intelligence-decision-columns > div { min-width: 0; max-width: 100%; }
.professional-ui .intelligence-decision-columns h4 { margin: 0 0 6px; color: #f1f5f8; font-size: 12px; }
.professional-ui .intelligence-decision-columns p, .professional-ui .intelligence-decision-columns .intelligence-result-list { margin: 0; color: #c5d0d9; font-size: 12px; line-height: 1.5; }
.professional-ui .intelligence-decision-columns :is(p, ol, ul, li) {
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.professional-ui .intelligence-decision-columns .intelligence-result-list { padding-left: 20px; }
.professional-ui .intelligence-decision-next {
  grid-column: 1 / -1;
  padding-top: 12px;
  border-top: 1px solid #31544e;
}
.professional-ui .intelligence-stage-list { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.professional-ui .intelligence-stage { display: inline-flex; align-items: center; gap: 4px; padding: 3px 6px; border: 1px solid #344452; border-radius: 4px; color: #c5d0d9; font-size: 11px; }
.professional-ui .intelligence-stage.stage-succeeded, .professional-ui .intelligence-stage.stage-completed { border-color: #397068; color: #7de2d4; }
.professional-ui .intelligence-stage.stage-failed { border-color: #9f3d4d; color: #ffb3bb; }
.professional-ui .intelligence-child-jobs { margin-top: 8px; }
.professional-ui .intelligence-child-jobs > summary { color: #7de2d4; cursor: pointer; font-size: 11px; }
.professional-ui .intelligence-child-job { display: flex; justify-content: space-between; gap: 8px; padding: 8px 0; border-top: 1px solid #2b3945; color: #c5d0d9; font-size: 11px; }
.professional-ui .intelligence-child-job > span:last-child { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 5px; }
.professional-ui .research-decision-card { margin: 16px 0; padding: 18px; border: 1px solid #b9c9c1; border-left: 4px solid #0b8068; border-radius: 8px; background: #f6f9f7; }
.professional-ui .research-decision-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.professional-ui .research-decision-head h4 { margin: 5px 0 0; color: #17392f; font-size: 20px; }
.professional-ui .research-decision-head p { max-width: 800px; margin: 7px 0 0; color: #40524b; line-height: 1.55; }
.professional-ui .research-decision-metrics { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; margin-top: 16px; }
.professional-ui .research-decision-metrics > div { min-width: 0; padding: 9px 10px; border: 1px solid #cbd8d2; border-radius: 5px; background: #fff; }
.professional-ui .research-decision-metrics span { display: block; color: #687770; font-size: 10px; font-weight: 700; text-transform: uppercase; }
.professional-ui .research-decision-metrics b { display: block; margin-top: 4px; color: #17392f; font-size: 13px; overflow-wrap: anywhere; }
.professional-ui .research-decision-columns { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 14px; }
.professional-ui .research-decision-columns h5 { margin: 0 0 6px; color: #17392f; font-size: 12px; }
.professional-ui .research-decision-columns p, .professional-ui .research-decision-columns .blog-blocker-list { margin: 0; color: #40524b; font-size: 12px; line-height: 1.5; }
@media (max-width: 900px) {
  .professional-ui .intelligence-decision-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .professional-ui .intelligence-decision-columns { grid-template-columns: 1fr; }
  .professional-ui .intelligence-decision-next { grid-column: auto; }
  .professional-ui .research-decision-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .professional-ui .research-decision-columns { grid-template-columns: 1fr; }
}
.professional-ui .confirm-dialog-card { width: min(520px, calc(100vw - 32px)); }
.professional-ui .confirm-dialog-message { margin: 0; color: #e4ebf0; font-size: 15px; line-height: 1.55; }
.professional-ui .confirm-dialog-context { margin-top: 14px; padding: 11px 12px; color: #aebbc7; border-left: 3px solid #62b8cf; background: #1b252d; font-size: 12px; line-height: 1.55; }
.professional-ui .confirm-dialog-card .danger-btn { background: #9f3d4d; border-color: #c15c6c; color: #fff7f8; }
.professional-ui .confirm-dialog-card .danger-btn:hover { background: #b24758; }

@media (max-width: 1024px) {
  .professional-ui .app-shell { grid-template-columns: 220px minmax(0, 1fr); }
  .professional-ui .page { padding: 24px; }
  .professional-ui .top-strip { padding: 0 24px; }
  .professional-ui .operations-cockpit { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .professional-ui .app-shell { display: block; }
  .professional-ui .sidebar { position: fixed; inset: 0 auto 0 0; z-index: 40; width: 280px; transform: translateX(-100%); transition: transform 160ms ease; }
  .professional-ui.mobile-nav-open .sidebar { transform: translateX(0); }
  .professional-ui .nav-list { max-height: 0; overflow-y: hidden; }
  .professional-ui.mobile-nav-open .nav-list { max-height: calc(100vh - 88px); overflow-y: auto; }
  .professional-ui .main { min-height: 100vh; }
  .professional-ui .top-strip { padding: 0 16px; }
  .professional-ui .topbar-primary { min-height: 52px; }
  .professional-ui .topbar-secondary { min-height: 36px; }
  .professional-ui .topbar-actions .topbar-action:not(#top-help-btn) { display: none; }
  .professional-ui .page { padding: 20px 16px 32px; }
  .professional-ui .page-header { display: block; }
  .professional-ui .page-header .page-actions,
  .professional-ui .page-header > .status-pill { margin-top: 14px; }
  .professional-ui .context-nav { max-width: calc(100vw - 100px); }
  .professional-ui #top-strip-time { display: none; }
  .professional-ui .grid.cols-2,
  .professional-ui .grid.cols-3,
  .professional-ui .grid.cols-4,
  .professional-ui .grid.cols-5 { grid-template-columns: 1fr; }
  .professional-ui .intelligence-result-modal-card {
    width: 100%;
    max-height: calc(100vh - 16px);
  }
  .professional-ui .intelligence-result-grid { grid-template-columns: 1fr; }
  .professional-ui .intelligence-result-section.wide { grid-column: auto; }
  .professional-ui .intelligence-verdict { grid-template-columns: 1fr; gap: 5px; }
  .professional-ui .intelligence-result-actions { align-items: stretch; flex-direction: column; }
  .professional-ui .intelligence-result-actions .modal-actions-right { display: grid; }
  .professional-ui .intelligence-result-actions button { width: 100%; }
  .professional-ui .table-wrap { overflow-x: hidden; }
  .professional-ui table thead { display: none; }
  .professional-ui table,
  .professional-ui table tbody,
  .professional-ui table tr,
  .professional-ui table td { display: block; width: 100%; }
  .professional-ui table tr { padding: 10px 0; border-bottom: 1px solid #293642; }
  .professional-ui table td { display: flex; justify-content: space-between; gap: 12px; padding: 5px 10px; border: 0; }
  .professional-ui table td:first-child { display: block; }
  .professional-ui .kanban { overflow-x: auto; }
  .professional-ui .topbar-primary .workspace-context { min-width: 0; }
  .professional-ui .workspace-switcher { max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}

@media (prefers-reduced-motion: reduce) {
  .professional-ui * { scroll-behavior: auto !important; transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

/* ══════════════════════════════════════════════════════════════
   ASD S1000D CONSOLE THEME
   Technical-publication operator console: flat paper, 1px rules,
   squared corners, monospace identifiers, color for meaning only.
   This layer intentionally overrides the decorative theme above.
   ══════════════════════════════════════════════════════════════ */
:root {
  --bg: #FBFAF6;
  --bg-soft: #FFFFFF;
  --bg-panel: #FFFFFF;
  --card: #FFFFFF;
  --card-muted: #FBFAF6;
  --border: #C9CDD2;
  --border-strong: #9BA2AA;
  --text: #16191D;
  --muted: #67707B;
  --muted-strong: #3E4650;

  --cyan: #0F4C81;
  --blue: #0F4C81;
  --purple: #3E4650;
  --indigo: #0F4C81;
  --amber: #8A5A00;
  --green: #1E6B3A;
  --red: #9E1B1B;
  --shadow-soft: none;
  --shadow-strong: none;

  --status-queued: #0F4C81;
  --status-running: #0F4C81;
  --status-completed: #1E6B3A;
  --status-failed: #9E1B1B;
  --status-cancelled: #67707B;
  --status-blocked: #9E1B1B;
  --status-review: #8A5A00;
  --status-picked-up: #3E4650;
  --status-needs-review: #8A5A00;
  --status-completed-with-gaps: #8A5A00;

  --asd-note: #0F4C81;
  --asd-note-bg: #EDF3F9;
  --asd-mono: "IBM Plex Mono", "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
}

body {
  background: var(--bg);
  font-family: 'Inter', system-ui, sans-serif;
}

/* ── Sidebar: light data-module rail ─────────────────────── */
.sidebar {
  background: #FFFFFF;
  color: var(--text);
  border-right: 1px solid var(--border-strong);
  box-shadow: none;
}
.brand-badge {
  border-radius: 2px;
  background: #16191D;
  box-shadow: none;
  font-family: var(--asd-mono);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
}
.brand h1 { color: var(--text); font-family: var(--asd-mono); letter-spacing: 0.1em; font-size: 0.95rem; }
.brand p { color: var(--muted); font-family: var(--asd-mono); font-size: 0.68rem; letter-spacing: 0.08em; text-transform: uppercase; }

.nav-list { gap: 4px; }
.nav-btn {
  border: 1px solid transparent;
  border-radius: 2px;
  color: var(--text);
  text-align: left;
}
.nav-btn:hover { background: var(--asd-note-bg); border-color: transparent; }
.nav-btn.active {
  background: #16191D;
  border-color: #16191D;
  box-shadow: none;
  color: #FBFAF6;
}
.nav-btn.active .title { color: #FBFAF6; }
.nav-btn.active .desc { color: rgba(251, 250, 246, 0.72); }
.nav-btn .title { font-weight: 600; }
.nav-btn .desc { color: var(--muted); }

.sidebar-footer {
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-family: var(--asd-mono);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
}

/* ── Page chrome ─────────────────────────────────────────── */
.main { background: var(--bg); }
.page-header h2 {
  font-size: 1.4rem;
  letter-spacing: -0.01em;
  padding-bottom: 8px;
  width: 100%;
}
.page-header p { font-size: 0.9rem; }
.page { animation: none; }

/* ── Cards: flat ruled panels ────────────────────────────── */
.card,
.metric-card,
.panel,
.triage-ops-auth-card {
  border: 1px solid var(--border-strong);
  border-radius: 2px;
  background: var(--card);
  box-shadow: none;
}
.card:hover { box-shadow: none; }
.metric-card .metric { color: var(--text); }
.metric-card .metric-label {
  font-family: var(--asd-mono);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ── Buttons: squared functional controls ────────────────── */
.primary-btn,
.secondary-btn,
.mini-btn,
button {
  border-radius: 2px;
  font-family: var(--asd-mono);
  letter-spacing: 0.06em;
}
.primary-btn {
  background: #16191D;
  border: 1px solid #16191D;
  color: #FBFAF6;
  box-shadow: none;
  text-transform: uppercase;
  font-size: 0.72rem;
}
.primary-btn:hover { background: var(--asd-note); border-color: var(--asd-note); box-shadow: none; }
.secondary-btn {
  background: transparent;
  border: 1px solid var(--border-strong);
  color: var(--text);
  box-shadow: none;
  text-transform: uppercase;
  font-size: 0.72rem;
}
.secondary-btn:hover { background: var(--asd-note-bg); border-color: var(--asd-note); color: var(--asd-note); box-shadow: none; }
.mini-btn {
  border: 1px solid var(--border-strong);
  background: var(--card);
  color: var(--muted-strong);
  font-size: 0.68rem;
  box-shadow: none;
}
.mini-btn:hover { background: var(--asd-note-bg); color: var(--asd-note); border-color: var(--asd-note); }

/* ── Status pills: squared semantic tags ─────────────────── */
.status-pill {
  border-radius: 2px;
  border: 1px solid var(--border);
  background: var(--card);
  box-shadow: none;
  font-family: var(--asd-mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 6px 10px;
}
.dot { border-radius: 0; box-shadow: none; width: 8px; height: 8px; }

/* ── Forms ───────────────────────────────────────────────── */
input, select, textarea {
  border: 1px solid var(--border-strong);
  border-radius: 2px;
  background: var(--card);
  color: var(--text);
  font-family: 'Inter', system-ui, sans-serif;
}
input:focus, select:focus, textarea:focus {
  outline: 2px solid var(--asd-note-bg);
  border-color: var(--asd-note);
}
label .small, .small { color: var(--muted); }

/* ── Tables ──────────────────────────────────────────────── */
table { font-size: 0.85rem; }
thead th {
  font-family: var(--asd-mono);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
  background: var(--card-muted);
}
td { border-bottom: 1px solid var(--border); }

/* ── Top strip / context nav / drawers ───────────────────── */
.top-strip,
.topbar-primary {
  background: #FFFFFF;
  border-bottom: 2px solid var(--text);
  box-shadow: none;
}
.context-nav-btn {
  border-radius: 2px;
  font-family: var(--asd-mono);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted-strong);
}
.context-nav-btn.active, .context-nav-btn:hover {
  background: #16191D;
  color: #FBFAF6;
  border-color: #16191D;
}
.help-drawer, .command-palette, .modal, .confirm-dialog {
  border: 1px solid var(--border-strong);
  border-radius: 2px;
  box-shadow: none;
  background: var(--card);
}
.kbd, kbd {
  font-family: var(--asd-mono);
  border: 1px solid var(--border-strong);
  border-radius: 2px;
  background: var(--card-muted);
  box-shadow: none;
}
code, pre, .mono {
  font-family: var(--asd-mono);
}
pre {
  border: 1px solid var(--border-strong);
  border-radius: 2px;
  background: var(--card-muted);
}

/* Intelligence integrations: one operator surface for the local bridge and hosted MCP app. */
.intelligence-console {
  margin-top: 24px;
  padding: 20px;
  border: 1px solid var(--border-strong);
  border-top: 3px solid var(--text);
  background: var(--card);
}

.intelligence-console-head,
.intelligence-module .module-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.intelligence-console-head h3,
.intelligence-module h4 {
  margin: 0;
  color: var(--text);
  letter-spacing: 0;
}

.intelligence-console-head p,
.intelligence-module .module-head p {
  max-width: 760px;
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.55;
}

.section-kicker {
  margin-bottom: 7px;
  color: var(--asd-note);
  font: 700 0.62rem var(--asd-mono);
  letter-spacing: 0.12em;
}

.intelligence-summary {
  margin-top: 18px;
}

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

.intelligence-module {
  min-width: 0;
  margin-top: 14px;
  padding: 16px;
  border: 1px solid var(--border-strong);
  background: var(--card-muted);
}

.intelligence-grid .intelligence-module {
  margin-top: 0;
}

.intelligence-module .kv-list {
  margin-top: 14px;
}

.intelligence-provider-section {
  display: grid;
  gap: 8px;
  border-top: 1px solid rgba(74, 78, 85, 0.34);
  padding-top: 10px;
}

.intelligence-provider-heading {
  font-weight: 700;
}

.intelligence-provider-list {
  display: grid;
  gap: 8px;
  min-width: 0;
  text-align: left;
}

.intelligence-provider-row {
  display: grid;
  grid-template-columns: minmax(220px, 0.9fr) minmax(240px, 1.1fr);
  align-items: start;
  gap: 12px 20px;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: var(--card);
}

.intelligence-provider-model {
  min-width: 0;
  color: var(--text);
  font: 700 0.78rem/1.45 "JetBrains Mono", monospace;
  overflow-wrap: anywhere;
}

.intelligence-provider-health {
  min-width: 0;
  color: var(--muted-strong);
  font-size: 0.8rem;
  line-height: 1.45;
}

.intelligence-provider-health .small {
  margin-top: 3px;
}

.intelligence-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 15px;
}

.intelligence-request-grid {
  display: grid;
  grid-template-columns: minmax(180px, 1.1fr) minmax(220px, 1.3fr) auto;
  align-items: end;
  gap: 10px;
  margin-top: 16px;
}

.intelligence-autopilot-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.intelligence-autopilot-grid label:not(.toggle-row) {
  display: grid;
  gap: 7px;
}

.investigation-autopilot .table-wrap { margin-top: 14px; }
.investigation-autopilot td { vertical-align: top; }
.investigation-blocker { color: var(--warning, #8a5a00); max-width: 42rem; margin-top: 4px; }
.investigation-autopilot td:last-child { white-space: normal; min-width: 10rem; }
.investigation-autopilot td:last-child .mini-btn { margin: 0 6px 6px 0; }
.detection-learning .table-wrap { margin-top: 14px; }
.detection-learning td { vertical-align: top; }
.detection-learning td:last-child .mini-btn { margin: 0 6px 6px 0; }

.intelligence-autopilot-grid label > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.intelligence-autopilot-grid .toggle-row {
  grid-column: 1 / -1;
  align-items: center;
  display: flex;
  gap: 9px;
  min-height: 36px;
}

.intelligence-boundary-note {
  border-left: 3px solid var(--accent);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
  margin: 14px 0;
  padding: 8px 12px;
}

.agent-triage-action {
  font-weight: 700;
}

.agent-triage-reasons {
  max-width: 520px;
}

@media (max-width: 960px) {
  .intelligence-autopilot-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

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

.intelligence-request-grid label {
  min-width: 0;
}

.intelligence-request-grid label > span,
.intelligence-credential-field > span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted-strong);
  font: 600 0.68rem var(--asd-mono);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.intelligence-credential-field {
  display: block;
  margin-top: 15px;
}

.intelligence-credential-field input {
  width: 100%;
}

.intelligence-request-grid input,
.intelligence-request-grid select {
  width: 100%;
}

.intelligence-log {
  max-height: 260px;
  margin-top: 14px;
  overflow: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.intelligence-job-result {
  max-width: 640px;
  margin-top: 8px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

@media (max-width: 1120px) {
  .intelligence-grid,
  .intelligence-request-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 760px) {
  .intelligence-console {
    padding: 14px;
  }

  .intelligence-console-head,
  .intelligence-module .module-head {
    flex-direction: column;
    gap: 10px;
  }

  .intelligence-grid,
  .intelligence-request-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .intelligence-provider-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 5px;
  }

  .intelligence-actions > *,
  .intelligence-request-grid > button {
    width: 100%;
    justify-content: center;
  }
}

/* ── Notices → S1000D callouts ───────────────────────────── */
.error, .notice-error {
  border: 1px solid var(--red);
  border-left-width: 3px;
  border-radius: 2px;
  background: #FAECEC;
  color: var(--red);
}
.empty-state, .empty-state.compact {
  border: 1px dashed var(--border-strong);
  border-radius: 2px;
  background: transparent;
  color: var(--muted);
}

/* ── Scrollbars & misc ───────────────────────────────────── */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 0; }
::-webkit-scrollbar-track { background: transparent; }

a { color: var(--asd-note); }
a:hover { text-decoration: underline; }

/* Severity accents stay semantic */
.severity-critical, .critical { color: #7A1010; }
.severity-high, .high { color: var(--red); }
.severity-medium, .medium { color: var(--amber); }
.severity-low, .low, .info { color: var(--asd-note); }

/* Enterprise Security workspace */
#page-enterprise {
  --enterprise-ink: #11151a;
  --enterprise-blue: #116a8a;
  --enterprise-blue-soft: #eaf5f8;
  --enterprise-green: #17633a;
  --enterprise-green-soft: #eaf5ee;
  --enterprise-amber: #8a5a00;
  --enterprise-amber-soft: #fff5dc;
  --enterprise-red: #941f1f;
  --enterprise-red-soft: #faecec;
  max-width: 1560px;
  margin: 0 auto;
}

#page-enterprise .enterprise-workspace-header {
  align-items: flex-end;
  margin-bottom: 18px;
  padding-bottom: 18px;
  border-bottom: 2px solid var(--enterprise-ink);
}

#page-enterprise .enterprise-workspace-header h2 {
  padding: 0;
  font-size: clamp(1.55rem, 2vw, 2.15rem);
  letter-spacing: -0.035em;
}

#page-enterprise .enterprise-workspace-header p {
  max-width: 840px;
  margin-top: 6px;
}

#page-enterprise .enterprise-refreshed {
  margin-top: 9px;
  color: var(--muted);
  font-family: var(--asd-mono);
  font-size: 0.66rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

#page-enterprise .enterprise-readiness {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid var(--border-strong);
  background: #fff;
}

#page-enterprise .enterprise-readiness-item {
  position: relative;
  min-width: 0;
  min-height: 118px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  padding: 18px 20px 16px;
  border-right: 1px solid var(--border);
}

#page-enterprise .enterprise-readiness-item:last-child { border-right: 0; }
#page-enterprise .enterprise-readiness-item::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: var(--border-strong);
}
#page-enterprise .enterprise-readiness-item.tone-good::before { background: var(--enterprise-green); }
#page-enterprise .enterprise-readiness-item.tone-warning::before { background: var(--enterprise-amber); }
#page-enterprise .enterprise-readiness-item.tone-danger::before { background: var(--enterprise-red); }
#page-enterprise .enterprise-readiness-label {
  color: var(--muted);
  font-family: var(--asd-mono);
  font-size: 0.62rem;
  font-weight: 650;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}
#page-enterprise .enterprise-readiness-item strong {
  color: var(--enterprise-ink);
  font-size: clamp(1.05rem, 1.6vw, 1.35rem);
  letter-spacing: -0.025em;
}
#page-enterprise .enterprise-readiness-item > span:last-child {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.4;
}

#page-enterprise .enterprise-safety {
  display: flex;
  align-items: center;
  min-height: 42px;
  margin-top: 10px;
  padding: 10px 14px;
  border-left: 3px solid var(--enterprise-blue);
  background: var(--enterprise-blue-soft);
  color: #27424c;
  font-size: 0.8rem;
  line-height: 1.45;
}
#page-enterprise .enterprise-safety.tone-good { border-left-color: var(--enterprise-green); background: var(--enterprise-green-soft); color: #244b34; }
#page-enterprise .enterprise-safety.tone-warning { border-left-color: var(--enterprise-amber); background: var(--enterprise-amber-soft); color: #59400c; }
#page-enterprise .enterprise-safety.tone-danger { border-left-color: var(--enterprise-red); background: var(--enterprise-red-soft); color: var(--enterprise-red); }
#page-enterprise .enterprise-safety.compact { margin-top: 0; }

#page-enterprise .enterprise-tabs {
  display: flex;
  gap: 28px;
  margin: 28px 0 18px;
  border-bottom: 1px solid var(--border-strong);
}
#page-enterprise .enterprise-tab {
  position: relative;
  padding: 0 2px 12px;
  border: 0;
  background: transparent;
  color: #9ba8b3;
  font-family: var(--asd-mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
}
#page-enterprise .enterprise-tab::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 3px;
  background: transparent;
}
#page-enterprise .enterprise-tab:hover { color: #d8e5ea; }
#page-enterprise .enterprise-tab.active { color: #f6f8f9; }
#page-enterprise .enterprise-tab.active::after { background: var(--enterprise-blue); }

#page-enterprise .enterprise-view { min-width: 0; }
#page-enterprise .enterprise-setup {
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr) auto;
  gap: 20px;
  align-items: center;
  margin-bottom: 16px;
  padding: 20px;
  background: var(--enterprise-ink);
  color: #f9fafb;
}
#page-enterprise .enterprise-setup-mark { align-self: stretch; background: #1eb3ce; }
#page-enterprise .enterprise-setup-copy h3 { margin: 0 0 5px; font-size: 1.03rem; }
#page-enterprise .enterprise-setup-copy p { margin: 0; color: #b7c0c9; font-size: 0.84rem; line-height: 1.5; }
#page-enterprise .enterprise-setup-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
#page-enterprise .enterprise-setup .primary-btn { background: #f7fafc; border-color: #f7fafc; color: var(--enterprise-ink); }
#page-enterprise .enterprise-setup .secondary-btn { border-color: #66707a; color: #e5e9ed; }
#page-enterprise .enterprise-setup .secondary-btn:hover { background: #26303a; color: #fff; }

#page-enterprise .enterprise-monitor-layout {
  display: grid;
  grid-template-columns: minmax(0, 2.35fr) minmax(280px, 0.9fr);
  gap: 16px;
  align-items: start;
}
#page-enterprise .enterprise-monitor-main { display: grid; gap: 16px; min-width: 0; }
#page-enterprise .enterprise-surface {
  min-width: 0;
  border: 1px solid var(--border-strong);
  background: #fff;
}
#page-enterprise .enterprise-section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
  background: #fbfbf8;
}
#page-enterprise .enterprise-section-head h3 { margin: 0; color: var(--enterprise-ink); font-size: 0.97rem; }
#page-enterprise .enterprise-section-head p { max-width: 760px; margin: 4px 0 0; color: var(--muted); font-size: 0.78rem; line-height: 1.45; }

#page-enterprise .enterprise-connector-row {
  display: grid;
  grid-template-columns: 40px minmax(180px, 1.35fr) minmax(230px, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
}
#page-enterprise .enterprise-connector-row:last-child { border-bottom: 0; }
#page-enterprise .enterprise-connector-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border-strong);
  background: #f7f7f3;
  color: var(--enterprise-ink);
  font-family: var(--asd-mono);
  font-size: 0.62rem;
  font-weight: 750;
  letter-spacing: 0.04em;
}
#page-enterprise .enterprise-connector-row > div:nth-child(2) { min-width: 0; display: grid; gap: 3px; }
#page-enterprise .enterprise-connector-row > div:nth-child(2) strong { color: var(--enterprise-ink); font-size: 0.86rem; }
#page-enterprise .enterprise-connector-row > div:nth-child(2) span { color: var(--muted); font-size: 0.74rem; line-height: 1.35; }
#page-enterprise .enterprise-connector-state { min-width: 0; display: grid; gap: 4px; justify-items: start; }
#page-enterprise .enterprise-connector-state small { color: var(--muted); font-size: 0.69rem; line-height: 1.35; }

#page-enterprise .enterprise-state {
  display: inline-flex;
  align-items: center;
  width: max-content;
  max-width: 100%;
  padding: 4px 7px;
  border: 1px solid var(--border-strong);
  background: #f7f7f3;
  color: var(--muted-strong);
  font-family: var(--asd-mono);
  font-size: 0.59rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  line-height: 1.2;
  text-transform: uppercase;
}
#page-enterprise .enterprise-state.tone-good { border-color: #86b99a; background: var(--enterprise-green-soft); color: var(--enterprise-green); }
#page-enterprise .enterprise-state.tone-warning { border-color: #d6b56c; background: var(--enterprise-amber-soft); color: var(--enterprise-amber); }
#page-enterprise .enterprise-state.tone-danger { border-color: #d49b9b; background: var(--enterprise-red-soft); color: var(--enterprise-red); }

#page-enterprise .enterprise-next-actions { padding-bottom: 0; }
#page-enterprise #enterprise-next-actions { display: grid; }
#page-enterprise .enterprise-next-action {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 13px 18px;
  border: 0;
  border-bottom: 1px solid var(--border);
  background: #fff;
  color: var(--enterprise-ink);
  text-align: left;
  cursor: pointer;
}
#page-enterprise .enterprise-next-action:last-child { border-bottom: 0; }
#page-enterprise .enterprise-next-action:hover { background: var(--enterprise-blue-soft); }
#page-enterprise .enterprise-next-action > span:first-child {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  background: var(--enterprise-ink);
  color: #fff;
  font-family: var(--asd-mono);
  font-size: 0.62rem;
}
#page-enterprise .enterprise-next-action > span:nth-child(2) { display: grid; gap: 2px; }
#page-enterprise .enterprise-next-action strong { font-size: 0.82rem; }
#page-enterprise .enterprise-next-action small { color: var(--muted); font-size: 0.72rem; line-height: 1.35; }
#page-enterprise .enterprise-next-action b { color: var(--enterprise-blue); font-family: var(--asd-mono); }

#page-enterprise .enterprise-activity { position: sticky; top: 18px; }
#page-enterprise .enterprise-activity .enterprise-section-head { align-items: center; }
#page-enterprise .enterprise-activity .enterprise-section-head select { max-width: 130px; padding: 6px 8px; font-size: 0.7rem; }
#page-enterprise .enterprise-activity-item {
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr);
  gap: 10px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--border);
}
#page-enterprise .enterprise-activity-dot { width: 7px; height: 7px; margin-top: 5px; background: var(--border-strong); }
#page-enterprise .enterprise-activity-dot.tone-good { background: var(--enterprise-green); }
#page-enterprise .enterprise-activity-dot.tone-warning { background: var(--enterprise-amber); }
#page-enterprise .enterprise-activity-dot.tone-danger { background: var(--enterprise-red); }
#page-enterprise .enterprise-activity-item > div { min-width: 0; display: grid; gap: 2px; }
#page-enterprise .enterprise-activity-item strong { overflow: hidden; color: var(--enterprise-ink); font-size: 0.77rem; text-overflow: ellipsis; white-space: nowrap; }
#page-enterprise .enterprise-activity-item span { overflow: hidden; color: var(--muted); font-family: var(--asd-mono); font-size: 0.59rem; text-overflow: ellipsis; white-space: nowrap; }
#page-enterprise .enterprise-activity-item time { grid-column: 2; color: var(--muted); font-family: var(--asd-mono); font-size: 0.58rem; }
#page-enterprise #enterprise-activity-summary { padding: 10px 16px; color: var(--muted); font-family: var(--asd-mono); font-size: 0.6rem; text-transform: uppercase; }

#page-enterprise .enterprise-empty { display: grid; gap: 5px; padding: 22px 18px; color: var(--muted); }
#page-enterprise .enterprise-empty strong { color: var(--muted-strong); font-size: 0.82rem; }
#page-enterprise .enterprise-empty span { font-size: 0.75rem; line-height: 1.45; }

#page-enterprise .enterprise-inline-drawer,
#page-enterprise .enterprise-recovery {
  border-top: 1px solid var(--border);
  background: #fcfcf9;
}
#page-enterprise .enterprise-inline-drawer > summary,
#page-enterprise .enterprise-recovery > summary,
#page-enterprise .enterprise-advanced-options > summary {
  padding: 13px 18px;
  color: var(--enterprise-blue);
  font-family: var(--asd-mono);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
}
#page-enterprise .enterprise-inline-drawer[open] > summary { border-bottom: 1px solid var(--border); }
#page-enterprise .enterprise-inline-drawer > p,
#page-enterprise .enterprise-inline-drawer > .enterprise-form-grid,
#page-enterprise .enterprise-inline-drawer > .enterprise-form-actions,
#page-enterprise .enterprise-inline-drawer > .enterprise-result,
#page-enterprise .enterprise-inline-drawer > .enterprise-followups,
#page-enterprise .enterprise-inline-drawer > .intelligence-log,
#page-enterprise .enterprise-inline-drawer > .enterprise-advanced-options { margin-left: 18px; margin-right: 18px; }
#page-enterprise .enterprise-inline-drawer > p { color: var(--muted); font-size: 0.77rem; line-height: 1.5; }

#page-enterprise .enterprise-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 13px;
  padding: 18px;
}
#page-enterprise .enterprise-inline-drawer .enterprise-form-grid { padding-left: 0; padding-right: 0; }
#page-enterprise .enterprise-form-grid label,
#page-enterprise .enterprise-block-label {
  min-width: 0;
  display: grid;
  gap: 6px;
  color: var(--muted-strong);
  font-size: 0.76rem;
  font-weight: 620;
}
#page-enterprise .enterprise-form-grid label > span,
#page-enterprise .enterprise-block-label > span {
  font-family: var(--asd-mono);
  font-size: 0.62rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
#page-enterprise .enterprise-form-grid input,
#page-enterprise .enterprise-form-grid select,
#page-enterprise .enterprise-form-grid textarea,
#page-enterprise .enterprise-block-label textarea {
  width: 100%;
  min-width: 0;
  padding: 10px 11px;
  font-size: 0.8rem;
  line-height: 1.45;
  resize: vertical;
}
#page-enterprise .enterprise-span-2 { grid-column: 1 / -1; }
#page-enterprise .enterprise-block-label { margin: 18px; }
#page-enterprise .enterprise-check,
#page-enterprise .enterprise-checks label { display: flex !important; flex-direction: row; align-items: center; gap: 8px; }
#page-enterprise .enterprise-check input,
#page-enterprise .enterprise-checks input { width: auto; }
#page-enterprise .enterprise-checks { display: flex; flex-wrap: wrap; gap: 13px; align-items: center; padding: 8px 0; color: var(--muted-strong); font-size: 0.75rem; }
#page-enterprise .enterprise-form-actions,
#page-enterprise .enterprise-followups {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 18px 18px;
}
#page-enterprise .enterprise-inline-drawer .enterprise-form-actions,
#page-enterprise .enterprise-inline-drawer .enterprise-followups { padding-left: 0; padding-right: 0; }
#page-enterprise .enterprise-result { padding: 0 18px 18px; }
#page-enterprise .enterprise-result:empty { display: none; }
#page-enterprise .enterprise-result-card { padding: 13px 14px; border-left: 3px solid var(--enterprise-blue); background: var(--enterprise-blue-soft); }
#page-enterprise .enterprise-result-card.tone-good { border-color: var(--enterprise-green); background: var(--enterprise-green-soft); }
#page-enterprise .enterprise-result-card.tone-warning { border-color: var(--enterprise-amber); background: var(--enterprise-amber-soft); }
#page-enterprise .enterprise-result-card.tone-danger { border-color: var(--enterprise-red); background: var(--enterprise-red-soft); }
#page-enterprise .enterprise-result-card strong { font-size: 0.82rem; }
#page-enterprise .enterprise-result-card p { margin: 4px 0 0; font-size: 0.76rem; line-height: 1.45; }
#page-enterprise .enterprise-result-card ul { margin: 8px 0 0; padding-left: 18px; font-size: 0.72rem; line-height: 1.45; }

#page-enterprise .enterprise-assess-layout {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  align-items: start;
  border: 1px solid var(--border-strong);
  background: #fff;
}
#page-enterprise .enterprise-workflow-rail {
  min-height: 640px;
  padding: 8px;
  border-right: 1px solid var(--border-strong);
  background: #f5f5f1;
}
#page-enterprise .enterprise-workflow-rail button {
  width: 100%;
  display: grid;
  gap: 3px;
  padding: 13px 12px;
  border: 0;
  border-left: 3px solid transparent;
  background: transparent;
  color: var(--muted-strong);
  text-align: left;
  cursor: pointer;
}
#page-enterprise .enterprise-workflow-rail button:hover { background: #fff; }
#page-enterprise .enterprise-workflow-rail button.active { border-left-color: var(--enterprise-blue); background: #fff; color: var(--enterprise-ink); }
#page-enterprise .enterprise-workflow-rail strong { color: inherit; font-size: 0.76rem; }
#page-enterprise .enterprise-workflow-rail span { color: var(--muted); font-family: 'Inter', system-ui, sans-serif; font-size: 0.68rem; letter-spacing: 0; line-height: 1.35; text-transform: none; }
#page-enterprise .enterprise-assess-content { min-width: 0; }
#page-enterprise .enterprise-assessment { min-width: 0; }
#page-enterprise .enterprise-assessment > .enterprise-record-list { border-top: 1px solid var(--border); }
#page-enterprise .artifact-workbench { border: 0; }
#page-enterprise .artifact-readiness,
#page-enterprise .governance-readiness { border-width: 0 0 1px; }
#page-enterprise .artifact-fleet-statusline { display: grid; gap: 4px; padding: 12px 18px; border-bottom: 1px solid var(--border); color: var(--muted); font-family: var(--asd-mono); font-size: 0.63rem; }
#page-enterprise .artifact-workbench > .enterprise-form-actions { padding-top: 16px; }
#page-enterprise .enterprise-advanced-options { margin-bottom: 18px; border: 1px solid var(--border); }
#page-enterprise .intelligence-log { max-height: 320px; overflow: auto; white-space: pre-wrap; word-break: break-word; }

#page-enterprise .enterprise-govern-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 16px;
}
#page-enterprise .enterprise-records-grid { align-items: start; }
#page-enterprise .enterprise-record-list { display: grid; }
#page-enterprise .enterprise-record {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}
#page-enterprise .enterprise-record:last-child { border-bottom: 0; }
#page-enterprise .enterprise-record > div { min-width: 0; display: grid; gap: 2px; }
#page-enterprise .enterprise-record strong { overflow: hidden; color: var(--enterprise-ink); font-size: 0.78rem; text-overflow: ellipsis; white-space: nowrap; }
#page-enterprise .enterprise-record span:not(.enterprise-state) { overflow: hidden; color: var(--muted); font-size: 0.7rem; text-overflow: ellipsis; white-space: nowrap; }
#page-enterprise .enterprise-record small { color: var(--muted); font-family: var(--asd-mono); font-size: 0.59rem; text-align: right; }

#page-enterprise .enterprise-recovery { margin-top: 20px; border: 1px solid var(--border-strong); }
#page-enterprise .enterprise-recovery > p { padding: 0 18px; color: var(--muted); font-size: 0.76rem; }
#page-enterprise .enterprise-recovery .intelligence-log { margin: 12px 18px 18px; }

@media (max-width: 1160px) {
  #page-enterprise .enterprise-readiness { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #page-enterprise .enterprise-readiness-item:nth-child(2) { border-right: 0; }
  #page-enterprise .enterprise-readiness-item:nth-child(-n + 2) { border-bottom: 1px solid var(--border); }
  #page-enterprise .enterprise-monitor-layout { grid-template-columns: minmax(0, 1fr); }
  #page-enterprise .enterprise-activity { position: static; }
  #page-enterprise .enterprise-govern-grid { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 820px) {
  #page-enterprise .enterprise-setup { grid-template-columns: 6px minmax(0, 1fr); }
  #page-enterprise .enterprise-setup-actions { grid-column: 2; justify-content: flex-start; }
  #page-enterprise .enterprise-connector-row { grid-template-columns: 38px minmax(0, 1fr) auto; }
  #page-enterprise .enterprise-connector-state { grid-column: 2 / -1; }
  #page-enterprise .enterprise-assess-layout { grid-template-columns: minmax(0, 1fr); }
  #page-enterprise .enterprise-workflow-rail { min-height: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-right: 0; border-bottom: 1px solid var(--border-strong); }
}

@media (max-width: 560px) {
  #page-enterprise .enterprise-workspace-header { align-items: stretch; }
  #page-enterprise .enterprise-workspace-header > button { width: 100%; }
  #page-enterprise .enterprise-readiness { grid-template-columns: minmax(0, 1fr); }
  #page-enterprise .enterprise-readiness-item { min-height: 94px; border-right: 0; border-bottom: 1px solid var(--border); }
  #page-enterprise .enterprise-readiness-item:last-child { border-bottom: 0; }
  #page-enterprise .enterprise-tabs { gap: 18px; overflow-x: auto; }
  #page-enterprise .enterprise-setup { padding: 15px; gap: 14px; }
  #page-enterprise .enterprise-setup-actions { display: grid; }
  #page-enterprise .enterprise-setup-actions > * { width: 100%; }
  #page-enterprise .enterprise-section-head { flex-direction: column; }
  #page-enterprise .enterprise-section-head > button { width: 100%; }
  #page-enterprise .enterprise-connector-row { grid-template-columns: 34px minmax(0, 1fr); padding: 13px; }
  #page-enterprise .enterprise-connector-row > button { grid-column: 1 / -1; width: 100%; }
  #page-enterprise .enterprise-connector-state { grid-column: 1 / -1; }
  #page-enterprise .enterprise-form-grid { grid-template-columns: minmax(0, 1fr); padding: 14px; }
  #page-enterprise .enterprise-span-2 { grid-column: auto; }
  #page-enterprise .enterprise-form-actions,
  #page-enterprise .enterprise-followups { display: grid; padding-left: 14px; padding-right: 14px; }
  #page-enterprise .enterprise-form-actions > *,
  #page-enterprise .enterprise-followups > * { width: 100%; }
  #page-enterprise .enterprise-workflow-rail { grid-template-columns: minmax(0, 1fr); }
  #page-enterprise .enterprise-record { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  #page-enterprise .enterprise-record small { text-align: left; }
}

/* Concept workspace theme: dark navigation, bright operational canvas, and
   green evidence/action accents. This final scoped layer intentionally wins
   over the older dark console skin while keeping all existing renderers. */
body.professional-ui {
  --void-black: #f3f7f5;
  --surface: #ffffff;
  --surface-elevated: #f7faf8;
  --surface-soft: #eef4f1;
  --bg: #f3f7f5;
  --bg-soft: #ffffff;
  --bg-panel: #ffffff;
  --card: #ffffff;
  --card-muted: #f7faf8;
  --border: #d9e2dd;
  --border-strong: #b8c7c0;
  --text: #17211e;
  --muted: #62716b;
  --muted-strong: #34443e;
  --accent: #0b8068;
  --cyan: #0b8068;
  --blue: #156b5a;
  --green: #0b8068;
  background: #f3f7f5;
  color: #17211e;
}

.professional-ui .app-shell { background: #f3f7f5; }
.professional-ui .sidebar {
  background: linear-gradient(180deg, #10251f 0%, #0c1b17 100%);
  color: #edf7f2;
  border-right-color: #29453c;
}
.professional-ui .brand-badge { background: #28c6a1; color: #0a211a; }
.professional-ui .brand h1 { color: #f5fbf8; }
.professional-ui .brand p,
.professional-ui .brand-overline { color: #9fc0b5; }
.professional-ui .nav-group-label { color: #779b90; }
.professional-ui .nav-btn { color: #dbeae4; }
.professional-ui .nav-btn .desc { color: #8eaca2; }
.professional-ui .nav-btn:hover { background: #18342b; border-color: #2a5145; color: #fff; }
.professional-ui .nav-btn.active { background: #1d4b3e; border-color: #37c5a1; color: #fff; }
.professional-ui .nav-btn.active .nav-icon { color: #62e4c2; }
.professional-ui .sidebar-subnav { border-left-color: #31584d; }
.professional-ui .sidebar-subnav-heading { color: #73998d; }
.professional-ui .sidebar-subnav-btn { color: #aac4bb; }
.professional-ui .sidebar-subnav-btn:hover,
.professional-ui .sidebar-subnav-btn[aria-current="location"],
.professional-ui .sidebar-subnav-btn.active { color: #fff; background: #17352c; }
.professional-ui .sidebar-subnav-marker { background: #5b7d72; }
.professional-ui .sidebar-subnav-btn.active .sidebar-subnav-marker,
.professional-ui .sidebar-subnav-btn[aria-current="location"] .sidebar-subnav-marker { background: #41d4ae; }

.professional-ui .main { background: #f3f7f5; color: #17211e; }
.professional-ui .top-strip,
.professional-ui .topbar-primary,
.professional-ui .topbar-secondary { background: rgba(255,255,255,.98); color: #23322d; border-color: #d3ded8; }
.professional-ui .workspace-context,
.professional-ui .workspace-switcher,
.professional-ui .topbar-action { color: #33443e; }
.professional-ui .topbar-action:hover { background: #e9f5f0; color: #086a57; }
.professional-ui .page { background: transparent; color: #17211e; }
.professional-ui .page-header { background: transparent; border-color: #c6d4ce; }
.professional-ui .page-header h2,
.professional-ui .page-header h3,
.professional-ui .page-header p,
.professional-ui .card h3,
.professional-ui .card h4,
.professional-ui .module-head h4 { color: #17211e; }
.professional-ui .page-header p,
.professional-ui .small,
.professional-ui .card-subtle,
.professional-ui .module-head p { color: #62716b; }

.professional-ui .card,
.professional-ui .panel,
.professional-ui .metric-card,
.professional-ui .intelligence-console,
.professional-ui .intelligence-module,
.professional-ui .triage-ops-auth-card,
.professional-ui .research-stage-panel,
.professional-ui .research-watchlist-panel,
.professional-ui .research-discovery-panel {
  background: #fff;
  color: #17211e;
  border-color: #cbd8d2;
  box-shadow: 0 8px 24px rgba(24, 56, 45, .055);
}
.professional-ui .intelligence-console { border-top: 3px solid #0b8068; }
.professional-ui .intelligence-module { background: #fff; }
.professional-ui .metric-card::before { background: #18a986; }
.professional-ui .metric { color: #17211e; }
.professional-ui .metric-label { color: #65746e; }
.professional-ui .system-view-summary,
.professional-ui .research-view-summary,
.professional-ui .publication-view-summary {
  background: #fff;
  border: 1px solid #cbd8d2;
  border-left: 4px solid #0b8068;
  color: #17211e;
  box-shadow: none;
}
.professional-ui :is(.system-view-summary,.research-view-summary,.publication-view-summary) .eyebrow { color: #0b8068; }
.professional-ui :is(.system-view-summary,.research-view-summary,.publication-view-summary) strong { color: #17211e; }
.professional-ui :is(.system-view-summary,.research-view-summary,.publication-view-summary) span:last-child { color: #62716b; }

.professional-ui input,
.professional-ui select,
.professional-ui textarea {
  background: #fff;
  color: #17211e;
  border-color: #aebfb7;
}
.professional-ui input::placeholder,
.professional-ui textarea::placeholder { color: #89968f; opacity: 1; }
.professional-ui input:focus,
.professional-ui select:focus,
.professional-ui textarea:focus { border-color: #0b8068; outline: 3px solid rgba(11,128,104,.14); }
.professional-ui label,
.professional-ui label > span { color: #3f4f49; }
.professional-ui .primary-btn,
.professional-ui button.primary-btn {
  background: #0b8068;
  border-color: #0b8068;
  color: #fff;
  box-shadow: none;
}
.professional-ui .primary-btn:hover,
.professional-ui button.primary-btn:hover { background: #086b58; border-color: #086b58; color: #fff; }
.professional-ui .secondary-btn,
.professional-ui button.secondary-btn,
.professional-ui .mini-btn {
  background: #fff;
  border-color: #9fb2aa;
  color: #284039;
}
.professional-ui .secondary-btn:hover,
.professional-ui button.secondary-btn:hover,
.professional-ui .mini-btn:hover { background: #e9f5f0; border-color: #0b8068; color: #086b58; }
.professional-ui :is(button,input,select,textarea):disabled {
  background: #eef2f0 !important;
  border-color: #d5ded9 !important;
  color: #78857f !important;
  opacity: 1;
  cursor: not-allowed;
}

.professional-ui table { background: #fff; color: #23322d; }
.professional-ui thead th { background: #eef4f1; color: #4f625b; border-color: #cbd8d2; }
.professional-ui td { color: #273832; border-color: #dce5e0; }
.professional-ui tbody tr:hover { background: #f3faf7; }
.professional-ui .kv-row,
.professional-ui .feed-item,
.professional-ui .table-wrap { border-color: #d9e2dd; }
.professional-ui .kv-key { color: #687770; }
.professional-ui .kv-val { color: #24352f; }
.professional-ui .status-pill { background: #f4f8f6; color: #35463f; border-color: #becdc6; }
.professional-ui .empty,
.professional-ui .empty-state,
.professional-ui .empty-state.compact { background: #fafcfb; color: #687770; border-color: #b8c8c0; }
.professional-ui .intelligence-boundary-note { background: #eff8f4; color: #345148; border-left-color: #0b8068; }
.professional-ui .intelligence-log,
.professional-ui pre,
.professional-ui code { background: #f4f7f5; color: #24352f; border-color: #cbd8d2; }
.professional-ui .error,
.professional-ui .notice-error { background: #fff0f0; color: #8b1f2c; border-color: #c95663; }

.professional-ui .help-drawer,
.professional-ui .command-palette,
.professional-ui .modal-card,
.professional-ui .confirm-dialog-card,
.professional-ui .intelligence-result-modal-card { background: #fff; color: #17211e; border-color: #b9c9c1; }
.professional-ui .modal-head h3 { color: #17211e; }
.professional-ui .intelligence-result-head,
.professional-ui .intelligence-result-body,
.professional-ui .intelligence-result-actions { background: #fff; border-color: #d7e1dc; }
.professional-ui .intelligence-result-head h3,
.professional-ui .intelligence-result-section h4,
.professional-ui .intelligence-result-section strong { color: #17211e; }
.professional-ui .intelligence-result-section,
.professional-ui .intelligence-result-meta span { background: #f6f9f7; color: #40524b; border-color: #cbd8d2; }
.professional-ui .intelligence-result-section p,
.professional-ui .intelligence-result-list,
.professional-ui .confirm-dialog-message { color: #35463f; }
.professional-ui .intelligence-result-draft,
.professional-ui .intelligence-result-json { background: #f1f5f3; color: #23342e; border-color: #c2d0ca; }
.professional-ui .intelligence-verdict { background: #eaf7f2; border-color: #73bda9; }
.professional-ui .intelligence-verdict strong { color: #17392f; }
.professional-ui .intelligence-verdict span,
.professional-ui .intelligence-verdict b { color: #086b58; }
.professional-ui .intelligence-full-analysis { border-color: #cbd8d2; }
.professional-ui .intelligence-decision-card { background: linear-gradient(135deg, #eaf7f2 0%, #f5fbf8 100%); border-color: #73bda9; }
.professional-ui .intelligence-decision-card-head strong,
.professional-ui .intelligence-decision-columns h4,
.professional-ui .intelligence-decision-metrics b { color: #17392f; }
.professional-ui .intelligence-decision-card-head p,
.professional-ui .intelligence-decision-columns p,
.professional-ui .intelligence-decision-columns .intelligence-result-list { color: #35463f; }
.professional-ui .decision-card-badge { color: #086b58; border-color: #73bda9; }
.professional-ui .intelligence-decision-metrics > div { background: #fff; border-color: #cbd8d2; }
.professional-ui .intelligence-decision-metrics span { color: #687770; }
.professional-ui .intelligence-stage { border-color: #cbd8d2; color: #40524b; }
.professional-ui .intelligence-stage.stage-succeeded, .professional-ui .intelligence-stage.stage-completed { border-color: #73bda9; color: #086b58; }
.professional-ui .intelligence-stage.stage-failed { border-color: #c95663; color: #8b1f2c; }
.professional-ui .intelligence-child-jobs > summary { color: #17634f; }
.professional-ui .intelligence-child-job { border-color: #d7e1dc; color: #40524b; }
.professional-ui .detection-learning-decision { margin-bottom: 18px; }
.professional-ui .detection-learning-decision .learning-decision-metrics { margin-top: 16px; }
.professional-ui .detection-learning-decision .intelligence-decision-columns ul {
  margin: 0;
  padding-left: 18px;
  color: #35463f;
  font-size: 12px;
  line-height: 1.55;
}
.professional-ui .detection-learning-decision .intelligence-decision-columns li + li { margin-top: 5px; }
.professional-ui #detection-learning-adjudication { margin-top: 18px; }
.professional-ui .learning-queue-note { margin-top: 8px; color: #52645c; }
.professional-ui .detection-learning-history {
  margin-top: 18px;
  padding: 12px 14px;
  border: 1px solid #cbd8d2;
  border-radius: 7px;
  background: #f6f9f7;
}
.professional-ui .detection-learning-history > summary {
  color: #17392f;
  cursor: pointer;
  font-weight: 700;
}
.professional-ui .detection-learning-history[open] > summary { margin-bottom: 12px; }
@media (max-width: 900px) {
  .professional-ui .detection-learning-decision .intelligence-decision-columns { grid-template-columns: 1fr; }
}

/* Automation workspace from the approved concept. */
.professional-ui #page-automation { max-width: 1540px; margin: 0 auto; }
.professional-ui .automation-tabs {
  display: flex;
  gap: 4px;
  margin: 18px 0 0;
  padding: 5px;
  overflow-x: auto;
  border: 1px solid #cad7d1;
  background: #eaf0ed;
}
.professional-ui .automation-tab {
  min-height: 38px;
  padding: 8px 13px;
  border: 1px solid transparent;
  background: transparent;
  color: #50615a;
  font: 700 .7rem var(--asd-mono);
  letter-spacing: .04em;
  white-space: nowrap;
  cursor: pointer;
}
.professional-ui .automation-tab:hover { background: #f7faf8; color: #17634f; }
.professional-ui .automation-tab.active { background: #fff; color: #086b58; border-color: #9fc1b5; box-shadow: 0 2px 8px rgba(24,56,45,.07); }
.professional-ui #page-automation .intelligence-console { margin-top: 12px; }
.professional-ui #page-automation .intelligence-summary { grid-template-columns: repeat(5, minmax(0, 1fr)); }

.professional-ui .model-routing-workspace { margin-top: 18px; padding: 15px; border: 1px solid #c4d3cc; background: #f7faf8; }
.professional-ui .model-routing-head,
.professional-ui .research-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.professional-ui .model-routing-head > div { display: grid; gap: 3px; }
.professional-ui .model-routing-head strong { color: #17211e; }
.professional-ui .model-routing-head span { color: #687770; font-size: .75rem; }
.professional-ui .routing-source { padding: 4px 7px; background: #e3f3ed; color: #086b58 !important; font: 700 .61rem var(--asd-mono); text-transform: uppercase; }
.professional-ui .model-catalog { max-height: 250px; margin-top: 10px; overflow: auto; border: 1px solid #cbd8d2; background: #fff; }
.professional-ui .model-catalog-row { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 8px 11px; border-bottom: 1px solid #e1e8e4; cursor: pointer; }
.professional-ui .model-catalog-row:last-child { border-bottom: 0; }
.professional-ui .model-catalog-row:hover,
.professional-ui .model-catalog-row.selected { background: #eaf7f2; }
.professional-ui .model-catalog-row input { width: auto; }
.professional-ui .model-catalog-row > span { display: grid; gap: 2px; min-width: 0; }
.professional-ui .model-catalog-row strong { overflow-wrap: anywhere; color: #20332c; font-size: .77rem; }
.professional-ui .model-catalog-row small { color: #708079; font-size: .65rem; }
.professional-ui .model-routing-order { display: grid; gap: 6px; margin-top: 12px; }
.professional-ui .model-routing-order-title { color: #566760; font: 700 .64rem var(--asd-mono); text-transform: uppercase; }
.professional-ui .model-routing-item { display: grid; grid-template-columns: 24px minmax(0,1fr) auto; gap: 9px; align-items: center; padding: 8px; border: 1px solid #d1dcd7; background: #fff; }
.professional-ui .model-routing-item > span { display: grid; place-items: center; width: 22px; height: 22px; background: #153a30; color: #fff; font: 700 .65rem var(--asd-mono); }
.professional-ui .model-routing-item strong { overflow-wrap: anywhere; font-size: .75rem; }
.professional-ui .model-routing-item > div { display: flex; gap: 4px; }

.professional-ui .research-production { padding: 0; overflow: hidden; }
.professional-ui .research-production-head { padding: 20px; border-bottom: 1px solid #d4dfda; }
.professional-ui .research-stage-ribbon { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); border-bottom: 1px solid #cbd8d2; background: #f5f8f6; }
.professional-ui .research-stage { position: relative; min-width: 0; display: grid; grid-template-columns: 27px minmax(0,1fr); gap: 8px; padding: 13px; border-right: 1px solid #d8e2dd; color: #687770; }
.professional-ui .research-stage:last-child { border-right: 0; }
.professional-ui .research-stage > span { grid-row: 1 / 3; display: grid; place-items: center; width: 25px; height: 25px; border: 1px solid #9fb2aa; background: #fff; color: #61716a; font: 700 .65rem var(--asd-mono); }
.professional-ui .research-stage strong { color: #3b4c45; font-size: .72rem; }
.professional-ui .research-stage small { color: #7b8983; font-size: .63rem; }
.professional-ui .research-stage.complete { background: #eaf7f2; }
.professional-ui .research-stage.complete > span { background: #0b8068; border-color: #0b8068; color: #fff; }
.professional-ui .research-stage.active { box-shadow: inset 0 -3px #0b8068; }
.professional-ui .research-safety { margin: 14px 20px 0; }
.professional-ui .research-fleet-summary { margin: 14px 20px 0; }
.professional-ui .research-fleet-summary .enterprise-readiness-item { position: relative; min-height: 92px; display: grid; align-content: center; gap: 4px; padding: 13px; border: 1px solid #d2dcd7; background: #fff; }
.professional-ui .research-fleet-summary .enterprise-readiness-item::before { content: ""; position: absolute; inset: 0 0 auto; height: 3px; background: #9fb2aa; }
.professional-ui .research-fleet-summary .enterprise-readiness-item.tone-good::before { background: #0b8068; }
.professional-ui .research-fleet-summary .enterprise-readiness-item.tone-warning::before { background: #b17a11; }
.professional-ui .research-fleet-summary .enterprise-readiness-item.tone-danger::before { background: #a8323e; }
.professional-ui .research-fleet-summary .enterprise-readiness-label { color: #687770; font: 700 .6rem var(--asd-mono); text-transform: uppercase; }
.professional-ui .research-fleet-summary .enterprise-readiness-item strong { color: #17211e; font-size: 1.15rem; }
.professional-ui .research-fleet-summary .enterprise-readiness-item > span:last-child { color: #6d7b75; font-size: .68rem; }
.professional-ui .research-pipeline-layout { display: grid; grid-template-columns: minmax(0,1.45fr) minmax(300px,.75fr); gap: 16px; padding: 18px 20px; }
.professional-ui .research-intake-card,
.professional-ui .research-readiness-card { padding: 16px; border: 1px solid #c5d3cd; background: #fff; }
.professional-ui .research-readiness-card { background: #f7faf8; }
.professional-ui .research-card-head h4 { margin: 0; color: #17211e; }
.professional-ui .research-card-head > strong { color: #0b8068; font: 800 1.15rem var(--asd-mono); }
.professional-ui .research-form-grid.compact { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 11px; margin-top: 14px; }
.professional-ui .research-form-grid.compact label { display: grid; gap: 6px; }
.professional-ui .research-form-grid.compact label > span { font: 700 .63rem var(--asd-mono); text-transform: uppercase; }
.professional-ui .research-span-2 { grid-column: 1 / -1; }
.professional-ui .research-options { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 13px; color: #4b5c55; font-size: .75rem; }
.professional-ui .research-options label { display: flex; align-items: center; gap: 7px; }
.professional-ui .research-options input { width: auto; }
.professional-ui .research-evidence-checklist { display: grid; gap: 6px; margin-top: 14px; }
.professional-ui .research-evidence-row { display: grid; grid-template-columns: 20px minmax(0,1fr); align-items: center; gap: 7px; padding: 7px 8px; background: #fff; color: #697770; border: 1px solid #d7e0dc; }
.professional-ui .research-evidence-row span { color: #8a9892; }
.professional-ui .research-evidence-row strong { color: #5b6a64; font-size: .72rem; }
.professional-ui .research-evidence-row.complete { background: #e9f7f1; border-color: #9dccbd; }
.professional-ui .research-evidence-row.complete span,
.professional-ui .research-evidence-row.complete strong { color: #086b58; }
.professional-ui .research-readiness-message { margin-top: 12px; padding: 10px; border-left: 3px solid #c28b1b; background: #fff7e7; color: #5f481c; font-size: .73rem; line-height: 1.5; }
.professional-ui .research-followups { display: grid; gap: 7px; margin-top: 12px; }
.professional-ui .artifact-fleet-statusline { display: grid; gap: 4px; margin: 0 20px; padding: 12px; border: 1px solid #d3ddd8; background: #f5f8f6; color: #61716a; font: .66rem var(--asd-mono); }
.professional-ui .research-fleet-actions { display: flex; align-items: flex-start; gap: 10px; padding: 15px 20px 20px; }
.professional-ui .research-fleet-actions details { flex: 1; border: 1px solid #cbd8d2; background: #fff; }
.professional-ui .research-fleet-actions summary { padding: 10px 12px; color: #315249; font: 700 .66rem var(--asd-mono); cursor: pointer; }
.professional-ui .research-fleet-actions details .intelligence-actions { padding: 0 12px 12px; }

#page-enterprise .enterprise-tabs { border-color: #aebeb7; }
#page-enterprise .enterprise-tab { color: #62716b; }
#page-enterprise .enterprise-tab:hover { color: #086b58; }
#page-enterprise .enterprise-tab.active { color: #17211e; }
#page-enterprise .enterprise-tab.active::after { background: #0b8068; }

@media (max-width: 1100px) {
  .professional-ui #page-automation .intelligence-summary { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .professional-ui .research-stage-ribbon { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .professional-ui .research-stage:nth-child(3) { border-right: 0; }
  .professional-ui .research-pipeline-layout { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .professional-ui .automation-tabs { margin-top: 12px; }
  .professional-ui #page-automation .intelligence-summary { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .professional-ui .research-stage-ribbon { grid-template-columns: 1fr; }
  .professional-ui .research-stage { border-right: 0; border-bottom: 1px solid #d8e2dd; }
  .professional-ui .research-form-grid.compact { grid-template-columns: 1fr; }
  .professional-ui .research-span-2 { grid-column: auto; }
  .professional-ui .research-fleet-actions { display: grid; }
  .professional-ui .research-fleet-actions > * { width: 100%; }
  .professional-ui .model-routing-item { grid-template-columns: 24px minmax(0,1fr); }
  .professional-ui .model-routing-item > div { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3,1fr); }
}

/* Work specialist orchestration */
.professional-ui .specialist-orchestrator-card {
  position: relative;
  margin-bottom: 18px;
  overflow: hidden;
  border-color: #b8ccc3;
  background: linear-gradient(135deg, #ffffff 0%, #f3faf7 100%);
}
.professional-ui .specialist-orchestrator-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: linear-gradient(90deg, #087963, #24a47f 56%, #b7dece);
}
.professional-ui .specialist-status-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 15px;
}
.professional-ui .specialist-status-item {
  min-width: 0;
  padding: 12px;
  border: 1px solid #cedbd5;
  background: #fff;
}
.professional-ui .specialist-status-item span {
  display: block;
  color: #6b7a74;
  font: 700 .61rem var(--asd-mono);
  letter-spacing: .04em;
  text-transform: uppercase;
}
.professional-ui .specialist-status-item strong {
  display: block;
  margin-top: 5px;
  overflow-wrap: anywhere;
  color: #17211e;
  font-size: .86rem;
}
.professional-ui .specialist-status-item small { display: block; margin-top: 4px; color: #687770; line-height: 1.45; }
.professional-ui .specialist-policy-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 12px;
  padding: 10px 12px;
  border-left: 3px solid #0b8068;
  background: #eaf7f2;
  color: #315249;
  font-size: .72rem;
}
.professional-ui .specialist-policy-controls {
  display: grid;
  grid-template-columns: minmax(170px, 1fr) minmax(180px, 1fr) auto auto;
  gap: 10px;
  align-items: end;
  margin-top: 10px;
}
.professional-ui .specialist-policy-controls label { display: grid; gap: 5px; }
.professional-ui .specialist-policy-controls label > span { color: #5f6f68; font: 700 .61rem var(--asd-mono); text-transform: uppercase; }
.professional-ui .specialist-roster { margin-top: 12px; border: 1px solid #ccd9d3; background: #fff; }
.professional-ui .specialist-roster summary { padding: 10px 12px; color: #315249; font: 700 .68rem var(--asd-mono); cursor: pointer; }
.professional-ui .specialist-roster-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding: 0 12px 12px; }
.professional-ui .specialist-roster-item { padding: 10px; border: 1px solid #d7e1dc; background: #f8fbf9; }
.professional-ui .specialist-roster-item strong { display: block; color: #20332c; font-size: .75rem; }
.professional-ui .specialist-roster-item span { display: block; margin-top: 4px; color: #718079; font: .62rem var(--asd-mono); overflow-wrap: anywhere; }
.professional-ui .specialist-runs { margin-top: 14px; }
.professional-ui .prompt-specialist-card { margin-bottom: 12px; border-color: #a9c9bc; background: #f5faf8; }
.professional-ui .specialist-route-controls { margin-top: 12px; }
.professional-ui .specialist-route-summary { margin-top: 12px; }
.professional-ui .specialist-route-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.professional-ui .specialist-route-panel { padding: 10px; border: 1px solid #d0ddd7; background: #fff; }
.professional-ui .specialist-route-panel strong { display: block; color: #1f342d; font-size: .75rem; }
.professional-ui .specialist-route-panel p,
.professional-ui .specialist-route-panel ul { margin: 6px 0 0; color: #64736d; font-size: .69rem; line-height: 1.48; }
.professional-ui .specialist-route-panel ul { padding-left: 17px; }
.professional-ui .specialist-action-bar { margin-top: 12px; padding-top: 12px; border-top: 1px solid #cedbd5; }
.professional-ui .specialist-action-bar .small { max-width: 520px; }

@media (max-width: 1000px) {
  .professional-ui .specialist-status-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .professional-ui .specialist-roster-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .professional-ui .specialist-policy-controls { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  .professional-ui .specialist-status-grid,
  .professional-ui .specialist-roster-grid,
  .professional-ui .specialist-route-grid,
  .professional-ui .specialist-policy-controls { grid-template-columns: 1fr; }
  .professional-ui .specialist-action-bar,
  .professional-ui .specialist-action-bar .modal-actions-right { display: grid; width: 100%; }
  .professional-ui .specialist-action-bar button { width: 100%; }
}

/* Accessibility pass: retain the bright green control-room concept with readable secondary detail. */
.professional-ui .brand-overline { font-size: .66rem; letter-spacing: .04em; }
.professional-ui .brand p { font-size: .72rem; line-height: 1.35; }
.professional-ui .nav-btn .desc { color: #b6cec5; font-size: .78rem; line-height: 1.4; }
.professional-ui .nav-group-label,
.professional-ui .sidebar-subnav-heading { color: #9bc0b4; font-size: .72rem; }
.professional-ui .sidebar-subnav-btn { color: #c2d8d0; font-size: .8rem; }
.professional-ui .page-header p,
.professional-ui .small,
.professional-ui .card-subtle,
.professional-ui .module-head p { color: #53645d; font-size: .82rem; line-height: 1.55; }
.professional-ui .metric-label,
.professional-ui .kv-key,
.professional-ui .empty,
.professional-ui .empty-state,
.professional-ui .empty-state.compact { color: #53645d; font-size: .78rem; }
.professional-ui input::placeholder,
.professional-ui textarea::placeholder { color: #66776f; }
.professional-ui table { font-size: .82rem; }
.professional-ui thead th { color: #40534b; font-size: .72rem; }
.professional-ui .status-pill { font-size: .72rem; line-height: 1.25; }
.professional-ui .automation-tab { min-height: 42px; padding: 9px 15px; color: #40534b; font-size: .78rem; }
.professional-ui .model-routing-head span { color: #53645d; font-size: .82rem; line-height: 1.5; }
.professional-ui .routing-source { padding: 5px 8px; font-size: .72rem; }
.professional-ui .model-catalog-row { min-height: 52px; padding: 10px 12px; }
.professional-ui .model-catalog-row strong { font-size: .86rem; }
.professional-ui .model-catalog-row small { color: #53645d; font-size: .76rem; }
.professional-ui .model-routing-order-title { color: #40534b; font-size: .72rem; }
.professional-ui .model-routing-item strong { font-size: .82rem; }
.professional-ui .research-stage { min-height: 70px; padding: 14px; }
.professional-ui .research-stage > span { font-size: .72rem; }
.professional-ui .research-stage strong { font-size: .82rem; }
.professional-ui .research-stage small { color: #53645d; font-size: .74rem; line-height: 1.4; }
.professional-ui .research-fleet-summary .enterprise-readiness-label { color: #53645d; font-size: .7rem; }
.professional-ui .research-fleet-summary .enterprise-readiness-item > span:last-child { color: #53645d; font-size: .78rem; line-height: 1.45; }
.professional-ui .research-form-grid.compact label > span { font-size: .72rem; }
.professional-ui .research-options { color: #40534b; font-size: .82rem; }
.professional-ui .research-evidence-row { min-height: 42px; padding: 9px 10px; }
.professional-ui .research-evidence-row strong { color: #40534b; font-size: .8rem; }
.professional-ui .research-readiness-message { font-size: .82rem; }
.professional-ui .artifact-fleet-statusline { color: #40534b; font-size: .76rem; line-height: 1.5; }
.professional-ui .research-fleet-actions summary { font-size: .76rem; }
.professional-ui .specialist-status-item { min-height: 98px; padding: 14px; }
.professional-ui .specialist-status-item span,
.professional-ui .specialist-policy-controls label > span { color: #53645d; font-size: .7rem; }
.professional-ui .specialist-status-item small { color: #53645d; font-size: .78rem; }
.professional-ui .specialist-policy-strip { color: #294b40; font-size: .8rem; }
.professional-ui .specialist-roster summary { font-size: .78rem; }
.professional-ui .specialist-roster-item { min-height: 76px; padding: 12px; }
.professional-ui .specialist-roster-item strong,
.professional-ui .specialist-route-panel strong { font-size: .82rem; }
.professional-ui .specialist-roster-item span { color: #53645d; font-size: .72rem; line-height: 1.45; }
.professional-ui .specialist-route-panel { min-height: 104px; padding: 13px; }
.professional-ui .specialist-route-panel p,
.professional-ui .specialist-route-panel ul { color: #53645d; font-size: .78rem; line-height: 1.55; }
.professional-ui .research-pipeline-panel {
  border-color: #9fcbbd;
  border-left-color: #0b8068;
  background: #f3faf7;
  color: #17211e;
}
.professional-ui .research-case-row {
  border-color: #cbd8d2;
  background: #ffffff;
  color: #253a33;
  box-shadow: 0 1px 0 rgba(23, 33, 30, 0.04);
}
.professional-ui .research-case-row:hover {
  border-color: #6da896;
  background: #f3faf7;
}
.professional-ui .research-case-row.selected {
  border-color: #0b8068;
  background: #e5f5ef;
  box-shadow: inset 4px 0 0 #0b8068;
}
.professional-ui .research-case-row strong,
.professional-ui .research-case-row.selected strong { color: #17211e; }
.professional-ui .research-case-row .small { color: #53645d; }
.professional-ui .detail-eyebrow {
  border: 1px solid #9fcbbd;
  background: #e5f5ef;
  color: #086753;
  font-size: .74rem;
}
.professional-ui .severity-pill {
  border: 1px solid #bdcbc5;
  background: #f4f8f6;
  color: #35463f;
}
.professional-ui .severity-pill.high,
.professional-ui .severity-pill.critical {
  border-color: #d9a153;
  background: #fff0dc;
  color: #704000;
}
.professional-ui .severity-pill.medium {
  border-color: #c7ad63;
  background: #fff8dc;
  color: #5d4a00;
}
.professional-ui .severity-pill.low,
.professional-ui .severity-pill.info {
  border-color: #9fcbbd;
  background: #eaf7f2;
  color: #086753;
}
.professional-ui .research-pipeline-heading h5,
.professional-ui .research-list-head h5 { color: #17211e; }
.professional-ui .research-pipeline-summary {
  border-color: #c7d8d1;
  background: #fff;
  color: #253a33;
}
.professional-ui .research-pipeline-summary span,
.professional-ui .research-pipeline-boundary,
.professional-ui .research-pipeline-step > small { color: #53645d; }
.professional-ui .research-pipeline-notice {
  border-left-color: #a66b00;
  background: #fff5df;
  color: #513b12;
}
.professional-ui .research-pipeline-steps { border-color: #cbd8d2; }
.professional-ui .research-pipeline-step { min-height: 48px; border-color: #d7e2dd; }
.professional-ui .research-review-item { border-color: #cbd8d2; background: #fff; }
.professional-ui .research-pipeline-operational {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 12px;
  padding: 13px 14px;
  border: 1px solid #d4b56f;
  border-left: 4px solid #a66b00;
  background: #fff7e7;
  color: #513b12;
}
.professional-ui .research-pipeline-operational > div { display: grid; gap: 4px; }
.professional-ui .research-pipeline-operational strong { color: #3f2d0b; font-size: .9rem; }
.professional-ui .research-pipeline-operational span { font-size: .82rem; line-height: 1.5; }
.professional-ui .research-pipeline-operational.tone-danger { border-color: #d9959e; border-left-color: #a8323e; background: #fff0f1; color: #721e29; }
.professional-ui .research-pipeline-operational.tone-danger strong { color: #721e29; }

@media (max-width: 720px) {
  .professional-ui .research-pipeline-operational { display: grid; }
  .professional-ui .research-pipeline-operational button { width: 100%; }
}

/* Bright contrast correction.
   Older OKComputer and command-surface layers remain in this bundle for
   component compatibility, but their dark tokens must not leak into the
   bright operator workspace. Keep this layer last so high-specificity legacy
   selectors cannot make required content readable only on hover. */
body.professional-ui.okcomputer-skin {
  --contrast-bg: #f3f7f5;
  --contrast-surface: #ffffff;
  --contrast-surface-muted: #f5f8f6;
  --contrast-surface-selected: #e5f5ef;
  --contrast-text: #17211e;
  --contrast-text-strong: #10201b;
  --contrast-text-soft: #40534b;
  --contrast-text-muted: #53645d;
  --contrast-text-subtle: #62716b;
  --contrast-green: #087963;
  --contrast-green-strong: #086b58;
  --contrast-green-soft: #e5f5ef;
  --contrast-blue: #0f4c81;
  --contrast-amber: #8a5a00;
  --contrast-red: #9e1b1b;
  --contrast-border: #cbd8d2;
  --contrast-border-strong: #9fb2aa;
  --contrast-focus: #0b8068;

  /* Re-map legacy variables so dynamic renderers inherit readable values. */
  --void-black: var(--contrast-bg);
  --surface: var(--contrast-surface);
  --surface-elevated: var(--contrast-surface-muted);
  --surface-soft: #edf4f0;
  --border-color: var(--contrast-border);
  --border-active: var(--contrast-border-strong);
  --teal-primary: var(--contrast-green);
  --teal-muted: var(--contrast-green-soft);
  --text-primary: var(--contrast-text);
  --text-secondary: var(--contrast-text-soft);
  --text-tertiary: var(--contrast-text-muted);
  --text-inverse: #ffffff;
  --signal-canvas: var(--contrast-bg);
  --signal-panel: var(--contrast-surface);
  --signal-panel-2: var(--contrast-surface-muted);
  --signal-panel-3: #edf4f0;
  --signal-panel-4: #e4eee9;
  --signal-line: var(--contrast-border);
  --signal-line-soft: #dce7e1;
  --signal-line-bright: #75b9a5;
  --signal-text: var(--contrast-text);
  --signal-text-strong: var(--contrast-text-strong);
  --signal-muted: var(--contrast-text-soft);
  --signal-muted-2: var(--contrast-text-muted);
  --signal-cyan: var(--contrast-blue);
  --signal-cyan-soft: #eaf3f8;
  --signal-amber: var(--contrast-amber);
  --signal-amber-soft: #fff5dc;
  --signal-red: var(--contrast-red);
  --signal-red-soft: #faecec;
  --signal-green: var(--contrast-green);
  --signal-green-soft: var(--contrast-green-soft);

  background: var(--contrast-bg) !important;
  color: var(--contrast-text) !important;
}

body.professional-ui.okcomputer-skin::before {
  display: none;
}

body.professional-ui .main,
body.professional-ui .page,
body.professional-ui .page.active {
  background: var(--contrast-bg) !important;
  color: var(--contrast-text) !important;
}

body.professional-ui .top-strip,
body.professional-ui .topbar-primary,
body.professional-ui .topbar-secondary {
  background: rgba(255, 255, 255, 0.98) !important;
  border-color: var(--contrast-border) !important;
  color: var(--contrast-text) !important;
}

/* The navigation rail remains intentionally dark; its text is separately
   specified so it does not inherit content-plane tokens. */
body.professional-ui .sidebar {
  background: linear-gradient(180deg, #10251f 0%, #0c1b17 100%) !important;
  border-right-color: #29453c !important;
  color: #edf7f2 !important;
}

body.professional-ui .sidebar .brand h1,
body.professional-ui .sidebar .nav-btn .title,
body.professional-ui .sidebar .nav-btn.active .title { color: #f5fbf8 !important; }
body.professional-ui .sidebar .brand p,
body.professional-ui .sidebar .brand-overline,
body.professional-ui .sidebar .nav-group-label,
body.professional-ui .sidebar .sidebar-subnav-heading,
body.professional-ui .sidebar .sidebar-footer { color: #b6cec5 !important; }
body.professional-ui .sidebar .nav-btn,
body.professional-ui .sidebar .sidebar-subnav-btn { color: #dbeae4 !important; }
body.professional-ui .sidebar .nav-btn .desc { color: #b6cec5 !important; }
body.professional-ui .sidebar .nav-btn:hover,
body.professional-ui .sidebar .sidebar-subnav-btn:hover,
body.professional-ui .sidebar .sidebar-subnav-btn:focus-visible { color: #ffffff !important; }
body.professional-ui .sidebar .nav-btn.active,
body.professional-ui .sidebar .sidebar-subnav-btn.active,
body.professional-ui .sidebar .sidebar-subnav-btn[aria-current="location"] {
  background: #1d4b3e !important;
  border-color: #37c5a1 !important;
  color: #ffffff !important;
}

body.professional-ui .main :is(h1, h2, h3, h4, h5, h6, strong) {
  color: var(--contrast-text) !important;
}

body.professional-ui .main :is(p, li, dt, dd, label, small, summary, .small,
  .meta, .muted-inline, .card-subtle, .module-head p, .metric-label,
  .kv-key, .empty, .empty-state, .hint, .section-subtitle) {
  color: var(--contrast-text-soft) !important;
}

body.professional-ui .main :is(.card, .panel, .metric-card, .column,
  .intelligence-console, .intelligence-module, .triage-ops-auth-card,
  .research-stage-panel, .research-watchlist-panel, .research-discovery-panel,
  .blog-draft-card, .blog-draft-item, .campaign-panel, .campaign-result-panel,
  .finding-detail-card, .research-case-detail-panel, .research-case-list-panel,
  .research-create-panel) {
  background: var(--contrast-surface) !important;
  border-color: var(--contrast-border) !important;
  color: var(--contrast-text) !important;
  box-shadow: 0 8px 24px rgba(24, 56, 45, 0.055) !important;
}

body.professional-ui .main :is(input, select, textarea) {
  background: var(--contrast-surface) !important;
  border-color: var(--contrast-border-strong) !important;
  color: var(--contrast-text) !important;
}
body.professional-ui .main :is(input, select, textarea)::placeholder {
  color: var(--contrast-text-muted) !important;
  opacity: 1 !important;
}

body.professional-ui .main :is(table, .table-wrap) {
  background: var(--contrast-surface) !important;
  border-color: var(--contrast-border) !important;
}
body.professional-ui .main :is(thead, thead th) {
  background: var(--contrast-surface-muted) !important;
  color: var(--contrast-text-soft) !important;
  border-bottom-color: var(--contrast-border-strong) !important;
}
body.professional-ui .main :is(td, tbody tr) {
  background: var(--contrast-surface) !important;
  color: var(--contrast-text) !important;
  border-bottom-color: var(--contrast-border) !important;
}
body.professional-ui .main :is(tbody tr:hover, .selected-row, .finding-row:hover,
  .finding-row.selected-row) { background: var(--contrast-surface-selected) !important; }

body.professional-ui .main .eyebrow,
body.professional-ui .main .section-kicker { color: var(--contrast-green-strong) !important; }
body.professional-ui .main .status-pill {
  background: #f4f8f6 !important;
  border-color: #becdc6 !important;
  color: #35463f !important;
}
body.professional-ui .main .status-pill.status-critical,
body.professional-ui .main .status-pill.status-failed,
body.professional-ui .main .status-pill.status-blocked {
  background: #faecec !important;
  border-color: #d49b9b !important;
  color: #7a1010 !important;
}
body.professional-ui .main .status-pill.status-open,
body.professional-ui .main .status-pill.status-high,
body.professional-ui .main .status-pill.status-review,
body.professional-ui .main .status-pill.status-needs-review,
body.professional-ui .main .status-pill.status-needs_review {
  background: #fff5dc !important;
  border-color: #d6b56c !important;
  color: #6b4700 !important;
}
body.professional-ui .main .status-pill.status-completed,
body.professional-ui .main .status-pill.status-closed,
body.professional-ui .main .status-pill.status-done {
  background: var(--contrast-green-soft) !important;
  border-color: #9dccbd !important;
  color: var(--contrast-green-strong) !important;
}

body.professional-ui .main :is(.primary-btn, button.primary-btn) {
  background: var(--contrast-green) !important;
  border-color: var(--contrast-green) !important;
  color: #ffffff !important;
}
body.professional-ui .main :is(.secondary-btn, .mini-btn, button.secondary-btn, button.mini-btn) {
  background: var(--contrast-surface) !important;
  border-color: var(--contrast-border-strong) !important;
  color: var(--contrast-text) !important;
}
body.professional-ui .main :is(.danger-btn, button.danger-btn) {
  background: #faecec !important;
  border-color: #d49b9b !important;
  color: var(--contrast-red) !important;
}
body.professional-ui .main :is(button, a, input, select, textarea, summary):focus-visible {
  outline: 3px solid var(--contrast-focus) !important;
  outline-offset: 2px !important;
  box-shadow: 0 0 0 3px rgba(11, 128, 104, 0.18) !important;
}
body.professional-ui .main :is(button, input, select, textarea)[disabled],
body.professional-ui .main :is(button, input, select, textarea)[aria-disabled="true"] {
  opacity: 0.9 !important;
  background: #edf2ef !important;
  border-color: #cbd8d2 !important;
  color: #40534b !important;
  cursor: not-allowed !important;
}

body.professional-ui .top-strip .top-strip-live,
body.professional-ui .top-strip #top-strip-time { color: var(--contrast-text-soft) !important; }
body.professional-ui .top-strip .workspace-switcher {
  background: #fff !important;
  border-color: var(--contrast-border-strong) !important;
  color: var(--contrast-text) !important;
}
body.professional-ui .top-strip .workspace-switcher:hover,
body.professional-ui .top-strip .workspace-switcher:focus-visible {
  background: var(--contrast-green-soft) !important;
  border-color: var(--contrast-focus) !important;
  color: var(--contrast-green-strong) !important;
}
body.professional-ui .page-toolbar,
body.professional-ui .view-switcher {
  background: var(--contrast-surface) !important;
  border-color: var(--contrast-border) !important;
  color: var(--contrast-text) !important;
}
body.professional-ui .page-toolbar label,
body.professional-ui .page-toolbar .sr-only { color: var(--contrast-text-soft) !important; }
body.professional-ui .view-switch-btn { color: var(--contrast-text-soft) !important; }
body.professional-ui .view-switch-btn.active,
body.professional-ui .view-switch-btn:hover { background: var(--contrast-green-soft) !important; color: var(--contrast-green-strong) !important; }
body.professional-ui .auth-panel #auth-title { color: var(--contrast-text) !important; }

/* High-specificity task-board rules previously forced a dark palette. */
body.professional-ui #page-tasks .column {
  background: var(--contrast-surface-muted) !important;
  border-color: var(--contrast-border) !important;
  box-shadow: none !important;
}
body.professional-ui #page-tasks .column-head {
  background: #eaf5ee !important;
  border-color: var(--contrast-border) !important;
}
body.professional-ui #page-tasks .column-head h3,
body.professional-ui #page-tasks .column-subtitle,
body.professional-ui #page-tasks .column-count { color: var(--contrast-text) !important; }
body.professional-ui #page-tasks .task-card {
  background: var(--contrast-surface) !important;
  border-color: var(--contrast-border) !important;
  color: var(--contrast-text) !important;
  box-shadow: 0 8px 22px rgba(24, 56, 45, 0.06) !important;
}
body.professional-ui #page-tasks .task-card .title,
body.professional-ui #page-tasks .task-card-desc,
body.professional-ui #page-tasks .task-card .small,
body.professional-ui #page-tasks .task-card .meta,
body.professional-ui #page-tasks .task-card .muted-inline { color: var(--contrast-text) !important; }
body.professional-ui #page-tasks .task-card-desc,
body.professional-ui #page-tasks .task-card .small,
body.professional-ui #page-tasks .task-card .meta,
body.professional-ui #page-tasks .task-card .muted-inline { color: var(--contrast-text-soft) !important; }
body.professional-ui #page-tasks .task-card-status,
body.professional-ui #page-tasks .task-card-live {
  background: #f4f8f6 !important;
  border-color: var(--contrast-border) !important;
  color: var(--contrast-text-soft) !important;
}
body.professional-ui #page-tasks .task-card-live.queued,
body.professional-ui #page-tasks .task-card-live.picked_up,
body.professional-ui #page-tasks .task-card-live.running {
  background: #eaf3f8 !important; border-color: #9fc1d3 !important; color: #0f4c81 !important;
}
body.professional-ui #page-tasks .task-card-live.needs_review,
body.professional-ui #page-tasks .task-card-live.completed_with_gaps {
  background: #fff5dc !important; border-color: #d6b56c !important; color: #6b4700 !important;
}
body.professional-ui #page-tasks .task-card-live.failed,
body.professional-ui #page-tasks .task-card-live.cancelled {
  background: #faecec !important; border-color: #d49b9b !important; color: #7a1010 !important;
}
body.professional-ui #page-tasks .task-card-live.completed {
  background: var(--contrast-green-soft) !important; border-color: #9dccbd !important; color: var(--contrast-green-strong) !important;
}
body.professional-ui #page-tasks .badge {
  background: #f4f8f6 !important; border-color: var(--contrast-border) !important; color: var(--contrast-text-soft) !important;
}
body.professional-ui #page-tasks .badge.domain-exec,
body.professional-ui #page-tasks .badge.domain-platform,
body.professional-ui #page-tasks .badge.domain-security,
body.professional-ui #page-tasks .badge.priority-normal { background: #eaf3f8 !important; border-color: #9fc1d3 !important; color: #0f4c81 !important; }
body.professional-ui #page-tasks .badge.priority-urgent,
body.professional-ui #page-tasks .badge.review { background: #faecec !important; border-color: #d49b9b !important; color: #7a1010 !important; }
body.professional-ui #page-tasks .badge.priority-high,
body.professional-ui #page-tasks .badge.external { background: #fff5dc !important; border-color: #d6b56c !important; color: #6b4700 !important; }
body.professional-ui #page-tasks .badge.priority-low { background: var(--contrast-green-soft) !important; border-color: #9dccbd !important; color: var(--contrast-green-strong) !important; }
body.professional-ui #page-tasks .task-card-actions { background: #f5f8f6 !important; border-top-color: var(--contrast-border) !important; }
body.professional-ui #page-tasks .task-card-actions .mini-btn { background: #fff !important; color: var(--contrast-text) !important; border-color: var(--contrast-border-strong) !important; }
body.professional-ui #page-tasks .task-card-actions .mini-btn:hover { background: var(--contrast-text) !important; color: #fff !important; }
body.professional-ui #page-tasks .task-list .empty { color: var(--contrast-text-soft) !important; }

/* Triage, research, blog, and findings dynamic panels. */
body.professional-ui #page-triage-ops {
  --triage-panel: var(--contrast-surface);
  --triage-panel-2: var(--contrast-surface);
  --triage-panel-3: var(--contrast-surface-muted);
  --triage-line: var(--contrast-border);
  --triage-line-strong: var(--contrast-green);
  --triage-text: var(--contrast-text);
  --triage-muted: var(--contrast-text-soft);
  --triage-subtle: var(--contrast-text-muted);
}
body.professional-ui #page-triage-ops :is(.page-header, .card, .campaign-research-card,
  .campaign-list-field, .campaign-json-box, .campaign-discovery-box,
  .campaign-result-section, .campaign-package-row, .campaign-candidate-card,
  .research-recommendation, .research-recommendation-summary > div,
  .triage-output, .evidence-score-card, .evidence-row, .score-breakdown-row,
  .triage-alert-card, .triage-review-section, .campaign-panel, .campaign-result-panel) {
  background: var(--contrast-surface) !important;
  border-color: var(--contrast-border) !important;
  color: var(--contrast-text) !important;
}
body.professional-ui #page-triage-ops :is(h3, h4, h5, strong, label, .metric, .kv-val,
  .campaign-table th, .campaign-table td, .evidence-score-card strong,
  .evidence-row strong, .score-breakdown-row strong) { color: var(--contrast-text) !important; }
body.professional-ui #page-triage-ops :is(.small, .metric-label, .triage-rationale,
  .research-recommendation-safety, .research-recommendation-list, .kv-key,
  .campaign-result-section p, .evidence-score-card span, .score-breakdown-row p,
  .campaign-candidate-card .small, .triage-alert-meta) { color: var(--contrast-text-soft) !important; }
body.professional-ui #page-triage-ops :is(input, select, textarea) { background: #fff !important; color: var(--contrast-text) !important; border-color: var(--contrast-border-strong) !important; }
body.professional-ui #page-triage-ops :is(input, select, textarea)::placeholder { color: var(--contrast-text-muted) !important; }
body.professional-ui #page-triage-ops :is(.status-pill, .triage-rec-pill) { background: #f4f8f6 !important; color: var(--contrast-text-soft) !important; border-color: var(--contrast-border) !important; }
body.professional-ui #page-triage-ops .triage-rec-pill.true-positive,
body.professional-ui #page-triage-ops .status-pill.status-critical,
body.professional-ui #page-triage-ops .status-pill.status-failed,
body.professional-ui #page-triage-ops .status-pill.status-blocked { background: #faecec !important; color: #7a1010 !important; border-color: #d49b9b !important; }
body.professional-ui #page-triage-ops .triage-rec-pill.needs-review,
body.professional-ui #page-triage-ops .triage-rec-pill.needs_review,
body.professional-ui #page-triage-ops .status-pill.status-open,
body.professional-ui #page-triage-ops .status-pill.status-high { background: #fff5dc !important; color: #6b4700 !important; border-color: #d6b56c !important; }
body.professional-ui #page-triage-ops .triage-rec-pill.false-positive,
body.professional-ui #page-triage-ops .triage-rec-pill.expected-behavior,
body.professional-ui #page-triage-ops .status-pill.status-closed,
body.professional-ui #page-triage-ops .status-pill.status-done { background: var(--contrast-green-soft) !important; color: var(--contrast-green-strong) !important; border-color: #9dccbd !important; }
body.professional-ui #page-triage-ops .triage-rec-pill.not-applicable,
body.professional-ui #page-triage-ops .triage-rec-pill.not_applicable { background: #f1f3f2 !important; color: var(--contrast-text-soft) !important; border-color: var(--contrast-border) !important; }
body.professional-ui #page-triage-ops .triage-actionability-no_local_impact,
body.professional-ui #page-triage-ops .triage-actionability-review_only { opacity: 1 !important; }
body.professional-ui #page-triage-ops .triage-actionability-callout { background: #f5f8f6 !important; color: var(--contrast-text-soft) !important; border-color: var(--contrast-border) !important; }

body.professional-ui #page-operator-guide :is(.guide-toc a, .guide-step, .guide-mini-card) {
  background: #fff !important; border-color: var(--contrast-border) !important; color: var(--contrast-text) !important;
}
body.professional-ui #page-operator-guide :is(.guide-toc a, .guide-step, .guide-mini-card):hover,
body.professional-ui #page-operator-guide :is(.guide-toc a, .guide-step, .guide-mini-card):focus-visible { background: var(--contrast-green-soft) !important; color: var(--contrast-text) !important; }
body.professional-ui #page-operator-guide .guide-pill,
body.professional-ui #page-operator-guide .guide-step > span { background: var(--contrast-green-soft) !important; border-color: #9dccbd !important; color: var(--contrast-green-strong) !important; }
body.professional-ui #page-operator-guide .guide-mini-card :is(strong, span),
body.professional-ui #page-operator-guide .guide-step :is(p, strong),
body.professional-ui #page-operator-guide .guide-toc a { color: var(--contrast-text-soft) !important; }
body.professional-ui #page-operator-guide .guide-mini-card strong,
body.professional-ui #page-operator-guide .guide-step strong { color: var(--contrast-text) !important; }
body.professional-ui #page-operator-guide .guide-callout { background: #eaf3f8 !important; border-color: #9fc1d3 !important; color: #27424c !important; }
body.professional-ui #page-operator-guide .guide-callout.guide-good { background: var(--contrast-green-soft) !important; border-color: #9dccbd !important; color: #244b34 !important; }
body.professional-ui #page-operator-guide .guide-callout.guide-warning { background: #fff5dc !important; border-color: #d6b56c !important; color: #59400c !important; }
body.professional-ui #page-operator-guide .guide-callout.guide-danger { background: #faecec !important; border-color: #d49b9b !important; color: #721e29 !important; }

/* Drawers, dialogs, command palette, and toast content use the same readable
   paper surface. The overlay itself remains dark to preserve modal hierarchy. */
body.professional-ui :is(.command-palette-card, .help-drawer, .intelligence-result-modal-card,
  .intelligence-result-section, .confirm-dialog-card, .modal-card, .blog-edit-modal-card,
  .research-retract-modal-card) {
  background: #fff !important; border-color: var(--contrast-border-strong) !important; color: var(--contrast-text) !important;
}
body.professional-ui :is(.command-palette-head, .help-drawer-head, .intelligence-result-head,
  .intelligence-result-actions) { background: #fff !important; border-color: var(--contrast-border) !important; }
body.professional-ui :is(.command-palette-head h2, .help-drawer-head h2,
  .intelligence-result-head h3, .intelligence-result-section h4,
  .confirm-dialog-message) { color: var(--contrast-text) !important; }
body.professional-ui :is(.command-item, .command-item strong, .help-drawer-body,
  .intelligence-result-section p, .intelligence-result-list, .confirm-dialog-context,
  .intelligence-result-meta span, .intelligence-result-empty) { color: var(--contrast-text-soft) !important; }
body.professional-ui .command-item:hover,
body.professional-ui .command-item.selected { background: var(--contrast-green-soft) !important; border-color: #9dccbd !important; }
body.professional-ui :is(.command-item small, .command-empty, .command-palette-foot,
  .help-drawer-body, .help-drawer-links a) { color: var(--contrast-text-muted) !important; }
body.professional-ui .help-drawer-links a { border-color: var(--contrast-border) !important; color: var(--contrast-green-strong) !important; background: #fff !important; }
body.professional-ui :is(.intelligence-result-draft, .intelligence-result-json) { background: var(--contrast-surface-muted) !important; border-color: var(--contrast-border) !important; color: var(--contrast-text) !important; }
body.professional-ui .toast { background: #fff !important; border-color: var(--contrast-border) !important; color: var(--contrast-text) !important; }

/* Authentication is part of the same bright product surface. */
body.professional-ui .auth-gate { background: var(--contrast-bg) !important; }
body.professional-ui .auth-panel { background: #fff !important; border-color: var(--contrast-border-strong) !important; color: var(--contrast-text) !important; box-shadow: 0 18px 42px rgba(24, 56, 45, .08) !important; }
body.professional-ui .auth-panel :is(h1, p, label, .auth-boundary, .auth-message) { color: var(--contrast-text-soft) !important; }
body.professional-ui .auth-panel h1 { color: var(--contrast-text) !important; }
body.professional-ui .auth-panel input { background: #fff !important; color: var(--contrast-text) !important; border-color: var(--contrast-border-strong) !important; }

/* Keep the intentionally dark Enterprise setup banner readable. */
body.professional-ui #page-enterprise .enterprise-setup,
body.professional-ui #page-enterprise .enterprise-setup h3 { background: #17211e !important; color: #f9fafb !important; }
body.professional-ui #page-enterprise .enterprise-setup-copy p { color: #d4e0db !important; }
body.professional-ui #page-enterprise .enterprise-setup .primary-btn { background: #f7fafc !important; color: #17211e !important; border-color: #f7fafc !important; }
body.professional-ui #page-enterprise .enterprise-setup .secondary-btn { background: transparent !important; color: #f2f6f4 !important; border-color: #8ca39a !important; }

body.professional-ui .research-rule-preview,
body.professional-ui .main :is(pre, code, .mono) {
  background: var(--contrast-surface-muted) !important;
  border-color: var(--contrast-border) !important;
  color: var(--contrast-text) !important;
}
body.professional-ui .error,
body.professional-ui .form-error,
body.professional-ui .last-action-failed { color: var(--contrast-red) !important; }
body.professional-ui .good,
body.professional-ui .success,
body.professional-ui .ok,
body.professional-ui .approved { color: var(--contrast-green-strong) !important; }
body.professional-ui .main a { color: var(--contrast-blue) !important; }
body.professional-ui .main a:hover { color: var(--contrast-green-strong) !important; }

/* Residual legacy selectors: these components historically used the dark
   command-surface palette and have higher specificity than the shared rules
   above. Keep their hierarchy, but give every resting state readable text. */
body.professional-ui .main .metric-scope {
  color: var(--contrast-text-muted) !important;
}
body.professional-ui .main :is(.operations-cockpit, .cockpit-panel, .cockpit-summary) {
  background: var(--contrast-surface) !important;
  border-color: var(--contrast-border) !important;
  color: var(--contrast-text) !important;
}
body.professional-ui .main :is(.cockpit-item, .cockpit-clear) {
  background: var(--contrast-surface-muted) !important;
  border-color: var(--contrast-border) !important;
  color: var(--contrast-text) !important;
}
body.professional-ui .main .cockpit-item:hover,
body.professional-ui .main .cockpit-item:focus-visible,
body.professional-ui .main .cockpit-clear:hover,
body.professional-ui .main .cockpit-clear:focus-visible {
  background: var(--contrast-green-soft) !important;
  border-color: var(--contrast-focus) !important;
}
body.professional-ui .main .cockpit-item :is(strong, .cockpit-facts strong),
body.professional-ui .main .cockpit-summary h3 {
  color: var(--contrast-text) !important;
}
body.professional-ui .main .cockpit-item :is(small, span),
body.professional-ui .main .cockpit-clear span,
body.professional-ui .main .cockpit-facts small {
  color: var(--contrast-text-soft) !important;
}
body.professional-ui .main .table-link {
  color: var(--contrast-blue) !important;
}
body.professional-ui .main .table-link:hover,
body.professional-ui .main .table-link:focus-visible {
  color: var(--contrast-green-strong) !important;
}
body.professional-ui .main :is(.severity-urgent, .severity-critical) {
  color: var(--contrast-red) !important;
}
body.professional-ui .main :is(.severity-high, .severity-medium) {
  color: var(--contrast-amber) !important;
}
body.professional-ui .main :is(.severity-normal, .severity-low) {
  color: var(--contrast-blue) !important;
}
body.professional-ui .main .research-evidence-row > span:first-child {
  color: var(--contrast-text-soft) !important;
}
body.professional-ui .main :is(select, option) {
  color-scheme: light;
}
body.professional-ui .main option {
  background: #fff !important;
  color: var(--contrast-text) !important;
}
body.professional-ui .main .badge {
  background: #f4f8f6 !important;
  border-color: var(--contrast-border) !important;
  color: var(--contrast-text-soft) !important;
}
body.professional-ui .main .badge.priority-normal,
body.professional-ui .main .badge.domain-exec,
body.professional-ui .main .badge.domain-platform,
body.professional-ui .main .badge.domain-security {
  background: #eaf3f8 !important;
  border-color: #9fc1d3 !important;
  color: var(--contrast-blue) !important;
}
body.professional-ui .main .badge.priority-low {
  background: var(--contrast-green-soft) !important;
  border-color: #9dccbd !important;
  color: var(--contrast-green-strong) !important;
}
body.professional-ui .main .badge.priority-high,
body.professional-ui .main .badge.external {
  background: #fff5dc !important;
  border-color: #d6b56c !important;
  color: var(--contrast-amber) !important;
}
body.professional-ui .main .badge.priority-urgent,
body.professional-ui .main .badge.priority-critical,
body.professional-ui .main .badge.review {
  background: #faecec !important;
  border-color: #d49b9b !important;
  color: var(--contrast-red) !important;
}
body.professional-ui .main .inline-action-menu summary {
  background: #fff !important;
  border-color: var(--contrast-border-strong) !important;
  color: var(--contrast-text) !important;
}
body.professional-ui .main .inline-action-menu > div {
  background: #fff !important;
  border-color: var(--contrast-border-strong) !important;
  box-shadow: 0 12px 26px rgba(24, 56, 45, 0.12) !important;
}
body.professional-ui .main #work-scope-note {
  background: var(--contrast-surface-muted) !important;
  border-color: var(--contrast-border) !important;
  color: var(--contrast-text-soft) !important;
}

body.professional-ui .main :is(.research-sandbox-provider-card, .research-sandbox-recommendation) {
  background: #f5f9f7 !important;
  border-color: var(--contrast-border) !important;
  color: var(--contrast-text) !important;
}
body.professional-ui .main :is(.research-sandbox-provider-card, .research-sandbox-recommendation) .small,
body.professional-ui .main :is(.research-sandbox-provider-card, .research-sandbox-recommendation) li {
  color: var(--contrast-text-soft) !important;
}
body.professional-ui .main .research-sandbox-blockers {
  color: var(--contrast-amber) !important;
}

/* Keep the operator readout on the dark navigation rail. The legacy
   #global-status rule otherwise paints a dark surface with the bright-theme
   body text token, which becomes low-contrast after the content plane turns
   white. */
body.professional-ui .sidebar .sidebar-footer {
  margin: 16px 6px 0 !important;
  padding: 12px 10px !important;
  border: 1px solid #376454 !important;
  border-radius: 10px !important;
  background: #173229 !important;
  color: #d7e5df !important;
}
body.professional-ui .sidebar .sidebar-footer-label {
  margin-bottom: 8px !important;
  color: #9fbbb2 !important;
}
body.professional-ui .sidebar #global-status {
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: #f4f8f6 !important;
  font-family: var(--asd-mono) !important;
  font-size: 0.68rem !important;
  line-height: 1.45 !important;
  opacity: 1 !important;
  text-shadow: none !important;
}

body.professional-ui .research-pipeline-operational-actions {
  display: flex !important;
  align-items: center;
  justify-content: flex-end;
  gap: 8px !important;
}

@media (max-width: 720px) {
  body.professional-ui .research-pipeline-operational-actions {
    display: grid !important;
    width: 100%;
  }
}

/* Decision-first Mission Control
   The product keeps its established white and forest-green visual language,
   but now gives one operator decision clear precedence over raw telemetry. */
body.professional-ui #page-mission-control {
  color: #17211e;
}

body.professional-ui .top-strip .operator-identity {
  color: #33413b !important;
  opacity: 1 !important;
  font-weight: 700;
}

body.professional-ui .mission-today-header {
  margin-bottom: 18px;
}

body.professional-ui .mission-today-header h2 {
  font-size: clamp(2rem, 3.2vw, 3rem);
  letter-spacing: -0.045em;
}

body.professional-ui .mission-decision-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.8fr);
  gap: 16px;
  align-items: stretch;
}

body.professional-ui .mission-primary-card,
body.professional-ui .mission-next-card,
body.professional-ui .mission-flow-card,
body.professional-ui .mission-health-card,
body.professional-ui .operator-decision-guide,
body.professional-ui .finding-decision-summary {
  border: 1px solid #d6e0db !important;
  border-radius: 10px !important;
  background: #fff !important;
  color: #17211e !important;
}

body.professional-ui .mission-primary-card {
  min-height: 330px;
  padding: clamp(22px, 3vw, 34px);
  border-left: 5px solid #087963 !important;
  box-shadow: 0 16px 38px rgba(20, 61, 47, 0.08);
}

body.professional-ui .mission-primary-card.tone-critical { border-left-color: #c92a2a !important; }
body.professional-ui .mission-primary-card.tone-high { border-left-color: #a85b00 !important; }
body.professional-ui .mission-primary-card.tone-success { border-left-color: #087963 !important; }

body.professional-ui .mission-decision-heading,
body.professional-ui .mission-section-heading,
body.professional-ui .mission-decision-actions,
body.professional-ui .finding-decision-head,
body.professional-ui .finding-recommended-action {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

body.professional-ui .mission-decision-rank {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  border-radius: 50%;
  background: #e8f4ef;
  color: #075f4f;
  font: 800 0.82rem/1 var(--asd-mono);
}

body.professional-ui .mission-primary-card h3 {
  max-width: 740px;
  margin: 18px 0 10px;
  color: #17211e !important;
  font-size: clamp(1.55rem, 2.2vw, 2.15rem);
  line-height: 1.08;
  letter-spacing: -0.035em;
}

body.professional-ui .mission-decision-summary {
  max-width: 760px;
  margin: 0;
  color: #53645d !important;
  font-size: 1rem;
  line-height: 1.6;
}

body.professional-ui .mission-decision-reason,
body.professional-ui .mission-decision-evidence {
  display: grid;
  gap: 4px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid #e2e9e5;
}

body.professional-ui .mission-decision-reason span,
body.professional-ui .mission-decision-evidence span,
body.professional-ui .mission-decision-actions > span {
  color: #53645d !important;
  font-size: 0.86rem;
  line-height: 1.5;
}

body.professional-ui .mission-decision-evidence {
  grid-template-columns: minmax(130px, auto) repeat(3, minmax(0, 1fr));
  gap: 10px;
}

body.professional-ui .mission-decision-evidence span {
  padding: 8px 10px;
  border: 1px solid #e1e9e5;
  border-radius: 7px;
  background: #f6f9f7;
}

body.professional-ui .mission-decision-actions {
  align-items: center;
  margin-top: 22px;
}

body.professional-ui .mission-next-card {
  height: 100%;
  padding: 22px;
}

body.professional-ui .mission-section-heading h3 {
  margin: 4px 0 0;
  color: #17211e !important;
  font-size: 1.15rem;
}

body.professional-ui .mission-section-heading > span {
  color: #66766f !important;
  font-size: 0.78rem;
}

body.professional-ui .mission-next-list {
  display: grid;
  gap: 0;
  margin-top: 14px;
}

body.professional-ui .mission-decision-row {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 16px 0;
  border: 0;
  border-top: 1px solid #e2e9e5;
  border-radius: 0;
  background: transparent;
  color: #17211e;
  text-align: left;
  cursor: pointer;
}

body.professional-ui .mission-decision-row:hover,
body.professional-ui .mission-decision-row:focus-visible {
  background: #f6faf8;
}

body.professional-ui .mission-decision-row strong,
body.professional-ui .mission-decision-row small {
  display: block;
}

body.professional-ui .mission-decision-row small {
  margin-top: 4px;
  color: #66766f !important;
  line-height: 1.45;
}

body.professional-ui .mission-clear-state {
  display: grid;
  gap: 4px;
  padding: 26px 0;
  border-top: 1px solid #e2e9e5;
}

body.professional-ui .mission-clear-state span { color: #66766f !important; }

body.professional-ui .mission-flow-card {
  margin-top: 16px;
  padding: 20px 22px;
}

body.professional-ui .mission-flow {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 18px;
  border: 1px solid #dce6e1;
  border-radius: 8px;
  overflow: hidden;
}

body.professional-ui .mission-flow-step {
  position: relative;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 2px 10px;
  padding: 16px;
  border-right: 1px solid #dce6e1;
  background: #fbfcfb;
}

body.professional-ui .mission-flow-step:last-child { border-right: 0; }
body.professional-ui .mission-flow-step > span { grid-row: 1 / span 2; display: grid; place-items: center; width: 26px; height: 26px; border: 1px solid #a9bbb3; border-radius: 50%; color: #53645d; font: 800 0.72rem/1 var(--asd-mono); }
body.professional-ui .mission-flow-step strong { color: #17211e !important; }
body.professional-ui .mission-flow-step small { color: #66766f !important; line-height: 1.35; }
body.professional-ui .mission-flow-step.active { background: #eff8f4; }
body.professional-ui .mission-flow-step.active > span { border-color: #087963; background: #087963; color: #fff; }
body.professional-ui .mission-flow-step.needs-attention { background: #fff7ed; }
body.professional-ui .mission-flow-step.needs-attention > span { border-color: #a85b00; color: #8a4a00; }
body.professional-ui .mission-flow-step.approval { background: #f5f7f6; }

body.professional-ui .mission-automation-policy {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

body.professional-ui .mission-automation-policy > div {
  display: grid;
  gap: 4px;
  padding: 11px 12px;
  border: 1px solid #e0e8e4;
  border-radius: 7px;
  background: #f8faf9;
}

body.professional-ui .mission-automation-policy span { color: #687870 !important; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.05em; }
body.professional-ui .mission-automation-policy strong { color: #26332e !important; font-size: 0.8rem; }
body.professional-ui .mission-automation-policy > p { grid-column: 1 / -1; margin: 2px 0 0; color: #5b6b64 !important; font-size: 0.82rem; line-height: 1.5; }

body.professional-ui .mission-health-card {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
  margin-top: 12px;
  padding: 14px 18px;
}

body.professional-ui .mission-health-card > div {
  display: grid;
  gap: 3px;
  padding: 0 16px;
  border-right: 1px solid #e1e8e4;
}

body.professional-ui .mission-health-card > div:first-child { padding-left: 0; }
body.professional-ui .mission-health-card > div:last-child { border-right: 0; padding-right: 0; }
body.professional-ui .mission-health-card span { color: #6b7a74 !important; font-size: 0.73rem; text-transform: uppercase; letter-spacing: 0.06em; }
body.professional-ui .mission-health-card strong { color: #26332e !important; font-size: 0.82rem; }
body.professional-ui .mission-health-updated { text-align: right; }

body.professional-ui .mission-secondary-details {
  margin-top: 14px;
  padding: 0;
  border: 1px solid #d6e0db;
  border-radius: 9px;
  background: #fff;
}

body.professional-ui .mission-secondary-details > summary {
  padding: 15px 18px;
  color: #405049;
  font-weight: 750;
  cursor: pointer;
}

body.professional-ui .mission-secondary-details[open] { padding: 0 18px 18px; }
body.professional-ui .mission-secondary-details[open] > summary { margin: 0 -18px 14px; border-bottom: 1px solid #e1e8e4; }

body.professional-ui .operator-decision-guide {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.85fr) auto;
  gap: 22px;
  align-items: center;
  margin: -2px 0 18px;
  padding: 18px 20px;
  border-left: 4px solid #087963 !important;
}

body.professional-ui .operator-guide-main h3 {
  margin: 3px 0 4px;
  color: #17211e !important;
  font-size: 1.05rem;
}

body.professional-ui .operator-guide-main p {
  margin: 0;
  color: #5b6b64 !important;
  font-size: 0.86rem;
  line-height: 1.5;
}

body.professional-ui .operator-guide-boundary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

body.professional-ui .operator-guide-boundary span {
  display: grid;
  gap: 3px;
  color: #607068 !important;
  font-size: 0.77rem;
  line-height: 1.4;
}

body.professional-ui .operator-guide-boundary strong { color: #26332e !important; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; }

body.professional-ui #finding-summary {
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 10px !important;
}

body.professional-ui .finding-summary-card {
  min-height: 120px;
  padding: 16px !important;
}

body.professional-ui .finding-summary-card.priority { border-top: 3px solid #087963 !important; }
body.professional-ui .finding-summary-context {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  padding: 10px 2px 0;
  color: #607068;
  font-size: 0.78rem;
}
body.professional-ui .finding-summary-context strong { color: #17211e; }

body.professional-ui .finding-decision-summary {
  padding: 20px;
  border-left: 4px solid #087963 !important;
}

body.professional-ui .finding-decision-head h4 {
  margin: 4px 0 6px;
  color: #17211e !important;
  font-size: 1.35rem;
}

body.professional-ui .finding-decision-head p {
  max-width: 760px;
  margin: 0;
  color: #586961 !important;
  line-height: 1.5;
}

body.professional-ui .finding-assessment-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 18px;
  border: 1px solid #dde6e2;
  border-radius: 8px;
  overflow: hidden;
}

body.professional-ui .finding-assessment-grid > div {
  display: grid;
  gap: 4px;
  padding: 13px 14px;
  border-right: 1px solid #dde6e2;
  background: #f8faf9;
}
body.professional-ui .finding-assessment-grid > div:last-child { border-right: 0; }
body.professional-ui .finding-assessment-grid span { color: #697970 !important; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.05em; }
body.professional-ui .finding-assessment-grid strong { color: #17211e !important; }

body.professional-ui .finding-decision-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}

body.professional-ui .finding-decision-columns > div {
  padding: 14px 16px;
  border: 1px solid #e0e8e4;
  border-radius: 8px;
  background: #fbfcfb;
}

body.professional-ui .finding-decision-columns h5 { margin: 0 0 8px; color: #2b3933 !important; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.06em; }
body.professional-ui .finding-decision-columns ul { margin: 0; padding-left: 18px; color: #53645d; }
body.professional-ui .finding-decision-columns li + li { margin-top: 5px; }
body.professional-ui .finding-decision-columns p { margin: 0; color: #53645d !important; }

body.professional-ui .finding-recommended-action {
  align-items: center;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #e0e8e4;
}

body.professional-ui .finding-recommended-action > span { display: grid; gap: 4px; color: #53645d !important; }
body.professional-ui .finding-recommended-action > span strong { color: #17211e !important; }
body.professional-ui .finding-recommended-action > div { display: flex; flex-wrap: wrap; gap: 8px; }

body.professional-ui .finding-full-evidence {
  margin-top: 14px;
  border: 1px solid #d7e1dc;
  border-radius: 9px;
  background: #fff;
}
body.professional-ui .finding-full-evidence > summary { padding: 14px 16px; color: #35443d; font-weight: 750; cursor: pointer; }
body.professional-ui .finding-full-evidence[open] > summary { border-bottom: 1px solid #e0e8e4; }
body.professional-ui .finding-full-evidence-body { padding: 14px; }
body.professional-ui .finding-full-evidence .card { background: #fff !important; color: #17211e !important; }

@media (min-width: 1180px) {
  body.professional-ui.finding-review-open #finding-queue-section {
    display: grid;
    grid-template-columns: minmax(420px, 0.9fr) minmax(620px, 1.35fr);
    gap: 16px;
    align-items: start;
  }
  body.professional-ui.finding-review-open .finding-review-drawer {
    position: sticky;
    z-index: 1;
    top: 82px;
    right: auto;
    width: auto;
    height: calc(100dvh - 104px);
    padding: 18px;
    border: 1px solid #d6e0db;
    border-radius: 10px;
    background: #f7f9f8;
    box-shadow: none;
    transform: none;
  }
  body.professional-ui.finding-review-open .finding-review-drawer-head {
    top: -18px;
    margin: -18px -18px 16px;
    padding: 15px 18px;
    background: #f7f9f8;
  }
}

@media (max-width: 1020px) {
  body.professional-ui .mission-decision-layout,
  body.professional-ui .operator-decision-guide {
    grid-template-columns: 1fr;
  }
  body.professional-ui .mission-flow { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  body.professional-ui .mission-automation-policy { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  body.professional-ui .mission-flow-step:nth-child(2) { border-right: 0; }
  body.professional-ui .mission-flow-step:nth-child(-n+2) { border-bottom: 1px solid #dce6e1; }
  body.professional-ui .mission-health-card { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 0; }
  body.professional-ui .mission-health-card > div:nth-child(2) { border-right: 0; }
  body.professional-ui .mission-health-updated { text-align: left; }
  body.professional-ui .finding-assessment-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  body.professional-ui .finding-assessment-grid > div:nth-child(2) { border-right: 0; }
  body.professional-ui .finding-assessment-grid > div:nth-child(-n+2) { border-bottom: 1px solid #dde6e2; }
}

@media (max-width: 680px) {
  body.professional-ui .mission-primary-card { min-height: 0; padding: 20px; }
  body.professional-ui .mission-decision-evidence { grid-template-columns: 1fr; }
  body.professional-ui .mission-decision-actions,
  body.professional-ui .mission-section-heading,
  body.professional-ui .finding-decision-head,
  body.professional-ui .finding-recommended-action { flex-direction: column; align-items: stretch; }
  body.professional-ui .mission-flow { grid-template-columns: 1fr; }
  body.professional-ui .mission-automation-policy { grid-template-columns: 1fr; }
  body.professional-ui .mission-flow-step { border-right: 0; border-bottom: 1px solid #dce6e1; }
  body.professional-ui .mission-flow-step:last-child { border-bottom: 0; }
  body.professional-ui .mission-health-card,
  body.professional-ui #finding-summary,
  body.professional-ui .finding-assessment-grid,
  body.professional-ui .finding-decision-columns,
  body.professional-ui .operator-guide-boundary { grid-template-columns: 1fr !important; }
  body.professional-ui .mission-health-card > div,
  body.professional-ui .mission-health-card > div:first-child,
  body.professional-ui .mission-health-card > div:last-child { padding: 9px 0; border-right: 0; border-bottom: 1px solid #e1e8e4; }
  body.professional-ui .mission-health-card > div:last-child { border-bottom: 0; }
  body.professional-ui .finding-assessment-grid > div { border-right: 0; border-bottom: 1px solid #dde6e2; }
  body.professional-ui .finding-assessment-grid > div:last-child { border-bottom: 0; }
  body.professional-ui .finding-recommended-action > div { display: grid; }
}

/* Execution-grounded research workspace */
body.professional-ui .research-reliability-workspace {
  margin: 18px 0;
  padding: 20px;
  border: 1px solid #b8cec4;
  border-top: 4px solid #087b63;
  border-radius: 10px;
  background: linear-gradient(145deg, #f9fcfa 0%, #eef6f2 100%);
  color: #16241f;
}
body.professional-ui .research-reliability-head,
body.professional-ui .research-reliability-next {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
}
body.professional-ui .research-reliability-head h4 { margin: 3px 0 5px; color: #102a22; font-size: 1.25rem; }
body.professional-ui .research-reliability-head p { margin: 0; color: #40564d; max-width: 760px; }
body.professional-ui .research-reliability-next {
  margin: 16px 0;
  padding: 13px 15px;
  border-left: 4px solid #087b63;
  border-radius: 6px;
  background: #fff;
}
body.professional-ui .research-reliability-next strong { color: #075e4d; }
body.professional-ui .research-reliability-next span { color: #344a41; max-width: 780px; }
body.professional-ui .research-reliability-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 16px 0 20px;
}
body.professional-ui .research-reliability-automation-actions {
  grid-template-columns: minmax(0, 1fr);
  margin-bottom: 12px;
}
body.professional-ui .research-reliability-automation-status {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid #bdd5c9;
  border-radius: 8px;
  background: #edf7f1;
  color: #163b2f;
}
body.professional-ui .research-reliability-automation-status span,
body.professional-ui .research-reliability-automation-status small {
  color: #365f51;
}
body.professional-ui .research-reliability-manual {
  margin: 0 0 20px;
  border: 1px solid #cbdad3;
  border-radius: 8px;
  background: #f7faf8;
}
body.professional-ui .research-reliability-manual > summary {
  padding: 11px 13px;
  color: #1f4639;
  cursor: pointer;
  font-weight: 750;
}
body.professional-ui .research-reliability-manual .research-reliability-actions {
  margin: 0;
  padding: 0 12px 12px;
}
body.professional-ui .research-reliability-action {
  display: grid;
  align-content: start;
  gap: 6px;
  min-width: 0;
  padding: 11px;
  border: 1px solid #d3e0da;
  border-radius: 8px;
  background: #fff;
}
body.professional-ui .research-reliability-action button { width: 100%; min-height: 39px; }
body.professional-ui .research-reliability-action span { color: #4b5f57; font-size: 0.78rem; line-height: 1.35; }
body.professional-ui .research-reliability-action button:disabled {
  color: #66766f !important;
  background: #e6ece9 !important;
  border-color: #cbd6d1 !important;
  opacity: 1;
}
body.professional-ui .research-reliability-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
body.professional-ui .research-reliability-grid > article {
  min-width: 0;
  padding: 15px;
  border: 1px solid #d4e0da;
  border-radius: 8px;
  background: #fff;
  overflow: auto;
}
body.professional-ui .research-reliability-grid h5 { margin: 0 0 11px; color: #173c31; font-size: 0.95rem; }
body.professional-ui .research-reliability-wide { grid-column: 1 / -1; }
body.professional-ui .research-reliability-stages { display: grid; gap: 8px; }
body.professional-ui .research-reliability-stage {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) auto;
  gap: 3px 10px;
  align-items: center;
  padding-bottom: 8px;
  border-bottom: 1px solid #e2e9e5;
}
body.professional-ui .research-reliability-stage:last-child { padding-bottom: 0; border-bottom: 0; }
body.professional-ui .research-reliability-stage > span:first-child { color: #213d33; font-weight: 750; }
body.professional-ui .research-reliability-stage small { grid-column: 1 / -1; color: #52675f; }
body.professional-ui .research-adjudication-panel {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid #e2b35b;
  border-left: 4px solid #b36b00;
  border-radius: 7px;
  background: #fffaf0;
}
body.professional-ui .research-adjudication-panel p { color: #4f3c1e; }
.research-publication-preview-probe {
  position: fixed;
  z-index: -1;
  top: 0;
  left: -10000px;
  box-sizing: border-box;
  padding: 32px;
  overflow-wrap: anywhere;
  background: #fff;
  color: #17211e;
  font: 16px/1.55 Georgia, serif;
}
.research-publication-preview-probe * { box-sizing: border-box; max-width: 100%; }
.research-publication-preview-probe table { width: 100%; border-collapse: collapse; }
.research-publication-preview-probe th,
.research-publication-preview-probe td { padding: 8px; border: 1px solid #ced9d4; text-align: left; }
.research-publication-preview-probe pre { padding: 12px; overflow: auto; background: #edf3f0; color: #17211e; }

@media (max-width: 1020px) {
  body.professional-ui .research-reliability-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 680px) {
  body.professional-ui .research-reliability-workspace { padding: 15px; }
  body.professional-ui .research-reliability-head,
  body.professional-ui .research-reliability-next { flex-direction: column; }
  body.professional-ui .research-reliability-actions,
  body.professional-ui .research-reliability-grid { grid-template-columns: 1fr; }
  body.professional-ui .research-reliability-wide { grid-column: auto; }
}

/* Analysis jobs are decision cards rather than a six-column table. Long
   pipeline IDs, providers, and assessments must wrap without colliding. */
body.professional-ui .intelligence-pipeline-list {
  display: grid;
  gap: 12px;
}

body.professional-ui .intelligence-pipeline-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid #cbd8d2;
  border-left: 4px solid #0b8068;
  border-radius: 10px;
  background: #fff;
  color: #17211e;
  box-shadow: 0 1px 0 rgba(23, 33, 30, 0.04);
}

body.professional-ui .intelligence-pipeline-card-head,
body.professional-ui .intelligence-pipeline-card-footer {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
}

body.professional-ui .intelligence-pipeline-card-head {
  border-bottom: 1px solid #e0e8e4;
  background: #f7faf8;
}

body.professional-ui .intelligence-pipeline-identity,
body.professional-ui .intelligence-pipeline-field,
body.professional-ui .intelligence-pipeline-next,
body.professional-ui .intelligence-child-job > span {
  min-width: 0;
}

body.professional-ui .intelligence-pipeline-identity {
  display: grid;
  gap: 4px;
}

body.professional-ui .intelligence-pipeline-label {
  display: block;
  color: #687770;
  font-size: 0.69rem;
  font-weight: 750;
  letter-spacing: 0.06em;
  line-height: 1.35;
  text-transform: uppercase;
}

body.professional-ui .intelligence-pipeline-identity code,
body.professional-ui .intelligence-pipeline-field code,
body.professional-ui .intelligence-child-job code {
  display: inline;
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

body.professional-ui .intelligence-pipeline-identity > code {
  font-size: 0.86rem;
  font-weight: 750;
}

body.professional-ui .intelligence-pipeline-card-grid {
  display: grid;
  grid-template-columns: minmax(240px, 1.4fr) repeat(3, minmax(145px, 0.75fr));
  gap: 0;
}

body.professional-ui .intelligence-pipeline-field {
  display: grid;
  align-content: start;
  gap: 6px;
  padding: 14px 16px;
  border-right: 1px solid #e0e8e4;
}

body.professional-ui .intelligence-pipeline-field:last-child { border-right: 0; }
body.professional-ui .intelligence-pipeline-field strong,
body.professional-ui .intelligence-pipeline-field time {
  color: #253a33;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

body.professional-ui .intelligence-pipeline-card-footer {
  align-items: center;
  border-top: 1px solid #e0e8e4;
  background: #fbfcfb;
}

body.professional-ui .intelligence-pipeline-card-footer .intelligence-child-jobs {
  flex: 1 1 auto;
  margin: 0;
}

body.professional-ui .intelligence-pipeline-card-footer .intelligence-child-jobs > summary {
  color: #17634f;
  font-size: 0.76rem;
  font-weight: 700;
}

body.professional-ui .intelligence-pipeline-next {
  display: flex;
  flex: 0 1 auto;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  text-align: right;
}

body.professional-ui .intelligence-pipeline-next-copy {
  display: block;
  margin-top: 3px;
  color: #253a33;
  font-size: 0.8rem;
  line-height: 1.4;
}

body.professional-ui .intelligence-child-job {
  align-items: flex-start;
  overflow-wrap: anywhere;
}

@media (max-width: 1180px) {
  body.professional-ui .intelligence-pipeline-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  body.professional-ui .intelligence-pipeline-field:nth-child(2) { border-right: 0; }
  body.professional-ui .intelligence-pipeline-field:nth-child(-n + 2) { border-bottom: 1px solid #e0e8e4; }
}

@media (max-width: 680px) {
  body.professional-ui .intelligence-pipeline-card-head,
  body.professional-ui .intelligence-pipeline-card-footer,
  body.professional-ui .intelligence-pipeline-next,
  body.professional-ui .intelligence-child-job {
    display: grid;
    justify-content: stretch;
    text-align: left;
  }
  body.professional-ui .intelligence-pipeline-card-grid { grid-template-columns: 1fr; }
  body.professional-ui .intelligence-pipeline-field,
  body.professional-ui .intelligence-pipeline-field:nth-child(2) {
    border-right: 0;
    border-bottom: 1px solid #e0e8e4;
  }
  body.professional-ui .intelligence-pipeline-field:last-child { border-bottom: 0; }
  body.professional-ui .intelligence-pipeline-next button { width: 100%; }
  body.professional-ui .intelligence-child-job > span:last-child { justify-content: flex-start; }
}

/* Legacy signal-skin rules paint .icon-btn with a near-black gradient while
   the professional theme sets dark text, which made every dialog close
   button (✕) invisible.  Reset the gradient for the current theme. */
body.professional-ui .icon-btn {
  background-image: none;
  background-color: var(--contrast-surface);
  border-color: var(--contrast-border, #dce7e1);
  color: var(--contrast-text);
  box-shadow: none;
}
body.professional-ui .icon-btn:hover {
  background-color: var(--contrast-green-soft);
  color: var(--contrast-text);
}
