:root {
  --bg: #ffffff;          /* clean white */
  --ink: #1a222c;
  --muted: #5a6472;
  --line: #e6e6ea;
  --card: #ffffff;
  --alt: #f6f7f9;         /* soft grey for alt bands */
  --navy: #12294a;        /* dongker — deep navy */
  --navy-ink: #ffffff;
  --tint: #eef1f6;        /* pale navy tint */
  --red: #c8102e;         /* Union Jack red */
  --red-deep: #a30d24;
  --red-tint: #fbeef0;
  --price: #c8102e;
  --up: #12294a;
  --down: #c8102e;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; color: var(--ink); background: var(--bg); line-height: 1.55; -webkit-font-smoothing: antialiased; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }

/* Identity stripe — red + dongker */
.flagline { height: 4px; background: linear-gradient(90deg, var(--red) 0%, var(--red-deep) 38%, var(--navy) 62%, var(--navy) 100%); }

.topbar { background: var(--navy); color: #fff; }
.topbar__inner { display: flex; align-items: center; justify-content: space-between; height: 62px; }
.brand { display: inline-flex; align-items: center; gap: 9px; font-weight: 700; font-size: 1.18rem; text-decoration: none; color: #fff; letter-spacing: -.2px; }
.brand-crown { width: 22px; height: 22px; flex: none; }
.brand em { font-style: normal; color: #ff8a97; }
.nav a { color: #c6d0dc; text-decoration: none; margin-left: 22px; font-size: .95rem; }
.nav a:hover { color: #fff; }

.trustbar { background: #fff; border-bottom: 1px solid var(--line); }
.trustbar .wrap { display: flex; align-items: center; gap: 9px; height: 40px; font-size: .82rem; color: var(--muted); }
.flagico { width: 18px; height: 10px; border-radius: 2px; flex: none; box-shadow: 0 0 0 1px rgba(0,0,0,.08); }
.trustbar .dot { color: var(--red); font-size: .7rem; }

.hero { padding: 52px 0 40px; background: var(--bg); border-bottom: 1px solid var(--line); }
.eyebrow { text-transform: uppercase; letter-spacing: .14em; font-size: .74rem; color: var(--red); font-weight: 700; margin: 0 0 14px; }
h1 { font-family: Georgia, "Times New Roman", serif; font-size: clamp(1.9rem, 4.6vw, 3.1rem); line-height: 1.12; margin: 0 0 16px; font-weight: 500; color: var(--navy); }
h1 em { color: var(--red); font-style: italic; }
.hero__sub { font-size: 1.08rem; color: var(--muted); max-width: 640px; margin: 0 0 26px; }

.search { display: flex; gap: 10px; max-width: 560px; }
.search input { flex: 1; padding: 14px 16px; border: 1px solid var(--line); border-radius: 10px; font-size: 1rem; background: #fff; color: var(--ink); outline: none; }
.search input:focus { border-color: var(--navy); box-shadow: 0 0 0 3px var(--tint); }
.search button { padding: 14px 26px; border: none; border-radius: 10px; background: var(--red); color: #fff; font-size: 1rem; font-weight: 600; cursor: pointer; }
.search button:hover { background: var(--red-deep); }
.search__note { font-size: .82rem; color: var(--muted); margin-top: 12px; }

.quicklinks { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.quicklinks__label { font-size: .82rem; color: var(--muted); }
.qlink { border: 1px solid var(--line); background: #fff; color: var(--navy); border-radius: 999px; padding: 6px 14px; font-size: .85rem; font-weight: 600; cursor: pointer; }
.qlink:hover { border-color: var(--navy); background: var(--tint); }

.placeholder { text-align: center; color: var(--muted); padding: 60px 0; font-size: 1.05rem; }

.results { padding: 30px 0 10px; }
.results__title { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.results__title h2 { font-family: Georgia, "Times New Roman", serif; font-size: 1.7rem; margin: 0; font-weight: 500; color: var(--navy); }
.results__meta { color: var(--muted); margin: 6px 0 20px; }

.trend { font-size: .85rem; font-weight: 700; padding: 5px 12px; border-radius: 999px; }
.trend.up { background: var(--tint); color: var(--up); }
.trend.down { background: var(--red-tint); color: var(--down); }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 0 0 22px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; }
.stat .k { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.stat .v { font-size: 1.4rem; font-weight: 700; margin-top: 4px; color: var(--navy); }

.map { height: 460px; border-radius: 14px; border: 1px solid var(--line); overflow: hidden; background: #ececf0; margin: 0 0 22px; }

.estimate { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 26px 26px 22px; margin: 0 0 22px; }
.estimate h3 { font-family: Georgia, "Times New Roman", serif; font-size: 1.35rem; margin: 0 0 4px; font-weight: 500; color: var(--navy); }
.estimate__lead { color: var(--muted); margin: 0 0 18px; }

.pills { display: flex; flex-wrap: wrap; gap: 9px; margin-bottom: 14px; }
.pill { border: 1px solid var(--line); background: #fff; color: var(--ink); border-radius: 999px; padding: 9px 18px; font-size: .92rem; cursor: pointer; font-weight: 600; transition: all .12s ease; }
.pill:hover { border-color: var(--red); }
.pill.active { background: var(--red); color: #fff; border-color: var(--red); }

.estimate__controls { display: flex; align-items: flex-end; gap: 20px; flex-wrap: wrap; margin-bottom: 6px; }
.field { display: flex; flex-direction: column; gap: 4px; }
.field label { font-size: .8rem; color: var(--muted); font-weight: 600; }
.field input { padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; font-size: .95rem; background: #fff; color: var(--ink); min-width: 160px; }
.chk { display: inline-flex; align-items: center; gap: 7px; font-size: .92rem; color: var(--muted); cursor: pointer; margin-bottom: 10px; }

.estimate__result { margin-top: 16px; }
.val__typical { font-family: Georgia, "Times New Roman", serif; font-size: 2.6rem; font-weight: 700; color: var(--red); line-height: 1; }
.val__label { color: var(--muted); font-size: .95rem; margin-top: 6px; }

.range { margin: 18px 0 6px; }
.range__track { position: relative; height: 10px; background: #ececf0; border-radius: 999px; }
.range__fill { position: absolute; top: 0; bottom: 0; background: linear-gradient(90deg, #e0435a, var(--red)); border-radius: 999px; }
.range__labels { display: flex; justify-content: space-between; font-size: .82rem; color: var(--muted); margin-top: 6px; font-variant-numeric: tabular-nums; }

.chips { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 14px; }
.chip { background: var(--tint); color: var(--navy); border-radius: 999px; padding: 6px 14px; font-size: .85rem; font-weight: 600; }

.floorline { margin-top: 14px; padding: 12px 16px; background: var(--red-tint); border-left: 3px solid var(--red); border-radius: 8px; font-size: .97rem; }
.floorline strong { color: var(--red); }

.tablewrap { background: var(--card); border: 1px solid var(--line); border-radius: 14px; overflow: auto; margin: 0 0 22px; }
.tablewrap__cap { font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding: 14px 16px 4px; }
.sales { width: 100%; border-collapse: collapse; font-size: .93rem; min-width: 520px; }
.sales th, .sales td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.sales thead th { font-size: .76rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); background: var(--alt); position: sticky; top: 0; }
.sales tbody tr:last-child td { border-bottom: none; }
.sales td.num, .sales th.num { text-align: right; font-variant-numeric: tabular-nums; }
.sales .price { font-weight: 700; color: var(--red); }
.sales .type { color: var(--muted); font-size: .85rem; }

.mortgage { background: var(--navy); color: #fffdf7; border-radius: 14px; padding: 26px 28px; }
.mortgage h3 { font-family: Georgia, "Times New Roman", serif; font-size: 1.35rem; margin: 0 0 8px; font-weight: 500; }
.mortgage__text { font-size: 1.08rem; margin: 0 0 6px; }
.mortgage__note { font-size: .84rem; color: #c0cbd6; margin: 0; }

.safety { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 24px 26px; margin: 0 0 22px; }
.safety h3 { font-family: Georgia, "Times New Roman", serif; font-size: 1.35rem; margin: 0 0 6px; font-weight: 500; color: var(--navy); }
.safety__lead { color: var(--muted); margin: 0 0 12px; }
.safety__badge { display: inline-block; font-weight: 700; font-size: .9rem; padding: 8px 16px; border-radius: 999px; margin: 0 0 16px; }
.safety__badge.good { background: var(--tint); color: var(--navy); }
.safety__badge.mid { background: #f5efe0; color: #8a6d1a; }
.safety__badge.high { background: var(--red-tint); color: var(--red); }
.scat-row { display: flex; align-items: center; gap: 12px; margin-bottom: 9px; }
.scat-name { flex: 0 0 150px; font-size: .9rem; color: var(--ink); }
.scat-bar { flex: 1; background: #ececf0; height: 12px; border-radius: 999px; overflow: hidden; }
.scat-fill { display: block; height: 100%; background: var(--red); border-radius: 999px; }
.scat-count { flex: 0 0 44px; text-align: right; font-size: .85rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.safety__note { font-size: .8rem; color: var(--muted); margin: 12px 0 0; }

.score { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 24px 26px; margin: 0 0 22px; }
.score__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.score h3 { font-family: Georgia, "Times New Roman", serif; font-size: 1.35rem; margin: 0 0 4px; font-weight: 500; color: var(--navy); }
.score__lede { color: var(--muted); margin: 0 0 18px; }
.score__overall { text-align: right; }
.score__overall .n { font-size: 2.5rem; font-weight: 700; color: var(--navy); font-family: Georgia, serif; line-height: 1; }
.score__overall .of { font-size: .8rem; color: var(--muted); }
.sbars { display: flex; flex-direction: column; gap: 15px; }
.sbar__top { display: flex; justify-content: space-between; font-size: .92rem; font-weight: 600; color: var(--ink); margin-bottom: 5px; }
.sbar__val { font-variant-numeric: tabular-nums; }
.sbar__track { height: 9px; background: #ececf0; border-radius: 999px; overflow: hidden; }
.sbar__fill { display: block; height: 100%; border-radius: 999px; }
.sbar__fill.good { background: var(--navy); }
.sbar__fill.mid { background: #c99a1e; }
.sbar__fill.poor { background: var(--red); }
.sbar__hint { font-size: .8rem; color: var(--muted); margin-top: 4px; }
.score__note { font-size: .8rem; color: var(--muted); margin: 16px 0 0; }

.band { padding: 46px 0; border-top: 1px solid var(--line); background: #fff; }
.band--alt { background: var(--alt); border-top: none; }
.band__inner { max-width: 720px; }
.band h2 { font-family: Georgia, "Times New Roman", serif; font-size: 1.5rem; margin: 0 0 12px; font-weight: 500; color: var(--navy); }
.band p { color: var(--muted); margin: 0 0 14px; }
.band p:last-child { margin-bottom: 0; }

.footer { background: var(--navy); color: #c0cbd6; padding: 26px 0 40px; font-size: .82rem; }
.footer p { margin: 4px 0; }

@media (max-width: 720px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .map { height: 340px; }
  .hero { padding: 40px 0 30px; }
  .val__typical { font-size: 2.1rem; }
  .scat-name { flex-basis: 110px; }
}
.crumb{font-size:.85rem;color:#5a6472;margin-bottom:10px}.crumb a{color:#12294a;text-decoration:none}
.crumb span{color:#b8b8c0;margin:0 6px}
.results__title h1{font-family:Georgia,"Times New Roman",serif;font-size:1.7rem;margin:0;font-weight:500;color:#12294a;line-height:1.15}
.results__title .trend{font-size:.85rem}
.towns,.results{padding:30px 0 10px}
.str{font-family:Georgia,serif;color:#12294a;font-size:1.3rem;margin:18px 0 10px;font-weight:500}
.towngrid{display:grid;grid-template-columns:repeat(4,1fr);gap:14px;margin:18px 0}
.towncard{display:flex;flex-direction:column;gap:4px;border:1px solid var(--line);border-radius:12px;padding:16px;background:#fff;text-decoration:none;color:var(--ink)}
.towncard:hover{border-color:var(--navy)}
.tc__name{font-weight:700;color:var(--navy);font-family:Georgia,serif;font-size:1.05rem}
.tc__price{font-weight:700;color:var(--red);font-size:1.2rem}
.tc__meta{font-size:.82rem;color:#5a6472}
.townlinks{display:flex;flex-wrap:wrap;gap:8px 18px}
.townlinks a{color:#c6d0dc;text-decoration:none;font-size:.85rem}
.townlinks a:hover{color:#fff}
@media(max-width:720px){.towngrid{grid-template-columns:repeat(2,1fr)}}
.mapsec{padding:0}
.mapsec .wrap{padding-bottom:0}
.str{margin:16px 0 8px}
.mapsearch{margin:8px 0 16px}
.mapsearch input{max-width:400px;width:100%;padding:13px 16px;border:1px solid var(--line);border-radius:10px;font-size:1rem;outline:none;background:#fff}
.mapsearch input:focus{border-color:var(--navy);box-shadow:0 0 0 3px var(--tint)}
#mapdiv{height:500px}
.uk-pin{background:var(--red);border:2px solid #fff;border-radius:50%;box-shadow:0 1px 5px rgba(0,0,0,.45)}
.leaflet-tooltip.pin-card,.leaflet-popup-content-wrapper{background:#fff;border-radius:10px;box-shadow:0 6px 22px rgba(0,0,0,.16);border:1px solid var(--line)}
.leaflet-tooltip.pin-card{padding:12px 16px}
.leaflet-tooltip.pin-card:before,.leaflet-tooltip.pin-card:after{border:0!important}
.leaflet-popup-content{margin:0;padding:12px 16px}
.pin-card .pc-name{font-weight:700;color:var(--navy);font-family:Georgia,serif;font-size:1rem;line-height:1.2}
.pin-card .pc-price{font-weight:700;color:var(--red);font-size:1.15rem}
.pin-card .pc-meta{font-size:.8rem;color:var(--muted);margin-top:2px}
.pin-card .pc-link{display:inline-block;margin-top:7px;font-size:.82rem;color:var(--navy);font-weight:600;text-decoration:none}
.pin-card .pc-link:hover{text-decoration:underline}
@media(max-width:720px){#mapdiv{height:380px}}
.tmap{height:380px;border-radius:12px;border:1px solid var(--line);overflow:hidden;margin:18px 0 22px}
.tsearch{margin:0 0 20px}
.tsearch input{max-width:420px;width:100%;padding:13px 16px;border:1px solid var(--line);border-radius:10px;font-size:1rem;outline:none;background:#fff}
.tsearch input:focus{border-color:var(--navy);box-shadow:0 0 0 3px var(--tint)}
.footer__links{display:flex;gap:20px;flex-wrap:wrap;margin-bottom:12px}
.footer__links a{color:#fff;text-decoration:none;font-size:.85rem}
.footer__links a:hover{text-decoration:underline}
.pagetitle{font-family:Georgia,"Times New Roman",serif;font-size:1.9rem;color:var(--navy);margin:0 0 6px;font-weight:500}