/* Street Grader — shared site styles. No build step.
 * Palette and voice follow app/DESIGN.md (§2 colour, §10 email & web). "Liquid glass": translucent,
 * blurred surfaces over a soft brand-green wash, with a light top highlight — like the app's iOS
 * chrome. Grade colours are only ever used for grades.
 * Pages link this file as /assets/site.css?v=<hash>; run `python3 server/tools/site.py` after editing. */

:root {
  --bg: #f6f7f4;
  --wash-1: #e2efe3;
  --wash-2: #f3f1e4;
  --text: #11181c;
  --muted: #5d6560;
  --border: #d9ddd5;
  --tint: #1f6f4a;
  --tint-strong: #0b6b3a;
  --tint-text: #ffffff;
  --link: #1f6f4a;
  --focus: #1d6fd1;
  --element: #eceee9;

  --glass: rgba(255, 255, 255, 0.62);
  --glass-strong: rgba(255, 255, 255, 0.8);
  --glass-edge: rgba(255, 255, 255, 0.75);
  --glass-line: rgba(17, 24, 28, 0.08);
  --glass-shadow: 0 10px 34px -16px rgba(11, 55, 30, 0.28), 0 1px 2px rgba(11, 55, 30, 0.06);
  --glass-hi: inset 0 1px 0 rgba(255, 255, 255, 0.85);
  --blur: saturate(170%) blur(22px);

  --g-aplus: #0b5727; --g-aplus-fg: #ffffff;
  --g-a: #2a8622;     --g-a-fg: #ffffff;
  --g-bplus: #89be47; --g-bplus-fg: #16210a;
  --g-b: #f2d04b;     --g-b-fg: #2b2305;
  --g-cplus: #ee8a3c; --g-cplus-fg: #2b1403;
  --g-c: #c8322b;     --g-c-fg: #ffffff;

  --radius: 18px;
  --radius-sm: 12px;
  --max: 68rem;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  /* Headings: the brand face, Plus Jakarta Sans (SIL OFL; owner 2026-10-18), self-hosted Latin subsets in
     assets/fonts/ (700 headings, 800 wordmark and grade letters). Body text stays the system font. */
  --font-display: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e110f;
    --wash-1: #132519;
    --wash-2: #16140d;
    --text: #ecedee;
    --muted: #a3aba5;
    --border: #2f352f;
    --tint: #5bc48d;
    --tint-strong: #5bc48d;
    --tint-text: #0e110f;
    --link: #7fd4a4;
    --focus: #7ab3ff;
    --element: #232823;

    --glass: rgba(30, 36, 32, 0.58);
    --glass-strong: rgba(30, 36, 32, 0.8);
    --glass-edge: rgba(255, 255, 255, 0.1);
    --glass-line: rgba(255, 255, 255, 0.08);
    --glass-shadow: 0 12px 36px -16px rgba(0, 0, 0, 0.7);
    --glass-hi: inset 0 1px 0 rgba(255, 255, 255, 0.07);
  }
}

*, *::before, *::after { box-sizing: border-box; }
/* Anchor jumps (#plus, #how-grades-work…) land below the sticky header, with room to breathe */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 6.25rem; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  overflow-wrap: break-word;
  background-color: var(--bg);
  /* The brand wash the glass sits on (the app's WelcomeBackdrop), plus two soft light pools. */
  background-image:
    radial-gradient(42rem 28rem at 88% -6%, color-mix(in srgb, var(--g-bplus) 22%, transparent), transparent 70%),
    radial-gradient(36rem 26rem at -8% 18%, color-mix(in srgb, var(--g-a) 16%, transparent), transparent 70%),
    linear-gradient(180deg, var(--wash-1) 0, var(--wash-2) 28rem, var(--bg) 60rem);
  background-repeat: no-repeat;
}
img, svg { max-width: 100%; height: auto; }
a { color: var(--link); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 6px; }

.skip {
  position: absolute; left: 1rem; top: -4rem; z-index: 50;
  background: var(--glass-strong); color: var(--text); padding: 0.5rem 0.9rem;
  border: 2px solid var(--focus); border-radius: 10px;
}
.skip:focus { top: 1rem; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 1rem; }
@media (min-width: 40rem) { .wrap { padding: 0 1.5rem; } }

/* Glass surface (shared by the header, cards and panels) */
.glass,
.site-header .bar,
.card, .figures li, .facts, .legend li, .sources li, details, .table-wrap, .note, .place-search .box, .county-list a, .panel {
  background: var(--glass);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  border: 1px solid var(--glass-edge);
  box-shadow: var(--glass-hi), var(--glass-shadow);
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .glass, .site-header .bar, .card, .figures li, .facts, .legend li, .sources li, details, .table-wrap, .note,
  .place-search .box, .county-list a, .panel { background: var(--glass-strong); }
}

/* Header: a floating glass bar */
.site-header { position: sticky; top: 0; z-index: 20; padding: 0.6rem 0 0; }
.site-header .bar {
  display: flex; align-items: center; gap: 0.5rem 1rem; flex-wrap: wrap;
  border-radius: 24px; padding: 0.5rem 0.6rem 0.5rem 0.85rem;
}
.brand {
  display: inline-flex; align-items: center; gap: 0.55rem; white-space: nowrap;
  font-family: var(--font-display); font-weight: 800; font-size: 1.12rem; letter-spacing: -0.015em;
  color: var(--text); text-decoration: none; padding: 0.2rem 0;
}
@font-face {
  font-family: "Plus Jakarta Sans"; font-weight: 700; font-style: normal; font-display: swap;
  src: url("/assets/fonts/plus-jakarta-sans-700.woff2") format("woff2");
}
@font-face {
  font-family: "Plus Jakarta Sans"; font-weight: 800; font-style: normal; font-display: swap;
  src: url("/assets/fonts/plus-jakarta-sans-800.woff2") format("woff2");
}
/* Wordmark: "street" in the text colour, "grader" in the brand green, ExtraBold. */
.brand .wm { font-family: var(--font-display); font-weight: 800; font-size: 1.62rem; letter-spacing: -0.035em; }
.brand .wm span { color: var(--tint); }
.brand img { width: 46px; height: 46px; flex: none; filter: drop-shadow(0 2px 5px rgba(11, 55, 30, 0.2)); }
/* Header, owner 2026-10-18: a big logo and a header that never changes size while you scroll (changing its height
   made the page jump and the header stutter). Scrolling only deepens its shadow (.scrolled). On phones it is one
   row — a big logo and a menu button — and Get the app and the links open in a panel over the page (.menu-open). */
.site-header .bar { transition: box-shadow 0.2s ease; }
.site-header.scrolled .bar { box-shadow: var(--glass-hi), 0 12px 30px -14px rgba(11, 55, 30, 0.38); }
.menu-btn, .site-nav .nav-cta { display: none; }
.site-nav { margin-left: auto; min-width: 0; }
.site-nav ul { display: flex; gap: 0.2rem; list-style: none; margin: 0; padding: 0; }
.site-nav a {
  display: inline-block; white-space: nowrap; text-decoration: none;
  color: var(--muted); font-weight: 600; font-size: 0.92rem;
  padding: 0.42rem 0.8rem; border-radius: 999px;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.site-nav a:hover { color: var(--text); background: color-mix(in srgb, var(--text) 6%, transparent); }
.site-nav a[aria-current="page"] {
  color: var(--tint); background: color-mix(in srgb, var(--tint) 13%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--tint) 22%, transparent);
}
.btn-sm { font-size: 0.9rem; padding: 0.5rem 1rem; }
.header-cta { flex: none; }
.site-header [hidden] { display: none !important; } /* 2026-11-15 */
/* "Log in" / "Open web app" sits to the left of Get the app (owner 2026-11-15). */
.header-cta.secondary { margin-right: 0.5rem; }
/* Phones: one row (a big logo and the menu button); Get the app and the links open in a panel under it, over the
   page. */
@media (max-width: 44rem) {
  html { scroll-padding-top: 5.5rem; }
  .site-header { padding-top: 0.45rem; }
  .site-header .bar { position: relative; flex-wrap: nowrap; gap: 0.5rem; padding: 0.45rem 0.45rem 0.45rem 0.65rem; }
  .brand { gap: 0.5rem; min-width: 0; }
  .brand img { width: 46px; height: 46px; }
  .brand .wm { font-size: 1.6rem; }
  .site-header .header-cta { display: none; }
  .site-nav .nav-cta { display: block; margin-bottom: 0.3rem; }
  .site-nav .nav-cta a.btn { display: block; text-align: center; color: var(--tint-text); padding: 0.8rem 1rem; }
  .site-nav .nav-cta a.btn.secondary { color: var(--text); }
  .menu-btn {
    margin-left: auto;
    display: grid; place-items: center; flex: none; width: 2.6rem; height: 2.6rem; padding: 0; border: 0; border-radius: 999px;
    background: color-mix(in srgb, var(--text) 7%, transparent); color: var(--text); cursor: pointer;
  }
  .menu-btn svg { width: 1.25rem; height: 1.25rem; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
  .menu-open .menu-btn { background: color-mix(in srgb, var(--tint) 16%, transparent); color: var(--tint); }
  .site-nav {
    display: none; position: absolute; top: calc(100% + 0.45rem); left: 0; right: 0; margin: 0; padding: 0.4rem;
    border-radius: 20px; background: color-mix(in srgb, var(--bg) 97%, transparent); border: 1px solid var(--glass-edge);
    -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); box-shadow: var(--glass-hi), var(--glass-shadow);
  }
  .menu-open .site-nav { display: block; }
  .site-nav ul { flex-direction: column; gap: 0.1rem; }
  .site-nav a { display: block; font-size: 1.02rem; padding: 0.75rem 0.9rem; border-radius: 14px; color: var(--text); }
}
@media (max-width: 22rem) { .brand .wm { font-size: 1.38rem; } .brand img { width: 40px; height: 40px; } }

/* Main */
main { padding: 2.25rem 0 3.5rem; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 700; line-height: 1.18; letter-spacing: -0.025em; text-wrap: balance; }
h1 { font-size: clamp(2rem, 5vw + 0.5rem, 3.1rem); margin: 0 0 1rem; font-weight: 800; }
h2 { font-size: clamp(1.4rem, 2vw + 0.8rem, 1.85rem); margin: 2.75rem 0 0.9rem; font-weight: 750; }
h3 { font-size: 1.12rem; margin: 1.6rem 0 0.4rem; font-weight: 700; }
p, ul, ol, dl { margin: 0 0 1rem; }
p { text-wrap: pretty; }
.lede { font-size: 1.18rem; color: var(--muted); max-width: 40rem; }
.prose { max-width: 44rem; }
.prose li { margin-bottom: 0.4rem; }
.muted { color: var(--muted); }
.small { font-size: 0.9rem; }
.nowrap { white-space: nowrap; }
.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; }

