/* ============================================================
   Utilities Bunker — Annuity Calculator (v2.1)
   File: /assets/css/modules/calculators/financialcalculators/annuity-calculator.v2.1.css
   Purpose:
   - Tool-only layout + overview lab + work formatting
   - Mobile-first, 44×44 targets, clamp typography
   - No changes to ub-toolkit.v2.1.css
   ============================================================ */

/* Tool-scoped tokens */
:root{
  --ann-radius: 16px;
  --ann-gap: 14px;
}

/* Header row aligns title + theme button like Ohm’s Law */
.ub-headrow{
  display:flex;
  gap:10px;
  justify-content:space-between;
  align-items:center;
  flex-wrap:wrap;
}
.ub-h1-tight{
  margin:0;
  font-size:var(--ub-fs-5);
  letter-spacing:-0.02em;
}

/* Simple list helpers to keep markup clean */
.ub-ol{
  margin:0;
  padding-left:18px;
}
.ub-ul{
  margin:0;
  padding-left:18px;
}
.ub-h3{
  margin:12px 0 6px;
  font-size:var(--ub-fs-3);
  font-weight:950;
}

/* Divider in the input card */
.ub-hr{
  border:none;
  border-top:1px solid var(--ub-border);
  margin:14px 0;
}

/* ==============================
   Hero layout (Overview + Inputs)
   ============================== */
.ub-hero-annuity{
  display:grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: var(--ann-gap);
}
@media (max-width: 980px){
  .ub-hero-annuity{ grid-template-columns: 1fr; }
}

/* ==============================
   Overview Lab (left)
   ============================== */
.ub-annuity-lab{
  background: var(--ub-surface-2);
  border: 1px solid var(--ub-border);
  border-radius: var(--ann-radius);
  padding: 12px;
}

/* Reuse the Ohm-style lab header classes, define if missing */
.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: 140px;
  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;
}

/* Output block sits nicely inside lab */
#labOut{
  margin-top: 10px;
}

/* Mini notes panel */
.ub-minihelp{
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid var(--ub-border);
  background: var(--ub-card-bg);
}
.ub-minihelp-title{
  font-size: 11px;
  font-weight: 950;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ub-muted);
  margin-bottom: 6px;
}
.ub-minihelp-list{
  list-style: none;
  margin: 0;
  padding: 0;
}
.ub-minihelp-list li{
  padding: 6px 0;
  border-top: 1px solid var(--ub-border);
  font-size: 13px;
}
.ub-minihelp-list li:first-child{
  border-top: none;
}

/* ==============================
   Input chips row
   ============================== */
.ub-rowchips{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  align-items:center;
}
.ub-rowchips .ub-chip{
  min-height: 44px;
  padding: 10px 12px;
}

/* Make radio + checkbox inside chips consistent */
.ub-rowchips input[type="radio"],
.ub-rowchips input[type="checkbox"]{
  width:18px;
  height:18px;
  margin:0;
  accent-color: var(--ub-btn-grad-b);
}

/* ==============================
   Preset row under inputs
   ============================== */
.ub-preset-row{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-top: 10px;
}
.ub-preset-row .ub-chip{
  min-height: 44px;
  padding: 10px 12px;
}

/* ==============================
   Work area formatting
   ============================== */
.ub-work{
  font-family: var(--ub-mono);
  font-size: 13px;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap:anywhere;
}

/* Details/summary focus polish (tool enhancement only) */
.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;
}

/* ==============================
   Small screens
   ============================== */
@media (max-width: 520px){
  .ub-kpi{ min-width: 120px; }
}