:root {
  --surface-page: #f2f5f3;
  --surface-card: #fff;
  --surface-soft: #e8efed;
  --surface-hover: #e1ebe8;
  --ink-primary: #112421;
  --ink-secondary: #4d5f5b;
  --ink-muted: #71817d;
  --gridline: #dce5e2;
  --border: rgba(20, 57, 50, .12);
  --border-strong: rgba(20, 57, 50, .22);
  --accent: #126274;
  --accent-hover: #0b4c5b;
  --accent-soft: #d7eeef;
  --accent-ink: #fff;
  --highlight: #d98b1f;
  --highlight-soft: #fff0d5;
  --positive: #257258;
  --nodata-fill: #cdd7d4;
  --seq-0: #d9efec;
  --seq-1: #a9dcd7;
  --seq-2: #6fc2bd;
  --seq-3: #319c9e;
  --seq-4: #167185;
  --seq-5: #0b4058;
  --focus-ring: #167185;
  --shadow-sm: 0 1px 2px rgba(20, 57, 50, .06), 0 8px 28px rgba(20, 57, 50, .04);
  --shadow-lg: 0 18px 48px rgba(20, 57, 50, .1);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --surface-page: #0d1918;
    --surface-card: #142321;
    --surface-soft: #1b302d;
    --surface-hover: #233b37;
    --ink-primary: #f2f7f5;
    --ink-secondary: #b7c6c2;
    --ink-muted: #81938e;
    --gridline: #293d39;
    --border: rgba(225, 242, 237, .1);
    --border-strong: rgba(225, 242, 237, .2);
    --accent: #64c5cc;
    --accent-hover: #91dce0;
    --accent-soft: #17393d;
    --accent-ink: #092124;
    --highlight: #f0b45a;
    --highlight-soft: #3f301b;
    --positive: #79cfad;
    --nodata-fill: #344945;
    --seq-0: #183331;
    --seq-1: #195052;
    --seq-2: #167078;
    --seq-3: #2a9096;
    --seq-4: #4aafb3;
    --seq-5: #84d2d0;
    --focus-ring: #64c5cc;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .2), 0 8px 28px rgba(0, 0, 0, .12);
    --shadow-lg: 0 18px 48px rgba(0, 0, 0, .26);
  }
}

:root[data-theme="dark"] {
  --surface-page: #0d1918;
  --surface-card: #142321;
  --surface-soft: #1b302d;
  --surface-hover: #233b37;
  --ink-primary: #f2f7f5;
  --ink-secondary: #b7c6c2;
  --ink-muted: #81938e;
  --gridline: #293d39;
  --border: rgba(225, 242, 237, .1);
  --border-strong: rgba(225, 242, 237, .2);
  --accent: #64c5cc;
  --accent-hover: #91dce0;
  --accent-soft: #17393d;
  --accent-ink: #092124;
  --highlight: #f0b45a;
  --highlight-soft: #3f301b;
  --positive: #79cfad;
  --nodata-fill: #344945;
  --seq-0: #183331;
  --seq-1: #195052;
  --seq-2: #167078;
  --seq-3: #2a9096;
  --seq-4: #4aafb3;
  --seq-5: #84d2d0;
  --focus-ring: #64c5cc;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .2), 0 8px 28px rgba(0, 0, 0, .12);
  --shadow-lg: 0 18px 48px rgba(0, 0, 0, .26);
}

html { scroll-behavior: smooth; }
html, body { min-height: 100%; }
body {
  background: var(--surface-page);
  color: var(--ink-primary);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  line-height: 1.45;
}
button, select { font: inherit; }
button { color: inherit; }
a { color: var(--accent); text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--focus-ring) !important; outline-offset: 2px !important; }

