.wi-shell { width: min(1220px, calc(100% - 40px)); }
.wi-hero { grid-template-columns: 1.08fr .92fr; }
.wi-workspace { grid-template-columns: 282px minmax(0, 1fr); }
.wi-stage { padding-bottom: 24px; }

.circuit-status { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 0 0 14px; padding: 11px 13px; border: 1px solid var(--line); color: #c9d8d5; font-size: 12px; }
.circuit-status strong { color: var(--orange); font: 500 12px "DM Mono", monospace; }
.circuit-status.strong { border-color: rgba(101, 230, 209, .55); background: rgba(101, 230, 209, .06); }
.circuit-status.weak { border-color: rgba(255, 120, 109, .55); background: rgba(255, 120, 109, .06); }

.circuit-board { overflow: hidden; border: 1px solid var(--line-soft); background: var(--panel-deep); }
.wi-scene { display: block; width: 100%; height: auto; min-height: 400px; }
.front { fill: none; stroke-width: 1.6; }
.front.crest.s1 { stroke: rgba(101, 230, 209, .75); }
.front.crest.s2 { stroke: rgba(122, 168, 255, .75); }
.front.trough { stroke-dasharray: 4 6; stroke-width: 1.2; }
.front.trough.s1 { stroke: rgba(101, 230, 209, .32); }
.front.trough.s2 { stroke: rgba(122, 168, 255, .32); }
.source-dot { stroke-width: 2.2; }
.source-dot.s1 { fill: #0d2a2a; stroke: var(--cyan); }
.source-dot.s2 { fill: #101f33; stroke: #7aa8ff; }
.source-label { font: 500 14px "DM Mono", monospace; paint-order: stroke; stroke: var(--panel-deep); stroke-width: 5px; }
.source-label.s1 { fill: var(--cyan); }
.source-label.s2 { fill: #7aa8ff; }
.path-line { stroke: var(--yellow); stroke-width: 1.6; stroke-dasharray: 6 6; opacity: .85; }
.path-label { fill: var(--yellow); font: 500 12px "DM Mono", monospace; paint-order: stroke; stroke: var(--panel-deep); stroke-width: 5px; }
.probe { fill: var(--orange); stroke: #fff1d8; stroke-width: 1.8; filter: drop-shadow(0 0 8px rgba(255, 173, 104, .7)); }
.probe-label { fill: var(--orange); font: 500 15px "DM Mono", monospace; paint-order: stroke; stroke: var(--panel-deep); stroke-width: 5px; }

.legend .dashed { display: inline-block; width: 18px; height: 0; margin-right: 6px; border-top: 2px dashed #6fa8b8; vertical-align: middle; background: none; }

.wi-graph { min-width: 0; margin: 16px 0 0; border: 1px solid var(--line-soft); background: var(--panel-deep); }
.wi-graph figcaption { display: flex; justify-content: space-between; gap: 12px; padding: 11px 13px 8px; border-bottom: 1px solid rgba(41, 66, 71, .7); }
.wi-graph figcaption b { color: var(--ink); font-size: 13px; font-weight: 600; }
.wi-graph figcaption span { padding-top: 2px; color: var(--muted); font: 10px "DM Mono", monospace; }
.wi-graph svg { display: block; width: 100%; height: auto; }
.wave-part { fill: none; stroke-width: 1.4; opacity: .75; }
.wave-part.s1 { stroke: var(--cyan); }
.wave-part.s2 { stroke: #7aa8ff; }
.wave-sum { fill: none; stroke: var(--orange); stroke-width: 2.6; }
.time-cursor { stroke: rgba(255, 241, 216, .4); stroke-width: 1; stroke-dasharray: 3 5; }
.sum-dot { fill: var(--orange); stroke: #fff1d8; stroke-width: 1.6; filter: drop-shadow(0 0 6px rgba(255, 173, 104, .65)); }

.wi-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.wi-metrics .metric:nth-child(n+4) { margin-top: 13px; padding-top: 17px; border-top: 1px solid var(--line); }
.wi-metrics .metric:nth-child(4) { padding-left: 0; border-left: 0; }
.wi-metrics .metric-value { font-size: 19px; }

@media (max-width: 900px) { .wi-workspace { grid-template-columns: 260px minmax(0, 1fr); } }

@media (max-width: 820px) {
  .wi-shell { width: min(calc(100% - 24px), 650px); }
  .wi-hero { grid-template-columns: 1fr; }
  .wi-workspace { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
  .circuit-status { display: block; }
  .circuit-status span { display: block; margin-top: 5px; }
  .wi-scene { min-height: 300px; }
  .wi-scene .source-label, .wi-scene .probe-label { font-size: 28px; }
  .wi-scene .path-label { font-size: 24px; }
  .wi-scene .probe { r: 12; }
  .wi-scene .source-dot { r: 10; }
  .wi-graph svg .tick { font-size: 20px; }
  .wi-graph svg .axis-label { font-size: 22px; }
  .wi-graph svg .annotation { font-size: 20px; }
  .wi-graph svg .wave-sum { stroke-width: 3.4; }
  .wi-graph svg .sum-dot { r: 9; }
  .wi-metrics { grid-template-columns: 1fr; }
  .wi-metrics .metric, .wi-metrics .metric:nth-child(n) { margin-top: 0; padding: 13px 0; border-right: 0; border-bottom: 1px solid var(--line); border-left: 0; }
  .wi-metrics .metric:last-child { border-bottom: 0; }
}
