/* ============================================================================
   Zoey — Central de Ajuda (ajuda.html)

   Herda TODOS os tokens e o cabeçalho/rodapé de style.css, que precisa ser
   carregado antes deste arquivo. Aqui vive só o que é próprio de um manual:
   a coluna de navegação lateral, os passos numerados e as figuras.

   O layout é de duas colunas em telas largas e de uma só no celular, com o
   índice virando uma lista dobrável no topo. É deliberado que o menu não seja
   um "hambúrguer" flutuante: quem abre um manual está procurando um assunto,
   e esconder a lista de assuntos atrás de um botão é esconder justamente o
   que a pessoa veio ver.
   ========================================================================== */

/* Texto só para leitor de tela. A tabela de cobrança precisa de <caption>
   para ser navegável sem enxergar, mas o título visível já está no <h3> logo
   acima — mostrar os dois seria repetição na tela. */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ── Estrutura ─────────────────────────────────────────────────────────── */

.help-shell {
  display: grid;
  grid-template-columns: 264px minmax(0, 1fr);
  gap: 56px;
  align-items: start;
  padding-block: 40px 96px;
}

/* ── Navegação lateral ─────────────────────────────────────────────────── */

.help-nav {
  position: sticky;
  /* 72px do cabeçalho fixo + respiro */
  top: 92px;
  max-height: calc(100vh - 116px);
  overflow-y: auto;
  padding-right: 8px;
  /* Faixa de rolagem discreta: a lista é longa e a barra padrão do sistema
     rouba atenção ao lado do conteúdo. */
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
}

.help-nav-title {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 18px;
}

.help-nav ol {
  list-style: none;
  counter-reset: help-step;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.help-nav a {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.35;
  color: var(--ink-soft);
  transition: background 0.15s ease, color 0.15s ease;
}

.help-nav a::before {
  counter-increment: help-step;
  content: counter(help-step, decimal-leading-zero);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-faint);
  flex-shrink: 0;
}

.help-nav a:hover {
  background: var(--panel-soft);
  color: var(--ink);
}

/* `aria-current="true"`, escrito pelo scrollspy do ajuda.js. Casar o estilo
   com o atributo de acessibilidade (em vez de uma classe própria) garante que
   o destaque visual e o anúncio do leitor de tela nunca discordem. */
.help-nav a[aria-current="true"] {
  background: var(--accent-soft);
  color: var(--ink);
  font-weight: 600;
}
.help-nav a[aria-current="true"]::before { color: var(--accent-dark); }

/* Índice dobrável — só aparece no celular (ver responsivo, no fim) */
.help-nav-mobile { display: none; }

/* ── Conteúdo ──────────────────────────────────────────────────────────── */

.help-body { min-width: 0; }

.help-hero {
  padding-block: 48px 8px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 8px;
}
.help-hero h1 { font-size: clamp(30px, 4.4vw, 42px); margin-block: 12px 14px; }
.help-hero p {
  font-size: 16.5px;
  line-height: 1.65;
  color: var(--ink-soft);
  max-width: 62ch;
}
.help-hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
  padding-bottom: 40px;
}

.help-section {
  padding-top: 56px;
  /* Compensa o cabeçalho fixo quando o link do índice pula para cá — sem
     isto o título da seção fica escondido atrás dele. */
  scroll-margin-top: 88px;
}
.help-section + .help-section { border-top: 1px solid var(--line); }

.help-section > h2 {
  font-size: clamp(23px, 2.6vw, 29px);
  margin-bottom: 12px;
}
.help-section-lead {
  font-size: 15.5px;
  line-height: 1.7;
  color: var(--ink-soft);
  max-width: 68ch;
  margin-bottom: 32px;
}

.help-section h3 {
  font-size: 17.5px;
  margin-block: 40px 12px;
}

.help-section p {
  font-size: 15px;
  line-height: 1.75;
  color: var(--ink-soft);
  max-width: 68ch;
  margin-bottom: 14px;
}
.help-section p strong { color: var(--ink); font-weight: 600; }

.help-section a:not(.btn) {
  color: var(--accent-dark);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ── Passos numerados ──────────────────────────────────────────────────── */

.help-steps {
  list-style: none;
  counter-reset: substep;
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-block: 22px 30px;
  max-width: 68ch;
}
.help-steps li {
  position: relative;
  padding-left: 42px;
  font-size: 15px;
  line-height: 1.7;
  color: var(--ink-soft);
}
.help-steps li::before {
  counter-increment: substep;
  content: counter(substep);
  position: absolute;
  left: 0;
  top: -1px;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent);
  color: var(--on-accent);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
}
.help-steps li strong { color: var(--ink); font-weight: 600; }

/* Lista simples, sem numeração — para requisitos e conferências */
.help-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 11px;
  margin-block: 18px 26px;
  max-width: 68ch;
}
.help-list li {
  position: relative;
  padding-left: 22px;
  font-size: 15px;
  line-height: 1.7;
  color: var(--ink-soft);
}
.help-list li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 11px;
  width: 9px;
  height: 2px;
  border-radius: 2px;
  background: var(--accent-dark);
}

/* ── Figuras (os prints) ───────────────────────────────────────────────── */

