/* The estimator. Every control is at least 44px tall for thumbs. */
.tool { margin-top: 1rem; }
.tool-fallback { color: var(--muted); }
.banner { display: flex; gap: .75rem; align-items: flex-start; background: var(--amber-soft); border: 1px solid #fde68a; color: var(--amber); border-radius: 12px; padding: 10px 12px; font-size: .88rem; margin-bottom: 1rem; }
.banner p { margin: 0; flex: 1; }
.banner button { background: none; border: 0; color: var(--amber); font-size: 1.4rem; line-height: 1; cursor: pointer; min-width: 32px; min-height: 32px; }

.progress { list-style: none; display: flex; justify-content: space-between; padding: 0; margin: 0 0 .5rem; }
.progress li { flex: 1; display: flex; flex-direction: column; align-items: center; gap: .2rem; font-size: .75rem; color: var(--faint); }
.progress .dot { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; background: #f1f5f9; color: var(--faint); }
.progress .done .dot, .progress .current .dot { background: var(--blue); color: #fff; }
.progress .current .dot { box-shadow: 0 0 0 4px #dbeafe; }
.progress .current { color: var(--blue); font-weight: 600; }
.bar { height: 6px; background: #f1f5f9; border-radius: 99px; overflow: hidden; margin-bottom: 1.25rem; }
.bar span { display: block; height: 100%; background: var(--blue); border-radius: 99px; transition: width .4s; }

.card h2 { margin-top: 0; }
.sub { color: var(--muted); margin: 0 0 1.25rem; font-size: .92rem; }
.field { border: 0; padding: 0; margin: 0 0 1.5rem; min-width: 0; }
.field legend, .field label, .label-text { font-weight: 600; color: var(--ink); font-size: .92rem; padding: 0; }
.label-row { display: flex; align-items: center; gap: .4rem; justify-content: space-between; }
.label-row > :first-child { flex: 1; }
.hint { color: var(--muted); font-size: .82rem; margin: .2rem 0 .5rem; }
.help { flex: none; width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--rule); background: #fff; color: var(--muted); font-weight: 700; font-size: .8rem; cursor: pointer; }
.help:hover { color: var(--blue); border-color: var(--blue); }

.input-wrap { position: relative; }
.input-wrap.narrow { max-width: 160px; }
.prefix, .suffix { position: absolute; top: 50%; transform: translateY(-50%); color: var(--faint); font-weight: 600; pointer-events: none; }
.prefix { left: 14px; } .suffix { right: 14px; font-size: .85rem; }
.amount, select { width: 100%; min-height: 48px; border: 2px solid var(--rule); border-radius: 12px; font: 600 1.05rem var(--sans); color: var(--ink); padding: 10px 14px; background: #fff; }
.has-prefix .amount { padding-left: 30px; }
.has-suffix .amount { padding-right: 52px; }
.amount.big { font-size: 1.25rem; }
.amount:focus, select:focus { outline: none; border-color: var(--blue); }
.range { width: 100%; margin-top: .6rem; accent-color: var(--blue); height: 28px; }

.choices { display: grid; gap: .6rem; }
.choices.two { grid-template-columns: 1fr; }
.choices.kids { grid-template-columns: repeat(4, 56px); }
.choice { min-height: 52px; border: 2px solid var(--rule); background: #fff; border-radius: 12px; font: 600 .95rem var(--sans); color: var(--text); cursor: pointer; text-align: left; padding: 0 16px; }
.kids .choice { text-align: center; padding: 0; font-size: 1.1rem; }
.choice[aria-pressed="true"] { border-color: var(--blue); background: var(--blue-soft); color: var(--blue-dark); }
.kids .choice[aria-pressed="true"] { background: var(--blue); color: #fff; }

.note { background: #f1f5f9; border-radius: 12px; padding: 12px 14px; }
.note p { margin: .1rem 0; }
.note-label { font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 700; }
.note-value { font-size: 1.6rem; font-weight: 700; color: var(--ink); }
.note.good { background: var(--green-soft); color: var(--green); }
.found { color: var(--green); font-weight: 600; font-size: .88rem; margin: -1rem 0 1.25rem; }
.field .found { margin: .3rem 0 0; }

.switch-row { display: flex; gap: 1rem; align-items: flex-start; justify-content: space-between; border: 2px solid var(--rule); border-radius: 12px; padding: 12px 14px; margin-bottom: 1.5rem; }
.switch { flex: none; width: 52px; height: 30px; border-radius: 99px; border: 0; background: #cbd5e1; position: relative; cursor: pointer; margin-top: 4px; }
.switch span { position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: transform .2s; }
.switch[aria-checked="true"] { background: var(--blue); }
.switch[aria-checked="true"] span { transform: translateX(22px); }
.finder { border-top: 1px solid var(--rule); padding-top: 1rem; }
.credit { display: flex; justify-content: space-between; align-items: center; gap: .5rem; border: 1px solid var(--rule); background: #f8fafc; border-radius: 12px; padding: 10px 12px; margin-bottom: .5rem; font-size: .9rem; color: var(--faint); }
.credit.yes { background: var(--green-soft); color: var(--green); border-color: #a7f3d0; }

.nav { display: flex; justify-content: space-between; gap: 1rem; margin-top: 1rem; }
.nav button, .danger { min-height: 48px; padding: 0 24px; border-radius: 12px; font: 700 .95rem var(--sans); cursor: pointer; border: 2px solid transparent; }
.primary { background: var(--blue); color: #fff; }
.primary:hover { background: var(--blue-dark); }
.secondary { background: #fff; border-color: var(--rule) !important; color: var(--text); }
.secondary:disabled { opacity: .35; cursor: default; }
.dark { background: #1e293b; color: #fff; }

.summary { background: linear-gradient(135deg, #1e293b, #1e3a8a); color: #fff; border-radius: var(--radius); padding: 22px; margin-bottom: 1rem; }
.summary p { margin: 0; }
.summary-label { color: #bfdbfe; font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; font-weight: 700; }
.summary-big { font-size: 2.6rem; font-weight: 800; line-height: 1.15; font-variant-numeric: tabular-nums; }
.summary-sub { color: #93c5fd; font-size: .9rem; margin-bottom: 1rem !important; }
.summary-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.summary-tiles div { background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .12); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; }
.summary-tiles small { color: #bfdbfe; font-size: .72rem; }
.summary-tiles b { font-size: 1.3rem; }
.summary-credits { margin-top: .75rem !important; display: flex; justify-content: space-between; background: rgba(16, 185, 129, .2); border-radius: 10px; padding: 8px 12px; font-size: .85rem; }

.grid2 { display: grid; gap: 1rem; margin-bottom: 1rem; }
.card .panel { margin-bottom: 1rem; padding: 16px; }
.card .panel h3 { margin-top: 0; }
.donut { width: 180px; height: 180px; display: block; margin: .5rem auto; }
.legend { list-style: none; padding: 0; margin: .5rem 0 0; font-size: .85rem; }
.legend li { display: flex; align-items: center; gap: .5rem; padding: .15rem 0; }
.legend b { margin-left: auto; color: var(--ink); }
.swatch { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.breakdown .section { font-size: .7rem; font-weight: 700; color: var(--faint); text-transform: uppercase; letter-spacing: .08em; margin: .9rem 0 .2rem; }
.row { display: flex; justify-content: space-between; align-items: flex-start; gap: .75rem; padding: .45rem 0; border-bottom: 1px solid #f1f5f9; font-size: .88rem; }
.row > div { display: flex; flex-wrap: wrap; align-items: center; gap: .1rem .35rem; }
.row small { flex-basis: 100%; color: var(--faint); font-size: .75rem; }
.row b { font-variant-numeric: tabular-nums; color: var(--ink); white-space: nowrap; }
.row .help { width: 22px; height: 22px; font-size: .7rem; }
.row.total { border-top: 2px solid var(--rule); border-bottom: 0; font-weight: 700; }
.credit-amt { color: var(--green) !important; }
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; margin: .5rem 0; }
.tile { background: #f8fafc; border: 1px solid var(--rule); border-radius: 12px; padding: 8px; text-align: center; display: flex; flex-direction: column; }
.tile small { font-size: .7rem; color: var(--muted); }
.tile b { color: var(--ink); }
.tile.good { background: var(--green-soft); } .tile.good b { color: var(--green); }
.quarters { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.quarter { background: #f8fafc; border: 1px solid var(--rule); border-radius: 12px; padding: 10px; text-align: center; display: flex; flex-direction: column; font-size: .78rem; }
.quarter b:first-child { color: var(--blue); }
.quarter b:last-child { font-size: 1rem; color: var(--ink); margin-top: .2rem; }
.quarter small { color: var(--muted); }
.clear { text-align: center; margin: 1.25rem 0; }
.danger { background: var(--red); color: #fff; width: 100%; }
.sources { font-size: .78rem; color: var(--muted); text-align: center; }

.help-dialog { border: 0; border-radius: var(--radius); padding: 0; width: min(520px, calc(100% - 32px)); box-shadow: 0 20px 50px rgba(15, 23, 42, .3); }
.help-dialog::backdrop { background: rgba(15, 23, 42, .5); }
.help-dialog form { padding: 22px; }
.help-dialog h3 { margin-top: 0; }
.help-dialog p { font-size: .92rem; }
.eyebrow { color: var(--blue); font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; margin: 0; }
.help-dialog button { min-height: 44px; padding: 0 20px; border-radius: 12px; font-weight: 700; cursor: pointer; border: 2px solid var(--rule); background: #fff; }

@media (min-width: 640px) {
  .choices.two { grid-template-columns: 1fr 1fr; }
  .quarters { grid-template-columns: repeat(4, 1fr); }
  .summary-big { font-size: 3.2rem; }
}
@media (min-width: 900px) {
  .card[data-step="4"] .grid2 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 380px) {
  .step-label { display: none; }
}
