/* A compact, keyboard-accessible theme control with a full touch target. */
.theme-toggle{
  display:grid;place-items:center;position:relative;flex:0 0 44px;
  width:44px;height:44px;min-width:44px;min-height:44px;padding:0;
  border:1px solid #d3ddf2;border-radius:12px;
  background:linear-gradient(145deg,#f6faff,#e8efff);color:#3860b5;
  box-shadow:inset 0 1px 0 #ffffffb3;cursor:pointer;
  transition:background .2s,border-color .2s,color .2s,box-shadow .2s;
}
.theme-toggle[hidden]{display:none}
.theme-toggle:hover{
  border-color:#a8bff0;color:#244fc1;
  background:linear-gradient(145deg,#ecf7ff,#e4eaff);
  box-shadow:0 3px 12px #3d68cf12,inset 0 1px 0 #fff;
}
.theme-toggle:focus-visible{outline:2px solid #4167eb;outline-offset:3px}
.theme-toggle svg{
  grid-area:1/1;width:19px;height:19px;fill:none;stroke:currentColor;
  stroke-width:1.65;stroke-linecap:round;stroke-linejoin:round;
  pointer-events:none;
}
.theme-toggle .theme-icon-sun{display:none}
.theme-toggle .theme-icon-moon{display:block}
html[data-theme="dark"] .theme-toggle{
  border-color:#2a436b;color:#7bdaff;
  background:linear-gradient(145deg,#102443,#0d1932);
  box-shadow:inset 0 1px 0 #78bdff12;
}
html[data-theme="dark"] .theme-toggle:hover{
  border-color:#3d78bf;color:#b6efff;
  background:linear-gradient(145deg,#153456,#102145);
  box-shadow:0 0 19px #1478ff1c,inset 0 1px 0 #9dd7ff1a;
}
html[data-theme="dark"] .theme-toggle:focus-visible{outline-color:#66d6ff}
html[data-theme="dark"] .theme-toggle .theme-icon-sun{display:block}
html[data-theme="dark"] .theme-toggle .theme-icon-moon{display:none}
@media(max-width:700px){
  .nav-shell{padding-inline:12px;gap:6px}
  .nav-actions{gap:4px}
  .theme-toggle{border-radius:11px}
}
@media(max-width:380px){
  .nav-shell{gap:4px}
  .brand .logo-crop{width:112px;height:27px}
  .nav-actions{gap:4px}
}
@media(prefers-reduced-motion:reduce){.theme-toggle{transition:none}}
