/* AI Skole · fælles (toast, mørk tilstand, hop-menu) */
#fn-toast{position:fixed;left:50%;bottom:calc(24px + env(safe-area-inset-bottom));transform:translate(-50%,20px);opacity:0;pointer-events:none;z-index:9999;display:flex;align-items:center;gap:10px;background:#16233f;color:#fff;font:600 15.5px/1.3 "DM Sans",system-ui,sans-serif;padding:12px 18px;border-radius:999px;box-shadow:0 18px 40px -14px rgba(22,35,63,.55);max-width:calc(100vw - 28px)}
#fn-toast svg{flex:none;color:#ffd75e}
#fn-toast a{color:#ffd75e;text-decoration:underline;text-underline-offset:3px;white-space:nowrap;pointer-events:auto}
#fn-toast.on{animation:fnT .38s cubic-bezier(.2,.9,.3,1.2) forwards}
@keyframes fnT{to{opacity:1;transform:translate(-50%,0)}}
@media (max-width:760px){#fn-toast{bottom:calc(84px + env(safe-area-inset-bottom))}}
@media (prefers-reduced-motion:reduce){#fn-toast.on{animation:none;opacity:1;transform:translate(-50%,0)}}

html body .fn-tema{all:unset;box-sizing:border-box;display:inline-grid;place-items:center;width:42px;height:42px;border-radius:999px;border:1.5px solid #e3d9bf;background:#fffdf6;color:#16233f;cursor:pointer;flex:none;margin-right:6px}
html body .fn-tema:hover{background:#ffd75e;border-color:#ffd75e}
html body .fn-tema:focus-visible{outline:3px solid #b08d3f;outline-offset:2px}
html body .fn-tema[aria-pressed="true"]{background:#16233f;color:#ffd75e;border-color:#16233f}
body > .fn-tema{position:fixed;right:14px;bottom:14px;z-index:90}

/* Mørk tilstand: sitets lyse flader vendes om. Billeder, video og logoer vendes tilbage. */
html[data-tema="moerk"]{background:#111;filter:invert(.92) hue-rotate(180deg);color-scheme:dark}
html[data-tema="moerk"] img,html[data-tema="moerk"] video,html[data-tema="moerk"] picture,html[data-tema="moerk"] iframe,html[data-tema="moerk"] canvas,html[data-tema="moerk"] .kb-lg,html[data-tema="moerk"] [style*="background-image"]{filter:invert(1) hue-rotate(180deg)}
@media print{html[data-tema="moerk"]{filter:none!important;background:#fff}html[data-tema="moerk"] img,html[data-tema="moerk"] video,html[data-tema="moerk"] picture{filter:none}}

#fn-palet{position:fixed;inset:0;z-index:10000;display:grid;place-items:start center;padding:12vh 14px 0}
#fn-palet[hidden]{display:none}
.fn-p-b{position:absolute;inset:0;background:rgba(22,35,63,.5)}
.fn-p{position:relative;width:min(640px,100%);background:#fffdf6;border-radius:28px;box-shadow:0 40px 80px -30px rgba(22,35,63,.6);padding:14px;font-family:"DM Sans",system-ui,sans-serif;color:#16233f}
.fn-p input{width:100%;box-sizing:border-box;border:1.5px solid #e3d9bf;border-radius:18px;background:#fff;padding:0 18px;min-height:54px;font:500 18px "DM Sans",sans-serif;color:#16233f}
.fn-p input:focus{outline:3px solid #b08d3f;outline-offset:1px}
.fn-l{display:grid;gap:2px;margin:10px 0 4px;max-height:50vh;overflow:auto}
.fn-l a{display:flex;justify-content:space-between;align-items:baseline;gap:14px;padding:11px 14px;border-radius:14px;color:#16233f;text-decoration:none;min-height:44px;box-sizing:border-box}
.fn-l a b{font-weight:600;font-size:16px;line-height:1.3}
.fn-l a small{flex:none;color:#6b7390;font-size:13.5px}
.fn-l a.on,.fn-l a:hover{background:#ffd75e}
.fn-p p{margin:6px 8px 2px;font-size:13px;color:#6b7390}
html[data-tema="moerk"] .logo img,html[data-tema="moerk"] a.logo svg{filter:none}

html body .fn-prt{all:unset;box-sizing:border-box;display:inline-flex;align-items:center;min-height:44px;padding:0 20px;margin:12px 0 4px;border-radius:999px;border:1.5px solid #16233f;color:#16233f;font:700 15.5px "DM Sans",system-ui,sans-serif;cursor:pointer;background:#fff}
html body .fn-prt:hover{background:#16233f;color:#fff}
html body .fn-prt:focus-visible{outline:3px solid #b08d3f;outline-offset:2px}
@media print{.fn-prt,.fn-tema,#fn-toast,#fn-palet{display:none!important}}
