/* Articles (landing/artigos/): the list page and the article template, on
   top of landing.css. */

.menu a[aria-current="page"] {
  color: var(--mel-forte);
}

/* ---- breadcrumb ---- */

.trilha {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 20px;
  padding: 0;
  list-style: none;
  font-size: 14px;
  color: var(--texto-3);
}

.trilha li + li::before {
  content: "›";
  margin-right: 6px;
}

.trilha a {
  color: var(--texto-2);
  text-decoration: none;
}

.trilha a:hover {
  color: var(--mel-forte);
}

/* ---- list page ---- */

.artigos-topo {
  position: relative;
  padding: 56px 0 24px;
  overflow: hidden;
}

.artigos-topo::before {
  content: "";
  position: absolute;
  inset: -40% -10% auto auto;
  width: 760px;
  height: 760px;
  background: radial-gradient(circle, rgba(229, 168, 46, 0.12), transparent 62%);
  pointer-events: none;
}

.artigos-topo .conteudo {
  position: relative;
}

.artigos-topo .lead {
  max-width: 680px;
  margin-bottom: 0;
}

.artigos-lista {
  padding: 24px 0 96px;
}

.lista-artigos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr));
  gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.cartao-artigo {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--cartao);
  border: 1px solid var(--borda);
  border-radius: var(--raio);
  overflow: hidden;
  color: inherit;
  text-decoration: none;
  transition: border-color 0.15s, transform 0.15s;
}

.cartao-artigo:hover {
  border-color: var(--mel);
  transform: translateY(-2px);
}

.cartao-artigo:focus-visible {
  outline: 2px solid var(--mel-forte);
  outline-offset: 3px;
}

.cartao-artigo img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  object-position: center top;
  border-bottom: 1px solid var(--borda);
}

.cartao-artigo-corpo {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
  padding: 20px 22px 22px;
}

.cartao-artigo h2,
.cartao-artigo h3 {
  font-size: 20px;
  letter-spacing: -0.01em;
  font-weight: 700;
  line-height: 1.25;
  text-wrap: balance;
}

.cartao-artigo p {
  margin: 0;
  color: var(--texto-2);
  font-size: 15px;
}

.cartao-artigo-meta {
  margin-top: auto !important;
  padding-top: 6px;
  color: var(--texto-3) !important;
  font-size: 14px !important;
}

.etiqueta {
  align-self: flex-start;
  padding: 2px 10px;
  border-radius: 999px;
  background: rgba(229, 168, 46, 0.14);
  color: var(--mel-forte);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

/* ---- article ---- */

.artigo-topo {
  padding: 48px 0 8px;
}

.artigo-topo h1 {
  font-size: clamp(32px, 4.6vw, 50px);
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.artigo-topo .lead {
  margin: 18px 0 0;
}

.artigo-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
  color: var(--texto-3);
  font-size: 14px;
}

.artigo-meta a {
  color: var(--texto-2);
}

.artigo-capa {
  margin: 32px 0 0;
}

.artigo-capa img,
.artigo-figura img {
  border-radius: 12px;
  border: 1px solid var(--borda);
}

.artigo-capa figcaption,
.artigo-figura figcaption {
  margin-top: 10px;
  color: var(--texto-3);
  font-size: 14px;
}

.artigo {
  padding: 40px 0 72px;
}

/* table of contents */
.sumario {
  margin: 0 0 40px;
  padding: 20px 24px;
  background: var(--cartao);
  border: 1px solid var(--borda);
  border-radius: var(--raio);
}

.sumario h2 {
  margin: 0 0 10px;
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--texto-3);
}

.sumario ol {
  margin: 0;
  padding-left: 22px;
  columns: 2 280px;
  column-gap: 32px;
}

.sumario li {
  break-inside: avoid;
  padding: 3px 0;
  color: var(--texto-3);
}

.sumario a {
  color: var(--texto-2);
  text-decoration: none;
}

.sumario a:hover {
  color: var(--mel-forte);
}

/* body text */
.artigo-corpo h2 {
  font-size: clamp(26px, 3vw, 32px);
  margin: 56px 0 16px;
  text-wrap: balance;
}

