/* VocationalLMS soft UI (neumorphism): shared design tokens and base components.
   Loaded by every page (student, lesson player, Studio, sign-in, help center) BEFORE the page's own stylesheet.
   Rules of the look:
   - one soft ground; raised surfaces = paired light/dark shadows; pressed (inset) = active tabs, toggles, inputs, selected items
   - primary actions keep a solid navy/blue fill; states (done / locked / error) always carry color + text/icon, never shadow alone
   - visible keyboard focus everywhere; motion is subtle and switched off for prefers-reduced-motion */
:root{
  /* brand */
  --navy:#003078; --blue:#0059c1; --blue-2:#006cd8; --orange:#f07d10; --orange-ink:#9e4b00;
  /* surfaces: a cool gray tuned to the navy brand */
  --ground:#e4e9f1; --surface:#ebeff5; --surface-2:#f3f6fa; --well:#dce3ed;
  --ink:#0e1f3d; --ink-2:#44536b; --line:#cdd6e3; --field-line:#74829b;
  /* states (text colors pass WCAG AA on their soft backgrounds) */
  --ok:#11693f; --ok-bg:#d8efe2; --bad:#a8231b; --bad-bg:#f6dcd9; --warn:#8a4d00; --warn-bg:#fae9d2; --info-bg:#dbe6f6;
  /* shadows */
  --sh-hi:rgba(255,255,255,.92); --sh-lo:rgba(104,124,160,.36);
  --raise-sm:-3px -3px 7px var(--sh-hi),3px 3px 8px var(--sh-lo);
  --raise:-6px -6px 14px var(--sh-hi),7px 7px 16px var(--sh-lo);
  --raise-lg:-10px -10px 26px var(--sh-hi),14px 14px 32px var(--sh-lo);
  --inset-sm:inset 2px 2px 5px var(--sh-lo),inset -2px -2px 5px var(--sh-hi);
  --inset:inset 4px 4px 9px var(--sh-lo),inset -4px -4px 9px var(--sh-hi);
  --press:inset 2px 3px 7px rgba(0,10,40,.45),inset -1px -1px 2px rgba(255,255,255,.12);
  --lift-primary:-3px -3px 8px var(--sh-hi),4px 5px 12px rgba(0,48,120,.32);
  /* shape + motion */
  --r-xs:8px; --r-sm:12px; --r:16px; --r-lg:22px; --pill:999px;
  --dur:.18s; --ease:cubic-bezier(.2,.7,.2,1);
  --font:"Source Sans 3","Segoe UI",system-ui,sans-serif; --display:"Lexend","Segoe UI",system-ui,sans-serif;
  /* aliases used by older page code and inline styles (keep: learn.js / studio.js / messages-*.js read these) */
  --panel:var(--surface); --rule:var(--line); --ink2:var(--ink-2); --soft:var(--info-bg);
  --okbg:var(--ok-bg); --ok-soft:var(--ok-bg); --badbg:var(--bad-bg); --bad-soft:var(--bad-bg);
  --warn-soft:var(--warn-bg); --orange-soft:var(--warn-bg);
  color-scheme:light;
}
*{box-sizing:border-box}
[hidden]{display:none!important}
html{-webkit-text-size-adjust:100%}
body{margin:0;color:var(--ink);font-family:var(--font);background:var(--ground);
  background-image:radial-gradient(1100px 520px at -5% -8%,rgba(255,255,255,.75),transparent 62%),radial-gradient(900px 600px at 105% 0%,rgba(0,89,193,.05),transparent 60%);
  background-attachment:fixed;-webkit-font-smoothing:antialiased}
