/* Heat pump cost calculator: layout only. Colours, type and motion come from
   the tokens and components in site.css. The result cards are written by
   heat-pump.js, so their classes (hp-card, hp-bars, hp-row ...) are styled here. */

/* Hero has no stats row, so keep room under the buttons. */
#hp-hero .hero-grid { padding-bottom: clamp(48px, 6vw, 88px); }
/* Copy on the left, grant card on the right; the title is sized for the narrower column. */
#hp-hero .hero-title { font-size: clamp(34px, 3.9vw, 56px); }
.hp-grant-card .price-big { font-size: clamp(40px, 4vw, 56px); }
.hp-grant-row { display: flex; flex-direction: column; gap: 8px; }
.hp-grant-row + .hp-grant-row { padding-top: 18px; border-top: 1px solid rgba(255,255,255,.10); }
.hp-grant-note { padding-top: 18px; border-top: 1px solid rgba(255,255,255,.10); }
.hp-grant-note a { color: var(--accent-soft); font-weight: 500; white-space: nowrap; }

/* Form and result side by side; one column on tablets and phones. */
.hp-tool { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(24px, 3vw, 40px); align-items: start; }
@media (max-width: 900px) { .hp-tool { grid-template-columns: minmax(0, 1fr); } }
/* The hidden attribute must win over the display set by .card and .form-field. */
.hp-tool [hidden] { display: none !important; }

/* Form */
.hp-form { min-width: 0; }
.hp-form-title { font-size: clamp(28px, 3vw, 36px); line-height: 1.1; }
.hp-step { margin: 0; padding: 0; border: 0; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.hp-step + .hp-step { padding-top: 24px; border-top: 1px solid var(--line); }
.hp-legend { padding: 0; margin: 0 0 4px; font: 600 18px/1.3 var(--f-disp); letter-spacing: -0.01em; color: var(--ink); }
.hp-form .hp-hint { display: block; font-size: 14px; line-height: 1.5; color: var(--text-3); }
.hp-form .hp-form-foot { margin-top: -4px; }
.hp-money { position: relative; }
.hp-money > span { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); font-size: 16px; color: var(--text-2); pointer-events: none; }
.hp-money input { padding-left: 32px; }
.hp-submit { width: 100%; margin-top: 8px; }

/* Empty state and result column */
.hp-result-wrap { min-width: 0; }
.hp-empty { display: flex; flex-direction: column; gap: 14px; padding: clamp(28px, 4vw, 48px); border-radius: var(--radius); border: 1px dashed var(--line-2); background: var(--white); }
.hp-empty .hp-empty-title { font: 600 clamp(24px, 2.6vw, 30px)/1.15 var(--f-disp); letter-spacing: -0.03em; color: var(--ink); }
.hp-empty p { font-size: 16px; color: var(--text-2); }
.hp-result { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.hp-result-head { display: flex; flex-direction: column; gap: 10px; }
.hp-eyebrow { margin: 0; font: 400 13px/1.3 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--accent-ink); }
.hp-result-title { margin: 0; font: 600 clamp(30px, 3.6vw, 44px)/1.05 var(--f-disp); letter-spacing: -0.032em; color: var(--ink); }
.hp-result-sub { margin: 0; font-size: 17px; color: var(--text-2); }
.hp-warn { padding: 16px 20px; border-radius: 16px; background: var(--accent-wash); border: 1px solid var(--accent-soft); font-size: 15px; color: var(--text); }

/* Result cards */
.hp-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); gap: 20px; }
.hp-card { display: flex; flex-direction: column; gap: 12px; min-width: 0; padding: 28px; border-radius: var(--radius); background: var(--white); border: 1px solid var(--line); color: var(--ink); }
.hp-card p { margin: 0; }
.hp-wide { grid-column: 1 / -1; }
.hp-banner.hp-yes { background: var(--mint-wash); border-color: var(--mint-line); }
.hp-banner.hp-no { background: var(--paper); border-color: var(--line-2); }
.hp-card-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font: 400 13px/1.3 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--accent-ink); }
.hp-yes .hp-card-head { color: var(--mint-ink); }
.hp-pill { display: inline-block; padding: 5px 11px; border-radius: 999px; font: 400 12px/1.2 var(--f-mono); letter-spacing: 0; text-transform: none; white-space: nowrap; background: var(--mint-bg); color: var(--mint-ink); }
.hp-no .hp-pill { background: var(--line); color: var(--text-2); }
.hp-card-title { font: 600 clamp(24px, 2.6vw, 32px)/1.1 var(--f-disp); letter-spacing: -0.03em; color: var(--ink); }
.hp-card-sub, .hp-card-body { font-size: 16px; line-height: 1.55; color: var(--text-2); }
.hp-big { font: 600 clamp(34px, 4vw, 48px)/1 var(--f-disp); letter-spacing: -0.035em; color: var(--ink); }
.hp-note, .hp-foot { font-size: 14px; line-height: 1.55; color: var(--text-3); }
.hp-env { margin-top: 4px; }
.hp-small { display: flex; flex-direction: column; gap: 8px; padding-left: 20px; font-size: 15px; line-height: 1.55; color: var(--text-2); list-style: disc; }
.hp-result a:not(.btn), .hp-guide a:not(.btn) { color: var(--accent-ink); text-underline-offset: 3px; }

