/* Visso - visuel identitet fra Figma (Visso Design, "🎨 Farver & Fonte").
   Geist til ord, Geist Mono kun til data og labels. Fontene ligger lokalt (ingen tredjepart). */

@font-face { font-family: "Geist"; font-weight: 300; font-display: swap; src: url("/fonts/Geist-Light.woff2") format("woff2"); }
@font-face { font-family: "Geist"; font-weight: 400; font-display: swap; src: url("/fonts/Geist-Regular.woff2") format("woff2"); }
@font-face { font-family: "Geist"; font-weight: 500 700; font-display: swap; src: url("/fonts/Geist-Medium.woff2") format("woff2"); }
@font-face { font-family: "Geist Mono"; font-weight: 400; font-display: swap; src: url("/fonts/GeistMono-Regular.woff2") format("woff2"); }
@font-face { font-family: "Geist Mono"; font-weight: 500 700; font-display: swap; src: url("/fonts/GeistMono-Medium.woff2") format("woff2"); }

:root {
  color-scheme: light;
  /* base */
  --background: #f5f3ee;
  --card: #ffffff;
  --muted: #f4f4f2;
  --border: rgba(17, 17, 17, .1);
  --foreground: #111111;
  --muted-foreground: #6e6e6a;
  /* primær (AI-flade, knapper, aktiv fane) */
  --primary: #041e55;
  --primary-foreground: #fbfaf7;
  --primary-card: rgba(255, 255, 255, .1);
  --primary-chip: rgba(255, 255, 255, .15);
  --primary-border: #6a52a2;
  --primary-muted-foreground: #c8d0b0;
  --highlight: #d4eaff;
  --on-highlight: #111111;
  /* status */
  --success: #2e8b4a;
  --success-muted: #e4f3e8;
  --destructive: #b8402d;
  --destructive-muted: #f7e4e0;
  --warning: #7a520c;
  --warning-muted: #fbf3e2;
  --info: #3f4a5c;
  --info-muted: #e2e6ec;
  --avatar-org: rgba(212, 234, 255, .45);

  --sans: "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --r-card: 28px;
  --r-tile: 20px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --background: #10110f; --card: #1a1b19; --muted: #252623; --border: rgba(255, 255, 255, .1);
    --foreground: #f2f1ed; --muted-foreground: #a3a29c;
    --primary: #0a2a6e; --primary-foreground: #fbfaf7; --primary-border: #6a52a2;
    --highlight: #d4eaff; --on-highlight: #111111;
    --success: #5cc27c; --success-muted: #1d3324; --destructive: #e57a66; --destructive-muted: #3d211c;
    --warning: #e2b25c; --warning-muted: #352a16; --info: #b6c0d1; --info-muted: #262c36; --avatar-org: rgba(212, 234, 255, .12);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --background: #10110f; --card: #1a1b19; --muted: #252623; --border: rgba(255, 255, 255, .1);
  --foreground: #f2f1ed; --muted-foreground: #a3a29c;
  --primary: #0a2a6e; --primary-foreground: #fbfaf7; --primary-border: #6a52a2;
  --highlight: #d4eaff; --on-highlight: #111111;
  --success: #5cc27c; --success-muted: #1d3324; --destructive: #e57a66; --destructive-muted: #3d211c;
  --warning: #e2b25c; --warning-muted: #352a16; --info: #b6c0d1; --info-muted: #262c36; --avatar-org: rgba(212, 234, 255, .12);
}

/* ---------- typografi (11 stilarter fra designet) ---------- */
* { box-sizing: border-box; }
body { margin: 0; background: var(--background); color: var(--foreground); font: 400 14px/1.45 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: underline; text-decoration-color: var(--border); text-underline-offset: 3px; }
a:hover { text-decoration-color: currentColor; }
h1, h2, h3, h4 { font-weight: 500; margin: 0; }
.t-h1 { font-weight: 300; font-size: 64px; line-height: 1; letter-spacing: -.04em; }
.t-h2 { font-weight: 300; font-size: 32px; line-height: 1.15; letter-spacing: -.03em; }
.t-h3 { font-weight: 300; font-size: 24px; line-height: 1.25; letter-spacing: -.02em; }
.t-h4 { font-weight: 500; font-size: 16px; line-height: 1.4; }
.small { font-size: 13px; line-height: 1.4; color: var(--muted-foreground); }
code, .mono { font-family: var(--mono); font-weight: 500; }
.mono-label, .kicker { font: 500 12px/1.35 var(--mono); letter-spacing: .06em; text-transform: uppercase; }
.kicker { color: var(--muted-foreground); }
.mono-meta { font: 400 12px/1.35 var(--mono); color: var(--muted-foreground); }
.null { color: var(--muted-foreground); }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.kort-fod { padding-top: 16px; }

/* ---------- ikoner (maskeret, så de følger tekstfarven) ---------- */
.ikon { display: inline-block; flex-shrink: 0; width: 20px; height: 20px; background: currentColor;
  -webkit-mask: var(--i) center / contain no-repeat; mask: var(--i) center / contain no-repeat; }
.ikon.lille { width: 16px; height: 16px; }
.i-soeg { --i: url("/ikoner/soeg.svg"); }
.i-pil { --i: url("/ikoner/pil-knap.svg"); }
.i-ansatte { --i: url("/ikoner/ansatte.svg"); }
.i-kapital { --i: url("/ikoner/kapital.svg"); }
.i-bygninger { --i: url("/ikoner/bygninger2.svg"); }
.i-bygning { --i: url("/ikoner/bygning.svg"); }
.i-placering { --i: url("/ikoner/placering.svg"); }
.i-regnskab { --i: url("/ikoner/regnskab.svg"); }
.i-tjekliste { --i: url("/ikoner/tjekliste.svg"); }
.i-advarsel { --i: url("/ikoner/advarsel.svg"); }
.i-info { --i: url("/ikoner/info.svg"); }
.i-stjerner { --i: url("/ikoner/stjerner.svg"); }
.i-deltagere { --i: url("/ikoner/deltagere.svg"); }
.i-historik { --i: url("/ikoner/historik.svg"); }
.ikon-cirkel { display: inline-grid; place-items: center; flex-shrink: 0; width: 40px; height: 40px; border-radius: 20px; background: var(--muted); }

/* ---------- topbar ---------- */
.top { position: sticky; top: 0; z-index: 10; display: grid; grid-template-columns: 1fr minmax(0, 560px) 1fr; gap: 24px; align-items: center;
  padding: 18px 40px; background: var(--background); border-bottom: 1px solid var(--border); }
.brand { justify-self: start; font: 500 24px/1 var(--mono); letter-spacing: -.04em; color: var(--foreground); text-decoration: none; }
.search { min-width: 0; display: flex; align-items: center; gap: 12px; height: 48px; padding: 6px 6px 6px 14px; border-radius: 9999px; background: var(--card); }
.search:focus-within { box-shadow: 0 0 0 2px var(--primary); }
.search .ikon { width: 18px; height: 18px; color: var(--foreground); }
.search input { flex: 1; min-width: 0; height: 100%; border: none; outline: none; background: transparent; color: var(--foreground); font: inherit; }
.search input::placeholder { color: var(--muted-foreground); }
.kbd { display: grid; place-items: center; height: 36px; padding: 2px 12px; border-radius: 9999px; background: var(--muted); color: var(--muted-foreground);
  font: 500 12px/1.35 var(--mono); letter-spacing: .06em; }
