/* =========================================================================
   CompareInUK design system
   Calm, editorial, Apple-like: generous space, one accent, large photography.
   ========================================================================= */

:root {
  --ink: #141a2e;
  --ink-2: #343c55;
  --ink-3: #5b6480;
  --line: #e2e7f1;
  --line-2: #cbd4e5;
  --bg: #ffffff;
  --bg-2: #f4f7fd;
  --bg-3: #e7eefb;
  --green: #0a2463;
  --green-2: #12308a;
  --green-3: #1e56d1;
  --green-tint: #e8effd;
  --brass: #e63946;
  --brass-2: #b8192c;
  --brass-tint: #fdeced;
  --danger: #b42318;
  --danger-tint: #fdecea;
  --ok: #13795b;
  --ok-tint: #e2f5ec;
  --warn: #9a6400;
  --warn-tint: #fff4dc;
  /* The call-to-action colour: British post-box red, used on the buttons that start a quote. */
  --cta: linear-gradient(135deg, #e23446 0%, #d02238 55%, #b8192c 100%);
  --cta-hover: linear-gradient(135deg, #e63946 0%, #c81d35 60%, #a3142a 100%);
  --hero-wash: radial-gradient(60% 70% at 85% 10%, rgba(30, 86, 209, .14), transparent 70%), radial-gradient(45% 55% at 5% 90%, rgba(230, 57, 70, .10), transparent 70%);

  /* The brand typeface is each device's own interface font: nothing to download, no layout shift, fast first paint. */
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI Variable Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  /* Headlines: an upright book serif, like a well-set street sign or a printed trade card. Installed on every device. */
  --display: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;

  --r-sm: 10px;
  --r: 16px;
  --r-lg: 24px;
  --r-xl: 32px;
  --shadow-1: 0 1px 2px rgba(20, 33, 61, .06), 0 1px 1px rgba(20, 33, 61, .04);
  --shadow-2: 0 10px 30px -12px rgba(20, 33, 61, .18), 0 2px 6px rgba(20, 33, 61, .05);
  --shadow-3: 0 30px 60px -20px rgba(20, 33, 61, .28), 0 8px 20px -8px rgba(20, 33, 61, .1);
  --ease: cubic-bezier(.2, .7, .2, 1);
  --ease-spring: cubic-bezier(.34, 1.4, .64, 1);
  --header: 68px;
  --wrap: 1200px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header) + 16px); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/1.55 var(--font);
  letter-spacing: -0.006em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--green-2); text-decoration: none; }
