:root {
  color-scheme: light;
  --ink: #202a32;
  --muted: #64727c;
  --line: #dce3e7;
  --surface: #ffffff;
  --soft: #f4f7f8;
  --accent: #176b58;
  --accent-dark: #105342;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; padding: 28px 16px; background: #f2f5f4; color: var(--ink); }
.calculator { max-width: 900px; margin: 0 auto; padding: 30px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 8px 28px rgba(20,40,35,.06); }
.eyebrow { margin: 0 0 8px; color: var(--accent); font-size: .75rem; font-weight: 750; letter-spacing: .09em; }
h1 { margin: 0; font-size: clamp(1.7rem, 4vw, 2.35rem); line-height: 1.15; }
.intro { margin: 10px 0 26px; color: var(--muted); line-height: 1.5; }
.controls { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; padding: 20px; background: var(--soft); border-radius: 12px; }
.field { display: flex; flex-direction: column; gap: 7px; }
label { font-weight: 650; font-size: .92rem; }
select, input { width: 100%; min-height: 44px; padding: 9px 11px; border: 1px solid #bdc9ce; border-radius: 7px; background: white; color: var(--ink); font: inherit; }
small { color: var(--muted); line-height: 1.4; }
button { align-self: end; min-height: 44px; border: 0; border-radius: 7px; padding: 10px 18px; background: var(--accent); color: white; font: inherit; font-weight: 700; cursor: pointer; }
button:hover { background: var(--accent-dark); }
button:focus-visible, select:focus-visible, input:focus-visible { outline: 3px solid #8cc9b8; outline-offset: 2px; }
.error { grid-column: 1 / -1; margin: 0; color: #a32121; font-weight: 600; }
.results { margin-top: 30px; }
.results-heading { display: flex; justify-content: space-between; gap: 16px; align-items: end; margin-bottom: 14px; }
h2 { margin: 0 0 5px; font-size: 1.3rem; }
.results-heading p { margin: 0; color: var(--muted); }
.price-summary { font-weight: 700; white-space: nowrap; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
th, td { padding: 12px 10px; border-bottom: 1px solid var(--line); text-align: left; }
th { background: var(--soft); font-size: .84rem; line-height: 1.35; }
.numeric { text-align: right; }
tbody tr:last-child td { border-bottom: 0; }
.note { margin: 12px 0 0; color: var(--muted); font-size: .88rem; line-height: 1.5; }
footer { margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: .88rem; line-height: 1.55; }
footer p { margin: 0 0 10px; }
.version { font-size: .78rem; }
@media (max-width: 640px) {
  body { padding: 10px; }
  .calculator { padding: 19px 15px; border-radius: 11px; }
  .controls { grid-template-columns: 1fr; padding: 15px; }
  button { width: 100%; }
  .results-heading { align-items: start; flex-direction: column; }
  .price-summary { white-space: normal; }
  th, td { padding: 10px 8px; font-size: .88rem; }
}
