/* Classic Lab — Treasury Reinvestment Governor panel */
.rg-panel {
  border: 1px solid rgba(120, 200, 255, 0.18);
}
.rg-panel.rg-halted {
  border-color: rgba(255, 110, 110, 0.5);
  box-shadow: 0 0 0 1px rgba(255, 110, 110, 0.25) inset;
}
.rg-head .rg-badge {
  font: 600 10px/1 "JetBrains Mono", monospace;
  letter-spacing: 0.08em;
  padding: 3px 7px;
  border-radius: 5px;
  background: rgba(120, 200, 255, 0.16);
  color: #9cd6ff;
}
.rg-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.rg-lead,
.rg-lock-msg {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.5;
  color: rgba(220, 232, 245, 0.82);
}
.rg-lead strong {
  color: #cfe6ff;
}
.rg-lock-msg a,
.rg-lead a {
  color: #7cc4ff;
}
.rg-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: flex-end;
}
.rg-toggle,
.rg-halt {
  font: 600 11px/1 "JetBrains Mono", monospace;
  letter-spacing: 0.04em;
  padding: 9px 12px;
  border-radius: 7px;
  border: 1px solid rgba(120, 200, 255, 0.3);
  background: rgba(20, 32, 48, 0.6);
  color: #cfe6ff;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.rg-toggle.on {
  background: linear-gradient(180deg, rgba(60, 200, 140, 0.28), rgba(40, 150, 110, 0.22));
  border-color: rgba(90, 230, 170, 0.55);
  color: #c8ffe6;
}
.rg-halt {
  border-color: rgba(255, 140, 120, 0.4);
  color: #ffc9bd;
}
.rg-halt.on {
  background: linear-gradient(180deg, rgba(255, 110, 90, 0.3), rgba(200, 70, 60, 0.25));
  border-color: rgba(255, 130, 110, 0.7);
}
.rg-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font: 600 9.5px/1.2 "JetBrains Mono", monospace;
  letter-spacing: 0.06em;
  color: rgba(180, 205, 230, 0.72);
}
/* Plain-language help affordance + tooltip for each safety gate */
.rg-help {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 13px;
  height: 13px;
  margin-left: 5px;
  border-radius: 50%;
  border: 1px solid rgba(120, 200, 255, 0.45);
  background: rgba(120, 200, 255, 0.12);
  color: #9cd6ff;
  font: 700 9px/1 "Inter", sans-serif;
  letter-spacing: 0;
  cursor: help;
  vertical-align: middle;
  user-select: none;
}
.rg-help:hover,
.rg-help:focus-visible {
  background: rgba(120, 200, 255, 0.26);
  border-color: rgba(150, 215, 255, 0.7);
  outline: none;
}
[data-tip] {
  position: relative;
}
[data-tip]::after {
  content: attr(data-tip);
  position: absolute;
  left: 0;
  bottom: calc(100% + 8px);
  z-index: 60;
  width: max-content;
  max-width: 240px;
  padding: 8px 10px;
  border-radius: 7px;
  background: rgba(8, 14, 24, 0.98);
  border: 1px solid rgba(120, 200, 255, 0.32);
  color: #dcebff;
  font: 500 11px/1.45 "Inter", sans-serif;
  letter-spacing: normal;
  text-transform: none;
  white-space: normal;
  text-align: left;
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.45);
  opacity: 0;
  visibility: hidden;
  transform: translateY(4px);
  transition: opacity 0.12s ease, transform 0.12s ease, visibility 0.12s;
  pointer-events: none;
}
.rg-help[data-tip]::after {
  left: 50%;
  transform: translateX(-50%) translateY(4px);
}
[data-tip]:hover::after,
[data-tip]:focus::after,
[data-tip]:focus-visible::after {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.rg-help[data-tip]:hover::after,
.rg-help[data-tip]:focus::after,
.rg-help[data-tip]:focus-visible::after {
  transform: translateX(-50%) translateY(0);
}
.rg-field select {
  padding: 7px 8px;
  border-radius: 6px;
  border: 1px solid rgba(120, 200, 255, 0.25);
  background: rgba(14, 24, 38, 0.8);
  color: #dcebff;
  font: 500 11px/1 "JetBrains Mono", monospace;
}
.rg-range {
  min-width: 112px;
}
.rg-range em {
  font-style: normal;
  color: #8fd0ff;
}
.rg-range input[type="range"] {
  width: 100%;
  accent-color: #5fb8ff;
}
.rg-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  gap: 8px;
}
.rg-stat {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 8px 10px;
  border-radius: 7px;
  background: rgba(16, 26, 40, 0.6);
  border: 1px solid rgba(120, 200, 255, 0.1);
}
.rg-stat-l {
  font: 600 9px/1 "JetBrains Mono", monospace;
  letter-spacing: 0.07em;
  color: rgba(170, 195, 220, 0.65);
}
.rg-stat-v {
  font: 600 14px/1 "Inter", sans-serif;
  color: #e6f0fb;
}
.rg-stat-v.pos {
  color: #6fe6b0;
}
.rg-stat-v.neg {
  color: #ff8f7e;
}
.rg-reasons {
  margin: 0;
  font: 500 11px/1.5 "JetBrains Mono", monospace;
  color: rgba(160, 190, 215, 0.78);
}
.rg-audit {
  border-top: 1px solid rgba(120, 200, 255, 0.12);
  padding-top: 8px;
}
.rg-audit-head {
  font: 600 9.5px/1 "JetBrains Mono", monospace;
  letter-spacing: 0.08em;
  color: rgba(170, 195, 220, 0.62);
  margin-bottom: 6px;
}
.rg-audit-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 160px;
  overflow-y: auto;
}
.rg-audit-list li {
  font: 500 11px/1.45 "JetBrains Mono", monospace;
  color: rgba(205, 222, 238, 0.8);
}
.rg-audit-t {
  color: rgba(140, 170, 200, 0.6);
  margin-right: 8px;
}
.rg-audit-empty {
  color: rgba(150, 175, 200, 0.5);
}
.rg-foot {
  margin: 0;
  font: 500 10px/1.5 "JetBrains Mono", monospace;
  color: rgba(150, 175, 200, 0.6);
}
