/* ============================================================
   ECONODATA — Design Tokens
   Fonte: skills econodata-design-tokens / econodata-components
   ============================================================ */
:root {
  /* Brand — ecdt-azul */
  --ecdt-azul-0: #f3f7ff;
  --ecdt-azul-50: #cee3f7;
  --ecdt-azul-200: #9dc7f0;
  --ecdt-azul-300: #6dabe8;
  --ecdt-azul-400: #3c8fe1;
  --ecdt-azul-500: #0b73d9;
  --ecdt-azul-600: #095cae;
  --ecdt-azul-700: #074582;
  --ecdt-azul-800: #042e57;
  --ecdt-azul-900: #032341;
  /* Brand — ecdt-verde */
  --ecdt-verde-0: #eef9f1;
  --ecdt-verde-300: #9adaaa;
  --ecdt-verde-400: #78ce8d;
  --ecdt-verde-500: #56c271;
  --ecdt-verde-600: #459b5a;
  --ecdt-verde-700: #347444;
  /* Brand — ecdt-lilas */
  --ecdt-lilas-0: #f5e7f5;
  --ecdt-lilas-500: #981d97;
  /* Neutral */
  --neutral-0: #ffffff;
  --neutral-50: #fafafa;
  --neutral-100: #f5f5f5;
  --neutral-200: #e5e5e5;
  --neutral-300: #d4d4d4;
  --neutral-400: #a3a3a3;
  --neutral-500: #737373;
  --neutral-600: #525252;
  --neutral-700: #404040;
  --neutral-800: #262626;
  --neutral-900: #171717;
  --neutral-950: #0a0a0a;
  /* System */
  --red-50: #fef2f2;
  --red-500: #ef4444;
  --red-600: #dc2626;
  --amber-50: #fffbeb;
  --amber-500: #f59e0b;
  --amber-600: #d97706;
  --font-sans: 'Open Sans', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
  /* Radius */
  --r-sm: 4px;
  --r-md: 6px;
  --r-lg: 8px;
  --r-xl: 12px;
  --r-2xl: 16px;
  --r-full: 9999px;
}

/* ----- Theme: DARK (default) ----- */
[data-theme="dark"] {
  --bg-page: #0b0f16;
  --bg-elevated: #111826;
  --bg-card: #131b2b;
  --bg-code: #0a0e15;
  --bg-inline-code: #1c2534;
  --bg-subtle: #0f1520;
  --border: #1f2937;
  --border-strong: #2b3648;
  --text-primary: #f1f5f9;
  --text-secondary: #b6c2d4;
  --text-muted: #7d8ba1;
  --accent: var(--ecdt-azul-400);
  --accent-strong: var(--ecdt-azul-500);
  --accent-soft: rgba(11,115,217,0.14);
  --green: var(--ecdt-verde-400);
  --green-soft: rgba(86,194,113,0.13);
  --hero-glow-1: rgba(11,115,217,0.28);
  --hero-glow-2: rgba(86,194,113,0.16);
  --grid-line: rgba(255,255,255,0.028);
  --shadow-card: 0 1px 3px rgba(0,0,0,0.4), 0 8px 24px -12px rgba(0,0,0,0.6);
  --shadow-lg: 0 24px 60px -20px rgba(0,0,0,0.7);
}

/* ----- Theme: LIGHT ----- */
/* Claro: a página NÃO é branco puro. Com #fff na página e #fff nos cards, a tela vira um
   bloco só de luz — cansa a vista e o card perde a borda. A página ganha um off-white de
   base azulada (mesma família do azul da marca), os cards continuam brancos e passam a se
   destacar por contraste, e os tons de apoio descem junto para não sumirem no novo fundo. */
