/* ==========================================================================
   docs.css — design system da documentação, extraído por análise das telas
   da Claude Platform Docs (paleta real amostrada das capturas em 2026-10-14).

   Paleta medida:
     fundo       #151515   (83–87% da tela)
     superfície  #1a1a19   (4–5%)  cartões/áreas
     superfície2 #20201f   (1–2%)  linhas/hover
     borda       #363635   (0.1%) separadores
     texto       #f0eee6   creme, não branco puro
     coral       #f09978   acento primário
     sage        #bcd1ca   acento secundário
     azul        #6da7ec   acento terciário (também é o azul do Claude)
   ========================================================================== */

:root {
  /* superfícies */
  --bg: #151515;
  --surface: #1a1a19;
  --surface-2: #20201f;
  --border: #363635;
  --border-soft: #2c2c2c;

  /* texto */
  --text: #f0eee6;
  --text-dim: #b4b0a4;
  --text-muted: #86817a;

  /* acentos */
  --coral: #f09978;
  --coral-dim: rgba(240, 153, 120, 0.12);
  --sage: #bcd1ca;
  --sage-dim: rgba(188, 209, 202, 0.12);
  --blue: #6da7ec;
  --blue-dim: rgba(109, 167, 236, 0.12);
  --green: #7ec9a0;
  --amber: #e8c07d;
  --red: #e08585;

  /* medidas */
  --sidebar-w: 268px;
  --toc-w: 220px;
  --content-max: 760px;
  --radius: 10px;
  --radius-sm: 6px;

  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", "Fira Code", Menlo,
    Consolas, monospace;

  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.18);
}

/* ── reset ────────────────────────────────────────────────────────────── */
* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 88px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--coral); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }

code, pre, kbd { font-family: var(--mono); }

/* ── tipografia ───────────────────────────────────────────────────────── */
h1, h2, h3, h4 { line-height: 1.25; letter-spacing: -0.015em; font-weight: 600; }

h1 { font-size: 2.35rem; margin: 0 0 1rem; letter-spacing: -0.03em; }
h2 { font-size: 1.5rem; margin: 3.25rem 0 1rem; }
h3 { font-size: 1.12rem; margin: 2rem 0 0.65rem; }
h4 { font-size: 0.95rem; margin: 1.4rem 0 0.5rem; color: var(--text-dim); }

p { margin: 0 0 1.1rem; }

/* lead: parágrafo de descrição logo abaixo do H1 */
.lead {
  font-size: 1.12rem;
  color: var(--text-dim);
  margin: 0 0 2rem;
  max-width: 62ch;
}

strong { color: var(--text); font-weight: 600; }

hr {
  border: 0;
  border-top: 1px solid var(--border-soft);
  margin: 3rem 0;
}

.anchor-link {
  color: var(--text-muted);
  margin-left: 0.4rem;
  font-weight: 400;
  opacity: 0;
  transition: opacity 0.15s;
}
h2:hover .anchor-link, h3:hover .anchor-link { opacity: 1; }

/* inline code */
:not(pre) > code {
  background: var(--surface-2);
  border: 1px solid var(--border-soft);
  border-radius: 4px;
  padding: 0.12em 0.38em;
  font-size: 0.87em;
  color: var(--sage);
  white-space: nowrap;
}

/* ── layout de 3 colunas ──────────────────────────────────────────────── */
.layout { display: flex; align-items: flex-start; }

.sidebar {
  width: var(--sidebar-w);
  flex: 0 0 var(--sidebar-w);
  height: 100vh;
  position: sticky;
  top: 0;
  overflow-y: auto;
  border-right: 1px solid var(--border-soft);
  padding: 1.5rem 0 4rem;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}
.sidebar::-webkit-scrollbar { width: 8px; }
.sidebar::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }

.content {
  flex: 1;
  min-width: 0;
  padding: 3rem 3rem 8rem;
  max-width: calc(var(--content-max) + 6rem);
}