.help-figure {
  margin-block: 26px 34px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--panel);
  box-shadow: var(--shadow);
}
.help-figure img {
  width: 100%;
  height: auto;
  display: block;
  border-bottom: 1px solid var(--line);
}
.help-figure figcaption {
  padding: 12px 18px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--ink-soft);
  background: var(--panel-soft);
}
.help-figure figcaption strong {
  color: var(--ink);
  font-weight: 600;
}

/* ── Avisos ────────────────────────────────────────────────────────────── */

.help-note {
  display: flex;
  gap: 14px;
  padding: 16px 18px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: var(--panel-soft);
  margin-block: 22px 30px;
  max-width: 68ch;
}
.help-note p { margin: 0; font-size: 14.5px; color: var(--ink-soft); }
.help-note p + p { margin-top: 8px; }
.help-note strong { color: var(--ink); }

.help-note-icon {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  margin-top: 1px;
}

.help-note--info .help-note-icon { background: var(--secondary-soft); color: var(--on-secondary); }
.help-note--tip { border-color: rgba(200, 255, 0, 0.5); background: var(--accent-soft); }
.help-note--tip .help-note-icon { background: var(--accent); color: var(--on-accent); }
.help-note--warn { border-color: rgba(234, 80, 31, 0.28); background: #fdf3ef; }
.help-note--warn .help-note-icon { background: var(--shopee); color: #fff; }

/* ── Tabela de preços ──────────────────────────────────────────────────── */

.help-table-scroll { overflow-x: auto; margin-block: 22px 30px; }
.help-table {
  width: 100%;
  min-width: 460px;
  border-collapse: collapse;
  font-size: 14.5px;
}
.help-table th,
.help-table td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}
.help-table th {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.help-table td { color: var(--ink-soft); }
.help-table td:first-child { color: var(--ink); font-weight: 500; }
.help-table td:last-child { font-family: var(--font-mono); white-space: nowrap; }

/* ── Perguntas (accordion nativo) ──────────────────────────────────────── */

.help-faq { max-width: 68ch; margin-top: 8px; }
.help-faq details {
  border-bottom: 1px solid var(--line);
}
.help-faq summary {
  padding: 16px 30px 16px 0;
  font-size: 15.5px;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  position: relative;
  list-style: none;
}
.help-faq summary::-webkit-details-marker { display: none; }
.help-faq summary::after {
  content: "+";
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-mono);
  font-size: 18px;
  color: var(--ink-faint);
}
.help-faq details[open] summary::after { content: "–"; }
.help-faq details p { padding-bottom: 18px; margin: 0; }
.help-faq details p + p { padding-bottom: 18px; margin-top: -6px; }

/* ── Rodapé da página ──────────────────────────────────────────────────── */

.help-end {
  margin-top: 64px;
  padding: 32px;
  border-radius: var(--radius);
  background: var(--secondary);
  color: var(--on-secondary);
}
.help-end h2 { font-size: 22px; margin-bottom: 10px; color: var(--on-secondary); }
.help-end p { color: var(--on-secondary-soft); max-width: 54ch; margin-bottom: 20px; }
.help-end .btn-primary { margin-right: 10px; }

/* O `.btn-outline` do style.css nasceu para fundo claro: texto em `--ink`
   (quase preto) e borda em `--line` (cinza claro). Sobre o roxo escuro deste
   bloco o texto some — foi o que aconteceu aqui.

   Este é o único bloco escuro da página, então a correção fica escopada a ele
   em vez de virar um modificador no style.css, que é compartilhado com a home
   e a página da Shopee. Se algum dia aparecer outro CTA escuro, aí sim vale
   promover isto a `.btn-outline--on-dark` no arquivo comum. */
.help-end .btn-outline {
  color: var(--on-secondary);
  border-color: rgba(246, 242, 248, 0.32);
}
.help-end .btn-outline:hover {
  color: var(--on-secondary);
  border-color: rgba(246, 242, 248, 0.7);
  background: rgba(246, 242, 248, 0.06);
}

/* ── Responsivo ────────────────────────────────────────────────────────── */

@media (max-width: 960px) {
  .help-shell {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    padding-block: 24px 72px;
  }

  /* No celular a coluna fixa some e o índice vira um bloco dobrável no topo:
     grudado, ele comeria metade da tela de leitura. */
  .help-nav { display: none; }

  .help-nav-mobile {
    display: block;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--panel);
    margin-bottom: 32px;
  }
  .help-nav-mobile > summary {
    padding: 15px 18px;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    list-style: none;
    position: relative;
  }
  .help-nav-mobile > summary::-webkit-details-marker { display: none; }
  .help-nav-mobile > summary::after {
    content: "▾";
    position: absolute;
    right: 18px;
    color: var(--ink-faint);
  }
  .help-nav-mobile[open] > summary::after { content: "▴"; }
  .help-nav-mobile .help-nav {
    display: block;
    position: static;
    max-height: none;
    overflow: visible;
    padding: 0 10px 12px;
  }
  .help-nav-mobile .help-nav-title { display: none; }

  .help-hero { padding-top: 28px; }
  .help-section { padding-top: 44px; }
}

@media (max-width: 640px) {
  .help-steps li { padding-left: 36px; font-size: 14.5px; }
  .help-figure { margin-inline: -4px; }
  .help-end { padding: 24px 20px; }
  .help-end .btn { width: 100%; justify-content: center; margin-inline: 0; }
  .help-end .btn + .btn { margin-top: 10px; }
}
