:root{--bg:#FCFAF6}
body{background:var(--bg)}
.app{max-width:1140px;margin:0 auto}
.brand{font-weight:800;letter-spacing:.2px}
.chip{background:#fff;border:1px solid #eaeaea;border-radius:999px;padding:.35rem .7rem;font-size:.85rem}
.chip.active{border-color:#111}
.section{background:#fff;border:1px solid #eee;border-radius:12px}
.ad-slot{border:1px dashed #dcdcdc;border-radius:.75rem;padding:12px;font-size:.875rem;color:#666;text-align:center;background:#fff}

/* Dynamic donut ring (JS sets background via conic-gradient) */
.chart-ring{width:140px;height:140px;border-radius:50%;position:relative;background:conic-gradient(#e9ecef 0 100%)}
.chart-ring::after{content:"";position:absolute;inset:14px;background:#fff;border-radius:50%}

.range-val{min-width:72px;text-align:right}
.sticky-cta{position:sticky;bottom:0;z-index:1030;background:linear-gradient(0deg,var(--bg) 75%,rgba(252,250,246,0));padding:.5rem .75rem;border-top:1px solid #eee}
.numbox{max-width:120px;text-align:right}

/* Stacked comparison bars (3 rows per metric) */
.stack-bars{position:relative;background:#f7f7f7;border-radius:6px;padding:6px 6px}
.stack-bars .bar{height:10px;border-radius:4px;margin:2px 0}
.stack-bars .bar.you{background:#0d6efd}
.stack-bars .bar.local{background:#20c997}
.stack-bars .bar.uk{background:#adb5bd}

/* --- Polish pass --- */
:root{
  --bg:#FCFAF6;
  --card-radius:14px;
  --card-pad:16px;
  --muted:#6c757d;
}

.section{
  border-radius:var(--card-radius);
  padding:var(--card-pad) !important;
  box-shadow: 0 1px 0 rgba(16,24,40,.02);
}

h6{ letter-spacing:.2px; }

.brand{ font-weight:800; letter-spacing:.2px; }

/* Chips: clearer active state + hover */
.chip{ transition:.15s border-color ease, .15s background-color ease; }
.chip:hover{ border-color:#bbb }
.chip.active{ border-color:#111; background:#fafafa; }

/* Donut: center label + better sizing */
.chart-ring{ width:168px; height:168px; }
.chart-ring::after{ inset:18px; }
.ring-label{
  position:absolute; inset:0;
  display:grid; place-items:center;
  text-align:center; line-height:1.1;
}
.ring-label .big{ font-weight:800; font-size:1.1rem; }
.ring-label .small{ font-size:.75rem; color:var(--muted); }

/* Progress bars: smoother, rounder, readable */
.progress{
  height:12px; background:#f1f3f5;
  border-radius:999px; overflow:hidden;
}
.progress-bar{
  transition: width .28s ease-in-out;
}

/* Two-column form spacing */
#income, #accType, .numbox, .form-select-sm, .form-control-sm{
  border-radius:10px;
}

/* Comparison bars: add subtle dividers and spacing */
.stack-bars{ padding:10px }
.stack-bars .bar{ height:12px; }

/* Mobile sticky bar: elevate a bit */
.sticky-cta{
  border-top:1px solid #eee;
  box-shadow: 0 -6px 20px rgba(0,0,0,.04);
}

/* Helper labels next to numbers */
.value-row{ display:flex; justify-content:space-between; align-items:center; gap:12px; }
.value-row .label{ color:#222; }
.value-row .val{ color:#111; font-feature-settings: "tnum" 1; }

/* Postcode input states */
#postcode.is-valid{ border-color:#198754; }
#postcode.is-invalid{ border-color:#dc3545; }
