/* First-Time Buyer Calculator — inherits the theme's fonts; handout A teal + amber accents. */
.fthb-calc {
  --fthb-teal: #0E4D64;
  --fthb-teal-dark: #0A3646;
  --fthb-teal-tint: #E9F2F4;
  --fthb-amber: #F2C46D;
  --fthb-amber-tint: #FBEFD4;
  --fthb-ink: #13232B;
  --fthb-quiet: #4F5F66;
  --fthb-line: #C9D3D7;
  --fthb-card: #FFFFFF;
  --fthb-bg: #F6F8F9;
  --fthb-good: #1E7A4C;
  --fthb-warn: #9A5B00;
  --fthb-bad: #A3322B;
  font-family: inherit;
  color: var(--fthb-ink);
  line-height: 1.5;
  font-size: 16px;
}
.fthb-calc *, .fthb-calc *::before, .fthb-calc *::after { box-sizing: border-box; }
.fthb-calc [hidden] { display: none !important; }
.fthb-inner { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 20px; }
.fthb-head { display: flex; flex-direction: column; gap: 6px; }
.fthb-eyebrow { margin: 0; font-size: 13px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--fthb-teal); }
.fthb-title { margin: 0; font-size: clamp(26px, 5vw, 36px); line-height: 1.1; color: var(--fthb-ink); text-wrap: balance; }
.fthb-lede { margin: 0; color: var(--fthb-quiet); max-width: 60ch; }

.fthb-card { background: var(--fthb-card); border: 1px solid var(--fthb-line); border-radius: 14px; padding: 20px; }
.fthb-card h3 { margin: 0 0 14px; font-size: 20px; color: var(--fthb-ink); }
.fthb-card h4 { margin: 16px 0 8px; font-size: 16px; }
.fthb-sec-title { margin: 8px 0 4px; font-size: 22px; }

.fthb-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 18px; }
.fthb-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 18px; }
.fthb-pair > [hidden] { display: none; }
@media (max-width: 560px) { .fthb-grid, .fthb-pair { grid-template-columns: minmax(0, 1fr); } .fthb-card { padding: 16px; } }

.fthb-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; margin-bottom: 4px; }
.fthb-field label, .fthb-yn legend { font-weight: 600; font-size: 15px; }
.fthb-calc input[type="text"], .fthb-calc input[type="email"], .fthb-calc input:not([type]), .fthb-calc select {
  width: 100%; min-height: 46px; padding: 10px 12px; font: inherit; color: var(--fthb-ink);
  background: #fff; border: 1.5px solid var(--fthb-line); border-radius: 10px;
}
.fthb-calc input:focus-visible, .fthb-calc select:focus-visible, .fthb-calc button:focus-visible, .fthb-calc a:focus-visible, .fthb-calc summary:focus-visible {
  outline: 3px solid var(--fthb-amber); outline-offset: 2px; border-color: var(--fthb-teal);
}
.fthb-money { position: relative; }
.fthb-money span { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--fthb-quiet); pointer-events: none; }
.fthb-money input { padding-left: 26px !important; }
.fthb-help { margin: 0; font-size: 13.5px; color: var(--fthb-quiet); }
.fthb-check { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; cursor: pointer; padding: 6px 0; }
.fthb-check input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--fthb-teal); flex: none; }
.fthb-checks { justify-content: flex-end; }
.fthb-yn { border: 0; padding: 0; margin: 0 0 14px; display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; }
.fthb-yn legend { width: 100%; margin-bottom: 6px; }
.fthb-yn label { display: inline-flex; gap: 8px; align-items: center; min-height: 40px; cursor: pointer; }
.fthb-yn input { width: 20px; height: 20px; accent-color: var(--fthb-teal); }

