/* Heilsutimi: calm Nordic healthcare interface. Self-hosted fonts only (no remote requests). Mobile-first.
   Colour pairs are chosen for WCAG 2.2 AA contrast (checked by axe in tests/e2e). */

@font-face { font-family: "Fraunces"; src: url("./fonts/fraunces.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Inter"; src: url("./fonts/inter.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }

:root {
  --ink: #142b2a;            /* fjord */
  --ink-2: #2b4744;
  --muted: #536663;
  --line: #dfe5e0;
  --line-2: #c9d4ce;
  --accent: #2e6b5e;         /* sea-glass green */
  --accent-strong: #1c4d43;
  --accent-soft: #e4efe9;
  --sand: #f5f0e8;           /* warm sand */
  --birch: #fbfaf6;          /* page */
  --white: #fff;
  --clay: #b5603f;           /* small accents only */
  --heather: #5d5277;
  --focus: #1f6fd1;
  --warn-bg: #fdf3e7;
  --warn-ink: #6f3d0c;
  --warn-line: #ecd0ac;
  --info-bg: #ecf3f8;
  --info-ink: #1b4566;
  --info-line: #c3d8e8;
  --shadow-sm: 0 1px 2px rgba(20, 43, 42, 0.05), 0 4px 14px rgba(20, 43, 42, 0.05);
  --shadow: 0 2px 6px rgba(20, 43, 42, 0.05), 0 18px 44px rgba(20, 43, 42, 0.08);
  --radius: 18px;
  --radius-sm: 12px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --shell: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--birch); color: var(--ink); font-family: var(--font); font-size: 1rem; line-height: 1.65; font-feature-settings: "cv11", "ss01"; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
img { max-width: 100%; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3 { line-height: 1.2; letter-spacing: -0.015em; color: var(--ink); }
h1, h2 { font-family: var(--serif); font-weight: 480; font-variation-settings: "opsz" 96; }
h2 { font-size: clamp(1.55rem, 2.8vw, 2.15rem); margin: 0 0 0.7rem; }
h3 { font-size: 1.08rem; font-weight: 650; margin: 1.1rem 0 0.4rem; letter-spacing: -0.005em; }
p { margin: 0 0 0.85rem; }
code { font-size: 0.85em; background: var(--accent-soft); padding: 0 0.25em; border-radius: 4px; word-break: break-all; }
::selection { background: #cfe3da; }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
[tabindex="-1"]:focus { outline: none; }
[tabindex="-1"]:focus-visible { outline: 3px solid var(--focus); }
/* Headings receive programmatic focus on navigation for screen readers; they are not controls. */
h1[tabindex="-1"]:focus, h1[tabindex="-1"]:focus-visible, main:focus, .contentSection:focus { outline: none; }

.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skiplink { position: absolute; left: 1rem; top: -100px; z-index: 100; background: var(--accent-strong); color: var(--white); padding: 0.7rem 1rem; border-radius: 10px; text-decoration: none; font-weight: 700; }
.skiplink:focus { top: 1rem; }

.shell { width: min(var(--shell), calc(100% - 32px)); margin: 0 auto; }
@media (min-width: 700px) { .shell { width: min(var(--shell), calc(100% - 56px)); } }
.narrow { max-width: 760px; }

/* ── Header ─────────────────────────────────────────────── */
.previewbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 0.25rem 0.6rem; background: var(--ink); color: #e6efeb; padding: 0.45rem 1rem; font-size: 0.76rem; text-align: center; letter-spacing: 0.01em; }
.previewbar strong { letter-spacing: 0.08em; text-transform: uppercase; font-weight: 700; }
.previewbar__dot { width: 7px; height: 7px; background: #e9b58f; border-radius: 50%; }
.siteheader { background: rgba(251, 250, 246, 0.92); backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 30; }
.header__inner { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1rem; min-height: 68px; padding: 0.5rem 0; }
.header__inner .menuToggle { margin-left: auto; }
@media (max-width: 599px) { .locale { order: 3; margin-left: 0; } }
.brand { text-decoration: none; display: flex; align-items: center; gap: 0.65rem; line-height: 1; }
.brand > span:last-child { font-family: var(--serif); font-size: 1.45rem; font-weight: 520; letter-spacing: -0.02em; }
.brand small { display: block; font-family: var(--font); font-size: 0.6rem; letter-spacing: 0.18em; color: var(--muted); margin-top: 0.35rem; font-weight: 650; text-transform: uppercase; }
.brand__dot { color: var(--clay); }
.brand__icon { display: grid; place-items: center; width: 38px; height: 38px; background: var(--accent-strong); border-radius: 12px 12px 12px 4px; color: #f3efe6; font-size: 1.15rem; }
.nav { display: none; gap: 1.5rem; margin-left: auto; }
.nav__link, .mobilenav__link { font-size: 0.92rem; text-decoration: none; font-weight: 550; color: var(--ink-2); padding: 0.4rem 0; }
.nav__link:hover, .mobilenav__link:hover { color: var(--accent); }
.nav__link[aria-current="page"] { color: var(--accent-strong); box-shadow: inset 0 -2px 0 var(--accent); }
.locale { display: flex; gap: 0.15rem; margin-left: auto; font-size: 0.8rem; background: var(--white); border: 1px solid var(--line); border-radius: 99px; padding: 0.15rem; }
.locale a { text-decoration: none; padding: 0.3rem 0.65rem; border-radius: 99px; font-weight: 650; color: var(--muted); min-height: 24px; }
.locale a[aria-current="true"] { background: var(--accent-strong); color: var(--white); }
.menuToggle { border: 1px solid var(--line-2); background: var(--white); border-radius: 99px; padding: 0.45rem 1rem; font-weight: 650; min-height: 44px; }
.mobilenav { padding: 0.5rem 16px 1rem; border-top: 1px solid var(--line); background: var(--birch); }
.mobilenav__link { display: block; padding: 0.8rem 0.25rem; border-bottom: 1px solid var(--line); font-size: 1rem; }
.localeNotice { background: var(--info-bg); color: var(--info-ink); border-top: 1px solid var(--info-line); padding: 0.5rem 16px; font-size: 0.85rem; text-align: center; }
@media (min-width: 600px) { .locale { margin-left: auto; } .header__inner .menuToggle { margin-left: 0; } }
@media (min-width: 1020px) {
  .nav { display: flex; }
  .locale { margin-left: 1.25rem; }
  .menuToggle, .mobilenav { display: none !important; }
}

/* ── Home hero ──────────────────────────────────────────── */
.hero { position: relative; overflow: hidden; padding: 3.25rem 0 3rem; background:
  radial-gradient(60rem 30rem at 85% -10%, #dcebe3 0, transparent 60%),
  radial-gradient(40rem 26rem at 105% 90%, #f1e3d6 0, transparent 60%),
  linear-gradient(180deg, #f6f3ec 0, var(--birch) 100%); }
.hero::after { content: ""; position: absolute; inset: auto -10% -1px -10%; height: 120px; background: radial-gradient(60% 120px at 50% 120px, var(--birch) 0, transparent 70%); pointer-events: none; }
.hero__grid { position: relative; z-index: 1; display: grid; gap: 2.5rem; align-items: center; grid-template-columns: minmax(0, 1fr); }
.hero__title { font-size: clamp(2.5rem, 7vw, 4.6rem); line-height: 1.02; letter-spacing: -0.03em; margin: 0 0 1.3rem; font-weight: 430; font-variation-settings: "opsz" 144; }
.hero__title em { font-style: italic; color: var(--accent); }
.hero__lead { font-size: clamp(1.05rem, 1.6vw, 1.22rem); max-width: 34rem; color: var(--ink-2); }
.hero__card { background: rgba(255, 255, 255, 0.82); padding: 1.6rem; border: 1px solid var(--line); border-radius: 26px; box-shadow: var(--shadow); }
.hero__cardTitle { font-size: 1.25rem; margin-bottom: 0.4rem; }
.routes { list-style: none; padding: 0; margin: 0; }
.routes a { display: flex; align-items: center; gap: 0.8rem; border: 1px solid var(--line); background: var(--white); border-radius: 14px; padding: 0.85rem 1rem; margin: 0.6rem 0; font-weight: 600; text-decoration: none; min-height: 52px; }
.routes a:hover { border-color: var(--accent); }
.routes__num { display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-strong); border-radius: 10px; width: 32px; height: 32px; font-size: 0.8rem; flex: none; font-weight: 700; }
@media (min-width: 900px) { .hero { padding: 5.5rem 0 5rem; } .hero__grid { grid-template-columns: 1.15fr 0.85fr; gap: 4.5rem; } }

/* Three primary entry points */
.entries { display: grid; gap: 1rem; grid-template-columns: minmax(0, 1fr); margin-top: 2.25rem; }
@media (min-width: 760px) { .entries { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.entry { position: relative; display: flex; flex-direction: column; gap: 0.5rem; padding: 1.4rem 1.4rem 1.25rem; border-radius: 22px; text-decoration: none; background: var(--white); border: 1px solid var(--line); box-shadow: var(--shadow-sm); min-height: 100%; }
.entry:hover { border-color: var(--accent); box-shadow: var(--shadow); }
.entry__num { font-family: var(--serif); font-size: 0.95rem; color: var(--clay); font-weight: 600; }
.entry__title { font-family: var(--serif); font-size: 1.42rem; line-height: 1.2; font-weight: 480; margin: 0; }
.entry__text { color: var(--muted); font-size: 0.95rem; margin: 0; }
.entry__go { margin-top: auto; padding-top: 0.6rem; color: var(--accent-strong); font-weight: 650; font-size: 0.92rem; }
.entry--a { background: linear-gradient(160deg, #ffffff 0, #f1f7f3 100%); }
.entry--b { background: linear-gradient(160deg, #ffffff 0, #f8f3ec 100%); }
.entry--c { background: linear-gradient(160deg, #ffffff 0, #f2f1f7 100%); }

.pagehero { padding: 2.6rem 0 2.2rem; background: linear-gradient(180deg, #f4f0e8 0, var(--birch) 100%); border-bottom: 1px solid var(--line); }
.pagehero__title { font-size: clamp(2rem, 5vw, 3.2rem); letter-spacing: -0.025em; margin: 0.35rem 0 0.8rem; font-weight: 450; }
.pagehero__lead { max-width: 46rem; color: var(--ink-2); font-size: 1.08rem; }
.breadcrumbs { font-size: 0.85rem; color: var(--muted); display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 1rem; }
.breadcrumbs a { color: var(--muted); }

/* ── Layout ─────────────────────────────────────────────── */
.section { padding: 2.75rem 0; }
.section--tint { background: var(--sand); }
.section--ink { background: var(--ink); color: #e9f0ed; }
.section--ink h2, .section--ink h3 { color: #fff; }
.section--ink .muted, .section--ink p { color: #cbd9d4; }
@media (min-width: 900px) { .section { padding: 4.25rem 0; } }
.sectionHead { margin-bottom: 1.8rem; max-width: 46rem; }
.sectionHead p { color: var(--muted); font-size: 1.04rem; }
.sectionTitle { font-size: clamp(1.7rem, 3.2vw, 2.5rem); }
.eyebrow, .smallcaps { font-weight: 700; letter-spacing: 0.14em; font-size: 0.7rem; color: var(--accent); text-transform: uppercase; margin: 0 0 0.6rem; }
.muted { color: var(--muted); }
.meta { font-size: 0.85rem; color: var(--muted); }
.spaced { margin-top: 2.5rem; }
.grid2, .grid3, .grid4, .cards { display: grid; gap: 1rem; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 700px) { .grid2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid3, .grid4, .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .grid3, .cards { grid-template-columns: repeat(3, minmax(0, 1fr)); } .grid4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.grid2--center { align-items: center; }
.mainCols { display: grid; gap: 2rem; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 960px) { .mainCols { grid-template-columns: minmax(0, 1fr) 310px; gap: 3.25rem; align-items: start; } }
.aside { display: grid; gap: 1rem; }

.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 1.3rem 0; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; border-radius: 99px; padding: 0.7rem 1.25rem; min-height: 46px; text-decoration: none; border: 1px solid transparent; font-weight: 650; font-size: 0.95rem; }
.btn--primary { background: var(--accent-strong); color: var(--white); }
.btn--primary:hover { background: var(--accent); }
.btn--secondary { background: var(--white); color: var(--ink); border-color: var(--line-2); }
.btn--secondary:hover { border-color: var(--accent); }
.btn--small { padding: 0.35rem 0.85rem; min-height: 36px; font-size: 0.85rem; background: var(--accent-strong); color: var(--white); }
.btn--small.btn--secondary { background: var(--white); color: var(--ink); }
.link { color: var(--accent-strong); font-weight: 600; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.link:hover { color: var(--accent); }

.tile, .panel, .card { border: 1px solid var(--line); background: var(--white); border-radius: var(--radius); padding: 1.3rem; box-shadow: var(--shadow-sm); }
.tile h3, .tile__h { font-size: 1.12rem; margin: 0.3rem 0 0.4rem; font-family: var(--font); }
.tile p { color: var(--muted); font-size: 0.95rem; margin: 0; }
.tile--link { display: block; text-decoration: none; }
.tile--link:hover { border-color: var(--accent); box-shadow: var(--shadow); }
.tile__icon { display: grid; place-items: center; width: 44px; height: 44px; background: var(--accent-soft); border-radius: 12px; color: var(--accent-strong); font-size: 1.2rem; margin-bottom: 0.8rem; }
.panel__title { font-size: 1.05rem; margin: 0 0 0.6rem; font-family: var(--font); font-weight: 650; }
.panel--urgent { border-color: #e8c3b2; background: #fff8f4; }
.panel--urgent .panel__title { color: #7a2f17; }

/* Topic tiles */
.topicTile { display: flex; flex-direction: column; gap: 0.35rem; text-decoration: none; padding: 1.2rem 1.25rem; border-radius: var(--radius); background: var(--white); border: 1px solid var(--line); box-shadow: var(--shadow-sm); min-height: 100%; }
.topicTile:hover { border-color: var(--accent); box-shadow: var(--shadow); }
.topicTile__title { font-family: var(--serif); font-size: 1.3rem; font-weight: 480; margin: 0; line-height: 1.2; }
.topicTile__text { color: var(--muted); font-size: 0.93rem; margin: 0; }
.topicTile__foot { margin-top: auto; padding-top: 0.5rem; display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; }

.pairs { margin: 1rem 0 0; }
.pairs > div { display: flex; justify-content: space-between; gap: 1rem; border-bottom: 1px solid var(--line); padding: 0.55rem 0; font-size: 0.92rem; }
.pairs dt { font-weight: 600; }
.pairs dd { margin: 0; color: var(--muted); text-align: right; }
.pairs--stack > div { flex-direction: column; gap: 0.1rem; }
.pairs--stack dd { text-align: left; }
.pillrow { display: flex; flex-wrap: wrap; gap: 0.5rem; list-style: none; padding: 0; margin: 0; }
.pill { border: 1px solid var(--line); background: var(--white); border-radius: 99px; padding: 0.35rem 0.85rem; font-size: 0.9rem; font-weight: 550; }
a.pill { text-decoration: none; }
a.pill:hover { border-color: var(--accent); }

.tag { display: inline-flex; align-items: center; border: 1px solid; padding: 0.12rem 0.6rem; border-radius: 99px; font-size: 0.74rem; font-weight: 650; letter-spacing: 0.01em; line-height: 1.5; }
.tag--neutral { background: var(--accent-soft); color: #1a5146; border-color: #bfd8cc; }
.tag--official { background: #e3f1ea; color: #0f5448; border-color: #a5cfbf; }
.tag--confirmed { background: #e8f1f9; color: #1b4566; border-color: #bbd3e8; }
.tag--published { background: #fbf5e4; color: #5a4600; border-color: #e4d39a; }
.tag--reported { background: #f2eff8; color: #45386f; border-color: #d3cbe7; }
.tag--warning { background: var(--warn-bg); color: var(--warn-ink); border-color: var(--warn-line); }
.tag--fictional { background: #fbeee4; color: #723f13; border-color: #ebcdb0; }
.tag--unknown { background: #f0f2f1; color: #3b4847; border-color: #d3dad7; }

.notice { border: 1px solid var(--warn-line); background: var(--warn-bg); color: var(--warn-ink); border-radius: var(--radius-sm); padding: 0.9rem 1.1rem; margin: 0 0 1.25rem; font-size: 0.95rem; }
.notice--info { border-color: var(--info-line); background: var(--info-bg); color: var(--info-ink); }

/* ── Provenance ─────────────────────────────────────────── */
.prov { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 0.15rem 0.5rem; margin-top: 0.25rem; }
.prov__status { display: inline-block; font-size: 0.74rem; font-weight: 650; padding: 0.05rem 0.55rem; border-radius: 99px; border: 1px solid; }
.prov__meta { font-size: 0.8rem; color: var(--muted); }
.prov--official { background: #e3f1ea; color: #0f5448; border-color: #a5cfbf; }
.prov--confirmed { background: #e8f1f9; color: #1b4566; border-color: #bbd3e8; }
.prov--published { background: #fbf5e4; color: #5a4600; border-color: #e4d39a; }
.prov--reported { background: #f2eff8; color: #45386f; border-color: #d3cbe7; }
.prov--warning { background: var(--warn-bg); color: var(--warn-ink); border-color: var(--warn-line); }
.prov--unknown { background: #f0f2f1; color: #3b4847; border-color: #d3dad7; }
.unknown { color: #3b4847; font-style: italic; }

.field { display: grid; gap: 0.2rem; padding: 0.8rem 0; border-bottom: 1px solid var(--line); }
.field__label { font-weight: 650; font-size: 0.92rem; }
.field__value { font-size: 0.95rem; }
@media (min-width: 640px) { .field { grid-template-columns: 220px minmax(0, 1fr); gap: 1rem; } }
.claimGroup { margin-bottom: 1rem; }
.contentSection { padding: 1.75rem 0; border-bottom: 1px solid var(--line); scroll-margin-top: 96px; }
.contentSection:first-of-type { padding-top: 0; }
.contentSection h2 { display: flex; align-items: center; gap: 0.2rem; }
.prose { max-width: 44rem; }
.prose p, .prose li { font-size: 1.03rem; color: var(--ink-2); }
.prose ul { padding-left: 1.2rem; }
.prose li { margin-bottom: 0.35rem; }
.stepnum { display: inline-grid; place-items: center; width: 1.9rem; height: 1.9rem; border-radius: 50%; background: var(--accent-strong); color: var(--white); font-size: 0.85rem; margin-right: 0.6rem; font-family: var(--font); font-weight: 650; flex: none; }

/* Journey stepper */
.journey ol { list-style: none; padding: 0; margin: 0 0 1.75rem; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.journey a { display: inline-flex; align-items: center; gap: 0.45rem; padding: 0.45rem 0.85rem; border: 1px solid var(--line); border-radius: 99px; background: var(--white); text-decoration: none; font-size: 0.86rem; font-weight: 600; min-height: 40px; }
.journey a:hover { border-color: var(--accent); }
.journey__num { display: inline-grid; place-items: center; width: 1.45rem; height: 1.45rem; border-radius: 50%; background: var(--accent-soft); color: var(--accent-strong); font-size: 0.74rem; font-weight: 700; }

.list { list-style: none; padding: 0; margin: 0; }
.list > li { padding: 0.6rem 0; border-bottom: 1px solid var(--line); }
.list > li:last-child { border-bottom: 0; }
.list--cards { display: grid; gap: 0.75rem; }
.list--cards > li { border-bottom: 1px solid var(--line); }
.bullets { padding-left: 1.2rem; }
.bullets li { margin-bottom: 0.7rem; }
.compact { margin: 0; padding-left: 1rem; font-size: 0.85rem; }

/* Callouts inside guides */
.callout { border-radius: var(--radius-sm); padding: 1rem 1.15rem; margin: 1rem 0; background: var(--sand); border: 1px solid #eadfcf; }
.callout h3 { margin-top: 0; }
.callout--urgent { background: #fff6f1; border-color: #efcab8; }
.callout--urgent h3 { color: #7a2f17; }

/* ── Cards ──────────────────────────────────────────────── */
.card { display: flex; flex-direction: column; gap: 0.8rem; }
.card__top { display: flex; gap: 0.85rem; align-items: center; }
.avatar { flex: none; width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(145deg, #e3efe8, #f3ece2); color: var(--accent-strong); font-weight: 700; font-family: var(--serif); font-size: 1.05rem; }
.card__title { margin: 0; font-size: 1.06rem; font-family: var(--font); }
.card__title a { text-decoration: none; }
.card__title a:hover { text-decoration: underline; color: var(--accent); }
.card__sub { margin: 0; font-size: 0.88rem; color: var(--muted); }
.card__facts { margin: 0; display: grid; gap: 0.35rem; font-size: 0.88rem; }
.card__facts div { display: grid; grid-template-columns: 8.5rem 1fr; gap: 0.5rem; }
.card__facts dt { font-weight: 600; }
.card__facts dd { margin: 0; color: var(--muted); }
.card__foot { margin-top: auto; display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }

/* Directory filters */
.directoryTop { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; margin-bottom: 1rem; }
.filters { border: 1px solid var(--line); background: var(--white); border-radius: var(--radius); padding: 1.1rem; margin-bottom: 1rem; box-shadow: var(--shadow-sm); }
.filters label, .demo label { display: block; font-weight: 650; font-size: 0.88rem; margin: 0.5rem 0 0.25rem; }
.filters input[type="search"], .filters select, .demo input, .demo select, .queue__reason {
  width: 100%; min-height: 46px; border: 1px solid #9eb3ad; border-radius: 12px; padding: 0.5rem 0.8rem; background: var(--white);
}
.hint { font-size: 0.82rem; color: var(--muted); margin: 0.35rem 0 0; }
.filters__more { margin-top: 0.75rem; }
.filters__more summary { cursor: pointer; font-weight: 650; padding: 0.5rem 0; min-height: 44px; display: flex; align-items: center; }
.filters__more summary::before { content: '▸'; margin-right: 0.5rem; color: var(--accent); }
.filters__more[open] summary::before { content: '▾'; }
.filters__grid { display: grid; gap: 0 1rem; margin-bottom: 1rem; }
@media (min-width: 640px) { .filters__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .filters__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.filterField--check { display: flex; align-items: center; gap: 0.5rem; padding-top: 1.5rem; }
.filterField--check input { width: 1.25rem; height: 1.25rem; accent-color: var(--accent); }
.filterField--check label { margin: 0; font-weight: 600; }
.resultCount { font-weight: 650; margin: 0.5rem 0 1rem; }
.empty { padding: 2rem; text-align: center; background: var(--white); border: 1px dashed var(--line-2); border-radius: var(--radius); }

/* Tables */
.tableWrap:focus-visible { outline-offset: 0; }
.tableWrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0.5rem 0 1rem; }
table { border-collapse: collapse; width: 100%; font-size: 0.9rem; background: var(--white); }
th, td { text-align: left; vertical-align: top; padding: 0.6rem; border-bottom: 1px solid var(--line); }
thead th { font-size: 0.76rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
table.hours { max-width: 360px; }
table.dense { font-size: 0.82rem; min-width: 640px; }

.checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.5rem; }
.checklist__item { display: flex; gap: 0.6rem; align-items: flex-start; padding: 0.5rem 0; border-bottom: 1px solid var(--line); }
.checklist__icon { flex: none; display: grid; place-items: center; width: 1.6rem; height: 1.6rem; border-radius: 50%; font-weight: 800; font-size: 0.85rem; }
.checklist--yes .checklist__icon { background: #e3f1ea; color: #0f5448; }
.checklist--no .checklist__icon { background: #fbeaea; color: #8a2525; }
.checklist--unknown .checklist__icon { background: #f0f2f1; color: #3b4847; }

.stages { list-style: none; padding: 0; margin: 1rem 0; display: grid; gap: 0.5rem; font-size: 0.9rem; }
.stages li { display: flex; gap: 0.6rem; align-items: center; color: var(--muted); }
.stages li.is-done { color: var(--ink); }
.stages__dot { display: grid; place-items: center; width: 1.6rem; height: 1.6rem; border-radius: 50%; border: 1px solid var(--line); font-size: 0.75rem; flex: none; }
.is-done .stages__dot { background: var(--accent-soft); border-color: #a5cfbf; color: var(--accent); }

.legend > div { display: grid; gap: 0.25rem; padding: 0.6rem 0; border-bottom: 1px solid var(--line); }
@media (min-width: 640px) { .legend > div { grid-template-columns: 240px 1fr; gap: 1rem; } }
.legend dd { margin: 0; }
.steps, .flow { padding-left: 1.3rem; }
.steps li, .flow li { margin-bottom: 0.4rem; }
.sourceRow { padding: 1rem 0; border-bottom: 1px solid var(--line); }
.sourceRow h3 { margin-top: 0; }

/* Provider demo */
.demo { display: grid; gap: 1rem; }
@media (min-width: 900px) { .demo { grid-template-columns: 1fr 1fr; } }
.demo fieldset { border: 0; padding: 0; margin: 0; }
.demo fieldset:disabled { opacity: 0.55; }
.demo button[type="submit"] { margin-top: 1rem; }
.formStatus { margin-top: 0.75rem; font-weight: 600; }
.formStatus--ok { color: #0f5448; }
.formStatus--error { color: #8a2525; }
.queue { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.75rem; }
.queue__item { border: 1px solid var(--line); border-radius: 12px; padding: 0.9rem; }
.queue__diff { display: grid; gap: 0.25rem; margin: 0.4rem 0; font-size: 0.9rem; }
@media (min-width: 640px) { .queue__diff { grid-template-columns: 1fr 1fr; } }
.queue__actions { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; margin-top: 0.5rem; }
.queue__reason { flex: 1 1 14rem; min-height: 36px; }

/* ── Map ────────────────────────────────────────────────── */
.mapLayout { display: grid; gap: 1rem; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 980px) { .mapLayout { grid-template-columns: 380px minmax(0, 1fr); gap: 1.5rem; align-items: start; } .mapLayout__side { max-height: calc(100vh - 120px); overflow: auto; position: sticky; top: 92px; padding-right: 0.25rem; } }
.mapFrame { position: relative; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow); background: #eef1ec; height: 420px; }
@media (min-width: 980px) { .mapFrame { height: min(680px, calc(100vh - 140px)); position: sticky; top: 92px; } }
.mapFrame--small { height: 260px; position: static; }
.mapCanvas, .mapCanvas.maplibregl-map { position: absolute; inset: 0; width: 100%; height: 100%; }
.mapFallback { position: absolute; inset: 0; display: grid; place-items: center; padding: 1.5rem; text-align: center; color: var(--muted); font-size: 0.92rem; }
.mapNote { font-size: 0.8rem; color: var(--muted); margin: 0.5rem 0 0; }
.clinicList { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.75rem; }
.clinicCard { border: 1px solid var(--line); background: var(--white); border-radius: var(--radius); padding: 1rem 1.1rem; box-shadow: var(--shadow-sm); }
.clinicCard[aria-current="true"] { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft), var(--shadow); }
.clinicCard__head { display: flex; align-items: flex-start; gap: 0.7rem; }
.clinicCard__pin { flex: none; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: var(--accent-strong); color: #fff; font-size: 0.8rem; font-weight: 700; margin-top: 0.15rem; }
.clinicCard__pin--area { background: #fff; color: var(--accent-strong); border: 2px dashed var(--accent); }
.clinicCard__name { font-size: 1.02rem; margin: 0; font-family: var(--font); }
.clinicCard__addr { font-size: 0.86rem; color: var(--muted); margin: 0.1rem 0 0; }
.clinicCard__people { list-style: none; padding: 0; margin: 0.6rem 0 0; display: grid; gap: 0.25rem; font-size: 0.9rem; }
.clinicCard__people button, .linkButton { background: none; border: 0; padding: 0.15rem 0; color: var(--accent-strong); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; min-height: 28px; text-align: left; }
.clinicCard__actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.75rem; }
/* MapLibre positions markers with an inline transform, so marker shapes must not rely on transform. */
.mapMarker { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; background: var(--accent-strong); color: #fff; border: 3px solid #fff; box-shadow: 0 4px 14px rgba(20, 43, 42, 0.32); cursor: pointer; padding: 0; font: 700 0.82rem/1 var(--font); }
.mapMarker--area { background: rgba(255, 255, 255, 0.94); color: var(--accent-strong); border: 2px dashed var(--accent); width: 40px; height: 40px; }
.mapMarker[aria-pressed="true"] { background: var(--clay); color: #fff; border-color: #fff; z-index: 2; }
.mapMarker--area[aria-pressed="true"] { background: #fbe6db; color: #6d2f15; border-color: var(--clay); }
.maplibregl-ctrl-attrib { font-size: 11px; }

/* ── Footer ─────────────────────────────────────────────── */
.sitefooter { background: var(--ink); color: #dbe7e3; padding: 3rem 0 2.5rem; margin-top: 2rem; }
.sitefooter a { color: #e8f1ee; }
.sitefooter .link { color: #a9ddcf; }
.footer__inner { display: grid; gap: 1.75rem; }
@media (min-width: 800px) { .footer__inner { grid-template-columns: 1.4fr 1fr 1fr; } }
.footer__brand { font-family: var(--serif); font-size: 1.5rem; font-weight: 480; color: #fff; }
.footer__links { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.45rem; }
.footer__links a { display: inline-block; padding: 0.2rem 0; }
.footer__small { grid-column: 1 / -1; font-size: 0.82rem; opacity: 0.9; margin: 0; border-top: 1px solid rgba(255, 255, 255, 0.12); padding-top: 1.25rem; }

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
  .btn, .tile--link, .routes a, .entry, .topicTile, .clinicCard { transition: border-color 0.18s, background-color 0.18s, box-shadow 0.18s; }
}
@media print {
  .siteheader, .sitefooter, .filters, .journey, .mapFrame { display: none; }
}

/* Profile summary */
.glance { border: 1px solid var(--line); background: var(--white); border-radius: var(--radius); padding: 1.1rem 1.3rem; margin-bottom: 1.5rem; box-shadow: var(--shadow-sm); }
.glance__title { font-size: 1.05rem; margin: 0 0 0.5rem; font-family: var(--font); }
.glance__grid { margin: 0; display: grid; gap: 0.75rem; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 640px) { .glance__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.glance__grid dt { font-size: 0.78rem; font-weight: 650; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }
.glance__grid dd { margin: 0.1rem 0 0; }

/* Evidence quotes */
.evidence { flex-basis: 100%; font-size: 0.85rem; margin-top: 0.15rem; }
.evidence summary { cursor: pointer; color: var(--accent-strong); font-weight: 600; min-height: 24px; }
.evidence blockquote { margin: 0.4rem 0; padding: 0.4rem 0.75rem; border-left: 3px solid #e4d39a; background: #fffcf1; font-style: italic; }

/* Research build */
.previewbar--research { background: #5c1f12; }
.statgrid { display: grid; gap: 0.75rem; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); margin: 0 0 1.5rem; }
.statgrid div { border: 1px solid var(--line); background: var(--white); border-radius: 12px; padding: 0.75rem 1rem; }
.statgrid dt { font-size: 0.85rem; color: var(--muted); }
.statgrid dd { margin: 0; font-size: 1.6rem; font-weight: 800; }
td.quote { font-style: italic; max-width: 28rem; }
.letter { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; margin-bottom: 1.5rem; }
.letter table { margin: 1rem 0; }
.letter caption { text-align: left; font-weight: 700; padding-bottom: 0.4rem; }
@media print { .previewbar, .siteheader, .sitefooter, .notice, .btn { display: none !important; } .letter { border: 0; } }

/* Verification console */
.verifyList { list-style: none; padding: 0; display: grid; gap: 1rem; }
.verifyItem { border: 1px solid var(--line); background: var(--white); border-radius: var(--radius); padding: 1rem 1.25rem; }
.verifyItem__name { font-size: 1.1rem; margin: 0 0 0.5rem; display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.cmd { background: var(--ink); color: #e8f4f1; padding: 0.75rem 1rem; border-radius: 10px; overflow-x: auto; font-size: 0.8rem; margin: 0.25rem 0 0; }
.cmd code { background: none; color: inherit; word-break: normal; white-space: pre; }

/* Clinic portal forms */
.radios { border: 0; padding: 0; margin: 0.75rem 0; }
.radios legend { font-weight: 650; font-size: 0.88rem; margin-bottom: 0.25rem; }
.panel input:not([type=radio]):not([type=checkbox]), .panel select { width: 100%; min-height: 46px; border: 1px solid #9eb3ad; border-radius: 12px; padding: 0.5rem 0.8rem; background: var(--white); }
.panel label { display: block; font-weight: 650; font-size: 0.88rem; margin: 0.5rem 0 0.25rem; }
.panel .radios label, .panel .queue__actions label { display: flex; gap: 0.5rem; align-items: center; font-weight: 400; margin: 0; min-height: 32px; }
.panel button[type=submit] { margin-top: 1rem; }

/* Why shown */
.why { border-top: 1px dashed var(--line-2); padding-top: 0.65rem; font-size: 0.85rem; }
.why__title { font-weight: 650; margin: 0 0 0.3rem; }
.why__list { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.3rem; }
.why__layer { display: inline-block; min-width: 9.5rem; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); font-weight: 700; }
