/* theorie.rijsim.nl design round (Rob 29.11.2026, Leib: "more professional and premium, for sure the buttons" + "a light mode,
   the website is by default dark"). Loaded LAST on every theory-host page by functions/_middleware.js (withTheme), never on
   rijsim.nl. Three parts:
   1. theme tokens: dark = site.css :root values; [data-theme=light] redefines them (theorie.css has the first set, made for the
      exam screen). Shared CSS uses tokens with the old dark value as fallback (--ink, --copy, --bg-rgb, --sunk, --raise,
      --accent-ink), so rijsim.nl looks exactly as before.
   2. one button system for the whole theory site: primary (.btn), secondary (.btn.ghost), small (.btn.small), plus the header
      buttons. 48 px high (small 44), 12 px corners, a calm 2 px key edge instead of the 4 px one (Josef 27.10 wanted depth,
      not flat; this keeps the depth without the toy look), clear hover / active / focus-visible / disabled states.
   3. light-mode fixes for colours that live in generated inline styles (theorie-shop pages, offer.js, helpbot.js). */

/* ---------- 1. tokens ---------- */
:root{--btn-h:48px;--btn-r:12px;--focus:#ffd27a;--accent-ink:#ffae3d;--on-accent:#1b1206;--line-strong:rgb(var(--ink,255 255 255) / .16);
  --shadow-1:0 1px 2px rgba(0,0,0,.35);--shadow-2:0 1px 2px rgba(0,0,0,.3),0 10px 30px -14px rgba(0,0,0,.65);--hi:#fff}
:root[data-theme=dark]{color-scheme:dark}
[data-theme=light]{color-scheme:light;
  --bg:#f5f6f8;--bg2:#eef1f4;--card:#ffffff;--sunk:#eef1f4;--raise:#ffffff;--raise2:#f3f5f8;
  --line:rgba(17,24,39,.12);--line-strong:rgba(17,24,39,.2);--text:#111827;--muted:#556170;--copy:#2b3442;--text2:#2b3442;--hi:#0b1220;
  --ink:17 24 39;--bg-rgb:245 246 248;
  --accent:#ff9f1a;--accent2:#ffb84d;--accent-ink:#a24f00;--good:#12783a;--bad:#c42b2d;--warn:#9a5200;--focus:#a24f00;
  --tint:rgba(17,24,39,.04);--tint2:rgba(17,24,39,.08);
  --shadow-1:0 1px 2px rgba(17,24,39,.08);--shadow-2:0 1px 2px rgba(17,24,39,.06),0 12px 32px -16px rgba(17,24,39,.22);
  --card-depth:0 1px 2px rgba(17,24,39,.06),0 10px 28px -14px rgba(17,24,39,.18);
  background:var(--bg);color:var(--text)}
html.ts-th-anim,html.ts-th-anim body,html.ts-th-anim *{transition:background-color .25s ease,border-color .25s ease,color .2s ease!important}
body{background:var(--bg);color:var(--text)}

/* ---------- 2. buttons ---------- */
html .btn{display:inline-flex;align-items:center;justify-content:center;gap:.55em;min-height:var(--btn-h);padding:12px 22px;border-radius:var(--btn-r);
  border:1px solid transparent;font:inherit;font-size:16px;font-weight:700;line-height:1.2;letter-spacing:-.005em;text-align:center;text-decoration:none;
  background:var(--accent);color:var(--on-accent);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.3),0 1px 2px rgba(0,0,0,.18),0 6px 16px -8px rgba(255,140,0,.5);
  transition:background-color .15s ease,box-shadow .15s ease,transform .12s ease,border-color .15s ease,color .15s ease;-webkit-tap-highlight-color:transparent}
