:root {
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    sans-serif;
  color: #dce4e1;
  background: #101516;
  font-synthesis: none;
  color-scheme: dark;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select {
  font: inherit;
}
button,
a,
input,
select {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
}
button:disabled {
  opacity: 0.45;
  cursor: wait;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 2px solid #b9e88d;
  outline-offset: 5px;
}
header {
  height: 78px;
  display: flex;
  align-items: center;
  padding: 0 36px;
  border-bottom: 1px solid #29302f;
  gap: 35px;
}
.brand {
  text-decoration: none;
  color: #dce4e1;
  letter-spacing: 1.6px;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 7px;
}
.brand strong {
  color: #bce99a;
  font-weight: 500;
}
.brand-icon {
  font-size: 35px;
  color: #bce99a;
  margin-right: 9px;
}
.header-note {
  font-size: 12px;
  color: #778681;
}
#engine-status {
  margin-left: auto;
  font-size: 11px;
  color: #a7b5af;
  display: flex;
  align-items: center;
  gap: 8px;
}
i,
.tiny-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  background: #bee99d;
  border-radius: 50%;
}
.layout {
  display: grid;
  grid-template-columns: 272px minmax(0, 1fr);
  min-height: calc(100vh - 78px);
}
aside {
  border-right: 1px solid #29302f;
  padding: 35px 22px;
  display: flex;
  flex-direction: column;
}
.eyebrow,
.nav-label,
.version,
.foundation,
.panel-title > span,
footer,
.view-top,
.view-bottom,
.legend,
.range-ends {
  font-size: 10px;
  letter-spacing: 1.3px;
}
.eyebrow {
  color: #8b9e93;
}
h1 {
  font-weight: 450;
  font-size: 32px;
  line-height: 1.18;
  letter-spacing: -1.2px;
  margin: 20px 0 15px;
}
.intro {
  color: #86938d;
  font-size: 12px;
  line-height: 1.9;
}
.nav-label {
  display: flex;
  justify-content: space-between;
  margin: 37px 10px 16px;
  color: #778980;
}
.nav-label span {
  color: #bdcfbf;
}
nav {
  display: grid;
  gap: 7px;
}
nav button {
  display: flex;
  align-items: center;
  gap: 13px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: #b1bdb6;
  text-align: left;
  padding: 15px 12px;
  font-size: 12px;
}
nav button:hover {
  background: #1a2420;
}
nav button.selected {
  background: #232e25;
  border-color: #3a4937;
  color: #d6f4bd;
}
nav small {
  display: block;
  color: #839088;
  font-size: 10px;
  margin-top: 6px;
}
.nav-icon {
  font-size: 25px;
  width: 25px;
}
.arrow {
  margin-left: auto;
  color: #a7bf97;
}
.foundation {
  margin-top: auto;
  padding: 48px 8px 0;
  color: #b6c9ae;
  line-height: 1.8;
}
.foundation p {
  font-size: 12px;
  color: #7e8f85;
  letter-spacing: 0;
  line-height: 1.8;
}
.tiny-dot {
  margin-right: 7px;
}
.version {
  display: block;
  border-top: 1px solid #2a342e;
  padding-top: 20px;
  margin-top: 26px;
  font-size: 8px;
  color: #819180;
}
.version b {
  float: right;
}
main {
  padding: 32px 36px 18px;
  max-width: 1600px;
  width: 100%;
  margin: auto;
}
.main-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
}
h2 {
  font-weight: 450;
  font-size: 29px;
  letter-spacing: -0.9px;
  margin: 9px 0;
}
#subtitle {
  font-size: 12px;
  color: #8b9a92;
  margin: 0;
}
.outline,
.text-button,
.primary {
  padding: 10px 15px;
  border-radius: 5px;
  font-size: 11px;
  white-space: nowrap;
}
.outline {
  background: transparent;
  border: 1px solid #3c4740;
  color: #c2cfc5;
}
.outline:hover {
  background: #253029;
}
.text-button {
  border: 0;
  background: transparent;
  color: #8c9f93;
}
.primary {
  background: #c3e9a4;
  border: 1px solid #c3e9a4;
  color: #1c2c1b;
  min-width: 91px;
  font-weight: 650;
}
.viewport {
  height: 420px;
  position: relative;
  overflow: hidden;
  border: 1px solid #36433d;
  border-radius: 8px;
  background: #101d1c;
}
canvas {
  display: block;
  width: 100%;
  height: 100%;
}
.view-top,
.view-bottom {
  position: absolute;
  left: 22px;
  right: 22px;
  display: flex;
  justify-content: space-between;
  color: #92a9a0;
  pointer-events: none;
  font-size: 9px;
}
.view-top {
  top: 20px;
}
.view-top > span:first-child {
  color: #c7dfbd;
}
.live-dot {
  margin-right: 7px;
}
.view-bottom {
  bottom: 19px;
  letter-spacing: 0.4px;
}
.axis {
  color: #b1c8b5;
}
.legend {
  position: absolute;
  left: 22px;
  bottom: 58px;
  font-size: 8px;
  color: #94aaa2;
}
.legend div {
  width: 100px;
  height: 4px;
  background: linear-gradient(90deg, #194e58, #4faaa0, #d4f1be);
  margin: 8px 0;
}
.transport {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 15px 0;
  border-bottom: 1px solid #2c3630;
}
.transport-buttons {
  display: flex;
  gap: 9px;
}
.clock {
  margin-left: auto;
  font-size: 11px;
  color: #819386;
}
.clock strong {
  font-size: 15px;
  color: #cad9c9;
  font-weight: 400;
  font-variant-numeric: tabular-nums;
  margin: 0 5px;
}
.speed-label {
  font-size: 10px;
  color: #879b8c;
  display: flex;
  gap: 10px;
  align-items: center;
}
select {
  background: #1c2820;
  border: 1px solid #36483a;
  border-radius: 4px;
  padding: 5px 7px;
  color: #d0e4c9;
  font-size: 10px;
}
.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 23px 0;
}
.metrics > div {
  border-left: 1px solid #303c33;
  padding: 0 20px;
}
.metrics > div:first-child {
  border: 0;
  padding-left: 0;
}
.metrics span {
  display: block;
  font-size: 10px;
  color: #829689;
  margin-bottom: 11px;
}
.metrics strong {
  font:
    400 21px ui-monospace,
    monospace;
  color: #d1e3c9;
  letter-spacing: -0.6px;
}
.lower {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 15px;
}
.panel {
  padding: 20px;
  border: 1px solid #303b32;
  border-radius: 7px;
  background: #151d18;
}
.panel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
h3 {
  font-size: 12px;
  font-weight: 500;
  margin: 0;
}
.panel-title > span {
  color: #7c9181;
  font-size: 7px;
  letter-spacing: 1px;
}
.badge {
  color: #b1cc97 !important;
  border: 1px solid #394a34;
  padding: 4px 6px;
  border-radius: 3px;
}
.parameter-label {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  margin-top: 22px;
  color: #9eb39f;
}
.parameter-label output {
  color: #cfebba;
}
input[type="range"] {
  width: 100%;
  accent-color: #b9e38f;
  height: 15px;
  margin: 16px 0 7px;
}
.range-ends {
  display: flex;
  justify-content: space-between;
  color: #7f9182;
  font-size: 8px;
}
.file-label {
  display: inline-block;
  margin-top: 20px;
  color: #b1c1ae;
  font-size: 10px;
  cursor: pointer;
}
.file-label:hover {
  text-decoration: underline;
}
.model-panel p {
  font-size: 11px;
  color: #bdcbbd;
  line-height: 1.7;
  margin-bottom: 5px;
}
.model-panel .limits {
  color: #819384;
  font-size: 10px;
  margin-top: 9px;
}
footer {
  display: flex;
  justify-content: space-between;
  color: #62796a;
  letter-spacing: 0.3px;
  font-size: 8px;
  margin-top: 23px;
  gap: 20px;
}
#error {
  padding: 12px;
  background: #512c27;
  color: #ffd1c6;
  margin-bottom: 15px;
  font-size: 12px;
}
@media (min-width: 1600px) {
  .viewport {
    height: 510px;
  }
}
@media (max-width: 1100px) {
  header {
    padding: 0 22px;
  }
  .header-note {
    display: none;
  }
  .layout {
    grid-template-columns: 220px 1fr;
  }
  aside {
    padding: 28px 15px;
  }
  main {
    padding: 28px 22px;
  }
  .viewport {
    height: 360px;
  }
  .lower {
    grid-template-columns: 1fr;
  }
  .metrics strong {
    font-size: 17px;
  }
  .metrics > div {
    padding: 0 12px;
  }
  .panel-title > span {
    font-size: 7px;
  }
  .speed-label {
    display: none;
  }
}
@media (max-width: 720px) {
  header {
    height: 65px;
    padding: 0 16px;
  }
  .brand {
    font-size: 10px;
    letter-spacing: 1px;
  }
  #engine-status {
    font-size: 9px;
  }
  .layout {
    display: block;
  }
  aside {
    padding: 18px 16px;
    border-right: 0;
    border-bottom: 1px solid #29302f;
  }
  aside > .eyebrow,
  h1,
  .intro,
  .nav-label,
  .foundation {
    display: none;
  }
  nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
  }
  nav button {
    padding: 9px;
    font-size: 10px;
    gap: 8px;
  }
  nav small {
    font-size: 8px;
  }
  .nav-icon {
    font-size: 19px;
    width: 19px;
  }
  .arrow {
    display: none;
  }
  main {
    padding: 23px 16px;
  }
  .main-heading {
    gap: 10px;
  }
  h2 {
    font-size: 23px;
  }
  .main-heading .outline {
    padding: 9px;
    font-size: 9px;
  }
  .viewport {
    height: 340px;
  }
  .view-top,
  .view-bottom {
    left: 12px;
    right: 12px;
    font-size: 7px;
  }
  .transport {
    gap: 8px;
  }
  .transport-buttons {
    gap: 4px;
  }
  .outline,
  .primary,
  .text-button {
    padding: 9px 10px;
    font-size: 10px;
  }
  .primary {
    min-width: 75px;
  }
  .clock strong {
    font-size: 12px;
  }
  .metrics {
    grid-template-columns: 1fr 1fr;
    row-gap: 24px;
  }
  .metrics > div:nth-child(3) {
    border: 0;
    padding-left: 0;
  }
  footer > span:last-child {
    display: none;
  }
  .panel {
    padding: 16px;
  }
}

