/* site.css — hele sitets udseende.
 *
 * Farver er tokens på :root og defineres igen for mørkt tema. Modulernes
 * farve (--tone) er identitet, aldrig betydning: rigtigt/forkert markeres
 * altid også med ✓/✗ og tekst.
 *
 * CSP'en tillader ikke style="…" i HTML. Brug klasser; JavaScript sætter kun
 * custom properties gennem element.style.setProperty.
 */

/* ── Tokens ─────────────────────────────────────────────────────────────── */
:root {
  color-scheme: light;
  --bg: #f5f7fb;
  --bg-2: #eaeef6;
  --surface: #ffffff;
  --surface-2: #f0f3f9;
  --ink: #0d1a2f;
  --ink-2: #2a3a55;
  --muted: #5a6982;
  --line: #d9e0ec;
  --brand: #0b3d78;
  --brand-ink: #ffffff;
  --accent: #e8642c;
  --ok: #157a52;
  --ok-bg: #e3f5ec;
  --bad: #b3263e;
  --bad-bg: #fbe7ea;
  --focus: #2f6fff;
  --shadow-sm: 0 1px 2px rgb(13 26 47 / .06), 0 2px 8px rgb(13 26 47 / .05);
  --shadow: 0 2px 6px rgb(13 26 47 / .06), 0 12px 32px rgb(13 26 47 / .08);
  --shadow-lg: 0 8px 24px rgb(13 26 47 / .10), 0 32px 64px rgb(13 26 47 / .12);

  /* Modulernes toner */
  --t-start: #4b6bfb;
  --t-etik: #7a4dff;
  --t-gdpr: #1f6fe5;
  --t-behandling: #0e9a8c;
  --t-sikkerhed: #d9822b;
  --t-afslutning: #c2410c;
  --t-saerlige: #d03f74;
  --t-ressourcer: #4f5f7a;
  --tone: var(--brand);

  --radius: 18px;
  --radius-sm: 12px;
  --wrap: 1180px;
  --prose: 72ch;
  --gutter: clamp(16px, 4vw, 40px);
  --ease: cubic-bezier(.2, .8, .2, 1);
  --ease-spring: cubic-bezier(.34, 1.56, .64, 1);
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: ui-rounded, "SF Pro Rounded", var(--font);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #070d1a;
    --bg-2: #0c1528;
    --surface: #101a2e;
    --surface-2: #16223a;
    --ink: #e8eefb;
    --ink-2: #c3cee3;
    --muted: #8f9db8;
    --line: #22314d;
    --brand: #6ea3ff;
    --brand-ink: #071226;
    --accent: #ff8a57;
    --ok: #4cd39a;
    --ok-bg: #0f2e24;
    --bad: #ff7a90;
    --bad-bg: #3a1520;
    --focus: #8fb4ff;
    --shadow-sm: 0 1px 2px rgb(0 0 0 / .3);
    --shadow: 0 2px 8px rgb(0 0 0 / .35), 0 12px 32px rgb(0 0 0 / .3);
    --shadow-lg: 0 8px 24px rgb(0 0 0 / .4), 0 32px 64px rgb(0 0 0 / .45);
    --t-start: #8199ff;
    --t-etik: #a58bff;
    --t-gdpr: #5c9cff;
    --t-behandling: #33cbb9;
    --t-sikkerhed: #f0a65a;
    --t-afslutning: #ff8a50;
    --t-saerlige: #f0739f;
    --t-ressourcer: #93a3c0;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #070d1a;
  --bg-2: #0c1528;
  --surface: #101a2e;
  --surface-2: #16223a;
  --ink: #e8eefb;
  --ink-2: #c3cee3;
  --muted: #8f9db8;
  --line: #22314d;
  --brand: #6ea3ff;
  --brand-ink: #071226;
  --accent: #ff8a57;
  --ok: #4cd39a;
  --ok-bg: #0f2e24;
  --bad: #ff7a90;
  --bad-bg: #3a1520;
  --focus: #8fb4ff;
  --shadow-sm: 0 1px 2px rgb(0 0 0 / .3);
  --shadow: 0 2px 8px rgb(0 0 0 / .35), 0 12px 32px rgb(0 0 0 / .3);
  --shadow-lg: 0 8px 24px rgb(0 0 0 / .4), 0 32px 64px rgb(0 0 0 / .45);
  --t-start: #8199ff;
  --t-etik: #a58bff;
  --t-gdpr: #5c9cff;
  --t-behandling: #33cbb9;
  --t-sikkerhed: #f0a65a;
  --t-afslutning: #ff8a50;
  --t-saerlige: #f0739f;
  --t-ressourcer: #93a3c0;
}

.tone-start { --tone: var(--t-start); }
.tone-etik { --tone: var(--t-etik); }
.tone-gdpr { --tone: var(--t-gdpr); }
.tone-behandling { --tone: var(--t-behandling); }
.tone-sikkerhed { --tone: var(--t-sikkerhed); }
.tone-afslutning { --tone: var(--t-afslutning); }
.tone-saerlige { --tone: var(--t-saerlige); }
.tone-ressourcer { --tone: var(--t-ressourcer); }

/* ── Grundlag ───────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; scroll-padding-top: 88px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 1.0625rem/1.65 var(--font);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Glidende overgang mellem sider i browsere, der kan det. */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: vt-out .22s var(--ease) both; }
::view-transition-new(root) { animation: vt-in .38s var(--ease) both; }
@keyframes vt-out { to { opacity: 0; transform: translateY(-6px); } }
@keyframes vt-in { from { opacity: 0; transform: translateY(10px); } }

h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.15; letter-spacing: -.015em; color: var(--ink); text-wrap: balance; }
h1 { font-size: clamp(2.1rem, 1.4rem + 3vw, 3.6rem); font-weight: 800; margin: 0 0 .4em; letter-spacing: -.03em; }
h2 { font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2.05rem); font-weight: 750; margin: 2.2em 0 .6em; }
h3 { font-size: 1.28rem; font-weight: 700; margin: 1.8em 0 .5em; }
h4 { font-size: 1.05rem; font-weight: 700; margin: 1.5em 0 .4em; text-transform: uppercase; letter-spacing: .06em; color: var(--tone); }
p { margin: 0 0 1em; text-wrap: pretty; }
a { color: var(--brand); text-decoration-thickness: 1px; text-underline-offset: .18em; transition: color .2s; }
a:hover { color: var(--accent); }
strong { font-weight: 700; color: var(--ink); }
ul, ol { padding-left: 1.3em; margin: 0 0 1.2em; }
li { margin: .3em 0; }
li::marker { color: var(--tone); }
img, svg { max-width: 100%; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2.5em 0; }
blockquote { margin: 0; }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }
::selection { background: color-mix(in srgb, var(--tone) 30%, transparent); }

