@charset "UTF-8";
/* ==========================================================================
   Moclick Bridge — Design System da Documentação
   Identidade visual alinhada a bridge.moclick.com.br
   Tema escuro por padrão + tema claro por toggle. Padrão docs preservado.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. TOKENS
   -------------------------------------------------------------------------- */
:root {
  /* Marca — extraída da identidade do site institucional */
  --brand-500: #9b00ff;
  --brand-400: #ae4dff;
  --brand-300: #c48cff;
  --brand-200: #ddbcff;
  --brand-600: #7c00cc;
  --brand-700: #5c0099;

  /* Tipografia */
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, "Noto Sans", "Noto Sans SC", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", SFMono-Regular, Menlo,
    Monaco, Consolas, "Liberation Mono", monospace;

  --step--1: 0.8125rem;
  --step-0: 0.9375rem;
  --step-1: 1.0625rem;
  --step-2: 1.375rem;
  --step-3: 1.75rem;
  --step-4: 2.5rem;

  /* Métrica */
  --header-h: 60px;
  --sidebar-w: 274px;
  --toc-w: 216px;
  --content-max: 46rem;
  --radius: 10px;
  --radius-sm: 6px;

  --ease: cubic-bezier(0.4, 0, 0.2, 1);

  color-scheme: dark;
}

/* Tema escuro (padrão) */
:root,
[data-theme="dark"] {
  --bg: #050505;
  --bg-header: rgba(8, 5, 12, 0.86);
  --surface: #0d0817;
  --surface-2: #130c22;
  --surface-3: #1a1030;
  --border: #241a35;
  --border-soft: #1a1428;
  --border-strong: #35264d;

  --text: #f5f3f8;
  --text-2: #b4adc0;
  --text-3: #837b91;

  --link: #c48cff;
  --link-hover: #ddbcff;
  --accent: var(--brand-500);
  --accent-quiet: rgba(155, 0, 255, 0.14);
  --accent-line: rgba(155, 0, 255, 0.42);
  --on-accent: #ffffff;

  --code-bg: #0b0714;
  --code-border: #221933;
  --code-text: #e4dff0;
  --inline-code-bg: rgba(155, 0, 255, 0.1);
  --inline-code-text: #d3aeff;

  --tok-comment: #6f6786;
  --tok-string: #b7f0c8;
  --tok-keyword: #c48cff;
  --tok-tag: #7fb3ff;
  --tok-attr: #9ddcf0;
  --tok-number: #ffc98a;
  --tok-slug: #ffd166;

  --ok: #4ade80;
  --ok-bg: rgba(74, 222, 128, 0.09);
  --warn: #fbbf24;
  --warn-bg: rgba(251, 191, 36, 0.09);
  --danger: #fb7185;
  --danger-bg: rgba(251, 113, 133, 0.09);

  --shadow: 0 1px 2px rgba(0, 0, 0, 0.6), 0 8px 32px rgba(0, 0, 0, 0.45);
  --glow: 0 0 0 1px rgba(155, 0, 255, 0.32), 0 6px 26px rgba(155, 0, 255, 0.24);
  --hero-wash: radial-gradient(
    118% 82% at 4% -14%,
    rgba(155, 0, 255, 0.2) 0%,
    rgba(155, 0, 255, 0.05) 42%,
    transparent 72%
  );
}

