/* Appearance controls share the theme tokens from the page's stylesheet. */
.portal-appearance { display:flex;flex-wrap:wrap;align-items:center;gap:.4rem .6rem;font-size:.85rem; }
.portal-appearance label { margin:0;font-weight:600; }
.portal-appearance select,[data-theme-select] { font:inherit;border:1px solid var(--line);border-radius:7px;padding:.35rem .55rem;background:var(--card);color:var(--text,inherit);max-width:100%; }
.portal-appearance [data-theme-status] { flex-basis:100%;font-size:.8rem;color:var(--muted); }
[data-theme-status]:empty { display:none; }
.portal-header-actions { grid-column:3;display:flex;align-items:center;justify-content:flex-end;gap:12px;min-width:0; }
.portal-theme-control { display:inline-flex;align-items:center;gap:2px;margin:0;padding:3px;border:1px solid var(--line);border-radius:999px;background:var(--card);font-size:.85rem;flex-shrink:0; }
.portal-theme-control button { display:inline-flex;align-items:center;justify-content:center;gap:6px;min-width:36px;min-height:36px;padding:5px 8px;border:0;border-radius:999px;font:inherit;color:var(--muted);background:transparent;cursor:pointer; }
.portal-theme-control button[aria-pressed="true"] { color:var(--accent);background:var(--bg);box-shadow:inset 0 0 0 1px var(--line); }
.portal-theme-control button:hover { color:var(--text); }
.portal-theme-control button:focus-visible { outline:2px solid var(--accent);outline-offset:2px; }
.portal-theme-control button:disabled { cursor:default;opacity:.6; }
.portal-theme-symbol { font-size:1.1rem;line-height:1; }
.portal-theme-compact .portal-theme-word { position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0; }
@media(max-width:960px) {
  .portal-header-actions { grid-column:3;grid-row:1;gap:8px; }
  .portal-theme-control button { min-width:44px;min-height:44px; }
  .portal-theme-control { padding:2px;gap:0; }
}
@media(max-width:480px) {
  :root { --portal-header-height:120px; }
  .portal-header-actions { display:contents; }
  .portal-header-actions .portal-theme-control { grid-column:3;grid-row:1;justify-self:end; }
  .portal-header .topsearch { padding-right:56px; }
  .portal-header-actions .portal-quick-add { width:44px;min-width:44px;padding:8px; }
  .portal-header-actions .portal-quick-add { grid-column:3;grid-row:2;justify-self:end; }
  .portal-header-actions .portal-quick-add span { position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0; }
  .portal-header .brand span { overflow:hidden;text-overflow:ellipsis;white-space:nowrap; }
  .portal-header .portal-menu-toggle span { position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0; }
  .portal-shell .portal-header .portal-menu-toggle { min-width:44px; }
}
@media(max-width:360px) {
  .portal-header .portal-menu-toggle span { position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0; }
  .portal-shell .portal-header .portal-menu-toggle { min-width:44px; }
}
@media print {
  :root { color-scheme:light !important;--bg:#fff !important;--card:#fff !important;--text:#000 !important;--muted:#444 !important;--line:#bbb !important;--accent:#174a8b !important;--accent-ink:#fff !important;--danger:#b91c1c !important;--shadow:none !important;background:#fff !important;color:#000 !important; }
  body { background:#fff !important;color:#000 !important; }
  :root .hc-black { --hc:#1c2128 !important; }
  .portal-appearance,.portal-theme-control { display:none !important; }
}
