/* Shared appearance, navigation and accessible light/dark switch. */
:root{
  color-scheme:light;
  --theme-bg:#f3f5f7;
  --theme-surface:#ffffff;
  --theme-raised:#eef3fa;
  --theme-soft:#e6edf8;
  --theme-border:#d6dfeb;
  --theme-text:#142033;
  --theme-muted:#596d88;
  --theme-accent:#245bff;
}
html[data-theme="dark"]{
  color-scheme:dark;
  --ink:#f5f7fb;
  --muted:#afb7c5;
  --blue:#83bcff;
  --paper:#07090e;
  --line:#2a313d;
  --theme-bg:#07090e;
  --theme-surface:#11151c;
  --theme-raised:#1b212b;
  --theme-soft:#161e2c;
  --theme-border:#2a313d;
  --theme-text:#f5f7fb;
  --theme-muted:#afb7c5;
  --theme-accent:#83bcff;
  --theme-primary:#326dff;
  --theme-cyan:#58d5f7;
  background:var(--theme-bg);
}
.header .header-actions{gap:16px;flex-shrink:0}
.header .header-signin{display:inline-flex;align-items:center;min-height:44px}
.header .menu-button{width:44px;height:44px;flex-shrink:0}
.theme-toggle{
  display:inline-flex;align-items:center;justify-content:center;gap:9px;
  min-height:44px;padding:5px 9px 5px 5px;flex-shrink:0;
  border:1px solid var(--theme-border);border-radius:999px;
  background:var(--theme-surface);color:var(--theme-text);
  font:650 14px/1 var(--font);cursor:pointer;
}
.theme-toggle:hover{border-color:#8ca9cf}
.theme-toggle:focus-visible{outline:3px solid var(--theme-accent);outline-offset:4px}
.theme-switch-track{position:relative;display:grid;grid-template-columns:26px 26px;gap:2px;align-items:center;justify-items:center;height:32px;border-radius:99px;background:var(--theme-raised);isolation:isolate}
.theme-switch-thumb{position:absolute;z-index:-1;left:2px;top:3px;width:25px;height:26px;border-radius:50%;background:#fff;box-shadow:0 1px 4px #15284b24;transition:transform .22s ease,background .22s ease}
.theme-switch-track svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.theme-sun{color:#405b80}
.theme-moon{color:#8191a8}
.theme-mode-label{min-width:35px;text-align:left}
.theme-label-dark{display:none}
html[data-theme="dark"] .theme-toggle{background:linear-gradient(145deg,#191e27,#0c1017);border-color:#ffffff21;box-shadow:inset 0 1px 0 #ffffff0a,0 4px 12px #0003}
html[data-theme="dark"] .theme-switch-track{background:#07090e}
html[data-theme="dark"] .theme-switch-thumb{transform:translateX(25px);background:#326dff;box-shadow:0 0 12px #326dff40}
html[data-theme="dark"] .theme-sun{color:#96a0af}
html[data-theme="dark"] .theme-moon{color:#fff}
html[data-theme="dark"] .theme-label-light{display:none}
html[data-theme="dark"] .theme-label-dark{display:inline}
html[data-theme="dark"] body{background:var(--theme-bg);color:var(--theme-text)}
html[data-theme="dark"] ::selection{background:#2a5bd3;color:#fff}
html[data-theme="dark"] .header{background:#07090ef2;border-bottom-color:#ffffff12}
html[data-theme="dark"] .header.is-scrolled{box-shadow:0 10px 35px #0005}
html[data-theme="dark"] .header :is(.brand,.navigation a,.header-signin,.header-signup){color:#d6dce6}
html[data-theme="dark"] .header :is(.brand,.navigation a,.header-signin,.header-signup):hover{color:#fff}
html[data-theme="dark"] .menu-button span{background:#e7edf7}
html[data-theme="dark"] .navigation.is-open{background:#10141c;border-color:var(--theme-border)}
html[data-theme="dark"] .button-blue,
html[data-theme="dark"] .button-ink{background:linear-gradient(135deg,#2d64ed,#204cd2);color:#fff;border-color:#5889ff;box-shadow:inset 0 1px 0 #ffffff26,0 6px 24px #1746ca38}
html[data-theme="dark"] .button-blue:hover,
html[data-theme="dark"] .button-ink:hover{background:linear-gradient(135deg,#346cec,#2a58d8);color:#fff;box-shadow:inset 0 1px 0 #ffffff30,0 8px 28px #1746ca50}
html[data-theme="dark"] .button-outline{background:linear-gradient(150deg,#ffffff0d,#ffffff03);border-color:#ffffff30;color:#e5eaf3;box-shadow:inset 0 1px 0 #ffffff05}
html[data-theme="dark"] .button-outline:hover{background:#ffffff12;border-color:#ffffff59}
html[data-theme="dark"] .text-link{color:#a7cfff}
html[data-theme="dark"] .text-link:hover{color:#fff}
html[data-theme="dark"] .skip-link{background:#f5f7fb;color:#10151d}
html[data-theme="dark"] .footer{background:radial-gradient(ellipse at 15% 0,#16376a1f,transparent 50%),#090c12;border-top:1px solid #ffffff12}
html[data-theme="dark"] .footer-brand p{color:#e6ebf4}
html[data-theme="dark"] .footer nav a{color:#b7bfcc}
html[data-theme="dark"] .footer nav a:hover{color:#fff}
html[data-theme="dark"] .footer-bottom{color:#9da8ba;border-color:#ffffff13}
html[data-theme="dark"] #motion-toggle{color:#c9d1de;border-color:#ffffff30}
@media(max-width:1080px){
  body:is([data-page="home"],[data-page="shop"]) .navigation{display:none;position:absolute;left:0;right:0;top:100%;margin:0;padding:24px var(--gutter);border-bottom:1px solid var(--theme-border);background:var(--theme-bg);flex-direction:column;align-items:flex-start;gap:22px}
  body:is([data-page="home"],[data-page="shop"]) .navigation.is-open{display:flex}
  body:is([data-page="home"],[data-page="shop"]) .menu-button{display:block}
}
@media(max-width:650px){
  .header .header-actions{gap:8px}
  .header .theme-toggle{padding:5px;min-width:64px}
  .header .theme-mode-label{display:none}
  .header .header-portal{width:44px;min-width:44px;min-height:44px;padding:10px}
  .header .header-portal svg{display:block;width:22px;height:22px;flex:none}
  .header .header-portal span{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);clip-path:inset(50%);white-space:nowrap}
}
@media(max-width:360px){
  .header .header-actions{gap:5px}
  .header .theme-toggle{min-width:60px;padding:3px}
}
@media(prefers-reduced-motion:reduce){.theme-switch-thumb{transition:none}}
