/* Teoribogens særlige indholdselementer: kontrollamperne (<lamper>) og
 * opgavekortene (<opgaver>), som bin/teoribog-byg.php skriver.
 *
 * Står for sig selv ved siden af teoribog-indhold.css, så læserens og
 * indholdets stil kan ændres uden at røre disse to, og omvendt. Alt står
 * under .tb-indhold og bruger kundens farver og skrift (--fs-*), så det
 * passer hos alle kunder og i mørk tilstand.
 *
 * Roligt og luftigt: bløde flader uden streger, ingen pynt og ingen
 * farvede kanter. Kontrollampernes farve kommer fra selve ikonet; den
 * mørke flade bag det er instrumentbrættet, så gul og grøn kan ses.
 */

/* ---------- Kontrollamper ---------- */

.tb-indhold .tb-lamper { margin: 1.8em 0 2.2em; }
.tb-indhold .tb-lamper + .tb-lamper { margin-top: -.2em; }
.tb-indhold .tb-lamper-titel {
  margin: 0 0 .7em;
  font-size: .95em;
  font-weight: 650;
  line-height: 1.4;
  color: var(--fs-text);
}
.tb-indhold .tb-lamper-liste {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 6px 32px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.tb-indhold .tb-lampe {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin: 0;
  padding: 10px 0;
}
.tb-indhold .tb-lampe::marker { content: none; }
.tb-lampe-ikon {
  flex: none;
  display: grid;
  place-items: center;
  width: 60px;
  height: 48px;
  margin-top: 1px;
  border-radius: calc(var(--fs-radius, 12px) - 2px);
  background: #15191e;
}
.tb-lampe-ikon img { display: block; width: 46px; height: 38px; object-fit: contain; }
.fs-dark .tb-lampe-ikon { background: #0b0d10; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .09); }
.tb-lampe-tekst { display: flex; flex-direction: column; gap: 1px; min-width: 0; line-height: 1.4; }
.tb-lampe-navn { font-size: .95em; font-weight: 600; }
.tb-lampe-betydning { font-size: .88em; color: var(--fs-text-soft); }

/* ---------- Opgaver ---------- */

.tb-indhold .tb-opgaver {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  margin: 1.5em 0 2.4em;
}
.tb-opgave {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  border-radius: calc(var(--fs-radius, 12px) + 6px);
  background: color-mix(in srgb, var(--fs-text) 4%, var(--fs-surface));
}

/* Billedet: en scene eller en tavle, altid i samme 4:3-felt, så kortene
   står lige i rækken */
.tb-indhold .tb-opgave-figur { margin: 0; }
.tb-indhold .tb-opgave-figur img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border: 0;
  border-radius: 0;
}
.tb-opgave-figur .tb-figur-plads { aspect-ratio: 4 / 3; border-radius: 0; border-width: 0 0 1px; }
.tb-opgave-tavler {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 16px;
  aspect-ratio: 4 / 3;
  padding: 20px;
  background: color-mix(in srgb, var(--fs-text) 7%, var(--fs-surface));
}
.tb-indhold .tb-opgave-tavler .tb-tavle { padding: 0; background: none; }
.tb-indhold .tb-opgave-tavler .tb-tavle:hover { background: none; }
/* Navnet står i lysboksen; her ville det gøre kortene ulige høje */
.tb-indhold .tb-opgave-tavler .tb-tavle figcaption { display: none; }
.tb-indhold .tb-opgave-tavler .tb-tavle-hoved { height: 112px; max-width: 170px; }
.tb-indhold .tb-opgave-tavler .tb-tavle-under { height: 44px; max-width: 150px; }
.tb-indhold .tb-opgave-tavler .tb-plade { font-size: 16px; min-width: 96px; }

.tb-opgave-krop {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: flex-start;
  padding: 18px 22px 16px;
}
.tb-indhold .tb-opgave-tid {
  margin: 0 0 .75em;
  padding: 3px 12px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--tb-i-accent, var(--fs-navy)) 11%, var(--fs-surface));
  color: var(--tb-i-accent, var(--fs-navy));
  font-size: .8em;
  font-weight: 600;
  line-height: 1.6;
  font-variant-numeric: tabular-nums;
}
.tb-indhold .tb-opgave-spm { margin: 0 0 1em; font-weight: 600; line-height: 1.5; }

