/* Me Babber, "Cliftonwood": after the painted houses above the harbour. Light only, by choice:
   John finds the light version easier to read. Headings in Gabarito, text in Nunito Sans. */
@font-face {
  font-family: 'Gabarito';
  src: url('/vendor/fonts/gabarito.woff2') format('woff2');
  font-weight: 400 900;
  font-display: swap;
}
@font-face {
  font-family: 'Nunito Sans';
  src: url('/vendor/fonts/nunito-sans.woff2') format('woff2');
  font-weight: 200 1000;
  font-display: swap;
}

:root {
  --paper: #ffffff;
  --card: #ffffff;
  --panel: #f4f5fa;     /* soft grey-blue blocks: forms, stats */
  --ink: #1d2340;
  --muted: #5c6280;
  --line: #e7e8f0;
  --blue: #2b4fd8;      /* Bristol Blue */
  --balloon: #ef5b3c;   /* Balloon Fiesta */
  /* One colour per kind of news, and the painted-house pastel that goes with it */
  --c-food: #e0552f;     --s-food: #ffe3d6;
  --c-planning: #2b4fd8; --s-planning: #dfe6ff;
  --c-roads: #b98600;    --s-roads: #fff1c2;
  --c-licences: #a24fcf; --s-licences: #f3dcff;
  --c-street: #11807a;   --s-street: #d3f4ee;
  --c-homes: #2c8a4f;    --s-homes: #d8f3df;
  --c-crime: #1d2340;    --s-crime: #e9eaf3;
  --c-other: #1d2340;    --s-other: #e9eaf3;
  --shadow: none;
  --radius: 22px;
  --display: 'Gabarito', system-ui, sans-serif;
  color-scheme: light;
}

