:root {
      --bg: #0c0c0d;
      --panel: #111214;
      --panel-2: #17181a;
      --line: #2a2d30;
      --text: #f1f1f1;
      --muted: #b8b8b8;
      --accent: #8d0f12;
      --accent-2: #b31b1f;
      --glass: rgba(0,0,0,.62);
      --radius: 14px;
      --shadow: 0 18px 40px rgba(0,0,0,.32);
      --sidebar-w: 300px;
      --topbar-h: 60px;
    }

    * { box-sizing: border-box; }
    html, body { height: 100%; }
    body {
      margin: 0;
      font-family: Arial, Helvetica, sans-serif;
      background: var(--bg);
      color: var(--text);
      overflow: hidden;
    }

    a { color: inherit; text-decoration: none; }
    button { font: inherit; }


    .mobile-menu-btn {
      display: none;
      width: 40px;
      height: 40px;
      border-radius: 10px;
      border: 1px solid rgba(255,255,255,.18);
      background: rgba(0,0,0,.14);
      color: #fff;
      align-items: center;
      justify-content: center;
      font-size: 1.2rem;
      line-height: 1;
      cursor: pointer;
      flex: 0 0 auto;
    }

    .sidebar-backdrop {
      display: none;
    }

    .app-shell {
      display: grid;
      grid-template-columns: var(--sidebar-w) 1fr;
      grid-template-rows: var(--topbar-h) 1fr;
      width: 100vw;
      height: 100dvh;
      min-height: 100vh;
      background: radial-gradient(circle at top, #1a1b1d 0%, #0d0d0e 48%, #090909 100%);
    }

    .topbar {
      grid-column: 1 / -1;
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 0 18px;
      background: #242424;
      border-bottom: 1px solid rgba(255,255,255,.08);
      z-index: 20;
    }

    .topbar-left {
      display: flex;
      align-items: center;
      gap: 14px;
      min-width: 0;
    }

    .home-chip {
      width: 40px;
      height: 40px;
      border-radius: 10px 0 10px 0;
      border: 1px solid rgba(255,255,255,.18);
      display: inline-flex;
      align-items: center;
      justify-content: center;
      background: rgba(0,0,0,.14);
      color: #fff;
      font-size: 1.15rem;
      line-height: 1;
      flex: 0 0 auto;
    }

    .project-title {
      display: flex;
      align-items: center;
      gap: 18px;
      min-width: 0;
    }

    .project-name {
      font-size: 1.15rem;
      font-weight: 700;
      white-space: nowrap;
    }

    .project-section {
      font-size: 1.6rem;
      font-weight: 700;
      white-space: nowrap;
    }

    .circle-icon {
      width: 30px;
      height: 30px;
      border-radius: 50%;
      border: 2px solid rgba(255,255,255,.76);
      display: inline-flex;
      align-items: center;
      justify-content: center;
      font-size: .95rem;
      font-weight: 700;
    }

    .sidebar {
      grid-column: 1;
      grid-row: 2;
      background: linear-gradient(180deg, #08090a 0%, #0b0c0d 100%);
      border-right: 1px solid var(--line);
      overflow: auto;
      padding: 22px 20px 28px;
    }

    .sidebar h1 {
      margin: 0 0 24px;
      font-size: 1.1rem;
      font-weight: 500;
      line-height: 1.3;
    }

    .sidebar-group {
      margin-bottom: 28px;
    }

    .sidebar-group-title {
      font-size: 1rem;
      font-weight: 700;
      margin-bottom: 12px;
      color: #fff;
    }

    .sidebar-links,
    .mode-switch {
      display: grid;
      gap: 10px;
    }

    .sidebar-link-button,
    .sidebar-link,
    .mode-btn {
      display: block;
      color: #b8b8b8;
      opacity: 1;
      font-size: .97rem;
      line-height: 1.35;
      background: transparent;
      border: 0;
      padding: 0;
      text-align: left;
      cursor: pointer;
    }

    .sidebar-link.is-active,
    .sidebar-link-button.active {
      font-weight: 700;
    }

    .sidebar-link:hover,
    .sidebar-link-button:hover {
      color: #fff;
    }

    .mode-btn.active {
      color: #fff;
      font-weight: 700;
    }

    .mode-btn {
      padding: 10px 12px;
      border-radius: 12px;
      border: 1px solid rgba(255,255,255,.08);
      background: rgba(255,255,255,.03);
      transition: .18s ease;
    }

    .mode-btn:hover {
      background: rgba(255,255,255,.06);
    }

    .mode-btn.active {
      background: rgba(179,27,31,.18);
      border-color: rgba(179,27,31,.42);
    }

    .viewer-area {
      grid-column: 2;
      grid-row: 2;
      position: relative;
      overflow: hidden;
      background: radial-gradient(circle at center, #18191b 0%, #0e0f10 60%, #090909 100%);
    }

    .viewer-stage,
    .content-stage {
      position: absolute;
      inset: 0;
      transition: opacity .32s ease, visibility .32s ease;
    }

    .viewer-stage {
      padding: 0;
      opacity: 1;
      visibility: visible;
    }

    .viewer-stage.is-hidden {
      opacity: 0;
      visibility: hidden;
      pointer-events: none;
    }

    .content-stage {
      background: #111;
      color: #eaeaea;
      overflow-y: auto;
      opacity: 0;
      visibility: hidden;
      pointer-events: none;
      font-family: Georgia, "Times New Roman", serif;
    }

    .content-stage.is-active {
      opacity: 1;
      visibility: visible;
      pointer-events: auto;
    }

    .content-inner {
      max-width: 980px;
      margin: 0;
      padding: 74px 60px 42px 96px;
    }

    .content-inner h1 {
      margin: 0 0 28px;
      font-size: 2.15rem;
      font-weight: 400;
      line-height: 1.2;
      color: #f0f0f0;
    }

    .content-inner p {
      margin: 0 0 20px;
      font-size: 1.05rem;
      line-height: 1.75;
      color: #d0d0d0;
      max-width: 760px;
    }

    .viewer-grid {
      width: 100%;
      height: 100%;
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 0;
      transition: .25s ease;
    }

    .viewer-grid.mode-single-left,
    .viewer-grid.mode-single-right {
      grid-template-columns: 1fr;
    }

    .viewer-frame {
      position: relative;
      min-width: 0;
      min-height: 0;
      background: linear-gradient(180deg, #171819 0%, #111213 100%);
      border: 0;
      border-radius: 0;
      box-shadow: none;
      overflow: hidden;
    }

    .viewer-grid.mode-single-left .viewer-frame-right,
    .viewer-grid.mode-single-right .viewer-frame-left {
      display: none;
    }

    #osdViewerLeft,
    #osdViewerRight {
      position: absolute;
      inset: 0;
      background: #121314;
    }

    .viewer-label {
      position: absolute;
      top: 16px;
      left: 16px;
      z-index: 10;
      background: rgba(0,0,0,.48);
      border: 1px solid rgba(255,255,255,.08);
      color: #fff;
      padding: 8px 12px;
      border-radius: 10px;
      font-size: .92rem;
      font-weight: 700;
      backdrop-filter: blur(4px);
      pointer-events: auto;
    }

    .viewer-image-select {
      appearance: auto;
      -webkit-appearance: menulist;
      max-width: calc(100% - 32px);
      cursor: pointer;
      outline: none;
    }

    .viewer-image-select:focus-visible {
      border-color: rgba(255,255,255,.45);
      box-shadow: 0 0 0 2px rgba(255,255,255,.12);
    }

    .viewer-scale {
      position: absolute;
      left: 22px;
      bottom: 18px;
      z-index: 10;
      color: rgba(255,255,255,.92);
      font-size: .96rem;
      pointer-events: none;
    }

    .viewer-scale::after {
      content: "";
      display: block;
      width: 62px;
      height: 2px;
      background: rgba(255,255,255,.78);
      margin-top: 10px;
    }

    .viewer-mode-tag {
      position: absolute;
      left: 50%;
      bottom: 14px;
      transform: translateX(-50%);
      z-index: 10;
      background: rgba(0,0,0,.56);
      color: rgba(255,255,255,.92);
      border: 1px solid rgba(255,255,255,.08);
      border-radius: 999px;
      padding: 10px 16px;
      font-size: .92rem;
      white-space: nowrap;
      backdrop-filter: blur(6px);
      pointer-events: none;
    }

    .right-toolbar {
      position: fixed;
      top: 86px;
      right: 14px;
      z-index: 2000;
      display: flex;
      flex-direction: column;
      gap: 12px;
      padding: 12px 10px;
      border-radius: 20px;
      background: rgba(0,0,0,.56);
      border: 1px solid rgba(255,255,255,.06);
      backdrop-filter: blur(8px);
    }

    .rt-btn {
      width: 48px;
      height: 48px;
      border-radius: 14px;
      border: 1px solid rgba(255,255,255,.12);
      background: rgba(255,255,255,.03);
      color: #fff;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 1.25rem;
      line-height: 1;
      cursor: pointer;
      transition: .18s ease;
    }

    .rt-btn:hover {
      background: rgba(255,255,255,.08);
      transform: translateY(-1px);
    }

    .sync-badge {
      position: fixed;
      right: 14px;
      top: 24px;
      z-index: 2001;
      background: rgba(0,0,0,.56);
      border: 1px solid rgba(255,255,255,.06);
      color: rgba(255,255,255,.9);
      padding: 6px 12px;
      border-radius: 999px;
      font-size: .82rem;
      backdrop-filter: blur(8px);
    }

    .info-overlay {
      position: fixed;
      top: 86px;
      right: 86px;
      width: min(420px, calc(100vw - var(--sidebar-w) - 130px));
      max-height: calc(100vh - 120px);
      overflow: auto;
      z-index: 1900;
      background: rgba(0,0,0,.72);
      border: 1px solid rgba(255,255,255,.08);
      border-radius: 24px;
      padding: 22px 22px 18px;
      box-shadow: var(--shadow);
      backdrop-filter: blur(8px);
    }

    .info-overlay.hidden { display: none; }

    .info-overlay-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 16px;
      margin-bottom: 14px;
    }

    .info-overlay h2 {
      margin: 0;
      font-size: 1.06rem;
      line-height: 1.3;
      color: #fff;
    }

    .close-btn {
      width: 34px;
      height: 34px;
      min-width: 34px;
      min-height: 34px;
      flex: 0 0 34px;
      aspect-ratio: 1 / 1;
      padding: 0;
      border-radius: 50%;
      border: 1px solid rgba(255,255,255,.18);
      background: transparent;
      color: #fff;
      cursor: pointer;
      font-size: 1rem;
      line-height: 1;
      display: inline-flex;
      align-items: center;
      justify-content: center;
    }

    .info-overlay p {
      margin: 0 0 14px;
      color: rgba(255,255,255,.82);
      line-height: 1.58;
      font-size: .98rem;
    }

    .overlay-section {
      margin-top: 16px;
    }

    .overlay-title {
      font-size: .96rem;
      font-weight: 700;
      margin-bottom: 10px;
      color: #fff;
    }

    .footer-note {
      position: absolute;
      left: 22px;
      bottom: 18px;
      color: rgba(255,255,255,.56);
      font-size: .84rem;
      z-index: 10;
      letter-spacing: .02em;
    }


    .viewer-tools.is-hidden {
      opacity: 0;
      pointer-events: none;
      transition: opacity .22s ease;
    }

    .viewer-tools {
      transition: opacity .22s ease;
    }

    .mock-fullscreen .sidebar,
    .mock-fullscreen .topbar {
      display: none;
    }

    .mock-fullscreen .app-shell {
      grid-template-columns: 1fr;
      grid-template-rows: 1fr;
    }

    .mock-fullscreen .viewer-area {
      grid-column: 1;
      grid-row: 1;
    }

    .mock-fullscreen .viewer-stage {
      padding: 0;
    }

    @media (max-width: 980px) {
      :root { --sidebar-w: 0px; }

      body {
        overflow: hidden;
      }

      .app-shell {
        grid-template-columns: 1fr;
        grid-template-rows: 1fr;
        height: 100dvh;
        min-height: 100vh;
        padding-top: var(--topbar-h);
      }

      .topbar {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 2300;
      }

      .mobile-menu-btn {
        display: inline-flex;
      }

      .project-title {
        gap: 12px;
      }

      .project-name {
        font-size: 1rem;
      }

      .sidebar {
        display: block;
        position: fixed;
        top: var(--topbar-h);
        left: 0;
        bottom: 0;
        width: min(86vw, 340px);
        z-index: 2200;
        transform: translateX(-100%);
        transition: transform .28s ease;
        box-shadow: 0 24px 48px rgba(0,0,0,.45);
        padding-bottom: calc(28px + env(safe-area-inset-bottom, 0px));
      }

      body.mobile-menu-open .sidebar {
        transform: translateX(0);
      }

      .sidebar-backdrop {
        display: block;
        position: fixed;
        top: var(--topbar-h);
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0,0,0,.45);
        opacity: 0;
        pointer-events: none;
        transition: opacity .24s ease;
        z-index: 2100;
      }

      body.mobile-menu-open .sidebar-backdrop {
        opacity: 1;
        pointer-events: auto;
      }

      .viewer-area {
        grid-column: 1;
        grid-row: 1;
      }

      .right-toolbar {
        top: auto;
        right: 50%;
        bottom: calc(12px + env(safe-area-inset-bottom, 0px));
        transform: translateX(50%);
        flex-direction: row;
        gap: 8px;
        padding: 10px;
        border-radius: 18px;
        max-width: calc(100vw - 20px);
        overflow-x: auto;
      }

      .rt-btn {
        width: 44px;
        height: 44px;
        min-width: 44px;
        font-size: 1.1rem;
      }

      .info-overlay {
        top: 76px;
        right: 14px;
        left: 14px;
        width: auto;
        max-height: calc(100vh - 170px);
      }

      .footer-note {
        bottom: calc(72px + env(safe-area-inset-bottom, 0px));
        left: 14px;
        font-size: .78rem;
      }

      .content-inner {
        padding: 74px 20px 110px;
      }

      .mock-fullscreen .topbar {
        display: flex;
      }

      .mock-fullscreen .app-shell {
        grid-template-columns: 1fr;
        grid-template-rows: 1fr;
        height: 100dvh;
        min-height: 100vh;
        padding-top: var(--topbar-h);
      }

      .mock-fullscreen .viewer-area {
        grid-column: 1;
        grid-row: 1;
      }
    }

    @media (max-width: 760px) {
      .project-section { display: none; }

      .topbar {
        padding: 0 12px;
      }

      .topbar-left {
        gap: 10px;
      }

      .viewer-grid {
        grid-template-columns: 1fr;
      }

      .viewer-stage {
        padding-right: 0;
      }

      .viewer-label {
        top: 12px;
        left: 12px;
        padding: 6px 10px;
        font-size: .82rem;
      }

      .content-inner h1 {
        font-size: 1.8rem;
      }

      .content-inner p {
        font-size: 1rem;
        line-height: 1.7;
      }

      .info-overlay {
        top: 72px;
        right: 12px;
        left: 12px;
        width: auto;
      }
    }

/* MNAA Frontend v2 — idioma, menu dinâmico e páginas editoriais sequenciais */
.topbar-right {
  display: flex;
  align-items: center;
  gap: 18px;
  flex: 0 0 auto;
}

.language-switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.lang-btn {
  appearance: none;
  border: 0;
  padding: 4px 2px;
  background: transparent;
  color: rgba(255,255,255,.58);
  font-size: .86rem;
  font-weight: 600;
  line-height: 1;
  letter-spacing: .04em;
  cursor: pointer;
}

.lang-btn:hover,
.lang-btn.active {
  color: #fff;
}

.lang-btn.active {
  font-weight: 700;
}

.lang-btn:focus-visible {
  outline: 2px solid rgba(255,255,255,.85);
  outline-offset: 4px;
  border-radius: 3px;
}

.lang-separator {
  color: rgba(255,255,255,.32);
  user-select: none;
}

.dynamic-menu-status {
  color: var(--muted);
  font-size: .9rem;
  line-height: 1.45;
}


.content-inner {
  max-width: 980px;
}

.editorial-page__summary {
  font-size: 1.18rem !important;
  color: #e1e1e1 !important;
  margin-bottom: 34px !important;
}

.page-section-nav {
  margin: 0 0 52px;
  padding: 0 0 28px;
  border-bottom: 1px solid rgba(255,255,255,.12);
}

.page-section-nav__title {
  margin: 0 0 14px;
  color: #aaa;
  font-family: Arial, Helvetica, sans-serif;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.page-section-nav__links {
  display: grid;
  gap: 11px;
}

.page-section-nav a {
  color: #ddd;
  font-size: 1.02rem;
  line-height: 1.45;
}

.page-section-nav a::before {
  content: "– ";
  color: #888;
}

.page-section-nav a:hover {
  color: #fff;
}

.editorial-section {
  scroll-margin-top: 34px;
  margin: 0 0 80px;
}

.editorial-section h2 {
  margin: 0 0 28px;
  color: #f0f0f0;
  font-size: 1.8rem;
  font-weight: 400;
  line-height: 1.25;
}

.editorial-section h3 {
  margin: 36px 0 18px;
  color: #e6e6e6;
  font-size: 1.28rem;
  font-weight: 400;
  line-height: 1.35;
}

.editorial-section ul,
.editorial-section ol {
  max-width: 760px;
  color: #d3d3d3;
  font-size: 1.08rem;
  line-height: 1.75;
}

.editorial-figure {
  margin: 34px auto;
}

.editorial-figure--normal {
  max-width: 760px;
}

.editorial-figure--wide {
  max-width: 920px;
}

.editorial-figure--full {
  max-width: none;
}

.editorial-figure img {
  display: block;
  width: 100%;
  height: auto;
}

.editorial-figure figcaption {
  margin-top: 10px;
  color: #aaa;
  font-family: Arial, Helvetica, sans-serif;
  font-size: .82rem;
  line-height: 1.45;
  text-align: center;
}

.content-loading {
  color: #bbb;
  font-family: Arial, Helvetica, sans-serif;
}

@media (max-width: 760px) {
  .topbar-right { gap: 10px; }
  .language-switch { gap: 6px; }
  .lang-btn { font-size: .8rem; }
  .content-inner { padding: 52px 22px 34px; }
  .editorial-section { margin-bottom: 54px; }
}



/* Modelo editorial Page.Section v1 */
.editorial-section__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

.editorial-section__text,
.editorial-section__media {
  min-width: 0;
}

.editorial-section--image-left .editorial-section__grid,
.editorial-section--image-right .editorial-section__grid {
  grid-template-columns: minmax(260px, .9fr) minmax(0, 1.1fr);
  gap: 38px;
}

.editorial-section--image-left .editorial-section__media {
  grid-column: 1;
  grid-row: 1;
}

.editorial-section--image-left .editorial-section__text {
  grid-column: 2;
  grid-row: 1;
}

.editorial-section--image-right .editorial-section__text {
  grid-column: 1;
  grid-row: 1;
}

.editorial-section--image-right .editorial-section__media {
  grid-column: 2;
  grid-row: 1;
}

.editorial-section--wide .editorial-section__media {
  width: min(1100px, calc(100vw - var(--sidebar-w) - 90px));
  max-width: none;
  margin-left: 50%;
  transform: translateX(-50%);
}

.editorial-section--full .editorial-section__media {
  width: calc(100vw - var(--sidebar-w));
  max-width: none;
  margin-left: 50%;
  transform: translateX(-50%);
}

.editorial-figure--standard,
.editorial-figure--image-left,
.editorial-figure--image-right {
  max-width: 760px;
}

.editorial-figure--wide,
.editorial-figure--full {
  max-width: none;
}

.viewer-action {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  padding: 11px 15px;
  border: 1px solid rgba(179,27,31,.65);
  border-radius: 10px;
  background: rgba(179,27,31,.16);
  color: #fff;
  cursor: pointer;
  font-family: Arial, Helvetica, sans-serif;
  font-weight: 700;
}

.viewer-action:hover,
.viewer-action:focus-visible {
  background: rgba(179,27,31,.28);
}

@media (max-width: 980px) {
  .editorial-section--image-left .editorial-section__grid,
  .editorial-section--image-right .editorial-section__grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .editorial-section--image-left .editorial-section__media,
  .editorial-section--image-left .editorial-section__text,
  .editorial-section--image-right .editorial-section__media,
  .editorial-section--image-right .editorial-section__text {
    grid-column: 1;
    grid-row: auto;
  }

  .editorial-section--image-left .editorial-section__media {
    order: 1;
  }

  .editorial-section--image-left .editorial-section__text {
    order: 2;
  }

  .editorial-section--wide .editorial-section__media,
  .editorial-section--full .editorial-section__media {
    width: 100%;
    margin-left: 0;
    transform: none;
  }
}

/* Dynamic Zone Page.content */
.editorial-content {
  min-width: 0;
}

.editorial-content > .editorial-block,
.editorial-section--dynamic > .editorial-block {
  margin-top: 0;
  margin-bottom: 40px;
}

.editorial-block--rich-text {
  max-width: 760px;
}

.editorial-block--rich-text > :first-child {
  margin-top: 0;
}

.editorial-block--rich-text > :last-child {
  margin-bottom: 0;
}

.editorial-block--image {
  clear: both;
}

.editorial-block--image .editorial-figure {
  margin-top: 0;
  margin-bottom: 12px;
}

.editorial-block--standard {
  max-width: 760px;
}

.editorial-block--wide {
  width: min(1100px, calc(100vw - var(--sidebar-w) - 90px));
  max-width: none;
  margin-left: 50%;
  transform: translateX(-50%);
}

.editorial-block--full {
  width: calc(100vw - var(--sidebar-w));
  max-width: none;
  margin-left: 50%;
  transform: translateX(-50%);
}

.editorial-block--left,
.editorial-block--right {
  width: min(46%, 460px);
}

.editorial-block--left {
  float: left;
  margin-right: 32px;
}

.editorial-block--right {
  float: right;
  margin-left: 32px;
}

.editorial-figure figcaption,
.editorial-video figcaption {
  display: grid;
  gap: 5px;
}

.editorial-figure__credit,
.editorial-video__credit {
  color: #858585;
  font-size: .75rem;
}

.editorial-video {
  max-width: 760px;
  margin: 0 0 38px;
}

.editorial-video--wide {
  width: min(1100px, calc(100vw - var(--sidebar-w) - 90px));
  max-width: none;
  margin-left: 50%;
  transform: translateX(-50%);
}

.editorial-video--full,
.editorial-video--fullscreen {
  width: calc(100vw - var(--sidebar-w));
  max-width: none;
  margin-left: 50%;
  transform: translateX(-50%);
}

.editorial-video__title {
  margin-bottom: 12px;
  color: #eee;
  font-size: 1.15rem;
  font-weight: 600;
}

.editorial-video__media {
  position: relative;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

.editorial-video__media iframe,
.editorial-video__media video {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  object-fit: contain;
}

.editorial-video__external {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: 24px;
  color: #fff;
  text-align: center;
}

@media (max-width: 980px) {
  .editorial-block--wide,
  .editorial-block--full,
  .editorial-video--wide,
  .editorial-video--full,
  .editorial-video--fullscreen {
    width: 100%;
    margin-left: 0;
    transform: none;
  }
}

@media (max-width: 760px) {
  .editorial-block--left,
  .editorial-block--right {
    float: none;
    width: 100%;
    margin-right: 0;
    margin-left: 0;
  }
}

/* =========================================================
   Viewer Launch — cartão editorial
   ========================================================= */
.viewer-launch {
  position: relative;
  width: 100%;
  max-width: 920px;
  overflow: hidden;
  padding: 30px 32px;
  border: 1px solid rgba(255, 255, 255, .14);
  border-left: 4px solid var(--accent-2);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(179, 27, 31, .12), rgba(255, 255, 255, .025) 58%),
    var(--panel-2);
  box-shadow: 0 16px 36px rgba(0, 0, 0, .22);
}

.viewer-launch::before {
  content: none;
  display: block;
  margin-bottom: 12px;
  color: rgba(255, 255, 255, .58);
  font-family: Arial, Helvetica, sans-serif;
  font-size: .76rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.viewer-launch__content {
  max-width: 680px;
}

.editorial-section h3.viewer-launch__title,
.viewer-launch__title {
  margin: 0 0 12px;
  color: #f2f2f2;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.55rem;
  font-weight: 400;
  line-height: 1.28;
}

.content-inner p.viewer-launch__description,
.viewer-launch__description {
  max-width: 640px;
  margin: 0 0 22px;
  color: #cfcfcf;
  font-size: 1.02rem;
  line-height: 1.65;
}

.viewer-launch .viewer-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 0;
  padding: 11px 16px;
  border: 1px solid rgba(179, 27, 31, .82);
  border-radius: 9px;
  background: var(--accent);
  color: #fff;
  font-family: Arial, Helvetica, sans-serif;
  font-weight: 700;
  cursor: pointer;
  transition: background .18s ease, transform .18s ease, border-color .18s ease;
}

.viewer-launch .viewer-action::after {
  content: "\2192";
  margin-left: 3px;
  font-size: 1.05em;
}

.viewer-launch .viewer-action:hover,
.viewer-launch .viewer-action:focus-visible {
  border-color: var(--accent-2);
  background: var(--accent-2);
  transform: translateY(-1px);
}

.viewer-launch .viewer-action:focus-visible {
  outline: 2px solid rgba(255, 255, 255, .9);
  outline-offset: 3px;
}

@media (max-width: 760px) {
  .viewer-launch {
    padding: 24px 22px;
    border-radius: 12px;
  }

  .editorial-section h3.viewer-launch__title,
  .viewer-launch__title {
    font-size: 1.35rem;
  }

  .viewer-launch .viewer-action {
    width: 100%;
  }
}

/* =========================================================
   Viewer Launch — layout horizontal
   ========================================================= */
.viewer-launch__layout {
  display: grid;
  grid-template-columns: minmax(260px, 340px) minmax(0, 1fr);
  gap: 32px;
  align-items: stretch;
}

.viewer-launch__media {
  min-width: 0;
}

.viewer-launch__image {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 280px;
  max-height: 420px;
  object-fit: cover;
  object-position: center;
  border-radius: 8px;
}

.viewer-launch__content {
  display: flex;
  flex-direction: column;
  min-width: 0;
  max-width: none;
}

.viewer-launch__eyebrow {
  margin-bottom: 10px;
  color: rgba(255, 255, 255, .58);
  font-family: Arial, Helvetica, sans-serif;
  font-size: .76rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.viewer-launch .viewer-action {
  align-self: flex-start;
  margin-top: auto;
}

.viewer-launch--without-image .viewer-launch__layout {
  grid-template-columns: minmax(0, 1fr);
}

@media (max-width: 900px) {
  .viewer-launch__layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 22px;
  }

  .viewer-launch__image {
    height: auto;
    min-height: 0;
    max-height: none;
    object-fit: contain;
  }

  .viewer-launch .viewer-action {
    align-self: stretch;
  }
}



/* Viewer mode toggle: action icon (single image / side-by-side comparison) */
#modeBtn .mode-icon {
  position: relative;
  display: inline-block;
  width: 22px;
  height: 17px;
  box-sizing: border-box;
}

#modeBtn .mode-icon-single {
  width: 20px;
  height: 15px;
  border: 1.7px solid currentColor;
  border-radius: 1px;
}