.fthb-out { margin-top: 18px; }
.fthb-empty { margin: 0; color: var(--fthb-quiet); }
.fthb-result { background: var(--fthb-teal); color: #fff; border-radius: 12px; padding: 20px; display: flex; flex-direction: column; gap: 10px; }
.fthb-result p { margin: 0; }
.fthb-result .fthb-kicker { font-size: 14px; color: #D7E7EC; }
.fthb-big { font-size: clamp(28px, 6vw, 40px); font-weight: 800; line-height: 1.05; color: var(--fthb-amber); font-variant-numeric: tabular-nums; }
.fthb-result .fthb-kv dt { color: #D7E7EC; }
.fthb-result .fthb-kv div { border-color: rgba(255,255,255,.18); }
.fthb-assume { font-size: 12.5px; color: #BFD6DD; }

.fthb-kv { margin: 6px 0; display: flex; flex-direction: column; }
.fthb-kv div { display: flex; justify-content: space-between; gap: 16px; padding: 8px 0; border-bottom: 1px solid var(--fthb-line); }
.fthb-kv div:last-child { border-bottom: 0; }
.fthb-kv dt { margin: 0; color: var(--fthb-quiet); min-width: 0; }
.fthb-kv dd { margin: 0; font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }

.fthb-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.fthb-btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 10px 18px;
  font: inherit; font-weight: 700; font-size: 15px; text-decoration: none; cursor: pointer;
  color: var(--fthb-teal); background: #fff; border: 2px solid var(--fthb-teal); border-radius: 999px;
}
.fthb-btn:hover { background: var(--fthb-teal-tint); color: var(--fthb-teal-dark); }
.fthb-btn-primary { background: var(--fthb-teal); color: #fff; }
.fthb-btn-primary:hover { background: var(--fthb-teal-dark); color: #fff; }
.fthb-btn-quiet { border-width: 1.5px; font-size: 14px; min-height: 40px; }
.fthb-btn[disabled] { opacity: .6; cursor: progress; }
.fthb-link { background: none; border: 0; padding: 4px 0; color: var(--fthb-teal); text-decoration: underline; cursor: pointer; font: inherit; font-size: 14px; }

.fthb-deeper { display: flex; flex-direction: column; gap: 12px; }
.fthb-step { padding: 0; }
.fthb-step summary { list-style: none; display: flex; align-items: center; gap: 12px; padding: 16px 20px; cursor: pointer; min-height: 56px; }
.fthb-step summary::-webkit-details-marker { display: none; }
.fthb-step summary::after { content: "+"; margin-left: auto; font-size: 22px; color: var(--fthb-teal); line-height: 1; }
.fthb-step[open] summary::after { content: "–"; }
.fthb-step-n { flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--fthb-teal); color: #fff; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; font-size: 15px; }
.fthb-step-t { font-weight: 700; font-size: 17px; min-width: 0; }
.fthb-step-s { font-size: 14px; color: var(--fthb-quiet); white-space: nowrap; font-variant-numeric: tabular-nums; }
.fthb-step-body { padding: 0 20px 20px; display: flex; flex-direction: column; gap: 12px; }
@media (max-width: 560px) { .fthb-step-s { display: none; } .fthb-step summary { padding: 14px 16px; } .fthb-step-body { padding: 0 16px 16px; } }

.fthb-elig { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.fthb-elig li { display: flex; gap: 12px; align-items: flex-start; }
.fthb-elig li div { display: flex; flex-direction: column; min-width: 0; }
.fthb-elig li span:not(.fthb-chip) { font-size: 14px; color: var(--fthb-quiet); }
.fthb-chip { flex: none; font-size: 12.5px; font-weight: 700; padding: 3px 10px; border-radius: 999px; margin-top: 1px; }
.fthb-chip.is-yes { background: #E3F2EA; color: var(--fthb-good); }
.fthb-chip.is-no { background: #F6E3E1; color: var(--fthb-bad); }

.fthb-flag { margin: 6px 0 0; padding: 10px 12px; border-radius: 8px; font-size: 14px; }
.fthb-flag-info { background: var(--fthb-teal-tint); }
.fthb-flag-warn { background: var(--fthb-amber-tint); color: #5C3A00; }
.fthb-flag-talk { background: var(--fthb-teal-tint); border: 1.5px solid var(--fthb-teal); }

.fthb-person { display: flex; flex-direction: column; gap: 12px; }
.fthb-person h4 { margin: 8px 0 0; }
.fthb-source { border: 1px solid var(--fthb-line); border-radius: 10px; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.fthb-counted { margin: 0; font-size: 15px; }
.fthb-total { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 12px 14px; background: var(--fthb-teal-tint); border-radius: 10px; }
.fthb-total strong { font-size: 22px; font-variant-numeric: tabular-nums; color: var(--fthb-teal); }
.fthb-docs { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 4px; }
.fthb-more summary { cursor: pointer; color: var(--fthb-teal); font-weight: 600; padding: 6px 0; }
.fthb-more[open] summary { margin-bottom: 10px; }

.fthb-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; font-size: 15px; }
.fthb-table th { text-align: left; font-weight: 400; padding: 8px 12px 8px 0; border-bottom: 1px solid var(--fthb-line); }
.fthb-table td { text-align: right; padding: 8px 0; border-bottom: 1px solid var(--fthb-line); white-space: nowrap; }
.fthb-table .fthb-sub th, .fthb-table .fthb-sub td { color: var(--fthb-quiet); }
.fthb-table .fthb-grand th, .fthb-table .fthb-grand td { font-weight: 800; background: var(--fthb-amber-tint); padding: 10px 8px; border-bottom: 0; }

.fthb-spark { margin: 4px 0; }
.fthb-spark svg { width: 100%; height: auto; display: block; }
.fthb-spark-area { fill: var(--fthb-teal-tint); }
.fthb-spark-line { fill: none; stroke: var(--fthb-teal); stroke-width: 2.5; }
.fthb-spark-goal { stroke: #B07A12; stroke-width: 1.5; stroke-dasharray: 6 5; }
.fthb-spark figcaption { font-size: 12.5px; color: var(--fthb-quiet); }

.fthb-verdict { margin: 0; font-size: 22px; font-weight: 800; }
.fthb-verdict-ready { color: var(--fthb-good); }
.fthb-verdict-almost { color: var(--fthb-warn); }
.fthb-verdict-not-yet { color: var(--fthb-bad); }

.fthb-results { display: flex; flex-direction: column; gap: 12px; }
.fthb-res-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.fthb-equity { margin: 12px 0 4px; padding: 10px 12px; background: var(--fthb-amber-tint); border-radius: 8px; }
.fthb-paths { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.fthb-path-head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.fthb-path-head span { font-variant-numeric: tabular-nums; font-weight: 700; }
.fthb-bar { height: 12px; background: var(--fthb-teal-tint); border-radius: 6px; overflow: hidden; margin: 6px 0 4px; }
.fthb-bar span { display: block; height: 100%; background: var(--fthb-teal); border-radius: 6px; }

.fthb-form { display: flex; flex-direction: column; gap: 10px; }
.fthb-hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.fthb-status { margin: 0; font-weight: 600; color: var(--fthb-teal); min-height: 1.5em; }

.fthb-foot { border-top: 1px solid var(--fthb-line); padding-top: 12px; font-size: 12.5px; color: var(--fthb-quiet); }
.fthb-foot p { margin: 0 0 4px; }
.fthb-foot a { color: var(--fthb-teal); }
@media (prefers-reduced-motion: reduce) { .fthb-calc * { scroll-behavior: auto !important; transition: none !important; } }
