/* Tema da documentação do Power Omni, no visual do GitBook (cores e medidas tiradas de docs.poweromni.ai). */

@font-face { font-family: 'Inter'; font-style: normal; font-weight: 100 900; font-display: swap; src: url(/_assets/inter-latin.3100e775e8.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 100 900; font-display: swap; src: url(/_assets/inter-latin-ext.34b9c504ca.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 400; font-display: swap; src: url(/_assets/plex-mono-latin.08949f728d.woff2) format('woff2'); }

:root {
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  /* Paleta do site no GitBook (primária #DCB301 e tons "tint"). */
  --bg: 255 255 255;
  --text: 31 29 24;
  --muted: 118 110 85;
  --subtle: 153 131 59;
  --tint-2: 251 250 246;
  --tint-3: 250 247 240;
  --tint-4: 246 242 232;
  --tint-5: 242 237 223;
  --tint-6: 235 229 212;
  --tint-7: 224 217 196;
  --primary: 220 179 1;
  --primary-strong: 155 115 0;
  --primary-3: 251 247 236;
  --primary-4: 248 242 225;
  --primary-on: 29 29 29;
  --neutral-2: 250 250 250;
  --neutral-5: 237 237 237;
  --neutral-9: 120 120 120;
  --info-bg: 250 250 250; --info-head: 237 237 237; --info-ic: 110 110 110; --info-line: 120 120 120;
  --success-bg: 245 252 246; --success-head: 219 246 222; --success-ic: 0 152 23; --success-line: 0 201 80;
  --warning-bg: 255 245 236; --warning-head: 254 233 214; --warning-ic: 187 92 0; --warning-line: 254 154 0;
  --danger-bg: 255 242 239; --danger-head: 255 226 221; --danger-ic: 228 0 33; --danger-line: 251 44 54;
  --mark-success: 0 152 23; --mark-warning: 187 92 0; --mark-danger: 228 0 33; --mark-info: 110 110 110;
  --header-bg: 255 255 255;
  --shadow: 0 1px 2px rgb(224 217 196 / .4);
  --shadow-lg: 0 12px 32px rgb(31 29 24 / .12), 0 2px 6px rgb(31 29 24 / .06);
  --code-bg: 251 250 246; --code-head: 246 242 232;
  --hl-comment: #6a737d; --hl-keyword: #cf222e; --hl-type: #8250df; --hl-string: #0a3069; --hl-number: #0550ae;
  --hl-title: #6639ba; --hl-attr: #0550ae; --hl-variable: #953800; --hl-meta: #57606a; --hl-operator: #57606a; --hl-deletion: #82071e;

  --header-h: 76px;
  --logo-h: 60px;
  --sidebar-w: 288px;
  --toc-w: 224px;
  color-scheme: light;
}

:root.dark {
  --bg: 22 21 19;
  --text: 243 240 232;
  --muted: 176 168 146;
  --subtle: 196 170 92;
  --tint-2: 28 27 24;
  --tint-3: 33 32 28;
  --tint-4: 39 37 32;
  --tint-5: 45 43 37;
  --tint-6: 52 49 42;
  --tint-7: 66 62 52;
  --primary: 240 199 30;
  --primary-strong: 247 214 82;
  --primary-3: 42 37 20;
  --primary-4: 52 45 21;
  --primary-on: 29 29 29;
  --neutral-2: 30 30 30;
  --neutral-5: 44 44 44;
  --neutral-9: 150 150 150;
  --info-bg: 30 30 30; --info-head: 42 42 42; --info-ic: 190 190 190; --info-line: 150 150 150;
  --success-bg: 20 36 24; --success-head: 26 52 32; --success-ic: 90 210 120; --success-line: 40 180 90;
  --warning-bg: 44 31 18; --warning-head: 60 40 20; --warning-ic: 255 170 70; --warning-line: 230 140 20;
  --danger-bg: 46 22 22; --danger-head: 64 28 28; --danger-ic: 255 110 110; --danger-line: 230 70 70;
  --mark-success: 90 210 120; --mark-warning: 255 170 70; --mark-danger: 255 110 110; --mark-info: 190 190 190;
  --header-bg: 22 21 19;
  --code-bg: 28 27 25; --code-head: 36 34 30;
  --hl-comment: #7f848e; --hl-keyword: #c678dd; --hl-type: #e5c07b; --hl-string: #98c379; --hl-number: #d19a66;
  --hl-title: #61afef; --hl-attr: #d19a66; --hl-variable: #e06c75; --hl-meta: #abb2bf; --hl-operator: #56b6c2; --hl-deletion: #e06c75;
  --shadow: 0 1px 2px rgb(0 0 0 / .4);
  --shadow-lg: 0 12px 32px rgb(0 0 0 / .5), 0 2px 6px rgb(0 0 0 / .3);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 24px); }
body {
  margin: 0; font-family: var(--font); font-size: 16px; line-height: 26px; color: rgb(var(--text)); background: rgb(var(--bg));
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; }
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
.ic { width: 1em; height: 1em; flex-shrink: 0; stroke-width: 2; vertical-align: -0.125em; }
:root:not(.dark) .only-dark, :root.dark .only-light { display: none !important; }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 100; background: rgb(var(--bg)); padding: 8px 12px; border-radius: 8px; }
.skip:focus { left: 8px; }
:focus-visible { outline: 2px solid rgb(var(--primary)); outline-offset: 2px; border-radius: 6px; }