.topnav { justify-self: end; display: flex; gap: 20px; font-weight: 500; font-size: 13px; }
.topnav a { color: var(--muted-foreground); text-decoration: none; }
.topnav a:hover { color: var(--foreground); }
body.forside .top .search { visibility: hidden; }

main { max-width: 1440px; margin: 0 auto; padding: 32px 80px 48px; }
.stak { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; }
.stak > * { min-width: 0; }

/* ---------- knapper ---------- */
button, .btn { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px; border: 1px solid var(--border); border-radius: 9999px;
  background: var(--card); color: var(--foreground); font: 500 14px/1.45 var(--sans); cursor: pointer; text-decoration: none; }
button:hover, .btn:hover { border-color: var(--muted-foreground); }
button:focus-visible, a:focus-visible, .chip:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
button.primary { background: var(--primary); border-color: var(--primary); color: var(--primary-foreground); }
/* primærknap med pil i cirkel (Button default + arrow) */
.knap { display: inline-flex; align-items: center; height: 48px; padding: 0 8px 0 20px; border-radius: 9999px; border: none;
  background: var(--primary); color: var(--primary-foreground); font: 500 14px/1.45 var(--sans); text-decoration: none; white-space: nowrap; cursor: pointer; }
.knap > span:first-child { padding-right: 12px; }
.knap-pil { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9999px; background: var(--highlight); color: var(--primary); transition: transform .15s; }
.knap:hover .knap-pil { transform: translateX(2px); }
.knap.ekstern .knap-pil .ikon { transform: rotate(-45deg); }
/* lille rund pileknap i kortets hjørne */
.pil-knap { display: grid; place-items: center; flex-shrink: 0; width: 32px; height: 32px; padding: 0; border-radius: 9999px;
  border: 1px solid var(--border); background: var(--card); color: var(--foreground); text-decoration: none; }
.pil-knap:hover { border-color: var(--foreground); }

/* ---------- badges, pills, chips ---------- */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 8px; background: var(--muted); color: var(--muted-foreground);
  font: 500 12px/1.35 var(--mono); letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.good { background: var(--success-muted); color: var(--success); }
.badge.bad { background: var(--destructive-muted); color: var(--destructive); }
.badge.warn, .badge.reklame { background: var(--warning-muted); color: var(--warning); }
.badge.paa-primaer { background: var(--background); color: var(--warning); }
.badge.paa-primaer.critical, .badge.paa-primaer.serious { color: var(--destructive); }
.badge.paa-primaer.good { color: var(--success); }
/* afrundet tæller/etiket i kortets hoved */
.taeller { display: inline-flex; align-items: center; padding: 6px 12px; border-radius: 999px; background: var(--muted); color: var(--foreground);
  font: 500 12px/1.35 var(--mono); letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; }
.pill { display: inline-flex; align-items: center; padding: 5px 12px; border-radius: 999px; background: var(--card); color: var(--foreground);
  font: 500 13px/1.35 var(--sans); white-space: nowrap; }
.pill.fremhaevet { background: var(--highlight); color: var(--on-highlight); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; height: 40px; padding: 0 16px; border: 1px solid var(--border); border-radius: 9999px;
  background: var(--card); color: var(--foreground); font: 500 14px/1.45 var(--sans); text-decoration: none; cursor: pointer; }
.chip.on { background: var(--primary); border-color: var(--primary); color: var(--primary-foreground); }
.tag { display: inline-block; padding: 2px 8px; margin: 1px 4px 1px 0; border-radius: 999px; background: var(--muted); font-size: 12px; font-weight: 500; }
.tag.ended { opacity: .55; text-decoration: line-through; }
kbd { font: 500 11px var(--mono); padding: 1px 6px; border-radius: 6px; background: var(--muted); }

/* ---------- kort ---------- */
.card { background: var(--card); border-radius: var(--r-card); padding: 24px; min-width: 0; }
.card > h2, .card-head h2 { font: 500 16px/1.4 var(--sans); margin: 0 0 16px; }
.card h3 { font: 500 12px/1.35 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted-foreground); margin: 24px 0 10px; }
.kort-hoved { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.kort-hoved .titel { flex: 1; min-width: 0; font: 500 16px/1.4 var(--sans); }
.kort-hoved .titel.lille { font-size: 14px; line-height: 1.45; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; }
.card-head h2 { margin: 0; }
.card-head a { font-size: 13px; font-weight: 500; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 460px), 1fr)); gap: 12px; align-items: start; }

