@import url("https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap");

:root {
  --bg-night: #060d12;
  --bg-stage: #08161f;
  --bg-panel: rgba(12, 23, 31, 0.84);
  --bg-panel-strong: rgba(8, 18, 25, 0.94);
  --bg-soft: rgba(21, 38, 50, 0.82);

  --line-soft: rgba(133, 185, 214, 0.22);
  --line-strong: rgba(133, 185, 214, 0.44);
  --line-hot: rgba(255, 170, 84, 0.46);

  --text-main: #f2f7fa;
  --text-dim: #9ab0bf;
  --text-muted: #7f98aa;

  --brand: #ff9e52;
  --brand-deep: #ff7b2f;
  --accent: #47c8bb;
  --accent-deep: #2ea79a;

  --ok: #3fd089;
  --danger: #ff6b6b;
  --warn: #ffd080;

  --radius-lg: 22px;
  --radius-md: 14px;
  --shadow-panel: 0 18px 42px rgba(0, 0, 0, 0.45);
  --shadow-elevated: 0 26px 52px rgba(0, 0, 0, 0.48);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  margin: 0;
}

body {
  font-family: "Archivo", "Avenir Next", "Segoe UI", sans-serif;
  color: var(--text-main);
  background:
    radial-gradient(circle at 12% 3%, rgba(71, 200, 187, 0.2), transparent 30%),
    radial-gradient(circle at 82% 0%, rgba(255, 158, 82, 0.24), transparent 33%),
    radial-gradient(circle at 52% 100%, rgba(71, 200, 187, 0.08), transparent 42%),
    linear-gradient(170deg, #09131a 0%, var(--bg-stage) 52%, var(--bg-night) 100%);
  padding: 2rem 1.15rem 2.4rem;
  overflow-x: hidden;
  position: relative;
}

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

body::before {
  background:
    repeating-linear-gradient(
      0deg,
      rgba(255, 255, 255, 0.016) 0,
      rgba(255, 255, 255, 0.016) 1px,
      transparent 1px,
      transparent 4px
    ),
    repeating-linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.01) 0,
      rgba(255, 255, 255, 0.01) 1px,
      transparent 1px,
      transparent 5px
    );
  opacity: 0.3;
}

body::after {
  background: radial-gradient(circle at 50% -10%, rgba(255, 158, 82, 0.12), transparent 48%);
}

.ambient {
  position: fixed;
  width: 38rem;
  height: 38rem;
  border-radius: 50%;
  filter: blur(84px);
  opacity: 0.22;
  pointer-events: none;
  z-index: -1;
  animation: drift 18s ease-in-out infinite;
}

.ambient-a {
  top: -8rem;
  left: -12rem;
  background: #3fc4b8;
}

.ambient-b {
  top: -10rem;
  right: -12rem;
  background: #f6984d;
  animation-delay: -9s;
}

.app-header {
  max-width: 1380px;
  margin: 0 auto 1.15rem;
  display: flex;
  justify-content: space-between;
  gap: 1.2rem;
  align-items: flex-start;
}

.brand-block {
  position: relative;
}

.brand-block::before {
  content: "Mission Control";
  display: block;
  font-family: "IBM Plex Mono", "SF Mono", Menlo, monospace;
  font-size: 0.67rem;
  letter-spacing: 0.17em;
  text-transform: uppercase;
  color: rgba(255, 223, 187, 0.8);
  margin-bottom: 0.24rem;
}

.kicker {
  margin: 0;
  font-family: "IBM Plex Mono", "SF Mono", Menlo, monospace;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--accent);
}

h1 {
  margin: 0.22rem 0 0;
  font-family: "Bebas Neue", Impact, sans-serif;
  letter-spacing: 0.03em;
  font-size: clamp(2.4rem, 6vw, 4rem);
  line-height: 0.94;
  color: #fff4e8;
  text-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
}

.subtitle {
  margin: 0.58rem 0 0;
  max-width: 68ch;
  color: var(--text-dim);
  font-size: 0.94rem;
  line-height: 1.52;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.56rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.62rem;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  padding: 0.5rem 0.9rem;
  background: rgba(8, 18, 25, 0.78);
  font-family: "IBM Plex Mono", "SF Mono", Menlo, monospace;
  font-size: 0.79rem;
  white-space: nowrap;
}

.dot {
  width: 0.62rem;
  height: 0.62rem;
  border-radius: 50%;
  background: #8ea7ba;
  transition: background-color 0.2s ease;
}

.status-chip.online .dot {
  background: var(--ok);
  box-shadow: 0 0 0 8px rgba(63, 208, 137, 0.14);
}

.status-chip.offline .dot {
  background: var(--danger);
  box-shadow: 0 0 0 8px rgba(255, 107, 107, 0.15);
}

.dashboard {
  max-width: 1380px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 0.95rem;
}

.command-strip {
  grid-column: span 12;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.74rem;
}

.command-card {
  border: 1px solid rgba(133, 185, 214, 0.26);
  border-radius: var(--radius-md);
  padding: 0.7rem 0.78rem;
  background:
    linear-gradient(120deg, rgba(71, 200, 187, 0.12), rgba(255, 158, 82, 0.1)),
    rgba(7, 16, 23, 0.88);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.28);
  position: relative;
  overflow: hidden;
}

.command-card::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 1px;
  background: linear-gradient(90deg, rgba(71, 200, 187, 0.06), rgba(71, 200, 187, 0.92), rgba(255, 158, 82, 0.82), rgba(255, 158, 82, 0.08));
}

.command-label {
  margin: 0;
  font-family: "IBM Plex Mono", "SF Mono", Menlo, monospace;
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}

.command-value {
  margin: 0.28rem 0 0;
  font-size: 0.9rem;
  font-weight: 700;
  color: #fff2e3;
}

.command-note {
  margin: 0.32rem 0 0;
  font-size: 0.71rem;
  line-height: 1.4;
  color: var(--text-dim);
}

.widget-grid {
  grid-column: span 12;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.72rem;
}

.widget-card {
  border: 1px solid rgba(133, 185, 214, 0.24);
  border-radius: var(--radius-md);
  padding: 0.62rem 0.7rem;
  background:
    linear-gradient(125deg, rgba(71, 200, 187, 0.1), rgba(255, 158, 82, 0.08)),
    rgba(8, 17, 24, 0.9);
  position: relative;
  overflow: hidden;
}

.widget-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, rgba(71, 200, 187, 0.08), rgba(71, 200, 187, 0.92), rgba(255, 158, 82, 0.82), rgba(255, 158, 82, 0.06));
}

.widget-label {
  margin: 0;
  font-family: "IBM Plex Mono", "SF Mono", Menlo, monospace;
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}

.widget-value {
  margin: 0.22rem 0 0.44rem;
  font-family: "Bebas Neue", Impact, sans-serif;
  font-size: 2.1rem;
  line-height: 0.94;
  letter-spacing: 0.02em;
  color: #fff4e5;
  text-shadow: 0 8px 20px rgba(0, 0, 0, 0.34);
}

.widget-value.flash {
  animation: valueFlash 0.42s ease;
}

.widget-spark {
  height: 1.8rem;
  display: grid;
  grid-template-columns: repeat(14, minmax(0, 1fr));
  align-items: end;
  gap: 0.12rem;
}

