/* ==========================================================================
   docs.css — design system da documentação. Layout, tipografia e componentes
   vêm da análise das telas da Claude Platform Docs (2026-10-14); a PALETA é
   a da casa: "Deep Teal + Amber — Enterprise-clean — Notion meets Stripe".

   Fonte da verdade da paleta:
     conta-central/frontend/src/styles/palettes.css
     bloco html[data-palette="deep-teal-amber"] (claro e escuro)

   Os tokens mantêm os nomes da doc (--coral, --sage, --blue...) e não os da
   casa (--color-amber, --color-accent...) porque o resto do arquivo os usa
   em ~250 var(--...): muda o VALOR, nenhuma regra muda. O comentário ao
   lado de cada token diz de que token da casa ele veio.

   Quem decide o tema (claro é o padrão, como na casa):
     1. <html data-theme="light|dark">  escolha do botão do topbar (docs.js);
                                        vale mais que o sistema;
     2. sem atributo                    o prefers-color-scheme decide — é a
                                        primeira pintura de quem segue o
                                        sistema, e a página sem JS.
   Por isso TODA diferença entre os temas mora nos tokens destes blocos: uma
   regra de componente com a cor de um tema só vazaria para o outro.

   Os dois blocos escuros são iguais de propósito: CSS não deixa um seletor
   de atributo e uma media query dividirem a mesma regra. Mudou um, mude o
   outro. Eles ficam em @media screen para a impressão sair sempre com a
   paleta clara (texto escuro no papel), mesmo com a tela no escuro.
   ========================================================================== */

:root {
  /* medidas e fontes — iguais nos dois temas */
  --sidebar-w: 268px;
  --toc-w: 220px;
  --content-max: 760px;
  --radius: 10px;
  --radius-sm: 6px;

  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", "Fira Code", Menlo,
    Consolas, monospace;
}

/* ── paleta: modo claro (padrão) ─────────────────────────────────────────
   Dois desvios da casa, os dois por contraste de TEXTO (WCAG AA, 4.5:1):

   --coral  A doc usa --coral como texto (link, aba e nav ativas, eyebrow,
            número). O --color-amber da casa (#c66323) dá 3.63:1 sobre o
            --bg: na casa ele é preenchimento, não texto. #a33d0c é o mesmo
            âmbar escurecido em OKLCH até passar em todo fundo onde ele é
            texto (o pior, o .fnum dentro de um .fnode tingido: 4.53:1; no
            --bg, 5.86:1) e puxado de 49° para 41° de matiz, para o lado
            ferrugem. Na matiz original ele ficaria a ΔE00 5.3 do --amber
            (#965000), confundível; em 41° fica a 9.8 do aviso e a 10.5 do
            --red, e acento, aviso e erro continuam três cores diferentes.

   --blue   O --color-accent da casa (#0f766e) dá 4.32:1 no título do
            callout note sobre o próprio tint. A casa usa #006d65
            (--color-text-accent) para accent como texto: 4.91:1. No claro,
            --blue, --sage e --green ficam a mesma cor: não os use como
            séries distintas de um gráfico. */
:root {
  color-scheme: light;

  /* superfícies */
  --bg: #f5f3ee;                              /* --surface-body */
  --surface: #ffffff;                         /* --surface-raised */
  --surface-2: #efede6;                       /* --surface-overlay */
  --surface-hover: rgba(12, 20, 20, 0.05);    /* --surface-hover */
  --topbar-bg: rgba(245, 243, 238, 0.85);     /* --surface-body com alfa: vidro sob o blur */
  --scrim: rgba(12, 20, 20, 0.4);             /* tinta da casa: véu atrás da sidebar no mobile */
  --border: rgba(0, 0, 0, 0.115);             /* --color-border-strong */
  --border-soft: rgba(0, 0, 0, 0.08);         /* --color-border */
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.06), 0 8px 24px rgba(0, 0, 0, 0.08); /* --shadow-sm + --shadow-md */

  /* texto */
  --text: #0c1414;                            /* --color-text-primary */
  --text-dim: #3d4847;                        /* --color-text-secondary */
  --text-muted: #636c6b;                      /* --color-text-tertiary */

  /* âmbar: acento da doc (--coral) e aviso (--amber) */
  --coral: #a33d0c;                           /* --color-amber escurecido (ver acima) */
  --coral-dim: rgba(180, 83, 9, 0.10);        /* --color-amber-muted */
  --coral-dim-strong: rgba(180, 83, 9, 0.15); /* --color-amber-muted x1.5: hover */
  --coral-faint: rgba(180, 83, 9, 0.05);      /* --color-amber-muted /2 */
  --amber: #965000;                           /* --color-warning */
  --amber-dim: rgba(150, 80, 0, 0.12);        /* --color-warning-muted */

  /* teal: acentos frios */
  --sage: #006d65;                            /* --color-text-accent */
  --sage-dim: rgba(15, 118, 110, 0.10);       /* --color-accent-muted */
  --blue: #006d65;                            /* --color-text-accent (ver acima) */
  --blue-dim: rgba(15, 118, 110, 0.10);       /* --color-accent-muted */
  --green: #006d65;                           /* --color-success */
  --green-dim: rgba(0, 109, 101, 0.12);       /* --color-success-muted */
  --green-faint: rgba(0, 109, 101, 0.06);     /* --color-success-muted /2 */
  --green-border: rgba(0, 109, 101, 0.18);    /* --color-success a 18% */

  /* erro */
  --red: #c40012;                             /* --color-error */
  --red-dim: rgba(196, 0, 18, 0.1);           /* --color-error-muted */
}