.toc {
  width: var(--toc-w);
  flex: 0 0 var(--toc-w);
  position: sticky;
  top: 0;
  max-height: 100vh;
  overflow-y: auto;
  padding: 3rem 1.5rem 4rem 0;
  scrollbar-width: thin;
}
.toc h6 {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--text-muted);
  margin: 0 0 0.75rem;
}
.toc a {
  display: block;
  color: var(--text-muted);
  font-size: 0.86rem;
  padding: 0.3rem 0 0.3rem 0.75rem;
  border-left: 2px solid transparent;
  margin-bottom: 1px;
}
.toc a:hover { color: var(--text); text-decoration: none; }
.toc a.active { color: var(--coral); border-left-color: var(--coral); }

/* ── topbar ───────────────────────────────────────────────────────────── */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  height: 56px;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0 1.25rem;
  background: rgba(21, 21, 21, 0.88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-soft);
}
.topbar .brand {
  font-weight: 600;
  color: var(--text);
  font-size: 0.95rem;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.topbar .brand .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--coral);
}
.topbar nav { display: flex; gap: 0.35rem; margin-left: 0.5rem; }
.topbar nav a {
  color: var(--text-dim);
  font-size: 0.87rem;
  padding: 0.3rem 0.6rem;
  border-radius: var(--radius-sm);
}
.topbar nav a:hover { color: var(--text); background: var(--surface-2); text-decoration: none; }
.topbar nav a.active { color: var(--text); background: var(--surface-2); }
.topbar .spacer { flex: 1; }
.topbar .version {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  border: 1px solid var(--border-soft);
  padding: 0.12rem 0.45rem;
  border-radius: 4px;
}

.menu-btn {
  display: none;
  background: none;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  color: var(--text);
  padding: 0.3rem 0.55rem;
  cursor: pointer;
  font-size: 0.85rem;
}

/* ── sidebar: navegação ───────────────────────────────────────────────── */
.nav-group { margin-bottom: 1.5rem; }
.nav-title {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  padding: 0 1.25rem;
  margin-bottom: 0.5rem;
  font-weight: 600;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-dim);
  font-size: 0.875rem;
  padding: 0.32rem 1.25rem;
  border-left: 2px solid transparent;
}
.nav-item:hover { color: var(--text); background: var(--surface); text-decoration: none; }
.nav-item.active {
  color: var(--text);
  border-left-color: var(--coral);
  background: var(--surface);
  font-weight: 500;
}
.nav-item .verb {
  font-family: var(--mono);
  font-size: 0.62rem;
  font-weight: 600;
  padding: 0.1rem 0.3rem;
  border-radius: 3px;
  letter-spacing: 0.02em;
  flex: 0 0 42px;
  text-align: center;
}
.verb-get { background: var(--blue-dim); color: var(--blue); }
.verb-post { background: var(--sage-dim); color: var(--sage); }
.verb-put { background: rgba(232, 192, 125, 0.12); color: var(--amber); }
.verb-patch { background: var(--coral-dim); color: var(--coral); }
.verb-delete { background: rgba(224, 133, 133, 0.12); color: var(--red); }

.badge {
  font-size: 0.68rem;
  font-weight: 600;
  padding: 0.08rem 0.4rem;
  border-radius: 20px;
  letter-spacing: 0.01em;
  white-space: nowrap;
}
.badge-beta { background: var(--coral-dim); color: var(--coral); }
.badge-new { background: var(--sage-dim); color: var(--sage); }
.badge-deprecated { background: rgba(224, 133, 133, 0.14); color: var(--red); }

/* ── componentes ──────────────────────────────────────────────────────── */

/* eyebrow + H2 + descrição (cabeçalho de seção) */
.section-head { margin-bottom: 1.75rem; }
.eyebrow {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.11em;
  color: var(--coral);
  font-weight: 600;
  margin-bottom: 0.5rem;
}
.section-head h2 { margin: 0 0 0.5rem; }
.section-head p { color: var(--text-dim); margin: 0; max-width: 58ch; }

