/* ========================================================================
   BIOEMERGE — Article enhancements: citações, gráficos, fluxogramas, mapas
   ======================================================================== */

.article__refs { margin: 56px 0 0; padding-top: 32px; border-top: 1px solid var(--line-soft); }
.article__refs h2 { font-size: 1.25rem; margin: 0 0 18px; }
.article__refs ol { display: flex; flex-direction: column; gap: 11px; padding-left: 22px; margin: 0; }
.article__refs li { font-size: .9rem; color: var(--ink-2); line-height: 1.6; }
.article__refs a { color: var(--brand); text-decoration: underline; text-underline-offset: 3px; word-break: break-word; }
[data-theme="dark"] .article__refs a { color: var(--brand-deep); }
.article__refs a:hover { color: var(--terracotta); }
.article__refs .src-tag { font-family: 'Geist Mono', monospace; font-size: .68rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-left: 6px; }

/* ---- Leia também — links internos (engajamento) ---- */
aside.article__related {
  margin: 48px 0 8px;
  padding: 26px 26px 28px;
  background: var(--bg-2);
  border: 1px solid var(--line-soft);
  border-radius: 18px;
}
aside.article__related .article__related-label {
  display: block;
  font-family: 'Geist Mono', monospace;
  font-size: .72rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--brand); font-weight: 600; margin-bottom: 16px;
}
[data-theme="dark"] aside.article__related .article__related-label { color: var(--brand-deep); }
aside.article__related .article__related-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}
.article__related-card {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 15px 18px;
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  text-decoration: none;
  transition: border-color .2s, transform .2s, box-shadow .2s;
}
.article__related-card:hover {
  border-color: var(--brand);
  transform: translateX(3px);
  box-shadow: 0 6px 20px rgba(0,0,0,.06);
}
.article__related-card-title {
  font-size: .95rem; font-weight: 600; color: var(--ink); line-height: 1.35;
}
.article__related-card:hover .article__related-card-title { color: var(--brand); }
[data-theme="dark"] .article__related-card:hover .article__related-card-title { color: var(--brand-deep); }
.article__related-card-arrow {
  flex: 0 0 auto; width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--bg); border: 1px solid var(--line-soft); color: var(--brand);
  transition: background .2s, color .2s, transform .2s;
}
.article__related-card:hover .article__related-card-arrow {
  background: var(--brand); color: var(--beige); transform: rotate(-45deg);
}
[data-theme="dark"] .article__related-card:hover .article__related-card-arrow { color: var(--brand-deep); }
.article__related-card-arrow svg { width: 15px; height: 15px; }
@media (min-width: 720px) {
  aside.article__related .article__related-grid { grid-template-columns: 1fr 1fr; }
}

.cite-inline { font-size: .68em; vertical-align: super; color: var(--brand); text-decoration: none; font-weight: 700; margin-left: 1px; }
[data-theme="dark"] .cite-inline { color: var(--brand-deep); }
.cite-inline:hover { text-decoration: underline; }

.pull-quote { font-family: var(--f-heading); font-size: 1.4rem; font-weight: 500; line-height: 1.42; color: var(--ink); border-left: 3px solid var(--brand); padding: 2px 0 2px 24px; margin: 40px 0; font-style: italic; }
.pull-quote cite { display: block; font-family: 'Geist Mono', monospace; font-size: .72rem; font-style: normal; color: var(--muted); margin-top: 12px; letter-spacing: .02em; }

/* ---- Gráfico de linha animado (SVG puro, sem libs) ---- */
.chart-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 26px 26px 18px; margin: 36px 0; }
.chart-card h4 { font-family: 'Geist Mono', monospace; font-size: .74rem; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); margin: 0 0 18px; }
.chart-line { width: 100%; height: auto; display: block; overflow: visible; }
.chart-line__path { fill: none; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1400; stroke-dashoffset: 1400; transition: stroke-dashoffset 1.8s cubic-bezier(.2,.7,.2,1); }
.chart-card.in-view .chart-line__path { stroke-dashoffset: 0; }
.chart-line__area { opacity: 0; transition: opacity 1.1s ease .4s; }
.chart-card.in-view .chart-line__area { opacity: 1; }
.chart-line__dot { fill: var(--brand); stroke: var(--surface); stroke-width: 2; opacity: 0; transition: opacity .3s ease, r .18s ease; cursor: pointer; }
[data-theme="dark"] .chart-line__dot { fill: var(--brand-deep); }
.chart-card.in-view .chart-line__dot { opacity: 1; }
.chart-line__dot:hover { r: 7; }
.chart-line__label { font-family: 'Geist Mono', monospace; font-size: 10.5px; fill: var(--muted); }
.chart-line__val { font-family: 'Geist Mono', monospace; font-size: 11px; fill: var(--ink); font-weight: 600; opacity: 0; transition: opacity .2s ease; }
.chart-line__dot:hover + .chart-line__val, .chart-line__dot:hover ~ .chart-line__val { opacity: 1; }
.chart-legend { display: flex; gap: 22px; margin-top: 10px; flex-wrap: wrap; }
.chart-legend span { font-family: 'Geist Mono', monospace; font-size: .7rem; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.chart-legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }

/* ---- Fluxograma vertical ---- */
.flowchart { display: flex; flex-direction: column; margin: 36px 0; }
.flowchart__step { display: flex; gap: 16px; align-items: flex-start; padding: 18px 20px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); position: relative; transition: border-color .2s, box-shadow .2s, transform .2s; }
.flowchart__step:hover { border-color: var(--brand); box-shadow: var(--shadow-lift); transform: translateX(4px); }
.flowchart__num { flex: none; width: 34px; height: 34px; border-radius: 50%; background: var(--grad-cta); color: var(--beige); display: flex; align-items: center; justify-content: center; font-family: 'Geist Mono', monospace; font-weight: 700; font-size: .85rem; }
[data-theme="dark"] .flowchart__num { color: #11170f; }
.flowchart__body h4 { margin: 2px 0 5px; font-size: 1rem; }
.flowchart__body p { margin: 0; font-size: .89rem; color: var(--ink-2); line-height: 1.55; }
.flowchart__connector { width: 2px; height: 22px; background: var(--line); margin-left: 34px; }
.flowchart__step[data-branch]::before { content: attr(data-branch); position: absolute; top: -10px; left: 20px; background: var(--amber); color: var(--brand-deep); font-family: 'Geist Mono', monospace; font-size: .62rem; padding: 2px 9px; border-radius: var(--r-pill); text-transform: uppercase; letter-spacing: .05em; font-weight: 700; }

/* ---- Mapa mental (grid radial simplificado) ---- */
.mindmap { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px; margin: 36px 0; }
.mindmap__center { grid-column: 1 / -1; text-align: center; padding: 22px; border-radius: var(--r-lg); background: var(--grad-cta); color: var(--beige); font-weight: 700; font-size: 1.05rem; }
[data-theme="dark"] .mindmap__center { color: #11170f; }
.mindmap__node { padding: 16px 18px; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--surface); transition: .2s; }
.mindmap__node:hover { border-color: var(--brand); background: var(--surface-2); transform: translateY(-3px); box-shadow: var(--shadow-soft); }
.mindmap__node h4 { margin: 0 0 6px; font-size: .92rem; color: var(--brand); }
[data-theme="dark"] .mindmap__node h4 { color: var(--brand-deep); }
.mindmap__node p { margin: 0; font-size: .82rem; color: var(--ink-2); line-height: 1.5; }

@media (max-width: 640px) {
  .pull-quote { font-size: 1.18rem; }
  .flowchart__step:hover { transform: none; }
}