/* ── paleta: modo escuro, escolhido no botão ──────────────────────────────
   Valores da casa sem desvio: no fundo #0c1414 todo par de texto passa de
   4.5:1 (o menor é --text-dim no card destaque em hover, 5.07:1). */
@media screen {
  :root[data-theme="dark"] {
    color-scheme: dark;

    /* superfícies */
    --bg: #0c1414;                              /* --surface-body */
    --surface: #131c1d;                         /* --surface-base */
    --surface-2: #1a2628;                       /* --surface-raised */
    --surface-hover: rgba(127, 127, 127, 0.14); /* --surface-hover */
    --topbar-bg: rgba(12, 20, 20, 0.88);        /* --surface-body com alfa: vidro sob o blur */
    --scrim: rgba(0, 0, 0, 0.55);               /* véu atrás da sidebar no mobile */
    --border: rgba(255, 255, 255, 0.115);       /* --color-border-strong */
    --border-soft: rgba(255, 255, 255, 0.08);   /* --color-border */
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.35), 0 8px 24px rgba(0, 0, 0, 0.4); /* --shadow-sm + --shadow-md */

    /* texto */
    --text: #c8d4d2;                            /* --color-text-primary */
    --text-dim: #a1b1af;                        /* --color-text-secondary */
    --text-muted: #8e9d9b;                      /* --color-text-tertiary */

    /* âmbar: acento da doc (--coral) e aviso (--amber) */
    --coral: #fbbf24;                           /* --color-amber */
    --coral-dim: rgba(251, 191, 36, 0.15);      /* --color-amber-muted */
    --coral-dim-strong: rgba(251, 191, 36, 0.225); /* --color-amber-muted x1.5: hover */
    --coral-faint: rgba(251, 191, 36, 0.075);   /* --color-amber-muted /2 */
    --amber: #fbbf24;                           /* --color-warning */
    --amber-dim: rgba(251, 191, 36, 0.14);      /* --color-warning-muted */

    /* teal: acentos frios */
    --sage: #2dd4bf;                            /* --color-accent */
    --sage-dim: rgba(45, 212, 191, 0.15);       /* --color-accent-muted */
    --blue: #5eead4;                            /* --color-accent-hover */
    --blue-dim: rgba(45, 212, 191, 0.15);       /* --color-accent-muted */
    --green: #2dd4bf;                           /* --color-success */
    --green-dim: rgba(45, 212, 191, 0.14);      /* --color-success-muted */
    --green-faint: rgba(45, 212, 191, 0.07);    /* --color-success-muted /2 */
    --green-border: rgba(45, 212, 191, 0.18);   /* --color-success a 18% */

    /* erro */
    --red: #ff8583;                             /* --color-error */
    --red-dim: rgba(255, 133, 131, 0.14);       /* --color-error-muted */
  }
}

/* ── paleta: modo escuro, sem escolha — segue o sistema ───────────────────
   Cópia exata do bloco acima (ver o cabeçalho). */
@media screen and (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;

    /* superfícies */
    --bg: #0c1414;                              /* --surface-body */
    --surface: #131c1d;                         /* --surface-base */
    --surface-2: #1a2628;                       /* --surface-raised */
    --surface-hover: rgba(127, 127, 127, 0.14); /* --surface-hover */
    --topbar-bg: rgba(12, 20, 20, 0.88);        /* --surface-body com alfa: vidro sob o blur */
    --scrim: rgba(0, 0, 0, 0.55);               /* véu atrás da sidebar no mobile */
    --border: rgba(255, 255, 255, 0.115);       /* --color-border-strong */
    --border-soft: rgba(255, 255, 255, 0.08);   /* --color-border */
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.35), 0 8px 24px rgba(0, 0, 0, 0.4); /* --shadow-sm + --shadow-md */

    /* texto */
    --text: #c8d4d2;                            /* --color-text-primary */
    --text-dim: #a1b1af;                        /* --color-text-secondary */
    --text-muted: #8e9d9b;                      /* --color-text-tertiary */

    /* âmbar: acento da doc (--coral) e aviso (--amber) */
    --coral: #fbbf24;                           /* --color-amber */
    --coral-dim: rgba(251, 191, 36, 0.15);      /* --color-amber-muted */
    --coral-dim-strong: rgba(251, 191, 36, 0.225); /* --color-amber-muted x1.5: hover */
    --coral-faint: rgba(251, 191, 36, 0.075);   /* --color-amber-muted /2 */
    --amber: #fbbf24;                           /* --color-warning */
    --amber-dim: rgba(251, 191, 36, 0.14);      /* --color-warning-muted */

    /* teal: acentos frios */
    --sage: #2dd4bf;                            /* --color-accent */
    --sage-dim: rgba(45, 212, 191, 0.15);       /* --color-accent-muted */
    --blue: #5eead4;                            /* --color-accent-hover */
    --blue-dim: rgba(45, 212, 191, 0.15);       /* --color-accent-muted */
    --green: #2dd4bf;                           /* --color-success */
    --green-dim: rgba(45, 212, 191, 0.14);      /* --color-success-muted */
    --green-faint: rgba(45, 212, 191, 0.07);    /* --color-success-muted /2 */
    --green-border: rgba(45, 212, 191, 0.18);   /* --color-success a 18% */

    /* erro */
    --red: #ff8583;                             /* --color-error */
    --red-dim: rgba(255, 133, 131, 0.14);       /* --color-error-muted */
  }
}