.icon { width: 1.25em; height: 1.25em; flex: none; vertical-align: -.25em; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 16px; top: -60px; z-index: 100; background: var(--brand); color: var(--brand-ink); padding: .6em 1em; border-radius: 10px; font-weight: 700; transition: top .2s; }
.skip:focus { top: 12px; color: var(--brand-ink); }

.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }

/* ── Sidehoved ──────────────────────────────────────────────────────────── */
.topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 64px;
  padding: 10px var(--gutter);
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  backdrop-filter: saturate(1.6) blur(14px);
  -webkit-backdrop-filter: saturate(1.6) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, background .3s, box-shadow .3s;
}
.topbar.is-scrolled { border-bottom-color: var(--line); box-shadow: var(--shadow-sm); }

.brand {
  display: inline-flex; align-items: center; gap: .6em;
  font: 800 1.05rem/1 var(--font-display); letter-spacing: -.01em;
  color: var(--ink); text-decoration: none;
}
.brand:hover { color: var(--ink); }
.brand-mark {
  width: 34px; height: 34px; border-radius: 11px; flex: none;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3l8 3v6c0 4.5-3.4 8.2-8 9-4.6-.8-8-4.5-8-9V6z'/%3E%3Cpath d='M8.5 12l2.5 2.5 4.5-5'/%3E%3C/svg%3E") center / 20px no-repeat,
    linear-gradient(135deg, #2f6fff, #7a4dff 55%, #e8642c);
  box-shadow: 0 4px 14px rgb(47 111 255 / .35);
  transition: transform .5s var(--ease-spring);
}
.brand:hover .brand-mark { transform: rotate(-8deg) scale(1.06); }
.brand-sub { font-weight: 500; color: var(--muted); }

.topbar-actions { display: flex; align-items: center; gap: 8px; }
.icon-btn, .menu-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45em;
  height: 42px; min-width: 42px; padding: 0 12px;
  border: 1px solid var(--line); border-radius: 12px;
  background: var(--surface); color: var(--ink);
  font: 600 .95rem var(--font); cursor: pointer;
  transition: transform .2s var(--ease), border-color .2s, box-shadow .2s;
}
.icon-btn { padding: 0; }
.icon-btn:hover, .menu-btn:hover { border-color: var(--tone); box-shadow: var(--shadow-sm); transform: translateY(-1px); }
.icon-btn:active, .menu-btn:active { transform: translateY(0) scale(.97); }

.read-progress {
  position: absolute; left: 0; right: 0; bottom: -1px; height: 3px;
  transform-origin: 0 50%; transform: scaleX(var(--p, 0));
  background: linear-gradient(90deg, var(--tone), var(--accent));
}

/* ── Menu (dialog) ──────────────────────────────────────────────────────── */
.drawer {
  margin: 0 0 0 auto; height: 100dvh; max-height: none; width: min(420px, 100vw);
  padding: 0; border: 0; border-left: 1px solid var(--line);
  background: var(--surface); color: var(--ink);
  box-shadow: var(--shadow-lg);
  overflow-y: auto; overscroll-behavior: contain;
}
.drawer::backdrop { background: rgb(5 10 25 / .45); backdrop-filter: blur(3px); }
.drawer[open] { animation: drawer-in .42s var(--ease) both; }
.drawer[open]::backdrop { animation: fade-in .3s ease both; }
.drawer.is-closing { animation: drawer-out .25s ease-in both; }
.drawer.is-closing::backdrop { animation: fade-out .25s ease-in both; }
@keyframes drawer-in { from { transform: translateX(100%); } }
@keyframes drawer-out { to { transform: translateX(100%); } }
@keyframes fade-in { from { opacity: 0; } }
@keyframes fade-out { to { opacity: 0; } }

