:root {
  --paper: #f7f5ef;
  --surface: #fffdf8;
  --ink: #20342f;
  --muted: #516258;
  --line: #deded2;
  --accent: #a44328;
  --accent-dark: #83351f;
  --tint: #f1e7d9;
  --pale: #edf0e8;
  --border-radius: 18px;
  --frame: 1170px;
  --shadow: 0 18px 50px rgba(37, 49, 41, .07);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { color-scheme: light; }
body {
  margin: 0;
  min-width: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  line-height: 1.58;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent-dark); text-underline-offset: .18em; }
a:hover { color: var(--accent); }
button, input, select { font: inherit; color: inherit; }
img { display: block; max-width: 100%; }
main { min-height: 62vh; }
h1, h2, h3, p, figure, dl, dd { margin: 0; }
h1, h2, h3 { line-height: 1.12; }
h1, h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 500;
  letter-spacing: -.045em;
}
h1 { font-size: clamp(2.8rem, 5.5vw, 5.1rem); }
h2 { font-size: clamp(1.7rem, 3.1vw, 2.55rem); }
h3 { font-size: 1.22rem; letter-spacing: -.025em; }

.frame { width: min(var(--frame), calc(100% - 60px)); margin-inline: auto; }
.skip-link {
  position: fixed; z-index: 5; top: 12px; left: 12px;
  padding: 10px 15px; border: 2px solid var(--ink); background: var(--surface);
  transform: translateY(-160%);
}
.skip-link:focus { transform: translateY(0); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.site-header { border-bottom: 1px solid var(--line); }
.site-header__inner {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  min-height: 73px; padding-block: 12px;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--ink); font-weight: 750; font-size: 1.03rem;
  letter-spacing: -.035em; line-height: 1.1; text-decoration: none;
}
.brand img { flex: none; border-radius: 9px; }
.site-header nav, .site-footer nav {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 25px;
}
.site-header nav a, .site-footer nav a {
  color: var(--muted); font-size: .90rem; font-weight: 600;
  text-decoration: none; padding-block: 4px;
}
.site-header nav a:hover, .site-header nav a[aria-current="page"] {
  color: var(--accent-dark); text-decoration: underline; text-underline-offset: 6px;
}