[data-theme="light"] {
  --bg-page: #f4f7fb;
  --bg-elevated: #ffffff;
  --bg-card: #ffffff;
  --bg-code: #0b0f16;
  --bg-inline-code: #e8eef7;
  --bg-subtle: #eaf1f8;
  --border: #dbe3ec;
  --border-strong: #c3cfdd;
  --text-primary: #042e57;
  --text-secondary: #404040;
  --text-muted: #737373;
  --accent: var(--ecdt-azul-500);
  --accent-strong: var(--ecdt-azul-600);
  --accent-soft: #e6eefc;
  --green: var(--ecdt-verde-600);
  --green-soft: #e6f6ec;
  --hero-glow-1: rgba(11,115,217,0.10);
  --hero-glow-2: rgba(86,194,113,0.08);
  --grid-line: rgba(4,46,87,0.04);
  --shadow-card: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px -1px rgba(0,0,0,0.06);
  --shadow-lg: 0 20px 50px -15px rgba(4,46,87,0.18);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  font-family: var(--font-sans);
  background: var(--bg-page);
  color: var(--text-secondary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background .4s ease, color .4s ease;
  overflow-x: hidden;
}
::selection { background: var(--accent-soft); color: var(--text-primary); }

/* ---------- Layout helpers ---------- */
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 860px; }
section { position: relative; }
h1,h2,h3,h4 { color: var(--text-primary); font-weight: 700; line-height: 1.15; letter-spacing: -0.02em; }
a { color: inherit; text-decoration: none; }
code, pre, .mono { font-family: var(--font-mono); }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 16px;
}
.eyebrow::before { content: ''; width: 22px; height: 2px; background: var(--accent); border-radius: 2px; }
.inline-code {
  font-family: var(--font-mono); font-size: .88em;
  background: var(--bg-inline-code); color: var(--text-primary);
  padding: 2px 7px; border-radius: var(--r-sm); border: 1px solid var(--border);
  /* Quebra só quando não couber. Com `nowrap` e `body{overflow-x:hidden}`, uma lista
     longa (os escopos read-only) era CORTADA no mobile em vez de rolar — o leitor
     perdia o fim da linha sem nenhum indício de que havia mais texto. */
  white-space: normal; overflow-wrap: anywhere;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-sans); font-weight: 700; font-size: 16px;
  padding: 0 22px; height: 52px; border-radius: var(--r-md);
  cursor: pointer; border: 1px solid transparent; transition: all .2s ease;
  white-space: nowrap;
}
.btn svg { width: 18px; height: 18px; }
.btn-primary { background: var(--ecdt-azul-500); color: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.15); }
.btn-primary:hover { background: var(--ecdt-azul-600); transform: translateY(-1px); box-shadow: 0 8px 20px -6px rgba(11,115,217,.5); }
.btn-primary:active { background: var(--ecdt-azul-700); transform: translateY(0); }
.btn-ghost { background: transparent; color: var(--text-primary); border-color: var(--border-strong); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-sm { height: 40px; font-size: 14px; padding: 0 16px; }

/* ---------- Nav ---------- */
/* ---------- Nav ---------- */
header.nav {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--bg-page) 82%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: flex; align-items: center; gap: 12px; font-weight: 800; color: var(--text-primary); font-size: 17px; letter-spacing: -.02em; }
.brand-logo { height: 36px; width: auto; display: block; }
[data-theme="dark"] .brand-logo--light { display: none; }
[data-theme="light"] .brand-logo--dark { display: none; }
.brand em.brand-suffix {
  font-style: normal; font-weight: 700; font-size: 12px; line-height: 1;
  letter-spacing: .02em;
  display: inline-flex; align-items: center;
  padding: 4px 9px; border-radius: var(--r-full);
  background: var(--accent-soft); color: var(--accent);
  border: 1px solid color-mix(in srgb, var(--accent) 28%, transparent);
}
.nav-links { display: flex; align-items: center; gap: 30px; }
.nav-links a.nl { font-size: 14px; font-weight: 600; color: var(--text-muted); transition: color .2s; }
.nav-links a.nl:hover { color: var(--text-primary); }
.nav-actions { display: flex; align-items: center; gap: 14px; }
.theme-toggle {
  width: 40px; height: 40px; border-radius: var(--r-md);
  border: 1px solid var(--border-strong); background: var(--bg-card);
  cursor: pointer; display: grid; place-items: center; color: var(--text-secondary);
  transition: all .2s;
}
.theme-toggle:hover { color: var(--accent); border-color: var(--accent); }
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .icon-sun { display: none; }
[data-theme="light"] .theme-toggle .icon-sun { display: block; }
[data-theme="light"] .theme-toggle .icon-moon { display: none; }

