/* Rainfall and gutter calculator, store version. */
.hf-wrap { background: #f5f6f8; padding: 8px 0 24px; }
.hf-rain *, .hf-rain *::before, .hf-rain *::after { box-sizing: border-box; }

/* Layout: a postcode bar over two columns, the map on the left and the roof form with results on the right; one column on phones. */
.hf-rain {
  --hf-bg: #f5f6f8; --hf-surface: #ffffff; --hf-ink: #17202f; --hf-muted: #5a6577; --hf-line: #dde1e8;
  --hf-accent: #1f3a68; --hf-accent-ink: #ffffff; --hf-good: #1e7a4c; --hf-good-bg: #e3f3ea; --hf-bad: #a3302a; --hf-bad-bg: #f8e4e2; --hf-ask: #7a5a12; --hf-ask-bg: #f6eed9;
  --hf-land: #eef1f5; --hf-border: #b8c2cf; --hf-r1: #e4eef7; --hf-r2: #c4dcef; --hf-r3: #95c1e3; --hf-r4: #5f9fd1; --hf-r5: #3479b7; --hf-r6: #1c5591; --hf-r7: #0d3366;
  --hf-display: inherit; --hf-body: inherit; --hf-mono: "IBM Plex Mono", Consolas, monospace;
}
.hf-rain { color: var(--hf-ink); font-family: var(--hf-body); font-size: 15px; line-height: 1.5; max-width: 1180px; margin: 0 auto; padding-block: 28px 48px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); display: grid; gap: 22px; }
.hf-rain .hf-title, .hf-rain h2 { font-family: var(--hf-display); font-weight: 600; text-wrap: balance; margin: 0; letter-spacing: -0.01em; }
.hf-rain .hf-title { font-size: clamp(1.7em, 3.4vw, 2.4em); line-height: 1.15; }
.hf-rain h2 { font-size: 1.25em; }
.hf-lede { margin: 6px 0 0; color: var(--hf-muted); max-width: 64ch; }
.hf-eyebrow { font-size: 0.72em; letter-spacing: 0.09em; text-transform: uppercase; color: var(--hf-muted); margin: 0; font-weight: 600; }
.hf-panel { background: var(--hf-surface); border: 1px solid var(--hf-line); border-radius: 10px; padding: 18px; min-width: 0; }
.hf-search { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; }
.hf-search label { display: grid; gap: 4px; font-weight: 600; font-size: 0.9em; flex: 1 1 220px; }
.hf-rain input[type=text], .hf-rain input[type=number], .hf-rain select { font: inherit; color: var(--hf-ink); background: var(--hf-bg); border: 1px solid var(--hf-line); border-radius: 6px; padding: 9px 11px; min-width: 0; }
.hf-rain input[type=text] { font-family: var(--hf-mono); text-transform: uppercase; letter-spacing: 0.04em; }
.hf-btn { font: inherit; font-weight: 600; border: 0; border-radius: 6px; padding: 10px 18px; background: var(--hf-accent); color: var(--hf-accent-ink); cursor: pointer; }
.hf-btn:hover { filter: brightness(1.08); }
.hf-rain :focus-visible { outline: 3px solid var(--hf-accent); outline-offset: 2px; }
.hf-msg { flex-basis: 100%; margin: 0; color: var(--hf-bad); min-height: 1.2em; font-size: 0.9em; }
.hf-cols { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 22px; align-items: start; }
@media (max-width: 860px) { .hf-cols { grid-template-columns: minmax(0, 1fr); } }
.hf-mapwrap { position: relative; }
.hf-mapbox { position: relative; }
.hf-map { display: block; touch-action: none; cursor: grab; border-radius: 6px; }
.hf-mapctl { position: absolute; top: 8px; right: 8px; display: grid; gap: 6px; }
.hf-mapctl button { font: 600 1em/1 var(--hf-body); width: 34px; height: 34px; border-radius: 6px; border: 1px solid var(--hf-line); background: var(--hf-surface); color: var(--hf-ink); cursor: pointer; }
.hf-mapctl button.hf-wide { width: auto; padding: 0 8px; font-size: 0.75em; }
.hf-tip { position: absolute; pointer-events: none; background: var(--hf-ink); color: var(--hf-surface); font-size: 0.8em; padding: 6px 9px; border-radius: 6px; line-height: 1.35; white-space: nowrap; }
.hf-legend { display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: 0.75em; color: var(--hf-muted); margin-top: 10px; font-variant-numeric: tabular-nums; }
.hf-legend span { display: inline-flex; align-items: center; gap: 5px; }
.hf-legend i { width: 12px; height: 12px; border-radius: 50%; display: inline-block; border: 1px solid var(--hf-line); }
.hf-legend-title { flex-basis: 100%; font-weight: 600; color: var(--hf-ink); }
.hf-climate { display: grid; gap: 12px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--hf-line); }
.hf-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.hf-stat { display: grid; gap: 2px; }
.hf-stat b { font-family: var(--hf-mono); font-weight: 500; font-size: 1.25em; font-variant-numeric: tabular-nums; }
.hf-stat small { color: var(--hf-muted); font-size: 0.76em; }
.hf-chart svg { width: 100%; height: auto; display: block; }
.hf-grid { stroke: var(--hf-line); stroke-width: 1; }
.hf-axis { fill: var(--hf-muted); font: 10px var(--hf-mono); }
.hf-bar { fill: var(--hf-r4); }
.hf-bar-wet { fill: var(--hf-r6); }
.hf-right { display: grid; gap: 22px; min-width: 0; }
.hf-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 18px; }
@media (max-width: 520px) { .hf-form { grid-template-columns: minmax(0, 1fr); } }
.hf-field { display: grid; gap: 4px; align-content: start; min-width: 0; }
.hf-field > span { font-weight: 600; font-size: 0.9em; }
.hf-field small { color: var(--hf-muted); font-size: 0.78em; }
.hf-field.hf-span { grid-column: 1 / -1; }
.hf-inline { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 0.88em; }
.hf-inline label { display: inline-flex; gap: 6px; align-items: center; }
.hf-unit { display: flex; align-items: center; gap: 8px; }
.hf-unit input { flex: 1 1 auto; width: 100%; }
.hf-unit em { font-style: normal; color: var(--hf-muted); font-family: var(--hf-mono); font-size: 0.85em; }
.hf-range { display: flex; align-items: center; gap: 10px; }
.hf-range input { flex: 1 1 auto; accent-color: var(--hf-accent); }
.hf-range output { font-family: var(--hf-mono); min-width: 3ch; }
.hf-pick { display: grid; gap: 8px; }
.hf-big { font-family: var(--hf-display); font-size: 1.7em; font-weight: 600; margin: 0; line-height: 1.2; text-wrap: balance; }
.hf-big a { color: var(--hf-ink); text-decoration-color: var(--hf-accent); text-underline-offset: 4px; }
.hf-meter { height: 10px; background: var(--hf-bg); border: 1px solid var(--hf-line); border-radius: 99px; overflow: hidden; }
.hf-meter span { display: block; height: 100%; background: var(--hf-good); border-radius: 99px; }
.hf-small { margin: 0; color: var(--hf-muted); font-size: 0.88em; }
.hf-pipe { margin: 4px 0 0; font-weight: 500; }
.hf-rain a { color: var(--hf-accent); }
.hf-warn-text { color: var(--hf-bad); }
.hf-tablewrap { overflow-x: auto; }
.hf-tablewrap table { min-width: 460px; }
#hf-pos-row { flex-wrap: wrap; }
#hf-pos-row input { flex: 1 1 120px; }
@media (max-width: 520px) { #hf-pos-row label { white-space: normal !important; flex-basis: 100%; } }
.hf-rain table { width: 100%; border-collapse: collapse; font-size: 0.88em; font-variant-numeric: tabular-nums; }
.hf-rain th { text-align: left; font-size: 0.72em; letter-spacing: 0.06em; text-transform: uppercase; color: var(--hf-muted); font-weight: 600; padding: 6px 8px; border-bottom: 1px solid var(--hf-line); }
.hf-rain td { padding: 7px 8px; border-bottom: 1px solid var(--hf-line); vertical-align: top; }
.hf-num { text-align: right; font-family: var(--hf-mono); }
.hf-muted { color: var(--hf-muted); font-size: 0.8em; }
.hf-row-sel td { background: var(--hf-bg); }
.hf-chip { display: inline-block; font-size: 0.76em; font-weight: 600; padding: 2px 8px; border-radius: 99px; white-space: nowrap; }
.hf-chip-ok { color: var(--hf-good); background: var(--hf-good-bg); }
.hf-chip-no { color: var(--hf-bad); background: var(--hf-bad-bg); }
.hf-chip-ask { color: var(--hf-ask); background: var(--hf-ask-bg); }
.hf-work { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 18px; margin: 0; }
@media (max-width: 520px) { .hf-work { grid-template-columns: minmax(0, 1fr); } }
.hf-work dt { font-size: 0.75em; color: var(--hf-muted); }
.hf-work dd { margin: 0; font-family: var(--hf-mono); font-size: 0.88em; }
.hf-volume { margin: 0; padding: 12px 14px; background: var(--hf-bg); border-radius: 8px; font-size: 0.92em; }
.hf-notes { font-size: 0.66em; line-height: 1.5; color: var(--hf-muted); display: grid; gap: 4px; margin: 0; padding: 10px 16px; border: 1px solid var(--hf-line); border-radius: 8px; background: var(--hf-surface); text-align: left; }
.hf-notes p { margin: 0; }
details.hf-details summary { cursor: pointer; font-weight: 600; }
details.hf-details[open] summary { margin-bottom: 10px; }

/* Store theme overrides: the theme sizes form controls and headings itself. */
.hf-rain input[type=text], .hf-rain input[type=number], .hf-rain select { height: auto; line-height: 1.4; font-size: 1em; box-shadow: none; }
.hf-rain select { padding-right: 28px; }
.hf-rain input[type=radio], .hf-rain input[type=checkbox] { width: auto; height: auto; margin: 0; position: static; opacity: 1; }
.hf-rain label { margin: 0; }
.hf-rain h2 { margin: 0; line-height: 1.2; }
.hf-rain .hf-btn { height: auto; line-height: 1.4; text-transform: none; letter-spacing: 0; }
.hf-rain table { margin: 0; }
.hf-rain td { font-size: 1em; }
