/* ═══════════════════════════════════════════════════════════════
   artigo-formatos.css — estilos dos novos blocos editoriais
   Casos Ufológicos · v1.0
   Todas as classes começam com .ac- e são geradas apenas pelo
   parser (inc/formatos.php). Não interfere em nada já existente.
   ═══════════════════════════════════════════════════════════════ */

:root {
  --ac-neon: var(--neon, #00f3ff);
  --ac-bg2: var(--bg-2, #0a1020);
  --ac-dim: var(--txt-dim, #7d93b4);
  --ac-line: var(--line, rgba(0, 243, 255, .22));
  --ac-amb: #ffb020;
  --ac-mag: #ff4fd8;
}

/* ─── ênfases inline ─────────────────────────────────────────── */

.ac-mark {
  background: linear-gradient(180deg, transparent 55%, rgba(0, 243, 255, .28) 55%);
  color: inherit;
  padding: 0 .12em;
  border-radius: 2px;
}

.ac-cod {
  font-family: "Share Tech Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .92em;
  color: var(--ac-neon);
  background: rgba(0, 243, 255, .07);
  border: 1px solid var(--ac-line);
  border-radius: 3px;
  padding: .06em .38em;
  word-break: break-word;
}

.ac-link-int {
  color: var(--ac-neon);
  text-decoration: none;
  border-bottom: 1px dashed rgba(0, 243, 255, .5);
  transition: border-color .18s ease, color .18s ease;
}
.ac-link-int:hover,
.ac-link-int:focus-visible { border-bottom-style: solid; }

/* ─── sumário ────────────────────────────────────────────────── */

.ac-toc {
  margin: 2rem 0;
  padding: 1.1rem 1.25rem 1.25rem;
  background: var(--ac-bg2);
  border: 1px solid var(--ac-line);
  border-left: 3px solid var(--ac-neon);
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 0 100%);
}
.ac-toc__t {
  margin: 0 0 .7rem;
  font-family: Orbitron, "Rajdhani", sans-serif;
  font-size: .78rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--ac-neon);
}
.ac-toc__l { margin: 0; padding: 0; list-style: none; counter-reset: ac-toc; }
.ac-toc__l li { counter-increment: ac-toc; margin: .3rem 0; line-height: 1.4; }
.ac-toc__l li::before {
  content: counter(ac-toc, decimal-leading-zero);
  font-family: "Share Tech Mono", monospace;
  font-size: .8em;
  color: var(--ac-dim);
  margin-right: .6rem;
}
.ac-toc__l .ac-toc__sub { padding-left: 1.5rem; }
.ac-toc__l a { color: inherit; text-decoration: none; border-bottom: 1px solid transparent; }
.ac-toc__l a:hover,
.ac-toc__l a:focus-visible { color: var(--ac-neon); border-bottom-color: var(--ac-line); }

/* ─── citação em destaque ────────────────────────────────────── */

.ac-cit {
  position: relative;
  margin: 2rem 0;
  padding: 1.1rem 1.4rem 1.1rem 3.2rem;
  background: linear-gradient(90deg, rgba(0, 243, 255, .07), transparent 65%);
  border-left: 3px solid var(--ac-neon);
  font-size: 1.08em;
  line-height: 1.6;
}
.ac-cit::before {
  content: "\201C";
  position: absolute;
  left: .75rem;
  top: .1rem;
  font-family: Orbitron, Georgia, serif;
  font-size: 3rem;
  line-height: 1;
  color: var(--ac-neon);
  opacity: .45;
}
.ac-cit p { margin: 0 0 .6rem; }
.ac-cit p:last-of-type { margin-bottom: 0; }
.ac-cit__f {
  display: block;
  margin-top: .85rem;
  font-family: "Share Tech Mono", monospace;
  font-style: normal;
  font-size: .82em;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--ac-dim);
}
.ac-cit__f::before { content: "— "; color: var(--ac-neon); }

/* ─── caixas de nota / alerta / destaque ─────────────────────── */

.ac-box {
  display: block;
  margin: 2rem 0;
  padding: 1.05rem 1.25rem;
  background: var(--ac-bg2);
  border: 1px solid var(--ac-line);
  border-left: 3px solid var(--ac-neon);
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 0 100%);
}
.ac-box p { margin: 0 0 .6rem; }
.ac-box p:last-child { margin-bottom: 0; }
.ac-box__t {
  font-family: Orbitron, "Rajdhani", sans-serif;
  font-size: .78rem !important;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ac-neon);
  margin-bottom: .55rem !important;
}
.ac-box__t::before {
  content: "▸ ";
  opacity: .8;
}

.ac-box--alerta { border-left-color: var(--ac-amb); background: rgba(255, 176, 32, .06); }
.ac-box--alerta .ac-box__t { color: var(--ac-amb); }

.ac-box--destaque {
  border-left-color: var(--ac-mag);
  background: linear-gradient(135deg, rgba(255, 79, 216, .09), rgba(0, 243, 255, .05));
}
.ac-box--destaque .ac-box__t { color: var(--ac-mag); }