.artigo-corpo h3 {
  font-size: 20px;
  margin: 32px 0 10px;
}

.artigo-corpo p,
.artigo-corpo li {
  color: var(--texto-2);
  line-height: 1.75;
}

.artigo-corpo > p:first-child {
  margin-top: 0;
}

.artigo-corpo strong {
  color: var(--texto);
}

.artigo-corpo ul,
.artigo-corpo ol {
  padding-left: 22px;
}

.artigo-corpo li + li {
  margin-top: 8px;
}

.artigo-figura {
  margin: 32px 0;
}

/* the dashboard cards (landing.css) keep their own spacing inside the text */
.artigo-corpo .painel-kpis {
  padding-left: 0;
}

.artigo-corpo .painel-kpis li {
  line-height: normal;
}

.artigo-corpo .painel-kpis li + li {
  margin-top: 0;
}

/* a table that may be wider than the phone scrolls by itself */
.tabela {
  margin: 24px 0;
  overflow-x: auto;
  border: 1px solid var(--borda);
  border-radius: var(--raio);
}

.tabela table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  font-size: 15px;
}

.tabela th,
.tabela td {
  padding: 12px 16px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--borda);
}

.tabela th {
  background: var(--cartao);
  color: var(--texto);
  font-weight: 700;
}

.tabela td {
  color: var(--texto-2);
}

.tabela tr:last-child td {
  border-bottom: 0;
}

/* a short note set off from the text */
.nota {
  margin: 28px 0;
  padding: 18px 22px;
  border-radius: var(--raio);
  background: rgba(59, 130, 246, 0.08);
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.nota p {
  margin: 0;
  color: var(--texto);
}

/* call to action in the middle of the text */
.chamada-meio {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px 24px;
  margin: 40px 0;
  padding: 22px 24px;
  border-radius: var(--raio);
  border: 1px solid rgba(229, 168, 46, 0.45);
  background: linear-gradient(180deg, rgba(229, 168, 46, 0.08), transparent 70%), var(--cartao);
}

.chamada-meio p {
  flex: 1 1 320px;
  min-width: 0;
  margin: 0;
  color: var(--texto);
  line-height: 1.5;
}

.chamada-meio p span {
  display: block;
  margin-top: 4px;
  color: var(--texto-2);
  font-size: 15px;
}

.chamada-meio .botao {
  flex-shrink: 0;
}

/* related articles */
.relacionados {
  padding: 72px 0;
}

.relacionados h2 {
  margin-bottom: 24px;
}

@media (max-width: 620px) {
  .artigos-topo,
  .artigo-topo {
    padding-top: 32px;
  }

  .artigo {
    padding: 28px 0 56px;
  }

  .sumario {
    padding: 18px 16px;
  }

  .chamada-meio {
    padding: 18px 16px;
  }

  .chamada-meio .botao {
    width: 100%;
    white-space: normal;
    text-align: center;
  }
}

/* "Em resumo": the article's answer in a few lines, right below the title
   (what search engines and AI assistants quote first) */
.resumo {
  margin: 28px 0 0;
  padding: 20px 24px;
  border-radius: var(--raio);
  background: var(--cartao);
  border: 1px solid var(--borda);
  border-left: 3px solid var(--mel);
}

.resumo h2 {
  margin: 0 0 8px;
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--mel-forte);
}

.resumo ul {
  margin: 0;
  padding-left: 20px;
}

.resumo li {
  color: var(--texto-2);
  line-height: 1.65;
}

.resumo li + li {
  margin-top: 6px;
}

.resumo strong {
  color: var(--texto);
}

/* author box at the end of an article */
.autor {
  display: flex;
  gap: 22px;
  align-items: flex-start;
  margin: 56px 0 0;
  padding: 26px 28px;
  border-radius: var(--raio);
  background: var(--cartao);
  border: 1px solid var(--borda);
}

.autor-foto {
  flex-shrink: 0;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 3px solid var(--mel);
  object-fit: cover;
  background: var(--fundo-2);
}

.autor-texto {
  min-width: 0;
}

.artigo-corpo .autor p {
  margin: 0;
}

.autor-rotulo {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--texto-3) !important;
}