.widget-spark span {
  display: block;
  width: 100%;
  border-radius: 2px;
  background: linear-gradient(180deg, rgba(255, 158, 82, 0.96), rgba(71, 200, 187, 0.84));
  animation: sparkPulse 1.4s ease-in-out infinite;
  animation-delay: calc(var(--i) * 0.08s);
  transform-origin: bottom center;
}

.panel {
  grid-column: span 4;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 0% 0%, rgba(255, 158, 82, 0.07), transparent 38%),
    radial-gradient(circle at 100% 100%, rgba(71, 200, 187, 0.06), transparent 40%),
    var(--bg-panel);
  box-shadow: var(--shadow-panel);
  backdrop-filter: blur(8px);
  padding: 1rem;
  position: relative;
  overflow: hidden;
}

.panel::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, rgba(255, 158, 82, 0.1), rgba(255, 158, 82, 0.8), rgba(71, 200, 187, 0.7), rgba(71, 200, 187, 0.05));
  opacity: 0.75;
  animation: sheen 7s linear infinite;
}

.panel::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  background:
    linear-gradient(90deg, rgba(255, 158, 82, 0.46), rgba(255, 158, 82, 0.46)) left 14px top 14px / 20px 1px no-repeat,
    linear-gradient(90deg, rgba(255, 158, 82, 0.46), rgba(255, 158, 82, 0.46)) left 14px top 14px / 1px 20px no-repeat,
    linear-gradient(90deg, rgba(71, 200, 187, 0.46), rgba(71, 200, 187, 0.46)) right 14px bottom 14px / 20px 1px no-repeat,
    linear-gradient(90deg, rgba(71, 200, 187, 0.46), rgba(71, 200, 187, 0.46)) right 14px bottom 14px / 1px 20px no-repeat;
  opacity: 0.8;
}

.panel-wide {
  grid-column: span 8;
}

.panel-full {
  grid-column: span 12;
}

h2 {
  margin: 0;
  font-family: "Bebas Neue", Impact, sans-serif;
  letter-spacing: 0.05em;
  font-size: 1.5rem;
  line-height: 0.96;
  color: #fff5e8;
}

h3 {
  margin: 0 0 0.62rem;
  font-family: "Bebas Neue", Impact, sans-serif;
  letter-spacing: 0.05em;
  font-size: 1.2rem;
  color: #ffe9d2;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.72rem;
  margin-bottom: 0.74rem;
  padding-bottom: 0.44rem;
  border-bottom: 1px solid rgba(133, 185, 214, 0.14);
}

label {
  display: block;
  margin-bottom: 0.42rem;
  font-family: "IBM Plex Mono", "SF Mono", Menlo, monospace;
  font-size: 0.69rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

textarea,
input[type="number"],
input[type="text"],
select {
  width: 100%;
  border-radius: 12px;
  border: 1px solid rgba(133, 185, 214, 0.26);
  background: rgba(6, 15, 22, 0.82);
  color: var(--text-main);
  font-family: "IBM Plex Mono", "SF Mono", Menlo, monospace;
  font-size: 0.79rem;
  line-height: 1.52;
  padding: 0.64rem 0.72rem;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

textarea:focus,
input[type="number"]:focus,
input[type="text"]:focus,
select:focus {
  border-color: rgba(71, 200, 187, 0.84);
  box-shadow: 0 0 0 3px rgba(71, 200, 187, 0.2);
}

textarea {
  resize: vertical;
}

input[type="number"],
input[type="text"],
select {
  padding: 0.5rem 0.68rem;
}

#clinicalTrialSelect {
  min-height: 13rem;
}

.row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.62rem;
  margin: 0.68rem 0;
}

.row.three {
  grid-template-columns: 1fr 1fr 1.25fr;
}

.row.actions-row {
  grid-template-columns: 1fr auto auto;
}

.toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  background: rgba(6, 15, 22, 0.84);
  color: var(--text-dim);
  padding: 0.42rem 0.72rem;
  font-family: "IBM Plex Mono", "SF Mono", Menlo, monospace;
  font-size: 0.67rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.toggle.compact {
  margin-top: 1.38rem;
}

.compact-toggle {
  margin: 0;
}

.toggle input {
  margin: 0;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.52rem;
  margin-top: 0.7rem;
}

.btn {
  appearance: none;
  cursor: pointer;
  border-radius: 999px;
  border: 1px solid var(--line-soft);
  padding: 0.5rem 0.95rem;
  font-family: "IBM Plex Mono", "SF Mono", Menlo, monospace;
  font-weight: 500;
  font-size: 0.71rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition:
    transform 0.16s ease,
    box-shadow 0.2s ease,
    background-color 0.2s ease,
    border-color 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.34);
}

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

.btn-primary {
  color: #281507;
  border-color: rgba(255, 236, 214, 0.48);
  background: linear-gradient(130deg, var(--brand), var(--brand-deep));
}

.btn-accent {
  color: #042721;
  border-color: rgba(227, 255, 251, 0.4);
  background: linear-gradient(130deg, var(--accent), var(--accent-deep));
}

.btn-outline {
  color: #e8f3fb;
  background: rgba(6, 15, 22, 0.84);
}

.btn-outline:hover {
  border-color: var(--line-strong);
}

.btn-small {
  padding: 0.35rem 0.72rem;
  font-size: 0.66rem;
}

.inline-controls {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.46rem;
}

.inline-label {
  margin: 0;
  font-size: 0.67rem;
  color: var(--text-muted);
}

.panel-meta {
  margin: 0 0 0.58rem;
  color: var(--text-muted);
  font-family: "IBM Plex Mono", "SF Mono", Menlo, monospace;
  font-size: 0.67rem;
}

.notice {
  margin-bottom: 0.72rem;
  padding: 0.58rem 0.66rem;
  border: 1px solid rgba(255, 208, 128, 0.4);
  border-radius: 12px;
  background: rgba(76, 54, 20, 0.32);
  color: #ffe9bc;
  font-size: 0.75rem;
  line-height: 1.45;
  white-space: pre-wrap;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.6rem;
  margin-bottom: 0.72rem;
}

.product-card {
  border-radius: 14px;
  border: 1px solid var(--line-soft);
  background: rgba(8, 18, 25, 0.84);
  padding: 0.62rem;
  min-height: 8rem;
  transition: transform 0.16s ease, border-color 0.2s ease;
}

.product-card:hover {
  transform: translateY(-2px);
  border-color: var(--line-strong);
}

.product-card-ready {
  border-color: rgba(63, 208, 137, 0.36);
}

.product-card-degraded {
  border-color: rgba(255, 208, 128, 0.4);
}

.product-card-missing {
  border-color: rgba(255, 107, 107, 0.38);
}

.product-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.42rem;
  margin-bottom: 0.34rem;
}

.product-name {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.18;
}

.health-pill {
  border-radius: 999px;
  padding: 0.12rem 0.42rem;
  font-family: "IBM Plex Mono", "SF Mono", Menlo, monospace;
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border: 1px solid rgba(255, 255, 255, 0.24);
}

.health-ready {
  color: #dcffec;
  background: rgba(63, 208, 137, 0.2);
}

.health-degraded {
  color: #ffeec8;
  background: rgba(255, 208, 128, 0.2);
}

.health-missing {
  color: #ffdede;
  background: rgba(255, 107, 107, 0.2);
}

.product-role,
.product-meta {
  margin: 0 0 0.28rem;
  color: var(--text-dim);
  font-size: 0.71rem;
  line-height: 1.38;
}

