/* v2 system, see DESIGN.md: white page, one brand teal, Figtree figures + Noto Sans HK text,
   pill chips, list + map, sticky price box. Light only. */
:root {
  --ink: #1f2328; --soft: #5f6b76; --faint: #7d8790;
  --line: #e3e7ea; --wash: #f4f7f8; --page: #ffffff;
  --brand: #2b7bc0; --brand-ink: #1b4f80; --brand-wash: #eaf3fb;
  --ok: #1a7f37; --no: #9aa3ab; --stale: #9a5b00; --stale-wash: #fff4e0;
  --cjk: "Noto Sans HK", "PingFang HK", "Microsoft JhengHei", system-ui, sans-serif;
  --fig: "Figtree", var(--cjk);
  --shadow: 0 2px 10px rgba(16, 24, 32, .10);
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--page); color: var(--ink); font: 400 17px/1.65 var(--cjk); }
a { color: var(--brand); }
b, .p, .pb-fig, .fees td, .ledger b, .stats b { font-family: var(--fig); font-variant-numeric: tabular-nums; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 16px; }
button { font: inherit; }

/* masthead */
.mast { border-bottom: 1px solid var(--line); background: #fff; position: relative; z-index: 1000; }
.mast-in { height: 64px; display: flex; align-items: center; justify-content: space-between; }
.mark { font-weight: 700; font-size: 20px; color: var(--brand); text-decoration: none; letter-spacing: .02em; }
.mast-nav { display: flex; gap: 22px; font-size: 15px; }
.mast-nav a { color: var(--ink); text-decoration: none; }

/* district hero band */
.band { background: linear-gradient(180deg, var(--brand-wash), #fff); padding: 8px 0 28px; }
.crumb { font-size: 14px; color: var(--faint); margin: 18px 0 6px; }
.crumb a { color: var(--soft); text-decoration: none; }
h1 { font-size: clamp(32px, 5vw, 48px); line-height: 1.2; font-weight: 500; margin: 6px 0 10px; letter-spacing: .01em; }
h1 .brand { color: var(--brand); }
.lede { font-size: 18px; color: var(--soft); margin: 0 0 18px; max-width: 36em; }
.stats { display: flex; flex-wrap: wrap; gap: 8px 24px; margin: 0; font-size: 15px; color: var(--soft); }
.stats b { font-size: 22px; color: var(--ink); font-weight: 700; margin-left: 4px; }
.stats span + span { padding-left: 24px; border-left: 1px solid var(--line); }

/* filter chips */
.filters { display: flex; flex-wrap: wrap; gap: 10px 18px; padding: 18px 0; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: #fff; z-index: 900; }
.fgroup { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border: 1px solid var(--line); background: #fff; color: var(--ink); border-radius: 999px; padding: 7px 15px; font-size: 14px; cursor: pointer; line-height: 1.3; }
.chip:hover { border-color: var(--ink); }
.chip.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip:disabled { color: var(--no); border-color: var(--line); background: var(--wash); cursor: default; }

/* list + map */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.85fr); gap: 28px; padding-top: 18px; }
.count { font-size: 14px; color: var(--faint); margin: 0 0 8px; }
.row { display: grid; grid-template-columns: 150px minmax(0, 1fr) auto; gap: 18px; align-items: start; border: 1px solid var(--line); border-radius: 12px; padding: 18px; margin-bottom: 14px; background: #fff; transition: border-color .15s, box-shadow .15s; }
.row:hover { border-color: #c9d1d6; box-shadow: var(--shadow); }
.row-price { display: flex; flex-direction: column; background: var(--wash); border-radius: 10px; padding: 14px; text-decoration: none; color: var(--ink); min-height: 96px; justify-content: center; }
.row-price .p { font-size: 26px; font-weight: 700; letter-spacing: -.01em; }
.row-price .pu { font-size: 13px; color: var(--soft); }
.row-price .room { font-family: var(--cjk); font-weight: 500; color: var(--ink); }
.row h2 { font-size: 19px; font-weight: 700; margin: 0; line-height: 1.35; }
.row h2 a { color: var(--ink); text-decoration: none; }
.row h2 a:hover { color: var(--brand); text-decoration: underline; }
.addr { font-size: 14px; color: var(--soft); margin: 2px 0 10px; }
.tags { list-style: none; margin: 0 0 8px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.tags li { background: var(--wash); border-radius: 999px; padding: 2px 10px; font-size: 13px; color: var(--soft); }
.checks { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 14px; }
.checks li::before { content: "✓"; color: var(--ok); font-weight: 700; margin-right: 6px; }
.checks li.rev::before { content: ""; margin: 0; }
.checks li.rev { color: var(--faint); }
.checks li.rev.stale { color: var(--stale); }
.cta { align-self: center; background: var(--brand); color: #fff; text-decoration: none; border-radius: 999px; padding: 10px 18px; font-size: 15px; font-weight: 500; white-space: nowrap; }
.cta:hover { background: var(--brand-ink); }
.mapcol { position: relative; }
.map { position: sticky; top: 80px; height: calc(100vh - 100px); border-radius: 12px; border: 1px solid var(--line); z-index: 1; }
.map.small { position: relative; top: 0; height: 320px; }
.pin span { display: inline-block; transform: translate(-50%, -50%); background: #fff; color: var(--ink); font: 700 13px var(--fig); padding: 4px 9px; border-radius: 999px; box-shadow: var(--shadow); white-space: nowrap; border: 1px solid var(--line); cursor: pointer; }
.pin.hot span, .pin span:hover { background: var(--ink); color: #fff; border-color: var(--ink); }
.pin { z-index: 1; }
.pin.hot { z-index: 1000 !important; }

/* home page */
.home-head { display: flex; justify-content: space-between; gap: 24px; align-items: flex-start; padding-bottom: 18px; }
.home-head h1 { font-weight: 700; font-size: clamp(30px, 4.5vw, 42px); }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.pill { border: 1px solid var(--brand); color: var(--brand); border-radius: 999px; padding: 8px 16px; font-size: 15px; text-decoration: none; font-weight: 500; }
.pill.solid { background: var(--brand); color: #fff; }
.seal { flex: none; width: 128px; height: 128px; border-radius: 50%; border: 2px solid var(--brand); color: var(--brand-ink); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; font-size: 12px; line-height: 1.4; background: var(--brand-wash); }
.seal b { font-family: var(--cjk); font-size: 14px; }
.seal.stale { border-color: var(--stale); color: var(--stale); background: var(--stale-wash); }
.tabs { display: flex; gap: 6px; background: var(--wash); border-radius: 12px; padding: 6px; position: sticky; top: 0; z-index: 900; margin-bottom: 8px; overflow-x: auto; }
.tabs a { color: var(--ink); text-decoration: none; padding: 8px 16px; border-radius: 8px; font-size: 15px; white-space: nowrap; }
.tabs a:hover { background: #fff; }
.two { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 36px; }
.main section { padding: 28px 0; border-bottom: 1px solid var(--line); scroll-margin-top: 70px; }
.main h2 { font-size: 24px; font-weight: 700; margin: 0 0 16px; }
.main h3 { font-size: 16px; font-weight: 700; margin: 0 0 8px; }
.tbl { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; }
table.fees { width: 100%; border-collapse: collapse; font-size: 16px; }
.fees th, .fees td { padding: 13px 16px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
.fees thead th { background: var(--brand-wash); color: var(--brand-ink); font-size: 14px; font-weight: 500; }
.fees tbody th { font-weight: 500; }
.fees tbody tr:last-child > * { border-bottom: 0; }
.fees td { font-weight: 600; }
.fees td.merged small { display: block; font: 400 13px var(--cjk); color: var(--faint); }
.note { font-size: 14px; color: var(--soft); margin: 12px 0 0; }
.checks.big { flex-direction: column; font-size: 16px; margin-bottom: 18px; }
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
ul.ledger { list-style: none; margin: 0; padding: 0; }
.ledger li { display: flex; justify-content: space-between; gap: 14px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.ledger b { font-weight: 600; white-space: nowrap; }
.muted { color: var(--faint); }
ul.aid { list-style: none; margin: 0; padding: 0; font-size: 17px; }
.aid li { padding: 6px 0; }
.aid li.yes::before { content: "✓"; color: var(--ok); font-weight: 700; margin-right: 10px; }
.aid li.no { color: var(--soft); }
.aid li.no::before { content: "✕"; color: var(--no); margin-right: 10px; }
.aid li.info::before { content: "•"; color: var(--no); margin-right: 12px; }
.src { font-size: 14px; color: var(--faint); padding: 20px 0 40px; }

.side { padding-top: 28px; }
.pricebox { position: sticky; top: 80px; border: 1px solid var(--line); border-radius: 16px; padding: 22px; box-shadow: var(--shadow); background: #fff; }
.pb-h { font-size: 14px; color: var(--soft); margin: 0 0 10px; }
.pb-rooms, .pb-levels { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.pb-rooms .chip, .pb-levels .chip { padding: 5px 12px; font-size: 13px; }
.pb-fig { font-size: 44px; font-weight: 700; margin: 14px 0 0; line-height: 1.1; letter-spacing: -.02em; }
.pb-sub { font-size: 14px; color: var(--soft); margin: 2px 0 12px; }
.pb-lines { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.pb-lines li { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; font-size: 14px; border-bottom: 1px solid var(--line); }
.pb-lines li.sum { font-size: 15px; font-weight: 500; }
.pb-lines li.sum b { color: var(--brand-ink); font-size: 18px; }
.pb-cmp { font-size: 14px; color: var(--ink); margin: 12px 0 0; }
.pb-cmp:empty { display: none; }
.pb-foot { font-size: 13px; color: var(--faint); margin: 10px 0 0; }

.foot { border-top: 1px solid var(--line); background: var(--wash); font-size: 13px; color: var(--faint); padding: 22px 0 34px; margin-top: 40px; }

@media (max-width: 900px) {
  .split { grid-template-columns: minmax(0, 1fr); }
  .mapcol { order: -1; }
  .map { position: relative; top: 0; height: 260px; }
  .two { grid-template-columns: minmax(0, 1fr); }
  .side { order: -1; padding-top: 12px; }
  .pricebox { position: relative; top: 0; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .mast-nav { display: none; }
  .row { grid-template-columns: 1fr; gap: 10px; }
  .row-price { flex-direction: row; align-items: baseline; gap: 8px; min-height: 0; padding: 10px 14px; justify-content: flex-start; }
  .cta { justify-self: start; }
  .stats span + span { padding-left: 0; border-left: 0; }
  .home-head { flex-direction: column-reverse; }
  .seal { width: auto; height: auto; border-radius: 999px; flex-direction: row; gap: 6px; padding: 6px 14px; }
  .cols { grid-template-columns: 1fr; }
  .filters { position: relative; }
}

/* logo */
.mark { display: flex; align-items: center; gap: 10px; }
.logo { width: 34px; height: 34px; flex: none; }
.mark-t { display: flex; flex-direction: column; line-height: 1.15; }
.mark-t b { font-family: var(--cjk); font-size: 19px; font-weight: 700; color: var(--ink); letter-spacing: .04em; }
.mark-t small { font-size: 11.5px; color: var(--faint); font-weight: 400; letter-spacing: .06em; }

/* homepage */
.home-band { padding: 40px 0 40px; }
.search { position: relative; max-width: 620px; margin: 6px 0 22px; }
.search input { width: 100%; font: 400 17px var(--cjk); padding: 16px 20px 16px 50px; border: 1px solid #cfd6db; border-radius: 999px; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' fill='none' stroke='%235f6b76' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='9' cy='9' r='6'/%3E%3Cpath d='m14 14 4 4'/%3E%3C/svg%3E") no-repeat 20px center; box-shadow: var(--shadow); outline: none; }
.search input:focus { border-color: var(--brand); }
.sug { position: absolute; left: 0; right: 0; top: calc(100% + 6px); list-style: none; margin: 0; padding: 6px; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); z-index: 950; }
.sug a { display: flex; justify-content: space-between; gap: 12px; padding: 10px 12px; border-radius: 8px; color: var(--ink); text-decoration: none; }
.sug a:hover { background: var(--wash); }
.sug small { color: var(--faint); margin-left: 8px; font-size: 13px; }
.sug b { white-space: nowrap; }
.sug .none { padding: 10px 12px; color: var(--faint); }
.block { padding: 36px 0; border-bottom: 1px solid var(--line); }
.block h2 { font-size: 26px; font-weight: 700; margin: 0 0 6px; }
.block .note { margin: 0 0 16px; }
ol.dlist { list-style: none; margin: 0; padding: 0; columns: 2; column-gap: 40px; }
.dlist li { break-inside: avoid; }
.dlist a { display: grid; grid-template-columns: 5.5em minmax(0, 1fr) 6em; grid-template-rows: auto auto; column-gap: 14px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.dlist a:hover .d-name { color: var(--brand); text-decoration: underline; }
.d-name { font-weight: 700; font-size: 17px; }
.bar { height: 8px; background: var(--wash); border-radius: 999px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--brand); border-radius: 999px; }
.d-med { font: 700 18px var(--fig); text-align: right; }
.d-meta { grid-column: 2 / 4; font-size: 13px; color: var(--faint); }
ul.rlist { list-style: none; margin: 14px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.rlist a { display: flex; flex-direction: column; gap: 2px; border: 1px solid var(--line); border-radius: 12px; padding: 16px; color: var(--ink); text-decoration: none; height: 100%; }
.rlist a:hover { border-color: #c9d1d6; box-shadow: var(--shadow); }
.r-name { font-weight: 700; }
.r-meta { font-size: 13px; color: var(--faint); }
.rlist b { font-size: 20px; margin-top: 6px; }
ul.method { list-style: none; margin: 14px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; font-size: 15px; color: var(--soft); }
.method b { display: block; font-family: var(--cjk); color: var(--ink); font-size: 17px; margin-bottom: 4px; }
@media (max-width: 760px) {
  ol.dlist { columns: 1; }
  ul.rlist, ul.method { grid-template-columns: minmax(0, 1fr); }
  .mark-t small { display: none; }
}
.hero2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr); gap: 32px; align-items: center; }
.hkmap { margin: 0; }
.hkmap svg { width: 100%; height: auto; display: block; }
.hkmap .land { fill: #f1f4f4; }
.hkmap path { stroke: #fff; stroke-width: 1; transition: opacity .15s; }
.hkmap a:hover path { opacity: .75; }
.hkmap .lbl text { font: 600 12px var(--fig); fill: var(--ink); text-anchor: middle; pointer-events: none; paint-order: stroke; stroke: rgba(255,255,255,.8); stroke-width: 3px; }
.hkmap figcaption { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; font-size: 13px; color: var(--soft); margin-top: 8px; }
.hkmap .lg { display: inline-flex; align-items: center; gap: 6px; font-family: var(--fig); }
.hkmap .lg i { display: inline-block; width: 22px; height: 10px; }
@media (max-width: 900px) { .hero2 { grid-template-columns: minmax(0, 1fr); } }

/* photos */
.photo { margin: 0; position: relative; border-radius: 20px; overflow: hidden; aspect-ratio: 4 / 3; background: var(--wash); }
.photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo.big { aspect-ratio: 5 / 4; }
.dhero .photo { aspect-ratio: 16 / 10; }
.credit { position: absolute; right: 10px; bottom: 8px; font-size: 11px; color: #fff; text-decoration: none; opacity: .85; text-shadow: 0 1px 2px rgba(0,0,0,.6); }
.ptag { position: absolute; left: 18px; bottom: 18px; background: #fff; border-radius: 14px; padding: 12px 16px; box-shadow: var(--shadow); display: flex; flex-direction: column; line-height: 1.35; font-size: 15px; }
.ptag b { font-size: 26px; color: var(--brand); margin-right: 4px; display: inline; }
.ptag span { font-size: 13px; color: var(--soft); }
.home-band .hero2 { align-items: center; }
.dgrid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; align-items: start; }
.dgrid ol.dlist { columns: 1; }
.picks { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-top: 16px; }
.pick { border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: #fff; }
.pick figure { margin: 0; position: relative; aspect-ratio: 16 / 10; }
.pick figure img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pick-b { padding: 18px; }
.pick h3 { display: flex; justify-content: space-between; align-items: baseline; font-size: 19px; margin: 0 0 2px; }
.pick h3 span { font: 500 14px var(--cjk); color: var(--faint); }
.pick p { font-size: 14px; color: var(--soft); margin: 0 0 8px; }
.pick ol { list-style: none; margin: 0; padding: 0; }
.pick li a { display: flex; justify-content: space-between; gap: 10px; padding: 9px 0; border-top: 1px solid var(--line); color: var(--ink); text-decoration: none; font-size: 15px; }
.pick li a:hover span { color: var(--brand); }
.pick small { color: var(--faint); margin-left: 6px; font-size: 12px; }
/* home header map */
.home-head > div:first-child { min-width: 0; }
.map.head { position: relative; top: 0; width: 400px; height: 230px; flex: none; }
p.seal { width: auto; height: auto; border-radius: 999px; display: inline-block; padding: 4px 14px; font-size: 13px; margin: 0 0 12px; }
p.seal b { font-size: 13px; }
@media (max-width: 900px) {
  .dgrid, .picks { grid-template-columns: minmax(0, 1fr); }
  .home-head { flex-direction: column; }
  .map.head { width: 100%; height: 200px; }
}
.dgrid .hkmap { position: sticky; top: 24px; }

/* v2.3 homepage, carehome.co.uk structure */
.cover { position: relative; height: 520px; overflow: hidden; background: #cfd8d6; }
.cover > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.28), rgba(0,0,0,.05) 45%, rgba(0,0,0,.25)); }
.cover-in { position: relative; z-index: 2; max-width: 760px; margin: 0 auto; padding: 96px 16px 0; text-align: center; }
.cover h1 { color: #fff; font-weight: 700; font-size: clamp(36px, 6vw, 56px); text-shadow: 0 2px 14px rgba(0,0,0,.35); margin: 0 0 22px; }
.cover-panel { background: rgba(255,255,255,.94); border-radius: 18px; padding: 22px 24px 24px; box-shadow: 0 10px 30px rgba(0,0,0,.18); text-align: left; }
.cover-panel p { margin: 0 0 12px; font-size: 18px; font-weight: 500; text-align: center; }
.cover-panel .search { margin: 0; max-width: none; }
.cover .credit { z-index: 2; }
ul.trust { list-style: none; margin: 0; padding: 34px 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; border-bottom: 1px solid var(--line); }
.trust li { display: grid; grid-template-columns: 34px 1fr; column-gap: 12px; }
.trust .ic { grid-row: span 2; width: 30px; height: 30px; color: var(--brand); }
.trust b { font-family: var(--cjk); font-size: 17px; }
.trust span { font-size: 14px; color: var(--soft); }
.tintband { background: var(--brand-wash); }
.block.flat { border-bottom: 0; }
ul.method.cards li { background: var(--wash); border-radius: 14px; padding: 22px; }
.method .ic { width: 30px; height: 30px; color: var(--brand); display: block; margin-bottom: 10px; }
@media (max-width: 760px) {
  .cover { height: 470px; }
  .cover-in { padding-top: 64px; }
  ul.trust { grid-template-columns: minmax(0, 1fr); gap: 16px; }
}
.cover > img { object-position: center 72%; }
@media (max-width: 760px) {
  .dlist a { padding: 9px 0; grid-template-columns: 4.8em minmax(0, 1fr) 5.2em; }
  .d-name { font-size: 16px; }
  .d-med { font-size: 16px; }
  .search input { font-size: 16px; padding-left: 46px; }
}
.foot { padding: 40px 0 0; }
.foot-in { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 40px; }
.foot-brand p { font-size: 13px; color: var(--soft); margin: 12px 0 0; max-width: 26em; }
.foot h4 { font-size: 15px; color: var(--ink); margin: 0 0 10px; }
ul.foot-links { list-style: none; margin: 0; padding: 0; columns: 3; column-gap: 24px; }
.foot-links li { padding: 3px 0; font-size: 14px; }
.foot-links a { color: var(--soft); text-decoration: none; }
.foot-links a:hover { color: var(--brand); text-decoration: underline; }
.foot-base { border-top: 1px solid var(--line); margin-top: 28px; padding: 16px 16px 26px; font-size: 12px; color: var(--faint); }
@media (max-width: 760px) { .foot-in { grid-template-columns: minmax(0, 1fr); gap: 24px; } ul.foot-links { columns: 2; } }
.main h3 { margin-top: 20px; }
.ratio { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; background: var(--brand-wash); border-radius: 12px; padding: 14px 18px; margin: 0 0 12px; }
.ratio b { font-size: 30px; color: var(--brand-ink); }
.ratio span { font-size: 14px; color: var(--soft); }
ul.staff { columns: 2; column-gap: 28px; }
ul.staff li { break-inside: avoid; }
.tags.big li { font-size: 14px; padding: 4px 12px; color: var(--ink); }
dl.facts2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 28px; margin: 20px 0 0; }
.facts2 div { padding: 10px 0; border-bottom: 1px solid var(--line); }
.facts2 dt { font-size: 13px; color: var(--faint); }
.facts2 dd { margin: 2px 0 0; font-size: 16px; }
@media (max-width: 640px) { ul.staff { columns: 1; } dl.facts2 { grid-template-columns: minmax(0, 1fr); } }
.ledger li > a { flex: 1; } .ledger li .muted { font-size: 13px; }

/* v3 brand 安老: elder.org-style floating header, Chiron Hei HK, blue */
:root { --cjk: "Chiron Hei HK", "Noto Sans HK", "PingFang HK", "Microsoft JhengHei", system-ui, sans-serif; --head: #173a5e; }
.mast { background: #fdf3ec; border-bottom: 0; padding: 14px 0 10px; }
.mast-in { background: #fff; border-radius: 999px; box-shadow: 0 2px 10px rgba(16,24,40,.06); height: 64px; padding: 0 12px 0 22px; }
.mark-t b { color: var(--head); font-size: 24px; letter-spacing: .08em; }
.logo { width: 30px; height: 30px; }
.mast-nav { align-items: center; }
.mast-nav a { color: var(--head); }
.mast-nav .cta-s { background: #5aa9e6; color: #fff; border-radius: 999px; padding: 9px 18px; font-weight: 700; }
.band { background: linear-gradient(180deg, #fdf3ec, #eef5fb); }
h1, .main h2, .block h2 { color: var(--head); }
@media (max-width: 640px) { .mast-nav { display: flex; gap: 0; } .mast-nav a:not(.cta-s) { display: none; } .mast-in { padding: 0 8px 0 16px; } }
.about section { padding: 18px 0; border-top: 1px solid var(--line); max-width: 46em; } .about p { margin: 0; }
.sv { margin: 0; flex: none; width: 440px; }
.sv iframe { width: 100%; height: 250px; border: 0; border-radius: 14px; display: block; background: var(--wash); }
.sv figcaption { font-size: 12px; color: var(--faint); margin-top: 6px; }
@media (max-width: 900px) { .sv { width: 100%; } .sv iframe { height: 220px; } }

/* v4 home page: carehome.co.uk profile structure */
.home-head2 { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; margin-top: 6px; }
.home-head2 h1 { font-weight: 700; font-size: clamp(28px, 4vw, 38px); margin: 0 0 4px; }
.home-head2 .addr { margin: 0 0 8px; font-size: 15px; }
.meta-line { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 0; font-size: 14px; color: var(--soft); align-items: center; }
.meta-line .seal { width: auto; height: auto; border-radius: 999px; padding: 2px 12px; font-size: 13px; display: inline-block; }
.badge { flex: none; width: 112px; height: 112px; border-radius: 50%; background: var(--brand); color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; box-shadow: 0 0 0 6px var(--brand-wash); }
.badge b { font: 800 22px var(--fig); }
.badge span { font-size: 13px; opacity: .9; }
.btnrow { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 18px 0 12px; }
.btn { display: flex; align-items: center; justify-content: center; gap: 8px; background: var(--brand-ink); color: #fff; text-decoration: none; border-radius: 999px; padding: 11px 14px; font-weight: 700; font-size: 15px; white-space: nowrap; }
.btn:hover { background: var(--brand); }
.btn .fi { width: 18px; height: 18px; }
.tabs2 { display: flex; gap: 4px; background: var(--brand-wash); border-radius: 14px; padding: 6px 10px; position: sticky; top: 0; z-index: 900; overflow-x: auto; margin-bottom: 16px; }
.tabs2 a { color: var(--head); text-decoration: none; padding: 9px 14px; font-size: 15px; white-space: nowrap; border-bottom: 2px solid transparent; }
.tabs2 a:hover { border-bottom-color: var(--brand); }
.gallery { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 14px; margin-bottom: 8px; }
.gallery .sv { width: auto; }
.gallery .sv iframe { height: 340px; }
.g-map { position: relative; top: 0; height: 340px; }
.main.full section { padding: 30px 0; }
h2.bar-h { position: relative; padding-left: 16px; font-size: 26px; }
h2.bar-h::before { content: ""; position: absolute; left: 0; top: 4px; bottom: 4px; width: 5px; border-radius: 3px; background: var(--brand); }
.feegrid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 32px; align-items: start; }
.feegrid aside h3 { margin: 0 0 8px; font-size: 18px; }
.feegrid .pricebox { position: relative; top: 0; margin-top: 18px; }
.aid li.yes::before { content: "✓"; display: inline-flex; width: 20px; height: 20px; border: 2px solid var(--ok); border-radius: 50%; align-items: center; justify-content: center; font-size: 12px; margin-right: 10px; }
ul.facgrid { list-style: none; margin: 8px 0 18px; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 20px; }
.facgrid li { display: flex; align-items: center; gap: 12px; font-size: 16px; }
.facgrid .fi { width: 26px; height: 26px; color: var(--brand); flex: none; }
@media (max-width: 900px) {
  .btnrow { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gallery, .feegrid { grid-template-columns: minmax(0, 1fr); }
  .gallery .sv iframe, .g-map { height: 240px; }
  ul.facgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .badge { width: 88px; height: 88px; } .badge b { font-size: 18px; }
}

/* v4 district cards: carehome.co.uk list rows */
.card { display: grid; grid-template-columns: 240px minmax(0, 1fr) 230px; gap: 20px; border: 1px solid var(--line); border-radius: 16px; padding: 16px; margin-bottom: 16px; background: #fff; }
.card:hover { box-shadow: var(--shadow); }
.c-img { position: relative; display: block; border-radius: 12px; overflow: hidden; aspect-ratio: 4 / 3; background: var(--wash); }
.c-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.c-noimg { display: flex; height: 100%; align-items: center; justify-content: center; color: var(--faint); font-size: 14px; }
.c-sv { position: absolute; left: 10px; bottom: 10px; background: rgba(255,255,255,.92); color: var(--head); border-radius: 999px; padding: 2px 10px; font-size: 12px; font-weight: 700; }
.c-main h2 { font-size: 21px; margin: 2px 0 2px; }
.c-main h2 a { color: var(--brand-ink); text-decoration: none; }
.c-main h2 a:hover { text-decoration: underline; }
.c-price { font-size: 16px; margin: 6px 0 10px; }
.c-price b { font-size: 20px; color: var(--ink); }
.c-price .sep { color: var(--line); margin: 0 6px; }
.c-side { display: flex; flex-direction: column; gap: 10px; justify-content: space-between; }
.c-box { background: var(--brand-wash); border-radius: 12px; padding: 12px 14px; font-size: 14px; color: var(--head); flex: 1; }
.c-box p { margin: 0 0 6px; }
.c-box .rev { color: var(--soft); font-size: 13px; margin: 0; }
.c-box .rev.stale { color: var(--stale); }
.btn.ghost { background: #fff; color: var(--brand-ink); border: 1.5px solid var(--brand-ink); }
.mapbox { margin: 16px 0; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.mapbox summary { cursor: pointer; padding: 14px 18px; font-weight: 700; color: var(--brand-ink); background: var(--brand-wash); list-style: none; }
.mapbox summary::before { content: "＋ "; }
.mapbox[open] summary::before { content: "－ "; }
.mapbox .map { position: relative; top: 0; height: 420px; border: 0; border-radius: 0; }
@media (max-width: 900px) {
  .card { grid-template-columns: minmax(0, 1fr); }
  .c-img { aspect-ratio: 16 / 9; }
}

/* similar homes, WhatsApp, mobile bar, A+ */
.sims { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.sim { display: flex; flex-direction: column; gap: 4px; border: 1px solid var(--line); border-radius: 14px; padding: 14px; text-decoration: none; color: var(--ink); }
.sim:hover { box-shadow: var(--shadow); border-color: #c9d1d6; }
.sim b { color: var(--brand-ink); font-family: var(--cjk); font-size: 16px; }
.sim span { font-size: 15px; font-weight: 500; }
.sim small { font-size: 12px; color: var(--faint); }
.btnrow { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.btn.wa { background: #1fa855; }
.btn.wa:hover { background: #178a45; }
.mbar { display: none; }
.aplus { border: 1.5px solid var(--head); background: #fff; color: var(--head); border-radius: 999px; font: 700 15px var(--fig); padding: 6px 12px; cursor: pointer; }
.aplus[aria-pressed="true"] { background: var(--head); color: #fff; }
html.big body { zoom: 1.18; }
@media (max-width: 900px) {
  .sims { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .btnrow { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mbar { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; position: fixed; left: 0; right: 0; bottom: 0; z-index: 1200; background: #fff; border-top: 1px solid var(--line); padding: 8px 10px calc(8px + env(safe-area-inset-bottom)); gap: 8px; box-shadow: 0 -4px 14px rgba(0,0,0,.06); }
  .mbar a { text-align: center; border-radius: 999px; padding: 12px; font-weight: 700; text-decoration: none; background: var(--brand-ink); color: #fff; }
  .mbar a.wa { background: #1fa855; }
  body:has(.mbar) { padding-bottom: 70px; }
}
@media (max-width: 640px) { .aplus { padding: 5px 9px; font-size: 13px; margin-right: 6px; } }

/* homepage: district chips (elder.org), recent cards with photos (carehome featured) */
.dchips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 0 0 30px; border-bottom: 1px solid var(--line); }
.dchips span { font-weight: 700; color: var(--head); margin-right: 6px; }
.dchip { border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; font-size: 14px; color: var(--head); text-decoration: none; background: #fff; }
.dchip:hover { border-color: var(--brand); color: var(--brand); }
ul.rlist a { padding: 0; overflow: hidden; gap: 0; }
.r-pic { position: relative; display: block; aspect-ratio: 16 / 10; background: var(--wash); }
.r-pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.r-badge { position: absolute; right: 10px; bottom: -14px; background: var(--brand); color: #fff; border-radius: 999px; padding: 6px 12px; font: 800 15px var(--fig); box-shadow: 0 0 0 4px #fff; }
ul.rlist .r-name { padding: 20px 16px 2px; font-size: 16px; color: var(--brand-ink); }
ul.rlist .r-meta { padding: 0 16px 16px; }
.station { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: 16px; margin: 8px 0 0; }
.station .fi { width: 22px; height: 22px; color: var(--brand); }
.station small { flex-basis: 100%; color: var(--faint); font-size: 13px; padding-left: 30px; }
.cmp-btn { border: 1.5px dashed var(--brand); background: #fff; color: var(--brand-ink); border-radius: 999px; padding: 8px 12px; font: 700 14px var(--cjk); cursor: pointer; }
.cmp-btn.on { border-style: solid; background: var(--brand-wash); }
.cmp-line { margin: -4px 0 12px; }
.cmpbar { position: fixed; left: 50%; transform: translateX(-50%); bottom: 18px; z-index: 1300; background: var(--head); color: #fff; border-radius: 999px; padding: 8px 8px 8px 18px; display: flex; align-items: center; gap: 12px; box-shadow: 0 6px 20px rgba(0,0,0,.2); font-size: 15px; }
.cmpbar[hidden] { display: none; }
.cmpbar a { background: #5aa9e6; color: #fff; border-radius: 999px; padding: 8px 18px; font-weight: 700; text-decoration: none; }
.cmpbar .clr { background: none; border: 0; color: #cfe0f2; cursor: pointer; font: inherit; }
.cmpbar.full { outline: 3px solid #f2b84b; }
table.cmpt th small { display: block; font-weight: 400; color: var(--faint); font-size: 12px; }
table.cmpt td small { display: block; color: var(--faint); font-size: 12px; font-weight: 400; }
table.cmpt thead th { white-space: normal; min-width: 150px; vertical-align: top; }
.cmp-x { display: block; margin-top: 6px; border: 0; background: none; color: var(--stale); cursor: pointer; padding: 0; font: 13px var(--cjk); }
@media (max-width: 900px) { .cmpbar { bottom: 84px; } }
.pb-diaper { margin-top: 12px; font-size: 14px; }
.pb-diaper label { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-weight: 500; }
.pb-diaper select { font: 15px var(--cjk); padding: 6px 10px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.pb-diaper small { display: block; color: var(--faint); margin-top: 4px; }
@media (max-width: 640px) {
  .home-head2 h1 { font-size: 26px; }
  .badge { width: 74px; height: 74px; box-shadow: 0 0 0 4px var(--brand-wash); }
  .badge b { font-size: 15px; } .badge span { font-size: 11px; }
  .btnrow .btn.wa, .btnrow a[href^="tel:"] { display: none; }
}
/* QA fixes: compare bar on phones, tap targets */
.cmpbar { white-space: nowrap; width: max-content; max-width: calc(100vw - 24px); }
.crumb a { display: inline-block; padding: 8px 2px; }
.foot-links a { display: inline-block; padding: 6px 0; }
.aplus { min-height: 40px; min-width: 44px; }
.credit { padding: 6px 4px; }
@media (max-width: 640px) { .cmpbar { font-size: 14px; gap: 8px; padding: 6px 6px 6px 14px; } .cmpbar a { padding: 8px 14px; } }
.fees th small { display: block; font-weight: 400; font-size: 12px; color: var(--faint); }
/* phone tap targets (cross-check 28 Oct) */
@media (max-width: 900px) {
  .chip { min-height: 40px; padding: 8px 15px; }
  .pb-rooms .chip, .pb-levels .chip { min-height: 38px; padding: 7px 12px; font-size: 14px; }
  .mark { min-height: 44px; padding: 4px 0; }
  .cmp-btn { min-height: 40px; }
  .tabs2 { -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); mask-image: linear-gradient(90deg, #000 85%, transparent); }
  .tabs2 a { padding: 11px 12px; }
  .credit { font-size: 12px; }
  .about a, #cmp a { display: inline-block; padding: 8px 0; }
}
/* phone: fee table as one block per room; filter groups scroll sideways */
@media (max-width: 640px) {
  .feegrid .tbl { overflow: visible; border: 0; }
  table.fees thead { display: none; }
  table.fees, table.fees tbody, table.fees tr { display: block; width: 100%; }
  table.fees tr { border: 1px solid var(--line); border-radius: 12px; margin-bottom: 10px; padding: 4px 0; background: #fff; }
  table.fees tbody th { display: block; border: 0; padding: 10px 14px 4px; font-size: 16px; font-weight: 700; }
  table.fees td { display: flex; justify-content: space-between; border: 0; padding: 6px 14px; white-space: normal; }
  table.fees td::before { content: attr(data-l); color: var(--soft); font-weight: 400; }
  table.fees td.merged { display: block; }
  table.cmpt thead { display: table-header-group; }
  table.cmpt, table.cmpt tbody { display: table; } table.cmpt tr { display: table-row; border: 0; }
  table.cmpt td, table.cmpt tbody th { display: table-cell; white-space: nowrap; }
  table.cmpt td::before { content: none; }
  .filters { flex-direction: column; gap: 8px; }
  .fgroup { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 2px; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .fgroup .chip { flex: none; }
}
/* map-tile fallback when a home has no Street View */
.tilepic { position: absolute; inset: 0; overflow: hidden; background: #eef1ee; display: block; }
.tp-in { position: absolute; left: 50%; top: 50%; width: 512px; height: 512px; transform: translate(calc(-1 * var(--px)), calc(-1 * var(--py))); }
.tp-in img { position: absolute; width: 256px; height: 256px; }
.tp-pin { position: absolute; left: 50%; top: 50%; width: 18px; height: 18px; margin: -18px 0 0 -9px; background: var(--brand); border: 3px solid #fff; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); box-shadow: 0 2px 6px rgba(0,0,0,.3); }
.tp-cap { position: absolute; left: 10px; bottom: 10px; background: rgba(255,255,255,.92); color: var(--head); border-radius: 999px; padding: 2px 10px; font-size: 12px; font-weight: 700; }
.c-img, .r-pic { position: relative; }
.dmap { margin: 0; background: #fff; border-radius: 20px; padding: 14px; box-shadow: var(--shadow); }
.dmap svg { width: 100%; height: auto; display: block; }
.dmap .land { fill: #f1f4f4; }
.dmap path { fill: #e3e9ef; stroke: #fff; stroke-width: 1; }
.dmap path.on { fill: var(--brand); }
.dmap text { font: 700 15px var(--cjk); fill: var(--head); text-anchor: middle; paint-order: stroke; stroke: #fff; stroke-width: 4px; }
.dmap figcaption { font-size: 13px; color: var(--soft); margin-top: 6px; text-align: center; }
.gallery.solo { grid-template-columns: minmax(0, 1fr); } .gallery.solo .g-map { height: 300px; }
.method-list { margin: 0; padding-left: 0; list-style: none; } .method-list li { padding: 8px 0; } .method-list b { display: block; color: var(--head); }

/* launch-day QA: compare bar never hides the footer; bigger price-box controls */
body.has-cmp { padding-bottom: 84px; }
@media (max-width: 900px) { body.has-cmp:has(.mbar) { padding-bottom: 150px; } }
.pb-rooms .chip, .pb-levels .chip { min-height: 40px; }
.pb-diaper select { min-height: 40px; }

/* quiet motion (effects.js); nothing here runs with prefers-reduced-motion */
.card, .sim, .pick, .rlist a, .btn, .chip, .cmp-btn, .dchip, .cta, .pill { transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease, border-color .18s ease; }
.card:hover, .sim:hover, .pick:hover, .rlist a:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(16,24,40,.10); }
.btn:active, .chip:active, .cmp-btn:active, .cta:active, .pill:active { transform: scale(.97); }
.dchip:hover { transform: translateY(-1px); }
html.fx .rv { opacity: 0; transform: translateY(14px); transition: opacity .5s ease, transform .5s ease; }
html.fx .rv.in { opacity: 1; transform: none; }
html.fx .dlist li .bar i { transform-origin: left; transform: scaleX(0); transition: transform .9s cubic-bezier(.2,.7,.2,1) .1s; }
html.fx .dlist li.in .bar i { transform: scaleX(1); }
@keyframes kb { from { transform: scale(1.02); } to { transform: scale(1.09); } }
html.fx .cover > img { animation: kb 18s ease-out both; }
@keyframes shimmer { from { background-position: -200px 0; } to { background-position: 200px 0; } }
.tilepic, .r-pic { background: linear-gradient(90deg, #eef1ee 0, #f7f9f7 40px, #eef1ee 80px) #eef1ee; background-size: 400px 100%; animation: shimmer 1.4s linear infinite; }
.pb-fig { transition: color .2s; }
.hkmap a path, .dmap path { transition: fill .2s, opacity .2s; }
.hkmap a:hover path { opacity: 1; fill: var(--brand-ink); }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
.notes-h { margin-top: 18px; } ul.notes li span:last-child { text-align: right; color: var(--soft); }