html .btn:hover{background:#ffab38;transform:translateY(-1px);box-shadow:inset 0 1px 0 rgba(255,255,255,.34),0 2px 4px rgba(0,0,0,.16),0 12px 24px -10px rgba(255,140,0,.55)}
html .btn:active{background:#f39410;transform:translateY(0);box-shadow:inset 0 2px 4px rgba(120,60,0,.25)}
html .btn:focus-visible{outline:2px solid var(--focus);outline-offset:3px}
html .btn:disabled,html .btn[aria-disabled=true],html .btn.ghost:disabled{background:rgb(var(--ink,255 255 255) / .08);color:var(--muted);border-color:transparent;opacity:1;cursor:not-allowed;transform:none;box-shadow:none}
html .btn svg{flex:none;width:1.1em;height:1.1em}
/* secondary: a quiet surface with a hairline border */
html .btn.ghost{background:rgb(var(--ink,255 255 255) / .06);color:var(--text);border-color:var(--line-strong);box-shadow:var(--shadow-1)}
html .btn.ghost:hover{background:rgb(var(--ink,255 255 255) / .1);border-color:rgb(var(--ink,255 255 255) / .26);box-shadow:var(--shadow-1)}
html .btn.ghost:active{background:rgb(var(--ink,255 255 255) / .13);box-shadow:none}
[data-theme=light] .btn.ghost{background:#fff;color:var(--text);border-color:var(--line-strong);box-shadow:0 1px 2px rgba(17,24,39,.06)}
[data-theme=light] .btn.ghost:hover{background:#f7f8fa;border-color:rgba(17,24,39,.3)}
[data-theme=light] .btn.ghost:active{background:#eef1f4}
html .btn.small{min-height:44px;padding:9px 16px;font-size:15px;border-radius:10px}
html .btn.ghost.small{box-shadow:none}
[data-theme=light] .btn.on{border-color:var(--warn);color:var(--warn)}
@media (prefers-reduced-motion:reduce){html .btn,html .btn:hover,html .btn:active{transform:none;transition:none}}

/* header: login is secondary (the page's own primary button is the next step), theme toggle is an icon button */
html .ts-acct{min-height:40px;padding:0 14px;border-radius:10px;background:transparent;color:var(--text)!important;border:1px solid var(--line-strong);box-shadow:none;font-weight:700}
html .ts-acct:hover{filter:none;background:rgb(var(--ink,255 255 255) / .07)}
html .ts-acct:focus-visible{outline:2px solid var(--focus);outline-offset:2px}
html .ts-acct svg{color:var(--accent-ink)}
.ts-theme{flex:none;display:inline-flex;align-items:center;justify-content:center;width:40px;height:40px;margin-inline-start:6px;padding:0;border-radius:10px;
  border:1px solid var(--line-strong);background:transparent;color:var(--text);cursor:pointer;-webkit-tap-highlight-color:transparent;position:relative}
.ts-theme::before{content:"";position:absolute;inset:-3px}   /* 46 px touch target */
.ts-theme:hover{background:rgb(var(--ink,255 255 255) / .07)}
.ts-theme:focus-visible{outline:2px solid var(--focus);outline-offset:2px}
.ts-theme svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.ts-theme .ts-th-moon{display:none}
[data-site-theme=light] .ts-theme .ts-th-sun{display:none}[data-site-theme=light] .ts-theme .ts-th-moon{display:block}
.nav nav{align-items:center}
@media (max-width:440px){.ts-theme{width:38px;height:38px;margin-inline-start:2px}html .ts-acct{padding:0 10px;margin-inline-start:4px}}

/* ---------- 3. calmer, more confident type and surfaces (both themes) ---------- */
.ts h1,.ts h2,main h1,main h2{font-weight:750;letter-spacing:-.022em}
.ts h3,main h3{font-weight:700;letter-spacing:-.01em}
.kicker{letter-spacing:.12em;font-weight:700}
/* one accent: the big numbers are text colour, the orange stays for actions and small markers */
.ts .w-stat b .w-n{color:var(--text);font-weight:800}
/* inputs match the buttons: same height, 12 px corners, a visible focus ring */
.ts .rs-kh input[type=email],.rs-k input[type=email],.rs-k input[name=code]{border-radius:var(--btn-r)!important;min-height:var(--btn-h)}
.ts .rs-kh input[type=email]:focus-visible,.rs-k input:focus-visible{outline:2px solid var(--focus);outline-offset:2px}
/* the hero's own buttons were pills with their own sizes */
html .ts .btn.kh-go,html .ts .rs-kh button,html .rs-k form button{border-radius:var(--btn-r)}
html .ts .btn.kh-go{box-shadow:inset 0 1px 0 rgba(255,255,255,.3),0 1px 2px rgba(0,0,0,.18),0 8px 20px -8px rgba(255,140,0,.55)}

/* ---------- 4. light mode: page chrome ---------- */
[data-theme=light] .nav{background:rgba(255,255,255,.86);border-bottom:1px solid var(--line)}
[data-theme=light] .nav.on-hero{animation:none}
[data-theme=light] .nav nav a,[data-theme=light] .nav .brand,[data-theme=light] .nav summary{color:var(--text)}
[data-theme=light] .nav nav a:hover{color:var(--hi)}
[data-theme=light] .lang-sw a{color:var(--muted)}[data-theme=light] .lang-sw a[aria-current]{color:var(--text)}
[data-theme=light] footer.foot{background:var(--bg2);border-top-color:var(--line);color:var(--muted)}
[data-theme=light] footer.foot a{color:var(--copy)}
[data-theme=light] footer.foot a:hover{color:var(--hi)}
[data-theme=light] .ts-trust li,[data-theme=light] .ts-trust p{color:var(--copy)}
[data-theme=light] .card,[data-theme=light] .ts .card{box-shadow:var(--card-depth)}
[data-theme=light] ::selection{background:rgba(255,159,26,.3)}

/* dark islands in light mode: the home hero (its picture has a dark sky baked in; >700 px the text sits on it) and the
   Theorie Wereld card keep the dark tokens, so they read as deliberate dark panels on the light page */
[data-theme=light] .ts .w-wereld,[data-theme=light] .ts .hv,[data-theme=light] .cx-art{
  --bg:#0b0f14;--bg2:#111720;--card:#151c26;--sunk:#0d1219;--raise:#18202b;--raise2:#212939;--line:rgba(255,255,255,.12);--line-strong:rgba(255,255,255,.2);--text:#eef1f5;--muted:#a3adbb;
  --copy:#dfe5ee;--text2:#dfe5ee;--hi:#fff;--ink:255 255 255;--bg-rgb:11 15 20;--accent-ink:#ffae3d;--focus:#ffd27a;--tint:rgba(255,255,255,.06);--tint2:rgba(255,255,255,.11);
  --card-depth:inset 0 1px 0 rgba(255,255,255,.06),0 1px 2px rgba(0,0,0,.35),0 12px 28px -10px rgba(0,0,0,.6);--shadow-1:0 1px 2px rgba(0,0,0,.35);color:var(--text)}
@media (min-width:701px){
  [data-theme=light] .ts main .th,[data-theme=light] .cx-hero{
  --bg:#0b0f14;--bg2:#111720;--card:#151c26;--sunk:#0d1219;--raise:#18202b;--raise2:#212939;--line:rgba(255,255,255,.12);--line-strong:rgba(255,255,255,.2);--text:#eef1f5;--muted:#a3adbb;
  --copy:#dfe5ee;--text2:#dfe5ee;--hi:#fff;--ink:255 255 255;--bg-rgb:33 41 57;--accent-ink:#ffae3d;--focus:#ffd27a;--tint:rgba(255,255,255,.06);--tint2:rgba(255,255,255,.11);
  --card-depth:inset 0 1px 0 rgba(255,255,255,.06),0 1px 2px rgba(0,0,0,.35),0 12px 28px -10px rgba(0,0,0,.6);--shadow-1:0 1px 2px rgba(0,0,0,.35);color:var(--text)}
  /* the resume card hangs over the hero edge: it stays a light card */
  [data-theme=light] .cx-hero .cx-resume{
  --bg:#f5f6f8;--bg2:#eef1f4;--card:#ffffff;--sunk:#eef1f4;--raise:#ffffff;--raise2:#f3f5f8;--line:rgba(17,24,39,.12);--line-strong:rgba(17,24,39,.2);--text:#111827;--muted:#556170;
  --copy:#2b3442;--text2:#2b3442;--hi:#0b1220;--ink:17 24 39;--bg-rgb:245 246 248;--accent-ink:#a24f00;--focus:#a24f00;--tint:rgba(17,24,39,.04);--tint2:rgba(17,24,39,.08);
  --card-depth:0 1px 2px rgba(17,24,39,.06),0 10px 28px -14px rgba(17,24,39,.18);--shadow-1:0 1px 2px rgba(17,24,39,.08);color:var(--text)}
  /* the picture ends in a straight edge instead of fading into the (now light) page */
  [data-theme=light] .ts .hv:after{background:linear-gradient(90deg,#212939 0,rgba(33,41,57,.92) 26%,rgba(33,41,57,0) 52%)}
  [data-theme=light] .ts main .th h1,[data-theme=light] .cx-hero h1{color:#fff}
  [data-theme=light] .cx-art:after{background:linear-gradient(90deg,#212939 0,rgba(33,41,57,.94) 40%,rgba(33,41,57,0) 64%)}
  /* round 18 (29.11): the course hero is taller than its picture (CTA, stats, update line, language chips), so in light mode the
     stats and chips fell onto the light page in white and the ghost button was white on white. The whole hero is the dark
     panel now (full-bleed background, same colour as the picture's own ground), and its ghost button is the dark-panel one. */
  [data-theme=light] .cx-hero{background:#212939;box-shadow:0 0 0 100vmax #212939;clip-path:inset(0 -100vmax)}
  [data-theme=light] .cx-hero .btn.ghost{background:rgba(255,255,255,.08);color:#fff;border-color:rgba(255,255,255,.4);box-shadow:none}
  [data-theme=light] .cx-hero .btn.ghost:hover{background:rgba(255,255,255,.16);border-color:rgba(255,255,255,.6)}
}
/* phones: the hero picture is a card above the text, the text is on the light page */
@media (max-width:700px){
  [data-theme=light] .ts main .th .hv{box-shadow:0 18px 40px -22px rgba(17,24,39,.45)}
  [data-theme=light] .ts .hv:after,[data-theme=light] .cx-art:after{background:none}
  [data-theme=light] .cx-art{box-shadow:0 18px 40px -22px rgba(17,24,39,.45)}
}
/* drawings with their own dark or green ground get a hairline frame on the light page */
[data-theme=light] .cs-draw,[data-theme=light] .cs-fig,[data-theme=light] .w-demo .dq-fig,[data-theme=light] .les-fig svg,[data-theme=light] .ts figure img{outline:1px solid var(--line);outline-offset:-1px}

/* ---------- 5. light mode: leftovers the generator cannot see ---------- */
[data-theme=light] [style*="color:#cdd4de"]{color:var(--copy)!important}
[data-theme=light] [style*="color:#9aa5b4"]{color:var(--muted)!important}
[data-theme=light] .cs-tag.free{color:#fff}
[data-theme=light] .les-outline .k,[data-theme=light] .les-play .k,[data-theme=light] .cs-oefen b{color:#1d5fb8}
[data-theme=light] .les-ostep:hover,[data-theme=light] .les-ostep:focus-visible{color:#1d5fb8}
html .btn s{opacity:.8}
/* phones: hero text sits on the light page (the generator maps the hero's white literals to --hi / --copy) */
@media (max-width:480px){.nav nav a .nav-tw{display:none}}
/* "Theorie Wereld": the link is inline-flex, which ate the space at the end of the span */
.nav nav a .nav-tw{white-space:pre}
[data-theme=light] .ts .rs-kh .kh-price s,[data-theme=light] .rs-oc-p s{opacity:.9}
/* phones, course/login pages: logo + Wereld + Prijs + NL|EN + theme + Inloggen must fit 360 px; "Cursus" goes (as on the
   theory home's phone header), so the logo never gets squeezed out */
@media (max-width:480px){header.nav nav>a[href$="/cursus/"]{display:none}.nav .brand{flex:none}}

/* header bar: one surface on every page in light mode (the shop pages' own nav colour lost to the generic one) */
html[data-theme=light] header.nav{background:rgba(255,255,255,.97)!important;border-bottom:1px solid var(--line)!important}
/* lesson: answer buttons and prev/next cards read as secondary buttons (white + hairline), not as greyed-out boxes */
[data-theme=light] .les-btns button,[data-theme=light] .les-sign,[data-theme=light] .les-mean,[data-theme=light] .les-pg{background:#fff;border:1px solid var(--line-strong);box-shadow:0 1px 2px rgba(17,24,39,.05)}
[data-theme=light] .les-btns button:hover:not([disabled]),[data-theme=light] .les-sign:hover:not([disabled]),[data-theme=light] .les-mean:hover:not([disabled]),[data-theme=light] .les-pg:hover{background:#f7f8fa;border-color:rgba(17,24,39,.3)}
[data-theme=light] .les-btns button.ok,[data-theme=light] .les-sign.ok,[data-theme=light] .les-mean.ok{border-color:var(--good);background:rgba(18,120,58,.1)}
[data-theme=light] .les-btns button.no,[data-theme=light] .les-mean.no{border-color:var(--bad);background:rgba(196,43,45,.08)}
.les-pg .k{color:var(--accent-ink,#ff9f1a)}
/* "Even doen": one accent colour on the site, so the exercise box is a plain card with an orange edge instead of a blue glow */
.les-play{background:var(--card);border:1px solid var(--line);border-inline-start:3px solid var(--accent);box-shadow:none}
.les-play .k,.les-onthoud .k,.les-mini .k{color:var(--accent-ink,#ff9f1a)}
[data-theme=light] .les-outline .k,[data-theme=light] .les-play .k{color:var(--accent-ink)}
[data-theme=light] .les-play{box-shadow:0 1px 2px rgba(17,24,39,.05)}
/* audio player: hairline border, neutral speed control */
.rs-vo{border-color:var(--line)!important}
[data-theme=light] .rs-vo select{background-color:#fff;border:1px solid var(--line-strong)}
/* inputs in light mode: white with a hairline */
[data-theme=light] input[type=email],[data-theme=light] input[type=text],[data-theme=light] input[type=search],[data-theme=light] input[type=date],[data-theme=light] input[name=code],[data-theme=light] select,[data-theme=light] textarea{background-color:#fff;color:#111827;border-color:rgba(17,24,39,.2)}
/* mock-exam menu: the mode picker is not a card of its own (it is not one in dark mode either) */
[data-theme=light] body:not(.px-run) .ts-mini.card{background:transparent;box-shadow:none;border-color:transparent}
[data-theme=light] .rs-vo,[data-theme=light] .rs-vo input{color-scheme:light}
/* mock-exam mode cards: white cards with a hairline on the light page (the tint read as disabled) */
[data-theme=light] .ts-mode:not(.px-m-full){background:#fff;border-color:var(--line);box-shadow:0 1px 2px rgba(17,24,39,.05)}
