:root {
  color-scheme: light;
  --ink: #162033;
  --muted: #697386;
  --line: #d9dfeb;
  --surface: #fffdfa;
  --surface-soft: #f4f1eb;
  --teal: #0f766e;
  --teal-dark: #0b5751;
  --amber: #a9792b;
  --amber-soft: #fbf0d3;
  --gold: #c7a15a;
  --graphite: #202735;
  --ivory: #fffaf1;
  --green: #15803d;
  --green-soft: #dcfce7;
  --coral: #c2410c;
  --coral-soft: #ffedd5;
  --blue: #2457a6;
  --blue-soft: #e9f0ff;
  --shadow: 0 18px 45px rgba(24, 33, 47, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  background:
    radial-gradient(circle at top right, rgba(199, 161, 90, 0.12), transparent 32rem),
    linear-gradient(180deg, #fbf8f1 0%, var(--surface-soft) 100%);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

body.dark-mode {
  --ink: #f8fafc;
  --muted: #b7c0d1;
  --line: rgba(226, 232, 240, 0.18);
  --surface: #121a29;
  --surface-soft: #0b1120;
  --ivory: #182133;
  --blue-soft: rgba(36, 87, 166, 0.18);
  --green-soft: rgba(21, 128, 61, 0.2);
  --coral-soft: rgba(194, 65, 12, 0.18);
  --amber-soft: rgba(199, 161, 90, 0.18);
  --shadow: 0 18px 45px rgba(0, 0, 0, 0.3);
  background:
    radial-gradient(circle at top right, rgba(199, 161, 90, 0.12), transparent 32rem),
    linear-gradient(180deg, #0b1120 0%, #111827 100%);
}

body.dark-mode .main,
body.dark-mode .global-search input,
body.dark-mode .global-search-results,
body.dark-mode .notification-panel,
body.dark-mode .graph-fullscreen-shell,
body.dark-mode .graph-inspector,
body.dark-mode .live-net-node,
body.dark-mode .net-node,
body.dark-mode .graph-popover,
body.dark-mode .graph-hint,
body.dark-mode .graph-legend-panel,
body.dark-mode .graph-minimap,
body.dark-mode .report-page-preview,
body.dark-mode .hierarchy-list div,
body.dark-mode .review-stats span {
  background: var(--surface);
  color: var(--ink);
}

body.dark-mode .top-discovery-card,
body.dark-mode .executive-summary-hero,
body.dark-mode .workspace-focus-panel,
body.dark-mode .portfolio-hierarchy-card,
body.dark-mode .chart-card,
body.dark-mode .saved-dashboard-card,
body.dark-mode .team-presence-card {
  background: linear-gradient(180deg, #121a29 0%, #0f172a 100%);
}

body.dark-mode .mini-network {
  background-color: #0f172a;
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.16) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.16) 1px, transparent 1px);
}

button,
select,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  background: linear-gradient(180deg, #111827 0%, #202735 100%);
  color: #f8fafc;
  padding: 24px 18px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.brand-lockup h1 {
  font-weight: 760;
  letter-spacing: 0;
}

.topbar {
  backdrop-filter: blur(12px);
}

.topbar h2,
.run-panel h3,
.top-discovery-card h3,
.portfolio-dashboard h3 {
  font-weight: 780;
  letter-spacing: 0;
}

.presentation-toggle.is-active,
.walkthrough-button:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 4px rgba(199, 161, 90, 0.18);
}

.global-search {
  display: grid;
  gap: 4px;
  min-width: min(360px, 36vw);
  position: relative;
}

.global-search span {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
}

.global-search input {
  background: #fffdfa;
  border: 1px solid var(--line);
  border-radius: 999px;
  min-height: 42px;
  padding: 0 14px;
}

.global-search-results {
  background: #fffdfa;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  display: none;
  left: 0;
  overflow: hidden;
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 50;
}

.global-search-results.is-visible {
  display: grid;
}

.global-search-results button,
.search-empty {
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  display: grid;
  gap: 2px;
  padding: 10px 12px;
  text-align: left;
}

.global-search-results button:hover {
  background: #f9f5ec;
}

.global-search-results span,
.search-empty {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 750;
}

.notification-button {
  background: var(--graphite);
  border: 1px solid rgba(199, 161, 90, 0.38);
  border-radius: 999px;
  color: #fffaf1;
  font-weight: 900;
  min-height: 42px;
  min-width: 42px;
}

.notification-panel {
  background: #fffdfa;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 26px 70px rgba(22, 32, 51, 0.22);
  display: grid;
  gap: 10px;
  max-width: 360px;
  padding: 16px;
  position: fixed;
  right: 24px;
  top: 92px;
  z-index: 1000;
}

.notification-panel div {
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 4px;
  padding-bottom: 9px;
}

.notification-panel span {
  color: var(--muted);
  font-weight: 760;
}

.brand-lockup {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 12px;
  align-items: center;
}

.brand-mark {
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  display: grid;
  place-items: center;
  position: relative;
  background:
    linear-gradient(135deg, rgba(8, 127, 140, 0.95), rgba(194, 65, 12, 0.88));
}

.brand-mark span {
  position: absolute;
  width: 22px;
  height: 2px;
  background: #ffffff;
}

.brand-mark span:nth-child(1) {
  transform: rotate(90deg);
}

.brand-mark span:nth-child(2) {
  transform: rotate(30deg);
}

.brand-mark span:nth-child(3) {
  transform: rotate(-30deg);
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sidebar .eyebrow {
  color: #9ca3af;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: 18px;
  line-height: 1.2;
}

h2 {
  margin-bottom: 0;
  font-size: 28px;
  line-height: 1.15;
}

h3 {
  margin-bottom: 0;
  font-size: 18px;
  line-height: 1.25;
}

.nav-list {
  display: grid;
  gap: 8px;
}

.nav-item {
  width: 100%;
  min-height: 44px;
  border: 1px solid transparent;
  color: #d1d5db;
  background: transparent;
  padding: 10px 12px;
  display: grid;
  grid-template-columns: 32px 1fr;
  align-items: center;
  text-align: left;
}

.nav-item:hover,
.nav-item.is-active {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.08);
}

.nav-icon {
  font-size: 12px;
  color: #93c5fd;
}

.sidebar-status {
  margin-top: auto;
  border: 1px solid rgba(255, 255, 255, 0.16);
  padding: 14px;
  display: grid;
  grid-template-columns: 12px 1fr;
  gap: 10px;
  align-items: start;
  background: rgba(255, 255, 255, 0.06);
}

.sidebar-status small {
  display: block;
  margin-top: 4px;
  color: #cbd5e1;
  overflow-wrap: anywhere;
}

.status-dot {
  width: 10px;
  height: 10px;
  margin-top: 4px;
  border-radius: 999px;
  background: #22c55e;
  box-shadow: 0 0 0 5px rgba(34, 197, 94, 0.14);
}

.main {
  min-width: 0;
  padding: 24px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  margin-bottom: 18px;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.select-label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.select-control,
.search-input {
  min-height: 40px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  padding: 0 12px;
  border-radius: 6px;
}

.search-input {
  width: min(280px, 100%);
}

.primary-button,
.secondary-button,
.icon-button {
  min-height: 40px;
  border-radius: 6px;
  border: 1px solid transparent;
  padding: 0 14px;
  font-weight: 800;
}

.primary-button {
  background: var(--teal);
  color: #ffffff;
}

.primary-button:hover {
  background: var(--teal-dark);
}

.secondary-button {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--line);
}

.secondary-button:hover,
.icon-button:hover {
  border-color: var(--teal);
}

.icon-button {
  width: 42px;
  padding: 0;
  background: var(--surface);
  border-color: var(--line);
}

.notice {
  border: 1px solid #f1c56d;
  background: var(--amber-soft);
  color: #633f08;
  padding: 12px 14px;
  border-radius: 8px;
  margin-bottom: 18px;
}

.view {
  display: none;
}

.view.is-visible {
  display: block;
}

.overview-grid,
.ask-layout,
.evidence-layout,
.deployment-grid,
.foundation-grid {
  display: grid;
  gap: 16px;
}

.overview-grid > *,
.ask-layout > *,
.evidence-layout > *,
.deployment-grid > *,
.foundation-grid > *,
.review-grid > *,
.module-strip > * {
  min-width: 0;
}

.overview-grid {
  grid-template-columns: minmax(0, 1.1fr) minmax(360px, 0.9fr);
}

.ask-layout {
  grid-template-columns: minmax(0, 0.95fr) minmax(360px, 1.05fr);
}

.run-panel,
.input-panel,
.run-log,
.json-panel,
.checklist-panel {
  max-width: 100%;
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 18px;
}

.panel-head,
.section-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-bottom: 16px;
}

.section-head {
  margin-top: 22px;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 999px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.pill.pass {
  background: var(--green-soft);
  color: var(--green);
}

.pill.warning {
  background: var(--amber-soft);
  color: var(--amber);
}

.pill.muted {
  background: var(--blue-soft);
  color: var(--blue);
}

.pill.danger {
  background: var(--coral-soft);
  color: var(--coral);
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.metric-tile {
  min-height: 96px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.metric-tile span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.metric-tile strong {
  font-size: 30px;
  line-height: 1;
}

.story-card {
  margin-top: 14px;
  padding: 14px;
  border-left: 4px solid var(--teal);
  background: #eefaf9;
}

.story-card p:last-child {
  margin-bottom: 0;
}

.upload-row {
  margin-top: 14px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.8fr) auto;
  gap: 10px;
  align-items: center;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.upload-row label {
  color: var(--muted);
  font-weight: 800;
}

.upload-row input[type="file"] {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  padding: 8px;
}

.lineage-strip {
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.code-box {
  max-width: 100%;
  min-height: 0;
  max-height: 360px;
  overflow: auto;
  margin: 0;
  border: 1px solid #cbd5e1;
  background: #101828;
  color: #e5e7eb;
  border-radius: 8px;
  padding: 14px;
  font-family: "Cascadia Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 13px;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.client-readable-panel {
  display: grid;
  gap: 12px;
  max-height: 420px;
  overflow: auto;
}

.summary-card,
.report-card,
.deliverable-card,
.client-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.summary-card,
.report-card {
  padding: 14px;
  display: grid;
  gap: 12px;
}

.summary-card-head,
.client-item,
.deliverable-card > div:first-child {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
}

.summary-card p,
.report-card p,
.client-item p {
  margin: 0;
  color: var(--muted);
}

.client-metric-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.client-metric {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 10px;
}

.client-metric span,
.client-item small,
.deliverable-card dt,
.deliverable-card span,
.report-section h4 {
  color: var(--muted);
}

.client-metric span,
.deliverable-card dt {
  display: block;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.client-metric strong,
.deliverable-card dd {
  display: block;
  min-width: 0;
  margin: 4px 0 0;
  overflow-wrap: anywhere;
}

.module-sequence {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.module-sequence span {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--blue);
  padding: 7px 10px;
  font-size: 12px;
  font-weight: 900;
}

.deliverable-list,
.client-list {
  display: grid;
  gap: 10px;
}

.deliverable-card {
  display: grid;
  gap: 12px;
  padding: 12px;
}

.deliverable-card dl {
  display: grid;
  grid-template-columns: 0.8fr minmax(0, 1.5fr) minmax(0, 1fr);
  gap: 10px;
  margin: 0;
}

.deliverable-card dd {
  font-size: 13px;
}

.client-item {
  padding: 12px;
}

.client-item-main {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.client-item-main strong,
.client-item-main small,
.client-item-main p {
  overflow-wrap: anywhere;
}

.report-section {
  display: grid;
  gap: 8px;
}

.report-section h4 {
  margin: 4px 0 0;
  font-size: 13px;
  text-transform: uppercase;
}

.research-notice,
.empty-state {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff7ed;
  color: var(--coral);
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 800;
}

.empty-state {
  background: var(--surface-soft);
  color: var(--muted);
}

.manual-download-panel {
  display: grid;
  gap: 8px;
  border: 1px solid var(--blue);
  border-radius: 8px;
  background: #eff6ff;
  padding: 12px;
}

.manual-download-panel span {
  color: var(--muted);
}

.manual-download-panel .secondary-button {
  justify-self: start;
  text-decoration: none;
}

.static-export-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 10px;
}

.static-export-links .secondary-button {
  text-decoration: none;
}

.segmented-control {
  display: inline-flex;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 8px;
  padding: 3px;
}

.segment {
  min-height: 32px;
  border: 0;
  background: transparent;
  color: var(--muted);
  border-radius: 6px;
  padding: 0 12px;
  font-weight: 800;
}

.segment.is-active {
  background: var(--teal);
  color: #ffffff;
}

.module-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.module-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  min-height: 160px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.module-card header {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: start;
}

.module-id {
  color: var(--teal);
  font-size: 13px;
  font-weight: 900;
}

.module-card p {
  color: var(--muted);
  margin-bottom: 0;
}

.module-card dl {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: auto 0 0;
}

.module-card dt {
  color: var(--muted);
  font-size: 12px;
}

.module-card dd {
  margin: 2px 0 0;
  font-weight: 900;
}

.pipeline-board {
  display: grid;
  grid-template-columns: repeat(8, minmax(120px, 1fr));
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 8px;
}

.pipeline-step {
  min-height: 220px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 5px solid var(--teal);
  border-radius: 8px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.pipeline-step.is-science {
  border-top-color: var(--coral);
}

.pipeline-step strong {
  font-size: 18px;
}

.progress-track {
  height: 8px;
  background: #e5e7eb;
  border-radius: 999px;
  overflow: hidden;
  margin-top: auto;
}

.progress-fill {
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, var(--teal), var(--green));
}

.run-log ol,
.run-log li {
  margin: 0;
}

.run-log ol {
  display: grid;
  gap: 8px;
  padding-left: 22px;
}

.run-log li {
  color: var(--muted);
}

.evidence-layout {
  grid-template-columns: minmax(0, 1fr) minmax(340px, 0.55fr);
}

.module-table-wrap {
  overflow: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.module-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}

.module-table th,
.module-table td {
  padding: 14px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}

.module-table th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.module-table tr:last-child td {
  border-bottom: 0;
}

.lower-evidence {
  margin-top: 16px;
}

.review-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.review-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.case-hero,
.case-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.case-grid {
  margin-top: 16px;
}

.graph-canvas {
  min-height: 460px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(8, 127, 140, 0.06) 1px, transparent 1px),
    linear-gradient(0deg, rgba(8, 127, 140, 0.06) 1px, transparent 1px),
    var(--surface-soft);
  background-size: 28px 28px;
  position: relative;
  overflow: hidden;
}

.graph-svg {
  display: block;
  width: 100%;
  height: 460px;
}

.graph-edge-line {
  stroke: rgba(36, 87, 166, 0.42);
  stroke-width: 2.2;
  marker-end: url("#arrowhead");
}

.graph-svg marker path {
  fill: rgba(36, 87, 166, 0.58);
}

.graph-node-svg rect {
  fill: #ffffff;
  stroke: var(--teal);
  stroke-width: 2;
  filter: drop-shadow(0 8px 14px rgba(24, 33, 47, 0.16));
}

.graph-node-svg.is-drug rect {
  stroke: var(--coral);
}

.graph-node-svg.is-context rect,
.graph-node-svg.is-strategy rect {
  stroke: var(--amber);
}

.graph-node-svg text {
  fill: var(--ink);
  font-size: 15px;
  font-weight: 900;
  text-anchor: middle;
  dominant-baseline: middle;
}

.graph-legend rect {
  fill: rgba(255, 255, 255, 0.86);
  stroke: var(--line);
}

.graph-legend text {
  fill: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.legend-biomarker {
  fill: #ffffff;
  stroke: var(--teal);
  stroke-width: 2;
}

.legend-drug {
  fill: #ffffff;
  stroke: var(--coral);
  stroke-width: 2;
}

.legend-strategy {
  fill: #ffffff;
  stroke: var(--amber);
  stroke-width: 2;
}

.entity-cloud,
.case-hypotheses,
.source-list {
  display: grid;
  gap: 10px;
}

.entity-chip {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: var(--surface-soft);
}

.entity-chip small,
.source-item small {
  color: var(--muted);
}

.source-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: var(--surface);
}

.source-item a {
  color: var(--blue);
  overflow-wrap: anywhere;
}

.export-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.review-form {
  display: grid;
  gap: 10px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.ask-form {
  display: grid;
  gap: 10px;
}

.ask-form label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.ask-form textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  resize: vertical;
}

.benchmark-panel {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.benchmark-list {
  display: grid;
  gap: 8px;
  max-height: 460px;
  overflow: auto;
}

.benchmark-item {
  display: grid;
  gap: 4px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: var(--surface-soft);
  color: var(--ink);
  text-align: left;
}

.benchmark-item:hover {
  border-color: var(--teal);
}

.benchmark-item span {
  color: var(--muted);
}

.review-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.review-form input,
.review-form select,
.review-form textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 10px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
}

.hypothesis-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  display: grid;
  gap: 12px;
}

.hypothesis-card p {
  margin-bottom: 0;
  color: var(--muted);
}

.score-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
}

.score-bar {
  height: 8px;
  background: #e5e7eb;
  border-radius: 999px;
  overflow: hidden;
}

.score-bar span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--coral), var(--amber), var(--green));
}

