/* Native scientific instrument interface; no third-party design system is imported. */
:root {
  color-scheme:light;
  --radius:8px;
  font-family:-apple-system,BlinkMacSystemFont,"PingFang SC","Microsoft YaHei",sans-serif;
  font-size:14px;
}


* {
  box-sizing:border-box;
}

body {
  margin:0;
  background:var(--page);
  color:var(--ink);
  line-height:1.5;
}

button,input,select,a {
  -webkit-tap-highlight-color:transparent;
}

button,select,input {
  font:inherit;
}

button,a.button {
  font-weight:550;
  white-space:nowrap;
}

button,a.button {
  cursor:pointer;
}

button,select,a.button {
  border:1px solid var(--line);
  border-radius:6px;
  background:var(--surface);
  color:var(--ink);
  padding:8px 13px;
  min-height:36px;
  text-decoration:none;
  transition:background .16s,border-color .16s;
}

button:hover,a.button:hover {
  border-color:var(--accent);
  background:var(--accent-soft);
}

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

button:disabled,select:disabled {
  opacity:.45;
  cursor:not-allowed;
}

button:focus-visible,a:focus-visible,select:focus-visible,input:focus-visible,summary:focus-visible,[role=button]:focus-visible {
  outline:3px solid var(--focus);
  outline-offset:4px;
}

button.primary {
  background:var(--accent);
  border-color:var(--accent);
  color:var(--on-solid);
}

html[data-theme=dark] button.primary {
  color:var(--green-fg);
}

button.primary:hover {
  filter:brightness(1.08);
}

button.text-link,a.text-link {
  border:0;
  background:none;
  padding:0;
  min-height:auto;
  color:var(--accent);
  font-size:13px;
  text-decoration:none;
}

a.text-link:hover,button.text-link:hover {
  text-decoration:underline;
}







main {
  max-width:1448px;
  margin:auto;
  padding:28px 28px 0;
}

.intro {
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:25px;
  margin-bottom:23px;
}

.intro-kicker {
  margin:0 0 5px;
  font-size:12px;
  color:var(--muted);
  letter-spacing:.05em;
}

h1 {
  font-size:clamp(25px,2.3vw,33px);
  letter-spacing:-.8px;
  line-height:1.25;
  margin:0;
  font-weight:620;
}

.intro-note {
  font-size:13px;
  color:var(--muted);
  margin:0 0 3px;
  max-width:330px;
}

.workspace {
  display:grid;
  grid-template-columns:minmax(0,1fr) 291px;
  gap:18px;
}

.scene-panel,.controls-panel,.trajectory-panel,.timeline-panel {
  background:var(--surface);
  border:1px solid var(--line);
  border-radius:var(--radius);
  min-width:0;
}

.scene-toolbar {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  padding:17px 20px 0;
}

.clock {
  display:flex;
  align-items:center;
  gap:9px;
  white-space:nowrap;
}

.clock strong {
  font-variant-numeric:tabular-nums;
  font-size:24px;
  font-weight:550;
  letter-spacing:-.8px;
}

.clock>span:last-child {
  font-size:11px;
  color:var(--muted);
  margin-left:3px;
}

.status-dot {
  width:6px;
  height:6px;
  border:1px solid var(--accent);
  border-radius:50%;
  display:inline-block;
}

.running .status-dot {
  background:var(--accent);
}

.world-controls {
  display:flex;
  align-items:center;
  gap:7px;
}

.world-controls button,.world-controls select {
  min-height:34px;
  padding:6px 10px;
  font-size:12px;
}

.world-controls select {
  width:91px;
  color:var(--muted);
}

.scene-container {
  min-height:250px;
}

.energy-scene {
  display:block;
  width:100%;
  aspect-ratio:1000/420;
  color:var(--ink);
  overflow:visible;
}

.site-grid {
  stroke:var(--line);
  stroke-width:.5;
  opacity:.6;
}

.site-boundary {
  stroke:var(--line);
  stroke-width:1;
  fill:none;
  stroke-dasharray:3 6;
}

