:root {
  color-scheme: light;
  --ink: #10231d;
  --muted: #5b6d66;
  --canvas: #f3f5ef;
  --surface: #ffffff;
  --surface-soft: #e7eee8;
  --line: #cfd9d2;
  --brand: #14382d;
  --brand-strong: #0c2a21;
  --signal: #d9ff73;
  --signal-ink: #17351a;
  --focus: #8b4dff;
  --shadow: 0 18px 48px rgb(16 35 29 / 10%);
  --radius-lg: 24px;
  --radius-md: 14px;
  --space-form-section: 22px;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  min-width: 320px;
  margin: 0;
  color: var(--ink);
  background: var(--canvas);
  line-height: 1.5;
}
button, input, select { font: inherit; }
button { color: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.site-header :focus-visible,
.results-panel :focus-visible,
.site-footer :focus-visible { outline-color: var(--signal); }

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 20;
  padding: 10px 14px;
  color: #fff;
  background: var(--brand-strong);
  border-radius: 8px;
  transform: translateY(-150%);
}
.skip-link:focus { transform: translateY(0); }
.skip-link:focus-visible { outline-color: var(--signal); }

.site-header {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 72px;
  padding: 14px clamp(20px, 4vw, 64px);
  color: #fff;
  background: var(--brand);
  border-bottom: 1px solid rgb(255 255 255 / 14%);
}
.brand {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 10px;
  color: inherit;
  font-size: 1.1rem;
  font-weight: 760;
  letter-spacing: -0.02em;
  text-decoration: none;
}
.brand-mark {
  display: block;
  flex: none;
  width: 32px;
  height: 32px;
}
.product-name {
  padding-left: 16px;
  color: #d9e6df;
  border-left: 1px solid rgb(255 255 255 / 24%);
  font-size: 0.9rem;
}
.privacy-note { margin-left: auto; color: #d9e6df; font-size: 0.78rem; }

.page-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: clamp(36px, 6vw, 76px) 0 72px;
}
.intro { max-width: 760px; margin-bottom: clamp(28px, 4vw, 44px); }
.eyebrow, .step-label {
  margin: 0 0 8px;
  color: #36705c;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
h1, h2, p { margin-top: 0; }
h1 {
  max-width: 680px;
  margin-bottom: 16px;
  font-size: clamp(2.25rem, 6vw, 4.65rem);
  line-height: 0.98;
  letter-spacing: -0.055em;
}
.lede {
  max-width: 680px;
  margin-bottom: 10px;
  color: #334a42;
  font-size: clamp(1rem, 1.8vw, 1.25rem);
}
.platform-note { margin-bottom: 0; color: var(--muted); font-size: 0.9rem; }

.calculator-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(310px, 0.75fr);
  gap: 24px;
  align-items: start;
}
.input-panel, .results-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}
.input-panel { overflow: hidden; }
.mode-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 8px;
  background: var(--surface-soft);
  border-bottom: 1px solid var(--line);
}
.mode-button {
  min-height: 46px;
  padding: 10px 16px;
  background: transparent;
  border: 0;
  border-radius: 10px;
  font-weight: 730;
  cursor: pointer;
}
.mode-button.is-active { background: var(--surface); box-shadow: 0 2px 8px rgb(16 35 29 / 10%); }
.calculator-form { padding: clamp(20px, 4vw, 36px); }
.section-heading {
  display: flex;
  gap: 16px;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 24px;
}
.section-heading h2, .results-panel h2 {
  margin-bottom: 0;
  font-size: clamp(1.25rem, 2vw, 1.55rem);
  line-height: 1.2;
  letter-spacing: -0.025em;
}
.estimate-badge {
  flex: none;
  padding: 5px 9px;
  color: #315b4d;
  background: #e7f4ec;
  border: 1px solid #c2decd;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 750;
  text-transform: uppercase;
}
.field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 18px; }
.field { display: grid; gap: 7px; color: #30473f; font-size: 0.84rem; font-weight: 700; }
.input-wrap {
  display: flex;
  min-height: 52px;
  align-items: center;
  overflow: hidden;
  background: #fbfcfa;
  border: 1px solid #b9c8c0;
  border-radius: 11px;
}
.input-wrap:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px rgb(20 56 45 / 12%); }
.input-wrap input {
  width: 100%;
  min-width: 0;
  padding: 13px 12px;
  color: var(--ink);
  background: transparent;
  border: 0;
  outline: 0;
  font-size: 1rem;
  font-weight: 680;
}
.input-wrap input::placeholder { color: #62746b; font-weight: 520; opacity: 1; }
.input-wrap select {
  align-self: stretch;
  max-width: 132px;
  padding: 0 10px;
  color: #43564f;
  background: transparent;
  border: 0;
  border-left: 1px solid var(--line);
  font-size: 0.76rem;
  font-weight: 700;
}
.input-prefix, .input-suffix { flex: none; color: #62746b; font-size: 0.86rem; font-weight: 650; }
.input-prefix { padding-left: 14px; }
.input-suffix { padding-right: 14px; }
.assumptions-card { margin: 22px 0; border: 1px solid var(--line); border-radius: var(--radius-md); }
.assumptions-card--shared { margin: 20px clamp(20px, 4vw, 36px) 0; }
.assumptions-card summary {
  display: flex;
  min-height: 68px;
  padding: 13px 16px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  list-style: none;
  cursor: pointer;
}
.assumptions-card summary::-webkit-details-marker { display: none; }
.assumptions-card strong, .assumptions-card small { display: block; }
.assumptions-card strong { font-size: 0.88rem; }
.assumptions-card small { margin-top: 2px; color: var(--muted); }
.edit-label { color: #25664f; font-size: 0.82rem; font-weight: 800; }
.assumptions-card[open] > summary { border-bottom: 1px solid var(--line); }
.assumptions-card[open] .edit-label { color: var(--muted); }
.assumptions-body { padding: 22px 18px 20px; background: #f8faf7; }
.assumptions-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}
.assumptions-title-row h3 { margin: 0 0 4px; font-size: 1rem; }
.assumptions-title-row p, .assumption-footnote {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
}
.text-button {
  min-width: 44px;
  min-height: 44px;
  padding: 8px 0;
  color: #25664f;
  background: transparent;
  border: 0;
  font-size: 0.8rem;
  font-weight: 800;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.vehicle-type-fieldset, .cost-fieldset { padding: 0; margin: 0; border: 0; }
.vehicle-type-fieldset legend, .cost-fieldset legend {
  margin-bottom: 8px;
  color: #30473f;
  font-size: 0.76rem;
  font-weight: 800;
}
.segmented-control {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 11px;
}
.segmented-control label { position: relative; cursor: pointer; }
.segmented-control input { position: absolute; opacity: 0; pointer-events: none; }
.segmented-control span {
  display: grid;
  min-height: 44px;
  place-items: center;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 750;
}
.segmented-control input:checked + span { background: var(--surface); box-shadow: 0 2px 7px rgb(16 35 29 / 10%); }
.segmented-control input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }
.assumption-grid { margin: 18px 0; }
.cost-fieldset { padding-top: 18px; border-top: 1px solid var(--line); }
.cost-grid { gap: 12px; }
.assumptions-body .input-wrap { min-height: 46px; background: var(--surface); }
.assumptions-body .input-wrap input { min-height: 44px; padding-block: 10px; font-size: 0.9rem; }
.assumption-footnote { margin-top: 16px; }

.form-intro { margin: -10px 0 var(--space-form-section); color: var(--muted); font-size: 0.84rem; }
.field small { color: var(--muted); font-size: 0.72rem; font-weight: 500; }
.field--wide { grid-column: 1 / -1; }
.form-error {
  margin: 18px 0 0;
  padding: 11px 13px;
  color: #7b261b;
  background: #fff1ee;
  border: 1px solid #efb9ae;
  border-radius: 10px;
  font-size: 0.82rem;
  font-weight: 650;
}
.calculate-button {
  width: 100%;
  min-height: 54px;
  margin-top: var(--space-form-section);
  padding: 14px 20px;
  color: var(--signal-ink);
  background: var(--signal);
  border: 1px solid #bce34f;
  border-radius: 12px;
  font-weight: 820;
  cursor: pointer;
}
.form-error:not([hidden]) + .calculate-button { margin-top: 12px; }
.calculate-button:hover { background: #cefa59; }

.results-panel {
  position: sticky;
  top: 24px;
  padding: clamp(24px, 4vw, 36px);
  color: #fff;
  background: var(--brand);
  border-color: var(--brand);
}
.results-panel .eyebrow { color: #a6d5c2; }
.primary-result {
  margin: 24px 0 4px;
  font-variant-numeric: tabular-nums;
  font-size: clamp(3rem, 7vw, 5.5rem);
  font-weight: 830;
  line-height: 1;
  letter-spacing: -0.06em;
}
.result-support { color: #d2e3dc; font-size: 0.9rem; }
.result-list { margin: 26px 0; }
.result-list div {
  display: flex;
  min-height: 44px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-top: 1px solid rgb(255 255 255 / 16%);
}
.result-list dt { color: #c2d6ce; font-size: 0.8rem; }
.result-list dd { margin: 0; font-weight: 760; font-variant-numeric: tabular-nums; }
.results-panel.is-negative { background: #4a2923; border-color: #4a2923; }
.results-panel.is-stale .primary-result, .results-panel.is-stale .result-list, .results-panel.is-stale .breakdown-card { opacity: 0.45; }
.breakdown-card {
  margin: 22px 0;
  border-top: 1px solid rgb(255 255 255 / 16%);
  border-bottom: 1px solid rgb(255 255 255 / 16%);
}
.breakdown-card summary {
  padding: 13px 0;
  color: #d8e7e1;
  font-size: 0.8rem;
  font-weight: 740;
  cursor: pointer;
}
.breakdown-card dl { margin: 0 0 12px; }
.breakdown-card dl div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 5px 0;
}
.breakdown-card dt { max-width: 70%; color: #bcd0c8; font-size: 0.72rem; }
.breakdown-card dd { margin: 0; font-size: 0.76rem; font-weight: 740; font-variant-numeric: tabular-nums; }
.local-note { margin-bottom: 0; color: #a9cabd; font-size: 0.76rem; }
.local-note span { margin-right: 6px; color: var(--signal); }
.result-disclaimer { margin: 8px 0 0; color: #94b1a6; font-size: 0.68rem; }

.explanation-section {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(32px, 6vw, 80px);
  padding: clamp(72px, 10vw, 120px) 0;
  border-bottom: 1px solid var(--line);
}
.section-copy h2, .faq-section h2 {
  margin: 0 0 16px;
  font-size: clamp(1.8rem, 4vw, 3.1rem);
  line-height: 1.05;
  letter-spacing: -0.045em;
}
.section-copy > p:last-child { margin: 0; color: var(--muted); }
.method-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  padding: 0;
  margin: 0;
  overflow: hidden;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  list-style: none;
}
.method-list li { min-height: 220px; padding: 24px; background: var(--surface); }
.method-list span { display: block; margin-bottom: 48px; color: #4c7667; font-size: 0.72rem; font-weight: 800; letter-spacing: 0.08em; }
.method-list strong { display: block; margin-bottom: 8px; font-size: 1rem; }
.method-list p { margin: 0; color: var(--muted); font-size: 0.82rem; }

.faq-section { max-width: 880px; padding: clamp(72px, 10vw, 120px) 0 40px; }
.faq-list { margin-top: 32px; border-top: 1px solid var(--line); }
.faq-list details { border-bottom: 1px solid var(--line); }
.faq-list summary {
  padding: 20px 36px 20px 0;
  font-weight: 750;
  cursor: pointer;
}
.faq-list p { max-width: 720px; margin: -6px 0 20px; color: var(--muted); font-size: 0.9rem; }

.site-footer {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 32px;
  padding: 30px max(20px, calc((100vw - 1180px) / 2));
  color: #d9e6df;
  background: var(--brand-strong);
}
.site-footer div { display: grid; gap: 4px; }
.site-footer strong { color: #fff; font-size: 1rem; }
.site-footer span, .site-footer p { font-size: 0.75rem; }
.site-footer p { max-width: 420px; margin: 0; text-align: right; }
.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;
}

@media (max-width: 800px) {
  .privacy-note { display: none; }
  .calculator-layout { grid-template-columns: 1fr; }
  .results-panel { position: static; }
  .explanation-section { grid-template-columns: 1fr; }
  .method-list { grid-template-columns: 1fr; }
  .method-list li { min-height: 0; }
  .method-list span { margin-bottom: 28px; }
}
@media (max-width: 520px) {
  .site-header { min-height: 64px; padding-inline: 18px; }
  .page-shell { width: min(100% - 24px, 1180px); padding-top: 30px; }
  h1 { font-size: clamp(2.3rem, 13vw, 3.5rem); }
  .field-grid { grid-template-columns: 1fr; gap: 14px; }
  .field--wide { grid-column: auto; }
  .calculator-form { padding: 20px 16px; }
  .assumptions-card--shared { margin: 14px 12px 0; }
  .assumptions-body { padding-inline: 14px; }
  .cost-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cost-grid .input-prefix { padding-left: 9px; }
  .cost-grid .input-suffix { padding-right: 8px; }
  .results-panel { padding: 26px 22px; }
  .calculate-button { position: sticky; bottom: 10px; z-index: 4; box-shadow: 0 8px 24px rgb(16 35 29 / 22%); }
  .site-footer { flex-direction: column; }
  .site-footer p { text-align: left; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
