/*
 * Layout of the docs. Colors, fonts and radii come only from CSS variables of the central theme
 * (same names as Vurto Swap), with tema-local.css as the fallback. No literal color here.
 */
* { box-sizing: border-box; }
html { background: var(--bg); color: var(--text); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-interface);
  font-size: 16px;
  line-height: 1.65;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.25; color: var(--text); letter-spacing: -0.01em; }
h1 { font-size: 2rem; margin: 0 0 0.5rem; }
h2 { font-size: 1.35rem; margin: 2.4rem 0 0.8rem; padding-top: 0.4rem; }
h3 { font-size: 1.08rem; margin: 1.8rem 0 0.6rem; }
p, ul, ol { margin: 0 0 1rem; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--accent-soft); }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.88em; background: var(--surface-soft); border: 1px solid var(--line); border-radius: 6px; padding: 0.08em 0.36em; overflow-wrap: anywhere; }
pre { background: var(--field-bg); border: 1px solid var(--line); border-radius: var(--fx-raio); padding: 14px 16px; overflow-x: auto; margin: 0 0 1.2rem; }
pre code { background: none; border: 0; padding: 0; font-size: 0.85rem; overflow-wrap: normal; }
strong { color: var(--text); }
hr { border: 0; border-top: 1px solid var(--line); margin: 2rem 0; }
:focus-visible { outline: 2px solid var(--accent-soft); outline-offset: 3px; }

.pular { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--accent); color: var(--accent-on); padding: 8px 14px; border-radius: var(--fx-raio); }
.pular:focus { left: 16px; }

/* Header */
.topo {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 12px;
  min-height: 60px; padding: 8px 16px;
  background: var(--bg-raised);
  border-bottom: 1px solid var(--line);
}
.marca { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-family: var(--font-head); font-weight: 700; font-size: 1.05rem; }
.marca img { border-radius: 8px; }
.topo-acoes { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.botao-idioma, .botao-tema, .botao-menu {
  min-height: 38px; padding: 0 12px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--line-strong); border-radius: var(--fx-raio);
  background: var(--surface-card); color: var(--text-soft);
  font: inherit; font-size: 0.9rem; font-weight: 600; text-decoration: none; cursor: pointer;
}
.botao-idioma:hover, .botao-tema:hover, .botao-menu:hover { color: var(--text); background: var(--surface-hover); }
.botao-tema { width: 38px; padding: 0; }
.icone-tema { width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; background: linear-gradient(90deg, currentColor 50%, transparent 50%); }
.botao-menu { display: none; }

/* Body: sidebar and content */
.corpo { display: grid; grid-template-columns: 270px minmax(0, 1fr); max-width: 1180px; margin: 0 auto; }
.menu-lateral {
  position: sticky; top: 60px; align-self: start;
  max-height: calc(100vh - 60px); overflow-y: auto;
  padding: 24px 16px 40px;
  border-right: 1px solid var(--line);
}
.menu-grupo { margin-bottom: 18px; }
.menu-titulo { margin: 0 0 6px; padding: 0 10px; font-family: var(--font-head); font-size: 0.78rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.menu-lateral ul { list-style: none; margin: 0; padding: 0; }
.menu-lateral a { display: block; padding: 6px 10px; border-radius: var(--fx-raio); color: var(--text-soft); text-decoration: none; font-size: 0.94rem; }
.menu-lateral a:hover { background: var(--surface-hover); color: var(--text); }
.menu-lateral a[aria-current="page"] { background: var(--accent-glow); color: var(--text); font-weight: 600; box-shadow: inset 3px 0 0 var(--accent); }

.conteudo { padding: 36px 40px 64px; min-width: 0; outline: none; }
.conteudo article { max-width: 760px; }
.conteudo .lead { font-size: 1.1rem; color: var(--text-soft); }

/* Tables */
.tabela { width: 100%; overflow-x: auto; margin: 0 0 1.4rem; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface-card); }
table { width: 100%; border-collapse: collapse; font-size: 0.93rem; }
caption { caption-side: top; text-align: left; padding: 12px 14px 4px; color: var(--muted); font-size: 0.86rem; }
th, td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-family: var(--font-head); font-weight: 600; color: var(--text); background: var(--surface-soft); white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }
td { color: var(--text-soft); }