/* breadcrumb */
.breadcrumb {
  display: flex;
  gap: 0.45rem;
  align-items: center;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
  flex-wrap: wrap;
}
.breadcrumb a { color: var(--text-dim); }
.breadcrumb a:hover { color: var(--coral); }
.breadcrumb .sep { color: var(--border); }

/* código */
.codeblock {
  position: relative;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  background: var(--surface);
  margin: 1rem 0 1.35rem;
  overflow: hidden;
}
.codeblock .code-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.85rem;
  border-bottom: 1px solid var(--border-soft);
  background: var(--surface-2);
}
.codeblock .lang {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.codeblock .status {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--green);
  font-weight: 600;
}
.codeblock pre {
  margin: 0;
  padding: 0.95rem 1rem;
  overflow-x: auto;
  font-size: 0.855rem;
  line-height: 1.62;
  scrollbar-width: thin;
}
.codeblock pre code { background: none; border: 0; padding: 0; font-size: inherit; color: var(--text); white-space: pre; }

.copy-btn {
  position: absolute;
  top: 0.35rem;
  right: 0.5rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-dim);
  border-radius: var(--radius-sm);
  font-size: 0.7rem;
  padding: 0.2rem 0.5rem;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s;
}
.codeblock:hover .copy-btn { opacity: 1; }
.copy-btn:hover { color: var(--text); border-color: var(--text-muted); }
.copy-btn.done { color: var(--green); border-color: var(--green); }

/* saída de comando / resposta */
.output .code-head { background: rgba(126, 201, 160, 0.06); }
.output { border-color: rgba(126, 201, 160, 0.18); }

/* steps numerados */
.steps { list-style: none; padding: 0; margin: 1.25rem 0 1.5rem; counter-reset: step; }
.step {
  position: relative;
  padding-left: 2.75rem;
  padding-bottom: 0.75rem;
  margin-bottom: 0.75rem;
  border-left: 1px solid var(--border-soft);
  margin-left: 0.85rem;
}
.step:last-child { border-left-color: transparent; padding-bottom: 0; }
.step::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: -0.85rem;
  top: -0.1rem;
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 50%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--coral);
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}
.step h4 { margin: 0 0 0.4rem; font-size: 1rem; color: var(--text); }
.step p { margin: 0 0 0.6rem; color: var(--text-dim); font-size: 0.95rem; }

/* tabs */
.tabs { margin: 1.5rem 0; }
.tablist {
  display: flex;
  gap: 0.15rem;
  border-bottom: 1px solid var(--border-soft);
  overflow-x: auto;
  scrollbar-width: none;
}
.tablist::-webkit-scrollbar { display: none; }
.tab {
  background: none;
  border: 0;
  border-bottom: 2px solid transparent;
  color: var(--text-muted);
  font-family: var(--sans);
  font-size: 0.855rem;
  padding: 0.5rem 0.85rem;
  cursor: pointer;
  white-space: nowrap;
  margin-bottom: -1px;
}
.tab:hover { color: var(--text); }
.tab[aria-selected="true"] { color: var(--coral); border-bottom-color: var(--coral); }
.tabpanel { display: none; }
.tabpanel.active { display: block; }

/* tabelas */
.table-wrap {
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  overflow-x: auto;
  margin: 1rem 0 1.4rem;
}
table { border-collapse: collapse; width: 100%; font-size: 0.9rem; }
th {
  text-align: left;
  padding: 0.62rem 0.9rem;
  background: var(--surface-2);
  color: var(--text-dim);
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.045em;
  border-bottom: 1px solid var(--border-soft);
  white-space: nowrap;
}
td {
  padding: 0.62rem 0.9rem;
  border-bottom: 1px solid var(--border-soft);
  vertical-align: top;
  color: var(--text-dim);
}
tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: rgba(255, 255, 255, 0.015); }
td code { white-space: nowrap; }