.product-meta strong {
  color: #e3edf5;
}

.platform-columns {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1.2fr;
  gap: 0.64rem;
}

.command-cap-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.56rem;
  margin-bottom: 0.72rem;
}

.command-cap {
  border-radius: 12px;
  border: 1px solid rgba(133, 185, 214, 0.24);
  background:
    linear-gradient(130deg, rgba(255, 158, 82, 0.14), rgba(71, 200, 187, 0.1)),
    rgba(7, 18, 25, 0.9);
  padding: 0.56rem 0.62rem;
  position: relative;
  overflow: hidden;
}

.command-cap::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 1px solid rgba(255, 255, 255, 0.04);
  pointer-events: none;
}

.command-cap-label {
  margin: 0;
  color: var(--text-muted);
  font-family: "IBM Plex Mono", "SF Mono", Menlo, monospace;
  font-size: 0.6rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.command-cap-value {
  margin: 0.22rem 0 0;
  font-size: 0.9rem;
  font-weight: 700;
  color: #fff6ea;
}

.command-cap-good {
  border-color: rgba(63, 208, 137, 0.34);
}

.command-cap-warn {
  border-color: rgba(255, 208, 128, 0.38);
}

.command-cap-alert {
  border-color: rgba(255, 107, 107, 0.4);
}

.subpanel {
  border: 1px solid rgba(133, 185, 214, 0.2);
  border-radius: 14px;
  background: var(--bg-panel-strong);
  padding: 0.7rem;
}

.gate-template-summary {
  margin: 0.34rem 0 0.4rem;
  color: var(--text-dim);
  font-size: 0.72rem;
  line-height: 1.45;
}

.gate-criteria-list {
  display: grid;
  gap: 0.36rem;
  margin-bottom: 0.52rem;
}

.gate-criterion {
  border: 1px solid rgba(133, 185, 214, 0.24);
  border-radius: 10px;
  padding: 0.42rem 0.52rem;
  background: rgba(8, 18, 25, 0.84);
}

.gate-criterion-top {
  display: flex;
  justify-content: space-between;
  gap: 0.4rem;
  align-items: center;
}

.gate-criterion-label {
  font-size: 0.74rem;
  color: #edf7ff;
  font-weight: 600;
}

.gate-criterion-status {
  border-radius: 999px;
  padding: 0.08rem 0.4rem;
  border: 1px solid rgba(133, 185, 214, 0.24);
  font-family: "IBM Plex Mono", "SF Mono", Menlo, monospace;
  font-size: 0.57rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.gate-criterion-meta {
  margin-top: 0.2rem;
  display: flex;
  gap: 0.42rem;
  flex-wrap: wrap;
  color: var(--text-muted);
  font-family: "IBM Plex Mono", "SF Mono", Menlo, monospace;
  font-size: 0.6rem;
}

.gate-criterion-pass {
  border-color: rgba(63, 208, 137, 0.36);
  background: rgba(18, 41, 31, 0.7);
}

.gate-criterion-pass .gate-criterion-status {
  color: #e5fff0;
  border-color: rgba(63, 208, 137, 0.42);
  background: rgba(63, 208, 137, 0.18);
}

.gate-criterion-fail {
  border-color: rgba(255, 107, 107, 0.38);
  background: rgba(43, 17, 17, 0.72);
}

.gate-criterion-fail .gate-criterion-status {
  color: #ffdede;
  border-color: rgba(255, 107, 107, 0.45);
  background: rgba(255, 107, 107, 0.16);
}

.gate-criterion-missing {
  border-color: rgba(255, 208, 128, 0.34);
}

.gate-criterion-missing .gate-criterion-status {
  color: #ffe8bf;
  border-color: rgba(255, 208, 128, 0.42);
  background: rgba(255, 208, 128, 0.14);
}

.gate-criterion-empty {
  border-style: dashed;
  color: var(--text-dim);
  font-size: 0.72rem;
}

.program-timeline {
  display: grid;
  gap: 0.46rem;
  max-height: 16rem;
  overflow: auto;
  padding-right: 0.12rem;
}

.timeline-empty {
  border: 1px dashed rgba(133, 185, 214, 0.28);
  border-radius: 10px;
  background: rgba(6, 16, 24, 0.7);
  color: var(--text-dim);
  font-size: 0.74rem;
  padding: 0.58rem;
}

.timeline-item {
  border: 1px solid rgba(133, 185, 214, 0.2);
  border-radius: 12px;
  background: rgba(8, 18, 25, 0.88);
  padding: 0.52rem 0.6rem;
}

.timeline-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.4rem;
}

.timeline-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: #f2f8fd;
}

.timeline-status {
  border-radius: 999px;
  padding: 0.14rem 0.44rem;
  border: 1px solid rgba(133, 185, 214, 0.24);
  background: rgba(11, 24, 33, 0.9);
  font-family: "IBM Plex Mono", "SF Mono", Menlo, monospace;
  font-size: 0.59rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.timeline-status-pass {
  color: #ddffec;
  border-color: rgba(63, 208, 137, 0.45);
  background: rgba(63, 208, 137, 0.18);
}

.timeline-status-warn {
  color: #ffe9c4;
  border-color: rgba(255, 208, 128, 0.4);
  background: rgba(255, 208, 128, 0.16);
}

.timeline-status-fail {
  color: #ffdede;
  border-color: rgba(255, 107, 107, 0.44);
  background: rgba(255, 107, 107, 0.16);
}

.timeline-status-neutral {
  color: #e3edf5;
}

.timeline-meta {
  margin-top: 0.24rem;
  font-family: "IBM Plex Mono", "SF Mono", Menlo, monospace;
  color: var(--text-muted);
  font-size: 0.62rem;
}

.subpanel-text {
  margin: 0 0 0.6rem;
  font-size: 0.79rem;
  color: #d8e8f5;
  line-height: 1.46;
}

pre {
  margin: 0;
  min-height: 13rem;
  max-height: 26rem;
  overflow: auto;
  border-radius: 12px;
  border: 1px solid rgba(133, 185, 214, 0.2);
  background: rgba(4, 12, 18, 0.86);
  color: #deedf8;
  padding: 0.72rem;
  font-family: "IBM Plex Mono", "SF Mono", Menlo, monospace;
  font-size: 0.74rem;
  line-height: 1.56;
}

.compact-pre {
  min-height: 8rem;
  max-height: 15rem;
  margin-bottom: 0.56rem;
}

.table-wrap {
  border-radius: 12px;
  border: 1px solid rgba(133, 185, 214, 0.2);
  background: rgba(4, 12, 18, 0.84);
  max-height: 21rem;
  overflow: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.77rem;
}

thead {
  position: sticky;
  top: 0;
  background: rgba(8, 18, 25, 0.95);
}

th,
td {
  text-align: left;
  border-bottom: 1px solid rgba(133, 185, 214, 0.14);
  padding: 0.5rem 0.58rem;
}

tbody tr {
  transition: background-color 0.16s ease;
}

tbody tr:hover {
  background: rgba(133, 185, 214, 0.09);
}

tbody tr.selected {
  background: rgba(71, 200, 187, 0.18);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 5rem;
  border-radius: 999px;
  padding: 0.18rem 0.42rem;
  font-family: "IBM Plex Mono", "SF Mono", Menlo, monospace;
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.status-queued {
  color: #dbecfc;
  background: rgba(96, 137, 179, 0.26);
}

.status-running {
  color: #fff4dd;
  background: rgba(255, 158, 82, 0.28);
}

.status-completed {
  color: #ddffed;
  background: rgba(63, 208, 137, 0.26);
}

.status-failed {
  color: #ffdede;
  background: rgba(255, 107, 107, 0.24);
}

.status-cancelled {
  color: #f2e7d9;
  background: rgba(158, 122, 92, 0.34);
}

.status-unknown {
  color: #deebf7;
  background: rgba(122, 143, 166, 0.25);
}

.panel-cures {
  border-color: rgba(255, 176, 98, 0.44);
  background:
    radial-gradient(circle at 0% 0%, rgba(255, 158, 82, 0.24), transparent 36%),
    radial-gradient(circle at 100% 0%, rgba(71, 200, 187, 0.24), transparent 38%),
    radial-gradient(circle at 52% 100%, rgba(255, 158, 82, 0.1), transparent 44%),
    rgba(7, 18, 26, 0.86);
}

.cures-kicker {
  margin: 0 0 0.24rem;
  font-family: "IBM Plex Mono", "SF Mono", Menlo, monospace;
  font-size: 0.63rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: #ffd8ab;
}

.drug-summary-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.58rem;
  margin-bottom: 0.74rem;
}

.cures-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.94fr) minmax(0, 1.06fr);
  gap: 0.78rem;
  align-items: start;
}