/* ── reset ────────────────────────────────────────────────────────────── */
* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 88px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--coral); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }

code, pre, kbd { font-family: var(--mono); }

/* ── tipografia ───────────────────────────────────────────────────────── */
h1, h2, h3, h4 { line-height: 1.25; letter-spacing: -0.015em; font-weight: 600; }

h1 { font-size: 2.35rem; margin: 0 0 1rem; letter-spacing: -0.03em; }
h2 { font-size: 1.5rem; margin: 3.25rem 0 1rem; }
h3 { font-size: 1.12rem; margin: 2rem 0 0.65rem; }
h4 { font-size: 0.95rem; margin: 1.4rem 0 0.5rem; color: var(--text-dim); }

p { margin: 0 0 1.1rem; }

/* lead: parágrafo de descrição logo abaixo do H1 */
.lead {
  font-size: 1.12rem;
  color: var(--text-dim);
  margin: 0 0 2rem;
  max-width: 62ch;
}

strong { color: var(--text); font-weight: 600; }

hr {
  border: 0;
  border-top: 1px solid var(--border-soft);
  margin: 3rem 0;
}

.anchor-link {
  color: var(--text-muted);
  margin-left: 0.4rem;
  font-weight: 400;
  opacity: 0;
  transition: opacity 0.15s;
}
h2:hover .anchor-link, h3:hover .anchor-link { opacity: 1; }

/* inline code */
:not(pre) > code {
  background: var(--surface-2);
  border: 1px solid var(--border-soft);
  border-radius: 4px;
  padding: 0.12em 0.38em;
  font-size: 0.87em;
  color: var(--sage);
  white-space: nowrap;
}

/* ── layout de 3 colunas ──────────────────────────────────────────────── */
.layout { display: flex; align-items: flex-start; }

.sidebar {
  width: var(--sidebar-w);
  flex: 0 0 var(--sidebar-w);
  height: 100vh;
  position: sticky;
  top: 0;
  overflow-y: auto;
  border-right: 1px solid var(--border-soft);
  padding: 1.5rem 0 4rem;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}
.sidebar::-webkit-scrollbar { width: 8px; }
.sidebar::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }

.content {
  flex: 1;
  min-width: 0;
  padding: 3rem 3rem 8rem;
  max-width: calc(var(--content-max) + 6rem);
}

.toc {
  width: var(--toc-w);
  flex: 0 0 var(--toc-w);
  position: sticky;
  top: 0;
  max-height: 100vh;
  overflow-y: auto;
  padding: 3rem 1.5rem 4rem 0;
  scrollbar-width: thin;
}
.toc h6 {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--text-muted);
  margin: 0 0 0.75rem;
}
.toc a {
  display: block;
  color: var(--text-muted);
  font-size: 0.86rem;
  padding: 0.3rem 0 0.3rem 0.75rem;
  border-left: 2px solid transparent;
  margin-bottom: 1px;
}
.toc a:hover { color: var(--text); text-decoration: none; }
.toc a.active { color: var(--coral); border-left-color: var(--coral); }

/* ── topbar ───────────────────────────────────────────────────────────── */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  height: 56px;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0 1.25rem;
  background: var(--topbar-bg);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-soft);
}
.topbar .brand {
  font-weight: 600;
  color: var(--text);
  font-size: 0.95rem;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.topbar .brand .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--coral);
}
.topbar nav { display: flex; gap: 0.35rem; margin-left: 0.5rem; }
.topbar nav a {
  color: var(--text-dim);
  font-size: 0.87rem;
  padding: 0.3rem 0.6rem;
  border-radius: var(--radius-sm);
}
.topbar nav a:hover { color: var(--text); background: var(--surface-2); text-decoration: none; }
.topbar nav a.active { color: var(--text); background: var(--surface-2); }
.topbar .spacer { flex: 1; }
.topbar .version {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  border: 1px solid var(--border-soft);
  padding: 0.12rem 0.45rem;
  border-radius: 4px;
}