/* Tema claro */
[data-theme="light"] {
  color-scheme: light;

  --bg: #ffffff;
  --bg-header: rgba(255, 255, 255, 0.88);
  --surface: #faf9fc;
  --surface-2: #f4f2f8;
  --surface-3: #ece8f4;
  --border: #e4e0ec;
  --border-soft: #eeebf4;
  --border-strong: #d3cce0;

  --text: #14101c;
  --text-2: #514a60;
  --text-3: #786f88;

  --link: #7c00cc;
  --link-hover: #5c0099;
  --accent: #7c00cc;
  --accent-quiet: rgba(124, 0, 204, 0.08);
  --accent-line: rgba(124, 0, 204, 0.3);
  --on-accent: #ffffff;

  --code-bg: #17121f;
  --code-border: #17121f;
  --code-text: #e8e3f2;
  --inline-code-bg: rgba(124, 0, 204, 0.08);
  --inline-code-text: #6b00b0;

  --tok-comment: #8f86a3;
  --tok-string: #a5e8bb;
  --tok-keyword: #c9a0ff;
  --tok-tag: #8ec0ff;
  --tok-attr: #a5e0f2;
  --tok-number: #ffd0a0;
  --tok-slug: #ffd166;

  --ok: #16794a;
  --ok-bg: rgba(22, 121, 74, 0.07);
  --warn: #92500a;
  --warn-bg: rgba(146, 80, 10, 0.07);
  --danger: #b3243c;
  --danger-bg: rgba(179, 36, 60, 0.06);

  --shadow: 0 1px 2px rgba(20, 16, 28, 0.06), 0 8px 28px rgba(20, 16, 28, 0.07);
  --glow: 0 0 0 1px rgba(124, 0, 204, 0.18), 0 6px 22px rgba(124, 0, 204, 0.14);
  --hero-wash: radial-gradient(
    118% 82% at 4% -14%,
    rgba(124, 0, 204, 0.09) 0%,
    rgba(124, 0, 204, 0.03) 42%,
    transparent 72%
  );
}

/* --------------------------------------------------------------------------
   2. RESET
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}
* {
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 20px);
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  font-family: var(--font-sans);
  font-size: var(--step-0);
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "cv11", "ss01";
  overflow-wrap: break-word;
}

img,
svg {
  display: block;
  max-width: 100%;
}
button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}
input,
select {
  font: inherit;
}

:focus-visible {
  outline: 2px solid var(--brand-400);
  outline-offset: 2px;
  border-radius: 3px;
}

::selection {
  background: var(--accent-quiet);
  color: var(--text);
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 2000;
  padding: 10px 16px;
  font-size: var(--step--1);
  font-weight: 600;
  color: var(--on-accent);
  background: var(--accent);
  border-radius: var(--radius-sm);
  transform: translateY(-160%);
  transition: transform 0.18s var(--ease);
}
.skip-link:focus {
  transform: translateY(0);
}

/* --------------------------------------------------------------------------
   3. HEADER
   -------------------------------------------------------------------------- */
.header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 900;
  display: flex;
  align-items: center;
  gap: 18px;
  height: var(--header-h);
  padding: 0 20px;
  background: var(--bg-header);
  border-bottom: 1px solid var(--border);
  backdrop-filter: saturate(150%) blur(14px);
  -webkit-backdrop-filter: saturate(150%) blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  font-size: var(--step-0);
  font-weight: 650;
  letter-spacing: -0.015em;
  color: var(--text);
  text-decoration: none;
}
.brand:hover {
  text-decoration: none;
}
.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  font-size: 13px;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(145deg, var(--brand-500), var(--brand-700));
  border-radius: 7px;
  box-shadow: 0 0 0 1px rgba(155, 0, 255, 0.45), 0 3px 12px rgba(155, 0, 255, 0.3);
}
.brand-pill {
  padding: 2px 9px 3px;
  font-size: var(--step--1);
  font-weight: 650;
  color: #fff;
  background: linear-gradient(135deg, var(--brand-500), var(--brand-400));
  border-radius: 999px;
}

.header-nav {
  display: flex;
  gap: 4px;
  margin-left: 10px;
}
.header-nav a {
  padding: 6px 11px;
  font-size: var(--step--1);
  font-weight: 500;
  color: var(--text-2);
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: color 0.15s var(--ease), background 0.15s var(--ease);
}
.header-nav a:hover {
  color: var(--text);
  background: var(--surface-2);
  text-decoration: none;
}
.header-nav a[aria-current="page"] {
  color: var(--link);
  background: var(--accent-quiet);
}

.header-tools {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.search-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 190px;
  padding: 6px 9px;
  font-size: var(--step--1);
  color: var(--text-3);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: border-color 0.15s var(--ease), color 0.15s var(--ease);
}
.search-trigger:hover {
  color: var(--text-2);
  border-color: var(--border-strong);
}
.search-trigger kbd {
  margin-left: auto;
  padding: 1px 5px;
  font-family: var(--font-sans);
  font-size: 11px;
  color: var(--text-3);
  background: var(--surface-3);
  border: 1px solid var(--border);
  border-radius: 4px;
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  color: var(--text-2);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: color 0.15s var(--ease), border-color 0.15s var(--ease);
}
.icon-btn:hover {
  color: var(--text);
  border-color: var(--border-strong);
}
.icon-btn svg {
  width: 16px;
  height: 16px;
}
[data-theme="dark"] .icon-sun,
[data-theme="light"] .icon-moon {
  display: none;
}