/* Each group sets --g, and everything inside uses it */
.g-food { --g: var(--c-food); --soft: var(--s-food); }
.g-planning { --g: var(--c-planning); --soft: var(--s-planning); }
.g-roads { --g: var(--c-roads); --soft: var(--s-roads); }
.g-licences { --g: var(--c-licences); --soft: var(--s-licences); }
.g-street { --g: var(--c-street); --soft: var(--s-street); }
.g-homes { --g: var(--c-homes); --soft: var(--s-homes); }
.g-crime { --g: var(--c-crime); --soft: var(--s-crime); }
.g-other { --g: var(--c-other); --soft: var(--s-other); }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 17px/1.55 'Nunito Sans', system-ui, sans-serif; }
a { color: var(--blue); text-underline-offset: 3px; }
h1, h2, h3 { line-height: 1.12; margin: 0 0 .4em; }
h1, h2 { font-family: var(--display); font-weight: 800; letter-spacing: -0.02em; }
h3 { font-weight: 700; }
.small { font-size: 14px; color: var(--muted); }
/* Visible to screen readers only. Pinned to the top left so it can never widen the page. */
.sr { position: absolute; left: 0; top: 0; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
fieldset { position: relative; }
.ic { width: 20px; height: 20px; flex: none; vertical-align: -4px; }
.ic.big { width: 30px; height: 30px; }

/* One container for every row, so all left edges line up */
.wrap { max-width: 1280px; margin: 0 auto; padding-left: 24px; padding-right: 24px; }

/* Header */
.top .wrap { display: flex; align-items: center; gap: 14px; padding-top: 16px; padding-bottom: 16px; flex-wrap: wrap; }
.brand { text-decoration: none; font-family: var(--display); font-size: 30px; font-weight: 800; letter-spacing: -0.03em; line-height: 1; }
.brand-me { color: var(--balloon); }
.brand-babber { color: var(--ink); }
.tag { color: var(--muted); font-size: 15px; }

main { padding-bottom: 40px; }

/* Form bits */
.search { margin-top: 22px; display: grid; gap: 16px; background: var(--card); padding: 22px; border-radius: 20px; box-shadow: var(--shadow); border: 1px solid var(--line); }
.search .pc span, .search legend { display: block; font-weight: 700; margin-bottom: 6px; }
.search input[name=postcode] {
  width: 100%; font: inherit; font-size: 28px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  padding: 8px 16px; border-radius: 12px; border: 2px solid var(--line); background: var(--paper); color: var(--ink);
}
.search input[name=postcode]:focus { outline: none; border-color: var(--blue); }
fieldset { border: 0; padding: 0; margin: 0; }
.radius, .filters { display: flex; flex-wrap: wrap; gap: 8px; }
.radius legend { width: 100%; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.chip span {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 999px; border: 1.5px solid var(--line);
  background: var(--card); font-weight: 700; font-size: 15px; cursor: pointer; transition: all .15s;
}
.chip input:checked + span { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.chip[class*="g-"] input:checked + span { background: var(--g); border-color: var(--g); color: #fff; }
.chip input:focus-visible + span { outline: 3px solid var(--balloon); outline-offset: 2px; }
.chip .ic { width: 18px; height: 18px; }
.chip.minor span { border-style: dashed; }
.chip.minor input:checked + span { background: var(--muted); border-color: var(--muted); }
.search button.go {
  display: inline-flex; align-items: center; gap: 10px;
  font: inherit; font-size: 20px; font-weight: 800;
  padding: 10px 22px; border-radius: 12px; border: 0; cursor: pointer; background: var(--balloon); color: #fff; justify-self: start;
}
.search button.go:hover { filter: brightness(1.05); }
.search button.go .ic { width: 24px; height: 24px; transition: transform .2s; }
.search button.go:hover .ic { transform: translateX(4px); }
.error { margin: 0; color: var(--balloon); font-weight: 700; }

/* ---------- Home ---------- */
.hero { max-width: 760px; padding: 6vh 0 4vh; }
.hero h1 { font-size: clamp(40px, 7vw, 76px); letter-spacing: -0.035em; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; align-items: stretch; padding: 3vh 0 28px; }
.hero-copy { min-width: 0; }
.hero-copy h1 { font-size: clamp(42px, 5vw, 72px); letter-spacing: -0.02em; line-height: 1.02; }
.hero-copy h1 span { color: var(--blue); }
.lede { font-size: 20px; color: var(--muted); max-width: 40ch; }
.pc-row { display: flex; gap: 10px; align-items: end; flex-wrap: wrap; }
.pc-row .pc { flex: 1 1 220px; }
.locate {
  display: inline-flex; align-items: center; gap: 8px; font: inherit; font-weight: 700; font-size: 15px;
  padding: 0 14px; height: 62px; border-radius: 12px; border: 2px solid var(--line); background: var(--card); color: var(--ink); cursor: pointer;
}
.locate[hidden] { display: none; }
.locate .ic { color: var(--balloon); }
.locate:hover { border-color: var(--blue); }
.locate.busy .ic { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.hero-map { position: relative; min-height: 480px; border-radius: 24px; overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow); }
#livemap { position: absolute; inset: 0; background: var(--line); }
.live-badge {
  position: absolute; top: 14px; left: 14px; z-index: 5; display: flex; align-items: center; gap: 8px;
  background: var(--card); color: var(--ink); font-weight: 700; font-size: 14px; padding: 6px 12px; border-radius: 999px; box-shadow: var(--shadow);
}
.live-badge i { width: 9px; height: 9px; border-radius: 50%; background: var(--balloon); animation: live 1.8s infinite; }
@keyframes live { 0% { box-shadow: 0 0 0 0 rgba(232, 84, 30, .55); } 100% { box-shadow: 0 0 0 10px rgba(232, 84, 30, 0); } }
.justin {
  position: absolute; left: 14px; right: 14px; bottom: 34px; z-index: 5; display: flex; gap: 12px; align-items: center; text-decoration: none; color: var(--ink);
  background: var(--card); border-radius: 16px; padding: 12px 16px; box-shadow: 0 10px 30px -12px rgba(20, 33, 61, .45);
}
.justin[hidden] { display: none; }
.justin-ic { width: 44px; height: 44px; border-radius: 12px; background: var(--g, var(--muted)); color: #fff; display: grid; place-items: center; flex: none; }
.justin-ic .ic { width: 26px; height: 26px; }
.justin-tag { display: block; font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--g, var(--muted)); }
.justin-text { display: block; font-weight: 700; font-size: 17px; line-height: 1.25; }
.justin.in { animation: rise .5s cubic-bezier(.2, .8, .2, 1.2); }
@keyframes rise { from { transform: translateY(14px); opacity: 0; } to { transform: none; opacity: 1; } }

/* Stats */
.stats { padding: 8px 0 18px; }
.stats h2 { font-family: inherit; font-size: 14px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 700; }
.stats ul { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.stats li { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; box-shadow: var(--shadow); }
.stats li > .ic { position: absolute; top: 14px; right: 14px; color: var(--line); width: 28px; height: 28px; }
.stats .num { display: block; font-family: var(--display); font-size: 42px; font-weight: 800; line-height: 1; color: var(--blue); font-variant-numeric: tabular-nums; }
.stats li.bad .num { color: var(--balloon); }
.stats .lbl { font-size: 14px; color: var(--muted); }

/* Ticker */
.ticker { overflow: hidden; margin: 6px 0 34px; mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent); }
.ticker .track { display: flex; gap: 10px; width: max-content; animation: ticker 100s linear infinite; }
.ticker .dup { display: contents; }
.ticker:hover .track, .ticker:focus-within .track { animation-play-state: paused; }
@keyframes ticker { to { transform: translateX(-50%); } }
.tick {
  flex: none; display: inline-flex; gap: 8px; align-items: center; text-decoration: none; color: var(--ink);
  background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 7px 14px 7px 8px; font-size: 15px; white-space: nowrap;
  transition: transform .15s, border-color .15s;
}
.tick > .ic { width: 28px; height: 28px; padding: 5px; border-radius: 50%; background: var(--g); color: #fff; }
.tick b { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--g); }
.tick.bad b { color: var(--balloon); }
.tick.good b { color: var(--c-homes); }
.tick:hover { transform: translateY(-2px); border-color: var(--ink); }

/* What we watch */
.watch h2 { font-size: 30px; }
.watchgrid { list-style: none; padding: 0; margin: 0 0 16px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.watchgrid li {
  background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 16px 18px; display: grid; gap: 4px; align-content: start;
  transition: transform .2s, box-shadow .2s;
}
.watchgrid li > .ic { width: 46px; height: 46px; padding: 9px; border-radius: 14px; background: var(--g); color: #fff; margin-bottom: 6px; transition: transform .3s cubic-bezier(.3, 1.6, .5, 1); }
.watchgrid li:hover { transform: translateY(-4px); box-shadow: 0 14px 30px -18px rgba(20, 33, 61, .5); }
.watchgrid li:hover > .ic { transform: rotate(-8deg) scale(1.08); }
.watchgrid b { font-size: 18px; }
.watchgrid span { font-size: 15px; color: var(--muted); }
.try { color: var(--muted); }

/* ---------- Results ---------- */
.crumbs { padding: 8px 0 4px; }
.back {
  display: inline-flex; align-items: center; gap: 6px; text-decoration: none; color: var(--muted); font-weight: 700; font-size: 15px;
  padding: 6px 2px;
}
.back:hover { color: var(--ink); }
.near-head { padding: 8px 0 26px; display: grid; gap: 10px; }
.near-head h1 { font-size: clamp(30px, 4.2vw, 50px); margin: 0; }
.pcode { color: var(--balloon); white-space: nowrap; }
.place { margin: 0; color: var(--muted); font-size: 18px; }
.near-controls { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; margin-top: 6px; }
.other { font-weight: 700; }

/* Glance tiles, which are also the tabs */
.tiles {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); gap: 12px; margin: 0 0 32px;
}
.tile {
  position: relative; display: grid; gap: 2px; align-content: start; text-decoration: none; color: var(--ink);
  background: var(--card); border: 1.5px solid var(--line); border-radius: 18px; padding: 14px 16px 16px; box-shadow: var(--shadow);
  transition: transform .15s, border-color .15s, background .15s;
}
.tile > .ic { position: absolute; top: 14px; right: 14px; width: 24px; height: 24px; color: var(--g); opacity: .7; }
.tile b { font-size: 34px; font-weight: 800; line-height: 1.05; color: var(--g); letter-spacing: -0.02em; }
.tile .t-label { font-weight: 700; font-size: 16px; }
.tile .t-sub { font-size: 13px; color: var(--muted); }
.tile:hover { transform: translateY(-2px); border-color: var(--g); }
.tile.on { background: var(--g); border-color: var(--g); color: #fff; box-shadow: 0 14px 30px -16px color-mix(in srgb, var(--g) 70%, transparent); }
.tile.on b, .tile.on .t-sub, .tile.on > .ic { color: #fff; opacity: 1; }
.tile.g-other { --g: var(--ink); }
/* Crime and Top stories use the ink colour, which is light in dark mode, so their text flips to the page colour. */
.tile.g-other.on, .tile.g-crime.on { color: var(--paper); }
.tile.g-other.on b, .tile.g-other.on .t-sub, .tile.g-other.on > .ic,
.tile.g-crime.on b, .tile.g-crime.on .t-sub, .tile.g-crime.on > .ic { color: var(--paper); }

.layout { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: 32px; align-items: start; }
.mapwrap { position: sticky; top: 20px; }
#map { height: calc(100vh - 40px); max-height: 720px; border-radius: 20px; border: 1px solid var(--line); box-shadow: var(--shadow); background: var(--line); }
.feed { display: grid; gap: 28px; min-width: 0; }
.pane > h2 { font-size: 30px; margin-bottom: 18px; }
.pane[hidden] { display: none; }
.week-h { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: 19px; margin: 36px 0 14px; }
/* No gap above the first heading in a tab */
.pane > h2 + .week-h, .pane > h2 + .minor-toggle + .week-h { margin-top: 0; }
.week-h + .small { margin: -6px 0 14px; }
.count { font-size: 13px; background: var(--ink); color: var(--paper); border-radius: 999px; padding: 2px 9px; font-weight: 700; }
.items { list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; }
.pane:not(.minor-on) .item.w1 { display: none; }
.minor-toggle { display: inline-flex; gap: 8px; align-items: center; font-size: 15px; color: var(--muted); margin-bottom: 18px; cursor: pointer; }
.minor-toggle input { width: 18px; height: 18px; accent-color: var(--ink); }
.more-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.see-all { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; text-decoration: none; padding: 8px 14px; border-radius: 999px; border: 1.5px solid var(--line); color: var(--ink); background: var(--card); }
.see-all:hover { border-color: var(--ink); }
.see-all .ic { width: 16px; height: 16px; }

/* Sold prices */
.sold-summary { display: grid; grid-template-columns: auto 1fr; gap: 16px 28px; align-items: center; background: color-mix(in srgb, var(--c-homes) 9%, var(--card)); border-radius: 20px; padding: 20px 22px; margin-bottom: 18px; }
.sold-big span, .sold-big small { display: block; color: var(--muted); font-size: 14px; }
.sold-big b { display: block; font-size: 46px; font-weight: 800; letter-spacing: -0.02em; color: var(--c-homes); line-height: 1.05; }
.sold-range { display: grid; gap: 6px; font-size: 15px; color: var(--muted); }
.sold-range b { color: var(--ink); }
.sold-types { grid-column: 1 / -1; list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.sold-types li { display: grid; background: var(--card); border-radius: 12px; padding: 8px 12px; font-size: 13px; color: var(--muted); }
.sold-types b { font-size: 20px; color: var(--ink); }
.sold-list { list-style: none; padding: 0; margin: 0 0 12px; }
.sold-list li { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 12px 4px; border-bottom: 1px solid var(--line); }
.sold-list a { color: var(--ink); text-decoration: none; display: grid; }
.sold-list a span { color: var(--muted); font-size: 14px; }
.sold-list a:hover b { text-decoration: underline; }
.sold-list .price { font-size: 21px; font-weight: 800; color: var(--c-homes); white-space: nowrap; }

/* Crime */
.crime-head { display: flex; gap: 14px; align-items: baseline; margin-bottom: 16px; }
.crime-head b { font-size: 46px; font-weight: 800; line-height: 1; }
.bars { list-style: none; padding: 0; margin: 0 0 14px; display: grid; gap: 8px; }
.bars li { display: grid; grid-template-columns: 170px 1fr 40px; gap: 10px; align-items: center; font-size: 15px; }
.bars i { height: 12px; border-radius: 6px; background: var(--ink); width: var(--w); opacity: .75; }
.bars b { text-align: right; }

/* Cards: the whole card opens the item's page (the title link stretches over it). */
.item {
  position: relative; display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 14px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow);
  transition: transform .15s, border-color .15s, box-shadow .15s;
}
.item:hover { transform: translateY(-2px); border-color: var(--g); box-shadow: 0 12px 28px -16px rgba(20, 33, 61, .45); }
.item-ic { width: 44px; height: 44px; border-radius: 12px; background: var(--g); color: #fff; display: grid; place-items: center; }
.item-ic .ic { width: 26px; height: 26px; }
.item.w1 .item-ic { background: transparent; color: var(--g); border: 2px solid var(--g); }
.item h3 { font-size: 19px; margin: 6px 0 6px; line-height: 1.3; }
.title-link { color: inherit; text-decoration: none; }
.title-link::after { content: ''; position: absolute; inset: 0; border-radius: inherit; }
.item:hover .title-link { text-decoration: underline; text-decoration-color: var(--g); text-decoration-thickness: 2px; }
.item .detail { margin: 4px 0; font-size: 15px; line-height: 1.5; -webkit-line-clamp: 2; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.item-foot { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; justify-content: space-between; margin-top: 12px; }
.item .addr { color: var(--muted); font-size: 14px; }
.meta { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 13px; color: var(--muted); align-items: center; }
.kind { display: inline-flex; gap: 6px; align-items: center; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; font-size: 12px; color: var(--g); }
.kind .ic { width: 16px; height: 16px; }
.item.is-hidden { display: none; }
.item.is-active { outline: 3px solid var(--balloon); outline-offset: 1px; }

/* Share buttons sit above the stretched card link. */
.share { position: relative; z-index: 2; display: flex; flex-wrap: wrap; gap: 6px; }
.sb {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 34px; height: 34px; padding: 0 8px;
  border-radius: 999px; border: 0; cursor: pointer; text-decoration: none; color: #fff; font: inherit; font-weight: 700; font-size: 14px;
  transition: transform .15s;
}
.sb:hover { transform: translateY(-2px); }
.sb .ic { width: 18px; height: 18px; }
.sb[hidden] { display: none; }
/* Phones with a share menu get one Share button; everything else gets the separate buttons. */
.s-native { display: none; padding: 0 14px; }
.native-share .s-native { display: inline-flex; }
.native-share .s-wa, .native-share .s-fb, .native-share .s-x { display: none; }
.s-wa { background: #1f8a4c; }
.s-fb { background: #1f5fbf; }
.s-x { background: #111; }
.s-copy { background: var(--muted); }
.s-native { background: var(--ink); }
.s-copy.done { background: var(--c-homes); }

.crime { display: flex; gap: 14px; background: var(--card); border: 1px dashed var(--line); border-radius: var(--radius); padding: 14px 16px; }
.crime > .ic { color: var(--muted); }
.crime h3 { font-size: 18px; }
.crime p { margin: 4px 0; }
.signup { border-radius: var(--radius); padding: 14px 16px; background: color-mix(in srgb, var(--blue) 10%, var(--card)); }
.signup h3 { font-size: 18px; }
.signup p { margin: 4px 0; }
.further { background: color-mix(in srgb, var(--balloon) 9%, var(--paper)); border-radius: 20px; padding: 18px; margin-top: 24px; }
.further h3 { font-size: 19px; }
/* Short lists, e.g. places waiting for a first inspection */
.mini { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.mini li { background: var(--panel); border-radius: 16px; padding: 12px 16px; }
.mini a { display: block; color: var(--ink); text-decoration: none; font-weight: 700; }
.mini a:hover { text-decoration: underline; }
.mini span { display: block; color: var(--muted); font-size: 14px; margin-top: 2px; }
.waiting h2 .ic, .sold h2 .ic { width: 28px; height: 28px; color: var(--c-food); }
.sold h2 .ic { color: var(--c-homes); }
.sold .mini li { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; border-bottom: 1px solid var(--line); padding: 6px 0; }
.sold .mini a { color: var(--ink); text-decoration: none; }
.sold .mini a:hover { text-decoration: underline; }
.sold .price { font-size: 19px; font-weight: 800; color: var(--c-homes); white-space: nowrap; }
.sold .summary { font-size: 17px; }
.sold .summary b { font-size: 22px; color: var(--c-homes); }
.empty { color: var(--muted); }

.foot { border-top: 1px solid var(--line); padding: 20px 0; color: var(--muted); font-size: 14px; }

/* ---------- Item page ---------- */
.event-card {
  display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); margin: 2vh 0 24px;
  background: var(--card); border: 1px solid var(--line); border-radius: 24px; overflow: hidden; box-shadow: var(--shadow);
  border-top: 8px solid var(--g);
}
.event-text { padding: 28px 32px; }
.event-text h1 { font-size: clamp(30px, 4.2vw, 52px); margin: 10px 0 14px; }
.event-detail { font-size: 19px; }
.event-text .addr { color: var(--muted); }
.event .meta { gap: 6px 14px; font-size: 15px; }
.event .kind { font-size: 13px; }
.event-share { margin: 22px 0 10px; }
.event-share h2 { font-family: inherit; font-size: 14px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 700; }
.event-share .sb { height: 42px; padding: 0 16px; font-size: 15px; }
.event-share .sb .ic { width: 20px; height: 20px; }
.event-map { min-height: 380px; background: var(--line); }
.btn, .btn-ghost { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; padding: 10px 18px; border-radius: 12px; text-decoration: none; }
.btn { background: var(--blue); color: #fff; font-size: 18px; }
.btn-ghost { border: 2px solid var(--line); color: var(--ink); }
.event-more { background: color-mix(in srgb, var(--blue) 10%, var(--paper)); border-radius: 24px; padding: 24px 32px; margin-bottom: 20px; }
.event-more h2 { font-size: 28px; }

/* ---------- Map pins ---------- */
.maplibregl-map { font: inherit; }
.pinwrap { cursor: pointer; }
.pin {
  width: 30px; height: 30px; border-radius: 50%; background: var(--g, var(--muted)); color: #fff; display: grid; place-items: center;
  border: 2.5px solid #fff; box-shadow: 0 2px 6px rgba(0,0,0,.35); transition: transform .25s cubic-bezier(.3, 1.6, .5, 1);
}
.pin .ic { width: 17px; height: 17px; }
.pin.w1 { width: 12px; height: 12px; border-width: 2px; opacity: .8; }
.pin.home { width: 22px; height: 22px; background: var(--ink); border-width: 4px; box-shadow: 0 0 0 6px rgba(20, 33, 61, .18), 0 2px 6px rgba(0,0,0,.35); }
.pin.on { transform: scale(1.35); box-shadow: 0 0 0 7px color-mix(in srgb, var(--g) 30%, transparent), 0 2px 6px rgba(0,0,0,.35); }
.pin.drop { animation: drop .55s cubic-bezier(.3, 1.6, .5, 1) both; }
@keyframes drop { from { transform: translateY(-30px) scale(.5); opacity: 0; } to { transform: none; opacity: 1; } }
#livemap .pin { width: 24px; height: 24px; border-width: 2px; }
#livemap .pin .ic { width: 14px; height: 14px; }
#livemap .pin.on { transform: scale(1.6); }
.maplibregl-popup-content { font: 700 14px/1.35 'Nunito Sans', system-ui, sans-serif; border-radius: 12px; padding: 10px 14px; }
.popup-link { color: #14213d; text-decoration: none; }
.popup-link::after { content: ' →'; color: #e8541e; }

/* ---------- Smaller screens ---------- */
@media (max-width: 1100px) {
  .stats ul { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .watchgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .wrap { padding-left: 16px; padding-right: 16px; }
  .top .wrap { padding-top: 12px; padding-bottom: 12px; gap: 10px; }
  .brand { font-size: 28px; }
  .tag { display: none; }
  .hero-grid { grid-template-columns: 1fr; gap: 20px; padding-top: 1vh; }
  .hero-map { min-height: 340px; }
  .stats ul { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats .num { font-size: 34px; }
  .locate { height: 52px; width: 100%; justify-content: center; }
  .search { padding: 16px; }
  .layout { grid-template-columns: 1fr; gap: 20px; }
  .mapwrap { position: relative; top: 0; order: -1; }
  #map { height: 30vh; min-height: 220px; }
  /* Tiles scroll sideways on phones, but rest in line with the page's 16px edge. */
  .tiles { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: 52px; margin: 0 -16px 22px; padding: 4px 16px 12px; gap: 10px; scrollbar-width: none; }
  .tiles::after { content: ''; flex: 0 0 6px; }
  .tiles::-webkit-scrollbar { display: none; }
  .tile { flex: 0 0 136px; scroll-snap-align: start; }
  .tile b { font-size: 28px; }
  .sold-summary { grid-template-columns: 1fr; }
  .bars li { grid-template-columns: 120px 1fr 32px; font-size: 14px; }
  .item { grid-template-columns: 36px minmax(0, 1fr); gap: 12px; padding: 12px 14px; }
  .item-ic { width: 36px; height: 36px; border-radius: 10px; }
  .item-ic .ic { width: 22px; height: 22px; }
  .event-card { grid-template-columns: 1fr; }
  .event-text { padding: 20px; }
  .event-map { min-height: 260px; }
  .event-more { padding: 20px; }
}
@media (max-width: 520px) {
  .watchgrid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .ticker { overflow-x: auto; mask-image: none; }
  .ticker .dup { display: none; }
}

/* ---------- Cliftonwood treatments: pastel blocks instead of borders and shadows ---------- */
.tile b, .sold-big b, .stats .num, .crime-head b, .sold-list .price, .sold-types b { font-family: var(--display); }
.item, .tile, .watchgrid li { background: var(--soft, var(--panel)); border: 0; box-shadow: none; }
.item:hover, .tile:hover { border: 0; box-shadow: 0 10px 24px -16px rgba(29, 35, 64, .35); }
.tile.on { background: var(--g); }
.search, .stats li { background: var(--panel); border: 0; box-shadow: none; }
.hero-map, #map { border: 0; border-radius: 28px; box-shadow: none; }
.item-ic, .justin-ic, .tick > .ic { border-radius: 50%; }
.sb { box-shadow: none; }
.signup { background: var(--s-planning); }
.sold-summary { background: var(--s-homes); }
.event-card { border: 0; border-top: 0; background: var(--soft, var(--panel)); box-shadow: none; }
.event-more { background: var(--panel); }
.crime { background: var(--panel); border: 0; }
.further { background: var(--s-food); }
.see-all, .chip span { border-color: var(--line); }

/* Arrows on the sideways tile row (phones), so it's clear there's more to swipe to. */
.tiles-wrap { position: relative; }
.tiles-arrow {
  position: absolute; top: calc(50% - 18px); transform: translateY(-50%); z-index: 3; width: 38px; height: 38px; border-radius: 50%;
  border: 0; background: #fff; color: var(--ink); display: grid; place-items: center; cursor: pointer;
  box-shadow: 0 4px 14px -4px rgba(29, 35, 64, .45);
}
.tiles-arrow[hidden] { display: none; }
.tiles-arrow.prev { left: -6px; }
.tiles-arrow.next { right: -6px; }
.tiles-arrow .ic { width: 20px; height: 20px; }
@media (min-width: 861px) { .tiles-arrow { display: none !important; } }

/* ---------- Footer ---------- */
.foot { border-top: 0; background: var(--panel); padding: 40px 0 32px; margin-top: 40px; color: var(--muted); font-size: 15px; }
.foot-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 28px 40px; }
.foot-brand p { margin: 10px 0 0; max-width: 34ch; }
.foot-links { display: grid; gap: 8px; align-content: start; }
.foot-links h2 { font-size: 14px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink); margin: 0 0 4px; }
.foot-links a { color: var(--ink); text-decoration: none; font-weight: 600; }
.foot-links a:hover { text-decoration: underline; }
.foot-small { grid-column: 1 / -1; font-size: 13px; margin: 8px 0 0; padding-top: 18px; border-top: 1px solid var(--line); }

/* ---------- Information pages and forms ---------- */
.info-page, .msg-box { max-width: 760px; padding: 4vh 0 2vh; }
.info-page h1, .msg-box h1 { font-size: clamp(34px, 5vw, 54px); margin-bottom: 12px; }
.prose { font-size: 17px; }
.prose h2 { font-size: 24px; margin: 30px 0 8px; }
.prose p { margin: 0 0 14px; max-width: 65ch; }
.sources { display: grid; gap: 4px 0; margin: 0 0 20px; }
.sources dt { font-weight: 800; margin-top: 14px; }
.sources dd { margin: 0; color: var(--muted); }
.pr-form, .manage { display: grid; gap: 16px; background: var(--panel); border-radius: var(--radius); padding: 22px; margin: 18px 0; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: grid; gap: 6px; }
.field label, .manage > label, .manage legend { font-weight: 700; }
.field input, .field select, .field textarea, .manage input[name=postcode] {
  font: inherit; padding: 12px 14px; border-radius: 12px; border: 2px solid var(--line); background: #fff; color: var(--ink); width: 100%;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--blue); }
.btn { border: 0; cursor: pointer; }
button.link { background: none; border: 0; padding: 0; color: var(--blue); font: inherit; text-decoration: underline; cursor: pointer; }
.ok { color: var(--c-homes); font-weight: 700; }
.ad-points { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 10px 0 10px; }
.ad-points > div { background: var(--soft); border-radius: var(--radius); padding: 16px 18px; }
.ad-points h3 { margin: 0 0 6px; font-size: 18px; color: var(--g); }
.ad-points p { margin: 0; font-size: 15px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Sign-up box on results pages */
.signup-form { display: grid; gap: 10px; margin-top: 10px; }
.signup-row { display: flex; gap: 8px; flex-wrap: wrap; }
.signup-row input { flex: 1 1 220px; font: inherit; padding: 12px 14px; border-radius: 12px; border: 2px solid transparent; background: #fff; }
.signup-row input:focus { outline: none; border-color: var(--blue); }
.signup-row button { font: inherit; font-weight: 800; border: 0; border-radius: 12px; padding: 12px 18px; background: var(--balloon); color: #fff; cursor: pointer; }
.choose summary { cursor: pointer; font-weight: 700; font-size: 15px; color: var(--blue); }
.choose .radius { margin-top: 10px; }
.chip.g-homes input:checked + span, .chip[class*="g-"] input:checked + span { color: #fff; }

@media (max-width: 860px) {
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .foot-brand { grid-column: 1 / -1; }
  .field-row, .ad-points { grid-template-columns: 1fr; }
}

/* ---------- Sign-up, up front ---------- */
.signup-strip {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; background: var(--s-planning); border-radius: var(--radius);
  padding: 14px 16px; margin: 0 0 22px;
}
.strip-text { display: flex; gap: 10px; align-items: center; flex: 1 1 320px; font-size: 16px; }
.strip-text .ic { width: 26px; height: 26px; color: var(--blue); }
.signup-strip input[type=email] { flex: 1 1 220px; font: inherit; padding: 11px 14px; border-radius: 12px; border: 2px solid transparent; background: #fff; min-width: 0; }
.signup-strip input[type=email]:focus { outline: none; border-color: var(--blue); }
.signup-strip button { font: inherit; font-weight: 800; border: 0; border-radius: 12px; padding: 11px 18px; background: var(--balloon); color: #fff; cursor: pointer; }
.event-more .signup-strip { margin: 18px 0 0; background: #fff; }

/* Phones: a button that stays at the bottom of the screen and jumps to the sign-up. */
.signup-fab {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(14px + env(safe-area-inset-bottom, 0px)); z-index: 20;
  background: var(--balloon); color: #fff; text-decoration: none; font-weight: 800; padding: 12px 22px; border-radius: 999px;
  box-shadow: 0 10px 24px -8px rgba(239, 91, 60, .6); white-space: nowrap;
}
.signup-fab[hidden] { display: none; }

/* Homepage sign-up section */
.home-signup { display: grid; grid-template-columns: 1fr 1fr; gap: 24px 40px; align-items: center; background: var(--s-planning); border-radius: 28px; padding: 28px 32px; margin: 8px 0 36px; }
.home-signup h2 { font-size: clamp(28px, 3.4vw, 40px); margin-bottom: 8px; }
.home-signup p { margin: 0; font-size: 18px; max-width: 46ch; }
.home-signup-form { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.home-signup-form .radius, .home-signup-form .go { grid-column: 1 / -1; }
.home-signup-form .field input { font: inherit; padding: 12px 14px; border-radius: 12px; border: 2px solid transparent; background: #fff; width: 100%; }
.home-signup-form .field input:focus { outline: none; border-color: var(--blue); }
.home-signup-form .field label { font-weight: 700; }
.home-signup-form .go {
  display: inline-flex; align-items: center; gap: 10px; justify-self: start; font: inherit; font-size: 19px; font-weight: 800;
  padding: 12px 22px; border-radius: 12px; border: 0; cursor: pointer; background: var(--balloon); color: #fff;
}
.home-signup-form .go .ic { width: 22px; height: 22px; }
@media (max-width: 860px) {
  .home-signup { grid-template-columns: 1fr; padding: 22px 18px; }
  .home-signup-form { grid-template-columns: 1fr; }
  .signup-strip { padding: 14px; }
  .strip-text { flex-basis: 100%; }
  .signup-strip button { flex: 1 1 100%; }
  body.near main { padding-bottom: 80px; }
}

/* Settings page */
.area-form h2 { font-size: 22px; margin: 0; }
.area-actions { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.add-area { margin: 8px 0 18px; }
.add-area summary { cursor: pointer; font-weight: 800; color: var(--blue); font-size: 18px; padding: 8px 0; }
.msg-box .chip span { font-size: 15px; }

/* Settings page, tidier: each area is a row that opens to edit */
.manage-h { font-size: 22px; margin: 26px 0 12px; }
.area-list { display: grid; gap: 12px; }
.area-card { background: var(--panel); border-radius: var(--radius); overflow: hidden; }
.area-card > summary { list-style: none; display: flex; align-items: center; gap: 12px; padding: 16px 18px; cursor: pointer; }
.area-card > summary::-webkit-details-marker { display: none; }
.area-sum { display: grid; flex: 1; min-width: 0; }
.area-sum b { font-size: 19px; }
.area-sum span { color: var(--muted); font-size: 14px; }
.edit-btn { font-weight: 800; color: var(--blue); padding: 6px 14px; border-radius: 999px; background: #fff; font-size: 15px; }
.area-card[open] .edit-btn { visibility: hidden; }
.area-form { display: grid; gap: 16px; padding: 4px 18px 0; }
.area-form.plain { background: var(--panel); border-radius: var(--radius); padding: 16px 18px 0; }
.form-foot { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; border-top: 1px solid var(--line); margin: 4px -18px 0; padding: 14px 18px 16px; }
.btn-danger { font: inherit; font-weight: 800; border: 2px solid #f2c6bc; background: #fff; color: #c2410c; border-radius: 12px; padding: 9px 16px; cursor: pointer; }
.btn-danger:hover { background: #fff1ec; }
.saved-badge { display: inline-flex; align-items: center; gap: 6px; background: var(--s-homes); color: var(--c-homes); font-weight: 800; font-size: 14px; padding: 5px 12px; border-radius: 999px; }
.saved-badge .ic { width: 16px; height: 16px; }
.just-saved { box-shadow: 0 0 0 3px var(--c-homes); animation: savedpulse 1.4s ease-out 1; }
@keyframes savedpulse { from { box-shadow: 0 0 0 10px color-mix(in srgb, var(--c-homes) 0%, transparent); } }
.notice { display: flex; gap: 8px; align-items: center; padding: 10px 14px; border-radius: 12px; font-weight: 700; }
.notice.ok { background: var(--s-homes); color: var(--c-homes); }
.notice.error { background: var(--s-food); color: #c2410c; }
.notice .ic { width: 18px; height: 18px; }
.leave { margin-top: 28px; }
/* Topic buttons carry their category icon: coloured when off, white when on */
.chip.topic .ic { width: 18px; height: 18px; color: var(--g); }
.chip.topic input:checked + span .ic { color: #fff; }
.chip.topic.g-crime input:checked + span { background: var(--ink); border-color: var(--ink); }

/* Calmer topic buttons: chosen = soft pastel with a tick, not solid colour */
.chip.topic span { background: #fff; color: var(--muted); border-color: var(--line); }
.chip.topic .ic { color: var(--muted); }
.chip.topic .ic.chosen { display: none; width: 16px; height: 16px; }
.chip.topic input:checked + span,
.chip.topic.g-crime input:checked + span { background: var(--soft); border-color: transparent; color: var(--ink); }
.chip.topic input:checked + span .ic { color: var(--g); }
.chip.topic input:checked + span .ic.chosen { display: inline-block; color: var(--g); }

/* Settings: when an area is open, its summary line isn't repeated; Remove is a quiet link */
.area-card[open] .area-sum span { display: none; }
.area-form legend { font-weight: 700; font-size: 15px; color: var(--muted); }
.remove-link { background: none; border: 0; padding: 6px 0; font: inherit; font-weight: 700; font-size: 15px; color: #c2410c; text-decoration: underline; cursor: pointer; }

/* ---------- Area pages ---------- */
.area-tiles { grid-template-columns: repeat(5, minmax(0, 1fr)); margin-bottom: 18px; }
.area-map-link { margin: 0 0 30px; }
.area-cols { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 40px; align-items: start; }
.area-sec { margin-bottom: 36px; }
.area-sec > h2 { font-size: 26px; margin-bottom: 12px; }
.area-sec > p { max-width: 65ch; }
.area-side { position: sticky; top: 20px; background: var(--panel); border-radius: var(--radius); padding: 18px 20px; }
.area-side h2 { font-size: 20px; }
.area-links, .area-index { list-style: none; padding: 0; margin: 0 0 12px; display: grid; gap: 8px; }
.area-links a, .area-index a { font-weight: 700; color: var(--ink); text-decoration: none; }
.area-links a:hover, .area-index a:hover { text-decoration: underline; }
.area-links span, .area-index span { color: var(--muted); font-size: 14px; }
.area-index { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); margin-bottom: 20px; }
.info-page .area-index + h2 { margin-top: 10px; }
@media (max-width: 860px) {
  .area-cols { grid-template-columns: 1fr; }
  .area-side { position: static; }
  .area-tiles { display: flex; }
}
.official { margin: 4px 0 14px; }
.official summary { cursor: pointer; font-weight: 700; color: var(--blue); font-size: 15px; }
.official p { color: var(--muted); font-size: 15px; }
