/* RKS Læring – blokke. Bruger temaets farver hvis de findes. */
:root {
	--rks-p: var(--wp--preset--color--primaer, #C23137);
	--rks-p-lys: var(--wp--preset--color--primaer-lys, #FBEDEE);
	--rks-a: var(--wp--preset--color--accent, #2F6F73);
	--rks-a-lys: var(--wp--preset--color--accent-lys, #E6F1F1);
	--rks-lys: var(--wp--preset--color--lys, #ECEDEF);
	--rks-graa: var(--wp--preset--color--graa, #5A6169);
	--rks-ok: #1F7A4D;
	--rks-ok-lys: #E3F4EA;
	--rks-fejl: #B3261E;
	--rks-fejl-lys: #FBE9E7;
	--rks-tekst: var(--wp--preset--color--tekst, #1F2328);
	--rks-p-moerk: var(--wp--preset--color--primaer-moerk, #9A2328);
	/* Fast typografisk skala: 14 / 17 / 20 / 24 / 32 px */
	--rks-fs-s: var(--wp--preset--font-size--lille, .875rem);
	--rks-fs-m: var(--wp--preset--font-size--normal, 1.0625rem);
	--rks-fs-l: var(--wp--preset--font-size--mellem, 1.25rem);
	--rks-fs-xl: var(--wp--preset--font-size--stor, 1.5rem);
	--rks-fs-xxl: var(--wp--preset--font-size--kaempe, 2rem);
	--rks-touch: 44px;
}
.screen-reader-text { border: 0; clip: rect(1px,1px,1px,1px); clip-path: inset(50%); height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute !important; width: 1px; word-wrap: normal !important; }
.rks-kilde { display: none; }
@media print { .rks-kilde { display: block; } .rks-fc, .rks-quiz, .rks-tjek, .rks-ob { display: none; } }

.wp-block-rks-flashcards, .wp-block-rks-quiz, .wp-block-rks-tjekliste, .wp-block-rks-oplaegsbygger, .wp-block-rks-ordliste {
	background: #fff; border: 1px solid var(--rks-lys); border-radius: 12px; padding: 1.25rem 1.5rem; margin: 1.5rem 0;
}
.wp-block-rks-flashcards > h3:first-child, .wp-block-rks-quiz > h3:first-child, .wp-block-rks-tjekliste > h3:first-child,
.wp-block-rks-oplaegsbygger > h3:first-child, .wp-block-rks-ordliste > h3:first-child { margin-top: 0; }

.rks-hjaelp { font-size: var(--rks-fs-s); color: var(--rks-graa); margin: .25rem 0; }
.rks-knap { font: inherit; font-weight: 600; border: 0; border-radius: 999px; padding: .55rem 1.1rem; cursor: pointer; background: var(--rks-p); color: #fff; }
.rks-knap:hover { filter: brightness(.92); }
.rks-knap:focus-visible, .rks-link:focus-visible, .rks-quiz__svar:focus-visible, .rks-fc__kort:focus-visible { outline: 3px solid var(--rks-a); outline-offset: 2px; }
.rks-knap--ok { background: var(--rks-ok); }
.rks-knap--ikke { background: #fff; color: var(--rks-tekst, #1F2328); border: 2px solid var(--rks-lys); }
.rks-knap--sek { background: var(--rks-lys); color: inherit; min-width: 2.75rem; }
.rks-link { font: inherit; background: none; border: 0; padding: 0; color: var(--rks-p); text-decoration: underline; cursor: pointer; }
.rks-fremdrift { height: 6px; background: var(--rks-lys); border-radius: 3px; overflow: hidden; margin: .5rem 0; }
.rks-fremdrift > span { display: block; height: 100%; width: 0; background: var(--rks-ok); transition: width .3s; }

/* Flashcards */
.rks-fc__kort { display: block; width: 100%; min-height: 12rem; border: 0; padding: 0; background: none; cursor: pointer; perspective: 1000px; position: relative; font: inherit; color: inherit; text-align: center; }
.rks-fc__side { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 1.5rem; border-radius: 12px; backface-visibility: hidden; transition: transform .45s; font-size: var(--rks-fs-l); line-height: 1.45; }
.rks-fc__forside { background: var(--rks-p-lys); border: 2px solid var(--rks-p); font-weight: 700; font-size: var(--rks-fs-xl); }
.rks-fc__bagside { background: var(--rks-a-lys); border: 2px solid var(--rks-a); transform: rotateY(180deg); }
.rks-fc__kort.er-vendt .rks-fc__forside { transform: rotateY(180deg); }
.rks-fc__kort.er-vendt .rks-fc__bagside { transform: rotateY(360deg); }
.rks-fc__side p { margin: 0; }
.rks-fc__knapper { display: flex; gap: .5rem; justify-content: center; margin: 1rem 0 .5rem; flex-wrap: wrap; }
.rks-fc__status { text-align: center; font-size: var(--rks-fs-s); margin: .25rem 0; }
.rks-fc__vaerktoej { text-align: center; font-size: var(--rks-fs-s); }
@media (prefers-reduced-motion: reduce) { .rks-fc__side { transition: none; } }

/* Quiz */
.rks-quiz__spm { border: 0; border-top: 1px solid var(--rks-lys); padding: 1rem 0 .5rem; margin: 0; }
.rks-quiz__spm legend { font-weight: 700; padding: 0; margin-bottom: .6rem; float: left; width: 100%; }
.rks-quiz__spm legend + * { clear: both; }
.rks-quiz__nr { color: var(--rks-p); }
.rks-quiz__svar { display: block; width: 100%; text-align: left; font: inherit; background: #fff; border: 2px solid var(--rks-lys); border-radius: 8px; padding: .6rem .9rem; margin: .4rem 0; cursor: pointer; color: inherit; }
.rks-quiz__svar:hover:not(:disabled) { border-color: var(--rks-a); }
.rks-quiz__svar:disabled { cursor: default; opacity: .75; }
.rks-quiz__svar.er-rigtig { border-color: var(--rks-ok); background: var(--rks-ok-lys); opacity: 1; }
.rks-quiz__svar.er-rigtig::before { content: "✓ "; color: var(--rks-ok); font-weight: 700; }
.rks-quiz__svar.er-forkert { border-color: var(--rks-fejl); background: var(--rks-fejl-lys); opacity: 1; }
.rks-quiz__svar.er-forkert::before { content: "✗ "; color: var(--rks-fejl); font-weight: 700; }
.rks-quiz__feedback:empty { display: none; }
.rks-quiz__feedback { border-radius: 8px; padding: .6rem .9rem; margin-top: .4rem; font-size: var(--rks-fs-s); }
.rks-quiz__feedback.er-rigtig { background: var(--rks-ok-lys); }
.rks-quiz__feedback.er-forkert { background: var(--rks-fejl-lys); }
.rks-quiz__resultat { font-weight: 700; font-size: var(--rks-fs-l); }

/* Tjekliste */
.rks-tjek { list-style: none; padding: 0; margin: 0; }
.rks-tjek li { display: flex; gap: .7rem; align-items: flex-start; padding: .45rem 0; border-bottom: 1px solid var(--rks-lys); }
.rks-tjek input { width: 1.25rem; height: 1.25rem; margin-top: .2rem; accent-color: var(--rks-ok); flex: none; }
.rks-tjek input:checked + label { color: var(--rks-graa); text-decoration: line-through; }
.rks-tjek__status { font-size: var(--rks-fs-s); margin: .25rem 0; }

/* Oplægsbygger */
.rks-ob__felt { margin: 0 0 1rem; }
.rks-ob__felt label { display: block; font-weight: 700; margin-bottom: .3rem; }
.rks-ob__felt textarea { width: 100%; font: inherit; padding: .6rem .75rem; border: 2px solid var(--rks-lys); border-radius: 8px; resize: vertical; }
.rks-ob__felt textarea:focus { border-color: var(--rks-a); outline: none; }

/* Ordliste */
.rks-ord__soeg { width: 100%; font: inherit; padding: .6rem .9rem; border: 2px solid var(--rks-lys); border-radius: 999px; margin-bottom: .5rem; }
.wp-block-rks-ordliste td:first-child { font-weight: 700; white-space: nowrap; }

/* Editor */
.rks-blok-hint { font-size: 12px; background: #f0f6fc; border-left: 3px solid #2271b1; padding: 6px 10px; margin: 0 0 8px; }

/* ---------- Forrige / Næste ---------- */
.rks-naeste { display: flex; justify-content: space-between; gap: 1rem; margin: 3rem 0 0; padding-top: 1.5rem; border-top: 1px solid var(--rks-lys); }
.rks-naeste a { min-height: var(--rks-touch); display: flex; flex-direction: column; text-decoration: none; padding: .75rem 1rem; border: 1px solid var(--rks-lys); border-radius: 10px; background: #fff; max-width: 48%; color: inherit; }
.rks-naeste a:hover { border-color: var(--rks-p); }
.rks-naeste__frem { margin-left: auto; text-align: right; }
.rks-naeste__label { font-size: var(--rks-fs-s); color: var(--rks-graa); }
.rks-naeste__titel { font-weight: 700; color: var(--rks-p); }


/* =====================================================================
   Forløb (rks/forloeb)
   ===================================================================== */

/* "Nu"-mærke: tekst + prik, aldrig kun farve */
.rks-nu { display: inline-flex; align-items: center; gap: .35rem; background: var(--rks-p); color: #fff; border-radius: 999px; padding: .1rem .65rem; font-weight: 700; font-size: var(--rks-fs-s); line-height: 1.5; white-space: nowrap; }
.rks-nu__prik { width: .55rem; height: .55rem; border-radius: 50%; background: currentColor; flex: none; box-shadow: 0 0 0 2px rgba(255,255,255,.45); }
.rks-fasemaerke { display: inline-block; background: var(--rks-a-lys); color: var(--rks-a); border-radius: 999px; padding: .05rem .6rem; font-size: var(--rks-fs-s); font-weight: 700; white-space: nowrap; line-height: 1.6; }

/* ---------- Forsidens tidslinje ---------- */
.rks-fl--tidslinje { margin: 1rem 0 2.5rem; }
@media (max-width: 600px) {
	.rks-fl--tidslinje { margin-top: .75rem; }
	.rks-fl__fase { margin-bottom: .25rem; }
	.rks-fl__label { margin-top: .5rem; }
	.rks-fl__fase.er-udfoldet .rks-fl__kort { padding: .6rem .85rem .75rem; }
}
.rks-fl .rks-fl__status, .wp-block-post-content .rks-fl__status { font-family: inherit; font-size: var(--rks-fs-s); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--rks-a); margin: 0 0 .75rem; border: 0; padding: 0; }
.rks-fl__liste { list-style: none; margin: 0; padding: 0; position: relative; }
.rks-fl__liste::before { content: ""; position: absolute; left: calc(1.125rem - 1.5px); top: 1rem; bottom: 1rem; width: 3px; background: var(--rks-lys); }
.rks-fl__fase { position: relative; display: grid; grid-template-columns: 2.25rem minmax(0, 1fr); gap: .75rem; margin: 0 0 .5rem; }
.rks-fl__nr { position: relative; z-index: 1; width: 2.25rem; height: 2.25rem; margin-top: .25rem; border-radius: 50%; background: #fff; border: 2px solid var(--rks-lys); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: var(--rks-fs-m); }
.rks-fl__kort { min-width: 0; display: flex; flex-wrap: nowrap; align-items: center; gap: .5rem; }
.rks-fl__titel { margin: 0; font-size: var(--rks-fs-m); line-height: 1.3; flex: 1 1 auto; min-width: 0; }
.rks-fl__titel a { display: flex; flex-wrap: wrap; align-items: baseline; gap: .1rem .6rem; min-height: var(--rks-touch); padding: .55rem 0; color: var(--rks-tekst); text-decoration: none; }
.rks-fl__titel a:hover { color: var(--rks-p); text-decoration: underline; }
.rks-fl__periode { font-family: var(--wp--preset--font-family--broedtekst, inherit); font-weight: 400; font-size: var(--rks-fs-s); color: var(--rks-graa); }
.rks-fl__tag { font-size: var(--rks-fs-s); color: var(--rks-graa); white-space: nowrap; }
.rks-fl__tag--naeste { background: var(--rks-a-lys); color: var(--rks-a); font-weight: 700; border-radius: 999px; padding: .05rem .6rem; }
.rks-fl__fase.er-neutral .rks-fl__kort { flex-wrap: wrap; }
.rks-fl__beskrivelse { flex-basis: 100%; margin: -.7rem 0 .4rem; font-size: var(--rks-fs-s); color: var(--rks-graa); }
.rks-fl__fase.er-afsluttet .rks-fl__nr { background: var(--rks-lys); color: var(--rks-graa); }
.rks-fl__fase.er-afsluttet .rks-fl__titel a { color: var(--rks-graa); font-weight: 500; }
/* Udfoldet (aktuel / næste) fase */
.rks-fl__fase.er-udfoldet .rks-fl__kort { display: block; background: #fff; border: 2px solid var(--rks-lys); border-radius: 10px; padding: .75rem 1rem 1rem; box-shadow: 0 4px 16px rgba(0,0,0,.06); }
.rks-fl__fase.er-aktuel .rks-fl__kort { border-color: var(--rks-p); box-shadow: 0 4px 16px rgba(194,49,55,.12); }
.rks-fl__fase.er-aktuel .rks-fl__nr { background: var(--rks-p); border-color: var(--rks-p); color: #fff; }
.rks-fl__fase.er-naeste .rks-fl__nr { border-color: var(--rks-a); color: var(--rks-a); }
.rks-fl__hoved { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem .75rem; justify-content: space-between; }
.rks-fl__fase.er-udfoldet .rks-fl__titel { font-size: var(--rks-fs-l); }
.rks-fl__fase.er-udfoldet .rks-fl__titel a { padding: .2rem 0; }
.rks-fl__hoved .rks-fl__periode { flex-basis: 100%; margin: -.15rem 0 0; }
.rks-fl__frist { margin: .5rem 0 .25rem; background: var(--rks-p-lys); border-left: 4px solid var(--rks-p); border-radius: 0 8px 8px 0; padding: .5rem .75rem; line-height: 1.45; }
.rks-fl__frist-label { color: var(--rks-p-moerk); }
.rks-fl__frist-tid { font-weight: 700; }
.rks-fl__frist-fase { color: var(--rks-graa); font-size: var(--rks-fs-s); }
.rks-fl__label { margin: .85rem 0 .2rem; font-size: var(--rks-fs-s); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--rks-graa); }
.rks-fl__handlinger { list-style: none; margin: 0; padding: 0; }
.rks-fl__handlinger li { position: relative; padding: .35rem 0 .35rem 1.75rem; line-height: 1.4; }
.rks-fl__handlinger li::before { content: ""; position: absolute; left: 0; top: .55rem; width: 1rem; height: 1rem; border: 2px solid var(--rks-a); border-radius: 4px; }
.rks-fl__handlinger li { padding: 0 0 0 1.75rem; }
.rks-fl__handlinger li::before { top: .75rem; }
.rks-fl__handlinger a { display: flex; align-items: center; min-height: var(--rks-touch); padding: .3rem 0; line-height: 1.35; }
.rks-fl__links { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .4rem; }
.rks-fl__links a { box-sizing: border-box; display: inline-flex; align-items: center; min-height: var(--rks-touch); padding: 0 .85rem; border: 1px solid var(--rks-lys); border-radius: 999px; background: var(--rks-lys); color: var(--rks-tekst); text-decoration: none; font-size: var(--rks-fs-s); }
.rks-fl__links a:hover { border-color: var(--rks-a); color: var(--rks-a); background: #fff; }

/* ---------- Undersider: kompakt tidslinje ---------- */
.rks-fl-bar { margin: 0 0 1rem; }
.rks-fl-bar ol { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .35rem; }
.rks-fl-bar a { position: relative; display: flex; align-items: center; gap: .55rem; min-height: var(--rks-touch); height: 100%; padding: .35rem .6rem; background: var(--rks-lys); border: 2px solid transparent; border-radius: 10px; color: var(--rks-tekst); text-decoration: none; line-height: 1.25; }
.rks-fl-bar a:hover { border-color: var(--rks-graa); }
.rks-fl-bar__nr { flex: none; width: 1.75rem; height: 1.75rem; border-radius: 50%; background: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: var(--rks-fs-s); }
.rks-fl-bar__tekst { display: flex; flex-direction: column; min-width: 0; }
.rks-fl-bar__navn { font-size: var(--rks-fs-s); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rks-fl-bar__periode { font-size: var(--rks-fs-s); color: var(--rks-graa); white-space: nowrap; }
/* Den side, man er på: mørk ramme + udfyldt nummer */
.rks-fl-bar__fase.er-her a { background: #fff; border-color: var(--rks-tekst); }
.rks-fl-bar__fase.er-her .rks-fl-bar__nr { background: var(--rks-tekst); color: #fff; }
/* Hvor forløbet er nu: rød prik + "nu" */
.rks-fl-bar__nu { margin-left: auto; display: inline-flex; align-items: center; gap: .3rem; color: var(--rks-p-moerk); font-weight: 700; font-size: var(--rks-fs-s); }
.rks-fl-bar__nu .rks-nu__prik { background: var(--rks-p); box-shadow: 0 0 0 3px var(--rks-p-lys); }
.rks-fl-bar__fase.er-afsluttet .rks-fl-bar__navn { color: var(--rks-graa); font-weight: 400; }
@media (max-width: 700px) {
	.rks-fl-bar a { justify-content: center; padding: 0 .25rem; }
	.rks-fl-bar__tekst, .rks-fl-bar__nu-tekst { border: 0; clip: rect(1px,1px,1px,1px); clip-path: inset(50%); height: 1px; width: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute; }
	.rks-fl-bar__nu { position: absolute; top: 4px; right: 6px; margin: 0; }
}

/* ---------- "Hører til fase …" ---------- */
.rks-fl-kontekst { margin: 0 0 .25rem; font-size: var(--rks-fs-s); color: var(--rks-graa); display: flex; flex-wrap: wrap; align-items: center; gap: .25rem .5rem; }
.rks-fl-kontekst a { color: inherit; font-weight: 600; }
.rks-fl-kontekst .rks-nu { padding: 0 .5rem; }

/* ---------- Chips ---------- */
.rks-chips { margin: 2.5rem 0 2rem; }
.wp-block-post-content .rks-chips__titel, .rks-chips .rks-chips__titel { font-size: var(--rks-fs-l); margin: 0 0 .75rem; }
.rks-chips__liste { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.rks-chip { box-sizing: border-box; display: inline-flex; align-items: center; min-height: var(--rks-touch); padding: .3rem 1rem; background: #fff; border: 1px solid #C9CCD1; border-radius: 999px; color: var(--rks-tekst); text-decoration: none; line-height: 1.3; }
.rks-chip:hover { border-color: var(--rks-p); color: var(--rks-p); }
.rks-chips--side { margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--rks-lys); }
.rks-chips--side .rks-chips__titel { font-size: var(--rks-fs-m); }

/* ---------- Slå op ---------- */
.rks-opslag { margin: 0 0 2rem; }
.wp-block-post-content .rks-opslag__h { font-size: var(--rks-fs-m); margin: 0 0 .5rem; }
.rks-opslag__liste { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); column-gap: 1.5rem; }
.rks-opslag__liste a { display: flex; align-items: center; justify-content: space-between; gap: .5rem; min-height: var(--rks-touch); border-bottom: 1px solid var(--rks-lys); color: var(--rks-tekst); text-decoration: none; }
.rks-opslag__liste a:hover .rks-opslag__titel { color: var(--rks-p); text-decoration: underline; }

/* ---------- Lærer-tidslinje ---------- */
.rks-fl-l ol { list-style: none; margin: 0; padding: 0; }
.rks-fl-l__fase { border-left: 3px solid var(--rks-lys); padding: 0 0 .5rem 1rem; margin: 0 0 1.25rem; }
.rks-fl-l__fase.er-aktuel { border-left-color: var(--rks-p); }
.rks-fl-l__h { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem .6rem; font-size: var(--rks-fs-l); margin: 0 0 .5rem; border: 0; padding: 0; }
.rks-fl-l__h .rks-fl__nr { margin: 0; }
.rks-fl-l__milepaele { list-style: none; margin: 0; padding: 0; }
.rks-fl-l__mp { background: #fff; border: 1px solid var(--rks-lys); border-radius: 10px; padding: .65rem .9rem; margin: .5rem 0; }
.rks-fl-l__tid { margin: 0; font-size: var(--rks-fs-s); font-weight: 700; color: var(--rks-a); text-transform: uppercase; letter-spacing: .05em; }
.rks-fl-l__titel { margin: .1rem 0; font-weight: 700; }
.rks-fl-l__tekst { margin: .1rem 0; }
.rks-fl-l__note { margin: .4rem 0 0; font-size: var(--rks-fs-s); background: var(--rks-a-lys); padding: .4rem .6rem; border-radius: 6px; }
.rks-fl-l__kun { background: var(--rks-a); color: #fff; border-radius: 999px; padding: 0 .5rem; text-transform: none; letter-spacing: 0; margin-left: .25rem; }

/* ---------- Søgning ---------- */
.rks-soeg__form { display: flex; gap: .5rem; margin: 0 0 1rem; max-width: 40rem; }
.rks-soeg__form input { flex: 1; min-width: 0; font: inherit; min-height: var(--rks-touch); padding: 0 1rem; border: 2px solid #C9CCD1; border-radius: 999px; }
.rks-soeg__form input:focus { border-color: var(--rks-a); outline: none; box-shadow: 0 0 0 3px var(--rks-a-lys); }
.rks-soeg__form .rks-knap { min-height: var(--rks-touch); }
.rks-soeg__antal { color: var(--rks-graa); font-size: var(--rks-fs-s); }
.rks-soeg__liste { list-style: none; margin: 0; padding: 0; max-width: 46rem; }
.rks-soeg__res { padding: 1rem 0; border-bottom: 1px solid var(--rks-lys); }
.rks-soeg__top { margin: 0; display: flex; gap: .5rem; align-items: center; font-size: var(--rks-fs-s); color: var(--rks-graa); }
.rks-soeg__titel { font-size: var(--rks-fs-l); margin: .25rem 0; border: 0; padding: 0; }
.rks-soeg__uddrag { margin: 0; }
.rks-soeg__uddrag mark { background: #FBE7A6; color: inherit; padding: 0 .1em; }

/* Fokus på alle nye elementer (samme stil som resten) */
.rks-fl a:focus-visible, .rks-fl-bar a:focus-visible, .rks-fl-kontekst a:focus-visible, .rks-chip:focus-visible, .rks-opslag a:focus-visible, .rks-naeste a:focus-visible, .rks-soeg a:focus-visible { outline: 3px solid var(--rks-p); outline-offset: 2px; border-radius: 6px; }

@media print { .rks-fl-bar, .rks-naeste, .rks-chips--side { display: none; } }