.tb-opgave-svar {
  align-self: stretch;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid color-mix(in srgb, var(--fs-text) 10%, transparent);
}
.tb-opgave-svar summary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
  cursor: pointer;
  list-style: none;
  font-size: .92em;
  font-weight: 600;
  color: var(--tb-i-accent, var(--fs-navy));
  border-radius: 6px;
}
.tb-opgave-svar summary::-webkit-details-marker { display: none; }
/* Chevron nedad, der vender op, når svaret er åbent (symmetrisk, så RTL
   ikke skal spejle den) */
.tb-opgave-svar summary::after {
  content: "";
  width: .45em;
  height: .45em;
  margin-top: -.2em;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform .15s, margin .15s;
}
.tb-opgave-svar[open] summary::after { transform: rotate(-135deg); margin-top: .2em; }
.tb-opgave-svar summary:focus-visible { outline: 2px solid var(--tb-i-accent, var(--fs-navy)); outline-offset: 3px; }
.tb-opgave-svar-tekst { padding-top: .5em; font-size: .95em; line-height: 1.6; }
.tb-indhold .tb-opgave-svar-tekst p { margin: 0 0 .5em; }
.tb-indhold .tb-opgave-svar-tekst > :last-child { margin-bottom: .2em; }

@media (prefers-reduced-motion: reduce) {
  .tb-opgave-svar summary::after { transition: none; }
}

