/* UK Housing & State-Finance Model – stylesheet */
:root {
  --ink: #1a2233;
  --muted: #5a6b85;
  --line: #e2e8f0;
  --bg: #f6f8fb;
  --card: #ffffff;
  --brand: #0b3d5c;
  --brand2: #e11d48;
  --accent: #0e7c5a;
  --warn: #b45309;
  --shadow: 0 1px 3px rgba(16, 30, 54, 0.08), 0 1px 2px rgba(16, 30, 54, 0.06);
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
  font-size: 16px;
}
header.site {
  background: linear-gradient(135deg, var(--brand) 0%, #14506e 60%, #0b3d5c 100%);
  color: #fff;
  padding: 26px 30px;
}
header.site .brand { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
header.site h1 { margin: 0; font-size: 22px; font-weight: 700; letter-spacing: 0.2px; }
header.site .tag { font-size: 13px; opacity: 0.85; }
nav { background: var(--brand); border-top: 1px solid rgba(255,255,255,0.14); padding: 0 30px; }
nav a {
  display: inline-block; color: rgba(255,255,255,0.85); text-decoration: none;
  padding: 12px 18px; font-weight: 600; font-size: 14px; border-bottom: 3px solid transparent;
  margin-right: 4px;
}
nav a:hover { color: #fff; }
nav a.active { color: #fff; border-bottom-color: var(--brand2); }
nav a.home { background: var(--brand2); border-bottom-color: transparent; }
main { max-width: 1100px; margin: 0 auto; padding: 30px 20px 60px; }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: 10px;
  box-shadow: var(--shadow); padding: 22px 24px; margin-bottom: 22px;
}
h2 { margin-top: 0; font-size: 20px; color: var(--brand); }
h3 { font-size: 16px; margin: 0 0 8px; color: var(--ink); }
.muted { color: var(--muted); font-size: 13.5px; }
.hero {
  text-align: center; padding: 44px 24px 36px;
}
.hero h1 { font-size: 32px; margin: 0 0 12px; color: var(--brand); }
.hero p.lead { font-size: 18px; color: var(--muted); max-width: 760px; margin: 0 auto; }
.hero .cta { margin-top: 26px; }
.btn {
  display: inline-block; background: var(--brand); color: #fff; text-decoration: none;
  padding: 13px 24px; border-radius: 8px; font-weight: 700; border: none; cursor: pointer;
  font-size: 15px; margin: 4px;
}
.btn:hover { background: #14506e; }
.btn.ghost { background: transparent; color: var(--brand); border: 1.5px solid var(--brand); }
.btn.accent { background: var(--accent); }
.btn.small { padding: 8px 14px; font-size: 13px; }

.grid { display: grid; gap: 18px; }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid.controls { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }

label.ctl { display: block; margin-bottom: 14px; font-size: 13.5px; color: var(--ink); font-weight: 600; }
.ctl .val { float: right; color: var(--brand); font-variant-numeric: tabular-nums; }
input[type=range] { width: 100%; margin-top: 6px; accent-color: var(--brand); }
.ctl input[type=number] { width: 100%; margin-top: 6px; padding: 8px; border: 1px solid var(--line); border-radius: 6px; font-size: 14px; }
.ctl .hint { font-weight: 400; color: var(--muted); font-size: 11.5px; }

.stat { text-align: center; padding: 16px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); }
.stat .label { font-size: 12.5px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.4px; }
.stat .big { font-size: 26px; font-weight: 800; color: var(--brand); margin-top: 4px; font-variant-numeric: tabular-nums; }
.stat .big.pos { color: var(--accent); }
.stat .sub { font-size: 12px; color: var(--muted); margin-top: 2px; }

table.sheet { width: 100%; border-collapse: collapse; font-size: 14px; }
table.sheet th, table.sheet td { text-align: right; padding: 9px 10px; border-bottom: 1px solid var(--line); }
table.sheet th:first-child, table.sheet td:first-child { text-align: left; }
table.sheet thead th { background: var(--bg); color: var(--brand); font-weight: 700; }
table.sheet tbody tr:nth-child(even) { background: #fafcff; }
table.sheet .total td { font-weight: 800; border-top: 2px solid var(--brand); }

.notice { display: block; background: #fffbeb; border: 1px solid #fcd34d; color: #92400e; padding: 12px 16px; border-radius: 8px; font-size: 13.5px; margin: 12px 0; }
.notice.blue { background: #eff6ff; border-color: #bfdbfe; color: #1e3a8a; }
.notice.green { background: #ecfdf5; border-color: #a7f3d0; color: #065f46; }
.disclaimer { font-size: 12.5px; color: var(--muted); margin-top: 8px; line-height: 1.5; }

.toolbar { display: flex; gap: 10px; flex-wrap: wrap; margin: 14px 0; }
.pill { display: inline-block; background: var(--bg); color: var(--brand); border: 1px solid var(--line); padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; }

footer.site { max-width: 1100px; margin: 0 auto; padding: 20px; color: var(--muted); font-size: 13px; border-top: 1px solid var(--line); }
textarea.inline { width: 100%; min-height: 60px; font-size: 13px; border: 1px solid var(--line); border-radius: 6px; padding: 8px; font-family: ui-monospace, monospace; }
input[type=file] { font-size: 13px; }
.copy { cursor: pointer; color: var(--brand); font-size: 13px; }
#toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); background: var(--brand); color: #fff; padding: 12px 20px; border-radius: 8px; box-shadow: var(--shadow); opacity: 0; transition: opacity 0.25s; pointer-events: none; font-size: 14px; z-index: 50; }
#toast.show { opacity: 1; }