.view-controls {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
}
.view-controls label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: #9cb39f;
}
.view-controls select {
  font-size: 11px;
  padding: 8px;
}
.view-controls input[type="number"] {
  width: 65px;
  padding: 7px;
  background: #18251d;
  border: 1px solid #3b5140;
  border-radius: 4px;
  color: #d2e9be;
}
.view-controls .outline {
  padding: 8px 10px;
}
.spacetime-controls {
  display: grid;
  grid-template-columns: auto minmax(70px, 1fr) auto minmax(70px, 1fr);
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  padding: 12px 16px;
  background: #1c2322;
  border: 1px solid #3a4440;
  border-radius: 6px;
}
.spacetime-controls label {
  font-size: 10px;
  color: #afc6b5;
}
.spacetime-controls output {
  color: #d6b2e6;
  margin-left: 7px;
}
.spacetime-controls input[type="range"] {
  margin: 0;
}
.spacetime-controls p {
  grid-column: 1/-1;
  font-size: 10px;
  color: #93a999;
  margin: 0;
}
.camera-help {
  font-size: 10px;
  color: #9caf9f;
  line-height: 1.8;
  margin: 9px 0;
}
.history-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 7px 0;
}
.history-controls label,
.history-controls output {
  font-size: 10px;
  color: #a3bba3;
  white-space: nowrap;
}
.history-controls input[type="range"] {
  flex: 1;
  min-width: 40px;
  width: auto;
  margin: 0;
}
.history-controls .outline {
  padding: 6px 9px;
}
.legend {
  pointer-events: none;
}
canvas {
  touch-action: none;
  cursor: grab;
}
canvas:active {
  cursor: grabbing;
}
canvas:focus-visible {
  outline: 2px solid #b9e88d;
  outline-offset: -3px;
}
[hidden] {
  display: none !important;
}
@media (max-width: 720px) {
  .view-controls {
    gap: 8px;
  }
  .view-controls label {
    font-size: 10px;
  }
  .view-controls select {
    max-width: 145px;
  }
  .spacetime-controls {
    grid-template-columns: auto 1fr;
    gap: 10px;
  }
  .history-controls {
    flex-wrap: wrap;
  }
  .history-controls input {
    flex-basis: 40%;
  }
  .history-controls output {
    font-size: 9px;
  }
  .view-bottom {
    gap: 12px;
  }
  .view-bottom #view-caption {
    max-width: 80%;
    line-height: 1.5;
  }
  .axis {
    white-space: nowrap;
  }
}

