/* ============================================================================
 * PADRÃO BIBLIOGRAFIA CTRLZ — SISTEMA SOL–PRISMAS
 * Regra Canônica (§3 SKILL CTRL Z):
 *  - Caixas <details> com rótulos canônicos (Bibliografia / Sinonímia / Índice)
 *  - Referências ABNT NBR 6023 completas, alinhadas à esquerda (sem justificação)
 *  - Recuo das linhas seguintes (hanging indent) em .ref-abnt
 *  - DOI / URL preservado como link contínuo clicável (sem word-break: break-all)
 *  - Um único parágrafo contínuo de ~15 linhas por fonte com limites de extrapolação
 *  - Citações no texto linkadas via .citacao-abnt -> #ref-...
 * ============================================================================ */

.blocos-complementares-ctrlz {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 18px;
  text-align: left !important;
}

.bloco-lastro {
  background: rgba(0, 31, 26, 0.34);
  border: 1px solid rgba(207, 230, 201, 0.22);
  border-radius: 18px;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-size: 0.85rem;
  text-align: left !important;
  color: #CFE6C9;
}

.titulo-lastro {
  font-size: 0.88rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.9px;
  color: #E8F5E9;
  text-align: center;
  cursor: pointer;
  list-style: none;
  padding: 4px 0;
  user-select: none;
}

.titulo-lastro::-webkit-details-marker {
  display: none;
}

.titulo-lastro::after {
  content: ' ▾';
  font-size: 0.85em;
  opacity: 0.85;
}

.bloco-lastro[open] .titulo-lastro::after {
  content: ' ▴';
}

.lista-lastro {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 10px;
  text-align: left !important;
}

.ref-item {
  text-align: left !important;
  line-height: 1.58;
  padding: 10px 12px;
  border-radius: 12px;
  scroll-margin-top: 24px;
  transition: background 0.25s ease, box-shadow 0.25s ease;
}

.ref-item:target {
  background: rgba(207, 230, 201, 0.14);
  box-shadow: 0 0 0 1px rgba(165, 214, 167, 0.45);
}

.ref-abnt {
  padding-left: 1.8em;
  text-indent: -1.8em;
  margin: 0 0 8px 0;
  text-align: left !important;
  color: #E8F5E9;
  font-size: 0.87rem;
  line-height: 1.55;
}

.ref-abnt strong {
  color: #E8F5E9;
}

.ref-resumo {
  margin: 0;
  text-align: left !important;
  color: #CFE6C9;
  opacity: 0.94;
  font-size: 0.84rem;
  line-height: 1.62;
  hyphens: none;
}

.link-abnt,
.bloco-lastro a.link-abnt {
  color: #A5D6A7 !important;
  -webkit-text-fill-color: #A5D6A7 !important;
  text-decoration: underline;
  text-underline-offset: 2px;
  word-break: normal !important;
  overflow-wrap: break-word;
  font-weight: 700;
}

.link-abnt:hover,
.bloco-lastro a.link-abnt:hover {
  color: #FFFFFF !important;
  -webkit-text-fill-color: #FFFFFF !important;
}

.citacao-abnt {
  color: #A5D6A7 !important;
  -webkit-text-fill-color: #A5D6A7 !important;
  text-decoration: none;
  border-bottom: 1px dotted rgba(165, 214, 167, 0.72);
  font-weight: 700;
}

.citacao-abnt:hover {
  color: #FFFFFF !important;
  -webkit-text-fill-color: #FFFFFF !important;
}

.lista-glossario,
.lista-remissivo {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 10px;
  text-align: left !important;
  line-height: 1.58;
  font-size: 0.84rem;
  color: #CFE6C9;
}

.lista-glossario p,
.lista-remissivo p {
  margin: 0;
  text-align: left !important;
}

.lista-glossario strong,
.lista-remissivo strong {
  color: #E8F5E9;
}

/* ==================== TEMA CLARO (VERDE-SÁLVIA / PETRÓLEO — SOL.MED.BR) ==================== */
.bloco-lastro.tema-claro {
  background: rgba(255, 255, 255, 0.76);
  border: 1.5px solid rgba(0, 77, 64, 0.25);
  color: #1E3D35;
  box-shadow: 0 4px 16px rgba(0, 77, 64, 0.06);
}

.bloco-lastro.tema-claro .titulo-lastro {
  color: #004D40;
}

.bloco-lastro.tema-claro .ref-item:target {
  background: rgba(0, 77, 64, 0.08);
  box-shadow: 0 0 0 1px rgba(0, 77, 64, 0.35);
}

.bloco-lastro.tema-claro .ref-abnt,
.bloco-lastro.tema-claro .ref-abnt strong {
  color: #00382E;
}

.bloco-lastro.tema-claro .ref-resumo {
  color: #1F443C;
  opacity: 1;
}

.bloco-lastro.tema-claro .link-abnt,
.bloco-lastro.tema-claro a.link-abnt {
  color: #005B4B !important;
  -webkit-text-fill-color: #005B4B !important;
}

.bloco-lastro.tema-claro .link-abnt:hover,
.bloco-lastro.tema-claro a.link-abnt:hover {
  color: #002E26 !important;
  -webkit-text-fill-color: #002E26 !important;
}

.bloco-lastro.tema-claro .lista-glossario,
.bloco-lastro.tema-claro .lista-remissivo {
  color: #1F443C;
}

.bloco-lastro.tema-claro .lista-glossario strong,
.bloco-lastro.tema-claro .lista-remissivo strong {
  color: #00382E;
}

a.citacao-abnt.tema-claro {
  color: #005B4B !important;
  -webkit-text-fill-color: #005B4B !important;
  border-bottom: 1px dotted rgba(0, 91, 75, 0.65);
}

@media (max-width: 520px) {
  .bloco-lastro {
    padding: 14px 14px;
  }
  .ref-abnt {
    padding-left: 1.25em;
    text-indent: -1.25em;
    font-size: 0.83rem;
  }
  .ref-resumo {
    font-size: 0.82rem;
  }
}
