/* MNAA — tema claro experimental, reversível.
   Não modifica o CSS original, o Morph nem o Viewer Gigapixel.
   A condição .is-editorial-mode limita a mudança ao ambiente editorial. */
.mnaa-theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  flex: 0 0 auto;
  border: 1px solid rgba(255,255,255,.20);
  border-radius: 50%;
  background: transparent;
  color: #f2f2f2;
  cursor: pointer;
}
.mnaa-theme-toggle:hover { background: rgba(255,255,255,.10); }
.mnaa-theme-toggle:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
.mnaa-theme-icon {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
body.is-editorial-mode[data-theme="light"] {
  --bg: #f5f3ef;
  --panel: #fff;
  --panel-2: #f0eee9;
  --line: #dedbd5;
  --text: #252525;
  --muted: #595959;
  color: var(--text);
  background: var(--bg);
}
body.is-editorial-mode[data-theme="light"] .app-shell {
  background: #f5f3ef;
}
body.is-editorial-mode[data-theme="light"] .topbar {
  background: #eeece7;
  border-bottom-color: #d9d5cf;
  color: #242424;
}
body.is-editorial-mode[data-theme="light"] .topbar .project-home-button,
body.is-editorial-mode[data-theme="light"] .topbar .project-home-button:hover,
body.is-editorial-mode[data-theme="light"] .topbar-page-link,
body.is-editorial-mode[data-theme="light"] .project-section,
body.is-editorial-mode[data-theme="light"] .breadcrumb-separator,
body.is-editorial-mode[data-theme="light"] .lang-btn.active,
body.is-editorial-mode[data-theme="light"] .lang-btn:hover {
  color: #252525;
}
body.is-editorial-mode[data-theme="light"] .lang-btn { color: #68655f; }
body.is-editorial-mode[data-theme="light"] .lang-separator { color: #a9a49b; }
body.is-editorial-mode[data-theme="light"] .home-chip,
body.is-editorial-mode[data-theme="light"] .mobile-menu-btn,
body.is-editorial-mode[data-theme="light"] .mnaa-theme-toggle {
  color: #292929;
  background: transparent;
  border-color: #c8c4bd;
}
body.is-editorial-mode[data-theme="light"] .home-chip:hover,
body.is-editorial-mode[data-theme="light"] .mobile-menu-btn:hover,
body.is-editorial-mode[data-theme="light"] .mnaa-theme-toggle:hover {
  background: #e1ded7;
}
body.is-editorial-mode[data-theme="light"] .sidebar {
  background: #eeece7;
  border-right-color: #d9d5cf;
  color: #343434;
}
body.is-editorial-mode[data-theme="light"] .sidebar-link,
body.is-editorial-mode[data-theme="light"] .sidebar-section-link,
body.is-editorial-mode[data-theme="light"] .sidebar-link-button {
  color: #55514b;
}
body.is-editorial-mode[data-theme="light"] .sidebar-link:hover,
body.is-editorial-mode[data-theme="light"] .sidebar-link.is-active,
body.is-editorial-mode[data-theme="light"] .sidebar-section-link:hover,
body.is-editorial-mode[data-theme="light"] .sidebar-section-link.is-active,
body.is-editorial-mode[data-theme="light"] .sidebar-link-button.active {
  color: #1c1c1c;
}
body.is-editorial-mode[data-theme="light"] .sidebar-sponsor__label { color: #5e5a54; }
body.is-editorial-mode[data-theme="light"] .content-stage {
  background: #f5f3ef;
  color: #252525;
}
body.is-editorial-mode[data-theme="light"] .editorial-page__summary,
body.is-editorial-mode[data-theme="light"] .editorial-section h2,
body.is-editorial-mode[data-theme="light"] .editorial-section h3,
body.is-editorial-mode[data-theme="light"] .editorial-section ul,
body.is-editorial-mode[data-theme="light"] .editorial-section ol,
body.is-editorial-mode[data-theme="light"] .viewer-launch__title,
body.is-editorial-mode[data-theme="light"] .viewer-launch__description {
  color: #292929 !important;
}
body.is-editorial-mode[data-theme="light"] .page-section-nav {
  border-bottom-color: #d3cfc8;
}
body.is-editorial-mode[data-theme="light"] .page-section-nav__title { color: #625e58; }
body.is-editorial-mode[data-theme="light"] .page-section-nav a { color: #3d3b37; }
body.is-editorial-mode[data-theme="light"] .page-section-nav a:hover { color: #000; }
body.is-editorial-mode[data-theme="light"] .editorial-figure figcaption,
body.is-editorial-mode[data-theme="light"] .editorial-video figcaption,
body.is-editorial-mode[data-theme="light"] .editorial-figure__credit,
body.is-editorial-mode[data-theme="light"] .editorial-video__credit { color: #5d5953; }
body.is-editorial-mode[data-theme="light"] .editorial-block--rich-text a {
  color: #873c38;
}
body.is-editorial-mode[data-theme="light"] .editorial-block--rich-text a:hover {
  color: #52211f;
}
body.is-editorial-mode[data-theme="light"] .mnaa-home-card {
  background: #fff;
  color: #262626;
}
body.is-editorial-mode[data-theme="light"] .mnaa-home-card:hover {
  box-shadow: 0 0 0 1px rgba(0,0,0,.24);
}
body.is-editorial-mode[data-theme="light"] .mnaa-home-card:focus-visible {
  outline-color: #292929;
}
/* O visualizador de imagens editoriais ampliadas conserva o fundo preto.
   O Morph e os controlos do Viewer não são selecionados por estas regras. */

/* =========================================================
   Correção de contraste — 21/10/2026
   As regras originais de app.css atribuem cores fixas aos
   títulos e parágrafos. Corrigir apenas no modo editorial claro.
   ========================================================= */
body.is-editorial-mode[data-theme="light"] .content-inner h1,
body.is-editorial-mode[data-theme="light"] .content-inner h2,
body.is-editorial-mode[data-theme="light"] .content-inner h3 {
  color: #292824;
}
body.is-editorial-mode[data-theme="light"] .content-inner p,
body.is-editorial-mode[data-theme="light"] .editorial-block--rich-text,
body.is-editorial-mode[data-theme="light"] .editorial-block--rich-text li {
  color: #393731;
}
/* Títulos e créditos do Morph: apenas texto, nunca imagens ou comportamento. */
body.is-editorial-mode[data-theme="light"] .mnaa-morph__title,
body.is-editorial-mode[data-theme="light"] .mnaa-morph__state {
  color: #373530;
}
body.is-editorial-mode[data-theme="light"] .mnaa-morph__credits,
body.is-editorial-mode[data-theme="light"] .mnaa-morph__credits p,
body.is-editorial-mode[data-theme="light"] .mnaa-morph__note,
body.is-editorial-mode[data-theme="light"] .mnaa-morph__gesture {
  color: #66625c;
}
/* Exceção: os cartões continuam a usar a apresentação e
   o contraste próprios; não alterar imagens ou setas. */


/* Refinamento visual do cursor Morph — sem alterar a interação. */
body.is-editorial-mode .mnaa-morph__slider::-webkit-slider-runnable-track {
  height: 2px;
  background: #8f8c86;
}
body.is-editorial-mode .mnaa-morph__slider::-moz-range-track {
  height: 2px;
  background: #8f8c86;
}
body.is-editorial-mode .mnaa-morph__slider::-webkit-slider-thumb {
  width: 16px;
  height: 16px;
  margin-top: -7px;
  border: 2px solid #b9b5af;
  background: #444444;
}
body.is-editorial-mode .mnaa-morph__slider::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border: 2px solid #b9b5af;
  background: #444444;
}
body.is-editorial-mode:not([data-theme="light"]) .mnaa-morph__slider::-webkit-slider-runnable-track { background: #898989; }
body.is-editorial-mode:not([data-theme="light"]) .mnaa-morph__slider::-moz-range-track { background: #898989; }
body.is-editorial-mode:not([data-theme="light"]) .mnaa-morph__slider::-webkit-slider-thumb { background: #e6e6e6; border-color: #444; }
body.is-editorial-mode:not([data-theme="light"]) .mnaa-morph__slider::-moz-range-thumb { background: #e6e6e6; border-color: #444; }
@media (pointer: coarse) {
  body.is-editorial-mode .mnaa-morph__slider::-webkit-slider-thumb { width: 22px; height: 22px; margin-top: -10px; }
  body.is-editorial-mode .mnaa-morph__slider::-moz-range-thumb { width: 22px; height: 22px; }
}

/* Rodapé com a cor da barra superior no modo claro */
body.is-editorial-mode[data-theme="light"] .mnaa-footer {
    background: #eeece7;
}


/* =========================================================
   MNAA — estudo cromático editorial, tema escuro (22/10/2026)
   Intervenção reversível. Não altera o Viewer, o Morph, o tema
   claro, a geometria da página ou as cores dos logótipos.
   ========================================================= */
body.is-editorial-mode[data-theme="dark"] {
  --bg: #1c1b19;
  --panel: #1c1b19;
  --panel-2: #25231f;
  --line: #393631;
  --text: #e9e2d8;
  --muted: #bdb5aa;
}
body.is-editorial-mode[data-theme="dark"] .app-shell {
  background: #1c1b19;
}
body.is-editorial-mode[data-theme="dark"] .content-stage {
  background: #1c1b19;
  color: #ded6cb;
}
body.is-editorial-mode[data-theme="dark"] .sidebar {
  background: #151513;
  border-right-color: #35322e;
}
body.is-editorial-mode[data-theme="dark"] .topbar {
  background: #292724;
  border-bottom-color: #403b35;
}
body.is-editorial-mode[data-theme="dark"] .content-inner h1,
body.is-editorial-mode[data-theme="dark"] .editorial-section h2,
body.is-editorial-mode[data-theme="dark"] .editorial-section h3 {
  color: #f0e8dd;
}
body.is-editorial-mode[data-theme="dark"] .content-inner p,
body.is-editorial-mode[data-theme="dark"] .editorial-block--rich-text,
body.is-editorial-mode[data-theme="dark"] .editorial-section ul,
body.is-editorial-mode[data-theme="dark"] .editorial-section ol {
  color: #ded6cb;
}
body.is-editorial-mode[data-theme="dark"] .editorial-page__summary {
  color: #e2d9ce !important;
}
body.is-editorial-mode[data-theme="dark"] .page-section-nav {
  border-bottom-color: #454039;
}
body.is-editorial-mode[data-theme="dark"] .page-section-nav a {
  color: #ded5ca;
}
body.is-editorial-mode[data-theme="dark"] .page-section-nav a:hover {
  color: #fff6ea;
}
body.is-editorial-mode[data-theme="dark"] .sidebar-link,
body.is-editorial-mode[data-theme="dark"] .sidebar-link-button {
  color: #c7bfb4;
}
body.is-editorial-mode[data-theme="dark"] .sidebar-section-link {
  color: #a9a197;
}
body.is-editorial-mode[data-theme="dark"] .sidebar-link:hover,
body.is-editorial-mode[data-theme="dark"] .sidebar-link.is-active,
body.is-editorial-mode[data-theme="dark"] .sidebar-section-link:hover,
body.is-editorial-mode[data-theme="dark"] .sidebar-section-link.is-active {
  color: #f1e9de;
}
body.is-editorial-mode[data-theme="dark"] .editorial-figure figcaption,
body.is-editorial-mode[data-theme="dark"] .editorial-video figcaption {
  color: #b8afa3;
}
body.is-editorial-mode[data-theme="dark"] .mnaa-home-card {
  background: #25231f;
  color: #f0e8dd;
}
body.is-editorial-mode[data-theme="dark"] .mnaa-footer {
  background: #292724;
  color: #e9e2d8;
  border-top-color: #403b35;
}
/* As caixas claras dos logótipos institucionais permanecem inalteradas. */