.menu-btn {
  display: none;
  background: none;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  color: var(--text);
  padding: 0.3rem 0.55rem;
  cursor: pointer;
  font-size: 0.85rem;
}

/* botão de tema: quem troca o tema é o docs.js, então sem JS o botão não
   faria nada — nasce escondido e o .has-js no <html> o mostra. Largura e
   altura fixas com line-height 1 porque ☀ e ☾ têm larguras diferentes e o
   topbar não pode pular quando o glifo troca. */
.theme-toggle {
  display: none;
  flex: 0 0 auto;
  width: 2rem;
  height: 2rem;
  padding: 0;
  background: none;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  color: var(--text-dim);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
}
.has-js .theme-toggle { display: inline-flex; align-items: center; justify-content: center; }
.theme-toggle:hover { color: var(--text); background: var(--surface-2); border-color: var(--border); }
.theme-toggle:focus-visible { outline: 2px solid var(--coral); outline-offset: 2px; }

/* ── sidebar: navegação ───────────────────────────────────────────────── */
.nav-group { margin-bottom: 1.5rem; }
.nav-title {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  padding: 0 1.25rem;
  margin-bottom: 0.5rem;
  font-weight: 600;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-dim);
  font-size: 0.875rem;
  padding: 0.32rem 1.25rem;
  border-left: 2px solid transparent;
}
.nav-item:hover { color: var(--text); background: var(--surface); text-decoration: none; }
.nav-item.active {
  color: var(--text);
  border-left-color: var(--coral);
  background: var(--surface);
  font-weight: 500;
}
.nav-item .verb {
  font-family: var(--mono);
  font-size: 0.62rem;
  font-weight: 600;
  padding: 0.1rem 0.3rem;
  border-radius: 3px;
  letter-spacing: 0.02em;
  flex: 0 0 42px;
  text-align: center;
}
.verb-get { background: var(--blue-dim); color: var(--blue); }
.verb-post { background: var(--sage-dim); color: var(--sage); }
.verb-put { background: var(--amber-dim); color: var(--amber); }
.verb-patch { background: var(--coral-dim); color: var(--coral); }
.verb-delete { background: var(--red-dim); color: var(--red); }

.badge {
  font-size: 0.68rem;
  font-weight: 600;
  padding: 0.08rem 0.4rem;
  border-radius: 20px;
  letter-spacing: 0.01em;
  white-space: nowrap;
}
.badge-beta { background: var(--coral-dim); color: var(--coral); }
.badge-new { background: var(--sage-dim); color: var(--sage); }
.badge-deprecated { background: var(--red-dim); color: var(--red); }

/* ── componentes ──────────────────────────────────────────────────────── */

/* eyebrow + H2 + descrição (cabeçalho de seção) */
.section-head { margin-bottom: 1.75rem; }
.eyebrow {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.11em;
  color: var(--coral);
  font-weight: 600;
  margin-bottom: 0.5rem;
}
.section-head h2 { margin: 0 0 0.5rem; }
.section-head p { color: var(--text-dim); margin: 0; max-width: 58ch; }

/* breadcrumb */
.breadcrumb {
  display: flex;
  gap: 0.45rem;
  align-items: center;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
  flex-wrap: wrap;
}
.breadcrumb a { color: var(--text-dim); }
.breadcrumb a:hover { color: var(--coral); }
.breadcrumb .sep { color: var(--border); }

/* código */
.codeblock {
  position: relative;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  background: var(--surface);
  margin: 1rem 0 1.35rem;
  overflow: hidden;
}
.codeblock .code-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.85rem;
  border-bottom: 1px solid var(--border-soft);
  background: var(--surface-2);
}
.codeblock .lang {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.codeblock .status {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--green);
  font-weight: 600;
}
.codeblock pre {
  margin: 0;
  padding: 0.95rem 1rem;
  overflow-x: auto;
  font-size: 0.855rem;
  line-height: 1.62;
  scrollbar-width: thin;
}
.codeblock pre code { background: none; border: 0; padding: 0; font-size: inherit; color: var(--text); white-space: pre; }

.copy-btn {
  position: absolute;
  top: 0.35rem;
  right: 0.5rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-dim);
  border-radius: var(--radius-sm);
  font-size: 0.7rem;
  padding: 0.2rem 0.5rem;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s;
}
.codeblock:hover .copy-btn { opacity: 1; }
.copy-btn:hover { color: var(--text); border-color: var(--text-muted); }
.copy-btn.done { color: var(--green); border-color: var(--green); }

/* saída de comando / resposta */
.output .code-head { background: var(--green-faint); }
.output { border-color: var(--green-border); }

