/*
  Tube Bias Calculator Pro — additive stylesheet
  ------------------------------------------------
  Loads after tube-bias-calculator.css and inherits its --tbc-* tokens
  and .tbc base component classes (header, warning, setup, reference,
  modes, panel, readout, gauge, bench table, footer) unchanged. This
  file only adds the new pieces specific to the wizard: step labels,
  the plate-voltage nudge stepper, the probe-reads radio group, and
  the two safety-check cards. Namespaced .tbcp- to avoid any collision
  with the existing .tbc- classes.
*/

.tbcp-step-label {
  font-family: var(--tbc-font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--tbc-ink-faint);
  margin: 22px 0 10px;
}

/* ---------- plate-voltage nudge stepper ---------- */
.tbcp-nudge-wrap {
  gap: 6px;
}

.tbcp-nudge-wrap .tbcp-nudge-input {
  padding-right: 58px;
  text-align: center;
}

.tbcp-nudge-btn {
  flex: none;
  width: 30px;
  height: 30px;
  border-radius: 0;
  border: 1px solid var(--tbc-border);
  background: var(--tbc-panel-raised);
  color: var(--tbc-ink);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 120ms ease, color 120ms ease;
}

.tbcp-nudge-btn:first-child { order: -1; }

.tbcp-nudge-btn:hover {
  border-color: var(--tbc-glow-dim);
  color: var(--tbc-glow);
}

.tbcp-nudge-hint {
  grid-column: 1 / -1;
  margin: 6px 0 0;
  font-size: 11.5px;
  color: var(--tbc-ink-faint);
  line-height: 1.5;
}

/* ---------- probe-reads radio group ---------- */
.tbcp-radio-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 2px;
}

.tbcp-radio {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font-size: 12.5px;
  color: var(--tbc-ink-muted);
  line-height: 1.45;
  cursor: pointer;
}

.tbcp-radio input[type="radio"] {
  flex: none;
  margin-top: 2px;
  accent-color: var(--tbc-glow);
}

/* ---------- safety check cards ---------- */
.tbcp-safety-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 4px;
}