#modeBtn .mode-icon-dual::before,
#modeBtn .mode-icon-dual::after {
  content: "";
  position: absolute;
  top: 1px;
  width: 8px;
  height: 15px;
  border: 1.7px solid currentColor;
  border-radius: 1px;
  box-sizing: border-box;
}

#modeBtn .mode-icon-dual::before { left: 1px; }
#modeBtn .mode-icon-dual::after  { right: 1px; }

/* Mobile — simplificação do breadcrumb no topbar */
@media (max-width: 760px) {
  #pageBreadcrumb,
  #pageBreadcrumbSeparator {
    display: none !important;
  }
}

/* Mobile estreito — permitir que o nome do projeto ocupe apenas o espaço disponível */
@media (max-width: 480px) {
  .topbar-left {
    flex: 1 1 auto;
    min-width: 0;
  }

  .project-title {
    flex: 1 1 auto;
    min-width: 0;
  }

  .project-name {
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .topbar-right {
    flex: 0 0 auto;
  }
}

/* =========================================================
   Ícones SVG da interface
   ========================================================= */

.ui-icon {
  display: block;
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ui-icon-fill {
  fill: currentColor;
  stroke: none;
}

.home-chip .ui-icon {
  width: 18px;
  height: 18px;
}


/* =========================================================
   Imagens editoriais — visualização maximizada
   ========================================================= */
.editorial-expandable-image {
  cursor: zoom-in;
}

.editorial-expandable-image:focus-visible {
  outline: 2px solid rgba(255,255,255,.9);
  outline-offset: 4px;
}

.editorial-image-viewer {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  background: rgba(0,0,0,.96);
  cursor: zoom-out;
}

.editorial-image-viewer[hidden] {
  display: none;
}

.editorial-image-viewer__image {
  display: block;
  width: auto;
  height: auto;
  max-width: 100vw;
  max-height: 100dvh;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
}

/* =========================================================
   Ponto 5 — refinamento da navegação lateral
   ========================================================= */

.sidebar-group-title {
  margin-bottom: 16px;
  color: #888;
  font-size: .76rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.sidebar-links {
  gap: 12px;
}

.sidebar-link {
  position: relative;
  display: block;
  padding-left: 14px;
  color: #b8b8b8;
  opacity: 1;
  font-size: .97rem;
  font-weight: 400;
  line-height: 1.4;
}

.sidebar-link:hover {
  color: #fff;
}

.sidebar-link.is-active {
  color: #fff;
  font-weight: 700;
}

.sidebar-link.is-active::before {
  content: "";
  position: absolute;
  left: 0;
  top: .18em;
  bottom: .18em;
  width: 2px;
  background: var(--accent-2);
}

/* =========================================================
   Refinamento do breadcrumb — página atual sem caixa
   ========================================================= */

.topbar-page-link {
  background: transparent;
  border: 0;
  box-shadow: none;
  color: rgba(255, 255, 255, .68);
  padding: 0;
  border-radius: 0;
}

.topbar-page-link:hover {
  background: transparent;
  color: #fff;
}

/* =========================================================
   Refinamento final do breadcrumb — Viewer
   ========================================================= */

.project-section {
  color: #fff;
  font-size: inherit;
  font-weight: 600;
  line-height: inherit;
}



/* =========================================================
   Navegação lateral contextual — Page > Sections
   ========================================================= */

.sidebar-page-item {
  display: grid;
  gap: 0;
}

.sidebar-section-links {
  display: grid;
  gap: 9px;
  margin: 10px 0 4px;
  padding-left: 28px;
  animation: sidebarSectionsIn 180ms ease-out both;
}

.sidebar-section-link {
  position: relative;
  display: block;
  color: #8f8f8f;
  font-size: .88rem;
  font-weight: 400;
  line-height: 1.35;
  transition: color .16s ease;
}

.sidebar-section-link:hover {
  color: #ddd;
}

.sidebar-section-link.is-active {
  color: #fff;
}

.sidebar-section-link.is-active::before {
  content: "";
  position: absolute;
  left: -14px;
  top: .3em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent-2);
}

@keyframes sidebarSectionsIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .sidebar-section-links {
        animation: none;
    }
}

 /* MNAA — HistoricalGallery: apresentação uniforme, sem recortar imagens */
.historical-gallery { margin-block: 2rem; }
.historical-gallery__title { margin: 0 0 1.25rem; }
.historical-gallery__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.5rem;
    align-items: start;
}
.historical-gallery__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 0;
    min-width: 0;
}
/* Especificidade suficiente para prevalecer sobre a regra anterior
   .historical-gallery__item img { height: auto; } já presente no app.css. */