/* callouts */
.callout {
  border: 1px solid var(--border-soft);
  border-left: 3px solid var(--blue);
  background: var(--blue-dim);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1.05rem;
  margin: 1.35rem 0;
  font-size: 0.94rem;
}
.callout .callout-title {
  font-weight: 600;
  color: var(--blue);
  margin-bottom: 0.3rem;
  font-size: 0.83rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.callout p { margin: 0 0 0.5rem; color: var(--text-dim); }
.callout p:last-child { margin: 0; }
.callout.note { border-left-color: var(--blue); background: var(--blue-dim); }
.callout.warning { border-left-color: var(--amber); background: rgba(232, 192, 125, 0.1); }
.callout.warning .callout-title { color: var(--amber); }
.callout.tip { border-left-color: var(--green); background: rgba(126, 201, 160, 0.1); }
.callout.tip .callout-title { color: var(--green); }

/* cards */
.cardgrid { display: grid; gap: 0.85rem; margin: 1.25rem 0 1.75rem; }
.cardgrid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.cardgrid.cols-3 { grid-template-columns: repeat(3, 1fr); }

.card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 1.1rem 1.2rem;
  color: inherit;
  transition: border-color 0.15s, background 0.15s, transform 0.15s;
}
.card:hover {
  border-color: var(--border);
  background: var(--surface-2);
  text-decoration: none;
  transform: translateY(-1px);
}
.card.featured { border-color: var(--coral); background: var(--coral-dim); }
.card.featured:hover { border-color: var(--coral); background: rgba(240, 153, 120, 0.16); }
.card .card-icon { font-size: 1.15rem; line-height: 1; margin-bottom: 0.6rem; display: block; }
.card .card-title {
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.3rem;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.98rem;
}
.card .card-desc { color: var(--text-dim); font-size: 0.885rem; line-height: 1.55; }

/* próxima etapa: card destaque + grade */
.nextsteps .ns-lead {
  font-size: 1.02rem;
  color: var(--text-dim);
  margin-bottom: 1.1rem;
}
.ns-hint { color: var(--text-muted); font-size: 0.9rem; margin: 1.6rem 0 0.75rem; }

/* listagem de recursos (entidades com id + tags) */
.entitylist { display: flex; flex-direction: column; gap: 0.5rem; margin: 1.25rem 0 1.5rem; }
.entity {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: 0.85rem 1.05rem;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  background: var(--surface);
}
.entity:hover { border-color: var(--border); background: var(--surface-2); }
.entity .e-title { font-weight: 600; display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.entity .e-title a { color: var(--text); }
.entity .e-title a:hover { color: var(--coral); text-decoration: none; }
.entity .e-id { font-family: var(--mono); font-size: 0.78rem; color: var(--text-muted); }
.entity .e-desc { color: var(--text-dim); font-size: 0.9rem; font-style: italic; }
.entity .e-tags { color: var(--text-muted); font-size: 0.8rem; }
.entity .e-tags span::after { content: " ·"; }
.entity .e-tags span:last-child::after { content: ""; }

/* Journey (home) */
.journey { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.75rem; margin: 1.5rem 0; }
.journey .jstep {
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 1rem;
  position: relative;
}
.journey .jstep-num {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--coral);
  font-weight: 600;
  letter-spacing: 0.06em;
}
.journey .jstep h3 { font-size: 0.98rem; margin: 0.2rem 0 0.6rem; }
.journey .jstep ul { list-style: none; padding: 0; margin: 0; }
.journey .jstep li { margin-bottom: 0.3rem; }
.journey .jstep li a { font-size: 0.87rem; color: var(--text-dim); }
.journey .jstep li a:hover { color: var(--coral); }

