/* ============================================================
   NursingHomeGuide.sg — consolidated stylesheet
   Extracted from inline <style> blocks across 451 pages.
   Generated by Phase 1 of the impeccable extract pass.
   ============================================================ */

/* ─── Base + facility-page styles (canonical, was inline on 334 pages) ─── */
:root{--blue:#2563eb;--ink:#1f2937;--muted:#6b7280;--bg:#f8fafc;--card:#fff;--line:#e5e7eb}
*{box-sizing:border-box}
body{margin:0;font-family:-apple-system,BlinkMacSystemFont,Inter,Segoe UI,sans-serif;background:var(--bg);color:var(--ink);line-height:1.55}
.wrap{max-width:880px;margin:0 auto;padding:24px 20px 60px}
.crumb{font-size:13px;color:var(--muted);margin-bottom:16px}
.crumb a{color:var(--muted);text-decoration:none}
.crumb a:hover{color:var(--blue)}
.hero{background:var(--card);border:1px solid var(--line);border-radius:14px;padding:24px 28px;margin-bottom:20px}
.hero.has-img{display:grid;grid-template-columns:1.5fr 1fr;gap:28px;align-items:stretch;padding:24px 28px}
.hero-text{min-width:0}
.hero-image{position:relative;border-radius:12px;overflow:hidden;background:#f1f5f9;min-height:240px}
.hero-image img{width:100%;height:100%;object-fit:cover;display:block}
.hero-image .hero-cred{position:absolute;left:8px;bottom:8px;background:rgba(0,0,0,.55);color:#fff;padding:3px 8px;border-radius:6px;font-size:10px;letter-spacing:.02em;backdrop-filter:blur(4px)}
@media(max-width:680px){
  .hero.has-img{grid-template-columns:1fr;gap:18px;padding:18px 20px}
  .hero-image{aspect-ratio:16/9;min-height:0;order:-1}
}
h1{margin:0 0 6px;font-size:28px;letter-spacing:-.01em}
.subtitle{color:var(--muted);font-size:15px;margin-bottom:14px}
.pills{display:flex;flex-wrap:wrap;gap:6px;margin-top:4px}
.pill{font-size:12px;font-weight:600;padding:4px 10px;border-radius:999px;letter-spacing:.02em}
.pill.op{background:#dbeafe;color:#1e40af}
.pill.lic-pending{background:#fef3c7;color:#92400e}
.pill.lic-ok{background:#dcfce7;color:#166534}
.pill.svc{background:#ede9fe;color:#5b21b6}
.pill.pall{background:#fce7f3;color:#9d174d}
.pill.region{background:#f1f5f9;color:#475569}
.grid{display:grid;grid-template-columns:1.6fr 1fr;gap:20px;margin-top:20px}
.grid>div{min-width:0}
@media(max-width:680px){.grid{grid-template-columns:1fr}}
.card{background:var(--card);border:1px solid var(--line);border-radius:12px;padding:18px 22px;margin-bottom:16px}
.card h2{margin:0 0 10px;font-size:15px;text-transform:uppercase;letter-spacing:.06em;color:var(--muted)}
.kv{display:grid;grid-template-columns:90px 1fr;gap:6px 12px;font-size:14px}
.kv .k{color:var(--muted)}
.kv .v{color:var(--ink)}
.kv a{color:var(--blue);text-decoration:none;word-break:break-word}
.kv a:hover{text-decoration:underline}
.rating{font-size:24px;font-weight:700;color:var(--blue)}
.rating small{font-size:13px;color:var(--muted);font-weight:400;margin-left:8px}
.social{display:flex;flex-wrap:wrap;gap:10px;margin-top:4px}
.social a{display:inline-flex;align-items:center;justify-content:center;width:38px;height:38px;border-radius:50%;background:var(--bg);color:var(--ink);text-decoration:none;transition:background .15s,color .15s}
.social a:hover{background:var(--blue);color:#fff}
.social svg{width:18px;height:18px;fill:currentColor}
.donate{background:linear-gradient(180deg,#fef3c7,#fff);border:1px solid #fde68a;border-radius:12px;padding:18px 22px;margin-bottom:16px}
.donate h2{margin:0 0 8px;font-size:15px;text-transform:uppercase;letter-spacing:.06em;color:#854d0e}
.donate a.btn{display:inline-block;background:#d97706;color:#fff;padding:9px 18px;border-radius:8px;text-decoration:none;font-weight:600;font-size:14px;margin-top:6px}
.donate a.btn:hover{background:#b45309}
.donate p{margin:0;font-size:13px;color:#78350f}
.yt-card{margin-bottom:16px;background:var(--card);border:1px solid var(--line);border-radius:12px;overflow:hidden}
.yt-card .embed{position:relative;padding-top:56.25%;background:#000}
.yt-card .embed a{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;background:linear-gradient(135deg,#1f1f1f,#7f1d1d);color:#fff;text-decoration:none}
.yt-card .embed a svg{width:64px;height:64px}
.yt-card .embed iframe{position:absolute;inset:0;width:100%;height:100%;border:0}
.yt-card .label{padding:10px 14px;font-size:13px;color:var(--muted);display:flex;justify-content:space-between;align-items:center}
.yt-card .label a{color:var(--blue);text-decoration:none}
.yt-list{background:var(--card);border:1px solid var(--line);border-radius:12px;padding:18px 22px;margin-bottom:16px;overflow:hidden}
.yt-list-hd{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px}
.yt-list-hd h2{margin:0;font-size:15px;text-transform:uppercase;letter-spacing:.06em;color:var(--muted)}
.yt-arrows{display:flex;gap:6px;flex-shrink:0}
.yt-arrow{width:28px;height:28px;border:1px solid var(--line);border-radius:50%;background:var(--card);cursor:pointer;display:flex;align-items:center;justify-content:center;padding:0;transition:background .15s}
.yt-arrow:hover{background:var(--bg)}
.yt-arrow svg{width:13px;height:13px;fill:none;stroke:#374151;stroke-width:2.5;stroke-linecap:round;stroke-linejoin:round}
.yt-arrow[disabled]{opacity:.3;pointer-events:none}
.yt-grid{display:flex;width:100%;min-width:0;box-sizing:border-box;gap:14px;overflow-x:auto;scroll-snap-type:x mandatory;scroll-behavior:smooth;-webkit-overflow-scrolling:touch;padding-bottom:6px;scrollbar-width:none}
.yt-grid::-webkit-scrollbar{display:none}
.yt-item{flex:0 0 220px;display:block;text-decoration:none;color:inherit;border-radius:10px;overflow:hidden;transition:transform .15s;scroll-snap-align:start}
.yt-item:hover{transform:translateY(-2px)}
.yt-thumb{position:relative;padding-top:56.25%;background:#000;border-radius:10px;overflow:hidden}
.yt-thumb img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.yt-thumb .play{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;background:rgba(0,0,0,.15);transition:background .15s}
.yt-item:hover .yt-thumb .play{background:rgba(0,0,0,.35)}
.yt-thumb .play svg{width:46px;height:46px;fill:#fff;filter:drop-shadow(0 2px 4px rgba(0,0,0,.6))}
.yt-thumb .tour-badge{position:absolute;top:7px;left:7px;background:#16a34a;color:#fff;font-size:10px;font-weight:700;padding:2px 8px;border-radius:999px;letter-spacing:.04em;text-transform:uppercase}
.yt-meta{padding:8px 2px 4px;font-size:12px}
.yt-meta .t{color:var(--ink);font-weight:500;line-height:1.35;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.yt-meta .v{color:var(--muted);margin-top:2px}
.yt-footer{margin-top:12px;font-size:12px;color:var(--muted);text-align:right}
.yt-footer a{color:var(--blue);text-decoration:none}
@media(max-width:520px){
  .yt-item{flex:0 0 170px}
  .yt-arrows{display:none}
}
.about{font-size:14px;color:var(--ink);line-height:1.55}
.about-source{font-size:12px;color:var(--muted);margin-top:8px;font-style:italic}
.review{padding:12px 0;border-bottom:1px solid var(--line)}
.review:last-child{border-bottom:0}
.review .head{display:flex;justify-content:space-between;align-items:baseline;font-size:13px;color:var(--muted);margin-bottom:4px}
.review .head .who{color:var(--ink);font-weight:600}
.review .stars{color:#f59e0b;letter-spacing:1px}
.review .body{font-size:14px;color:var(--ink);line-height:1.5}
.review-foot{font-size:12px;color:var(--muted);margin-top:10px;font-style:italic}
.review-foot a{color:var(--blue);text-decoration:none}
.share{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin-top:6px}
.share .lbl{font-size:12px;color:var(--muted);text-transform:uppercase;letter-spacing:.06em;margin-right:4px}
.share a, .share button{display:inline-flex;align-items:center;justify-content:center;width:34px;height:34px;border-radius:50%;background:var(--bg);border:1px solid var(--line);color:var(--ink);text-decoration:none;cursor:pointer;padding:0;transition:background .15s,color .15s,border-color .15s}
.share a:hover, .share button:hover{background:var(--blue);color:#fff;border-color:var(--blue)}
.share svg{width:16px;height:16px;fill:currentColor}
.share .copied{position:fixed;bottom:24px;left:50%;transform:translateX(-50%);background:#1f2937;color:#fff;padding:10px 18px;border-radius:8px;font-size:14px;opacity:0;transition:opacity .2s;pointer-events:none}
.share .copied.show{opacity:1}
.photos{background:var(--card);border:1px solid var(--line);border-radius:12px;padding:18px 22px;margin-bottom:16px}
.photos h2{margin:0 0 12px;font-size:15px;text-transform:uppercase;letter-spacing:.06em;color:var(--muted)}
.photo-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:14px}
@media(max-width:520px){.photo-grid{grid-template-columns:1fr;gap:12px}}
.photo-cell{position:relative;border-radius:10px;overflow:hidden;background:#f1f5f9;aspect-ratio:3/2;display:block}
.photo-cell img{width:100%;height:100%;object-fit:cover;display:block;transition:transform .3s}
.photo-cell:hover img{transform:scale(1.03)}
.photo-foot{margin-top:14px;padding-top:12px;border-top:1px solid var(--line);font-size:12px;color:var(--muted);line-height:1.6}
.photo-foot strong{color:var(--ink);font-weight:600}
.photo-foot a{color:var(--blue);text-decoration:none}
.pending{background:#fef9c3;border:1px solid #fde68a;border-radius:10px;padding:14px 16px;font-size:13px;color:#854d0e}
.pending strong{color:#713f12}
.pending ul{margin:6px 0 0;padding-left:20px}
.fact{display:grid;grid-template-columns:160px 1fr;gap:10px 14px;font-size:14px}
.fact .lbl{color:var(--muted);font-size:13px}
.fact .row-sep{grid-column:1 / -1;border-top:1px dashed #ecebe6;margin:0}
.scheme-chip{display:inline-block;font-size:12px;padding:3px 9px;border-radius:99px;font-weight:600;margin-right:6px;margin-bottom:4px;letter-spacing:.01em}
.scheme-yes{background:#dcfce7;color:#15803d}
.scheme-no{background:#fee2e2;color:#b91c1c}
.scheme-pending{background:#fef3c7;color:#92400e}
.scheme-unknown{background:#f1f5f9;color:#64748b}
.tier-chip{display:inline-block;font-size:12px;padding:3px 9px;border-radius:4px;background:#ede9fe;color:#5b21b6;font-weight:600;margin-right:6px;margin-bottom:4px}
.empty-cta{font-size:13px;color:#8a7d6a;font-style:italic}
.empty-cta a{color:var(--blue);font-style:normal;text-decoration:none}
.empty-cta a:hover{text-decoration:underline}
.card .source-line{margin-top:14px;padding-top:10px;border-top:1px solid var(--line);font-size:11.5px;color:var(--muted)}
.card .source-line a{color:var(--muted)}
.card .source-line a:hover{color:var(--blue)}
.foot{margin-top:30px;font-size:12px;color:var(--muted);line-height:1.6;border-top:1px solid var(--line);padding-top:18px}
.foot strong{color:var(--ink)}
.foot a{color:var(--blue);text-decoration:none}
.map-wrap{border-radius:10px;overflow:hidden;border:1px solid var(--line);margin-top:4px}
.map-wrap iframe{display:block;width:100%;height:280px;border:0}
.map-links{display:flex;gap:14px;margin-top:10px;font-size:12px}
.map-links a{color:var(--blue);text-decoration:none}

/* ─── Landing-page additive styles (cards, lede, FAQ, notes, callouts) ─── */
.lede {color:var(--muted);font-size:16px;margin-bottom:24px}
/* Section divider — kept from old design, applied via .wrap > h2 */
.wrap > h2{padding-top:var(--s-20);border-top:1px solid var(--line)}
.wrap > h2:first-of-type{padding-top:0;border-top:0}
:where(h3) a{color:var(--ink);text-decoration:none}
:where(h3) a:hover{color:var(--blue)}
p {margin:0 0 12px}
ul,ol {margin:8px 0 14px;padding-left:22px}
li {margin:5px 0}
table {width:100%;border-collapse:collapse;margin:8px 0 24px;font-size:14px;background:var(--card);border:1px solid var(--line);border-radius:8px;overflow:hidden}
th,td {padding:9px 14px;text-align:left;border-bottom:1px solid var(--line)}
th {background:#f1f5f9;font-weight:600;font-size:12.5px;text-transform:uppercase;letter-spacing:.04em;color:var(--muted)}
tr:last-child td {border-bottom:0}
td a {color:var(--blue);text-decoration:none}
td a:hover {text-decoration:underline}
a {color:var(--blue)}
.q {font-weight:600;margin:18px 0 5px}
.a {margin:0 0 12px}
.note {background:#fef9c3;border:1px solid #fde68a;border-radius:8px;padding:14px 18px;margin:16px 0;font-size:14.5px}
.card-grid {display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:12px;margin:16px 0}
.card:hover {border-color:var(--blue);box-shadow:0 2px 8px rgba(37,99,235,.1)}
.card .name {font-weight:600;color:var(--blue);font-size:15px}
.card .meta {font-size:13px;color:var(--muted);margin-top:4px}
ul {margin:8px 0 14px;padding-left:22px}
.kv strong {color:var(--muted);font-weight:500;display:inline-block;min-width:120px}
a.card {display:inline-block;padding:8px 16px;border:1px solid var(--line);border-radius:8px;text-decoration:none;color:var(--blue);background:var(--card);font-size:14px}
a.card:hover {border-color:var(--blue)}
.eyebrow {display:inline-block;background:var(--blue);color:#fff;padding:4px 12px;border-radius:999px;font-size:12px;font-weight:700;letter-spacing:.05em;text-transform:uppercase;margin-bottom:14px}
.meta {font-size:13px;color:var(--muted);margin-bottom:36px}
code {background:#f1f5f9;padding:2px 6px;border-radius:4px;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:13px;color:#0f172a}
.chip {display:inline-block;padding:3px 10px;border-radius:999px;font-size:12px;font-weight:600;margin-right:3px}
.chip-green {background:#dcfce7;color:#15803d}
.chip-amber {background:#fef3c7;color:#92400e}
.chip-red {background:#fee2e2;color:#b91c1c}
.chip-blue {background:#dbeafe;color:#1d4ed8}
.summary-grid {display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:14px;margin:24px 0}
.stat {background:var(--card);border:1px solid var(--line);border-radius:10px;padding:18px}
.stat .n {font-size:30px;font-weight:700;letter-spacing:-.02em;color:var(--blue)}
.stat .l {font-size:13px;color:var(--muted);text-transform:uppercase;letter-spacing:.05em;margin-top:4px}
.callout-green {background:#f0fdf4;border-left:4px solid var(--green);padding:14px 18px;border-radius:0 8px 8px 0;margin:14px 0}
.callout-amber {background:#fffbeb;border-left:4px solid var(--amber);padding:14px 18px;border-radius:0 8px 8px 0;margin:14px 0}
.callout-red {background:#fef2f2;border-left:4px solid var(--red);padding:14px 18px;border-radius:0 8px 8px 0;margin:14px 0}
.source {font-size:12.5px;color:var(--muted);margin-top:6px}
.toc {background:var(--card);border:1px solid var(--line);border-radius:10px;padding:18px 24px;margin-bottom:32px}
.toc h3 {margin-top:0;font-size:13px;text-transform:uppercase;letter-spacing:.06em;color:var(--muted);font-weight:700}
.toc ol {margin:8px 0 0;padding-left:18px;font-size:14.5px;column-count:2;column-gap:24px}
.toc li {margin:4px 0;break-inside:avoid}
.toc a {text-decoration:none}
.toc a:hover {text-decoration:underline}
.field {margin-bottom:14px}
.field label {font-size:13px;color:var(--muted);display:block;margin-bottom:5px;font-weight:500}
.field input,.field textarea,.field select {width:100%;background:#fff;border:1px solid var(--line);color:var(--ink);padding:9px 12px;border-radius:6px;font-size:14.5px;font-family:inherit}
.field input:focus,.field textarea:focus,.field select:focus {outline:0;border-color:var(--accent);box-shadow:0 0 0 3px rgba(185,70,27,.12)}
.field textarea {min-height:100px;resize:vertical}
.field .req {color:var(--red);margin-left:3px}
.consent {background:#f8fafc;border:1px solid var(--line);border-radius:10px;padding:16px 18px;margin:18px 0}
.consent h3 {font-size:13px;text-transform:uppercase;letter-spacing:.04em;color:var(--muted);margin:0 0 8px}
.consent-row {display:flex;align-items:flex-start;gap:10px;margin-bottom:10px;padding-bottom:10px;border-bottom:1px dashed #e5e7eb}
.consent-row:last-child {border-bottom:0;margin-bottom:0;padding-bottom:0}
.consent-row input[type=checkbox] {margin-top:4px;flex-shrink:0;width:18px;height:18px;cursor:pointer}
.consent-row label {font-size:13.5px;cursor:pointer;line-height:1.45}
.consent-row label strong {display:block;font-size:13.5px;color:var(--ink);margin-bottom:3px}
.consent-row label .help {font-size:12px;color:var(--muted);margin-top:3px;display:block}
.contact-form .btn-submit, form .btn-submit {background:var(--accent,#16a34a);color:#fff;border:0;padding:11px 22px;border-radius:8px;font-weight:600;cursor:pointer;font-size:14.5px;width:100%}
.contact-form .btn-submit:hover, form .btn-submit:hover {filter:brightness(.95)}
.contact-form .btn-submit:disabled, form .btn-submit:disabled {background:#cbd5e1;cursor:not-allowed}
.alert {padding:14px 18px;border-radius:8px;font-size:14px;margin-bottom:18px;border-left:4px solid;display:none}
.alert.show {display:block}
.alert.ok {background:#dcfce7;color:var(--green);border-color:#15803d}
.alert.err {background:#fee2e2;color:var(--red);border-color:#b91c1c}
td a,a {color:var(--blue)}
.claim {background:#fef9c3;border-left:4px solid #d97706;border-radius:0 8px 8px 0;padding:14px 18px;margin:24px 0;font-size:14px;color:#854d0e}
.claim strong {color:#713f12}
.claim a {color:#92400e;font-weight:600;text-decoration:underline}
.stub {background:#fef3c7;border:1px solid #fde68a;padding:12px 16px;border-radius:8px;margin:20px 0}

/* ─── Homepage search component ───────────────────────────── */
.search-shell{position:relative;margin:0 0 22px}
.search-input{
  width:100%;
  appearance:none;
  background:var(--card);
  border:1px solid var(--line);
  border-radius:12px;
  padding:14px 18px 14px 46px;
  font:500 16px/1.4 inherit;
  color:var(--ink);
  box-shadow:0 1px 0 rgba(15,23,42,.02);
  transition:border-color .15s ease, box-shadow .15s ease;
  -webkit-text-size-adjust:100%;
}
.search-input::placeholder{color:#64748b}
.search-input:focus{
  outline:none;
  border-color:var(--blue);
  box-shadow:0 0 0 3px color-mix(in oklch, var(--blue) 22%, transparent);
}
.search-icon{
  position:absolute;
  left:16px;top:50%;
  transform:translateY(-50%);
  width:18px;height:18px;
  color:#94a3b8;
  pointer-events:none;
}
.search-results{
  position:absolute;
  left:0;right:0;top:calc(100% + 6px);
  z-index:50;
  background:var(--card);
  border:1px solid var(--line);
  border-radius:12px;
  padding:6px;
  margin:0;
  list-style:none;
  box-shadow:0 8px 24px rgba(15,23,42,.08), 0 2px 6px rgba(15,23,42,.04);
  max-height:min(60vh, 460px);
  overflow-y:auto;
}
.search-results[hidden]{display:none}
.search-results li{margin:0}
.search-results a{
  display:flex;flex-direction:column;gap:2px;
  padding:10px 12px;
  border-radius:8px;
  text-decoration:none;
  color:var(--ink);
  min-height:44px;
  justify-content:center;
}
.search-results [aria-selected="true"] a,
.search-results a:hover,
.search-results a:focus{background:#f1f5f9;outline:none}
.search-results .result-name{font-weight:600;font-size:15px;color:var(--ink);line-height:1.3}
.search-results .result-name mark{background:#fef08a;color:inherit;padding:0 2px;border-radius:3px}
.search-results .result-meta{font-size:13px;color:var(--muted);line-height:1.3}
.search-status{
  font-size:13px;color:var(--muted);
  margin:6px 4px 0;min-height:1.2em;
}
.search-status:empty{display:none}
@media (prefers-reduced-motion: reduce){
  .search-input{transition:none}
}

/* ─── Hero moat chips + AIC pointer (homepage hero) ───────── */
.moat{
  display:flex;
  flex-wrap:wrap;
  gap:6px 14px;
  margin:0 0 22px;
  list-style:none;
  padding:0;
  font-size:13.5px;
  color:#475569;        /* slate-600 — 7.4:1 vs bg, well above WCAG AA */
}
.moat li{
  position:relative;
  padding-left:14px;
  line-height:1.4;
}
.moat li::before{
  content:"";
  position:absolute;
  left:0;
  top:0.55em;
  width:6px;height:6px;
  margin-top:-3px;
  border-radius:50%;
  background:var(--blue);
}
.aic-pointer{
  display:block;
  margin:0 0 22px;
  padding:11px 16px;
  border-radius:10px;
  background:#f1f5f9;          /* slate-100 — quieter than the yellow subsidy banner */
  border:1px solid #e2e8f0;
  font-size:14px;
  color:#334155;               /* slate-700 — 9.6:1 */
  line-height:1.5;
}
.aic-pointer strong{color:var(--ink);font-weight:600}
.aic-pointer a{
  color:var(--blue);
  text-decoration:none;
  font-weight:600;
  white-space:nowrap;
}
.aic-pointer a:hover{text-decoration:underline}

@media (max-width: 540px){
  .moat{flex-direction:column;gap:6px}
}

/* ════════════════════════════════════════════════════════════
   Phase 4: Typography system
   Single-family Inter, hierarchy via weight + clamp() scale.
   Modular scale ratio ≥1.25 between heading steps.
   ════════════════════════════════════════════════════════════ */

:root{
  /* Fluid type scale — heading sizes scale with viewport */
  --t-h1: clamp(2rem, 1.4rem + 2vw, 3rem);          /* 32 → 48px */
  --t-h2: clamp(1.375rem, 1.18rem + 0.7vw, 1.625rem); /* 22 → 26px */
  --t-h3: 1.125rem;                                   /* 18px */
  --t-body: 1rem;                                     /* 16px */
  --t-small: 0.875rem;                                /* 14px */
  --t-x-small: 0.8125rem;                             /* 13px */
  /* Spacing scale (4pt base) — semantic, not numeric */
  --s-2: 0.125rem; --s-4: 0.25rem; --s-8: 0.5rem;
  --s-12: 0.75rem; --s-16: 1rem; --s-20: 1.25rem;
  --s-24: 1.5rem;  --s-32: 2rem;  --s-48: 3rem; --s-64: 4rem;
}

body{
  font-family:-apple-system,BlinkMacSystemFont,Inter,"Segoe UI",sans-serif;
  font-feature-settings:"ss01","cv11";    /* Inter ss01 (alt 1, l, t), cv11 (slashed 0) — falls back gracefully */
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
  text-rendering:optimizeLegibility;
}

/* ── Top-level headings ──────────────────────────────────── */
/* Lower specificity than scoped uppercase labels (.card h2 etc.), so
   those continue to win for their specific contexts. */
:where(h1){
  font-size:var(--t-h1);
  font-weight:800;
  letter-spacing:-0.022em;
  line-height:1.1;
  text-wrap:balance;
  margin:0 0 var(--s-12);
  color:var(--ink);
}
:where(h2){
  font-size:var(--t-h2);
  font-weight:700;
  letter-spacing:-0.014em;
  line-height:1.2;
  text-wrap:balance;
  margin:var(--s-32) 0 var(--s-12);
  color:var(--ink);
}
:where(h3){
  font-size:var(--t-h3);
  font-weight:600;
  letter-spacing:-0.006em;
  line-height:1.3;
  text-wrap:balance;
  margin:var(--s-24) 0 var(--s-8);
  color:var(--ink);
}

/* ── Body prose ───────────────────────────────────────────── */
.wrap p, .wrap li{
  text-wrap:pretty;
}
.wrap > p:not(.lede):not(.foot):not(.aic-pointer):not(.q):not(.a){
  max-width:65ch;
  line-height:1.65;
}
.wrap > ul, .wrap > ol{
  max-width:65ch;
  line-height:1.65;
}
.wrap > ul.moat, .wrap > ul.card-grid, .wrap > ul.search-results{
  max-width:none;
}

/* ── Lede (display lead-in under h1) ─────────────────────── */
.lede{
  font-size:clamp(1rem, 0.93rem + 0.4vw, 1.1875rem);  /* 16 → 19px */
  font-weight:400;
  line-height:1.55;
  color:#475569;        /* slate-600, 7.4:1 vs body bg (was --muted #6b7280 at 4.83:1) */
  text-wrap:pretty;
  max-width:60ch;
  margin:0 0 var(--s-16);
}

/* ── Strong weight unified ──────────────────────────────── */
strong, b{font-weight:600}

/* ── Inline link refinement on prose ────────────────────── */
.wrap p a, .wrap li a{
  text-decoration:underline;
  text-decoration-thickness:1px;
  text-underline-offset:2px;
  text-decoration-color:color-mix(in oklch, var(--blue) 50%, transparent);
  transition:text-decoration-color .15s ease;
}
.wrap p a:hover, .wrap li a:hover{
  text-decoration-color:var(--blue);
}
/* Non-prose links (cards, table cells, nav) keep their unstyled treatment */
.card a, .card-grid a, td a, .crumb a, .foot a, .search-results a{
  text-decoration:none;
}
.foot a{
  text-decoration:underline;
  text-decoration-thickness:1px;
  text-underline-offset:2px;
  text-decoration-color:color-mix(in oklch, var(--blue) 35%, transparent);
}

/* ── Reduced motion: keep underline transitions instant ─── */
@media (prefers-reduced-motion: reduce){
  .wrap p a, .wrap li a{transition:none}
}

/* ════════════════════════════════════════════════════════════
   Phase 5: Site shell — adapted from nursinghomeguide.my
   Top nav, hero stat strip, section pattern, trust band, footer.
   Single-family Inter (existing); SG editorial voice.
   ════════════════════════════════════════════════════════════ */

:root{
  /* Adopt the .my primary blue (Tailwind blue-700, slightly more committed
     than blue-600). This is the actual blue rendered on the live .my site. */
  --blue: #1d4ed8;
  --blue-dark: #1740b0;
  --ink: #0f172a;       /* slate-900 — was #1f2937 (slate-800), slightly more committed ink */
  --body: #475569;      /* slate-600 — for prose body text */
  --muted: #6b7280;     /* slate-500 — unchanged */
  --line: #e6eaf0;      /* cooler line — was #e5e7eb */
  --bg: #f6f8fc;        /* cooler page bg — was #f8fafc */
  --shadow-card: 0 1px 2px rgba(15,23,42,0.04);
  --shadow-hover: 0 8px 24px rgba(15,23,42,0.08);
  --shadow-quiz: 0 12px 40px rgba(15,23,42,0.08);
  --shadow-cta: 0 8px 24px rgba(29,78,216,0.19);
}

/* ── Top nav ─────────────────────────────────────────────── */
.site-nav{
  background: var(--card);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 40;
  backdrop-filter: saturate(180%) blur(6px);
  background-color: rgba(255,255,255,0.96);
}
.nav-inner{
  max-width: 1180px; margin: 0 auto;
  display: flex; align-items: center; gap: 24px;
  padding: 12px 24px;
}
.site-nav .logo{
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 700; font-size: 17px; color: var(--ink);
  text-decoration: none; flex-shrink: 0;
}
.site-nav .logo .domain-tld{color: var(--blue)}
.nav-links{
  display: flex; align-items: center; gap: 4px;
  list-style: none; margin: 0; padding: 0;
  flex: 1;
}
.nav-links li{margin: 0}
.nav-link{
  display: inline-flex; align-items: center;
  padding: 8px 12px; border-radius: 8px;
  font-size: 14px; font-weight: 500;
  color: var(--body);
  text-decoration: none;
  transition: background .15s ease, color .15s ease;
}
.nav-link:hover{background: var(--bg); color: var(--ink)}
.nav-link.active{color: var(--blue); background: color-mix(in oklch, var(--blue) 8%, transparent)}
.nav-link-sitemap{margin-left: auto; font-size: 13px}
.nav-hamburger{
  display: none;
  background: transparent; border: 1px solid var(--line);
  border-radius: 8px;
  width: 40px; height: 40px;
  align-items: center; justify-content: center; flex-direction: column; gap: 4px;
  cursor: pointer;
  margin-left: auto;
}
.nav-hamburger span{
  display: block;
  width: 18px; height: 2px;
  background: var(--ink);
  border-radius: 1px;
}

@media (max-width: 860px){
  .nav-inner{padding: 10px 16px; gap: 12px}
  .site-nav .logo{font-size: 16px}
  .nav-hamburger{display: inline-flex}
  .nav-links{
    display: none;
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--card); border-bottom: 1px solid var(--line);
    padding: 8px;
    box-shadow: var(--shadow-hover);
  }
  .nav-links.open{display: flex}
  .nav-link{padding: 12px 16px; border-radius: 0; font-size: 15px}
  .nav-link-sitemap{margin-left: 0}
}

/* ── Page wrap (replaces inline-width .wrap on landing pages) ── */
.page-wrap{
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}
@media (max-width: 600px){
  .page-wrap{padding: 0 16px}
}

/* ── Hero (landing pages) ────────────────────────────────── */
.hero{
  padding: 56px 0 32px;
  position: relative;
}
@media (max-width: 600px){.hero{padding: 32px 0 20px}}

.hero-eyebrow{
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 500;
  color: var(--blue);
  background: color-mix(in oklch, var(--blue) 8%, transparent);
  padding: 5px 12px;
  border-radius: 999px;
  margin-bottom: 16px;
}
.hero h1{
  font-size: clamp(2.25rem, 1.5rem + 3vw, 3.5rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.05;
  text-wrap: balance;
  margin: 0 0 16px;
  max-width: 22ch;
}
.hero-sub{
  font-size: clamp(1rem, 0.95rem + 0.4vw, 1.1875rem);
  color: var(--body);
  line-height: 1.55;
  max-width: 58ch;
  margin: 0 0 24px;
  text-wrap: pretty;
}

.hero-stats{
  display: flex; flex-wrap: wrap; gap: 32px;
  margin: 24px 0 28px;
  padding: 20px 24px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow-card);
}
.hero-stat .num{
  font-size: clamp(1.5rem, 1.1rem + 1.5vw, 2rem);
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.02em;
  line-height: 1;
}
.hero-stat .label{
  font-size: 12.5px; font-weight: 500;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 6px;
}
@media (max-width: 540px){
  .hero-stats{gap: 18px 24px; padding: 16px 18px}
  .hero-stat .num{font-size: 1.5rem}
}

.hero-ctas{
  display: flex; flex-wrap: wrap; gap: 12px;
  margin-top: 22px;
}
.btn{
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: 10px;
  font-size: 15px; font-weight: 600;
  text-decoration: none;
  transition: background .15s ease, box-shadow .15s ease, transform .1s ease;
  border: 1px solid transparent;
  min-height: 44px;
}
.btn-primary{
  background: var(--blue); color: #fff;
  box-shadow: var(--shadow-cta);
}
.btn-primary:hover{background: var(--blue-dark); transform: translateY(-1px)}
.btn-primary:active{transform: translateY(0)}
.btn-secondary{
  background: var(--card); color: var(--ink);
  border-color: var(--line);
}
.btn-secondary:hover{background: var(--bg); border-color: var(--ink)}

/* ── Section pattern (landing pages) ─────────────────────── */
.section{
  padding: 48px 0;
}
.section-head{
  margin-bottom: 28px;
  max-width: 720px;
}
.section-title{
  font-size: clamp(1.5rem, 1.2rem + 0.9vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.018em;
  line-height: 1.15;
  margin: 0 0 8px;
  color: var(--ink);
  text-wrap: balance;
}
.section-sub{
  font-size: 16px;
  color: var(--body);
  line-height: 1.6;
  margin: 0;
  text-wrap: pretty;
}

/* ── Care-type cards (upgraded) ─────────────────────────── */
.care-grid{
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}
.care-card{
  position: relative;
  display: block;
  padding: 24px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  text-decoration: none;
  color: inherit;
  transition: border-color .15s ease, box-shadow .15s ease, transform .12s ease;
  box-shadow: var(--shadow-card);
}
.care-card:hover{
  border-color: color-mix(in oklch, var(--blue) 40%, var(--line));
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}
.care-card-icon{
  font-size: 28px; line-height: 1;
  margin-bottom: 12px;
}
.care-card-name{
  font-size: 17px; font-weight: 700;
  color: var(--ink);
  margin-bottom: 6px;
  letter-spacing: -0.008em;
}
.care-card-count{
  font-size: 13px; color: var(--muted);
  font-weight: 500;
  margin-bottom: 10px;
}
.care-card-desc{
  font-size: 14px; line-height: 1.55;
  color: var(--body);
  margin-bottom: 14px;
}
.care-card-cta{
  font-size: 14px; font-weight: 600;
  color: var(--blue);
}

/* ── Trust band ──────────────────────────────────────────── */
.trust{
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 40px 32px;
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 36px;
  align-items: start;
  box-shadow: var(--shadow-card);
}
.trust-text-title{
  font-size: clamp(1.375rem, 1.15rem + 0.7vw, 1.75rem);
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.018em;
  line-height: 1.2;
  margin: 0 0 10px;
  text-wrap: balance;
}
.trust-text-desc{
  font-size: 15px; color: var(--body);
  line-height: 1.6;
  margin: 0;
}
.trust-grid{
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px 28px;
}
.trust-item-title{
  font-size: 15px; font-weight: 700;
  color: var(--ink);
  margin: 0 0 4px;
}
.trust-item-desc{
  font-size: 14px; color: var(--body);
  line-height: 1.55;
  margin: 0;
}
.trust-item-icon{
  font-size: 18px; line-height: 1; margin-right: 6px;
}
@media (max-width: 820px){
  .trust{grid-template-columns: 1fr; padding: 28px 24px; gap: 24px}
  .trust-grid{grid-template-columns: 1fr; gap: 18px}
}

/* ── Footer ──────────────────────────────────────────────── */
.site-foot{
  margin-top: 64px;
  padding: 40px 24px;
  background: var(--card);
  border-top: 1px solid var(--line);
  font-size: 14px;
  color: var(--body);
}
.site-foot-inner{
  max-width: 1180px; margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 32px;
}
.site-foot-brand strong{
  display: block;
  font-size: 17px; font-weight: 700;
  color: var(--ink); margin-bottom: 6px;
}
.site-foot-tag{color: var(--muted); font-size: 13px; line-height: 1.5}
.site-foot-links{
  display: flex; flex-wrap: wrap; gap: 6px 18px;
  align-content: flex-start;
}
.site-foot-links a{
  color: var(--body); text-decoration: none;
  padding: 4px 0;
  border-bottom: 1px solid transparent;
  transition: color .15s ease, border-color .15s ease;
}
.site-foot-links a:hover{color: var(--blue); border-bottom-color: currentColor}
.site-foot-copy{
  grid-column: 1 / -1;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 12.5px;
  color: var(--muted);
  display: flex; flex-wrap: wrap; gap: 12px 24px;
  align-items: center; justify-content: space-between;
}
.site-foot-copy a{color: var(--muted); text-decoration: underline}
@media (max-width: 720px){
  .site-foot-inner{grid-template-columns: 1fr; gap: 20px}
}

/* Override the old inline-width .wrap when used inside the new page-wrap shell.
   Landing pages will use .page-wrap directly. Existing facility pages keep .wrap. */

/* ── Skip-to-content link (accessibility) ────────────────── */
.skip-link{
  position: absolute;
  top: -100px; left: 16px;
  background: var(--ink);
  color: #fff;
  padding: 12px 18px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  z-index: 100;
  transition: top .15s ease;
}
.skip-link:focus{
  top: 16px;
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

/* ── Logo mark + wordmark in nav ─────────────────────────── */
.site-nav .logo{
  gap: 10px;
}
.site-nav .logo-mark{
  width: 32px; height: 32px;
  border-radius: 7px;
  flex-shrink: 0;
  display: block;
}
.site-nav .logo-word{
  display: inline-block;
}
@media (max-width: 480px){
  .site-nav .logo-mark{width: 28px; height: 28px}
}

/* ── nav-link.active state ───────────────────────────────── */
.nav-link.active{
  color: var(--blue);
  background: color-mix(in oklch, var(--blue) 8%, transparent);
}

/* ════════════════════════════════════════════════════════════
   Phase 6B: Facility page polish
   Polish within existing facility-page layout. No structural change.
   No tabs. Same .wrap (880px) shell.
   ════════════════════════════════════════════════════════════ */

/* Fix the "Link copied to clipboard" toast — was always-visible because
   CSS used .share .copied (descendant) but HTML uses class="share copied"
   (both classes on the same element). */
.copied{
  position: fixed;
  bottom: 24px; left: 50%;
  transform: translateX(-50%) translateY(8px);
  background: var(--ink);
  color: #fff;
  padding: 11px 18px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
  z-index: 60;
  box-shadow: 0 8px 24px rgba(15,23,42,0.18);
}
.copied.show{
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
/* The original .share .copied rule still exists from the master block;
   override it to prevent conflict. */
.share .copied{
  position: fixed;
}

/* Soften the hero card on facility pages — make it consistent with the
   landing-page hero ratio + the new tokens. */
.wrap .hero{
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 28px 32px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-card);
}
.wrap .hero h1{
  margin: 0 0 8px;
  font-size: clamp(1.75rem, 1.35rem + 1.6vw, 2.5rem);
  line-height: 1.1;
  letter-spacing: -0.022em;
  font-weight: 800;
  color: var(--ink);
}
.wrap .hero .subtitle{
  color: var(--body);
  font-size: 15px;
  margin-bottom: 16px;
}
@media (max-width: 600px){
  .wrap .hero{padding: 20px 18px; border-radius: 14px}
}

/* Pills: ensure consistent with new design tokens */
.pill{
  font-size: 12px;
  font-weight: 600;
  padding: 5px 11px;
  border-radius: 999px;
  letter-spacing: 0.01em;
  display: inline-flex;
  align-items: center;
}
.pill.lic-pending{background: #fef3c7; color: #92400e}
.pill.lic-ok{background: #dcfce7; color: #166534}
.pill.region{background: #f1f5f9; color: #475569}
.pill.svc{background: #ede9fe; color: #5b21b6}

/* Card refinement — match landing-page card aesthetic */
.wrap .card{
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 20px 24px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-card);
}
.wrap .card h2{
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin: 0 0 12px;
}

/* Empty-state CTA links — make them feel less heavy.
   These appear on facility pages for fields not yet verified. */
.empty-cta{
  font-style: italic;
  color: var(--muted);
  font-size: 13.5px;
}
.empty-cta a{
  color: var(--blue);
  font-weight: 600;
  text-decoration: none;
  font-style: normal;
}
.empty-cta a:hover{text-decoration: underline}

/* Source line: cite-style attribution at the bottom of a card */
.source-line,
.about-source{
  font-size: 12.5px;
  color: var(--muted);
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  font-style: italic;
}
.about-source a, .source-line a{color: var(--blue); text-decoration: none}

/* Google rating widget — make stars feel deliberate, not afterthought */
.rating{
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-size: 26px;
  font-weight: 800;
  color: var(--blue);
  letter-spacing: -0.02em;
  line-height: 1;
}

/* Map embed — soften the iframe edges */
.map-wrap{
  border-radius: 12px;
  overflow: hidden;
  margin-top: 4px;
  border: 1px solid var(--line);
}
.map-wrap iframe{
  width: 100%;
  height: 280px;
  border: 0;
  display: block;
}
.map-links{
  display: flex;
  gap: 14px;
  margin-top: 10px;
  font-size: 14px;
}
.map-links a{
  color: var(--blue);
  text-decoration: none;
  font-weight: 600;
}
.map-links a:hover{text-decoration: underline}

/* Share buttons — keep them subtle */
.share{
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}
.share .lbl{
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-right: 4px;
}
.share-btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--bg);
  color: var(--ink);
  text-decoration: none;
  border: 1px solid var(--line);
  transition: background .15s ease, color .15s ease, transform .12s ease;
}
.share-btn:hover{
  background: var(--blue);
  color: #fff;
  border-color: var(--blue);
  transform: translateY(-1px);
}
.share-btn svg{width: 16px; height: 16px}

/* Two-column grid on facility pages: nudge breakpoints */
.wrap .grid{
  display: grid;
  grid-template-columns: 1.65fr 1fr;
  gap: 22px;
  margin-top: 22px;
}
@media (max-width: 760px){
  .wrap .grid{grid-template-columns: 1fr; gap: 18px}
}

/* ── Fact-checked badge (editorial pages) ────────────────── */
.fact-checked{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 32px 0 0;
  padding: 10px 16px;
  background: color-mix(in oklch, #16a34a 6%, transparent);
  border: 1px solid color-mix(in oklch, #16a34a 18%, transparent);
  border-radius: 8px;
  font-size: 13px;
  color: #166534;
  line-height: 1.4;
}
.fact-checked::before{
  content: "✓";
  font-weight: 800;
  color: #16a34a;
  font-size: 14px;
}
.fact-checked a{
  color: #166534;
  text-decoration: underline;
  text-decoration-color: color-mix(in oklch, #166534 40%, transparent);
  font-weight: 600;
}

/* ════════════════════════════════════════════════════════════
   Phase 6D: Accessibility polish — focus rings + reduced motion
   ════════════════════════════════════════════════════════════ */

/* Visible focus ring on every interactive element via :focus-visible.
   Native browser focus rings remain as the fallback. */
:focus-visible{
  outline: 2px solid var(--blue);
  outline-offset: 2px;
  border-radius: 4px;
}
a:focus-visible,
button:focus-visible,
[role="button"]:focus-visible,
input:focus-visible,
[role="combobox"]:focus-visible,
[role="option"]:focus-visible{
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}
/* Card-shaped focus targets get a slightly inset ring so it doesn't clash
   with the card's own border. */
.care-card:focus-visible,
.card:focus-visible{
  outline-offset: 4px;
}
/* Search input has its own focus treatment; let it win. */
.search-input:focus-visible{outline: none}

/* Global reduced-motion override.
   Each motion-using rule already has its own per-rule reduced-motion
   alternative; this is the belt-and-braces catch-all. */
@media (prefers-reduced-motion: reduce){
  *, *::before, *::after{
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ── Closure banner (facility pages, business_status != OPERATIONAL) ── */
.closure-banner{
  margin: 0 0 18px;
  padding: 16px 22px;
  border-radius: 12px;
  font-size: 14.5px;
  line-height: 1.55;
}
.closure-banner.closure-permanent{
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #7f1d1d;
}
.closure-banner.closure-permanent strong{color: #991b1b}
.closure-banner.closure-permanent a{color: #991b1b; text-decoration: underline; font-weight: 600}
.closure-banner.closure-temp{
  background: #fef9c3;
  border: 1px solid #fde68a;
  color: #713f12;
}
.closure-banner.closure-temp strong{color: #854d0e}
