/* Care Homes Mansfield
   Bright and clear: white page, deep teal brand, one warm yellow accent.
   Ratings use their own fixed colours so they read the same everywhere.
   Type: Atkinson Hyperlegible Next throughout (built for low-vision readers). */

:root {
  --brand: #0a5c66;
  --brand-2: #0d7480;
  --brand-ink: #063d44;
  --brand-tint: #e6f2f2;
  --sun: #ffc83d;
  --sun-ink: #4a3500;
  --ink: #14211c;
  --ink-2: #44514d;
  --line: #d5dfdd;
  --line-2: #9fb3b0;
  --surface: #f3f6f6;
  --white: #fff;
  --call: #157a3c;
  --call-dark: #0f5c2d;
  --r-out: #3d2a8c;
  --r-good: #1e7d3c;
  --r-ri: #b25e00;
  --r-inad: #b3261e;
  --r-none: #5e6b6b;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(6, 61, 68, .06), 0 6px 20px rgba(6, 61, 68, .08);
  --font: "Atkinson Hyperlegible Next", system-ui, -apple-system, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--white); color: var(--ink); font: 400 17px/1.55 var(--font); }
img { max-width: 100%; display: block; }
svg { width: 1em; height: 1em; fill: currentColor; flex: none; }
a { color: var(--brand); text-underline-offset: 3px; }
a:hover { color: var(--brand-ink); }
h1, h2, h3 { line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 4.5vw, 3.1rem); font-weight: 800; }
h2 { font-size: clamp(1.4rem, 2.6vw, 1.85rem); font-weight: 800; }
h3 { font-size: 1.15rem; font-weight: 700; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--sun); outline-offset: 2px; border-radius: 6px; }

.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 28px; } }
.narrow { max-width: 820px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--sun); color: var(--ink); padding: 8px 14px; z-index: 99; border-radius: 8px; }
.skip:focus { left: 8px; }
.sample-bar { background: var(--sun); color: var(--sun-ink); text-align: center; padding: 6px; font-weight: 700; font-size: .9rem; }