.plasma-controls {
  border: 1px solid #31534c;
  border-radius: 6px;
  padding: 13px 16px;
  margin-bottom: 12px;
  background: #13231f;
}
.plasma-controls label,
.forecast-controls label {
  font-size: 11px;
  color: #b4cdbb;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-right: 12px;
}
.plasma-controls p {
  font-size: 11px;
  line-height: 1.8;
  color: #a3bbb1;
  margin: 9px 0 0;
}
.plasma-controls select {
  padding: 7px;
}
.plasma-controls input[type="checkbox"] {
  accent-color: #badf94;
}
#torus-options {
  margin-top: 10px;
}
.electron-key {
  color: #59dcff;
}
.ion-key {
  color: #ffa34d;
}
.forecast-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 12px 0;
}
.forecast-controls input {
  width: 60px;
  background: #18251d;
  color: #dfebcb;
  border: 1px solid #3b5140;
  padding: 6px;
  border-radius: 4px;
}
#forecast-status {
  color: #c3ac8b;
  font-size: 10px;
}
.forecast-controls .outline,
.forecast-controls .text-button {
  padding: 8px 10px;
}
#history-time[data-future="true"] {
  color: #ffab67;
}

.apparatus-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin: 0 0 12px;
  font-size: 11px;
  color: #acbec3;
}
.apparatus-controls label {
  display: flex;
  gap: 6px;
  align-items: center;
}
.apparatus-controls input {
  accent-color: #b9c6fa;
}
.apparatus-panel {
  margin-top: 14px;
  border: 1px solid #3b454c;
  border-radius: 8px;
  background: #151c21;
  padding: 18px 20px;
}
.apparatus-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
#discharge-status {
  font-size: 10px;
  letter-spacing: 1px;
  color: #d1ac80;
}
#discharge-status[data-on="true"] {
  color: #c1b5f9;
}
.power-flow {
  display: flex;
  align-items: center;
  gap: 28px;
  margin: 15px 0 10px;
}
.power-flow div {
  flex: 1;
}
.power-flow span {
  display: block;
  color: #94a6b2;
  font-size: 10px;
}
.power-flow strong {
  display: block;
  font:
    400 18px ui-monospace,
    monospace;
  margin-top: 6px;
  color: #d9e5eb;
}
.power-flow .plasma-key {
  color: #b4a2ff;
}
.power-flow .copper-key {
  color: #dfa16e;
}
.power-flow .reflected-key {
  color: #8b9caf;
}
.power-bar {
  height: 4px;
  background: #27313b;
  display: flex;
  border-radius: 3px;
  overflow: hidden;
}
#bar-plasma {
  background: #ac92f4;
}
#bar-copper {
  background: #d3986a;
}
#bar-reflected {
  background: #65798e;
}
.component-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 20px;
  border-bottom: 1px solid #303d47;
  padding-bottom: 12px;
}
.component-tabs button {
  background: transparent;
  border: 1px solid #35424c;
  border-radius: 5px;
  color: #a9bac4;
  padding: 8px 11px;
  font-size: 10px;
}
.component-tabs button.active {
  color: #e4dcff;
  border-color: #8b7ca7;
  background: #302b40;
}
.component-inspector {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 28px;
  padding-top: 18px;
}
.component-inspector h3 {
  color: #e2deed;
  font-size: 13px;
}
.component-inspector p {
  color: #a3b5c0;
  font-size: 11px;
  line-height: 1.8;
}
.component-inspector .model-note {
  font-size: 10px;
  color: #8195a3;
}
.component-inspector dl {
  margin: 0;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 9px 16px;
  align-content: start;
  font-size: 10px;
}
.component-inspector dt {
  color: #93a8b5;
}
.component-inspector dd {
  margin: 0;
  font-family: ui-monospace, monospace;
  color: #d6e3e9;
}
.apparatus-settings {
  margin-top: 16px;
  border-top: 1px solid #303d47;
  padding-top: 14px;
  font-size: 11px;
  color: #becbd3;
}
.apparatus-settings summary {
  cursor: pointer;
}
.apparatus-settings summary span {
  color: #788f9c;
  font-size: 9px;
  margin-left: 12px;
}
.apparatus-settings form {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}
.apparatus-settings label {
  font-size: 10px;
  color: #9fb2be;
}
.apparatus-settings input {
  display: block;
  width: 100%;
  margin-top: 7px;
  border: 1px solid #3d505c;
  border-radius: 4px;
  background: #202c34;
  color: #e0e6ee;
  padding: 8px;
}
.apparatus-settings button {
  grid-column: 1/-1;
  justify-self: start;
}
.chamber-active .viewport {
  height: 540px;
  background: #111a20;
}
@media (max-width: 1100px) {
  .component-inspector {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .power-flow {
    gap: 14px;
  }
  .chamber-active .viewport {
    height: 460px;
  }
}
@media (max-width: 720px) {
  .chamber-active .viewport {
    height: 380px;
  }
  .apparatus-panel {
    padding: 14px;
  }
  .apparatus-controls {
    gap: 10px;
    font-size: 10px;
  }
  .power-flow {
    gap: 10px;
    flex-wrap: wrap;
  }
  .power-flow strong {
    font-size: 14px;
  }
  .power-flow .flow-arrow {
    display: none;
  }
  .power-flow span {
    font-size: 9px;
  }
  .apparatus-settings form {
    grid-template-columns: 1fr 1fr;
  }
  .component-inspector dl {
    font-size: 10px;
    gap: 8px;
  }
  .component-tabs button {
    padding: 7px;
  }
  .apparatus-settings summary span {
    display: block;
    margin: 6px 0 0 14px;
  }
}
#scene-labels {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
#scene-labels button {
  position: absolute;
  pointer-events: auto;
  background: #101b23dd;
  border: 1px solid #5d738280;
  border-radius: 4px;
  padding: 6px 8px;
  color: #c6d9e4;
  font:
    10px ui-monospace,
    monospace;
  white-space: nowrap;
  box-shadow: 0 2px 12px #08111766;
}
#scene-labels button:hover {
  border-color: #b0a2d8;
  color: #e7dfff;
  background: #252336;
}
@media (max-width: 720px) {
  #scene-labels button {
    font-size: 8px;
    padding: 4px;
  }
}
.solver-panel {
  margin-bottom: 18px;
  padding: 16px 18px;
  background: #182125;
  border: 1px solid #35474c;
  border-radius: 7px;
}
.solver-heading {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  font-size: 12px;
}
.solver-heading span {
  font-size: 10px;
  color: #8fa6b1;
}
.solver-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  margin-top: 14px;
}
.solver-controls label {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 11px;
  color: #b8c9d0;
}
.solver-panel p,
.solver-panel summary {
  font-size: 11px;
  line-height: 1.7;
  color: #a1b7bf;
}
.solver-panel summary {
  cursor: pointer;
}
.compute-readout {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  margin: 10px 0 14px;
  font:
    10px ui-monospace,
    monospace;
  color: #b5d5be;
}
.catalog-scroll {
  overflow: auto;
  max-height: 340px;
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 10px;
  text-align: left;
}
th {
  font-weight: 500;
  color: #d3e2dc;
}
th,
td {
  padding: 10px;
  border-bottom: 1px solid #34434a;
  line-height: 1.6;
  vertical-align: top;
}
td {
  color: #a8bcc5;
}
#verification-result {
  margin: 12px 0;
  padding: 10px;
  background: #12221d;
  border-radius: 5px;
  overflow: auto;
}
.vortex-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
  margin-bottom: 14px;
  font-size: 10px;
  color: #a9c5ca;
}
.vortex-presets button {
  padding: 7px 10px;
  background: #233b43;
  border: 1px solid #3d616a;
  border-radius: 5px;
  color: #bfe6ef;
  font-size: 10px;
}
.vortex-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px 18px;
  padding: 12px 0 20px;
  border-bottom: 1px solid #2c4742;
  margin-bottom: 14px;
}
.vortex-form label {
  display: grid;
  margin: 0;
  grid-template-columns: 1fr auto;
  gap: 5px;
}
.vortex-form input {
  grid-column: 1;
  margin: 3px 0;
}
.vortex-form output {
  grid-column: 2;
  grid-row: 2;
  min-width: 30px;
  text-align: right;
  font:
    11px ui-monospace,
    monospace;
  color: #e2eaba;
}
.vortex-form > span {
  grid-column: 2/-1;
  font-size: 10px;
  color: #91aca4;
  align-self: center;
}
.vortex-form select {
  grid-column: 1/-1;
}
.water-actions {
  padding: 14px 16px;
  margin-bottom: 12px;
  background: #152831;
  border: 1px solid #375563;
  border-radius: 7px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}