.summary-item {
  border: 1px solid rgba(133, 185, 214, 0.2);
  border-radius: 12px;
  background: rgba(8, 18, 25, 0.84);
  padding: 0.52rem 0.58rem;
}

.summary-label {
  margin-bottom: 0.2rem;
  color: var(--text-muted);
  font-family: "IBM Plex Mono", "SF Mono", Menlo, monospace;
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.summary-value {
  font-size: 1.06rem;
  font-weight: 700;
}

.drug-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.72rem;
  max-height: 52rem;
  overflow: auto;
  padding-right: 0.2rem;
  min-width: 0;
}

.drug-card {
  border: 1px solid rgba(133, 185, 214, 0.22);
  border-radius: 14px;
  padding: 0.7rem;
  background:
    linear-gradient(125deg, rgba(255, 158, 82, 0.18), rgba(71, 200, 187, 0.12)),
    rgba(8, 18, 25, 0.9);
  color: var(--text-main);
  text-align: left;
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.22s ease, border-color 0.16s ease;
}

.drug-card:hover {
  transform: translateY(-2px);
  border-color: var(--line-strong);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.24);
}

.drug-card.selected {
  border-color: rgba(71, 200, 187, 0.86);
  box-shadow: 0 0 0 2px rgba(71, 200, 187, 0.24);
}

.drug-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.52rem;
  margin-bottom: 0.44rem;
}

.drug-name {
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.2;
}

.drug-score {
  font-family: "Bebas Neue", Impact, sans-serif;
  font-size: 1.46rem;
  letter-spacing: 0.03em;
  color: #ffe3c0;
  line-height: 0.95;
}

.drug-meta {
  margin-bottom: 0.5rem;
  font-size: 0.73rem;
  color: var(--text-dim);
}

.metric-row {
  display: flex;
  gap: 0.36rem;
  flex-wrap: wrap;
}

.metric-chip {
  border-radius: 999px;
  border: 1px solid rgba(133, 185, 214, 0.2);
  background: rgba(8, 18, 25, 0.8);
  color: #e3eef8;
  font-family: "IBM Plex Mono", "SF Mono", Menlo, monospace;
  font-size: 0.61rem;
  padding: 0.16rem 0.44rem;
  letter-spacing: 0.03em;
}

.cure-detail-card {
  border: 1px solid rgba(133, 185, 214, 0.3);
  border-radius: 16px;
  padding: 0.76rem;
  background:
    linear-gradient(130deg, rgba(255, 158, 82, 0.14), rgba(71, 200, 187, 0.1)),
    rgba(8, 18, 25, 0.92);
  min-width: 0;
  overflow: hidden;
}

.cure-detail-header {
  margin-bottom: 0.52rem;
}

.cure-detail-title {
  font-size: 1.02rem;
  font-weight: 700;
  line-height: 1.24;
}

.cure-detail-meta {
  margin-top: 0.24rem;
  display: flex;
  gap: 0.32rem;
  flex-wrap: wrap;
}

.cure-detail-meta span {
  border-radius: 999px;
  border: 1px solid rgba(133, 185, 214, 0.22);
  background: rgba(8, 18, 25, 0.78);
  color: #deebf8;
  padding: 0.12rem 0.42rem;
  font-family: "IBM Plex Mono", "SF Mono", Menlo, monospace;
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.cure-assessment {
  margin: 0 0 0.54rem;
  font-size: 0.79rem;
  color: #e5f1fb;
  line-height: 1.47;
}

.admet-key-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.42rem;
  margin-bottom: 0.6rem;
}

.admet-key-item {
  border: 1px solid rgba(133, 185, 214, 0.2);
  border-radius: 10px;
  background: rgba(8, 18, 25, 0.8);
  padding: 0.44rem 0.5rem;
}

.admet-key-label {
  font-family: "IBM Plex Mono", "SF Mono", Menlo, monospace;
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #b8cbda;
}

.admet-key-value {
  margin-top: 0.18rem;
  font-size: 0.9rem;
  font-weight: 700;
  color: #fff1d7;
}

.admet-property-grid {
  border: 1px solid rgba(133, 185, 214, 0.22);
  border-radius: 12px;
  background: rgba(5, 14, 21, 0.86);
  padding: 0.42rem;
  display: grid;
  gap: 0.34rem;
  max-height: 19rem;
  overflow: auto;
  margin-bottom: 0.56rem;
}

.admet-prop {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 0.42rem;
  border: 1px solid rgba(133, 185, 214, 0.14);
  border-radius: 10px;
  background: rgba(8, 18, 25, 0.72);
  padding: 0.33rem 0.42rem;
}

.admet-prop-key {
  font-size: 0.67rem;
  color: #d9e8f6;
  word-break: break-word;
}

.admet-prop-value {
  font-size: 0.67rem;
  color: #fff4db;
  text-align: right;
  word-break: break-word;
}

.admet-empty {
  font-size: 0.72rem;
  color: #bdd0df;
  border: 1px dashed rgba(133, 185, 214, 0.24);
  border-radius: 10px;
  padding: 0.45rem;
  background: rgba(5, 14, 21, 0.82);
}

.raw-json-toggle {
  border: 1px solid rgba(133, 185, 214, 0.24);
  border-radius: 10px;
  background: rgba(5, 14, 21, 0.82);
  padding: 0.42rem;
}

.raw-json-toggle > summary {
  cursor: pointer;
  font-size: 0.74rem;
  color: #d9e9f7;
  user-select: none;
}

.raw-json-toggle > pre {
  margin-top: 0.46rem;
  min-height: 9rem;
  max-height: 14rem;
}

.reveal {
  opacity: 0;
  transform: translateY(10px);
  animation: reveal 0.52s ease forwards;
  animation-delay: var(--delay, 0s);
}