/* ---------- virksomhedshoved ---------- */
.entity { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 20px 32px; }
.entity-id { display: grid; gap: 14px; min-width: 0; }
.entity-id h1 { font-weight: 300; font-size: clamp(36px, 6vw, 64px); line-height: 1; letter-spacing: -.04em; overflow-wrap: anywhere; }
.entity-id .sub { color: var(--muted-foreground); }
.entity-handling { display: flex; flex-direction: column; align-items: flex-end; gap: 20px; }
.badges { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.notice { padding: 14px 18px; border-radius: var(--r-tile); background: var(--warning-muted); color: var(--foreground); font-size: 13px; }

/* faner: pills */
.tabs { display: flex; gap: 12px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 12px; border-radius: 9999px; white-space: nowrap;
  color: var(--muted-foreground); font-weight: 500; text-decoration: none; }
.tabs a:hover { color: var(--foreground); background: var(--card); }
.tabs a.on { background: var(--primary); color: var(--primary-foreground); }
.tabs .n { font: 400 12px/1.35 var(--mono); }

/* ---------- overblik: grid af komponenter ---------- */
.overblik-top { display: flex; justify-content: flex-end; margin-bottom: -12px; }
/* "Tilpas overblik" skal skille sig ud fra data: lyseblå i stedet for hvid */
.tilpas-knap { height: 44px; padding: 0 18px; border: none; background: var(--highlight); color: #041e55; font-weight: 500; }
.tilpas-knap:hover { background: var(--primary); color: var(--primary-foreground); }
.tilpas-knap .ikon { margin-right: 2px; }
/* kortene beholder deres egen højde, så et kort ved siden af et højt kort ikke får et stort tomt felt */
/* ingen "dense"-pakning: kortene står i den rækkefølge, brugeren har valgt (ellers hopper små kort op i tidligere huller) */
.overblik-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 12px; grid-auto-flow: row; align-items: start; }
.overblik-grid > .r2 { align-self: stretch; }
.widget { position: relative; display: flex; flex-direction: column; min-width: 0; container-type: inline-size; }
.widget > .card, .widget > section { flex: 1; }
.w-S { grid-column: span 3; } .w-M { grid-column: span 6; } .w-L { grid-column: span 12; }
.r2 { grid-row: span 2; }
.widget > .card { display: flex; flex-direction: column; }
.w-S > .card { justify-content: space-between; gap: 24px; min-height: 198px; }
/* et lille kort i en høj række: indholdet samles øverst i stedet for at spredes */
.w-S > .card:has(.liste-tal.kontakt), .w-S > .sundhed { justify-content: flex-start; }
.w-S .kort-hoved .mono-label, .w-S .kort-hoved .taeller { display: none; }
.w-S .alerts { grid-template-columns: minmax(0, 1fr); }
.w-S .alert { padding: 14px; }
.w-S .alert-tekst strong { font-size: 14px; }
.w-S.sundhed-kort, .w-S > .sundhed { padding: 24px; }
.redigerer .w-S .vt-titel { display: none; }
.w-S .kort-hoved { margin: 0; }
.w-S .kort-hoved .titel { font-size: 14px; line-height: 1.45; }
.widget[data-id="ansatte"] > .card { gap: 16px; }
.widget[data-id="ansatte"] .kort-hoved { margin: 0; }
.navn-celle { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.navn-celle a { text-decoration: none; font-weight: 500; }
.navn-celle a:hover { text-decoration: underline; }
.ledelse-blok { display: grid; gap: 6px; }
.ledelse-blok + .ledelse-blok { margin-top: 14px; }
.revisor-navn { color: var(--foreground) !important; font-size: 16px !important; font-weight: 500; }
.ai.ai-lille { padding: 24px; gap: 16px; justify-content: space-between; min-height: 198px; }
.ai.ai-lille .ai-knap { align-self: flex-start; }
.liste-tal.kontakt span:last-child { text-align: right; overflow-wrap: anywhere; font-weight: 500; }
.liste-tal.kontakt .badge { display: none; }
/* indholdet tilpasser sig sin egen bredde */
@container (max-width: 640px) {
  .widget .fakta { grid-template-columns: minmax(0, 1fr); }
  .widget .fakta > div.venstre { border-right: none; }
  .widget .event { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .widget .event-dato time { font-size: 26px; }
  .widget .flise .stor { font-size: 44px; }
}
/* kort og skråfoto */
.kort-kort { gap: 12px; }
.kort-kort .kort-hoved { margin: 0; }
.kort-kort > p { margin: 0; }
.kort-flade { position: relative; width: 100%; border-radius: 18px; overflow: hidden; background: var(--muted); z-index: 0; }
.kort-flade .leaflet-tile-pane { filter: saturate(.55) contrast(.95); }
.skraafoto-flade .leaflet-tile-pane { filter: none; }
.skraafoto-flade.leaflet-container { background: #e9e7e2; cursor: default; }
.kort-tom { display: grid; place-items: center; height: 100%; margin: 0; padding: 16px; text-align: center; }
.kort-markoer { border-radius: 50%; background: #041e55; box-shadow: 0 0 0 4px var(--highlight), 0 2px 8px rgba(0, 0, 0, .35); }
.leaflet-container { font: 400 12px/1.4 var(--sans); }
.leaflet-control-attribution { font-size: 10px; }
.retning-knapper { display: flex; gap: 4px; }
.skraafoto-valg { display: flex; align-items: center; gap: 8px; }
.aar-vaelger { height: 30px; padding: 0 26px 0 10px; border: 1px solid var(--border); border-radius: 9999px; background: var(--card); color: var(--foreground);
  font: 500 12px/1 var(--mono); cursor: pointer; }
.chip.lille { height: 30px; min-width: 30px; padding: 0 8px; justify-content: center; font: 500 12px/1 var(--mono); }
.w-S .retning-knapper { display: none; }

/* "Tilføj komponent": knap, flise og modal */
.tilfoej-cta { height: 48px; padding: 0 22px 0 8px; gap: 10px; border: none; background: #041e55; color: #fff; font-size: 15px; }
.tilfoej-cta .plus { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9999px; background: var(--highlight); color: #041e55; font-size: 20px; line-height: 1; }
.tilfoej-cta:hover:not(:disabled) { box-shadow: 0 0 0 3px rgba(4, 30, 85, .25); }
.tilfoej-cta:disabled { opacity: .45; cursor: default; }
.cta-raekke { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.tilfoej-flise { min-height: 198px; }
.tilfoej-cta.stor { flex: 1; flex-direction: column; justify-content: center; height: auto; min-height: 198px; padding: 24px; gap: 12px; border-radius: var(--r-card);
  background: transparent; color: var(--muted-foreground); border: 2px dashed var(--border); }
.tilfoej-cta.stor:hover:not(:disabled) { color: #041e55; border-color: #041e55; background: var(--highlight); box-shadow: none; }
.tilfoej-cta.stor .plus { width: 44px; height: 44px; font-size: 24px; }
.redigerer .tilfoej-flise { box-shadow: none !important; }
.redigerer .tilfoej-flise > * { pointer-events: auto !important; }
.widget.ny { animation: ny-komponent 1.6s ease; }
@keyframes ny-komponent { 0%, 40% { box-shadow: 0 0 0 4px var(--highlight), 0 0 0 6px #041e55; } 100% { box-shadow: 0 0 0 0 transparent; } }
.tilfoej-modal { width: min(1100px, calc(100vw - 32px)); max-height: min(86vh, 900px); padding: 0; border: none; border-radius: var(--r-card);
  background: var(--background); color: var(--foreground); box-shadow: 0 30px 80px rgba(4, 30, 85, .35); }
.tilfoej-modal::backdrop { background: rgba(4, 30, 85, .45); backdrop-filter: blur(2px); }
.modal-indre { display: grid; gap: 24px; padding: 0 28px 28px; }
.modal-hoved { position: sticky; top: 0; z-index: 2; display: flex; justify-content: space-between; align-items: flex-start; gap: 16px;
  margin: 0 -28px; padding: 24px 28px 16px; background: var(--background); border-bottom: 1px solid var(--border); }
.modal-hoved h2 { margin: 0 0 4px; }
.modal-hoved p { margin: 0; }
.modal-gruppe { display: grid; gap: 12px; }
.modal-gruppe h3 { margin: 0; }
.tilfoej-knapper { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 6px 6px; }
.tilfoej-knapper .btn { height: 36px; padding: 0 12px; gap: 6px; font-size: 13px; background: var(--card); color: #041e55; }
.tilfoej-knapper .btn.std { background: #041e55; border-color: #041e55; color: #fff; }
.tilfoej-knapper .btn:hover { border-color: #041e55; }
@media (prefers-reduced-motion: reduce) { .widget.ny { animation: none; } }

/* redigering */
/* redigeringspanelet er et værktøj, ikke data: lyseblå flade med stiplet kant */
.overblik-panel { display: grid; gap: 20px; padding: 28px; border-radius: var(--r-card); background: var(--highlight); color: #041e55;
  border: 2px dashed rgba(4, 30, 85, .35); }
.overblik-panel .small, .overblik-panel .mono-label { color: rgba(4, 30, 85, .72); }
.panel-maerke { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 8px; padding: 4px 10px; border-radius: 9999px;
  background: #041e55; color: var(--highlight) !important; }
.overblik-panel h2 { margin: 0; }
.overblik-panel .chip { background: #fff; border-color: transparent; color: #041e55; }
.overblik-panel .chip:hover { background: #041e55; color: #fff; }
.overblik-panel .tilfoej-liste li { background: rgba(255, 255, 255, .7); }
.overblik-panel .tilfoej-liste .btn { background: #041e55; border-color: #041e55; color: #fff; }
.overblik-panel .knap { background: #041e55; }
.mine-visninger { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.mine-visninger li { display: inline-flex; align-items: center; border-radius: 9999px; background: #fff; }
.mine-visninger .chip { border: none; background: none; padding-right: 8px; }
.mine-visninger .chip:hover { background: none; color: #041e55; text-decoration: underline; }
.slet-visning { width: 32px; height: 32px; margin-right: 4px; padding: 0; justify-content: center; border: none; border-radius: 9999px;
  background: rgba(4, 30, 85, .08); color: #041e55; font-size: 12px; }
.slet-visning:hover { background: #041e55; color: #fff; }
.gem-visning { display: flex; flex-wrap: wrap; gap: 8px; }
.gem-visning input { flex: 1 1 220px; max-width: 360px; height: 40px; padding: 0 16px; border: 1px solid rgba(4, 30, 85, .25); border-radius: 9999px;
  background: #fff; color: #041e55; font: inherit; }
.gem-visning input:focus { outline: 2px solid #041e55; outline-offset: -1px; }
.overblik-panel .gem-visning .btn { background: #041e55; border-color: #041e55; color: #fff; }
.panel-raekke { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 16px; }
.panel-raekke p { margin: 4px 0 0; max-width: 60ch; }
.panel-blok { display: grid; gap: 10px; }
.tilfoej-liste { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 270px), 1fr)); gap: 12px; align-items: start; }
.tilfoej-liste li { display: flex; flex-direction: column; gap: 10px; padding: 10px; border-radius: 24px; background: var(--muted); color: #041e55; }
.forhaandsvisning { pointer-events: none; user-select: none; }
.forhaandsvisning .card { box-shadow: 0 1px 2px rgba(4, 30, 85, .08); }
.tilfoej-fod { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 0 6px 4px; }
.tilfoej-fod > div { display: grid; gap: 2px; min-width: 0; }
.tilfoej-liste .btn { flex-shrink: 0; height: 36px; }
.redigerer .widget { border-radius: var(--r-card); box-shadow: 0 0 0 2px var(--border); }
.redigerer .widget > :not(.widget-vaerktoej) { pointer-events: none; user-select: none; }
.widget-vaerktoej { display: flex; align-items: center; gap: 4px; padding: 6px 6px 6px 8px; margin-bottom: 6px; border-radius: 9999px;
  background: var(--primary); color: var(--primary-foreground); font-size: 13px; }
.widget-vaerktoej button { height: 30px; min-width: 30px; padding: 0 8px; justify-content: center; border: none; border-radius: 9999px;
  background: var(--primary-chip); color: var(--primary-foreground); font: 500 13px/1 var(--mono); }
.widget-vaerktoej button:hover:not(:disabled) { background: var(--highlight); color: var(--on-highlight); }
.widget-vaerktoej button:disabled { opacity: .35; cursor: default; }
.widget-vaerktoej button:focus-visible { outline-color: var(--highlight); }
.widget-vaerktoej { cursor: grab; touch-action: none; user-select: none; }
.widget-vaerktoej:hover { box-shadow: 0 0 0 2px var(--highlight); }
.vt-haandtag { display: grid; place-items: center; width: 30px; height: 30px; font-size: 16px; opacity: .8; }
.traek-spoegelse { position: fixed; left: 0; top: 0; z-index: 200; pointer-events: none; display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 16px; border-radius: 9999px; background: var(--primary); color: var(--primary-foreground); font: 500 14px/1 var(--sans);
  box-shadow: 0 12px 32px rgba(4, 30, 85, .35); white-space: nowrap; }
.indsaet-linje { position: fixed; z-index: 199; pointer-events: none; border-radius: 3px; background: var(--primary); box-shadow: 0 0 0 3px var(--highlight); }
body.traekker, body.traekker * { cursor: grabbing !important; user-select: none !important; }
.vt-titel { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 0 6px; font-weight: 500; }
.vt-str { display: inline-flex; gap: 2px; margin-right: 6px; }
.vt-str-knap { padding: 0 6px !important; }
.str-ikon { display: block; }
.vt-str-knap.on { background: var(--highlight) !important; color: var(--on-highlight) !important; }
.widget.traekkes { opacity: .35; outline: 2px dashed var(--primary); outline-offset: 4px; }
.overblik-tom { grid-column: 1 / -1; padding: 40px; text-align: center; border-radius: var(--r-card); border: 2px dashed var(--border); color: var(--muted-foreground); }
@media (prefers-reduced-motion: no-preference) { .widget { transition: box-shadow .15s; } }
@media (max-width: 1100px) {
  .w-S { grid-column: span 6; } .w-M, .w-L { grid-column: span 12; } .r2 { grid-row: auto; }
}
@media (max-width: 700px) {
  .w-S { grid-column: span 12; }
}
.vaerdi { display: flex; flex-wrap: wrap; align-items: baseline; gap: 14px; }
.vaerdi .tal { font-weight: 300; font-size: 32px; line-height: 1.15; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.vaerdi .enhed { font: 500 16px/1.4 var(--sans); margin-left: -8px; }
.data { display: grid; gap: 8px; }
.data p { margin: 0; font-size: 13px; line-height: 1.4; color: var(--muted-foreground); }
.liste-tal { display: grid; }
.liste-tal div { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 8px 0; border-top: 1px solid var(--border); font-size: 13px; }
.liste-tal div:first-child { border-top: none; padding-top: 0; }
.liste-tal div:last-child { padding-bottom: 0; }
.liste-tal .mono { font-size: 14px; }

/* ---------- diagrammer ---------- */
.chart { position: relative; width: 100%; }
.chart svg { display: block; width: 100%; overflow: visible; }
.chart .axis text { fill: var(--muted-foreground); font: 400 12px var(--mono); }
.chart .gridline { stroke: var(--border); stroke-width: 1; }
.chart .baseline { stroke: var(--muted-foreground); stroke-width: 1; }
.chart .bar { fill: var(--primary); }
.chart .bar.dim { fill: var(--highlight); }
.chart .bar.hover { opacity: .85; }
.chart .axis-label { fill: var(--muted-foreground); font-family: var(--mono); }
.chart .axis-label.on { fill: var(--foreground); font-weight: 500; }
.chart .line { fill: none; stroke: var(--foreground); stroke-width: 2; stroke-linejoin: round; }
.chart .omraade-top { stop-color: var(--highlight); stop-opacity: 1; }
.chart .omraade-bund { stop-color: var(--highlight); stop-opacity: 0; }
.chart .dot { fill: var(--card); stroke: var(--foreground); stroke-width: 2; }
.chart .cross, .chart .slut-linje { stroke: var(--foreground); stroke-width: 1; }
.chart-title { font-weight: 500; margin-bottom: 2px; }
.chart-sub { font-size: 13px; color: var(--muted-foreground); margin-bottom: 8px; }
.multiples { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px; }
.kpi { padding: 18px; border-radius: var(--r-tile); background: var(--muted); }
.kpi-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px; margin: 4px 0; }
.kpi-v { font-weight: 300; font-size: 32px; line-height: 1.15; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.delta { display: inline-flex; padding: 5px 10px; border-radius: 999px; background: var(--card); font-size: 13px; font-weight: 500; line-height: 1.35;
  font-variant-numeric: tabular-nums; color: var(--foreground); white-space: nowrap; }
.vaerdi .delta { background: var(--muted); }
.delta.op { color: var(--success); }
.delta.ned { color: var(--destructive); }
.notice-inline { margin: 16px 0 0; padding: 12px 16px; border-radius: 16px; background: var(--warning-muted); color: var(--foreground); }
.tooltip { position: fixed; z-index: 100; pointer-events: none; max-width: 280px; padding: 8px 12px; border-radius: 12px;
  background: var(--foreground); color: var(--background); font-size: 12px; box-shadow: 0 8px 24px rgba(0, 0, 0, .18); }
.tooltip strong { display: block; font: 500 14px var(--mono); }
.tooltip .tip-sub { opacity: .75; margin-left: 18px; }
.tooltip .key { display: inline-block; width: 12px; height: 2px; background: var(--highlight); vertical-align: middle; margin-right: 6px; }

/* ---------- sundhedstjek ---------- */
.sundhed { padding: 32px; border-radius: 24px; }
.sundhed .kort-hoved { margin-bottom: 14px; }
.alerts { list-style: none; margin: 0 0 14px; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 14px; }
.alert { display: flex; gap: 14px; align-items: flex-start; padding: 18px 20px 18px 18px; border-radius: var(--r-tile); background: var(--info-muted); }
.alert .ikon { margin-top: 2px; color: var(--info); }
.alert.critical, .alert.serious { background: var(--destructive-muted); }
.alert.critical .ikon, .alert.serious .ikon { color: var(--destructive); }
.alert.warning { background: var(--warning-muted); }
.alert.warning .ikon { color: var(--warning); }
.alert.good { background: var(--success-muted); }
.alert.good .ikon { color: var(--success); }
.alert-tekst { display: grid; gap: 2px; min-width: 0; }
.alert-tekst strong { font: 500 16px/1.4 var(--sans); }
.alert-tekst span { color: var(--muted-foreground); }

/* ---------- AI-sektion (mørk flade) ---------- */
.ai { position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 24px; padding: 40px; border-radius: 24px;
  background: var(--primary); color: var(--primary-foreground); isolation: isolate; }
.ai::before, .ai::after { content: ""; position: absolute; z-index: -1; pointer-events: none; background: center / contain no-repeat; }
.ai::before { left: -374px; top: -141px; width: 881px; height: 881px; background-image: url("/ikoner/glow1.svg"); }
.ai::after { right: -390px; top: -511px; width: 1251px; height: 1251px; background-image: url("/ikoner/glow2.svg"); }
.ai-label { display: flex; align-items: center; gap: 12px; color: var(--highlight); }
.ai-label .ikon-cirkel { background: var(--highlight); color: var(--primary); }
.ai-intro { margin: 0; color: var(--primary-muted-foreground); }
.ai-knapper { display: flex; flex-wrap: wrap; gap: 8px; }
.ai-knap { height: 40px; padding: 0 16px; border: 1px solid var(--primary-chip); background: var(--primary-chip); color: var(--primary-foreground); }
.ai-knap:hover { border-color: var(--primary-foreground); }
.ai-knap.on { background: var(--highlight); border-color: var(--highlight); color: var(--on-highlight); }
.ai-knap:disabled { cursor: progress; opacity: .7; }
.ai-knap.on:disabled { opacity: 1; }
.ai-knap:focus-visible { outline-color: var(--highlight); }
.ai-ud:empty { display: none; }
.ai-ud { display: grid; gap: 24px; }
.ai-fremdrift { position: relative; padding: 20px 22px; border-radius: var(--r-tile); background: var(--primary-card); }
.ai-fremdrift.skjult { display: none; }
.ai-ur { position: absolute; top: 20px; right: 22px; font: 400 12px var(--mono); color: var(--primary-muted-foreground); }
.ai-trinliste { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.ai-trin { display: grid; grid-template-columns: 22px 1fr; gap: 10px; align-items: start; transition: opacity .3s; }
.ai-trin.venter { opacity: .45; }
.ai-trin-ikon { width: 18px; height: 18px; margin-top: 1px; border-radius: 50%; border: 2px solid var(--primary-chip); }
.ai-trin.aktiv .ai-trin-ikon { border-top-color: var(--highlight); animation: spin .8s linear infinite; }
.ai-trin.faerdig .ai-trin-ikon { border: none; background: var(--highlight); position: relative; }
.ai-trin.faerdig .ai-trin-ikon::after { content: "✓"; position: absolute; inset: 0; display: grid; place-items: center; color: var(--primary); font-size: 11px; font-weight: 700; }
.ai-trin-navn { font-weight: 500; }
.ai-trin.faerdig .ai-trin-navn { color: var(--primary-muted-foreground); }
.ai-trin-detalje { font-size: 13px; color: var(--primary-muted-foreground); display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.ai-trin-detalje:empty { display: none; }
.ai-chip { padding: 2px 10px; border-radius: 999px; background: var(--primary-chip); animation: ind .35s ease both; }
.ai-fokus { animation: ind .4s ease both; }
.ai-skelet { display: grid; gap: 12px; padding: 4px 0; }
.ai-skelet-linje { height: 14px; border-radius: 7px; background: linear-gradient(90deg, var(--primary-card) 0%, var(--primary-chip) 50%, var(--primary-card) 100%);
  background-size: 200% 100%; animation: shimmer 1.4s ease-in-out infinite; }
.ai-svar { display: grid; gap: 24px; }
.ai-overskrift { margin: 0; max-width: 900px; font-weight: 300; font-size: 32px; line-height: 1.15; letter-spacing: -.03em; }
.ai-punkter { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 12px; }
.ai-punkt { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; min-height: 260px; padding: 22px; border-radius: 24px;
  background: var(--primary-card); animation: ind .35s ease both; }
.ai-punkt.neutral .badge { display: none; }
.ai-tal { font-weight: 300; font-size: 24px; line-height: 1.25; letter-spacing: -.02em; overflow-wrap: break-word; hyphens: auto; }
.ai-tal:empty { display: none; }
.ai-titel { font-weight: 500; line-height: 1.45; }
.ai-tekst { margin: 0; color: var(--primary-muted-foreground); }
.ai-tekst:empty { display: none; }
.ai-kilder { width: 100%; margin-top: auto; padding-top: 12px; border-top: 1px solid var(--primary-border); }
.ai-kilder summary { cursor: pointer; list-style: none; color: var(--highlight); font: 500 12px/1.35 var(--mono); letter-spacing: .06em; text-transform: uppercase; }
.ai-kilder summary::-webkit-details-marker { display: none; }
.ai-kilder summary::after { content: " →"; }
.ai-kilder[open] summary::after { content: " ↓"; }
.ai-kilde-liste { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; }
.tag.kilde { background: var(--primary-chip); color: var(--primary-foreground); text-decoration: none; }
.tag.kilde:hover { background: var(--highlight); color: var(--on-highlight); }
.ai-overskrift.skriver::after, .ai-titel.skriver::after, .ai-tekst.skriver::after { content: "▍"; color: var(--highlight); margin-left: 1px; animation: blink 1s steps(2) infinite; }
.ai-forbehold { margin: 0; color: var(--primary-muted-foreground); }
.ai-forbehold:empty { display: none; }
.ai-note { margin: 0; padding-top: 16px; border-top: 1px solid var(--primary-border); color: var(--primary-muted-foreground);
  font: 500 12px/1.35 var(--mono); letter-spacing: .06em; text-transform: uppercase; }
.ai .error { background: var(--primary-card); color: var(--primary-foreground); }
@keyframes ind { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }
@keyframes blink { to { visibility: hidden; } }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- deltagere ---------- */
.personer { list-style: none; margin: 0; padding: 0; }
.person { display: flex; align-items: center; gap: 14px; padding: 16px 14px 15px 10px; border-bottom: 1px solid var(--border); }
.person:last-child { border-bottom: none; }
.avatar { display: grid; place-items: center; flex-shrink: 0; width: 44px; height: 44px; border-radius: 22px; background: var(--muted);
  font: 500 12px/1.35 var(--mono); letter-spacing: .06em; text-transform: uppercase; }
.avatar.org { border-radius: 12px; background: var(--avatar-org); color: var(--info); }
.person-navn { flex: 1 1 180px; min-width: 0; display: grid; gap: 2px; }
.person-navn a { font-weight: 500; text-decoration: none; }
.person-navn a:hover { text-decoration: underline; }
.person-navn .kicker { font-size: 12px; }
.roller { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }

/* placering i branchen */
.tal-fliser { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.flise { display: grid; gap: 4px; padding: 18px; border-radius: var(--r-tile); background: var(--muted); min-width: 0; }
.flise .stor { font-weight: 300; font-size: clamp(40px, 5vw, 64px); line-height: 1; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.flise span:last-child { font-size: 13px; }
.meter { position: relative; height: 8px; border-radius: 4px; background: var(--muted); margin: 6px 0 4px; }
.meter-fill { height: 100%; border-radius: 4px; background: var(--primary); width: 0; }
.meter-mark { position: absolute; top: -4px; width: 2px; height: 16px; background: var(--foreground); left: 0; }
.card .stak-lille { display: grid; gap: 16px; }
.stak-lille p { margin: 0; }

/* ---------- stamdata ---------- */
.fakta { display: grid; grid-template-columns: 1fr 1fr; }
.fakta > div { display: grid; align-content: start; gap: 6px; padding: 16px; border-bottom: 1px solid var(--border); min-width: 0; }
.fakta > div.venstre { border-right: 1px solid var(--border); }
.fakta > div.bred { grid-column: 1 / -1; }
.fakta dt { font-size: 13px; color: var(--muted-foreground); }
.fakta dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; }
.fakta dd .mono { font-size: 14px; }
.kv { display: grid; grid-template-columns: minmax(140px, 220px) 1fr; gap: 0; margin: 0; }
.kv dt, .kv dd { padding: 10px 0; border-bottom: 1px solid var(--border); margin: 0; }
.kv dt { color: var(--muted-foreground); font-size: 13px; padding-right: 16px; }
.kv dd { word-break: break-word; font-weight: 500; }

/* ---------- hændelser ---------- */
.events { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.event { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 24px; padding: 20px; border-radius: var(--r-tile); background: var(--muted); }
.event-dato { display: grid; align-content: start; gap: 4px; }
.event-dato time { font-weight: 300; font-size: 32px; line-height: 1.15; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.event-indhold { display: grid; gap: 12px; align-content: start; min-width: 0; }
.event-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.event-label { font: 500 16px/1.4 var(--sans); }
.event-body { display: grid; gap: 8px; }
.event-body p { margin: 0; color: var(--muted-foreground); }
.event-body a { color: var(--foreground); }
.skift-gruppe { display: grid; gap: 8px; }
.skift-gruppe > .mono-label.til { color: var(--success); }
.skift-gruppe > .mono-label.fra { color: var(--destructive); }
.skift-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.skift { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px 7px 8px; border-radius: 999px; background: var(--card); font-weight: 500; }
.skift a { text-decoration: none; }
.skift a:hover { text-decoration: underline; }
.skift .small { font-weight: 400; }
.skift-tegn { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 11px; font: 500 12px/1 var(--mono);
  background: var(--success-muted); color: var(--success); }
.skift.fra .skift-tegn { background: var(--destructive-muted); color: var(--destructive); }
.skift.fra > a, .skift.fra > .navn { color: var(--muted-foreground); }
.year > h3 { margin: 24px 0 12px; }

/* ---------- regnskabsvisning: sider som i en PDF ---------- */
.regnskab { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 32px; align-items: start; }
.regnskab > .loading, .regnskab > .error, .regnskab > .card { grid-column: 1 / -1; }
.regnskab-toc { position: sticky; top: 108px; display: grid; gap: 2px; max-height: calc(100vh - 130px); overflow: auto; }
.regnskab-toc .mono-label { margin: 0 0 8px 10px; }
.toc-punkt { height: auto; justify-content: flex-start; padding: 6px 10px; border: none; border-radius: 10px; background: none; color: var(--muted-foreground); text-align: left; font-size: 13px; }
.toc-punkt:hover { background: var(--card); color: var(--foreground); }
.regnskab-dok { display: grid; gap: 20px; min-width: 0; }
.regnskab-handlinger { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.regnskab-handlinger .small { flex-basis: 100%; margin: 0; }
.regnskab-handlinger select { height: 40px; padding: 0 14px; border: 1px solid var(--border); border-radius: 9999px; background: var(--card); color: var(--foreground); font: inherit; }
.toolbar-label { display: inline-flex; align-items: center; gap: 8px; color: var(--muted-foreground); font-size: 13px; }

/* papiret: hvide A4-ark med skygge, stablet som i en PDF-læser */
.papir { display: grid; gap: 28px; justify-items: center; padding: 8px 0 40px; }
.ark { --ark-tekst: #1a1a18; --ark-graa: #6b6a66; --ark-linje: #d9d7d0;
  position: relative; width: min(100%, 794px); min-height: 1123px; padding: 88px 84px 96px; background: #fff; color: var(--ark-tekst);
  box-shadow: 0 1px 2px rgba(17, 17, 17, .08), 0 12px 32px rgba(17, 17, 17, .08); scroll-margin-top: 100px; font-size: 13.5px; line-height: 1.6; }
.ark-hoved { position: absolute; top: 36px; left: 84px; right: 84px; padding-bottom: 8px; border-bottom: 1px solid var(--ark-linje);
  font-size: 11px; color: var(--ark-graa); letter-spacing: .02em; }
.ark-fod { position: absolute; bottom: 36px; left: 0; right: 0; text-align: center; font-size: 11px; color: var(--ark-graa); font-variant-numeric: tabular-nums; }
.ark-titel { font: 500 22px/1.25 var(--sans); letter-spacing: -.01em; margin: 0 0 28px; }
.ark h4 { font: 500 14px/1.4 var(--sans); margin: 22px 0 6px; }
.ark h4:first-child, .ark-titel + h4 { margin-top: 0; }
.ark p { margin: 0 0 10px; }
.ark .small { color: var(--ark-graa); font-size: 12px; }
.ark a { color: inherit; }

/* forside */
.ark#rs-forside { display: flex; flex-direction: column; justify-content: space-between; }
.forside-top { display: flex; justify-content: space-between; align-items: baseline; color: var(--ark-graa); }
.brand-lille { font: 500 18px/1 var(--mono); letter-spacing: -.04em; color: var(--ark-tekst); }
.forside-midt { display: grid; gap: 14px; margin: 140px 0 auto; }
.forside-navn { font-weight: 300; font-size: 44px; line-height: 1.05; letter-spacing: -.03em; overflow-wrap: anywhere; }
.forside-titel { font-weight: 500; font-size: 20px; }
.forside-periode { font-size: 15px; color: var(--ark-graa); font-variant-numeric: tabular-nums; }
.forside-fakta { display: grid; gap: 10px; margin: 0; padding-top: 24px; border-top: 1px solid var(--ark-linje); }
.forside-fakta div { display: grid; grid-template-columns: 220px 1fr; gap: 12px; }
.forside-fakta dt { color: var(--ark-graa); }
.forside-fakta dd { margin: 0; }

/* indholdsfortegnelse */
.indholdsfortegnelse { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; counter-reset: none; }
.indholdsfortegnelse li { display: flex; align-items: baseline; gap: 8px; }
.indholdsfortegnelse button { height: auto; padding: 4px 0; border: none; background: none; color: var(--ark-tekst); font: 400 14px/1.5 var(--sans); }
.indholdsfortegnelse button:hover { text-decoration: underline; }
.prikker { flex: 1; border-bottom: 1px dotted var(--ark-linje); transform: translateY(-4px); }
.sidetal { font-variant-numeric: tabular-nums; color: var(--ark-graa); }

/* underskrifter og revisor */
.underskrifter { display: flex; flex-wrap: wrap; gap: 28px 56px; margin-top: 36px; }
.underskrifter div { display: grid; gap: 22px; }
.underskrifter span:not(.kicker) { min-width: 200px; padding-top: 6px; border-top: 1px solid var(--ark-tekst); }
.ark .badges.venstre { justify-content: flex-start; margin-bottom: 16px; }

/* opstillinger: klassisk regnskabsopsætning */
.ark .tablewrap { border: none; border-radius: 0; }
.ark table.opstilling { font-size: 13px; }
.ark .opstilling th { position: static; background: none; cursor: default; padding: 0 8px 8px; border-bottom: 1px solid var(--ark-tekst);
  font: 500 12px/1.35 var(--sans); letter-spacing: 0; text-transform: none; color: var(--ark-tekst); }
.ark .opstilling th:first-child { color: var(--ark-graa); font-weight: 400; padding-left: 0; }
.ark .opstilling td { padding: 4px 8px; border-bottom: none; }
.ark .opstilling td:first-child { padding-left: 0; }
.ark .opstilling td.num, .ark .opstilling th.num { width: 15ch; white-space: nowrap; text-align: right; font: inherit; font-variant-numeric: tabular-nums; }
.ark .opstilling td.foer, .ark .opstilling th.foer { color: var(--ark-graa); }
.ark .opstilling .lbl[data-d="1"] { padding-left: 14px; } .ark .opstilling .lbl[data-d="2"] { padding-left: 28px; }
.ark .opstilling .lbl[data-d="3"], .ark .opstilling .lbl[data-d="4"] { padding-left: 42px; }
.ark .opstilling tr.overskrift td { padding-top: 14px; font: 500 13px/1.4 var(--sans); color: var(--ark-tekst); text-transform: none; letter-spacing: 0; }
.ark .opstilling tr.overskrift td[data-d="1"] { padding-left: 14px; } .ark .opstilling tr.overskrift td[data-d="2"], .ark .opstilling tr.overskrift td[data-d="3"] { padding-left: 28px; }
.ark .opstilling tr.total td { font-weight: 500; border-top: none; }
.ark .opstilling tr.total td.num { border-top: 1px solid var(--ark-tekst); }
.ark .opstilling tr.total.slut td { font-weight: 600; padding-bottom: 10px; }
.ark .opstilling tr.total.slut td.num { border-bottom: 3px double var(--ark-tekst); }
.ark .opstilling tr.total + tr:not(.total) td { padding-top: 10px; }
.ark .opstilling.egenkapital td.num, .ark .opstilling.egenkapital th.num { width: auto; }
.ark .opstilling.egenkapital th { white-space: normal; vertical-align: bottom; }
.ark .opstilling .note-ref { width: 5ch; text-align: center; color: var(--ark-graa); }
.ark .opstilling.hoved td.num, .ark .opstilling.hoved th.num { width: auto; }
.ark .opstilling.fri td { border-bottom: 1px solid var(--ark-linje); }
.note { padding: 22px 0 0; }
.note:first-of-type { padding-top: 0; }
.ark .note-titel { display: flex; gap: 12px; align-items: baseline; margin: 0 0 10px; font: 500 14px/1.4 var(--sans); text-transform: none; letter-spacing: 0; color: var(--ark-tekst); }
.ark .note-titel .mono-label { color: var(--ark-graa); }
.note .tablewrap { margin-bottom: 10px; }
.ark details summary { cursor: pointer; font-weight: 500; }
.ark details[open] summary { margin-bottom: 14px; }
.raa-tekst { font-size: 12px; color: var(--ark-graa); }

/* penge, investeringer og løn + knapper i regnskabslisten */
.formue-fliser { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 12px; margin-bottom: 14px; }
.flise.formue { gap: 8px; align-content: start; }
.formue-tal { font-weight: 300; font-size: 32px; line-height: 1.15; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.flise.formue .delta { justify-self: start; }
.knaprad { display: flex; gap: 6px; flex-wrap: wrap; }
.btn.primaer-lille { background: var(--primary); border-color: var(--primary); color: var(--primary-foreground); }

@media (max-width: 1100px) {
  .regnskab { grid-template-columns: minmax(0, 1fr); }
  .regnskab-toc { display: none; }
}
@media (max-width: 700px) {
  .ark { min-height: 0; padding: 56px 20px 64px; }
  .ark-hoved { left: 20px; right: 20px; top: 20px; }
  .ark-fod { bottom: 20px; }
  .forside-midt { margin-top: 60px; }
  .forside-navn { font-size: 32px; }
  .forside-fakta div { grid-template-columns: 1fr; gap: 0; }
  .ark .opstilling td.num, .ark .opstilling th.num { width: auto; }
}
@media print {
  .top, .footer, .tabs, .entity, .regnskab-toc, .regnskab-handlinger, .notice { display: none !important; }
  main { padding: 0; } .papir { gap: 0; padding: 0; } body { background: #fff; }
  .ark { box-shadow: none; width: 100%; min-height: 0; page-break-after: always; }
}

/* ---------- tabeller ---------- */
.tablewrap { overflow-x: auto; border-radius: 16px; border: 1px solid var(--border); }
table { border-collapse: collapse; width: 100%; font-size: 13px; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
th { background: var(--muted); font: 500 12px/1.35 var(--mono); letter-spacing: .04em; text-transform: uppercase; color: var(--muted-foreground);
  position: sticky; top: 0; white-space: nowrap; cursor: pointer; }
tr:last-child td { border-bottom: none; }
tr.aktiv td { background: color-mix(in srgb, var(--highlight) 30%, transparent); }
td.nowrap { white-space: nowrap; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }

.toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 16px; }
.toolbar input[type=search], .toolbar select { height: 40px; padding: 0 14px; border: 1px solid var(--border); border-radius: 9999px;
  background: var(--card); color: var(--foreground); font: inherit; }
.toolbar label { display: inline-flex; gap: 6px; align-items: center; color: var(--muted-foreground); }

.section { margin-bottom: 22px; }
.section > h3 { display: flex; gap: 8px; align-items: baseline; font: 500 14px var(--sans); margin: 0 0 8px; text-transform: none; letter-spacing: 0; color: var(--foreground); }
.section > h3 code { color: var(--muted-foreground); font-weight: 400; }

/* JSON-træ */
.tree { font-family: var(--mono); font-size: 12.5px; line-height: 1.6; }
.tree details { margin-left: 16px; }
.tree > details { margin-left: 0; }
.tree summary { cursor: pointer; list-style: none; }
.tree summary::-webkit-details-marker { display: none; }
.tree summary::before { content: "▸"; display: inline-block; width: 14px; color: var(--muted-foreground); }
.tree details[open] > summary::before { content: "▾"; }
.tree .leaf { margin-left: 30px; }
.tree .k { color: var(--primary); }
.tree .s { color: var(--success); }
.tree .n { color: var(--warning); }
.tree .b { color: var(--destructive); }
.tree .meta { color: var(--muted-foreground); }

/* koncern */
.ktree { list-style: none; margin: 0; padding-left: 18px; border-left: 1px solid var(--border); }
.card > .ktree, .card > ul > li > .ktree:first-child { border-left: none; padding-left: 0; }
.ktree li { margin: 6px 0; }
.ktree summary { cursor: pointer; }
.node { display: inline; }
.node.root { font-size: 15px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin: 0 0 16px; }
.stat { display: grid; gap: 4px; padding: 18px; border-radius: var(--r-tile); background: var(--muted); }
.stat .v { font-weight: 300; font-size: 32px; line-height: 1.15; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.stat .l { font-size: 13px; color: var(--muted-foreground); }

/* ---------- forside ---------- */
.hero { max-width: 760px; margin: 12vh auto 0; text-align: center; }
.hero h1 { font-weight: 300; font-size: clamp(40px, 7vw, 64px); line-height: 1; letter-spacing: -.04em; margin: 0 0 16px; }
.hero-sub { color: var(--muted-foreground); font-size: 16px; margin: 0 auto 32px; max-width: 52ch; }
.hero-search { position: relative; display: flex; align-items: center; gap: 12px; height: 64px; padding: 8px 8px 8px 22px; text-align: left;
  background: var(--card); border-radius: 9999px; box-shadow: 0 10px 30px rgba(17, 17, 17, .06); }
.hero-search:focus-within { box-shadow: 0 0 0 2px var(--primary), 0 10px 30px rgba(17, 17, 17, .06); }
.hero-search > .ikon { color: var(--foreground); }
.hero-search input { flex: 1; min-width: 0; border: none; outline: none; background: transparent; color: var(--foreground); font: inherit; font-size: 18px; }
.hero-search input::-webkit-search-cancel-button { cursor: pointer; }
.forslag { position: absolute; z-index: 20; left: 0; right: 0; top: calc(100% + 8px); list-style: none; margin: 0; padding: 6px;
  background: var(--card); border-radius: 24px; box-shadow: 0 16px 40px rgba(17, 17, 17, .12); }
.forslag-raekke { display: grid; grid-template-columns: 90px 1fr auto; gap: 12px; align-items: center; padding: 10px 14px; border-radius: 18px; cursor: pointer; }
.forslag-raekke[aria-selected="true"] { background: var(--muted); }
.forslag-type { font: 500 11px/1.35 var(--mono); text-transform: uppercase; letter-spacing: .06em; color: var(--muted-foreground); }
.forslag-navn { font-weight: 500; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.forslag-sub { display: block; font-weight: 400; font-size: 13px; color: var(--muted-foreground); overflow: hidden; text-overflow: ellipsis; }
.forslag-hoejre { white-space: nowrap; }
.forslag-alle { padding: 10px 14px; font-size: 13px; font-weight: 500; cursor: pointer; border-top: 1px solid var(--border); margin-top: 4px; }
.hero-eks { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px; margin-top: 24px; }
.hero-tip { margin-top: 28px; }

/* søgeresultater */
.resultat-hoved { margin: 0 0 16px; }
.results { display: grid; gap: 8px; }
.result { display: grid; grid-template-columns: 120px 1fr auto; gap: 16px; align-items: center; padding: 16px 20px;
  background: var(--card); border-radius: var(--r-tile); color: var(--foreground); text-decoration: none; }
.result:hover { box-shadow: 0 0 0 1px var(--foreground); }
.result .t { font: 500 11px/1.35 var(--mono); text-transform: uppercase; letter-spacing: .06em; color: var(--muted-foreground); }
.result .name { font-weight: 500; }

/* ---------- footer ---------- */
.footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px 32px; padding: 32px 120px 40px; border-top: 1px solid var(--border);
  color: var(--muted-foreground); font-size: 13px; line-height: 1.4; }
.footer-tekst { max-width: 640px; display: grid; gap: 6px; }
.footer p { margin: 0; }
.footer-links { display: flex; flex-wrap: wrap; gap: 24px; font-weight: 500; }
.footer-links a { text-decoration: none; }
.footer-links a:hover { color: var(--foreground); }

/* ---------- tekstsider, login, fejl ---------- */
.prose { max-width: 760px; margin: 0 auto; padding: 40px; }
.prose h1 { font-weight: 300; font-size: 40px; line-height: 1.1; letter-spacing: -.03em; margin: 0 0 16px; }
.prose h2 { font: 500 16px/1.4 var(--sans); margin: 28px 0 6px; }
.prose p, .prose li { line-height: 1.6; }
.login { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.login form { width: 100%; max-width: 360px; display: grid; gap: 12px; padding: 32px; }
.login .brand { margin-bottom: 12px; }
.login label { color: var(--muted-foreground); font-size: 13px; }
.login input { height: 48px; padding: 0 18px; border: 1px solid var(--border); border-radius: 9999px; background: var(--background); color: var(--foreground);
  font: inherit; letter-spacing: .1em; }
.login input:focus { outline: 2px solid var(--primary); outline-offset: -1px; }
.login button { justify-content: center; height: 48px; }
.login-fejl { margin: 0; color: var(--destructive); font-size: 13px; }
.loading { color: var(--muted-foreground); padding: 24px 0; }
.loading::before { content: ""; display: inline-block; width: 12px; height: 12px; margin-right: 8px; vertical-align: -1px;
  border: 2px solid var(--border); border-top-color: var(--primary); border-radius: 50%; animation: spin .8s linear infinite; }
.error { background: var(--destructive-muted); border-radius: 16px; padding: 14px 18px; white-space: pre-wrap; }

@media (prefers-reduced-motion: reduce) {
  .ai-trin.aktiv .ai-trin-ikon, .ai-skelet-linje, .ai-chip, .ai-fokus, .ai-punkt, .loading::before { animation: none; }
  .ai-overskrift.skriver::after, .ai-titel.skriver::after, .ai-tekst.skriver::after { animation: none; }
  .knap-pil { transition: none; }
}

@media (max-width: 1100px) {
  main { padding: 24px 40px 40px; }
  .footer { padding: 32px 40px 40px; }
}
@media (max-width: 700px) {
  .top { grid-template-columns: auto 1fr; padding: 12px 16px; gap: 12px; }
  .topnav { display: none; }
  .search .kbd { display: none; }
  main { padding: 16px 16px 32px; }
  .footer { padding: 24px 16px 32px; }
  .card { padding: 20px; border-radius: 24px; }
  .sundhed, .ai { padding: 20px; }
  .entity-handling { align-items: flex-start; }
  .badges { justify-content: flex-start; }
  .tal-fliser, .fakta { grid-template-columns: minmax(0, 1fr); }
  .w-S > .card { min-height: 0; }
  .fakta > div.venstre { border-right: none; }
  .event { grid-template-columns: 1fr; gap: 12px; }
  .event-dato time, .ai-overskrift { font-size: 26px; }
  .person { flex-wrap: wrap; }
  .roller { justify-content: flex-start; padding-left: 58px; }
  .hero { margin-top: 6vh; }
  .hero-search { height: 56px; }
  .hero-search input { font-size: 16px; }
  .hero-search .knap > span:first-child { display: none; }
  .hero-search .knap { padding: 0 8px; }
  .forslag-raekke { grid-template-columns: 1fr; gap: 2px; }
  .forslag-hoejre { display: none; }
  .kv { grid-template-columns: 1fr; }
  .kv dt { border-bottom: none; padding-bottom: 0; }
  .result { grid-template-columns: 1fr; gap: 4px; }
}