.site-caption {
  fill:var(--muted);
  font-size:10px;
  letter-spacing:.08em;
}

.flow-track {
  fill:none;
  stroke:var(--surface-2);
  stroke-width:13;
}

.energy-flow {
  fill:none;
  stroke-linecap:round;
  stroke-linejoin:round;
  opacity:.85;
}

.energy-flow:not(.active) {
  stroke:var(--line);
  stroke-dasharray:3 6;
}

.flow-solar {
  stroke:var(--solar);
}

.flow-load {
  stroke:var(--load);
}

.flow-model {
  stroke:var(--model);
}

.flow-grid {
  stroke:var(--grid);
}

.arrow-solar {
  stroke:var(--solar);
}

.arrow-model {
  stroke:var(--model);
}

.arrow-grid {
  stroke:var(--grid);
}

.arrow-load {
  stroke:var(--load);
}

.running .energy-flow.active {
  stroke-dasharray:15 4;
  animation:flow 2s linear infinite;
}

.running .energy-flow.reverse {
  animation-direction:reverse;
}

@keyframes flow {
  to {
    stroke-dashoffset:-38;
  }
}

.bus-ring {
  fill:var(--surface);
  stroke:var(--line);
  stroke-width:1.5;
}

.bus-core {
  fill:var(--accent);
}

.flow-value {
  font-size:20px;
  font-weight:550;
  letter-spacing:-.4px;
  font-variant-numeric:tabular-nums;
}

.svg-unit {
  font-size:11px;
  font-weight:400;
}

.solar-ink {
  fill:var(--solar);
}

.load-ink {
  fill:var(--load);
}

.grid-ink {
  fill:var(--grid);
}

.scene-object {
  cursor:pointer;
}

.object-focus {
  fill:transparent;
  stroke:transparent;
  stroke-width:1.2;
  transition:fill .15s,stroke .15s;
}

.scene-object:hover .object-focus,.scene-object:focus-visible .object-focus {
  stroke:var(--accent);
  fill:var(--accent-soft);
  fill-opacity:.5;
}

.scene-object.selected .object-focus {
  stroke:var(--line);
  fill:var(--surface-2);
  fill-opacity:.7;
}

.object-label {
  fill:var(--ink);
  font-size:15px;
  font-weight:550;
}

.object-sub {
  fill:var(--muted);
  font-size:12px;
}

.solar-surface {
  fill:var(--accent-soft);
  stroke:var(--accent);
  stroke-width:2;
}

.solar-grid {
  stroke:var(--accent);
  stroke-width:1;
  fill:none;
  opacity:.65;
}

.equipment-leg {
  stroke:var(--muted);
  stroke-width:3;
  fill:none;
}

.ground-line {
  stroke:var(--line);
  stroke-width:2;
  fill:none;
}

.building-body {
  fill:var(--surface-2);
  stroke:var(--muted);
  stroke-width:1.4;
}

.building-roof {
  fill:var(--accent-soft);
  stroke:var(--muted);
  stroke-width:1.4;
}

.building-window {
  fill:var(--line);
}

.building-door {
  fill:var(--muted);
}

.grid-pylon {
  fill:none;
  stroke:var(--grid);
  stroke-width:2;
  stroke-linejoin:round;
}

.battery-terminal {
  fill:var(--muted);
}

.battery-shell {
  fill:var(--surface);
  stroke:var(--muted);
  stroke-width:1.6;
}

.battery-observed {
  fill:var(--observed);
  opacity:.21;
}

.battery-estimate {
  stroke:var(--model);
  stroke-width:2;
  stroke-dasharray:5 3;
}

.battery-number {
  fill:var(--ink);
  font-size:24px;
  font-weight:550;
  font-variant-numeric:tabular-nums;
}

.battery-unit {
  fill:var(--muted);
  font-size:10px;
}

.scene-footnote {
  fill:var(--muted);
  font-size:10px;
}

.measurement-strip {
  padding:16px 20px 17px;
  border-top:1px solid var(--line);
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:14px;
}

.measurement-strip>div>span {
  font-size:11px;
  color:var(--muted);
  display:block;
  margin-bottom:4px;
}