.lang {
  position: relative;
}
.lang-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 10px;
  font-size: var(--step--1);
  font-weight: 550;
  color: var(--text-2);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: color 0.15s var(--ease), border-color 0.15s var(--ease);
}
.lang-btn:hover {
  color: var(--text);
  border-color: var(--border-strong);
}
.lang-btn svg {
  width: 14px;
  height: 14px;
  opacity: 0.75;
}
.lang-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 50;
  min-width: 168px;
  padding: 5px;
  list-style: none;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.lang-menu[hidden] {
  display: none;
}
.lang-menu a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 10px;
  font-size: var(--step--1);
  color: var(--text-2);
  text-decoration: none;
  border-radius: var(--radius-sm);
}
.lang-menu a:hover {
  color: var(--text);
  background: var(--surface-2);
  text-decoration: none;
}
.lang-menu a[aria-current="true"] {
  color: var(--link);
  background: var(--accent-quiet);
}
.lang-menu .lang-native {
  color: var(--text-3);
  font-size: 12px;
}

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  place-content: center;
  width: 36px;
  height: 36px;
  padding: 8px;
  margin-left: -6px;
  border-radius: var(--radius-sm);
}
.menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.22s var(--ease), opacity 0.22s var(--ease);
}
.menu-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}
.menu-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}
.menu-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* --------------------------------------------------------------------------
   4. LAYOUT
   -------------------------------------------------------------------------- */
.layout {
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr) var(--toc-w);
  max-width: 1580px;
  margin: 0 auto;
  padding-top: var(--header-h);
}

/* Sidebar de navegação */
.sidebar {
  position: sticky;
  top: var(--header-h);
  align-self: start;
  height: calc(100vh - var(--header-h));
  padding: 26px 14px 60px 20px;
  overflow-y: auto;
  border-right: 1px solid var(--border-soft);
  scrollbar-width: thin;
}
.sidebar::-webkit-scrollbar {
  width: 8px;
}
.sidebar::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}

.nav-group + .nav-group {
  margin-top: 26px;
}
.nav-title {
  padding: 0 10px;
  margin-bottom: 8px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-3);
}
.nav-list {
  list-style: none;
}
.nav-list a {
  display: block;
  padding: 6px 10px;
  font-size: var(--step--1);
  color: var(--text-2);
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: color 0.14s var(--ease), background 0.14s var(--ease);
}
.nav-list a:hover {
  color: var(--text);
  background: var(--surface-2);
  text-decoration: none;
}
.nav-list a[aria-current="page"] {
  font-weight: 600;
  color: var(--link);
  background: var(--accent-quiet);
  box-shadow: inset 2px 0 0 var(--accent);
}
.nav-badge {
  display: inline-block;
  padding: 1px 6px;
  margin-left: 6px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--link);
  background: var(--accent-quiet);
  border: 1px solid var(--accent-line);
  border-radius: 999px;
  vertical-align: 1px;
}

/* Conteúdo */
.main {
  min-width: 0;
  padding: 40px 52px 96px;
}
.prose {
  max-width: var(--content-max);
}

/* TOC */
.toc {
  position: sticky;
  top: var(--header-h);
  align-self: start;
  height: calc(100vh - var(--header-h));
  padding: 40px 20px 60px 8px;
  overflow-y: auto;
  scrollbar-width: thin;
}
.toc-title {
  margin-bottom: 10px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-3);
}
.toc-list {
  list-style: none;
  border-left: 1px solid var(--border);
}
.toc-list a {
  display: block;
  padding: 4px 0 4px 12px;
  margin-left: -1px;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--text-3);
  text-decoration: none;
  border-left: 2px solid transparent;
  transition: color 0.14s var(--ease), border-color 0.14s var(--ease);
}
.toc-list a:hover {
  color: var(--text-2);
  text-decoration: none;
}
.toc-list a.is-active {
  color: var(--link);
  border-left-color: var(--accent);
}
.toc-list .toc-h3 a {
  padding-left: 24px;
  font-size: 12px;
}

