
:root {
  --bg: #f6f7f9; --surface: #ffffff; --text: #1d2330; --muted: #5b6473; --line: #d9dde4;
  --accent: #1f5fbf; --accent-text: #ffffff; --ok-bg: #e7f5ec; --ok: #1d6b3a;
  --warn-bg: #fff6e0; --warn: #7a5200; --err-bg: #fdecec; --err: #a12020; --focus: #ffbf47;
  --chart: #1f5fbf; --chart-hover: #174a94;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14171c; --surface: #1d2129; --text: #e8ebf0; --muted: #a6aebb; --line: #343a46;
    --accent: #6aa3ff; --accent-text: #0d1117; --ok-bg: #16301f; --ok: #8fd6a6;
    --warn-bg: #33290f; --warn: #f0c56a; --err-bg: #3a1a1a; --err: #ff9c9c;
    --chart: #5b93ef; --chart-hover: #7aa9f3;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text);
  font: 17px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
a { color: var(--accent); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 8px; background: var(--surface); padding: 8px; z-index: 10; }
header.top { background: var(--surface); border-bottom: 1px solid var(--line); }
header.top .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; padding-top: 10px; padding-bottom: 10px; }
.brand { font-weight: 700; text-decoration: none; color: var(--text); margin-right: auto; }
.brand small { display: block; font-weight: 400; color: var(--muted); font-size: 14px; }
nav.main { display: flex; flex-wrap: wrap; gap: 4px; }
nav.main a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; border-radius: 8px; text-decoration: none; }
nav.main a[aria-current="page"] { background: var(--bg); font-weight: 600; }
.wrap { max-width: 960px; margin: 0 auto; padding-left: 16px; padding-right: 16px; }
main { padding-top: 24px; padding-bottom: 48px; }
h1 { font-size: 28px; line-height: 1.2; margin: 0 0 16px; }
h2 { font-size: 21px; margin: 32px 0 12px; }
h3 { font-size: 18px; margin: 20px 0 8px; }
p { margin: 0 0 12px; }
.muted { color: var(--muted); }
.spaced { margin-top: 16px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 20px; margin-bottom: 16px; }
.narrow { max-width: 520px; }
.card > :first-child, .card h2:first-child { margin-top: 0; }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
label { display: block; font-weight: 600; margin-bottom: 6px; }
.field { margin-bottom: 18px; }
.hint { display: block; color: var(--muted); font-size: 15px; margin: -2px 0 6px; font-weight: 400; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=tel], input[type=search],
textarea, select {
  width: 100%; min-height: 44px; padding: 10px 12px; font: inherit; color: var(--text);
  background: var(--surface); border: 1px solid var(--muted); border-radius: 8px; }
textarea { min-height: 220px; resize: vertical; }
textarea.short { min-height: 100px; }
.field.has-error input, .field.has-error textarea, .field.has-error select { border: 2px solid var(--err); }
.error-text { color: var(--err); font-weight: 600; margin: 4px 0 0; }
.check { display: flex; gap: 12px; align-items: flex-start; font-weight: 400; min-height: 44px; }
.check input { width: 24px; height: 24px; margin-top: 2px; flex: none; }
fieldset { border: 0; padding: 0; margin: 0 0 18px; }
legend { font-weight: 600; margin-bottom: 6px; }
.button, button { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 18px;
  font: inherit; font-weight: 600; border-radius: 8px; border: 1px solid var(--accent); cursor: pointer;
  background: var(--accent); color: var(--accent-text); text-decoration: none; }
