@layer reset, base, layout, components, responsive, theme;
@layer theme {
  :root{
    --brand-blue:#173cbe;--brand-anthracite:#292e36;--brand-white:#f5f7fa;
    --page-bg:var(--brand-white);--surface:#fff;--paper:var(--brand-white);--ink:var(--brand-anthracite);
    --blue:var(--brand-blue);--blue-dark:#113197;--action-bg:var(--brand-blue);--action-hover:#113197;--logo-color:var(--brand-blue)
  }
  body{background:var(--page-bg);color:var(--ink)}
  .site-header{background:#f5f7faf5}
  .home-hero{background:linear-gradient(105deg,var(--brand-white),#edf0f5)}
  .site-footer,.language-options,.mobile-menu nav{background:var(--surface)}
  .wordmark{color:var(--logo-color);direction:ltr}
  .wordmark .logo-square{background:currentColor}
  ::selection{background:var(--action-bg);color:#fff}
  .utility-actions{display:flex;gap:14px;align-items:center}.utility-actions .theme-toggle{width:36px;height:36px;min-width:36px;padding:8px;margin-block:4px}
  :root[data-theme=dark]{
    --page-bg:var(--brand-anthracite);--surface:#30353e;--ink:var(--brand-white);--muted:#c1c6d0;--line:#555d6a;--paper:#343a44;--light-blue:#3a4661;
    --blue:#b4c7ff;--blue-dark:#cad7ff;--action-bg:var(--brand-blue);--action-hover:#214bd5;--logo-color:#fff;
    --study-top:#4b566c;--study-top-alt:#414d62;--study-light:#46536b;--study-base:#3b465b;--study-shadow:#303948;--study-side:#3c4d6d;--study-edge:#35435b;
    color:var(--ink);background:var(--page-bg)
  }
  [data-theme=dark] body{background:var(--page-bg);color:var(--ink)}
  [data-theme=dark] .site-header{background:#292e36f5}
  [data-theme=dark] .home-hero{background:linear-gradient(110deg,var(--brand-anthracite),#343a44)}
  [data-theme=dark] :is(.site-footer,.language-options,.mobile-menu nav){background:var(--surface)}
  [data-theme=dark] :is(input,select,textarea){background:var(--brand-anthracite);border-color:var(--line);color:var(--ink);caret-color:var(--ink)}
  [data-theme=dark] :is(fieldset,legend,option,optgroup){color:var(--ink);border-color:var(--line)}
  [data-theme=dark] :is(option,optgroup){background:var(--brand-anthracite)}
  [data-theme=dark] :is(input,select,textarea):focus-visible{outline:2px solid var(--blue);outline-offset:2px}
  [data-theme=dark] ::placeholder{color:#b3bac6;opacity:1}
  [data-theme=dark] :is(.button-blue,.header-quote,.next-step,.cart-toast,.skip-link){background:var(--action-bg);color:#fff}
  [data-theme=dark] :is(.button-blue,.header-quote):hover{background:var(--action-hover)}
  [data-theme=dark] .button-white{background:var(--brand-white);color:var(--brand-blue)}[data-theme=dark] .button-white:hover{background:#dce4fa}
  [data-theme=dark] .process-study{background:#343a44;color:#b4c7ff;border-color:var(--line)}
  [data-theme=dark] .utility-bar{color:var(--muted)}
  [data-theme=dark] .principle,[data-theme=dark] .category-card .add-to-cart{border-color:var(--line)}
  [data-theme=dark] .outline-word{-webkit-text-stroke-color:#617fac}
  [data-theme=dark] .material-strip i{color:#7186a7}
  [data-theme=dark] :is(.draft-notice,.storage-warning){background:#302819;color:#e9ce98;border-color:#93713b}
  [data-theme=dark] .planner-notice{color:#c6d7ff}
  [data-theme=dark] .language-switch a,[data-theme=dark] .remove-row{color:var(--muted)}
  [data-theme=dark] input:-webkit-autofill,[data-theme=dark] textarea:-webkit-autofill{-webkit-box-shadow:0 0 0 1000px var(--brand-anthracite) inset;-webkit-text-fill-color:var(--ink)}
  @media(max-width:480px){.utility-actions{gap:8px}.utility-inner>span:first-child{min-width:0;max-width:145px}.utility-actions .theme-toggle{width:36px;height:36px}}
}
