/* Cleantech Safety System – app
   Layout: navy topbar, indhold i én kolonne (maks 680px), fast fanebjælke i bunden.
   Farver fra designmanualen: Navy #1B2B47, Safety Gold #F5C518, Anthracite #2B2B2D,
   Anthracite Light #E5E5E7, Success Green #1E8A4A, Emergency Red #D93025. */

@font-face { font-family: 'Anton'; font-style: normal; font-weight: 400; font-display: swap; src: url('../fonts/anton-400.woff2') format('woff2'); }
@font-face { font-family: 'Barlow'; font-style: normal; font-weight: 400; font-display: swap; src: url('../fonts/barlow-400.woff2') format('woff2'); }
@font-face { font-family: 'Barlow'; font-style: normal; font-weight: 500; font-display: swap; src: url('../fonts/barlow-500.woff2') format('woff2'); }
@font-face { font-family: 'Barlow'; font-style: italic; font-weight: 500; font-display: swap; src: url('../fonts/barlow-500-italic.woff2') format('woff2'); }
@font-face { font-family: 'Barlow'; font-style: normal; font-weight: 600; font-display: swap; src: url('../fonts/barlow-600.woff2') format('woff2'); }
@font-face { font-family: 'Barlow'; font-style: normal; font-weight: 700; font-display: swap; src: url('../fonts/barlow-700.woff2') format('woff2'); }

:root {
  --navy: #1B2B47;
  --navy-deep: #13203A;
  --gold: #F5C518;
  --white: #FFFFFF;
  --anth: #2B2B2D;
  --anth-l: #E5E5E7;
  --green: #1E8A4A;
  --red: #D93025;

  --bg: #F2F2F3;
  --surface: #FFFFFF;
  --box: #E5E5E7;
  --text: #2B2B2D;
  --heading: #1B2B47;
  --muted: #5B5D64;
  --line: #DCDCE0;
  --link: #1B2B47;
  --step-bg: #1B2B47;
  --fact: #1B2B47;
  --nav-bg: #FFFFFF;
  --nav-active: #1B2B47;
  --nav-pill: #E5E5E7;
  --gold-tint: rgba(245, 197, 24, 0.18);
  --red-tint: rgba(217, 48, 37, 0.08);
  --green-tint: rgba(30, 138, 74, 0.10);
  --shadow: 0 1px 2px rgba(27, 43, 71, 0.06), 0 4px 14px rgba(27, 43, 71, 0.06);
  --card-border: transparent;

  --font-display: 'Anton', Impact, 'Arial Narrow', sans-serif;
  --font-body: 'Barlow', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --radius: 16px;
  --radius-sm: 12px;
  --tabbar-h: 64px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0E1729;
    --surface: #172440;
    --box: #22365A;
    --text: #E5E5E7;
    --heading: #FFFFFF;
    --muted: #A9B3C4;
    --line: #2B3E62;
    --link: #F5C518;
    --step-bg: #2A416B;
    --fact: #F5C518;
    --nav-bg: #13203A;
    --nav-active: #F5C518;
    --nav-pill: #22365A;
    --gold-tint: rgba(245, 197, 24, 0.14);
    --red-tint: rgba(217, 48, 37, 0.16);
    --green-tint: rgba(30, 138, 74, 0.20);
    --shadow: none;
    --card-border: #22365A;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0E1729;
  --surface: #172440;
  --box: #22365A;
  --text: #E5E5E7;
  --heading: #FFFFFF;
  --muted: #A9B3C4;
  --line: #2B3E62;
  --link: #F5C518;
  --step-bg: #2A416B;
  --fact: #F5C518;
  --nav-bg: #13203A;
  --nav-active: #F5C518;
  --nav-pill: #22365A;
  --gold-tint: rgba(245, 197, 24, 0.14);
  --red-tint: rgba(217, 48, 37, 0.16);
  --green-tint: rgba(30, 138, 74, 0.20);
  --shadow: none;
  --card-border: #22365A;
  color-scheme: dark;
}