@media (max-width: 640px) {
  .tb-indhold .tb-opgaver { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .tb-indhold .tb-lamper-liste { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .tb-opgave-krop { padding: 16px 18px 14px; }
}

/* ---------- Opgavekort, symboler og links ud ----------
 * Samme regler som resten af filen: alt under .tb-indhold, kundens farver (--fs-*),
 * bløde flader uden streger om, ingen farvede kanter, og samme udtryk i lys
 * og mørk tilstand, fordi tokens skifter af sig selv.
 *
 * Opgavekortet ligner "Må du holde her?"-kortene (.tb-opgave): en blød
 * flade med stor radius. Se afsnittet Opgavekort nedenfor. */

/* Link ud af bogen */
.tb-indhold a.tb-ekstern {
  color: var(--tb-i-accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-decoration-color: color-mix(in srgb, var(--tb-i-accent) 40%, transparent);
  text-underline-offset: 3px;
}
.tb-indhold a.tb-ekstern:hover { text-decoration-color: currentColor; }
.tb-ekstern .bi { margin-inline-start: .28em; font-size: .72em; vertical-align: .08em; }

/* ---------- Symboler under motorhjelmen ---------- */

.tb-indhold .tb-symboler { margin: 1.6em 0 2em; }
.tb-indhold .tb-symboler-titel { margin: 0 0 .7em; font-size: .95em; font-weight: 650; line-height: 1.4; }
.tb-indhold .tb-symboler-liste {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 18px 12px;
  margin: 0;
  padding: 20px 16px 18px;
  list-style: none;
  border-radius: calc(var(--fs-radius, 12px) + 6px);
  background: color-mix(in srgb, var(--fs-text) 4%, var(--fs-surface));
}
.tb-indhold .tb-symbol {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 0;
  text-align: center;
}
.tb-indhold .tb-symbol::marker { content: none; }
.tb-symbol img { display: block; width: 60px; height: 60px; }
.tb-symbol-navn { max-width: 100%; font-size: .86em; font-weight: 600; line-height: 1.3; hyphens: manual; overflow-wrap: break-word; }

/* ---------- Opgavekort ----------
 * To former: et rummeligt fokuskort (det trukne eller valgte) og en let
 * oversigt, hvor hvert kort er et nummer og punkternes navne. Uden
 * JavaScript står oversigten øverst som links, og alle kortene står under
 * hinanden i én spalte; :target markerer det kort, der blev klikket på.
 * Med JavaScript (.tb-okort-js, data-tilstand) er der én bunke, ét kort
 * ad gangen eller oversigten. Farverne samles i --tb-ok-* på .tb-okort og
 * sættes igen i mørk tilstand. */

.tb-indhold .tb-okort {
  --tb-ok-accent: var(--tb-i-accent, var(--fs-navy));
  --tb-ok-streg: color-mix(in srgb, var(--fs-text) 7%, transparent);
  --tb-ok-flade: var(--fs-surface);
  --tb-ok-felt: color-mix(in srgb, var(--fs-text) 4%, transparent);
  --tb-ok-skygge: 0 0 0 1px color-mix(in srgb, var(--fs-text) 7%, transparent),
                  0 1px 2px rgba(16, 24, 32, .04),
                  0 22px 44px -24px rgba(16, 24, 32, .26);
  --tb-ok-chev: color-mix(in srgb, var(--fs-text) 32%, transparent);
  --tb-ok-groen: var(--fs-green, #3f8a4a);
  --tb-ok-blid: color-mix(in srgb, var(--tb-ok-accent) 8%, transparent);
  --tb-ok-blid-hover: color-mix(in srgb, var(--tb-ok-accent) 13%, transparent);
  --tb-ok-blid-tekst: var(--tb-ok-accent);
  --tb-ok-radius: calc(var(--fs-radius, 12px) + 10px);
  container-type: inline-size;
  interpolate-size: allow-keywords;
  margin: 1.2em 0 2.4em;
}
.fs-dark .tb-indhold .tb-okort {
  --tb-ok-streg: rgba(255, 255, 255, .08);
  --tb-ok-flade: color-mix(in srgb, var(--fs-text) 5%, var(--fs-surface));
  --tb-ok-felt: color-mix(in srgb, var(--fs-text) 5%, transparent);
  --tb-ok-skygge: 0 0 0 1px rgba(255, 255, 255, .07), 0 22px 44px -24px rgba(0, 0, 0, .7);
  --tb-ok-chev: color-mix(in srgb, var(--fs-text) 40%, transparent);
  --tb-ok-groen: color-mix(in srgb, var(--fs-green, #3f8a4a) 60%, #ffffff);
  --tb-ok-blid: color-mix(in srgb, var(--fs-text) 8%, transparent);
  --tb-ok-blid-hover: color-mix(in srgb, var(--fs-text) 13%, transparent);
  --tb-ok-blid-tekst: var(--fs-text);
}
/* Bagsiden og knapperne står med hidden i markup'en og vises af JS. proeve.css
   har [hidden] med !important; admin-forhåndsvisningen har måske ikke */
.tb-okort [hidden] { display: none !important; }
.tb-indhold .tb-okort-intro { color: var(--fs-text-soft); }
.tb-okort-sr,
.tb-okort-status {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ---------- Oversigten: et nummer og punkternes navne pr. kort ---------- */

.tb-indhold .tb-okort-oversigt { margin: 1.4em 0 2em; }
.tb-indhold .tb-okort-mini-liste {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}
@container (min-width: 440px) {
  .tb-indhold .tb-okort-mini-liste { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
}
.tb-indhold .tb-okort-mini-liste > li { margin: 0; padding: 0; }
.tb-indhold .tb-okort-mini-liste > li::marker { content: none; }
.tb-indhold a.tb-okort-mini {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  height: 100%;
  padding: 16px 20px 17px;
  border-radius: calc(var(--fs-radius, 12px) + 6px);
  background: var(--tb-ok-flade);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--fs-text) 9%, transparent),
              0 1px 2px rgba(16, 24, 32, .04);
  color: var(--fs-text);
  text-decoration: none;
  transition: transform .18s cubic-bezier(.2, .7, .2, 1), box-shadow .18s;
}
.fs-dark .tb-indhold a.tb-okort-mini { box-shadow: 0 0 0 1px rgba(255, 255, 255, .08); }
@media (hover: hover) {
  .tb-indhold a.tb-okort-mini:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--fs-text) 11%, transparent),
                0 14px 30px -16px rgba(16, 24, 32, .3);
  }
  .fs-dark .tb-indhold a.tb-okort-mini:hover {
    box-shadow: 0 0 0 1px rgba(255, 255, 255, .12), 0 14px 30px -16px rgba(0, 0, 0, .7);
  }
}
.tb-indhold a.tb-okort-mini:focus-visible { outline: 2px solid var(--tb-ok-accent); outline-offset: 3px; }
.tb-indhold a.tb-okort-mini:focus:not(:focus-visible) { outline: none; }
.tb-indhold a.tb-okort-mini[aria-current="true"],
.tb-indhold a.tb-okort-mini[aria-current="true"]:hover {
  box-shadow: 0 0 0 1.5px var(--tb-ok-accent), 0 1px 2px rgba(16, 24, 32, .04);
}
.tb-okort-mini-nr {
  flex: none;
  min-width: .7em;
  font-size: 2em;
  font-weight: 400;
  line-height: 1;
  letter-spacing: -.03em;
  font-variant-numeric: tabular-nums;
  text-align: center;
  color: var(--tb-ok-accent);
}
.tb-okort-mini-opgaver {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 7px;
  min-width: 0;
  padding-top: 3px;
  font-size: .88em;
  line-height: 1.3;
  color: var(--fs-text-soft);
}
.tb-okort-mini-opgaver > span { overflow-wrap: break-word; }

/* ---------- Fokuskortet ---------- */

.tb-okort-bunke {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 28px;
  max-width: 600px;
  margin-inline: auto;
}
.tb-okort-kort {
  min-width: 0;
  padding: 26px 28px 16px;
  border-radius: var(--tb-ok-radius);
  background: var(--tb-ok-flade);
  box-shadow: var(--tb-ok-skygge);
  outline: none;
}
.tb-okort-kort,
.tb-indhold .tb-okort-oversigt { scroll-margin-top: calc(var(--fs-bar-h, 60px) + 32px); }
@media (max-width: 959.98px) {
  /* plus læserens bjælke med Indhold og søgning */
  .tb-okort-kort,
  .tb-indhold .tb-okort-oversigt { scroll-margin-top: calc(var(--fs-bar-h, 60px) + 84px); }
}
.tb-okort-kort:focus-visible { outline: 2px solid var(--tb-ok-accent); outline-offset: 4px; }
/* Uden JS: kortet, der blev klikket på i oversigten */
.tb-okort:not(.tb-okort-js) .tb-okort-kort:target { box-shadow: 0 0 0 2px var(--tb-ok-accent), 0 22px 44px -24px rgba(16, 24, 32, .26); }

.tb-okort-hoved {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 12px;
  margin-bottom: 20px;
}
.tb-indhold .tb-okort-titel { margin: 0; font-size: 1.3em; font-weight: 650; line-height: 1.25; letter-spacing: -.015em; }
.tb-okort-nr { font-variant-numeric: tabular-nums; color: var(--tb-ok-accent); }
.tb-indhold .tb-okort-kat { flex: none; margin: 0; font-size: .82em; font-weight: 500; color: var(--fs-text-soft); }

/* Opgaverne: et lille tal og navnet, punkterne som rolige rækker under */
.tb-indhold .tb-okort-opgaver { margin: 0; padding: 0; list-style: none; }
.tb-indhold .tb-okort-opgave { margin: 0; padding: 0; }
.tb-indhold .tb-okort-opgave::marker { content: none; }
.tb-indhold .tb-okort-opgave + .tb-okort-opgave { margin-top: 20px; }
.tb-indhold .tb-okort-opgave-titel {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 0 0 2px;
  font-size: .8em;
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: .01em;
  color: var(--fs-text-soft);
}
.tb-okort-opgave-nr { font-variant-numeric: tabular-nums; color: var(--tb-ok-accent); }
.tb-indhold .tb-okort-punkter { margin: 0; padding: 0; list-style: none; }
.tb-indhold .tb-okort-punkt { margin: 0; padding: 0; }
.tb-indhold .tb-okort-punkt::marker { content: none; }
.tb-okort-punkt + .tb-okort-punkt { border-top: 1px solid var(--tb-ok-streg); }

/* Punktet: navnet, dækslets symbol til højre og en tynd chevron */
.tb-okort-svar summary {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 54px;
  margin-inline: -10px;
  padding: 6px 10px;
  border-radius: 12px;
  cursor: pointer;
  list-style: none;
  -webkit-tap-highlight-color: transparent;
  transition: background-color .15s;
}
.tb-okort-svar summary::-webkit-details-marker { display: none; }
@media (hover: hover) {
  .tb-okort-svar:not([open]) > summary:hover { background: color-mix(in srgb, var(--fs-text) 3.5%, transparent); }
}
.tb-okort-svar summary:focus-visible { outline: 2px solid var(--tb-ok-accent); outline-offset: 0; }
.tb-okort-svar summary:focus:not(:focus-visible) { outline: none; }
.tb-okort-punkt-navn { flex: 1; min-width: 0; font-weight: 400; line-height: 1.4; }
.tb-okort-svar[open] .tb-okort-punkt-navn { font-weight: 500; }
.tb-okort-symbol { flex: none; width: 40px; height: 40px; }
/* Pilen peger ned (op, når svaret er åbent) og er ens i begge
   skriveretninger; derfor tegnes hjørnet med fysiske kanter */
.tb-okort-chev {
  flex: none;
  width: 8px;
  height: 8px;
  margin-block-start: -4px;
  margin-inline: 4px 6px;
  border-right: 1.75px solid var(--tb-ok-chev);
  border-bottom: 1.75px solid var(--tb-ok-chev);
  transform: rotate(45deg);
  transition: transform .2s, margin .2s, border-color .2s;
}
.tb-okort-svar[open] .tb-okort-chev { transform: rotate(-135deg); margin-block-start: 4px; border-color: var(--tb-ok-accent); }

/* Svaret: to linjer på en blød flade. Sådan tjekker du (blød farve), og
   hvornår det er i orden (grønt flueben, kontrollampen yderst) */
.tb-okort-svar-tekst {
  margin: 2px 0 14px;
  padding: 14px 16px;
  border-radius: calc(var(--fs-radius, 12px) + 2px);
  background: var(--tb-ok-felt);
  font-size: .94em;
  line-height: 1.55;
}
.tb-indhold .tb-okort-svar-tekst p { margin: 0; }
.tb-indhold .tb-okort-tjek { display: block; color: var(--fs-text-soft); }
.tb-indhold .tb-okort-ok {
  display: grid;
  grid-template-columns: 1.2em minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  margin-top: 10px;
}
.tb-okort-ok > .bi { font-size: 1.02em; line-height: 1.52; text-align: center; color: var(--tb-ok-groen); }
/* På en smal skærm klemmer lampen teksten ind i en tynd spalte: den flytter
   ned under teksten, så svaret får hele bredden */
@container (max-width: 520px) {
  .tb-indhold .tb-okort-ok { grid-template-columns: 1.2em minmax(0, 1fr); row-gap: 8px; }
  .tb-okort-ok > .tb-okort-lampe { grid-column: 2; }
}
/* Kontrollampen på sin mørke flade, som i <lamper> */
.tb-okort-lampe {
  display: grid;
  place-items: center;
  width: 38px;
  height: 30px;
  border-radius: 8px;
  background: #15191e;
}
.tb-okort-lampe img { display: block; width: 28px; height: 23px; object-fit: contain; }
.fs-dark .tb-okort-lampe { background: #0b0d10; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .09); }

/* Blød udfoldning: højden glider, hvor browseren kan; ellers en let fade */
.tb-okort-svar[open] .tb-okort-svar-tekst { animation: tb-okort-svar .22s ease-out; }
@keyframes tb-okort-svar {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: none; }
}
@supports selector(::details-content) {
  .tb-okort-svar[open] .tb-okort-svar-tekst { animation: none; }
  .tb-okort-svar::details-content {
    block-size: 0;
    overflow: hidden;
    transition: block-size .26s ease, content-visibility .26s allow-discrete;
  }
  .tb-okort-svar[open]::details-content { block-size: auto; }
}

/* Spejlene: altid med, som den sidste gruppe under en hårfin streg */
.tb-indhold .tb-okort-altid {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--tb-ok-streg);
}

/* ---------- Knapperne. Egne klasser, ikke .fs-btn (84 px er prøvens) ---------- */

.tb-okort-knap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 22px;
  border: 0;
  border-radius: var(--fs-radius-btn, 10px);
  background: var(--fs-navy);
  color: var(--fs-accent-text, #fff);
  font: inherit;
  font-size: .95em;
  font-weight: 600;
  cursor: pointer;
  transition: filter .15s, transform .15s, background-color .15s;
}
.tb-okort-knap:hover { filter: brightness(1.08); }
.tb-okort-knap:active { transform: scale(.98); }
/* Den sekundære: en blød pille i accentfarven */
.tb-okort-knap.tb-okort-knap-blid { background: var(--tb-ok-blid); color: var(--tb-ok-blid-tekst); }
.tb-okort-knap.tb-okort-knap-blid:hover { filter: none; background: var(--tb-ok-blid-hover); }
.tb-okort-link {
  height: 44px;
  padding: 0 12px;
  border: 0;
  border-radius: var(--fs-radius-btn, 10px);
  background: none;
  color: var(--tb-ok-accent);
  font: inherit;
  font-size: .92em;
  font-weight: 600;
  cursor: pointer;
}
.tb-okort-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.tb-okort-knap:focus-visible,
.tb-okort-link:focus-visible { outline: 2px solid var(--tb-ok-accent); outline-offset: 3px; }
.tb-okort-knap:focus:not(:focus-visible),
.tb-okort-link:focus:not(:focus-visible) { outline: none; box-shadow: none; }

/* ---------- Med JavaScript: bunke, fokus eller oversigt ---------- */

.tb-okort-js .tb-okort-kort:not(.tb-okort-trukket) { display: none; }
.tb-okort-js .tb-okort-oversigt { margin-top: 1.2em; }

/* Bunken, før der er trukket: tre kort med bagsiden op */
.tb-okort-bagside { display: grid; justify-items: center; gap: 4px; padding: 18px 0 4px; isolation: isolate; }
.tb-okort-bagside-kort {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: min(100%, 360px);
  aspect-ratio: 5 / 3;
  margin-bottom: 30px;
  padding: 24px;
  border-radius: var(--tb-ok-radius);
  background: var(--fs-surface);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--fs-text) 7%, transparent),
              0 1px 2px rgba(16, 24, 32, .05),
              0 18px 40px -18px rgba(16, 24, 32, .28);
  text-align: center;
}
.tb-okort-bagside-kort::before,
.tb-okort-bagside-kort::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: color-mix(in srgb, var(--fs-text) 5%, var(--fs-surface));
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--fs-text) 6%, transparent);
  transform: translateY(13px) scale(.95);
}
.tb-okort-bagside-kort::after { transform: translateY(26px) scale(.9); background: color-mix(in srgb, var(--fs-text) 8%, var(--fs-surface)); }
.fs-dark .tb-okort-bagside-kort {
  background: color-mix(in srgb, var(--fs-text) 6%, var(--fs-surface));
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .07), 0 18px 40px -18px rgba(0, 0, 0, .6);
}
.fs-dark .tb-okort-bagside-kort::before { background: color-mix(in srgb, var(--fs-text) 4%, var(--fs-surface)); }
.fs-dark .tb-okort-bagside-kort::after { background: color-mix(in srgb, var(--fs-text) 2.5%, var(--fs-surface)); }
.tb-okort-bagside-kort .bi { font-size: 2em; line-height: 1; color: var(--tb-ok-accent); }
.tb-indhold .tb-okort-bagside-tekst { margin: 0 0 4px; font-size: .92em; font-weight: 600; color: var(--fs-text-soft); }

.tb-okort-styr {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px 12px;
  margin-top: 24px;
}

/* Det trukne kort glider roligt op */
.tb-okort-ind { animation: tb-okort-ind .32s cubic-bezier(.2, .7, .2, 1); }
@keyframes tb-okort-ind {
  from { opacity: 0; transform: translateY(14px) scale(.985); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .tb-okort-ind, .tb-okort-svar[open] .tb-okort-svar-tekst { animation: none; }
  .tb-okort-svar::details-content { transition: none; }
  .tb-okort-chev, .tb-okort-knap, .tb-okort-svar summary, .tb-indhold a.tb-okort-mini { transition: none; }
}

@media (max-width: 640px) {
  .tb-indhold a.tb-okort-mini { padding: 14px 16px 15px; gap: 14px; }
  .tb-okort-kort { padding: 20px 18px 10px; }
  .tb-okort-svar summary { gap: 12px; }
  .tb-okort-symbol { width: 36px; height: 36px; }
  .tb-okort-svar-tekst { padding: 12px 14px; }
  .tb-indhold .tb-symboler-liste { grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 16px 8px 14px; }
  .tb-symbol img { width: 52px; height: 52px; }
  .tb-symbol-navn { font-size: .78em; }
}