@keyframes reveal {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes drift {
  0% {
    transform: translate(0, 0);
  }
  50% {
    transform: translate(2rem, -1rem);
  }
  100% {
    transform: translate(0, 0);
  }
}

@keyframes sheen {
  0% {
    transform: translateX(-35%);
  }
  100% {
    transform: translateX(35%);
  }
}

@keyframes sparkPulse {
  0% {
    transform: scaleY(0.22);
    opacity: 0.42;
  }
  45% {
    transform: scaleY(0.96);
    opacity: 0.95;
  }
  100% {
    transform: scaleY(0.26);
    opacity: 0.5;
  }
}

@keyframes valueFlash {
  0% {
    color: #fff9f1;
    text-shadow: 0 0 0 rgba(255, 158, 82, 0);
  }
  40% {
    color: #ffdcb7;
    text-shadow: 0 0 20px rgba(255, 158, 82, 0.34);
  }
  100% {
    color: #fff4e5;
    text-shadow: 0 8px 20px rgba(0, 0, 0, 0.34);
  }
}

@media (max-width: 1240px) {
  .command-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .widget-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .panel {
    grid-column: span 6;
  }

  .panel-wide,
  .panel-full {
    grid-column: span 12;
  }

  .product-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .platform-columns {
    grid-template-columns: 1fr;
  }

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

  .cures-layout {
    grid-template-columns: 1fr;
  }

  .drug-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-height: 24rem;
  }
}

@media (max-width: 860px) {
  body {
    padding: 1rem 0.74rem 1.6rem;
  }

  .app-header {
    flex-direction: column;
    align-items: stretch;
  }

  .header-actions {
    justify-content: flex-start;
  }

  .panel {
    grid-column: span 12;
    padding: 0.88rem;
  }

  .command-strip {
    grid-template-columns: 1fr;
  }

  .widget-grid {
    grid-template-columns: 1fr 1fr;
  }

  .row,
  .row.three,
  .row.actions-row {
    grid-template-columns: 1fr;
  }

  .toggle.compact {
    margin-top: 0;
  }

  .product-grid {
    grid-template-columns: 1fr 1fr;
  }

  .command-cap-grid {
    grid-template-columns: 1fr;
  }

  .drug-summary-grid {
    grid-template-columns: 1fr 1fr;
  }

  .drug-cards {
    grid-template-columns: 1fr;
    max-height: none;
  }

  .admet-key-grid {
    grid-template-columns: 1fr;
  }

  .admet-prop {
    grid-template-columns: 1fr;
  }

  .admet-prop-value {
    text-align: left;
  }
}

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

/* Clean Studio Theme Override */
:root {
  --ui-font: "Manrope", "Avenir Next", "Segoe UI", sans-serif;
  --mono-font: "JetBrains Mono", "SF Mono", "Menlo", monospace;

  --app-bg: #f4f6fb;
  --app-grad-a: rgba(63, 97, 255, 0.1);
  --app-grad-b: rgba(32, 201, 151, 0.08);
  --surface: #ffffff;
  --surface-soft: #f8faff;
  --surface-muted: #f1f4fb;
  --line: #dde4f2;
  --line-strong: #c6d2ea;
  --text-1: #1f2a3d;
  --text-2: #5e6d88;
  --text-3: #8a97b0;
  --primary: #2f6ef8;
  --primary-strong: #1d57d6;
  --accent: #12a57d;
  --accent-strong: #0e8363;
  --ok: #1c9c60;
  --warn: #d08a21;
  --danger: #d14545;
  --panel-shadow: 0 10px 28px rgba(34, 52, 84, 0.08);
}

body[data-theme="dark"] {
  --app-bg: #0f1623;
  --app-grad-a: rgba(73, 118, 255, 0.18);
  --app-grad-b: rgba(18, 165, 125, 0.13);
  --surface: #151f2f;
  --surface-soft: #1b273b;
  --surface-muted: #202f48;
  --line: #2b3a56;
  --line-strong: #3a4d71;
  --text-1: #f0f4fc;
  --text-2: #b2bfd5;
  --text-3: #8394b3;
  --primary: #6e97ff;
  --primary-strong: #8cadff;
  --accent: #32c9a0;
  --accent-strong: #58dbb7;
  --ok: #5fd8a1;
  --warn: #f1be67;
  --danger: #ff8e8e;
  --panel-shadow: 0 16px 36px rgba(0, 0, 0, 0.34);
}

body {
  font-family: var(--ui-font);
  color: var(--text-1);
  background:
    radial-gradient(circle at 12% 0%, var(--app-grad-a), transparent 34%),
    radial-gradient(circle at 100% 0%, var(--app-grad-b), transparent 35%),
    var(--app-bg);
  padding: 1.2rem 1rem 1.8rem;
}

body::before,
body::after,
.ambient {
  display: none !important;
}

.reveal {
  opacity: 1;
  transform: none;
  animation: none;
}

.app-header,
.workspace-tabs,
.dashboard {
  max-width: 1260px;
  margin-left: auto;
  margin-right: auto;
}

.app-header {
  margin-bottom: 0.8rem;
  align-items: center;
}

.brand-block::before {
  content: none;
}

.kicker {
  font-family: var(--mono-font);
  font-size: 0.69rem;
  letter-spacing: 0.06em;
  color: var(--text-3);
}

h1 {
  font-family: var(--ui-font);
  font-size: clamp(2rem, 4.8vw, 2.9rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.025em;
  color: var(--text-1);
  text-shadow: none;
}

.subtitle {
  color: var(--text-2);
  max-width: 68ch;
  margin-top: 0.36rem;
  font-size: 0.95rem;
}

.workspace-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 0.86rem;
  padding: 0.25rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-soft);
  box-shadow: var(--panel-shadow);
}

.tab-button {
  appearance: none;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-2);
  font-family: var(--ui-font);
  font-size: 0.84rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  border-radius: 999px;
  padding: 0.45rem 0.84rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.tab-button:hover {
  color: var(--text-1);
  background: var(--surface-muted);
}

.tab-button.is-active {
  background: var(--surface);
  border-color: var(--line);
  color: var(--primary);
  box-shadow: 0 2px 8px rgba(34, 52, 84, 0.12);
}

.status-chip,
.toggle,
.btn,
input,
select,
textarea,
table,
pre,
.panel,
.widget-card,
.command-card,
.subpanel,
.product-card,
.command-cap,
.timeline-item,
.summary-item,
.drug-card,
.cure-detail-card,
.admet-property-grid,
.raw-json-toggle {
  border-radius: 14px;
}

.dashboard {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 0.85rem;
}

.command-strip,
.widget-grid {
  grid-column: span 12;
}

.command-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.65rem;
}

.widget-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.65rem;
}

.command-card,
.widget-card {
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--panel-shadow);
}

.command-card::before,
.widget-card::before,
.panel::before,
.panel::after {
  content: none;
}

.command-label,
.widget-label,
label,
.inline-label,
.summary-label,
.cures-kicker {
  color: var(--text-3);
  font-family: var(--mono-font);
  font-weight: 500;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.command-value,
.widget-value,
.summary-value,
.command-cap-value,
.cure-detail-title,
.admet-key-value {
  color: var(--text-1);
  font-family: var(--ui-font);
  text-shadow: none;
}

.widget-spark span {
  background: linear-gradient(180deg, var(--primary), var(--accent));
}

.panel {
  grid-column: span 4;
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--panel-shadow);
  backdrop-filter: none;
  padding: 0.92rem;
}

.panel-wide {
  grid-column: span 8;
}

.panel-full {
  grid-column: span 12;
}

.panel-cures {
  border-color: var(--line);
  background: var(--surface);
}

