/* The care site (app/routers/public_care.py), laid out as the UK care site
   (care.bidvane.co.uk): its band, verdict, cards, rows and side panel are
   ported from there (uk app/static/care.css), the companies site drawing the
   rest. The UK's four-step rating meter here marks where the Health
   ministry's score stands among every home's latest (top quarter, above the
   middle, below it, bottom quarter); the number is always printed beside it. */

.care-body { --top: #1D6FA3; --top-wash: #E3F0F8; --warn: #9A5B00; --warn-wash: #FDF1DC; }
:root[data-ps-theme="dark"] .care-body { --top: #7CB7DE; --top-wash: rgb(124 183 222 / .15);
  --warn: #F5B754; --warn-wash: rgb(245 183 84 / .14); }

/* a CQC rating, always in words as well as colour: a four-step meter (one
   step Inadequate, four Outstanding) then the word. The meter is one gradient
   cut into four rounded steps by a mask, filled to --p in the rating's colour. */
.care-body { --m-empty: color-mix(in srgb, var(--ink-soft) 22%, transparent); --m-top: var(--top);
  --m-ok: var(--ok); --m-warn: #D99A2B; --m-bad: var(--bad); }
:root[data-ps-theme="dark"] .care-body { --m-warn: #F5B754; }
.care-pill { display: inline-flex; align-items: center; gap: .6em; font-size: 13px; font-weight: 600;
  line-height: 1.4; white-space: nowrap; color: var(--ink); --c: var(--m-empty); --p: 0%; }
.care-pill::before, .care-meter { content: ""; flex: none; display: inline-block; width: 2.6em; height: .8em;
  background: linear-gradient(90deg, var(--c) var(--p), var(--m-empty) var(--p));
  -webkit-mask: var(--meter) 0 0 / 100% 100% no-repeat; mask: var(--meter) 0 0 / 100% 100% no-repeat; }
.care-body { --meter: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 34 11' preserveAspectRatio='none'%3E%3Crect width='7' height='11' rx='2'/%3E%3Crect x='9' width='7' height='11' rx='2'/%3E%3Crect x='18' width='7' height='11' rx='2'/%3E%3Crect x='27' width='7' height='11' rx='2'/%3E%3C/svg%3E"); }
.care-meter { --c: var(--m-empty); --p: 0%; font-size: 13px; }
.care-pill.is-bad, .care-meter.is-bad { --c: var(--m-bad); --p: 20.6%; }
.care-pill.is-warn, .care-meter.is-warn { --c: var(--m-warn); --p: 47%; }
.care-pill.is-ok, .care-meter.is-ok { --c: var(--m-ok); --p: 73.5%; }
.care-pill.is-top, .care-meter.is-top { --c: var(--m-top); --p: 100%; }
/* only a rating that should worry the reader is in colour; no rating is quiet */
.care-pill.is-warn { color: var(--warn); }
.care-pill.is-bad { color: var(--bad); }
.care-pill.is-none { color: var(--ink-soft); font-weight: 500; }
/* on the dark band: brighter steps on a white-wash track */
.care-band { --m-empty: rgb(255 255 255 / .2); --m-top: #7CB7DE; --m-ok: #5DD39E; --m-warn: #F5B754; --m-bad: #F08A7E; }
.care-band .care-pill { color: #fff; }
.care-band .care-pill.is-warn { color: #F5B754; } .care-band .care-pill.is-bad { color: #F08A7E; }
.care-dot { flex: none; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--ink-soft); }
.care-dot.is-top { background: var(--top); } .care-dot.is-ok { background: var(--ok); }
.care-dot.is-warn { background: var(--warn); } .care-dot.is-bad { background: var(--bad); }
.care-dot.is-none { background: none; box-shadow: inset 0 0 0 1.5px var(--ink-soft); }

/* the band: who it is and its verdict */
.care-band { padding-bottom: 34px; }
.care-id { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 18px 32px; margin-top: 14px; }
.care-id-main { min-width: 0; flex: 1 1 420px; }
.care-title { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.care-title .cx-name { min-width: 0; }
.care-id-side { display: grid; justify-items: end; gap: 12px; }
.care-tags { margin-top: 14px; }
.care-tags + .care-id-sub { margin-top: 12px; }
.care-id-sub { margin: 6px 0 0; font-size: 15px; color: rgb(234 241 246 / .82); }
.care-id-sub a { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.care-verdict { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 14px 18px;
  border-radius: 16px; background: rgb(255 255 255 / .08); border: 1px solid rgb(255 255 255 / .14); }
.care-verdict .care-pill { font-size: 19px; font-weight: 700; }
.care-verdict-l { font-size: 12px; letter-spacing: .02em; color: rgb(234 241 246 / .72); }
.care-verdict-d { font-size: 13px; color: rgb(234 241 246 / .8); }
.care-verdict-d b { font-weight: 700; color: #fff; }
.care-age { font-size: 12.5px; color: rgb(234 241 246 / .7); }
.care-age.is-old { color: #F5B754; }
/* a provider's ratings: one bar in proportion, the counts under it */
.care-mix { min-width: 300px; max-width: 420px; gap: 10px; align-items: stretch; }
.care-mixbar { display: flex; gap: 3px; width: 100%; height: 12px; }
.care-mixbar i { min-width: 6px; border-radius: 4px; background: rgb(255 255 255 / .3); }
.care-mixbar i.is-top { background: #7CB7DE; } .care-mixbar i.is-ok { background: #5DD39E; }
.care-mixbar i.is-warn { background: #F5B754; } .care-mixbar i.is-bad { background: #F08A7E; }
.care-mixlist { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; }
.care-mixlist li { display: inline-flex; align-items: baseline; gap: 6px; font-size: 13px; color: rgb(234 241 246 / .8); }
.care-mixlist b { font-size: 20px; font-weight: 800; line-height: 1; color: #fff; }
.care-mixlist .care-dot { align-self: center; }
.care-band .care-dot.is-top { background: #7CB7DE; } .care-band .care-dot.is-ok { background: #5DD39E; }
.care-band .care-dot.is-warn { background: #F5B754; } .care-band .care-dot.is-bad { background: #F08A7E; }
.care-band .care-dot.is-none { box-shadow: inset 0 0 0 1.5px rgb(255 255 255 / .55); }

/* the page under the band: a main column and a side rail */
.care-grid { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 22px;
  margin-top: 22px; align-items: start; }
.care-rows { list-style: none; margin: 12px 0 0; padding: 0; }
/* rows inside a card line up with its heading: the hover wash reaches past
   the text by the same 12px on both sides */
.care-body .cx-card .care-rows { margin-inline: -12px; }
.care-body .cx-card .care-rows .co-row a { padding-inline: 12px; border-radius: 10px; }
.care-body .cx-card .care-rows .co-row + .co-row { border-top: 0; }
.care-body .cx-card .care-rows .co-row + .co-row a { box-shadow: inset 0 1px 0 var(--line); }
.care-body .cx-card .care-rows .co-row a:hover { box-shadow: none; }
.care-col, .care-side { display: grid; gap: 22px; min-width: 0; }
.care-side { position: sticky; top: 84px; }
.care-col .cx-card h3 { margin: 18px 0 8px; font-size: 14px; font-weight: 700; color: var(--ink); }
.care-note { margin: 10px 0 0; font-size: 14px; line-height: 1.6; color: var(--ink-soft); max-width: 68ch; }
.care-big { margin: 12px 0 0; font-size: 16px; line-height: 1.6; color: var(--ink); }
.care-links { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 14px 0 0; font-size: 14px; font-weight: 600; }
.care-prov-name { margin: 10px 0 0; font-size: 17px; font-weight: 700; }

/* the five key questions: one ruled list, a question and its rating on each
   line, so the longest rating ("Requires improvement") always has room */
.care-keylist { margin: 14px 0 0; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.care-keylist > div { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 6px 14px; padding: 11px 16px; font-size: 15px; }
.care-keylist > div + div { border-top: 1px solid var(--line); }
.care-keylist dt { color: var(--ink); font-weight: 600; }
.care-keylist dd { margin: 0; }
.care-keylist .care-pill.is-sm { font-size: 14px; }
/* a wide card reads them side by side, each question over its rating */
.care-keys { container-type: inline-size; }
@container (min-width: 860px) {
  .care-keylist { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }   /* 5 questions, or Wales's 4 themes */
  .care-keylist > div { flex-direction: column; align-items: flex-start; justify-content: flex-start; gap: 8px; padding: 14px 16px; }
  .care-keylist > div + div { border-top: 0; border-inline-start: 1px solid var(--line); }
  .care-keylist dd { margin-top: auto; }       /* a label on two lines never lifts its neighbours' marks */
}

.care-facts dl { margin: 12px 0 0; display: grid; gap: 10px; }
.care-facts dl > div { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 10px; font-size: 14px; }
.care-facts dt { color: var(--ink-soft); }
.care-facts dd { margin: 0; color: var(--ink); overflow-wrap: anywhere; }

.care-buyers, .care-awards, .care-hist { list-style: none; margin: 0; padding: 0; }
.care-buyers li, .care-awards li { display: flex; justify-content: space-between; gap: 14px; padding: 9px 0;
  border-bottom: 1px solid var(--line); font-size: 14px; }
.care-buyers li:last-child, .care-awards li:last-child { border-bottom: 0; }
.care-buyers li > :first-child, .care-aw-t { min-width: 0; color: var(--ink); overflow-wrap: anywhere; }
.care-buyers li > :last-child, .care-aw-m { flex: none; color: var(--ink-soft); text-align: end; }
.care-awards li { flex-direction: column; gap: 2px; }
.care-awards .care-aw-m { text-align: start; font-size: 13px; }
.care-hist li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 8px 0; font-size: 14px; border-bottom: 1px solid var(--line); }
.care-hist li:last-child { border-bottom: 0; }

/* an area: the ratings as bars */
.care-bars { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 2px; }
.care-bars li { display: block; }
.care-bars .care-bar-row { display: grid; grid-template-columns: 190px minmax(0, 1fr) 64px 14px; align-items: center; gap: 12px;
  margin: 0 -8px; padding: 6px 8px; border-radius: 10px; color: var(--ink); transition: background-color .15s ease-out; }
.care-bars a { text-decoration: none; }
.care-bar { height: 10px; border-radius: 999px; background: var(--wash); overflow: hidden; }
.care-bar i { display: block; height: 100%; border-radius: inherit; background: var(--ink-soft); }
.care-bar i.is-top { background: var(--top); } .care-bar i.is-ok { background: var(--ok); }
.care-bar i.is-warn { background: var(--warn); } .care-bar i.is-bad { background: var(--bad); }
.care-bars b { text-align: end; }

.care-arealist { list-style: none; margin: 18px 0 0; padding: 0; columns: 4 220px; column-gap: 28px; }
.care-arealist li { display: flex; justify-content: space-between; gap: 10px; padding: 7px 0; break-inside: avoid;
  border-bottom: 1px solid var(--line); font-size: 14.5px; }
.care-arealist span { color: var(--ink-soft); }

/* others nearby: a quiet list under the facts, not a card */
.care-near { padding: 4px 4px 0; }
.care-near h2 { margin: 0 0 6px; font-size: 14px; font-weight: 700; color: var(--ink-soft); }
.care-near-list { list-style: none; margin: 0 -8px; padding: 0; }
.care-near-list a { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 10px;
  color: inherit; text-decoration: none; }
.care-near-list a:hover { background: var(--wash); }
.care-near-list a:hover b { color: var(--seal); }
.care-near-list span { display: grid; min-width: 0; }
.care-near-list b { font-size: 14px; font-weight: 600; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.care-near-list small { font-size: 12.5px; color: var(--ink-soft); }
.care-near-all { display: inline-block; margin-top: 6px; font-size: 13.5px; font-weight: 600; }
.care-facts .cx-place { margin: 16px 0 0; }
.co-sg-item .care-pill { justify-self: start; }
.co-sg-item:not(:has(.care-pill)) .co-sg-label { grid-column: 1 / 3; }

/* the one link into Bidvane */
.care-cta { background: var(--seal-wash, var(--wash)); border-color: transparent; }
.care-cta p { margin: 10px 0 0; font-size: 14px; line-height: 1.6; color: var(--ink); }
.care-cta-go { display: inline-flex; margin-top: 14px; padding: 10px 16px; border-radius: 12px; background: var(--seal);
  color: #fff; font-weight: 700; font-size: 14px; text-decoration: none; }
.care-cta-go:hover { filter: brightness(1.08); text-decoration: none; }
.care-disclaimer { margin: 26px 0 0; }

@media (max-width: 960px) {
  .care-grid { grid-template-columns: minmax(0, 1fr); }
  .care-side { position: static; }
  /* one column: The service panel comes first, right after the band; Nearby keeps its place at the end */
  .care-side { display: contents; }
  .care-side > .care-facts { order: -1; }
  .care-bars .care-bar-row { grid-template-columns: 150px minmax(0, 1fr) 54px 14px; }
}
@media (max-width: 560px) {
  /* on a phone the mark reads in three short lines, not five tall ones */
  .care-verdict { width: 100%; box-sizing: border-box; flex-direction: row; flex-wrap: wrap; align-items: center;
    gap: 4px 10px; padding: 10px 14px; border-radius: 12px; }
  .care-verdict-l { flex-basis: 100%; }
  .care-verdict .care-pill { font-size: 16px; }
  .care-verdict-d, .care-age { font-size: 12px; }
  .care-id-side { width: 100%; justify-items: start; }
  .care-id-side .cx-no-acts { justify-self: start; }
  .care-mix { min-width: 0; }
  /* a row's name wraps to two lines rather than being cut, its pill smaller */
  .care-rows .co-row-name { white-space: normal; display: -webkit-box; -webkit-box-orient: vertical;
    -webkit-line-clamp: 2; line-height: 1.3; font-size: 15.5px; }
  .care-rows .co-row-meta { white-space: normal; }
  .care-rows .co-row-side .care-pill { font-size: 12.5px; }
  .care-rows .co-row a { align-items: flex-start; }
  .care-rows .co-row-side { padding-top: 2px; }
  .care-keylist > div { padding: 10px 14px; }
  .care-bars .care-bar-row { grid-template-columns: minmax(0, 1fr) 54px 14px; }
  .care-bars .care-bar { grid-column: 1 / -1; grid-row: 2; }
  .care-facts dl > div { grid-template-columns: 96px minmax(0, 1fr); }
}
@media (min-width: 1800px) {
  .care-grid { grid-template-columns: minmax(0, 1fr) 380px; gap: 28px; }
}
/* Front door, latest rating changes: who on the left; was, an arrow coloured by
   the direction, and now on the right, the old rating quiet. */

.care-fine { margin: 14px 0 0; font-size: 12.5px; line-height: 1.55; color: var(--ink-soft); }
.care-fine a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }

   icon in the address tile's 40px column so every line of text starts where the address does */
.care-biz { list-style: none; margin: 16px 0 0; padding: 6px 14px; border-radius: 14px; background: var(--wash); }
.care-biz li { display: grid; grid-template-columns: 40px minmax(0, 1fr); align-items: center; column-gap: 12px;
  min-height: 34px; font-size: 14.5px; line-height: 1.4; color: var(--ink-soft); }
.care-biz svg { justify-self: center; width: 18px; height: 18px; fill: none; stroke: var(--seal); stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round; }
.care-biz a { min-width: 0; padding: 4px 0; font-weight: 600; color: var(--ink); text-decoration: none; overflow-wrap: break-word; }
.care-biz a:hover { color: var(--seal); text-decoration: underline; text-underline-offset: 3px; }
.care-biz a:focus-visible { outline: 2px solid var(--seal); outline-offset: 2px; border-radius: 4px; }

.care-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.care-facts .cx-place:has(+ .care-biz) { border-radius: 14px 14px 0 0; padding-bottom: 12px; }
.care-facts .cx-place + .care-biz { margin-top: 0; border-radius: 0 0 14px 14px; padding-top: 4px;
  box-shadow: inset 0 1px 0 var(--line); }    /* the address and the ways to reach it, one panel */
/* a service not rated yet: when it registered, and how its provider's other services do */
.care-new { margin: 10px 0 0; font-size: 15px; line-height: 1.6; max-width: 68ch; }

/* ── the IL site's own pieces ── */


.cr-main { max-width: 960px; margin-inline: auto; padding-block: 28px 56px; }
.cr-h1 { font-family: var(--font-display); font-size: clamp(26px, 4vw, 36px); line-height: 1.2; margin: 0 0 8px; color: var(--ink); }
.cr-lede { font-size: 17px; line-height: 1.6; color: var(--ink-soft); margin: 0 0 18px; max-width: 62ch; }
.cr-crumb { font-size: 14px; color: var(--ink-soft); margin: 0 0 10px; }
.cr-crumb a { color: inherit; }
.cr-muted { color: var(--ink-soft); }

.cr-search { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.cr-search > * { width: auto; margin: 0; }
.cr-search input { flex: 1 1 260px; min-width: 0; height: 46px; padding: 0 14px; font: inherit; font-size: 16px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); }
.cr-search select { height: 46px; padding: 0 10px; font: inherit; border: 1px solid var(--line); border-radius: 10px;
  background: var(--surface); color: var(--ink); }
.cr-search button { height: 46px; padding: 0 22px; font: inherit; font-weight: 600; border: 0; border-radius: 10px;
  background: var(--seal); color: #fff; cursor: pointer; }
.cr-search input:focus-visible, .cr-search select:focus-visible, .cr-search button:focus-visible { outline: 2px solid var(--seal); outline-offset: 2px; }

.cr-count { font-size: 14px; color: var(--ink-soft); margin: 4px 0 8px; }
.cr-empty { padding: 24px; color: var(--ink-soft); }
.cr-list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); overflow: hidden; }
.cr-row + .cr-row { border-top: 1px solid var(--line); }
.cr-row a { display: flex; align-items: center; gap: 14px; padding: 12px 18px; color: inherit; text-decoration: none; }
.cr-row a:hover { background: var(--wash); }
.cr-row a:focus-visible { outline: 2px solid var(--seal); outline-offset: -2px; }
.cr-row-main { flex: 1; min-width: 0; display: grid; gap: 2px; }
.cr-row-name { font-size: 16px; font-weight: 600; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cr-row a:hover .cr-row-name { color: var(--seal); }
.cr-row-meta { font-size: 13px; color: var(--ink-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cr-row-side { flex: none; display: flex; align-items: center; gap: 12px; }
.cr-row-beds { font-size: 13px; color: var(--ink-soft); }

/* the ministry's score: a tinted badge, the number always printed */
.cr-score { --t: clamp(0, (var(--s) - 40) / 50, 1);
  display: inline-grid; place-items: center; min-width: 44px; height: 32px; padding: 0 8px; border-radius: 8px;
  font-weight: 700; font-size: 15px;
  color: color-mix(in srgb, var(--ok) calc(var(--t) * 100%), var(--bad));
  background: color-mix(in srgb, var(--ok-wash) calc(var(--t) * 100%), var(--bad-wash)); }
.cr-score.is-none { --s: 0; font-size: 12px; font-weight: 500; color: var(--ink-soft); background: var(--wash); }
.cr-score-lg { min-width: 72px; height: 64px; font-size: 30px; border-radius: 14px; }

.cr-about { margin-top: 18px; font-size: 15px; color: var(--ink-soft); }
.cr-about summary { cursor: pointer; color: var(--seal); }
.cr-about p { line-height: 1.6; max-width: 70ch; }

/* one home */
.cr-place-head { display: flex; gap: 20px; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; margin-bottom: 8px; }
.cr-place-sub { color: var(--ink-soft); margin: 0 0 10px; }
.cr-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; }
.cr-tag { font-size: 13px; padding: 3px 10px; border-radius: 99px; background: var(--seal-wash); color: var(--ink); }
.cr-tag.is-agree { background: var(--ok-wash); color: var(--ok); }
.cr-scorecard { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.cr-scorecard-t { font-size: 13px; line-height: 1.5; color: var(--ink-soft); }
.cr-sec { margin-top: 28px; }
.cr-sec h2 { font-family: var(--font-display); font-size: 20px; margin: 0 0 12px; color: var(--ink); }
.cr-table { width: 100%; max-width: 520px; border-collapse: collapse; font-size: 15px; }
.cr-table td { padding: 8px 4px; border-bottom: 1px solid var(--line); }
.cr-table td:last-child { text-align: end; width: 80px; }
.cr-total td { font-weight: 700; border-bottom: 0; }
.cr-note { font-size: 14px; color: var(--ink-soft); margin: 10px 0 0; }

.cr-trend { display: flex; align-items: flex-end; gap: 10px; height: 130px; margin-bottom: 16px; padding: 0 2px; }
.cr-bar { --t: clamp(0, (var(--s) - 40) / 50, 1);
  display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; width: 44px; height: 100%; }
.cr-bar b { font-size: 13px; color: var(--ink); }
.cr-bar::before { content: ""; order: 1; width: 100%; height: calc(var(--s) * 1%); border-radius: 6px 6px 2px 2px;
  background: color-mix(in srgb, var(--ok) calc(var(--t) * 100%), var(--bad)); opacity: .8; }
.cr-bar b { order: 0; }
.cr-bar i { order: 2; font-style: normal; font-size: 12px; color: var(--ink-soft); }

.cr-insp { list-style: none; margin: 0; padding: 0; font-size: 15px; }
.cr-insp li { display: flex; flex-wrap: wrap; gap: 6px 14px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.cr-insp li > span:first-child { min-width: 88px; color: var(--ink-soft); }
.cr-insp-score { font-weight: 700; }
.cr-insp a { margin-inline-start: auto; }
.cr-source { margin-top: 32px; font-size: 13px; color: var(--ink-soft); }

@media (max-width: 640px) {
  .cr-main { padding-inline: 16px; }
  .cr-row a { padding: 12px 14px; }
  .cr-row-beds { display: none; }
  .cr-search select { flex: 1 1 40%; }
  .cr-search button { flex: 1 1 100%; }
  .cr-scorecard { width: 100%; }
}

/* the Welfare ministry's services: no score, a phone on the side */
.cr-also { font-size: 15px; color: var(--ink-soft); margin: -6px 0 14px; }
.cr-svc { display: flex; align-items: center; gap: 14px; padding: 12px 18px; }
.cr-svc + .cr-svc { border-top: 1px solid var(--line); }
.cr-svc-main { flex: 1; min-width: 0; display: grid; gap: 2px; }
.cr-svc-name { font-size: 16px; font-weight: 600; color: var(--ink); }
.cr-svc-phone { flex: none; font-size: 14px; }

/* polish: towns, the list's head, the score's note, the long inspection history */
.cr-towns { display: flex; flex-wrap: wrap; gap: 6px 8px; margin: 0 0 14px; }
.cr-towns a { font-size: 14px; padding: 5px 12px; border: 1px solid var(--line); border-radius: 99px; color: var(--ink); text-decoration: none; background: var(--surface); transition: border-color .15s ease, color .15s ease; }
.cr-towns a span { color: var(--ink-soft); margin-inline-start: 2px; }
.cr-towns a:hover { border-color: var(--seal); color: var(--seal); }
.cr-listhead { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 16px; margin: 6px 0 8px; }
.cr-listhead .cr-count { margin: 0; }
.cr-listhead .cr-about { margin: 0; font-size: 14px; }
.cr-listhead .cr-about[open] { flex-basis: 100%; }
.cr-listhead .cr-about p { margin: 8px 0 4px; padding: 12px 14px; border-radius: 10px; background: var(--seal-wash); color: var(--ink); }
.cr-more { margin-top: 4px; }
.cr-more summary { cursor: pointer; padding: 10px 0; font-size: 14px; color: var(--seal); }
.cr-body ::selection { background: var(--seal-wash); color: var(--ink); }
.cr-body a:focus-visible, .cr-body summary:focus-visible { outline: 2px solid var(--seal); outline-offset: 2px; border-radius: 4px; }
.cr-insp a, .cr-place a, .cr-about a { text-underline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { .cr-towns a { transition: none; } }
@media (max-width: 640px) { .cr-towns a:nth-child(n+9) { display: none; } }
.cr-search input::placeholder { color: var(--ink-soft); opacity: 1; }


/* the front door, as the UK care site's (uk care.css "the front door"): an
   Israeli care home at the end of its garden, full width behind the search;
   the search in its sky, a veil keeps the words readable, the photo melts
   into the page at its foot; dusk in dark mode. One screen, no scroll. */
body:has(main.cr-door) { display: flex; flex-direction: column; min-height: 100svh; }
main.cr-door { flex: 1 0 auto; display: flex; flex-direction: column; width: 100%; margin-block: 0; padding-bottom: 0; }
.cr-door .ps-hero-wrap { position: relative; z-index: 1; flex: 1 0 auto; padding-top: clamp(28px, 6vh, 80px); padding-bottom: 72px; }
.cr-door-bg { position: fixed; z-index: -1; left: 0; width: 100vw;
  top: calc(var(--care-bar, 64px) + clamp(96px, 13svh, 150px));
  height: calc(100lvh - var(--care-bar, 64px) - clamp(96px, 13svh, 150px));
  overflow: hidden; pointer-events: none; }
.cr-door-bg img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 72%;
  filter: saturate(1.04); }
.cr-door-bg::after { content: ""; position: absolute; inset: 0;
  background: linear-gradient(to bottom, var(--paper) 0%, rgb(250 250 247 / .6) 12%, rgb(250 250 247 / .12) 28%,
    rgb(250 250 247 / 0) 46%, rgb(250 250 247 / 0) 100%); }
:root[data-ps-theme="dark"] .cr-door-bg img { filter: brightness(.48) saturate(.85) sepia(.1); }
:root[data-ps-theme="dark"] .cr-door-bg::after {
  background: linear-gradient(to bottom, var(--paper) 0%, rgb(17 26 32 / .65) 12%, rgb(17 26 32 / .18) 28%,
    rgb(17 26 32 / 0) 46%, rgb(17 26 32 / 0) 100%); }
/* the lines under the box sit on the photo: each on its own soft panel */
.cr-door-meta-wrap { display: grid; justify-items: center; gap: 10px; margin-top: 4px; }
.cr-door .cr-door-meta, .cr-door .ps-examples { width: fit-content; max-width: 100%; margin: 0 auto; padding: 4px 14px;
  border-radius: 999px; background: color-mix(in srgb, var(--surface) 84%, transparent);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.cr-door .ps-examples { border-radius: 18px; padding: 6px 12px; }
/* the footer on its own page-coloured ground, the photo fading into it */
body.care-body:has(main.cr-door) .ps-footer::before { content: ""; position: absolute; left: 0; right: 0; bottom: 100%; height: 56px;
  background: linear-gradient(to bottom, transparent, var(--paper)); pointer-events: none; }
html:has(main.cr-door) { scrollbar-gutter: auto; }
@media (max-width: 640px) {
  .cr-door .ps-hero-wrap { padding-top: 22px; padding-bottom: 24px; }
  .cr-door { --care-bar: 64px; }
  .cr-door-bg img { object-position: 60% 72%; }
}


/* the score inside a pill: the number, then a quiet "/100" */
.care-pill-of { font-size: max(11px, .78em); font-weight: 500; color: var(--ink-soft); margin-left: 1px; }
.care-band .care-pill-of { color: rgb(234 241 246 / .7); }
.care-band .care-pill.is-none { color: rgb(234 241 246 / .85); }
.care-rows { margin: 0; }
.cr-card { border: 1px solid var(--line); border-radius: 14px; background: var(--surface); overflow: hidden; }
.care-depts dd { color: var(--ink-soft); font-weight: 600; }
.care-insp-box .cr-insp { margin-top: 10px; }
.cr-insp li .care-pill { flex: none; }
.cr-bar.is-top::before { background: var(--m-top); } .cr-bar.is-ok::before { background: var(--m-ok); }
.cr-bar.is-warn::before { background: var(--m-warn); } .cr-bar.is-bad::before { background: var(--m-bad); }

/* the results: what the sentence was read as, each a chip that comes off */
.cr-chips { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 14px; padding: 0; }
.cr-chips li { display: inline-flex; align-items: center; gap: 6px; padding: 5px 6px 5px 12px; padding-inline: 12px 6px;
  border-radius: 99px; background: var(--seal-wash); color: var(--ink); font-size: 14px; font-weight: 600; }
.cr-chips a { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; color: var(--ink-soft); }
.cr-chips a:hover { background: color-mix(in srgb, var(--ink) 10%, transparent); color: var(--ink); }
.cr-facets { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 14px; }
.cr-facets > * { width: auto; margin: 0; }
.cr-facets select { height: 40px; padding: 0 10px; font: inherit; font-size: 14px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--surface); color: var(--ink); }
.cr-check { display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 12px; font-size: 14px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); cursor: pointer; }
.cr-check input { width: auto; margin: 0; accent-color: var(--seal); }
/* Hebrew reads from the right: the meter fills from the right too */
[dir="rtl"] .care-pill::before, [dir="rtl"] .care-meter { transform: scaleX(-1); }

/* the licensing inspections, as the UK page's rating history: one ruled row
   each, newest first: the date, the score's pill, the change from the one
   before (in words, coloured only when it moved), the report */
.cr-lic { list-style: none; margin: 14px 0 0; padding: 0; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.cr-lic li { display: grid; grid-template-columns: 96px auto minmax(0, 1fr) auto; align-items: center; gap: 6px 16px;
  padding: 11px 16px; font-size: 15px; }
.cr-lic li + li { border-top: 1px solid var(--line); }
.cr-lic li:first-child { background: color-mix(in srgb, var(--seal-wash) 55%, transparent); }
.cr-lic-date { color: var(--ink-soft); }
.cr-lic .care-pill { font-size: 15px; }
.cr-lic-d { font-size: 13.5px; color: var(--ink-soft); }
.cr-lic-d.is-up { color: var(--ok); font-weight: 600; }
.cr-lic-d.is-down { color: var(--bad); font-weight: 600; }
.cr-lic-d span[aria-hidden] { font-size: 10px; margin-inline-end: 2px; }
.cr-lic-doc { font-size: 14px; font-weight: 600; }
@media (max-width: 560px) {
  .cr-lic li { grid-template-columns: auto minmax(0, 1fr) auto; padding: 10px 12px; }
  .cr-lic-date { grid-column: 1 / -1; font-size: 13px; }
}

/* the street view on top of the address panel, one piece with it (as the UK page) */
.care-street { margin-top: 16px; aspect-ratio: 16 / 10; border-radius: 14px 14px 0 0; overflow: hidden; background: var(--wash); }
.care-street iframe { display: block; width: 100%; height: 100%; border: 0; }
.care-street + .cx-place { margin-top: 0; border-radius: 0 0 14px 14px; }

/* the results page: the companies site's frame; the score's note floats over
   the list from a small mark beside the count (never pushes the page down) */
.cr-results-main .cr-town { margin: 8px 0 14px; }
.cr-dropped { margin: -4px 0 12px; font-size: 14px; color: var(--ink-soft); }
.cr-meta-row .ps-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 0; }
.cr-meta-beds { color: var(--ink-soft); }
.cr-tip { position: relative; margin-inline-start: 14px; }
.cr-tip-btn { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border: 0; border-radius: 99px;
  background: var(--wash); color: var(--ink-soft); font: inherit; font-size: 13px; cursor: pointer; }
.cr-tip-btn:hover, .cr-tip-btn[aria-expanded="true"] { background: var(--seal-wash); color: var(--seal); }
.cr-tip-note { position: absolute; z-index: 30; inset-inline-start: 0; top: calc(100% + 8px); width: min(360px, 86vw);
  display: grid; gap: 6px; padding: 14px 16px; border-radius: 12px; background: var(--surface); color: var(--ink);
  font-size: 14px; line-height: 1.55; font-weight: 400;
  box-shadow: 0 0 0 1px var(--line), 0 14px 34px -10px rgb(8 18 26 / .28); }
.cr-tip-note[hidden] { display: none; }
.cr-tip-note b { font-size: 14.5px; }
.cr-tip-key { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin-top: 4px; font-size: 12.5px; color: var(--ink-soft); }
.cr-tip-key .care-meter { font-size: 11px; margin-inline-start: 4px; }
.cr-results .care-rows .co-row-side .care-pill { font-size: 14px; }
@media (max-width: 560px) {
  .cr-tip { margin-inline-start: 0; flex-basis: 100%; margin-top: 6px; }
}
.cr-tip-key { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 14px; }
.cr-tip-key > span { display: inline-flex; align-items: center; gap: 7px; }
.cr-tip-key .care-meter { margin: 0; }
.care-rows .co-row-meta .co-sep { white-space: nowrap; }

/* צופית where the UK care site keeps Vane (uk assistant.css .vn-pub): the
   launcher at the bottom left, its line and its panel opening from there */
.care-body .vn.is-pub .vn-launch { right: auto; left: 32px; }
.care-body .vn.is-pub .vn-launch-tip { right: auto; left: 68px; border-radius: 14px 14px 14px 4px; transform-origin: 0 100%; }
.care-body .vn.is-pub .vn-panel { right: auto; left: 22px; transform-origin: 0 100%; }
@media (max-width: 640px) {
  .care-body .vn.is-pub .vn-launch { right: auto; left: 20px; }
  .care-body .vn.is-pub .vn-launch-tip { right: auto; left: 60px; width: max-content; max-width: calc(100vw - 120px);
    white-space: normal; text-wrap: balance; text-align: start; }
  .care-body .vn.is-pub .vn-panel { left: 0; right: 0; }
}
/* the UK door's measures (uk care.css, measured at 1440x900): the hero from
   the top, the wordmark ~72px under the bar, the photo starting under the
   tagline (the bar plus 13% of the screen), the counts 12px under the box */
.cr-door .ps-hero-wrap { display: block; min-height: 0; padding-top: clamp(36px, 8vh, 96px); }
.cr-door .ps-hero { margin-inline: auto; }
.cr-door-meta-wrap { margin-top: 12px; }
.cr-door .ps-examples { justify-content: center; max-width: min(760px, 100%); }
body.care-body.ps-body.jb-body-page:has(main.cr-door) .ps-footer { position: relative; background: var(--paper); }
/* the UK door's place for the hero: the wordmark 72px under the bar at 900px high */
main.cr-door #ps-hero { padding-top: clamp(36px, 8vh, 96px); }
/* a service's name is the way to its own page */
a.cr-svc-name { color: var(--ink); text-decoration: none; }
a.cr-svc-name:hover { color: var(--seal); text-decoration: underline; text-underline-offset: 3px; }
.cx-card .cr-list-in { margin: 10px -4px 0; border: 0; background: none; }
.cx-card .cr-list-in .cr-svc { padding-inline: 4px; }
.cr-verdict-name { font-size: 18px; font-weight: 700; color: #fff; }

/* the band (a home's and a service's page) on the front door's photo, as the
   UK care site's: darkened hard so the white text stays sharp; the picture is
   texture, not content */
html .care-body .care-band.cx-band::before {
  background:
    linear-gradient(180deg, rgb(9 20 29 / .80), rgb(9 20 29 / .90)),
    url("img/care/home-il-1280.webp") 50% 62% / cover no-repeat, #0F1A21;
}
@media (min-width: 1300px) { html .care-body .care-band.cx-band::before { background-image:
    linear-gradient(180deg, rgb(9 20 29 / .80), rgb(9 20 29 / .90)), url("img/care/home-il-1920.webp"); } }
/* Save sits centred over the score card, not flush to its edge (phones keep it to the start) */
@media (min-width: 561px) { .care-id-side { justify-items: stretch; } .care-id-side .cx-no-acts { justify-self: center; } }
.cr-lic.is-short li:nth-child(n+11) { display: none; }
.cr-lic-more { margin-top: 10px; padding: 7px 14px; border: 1px solid var(--line); border-radius: 99px; background: var(--surface);
  color: var(--seal); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.cr-lic-more:hover { border-color: var(--seal); }
.cr-lic-more:focus-visible { outline: 2px solid var(--seal); outline-offset: 2px; }

/* how to reach it, under the address, one piece with it (the UK's .care-biz):
   the number reads left to right inside, the line starts where the address does */
.care-facts .cx-place:has(+ .care-biz) { border-radius: 14px 14px 0 0; padding-bottom: 12px; margin-bottom: 0; }
.care-facts .cx-place + .care-biz { margin-top: 0; border-radius: 0 0 14px 14px; padding-top: 4px;
  border-top: 1px solid color-mix(in srgb, var(--ink) 8%, transparent); }
.care-biz a { justify-self: start; }
.care-biz bdi { unicode-bidi: isolate; }

/* a whole list (/care/homes, /care/services): a heading, the count, and a
   search box of its own: tall, round, its mark inside, a clear focus */
.cr-lhead { margin: 10px 0 18px; }
.cr-lhead .cr-h1 { margin-bottom: 4px; }
.cr-lhead-sub { margin: 0 0 16px; font-size: 15.5px; color: var(--ink-soft); }
.cr-lhead-sub b { color: var(--ink); }
.cr-lsearch { position: relative; display: flex; align-items: center; gap: 8px; max-width: 720px; padding: 6px;
  border-radius: 16px; background: var(--surface); border: 1px solid var(--line);
  box-shadow: 0 1px 2px rgb(15 29 38 / .04), 0 10px 26px -14px rgb(15 29 38 / .25);
  transition: border-color .15s ease, box-shadow .15s ease; }
.cr-lsearch:focus-within { border-color: var(--seal);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--seal) 16%, transparent), 0 10px 26px -14px rgb(15 29 38 / .25); }
.cr-lsearch-ic { flex: none; display: grid; place-items: center; width: 40px; color: var(--ink-soft); }
.cr-lsearch-in { flex: 1; min-width: 0; height: 46px; margin: 0; padding: 0 2px; border: 0; outline: 0; background: none;
  font: inherit; font-size: 16.5px; color: var(--ink); }
.cr-lsearch-in::placeholder { color: var(--ink-soft); opacity: 1; }
.cr-lsearch-in::-webkit-search-cancel-button { display: none; }
.cr-lsearch-x { flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%;
  color: var(--ink-soft); text-decoration: none; font-size: 13px; }
.cr-lsearch-x:hover { background: var(--wash); color: var(--ink); }
.cr-lsearch-go { flex: none; height: 46px; padding: 0 22px; border: 0; border-radius: 12px; background: #16222B; color: #fff;
  font: inherit; font-size: 15px; font-weight: 700; cursor: pointer; }
.cr-lsearch-go:hover { background: #243B4D; }
.cr-lsearch-go:focus-visible { outline: 2px solid var(--seal); outline-offset: 2px; }
:root[data-ps-theme="dark"] .cr-lsearch-go { background: #EAF1F6; color: #0F1A21; }
@media (max-width: 560px) {
  .cr-lsearch-go { padding: 0 14px; }
  .cr-lsearch-ic { width: 30px; }
}
@media (prefers-reduced-motion: reduce) { .cr-lsearch { transition: none; } }

/* the phone and email inside the address box, under a hairline: each row's
   mark in the address mark's column, the value where the address starts */
.cr-place-sep { grid-column: 1 / -1; height: 1px; margin: 10px 0 4px;
  background: color-mix(in srgb, var(--ink) 10%, transparent); }
.cr-place-ic2 { grid-column: 1; display: grid; place-items: center; width: 40px; height: 30px; color: var(--seal); }
.cr-place-v { grid-column: 2; justify-self: start; font-size: 15px; font-weight: 600; color: var(--ink);
  text-decoration: none; overflow-wrap: anywhere; }
.cr-place-v:hover { color: var(--seal); text-decoration: underline; text-underline-offset: 3px; }
.cr-place-v:focus-visible { outline: 2px solid var(--seal); outline-offset: 2px; border-radius: 4px; }
/* the regions over the photo, crisp: white chips with a hairline edge and a
   firmer weight, on a near-solid panel (light); the night's own in dark */
.cr-door .ps-examples { background: color-mix(in srgb, var(--surface) 94%, transparent); }
.cr-door .ps-examples .ps-example { background: #fff; color: var(--ink); font-weight: 600;
  border: 1px solid color-mix(in srgb, var(--ink) 14%, transparent); box-shadow: 0 1px 1px rgb(15 29 38 / .05); }
.cr-door .ps-examples .ps-example:hover { border-color: var(--seal); color: var(--seal); }
.cr-door .ps-examples .ps-examples-label { color: var(--ink); font-weight: 600; }
.cr-door .cr-door-meta { background: color-mix(in srgb, var(--surface) 94%, transparent); color: var(--ink); }
:root[data-ps-theme="dark"] .cr-door .ps-examples .ps-example { background: #1B2A35; color: #EAF1F6;
  border-color: rgb(255 255 255 / .14); box-shadow: none; }
/* the regions as one list on a phone (the chips stay on wider screens) */
.cr-area-pick { display: none; }
@media (max-width: 640px) {
  .cr-door .ps-examples { display: none; }
  .cr-area-pick { display: block; width: min(100%, 320px); margin: 0 auto; }
  .cr-area-pick select { width: 100%; height: 44px; padding: 0 14px; font: inherit; font-size: 15px; font-weight: 600;
    color: var(--ink); border: 1px solid color-mix(in srgb, var(--ink) 14%, transparent); border-radius: 12px;
    background: color-mix(in srgb, var(--surface) 94%, transparent); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
  .cr-area-pick select:focus-visible { outline: 2px solid var(--seal); outline-offset: 2px; }
}
/* the door's totals: calm, the numbers only a step firmer than the words */
.cr-door .cr-door-meta { font-size: 13px; color: var(--ink-soft); padding: 5px 14px; }
.cr-door .cr-door-meta .jb-count-n { font-weight: 600; color: var(--ink); }
@media (max-width: 640px) {
  .cr-door .cr-door-meta { max-width: 300px; font-size: 12.5px; line-height: 1.5; border-radius: 14px;
    text-align: center; text-wrap: balance; }
  .cr-area-pick { width: 220px; }
  .cr-area-pick select { height: 40px; font-size: 14px; font-weight: 400; border-radius: 10px; }
}
@media (max-width: 640px) {
  /* one short line on a phone: the beds stay on wider screens */
  .cr-door .cr-m-beds { display: none; }
  .cr-door .cr-door-meta { max-width: none; white-space: nowrap; border-radius: 999px; padding: 4px 12px; }
}
/* a service's row: the whole row is the way to its page, a quiet chevron at its end */
.cr-list .cr-svc-row + .cr-svc-row { border-top: 1px solid var(--line); }
.cr-svc-row .co-row-name { white-space: normal; }
.cr-svc-row .co-row-meta { white-space: normal; }
.cr-row-go { color: var(--ink-soft); }
.cr-svc-row a:hover .cr-row-go { color: var(--seal); }
.cx-card .cr-list-in .cr-svc-row a { padding-inline: 4px; border-radius: 10px; }
/* the list search's input: the box draws the focus (its blue ring), so the
   site-wide orange outline on a focused input stays off here */
.cr-lsearch .cr-lsearch-in:focus, .cr-lsearch .cr-lsearch-in:focus-visible { outline: none; box-shadow: none; border: 0; }