/* --------------------------------------------------------------------------
   5. TIPOGRAFIA DO CONTEÚDO
   -------------------------------------------------------------------------- */
.page-head {
  position: relative;
  padding-bottom: 26px;
  margin-bottom: 34px;
  border-bottom: 1px solid var(--border-soft);
}
.page-head::before {
  content: "";
  position: absolute;
  inset: -40px -80px auto -80px;
  height: 300px;
  background: var(--hero-wash);
  pointer-events: none;
  z-index: -1;
}
.eyebrow {
  display: inline-block;
  margin-bottom: 12px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--link);
}
.lede {
  margin-top: 14px;
  font-size: var(--step-1);
  line-height: 1.65;
  color: var(--text-2);
}

h1 {
  font-size: var(--step-4);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.03em;
}
h1 em {
  font-style: normal;
  background: linear-gradient(100deg, var(--brand-400), var(--brand-300));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
h2 {
  margin-top: 56px;
  margin-bottom: 16px;
  font-size: var(--step-3);
  font-weight: 650;
  line-height: 1.25;
  letter-spacing: -0.02em;
  scroll-margin-top: calc(var(--header-h) + 24px);
}
h3 {
  margin-top: 36px;
  margin-bottom: 12px;
  font-size: var(--step-2);
  font-weight: 620;
  line-height: 1.3;
  letter-spacing: -0.015em;
  scroll-margin-top: calc(var(--header-h) + 24px);
}
h4 {
  margin-top: 26px;
  margin-bottom: 8px;
  font-size: var(--step-1);
  font-weight: 620;
}
h2 + h3,
h3 + h4 {
  margin-top: 20px;
}

.prose p {
  margin-bottom: 18px;
  color: var(--text-2);
}
.prose > p:first-of-type {
  margin-top: 0;
}
.prose strong {
  font-weight: 620;
  color: var(--text);
}

.prose ul,
.prose ol {
  margin: 0 0 18px;
  padding-left: 22px;
  color: var(--text-2);
}
.prose li {
  margin-bottom: 8px;
}
.prose li > ul,
.prose li > ol {
  margin: 8px 0 0;
}
.prose ul::marker,
.prose li::marker {
  color: var(--text-3);
}

a {
  color: var(--link);
  text-decoration-color: var(--accent-line);
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
  transition: color 0.14s var(--ease);
}
a:hover {
  color: var(--link-hover);
  text-decoration-color: currentColor;
}

hr {
  height: 1px;
  margin: 44px 0;
  background: var(--border);
  border: 0;
}

.anchor {
  margin-left: 8px;
  font-weight: 400;
  color: var(--text-3);
  text-decoration: none;
  opacity: 0;
  transition: opacity 0.14s var(--ease);
}
h2:hover .anchor,
h3:hover .anchor,
.anchor:focus {
  opacity: 1;
}

/* --------------------------------------------------------------------------
   6. CÓDIGO
   -------------------------------------------------------------------------- */
code {
  font-family: var(--font-mono);
  font-size: 0.875em;
  font-variant-ligatures: none;
}
.prose :not(pre) > code {
  padding: 0.14em 0.4em;
  color: var(--inline-code-text);
  background: var(--inline-code-bg);
  border-radius: 4px;
  white-space: nowrap;
}

.code {
  position: relative;
  margin: 22px 0;
  background: var(--code-bg);
  border: 1px solid var(--code-border);
  border-radius: var(--radius);
  overflow: hidden;
}
.code-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #8d84a3;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}
.code-file {
  margin-left: auto;
  font-family: var(--font-mono);
  text-transform: none;
  letter-spacing: 0;
  color: #7d7493;
}
.code pre {
  padding: 16px 18px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.68;
  color: var(--code-text);
  tab-size: 2;
}
.code pre::-webkit-scrollbar {
  height: 9px;
}
.code pre::-webkit-scrollbar-thumb {
  background: #2c2340;
  border-radius: 5px;
}

.copy {
  position: absolute;
  top: 7px;
  right: 8px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 8px;
  font-size: 11.5px;
  font-weight: 600;
  color: #a79dbd;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 5px;
  opacity: 0;
  transition: opacity 0.15s var(--ease), color 0.15s var(--ease);
}
.code:hover .copy,
.copy:focus-visible {
  opacity: 1;
}
.copy:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.11);
}
.copy.is-done {
  color: var(--ok);
  border-color: color-mix(in srgb, var(--ok) 40%, transparent);
}
.code-head + pre .copy,
.code:has(.code-head) .copy {
  top: 6px;
}