.app { max-width: 1280px; margin: 0 auto; padding: 0 28px 56px; }
.topbar {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid var(--border);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink-primary);
  text-decoration: none;
  font-size: .93rem;
  font-weight: 750;
  letter-spacing: -.01em;
}
.brand-mark {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  color: var(--accent-ink);
  background: var(--accent);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14);
}
.brand-mark::after { content: "+"; font-size: 1.25rem; font-weight: 500; line-height: 1; }
.top-actions { display: flex; align-items: center; gap: 8px; }
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--ink-secondary);
  font-size: .76rem;
  font-weight: 650;
  white-space: nowrap;
}
.status-badge::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #3b9a70;
  box-shadow: 0 0 0 3px rgba(59, 154, 112, .13);
}
.icon-btn {
  border: 1px solid var(--border);
  background: var(--surface-card);
  border-radius: 10px;
  min-width: 38px;
  height: 38px;
  padding: 0 11px;
  display: inline-grid;
  place-items: center;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}
.icon-btn:hover { background: var(--surface-hover); }
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 28px;
  padding: 30px 0 22px;
}
.eyebrow {
  margin: 0 0 7px;
  color: var(--accent);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .11em;
  text-transform: uppercase;
}
h1 {
  max-width: 790px;
  margin: 0;
  font-size: clamp(2rem, 5vw, 3.9rem);
  font-weight: 760;
  line-height: .98;
  letter-spacing: -.055em;
  text-wrap: balance;
}
p.lede {
  max-width: 68ch;
  margin: 14px 0 0;
  color: var(--ink-secondary);
  font-size: 1rem;
}
.hero-source {
  max-width: 240px;
  padding: 14px 16px;
  background: var(--surface-soft);
  border-radius: 12px;
  color: var(--ink-secondary);
  font-size: .76rem;
}
.hero-source strong { display: block; color: var(--ink-primary); margin-bottom: 2px; }
.hero-source a { color: inherit; }

.filters {
  display: grid;
  grid-template-columns: 1.15fr 1.35fr minmax(250px, .9fr) auto;
  gap: 14px;
  align-items: end;
  padding: 16px;
  margin-bottom: 14px;
  background: var(--surface-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 8px;
  z-index: 12;
}
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field label { font-size: .72rem; font-weight: 750; color: var(--ink-secondary); }
select {
  width: 100%;
  min-height: 42px;
  background-color: var(--surface-page);
  border-radius: 10px;
  padding: 9px 36px 9px 12px;
  font-size: .88rem;
  background-position: right 11px center;
}
.segment {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 42px;
  padding: 3px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background: var(--surface-page);
}
.segment button {
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--ink-secondary);
  font-size: .77rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}
.segment button[aria-pressed="true"] {
  color: var(--ink-primary);
  background: var(--surface-card);
  box-shadow: 0 1px 4px rgba(20, 57, 50, .12);
}
.filter-actions { display: flex; flex-wrap: wrap; gap: 8px; min-width: 0; }
.text-btn {
  min-height: 42px;
  padding: 0 13px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background: transparent;
  color: var(--ink-secondary);
  font-size: .8rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}
.text-btn:hover { color: var(--ink-primary); background: var(--surface-hover); }
.text-btn.primary { color: var(--accent-ink); background: var(--accent); border-color: var(--accent); }
.text-btn.primary:hover { background: var(--accent-hover); }