/* ------------------------------------------------------------------ cabeçalho */
.hdr {
  position: sticky; top: 0; z-index: 30; height: var(--header-h);
  background: rgb(var(--header-bg) / .88); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 1px 0 rgb(var(--text) / .08);
}
.hdr-in { max-width: 1536px; height: 100%; margin: 0 auto; padding: 0 32px; display: flex; align-items: center; gap: 16px; }
.logo { display: flex; align-items: center; height: var(--logo-h); }
.logo img { height: var(--logo-h); width: auto; }
.hdr-actions { margin-left: auto; display: flex; align-items: center; gap: 12px; font-size: 14px; line-height: 20px; }
.pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; border-radius: 24px; font-size: 14px; line-height: 21px;
  color: rgb(var(--muted)); background: rgb(var(--bg)); border: 1px solid rgb(var(--tint-7)); box-shadow: var(--shadow); text-decoration: none;
  transition: color .15s, border-color .15s, background .15s;
}
.pill:hover { color: rgb(var(--text)); border-color: rgb(var(--tint-7)); background: rgb(var(--tint-3)); }
.ghost-btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 10px; border-radius: 24px; color: rgb(var(--muted)); }
.ghost-btn:hover { background: rgb(var(--tint-4)); color: rgb(var(--text)); }
.ghost-btn .chev { width: 14px; height: 14px; opacity: .7; }
.search-btn {
  display: inline-flex; align-items: center; gap: 8px; min-width: 176px; padding: 7px 8px 7px 12px; border-radius: 24px;
  border: 1px solid rgb(var(--tint-7)); background: rgb(var(--bg)); color: rgb(var(--muted)); box-shadow: var(--shadow);
}
.search-btn:hover { border-color: rgb(var(--primary) / .6); }
.search-btn .kbd { margin-left: auto; display: inline-flex; gap: 2px; }
kbd {
  font-family: var(--mono); font-size: 11px; line-height: 16px; padding: 1px 5px; border-radius: 6px;
  border: 1px solid rgb(var(--tint-7)); background: rgb(var(--tint-3)); color: rgb(var(--muted));
}
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 10px; color: rgb(var(--muted)); }
.icon-btn:hover { background: rgb(var(--tint-4)); color: rgb(var(--text)); }
.icon-btn .ic { width: 20px; height: 20px; }
.nav-open, .nav-close { display: none; }

.dropdown { position: relative; }
.menu {
  position: absolute; top: calc(100% + 6px); left: 0; z-index: 40; min-width: 180px; padding: 6px; border-radius: 12px;
  background: rgb(var(--bg)); border: 1px solid rgb(var(--tint-6)); box-shadow: var(--shadow-lg);
}
.menu-right { left: auto; right: 0; min-width: 300px; }
.menu > a, .menu > button {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border-radius: 8px; text-align: left;
  font-size: 14px; line-height: 20px; color: rgb(var(--text)); text-decoration: none;
}
.menu > a:hover, .menu > button:hover { background: rgb(var(--tint-4)); }
.menu > a[aria-current] { color: rgb(var(--primary-strong)); font-weight: 600; }
.menu .ic { color: rgb(var(--muted)); }
.menu > a > .ic:last-child { margin-left: auto; }
.menu b { display: block; font-weight: 500; }
.menu small { display: block; font-size: 12px; line-height: 16px; color: rgb(var(--muted)); }
.menu .ext { width: 12px; height: 12px; }

/* ------------------------------------------------------------------ grade */
.shell { max-width: 1536px; margin: 0 auto; padding: 0 32px; display: flex; align-items: flex-start; }
.page { flex: 1; min-width: 0; max-width: 816px; margin: 0 auto; padding: 32px 0 64px; }