.historical-gallery__item img.historical-gallery__image {
    display: block;
    width: 100%;
    height: 320px;
    max-width: 100%;
    object-fit: contain;
    object-position: center center;
    cursor: zoom-in;
}
.historical-gallery__caption {
    display: flex;
    flex-direction: column;
    gap: .35rem;
    width: 100%;
    padding-top: .65rem;
    line-height: 1.45;
    text-align: center;
}
.historical-gallery__item-title { font-weight: 600; }
.historical-gallery__caption small { opacity: .75; }
@media (max-width: 900px) {
    .historical-gallery__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
    .historical-gallery__grid { grid-template-columns: minmax(0, 1fr); }
    .historical-gallery__item img.historical-gallery__image { height: 280px; }
}

.historical-gallery__item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.historical-gallery__item img {
    display: block;
    max-width: 100%;
    height: auto;
    margin-left: auto;
    margin-right: auto;
}

.historical-gallery__item figcaption {
    width: 100%;
    text-align: center;
}

/* Galeria histórica — tipografia das legendas */

.historical-gallery__caption {
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 400;
    line-height: 1.5;
    text-align: center;
}

.historical-gallery__item-title {
    font-weight: 400;
}


/* =========================================================
   MNAA — Página Início: composição dos seis painéis
   Regras limitadas à página que contém esta imagem.
   ========================================================= */