.stat-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 14px 0; }
.stat-tile {
  position: relative;
  overflow: hidden;
  background: var(--surface-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px 17px;
  box-shadow: var(--shadow-sm);
}
.stat-tile .k { font-size: .7rem; font-weight: 750; color: var(--ink-muted); margin-bottom: 7px; }
.stat-tile .v {
  font-size: clamp(1.15rem, 2vw, 1.6rem);
  line-height: 1.12;
  font-weight: 760;
  letter-spacing: -.025em;
  font-variant-numeric: tabular-nums;
}
.stat-tile .sub { margin-top: 5px; color: var(--ink-muted); font-size: .68rem; }
.insight {
  display: flex;
  align-items: center;
  gap: 11px;
  margin: 0 0 14px;
  padding: 11px 14px;
  border: 1px solid rgba(217, 139, 31, .25);
  border-radius: 12px;
  background: var(--highlight-soft);
  color: var(--ink-secondary);
  font-size: .82rem;
}
.insight::before {
  content: "i";
  flex: 0 0 auto;
  width: 21px;
  height: 21px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #fff;
  background: var(--highlight);
  font: 800 .74rem/1 Georgia, serif;
}
.insight strong { color: var(--ink-primary); }
.insight[hidden] { display: none; }

.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 18px; margin: 28px 0 12px; }
.section-heading h2 { margin: 0; font-size: 1.15rem; letter-spacing: -.02em; }
.section-heading p { margin: 3px 0 0; color: var(--ink-muted); font-size: .78rem; }
.metric-note { color: var(--ink-muted); font-size: .72rem; text-align: right; }
.layout {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(320px, .8fr);
  gap: 14px;
  align-items: stretch;
}
.map-panel, .rank-panel, .table-panel {
  background: var(--surface-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
}
.map-panel { padding: 14px 16px 10px; overflow: hidden; }
.rank-panel { padding: 18px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 3px; }
.panel-title { margin: 0; color: var(--ink-primary); font-size: .86rem; font-weight: 760; letter-spacing: -.01em; }
.panel-kicker { margin: 3px 0 0; color: var(--ink-muted); font-size: .7rem; }
#mapContainer {
  width: 100%;
  height: 320px;
  margin-top: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: linear-gradient(145deg, var(--surface-card), var(--surface-soft));
}
.map-legend-note { padding: 10px 4px 4px; margin: 0; color: var(--ink-muted); font-size: .68rem; line-height: 1.5; }
.map-legend-note strong { color: var(--ink-secondary); }
.highcharts-map-series .highcharts-point { vector-effect: non-scaling-stroke; transition: stroke-width .16s ease, filter .16s ease; }
.highcharts-map-series .highcharts-point.region-selected {
  stroke: var(--highlight) !important;
  stroke-width: 3.5px !important;
  filter: drop-shadow(0 2px 2px rgba(17, 36, 33, .18));
}
.region-focus { display: grid; grid-template-columns: 1fr auto; gap: 14px; align-items: start; padding: 18px; }
.region-focus .label { color: var(--ink-muted); font-size: .68rem; font-weight: 750; }
.region-focus h3 { margin: 3px 0 0; font-size: 1rem; }
.region-focus .focus-number { font-size: 1.55rem; font-weight: 780; letter-spacing: -.04em; text-align: right; }
.region-focus .focus-number small { display: block; color: var(--ink-muted); font-size: .66rem; font-weight: 600; letter-spacing: 0; }
.focus-meta { display: flex; flex-wrap: wrap; gap: 6px; grid-column: 1 / -1; }
.focus-meta span { padding: 5px 8px; border-radius: 7px; color: var(--ink-secondary); background: var(--surface-soft); font-size: .66rem; }

.table-panel { margin-top: 14px; overflow: hidden; }
.table-toolbar { padding: 16px 18px; border-bottom: 1px solid var(--gridline); }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .78rem; }
th, td { padding: 12px 18px; border-bottom: 1px solid var(--gridline); text-align: right; white-space: nowrap; }
th:first-child, td:first-child { text-align: left; }
th { color: var(--ink-muted); background: var(--surface-soft); font-size: .66rem; letter-spacing: .03em; text-transform: uppercase; }
td { color: var(--ink-secondary); font-variant-numeric: tabular-nums; }
td:first-child { color: var(--ink-primary); font-weight: 700; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: var(--surface-soft); }
.coverage { display: inline-flex; align-items: center; gap: 6px; }
.coverage-dot { width: 7px; height: 7px; border-radius: 999px; background: var(--positive); }
.coverage-dot.partial { background: var(--highlight); }