/* steps numerados */
.steps { list-style: none; padding: 0; margin: 1.25rem 0 1.5rem; counter-reset: step; }
.step {
  position: relative;
  padding-left: 2.75rem;
  padding-bottom: 0.75rem;
  margin-bottom: 0.75rem;
  border-left: 1px solid var(--border-soft);
  margin-left: 0.85rem;
}
.step:last-child { border-left-color: transparent; padding-bottom: 0; }
.step::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: -0.85rem;
  top: -0.1rem;
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 50%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--coral);
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}
.step h4 { margin: 0 0 0.4rem; font-size: 1rem; color: var(--text); }
.step p { margin: 0 0 0.6rem; color: var(--text-dim); font-size: 0.95rem; }

/* tabs */
.tabs { margin: 1.5rem 0; }
.tablist {
  display: flex;
  gap: 0.15rem;
  border-bottom: 1px solid var(--border-soft);
  overflow-x: auto;
  scrollbar-width: none;
}
.tablist::-webkit-scrollbar { display: none; }
.tab {
  background: none;
  border: 0;
  border-bottom: 2px solid transparent;
  color: var(--text-muted);
  font-family: var(--sans);
  font-size: 0.855rem;
  padding: 0.5rem 0.85rem;
  cursor: pointer;
  white-space: nowrap;
  margin-bottom: -1px;
}
.tab:hover { color: var(--text); }
.tab[aria-selected="true"] { color: var(--coral); border-bottom-color: var(--coral); }
.tabpanel { display: none; }
.tabpanel.active { display: block; }

/* tabelas */
.table-wrap {
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  overflow-x: auto;
  margin: 1rem 0 1.4rem;
}
table { border-collapse: collapse; width: 100%; font-size: 0.9rem; }
th {
  text-align: left;
  padding: 0.62rem 0.9rem;
  background: var(--surface-2);
  color: var(--text-dim);
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.045em;
  border-bottom: 1px solid var(--border-soft);
  white-space: nowrap;
}
td {
  padding: 0.62rem 0.9rem;
  border-bottom: 1px solid var(--border-soft);
  vertical-align: top;
  color: var(--text-dim);
}
tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: var(--surface-hover); }
td code { white-space: nowrap; }

/* callouts */
.callout {
  border: 1px solid var(--border-soft);
  border-left: 3px solid var(--blue);
  background: var(--blue-dim);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1.05rem;
  margin: 1.35rem 0;
  font-size: 0.94rem;
}
.callout .callout-title {
  font-weight: 600;
  color: var(--blue);
  margin-bottom: 0.3rem;
  font-size: 0.83rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.callout p { margin: 0 0 0.5rem; color: var(--text-dim); }
.callout p:last-child { margin: 0; }
.callout.note { border-left-color: var(--blue); background: var(--blue-dim); }
.callout.warning { border-left-color: var(--amber); background: var(--amber-dim); }
.callout.warning .callout-title { color: var(--amber); }
.callout.tip { border-left-color: var(--green); background: var(--green-dim); }
.callout.tip .callout-title { color: var(--green); }

/* cards */
.cardgrid { display: grid; gap: 0.85rem; margin: 1.25rem 0 1.75rem; }
.cardgrid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.cardgrid.cols-3 { grid-template-columns: repeat(3, 1fr); }

.card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 1.1rem 1.2rem;
  color: inherit;
  transition: border-color 0.15s, background 0.15s, transform 0.15s;
}
.card:hover {
  border-color: var(--border);
  background: var(--surface-2);
  text-decoration: none;
  transform: translateY(-1px);
}
.card.featured { border-color: var(--coral); background: var(--coral-dim); }
.card.featured:hover { border-color: var(--coral); background: var(--coral-dim-strong); }
.card .card-icon { font-size: 1.15rem; line-height: 1; margin-bottom: 0.6rem; display: block; }
.card .card-title {
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.3rem;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.98rem;
}
.card .card-desc { color: var(--text-dim); font-size: 0.885rem; line-height: 1.55; }

/* próxima etapa: card destaque + grade */
.nextsteps .ns-lead {
  font-size: 1.02rem;
  color: var(--text-dim);
  margin-bottom: 1.1rem;
}
.ns-hint { color: var(--text-muted); font-size: 0.9rem; margin: 1.6rem 0 0.75rem; }

/* listagem de recursos (entidades com id + tags) */
.entitylist { display: flex; flex-direction: column; gap: 0.5rem; margin: 1.25rem 0 1.5rem; }
.entity {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: 0.85rem 1.05rem;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  background: var(--surface);
}
.entity:hover { border-color: var(--border); background: var(--surface-2); }
.entity .e-title { font-weight: 600; display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.entity .e-title a { color: var(--text); }
.entity .e-title a:hover { color: var(--coral); text-decoration: none; }
.entity .e-id { font-family: var(--mono); font-size: 0.78rem; color: var(--text-muted); }
.entity .e-desc { color: var(--text-dim); font-size: 0.9rem; font-style: italic; }
.entity .e-tags { color: var(--text-muted); font-size: 0.8rem; }
.entity .e-tags span::after { content: " ·"; }
.entity .e-tags span:last-child::after { content: ""; }

/* Journey (home) */
.journey { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.75rem; margin: 1.5rem 0; }
.journey .jstep {
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 1rem;
  position: relative;
}
.journey .jstep-num {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--coral);
  font-weight: 600;
  letter-spacing: 0.06em;
}
.journey .jstep h3 { font-size: 0.98rem; margin: 0.2rem 0 0.6rem; }
.journey .jstep ul { list-style: none; padding: 0; margin: 0; }
.journey .jstep li { margin-bottom: 0.3rem; }
.journey .jstep li a { font-size: 0.87rem; color: var(--text-dim); }
.journey .jstep li a:hover { color: var(--coral); }