/* Tokens */
.tok-c {
  color: var(--tok-comment);
  font-style: italic;
}
.tok-s {
  color: var(--tok-string);
}
.tok-k {
  color: var(--tok-keyword);
}
.tok-t {
  color: var(--tok-tag);
}
.tok-a {
  color: var(--tok-attr);
}
.tok-n {
  color: var(--tok-number);
}
.tok-slug {
  color: var(--tok-slug);
  font-weight: 700;
}

/* --------------------------------------------------------------------------
   7. CALLOUTS
   -------------------------------------------------------------------------- */
/* Layout por padding + ícone posicionado, deliberadamente NÃO por grid de duas
   colunas: em WordPress o wpautop reescreve o HTML e altera a contagem de
   filhos, o que num grid empurraria o texto para a coluna estreita do ícone e
   quebraria em uma letra por linha. Assim o layout não depende de quantos
   filhos existem. */
.callout {
  position: relative;
  padding: 15px 17px 15px 46px;
  margin: 22px 0;
  font-size: 14.5px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm);
}
.callout > :first-child {
  margin-top: 0;
}
.callout > :last-child {
  margin-bottom: 0;
}
/* Parágrafos vazios que o wpautop insere entre elementos. */
.callout > p:empty,
.callout div > p:empty {
  display: none;
}
.callout p {
  margin: 0;
  color: var(--text-2);
}
.callout p + p,
.callout p + div,
.callout div + p {
  margin-top: 10px;
}
.callout ul,
.callout ol {
  margin: 10px 0 0;
  font-size: inherit;
}
.callout li:last-child {
  margin-bottom: 0;
}
.callout-icon {
  position: absolute;
  top: 15px;
  left: 17px;
  display: grid;
  place-items: center;
  width: 20px;
  height: 22px;
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
  color: var(--accent);
}
/* Se o wpautop envolver o ícone em <p>, o parágrafo assume a posição e o span
   volta a ser inline dentro dele — sem isso o <p> ocuparia uma linha própria. */
.callout > p:has(> .callout-icon:only-child) {
  position: absolute;
  top: 15px;
  left: 17px;
  width: 20px;
  margin: 0;
}
.callout > p > .callout-icon:only-child {
  position: static;
  top: auto;
  left: auto;
}
.callout-title {
  display: block;
  margin-bottom: 5px;
  font-weight: 650;
  color: var(--text);
}

.callout--warn {
  border-left-color: var(--warn);
  background: var(--warn-bg);
}
.callout--warn .callout-icon {
  color: var(--warn);
}
.callout--danger {
  border-left-color: var(--danger);
  background: var(--danger-bg);
}
.callout--danger .callout-icon {
  color: var(--danger);
}
.callout--ok {
  border-left-color: var(--ok);
  background: var(--ok-bg);
}
.callout--ok .callout-icon {
  color: var(--ok);
}

/* --------------------------------------------------------------------------
   8. TABELAS
   -------------------------------------------------------------------------- */
.table-wrap {
  margin: 22px 0;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}
