
:root{
  --paper:#FFFBF5;
  --ink:#1A1A1A;
  --muted:#6B6B6B;
  --line:#E8E0D6;
  --terracotta:#C45A2A;
  --terracotta-dark:#9C4120;
  --sage:#2E6B4A;
  --sand:#D9D0C7;
  --sand-dark:#B8AFA3;
  --navy:#1B3A5D;
  --radius:14px;
  --max:1120px;
}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{
  margin:0; background:var(--paper); color:var(--ink);
  font-family:"Instrument Sans", system-ui,-apple-system,Segoe UI,Roboto,sans-serif;
  line-height:1.5; -webkit-font-smoothing:antialiased;
}
a{color:var(--navy); text-underline-offset:3px}
a:hover{color:var(--terracotta)}
.topbar{
  max-width:var(--max); margin:0 auto; padding:14px 20px 0;
  display:flex; justify-content:space-between; align-items:center; gap:12px;
  font-size:13px; color:var(--muted); font-family:"IBM Plex Mono",monospace;
}
.topbar a{color:var(--muted); text-decoration:none; border-bottom:1px solid transparent}
.topbar a:hover{color:var(--ink); border-color:var(--line)}
.lang-switch{display:flex; gap:8px; align-items:center}
.lang-switch a[aria-current="page"]{color:var(--ink); font-weight:600; border-bottom-color:var(--ink)}
.eyebrow{
  font-family:"IBM Plex Mono",monospace; font-size:12px; letter-spacing:.14em; text-transform:uppercase;
  color:var(--terracotta); margin:0 0 10px; font-weight:600;
}
h1{
  font-family:"Fraunces", Georgia, serif;
  font-weight:900; line-height:.92; letter-spacing:-.03em;
  font-size:clamp(36px, 7vw, 64px); margin:0;
  font-variation-settings:"SOFT" 30, "WONK" 1;
}
h1 .accent{color:var(--terracotta)}
h2{
  font-family:"Fraunces", Georgia, serif; font-weight:700; letter-spacing:-.02em;
  font-size:clamp(26px, 4vw, 38px); line-height:1; margin:0;
}
h3{font-family:"Fraunces", Georgia, serif; font-size:20px; margin:0 0 8px; letter-spacing:-.01em}
.hero{
  max-width:var(--max); margin:0 auto; padding:18px 20px 8px;
  display:grid; grid-template-columns:1.15fr .85fr; gap:32px; align-items:start;
}
@media(max-width:900px){ .hero{grid-template-columns:1fr; gap:20px} }
.standfirst{
  margin:14px 0 0; font-size:18px; line-height:1.45; color:#2B2B2B; max-width:62ch;
}
.standfirst strong{font-weight:600; color:var(--ink)}
.meta{
  margin-top:16px; display:flex; flex-wrap:wrap; gap:10px; align-items:center;
  font-family:"IBM Plex Mono",monospace; font-size:12px; color:var(--muted);
}
.meta .dot{width:4px; height:4px; background:var(--sand-dark); border-radius:50%}
.meta a{color:var(--muted)}
.kpi-card{
  background:white; border:1px solid var(--line); border-radius:18px; padding:18px 18px 14px;
  box-shadow:0 6px 24px rgba(26,26,26,.06);
}
.kpi-top{display:flex; justify-content:space-between; align-items:start; gap:12px}
.kpi-big{
  font-family:"Fraunces", Georgia, serif; font-weight:900; font-size:54px; line-height:.9; letter-spacing:-.03em; color:var(--ink);
}
.kpi-big span{color:var(--terracotta)}
.kpi-label{font-family:"IBM Plex Mono",monospace; font-size:11px; letter-spacing:.1em; text-transform:uppercase; color:var(--muted)}
.house-street{
  margin-top:14px; padding:14px 12px 10px; background:var(--paper); border:1px solid var(--line); border-radius:14px;
}
.street-label{
  display:flex; justify-content:space-between; align-items:center; font-family:"IBM Plex Mono",monospace; font-size:11px; color:var(--muted); margin-bottom:10px
}
.houses{
  display:grid; grid-template-columns:repeat(10, 1fr); gap:8px;
}
@media(max-width:520px){ .houses{grid-template-columns:repeat(5, 1fr)} }
.house{
  aspect-ratio:1.05; border-radius:10px; border:1px solid var(--line); display:grid; place-items:center;
  background:white; position:relative; overflow:hidden;
}
.house.occupied{background:#FFF1E8; border-color:#E8C9B5}
.house.empty{background:#F3EDE6; border-color:#E0D6CC}
.house svg{width:64%; height:64%}
.house .tag{
  position:absolute; bottom:4px; left:50%; transform:translateX(-50%);
  font-family:"IBM Plex Mono",monospace; font-size:9px; letter-spacing:.08em; text-transform:uppercase;
  padding:2px 6px; border-radius:999px; background:white; border:1px solid var(--line); color:var(--muted); white-space:nowrap;
}
.legend-mini{display:flex; gap:14px; margin-top:10px; font-size:13px; color:var(--muted); flex-wrap:wrap}
.legend-mini i{width:14px; height:14px; border-radius:4px; display:inline-block; border:1px solid var(--line); vertical-align:-2px; margin-right:6px}
.shell{max-width:var(--max); margin:0 auto; padding:0 20px}
.section{padding:28px 0; border-top:1px solid var(--line)}
.section:first-of-type{border-top:none}
.section-head{display:flex; justify-content:space-between; gap:20px; align-items:end; flex-wrap:wrap; margin-bottom:18px}
.section-head p{max-width:58ch; margin:8px 0 0; color:var(--muted); font-size:15px}
.controls{
  display:flex; gap:10px; flex-wrap:wrap; align-items:center;
}
.select, .search{
  font:500 14px "Instrument Sans", sans-serif;
  padding:10px 12px; border:1px solid var(--line); border-radius:10px; background:white; color:var(--ink);
}
.select:focus, .search:focus{outline:2px solid var(--terracotta); outline-offset:2px}
.button{
  appearance:none; border:1px solid var(--ink); background:var(--ink); color:white;
  padding:10px 14px; border-radius:999px; font:600 13px "Instrument Sans",sans-serif; cursor:pointer;
}
.button.ghost{background:white; color:var(--ink)}
.button:active{transform:translateY(1px)}
.tile-grid{
  display:grid; grid-template-columns:repeat(7, 1fr); gap:8px;
}
@media(max-width:900px){ .tile-grid{grid-template-columns:repeat(4, 1fr)} }
@media(max-width:520px){ .tile-grid{grid-template-columns:repeat(3, 1fr)} }
.tile{
  border:1px solid var(--line); border-radius:12px; padding:10px 10px 9px; background:white;
  cursor:pointer; transition:transform .12s ease, box-shadow .12s ease, border-color .12s ease;
  text-align:left;
}
.tile:hover{transform:translateY(-2px); box-shadow:0 8px 20px rgba(26,26,26,.08); border-color:var(--sand-dark)}
.tile.is-active{outline:2px solid var(--terracotta); outline-offset:1px; border-color:var(--terracotta)}
.tile-county{font:600 12px "Instrument Sans", sans-serif; letter-spacing:.02em; text-transform:uppercase; color:var(--ink); line-height:1.1}
.tile-rate{font-family:"Fraunces", Georgia, serif; font-weight:800; font-size:20px; line-height:1; margin:6px 0 4px}
.tile-meta{font-family:"IBM Plex Mono",monospace; font-size:10px; color:var(--muted)}
.bar-list{display:grid; gap:8px; margin-top:16px}
.bar-row{
  display:grid; grid-template-columns:140px 1fr 70px; gap:12px; align-items:center;
  background:white; border:1px solid var(--line); border-radius:12px; padding:10px 12px;
  cursor:pointer;
}
@media(max-width:640px){ .bar-row{grid-template-columns:110px 1fr 66px} }
.bar-row.is-active{border-color:var(--terracotta); box-shadow:0 4px 16px rgba(196,90,42,.12)}
.bar-label{font:600 13px "Instrument Sans", sans-serif; text-transform:uppercase; letter-spacing:.02em; white-space:nowrap; overflow:hidden; text-overflow:ellipsis}
.bar-track{height:14px; background:var(--paper); border:1px solid var(--line); border-radius:999px; overflow:hidden; position:relative}
.bar-fill{height:100%; border-radius:999px; background:linear-gradient(90deg, var(--sand-dark), var(--terracotta)); transition:width .4s ease}
.bar-value{font-family:"IBM Plex Mono",monospace; font-weight:600; font-size:13px; text-align:right}
.detail{
  background:white; border:1px solid var(--line); border-radius:18px; padding:18px; position:sticky; top:16px;
}
@media(max-width:900px){ .detail{position:static} }
.detail h3{font-size:22px}
.kv{display:grid; grid-template-columns:1fr 1fr; gap:10px; margin-top:12px}
.kv div{background:var(--paper); border:1px solid var(--line); border-radius:12px; padding:10px 12px}
.kv dt{font-family:"IBM Plex Mono",monospace; font-size:10px; letter-spacing:.08em; text-transform:uppercase; color:var(--muted); margin:0}
.kv dd{margin:4px 0 0; font-weight:700; font-size:18px; line-height:1}
.kv dd small{font-weight:400; color:var(--muted); font-size:12px}
.stacked{margin-top:14px}
.stacked-bar{height:22px; display:flex; border-radius:999px; overflow:hidden; border:1px solid var(--line)}
.stacked-bar span{height:100%}
.stacked-legend{display:flex; gap:14px; flex-wrap:wrap; margin-top:10px; font-size:13px}
.stacked-legend i{width:12px; height:12px; border-radius:3px; display:inline-block; vertical-align:-1px; margin-right:6px}
.split{
  display:grid; grid-template-columns:1.35fr .85fr; gap:22px; align-items:start;
}
@media(max-width:900px){ .split{grid-template-columns:1fr} }
.figure{
  background:white; border:1px solid var(--line); border-radius:18px; padding:18px;
}
.figure figcaption{margin-top:12px; font-size:13px; color:var(--muted); line-height:1.45}
.figure figcaption strong{color:var(--ink)}
.table-wrap{
  overflow:auto; border:1px solid var(--line); border-radius:14px; background:white;
}
table{width:100%; border-collapse:collapse; font-size:14px}
th{
  text-align:left; font-family:"IBM Plex Mono",monospace; font-size:11px; letter-spacing:.08em; text-transform:uppercase;
  color:var(--muted); background:var(--paper); padding:10px 12px; border-bottom:1px solid var(--line); white-space:nowrap; cursor:pointer; user-select:none;
}
th:hover{color:var(--ink)}
td{padding:9px 12px; border-bottom:1px solid var(--line); white-space:nowrap}
tr:last-child td{border-bottom:none}
tr:hover td{background:#FFFBF5}
.num{font-family:"IBM Plex Mono",monospace; font-variant-numeric:tabular-nums; text-align:right}
.badge{
  display:inline-block; font:600 11px "IBM Plex Mono",monospace; letter-spacing:.06em; text-transform:uppercase;
  padding:3px 8px; border-radius:999px; border:1px solid var(--line); background:var(--paper); color:var(--muted)
}
.callout{
  background:#FFF1E8; border:1px solid #E8C9B5; border-radius:14px; padding:14px 16px; font-size:14px; line-height:1.5;
}
.callout strong{color:var(--terracotta-dark)}
.note{font-size:13px; color:var(--muted); line-height:1.5}
.footer{
  max-width:var(--max); margin:0 auto; padding:28px 20px 40px; border-top:1px solid var(--line); margin-top:8px;
  display:grid; gap:14px; font-size:13px; color:var(--muted)
}
.footer a{color:var(--muted)}
.sr-only{position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0}
:focus-visible{outline:2px solid var(--terracotta); outline-offset:2px}
@media(prefers-reduced-motion:reduce){ *{scroll-behavior:auto !important; transition:none !important} }

/* CSP extraction helpers (follow-up 2026-10-19): former inline style attributes and JS template styles. Dynamic widths/backgrounds are applied via CSSOM in app-*.js. */
.rate-high{color:var(--terracotta)}
.rate-mid{color:var(--ink)}
.rate-low{color:var(--muted)}
.tile-track{margin-top:8px;height:6px;border-radius:999px;border:1px solid var(--line)}
.row-click{cursor:pointer}
.cell-rate{font-weight:700}
.cell-rate--high{color:var(--terracotta)}
.detail-rate-note{font-size:14px;font-weight:500;color:var(--muted)}
.stack-seg--perm{background:var(--terracotta)}
.stack-seg--sec{background:var(--sage)}
.stack-seg--vac{background:var(--sand-dark)}
.street-empty{color:var(--terracotta);font-weight:600}
.inl-1 {color:var(--ink); font-weight:600;}
.inl-2 {opacity:.4;}
.inl-3 {margin-top:16px;}
.inl-4 {font-size:13px; color:var(--muted); margin-top:4px;}
.inl-5 {font-family:'IBM Plex Mono',monospace; font-weight:600; color:var(--ink);}
.inl-6 {font-family:'IBM Plex Mono',monospace;}
.inl-7 {text-align:right;}
.inl-8 {text-transform:none; letter-spacing:0; color:var(--sage); font-weight:600;}
.inl-9 {font-family:'IBM Plex Mono', monospace; font-size:12px; color:var(--muted);}
.inl-10 {margin-top:8px;}
.inl-11 {color:var(--terracotta); font-weight:600;}
.inl-12 {background:#FFF1E8;}
.inl-13 {background:#F3EDE6;}
.inl-14 {font-family:'IBM Plex Mono',monospace; font-size:11px;}
.inl-15 {margin-top:12px; font-size:12px;}
.inl-16 {background:var(--terracotta);}
.inl-17 {background:var(--sage);}
.inl-18 {background:var(--sand-dark);}
.inl-19 {display:flex; justify-content:space-between; gap:12px; align-items:start;}
.inl-20 {font-family:'Fraunces', Georgia, serif; font-weight:800; font-size:34px; line-height:1;}
.inl-21 {font-size:14px; font-weight:500; color:var(--muted);}
.inl-22 {font-family:'IBM Plex Mono', monospace; font-weight:600;}
.inl-23 {font-size:12px; color:var(--muted);}
.inl-24 {margin-top:14px;}
.inl-25 {margin-bottom:6px;}
.inl-26 {margin-top:12px;}
.inl-27 {display:grid; grid-template-columns:1fr 1fr; gap:16px;}
.inl-28 {background:var(--paper); border:1px solid var(--line); border-radius:12px; padding:14px;}
.inl-29 {font-family:'Fraunces', Georgia, serif; font-weight:800; font-size:32px;}
.inl-30 {margin-top:10px;}
.inl-31 {width:24%;}
.inl-32 {width:27.3%;}
.inl-33 {display:grid; grid-template-columns:1fr 1fr 1fr; gap:12px; font-size:14px;}
.inl-34 {background:white;}
.inl-35 {display:grid; grid-template-columns:1.2fr .8fr; gap:18px;}
.inl-36 {display:grid; gap:12px;}
.inl-37 {margin:8px 0 0; padding-left:18px; font-size:14px; line-height:1.6;}
.inl-38 {margin:8px 0 0; padding-left:18px;}
.inl-39 {margin:0 0 8px;}
.inl-40 {display:flex; gap:8px; flex-wrap:wrap;}
.inl-41 {display:flex; justify-content:space-between; gap:12px; flex-wrap:wrap;}