/* ---------- Card de índice (na primeira dobra) ---------- */
/* ---------- Índice flutuante (FAB + painel) ---------- */
.toc-fab {
  position: fixed; right: 24px; bottom: 24px; z-index: 80;
  width: 54px; height: 54px; border-radius: var(--r-full);
  background: var(--ecdt-azul-500); color: #fff; border: none; cursor: pointer;
  display: grid; place-items: center;
  /* O 1º anel é o que separa o FAB do que passa por baixo: ele usa o MESMO `--ecdt-azul-500`
     do `.btn-primary`, então sobre o CTA "Começar agora" (colisão real em telas de ~790px de
     altura) os dois viravam uma mancha azul só. Sobre o fundo o anel é invisível, por desenho. */
  box-shadow: 0 0 0 3px var(--bg-page), 0 10px 28px -6px rgba(11,115,217,.55);
  transition: background .2s ease, transform .2s ease;
}
.toc-fab:hover { background: var(--ecdt-azul-600); transform: translateY(-2px); }
.toc-fab:active { background: var(--ecdt-azul-700); }
.toc-fab svg { width: 24px; height: 24px; }
.toc-fab .ic-close { display: none; }
.toc-fab.open .ic-open { display: none; }
.toc-fab.open .ic-close { display: block; }

.toc-scrim {
  position: fixed; inset: 0; z-index: 78; background: rgba(0,0,0,.5);
  opacity: 0; visibility: hidden; transition: opacity .25s ease;
}
.toc-scrim.open { opacity: 1; visibility: visible; }

.toc-panel {
  position: fixed; right: 24px; bottom: 90px; z-index: 79;
  width: 248px; max-height: 68vh; overflow-y: auto;
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--r-xl);
  padding: 20px 18px; box-shadow: var(--shadow-lg);
  opacity: 0; visibility: hidden; transform: translateY(10px) scale(.98);
  transform-origin: bottom right;
  transition: opacity .22s ease, transform .22s ease, visibility .22s;
}
.toc-panel.open { opacity: 1; visibility: visible; transform: none; }
.toc-panel .toc-title {
  font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--text-muted); margin-bottom: 14px; padding-left: 12px;
}
.toc-panel ul { list-style: none; display: flex; flex-direction: column; gap: 2px; }
.toc-panel a {
  display: block; font-size: 14px; font-weight: 600; color: var(--text-muted);
  padding: 8px 12px; border-radius: var(--r-md); border-left: 2px solid transparent;
  transition: all .16s ease; line-height: 1.35;
}
.toc-panel a:hover { color: var(--text-primary); background: var(--bg-subtle); }
.toc-panel a.active {
  color: var(--accent); background: var(--accent-soft);
  border-left-color: var(--accent); font-weight: 700;
}
/* Mobile: painel colado às margens; scrim cobre a tela */
@media (max-width: 560px) {
  .toc-panel { left: 16px; right: 16px; width: auto; bottom: 88px; }
  .toc-fab { right: 16px; bottom: 16px; }
}