/* Hero */
.hero { display: grid; gap: 2rem; align-items: center; }
@media (min-width: 52rem) { .hero { grid-template-columns: 1.15fr 1fr; gap: 3rem; } }
.eyebrow {
  display: inline-block; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--tint); margin-bottom: 0.75rem;
  padding: 0.25rem 0.7rem; border-radius: 999px; background: color-mix(in srgb, var(--tint) 11%, transparent);
}
.cta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1.25rem; margin-top: 1.5rem; }
.cta a:not(.btn) { font-weight: 600; }
.cta-note { margin: 0.9rem 0 0; font-size: 0.9rem; color: var(--muted); }
/* Get the app (/app/): the QR code shows only where there's a mouse, i.e. on a computer */
.get-app { display: grid; gap: 2rem; align-items: center; }
/* The box hugs the code: fixed code width, caption wrapped to the same width, never stretched by the grid. */
.get-app .qr { display: none; margin: 0; border-radius: var(--radius); padding: 1rem; width: fit-content; justify-self: start; text-align: center; }
.get-app .qr img { display: block; width: 13.75rem; height: auto; margin: 0 0 0.8rem; background: #fff; border-radius: 14px; padding: 0.6rem; }
.get-app .qr figcaption { width: 13.75rem; font-size: 0.92rem; color: var(--muted); }
.get-app .qr figcaption strong { color: var(--text); }
@media (hover: hover) and (pointer: fine) and (min-width: 44rem) {
  .get-app { grid-template-columns: 1fr auto; gap: 3rem; }
  .get-app .qr { display: block; justify-self: end; }
}
.steps { max-width: 44rem; padding-left: 1.4rem; }
.steps li { margin-bottom: 0.6rem; padding-left: 0.2rem; }
.steps li::marker { font-weight: 800; color: var(--tint); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  font: inherit; font-weight: 700; font-size: 1rem; white-space: nowrap;
  padding: 0.78rem 1.3rem; border-radius: 999px; border: 0;
  background: linear-gradient(180deg, color-mix(in srgb, var(--tint) 88%, #fff) 0%, var(--tint) 55%);
  color: var(--tint-text); text-decoration: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28), 0 8px 20px -10px color-mix(in srgb, var(--tint) 80%, transparent);
  transition: transform 0.12s ease, filter 0.12s ease;
}
.btn:hover { filter: brightness(1.06); text-decoration: none; }
.btn:active { transform: scale(0.98); }
.btn.secondary {
  background: var(--glass); color: var(--text); border: 1px solid var(--glass-edge);
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); box-shadow: var(--glass-hi), var(--glass-shadow);
}
.btn[disabled], .btn[aria-disabled="true"] { opacity: 0.5; cursor: not-allowed; }

/* Home hero: the app icon's map drawn out (owner 2026-10-18 brand), with the app's street card over it */
.hero-map {
  position: relative; margin: 0; padding: 10px; border-radius: var(--radius);
  background: var(--glass); border: 1px solid var(--glass-edge);
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  box-shadow: var(--glass-hi), 0 24px 60px -30px rgba(11, 55, 30, 0.45);
  max-width: 30rem; width: 100%; justify-self: center;
}
.hero-map svg { display: block; width: 100%; height: auto; border-radius: 12px; }
.hero-map .hm-label { font: 700 11px var(--font); letter-spacing: 0.14em; fill: #4f5a53; }
.map-card {
  position: absolute; left: 22px; right: 22px; bottom: 22px;
  display: flex; align-items: center; gap: 0.75rem; padding: 0.7rem 0.85rem; border-radius: 14px;
  background: var(--glass-strong); border: 1px solid var(--glass-edge);
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); box-shadow: var(--glass-hi), var(--glass-shadow);
}
.map-card .grade {
  flex: none; display: grid; place-items: center; width: 2.6rem; height: 2.6rem; border-radius: 10px;
  font-family: var(--font-display); font-weight: 800; font-size: 1.05rem;
}
.map-card b { display: block; font-family: var(--font-display); font-size: 1.02rem; line-height: 1.25; }
.map-card .d { display: block; color: var(--muted); font-size: 0.85rem; line-height: 1.3; }


/* Grade chips (always the letter on its swatch), letters in the brand face like the app icon's A+ */
.g-aplus, .g-a, .g-bplus, .g-b, .g-cplus, .g-c { font-family: var(--font-display); font-weight: 800; }
.g-aplus { background: var(--g-aplus); color: var(--g-aplus-fg); }
.g-a     { background: var(--g-a);     color: var(--g-a-fg); }
.g-bplus { background: var(--g-bplus); color: var(--g-bplus-fg); }
.g-b     { background: var(--g-b);     color: var(--g-b-fg); }
.g-cplus { background: var(--g-cplus); color: var(--g-cplus-fg); }
.g-c     { background: var(--g-c);     color: var(--g-c-fg); }
.chip {
  display: inline-grid; place-items: center; min-width: 2.6rem; height: 2.6rem; padding: 0 0.4rem;
  border-radius: 11px; font-weight: 800; font-size: 1.05rem; flex: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22);
}
.chip-sm { min-width: 2rem; height: 2rem; font-size: 0.85rem; border-radius: 8px; }
.chip-none { background: var(--element); color: var(--muted); }

/* Cards */
.cards { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); padding: 0; list-style: none; }
.card, .panel { border-radius: var(--radius); padding: 1.2rem 1.3rem; }
.card h3 { margin-top: 0; }
.card p:last-child { margin-bottom: 0; }

/* Measures (weights and place scores) */
.measures { list-style: none; padding: 0; display: grid; gap: 0.7rem; max-width: 44rem; }
.measures li { display: grid; grid-template-columns: minmax(7rem, 9rem) 1fr 3rem; align-items: center; gap: 0.75rem; }
.measures .name { font-weight: 700; display: flex; align-items: center; gap: 0.55rem; white-space: nowrap; }
.measures .bar { height: 10px; background: color-mix(in srgb, var(--text) 8%, transparent); border-radius: 999px; overflow: hidden; }
.measures .bar i { display: block; height: 100%; background: var(--tint); border-radius: 999px; }
.measures .bar i.g-aplus { background: var(--g-aplus); }
.measures .bar i.g-a { background: var(--g-a); }
.measures .bar i.g-bplus { background: var(--g-bplus); }
.measures .bar i.g-b { background: var(--g-b); }
.measures .bar i.g-cplus { background: var(--g-cplus); }
.measures .bar i.g-c { background: var(--g-c); }
.measures .pct { text-align: right; font-variant-numeric: tabular-nums; font-weight: 700; }
.measures.wide li { grid-template-columns: minmax(10.5rem, 12rem) 1fr 3rem; }
@media (max-width: 30rem) {
  .measures li, .measures.wide li { grid-template-columns: 1fr 3rem; row-gap: 0.35rem; }
  .measures .bar { grid-column: 1 / -1; grid-row: 2; }
}

/* Grade legend */
.legend { list-style: none; padding: 0; display: grid; gap: 0.6rem; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); max-width: 44rem; }
.legend li { display: flex; align-items: center; gap: 0.8rem; border-radius: 14px; padding: 0.6rem 0.8rem; }
.legend b { display: block; }
.legend span.d { color: var(--muted); font-size: 0.92rem; }
.share-bar { display: flex; height: 2.2rem; border-radius: 12px; overflow: hidden; margin: 1rem 0 0.5rem; max-width: 44rem; box-shadow: var(--glass-shadow); }
/* Every grade keeps room for its label, however small its share (A+ is only ~3%). */
.share-bar span { display: grid; place-items: center; font-weight: 800; font-size: 0.85rem; min-width: 2.25rem; padding: 0 0.15rem; }

/* Note / callout */
.note { border-radius: 14px; padding: 0.9rem 1.1rem; max-width: 44rem; border-left: 4px solid var(--tint); }
.todo { border: 2px dashed var(--g-cplus); padding: 0.9rem 1.1rem; border-radius: 12px; max-width: 44rem; }

/* FAQ: custom chevron on the right that turns when open (no browser disclosure marker) */
details { border-radius: 14px; padding: 0 1.1rem; margin-bottom: 0.7rem; max-width: 46rem; }
summary {
  cursor: pointer; font-weight: 700; padding: 0.95rem 2rem 0.95rem 0; list-style: none; position: relative;
}
summary::-webkit-details-marker { display: none; }
summary::marker { content: ""; }
summary::after {
  content: ""; position: absolute; right: 0.15rem; top: 50%; width: 0.55rem; height: 0.55rem;
  border-right: 2px solid var(--tint); border-bottom: 2px solid var(--tint);
  transform: translateY(-70%) rotate(45deg); transition: transform 0.2s ease;
}
details[open] > summary::after { transform: translateY(-25%) rotate(-135deg); }
details > :not(summary) { margin-top: 0; }
details[open] { padding-bottom: 0.5rem; }
@media (prefers-reduced-motion: reduce) { summary::after { transition: none; } }

/* Sources */
.sources { list-style: none; padding: 0; display: grid; gap: 1rem; max-width: 50rem; }
.sources li { border-radius: var(--radius); padding: 1.1rem 1.25rem; }
.sources h3 { margin: 0 0 0.35rem; }
.sources .used { color: var(--muted); margin-bottom: 0.6rem; }
.sources blockquote {
  margin: 0.4rem 0 0.6rem; padding: 0.6rem 0.9rem; background: color-mix(in srgb, var(--text) 5%, transparent);
  border-radius: 10px; font-size: 0.95rem;
}
.sources blockquote p { margin: 0 0 0.3rem; }
.sources blockquote p:last-child { margin: 0; }

/* 404 */
.notfound { text-align: center; max-width: 34rem; margin: 0 auto; }
.notfound .nf-mark { display: block; margin: 0 auto 1.5rem; filter: drop-shadow(0 6px 14px rgba(11, 55, 30, 0.22)); }