.drawer-head {
  position: sticky; top: 0; z-index: 1;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px; background: var(--surface); border-bottom: 1px solid var(--line);
}
.toc { list-style: none; margin: 0; padding: 12px 12px 32px; }
.toc-module { margin: 0; padding: 10px 8px; }
.drawer[open] .toc-module { animation: rise .5s var(--ease) both; }
.drawer[open] .toc-module:nth-child(2) { animation-delay: .04s; }
.drawer[open] .toc-module:nth-child(3) { animation-delay: .08s; }
.drawer[open] .toc-module:nth-child(4) { animation-delay: .12s; }
.drawer[open] .toc-module:nth-child(5) { animation-delay: .16s; }
.drawer[open] .toc-module:nth-child(6) { animation-delay: .2s; }
.drawer[open] .toc-module:nth-child(7) { animation-delay: .24s; }
.drawer[open] .toc-module:nth-child(8) { animation-delay: .28s; }
.toc-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin: 0 0 6px; padding: 0 8px; }
.toc-title { font: 750 .8rem var(--font); letter-spacing: .08em; text-transform: uppercase; color: var(--tone); }
.toc-count { font-size: .8rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.toc-chapters { list-style: none; margin: 0; padding: 0; }
.toc-chapters li { margin: 0; }
.toc-group { font-size: .78rem; color: var(--muted); padding: 8px 10px 2px; }
.toc-chapters a {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px;
  color: var(--ink-2); text-decoration: none; line-height: 1.35;
  transition: background .2s, color .2s, transform .2s var(--ease);
}
.toc-chapters a:hover { background: var(--surface-2); color: var(--ink); transform: translateX(3px); }
.toc-chapters a[aria-current="page"] { background: color-mix(in srgb, var(--tone) 14%, transparent); color: var(--ink); font-weight: 650; }
.toc-check { width: 18px; height: 18px; flex: none; border-radius: 50%; border: 2px solid var(--line); transition: all .3s; }
.is-done .toc-check {
  border-color: var(--tone); background: var(--tone)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 12px no-repeat;
}

/* ── Forside ────────────────────────────────────────────────────────────── */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  padding: clamp(56px, 10vw, 128px) 0 clamp(64px, 9vw, 120px);
}
.hero-bg { position: absolute; inset: -20% -10% -10%; z-index: -1; pointer-events: none; }
.blob {
  position: absolute; border-radius: 50%; filter: blur(60px); opacity: .55;
  animation: float 18s ease-in-out infinite alternate;
}
.blob-1 { width: 46vmax; height: 46vmax; left: -8%; top: -10%; background: radial-gradient(circle at 30% 30%, #4b6bfb, transparent 65%); }
.blob-2 { width: 38vmax; height: 38vmax; right: -6%; top: 0; background: radial-gradient(circle at 60% 40%, #a35cff, transparent 65%); animation-duration: 22s; animation-delay: -6s; }
.blob-3 { width: 30vmax; height: 30vmax; left: 35%; bottom: -20%; background: radial-gradient(circle, #ff8a57, transparent 65%); opacity: .4; animation-duration: 26s; animation-delay: -12s; }
@keyframes float {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(4vw, 3vh) scale(1.08); }
  100% { transform: translate(-3vw, -2vh) scale(.95); }
}
.grid-dots {
  position: absolute; inset: 0;
  background-image: radial-gradient(color-mix(in srgb, var(--ink) 16%, transparent) 1px, transparent 1.5px);
  background-size: 26px 26px;
  mask-image: radial-gradient(ellipse at 50% 40%, #000 20%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 40%, #000 20%, transparent 70%);
  animation: drift 40s linear infinite;
}
@keyframes drift { to { background-position: 260px 130px; } }

.hero-inner { display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(24px, 5vw, 64px); align-items: center; }
.hero-copy .kicker {
  display: inline-flex; align-items: center; gap: .5em;
  padding: .35em .85em; border-radius: 99px;
  background: color-mix(in srgb, var(--surface) 70%, transparent); border: 1px solid var(--line);
  font: 650 .85rem var(--font); color: var(--ink-2); backdrop-filter: blur(6px);
}
.kicker-dot { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 0 rgb(34 197 94 / .6); animation: pulse 2.4s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgb(34 197 94 / 0); } 100% { box-shadow: 0 0 0 0 rgb(34 197 94 / 0); } }
.hero h1 { font-size: clamp(2.5rem, 1.5rem + 4.4vw, 4.8rem); margin: .35em 0 .3em; }
.gradient-text {
  background: linear-gradient(100deg, #2f6fff, #8b5cf6 45%, #e8642c 90%);
  background-size: 200% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: shine 8s ease-in-out infinite alternate;
}
@keyframes shine { to { background-position: 100% 0; } }
.hero .lede { font-size: clamp(1.1rem, 1rem + .5vw, 1.3rem); color: var(--ink-2); max-width: 52ch; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: .55em;
  min-height: 50px; padding: 0 22px; border-radius: 14px; border: 1px solid transparent;
  font: 700 1rem var(--font); text-decoration: none; cursor: pointer; overflow: hidden;
  transition: transform .25s var(--ease), box-shadow .25s, background .25s, border-color .25s, color .25s;
}
.btn-primary { background: var(--ink); color: var(--bg); box-shadow: var(--shadow); }
.btn-primary:hover { color: var(--bg); transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.btn-primary::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(110deg, transparent 30%, rgb(255 255 255 / .28) 50%, transparent 70%);
  transform: translateX(-120%); transition: transform .8s var(--ease);
}
.btn-primary:hover::after { transform: translateX(120%); }
.btn-ghost { background: color-mix(in srgb, var(--surface) 70%, transparent); color: var(--ink); border-color: var(--line); backdrop-filter: blur(6px); }
.btn-ghost:hover { color: var(--ink); border-color: var(--tone); transform: translateY(-2px); }
.btn-tone { background: var(--tone); color: #fff; box-shadow: 0 6px 20px color-mix(in srgb, var(--tone) 40%, transparent); }
.btn-tone:hover { color: #fff; transform: translateY(-2px); filter: brightness(1.06); }
.btn .icon { transition: transform .3s var(--ease); }
.btn:hover .icon { transform: translateX(3px); }
.btn[disabled] { opacity: .5; cursor: not-allowed; transform: none; }

/* Hero-illustration: skjold der tegner sig selv, data der kredser. */
.hero-art { position: relative; aspect-ratio: 1; max-width: 440px; justify-self: center; width: 100%; }
.orbit { position: absolute; inset: 0; border-radius: 50%; border: 1.5px dashed color-mix(in srgb, var(--ink) 18%, transparent); animation: spin 60s linear infinite; }
.orbit-2 { inset: 14%; animation-duration: 40s; animation-direction: reverse; }
.orbit-3 { inset: 28%; border-style: solid; border-color: color-mix(in srgb, var(--ink) 8%, transparent); animation: none; }
@keyframes spin { to { transform: rotate(1turn); } }
.orbit .chip {
  position: absolute; left: 50%; top: -18px; translate: -50% 0;
  padding: .45em .8em; border-radius: 12px; white-space: nowrap;
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow);
  font: 650 .82rem var(--font); color: var(--ink-2);
  animation: spin 60s linear infinite reverse;
}
.orbit-2 .chip { animation-duration: 40s; animation-direction: normal; }
.orbit .chip-b { top: auto; bottom: -18px; }
.orbit .chip-c { top: 50%; left: -26px; translate: 0 -50%; }
.orbit .chip-d { top: 50%; left: auto; right: -26px; translate: 0 -50%; }
.shield { position: absolute; inset: 30%; filter: drop-shadow(0 18px 40px rgb(47 111 255 / .45)); animation: bob 6s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-10px); } }
.shield-fill { fill: url(#shieldGrad); }
.shield-stroke { fill: none; stroke: #fff; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 60; stroke-dashoffset: 60; animation: draw 1.4s .6s var(--ease) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }

.section { padding: clamp(48px, 7vw, 96px) 0; }
.section-head { max-width: 62ch; margin-bottom: 32px; }
.section-head h2 { margin-top: 0; }
.section-head p { color: var(--muted); font-size: 1.1rem; }
.eyebrow-plain { font: 750 .8rem var(--font); letter-spacing: .1em; text-transform: uppercase; color: var(--accent); margin-bottom: .6em; }

.resume {
  display: flex; align-items: center; gap: 16px;
  margin-top: 28px; padding: 14px 18px; border-radius: 16px; max-width: 460px;
  background: color-mix(in srgb, var(--surface) 80%, transparent); border: 1px solid var(--line); box-shadow: var(--shadow-sm);
  backdrop-filter: blur(8px);
}
.resume > span:last-child { display: flex; flex-direction: column; }
.resume-ring {
  --p: 0; width: 46px; height: 46px; border-radius: 50%; flex: none;
  background: conic-gradient(var(--t-gdpr) calc(var(--p) * 1turn), var(--line) 0);
  mask: radial-gradient(circle, transparent 15px, #000 16px);
  -webkit-mask: radial-gradient(circle, transparent 15px, #000 16px);
}

.modules { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.module-card { margin: 0; }
.module-link {
  position: relative; display: flex; flex-direction: column; height: 100%;
  padding: 24px 22px 20px; border-radius: var(--radius); overflow: hidden; isolation: isolate;
  background: var(--surface); border: 1px solid var(--line); color: var(--ink); text-decoration: none;
  box-shadow: var(--shadow-sm);
  transition: transform .45s var(--ease), box-shadow .45s var(--ease), border-color .3s;
}
.module-link::before {
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0;
  background: radial-gradient(circle at 100% 0, color-mix(in srgb, var(--tone) 22%, transparent), transparent 60%);
  transition: opacity .45s;
}
.module-link:hover { color: var(--ink); transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: color-mix(in srgb, var(--tone) 50%, var(--line)); }
.module-link:hover::before { opacity: 1; }
.module-nr { position: absolute; right: 14px; top: -10px; font: 900 6rem/1 var(--font-display); color: color-mix(in srgb, var(--tone) 12%, transparent); z-index: -1; transition: transform .6s var(--ease); }
.module-link:hover .module-nr { transform: translateY(8px) scale(1.05); }
.module-icon {
  display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; margin-bottom: 16px;
  background: color-mix(in srgb, var(--tone) 14%, transparent); color: var(--tone);
  transition: transform .5s var(--ease-spring);
}
.module-icon .icon { width: 26px; height: 26px; }
.module-link:hover .module-icon { transform: rotate(-8deg) scale(1.1); }
.module-card h3 { margin: 0 0 .35em; font-size: 1.2rem; }
.module-card p { color: var(--muted); font-size: .97rem; margin: 0 0 18px; flex: 1; }
.is-optional .module-link { background: color-mix(in srgb, var(--surface) 60%, var(--bg)); }
.module-meta { display: flex; align-items: center; gap: 10px; font-size: .85rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.meter { flex: 1; height: 6px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.meter-fill { display: block; height: 100%; border-radius: inherit; background: var(--tone); transform-origin: 0 50%; transform: scaleX(var(--p, 0)); transition: transform 1.2s .3s var(--ease); }

.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; }
.feature { padding: 24px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.feature h3 { margin: 12px 0 .3em; font-size: 1.1rem; }
.feature p { margin: 0; color: var(--muted); font-size: .97rem; }
.feature .module-icon { margin: 0; }

/* ── Kapitelside ────────────────────────────────────────────────────────── */
.chapter-hero {
  position: relative; isolation: isolate; overflow: hidden;
  padding: clamp(48px, 8vw, 104px) var(--gutter) clamp(36px, 5vw, 64px);
  border-bottom: 1px solid var(--line);
}
.chapter-hero::before, .chapter-hero::after {
  content: ""; position: absolute; z-index: -1; border-radius: 50%; filter: blur(70px); pointer-events: none;
  animation: float 20s ease-in-out infinite alternate;
}
.chapter-hero::before { width: 52vmax; height: 52vmax; right: -18vmax; top: -30vmax; background: radial-gradient(circle, color-mix(in srgb, var(--tone) 45%, transparent), transparent 65%); }
.chapter-hero::after { width: 34vmax; height: 34vmax; left: -12vmax; bottom: -26vmax; background: radial-gradient(circle, color-mix(in srgb, var(--accent) 22%, transparent), transparent 65%); animation-delay: -8s; }
.chapter-hero > * { max-width: var(--prose); margin-inline: auto; }
.chapter-hero .lede { font-size: clamp(1.1rem, 1rem + .4vw, 1.28rem); color: var(--ink-2); margin: 0; }
.chapter-hero h1 { animation: rise .8s .05s var(--ease) both; }
.chapter-hero .lede { animation: rise .8s .15s var(--ease) both; }
.eyebrow { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0 auto 18px; animation: rise .7s var(--ease) both; }
.eyebrow a {
  display: inline-flex; align-items: center; gap: .5em; padding: .3em .8em; border-radius: 99px;
  background: color-mix(in srgb, var(--tone) 14%, transparent); color: var(--tone);
  font: 750 .82rem var(--font); letter-spacing: .04em; text-decoration: none; text-transform: uppercase;
}
.eyebrow a::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.eyebrow-meta { font-size: .88rem; color: var(--muted); }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } }

.chapter { padding-bottom: 32px; }
.prose { max-width: var(--prose); margin: 0 auto; padding: clamp(28px, 5vw, 56px) var(--gutter) 0; }
.prose > :first-child { margin-top: 0; }
.prose h2 { position: relative; }
.prose h2::before {
  content: ""; display: block; width: 44px; height: 4px; border-radius: 4px; margin-bottom: .55em;
  background: linear-gradient(90deg, var(--tone), var(--accent));
}
.prose .lead { font-size: 1.15rem; color: var(--ink-2); }

/* Elementer, der glider ind. Skjules kun, når JavaScript kører og kan vise
 * dem igen — og aldrig ved udskrift eller reduceret bevægelse. */
.js .will-reveal { opacity: 0; transform: translateY(22px); transition: opacity .8s var(--ease) var(--d, 0ms), transform .8s var(--ease) var(--d, 0ms); }
.js .will-reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .js .will-reveal { opacity: 1; transform: none; }
}

/* ── Bokse ──────────────────────────────────────────────────────────────── */
.callout {
  position: relative; margin: 2em 0; padding: 20px 22px 20px 64px;
  border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm);
}
.callout > :last-child { margin-bottom: 0; }
.callout-title { display: block; font: 750 1rem var(--font-display); margin-bottom: .4em; color: var(--ink); }
.callout::before {
  content: ""; position: absolute; left: 18px; top: 20px; width: 32px; height: 32px; border-radius: 10px;
  background-color: color-mix(in srgb, var(--tone) 16%, transparent);
  background-position: center; background-repeat: no-repeat; background-size: 18px;
}
.callout-activity { border-color: color-mix(in srgb, var(--tone) 40%, var(--line)); background: linear-gradient(135deg, color-mix(in srgb, var(--tone) 8%, var(--surface)), var(--surface) 60%); }
.callout-activity::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 18h6M10 21h4M12 3a6 6 0 0 0-3.5 10.9c.6.5 1 1.2 1 2.1h5c0-.9.4-1.6 1-2.1A6 6 0 0 0 12 3z'/%3E%3C/svg%3E"); }
.callout-note::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3l9.5 17h-19z'/%3E%3Cpath d='M12 10v4M12 17.5v.01'/%3E%3C/svg%3E"); }
.callout-more { background: var(--surface-2); box-shadow: none; border-style: dashed; }
.callout-more::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 5a2 2 0 0 1 2-2h13v16H6a2 2 0 0 0-2 2z'/%3E%3Cpath d='M4 21V5M8 7h7'/%3E%3C/svg%3E"); }
.callout-more ul { margin: 0; }

.quote {
  position: relative; margin: 2.2em 0; padding: 28px 28px 24px 30px;
  border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line);
  font: 500 1.18rem/1.55 var(--font-display); color: var(--ink);
}
.quote::before {
  content: "“"; position: absolute; left: 14px; top: -22px;
  font: 900 6rem/1 Georgia, serif; color: var(--tone); opacity: .35;
}
.quote cite { display: block; margin-top: 14px; font: 500 .92rem var(--font); font-style: normal; color: var(--muted); }
.quote cite::before { content: "— "; }

.legal {
  margin: 1.6em 0; padding: 18px 22px; border-left: 4px solid var(--tone); border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: var(--surface-2); color: var(--ink-2); font-size: .98rem;
}
.legal p:last-child { margin-bottom: 0; }
.legal-ref { display: block; font: 750 .8rem var(--font); letter-spacing: .06em; text-transform: uppercase; color: var(--tone); margin-bottom: .5em; }

.source { font-size: .9rem; color: var(--muted); font-style: italic; }

/* Kort i gitter */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; margin: 1.6em 0; padding: 0; list-style: none; }
.cards > li, .card {
  margin: 0; padding: 18px 18px 16px; border-radius: var(--radius-sm);
  background: var(--surface); border: 1px solid var(--line);
  transition: transform .35s var(--ease), box-shadow .35s, border-color .3s;
}
.cards > li:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--tone) 40%, var(--line)); }
.cards strong { display: block; font: 700 1.02rem var(--font-display); margin-bottom: .25em; }
.cards p { margin: 0; color: var(--muted); font-size: .95rem; }
.card-nr {
  display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; margin-bottom: 10px;
  background: var(--tone); color: #fff; font: 800 .9rem var(--font);
}

/* Små etiketter (fx behandlingsformer) */
.chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 1.2em 0 1.6em; }
.chips li {
  margin: 0; padding: .4em .85em; border-radius: 99px;
  background: color-mix(in srgb, var(--tone) 10%, var(--surface)); border: 1px solid color-mix(in srgb, var(--tone) 25%, var(--line));
  font-size: .93rem; font-weight: 550; color: var(--ink-2);
  transition: transform .3s var(--ease-spring), background .2s;
}
.chips li:hover { transform: translateY(-2px) scale(1.04); background: color-mix(in srgb, var(--tone) 20%, var(--surface)); }
.js .chips.will-reveal li { opacity: 0; transform: scale(.85); }
.js .chips.will-reveal.is-in li { opacity: 1; transform: none; transition: opacity .5s var(--ease), transform .5s var(--ease-spring); }
.js .chips.is-in li:nth-child(n) { transition-delay: calc(var(--n, 0) * 35ms); }

/* Fold-ud (details) */
.accordion { margin: 1.6em 0; display: grid; gap: 10px; }
details.fold {
  border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--line);
  transition: border-color .3s, box-shadow .3s;
}
details.fold[open] { border-color: color-mix(in srgb, var(--tone) 45%, var(--line)); box-shadow: var(--shadow); }
details.fold summary {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 16px 18px; cursor: pointer; list-style: none;
  font: 700 1.04rem var(--font-display); color: var(--ink);
}
details.fold summary::-webkit-details-marker { display: none; }
details.fold summary::after {
  content: ""; width: 28px; height: 28px; flex: none; border-radius: 9px;
  background: color-mix(in srgb, var(--tone) 12%, transparent)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23778' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M12 6v12M6 12h12'/%3E%3C/svg%3E") center / 16px no-repeat;
  transition: transform .35s var(--ease-spring);
}
details.fold[open] summary::after { transform: rotate(135deg); }
details.fold .fold-body { padding: 0 18px 18px; color: var(--ink-2); }
details.fold[open] .fold-body { animation: unfold .45s var(--ease) both; }
@keyframes unfold { from { opacity: 0; transform: translateY(-8px); } }
.fold-body > :last-child { margin-bottom: 0; }

/* Tidslinje */
.timeline { list-style: none; margin: 2em 0; padding: 0 0 0 28px; position: relative; }
.timeline::before { content: ""; position: absolute; left: 8px; top: 6px; bottom: 6px; width: 2px; background: linear-gradient(var(--tone), var(--accent)); border-radius: 2px; }
.timeline li { position: relative; margin: 0 0 22px; padding-left: 12px; }
.timeline li::before {
  content: ""; position: absolute; left: -27px; top: 6px; width: 16px; height: 16px; border-radius: 50%;
  background: var(--surface); border: 3px solid var(--tone);
}
.timeline time { display: block; font: 800 .85rem var(--font); letter-spacing: .06em; text-transform: uppercase; color: var(--tone); }
.timeline strong { display: block; font-family: var(--font-display); font-size: 1.05rem; }
.timeline p { margin: .2em 0 0; color: var(--muted); font-size: .96rem; }

/* Tabeller */
.table-wrap { overflow-x: auto; margin: 1.6em 0; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: .95rem; }
th, td { padding: 12px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
thead th { background: var(--surface-2); font: 700 .88rem var(--font); }
tbody tr:last-child td, tbody tr:last-child th { border-bottom: 0; }
td ul { margin: 0; }

/* ── Interaktive komponenter ────────────────────────────────────────────── */

/* Video og lyd */
.video { margin: 2em 0; }
.video-frame {
  position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden;
  background: #0b1630; box-shadow: var(--shadow);
}
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-play {
  position: absolute; inset: 0; width: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  border: 0; cursor: pointer; color: #fff; text-align: center; padding: 20px;
  background:
    radial-gradient(circle at 20% 20%, color-mix(in srgb, var(--tone) 70%, transparent), transparent 55%),
    radial-gradient(circle at 85% 80%, rgb(232 100 44 / .45), transparent 55%),
    linear-gradient(135deg, #0b1630, #182a52);
  font: 700 1.1rem var(--font-display);
}
.video-play .play-ring {
  display: grid; place-items: center; width: 74px; height: 74px; border-radius: 50%;
  background: rgb(255 255 255 / .16); border: 1px solid rgb(255 255 255 / .35); backdrop-filter: blur(6px);
  transition: transform .4s var(--ease-spring), background .3s;
  animation: ring 2.8s ease-out infinite;
}
.video-play .play-ring .icon { width: 30px; height: 30px; margin-left: 4px; }
.video-play:hover .play-ring { transform: scale(1.12); background: rgb(255 255 255 / .26); }
@keyframes ring { 0% { box-shadow: 0 0 0 0 rgb(255 255 255 / .35); } 70%, 100% { box-shadow: 0 0 0 22px rgb(255 255 255 / 0); } }
.video-badge { display: inline-flex; align-items: center; gap: .4em; padding: .3em .7em; border-radius: 99px; background: rgb(0 0 0 / .3); font: 600 .78rem var(--font); }
.video figcaption, .audio figcaption { margin-top: 10px; font-size: .95rem; color: var(--muted); }
.video figcaption a { white-space: nowrap; }

.audio {
  display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; align-items: center;
  margin: 2em 0; padding: 18px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line);
}
.audio-icon { grid-row: span 2; display: grid; place-items: center; width: 52px; height: 52px; border-radius: 16px; background: linear-gradient(135deg, var(--tone), var(--accent)); color: #fff; }
.audio-icon .icon { width: 26px; height: 26px; }
.audio figcaption { margin: 0; color: var(--ink); font-weight: 650; }
.audio audio { width: 100%; height: 40px; }

/* Øvelser (afkrydsning) */
.exercise {
  margin: 2.2em 0; padding: 24px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid color-mix(in srgb, var(--tone) 35%, var(--line)); box-shadow: var(--shadow-sm);
}
.exercise-label { font: 750 .78rem var(--font); letter-spacing: .1em; text-transform: uppercase; color: var(--tone); margin: 0 0 .4em; }
.exercise fieldset { border: 0; padding: 0; margin: 0; }
.exercise legend { font: 700 1.12rem var(--font-display); margin-bottom: .4em; padding: 0; }
.exercise .hint { color: var(--muted); font-size: .93rem; margin-bottom: 14px; }
.option {
  position: relative; display: flex; align-items: flex-start; gap: 12px; margin: 8px 0; padding: 12px 14px;
  border-radius: 12px; border: 1.5px solid var(--line); background: var(--bg); cursor: pointer;
  transition: border-color .2s, background .2s, transform .2s var(--ease);
}
.option:hover { border-color: color-mix(in srgb, var(--tone) 60%, var(--line)); transform: translateX(2px); }
.option input { appearance: none; -webkit-appearance: none; flex: none; width: 22px; height: 22px; margin: 1px 0 0; border: 2px solid var(--muted); border-radius: 6px; background: var(--surface); cursor: pointer; transition: all .2s; }
.option input[type="radio"] { border-radius: 50%; }
.option input:checked { border-color: var(--tone); background: var(--tone) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 14px no-repeat; }
.option:has(input:checked) { border-color: var(--tone); background: color-mix(in srgb, var(--tone) 7%, var(--surface)); }
.option .mark { margin-left: auto; font-weight: 800; flex: none; }
.option.is-right { border-color: var(--ok); border-style: solid; background: var(--ok-bg); }
.option.is-wrong { border-color: var(--bad); border-style: dashed; background: var(--bad-bg); }
.option.is-missed { border-color: var(--ok); border-style: dashed; }
.option.is-right .mark { color: var(--ok); }
.option.is-wrong .mark, .option.is-missed .mark { color: var(--bad); }
.option.is-missed .mark { color: var(--ok); }
.exercise-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 16px; }
.feedback { margin: 14px 0 0; padding: 14px 16px; border-radius: 12px; background: var(--surface-2); animation: rise .5s var(--ease) both; }
.feedback:empty { display: none; }
.feedback strong { display: block; }

/* Vendekort */
.flips { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; margin: 1.8em 0; padding: 0; list-style: none; }
.flips li { margin: 0; }
.flip { perspective: 1000px; display: block; width: 100%; min-height: 168px; padding: 0; border: 0; background: none; cursor: pointer; text-align: left; font: inherit; color: inherit; }
.flip-inner { position: relative; display: grid; min-height: 168px; transform-style: preserve-3d; transition: transform .7s var(--ease); }
.flip[aria-pressed="true"] .flip-inner { transform: rotateY(180deg); }
.flip-face {
  grid-area: 1 / 1; display: flex; flex-direction: column; gap: 8px; padding: 18px;
  border-radius: var(--radius-sm); backface-visibility: hidden; -webkit-backface-visibility: hidden;
  border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow-sm);
}
.flip-back { transform: rotateY(180deg); background: linear-gradient(145deg, var(--tone), color-mix(in srgb, var(--tone) 60%, var(--accent))); color: #fff; border-color: transparent; }
.flip-back strong { color: #fff; }
.flip-nr { font: 800 .8rem var(--font); color: var(--tone); letter-spacing: .06em; }
.flip-back .flip-nr { color: rgb(255 255 255 / .8); }
.flip-hint { margin-top: auto; font-size: .8rem; color: var(--muted); }
.flip-back .flip-hint { color: rgb(255 255 255 / .75); }
.flip:hover .flip-face { box-shadow: var(--shadow); }
.flip:focus-visible { outline: none; }
.flip:focus-visible .flip-face { outline: 3px solid var(--focus); outline-offset: 2px; }

/* Pyramide og trekant med lag */
.pyramid-wrap { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 24px; align-items: center; margin: 2em 0; }
.pyramid, .levels { position: relative; display: flex; flex-direction: column; aspect-ratio: 1.15; }
.pyramid { clip-path: polygon(50% 0, 100% 100%, 0 100%); width: 100%; max-width: 480px; margin-inline: auto; }
.levels { clip-path: polygon(0 0, 100% 0, 50% 100%); aspect-ratio: 1.3; max-width: 520px; margin-inline: auto; }
.layer {
  display: flex; align-items: center; justify-content: center; text-align: center;
  border: 0; margin: 0; padding: 4px 8px; cursor: pointer; color: #fff;
  font: 750 clamp(.78rem, .65rem + .5vw, 1rem) var(--font-display);
  border-bottom: 3px solid var(--bg);
  transition: filter .25s, transform .4s var(--ease);
}
.layer:last-child { border-bottom: 0; }
.layer:hover, .layer[aria-pressed="true"] { filter: brightness(1.18) saturate(1.1); }
.pyramid .layer:nth-child(1) { flex: 4.2; align-items: flex-end; padding-bottom: 10%; background: #1b2f6e; }
.pyramid .layer:nth-child(2) { flex: 1.4; background: #23408f; }
.pyramid .layer:nth-child(3) { flex: 1.4; background: #2d55b5; }
.pyramid .layer:nth-child(4) { flex: 1.8; background: #3d6fdc; }
.levels .layer { flex: 1; flex-direction: column; gap: 2px; padding-bottom: 6px; }
.levels .layer small { font: 500 .78rem var(--font); opacity: .85; }
.levels .layer:nth-child(1) { background: #1b2f6e; }
.levels .layer:nth-child(2) { background: #2d55b5; flex: 1.1; }
.levels .layer:nth-child(3) { background: #3d6fdc; flex: 1.2; align-items: center; justify-content: flex-start; padding-top: 4%; }
.levels-you { display: flex; flex-direction: column; align-items: center; margin-top: 8px; font: 800 1.1rem var(--font-display); color: var(--ink); }
.levels-you::before { content: ""; width: 40px; height: 40px; border-radius: 50%; margin-bottom: 6px; background: linear-gradient(135deg, var(--tone), var(--accent)); box-shadow: 0 0 0 6px color-mix(in srgb, var(--tone) 18%, transparent); animation: bob 4s ease-in-out infinite; }
.js .pyramid.will-reveal .layer, .js .levels.will-reveal .layer { opacity: 0; transform: translateY(30px); }
.js .pyramid.is-in .layer, .js .levels.is-in .layer { opacity: 1; transform: none; transition: opacity .6s var(--ease), transform .7s var(--ease), filter .25s; }
.js .pyramid.is-in .layer:nth-child(4), .js .levels.is-in .layer:nth-child(1) { transition-delay: .05s; }
.js .pyramid.is-in .layer:nth-child(3), .js .levels.is-in .layer:nth-child(2) { transition-delay: .2s; }
.js .pyramid.is-in .layer:nth-child(2), .js .levels.is-in .layer:nth-child(3) { transition-delay: .35s; }
.js .pyramid.is-in .layer:nth-child(1) { transition-delay: .5s; }
.layer-panel { padding: 22px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); min-height: 180px; }
.layer-panel h3 { margin-top: 0; }
.layer-panel ul { margin-bottom: 0; }
.layer-panel.is-swapping { animation: rise .45s var(--ease) both; }
.layer-hint { font-size: .9rem; color: var(--muted); }

/* Rettighedsmatrix */
.matrix td, .matrix th { text-align: center; vertical-align: middle; }
.matrix th[scope="row"] { text-align: left; white-space: nowrap; }
.matrix thead th { font-size: .8rem; line-height: 1.25; min-width: 92px; }
.cell { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; }
.cell .icon { width: 18px; height: 18px; }
.cell-yes { background: var(--ok-bg); color: var(--ok); }
.cell-no { background: var(--bad-bg); color: var(--bad); }
.cell-note { font-size: .78rem; color: var(--ink-2); line-height: 1.3; }
.js .matrix.will-reveal .cell { opacity: 0; transform: scale(.4); }
.js .matrix.is-in .cell { opacity: 1; transform: none; transition: opacity .4s, transform .5s var(--ease-spring); transition-delay: calc(var(--n, 0) * 22ms); }

/* Tjekliste (selvevaluering) */
.checklist { margin: 2em 0; padding: 22px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.check-row { display: grid; grid-template-columns: 1fr auto; gap: 10px 16px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.check-row:last-of-type { border-bottom: 0; }
.check-row > span { font-weight: 550; }
.seg { display: inline-flex; padding: 3px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.seg span { display: block; padding: .35em .8em; border-radius: 9px; font-size: .88rem; font-weight: 650; color: var(--muted); transition: background .2s, color .2s, box-shadow .2s; }
.seg input:checked + span { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }
.seg input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 1px; }
.check-row.is-good > span::after { content: " ✓"; color: var(--ok); font-weight: 800; }
.check-row.is-improve > span::after { content: " — kan forbedres"; color: var(--bad); font-weight: 650; font-size: .88rem; }

/* Ordbog */
.glossary-search { position: sticky; top: 76px; z-index: 5; display: flex; align-items: center; gap: 10px; margin: 0 0 22px; padding: 10px 16px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.glossary-search input { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--ink); font: 500 1.02rem var(--font); padding: 6px 0; }
.glossary-search input:focus { outline: none; }
.glossary-search:focus-within { border-color: var(--tone); }
.glossary dl { margin: 0; display: grid; gap: 12px; }
.term { padding: 18px 20px; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--line); transition: transform .3s var(--ease), box-shadow .3s; }
.term:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.term dt { font: 750 1.08rem var(--font-display); color: var(--tone); margin-bottom: .3em; }
.term dd { margin: 0; color: var(--ink-2); }
.term mark { background: color-mix(in srgb, var(--accent) 30%, transparent); color: inherit; border-radius: 3px; }
.glossary-empty { color: var(--muted); }

/* Trin */
.steps { counter-reset: step; list-style: none; padding: 0; margin: 1.8em 0; display: grid; gap: 14px; }
.steps > li {
  counter-increment: step; position: relative; margin: 0; padding: 20px 20px 20px 74px;
  border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line);
}
.steps > li::before {
  content: counter(step); position: absolute; left: 20px; top: 18px; display: grid; place-items: center;
  width: 38px; height: 38px; border-radius: 12px; background: linear-gradient(135deg, var(--tone), var(--accent)); color: #fff; font: 800 1.05rem var(--font);
}
.steps strong { display: block; font: 700 1.08rem var(--font-display); margin-bottom: .2em; }
.steps p { margin: 0; color: var(--muted); }

/* Linkliste */
.linklist { list-style: none; padding: 0; margin: 1.2em 0 2em; display: grid; gap: 10px; }
.linklist li { margin: 0; }
.linklist a {
  display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 14px;
  background: var(--surface); border: 1px solid var(--line); color: var(--ink); text-decoration: none;
  transition: transform .3s var(--ease), border-color .3s, box-shadow .3s;
}
.linklist a:hover { transform: translateX(4px); border-color: var(--tone); box-shadow: var(--shadow-sm); color: var(--ink); }
.linklist a > span { flex: 1; display: flex; flex-direction: column; }
.linklist small { color: var(--muted); font-size: .88rem; }
.linklist .icon { color: var(--tone); }

/* ── Quiz ───────────────────────────────────────────────────────────────── */
.quiz { max-width: 760px; margin: 0 auto; }
.quiz-intro, .quiz-card, .quiz-result {
  padding: clamp(22px, 4vw, 36px); border-radius: 24px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow);
}
.quiz-intro h2, .quiz-result h2 { margin-top: 0; }
.quiz-facts { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; padding: 0; margin: 18px 0 24px; }
.quiz-facts li { margin: 0; padding: .4em .9em; border-radius: 99px; background: var(--surface-2); font-size: .9rem; font-weight: 600; }
.quiz-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; font-size: .9rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.quiz-dots { display: flex; gap: 6px; flex-wrap: wrap; }
.quiz-dots span { width: 10px; height: 10px; border-radius: 50%; background: var(--line); transition: background .3s, transform .3s var(--ease-spring); }
.quiz-dots .is-current { background: var(--tone); transform: scale(1.3); }
.quiz-dots .is-right { background: var(--ok); }
.quiz-dots .is-wrong { background: var(--bad); border-radius: 2px; }
.quiz-card.is-entering { animation: card-in .55s var(--ease) both; }
@keyframes card-in { from { opacity: 0; transform: translateX(40px) scale(.98); } }
.quiz-q { font: 700 clamp(1.2rem, 1.05rem + .6vw, 1.5rem)/1.3 var(--font-display); margin: 0 0 6px; }
.quiz-card .hint { color: var(--muted); font-size: .93rem; margin-bottom: 14px; }
.quiz-explain { margin-top: 16px; padding: 16px 18px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface-2); animation: rise .5s var(--ease) both; }
.quiz-explain.is-right { border-color: var(--ok); background: var(--ok-bg); }
.quiz-explain.is-wrong { border-color: var(--bad); border-style: dashed; background: var(--bad-bg); }
.quiz-explain strong { display: block; margin-bottom: .2em; }
.quiz-explain p { margin: 0; color: var(--ink-2); }
.quiz-explain a { font-weight: 600; }
.quiz-result { text-align: center; }
.score-ring {
  --p: 0; position: relative; width: 170px; height: 170px; margin: 6px auto 18px; border-radius: 50%;
  background: conic-gradient(var(--ring, var(--tone)) calc(var(--p) * 1turn), var(--surface-2) 0);
  display: grid; place-items: center;
  transition: --p 1.4s var(--ease);
}
.score-ring::before { content: ""; position: absolute; inset: 14px; border-radius: 50%; background: var(--surface); }
.score-ring span { position: relative; font: 850 2.6rem var(--font-display); font-variant-numeric: tabular-nums; }
@property --p { syntax: "<number>"; inherits: true; initial-value: 0; }
.quiz-result .verdict { font: 700 1.2rem var(--font-display); }
.quiz-result .cta-row { justify-content: center; }
.review { text-align: left; margin-top: 28px; }
.review summary { cursor: pointer; font-weight: 700; }
.review ol { margin-top: 12px; }
.review li { margin-bottom: 12px; }
.review .ok { color: var(--ok); font-weight: 700; }
.review .no { color: var(--bad); font-weight: 700; }

.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 80; overflow: hidden; }
.confetti i { position: absolute; top: -12px; width: 9px; height: 14px; border-radius: 2px; animation: fall var(--t, 2.6s) var(--delay, 0s) cubic-bezier(.25, .6, .4, 1) forwards; }
@keyframes fall { to { transform: translate(var(--x, 0), 110vh) rotate(var(--r, 540deg)); opacity: .9; } }

/* Kursusbevis */
.certificate-form { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin: 18px 0 0; }
.certificate-form input { min-height: 50px; min-width: 0; flex: 1 1 240px; max-width: 360px; padding: 0 16px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--bg); color: var(--ink); font: 500 1rem var(--font); }
.certificate-form input:focus { outline: none; border-color: var(--tone); }
.certificate {
  position: relative; margin: 32px auto 0; max-width: 720px; padding: 48px 40px; text-align: center; border-radius: 20px; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-lg);
  animation: rise .8s var(--ease) both;
}
.certificate::before { content: ""; position: absolute; inset: 10px; border: 2px solid color-mix(in srgb, var(--tone) 50%, transparent); border-radius: 14px; pointer-events: none; }
.certificate .brand-mark { width: 56px; height: 56px; margin: 0 auto 18px; display: block; background-size: 32px, auto; }
.certificate h2 { margin: 0 0 .2em; }
.certificate .cert-name { font: 800 clamp(1.8rem, 1.4rem + 2vw, 2.6rem) var(--font-display); margin: .5em 0; color: var(--tone); }
.certificate p { color: var(--ink-2); }
.certificate .cert-meta { font-size: .9rem; color: var(--muted); margin-bottom: 0; }

/* ── Forrige/næste ──────────────────────────────────────────────────────── */
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; max-width: var(--prose); margin: clamp(48px, 7vw, 80px) auto 0; padding: 0 var(--gutter); }
.pager a {
  display: flex; flex-direction: column; gap: 4px; padding: 18px 20px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line); color: var(--ink); text-decoration: none;
  transition: transform .35s var(--ease), box-shadow .35s, border-color .3s;
}
.pager a:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--tone); color: var(--ink); }
.pager-next { text-align: right; align-items: flex-end; grid-column: 2; }
.pager-dir { display: inline-flex; align-items: center; gap: 6px; font-size: .85rem; color: var(--muted); font-weight: 600; }
.pager-title { font: 700 1.05rem var(--font-display); }
.pager-next .pager-title { color: var(--tone); }

/* ── Sidefod ────────────────────────────────────────────────────────────── */
.site-footer { margin-top: clamp(64px, 9vw, 120px); border-top: 1px solid var(--line); background: var(--bg-2); }
.footer-inner { max-width: var(--wrap); margin: 0 auto; padding: 36px var(--gutter) 48px; display: grid; grid-template-columns: 2fr 1fr; gap: 12px 40px; font-size: .95rem; color: var(--muted); }
.footer-inner strong { color: var(--ink); }
.footer-small { grid-column: 1 / -1; font-size: .85rem; }
.link-btn { background: none; border: 0; padding: 0; font: inherit; color: var(--brand); text-decoration: underline; text-underline-offset: .18em; cursor: pointer; }

/* ── 404 ────────────────────────────────────────────────────────────────── */
.notfound { min-height: 60vh; display: grid; place-items: center; text-align: center; padding: 48px var(--gutter); }
.notfound .big { font: 900 clamp(5rem, 3rem + 10vw, 10rem)/1 var(--font-display); }

/* ── Smal skærm ─────────────────────────────────────────────────────────── */
@media (max-width: 860px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-art { max-width: 320px; order: -1; }
  .pyramid-wrap { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  body { font-size: 1rem; }
  .menu-btn span { display: none; }
  .menu-btn { padding: 0; width: 42px; }
  .brand-sub { display: none; }
  .callout { padding: 64px 18px 18px; }
  .callout::before { top: 18px; }
  .pager { grid-template-columns: 1fr; }
  .pager-next { grid-column: 1; }
  .check-row { grid-template-columns: 1fr; }
  .steps > li { padding: 70px 18px 18px; }
  .orbit .chip-c, .orbit .chip-d { display: none; }
  .certificate { padding: 36px 20px; }
}

/* ── Udskrift ───────────────────────────────────────────────────────────── */
@media print {
  .topbar, .site-footer, .pager, .hero-bg, .chapter-hero::before, .chapter-hero::after, .skip, .no-print { display: none !important; }
  body { background: #fff; color: #000; }
  .will-reveal { opacity: 1 !important; transform: none !important; }
  .certificate { box-shadow: none; border: 2px solid #000; break-inside: avoid; animation: none; }
  /* Når kursusbeviset udskrives, er det det eneste på papiret. */
  .printing-cert body * { visibility: hidden; }
  .printing-cert .certificate, .printing-cert .certificate * { visibility: visible; }
  .printing-cert .certificate { position: absolute; left: 0; right: 0; top: 0; margin: 0 auto; }
}

.notfound .cta-row { justify-content: center; }
.prose .quiz h2::before { display: none; }