a:hover { color: var(--green-3); }
p { margin: 0 0 1em; }
h1, h2, h3, h4 { margin: 0 0 .5em; line-height: 1.12; letter-spacing: -0.025em; font-weight: 650; color: var(--ink); }
h1 { font-size: clamp(2.3rem, 5.4vw, 4.4rem); letter-spacing: -0.035em; font-weight: 680; }
/* Page and section titles in the serif; small headings and the app stay in the interface font for clarity. */
h1, h2 { font-family: var(--display); font-weight: 600; letter-spacing: -0.012em; line-height: 1.08; }
.app h1, .app h2, .panel h2, .kpi strong, .toon-story h3 { font-family: var(--font); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.75rem, 3.4vw, 2.75rem); }
h3 { font-size: 1.2rem; letter-spacing: -0.015em; }
.serif { font-family: var(--display); font-weight: 400; font-style: italic; letter-spacing: -0.01em; }
:focus-visible { outline: 3px solid var(--brass); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--brass-tint); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.skip { position: absolute; left: 16px; top: -60px; z-index: 100; background: var(--ink); color: #fff; padding: 10px 14px; border-radius: var(--r-sm); }
.skip:focus { top: 12px; color: #fff; }

.wrap { width: min(var(--wrap), 100% - 32px); margin-inline: auto; }
.wrap-narrow { width: min(760px, 100% - 32px); margin-inline: auto; }
.section { padding-block: clamp(56px, 8vw, 112px); }
.section-sm { padding-block: clamp(36px, 5vw, 64px); }
.section-tint { background: var(--bg-2); }
.section-dark { background: var(--green); color: #eceef3; }
.section-dark h2, .section-dark h3 { color: #fff; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 12px; font-size: .92rem; font-weight: 600; color: var(--brass-2); }
.section-dark .eyebrow { color: #d9b878; }
.lede { font-size: clamp(1.08rem, 1.6vw, 1.3rem); color: var(--ink-2); line-height: 1.55; max-width: 60ch; }
.muted { color: var(--ink-3); }
.small { font-size: .875rem; }
.fine { font-size: .8rem; color: var(--ink-3); }
.center { text-align: center; }
.stack > * + * { margin-top: 16px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.between { justify-content: space-between; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 36px; flex-wrap: wrap; }
.section-head h2 { margin: 0; max-width: 20ch; }
.section-head p { margin: 10px 0 0; max-width: 56ch; color: var(--ink-3); }
.link-arrow { font-weight: 600; display: inline-flex; gap: 6px; align-items: center; }
.link-arrow { text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 4px; }
.link-arrow:hover { text-decoration-color: var(--brass); }

/* ---------------------------------------------------------------- buttons */
.btn {
  --btn-bg: var(--green); --btn-fg: #fff; --btn-bd: transparent;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 22px; border-radius: 999px;
  border: 1px solid var(--btn-bd); background: var(--btn-bg); color: var(--btn-fg);
  font: 600 .97rem/1 var(--font); letter-spacing: -0.01em; cursor: pointer; white-space: nowrap;
  transition: transform .2s var(--ease), background .2s var(--ease), box-shadow .2s var(--ease), color .2s;
}
.btn:hover { color: var(--btn-fg); background: var(--green-2); box-shadow: var(--shadow-2); transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(.98); }
.btn-brass { --btn-bg: var(--brass-2); }
.btn-brass:hover { background: var(--brass-2); }
.btn-light { --btn-bg: #fff; --btn-fg: var(--ink); --btn-bd: var(--line-2); }
.btn-light:hover { background: var(--bg-2); }
.btn-ghost { --btn-bg: transparent; --btn-fg: var(--ink); --btn-bd: var(--line-2); }
.btn-ghost:hover { background: var(--bg-2); box-shadow: none; }
.btn-danger { --btn-bg: var(--danger); }
.btn-danger:hover { background: #8f1c13; }
.btn-sm { min-height: 38px; padding: 0 16px; font-size: .88rem; }
.btn-lg { min-height: 56px; padding: 0 30px; font-size: 1.05rem; }
.btn-block { width: 100%; }
.btn-cta { background: var(--cta); box-shadow: 0 10px 24px -10px rgba(230, 57, 70, .55); }
.btn-cta:hover { background: var(--cta-hover); box-shadow: 0 14px 30px -10px rgba(200, 29, 53, .6); }
.btn[disabled] { opacity: .5; pointer-events: none; }
.linkish { background: none; border: 0; padding: 0; color: var(--green-2); font: inherit; font-weight: 600; cursor: pointer; }

/* ---------------------------------------------------------------- header */
.site-header {
  position: sticky; top: 0; z-index: 50; height: var(--header);
  background: rgba(255, 255, 255, .78);
  -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid transparent; transition: border-color .3s, background .3s;
}
.site-header.scrolled { border-bottom-color: var(--line); background: rgba(255, 255, 255, .9); }
.header-inner { height: 100%; display: flex; align-items: center; gap: 28px; }
.logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.12rem; letter-spacing: -0.03em; color: var(--ink); }
.logo:hover { color: var(--ink); }
.logo svg { flex: none; }
.nav { display: flex; align-items: center; gap: 4px; flex: 1; }
.nav > a, .nav-drop > button { padding: 8px 12px; border-radius: 999px; color: var(--ink-2); font-size: .94rem; font-weight: 500; background: none; border: 0; font-family: inherit; cursor: pointer; }
.nav > a:hover, .nav-drop > button:hover, .nav > a[aria-current] { color: var(--ink); background: var(--bg-2); }
.nav-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.nav-drop { position: relative; }
/* A small chevron says "this opens", and turns when it does. */
.nav-drop > button { display: inline-flex; align-items: center; gap: 6px; }
.nav-drop > button::after { content: ""; width: 7px; height: 7px; border-right: 1.8px solid currentColor; border-bottom: 1.8px solid currentColor; transform: translateY(-2px) rotate(45deg); transition: transform .25s var(--ease); opacity: .7; }
.nav-drop.open > button::after { transform: translateY(1px) rotate(-135deg); }
@media (max-width: 920px) { .nav-drop > button { width: 100%; justify-content: space-between; } }
/* Desktop: the services panel is centred under the header, so even when hidden it never pushes the page wider than the screen. */
@media (min-width: 921px) {
  .header-inner { position: relative; }
  .nav-drop { position: static; }
  .nav .mega { left: 0; right: 0; margin-inline: auto; width: min(1040px, 100%); top: calc(100% - 4px); max-height: calc(100vh - var(--header) - 24px); overflow-y: auto; overscroll-behavior: contain; }
}
.mega {
  position: absolute; top: calc(100% + 10px); left: -12px; width: min(880px, 92vw);
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-3);
  padding: 22px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px 20px;
  opacity: 0; visibility: hidden; transform: translateY(-6px); transition: opacity .2s var(--ease), transform .2s var(--ease), visibility .2s;
}
.nav-drop:hover .mega, .nav-drop:focus-within .mega, .nav-drop.open .mega { opacity: 1; visibility: visible; transform: none; }
/* Groups flow down three columns like a printed index, so a short group never leaves a hole beside a long one. */
.mega { display: block; }
.mega-groups { columns: 3; column-gap: 28px; }
.nav-drop:hover .mega, .nav-drop:focus-within .mega, .nav-drop.open .mega { display: block; }
.mega-groups > div { break-inside: avoid; margin-bottom: 14px; }
.mega > .mega-foot { display: flex; justify-content: space-between; margin-bottom: 0; }
.mega h4 { font-size: .86rem; color: var(--green); margin: 4px 0 4px; font-weight: 700; letter-spacing: 0; }
/* Plain links only: the "Get free quotes" button in the menu keeps its own button style. */
.mega a:not(.btn) { display: block; padding: 7px 8px; margin-inline: -8px; border-radius: 8px; color: var(--ink); font-size: .93rem; }
.mega a:not(.btn):hover { background: var(--bg-2); color: var(--green); }
.mega .mega-foot { grid-column: 1 / -1; border-top: 1px solid var(--line); margin-top: 12px; padding-top: 16px; align-items: center; }
.mega .mega-foot .link-arrow { display: inline-flex; margin: 0; padding: 0; }
.mega .mega-foot .btn { color: #fff; }
.badge-dot { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--brass); color: #fff; font-size: .7rem; font-weight: 700; }
.burger { display: none; margin-left: auto; width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--line-2); background: #fff; cursor: pointer; }
.burger span, .burger span::before, .burger span::after { display: block; width: 18px; height: 2px; background: var(--ink); margin: auto; position: relative; transition: transform .3s var(--ease); content: ""; }
.burger span::before { position: absolute; top: -6px; }
.burger span::after { position: absolute; top: 6px; }
.menu-open .burger span { background: transparent; }
.menu-open .burger span::before { transform: translateY(6px) rotate(45deg); }
.menu-open .burger span::after { transform: translateY(-6px) rotate(-45deg); }
.user-menu { position: relative; }
.user-menu summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 12px 0 4px; border-radius: 999px; border: 1px solid var(--line-2); font-size: .9rem; font-weight: 600; }
.user-menu summary::-webkit-details-marker { display: none; }
.avatar { width: 32px; height: 32px; border-radius: 50%; display: inline-grid; place-items: center; background: var(--green); color: #fff; font-size: .78rem; font-weight: 700; }
.user-menu .menu { position: absolute; right: 0; top: calc(100% + 8px); width: 240px; background: #fff; border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow-3); padding: 8px; }
.user-menu .menu a, .user-menu .menu button { display: flex; width: 100%; justify-content: space-between; padding: 10px 12px; border-radius: 10px; color: var(--ink); background: none; border: 0; font: inherit; font-size: .93rem; text-align: left; cursor: pointer; }
.user-menu .menu a:hover, .user-menu .menu button:hover { background: var(--bg-2); }
.user-menu hr { border: 0; border-top: 1px solid var(--line); margin: 6px 0; }

/* ---------------------------------------------------------------- hero */
.hero { position: relative; overflow-x: clip; overflow-y: visible; background: var(--hero-wash); padding-top: clamp(40px, 6vw, 72px); padding-bottom: clamp(56px, 8vw, 104px); }
.hero-grid { display: grid; grid-template-columns: 1.02fr 1fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.hero h1 .serif { color: var(--green-3); }
.hero .lede { margin: 22px 0 32px; }
.hero-visual { position: relative; perspective: 1400px; }
.hero-photo {
  position: relative; border-radius: var(--r-xl); overflow: hidden; aspect-ratio: 4 / 4.4;
  box-shadow: var(--shadow-3); transform: rotateY(-6deg) rotateX(2deg); transform-style: preserve-3d;
  transition: transform .8s var(--ease);
}
.hero-photo img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.06); }
.hero-visual:hover .hero-photo { transform: rotateY(-2deg) rotateX(1deg); }
.float-card {
  position: absolute; background: rgba(255, 255, 255, .86); -webkit-backdrop-filter: blur(16px) saturate(180%); backdrop-filter: blur(16px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, .7); border-radius: var(--r); box-shadow: var(--shadow-3); padding: 14px 16px; font-size: .88rem;
  animation: float 7s ease-in-out infinite;
}
.float-card strong { display: block; font-size: .95rem; }
.float-a { left: -28px; bottom: 54px; }
.float-b { right: -18px; top: 38px; animation-delay: -3.5s; }
.float-card .row { gap: 10px; flex-wrap: nowrap; }
.chip-icon { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--green-tint); color: var(--green-2); flex: none; }
.chip-icon.brass { background: var(--brass-tint); color: var(--brass-2); }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
.hero-glow { position: absolute; inset: -20% -10% auto auto; width: 60vw; height: 60vw; border-radius: 50%; background: radial-gradient(closest-side, rgba(230, 57, 70, .10), transparent); pointer-events: none; z-index: -1; }

/* ---------------------------------------------------------------- search */
.search {
  display: grid; grid-template-columns: 1.15fr 1fr auto; gap: 6px; padding: 6px;
  background: #fff; border: 1px solid var(--line-2); border-radius: 22px; box-shadow: var(--shadow-2);
  max-width: 640px; color: var(--ink); /* a white card: never inherit white text from a dark hero */
}
.search .field-inline { position: relative; display: flex; flex-direction: column; justify-content: center; padding: 8px 16px; border-radius: 16px; transition: background .2s; }
.search .field-inline:focus-within { background: var(--bg-2); }
.search label { font-size: .78rem; font-weight: 600; color: var(--ink-3); }
/* The field itself is the box: the text box inside it has no border of its own, even when focused. */
.search .field-inline input, .search .field-inline select { border: 0; border-radius: 0; background: transparent; min-height: 0; padding: 2px 0; font: 500 1rem var(--font); color: var(--ink); width: 100%; outline: none; box-shadow: none; appearance: none; }
.search .field-inline input:focus, .search .field-inline select:focus { box-shadow: none; border: 0; }
.search .field-inline input::placeholder { color: var(--ink-3); opacity: 1; }
.search .field-inline:focus-within { box-shadow: inset 0 0 0 2px var(--green-3); }
.search .divider { border-left: 1px solid var(--line); }
.field-msg { display: block; margin-top: 2px; font-size: .8rem; font-weight: 600; color: var(--danger); }
.search .field-inline.is-invalid { box-shadow: inset 0 0 0 2px var(--danger); background: var(--danger-tint); }
.search .field-inline.is-invalid label { color: var(--danger); }
/* Service and town pages: the quote box sits in the hero, beside the headline on wide screens and straight under it on phones. */
.hero-quote { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 380px); gap: clamp(24px, 4vw, 56px); align-items: end; }
.quote-start { background: #fff; color: var(--ink); border-radius: var(--r-lg); padding: 24px; box-shadow: var(--shadow-3); }
.quote-start .quote-start-title { font: 650 1.25rem/1.25 var(--font); letter-spacing: -0.015em; margin: 0 0 4px; color: var(--ink); }
.quote-start .small { margin: 0 0 16px; }
.quote-start .field { margin-bottom: 14px; }
.quote-start .field input { font-size: 1.05rem; min-height: 52px; }
.quote-start .btn { min-height: 52px; font-size: 1.02rem; }
.quote-start .hint { display: block; margin-top: 6px; }
.quote-start .field.is-invalid input { border-color: var(--danger); box-shadow: 0 0 0 3px var(--danger-tint); }
.quote-start .field.is-invalid .hint { color: var(--danger); font-weight: 600; }
.hero-quote-link { display: inline-block; margin-top: 8px; color: #fff; font-weight: 600; text-decoration: underline; text-underline-offset: 4px; }
.hero-quote-link:hover { color: #fff; opacity: .85; }
@media (max-width: 920px) {
  .hero-quote { grid-template-columns: 1fr; align-items: stretch; }
  .quote-start { padding: 20px; }
  /* Phones: less sky above the headline so the quote box is reached with little or no scrolling. */
  .page-hero.photo:has(.hero-quote) { padding-block: 28px 32px; }
  .hero-quote .lede { font-size: 1rem; margin-bottom: 4px; }
}
/* Postcodes are typed in capitals; the "e.g." example keeps normal case. */
.postcode-input { text-transform: uppercase; }
.postcode-input::placeholder { text-transform: none; }
/* Placeholders never run under the edge: they end in an ellipsis on narrow fields. */
input::placeholder, textarea::placeholder { text-overflow: ellipsis; }
.search .btn { height: 100%; min-height: 54px; border-radius: 16px; }
.search-hints { margin-top: 18px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: .88rem; color: var(--ink-3); }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--ink-2); font-size: .86rem; font-weight: 500; background: #fff; transition: all .2s var(--ease); }
.pill:hover { border-color: var(--ink); color: var(--ink); }
.suggest { position: absolute; z-index: 60; left: 0; right: 0; top: calc(100% + 6px); min-width: 260px; background: #fff; color: var(--ink); text-align: left; text-shadow: none; border: 1px solid var(--line-2); border-radius: 12px; box-shadow: 0 18px 40px -16px rgba(20, 33, 61, .35); padding: 6px; list-style: none; margin: 0; max-height: 320px; overflow: auto; }
.suggest li { padding: 10px 12px; min-height: 44px; align-items: center; border-radius: 8px; cursor: pointer; display: flex; justify-content: space-between; gap: 10px; font-size: .93rem; }
.suggest li[aria-selected="true"], .suggest li:hover { background: var(--green-tint); color: var(--green); }
.suggest .type { color: var(--ink-3); font-size: .78rem; flex: none; }
.suggest li.none { color: var(--ink-3); cursor: default; }
.suggest li.none:hover { background: none; color: var(--ink-3); }
.pick-filter { width: 100%; max-width: 420px; margin: 4px 0 14px; }

/* ---------------------------------------------------------------- trust strip */
.trust { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; padding-block: 28px; border-block: 1px solid var(--line); }
.trust > div { display: flex; gap: 12px; align-items: flex-start; min-width: 0; }
.trust > div > div { min-width: 0; }
.trust strong { display: block; font-size: .98rem; }
.trust > div > div > span { display: block; color: var(--ink-3); font-size: .88rem; }

/* ---------------------------------------------------------------- cards */
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 24px; }
.card-tint { background: var(--bg-2); border-color: transparent; }
.card h3 { margin-bottom: 6px; }

.service-card { position: relative; display: block; border-radius: var(--r-lg); overflow: hidden; background: var(--bg-3); color: #fff; aspect-ratio: 4 / 5; isolation: isolate; box-shadow: var(--shadow-1); transition: transform .5s var(--ease), box-shadow .5s var(--ease); }
.service-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 1.1s var(--ease); z-index: -2; }
.service-card::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(10, 16, 30, 0) 38%, rgba(10, 16, 30, .82) 100%); }
.service-card .body { position: absolute; inset: auto 0 0 0; padding: 20px; }
.service-card h3 { color: #fff; font-size: 1.22rem; margin: 0 0 4px; }
.service-card p { margin: 0; font-size: .88rem; color: rgba(255, 255, 255, .82); line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.service-card .go { position: absolute; top: 16px; right: 16px; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .9); color: var(--ink); transform: scale(.8); opacity: 0; transition: all .35s var(--ease-spring); }
.service-card:hover { color: #fff; transform: translateY(-4px); box-shadow: var(--shadow-3); }
.service-card:hover img { transform: scale(1.06); }
.service-card:hover .go { transform: scale(1); opacity: 1; }
.service-card.wide { aspect-ratio: auto; grid-column: span 2; min-height: 100%; }

.service-tile { display: flex; gap: 14px; align-items: center; padding: 12px; border-radius: var(--r); border: 1px solid var(--line); background: #fff; color: var(--ink); transition: all .25s var(--ease); }
.service-tile img { width: 64px; height: 64px; border-radius: 12px; object-fit: cover; flex: none; }
.service-tile strong { display: block; font-size: .98rem; }
.service-tile span { font-size: .82rem; color: var(--ink-3); }
.service-tile:hover { border-color: var(--line-2); box-shadow: var(--shadow-2); transform: translateY(-2px); color: var(--ink); }

.provider-card { display: flex; flex-direction: column; gap: 14px; padding: 22px; border-radius: var(--r-lg); border: 1px solid var(--line); background: #fff; color: var(--ink); transition: all .3s var(--ease); height: 100%; }
.provider-card:hover { box-shadow: var(--shadow-2); transform: translateY(-3px); color: var(--ink); border-color: var(--line-2); }
.provider-card .top { display: flex; gap: 14px; align-items: center; }
.monogram { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; font-weight: 700; font-size: 1.05rem; color: #fff; background: hsl(var(--hue, 150) 32% 30%); flex: none; letter-spacing: -0.02em; }
.monogram.lg { width: 84px; height: 84px; border-radius: 22px; font-size: 1.7rem; }
.provider-card h3 { margin: 0; font-size: 1.05rem; }
.provider-card p { margin: 0; color: var(--ink-2); font-size: .93rem; }
.provider-card .meta { display: flex; flex-wrap: wrap; gap: 8px 14px; font-size: .84rem; color: var(--ink-3); margin-top: auto; }
.tags { display: flex; gap: 6px; flex-wrap: wrap; }
.tag { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px; font-size: .74rem; font-weight: 650; letter-spacing: .01em; background: var(--bg-2); color: var(--ink-2); }
.tag-green { background: var(--green-tint); color: var(--green-2); }
.tag-brass { background: var(--brass-tint); color: var(--brass-2); }
.tag-ok { background: var(--ok-tint); color: var(--ok); }
.tag-warn { background: var(--warn-tint); color: var(--warn); }
.tag-danger { background: var(--danger-tint); color: var(--danger); }
.stars { color: var(--brass); letter-spacing: 1px; }

/* place cards */
.place-card { position: relative; display: block; border-radius: var(--r-lg); overflow: hidden; aspect-ratio: 3 / 4; color: #fff; isolation: isolate; }
.place-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform 1.2s var(--ease); }
.place-card::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, transparent 45%, rgba(10, 16, 30, .78)); }
.place-card .body { position: absolute; left: 20px; right: 20px; bottom: 18px; }
.place-card h3 { color: #fff; margin: 0; font-size: 1.35rem; }
.place-card span { font-size: .86rem; opacity: .85; }
.place-card:hover { color: #fff; }
.place-card:hover img { transform: scale(1.05); }
.link-cloud { display: flex; flex-wrap: wrap; gap: 8px; }
.link-cols { columns: 4 200px; column-gap: 28px; }
.link-cols a { display: block; padding: 5px 0; color: var(--ink-2); font-size: .94rem; break-inside: avoid; }
.link-cols a:hover { color: var(--green-2); }

/* steps */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; counter-reset: step; }
.step { position: relative; padding: 28px; border-radius: var(--r-lg); background: #fff; border: 1px solid var(--line); }
.step::before { counter-increment: step; content: counter(step, decimal-leading-zero); display: block; font: italic 400 2.4rem/1 var(--display); color: var(--brass); margin-bottom: 18px; }
.section-dark .step { background: rgba(255, 255, 255, .05); border-color: rgba(255, 255, 255, .1); }
.section-dark .step p { color: rgba(236, 238, 245, .78); }

/* split feature */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 88px); align-items: center; }
.split-photo { border-radius: var(--r-xl); overflow: hidden; aspect-ratio: 5 / 4; box-shadow: var(--shadow-3); }
.split-photo img { width: 100%; height: 100%; object-fit: cover; }
.checklist { list-style: none; padding: 0; margin: 0 0 28px; display: grid; gap: 12px; }
.checklist li { display: flex; gap: 12px; align-items: flex-start; }
.checklist li::before { content: ""; flex: none; width: 22px; height: 22px; margin-top: 2px; border-radius: 50%; background: var(--green-tint) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231d4d3f' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E") center / 13px no-repeat; }
.section-dark .checklist li::before { background-color: rgba(255, 255, 255, .12); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23d9b878' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E"); }

/* stat counters */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.stat strong { display: block; font-size: clamp(2rem, 4vw, 3rem); letter-spacing: -0.04em; font-weight: 680; line-height: 1; }
.stat span { color: var(--ink-3); font-size: .92rem; }
.section-dark .stat span { color: rgba(236, 238, 245, .7); }

/* page hero (inner pages) */
.page-hero { position: relative; padding-block: clamp(36px, 5vw, 64px) clamp(32px, 4vw, 48px); }
.page-hero.photo { color: #fff; padding-block: clamp(80px, 12vw, 160px) clamp(40px, 6vw, 72px); isolation: isolate; overflow-x: clip; overflow-y: visible; z-index: 3; }
.page-hero.photo > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.page-hero.photo::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(10, 16, 30, .82) 0%, rgba(10, 16, 30, .55) 45%, rgba(10, 16, 30, .1) 100%); }
.page-hero.photo h1, .page-hero.photo .lede { color: #fff; }
.page-hero.photo .lede { color: rgba(255, 255, 255, .88); }
.page-hero.photo .crumbs a, .page-hero.photo .crumbs { color: rgba(255, 255, 255, .8); }
.page-hero h1 { font-size: clamp(2.1rem, 4.6vw, 3.6rem); max-width: 18ch; }
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; margin: 0 0 18px; font-size: .84rem; color: var(--ink-3); }
.crumbs li:not(:last-child)::after { content: "/"; margin-left: 6px; opacity: .5; }
.crumbs a { color: var(--ink-3); }
.crumbs a:hover { color: var(--ink); }

/* content layout */
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: clamp(28px, 4vw, 56px); align-items: start; }
.sticky { position: sticky; top: calc(var(--header) + 20px); }
.prose { font-size: 1.05rem; color: var(--ink-2); }
.prose h2 { font-size: 1.6rem; margin-top: 1.6em; color: var(--ink); }
.prose h3 { margin-top: 1.4em; }
.prose p, .prose li { line-height: 1.7; }
.prose ul { padding-left: 1.2em; }
.prose a:not(.btn) { text-decoration: underline; text-underline-offset: .18em; }
.price-box { padding: 22px; border-radius: var(--r-lg); background: var(--brass-tint); color: var(--ink); }
.price-box h3 { font-size: 1rem; }

/* faq */
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; padding: 20px 0; display: flex; justify-content: space-between; gap: 24px; font-weight: 600; font-size: 1.04rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-weight: 300; font-size: 1.6rem; line-height: 1; transition: transform .3s var(--ease); color: var(--ink-3); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: -4px 0 20px; color: var(--ink-2); max-width: 70ch; }

/* ---------------------------------------------------------------- forms */
.form { display: grid; gap: 18px; }
.form-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; }
.field { display: grid; gap: 7px; align-content: start; }
.field > label, .label { font-size: .88rem; font-weight: 600; color: var(--ink); }
.field .hint { font-size: .8rem; color: var(--ink-3); }
input:not([type]), input[type=text], input[type=email], input[type=tel], input[type=password], input[type=number], input[type=date], input[type=url], input[type=search], input[type=datetime-local], input[type=time], input[type=month], input[type=file], select, textarea {
  width: 100%; min-height: 48px; padding: 11px 14px; border-radius: 12px; border: 1px solid var(--line-2); background: #fff;
  font: 400 1rem var(--font); color: var(--ink); transition: border-color .2s, box-shadow .2s;
}
textarea { min-height: 140px; resize: vertical; line-height: 1.5; }
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235d6b66' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; background-size: 18px; padding-right: 40px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--green-3); box-shadow: 0 0 0 4px rgba(52, 73, 122, .15); }
input[type=checkbox], input[type=radio] { width: 20px; height: 20px; accent-color: var(--green-2); flex: none; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .93rem; }
.error, .field-validation-error { color: var(--danger); font-size: .84rem; }
.input-validation-error { border-color: var(--danger) !important; }
.validation-summary-errors { background: var(--danger-tint); color: var(--danger); padding: 12px 16px; border-radius: 12px; font-size: .92rem; }
.validation-summary-errors ul { margin: 0; padding-left: 18px; }
.validation-summary-valid { display: none; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.choice-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; }
.choice label { display: flex; flex-direction: column; gap: 8px; padding: 10px; border-radius: 14px; border: 1.5px solid var(--line); cursor: pointer; font-size: .88rem; font-weight: 600; transition: all .2s var(--ease); height: 100%; }
.choice img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 9px; }
.choice input:checked + label { border-color: var(--green-2); box-shadow: 0 0 0 3px rgba(31, 49, 87, .15); background: var(--green-tint); }
.choice input:focus-visible + label { outline: 3px solid var(--brass); outline-offset: 2px; }
/* Phones: a compact two-column list (small picture beside the name) instead of one long column of large cards. */
@media (max-width: 640px) {
  .choice-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .choice label { flex-direction: row; align-items: center; gap: 8px; padding: 6px 8px 6px 6px; min-height: 56px; font-size: .82rem; line-height: 1.2; }
  .choice img { width: 44px; height: 44px; flex: none; aspect-ratio: 1; border-radius: 8px; }
}
.dropzone { display: grid; place-items: center; gap: 6px; padding: 28px; border: 1.5px dashed var(--line-2); border-radius: var(--r); text-align: center; color: var(--ink-3); cursor: pointer; transition: all .2s; }
.dropzone:hover, .dropzone.drag { border-color: var(--green-3); background: var(--green-tint); }
.thumbs { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.thumbs img { width: 84px; height: 84px; object-fit: cover; border-radius: 12px; }

/* charts (server-rendered SVG; see Services/Charts.cs) */
.viz { margin: 0; --viz-surface: #fcfcfb; --viz-text: #0b0b0b; --viz-text-2: #52514e; }
.viz-title { font-weight: 650; font-size: 1rem; margin-bottom: 10px; color: var(--viz-text); }
.viz-plot { position: relative; }
.viz-plot svg { width: 100%; height: auto; display: block; overflow: visible; }
.viz-axis { font: 500 11px var(--font); fill: var(--viz-text-2); }
.viz-legend { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 16px; padding: 0; margin: 0 0 10px; font-size: .82rem; color: var(--viz-text-2); }
.viz-legend li { display: inline-flex; align-items: center; gap: 6px; }
.viz-legend span { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.viz-tip { position: absolute; z-index: 5; pointer-events: none; min-width: 150px; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-3); padding: 10px 12px; font-size: .8rem; color: var(--viz-text); transform: translate(-50%, calc(-100% - 12px)); }
.viz-tip strong { display: block; margin-bottom: 4px; }
.viz-tip .row { display: flex; justify-content: space-between; gap: 14px; flex-wrap: nowrap; }
.viz-tip .key { display: inline-flex; align-items: center; gap: 6px; color: var(--viz-text-2); }
.viz-tip .key i { width: 8px; height: 8px; border-radius: 2px; display: inline-block; }
.viz-tip b { font-variant-numeric: tabular-nums; }
.viz-hit { cursor: crosshair; }
.viz-table { margin-top: 10px; font-size: .84rem; }
.viz-table summary { cursor: pointer; color: var(--ink-3); font-weight: 600; }
.viz-hbars { display: grid; gap: 8px; }
.viz-hbar { display: grid; grid-template-columns: minmax(90px, 30%) 1fr auto; gap: 12px; align-items: center; font-size: .88rem; }
.viz-hbar-label { color: var(--viz-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.viz-hbar-track { height: 14px; background: transparent; position: relative; }
.viz-hbar-track span { display: block; height: 100%; border-radius: 0 4px 4px 0; position: relative; }
.viz-hbar-value { font-variant-numeric: tabular-nums; color: var(--viz-text); font-weight: 600; text-align: right; }
.viz-note { display: block; font-weight: 400; color: var(--viz-text-2); font-size: .74rem; }
.viz-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.kpi .delta { font-size: .76rem; font-weight: 650; margin-left: 6px; }
.kpi .delta.up { color: #2d5b8a; }
.kpi .delta.down { color: #b42318; }
@media (max-width: 900px) { .viz-grid { grid-template-columns: 1fr; } .viz-hbar { grid-template-columns: 1fr auto; } .viz-hbar-label { grid-column: 1 / -1; } }

/* postcode district picker */
.district-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(138px, 1fr)); gap: 8px; }
.district { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0 10px; align-items: center; align-content: center; min-height: 52px; padding: 7px 12px; border: 1.5px solid var(--line-2); border-radius: 10px; cursor: pointer; transition: border-color .15s, background .15s; background: #fff; }
.district:hover { border-color: var(--green-3); }
.district input { grid-row: span 2; }
.district .d-code { font-weight: 700; font-size: 1rem; letter-spacing: .01em; font-variant-numeric: lining-nums tabular-nums; }
.district .d-meta { grid-column: 2; font-size: .76rem; line-height: 1.25; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.district .d-demand { position: absolute; top: 6px; right: 8px; font-size: .75rem; font-weight: 700; color: var(--brass-2); }
.district:has(input:checked) { border-color: var(--green-2); background: var(--green-tint); }
.district:has(input:checked) .d-meta { color: var(--ink-2); }
.district:has(input:focus-visible) { outline: 3px solid var(--brass); outline-offset: 2px; }
.district input:focus-visible { outline: none; }
.district[hidden] { display: none; }

/* The picker as one box: what it is for, what is ticked, a finder, then the districts by distance. */
.district-box { border: 1px solid var(--line-2); border-radius: 14px; background: #fff; overflow: hidden; }
.district-head { padding: 16px 18px; background: var(--bg-2); border-bottom: 1px solid var(--line); }
.district-head h3 { margin: 0 0 2px; font-size: 1.02rem; }
.district-head p { margin: 0; font-size: .86rem; color: var(--ink-2); max-width: 60ch; }
.district-tally { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; padding: 12px 18px; border-bottom: 1px solid var(--line); font-size: .9rem; }
.district-tally span { color: var(--ink-3); font-variant-numeric: lining-nums; }
.district-tally .linkish { margin-left: auto; font-size: .86rem; }
.district-tools { padding: 12px 18px; border-bottom: 1px solid var(--line); }
.district-status { margin: 0; padding: 12px 18px; font-size: .86rem; color: var(--ink-3); }
.district-foot { padding: 12px 18px; border-top: 1px solid var(--line); }
.district-foot:has(> [hidden]) { display: none; }
.band { border-top: 1px solid var(--line); }
.band > summary { list-style: none; display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 10px 18px; cursor: pointer; font-weight: 650; font-size: .96rem; }
.band > summary::-webkit-details-marker { display: none; }
.band > summary::before { content: ""; flex: none; width: 18px; height: 18px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2333403c' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 6l6 6-6 6'/%3E%3C/svg%3E") center / contain no-repeat; transition: transform .2s var(--ease); }
.band[open] > summary::before { transform: rotate(90deg); }
.band > summary:hover { background: var(--bg-2); }
.band-count { margin-left: auto; font-weight: 500; font-size: .84rem; color: var(--ink-3); font-variant-numeric: lining-nums tabular-nums; }
.band-count.has { color: var(--green-2); font-weight: 650; }
.band-body { display: grid; gap: 10px; padding: 2px 18px 18px; }
.band-all { align-items: center; font-size: .88rem; font-weight: 600; color: var(--ink-2); width: fit-content; cursor: pointer; }
.band[hidden] { display: none; }
.band-place { font-weight: 500; color: var(--ink-3); margin-left: 6px; }
.area-label { display: block; font-size: .88rem; font-weight: 600; margin-bottom: 7px; }
.area-hint { margin: -4px 0 8px; font-size: .84rem; color: var(--ink-3); }
.area-find { width: 100%; margin-bottom: 8px; }
.area-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); align-content: start; gap: 2px 8px; max-height: 280px; overflow-y: auto; padding: 6px; border: 1px solid var(--line); border-radius: 10px; overscroll-behavior: contain; }
.area-opt { display: flex; align-items: center; gap: 8px; min-height: 40px; padding: 4px 8px; border-radius: 8px; cursor: pointer; font-size: .9rem; }
.area-opt:hover { background: var(--bg-2); }
.area-opt:has(input:checked) { background: var(--bg-2); font-weight: 600; }
.area-opt[hidden] { display: none; }
.area-opt input { flex: none; margin: 0; }
.area-code { flex: none; min-width: 2.2em; font-weight: 700; }
.area-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.area-n { flex: none; font-size: .78rem; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.area-list .district-status { grid-column: 1 / -1; padding: 8px; }
.area-show { margin-top: 10px; }
.area-opt:has(input:disabled) { cursor: default; color: var(--ink-3); }
.area-more { margin: 4px 0 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.area-more h3 { margin: 0 0 8px; font-size: 1rem; }
.area-more .district-bands:not(:has(.band)) { display: none; }
.area-more .district-bands { margin-top: 12px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.area-more .district-bands .band:first-child { border-top: 0; }
.district-bands:empty { display: none; }

/* Services a business offers: the same tick boxes as the postcodes, under a heading for each kind of work. */
.service-pick { margin: 0; padding: 0; border: 0; min-width: 0; display: grid; gap: 14px; }
.service-pick > legend { padding: 0; margin-bottom: 4px; font-size: .88rem; font-weight: 600; color: var(--ink); }
.service-pick > .hint { margin: 0; font-size: .8rem; color: var(--ink-3); }
.service-group h3 { margin: 0 0 8px; font-size: .8rem; font-weight: 650; color: var(--ink-3); letter-spacing: 0; }
.service-grid { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.district .d-name { grid-row: span 2; font-weight: 600; font-size: .92rem; line-height: 1.25; }
input.postcode { text-transform: uppercase; font-weight: 650; letter-spacing: .05em; font-variant-numeric: lining-nums; }
input.postcode::placeholder { text-transform: none; font-weight: 400; letter-spacing: 0; }
.field-short { max-width: 260px; }

/* ---------------------------------------------------------------- cartoons
   The six scenes in Views/Shared/_Cartoon.cshtml. Each moves a little (a drip, a wave, a lamp) so the page feels
   alive; the movement is small, slow and switched off for anyone who asks for reduced motion. */
.toon { display: block; width: 100%; height: auto; max-width: 420px; margin-inline: auto; overflow: visible; }
.toon text { font-family: var(--font); }
.toon-bob, .toon-float { animation: toon-bob 3.8s ease-in-out infinite; }
.toon-drip { animation: toon-drip 1.9s ease-in infinite; }
.toon-glow, .toon-twinkle, .toon-pop, .toon-ping { transform-box: fill-box; transform-origin: center; }
.toon-glow { animation: toon-glow 3.2s ease-in-out infinite; }
.toon-twinkle { animation: toon-twinkle 2.4s ease-in-out infinite; }
.toon-pop { animation: toon-pop 3.8s ease-in-out infinite; }
.toon-ping { animation: toon-ping 2s ease-out infinite; }
.toon-wave { transform-box: fill-box; transform-origin: 0% 100%; animation: toon-wave 1.7s ease-in-out infinite; }
.toon-wave-l { transform-origin: 100% 100%; animation-name: toon-wave-l; }
.toon-tick { stroke-dasharray: 16; animation: toon-tick 4.5s ease-in-out infinite; }
.toon-late { animation-delay: -.9s; }
.toon-later { animation-delay: -1.8s; }
.toon-tick.toon-late { animation-delay: .5s; }
.toon-tick.toon-later { animation-delay: 1s; }
@keyframes toon-bob { 50% { transform: translateY(-5px); } }
@keyframes toon-drip { 0% { transform: translateY(0); opacity: 0; } 15% { opacity: 1; } 85% { transform: translateY(13px); opacity: 1; } 100% { transform: translateY(14px); opacity: 0; } }
@keyframes toon-glow { 50% { opacity: .8; transform: scale(1.18); } }
@keyframes toon-twinkle { 0%, 100% { transform: scale(.55); opacity: .45; } 50% { transform: scale(1.1); opacity: 1; } }
@keyframes toon-pop { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.14); } }
@keyframes toon-ping { 0% { opacity: 0; transform: scale(.7); } 35% { opacity: 1; } 100% { opacity: 0; transform: scale(1.3); } }
@keyframes toon-wave { 50% { transform: rotate(-13deg); } }
@keyframes toon-wave-l { 50% { transform: rotate(13deg); } }
@keyframes toon-tick { 0%, 8% { stroke-dashoffset: 16; } 22%, 100% { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) { .toon * { animation: none !important; } }

/* A row of three scenes that tell a story, each with a line under it. */
.toon-story { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; margin: 0; padding: 0; list-style: none; counter-reset: toon; }
.toon-story li { counter-increment: toon; text-align: center; }
.toon-story h3 { margin: 14px 0 6px; font-size: 1.15rem; }
.toon-story h3::before { content: counter(toon) ". "; color: var(--brass-2); }
.toon-story p { margin: 0 auto; max-width: 34ch; font-size: .95rem; color: var(--ink-2); }
.section-dark .toon-story p { color: rgba(236, 238, 245, .82); }
.section-dark .toon-story h3 { color: #fff; }
.section-dark .toon-story h3::before { color: #e3cf9f; }
@media (max-width: 760px) {
  .toon-story { grid-template-columns: 1fr; gap: 36px; }
  .toon-story .toon { max-width: 320px; }
}
.toon-story-rows { row-gap: 48px; }
.toon-story.wrap { margin-inline: auto; }
.empty .toon { max-width: 240px; margin-bottom: 8px; }
.join-intro { display: grid; grid-template-columns: minmax(0, 1fr) 250px; gap: 32px; align-items: center; }
.join-toon .toon { max-width: 250px; }
@media (max-width: 860px) {
  .join-intro { grid-template-columns: 1fr; gap: 12px; }
  .join-toon { order: -1; }
  .join-toon .toon { max-width: 200px; margin-inline: 0; }
}

/* A heading that introduces a block of cards or steps, smaller than a section title. */
.section-sub { font-size: 1.35rem; letter-spacing: -0.015em; margin-top: 0; margin-bottom: 20px; }
.section-sub.center { text-align: center; }
/* A heading that is an h2 for the outline but sits in a small card. */
.h3 { font-size: 1.2rem; letter-spacing: -0.015em; }
.related { margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--line); }
.related ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 22px; }
.related a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; }

/* ---------------------------------------------------------------- growth plan (admin) */
.growth-target { margin-bottom: 20px; }
.growth-figures { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px 40px; }
.growth-figures > div { display: grid; gap: 2px; }
.growth-label { font-size: .82rem; font-weight: 500; color: var(--ink-3); }
.growth-figures strong { font-size: clamp(2rem, 4vw, 2.7rem); line-height: 1.1; letter-spacing: -0.03em; font-weight: 680; font-variant-numeric: lining-nums tabular-nums; }
.meter { height: 12px; margin: 18px 0; border-radius: 6px; background: var(--bg-3); overflow: hidden; }
.meter span { display: block; height: 100%; min-width: 2px; border-radius: 6px; background: var(--green-2); }
.growth-form { display: flex; flex-wrap: wrap; gap: 14px 20px; align-items: end; padding-top: 16px; border-top: 1px solid var(--line); }
.growth-form .field { width: 180px; }
.growth-form .check { align-items: center; flex: 1 1 280px; min-height: 48px; }
.growth-actions { list-style: none; margin: 0; padding: 0; counter-reset: act; }
.growth-actions li { counter-increment: act; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 6px 16px; align-items: center; padding: 16px 0; border-top: 1px solid var(--line); }
.growth-actions li:first-child { border-top: 0; padding-top: 4px; }
.growth-actions li::before { content: counter(act); width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: var(--green-tint); color: var(--green-2); font-weight: 700; font-size: .88rem; }
.growth-actions p { margin: 2px 0 6px; font-size: .9rem; color: var(--ink-2); }
@media (max-width: 640px) {
  .growth-actions li { grid-template-columns: auto minmax(0, 1fr); }
  .growth-actions li > form, .growth-actions li > a { grid-column: 2; justify-self: start; }
  .growth-form .field { width: 100%; }
}

/* ---------------------------------------------------------------- business sign-up
   A paper form, not a card: a heading rail on the left names each part, the questions sit on the right,
   and a hairline separates one part from the next. */
.join-wrap { width: min(1000px, 100% - 32px); margin-inline: auto; }
.join-head { background: var(--bg-2); border-bottom: 1px solid var(--line); padding-block: clamp(28px, 5vw, 56px) clamp(24px, 4vw, 40px); }
.join-head h1 { font-size: clamp(1.9rem, 4.2vw, 2.9rem); margin: 0 0 .3em; }
.join-lede { margin: 0; max-width: 56ch; font-size: 1.06rem; color: var(--ink-2); }
.join-steps { list-style: none; counter-reset: join; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 32px; margin: clamp(22px, 3vw, 32px) 0 0; padding: 0; }
.join-steps li { counter-increment: join; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0 12px; align-content: start; padding-top: 14px; border-top: 2px solid var(--green-2); }
.join-steps li::before { content: counter(join); grid-row: span 2; font-size: 1.7rem; font-weight: 700; line-height: 1; color: var(--green-2); font-variant-numeric: lining-nums; }
.join-steps b { font-size: .96rem; font-weight: 650; line-height: 1.3; }
.join-steps span { font-size: .85rem; line-height: 1.4; color: var(--ink-3); }
.join-form { padding-bottom: clamp(48px, 7vw, 88px); }
.join-form > .validation-summary-errors { margin-top: 24px; }
.join-section { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 20px 56px; padding-block: 36px; border-bottom: 1px solid var(--line); }
.join-rail { align-self: start; position: sticky; top: calc(var(--header) + 20px); }
.join-rail h2 { margin: 0 0 6px; font-size: 1.3rem; letter-spacing: -0.015em; line-height: 1.2; }
.join-rail p { margin: 0; max-width: 34ch; font-size: .9rem; line-height: 1.5; color: var(--ink-3); }
.join-fields { display: grid; gap: 18px; min-width: 0; }
.join-finish { border-bottom: 0; }
.join-finish .btn { justify-self: start; }
.join-finish p { margin: 0; }
@media (max-width: 860px) {
  .join-section { grid-template-columns: 1fr; gap: 16px; padding-block: 28px; }
  .join-rail { position: static; }
  .join-rail p { max-width: 60ch; }
  .join-finish .join-rail { display: none; }
}
@media (max-width: 640px) {
  .join-steps { grid-template-columns: 1fr; gap: 12px; }
  .join-steps li { padding-top: 12px; border-top-width: 1px; border-top-color: var(--line-2); }
  .join-steps li:first-child { border-top: 0; padding-top: 0; }
  .field-short { max-width: none; }
  .join-finish .btn { justify-self: stretch; }
  .district-head, .district-tally, .district-tools, .district-status, .district-foot, .band > summary { padding-inline: 14px; }
  .band-body { padding-inline: 14px; }
  .district-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* wizard */
/* overflow: clip (not hidden) keeps the rounded corners without breaking the sticky action bar below. */
.wizard { background: #fff; border: 1px solid var(--line); border-radius: var(--r-xl); box-shadow: var(--shadow-2); overflow: hidden; overflow: clip; }
.wizard-progress { height: 4px; background: var(--bg-3); }
.wizard-progress span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--green-3), var(--brass)); transition: width .5s var(--ease); }
.wizard-body { padding: clamp(22px, 4vw, 44px); }
.wizard-step { display: none; animation: stepIn .45s var(--ease); }
.wizard-step.active { display: grid; gap: 20px; }
.no-js .wizard-step, .show-all .wizard-step { display: grid; gap: 20px; margin-bottom: 36px; }
.wizard-step h2 { font-size: 1.6rem; margin: 0; }
/* A legend is not a grid item, so the step's gap never applies to it: space it explicitly. */
.wizard-step > legend { padding: 0; margin-bottom: 18px; }
/* The action bar stays pinned to the bottom of the screen, so Continue is always one tap away however long the step is. */
.wizard-nav { position: sticky; bottom: 0; z-index: 5; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; padding: 14px clamp(22px, 4vw, 44px); padding-bottom: max(14px, env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: rgba(244, 247, 253, .92); -webkit-backdrop-filter: saturate(180%) blur(14px); backdrop-filter: saturate(180%) blur(14px); box-shadow: 0 -8px 24px -16px rgba(20, 33, 61, .25); }
.no-js .wizard-nav, .show-all .wizard-nav { position: static; }
.wizard-nav .btn { min-height: 44px; }
.wizard-picked { font-weight: 650; color: var(--ink); }
.wizard-count { font-size: .82rem; color: var(--ink-3); font-weight: 600; }
@keyframes stepIn { from { opacity: 0; transform: translateX(16px); } to { opacity: 1; transform: none; } }

/* ---------------------------------------------------------------- alerts */
.alert { padding: 14px 18px; border-radius: 14px; font-size: .94rem; display: flex; gap: 12px; align-items: flex-start; }
.alert-ok { background: var(--ok-tint); color: #1f3f66; }
.alert-error { background: var(--danger-tint); color: var(--danger); }
.alert-info { background: var(--green-tint); color: var(--green); }
.alert-warn { background: var(--warn-tint); color: #6b4600; }
.flash { position: fixed; z-index: 90; left: 50%; top: calc(var(--header) + 14px); transform: translateX(-50%); width: min(560px, calc(100% - 32px)); box-shadow: var(--shadow-3); animation: flashIn .5s var(--ease-spring); }
@keyframes flashIn { from { opacity: 0; transform: translate(-50%, -12px); } }

/* ---------------------------------------------------------------- footer */
.site-footer { background: var(--bg-2); border-top: 1px solid var(--line); padding: 64px 0 32px; font-size: .92rem; }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(4, 1fr); gap: 32px; }
.site-footer h4 { font-size: .9rem; font-weight: 650; color: var(--ink); margin-bottom: 14px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 9px; }
.site-footer a:not(.btn) { color: var(--ink-2); }
.site-footer a:not(.btn):hover { color: var(--ink); }
.footer-base { margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; color: var(--ink-3); font-size: .84rem; }

/* cookie consent */
.consent { position: fixed; z-index: 95; left: 16px; right: 16px; bottom: 16px; max-width: 520px; background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-3); padding: 22px; animation: flashIn .5s var(--ease); }
.consent h2 { font-size: 1.05rem; margin: 0 0 6px; }
.consent p { font-size: .9rem; color: var(--ink-2); margin: 0 0 14px; }
.consent .row { gap: 8px; }
.consent .prefs { display: none; gap: 10px; margin: 0 0 16px; padding: 14px; background: var(--bg-2); border-radius: 12px; }
.consent.show-prefs .prefs { display: grid; }
.consent .prefs .check span { display: block; font-size: .8rem; color: var(--ink-3); }

/* mobile action bar */
.mobile-cta { display: none; }

/* ---------------------------------------------------------------- app shell (dashboards) */
.app { display: grid; grid-template-columns: 264px minmax(0, 1fr); min-height: calc(100vh - var(--header)); background: var(--bg-2); }
.app-side { position: sticky; top: var(--header); height: calc(100vh - var(--header)); overflow-y: auto; padding: 24px 14px; border-right: 1px solid var(--line); background: #fff; }
.app-side .side-title { padding: 0 12px 12px; font-size: .82rem; color: var(--ink-3); font-weight: 650; }
.app-side nav { display: grid; gap: 2px; }
.app-side a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 10px; color: var(--ink-2); font-size: .93rem; font-weight: 500; }
.app-side a svg { width: 18px; height: 18px; opacity: .7; flex: none; }
.app-side a:hover { background: var(--bg-2); color: var(--ink); }
.app-side a[aria-current] { background: var(--green-tint); color: var(--green); font-weight: 600; }
.app-side a[aria-current] svg { opacity: 1; }
.app-side .group { margin-top: 18px; padding: 0 12px 6px; font-size: .8rem; color: var(--ink-3); font-weight: 650; }
.app-main { padding: clamp(20px, 3vw, 40px); min-width: 0; }
/* Admin help guide */
.help-toc { display: flex; flex-wrap: wrap; gap: 6px 8px; }
.help-toc a { padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; font-size: .9rem; color: var(--ink-2); }
.help-toc a:hover { border-color: var(--green); color: var(--green); }
.help { scroll-margin-top: calc(var(--header) + 16px); max-width: 920px; }
.help h2 { font-size: 1.25rem; margin: 0 0 10px; }
.help h3 { font-size: 1rem; margin: 18px 0 6px; }
.help ol, .help ul { padding-left: 20px; }
.help li { margin-bottom: 6px; }
.help-eg { background: var(--green-tint); border-radius: 12px; padding: 12px 14px; }
.help details { border-top: 1px solid var(--line); padding: 10px 0; }
.help details summary { cursor: pointer; font-weight: 600; }
/* Phone-only parts of the area menu (shown in the max-width: 920px block). */
.app-bar, .side-site { display: none; }
.side-site form { margin: 0; }
.side-site button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 12px; border: 0; border-radius: 10px; background: none; color: var(--ink-2); font: inherit; font-size: .93rem; font-weight: 500; text-align: left; cursor: pointer; }
.side-site button svg { width: 18px; height: 18px; opacity: .7; flex: none; }
.side-site button:hover { background: var(--bg-2); color: var(--ink); }
.app-head { display: flex; justify-content: space-between; align-items: end; gap: 16px; flex-wrap: wrap; margin-bottom: 28px; }
.app-head h1 { font-size: clamp(1.6rem, 2.6vw, 2.1rem); margin: 0; }
.app-head p { margin: 6px 0 0; color: var(--ink-3); }
.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 22px; }
.panel + .panel { margin-top: 20px; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; }
.panel-head h2 { font-size: 1.08rem; margin: 0; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px; margin-bottom: 20px; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px 20px; }
.kpi span { font-size: .82rem; color: var(--ink-3); font-weight: 500; }
.kpi strong { display: block; font-size: 1.85rem; letter-spacing: -0.03em; font-weight: 680; margin-top: 6px; line-height: 1.1; }
.kpi small { color: var(--ink-3); font-size: .78rem; }
.table-wrap { overflow-x: auto; margin-inline: -22px; padding-inline: 22px; }
table.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th { text-align: left; font-size: .8rem; color: var(--ink-3); font-weight: 650; padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 13px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background .15s; }
.table tbody tr:hover { background: #fbf8f2; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.empty { text-align: center; padding: 48px 20px; color: var(--ink-3); }
.empty h3 { color: var(--ink); }
.filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
.filters input, .filters select { min-height: 42px; width: auto; min-width: 180px; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 20px; overflow-x: auto; }
.tabs a { padding: 10px 14px; color: var(--ink-3); font-weight: 600; font-size: .92rem; border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs a[aria-current] { color: var(--ink); border-bottom-color: var(--ink); }
.bar-chart { display: flex; align-items: end; gap: 6px; height: 160px; padding-top: 10px; }
.bar-chart div { flex: 1; background: linear-gradient(180deg, var(--green-3), var(--green)); border-radius: 6px 6px 2px 2px; min-height: 3px; position: relative; transform-origin: bottom; animation: grow .8s var(--ease) both; }
.bar-chart div:hover::after { content: attr(data-label); position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%); white-space: nowrap; background: var(--ink); color: #fff; font-size: .74rem; padding: 4px 8px; border-radius: 6px; }
@keyframes grow { from { transform: scaleY(0); } }
.thread { display: grid; gap: 12px; }
.bubble { max-width: 80%; padding: 12px 16px; border-radius: 18px; background: var(--bg-2); font-size: .94rem; }
.bubble.mine { margin-left: auto; background: var(--green); color: #fff; border-bottom-right-radius: 6px; }
.bubble:not(.mine) { border-bottom-left-radius: 6px; }
.bubble small { display: block; opacity: .7; font-size: .74rem; margin-top: 4px; }
.quote-compare { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.quote-card { border: 1px solid var(--line); border-radius: var(--r-lg); padding: 22px; background: #fff; display: flex; flex-direction: column; gap: 12px; position: relative; }
.quote-card.best { border-color: var(--green-3); box-shadow: 0 0 0 3px rgba(52, 73, 122, .12); }
.quote-card .amount { font-size: 2rem; font-weight: 680; letter-spacing: -0.03em; line-height: 1; }
.dl { display: grid; grid-template-columns: max-content 1fr; gap: 8px 18px; font-size: .93rem; margin: 0; }
.dl dt { color: var(--ink-3); }
.dl dd { margin: 0; }
.status-steps { display: flex; gap: 0; list-style: none; padding: 0; margin: 0 0 20px; }
.status-steps li { flex: 1; text-align: center; font-size: .78rem; color: var(--ink-3); position: relative; padding-top: 22px; }
.status-steps li::before { content: ""; position: absolute; top: 4px; left: 50%; width: 12px; height: 12px; border-radius: 50%; background: var(--line-2); transform: translateX(-50%); z-index: 1; }
.status-steps li::after { content: ""; position: absolute; top: 9px; left: -50%; right: 50%; height: 2px; background: var(--line-2); }
.status-steps li:first-child::after { display: none; }
.status-steps li.done { color: var(--ink); font-weight: 600; }
.status-steps li.done::before, .status-steps li.done::after { background: var(--green-3); }
.auth-shell { min-height: calc(100vh - var(--header)); display: grid; grid-template-columns: 1fr 1fr; }
.auth-panel { display: grid; place-items: center; padding: 48px 20px; }
.auth-card { width: min(420px, 100%); }
.auth-photo { position: relative; overflow: hidden; }
.auth-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.auth-photo .quote { position: absolute; left: 32px; right: 32px; bottom: 32px; color: #fff; font: italic 400 1.8rem/1.25 var(--display); text-shadow: 0 2px 20px rgba(0, 0, 0, .4); }

/* ---------------------------------------------------------------- motion */
/* Content is shown straight away: no fade-in on scroll. (The reveal classes stay in the markup but do nothing.) */
.js .reveal { opacity: 1; transform: none; }
.js .reveal.in { opacity: 1; transform: none; }
.js .reveal-scale { opacity: 1; transform: none; }
.js .reveal-scale.in { opacity: 1; transform: none; }
.tilt { transform-style: preserve-3d; transition: transform .4s var(--ease); will-change: transform; }
.hero-word { display: inline-block; opacity: 0; transform: translateY(.4em) rotateX(-40deg); transform-origin: bottom; animation: word .9s var(--ease) forwards; animation-delay: calc(var(--i) * 70ms + 100ms); }
@keyframes word { to { opacity: 1; transform: none; } }
.marquee { overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.marquee-track { display: flex; gap: 12px; width: max-content; animation: marquee 60s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }
@view-transition { navigation: auto; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .js .reveal, .js .reveal-scale, .hero-word { opacity: 1; transform: none; }
  .hero-photo { transform: none; }
}

/* ---------------------------------------------------------------- responsive */
@media (max-width: 1080px) {
  .grid-4 { grid-template-columns: repeat(3, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr 1fr; }
  .footer-grid > :first-child { grid-column: 1 / -1; }
  .layout { grid-template-columns: 1fr; }
  .sticky { position: static; }
}
@media (max-width: 920px) {
  .burger { display: block; }
  .nav { position: fixed; inset: var(--header) 0 0 0; flex-direction: column; align-items: stretch; gap: 0; padding: 16px; background: #fff; overflow-y: auto; transform: translateY(-8px); opacity: 0; visibility: hidden; transition: all .3s var(--ease); }
  .menu-open .nav { transform: none; opacity: 1; visibility: visible; }
  /* A backdrop-filter makes the header the containing block for fixed children, which squashed the
     open menu into the header's 68px. While the menu is open the header goes solid instead. */
  .menu-open .site-header { -webkit-backdrop-filter: none; backdrop-filter: none; background: #fff; border-bottom-color: var(--line); }
  .nav { height: calc(100vh - var(--header)); height: calc(100dvh - var(--header)); padding-bottom: max(24px, env(safe-area-inset-bottom)); overscroll-behavior: contain; }
  body.menu-open { overflow: hidden; }
  /* Menu rows read like an iOS list: full-width, hairline separators, comfortable 48px targets. */
  .nav > a, .nav-drop { border-bottom: 1px solid var(--line); }
  .nav > a, .nav-drop > button { min-height: 52px; display: flex; align-items: center; font-weight: 600; color: var(--ink); }
  .nav-right { gap: 10px; margin-top: 20px; }
  .nav-right .btn { min-height: 48px; font-size: 1rem; }
  .user-menu summary { width: 100%; min-height: 48px; padding-left: 6px; }
  .user-menu .menu a, .user-menu .menu button { min-height: 44px; display: flex; align-items: center; }
  .nav-drop.open .mega { animation: stepIn .3s var(--ease); }
  .menu-open .mobile-cta { display: none; }
  .nav > a, .nav-drop > button { padding: 14px 12px; font-size: 1.05rem; text-align: left; border-radius: 12px; }
  .nav-drop .mega { position: static; width: auto; box-shadow: none; border: 0; padding: 0 12px 12px; display: none; opacity: 1; visibility: visible; transform: none; }
  .nav-drop.open .mega { display: block; }
  .nav-drop:not(.open) .mega { display: none; }
  .nav-right { margin: 12px 0 0; flex-direction: column; align-items: stretch; }
  .nav-right .btn { width: 100%; }
  .user-menu .menu { position: static; width: auto; box-shadow: none; }
  .hero-grid, .split, .auth-shell { grid-template-columns: 1fr; }
  .auth-photo { display: none; }
  .hero-visual { order: -1; max-width: 520px; }
  .hero-photo { aspect-ratio: 16 / 11; transform: none; }
  .float-a { left: 10px; bottom: -18px; }
  .float-b { display: none; }
  .grid-3, .steps { grid-template-columns: 1fr 1fr; }
  .trust, .stats { grid-template-columns: 1fr 1fr; }
  .app { grid-template-columns: 1fr; }
  /* Admin, business and account pages: ☰ (and the page bar) open this area's own menu, not the website menu. */
  .app-shell .nav { display: none; }
  .app-side { position: fixed; z-index: 45; inset: var(--header) 0 0 0; height: calc(100vh - var(--header)); height: calc(100dvh - var(--header)); border: 0; padding: 16px 16px max(24px, env(safe-area-inset-bottom)); overscroll-behavior: contain; transform: translateY(-8px); opacity: 0; visibility: hidden; transition: all .3s var(--ease); }
  .menu-open .app-side { transform: none; opacity: 1; visibility: visible; }
  .app-side .side-title { font-size: 1.05rem; color: var(--ink); padding-bottom: 4px; }
  .app-side a, .side-site button { min-height: 48px; font-size: 1rem; }
  .side-site { display: grid; gap: 2px; margin-top: 8px; padding-top: 4px; border-top: 1px solid var(--line); }
  .app-bar { display: flex; align-items: center; gap: 6px; width: 100%; min-height: 48px; margin: 0 0 20px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 14px; background: #fff; color: var(--ink-3); font: inherit; font-size: .95rem; text-align: left; cursor: pointer; }
  .app-bar strong { color: var(--ink); font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .app-bar .sep { width: 14px; height: 14px; flex: none; }
  .app-bar-more { display: inline-flex; align-items: center; gap: 4px; margin-left: auto; color: var(--green); font-weight: 600; flex: none; }
  .app-bar-more svg { width: 16px; height: 16px; transition: transform .2s var(--ease); }
  .app-bar[aria-expanded="true"] .app-bar-more svg { transform: rotate(180deg); }
  .mobile-cta { display: flex; position: fixed; z-index: 40; left: 12px; right: 12px; bottom: 12px; gap: 8px; padding: 8px; background: rgba(255, 255, 255, .9); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow-3); }
  .mobile-cta .btn { flex: 1; }
  body.has-mobile-cta { padding-bottom: 84px; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .grid-2, .grid-3, .grid-4, .steps, .form-grid { grid-template-columns: 1fr; }
  .grid-4.services { grid-template-columns: 1fr 1fr; gap: 12px; }
  .service-card.wide { grid-column: span 2; }
  .search { grid-template-columns: 1fr; border-radius: 20px; }
  .search .divider { border-left: 0; border-top: 1px solid var(--line); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .section-head { align-items: start; }
  .service-card .body { padding: 14px; }
  .service-card h3 { font-size: 1rem; }
  .service-card p { display: none; }
  .bubble { max-width: 92%; }
  .trust { grid-template-columns: 1fr; gap: 18px; }
  /* Text spans the full width on a phone, so darken the whole photo rather than just its left side. */
  .page-hero.photo::after { background: linear-gradient(180deg, rgba(10, 16, 30, .58) 0%, rgba(10, 16, 30, .8) 100%); }
}
.viz-empty { position: absolute; inset: 0 0 28px 48px; display: grid; place-items: center; margin: 0; color: var(--ink-3); font-size: .88rem; pointer-events: none; }

/* ---------------------------------------------------------------- Lead Finder (admin) */
.lf-hero { background: #fff; border: 1px solid var(--line); border-radius: var(--r-xl); padding: 22px; box-shadow: 0 1px 2px rgba(20,33,61,.05), 0 12px 32px -18px rgba(20,33,61,.25); display: grid; gap: 16px; }
.lf-hero textarea { border: 0; resize: vertical; font-size: 1.25rem; line-height: 1.45; padding: 6px 4px; min-height: 64px; background: transparent; box-shadow: none; outline: none; }
.lf-hero textarea:focus { box-shadow: none; }
.lf-kinds { display: flex; gap: 10px; flex-wrap: wrap; }
.lf-kind { cursor: pointer; }
.lf-kind input { position: absolute; opacity: 0; pointer-events: none; }
.lf-kind > span { display: grid; grid-template-columns: 22px auto; column-gap: 8px; align-items: center; padding: 9px 14px; border: 1px solid var(--line-2); border-radius: 14px; font-weight: 600; font-size: .9rem; transition: border-color .15s, background .15s, box-shadow .15s; }
.lf-kind > span svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; grid-row: span 2; color: var(--green-3); }
.lf-kind small { font-weight: 450; color: var(--ink-3); font-size: .76rem; }
.lf-kind input:checked + span { border-color: var(--green-2); background: var(--green-tint); box-shadow: 0 0 0 3px rgba(31,49,87,.12); }
.lf-kind input:focus-visible + span { outline: 2px solid var(--green-2); outline-offset: 2px; }
.lf-hero-row { display: grid; grid-template-columns: 1fr 1fr auto; gap: 12px; align-items: end; border-top: 1px solid var(--line); padding-top: 16px; }
.lf-hero-row .field { position: relative; }
.lf-ai-note { margin: -4px 0 0; }
.lf-hero-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.table .tag { white-space: nowrap; }
.lf-notice { display: flex; gap: 16px; align-items: center; justify-content: space-between; padding: 14px 18px; border-radius: var(--r); background: var(--warn-tint); color: var(--ink); margin-bottom: 16px; }
.lf-notice.is-ok { background: var(--green-tint); }
.lf-notice > div { display: grid; gap: 2px; font-size: .9rem; min-width: 0; }
.lf-notice span { color: var(--ink-2); }
.lf-notice .btn { flex: none; }
.lf-connections { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 20px; margin-bottom: 20px; align-items: start; }
.lf-connections .panel + .panel { margin-top: 0; }
.lf-connection p { margin: 0 0 12px; }
.lf-connection form + form, .lf-connection .fine + form { margin-top: 10px; }
.lf-key { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin-bottom: 8px; }
.lf-key input { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .88rem; }
.lf-reply { width: 100%; font-size: .92rem; line-height: 1.5; margin-bottom: 10px; }
.lf-examples { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 16px 0 28px; }
.lf-example { font-size: .82rem; padding: 6px 12px; border-radius: 999px; background: var(--bg-2); color: var(--ink-2); text-decoration: none; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lf-example:hover { background: var(--bg-3); color: var(--ink); }
.lf-steps { list-style: none; padding: 0; margin: 0 0 28px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.lf-steps li { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--r); background: var(--bg-2); }
.lf-steps b { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--green); color: #fff; font-size: .8rem; flex: none; }
.lf-steps strong { display: block; font-size: .92rem; }
.lf-steps span { font-size: .8rem; color: var(--ink-3); }
.lf-sources { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.lf-source { border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; }
.lf-source p { margin: 6px 0 0; }
.lf-num { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--green-tint); color: var(--green-2); font-size: .78rem; margin-right: 6px; vertical-align: 2px; }
.lf-setup { display: grid; gap: 20px; }
.lf-setup .panel + .panel { margin-top: 0; }
.lf-setup .alert { flex-direction: column; gap: 4px; }
.lf-rows { display: grid; gap: 10px; margin-bottom: 12px; }
.lf-row { display: grid; grid-template-columns: 170px 1fr auto; gap: 10px; align-items: center; }
.lf-row:has([data-lf-value]:not([hidden])) { grid-template-columns: 170px 1fr 1fr auto; }
.lf-row:has(.lf-short) { grid-template-columns: 170px 1fr 140px auto; }
.lf-presets { display: flex; flex-wrap: wrap; gap: 10px; }
.lf-check { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--line); border-radius: 14px; padding: 11px 14px; cursor: pointer; transition: border-color .15s, background .15s; }
.lf-check:has(input:checked) { border-color: var(--green-3); background: var(--green-tint); }
.lf-check.is-off { opacity: .6; cursor: not-allowed; }
.lf-check input[type=checkbox] { margin-top: 3px; accent-color: var(--green-2); width: auto; min-height: 0; }
.lf-check span { display: grid; gap: 2px; font-size: .9rem; }
.lf-check small { color: var(--ink-3); font-size: .78rem; }
.lf-check em { font-style: normal; justify-self: start; }
.lf-sub { font-size: .95rem; margin: 20px 0 4px; }
.lf-actions { display: flex; justify-content: flex-end; gap: 10px; position: sticky; bottom: 0; padding: 14px 0; background: linear-gradient(transparent, var(--bg) 35%); }
.lf-menu { position: relative; }
.lf-menu > summary { list-style: none; cursor: pointer; }
.lf-menu > summary::-webkit-details-marker { display: none; }
.lf-menu-body { position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; min-width: 280px; background: #fff; border: 1px solid var(--line); border-radius: var(--r); box-shadow: 0 18px 40px -16px rgba(20,33,61,.3); padding: 8px; display: grid; gap: 2px; }
.lf-menu-body > a { padding: 9px 12px; border-radius: 10px; text-decoration: none; color: var(--ink); font-size: .9rem; }
.lf-menu-body > a:hover { background: var(--bg-2); }
.lf-menu-body form { padding: 8px 12px; }
.lf-menu-body .fine { padding: 4px 12px; margin: 0; }
.lf-import { display: grid; gap: 8px; border-top: 1px solid var(--line); }
.lf-progress { display: grid; grid-template-columns: 1fr auto; gap: 10px 20px; align-items: center; padding: 16px 20px; border: 1px solid var(--line); border-radius: var(--r-lg); background: #fff; margin-bottom: 20px; }
.lf-progress-text { display: flex; gap: 8px 10px; align-items: center; flex-wrap: wrap; font-size: .92rem; min-width: 0; }
.lf-progress-text .tag-warn { border-radius: 10px; white-space: normal; }
.lf-progress-stats { display: flex; gap: 18px; font-size: .86rem; color: var(--ink-3); }
.lf-progress-stats b { color: var(--ink); font-variant-numeric: tabular-nums; }
.lf-bar { grid-column: 1 / -1; height: 4px; border-radius: 4px; background: var(--bg-3); overflow: hidden; }
.lf-bar span { display: block; height: 100%; background: var(--green-3); border-radius: 4px; transition: width .6s cubic-bezier(.2,.8,.2,1); }
.lf-progress.is-running .lf-bar span { background-image: linear-gradient(90deg, var(--green-3), #6f86b5, var(--green-3)); background-size: 200% 100%; animation: lf-shimmer 1.6s linear infinite; }
@keyframes lf-shimmer { to { background-position: -200% 0; } }
.lf-pulse { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: currentColor; margin-right: 2px; animation: lf-pulse 1.2s ease-in-out infinite; }
@keyframes lf-pulse { 50% { opacity: .3; } }
@media (prefers-reduced-motion: reduce) { .lf-progress.is-running .lf-bar span, .lf-pulse { animation: none; } }
.lf-columns { margin-bottom: 20px; }
.lf-columns > summary { cursor: pointer; display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.lf-col-list { list-style: none; margin: 8px 0 12px; padding: 0; display: grid; gap: 8px; }
.lf-col-list li { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: start; padding: 10px 12px; border-radius: 12px; background: var(--bg-2); }
.lf-col-list strong { display: block; font-size: .9rem; }
.lf-col-list small { color: var(--ink-3); font-size: .78rem; }
.lf-cbadge { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 6px; background: var(--green); color: #fff; font-size: .7rem; font-weight: 700; }
.lf-cbadge-e { background: var(--brass); }
.lf-x { border: 0; background: none; color: var(--ink-3); cursor: pointer; font-size: .9rem; padding: 2px 6px; border-radius: 6px; }
.lf-x:hover { background: var(--danger-tint); color: var(--danger); }
.lf-add { display: grid; grid-template-columns: 150px 1fr auto; gap: 8px; }
.lf-add:has([data-lf-value]:not([hidden])), .lf-add:has([data-lf-instruction]:not([hidden])) { grid-template-columns: 150px 1fr 1fr auto; }
.lf-filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
.lf-filters input[type=search] { flex: 1 1 240px; }
.lf-filters select, .lf-filters input { min-height: 38px; padding-block: 6px; font-size: .88rem; width: auto; }
.lf-grid-panel { padding: 0; overflow: hidden; }
.lf-grid-panel .empty { padding: 56px 20px; }
.lf-bulk { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--bg-2); }
.lf-bulk > span { margin-right: auto; }
.lf-table-wrap { margin: 0; padding: 0; }
.lf-table { font-size: .86rem; }
.lf-table th, .lf-table td { padding: 10px 12px; border-right: 1px solid var(--line); }
.lf-table th:last-child, .lf-table td:last-child { border-right: 0; }
.lf-table th { background: #fbf8f2; text-transform: none; letter-spacing: 0; font-size: .78rem; color: var(--ink-2); }
.lf-table .lf-sel { width: 36px; text-align: center; }
.lf-table .lf-sel input { width: auto; min-height: 0; }
.lf-sticky { position: sticky; left: 0; background: #fff; z-index: 1; min-width: 220px; max-width: 280px; box-shadow: 1px 0 0 var(--line); }
.lf-table thead .lf-sticky { background: #fbf8f2; }
.lf-table tbody tr:hover .lf-sticky { background: #fbf8f2; }
.lf-table tr.lf-all .lf-sticky { box-shadow: inset 3px 0 0 var(--ok), 1px 0 0 var(--line); }
.lf-name { font-weight: 650; color: var(--ink); text-decoration: none; }
.lf-name:hover { text-decoration: underline; }
.lf-table .fine span + span::before { content: " · "; }
.lf-src { font-size: .68rem; padding: 1px 7px; }
.lf-crit { min-width: 128px; white-space: nowrap; }
.lf-res { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 999px; font-size: .76rem; font-weight: 650; text-decoration: none; }
.lf-res-match { background: var(--ok-tint); color: var(--ok); }
.lf-res-nomatch { background: var(--danger-tint); color: var(--danger); }
.lf-res-unclear { background: var(--warn-tint); color: var(--warn); }
.lf-res-pending { color: var(--ink-3); }
.lf-ref { margin-left: 6px; font-size: .72rem; color: var(--ink-3); }
.lf-val { min-width: 140px; max-width: 280px; }
.lf-mail { display: inline-block; margin-left: 4px; font-size: .68rem; font-weight: 650; padding: 0 6px; border-radius: 6px; background: var(--bg-2); color: var(--ink-3); }
.lf-mail-valid, .lf-mail-rolebased { background: var(--ok-tint); color: var(--ok); }
.lf-mail-risky { background: var(--warn-tint); color: var(--warn); }
.lf-mail-invalid { background: var(--danger-tint); color: var(--danger); }
.lf-social { display: inline-block; margin-right: 6px; font-size: .8rem; text-transform: capitalize; }
.lf-score { display: inline-grid; place-items: center; min-width: 38px; padding: 2px 8px; border-radius: 8px; font-weight: 700; font-variant-numeric: tabular-nums; background: color-mix(in srgb, var(--ok) calc(var(--s) * 0.22%), #fff); color: var(--ink); }
.pager { display: flex; gap: 12px; align-items: center; justify-content: center; padding: 14px; border-top: 1px solid var(--line); }
.lf-detail { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
.lf-detail aside { display: grid; gap: 20px; }
.lf-detail aside .panel + .panel, .lf-detail > div > .panel + .panel { margin-top: 20px; }
.lf-detail aside .panel + .panel { margin-top: 0; }
.lf-eval { padding: 14px 0; border-bottom: 1px solid var(--line); }
.lf-eval:last-child { border-bottom: 0; }
.lf-eval p { margin: 4px 0 0; }
.lf-quote { margin: 8px 0 0; padding: 8px 12px; border-left: 3px solid var(--green-3); background: var(--bg-2); border-radius: 0 10px 10px 0; font-size: .84rem; color: var(--ink-2); }
.lf-quote a { margin-left: 6px; font-size: .78rem; }
.lf-dl { display: grid; grid-template-columns: 110px 1fr; gap: 10px 14px; margin: 0; font-size: .9rem; }
.lf-dl dt { color: var(--ink-3); font-size: .82rem; }
.lf-dl dd { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 1080px) { .lf-detail { grid-template-columns: 1fr; } .lf-steps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 720px) {
  .lf-hero-row, .lf-row, .lf-row:has([data-lf-value]:not([hidden])), .lf-row:has(.lf-short), .lf-add, .lf-add:has([data-lf-value]:not([hidden])), .lf-add:has([data-lf-instruction]:not([hidden])) { grid-template-columns: 1fr; }
  .lf-steps { grid-template-columns: 1fr; }
  .lf-progress { grid-template-columns: 1fr; }
  .lf-hero { padding: 16px; border-radius: var(--r-lg); }
  .lf-hero textarea { font-size: 1.05rem; min-height: 104px; }
  .lf-kinds { display: grid; grid-template-columns: 1fr; }
  .lf-example { white-space: normal; border-radius: 14px; }
  .lf-filters { display: grid; grid-template-columns: 1fr 1fr; }
  .lf-filters input[type=search] { grid-column: 1 / -1; }
  .lf-filters select, .lf-filters input { width: 100%; }
  /* One swipeable row of bulk actions instead of three wrapped rows above the table. */
  .lf-bulk { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .lf-bulk > span { margin-right: 6px; white-space: nowrap; }
  .lf-bulk .btn { flex: none; }
  /* Leave room beside the pinned name column to see at least one criterion. */
  .lf-sticky { min-width: 150px; max-width: 170px; }
  .lf-crit { min-width: 112px; }
  .lf-menu-body { left: 0; right: auto; min-width: 0; width: min(300px, calc(100vw - 32px)); }
  .lf-actions .btn { flex: 1; }
  .lf-dl { grid-template-columns: 88px 1fr; }
  .lf-notice { flex-direction: column; align-items: stretch; }
  .lf-hero-actions .btn { flex: 1; }
  .lf-connections { grid-template-columns: 1fr; }
  .lf-key { grid-template-columns: 1fr; }
}

/* ---------------------------------------------------------------- layout safety
   A grid or flex child may shrink below its content, so one long value (a web address, an unbroken code sample)
   wraps inside its box instead of stretching the whole page sideways. */
.grid > *, .form-grid > *, .layout > *, .split > *, .app-main, .panel, .card { min-width: 0; }
.app-main, .dl dd, .lf-dl dd { overflow-wrap: anywhere; }
code { overflow-wrap: anywhere; white-space: pre-wrap; }
/* A table that is wider than its panel scrolls inside the panel. */
.panel:has(> table), form.panel:has(> table) { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.time-grid { display: grid; grid-template-columns: minmax(84px, 1fr) auto minmax(0, 1fr) minmax(0, 1fr); gap: 10px 12px; align-items: center; }
.time-grid .head { font-size: .8rem; font-weight: 650; color: var(--ink-3); }
.time-grid input[type=time] { min-width: 0; padding-inline: 10px; }

/* ---------------------------------------------------------------- touch targets
   On phones and tablets every control is at least 44pt tall, the size Apple recommends for a finger. */
@media (pointer: coarse), (max-width: 920px) {
  .btn-sm, .app-side a, .logo, .link-arrow, .linkish, .tabs a { min-height: 44px; }
  .linkish, .tabs a { display: inline-flex; align-items: center; }
  /* Small text links (Forgot password?, View all) still get a full-size tap area. */
  a.small:not(.btn), .fine a { display: inline-flex; align-items: center; min-height: 44px; }
  .linkish { padding-inline: 4px; }
  .pill, .lf-example { min-height: 44px; padding-block: 10px; }
  .lf-example { display: inline-flex; align-items: center; }
  .check { padding-block: 12px; }
  .panel-head > a, .app-head a.small, .section-head > a { display: inline-flex; align-items: center; min-height: 44px; }
  .link-cloud > a:not(.pill), .link-cols > a, .card h3 > a { display: inline-flex; align-items: center; min-height: 44px; }
  .link-cloud { row-gap: 0; align-items: center; }
  summary:not(.btn) { padding-block: 12px; }
  button.tag { min-height: 44px; padding-inline: 14px; }
  .lf-x { min-width: 44px; min-height: 44px; }
  .lf-filters select, .lf-filters input { min-height: 44px; }
  .site-footer li > a, .footer-base a { display: inline-flex; align-items: center; min-height: 44px; }
}

/* A table inside an article lines up with the text instead of bleeding past the edges on a phone. */
.prose .table-wrap { margin-inline: 0; padding-inline: 0; }
input[type=file] { padding: 10px 12px; }
/* Sliders, tick boxes and radio buttons in the brand navy, not the browser's own blue. */
input[type=range], input[type=checkbox], input[type=radio], progress { accent-color: var(--green); }

/* ---------------------------------------------------------------- reviews page */
.reviews-summary { margin-top: 14px; font-size: 1.05rem; }
.review-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.review-item .review-body { margin: 8px 0; color: var(--ink-2); }
.review-item .fine { margin: 0; }
.review-item .small { margin: 6px 0 0; }
.review-item .alert { margin-top: 10px; }
.empty-state { text-align: center; padding: 36px 24px; }
.empty-state p:last-child { margin-bottom: 0; }

/* ---------------------------------------------------------------- admin database */
.data-form { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 4px 20px; align-items: start; }
.data-form .field:has(textarea) { grid-column: 1 / -1; }
.data-form .field-check { align-self: end; padding-bottom: 10px; }
.data-form label .tag { margin-left: 6px; }
.data-form input:disabled, .data-form select:disabled, .data-form textarea:disabled { background: var(--bg-2); color: var(--ink-3); }
.data-actions { grid-column: 1 / -1; padding-top: 6px; }
.data-danger { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-top: 18px; border-color: var(--danger-tint); }
.data-table td { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 640px) { .data-danger { flex-direction: column; align-items: stretch; } }
.data-bulk { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.data-pick { width: 44px; }
.data-pick input { width: 20px; height: 20px; }

/* ---------------------------------------------------------------- lead quality */
.tag-hot { background: #f6e3dc; color: #8f2d12; }
.tag-warm { background: #f5ecd9; color: #7a5e2f; }
.tag-cold { background: var(--green-tint); color: var(--green-2); }

/* ---------------------------------------------------------------- visitor insights */
.app-head .tabs { margin: 0; }
.visit-feed { list-style: none; margin: 0; padding: 0; }
.visit-feed li { display: grid; grid-template-columns: 10px 1fr auto; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: .92rem; }
.visit-feed li:last-child { border-bottom: 0; }
.visit-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--brass); }
.visit-feed li:first-child .visit-dot { animation: visit-pulse 2s ease-in-out infinite; }
@keyframes visit-pulse { 50% { box-shadow: 0 0 0 5px rgba(176, 141, 87, .25); } }
@media (prefers-reduced-motion: reduce) { .visit-feed li:first-child .visit-dot { animation: none; } }
@media (max-width: 640px) { .visit-feed li { grid-template-columns: 10px 1fr; } .visit-feed li .fine { grid-column: 2; } }

/* ---------------------------------------------------------------- launch checklist */
.launch-list { list-style: none; margin: 0; padding: 0; }
.launch-list li { display: grid; grid-template-columns: 32px 1fr auto; gap: 14px; align-items: start; padding: 14px 0; border-bottom: 1px solid var(--line); }
.launch-list li:last-child { border-bottom: 0; }
.launch-list p { margin: 4px 0 0; }
.launch-icon { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: .9rem; }
.launch-done .launch-icon { background: var(--green-tint); color: var(--green); }
.launch-todo .launch-icon { background: #f6e3dc; color: #8f2d12; }
.launch-manual .launch-icon { background: #f5ecd9; color: var(--brass-2); }
.sr-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (max-width: 640px) { .launch-list li { grid-template-columns: 32px 1fr; } .launch-list li .btn { grid-column: 2; justify-self: start; } }

/* ---------------------------------------------------------------- lead credit */
.credit-packs { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.credit-pack { position: relative; border: 1px solid var(--line-2); border-radius: var(--r-lg); padding: 20px; display: flex; flex-direction: column; gap: 6px; background: #fff; }
.credit-pack h3 { margin: 0; font-size: 1rem; }
.credit-pack .tag { position: absolute; top: 14px; right: 14px; }
.credit-pack-price { font-size: 1.9rem; font-weight: 680; letter-spacing: -0.03em; margin: 4px 0 0; }
.credit-pack p.small { margin: 0 0 10px; color: var(--ink-2); flex: 1; }
.credit-pack-best { border-color: var(--green); box-shadow: 0 0 0 1px var(--green); }
.credit-plus { color: #2d5b8a; font-weight: 600; }

/* ---------------------------------------------------------------- exclusive leads */
.exclusive-offer { margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--line-2); }
.exclusive-offer p { margin: 0 0 10px; }


/* ---------------------------------------------------------------- more services (was a scrolling ticker) */
.more-services { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 28px; }
.more-services-label { font-size: .9rem; font-weight: 600; color: var(--ink-3); margin-right: 4px; }

/* ---------------------------------------------------------------- admin: Razorpay */
.rzp-status { align-self: flex-start; }
.rzp-grid { align-items: start; }
.rzp-form .field { margin-bottom: 14px; }
.rzp-copy { gap: 8px; flex-wrap: nowrap; }
.rzp-copy input { flex: 1; min-width: 0; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .88rem; }
.rzp-form input[name=KeyId], .rzp-form #rzp-key-id { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
.rzp-switch { margin: 8px 0 16px; align-items: flex-start; }
.rzp-actions { gap: 10px; flex-wrap: wrap; }
.rzp-dl dd { overflow-wrap: anywhere; }
.rzp-steps { margin: 0 0 14px; padding-left: 20px; }
.rzp-steps li { margin-bottom: 8px; }

/* ---------------------------------------------------------------- CompareInUK colour accents */
.hero h1 .serif { background: linear-gradient(90deg, #1e56d1, #0a2463 55%, #e63946); -webkit-background-clip: text; background-clip: text; color: transparent; }
.site-footer { background: linear-gradient(180deg, #0a2463 0%, #071a47 100%); color: rgba(255, 255, 255, .78); border-top: 0; }
.site-footer h4 { color: #fff; }
.site-footer a:not(.btn) { color: rgba(255, 255, 255, .78); }
.site-footer a:not(.btn):hover { color: #fff; }
.site-footer .fine, .site-footer p { color: rgba(255, 255, 255, .7); }
.site-footer .btn:not(.btn-cta) { --btn-bg: #fff; --btn-fg: #0a2463; }
.site-footer .logo { color: #fff; }

/* ---------------------------------------------------------------- responsive polish (Apple-style: calm, clear, generous) */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; -webkit-tap-highlight-color: transparent; }
:where(a, button, input, select, textarea, summary):focus-visible { outline: 3px solid rgba(30, 86, 209, .45); outline-offset: 2px; border-radius: 10px; }

/* The whole search field is the tap target, not just its one line of text (44pt minimum). */
.search .field-inline { cursor: text; min-height: 56px; }
.search .field-inline input, .search .field-inline select { min-height: 28px; padding-block: 4px; }

/* "Join as a pro" in the header only where there is room for it. */
@media (max-width: 1180px) and (min-width: 921px) { .nav-join { display: none; } }

/* Why trades join: four short promises under the professionals hero. */
.trust-strip { background: var(--bg-2); border-bottom: 1px solid var(--line); }
.trust-strip ul { list-style: none; margin: 0; padding: 22px 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.trust-strip li { display: grid; gap: 2px; padding-left: 30px; position: relative; font-size: .92rem; color: var(--ink-3); }
.trust-strip li::before { content: ""; position: absolute; left: 0; top: 1px; width: 20px; height: 20px; border-radius: 50%; background: var(--brass) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5.5 10.5l3 3 6-7' fill='none' stroke='white' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 20px no-repeat; }
.trust-strip strong { color: var(--ink); font-size: .98rem; }
@media (max-width: 860px) { .trust-strip ul { grid-template-columns: 1fr 1fr; } }
@media (max-width: 420px) { .trust-strip ul { grid-template-columns: 1fr; gap: 12px; } }

/* The closing call to join, on a soft blue wash. */
.join-band { background: radial-gradient(70% 90% at 50% 0%, rgba(30, 86, 209, .10), transparent 70%), var(--bg); border-top: 1px solid var(--line); }
.join-band .lede { margin: 12px auto 26px; max-width: 560px; }

/* Phones: headline and search first, so the main action is above the fold; the photo follows. */
@media (max-width: 640px) {
  .hero-visual { order: 0; }
  .hero { padding-top: 28px; }
  .hero h1 { font-size: clamp(2rem, 9vw, 2.5rem); }
  .page-hero .row .btn, .join-band .row .btn { flex: 1 1 100%; }
  .btn-lg { min-height: 52px; }
}

/* Tablets: a little more side margin so text never hugs the screen edge. */
@media (min-width: 641px) and (max-width: 1024px) { .wrap { width: min(var(--wrap), 100% - 56px); } }

/* Drop-down suggestion lists open over whatever comes next, never cut off by a hero's edge. */
.hero, .page-hero { z-index: 3; }
.hero-glow { top: 0; max-height: 100%; }
.search .suggest { z-index: 80; max-height: min(320px, 50vh); }
.page-hero.photo > img { clip-path: inset(0); }

/* Services menu: four columns where there is room; the panel scrolls inside itself instead of running off a laptop screen. */
@media (max-width: 920px) { .nav-drop .mega-groups { columns: 2; } }
@media (min-width: 1100px) { .nav .mega-groups { columns: 4; } }

/* ---------------------------------------------------------------- pre-launch polish (shared by every page)
   Same brand, calmer rhythm: headings that read in two lines, shorter cards, quieter link lists. */

/* Section headings: wide enough to read in one or two lines, never three or four short ones. */
.section-head h2 { max-width: 26ch; }
.section-head p { font-size: 1.02rem; }
.section { padding-block: clamp(52px, 7vw, 96px); }

/* Service cards: the drawing on top, the name and summary below on white, so the text never sits on a busy picture. */
.service-card { aspect-ratio: auto; display: flex; flex-direction: column; background: #fff; color: var(--ink); border: 1px solid var(--line); box-shadow: none; }
.service-card img { position: static; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; z-index: auto; background: var(--bg-2); }
.service-card::after { content: none; }
.service-card .body { position: static; padding: 14px 18px 18px; }
.service-card h3 { color: var(--ink); font-size: 1.08rem; margin: 0 0 4px; }
.service-card p { color: var(--ink-3); font-size: .88rem; }
.service-card:hover { color: var(--ink); border-color: var(--line-2); box-shadow: var(--shadow-2); transform: translateY(-2px); }
.service-card:hover img { transform: none; }
.service-card:hover h3 { color: var(--green-3); }
.service-card .go { display: none; }

/* "Also on CompareInUK": the long list of services reads as a tidy index of links, not a wall of pills. */
.more-services { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 2px 24px; margin-top: 36px; padding-top: 24px; border-top: 1px solid var(--line); }
.more-services-label { grid-column: 1 / -1; margin: 0 0 10px; color: var(--ink); font-size: 1rem; }
.more-services .pill { border: 0; background: none; padding: 7px 0; border-radius: 0; font-size: .95rem; color: var(--ink-2); justify-content: flex-start; }
.more-services .pill:hover { color: var(--green-3); text-decoration: underline; text-underline-offset: 3px; }

/* Place cards: landscape, like the service cards. */
.place-card { aspect-ratio: 4 / 3; }

/* Cards and panels share one soft lift on hover, used only where the whole card is a link. */
a.card:hover { border-color: var(--line-2); box-shadow: var(--shadow-2); }

@media (max-width: 640px) {
  .section-head { margin-bottom: 24px; }
  .section-head h2 { max-width: none; }
  .service-card .body { padding: 10px 12px 12px; }
  .service-card h3 { font-size: .95rem; }
  .more-services { grid-template-columns: 1fr 1fr; gap: 0 16px; }
  .place-card { aspect-ratio: 16 / 10; }
}

/* Dashboards: main column + side column on wide screens, one column on tablets and phones. */
.grid-main { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); align-items: start; }
.grid-main-wide { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); }
@media (max-width: 1024px) {
  .grid-main, .grid-main-wide { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .kpi { padding: 14px 16px; }
  .kpi strong { font-size: 1.5rem; }
}
/* Tables never break words letter by letter (the dashboards allow long words to wrap anywhere): on a narrow screen
   the table keeps readable columns and scrolls sideways inside its panel instead. */
.table th, .table td { overflow-wrap: normal; word-break: normal; }
.table td:first-child { min-width: 10.5rem; }
/* A message written as one paragraph reads as running text, not as flex columns (links used to squeeze into a strip). */
p.alert { display: block; }

.app-side nav a .side-count{margin-left:auto}

/* Admin → Database: column menu, readable names and the link picker */
.data-tools { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.data-tools .filters { margin: 0; }
.col-menu { position: relative; }
.col-menu > summary { list-style: none; }
.col-menu > summary::-webkit-details-marker { display: none; }
.col-pop { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; width: min(300px, calc(100vw - 32px)); padding: 12px; background: var(--card, #fff); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 32px rgba(15, 23, 42, .16); }
.col-pop-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.col-find { width: 100%; margin-bottom: 8px; }
.col-list { display: grid; gap: 2px; max-height: 320px; overflow-y: auto; overscroll-behavior: contain; }
.col-opt { display: flex; align-items: center; gap: 8px; min-height: 34px; padding: 2px 6px; border-radius: 8px; font-size: .9rem; }
.col-opt:hover { background: var(--bg-2); }
.col-opt[hidden] { display: none; }
.col-opt .fine { margin-left: auto; }
.data-table th[hidden], .data-table td[hidden] { display: none; }
.data-table tbody tr:nth-child(even) { background: var(--bg-2); }
.data-table .data-name { font-weight: 600; }
.data-id { margin-left: 6px; font-size: .8rem; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.link-pick { position: relative; }
.link-pick > input[type=text] { width: 100%; padding-right: 36px; }
.link-clear { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 28px; height: 28px; border: 0; border-radius: 50%; background: transparent; color: var(--ink-3); font-size: 1.2rem; line-height: 1; cursor: pointer; }
.link-clear:hover { background: var(--bg-2); color: var(--ink); }
.link-clear[hidden] { display: none; }
.link-list { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 30; margin: 0; padding: 4px; list-style: none; max-height: 280px; overflow-y: auto; background: var(--card, #fff); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 12px 32px rgba(15, 23, 42, .16); }
.link-list[hidden] { display: none; }
.link-list li { display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 6px 10px; border-radius: 8px; cursor: pointer; font-size: .92rem; }
.link-list li[aria-selected=true], .link-list li[role=option]:hover { background: var(--bg-2); }
.link-list li.is-current .link-name { font-weight: 650; }
.link-list .link-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.link-list .link-id { flex: none; font-size: .8rem; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.link-list .link-none { color: var(--ink-3); cursor: default; }

/* Admin → Email previews */
.mail-preview { display: grid; gap: 18px; }
.seg { display: inline-flex; gap: 2px; padding: 3px; width: fit-content; max-width: 100%; overflow-x: auto; background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px; }
.seg[hidden] { display: none; }
.seg button { min-height: 40px; padding: 0 18px; border: 0; border-radius: 9px; background: transparent; color: var(--ink-2); font: inherit; font-weight: 600; font-size: .92rem; cursor: pointer; white-space: nowrap; }
.seg button[aria-selected=true] { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(15, 23, 42, .14); }
.seg button:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.mail-card { display: grid; gap: 14px; padding: 18px; background: #fff; border: 1px solid var(--line); border-radius: 16px; }
.mail-card[hidden] { display: none; }
.mail-tabs-on .mail-who { display: none; }
.mail-who { margin: 0; }
.mail-meta { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; margin: 0; font-size: .9rem; }
.mail-meta dt { color: var(--ink-3); }
.mail-meta dd { margin: 0; }
.mail-frame { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #f8f4ec; }
.mail-frame iframe { display: block; width: 100%; height: 1040px; border: 0; }
@media (max-width: 640px) { .mail-card { padding: 12px; } .mail-frame iframe { height: 1240px; } }

/* Admin "View as": a bar that stays on top while an admin sees the site as someone else */
.viewas-bar { position: sticky; top: 0; z-index: 100; display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap; padding: 8px 16px; background: #fff4d6; color: #5a4100; border-bottom: 1px solid #f0d58a; font-size: .9rem; }
.viewas-bar form { margin: 0; }
.row-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
.row-actions form { margin: 0; }
/* Home hero: full-width 3D illustration, people on the right; the left stays clear for the heading and search */
.hero-art { display: flex; align-items: center; min-height: clamp(560px, 47vw, 780px); background: #fff; isolation: isolate; }
.hero-art-img { position: absolute; inset: 0 0 0 9%; z-index: -1; overflow: hidden; }
.hero-art-img img { width: 100%; height: 100%; object-fit: cover; object-position: 78% 50%; }
/* Soft white wash on the left (text contrast) and at the foot (blends into the page). */
.hero-art-img::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, #fff 0%, rgba(255, 255, 255, .92) 26%, rgba(255, 255, 255, .55) 40%, rgba(255, 255, 255, 0) 54%), linear-gradient(0deg, #fff 0%, rgba(255, 255, 255, 0) 16%); }
.hero-art-copy { max-width: 560px; }
@media (max-width: 920px) {
  .hero-art { display: block; min-height: 0; padding-bottom: 0; }
  .hero-art-img { position: relative; inset: auto; z-index: 0; margin-top: 20px; aspect-ratio: 6 / 5; }
  .hero-art-img img { object-position: 71% 62%; }
  .hero-art-img::after { background: linear-gradient(180deg, #fff 0%, rgba(255, 255, 255, 0) 18%), linear-gradient(0deg, #fff 0%, rgba(255, 255, 255, 0) 14%); }
  .hero-art-copy { max-width: none; }
  .hero-art > .wrap { position: relative; }
  .hero-art { display: flex; flex-direction: column-reverse; }
}
/* Story scenes (3D): soft rounded edge so the white backdrop sits gently on cream or white cards */
.toon-3d { aspect-ratio: 4 / 3; object-fit: cover; border-radius: 20px; }