/* Central de ajuda Lead2Sales — CSS único, sem framework. Tema claro/escuro pelo sistema. */
@font-face {
  font-family: "Inter Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("/static/inter-latin.woff2") format("woff2-variations");
  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 Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("/static/inter-latin-ext.woff2") format("woff2-variations");
  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;
}

:root {
  --brand: #0e63f1;
  --brand-2: #0fd0f1;
  --navy: #101a3e;
  --bg: #ffffff;
  --bg-soft: #f5f7fb;
  --bg-card: #ffffff;
  --text: #172033;
  --text-soft: #4a5568;
  --muted: #6b7486;
  --border: #e3e8f0;
  --link: #0b55d6;
  --code-bg: #f1f4f9;
  --mark: #fff1a8;
  --shadow: 0 1px 2px rgba(16, 26, 62, 0.06), 0 4px 16px rgba(16, 26, 62, 0.05);
  --note: #0e63f1;
  --tip: #12a150;
  --important: #7c3aed;
  --warning: #c27803;
  --caution: #d92d20;
  --radius: 12px;
  --topbar-h: 64px;
  --sidebar-w: 280px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1120;
    --bg-soft: #111a2e;
    --bg-card: #121b30;
    --text: #e6eaf2;
    --text-soft: #b7c0d1;
    --muted: #8b95a8;
    --border: #233049;
    --link: #6ea2ff;
    --code-bg: #18233b;
    --mark: #6b5a00;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    --note: #6ea2ff;
    --tip: #3ccf7d;
    --important: #a78bfa;
    --warning: #f0b429;
    --caution: #ff6b5e;
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: calc(var(--topbar-h) + 16px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: "Inter Variable", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; }
.icon { width: 20px; height: 20px; flex: none; }
.muted { color: var(--muted); }
.skip { position: absolute; left: -9999px; top: 0; }
.skip:focus { left: 12px; top: 12px; z-index: 100; background: var(--bg); padding: 8px 12px; border-radius: 8px; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

/* Barra superior */
.topbar {
  position: sticky; top: 0; z-index: 30;
  height: var(--topbar-h);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--border);
}
.topbar-inner { height: 100%; max-width: 1440px; margin: 0 auto; padding: 0 20px; display: flex; align-items: center; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 700; white-space: nowrap; }
.brand:hover { text-decoration: none; }
.brand img { border-radius: 8px; }
.brand-name { font-size: 17px; letter-spacing: -0.01em; }
.brand-tag {
  font-size: 12px; font-weight: 600; color: #fff; padding: 2px 8px; border-radius: 999px;
  background: linear-gradient(90deg, var(--brand-2), var(--brand));
}
.search { position: relative; flex: 1; max-width: 520px; margin-left: auto; display: flex; align-items: center; }
.search > .icon { position: absolute; left: 12px; color: var(--muted); pointer-events: none; width: 18px; height: 18px; }
.search input {
  width: 100%; height: 40px; padding: 0 40px 0 38px;
  border: 1px solid var(--border); border-radius: 10px; background: var(--bg-soft); color: var(--text);
  font: inherit; font-size: 15px;
}
.search input:focus { outline: none; border-color: var(--brand); background: var(--bg); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent); }
.search-key {
  position: absolute; right: 10px; font: 12px/1 ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--muted);
  border: 1px solid var(--border); border-radius: 5px; padding: 3px 6px; background: var(--bg);
}
.search-results {
  position: absolute; top: 46px; left: 0; right: 0; background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 12px; box-shadow: 0 12px 32px rgba(16, 26, 62, 0.16); padding: 6px; max-height: 70vh; overflow: auto;
}
.search-results a { display: block; padding: 8px 10px; border-radius: 8px; color: var(--text); }
.search-results a:hover, .search-results a[aria-selected="true"] { background: var(--bg-soft); text-decoration: none; }
.search-results .sr-section { display: block; font-size: 12px; color: var(--muted); }
.search-results .sr-all { color: var(--link); font-size: 14px; }
.search-results .sr-empty { padding: 10px; color: var(--muted); font-size: 14px; }
.platform-link {
  white-space: nowrap; font-weight: 600; font-size: 14px; color: #fff; padding: 9px 14px; border-radius: 10px;
  background: linear-gradient(90deg, var(--brand), #0b4fd0);
}
.platform-link:hover { text-decoration: none; filter: brightness(1.08); }
.nav-button { display: none; cursor: pointer; color: var(--text); padding: 6px; border-radius: 8px; }
.nav-button:hover { background: var(--bg-soft); }
.nav-toggle { display: none; }

/* Layout */
.layout { flex: 1; width: 100%; max-width: 1440px; margin: 0 auto; display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); }
.layout.no-sidebar { grid-template-columns: minmax(0, 1fr); }
.layout.no-sidebar .sidebar { display: none; }
.sidebar {
  position: sticky; top: var(--topbar-h); align-self: start; height: calc(100vh - var(--topbar-h)); overflow-y: auto;
  padding: 20px 12px 40px 20px; border-right: 1px solid var(--border); font-size: 14.5px;
}
.side-home { display: block; padding: 6px 10px; border-radius: 8px; color: var(--text); font-weight: 600; margin-bottom: 6px; }
.side-section summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 8px;
  font-weight: 600; color: var(--text);
}
.side-section summary::-webkit-details-marker { display: none; }
.side-section summary::after { content: "›"; margin-left: auto; color: var(--muted); transition: transform 0.15s; font-size: 18px; line-height: 1; }
.side-section[open] summary::after { transform: rotate(90deg); }
.side-section summary:hover, .side-home:hover { background: var(--bg-soft); text-decoration: none; }
.side-icon { display: inline-flex; color: var(--brand); }
.side-icon .icon { width: 18px; height: 18px; }
.side-section ul { list-style: none; margin: 2px 0 8px; padding: 0 0 0 20px; border-left: 1px solid var(--border); margin-left: 19px; }
.side-section li a { display: block; padding: 5px 10px; color: var(--text-soft); border-radius: 6px; }
.side-section li a:hover { color: var(--text); background: var(--bg-soft); text-decoration: none; }
.sidebar a.active { color: var(--brand); background: color-mix(in srgb, var(--brand) 10%, transparent); font-weight: 600; }
.content { min-width: 0; padding: 32px 40px 64px; }
.layout.no-sidebar .content { max-width: 1180px; width: 100%; margin: 0 auto; }