.measurement-strip strong {
  display:block;
  font-size:23px;
  font-weight:550;
  letter-spacing:-.7px;
  font-variant-numeric:tabular-nums;
}

.measurement-strip small {
  font-size:11px;
  letter-spacing:0;
  font-weight:400;
  color:var(--muted);
  margin-left:5px;
}

.model-ink {
  color:var(--model);
}

.object-inspector {
  display:grid;
  grid-template-columns:auto 1fr auto;
  align-items:start;
  gap:9px;
  padding:13px 20px;
  border-top:1px solid var(--line);
  font-size:12px;
  background:var(--surface-2);
  border-radius:0 0 var(--radius) var(--radius);
}

.inspector-label {
  font-weight:600;
}

.object-inspector p {
  margin:0;
  color:var(--muted);
}

#object-why {
  grid-column:1/-1;
  line-height:1.8;
  padding-top:5px;
}

.controls-panel {
  padding:18px 19px;
}

.section-title {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom:12px;
}

.section-title h2 {
  margin:0;
  font-size:14px;
  font-weight:600;
}

.section-title>span {
  font-size:10px;
  color:var(--muted);
}

.control-note,.control-note+form {
  font-size:12px;
}

.control-note {
  line-height:1.7;
  color:var(--muted);
  margin:0 0 17px;
}

#settings-form label {
  display:flex;
  justify-content:space-between;
  align-items:center;
  font-size:12px;
  margin:15px 0 9px;
}

#settings-form label:first-child {
  margin-top:0;
}

output {
  font-variant-numeric:tabular-nums;
  color:var(--accent);
  font-weight:550;
}

input[type=range] {
  display:block;
  width:100%;
  accent-color:var(--accent);
  cursor:pointer;
  height:16px;
  margin:0;
}

input:disabled {
  opacity:.45;
  cursor:not-allowed;
}

#settings-form select {
  width:100%;
  font-size:12px;
  padding:8px 9px;
}

.range-captions {
  display:flex;
  justify-content:space-between;
  font-size:10px;
  color:var(--muted);
  margin-top:4px;
}

.agent-panel {
  border-top:1px solid var(--line);
  margin-top:22px;
  padding-top:18px;
}

.agent-controls {
  display:flex;
  gap:7px;
}

.agent-controls button {
  font-size:11px;
  padding:6px 10px;
  min-height:31px;
}

.agent-phase {
  font-size:16px;
  font-weight:550;
  margin:17px 0 6px;
  letter-spacing:-.3px;
}

.agent-reason {
  font-size:12px;
  color:var(--muted);
  line-height:1.75;
  margin:0 0 14px;
  min-height:42px;
}

.probe-button {
  font-size:12px;
  width:100%;
  background:var(--surface-2);
  text-align:left;
}

.micro-note {
  font-size:10px;
  line-height:1.75;
  color:var(--muted);
  margin:7px 0 12px;
}

#takeover {
  font-size:11px;
}

.evidence-row {
  display:grid;
  grid-template-columns:minmax(0,1fr) 360px;
  gap:18px;
  margin-top:18px;
}

.trajectory-panel {
  padding:18px 20px 15px;
}

.chart-tabs {
  display:flex;
  gap:3px;
  border-radius:5px;
  background:var(--surface-2);
  padding:3px;
}

.chart-tabs button {
  min-height:25px;
  padding:3px 12px;
  font-size:11px;
  border:0;
  background:none;
  color:var(--muted);
}

.chart-tabs button[aria-selected=true] {
  background:var(--surface);
  color:var(--accent);
  box-shadow:0 1px 4px color-mix(in srgb,var(--green-mid) 7%,transparent);
}

.history-chart {
  display:block;
  width:100%;
  aspect-ratio:840/230;
}

.chart-grid {
  stroke:var(--chart-grid);
  stroke-width:1;
}

.chart-tick,.chart-unit {
  font-size:10px;
  fill:var(--muted);
  font-variant-numeric:tabular-nums;
}

.chart-line {
  stroke-width:2;
  stroke-linejoin:round;
  stroke-linecap:round;
  fill:none;
}

