:root {
  color-scheme: light;
  --bench: #303328;
  --bench-dark: #1f221b;
  --olive: #565943;
  --olive-light: #6b6e53;
  --enamel: #d8d0ae;
  --enamel-light: #eee6c8;
  --paper: #f1e7c4;
  --ink: #2b2a21;
  --brown: #4b3b29;
  --line: #77745d;
  --screen: #16180f;
  --screen-soft: #212318;
  --amber: #f0b84f;
  --amber-hot: #ffd777;
  --rust: #a84831;
  --rust-dark: #6d2d22;
  --teal: #477b73;
  --cream: #f5efda;
  --muted: #6d6a57;
  --mono: "Courier New", Courier, monospace;
  --condensed: "Arial Narrow", "Roboto Condensed", "Helvetica Neue", Arial, sans-serif;
  --sans: "Helvetica Neue", Arial, sans-serif;
  --hard-shadow: 5px 7px 0 rgba(20, 21, 16, 0.5);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--bench-dark);
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--ink);
  background:
    repeating-linear-gradient(92deg, rgba(255, 255, 255, 0.012) 0 2px, transparent 2px 7px),
    radial-gradient(circle at 18% 3%, rgba(216, 208, 174, 0.12), transparent 30rem),
    radial-gradient(circle at 80% 16%, rgba(0, 0, 0, 0.25), transparent 42rem),
    var(--bench);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.45;
}

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

button,
select,
input[type="range"] {
  cursor: pointer;
}

button:focus-visible,
select:focus-visible,
textarea:focus-visible,
input:focus-visible {
  outline: 3px solid #2c6d71;
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 10px;
  left: 10px;
  padding: 10px 14px;
  color: var(--cream);
  background: var(--rust);
  font-weight: 800;
  transform: translateY(-160%);
}

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

.topbar {
  position: relative;
  width: min(1760px, calc(100% - 32px));
  min-height: 118px;
  display: grid;
  grid-template-columns: minmax(330px, 1.1fr) minmax(280px, 0.75fr) minmax(390px, 1fr);
  align-items: center;
  gap: 24px;
  margin: 22px auto 0;
  padding: 18px 24px;
  border: 4px solid #24261e;
  border-bottom-color: #171914;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.09), transparent 16%),
    repeating-linear-gradient(90deg, rgba(0, 0, 0, 0.018) 0 1px, transparent 1px 6px),
    var(--olive);
  box-shadow:
    inset 0 0 0 3px rgba(232, 225, 197, 0.16),
    inset 0 -8px 18px rgba(22, 23, 18, 0.2),
    0 8px 0 #171914,
    0 16px 30px rgba(0, 0, 0, 0.28);
}

.topbar::before,
.topbar::after,
.panel::after {
  content: "";
  position: absolute;
  width: 9px;
  height: 9px;
  border: 2px solid rgba(37, 38, 29, 0.72);
  border-radius: 50%;
  background: #8d8b73;
  box-shadow: inset 1px 1px 0 rgba(255, 255, 255, 0.35);
}

.topbar::before {
  top: 9px;
  left: 9px;
}

.topbar::after {
  right: 9px;
  bottom: 9px;
}

.brand-block,
.run-cluster,
.panel-heading,
.program-heading,
.core-actions,
.live-readout,
.subhead-row,
.condition-row,
.sensor-control__top,
.switch-row,
.api-panel__head,
.dialog-heading {
  display: flex;
  align-items: center;
}

.brand-block {
  gap: 18px;
}