.artigo-corpo .autor-nome {
  margin: 4px 0 0;
  font-size: 22px;
  letter-spacing: -0.01em;
}

.autor-cargo {
  margin-top: 6px !important;
  font-size: 15px;
  font-weight: 700;
  color: var(--mel) !important;
}

.autor-bio {
  margin-top: 12px !important;
  font-size: 16px;
  line-height: 1.7 !important;
}

.artigo-corpo .autor-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

.artigo-corpo .autor-links li {
  margin: 0;
}

.autor-links a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--mel);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
}

.autor-links a:hover {
  color: var(--mel-forte);
}

@media (max-width: 620px) {
  .autor {
    flex-direction: column;
    padding: 20px 18px;
  }
}

/* share buttons (end of the article) */
.compartilhar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 48px 0 0;
  color: var(--texto-3);
  font-size: 15px;
}

.compartilhar span {
  margin-right: 4px;
}

.compartilhar a {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid var(--borda);
  color: var(--texto-2);
  transition: color 0.15s, border-color 0.15s;
}

.compartilhar a:hover {
  color: var(--mel-forte);
  border-color: var(--mel);
}

.compartilhar a:focus-visible,
.toc-lateral a:focus-visible {
  outline: 2px solid var(--mel-forte);
  outline-offset: 2px;
}

.compartilhar + .autor {
  margin-top: 24px;
}

/* side table of contents: only where there is room beside the text; it
   follows the scroll and artigos.js highlights the section being read */
.toc-lateral {
  display: none;
}

@media (min-width: 1200px) {
  .artigo-topo .conteudo,
  .artigo .conteudo {
    max-width: 1132px;
  }

  .artigo-topo .conteudo > * {
    max-width: 772px;
  }

  .artigo-grade {
    display: grid;
    grid-template-columns: minmax(0, 772px) 240px;
    gap: 72px;
  }

  .artigo-principal {
    min-width: 0;
  }

  .toc-lateral {
    display: block;
    position: sticky;
    top: 96px;
    align-self: start;
    max-height: calc(100vh - 120px);
    overflow: auto;
    padding-left: 18px;
    border-left: 1px solid var(--borda);
    transition: opacity 0.25s, visibility 0.25s;
  }

  /* hidden while the inline table of contents is on screen (artigos.js);
     the column keeps its room, so nothing moves */
  .toc-lateral.toc-oculto {
    opacity: 0;
    visibility: hidden;
  }

  .toc-titulo {
    margin: 0 0 12px;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--texto-3);
  }

  .toc-lateral ul {
    margin: 0;
    padding: 0;
    list-style: none;
  }

  .toc-lateral li + li {
    margin-top: 10px;
  }

  .toc-lateral a {
    display: block;
    color: var(--texto-3);
    font-size: 14px;
    line-height: 1.45;
    text-decoration: none;
    transition: color 0.15s;
  }

  .toc-lateral a:hover,
  .toc-lateral a.ativo {
    color: var(--mel-forte);
  }

  .toc-lateral a.ativo {
    font-weight: 600;
  }
}