/* Annual cost bars */
.hp-bars { display: flex; flex-direction: column; gap: 14px; }
.hp-row { display: grid; grid-template-columns: minmax(110px, 1fr) minmax(0, 2fr) auto; align-items: center; gap: 6px 14px; font-size: 15px; color: var(--text-2); }
.hp-lbl { color: var(--text-2); }
.hp-is-current .hp-lbl { color: var(--ink); font-weight: 600; }
.hp-is-hp .hp-lbl { color: var(--accent-ink); font-weight: 600; }
.hp-tag { display: inline-block; margin-left: 6px; padding: 3px 9px; border-radius: 999px; font: 400 11px/1.2 var(--f-mono); letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; background: var(--blue-bg); color: var(--blue-ink); }
.hp-track { display: block; height: 10px; border-radius: 99px; background: var(--line); overflow: hidden; }
.hp-bar { display: block; height: 100%; border-radius: 99px; background: var(--line-2); transition: width .6s var(--ease); }
.hp-is-hp .hp-bar { background: var(--accent); }
.hp-amt { font: 600 16px/1 var(--f-disp); color: var(--ink); text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
@media (max-width: 560px) {
  .hp-row { grid-template-columns: minmax(0, 1fr) auto; }
  .hp-lbl { grid-row: 1; grid-column: 1; }
  .hp-amt { grid-row: 1; grid-column: 2; }
  .hp-track { grid-row: 2; grid-column: 1 / -1; }
}

/* Next step card and sources */
.hp-next { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; }
.hp-next > div { display: flex; flex-direction: column; gap: 8px; max-width: 60ch; }
.hp-sources { border-top: 1px solid var(--line); }
.hp-sources summary { list-style: none; cursor: pointer; padding: 14px 0; font: 600 16px/1.4 var(--f-sans); color: var(--ink); }
.hp-sources summary::-webkit-details-marker { display: none; }
.hp-sources summary:hover { color: var(--accent-ink); }
.hp-sources .hp-small { padding-bottom: 12px; }

/* Guide sections */
.hp-body { display: flex; flex-direction: column; gap: 20px; max-width: 760px; margin-top: clamp(28px, 3vw, 40px); }
.hp-body p { font-size: 17px; line-height: 1.6; color: var(--text-2); }
.hp-body strong { color: var(--ink); font-weight: 600; }
.hp-body h3 { margin-top: 12px; }
.hp-body .hp-source { font-size: 14px; line-height: 1.6; color: var(--text-3); }
.hp-source a { color: var(--accent-ink); text-underline-offset: 3px; }
.hp-source { font-size: 14px; line-height: 1.6; color: var(--text-3); }
.hp-built { margin-top: 32px; max-width: 760px; }
.hp-grant-grid { margin-top: 32px; }
.hp-grant-grid .card { gap: 12px; }
.hp-factors { margin-top: 32px; }
.hp-factors .h3 { font-size: 22px; }

/* Tables */
.hp-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); }
.hp-table { width: 100%; border-collapse: collapse; font-size: 16px; color: var(--ink); }
.hp-table th, .hp-table td { padding: 16px 20px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.hp-table tr:last-child td { border-bottom: 0; }
.hp-table th { font: 400 12px/1.4 var(--f-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); background: var(--paper); }
.hp-table td { color: var(--text-2); font-variant-numeric: tabular-nums; }
.hp-table td:first-child { color: var(--ink); font-weight: 600; }

/* Slim strip under the calculator for firms who might want one built. */
.hp-biz { margin-top: 28px; display: flex; align-items: center; justify-content: space-between; gap: 14px 24px; flex-wrap: wrap; padding: 16px 20px; border: 1px solid rgba(99,102,241,.25); border-radius: 16px; background: var(--accent-wash); }
.hp-biz p { margin: 0; flex: 1 1 420px; font-size: 15px; line-height: 1.55; color: var(--text-2); }
.hp-biz strong { color: var(--ink); font-weight: 600; }