/* ---------- Hero ---------- */
.hero { padding: 92px 0 76px; overflow: hidden; }
.hero::before {
  content: ''; position: absolute; inset: 0; z-index: -2;
  background:
    radial-gradient(60% 55% at 18% 8%, var(--hero-glow-1), transparent 62%),
    radial-gradient(45% 45% at 92% 20%, var(--hero-glow-2), transparent 60%);
}
.hero::after {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background-image: linear-gradient(var(--grid-line) 1px, transparent 1px), linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(ellipse 90% 60% at 50% 0%, #000 55%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 90% 60% at 50% 0%, #000 55%, transparent 100%);
}
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; }
.badge-pill {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 7px 14px 7px 11px; border-radius: var(--r-full);
  background: var(--bg-card); border: 1px solid var(--border-strong);
  font-size: 13px; font-weight: 600; color: var(--text-secondary); margin-bottom: 26px;
}
.badge-pill .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ecdt-verde-500); box-shadow: 0 0 0 3px var(--green-soft); animation: pulse 2.4s infinite; }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.45} }
.hero h1 { font-size: 56px; font-weight: 800; letter-spacing: -.035em; margin-bottom: 22px; }
.hero h1 .grad {
  background: linear-gradient(105deg, var(--ecdt-azul-400) 0%, var(--ecdt-verde-400) 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
[data-theme="light"] .hero h1 .grad { background: linear-gradient(105deg, var(--ecdt-azul-600), var(--ecdt-verde-600)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.hero p.lead { font-size: 19px; line-height: 1.6; color: var(--text-secondary); margin-bottom: 34px; max-width: 540px; }
.hero p.lead strong { color: var(--text-primary); font-weight: 700; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 30px; }
.hero-meta { display: flex; gap: 26px; flex-wrap: wrap; }
.hero-meta .item { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--text-muted); font-weight: 600; }
.hero-meta .item svg { width: 16px; height: 16px; color: var(--green); }

/* Hero code window */
.code-window {
  background: var(--bg-code); border: 1px solid var(--border-strong);
  border-radius: var(--r-xl); overflow: hidden; box-shadow: var(--shadow-lg);
}
.cw-bar { display: flex; align-items: center; gap: 8px; padding: 13px 16px; border-bottom: 1px solid rgba(255,255,255,.06); background: rgba(255,255,255,.02); }
.cw-dot { width: 11px; height: 11px; border-radius: 50%; }
.cw-dot.r { background: #ff5f57; } .cw-dot.y { background: #febc2e; } .cw-dot.g { background: #28c840; }
.cw-title { margin-left: 8px; font-family: var(--font-mono); font-size: 12px; color: #8a99b0; }
.cw-body { padding: 20px 22px; font-family: var(--font-mono); font-size: 13.5px; line-height: 1.75; overflow-x: auto; }
.cw-body pre { color: #cdd6e4; white-space: pre; }
.tok-cmd { color: #7fd0ff; } .tok-flag { color: #b6a0ff; } .tok-str { color: #7fe0a5; } .tok-com { color: #5f7186; } .tok-key { color: #ff9d7a; } .tok-punc{color:#8a99b0;}
[data-theme="light"] .cw-body pre { color: #e5edf7; }

/* ---------- Section framing ---------- */
.section-pad { padding: 96px 0; }
.section-head { max-width: 680px; margin-bottom: 52px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head h2 { font-size: 38px; letter-spacing: -.03em; margin-bottom: 16px; }
.section-head p { font-size: 18px; color: var(--text-secondary); }
/* sub-cabeçalho de um bloco dentro da seção (ex.: "Atalhos prontos" em #inteligencia):
   o .section-head só estilizava h2, então um h3 ali caía no tamanho default do reset. */
.sub-head { margin-top: 56px; }
.sub-head h3 { font-size: 26px; letter-spacing: -.02em; margin-bottom: 12px; }
.divider-soft { border: none; border-top: 1px solid var(--border); }

/* ---------- What is / feature cards ---------- */
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.fcard {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--r-xl);
  padding: 28px 26px; transition: all .25s ease; position: relative; overflow: hidden;
}
.fcard:hover { border-color: var(--accent); transform: translateY(-3px); box-shadow: var(--shadow-card); }
.fcard .ic {
  width: 46px; height: 46px; border-radius: var(--r-lg); display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent); margin-bottom: 18px;
}
.fcard .ic svg { width: 23px; height: 23px; }
.fcard h3 { font-size: 19px; margin-bottom: 9px; }
.fcard p { font-size: 15px; color: var(--text-secondary); line-height: 1.6; }
.fcard .ic.green { background: var(--green-soft); color: var(--green); }

/* ---------- Env endpoints ---------- */
.env-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 34px; }
.env-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--r-lg);
  padding: 22px 24px; display: flex; flex-direction: column; gap: 12px;
}
.env-card .tag {
  align-self: flex-start; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
  padding: 4px 10px; border-radius: var(--r-full);
}
.env-card.prd .tag { background: var(--green-soft); color: var(--green); }
.env-card.test .tag { background: var(--accent-soft); color: var(--accent); }
.env-card .url { font-family: var(--font-mono); font-size: 14.5px; color: var(--text-primary); word-break: break-all; }
.env-card .lbl { font-size: 13px; color: var(--text-muted); }

/* ---------- Steps (como funciona) ---------- */
.steps { display: grid; grid-template-columns: repeat(3,1fr); gap: 24px; counter-reset: step; }
.step { position: relative; padding-top: 8px; }
.step .num {
  font-family: var(--font-mono); font-size: 14px; font-weight: 600; color: var(--accent);
  width: 40px; height: 40px; border-radius: var(--r-md); border: 1px solid var(--border-strong);
  display: grid; place-items: center; margin-bottom: 18px; background: var(--bg-card);
}
.step h3 { font-size: 18px; margin-bottom: 8px; }
.step p { font-size: 15px; color: var(--text-secondary); }
.step p code { font-size: 13px; }

/* ---------- Tabs (quick start) ---------- */
.tabs-bar { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 0; flex-wrap: wrap; }
.tab-btn {
  font-family: var(--font-sans); font-size: 14px; font-weight: 600; color: var(--text-muted);
  background: none; border: none; padding: 12px 18px; cursor: pointer; position: relative;
  border-bottom: 2px solid transparent; margin-bottom: -1px; transition: color .2s;
}
.tab-btn:hover { color: var(--text-primary); }
.tab-btn.active { color: var(--accent); border-bottom-color: var(--accent); font-weight: 700; }
/* Painel de aba com passo a passo em vez de código: o .codeblock encosta na barra de abas
   de propósito (border-top:none), mas uma lista de passos precisa respirar. */
.tab-panel > .prereq-list { padding-top: 26px; }
.tab-panel { display: none; }
.tab-panel.active { display: block; animation: fadeIn .3s ease; }
@keyframes fadeIn { from { opacity:0; transform: translateY(4px);} to {opacity:1; transform:none;} }

/* code block */
.codeblock {
  background: var(--bg-code); border: 1px solid var(--border-strong); border-top: none;
  border-radius: 0 0 var(--r-lg) var(--r-lg); position: relative;
}
.codeblock .cb-top { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px 10px 18px; border-bottom: 1px solid rgba(255,255,255,.06); }
.codeblock .cb-file { font-family: var(--font-mono); font-size: 12.5px; color: #8a99b0; }
.copy-btn {
  display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-sans);
  font-size: 12.5px; font-weight: 600; color: #8a99b0; background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.09); border-radius: var(--r-sm); padding: 5px 10px; cursor: pointer; transition: all .2s;
}
.copy-btn:hover { color: #fff; border-color: rgba(255,255,255,.2); }
.copy-btn.done { color: var(--ecdt-verde-400); border-color: var(--ecdt-verde-400); }
.copy-btn svg { width: 13px; height: 13px; }
.codeblock pre { padding: 20px 22px; overflow-x: auto; font-family: var(--font-mono); font-size: 13.5px; line-height: 1.7; color: #cdd6e4; }
.codeblock.attached { border-radius: 0 0 var(--r-lg) var(--r-lg); }
.qs-note { margin-top: 16px; font-size: 14px; color: var(--text-muted); display: flex; gap: 9px; align-items: flex-start; }
.qs-note svg { width: 17px; height: 17px; color: var(--accent); flex-shrink: 0; margin-top: 2px; }
.qs-note.warn svg { color: var(--amber-500); }

/* ---------- Prereqs ---------- */
.prereq-list { display: grid; gap: 16px; margin-top: 12px; }
.prereq {
  display: flex; gap: 16px; padding: 20px 22px; background: var(--bg-card);
  border: 1px solid var(--border); border-radius: var(--r-lg);
}
.prereq .pn {
  flex-shrink: 0; width: 30px; height: 30px; border-radius: var(--r-full);
  background: var(--accent-soft); color: var(--accent); display: grid; place-items: center;
  font-weight: 700; font-size: 14px; font-family: var(--font-mono);
}
.prereq h4 { font-size: 16px; margin-bottom: 4px; }
.prereq p { font-size: 14.5px; color: var(--text-secondary); }

/* ---------- Tools table ---------- */
.tbl-wrap { border: 1px solid var(--border); border-radius: var(--r-xl); overflow: hidden; background: var(--bg-card); }
.tbl-scroll { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: 14.5px; min-width: 640px; }
table.data th {
  text-align: left; font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: .04em;
  color: var(--text-muted); padding: 14px 20px; background: var(--bg-subtle); border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
table.data td { padding: 15px 20px; border-bottom: 1px solid var(--border); color: var(--text-secondary); vertical-align: top; }
table.data tr:last-child td { border-bottom: none; }
table.data tbody tr { transition: background .15s; }
table.data tbody tr:hover { background: var(--bg-subtle); }
table.data td code, table.data th code { font-family: var(--font-mono); font-size: 13px; color: var(--accent); white-space: nowrap; }
.chip {
  display: inline-block; font-family: var(--font-mono); font-size: 12px; font-weight: 500;
  padding: 3px 9px; border-radius: var(--r-full); background: var(--bg-inline-code);
  color: var(--text-secondary); border: 1px solid var(--border); white-space: nowrap;
}
.chip.free { background: var(--green-soft); color: var(--green); border-color: transparent; }
.chip.paid { background: var(--accent-soft); color: var(--accent); border-color: transparent; }

/* ---------- Scopes ---------- */
.scope-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 14px; }
.scope {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--r-lg);
  padding: 18px 20px;
}
.scope .sc-name { font-family: var(--font-mono); font-size: 14px; font-weight: 600; color: var(--accent); margin-bottom: 10px; }
.scope .sc-tools { display: flex; flex-wrap: wrap; gap: 6px; }

/* ---------- Callout ---------- */
.callout {
  display: flex; gap: 15px; padding: 20px 22px; border-radius: var(--r-lg);
  border: 1px solid var(--border); background: var(--bg-card); margin-top: 26px;
}
.callout.info { border-left: 3px solid var(--ecdt-azul-500); }
.callout.warn { border-left: 3px solid var(--amber-500); }
.callout.green { border-left: 3px solid var(--ecdt-verde-500); }
.callout .ci { flex-shrink: 0; width: 22px; height: 22px; margin-top: 1px; }
.callout.info .ci { color: var(--accent); }
.callout.warn .ci { color: var(--amber-500); }
.callout.green .ci { color: var(--green); }
.callout .ci svg { width: 22px; height: 22px; }
.callout p { font-size: 14.5px; color: var(--text-secondary); }
.callout p strong { color: var(--text-primary); }

/* ---------- Billing cards ---------- */
.bill-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 18px; }
.bill-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--r-xl); padding: 26px; }
.bill-card .bh { display: flex; align-items: center; gap: 11px; margin-bottom: 14px; }
.bill-card .bh .bi { width: 40px; height: 40px; border-radius: var(--r-lg); display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.bill-card .bh .bi svg { width: 21px; height: 21px; }
.bill-card .bh h3 { font-size: 17px; }
.bill-card p { font-size: 14.5px; color: var(--text-secondary); }
.bill-card p code { font-size: 13px; }

/* ---------- Examples ---------- */
.ex-list { display: grid; grid-template-columns: repeat(2,1fr); gap: 14px; }
.ex {
  display: flex; align-items: center; gap: 16px; padding: 16px 20px;
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--r-lg);
  transition: all .2s;
}
.ex:hover { border-color: var(--accent); transform: translateX(3px); }
.ex .q { flex: 1; font-size: 15px; color: var(--text-primary); }
.ex .arrow { color: var(--text-muted); flex-shrink: 0; }
.ex .arrow svg { width: 16px; height: 16px; }
.ex .tool { font-family: var(--font-mono); font-size: 12.5px; color: var(--accent); background: var(--accent-soft); padding: 4px 10px; border-radius: var(--r-sm); white-space: nowrap; }

/* ---------- Errors ---------- */
.err-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 12px; }
.err { display: flex; gap: 14px; padding: 15px 18px; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--r-md); align-items: center; }
.err .code {
  font-family: var(--font-mono); font-weight: 700; font-size: 15px; flex-shrink: 0;
  width: 52px; height: 40px; border-radius: var(--r-sm); display: grid; place-items: center;
  background: var(--bg-inline-code); color: var(--text-primary);
}
.err.e4 .code { color: var(--amber-600); background: var(--amber-50); }
.err.e5 .code { color: var(--red-600); background: var(--red-50); }
[data-theme="dark"] .err.e4 .code { background: rgba(245,158,11,.13); }
[data-theme="dark"] .err.e5 .code { background: rgba(239,68,68,.13); }
.err p { font-size: 14px; color: var(--text-secondary); }

