:root {
  --azul: #1769aa;
  --azul-esc: #123a63;
  --azul-claro: #eaf3fb;
  --texto: #142333;
  --texto2: #5e6e7e;
  --verde: #18794e;
  --laranja: #9a6700;
  --vermelho: #b42318;
  --borda: #d8e1e8;
  --borda-suave: #e7edf2;
  --fundo: #f4f7fa;
  --code-bg: #0b1724;
  --code-tx: #dce9f5;
}

html { scroll-padding-top: 104px; }
body { background: var(--fundo); color: var(--texto); }
button, a { -webkit-tap-highlight-color: transparent; }
a:focus-visible, button:focus-visible { outline: 3px solid #4ea3e3; outline-offset: 3px; }
.skip-link { position: fixed; top: 10px; left: 10px; z-index: 100; padding: 10px 14px; border-radius: 8px; background: #fff; color: var(--azul-esc); font-weight: 800; transform: translateY(-180%); }
.skip-link:focus { transform: translateY(0); }

.topo { background: #0d2f50; border-bottom: 1px solid rgba(255,255,255,.13); box-shadow: 0 8px 28px rgba(8,31,52,.12); }
.topo .in { max-width: 1400px; min-height: 82px; padding: 10px 24px; gap: 22px; }
.doc-brand { display: inline-flex; flex: 0 0 218px; width: 218px; height: 62px; align-items: center; }
.doc-brand img { display: block; width: 100%; height: 100%; object-fit: contain; object-position: left center; }
.doc-top-label { padding-left: 20px; border-left: 1px solid rgba(255,255,255,.19); color: #e5f2fb; font-family: Sora, Inter, sans-serif; font-size: 14px; font-weight: 700; white-space: nowrap; }
.doc-top-label span { margin-left: 5px; color: #b3d9f4; font-family: Inter, sans-serif; font-size: 11px; }
.doc-top-actions { display: flex; margin-left: auto; gap: 6px; align-items: center; }
.doc-top-actions a { display: inline-flex; min-height: 42px; padding: 0 12px; border: 1px solid transparent; border-radius: 8px; align-items: center; color: #eaf4fb; font-size: 12px; font-weight: 700; text-decoration: none; white-space: nowrap; }
.doc-top-actions a:hover, .doc-top-actions a:focus-visible { border-color: rgba(255,255,255,.25); background: rgba(255,255,255,.09); color: #fff; }
.doc-top-actions a:first-child { border-color: rgba(255,255,255,.25); background: rgba(255,255,255,.08); }
.menu-btn { display: none; min-height: 44px; padding: 0 12px; border: 1px solid rgba(255,255,255,.24); border-radius: 8px; align-items: center; gap: 8px; font: 700 13px Inter, sans-serif; }
.menu-btn__label { font-size: 12px; }

.wrap { max-width: 1400px; grid-template-columns: 250px minmax(0,1fr); gap: 26px; padding: 26px 24px 70px; }
nav.lado { top: 108px; max-height: calc(100vh - 126px); border: 1px solid var(--borda); border-radius: 12px; padding: 12px 8px; box-shadow: none; scrollbar-width: thin; }
.doc-nav-heading { padding: 7px 12px 12px; color: var(--azul-esc); font-family: Sora, Inter, sans-serif; font-size: 13px; font-weight: 700; }
nav.lado .grp { padding: 14px 12px 5px; color: #61768a; font-size: 10px; letter-spacing: .1em; }
nav.lado a { margin: 1px 4px; padding: 8px 10px; border-radius: 7px; color: #34495d; font-size: 12px; line-height: 1.35; }
nav.lado a:hover { background: #f1f6fa; color: var(--azul-esc); }
nav.lado a.ativo { background: var(--azul-claro); color: var(--azul-esc); box-shadow: inset 3px 0 0 var(--azul); font-weight: 700; }
main { width: 100%; }

.hero { padding: 28px 32px; border: 1px solid var(--borda); border-radius: 12px; background: #fff; box-shadow: none; }
.hero:after { display: none; }
.hero h1 { position: relative; z-index: 1; max-width: 780px; color: var(--azul-esc); font-family: Sora, Inter, sans-serif; font-size: clamp(24px,2.7vw,31px); letter-spacing: -.035em; }
.hero p { max-width: 800px; color: var(--texto2); font-size: 14px; line-height: 1.65; }
.chips { margin-top: 16px; gap: 7px; }
.chip { padding: 5px 10px; border: 1px solid var(--borda); border-radius: 7px; background: #f5f9fc; color: var(--azul-esc); font-size: 11px; letter-spacing: .01em; }

section { border-color: var(--borda); border-radius: 12px; box-shadow: none; padding: 28px 32px; }
h2 { color: var(--texto); font-family: Sora, Inter, sans-serif; font-size: 20px; letter-spacing: -.02em; }
h2 .n { flex: none; width: 30px; height: 30px; border-radius: 8px; color: var(--azul); font-family: Inter, sans-serif; }
h3 { color: var(--azul-esc); }
main p, main li { line-height: 1.68; }
main a { text-underline-offset: 2px; }
:not(pre)>code { color: #155581; }
.tbl { border-color: var(--borda); }
table { min-width: 520px; }
th { color: #4d6172; }
td:first-child { white-space: normal; }
.ep { border-color: var(--borda); background: #f7fafc; }
.m.get { background: var(--azul); }
.m.post { background: var(--verde); }
.nota.info { border-color: #bad9ee; background: #eef6fc; }
.nota.alerta { border-color: #e9cb85; background: #fff8e8; }
.passo { border-color: var(--borda); background: #f9fbfd; }
.passo .num { color: var(--azul); font-family: Sora, Inter, sans-serif; }
pre { border-radius: 9px; }
.copy { min-height: 32px; font-weight: 700; }
.copy:focus-visible { outline-offset: 2px; }
.abas button { min-height: 42px; border-radius: 8px 8px 0 0; font-family: Inter, sans-serif; }
.st.ok { color: #12623f; }
.st.er { color: var(--vermelho); }
.st.av { color: var(--laranja); }
footer { padding: 10px 0 20px; }

@media (max-width: 1090px) {
  .doc-top-label { display: none; }
}
@media (max-width: 900px) {
  html { scroll-padding-top: calc(var(--doc-topbar-height, 76px) + 16px); }
  .topo .in { min-height: 76px; padding: 8px 16px; }
  .doc-brand { flex-basis: 190px; width: 190px; height: 56px; }
  .menu-btn { display: inline-flex; order: 2; margin-left: auto; }
  .doc-top-actions { order: 1; }
  .wrap { display: block; padding: 20px 16px 50px; }
  nav.lado { display: none; position: fixed; top: calc(var(--doc-topbar-height, 76px) + 6px); right: 16px; bottom: 12px; left: 16px; z-index: 35; max-height: calc(100dvh - var(--doc-topbar-height, 76px) - 18px); overflow: auto; box-shadow: 0 20px 45px rgba(8,31,52,.25); }
  nav.lado.aberto { display: block; }
  section { padding: 24px; }
  .hero { padding: 30px; }
}
@media (max-width: 660px) {
  .topo .in { gap: 7px 10px; padding: 8px 12px 10px; flex-wrap: wrap; }
  .doc-brand { flex: 0 0 170px; width: 170px; height: 48px; }
  .menu-btn { order: 1; min-width: 44px; min-height: 44px; justify-content: center; background: rgba(255,255,255,.07); }
  .doc-top-actions { order: 2; flex: 0 0 100%; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); width: 100%; margin-left: 0; padding-top: 8px; border-top: 1px solid rgba(255,255,255,.15); gap: 6px; }
  .doc-top-actions a { min-width: 0; min-height: 42px; padding: 5px 3px; justify-content: center; border-color: rgba(255,255,255,.19); background: rgba(255,255,255,.055); font-size: 11px; line-height: 1.2; text-align: center; white-space: normal; }
  .doc-top-actions a:first-child { border-color: rgba(105,190,247,.48); background: rgba(34,145,219,.24); }
  .wrap { padding: 14px 12px 44px; }
  nav.lado { right: 12px; left: 12px; }
  .hero { padding: 23px 20px; margin-bottom: 14px; }
  .hero h1 { font-size: clamp(24px,7vw,30px); }
  .hero p { font-size: 13px; }
  .chip { font-size: 10px; }
  section { padding: 22px 18px; margin-bottom: 14px; }
  h2 { font-size: 17px; align-items: flex-start; }
  .passos { grid-template-columns: 1fr; }
  .ep .url { font-size: 11px; }
  pre { padding: 50px 14px 16px; font-size: 11px; }
  .copy { top: 9px; right: 9px; }
  .abas { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: thin; }
  .abas button { flex: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
@media print {
  .skip-link, .doc-top-actions { display: none !important; }
  .hero { color: #000; background: #fff; border-color: #777; }
  .hero h1, .hero p { color: #000; }
  .chip { color: #000; background: #fff; border-color: #777; }
  section { break-inside: auto; }
}