.line-observed {
  stroke:var(--observed);
}

.line-model {
  stroke:var(--model);
  stroke-dasharray:5 3;
}

.line-solar {
  stroke:var(--solar);
}

.line-load {
  stroke:var(--load);
}

.line-grid {
  stroke:var(--grid);
}

.chart-forecast {
  fill:none;
  stroke-width:1.3;
  stroke-dasharray:3 5;
  opacity:.5;
}

.chart-cursor {
  stroke:var(--muted);
  stroke-dasharray:2 4;
  stroke-width:1;
  opacity:.5;
}

.chart-point {
  stroke:var(--surface);
  stroke-width:1;
}

.point-observed {
  fill:var(--observed);
}

.point-model {
  fill:var(--model);
}

.point-solar {
  fill:var(--solar);
}

.point-load {
  fill:var(--load);
}

.point-grid {
  fill:var(--grid);
}

.chart-empty {
  fill:var(--muted);
  font-size:12px;
}

.chart-legend {
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:15px;
  justify-content:center;
  min-height:22px;
}

.chart-legend>span {
  font-size:10px;
  color:var(--muted);
  display:inline-flex;
  align-items:center;
  gap:6px;
}

.chart-legend i {
  display:inline-block;
  width:16px;
  height:2px;
  background:var(--muted);
}

.chart-legend .legend-observed {
  background:var(--observed);
}

.chart-legend .legend-model {
  background:repeating-linear-gradient(90deg,var(--model),var(--model) 4px,transparent 4px,transparent 7px);
}

.chart-legend .legend-solar {
  background:var(--solar);
}

.chart-legend .legend-load {
  background:var(--load);
}

.chart-legend .legend-grid {
  background:var(--grid);
}

.chart-legend .legend-forecast {
  background:repeating-linear-gradient(90deg,var(--muted),var(--muted) 2px,transparent 2px,transparent 5px);
}

.history-scrubber {
  display:flex;
  align-items:center;
  gap:12px;
  margin-top:17px;
  padding-top:13px;
  border-top:1px solid var(--line);
  font-size:11px;
  color:var(--muted);
}

.history-scrubber input {
  flex:1;
  min-width:0;
  height:12px;
}

.history-scrubber>span {
  min-width:65px;
  text-align:right;
  white-space:nowrap;
}

.timeline-panel {
  padding:18px 20px;
  max-height:379px;
  overflow:auto;
}

.events {
  list-style:none;
  margin:0;
  padding:0;
}

.event {
  position:relative;
  padding:0 0 15px 15px;
  border-left:1px solid var(--line);
  margin-left:3px;
}

.event:last-child {
  padding-bottom:0;
  border-color:transparent;
}

.event:before {
  content:"";
  position:absolute;
  top:4px;
  left:-3px;
  height:5px;
  width:5px;
  border-radius:50%;
  background:var(--accent);
  box-shadow:0 0 0 3px var(--surface);
}

.event-meta {
  display:flex;
  justify-content:space-between;
  gap:8px;
  color:var(--muted);
  font-size:9px;
  margin-bottom:4px;
}

.event strong {
  font-size:12px;
  font-weight:550;
  display:block;
}

.event p {
  color:var(--muted);
  font-size:10px;
  line-height:1.7;
  margin:4px 0 0;
  overflow-wrap:anywhere;
}

.empty-note {
  font-size:12px;
  color:var(--muted);
  padding:18px 0;
}

.research-section {
  margin-top:18px;
  border-top:1px solid var(--line);
}

details>summary {
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:18px 0;
  cursor:pointer;
  font-size:13px;
  list-style:none;
}

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

details>summary>span:first-child:before {
  content:"+";
  font-size:18px;
  color:var(--accent);
  display:inline-block;
  width:24px;
}

details[open]>summary>span:first-child:before {
  content:"−";
}

.detail-summary {
  color:var(--muted);
  font-size:11px;
}

.research-body {
  display:grid;
  grid-template-columns:minmax(0,1.4fr) minmax(0,1fr);
  gap:45px;
  padding:3px 0 25px;
}

