/* Final shared primitives for every published page, including the error shell. */
:root {
 --brand-primary:#460cb6;
 --brand-hover:#380a92;
 --purple:#460cb6;--purple-deep:#380a92;
 --purple-light:#eee7f8;--purple-soft:#f8f5fc;
 --text:#161a25;--muted:#696d78;
 --section:#fafafe;--line:#e9e7f0;
 --space-1:4px;
 --space-2:8px;
 --space-3:12px;
 --space-4:16px;
 --space-6:24px;
 --radius-control:8px;
 --control-height:48px;
 --control-font-size:14px;
 --touch-target:44px;
 --focus-ring:#7040c9;
}
html[data-theme=dark] {
 --purple:#b59ee2;--purple-deep:#d3c5ee;
 --purple-light:#2c1b48;--purple-soft:#1d162c;
 --section:#15111e;--line:#342b42;
 --text:#f3eff8;--muted:#b0a8be;
 --focus-ring:#b997ff;
}

html body .nav-actions {flex-shrink:0;gap:var(--space-3)}
html body .nav-actions>.button {
 flex-shrink:0;white-space:nowrap;
 min-height:var(--touch-target);font-size:12px;
}
html body .theme-button {
 width:var(--touch-target);height:var(--touch-target);flex-shrink:0;
}
.mobile-auth-links {display:grid;gap:var(--space-2);margin-top:var(--space-4)}
html body .mobile-nav a,html body .mobile-nav summary {min-height:var(--touch-target)}
html body .mobile-nav a {display:flex;align-items:center}
.mobile-nav[hidden] {display:none}

html body .contact-form-card :is(input,select,textarea),
html body .directory-search input,
html body .kh-search input,
html body .kh-library-filters select,
html body .kh-newsletter input[type=email] {
 font-family:inherit;font-size:var(--control-font-size);line-height:1.5;
}
html body .contact-form-card :is(input,select,textarea),
html body .kh-library-filters select,
html body .kh-newsletter input[type=email] {
 border:1px solid var(--line);border-radius:var(--radius-control);
}
html body .contact-form-card :is(input,select),
html body .directory-search,
html body .kh-search,
html body .kh-library-filters select,
html body .kh-newsletter input[type=email] {
 min-height:var(--control-height);
}
html body .contact-form-card :is(input,select) {
 height:var(--control-height);padding:var(--space-3);
}
html body .contact-form-card textarea {
 min-height:144px;padding:var(--space-3);
}
html body .kh-newsletter input[type=email] {border-radius:var(--radius-control) 0 0 var(--radius-control)}
html body .kh-newsletter input[type=email] {height:var(--control-height);padding:var(--space-3)}
html body :is(.directory-search,.kh-search):focus-within,
html body .contact-form-card :is(input,select,textarea):focus-visible,
html body .kh-library-filters select:focus-visible,
html body .kh-newsletter input[type=email]:focus-visible {
 outline:3px solid var(--focus-ring);outline-offset:3px;
}
html body .cookie-choice {
 min-height:var(--touch-target);border-radius:var(--radius-control);
 border-color:var(--brand-primary);background:var(--brand-primary);
}
html body .cookie-choice:hover {
 border-color:var(--brand-hover);background:var(--brand-hover);
}
html body #cookie-close {width:var(--touch-target);height:var(--touch-target)}

@media(min-width:1101px) {
 html body .mobile-nav {display:none}
}
@media(max-width:1100px) {
 html body .desktop-nav {display:none}
 html body .mobile-menu-toggle {
  display:inline-flex;flex-shrink:0;background:transparent;border:0;
  width:var(--touch-target);height:var(--touch-target);padding:10px;
 }
 html body .site-header {height:72px}
 html body .nav-wrap {gap:var(--space-3);padding-inline:var(--space-6)}
 html body .nav-actions>.sign-in {display:none}
 html body .nav-actions>.button {padding:10px 12px;gap:var(--space-2)}
 html body .mobile-nav {max-height:calc(100svh - 72px);overflow-y:auto}
}
@media(max-width:640px) {
 :root {--control-font-size:16px}
 html body .nav-wrap {padding-inline:var(--space-4)}
 html body .nav-actions {gap:var(--space-2)}
 html body .brand img {width:137px}
 html body .cookie-choice {font-size:14px}
}
@media(max-width:420px) {
 html body .nav-actions>.button {display:none}
}
