/* SuhanVerse-derived fonts — local WOFF2, no network request.
   XCharter (Bitstream Charter extension) — Bitstream Free font license.
   Inter — SIL OFL 1.1 (Apache-2.0 covers build tooling).
   License files: assets/fonts/LICENSE-*.txt; hashes: assets/fonts/SOURCE.md */

@font-face {
  font-family: "SuhanVerse Serif";
  src: url("assets/fonts/xcharter-roman.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "SuhanVerse Serif";
  src: url("assets/fonts/xcharter-bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "SuhanVerse Serif";
  src: url("assets/fonts/xcharter-italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "SuhanVerse Sans";
  src: url("assets/fonts/inter-regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "SuhanVerse Sans";
  src: url("assets/fonts/inter-medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "SuhanVerse Sans";
  src: url("assets/fonts/inter-semibold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

:root {
  --paper: #f2ede1;
  --sheet: #fffdf8;
  --ink: #1a1811;
  --muted: #4b4534;
  --rule: #c6bca4;
  --rust: #a8452a;
  --rust-bar: #c68873;
  --focus: #a8452a;
  --rule-soft: #d8d0be;
  --paper-2: #e8e1cf;
  --serif: "SuhanVerse Serif", "Bitstream Charter", "Times New Roman", serif;
  --sans: "SuhanVerse Sans", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --panel-width: 380px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 20px;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1,
h2 {
  font-family: var(--serif);
  font-weight: 600;
}

h1 {
  font-size: clamp(2.5rem, 6vw, 4.3rem);
  font-weight: 600;
  line-height: 1.01;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

h2 {
  font-size: clamp(1.6rem, 3vw, 2.3rem);
  font-weight: 600;
  line-height: 1.06;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

a {
  color: var(--rust);
  text-underline-offset: 3px;
}

a:hover {
  color: var(--ink);
}

button,
input,
select {
  font: inherit;
}

button,
select {
  cursor: pointer;
}

button {
  transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease;
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

[hidden] {
  display: none !important;
}

details:not([open]) > :not(summary) {
  display: none !important;
}

.skip-link {
  position: absolute;
  top: -90px;
  left: 24px;
  z-index: 2000;
  padding: 10px 14px;
  background: var(--ink);
  color: #fff;
}

.skip-link:focus {
  top: 12px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-header__inner,
.lead,
.workspace,
.site-footer__inner {
  width: 100%;
  max-width: 1180px;
  margin-inline: auto;
  padding-inline: clamp(20px, 5vw, 48px);
}

.site-header {
  border-top: 3px solid var(--ink);
  border-bottom: 1px solid var(--ink);
}

.site-header__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 12px 22px;
  padding-block: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--ink);
  text-decoration: none;
}

.brand-mark {
  display: inline-flex;
  width: 22px;
  height: 22px;
  flex: none;
}

.brand-mark svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.brand-mark path {
  fill: none;
  stroke: var(--rust);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.brand-mark .mark-drop {
  fill: var(--rust);
}

.brand__descriptor {
  margin: 0;
  padding-left: 16px;
  border-left: 1px solid var(--rule);
  color: var(--muted);
  font-size: 0.92rem;
  font-style: italic;
}

.lead {
  padding-block: clamp(40px, 6vw, 76px) clamp(30px, 4vw, 46px);
}

.kicker {
  margin: 0 0 16px;
  color: var(--rust);
  font-family: var(--sans);
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.05em;
}

.lead h1 {
  max-width: 17ch;
  margin: 0 0 20px;
}

.lead__dek {
  max-width: 44ch;
  margin: 0;
  color: var(--muted);
  font-size: clamp(1.05rem, 1.5vw, 1.2rem);
  line-height: 1.55;
}

.wordmark {
  font-family: var(--serif);
  font-size: 1.3rem;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.01em;
  animation: wordmark-settle 520ms var(--ease) 80ms;
}

.brand-mark .mark-roof {
  stroke-dasharray: 42;
  animation: mark-draw 500ms var(--ease) 40ms;
}

.brand-mark .mark-wall {
  stroke-dasharray: 36;
  animation: mark-draw 420ms var(--ease) 140ms;
}

.brand-mark .mark-drop {
  animation: mark-drop 420ms var(--ease) 220ms;
}

.brand-mark .mark-level {
  stroke-dasharray: 21;
  animation: mark-level 440ms var(--ease) 260ms;
}

@keyframes mark-draw {
  from { stroke-dashoffset: 42; }
  to { stroke-dashoffset: 0; }
}

@keyframes mark-level {
  from { stroke-dashoffset: 21; opacity: 0.35; }
  to { stroke-dashoffset: 0; opacity: 1; }
}

@keyframes mark-drop {
  from { opacity: 0; transform: translateY(-3px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes wordmark-settle {
  from { opacity: 0; transform: translateY(2px); }
  to { opacity: 1; transform: translateY(0); }
}

.section-label {
  color: var(--rust);
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--panel-width);
  column-gap: 40px;
  row-gap: 36px;
  align-items: start;
}

.primary-column {
  display: flex;
  flex-direction: column;
  gap: 28px;
  min-width: 0;
}

.map-card,
.compare-card,
.saved-card,
.list-card,
.method-card,
.data-card {
  min-width: 0;
}

.map-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.map-head h2 {
  margin-top: 3px;
  font-size: 23px;
}

.subhead {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.map-head .subhead {
  margin-top: 4px;
}

.map-tools {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 4px;
}

.button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid var(--rule);
  border-radius: 2px;
  padding: 8px 12px;
  background: var(--sheet);
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
}

.button:hover {
  background: var(--paper-2);
  border-color: var(--rust);
}

.button-primary {
  border-color: var(--rust);
  background: var(--rust);
  color: #fff;
}

.button-primary:hover {
  border-color: var(--rust);
  background: var(--rust);
  color: #fff;
}

.button-secondary {
  background: transparent;
}

.button-quiet {
  border-color: transparent;
  background: transparent;
  color: var(--muted);
  font-weight: 500;
}

.button-quiet:hover {
  border-color: var(--rule);
  color: var(--ink);
}

.button:disabled {
  opacity: 0.45;
  cursor: default;
}

.map-toggle {
  display: none !important;
}

.map-shell {
  position: relative;
  height: 380px;
  overflow: hidden;
  isolation: isolate;
  border: 1px solid var(--ink);
  border-radius: 2px;
  background: #e6e3d7;
}

.map-view {
  position: absolute;
  inset: 0;
}

.map-view[hidden] {
  display: none;
}

.map {
  width: 100%;
  height: 100%;
}

.view-switch {
  display: inline-flex;
  border: 1px solid var(--rule);
  background: var(--sheet);
}

.view-switch .button {
  min-width: 0;
  min-height: 40px;
  flex: 0 0 auto;
  padding: 0 10px;
  border: 0;
  background: transparent;
  font-size: 13px;
  white-space: nowrap;
}

.view-switch .button + .button {
  border-left: 1px solid var(--rule);
}

.view-switch .button[aria-pressed="true"] {
  background: var(--rust);
  color: #fff;
}

.view-switch .button[aria-pressed="true"]:hover {
  background: var(--rust);
  color: #fff;
}

.angled-map {
  display: block;
  width: 100%;
  height: 100%;
  background: #e6e3d7;
  touch-action: pan-y;
  user-select: none;
  cursor: grab;
}

.angled-map.is-pan-mode {
  touch-action: none;
  cursor: move;
}

.angled-map:active {
  cursor: grabbing;
}

.angled-map:focus-visible {
  outline: 2px solid var(--rust);
  outline-offset: -4px;
}

.angled-ground {
  fill: #e6e3d7;
}

.angled-road {
  fill: none;
  stroke: #b8b5a8;
  stroke-width: 1.1;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.85;
}

.angled-side {
  fill: #cbc4b3;
  stroke: #a2957c;
  stroke-width: 0.45;
  stroke-linejoin: round;
  pointer-events: none;
}

.angled-roof {
  fill: var(--angled-fill, #ddd6c6);
  stroke: #a2957c;
  stroke-width: 0.55;
  stroke-linejoin: round;
  cursor: pointer;
  transition: fill 140ms ease, stroke 140ms ease;
}

.angled-roof:hover {
  fill: #d3cab6;
  stroke: var(--rust);
  stroke-width: 1.3;
}

.angled-building.is-saved .angled-roof {
  stroke: var(--rust);
  stroke-width: 1.5;
}

.angled-building.is-selected .angled-side {
  fill: #7d6f59;
  stroke: var(--sheet);
  stroke-width: 0.8;
}

.angled-building.is-selected .angled-roof {
  fill: var(--rust);
  stroke: var(--sheet);
  stroke-width: 2;
}

.angled-building.is-selected.is-dirty .angled-roof {
  stroke: var(--rust);
  stroke-width: 2.4;
  stroke-dasharray: 4 2;
}

.angled-camera-controls {
  position: absolute;
  top: 9px;
  right: 9px;
  z-index: 520;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0;
  padding: 3px;
  border: 1px solid var(--rule);
  background: rgba(255, 253, 248, 0.96);
}

.angled-control {
  min-width: 44px;
  min-height: 44px;
  padding: 0 8px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font: 600 12px var(--sans);
  line-height: 1;
}

.angled-control:hover {
  background: var(--paper-2);
}

.angled-control + .angled-control {
  border-top: 1px solid var(--rule);
}

.angled-control[aria-pressed="true"] {
  border-color: var(--rust);
  background: var(--rust);
  color: #fff;
}

.angled-reset {
  padding-inline: 7px;
  font-size: 12px;
  font-weight: 500;
}

.angled-pan-toggle {
  display: none;
  font-size: 12px;
  font-weight: 500;
}

@media (hover: none), (pointer: coarse) {
  .angled-pan-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
}

.angled-legend {
  position: absolute;
  bottom: 9px;
  left: 9px;
  z-index: 515;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 9px;
  max-width: calc(100% - 250px);
  padding: 5px 7px;
  border: 1px solid var(--rule);
  background: rgba(255, 253, 248, 0.94);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.25;
  pointer-events: none;
}

.angled-legend > span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.angled-key {
  display: inline-block;
  width: 9px;
  height: 9px;
  border: 1px solid #a2957c;
  background: #ddd6c6;
}

.angled-key-selected {
  border-color: var(--sheet);
  outline: 1px solid var(--rust);
  background: var(--rust);
}

.angled-key-saved {
  border-color: var(--rust);
  background: #ddd6c6;
}

.angled-height-note {
  color: var(--ink);
  font-weight: 600;
}

.angled-fallback {
  position: absolute;
  inset: 0;
  z-index: 600;
  display: grid;
  place-content: center;
  gap: 10px;
  padding: 24px;
  background: rgba(243, 239, 228, 0.96);
  color: var(--ink);
  text-align: center;
}

.angled-fallback[hidden] {
  display: none;
}

.angled-fallback p {
  max-width: 38ch;
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
}

.angled-fallback .button {
  justify-self: center;
}

.leaflet-container {
  background: #e6e3d7;
  font: 12px var(--sans);
}

.leaflet-tile-pane {
  filter: saturate(0.42) contrast(0.94);
}

.leaflet-control-attribution {
  max-width: 78%;
  background: rgba(255, 253, 248, 0.92) !important;
  font-size: 8px !important;
  line-height: 1.25;
}

.leaflet-bar {
  border: 1px solid var(--rule) !important;
  border-radius: 0 !important;
  box-shadow: 0 1px 4px rgba(26, 24, 17, 0.1) !important;
}

.leaflet-bar a,
.leaflet-touch .leaflet-bar a {
  width: 44px !important;
  height: 44px !important;
  line-height: 44px !important;
  color: var(--ink) !important;
  background: var(--sheet) !important;
}

.leaflet-container .leaflet-interactive:focus {
  outline: none;
  stroke: var(--rust);
  stroke-width: 4px;
}

.spongektm-tooltip {
  border: 1px solid var(--rule);
  border-radius: 0;
  box-shadow: 0 2px 10px rgba(26, 24, 17, 0.1);
  padding: 7px 9px;
  color: var(--ink);
  font: 12px var(--sans);
}

.map-status {
  position: absolute;
  top: 9px;
  left: 9px;
  z-index: 500;
  max-width: calc(100% - 70px);
  margin: 0;
  padding: 5px 8px;
  border: 1px solid var(--rule);
  background: rgba(255, 253, 248, 0.94);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  pointer-events: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.map-status-mark {
  display: none;
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  color: var(--rust);
}

.map-status-mark svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.map-status-mark path {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.map-status-mark .status-drop {
  fill: var(--rust);
  stroke: var(--rust);
}

#mapShell[aria-busy="true"] .map-status-mark {
  display: inline-flex;
}

#mapShell[aria-busy="true"] .status-roof {
  stroke-dasharray: 28;
  animation: status-draw 520ms var(--ease);
}

#mapShell[aria-busy="true"] .status-drop {
  animation: mark-drop 420ms var(--ease) 120ms;
}

#mapShell[aria-busy="true"] .status-level {
  stroke-dasharray: 18;
  animation: mark-level 600ms var(--ease) 180ms;
}

@keyframes status-draw {
  from { stroke-dashoffset: 28; }
  to { stroke-dashoffset: 0; }
}

.map-status[data-kind="ok"] {
  color: var(--rust);
}

.map-status[data-kind="error"] {
  color: var(--rust);
}

.map-legend {
  position: absolute;
  bottom: 23px;
  left: 9px;
  z-index: 500;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 5px 7px;
  border: 1px solid var(--rule);
  background: rgba(255, 253, 248, 0.94);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.2;
  pointer-events: none;
}

.legend-label {
  margin-right: 3px;
  color: var(--ink);
}

.legend-swatch {
  display: inline-block;
  width: 9px;
  height: 9px;
}

.legend-low {
  background: hsl(14 22% 86%);
}

.legend-mid {
  background: hsl(14 22% 70%);
}

.legend-high {
  background: hsl(14 22% 48%);
}

.legend-scale {
  margin-left: 2px;
}

.map-results {
  padding: 17px 0 0;
  border-bottom: 1px solid var(--rule);
}

.summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin: 0;
}

.summary-item {
  min-width: 0;
  padding-right: 16px;
  border-right: 1px solid var(--rule);
}

.summary-item:last-child {
  padding-right: 0;
  border-right: 0;
}

.summary dt {
  margin-bottom: 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.summary dd {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(27px, 3vw, 38px);
  line-height: 1.1;
  letter-spacing: -0.8px;
  font-variant-numeric: tabular-nums;
}

.summary .unit {
  margin-left: 4px;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 13px;
  letter-spacing: 0;
}

.summary-retained dd {
  color: var(--rust);
}

.summary-overflow dd {
  color: var(--rust);
}

.summary-note {
  margin-top: 7px;
  color: var(--muted);
  font-size: 13px;
}

.card-note {
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.compare-card {
  padding-top: 17px;
  border-top: 1px solid var(--rule);
}

.section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.section-head h2 {
  margin-top: 2px;
}

.chip {
  display: inline-block;
  padding: 3px 6px;
  border: 1px solid var(--rule);
  border-radius: 0;
  background: var(--sheet);
  color: var(--rust);
  font-size: 8px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

.chip-quiet {
  color: var(--muted);
}

.chart {
  display: grid;
  gap: 11px;
  margin-top: 14px;
}

.chart-row {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.chart-meta {
  min-width: 0;
}

.chart-name {
  display: block;
  font-size: 13px;
  font-weight: 600;
}

.chart-cap {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.chart-bar {
  display: flex;
  height: 14px;
  overflow: hidden;
  border-radius: 0;
  background: var(--rule-soft);
}

.bar-retained {
  background: var(--rust);
}

.bar-overflow {
  background: var(--rust-bar);
}

.chart-key {
  display: flex;
  gap: 14px;
  margin-top: 9px;
  color: var(--muted);
  font-size: 12px;
}

.chart-key > span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.key-swatch {
  display: inline-block;
  width: 9px;
  height: 9px;
}

.key-retained {
  background: var(--rust);
}

.key-overflow {
  background: var(--rust-bar);
}

.comparison-text {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin: 13px 0 0;
  padding-top: 11px;
  border-top: 1px solid var(--rule-soft);
  font-size: 13px;
  line-height: 1.5;
}

.comparison-text dt {
  margin-bottom: 2px;
  font-weight: 600;
}

.comparison-text dd {
  margin: 0;
  color: var(--muted);
}

.panel {
  min-width: 0;
  padding: 22px;
  border: 1px solid var(--rule);
  border-top: 2px solid var(--ink);
  background: var(--sheet);
}

.selected-card h2 {
  margin-top: 1px;
  font-size: 32px;
}

.selected-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.source-line {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.selected-facts {
  margin-top: 8px;
  color: var(--ink);
  font-size: 12px;
  line-height: 1.4;
  font-variant-numeric: tabular-nums;
}

.selected-facts strong {
  font-family: var(--serif);
  font-size: 25px;
  font-weight: 400;
  letter-spacing: -0.4px;
}

.selected-state {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 7px;
  color: var(--muted);
  font-size: 9.5px;
  line-height: 1.35;
}

.state-dot {
  width: 6px;
  height: 6px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--muted);
}

.selected-state[data-state="saved"] .state-dot {
  background: var(--rust);
}

.selected-state[data-state="dirty"] {
  color: var(--rust);
}

.selected-state[data-state="dirty"] .state-dot {
  background: var(--rust);
}

.fact-source {
  color: var(--muted);
  font-size: 12px;
}

.roof-picker {
  display: block;
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

select {
  width: 100%;
  min-height: 44px;
  margin-top: 5px;
  padding: 8px 9px;
  border: 1px solid var(--rule);
  border-radius: 1px;
  background: #faf8f1;
  color: var(--ink);
  font-size: 14px;
}

.inputs-card {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--rule);
}

.inputs-card h2 {
  font-size: 22px;
}

#sharedRainChip {
  margin-top: 2px;
  flex-shrink: 0;
}

#plannerForm {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 10px;
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.field {
  min-width: 0;
}

.field label,
.filter-label {
  display: block;
  margin-bottom: 4px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
}

.input-row {
  display: flex;
  align-items: center;
  min-height: 44px;
  border: 1px solid var(--rule);
  border-radius: 1px;
  background: #faf8f1;
  overflow: hidden;
}

.input-row:focus-within {
  border-color: var(--rust);
  box-shadow: 0 0 0 2px rgba(168, 69, 42, 0.13);
}

.input-row input {
  width: 100%;
  min-width: 0;
  padding: 8px 9px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 16px;
  font-variant-numeric: tabular-nums;
}

.input-row .unit {
  padding-right: 9px;
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

input[aria-invalid="true"] {
  background: #fbf0e7;
}

.input-row:has([aria-invalid="true"]) {
  border-color: var(--rust);
}

.help {
  margin-top: 4px;
  color: var(--muted);
  font-size: 9.5px;
  line-height: 1.45;
}

.field-error {
  margin-top: 3px;
  color: var(--rust);
  font-size: 13px;
  line-height: 1.4;
}

.roof-details {
  padding-top: 10px;
  border-top: 1px solid var(--rule-soft);
}

.roof-details summary {
  min-height: 44px;
  display: flex;
  align-items: center;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.roof-details summary::marker {
  color: var(--rust);
}

.roof-details .field-grid {
  margin-top: 8px;
}

.scenario-fieldset {
  min-width: 0;
  margin: 0;
  padding: 10px 0 0;
  border: 0;
  border-top: 1px solid var(--rule-soft);
}

.scenario-fieldset legend {
  padding: 0 6px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.scenario-fieldset .field-wide {
  margin-top: 8px;
}

.save-controls {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--rule);
}

.actions {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.actions .button {
  width: 100%;
}

#manualButton {
  color: var(--rust);
}

.status {
  margin-top: 9px;
  color: var(--rust);
  font-size: 13px;
  line-height: 1.5;
}

.status[data-kind="error"] {
  color: var(--rust);
}

.saved-card {
  grid-column: 1 / -1;
  margin-top: 4px;
  padding-top: 18px;
  border-top: 2px solid var(--ink);
}

.saved-head {
  align-items: flex-end;
  gap: 20px;
}

.saved-head h2 {
  margin-top: 2px;
  font-size: 27px;
}

.saved-head .subhead {
  max-width: 76ch;
  margin-top: 4px;
  font-size: 13px;
}

.export-actions {
  display: flex;
  flex-shrink: 0;
  flex-wrap: wrap;
  gap: 5px;
}

.table-wrap {
  position: relative;
  width: 100%;
  max-width: 100%;
  margin-top: 14px;
  overflow-x: auto;
}

.comparison-table {
  width: 100%;
  min-width: 860px;
  border-collapse: collapse;
  border-top: 1px solid var(--ink);
  color: var(--ink);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.comparison-table th,
.comparison-table td {
  padding: 10px 8px;
  border-bottom: 1px solid var(--rule-soft);
  text-align: right;
  vertical-align: middle;
}

.comparison-table thead th {
  border-bottom: 1px solid var(--rule);
  color: var(--muted);
  font-size: 8px;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.comparison-table thead th .unit {
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
}

.comparison-table th:first-child,
.comparison-table td:first-child {
  width: 25%;
  padding-left: 0;
  text-align: left;
}

.comparison-table tbody tr.is-selected {
  background: var(--paper-2);
}

.comparison-table tbody tr.is-selected th:first-child {
  box-shadow: inset 3px 0 var(--rust);
}

.comparison-table tfoot th,
.comparison-table tfoot td {
  border-top: 2px solid var(--ink);
  border-bottom: 0;
  font-size: 13px;
  font-weight: 600;
}

.roof-name,
.roof-meta {
  display: block;
}

.roof-name {
  font-size: 13px;
  font-weight: 600;
}

.roof-meta {
  max-width: 170px;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.row-edited {
  color: var(--rust);
  font-weight: 600;
}

.row-actions {
  min-width: 108px;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 3px;
}

.button-small {
  min-width: 44px;
  min-height: 44px;
  padding: 5px 6px;
  font-size: 12px;
}

.empty-note {
  margin: 0;
  padding: 16px 0;
  border-bottom: 1px solid var(--rule-soft);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.saved-notes {
  display: flex;
  justify-content: space-between;
  gap: 18px;
}

.saved-notes .card-note {
  margin-top: 8px;
  font-size: 12px;
}

.list-card,
.method-card,
.data-card {
  grid-column: 1 / -1;
  border-top: 1px solid var(--rule);
  padding-top: 10px;
}

.list-card details,
.method-card details,
.data-card details {
  min-width: 0;
}

.list-card summary,
.method-card summary,
.data-card summary {
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font: 400 21px/1.25 var(--serif);
  cursor: pointer;
}

.list-card summary::before,
.method-card summary::before,
.data-card summary::before {
  content: "+";
  width: 14px;
  color: var(--rust);
  font: 400 18px/1 var(--sans);
}

.list-card details[open] summary::before,
.method-card details[open] summary::before,
.data-card details[open] summary::before {
  content: "−";
}

.list-card summary::-webkit-details-marker,
.method-card summary::-webkit-details-marker,
.data-card summary::-webkit-details-marker {
  display: none;
}

.details-hint {
  margin-left: auto;
  color: var(--muted);
  font: 12px var(--sans);
  letter-spacing: 0;
}

.list-card .card-head {
  align-items: flex-end;
  margin: 10px 0 8px;
}

.list-card .card-head .subhead {
  max-width: 62ch;
}

.filter-label {
  margin: 0;
  font-size: 12px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.filter-label input {
  display: block;
  width: 230px;
  min-height: 44px;
  margin-top: 4px;
  padding: 8px 9px;
  border: 1px solid var(--rule);
  border-radius: 1px;
  background: var(--sheet);
  color: var(--ink);
  font-size: 12px;
  letter-spacing: 0;
  text-transform: none;
}

.roof-list-wrap {
  border-top: 1px solid var(--rule);
}

.roof-list {
  max-height: 280px;
  margin: 0;
  padding: 0;
  overflow-y: auto;
  list-style: none;
}

.roof-list button {
  width: 100%;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 8px;
  border: 0;
  border-bottom: 1px solid var(--rule-soft);
  background: transparent;
  color: var(--ink);
  text-align: left;
  font-size: 13px;
}

.roof-list button:hover {
  background: #f8f4e9;
}

.roof-list button[aria-current="true"] {
  background: var(--paper-2);
  box-shadow: inset 3px 0 var(--rust);
}

.roof-area {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.method-body {
  max-width: 88ch;
  margin-top: 8px;
  padding-bottom: 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.method-body p + p {
  margin-top: 10px;
}

code {
  padding: 1px 3px;
  background: var(--paper-2);
  color: var(--ink);
  font: 12px/1.5 ui-monospace, monospace;
}

.release-line {
  overflow-wrap: anywhere;
}

.site-footer {
  margin-top: 36px;
  padding-block: 18px 28px;
  border-top: 2px solid var(--ink);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.site-footer__inner {
  display: flex;
  align-items: center;
  gap: 18px;
}

.footer-brand {
  color: var(--ink);
  font: 18px var(--serif);
}

.footer-note {
  margin-left: auto;
  white-space: nowrap;
}

.print-only {
  display: none;
}

.noscript {
  max-width: 80ch;
  margin: 20px auto;
  padding: 12px;
  border: 1px solid var(--rust);
  font-size: 12px;
}

.map-card.is-collapsed .map-shell {
  display: none;
}

.map-card.is-collapsed .map-toggle {
  display: inline-flex !important;
}

/* Shared page navigation */
.site-nav {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-left: auto;
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.2;
}

.site-nav a {
  padding-block: 3px;
  border-bottom: 1px solid transparent;
  color: var(--ink);
  text-decoration: none;
}

.site-nav a:hover {
  border-bottom-color: var(--ink);
}

.site-nav a[aria-current="page"] {
  border-bottom-color: var(--rust);
}

.nav-count {
  color: var(--rust);
  font-variant-numeric: tabular-nums;
}

.nav-count::before {
  content: "(";
}

.nav-count::after {
  content: ")";
}

/* Home */
.home-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
  width: 100%;
  max-width: 1180px;
  margin-inline: auto;
  padding: clamp(36px, 6vw, 72px) clamp(20px, 5vw, 48px) clamp(28px, 4vw, 48px);
}

.home-copy h1 {
  max-width: 13ch;
  margin: 0 0 18px;
  font-size: clamp(2.4rem, 5vw, 4rem);
  line-height: 1.02;
  letter-spacing: -0.02em;
}

.home-dek {
  max-width: 46ch;
  margin: 0;
  color: var(--muted);
  font-size: clamp(1.05rem, 1.5vw, 1.2rem);
  line-height: 1.55;
}

.home-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 22px;
  margin-top: 26px;
}

.home-link {
  font-family: var(--sans);
  font-size: 14px;
}

.home-note {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.home-figure {
  margin: 0;
  padding-top: 18px;
  border-top: 2px solid var(--ink);
}

.home-schematic {
  display: block;
  width: 100%;
  height: auto;
}

.home-figure figcaption {
  max-width: 42ch;
  margin-top: 12px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.schematic-roof path {
  fill: none;
  stroke: var(--ink);
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.schematic-rain path {
  fill: none;
  stroke: var(--rust);
  stroke-width: 2;
  stroke-linecap: round;
}

.schematic-flow path {
  fill: none;
  stroke: var(--muted);
  stroke-width: 1.6;
  stroke-linecap: round;
}

.schematic-tank rect,
.schematic-tank > path {
  fill: none;
  stroke: var(--ink);
  stroke-width: 2.2;
}

.schematic-tank .schematic-water {
  fill: var(--rust);
  fill-opacity: 0.14;
  stroke: none;
}

.schematic-tank .schematic-level {
  stroke: var(--rust);
  stroke-width: 2;
}

.schematic-labels text {
  fill: var(--muted);
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.04em;
}

.home-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  width: 100%;
  max-width: 1180px;
  margin-inline: auto;
  padding-inline: clamp(20px, 5vw, 48px);
  border-top: 1px solid var(--rule);
}

.home-steps article {
  padding: 24px 24px 10px 0;
  border-right: 1px solid var(--rule);
}

.home-steps article + article {
  padding-left: 24px;
}

.home-steps article:last-child {
  border-right: 0;
  padding-right: 0;
}

.step-number {
  margin: 0 0 6px;
  color: var(--rust);
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
}

.home-steps h2 {
  margin: 0 0 8px;
  font-size: 20px;
}

.home-steps p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.home-limits {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 32px;
  width: 100%;
  max-width: 1180px;
  margin: clamp(40px, 6vw, 72px) auto 0;
  padding: 28px clamp(20px, 5vw, 48px) 48px;
  border-top: 2px solid var(--ink);
}

.home-limits h2 {
  font-size: clamp(1.4rem, 2.4vw, 2rem);
}

.home-limits p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.home-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 14px;
  font-family: var(--sans);
  font-size: 13px;
}

/* Planner additions */
.manual-name {
  margin: 12px 0 4px;
}

.manual-name label {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.manual-name input {
  width: 100%;
  min-height: 44px;
  padding: 8px 10px;
  border: 1px solid var(--rule);
  border-radius: 0;
  background: var(--sheet);
  color: var(--ink);
  font: inherit;
}

.saved-cta {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 8px;
  padding-block: 22px;
  border-top: 2px solid var(--ink);
  border-bottom: 1px solid var(--rule);
}

.saved-cta h2 {
  margin: 4px 0 6px;
  font-size: clamp(1.4rem, 2.4vw, 2rem);
}

.saved-cta .button {
  flex: none;
}

/* Saved plans */
.lead-compact {
  padding-block: clamp(30px, 4vw, 48px) clamp(18px, 3vw, 26px);
}

.plans-workspace .saved-card {
  grid-row: auto;
}

.plans-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 40px;
  align-items: start;
  width: 100%;
  max-width: 1180px;
  margin-inline: auto;
  padding-inline: clamp(20px, 5vw, 48px);
}

.plans-storm {
  max-width: 380px;
  padding: 16px 0 8px;
  border-bottom: 1px solid var(--rule);
}

.plans-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.file-button {
  cursor: pointer;
}

.storage-toggle {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-family: var(--sans);
  font-size: 13px;
  line-height: 1.45;
}

.storage-toggle input {
  flex: none;
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--rust);
}

.plans-toolbar {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 16px;
  border-top: 2px solid var(--ink);
}

.plans-toolbar .status:empty {
  display: none;
}

.plans-workspace .table-wrap {
  margin-top: 10px;
}

@media (max-width: 1150px) {
  :root {
    --panel-width: 340px;
  }

  .workspace {
    column-gap: 24px;
  }

  .map-shell {
    height: 350px;
  }

  .panel {
    padding: 18px;
  }

  .summary {
    gap: 12px;
  }

  .summary-item {
    padding-right: 10px;
  }
}

@media (max-width: 900px) {
  .workspace {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 24px;
  }

  .primary-column,
  .panel {
    display: contents;
  }

  .selected-card {
    grid-row: 2;
    padding: 18px;
    border: 1px solid var(--rule);
    border-top: 2px solid var(--ink);
    background: var(--sheet);
  }

  .map-card {
    grid-row: 1;
  }

  .map-shell {
    height: 360px;
  }

  .inputs-card {
    grid-row: 3;
    margin: 0;
    padding: 18px;
    border: 1px solid var(--rule);
    border-top: 2px solid var(--ink);
    background: var(--sheet);
  }

  .save-controls {
    grid-row: 4;
    margin: 0;
    padding: 18px;
    border: 1px solid var(--rule);
    background: var(--sheet);
  }

  .compare-card {
    grid-row: 5;
  }

  .saved-card {
    grid-row: 6;
  }

  .list-card {
    grid-row: 7;
  }

  .method-card {
    grid-row: 8;
  }

  .data-card {
    grid-row: 9;
  }

  .map-toggle {
    display: inline-flex !important;
  }

  .map-tools {
    max-width: none;
  }

  .selected-card h2 {
    font-size: 30px;
  }

  .actions {
    flex-direction: row;
  }

  .actions .button {
    width: auto;
    flex: 1;
  }

  .saved-head {
    align-items: flex-start;
  }

  .saved-notes {
    display: block;
  }

  .saved-notes .card-note + .card-note {
    margin-top: 3px;
  }
}

@media (max-width: 540px) {
  .site-header__inner {
    gap: 8px 16px;
    padding-block: 12px;
  }

  .brand__descriptor {
    display: none;
  }

  .selected-card {
    padding: 16px;
  }

  .selected-card h2 {
    font-size: 28px;
  }

  .selected-facts strong {
    font-size: 23px;
  }

  .roof-picker {
    margin-top: 10px;
  }

  .inputs-card,
  .save-controls {
    padding: 16px;
  }

  #plannerForm {
    gap: 12px;
  }

  .field-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .field-grid .field {
    min-width: 0;
  }

  .scenario-fieldset .field-grid {
    gap: 10px;
  }

  .map-head {
    display: block;
  }

  .map-head h2 {
    font-size: 22px;
  }

  .map-tools {
    margin-top: 9px;
    justify-content: flex-start;
    gap: 3px;
  }

  .map-tools .button {
    flex: 1;
    min-width: 0;
    padding-inline: 5px;
    font-size: 13px;
  }

  .view-switch {
    flex: 0 0 auto;
  }

  .view-switch .button {
    min-height: 44px;
    padding-inline: 7px;
    font-size: 12px;
  }

  .view-switch .button:first-child {
    min-width: 54px;
    padding-inline: 5px;
  }

  .map-shell {
    height: 300px;
  }

  .angled-camera-controls {
    top: 7px;
    right: 7px;
    gap: 3px;
  }

  .angled-control {
    min-width: 44px;
    min-height: 44px;
    font-size: 13px;
  }

  .angled-reset,
  .angled-pan-toggle {
    font-size: 8px;
  }

  .angled-legend {
    right: 7px;
    bottom: 7px;
    left: 7px;
    max-width: none;
    gap: 3px 7px;
    padding: 4px 6px;
    font-size: 8px;
  }

  .angled-legend > span {
    white-space: normal;
  }

  .angled-height-note {
    flex-basis: 100%;
  }

  .map-status {
    top: 7px;
    left: 7px;
    max-width: calc(100% - 82px);
    padding: 4px 6px;
    font-size: 8px;
  }

  .map-legend {
    bottom: 20px;
    left: 7px;
    gap: 3px;
    padding: 4px 6px;
    font-size: 8px;
  }

  .legend-swatch {
    width: 8px;
    height: 8px;
  }

  .summary {
    gap: 8px;
  }

  .summary-item {
    padding-right: 8px;
  }

  .summary dt {
    font-size: 8px;
  }

  .summary dd {
    font-size: 28px;
    letter-spacing: -0.5px;
  }

  .summary .unit {
    display: block;
    margin: 2px 0 0;
    font-size: 12px;
  }

  .summary-note {
    font-size: 12px;
  }

  .card-note {
    font-size: 12px;
  }

  .chart-row {
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 9px;
  }

  .comparison-text {
    grid-template-columns: 1fr;
    gap: 9px;
  }

  .actions {
    flex-direction: column;
  }

  .actions .button {
    width: 100%;
    flex: none;
  }

  .saved-head {
    display: block;
  }

  .saved-head h2 {
    font-size: 24px;
  }

  .export-actions {
    width: 100%;
    margin-top: 10px;
  }

  .export-actions .button {
    flex: 1;
  }

  .table-wrap {
    margin-top: 10px;
  }

  .saved-notes .card-note {
    font-size: 8.5px;
  }

  .list-card .card-head {
    display: block;
  }

  .filter-label {
    display: block;
    width: 100%;
    margin-top: 10px;
  }

  .filter-label input {
    width: 100%;
  }

  .list-card summary,
  .method-card summary,
  .data-card summary {
    min-height: 48px;
    font-size: 19px;
  }

  .details-hint {
    font-size: 12px;
  }

  .method-body {
    font-size: 10.5px;
    overflow-wrap: anywhere;
  }

  .site-footer {
    margin-top: 28px;
    padding-top: 14px;
  }

  .site-footer__inner {
    display: block;
  }

  .site-footer p + p {
    margin-top: 3px;
  }

  .footer-note {
    margin-left: 0;
    white-space: normal;
  }
}

.entrance-restored .brand-mark path,
.entrance-restored .wordmark {
  animation: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

@page {
  size: A4 portrait;
  margin: 12mm;
}

@media print {
  body {
    border: 0;
    background: #fff;
    color: #000;
    font-size: 9pt;
  }

  .site-header,
  .primary-column,
  .panel,
  .list-card,
  .site-footer,
  .export-actions,
  .row-actions,
  .status,
  .skip-link,
  .chart-key,
  .comparison-text {
    display: none !important;
  }

  .lead,
  .workspace {
    padding-inline: 0;
  }

  .workspace {
    display: block;
  }

  .saved-card {
    margin: 0;
    padding: 0;
    border: 0;
  }

  .saved-head {
    display: none;
  }

  .print-only {
    display: block;
    margin-bottom: 12pt;
  }

  .print-only h1 {
    margin-bottom: 7pt;
    font-size: 20pt;
    line-height: 1.1;
  }

  .print-only p {
    margin-top: 5pt;
    font-size: 8pt;
    line-height: 1.4;
  }

  .table-wrap {
    position: static;
    margin: 0;
    overflow: visible;
  }

  .comparison-table {
    width: 100%;
    min-width: 0;
    border-top: 1pt solid #000;
    font-size: 7.5pt;
  }

  .comparison-table th,
  .comparison-table td {
    padding: 4pt 3pt;
  }

  .comparison-table th:first-child,
  .comparison-table td:first-child {
    width: 24%;
  }

  .comparison-table thead th {
    font-size: 6.5pt;
  }

  .comparison-table thead th:last-child,
  .comparison-table tfoot td:last-child {
    display: none;
  }

  .roof-name {
    font-size: 7.5pt;
  }

  .roof-meta {
    max-width: none;
    font-size: 6.5pt;
  }

  .row-edited {
    display: none !important;
  }

  .saved-notes {
    display: block;
    margin-top: 6pt;
  }

  .saved-notes .card-note {
    margin-top: 3pt;
    font-size: 7pt;
  }

  .method-card,
  .data-card {
    display: block;
    margin-top: 14pt;
    padding-top: 8pt;
    border-top: 1pt solid #000;
    break-inside: avoid;
  }

  .method-card summary,
  .data-card summary {
    min-height: 0;
    display: block;
    padding: 0;
    font-size: 11pt;
    list-style: none;
    cursor: default;
  }

  .method-card details[open] summary::before,
  .data-card details[open] summary::before {
    content: none;
  }

  .method-card summary::-webkit-details-marker,
  .data-card summary::-webkit-details-marker {
    display: none;
  }

  .method-body {
    max-width: none;
    margin-top: 4pt;
    padding-bottom: 0;
    color: #000;
    font-size: 7.8pt;
    line-height: 1.4;
  }

  .method-body p + p {
    margin-top: 5pt;
  }

  code {
    background: transparent;
    color: #000;
    font-size: 7.5pt;
  }

  .release-line {
    font-size: 7pt;
  }
}

@media (max-width: 900px) {
  .site-nav {
    gap: 14px;
    font-size: 13px;
  }

  .home-hero {
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
  }

  .home-copy h1 {
    max-width: 16ch;
  }

  .home-steps {
    grid-template-columns: minmax(0, 1fr);
  }

  .home-steps article {
    padding: 20px 0;
    border-right: 0;
    border-bottom: 1px solid var(--rule);
  }

  .home-steps article + article {
    padding-left: 0;
  }

  .home-steps article:last-child {
    border-bottom: 0;
  }

  .home-limits {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }

  .saved-cta {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
  }

  .plans-workspace {
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
  }
}

@media (max-width: 540px) {
  .site-header__inner {
    gap: 8px 12px;
  }

  .site-nav {
    order: 3;
    width: 100%;
    margin-left: 0;
    justify-content: space-between;
    gap: 10px;
  }

  .home-hero {
    padding-top: 30px;
  }

  .home-limits {
    padding-bottom: 36px;
  }

  .saved-cta .button {
    width: 100%;
  }

  .plans-actions .button,
  .plans-actions .file-button {
    flex: 1 1 100%;
  }
}

@media print {
  .lead,
  .plans-storm,
  .plans-toolbar,
  .saved-cta,
  .home-hero,
  .home-steps,
  .home-limits {
    display: none !important;
  }

  .plans-workspace {
    display: block;
    width: 100%;
    max-width: none;
    padding-inline: 0;
  }
}