.water-actions > div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  width: 100%;
}
.water-actions label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: #afd0dc;
}
.water-actions input {
  width: 110px;
  margin: 0;
}
.water-actions p {
  width: 100%;
  margin: 0;
  font-size: 10px;
  line-height: 1.6;
  color: #9bb6c1;
}
.water-actions #water-health {
  color: #b8dccc;
}
@media (max-width: 720px) {
  .solver-panel {
    padding: 12px;
  }
  .solver-controls label {
    flex-wrap: wrap;
    max-width: 100%;
  }
  .solver-controls select {
    max-width: 100%;
    font-size: 10px;
  }
  .vortex-form {
    grid-template-columns: 1fr 1fr;
  }
  .vortex-form > span {
    grid-column: 1/-1;
  }
  .solver-heading span {
    line-height: 1.6;
  }
  .compute-readout {
    line-height: 1.7;
  }
  .water-actions {
    padding: 12px;
  }
  .water-actions input {
    width: 100px;
  }
}

#bar-limited {
  background: #ba9054;
}
.operating-controls {
  border-top: 1px solid #303d47;
  margin-top: 18px;
  padding-top: 16px;
}
.operating-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.operating-heading h3 {
  margin: 0;
  font-size: 14px;
  color: #dbe4ed;
}
.operating-note {
  font-size: 11px;
  line-height: 1.6;
  color: #9bb0be;
}
#operating-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px 22px;
  margin: 18px 0;
}
#operating-form label {
  min-width: 0;
  font-size: 11px;
  color: #c4d1dd;
}
#operating-form output {
  display: block;
  margin-top: 5px;
  color: #cbb9ff;
  font-family: ui-monospace, monospace;
}
#operating-form input {
  display: block;
  width: 100%;
  margin-top: 9px;
  accent-color: #b9a4f5;
}
#operating-form input[type="number"] {
  padding: 8px;
  background: #202c34;
  border: 1px solid #3d505c;
  color: #e0e6ee;
  border-radius: 4px;
}
#operating-form small {
  display: block;
  color: #8fa6b5;
  font-size: 10px;
  line-height: 1.5;
  margin-top: 6px;
}
.operating-readings {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  background: #10191f;
  padding: 14px;
  border-radius: 5px;
}
.operating-readings dt {
  font-size: 10px;
  color: #9bb0be;
}
.operating-readings dd {
  font:
    12px ui-monospace,
    monospace;
  margin: 6px 0 0;
  color: #dfd6f9;
}
@media (max-width: 720px) {
  #operating-form {
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }
  .operating-readings {
    grid-template-columns: 1fr;
  }
  .operating-heading {
    align-items: flex-start;
    flex-direction: column;
  }
}