.content-inner:has(.editorial-block--image-feature img[src*="MNAA_Seis_Paineis_Web"]) {
    max-width: none;
    width: 100%;
    padding: clamp(30px, 5vh, 58px) clamp(20px, 4vw, 70px) 48px;
}

.content-inner:has(.editorial-block--image-feature img[src*="MNAA_Seis_Paineis_Web"]) .editorial-block--image-feature {
    width: 100%;
    max-width: none;
}

.content-inner:has(.editorial-block--image-feature img[src*="MNAA_Seis_Paineis_Web"]) .editorial-block--image-feature .editorial-figure {
    width: 100%;
    max-width: none;
    margin: 0 auto;
}

.content-inner:has(.editorial-block--image-feature img[src*="MNAA_Seis_Paineis_Web"]) .editorial-block--image-feature .editorial-figure img {
    display: block;
    width: 100%;
    height: auto;
    max-height: calc(100dvh - 240px);
    object-fit: contain;
    object-position: center;
}

@media (max-width: 760px) {
    .content-inner:has(.editorial-block--image-feature img[src*="MNAA_Seis_Paineis_Web"]) {
        padding: 32px 16px 48px;
    }

    .content-inner:has(.editorial-block--image-feature img[src*="MNAA_Seis_Paineis_Web"]) .editorial-block--image-feature .editorial-figure img {
        max-height: none;
    }
}

/* MNAA — Ocultar apenas o título editorial da página Início.
   Mantém o título no Strapi, no menu e no breadcrumb. */
.content-inner:has(.editorial-block--image-feature img[src*="MNAA_Seis_Paineis_Web"])
  .editorial-page > h1 {
    display: none;
}


/* MNAA — Início: exploração horizontal dos seis painéis em telemóvel.
   Começa pelo painel da esquerda; sem recortes e sem texto adicional. */
@media (max-width: 600px) {
  .content-inner:has(.editorial-block--image-feature img[src*="MNAA_Seis_Paineis_Web"])
    .editorial-block--image-feature {
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
  }

  .content-inner:has(.editorial-block--image-feature img[src*="MNAA_Seis_Paineis_Web"])
    .editorial-block--image-feature .editorial-figure {
    width: 1050px;
    max-width: none;
    margin: 0;
  }

  .content-inner:has(.editorial-block--image-feature img[src*="MNAA_Seis_Paineis_Web"])
    .editorial-block--image-feature .editorial-figure img {
    width: 100%;
    max-width: none;
    height: auto;
    max-height: none;
  }
}

/* MNAA — Ocultar o título redundante do menu lateral */
.sidebar .sidebar-group-title {
    display: none;
}

/* MNAA — Hiperligações nos conteúdos editoriais */
.editorial-block--rich-text a {
    color: #d6a6a6;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.editorial-block--rich-text a:hover {
    color: #ffffff;
}


/* MNAA — Identidade Fundação Millennium BCP (21/10/2026) */
.sidebar {
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.sidebar > .sidebar-group {
  flex: 0 0 auto;
}
.sidebar-sponsor {
  flex: 0 0 auto;
  margin-top: auto;
  padding: 32px 8px 0;
  text-align: center;
}
.sidebar-sponsor__logo {
  display: block;
  width: 100%;
  max-width: 190px;
  height: auto;
  margin: 0 auto;
}
@media (max-width: 980px) {
  .sidebar-sponsor {
    padding-top: 40px;
    padding-bottom: 8px;
  }
}


/* MNAA — título do projeto sem caixa, coerente com o breadcrumb */
.topbar .project-home-button {
  appearance: none;
  -webkit-appearance: none;
  display: inline;
  padding: 0;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: #fff;
  font-family: inherit;
  font-size: inherit;
  font-weight: 600;
  line-height: inherit;
  text-align: left;
  cursor: pointer;
}
.topbar .project-home-button:hover { color: #fff; }
.topbar .project-home-button:focus-visible {
  outline: 2px solid rgba(255,255,255,.85);
  outline-offset: 4px;
}

/* MNAA — Fechar imagens editoriais ampliadas */
.editorial-image-viewer__close {
  position: absolute;
  z-index: 1;
  top: calc(16px + env(safe-area-inset-top, 0px));
  right: calc(16px + env(safe-area-inset-right, 0px));
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid rgba(255,255,255,.35);
  border-radius: 50%;
  background: rgba(0,0,0,.72);
  color: #fff;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 30px;
  font-weight: 300;
  line-height: 1;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.editorial-image-viewer__close:hover { background: rgba(50,50,50,.95); }
.editorial-image-viewer__close:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }

/* MNAA — identificação do apoio institucional */
.sidebar-sponsor__label {
  margin: 0 0 12px;
  color: #bdbdbd;
  font-family: inherit;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: normal;
  line-height: 1.4;
  text-transform: none;
}

/* MNAA — navegação visual abaixo do Morph; sem afetar o visualizador. */
.mnaa-home-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  width: 100%;
  max-width: 1440px;
  margin: 34px auto 28px;
  font-family: Arial, Helvetica, sans-serif;
}
.mnaa-home-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  background: #181818;
  border: 0;
  color: #fff;
  transition: transform .18s ease, box-shadow .18s ease;
}
.mnaa-home-card img {
  display: block;
  width: 100%;
  aspect-ratio: 5 / 4;
  object-fit: cover;
  object-position: center;
}
.mnaa-home-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 50px;
  padding: 11px 15px;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.35;
}
.mnaa-home-card__arrow { font-size: 17px; font-weight: 400; opacity: .55; }
.mnaa-home-card:hover { box-shadow: 0 0 0 1px rgba(255,255,255,.28); transform: translateY(-2px); }
.mnaa-home-card:hover .mnaa-home-card__arrow { opacity: 1; }
.mnaa-home-card:focus-visible { outline: 2px solid white; outline-offset: 4px; }
@media (max-width: 1100px) { .mnaa-home-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) {
  .mnaa-home-cards { gap: 14px; margin-top: 32px; }
  .mnaa-home-card__footer { padding: 11px 12px; font-size: 13px; min-height: 50px; }
}