/* ---------- Security ---------- */
.sec-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 18px; }
.sec-card { padding: 24px; border: 1px solid var(--border); border-radius: var(--r-xl); background: var(--bg-card); }
.sec-card .si { width: 42px; height: 42px; border-radius: var(--r-lg); background: var(--green-soft); color: var(--green); display: grid; place-items: center; margin-bottom: 16px; }
.sec-card .si svg { width: 22px; height: 22px; }
.sec-card h3 { font-size: 16px; margin-bottom: 8px; }
.sec-card p { font-size: 14px; color: var(--text-secondary); }
.sec-card p code { font-size: 12.5px; }

/* ---------- Final CTA ---------- */
.final-cta { position: relative; overflow: hidden; }
.cta-box {
  background: linear-gradient(135deg, var(--ecdt-azul-800), var(--ecdt-azul-900));
  border: 1px solid var(--border-strong); border-radius: var(--r-2xl);
  padding: 60px 56px; text-align: center; position: relative; overflow: hidden;
}
[data-theme="light"] .cta-box { background: linear-gradient(135deg, var(--ecdt-azul-600), var(--ecdt-azul-800)); }
.cta-box::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(50% 80% at 50% 0%, rgba(86,194,113,.22), transparent 70%);
}
.cta-box::after {
  content: ''; position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255,255,255,.03) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.03) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(ellipse 70% 100% at 50% 0%, #000, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 70% 100% at 50% 0%, #000, transparent 75%);
}
.cta-box > * { position: relative; z-index: 1; }
.cta-box h2 { color: #fff; font-size: 36px; letter-spacing: -.03em; margin-bottom: 14px; }
.cta-box p { color: rgba(255,255,255,.82); font-size: 18px; max-width: 520px; margin: 0 auto 32px; }
.cta-box .hero-cta { justify-content: center; }
.cta-box .btn-ghost { color: #fff; border-color: rgba(255,255,255,.35); }
.cta-box .btn-ghost:hover { border-color: #fff; background: rgba(255,255,255,.08); color: #fff; }
.trial-eyebrow {
  display: inline-flex; align-items: center; gap: 8px; margin-bottom: 18px;
  padding: 6px 14px; border-radius: var(--r-full);
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.2);
  font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #fff;
}
.trial-eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ecdt-verde-400); box-shadow: 0 0 0 3px rgba(86,194,113,.3); }
.trial-perks {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 14px 28px;
  margin: 0 auto 34px; max-width: 640px;
}
.trial-perks .perk { display: inline-flex; align-items: center; gap: 9px; font-size: 15px; font-weight: 600; color: rgba(255,255,255,.9); }
.trial-perks .perk svg { width: 18px; height: 18px; color: var(--ecdt-verde-400); flex-shrink: 0; }
.cta-box p .ph { color: #fff; font-weight: 700; border-bottom: 1px dashed rgba(255,255,255,.5); }

/* ---------- Footer ---------- */
footer.ft { border-top: 1px solid var(--border); padding: 40px 0; margin-top: 20px; }
.ft-inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; }
.ft-inner p { font-size: 14px; color: var(--text-muted); }
.ft-links { display: flex; gap: 24px; }
.ft-links a { font-size: 14px; color: var(--text-muted); font-weight: 600; transition: color .2s; }
.ft-links a:hover { color: var(--accent); }
.ft-updated { display: inline-block; margin-top: 6px; font-size: 13px; opacity: .75; }