/* ------------------------------------------------------------------ menu lateral */
.sidebar {
  position: sticky; top: var(--header-h); flex: 0 0 var(--sidebar-w); width: var(--sidebar-w); height: calc(100vh - var(--header-h));
  margin-right: 48px; font-size: 14px; line-height: 20px;
}
.sidebar-in { height: 100%; overflow-y: auto; padding: 24px 8px 96px 0; margin-left: -12px; scrollbar-width: thin; scrollbar-color: transparent transparent; }
.sidebar-in:hover { scrollbar-color: rgb(var(--tint-7)) transparent; }
.nav-group + .nav-group { margin-top: 24px; }
.nav-group-title {
  display: flex; align-items: center; gap: 12px; padding: 6px 12px; margin-bottom: 4px;
  font-size: 12px; line-height: 16px; font-weight: 600; letter-spacing: .3px; text-transform: uppercase; color: rgb(var(--text));
}
.nav-group-title .ic { width: 16px; height: 16px; }
.nav-list, .nav-sub { list-style: none; margin: 0; padding: 0; }
.nav-sub { display: none; margin: 2px 0 2px 24px; padding-left: 0; border-left: 1px solid rgb(var(--tint-6)); }
li.open > .nav-sub { display: block; }
.nav-row { position: relative; display: flex; align-items: center; }
.nav-link {
  position: relative; flex: 1; display: flex; align-items: center; gap: 12px; min-height: 32px; padding: 6px 30px 6px 12px; border-radius: 16px;
  color: rgb(var(--text) / .64); text-decoration: none; transition: background .12s, color .12s; overflow-wrap: anywhere;
}
.nav-link .ic { width: 16px; height: 16px; color: rgb(var(--text) / .55); }
.nav-link:hover { background: rgb(var(--tint-4)); color: rgb(var(--text)); }
.nav-link.active { color: rgb(var(--primary)); font-weight: 600; background: rgb(var(--primary-3)); }
:root.dark .nav-link.active { background: rgb(var(--primary-4)); }
.nav-link.active .ic { color: inherit; }
.nav-sub .nav-link { border-radius: 0 16px 16px 0; margin-left: -1px; border-left: 1px solid transparent; }
.nav-sub .nav-link.active { border-left-color: rgb(var(--primary)); background: none; }
.nav-sub .nav-link.active:hover { background: rgb(var(--tint-4)); }
.nav-ext { width: 12px !important; height: 12px !important; opacity: .6; position: absolute; right: 10px; top: 50%; margin-top: -6px; }
.nav-exp {
  position: absolute; right: 4px; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 8px; color: rgb(var(--text) / .5);
}
.nav-exp:hover { background: rgb(var(--tint-5)); color: rgb(var(--text)); }
.nav-exp .ic { width: 12px; height: 12px; transition: transform .15s; }
li.open > .nav-row > .nav-exp .ic { transform: rotate(90deg); }
.scrim { display: none; }