.rf-diagnostics {
  border-top: 1px solid #303d47;
  margin-top: 18px;
  padding-top: 16px;
}
#rf-summary,
#rf-assessment {
  font-size: 12px;
  line-height: 1.6;
  color: #c7d6e1;
}
.rf-results-layout {
  display: grid;
  grid-template-columns: minmax(180px, 320px) minmax(0, 1fr);
  gap: 20px;
}
.rf-results-layout figure {
  margin: 0;
}
#rf-map {
  width: 100%;
  height: auto;
  display: block;
}
.rf-results-layout figcaption {
  font-size: 10px;
  line-height: 1.5;
  color: #9bb0be;
}
.rf-table-scroll {
  overflow-x: auto;
}
.rf-diagnostics table {
  width: 100%;
  border-collapse: collapse;
  font-size: 10px;
  text-align: left;
}
.rf-diagnostics th,
.rf-diagnostics td {
  padding: 9px 5px;
  border-bottom: 1px solid #303d47;
  white-space: nowrap;
}
.rf-diagnostics th {
  color: #a9bcca;
  font-weight: 500;
}
.rf-overlay-label {
  font-size: 11px;
  color: #c7d6e1;
}
@media (max-width: 1000px) {
  .rf-results-layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .rf-results-layout figure {
    max-width: 360px;
  }
}

.rf-results-layout > * {
  min-width: 0;
}

#rf-coupling-status {
  font-size: 11px;
  line-height: 1.6;
  color: #9bb0be;
}
#rf-coupling-status[data-mismatch="true"] {
  border-left: 2px solid #d6a76c;
  padding: 8px 12px;
  color: #e5bf8c;
  background: #28251f;
}

.planet-nav {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 14px;
  color: var(--text, #dae4de);
  text-decoration: none;
  font-size: 13px;
  border: 1px solid #34433b;
  border-radius: 6px;
  margin-top: 8px;
}
.planet-nav small {
  display: block;
  font-size: 10px;
  color: #95a89d;
  margin-top: 5px;
}
.planet-nav > span:last-child {
  margin-left: auto;
}
.planet-nav:hover {
  background: #203129;
}

.apparatus-controls .optics-note {
  flex-basis: 100%;
  margin: 0;
  max-width: 100ch;
  line-height: 1.5;
  color: #94a8b4;
}
#emission-exposure {
  width: 110px;
}
#emission-exposure-value {
  min-width: 48px;
  font-variant-numeric: tabular-nums;
}