/* ---------- Reveal animation ---------- */
/* Escopado em `.js` (classe posta pelo script inline do <head> da mcp.html): sem JS o
   conteudo nasce visivel, em vez de 53 blocos presos em opacity:0 esperando o observer. */
.js .reveal { opacity: 0; transform: translateY(20px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 940px) {
  /* `min-width:0`: item de grid tem `min-width:auto`, então a coluna 1fr não encolhia
     abaixo do min-content do conteúdo (~524px) e o H1 do hero saía cortado no celular,
     porque o body é `overflow-x:hidden`. */
  .hero-grid { grid-template-columns: 1fr; gap: 32px; }
  .hero-grid > * { min-width: 0; }
  .hero h1 { font-size: 44px; }
  /* A nav não tinha tratamento de mobile: os links passavam da viewport e eram cortados
     pelo `overflow-x:hidden` do body. As âncoras internas saem porque o índice flutuante
     (.toc-fab) já cobre a navegação da página; os links para as outras páginas do portal
     ficam, que é a única forma de sair daqui pelo topo. */
  .nav-links a[href^="#"] { display: none; }
  .feature-grid, .steps, .bill-grid, .sec-grid { grid-template-columns: 1fr; }
  .scope-grid, .ex-list, .err-grid, .env-row { grid-template-columns: 1fr; }
  .section-head h2 { font-size: 30px; }
  .sub-head h3 { font-size: 23px; }
  .cta-box { padding: 44px 28px; }
  .cta-box h2 { font-size: 28px; }
}
@media (max-width: 640px) {
  /* Mesmo com as âncoras escondidas em 940px, sobravam logo (134×40) + pill "API v4" +
     os 2 links do portal + o toggle — largura de sobra num celular: o "Guia de uso"
     quebrava em duas linhas e encostava na "Referência". O pill sai (o hero já diz
     "API v4"), o logo encolhe e os links ficam em nowrap, o que devolve a barra a uma
     linha só sem tirar a única saída para as outras páginas do portal. */
  .nav-inner { height: 56px; gap: 10px; }
  .brand { gap: 8px; }
  .brand-logo { height: 26px; }
  .brand em.brand-suffix { display: none; }
  .nav-links { gap: 16px; }
  .nav-links a.nl { font-size: 13px; white-space: nowrap; }
  .theme-toggle { width: 36px; height: 36px; }
}
/* Telas de 320px (iPhone SE 1ª geração e afins): mesmo com o pill fora, a barra pede 337px
   e o excesso seria cortado em silêncio pelo `overflow-x:hidden` do body. */
@media (max-width: 380px) {
  .nav-inner { gap: 8px; }
  .brand-logo { height: 22px; }
  .nav-links { gap: 12px; }
  .nav-links a.nl { font-size: 12px; }
  .wrap { padding: 0 16px; }
  /* `.ex` é flex nowrap com `.q` em min-width:auto e `.tool` em white-space:nowrap, então a
     linha tinha piso de 351px e não encolhia: em 360px o body é 345 e sobravam 24px cortados
     em silêncio (64px em 320px), levando embora justamente o chip do nome da tool. */
  .ex { flex-wrap: wrap; }
  .ex .q { min-width: 0; }
}
@media (max-width: 560px) {
  .hero h1 { font-size: 36px; }
  .section-pad { padding: 64px 0; }
  .btn { width: 100%; }
  .hero-cta, .cta-box .hero-cta { flex-direction: column; }
  .wrap { padding: 0 18px; }
}