/* Página */
.page-grid { display: grid; grid-template-columns: minmax(0, 1fr) 220px; gap: 48px; max-width: 1100px; }
.doc { max-width: 780px; min-width: 0; }
.breadcrumb { display: flex; flex-wrap: wrap; gap: 8px; font-size: 14px; color: var(--muted); margin-bottom: 12px; }
.breadcrumb a { color: var(--muted); }
h1 { font-size: 2.1rem; line-height: 1.2; letter-spacing: -0.02em; margin: 0 0 12px; }
.lead { font-size: 1.15rem; color: var(--text-soft); margin: 0 0 28px; }
.toc { position: sticky; top: calc(var(--topbar-h) + 32px); align-self: start; font-size: 14px; max-height: calc(100vh - 120px); overflow: auto; }
.toc-title { font-weight: 600; margin: 0 0 8px; font-size: 13px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }
.toc ul { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--border); }
.toc li a { display: block; padding: 4px 12px; color: var(--text-soft); margin-left: -1px; border-left: 2px solid transparent; }
.toc li a:hover { color: var(--text); text-decoration: none; }
.toc li a.current { color: var(--brand); border-left-color: var(--brand); }
.toc .toc-l3 a { padding-left: 24px; }
.doc-footer { margin-top: 48px; padding-top: 20px; border-top: 1px solid var(--border); }
.updated { font-size: 14px; color: var(--muted); margin: 0 0 20px; }
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.pager a { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; border: 1px solid var(--border); border-radius: var(--radius); color: var(--text); }
.pager a:hover { border-color: var(--brand); text-decoration: none; }
.pager-next { text-align: right; grid-column: 2; }
.pager-label { font-size: 13px; color: var(--muted); }
.pager-title { font-weight: 600; color: var(--link); }