h1,h2,h3,h4{font-family:var(--display);color:var(--navy);letter-spacing:-.01em}
a{color:var(--blue);text-underline-offset:2px}
a:hover{color:var(--navy)}
::selection{background:#c7dafa}

/* keyboard focus: always visible, never removed */
:focus{outline:none}
:focus-visible{outline:3px solid var(--blue);outline-offset:3px;border-radius:var(--r-xs)}
button:focus-visible,.btn:focus-visible,summary:focus-visible,[role=tab]:focus-visible{outline:3px solid var(--blue);outline-offset:3px}

/* the logo never shrinks or crops, at any width */
header a:has(>img[src*="logo"]),.top a:has(>img[src*="logo"]){flex:none;display:inline-flex;align-items:center;line-height:0}
img[src*="logo-horizontal"]{flex:none;width:auto;max-width:none;aspect-ratio:720/165;object-fit:contain}
/* the logo files have a white box: multiply blends it into the soft ground */
img[src*="/brand/logo"]{mix-blend-mode:multiply}

/* surfaces */
.soft-raised{background:var(--surface);border-radius:var(--r);box-shadow:var(--raise)}
.soft-inset{background:var(--well);border-radius:var(--r);box-shadow:var(--inset)}

/* form fields: pressed into the surface, with a visible edge */
:where(input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]):not([type=color]),select,textarea){
  font:inherit;color:var(--ink);background:var(--surface-2);border:1px solid var(--field-line);border-radius:var(--r-sm);
  box-shadow:var(--inset-sm);transition:border-color var(--dur) var(--ease),box-shadow var(--dur) var(--ease)}
:where(input:not([type=checkbox]):not([type=radio]),select,textarea):focus{border-color:var(--blue);box-shadow:var(--inset-sm),0 0 0 3px rgba(0,89,193,.28);outline:none}
input::placeholder,textarea::placeholder{color:#5f6c84}
input[type=checkbox],input[type=radio]{accent-color:var(--blue);width:18px;height:18px}
input:disabled,select:disabled,textarea:disabled{opacity:.7;cursor:not-allowed}

@media (prefers-reduced-motion:reduce){
  *,*::before,*::after{transition:none!important;animation:none!important;scroll-behavior:auto!important}
}
@media print{
  body{background:#fff!important}
  *{box-shadow:none!important;text-shadow:none!important}
}

/* ---------- motion: page-to-page transitions and content easing in ----------
   Going from one page to another cross-fades with a small lift (browsers that support cross-document view
   transitions: current Chrome, Edge and Safari; others simply load the page). The header stays still.
   All of it is switched off for people who ask their device for reduced motion. */
/* Cross-document view transitions (the @view-transition opt-in) were removed on 2026-10-07: newer Chromium logged
   "Transition was aborted because of invalid state" as a page error on every hash navigation inside the staff app.
   The rules below stay for browsers that start a transition themselves; without the opt-in they are inert. */
header,.top{view-transition-name:site-header}
::view-transition-old(root){animation:vt-out .2s cubic-bezier(.4,0,1,1) both}
::view-transition-new(root){animation:vt-in .46s cubic-bezier(.22,1,.36,1) both}
::view-transition-group(site-header){animation-duration:.3s}
@keyframes vt-out{to{opacity:0;transform:scale(.988)}}
@keyframes vt-in{from{opacity:0;transform:translateY(16px) scale(.988)}}
@keyframes rise-in{from{opacity:0;transform:translateY(18px) scale(.985);filter:blur(6px)}to{opacity:1;transform:none;filter:none}}
@keyframes sk-pulse{0%,100%{opacity:.55}50%{opacity:1}}
.rise>*{animation:rise-in .55s cubic-bezier(.22,1,.36,1) both}
.rise>*:nth-child(2){animation-delay:.05s}.rise>*:nth-child(3){animation-delay:.1s}.rise>*:nth-child(4){animation-delay:.15s}
.rise>*:nth-child(n+5){animation-delay:.2s}
@media (prefers-reduced-motion:reduce){
  @view-transition{navigation:none}
  .rise>*{animation:none}
  ::view-transition-old(root),::view-transition-new(root){animation:none}
}