h2,
h3 {
  font-family: var(--ui-font);
  color: var(--text-1);
  letter-spacing: -0.01em;
  text-shadow: none;
}

h2 {
  font-size: 1.25rem;
  font-weight: 700;
}

h3 {
  font-size: 1rem;
  font-weight: 700;
}

.panel-head {
  border-bottom-color: var(--line);
}

textarea,
input[type="number"],
input[type="text"],
select {
  border: 1px solid var(--line);
  background: var(--surface-soft);
  color: var(--text-1);
  font-family: var(--mono-font);
  font-size: 0.77rem;
  border-radius: 12px;
}

textarea:focus,
input[type="number"]:focus,
input[type="text"]:focus,
select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--primary) 20%, transparent);
}

.toggle {
  border-color: var(--line);
  background: var(--surface-soft);
  color: var(--text-2);
  font-family: var(--mono-font);
}

.btn {
  font-family: var(--ui-font);
  text-transform: none;
  letter-spacing: 0;
  border-radius: 11px;
  border-color: var(--line);
  font-size: 0.79rem;
  font-weight: 600;
  padding: 0.46rem 0.8rem;
}

.btn-small {
  font-size: 0.74rem;
  padding: 0.38rem 0.68rem;
}

.btn-primary {
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--primary-strong));
  border-color: transparent;
}

.btn-accent {
  color: #ffffff;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  border-color: transparent;
}

.btn-outline {
  color: var(--text-2);
  background: var(--surface-soft);
}

.btn-outline:hover {
  color: var(--text-1);
  border-color: var(--line-strong);
}

.notice,
.timeline-empty,
.admet-empty {
  border-color: var(--line);
  background: var(--surface-soft);
  color: var(--text-2);
}

.product-card,
.subpanel,
.command-cap,
.timeline-item,
.summary-item,
.drug-card,
.cure-detail-card,
.admet-property-grid,
.raw-json-toggle {
  border: 1px solid var(--line);
  background: var(--surface-soft);
  box-shadow: none;
}

.command-cap,
.drug-card,
.cure-detail-card {
  background: var(--surface);
}

.product-role,
.product-meta,
.subpanel-text,
.timeline-meta,
.drug-meta,
.cure-assessment,
.gate-template-summary,
.panel-meta {
  color: var(--text-2);
}

.health-pill,
.metric-chip,
.timeline-status,
.gate-criterion-status,
.status-pill {
  background: var(--surface-muted);
  color: var(--text-2);
  border: 1px solid var(--line);
}

.health-ready,
.status-completed,
.timeline-status-pass {
  color: var(--ok);
  border-color: color-mix(in oklab, var(--ok) 40%, var(--line));
}

.health-degraded,
.status-running,
.timeline-status-warn {
  color: var(--warn);
  border-color: color-mix(in oklab, var(--warn) 45%, var(--line));
}

.health-missing,
.status-failed,
.timeline-status-fail {
  color: var(--danger);
  border-color: color-mix(in oklab, var(--danger) 42%, var(--line));
}

.status-queued,
.status-cancelled,
.status-unknown {
  color: var(--text-2);
  border-color: var(--line);
}

.gate-criterion-pass,
.command-cap-good,
.product-card-ready {
  border-color: color-mix(in oklab, var(--ok) 38%, var(--line));
}

.gate-criterion-fail,
.command-cap-alert,
.product-card-missing {
  border-color: color-mix(in oklab, var(--danger) 38%, var(--line));
}

.gate-criterion-missing,
.command-cap-warn,
.product-card-degraded {
  border-color: color-mix(in oklab, var(--warn) 42%, var(--line));
}

pre,
.table-wrap {
  border: 1px solid var(--line);
  background: var(--surface-soft);
  color: var(--text-1);
  font-family: var(--mono-font);
}

thead {
  background: var(--surface-muted);
}

th,
td {
  border-bottom-color: var(--line);
}

tbody tr:hover {
  background: color-mix(in oklab, var(--primary) 10%, transparent);
}

tbody tr.selected {
  background: color-mix(in oklab, var(--primary) 16%, transparent);
}

.workspace-tabs + .dashboard [hidden] {
  display: none !important;
}

.molstar-status {
  border: 1px solid var(--line);
  background: var(--surface-soft);
  color: var(--text-2);
  border-radius: 10px;
  padding: 0.5rem 0.58rem;
  font-size: 0.74rem;
  line-height: 1.35;
  margin-bottom: 0.46rem;
}

.molstar-status.is-ok {
  color: var(--ok);
  border-color: color-mix(in oklab, var(--ok) 38%, var(--line));
}

.molstar-status.is-warn {
  color: var(--warn);
  border-color: color-mix(in oklab, var(--warn) 42%, var(--line));
}

.molstar-viewer {
  height: 360px;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: var(--surface-muted);
  margin-bottom: 0.62rem;
}

.molstar-viewer .msp-plugin,
.molstar-viewer .msp-layout-standard {
  background: transparent !important;
}

/* Discovery Tab: minimal, list-first layout */
.cures-kicker {
  text-transform: none;
  letter-spacing: 0;
  font-family: var(--ui-font);
  font-size: 0.74rem;
  margin-bottom: 0.14rem;
}

.discovery-overview {
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(0, 1.1fr);
  gap: 0.7rem;
  margin-bottom: 0.82rem;
  align-items: stretch;
}

.lead-spotlight-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  background:
    linear-gradient(145deg, color-mix(in oklab, var(--primary) 10%, var(--surface)) 0%, var(--surface) 56%, color-mix(in oklab, var(--accent) 9%, var(--surface)) 100%);
  padding: 0.82rem 0.88rem;
  display: grid;
  gap: 0.72rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.lead-spotlight-empty {
  border: 1px dashed var(--line);
  border-radius: 14px;
  padding: 0.78rem;
  background: color-mix(in oklab, var(--surface-soft) 88%, white);
  color: var(--text-2);
  font-size: 0.8rem;
  line-height: 1.45;
}

.lead-spotlight-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.8rem;
}

.lead-spotlight-kicker {
  font-family: var(--mono-font);
  font-size: 0.62rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-3);
}

.lead-spotlight-title {
  margin-top: 0.2rem;
  font-size: 1.18rem;
  font-weight: 700;
  line-height: 1.16;
  color: var(--text-1);
}

.lead-spotlight-copy {
  margin: 0.34rem 0 0;
  font-size: 0.8rem;
  line-height: 1.5;
  color: var(--text-2);
}

.lead-spotlight-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.46rem;
}

.spotlight-stat {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: color-mix(in oklab, var(--surface-soft) 92%, white);
  padding: 0.5rem 0.56rem;
}

.spotlight-stat-label {
  font-family: var(--mono-font);
  font-size: 0.61rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-3);
}

.spotlight-stat-value {
  margin-top: 0.18rem;
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--text-1);
}

.lead-spotlight-foot {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.46rem;
}

.lead-spotlight-note {
  display: grid;
  gap: 0.2rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: color-mix(in oklab, var(--surface-soft) 90%, white);
  padding: 0.5rem 0.58rem;
  font-size: 0.74rem;
  line-height: 1.42;
}