html.stor-tekst { font-size: 112.5%; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
html.sheet-open, html.sheet-open body { overflow: hidden; }
img { max-width: 100%; display: block; }
a { color: inherit; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; touch-action: manipulation; }
a, button { touch-action: manipulation; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 6px; }
[tabindex="-1"]:focus, [tabindex="-1"]:focus-visible { outline: none; }
[hidden] { display: none !important; }
.ic { width: 1.25em; height: 1.25em; flex: none; display: inline-block; vertical-align: middle; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Topbar ---------- */
.topbar {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 30;
  background: var(--navy);
  color: var(--white);
  border-bottom: 2px solid var(--gold);
}
.topbar-inner {
  max-width: 720px;
  margin: 0 auto;
  height: 58px;
  padding-inline: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand { display: flex; align-items: center; min-width: 0; flex: 1; text-decoration: none; }
.brand img { height: 30px; width: auto; }
.topbar-actions { display: flex; align-items: center; gap: 8px; }
.akut-btn {
  display: inline-flex; align-items: center; gap: 6px;
  height: 36px; padding: 0 12px;
  border-radius: 999px;
  background: var(--red); color: var(--white);
  font-weight: 700; font-size: 0.875rem; letter-spacing: 0.06em; text-transform: uppercase;
  text-decoration: none;
}
.akut-btn .ic { width: 18px; height: 18px; }
.icon-btn {
  display: inline-grid; place-items: center;
  width: 40px; height: 40px; border-radius: 12px;
  color: var(--white); text-decoration: none; background: transparent; border: 0;
}
.icon-btn .ic { width: 22px; height: 22px; }
.draft {
  background: var(--gold); color: var(--navy);
  font-size: 0.8125rem; font-weight: 700; text-align: center;
  padding: 4px 16px; letter-spacing: 0.02em;
}

/* ---------- Main ---------- */
main {
  max-width: 720px;
  margin: 0 auto;
  padding-inline: 16px;
  padding-block: 20px calc(var(--tabbar-h) + env(safe-area-inset-bottom, 0px) + 28px);
  min-height: 60vh;
  outline: none;
}
.stack { display: flex; flex-direction: column; gap: 14px; }
.stack-lg { display: flex; flex-direction: column; gap: 22px; }
.page-title {
  font-family: var(--font-display);
  font-weight: 400;
  text-transform: uppercase;
  color: var(--heading);
  font-size: 2.125rem;
  line-height: 1.12;
  letter-spacing: 0.01em;
  margin: 0;
  text-wrap: balance;
}
.page-lead { font-size: 1.1875rem; font-weight: 500; margin: 6px 0 0; color: var(--text); }
.eyebrow {
  font-size: 0.8125rem; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase;
  color: var(--muted); margin: 0 0 6px;
}
.section-label {
  font-size: 0.8125rem; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase;
  color: var(--muted); margin: 10px 2px 2px;
}
.back {
  display: inline-flex; align-items: center; gap: 4px;
  color: var(--muted); font-weight: 600; font-size: 0.9375rem; text-decoration: none;
  margin: -4px 0 10px -4px; padding: 4px;
}
.back .ic { width: 18px; height: 18px; }
.muted { color: var(--muted); }
.small { font-size: 0.875rem; }

/* ---------- Cards and rows ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
}
.card h2, .card h3 { margin: 0; }
.card-title { font-weight: 700; font-size: 1.1875rem; color: var(--heading); line-height: 1.25; margin: 0; }
.card-kicker { display: flex; align-items: center; gap: 8px; font-size: 0.8125rem; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase; color: var(--muted); margin: 0 0 8px; }
.card-kicker .ic { width: 18px; height: 18px; color: var(--heading); }
.card p { margin: 6px 0 0; }
.card .actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }

.list { background: var(--surface); border: 1px solid var(--card-border); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.row {
  display: grid; grid-template-columns: 40px 1fr auto; align-items: center; gap: 12px;
  padding: 14px 14px 14px 16px; text-decoration: none; color: var(--text);
  border-bottom: 1px solid var(--line);
  min-height: 64px;
}
.row:last-child { border-bottom: 0; }
.row .row-ic {
  width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center;
  background: var(--box); color: var(--heading);
}
.row .row-ic .ic { width: 22px; height: 22px; }
.row .row-body { min-width: 0; }
.row .row-title { display: block; font-weight: 700; color: var(--heading); line-height: 1.25; }
.row .row-sub { display: block; font-size: 0.9375rem; color: var(--muted); line-height: 1.35; margin-top: 2px; }
.row .row-end { color: var(--muted); display: flex; align-items: center; gap: 6px; font-size: 0.875rem; font-weight: 600; white-space: nowrap; }
.row .row-end .ic { width: 20px; height: 20px; }
.row.akut .row-ic { background: var(--red-tint); color: var(--red); }
.row.done .row-ic { background: var(--green-tint); color: var(--green); }
.row.locked { opacity: 0.6; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 18px;
  border-radius: var(--radius-sm); border: 0;
  font-weight: 700; font-size: 1rem; letter-spacing: 0.02em;
  text-decoration: none; cursor: pointer;
}
.btn .ic { width: 20px; height: 20px; }
.btn-gold { background: var(--gold); color: var(--navy); }
.btn-navy { background: var(--navy); color: var(--white); }
.btn-ghost { background: transparent; color: var(--heading); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn-red { background: var(--red); color: var(--white); }
.btn-block { width: 100%; }
.btn[disabled] { opacity: 0.45; cursor: default; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; }
.btn-row > .btn { flex: 1 1 140px; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--link); font-weight: 700; text-decoration: underline; text-decoration-color: var(--gold); text-decoration-thickness: 2px; text-underline-offset: 3px; }

/* ---------- Home ---------- */
.hero {
  background: var(--navy);
  color: var(--white);
  margin: -20px -16px 0;
  padding: 26px 20px 26px;
}
.hero-title {
  font-family: var(--font-display); font-weight: 400; text-transform: uppercase;
  font-size: clamp(3.25rem, 16vw, 4.5rem); line-height: 0.98; margin: 0; letter-spacing: 0.01em;
}
.hero-title .gold { color: var(--gold); display: block; }
.hero-sub { margin: 14px 0 0; font-size: 1.125rem; font-weight: 500; }
.hero-sub .gold { color: var(--gold); }
.hero-greet { margin: 0 0 10px; color: var(--anth-l); font-weight: 600; }
.hero .btn-row { margin-top: 20px; }
.hero .btn-ghost { color: var(--white); box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.45); }

.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
.stat { background: var(--box); border-radius: 12px; padding: 10px 12px; }
.stat b { display: block; font-family: var(--font-display); font-weight: 400; font-size: 1.75rem; line-height: 1.1; color: var(--fact); font-variant-numeric: tabular-nums; }
.stat span { font-size: 0.8125rem; color: var(--muted); font-weight: 600; line-height: 1.25; display: block; }

.fact-card { position: relative; }
.fact-card p:not(.card-kicker) { font-size: 1.125rem; font-weight: 600; color: var(--heading); }

.aftale-list { margin: 8px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; }
.aftale-list li { display: flex; gap: 8px; align-items: flex-start; font-weight: 600; }
.aftale-list li .ic { color: var(--green); margin-top: 2px; }

.mantra {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px;
  margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--line);
}
.mantra div { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; }
.mantra img { width: 34px; height: 34px; object-fit: contain; }
.mantra span { font-size: 0.8125rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; line-height: 1.25; color: var(--heading); }
.mantra span em { font-style: normal; color: var(--muted); display: block; }

/* ---------- Search ---------- */
.search {
  display: flex; align-items: center; gap: 10px;
  background: var(--surface); border: 1.5px solid var(--line); border-radius: 14px;
  padding: 0 14px; min-height: 52px;
}
.search:focus-within { border-color: var(--gold); }
.search .ic { color: var(--muted); }
.search input { flex: 1; min-width: 0; border: 0; background: transparent; outline: none; font-size: 1.0625rem; padding: 12px 0; }
.search input::placeholder { color: var(--muted); }
.search input::-webkit-search-cancel-button, .search input::-webkit-search-decoration { -webkit-appearance: none; appearance: none; display: none; }
.search-clear { flex: none; display: grid; place-items: center; width: 34px; height: 34px; margin-right: -6px; border: 0; border-radius: 50%; background: var(--box); color: var(--heading); }
.search-clear .ic { color: inherit; width: 18px; height: 18px; }
.search-empty { padding: 18px; color: var(--muted); }
mark { background: var(--gold-tint); color: inherit; border-radius: 3px; padding: 0 2px; }

/* ---------- Article ---------- */
.article-head { margin-bottom: 4px; }
.article-logo { background: #FFFFFF; border-radius: 14px; padding: 14px 16px; margin: 14px 0 4px; }
.article-logo img { width: 100%; max-width: 360px; height: auto; margin: 0 auto; }
.prose { display: flex; flex-direction: column; gap: 14px; }
.prose p { margin: 0; }
.prose strong { color: var(--heading); }
.b-h { font-size: 1.1875rem; font-weight: 700; color: var(--heading); margin: 10px 0 -4px; line-height: 1.3; }
.ilink { color: var(--link); font-weight: 600; text-decoration: underline; text-decoration-color: var(--gold); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.b-list { margin: 0; padding: 0 0 0 1.2em; display: flex; flex-direction: column; gap: 6px; }
.b-list li::marker { color: var(--gold); }
.b-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.b-steps li { display: grid; grid-template-columns: 34px 1fr; gap: 12px; align-items: start; }
.b-steps .num {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--step-bg); color: var(--gold);
  font-family: var(--font-display); font-size: 1.125rem; line-height: 1;
  display: grid; place-items: center;
}
.b-steps li > div { padding-top: 4px; min-width: 0; }
.b-promise { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.b-promise li { display: flex; align-items: center; gap: 12px; font-weight: 700; font-size: 1.3125rem; color: var(--heading); line-height: 1.25; }
.b-promise li .ic { color: var(--gold); width: 28px; height: 28px; stroke-width: 2.5; }
.b-rule {
  border: 2px solid var(--gold);
  background: var(--gold-tint);
  border-radius: 14px;
  padding: 14px 16px;
  display: flex; flex-direction: column; gap: 8px;
}
.rule-tag {
  align-self: flex-start;
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--gold); color: var(--navy);
  border-radius: 999px; padding: 3px 10px 3px 8px;
  font-size: 0.75rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
}
.rule-tag .ic { width: 15px; height: 15px; }
.b-rule p { font-weight: 600; color: var(--heading); }
.b-rule .rule-basis { font-weight: 400; font-size: 0.875rem; color: var(--muted); }
.b-fact { border-radius: 14px; background: var(--box); padding: 14px 16px; }
.fact-num { font-family: var(--font-display); font-size: 2.5rem; line-height: 1.05; color: var(--fact); font-variant-numeric: tabular-nums; }
.b-fact p { font-weight: 600; margin-top: 4px; }
.src { font-size: 0.8125rem; color: var(--muted); margin-top: 6px; display: block; }
.b-quote {
  margin: 0; background: var(--navy); color: var(--white);
  border-radius: 14px; padding: 16px 18px; display: flex; gap: 12px; align-items: flex-start;
}
.b-quote .ic { color: var(--gold); width: 26px; height: 26px; flex: none; }
.b-quote p { font-size: 1.1875rem; font-weight: 600; line-height: 1.4; }
.b-note { display: flex; gap: 10px; align-items: flex-start; background: var(--box); border-radius: 14px; padding: 12px 14px; }
.b-note .ic { color: var(--muted); margin-top: 3px; }
.b-akut {
  display: flex; gap: 12px; align-items: flex-start;
  border: 2px solid var(--red); background: var(--red-tint);
  border-radius: 14px; padding: 14px 16px;
}
.b-akut .ic { color: var(--red); width: 24px; height: 24px; margin-top: 1px; }
.b-akut p { font-weight: 700; color: var(--heading); }
.b-say { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.b-say li { display: flex; gap: 12px; align-items: center; background: var(--box); border-radius: 14px; padding: 14px 16px; font-weight: 700; font-size: 1.0625rem; color: var(--heading); }
.b-say li .ic { color: var(--heading); width: 24px; height: 24px; }
.b-table { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: 12px; border: 1px solid var(--line); }
.b-table table { border-collapse: collapse; width: 100%; font-size: 0.9375rem; background: var(--surface); }
.b-table th { text-align: left; font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); padding: 10px 12px; background: var(--box); white-space: nowrap; }
.b-table td { padding: 10px 12px; border-top: 1px solid var(--line); vertical-align: top; line-height: 1.4; }
.b-table td:first-child { font-weight: 700; color: var(--heading); }
.b-links { display: flex; flex-direction: column; gap: 0; }

.sc { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.sc li { display: grid; grid-template-columns: 46px 1fr 28px; gap: 14px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.sc li:last-child { border-bottom: 0; }
.sc-num {
  width: 46px; height: 46px; border-radius: 50%;
  background: var(--step-bg); color: var(--gold);
  font-family: var(--font-display); font-size: 1.625rem; line-height: 1;
  display: grid; place-items: center;
}
.sc li.groen .sc-num { background: var(--green); color: var(--white); }
.sc-title { font-family: var(--font-display); text-transform: uppercase; font-size: 1.3125rem; line-height: 1.12; color: var(--heading); margin: 0; letter-spacing: 0.01em; }
.sc-text { margin: 3px 0 0; font-size: 0.9375rem; color: var(--muted); font-weight: 500; line-height: 1.35; }
.sc li > .ic { color: var(--heading); width: 26px; height: 26px; }
.sc li.groen > .ic { color: var(--green); }
.sc-banner {
  margin-top: 6px; background: var(--navy); color: var(--white); border-radius: 14px;
  padding: 14px 16px; display: flex; gap: 14px; align-items: center;
}
.sc-banner img { width: 46px; height: auto; flex: none; }
.sc-banner b { display: block; font-family: var(--font-display); font-weight: 400; text-transform: uppercase; font-size: 1.25rem; line-height: 1.15; letter-spacing: 0.01em; }
.sc-banner b .gold { color: var(--gold); }
.sc-banner span { display: block; font-size: 0.8125rem; margin-top: 4px; color: var(--anth-l); }

.pikto { display: grid; grid-template-columns: repeat(auto-fill, minmax(142px, 1fr)); gap: 10px; }
.pikto figure { margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; }
.pikto img { width: 76px; height: 76px; }
.pikto b { color: var(--heading); font-size: 0.9375rem; line-height: 1.25; }
.pikto span { font-size: 0.8125rem; color: var(--muted); line-height: 1.3; }

.noed { display: grid; grid-template-columns: 1fr; gap: 10px; }
.noed a {
  display: flex; align-items: center; gap: 14px;
  border-radius: 14px; padding: 14px 16px; text-decoration: none;
}
.noed a .ic { width: 28px; height: 28px; }
.noed a b { display: block; font-size: 1.25rem; line-height: 1.2; }
.noed a span { display: block; font-size: 0.875rem; opacity: 0.85; }
.noed .n112 { background: var(--red); color: var(--white); }
.noed .ngift { background: var(--navy); color: var(--white); }

.sources { border-top: 1px solid var(--line); padding-top: 14px; margin-top: 8px; }
.sources summary { cursor: pointer; font-weight: 700; color: var(--heading); list-style: none; display: flex; align-items: center; gap: 8px; min-height: 44px; }
.sources summary::-webkit-details-marker { display: none; }
.sources summary .ic { transition: transform 0.2s; color: var(--muted); }
.sources[open] summary .ic { transform: rotate(90deg); }
.sources ol { margin: 6px 0 0; padding-left: 1.3em; display: flex; flex-direction: column; gap: 8px; font-size: 0.875rem; color: var(--muted); }
.sources a { color: var(--link); word-break: break-word; }
.kildegruppe h4 { margin: 14px 0 6px; font-size: 0.8125rem; letter-spacing: 0.09em; text-transform: uppercase; color: var(--muted); }
.kildegruppe ul { margin: 0; padding-left: 1.1em; display: flex; flex-direction: column; gap: 8px; font-size: 0.9375rem; }
.kildegruppe a { color: var(--link); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 12px; border-radius: 999px; background: var(--box); color: var(--heading);
  font-weight: 600; font-size: 0.9375rem; text-decoration: none; border: 0;
}
.chip .ic { width: 16px; height: 16px; }
.updated { font-size: 0.8125rem; color: var(--muted); }

/* ---------- Training ---------- */
.progress { height: 6px; background: var(--box); border-radius: 3px; overflow: hidden; }
.progress > i { display: block; height: 100%; background: var(--gold); border-radius: 3px; }
.module-card { display: grid; grid-template-columns: 56px 1fr; gap: 14px; text-decoration: none; color: inherit; align-items: start; }
.module-num { font-family: var(--font-display); font-size: 2.75rem; line-height: 1; color: var(--fact); text-align: center; }
.module-card .card-title { font-family: var(--font-display); font-weight: 400; text-transform: uppercase; font-size: 1.375rem; line-height: 1.12; letter-spacing: 0.01em; }
.module-card .meta { display: flex; align-items: center; gap: 10px; margin-top: 10px; font-size: 0.875rem; color: var(--muted); font-weight: 600; }
.module-card .meta .progress { flex: 1; }
.module-card.complete .module-num { color: var(--green); }
.triad { display: grid; grid-template-columns: 1fr; gap: 8px; }
.triad div { background: var(--box); border-radius: 12px; padding: 10px 14px; }
.triad b { display: block; font-size: 0.75rem; letter-spacing: 0.09em; text-transform: uppercase; color: var(--muted); }
.triad span { font-weight: 600; color: var(--heading); }

.player-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.player-head .icon-btn { color: var(--heading); width: 40px; height: 40px; flex: none; background: var(--box); }
.player-head .player-title { flex: 1; min-width: 0; font-weight: 700; color: var(--heading); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player-head .count { font-size: 0.875rem; color: var(--muted); font-weight: 700; font-variant-numeric: tabular-nums; }
.segments { display: flex; gap: 4px; margin-bottom: 18px; }
.segments i { flex: 1; height: 5px; border-radius: 3px; background: var(--box); }
.segments i.on { background: var(--gold); }
.lesson-card { min-height: 46vh; }
.lesson-title { font-family: var(--font-display); font-weight: 400; text-transform: uppercase; font-size: 1.875rem; line-height: 1.12; color: var(--heading); margin: 0 0 14px; letter-spacing: 0.01em; text-wrap: balance; }
.player-nav { display: flex; gap: 10px; margin-top: 22px; }
.player-nav .btn { flex: 1; }

.timer { display: flex; flex-direction: column; align-items: center; gap: 14px; margin: 18px 0; }
.timer-ring { position: relative; width: 168px; height: 168px; }
.timer-ring svg { width: 168px; height: 168px; transform: rotate(-90deg); }
.timer-ring circle { fill: none; stroke-width: 10; }
.timer-ring .track { stroke: var(--box); }
.timer-ring .prog { stroke: var(--gold); stroke-linecap: round; transition: stroke-dashoffset 1s linear; }
.timer-ring .t { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--font-display); font-size: 3rem; color: var(--heading); font-variant-numeric: tabular-nums; }
.instruction { font-size: 1.375rem; font-weight: 700; color: var(--heading); line-height: 1.3; margin: 0; }
.safety-note { display: flex; gap: 8px; align-items: center; color: var(--muted); font-size: 0.9375rem; }
.after { font-size: 1.125rem; font-weight: 600; color: var(--heading); }
.reveal { animation: fadeUp 0.35s ease both; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.textarea {
  width: 100%; min-height: 120px; resize: vertical;
  background: var(--surface); border: 1.5px solid var(--line); border-radius: 14px;
  padding: 12px 14px; font-size: 1.0625rem; line-height: 1.45;
}
.textarea:focus { outline: none; border-color: var(--gold); }
.privacy { display: flex; gap: 6px; align-items: center; font-size: 0.8125rem; color: var(--muted); margin-top: 8px; }
.privacy .ic { width: 16px; height: 16px; }
.question { font-size: 1.3125rem; font-weight: 700; color: var(--heading); line-height: 1.3; margin: 0 0 16px; text-wrap: pretty; }

.toggles { display: flex; flex-direction: column; gap: 10px; }
.toggle {
  display: flex; align-items: flex-start; gap: 12px; width: 100%; text-align: left;
  padding: 14px 16px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--surface);
  font-weight: 600; font-size: 1rem; line-height: 1.35; color: var(--text);
}
.toggle .box { flex: none; width: 24px; height: 24px; border-radius: 7px; border: 2px solid var(--line); display: grid; place-items: center; margin-top: 1px; }
.toggle .box .ic { width: 16px; height: 16px; opacity: 0; }
.toggle[aria-pressed="true"] { border-color: var(--heading); }
.toggle[aria-pressed="true"] .box { background: var(--heading); border-color: var(--heading); color: var(--surface); }
.toggle[aria-pressed="true"] .box .ic { opacity: 1; }
.toggle .res { display: block; font-weight: 500; font-size: 0.9375rem; margin-top: 6px; color: var(--muted); }
.toggle .res b { font-weight: 700; }
.toggle.r-hit { border-color: var(--green); background: var(--green-tint); }
.toggle.r-miss { border-color: var(--red); background: var(--red-tint); }
.toggle.r-false { border-style: dashed; }
.res-hit { color: var(--green); }
.res-miss { color: var(--red); }

.scenario { background: var(--box); border-radius: 14px; padding: 14px 16px; font-weight: 600; color: var(--heading); margin: 0 0 16px; line-height: 1.45; }
.case-step { border-radius: 14px; background: var(--surface); border: 1px solid var(--line); padding: 14px 16px; }
.case-step b { display: block; font-family: var(--font-display); font-weight: 400; text-transform: uppercase; font-size: 1.25rem; color: var(--heading); letter-spacing: 0.02em; }
.case-step b span { color: var(--muted); margin-right: 6px; }
.case-step p { margin: 4px 0 0; }

.opts { display: flex; flex-direction: column; gap: 10px; }
.opt {
  display: flex; gap: 12px; align-items: flex-start; width: 100%; text-align: left;
  padding: 14px 16px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--surface);
  font-weight: 500; font-size: 1.0625rem; line-height: 1.35; color: var(--text);
}
.opt .letter { flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--box); color: var(--heading); font-weight: 700; font-size: 0.875rem; display: grid; place-items: center; margin-top: -1px; }
.opt.correct { border-color: var(--green); background: var(--green-tint); }
.opt.correct .letter { background: var(--green); color: var(--white); }
.opt.wrong { border-color: var(--red); background: var(--red-tint); }
.opt.wrong .letter { background: var(--red); color: var(--white); }
.opt.dim { opacity: 0.55; }
.opt[disabled] { cursor: default; }
.opt.chosen-best { border-color: var(--gold); background: var(--gold-tint); }
.fb { margin-top: 14px; border-radius: 14px; background: var(--box); padding: 14px 16px; }
.fb .fb-title { font-weight: 700; display: flex; align-items: center; gap: 8px; }
.fb .fb-title.ok { color: var(--green); }
.fb .fb-title.no { color: var(--red); }
.fb p { margin: 6px 0 0; }
.fb .more { margin-top: 10px; display: inline-flex; }
.best-tag { display: inline-flex; align-items: center; gap: 6px; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; background: var(--gold); color: var(--navy); border-radius: 999px; padding: 3px 10px; margin-bottom: 8px; }

/* ---------- Quiz ---------- */
.quiz-hero { background: var(--navy); color: var(--white); border-radius: var(--radius); padding: 18px; }
.quiz-hero .card-kicker { color: var(--gold); }
.quiz-hero .card-kicker .ic { color: var(--gold); }
.quiz-hero h2 { font-family: var(--font-display); font-weight: 400; text-transform: uppercase; font-size: 1.875rem; line-height: 1.12; margin: 0; letter-spacing: 0.01em; }
.quiz-hero p { margin: 8px 0 0; color: var(--anth-l); }
.quiz-hero .btn-row { margin-top: 16px; }
.score { font-family: var(--font-display); font-size: 4.5rem; line-height: 1; color: var(--fact); font-variant-numeric: tabular-nums; }
.score small { font-size: 1.75rem; color: var(--muted); }
.result-msg { font-size: 1.25rem; font-weight: 700; color: var(--heading); margin: 6px 0 0; }
.qline { display: grid; grid-template-columns: 24px 1fr; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); }
.qline .ic { margin-top: 2px; }
.qline .ok { color: var(--green); }
.qline .no { color: var(--red); }
.qline p { margin: 0; font-weight: 600; color: var(--heading); }
.qline a { font-size: 0.9375rem; }
.lock-note { display: flex; align-items: center; gap: 6px; }

.badges { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 12px; }
.badge { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; min-width: 0; }
.badge .disc {
  width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center;
  background: var(--box); color: var(--muted); border: 2px dashed var(--line);
}
.badge .disc .ic { width: 28px; height: 28px; }
.badge.earned .disc { background: var(--gold); color: var(--navy); border: 2px solid var(--gold); }
.badge span { font-size: 0.8125rem; font-weight: 600; line-height: 1.25; color: var(--heading); max-width: 100%; overflow-wrap: anywhere; -webkit-hyphens: auto; hyphens: auto; }
.badge small { font-size: 0.75rem; color: var(--muted); }

/* ---------- Tabbar ---------- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  background: var(--nav-bg);
  border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.tabbar-inner { max-width: 720px; margin: 0 auto; display: grid; grid-template-columns: repeat(4, 1fr); height: var(--tabbar-h); }
.tab {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  text-decoration: none; color: var(--muted); font-size: 0.75rem; font-weight: 600; letter-spacing: 0.02em;
}
.tab .pill { display: grid; place-items: center; width: 56px; height: 30px; border-radius: 999px; }
.tab .ic { width: 22px; height: 22px; }
.tab[aria-current="page"] { color: var(--nav-active); font-weight: 700; }
.tab[aria-current="page"] .pill { background: var(--nav-pill); }

/* ---------- Sheet ---------- */
.sheet { position: fixed; inset: 0; z-index: 50; display: flex; align-items: flex-end; justify-content: center; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(10, 17, 30, 0.55); }
.sheet-panel {
  position: relative; width: 100%; max-width: 720px; max-height: 92vh; overflow-y: auto; -webkit-overflow-scrolling: touch;
  background: var(--bg); border-radius: 20px 20px 0 0;
  padding: 0 16px calc(24px + env(safe-area-inset-bottom, 0px));
  animation: sheetUp 0.25s ease both;
}
@keyframes sheetUp { from { transform: translateY(24px); opacity: 0.6; } to { transform: none; opacity: 1; } }
.sheet-bar {
  position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: 10px;
  padding: 14px 0 12px; background: var(--bg);
}
.sheet-bar h2 { flex: 1; margin: 0; font-family: var(--font-display); font-weight: 400; text-transform: uppercase; font-size: 1.5rem; line-height: 1.12; color: var(--heading); letter-spacing: 0.01em; }
.sheet-bar .icon-btn { color: var(--heading); background: var(--box); }
.sheet.akut .sheet-bar h2 { color: var(--red); }
.sheet-content { display: flex; flex-direction: column; gap: 14px; }

.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-weight: 700; color: var(--heading); }
.input {
  min-height: 48px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--surface);
  padding: 0 14px; font-size: 1.0625rem;
}
.input:focus { outline: none; border-color: var(--gold); }
.seg { display: flex; background: var(--box); border-radius: 12px; padding: 4px; gap: 4px; }
.seg button { flex: 1; min-height: 40px; border-radius: 9px; border: 0; background: transparent; font-weight: 600; color: var(--muted); }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--heading); box-shadow: var(--shadow); }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.switch { position: relative; width: 52px; height: 32px; border-radius: 999px; background: var(--line); border: 0; flex: none; }
.switch::after { content: ''; position: absolute; top: 4px; left: 4px; width: 24px; height: 24px; border-radius: 50%; background: var(--white); transition: transform 0.2s; box-shadow: 0 1px 3px rgba(0,0,0,.25); }
.switch[aria-pressed="true"] { background: var(--green); }
.switch[aria-pressed="true"]::after { transform: translateX(20px); }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 0; right: 0; margin: 0 auto;
  bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom, 0px) + 14px);
  z-index: 60; width: min(92vw, 520px);
  background: var(--navy); color: var(--white); border-radius: 14px; padding: 12px 14px;
  display: flex; align-items: center; gap: 12px; box-shadow: 0 8px 28px rgba(0,0,0,.25);
  animation: fadeUp 0.25s ease both;
}
.toast p { margin: 0; flex: 1; font-weight: 600; font-size: 0.9375rem; }
.toast .btn { min-height: 38px; padding: 0 12px; font-size: 0.875rem; }

.loading { display: grid; place-items: center; min-height: 50vh; color: var(--muted); font-weight: 600; }

@media (min-width: 560px) {
  .triad { grid-template-columns: repeat(3, 1fr); }
  .noed { grid-template-columns: 1fr 1fr; }
  .sheet { align-items: center; }
  .sheet-panel { border-radius: 20px; max-height: 86vh; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

/* Varemærketegn i store overskrifter */
.tm { font-family: var(--font-body); font-size: 0.32em; font-weight: 700; vertical-align: 1.6em; line-height: 0; margin-left: 0.08em; letter-spacing: 0; }