/* hero (home) */
.hero { padding: 5rem 0 3.5rem; border-bottom: 1px solid var(--border-soft); }
.hero .eyebrow { margin-bottom: 0.9rem; }
.hero h1 {
  font-size: 3.5rem;
  line-height: 1.05;
  letter-spacing: -0.04em;
  margin: 0 0 1.25rem;
  max-width: 16ch;
}
.hero .lead { font-size: 1.2rem; max-width: 58ch; margin-bottom: 1.75rem; }
.hero .chips { display: flex; gap: 0.6rem; flex-wrap: wrap; margin-bottom: 2.25rem; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 0.4rem 0.95rem;
  font-size: 0.87rem;
  color: var(--text-dim);
  background: var(--surface);
}
.chip:hover { border-color: var(--coral); color: var(--coral); text-decoration: none; }

/* blocos de destaque na home */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin: 1.5rem 0 2rem; }
.split .card { padding: 1.5rem; }
.split .card h3 { margin: 0.3rem 0 0.5rem; font-size: 1.15rem; }
.split .card .card-links { margin-top: 1rem; display: flex; flex-direction: column; gap: 0.3rem; }
.split .card .card-links a { font-size: 0.88rem; color: var(--text-dim); }
.split .card .card-links a:hover { color: var(--coral); }

/* rodapé */
.footer {
  border-top: 1px solid var(--border-soft);
  margin-top: 5rem;
  padding: 1.75rem 0 0;
  color: var(--text-muted);
  font-size: 0.85rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}
.footer .feedback { display: flex; align-items: center; gap: 0.6rem; }
.footer .feedback button {
  background: var(--surface-2);
  border: 1px solid var(--border-soft);
  color: var(--text-dim);
  border-radius: var(--radius-sm);
  padding: 0.25rem 0.55rem;
  cursor: pointer;
  font-size: 0.85rem;
}
.footer .feedback button:hover { color: var(--text); border-color: var(--text-muted); }
.footer .feedback button.done { color: var(--green); border-color: var(--green); }

/* utilitários */
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.muted { color: var(--text-muted); }
.small { font-size: 0.87rem; }
.nowrap { white-space: nowrap; }
.pill-row { display: flex; gap: 0.4rem; flex-wrap: wrap; margin: 0.5rem 0 1rem; }
.endpoint {
  font-family: var(--mono);
  font-size: 0.82rem;
  background: var(--surface-2);
  border: 1px solid var(--border-soft);
  border-radius: 100px;
  padding: 0.15rem 0.6rem;
  color: var(--text-dim);
  display: inline-block;
}

/* ── responsivo ───────────────────────────────────────────────────────── */
@media (max-width: 1200px) {
  .toc { display: none; }
}
@media (max-width: 900px) {
  .sidebar {
    position: fixed;
    left: 0; top: 0; bottom: 0;
    z-index: 100;
    transform: translateX(-100%);
    transition: transform 0.2s ease;
    background: var(--bg);
    box-shadow: var(--shadow);
  }
  body.nav-open .sidebar { transform: translateX(0); }
  body.nav-open::after {
    content: "";
    position: fixed;
    inset: 56px 0 0 0;
    background: var(--scrim);
    z-index: 99;
  }
  .menu-btn { display: block; }
  .topbar nav { display: none; }
  .content { padding: 2rem 1.25rem 6rem; max-width: 100%; }
  .cardgrid.cols-2, .cardgrid.cols-3, .split { grid-template-columns: 1fr; }
  .journey { grid-template-columns: repeat(2, 1fr); }
  h1 { font-size: 1.9rem; }
  .hero h1 { font-size: 2.4rem; }
}
@media (max-width: 560px) {
  .journey { grid-template-columns: 1fr; }
}

/* impressão: só o conteúdo */
@media print {
  .topbar, .sidebar, .toc, .copy-btn, .footer .feedback { display: none; }
  body { background: #fff; color: #111; } /* papel e tinta: literais de propósito, valem em qualquer tema */
  .content { max-width: 100%; padding: 0; }
}
/* ==========================================================================
   INFOGRÁFICOS — pure CSS, sem imagem e sem CDN.
   Regra de ritmo visual: nenhuma sequência de 3+ blocos de prosa/tabela/código
   seguidos sem um elemento visual. Os componentes abaixo são a paleta.
   ========================================================================== */

/* ── statgrid: números-chave (KPIs) ─────────────────────────────────── */
.statgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.85rem; margin: 1.25rem 0 1.75rem; }
.stat {
  background: var(--surface); border: 1px solid var(--border-soft);
  border-radius: var(--radius); padding: 1rem 1.1rem;
}
.stat .s-num { font-size: 1.7rem; font-weight: 650; letter-spacing: -0.02em;
  color: var(--coral); line-height: 1.15; font-family: var(--mono); }
