/* Shared light/dark switch, matching the SRConED header. */
html body button.site-theme-switch {
  display:inline-flex!important; align-items:center; justify-content:center;
  width:38px!important; height:38px!important; min-width:38px!important; min-height:38px!important;
  padding:0!important; border:1px solid var(--line,#dce5ed)!important;
  border-radius:50%!important; flex:none; box-sizing:border-box;
  background:var(--surface,var(--panel,#fff))!important; color:var(--ink,#314a60)!important;
  box-shadow:none!important; cursor:pointer; line-height:1; letter-spacing:0;
}
html body button.site-theme-switch svg {
  width:18px!important; height:18px!important; fill:none; stroke:currentColor;
  stroke-width:2!important; stroke-linecap:round; stroke-linejoin:round; pointer-events:none;
}
html body button.site-theme-switch:hover {background:var(--surface-2,var(--field,#edf4fa))!important;}
html body button.site-theme-switch:focus-visible {outline:2px solid var(--focus,var(--accent,#376b92));outline-offset:2px;}
html[data-theme="dark"] body button.site-theme-switch,
html[data-preview-theme="dark"] body button.site-theme-switch {
  background:var(--surface,var(--panel,#19232f))!important; color:var(--ink,#d7e1eb)!important;
  border-color:var(--line,#394d62)!important;
}
html[data-theme="dark"] body button.site-theme-switch:hover,
html[data-preview-theme="dark"] body button.site-theme-switch:hover {background:var(--surface-2,var(--field,#223244))!important;}
/* Colour modes for older content pages that did not have a theme switch. */
html.site-theme-legacy[data-theme="dark"] {color-scheme:dark;}
html.site-theme-legacy[data-theme="dark"] body,
html.site-theme-legacy[data-theme="dark"] #wrapper,
html.site-theme-legacy[data-theme="dark"] #main,
html.site-theme-legacy[data-theme="dark"] #header,
html.site-theme-legacy[data-theme="dark"] #footer,
html.site-theme-legacy[data-theme="dark"] #menu {background:#111922;color:#d7e1eb;}
html.site-theme-legacy[data-theme="dark"] a {color:#a6c8e3;}
html.site-theme-legacy[data-theme="dark"] input,
html.site-theme-legacy[data-theme="dark"] select,
html.site-theme-legacy[data-theme="dark"] textarea {background:#19232f;color:#d7e1eb;border-color:#394d62;}
html.site-theme-legacy[data-theme="dark"] table tbody tr {background:#19232f;border-color:#394d62;}
html.site-theme-legacy[data-theme="dark"] table tbody tr:nth-child(2n+1) {background:#223244;}

/* Compact About and Help controls; preserve page-specific dialog handlers. */
html body button.site-about-button,
html body button.site-help-button{
 display:inline-flex!important;align-items:center;justify-content:center;flex:none;
 width:38px!important;height:38px!important;min-width:38px!important;min-height:38px!important;
 max-width:38px!important;max-height:38px!important;padding:0!important;border-radius:50%!important;
 border:1px solid var(--line,#dce5ed);background:var(--field,#fff);color:var(--accent,#376b92);
 box-sizing:border-box;line-height:1;cursor:pointer;
}
html body button.site-about-button svg,
html body button.site-help-button svg{
 width:18px!important;height:18px!important;display:block;fill:none;stroke:currentColor;
 stroke-width:2;stroke-linecap:round;stroke-linejoin:round;pointer-events:none;
}

/* Compact Home controls with the same dimensions as the About and theme buttons. */
html body .site-home-button{
 display:inline-flex!important;align-items:center;justify-content:center;flex:none;
 width:38px!important;height:38px!important;min-width:38px!important;min-height:38px!important;
 max-width:38px!important;max-height:38px!important;padding:0!important;border-radius:50%!important;
 border:1px solid var(--line,#dce5ed)!important;background:var(--field,var(--surface,#fff))!important;color:var(--accent,#376b92)!important;
 box-sizing:border-box;line-height:1;text-decoration:none;cursor:pointer;
}
html body .site-home-button svg{
 width:18px!important;height:18px!important;display:block;fill:none;stroke:currentColor;
 stroke-width:2;stroke-linecap:round;stroke-linejoin:round;pointer-events:none;
}

html[data-theme="dark"] body .site-home-button,
html[data-preview-theme="dark"] body .site-home-button{
 background:var(--field,var(--surface,#19232f))!important;
 color:var(--accent,#94c4e6)!important;border-color:var(--line,#394d62)!important;
}
