/* EterShield Docs: visual v2 (fundo quase branco, superfícies neutras) com a marca EterShield + modo escuro.
   Fonte: Apfel Grotezk, servida localmente (fonts/). Cores: teal #2A8BA0 (acento: superfícies, bordas, ícones),
   navy #0a2a35 (texto), amarelo-ácido #C7D112 (só como realce raro), branco e #fcfcfc (fundos). Sem creme, sem laranja.
   Texto e botões usam o navy-700 #1B4A5C em vez do teal: o teal sobre branco só tem 3,96:1 (reprova texto normal).
   Superfícies, bordas e escuro neutros vêm do desenho v2 de 05/11/2026; o acento escuro é o teal claro dos tokens.
   Páginas e diagramas usam só variáveis. O código usa a mono do sistema (sem ficheiro). */

@font-face { font-family: "Apfel Grotezk"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/ApfelGrotezk-Regular.woff2") format("woff2"); }
@font-face { font-family: "Apfel Grotezk"; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/ApfelGrotezk-Mittel.woff2") format("woff2"); }
@font-face { font-family: "Apfel Grotezk"; font-style: normal; font-weight: 600 700; font-display: swap; src: url("fonts/ApfelGrotezk-Fett.woff2") format("woff2"); }

:root {
  --bg: #fcfcfc; --pn: #fff; --e2: #f5f7f8; --e3: #ebeff1;
  --ln: #e2e8ea; --ln2: #c4d0d4;
  --fg: #0a2a35; --mu: #4d6b77; --mu2: #516e79;
  --ac: #1b4a5c; --ac-h: #0a2a35; --acs: #eaf4f7;
  --ac-solid: #1b4a5c; --ac-solid-h: #0a2a35; --on-ac: #fff;
  --brand: #2a8ba0;
  --ov: rgba(10, 42, 53, .35); --tl: #c4d0d4;
  --cr: #b3261e; --crs: #fbe9e8; --cr-ln: #efc4c1;
  --sev-critical-bg: #f6d3d0; --sev-critical-fg: #8e1b16;
  --sev-high-bg: #fbe9e8; --sev-high-fg: #b3261e;
  --sev-medium-bg: #f1efc2; --sev-medium-fg: #575010;
  --sev-low-bg: #eaf4f7; --sev-low-fg: #1b4a5c;
  --r-card: 12px; --r-btn: 10px; --r-in: 8px; --r-pill: 999px;
  --sh-1: 0 1px 2px rgba(0, 0, 0, .04); --sh-pop: 0 8px 24px rgba(0, 0, 0, .10);
  --bar-h: 52px; --tabs-h: 40px; --top-h: 92px; --side-w: 264px; --toc-w: 216px;
  --sans: "Apfel Grotezk", -apple-system, "SF Pro Text", "Segoe UI", system-ui, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: light;
}

/* ===== modo escuro: superfícies neutras do desenho v2, acento teal claro da marca, só troca valores ===== */
html[data-theme="dark"] {
  --bg: #131413; --pn: #181a19; --e2: #1b1d1c; --e3: #242625;
  --ln: #2d2e2d; --ln2: #414342;
  --fg: #edefee; --mu: #a3a5a4; --mu2: #8e908f;
  --ac: #3ab4cc; --ac-h: #7fd0e0; --acs: rgba(42, 139, 160, .22);
  --ac-solid: #3ab4cc; --ac-solid-h: #7fd0e0; --on-ac: #061820;
  --brand: #3ab4cc;
  --cr: #f4817b; --crs: #361717; --cr-ln: #6b2e2e;
  --sev-critical-bg: #431b19; --sev-critical-fg: #f99d94;
  --sev-high-bg: #351918; --sev-high-fg: #f4817b;
  --sev-medium-bg: #353022; --sev-medium-fg: #e2ce8d;
  --sev-low-bg: #14292f; --sev-low-fg: #8fd3e2;
  --sh-1: none; --sh-pop: 0 0 0 1px #414342, 0 8px 24px rgba(0, 0, 0, .6);
  --ov: rgba(0, 0, 0, .6); --tl: #414342;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-padding-top: calc(var(--top-h) + 16px); -webkit-text-size-adjust: 100%; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 400 14px/22px var(--sans); text-wrap: pretty; }
h1, h2, h3 { text-wrap: balance; }
a { color: var(--ac); text-decoration: none; }
a:hover { color: var(--ac-h); }
svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex: none; }
img.logo { width: 24px; height: 24px; display: block; }
kbd { font: 500 11px/1 var(--sans); padding: 3px 5px; border: 1px solid var(--ln); border-radius: 6px; color: var(--mu); background: var(--pn); }
button { font: inherit; color: inherit; cursor: pointer; }
a:focus-visible, button:focus-visible, input:focus-visible, summary:focus-visible, [tabindex]:focus-visible { outline: 2px solid var(--ac); outline-offset: 1px; }

/* ===== botões: primary / secondary / danger / link, medium (32) e tiny (24) ===== */
.btn, .cta, .copy-page, .lang, .copy-code {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 32px; padding: 0 14px;
  border: 1px solid var(--ln2); border-radius: var(--r-btn); background: var(--pn); color: var(--mu);
  font: 500 13px/1 var(--sans); white-space: nowrap; box-shadow: var(--sh-1); transition: background-color .12s, border-color .12s;
}
.btn:hover, .copy-page:hover, .lang:hover, .copy-code:hover { background: var(--e2); color: var(--fg); text-decoration: none; }
.btn-primary, .cta { background: var(--ac-solid); border-color: var(--ac-solid); color: var(--on-ac); }
.btn-primary:hover, .cta:hover { background: var(--ac-solid-h); border-color: var(--ac-solid-h); color: var(--on-ac); text-decoration: none; }
.btn-danger { background: var(--crs); border-color: var(--cr-ln); color: var(--cr); }
.btn-danger:hover { background: var(--sev-critical-bg); color: var(--cr); }
.btn-link { background: transparent; border-color: transparent; box-shadow: none; color: var(--ac); padding: 0 8px; }
.btn-link:hover { background: var(--e2); color: var(--ac-h); }
.btn-tiny, .copy-page, .copy-code { height: 24px; padding: 0 10px; font-size: 12px; border-radius: var(--r-btn); }
.copy-page svg, .lang svg { width: 14px; height: 14px; }
.lang { padding: 0 10px; }

/* ===== cabeçalho ===== */
.top { position: fixed; inset: 0 0 auto; z-index: 40; background: var(--pn); border-bottom: 1px solid var(--ln); }
.top-in { height: var(--bar-h); display: flex; align-items: center; gap: 16px; padding: 0 16px; }
.brand { display: flex; align-items: center; gap: 8px; color: var(--fg); font-weight: 600; letter-spacing: -.01em; }
.brand:hover { text-decoration: none; color: var(--fg); }
.brand .wm { font-size: 15px; }
.brand .docs { font-size: 12px; font-weight: 500; color: var(--mu); background: var(--e3); border-radius: var(--r-pill); height: 20px; padding: 0 8px; display: inline-flex; align-items: center; }
.search-btn { margin-left: 16px; display: flex; align-items: center; gap: 8px; width: min(380px, 38vw); height: 32px; padding: 0 8px; border-radius: var(--r-in); border: 1px solid var(--ln2); background: var(--pn); color: var(--mu2); font-weight: 400; }
.search-btn span { flex: 1; text-align: left; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search-btn:hover { background: var(--e2); }
.top-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.top-link { color: var(--mu); font-size: 13px; padding: 0 8px; }
.top-link:hover { color: var(--fg); text-decoration: none; }
.tabs { height: var(--tabs-h); display: flex; gap: 2px; padding: 0 12px; overflow-x: auto; scrollbar-width: none; align-items: center; border-top: 1px solid var(--ln); background: var(--bg); }
.tabs::-webkit-scrollbar { display: none; }
.tab { display: flex; align-items: center; height: 28px; padding: 0 10px; border-radius: 8px; color: var(--mu); font-size: 13px; font-weight: 500; white-space: nowrap; }
.tab:hover { background: var(--e2); color: var(--fg); text-decoration: none; }
.tab.on { background: var(--e3); color: var(--fg); }
.burger { display: none; width: 32px; height: 32px; border: 0; background: none; padding: 9px 7px; flex-direction: column; justify-content: space-between; border-radius: 8px; }
.burger:hover { background: var(--e2); }
.burger span { display: block; height: 2px; background: var(--fg); border-radius: 2px; }

/* ===== estrutura ===== */
.layout { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr) auto; padding-top: var(--top-h); max-width: 1480px; margin: 0 auto; }
.side { position: sticky; top: var(--top-h); height: calc(100vh - var(--top-h)); overflow-y: auto; border-right: 1px solid var(--ln); scrollbar-width: thin; background: var(--bg); }
.side-in { padding: 12px 8px 40px; display: flex; flex-direction: column; gap: 2px; }
.side-tabs { display: none; }

/* sidebar como a da app: item 28 px, grupo colapsável */
.sg-top { display: flex; align-items: center; gap: 8px; min-height: 32px; padding: 4px 8px; margin-bottom: 8px; border: 1px solid color-mix(in oklab, var(--ac) 30%, var(--ln)); border-radius: var(--r-btn); background: var(--acs); color: var(--ac-h); font-weight: 500; font-size: 13px; line-height: 20px; }
.sg-top:hover { border-color: var(--ac); color: var(--ac-h); text-decoration: none; }
.sg-top.on { background: var(--ac-solid); border-color: var(--ac-solid); color: var(--on-ac); }
.sg-top svg { color: var(--ac); }
.sg-top.on svg { color: var(--on-ac); }
.sg { margin: 0; }
.sg > summary, .sg > .sg-h { list-style: none; display: flex; align-items: center; gap: 6px; padding: 14px 8px 4px; font-size: 11px; line-height: 16px; font-weight: 500; color: var(--mu2); cursor: pointer; user-select: none; }
.sg > summary::-webkit-details-marker { display: none; }
.sg > summary::after { content: ""; margin-left: auto; width: 6px; height: 6px; border-right: 1.5px solid var(--mu2); border-bottom: 1.5px solid var(--mu2); transform: rotate(-45deg); transition: transform .12s; }
.sg[open] > summary::after { transform: rotate(45deg); }
.sg > summary:hover { color: var(--fg); }
.sg a { display: block; padding: 4px 8px; margin: 1px 0; border-radius: 6px; color: var(--mu); font-size: 13px; line-height: 20px; }
.sg a:hover { background: var(--e2); color: var(--fg); text-decoration: none; }
.sg a.on { background: var(--e3); color: var(--fg); font-weight: 500; box-shadow: inset 2px 0 0 var(--ac); }

.main { min-width: 0; padding: 32px 48px 0; }
.doc { min-width: 0; max-width: 760px; margin: 0 auto 0 0; }
.toc { min-width: 0; }
.toc:empty { display: none; }
.toc-in { position: sticky; top: calc(var(--top-h) + 32px); width: var(--toc-w); max-height: calc(100vh - var(--top-h) - 56px); overflow-y: auto; margin: 32px 24px 0 0; padding-left: 12px; border-left: 1px solid var(--ln); }
.toc-h { font-size: 12px; font-weight: 600; color: var(--fg); margin-bottom: 6px; }
.toc a { display: block; color: var(--mu); font-size: 12px; line-height: 16px; padding: 5px 0; margin-left: -13px; padding-left: 12px; border-left: 2px solid transparent; }
.toc a.l3 { padding-left: 24px; }
.toc a:hover { color: var(--fg); text-decoration: none; }
.toc a.on { color: var(--ac); border-left-color: var(--ac); font-weight: 500; }
.main > .foot { max-width: 760px; }

/* ===== conteúdo ===== */
.crumbs { font-size: 12px; line-height: 16px; color: var(--mu2); display: flex; gap: 6px; margin-bottom: 12px; }
.crumbs span:first-child { color: var(--mu); font-weight: 500; }
.doc-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.doc h1 { font-size: 28px; line-height: 36px; letter-spacing: -.02em; color: var(--fg); margin: 0 0 8px; font-weight: 600; }
.lead { font-size: 16px; line-height: 26px; color: var(--mu); margin: 0 0 8px; }
.copy-page { margin-top: 6px; }

/* prosa do DS: corpo 15/25, h2 20/28, h3 16/24, tudo Inter */
.prose { margin-top: 24px; font-size: 15px; line-height: 25px; color: var(--fg); }
.prose > :first-child { margin-top: 0; }
.prose h2 { font-size: 20px; line-height: 28px; letter-spacing: -.012em; color: var(--fg); margin: 40px 0 12px; font-weight: 600; padding-top: 24px; border-top: 1px solid var(--ln); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.prose > h2:first-child { border-top: 0; padding-top: 0; margin-top: 0; }
.prose h2 code { font-size: 15px; }
.prose h3 { font-size: 16px; line-height: 24px; color: var(--fg); margin: 28px 0 8px; font-weight: 600; }
.prose h4, .prose h5 { font-size: 14px; line-height: 20px; color: var(--fg); margin: 20px 0 6px; font-weight: 600; }
.prose p, .prose ul, .prose ol { margin: 0 0 16px; }
.prose li { margin: 4px 0; }
.prose li::marker { color: var(--mu2); }
.prose strong { color: var(--fg); font-weight: 600; }
.prose a { text-decoration: underline; text-decoration-color: color-mix(in oklab, var(--ac) 40%, transparent); text-underline-offset: 3px; }
.prose a:hover { text-decoration-color: currentColor; }
.prose a.btn, .prose .card, .prose .pn a { text-decoration: none; }
.prose hr { border: 0; border-top: 1px solid var(--ln); margin: 32px 0; }
.prose code { font: 400 .875em/1.4 var(--mono); background: var(--e2); border: 1px solid var(--ln); padding: 1px 5px; border-radius: 6px; color: var(--fg); overflow-wrap: anywhere; }
.prose pre { position: relative; margin: 0 0 20px; background: var(--e2); border: 1px solid var(--ln); border-radius: var(--r-card); overflow: hidden; }
.prose pre code { display: block; padding: 16px 16px; overflow-x: auto; border: 0; background: none; font-size: 12.5px; line-height: 20px; color: var(--fg); overflow-wrap: normal; border-radius: 0; }
.prose pre .lang-tag { position: absolute; top: 8px; left: 14px; font: 500 11px/16px var(--sans); color: var(--mu2); text-transform: uppercase; letter-spacing: .04em; }
.prose pre.has-lang code { padding-top: 34px; }
.copy-code { position: absolute; top: 6px; right: 6px; }
.table-wrap { overflow-x: auto; margin: 0 0 20px; border: 1px solid var(--ln); border-radius: var(--r-card); background: var(--pn); }

/* tabelas estilo Twenty: cabeçalho 40, linhas 44, bordas de 1 px, hover e2 */
.prose table { border-collapse: collapse; width: 100%; font-size: 13px; line-height: 20px; }
.prose th { text-align: left; font-weight: 500; color: var(--mu); background: var(--e2); height: 40px; white-space: nowrap; }
.prose th, .prose td { padding: 11px 12px; border-right: 1px solid var(--ln); border-bottom: 1px solid var(--ln); vertical-align: top; }
.prose th { padding-top: 0; padding-bottom: 0; vertical-align: middle; }
.prose th:last-child, .prose td:last-child { border-right: 0; }
.prose tr:last-child td { border-bottom: 0; }
.prose tbody tr:hover td { background: var(--e2); }
.prose td:first-child { font-weight: 500; }
.prose td code { white-space: nowrap; }
.prose td code, .prose th code { font-size: 12px; }
a.dead { color: inherit; pointer-events: none; }

/* realce de código (JSON), sóbrio: um destaque */
.tk-key { color: var(--ac-h); }
.tk-str { color: var(--sev-low-fg); }
.tk-num, .tk-lit { color: var(--fg); font-weight: 600; }
.tk-com { color: var(--mu2); font-style: italic; }

/* ===== callouts (nota / dica / aviso / crítico), neutros com ícone ===== */
.callout { display: flex; gap: 12px; margin: 0 0 20px; padding: 12px 16px; border: 1px solid var(--ln); border-radius: var(--r-card); background: var(--pn); box-shadow: var(--sh-1); font-size: 14px; line-height: 22px; color: var(--fg); }
.callout-ic { flex: none; width: 24px; height: 24px; border-radius: 50%; background: var(--acs); color: var(--ac); display: grid; place-items: center; margin-top: 0; }
.callout-ic svg { width: 14px; height: 14px; }
.callout-b { min-width: 0; flex: 1; }
.callout-b > :last-child { margin-bottom: 0; }
.callout-b p { margin: 0 0 8px; }
.callout-warning .callout-ic { background: var(--e3); color: var(--fg); }
.callout-warning { border-color: var(--ln2); }
.callout-critical { background: var(--crs); border-color: var(--cr-ln); }
.callout-critical .callout-ic { background: var(--sev-critical-bg); color: var(--sev-critical-fg); }

/* ===== badges de método HTTP, tingidos (mesma família dos badges de severidade) ===== */
.mth { display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: var(--r-pill); font: 600 11px/20px var(--sans); letter-spacing: .03em; text-transform: uppercase; white-space: nowrap; vertical-align: middle; flex: none; }
.mth-get { background: var(--acs); color: var(--ac-h); }
.mth-post { background: var(--sev-low-bg); color: var(--sev-low-fg); }
.mth-put, .mth-patch { background: var(--e3); color: var(--fg); }
.mth-delete { background: var(--sev-high-bg); color: var(--sev-high-fg); }
.toc .mth { height: 16px; padding: 0 6px; font-size: 9px; line-height: 16px; margin-right: 6px; }
.prose td .mth { margin-right: 6px; }

/* badges de severidade (para uso nas páginas) */
.sev { display: inline-flex; align-items: center; height: 22px; padding: 0 10px; border-radius: var(--r-pill); font-size: 12px; line-height: 20px; font-weight: 500; }
.sev-critical { background: var(--sev-critical-bg); color: var(--sev-critical-fg); }
.sev-high { background: var(--sev-high-bg); color: var(--sev-high-fg); }
.sev-low { background: var(--sev-low-bg); color: var(--sev-low-fg); }

/* ===== anterior / seguinte ===== */
.pn { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 48px 0 0; }
.pn a { display: block; padding: 12px 16px; border: 1px solid var(--ln); border-radius: var(--r-card); background: var(--pn); box-shadow: var(--sh-1); color: var(--fg); font-weight: 500; font-size: 14px; line-height: 20px; transition: border-color .12s; }
.pn a:hover { border-color: var(--ac); text-decoration: none; color: var(--fg); }
.pn small { display: block; color: var(--mu2); font-weight: 400; font-size: 12px; line-height: 16px; margin-bottom: 2px; }
.pn .next { text-align: right; grid-column: 2; }

.foot { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; margin: 40px 0 0; padding: 20px 0 32px; border-top: 1px solid var(--ln); font-size: 12px; color: var(--mu2); }
.foot > div { display: flex; align-items: center; gap: 8px; }
.foot img.logo { width: 18px; height: 18px; }
.foot-links { gap: 16px !important; flex-wrap: wrap; }
.foot-links a { color: var(--mu); }

/* ===== pesquisa ⌘K (igual ao CommandMenu da app) ===== */
.sm { position: fixed; inset: 0; z-index: 60; }
.sm[hidden] { display: none; }
.sm-bg { position: absolute; inset: 0; background: var(--ov); }
.sm-box { position: relative; width: min(600px, calc(100vw - 32px)); margin: 12vh auto 0; background: var(--pn); border: 1px solid var(--ln); border-radius: var(--r-card); box-shadow: var(--sh-pop); overflow: hidden; }
.sm-in { display: flex; align-items: center; gap: 8px; padding: 0 12px; border-bottom: 1px solid var(--ln); color: var(--mu2); }
.sm-in input { flex: 1; height: 48px; border: 0; outline: 0; background: none; color: var(--fg); font: 400 15px var(--sans); }
.sm-res { max-height: 56vh; overflow-y: auto; padding: 6px; }
.sm-g { font-size: 11px; font-weight: 500; color: var(--mu2); padding: 10px 8px 4px; }
.sm-r { display: block; padding: 7px 10px; border-radius: 8px; color: var(--fg); }
.sm-r:hover, .sm-r.on { background: var(--e3); text-decoration: none; color: var(--fg); }
.sm-r b { display: block; color: var(--fg); font-weight: 500; font-size: 13px; line-height: 20px; }
.sm-r b em { color: var(--mu2); font-style: normal; font-weight: 400; }
.sm-r span { display: block; font-size: 12px; line-height: 18px; color: var(--mu); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sm-r mark { background: none; color: var(--ac); font-weight: 600; }
.sm-empty { padding: 28px; text-align: center; color: var(--mu2); font-size: 13px; }
.sm-foot { display: flex; gap: 16px; padding: 8px 12px; border-top: 1px solid var(--ln); font-size: 12px; color: var(--mu2); background: var(--e2); }
.sm-foot kbd { margin-right: 3px; }

/* ===== home ===== */
.hm { padding: var(--top-h) 24px 0; max-width: 1176px; margin: 0 auto; }
.hero { padding: 48px 0 24px; }
.hero-in { max-width: 680px; }
.eyebrow { margin: 0 0 8px; font-size: 12px; line-height: 16px; font-weight: 600; color: var(--ac); letter-spacing: .04em; text-transform: uppercase; }
.hero h1 { font-size: 36px; line-height: 44px; letter-spacing: -.025em; margin: 0 0 12px; font-weight: 600; }
.hero-sub { font-size: 16px; line-height: 26px; color: var(--mu); margin: 0 0 24px; }
.hero-search { display: flex; align-items: center; gap: 8px; width: 100%; max-width: 480px; height: 40px; padding: 0 12px; border-radius: var(--r-btn); border: 1px solid var(--ln2); background: var(--pn); color: var(--mu2); box-shadow: var(--sh-1); }
.hero-search span { flex: 1; text-align: left; font-size: 14px; }
.hero-search:hover { background: var(--e2); }
.hero-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.hero-links a { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: var(--r-btn); border: 1px solid var(--ln2); background: var(--pn); color: var(--mu); font-size: 12px; font-weight: 500; box-shadow: var(--sh-1); }
.hero-links a:hover { background: var(--e2); color: var(--fg); text-decoration: none; }
.hm-sec { margin: 32px 0 0; }
.hm-sec h2 { font-size: 16px; line-height: 24px; font-weight: 600; margin: 0 0 12px; }
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.cards.big { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.card { display: flex; flex-direction: column; gap: 4px; padding: 16px; border: 1px solid var(--ln); border-radius: var(--r-card); background: var(--pn); box-shadow: var(--sh-1); color: var(--fg); transition: border-color .12s; }
.card:hover { border-color: var(--ac); text-decoration: none; color: var(--fg); }
.card .ic { width: 28px; height: 28px; border-radius: 50%; background: var(--acs); color: var(--ac); display: grid; place-items: center; margin-bottom: 8px; }
.card .ic svg { width: 15px; height: 15px; }
.card h3 { margin: 0; font-size: 15px; line-height: 22px; font-weight: 600; }
.card p { margin: 0; font-size: 13px; line-height: 20px; color: var(--mu); }
.card p code { font: 400 12px var(--mono); background: var(--e2); border: 1px solid var(--ln); border-radius: 6px; padding: 0 4px; }
.card .more { margin-top: auto; padding-top: 12px; font-size: 13px; font-weight: 500; color: var(--ac); }
.card .more::after { content: " \2192"; }
.card.feature { padding: 20px; }
.card.first { border-color: color-mix(in oklab, var(--ac) 35%, var(--ln)); background: linear-gradient(180deg, var(--acs), var(--pn) 70%); }
.news { border: 1px solid var(--ln); border-radius: var(--r-card); background: var(--pn); box-shadow: var(--sh-1); overflow: hidden; }
.news a { display: grid; grid-template-columns: 52px 220px minmax(0, 1fr); gap: 12px; align-items: center; min-height: 44px; padding: 8px 16px; border-top: 1px solid var(--ln); color: var(--mu); font-size: 13px; }
.news a:first-child { border-top: 0; }
.news a:hover { background: var(--e2); text-decoration: none; }
.news strong { color: var(--fg); font-weight: 500; }
.tag { display: inline-flex; align-items: center; justify-content: center; height: 20px; padding: 0 8px; border-radius: var(--r-pill); background: var(--acs); color: var(--ac-h); font-size: 11px; font-weight: 500; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips a { display: inline-flex; align-items: center; height: 28px; padding: 0 12px; border-radius: var(--r-pill); border: 1px solid var(--ln); background: var(--pn); color: var(--mu); font-size: 13px; font-weight: 500; }
.chips a:hover { background: var(--e2); color: var(--fg); text-decoration: none; }
.hm-foot { margin-top: 48px; }

/* ===== página "Como usar" ===== */
.hw-hero { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; margin: 0 0 24px; }
.video-ph, .media-ph { position: relative; display: grid; place-items: center; align-content: center; gap: 8px; width: 100%; aspect-ratio: 16 / 9; border: 1px dashed var(--ln2); border-radius: var(--r-card); background: var(--e2); color: var(--mu); text-align: center; padding: 16px; }
.video-ph .play { width: 48px; height: 48px; border-radius: 50%; background: var(--ac-solid); color: var(--on-ac); display: grid; place-items: center; box-shadow: var(--sh-1); }
.video-ph .play svg { width: 20px; height: 20px; fill: currentColor; stroke: none; margin-left: 2px; }
.video-ph figcaption, .media-ph figcaption, .media-ph span { font-size: 13px; line-height: 20px; color: var(--mu); }
.video-ph strong { color: var(--fg); font-weight: 600; font-size: 14px; }
figure.video-ph { margin: 0 0 0; }
.media-ph { aspect-ratio: 16 / 9; max-width: 460px; margin: 12px 0 0; padding: 8px; gap: 4px; }
.media-ph svg { width: 20px; height: 20px; color: var(--mu2); }
.path-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 8px 0 24px; }
.path-tab { text-align: left; display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; border: 1px solid var(--ln); border-radius: var(--r-card); background: var(--pn); box-shadow: var(--sh-1); }
.path-tab small { font-size: 11px; line-height: 16px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--mu2); }
.path-tab b { font-size: 15px; line-height: 22px; font-weight: 600; color: var(--fg); }
.path-tab span { font-size: 13px; line-height: 20px; color: var(--mu); }
.path-tab:hover { border-color: var(--ln2); }
.path-tab[aria-selected="true"] { border-color: var(--ac); background: var(--acs); }
.path-tab[aria-selected="true"] small { color: var(--ac-h); }
.js-tabs .path-panel[hidden] { display: none; }
.path-panel > h2 { font-size: 20px; line-height: 28px; margin: 8px 0 4px; font-weight: 600; border-top: 0; padding-top: 0; display: block; }
.path-panel > .path-intro { color: var(--mu); margin: 0 0 20px; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; counter-reset: s; }
.step { position: relative; display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 16px; padding: 16px; border: 1px solid var(--ln); border-radius: var(--r-card); background: var(--pn); box-shadow: var(--sh-1); }
.step:hover { border-color: color-mix(in oklab, var(--ac) 45%, var(--ln)); }
.step-n { width: 28px; height: 28px; border-radius: 50%; background: var(--ac-solid); color: var(--on-ac); display: grid; place-items: center; font-weight: 600; font-size: 13px; }
.step h3 { margin: 2px 0 2px; font-size: 15px; line-height: 22px; font-weight: 600; }
.step p { margin: 0; font-size: 14px; line-height: 22px; color: var(--mu); }
.step .btn { margin-top: 12px; }
.step-body { min-width: 0; }
.cols-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 0 0 20px; }
.can { padding: 16px; border: 1px solid var(--ln); border-radius: var(--r-card); background: var(--pn); box-shadow: var(--sh-1); }
.can h3 { margin: 0 0 8px; font-size: 14px; line-height: 20px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.can ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.can li { position: relative; padding-left: 20px; font-size: 14px; line-height: 22px; color: var(--mu); margin: 0; }
.can li::before { content: ""; position: absolute; left: 3px; top: 8px; width: 6px; height: 6px; border-radius: 50%; background: var(--ac); }
.can.no li::before { background: var(--mu2); }
.prompts { display: grid; gap: 8px; margin: 0 0 20px; }
.prompt { position: relative; padding: 12px 84px 12px 16px; border: 1px solid var(--ln); border-radius: var(--r-card); background: var(--pn); box-shadow: var(--sh-1); font-size: 14px; line-height: 22px; }
.prompt .copy-code { top: 10px; right: 10px; }
.sub-h { font-size: 16px; line-height: 24px; font-weight: 600; margin: 28px 0 8px; }

/* ===== adaptação ===== */
@media (max-width: 1180px) {
  .toc { display: none; }
  .layout { grid-template-columns: var(--side-w) minmax(0, 1fr); }
}
@media (max-width: 860px) {
  .burger { display: flex; }
  .top-link, .search-btn kbd, .brand .docs { display: none; }
  .search-btn { margin-left: 0; width: auto; flex: 1; }
  .layout { grid-template-columns: minmax(0, 1fr); }
  .side { position: fixed; inset: var(--top-h) 0 0 0; z-index: 30; width: min(320px, 86vw); height: auto; background: var(--bg); transform: translateX(-100%); transition: transform .18s ease-out; box-shadow: var(--sh-pop); }
  body.side-open .side { transform: none; }
  .side-tabs { display: grid; gap: 2px; padding-bottom: 8px; margin-bottom: 8px; border-bottom: 1px solid var(--ln); }
  .side-tabs a { padding: 4px 8px; border-radius: 6px; color: var(--mu); font-size: 13px; }
  .side-tabs a.on { background: var(--e3); color: var(--fg); font-weight: 500; }
  .main { padding: 24px 16px 0; }
  .doc h1 { font-size: 24px; line-height: 32px; }
  .doc-head { flex-direction: column; gap: 8px; }
  .cards, .cards.big, .cols-2, .path-tabs { grid-template-columns: 1fr; }
  .news a { grid-template-columns: 52px minmax(0, 1fr); }
  .news a span:last-child { grid-column: 2; }
  .hero h1 { font-size: 28px; line-height: 36px; }
  .pn { grid-template-columns: 1fr; }
  .pn .next { grid-column: 1; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }


/* ===== alternador de tema (mesmo desenho da primitiva ThemeToggle da app: botão só-ícone secundário + menu Sistema / Claro / Escuro) ===== */
.theme { position: relative; display: inline-flex; }
.theme-btn { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; padding: 0; border: 1px solid var(--ln2); border-radius: var(--r-btn); background: var(--pn); color: var(--mu); box-shadow: var(--sh-1); transition: background-color .12s, border-color .12s; }
.theme-btn:hover { background: var(--e2); color: var(--fg); }
.theme-btn .i-moon { display: none; }
html[data-theme="dark"] .theme-btn .i-sun { display: none; }
html[data-theme="dark"] .theme-btn .i-moon { display: block; }
.theme-btn[data-tip]:hover::after, .theme-btn[data-tip]:focus-visible::after { content: attr(data-tip); position: absolute; top: calc(100% + 6px); right: 0; background: var(--fg); color: var(--bg); font-size: 12px; line-height: 16px; padding: 4px 8px; border-radius: 6px; white-space: nowrap; pointer-events: none; z-index: 70; }
.theme.open .theme-btn::after { display: none; }
.theme-menu { display: none; position: absolute; top: calc(100% + 4px); right: 0; z-index: 70; width: 160px; padding: 4px; background: var(--pn); border: 1px solid var(--ln2); border-radius: var(--r-btn); box-shadow: var(--sh-pop); }
.theme.open .theme-menu { display: block; }
.theme-menu button { display: flex; align-items: center; gap: 8px; width: 100%; height: 30px; padding: 0 8px; border: 0; border-radius: 6px; background: transparent; color: var(--fg); font: 400 13px/1 var(--sans); text-align: left; }
.theme-menu button:hover, .theme-menu button:focus-visible { background: var(--e2); outline: 0; }
.theme-menu button[aria-checked="true"] { background: var(--e3); font-weight: 500; }
.theme-menu svg { color: var(--mu); }
.theme-menu button[aria-checked="true"] svg { color: var(--ac); }


/* ===== páginas "Em breve" (em-breve.json): conteúdo desfocado, inert e sem seleção, aviso centrado, sem JavaScript ===== */
.em-breve { position: relative; margin-top: 16px; max-height: 460px; overflow: hidden; border-radius: var(--r-card); }
.em-breve-corpo { filter: blur(7px); opacity: .6; user-select: none; -webkit-user-select: none; pointer-events: none; -webkit-mask-image: linear-gradient(black 45%, transparent); mask-image: linear-gradient(black 45%, transparent); }
.em-breve-aviso { position: absolute; top: 72px; left: 50%; transform: translateX(-50%); width: min(360px, calc(100% - 32px)); display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; padding: 20px 24px; background: var(--pn); border: 1px solid var(--ln); border-radius: var(--r-card); box-shadow: var(--sh-pop); }
.em-breve-aviso strong { display: inline-block; padding: 2px 12px; border-radius: var(--r-pill); background: var(--acs); color: var(--ac); font-size: 13px; line-height: 20px; font-weight: 600; letter-spacing: .02em; }
.em-breve-aviso span { color: var(--fg); font-size: 15px; line-height: 24px; }
body[data-em-breve] [data-copy-page] { display: none; }
body[data-em-breve] .toc { visibility: hidden; }

/* >>> diagramas e badges (scripts/diagramas.py) */
/* moldura dos diagramas: cartão do DS, raio 12, sem sombra */
.diagram { position: relative; margin: 0 0 24px; border: 1px solid var(--ln); border-radius: var(--r-card); background: var(--pn); overflow: hidden; }
.diagram-body { padding: 20px; overflow-x: auto; }
.diagram-svg { text-align: center; }
.diagram-body svg { display: block; width: 100%; height: auto; margin: 0 auto; max-width: 100%; fill: none; stroke: none; }
.prose .diagram pre.mermaid { margin: 0; padding: 0; border: 0; border-radius: 0; background: none; overflow: visible; font: 12.5px/20px var(--mono); color: var(--fg); white-space: pre; text-align: left; }
.prose .diagram pre.mermaid[data-processed] { font: inherit; white-space: normal; text-align: center; }
.diagram figcaption { padding: 10px 16px; border-top: 1px solid var(--ln); background: var(--bg); color: var(--mu); font-size: 12px; line-height: 16px; }

/* árvore hierárquica (componente próprio): tronco comum ortogonal, linhas de 1 px do DS, sem setas (é hierarquia, não fluxo) */
.tree { --tl: var(--ln2); --tg: 20px; display: block; width: max-content; margin: 0 auto; font-size: 14px; line-height: 20px; color: var(--fg); }
.tree ul { display: flex; justify-content: center; margin: 0; padding: var(--tg) 0 0; list-style: none; position: relative; }
.tree > ul { padding-top: 0; }
.tree li { display: flex; flex-direction: column; align-items: center; position: relative; margin: 0; padding: var(--tg) 6px 0; }
.tree > ul > li { padding-top: 0; }
.tree li::before, .tree li::after { content: ""; position: absolute; top: 0; height: 1px; background: var(--tl); width: calc(50% + .5px); }
.tree li::before { right: 50%; }
.tree li::after { left: 50%; }
.tree li:first-child::before, .tree li:last-child::after, .tree > ul > li::before, .tree > ul > li::after { display: none; }
.tree ul ul::before, .tree li > .tn::before { content: ""; position: absolute; left: calc(50% - .5px); width: 1px; height: var(--tg); background: var(--tl); }
.tree ul ul::before { top: 0; }
.tree li > .tn::before { top: calc(var(--tg) * -1); }
.tree > ul > li > .tn::before { display: none; }
.tree .tn { position: relative; display: block; box-sizing: border-box; min-width: 72px; max-width: 220px; padding: 9px 14px; text-align: center; background: var(--pn); border: 1px solid var(--tl); border-radius: 12px; overflow-wrap: break-word; }
.tree .tn-hl { background: var(--acs); border: 1.5px solid var(--brand); color: var(--ac); font-weight: 600; }
.tree .tn-grp { background: var(--e2); }
.tree ul ul > li:only-child { padding-left: 0; padding-right: 0; }

/* badges de severidade (todas as quatro) e etiqueta neutra */
.sev-medium { background: var(--sev-medium-bg); color: var(--sev-medium-fg); }
.prose td .sev { vertical-align: middle; white-space: nowrap; }
.callout-b .sev { margin: 0 2px; }
.tag-n { display: inline-flex; align-items: center; height: 22px; padding: 0 10px; border-radius: var(--r-pill); background: var(--e3); color: var(--fg); font-size: 12px; font-weight: 500; white-space: nowrap; }
.callout-b .tag-n { margin: 0 2px; }

/* ícones neutros no lugar dos emojis (traço 1.5, como o resto do site) */
.ico { width: 1em; height: 1em; vertical-align: -.14em; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.ico-ok { color: var(--sev-low-fg); }
.ico-no { color: var(--mu); }
.dot { display: inline-block; width: .55em; height: .55em; margin: 0 .15em; border-radius: 50%; background: var(--ac); vertical-align: .05em; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
/* <<< diagramas e badges */
