:root {
  color-scheme: light;
  --bg: #f6f5f5;
  --paper: #fff;
  --ink: #242122;
  --muted: #5e585a;
  --line: #e5dede;
  --forest: #542123;
  --accent: #f7bdba;
  --soft: #f8ecec;
  font: 16px/1.5 system-ui, -apple-system, sans-serif;
  scroll-behavior: smooth;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); }
[hidden] { display: none !important; }
h1, h2, h3, p, dl, dd { margin: 0; }
a { color: inherit; }
button, input, select { font: inherit; }
button, summary, select { cursor: pointer; }
:focus-visible { outline: 2px solid #a82328; outline-offset: 4px; }
.shell { width: min(1112px, calc(100% - 64px)); margin-inline: auto; }
.mast { background: #fff; }
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 78px; }
.brand { display: inline-flex; flex: 0 1 auto; text-decoration: none; }
.brand img { display: block; width: clamp(155px, 24vw, 222px); max-width: 100%; height: auto; }
.top-links { display: flex; gap: clamp(12px, 4vw, 32px); color: #544a4d; font-size: .9rem; font-weight: 650; }
.top-links a { display: flex; align-items: center; min-height: 44px; text-decoration: none; }
.top-links a:hover { color: #a82328; text-decoration: underline; }
.hero { position: relative; isolation: isolate; padding: 29px 0 35px; color: white; }
.hero::before {
  content: "";
  position: absolute;
  inset: 0 calc((100% - 100vw) / 2);
  z-index: -1;
  background: linear-gradient(105deg, #692224 0%, #862126 62%, #ab272a 100%);
}
body { overflow-x: clip; }
.hero h1 { font-size: clamp(1.9rem, 5vw, 3.55rem); line-height: 1.06; letter-spacing: -.055em; font-weight: 740; }
.hero p { margin-top: 11px; max-width: 620px; color: #fbe2e0; }
.content { margin-top: 28px; }
.project-grid, .comparison { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
.card { border: 1px solid var(--line); border-radius: 16px; background: var(--paper); padding: 24px; }
h2 { font-size: 1.45rem; line-height: 1.18; letter-spacing: -.035em; }
h3 { font-size: 1.075rem; letter-spacing: -.015em; }
.area-control { margin-top: 15px; }
.area-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: .9rem; font-weight: 680; }
.area-value { width: 114px; flex: 0 0 auto; }
.entry.area-value input { text-align: right; }
.entry.area-value .sr-only { padding: 0; }
#area-slider { accent-color: #a82328; cursor: ew-resize; display: block; width: 100%; height: 30px; margin: 6px 0 0; }
.range-labels { display: flex; justify-content: space-between; color: var(--muted); font-size: .76rem; }
.project-fields { margin-top: 13px; }
.project-fields .entry { max-width: 114px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.fields { display: grid; gap: 15px; }
.triple { grid-template-columns: repeat(3,minmax(0,1fr)); }
.settings-grid { grid-template-columns: repeat(4,minmax(0,1fr)); }
.fields label { display: flex; flex-direction: column; justify-content: start; min-width: 0; gap: 7px; font-size: .85rem; font-weight: 650; }
.triple label { justify-content: end; }
label small, .field-note, .subtle { font-size: .81rem; font-weight: 450; color: var(--muted); }
.field-note { margin-top: 13px; }
.entry { display: flex; align-items: center; gap: 6px; min-height: 45px; min-width: 0; border: 1px solid #d8cdce; border-radius: 9px; color: var(--muted); background: #fdfbfb; }
.entry:focus-within { border-color: #a82328; outline: 1px solid #a82328; }
.entry:has([aria-invalid="true"]) { border-color: #b32b30; }
.entry input, .entry select { color: var(--ink); font-size: 1rem; font-weight: 650; font-variant-numeric: tabular-nums; border: 0; border-radius: 9px; outline: 0; background: transparent; min-width: 0; width: 100%; padding: 10px; }
.entry select { appearance: auto; }
.entry input[type="number"] { appearance: textfield; }
.entry input::-webkit-inner-spin-button, .entry input::-webkit-outer-spin-button { appearance: none; margin: 0; }
.entry > span { flex: 0 0 auto; padding-right: 10px; font-size: .78rem; }
.entry input::placeholder { color: #6b6163; font-weight: 450; }
.project-note { margin-top: 14px; padding: 12px 14px; border-radius: 9px; background: var(--soft); font-size: .81rem; color: #654348; }
.link-button { display: inline-block; border: 0; padding: 7px 0; background: transparent; color: #8d1f25; text-decoration: underline; text-underline-offset: 3px; font-size: .81rem; }
.error { color: #a82328; font-size: .85rem; margin-top: 10px; }
.estimate { background: #f8ecec; border-color: #ebd4d5; }
.total { font-size: clamp(2.1rem, 4.8vw, 3.35rem); line-height: 1.08; overflow-wrap: anywhere; letter-spacing: -.065em; font-weight: 750; font-variant-numeric: tabular-nums; margin: 8px 0 1px; }
.breakdown { margin-top: 13px; }
dl .row { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: baseline; gap: 12px; border-top: 1px solid #e5d7d8; padding: 7px 0; font-size: .86rem; }
dl .row:last-child { padding-bottom: 0; }
dl dd { font-variant-numeric: tabular-nums; font-weight: 700; text-align: right; }
.section, .settings { margin-top: 37px; scroll-margin-top: 15px; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 15px; margin-bottom: 15px; }
.section-head h2 { font-size: 1.85rem; }
.section-head p { color: var(--muted); font-size: .92rem; margin-top: 5px; }
.outline { color: var(--ink); background: #fff; border: 1px solid #d8c9cb; border-radius: 9px; min-height: 43px; padding: 8px 12px; font-size: .83rem; font-weight: 650; }
.outline:hover:enabled { background: #f8ecec; }
.outline:disabled { opacity: .5; cursor: default; }
.scenario-inputs .fields { margin-top: 12px; }
.divider { border-top: 1px solid var(--line); margin-top: 19px; padding-top: 17px; }
.empty { margin-top: 15px; padding: 13px 16px; border: 1px dashed #d5c3c5; border-radius: 10px; color: var(--muted); font-size: .88rem; }
.savings-strip { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin: 15px 0; padding: 13px 16px; background: var(--forest); color: #fff7f7; border-radius: 11px; font-size: .86rem; }
.savings-strip strong { color: var(--accent); font-size: 1.02rem; }
.option h3 { margin-bottom: 12px; }
.funded { background: #fff7f7; }
.roi-card { margin-top: 15px; border-color: #e0bfc1; }
.roi-head { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; justify-content: space-between; margin-bottom: 10px; }
.roi-value { color: #97242a; font-size: clamp(1.45rem, 4.6vw, 2.45rem); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; max-width: 100%; letter-spacing: -.045em; }
.years-card { margin-top: 15px; padding-block: 15px; }
summary { font-weight: 700; line-height: 1.4; padding: 4px 0; }
.table-wrap { overflow-x: auto; margin-top: 10px; }
table { width: 100%; border-collapse: collapse; font-size: .82rem; font-variant-numeric: tabular-nums; }
th, td { text-align: right; padding: 7px 8px; border-bottom: 1px solid var(--line); }
th:first-child, td:first-child { text-align: left; padding-left: 0; }
td { white-space: nowrap; }
.settings { padding-block: 15px; }
.settings-body { margin-top: 15px; }
.settings-actions { margin-top: 14px; display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
#settings-status { color: var(--muted); font-size: .82rem; }
.footer { display: flex; justify-content: space-between; gap: 14px; padding: 18px 0 25px; margin-top: 26px; border-top: 1px solid var(--line); color: var(--muted); font-size: .8rem; }
@media (max-width: 735px) {
  .shell { width: calc(100% - 32px); }
  .hero { padding: 23px 0 29px; }
  .project-grid, .comparison { grid-template-columns: 1fr; }
  .settings-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .card { padding: 19px; }
  .section, .settings { margin-top: 27px; }
  .section-head { align-items: start; flex-direction: column; }
}
@media (max-width: 490px) {
  .triple { grid-template-columns: 1fr; gap: 11px; }
  .top { min-height: 62px; }
  .brand img { width: 151px; }
  .top-links { font-size: .8rem; gap: 11px; }
  dl .row { grid-template-columns: minmax(0,1fr) minmax(0,46%); gap: 8px; }
  dl dd { overflow-wrap: anywhere; }
}
@media print {
  :root, body { background: white; }
  .mast { background: white; color: var(--ink); }
  .hero p, .top-links, .project .fields, .area-control, button, .settings, .scenario-inputs, .footer, .hero::before { display: none !important; }
  .hero { color: var(--ink); }
  .top { min-height: 0; }
  .brand img { width: 150px; }
  .hero { padding: 12px 0; }
  .hero h1 { font-size: 2rem; }
  .shell { width: 100%; }
  .project-grid, .comparison { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .card { break-inside: avoid; padding: 12px; }
  .savings-strip, .savings-strip strong { background: white; color: var(--ink); }
  #print-context { display: block !important; font-size: .8rem; color: var(--muted); margin-block: 8px; }
}
