#circuit-panel {
  min-width: 0;
  margin: 0;
  padding: clamp(16px, 1.8vw, 28px);
  color: var(--ink);
  background: white;
  border: 1px solid var(--hairline);
  border-radius: 8px;
}

#circuit-panel .card-caption { margin-bottom: 12px; }
.pulse-stale { flex: none; padding: 4px 6px; border: 1px solid #dfd2ae; border-radius: 4px; color: #765d2e; font-size: 10px; }
.pulse-legend { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 13px; margin: 12px 0; }
.pulse-legend span { display: inline-flex; align-items: center; gap: 5px; color: #465d50; font-size: 10px; line-height: 1.3; }
.pulse-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; }
.pulse-dot.excitatory { background: #166b58; }
.pulse-dot.inhibitory { background: #a45b27; }
.pulse-line { display: inline-block; width: 17px; border-top: 2px solid #53695e; }
.pulse-line.reference { border-top-style: dashed; }
.pulse-frame { overflow: hidden; padding: 9px 6px 6px; border: 1px solid #dae3d7; border-radius: 5px; background: #f7faf5; }
.pulse-axis-title { padding: 0 0 2px 3px; color: #536657; font: 10px/1.4 var(--mono); }
.pulse-axis-title { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 5px 12px; }
.pulse-axis-title > span, .pulse-input { display: inline-flex; align-items: center; gap: 4px; }
#pulse-stimulus i { width: 10px; height: 10px; background: #e9e4c9; border: 1px solid #bcb28a; }
#circuit-panel .term-help { font-family: inherit; font-size: 12px; }
.pulse-legend .term-help, .pulse-axis-title .term-help, .pulse-input .term-help { margin-left: 0; }
.pulse-chart { display: block; width: 100%; height: auto; overflow: visible; }
.pulse-chart text { fill: #4d6455; font: 10px var(--mono); }
.pulse-chart .pulse-annotation { fill: #696134; }
.pulse-grid { stroke: #d3ddd1; stroke-width: 1; }
.pulse-window { fill: #e9e4c9; }
.pulse-trace { fill: none; stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.pulse-trace.excitatory.scenario { stroke: #166b58; }
.pulse-trace.inhibitory.scenario { stroke: #a45b27; }
.pulse-trace.reference { stroke-width: 1.5; stroke-dasharray: 3 4; }
.pulse-trace.excitatory.reference { stroke: #5c9885; }
.pulse-trace.inhibitory.reference { stroke: #ba8749; }
.pulse-peaks { width: 100%; border-collapse: collapse; margin-top: 13px; font-size: 11px; text-align: right; color: #385546; }
.pulse-peaks thead th { padding: 0 3px 5px; font-size: 10px; font-weight: 500; color: #5e7062; }
.pulse-peaks th:first-child { padding-left: 0; text-align: left; }
.pulse-peaks :is(td, tbody th) { padding: 6px 3px; border-top: 1px solid #e0e8dc; }
.pulse-peaks tbody th { font-weight: 500; }
.pulse-peaks td { font: 11px var(--mono); }
.pulse-peaks small { white-space: nowrap; color: #516856; font-size: 10px; }
.pulse-inputs { border-top: 1px solid var(--hairline); margin-top: 8px; padding-top: 11px; }
.pulse-inputs h3 { margin: 0 0 6px; font-family: inherit; font-size: 11px; font-weight: 600; line-height: 1.4; }
.pulse-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.ref-page .pulse-finder {
  padding: 4px 7px; border: 1px solid #ccdacc; border-radius: 4px;
  color: #44634e; background: #f6f9f3; font-size: 10px; line-height: 1.4; text-align: left;
}
.ref-page .pulse-finder:hover { color: #163f31; border-color: #8ca591; background: #edf3e7; }

@media (max-width: 420px) {
  .pulse-peaks small { display: block; margin-top: 2px; }
  .pulse-peaks { table-layout: fixed; }
  .pulse-peaks th { overflow-wrap: anywhere; }
}