/* Footer */
.site-footer { color: var(--muted); font-size: 0.92rem; padding: 0 0 1.5rem; }
.site-footer .panel { border-radius: var(--radius); padding: 1.2rem 1.3rem; }
.site-footer .foot-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.1rem 1.5rem; margin: 0.4rem 0 1.2rem; }
@media (min-width: 760px) { .site-footer .foot-cols { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.site-footer .foot-h { margin: 0 0 0.45rem; color: var(--text); font-weight: 700; font-size: 0.8rem; letter-spacing: 0.06em; text-transform: uppercase; }
.site-footer .foot-col ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.35rem; }
.site-footer .foot-col a[aria-current] { color: var(--text); font-weight: 600; }
.site-footer a:not(.pm-badge) { color: var(--muted); }
.site-footer a:not(.pm-badge):hover { color: var(--text); }
.site-footer p { margin: 0 0 0.4rem; }
.site-footer .brand { font-size: 1rem; margin-bottom: 0.6rem; }
.site-footer .brand img { width: 30px; height: 30px; }
.site-footer .brand .wm { font-size: 1.2rem; }
.site-footer .made-by { margin: 0.9rem 0 0; }
/* PetroMedia badge: the Light version on the light footer, the Dark one in dark mode */
.site-footer .made-by .pm-badge-dark { display: none; }
@media (prefers-color-scheme: dark) {
  .site-footer .made-by .pm-badge:not(.pm-badge-dark) { display: none; }
  .site-footer .made-by .pm-badge-dark { display: inline-flex; }
}

@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

/* ---- Places (/places/, generated by pipeline export/web.py) ------------------------------------ */

/* Breadcrumbs */
.crumbs { list-style: none; display: flex; flex-wrap: wrap; gap: 0.2rem 0.45rem; padding: 0; margin: 0 0 1.25rem; font-size: 0.92rem; color: var(--muted); }
.crumbs li { white-space: nowrap; }
.crumbs li + li::before { content: "›"; margin-right: 0.45rem; color: var(--muted); }
.crumbs a { color: var(--muted); text-decoration: none; font-weight: 600; }
.crumbs a:hover { color: var(--tint); }

/* Place search */
.place-search { position: relative; max-width: 36rem; margin: 0 0 1.5rem; }
.place-search label { display: block; font-weight: 700; margin-bottom: 0.45rem; }
.place-search .box { display: flex; align-items: center; gap: 0.6rem; border-radius: 999px; padding: 0.3rem 0.4rem 0.3rem 1rem; }
.place-search .box:focus-within { box-shadow: var(--glass-hi), var(--glass-shadow), 0 0 0 3px color-mix(in srgb, var(--tint) 35%, transparent); }
.place-search svg { width: 1.1rem; height: 1.1rem; color: var(--muted); flex: none; }
.place-search input {
  flex: 1; min-width: 0; border: 0; background: transparent; color: var(--text);
  font: inherit; font-size: 1.05rem; padding: 0.55rem 0; outline: none;
}
.place-search input::placeholder { color: var(--muted); }
.place-search input::-webkit-search-cancel-button { display: none; }
.place-search .results {
  position: absolute; z-index: 15; left: 0; right: 0; top: calc(100% + 0.4rem);
  list-style: none; margin: 0; padding: 0.35rem;
  border-radius: 18px; max-height: 22rem; overflow-y: auto;
  background: var(--glass-strong); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  border: 1px solid var(--glass-edge); box-shadow: var(--glass-hi), var(--glass-shadow);
}
.place-search .results[hidden] { display: none; }
.place-search .results a {
  display: flex; align-items: center; gap: 0.7rem; padding: 0.5rem 0.6rem; border-radius: 12px;
  color: var(--text); text-decoration: none;
}
.place-search .results a .t { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.place-search .results a .t b, .place-search .results a .t span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.place-search .results a .t span { color: var(--muted); font-size: 0.88rem; }
.place-search .results a[aria-selected="true"], .place-search .results a:hover { background: color-mix(in srgb, var(--tint) 12%, transparent); }
.place-search .empty { padding: 0.6rem 0.8rem; color: var(--muted); font-size: 0.95rem; }

/* Places index: counties as glass tiles */
.county-list { list-style: none; padding: 0; display: grid; gap: 0.6rem; grid-template-columns: repeat(auto-fill, minmax(13.5rem, 1fr)); }
.county-list a {
  display: flex; justify-content: space-between; align-items: baseline; gap: 0.75rem;
  border-radius: 14px; padding: 0.7rem 0.95rem; text-decoration: none; color: var(--text); font-weight: 650;
  transition: transform 0.12s ease;
}
.county-list a:hover { transform: translateY(-1px); color: var(--tint); }
.county-list a span { color: var(--muted); font-weight: 500; font-size: 0.88rem; white-space: nowrap; }

/* Place hero */
.place-hero { display: flex; align-items: center; gap: 1rem; margin-bottom: 0.75rem; }
.place-hero .chip { min-width: 4.2rem; height: 4.2rem; font-size: 1.7rem; border-radius: 18px; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 10px 24px -12px rgba(0, 0, 0, 0.35); }
.place-hero h1 { margin: 0; }
.place-hero p { margin: 0.25rem 0 0; }

/* Key figures */
.figures { list-style: none; padding: 0; display: grid; gap: 0.75rem; grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr)); max-width: 50rem; }
.figures li { border-radius: 16px; padding: 0.85rem 1rem; display: grid; gap: 0.15rem; align-content: start; }
.figures .k { color: var(--muted); font-size: 0.86rem; font-weight: 600; }
.figures b { font-family: var(--font-display); font-size: 1.4rem; letter-spacing: -0.01em; line-height: 1.2; }
.figures .s { color: var(--muted); font-size: 0.84rem; }

/* Fact lists (amenities, transport, schools) */
.facts { list-style: none; padding: 0.2rem 0; margin: 0 0 0.6rem; max-width: 44rem; border-radius: var(--radius); }
.facts li { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 0.6rem 1.1rem; }
.facts li + li { border-top: 1px solid var(--glass-line); }
.facts li > span:first-child { min-width: 0; }
.facts li > span:last-child { text-align: right; flex: none; max-width: 55%; }
.rating { font-size: 0.82rem; font-weight: 700; padding: 0.12rem 0.7rem; border-radius: 999px; background: var(--element); white-space: nowrap; }
.r-plentiful { background: var(--g-aplus); color: var(--g-aplus-fg); }
.r-ample { background: var(--g-a); color: var(--g-a-fg); }
.r-adequate { background: var(--g-bplus); color: var(--g-bplus-fg); }
.r-none-close-by { color: var(--muted); background: transparent; box-shadow: inset 0 0 0 1px var(--border); }

/* Grids of places (areas, nearby towns, county top-10s) */
.grid-list { list-style: none; padding: 0; display: grid; gap: 0.55rem 1.25rem; grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); max-width: 56rem; }
.grid-list.one { grid-template-columns: 1fr; }
.grid-list li { display: flex; align-items: center; gap: 0.6rem; min-width: 0; }
.grid-list li > a, .grid-list li > span:not(.chip) { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.grid-list li .muted { margin-left: auto; flex: none; }

/* FAQ blocks on place pages use the same details styling */
.faq p { margin: 0 0 0.6rem; color: var(--muted); }
.cta-card { margin: 2.5rem 0 1.5rem; max-width: 50rem; }

/* County ranking: one line per place; the table scrolls sideways under a pinned place column */
.table-wrap { overflow-x: auto; margin: 0 0 0.6rem; border-radius: var(--radius); -webkit-overflow-scrolling: touch; }
.rank { border-collapse: separate; border-spacing: 0; width: 100%; font-size: 0.95rem; }
.rank th, .rank td { padding: 0.5rem 0.55rem; text-align: center; border-bottom: 1px solid var(--glass-line); white-space: nowrap; vertical-align: middle; }
.rank thead th { font-size: 0.78rem; color: var(--muted); font-weight: 700; letter-spacing: 0.02em; }
.rank tbody tr:last-child td { border-bottom: 0; }
.rank .n { width: 2.2rem; color: var(--muted); font-variant-numeric: tabular-nums; text-align: right; padding-right: 0.3rem; }
.rank .place { text-align: left; }
.rank .place a { font-weight: 650; text-decoration: none; }
.rank .place a:hover { text-decoration: underline; }
.rank .place .t { color: var(--muted); font-size: 0.82rem; margin-left: 0.4rem; }
.rank .n, .rank .place { position: sticky; z-index: 1; background: var(--glass-strong); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); }
.rank .n { left: 0; }
.rank .place { left: 2.2rem; box-shadow: 6px 0 10px -8px rgba(0, 0, 0, 0.25); }
.rank tbody tr:hover td { background-color: color-mix(in srgb, var(--tint) 6%, var(--glass-strong)); }
.scroll-hint { display: none; }
@media (max-width: 44rem) {
  .scroll-hint { display: block; }
  /* Phones: the pinned column is just the name (no type label), capped so grades stay in view. */
  .rank .place { max-width: 11.5rem; overflow: hidden; text-overflow: ellipsis; }
  .rank .place .t { display: none; }
  .rank th, .rank td { padding: 0.45rem 0.4rem; }
}

/* County results in the place search: a pin instead of a grade */
.chip-county { background: color-mix(in srgb, var(--tint) 14%, transparent); color: var(--tint); }
.chip-county svg { width: 1rem; height: 1rem; }

/* Map teaser: coarse hexagons of grades (export/web_map.py PNG, img.hex, gaps drawn in, owner 2026-10-22), plus
 * the app's layer pills and a zoom prompt. Pages exported before that have a one-pixel-per-square PNG, drawn
 * pixelated with the .map-grid lines over it; keep those rules until no such page is live. */