.stat .s-num .s-unit { font-size: 1rem; color: var(--text-dim); font-weight: 500; margin-left: 0.15rem; }
.stat.sage  .s-num { color: var(--sage); }
.stat.blue  .s-num { color: var(--blue); }
.stat.green .s-num { color: var(--green); }
.stat .s-label { font-size: 0.8rem; color: var(--text-muted); margin-top: 0.3rem;
  line-height: 1.4; text-transform: none; }
.stat a { color: inherit; }
.stat a:hover { color: var(--coral); }

/* ── flow: diagrama de caminho (etapas conectadas por seta) ──────────── */
.flow { display: flex; flex-wrap: wrap; align-items: stretch; gap: 0.5rem;
  margin: 1.25rem 0 1.75rem; }
.flow .fnode {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 0.55rem 0.8rem;
  font-size: 0.82rem; line-height: 1.35; flex: 1 1 0; min-width: 120px;
  display: flex; flex-direction: column; justify-content: center;
}
.flow .fnode b, .flow .fnode strong { color: var(--text); display: block;
  font-size: 0.86rem; margin-bottom: 0.1rem; }
.flow .fnode span { color: var(--text-muted); }
.flow .fnode .fnum { display: inline-flex; align-items: center; justify-content: center;
  width: 1.25rem; height: 1.25rem; border-radius: 999px; font-size: 0.68rem;
  font-family: var(--mono); background: var(--coral-dim); color: var(--coral);
  margin-right: 0.4rem; flex-shrink: 0; }
.flow .fnode + .fnode::before { content: none; }
.flow .farrow { align-self: center; color: var(--text-muted); font-size: 0.9rem;
  flex-shrink: 0; user-select: none; }
.flow .fnode.fnode-accent { border-color: var(--coral); background: var(--coral-dim); }
.flow .fnode.fnode-sage { border-color: var(--sage); background: var(--sage-dim); }
.flow .fnode.fnode-blue { border-color: var(--blue); background: var(--blue-dim); }
/* sobre tint, --text-muted fica abaixo de 4.5:1 no claro (4.28 no coral);
   texto secundário em fundo tingido usa --text-dim, como .callout p e
   .card-desc. O :not(.fnum) preserva o número, que tem cor própria. */
.flow .fnode.fnode-accent span:not(.fnum),
.flow .fnode.fnode-sage span:not(.fnum),
.flow .fnode.fnode-blue span:not(.fnum) { color: var(--text-dim); }
.flow.flow-vert { flex-direction: column; }
.flow.flow-vert .fnode { min-width: 0; }
.flow.flow-vert .farrow { transform: rotate(90deg); }

/* ── meter: barra de ocupação/percentual ─────────────────────────────── */
.meter { margin: 0.9rem 0 1.4rem; }
.meter .m-row { display: grid; grid-template-columns: 170px 1fr 52px; gap: 0.7rem;
  align-items: center; margin: 0.45rem 0; }
.meter .m-label { font-size: 0.84rem; color: var(--text-dim); }
.meter .m-label code { font-size: 0.78rem; }
.meter .m-bar { height: 8px; background: var(--surface-2); border-radius: 999px;
  overflow: hidden; }
.meter .m-fill { height: 100%; border-radius: 999px; background: var(--coral); }
.meter .m-fill.sage  { background: var(--sage); }
.meter .m-fill.blue  { background: var(--blue); }
.meter .m-fill.green { background: var(--green); }
.meter .m-fill.amber { background: var(--amber); }
.meter .m-fill.red   { background: var(--red); }
.meter .m-val { font-size: 0.8rem; font-family: var(--mono); color: var(--text-dim);
  text-align: right; }

/* ── donut: distribuição com legenda ─────────────────────────────────── */
.donut { display: flex; align-items: center; gap: 1.6rem; margin: 1.25rem 0 1.75rem;
  flex-wrap: wrap; }
.donut .d-chart { position: relative; width: 150px; height: 150px; border-radius: 50%;
  background: conic-gradient(var(--coral) 0deg 162deg, var(--sage) 162deg 270deg,
    var(--blue) 270deg 342deg, var(--surface-2) 342deg 360deg);
  flex-shrink: 0; }
.donut .d-chart::after { content: attr(data-center); position: absolute; inset: 22%;
  background: var(--bg); border-radius: 50%; display: flex; align-items: center;
  justify-content: center; text-align: center; font-size: 0.78rem; line-height: 1.3;
  color: var(--text-dim); font-family: var(--mono); white-space: pre-line; }
