@import url('fonts/fonts.css');

/* Lyse værdier. Spil med valgt baggrund beholder dem også i mørk tilstand. */
:root,html[data-theme=dark] body.has-background {
  color-scheme:light;
  --kwiz-ink:#20212a;
  --kwiz-paper:#fff;
  --kwiz-muted:#54596b;
  --kwiz-blue:#1045ee;
  --kwiz-coral:#ff4138;
  --kwiz-accent:#1045ee;
  --kwiz-line:#d9e0f0;
  --kwiz-soft:#eef3ff;
  --kwiz-press:#e3eaff;
  --kwiz-soft-ink:#2147ab;
  --kwiz-tag-line:#b8c9f3;
  --kwiz-card-line:#e1e6f2;
  --kwiz-input:#fff;
  --kwiz-control-line:#b8c5de;
  --kwiz-placeholder:#6b7285;
  --kwiz-outline:#aebbd5;
  --kwiz-danger:#a31d35;
  --kwiz-feature:linear-gradient(120deg,#e5ecff,#fff2cf);
  --kwiz-feature-line:#bfcef9;
  --kwiz-floater:linear-gradient(135deg,#fff,#eef3ff);
  --kwiz-background:radial-gradient(ellipse at 88% 5%,#ffe3a6,transparent 29%),radial-gradient(ellipse at 5% 29%,#e3eaff,transparent 31%),#f8faff;
  --kwiz-shadow:0 24px 60px #243b751c;
  --kwiz-body-font:'DM Sans',sans-serif;
  --kwiz-heading-font:'Space Grotesk',sans-serif;
}

html[data-theme=dark] {
  color-scheme:dark;
  --kwiz-ink:#f2f3f6;
  --kwiz-paper:#1d1f27;
  --kwiz-muted:#adb1bd;
  --kwiz-accent:#8ea8ff;
  --kwiz-line:#2c2e37;
  --kwiz-soft:#262933;
  --kwiz-press:#30343f;
  --kwiz-soft-ink:#d3d7e2;
  --kwiz-tag-line:#3d414d;
  --kwiz-card-line:#33363f;
  --kwiz-input:#14151b;
  --kwiz-control-line:#3d414d;
  --kwiz-placeholder:#8d92a0;
  --kwiz-outline:#4a4e5b;
  --kwiz-danger:#ff9aa8;
  --kwiz-feature:linear-gradient(120deg,#20232e,#2a2620);
  --kwiz-feature-line:#3d414d;
  --kwiz-floater:linear-gradient(135deg,#262933,#20232e);
  --kwiz-background:radial-gradient(ellipse at 88% 5%,#2c2620,transparent 29%),radial-gradient(ellipse at 5% 29%,#1c2030,transparent 31%),#121318;
  --kwiz-shadow:0 24px 60px #0000004d;
}

/* Logoet findes i to udgaver, fordi ordet KWIZ ellers forsvinder på mørk baggrund. */
html:not([data-theme=dark]) .logo-dark,body.has-background .logo-dark,html[data-theme=dark] body:not(.has-background) .logo-light { display:none!important; }

/* Knappen kræver JavaScript, så den vises først, når theme.js har sat temaet. */
.theme-toggle { --theme-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 14.5A8.5 8.5 0 0 1 9.5 4a8.5 8.5 0 1 0 10.5 10.5z'/%3E%3C/svg%3E");display:inline-flex;align-items:center;justify-content:center;flex:none;width:44px;height:44px;padding:0;border:1px solid var(--kwiz-outline);border-radius:12px;background:var(--kwiz-paper);color:var(--kwiz-ink);cursor:pointer;transition:background .15s; }
html[data-theme=dark] .theme-toggle { --theme-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='4.2'/%3E%3Cpath d='M12 2v2.5M12 19.5V22M2 12h2.5M19.5 12H22M4.9 4.9l1.8 1.8M17.3 17.3l1.8 1.8M4.9 19.1l1.8-1.8M17.3 6.7l1.8-1.8'/%3E%3C/svg%3E"); }
.theme-toggle::before { content:"";width:20px;height:20px;background:currentColor;-webkit-mask:var(--theme-icon) center/contain no-repeat;mask:var(--theme-icon) center/contain no-repeat; }
.theme-toggle:hover { background:var(--kwiz-soft); }
html:not([data-theme]) .theme-toggle { display:none; }
@media(prefers-reduced-motion:reduce){.theme-toggle{transition:none}}