.research-body h2 {
  font-size:13px;
  margin:0 0 14px;
}

.equation {
  margin-bottom:14px;
}

.equation strong {
  font-size:12px;
  font-weight:550;
  display:block;
}

.equation code {
  font-size:12px;
  background:var(--surface-2);
  padding:12px;
  display:block;
  margin:6px 0;
  overflow:auto;
  white-space:pre-wrap;
  overflow-wrap:anywhere;
  border:1px solid var(--line);
  border-radius:5px;
  font-family:"SFMono-Regular",Consolas,monospace;
  color:var(--model);
}

.equation p,.research-note {
  font-size:11px;
  color:var(--muted);
  line-height:1.8;
  margin:5px 0;
}

.model-actions {
  display:flex;
  gap:8px;
  margin-top:18px;
}

.model-actions button,.research-facts button {
  font-size:11px;
}

.research-facts dl {
  font-size:12px;
  margin:0;
}

.fact-row {
  display:grid;
  grid-template-columns:125px 1fr;
  gap:14px;
  padding:8px 0;
  border-bottom:1px solid var(--line);
}

dt {
  color:var(--muted);
}

dd {
  margin:0;
  font-variant-numeric:tabular-nums;
}

.research-facts pre {
  font-size:10px;
  line-height:1.7;
  white-space:pre-wrap;
  overflow-wrap:anywhere;
  max-height:340px;
  overflow:auto;
  background:var(--surface-2);
  padding:12px;
  border:1px solid var(--line);
}

.error-banner,.history-banner {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:15px;
  padding:11px 16px;
  margin-bottom:16px;
  border-radius:6px;
  font-size:12px;
}

.error-banner {
  background:var(--danger-bg);
  border:1px solid var(--danger);
  color:var(--danger);
}

.history-banner {
  background:var(--accent-soft);
  border:1px solid var(--accent);
  color:var(--accent);
}

.error-banner button,.history-banner button {
  font-size:11px;
  padding:5px 10px;
  min-height:29px;
}

footer {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:25px;
  border-top:1px solid var(--line);
  padding:15px 0 20px;
  font-size:10px;
  color:var(--muted);
}

footer p {
  margin:0;
}

footer strong {
  font-weight:550;
}

#connection-status {
  white-space:nowrap;
}

.scene-loading {
  min-height:300px;
  display:grid;
  place-content:center;
  text-align:center;
  color:var(--muted);
  font-size:12px;
}

.scene-loading>span {
  display:block;
  width:240px;
  height:50px;
  background:var(--surface-2);
  border:1px solid var(--line);
  border-radius:5px;
}

.scene-loading p {
  margin:16px 0 0;
}

[hidden] {
  display:none!important;
}

@media(min-width:1500px) {
  main {
    padding-top:35px;
  }
  .energy-scene {
    max-height:430px;
  }
  .controls-panel {
    padding-top:21px;
  }
}

@media(max-width:1180px) {
  main {
    padding:22px 20px 0;
  }
  .workspace {
    grid-template-columns:minmax(0,1fr) 270px;
    gap:14px;
  }
  .scene-toolbar {
    flex-wrap:wrap;
    padding:15px 16px 0;
  }
  .scene-container {
    margin-top:10px;
  }
  .measurement-strip {
    padding:15px 16px;
    gap:8px;
  }
  .measurement-strip strong {
    font-size:21px;
  }
  .clock strong {
    font-size:22px;
  }
  .intro-note {
    display:none;
  }
  .evidence-row {
    grid-template-columns:minmax(0,1fr) 300px;
    gap:14px;
  }
  .controls-panel {
    padding:16px;
  }
  .timeline-panel,.trajectory-panel {
    padding:16px;
  }
  .object-inspector {
    padding:12px 16px;
  }
  .controls-panel .section-title>span {
    font-size:9px;
  }
}