.brand-mark {
  position: relative;
  width: 74px;
  height: 74px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border: 5px solid #35372c;
  border-radius: 50%;
  color: var(--amber-hot);
  background:
    radial-gradient(circle, #25271d 0 48%, #11130e 49% 61%, #8b886d 62% 66%, #383a2e 67%);
  box-shadow:
    inset 0 0 16px rgba(0, 0, 0, 0.85),
    2px 3px 0 rgba(24, 25, 20, 0.7);
  font-family: var(--mono);
  font-size: 1.35rem;
  font-weight: 900;
}

.brand-mark span {
  transform: translateY(1px);
  text-shadow: 0 0 8px rgba(240, 184, 79, 0.7);
}

.brand-mark::before {
  content: "";
  position: absolute;
  width: 2px;
  height: 24px;
  top: 9px;
  left: 50%;
  background: var(--amber);
  transform: rotate(28deg);
  transform-origin: bottom center;
  box-shadow: 0 0 5px rgba(240, 184, 79, 0.65);
}

.brand-mark i {
  position: absolute;
  right: 7px;
  bottom: 7px;
  width: 8px;
  height: 8px;
  border: 1px solid #59251d;
  border-radius: 50%;
  background: #c95539;
}

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

.eyebrow,
.section-code,
.manufacturer {
  font-family: var(--condensed);
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.eyebrow,
.section-code {
  margin: 0 0 3px;
  font-size: 0.76rem;
}

.eyebrow {
  color: #ded7b9;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin: 0;
  color: var(--cream);
  font-family: var(--condensed);
  font-size: clamp(2rem, 3.1vw, 3.4rem);
  font-weight: 900;
  line-height: 0.9;
  letter-spacing: 0.055em;
  text-shadow: 2px 2px 0 #323429;
}

.manufacturer {
  display: block;
  margin-top: 8px;
  color: #b9b397;
  font-size: 0.65rem;
}

h2 {
  margin: 0;
  font-family: var(--condensed);
  font-size: 1.05rem;
  font-weight: 900;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.specimen-meta {
  position: relative;
  min-width: 260px;
  padding: 14px 18px 13px;
  border: 2px solid #35352b;
  color: #2c2b22;
  background:
    repeating-linear-gradient(0deg, rgba(67, 61, 44, 0.035) 0 1px, transparent 1px 3px),
    #cfc39a;
  box-shadow:
    inset 0 0 0 2px rgba(255, 255, 255, 0.26),
    3px 4px 0 rgba(32, 33, 26, 0.55);
  text-align: center;
  transform: rotate(-0.35deg);
}

.specimen-meta::before,
.specimen-meta::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #565444;
  transform: translateY(-50%);
}

.specimen-meta::before { left: 8px; }
.specimen-meta::after { right: 8px; }

.specimen-meta span,
.specimen-meta strong {
  display: block;
}

.meta-label {
  color: #625e4a;
  font-family: var(--condensed);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.specimen-meta strong {
  margin-top: 5px;
  font-family: var(--mono);
  font-size: 0.83rem;
  letter-spacing: 0.025em;
}

.run-cluster {
  justify-content: flex-end;
  gap: 11px;
}

.live-readout {
  min-width: 185px;
  min-height: 49px;
  gap: 8px;
  padding: 10px 12px;
  border: 4px solid #2a2b23;
  border-radius: 7px;
  color: var(--amber);
  background:
    repeating-linear-gradient(0deg, rgba(240, 184, 79, 0.02) 0 2px, transparent 2px 4px),
    var(--screen);
  box-shadow:
    inset 0 0 15px rgba(0, 0, 0, 0.85),
    2px 3px 0 rgba(25, 26, 20, 0.55);
  font-family: var(--mono);
  font-size: 0.76rem;
  text-shadow: 0 0 6px rgba(240, 184, 79, 0.45);
}

.live-readout b {
  margin-left: auto;
  color: var(--amber-hot);
  font-weight: 500;
}

.status-lamp,
.bus-status i {
  width: 9px;
  height: 9px;
  display: inline-block;
  border: 1px solid #21352c;
  border-radius: 50%;
  background: #75a57a;
  box-shadow: 0 0 8px rgba(117, 165, 122, 0.7);
}

.status-lamp.paused {
  border-color: #6d2d22;
  background: var(--rust);
  box-shadow: 0 0 8px rgba(168, 72, 49, 0.7);
}

.button,
.icon-button,
.pulse-button,
.adapter-button,
.truth-strip button,
.subhead-row button,
.api-panel button,
footer button {
  border: 2px solid #343329;
  border-radius: 2px;
  color: var(--ink);
  background: #c7bea0;
  font-family: var(--condensed);
  font-size: 0.77rem;
  font-weight: 900;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.button {
  min-height: 42px;
  padding: 9px 14px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.4),
    0 4px 0 #38372c;
}

.button:hover,
.icon-button:hover,
.pulse-button:hover,
.adapter-button:hover {
  filter: brightness(1.08);
}

.button:active,
.icon-button:active,
.pulse-button:active,
.adapter-button:active {
  box-shadow: 0 1px 0 #38372c;
  transform: translateY(3px);
}

.button--acid {
  border-color: #59291f;
  color: var(--cream);
  background: var(--rust);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    0 4px 0 var(--rust-dark),
    0 0 0 3px rgba(240, 184, 79, 0.16);
}

.button--ghost {
  color: #24251d;
  background: #a7a487;
}

.button--reward {
  border-color: #6b572a;
  color: #332914;
  background: #d3ad55;
  box-shadow: 0 4px 0 #796431;
}

.button--punish {
  border-color: #4d211b;
  color: #f4e7d2;
  background: #8e3d2d;
  box-shadow: 0 4px 0 #512219;
}

.icon-button {
  width: auto;
  min-width: 48px;
  height: 34px;
  padding: 0 8px;
  box-shadow: 0 3px 0 #484638;
  font-size: 0.66rem;
}

.truth-strip {
  position: relative;
  z-index: 2;
  width: min(1690px, calc(100% - 72px));
  min-height: 45px;
  display: flex;
  align-items: center;
  gap: 24px;
  margin: 14px auto -7px;
  padding: 9px 18px;
  border: 1px solid #6e6751;
  color: #57523f;
  background:
    repeating-linear-gradient(0deg, rgba(66, 58, 39, 0.025) 0 1px, transparent 1px 4px),
    var(--paper);
  box-shadow: 2px 3px 0 rgba(20, 21, 17, 0.35);
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.025em;
  transform: rotate(-0.08deg);
}

.truth-strip::before {
  content: "INSPECTED  /  GL-74";
  position: absolute;
  right: 155px;
  padding: 2px 6px;
  border: 2px solid rgba(145, 57, 42, 0.46);
  color: rgba(145, 57, 42, 0.62);
  font-family: var(--condensed);
  font-weight: 900;
  letter-spacing: 0.11em;
  transform: rotate(-2deg);
}

.truth-strip b {
  color: #2d2c22;
}

.truth-strip__note {
  flex: 1;
}

.truth-strip button {
  padding: 2px 0;
  border: 0;
  color: var(--rust-dark);
  background: transparent;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.lab-grid {
  width: min(1800px, 100%);
  display: grid;
  grid-template-columns: minmax(250px, 0.72fr) minmax(590px, 1.8fr) minmax(280px, 0.82fr);
  gap: 13px;
  margin: 0 auto;
  padding: 23px 18px 18px;
  border: 4px solid #20221a;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.07), transparent 80px),
    repeating-linear-gradient(90deg, rgba(0, 0, 0, 0.017) 0 1px, transparent 1px 7px),
    #474a38;
  box-shadow:
    inset 0 0 0 4px rgba(216, 208, 174, 0.11),
    0 14px 0 #1c1e18,
    0 28px 48px rgba(0, 0, 0, 0.35);
}

.panel {
  position: relative;
  min-width: 0;
  padding: clamp(17px, 1.45vw, 25px);
  border: 2px solid #37372c;
  color: var(--ink);
  background:
    repeating-linear-gradient(90deg, rgba(64, 59, 43, 0.018) 0 1px, transparent 1px 5px),
    var(--enamel);
  box-shadow:
    inset 0 0 0 3px rgba(255, 255, 255, 0.18),
    var(--hard-shadow);
}

.panel::before {
  content: "";
  position: absolute;
  inset: 7px;
  border: 1px solid rgba(82, 79, 62, 0.25);
  pointer-events: none;
}

.panel::after {
  top: 10px;
  right: 10px;
  width: 6px;
  height: 6px;
}

.neural-panel,
.program-panel {
  color: var(--cream);
  background:
    repeating-linear-gradient(88deg, rgba(255, 255, 255, 0.018) 0 1px, transparent 1px 6px),
    var(--olive);
}

.output-panel {
  background:
    repeating-linear-gradient(90deg, rgba(64, 59, 43, 0.018) 0 1px, transparent 1px 5px),
    #c9c09d;
}

.panel-heading,
.program-heading {
  position: relative;
  z-index: 2;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 21px;
  padding-bottom: 12px;
  border-bottom: 2px solid rgba(66, 64, 51, 0.62);
}

.neural-panel .panel-heading,
.program-panel .program-heading {
  border-color: rgba(225, 218, 188, 0.32);
}

.section-code {
  color: var(--rust-dark);
}

.neural-panel .section-code,
.program-panel .section-code {
  color: #d4c99d;
}

.field-label {
  display: block;
  margin: 0 0 7px;
  color: #5b5746;
  font-family: var(--condensed);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.select-control {
  width: 100%;
  min-height: 41px;
  padding: 8px 34px 8px 11px;
  border: 2px solid #5d5a48;
  border-radius: 0;
  color: #2a291f;
  background: var(--enamel-light);
  box-shadow: inset 2px 2px 0 rgba(74, 70, 52, 0.13);
  font-family: var(--mono);
  font-size: 0.79rem;
  font-weight: 700;
}

.select-control--compact {
  width: auto;
  min-width: 225px;
}

.sensor-stack {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 8px;
  margin-top: 18px;
  padding: 10px;
  border: 1px solid #77725a;
  background: rgba(238, 230, 200, 0.35);
  box-shadow: inset 1px 1px 5px rgba(64, 61, 45, 0.12);
}

.sensor-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px 10px;
  padding: 8px 7px;
  border-bottom: 1px solid rgba(94, 90, 69, 0.38);
}

.sensor-control:last-child {
  border-bottom: 0;
}

.sensor-control__top {
  grid-column: 1 / -1;
  justify-content: space-between;
  margin-bottom: 2px;
  color: #5d5946;
  font-size: 0.82rem;
}

.sensor-control__top label {
  color: #2c2b21;
  font-family: var(--condensed);
  font-weight: 900;
  letter-spacing: 0.035em;
  text-transform: uppercase;
}

.sensor-control output,
.condition-row output {
  min-width: 42px;
  color: #6e3024;
  font-family: var(--mono);
  font-size: 0.76rem;
  font-weight: 700;
  text-align: right;
}

.sensor-glyph {
  width: 20px;
  display: inline-block;
  color: var(--teal);
  font-size: 0.95rem;
  text-align: center;
}

input[type="range"] {
  width: 100%;
  height: 23px;
  margin: 0;
  background: transparent;
  appearance: none;
}

input[type="range"]::-webkit-slider-runnable-track {
  height: 6px;
  border: 1px solid #3f3e32;
  background:
    repeating-linear-gradient(90deg, transparent 0 14%, rgba(238, 230, 200, 0.4) 14% 15%),
    #696650;
  box-shadow: inset 0 2px 2px rgba(0, 0, 0, 0.32);
}

input[type="range"]::-webkit-slider-thumb {
  width: 19px;
  height: 22px;
  margin-top: -9px;
  border: 2px solid #27261f;
  border-radius: 5px;
  background:
    linear-gradient(90deg, #2a2921 0 26%, #62503b 27% 72%, #2a2921 73%),
    #443828;
  box-shadow: 1px 2px 0 rgba(0, 0, 0, 0.45);
  appearance: none;
}

input[type="range"]::-moz-range-track {
  height: 5px;
  border: 1px solid #3f3e32;
  background: #696650;
}

input[type="range"]::-moz-range-thumb {
  width: 17px;
  height: 20px;
  border: 2px solid #27261f;
  border-radius: 5px;
  background: #544431;
}

.pulse-button {
  min-width: 61px;
  height: 27px;
  padding: 2px 7px;
  border-color: #59472b;
  color: #372c1b;
  background: #d5aa50;
  box-shadow: 0 3px 0 #795d2e;
  font-size: 0.64rem;
}

.pulse-button.active {
  color: #fff4cf;
  background: var(--rust);
  box-shadow: 0 1px 0 var(--rust-dark), 0 0 12px rgba(168, 72, 49, 0.38);
  transform: translateY(2px);
}

.divider-label {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 23px 0 14px;
  color: #6b6651;
  font-family: var(--condensed);
  font-size: 0.66rem;
  font-weight: 900;
  letter-spacing: 0.15em;
}

.divider-label::before,
.divider-label::after {
  content: "";
  height: 2px;
  flex: 1;
  background: rgba(81, 78, 61, 0.44);
}

.condition-row {
  justify-content: space-between;
  color: #504e3e;
  font-family: var(--condensed);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.switch-row {
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  padding: 13px 7px 0;
  border-top: 1px solid rgba(95, 91, 70, 0.43);
}

.switch-row strong,
.switch-row span {
  display: block;
}

.switch-row strong {
  font-family: var(--condensed);
  font-size: 0.79rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.switch-row > div > span {
  color: #68634f;
  font-size: 0.72rem;
}

.switch {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.switch > span {
  position: relative;
  width: 38px;
  height: 22px;
  border: 2px solid #3c3b30;
  background: #7d7961;
  box-shadow: inset 0 2px 3px rgba(0, 0, 0, 0.34);
}

.switch > span::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 3px;
  width: 12px;
  height: 14px;
  border: 1px solid #26261f;
  border-radius: 2px;
  background: #37362b;
  box-shadow: 1px 2px 0 rgba(0, 0, 0, 0.34);
  transition: transform 120ms ease, background 120ms ease;
}

.switch input:checked + span::after {
  background: var(--rust);
  transform: translateX(17px);
}

.switch em {
  min-width: 48px;
  color: #5d5948;
  font-family: var(--mono);
  font-size: 0.65rem;
  font-style: normal;
}

.panel-heading--neural {
  align-items: flex-start;
}

.core-actions {
  justify-content: flex-end;
  gap: 9px;
}

.speed-control {
  display: grid;
  grid-template-columns: auto 90px auto;
  align-items: center;
  gap: 8px;
  margin-right: 4px;
  color: #ddd4b2;
  font-family: var(--condensed);
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.speed-control output {
  width: 40px;
  color: var(--amber-hot);
  font-family: var(--mono);
}

.neural-panel input[type="range"]::-webkit-slider-runnable-track,
.program-panel input[type="range"]::-webkit-slider-runnable-track {
  border-color: #26271f;
  background: #8a876b;
}

.brain-stage {
  position: relative;
  height: clamp(410px, 49vh, 640px);
  min-height: 410px;
  overflow: hidden;
  border: 10px solid #2a2b22;
  border-right-color: #393a2e;
  border-bottom-color: #171813;
  border-radius: 36px / 28px;
  background:
    radial-gradient(ellipse at 48% 45%, rgba(240, 184, 79, 0.09), transparent 55%),
    repeating-linear-gradient(0deg, rgba(240, 184, 79, 0.025) 0 1px, transparent 1px 4px),
    repeating-linear-gradient(90deg, rgba(240, 184, 79, 0.018) 0 1px, transparent 1px 20px),
    var(--screen);
  box-shadow:
    inset 0 0 55px rgba(0, 0, 0, 0.92),
    inset 0 0 0 2px rgba(241, 231, 196, 0.08),
    3px 5px 0 #292a22;
}

.brain-stage::before {
  content: "";
  position: absolute;
  z-index: 3;
  inset: 5px;
  border: 1px solid rgba(240, 184, 79, 0.08);
  border-radius: 27px / 21px;
  background: radial-gradient(ellipse at 25% 8%, rgba(255, 255, 255, 0.055), transparent 28%);
  pointer-events: none;
}

.brain-stage::after {
  content: "OSCILLOSCOPE  /  SWEEP B";
  position: absolute;
  z-index: 4;
  top: 17px;
  left: 25px;
  color: rgba(240, 184, 79, 0.54);
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.09em;
  pointer-events: none;
}

#brainCanvas {
  position: absolute;
  z-index: 1;
  inset: 0;
  width: 100%;
  height: 100%;
}

.scanline {
  position: absolute;
  z-index: 2;
  left: 3%;
  right: 3%;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(240, 184, 79, 0.7), transparent);
  box-shadow: 0 0 12px rgba(240, 184, 79, 0.42);
  animation: scan 5.8s linear infinite;
  pointer-events: none;
}

@keyframes scan {
  from { top: 8%; }
  to { top: 92%; }
}

.brain-stamp,
.activity-key {
  position: absolute;
  z-index: 4;
  bottom: 22px;
  color: rgba(240, 184, 79, 0.6);
  font-family: var(--mono);
  font-size: 0.64rem;
  pointer-events: none;
  text-shadow: 0 0 5px rgba(240, 184, 79, 0.28);
}

.brain-stamp {
  left: 26px;
}

.brain-stamp span,
.brain-stamp b {
  display: block;
}

.brain-stamp b {
  color: var(--amber-hot);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.15em;
}

.activity-key {
  right: 27px;
  display: flex;
  gap: 13px;
}

.key-dot {
  width: 7px;
  height: 7px;
  display: inline-block;
  margin-right: 4px;
  border-radius: 50%;
}

.key-dot--quiet { background: #4f503e; }
.key-dot--primed { background: #bd8e3b; }
.key-dot--spike { background: var(--amber-hot); box-shadow: 0 0 8px var(--amber); }

.region-strip {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  margin: 11px 5px 0;
  border: 2px solid #2e2f26;
  background: #34362b;
  box-shadow: 0 3px 0 #292a22;
}

.region-button {
  min-width: 0;
  padding: 10px 7px 9px;
  border: 0;
  border-right: 1px solid #292a22;
  color: #c5bea0;
  background: #565843;
  font-family: var(--mono);
  font-size: 0.61rem;
  text-align: left;
}

.region-button:last-child {
  border-right: 0;
}

.region-button b,
.region-button span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.region-button b {
  margin-bottom: 3px;
  color: #f1ead0;
  font-size: 0.68rem;
}

.region-button i {
  width: 7px;
  height: 7px;
  display: inline-block;
  margin-right: 5px;
  border: 1px solid rgba(24, 24, 19, 0.52);
  border-radius: 50%;
  background: var(--region-color);
}

.region-button.active {
  color: #352d1d;
  background: #d0a64c;
  box-shadow: inset 0 -4px 0 var(--region-color);
}

.region-button.active b {
  color: #2b281f;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 0.8fr)) minmax(180px, 1.4fr);
  gap: 7px;
  margin-top: 15px;
}

.metric-card {
  min-width: 0;
  min-height: 104px;
  padding: 12px 13px;
  border: 2px solid #34352a;
  color: #2c2a20;
  background:
    repeating-linear-gradient(0deg, transparent 0 11px, rgba(75, 65, 44, 0.06) 11px 12px),
    #ddd2aa;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.28), 2px 3px 0 #303127;
}

.metric-card > span,
.metric-card > strong {
  display: block;
}

.metric-card > span {
  color: #615d49;
  font-family: var(--condensed);
  font-size: 0.67rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.metric-card > strong {
  margin: 4px 0;
  color: #653125;
  font-family: var(--mono);
  font-size: 1.02rem;
}

.metric-card canvas {
  width: 100%;
  height: 36px;
  display: block;
}

.micro-meter {
  position: relative;
  height: 10px;
  margin-top: 18px;
  overflow: hidden;
  border: 1px solid #494739;
  background:
    repeating-linear-gradient(90deg, transparent 0 9%, rgba(235, 226, 194, 0.17) 9% 10%),
    #4d4b3c;
}

.micro-meter i {
  width: 0%;
  height: 100%;
  display: block;
  background: #c48638;
  transition: width 120ms linear;
}

.micro-meter--bipolar::before {
  content: "";
  position: absolute;
  z-index: 1;
  left: 50%;
  width: 2px;
  height: 100%;
  background: #24241d;
}

.micro-meter--bipolar i {
  position: absolute;
  left: 50%;
  width: 0%;
}

.metric-card--selection p {
  margin: 3px 0 0;
  color: #625e4a;
  font-size: 0.73rem;
  line-height: 1.35;
}

.bus-status {
  padding: 5px 7px;
  border: 1px solid #6a6651;
  color: #4f4b3d;
  background: #ddd3b2;
  font-family: var(--mono);
  font-size: 0.62rem;
}

.bus-status i {
  width: 7px;
  height: 7px;
  margin-right: 5px;
}

.specimen-monitor {
  position: relative;
  margin-bottom: 22px;
  padding: 9px;
  border: 3px solid #32342a;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent 18%),
    repeating-linear-gradient(90deg, rgba(0, 0, 0, 0.025) 0 1px, transparent 1px 6px),
    #555844;
  box-shadow:
    inset 0 0 0 2px rgba(235, 227, 197, 0.12),
    2px 3px 0 #33342a;
}

.specimen-monitor::before,
.specimen-monitor::after {
  content: "";
  position: absolute;
  width: 6px;
  height: 6px;
  border: 1px solid #2a2b22;
  border-radius: 50%;
  background: #8c8970;
  box-shadow: inset 1px 1px rgba(255, 255, 255, 0.28);
}

.specimen-monitor::before {
  top: 5px;
  left: 5px;
}

.specimen-monitor::after {
  right: 5px;
  bottom: 5px;
}

.monitor-topline,
.monitor-footer {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-family: var(--mono);
  font-size: 0.57rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.monitor-topline {
  min-height: 24px;
  padding: 1px 7px 6px;
  color: #d8cfad;
}

.monitor-topline strong {
  color: var(--amber-hot);
  font-size: 0.56rem;
  text-align: right;
  text-shadow: 0 0 6px rgba(240, 184, 79, 0.38);
}

.chicken-screen {
  --monitor-arousal: 0.1;
  --monitor-glow: 0.14;
  --monitor-static: 0.08;
  --monitor-state-color: 240, 184, 79;
  position: relative;
  min-height: 230px;
  overflow: hidden;
  isolation: isolate;
  border: 8px solid #282a22;
  border-radius: 20px / 14px;
  background:
    radial-gradient(ellipse at 50% 61%, rgba(var(--monitor-state-color), 0.2), transparent 48%),
    linear-gradient(180deg, #202318, #11130d 74%);
  box-shadow:
    inset 0 0 28px rgba(0, 0, 0, 0.86),
    inset 0 0 12px rgba(var(--monitor-state-color), var(--monitor-glow)),
    0 1px 0 rgba(238, 231, 204, 0.16);
}

.chicken-screen::before {
  content: "";
  position: absolute;
  z-index: -1;
  left: 12%;
  right: 12%;
  bottom: 36px;
  height: 2px;
  background: rgba(var(--monitor-state-color), 0.38);
  box-shadow: 0 0 18px rgba(var(--monitor-state-color), 0.28);
}

.chicken-screen::after {
  content: "NEURAL IMAGE / NOT OPTICAL";
  position: absolute;
  z-index: 4;
  top: 8px;
  left: 10px;
  color: rgba(235, 220, 167, 0.52);
  font-family: var(--mono);
  font-size: 0.48rem;
  letter-spacing: 0.08em;
}

.chicken-screen[data-brain-state="freeze"] {
  --monitor-state-color: 200, 77, 52;
}

.chicken-screen[data-brain-state="call"] {
  --monitor-state-color: 118, 163, 154;
}

.chicken-screen[data-brain-state="peck"] {
  --monitor-state-color: 255, 215, 119;
}

.chicken-screen[data-brain-state="stride"] {
  --monitor-state-color: 196, 134, 56;
}

.chicken-screen[data-brain-state="frazzled"] {
  --monitor-state-color: 201, 134, 114;
}

.chicken-sprite {
  position: absolute;
  z-index: 2;
  left: 50%;
  bottom: 25px;
  width: min(68%, 200px);
  aspect-ratio: 1;
  background-image: url("chicken-monitor-sprite.png");
  background-repeat: no-repeat;
  background-size: 300% 200%;
  filter:
    drop-shadow(0 7px 1px rgba(0, 0, 0, 0.33))
    drop-shadow(0 0 7px rgba(var(--monitor-state-color), var(--monitor-glow)));
  transform: translateX(-50%);
  transform-origin: 50% 88%;
  will-change: transform;
}

.chicken-frame-0 { background-position: 0% 0%; }
.chicken-frame-1 { background-position: 50% 0%; }
.chicken-frame-2 { background-position: 100% 0%; }
.chicken-frame-3 { background-position: 0% 100%; }
.chicken-frame-4 { background-position: 50% 100%; }
.chicken-frame-5 { background-position: 100% 100%; }

.motion-idle {
  animation: monitor-breathe 1.65s ease-in-out infinite;
}

.motion-peck {
  animation: monitor-peck 0.32s steps(2, end) infinite;
}

.motion-freeze {
  animation: monitor-freeze 0.18s linear infinite;
}

.motion-call {
  animation: monitor-call 0.58s ease-in-out infinite;
}

.motion-stride {
  animation: monitor-strut 0.48s ease-in-out infinite;
}

.motion-frazzled {
  animation: monitor-frazzled 0.22s steps(2, end) infinite;
}

@keyframes monitor-breathe {
  0%, 100% { transform: translateX(-50%) translateY(0) rotate(-0.4deg); }
  50% { transform: translateX(-50%) translateY(-3px) rotate(0.5deg); }
}

@keyframes monitor-peck {
  0%, 100% { transform: translateX(-50%) rotate(0); }
  50% { transform: translateX(-50%) translateY(5px) rotate(1.5deg); }
}

@keyframes monitor-freeze {
  0%, 100% { transform: translateX(-50%) translateX(-1px); }
  50% { transform: translateX(-50%) translateX(1px); }
}

@keyframes monitor-call {
  0%, 100% { transform: translateX(-50%) translateY(0) rotate(-1deg); }
  50% { transform: translateX(-50%) translateY(-7px) rotate(1deg); }
}

@keyframes monitor-strut {
  0%, 100% { transform: translateX(-50%) translateX(-5px) rotate(-1.5deg); }
  50% { transform: translateX(-50%) translateX(5px) translateY(-3px) rotate(1.5deg); }
}

@keyframes monitor-frazzled {
  0%, 100% { transform: translateX(-50%) translateX(-3px) rotate(-2deg); }
  50% { transform: translateX(-50%) translateX(3px) rotate(2deg); }
}

.monitor-glass {
  position: absolute;
  z-index: 3;
  inset: 0;
  background:
    linear-gradient(112deg, rgba(255, 255, 255, 0.07), transparent 24% 76%, rgba(255, 255, 255, 0.025)),
    repeating-linear-gradient(180deg, transparent 0 3px, rgba(0, 0, 0, 0.19) 3px 4px);
  box-shadow: inset 0 0 22px rgba(0, 0, 0, 0.6);
  pointer-events: none;
}

.monitor-glass::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: var(--monitor-static);
  background:
    repeating-linear-gradient(53deg, transparent 0 7px, rgba(240, 229, 187, 0.26) 7px 8px),
    repeating-linear-gradient(137deg, transparent 0 13px, rgba(255, 255, 255, 0.15) 13px 14px);
  animation: monitor-static 0.42s steps(2, end) infinite;
}

@keyframes monitor-static {
  0% { transform: translate(0, 0); }
  50% { transform: translate(-5px, 3px); }
  100% { transform: translate(4px, -2px); }
}

.monitor-readout {
  position: absolute;
  z-index: 5;
  right: 8px;
  bottom: 7px;
  left: 8px;
  overflow: hidden;
  padding: 4px 6px;
  color: #e6d598;
  background: rgba(12, 14, 9, 0.76);
  font-family: var(--mono);
  font-size: 0.56rem;
  line-height: 1.2;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.monitor-footer {
  min-height: 31px;
  padding: 7px 7px 0;
  color: #d1c8a8;
}

.monitor-footer span i {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 4px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 7px rgba(240, 184, 79, 0.64);
}

.monitor-footer button {
  padding: 3px 7px;
  border: 1px solid #24261f;
  color: #272820;
  background: #c8bd98;
  box-shadow: 1px 2px 0 #292b22;
  font-family: var(--mono);
  font-size: 0.56rem;
  font-weight: 800;
  text-transform: uppercase;
}

.monitor-footer button:active {
  box-shadow: none;
  transform: translate(1px, 2px);
}

.output-stack {
  display: grid;
  padding: 8px 10px;
  border: 3px solid #34362b;
  background: #4c4f3d;
  box-shadow: inset 0 0 0 2px rgba(236, 228, 199, 0.1), 2px 3px 0 #33342a;
}

.output-channel {
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr) 40px;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  border-bottom: 1px solid rgba(218, 208, 174, 0.2);
  font-family: var(--mono);
}

.output-channel:last-child {
  border-bottom: 0;
}

.output-channel strong {
  color: #d4cbae;
  font-size: 0.68rem;
  font-weight: 700;
}

.output-channel.active strong {
  color: var(--amber-hot);
  text-shadow: 0 0 6px rgba(240, 184, 79, 0.45);
}

.output-channel output {
  color: #bdb497;
  font-size: 0.67rem;
  text-align: right;
}

.output-meter {
  height: 12px;
  overflow: hidden;
  border: 1px solid #25261f;
  background:
    repeating-linear-gradient(90deg, transparent 0 8%, rgba(216, 208, 174, 0.13) 8% 10%),
    #2d2f25;
  box-shadow: inset 0 2px 3px rgba(0, 0, 0, 0.45);
}

.output-meter i {
  width: 0%;
  height: 100%;
  display: block;
  background:
    repeating-linear-gradient(90deg, #d39a42 0 7px, #4f432d 7px 9px);
  box-shadow: 0 0 8px rgba(240, 184, 79, 0.36);
}

.arena-wrap,
.adapter-block,
.event-log {
  margin-top: 22px;
}

.subhead-row {
  justify-content: space-between;
  margin-bottom: 7px;
  color: #565240;
  font-family: var(--condensed);
  font-size: 0.66rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.subhead-row button,
.api-panel button,
footer button {
  padding: 0;
  border: 0;
  color: #6f3025;
  background: transparent;
  font-size: 0.65rem;
  text-decoration: underline;
  text-underline-offset: 3px;
  box-shadow: none;
}

#arenaCanvas {
  width: 100%;
  height: 126px;
  display: block;
  border: 2px solid #5c5947;
  background:
    linear-gradient(rgba(87, 102, 88, 0.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(87, 102, 88, 0.12) 1px, transparent 1px),
    var(--paper);
  background-size: 16px 16px;
  box-shadow: inset 0 0 12px rgba(70, 62, 42, 0.15);
}

.adapter-button {
  width: 100%;
  min-height: 47px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border-bottom: 0;
  background: #d7cead;
  text-align: left;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.adapter-button:last-child {
  border-bottom: 2px solid #343329;
}

.adapter-button span,
.adapter-button b,
.adapter-button small {
  display: block;
}

.adapter-button b {
  font-size: 0.69rem;
}

.adapter-button small {
  margin-top: 2px;
  color: #67624f;
  font-family: var(--mono);
  font-size: 0.61rem;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
}

.adapter-button em {
  color: #713025;
  font-family: var(--mono);
  font-size: 0.62rem;
  font-style: normal;
}

.adapter-button.connected em,
.adapter-button--static em {
  color: #2d655f;
}

.adapter-button--static {
  cursor: default;
}

.event-log ol {
  height: 99px;
  margin: 0;
  padding: 10px 12px;
  overflow: hidden;
  border: 1px solid #77705a;
  list-style: none;
  color: #403c2e;
  background:
    repeating-linear-gradient(0deg, transparent 0 15px, rgba(91, 82, 58, 0.1) 15px 16px),
    var(--paper);
  box-shadow: inset 0 0 8px rgba(73, 64, 43, 0.12), 2px 2px 0 rgba(66, 62, 48, 0.3);
  font-family: var(--mono);
  font-size: 0.64rem;
}

.event-log li {
  display: grid;
  grid-template-columns: 48px 58px minmax(0, 1fr);
  gap: 6px;
  min-width: 0;
  margin-bottom: 3px;
  color: #6c6651;
}

.event-log li b {
  color: #8c3d2e;
  font-weight: 700;
}

.event-log li span:last-child {
  overflow: hidden;
  color: #37352a;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.program-panel {
  grid-column: 1 / -1;
  padding-bottom: 23px;
}

.program-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.program-workspace {
  display: grid;
  grid-template-columns: minmax(0, 2.1fr) minmax(290px, 0.9fr);
  gap: 10px;
  padding: 10px;
  border: 3px solid #303127;
  background: #3a3c2f;
  box-shadow: inset 0 0 0 2px rgba(232, 225, 197, 0.08);
}

.editor-shell,
.api-panel {
  min-width: 0;
}

.editor-shell {
  overflow: hidden;
  border: 6px solid #292a22;
  border-radius: 18px / 13px;
  background: var(--screen);
  box-shadow: inset 0 0 24px rgba(0, 0, 0, 0.8), 2px 3px 0 #24251e;
}

.editor-ruler,
.api-panel__head {
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  font-family: var(--mono);
  font-size: 0.68rem;
}

.editor-ruler {
  border-bottom: 1px solid rgba(240, 184, 79, 0.25);
  color: rgba(240, 184, 79, 0.72);
  background: #1e2016;
}

.program-status {
  color: var(--amber-hot);
  text-shadow: 0 0 5px rgba(240, 184, 79, 0.4);
}

.program-status i {
  width: 7px;
  height: 7px;
  display: inline-block;
  margin-right: 5px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 7px currentColor;
}

.program-status--bad {
  color: #e46d50;
}

#codeEditor {
  width: 100%;
  height: 300px;
  display: block;
  resize: vertical;
  padding: 17px 19px;
  border: 0;
  border-radius: 0;
  outline: 0;
  color: #f1c66d;
  background:
    repeating-linear-gradient(0deg, rgba(240, 184, 79, 0.02) 0 2px, transparent 2px 4px),
    radial-gradient(ellipse at center, rgba(240, 184, 79, 0.04), transparent 68%),
    var(--screen);
  caret-color: var(--amber-hot);
  font-family: var(--mono);
  font-size: 0.84rem;
  line-height: 1.62;
  text-shadow: 0 0 4px rgba(240, 184, 79, 0.24);
  tab-size: 2;
}

.api-panel {
  color: #2f2d22;
  background:
    repeating-linear-gradient(0deg, transparent 0 17px, rgba(94, 84, 58, 0.08) 17px 18px),
    var(--paper);
  box-shadow: 2px 3px 0 #292a22;
  transform: rotate(0.12deg);
}

.api-panel__head {
  margin-bottom: 3px;
  border-bottom: 2px solid #81785e;
  color: #4c4737;
  background: rgba(122, 112, 79, 0.08);
  font-family: var(--condensed);
  font-weight: 900;
  letter-spacing: 0.11em;
}

.api-panel dl {
  margin: 0;
  padding: 4px 12px;
}

.api-panel dl > div {
  display: grid;
  grid-template-columns: 146px minmax(0, 1fr);
  gap: 8px;
  padding: 7px 0;
  border-bottom: 1px solid rgba(102, 95, 72, 0.28);
}

.api-panel dt,
.api-panel dd {
  margin: 0;
  font-size: 0.72rem;
}

.api-panel dt {
  color: #863a2d;
  font-family: var(--mono);
  font-weight: 700;
}

.api-panel dd {
  color: #67614c;
}

.api-note {
  margin: 8px 12px 0;
  padding: 8px 9px;
  border-left: 4px solid #7f3c2e;
  background: rgba(107, 96, 66, 0.07);
}

.api-note b,
.api-note p {
  font-size: 0.68rem;
}

.api-note b {
  color: #5f5946;
  font-family: var(--condensed);
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.api-note p {
  margin: 3px 0 0;
  overflow-wrap: anywhere;
  color: #333127;
  font-family: var(--mono);
  line-height: 1.5;
}

.sandbox-note {
  margin: 12px 12px 3px;
  color: #77705a;
  font-size: 0.68rem;
  line-height: 1.45;
}

footer {
  width: min(1760px, calc(100% - 32px));
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin: 17px auto 0;
  padding: 14px 18px 31px;
  color: #b7b095;
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.045em;
}

footer button {
  color: #e2bd6d;
}

dialog {
  width: min(640px, calc(100vw - 32px));
  padding: 0;
  border: 5px solid #34352b;
  color: var(--ink);
  background: var(--enamel);
  box-shadow: 10px 15px 0 rgba(0, 0, 0, 0.45), inset 0 0 0 3px rgba(255, 255, 255, 0.2);
}

dialog::backdrop {
  background: rgba(25, 27, 21, 0.82);
  backdrop-filter: blur(3px);
}

dialog form {
  padding: 27px;
}

.dialog-stripe {
  height: 12px;
  margin: -27px -27px 23px;
  background: repeating-linear-gradient(135deg, #c7a64f 0 13px, #3b392e 13px 26px);
}

.dialog-heading {
  justify-content: space-between;
  margin-bottom: 19px;
  padding-bottom: 12px;
  border-bottom: 2px solid #77715a;
}

dialog p {
  color: #4e4a3b;
  font-size: 0.91rem;
  line-height: 1.65;
}

.disclosure-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 20px 0;
}

.disclosure-grid div {
  padding: 12px;
  border: 1px solid #7e765d;
  background: var(--paper);
}

.disclosure-grid b,
.disclosure-grid span {
  display: block;
}

.disclosure-grid b {
  margin-bottom: 5px;
  color: #80382b;
  font-family: var(--condensed);
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.disclosure-grid span {
  color: #615b48;
  font-size: 0.78rem;
}

.dialog-close {
  width: 100%;
}

.toast {
  position: fixed;
  z-index: 100;
  right: 22px;
  bottom: 22px;
  max-width: min(400px, calc(100vw - 44px));
  padding: 12px 14px;
  border: 2px solid #332f24;
  border-left: 7px solid var(--rust);
  color: #302d23;
  background: var(--paper);
  box-shadow: 5px 6px 0 rgba(23, 24, 18, 0.52);
  font-family: var(--mono);
  font-size: 0.75rem;
  opacity: 0;
  transform: translateY(12px) rotate(-0.25deg);
  transition: opacity 160ms ease, transform 160ms ease;
  pointer-events: none;
}

.toast.visible {
  opacity: 1;
  transform: translateY(0) rotate(-0.25deg);
}

@media (max-width: 1260px) {
  .topbar {
    grid-template-columns: 1fr minmax(380px, 0.9fr);
  }

  .specimen-meta {
    display: none;
  }

  .lab-grid {
    grid-template-columns: minmax(240px, 0.7fr) minmax(510px, 1.55fr);
  }

  .output-panel {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: minmax(260px, 1fr) minmax(260px, 1fr) minmax(250px, 0.9fr);
    gap: 18px;
  }

  .output-panel .panel-heading {
    grid-column: 1 / -1;
    margin-bottom: 0;
  }

  .output-panel .specimen-monitor {
    grid-column: 1;
    margin-bottom: 0;
  }

  .output-panel .output-stack {
    grid-column: 2;
  }

  .output-panel .arena-wrap {
    grid-column: 3;
  }

  .output-panel .adapter-block {
    grid-column: 1 / span 2;
  }

  .output-panel .event-log {
    grid-column: 3;
  }

  .output-panel .arena-wrap,
  .output-panel .adapter-block,
  .output-panel .event-log {
    margin-top: 0;
  }

  .event-log ol {
    height: 126px;
  }

  .truth-strip::before {
    display: none;
  }
}

@media (max-width: 900px) {
  .topbar {
    width: calc(100% - 20px);
    grid-template-columns: 1fr;
    gap: 15px;
    margin-top: 10px;
  }

  .brand-mark {
    width: 62px;
    height: 62px;
  }

  .run-cluster {
    justify-content: stretch;
  }

  .live-readout {
    flex: 1;
  }

  .truth-strip {
    width: calc(100% - 38px);
    flex-wrap: wrap;
    gap: 5px 14px;
  }

  .truth-strip__note {
    flex-basis: 100%;
    order: 3;
  }

  .lab-grid {
    display: block;
    width: 100%;
    padding: 20px 10px 12px;
  }

  .panel {
    margin-bottom: 15px;
  }

  .sensor-stack {
    grid-template-columns: 1fr 1fr;
  }

  .panel-heading--neural,
  .program-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .core-actions,
  .program-actions {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .brain-stage {
    height: 470px;
  }

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

  .output-panel {
    display: block;
  }

  .output-panel .panel-heading {
    margin-bottom: 21px;
  }

  .output-panel .specimen-monitor {
    margin-bottom: 22px;
  }

  .output-panel .arena-wrap,
  .output-panel .adapter-block,
  .output-panel .event-log {
    margin-top: 22px;
  }

  .program-workspace {
    grid-template-columns: 1fr;
  }

  .api-panel dl {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 14px;
  }
}

@media (max-width: 590px) {
  .topbar {
    padding: 16px 13px;
  }

  h1 {
    font-size: 2rem;
  }

  .manufacturer {
    font-size: 0.58rem;
  }

  .run-cluster {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .live-readout {
    grid-column: 1 / -1;
    width: 100%;
  }

  .truth-strip {
    padding: 9px 11px;
  }

  .panel {
    padding: 17px 12px;
  }

  .sensor-stack {
    grid-template-columns: 1fr;
  }

  .core-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .speed-control {
    grid-column: 1 / -1;
  }

  .brain-stage {
    height: 400px;
    min-height: 400px;
    border-width: 7px;
    border-radius: 24px / 18px;
  }

  .activity-key {
    display: none;
  }

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

  .region-button:nth-child(3) {
    border-right: 0;
  }

  .region-button:nth-child(-n + 3) {
    border-bottom: 1px solid #292a22;
  }

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

  .select-control--compact {
    width: 100%;
  }

  .program-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .program-actions .select-control {
    grid-column: 1 / -1;
  }

  .api-panel dl {
    display: block;
  }

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

  footer {
    width: calc(100% - 20px);
    flex-direction: column;
    gap: 8px;
  }
}

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