.deployment-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.foundation-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.foundation-list {
  display: grid;
  gap: 10px;
}

.foundation-item {
  display: grid;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: var(--surface-soft);
}

.foundation-item small,
.foundation-item span {
  color: var(--muted);
  overflow-wrap: anywhere;
}

.checklist-panel.wide {
  grid-column: 1 / -1;
}

.checklist {
  list-style: none;
  margin: 16px 0 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.checklist li {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 10px;
  align-items: start;
}

.check {
  width: 14px;
  height: 14px;
  margin-top: 4px;
  border-radius: 3px;
  border: 2px solid currentColor;
}

.check.pass {
  color: var(--green);
  background: var(--green-soft);
}

.check.hold {
  color: var(--amber);
  background: var(--amber-soft);
}

.operating-model {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.operating-model div {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: var(--surface-soft);
}

.operating-model span {
  display: block;
  color: var(--muted);
  margin-top: 6px;
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.settings-grid label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.settings-grid input:not([type="checkbox"]) {
  min-width: 0;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 10px;
}

.toggle-row {
  align-content: center;
  grid-template-columns: 18px 1fr;
  grid-auto-flow: column;
  align-items: center;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  max-width: 320px;
  background: #111827;
  color: #ffffff;
  padding: 12px 14px;
  border-radius: 8px;
  box-shadow: var(--shadow);
  transform: translateY(150%);
  transition: transform 180ms ease;
}

.toast.is-visible {
  transform: translateY(0);
}

.executive-overview {
  display: grid;
  gap: 18px;
  margin-bottom: 18px;
}

.executive-summary-hero {
  background:
    linear-gradient(135deg, rgba(22, 32, 51, 0.96), rgba(32, 39, 53, 0.92)),
    linear-gradient(90deg, rgba(199, 161, 90, 0.22), transparent);
  border: 1px solid rgba(199, 161, 90, 0.32);
  border-radius: 8px;
  box-shadow: 0 28px 70px rgba(22, 32, 51, 0.22);
  color: #fffaf1;
  display: grid;
  gap: 22px;
  grid-template-columns: minmax(0, 1.3fr) minmax(260px, 0.7fr);
  overflow: hidden;
  padding: 28px;
  position: relative;
}

.executive-summary-hero::after {
  background: linear-gradient(180deg, rgba(199, 161, 90, 0.55), rgba(199, 161, 90, 0));
  content: "";
  height: 180px;
  position: absolute;
  right: 32px;
  top: -58px;
  transform: rotate(18deg);
  width: 1px;
}

.executive-summary-hero .eyebrow,
.executive-summary-hero p {
  color: rgba(255, 250, 241, 0.78);
}

.executive-summary-hero h3 {
  color: #fffaf1;
  font-size: clamp(2rem, 4vw, 4.4rem);
  font-weight: 700;
  line-height: 1.02;
  margin: 8px 0 14px;
  max-width: 980px;
}

.hero-copy > p:last-of-type {
  font-size: 1.05rem;
  line-height: 1.65;
  max-width: 780px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.hero-score {
  align-content: center;
  display: grid;
  gap: 14px;
}

.score-ring {
  align-items: center;
  aspect-ratio: 1;
  background:
    radial-gradient(circle at center, #202735 0 56%, transparent 57%),
    conic-gradient(var(--gold) 0 94%, rgba(255, 255, 255, 0.22) 94% 100%);
  border-radius: 50%;
  display: grid;
  justify-items: center;
  padding: 28px;
}

.score-ring strong {
  color: #fffaf1;
  font-size: 2.4rem;
  font-weight: 800;
}

.score-ring span,
.trust-score span,
.trust-score small {
  color: rgba(255, 250, 241, 0.72);
  font-weight: 800;
}

.trust-score {
  background: rgba(255, 250, 241, 0.08);
  border: 1px solid rgba(255, 250, 241, 0.18);
  border-radius: 8px;
  display: grid;
  gap: 5px;
  padding: 14px;
}

.trust-score strong {
  color: #f6d58c;
  font-size: 1.45rem;
}

.executive-narrative-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.executive-narrative-grid article {
  background: rgba(255, 253, 250, 0.84);
  border: 1px solid rgba(199, 161, 90, 0.24);
  border-radius: 8px;
  box-shadow: 0 18px 45px rgba(24, 33, 47, 0.08);
  padding: 16px;
}

.executive-narrative-grid h3 {
  font-size: 1.02rem;
  line-height: 1.35;
  margin: 6px 0 8px;
}

.executive-narrative-grid p {
  color: var(--muted);
  line-height: 1.55;
}

.workspace-focus-panel,
.portfolio-hierarchy-card,
.saved-dashboard-card,
.team-presence-card,
.chart-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 18px;
}

.analytics-dashboard {
  align-items: start;
  gap: 22px;
}

.analytics-dashboard > .top-discovery-card,
.analytics-dashboard > .portfolio-dashboard,
.analytics-dashboard > .workspace-focus-panel {
  grid-column: 1 / -1;
}

.dashboard-widget {
  position: relative;
}

.widget-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
  margin-bottom: 8px;
}

.widget-controls button {
  background: #fffaf1;
  border: 1px solid rgba(199, 161, 90, 0.28);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  padding: 5px 8px;
}

.dashboard-widget.is-pinned {
  border-color: var(--gold);
  box-shadow: 0 18px 45px rgba(199, 161, 90, 0.16);
}

.dashboard-widget.is-wide {
  grid-column: 1 / -1;
}

.saved-dashboard-card,
.team-presence-card {
  display: grid;
  gap: 14px;
}

.saved-dashboard-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.saved-dashboard-list button {
  background: #fffaf1;
  border: 1px solid rgba(199, 161, 90, 0.34);
  border-radius: 999px;
  color: var(--ink);
  font-weight: 900;
  padding: 10px 13px;
}

.active-users {
  display: grid;
  gap: 10px;
}

.active-users span {
  align-items: center;
  background: #fffaf1;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  gap: 10px;
  padding: 10px;
}

.active-users b {
  align-items: center;
  background: var(--graphite);
  border: 2px solid rgba(199, 161, 90, 0.42);
  border-radius: 50%;
  color: #fffaf1;
  display: inline-flex;
  height: 34px;
  justify-content: center;
  width: 34px;
}

.lock-strip {
  background: var(--amber-soft);
  border: 1px solid rgba(199, 161, 90, 0.42);
  border-radius: 8px;
  color: #8a5a12;
  font-weight: 850;
  padding: 10px 12px;
}

.dashboard-widget.is-collapsed > :not(.widget-controls) {
  display: none !important;
}

.hierarchy-flow {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin: 12px 0;
}

.hierarchy-flow span {
  background: #f9f5ec;
  border: 1px solid rgba(199, 161, 90, 0.28);
  border-radius: 999px;
  color: var(--ink);
  font-weight: 900;
  padding: 9px 10px;
  text-align: center;
}

.hierarchy-list {
  display: grid;
  gap: 10px;
}

.hierarchy-list div {
  background: #fffaf1;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 4px;
  padding: 12px;
}

.hierarchy-list small {
  color: var(--muted);
  font-weight: 760;
}

.analytics-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.analytics-grid .chart-card:first-child {
  grid-column: span 2;
}

.chart-card {
  min-height: 230px;
}

.signal-heatmap {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-top: 14px;
}

.signal-heatmap span {
  background: linear-gradient(135deg, rgba(15, 118, 110, 0.18), rgba(199, 161, 90, 0.64));
  border: 1px solid rgba(199, 161, 90, 0.24);
  border-radius: 8px;
  min-height: 42px;
}

.signal-heatmap span:nth-child(3n) {
  background: linear-gradient(135deg, rgba(36, 87, 166, 0.16), rgba(15, 118, 110, 0.54));
}

.signal-heatmap span:nth-child(4n) {
  background: linear-gradient(135deg, rgba(194, 65, 12, 0.14), rgba(199, 161, 90, 0.44));
}

.bubble-plot {
  background:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 42px 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  height: 160px;
  margin-top: 14px;
  position: relative;
}

.bubble-plot span {
  background: radial-gradient(circle at 35% 35%, #fffaf1, var(--teal));
  border: 2px solid rgba(15, 118, 110, 0.42);
  border-radius: 50%;
  box-shadow: 0 12px 28px rgba(15, 118, 110, 0.2);
  height: var(--s);
  left: var(--x);
  position: absolute;
  top: var(--y);
  transform: translate(-50%, -50%);
  width: var(--s);
}

.bar-chart {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.bar-chart span {
  background: #ece6d9;
  border-radius: 999px;
  display: block;
  height: 28px;
  overflow: hidden;
  position: relative;
}

.bar-chart span::before {
  background: linear-gradient(90deg, var(--teal), var(--gold));
  border-radius: inherit;
  content: "";
  inset: 0 auto 0 0;
  position: absolute;
  width: var(--v);
}

.bar-chart b {
  color: var(--ink);
  font-size: 0.78rem;
  left: 10px;
  position: relative;
  top: 5px;
  z-index: 1;
}

.confidence-bars {
  align-items: end;
  display: flex;
  gap: 10px;
  height: 130px;
  margin-top: 12px;
}

.confidence-bars span {
  background: linear-gradient(180deg, var(--gold), var(--teal));
  border-radius: 8px 8px 0 0;
  flex: 1;
}

.sparkline {
  align-items: end;
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(6, 1fr);
  height: 130px;
  margin-top: 12px;
}

.sparkline i {
  background: #f3ead8;
  border-top: 3px solid var(--gold);
  border-radius: 8px 8px 0 0;
}

.sparkline i:nth-child(1) { height: 32%; }
.sparkline i:nth-child(2) { height: 48%; }
.sparkline i:nth-child(3) { height: 42%; }
.sparkline i:nth-child(4) { height: 66%; }
.sparkline i:nth-child(5) { height: 74%; }
.sparkline i:nth-child(6) { height: 88%; }

.review-stats {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.review-stats span {
  background: #fffaf1;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-weight: 850;
  padding: 10px;
}

.top-discovery-card,
.portfolio-dashboard,
.workflow-visual,
.knowledge-network-card,
.reasoning-panel,
.science-metrics-card,
.quality-card,
.review-summary-card,
.timeline-card,
.run-duration-card,
.provenance-explorer,
.collaboration-card,
.security-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 18px;
}

button:disabled,
button.is-loading {
  cursor: wait;
  filter: saturate(0.75);
  opacity: 0.72;
}

.client-readable-panel .empty-state {
  min-height: 88px;
}

.top-discovery-card {
  border-color: rgba(15, 118, 110, 0.28);
  background: linear-gradient(180deg, #fffdfa 0%, #f9f5ec 100%);
}

.confidence-gauge {
  align-items: center;
  background: #dcfce7;
  border: 1px solid #bbf7d0;
  border-radius: 999px;
  color: #047857;
  display: inline-flex;
  font-size: 1.35rem;
  font-weight: 900;
  justify-content: center;
  min-height: 56px;
  min-width: 56px;
}

.confidence-gauge.small {
  font-size: 1rem;
  min-height: 44px;
  min-width: 44px;
}

.discovery-statement {
  color: var(--ink);
  font-size: 1.12rem;
  font-weight: 750;
  line-height: 1.45;
  max-width: 980px;
}

.discovery-evidence-strip,
.executive-kpi-grid,
.science-metric-grid,
.run-duration-grid,
.reasoning-grid {
  display: grid;
  gap: 10px;
}

.discovery-evidence-strip {
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  margin: 16px 0;
}

.discovery-evidence-strip span,
.kpi-card,
.science-metric-grid span,
.run-duration-grid span,
.reasoning-grid div {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  padding: 12px;
}

.discovery-evidence-strip strong,
.kpi-card strong,
.science-metric-grid strong,
.run-duration-grid strong,
.reasoning-grid strong {
  color: var(--ink);
  display: block;
  font-weight: 900;
}

.report-preview-card {
  align-items: stretch;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1fr) auto;
  margin: 14px 0;
}

.report-cover {
  background:
    linear-gradient(135deg, #fffaf1, #f3ead8);
  border: 1px solid rgba(199, 161, 90, 0.34);
  border-left: 5px solid var(--gold);
  border-radius: 8px;
  display: grid;
  gap: 6px;
  padding: 16px;
}

.report-cover span {
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.report-cover strong {
  color: var(--ink);
  font-size: 1.05rem;
}

.report-cover small {
  color: var(--muted);
  font-weight: 750;
}

.report-page-preview {
  border-top: 1px solid rgba(199, 161, 90, 0.28);
  color: var(--muted);
  display: grid;
  gap: 5px;
  margin: 10px 0 0;
  padding: 10px 0 0 20px;
}

.report-page-preview li {
  font-weight: 800;
}

.report-preview-actions {
  align-content: center;
  display: flex;
  gap: 8px;
}

.suggested-action {
  background: #ecfeff;
  border: 1px solid #a5f3fc;
  border-radius: 8px;
  color: #155e75;
  display: grid;
  gap: 4px;
  margin-bottom: 14px;
  padding: 12px;
}

.suggested-action span {
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.action-row.compact {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.executive-kpi-grid {
  grid-template-columns: repeat(6, minmax(120px, 1fr));
}

.kpi-card {
  min-height: 94px;
}

.kpi-card span {
  color: var(--muted);
  display: block;
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
}

.kpi-card strong {
  font-size: 1.58rem;
  margin-top: 10px;
}

.pass-text {
  color: #047857 !important;
}

.portfolio-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(6, minmax(120px, 1fr));
}

.portfolio-grid div,
.security-grid span {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  padding: 12px;
}

.portfolio-grid strong,
.security-grid strong {
  color: var(--ink);
  display: block;
  font-weight: 900;
  margin-top: 6px;
}

.project-switcher {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.project-chip,
.graph-tool,
.provenance-flow button {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  font-weight: 850;
  padding: 8px 11px;
}

.project-chip.is-active,
.graph-tool.is-active,
.provenance-flow button.is-active {
  background: #0f766e;
  border-color: #0f766e;
  color: #ffffff;
}

.workflow-steps {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0;
}

.workflow-step {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-weight: 900;
  padding: 9px 12px;
}

.workflow-step.done {
  background: #dcfce7;
  border-color: #bbf7d0;
  color: #047857;
}

.workflow-step.active {
  animation: pulseStep 1.5s ease-in-out infinite;
  background: #e0f2fe;
  border-color: #7dd3fc;
  color: #075985;
}

.workflow-arrow {
  color: var(--muted);
  font-weight: 900;
}

@keyframes pulseStep {
  0%, 100% { box-shadow: 0 0 0 0 rgba(14, 116, 144, 0.22); }
  50% { box-shadow: 0 0 0 8px rgba(14, 116, 144, 0); }
}

.execution-progress {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  padding: 12px;
}

.execution-progress > div:first-child {
  align-items: baseline;
  display: flex;
  gap: 12px;
}

.execution-progress strong {
  color: var(--teal);
  font-size: 1.4rem;
}

.progress-track span {
  background: linear-gradient(90deg, var(--teal), #22c55e);
}

.executive-two-column {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
}

.executive-three-column {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.mini-network {
  --graph-zoom: 1;
  --graph-pan: 0%;
  background-image:
    linear-gradient(#e5edf5 1px, transparent 1px),
    linear-gradient(90deg, #e5edf5 1px, transparent 1px);
  background-size: 28px 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  min-height: 280px;
  overflow: hidden;
  position: relative;
}

.graph-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
}

.mini-network.interactive {
  cursor: grab;
  touch-action: none;
}

.live-edges,
.live-node-layer {
  inset: 0;
  position: absolute;
}

.live-edge {
  fill: none;
  stroke: #2563eb;
  stroke-linecap: round;
  opacity: 0.58;
}

.live-edge.is-dimmed {
  opacity: 0.12;
}

.live-edge.is-neighbor-highlight {
  opacity: 0.95;
  stroke: var(--gold);
}

.live-edge.is-neighbor-dimmed {
  opacity: 0.08;
}

.live-net-node {
  align-items: center;
  background: #ffffff;
  border: 2px solid #0e7490;
  border-radius: 999px;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.12);
  color: var(--ink);
  display: inline-flex;
  flex-direction: column;
  font-weight: 900;
  gap: 2px;
  min-width: 94px;
  padding: 8px 12px;
  position: absolute;
  transform: translate(-50%, -50%);
  transition: opacity 160ms ease, box-shadow 160ms ease, transform 160ms ease;
  user-select: none;
  z-index: 3;
}

.live-net-node:hover {
  box-shadow: 0 0 0 5px rgba(199, 161, 90, 0.2), 0 18px 34px rgba(15, 23, 42, 0.18);
  transform: translate(-50%, -50%) scale(1.04);
}

.live-net-node small {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 900;
}

.live-net-node.gene { border-color: #0891b2; }
.live-net-node.disease { border-color: #0e7490; }
.live-net-node.drug { border-color: #ea580c; }
.live-net-node.trial { border-color: #7c3aed; }
.live-net-node.evidence { border-color: #15803d; }
.live-net-node.pathway { border-color: #9333ea; }
.live-net-node.high { box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.16), 0 10px 22px rgba(15, 23, 42, 0.12); }
.live-net-node.medium { box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.16), 0 10px 22px rgba(15, 23, 42, 0.12); }
.live-net-node.low { box-shadow: 0 0 0 4px rgba(148, 163, 184, 0.18), 0 10px 22px rgba(15, 23, 42, 0.12); }
.live-net-node.is-dimmed { opacity: 0.18; }
.live-net-node.is-neighbor-dimmed { opacity: 0.28; }
.live-net-node.is-selected {
  box-shadow: 0 0 0 6px rgba(199, 161, 90, 0.26), 0 16px 34px rgba(15, 23, 42, 0.2);
  transform: translate(-50%, -50%) scale(1.06);
  z-index: 4;
}

.case-live-graph .live-net-node {
  animation: graphNodeBreath 5s ease-in-out infinite;
}

@keyframes graphNodeBreath {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.05); }
}

.graph-hint {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  left: 12px;
  padding: 7px 10px;
  position: absolute;
  top: 12px;
  z-index: 4;
}

.graph-legend-panel {
  align-items: center;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  font-size: 0.76rem;
  font-weight: 900;
  gap: 7px;
  padding: 7px 10px;
  position: absolute;
  right: 12px;
  top: 12px;
  z-index: 4;
}

.legend-dot {
  border-radius: 50%;
  display: inline-block;
  height: 9px;
  width: 9px;
}

.legend-dot.gene { background: #0891b2; }
.legend-dot.drug { background: #ea580c; }
.legend-dot.evidence { background: #15803d; }

.graph-minimap {
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid var(--line);
  border-radius: 8px;
  height: 58px;
  position: absolute;
  right: 12px;
  bottom: 12px;
  width: 92px;
  z-index: 4;
}

.graph-minimap span {
  background: rgba(15, 118, 110, 0.18);
  border: 1px solid rgba(15, 118, 110, 0.42);
  border-radius: 5px;
  display: block;
  height: 30px;
  margin: 13px auto;
  width: 54px;
}

.graph-fullscreen-open {
  overflow: hidden;
}

.graph-fullscreen-overlay {
  background: rgba(15, 23, 42, 0.72);
  inset: 0;
  padding: 18px;
  position: fixed;
  z-index: 2000;
}

.graph-fullscreen-shell {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.28);
  display: grid;
  grid-template-rows: auto 1fr;
  height: calc(100vh - 36px);
  overflow: hidden;
}

.graph-fullscreen-header {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  padding: 14px 18px;
}

.graph-fullscreen-header h3 {
  margin: 2px 0 0;
}

.graph-fullscreen-layout {
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(0, 1fr) 320px;
  min-height: 0;
  padding: 14px;
}

.graph-fullscreen-body {
  display: grid;
  grid-template-rows: auto 1fr;
  min-height: 0;
}

.graph-fullscreen-body .graph-toolbar {
  margin: 0 0 12px;
}

.case-live-graph.is-full-browser {
  min-height: 0;
  height: 100%;
}

.graph-fullscreen-body .graph-popover {
  max-width: 680px;
}

.graph-inspector {
  background: #fffaf1;
  border: 1px solid rgba(199, 161, 90, 0.32);
  border-radius: 8px;
  display: grid;
  gap: 12px;
  min-height: 0;
  overflow: auto;
  padding: 16px;
}

.graph-inspector h3 {
  margin: 0;
}

.graph-inspector dl {
  display: grid;
  gap: 10px;
  margin: 0;
}

.graph-inspector div {
  border-bottom: 1px solid rgba(199, 161, 90, 0.22);
  padding-bottom: 8px;
}

.graph-inspector dt {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 900;
  text-transform: uppercase;
}

.graph-inspector dd {
  color: var(--ink);
  font-weight: 850;
  margin: 3px 0 0;
}

.graph-fullscreen-button {
  background: #111827;
  border-color: #111827;
  color: #ffffff;
}

.graph-close-button {
  background: #fee2e2;
  border-color: #fecaca;
  color: #991b1b;
}

.trust-footer {
  align-items: center;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  font-size: 0.82rem;
  font-weight: 850;
  gap: 10px;
  justify-content: center;
  margin-top: 22px;
  padding: 18px 0 4px;
}

.trust-footer span {
  background: rgba(255, 253, 250, 0.78);
  border: 1px solid rgba(199, 161, 90, 0.22);
  border-radius: 999px;
  padding: 7px 10px;
}

.live-module-board {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 14px;
}

.live-module-board span {
  background: #fffaf1;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  font-weight: 850;
  padding: 11px 12px;
  position: relative;
}

.live-module-board span::before {
  background: var(--line);
  border-radius: 50%;
  content: "";
  display: inline-block;
  height: 9px;
  margin-right: 8px;
  width: 9px;
}

.live-module-board span.is-complete {
  background: var(--green-soft);
  color: var(--green);
}

.live-module-board span.is-complete::before {
  background: var(--green);
}

.live-module-board span.is-running {
  background: var(--amber-soft);
  color: #8a5a12;
  box-shadow: 0 0 0 4px rgba(199, 161, 90, 0.16);
}

.live-module-board span.is-running::before {
  animation: pulseStatus 1.1s ease-in-out infinite;
  background: var(--gold);
}

@keyframes pulseStatus {
  0%, 100% { opacity: 0.45; transform: scale(0.88); }
  50% { opacity: 1; transform: scale(1.2); }
}

.walkthrough-focus {
  outline: 3px solid rgba(199, 161, 90, 0.75);
  outline-offset: 5px;
  transition: outline-color 180ms ease, transform 180ms ease;
}

.presentation-mode .sidebar-status,
.presentation-mode .select-label,
.presentation-mode #environment-select,
.presentation-mode #copy-summary,
.presentation-mode #open-run,
.presentation-mode .overview-grid,
.presentation-mode .foundation-grid,
.presentation-mode .deployment-grid,
.presentation-mode .run-log,
.presentation-mode .client-readable-panel pre {
  display: none !important;
}

.presentation-mode .main {
  padding-top: 24px;
}

.presentation-mode .executive-summary-hero {
  min-height: 420px;
}

.presentation-mode .nav-item[data-view="foundation"],
.presentation-mode .nav-item[data-view="deployment"] {
  opacity: 0.45;
}

.view {
  animation: viewFade 180ms ease;
}

@keyframes viewFade {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.primary-button,
.secondary-button,
.graph-tool,
.project-chip,
.live-net-node {
  transition: background 160ms ease, border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease, opacity 160ms ease;
}

.primary-button:hover,
.secondary-button:hover,
.graph-tool:hover,
.project-chip:hover {
  transform: translateY(-1px);
}

.net-node {
  background: #ffffff;
  border: 2px solid #0e7490;
  border-radius: 999px;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 900;
  padding: 8px 12px;
  position: absolute;
  transform: translate(-50%, -50%);
  z-index: 2;
}

.net-node.drug { border-color: #ea580c; }
.net-node.trial { border-color: #7c3aed; }
.net-node.evidence { border-color: #15803d; }
.net-node.variant { border-color: #0891b2; background: #ecfeff; }
.net-node.pathway { border-color: #9333ea; }
.net-node.biomarker { border-color: #ca8a04; }
.net-node.high { box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.16), 0 8px 20px rgba(15, 23, 42, 0.08); }
.net-node.medium { box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.16), 0 8px 20px rgba(15, 23, 42, 0.08); }
.net-node.is-dimmed { opacity: 0.18; }
.net-node.is-selected {
  box-shadow: 0 0 0 5px rgba(37, 99, 235, 0.22), 0 12px 26px rgba(15, 23, 42, 0.16);
  z-index: 4;
}

.net-node.expandable {
  display: none;
}

.mini-network.is-expanded .net-node.expandable {
  display: inline-block;
}

.graph-popover {
  background: #111827;
  border-radius: 8px;
  bottom: 12px;
  color: #ffffff;
  font-size: 0.84rem;
  font-weight: 760;
  left: 12px;
  max-width: min(520px, calc(100% - 24px));
  opacity: 0.92;
  padding: 10px 12px;
  position: absolute;
  z-index: 5;
}

.graph-popover.is-visible {
  opacity: 1;
}

.net-line {
  background: #2563eb;
  height: 2px;
  left: 18%;
  opacity: 0.72;
  position: absolute;
  top: 45%;
  transform-origin: left center;
  width: 190px;
}

.net-line.l1 { transform: rotate(-24deg); }
.net-line.l2 { left: 40%; top: 24%; transform: rotate(28deg); width: 180px; }
.net-line.l3 { left: 28%; top: 53%; transform: rotate(72deg); width: 110px; }
.net-line.l4 { left: 58%; top: 43%; transform: rotate(-31deg); width: 130px; }
.net-line.l5 { left: 58%; top: 49%; transform: rotate(35deg); width: 145px; }

.science-metric-grid,
.run-duration-grid,
.reasoning-grid,
.security-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 12px;
}

.reasoning-chain {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 8px;
  margin: 12px 0;
  padding: 12px 12px 12px 30px;
}

.reasoning-chain li {
  color: var(--ink);
  font-weight: 780;
}

.provenance-flow {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
}

.provenance-flow span {
  color: var(--muted);
  font-weight: 900;
}

.provenance-detail {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
}

.provenance-detail a {
  color: var(--blue);
  font-weight: 900;
}

.comment-thread {
  display: grid;
  gap: 10px;
}

.comment-thread div {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
}

.comment-thread p {
  color: var(--muted);
  margin: 6px 0 0;
}

.comment-thread small {
  color: var(--amber);
  display: block;
  font-weight: 850;
  margin-top: 7px;
}

.review-assignment,
.approval-chain {
  border-left: 4px solid var(--gold) !important;
}

.star-rating {
  color: #d97706;
  font-size: 1.8rem;
  font-weight: 900;
  letter-spacing: 0;
  margin: 12px 0;
}

.source-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.source-chip-row span {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  color: #1d4ed8;
  font-weight: 850;
  padding: 7px 10px;
}

.review-score {
  color: #047857;
  font-size: 2.3rem;
  font-weight: 950;
  margin: 12px 0 2px;
}

.timeline-list {
  display: grid;
  gap: 10px;
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
}

.timeline-list li {
  align-items: center;
  display: grid;
  gap: 12px;
  grid-template-columns: 64px 1fr;
}

.timeline-list time {
  background: #0f766e;
  border-radius: 999px;
  color: #ffffff;
  font-weight: 900;
  padding: 6px 10px;
  text-align: center;
}

.timeline-list span {
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  font-weight: 850;
  padding-bottom: 8px;
}

@media (max-width: 1180px) {
  .executive-kpi-grid,
  .discovery-evidence-strip,
  .portfolio-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .executive-two-column,
  .executive-three-column,
  .executive-summary-hero,
  .executive-narrative-grid,
  .graph-fullscreen-layout,
  .analytics-grid {
    grid-template-columns: 1fr;
  }

  .graph-inspector {
    max-height: 220px;
  }

  .overview-grid,
  .ask-layout,
  .evidence-layout,
  .deployment-grid,
  .foundation-grid,
  .review-grid,
  .case-hero,
  .case-grid {
    grid-template-columns: 1fr;
  }

  .module-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .operating-model {
    grid-template-columns: 1fr;
  }

  .settings-grid {
    grid-template-columns: 1fr;
  }

  .global-search {
    min-width: 100%;
  }
}

@media (max-width: 760px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    min-height: auto;
  }

  .nav-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sidebar-status {
    margin-top: 0;
  }

  .main {
    padding: 18px;
  }

  .topbar,
  .panel-head,
  .section-head {
    align-items: stretch;
    flex-direction: column;
  }

  .topbar-actions {
    align-items: stretch;
  }

  .select-control,
  .primary-button,
  .secondary-button {
    width: 100%;
  }

  .icon-button {
    width: 100%;
  }

  .metric-grid,
  .module-strip,
  .executive-kpi-grid,
  .discovery-evidence-strip,
  .science-metric-grid,
  .run-duration-grid,
  .reasoning-grid,
  .portfolio-grid,
  .security-grid,
  .hierarchy-flow {
    grid-template-columns: 1fr;
  }

  .workflow-steps {
    align-items: stretch;
    flex-direction: column;
  }

  .workflow-arrow {
    display: none;
  }

  .mini-network {
    min-height: 340px;
  }

  .executive-summary-hero {
    padding: 20px;
  }

  .report-preview-card {
    grid-template-columns: 1fr;
  }

  .report-preview-actions,
  .hero-actions {
    display: grid;
  }

  .graph-fullscreen-overlay {
    padding: 8px;
  }

  .graph-fullscreen-shell {
    height: calc(100vh - 16px);
  }

  .upload-row {
    grid-template-columns: 1fr;
  }

  .segmented-control {
    width: 100%;
  }

  .segment {
    flex: 1;
  }
}