@media(max-width:900px) {
  .workspace {
    grid-template-columns:1fr;
  }
  .controls-panel {
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:25px;
  }
  .agent-panel {
    margin:0;
    padding:0 0 0 25px;
    border-top:0;
    border-left:1px solid var(--line);
  }
  .scene-toolbar {
    flex-wrap:nowrap;
  }
  .evidence-row {
    grid-template-columns:minmax(0,1fr) 290px;
  }
  .energy-scene {
    max-height:400px;
  }
  .scene-container {
    margin-top:0;
  }
  .measurement-strip strong {
    font-size:25px;
  }
  .timeline-panel {
    max-height:340px;
  }
}

@media(max-width:700px) {
  main {
    padding:21px 12px 0;
  }
  .intro {
    margin:0 4px 20px;
  }
  h1 {
    font-size:24px;
  }
  .intro-kicker {
    font-size:10px;
  }
  .workspace,.evidence-row {
    gap:13px;
  }
  .scene-toolbar {
    padding:14px 12px 0;
    gap:8px;
    flex-wrap:wrap;
  }
  .clock {
    gap:6px;
  }
  .clock strong {
    font-size:21px;
  }
  .clock>span:last-child {
    font-size:10px;
  }
  .world-controls {
    margin-left:auto;
  }
  .world-controls button,.world-controls select {
    font-size:10px;
    min-height:31px;
    padding:5px 7px;
  }
  .world-controls select {
    width:79px;
  }
  .scene-container {
    min-height:190px;
    margin-top:12px;
  }
  .energy-scene {
    min-height:200px;
  }
  .measurement-strip {
    padding:13px 12px;
    gap:10px;
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
  .measurement-strip strong {
    font-size:23px;
  }
  .measurement-strip>div>span {
    font-size:10px;
  }
  .object-inspector {
    padding:12px;
    font-size:11px;
  }
  .object-inspector .text-link {
    font-size:11px;
  }
  .controls-panel {
    padding:16px;
    gap:18px;
  }
  .agent-panel {
    padding-left:18px;
  }
  .section-title {
    gap:5px;
  }
  .section-title>span {
    font-size:9px;
  }
  .section-title h2 {
    font-size:13px;
  }
  .control-note {
    font-size:10px;
  }
  #settings-form label {
    font-size:11px;
  }
  #settings-form select {
    font-size:10px;
  }
  .agent-controls {
    flex-wrap:wrap;
    gap:5px;
  }
  .agent-controls button {
    font-size:10px;
    padding:5px 8px;
  }
  .agent-reason {
    font-size:11px;
    min-height:0;
  }
  .agent-phase {
    font-size:14px;
  }
  .micro-note {
    font-size:9px;
  }
  .probe-button {
    font-size:10px;
    padding:7px;
  }
  .evidence-row {
    grid-template-columns:1fr;
    margin-top:13px;
  }
  .trajectory-panel {
    padding:16px 12px;
  }
  .timeline-panel {
    max-height:310px;
  }
  .history-chart {
    min-height:180px;
  }
  .chart-legend {
    gap:12px;
  }
  .chart-legend>span {
    font-size:9px;
  }
  .research-body {
    grid-template-columns:1fr;
    gap:20px;
    padding:0 4px 20px;
  }
  .detail-summary {
    display:none;
  }
  details>summary {
    padding:17px 4px;
    font-size:12px;
  }
  footer {
    display:block;
    padding:14px 4px 20px;
    font-size:9px;
  }
  #connection-status {
    display:block;
    margin-top:9px;
  }
  .history-banner,.error-banner {
    font-size:11px;
    align-items:flex-start;
  }
  .history-banner button,.error-banner button {
    flex-shrink:0;
  }
}

@media(prefers-reduced-motion:reduce) {
  *,*:before,*:after {
    animation:none!important;
    transition:none!important;
  }
}