/* Conteúdo (markdown) */
.prose { font-size: 16.5px; }
.prose > :first-child { margin-top: 0; }
.prose h2 { font-size: 1.5rem; line-height: 1.3; margin: 2.2em 0 0.6em; letter-spacing: -0.01em; }
.prose h3 { font-size: 1.2rem; margin: 1.8em 0 0.5em; }
.prose h4, .prose h5, .prose h6 { font-size: 1rem; margin: 1.5em 0 0.4em; }
.prose h2 .anchor, .prose h3 .anchor, .prose h4 .anchor { opacity: 0; margin-left: 8px; color: var(--muted); font-weight: 400; }
.prose h2:hover .anchor, .prose h3:hover .anchor, .prose h4:hover .anchor { opacity: 1; }
.prose p, .prose ul, .prose ol, .prose table, .prose blockquote, .prose pre { margin: 0 0 1.1em; }
.prose ul, .prose ol { padding-left: 1.5em; }
.prose li { margin: 0.3em 0; }
.prose li > p { margin: 0.3em 0; }
.prose ol { counter-reset: none; }
.prose code { font: 0.88em/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; background: var(--code-bg); padding: 0.15em 0.4em; border-radius: 6px; }
.prose pre { background: var(--code-bg); padding: 14px 16px; border-radius: 10px; overflow-x: auto; }
.prose pre code { background: none; padding: 0; }
.prose kbd { font: 0.85em ui-monospace, monospace; border: 1px solid var(--border); border-bottom-width: 2px; border-radius: 6px; padding: 0.1em 0.45em; background: var(--bg-soft); }
.prose blockquote { border-left: 3px solid var(--border); padding: 2px 0 2px 16px; color: var(--text-soft); }
.prose hr { border: 0; border-top: 1px solid var(--border); margin: 2.5em 0; }
.prose mark { background: var(--mark); color: inherit; padding: 0 2px; border-radius: 3px; }
.prose details { border: 1px solid var(--border); border-radius: 10px; padding: 10px 14px; margin: 0 0 1.1em; }
.prose details summary { cursor: pointer; font-weight: 600; }
.prose details > :last-child { margin-bottom: 0; }
.prose details[open] summary { margin-bottom: 6px; }
.prose input[type="checkbox"] { margin-right: 6px; }
.prose li:has(> input[type="checkbox"]) { list-style: none; margin-left: -1.3em; }
.table-wrap { overflow-x: auto; margin: 0 0 1.2em; border: 1px solid var(--border); border-radius: 10px; }
.prose table { border-collapse: collapse; width: 100%; font-size: 15px; margin: 0; }
.prose th, .prose td { padding: 9px 12px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
.prose th { background: var(--bg-soft); font-weight: 600; }
.prose tr:last-child td { border-bottom: 0; }
.media { margin: 1.4em 0 1.6em; }
.media img { display: block; border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--shadow); }
.media .zoom { display: block; cursor: zoom-in; }
.media video { display: block; width: 100%; border-radius: 10px; background: #000; }
.media audio { width: 100%; }
.media figcaption { margin-top: 8px; font-size: 14px; color: var(--muted); text-align: center; }
.video-embed { position: relative; aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden; background: #000; }
.video-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
img.inline { display: inline; vertical-align: middle; max-height: 1.6em; border: 0; box-shadow: none; }
.callout { border: 1px solid var(--border); border-left: 4px solid var(--c, var(--note)); background: color-mix(in srgb, var(--c, var(--note)) 7%, var(--bg)); border-radius: 10px; padding: 12px 16px; margin: 0 0 1.2em; }
.callout > :last-child { margin-bottom: 0; }
.callout-title { font-weight: 700; color: var(--c, var(--note)); margin: 0 0 4px !important; font-size: 14px; text-transform: uppercase; letter-spacing: 0.04em; }
.callout-note { --c: var(--note); }
.callout-tip { --c: var(--tip); }
.callout-important { --c: var(--important); }
.callout-warning { --c: var(--warning); }
.callout-caution { --c: var(--caution); }
.footnotes, .footnote-definition { font-size: 14px; color: var(--text-soft); }

/* Início */
.hero { text-align: center; padding: 40px 0 36px; }
.hero h1 { font-size: 2.6rem; background: linear-gradient(90deg, var(--navy), var(--brand)); -webkit-background-clip: text; background-clip: text; color: transparent; }
@media (prefers-color-scheme: dark) { .hero h1 { background: linear-gradient(90deg, #fff, var(--brand-2)); -webkit-background-clip: text; background-clip: text; } }
.hero .lead { max-width: 640px; margin: 0 auto 24px; }
.hero-search { position: relative; display: flex; gap: 8px; max-width: 640px; margin: 0 auto 8px; }
.doc .hero-search { margin: 0 0 24px; }
.hero-search .icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.hero-search input { flex: 1; min-width: 0; height: 50px; padding: 0 14px 0 44px; font: inherit; border: 1px solid var(--border); border-radius: 12px; background: var(--bg-card); color: var(--text); box-shadow: var(--shadow); }
.hero-search input:focus { outline: none; border-color: var(--brand); }
.hero-search button { height: 50px; padding: 0 20px; border: 0; border-radius: 12px; font: inherit; font-weight: 600; color: #fff; background: var(--brand); cursor: pointer; }
.hero-search button:hover { filter: brightness(1.08); }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 16px; padding: 20px; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.card-head { display: flex; gap: 14px; color: var(--text); }
.card-head:hover { text-decoration: none; }
.card-head:hover .card-title { color: var(--brand); }
.card-icon { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; flex: none; border-radius: 12px; color: var(--brand); background: color-mix(in srgb, var(--brand) 10%, transparent); }
.card-icon .icon { width: 22px; height: 22px; }
.card-title { display: block; font-weight: 700; font-size: 1.1rem; line-height: 1.3; }
.card-desc { display: block; color: var(--text-soft); font-size: 14.5px; margin-top: 4px; line-height: 1.5; }
.card-links { list-style: none; margin: 14px 0 0; padding: 12px 0 0; border-top: 1px solid var(--border); font-size: 15px; }
.card-links li { padding: 3px 0; }
.card-more { margin-top: auto; padding-top: 10px; font-size: 14px; font-weight: 600; }
.home-intro { max-width: 780px; margin: 48px auto 0; }
.empty { text-align: center; padding: 48px 16px; border: 1px dashed var(--border); border-radius: 16px; color: var(--text-soft); }

/* Seção */
.section-head { display: flex; gap: 16px; align-items: flex-start; }
.section-head .card-icon { margin-top: 4px; }
.page-list { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 12px; }
.page-list a { display: block; padding: 16px 18px; border: 1px solid var(--border); border-radius: var(--radius); color: var(--text); background: var(--bg-card); }
.page-list a:hover { border-color: var(--brand); text-decoration: none; }
.page-title { display: block; font-weight: 600; color: var(--link); }
.page-desc { display: block; color: var(--text-soft); font-size: 15px; margin-top: 2px; }

/* Busca */
.results { list-style: none; margin: 16px 0 0; padding: 0; }
.results li { padding: 16px 0; border-bottom: 1px solid var(--border); }
.results a { display: block; }
.results a:hover { text-decoration: none; }
.result-section { display: block; font-size: 13px; color: var(--muted); }
.result-title { font-size: 1.15rem; font-weight: 600; }
.results a:hover .result-title { text-decoration: underline; }
.result-snippet { margin: 4px 0 0; color: var(--text-soft); font-size: 15px; }
.result-snippet mark { background: var(--mark); color: inherit; border-radius: 3px; padding: 0 2px; }
.no-results { padding: 20px; border: 1px dashed var(--border); border-radius: var(--radius); }

.site-footer { border-top: 1px solid var(--border); font-size: 14px; color: var(--muted); }
.footer-inner { max-width: 1440px; margin: 0 auto; padding: 20px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

/* Responsivo */
@media (max-width: 1200px) {
  .page-grid { grid-template-columns: minmax(0, 1fr); }
  .toc { display: none; }
}
@media (max-width: 900px) {
  :root { --topbar-h: 58px; }
  .nav-button { display: inline-flex; }
  .layout, .layout.no-sidebar { grid-template-columns: minmax(0, 1fr); }
  .sidebar, .layout.no-sidebar .sidebar {
    display: none; position: fixed; top: var(--topbar-h); left: 0; right: 0; bottom: 0; height: auto; z-index: 25;
    background: var(--bg); border-right: 0; padding: 16px 16px 48px;
  }
  .nav-toggle:checked ~ .layout .sidebar { display: block; }
  .nav-toggle:checked ~ .layout .content { visibility: hidden; }
  .content { padding: 24px 16px 48px; }
  .platform-link { display: none; }
  .search-key { display: none; }
  .topbar-inner { padding: 0 12px; gap: 10px; }
  .search input { padding-right: 12px; }
}
@media (max-width: 560px) {
  .brand-name { display: none; }
  h1 { font-size: 1.7rem; }
  .hero { padding: 20px 0 24px; }
  .hero h1 { font-size: 2rem; }
  .hero-search button { display: none; }
  .cards { grid-template-columns: minmax(0, 1fr); }
  .pager { grid-template-columns: 1fr; }
  .pager-next { grid-column: 1; }
}
@media print {
  .topbar, .sidebar, .toc, .pager, .site-footer { display: none !important; }
  .layout { display: block; }
}
.search-results .sr-title { display: block; font-weight: 600; }
