/* ============================================================
 * Utilities Bunker — RMS ↔ Peak Converter (Sine Wave) (v2.1)
 * File: /assets/css/modules/electronics/rms-peak.v2.1.css
 * Purpose:
 * - Tool-only layout + KPI tiles + reference panel formatting
 * - Mobile-first, 44x44 touch targets, clamp typography
 * Notes:
 * - Do NOT modify /assets/css/ub-toolkit.v2.1.css
 * ============================================================ */

/* ============================== Local tokens (tool-scoped) ============================== */
:root{
  --rp-radius: 16px;
  --rp-gap: 14px;
}

/* ============================== Header row helper ============================== */
.ub-headrow{
  display:flex;
  gap:10px;
  justify-content:space-between;
  align-items:center;
  flex-wrap:wrap;
}

/* ============================== Tool hero layout ============================== */
.ub-hero-rp{
  display:grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: var(--rp-gap);
}

/* Tablets / small laptops: stack */
@media (max-width: 980px){
  .ub-hero-rp{
    grid-template-columns: 1fr;
  }
}

/* ============================== Reference panel (lab) ============================== */
.ub-lab-rp{
  background: var(--ub-surface-2);
  border: 1px solid var(--ub-border);
  border-radius: var(--rp-radius);
  padding: 12px;
}

.ub-lab-top{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap: 10px;
  flex-wrap:wrap;
  margin-bottom: 8px;
}

.ub-lab-title{
  font-size: clamp(13px, 1.2vw, 14px);
  font-weight: 950;
  letter-spacing: .01em;
}

.ub-lab-sub{
  font-size: 12px;
  color: var(--ub-muted);
  margin-top: 2px;
}

/* ============================== KPI tiles ============================== */
.ub-kpis{
  display:flex;
  flex-wrap:wrap;
  gap: 8px;
  justify-content:flex-end;
}

.ub-kpi{
  min-width: 112px;
  padding: 8px 10px;
  border-radius: 14px;
  border: 1px solid var(--ub-border);
  background: var(--ub-card-bg);
}

.ub-kpi .k{
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--ub-muted);
}

.ub-kpi .v{
  font-family: var(--ub-mono);
  font-weight: 950;
  font-size: 14px;
  margin-top: 2px;
}

/* ============================== Quick facts rows ============================== */
.ub-facts{
  margin-top: 10px;
  display:grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.ub-fact{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 10px;
  padding: 10px 12px;
  min-height: 44px;
  border-radius: 14px;
  border: 1px solid var(--ub-border);
  background: var(--ub-card-bg);
}

.ub-fact .k{
  font-weight: 950;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--ub-muted);
}

.ub-fact .v code{
  font-family: var(--ub-mono);
  font-weight: 950;
  font-size: 13px;
}

/* ============================== Presets row ============================== */
.ub-preset-row{
  display:flex;
  flex-wrap:wrap;
  gap: 10px;
  margin-top: 10px;
}

.ub-preset-row .ub-chip{
  min-height: 44px;
  padding: 10px 12px;
}

/* ============================== Tool text helpers ============================== */
.ub-work{
  font-family: var(--ub-mono);
  font-size: 13px;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap:anywhere;
}

/* Details/summary polish (tool enhancement; safe if toolkit already defines) */
.ub-collapsible summary{
  cursor:pointer;
  font-weight: 950;
  min-height: 44px;
  display:flex;
  align-items:center;
}

.ub-collapsible summary:focus{
  outline: none;
  box-shadow: 0 0 0 4px var(--ub-focus);
  border-radius: 12px;
}

/* FAQ typography (keep it compact like a tool, not a blog) */
.ub-faq-q{
  margin:12px 0 6px;
  font-size: 14px;
  font-weight: 950;
}

.ub-faq-a{
  font-size: 13px;
  color: var(--ub-text);
}

/* Rail buttons full width (tool-only helper) */
.ub-btn--block{
  width: 100%;
}

/* Separator in form (if you used ub-hr) */
.ub-hr{
  border:none;
  border-top: 1px solid var(--ub-border);
  margin: 14px 0;
}

/* Small screens polish */
@media (max-width: 520px){
  .ub-kpi{ min-width: 98px; }
  .ub-fact{ padding: 10px; }
}
