/* Scope variables to the ALTA widget only */
#alta-blc-isolated {
  --alta-primary:#0067ab;
  --ink:#0e1726; --muted:#5b6b7a; --bg:#f7f9fb; --card:#ffffff; --ring: rgba(0,103,171,0.25);
  --ok:#0a8f5b; --warn:#9b8700; --bad:#b23b3b; --shadow: 0 10px 30px rgba(0,0,0,.06), 0 2px 6px rgba(0,0,0,.06);
  --radius:16px;
}

/* Isolation */
#alta-blc-isolated { all: revert; width: 100%; margin: 0 auto; }
#alta-blc-isolated *, #alta-blc-isolated *::before, #alta-blc-isolated *::after { box-sizing: border-box; }
@media (min-width:1024px){ #alta-blc-isolated { width: 50%; } }

.alta-blc { font-family: system-ui, -apple-system, Segoe UI, Roboto, Inter, Arial, sans-serif; color: var(--ink); }
.alta-blc .wrap { background: var(--bg); padding: 24px; border-radius: var(--radius); box-shadow: var(--shadow); }
.alta-blc .hdr { display: grid; gap: 6px; margin-bottom: 16px; }
.alta-blc .eyebrow { color: var(--alta-primary); font-weight: 700; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; }
.alta-blc h2 { margin: 0; font-size: 26px; line-height: 1.2; }
.alta-blc .sub { color: var(--muted); font-size: 14px; }

.alta-blc .grid { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width:980px){ .alta-blc .grid { grid-template-columns: minmax(480px, 1fr) 420px; } }

.alta-blc .calc-panel { background: #fff; border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.alta-blc .calc-panel h3 { margin: 0 0 8px; font-size: 16px; color: #fff; font-weight: 600; }

.alta-blc .field { display: grid; grid-template-columns: 160px 1fr; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid #eef2f6; }
.alta-blc .field:last-child { border-bottom: 0; }
@media (max-width:520px){ .alta-blc .field { grid-template-columns: 1fr; } }
.alta-blc label { font-weight: 600; }

.alta-blc input[type="number"], .alta-blc input[type="text"], .alta-blc select {
  width: 100%; border: 1px solid #d7dee6; border-radius: 12px; padding: 10px 12px; background: #fff;
  outline: none; transition: box-shadow .2s ease, border-color .2s ease;
}
.alta-blc input:focus, .alta-blc select:focus { border-color: var(--alta-primary); box-shadow: 0 0 0 6px var(--ring); }

.alta-blc .hint { color: var(--muted); font-size: 12px; margin-top: 6px; }

.alta-blc .radios { display: flex; flex-wrap: wrap; gap: 8px; }
.alta-blc .radios label { display: flex; gap: 8px; align-items: center; background: #fff; border: 1px solid #dfe7ef; padding: 8px 10px; border-radius: 10px; cursor: pointer; }
.alta-blc .radios input { accent-color: var(--alta-primary); }

.alta-blc .stats { display: grid; gap: 12px; }
.alta-blc .stat { background: #fff; border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow); border-left: 5px solid var(--ok); }
.alta-blc .stat h4 { margin: 0; font-size: 12px; color: var(--muted); font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.alta-blc .stat .num { font-size: clamp(24px, 4vw, 36px); font-weight: 800; margin-top: 4px; line-height: 1.1; font-variant-numeric: tabular-nums; font-feature-settings: 'tnum' 1; white-space: nowrap; min-width: 12ch; text-align: right; }

.alta-blc .brandbar { display: flex; align-items: center; justify-content: space-between; background: linear-gradient(120deg, var(--alta-primary), #2a96df); color: #fff; border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow); }
.alta-blc .brandbar h3 { margin: 0; font-size: 16px; font-weight: 700; }

.alta-blc .notes { background: #fff; border-radius: 12px; padding: 12px; border: 1px dashed #d9e3ef; }
.alta-blc .notes p { margin: 0 0 6px; font-size: 12px; color: var(--muted); }
.alta-blc .notes strong { color: var(--ink); }

/* Stepper controls for number inputs */
.alta-blc .stepper { display: flex; align-items: center; gap: 8px; }
.alta-blc .stepper button { border: 1px solid #d7dee6; background: #fff; border-radius: 10px; padding: 8px 10px; cursor: pointer; line-height: 1; font-weight: 700; }
.alta-blc .stepper button:focus { outline: none; border-color: var(--alta-primary); box-shadow: 0 0 0 6px var(--ring); }
.alta-blc .stepper input { flex: 1 1 auto; }

/* Force visible controls even if global CSS hides them */
.alta-blc input, .alta-blc select { display: block !important; opacity: 1 !important; visibility: visible !important; height: auto !important; min-height: 40px !important; }