/* numbered sources at the end of an article; in-text links jump here */
.artigo-corpo .fontes li {
  font-size: 15px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.fontes li:target {
  color: var(--texto);
}

/* ---- light theme (articles only) ----
   The page follows the reader's device (prefers-color-scheme) unless they
   picked a theme with the sun/moon button (localStorage "colmeia:tema").
   A tiny inline script in <head> sets html[data-tema] before the first paint.
   Header and footer keep the dark brand colors in both themes. */

:root {
  color-scheme: dark;
}

:root[data-tema="claro"] {
  color-scheme: light;
  --fundo: #fbf8f2;
  --fundo-2: #f3eee4;
  --cartao: #f4eee3;
  --borda: #e3d9c6;
  --texto: #1b2230;
  --texto-2: #3b4555;
  --texto-3: #687182;
  --mel: #a86a10;
  --mel-forte: #8a5507;
}

:root[data-tema="claro"] .topo,
:root[data-tema="claro"] .rodape {
  --fundo: #0b1422;
  --fundo-2: #111d2f;
  --cartao: #142339;
  --borda: #213450;
  --texto: #e6e9ee;
  --texto-2: #a3aebd;
  --texto-3: #7a8799;
  --mel: #e5a82e;
  --mel-forte: #f2bb45;
}

:root[data-tema="claro"] .rodape {
  background: var(--fundo);
}

/* the dark header would look grey if the light page showed through it */
:root[data-tema="claro"] .topo {
  background: rgba(11, 20, 34, 0.97);
}

/* the yellow buttons keep the brand honey on the light page too */
:root[data-tema="claro"] .botao-principal {
  background: #e5a82e;
  box-shadow: 0 6px 20px rgba(168, 106, 16, 0.22);
}

:root[data-tema="claro"] .botao-principal:hover {
  background: #f2bb45;
}

/* the summary box gets a light honey tint, so it reads as the highlight */
:root[data-tema="claro"] .resumo {
  background: #fbf0d9;
  border-color: #efdcb4;
  border-left-color: var(--mel);
}

:root[data-tema="claro"] code {
  background: rgba(27, 34, 48, 0.06);
}

:root[data-tema="claro"] .artigo-capa img,
:root[data-tema="claro"] .artigo-figura img,
:root[data-tema="claro"] .painel-numeros {
  box-shadow: 0 12px 32px rgba(27, 34, 48, 0.14);
}

:root[data-tema="claro"] .cartao-artigo {
  background: #fffdf8;
  box-shadow: 0 2px 10px rgba(27, 34, 48, 0.05);
}

/* sun/moon button in the header */
.tema-botao {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 10px;
  border: 1px solid var(--borda);
  background: transparent;
  color: var(--texto-2);
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}

.tema-botao:hover {
  color: var(--mel-forte);
  border-color: var(--mel);
}

.tema-botao:focus-visible {
  outline: 2px solid var(--mel-forte);
  outline-offset: 2px;
}

/* the dark page shows the sun (go light), the light page the moon */
.tema-botao .icone-lua,
:root[data-tema="claro"] .tema-botao .icone-sol {
  display: none;
}

:root[data-tema="claro"] .tema-botao .icone-lua {
  display: block;
}

.topo-linha .tema-botao + .botao-topo {
  margin-left: -12px;
}

@media (max-width: 980px) {
  .topo-linha .tema-botao {
    margin-left: auto;
  }

  .topo-linha .tema-botao + .botao-topo {
    margin-left: -12px;
  }
}

/* code in articles: always dark (reads well in both themes), scrolls
   sideways on phones instead of widening the page */
.artigo-corpo pre {
  margin: 20px 0 24px;
  padding: 16px 18px;
  overflow-x: auto;
  border-radius: 12px;
  border: 1px solid #213450;
  background: #0a111d;
  color: #dbe2ec;
  font-size: 14px;
  line-height: 1.6;
  tab-size: 4;
}

.artigo-corpo pre code {
  padding: 0;
  background: none;
  font-size: inherit;
  color: inherit;
}

.artigo-corpo li pre {
  margin: 12px 0;
}

/* code colors (artigos.js) and the copy button */
.codigo {
  position: relative;
  margin: 20px 0 24px;
}

.codigo pre {
  margin: 0;
  padding-top: 40px;
}

li .codigo {
  margin: 12px 0;
}

.codigo-copiar {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 4px 12px;
  border-radius: 8px;
  border: 1px solid #2c4364;
  background: #142339;
  color: #c3ccd8;
  font: 600 13px system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}

.codigo-copiar:hover {
  color: #f2bb45;
  border-color: #e5a82e;
}

.codigo-copiar:focus-visible {
  outline: 2px solid #f2bb45;
  outline-offset: 2px;
}

.tk-reservada { color: #f2bb45; font-weight: 600; }
.tk-texto { color: #9fd67a; }
.tk-comentario { color: #7a8aa0; font-style: italic; }
.tk-numero { color: #ff9e64; }
.tk-constante { color: #c39bff; }
.tk-embutida { color: #7dcfff; }
.tk-chamada { color: #7dcfff; }
.tk-definicao { color: #6fd3c4; font-weight: 600; }
.tk-decorador { color: #e0af68; }
.tk-comando { color: #f2bb45; font-weight: 600; }
.tk-opcao { color: #c39bff; }