thead th {
  padding: 10px 14px;
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-align: left;
  white-space: nowrap;
  color: var(--text-3);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
tbody td {
  padding: 11px 14px;
  color: var(--text-2);
  border-bottom: 1px solid var(--border-soft);
  vertical-align: top;
}
tbody tr:last-child td {
  border-bottom: 0;
}
tbody tr:hover td {
  background: var(--surface);
}
tbody td:first-child {
  color: var(--text);
  font-weight: 500;
}
td code,
th code {
  white-space: nowrap;
}

.req {
  display: inline-block;
  padding: 1px 7px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  border-radius: 999px;
}
.req--yes {
  color: var(--danger);
  background: var(--danger-bg);
  border: 1px solid color-mix(in srgb, var(--danger) 32%, transparent);
}
.req--no {
  color: var(--text-3);
  background: var(--surface-2);
  border: 1px solid var(--border);
}
.req--rec {
  color: var(--warn);
  background: var(--warn-bg);
  border: 1px solid color-mix(in srgb, var(--warn) 32%, transparent);
}

/* --------------------------------------------------------------------------
   9. ENDPOINT
   -------------------------------------------------------------------------- */
.endpoint {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 12px 14px;
  margin: 20px 0 14px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow-x: auto;
}
.method {
  flex-shrink: 0;
  padding: 3px 8px;
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.04em;
  color: var(--on-accent);
  background: var(--accent);
  border-radius: 4px;
}
.method--get {
  background: #2f7fd4;
}
.method--post {
  background: #1f8b5f;
}
.method--both {
  background: var(--accent);
}
.endpoint-auth {
  flex-shrink: 0;
  margin-left: auto;
  padding: 2px 8px;
  font-family: var(--font-sans);
  font-size: 10.5px;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-radius: 999px;
  color: var(--warn);
  background: var(--warn-bg);
  border: 1px solid color-mix(in srgb, var(--warn) 30%, transparent);
}
.endpoint-auth--public {
  color: var(--text-3);
  background: var(--surface-2);
  border-color: var(--border);
}

/* --------------------------------------------------------------------------
   10. CARDS E GRIDS
   -------------------------------------------------------------------------- */
.cards {
  display: grid;
  gap: 12px;
  margin: 24px 0;
}
.cards--2 {
  grid-template-columns: repeat(auto-fit, minmax(224px, 1fr));
}
.cards--3 {
  grid-template-columns: repeat(auto-fit, minmax(178px, 1fr));
}

.card {
  display: block;
  padding: 17px 18px;
  color: inherit;
  text-decoration: none;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.16s var(--ease), transform 0.16s var(--ease),
    box-shadow 0.16s var(--ease);
}
a.card:hover {
  text-decoration: none;
  transform: translateY(-1px);
  border-color: var(--accent-line);
  box-shadow: var(--glow);
}
.card h3,
.card h4 {
  margin: 0 0 6px;
  font-size: var(--step-0);
  font-weight: 620;
  color: var(--text);
}
.card p {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--text-2);
}
.card-kicker {
  display: block;
  margin-bottom: 8px;
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--link);
}
.card-num {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  margin-bottom: 11px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--link);
  background: var(--accent-quiet);
  border: 1px solid var(--accent-line);
  border-radius: 8px;
}

/* Lista de próximos passos */
.next {
  display: grid;
  gap: 10px;
  margin: 26px 0 0;
  padding: 0;
  list-style: none;
}
.next a {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 13px 15px;
  color: var(--text);
  text-decoration: none;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: border-color 0.16s var(--ease), background 0.16s var(--ease);
}
.next a:hover {
  text-decoration: none;
  border-color: var(--accent-line);
  background: var(--surface-2);
}
.next strong {
  font-weight: 600;
}
.next span {
  font-size: 13px;
  color: var(--text-3);
}
.next a::after {
  content: "→";
  margin-left: auto;
  color: var(--text-3);
}

/* Checklist */
.checklist {
  margin: 20px 0;
  padding: 0;
  list-style: none;
}
.checklist li {
  position: relative;
  padding: 7px 0 7px 30px;
  margin: 0;
  color: var(--text-2);
  border-bottom: 1px solid var(--border-soft);
}
.checklist li:last-child {
  border-bottom: 0;
}
.checklist li::before {
  content: "";
  position: absolute;
  top: 13px;
  left: 2px;
  width: 15px;
  height: 15px;
  background: var(--surface-2);
  border: 1.5px solid var(--border-strong);
  border-radius: 4px;
}