/* MNAA — rodapé institucional exclusivamente editorial */
.mnaa-footer {
  margin-top: 120px; /* separação visual da área editorial — desktop */
  position: relative;
  background: #f5f3ef;
  color: #292929;
  border-top: 1px solid #d9d6d0;
  font-family: Arial, Helvetica, sans-serif;
}
.mnaa-footer__inner { max-width: 1460px; margin: 0 auto; padding: 42px clamp(22px, 5vw, 78px) 24px; }
.mnaa-footer__eyebrow { margin: 0 0 26px; color: #69645e; font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.mnaa-footer__logos { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 22px 26px; align-items: center; padding-bottom: 34px; }
.mnaa-footer__logo { min-width: 0; min-height: 88px; display: flex; justify-content: center; align-items: center; padding: 12px; }
.mnaa-footer__logo img { display: block; width: 100%; max-width: 185px; max-height: 88px; height: auto; object-fit: contain; }
.mnaa-footer__bottom { display: flex; justify-content: space-between; gap: 28px; padding: 24px 0; border-top: 1px solid #d9d6d0; }
.mnaa-footer__identity, .mnaa-footer__contacts { display: flex; flex-direction: column; gap: 8px; font-size: 13px; line-height: 1.45; }
.mnaa-footer__identity strong { font-size: 15px; }
.mnaa-footer__contacts-title { font-weight: 700; }
.mnaa-footer__legal { margin: 0; padding-top: 15px; border-top: 1px solid #d9d6d0; color: #77716b; font-size: 11px; line-height: 1.5; }
@media (max-width: 1000px) { .mnaa-footer__logos { grid-template-columns: repeat(3,minmax(0,1fr)); } }
@media (max-width: 600px) {
  .mnaa-footer__inner { padding: 32px 20px 24px; }
  .mnaa-footer__logos { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
  .mnaa-footer__logo { min-height: 78px; padding: 8px; }
  .mnaa-footer__logo img { max-height: 70px; }
  .mnaa-footer__bottom { flex-direction: column; gap: 20px; }
}

/* MNAA — hiperligações dos contactos institucionais */
.mnaa-footer__contacts a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.mnaa-footer__contacts a:hover, .mnaa-footer__contacts a:focus-visible { color: #8d0f12; }

/* MNAA — rodapé integrado na barra superior, apenas no tema escuro.
   Os logótipos mantêm uma superfície clara para preservar as suas cores. */
:root[data-theme="dark"] .mnaa-footer,
body[data-theme="dark"] .mnaa-footer,
html.theme-dark .mnaa-footer,
body.theme-dark .mnaa-footer,
body.dark-mode .mnaa-footer {
  background: #242424;
  color: #ededed;
  border-top-color: rgba(255,255,255,.12);
}
:root[data-theme="dark"] .mnaa-footer__eyebrow,
body[data-theme="dark"] .mnaa-footer__eyebrow,
html.theme-dark .mnaa-footer__eyebrow,
body.theme-dark .mnaa-footer__eyebrow,
body.dark-mode .mnaa-footer__eyebrow { color: #c4c4c4; }
:root[data-theme="dark"] .mnaa-footer__logo,
body[data-theme="dark"] .mnaa-footer__logo,
html.theme-dark .mnaa-footer__logo,
body.theme-dark .mnaa-footer__logo,
body.dark-mode .mnaa-footer__logo { background: #f5f3ef; border-radius: 4px; }
:root[data-theme="dark"] .mnaa-footer__bottom,
:root[data-theme="dark"] .mnaa-footer__legal,
body[data-theme="dark"] .mnaa-footer__bottom,
body[data-theme="dark"] .mnaa-footer__legal,
html.theme-dark .mnaa-footer__bottom,
html.theme-dark .mnaa-footer__legal,
body.theme-dark .mnaa-footer__bottom,
body.theme-dark .mnaa-footer__legal,
body.dark-mode .mnaa-footer__bottom,
body.dark-mode .mnaa-footer__legal { border-color: rgba(255,255,255,.16); }
:root[data-theme="dark"] .mnaa-footer__legal,
body[data-theme="dark"] .mnaa-footer__legal,
html.theme-dark .mnaa-footer__legal,
body.theme-dark .mnaa-footer__legal,
body.dark-mode .mnaa-footer__legal { color: #bcbcbc; }
:root[data-theme="dark"] .mnaa-footer__contacts a:hover,
body[data-theme="dark"] .mnaa-footer__contacts a:hover,
html.theme-dark .mnaa-footer__contacts a:hover,
body.theme-dark .mnaa-footer__contacts a:hover,
body.dark-mode .mnaa-footer__contacts a:hover { color: #fff; }

/* MNAA — separação editorial/rodapé adaptada ao ecrã */
@media (max-width: 1000px) and (min-width: 601px) {
  .mnaa-footer { margin-top: 80px; }
}
@media (max-width: 600px) {
  .mnaa-footer { margin-top: 56px; }
}


/* MNAA — menu lateral com recolha automática (apenas desktop) */
.sidebar-edge-trigger, .sidebar-reveal-btn, .sidebar-pin-btn { display: none; }
@media (min-width: 981px) {
  .app-shell { transition: grid-template-columns .24s ease; }
  .sidebar { position: relative; }
  .sidebar-pin-btn {
    display: flex; align-items: center; justify-content: center;
    width: 30px; height: 30px; margin: -8px 0 14px auto;
    padding: 5px; color: #b8b8b8; background: transparent;
    border: 1px solid rgba(255,255,255,.18); border-radius: 7px;
    cursor: pointer;
  }
  .sidebar-pin-btn:hover { color: #fff; background: rgba(255,255,255,.07); }
  .sidebar-pin-btn .ui-icon { width: 17px; height: 17px; }
  .sidebar-lock-closed { display: none; }
  body.sidebar-auto-hide .sidebar-lock-open { display: none; }
  body.sidebar-auto-hide .sidebar-lock-closed { display: block; }

  body.sidebar-auto-hide .app-shell { grid-template-columns: var(--sidebar-w) minmax(0,1fr); }
  body.sidebar-auto-hide .sidebar {
    position: fixed; top: var(--topbar-h); bottom: 0; left: 0;
    width: var(--sidebar-w); z-index: 2050;
    transform: translateX(-100%);
    transition: transform .24s ease;
    box-shadow: 8px 0 30px rgba(0,0,0,.3);
  }
  body.sidebar-auto-hide.sidebar-peek .sidebar { transform: translateX(0); }
  body.sidebar-auto-hide .sidebar-edge-trigger {
    display: block; position: fixed; left: 0; top: var(--topbar-h);
    bottom: 0; width: 12px; z-index: 2040;
  }
  body.sidebar-auto-hide.sidebar-peek .sidebar-edge-trigger { pointer-events: none; }
  body.sidebar-auto-hide .sidebar-reveal-btn {
    display: flex; align-items: center; justify-content: center;
    position: fixed; top: calc(var(--topbar-h) + 18px); left: 0;
    width: 25px; height: 48px; padding: 0;
    color: #fff; background: #242424; border: 1px solid rgba(255,255,255,.2);
    border-left: 0; border-radius: 0 8px 8px 0;
    z-index: 2060; cursor: pointer;
    transition: left .24s ease;
  }
  body.sidebar-auto-hide.sidebar-peek .sidebar-reveal-btn { left: var(--sidebar-w); }
  body.sidebar-auto-hide.sidebar-peek .sidebar-reveal-btn .ui-icon { transform: rotate(180deg); }
  .sidebar-reveal-btn .ui-icon { width: 16px; height: 16px; }
  body.sidebar-auto-hide .viewer-area { min-width: 0; }
  body.mock-fullscreen .sidebar-edge-trigger,
  body.mock-fullscreen .sidebar-reveal-btn { display: none !important; }
}
@media (prefers-reduced-motion: reduce) {
  .app-shell, .sidebar, .sidebar-reveal-btn { transition-duration: 0s !important; }
}

/* MNAA — regresso ao início das páginas editoriais */
.editorial-back-to-top {
  position: fixed;
  right: calc(24px + env(safe-area-inset-right, 0px));
  bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  z-index: 1800;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 50%;
  background: #242424;
  color: #fff;
  box-shadow: 0 5px 18px rgba(0,0,0,.22);
  cursor: pointer;
  transition: background .18s ease, transform .18s ease;
}
.editorial-back-to-top[hidden] { display: none !important; }
.editorial-back-to-top:hover { background: #3a3a3a; transform: translateY(-2px); }
.editorial-back-to-top:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
.editorial-back-to-top .ui-icon { width: 20px; height: 20px; }
@media (max-width: 980px) {
  .editorial-back-to-top {
    right: calc(16px + env(safe-area-inset-right, 0px));
    bottom: calc(20px + env(safe-area-inset-bottom, 0px));
    width: 44px; height: 44px;
  }
  body.mobile-menu-open .editorial-back-to-top { display: none !important; }
}
@media (prefers-reduced-motion: reduce) {
  .editorial-back-to-top { transition: none; }
}


/* MNAA — hierarquia institucional do rodapé (22/10/2026) */
.mnaa-footer__logos { display: block; padding-bottom: 34px; }
.mnaa-footer__logos-primary,
.mnaa-footer__logos-secondary { display: grid; align-items: center; justify-items: center; }
.mnaa-footer__logos-primary { grid-template-columns: repeat(4,minmax(0,1fr)); gap: 22px 26px; }
.mnaa-footer__logos-secondary { grid-template-columns: repeat(6,minmax(0,1fr)); gap: 16px; margin-top: 28px; padding-top: 24px; border-top: 1px solid rgba(128,128,128,.24); }
.mnaa-footer__logos-primary .mnaa-footer__logo { width: 100%; min-height: 88px; }
.mnaa-footer__logos-primary .mnaa-footer__logo img { max-width: 185px; max-height: 88px; }
.mnaa-footer__logos-secondary .mnaa-footer__logo { width: 100%; min-height: 70px; padding: 8px 4px; }
.mnaa-footer__logos-secondary .mnaa-footer__logo img { max-width: 138px; max-height: 62px; }
@media (max-width: 1100px) {
  .mnaa-footer__logos-secondary { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 18px; }
}
@media (max-width: 600px) {
  .mnaa-footer__logos-primary { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
  .mnaa-footer__logos-secondary { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; margin-top: 20px; padding-top: 20px; }
  .mnaa-footer__logos-primary .mnaa-footer__logo { min-height: 78px; }
  .mnaa-footer__logos-primary .mnaa-footer__logo img { max-height: 70px; }
}

/* MNAA — refinamento do rodapé no tema escuro (22/10/2026).
   Mantém as cores originais dos logótipos e a hierarquia aprovada. */
:root[data-theme="dark"] .mnaa-footer__logo,
body[data-theme="dark"] .mnaa-footer__logo,
html.theme-dark .mnaa-footer__logo,
body.theme-dark .mnaa-footer__logo,
body.dark-mode .mnaa-footer__logo {
  background: #dedbd5;
}
:root[data-theme="dark"] .mnaa-footer__logos-secondary,
body[data-theme="dark"] .mnaa-footer__logos-secondary,
html.theme-dark .mnaa-footer__logos-secondary,
body.theme-dark .mnaa-footer__logos-secondary,
body.dark-mode .mnaa-footer__logos-secondary {
  border-top-color: rgba(255,255,255,.09);
  margin-top: 34px;
  padding-top: 30px;
}


/* MNAA — autoria e apoio institucional no rodapé do menu lateral (22/10/2026).
   Mantém a imagem original da Fundação Millennium BCP e reutiliza o MNAA do footer. */
.sidebar-sponsor {
  width: 100%;
  padding-top: 28px;
  padding-bottom: 4px;
}
.sidebar-sponsor__institution {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
}
.sidebar-sponsor__label {
  margin: 0 0 11px;
  color: #bdbdbd;
}
.sidebar-sponsor__mnaa-frame {
  display: flex;
  align-items: center;
  justify-content: center;
  width: min(100%, 176px);
  min-height: 65px;
  padding: 12px 15px;
  border-radius: 3px;
  background: #dedbd5;
}
.sidebar-sponsor__mnaa-logo {
  display: block;
  width: 100%;
  max-width: 146px;
  max-height: 55px;
  height: auto;
  object-fit: contain;
}
.sidebar-sponsor__divider {
  width: 72px;
  height: 1px;
  margin: 19px auto 17px;
  background: rgba(255,255,255,.16);
}
/* Preserva a dimensão previamente aprovada do patrocinador. */
.sidebar-sponsor__logo {
  width: 100%;
  max-width: 190px;
}
@media (max-width: 980px) {
  .sidebar-sponsor {
    padding-top: 32px;
    padding-bottom: 8px;
  }
}


/* MNAA — logótipo sem caixa, adaptação cromática por tema (22/10/2026).
   A imagem de origem tem transparência real. A versão clara é produzida
   apenas no menu escuro; o logótipo institucional do rodapé não é afetado. */
.sidebar-sponsor__mnaa-frame {
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
  min-height: 0;
}
.sidebar-sponsor__mnaa-logo {
  width: 100%;
  max-width: 146px;
  max-height: none;
  filter: brightness(0) invert(1);
}
/* No tema claro, apresentar as cores originais do MNAA. */
body[data-theme="light"] .sidebar-sponsor__mnaa-logo,
:root[data-theme="light"] .sidebar-sponsor__mnaa-logo,
html.theme-light .sidebar-sponsor__mnaa-logo,
body.theme-light .sidebar-sponsor__mnaa-logo {
  filter: none;
}
body[data-theme="light"] .sidebar-sponsor__divider,
:root[data-theme="light"] .sidebar-sponsor__divider {
  background: rgba(40,40,40,.17);
}

/* MNAA — índice seguido imediatamente pela primeira secção editorial.
   Mantém o espaçamento normal quando existem blocos introdutórios. */
.page-section-nav:has(+ .editorial-content > .editorial-section:first-child) {
  margin-bottom: 26px;
}

/* MNAA — pausa editorial antes de uma secção precedida por blocos
   introdutórios (ex.: texto de Pinturas antes de Imagens Históricas).
   Não altera a primeira secção imediatamente após o índice. */
.editorial-content > .editorial-block + .editorial-section--dynamic {
  margin-top: 112px;
}
@media (max-width: 980px) {
  .editorial-content > .editorial-block + .editorial-section--dynamic {
    margin-top: 76px;
  }
}


/* MNAA — tipografia editorial aprovada, consolidada em 23/10/2026. */
/* MNAA — Experiência tipográfica EB Garamond (apenas títulos editoriais). */
@font-face {
  font-family: "MNAA EB Garamond";
  src: url("../fonts/eb-garamond/EBGaramond12-Regular.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "MNAA EB Garamond";
  src: url("../fonts/eb-garamond/EBGaramond12-Italic.woff2") format("woff2");
  font-style: italic;
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "MNAA EB Garamond";
  src: url("../fonts/eb-garamond/EBGaramond12-Bold.woff2") format("woff2");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}
/* Escopo restrito: não afeta menus, botões, Viewer, Morph nem textos corridos. */
.content-inner h1,
.content-inner .editorial-section h2,
.content-inner .editorial-section h3:not(.viewer-launch__title) {
  font-family: "MNAA EB Garamond", Georgia, "Times New Roman", serif;
}

/* Ensaio 02: entrelinha dos paragrafos editoriais, sem outras alteracoes. */
.editorial-content .editorial-block--rich-text p,
.editorial-section .editorial-block--rich-text p {
  line-height: 1.85;
}

/* Ensaio 03: referências documentais nos blocos editoriais dinâmicos. */
.content-inner .editorial-section--dynamic .editorial-block--rich-text > h5 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 13.5px;
  font-weight: 400;
  line-height: 1.55;
  color: #b8b6b2;
}

/* Ensaio 04: contraste das referências no tema claro. */
body.is-editorial-mode[data-theme="light"] .content-inner .editorial-section--dynamic .editorial-block--rich-text > h5 {
  color: #68645f;
}

/* Ensaio 04: índice de navegação editorial, sem alterar os menus. */
body.is-editorial-mode .content-inner .page-section-nav a {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.94rem;
  font-weight: 400;
  line-height: 1.5;
}
body.is-editorial-mode[data-theme="light"] .content-inner .page-section-nav a {
  color: #68645f;
}
body.is-editorial-mode[data-theme="dark"] .content-inner .page-section-nav a {
  color: #b8b6b2;
}



/* MNAA — ImageFeature: grupos documentais definidos no Strapi.
   Largura editorial uniforme de 300px; displayWidth mantém-se para imagens individuais. */
.editorial-section--dynamic .editorial-documentary-grid,
.editorial-content > .editorial-documentary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 300px));
  column-gap: 32px;
  row-gap: 28px;
  justify-content: center;
  align-items: start;
  margin: 0 0 40px;
}
.editorial-documentary-grid > .editorial-block--image-feature {
  min-width: 0;
  margin: 0;
}
.editorial-documentary-grid .editorial-figure {
  width: 100%;
  max-width: 100%;
  margin: 0;
}
.editorial-documentary-grid .editorial-figure img {
  display: block;
  width: 100%;
  height: auto;
}
/* Elemento ímpar isolado: centrado na grelha, sem alargar a fotografia. */
.editorial-documentary-grid > .editorial-block--image-feature:last-child:nth-child(odd) {
  grid-column: 1 / -1;
  width: min(100%, 300px);
  justify-self: center;
}
@media (max-width: 760px) {
  .editorial-section--dynamic .editorial-documentary-grid,
  .editorial-content > .editorial-documentary-grid {
    grid-template-columns: minmax(0, 300px);
    justify-content: center;
    row-gap: 28px;
  }
  .editorial-documentary-grid > .editorial-block--image-feature:last-child:nth-child(odd) {
    grid-column: auto;
    width: 100%;
  }
}


/* MNAA — ordenação discreta da bibliografia (não altera as referências) */
.mnaa-bibliography__sort {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 7px;
  margin: 0 0 22px;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 12px;
}
.mnaa-bibliography__sort-label {
  margin-right: 7px;
  color: inherit;
  opacity: .68;
}
.mnaa-bibliography__sort-btn {
  appearance: none;
  background: transparent;
  border: 1px solid currentColor;
  border-radius: 4px;
  padding: 5px 11px;
  color: inherit;
  opacity: .62;
  font: inherit;
  cursor: pointer;
  transition: opacity .15s ease;
}
.mnaa-bibliography__sort-btn:hover,
.mnaa-bibliography__sort-btn:focus-visible { opacity: 1; }
.mnaa-bibliography__sort-btn.is-active {
  opacity: 1;
  font-weight: 600;
}
.mnaa-bibliography__sort-btn:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}


/* MNAA — Viewer em largura total, mantendo a barra superior (desktop).
   A regra surge após as regras de recolha automática para prevalecer
   mesmo quando essa preferência está ativa no modo editorial. */
@media (min-width: 981px) {
  body.is-viewer-mode .app-shell,
  body.is-viewer-mode.sidebar-auto-hide .app-shell {
    grid-template-columns: minmax(0, 1fr);
  }

  body.is-viewer-mode .sidebar {
    display: none;
  }

  body.is-viewer-mode .viewer-area {
    grid-column: 1;
    min-width: 0;
  }

  body.is-viewer-mode .sidebar-edge-trigger,
  body.is-viewer-mode .sidebar-reveal-btn {
    display: none !important;
  }
}

/* Navegador dos seis painéis — isolado da galeria e do Viewer */
.panel-navigator { margin: 1.5rem auto 2.5rem; max-width: 1200px; }
.panel-navigator__title { margin: 0 0 .65rem; }
.panel-navigator__hint { margin: 0 0 1rem; opacity: .78; }
.panel-navigator__scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.panel-navigator__canvas { position: relative; min-width: 740px; }
.panel-navigator__image { display: block; width: 100%; height: auto; }
.panel-navigator__hotspot { position: absolute; top: 0; height: 100%; border: 0; border-radius: 0; padding: 0; background: transparent; cursor: pointer; }
.panel-navigator__hotspot::after { content: ''; position: absolute; inset: 0; border: 2px solid transparent; background: transparent; transition: background .18s ease, border-color .18s ease; pointer-events: none; }
.panel-navigator__hotspot:hover::after, .panel-navigator__hotspot:focus-visible::after { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.85); }
.panel-navigator__name { position: absolute; left: 50%; bottom: 5%; transform: translateX(-50%); background: rgba(17,17,17,.85); color: white; font-size: .82rem; line-height: 1.2; padding: .4rem .6rem; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .18s ease; }
.panel-navigator__hotspot:hover .panel-navigator__name, .panel-navigator__hotspot:focus-visible .panel-navigator__name { opacity: 1; }
@media (max-width: 760px) { .panel-navigator__canvas { min-width: 820px; } }
@media (prefers-reduced-motion: reduce) { .panel-navigator__hotspot::after, .panel-navigator__name { transition: none; } }

/* MNAA: barra de escala física única (metadados Strapi) */
.mnaa-physical-scale {
  position: absolute;
  left: 22px;
  bottom: 20px;
  z-index: 12;
  pointer-events: none;
  padding: 7px 10px 9px;
  border-radius: 7px;
  color: #fff;
  background: rgba(0,0,0,.58);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  text-shadow: 0 1px 2px #000;
}
.mnaa-physical-scale[hidden] { display: none !important; }
.mnaa-physical-scale-label { display: block; margin-bottom: 7px; }
.mnaa-physical-scale-bar {
  display: block;
  box-sizing: border-box;
  height: 9px;
  border-left: 2px solid #fff;
  border-right: 2px solid #fff;
  border-bottom: 2px solid #fff;
}

/* MNAA — Intervenção: cartões Viewer Launch sem imagens, em grelha responsiva.
   Ativa-se apenas quando há pelo menos dois cartões consecutivos na secção. */
@media (min-width: 1101px) {
  .editorial-section--dynamic:has(> .viewer-launch--without-image + .viewer-launch--without-image) {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    column-gap: 18px;
    row-gap: 20px;
    align-items: stretch;
  }
}
@media (min-width: 701px) and (max-width: 1100px) {
  .editorial-section--dynamic:has(> .viewer-launch--without-image + .viewer-launch--without-image) {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    align-items: stretch;
  }
}
@media (min-width: 701px) {
  .editorial-section--dynamic:has(> .viewer-launch--without-image + .viewer-launch--without-image) > :not(.viewer-launch--without-image) {
    grid-column: 1 / -1;
  }
}
.editorial-section--dynamic:has(> .viewer-launch--without-image + .viewer-launch--without-image) > .viewer-launch--without-image {
  max-width: none;
  min-width: 0;
  height: 100%;
  padding: 22px 20px;
  margin: 0;
}
.editorial-section--dynamic:has(> .viewer-launch--without-image + .viewer-launch--without-image) > .viewer-launch--without-image .viewer-launch__title {
  font-size: 1.24rem;
}
.editorial-section--dynamic:has(> .viewer-launch--without-image + .viewer-launch--without-image) > .viewer-launch--without-image .viewer-action {
  margin-top: auto;
  max-width: 100%;
  white-space: normal;
  text-align: left;
}
@media (max-width: 700px) {
  .editorial-section--dynamic > .viewer-launch--without-image {
    max-width: 100%;
  }
}

/* =========================================================
   MNAA — Viewer Launch com imagem: tratamento editorial sóbrio
   2026-11-05. Não altera cartões sem imagem nem o Viewer.
   ========================================================= */
.editorial-section--dynamic .viewer-launch:not(.viewer-launch--without-image) {
  width: 100%;
  max-width: 1040px;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.11);
  border-radius: 3px;
  background: #242321;
  box-shadow: none;
  transition: border-color .2s ease, background-color .2s ease;
}
.editorial-section--dynamic .viewer-launch:not(.viewer-launch--without-image):hover {
  border-color: rgba(255,255,255,.28);
  background: #282725;
}
.editorial-section--dynamic .viewer-launch:not(.viewer-launch--without-image) .viewer-launch__layout {
  grid-template-columns: minmax(240px, 38%) minmax(0, 1fr);
  gap: 0;
  align-items: stretch;
}
.editorial-section--dynamic .viewer-launch:not(.viewer-launch--without-image) .viewer-launch__media {
  overflow: hidden;
}
.editorial-section--dynamic .viewer-launch:not(.viewer-launch--without-image) .viewer-launch__image {
  width: 100%;
  height: 100%;
  min-height: 245px;
  max-height: 340px;
  border-radius: 0;
  object-fit: cover;
}
.editorial-section--dynamic .viewer-launch:not(.viewer-launch--without-image) .viewer-launch__content {
  padding: 25px 30px 23px;
}
.editorial-section--dynamic .viewer-launch:not(.viewer-launch--without-image) .viewer-launch__title {
  margin: 0 0 12px;
  font-size: clamp(1.3rem, 1.6vw, 1.55rem);
  line-height: 1.32;
  font-weight: 400;
}
.editorial-section--dynamic .viewer-launch:not(.viewer-launch--without-image) .viewer-launch__description {
  margin: 0 0 24px;
  max-width: 52ch;
  color: #bcbab7;
  font-size: .94rem;
  line-height: 1.6;
}
.editorial-section--dynamic .viewer-launch:not(.viewer-launch--without-image) .viewer-action {
  display: inline-flex;
  align-self: flex-start;
  justify-content: flex-start;
  width: auto;
  max-width: 100%;
  padding: 10px 0 3px;
  border: 0;
  border-bottom: 1px solid rgba(255,255,255,.24);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: #e8e5e0;
  font-size: .87rem;
  font-weight: 400;
  text-align: left;
  line-height: 1.4;
  transition: color .18s ease, border-color .18s ease;
}
.editorial-section--dynamic .viewer-launch:not(.viewer-launch--without-image) .viewer-action::after {
  content: '\2192';
  margin-left: 12px;
  font-size: 1.15em;
  font-weight: 400;
}
.editorial-section--dynamic .viewer-launch:not(.viewer-launch--without-image) .viewer-action:hover,
.editorial-section--dynamic .viewer-launch:not(.viewer-launch--without-image) .viewer-action:focus-visible {
  border-color: #f2efeb;
  background: transparent;
  color: #fff;
  transform: none;
}
@media (max-width: 900px) {
  .editorial-section--dynamic .viewer-launch:not(.viewer-launch--without-image) .viewer-launch__layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .editorial-section--dynamic .viewer-launch:not(.viewer-launch--without-image) .viewer-launch__image {
    height: 260px;
    min-height: 0;
    max-height: none;
    object-fit: cover;
  }
  .editorial-section--dynamic .viewer-launch:not(.viewer-launch--without-image) .viewer-launch__content {
    padding: 23px 24px 25px;
  }
}
@media (max-width: 560px) {
  .editorial-section--dynamic .viewer-launch:not(.viewer-launch--without-image) .viewer-launch__image {
    height: 210px;
  }
  .editorial-section--dynamic .viewer-launch:not(.viewer-launch--without-image) .viewer-launch__content {
    padding: 20px;
  }
}

/* MNAA — cartões de acesso ao Viewer: versão compacta (05-11-2026) */
.editorial-section--dynamic .viewer-launch:not(.viewer-launch--without-image) {
  max-width: 760px;
}
.editorial-section--dynamic .viewer-launch:not(.viewer-launch--without-image) .viewer-launch__layout {
  grid-template-columns: minmax(180px, 36%) minmax(0, 1fr);
}
.editorial-section--dynamic .viewer-launch:not(.viewer-launch--without-image) .viewer-launch__image {
  min-height: 170px;
  max-height: 205px;
}
.editorial-section--dynamic .viewer-launch:not(.viewer-launch--without-image) .viewer-launch__content {
  padding: 17px 22px 16px;
}
.editorial-section--dynamic .viewer-launch:not(.viewer-launch--without-image) .viewer-launch__title {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 1.08rem;
  line-height: 1.35;
  font-weight: 600;
  margin-bottom: 8px;
}
.editorial-section--dynamic .viewer-launch:not(.viewer-launch--without-image) .viewer-launch__description {
  font-family: Arial, Helvetica, sans-serif;
  font-size: .81rem;
  line-height: 1.48;
  margin-bottom: 12px;
}
.editorial-section--dynamic .viewer-launch:not(.viewer-launch--without-image) .viewer-action {
  font-family: Arial, Helvetica, sans-serif;
  font-size: .79rem;
  padding-top: 4px;
}
@media (max-width: 900px) {
  .editorial-section--dynamic .viewer-launch:not(.viewer-launch--without-image) .viewer-launch__layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .editorial-section--dynamic .viewer-launch:not(.viewer-launch--without-image) .viewer-launch__image {
    height: 205px;
    min-height: 0;
    max-height: none;
  }
}
@media (max-width: 560px) {
  .editorial-section--dynamic .viewer-launch:not(.viewer-launch--without-image) .viewer-launch__image { height: 175px; }
  .editorial-section--dynamic .viewer-launch:not(.viewer-launch--without-image) .viewer-launch__content { padding: 17px 18px; }
}


/* MNAA — Intervenção: índice de seis painéis, duas colunas.
   Restrito à secção cujo id contém "interven"; não afeta Exames. */
@media (min-width: 1050px) {
  .editorial-section--dynamic[id*="interven" i]:has(> .viewer-launch--with-image) {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 22px;
    row-gap: 24px;
    align-items: stretch;
    width: min(100%, 1150px);
  }
  .editorial-section--dynamic[id*="interven" i] > :not(.viewer-launch--with-image) {
    grid-column: 1 / -1;
  }
  .editorial-section--dynamic[id*="interven" i] > .viewer-launch--with-image {
    min-width: 0;
    max-width: none;
    margin: 0;
    height: 100%;
  }
}
@media (min-width: 1050px) {
  .editorial-section--dynamic[id*="interven" i] > .viewer-launch--with-image .viewer-launch__layout {
    grid-template-columns: 40% minmax(0,1fr);
    height: 100%;
    min-height: 190px;
  }
  .editorial-section--dynamic[id*="interven" i] > .viewer-launch--with-image .viewer-launch__image {
    min-height: 190px;
    max-height: none;
    height: 100%;
  }
  .editorial-section--dynamic[id*="interven" i] > .viewer-launch--with-image .viewer-launch__content {
    padding: 20px 18px 18px;
  }
}
.editorial-section--dynamic[id*="interven" i] > .viewer-launch--with-image .viewer-launch__title {
  font-size: 1.04rem;
  line-height: 1.35;
  margin-bottom: 12px;
}
.editorial-section--dynamic[id*="interven" i] > .viewer-launch--with-image .viewer-launch__description {
  display: none;
}
.editorial-section--dynamic[id*="interven" i] > .viewer-launch--with-image .viewer-action {
  font-size: .8rem;
  padding: 5px 0 4px;
}
.editorial-section--dynamic[id*="interven" i] > .editorial-block--rich-text {
  max-width: 850px;
  margin-bottom: 8px;
}
@media (min-width: 1050px) {
  .editorial-section--dynamic[id*="interven" i] > h2 { margin-bottom: 0; }
}
@media (min-width: 701px) and (max-width: 1049px) {
  .editorial-section--dynamic[id*="interven" i] > .viewer-launch--with-image {
    max-width: 760px;
  }
}
@media (max-width: 700px) {
  .editorial-section--dynamic[id*="interven" i] > .viewer-launch--with-image {
    max-width: 100%;
  }
}


/* MNAA — refinamento da secção Intervenção (05-11-2026).
   Apenas distribuição e tipografia introdutória; restantes páginas intactas. */
@media (min-width: 1050px) {
  .content-inner:has(.editorial-section--dynamic[id*="interven" i] > .viewer-launch--with-image) {
    max-width: 1120px;
  }
  .editorial-section--dynamic[id*="interven" i]:has(> .viewer-launch--with-image) {
    width: min(100%, 950px);
    margin-inline: auto;
  }
}
/* Introdução: tipografia de leitura discreta, sem alterar o texto no Strapi. */
.editorial-section--dynamic[id*="interven" i]:has(> .viewer-launch--with-image)
  > .editorial-block--rich-text p {
  font-family: Arial, Helvetica, sans-serif;
  font-size: .94rem;
  font-weight: 400;
  font-style: normal;
  line-height: 1.65;
  color: #c9c7c3;
  letter-spacing: 0;
}
body.is-editorial-mode[data-theme="light"]
  .editorial-section--dynamic[id*="interven" i]:has(> .viewer-launch--with-image)
  > .editorial-block--rich-text p {
  color: #4a4946;
}

/* MNAA — Intervenção: cartão clicável sem alterar dimensões nem tipografia. */
.editorial-section--dynamic[id*="interven" i] > .viewer-launch--with-image[data-viewer-target] {
  cursor: pointer;
  transition: border-color .2s ease, background-color .2s ease, box-shadow .2s ease;
}
.editorial-section--dynamic[id*="interven" i] > .viewer-launch--with-image[data-viewer-target]:hover {
  border-color: rgba(255,255,255,.35);
  box-shadow: 0 4px 18px rgba(0,0,0,.16);
}
.editorial-section--dynamic[id*="interven" i] > .viewer-launch--with-image[data-viewer-target]:focus-visible {
  outline: 2px solid rgba(255,255,255,.85);
  outline-offset: 3px;
}
@media (prefers-reduced-motion: reduce) {
  .editorial-section--dynamic[id*="interven" i] > .viewer-launch--with-image[data-viewer-target] { transition: none; }
}

/* MNAA — acesso discreto aos Créditos, abaixo dos logótipos do menu lateral. */
.sidebar-credits-link {
  display: inline-block;
  margin: 23px auto 0;
  padding: 5px 2px;
  color: #a8a8a8;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 12px;
  line-height: 1.4;
  text-decoration: none;
  border-bottom: 1px solid transparent;
}
.sidebar-credits-link:hover,
.sidebar-credits-link:focus-visible,
.sidebar-credits-link.is-active {
  color: #fff;
  border-bottom-color: currentColor;
}
.sidebar-credits-link:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }

/* MNAA — ocultar temporariamente o seletor de idioma.
   Reativar quando estiverem disponíveis os conteúdos EN. */
.language-switch {
    display: none !important;
}
/* MNAA — hiperligação institucional no bloco de identidade do rodapé. */
.mnaa-footer__identity a { color: inherit; text-decoration: none; }
.mnaa-footer__identity a:hover,
.mnaa-footer__identity a:focus-visible { text-decoration: underline; text-underline-offset: 3px; }


/* MNAA — versões institucionais originais da Fundação Millennium BCP.
   Apenas a Fundação alterna de imagem; os restantes logótipos não são afetados. */
.sidebar-sponsor__logo--white,
.mnaa-footer__millennium-white { display: none !important; }
body.is-editorial-mode[data-theme="dark"] .sidebar-sponsor__logo--color,
body.is-editorial-mode[data-theme="dark"] .mnaa-footer__millennium-color { display: none !important; }
body.is-editorial-mode[data-theme="dark"] .sidebar-sponsor__logo--white,
body.is-editorial-mode[data-theme="dark"] .mnaa-footer__millennium-white { display: block !important; }
/* Sem caixa clara exclusivamente para o logótipo da Fundação no rodapé. */
.mnaa-footer__logos-primary .mnaa-footer__logo:has(.mnaa-footer__millennium-color) {
  background: transparent !important;
}

/* MNAA — dimensões uniformes do logótipo Fundação no menu (09/11/2026). */
.sidebar-sponsor__logo--color,
.sidebar-sponsor__logo--white {
  width: 145px;
  height: 95px;
  max-width: 100%;
  max-height: 95px;
  object-fit: contain;
  margin-inline: auto;
}

/* MNAA — logótipos institucionais por tema (09/11/2026).
   Mantém integralmente as imagens originais no tema claro. */
.mnaa-footer__logo .mnaa-footer__logo-dark { display: none !important; }
body.is-editorial-mode[data-theme="dark"] .mnaa-footer__logo {
  background: transparent !important;
  border-radius: 0;
}
body.is-editorial-mode[data-theme="dark"] .mnaa-footer__logo .mnaa-footer__logo-light,
body.is-editorial-mode[data-theme="dark"] .mnaa-footer__logo .mnaa-footer__millennium-color,
body.is-editorial-mode[data-theme="dark"] .mnaa-footer__logo .mnaa-footer__millennium-white {
  display: none !important;
}
body.is-editorial-mode[data-theme="dark"] .mnaa-footer__logo .mnaa-footer__logo-dark {
  display: block !important;
}

/* MNAA — mesmo logótipo e tratamento cromático do menu lateral no rodapé escuro. */
body.is-editorial-mode[data-theme="dark"] .mnaa-footer__logos-primary .mnaa-footer__logo img.mnaa-footer__logo-dark[src="assets/img/logo-mnaa-sidebar.webp"] {
  filter: brightness(0) invert(1);
}


/* MNAA — equilíbrio ótico dos parceiros no tema escuro (10/11/2026).
   Apenas tema escuro; mantém proporções e hierarquia institucional. */
@media (min-width: 1101px) {
  body.is-editorial-mode[data-theme="dark"] .mnaa-footer__logos-secondary {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    column-gap: 24px;
    row-gap: 12px;
  }
}
body.is-editorial-mode[data-theme="dark"] .mnaa-footer__logos-secondary .mnaa-footer__logo {
  min-height: 88px;
  padding: 10px 8px;
}
body.is-editorial-mode[data-theme="dark"] .mnaa-footer__logos-secondary .mnaa-footer__logo img.mnaa-footer__logo-dark {
  width: auto;
  height: auto;
  max-width: 160px;
  max-height: 66px;
  object-fit: contain;
}
/* Ajustes óticos individuais: os logótipos têm proporções muito diferentes. */
body.is-editorial-mode[data-theme="dark"] .mnaa-footer__logos-secondary img[src$="ljf-dark.png"] { max-width: 128px; max-height: 64px; }
body.is-editorial-mode[data-theme="dark"] .mnaa-footer__logos-secondary img[src$="adf-dark.png"] { max-width: 168px; max-height: 66px; }
body.is-editorial-mode[data-theme="dark"] .mnaa-footer__logos-secondary img[src$="gamnaa-dark.png"] { max-width: 92px; max-height: 70px; }
body.is-editorial-mode[data-theme="dark"] .mnaa-footer__logos-secondary img[src$="evora-dark.svg"] { max-width: 160px; max-height: 66px; }
body.is-editorial-mode[data-theme="dark"] .mnaa-footer__logos-secondary img[src$="hercules-dark.svg"] { max-width: 165px; max-height: 66px; }
body.is-editorial-mode[data-theme="dark"] .mnaa-footer__logos-secondary img[src$="in2past-dark.png"] { max-width: 166px; max-height: 66px; }
body.is-editorial-mode[data-theme="dark"] .mnaa-footer__logos-secondary img[src$="ghent-dark.png"] { max-width: 105px; max-height: 74px; }
body.is-editorial-mode[data-theme="dark"] .mnaa-footer__logos-secondary img[src$="ugent-faculty-sciences-white.svg"] { max-width: 158px; max-height: 66px; }


/* MNAA — grelha institucional uniforme nos dois temas (10/11/2026).
   Replica no tema claro a geometria 4 × 2 aprovada para o tema escuro.
   As imagens e cores institucionais originais são preservadas. */
@media (min-width: 1101px) {
  body.is-editorial-mode[data-theme="light"] .mnaa-footer__logos-secondary {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    column-gap: 24px;
    row-gap: 12px;
  }
}
body.is-editorial-mode[data-theme="light"] .mnaa-footer__logos-secondary .mnaa-footer__logo {
  min-height: 88px;
  padding: 10px 8px;
}
body.is-editorial-mode[data-theme="light"] .mnaa-footer__logos-secondary .mnaa-footer__logo img.mnaa-footer__logo-light {
  width: auto;
  height: auto;
  max-width: 160px;
  max-height: 66px;
  object-fit: contain;
}
/* Correspondência das oito posições com os ajustes óticos do tema escuro. */
body.is-editorial-mode[data-theme="light"] .mnaa-footer__logos-secondary .mnaa-footer__logo:nth-child(1) img.mnaa-footer__logo-light { max-width: 128px; max-height: 64px; }
body.is-editorial-mode[data-theme="light"] .mnaa-footer__logos-secondary .mnaa-footer__logo:nth-child(2) img.mnaa-footer__logo-light { max-width: 168px; max-height: 66px; }
body.is-editorial-mode[data-theme="light"] .mnaa-footer__logos-secondary .mnaa-footer__logo:nth-child(3) img.mnaa-footer__logo-light { max-width: 92px; max-height: 70px; }
body.is-editorial-mode[data-theme="light"] .mnaa-footer__logos-secondary .mnaa-footer__logo:nth-child(4) img.mnaa-footer__logo-light { max-width: 160px; max-height: 66px; }
body.is-editorial-mode[data-theme="light"] .mnaa-footer__logos-secondary .mnaa-footer__logo:nth-child(5) img.mnaa-footer__logo-light { max-width: 165px; max-height: 66px; }
body.is-editorial-mode[data-theme="light"] .mnaa-footer__logos-secondary .mnaa-footer__logo:nth-child(6) img.mnaa-footer__logo-light { max-width: 166px; max-height: 66px; }
body.is-editorial-mode[data-theme="light"] .mnaa-footer__logos-secondary .mnaa-footer__logo:nth-child(7) img.mnaa-footer__logo-light { max-width: 105px; max-height: 74px; }
body.is-editorial-mode[data-theme="light"] .mnaa-footer__logos-secondary .mnaa-footer__logo:nth-child(8) img.mnaa-footer__logo-light { max-width: 158px; max-height: 66px; }

.mnaa-footer__legal a {
    font-size: 12px;
    font-weight: 400;
    color: #292929;
}
:root[data-theme="dark"] .mnaa-footer__legal a,
body[data-theme="dark"] .mnaa-footer__legal a,
html.theme-dark .mnaa-footer__legal a,
body.theme-dark .mnaa-footer__legal a,
body.dark-mode .mnaa-footer__legal a {
    color: #ededed;
}
/* MNAA - sublinhado da politica de privacidade ao passar o rato ou focar */
.mnaa-footer__legal a { text-decoration: none; }
.mnaa-footer__legal a:hover,
.mnaa-footer__legal a:focus-visible {
    text-decoration: underline;
    text-underline-offset: 3px;
}