.donut .d-legend { display: flex; flex-direction: column; gap: 0.45rem; min-width: 200px; }
.donut .d-item { display: flex; align-items: baseline; gap: 0.55rem; font-size: 0.86rem; }
.donut .d-dot { width: 10px; height: 10px; border-radius: 3px; flex-shrink: 0;
  align-self: center; }
.donut .d-item b { font-family: var(--mono); font-size: 0.85rem; }
.donut .d-item span { color: var(--text-muted); }

/* ── compare: tabela de comparação com destaque na coluna recomendada ── */
table.compare th.recommended { background: var(--coral-dim); color: var(--coral);
  border-bottom: 2px solid var(--coral); }
table.compare td.recommended { background: var(--coral-faint);
  border-left: 1px solid var(--border-soft); border-right: 1px solid var(--border-soft); }
table.compare td.recommended:first-child { border-left: 1px solid var(--border); }

/* ── pillars: 3–4 colunas de conceito com número/ícone ──────────────── */
.pillars { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.85rem; margin: 1.25rem 0 1.75rem; }
.pillar { background: var(--surface); border: 1px solid var(--border-soft);
  border-radius: var(--radius); padding: 1rem 1.1rem; border-top: 2px solid var(--border); }
.pillar.p-coral { border-top-color: var(--coral); }
.pillar.p-sage  { border-top-color: var(--sage); }
.pillar.p-blue  { border-top-color: var(--blue); }
.pillar .p-kicker { font-family: var(--mono); font-size: 0.72rem; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 0.4rem; }
.pillar b { display: block; font-size: 0.95rem; margin-bottom: 0.25rem; }
.pillar p { margin: 0; font-size: 0.86rem; color: var(--text-dim); line-height: 1.5; }

/* ── timelines: evento + horário/versão ─────────────────────────────── */
.timeline { margin: 1.25rem 0 1.75rem; padding-left: 0; list-style: none; }
.timeline .t-item { display: grid; grid-template-columns: 120px 14px 1fr; gap: 0.8rem;
  padding: 0.55rem 0; }
.timeline .t-when { font-family: var(--mono); font-size: 0.8rem; color: var(--text-muted);
  text-align: right; padding-top: 0.15rem; }
.timeline .t-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--coral);
  margin-top: 0.45rem; justify-self: center; position: relative; }
.timeline .t-dot::after { content: ""; position: absolute; top: 12px; left: 4px;
  bottom: -0.9rem; width: 1px; background: var(--border); }
.timeline .t-item:last-child .t-dot::after { content: none; }
.timeline .t-what { font-size: 0.9rem; }
.timeline .t-what b { color: var(--text); }
.timeline .t-what span { color: var(--text-muted); }

/* ── hierarchy: árvore de arquivos/estrutura ─────────────────────────── */
.tree { background: var(--surface); border: 1px solid var(--border-soft);
  border-radius: var(--radius); padding: 1rem 1.2rem; margin: 1.25rem 0 1.75rem;
  font-family: var(--mono); font-size: 0.84rem; line-height: 1.7; overflow-x: auto; }
.tree .t-dir  { color: var(--sage); font-weight: 600; }
.tree .t-file { color: var(--text-dim); }
.tree .t-note { color: var(--text-muted); font-family: var(--sans); font-size: 0.8rem; }
.tree b { color: var(--text); font-weight: 600; }

/* responsivo dos infográficos */
@media (max-width: 700px) {
  .statgrid, .pillars { grid-template-columns: 1fr 1fr; }
  .meter .m-row { grid-template-columns: 110px 1fr 44px; }
  .donut .d-chart { width: 120px; height: 120px; }
  .timeline .t-item { grid-template-columns: 84px 14px 1fr; }
}
@media (max-width: 480px) {
  .statgrid, .pillars { grid-template-columns: 1fr; }
}

/* busca da sidebar (era inline; movida para cá para manter zero CSS inline) */
.nav-search { padding: 0 1.25rem 1rem; }
.nav-search input {
  width: 100%; background: var(--surface-2); border: 1px solid var(--border-soft);
  border-radius: 6px; padding: 0.4rem 0.6rem; color: var(--text);
  font-size: 0.85rem; font-family: inherit; outline: none;
}
.nav-search input:focus { border-color: var(--coral); }
/* o placeholder padrão do Chrome (#757575) fica abaixo de 4.5:1 nos dois
   temas; --text-muted passa nos dois. opacity 1: o Firefox aplica 0.54. */
.nav-search input::placeholder { color: var(--text-muted); opacity: 1; }
/* home: conteúdo mais largo (era inline no <main>) */
.content-wide { max-width: 1080px; }

/* ── ajuste do site spaceAI: centraliza o conjunto em telas largas ──
   O layout soma sidebar (268) + conteúdo (856) + sumário (220) e o flex
   jogava tudo para a esquerda, deixando espaço morto à direita. O bloco
   abaixo centraliza o conjunto e alarga um pouco a coluna de leitura. */
:root { --content-max: 840px; }
.layout { max-width: 1500px; margin: 0 auto; }
