/* references: responsibility-owned styles; cascade order preserved. */
.references {
  display: block;
  background: var(--ivory);
  border-top: 1px solid var(--line);
}

.references .section-label {
  font: 600 26px/1.4 var(--font-reading);
  color: var(--brown);
  padding: 0;
  border: 0;
  margin-bottom: 26px;
  letter-spacing: 0;
}

.references h2 {
  font-size: 44px;
  line-height: 1.22;
  margin: 0 0 42px;
  max-width: none;
}

.references h3 {
  font: 400 26px/1.35 var(--serif);
  color: var(--navy);
  margin: 0 0 22px;
}

.references-body {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 34px 64px;
  align-items: start;
}

.reference-sources {
  min-width: 0;
}

.reference-sources>p {
  font: 16px/1.85 var(--font-reading);
  color: var(--muted);
  max-width: 65ch;
  margin: 0 0 22px;
  padding: 0;
  border: 0;
}

.references .credits {
  grid-column: 2;
  grid-row: 1;
  margin: 0;
  padding: 0 0 0 32px;
  border: 0;
  border-left: 1px solid var(--line);
  min-width: 0;
}

.references .credits p {
  font-size: 16px;
  line-height: 1.85;
  max-width: 62ch;
  margin-bottom: 18px;
}

.references .credits .source-note {
  line-height: 1.8;
}

.references details {
  grid-column: 1/-1;
  grid-row: 2;
  margin: 0;
  padding: 0;
  border: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.references summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  cursor: pointer;
  list-style: none;
  font: 700 17px/1.5 var(--font-reading);
  padding: 20px 0;
  color: var(--navy);
}

.references summary::-webkit-details-marker {
  display: none;
}

.references summary>span {
  font-size: 24px;
  color: var(--brown);
  flex-shrink: 0;
}

.references details[open] summary>span {
  transform: rotate(45deg);
}

.references details p {
  max-width: 88ch;
  font-size: 16px;
  line-height: 1.85;
}

footer .brand {
  font: 500 13px/1.5 var(--font-reading);
  letter-spacing: 1px;
}

footer .brand-symbol {
  display: none;
}

footer p {
  font-size: 14px;
  line-height: 1.7;
}

footer>a:last-child {
  font-size: 14px;
  color: var(--gold);
  padding: 10px 0;
  border-bottom: 1px solid #c6a15c55;
}

footer>a:last-child:hover {
  color: var(--ivory);
}

@media(max-width:760px) {
  .references .section-label {
    font-size: 24px;
  }

  .references h2 {
    font-size: 36px;
  }

  .references-body {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .references .credits {
    grid-column: 1;
    grid-row: auto;
    padding: 26px 0 0;
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .references details {
    grid-row: auto;
  }

  .references summary {
    font-size: 16px;
  }

  footer {
    flex-wrap: wrap;
    gap: 16px;
  }
}

.footer-journey {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}

.footer-arabic {
  font: 400 23px/1.4 'Segoe UI',Tahoma,serif;
  color: var(--gold);
}

.footer-translation {
  font: 15px/1.5 var(--font-reading);
  color: var(--paper);
}

.portal-footer {
  padding-block: 14px;
  padding-right: max(76px, calc((100vw - 1200px)/2));
  gap: 12px 24px;
}

.portal-footer .footer-lab {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  margin: 0;
  padding: 0;
  border: 0;
  color: var(--ivory);
  text-decoration: none;
}

.footer-lab img {
  width: 44px;
  height: 44px;
  object-fit: contain;
  background: white;
}

.footer-lab small {
  display: block;
  color: var(--paper);
  font-size: 12px;
}

.footer-lab:hover strong { text-decoration: underline; }

@media(max-width:760px) {
  .portal-footer { padding-block: 14px; }
  .portal-footer p { order: 0; width: auto; }
  .footer-arabic { font-size: 22px; }
}

.bibliography-list{list-style:none;margin:0;padding:0 0 12px;columns:2;column-gap:48px}
.bibliography-list li{break-inside:avoid;margin:0 0 20px;font:15px/1.8 var(--font-reading);color:var(--muted)}
@media(max-width:760px){.bibliography-list{columns:1}}

.references details.about-build,.references details.rights-notes{grid-row:auto}
.build-notes{padding:0 0 8px}
.references .build-notes h3 { margin: 22px 0 8px; font-size: 22px; }
.references .build-notes h3:first-child { margin-top: 0; }
.references .build-notes p { max-width: 88ch; margin: 0 0 14px; }
.references .credits a { text-decoration: underline; text-underline-offset: 3px; }
.build-notes a{text-decoration:underline;text-underline-offset:3px;text-decoration-color:var(--gold);overflow-wrap:anywhere}

/* Destaque para as fontes e a bibliografia. */
.references .reference-sources {
  padding: clamp(18px, 2.4vw, 32px);
  border: 1px solid #cfb99a;
  border-top: 3px solid #956330;
  background: #fffaf2;
}
.references .reference-sources h3 { margin-top: 0; }
.references .reference-sources p { color: var(--navy); }
.references .bibliography-list li {
  padding: 12px 0;
  margin: 0;
  border-bottom: 1px solid #cfb99a;
  color: var(--navy);
}
.references details:has(.bibliography-list) > summary {
  color: var(--navy);
  font-weight: 700;
}

@media (min-width: 1001px) {
  :root { --portal-footer-height: 64px; }
  .portal-footer {
    box-sizing: border-box;
    min-height: var(--portal-footer-height);
    padding-block: 6px;
  }
  .portal-footer .footer-journey { gap: 0; }
  .portal-footer .footer-arabic { font-size: 19px; }
  .portal-footer .footer-translation { font-size: 13px; }
  .portal-footer .footer-lab img { width: 34px; height: 34px; }
}

.portal-footer {
  border-top: 1px solid var(--gold);
  background: var(--navy);
}

.portal-footer .footer-lab {
  padding-inline-start: 12px;
  border-inline-start: 1px solid #c6a15c66;
}

.portal-footer .footer-lab img { border-radius: 3px; }

@media (min-width: 1001px) {
  .portal-footer { padding-right: max(84px, calc((100vw - 1200px)/2)); }
}


.portal-footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 10px clamp(12px, 2vw, 26px);
  padding-inline: clamp(20px, 3vw, 58px);
}
.footer-identity, .footer-links {
  display: flex;
  align-items: center;
  gap: 12px;
}
.footer-links { justify-content: flex-end; }
.footer-hourglass { color: var(--gold); flex: none; }
.portal-footer > p {
  width: auto;
  order: 0;
  color: var(--ivory);
  font-size: 16px;
  text-align: center;
}
@media (max-width: 760px) {
  .portal-footer { grid-template-columns: minmax(0, 1fr); }
  .portal-footer > p { text-align: left; }
  .footer-links { justify-content: space-between; }
  .portal-footer .footer-lab { padding: 0; border: 0; }
}