.button.secondary, button.secondary { background: var(--surface); color: var(--accent); }
.button.danger, button.danger { background: var(--err); border-color: var(--err); color: #fff; }
button.link { background: none; border: 0; color: var(--accent); padding: 0 8px; text-decoration: underline; font-weight: 400; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 8px; }
.actions form { margin: 0; }
.notice { border-radius: 10px; padding: 14px 16px; margin-bottom: 16px; border: 1px solid var(--line); background: var(--surface); }
.notice.ok { background: var(--ok-bg); color: var(--ok); border-color: transparent; }
.notice.warn { background: var(--warn-bg); color: var(--warn); border-color: transparent; }
.notice.error { background: var(--err-bg); color: var(--err); border-color: transparent; }
.notice ul { margin: 6px 0 0; padding-left: 20px; }
.test-bar { background: var(--err-bg); color: var(--err); border-bottom: 1px solid var(--line); }
.test-bar .wrap { padding-top: 8px; padding-bottom: 8px; }
.test-bar p { margin: 0; }
.practice-bar { background: var(--warn-bg); color: var(--warn); border-bottom: 1px solid var(--line); }
.practice-bar .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; padding-top: 10px; padding-bottom: 10px; }
.practice-bar p { margin: 0; flex: 1 1 320px; }
.practice-bar .actions { display: flex; flex-wrap: wrap; gap: 8px; }
.practice-bar form { margin: 0; }
.lesson { max-width: 720px; }
.lesson ol.steps, .lesson ul { padding-left: 24px; margin: 0 0 16px; }
.lesson ol.steps li, .lesson ul li { margin-bottom: 8px; }
.lesson-figure { margin: 16px 0 24px; }
.lesson-figure img { display: block; max-width: 100%; height: auto; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.lesson-figure figcaption { color: var(--muted); font-size: 15px; margin-top: 6px; }
.lesson-list { list-style: none; padding: 0; margin: 0; }
.lesson-list h3 { margin-top: 0; }
.lesson-list p:last-child { margin-bottom: 0; }
.help-answer .label { font-size: 14px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 4px; }
.tag { display: inline-block; font-size: 14px; padding: 2px 8px; border-radius: 999px; background: var(--bg); border: 1px solid var(--line); }
.tag.ok { background: var(--ok-bg); color: var(--ok); border-color: transparent; }
.tag.warn { background: var(--warn-bg); color: var(--warn); border-color: transparent; }
.tag.err { background: var(--err-bg); color: var(--err); border-color: transparent; }
table { width: 100%; border-collapse: collapse; background: var(--surface); }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 15px; color: var(--muted); font-weight: 600; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 16px; }
.text-body { white-space: pre-wrap; background: var(--bg); border-radius: 8px; padding: 14px; margin: 0 0 12px; }
.agreement { white-space: pre-wrap; font: inherit; }
.codes { font: 600 20px/1.8 ui-monospace, SFMono-Regular, Menlo, monospace; columns: 2; margin: 0 0 16px; padding: 0; list-style: none; }
.secret { font: 600 18px ui-monospace, SFMono-Regular, Menlo, monospace; word-break: break-all; }
.qr { width: 220px; height: 220px; image-rendering: pixelated; background: #fff; padding: 8px; border-radius: 8px; }
.finding { border-left: 4px solid var(--line); padding: 6px 0 6px 12px; margin-bottom: 10px; }
.finding.error { border-color: var(--err); }
.finding.warning { border-color: var(--warn); }
.finding.info { border-color: var(--accent); }
.finding q { display: block; color: var(--muted); font-size: 15px; }
details { margin-bottom: 10px; }
summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; gap: 8px; color: var(--accent); font-weight: 600; }
summary::-webkit-details-marker { display: none; }
summary::before { content: "\25B8"; }
details[open] > summary::before { content: "\25BE"; }
footer { color: var(--muted); font-size: 14px; padding-bottom: 32px; }
[hidden] { display: none !important; }
.lead { font-size: 19px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; word-break: break-all; }
.qr-card { text-align: center; }
.qr.big { width: 360px; height: auto; max-width: 100%; aspect-ratio: 1; padding: 12px; }
.search .field { max-width: 520px; }
.filters .grid { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0 16px; }
.send-item .check { margin-bottom: 8px; }
.send-item .field { margin: 8px 0 0 36px; }
.choices { display: grid; gap: 10px; }
.choice { display: flex; align-items: center; gap: 12px; min-height: 56px; margin: 0; padding: 12px 16px;
  border: 2px solid var(--line); border-radius: 10px; background: var(--surface); cursor: pointer; }
.choice input { width: 24px; height: 24px; margin: 0; flex: none; }
.choice:has(input:checked) { border-color: var(--accent); }
.choice:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }
.narrow-wrap { max-width: 640px; }
body.patient main { padding-top: 16px; }
.pad .text-body { font-size: 17px; }
.signature-pad canvas { display: block; width: 100%; height: auto; aspect-ratio: 5 / 2; margin-bottom: 8px;
  background: #fff; border: 2px dashed var(--muted); border-radius: 10px; touch-action: none; cursor: crosshair; }
.signature-pad.signed canvas { border-style: solid; border-color: var(--accent); }
.signature-img { display: block; width: 100%; max-width: 500px; height: auto; background: #fff; border: 1px solid var(--line); border-radius: 8px; }
button.big, .button.big { width: 100%; min-height: 56px; font-size: 19px; }
/* Overblikket */
.tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 16px; }
.tabs a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border-radius: 8px;
  border: 1px solid var(--line); background: var(--surface); text-decoration: none; }
