/* DSCR calculator — loaded only by /dscr-loans. Kept out of styles.css so that
   file's immutable cache and ?v= version don't change for every other page.
   Layout reuses .calc-grid / .calc-form / .calc-results from styles.css. */

.dscr-section .section-head { margin-bottom: 1.25rem; }
.dscr-h { font-family: var(--f-display); font-weight: 600; font-size: var(--step-1); color: var(--navy-900); margin: 0 0 .9rem; }
.dscr-h:focus { outline: none; }
.dscr-h--gap { margin-top: 1.5rem; }
.dscr-hint { margin: .3rem 0 0; font-size: .85rem; color: var(--muted); line-height: 1.45; }
.dscr-hint--lead { margin: -.4rem 0 1.1rem; font-size: .95rem; }
.dscr-err { margin: .35rem 0 0; font-size: .88rem; font-weight: 600; color: #8f2020; }
.dscr-err[hidden], .dscr-band[hidden], [id="dscr-down-field"][hidden], [id="dscr-loan-field"][hidden] { display: none; }
.dscr-section [aria-invalid="true"] { border-color: #b91c1c; }

/* iOS Safari zooms the page when a focused input is under 16px. */
.dscr-section input, .dscr-section select, .dscr-section textarea { font-size: max(16px, 1rem); }

.dscr-band {
  margin: 0 0 1.25rem; padding: .8rem 1rem; border-radius: var(--radius);
  background: rgba(255,255,255,.08); border-left: 4px solid var(--accent-2);
  color: #fff; font-size: .95rem; line-height: 1.5;
}
.dscr-band strong { display: block; margin-bottom: .15rem; }
.dscr-band[data-band="strong"], .dscr-band[data-band="covers"] { border-left-color: #4ade80; }
.dscr-band[data-band="below"] { border-left-color: #fbbf24; }
.dscr-band[data-band="low"] { border-left-color: #f87171; }

.dscr-dl { display: grid; gap: .5rem; margin: 0 0 1.25rem; padding: 1rem 0; border-top: 1px solid rgba(255,255,255,.14); border-bottom: 1px solid rgba(255,255,255,.14); }
.dscr-dl div { display: flex; justify-content: space-between; gap: 1rem; }
.dscr-dl dt { color: #cdd6e3; font-size: .95rem; }
.dscr-dl dd { margin: 0; color: #fff; font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; }
.dscr-dl .dscr-dl-total { padding: .35rem 0; border-top: 1px dashed rgba(255,255,255,.2); border-bottom: 1px dashed rgba(255,255,255,.2); }
.dscr-dl .dscr-dl-total dt, .dscr-dl .dscr-dl-total dd { color: #fff; font-weight: 700; }
.calc-results p.dscr-fine { color: #cdd6e3; margin: 0 0 1.25rem; }
.dscr-send-cta { width: 100%; justify-content: center; white-space: normal; text-align: center; }

.dscr-send { margin-top: clamp(1.25rem, 2.5vw, 2rem); scroll-margin-top: 90px; }
.dscr-form, .dscr-done { max-width: 48rem; margin-inline: auto; }
.dscr-done:focus { outline: none; }
.dscr-textarea {
  width: 100%; padding: .75rem .9rem; font: inherit; color: var(--ink); resize: vertical;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm);
}
.dscr-textarea:focus { border-color: var(--accent); outline: 2px solid rgba(199,154,58,.25); }
.dscr-form .prequal-check input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.dscr-hp { position: absolute; left: -9999px; }
.dscr-form button[aria-busy="true"] { cursor: progress; opacity: .8; }

/* Narrow phones: keep two-up rows from forcing horizontal scroll. */
@media (max-width: 520px) {
  .dscr-section .calc-row2 { grid-template-columns: minmax(0, 1fr); gap: 0; }
}
@media (max-width: 899px) {
  .dscr-section .calc-grid { grid-template-columns: minmax(0, 1fr); }
}
.hero-cta .btn, .dscr-section .cal-cta .btn { white-space: normal; text-align: center; }

/* .prequal-check > span is a flex column, which splits the consent sentence at
   every <strong>. Render it as one paragraph. */
.dscr-form .prequal-check > span { display: block; }
.dscr-form .prequal-check > span > strong:first-child { display: block; margin-bottom: .2rem; }
.dscr-form .prequal-check > span strong { font-size: inherit; }