/* hero (home) */
.hero { padding: 5rem 0 3.5rem; border-bottom: 1px solid var(--border-soft); }
.hero .eyebrow { margin-bottom: 0.9rem; }
.hero h1 {
  font-size: 3.5rem;
  line-height: 1.05;
  letter-spacing: -0.04em;
  margin: 0 0 1.25rem;
  max-width: 16ch;
}
.hero .lead { font-size: 1.2rem; max-width: 58ch; margin-bottom: 1.75rem; }
.hero .chips { display: flex; gap: 0.6rem; flex-wrap: wrap; margin-bottom: 2.25rem; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 0.4rem 0.95rem;
  font-size: 0.87rem;
  color: var(--text-dim);
  background: var(--surface);
}
.chip:hover { border-color: var(--coral); color: var(--coral); text-decoration: none; }

/* blocos de destaque na home */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin: 1.5rem 0 2rem; }
.split .card { padding: 1.5rem; }
.split .card h3 { margin: 0.3rem 0 0.5rem; font-size: 1.15rem; }
.split .card .card-links { margin-top: 1rem; display: flex; flex-direction: column; gap: 0.3rem; }
.split .card .card-links a { font-size: 0.88rem; color: var(--text-dim); }
.split .card .card-links a:hover { color: var(--coral); }

/* rodapé */
.footer {
  border-top: 1px solid var(--border-soft);
  margin-top: 5rem;
  padding: 1.75rem 0 0;
  color: var(--text-muted);
  font-size: 0.85rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}
.footer .feedback { display: flex; align-items: center; gap: 0.6rem; }
.footer .feedback button {
  background: var(--surface-2);
  border: 1px solid var(--border-soft);
  color: var(--text-dim);
  border-radius: var(--radius-sm);
  padding: 0.25rem 0.55rem;
  cursor: pointer;
  font-size: 0.85rem;
}
.footer .feedback button:hover { color: var(--text); border-color: var(--text-muted); }
.footer .feedback button.done { color: var(--green); border-color: var(--green); }

/* utilitários */
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.muted { color: var(--text-muted); }
.small { font-size: 0.87rem; }
.nowrap { white-space: nowrap; }
.pill-row { display: flex; gap: 0.4rem; flex-wrap: wrap; margin: 0.5rem 0 1rem; }
.endpoint {
  font-family: var(--mono);
  font-size: 0.82rem;
  background: var(--surface-2);
  border: 1px solid var(--border-soft);
  border-radius: 100px;
  padding: 0.15rem 0.6rem;
  color: var(--text-dim);
  display: inline-block;
}

/* ── responsivo ───────────────────────────────────────────────────────── */
@media (max-width: 1200px) {
  .toc { display: none; }
}
@media (max-width: 900px) {
  .sidebar {
    position: fixed;
    left: 0; top: 0; bottom: 0;
    z-index: 100;
    transform: translateX(-100%);
    transition: transform 0.2s ease;
    background: var(--bg);
    box-shadow: var(--shadow);
  }
  body.nav-open .sidebar { transform: translateX(0); }
  body.nav-open::after {
    content: "";
    position: fixed;
    inset: 56px 0 0 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 99;
  }
  .menu-btn { display: block; }
  .topbar nav { display: none; }
  .content { padding: 2rem 1.25rem 6rem; max-width: 100%; }
  .cardgrid.cols-2, .cardgrid.cols-3, .split { grid-template-columns: 1fr; }
  .journey { grid-template-columns: repeat(2, 1fr); }
  h1 { font-size: 1.9rem; }
  .hero h1 { font-size: 2.4rem; }
}
@media (max-width: 560px) {
  .journey { grid-template-columns: 1fr; }
}

/* impressão: só o conteúdo */
@media print {
  .topbar, .sidebar, .toc, .copy-btn, .footer .feedback { display: none; }
  body { background: #fff; color: #111; }
  .content { max-width: 100%; padding: 0; }
}