/* Numbered steps */
ol.passos { list-style: none; counter-reset: passo; padding: 0; margin: 0 0 1.4rem; }
ol.passos > li { counter-increment: passo; position: relative; padding: 2px 0 14px 46px; }
ol.passos > li::before {
  content: counter(passo);
  position: absolute; left: 0; top: 0;
  width: 30px; height: 30px; display: grid; place-items: center;
  border-radius: 50%; background: var(--accent); color: var(--accent-on);
  font-family: var(--font-head); font-weight: 700; font-size: 0.9rem;
}
ol.passos > li > strong:first-child { display: block; }

/* Callouts */
.nota, .aviso, .cartao {
  border: 1px solid var(--line); border-radius: var(--radius-md);
  padding: 14px 16px; margin: 0 0 1.4rem; background: var(--surface-card);
}
.nota { box-shadow: inset 4px 0 0 var(--blue); }
.aviso { box-shadow: inset 4px 0 0 var(--red); background: var(--red-wash); }
.nota > :last-child, .aviso > :last-child, .cartao > :last-child { margin-bottom: 0; }
.nota-titulo { display: block; font-family: var(--font-head); font-weight: 600; margin-bottom: 4px; color: var(--text); }

.cartoes { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin: 0 0 1.4rem; }
.cartao h3 { margin-top: 0; }
.cartao p { color: var(--text-soft); font-size: 0.94rem; }

.selo {
  display: inline-block; vertical-align: middle;
  padding: 1px 9px; margin-left: 6px;
  border: 1px solid var(--accent-edge); border-radius: 999px;
  background: var(--accent-glow); color: var(--text);
  font-family: var(--font-head); font-size: 0.74rem; font-weight: 600; letter-spacing: 0.02em; line-height: 1.6;
}

.botao {
  display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px;
  border-radius: var(--fx-raio); background: var(--accent); color: var(--accent-on);
  font-weight: 600; text-decoration: none;
}
.botao:hover { color: var(--accent-on); background: var(--accent-soft); }

/* FAQ */
details { border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface-card); margin: 0 0 10px; }
summary { cursor: pointer; padding: 12px 16px; font-family: var(--font-head); font-weight: 600; color: var(--text); }
details > div { padding: 0 16px 6px; color: var(--text-soft); }

/* Coming Soon band, for a whole page */
.faixa-em-breve {
  position: sticky; top: 0; z-index: 40;
  display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; justify-content: center;
  padding: 10px 16px; text-align: center;
  background: var(--accent); color: var(--accent-on);
  font-size: 0.92rem;
}
.faixa-em-breve strong { color: var(--accent-on); font-family: var(--font-head); text-transform: uppercase; letter-spacing: 0.08em; }
.pagina-em-breve .topo { top: 44px; }
.pagina-em-breve .conteudo article { border-top: 6px solid var(--accent); padding-top: 18px; }

/* Previous / next */
.paginacao { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; max-width: 760px; margin-top: 48px; }
.passo-nav { display: block; padding: 12px 16px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface-card); color: var(--text); text-decoration: none; font-weight: 600; }
.passo-nav small { display: block; color: var(--muted); font-weight: 500; font-size: 0.8rem; }
.passo-nav:hover { border-color: var(--accent); color: var(--text); }
.passo-nav.proxima { text-align: right; }

/* Footer */
.rodape { border-top: 1px solid var(--line); padding: 24px 16px 40px; text-align: center; color: var(--muted); font-size: 0.88rem; }
.rodape p { margin: 0 0 6px; }
.rodape-links { display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; }

/* Phone and tablet */
@media (max-width: 900px) {
  .botao-menu { display: inline-flex; }
  .corpo { display: block; }
  .menu-lateral {
    display: none; position: static; max-height: none;
    border-right: 0; border-bottom: 1px solid var(--line); background: var(--bg-raised);
  }
  body.menu-aberto .menu-lateral { display: block; }
  .conteudo { padding: 24px 16px 48px; }
  h1 { font-size: 1.6rem; }
  .paginacao { grid-template-columns: 1fr; }
  .passo-nav.proxima { text-align: left; }
  .pagina-em-breve .topo { top: 0; position: relative; }
}
@media (max-width: 420px) {
  .marca span { display: none; }
}