/* Keep the complete scene and primary controls usable on a laptop. */
@media(min-width:901px) {
  .controls-panel {
    padding:16px 18px;
  }
  .controls-panel .section-title {
    margin-bottom:10px;
  }
  .controls-panel .section-title h2 {
    font-size:13px;
  }
  .control-note {
    font-size:10px;
    line-height:1.6;
    margin-bottom:12px;
  }
  #settings-form label {
    font-size:11px;
    margin:10px 0 6px;
  }
  #settings-form select {
    font-size:11px;
    min-height:32px;
    padding:6px 8px;
  }
  .range-captions {
    font-size:9px;
    margin-top:2px;
  }
  .agent-panel {
    margin-top:16px;
    padding-top:14px;
  }
  .agent-controls button {
    min-height:29px;
    font-size:10px;
    padding:5px 9px;
  }
  .agent-phase {
    font-size:14px;
    margin:10px 0 5px;
  }
  .agent-reason {
    font-size:11px;
    line-height:1.7;
    min-height:0;
    margin-bottom:10px;
  }
  .probe-button {
    min-height:31px;
    font-size:11px;
    padding:6px 10px;
  }
  .agent-panel .micro-note {
    font-size:9px;
    margin:5px 0 8px;
  }
  #takeover {
    font-size:10px;
  }
  .energy-scene {
    max-height:370px;
  }
}

.benchmark-result {
  margin-top:17px;
  padding:14px 0 0;
  border-top:1px solid var(--line);
}

.benchmark-heading {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:10px;
  font-size:12px;
}

.benchmark-heading strong {
  font-weight:550;
}

.benchmark-heading span {
  font-size:10px;
  color:var(--muted);
  white-space:nowrap;
}

.benchmark-table {
  width:100%;
  border-collapse:collapse;
  font-size:11px;
  text-align:left;
  font-variant-numeric:tabular-nums;
}

.benchmark-table thead th {
  font-size:10px;
  font-weight:400;
  color:var(--muted);
  padding:7px 8px;
  background:var(--surface-2);
  white-space:nowrap;
}

.benchmark-table tbody th {
  font-weight:550;
  padding:11px 8px;
  width:35%;
}

.benchmark-table td {
  padding:11px 8px;
}

.benchmark-table tbody tr+tr {
  border-top:1px solid var(--line);
}

.benchmark-table small {
  font-size:10px;
  font-weight:400;
  color:var(--muted);
  display:block;
  margin-top:2px;
}

.benchmark-note {
  font-size:10px;
  color:var(--muted);
  line-height:1.8;
  margin:10px 0 0;
}

.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;
}

@media(max-width:700px) {
  .benchmark-table thead th,.benchmark-table tbody th,.benchmark-table td {
    padding-left:5px;
    padding-right:5px;
  }
  .benchmark-heading {
    font-size:11px;
  }
}

.site-switch {
  display:grid;
  grid-template-columns:auto auto;
  align-items:center;
  gap:5px 10px;
  flex-shrink:0;
}

.site-switch label {
  font-size:11px;
  color:var(--muted);
}

.site-switch select {
  font-size:12px;
  min-height:32px;
  padding:5px 9px;
}

#site-scale {
  grid-column:1/-1;
  font-size:10px;
  color:var(--muted);
  text-align:right;
  font-variant-numeric:tabular-nums;
}

.autonomy-caption {
  font-size:10px;
  line-height:1.75;
  margin:7px 0 11px;
  color:var(--accent);
}

.agent-warning {
  color:var(--observed);
}

.manual-probe {
  padding:12px 0 5px;
}

.manual-probe .quiet {
  font-size:11px;
}

@media(max-width:700px) {
  .intro {
    align-items:flex-start;
    gap:10px;
  }
  .intro h1 {
    font-size:21px;
    max-width:220px;
  }
  .site-switch {
    grid-template-columns:1fr;
    gap:4px;
    width:140px;
  }
  .site-switch label {
    font-size:9px;
  }
  .site-switch select {
    font-size:10px;
    width:100%;
    min-height:29px;
    padding:5px 7px;
  }
  #site-scale {
    text-align:left;
    font-size:9px;
    line-height:1.6;
  }
  .autonomy-caption {
    font-size:9px;
  }
}

/* Phone: keep the energy scene legible and let it scroll sideways instead of shrinking the labels. */
@media (max-width: 760px) {
  .scene-container { overflow-x: auto; overscroll-behavior-x: contain; }
  .scene-container > svg { min-width: 600px; }
}