.lamp-controls {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin: 14px 0;
}
.lamp-controls label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
}
.lamp-controls output {
  color: var(--mint, #87d6bd);
  font-variant-numeric: tabular-nums;
}
.lamp-controls input {
  width: 100%;
}
#bar-wireless { background: #e7b775; }

.lensing-panel {
  margin: 20px 0;
  border: 1px solid #34494b;
  border-radius: 12px;
  background: linear-gradient(145deg, #162329, #10191f);
  overflow: hidden;
}
.lensing-panel[hidden] { display: none; }
.lensing-heading { display: flex; justify-content: space-between; gap: 20px; padding: 26px 26px 8px; }
.lensing-heading h3 { font-size: clamp(21px, 2.5vw, 30px); margin: 10px 0; font-weight: 500; color: #e8efea; }
.lensing-heading p, .lens-notes p, .lens-orbit-heading p { color: #a4b5bf; font-size: 13px; line-height: 1.65; }
.lensing-badge { align-self: flex-start; flex-shrink: 0; font-size: 10px; letter-spacing: 1px; border: 1px solid #4c6863; color: #a9d7c9; padding: 8px 10px; border-radius: 20px; }
.lensing-images { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; padding: 12px 26px; }
.lensing-images figure { margin: 0; min-width: 0; }
.lensing-images figcaption { display: flex; flex-direction: column; gap: 6px; font-size: 12px; margin-bottom: 12px; color: #d4dfdf; }
.lensing-images figcaption span { font-size: 11px; color: #8ca3b1; }
.lensing-images canvas { display: block; width: 100%; height: auto; aspect-ratio: 1; border: 1px solid #33434d; border-radius: 8px; }
#lens-source { cursor: crosshair; touch-action: none; }
#lens-source:focus-visible { outline: 2px solid #a9d7c9; outline-offset: 3px; }
.lensing-images p { font-size: 10px; color: #8ca3b1; line-height: 1.5; }
.lens-readouts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; padding: 18px 26px; border-top: 1px solid #2e4147; border-bottom: 1px solid #2e4147; }
.lens-readouts span { display: block; font-size: 10px; color: #91a9b6; margin-bottom: 8px; }
.lens-readouts strong { font-size: clamp(14px, 1.6vw, 21px); font-weight: 500; color: #c7e8d9; font-variant-numeric: tabular-nums; }
.lens-explanation { margin: 18px 26px; color: #dbdfd5; font-size: 13px; line-height: 1.65; }
.lens-controls { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 28px; padding: 8px 26px 24px; }
.lens-controls label { display: grid; grid-template-columns: 1fr auto; gap: 10px; font-size: 11px; color: #b6c5cc; }
.lens-controls input { width: 100%; grid-column: 1 / -1; accent-color: #a2d9be; }
.lens-controls output { color: #e6c68c; font-variant-numeric: tabular-nums; }
.lens-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 0 26px 24px; font-size: 11px; color: #a0b3be; }
.lens-actions button { font-size: 11px; }
.lens-actions label { display: flex; align-items: center; gap: 6px; }
#lens-time { flex-basis: 100%; font-variant-numeric: tabular-nums; }
.lens-notes { padding: 18px 26px; border-top: 1px solid #2e4147; font-size: 12px; color: #b3c5cb; }
.lens-notes a { color: #a9d7c9; }
.lens-orbit-heading { padding: 24px 26px 12px; background: #19272b; }
@media (max-width: 650px) {
  .lensing-heading { flex-direction: column; padding: 20px 16px 8px; gap: 4px; }
  .lensing-images { grid-template-columns: 1fr; padding: 16px; }
  .lens-readouts { grid-template-columns: 1fr; padding: 18px 16px; }
  .lens-readouts > div { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
  .lens-readouts span { margin: 0; }
  .lens-controls { grid-template-columns: 1fr; padding: 8px 16px 24px; }
  .lens-explanation { margin: 18px 16px; }
  .lens-actions, .lens-notes, .lens-orbit-heading { padding-left: 16px; padding-right: 16px; }
}

/* A movable inspection camera and the fixed observer's sky share one optical state. */
.lens-camera-toolbar { display: flex; flex-wrap: wrap; gap: 8px; padding: 10px 26px 20px; }
.lens-camera-toolbar button { font-size: 11px; padding: 9px 12px; }
.lens-camera-toolbar button[aria-pressed="true"] { background: #34544a; border-color: #9bd3b8; }
.lens-dynamic-layout { display: grid; grid-template-columns: minmax(0, 1.8fr) minmax(230px, 1fr); gap: 18px; padding: 0 26px; }
.lens-dynamic-layout figure, .lens-source-layout figure { margin: 0; min-width: 0; }
.lens-dynamic-layout figcaption, .lens-source-layout figcaption { display: flex; flex-direction: column; gap: 6px; color: #d4dfdf; font-size: 12px; margin-bottom: 12px; }
.lens-dynamic-layout figcaption span, .lens-source-layout figcaption span { color: #8ca3b1; font-size: 11px; }
.lens-dynamic-layout p, .lens-source-layout figure p { color: #8ca3b1; font-size: 10px; line-height: 1.6; }
.lens-scene-wrap { height: 440px; position: relative; border: 1px solid #354e5c; border-radius: 8px; overflow: hidden; background: #07111b; }
#lens-scene { width: 100%; height: 100%; display: block; touch-action: none; }
.lens-scene-hint { position: absolute; bottom: 15px; left: 16px; font-size: 9px; letter-spacing: 1.5px; color: #7994a9; pointer-events: none; }
.lens-scene-legend { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-top: 12px; font-size: 10px; color: #b1c4cc; }
.lens-scene-legend label { display: flex; align-items: center; gap: 5px; }
.lens-gold { color: #ffce82; } .lens-blue { color: #84cfff; }
#lens-image, #lens-source { width: 100%; height: auto; aspect-ratio: 1; border: 1px solid #33434d; border-radius: 8px; }
#lens-image { cursor: default; touch-action: auto; }
.lens-source-layout { display: grid; grid-template-columns: 180px 1fr; gap: 24px; margin: 20px 26px; padding-top: 20px; border-top: 1px solid #2e4147; }
.lens-camera-explainer { align-self: center; max-width: 70ch; }
.lens-camera-explainer h4 { color: #e0eadf; margin: 0 0 12px; font-size: 18px; font-weight: 500; }
.lens-camera-explainer p { color: #a5bac6; font-size: 12px; line-height: 1.7; margin: 10px 0; }
@media (max-width: 1000px) {
  .lens-dynamic-layout { grid-template-columns: minmax(0, 1.5fr) minmax(190px, 1fr); }
  .lens-scene-wrap { height: 370px; }
}
@media (max-width: 650px) {
  .lens-camera-toolbar { padding: 12px 16px 20px; }
  .lens-dynamic-layout { grid-template-columns: 1fr; padding: 0 16px; gap: 20px; }
  .lens-scene-wrap { height: 340px; }
  .lens-source-layout { grid-template-columns: 1fr; margin: 20px 16px; }
  .lens-source-layout figure { max-width: 230px; }
}

/* Keep the shared lab/application boundary visible on narrow screens. */
@media (max-width: 720px) {
  .nav-label.physics-nav-label { display: flex; margin: 18px 4px 10px; }
}

.water-details { grid-column: 1 / -1; min-width: 0; padding: 12px; border: 1px solid #314139; border-radius: 6px; }
.water-details summary { cursor: pointer; color: #c2d7c9; font-size: 12px; }
#water-material { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 14px; }
#water-material input, #water-pour-volume { width: 105px; }
#water-audit-json { white-space: pre-wrap; overflow-wrap: anywhere; max-height: 320px; overflow: auto; font-size: 10px; }

.lens-observer-controls { margin: 20px 26px; padding: 18px 20px; border: 1px solid #497267; border-radius: 8px; background: #172d30; }
.lens-observer-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.lens-observer-heading h4 { margin: 8px 0 0; font-size: 19px; color: #d3eddf; font-weight: 500; }
.lens-observer-controls p { color: #a9c2cb; font-size: 12px; line-height: 1.65; margin: 14px 0 0; }
.lens-observer-controls .lens-controls { padding: 22px 0 0; }
.lens-observer-heading button { font-size: 11px; }
#lens-observer-reading { font-variant-numeric: tabular-nums; }
#lens-sky-field { font-size: 10px; }
@media (max-width: 650px) {
  .lens-observer-controls { margin: 20px 16px; padding: 16px; }
  .lens-observer-heading { align-items: flex-start; flex-direction: column; }
}

.water-actions > .water-details { flex-basis: 100%; width: 100%; }

/* Guided exploration keeps optical actions distinct from orbital controls. */
.lens-discover { padding: 6px 26px 10px; }
.lens-presets { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; margin-top: 12px; }
.lens-presets button { text-align: left; color: #d9e7df; border: 1px solid #36515b; border-radius: 7px; background: #14252d; padding: 13px; min-height: 78px; }
.lens-presets button strong { display: block; font-size: 12px; font-weight: 550; margin-bottom: 7px; }
.lens-presets button span { display: block; font-size: 11px; line-height: 1.5; color: #a0b8c6; }
.lens-presets button:hover { background: #20383c; }
.lens-presets button[aria-pressed="true"] { border-color: #9bd7b9; background: #203e38; }
#lens-discovery-note { min-height: 34px; font-size: 12px; line-height: 1.6; color: #b8cbbb; margin: 12px 0 0; }
.lens-compare { font-size: 11px; min-height: 34px; width: 100%; margin-bottom: 10px; }
.lens-compare[aria-pressed="true"] { border-color: #e3bb7a; background: #413525; }
.lens-dynamic-layout > figure:last-child figcaption { min-height: 45px; }
.lens-actions { padding-top: 14px; }
.lens-actions button { min-height: 36px; }
.lens-settings-deck { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 20px 26px; align-items: start; }
.lens-settings-deck .lens-observer-controls { margin: 0; }
.lens-source-controls { border: 1px solid #485669; border-radius: 8px; background: #17242d; padding: 18px 20px; }
.lens-source-controls h4 { font-weight: 500; font-size: 19px; margin: 8px 0 20px; color: #e3d1ac; }
.lens-source-controls .lens-controls { padding: 0; grid-template-columns: 1fr; gap: 18px; }
.lens-settings-deck .lens-observer-controls .lens-controls { grid-template-columns: 1fr; gap: 18px; }
.lens-settings-deck .lens-observer-heading { align-items: start; flex-wrap: wrap; }
.lens-camera-explainer summary { cursor: pointer; color: #bed4cf; font-size: 14px; padding: 12px 0; }
#lens-share-status { color: #b9d6c9; font-size: 11px; line-height: 1.6; flex-basis: 100%; }
#lens-share-fallback { width: 100%; display: flex; flex-direction: column; align-items: stretch; }
#lens-share-url { width: 100%; min-width: 0; font-size: 12px; padding: 10px; color: #d7e6dd; background: #111e25; border: 1px solid #688a7e; }
#lensing-panel button:focus-visible, #lensing-panel summary:focus-visible { outline: 2px solid #b6e4c9; outline-offset: 3px; }
@media (max-width: 1100px) {
  .lens-presets { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 650px) {
  .lens-discover { padding: 8px 16px; }
  .lens-presets button { padding: 11px; }
  .lens-settings-deck { grid-template-columns: 1fr; margin: 20px 16px; }
  #lensing-panel button { min-height: 40px; }
  #lens-discovery-note { min-height: 0; }
}

@media (min-width: 1101px) {
  .lensing-heading { padding: 18px 26px 0; }
  .lensing-heading h3 { font-size: 27px; margin: 8px 0; }
  .lensing-heading p { margin: 8px 0 12px; }
  .lens-discover { padding-top: 0; padding-bottom: 0; }
  .lens-presets { margin-top: 8px; }
  .lens-presets button { min-height: 64px; padding: 10px 12px; }
  #lens-discovery-note { min-height: 0; margin: 8px 0; font-size: 11px; }
  .lens-camera-toolbar { padding-top: 8px; padding-bottom: 16px; }
}
.lens-orbit-link { display: inline-flex; align-items: center; min-height: 36px; padding: 8px 12px; border: 1px solid #426154; border-radius: 4px; color: #bbd5c5; text-decoration: none; font-size: 11px; }

.water-component-controls { display:flex; flex-wrap:wrap; align-items:end; gap:12px; margin:14px 0; }
.water-component-controls label { flex:1 1 150px; min-width:0; }
.water-component-controls input, .water-component-controls select { box-sizing:border-box; width:100%; }
.water-component-table { overflow-x:auto; max-width:100%; }
.water-component-table table { width:100%; border-collapse:collapse; font-size:12px; }
.water-component-table th, .water-component-table td { text-align:left; padding:8px; border-bottom:1px solid #31454b; }
#water-component-error { color:#ffb49f; }
.water-component-controls label { display:flex; flex-direction:column; align-items:stretch; gap:7px; flex:1 1 170px; }
.water-component-controls input, .water-component-controls select { min-height:36px; padding:8px; border:1px solid #425a60; border-radius:5px; background:#10242b; color:#e0e9e4; font-size:12px; }
#water-components button { min-height:36px; padding:9px 12px; border:1px solid #527466; border-radius:5px; background:#203a33; color:#d5e9cf; font-size:12px; }
#water-components button:hover { background:#2b4b40; }
@media (max-width:600px) { #water-components button, .water-component-controls input, .water-component-controls select { min-height:44px; } }

/* Shared strong-field gravity experiment; preserve the optical scene above. */
.gravity-strong-field { padding: 24px 26px; border-top: 1px solid #2e4147; }
.gravity-strong-field h4 { color: #d7e4dc; font-size: 19px; font-weight: 500; margin: 10px 0; }
.gravity-strong-field p { color: #a4b5bf; font-size: 12px; line-height: 1.65; }
.gravity-presets { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0; }
.gravity-presets [aria-pressed="true"] { background: #21483f; border-color: #8ddbc4; color: #d8f6e7; }
.gravity-field-layout { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 24px; }
.gravity-field-layout figure { margin: 0; min-width: 0; }
#gravity-ray { display: block; width: 100%; height: auto; cursor: default; aspect-ratio: 1 / 0.72; border: 1px solid #2e4147; border-radius: 12px; }
.gravity-field-layout figcaption { color: #90a8b5; font-size: 10px; line-height: 1.7; margin-top: 10px; }
.gravity-field-controls { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.gravity-field-controls label { display: block; color: #b4c8cf; font-size: 12px; }
.gravity-field-controls output { display: block; margin: 5px 0; color: #d4e6e0; font-variant-numeric: tabular-nums; }
.gravity-field-controls input { width: 100%; }
.gravity-field-controls strong { color: #aee0ce; font-size: 14px; font-weight: 500; }
.gravity-field-controls > span { font-size: 12px; color: #c9d5da; }
.gravity-field-controls p { margin: 0 0 10px; }
@media (max-width: 700px) {
  .gravity-strong-field { padding: 20px 16px; }
  .gravity-field-layout { grid-template-columns: minmax(0, 1fr); }
}

#lens-image-physics { grid-column: 1 / -1; margin: 0; color: #91a9b6; font-size: 11px; line-height: 1.7; }
#water-native-thermal button { padding:10px 12px; min-height:36px; background:#203a33; border:1px solid #527466; border-radius:5px; color:#d5e9cf; font-size:12px; }

.gravity-imaging-lab { padding: 26px; border-top: 1px solid #2e4147; }
.gravity-imaging-lab h4 { color: #e1e9de; font-size: 21px; font-weight: 500; margin: 12px 0; }
.gravity-imaging-lab p { color: #a4b5bf; font-size: 12px; line-height: 1.7; }
.lensing-heading a { color: #b0dcc9; }
.gravity-image-experiment { margin: 18px 0; padding: 18px; border: 1px solid #3c5255; border-radius: 12px; background: #101d25; }
.gravity-image-experiment summary { cursor: pointer; color: #cce9db; font-size: 15px; }
.gravity-image-experiment summary strong { font-weight: 500; }
.gravity-image-experiment summary span { display: block; margin: 8px 0 0 18px; font-size: 11px; color: #8fa9b8; }
.gravity-image-layout { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 22px; margin-top: 20px; }
.gravity-image-layout figure { margin: 0; min-width: 0; }
.gravity-image-layout canvas { width: 100%; height: auto; aspect-ratio: 1; background: #080e17; border: 1px solid #344c59; border-radius: 10px; cursor: default; touch-action: pan-y; }
.gravity-image-layout canvas[aria-busy="true"] { opacity: 0.45; }
.gravity-image-layout figcaption { color: #8fa9b8; font-size: 11px; line-height: 1.7; margin-top: 12px; }
.gravity-image-layout select { display: block; margin: 8px 0; max-width: 100%; }
.gravity-image-layout .gravity-presets { margin: 8px 0; }
.gravity-imaging-note { margin-bottom: 0; }
@media (max-width: 700px) {
  .gravity-imaging-lab { padding: 20px 16px; }
  .gravity-image-experiment { padding: 14px; }
  .gravity-image-layout { grid-template-columns: minmax(0, 1fr); }
}