.hero {
  display: grid; grid-template-columns: .98fr 1.02fr; align-items: center;
  gap: clamp(30px, 5vw, 70px); padding-block: 55px 62px;
}
.eyebrow {
  display: flex; align-items: center; gap: .6rem; margin-bottom: 16px;
  color: var(--muted); text-transform: uppercase; font-size: .72rem; font-weight: 750; letter-spacing: .12em;
}
.eyebrow > span { width: 16px; height: 2px; background: var(--accent); flex: none; }
.hero h1 { font-size: clamp(2.72rem, 4.52vw, 4rem); }
.hero h1 em { color: var(--accent-dark); font-weight: inherit; }
.intro { max-width: 43rem; color: var(--muted); font-size: 1.075rem; line-height: 1.7; }
.hero .intro { margin-top: 20px; max-width: 31rem; }
.actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: .58rem;
  min-height: 47px; padding: 11px 16px; border: 1px solid transparent;
  border-radius: 9px; text-decoration: none; font-size: .9rem;
  font-weight: 720; line-height: 1.25; cursor: pointer; white-space: normal;
  transition: background-color .16s ease, color .16s ease, border-color .16s ease;
}
.button--primary { color: white; background: var(--accent); border-color: var(--accent); }
.button--primary:hover { color: white; background: var(--accent-dark); border-color: var(--accent-dark); }
.button--outline { color: var(--ink); border-color: #adb3a8; background: transparent; }
.button--outline:hover { color: var(--ink); border-color: var(--ink); background: var(--pale); }
.button--small { min-height: 37px; color: var(--ink); background: var(--pale); border-color: #d4dbcf; font-size: .8rem; padding: 8px 12px; }
.button--small:hover { background: #e1e7db; border-color: #b1bbad; }
.button:disabled { opacity: .52; cursor: default; }
.button--wide { width: 100%; }
.unit-note { margin-top: 14px; color: var(--muted); font-size: .83rem; }
.hero__photo { position: relative; overflow: hidden; border-radius: 20px; background: var(--tint); box-shadow: var(--shadow); }
.hero__photo img { width: 100%; height: auto; aspect-ratio: 1.35; object-fit: cover; object-position: 50% 51%; }
.hero__photo figcaption {
  position: absolute; bottom: 15px; left: 15px; max-width: calc(100% - 30px);
  padding: 5px 10px; border-radius: 5px;
  background: #fcf9f0; color: var(--ink); font-size: .78rem; font-weight: 640;
}

.home-section { margin-bottom: 61px; }
.section-heading { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 6px 20px; margin-bottom: 18px; }
.section-heading > p { color: var(--muted); font-size: .93rem; }
.tool-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.tool-card, .card {
  min-width: 0; border: 1px solid var(--line); border-radius: var(--border-radius);
  background: var(--surface); box-shadow: 0 6px 28px rgba(37, 49, 41, .04);
}
.tool-card { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: clamp(20px, 3vw, 29px); color: var(--ink); text-decoration: none; transition: border-color .16s ease, box-shadow .16s ease; }
.tool-card:hover { color: var(--ink); border-color: #a6b0a4; box-shadow: var(--shadow); }
.tool-card h3 { font-size: 1.32rem; }
.tool-card > p { color: var(--muted); max-width: 32rem; flex: 1; }
.tool-card__icon {
  width: 44px; height: 44px; margin-bottom: 5px; border-radius: 11px;
  position: relative; display: inline-grid; place-items: center; background: var(--tint); color: var(--accent-dark);
}
.icon-pitch::before { content: ""; width: 23px; height: 15px; border: 2px solid var(--accent); clip-path: polygon(0 100%, 100% 0, 100% 100%); background: var(--accent); opacity: .84; }
.icon-pitch::after { content: ""; position: absolute; width: 13px; height: 8px; margin-left: 4px; margin-top: 3px; background: var(--tint); clip-path: polygon(0 100%, 100% 0, 100% 100%); }
.icon-cost::before { content: "$"; font: 700 24px Georgia, serif; }
.text-action { display: inline-flex; align-items: baseline; gap: 7px; color: var(--accent-dark); font-size: .9rem; font-weight: 700; text-decoration: none; }
.tool-card .text-action { margin-top: 9px; }
.text-action:hover { text-decoration: underline; }
.example-panel {
  display: grid; grid-template-columns: 1fr minmax(210px, 320px); align-items: center; gap: clamp(22px, 6vw, 80px);
  padding: clamp(25px, 4vw, 46px); border: 1px solid #daddd0; border-radius: var(--border-radius);
  background: var(--pale);
}
.example-panel h2 { margin-bottom: 11px; }
.example-panel p:not(.eyebrow), .measure-text p { color: var(--muted); max-width: 43rem; }
.example-panel .text-action, .measure-text .text-action { margin-top: 15px; }
.example-values > div { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; padding: .64rem 0; border-bottom: 1px solid #cdd7cc; }
.example-values dt { font-size: .87rem; color: var(--muted); }
.example-values dd { font-weight: 750; font-variant-numeric: tabular-nums; white-space: nowrap; }
.example-values dd small { font-weight: 500; }
.measure-text h2 { margin-bottom: 13px; }

.page-intro { padding: 27px 0 25px; }
.breadcrumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; margin-bottom: 13px; color: var(--muted); font-size: .79rem; }
.breadcrumbs a { text-decoration: none; }
.page-intro h1 { font-size: clamp(2.55rem, 4.7vw, 4.35rem); margin-bottom: 9px; }
.workspace { display: grid; grid-template-columns: minmax(0, 1.23fr) minmax(0, .93fr); align-items: start; gap: 18px; margin-bottom: 47px; }
.card { padding: clamp(17px, 2.7vw, 29px); }
.card-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 6px 12px; margin-bottom: 14px; }
.card-heading h2 { font-size: clamp(1.57rem, 2.7vw, 2.15rem); }
fieldset { margin: 0; min-inline-size: 0; padding: 0; border: 0; }
legend, .field > span:first-child { font-weight: 690; font-size: .88rem; }
.mode-fieldset { margin-bottom: 14px; }
.mode-fieldset legend { padding-bottom: 6px; }
.segmented { display: flex; flex-wrap: wrap; gap: 5px; padding: 5px; border: 1px solid #dde0d6; background: #f3f4ee; border-radius: 10px; }
.segmented label { flex: 1 1 auto; min-width: 0; position: relative; cursor: pointer; }
.segmented input { position: absolute; top: 3px; left: 8px; width: 1px; height: 1px; opacity: 0; }
.segmented span {
  display: flex; align-items: center; justify-content: center; text-align: center;
  min-height: 35px; padding: 4px 8px; border: 1px solid transparent; border-radius: 7px; color: var(--muted); font-weight: 630; font-size: .8rem;
}
.segmented input:checked + span { color: var(--ink); background: white; border-color: #cbd3c7; box-shadow: 0 1px 2px rgba(29, 48, 30, .1); }
.segmented input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 12px; }
.field-grid--four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.field { display: grid; min-width: 0; align-content: start; gap: 4px; }
.field small { color: var(--muted); font-size: .76rem; font-weight: 450; }
.field > span:first-child > small { display: inline-block; margin-left: 4px; color: var(--muted); }
.number-box, .field select {
  display: flex; align-items: center; min-height: 45px; gap: 6px;
  border: 1px solid #c9cec2; border-radius: 8px; background: #fffefa;
}
.number-box { padding-inline: 10px; }
.number-box:focus-within, .field select:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.number-box span { flex: none; color: var(--muted); font-size: .77rem; }
.number-box input { width: 100%; min-width: 0; min-height: 43px; padding: 5px 0; border: 0; background: transparent; font-variant-numeric: tabular-nums; outline: 0; }
.number-box input::placeholder { color: #69746a; }
.field select { width: 100%; padding-inline: 9px; }
.field-group, #cost-pitch-field { margin-top: 13px; }
.hint { color: var(--muted); margin-bottom: 9px; font-size: .82rem; }
.pitch-figure { margin-top: 15px; padding: 4px 8px 8px; border: 1px solid #e2e0d4; border-radius: 10px; background: #faf7f0; }
.pitch-figure canvas { display: block; width: 100%; height: 150px; }
.pitch-figure figcaption { color: var(--muted); text-align: center; font-size: .74rem; }

.feature-number {
  color: var(--accent-dark); font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(3rem, 7vw, 4.8rem); letter-spacing: -.065em; line-height: 1.02;
  overflow-wrap: anywhere; font-variant-numeric: lining-nums tabular-nums;
}
.result-caption { color: var(--muted); font-size: .82rem; margin-top: 4px; }
.status-message { min-height: 1.5em; color: var(--muted); font-size: .84rem; margin: 10px 0; }
.measurement-list { margin-block: 13px 19px; }
.measurement-list > div { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding-block: 8px; border-top: 1px solid var(--line); }
.measurement-list dt { color: var(--muted); font-size: .85rem; }
.measurement-list dd { text-align: right; font-size: .94rem; font-weight: 710; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.notice, .difference { border: 1px solid #e7d6c2; border-radius: 8px; background: #fbefe2; color: #773d2c; padding: 8px 10px; font-size: .82rem; margin-block: 8px 13px; }
.quote-forms { margin-block: 18px 12px; display: grid; gap: 14px; }
.quote-inputs { border: 1px solid #dde0d6; border-radius: 11px; padding: 11px; }
.quote-inputs legend { display: flex; align-items: center; gap: 5px; padding-inline: 6px; }
.quote-letter {
  display: inline-grid; place-items: center; width: 23px; height: 23px; flex: 0 0 auto; border-radius: 6px;
  background: #e5ebe2; color: var(--ink); font-size: .77rem; font-weight: 800; text-align: center;
}
.quote-inputs .field-grid { margin-top: 9px; }
.extras { margin-top: 9px; border-top: 1px solid var(--line); }
.extras summary { padding-top: 8px; color: var(--muted); cursor: pointer; font-weight: 650; font-size: .81rem; }
.quote-results-grid { display: grid; gap: 11px; }
.quote-result { border: 1px solid var(--line); border-radius: 11px; background: #fbfaf4; padding: 12px; break-inside: avoid; }
.quote-result header { display: flex; align-items: center; gap: 7px; }
.quote-result h3 { font-size: .99rem; }
.quote-total { margin-top: 5px; color: var(--accent-dark); font-size: clamp(1.38rem, 3vw, 1.8rem); font-weight: 750; font-variant-numeric: tabular-nums; letter-spacing: -.045em; overflow-wrap: anywhere; }
.quote-unit { color: var(--muted); font-size: .76rem; margin-bottom: 5px; }
.line-items { display: grid; }
.line-items > div { display: flex; justify-content: space-between; align-items: baseline; gap: 6px; border-top: 1px solid #e3e2d6; padding-top: 2px; font-size: .76rem; }
.line-items dt { color: var(--muted); }
.line-items dd { text-align: right; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; font-weight: 650; }
.difference { margin-bottom: 7px; font-weight: 650; }
.small-note { color: var(--muted); font-size: .76rem; margin-top: 10px; }
.panel-card .hint { margin: 9px 0; }
.measurement-list--panels { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-block: 11px 2px; }
.measurement-list--panels > div { display: block; padding: 10px; border: 1px solid #d9ded3; border-radius: 8px; background: var(--pale); }
.measurement-list--panels dd { margin-top: 3px; text-align: left; font-size: 1.18rem; }

.article { display: grid; gap: 21px; margin-bottom: 60px; }
.article > section { max-width: 51rem; }
.article h2 { margin-bottom: 8px; }
.article p { color: var(--muted); }
.article p + p { margin-top: 8px; }
.article .text-action { margin-top: 12px; }
.prose { gap: 24px; }
.prose .actions { margin-top: 0; }
.table-wrap { overflow: auto; margin-top: 15px; border: 1px solid var(--line); border-radius: 10px; }
table { border-collapse: collapse; text-align: left; width: 100%; color: var(--ink); background: var(--surface); font-size: .88rem; }
th, td { padding: 8px 12px; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }
thead th { background: var(--pale); font-weight: 740; }
tbody tr:last-child > * { border-bottom: 0; }
.site-footer { background: var(--ink); color: #fbf8f0; padding-block: 25px; }
.site-footer__inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; }
.brand--footer { color: #fbf8f0; }
.brand--footer:hover { color: white; }
.site-footer p, .site-footer nav a { color: #e0e8dc; font-size: .8rem; }
.site-footer p { margin-top: 4px; }
.site-footer nav a:hover { color: white; text-decoration: underline; }

@media (max-width: 780px) {
  .frame { width: min(var(--frame), calc(100% - 36px)); }
  .hero { grid-template-columns: 1fr; gap: 24px; padding-block: 34px 35px; }
  .hero__photo img { aspect-ratio: 1.55; }
  .home-section { margin-bottom: 37px; }
  .workspace { grid-template-columns: 1fr; margin-bottom: 32px; }
  .page-intro { padding-block: 21px 19px; }
  .example-panel { grid-template-columns: 1fr; }
  .field-grid--four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
  .site-header__inner { align-items: flex-start; flex-direction: column; gap: 6px; padding-block: 9px; }
  .site-header nav { gap: 5px 13px; }
  .site-header nav a { font-size: .81rem; }
  .hero h1 { font-size: clamp(2.52rem, 10vw, 3.35rem); }
  .intro { font-size: .98rem; }
  .tool-cards { grid-template-columns: 1fr; gap: 11px; }
  th, td { padding: 7px; }
}

@media (max-width: 340px) {
  .field-grid { grid-template-columns: 1fr; }
  .measurement-list--panels { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; }
}

@media print {
  body[data-page="cost"] { background: white; color: #1a1a1a; font-size: 10pt; }
  body[data-page="cost"] .site-header, body[data-page="cost"] .site-footer,
  body[data-page="cost"] .breadcrumbs, body[data-page="cost"] .form-card,
  body[data-page="cost"] .panels-section, body[data-page="cost"] .cost-article,
  body[data-page="cost"] .button, body[data-page="cost"] .quote-result:not(.has-quote) { display: none; }
  body[data-page="cost"] .frame { width: 100%; }
  body[data-page="cost"] .page-intro { padding-block: 0 8pt; }
  body[data-page="cost"] h1 { font-size: 24pt; }
  body[data-page="cost"] .workspace { display: block; margin: 0; }
  body[data-page="cost"] .result-card { padding: 0; border: 0; box-shadow: none; }
  body[data-page="cost"] .quote-results-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