.tabs a[aria-current="page"] { background: var(--accent); border-color: var(--accent); color: var(--accent-text); font-weight: 600; }
.tabs.small { margin: 0; }
.tabs.small a { padding: 0 10px; font-size: 15px; }
.period-nav { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; margin: 8px 0 16px; }
.period-nav > :first-child { justify-self: start; }
.period-nav > :last-child { justify-self: end; }
.period-now { text-align: center; }
.period-now h2, .period-now p { margin: 0; }
.stats { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); margin-bottom: 16px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px; }
.stat p { margin: 0 0 4px; }
.stat-label { font-weight: 600; }
.stat-value { font-size: 36px; font-weight: 600; line-height: 1.25; }
.stat-value a { text-decoration-thickness: 2px; text-underline-offset: 5px; }
.stat-parts, .stat-change { color: var(--muted); font-size: 15px; }
.section-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.section-head h2 { margin: 0; }
th.num, td.num { text-align: right; font-variant-numeric: tabular-nums; }
table.report tfoot th, table.report tfoot td { font-weight: 600; border-bottom: 0; }
.chart { display: grid; grid-template-columns: auto 1fr; grid-template-rows: 200px auto; column-gap: 8px; margin: 40px 0 12px; }
.chart-y { position: relative; min-width: 3ch; font-size: 13px; color: var(--muted); }
.chart-y .tick { position: absolute; right: 0; line-height: 1; transform: translateY(50%); font-variant-numeric: tabular-nums; }
.tick.t0 { bottom: 0; } .tick.t50 { bottom: 50%; } .tick.t100 { bottom: 100%; }
.chart-plot { position: relative; }
.chart-plot .grid { position: absolute; left: 0; right: 0; border-top: 1px solid var(--line); }
.grid.g0 { bottom: 0; } .grid.g50 { bottom: 50%; } .grid.g100 { bottom: 100%; }
.chart-bars { position: absolute; inset: 0; display: flex; gap: 2px; margin: 0; padding: 0; list-style: none; }
.chart-bars .slot { position: relative; flex: 1 1 0; min-width: 0; display: flex; align-items: flex-end; justify-content: center; }
.chart-bars .bar { display: block; width: 100%; max-width: 24px; background: var(--chart); border-radius: 4px 4px 0 0; }
.chart-bars .slot:hover .bar { background: var(--chart-hover); }
.chart-bars .slot:hover::after { content: attr(data-tip); position: absolute; bottom: 100%; left: 50%; transform: translate(-50%, -8px);
  white-space: nowrap; background: var(--text); color: var(--surface); font-size: 14px; padding: 4px 8px; border-radius: 6px;
  z-index: 2; pointer-events: none; }
.chart-bars .slot.tip-start:hover::after { left: 0; transform: translate(0, -8px); }
.chart-bars .slot.tip-end:hover::after { left: auto; right: 0; transform: translate(0, -8px); }
.chart-x { grid-column: 2; display: flex; gap: 2px; margin: 6px 0 0; padding: 0; list-style: none; font-size: 13px; color: var(--muted); }
.chart-x li { flex: 1 1 0; min-width: 0; display: flex; justify-content: center; white-space: nowrap; }
/* Sager til supporten */
.label { font-size: 14px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 4px; }
.case-list { list-style: none; padding: 0; margin: 0 0 12px; }
.case-list li { padding: 10px 0; border-bottom: 1px solid var(--line); }
.case-list li:last-child { border-bottom: 0; }
.case-list .case-meta { margin-top: 4px; }
.tag + .tag { margin-left: 6px; }
.case-close { margin-bottom: 16px; }
.messages { list-style: none; padding: 0; margin: 0 0 16px; }
.message { background: var(--surface); border: 1px solid var(--line); border-left-width: 4px; border-radius: 10px;
  padding: 14px 16px; margin-bottom: 12px; overflow-wrap: anywhere; }