.methodology {
  margin-top: 18px;
  padding-top: 0;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface-card);
  box-shadow: var(--shadow-sm);
}
.methodology summary { padding: 15px 18px; cursor: pointer; color: var(--ink-primary); font-size: .8rem; font-weight: 740; }
.methodology .body { max-width: 82ch; padding: 0 18px 16px; color: var(--ink-secondary); font-size: .78rem; line-height: 1.6; }
.methodology .body p { margin: 0 0 9px; }
.methodology .body code { padding: 1px 5px; border-radius: 4px; background: var(--surface-hover); font-size: .85em; }
footer { display: flex; justify-content: space-between; gap: 20px; padding: 22px 2px 0; color: var(--ink-muted); font-size: .7rem; }
.toast {
  position: fixed;
  z-index: 30;
  right: 22px;
  bottom: 22px;
  transform: translateY(18px);
  padding: 11px 14px;
  border-radius: 10px;
  color: var(--accent-ink);
  background: var(--accent);
  box-shadow: var(--shadow-lg);
  font-size: .78rem;
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
}
.toast.show { opacity: 1; transform: translateY(0); }
.hc-tooltip-box { font-family: Inter, ui-sans-serif, system-ui, sans-serif; line-height: 1.5; }

/* ---------- delt hjelpeklasse ---------- */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* ---------- T1: merknad når pasientvektet mangler ---------- */
.metric-fallback {
  display: flex;
  gap: 8px;
  align-items: center;
  margin: 0 0 14px;
  padding: 10px 13px;
  border: 1px solid var(--highlight);
  border-radius: 11px;
  background: var(--highlight-soft);
  color: var(--ink-primary);
  font-size: .76rem;
  font-weight: 650;
}
.metric-fallback::before {
  content: "!";
  flex: 0 0 auto;
  width: 17px;
  height: 17px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--highlight);
  color: #fff;
  font-size: .66rem;
  font-weight: 800;
}
.metric-fallback[hidden] { display: none; }

/* ---------- T2: rangeringen er nå hovedelementet ---------- */
#rankChart { width: 100%; min-height: 320px; margin-top: 6px; }
.rank-panel .panel-head { align-items: start; }
.map-panel .panel-head { margin-bottom: 0; }

/* ---------- T3: valgt region og nedbrytning til behandlingssted ---------- */
.region-detail {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  margin-top: 14px;
}
.region-focus, .steder-block {
  min-width: 0;
  background: var(--surface-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
}
.steder-block { padding: 16px 18px 6px; }
.steder-head {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.steder-tools { display: flex; flex-wrap: wrap; gap: 8px; }
.steder-tools input[type="search"] {
  min-height: 42px;
  min-width: 190px;
  padding: 9px 12px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background: var(--surface-page);
  color: var(--ink-primary);
  font: inherit;
  font-size: .82rem;
}
.steder-tools input[type="search"]:disabled { opacity: .55; cursor: not-allowed; }
.steder-status { margin: 0 0 10px; color: var(--ink-secondary); font-size: .74rem; }
.steder-status:empty { display: none; }
.steder-table { width: 100%; border-collapse: collapse; }
.steder-table th { text-align: left; }
.steder-table th:not(:first-child), .steder-table td:not(:first-child) { text-align: right; }
.steder-table td { font-variant-numeric: tabular-nums; }
.sort-btn {
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink-secondary);
  font: inherit;
  cursor: pointer;
  text-align: inherit;
}
.sort-btn:hover { color: var(--accent); text-decoration: underline; }
[aria-sort="ascending"] .sort-btn::after { content: " ▲"; font-size: .7em; }
[aria-sort="descending"] .sort-btn::after { content: " ▼"; font-size: .7em; }
.sted-btn {
  display: flex;
  gap: 7px;
  align-items: center;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink-primary);
  font: inherit;
  font-size: .78rem;
  font-weight: 650;
  text-align: left;
  cursor: pointer;
}
.sted-btn:hover { color: var(--accent); }
.sted-btn .chev {
  flex: 0 0 auto;
  width: 0;
  height: 0;
  border-left: 5px solid currentColor;
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  transition: transform .15s ease;
}
.sted-btn.is-open .chev { transform: rotate(90deg); }
.sted-sub td { padding-top: 0; }
.sted-sub-list { margin: 0 0 6px; padding: 8px 12px; list-style: none; border-radius: 10px; background: var(--surface-soft); }
.sted-sub-list li {
  display: flex;
  gap: 14px;
  justify-content: space-between;
  padding: 5px 0;
  color: var(--ink-secondary);
  font-size: .74rem;
  text-align: left;
}
.sted-sub-list li + li { border-top: 1px solid var(--gridline); }
.sted-sub-list li span:last-child { flex: 0 0 auto; font-variant-numeric: tabular-nums; font-weight: 700; }
.steder-table .empty { padding: 18px 0; color: var(--ink-secondary); text-align: left; }
.muted { color: var(--ink-secondary); font-weight: 500; }

