:root {
  --bg: #f5f6f3;
  --paper: #fff;
  --ink: #20312e;
  --muted: #71817b;
  --line: #dde4de;
  --accent: #147565;
  --soft: #e9f3ed;
  --amber: #af741d;
  --danger: #b44f3e;
  --mono: ui-monospace, SFMono-Regular, Consolas, monospace;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font:
    14px/1.5 -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}
button,
input,
a {
  -webkit-tap-highlight-color: transparent;
}
button {
  font: inherit;
  cursor: pointer;
}
button:disabled {
  cursor: default;
  opacity: 0.5;
}
a {
  color: var(--accent);
  text-decoration: none;
}
button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 3px solid #269c85;
  outline-offset: 4px;
}
button {
  color: inherit;
}
button:hover:not(:disabled) {
  filter: brightness(0.97);
}
.topbar {
  height: 76px;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  padding: 0 28px;
  gap: 34px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
}
.brand strong {
  font-size: 25px;
  letter-spacing: -1px;
}
.brand-icon {
  height: 29px;
  width: 29px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  border-radius: 7px;
  color: white;
  font: bold italic 20px Georgia;
}
.brand-icon span {
  margin-left: -2px;
}
.breadcrumb,
.tiny-label,
.rail-heading,
.eyebrow {
  font: 10px/1.6 var(--mono);
  letter-spacing: 1.5px;
  font-weight: 600;
}
.breadcrumb {
  color: var(--muted);
}
.top-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 25px;
}
.mode {
  font: 10px var(--mono);
  letter-spacing: 0.7px;
  background: #eff3ee;
  padding: 8px 10px;
  border-radius: 4px;
  color: #54705c;
}
.mode i,
.state-pill i {
  width: 6px;
  height: 6px;
  display: inline-block;
  border-radius: 50%;
  background: currentColor;
  margin-right: 6px;
}
.repo-link {
  font-size: 12px;
}
.workspace {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr) 308px;
  max-width: 1920px;
  margin: auto;
}
.rail {
  padding: 32px 18px;
  border-right: 1px solid var(--line);
  min-height: calc(100vh - 76px);
  display: flex;
  flex-direction: column;
}
.rail-heading {
  color: var(--muted);
  font-size: 9px;
  display: flex;
  justify-content: space-between;
  margin: 0 6px 18px;
  letter-spacing: 1px;
}
.rail-heading span {
  font-size: 8px;
}
.chapter {
  display: flex;
  gap: 11px;
  align-items: flex-start;
  text-align: left;
  border: 0;
  background: transparent;
  padding: 14px 12px;
  width: 100%;
  border-radius: 6px;
  margin-bottom: 6px;
  color: #65726e;
}
.chapter.selected {
  background: #e4eee6;
  color: var(--accent);
}
.chapter .number {
  font: 10px/1.8 var(--mono);
  opacity: 0.7;
}
.chapter b {
  display: block;
  font-size: 12px;
  font-weight: 600;
}
.chapter small {
  font-size: 10px;
  display: block;
  margin-top: 2px;
  opacity: 0.8;
}
.rail-note {
  margin: 35px 10px 25px;
  padding-top: 25px;
  border-top: 1px solid var(--line);
}
.rail-note .tiny-label {
  font-size: 8px;
  color: var(--muted);
  letter-spacing: 1px;
}
.rail-note p {
  font-size: 17px;
  line-height: 1.5;
  letter-spacing: -0.3px;
}
.rail-note > span:last-child {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.8;
}
.budget {
  margin: auto 7px 0;
  padding-top: 40px;
  font-size: 10px;
  color: var(--muted);
}
.budget b {
  display: block;
  color: var(--ink);
  font-size: 12px;
  margin: 8px 0;
}
.budget span {
  display: block;
}
.budget .tiny-label {
  font-size: 9px;
}
.budget-line {
  height: 3px;
  background: var(--line);
  margin: 14px 0 8px;
}
.budget-line span {
  width: 15%;
  height: 3px;
  background: var(--accent);
}
main {
  padding: 32px 28px 12px;
  min-width: 0;
}
.page-heading {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 23px;
}
.eyebrow {
  color: var(--accent);
  font-size: 9px;
  letter-spacing: 1.7px;
}
h1 {
  font-size: 28px;
  letter-spacing: -1px;
  font-weight: 600;
  margin: 8px 0 5px;
  line-height: 1.2;
}
.page-heading p {
  color: var(--muted);
  font-size: 12px;
  margin: 9px 0 0;
}
.secondary {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: transparent;
  padding: 9px 12px;
  font-size: 11px;
  white-space: nowrap;
}
.notice {
  background: #edf1e9;
  border: 1px solid #e1e7db;
  border-radius: 6px;
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 9px 13px;
  color: #67745f;
  font-size: 10px;
  margin-bottom: 20px;
}
.notice p {
  margin: 0;
}
.notice strong {
  font-weight: 600;
}
.notice-mark {
  border: 1px solid #a3b197;
  border-radius: 50%;
  width: 15px;
  height: 15px;
  flex: none;
  text-align: center;
  font: 10px/13px var(--mono);
}
.controls {
  display: flex;
  align-items: center;
  gap: 23px;
  padding: 17px 20px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-bottom: 20px;
}
.load-control {
  flex: 1;
  min-width: 145px;
}
.control-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  font-weight: 500;
}
output {
  font: 15px var(--mono);
  color: var(--accent);
}
output small {
  font-size: 9px;
  color: var(--muted);
}
input[type="range"] {
  width: 100%;
  accent-color: var(--accent);
  height: 4px;
  display: block;
  margin: 15px 0 10px;
}
.range-labels {
  display: flex;
  justify-content: space-between;
  font: 8px var(--mono);
  color: var(--muted);
}
.mix-control {
  border-left: 1px solid var(--line);
  padding-left: 20px;
  white-space: nowrap;
}
.mix-control strong {
  display: block;
  font: 11px var(--mono);
  margin: 7px 0 3px;
}
.mix-control strong span {
  color: #aab4ac;
}
.micro {
  font-size: 9px;
  color: var(--muted);
}
.primary {
  background: var(--accent);
  border: 1px solid var(--accent);
  color: white;
  border-radius: 6px;
  padding: 11px 14px;
  font-size: 11px;
  font-weight: 500;
}
.run {
  white-space: nowrap;
}
.icon-button {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 9px;
  padding: 6px;
}
.architecture {
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fcfdfa;
  overflow: hidden;
}
.section-heading {
  padding: 17px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.section-heading .tiny-label {
  font-size: 8px;
  letter-spacing: 1.3px;
  color: var(--muted);
}
h2 {
  font-size: 13px;
  font-weight: 600;
  margin: 3px 0 0;
}
.state-pill {
  font: 9px var(--mono);
  color: var(--muted);
  background: #eef1eb;
  padding: 5px 9px;
  border-radius: 3px;
}
.state-pill.active {
  color: var(--accent);
  background: var(--soft);
}
.graph-scroll {
  overflow-x: auto;
}
.graph {
  position: relative;
  width: 880px;
  height: 430px;
  transform-origin: top left;
  background-image: radial-gradient(#d9e2d9 0.8px, transparent 0.8px);
  background-size: 16px 16px;
}
.edges {
  width: 880px;
  height: 415px;
  position: absolute;
  inset: 0;
}
.edges text {
  font: 8px var(--mono);
  fill: #819186;
}
.edge {
  stroke: #94b3a7;
  stroke-width: 1.5;
  fill: none;
  color: #94b3a7;
}
.edge.write {
  stroke: #5b7570;
  stroke-dasharray: 4 4;
  color: #5b7570;
}
.edge.replication {
  stroke: #c4a167;
  stroke-dasharray: 2 5;
  color: #c4a167;
}
.edge.optional {
  opacity: 0.17;
}
.edge.enabled {
  opacity: 1;
}
.running:not(.reduced) .edge:not(.optional),
.running:not(.reduced) .edge.enabled {
  stroke-dasharray: 6 10;
  animation: flow 1.4s linear infinite;
}
.edge.failed {
  stroke: var(--danger);
  color: var(--danger);
  animation: none !important;
}
.node {
  width: 140px;
  height: 80px;
  position: absolute;
  text-align: left;
  background: white;
  border: 1px solid #cddcd3;
  border-radius: 7px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.node-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: absolute;
  top: 9px;
  left: 12px;
  right: 12px;
}
.node-symbol {
  font: 15px/1 var(--mono);
  color: var(--accent);
}
.health-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #44896c;
}
.node strong {
  font-size: 11px;
  margin-top: 21px;
  font-weight: 600;
}
.node small {
  font: 8px var(--mono);
  color: var(--muted);
  white-space: nowrap;
  letter-spacing: -0.3px;
}
.node-tag {
  position: absolute;
  bottom: -19px;
  left: 0;
  font: 7px var(--mono);
  color: var(--muted);
  letter-spacing: 1px;
}
.node.inactive {
  background: #f4f6f0;
  border-style: dashed;
  border-color: #d4ded3;
  opacity: 0.55;
}
.node.inactive .health-dot {
  background: #bdc6bc;
}
.node.database {
  border-color: #99b7a3;
}
.node.stressed {
  border-color: #c89c55;
  background: #fffaf0;
}
.node.stressed .health-dot {
  background: var(--amber);
}
.node.failed {
  border-color: #c78274;
  background: #fff6f3;
}
.node.failed .health-dot {
  background: var(--danger);
}
.node.pinned {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
.graph-caption {
  position: absolute;
  left: 26px;
  top: 31px;
  font: 8px var(--mono);
  color: #8a978d;
}
.graph-footer {
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  padding: 12px 18px;
  font: 8px var(--mono);
  color: var(--muted);
}
.legend {
  display: flex;
  gap: 16px;
}
.legend span {
  display: flex;
  align-items: center;
  gap: 5px;
}
.legend i {
  width: 17px;
  display: inline-block;
  border-top: 2px solid #7da692;
}
.legend .write-line {
  border-color: #5b7570;
  border-top-style: dashed;
}
.legend .replication-line {
  border-color: #c4a167;
  border-top-style: dotted;
}
.metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  background: white;
  border: 1px solid var(--line);
  border-radius: 7px;
  margin: 20px 0;
}
.metric {
  padding: 17px 18px;
  min-width: 0;
  border-right: 1px solid var(--line);
}
.metric:last-child {
  border: 0;
}
.metric > span {
  font-size: 9px;
  color: var(--muted);
}
.metric strong {
  font: 25px var(--mono);
  letter-spacing: -1.1px;
  display: block;
  margin: 8px 0;
}
.metric strong small {
  font: 8px var(--mono);
  letter-spacing: -0.3px;
  margin-left: 5px;
  color: var(--muted);
}
.metric p {
  font-size: 8px;
  color: var(--muted);
  margin: 0;
}
.metric.alert strong {
  color: var(--danger);
}
.activity {
  background: white;
  border: 1px solid var(--line);
  border-radius: 7px;
}
.activity .section-heading {
  padding-bottom: 10px;
}
.activity ol {
  list-style: none;
  margin: 0;
  padding: 0 20px 10px;
}
.activity li {
  border-top: 1px solid #edf1eb;
  padding: 9px 0;
  font-size: 10px;
  display: flex;
  gap: 12px;
}
.activity li span {
  font: 9px var(--mono);
  color: var(--muted);
  flex: none;
}
.activity li b {
  font-weight: 400;
}
.main-footer {
  display: flex;
  justify-content: space-between;
  color: #8c9891;
  font: 7px var(--mono);
  letter-spacing: 1px;
  padding: 21px 0 5px;
}
.guide-panel {
  background: #fff;
  border-left: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.panel-tabs {
  display: flex;
  border-bottom: 1px solid var(--line);
  padding: 18px 20px 0;
  gap: 24px;
}
.panel-tabs button {
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  padding: 9px 0 14px;
  color: var(--muted);
  font-size: 11px;
}
.panel-tabs button[aria-selected="true"] {
  color: var(--accent);
  border-color: var(--accent);
}
#guide-content,
#inspect-content {
  padding: 26px 23px;
}
.guide-kicker {
  font: 9px var(--mono);
  color: var(--accent);
  letter-spacing: 1px;
}
.guide-panel h3 {
  font-size: 21px;
  line-height: 1.3;
  letter-spacing: -0.5px;
  margin: 12px 0;
}
.guide-intro {
  font-size: 12px;
  line-height: 1.8;
  color: var(--muted);
}
.step {
  padding: 19px 0;
  border-top: 1px solid var(--line);
}
.step-heading {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 11px;
  font-weight: 600;
}
.step-num {
  font: 9px var(--mono);
  width: 20px;
  height: 20px;
  border: 1px solid var(--line);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  flex: none;
}
.step.done .step-num {
  background: var(--soft);
  color: var(--accent);
  border-color: #c8dfd1;
}
.step p {
  font-size: 11px;
  line-height: 1.75;
  color: var(--muted);
  margin: 9px 0 12px 29px;
}
.step button {
  margin-left: 29px;
  max-width: calc(100% - 29px);
}
.tradeoff {
  background: #f6f3ec;
  border-radius: 6px;
  padding: 15px 16px;
  margin-top: 10px;
}
.tradeoff .tiny-label {
  font-size: 8px;
  color: #9b7c48;
}
.tradeoff p {
  font-size: 11px;
  line-height: 1.8;
  color: #827359;
  margin: 7px 0 0;
}
.panel-bottom {
  margin: auto 23px 25px;
  border-top: 1px solid var(--line);
  padding-top: 23px;
}
.panel-bottom .tiny-label {
  font-size: 8px;
  color: var(--muted);
}
.panel-bottom p {
  font-size: 12px;
  line-height: 1.8;
}
.panel-bottom a {
  font-size: 10px;
}
.inspect-role {
  font: 10px var(--mono);
  padding: 7px 10px;
  background: var(--soft);
  display: inline-block;
  border-radius: 3px;
  color: var(--accent);
}
.inspect-list {
  margin: 20px 0;
}
.inspect-list div {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.inspect-list dt {
  font-size: 10px;
  color: var(--muted);
}
.inspect-list dd {
  font-size: 12px;
  margin: 4px 0 0;
}
.inspect-hint {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.8;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.skip {
  position: absolute;
  top: -100px;
  left: 10px;
  z-index: 50;
  background: white;
  padding: 10px;
}
.skip:focus {
  top: 8px;
}
[hidden] {
  display: none !important;
}
@keyframes flow {
  to {
    stroke-dashoffset: -32;
  }
}
@media (min-width: 1450px) {
  .workspace {
    grid-template-columns: 220px minmax(0, 1fr) 330px;
  }
  main {
    padding: 36px 36px 12px;
  }
}
@media (max-width: 1220px) {
  .workspace {
    grid-template-columns: 165px minmax(0, 1fr) 275px;
  }
  .rail {
    padding-left: 10px;
    padding-right: 10px;
  }
  main {
    padding: 26px 18px 10px;
  }
  .controls {
    gap: 12px;
    padding: 15px;
  }
  .mix-control {
    display: none;
  }
  h1 {
    font-size: 25px;
  }
  .metric {
    padding: 14px 10px;
  }
  .metric strong {
    font-size: 22px;
  }
  .metric strong small {
    display: block;
    margin: 3px 0;
  }
  .notice {
    font-size: 9px;
  }
  #guide-content,
  #inspect-content {
    padding: 23px 18px;
  }
  .breadcrumb {
    display: none;
  }
}
@media (max-width: 1020px) {
  .workspace {
    grid-template-columns: minmax(0, 1fr) 280px;
  }
  .rail {
    grid-column: 1/-1;
    min-height: 0;
    padding: 10px 18px;
    border-bottom: 1px solid var(--line);
    border-right: 0;
  }
  .rail-heading,
  .rail-note,
  .budget {
    display: none;
  }
  .rail nav {
    display: flex;
    gap: 7px;
    overflow: auto;
  }
  .chapter {
    min-width: 132px;
    margin: 0;
    padding: 9px;
  }
  .chapter small {
    display: none;
  }
  .chapter b {
    font-size: 10px;
  }
  .chapter .number {
    font-size: 9px;
  }
  .topbar {
    height: 64px;
    padding: 0 20px;
  }
  .graph {
    height: 430px;
  }
  .main-footer {
    font-size: 6px;
  }
}
@media (max-width: 760px) {
  .workspace {
    display: block;
  }
  .guide-panel {
    border-left: 0;
    border-top: 1px solid var(--line);
  }
  .topbar {
    padding: 0 16px;
    gap: 10px;
  }
  .brand strong {
    font-size: 21px;
  }
  .top-actions {
    gap: 12px;
  }
  .mode {
    font-size: 8px;
    padding: 6px;
  }
  .repo-link {
    display: none;
  }
  main {
    padding: 23px 16px 10px;
  }
  .page-heading {
    align-items: flex-start;
  }
  h1 {
    font-size: 24px;
  }
  .reset {
    padding: 7px;
    font-size: 9px;
  }
  .page-heading p {
    font-size: 11px;
  }
  .controls {
    flex-wrap: wrap;
    gap: 12px;
  }
  .load-control {
    flex-basis: 50%;
  }
  .run {
    font-size: 10px;
  }
  .icon-button {
    margin-left: auto;
  }
  .metrics {
    grid-template-columns: 1fr 1fr;
  }
  .metric:nth-child(2) {
    border-right: 0;
  }
  .metric:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }
  .metric {
    padding: 15px;
  }
  .metric strong small {
    display: inline;
    margin-left: 6px;
  }
  .graph-footer {
    gap: 10px;
    flex-wrap: wrap;
  }
  .main-footer {
    display: none;
  }
  .panel-tabs {
    padding-top: 8px;
  }
  #guide-content,
  #inspect-content {
    padding: 23px;
  }
  .panel-bottom {
    margin-top: 12px;
  }
  .notice {
    font-size: 10px;
  }
  .section-heading {
    padding: 15px;
  }
  .state-pill {
    font-size: 8px;
  }
  .activity {
    margin-bottom: 16px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .edge {
    animation: none !important;
  }
}
.graph-scroll {
  position: relative;
  height: 430px;
}
.graph {
  position: absolute;
  top: 0;
  left: 0;
}
/* Architecture controls live with their components. */
.graph {
  width: 960px;
  height: 670px;
}
.edges {
  width: 960px;
  height: 670px;
}
.graph-scroll {
  height: 670px;
}
.edge.optional {
  opacity: 0;
  transition:
    opacity 0.5s,
    stroke 0.5s;
}
.edge.enabled {
  opacity: 1;
}
.edge.muted-route {
  opacity: 0.13;
  animation: none !important;
}
.edge.cache-remainder {
  opacity: 0.32;
}
.routes-changed .edge.enabled {
  stroke-width: 3;
}
.routes-changed .edge.read:not(.muted-route) {
  stroke-width: 2.5;
}
.zone-label {
  position: absolute;
  font: 9px var(--mono);
  letter-spacing: 1.3px;
  color: #7c8d81;
}
.component-shell {
  position: absolute;
  width: 176px;
  height: 166px;
  background: white;
  border: 1px solid #b7cec0;
  border-radius: 9px;
  transition:
    background 0.4s,
    border-color 0.4s,
    opacity 0.4s;
  overflow: visible;
}
.component-shell .node {
  position: relative;
  width: 100%;
  height: 115px;
  border: 0;
  border-radius: 9px 9px 0 0;
  padding: 12px 13px;
  background: transparent;
  gap: 3px;
  opacity: 1;
  outline-offset: 1px;
}
.component-shell .node-top {
  top: 12px;
  left: 13px;
  right: 13px;
  align-items: center;
}
.tech-logo {
  width: 27px;
  height: 27px;
  object-fit: contain;
}
.node-state {
  font: 7px var(--mono);
  letter-spacing: 0.7px;
  color: var(--accent);
}
.component-shell .node strong {
  font-size: 13px;
  letter-spacing: -0.2px;
  margin-top: 35px;
}
.technology-name {
  font-size: 10px;
  color: #566d62;
}
.component-shell .node small {
  font-size: 9px;
  letter-spacing: -0.1px;
  margin-top: 2px;
}
.component-action {
  padding: 7px 10px;
  border-top: 1px solid #e2eae0;
  min-height: 49px;
  display: flex;
  gap: 4px;
  align-items: center;
  justify-content: center;
}
.map-action {
  border: 1px solid #d0e2d5;
  border-radius: 5px;
  background: #eff7f0;
  padding: 7px 8px;
  color: #226751;
  font-size: 10px;
  line-height: 1.25;
  min-height: 32px;
  flex: 1;
}
.map-action:disabled {
  opacity: 0.5;
}
.map-fact {
  font-size: 9px;
  line-height: 1.5;
  color: #6e8075;
  text-align: center;
}
.component-shell.planned {
  background: rgba(249, 251, 245, 0.8);
  border: 1px dashed #bdcdbd;
}
.component-shell.planned .tech-logo {
  filter: grayscale(1);
  opacity: 0.65;
}
.component-shell.planned .node-state {
  color: #81917e;
}
.component-shell.planned .map-action {
  background: #fff;
  border-style: dashed;
}
.component-shell.building {
  border: 1px solid #c4a56b;
  background: #fffdf3;
  animation: component-assemble 0.6s ease both;
}
.component-shell.building .node-state {
  color: #9a742c;
}
.build-progress {
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 3px;
  border-radius: 0 0 9px 9px;
  overflow: hidden;
  display: none;
}
.building .build-progress {
  display: block;
}
.build-progress span {
  display: block;
  width: 100%;
  height: 100%;
  background: #ba954a;
  transform-origin: left;
  animation: build-fill 2.9s linear;
}
.component-shell.ready {
  animation: component-ready 0.65s ease;
}
.component-shell .node.failed {
  background: #fff0eb;
}
.component-shell .node.stressed {
  background: #fff9eb;
}
.build-status {
  padding: 12px 20px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #f0f5ee;
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 10px;
  color: #526c59;
  min-height: 47px;
}
.build-indicator {
  height: 7px;
  width: 7px;
  border-radius: 50%;
  background: #509570;
  flex: none;
}
.is-building {
  background: #faf5e9;
  color: #92702d;
}
.is-building .build-indicator {
  background: #c49b44;
}
.build-mode {
  margin-left: auto;
  font: 7px var(--mono);
  letter-spacing: 1px;
  white-space: nowrap;
}
.guide-map-note {
  font-size: 11px;
  line-height: 1.7;
  color: #356951;
  background: #eef6ee;
  border-left: 2px solid #86b299;
  padding: 11px 12px;
  margin: 17px 0;
}
.location-cue {
  display: block;
  margin-left: 29px;
  color: #29765b;
  font: 10px/1.7 var(--mono);
}
.step p {
  margin-bottom: 8px;
}
.graph-footer {
  font-size: 9px;
}
.legend {
  gap: 15px;
}
@keyframes component-assemble {
  from {
    transform: translateY(9px) scale(0.97);
    opacity: 0.45;
  }
  to {
    transform: none;
    opacity: 1;
  }
}
@keyframes component-ready {
  from {
    border-color: #30a97c;
    background: #e4f6e9;
  }
  to {
    background: white;
  }
}
@keyframes build-fill {
  from {
    transform: scaleX(0);
  }
  to {
    transform: scaleX(1);
  }
}
@media (prefers-reduced-motion: reduce) {
  .component-shell,
  .build-progress span {
    animation: none !important;
    transition: none !important;
  }
}
.reduced .component-shell,
.reduced .build-progress span {
  animation: none !important;
  transition: none !important;
}
@media (max-width: 760px) {
  .build-mode {
    display: none;
  }
  .build-status {
    padding: 10px 14px;
  }
  .component-shell .node:focus-visible {
    outline-offset: -3px;
  }
}
/* Dark workbench with light infrastructure cards. */
:root {
  --bg: #0b111c;
  --paper: #121c2b;
  --ink: #e7eef5;
  --muted: #94a6b8;
  --line: #28364a;
  --accent: #5ce1b4;
  --soft: #183a37;
  --amber: #edb968;
  --danger: #ed937b;
}
body {
  background: var(--bg);
  color: var(--ink);
}
.topbar {
  background: #101827;
  border-color: #2b384b;
}
.brand-icon {
  background: #64e0b5;
  color: #0b2521;
}
.mode {
  color: #78e6c4;
  background: #1a3334;
  border: 1px solid #2d514b;
}
.rail {
  background: #101827;
}
.chapter {
  color: #a3b3c4;
}
.chapter.selected {
  background: #21372f;
  color: #94f0c8;
}
.rail-note > span:last-child {
  color: #8fa2b6;
}
.budget-line {
  background: #243449;
}
.notice {
  background: #172437;
  border: 1px solid #2b4058;
  color: #b8ccde;
}
.notice-mark {
  border-color: #6a879e;
}
.controls {
  background: #142034;
  border-color: #2e4057;
}
.mix-control strong {
  color: #d9e7f3;
}
.primary {
  background: #6be5b8;
  color: #092d25;
  border-color: #6be5b8;
  font-weight: 700;
}
.secondary {
  border-color: #3b5068;
  background: #18263a;
}
.architecture {
  background: #101c2c;
  border-color: #31445d;
}
.section-heading {
  background: #122034;
}
.state-pill {
  background: #213246;
  color: #adbac9;
}
.state-pill.active {
  background: #20443d;
  color: #82f0c7;
}
.build-status {
  background: #152c32;
  border-color: #2b454d;
  color: #a7ddcf;
}
.build-indicator {
  background: #67e7b4;
}
.is-building {
  background: #352e24;
  color: #f1cf94;
}
.is-building .build-indicator {
  background: #f5c979;
}
.graph {
  background-color: #0c1727;
  background-image: radial-gradient(#2d4059 0.8px, transparent 0.8px);
}
.zone-label {
  color: #8a9fb8;
}
.edges text {
  fill: #9baec5;
}
.edge {
  stroke: #58dbb1;
  color: #58dbb1;
  stroke-width: 2;
}
.edge.write {
  stroke: #a6b8ff;
  color: #a6b8ff;
}
.edge.replication {
  stroke: #eac57f;
  color: #eac57f;
}
.edge.failed {
  stroke: #fa8f88;
  color: #fa8f88;
}
.graph-footer {
  background: #132035;
  color: #a7bad0;
}
.legend .read-line {
  border-color: #58dbb1;
}
.legend .write-line {
  border-color: #a6b8ff;
}
.legend .replication-line {
  border-color: #eac57f;
}
.component-shell {
  background: #f4f7fa;
  border-color: #b8c7d6;
  color: #182d43;
}
.component-shell .node {
  color: #182d43;
}
.component-shell .node strong {
  font-weight: 700;
}
.component-shell .node small {
  color: #63778b;
}
.component-shell .node-state {
  color: #16785a;
}
.technology-name {
  color: #4f657b;
}
.component-action {
  border-color: #d4dee6;
}
.map-action {
  background: #e4f0ec;
  border-color: #c5d8ce;
  color: #175c49;
  font-weight: 600;
}
.map-fact {
  color: #52677d;
}
.component-shell.planned {
  background: #17283d;
  border: 1px dashed #627991;
  color: #d0dce9;
}
.component-shell.planned .node {
  color: #cbdceb;
}
.component-shell.planned .technology-name,
.component-shell.planned .node small {
  color: #91a8bf;
}
.component-shell.planned .node-state {
  color: #91a8bf;
}
.component-shell.planned .tech-logo {
  filter: none;
  opacity: 0.65;
}
.component-shell.planned .component-action {
  border-color: #334a61;
}
.component-shell.planned .map-action {
  background: #253d50;
  border-color: #557b8f;
  color: #a7e7d2;
}
.component-shell.building {
  background: #fff3d9;
  border-color: #e7ba72;
}
.component-shell .node.failed {
  background: #fde9e7;
}
.component-shell .node.stressed {
  background: #fff0d5;
}
.component-shell .node.pinned {
  outline-color: #5ce1b4;
}
.guide-panel {
  background: #131f30;
  border-color: #2d4058;
}
.guide-map-note {
  background: #203b3b;
  color: #b3ebd7;
  border-color: #64d7ae;
}
.location-cue {
  color: #8adfbf;
}
.step-num {
  border-color: #496076;
  color: #a9bacc;
}
.step.done .step-num {
  background: #254839;
  color: #97efc5;
  border-color: #3f6a56;
}
.tradeoff {
  background: #302d28;
  border: 1px solid #4b4437;
}
.tradeoff .tiny-label {
  color: #edc78b;
}
.tradeoff p {
  color: #d8c7ab;
}
.inspect-role {
  background: #22433e;
  color: #96ecd0;
}
.inspect-list dd {
  color: #d7e3ef;
}
.metrics {
  background: #e8eff5;
  border-color: #cbd9e4;
  color: #15304a;
}
.metric {
  border-color: #c2d2df;
}
.metric > span,
.metric p,
.metric strong small {
  color: #5a7085;
}
.metric.alert strong {
  color: #a44331;
}
.activity {
  background: #131f30;
  border-color: #2e4057;
}
.activity li {
  border-color: #27394f;
}
.main-footer {
  color: #7c91aa;
}
.skip {
  background: #122034;
  color: #9af0cd;
}
.panel-bottom a {
  color: #8be3c2;
}
.budget b {
  color: #dee8f0;
}
.range-labels {
  color: #9eafc2;
}
input[type="range"] {
  accent-color: #62dfb5;
}
.icon-button {
  color: #b5c5d6;
}
.graph-caption {
  color: #91a6bb;
}
@keyframes component-ready {
  from {
    border-color: #86ffb7;
    background: #c1f9dd;
  }
  to {
    background: #f4f7fa;
  }
}
@media (max-width: 760px) {
  .metric:nth-child(-n + 2) {
    border-bottom-color: #c2d2df;
  }
}
.graph-stage {
  position: relative;
  overflow: hidden;
}
.graph-scroll {
  overflow-y: hidden;
}
.component-shell .node strong {
  font-size: 14px;
}
.component-shell .node-state {
  font-size: 8px;
}
.component-shell .technology-name {
  font-size: 10px;
}
.component-shell .node small {
  white-space: normal;
  font-size: 9px;
}

/* One viewport: the topology fits; teaching panels scroll independently. */
.topbar {
  height: 52px;
}
.workspace {
  height: calc(100dvh - 52px);
  max-width: none;
  grid-template-columns: 174px minmax(0, 1fr) 284px;
}
.rail {
  min-height: 0;
  padding: 20px 10px;
  overflow-y: auto;
}
.rail-note {
  margin-top: 24px;
}
main {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 0;
}
.page-heading {
  margin: 0;
  min-height: 46px;
}
h1 {
  font-size: 22px;
  margin: 3px 0;
}
.page-heading p {
  font-size: 11px;
  margin: 0;
}
.notice {
  padding: 5px 9px;
  margin: 0;
  font-size: 10px;
}
.controls {
  padding: 7px 12px;
  margin: 0;
  gap: 15px;
  min-height: 56px;
}
.range-labels {
  font-size: 8px;
}
.control-label {
  font-size: 10px;
}
#load-value {
  font-size: 16px;
}
.mix-control strong {
  font-size: 10px;
}
.run {
  padding: 9px 12px;
}
.architecture {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  margin: 0;
}
.architecture > .section-heading {
  padding: 8px 12px;
  min-height: 38px;
  gap: 8px;
}
.architecture .section-heading h2 {
  font-size: 12px;
  margin: 0;
}
.architecture .section-heading .tiny-label {
  display: none;
}
#record-count {
  font-size: 9px;
  color: #a7bad0;
  font-weight: 400;
  margin-left: 10px;
}
#focus-map {
  font-size: 10px;
  padding: 5px 8px;
  margin-left: auto;
  white-space: nowrap;
}
.state-pill {
  font-size: 9px;
}
.build-status {
  min-height: 27px;
  padding: 5px 10px;
  margin: 0;
  font-size: 10px;
}
.build-mode {
  display: none;
}
#build-message {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.graph-scroll {
  flex: 1;
  height: auto;
  min-height: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0c1727;
}
.graph-stage {
  flex: none;
}
.graph,
.edges {
  width: 960px;
  height: 530px;
}
.graph {
  transform-origin: top left;
}
.component-shell {
  height: 132px;
}
.component-shell .node {
  height: 90px;
  padding: 7px 12px;
}
.component-shell .node-top {
  top: 7px;
}
.component-shell .node strong {
  margin-top: 28px;
  font-size: 14px;
}
.component-shell .node small {
  font-size: 10px;
}
.component-shell .node-state {
  display: none;
}
.tech-logo {
  width: 22px;
  height: 22px;
}
.component-action {
  min-height: 40px;
  padding: 4px 7px;
}
.map-action {
  font-size: 10px;
  min-height: 30px;
  padding: 5px;
}
.fault-open {
  position: absolute;
  top: 7px;
  right: 7px;
  color: #355b68;
  background: #e2ecef;
  border: 1px solid #b7ccd5;
  border-radius: 4px;
  padding: 4px 6px;
  font-size: 10px;
}
.planned .fault-open {
  background: #243c50;
  color: #b8dace;
  border-color: #507183;
}
.component-shell.faulted {
  box-shadow: 0 0 0 2px #f1a770;
}
#component-shard {
  width: 386px;
}
#component-shard .node {
  height: 46px;
  padding: 5px 12px;
  width: 180px;
}
#component-shard .node-top {
  display: none;
}
#component-shard .node strong {
  margin-top: 0;
}
#component-shard .technology-name {
  display: none;
}
#component-shard .node small {
  font-size: 9px;
}
#shard-bank {
  height: 42px;
  display: flex;
  gap: 5px;
  padding: 0 8px 4px;
}
.shard-cell {
  display: grid;
  grid-template-columns: 14px 1fr;
  gap: 0 3px;
  align-items: center;
  flex: 1;
  max-width: 63px;
  border: 1px solid #91b7a8;
  border-radius: 4px;
  padding: 2px 4px;
  background: #def1e8;
  color: #1b4c3a;
}
.shard-cell img {
  width: 14px;
  height: 14px;
}
.shard-cell b {
  font-size: 9px;
}
.shard-cell small {
  grid-column: 1/-1;
  font-size: 9px;
  font-family: var(--mono);
}
.empty-shard {
  border-style: dashed;
  background: #edf0f4;
  color: #5b6777;
}
.shard-down {
  background: #ffcfbf;
  border-color: #c34b32;
}
.fault-console {
  border-top: 1px solid #354b60;
  padding: 7px 10px;
  background: #172a3d;
}
.fault-console-controls {
  display: flex;
  align-items: center;
  gap: 6px;
}
#fault-target {
  font-size: 10px;
  color: #cbe3ed;
  min-width: 74px;
}
.fault-console select,
.fault-console button {
  background: #233f50;
  color: #d9f3e9;
  border: 1px solid #547788;
  border-radius: 4px;
  padding: 6px;
  font-size: 10px;
}
.fault-console select {
  max-width: 160px;
}
.fault-console button:disabled {
  opacity: 0.45;
}
#inject-fault {
  border-color: #cd996b;
  color: #f8ce9b;
}
#quality {
  margin-left: auto;
  font-size: 9px;
  color: #b3c5d9;
}
#fault-outcome {
  margin: 5px 0 0;
  color: #a9bdce;
  font-size: 10px;
}
.graph-footer {
  padding: 5px 12px;
  min-height: 23px;
  font-size: 8px;
}
.metrics {
  margin: 0;
  min-height: 57px;
}
.metric {
  padding: 7px 10px;
}
.metric strong {
  font-size: 20px;
  line-height: 1.3;
}
.metric strong small {
  display: inline;
  font-size: 9px;
  margin-left: 4px;
}
.metric > span {
  font-size: 8px;
}
.metric p {
  margin: 1px 0 0;
  font-size: 8px;
}
.activity {
  margin: 0;
  padding: 0;
  background: transparent;
  border: 0;
}
.activity .section-heading,
.main-footer {
  display: none;
}
.activity ol {
  padding: 0;
  margin: 0;
}
.activity li {
  padding: 2px;
  font-size: 10px;
  border: 0;
}
.activity li:not(:first-child) {
  display: none;
}
.guide-panel {
  min-height: 0;
  overflow-y: auto;
}
.panel-tabs {
  position: sticky;
  top: 0;
  background: #131f30;
  z-index: 2;
  padding-top: 6px;
  flex: none;
}
#guide-content,
#inspect-content {
  padding: 18px;
}
.guide-panel h3 {
  font-size: 20px;
}
.experiment-explanation {
  background: #1a3541;
  border: 1px solid #396071;
  border-radius: 6px;
  padding: 12px;
  margin: 14px 0;
}
.experiment-explanation b {
  display: block;
  margin-top: 8px;
  font-size: 13px;
}
.experiment-explanation p {
  font-size: 11px;
  line-height: 1.6;
  color: #c0d5e2;
}
.experiment-explanation small {
  font-size: 10px;
  color: #8ce3c2;
}
body.focus-map .workspace {
  grid-template-columns: 1fr;
}
body.focus-map .rail,
body.focus-map .guide-panel {
  display: none;
}
body.focus-map .page-heading,
body.focus-map .notice {
  display: none;
}
@media (max-width: 1100px) {
  .workspace {
    grid-template-columns: minmax(0, 1fr) 250px;
    grid-template-rows: 44px minmax(0, 1fr);
  }
  .rail {
    grid-column: 1/-1;
    min-height: 0;
    padding: 4px 10px;
    overflow: hidden;
  }
  .rail-heading,
  .rail-note,
  .budget {
    display: none;
  }
  .rail nav {
    display: flex;
    gap: 6px;
    overflow: auto;
  }
  .chapter {
    min-width: 124px;
    padding: 7px;
    margin: 0;
  }
  .chapter small {
    display: none;
  }
  .chapter b {
    font-size: 10px;
  }
  .mix-control,
  #quality,
  .state-pill {
    display: none;
  }
  body.focus-map .workspace {
    grid-template-rows: minmax(0, 1fr);
  }
}
@media (max-width: 760px) {
  .workspace {
    display: grid;
    grid-template-columns: 1fr;
    height: auto;
    min-height: calc(100dvh - 52px);
  }
  main {
    height: calc(100dvh - 96px);
    min-height: 500px;
    padding: 6px;
    gap: 5px;
  }
  .guide-panel {
    max-height: 60dvh;
  }
  .page-heading h1 {
    font-size: 18px;
  }
  .page-heading p,
  .eyebrow {
    display: none;
  }
  .notice {
    font-size: 9px;
  }
  .controls {
    min-height: 54px;
  }
  .metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .metric {
    padding: 5px;
    border-bottom: 0;
  }
  .metric strong {
    font-size: 14px;
  }
  .metric strong small {
    display: block;
    margin: 0;
    font-size: 8px;
  }
  .metric p {
    display: none;
  }
  #record-count {
    display: block;
    margin: 2px 0 0;
    font-size: 8px;
  }
  .fault-console-controls {
    flex-wrap: wrap;
  }
  #fault-target {
    min-width: 0;
  }
  .fault-console select {
    max-width: 125px;
  }
  .fault-console {
    padding: 5px;
  }
  #fault-outcome {
    font-size: 9px;
  }
  body.focus-map main {
    height: calc(100dvh - 52px);
  }
}
.page-heading {
  min-height: 30px;
  flex: none;
}
.page-heading .eyebrow,
.page-heading p {
  display: none;
}
h1 {
  font-size: 20px;
}
.notice {
  flex: none;
  padding: 3px 8px;
}
.controls {
  flex: none;
  height: 50px;
  min-height: 50px;
  padding: 4px 10px;
}
.controls .control-label {
  margin: 0;
}
.controls input {
  margin: 3px 0;
}
.controls .micro,
.range-labels {
  display: none;
}
.architecture > .section-heading {
  height: 33px;
  min-height: 33px;
  padding: 3px 10px;
  flex: none;
}
.build-status {
  height: 24px;
  min-height: 24px;
  flex: none;
}
.graph,
.edges {
  width: 1240px;
  height: 660px;
}
.graph-scroll {
  position: relative;
  display: block;
  overflow: clip;
  cursor: grab;
  touch-action: none;
}
.graph-scroll.panning { cursor: grabbing; user-select: none; }
.graph-scroll:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.graph-stage { position: absolute; inset: 0; overflow: visible; }
.canvas-toolbar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  background: #132035;
  border-bottom: 1px solid #354b60;
  flex: none;
  font-size: 10px;
}
#canvas-help { margin-right: auto; color: #a7bad0; }
.canvas-toolbar button {
  border: 1px solid #496077;
  background: #22354a;
  color: #e0f1f6;
  border-radius: 4px;
  padding: 4px 8px;
  min-height: 28px;
  min-width: 28px;
}
#zoom-level { min-width: 34px; text-align: center; font-family: var(--mono); }
.edge.read { marker-end: url(#arrow-read); }
.edge.write { marker-end: url(#arrow-write); }
.edge.replication { marker-end: url(#arrow-replication); }
.running:not(.reduced) .edge.write.enabled { stroke-dasharray: 9 6; }
.running:not(.reduced) .edge.replication.enabled { stroke-dasharray: 2 7; }
.edges .route-label {
  font: 10px var(--mono);
  paint-order: stroke;
  stroke: #0c1727;
  stroke-width: 4px;
  stroke-linejoin: round;
  transition: opacity 0.25s;
}
.route-label.read { fill: #82e8c5; }
.route-label.write { fill: #c4ceff; }
.route-label.replication { fill: #eac57f; }
@media (max-width: 760px) {
  #canvas-help { font-size: 9px; max-width: 115px; }
}
.component-shell {
  height: 120px;
  display: grid;
  grid-template-rows: 78px 40px;
}
.component-shell .node {
  height: 78px;
  display: grid;
  grid-template-rows: 18px 16px 11px 11px;
  gap: 2px;
  padding: 6px 10px;
  min-width: 0;
  align-content: start;
}
.component-shell .node-top {
  position: static;
  padding-right: 58px;
}
.component-shell .tech-logo {
  width: 18px;
  height: 18px;
}
.component-shell .node strong {
  margin: 0;
  font-size: 13px;
  line-height: 16px;
}
.component-shell .technology-name {
  font-size: 9px;
  line-height: 11px;
}
.component-shell .node small {
  margin: 0;
  font-size: 9px;
  line-height: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.component-action {
  min-height: 0;
  padding: 4px 6px;
  gap: 4px;
}
.map-action {
  min-width: 0;
  min-height: 30px;
  padding: 4px;
  font-size: 9px;
  line-height: 11px;
}
.fault-open {
  top: 5px;
  right: 6px;
  padding: 3px 5px;
  line-height: 12px;
}
#component-shard {
  grid-template-rows: 40px 38px 40px;
}
#component-shard .node {
  height: 40px;
  width: 100%;
  padding: 6px 78px 4px 10px;
  grid-template-rows: 16px 11px;
}
#component-shard .node strong {
  font-size: 13px;
}
#component-shard .node small {
  font-size: 9px;
}
#shard-bank {
  height: 38px;
  padding: 2px 8px 5px;
}
.shard-cell {
  min-width: 0;
  max-width: none;
  padding: 2px 4px;
  grid-template-rows: 12px 11px;
}
.shard-cell img {
  width: 12px;
  height: 12px;
}
.shard-cell small {
  font-size: 8px;
  line-height: 11px;
}
.component-shell .node.hovered {
  box-shadow: inset 0 0 0 2px #36b98e;
}
.shard-cell.hovered,
.shard-cell:focus-visible {
  outline: 2px solid #36b98e;
  outline-offset: 1px;
}
/* Animate inside reserved slots: adding capacity never moves a control. */
.component-shell.building {
  animation: none;
}
.building .node {
  animation: component-materialize 600ms ease-out;
}
.building .node-state {
  display: inline;
  font-size: 6px;
  letter-spacing: 0;
}
.component-shell[data-build-stage="checking"] .build-progress span {
  background: #31ae8a;
}
.shard-cell.new-shard {
  animation: shard-arrive 550ms ease-out;
}
.shard-cell.moved-buckets {
  animation: bucket-transfer 700ms ease-out;
}
@keyframes component-materialize {
  from { opacity: 0.35; filter: saturate(0); }
  to { opacity: 1; filter: saturate(1); }
}
@keyframes shard-arrive {
  from { opacity: 0; transform: translateY(3px) scale(0.9); }
  to { opacity: 1; transform: none; }
}
@keyframes bucket-transfer {
  35% { background: #85ebc1; box-shadow: inset 0 0 0 2px #208e67; }
}
.reduced .node,
.reduced .shard-cell {
  animation: none !important;
}
@media (prefers-reduced-motion: reduce) {
  .node,
  .shard-cell {
    animation: none !important;
  }
}
.hover-card {
  position: fixed;
  inset: auto;
  width: 252px;
  max-width: calc(100vw - 16px);
  padding: 14px;
  border-radius: 10px;
  background: #15283b;
  color: #dfecf7;
  border: 1px solid #5f8c9e;
  box-shadow: 0 10px 30px #0006;
  font-size: 12px;
  line-height: 1.45;
  z-index: 50;
  pointer-events: none;
}
.hover-card .hover-kicker {
  display: block;
  font: 8px var(--mono);
  letter-spacing: 1px;
  color: #95b7cb;
  margin-bottom: 7px;
}
.hover-card strong {
  display: block;
  font-size: 14px;
}
#hover-state {
  display: block;
  color: #8ce9c5;
  font-size: 11px;
  margin-top: 4px;
}
.hover-card p {
  margin: 9px 0;
}
.hover-card small {
  display: block;
  border-top: 1px solid #365268;
  padding-top: 8px;
  color: #a8bed0;
  font-size: 10px;
}
.metrics {
  flex: none;
  height: 56px;
  min-height: 56px;
}
.metric {
  padding: 5px 10px;
}
.metric strong {
  margin: 2px 0;
  font-size: 18px;
}
.metric p {
  display: none;
}
.fault-console {
  flex: none;
}
.graph-footer {
  flex: none;
  height: 22px;
}

/* Controls live over the model canvas; the fitted topology reserves their edges. */
.canvas-dock {
  position: absolute;
  z-index: 12;
  cursor: auto;
  touch-action: auto;
  border: 1px solid #426079;
  border-radius: 9px;
  background: rgba(17, 34, 51, 0.96);
  color: #dcebf4;
  box-shadow: 0 12px 28px #06111f99;
  backdrop-filter: blur(8px);
}
.canvas-telemetry {
  top: 10px;
  bottom: 10px;
  left: 10px;
  width: 154px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  overflow-y: auto;
  scrollbar-color: #45637a transparent;
  scrollbar-width: thin;
}
.dock-heading {
  display: flex;
  justify-content: space-between;
  gap: 5px;
  color: #91e6c5;
  font: 9px var(--mono);
  letter-spacing: 1px;
}
.dock-heading small { color: #91aabe; font-size: 8px; }
.canvas-telemetry .load-control { flex: none; min-width: 0; }
.canvas-telemetry .load-control label,
.fault-console-body label {
  display: block;
  margin-top: 4px;
  color: #a9c1d1;
  font-size: 10px;
}
.canvas-telemetry output {
  display: block;
  margin: 3px 0;
  color: #f5fbff;
  font-size: 19px;
  font-weight: 700;
}
.canvas-telemetry output small { color: #a9c1d1; font-size: 9px; }
.load-steps { display: flex; align-items: center; gap: 3px; }
.load-steps input[type="range"] { flex: 1; min-width: 0; margin: 0; }
.load-steps button {
  flex: none;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 1px solid #54728b;
  border-radius: 4px;
  background: #28415a;
  color: #d5f1e7;
}
#load-step-note { display: block; margin-top: 4px; color: #91aabe; font: 8px var(--mono); }
.canvas-telemetry .run { width: 100%; padding: 7px 4px; font-size: 10px; }
.traffic-mix { color: #9eb9ca; font: 9px var(--mono); text-align: center; }
.traffic-mix span { color: #5b7d90; }
.canvas-telemetry .metrics {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  flex: none;
  height: auto;
  min-height: 0;
  margin: 0;
  border: 1px solid #344e63;
  border-radius: 6px;
  background: #172b3e;
  color: #e5f1f7;
}
.canvas-telemetry .metric {
  min-width: 0;
  padding: 6px 7px;
  border-right: 0;
  border-bottom: 1px solid #344e63;
}
.canvas-telemetry .metric:last-child { border-bottom: 0; }
.canvas-telemetry .metric > span { color: #9eb9ca; font: 9px var(--mono); }
.canvas-telemetry .metric strong {
  display: block;
  margin: 1px 0 0;
  color: #f1f8fc;
  font: 16px/1.2 var(--mono);
  white-space: nowrap;
}
.canvas-telemetry .metric strong small {
  display: inline;
  margin-left: 3px;
  color: #9eb9ca;
  font-size: 8px;
}
.canvas-telemetry #db-demand small { display: block; margin: 0; }
.canvas-telemetry .metric.alert strong { color: #ffb18f; }
.canvas-telemetry #db-pressure {
  display: block;
  margin: 2px 0 0;
  color: #a9c1d1;
  font-size: 8px;
  line-height: 1.3;
}
.canvas-telemetry #motion {
  align-self: start;
  margin-top: auto;
  padding: 2px 0;
  color: #a9c1d1;
}
.fault-console {
  top: 10px;
  right: 10px;
  bottom: auto;
  width: 38px;
  max-height: calc(100% - 20px);
  padding: 0;
  overflow-y: auto;
  scrollbar-color: #66566a transparent;
  scrollbar-width: thin;
  border: 1px solid #6a6872;
  background: rgba(35, 35, 49, 0.97);
}
.fault-console[open] { width: 180px; }
.fault-console summary {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 125px;
  padding: 9px 7px;
  color: #ffd7a4;
  font: 11px var(--mono);
  cursor: pointer;
  list-style: none;
  writing-mode: vertical-rl;
}
.fault-console summary::-webkit-details-marker { display: none; }
.fault-console[open] summary {
  min-height: 36px;
  justify-content: flex-start;
  border-bottom: 1px solid #635667;
  writing-mode: horizontal-tb;
}
.fault-console-body { display: grid; gap: 6px; padding: 9px; }
.fault-console-body .tiny-label { color: #c4a7a9; font-size: 8px; }
.fault-console-body strong { overflow-wrap: anywhere; font-size: 11px; }
.fault-console select,
.fault-console button { width: 100%; min-width: 0; text-align: left; }
.fault-console select { max-width: none; }
#quality { display: block; margin: 0; color: #a9bdce; font-size: 9px; }
#fault-outcome { margin: 0; color: #a9bdce; font-size: 9px; line-height: 1.35; }
@media (max-width: 760px) {
  .canvas-telemetry { width: 124px; padding: 7px; gap: 5px; }
  .canvas-telemetry output { font-size: 16px; }
  .canvas-telemetry .metric { padding: 4px 5px; }
  .canvas-telemetry .metric strong { font-size: 13px; }
  .fault-console[open] { width: 158px; }
  .fault-console summary { min-height: 108px; }
  #quality { display: block; }
}

/* The product name states its educational purpose without widening the canvas. */
.brand strong { font-size: clamp(14px, 1.4vw, 20px); letter-spacing: -.4px; }
#model-insight { line-height: 1.5; }
@media (max-width: 1050px) { .breadcrumb { display: none; } }
@media (max-width: 600px) { .top-actions .mode { display: none; } }
