/* Shared controls; the original dark palette/layout stays in site.css. */
html[data-theme="dark"] { color-scheme: dark; }
.theme-switch { display:inline-flex; align-items:center; justify-content:center; flex:0 0 40px; width:40px; height:40px; padding:8px; color:var(--gold-light); background:transparent; border:1px solid var(--line); border-radius:50%; }
.theme-switch:hover { background:var(--surface-2); border-color:var(--line-strong); }
.theme-switch:focus-visible { outline:2px solid var(--gold-light); outline-offset:3px; }
.theme-switch[hidden],.theme-switch__sun,.theme-logo--dark,.portal-link__short { display:none; }
html[data-theme="dark"] .theme-switch__sun,html[data-theme="dark"] .theme-logo--dark { display:block; }
html[data-theme="dark"] .theme-switch__moon,html[data-theme="dark"] .theme-logo--light { display:none; }
/* Make room for the switch before desktop navigation becomes crowded. */
@media (min-width:1121px) and (max-width:1380px) {
  .header__inner { gap:18px; }
  .header__actions { gap:12px; }
  .nav { gap:16px; }
  .brand img { width:150px; }
  .header__actions .text-action { display:none; }
}
@media (max-width:760px) {
  .header__inner { gap:10px; }
  .header__actions { gap:8px; }
  .brand img { width:126px; }
  .portal-link__long { display:none; }
  .portal-link__short { display:inline; }
  .portal-link { padding:9px; font-size:10px; }
  .theme-switch { flex-basis:40px; }
  .service-bar__inner>span { display:none; }
}
@media (max-width:380px) {
  .header__inner { padding-inline:12px; gap:8px; }
  .header__actions { gap:6px; }
  .brand img { width:108px; }
  .portal-link { padding:8px; font-size:10px; }
}