/* ─── listas ─────────────────────────────────────────────────── */

.ac-lista { margin: 1.1rem 0 1.1rem 0; padding-left: 1.35rem; }
.ac-lista li { margin: .38rem 0; line-height: 1.6; }
ul.ac-lista { list-style: none; padding-left: 1.1rem; }
ul.ac-lista li { position: relative; padding-left: 1.05rem; }
ul.ac-lista li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .62em;
  width: 7px;
  height: 7px;
  background: var(--ac-neon);
  transform: rotate(45deg);
  box-shadow: 0 0 6px rgba(0, 243, 255, .7);
}
ol.ac-lista--num { list-style: none; counter-reset: ac-n; padding-left: 1.1rem; }
ol.ac-lista--num li { counter-increment: ac-n; position: relative; padding-left: 2.1rem; }
ol.ac-lista--num li::before {
  content: counter(ac-n, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 0;
  font-family: "Share Tech Mono", monospace;
  font-size: .85em;
  color: var(--ac-neon);
}

/* ─── divisor ────────────────────────────────────────────────── */

.ac-hr {
  clear: both;
  border: 0;
  height: 1px;
  margin: 2.4rem 0;
  background: linear-gradient(90deg, transparent, var(--ac-neon), transparent);
  opacity: .55;
}

/* ─── tabela ─────────────────────────────────────────────────── */

.ac-tab-wrap { clear: both; margin: 1.8rem 0; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.ac-tab {
  width: 100%;
  min-width: 480px;
  border-collapse: collapse;
  font-size: .95em;
  background: var(--ac-bg2);
  border: 1px solid var(--ac-line);
}
.ac-tab th {
  text-align: left;
  padding: .65rem .8rem;
  font-family: "Share Tech Mono", monospace;
  font-size: .8rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ac-neon);
  background: rgba(0, 243, 255, .07);
  border-bottom: 1px solid var(--ac-line);
  white-space: nowrap;
}
.ac-tab td { padding: .6rem .8rem; border-bottom: 1px solid rgba(125, 147, 180, .18); }
.ac-tab tbody tr:last-child td { border-bottom: 0; }
.ac-tab tbody tr:hover { background: rgba(0, 243, 255, .045); }

/* ─── figuras ────────────────────────────────────────────────── */

.ac-fig { margin: 1.8rem 0; }
.ac-fig img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--ac-line);
  background: var(--ac-bg2);
}
.ac-fig figcaption {
  margin-top: .5rem;
  font-size: .84rem;
  line-height: 1.45;
  color: var(--ac-dim);
  border-left: 2px solid var(--ac-line);
  padding-left: .6rem;
}
.ac-fig__leg { display: block; }
.ac-fig__cred {
  display: block;
  margin-top: .15rem;
  font-family: "Share Tech Mono", monospace;
  font-size: .74rem;
  letter-spacing: .05em;
  text-transform: uppercase;
  opacity: .75;
}

.ac-fig--centro { margin-left: auto; margin-right: auto; max-width: 82%; }

.ac-fig--esq,
.ac-fig--dir { max-width: 42%; margin-top: .35rem; }
.ac-fig--esq { float: left;  margin-right: 1.6rem; margin-bottom: 1rem; }
.ac-fig--dir { float: right; margin-left: 1.6rem;  margin-bottom: 1rem; }

/* impede que o texto seguinte, títulos e anúncios subam ao lado da imagem */
.ac-hr,
.ac-tab-wrap,
.ac-lado,
.ac-box,
.ac-toc { clear: both; }

/* ─── bloco 50/50 (imagem ao lado do texto) ──────────────────── */

.ac-lado {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.6rem;
  align-items: start;
  margin: 2rem 0;
}
.ac-lado__img .ac-fig { margin: 0; }
.ac-lado__txt > :first-child { margin-top: 0; }
.ac-lado__txt > :last-child  { margin-bottom: 0; }
.ac-lado--dir .ac-lado__img { order: 2; }
.ac-lado--dir .ac-lado__txt { order: 1; }

/* ─── responsivo ─────────────────────────────────────────────── */

@media (max-width: 720px) {
  .ac-fig--esq,
  .ac-fig--dir,
  .ac-fig--centro {
    float: none;
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
    margin-bottom: 1.4rem;
  }
  .ac-lado { grid-template-columns: 1fr; gap: 1rem; }
  .ac-lado--dir .ac-lado__img,
  .ac-lado--dir .ac-lado__txt { order: initial; }
  .ac-cit { padding: 1rem 1rem 1rem 2.6rem; }
  .ac-cit::before { font-size: 2.4rem; left: .5rem; }
  .ac-toc, .ac-box { clip-path: none; }
}

/* ─── acessibilidade ─────────────────────────────────────────── */

.ac-toc a:focus-visible,
.ac-link-int:focus-visible {
  outline: 2px solid var(--ac-neon);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .ac-link-int, .ac-toc__l a { transition: none; }
}

@media print {
  .ac-toc { display: none; }
  .ac-box, .ac-cit, .ac-tab { background: none; }
}