body {
  background: #07101d;
  color: #d8e4ff;
  font-family: "JetBrains Mono", monospace;
  margin: 0;
  min-height: 100vh;
}

a {
  color: #8fc3ff;
}

button,
select,
textarea,
input {
  font: inherit;
}

.skip-link {
  background: #d8e4ff;
  color: #07101d;
  left: 1rem;
  opacity: 0;
  padding: 0.65rem 0.85rem;
  position: fixed;
  top: 1rem;
  transform: translateY(-0.75rem);
  transition: opacity 120ms ease, transform 120ms ease;
  z-index: 20;
}

.skip-link:focus {
  opacity: 1;
  transform: translateY(0);
}

.operator-shell {
  display: grid;
  grid-template-columns: 20rem minmax(0, 1fr);
  min-height: 100vh;
}

.operator-sidebar {
  align-self: start;
  background: rgba(4, 12, 24, 0.88);
  border-right: 1px solid rgba(148, 163, 184, 0.18);
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  height: 100vh;
  padding: 2rem 1.25rem;
  position: sticky;
  top: 0;
}

.operator-main {
  min-width: 0;
}

.operator-brand h1 {
  font-size: clamp(1.6rem, 4vw, 2.05rem);
  letter-spacing: 0;
  margin: 0;
}

.operator-brand p {
  color: rgba(216, 228, 255, 0.74);
  line-height: 1.55;
}

.operator-nav {
  display: grid;
  gap: 0.55rem;
}

.operator-nav--primary {
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
  padding-bottom: 1rem;
}

.operator-nav-link {
  border: 1px solid rgba(148, 163, 184, 0.16);
  color: rgba(216, 228, 255, 0.82);
  display: block;
  padding: 0.8rem 0.9rem;
  text-decoration: none;
}

.operator-nav-link:hover,
.operator-nav-link:focus-visible,
.operator-nav-link--active {
  background: rgba(125, 211, 252, 0.12);
  border-color: rgba(125, 211, 252, 0.32);
  color: #f8fafc;
}

.operator-nav-link--product {
  background: rgba(125, 211, 252, 0.1);
  border-color: rgba(125, 211, 252, 0.3);
  color: #e8f7ff;
  font-weight: 700;
}

.operator-sidebar-note {
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  color: rgba(216, 228, 255, 0.72);
  line-height: 1.55;
  margin-top: auto;
  padding-top: 1rem;
}

.note-label {
  color: #d8e4ff;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.dashboard {
  margin: 0 auto;
  max-width: 100rem;
  padding: 2.5rem 1.5rem 4rem;
}

.eyebrow {
  color: #7dd3fc;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.dashboard-header,
.panel-header {
  align-items: flex-start;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
}

.dashboard-nav {
  white-space: nowrap;
}

.status-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 0.9rem;
}

.status-chip {
  backdrop-filter: blur(10px);
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 999px;
  color: #f8fafc;
  display: inline-flex;
  font-size: 0.82rem;
  padding: 0.45rem 0.8rem;
}

.status-chip--ok {
  background: rgba(34, 197, 94, 0.12);
  border-color: rgba(74, 222, 128, 0.26);
}

.status-chip--info {
  background: rgba(96, 165, 250, 0.12);
  border-color: rgba(125, 211, 252, 0.24);
}

.status-chip--warn {
  background: rgba(251, 191, 36, 0.12);
  border-color: rgba(253, 224, 71, 0.22);
}

.status-chip--muted {
  background: rgba(148, 163, 184, 0.08);
  border-color: rgba(148, 163, 184, 0.16);
}

.status-detail {
  color: rgba(248, 250, 252, 0.82);
  margin-top: 0.85rem;
  max-width: 54rem;
}

.node-status {
  color: rgba(216, 228, 255, 0.76);
  font-size: 0.9rem;
  margin-top: 0.75rem;
}

.mission-primary-grid,
.mission-grid,
.mission-secondary-grid {
  display: grid;
  gap: 1.25rem;
  margin-top: 1.25rem;
}

.mission-primary-grid {
  grid-template-columns: 1fr;
}

.mission-grid {
  grid-template-columns: minmax(0, 2fr) minmax(20rem, 1fr);
}

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

.panel {
  backdrop-filter: blur(16px);
  background: rgba(8, 18, 34, 0.78);
  border: 1px solid rgba(124, 150, 255, 0.16);
  border-radius: 0.9rem;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.28);
  margin-top: 1.25rem;
  padding: 1.25rem;
}

.panel-header h2,
.dashboard-header h1,
.panel h3 {
  margin-bottom: 0.45rem;
  margin-top: 0;
}

.panel p,
.panel li,
.dashboard-header p,
.dashboard-header nav {
  color: rgba(216, 228, 255, 0.84);
}

.notice-copy {
  color: rgba(226, 232, 240, 0.88);
  margin-top: 1rem;
  max-width: 42rem;
}

.run-purpose {
  color: #eef5ff;
  font-size: 1rem;
  line-height: 1.65;
  max-width: 72rem;
}