/* Definições */
.dl {
  margin: 20px 0;
  padding: 18px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.dl dt {
  font-weight: 650;
  color: var(--text);
}
.dl dt + dd {
  margin: 4px 0 0;
}
.dl dd {
  color: var(--text-2);
  font-size: 14px;
}
.dl dd + dt {
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px solid var(--border-soft);
}

/* FAQ */
.faq-item {
  padding: 18px 0;
  border-bottom: 1px solid var(--border-soft);
}
.faq-item:last-of-type {
  border-bottom: 0;
}
.faq-q {
  margin-bottom: 8px;
  font-size: var(--step-1);
  font-weight: 620;
  color: var(--text);
}
.faq-a > :last-child {
  margin-bottom: 0;
}

/* Fluxo numerado */
.steps {
  counter-reset: step;
  margin: 24px 0;
  padding: 0;
  list-style: none;
}
.steps > li {
  position: relative;
  padding: 0 0 22px 38px;
  margin: 0;
  border-left: 1px solid var(--border);
}
.steps > li:last-child {
  padding-bottom: 0;
  border-left-color: transparent;
}
.steps > li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  top: -2px;
  left: -13px;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  font-size: 12px;
  font-weight: 700;
  color: var(--link);
  background: var(--bg);
  border: 1px solid var(--accent-line);
  border-radius: 50%;
}
.steps h4 {
  margin: 0 0 5px;
  font-size: var(--step-0);
}
.steps p {
  margin: 0;
  font-size: 14px;
}
.steps > li > :last-child {
  margin-bottom: 0;
}

/* Version badge */
.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px;
  font-size: 12px;
  font-weight: 550;
  color: var(--text-2);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
}
.badge strong {
  color: var(--text);
  font-weight: 650;
}
.badge--accent {
  color: var(--link);
  background: var(--accent-quiet);
  border-color: var(--accent-line);
}

/* --------------------------------------------------------------------------
   11. TABS
   -------------------------------------------------------------------------- */
.tabs {
  margin: 22px 0;
}
.tablist {
  display: flex;
  gap: 2px;
  overflow-x: auto;
  border-bottom: 1px solid var(--border);
}
.tablist button {
  flex-shrink: 0;
  padding: 8px 13px;
  font-size: 13.5px;
  font-weight: 550;
  color: var(--text-3);
  border-bottom: 2px solid transparent;
  transition: color 0.14s var(--ease), border-color 0.14s var(--ease);
}
.tablist button:hover {
  color: var(--text-2);
}
.tablist button[aria-selected="true"] {
  color: var(--link);
  border-bottom-color: var(--accent);
}
.tabpanel[hidden] {
  display: none;
}
.tabpanel > :first-child {
  margin-top: 16px;
}

/* --------------------------------------------------------------------------
   12. BUSCA
   -------------------------------------------------------------------------- */
.search-dialog {
  position: fixed;
  inset: 0;
  z-index: 1500;
  display: grid;
  place-items: start center;
  padding: 12vh 16px 16px;
  background: rgba(3, 2, 6, 0.72);
  backdrop-filter: blur(3px);
}
.search-dialog[hidden] {
  display: none;
}
.search-panel {
  width: 100%;
  max-width: 590px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.search-panel input {
  width: 100%;
  padding: 15px 18px;
  font-size: var(--step-1);
  color: var(--text);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--border);
}
.search-panel input::placeholder {
  color: var(--text-3);
}
.search-panel input:focus {
  outline: 0;
}
.search-results {
  max-height: 56vh;
  overflow-y: auto;
  list-style: none;
}
.search-results li + li {
  border-top: 1px solid var(--border-soft);
}
.search-results a {
  display: block;
  padding: 11px 18px;
  color: var(--text);
  text-decoration: none;
}
.search-results a:hover,
.search-results a.is-active {
  text-decoration: none;
  background: var(--surface-2);
}
.search-results .res-title {
  font-size: 14px;
  font-weight: 600;
}
.search-results .res-crumb {
  margin-top: 2px;
  font-size: 12px;
  color: var(--text-3);
}
.search-results mark {
  color: var(--link);
  background: var(--accent-quiet);
  border-radius: 2px;
}
.search-empty {
  padding: 26px 18px;
  font-size: 14px;
  text-align: center;
  color: var(--text-3);
}

/* --------------------------------------------------------------------------
   13. FOOTER
   -------------------------------------------------------------------------- */
.page-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  max-width: var(--content-max);
  margin-top: 64px;
  padding-top: 22px;
  font-size: 13px;
  color: var(--text-3);
  border-top: 1px solid var(--border-soft);
}
.page-foot a {
  color: var(--text-2);
}
.page-foot nav {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}
.page-updated {
  font-variant-numeric: tabular-nums;
}