/* ---------- header: white bar, clearly apart from the teal hero ---------- */
.site-head { background: #fff; color: var(--ink); position: sticky; top: 0; z-index: 40; border-bottom: 2px solid var(--line); box-shadow: 0 2px 10px rgba(6,61,68,.06); }
.head-inner { display: flex; align-items: center; gap: 16px; min-height: 64px; }
.wordmark { display: flex; align-items: center; gap: 10px; color: var(--brand-ink); text-decoration: none; font-size: 1.15rem; }
.wordmark:hover { color: var(--brand-ink); }
.wm-mark { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; background: var(--brand); color: var(--sun); font-size: 24px; }
.wm-text { white-space: nowrap; }
.wm-text b { font-weight: 800; color: var(--brand); }
@media (max-width: 400px) { .wordmark { font-size: 1.02rem; gap: 8px; } .wm-mark { width: 34px; height: 34px; font-size: 21px; } }
.site-nav { margin-left: auto; display: flex; align-items: center; gap: 2px; }
.nav-link, .nav-group-btn { color: var(--ink); text-decoration: none; font: 700 .98rem var(--font); padding: 8px 12px; border-radius: 8px; white-space: nowrap; }
.nav-link:hover, .nav-group-btn:hover { background: var(--brand-tint); color: var(--brand-ink); }
.nav-link[aria-current="page"], .nav-group-btn.is-here { color: var(--brand-ink); background: var(--brand-tint); box-shadow: inset 0 -3px 0 var(--brand); }
.nav-group { position: relative; }
.nav-group-btn { display: inline-flex; align-items: center; gap: 4px; background: none; border: 0; cursor: pointer; }
.nav-group-btn .chev { width: 1.1em; height: 1.1em; fill: currentColor; transition: transform .15s; }
.nav-group-btn[aria-expanded="true"] { background: var(--brand-tint); color: var(--brand-ink); }
.nav-group-btn[aria-expanded="true"] .chev { transform: rotate(180deg); }
.nav-panel { display: none; position: absolute; top: calc(100% + 8px); left: 0; z-index: 60; width: 320px; background: #fff; border: 2px solid var(--brand); border-radius: var(--radius); padding: 8px; box-shadow: 0 16px 32px rgba(6,61,68,.16); }
.nav-group-btn[aria-expanded="true"] + .nav-panel { display: grid; gap: 2px; }
.nav-panel a { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 10px; color: var(--ink); text-decoration: none; }
.nav-panel a:hover, .nav-panel a:focus-visible { background: var(--brand-tint); }
.nav-panel a[aria-current="page"] { background: var(--brand-tint); box-shadow: inset 3px 0 0 var(--brand); }
.np-ico { flex: none; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; background: var(--brand-tint); color: var(--brand); font-size: 20px; }
.nav-panel a[aria-current="page"] .np-ico, .nav-panel a:hover .np-ico { background: var(--brand); color: #fff; }
.nav-panel b { display: block; font-weight: 800; color: var(--brand-ink); }
.nav-panel small { display: block; color: var(--ink-2); font-size: .88rem; margin-top: 1px; }
.menu-btn { display: none; align-items: center; gap: 8px; margin-left: auto; font: 800 1rem var(--font); color: var(--brand-ink); background: #fff; border: 2px solid var(--brand); border-radius: 10px; padding: 8px 14px; cursor: pointer; }
.menu-btn svg { font-size: 1.2em; }
.menu-btn[aria-expanded="true"] { background: var(--brand); color: #fff; }
@media (max-width: 860px) {
  .menu-btn { display: inline-flex; }
  .site-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch; background: #fff; padding: 8px 16px 14px; gap: 0; border-bottom: 2px solid var(--line); box-shadow: 0 12px 24px rgba(6,61,68,.12); }
  .site-nav.open { display: flex; }
  /* On phones the group is a plain heading with its links always showing. */
  .nav-group-btn { pointer-events: none; padding: 12px 8px 4px; font-size: .82rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-2); background: none !important; box-shadow: none !important; }
  .nav-group-btn .chev { display: none; }
  .nav-panel, .nav-group-btn[aria-expanded="true"] + .nav-panel { display: grid; position: static; width: auto; border: 0; box-shadow: none; padding: 0 0 8px; border-bottom: 1px solid var(--line); border-radius: 0; }
  .nav-panel a { padding: 9px 8px; }
  .np-ico { width: 34px; height: 34px; font-size: 18px; }
  .nav-link { padding: 14px 8px; font-size: 1.08rem; border-bottom: 1px solid var(--line); border-radius: 0; }
  .nav-link:last-child { border-bottom: 0; }
  .nav-link[aria-current="page"] { box-shadow: inset 4px 0 0 var(--brand); padding-left: 14px; }
}
[id] { scroll-margin-top: 80px; }

/* ---------- hero ---------- */
.hero { background: linear-gradient(180deg, var(--brand) 0%, var(--brand-2) 100%); color: #fff; padding: 34px 0 64px; }
.hero.is-sub { padding: 26px 0 60px; }
.hero.is-sub:has(+ .prose) { padding-bottom: 32px; }
.hero h1 { margin-bottom: .3em; }
.hero .lede { font-size: 1.12rem; max-width: 40em; color: #e4f3f3; }
.hero a { color: #fff; }
.crumbs { font-size: .92rem; color: #cfe6e6; margin-bottom: 12px; }
.crumbs a { color: #fff; }
.hero-search { display: flex; max-width: 640px; margin: 20px 0 26px; background: #fff; border-radius: 14px; padding: 6px; box-shadow: 0 10px 30px rgba(0,0,0,.18); }
.hero-search input { flex: 1; min-width: 0; border: 0; font: 400 1.1rem var(--font); padding: 12px 12px; color: var(--ink); background: transparent; }
.hero-search input:focus { outline: none; }
.hero-search:focus-within { box-shadow: 0 0 0 3px var(--sun), 0 10px 30px rgba(0,0,0,.18); }
.hero-search button { display: flex; align-items: center; gap: 8px; border: 2px solid var(--sun-ink); background: var(--sun); color: var(--sun-ink); font: 800 1.05rem var(--font); padding: 0 20px; border-radius: 10px; cursor: pointer; }
.hero-search button:hover { background: #ffd666; }
.hero-search button svg { font-size: 1.2em; }
.quick-h { font-weight: 700; color: #cfe6e6; margin-bottom: 10px; }
.quick { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; max-width: 960px; }
.quick a { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 12px; align-items: center; height: 100%; padding: 14px 16px; background: #fff; color: var(--ink); text-decoration: none; border: 2px solid #fff; border-radius: var(--radius); box-shadow: 0 4px 14px rgba(0,0,0,.12); transition: transform .15s, border-color .15s; }
.quick a:hover { transform: translateY(-2px); border-color: var(--sun); color: var(--ink); }
.q-ico { grid-row: 1 / 3; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: var(--brand-tint); color: var(--brand); font-size: 22px; }
.quick li:last-child .q-ico { background: #fff1cc; color: var(--sun-ink); }
.quick b { font-size: 1.05rem; line-height: 1.2; }
.quick a > span:last-child { font-size: .88rem; color: var(--ink-2); line-height: 1.3; }
@media (max-width: 860px) { .quick { grid-template-columns: 1fr 1fr; gap: 10px; } }
@media (max-width: 420px) {
  .hero { padding: 26px 0 58px; }
  .hero .lede { font-size: 1.04rem; }
  .hero-search button span { display: none; }
  .hero-search button { padding: 0 16px; }
  .quick a { grid-template-columns: 1fr; padding: 12px; row-gap: 2px; }
  .q-ico { grid-row: auto; width: 36px; height: 36px; font-size: 19px; margin-bottom: 6px; }
  .quick b { font-size: 1rem; }
}

/* ---------- facts panel (stats, data date and the no-pay promise in one card) ---------- */
.facts { position: relative; margin-top: -38px; background: #fff; border: 2px solid var(--brand); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.kpis { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr 1.4fr; }
.kpis li { padding: 16px 20px; display: flex; flex-direction: column; gap: 2px; }
.kpis li + li { border-left: 2px solid var(--line); }
.kpis b { font-size: clamp(1.6rem, 4vw, 2.2rem); font-weight: 800; line-height: 1; color: var(--brand-ink); }
.kpis b small { font-size: .5em; font-weight: 700; color: var(--ink-2); }
.kpis span { color: var(--ink-2); font-weight: 700; font-size: .95rem; }
.bar { display: block; height: 8px; border-radius: 4px; background: var(--line); margin-top: 8px; overflow: hidden; max-width: 260px; }
.bar i { display: block; height: 100%; background: var(--r-good); border-radius: 4px; }
.facts-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px 20px; flex-wrap: wrap; padding: 12px 20px; background: var(--brand-tint); border-top: 2px solid var(--line); }
.facts-foot p { margin: 0; }
.facts-promise { display: flex; gap: 8px; align-items: flex-start; color: var(--brand-ink); }
.facts-promise svg { font-size: 1.4em; color: var(--brand); margin-top: 1px; }
.facts-promise a { font-weight: 700; white-space: nowrap; }
.facts-date { font-size: .88rem; color: var(--ink-2); }
@media (max-width: 560px) {
  .kpis { grid-template-columns: 1fr 1fr; }
  .kpis li { padding: 14px 16px; }
  .kpis .kpi-good { grid-column: 1 / -1; border-left: 0; border-top: 2px solid var(--line); }
  .facts-foot { padding: 12px 16px; }
}

/* ---------- section heads ---------- */
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.sec-head h2 { margin: 0; }
.sec-link { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; text-decoration: none; }
.sec-link:hover { text-decoration: underline; }

/* ---------- photos and placeholder ---------- */
.no-photo { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; color: rgba(6,61,68,.55); font-size: .85rem; font-weight: 700; }
.map-thumb { position: relative; overflow: hidden; display: block; background: #eef0ea; }
.mt-tiles { position: absolute; }
.mt-tiles img { position: absolute; width: 256px; height: 256px; max-width: none; }
.mt-pin { position: absolute; left: 50%; top: 50%; width: 22px; height: 22px; margin: -26px 0 0 -11px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: var(--brand); border: 3px solid #fff; box-shadow: 0 2px 6px rgba(0,0,0,.35); }
.hc-photo .mt-pin { width: 18px; height: 18px; margin: -22px 0 0 -9px; }
.map-credit { font-size: .8rem; color: var(--ink-2); margin: 10px 0 0; }
.no-photo { position: relative; overflow: hidden; }
.detail-photo:not(:has(.sv-img)) .sv-cap { display: none; }
.sv-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.initials { font-size: clamp(1.4rem, 5vw, 2.6rem); font-weight: 800; letter-spacing: .02em; color: rgba(6,61,68,.62); line-height: 1; }
.hc-photo .initials { font-size: 2.4rem; }
.detail-map .mini-map { height: auto; aspect-ratio: 3 / 2; max-height: 460px; width: 100%; }
.detail-map figcaption { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; }
.detail-map figcaption a { font-weight: 700; }
.no-photo svg { width: 38%; max-width: 72px; height: auto; opacity: .55; }
.no-photo.t0 { background: linear-gradient(135deg, #dff0ee, #c3e3df); }
.no-photo.t1 { background: linear-gradient(135deg, #fff1cc, #fde3a0); }
.no-photo.t2 { background: linear-gradient(135deg, #e3eefb, #c9dcf3); }
.no-photo.t3 { background: linear-gradient(135deg, #f2e7f5, #e2cfe9); }
.no-photo.t4 { background: linear-gradient(135deg, #e7f3df, #cfe6c0); }

/* ---------- rating badges ---------- */
.badge { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; font-size: .95rem; color: #fff; padding: 5px 12px; border-radius: 8px; line-height: 1.2; white-space: nowrap; }
.badge svg { color: var(--sun); }
.badge.sm { font-size: .8rem; padding: 3px 9px; border-radius: 6px; }
.badge.lg { font-size: 1.2rem; padding: 10px 16px; border-radius: 10px; }
.r-outstanding .badge, .badge.r-outstanding { background: var(--r-out); }
.badge.r-good { background: var(--r-good); }
.badge.r-requires-improvement { background: var(--r-ri); }
.badge.r-inadequate { background: var(--r-inad); }
.badge.r-not-yet-rated { background: #fff; color: var(--r-none); box-shadow: inset 0 0 0 2px var(--r-none); }

/* ---------- top row cards ---------- */
.top { padding: 40px 0 8px; }
.tc-row { list-style: none; margin: 0; padding: 0 0 6px; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 18px; }
@media (max-width: 720px) {
  .tc-row { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 14px; margin: 0 -16px; padding: 0 16px 10px; }
  .tc-row .tc { flex: 0 0 74%; scroll-snap-align: start; }
}
.tc a { display: flex; flex-direction: column; height: 100%; text-decoration: none; color: var(--ink); background: #fff; border: 2px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: border-color .15s, transform .15s, box-shadow .15s; }
.tc a:hover { border-color: var(--brand); transform: translateY(-2px); box-shadow: var(--shadow); color: var(--ink); }
.tc-photo { position: relative; aspect-ratio: 3 / 2; display: block; }
.tc-img { width: 100%; height: 100%; object-fit: cover; }
.tc-rank { position: absolute; top: 10px; left: 10px; background: #fff; color: var(--brand-ink); font-weight: 800; padding: 4px 10px; border-radius: 8px; box-shadow: 0 2px 6px rgba(0,0,0,.15); }
.tc-rank.is-pick { background: var(--sun); color: var(--sun-ink); }
.tc-body { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 14px 16px 16px; }
.tc-name { font-weight: 800; font-size: 1.08rem; line-height: 1.25; }
.tc-meta { color: var(--ink-2); font-size: .92rem; }

/* ---------- finder ---------- */
.finder { padding: 36px 0 56px; }
.step { border: 0; margin: 0 0 22px; padding: 0; min-width: 0; }
.step legend, .legend { display: flex; align-items: center; gap: 12px; font-size: clamp(1.3rem, 2.4vw, 1.6rem); font-weight: 800; padding: 0; margin: 0 0 14px; }
.step-n { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--brand); color: #fff; font-size: 1.05rem; flex: none; }
.choose { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.choice { position: relative; cursor: pointer; }
.choice input { position: absolute; opacity: 0; }
.choice-box { display: flex; flex-direction: column; gap: 4px; height: 100%; padding: 16px 18px 16px 52px; border: 2px solid var(--line-2); border-radius: var(--radius); background: #fff; position: relative; transition: border-color .15s, background .15s; }
.choice-box::before { content: ""; position: absolute; left: 18px; top: 18px; width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--line-2); background: #fff; }
.choice-box b { font-size: 1.1rem; }
.choice-box span { color: var(--ink-2); font-size: .95rem; }
.choice:hover .choice-box { border-color: var(--brand); }
.choice input:checked + .choice-box { border-color: var(--brand); background: var(--brand-tint); box-shadow: inset 0 0 0 1px var(--brand); }
.choice input:checked + .choice-box::before { border-color: var(--brand); background: radial-gradient(circle, var(--brand) 0 5px, #fff 6px); }
.choice input:focus-visible + .choice-box { outline: 3px solid var(--sun); outline-offset: 2px; }
@media (max-width: 760px) {
  .step legend, .legend { font-size: 1.2rem; gap: 10px; margin-bottom: 10px; }
  .step-n { width: 30px; height: 30px; font-size: .95rem; }
  .choose { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .choice-box { padding: 12px 8px; text-align: center; justify-content: center; }
  .choice-box::before { display: none; }
  .choice-box b { font-size: .98rem; line-height: 1.2; }
  .choice-sub { display: none; }
  .choice input:checked + .choice-box { background: var(--brand); color: #fff; box-shadow: none; }
}

.toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; background: var(--surface); border: 2px solid var(--line); border-radius: var(--radius); padding: 12px; }
.search-box { display: flex; align-items: center; gap: 8px; flex: 1 1 260px; background: #fff; border: 2px solid var(--line-2); border-radius: 10px; padding: 0 12px; color: var(--ink-2); }
.search-box:focus-within { border-color: var(--brand); }
.search-box input { flex: 1; min-width: 0; border: 0; padding: 11px 0; font: 400 1rem var(--font); background: transparent; color: var(--ink); }
.search-box input:focus { outline: none; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { font: 700 .95rem var(--font); color: var(--brand-ink); background: #fff; border: 2px solid var(--brand); border-radius: 10px; padding: 8px 14px; cursor: pointer; }
.chip:hover { background: var(--brand-tint); }
.chip[aria-pressed="true"] { background: var(--brand); color: #fff; }
.chip[aria-pressed="true"]::before { content: "✓ "; }
.tool-more { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; flex: 1 1 auto; }
.tool-more .sort { margin-left: auto; }
.filter-btn { display: none; align-items: center; gap: 8px; font: 800 1rem var(--font); color: var(--brand-ink); background: #fff; border: 2px solid var(--brand); border-radius: 10px; padding: 9px 14px; cursor: pointer; }
.filter-btn[aria-expanded="true"] { background: var(--brand-tint); }
.filter-n { display: inline-grid; place-items: center; min-width: 22px; height: 22px; border-radius: 11px; background: var(--brand); color: #fff; font-size: .8rem; padding: 0 6px; }
.filter-n[hidden] { display: none; }
@media (max-width: 760px) {
  .toolbar { gap: 10px; padding: 10px; }
  .search-box { flex: 1 1 100%; }
  .filter-btn { display: inline-flex; flex: 1; justify-content: center; }
  .tool-more { display: none; order: 5; flex: 1 1 100%; flex-direction: column; align-items: stretch; padding-top: 4px; }
  .tool-more.open { display: flex; }
  .tool-more .sort { margin-left: 0; justify-content: space-between; }
  .tool-more .sort select { flex: 1; }
  .view-switch button { padding: 9px 12px; }
}
.sort { display: flex; align-items: center; gap: 8px; font-weight: 700; }
.sort select { font: 500 1rem var(--font); padding: 9px 12px; border: 2px solid var(--line-2); border-radius: 10px; background: #fff; color: var(--ink); }
.view-switch { display: flex; border: 2px solid var(--brand); border-radius: 10px; overflow: hidden; }
.view-switch button { display: flex; align-items: center; gap: 6px; font: 700 .95rem var(--font); background: #fff; color: var(--brand-ink); border: 0; padding: 9px 14px; cursor: pointer; }
.view-switch button + button { border-left: 2px solid var(--brand); }
.view-switch button[aria-pressed="true"] { background: var(--brand); color: #fff; }


.result-count { font-weight: 700; color: var(--ink-2); margin: 4px 0 14px; }
.empty { padding: 30px; text-align: center; background: var(--surface); border-radius: var(--radius); font-weight: 700; }

/* ---------- result cards ---------- */
.hc-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.hc { display: grid; grid-template-columns: 240px 1fr 260px; background: #fff; border: 2px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: border-color .15s, box-shadow .15s; }
.hc:hover { border-color: var(--line-2); box-shadow: var(--shadow); }
.hc.is-pick { border-color: var(--sun); box-shadow: 0 0 0 2px var(--sun); }
.hc[hidden] { display: none; }
.hc-photo { position: relative; display: block; min-height: 180px; }
.hc-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pick-flag { position: absolute; top: 10px; left: 10px; background: var(--sun); color: var(--sun-ink); font-weight: 800; font-size: .9rem; padding: 4px 10px; border-radius: 8px; }
.pick-flag.static { position: static; display: inline-block; margin-right: 10px; }
.hc-body { padding: 18px 20px; min-width: 0; }
.hc-name { font-size: 1.3rem; margin-bottom: 4px; }
.hc-name a { color: var(--ink); text-decoration: none; }
.hc-name a:hover { color: var(--brand); text-decoration: underline; }
.hc-addr { display: flex; align-items: center; gap: 4px; color: var(--ink-2); margin-bottom: 10px; }
.hc-addr svg { color: var(--brand); }
.hc-care { font-weight: 700; margin-bottom: 4px; }
.dot { color: var(--line-2); margin: 0 2px; }
.hc-spec { display: inline-block; background: #fff4d6; color: var(--sun-ink); font-weight: 700; font-size: .9rem; padding: 3px 10px; border-radius: 6px; margin-bottom: 6px; }
.hc-provider { color: var(--ink-2); font-size: .95rem; margin: 0; }
.hc-side { display: flex; flex-direction: column; justify-content: space-between; gap: 14px; padding: 18px 20px; background: var(--surface); border-left: 2px solid var(--line); }
.hc-rating { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.hc-label { font-size: .85rem; font-weight: 700; color: var(--ink-2); }
.hc-when { font-size: .9rem; color: var(--ink-2); }
.hc-actions { display: flex; flex-direction: column; gap: 8px; }
.no-phone { color: var(--ink-2); font-size: .95rem; }
@media (max-width: 980px) { .hc { grid-template-columns: 200px 1fr; } .hc-side { grid-column: 1 / -1; flex-direction: row; align-items: center; border-left: 0; border-top: 2px solid var(--line); } .hc-actions { flex-direction: row; } }
@media (max-width: 620px) {
  .hc { grid-template-columns: 84px 1fr; }
  .hc-photo { width: 72px; height: 72px; min-height: 0; margin: 14px 0 0 12px; border-radius: 10px; overflow: hidden; }
  .hc-photo .no-photo span { display: none; }
  .hc-photo .initials { font-size: 1.45rem; }
  .hc-photo .no-photo svg { width: 46%; }
  .pick-flag { top: auto; bottom: 0; left: 0; right: 0; border-radius: 0; font-size: .7rem; padding: 2px 0; text-align: center; }
  .hc-body { padding: 12px 14px 10px 4px; }
  .hc-name { font-size: 1.1rem; }
  .hc-addr { margin-bottom: 4px; font-size: .95rem; }
  .hc-care { font-size: .95rem; margin: 0; }
  .hc-spec { font-size: .82rem; margin: 6px 0 0; }
  .hc-provider { display: none; }
  .hc-side { flex-direction: column; align-items: stretch; gap: 10px; padding: 10px 12px 12px; }
  .hc-label { display: none; }
  .hc-rating { flex-direction: row; align-items: center; gap: 10px; }
  .hc-actions { flex-direction: row; }
  .hc-actions .btn-call { flex: 1; }
  .hc-actions .btn { padding: 10px 12px; }
}

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: 800 1rem var(--font); text-decoration: none; padding: 11px 16px; border-radius: 10px; border: 2px solid transparent; cursor: pointer; text-align: center; }
.btn-call { background: var(--call); color: #fff; border-color: var(--call-dark); }
.btn-call:hover { background: var(--call-dark); color: #fff; }
.btn-ghost { background: #fff; color: var(--brand-ink); border-color: var(--brand); }
.btn-ghost:hover { background: var(--brand-tint); color: var(--brand-ink); }
.btn-lg { font-size: 1.2rem; padding: 16px 18px; width: 100%; }

/* ---------- map ---------- */
.map-wrap { margin-bottom: 16px; }
.map { height: min(70vh, 620px); border: 2px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.mini-map { height: 300px; border: 2px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.map-note { font-size: .9rem; color: var(--ink-2); margin-top: 8px; }
.map-note a { font-weight: 700; display: inline-flex; align-items: center; gap: 4px; }
.pin { width: 30px; height: 30px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); border: 3px solid #fff; box-shadow: 0 2px 6px rgba(0,0,0,.35); }
.pin.r-outstanding { background: var(--r-out); } .pin.r-good { background: var(--r-good); }
.pin.r-requires-improvement { background: var(--r-ri); } .pin.r-inadequate { background: var(--r-inad); }
.pin.r-not-yet-rated { background: var(--r-none); }
.pop { font: 400 .95rem/1.4 var(--font); min-width: 190px; }
.pop b { display: block; font-size: 1.05rem; margin-bottom: 4px; }
.pop .badge { margin: 4px 0 8px; }
.pop .btn { margin-top: 6px; width: 100%; padding: 8px 12px; font-size: .95rem; }
.pop .btn-call { color: #fff; }
.leaflet-container a.btn-ghost { color: var(--brand-ink); }

/* ---------- guide ---------- */
.guide { background: var(--brand-tint); padding: 48px 0; }
.guide-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; margin-top: 18px; }
.guide-grid > div { background: #fff; border-radius: var(--radius); padding: 22px 24px; border-top: 5px solid var(--brand); }
.guide-grid p { margin: 0; color: var(--ink-2); }
.guide-grid .guide-more { margin-top: 12px; }
.guide-more a { font-weight: 800; display: inline-flex; align-items: center; gap: 6px; }
@media (max-width: 760px) { .guide-grid { grid-template-columns: 1fr; } }

/* ---------- detail page ---------- */
.detail-top { background: linear-gradient(180deg, var(--brand) 0%, var(--brand-2) 100%); color: #fff; padding: 22px 0 26px; }
.detail-title { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.detail-title h1 { margin-bottom: 6px; }
.detail-sub { display: flex; align-items: center; gap: 6px; color: #e4f3f3; margin: 0; }
.detail-rank { margin: 0; background: rgba(255,255,255,.14); padding: 8px 14px; border-radius: 10px; font-weight: 700; }
.detail-rank a { color: #fff; font-weight: 400; margin-left: 6px; }
.detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 32px; padding-top: 28px; padding-bottom: 40px; align-items: start; }
@media (max-width: 920px) { .detail-grid { grid-template-columns: 1fr; } }
.detail-photo { margin: 0 0 20px; }
.hero-img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: var(--radius); }
.detail-photo figcaption { font-size: .82rem; color: var(--ink-2); margin-top: 6px; }
.spec-banner { background: #fff4d6; color: var(--sun-ink); font-weight: 700; padding: 12px 16px; border-radius: 10px; border-left: 5px solid var(--sun); }
.fact-tiles { list-style: none; padding: 0; margin: 0 0 30px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
@media (max-width: 700px) { .fact-tiles { grid-template-columns: repeat(2, 1fr); } }
.fact-tiles li { background: var(--surface); border-radius: 12px; padding: 14px 16px; display: flex; flex-direction: column; gap: 2px; }
.fact-tiles span { font-size: .85rem; color: var(--ink-2); font-weight: 700; }
.fact-tiles b { font-size: 1.1rem; line-height: 1.3; }
.block { margin-bottom: 32px; }
.cqc-box { display: flex; gap: 18px; align-items: flex-start; padding: 20px; border-radius: var(--radius); border: 2px solid var(--line); }
.cqc-box p:last-child { margin: 0; }
.cqc-box a { font-weight: 700; display: inline-flex; align-items: center; gap: 6px; }
@media (max-width: 560px) { .cqc-box { flex-direction: column; } }
.glance { margin: 0; border: 2px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.glance div { display: grid; grid-template-columns: 220px 1fr; gap: 12px; padding: 14px 18px; }
.glance div + div { border-top: 1px solid var(--line); }
.glance dt { font-weight: 700; color: var(--ink-2); }
.glance dd { margin: 0; }
@media (max-width: 560px) { .glance div { grid-template-columns: 1fr; gap: 2px; } }
.tag { display: inline-block; background: var(--brand-tint); color: var(--brand-ink); font-weight: 700; font-size: .9rem; padding: 3px 10px; border-radius: 6px; margin: 2px 4px 2px 0; }

.contact { position: sticky; top: 20px; }
.contact-card { background: #fff; border: 2px solid var(--brand); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.contact-rating { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; color: var(--ink-2); font-size: .95rem; }
.contact-note { font-size: .9rem; color: var(--ink-2); margin: 12px 0 14px; }
.contact-links { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.contact-links li { border-bottom: 1px solid var(--line); }
.contact-links a { display: flex; align-items: center; justify-content: space-between; padding: 12px 2px; font-weight: 700; text-decoration: none; }
.contact-links a:hover { text-decoration: underline; }
.contact-promise { display: flex; gap: 8px; align-items: center; font-size: .92rem; color: var(--brand-ink); font-weight: 700; margin-top: 14px; }
.contact-promise svg { font-size: 1.3em; color: var(--brand); }
@media (max-width: 920px) { .contact { position: static; } }

.nearby { background: var(--surface); padding: 40px 0 48px; }
.call-bar { display: none; }
@media (max-width: 920px) {
  .is-detail { padding-bottom: 84px; }
  .call-bar { display: block; position: fixed; left: 0; right: 0; bottom: 0; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: #fff; border-top: 2px solid var(--line); z-index: 30; box-shadow: 0 -4px 16px rgba(0,0,0,.08); }
  .call-bar .btn { width: 100%; font-size: 1.1rem; padding: 14px; }
}

/* ---------- prose pages ---------- */
.prose { padding: 36px 16px 56px; }
.prose h2 { margin-top: 1.4em; }
.rank-table { width: 100%; border-collapse: collapse; margin: 8px 0 18px; border: 2px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.rank-table th, .rank-table td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.rank-table th { background: var(--surface); }
.rank-table td:last-child, .rank-table th:last-child { text-align: right; font-weight: 800; width: 90px; }

/* ---------- paying for care ---------- */
.council-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 14px 0 8px; }
@media (max-width: 680px) { .council-cards { grid-template-columns: 1fr; } }
.council { border: 2px solid var(--brand); border-radius: var(--radius); padding: 18px; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.council p { margin: 0; }
.council-h { font-weight: 800; font-size: 1.15rem; }
.council-areas { color: var(--ink-2); font-size: .95rem; }
.council .btn { width: 100%; margin: 4px 0; }
.council-links { font-size: .95rem; }
.council-links a { font-weight: 700; }
.ticks { padding-left: 0; list-style: none; margin: 0 0 1em; }
.ticks li { position: relative; padding-left: 26px; margin-bottom: 8px; }
.ticks li::before { content: ""; position: absolute; left: 4px; top: .55em; width: 10px; height: 10px; border-radius: 3px; background: var(--brand); }
.help-list { list-style: none; padding: 0; margin: 0 0 1em; border: 2px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.help-list li { display: grid; grid-template-columns: 260px 1fr; gap: 4px 16px; padding: 12px 16px; }
.help-list li + li { border-top: 1px solid var(--line); }
.help-list span { color: var(--ink-2); }
@media (max-width: 600px) { .help-list li { grid-template-columns: 1fr; } }
.small-print { font-size: .9rem; color: var(--ink-2); border-top: 2px solid var(--line); padding-top: 14px; margin-top: 28px; }

/* ---------- footer ---------- */
.site-foot { background: var(--brand-ink); color: #cfe0df; padding: 44px 0 36px; font-size: .95rem; }
.site-foot a { color: #fff; }
.foot-inner { display: grid; grid-template-columns: 1.3fr .8fr 1.3fr; gap: 32px; }
@media (max-width: 820px) { .foot-inner { grid-template-columns: 1fr; gap: 20px; } }
.foot-mark { color: #fff; font-size: 1.2rem; }
.foot-h { color: #fff; font-weight: 800; margin-bottom: 8px; }
.site-foot ul { list-style: none; margin: 0; padding: 0; }
.site-foot li { margin-bottom: 6px; }
.foot-promise { display: flex; gap: 8px; align-items: center; color: var(--sun); font-weight: 700; }
.foot-promise svg { font-size: 1.3em; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
@media (min-width: 721px) { .top .tc-row { grid-template-columns: repeat(3, 1fr); } .top .tc-photo { aspect-ratio: 16 / 9; } }

/* What the home publishes (detail page) */
.pub-intro { color: var(--ink-2); margin: 0 0 12px; }
.pub-list { list-style: none; margin: 0; padding: 0; border: 2px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.pub-list li { display: grid; grid-template-columns: 56px 1fr; gap: 12px; align-items: start; padding: 12px 18px; }
.pub-list li + li { border-top: 1px solid var(--line); }
.pub-list b { display: inline-block; text-align: center; font-size: .85rem; padding: 2px 0; border-radius: 6px; border: 2px solid currentColor; }
.pub-list .is-yes b { color: var(--r-good); }
.pub-list .is-no b { color: var(--r-none); }
.pub-note { display: block; color: var(--ink-2); font-size: .9rem; margin-top: 2px; }

/* ---------- where to start (questions) ---------- */
.start-link { margin: 18px 0 0; }
.start-link a { display: inline-flex; align-items: center; gap: 8px; color: #fff; font-weight: 800; font-size: 1.05rem; text-decoration-color: var(--sun); text-decoration-thickness: 2px; }
.start-link a:hover { color: var(--sun); }
.start-link svg { width: 20px; height: 20px; fill: currentColor; flex: none; }
.qz { padding: 32px 16px 56px; }
.qz-card { border: 2px solid var(--brand); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); background: #fff; scroll-margin-top: 90px; }
.qz-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 46px; }
.qz-progress { margin: 0; font-weight: 800; color: var(--ink-2); }
.qz-back { padding: 8px 14px; }
.qz-bar { height: 8px; background: var(--line); border-radius: 4px; overflow: hidden; margin: 10px 0 20px; }
.qz-bar i { display: block; height: 100%; width: 0; background: var(--brand); transition: width .25s; }
.qz-q { border: 0; margin: 0; padding: 0; min-width: 0; }
.qz-legend { font-size: clamp(1.3rem, 2.6vw, 1.7rem); font-weight: 800; line-height: 1.25; padding: 0; margin: 0 0 8px; }
.qz-sub { margin: 0 0 14px; color: var(--ink-2); }
.qz-opts { display: grid; gap: 10px; margin-top: 14px; }
.qz-opt { position: relative; cursor: pointer; display: block; }
.qz-opt input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.qz-opt > span { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px 14px 50px; border: 2px solid var(--line-2); border-radius: 12px; background: #fff; position: relative; transition: border-color .15s, background .15s; }
.qz-opt > span::before { content: ""; position: absolute; left: 16px; top: 15px; width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--line-2); background: #fff; }
.qz-opt b { font-size: 1.08rem; }
.qz-opt small { color: var(--ink-2); font-size: .95rem; }
.qz-opt:hover > span { border-color: var(--brand); }
.qz-opt input:checked + span { border-color: var(--brand); background: var(--brand-tint); box-shadow: inset 0 0 0 1px var(--brand); }
.qz-opt input:checked + span::before { border-color: var(--brand); background: radial-gradient(circle, var(--brand) 0 5px, #fff 6px); }
.qz-opt input:focus-visible + span { outline: 3px solid var(--sun); outline-offset: 2px; }
.qz-nav { display: flex; justify-content: flex-end; margin-top: 18px; }
.btn-next { background: var(--brand); color: #fff; border-color: var(--brand-ink); }
.btn-next:hover { background: var(--brand-ink); color: #fff; }
.btn-next:disabled { background: var(--line); color: var(--ink-2); border-color: var(--line-2); cursor: not-allowed; }
.btn-next svg, .qz-more svg { width: 20px; height: 20px; fill: currentColor; }
.qz-private { margin: 16px 0 0; font-size: .9rem; color: var(--ink-2); }
.qz-res-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.qz-res-head h2 { margin: 0; scroll-margin-top: 90px; }
.qz-share { color: var(--ink-2); font-size: .95rem; margin: 6px 0 18px; }
.qz-steps { list-style: none; padding: 0; margin: 0 0 32px; counter-reset: qz; display: grid; gap: 12px; }
.qz-steps li { counter-increment: qz; position: relative; border: 2px solid var(--line); border-radius: var(--radius); padding: 16px 18px 16px 64px; }
.qz-steps li::before { content: counter(qz); position: absolute; left: 16px; top: 16px; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--brand); color: #fff; font-weight: 800; }
.qz-steps h3 { margin: 4px 0 6px; font-size: 1.15rem; }
.qz-steps p { margin: 0 0 8px; }
.qz-steps .btn { margin-top: 4px; }
.qz-steps .btn svg { width: 18px; height: 18px; fill: currentColor; flex: none; }
.qz-homes-h { margin: 0 0 4px; }
.qz-homes-note { color: var(--ink-2); margin: 0 0 14px; }
.qz-more a { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; }
@media (max-width: 600px) {
  .qz-card { padding: 16px; }
  .qz-steps li { padding: 14px 14px 14px 56px; }
  .qz-steps li::before { left: 12px; width: 30px; height: 30px; }
  .qz-steps .btn { width: 100%; white-space: normal; }
}
.qz [hidden] { display: none !important; }
.start-link a { display: flex; justify-content: space-between; gap: 12px; padding: 14px 16px; border: 2px solid var(--sun); border-radius: var(--radius); text-decoration: none; background: rgba(255,255,255,.08); }
.start-link a:hover { background: rgba(255,255,255,.16); }
@media (min-width: 761px) { .start-link a { display: inline-flex; } }

/* ---------- homepage hero: deep teal, facts on the right, the four boxes across its lower edge ---------- */
.hero-home {
  background:
    radial-gradient(900px 420px at 92% -10%, rgba(255,200,61,.16), transparent 60%),
    radial-gradient(800px 520px at -5% 115%, rgba(19,140,150,.45), transparent 62%),
    linear-gradient(160deg, #05323a 0%, #0a4d56 100%);
  padding: 52px 0 104px;
  border-bottom: 4px solid var(--sun);
}
.hh-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 48px; align-items: center; }
.hero-home h1 { font-size: clamp(2.3rem, 5vw, 3.7rem); letter-spacing: -.02em; margin-bottom: .35em; }
.hero-home .lede { font-size: 1.2rem; color: #d9eeee; max-width: 34em; }
.hero-home .hero-search { margin: 24px 0 18px; }
.hero-home .start-link { margin: 0; }
.hh-facts { background: rgba(255,255,255,.07); border: 2px solid rgba(255,255,255,.22); border-radius: 18px; padding: 22px 24px; backdrop-filter: blur(4px); }
.hh-facts ul { list-style: none; margin: 0 0 16px; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 18px 20px; }
.hh-facts li { display: flex; flex-direction: column; gap: 4px; }
.hh-facts li > b { font-size: clamp(2rem, 3.6vw, 2.6rem); font-weight: 800; line-height: 1; color: #fff; }
.hh-facts li > b small { font-size: .45em; font-weight: 700; color: #bfe0e0; }
.hh-facts li > span { color: #cfe6e6; font-weight: 700; font-size: .95rem; }
.hf-good { grid-column: 1 / -1; padding-top: 16px; border-top: 2px solid rgba(255,255,255,.16); }
.hh-facts .bar { max-width: none; height: 10px; background: rgba(255,255,255,.18); margin-top: 6px; }
.hh-facts .bar i { background: #4cc77a; }
.hf-promise { display: flex; gap: 10px; align-items: flex-start; margin: 0 0 6px; padding-top: 14px; border-top: 2px solid rgba(255,255,255,.16); color: #fff; }
.hf-promise svg { font-size: 1.5em; color: var(--sun); margin-top: 1px; }
.hf-promise span { color: #fff; font-weight: 400; font-size: 1rem; }
.hf-promise b { font-weight: 800; font-size: 1rem; }
.hf-promise a { color: var(--sun); font-weight: 800; white-space: nowrap; }
.hf-date { margin: 0; font-size: .88rem; color: #a9cfcf; padding-left: calc(1.5em + 10px); }
.hh-quick { position: relative; margin-top: -60px; }
.hh-quick .quick { max-width: none; }
.hh-quick .quick a { border: 2px solid var(--line); box-shadow: 0 10px 28px rgba(6,61,68,.16); padding: 18px; }
.hh-quick .quick a:hover { border-color: var(--brand); }
.hh-quick .q-ico { background: var(--brand); color: #fff; }
.hh-quick .quick li:last-child .q-ico { background: var(--sun); color: var(--sun-ink); }
.hero-home + .hh-quick + .hh-mfacts + .top { padding-top: 44px; }
/* Phones and small tablets: the facts move below the boxes so the boxes stay near the top. */
.hh-mfacts { display: none; }
@media (max-width: 920px) {
  .hh-grid { grid-template-columns: 1fr; gap: 26px; }
  .hero-home { padding: 34px 0 96px; }
  .hh-facts { display: none; }
  .hh-mfacts { display: block; }
  .hh-mfacts .facts { margin-top: 20px; }
}
@media (max-width: 560px) {
  .hero-home .lede { font-size: 1.06rem; }
  .hh-facts { padding: 16px; }
  .hh-facts ul { grid-template-columns: 1fr 1fr; gap: 14px; }
  .hh-quick { margin-top: -70px; }
  .hh-quick .quick a { padding: 14px 12px; }
}