.run-summary-grid,
.selection-card-grid,
.score-explainer,
.agent-role-grid {
  display: grid;
  gap: 0.85rem;
}

.run-summary-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 1.1rem;
}

.run-fact,
.selection-card,
.outcome-block,
.quality-callout,
.action-block,
.agent-meaning,
.focused-score-card,
.agent-action-block,
.thought-block {
  background: rgba(4, 12, 24, 0.58);
  border: 1px solid rgba(125, 211, 252, 0.14);
  border-radius: 0.75rem;
  padding: 1rem;
}

.run-fact span,
.selection-card-header span,
.score-explainer span,
.quality-callout span,
.agent-meaning span,
.agent-role-grid span {
  color: rgba(216, 228, 255, 0.62);
  display: block;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.run-fact strong,
.score-explainer strong,
.quality-callout strong,
.agent-role-grid strong {
  color: #f8fafc;
  display: block;
  margin-top: 0.35rem;
}

.outcome-block,
.quality-callout,
.action-block,
.agent-meaning,
.focused-score-card,
.agent-action-block,
.thought-block {
  margin-top: 1.1rem;
}

.outcome-block p,
.quality-callout p,
.action-block li,
.agent-meaning p,
.focused-score-card p,
.agent-action-block li,
.thought-block p,
.graph-guidance p {
  line-height: 1.65;
  overflow-wrap: anywhere;
}

.outcome-block p,
.thought-block p {
  white-space: pre-wrap;
}

.quality-callout {
  border-color: rgba(125, 211, 252, 0.2);
}

.quality-callout--warn {
  background: rgba(36, 24, 4, 0.62);
  border-color: rgba(251, 191, 36, 0.28);
}

.action-block ol,
.agent-action-block ul {
  margin-bottom: 0;
}

.selection-card-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 1rem;
}

.selection-card-header {
  align-items: baseline;
  display: flex;
  gap: 0.8rem;
  justify-content: space-between;
}

.selection-card p {
  line-height: 1.55;
}

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

.score-explainer > div {
  border-top: 1px solid rgba(125, 211, 252, 0.12);
  padding-top: 0.65rem;
}

.raw-routing-detail {
  margin-top: 1rem;
}

.raw-routing-detail summary {
  color: #8fc3ff;
  cursor: pointer;
}

#lattice-graph {
  background: #050b14;
  border: 1px solid rgba(125, 211, 252, 0.12);
  border-radius: 0.75rem;
  margin-top: 1rem;
  min-height: 34rem;
  overflow: hidden;
}

#lattice-graph svg {
  display: block;
  height: auto;
  width: 100%;
}

.graph-node {
  cursor: pointer;
}

.graph-node:focus {
  outline: none;
}

.graph-node text {
  pointer-events: none;
}

.graph-guidance {
  background: rgba(4, 12, 24, 0.48);
  border: 1px solid rgba(125, 211, 252, 0.12);
  border-radius: 0.75rem;
  margin-top: 1rem;
  padding: 0.95rem;
}

.graph-guidance strong {
  color: #f8fafc;
}

.agent-role-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 1rem;
}

.agent-role-grid article {
  background: rgba(4, 12, 24, 0.42);
  border: 1px solid rgba(125, 211, 252, 0.12);
  border-radius: 0.65rem;
  padding: 0.9rem;
}

.metadata-detail {
  margin-top: 1.1rem;
}

.metadata-detail summary {
  color: #8fc3ff;
  cursor: pointer;
}

.snapshot-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1rem;
}

.active-link {
  color: #f8fafc;
}

.scrubber-form {
  margin-top: 0.75rem;
}

#snapshot-scrubber {
  width: 100%;
}

textarea,
select,
button {
  background: rgba(7, 18, 34, 0.88);
  border: 1px solid rgba(125, 211, 252, 0.18);
  border-radius: 0.75rem;
  color: #f8fafc;
  margin-top: 0.75rem;
  padding: 0.8rem 0.95rem;
}

textarea,
select {
  width: 100%;
}

button {
  cursor: pointer;
}

button:active {
  transform: translateY(1px);
}

button:disabled {
  cursor: wait;
  opacity: 0.7;
}

.result-panel:focus {
  outline: 2px solid rgba(125, 211, 252, 0.54);
  outline-offset: 3px;
}

ul {
  padding-left: 1.2rem;
}

li {
  margin-top: 0.35rem;
}

#task-error {
  color: #fca5a5;
}

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

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

  .operator-sidebar-note {
    margin-top: 0;
  }

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

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

  .mission-primary-grid,
  .mission-grid,
  .mission-secondary-grid {
    grid-template-columns: 1fr;
  }

  .run-summary-grid,
  .selection-card-grid,
  .agent-role-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-header,
  .panel-header {
    align-items: stretch;
    flex-direction: column;
  }
}

@media (max-width: 560px) {
  .operator-sidebar {
    padding: 1.25rem 1rem;
  }

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