.message.from-admin { border-left-color: var(--accent); }
.message.from-ai { border-left-color: var(--warn); background: var(--warn-bg); }
.message-head { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
.message > :last-child { margin-bottom: 0; }
.access-request { border: 2px solid var(--warn); }
.suggestion { border: 2px dashed var(--warn); }
.send-on { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
dl.facts { display: grid; grid-template-columns: max-content 1fr; gap: 4px 16px; margin: 0 0 12px; }
dl.facts dt { color: var(--muted); }
dl.facts dd { margin: 0; }
.bar.h0 { height: 0%; }
.bar.h1 { height: 1%; }
.bar.h2 { height: 2%; }
.bar.h3 { height: 3%; }
.bar.h4 { height: 4%; }
.bar.h5 { height: 5%; }
.bar.h6 { height: 6%; }
.bar.h7 { height: 7%; }
.bar.h8 { height: 8%; }
.bar.h9 { height: 9%; }
.bar.h10 { height: 10%; }
.bar.h11 { height: 11%; }
.bar.h12 { height: 12%; }
.bar.h13 { height: 13%; }
.bar.h14 { height: 14%; }
.bar.h15 { height: 15%; }
.bar.h16 { height: 16%; }
.bar.h17 { height: 17%; }
.bar.h18 { height: 18%; }
.bar.h19 { height: 19%; }
.bar.h20 { height: 20%; }
.bar.h21 { height: 21%; }
.bar.h22 { height: 22%; }
.bar.h23 { height: 23%; }
.bar.h24 { height: 24%; }
.bar.h25 { height: 25%; }
.bar.h26 { height: 26%; }
.bar.h27 { height: 27%; }
.bar.h28 { height: 28%; }
.bar.h29 { height: 29%; }
.bar.h30 { height: 30%; }
.bar.h31 { height: 31%; }
.bar.h32 { height: 32%; }
.bar.h33 { height: 33%; }
.bar.h34 { height: 34%; }
.bar.h35 { height: 35%; }
.bar.h36 { height: 36%; }
.bar.h37 { height: 37%; }
.bar.h38 { height: 38%; }
.bar.h39 { height: 39%; }
.bar.h40 { height: 40%; }
.bar.h41 { height: 41%; }
.bar.h42 { height: 42%; }
.bar.h43 { height: 43%; }
.bar.h44 { height: 44%; }
.bar.h45 { height: 45%; }
.bar.h46 { height: 46%; }
.bar.h47 { height: 47%; }
.bar.h48 { height: 48%; }
.bar.h49 { height: 49%; }
.bar.h50 { height: 50%; }
.bar.h51 { height: 51%; }
.bar.h52 { height: 52%; }
.bar.h53 { height: 53%; }
.bar.h54 { height: 54%; }
.bar.h55 { height: 55%; }
.bar.h56 { height: 56%; }
.bar.h57 { height: 57%; }
.bar.h58 { height: 58%; }
.bar.h59 { height: 59%; }
.bar.h60 { height: 60%; }
.bar.h61 { height: 61%; }
.bar.h62 { height: 62%; }
.bar.h63 { height: 63%; }
.bar.h64 { height: 64%; }
.bar.h65 { height: 65%; }
.bar.h66 { height: 66%; }
.bar.h67 { height: 67%; }
.bar.h68 { height: 68%; }
.bar.h69 { height: 69%; }
.bar.h70 { height: 70%; }
.bar.h71 { height: 71%; }
.bar.h72 { height: 72%; }
.bar.h73 { height: 73%; }
.bar.h74 { height: 74%; }
.bar.h75 { height: 75%; }
.bar.h76 { height: 76%; }
.bar.h77 { height: 77%; }
.bar.h78 { height: 78%; }
.bar.h79 { height: 79%; }
.bar.h80 { height: 80%; }
.bar.h81 { height: 81%; }
.bar.h82 { height: 82%; }
.bar.h83 { height: 83%; }
.bar.h84 { height: 84%; }
.bar.h85 { height: 85%; }
.bar.h86 { height: 86%; }
.bar.h87 { height: 87%; }
.bar.h88 { height: 88%; }
.bar.h89 { height: 89%; }
.bar.h90 { height: 90%; }
.bar.h91 { height: 91%; }
.bar.h92 { height: 92%; }
.bar.h93 { height: 93%; }
.bar.h94 { height: 94%; }
.bar.h95 { height: 95%; }
.bar.h96 { height: 96%; }
.bar.h97 { height: 97%; }
.bar.h98 { height: 98%; }
.bar.h99 { height: 99%; }
.bar.h100 { height: 100%; }
@media (max-width: 600px) {
  .period-nav { grid-template-columns: 1fr 1fr; }
  .period-now { grid-column: 1 / -1; grid-row: 1; }
  .stat-value { font-size: 30px; }
  table.stack thead { display: none; }
  table.stack tr { display: block; border-bottom: 1px solid var(--line); padding: 8px 0; }
  table.stack td { display: block; border: 0; padding: 3px 12px; }
  table.stack td[data-label]::before { content: attr(data-label) ": "; color: var(--muted); font-size: 15px; }
  h1 { font-size: 24px; }
  .card { padding: 16px; }
  .codes { columns: 1; }
  dl.facts { grid-template-columns: 1fr; }
  dl.facts dd { margin-bottom: 6px; }
}