/* ------------------------------------------------------------------ topo da página */
.page-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; min-height: 30px; margin-bottom: 8px; }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; font-size: 12px; line-height: 16px; padding-top: 4px; }
.crumbs a, .crumbs span { display: inline-flex; align-items: center; gap: 5px; color: rgb(var(--primary)); text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.crumbs .ic { width: 12px; height: 12px; }
.crumbs .sep { color: rgb(var(--muted)); width: 10px; height: 10px; }
.page-actions { display: flex; flex-shrink: 0; border: 1px solid rgb(var(--tint-7)); border-radius: 10px; background: rgb(var(--bg)); box-shadow: var(--shadow); font-size: 14px; line-height: 20px; color: rgb(var(--muted)); }
.page-actions .split-main { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 9px 0 0 9px; }
.page-actions .split-more { display: inline-flex; align-items: center; height: 100%; padding: 4px 6px; border-left: 1px solid rgb(var(--tint-7)); border-radius: 0 9px 9px 0; }
.page-actions .split-main:hover, .page-actions .split-more:hover { background: rgb(var(--tint-4)); color: rgb(var(--text)); }
.page-actions .ic { width: 14px; height: 14px; }
.page-actions .menu .ic { width: 16px; height: 16px; }
.page-actions .menu .ext { width: 12px; height: 12px; }
.page-actions .menu { max-height: calc(100vh - var(--header-h) - 80px); overflow-y: auto; }
.menu-sep { height: 1px; margin: 6px 4px; background: rgb(var(--tint-6)); }

.page-head { margin-bottom: 8px; }
.page-head h1 { display: flex; align-items: center; gap: 12px; margin: 0 0 12px; font-size: 36px; line-height: 45px; font-weight: 700; letter-spacing: -0.025em; }
.title-ic { display: inline-flex; color: rgb(var(--subtle)); }
.title-ic .ic { width: 32px; height: 32px; stroke-width: 1.75; }
.page-desc { margin: 0 0 8px; font-size: 18px; line-height: 28px; color: rgb(var(--muted)); }

/* ------------------------------------------------------------------ conteúdo */
.content { overflow-wrap: break-word; }
.content > :first-child { margin-top: 0; }
.content p { margin: 20px 0 0; }
.content h1, .content h2, .content h3, .content h4, .content h5, .content h6 { position: relative; scroll-margin-top: calc(var(--header-h) + 24px); }
.content h1, .content h2 { font-size: 30px; line-height: 36px; font-weight: 600; letter-spacing: -0.0125em; margin: 20px 0 0; padding-top: 30px; }
.content h3 { font-size: 24px; line-height: 32px; font-weight: 600; letter-spacing: -0.01em; margin: 16px 0 0; padding-top: 20px; }
.content h4 { font-size: 20px; line-height: 28px; font-weight: 600; letter-spacing: -0.0125em; margin: 12px 0 0; padding-top: 10px; }
.content h5, .content h6 { font-size: 16px; line-height: 24px; font-weight: 600; margin: 12px 0 0; padding-top: 8px; }
.anchor { display: inline-flex; vertical-align: middle; margin-left: 8px; color: rgb(var(--muted)); opacity: 0; transition: opacity .12s; }
.anchor .ic { width: 16px; height: 16px; }
h1:hover > .anchor, h2:hover > .anchor, h3:hover > .anchor, h4:hover > .anchor, h5:hover > .anchor, h6:hover > .anchor, .anchor:focus { opacity: 1; }
.content a:not(.card):not(.content-ref):not(.anchor) {
  color: rgb(var(--primary)); text-decoration: underline; text-decoration-color: rgb(var(--primary) / .4); text-underline-offset: 2px; text-decoration-thickness: 1px;
}
.content a:not(.card):not(.content-ref):not(.anchor):hover { text-decoration-color: rgb(var(--primary)); }
:root:not(.dark) .content a:not(.card):not(.content-ref):not(.anchor) { color: rgb(var(--primary)); }
.content a .ext { width: .75em; height: .75em; margin-left: 2px; vertical-align: 0; }
.content strong, .content b { font-weight: 700; }
.content ul, .content ol { margin: 20px 0 0; padding-left: 24px; }
.content li { margin: 0; padding-left: 4px; }
.content li + li { margin-top: 8px; }
.content li > p:first-child { margin-top: 0; }
.content li > ul, .content li > ol { margin-top: 8px; }
.content ul > li::marker { color: rgb(var(--text) / .5); }
.content ol > li::marker { color: rgb(var(--muted)); font-weight: 500; }
.content hr { border: 0; height: 1px; background: rgb(var(--tint-6)); margin: 32px 0; }
.content blockquote { margin: 20px 0 0; padding: 12px 0 12px 24px; border-left: 2px solid rgb(var(--tint-7)); color: rgb(var(--muted)); }
.content blockquote > :first-child { margin-top: 0; }
.content code { font-family: var(--mono); font-size: .875em; padding: 2px 5px; border-radius: 6px; background: rgb(var(--tint-4)); border: 1px solid rgb(var(--tint-6)); }
.content pre code { display: block; padding: 0; border: 0; background: none; font-size: 13px; line-height: 22px; tab-size: 4; }

/* blocos de código: barra com a linguagem e o copiar, números de linha, realce da linha sob o mouse */
.code-block { position: relative; margin: 20px 0 0; border-radius: 12px; background: rgb(var(--code-bg)); border: 1px solid rgb(var(--tint-6)); overflow: hidden; }
.code-head {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 36px; padding: 0 6px 0 14px;
  border-bottom: 1px solid rgb(var(--tint-6)); background: rgb(var(--code-head)); font-size: 12px; line-height: 16px;
}
.code-lang { font-family: var(--mono); font-weight: 500; letter-spacing: .02em; color: rgb(var(--muted)); }
.code-block pre { margin: 0; padding: 12px 0; overflow-x: auto; scrollbar-width: thin; }
.code-block .line { display: block; min-height: 22px; padding: 0 20px; white-space: pre; }
.code-block.numbered code { counter-reset: line; }
.code-block.numbered .line { padding-left: 0; }
.code-block.numbered .line::before {
  counter-increment: line; content: counter(line); display: inline-block; box-sizing: content-box; width: 3ch; margin-right: 16px;
  padding: 0 12px 0 8px; text-align: right; color: rgb(var(--muted) / .55); border-right: 1px solid rgb(var(--tint-6));
  -webkit-user-select: none; user-select: none; position: sticky; left: 0; background: rgb(var(--code-bg));
}
.code-block .line:hover { background: rgb(var(--text) / .04); }
.code-block.numbered .line:hover::before { color: rgb(var(--muted)); background: rgb(var(--code-bg)); }
.code-copy {
  display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; color: rgb(var(--muted)); border: 1px solid transparent;
  transition: background .12s, color .12s;
}
.code-copy:hover { background: rgb(var(--tint-5)); color: rgb(var(--text)); }
.code-copy .ic { width: 14px; height: 14px; }
.code-copy.done { color: rgb(var(--success-ic)); }
/* texto comum (sem linguagem): sem barra, só o copiar flutuando ao passar o mouse */
.code-block[data-lang="plaintext"] .code-head { position: absolute; top: 6px; right: 6px; min-height: 0; padding: 0; border: 0; background: none; z-index: 1; }
.code-block[data-lang="plaintext"] .code-lang { display: none; }
.code-block[data-lang="plaintext"] .code-copy { background: rgb(var(--bg)); border-color: rgb(var(--tint-6)); opacity: 0; }
.code-block[data-lang="plaintext"]:hover .code-copy, .code-block[data-lang="plaintext"] .code-copy:focus { opacity: 1; }
.code-block[data-lang="plaintext"] .line { padding-right: 44px; }
pre.mermaid { margin: 20px 0 0; padding: 16px; border-radius: 12px; background: rgb(var(--tint-2)); border: 1px solid rgb(var(--tint-6)); text-align: center; overflow-x: auto; font-family: var(--font); }
pre.mermaid:not([data-processed]) { color: transparent; min-height: 120px; }
.content mark { background: none; font-weight: inherit; }
.mark-primary { color: rgb(var(--primary)); }
.mark-tint { color: rgb(var(--muted)); }
.mark-info, .mark-neutral { color: rgb(var(--mark-info)); }
.mark-success { color: rgb(var(--mark-success)); }
.mark-warning { color: rgb(var(--mark-warning)); }
.mark-danger { color: rgb(var(--mark-danger)); }
[class^="mark-css-"] { color: var(--mark); }
:root.dark .mark-css-blue { color: #7aa7ff; }
:root.dark .mark-css-purple { color: #c49bff; }

/* imagens */
.content figure { margin: 20px 0 0; text-align: center; }
.content figure img, .content p > img { border-radius: 8px; cursor: zoom-in; }
.content figcaption { margin-top: 8px; font-size: 14px; line-height: 20px; color: rgb(var(--muted)); }
.content figcaption p { margin: 0; }

/* tabelas */
.table-wrap { margin: 20px 0 0; overflow-x: auto; scrollbar-width: thin; border: 1px solid rgb(var(--tint-6)); border-radius: 8px; }
.content table { width: 100%; border-collapse: collapse; font-size: 14px; line-height: 20px; }
.content th, .content td { padding: 8px 12px; text-align: left; vertical-align: top; border-bottom: 1px solid rgb(var(--tint-6)); }
.content th + th, .content td + td { border-left: 1px solid rgb(var(--tint-6)); }
.content th { font-weight: 500; background: rgb(var(--tint-3)); color: rgb(var(--text)); }
.content tbody tr:last-child td { border-bottom: 0; }
.content th[align="center"], .content td[align="center"] { text-align: center; }
.content th[align="right"], .content td[align="right"] { text-align: right; }
.content table.no-head thead { display: none; }
.content td > p:first-child, .content th > p:first-child { margin-top: 0; }
.content td img { cursor: zoom-in; }

/* hints */
.hint {
  display: flex; gap: 12px; margin: 20px 0 0; padding: 12px 16px; border-radius: 12px; font-size: 14px; line-height: 20px;
  background: rgb(var(--info-bg)); border: 1px solid rgb(var(--info-line) / .14);
}
.hint .hint-ic { width: 16px; height: 16px; margin-top: 2px; color: rgb(var(--info-ic)); }
.hint-body { flex: 1; min-width: 0; }
.hint-body > :first-child { margin-top: 0; }
.hint-body p { margin-top: 12px; }
.hint-body ul, .hint-body ol { margin-top: 12px; }
.hint.has-head { display: block; padding: 0; overflow: hidden; }
.hint-head { display: flex; align-items: center; gap: 10px; padding: 12px 16px; font-weight: 600; background: rgb(var(--info-head)); }
.hint-head span > * { margin: 0; font: inherit; }
.hint.has-head .hint-body { padding: 12px 16px 14px 42px; }
.hint-success { background: rgb(var(--success-bg)); border-color: rgb(var(--success-line) / .2); }
.hint-success .hint-ic { color: rgb(var(--success-ic)); }
.hint-success .hint-head { background: rgb(var(--success-head)); }
.hint-warning { background: rgb(var(--warning-bg)); border-color: rgb(var(--warning-line) / .2); }
.hint-warning .hint-ic { color: rgb(var(--warning-ic)); }
.hint-warning .hint-head { background: rgb(var(--warning-head)); }
.hint-danger { background: rgb(var(--danger-bg)); border-color: rgb(var(--danger-line) / .2); }
.hint-danger .hint-ic { color: rgb(var(--danger-ic)); }
.hint-danger .hint-head { background: rgb(var(--danger-head)); }

/* passo a passo */
.stepper { list-style: none; margin: 20px 0 0; padding: 0; counter-reset: step; }
.stepper > .step { position: relative; counter-increment: step; padding: 0 0 20px 44px; margin: 0; }
.stepper > .step + .step { margin-top: 0; }
.stepper > .step::before {
  content: counter(step); position: absolute; left: 0; top: 4px; width: 24px; height: 24px; border-radius: 50%;
  display: grid; place-items: center; font-size: 12px; line-height: 1; font-weight: 600; background: rgb(var(--primary)); color: rgb(var(--primary-on));
}
.stepper > .step::after { content: ''; position: absolute; left: 11.5px; top: 34px; bottom: 6px; width: 1px; background: rgb(var(--tint-7)); }
.stepper > .step:last-child { padding-bottom: 4px; }
.step-body > :first-child { margin-top: 0; padding-top: 0; }
.step-body > h1:first-child, .step-body > h2:first-child, .step-body > h3:first-child, .step-body > h4:first-child { font-size: 20px; line-height: 32px; }

/* detalhes (expansíveis) */
.content details { margin: 20px 0 0; border: 1px solid rgb(var(--tint-6)); border-radius: 8px; background: rgb(var(--bg)); }
.content details + details { margin-top: -1px; }
.content details:has(+ details) { border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
.content details + details { border-top-left-radius: 0; border-top-right-radius: 0; }
.content summary { display: flex; align-items: center; gap: 10px; padding: 16px; cursor: pointer; list-style: none; color: rgb(var(--text)); font-weight: 500; }
.content summary::-webkit-details-marker { display: none; }
.content summary .chev { width: 14px; height: 14px; color: rgb(var(--muted)); transition: transform .15s; }
.content details[open] > summary .chev { transform: rotate(90deg); }
.content summary:hover { background: rgb(var(--tint-3)); }
.content details > :not(summary) { margin-left: 16px; margin-right: 16px; }
.content details > :last-child:not(summary) { margin-bottom: 16px; }

/* cartões */
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 20px 0 0; }
.card {
  display: flex; flex-direction: column; overflow: hidden; border-radius: 12px; border: 1px solid rgb(var(--tint-6)); background: rgb(var(--bg));
  box-shadow: var(--shadow); color: rgb(var(--text)); text-decoration: none; transition: border-color .15s, box-shadow .15s, transform .15s;
}
a.card:hover { border-color: rgb(var(--tint-7)); box-shadow: var(--shadow-lg); }
.card-cover { aspect-ratio: 16 / 9; background: rgb(var(--tint-3)); overflow: hidden; }
.card-cover img { display: block; width: 100%; height: 100%; object-fit: contain; }
.card-text { padding: 12px 16px; font-size: 14px; line-height: 20px; text-align: center; }
.card-text > div + div { margin-top: 4px; color: rgb(var(--muted)); }

/* content-ref */
.content-ref {
  display: flex; align-items: center; gap: 12px; margin: 20px 0 0; padding: 14px 16px; border-radius: 12px; border: 1px solid rgb(var(--tint-6));
  background: rgb(var(--bg)); color: rgb(var(--text)); text-decoration: none; box-shadow: var(--shadow); transition: border-color .15s, box-shadow .15s;
}
.content-ref:hover { border-color: rgb(var(--primary) / .6); }
.content-ref > .ic:first-child { width: 18px; height: 18px; color: rgb(var(--muted)); }
.content-ref span { flex: 1; min-width: 0; font-weight: 500; overflow-wrap: anywhere; }
.content-ref .chev { width: 16px; height: 16px; color: rgb(var(--muted)); }
.content-ref + .content-ref { margin-top: 8px; }

/* embed */
.embed { margin: 20px 0 0; }
.embed-frame { position: relative; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; border: 1px solid rgb(var(--tint-6)); background: rgb(var(--tint-3)); }
.embed-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* realce de código (highlight.js) */
/* realce de sintaxe (paleta no estilo dos editores: claro tipo GitHub, escuro tipo One Dark) */
.hljs-comment, .hljs-quote { color: var(--hl-comment); font-style: italic; }
.hljs-keyword, .hljs-selector-tag, .hljs-doctag, .hljs-meta .hljs-keyword { color: var(--hl-keyword); }
.hljs-type, .hljs-built_in, .hljs-class .hljs-title { color: var(--hl-type); }
.hljs-string, .hljs-regexp, .hljs-template-tag, .hljs-addition { color: var(--hl-string); }
.hljs-number, .hljs-literal, .hljs-symbol, .hljs-bullet { color: var(--hl-number); }
.hljs-title, .hljs-title.function_, .hljs-section, .hljs-name, .hljs-selector-id, .hljs-selector-class { color: var(--hl-title); }
.hljs-attr, .hljs-attribute, .hljs-property { color: var(--hl-attr); }
.hljs-variable, .hljs-template-variable, .hljs-params { color: var(--hl-variable); }
.hljs-meta, .hljs-meta .hljs-string { color: var(--hl-meta); }
.hljs-operator, .hljs-punctuation { color: var(--hl-operator); }
.hljs-deletion { color: var(--hl-deletion); }
.hljs-emphasis { font-style: italic; }
.hljs-strong { font-weight: 700; }

/* ------------------------------------------------------------------ rodapé da página */
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 48px; }
.pager a {
  display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 12px; border: 1px solid rgb(var(--tint-6));
  text-decoration: none; color: rgb(var(--text)); background: rgb(var(--bg)); transition: border-color .15s;
}
.pager a:hover { border-color: rgb(var(--primary) / .6); }
.pager a:hover b { color: rgb(var(--primary-strong)); }
:root.dark .pager a:hover b { color: rgb(var(--primary)); }
.pager-next { grid-column: 2; justify-content: flex-end; text-align: right; }
.pager span { display: flex; flex-direction: column; min-width: 0; }
.pager small { font-size: 12px; line-height: 16px; color: rgb(var(--muted)); }
.pager b { font-weight: 500; font-size: 16px; line-height: 24px; overflow-wrap: anywhere; }
.pager .pg { width: 16px; height: 16px; color: rgb(var(--muted)); }
.page-meta { margin: 24px 0 0; font-size: 12px; line-height: 16px; color: rgb(var(--muted)); }

/* ------------------------------------------------------------------ "Nesta página" */
.toc { position: sticky; top: var(--header-h); flex: 0 0 var(--toc-w); width: var(--toc-w); height: calc(100vh - var(--header-h)); margin-left: 48px; }
.toc-in { height: 100%; overflow-y: auto; padding: 36px 0 96px; scrollbar-width: none; }
.toc-title { display: flex; align-items: center; gap: 6px; padding: 0 12px 10px; font-size: 12px; line-height: 16px; font-weight: 600; letter-spacing: .3px; text-transform: uppercase; color: rgb(var(--muted)); }
.toc-title .ic { width: 14px; height: 14px; }
.toc ul { list-style: none; margin: 0; padding: 0; border-left: 1px solid rgb(var(--tint-6)); }
.toc li a {
  display: block; padding: 4px 12px; margin-left: -1px; border-left: 1px solid transparent; font-size: 14px; line-height: 20px;
  color: rgb(var(--muted)); text-decoration: none; transition: color .12s;
}
.toc li.lvl-1 a { padding-left: 24px; }
.toc li.lvl-2 a { padding-left: 36px; }
.toc li a:hover { color: rgb(var(--text)); }
.toc li a.active { color: rgb(var(--primary)); border-left-color: rgb(var(--primary)); font-weight: 500; }

/* ------------------------------------------------------------------ tema */
.theme-switch {
  position: fixed; right: 16px; bottom: 16px; z-index: 25; display: flex; gap: 2px; padding: 3px; border-radius: 20px;
  background: rgb(var(--bg) / .9); border: 1px solid rgb(var(--tint-6)); box-shadow: var(--shadow); backdrop-filter: blur(8px);
}
.theme-switch button { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; color: rgb(var(--muted)); }
.theme-switch button:hover { color: rgb(var(--text)); }
.theme-switch button[aria-checked="true"] { background: rgb(var(--tint-5)); color: rgb(var(--text)); }
.theme-switch .ic { width: 14px; height: 14px; }

/* ------------------------------------------------------------------ busca */
.search-dialog { position: fixed; inset: 0; z-index: 60; display: flex; justify-content: center; align-items: flex-start; padding: 10vh 16px 16px; background: rgb(20 18 12 / .45); backdrop-filter: blur(2px); }
.search-dialog[hidden] { display: none; }
.search-box { width: 100%; max-width: 680px; max-height: 76vh; display: flex; flex-direction: column; border-radius: 16px; background: rgb(var(--bg)); border: 1px solid rgb(var(--tint-6)); box-shadow: var(--shadow-lg); overflow: hidden; }
.search-input { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid rgb(var(--tint-6)); color: rgb(var(--muted)); }
.search-input .ic { width: 18px; height: 18px; }
.search-input input { flex: 1; min-width: 0; font: inherit; font-size: 16px; color: rgb(var(--text)); background: none; border: 0; outline: none; }
.search-input input::-webkit-search-cancel-button { display: none; }
.search-results { overflow-y: auto; padding: 8px; }
.search-results:empty { display: none; }
.sr-empty { padding: 24px 12px; text-align: center; font-size: 14px; color: rgb(var(--muted)); }
.sr-item { display: block; padding: 10px 12px; border-radius: 10px; text-decoration: none; color: rgb(var(--text)); }
.sr-item[aria-selected="true"], .sr-item:hover { background: rgb(var(--primary-3)); }
:root.dark .sr-item[aria-selected="true"], :root.dark .sr-item:hover { background: rgb(var(--tint-4)); }
.sr-crumbs { font-size: 12px; line-height: 16px; color: rgb(var(--muted)); }
.sr-title { display: flex; align-items: center; gap: 8px; font-weight: 500; font-size: 14px; line-height: 20px; }
.sr-title .ic { width: 14px; height: 14px; color: rgb(var(--muted)); }
.sr-snippet { margin-top: 2px; font-size: 13px; line-height: 19px; color: rgb(var(--muted)); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sr-item mark { background: rgb(var(--primary) / .28); color: inherit; border-radius: 3px; padding: 0 1px; }

/* ------------------------------------------------------------------ ampliação de imagem */
.lightbox {
  position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; padding: 24px; cursor: zoom-out;
  background: rgb(10 10 10 / 0); transition: background-color .28s ease;
}
.lightbox.is-open { background: rgb(10 10 10 / .82); }
html { scrollbar-gutter: stable; }
html.lightbox-open { overflow: hidden; }
.lightbox[hidden] { display: none; }
.lightbox img {
  max-width: 100%; max-height: 100%; border-radius: 8px; background: #fff; transform-origin: center center; will-change: transform;
  box-shadow: 0 20px 60px rgb(0 0 0 / 0); transition: transform .28s cubic-bezier(.2, .8, .2, 1), box-shadow .28s ease;
}
.lightbox.is-open img { box-shadow: 0 20px 60px rgb(0 0 0 / .5); }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 80; padding: 8px 14px; border-radius: 10px; font-size: 14px; background: rgb(var(--text)); color: rgb(var(--bg)); box-shadow: var(--shadow-lg); }

/* ------------------------------------------------------------------ responsivo */
@media (max-width: 1279px) {
  .toc { display: none; }
}
@media (max-width: 1023px) {
  .hdr-in, .shell { padding: 0 16px; }
  .nav-open, .nav-close { display: inline-flex; }
  .sidebar {
    position: fixed; z-index: 50; top: 0; left: 0; height: 100vh; height: 100dvh; width: min(320px, 86vw); margin: 0;
    background: rgb(var(--bg)); box-shadow: var(--shadow-lg); transform: translateX(-105%); transition: transform .2s ease;
  }
  .sidebar-in { margin-left: 0; padding: 12px 12px 96px; }
  .nav-close { margin: 0 0 8px auto; display: flex; }
  body.nav-is-open .sidebar { transform: none; }
  body.nav-is-open .scrim { display: block; position: fixed; inset: 0; z-index: 45; background: rgb(20 18 12 / .4); }
  .page { padding-top: 20px; }
}
@media (max-width: 639px) {
  :root { --header-h: 64px; --logo-h: 44px; }
  .hide-sm { display: none !important; }
  .search-btn { min-width: 0; padding: 8px; }
  .hdr-actions { gap: 4px; }
  .page-head h1 { font-size: 30px; line-height: 38px; }
  .title-ic .ic { width: 26px; height: 26px; }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pager { grid-template-columns: 1fr; }
  .pager-next { grid-column: 1; }
  .page-top { flex-wrap: wrap; }
}
@media (max-width: 399px) {
  .cards { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}
@media print {
  .hdr, .sidebar, .toc, .theme-switch, .page-actions, .pager, .anchor { display: none !important; }
  .shell { display: block; padding: 0; }
}

/* âncora no cabeçalho do hint e notas de rodapé */
.hint-head { position: relative; scroll-margin-top: calc(var(--header-h) + 24px); }
.hint-head:hover .anchor { opacity: 1; }
.content .footnotes { margin-top: 40px; padding-top: 16px; border-top: 1px solid rgb(var(--tint-6)); font-size: 14px; line-height: 22px; color: rgb(var(--muted)); }
.content .footnotes h2 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.content sup a { text-decoration: none !important; }
