:root {
  color-scheme: light;
  --bg: #f4f7f8;
  --ink: #142b35;
  --muted: #6b7d84;
  --line: #dce6e8;
  --panel: #ffffff;
  --teal: #087f7a;
  --teal-dark: #075e60;
  --soft-teal: #e8f5f3;
  --coral: #ed866e;
}

* { box-sizing: border-box; }
html { touch-action: manipulation; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.45;
}
button, input { font: inherit; }
button { touch-action: manipulation; }
.app-shell { width: min(620px, calc(100% - 32px)); margin: 0 auto; padding: 34px 0 58px; }
.app-header { margin-bottom: 25px; }
.eyebrow { color: var(--teal); font-size: 11px; font-weight: 800; letter-spacing: .14em; }
h1, h2, p { margin: 0; }
h1 { margin-top: 5px; font-size: clamp(27px, 7vw, 36px); letter-spacing: -.04em; line-height: 1.1; }
h2 { margin-top: 3px; font-size: 19px; letter-spacing: -.02em; }
.app-header p { margin-top: 9px; color: var(--muted); font-size: 14px; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 19px; box-shadow: 0 8px 30px rgba(20, 54, 63, .06); }
.inputs-panel { padding: 20px; }
.section-heading, .comparison-heading, .range-label { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.live-pill { padding: 5px 9px; border-radius: 30px; color: var(--teal); background: var(--soft-teal); font-size: 11px; font-weight: 750; white-space: nowrap; }
.field-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 15px 12px; margin-top: 24px; }
.field { display: block; color: var(--muted); font-size: 12px; font-weight: 700; }
.field-wide { grid-column: span 2; }
.input-wrap { display: flex; align-items: center; gap: 5px; height: 46px; margin-top: 7px; padding: 0 13px; border: 1px solid var(--line); border-radius: 11px; color: #82949a; background: #fbfcfc; font-size: 15px; }
.input-wrap:focus-within { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(8, 127, 122, .1); }
input[type=number] { width: 100%; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 16px; font-weight: 700; min-width: 0; }
.rate-field { margin-top: 22px; }
.range-label { align-items: center; }
.range-label strong { color: var(--teal); font-size: 17px; }
input[type=range] { width: 100%; height: 25px; margin: 8px 0 0; accent-color: var(--teal); cursor: pointer; }
.range-scale { display: flex; justify-content: space-between; color: #93a2a7; font-size: 11px; font-weight: 600; margin-top: -4px; }
.estimate { display: flex; justify-content: space-between; align-items: end; gap: 15px; margin-top: 23px; padding: 15px; border-radius: 13px; background: var(--soft-teal); }
.estimate-label, .estimate-note { display: block; color: var(--teal-dark); font-size: 11px; font-weight: 700; }
.estimate strong { display: block; margin-top: 2px; color: var(--teal-dark); font-size: 28px; letter-spacing: -.04em; line-height: 1.15; }
.estimate-note { color: #57918f; text-align: right; font-weight: 600; }
.primary-button { width: 100%; min-height: 48px; margin-top: 14px; border: 0; border-radius: 11px; background: var(--teal); color: white; font-weight: 800; cursor: pointer; transition: background .15s, transform .15s; }
.primary-button:hover { background: var(--teal-dark); }
.primary-button:active { transform: scale(.99); }
.comparison { margin-top: 31px; }
.count { color: var(--muted); font-size: 12px; font-weight: 700; padding-top: 7px; }
.scenario-list { display: grid; gap: 11px; margin-top: 14px; }
.empty-state { padding: 23px 16px; border: 1px dashed #b9cccf; border-radius: 14px; color: var(--muted); text-align: center; font-size: 13px; }
.scenario-card { position: relative; padding: 16px; border: 1px solid var(--line); border-radius: 15px; background: var(--panel); box-shadow: 0 4px 16px rgba(20, 54, 63, .035); }
.card-top { display: flex; justify-content: space-between; gap: 10px; align-items: start; }
.scenario-name { color: var(--teal); font-size: 11px; font-weight: 800; letter-spacing: .12em; }
.card-payment { text-align: right; }
.card-payment span { display: block; color: var(--muted); font-size: 11px; font-weight: 650; }
.card-payment strong { color: var(--ink); font-size: 22px; letter-spacing: -.03em; }
.details { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 14px; padding-top: 12px; border-top: 1px solid #edf1f1; }
.detail span { display: block; color: var(--muted); font-size: 10px; font-weight: 700; }
.detail strong { font-size: 13px; }
.remove { position: absolute; right: 14px; bottom: 13px; border: 0; padding: 3px; background: transparent; color: #a1afb2; font-size: 12px; cursor: pointer; }
.remove:hover { color: var(--coral); }
@media (max-width: 400px) { .app-shell { width: min(100% - 24px, 620px); padding-top: 25px; } .inputs-panel { padding: 16px; } .estimate strong { font-size: 24px; } }