.map-teaser { margin: 0 0 1.25rem; max-width: 56rem; }
.map-canvas {
  position: relative; aspect-ratio: var(--cols) / var(--rows); overflow: hidden;
  border-radius: var(--radius); background: var(--glass); border: 1px solid var(--glass-edge);
  box-shadow: var(--glass-hi), 0 24px 60px -32px rgba(11, 55, 30, 0.5);
}
.map-plane { position: absolute; inset: 0; }
.map-canvas img {
  position: absolute; inset: 0; width: 100%; height: 100%; image-rendering: pixelated;
  -webkit-mask-image: radial-gradient(125% 125% at 50% 50%, #000 55%, transparent 100%);
  mask-image: radial-gradient(125% 125% at 50% 50%, #000 55%, transparent 100%);
}
.map-canvas img.hex { image-rendering: auto; }
.map-grid {
  position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(to right, var(--bg) 1.5px, transparent 1.5px),
    linear-gradient(to bottom, var(--bg) 1.5px, transparent 1.5px);
  background-size: calc(100% / var(--cols)) calc(100% / var(--rows));
  opacity: 0.85;
}
svg.map-grid { width: 100%; height: 100%; background: none; overflow: visible; }
svg.map-grid path { fill: none; stroke: var(--bg); stroke-width: 1.5px; }
.map-pin { position: absolute; transform: translate(-50%, -100%); display: grid; justify-items: center; pointer-events: none; }
.map-pin b {
  order: -1; margin-bottom: 0.3rem; padding: 0.2rem 0.6rem; border-radius: 999px; white-space: nowrap;
  font-size: 0.85rem; background: var(--glass-strong); color: var(--text); box-shadow: var(--glass-shadow);
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
}
.map-pin i {
  width: 18px; height: 18px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); margin-bottom: 3px;
  background: var(--text); border: 3px solid var(--bg); box-shadow: 0 4px 10px rgba(0, 0, 0, 0.35);
}
.map-label {
  position: absolute; transform: translate(-50%, -50%); display: inline-flex; align-items: center; gap: 0.3rem;
  padding: 0.15rem 0.55rem 0.15rem 0.2rem; border-radius: 999px; white-space: nowrap; text-decoration: none;
  font-size: 0.8rem; font-weight: 650; color: var(--text); background: var(--glass-strong);
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); box-shadow: var(--glass-shadow);
}
.map-label .chip { min-width: 1.5rem; height: 1.5rem; font-size: 0.68rem; border-radius: 999px; }
.map-label:hover { color: var(--tint); }
.map-layers {
  position: absolute; top: 0.6rem; left: 0.6rem; right: 0.6rem; display: flex; gap: 0.35rem;
  list-style: none; margin: 0; padding: 0; overflow-x: auto; scrollbar-width: none;
}
.map-layers::-webkit-scrollbar { display: none; }
.map-layers a, .map-layers span {
  display: inline-flex; align-items: center; gap: 0.3rem; white-space: nowrap; text-decoration: none;
  padding: 0.3rem 0.7rem; border-radius: 999px; font-size: 0.8rem; font-weight: 650;
  color: var(--muted); background: var(--glass-strong); box-shadow: var(--glass-shadow);
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
}
.map-layers .on { color: var(--tint-text); background: var(--tint); }
.map-layers a:hover { color: var(--text); }
.lock { width: 0.75rem; height: 0.75rem; flex: none; }
.map-zoom {
  position: absolute; bottom: 0.7rem; left: 50%; transform: translateX(-50%);
  display: inline-flex; align-items: center; gap: 0.45rem; white-space: nowrap;
  padding: 0.5rem 1rem; border-radius: 999px; text-decoration: none; font-weight: 700; font-size: 0.9rem;
  color: var(--tint-text); background: var(--tint); box-shadow: 0 10px 24px -10px rgba(0, 0, 0, 0.45);
}
.map-zoom svg { width: 1.05rem; height: 1.05rem; }
.map-zoom .short { display: none; }
.map-zoom:hover { filter: brightness(1.06); }
.map-teaser figcaption { margin-top: 0.5rem; }
@media (max-width: 30rem) {
  /* Phones: a square close-up of the middle of the map (the place is centred), so the squares stay big
   * enough to read; the pin plus the two biggest places that are in view, and slimmer controls. */
  .map-canvas.closeup { aspect-ratio: 1 / 1; }
  .closeup .map-plane { inset: 0 auto; width: calc(100% * var(--cols) / var(--rows)); left: calc(50% - 50% * var(--cols) / var(--rows)); }
  .closeup img { -webkit-mask-image: radial-gradient(80% 80% at 50% 50%, #000 60%, transparent 100%); mask-image: radial-gradient(80% 80% at 50% 50%, #000 60%, transparent 100%); }
  svg.map-grid path { stroke-width: 1px; }
  .closeup .map-label-side { display: none; }
  .map-label:nth-of-type(n+3) { display: none; }
  .map-layers li:nth-child(n+4) { display: none; }
  .map-label { font-size: 0.72rem; }
  .map-pin b { font-size: 0.78rem; }
  .map-layers { top: 0.45rem; left: 0.45rem; right: 0.45rem; gap: 0.25rem; }
  .map-layers a, .map-layers span { font-size: 0.72rem; padding: 0.22rem 0.55rem; }
  .map-zoom { font-size: 0.8rem; padding: 0.4rem 0.8rem; bottom: 0.5rem; }
  .map-zoom .long { display: none; }
  .map-zoom .short { display: inline; }
}

/* Grade mix under the map */
.mix { max-width: 44rem; margin: 0 0 1rem; }
.mix-title { margin: 0; }
.mix .share-bar { margin: 0.5rem 0; }
.mix-key { list-style: none; display: flex; flex-wrap: wrap; gap: 0.3rem 1rem; padding: 0; margin: 0; font-variant-numeric: tabular-nums; color: var(--muted); font-size: 0.9rem; }
.mix-key li { display: inline-flex; align-items: center; gap: 0.35rem; }
.mix-key .chip { min-width: 1.6rem; height: 1.6rem; font-size: 0.7rem; }

/* "In the app" teaser cards: a skeleton of the feature over the copy */
.teasers { list-style: none; padding: 0; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(14.5rem, 1fr)); max-width: 56rem; }
.teaser h3 { display: flex; align-items: center; flex-wrap: wrap; gap: 0.4rem; margin: 0.9rem 0 0.35rem; }
.teaser p { color: var(--muted); font-size: 0.95rem; }
.tag {
  display: inline-flex; align-items: center; gap: 0.25rem; font-family: var(--font); font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.02em; padding: 0.1rem 0.5rem; border-radius: 999px;
  color: var(--tint); background: color-mix(in srgb, var(--tint) 12%, transparent);
}
.tag.plus { color: var(--text); background: color-mix(in srgb, var(--g-b) 45%, transparent); }
/* Phones: the teaser cards become a swipeable row */
@media (max-width: 36rem) {
  .teasers {
    grid-auto-flow: column; grid-template-columns: none; grid-auto-columns: 82%;
    overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
    margin: 0 -1rem; padding: 0.25rem 1rem 1rem; scroll-padding: 0 1rem;
  }
  .teasers::-webkit-scrollbar { display: none; }
  .teasers > li { scroll-snap-align: start; }
}
.tv {
  height: 6.5rem; border-radius: 12px; padding: 0.7rem; overflow: hidden; position: relative;
  background: color-mix(in srgb, var(--text) 4%, transparent); box-shadow: inset 0 0 0 1px var(--glass-line);
}
.tv-streets { display: grid; gap: 0.35rem; align-content: center; }
.tv-streets div { display: flex; align-items: center; gap: 0.5rem; }
.tv-streets .chip { min-width: 1.35rem; height: 1.2rem; font-size: 0.62rem; border-radius: 6px; }
.tv-streets i, .tv-report i { display: block; height: 0.55rem; border-radius: 999px; background: color-mix(in srgb, var(--text) 16%, transparent); filter: blur(1.5px); }
.tv-chart svg { width: 100%; height: 100%; overflow: visible; }
.tv-chart .axis { stroke: color-mix(in srgb, var(--text) 12%, transparent); stroke-width: 0.5; fill: none; vector-effect: non-scaling-stroke; }
.tv-chart .line { stroke: var(--tint); stroke-width: 3; fill: none; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; filter: blur(1.2px); }
.tv-report { display: grid; gap: 0.6rem; align-content: center; }
.tv-report div { display: grid; grid-template-columns: 1.6rem 1fr; gap: 0.3rem 0.6rem; align-items: center; }
.tv-report div::before { content: ""; grid-row: span 2; width: 1.6rem; height: 1.6rem; border-radius: 7px; background: color-mix(in srgb, var(--tint) 30%, transparent); }
.tv-report div i:last-child { width: 60%; opacity: 0.6; }
.tv-near { display: grid; place-items: center; }
.tv-near .ring, .tv-near .dot { position: absolute; left: 50%; top: 50%; border-radius: 50%; transform: translate(-50%, -50%); }
.tv-near .ring { width: 4.5rem; height: 4.5rem; background: color-mix(in srgb, var(--focus) 16%, transparent); }
.tv-near .dot { width: 1rem; height: 1rem; background: var(--focus); border: 3px solid var(--bg); box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3); }
.tv-near .chip { position: absolute; left: calc(50% + 1.6rem); top: calc(50% - 2.2rem); }
@media (prefers-reduced-motion: no-preference) {
  .tv-near .ring { animation: fmp-pulse 2.4s ease-out infinite; }
  @keyframes fmp-pulse { from { transform: translate(-50%, -50%) scale(0.4); opacity: 1; } to { transform: translate(-50%, -50%) scale(1.2); opacity: 0; } }
}

/* App call to action (place and county pages) */
.cta-card h2 { margin: 0 0 0.5rem; font-size: clamp(1.3rem, 1.5vw + 0.9rem, 1.6rem); }
.cta-card .cta { margin: 1rem 0 0.4rem; }
.cta-card { background: linear-gradient(135deg, color-mix(in srgb, var(--g-a) 18%, var(--glass)), var(--glass)); }

/* County ranking tools: type filter and "Show all" */
.rank-tools { margin: 0 0 0.8rem; }
.rank-tools[hidden], .rank-more[hidden], [data-top][hidden] { display: none; }
.seg {
  display: inline-flex; flex-wrap: nowrap; max-width: 100%; overflow-x: auto; scrollbar-width: none; gap: 0.25rem; padding: 0.25rem; border-radius: 999px;
  background: var(--glass); border: 1px solid var(--glass-edge); box-shadow: var(--glass-hi), var(--glass-shadow);
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
}
.seg::-webkit-scrollbar { display: none; }
.seg button {
  white-space: nowrap; flex: none; font: inherit; font-size: 0.92rem; font-weight: 650; border: 0; cursor: pointer; color: var(--muted);
  background: transparent; padding: 0.4rem 0.9rem; border-radius: 999px; min-height: 2.25rem;
}
.seg button span { font-weight: 500; font-size: 0.82rem; opacity: 0.8; margin-left: 0.15rem; font-variant-numeric: tabular-nums; }
.seg button:hover { color: var(--text); }
.seg button[aria-pressed="true"] { color: var(--tint-text); background: var(--tint); }
.rank-more { margin: 0.8rem 0; }
.rank tr[hidden] { display: none; }
.rank .left { text-align: left; }
[data-rank-note][hidden] { display: none; }
.anchor { display: block; scroll-margin-top: 5.5rem; }
/* Ranks: "#3 of 52 towns in Kent" under a place's name, and the numbers in Best towns cards */
.place-hero .rank-line { font-weight: 650; }
.rk { flex: none; min-width: 1.4rem; text-align: right; color: var(--muted); font-weight: 650; font-variant-numeric: tabular-nums; }
@media (max-width: 30rem) { .seg button { padding: 0.4rem 0.7rem; } }

/* Areas of a place: two columns even on phones (names only) */
.grid-list.compact { grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr)); }