.tbcp-safety-card {
  background: var(--tbc-panel-raised);
  border: 1px solid var(--tbc-border-soft);
  border-radius: 0;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tbcp-safety-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.tbcp-safety-card-head h3 {
  font-family: var(--tbc-font-display);
  font-size: 14px;
  font-weight: 600;
  color: var(--tbc-ink);
  margin: 0;
}

.tbcp-safety-badge {
  flex: none;
  font-family: var(--tbc-font-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 9px;
  border-radius: 0;
  border: 1px solid var(--tbc-border);
  color: var(--tbc-ink-faint);
  background: transparent;
  white-space: nowrap;
}

.tbcp-safety-badge.is-ok {
  color: var(--tbc-safe);
  border-color: rgba(0, 0, 0, 0.25);
  background: rgba(0, 0, 0, 0.04);
}

.tbcp-safety-badge.is-warn {
  color: var(--tbc-warn);
  border-color: rgba(0, 0, 0, 0.25);
  background: var(--tbc-warn-soft);
}

.tbcp-safety-badge.is-danger {
  color: var(--tbc-danger);
  border-color: rgba(0, 0, 0, 0.35);
  background: var(--tbc-danger-soft);
}

.tbcp-safety-readout {
  margin: 0;
  font-size: 13px;
  color: var(--tbc-ink);
  line-height: 1.5;
}

.tbcp-safety-readout strong {
  font-family: var(--tbc-font-mono);
  color: var(--tbc-glow);
}

.tbcp-safety-footnote {
  margin: 0;
  font-size: 11px;
  color: var(--tbc-ink-faint);
  line-height: 1.5;
}

/* ---------- responsive ---------- */
/* ---------- Tier 2: "Understanding this calculator" accordion prose ---------- */
/* Typography intentionally mirrors .dm-article h3/p (the guide-page prose
   this accordion links out to) so the two read as one consistent voice. */
.tbc-bench-prose {
  margin-top: 14px;
}
.tbc-bench-prose h3 {
  font-family: var(--tbc-font-display);
  font-size: 14.5px;
  font-weight: 600;
  color: var(--tbc-glow);
  margin: 20px 0 8px;
}
.tbc-bench-prose h3:first-child { margin-top: 0; }
.tbc-bench-prose p {
  font-size: 14px;
  line-height: 1.75;
  color: var(--tbc-ink-muted);
  margin: 0 0 14px;
}
.tbc-bench-prose p:last-child { margin-bottom: 0; }
.tbc-bench-prose strong { color: var(--tbc-ink); font-weight: 600; }
.tbc-bench-prose ul {
  margin: 0 0 14px;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 14px;
  line-height: 1.75;
  color: var(--tbc-ink-muted);
}
.tbc-bench-prose li { margin: 0; }
.tbc-bench-prose a { color: var(--tbc-glow); text-decoration: underline; }
.tbc-bench-prose a:hover { color: #333333; }

@media (max-width: 640px) {
  .tbcp-safety-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .tbcp-nudge-btn { transition: none; }
}
.tbc-export-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 4px 0 12px;
  justify-content: flex-end;
}
.tbc-export-btn {
  appearance: none;
  border: 1px solid var(--tbc-border);
  background: var(--tbc-panel-raised);
  color: var(--tbc-ink);
  font-family: var(--tbc-font-body);
  font-size: 13px;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 0;
  cursor: pointer;
}
.tbc-export-btn:hover {
  border-color: var(--tbc-glow);
  color: var(--tbc-glow);
}
.tbc-export-btn:active {
  transform: scale(0.98);
}

/* ========== Desktop 2-column (forced) ========== */
body:has(#tube-bias-calculator) .dm-page {
  max-width: 1520px !important;
}
#tube-bias-calculator.tbc,
section#tube-bias-calculator {
  max-width: 1480px !important;
  width: 100%;
}
.vo-desktop-cols {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 20px 24px;
  align-items: start;
}
.vo-col { min-width: 0; overflow: visible; }
.vo-col-left,
.vo-col-right {
  container-type: inline-size;
  container-name: vo-col;
  overflow: visible;
  min-width: 0;
}
.vo-col-left {
  padding-right: 8px;
  border-right: 1px solid var(--tbc-border-soft, #dddddd);
}
.vo-col-right { padding-left: 4px; }
.vo-full { grid-column: 1 / -1; }
.vo-col-left .tbc-setup {
  display: block !important;
  max-width: none !important;
}
.vo-col-right .tbc-readout { margin-top: 0; }
.vo-col-right .tbcp-safety-grid { margin-top: 8px; }

/* Mode tabs: ALWAYS 2x2 inside left column so labels never clip under right col */
.vo-desktop-cols .vo-col-left .tbc-modes,
.vo-col-left .tbc-modes,
#tube-bias-calculator .vo-col-left .tbc-modes {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  overflow-x: visible !important;
  overflow: visible !important;
  gap: 2px 6px !important;
  max-width: 100% !important;
  width: 100% !important;
  flex-wrap: wrap !important;
}
.vo-desktop-cols .vo-col-left .tbc-mode-btn,
.vo-col-left .tbc-mode-btn,
#tube-bias-calculator .vo-col-left .tbc-mode-btn {
  flex: none !important;
  margin-right: 0 !important;
  margin-left: 0 !important;
  text-align: center !important;
  white-space: normal !important;
  line-height: 1.2 !important;
  font-size: 11.5px !important;
  padding: 8px 3px 10px !important;
  border-bottom: 2px solid var(--tbc-border-soft, #dddddd) !important;
  min-width: 0 !important;
  max-width: 100% !important;
  width: auto !important;
  box-sizing: border-box !important;
}
.vo-desktop-cols .vo-col-left .tbc-mode-btn.is-active,
.vo-col-left .tbc-mode-btn.is-active {
  border-bottom-color: var(--tbc-glow, #000000) !important;
}

@media (max-width: 980px) {
  body:has(#tube-bias-calculator) .dm-page {
    max-width: 1080px !important;
  }
  .vo-desktop-cols {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .vo-col-left {
    padding-right: 0;
    border-right: none;
    border-bottom: 1px solid var(--tbc-border-soft, #dddddd);
    padding-bottom: 18px;
    margin-bottom: 8px;
  }
  .vo-col-right { padding-left: 0; }
}


/* Left-column section spacing (match scope) */
.vo-col-left .tbc-setup {
  margin-bottom: 28px !important;
}
.vo-col-left .tbc-class-select {
  margin-top: 8px;
  margin-bottom: 28px !important;
}
.vo-col-left .tbcp-step-label {
  margin-top: 36px !important;
  margin-bottom: 14px !important;
}
.vo-col-left .tbc-modes {
  margin-bottom: 22px !important;
}
.vo-col-left .tbc-panel {
  margin-top: 8px;
}
.vo-col-left .tbc-eyebrow {
  margin-top: 44px !important;
  margin-bottom: 14px !important;
}
.vo-col-left .tbc-eyebrow:first-child {
  margin-top: 0 !important;
}
.vo-col-left .tbc-hint {
  margin-bottom: 22px !important;
}