.lead-spotlight-note.is-good {
  border-color: color-mix(in oklab, #198754 32%, var(--line));
}

.lead-spotlight-note.is-watch {
  border-color: color-mix(in oklab, #d97706 32%, var(--line));
}

.drug-summary-grid {
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 0.5rem;
}

.summary-item {
  background: var(--surface);
  padding: 0.5rem 0.56rem;
}

.summary-label {
  text-transform: none;
  letter-spacing: 0;
  font-family: var(--ui-font);
  font-size: 0.72rem;
}

.summary-value {
  font-family: var(--mono-font);
  font-size: 1rem;
}

.cures-layout {
  display: grid;
  grid-template-columns: minmax(320px, 0.92fr) minmax(0, 1.08fr);
  gap: 0.82rem;
  align-items: start;
}

.drug-browser-panel {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  padding: 0.82rem;
  display: grid;
  gap: 0.68rem;
  min-width: 0;
}

.drug-browser-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
}

.drug-browser-controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.44rem 0.52rem;
  min-width: min(27rem, 100%);
}

.drug-browser-controls label {
  margin: 0;
  font-size: 0.63rem;
}

.drug-browser-controls input,
.drug-browser-controls select {
  width: 100%;
}

.drug-results-meta {
  font-size: 0.76rem;
  color: var(--text-2);
  line-height: 1.45;
}

.drug-cards {
  grid-template-columns: 1fr;
  gap: 0.62rem;
  max-height: 68vh;
  overflow: auto;
  padding-right: 0.18rem;
}

.drug-card {
  position: relative;
  padding: 0.8rem 0.84rem;
  background: var(--surface);
}

.drug-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.65rem;
  bottom: 0.65rem;
  width: 4px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--primary), var(--accent));
  opacity: 0;
  transition: opacity 0.18s ease;
}

.drug-card:hover {
  transform: none;
  box-shadow: 0 10px 18px rgba(34, 52, 84, 0.12);
}

.drug-card:hover::before,
.drug-card.selected::before {
  opacity: 1;
}

.drug-card.selected {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px color-mix(in oklab, var(--primary) 24%, transparent);
}

.drug-score {
  font-family: var(--mono-font);
  font-size: 0.8rem;
  color: var(--primary);
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-soft);
  padding: 0.17rem 0.45rem;
  line-height: 1;
}

.drug-card-target {
  margin-top: 0.16rem;
  font-size: 0.77rem;
  font-weight: 600;
  color: var(--text-2);
}

.cure-detail-meta span {
  text-transform: none;
  letter-spacing: 0;
  font-family: var(--ui-font);
  font-size: 0.69rem;
}

.admet-key-item,
.admet-prop {
  background: var(--surface);
  border-color: var(--line);
}

.raw-json-toggle > summary {
  font-family: var(--ui-font);
}

.drug-card-top {
  align-items: flex-start;
}

.drug-card-score-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.38rem;
  min-width: 6.4rem;
}

.drug-list-empty {
  border: 1px dashed var(--line);
  border-radius: 16px;
  background: color-mix(in oklab, var(--surface-soft) 92%, white);
  padding: 1rem 0.95rem;
}

.drug-card-grade,
.cure-grade-badge {
  display: grid;
  gap: 0.12rem;
  justify-items: center;
  min-width: 4.4rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-soft);
  padding: 0.34rem 0.48rem;
}

.drug-card-grade-label,
.cure-grade-label {
  font-family: var(--mono-font);
  font-size: 0.62rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.drug-card-grade-value,
.cure-grade-value {
  font-family: "Bebas Neue", var(--mono-font);
  font-size: 1.44rem;
  line-height: 0.95;
  letter-spacing: 0.03em;
  color: var(--text-main);
}

.drug-card-grade.is-advance,
.cure-grade-badge.is-advance {
  border-color: color-mix(in oklab, #198754 38%, var(--line));
  background: color-mix(in oklab, #198754 12%, var(--surface-soft));
}

.drug-card-grade.is-watch,
.cure-grade-badge.is-watch {
  border-color: color-mix(in oklab, #d97706 36%, var(--line));
  background: color-mix(in oklab, #d97706 12%, var(--surface-soft));
}

.drug-card-grade.is-rework,
.cure-grade-badge.is-rework {
  border-color: color-mix(in oklab, #c0392b 34%, var(--line));
  background: color-mix(in oklab, #c0392b 11%, var(--surface-soft));
}

.drug-quick-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.42rem;
  margin-bottom: 0.58rem;
}

.drug-quick-metric {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: color-mix(in oklab, var(--surface-soft) 90%, white);
  padding: 0.42rem 0.46rem;
  display: grid;
  gap: 0.14rem;
}

.drug-quick-metric-label {
  font-family: var(--mono-font);
  font-size: 0.58rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-3);
}

.drug-quick-metric-value {
  font-family: var(--mono-font);
  font-size: 0.82rem;
  color: var(--text-1);
}

.drug-card-signals {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.42rem;
  margin-bottom: 0.54rem;
}

.drug-card-signal {
  display: grid;
  gap: 0.18rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-soft);
  padding: 0.44rem 0.5rem;
  font-size: 0.73rem;
  line-height: 1.4;
}

.drug-card-signal.is-good {
  border-color: color-mix(in oklab, #198754 32%, var(--line));
}

.drug-card-signal.is-watch {
  border-color: color-mix(in oklab, #d97706 32%, var(--line));
}

.drug-card-footer {
  display: flex;
  gap: 0.36rem;
  flex-wrap: wrap;
}

.drug-card-footer span {
  border-radius: 999px;
  border: 1px solid var(--line);
  background: color-mix(in oklab, var(--surface-soft) 88%, white);
  color: var(--text-2);
  padding: 0.16rem 0.44rem;
  font-size: 0.66rem;
  line-height: 1.2;
}

.cure-detail-card {
  position: sticky;
  top: 1rem;
  display: grid;
  gap: 0.62rem;
  padding: 0.88rem;
}

.cure-overview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.46rem;
}

.cure-overview-item {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: color-mix(in oklab, var(--surface-soft) 90%, white);
  padding: 0.52rem 0.58rem;
  min-width: 0;
}

.cure-overview-label {
  font-family: var(--mono-font);
  font-size: 0.6rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-3);
}

.cure-overview-value {
  margin-top: 0.18rem;
  font-size: 0.78rem;
  line-height: 1.44;
  color: var(--text-1);
  word-break: break-word;
}

.cure-focus-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.48rem;
}

.cure-focus-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 0.62rem 0.68rem;
  background: var(--surface);
}

.cure-focus-card.is-primary {
  border-color: color-mix(in oklab, var(--primary) 28%, var(--line));
}

.cure-focus-card.is-secondary {
  border-color: color-mix(in oklab, var(--accent) 28%, var(--line));
}

.cure-focus-title {
  margin-top: 0.18rem;
  font-size: 0.96rem;
  font-weight: 700;
  color: var(--text-1);
}

.cure-focus-copy {
  margin: 0.28rem 0 0;
  font-size: 0.76rem;
  line-height: 1.48;
  color: var(--text-2);
}

.drug-report-domains,
.cure-report-domains {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.44rem;
}

.report-domain {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-soft);
  padding: 0.5rem 0.56rem;
}

.report-domain.compact {
  padding: 0.42rem 0.46rem;
}

.report-domain-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.42rem;
}

.report-domain-label {
  font-size: 0.71rem;
  color: var(--text-muted);
}

.report-domain-grade {
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-main);
  font-family: var(--mono-font);
  font-size: 0.67rem;
  padding: 0.08rem 0.36rem;
}

.report-domain-value {
  margin-top: 0.22rem;
  font-family: var(--mono-font);
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-main);
}