/* Home: feature cards in threes, and quick links under the search */
.cards.three { grid-template-columns: 1fr; }
@media (min-width: 36rem) { .cards.three { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 56rem) { .cards.three { grid-template-columns: repeat(3, 1fr); } }
.card h3 .tag { margin-left: 0.3rem; vertical-align: 0.15em; }
.try { display: flex; flex-wrap: wrap; align-items: center; gap: 0.45rem; list-style: none; padding: 0; margin: -0.6rem 0 1.25rem; font-size: 0.92rem; }
.try li:first-child { color: var(--muted); margin-right: 0.15rem; }
.try a {
  display: inline-block; padding: 0.3rem 0.8rem; border-radius: 999px; text-decoration: none; font-weight: 650;
  color: var(--text); background: var(--glass); border: 1px solid var(--glass-edge); box-shadow: var(--glass-hi);
}
.try a:hover { color: var(--tint); }

/* Press and brand page (/press/) */
.press section { margin-top: 2.2rem; }
.press .press-facts { list-style: none; padding: 0; margin: 1rem 0 0; display: grid; gap: 0.5rem; max-width: 46rem; }
.press .press-facts li { display: grid; grid-template-columns: 7rem 1fr; gap: 1rem; }
.press .press-facts b { font-family: var(--font-display); }
.press .assets { list-style: none; padding: 0; margin: 1rem 0; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); }
.press .assets .card h3 { margin: 0.8rem 0 0.2rem; font-size: 1.05rem; }
.press .assets .card p { margin: 0; font-size: 0.95rem; }
.press .swatch-area { display: grid; place-items: center; min-height: 8rem; border-radius: var(--radius-sm); background: var(--element); padding: 1rem; }
.press .swatch-area.light { background: #ffffff; }
.press .swatch-area.dark { background: #0e110f; }
.press .swatch-area img { max-width: 100%; height: auto; }
.press .swatches { list-style: none; padding: 0; margin: 1rem 0; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); }
.press .swatches li { display: grid; gap: 0.15rem; }
.press .swatches span { display: block; height: 4rem; border-radius: var(--radius-sm); margin-bottom: 0.4rem; }
.press .swatches code { color: var(--muted); font-size: 0.9rem; }
.press .grade-row { list-style: none; padding: 0; margin: 0.5rem 0 1rem; display: flex; flex-wrap: wrap; gap: 0.4rem; }
.press .grade-row li { display: grid; place-items: center; min-width: 3rem; height: 2.4rem; border-radius: 10px; font-size: 1.05rem; }
.press .shots { list-style: none; padding: 0; margin: 1rem 0; display: flex; flex-wrap: wrap; gap: 1rem; }
.press .shots img { display: block; width: 10rem; height: auto; border-radius: 16px; box-shadow: var(--glass-shadow); }

/* What's new (/changelog/): one entry per batch of changes, newest first, on a timeline. Version tags (.tag.ver) mark
   new app versions and data releases; each item names its kind (New / Improved / Fixed / Removed / Data) and carries
   data-s (ios|web|site|data) so the filter can hide the others. */
.changelog .cl-now { list-style: none; padding: 0; margin: 1.5rem 0 1.25rem; display: grid; grid-template-columns: repeat(3, max-content); gap: 0.5rem 1.75rem; }
@media (max-width: 30rem) { .changelog .cl-now { grid-template-columns: repeat(3, 1fr); gap: 0.5rem 0.75rem; } }
.changelog .cl-now li { display: grid; gap: 0.1rem; }
.changelog .cl-now b { font-family: var(--font-display); font-size: 0.8rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.changelog .cl-now span { font-weight: 650; }
.changelog .cl-tools { margin: 0 0 0.5rem; }
/* The weekly digest sign-up (assets/digest-form.js) */
.cl-digest { display: grid; gap: 0.6rem 1.5rem; max-width: 50rem; margin: 0 0 1.75rem; padding: 1.2rem 1.3rem; }
.cl-digest h2 { margin: 0 0 0.3rem; font-size: 1.25rem; }
.cl-digest-copy p, .cl-digest-done p { margin: 0; color: var(--muted); }
.cl-digest-form { display: grid; grid-template-columns: 1fr auto; gap: 0.6rem; align-content: start; }
.cl-digest-form input[type="email"] {
  min-width: 0; font: inherit; padding: 0.6rem 0.8rem; border-radius: var(--radius-sm); border: 1px solid var(--border);
  background: var(--bg); color: var(--text);
}
.cl-digest-form input:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
.cl-digest-form .btn[disabled] { opacity: 0.6; }
.cl-digest-form .cf-turnstile, .cl-digest-form .form-error, .cl-digest-form p { grid-column: 1 / -1; margin: 0; }
.cl-digest-form .cf-turnstile:empty { display: none; }
.cl-digest-done { display: grid; gap: 0.5rem; justify-items: start; }
.cl-digest-form[hidden], .cl-digest-done[hidden], .cl-digest.is-done .cl-digest-copy { display: none; }
.cl-digest-done:focus { outline: none; }
@media (min-width: 52rem) { .cl-digest:not(.is-done) { grid-template-columns: 1fr 22rem; align-items: start; } }
.changelog .cl-month[hidden], .changelog .cl-entry[hidden], .changelog .cl-items li[hidden], .changelog .cl-more[hidden] { display: none; }
.changelog .cl-month h2 { margin-top: 2.25rem; }
.cl-entry { position: relative; display: grid; grid-template-columns: 1fr; gap: 0.35rem; padding: 0 0 1.25rem 1.6rem; max-width: 50rem; }
.cl-entry::before { content: ""; position: absolute; left: 0.3rem; top: 0.5rem; bottom: -0.5rem; width: 2px; background: var(--border); }
.cl-month .cl-entry:last-child::before { bottom: 1.25rem; }
.cl-entry::after {
  content: ""; position: absolute; left: 0; top: 0.3rem; width: 0.75rem; height: 0.75rem; border-radius: 999px;
  background: var(--bg); border: 2px solid var(--muted); box-sizing: border-box;
}
.cl-entry.is-major::after {
  left: -0.15rem; top: 0.15rem; width: 1.05rem; height: 1.05rem; background: var(--tint); border-color: var(--tint);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--tint) 18%, transparent);
}
.cl-date { margin: 0; font-weight: 650; color: var(--muted); font-size: 0.92rem; font-variant-numeric: tabular-nums; }
.cl-entry .card h3 { margin: 0.35rem 0 0.4rem; font-size: 1.3rem; }
.cl-tags { display: flex; flex-wrap: wrap; gap: 0.35rem; margin: 0; }
.cl-tags .tag { color: var(--muted); background: var(--element); }
.cl-tags .tag.ver { color: var(--tint-text); background: var(--tint); }
.cl-sum { color: var(--muted); margin: 0 0 0.6rem; }
.cl-items { list-style: none; padding: 0; margin: 0.5rem 0 0; display: grid; gap: 0.55rem; }
.cl-items li { display: grid; grid-template-columns: 5.6rem 1fr; gap: 0.6rem; align-items: baseline; line-height: 1.45; }
.cl-items li .tag { margin-left: 0.3rem; vertical-align: 0.1em; }
.cl-k { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.02em; color: var(--muted); text-transform: uppercase; }
.cl-k.new { color: var(--tint); }
.cl-k.fix { color: color-mix(in srgb, var(--g-cplus) 75%, var(--text)); }
.cl-k.gone { color: var(--muted); text-decoration: line-through; }
.cl-more { margin-top: 0.8rem; padding: 0; background: none; border: 0; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
.cl-more summary { cursor: pointer; font-weight: 650; color: var(--link); font-size: 0.95rem; }
.cl-more .cl-items { margin-top: 0.6rem; }
.changelog .cl-empty { color: var(--muted); }
.changelog .cl-foot { margin-top: 1.5rem; color: var(--muted); }
@media (min-width: 44rem) {
  .cl-entry { grid-template-columns: 4.5rem 1fr; gap: 1rem; padding-left: 1.9rem; }
  .cl-date { padding-top: 1.15rem; }
  .cl-entry::after { top: 1.3rem; }
  .cl-entry.is-major::after { top: 1.15rem; }
  .cl-entry::before { top: 1.5rem; }
}
@media (max-width: 30rem) {
  .cl-items li { grid-template-columns: 1fr; gap: 0.05rem; }
}

/* Loading intro (owner 2026-10-18, after petromedia.co.uk's): once at the start of each visit (sessionStorage), never
   between pages, never with reduced motion. The tile settles in, the A+ pin drops onto it, the wordmark rises and a
   green bar grows, then the panel slides away (about 1.5 s). The script and markup open the shared header block
   (index.html, copied everywhere by tools/site.py); it never blocks clicks and removes itself after 2.4 s. */
.intro { display: none; }
.intro-on .intro {
  position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; background: var(--bg);
  pointer-events: none; animation: sg-intro-out 0.6s cubic-bezier(0.7, 0, 0.2, 1) 1s both;
}
.intro-inner { display: grid; justify-items: center; gap: 0.9rem; }
.intro-mark { display: block; width: clamp(88px, 14vw, 120px); height: auto; overflow: visible;
  filter: drop-shadow(0 10px 22px rgba(11, 55, 30, 0.22)); animation: sg-intro-tile 0.5s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.intro-pin { transform-box: fill-box; transform-origin: 50% 100%; animation: sg-intro-pin 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 0.22s both; }
.intro-wm { font-family: var(--font-display); font-weight: 800; font-size: clamp(1.6rem, 4vw, 2.1rem); letter-spacing: -0.035em;
  color: var(--text); animation: sg-intro-rise 0.5s cubic-bezier(0.2, 0.7, 0.2, 1) 0.35s both; }
.intro-wm span { color: var(--tint); }
.intro-bar { width: 100%; height: 3px; border-radius: 2px; background: var(--tint); transform-origin: left;
  animation: sg-intro-bar 0.7s cubic-bezier(0.6, 0, 0.2, 1) 0.25s both; }
@keyframes sg-intro-tile { from { opacity: 0; transform: scale(0.82); } to { opacity: 1; transform: none; } }
@keyframes sg-intro-pin { from { opacity: 0; transform: translateY(-38%); } 40% { opacity: 1; } to { opacity: 1; transform: none; } }
@keyframes sg-intro-rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes sg-intro-bar { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes sg-intro-out { to { transform: translateY(-100%); } }
@media (prefers-reduced-motion: reduce) {
  .intro-on .intro { display: none; }
  .site-header .bar { transition: none; }
}

/* Contact form (/contact/, assets/contact-form.js; owner 2026-10-18) */
.contact .contact-form, .contact .contact-done { max-width: 40rem; padding: 1.4rem; margin-top: 1rem; }
.contact-form { display: grid; gap: 1rem; }
.contact-form .kinds { border: 0; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.contact-form .kinds legend { font-weight: 600; margin-bottom: 0.5rem; padding: 0; }
.contact-form .kinds label {
  display: inline-flex; align-items: center; gap: 0.45rem; padding: 0.45rem 0.85rem; border-radius: 999px; cursor: pointer;
  background: var(--element); border: 1px solid transparent; font-size: 0.95rem;
}
.contact-form .kinds label:has(input:checked) {
  color: var(--tint); font-weight: 600; background: color-mix(in srgb, var(--tint) 12%, transparent); border-color: var(--tint);
}
.contact-form .kinds input { accent-color: var(--tint); margin: 0; }
.contact-form .field { display: grid; gap: 0.35rem; }
.contact-form .field label { font-weight: 600; font-size: 0.95rem; }
.contact-form .opt { font-weight: 400; color: var(--muted); }
.contact-form .row { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); }
.contact-form input[type="text"], .contact-form input[type="email"], .contact-form textarea {
  font: inherit; color: var(--text); background: var(--glass-strong); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 0.7rem 0.85rem; width: 100%;
}
.contact-form textarea { resize: vertical; min-height: 8rem; }
.contact-form input:focus-visible, .contact-form textarea:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
.contact-form .btn { justify-self: start; }
.contact-form .btn[disabled] { opacity: 0.6; }
.form-error { margin: 0; padding: 0.6rem 0.8rem; border-radius: var(--radius-sm); color: #b42318; background: rgba(180, 35, 24, 0.08); }
@media (prefers-color-scheme: dark) { .form-error { color: #ff6b5e; background: rgba(255, 107, 94, 0.1); } }

/* How it works (/how-it-works/; owner 2026-10-18): steps, the weights bar, the levels, the national curve */
.how section { margin-top: 2.6rem; }
.how-steps { list-style: none; padding: 0; margin: 1.6rem 0 0; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); counter-reset: step; }
.how-steps li { position: relative; padding: 1.2rem 1.2rem 1.3rem; }
.how-steps h3 { margin: 0.7rem 0 0.3rem; font-size: 1.1rem; }
.how-steps p { margin: 0; color: var(--muted); font-size: 0.97rem; }
.how-num { position: absolute; top: 0.9rem; right: 1rem; font-family: var(--font-display); font-weight: 800; font-size: 1.6rem; color: color-mix(in srgb, var(--tint) 35%, transparent); }
.how-icon { width: 2.6rem; height: 2.6rem; color: var(--tint); }
.how-grade { display: inline-grid; place-items: center; width: 2.6rem; height: 2.6rem; border-radius: 11px; font-size: 1.05rem; }
.how-split { display: flex; height: 3.2rem; border-radius: 14px; overflow: hidden; margin: 1rem 0 1.2rem; box-shadow: var(--glass-shadow); }
.how-split span { display: grid; place-items: center; min-width: 0; padding: 0 0.3rem; color: #fff; font-weight: 700; font-size: 0.9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
:is(.how-split, .how-key) .w1 { background: #164f35; } :is(.how-split, .how-key) .w2 { background: #1f6f4a; }
:is(.how-split, .how-key) .w3 { background: #2f8a5f; } :is(.how-split, .how-key) .w4 { background: #45a273; }
:is(.how-split, .how-key) .w5 { background: #6bb88f; } :is(.how-split, .how-key) .w6 { background: #8fcaa8; color: #10301f; }
.how-key { list-style: none; padding: 0; margin: -0.4rem 0 1.2rem; display: flex; flex-wrap: wrap; gap: 0.4rem 1rem; font-size: 0.92rem; color: var(--muted); }
.how-key li { display: inline-flex; align-items: center; gap: 0.4rem; }
.how-key i { width: 0.8rem; height: 0.8rem; border-radius: 3px; display: inline-block; }
.how-measures { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.7rem; grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); }
.how-measures li { display: grid; gap: 0.2rem; padding: 0.9rem 1rem; border-radius: var(--radius-sm); background: var(--element); }
.how-measures b { font-family: var(--font-display); }
.how-measures span { color: var(--muted); font-size: 0.95rem; }
.how-levels { display: grid; gap: 0.6rem; margin: 1.2rem 0; max-width: 44rem; }
.how-levels .lvl { display: grid; gap: 0.15rem; padding: 0.85rem 1.1rem; border-radius: 14px; color: #fff; }
.how-levels .lvl b { font-family: var(--font-display); font-size: 1.1rem; }
.how-levels .lvl span { opacity: 0.88; font-size: 0.95rem; }
.how-levels .l1 { background: #164f35; } .how-levels .l2 { background: #1f6f4a; margin-left: 6%; }
.how-levels .l3 { background: #2f8a5f; margin-left: 12%; } .how-levels .l4 { background: #45a273; margin-left: 18%; }
.how-curve { display: grid; grid-template-columns: repeat(6, 1fr); gap: 0.6rem; align-items: end; height: 14rem; max-width: 40rem; margin: 1.2rem 0; }
.how-curve div { display: grid; grid-template-rows: 1fr auto auto; height: 100%; text-align: center; }
.how-curve i { display: block; align-self: end; border-radius: 10px 10px 4px 4px; min-height: 0.6rem; }
.how-curve b { font-family: var(--font-display); margin-top: 0.4rem; }
.how-curve span { color: var(--muted); font-size: 0.85rem; }
.how-trust h3 { margin-top: 0; }
@media (max-width: 30rem) { .how-split span { font-size: 0.72rem; } .how-levels .lvl { margin-left: 0 !important; } }
.contact-form > *, .contact-form .field, .contact-form .row > * { min-width: 0; }
.contact-form textarea, .contact-form input[type="text"], .contact-form input[type="email"] { max-width: 100%; }
.contact-form .kinds label { max-width: 100%; }

/* Insights (/insights/, pipeline export/insights.py; owner 2026-10-18) */
.insight-list { list-style: none; padding: 0; margin: 1.2rem 0 1.6rem; display: grid; gap: 0.55rem; max-width: 46rem; }
.insight-list li { display: grid; grid-template-columns: 2rem auto 1fr; align-items: center; gap: 0.8rem; padding: 0.7rem 1rem; }
.ins-rank { font-family: var(--font-display); font-weight: 800; font-size: 1.25rem; color: var(--muted); text-align: right; }
.ins-name { display: grid; gap: 0.1rem; font-weight: 600; }
.ins-name a { color: var(--text); }
.ins-name .muted { font-weight: 400; font-size: 0.92rem; }
.press-note { max-width: 46rem; padding: 1.2rem 1.3rem; margin-top: 1.6rem; }
.press-note h2 { margin-top: 0; font-size: 1.15rem; }
.insight-cards { list-style: none; padding: 0; margin: 1.4rem 0 2rem; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); }
.insight-cards .card { padding: 0; overflow: hidden; }
.insight-cards a { display: grid; gap: 0.35rem; color: var(--text); text-decoration: none; padding-bottom: 1rem; }
.insight-cards img { width: 100%; height: auto; display: block; margin-bottom: 0.4rem; }
.insight-cards b, .insight-cards span { padding: 0 1rem; }
.insight-cards b { font-family: var(--font-display); font-size: 1.08rem; }
.insight-cards span { font-size: 0.92rem; }
/* Turnstile's widget is at least 300 px wide: give it the room on small phones */
@media (max-width: 26rem) { .contact .contact-form { padding: 1rem 0.75rem; } .contact .wrap, .wrap.contact { padding-left: 0.75rem; padding-right: 0.75rem; } }
.contact-form .cf-turnstile { min-height: 65px; max-width: 100%; }

/* ---- Home page (owner 2026-10-18 redesign): hero with search and the app, numbers, why, gallery, how, plans,
   insights, download, FAQ ---- */
.home section { margin-top: 0; }
.home .h-why, .home .h-gallery, .home .h-how, .home .h-plans, .home .h-insights, .home .h-download, .home .h-faq { margin-top: 4.5rem; }
.h-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.h-head h2 { margin-bottom: 0.3rem; }
.h-more { font-weight: 700; text-decoration: none; }
.h-more::after { content: " →"; }
.phone { position: relative; border-radius: 2.4rem; padding: 0.5rem; background: #0e110f;
  box-shadow: 0 30px 60px -28px rgba(11, 55, 30, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.06) inset; }
.phone img { display: block; width: 100%; height: auto; border-radius: 1.95rem; }

/* Hero */
.h-hero { padding: 2.2rem 0 1rem; }
.h-hero-grid { display: grid; gap: 2.5rem; align-items: center; }
@media (min-width: 56rem) { .h-hero-grid { grid-template-columns: 1.05fr 1fr; gap: 3.5rem; } .h-hero { padding-top: 3.2rem; } }
.h-hero h1 { font-size: clamp(2.3rem, 6.2vw, 3.7rem); line-height: 1.04; letter-spacing: -0.035em; margin: 0.6rem 0 1rem; }
.h-hero .lede { font-size: 1.15rem; max-width: 34rem; }
.h-search { margin: 1.5rem 0 0; max-width: 34rem; }
.h-search .box { padding: 0.35rem 0.4rem 0.35rem 1rem; border-radius: 999px; box-shadow: var(--glass-hi), 0 18px 40px -20px rgba(11, 55, 30, 0.45); }
.h-search input { font-size: 1.08rem; padding: 0.75rem 0.4rem; }
.h-hero .try { margin: 0.9rem 0 1.4rem; }
.h-ticks { list-style: none; padding: 0; margin: 1.2rem 0 0; display: flex; flex-wrap: wrap; gap: 0.4rem 1.2rem; color: var(--muted); font-size: 0.95rem; }
.h-ticks li::before { content: "✓"; color: var(--tint); font-weight: 800; margin-right: 0.4rem; }
.h-hero-visual { position: relative; display: grid; place-items: center; min-height: 30rem; }
.h-hero-map { position: absolute; inset: 6% 0 6% 0; border-radius: 28px; overflow: hidden; opacity: 0.95;
  box-shadow: var(--glass-hi), 0 24px 60px -30px rgba(11, 55, 30, 0.45); }
.h-hero-map svg { display: block; width: 100%; height: 100%; object-fit: cover; }
.h-hero-phone { position: relative; width: min(16.5rem, 62%); transform: rotate(-3deg); }
.h-float { position: absolute; display: flex; align-items: center; gap: 0.65rem; padding: 0.6rem 0.85rem; border-radius: 16px;
  background: var(--glass-strong); border: 1px solid var(--glass-edge); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  box-shadow: var(--glass-hi), var(--glass-shadow); }
.h-float b { display: block; font-family: var(--font-display); font-size: 0.98rem; }
.h-float .d { display: block; color: var(--muted); font-size: 0.82rem; }
.h-float .grade { display: grid; place-items: center; width: 2.4rem; height: 2.4rem; border-radius: 10px; font-size: 1rem; flex: none; }
.h-float-a { left: 0; top: 18%; }
.h-float-b { right: 0; bottom: 16%; }
.h-dot { width: 0.9rem; height: 0.9rem; border-radius: 50%; background: var(--tint); box-shadow: 0 0 0 6px color-mix(in srgb, var(--tint) 22%, transparent); flex: none; margin: 0 0.3rem; }
@media (prefers-reduced-motion: no-preference) {
  .h-float-a { animation: h-bob 6s ease-in-out infinite; } .h-float-b { animation: h-bob 6s ease-in-out 3s infinite; }
  @keyframes h-bob { 50% { transform: translateY(-6px); } }
}

/* Numbers */
.h-stats { margin-top: 2.5rem; }
.h-stats ul { list-style: none; margin: 0; padding: 1.2rem; display: grid; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); gap: 1rem;
  border-radius: var(--radius); background: var(--glass); border: 1px solid var(--glass-edge); box-shadow: var(--glass-hi), var(--glass-shadow); }
.h-stats li { display: grid; text-align: center; }
.h-stats b { font-family: var(--font-display); font-weight: 800; font-size: clamp(1.7rem, 4vw, 2.3rem); color: var(--tint); letter-spacing: -0.02em; }
.h-stats span { color: var(--muted); font-size: 0.95rem; }

/* Why */
.h-why h2 { font-size: clamp(1.7rem, 4vw, 2.4rem); max-width: 40rem; }
.h-benefits { list-style: none; padding: 0; margin: 1.8rem 0 0; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); }
.h-benefits li { display: grid; grid-template-rows: 13rem auto; overflow: hidden; padding: 0; }
.h-benefits img { width: 100%; height: 13rem; object-fit: cover; object-position: top; border-bottom: 1px solid var(--glass-line); }
.h-benefits li > div:not(.v) { padding: 1rem 1.15rem 1.2rem; }
.h-benefits h3 { margin: 0 0 0.35rem; font-size: 1.12rem; }
.h-benefits p { margin: 0; color: var(--muted); font-size: 0.97rem; }

/* Gallery: swipe on phones, a scrolling row everywhere */
.h-shots { list-style: none; margin: 1.2rem calc(-1 * var(--gutter, 1rem)) 0; padding: 0.5rem var(--gutter, 1rem) 1.2rem; display: grid; grid-auto-flow: column;
  grid-auto-columns: minmax(11.5rem, 13.5rem); gap: 1.1rem; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: thin; }
.h-shots li { scroll-snap-align: start; display: grid; gap: 0.6rem; }
.h-shots span { font-weight: 600; font-size: 0.95rem; text-align: center; }

/* How */
.h-how-grid { display: grid; gap: 1.5rem; align-items: center; }
@media (min-width: 52rem) { .h-how-grid { grid-template-columns: 1fr 1.1fr; gap: 3rem; } }
.h-how-card { padding: 1.3rem; }
.h-how-card .how-split { margin-top: 0; }
.h-scale { list-style: none; padding: 0; margin: 0.4rem 0 0.8rem; display: grid; grid-template-columns: repeat(6, 1fr); gap: 0.35rem; }
.h-scale li { display: grid; place-items: center; height: 2.6rem; border-radius: 10px; font-size: 1.05rem; }

/* Plans */
.h-plans-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); margin-top: 1.2rem; }
.h-plans .card { padding: 1.3rem 1.4rem; }
.h-plans h3 { margin-top: 0; }
.h-plus { border-color: color-mix(in srgb, var(--tint) 45%, transparent); }
.h-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.55rem; }
.h-list li { padding-left: 1.6rem; position: relative; }
.h-list li::before { content: "✓"; position: absolute; left: 0; color: var(--tint); font-weight: 800; }

/* Download */
.h-agents { padding: 1.8rem; margin-top: 2rem; }
.h-agents h2 { margin-top: 0.4rem; font-size: clamp(1.4rem, 3vw, 1.9rem); }
.h-agents p { max-width: 46rem; }
.h-download { display: grid; gap: 1.5rem; align-items: center; padding: 1.8rem; }
@media (min-width: 46rem) { .h-download { grid-template-columns: 1fr auto; padding: 2.2rem 2.4rem; } }
.h-download h2 { margin-top: 0; font-size: clamp(1.6rem, 3.6vw, 2.2rem); }
.h-qr { display: none; margin: 0; text-align: center; }
.h-qr img { display: block; background: #fff; border-radius: 16px; padding: 0.6rem; margin: 0 auto 0.5rem; }
.h-qr figcaption { color: var(--muted); font-size: 0.9rem; }
@media (hover: hover) and (pointer: fine) and (min-width: 46rem) { .h-qr { display: block; } }

/* FAQ */
.h-faq { max-width: 46rem; }
.home .h-faq + * { margin-top: 0; }
@media (max-width: 30rem) {
  .h-hero-visual { min-height: 25rem; }
  .h-float { padding: 0.5rem 0.7rem; } .h-float .d { display: none; }
  .home .h-why, .home .h-gallery, .home .h-how, .home .h-plans, .home .h-insights, .home .h-download, .home .h-faq { margin-top: 3.2rem; }
}
.h-hero-map .hm-label { display: none; }
@media (max-width: 40rem) { .h-stats ul { grid-template-columns: repeat(2, 1fr); padding: 1rem 0.6rem; row-gap: 1.1rem; } }

/* Home "Why": small on-brand demos of each feature instead of screenshots (owner 2026-10-18). Real grades from the
   app's Winchester and Hampshire examples. */
.h-benefits li { grid-template-rows: auto auto; }
.v { position: relative; height: 13rem; overflow: hidden; border-bottom: 1px solid var(--glass-line);
  background: color-mix(in srgb, var(--tint) 7%, var(--element)); }
.v .chip { min-width: 2.2rem; height: 2.2rem; font-size: 0.92rem; border-radius: 9px; }
.v i { display: inline-grid; place-items: center; min-width: 1.9rem; height: 1.55rem; border-radius: 7px; font-style: normal; font-size: 0.78rem; font-weight: 800; }
.v-map svg { position: absolute; inset: 0; display: block; width: 100%; height: 100%; }
.v-card, .v-panel { position: absolute; background: var(--card, #fff); color: var(--text); border-radius: 14px; box-shadow: 0 14px 30px -14px rgba(11, 55, 30, 0.45);
  background: color-mix(in srgb, var(--bg) 94%, #fff); }
.v-card { left: 0.8rem; bottom: 0.8rem; display: flex; align-items: center; gap: 0.6rem; padding: 0.5rem 0.75rem 0.5rem 0.5rem; }
.v-card b, .v-row b { display: block; font-family: var(--font-display); font-size: 0.95rem; }
.v-card span span, .v-row span span { display: block; color: var(--muted); font-size: 0.78rem; }
.v-near { display: grid; align-content: center; justify-items: center; gap: 0.6rem; padding: 0.8rem; }
.v-loc { display: inline-flex; align-items: center; gap: 0.5rem; font-weight: 700; font-size: 0.85rem; color: var(--tint); }
.v-ping { width: 0.75rem; height: 0.75rem; border-radius: 50%; background: var(--tint); box-shadow: 0 0 0 5px color-mix(in srgb, var(--tint) 25%, transparent); }
.v-near .v-panel { position: static; width: 100%; padding: 0.75rem; display: grid; gap: 0.5rem; }
.v-row { display: flex; align-items: center; gap: 0.6rem; }
.v-sum { margin: 0; font-size: 0.85rem; line-height: 1.35; }
.v-pills { display: flex; flex-wrap: wrap; gap: 0.3rem; }
.v-pills span { display: inline-flex; align-items: center; gap: 0.3rem; padding: 0.15rem 0.45rem 0.15rem 0.2rem; border-radius: 999px; font-size: 0.75rem; font-weight: 600;
  background: var(--element); }
.v-pills i { min-width: 1.6rem; height: 1.3rem; font-size: 0.68rem; }
.v-compare { display: grid; place-items: center; padding: 0.7rem; }
.v-compare table { width: 100%; border-collapse: separate; border-spacing: 0 0.25rem; font-size: 0.85rem; }
.v-compare th { font-family: var(--font-display); font-size: 0.85rem; text-align: center; padding-bottom: 0.15rem; }
.v-compare td { padding: 0.12rem 0.3rem; } .v-compare td:not(:first-child) { text-align: center; }
.v-compare td:first-child { color: var(--muted); }
.v-rank { padding: 0.8rem; display: grid; align-content: start; gap: 0.6rem; }
.v-tabs { display: flex; gap: 0.35rem; }
.v-tabs span { padding: 0.28rem 0.7rem; border-radius: 999px; font-size: 0.78rem; font-weight: 600; background: var(--element); }
.v-tabs .on { color: var(--tint); background: color-mix(in srgb, var(--tint) 14%, transparent); box-shadow: inset 0 0 0 1px var(--tint); }
.v-rank ol { list-style: none; margin: 0; padding: 0.3rem; display: grid; gap: 0.15rem; border-radius: 14px; background: color-mix(in srgb, var(--bg) 94%, #fff); }
.v-rank li { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 0.6rem; padding: 0.3rem 0.4rem; font-size: 0.9rem; }
.v-rank li .chip { min-width: 1.9rem; height: 1.9rem; font-size: 0.82rem; }
.v-rank li span:last-child { color: var(--muted); font-size: 0.82rem; }
@media (prefers-color-scheme: dark) { .v-card, .v-panel, .v-rank ol { background: #1a1e1b; } }
@media (prefers-reduced-motion: no-preference) {
  .v-pin { transform-box: fill-box; transform-origin: 50% 100%; animation: v-drop 3.6s cubic-bezier(0.34, 1.56, 0.64, 1) infinite; }
  @keyframes v-drop { 0%, 8% { transform: translateY(-30%); opacity: 0; } 22%, 100% { transform: none; opacity: 1; } }
  .v-ping { animation: v-ping 2s ease-out infinite; }
  @keyframes v-ping { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--tint) 45%, transparent); } 100% { box-shadow: 0 0 0 12px transparent; } }
}

/* Home "Everything in the app": the feature grid */
.home .h-features { margin-top: 4.5rem; }
.h-feat { list-style: none; padding: 0; margin: 1.4rem 0 1.6rem; display: grid; gap: 0.8rem; grid-template-columns: repeat(auto-fit, minmax(14.5rem, 1fr)); }
.h-feat li { display: grid; grid-template-columns: 2.6rem 1fr; grid-template-rows: auto auto; column-gap: 0.85rem; align-items: center;
  padding: 0.9rem 1rem; border-radius: var(--radius-sm); background: var(--glass); border: 1px solid var(--glass-edge); }
.h-feat svg { grid-row: 1 / 3; width: 2.6rem; height: 2.6rem; padding: 0.55rem; border-radius: 12px; fill: none; stroke: var(--tint);
  stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; background: color-mix(in srgb, var(--tint) 12%, transparent); }
.h-feat b { font-family: var(--font-display); font-size: 1rem; }
.h-feat span { color: var(--muted); font-size: 0.9rem; }
.h-feat em { font-style: normal; font-size: 0.72rem; font-weight: 700; color: var(--tint); padding: 0.05rem 0.4rem; border-radius: 999px;
  background: color-mix(in srgb, var(--tint) 12%, transparent); margin-left: 0.25rem; }
@media (max-width: 30rem) { .home .h-features { margin-top: 3.2rem; } }
.h-benefits { grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); }
@media (min-width: 52rem) { .h-benefits { grid-template-columns: repeat(2, 1fr); gap: 1.2rem; } }
.v { height: 15rem; }
.v-compare th { padding: 0 0.4rem 0.2rem; }
.v-compare table { max-width: 24rem; }
.v-near .v-panel { max-width: 24rem; }
.v-rank { justify-items: stretch; } .v-rank ol, .v-tabs { max-width: 24rem; width: 100%; margin: 0 auto; }
.v-map .v-card { left: 1rem; bottom: 1rem; }
.v-near { padding: 1rem; }
.v-near .v-loc { line-height: 1; }

/* developers — the Grades API pages (/developers/, /developers/terms/; assets/developers.js; PLAN.md §16.4) */
.dev section { margin-top: 3.6rem; }
.dev section > h2:first-child { margin-top: 0; }
.dev-hero { display: grid; gap: 2rem; align-items: center; }
@media (min-width: 56rem) { .dev-hero { grid-template-columns: 1.1fr 1fr; gap: 3rem; } }
.dev-hero h1 { margin-bottom: 0.9rem; }
.dev-sample { padding: 1.2rem 1.25rem; max-width: 30rem; width: 100%; justify-self: center; }
.dev-sample .place-hero { margin-bottom: 1rem; }
.dev-sample .place-hero .chip { min-width: 3.4rem; height: 3.4rem; font-size: 1.4rem; border-radius: 14px; }
.dev-sample .place-hero b { display: block; font-family: var(--font-display); font-size: 1.15rem; line-height: 1.25; }
.dev-sample .measures { gap: 0.55rem; }
.dev-sample .measures li { grid-template-columns: minmax(8.5rem, 9.5rem) 1fr 2rem; gap: 0.6rem; font-size: 0.94rem; }
.dev-sample .measures .name { gap: 0.45rem; }
.dev-sample .measures .chip-sm { min-width: 1.75rem; height: 1.75rem; font-size: 0.78rem; border-radius: 7px; }
@media (max-width: 30rem) { .dev-sample .measures li { grid-template-columns: 1fr 2rem; } }
.dev-toc { display: flex; flex-wrap: wrap; gap: 0.45rem; list-style: none; padding: 0; margin: 2rem 0 0; font-size: 0.92rem; }
.dev-toc a {
  display: inline-block; padding: 0.35rem 0.85rem; border-radius: 999px; text-decoration: none; font-weight: 600;
  color: var(--text); background: var(--glass); border: 1px solid var(--glass-edge);
}
.dev-toc a:hover { color: var(--tint); }
.dev .cards { grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); }
.dev .figures { margin-top: 1.4rem; max-width: none; grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr)); }
.dev code, .dev-terms code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace; font-size: 0.88em;
  padding: 0.08em 0.35em; border-radius: 6px; background: color-mix(in srgb, var(--text) 7%, transparent);
  overflow-wrap: anywhere;
}
.dev-code {
  margin: 0.4rem 0 1rem; padding: 0.95rem 1.1rem; border-radius: var(--radius-sm); max-width: 50rem;
  background: color-mix(in srgb, var(--text) 5%, var(--glass-strong)); border: 1px solid var(--glass-line);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace; font-size: 0.84rem; line-height: 1.55;
  white-space: pre; overflow: auto; overflow-wrap: normal; tab-size: 2; -webkit-overflow-scrolling: touch;
}
@media (max-width: 30rem) { .dev-code { font-size: 0.78rem; padding: 0.8rem 0.85rem; } }
.dev-code code { padding: 0; background: none; font-size: inherit; overflow-wrap: normal; }
.dev-code.tall { max-height: 34rem; overflow-y: auto; }
.dev-plans { list-style: none; padding: 0; margin: 1.4rem 0 1rem; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); }
.dev-plans > li { display: grid; align-content: start; gap: 0.2rem; }
.dev-plans h3 { margin: 0 0 0.3rem; }
.dev-plans .price { font-family: var(--font-display); font-weight: 800; font-size: 2rem; letter-spacing: -0.02em; line-height: 1.1; }
.dev-plans .price small { font-family: var(--font); font-size: 0.95rem; font-weight: 600; color: var(--muted); letter-spacing: 0; }
.dev-plans .alt { color: var(--muted); font-size: 0.92rem; margin: 0 0 0.6rem; }
.dev-plans .calls { font-weight: 700; margin: 0 0 0.7rem; }
.dev-plans .h-list { font-size: 0.95rem; }
.dev-plans .best { border-color: color-mix(in srgb, var(--tint) 45%, transparent); }
.dev-ep { margin: 0 0 1rem; max-width: 50rem; }
.dev-ep h3 { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.3rem 0.55rem; margin: 0 0 0.5rem; font-family: var(--font); letter-spacing: 0; font-size: 1rem; }
.dev-ep h3 code { font-size: 0.95rem; background: none; padding: 0; }
.dev-method {
  font-size: 0.72rem; font-weight: 800; letter-spacing: 0.06em; padding: 0.15rem 0.5rem; border-radius: 6px;
  color: var(--tint); background: color-mix(in srgb, var(--tint) 13%, transparent);
}
.dev-ep .dev-tag { font-size: 0.78rem; font-weight: 700; color: var(--muted); }
.dev-ep p { margin-bottom: 0.6rem; }
.dev-params { margin: 0.6rem 0 0; display: grid; grid-template-columns: minmax(6rem, max-content) 1fr; gap: 0.35rem 1rem; font-size: 0.95rem; }
.dev-params dt { font-weight: 700; }
.dev-params dd { margin: 0; color: var(--muted); }
@media (max-width: 30rem) { .dev-params { grid-template-columns: 1fr; gap: 0 0; } .dev-params dd { margin-bottom: 0.5rem; } }
.dev-table { width: 100%; border-collapse: collapse; font-size: 0.94rem; }
.dev-table th, .dev-table td { text-align: left; vertical-align: top; padding: 0.55rem 0.8rem; border-bottom: 1px solid var(--glass-line); }
.dev-table thead th { font-size: 0.78rem; color: var(--muted); font-weight: 700; letter-spacing: 0.02em; }
.dev-table tbody tr:last-child td { border-bottom: 0; }
.dev-table td:first-child { white-space: nowrap; font-variant-numeric: tabular-nums; font-weight: 700; }
.dev .table-wrap { max-width: 50rem; overflow-x: visible; }
.dev-table code { white-space: nowrap; overflow-wrap: normal; }
/* Phones: each row becomes a small block — the status and code on one line, what it means under them */
@media (max-width: 30rem) {
  .dev-table, .dev-table tbody { display: block; }
  .dev-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .dev-table tr { display: grid; grid-template-columns: auto 1fr; gap: 0.15rem 0.6rem; padding: 0.6rem 0.85rem; border-bottom: 1px solid var(--glass-line); }
  .dev-table tbody tr:last-child { border-bottom: 0; }
  .dev-table th, .dev-table td { padding: 0; border: 0; }
  .dev-table td:last-child { grid-column: 1 / -1; color: var(--muted); }
}
.dev .legend { margin-top: 0.6rem; }

/* developers — the account panel (assets/developers.js) */
.dev-account { max-width: 46rem; padding: 1.4rem; margin-top: 1.2rem; }
.dev-account h3 { margin: 0 0 0.3rem; }
.dev-account .contact-form { gap: 0.9rem; }
.dev-account .contact-form .btn, .dev-actions .btn { justify-self: start; }
.dev-status:empty { padding: 0; margin: 0; background: none; }
.dev-status { margin: 0 0 1rem; padding: 0.6rem 0.85rem; border-radius: var(--radius-sm); background: color-mix(in srgb, var(--tint) 11%, transparent); }
.dev-tick { display: flex; align-items: flex-start; gap: 0.6rem; font-size: 0.95rem; cursor: pointer; }
.dev-tick input { accent-color: var(--tint); width: 1.15rem; height: 1.15rem; margin: 0.2rem 0 0; flex: none; }
.dev-tick[hidden] { display: none; }
.dev-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem 1.1rem; }
.dev-linkbtn {
  font: inherit; font-weight: 600; font-size: 0.95rem; color: var(--link); background: none; border: 0; padding: 0.3rem 0;
  cursor: pointer; text-decoration: underline; text-underline-offset: 0.18em; text-decoration-thickness: 1px;
}
.dev-linkbtn:hover { text-decoration-thickness: 2px; }
.dev-linkbtn[disabled] { opacity: 0.5; cursor: not-allowed; }
.dev-who { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.3rem 1rem; margin: 0 0 1.2rem; color: var(--muted); font-size: 0.95rem; }
.dev-who strong { color: var(--text); overflow-wrap: anywhere; }
.dev-dash > div + div { margin-top: 1.8rem; padding-top: 1.4rem; border-top: 1px solid var(--glass-line); }
.dev-plan-name { font-family: var(--font-display); font-weight: 800; font-size: 1.5rem; letter-spacing: -0.02em; margin: 0 0 0.2rem; }
.dev-meter { height: 12px; border-radius: 999px; overflow: hidden; margin: 0.9rem 0 0.45rem; background: color-mix(in srgb, var(--text) 8%, transparent); }
.dev-meter i { display: block; height: 100%; width: 0; border-radius: 999px; background: var(--tint); transition: width 0.4s ease; }
.dev-meter i.near { background: var(--g-cplus); }
.dev-meter i.full { background: var(--g-c); }
@media (prefers-reduced-motion: reduce) { .dev-meter i { transition: none; } }
.dev-keys { list-style: none; padding: 0.2rem 0; margin: 0.8rem 0 1rem; border-radius: var(--radius-sm); background: var(--element); }
.dev-keys li { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; padding: 0.7rem 0.95rem; }
.dev-keys li + li { border-top: 1px solid var(--glass-line); }
.dev-keys li > span { display: grid; gap: 0.1rem; min-width: 0; }
.dev-keys li > span > span { color: var(--muted); font-size: 0.86rem; }
.dev-keys .empty { color: var(--muted); }
.dev-keys .btn { flex: none; }
.dev-keyform { display: flex; flex-wrap: wrap; align-items: end; gap: 0.7rem; }
.dev-keyform .field { flex: 1 1 14rem; }
.dev-newkey {
  margin: 0.8rem 0 1rem; padding: 1rem 1.1rem; border-radius: var(--radius-sm);
  border: 2px solid var(--tint); background: color-mix(in srgb, var(--tint) 8%, transparent);
}
.dev-newkey > p { margin: 0 0 0.5rem; }
.dev-newkey code.dev-keyvalue { display: block; padding: 0.6rem 0.75rem; margin: 0 0 0.7rem; font-size: 0.92rem; background: var(--glass-strong); user-select: all; }
.dev-seg { display: inline-flex; padding: 0.2rem; border-radius: 999px; background: var(--element); border: 0; margin: 0.6rem 0 1rem; }
.dev-seg legend { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.dev-seg label { position: relative; padding: 0.4rem 0.95rem; border-radius: 999px; font-weight: 600; font-size: 0.92rem; cursor: pointer; color: var(--muted); }
.dev-seg input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.dev-seg label:has(input:checked) { background: var(--glass-strong); color: var(--text); box-shadow: var(--glass-shadow); }
.dev-seg label:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 1px; }
.dev-upgrades { list-style: none; padding: 0; margin: 0 0 0.8rem; display: grid; gap: 0.8rem; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); }
.dev-upgrades li { display: grid; gap: 0.15rem; align-content: start; padding: 0.95rem 1rem; border-radius: var(--radius-sm); background: var(--element); }
.dev-upgrades b { font-family: var(--font-display); font-size: 1.05rem; }
.dev-upgrades .p { font-family: var(--font-display); font-weight: 800; font-size: 1.35rem; color: var(--text); }
.dev-upgrades .p small { font-family: var(--font); font-weight: 600; font-size: 0.88rem; color: var(--muted); }
.dev-upgrades span { color: var(--muted); font-size: 0.9rem; }
.dev-upgrades .btn { margin-top: 0.6rem; justify-self: start; }
.dev-nojs { margin: 0; }
.dev-account + p { margin-top: 0.9rem; }
.dev-account #dev-load-error { margin-bottom: 0.8rem; }
.dev-account [hidden] { display: none !important; }
@media (max-width: 26rem) { .dev-account { padding: 1.1rem 0.95rem; } }

/* For estate agents (/agents/): an example listing with a live badge, and the badge maker (assets/agents.js). */
.ag-listing { margin: 0; padding: 0; overflow: hidden; max-width: 24rem; width: 100%; justify-self: center; }
.ag-photo svg { display: block; width: 100%; height: 9.5rem; }
.ag-listing-body { padding: 1rem 1.15rem 1.15rem; }
.ag-listing-body p { margin: 0 0 0.2rem; }
.ag-price { font-family: var(--font-display); font-weight: 800; font-size: 1.45rem; letter-spacing: -0.02em; }
.ag-title { font-weight: 600; }
.ag-badge { display: block; margin-top: 0.9rem; max-width: 100%; height: auto; }
.ag-listing figcaption { padding: 0.75rem 1.15rem; border-top: 1px solid var(--border); }
.tag.soon { color: var(--muted); background: var(--element); }
.ag-builder { padding: 1.25rem; max-width: 46rem; display: grid; gap: 1rem; }
.ag-form { display: flex; flex-wrap: wrap; align-items: end; gap: 1rem 1.25rem; }
.ag-form .field { flex: 1 1 12rem; }
.ag-form .kinds { flex-direction: row; }
.ag-result { display: grid; gap: 0.6rem; justify-items: start; }
.ag-result[hidden] { display: none; }
.ag-result .dev-code { width: 100%; margin: 0; white-space: pre-wrap; word-break: break-all; }
.ag-preview { padding: 1rem; border-radius: var(--radius-sm); background: #f6f7f4; }
.ag-preview.is-dark { background: #0e110f; }
.ag-preview img { display: block; max-width: 100%; height: auto; }
.ag-plans { grid-template-columns: repeat(auto-fit, minmax(16rem, 22rem)); }