/* Prev/Next */
.pager {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  max-width: var(--content-max);
  margin-top: 52px;
}
.pager a {
  padding: 14px 16px;
  color: var(--text);
  text-decoration: none;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.16s var(--ease);
}
.pager a:hover {
  text-decoration: none;
  border-color: var(--accent-line);
}
.pager span {
  display: block;
  font-size: 11.5px;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-3);
  margin-bottom: 3px;
}
.pager strong {
  font-size: 14.5px;
  font-weight: 600;
}
.pager .pager-next {
  grid-column: 2;
  text-align: right;
}

/* --------------------------------------------------------------------------
   14. RESPONSIVO
   -------------------------------------------------------------------------- */
@media (max-width: 1240px) {
  .layout {
    grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
  }
  .toc {
    display: none;
  }
  .main {
    padding-inline: 44px;
  }
}

@media (max-width: 1000px) {
  :root {
    --header-h: 56px;
  }
  .layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .menu-toggle {
    display: flex;
  }
  .header-nav {
    display: none;
  }
  .search-trigger {
    min-width: 0;
  }
  .search-trigger span,
  .search-trigger kbd {
    display: none;
  }

  .sidebar {
    position: fixed;
    inset: var(--header-h) 0 0 0;
    z-index: 880;
    height: auto;
    padding: 20px 18px 60px;
    background: var(--bg);
    border-right: 0;
    transform: translateX(-100%);
    transition: transform 0.24s var(--ease);
    visibility: hidden;
  }
  .sidebar.is-open {
    transform: translateX(0);
    visibility: visible;
  }
  .nav-list a {
    padding: 9px 12px;
    font-size: var(--step-0);
  }
  .main {
    padding: 30px 20px 72px;
  }
  h1 {
    font-size: 2rem;
  }
  h2 {
    margin-top: 44px;
    font-size: 1.5rem;
  }
  .page-head::before {
    inset-inline: -20px;
  }
}

@media (max-width: 620px) {
  .header {
    gap: 10px;
    padding: 0 14px;
  }
  .brand-pill {
    display: none;
  }
  .pager {
    grid-template-columns: 1fr;
  }
  .pager .pager-next {
    grid-column: 1;
  }
  .callout {
    padding-left: 15px;
  }
  .callout-icon,
  .callout > p:has(> .callout-icon:only-child) {
    display: none;
  }
  .code pre {
    font-size: 12.5px;
  }
}

/* --------------------------------------------------------------------------
   15. IMPRESSÃO
   -------------------------------------------------------------------------- */
@media print {
  .header,
  .sidebar,
  .toc,
  .copy,
  .pager,
  .search-dialog,
  .skip-link {
    display: none !important;
  }
  .layout {
    display: block;
  }
  .main {
    padding: 0;
  }
  .prose,
  .page-foot {
    max-width: none;
  }
  body {
    color: #000;
    background: #fff;
  }
  .code {
    border-color: #ccc;
  }
  .code pre {
    color: #111;
    background: #f6f6f6;
    white-space: pre-wrap;
  }
  a {
    color: #000;
    text-decoration: underline;
  }
  h2,
  h3 {
    page-break-after: avoid;
  }
  .code,
  .table-wrap,
  .callout {
    page-break-inside: avoid;
  }
}

/* Chinês: fontes e ajuste de altura de linha */
:lang(zh) body,
[lang="zh-CN"] body {
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  line-height: 1.85;
}
[lang="zh-CN"] .prose :not(pre) > code {
  white-space: normal;
}

/* --------------------------------------------------------------------------
   Logo em imagem no header
   -------------------------------------------------------------------------- */
.brand img {
  display: block;
  width: auto;
  height: 26px;                              /* ajuste fino: só este número */
  max-height: calc(var(--header-h) - 22px);  /* trava para não estourar o header */
  object-fit: contain;
  flex-shrink: 0;
}

[data-theme="light"] .brand {
  padding: 7px 12px;
  background: linear-gradient(135deg, #1a0b2e, #0d0817);
  border-radius: 8px;
  box-shadow: 0 0 0 1px rgba(155, 0, 255, 0.25);
}