:root {
  --cream: #F6F0E2;
  --cream-2: #EDE4CF;
  --card: #FFFCF5;
  --ink: #22271F;
  --muted: #56604F;         /* 5.9:1 on cream */
  --green: #1E4033;
  --green-2: #2F5D4A;
  --green-tint: #E1EBDD;
  --clay: #A44A2E;          /* white text on it: 5.8:1 */
  --clay-deep: #8A3B22;
  --line: #D8CCB0;
  --field: #857B62;         /* 3.4:1 for input borders */
  --error: #A32A1B;

  --font-head: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

  --r: 12px;
  --r-sm: 8px;
  --shadow: 0 1px 0 rgba(30,64,51,.06), 0 8px 24px -12px rgba(30,64,51,.28);

  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 72px;
  --gutter: clamp(16px, 4vw, 32px);
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--cream); color: var(--ink); font-family: var(--font-body); font-size: 1.0625rem; line-height: 1.55; overflow-wrap: break-word; }
h1, h2, h3 { font-family: var(--font-head); font-weight: 600; line-height: 1.12; margin: 0; letter-spacing: -0.01em; }
p { margin: 0 0 var(--s3); }
button, input { font: inherit; }
:focus-visible { outline: 3px solid var(--clay); outline-offset: 3px; }
.wrap { width: 100%; max-width: 1120px; margin-inline: auto; padding-inline: var(--gutter); }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--green); color: #fff; padding: 10px 16px; border-radius: var(--r-sm); }
.skip:focus { left: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ico { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* banner + header */
.banner { background: var(--green); color: #F3EFE2; font-size: .9375rem; }
.banner p { margin: 0; padding: 8px var(--gutter); text-align: center; }
.banner strong { color: #FFE9B8; }
.site-header { border-bottom: 1px solid var(--line); }
.head-row { display: flex; align-items: center; justify-content: space-between; gap: var(--s4); min-height: 64px; }
.brand { margin: 0; font-family: var(--font-head); font-weight: 700; font-size: 1.375rem; color: var(--green); }
.owner-toggle { display: inline-flex; align-items: center; gap: var(--s2); min-height: 44px; padding: 8px 14px; background: transparent; color: var(--green); border: 1.5px solid var(--green); border-radius: var(--r-sm); font-weight: 600; font-size: .9375rem; cursor: pointer; transition: background-color .15s ease, color .15s ease; }
.owner-toggle:hover, .owner-toggle[aria-expanded="true"] { background: var(--green); color: #fff; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 10px 20px; border-radius: var(--r-sm); border: 2px solid transparent; font-weight: 700; cursor: pointer; text-decoration: none; transition: background-color .15s ease, transform .15s ease; }
.btn-clay { background: var(--clay); color: #fff; }
.btn-clay:hover { background: var(--clay-deep); }
.btn-clay:active { transform: translateY(1px); }
.btn-quiet { background: transparent; color: var(--green); border-color: var(--green); }
.btn-quiet:hover { background: var(--green); color: #fff; }
.btn-block { width: 100%; }

/* owner panel */
.owner { margin-top: var(--s5); background: var(--card); border: 1.5px solid var(--green); border-left-width: 8px; border-radius: var(--r); padding: var(--s5); box-shadow: var(--shadow); }
.owner-head { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--s5); flex-wrap: wrap; margin-bottom: var(--s5); }
.owner-head h2 { font-size: 1.75rem; margin-bottom: var(--s2); }
.owner-line { margin-bottom: var(--s2); max-width: 60ch; color: var(--green); }
.owner-sub { margin: 0; color: var(--muted); font-size: .9375rem; max-width: 60ch; }
.owner-body { display: grid; grid-template-columns: 1.3fr 1fr; gap: var(--s6); align-items: start; }
.owner-block h3 { font-family: var(--font-body); font-size: .8125rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin-bottom: var(--s3); }
.rate-table { display: grid; grid-template-columns: 1fr 96px 96px; gap: var(--s2) var(--s3); align-items: center; }
.rate-table.one { grid-template-columns: 1fr auto; }
.rt-h { font-size: .8125rem; font-weight: 700; color: var(--muted); text-align: left; }
.rt-name { font-weight: 500; }
.rt-cell { display: flex; align-items: center; gap: var(--s2); }
.rt-unit { font-size: .8125rem; color: var(--muted); white-space: nowrap; }
.rate-in { width: 96px; min-height: 44px; padding: 8px 10px; border: 2px solid var(--field); border-radius: var(--r-sm); background: #fff; color: var(--ink); font-variant-numeric: tabular-nums; }
.rate-in:focus-visible { outline-offset: 1px; border-color: var(--green); }
.rate-in[aria-invalid="true"] { border-color: var(--error); }
.owner-warn { margin: var(--s4) 0 0; font-weight: 600; color: var(--error); }
.owner-warn:empty { display: none; }

/* tabs */
.tabs { display: flex; gap: var(--s2); margin-top: var(--s6); flex-wrap: wrap; }
.tab { flex: 1 1 280px; max-width: 420px; text-align: left; display: flex; flex-direction: column; gap: 2px; min-height: 64px; padding: 12px 18px; background: var(--cream-2); color: var(--ink); border: 2px solid transparent; border-radius: var(--r); cursor: pointer; transition: background-color .15s ease, border-color .15s ease; }
.tab:hover { border-color: var(--green-2); }
.tab-main { font-weight: 700; }
.tab-sub { font-size: .875rem; color: var(--muted); }
.tab[aria-selected="true"] { background: var(--green); color: #fff; border-color: var(--green); }
.tab[aria-selected="true"] .tab-sub { color: #D5E4D9; }

.calc-head { margin: var(--s7) 0 var(--s6); max-width: 720px; }
.calc-head h1 { font-size: clamp(2.125rem, 5vw, 3.375rem); margin-bottom: var(--s3); font-variation-settings: "opsz" 96; }
.blurb { font-size: 1.1875rem; color: var(--muted); max-width: 56ch; margin: 0; }

/* layout */
.calc-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: var(--s7); align-items: start; padding-bottom: var(--s8); }
.result { position: sticky; top: 16px; }

.group { border: 0; padding: 0; margin: 0 0 var(--s6); min-width: 0; }
.group legend, .legend-like { display: block; padding: 0; margin-bottom: var(--s3); font-family: var(--font-head); font-weight: 600; font-size: 1.375rem; line-height: 1.2; }
.hint-line { font-size: .9375rem; color: var(--muted); margin: var(--s2) 0 0; }
.hint-line.bad { color: var(--error); font-weight: 600; }

/* choice cards (radios) */
.loads { display: grid; gap: var(--s2); }
.materials { display: grid; gap: var(--s2); }
.choice { position: relative; display: block; }
.choice input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; z-index: 1; }
.choice-face { display: flex; align-items: center; gap: var(--s4); min-height: 64px; padding: 12px 52px 12px 16px; background: var(--card); border: 2px solid var(--line); border-radius: var(--r); position: relative; transition: border-color .15s ease, background-color .15s ease; }
.choice:hover .choice-face { border-color: var(--green-2); }
.choice-face::after { content: ""; position: absolute; right: 16px; top: 50%; width: 22px; height: 22px; margin-top: -11px; border: 2px solid var(--field); border-radius: 50%; background: #fff; }
.choice input:checked + .choice-face { border-color: var(--green); background: var(--green-tint); box-shadow: inset 0 0 0 1px var(--green); }
.choice input:checked + .choice-face::after { border-color: var(--green); background: radial-gradient(circle, var(--green) 0 45%, #fff 50%); }
.choice input:focus-visible + .choice-face { outline: 3px solid var(--clay); outline-offset: 3px; }
.choice-text { display: flex; flex-direction: column; min-width: 0; }
.choice-text strong { font-weight: 700; }
.choice-text span { font-size: .9375rem; color: var(--muted); }
.price-hint { font-size: .875rem; color: var(--muted); font-variant-numeric: tabular-nums; font-style: normal; }
.choice-text em.price-hint { margin-top: 2px; color: var(--green); font-weight: 600; }
.fill-ico { width: 56px; height: auto; flex: none; }
.fill-ico .bed { fill: #fff; stroke: var(--green); stroke-width: 1.6; }
.fill-ico .load { fill: var(--clay); }
.fill-ico .wheel { fill: var(--green); }
.fill-ico .cab { fill: none; stroke: var(--green); stroke-width: 1.6; stroke-linejoin: round; }

/* extras */
.extras { border-top: 1px solid var(--line); }
.extra-row { display: flex; justify-content: space-between; align-items: center; gap: var(--s4); padding: 10px 0; border-bottom: 1px solid var(--line); min-height: 64px; }
.extra-label { display: flex; flex-direction: column; min-width: 0; }
.extra-label > label, .check-text { font-weight: 500; }
.stepper { display: inline-flex; align-items: center; gap: 0; flex: none; }
.stepper .step { width: 44px; height: 44px; border: 2px solid var(--field); background: var(--card); color: var(--green); font-size: 1.375rem; font-weight: 700; line-height: 1; cursor: pointer; }
.stepper .step:first-child { border-radius: var(--r-sm) 0 0 var(--r-sm); border-right: 0; }
.stepper .step:last-child { border-radius: 0 var(--r-sm) var(--r-sm) 0; border-left: 0; }
.stepper .step:hover { background: var(--green-tint); }
.stepper input { width: 56px; height: 44px; text-align: center; border: 2px solid var(--field); border-radius: 0; background: #fff; color: var(--ink); font-weight: 700; font-variant-numeric: tabular-nums; -moz-appearance: textfield; }
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.check { display: flex; align-items: center; gap: var(--s3); width: 100%; cursor: pointer; min-height: 44px; }
.check input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.box { flex: none; width: 26px; height: 26px; border: 2px solid var(--field); border-radius: 6px; background: #fff; display: grid; place-items: center; transition: background-color .15s ease; }
.box::after { content: ""; width: 12px; height: 7px; border-left: 3px solid #fff; border-bottom: 3px solid #fff; transform: rotate(-45deg) translate(1px, -1px) scale(0); transition: transform .15s ease; }
.check input:checked + .box { background: var(--green); border-color: var(--green); }
.check input:checked + .box::after { transform: rotate(-45deg) translate(1px, -1px) scale(1); }
.check input:focus-visible + .box { outline: 3px solid var(--clay); outline-offset: 3px; }

/* sqft */
.sqft-row { display: grid; gap: var(--s4); }
.sqft-input { position: relative; max-width: 260px; }
#sqft { width: 100%; min-height: 64px; padding: 8px 64px 8px 16px; border: 2px solid var(--field); border-radius: var(--r); background: #fff; color: var(--ink); font-size: 2rem; font-weight: 700; font-variant-numeric: tabular-nums; }
#sqft:focus-visible { outline-offset: 1px; border-color: var(--green); }
.unit { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); color: var(--muted); font-weight: 600; }
input[type="range"] { width: 100%; height: 44px; accent-color: var(--green); background: transparent; cursor: pointer; }

/* result card */
.result { background: var(--card); border: 2px solid var(--green); border-radius: var(--r); box-shadow: var(--shadow); overflow: hidden; }
.result-top { background: var(--green); color: #fff; padding: 12px var(--s5); }
.result-top h2 { font-family: var(--font-body); font-size: .875rem; font-weight: 700; text-transform: uppercase; letter-spacing: .12em; }
.result-body { padding: var(--s5); }
.range { display: flex; align-items: baseline; flex-wrap: wrap; gap: 0 var(--s3); margin: 0 0 var(--s2); font-variant-numeric: tabular-nums lining-nums; font-feature-settings: "tnum" 1, "lnum" 1; color: var(--green); }
.est { font-family: var(--font-body); font-weight: 800; font-size: clamp(2.25rem, 3.5vw, 2.875rem); letter-spacing: -0.02em; line-height: 1.1; }
.dash { font-size: 2rem; color: var(--clay); font-weight: 600; }
.minnote { font-size: .9375rem; font-weight: 600; color: var(--clay-deep); margin-bottom: var(--s3); }
.bk-h { font-family: var(--font-body); font-size: .8125rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin: var(--s5) 0 var(--s2); }
.breakdown { list-style: none; margin: 0 0 var(--s5); padding: 0; border-top: 1px solid var(--line); font-size: .9375rem; }
.breakdown li { display: flex; justify-content: space-between; gap: var(--s4); padding: 9px 0; border-bottom: 1px dotted var(--field); }
.bl { min-width: 0; }
.bv { font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.disclaimer { background: var(--cream-2); border-radius: var(--r-sm); padding: 10px 14px; font-size: .9375rem; margin-bottom: var(--s4); }

/* form + success */
.quote-wrap { margin-top: var(--s2); }
.qf-intro { font-weight: 600; }
.field { margin-bottom: var(--s4); }
.field label { display: block; font-weight: 700; margin-bottom: 6px; }
.hint { font-weight: 400; color: var(--muted); }
.field input { width: 100%; min-height: 48px; padding: 10px 14px; border: 2px solid var(--field); border-radius: var(--r-sm); background: #fff; color: var(--ink); }
.field input::placeholder { color: #6B6455; opacity: 1; }
.field input:focus-visible { outline-offset: 1px; border-color: var(--green); }
.field input[aria-invalid="true"] { border-color: var(--error); background: #FFF6F3; }
.err { color: var(--error); font-weight: 600; font-size: .9375rem; margin: 6px 0 0; }
.err:empty { display: none; }
.fine { font-size: .875rem; color: var(--muted); text-align: center; margin: var(--s3) 0 0; }
.success:focus { outline: none; }
.ok-ico { width: 48px; height: 48px; fill: none; stroke: var(--green); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.success h3 { font-size: 1.75rem; margin: var(--s2) 0 var(--s3); }
.succ-est { font-size: 1.25rem; margin-bottom: var(--s2); }
.succ-est strong { font-variant-numeric: tabular-nums; color: var(--green); }
.succ-what { color: var(--muted); }
.demo-line { background: var(--green-tint); border-left: 5px solid var(--green); padding: 10px 14px; border-radius: 0 var(--r-sm) var(--r-sm) 0; font-size: .9375rem; }
.linkbtn { background: none; border: 0; min-height: 44px; padding: 10px 0; font-weight: 700; color: var(--green); text-decoration: underline; text-underline-offset: 4px; cursor: pointer; }

.site-footer { border-top: 1px solid var(--line); padding: var(--s5) 0 var(--s7); color: var(--muted); font-size: .9375rem; }
.site-footer p { margin: 0; max-width: 70ch; }

.mini-est { display: none; }

@media (max-width: 900px) {
  .calc-grid { grid-template-columns: 1fr; gap: var(--s6); }
  .result { position: static; }
  .owner-body { grid-template-columns: 1fr; gap: var(--s5); }
  body { padding-bottom: 76px; }
  .mini-est { display: flex; align-items: center; gap: var(--s3); position: fixed; left: var(--s3); right: var(--s3); bottom: var(--s3); z-index: 40; min-height: 56px; padding: 8px 16px; background: var(--green); color: #fff; border-radius: var(--r); text-decoration: none; box-shadow: 0 8px 24px -8px rgba(0,0,0,.45); font-size: .9375rem; }
  .mini-est strong { font-size: 1.25rem; font-variant-numeric: tabular-nums; }
  .mini-go { margin-left: auto; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
  .mini-est[hidden] { display: none !important; }
}
@media (max-width: 560px) {
  .head-row { flex-wrap: wrap; padding-block: 8px; }
  .brand { font-size: 1.25rem; }
  .tab { flex-basis: 100%; max-width: none; }
  .choice-face { gap: var(--s3); padding-right: 48px; }
  .fill-ico { width: 48px; }
  .rate-table { grid-template-columns: 1fr 84px 84px; }
  .rate-in { width: 84px; }
  .rate-table.one { grid-template-columns: 1fr; }
  .rate-table.one .rt-name { margin-top: var(--s2); font-weight: 600; }
  .owner { padding: var(--s4); }
  .result-body { padding: var(--s4); }
  .extra-row { align-items: center; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