.report-domain-note {
  margin-top: 0.2rem;
  font-size: 0.72rem;
  line-height: 1.42;
  color: var(--text-muted);
}

.report-summary {
  margin-bottom: 0.56rem;
  font-size: 0.77rem;
  line-height: 1.45;
  color: var(--text-main);
}

.report-note-strip {
  display: grid;
  gap: 0.36rem;
}

.report-note-pill {
  display: grid;
  gap: 0.18rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-soft);
  padding: 0.44rem 0.5rem;
  font-size: 0.73rem;
  line-height: 1.42;
}

.report-note-pill.is-good {
  border-color: color-mix(in oklab, #198754 32%, var(--line));
}

.report-note-pill.is-watch {
  border-color: color-mix(in oklab, #d97706 32%, var(--line));
}

.report-note-kicker {
  font-family: var(--mono-font);
  font-size: 0.61rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.evidence-path-grid {
  display: grid;
  gap: 0.38rem;
  margin-bottom: 0.1rem;
}

.evidence-path-item {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: color-mix(in oklab, var(--surface-soft) 90%, white);
  padding: 0.48rem 0.54rem;
  min-width: 0;
}

.evidence-path-label {
  font-family: var(--mono-font);
  font-size: 0.6rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-3);
}

.evidence-path-value {
  margin-top: 0.18rem;
  font-family: var(--mono-font);
  font-size: 0.72rem;
  line-height: 1.45;
  color: var(--text-1);
  word-break: break-word;
}

.cure-report-hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.8rem;
}

.cure-report-card {
  display: grid;
  gap: 0.62rem;
  margin-bottom: 0.66rem;
}

.cure-report-summary {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.8rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  padding: 0.62rem 0.68rem;
}

.report-summary-label {
  font-family: var(--mono-font);
  font-size: 0.64rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.report-summary-headline {
  margin-top: 0.18rem;
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--text-main);
}

.report-summary-score {
  display: grid;
  justify-items: end;
  gap: 0.12rem;
  font-size: 0.7rem;
  color: var(--text-muted);
}

.report-summary-score strong {
  font-family: var(--mono-font);
  font-size: 1rem;
  color: var(--text-main);
}

.cure-report-notes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
}

.report-note-panel {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  padding: 0.58rem 0.64rem;
}

.report-note-panel.is-good {
  border-color: color-mix(in oklab, #198754 32%, var(--line));
}

.report-note-panel.is-watch {
  border-color: color-mix(in oklab, #d97706 32%, var(--line));
}

.report-note-heading {
  font-family: var(--mono-font);
  font-size: 0.65rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.38rem;
}

.report-note-list {
  margin: 0;
  padding-left: 1rem;
  display: grid;
  gap: 0.34rem;
}

.report-note-item {
  font-size: 0.75rem;
  line-height: 1.45;
  color: var(--text-main);
}

@media (max-width: 1240px) {
  .command-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .widget-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .panel,
  .panel-wide,
  .panel-full {
    grid-column: span 12;
  }

  .platform-columns {
    grid-template-columns: 1fr;
  }

  .product-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

  .discovery-overview,
  .cures-layout {
    grid-template-columns: 1fr;
  }

  .drug-browser-head {
    flex-direction: column;
  }

  .cure-detail-card {
    position: static;
    top: auto;
  }
}

@media (max-width: 860px) {
  body {
    padding: 0.9rem 0.72rem 1.2rem;
  }

  .app-header {
    flex-direction: column;
    align-items: stretch;
  }

  .header-actions {
    justify-content: flex-start;
  }

  .workspace-tabs {
    border-radius: 14px;
    padding: 0.4rem;
  }

  .tab-button {
    flex: 1 1 calc(50% - 0.5rem);
    text-align: center;
  }

  .command-strip,
  .widget-grid,
  .product-grid,
  .discovery-overview,
  .drug-summary-grid,
  .drug-cards,
  .lead-spotlight-metrics,
  .lead-spotlight-foot,
  .drug-quick-metrics,
  .drug-card-signals,
  .cure-overview-grid,
  .cure-focus-summary,
  .drug-report-domains,
  .cure-report-domains,
  .cure-report-notes,
  .command-cap-grid,
  .admet-key-grid {
    grid-template-columns: 1fr;
  }

  .row,
  .row.three,
  .row.actions-row,
  .drug-browser-controls,
  .admet-prop {
    grid-template-columns: 1fr;
  }

  .admet-prop-value {
    text-align: left;
  }

  .cure-report-hero,
  .cure-report-summary,
  .lead-spotlight-top {
    flex-direction: column;
  }

  .drug-card-score-stack {
    align-items: flex-start;
  }

  .drug-cards {
    max-height: none;
  }

  .molstar-viewer {
    height: 300px;
  }
}

.dashboard-simplified {
  align-items: start;
}

.panel-head-stacked {
  align-items: start;
}

.panel-copy {
  margin: 0.3rem 0 0;
  max-width: 60rem;
  color: var(--text-dim);
  font-size: 0.78rem;
  line-height: 1.55;
}

.widget-grid-compact {
  margin-bottom: 0.8rem;
}

.agent-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.agent-card-kicker {
  margin: 0 0 0.14rem;
  font-family: var(--mono-font);
  font-size: 0.6rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.mission-columns {
  align-items: start;
}

.advanced-drawer {
  overflow: hidden;
  padding: 0;
}

.advanced-drawer > summary {
  cursor: pointer;
  list-style: none;
  padding: 1rem 1.1rem;
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--text-main);
}

.advanced-drawer > summary::-webkit-details-marker {
  display: none;
}

.advanced-drawer > summary::after {
  content: "+";
  float: right;
  color: var(--text-muted);
  font-family: var(--mono-font);
}

.advanced-drawer[open] > summary::after {
  content: "-";
}

.advanced-drawer-body {
  border-top: 1px solid var(--line);
  padding: 0 1.1rem 1.1rem;
}

.advanced-stack {
  display: grid;
  gap: 1rem;
}

.compact-head {
  margin-bottom: 0.75rem;
}

.clinical-drilldown-block {
  margin-top: 1rem;
  padding-top: 0.95rem;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 0.8rem;
}

.clinical-drilldown-grid {
  align-items: start;
}

.clinical-context-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  background:
    linear-gradient(130deg, rgba(255, 183, 77, 0.08), rgba(89, 184, 233, 0.06)),
    var(--surface-soft);
  padding: 0.8rem 0.9rem;
  display: grid;
  gap: 0.32rem;
}

.clinical-context-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  color: var(--text-main);
  font-size: 0.82rem;
}

.clinical-context-head span {
  color: var(--text-dim);
  font-size: 0.72rem;
}

.clinical-context-meta {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.clinical-context-meta span {
  border-radius: 999px;
  padding: 0.22rem 0.44rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line-soft);
  font-size: 0.68rem;
  color: var(--text-dim);
}

.inline-drawer {
  margin-top: 0.2rem;
}

.inline-drawer > summary {
  padding-left: 0;
  padding-right: 0;
}

.inline-drawer .advanced-drawer-body {
  padding-left: 0;
  padding-right: 0;
  padding-bottom: 0;
}

@media (max-width: 1240px) {
  .agent-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .agent-grid,
  .clinical-context-head,
  .clinical-context-meta {
    grid-template-columns: 1fr;
  }

  .clinical-context-head,
  .clinical-context-meta {
    display: grid;
  }
}