/* ---------- T4: pasientoppslag ---------- */
.patient {
  margin-top: 26px;
  padding: 20px 22px 18px;
  background: var(--surface-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
}
.patient-head {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
}
.patient-head h2 { margin: 4px 0 0; font-size: 1.15rem; letter-spacing: -.02em; }
.patient-lede { margin: 6px 0 0; max-width: 62ch; color: var(--ink-secondary); font-size: .82rem; }
.patient-date { margin: 0; color: var(--ink-secondary); font-size: .72rem; font-weight: 650; white-space: nowrap; }
.patient-search { position: relative; margin: 16px 0 0; max-width: 480px; }
.patient-search label { display: block; margin-bottom: 6px; color: var(--ink-secondary); font-size: .72rem; font-weight: 750; }
.patient-search input {
  width: 100%;
  min-height: 44px;
  padding: 10px 13px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background: var(--surface-page);
  color: var(--ink-primary);
  font: inherit;
  font-size: .88rem;
}
.suggest {
  position: absolute;
  z-index: 14;
  left: 0;
  right: 0;
  max-height: 268px;
  margin-top: 5px;
  overflow-y: auto;
  border: 1px solid var(--border-strong);
  border-radius: 11px;
  background: var(--surface-card);
  box-shadow: var(--shadow-lg);
}
.suggest[hidden] { display: none; }
.suggest button {
  display: block;
  width: 100%;
  padding: 9px 13px;
  border: 0;
  background: none;
  color: var(--ink-primary);
  font: inherit;
  font-size: .8rem;
  text-align: left;
  cursor: pointer;
}
.suggest button + button { border-top: 1px solid var(--gridline); }
.suggest button:hover, .suggest button:focus-visible { background: var(--surface-hover); }
.suggest-empty { margin: 0; padding: 11px 13px; color: var(--ink-secondary); font-size: .78rem; }
.patient-output:not(:empty) { margin-top: 18px; }
.patient-result-title { margin: 0 0 10px; font-size: .9rem; font-weight: 760; }
.patient-status { margin: 0; color: var(--ink-secondary); font-size: .8rem; }
.patient-table { width: 100%; border-collapse: collapse; }
.patient-table th { text-align: left; }
.patient-table th:last-child, .patient-table td:last-child { text-align: right; font-variant-numeric: tabular-nums; }
.patient-note { margin: 18px 0 0; padding-top: 14px; border-top: 1px solid var(--gridline); color: var(--ink-secondary); font-size: .76rem; line-height: 1.6; }
.patient-note strong { color: var(--ink-primary); }
.patient-disclaimer { margin: 8px 0 0; color: var(--ink-secondary); font-size: .72rem; line-height: 1.55; }

/* ---------- T5: metodeseksjonen ---------- */
.methodology .body { max-width: 82ch; }
.methodology .body h4 {
  margin: 16px 0 5px;
  color: var(--ink-primary);
  font-size: .78rem;
  font-weight: 780;
}
.methodology .body h4:first-child { margin-top: 0; }
.methodology .body a { color: var(--accent); }
.methodology .body .method-correction {
  padding: 10px 12px;
  border-left: 3px solid var(--highlight);
  border-radius: 0 8px 8px 0;
  background: var(--highlight-soft);
  color: var(--ink-primary);
}

@media (max-width: 1040px) {
  .filters { grid-template-columns: 1fr 1fr; }
  .filter-actions { justify-content: flex-end; }
  .layout { grid-template-columns: minmax(0, 1.35fr) minmax(280px, .8fr); }
}
@media (max-width: 780px) {
  .app { padding-inline: 16px; }
  .status-badge { display: none; }
  .hero { grid-template-columns: 1fr; padding-top: 24px; }
  .hero-source { max-width: none; }
  .filters { position: static; grid-template-columns: minmax(0, 1fr); }
  .filter-actions { flex-wrap: wrap; justify-content: stretch; }
  .filter-actions .text-btn { flex: 1; }
  .stat-strip { grid-template-columns: 1fr 1fr; }
  .layout { grid-template-columns: minmax(0, 1fr); }
  #mapContainer { height: 300px; }
  .steder-head, .patient-head { flex-direction: column; align-items: stretch; }
  .steder-tools input[type="search"] { min-width: 0; flex: 1; }
  .patient-date { white-space: normal; }
  .metric-note { display: none; }
  th, td { padding: 11px 13px; }
  footer { flex-direction: column; gap: 5px; }
}
@media (max-width: 480px) {
  h1 { font-size: 2.15rem; }
  .stat-strip { grid-template-columns: 1fr; }
  #mapContainer { height: 260px; }
  .patient { padding: 16px 15px 14px; }
  .steder-block { padding: 14px 14px 4px; }
  .region-focus { padding: 15px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

/* Editorial layout: a strong opening and a quieter data workspace. */
:root { --surface-page: #f7f6f0; --surface-soft: #eeeee6; --ink-muted: #65746e; --shadow-sm: none; }
.topbar { min-height: 78px; border: 0; }
.brand-mark { border-radius: 50%; }
.hero {
  position: relative;
  grid-template-columns: minmax(0, 1.4fr) minmax(250px, .8fr);
  align-items: center;
  gap: 42px 56px;
  padding: 52px 48px 22px;
  background: #103b3c;
  color: #f7f6f0;
  border-radius: 4px;
}
.hero .eyebrow { color: #b8d4c6; }
.hero h1 { font-size: clamp(2.8rem, 5.5vw, 4.8rem); font-weight: 650; letter-spacing: -.06em; line-height: 1.02; }
.hero .lede { color: #c4d6ce; max-width: 46ch; line-height: 1.65; margin-top: 22px; }
.hero-finding { border-left: 1px solid #52706a; padding-left: 32px; }
.finding-label { margin: 0; color: #d1e0d9; font-size: .85rem; }
.finding-number { color: #f3bd69; font-size: clamp(2.8rem, 4.7vw, 4.3rem); letter-spacing: -.055em; font-weight: 650; line-height: 1.2; margin: 14px 0; font-variant-numeric: tabular-nums; }
.finding-context { color: #c4d6ce; font-size: .8rem; line-height: 1.65; }
.hero-link { display: inline-flex; gap: 24px; align-items: center; color: #f7f6f0; font-size: .85rem; margin-top: 14px; text-decoration: none; border-bottom: 1px solid #78928a; padding-bottom: 6px; }
.hero-link span { font-size: 1.3rem; }
.hero-source { grid-column: 1 / -1; max-width: none; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 20px; padding: 18px 0 0; border-top: 1px solid #52706a; border-radius: 0; background: transparent; color: #c4d6ce; }
.hero-source strong { color: #d9e7e0; font-weight: 500; }
.patient { position: relative; margin: 0 0 44px; padding: 32px 0 26px; border: 0; border-bottom: 1px solid var(--border-strong); border-radius: 0; background: transparent; }
.patient-head h2 { font-size: clamp(1.3rem, 2.3vw, 1.8rem); font-weight: 650; letter-spacing: -.035em; }
.patient-search { max-width: 680px; margin-top: 20px; }
.patient-search input { min-height: 58px; background: var(--surface-card); border-radius: 6px; font-size: 1rem; padding: 14px 18px; border-color: var(--border-strong); }
.patient-search label { font-size: .8rem; }
.patient-note { margin-top: 18px; padding-top: 0; border: 0; }
.patient-disclaimer { font-size: .78rem; }
.explore-heading h2 { font-size: clamp(1.5rem, 3vw, 2rem); letter-spacing: -.04em; font-weight: 650; margin: 0 0 20px; }
.filters { border-radius: 6px; box-shadow: none; padding: 18px; grid-template-columns: 1fr 1fr minmax(250px, 1fr); }
.filter-actions { grid-column: 1 / -1; justify-content: flex-end; }
.stat-strip { gap: 0; padding: 12px 0; margin: 10px 0 20px; border-bottom: 1px solid var(--border); }
.stat-tile { border: 0; border-right: 1px solid var(--border); border-radius: 0; background: transparent; padding: 18px 24px; }
.stat-tile:first-child { padding-left: 0; }
.stat-tile:last-child { border-right: 0; }
.stat-tile .k { font-size: .78rem; }
.stat-tile .v { font-size: clamp(1.3rem, 2.5vw, 2rem); }
.stat-tile .sub { font-size: .76rem; }
.insight { border: 0; border-left: 3px solid var(--highlight); border-radius: 0; padding: 14px 16px; }
.insight::before { display: none; }
.section-heading h2 { font-size: 1.35rem; }
.layout { gap: 0; background: var(--surface-card); border: 1px solid var(--border); border-radius: 6px; overflow: hidden; }
.rank-panel, .map-panel { border: 0; border-radius: 0; padding: 24px; }
.map-panel { border-left: 1px solid var(--border); }
#mapContainer { border: 0; border-radius: 0; background: transparent; }
.panel-kicker, .map-legend-note { font-size: .78rem; }
.region-focus, .steder-block, .table-panel, .methodology { border-radius: 6px; }
.region-focus { background: var(--surface-soft); border: 0; }
.region-focus .focus-number { font-size: 2rem; }
.region-focus .label, .focus-meta span { font-size: .76rem; }
#hovedSelect { scroll-margin-top: 110px; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --surface-page: #0d1918; --surface-soft: #1b302d; --ink-muted: #a0b3ab; }
}
:root[data-theme="dark"] { --surface-page: #0d1918; --surface-soft: #1b302d; --ink-muted: #a0b3ab; }
@media (max-width: 1040px) {
  .hero { padding: 36px 30px 20px; gap: 30px; }
  .filters { grid-template-columns: 1fr 1fr; }
  .filter-actions { grid-column: auto; }
}
@media (max-width: 780px) {
  .hero { grid-template-columns: 1fr; padding: 30px 24px 20px; gap: 26px; }
  .hero h1 { max-width: 12ch; }
  .hero-finding { border-left: 0; border-top: 1px solid #52706a; padding: 22px 0 0; }
  .finding-number { margin: 6px 0; }
  .hero-source { font-size: .75rem; }
  .patient { margin-bottom: 28px; }
  .filters { grid-template-columns: 1fr; }
  .filter-actions { grid-column: 1; }
  .stat-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .stat-tile { padding: 14px 10px; }
  .stat-tile:first-child { grid-column: 1 / -1; border: 0; padding-bottom: 20px; }
  .stat-tile:first-child .v { font-size: 2.5rem; }
  .stat-tile:nth-child(2) { padding-left: 0; }
  .stat-tile .v { font-size: 1.12rem; }
  .stat-tile .k, .stat-tile .sub { font-size: .73rem; }
  .map-panel { border-left: 0; border-top: 1px solid var(--border); }
  .rank-panel, .map-panel { padding: 18px 14px; }
  .panel-head { flex-wrap: wrap; }
}
