#portalPrefs {
  display: inline-flex;
  flex: none;
  align-items: center;
}

.portal-tema {
  width: 2.5rem;
  height: 2.5rem;
  display: inline-grid;
  place-items: center;
  padding: 0;
  border: 1px solid #52687e;
  border-radius: 50%;
  background: transparent;
  color: #cceefe;
}

.portal-tema::before {
  content: '';
  display: block;
  width: .95rem;
  height: .95rem;
  border: 1.5px solid currentColor;
  border-radius: 50%;
  background: linear-gradient(90deg, currentColor 50%, transparent 50%);
}

.portal-tema:hover { background: #76dbff19; }

html[data-theme="light"] {
  color-scheme: light;
  --bg: #f5f8fb;
  --surface: #ffffff;
  --ink: #142438;
  --muted: #43586b;
  --line: #bdcbd6;
  --gold: #784809;
  --ice: #08627d;
  --action: #2254cb;
}

html[data-theme="light"] .masthead,
html[data-theme="light"] .site-footer {
  background: #eaf1f6;
  border-color: var(--line);
  color: var(--ink);
}
html[data-theme="light"] :is(.brand, .sign-in, .nav-toggle, .mobile-access, .portal-tema, .top-nav > a, .nav-group summary, .nav-group a, .footer-grid h2) { color: var(--ink); }
html[data-theme="light"] .brand b { color: var(--gold); }
html[data-theme="light"] :is(.top-nav a[aria-current="page"], .top-nav a:hover, .nav-group summary:hover) { color: var(--ice); }
html[data-theme="light"] .nav-group > div { background: var(--surface); border-color: var(--line); border-top-color: var(--ice); }
html[data-theme="light"] :is(.nav-group a:hover, .portal-tema:hover) { background: #e1e8f1; }
html[data-theme="light"] :is(.footer-grid div > a:not(.brand), .footer-grid button, .footer-brand p, .footer-base) { color: var(--muted); border-color: var(--line); }
html[data-theme="light"] :is(.footer-grid a, .footer-grid button):hover { color: var(--ice); }
html[data-theme="light"] :focus-visible { outline-color: #1761aa; }

html[data-theme="light"] .pg-lume {
  --pg-text: var(--ink);
  --pg-soft: var(--muted);
  --pg-line: var(--line);
  --pg-surface: var(--surface);
  --pg-input: #fff;
  --pg-accent: var(--gold);
  color-scheme: light;
}
html[data-theme="light"] .pg-header h1 { color: #fff; }
html[data-theme="light"] .pg-artigo .pg-header h1 { color: var(--ink); }
html[data-theme="light"] .pg-leitura p { color: var(--muted); }
html[data-theme="light"] .pg-lume :is(input, textarea)::placeholder { color: #58677b; }
html[data-theme="light"] :is(.pg-filtro[aria-pressed="true"], .pg-primary, .lc-primario) {
  background: var(--action);
  border-color: var(--action);
  color: white;
}
html[data-theme="light"] :is(.pg-primary:hover, .lc-primario:hover) { background: #1945a9; }

html[data-theme="light"] .lc-dialog {
  --lc-fundo: var(--surface);
  --lc-painel: #edf1f6;
  --lc-divisao: var(--line);
  --lc-claro: var(--ink);
  --lc-suave: var(--muted);
  --lc-ouro: var(--gold);
  color-scheme: light;
}
html[data-theme="light"] .lc-form input:not([type="checkbox"]) { background: #fff; }
html[data-theme="light"] .lc-form input::placeholder { color: #58677b; }
html[data-theme="light"] .lc-link:hover { color: #47300b; }

@media (max-width: 830px) {
  html[data-theme="light"] .top-nav { background: var(--surface); border-color: var(--line); }
}
@media (max-width: 380px) {
  .head-row { column-gap: 4px; }
  .head-actions { gap: 4px; }
  .head-row .brand img { width: 32px; height: 32px; }
  .head-row .brand span { font-size: 25px; }
  .head-register { padding-inline: 8px; white-space: nowrap; }
  .portal-tema { width: 2.25rem; height: 2.25rem; }
}
@media (max-width: 345px) {
  .head-row { width: calc(100% - 16px); }
  .nav-toggle { padding-inline: 4px; }
}
@media (max-width: 305px) {
  .head-row .brand span { display: none; }
}
@media (forced-colors: active) {
  .portal-tema::before { background: none; border-left-width: .5rem; }
}
