/* Pagueiro — design system com temas
   Tokens semânticos: --bg, --surface, --fg, --line.
   Tema escuro é o padrão; o claro é ativado por data-theme="light". */

@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap");

:root,
:root[data-theme="dark"] {
  color-scheme: dark;

  --bg: #0b1013;
  --bg-trans: rgba(11, 16, 19, 0.82);
  --surface: #111a1e;
  --surface-2: #0f181b;
  --fg: #eaf0ef;
  --muted: #9cafb2;
  --muted-2: #71858a;
  --line: #223136;
  --line-2: #1a262b;

  --accent: #2fbfa4;
  --accent-2: #48d3b8;
  --on-accent: #06110e;
  --accent-soft: #0f2a26;

  --ok: #3ecf8e;
  --ok-soft: #0f2a22;
  --warn: #f0b45c;
  --warn-soft: #2a2113;
  --bad: #ff8a80;
  --bad-soft: #2a1614;
  --info: #7ab2f2;
  --info-soft: #101f2e;

  --inverse-bg: #131f23;
  --inverse-fg: #eaf0ef;
  --on-inverse: #9cafb2;

  --side-bg: #0a1114;
  --side-fg: #b7c7ca;
  --side-line: #1d2b30;

  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-2: 0 12px 32px -20px rgba(0, 0, 0, 0.8);
  --shadow-3: 0 34px 80px -44px rgba(0, 0, 0, 0.95);
}

:root[data-theme="light"] {
  color-scheme: light;

  --bg: #f7f6f2;
  --bg-trans: rgba(247, 246, 242, 0.84);
  --surface: #ffffff;
  --surface-2: #fbfaf7;
  --fg: #0e1518;
  --muted: #58666c;
  --muted-2: #8b979c;
  --line: #e5e2da;
  --line-2: #efede7;

  --accent: #0e7c6b;
  --accent-2: #0a6355;
  --on-accent: #ffffff;
  --accent-soft: #e7f1ee;

  --ok: #0b7a55;
  --ok-soft: #e6f3ee;
  --warn: #9a5b09;
  --warn-soft: #f9efdd;
  --bad: #b3261e;
  --bad-soft: #fbeceb;
  --info: #1d4f91;
  --info-soft: #e9f1fa;

  --inverse-bg: #0e1518;
  --inverse-fg: #ffffff;
  --on-inverse: #a9b8bd;

  --side-bg: #0e1518;
  --side-fg: #b7c7ca;
  --side-line: #24333a;

  --shadow-1: 0 1px 2px rgba(14, 21, 24, 0.05);
  --shadow-2: 0 10px 30px -18px rgba(14, 21, 24, 0.28);
  --shadow-3: 0 30px 70px -40px rgba(14, 21, 24, 0.45);
}

:root {
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 22px;

  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --max: 1120px;
  --pad: 24px;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

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

img, svg { display: block; max-width: 100%; }

a { color: inherit; }

h1, h2, h3, h4 { margin: 0; line-height: 1.14; letter-spacing: -0.025em; }

p { margin: 0; }

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

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

.skip {
  position: absolute; left: -999px; top: 8px;
  background: var(--fg); color: var(--bg); padding: 10px 16px; border-radius: var(--r-sm); z-index: 100;
}
.skip:focus { left: 16px; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--pad); }

/* ---------- Cabeçalho ---------- */

.top {
  position: sticky; top: 0; z-index: 40;
  background: var(--bg-trans);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.top.scrolled { border-color: var(--line); }

.top .wrap { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 16px; }

.logo { display: inline-flex; align-items: center; text-decoration: none; }
.logo img { height: 26px; width: auto; display: block; }

/* troca de logo por tema */
.logo .logo-light { display: none; }
.logo .logo-ink { display: block; }
:root[data-theme="dark"] .logo .logo-light { display: block; }
:root[data-theme="dark"] .logo .logo-ink { display: none; }
:root[data-theme="light"] .logo .logo-light { display: none; }
:root[data-theme="light"] .logo .logo-ink { display: block; }
.side .logo .logo-light { display: block; }

.nav { display: flex; align-items: center; gap: 4px; }

.nav .theme-toggle { margin: 0 8px; }

.nav-sep { width: 1px; height: 20px; background: var(--line); margin: 0 8px; flex: none; }

.nav a.link {
  position: relative; text-decoration: none; font-size: 14.5px; font-weight: 500;
  color: var(--muted); padding: 8px 12px; border-radius: var(--r-sm);
  transition: color 0.18s ease;
}
.nav a.link::after {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: 4px; height: 1.5px;
  background: currentColor; transform: scaleX(0); transform-origin: left;
  transition: transform 0.24s cubic-bezier(0.22, 1, 0.36, 1);
}
.nav a.link:hover { color: var(--fg); }
.nav a.link:hover::after { transform: scaleX(1); }

/* Alternador de tema */

.theme-toggle {
  display: inline-grid; place-items: center;
  width: 36px; height: 36px; flex: none;
  border: 1px solid var(--line); background: transparent; color: var(--muted);
  border-radius: 9px; cursor: pointer;
  transition: color 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}
.theme-toggle:hover { color: var(--fg); border-color: var(--muted-2); background: var(--surface); }
.theme-toggle svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 1.8; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
:root[data-theme="light"] .theme-toggle .icon-sun { display: none; }
:root[data-theme="light"] .theme-toggle .icon-moon { display: block; }

/* ---------- Botões ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 20px; border-radius: 10px; border: 1px solid transparent;
  font: inherit; font-size: 15px; font-weight: 600; text-decoration: none; cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.12s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }

.btn-primary { background: var(--fg); color: var(--bg); }
.btn-primary:hover { background: var(--accent); color: var(--on-accent); }

.btn-accent { background: var(--accent); color: var(--on-accent); }
.btn-accent:hover { background: var(--accent-2); }

.btn-ghost { background: transparent; border-color: var(--line); color: var(--fg); }
.btn-ghost:hover { background: var(--surface); border-color: var(--muted-2); }

.btn-sm { padding: 8px 14px; font-size: 14px; border-radius: 9px; }

.btn .arrow { transition: transform 0.2s ease; }
.btn:hover .arrow { transform: translateX(3px); }

/* ---------- Hero ---------- */

.hero { position: relative; padding: 84px 0 76px; overflow: hidden; }

.hero .wrap { position: relative; z-index: 1; }

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 56px;
  align-items: center;
}

.hero h1 {
  font-size: clamp(38px, 4.9vw, 58px);
  line-height: 1.03;
  letter-spacing: -0.045em;
  margin-bottom: 22px;
}
.hero h1 .accent { color: var(--accent); }

.hero p.lead {
  font-size: 17.5px; line-height: 1.66; color: var(--muted);
  max-width: 50ch; margin-bottom: 30px;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

.hero-facts {
  display: flex; flex-wrap: wrap; gap: 22px;
  margin-top: 34px; padding-top: 24px; border-top: 1px solid var(--line);
  font-size: 13.5px; color: var(--muted);
}
.hero-facts span { display: inline-flex; align-items: center; gap: 7px; }
.hero-facts svg { width: 14px; height: 14px; stroke: var(--accent); fill: none; stroke-width: 2.2; }

.mock-caption { font-size: 12.5px; color: var(--muted-2); margin-bottom: 10px; }

.mock {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow-3);
  overflow: hidden;
}

.mock-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 15px 18px; border-bottom: 1px solid var(--line-2);
  font-size: 12.5px; color: var(--muted);
}
.mock-head .id { font-family: var(--mono); font-size: 12px; }

.mock-body { padding: 20px 18px; }
.mock-label { font-size: 12px; text-transform: uppercase; letter-spacing: 0.07em; color: var(--muted-2); }
.mock-value { font-size: 34px; font-weight: 700; letter-spacing: -0.04em; margin: 4px 0 18px; font-variant-numeric: tabular-nums; }

.mock-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 0; border-top: 1px dashed var(--line);
  font-size: 14px;
}
.mock-row .k { color: var(--muted); }
.mock-row .v { font-weight: 600; }
.mock-row .v.fee { color: var(--accent); }

.mock-foot {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 18px; background: var(--surface-2); border-top: 1px solid var(--line-2);
  font-size: 12.5px; color: var(--muted);
}
.mock-foot svg { width: 15px; height: 15px; flex: none; stroke: var(--accent); fill: none; stroke-width: 2; }

/* ---------- Animações ---------- */

.js [data-reveal] {
  opacity: 0; transform: translateY(14px);
  transition: opacity 0.55s cubic-bezier(0.22, 1, 0.36, 1), transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: var(--d, 0ms);
}
.js [data-reveal].in { opacity: 1; transform: none; }

.hero h1, .hero p.lead, .hero-actions, .hero-facts, .hero-visual {
  opacity: 0; transform: translateY(16px);
  animation: rise 0.7s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.hero h1 { animation-delay: 0.05s; }
.hero p.lead { animation-delay: 0.14s; }
.hero-actions { animation-delay: 0.22s; }
.hero-facts { animation-delay: 0.3s; }
.hero-visual { animation-delay: 0.18s; }

@keyframes rise { to { opacity: 1; transform: none; } }

/* ---------- Seções ---------- */

.section { padding: 82px 0; border-top: 1px solid var(--line); }
.section.alt { background: var(--surface-2); }
.section.tight { padding: 62px 0; }

.section-head { max-width: 660px; margin-bottom: 44px; }
.section-head .kicker {
  display: inline-block; font-size: 11.5px; font-weight: 700; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 14px;
}
.section-head h2 { font-size: clamp(26px, 3.2vw, 36px); margin-bottom: 14px; }
.section-head p { color: var(--muted); font-size: 16.5px; }

/* ---------- Grids e cards ---------- */

.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 26px;
  transition: border-color 0.22s ease, transform 0.22s ease, box-shadow 0.22s ease;
}
.card:hover { border-color: var(--muted-2); transform: translateY(-2px); box-shadow: var(--shadow-2); }

.card .icon {
  width: 36px; height: 36px; border-radius: 10px;
  background: var(--accent-soft); color: var(--accent);
  display: grid; place-items: center; margin-bottom: 16px;
}
.card .icon svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.9; }

.card h3 { font-size: 16.5px; margin-bottom: 8px; }
.card p { color: var(--muted); font-size: 14.5px; line-height: 1.62; }

/* ---------- Passos ---------- */

.steps { display: grid; gap: 0; counter-reset: step; }
.step {
  position: relative; padding: 0 0 30px 52px; border-left: 1px solid var(--line);
  margin-left: 15px; counter-increment: step;
}
.step:last-child { padding-bottom: 0; border-left-color: transparent; }
.step::before {
  content: ""; position: absolute; left: -15px; top: 0;
  width: 29px; height: 29px; border-radius: 50%;
  background: var(--surface); border: 1px solid var(--line);
  box-shadow: 0 0 0 4px var(--bg);
}
.step::after {
  content: counter(step);
  position: absolute; left: -15px; top: 0;
  width: 29px; height: 29px; display: grid; place-items: center;
  font-family: var(--mono); font-size: 12px; color: var(--accent);
}
.step h3 { font-size: 16px; margin-bottom: 6px; padding-top: 1px; }
.step p { color: var(--muted); font-size: 14.5px; }

/* ---------- Explicador ---------- */

.explain { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.85fr); gap: 44px; align-items: center; }
.explain p { color: var(--muted); font-size: 15.5px; margin-bottom: 14px; }
.explain p:last-child { margin-bottom: 0; }
.explain strong { color: var(--fg); }

.split-box {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 22px; box-shadow: var(--shadow-1);
}
.split-box .total { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 16px; }
.split-box .total .k { font-size: 13px; color: var(--muted); }
.split-box .total .v { font-size: 22px; font-weight: 700; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }

.split-line {
  display: flex; align-items: center; gap: 12px; padding: 12px 0;
  border-top: 1px solid var(--line-2); font-size: 14px;
}
.split-line .bar { height: 6px; border-radius: 999px; background: var(--accent); flex: none; }
.split-line.muted .bar { background: var(--line); }
.split-line .name { flex: 1; }
.split-line .name small { color: var(--muted-2); font-size: 12px; margin-left: 2px; }
.split-line .val { font-weight: 600; font-variant-numeric: tabular-nums; }

/* ---------- Código ---------- */

.code-demo { background: #0e1518; border: 1px solid #1e2c32; border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-2); }
.code-demo .bar { display: flex; align-items: center; gap: 7px; padding: 12px 16px; border-bottom: 1px solid #1e2c32; background: #121e22; }
.code-demo .dot { width: 8px; height: 8px; border-radius: 50%; background: #2c4048; }
.code-demo .filename { margin-left: 8px; font-family: var(--mono); font-size: 12px; color: #8296a0; }
.code-demo pre {
  margin: 0; padding: 20px 18px 24px; overflow-x: auto;
  font-family: var(--mono); font-size: 13px; line-height: 1.85; color: #ccd9dd; tab-size: 2;
}
.tok-k { color: #7fd1c1; }
.tok-s { color: #a8d5a2; }
.tok-c { color: #6d828c; }
.tok-p { color: #96aab3; }
.tok-n { color: #e2c08d; }

/* ---------- Preços ---------- */

.price-table {
  width: 100%; border-collapse: separate; border-spacing: 0;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  overflow: hidden; font-size: 15px;
}
.price-table th, .price-table td { text-align: left; padding: 16px 22px; border-bottom: 1px solid var(--line-2); }
.price-table th {
  background: var(--surface-2); font-size: 11.5px; letter-spacing: 0.07em;
  text-transform: uppercase; color: var(--muted-2); font-weight: 600;
}
.price-table td:last-child { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.price-table tr:last-child td { border-bottom: 0; }
.price-table tbody tr { transition: background 0.16s ease; }
.price-table tbody tr:hover { background: var(--surface-2); }

/* ---------- FAQ ---------- */

.faq details {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md);
  margin-bottom: 10px; overflow: hidden; transition: border-color 0.2s ease;
}
.faq details[open] { border-color: var(--muted-2); }
.faq summary {
  cursor: pointer; padding: 18px 22px; font-weight: 600; font-size: 15.5px;
  list-style: none; display: flex; justify-content: space-between; gap: 16px; align-items: center;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; width: 9px; height: 9px; flex: none;
  border-right: 1.6px solid var(--muted-2); border-bottom: 1.6px solid var(--muted-2);
  transform: rotate(45deg); transition: transform 0.2s ease; margin-top: -4px;
}
.faq details[open] summary::after { transform: rotate(-135deg); margin-top: 4px; }
.faq details p { padding: 0 22px 20px; color: var(--muted); font-size: 14.8px; max-width: 74ch; }

/* ---------- CTA ---------- */

.cta-band {
  background: var(--inverse-bg); color: var(--inverse-fg);
  border: 1px solid var(--line);
  border-radius: var(--r-xl); padding: 52px 44px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 32px; flex-wrap: wrap;
}
.cta-band h2 { font-size: clamp(23px, 3vw, 32px); margin-bottom: 10px; }
.cta-band p { color: var(--on-inverse); max-width: 48ch; }

/* ---------- Rodapé ---------- */

footer.site { background: var(--surface); border-top: 1px solid var(--line); padding: 56px 0 32px; font-size: 14px; }
footer.site .cols { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 32px; margin-bottom: 44px; }
footer.site h4 { font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.09em; color: var(--muted-2); margin-bottom: 12px; }
footer.site a { display: block; text-decoration: none; color: var(--muted); padding: 5px 0; transition: color 0.16s ease; }
footer.site a:hover { color: var(--fg); }
footer.site .legal { border-top: 1px solid var(--line); padding-top: 24px; color: var(--muted-2); font-size: 12.5px; line-height: 1.7; }
footer.site .legal strong { color: var(--muted); }

/* ---------- Documentos ---------- */

.doc { background: var(--surface); padding: 64px 0 80px; }
.doc .wrap { max-width: 780px; }
.doc h1 { font-size: clamp(30px, 4vw, 40px); margin-bottom: 10px; }
.doc .updated { color: var(--muted-2); font-size: 13.5px; margin-bottom: 34px; }
.doc h2 { font-size: 20px; margin: 38px 0 12px; }
.doc p, .doc li { color: var(--fg); opacity: 0.86; font-size: 15.5px; margin-bottom: 12px; }
.doc ul { padding-left: 22px; margin-bottom: 16px; }
.doc a { color: var(--accent); }
.doc .callout {
  background: var(--accent-soft); border: 1px solid var(--line); border-radius: var(--r-md);
  padding: 16px 18px; color: var(--fg); font-size: 14.5px; margin-bottom: 28px;
}

/* =====================================================================
   PAINEL
   ===================================================================== */

.app { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; background: var(--bg); }

.side {
  background: var(--side-bg); color: var(--side-fg); padding: 22px 16px;
  display: flex; flex-direction: column; gap: 24px;
  position: sticky; top: 0; height: 100vh; border-right: 1px solid var(--side-line);
}

.side .logo img { height: 22px; }

.tenant {
  display: flex; align-items: center; gap: 10px;
  background: rgba(255, 255, 255, 0.04); border: 1px solid var(--side-line);
  border-radius: var(--r-md); padding: 10px 12px; font-size: 13.5px; color: #e7eef0;
}
.tenant .avatar {
  width: 26px; height: 26px; border-radius: 7px; background: var(--accent); color: var(--on-accent);
  display: grid; place-items: center; font-weight: 700; font-size: 11.5px; flex: none;
}
.tenant small { display: block; color: #7e939a; font-size: 11.5px; }

.nav-side { display: flex; flex-direction: column; gap: 2px; }
.nav-side a {
  display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 9px;
  text-decoration: none; color: var(--side-fg); font-size: 14px; font-weight: 500;
  transition: background 0.16s ease, color 0.16s ease;
}
.nav-side a svg { width: 17px; height: 17px; stroke: currentColor; fill: none; stroke-width: 1.7; flex: none; }
.nav-side a:hover { background: rgba(255, 255, 255, 0.06); color: #fff; }
.nav-side a[aria-current="page"] { background: rgba(47, 191, 164, 0.12); color: #fff; box-shadow: inset 2px 0 0 var(--accent); }
.nav-side .label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: #6b8087; padding: 14px 12px 6px; }
.side .foot { margin-top: auto; font-size: 12px; color: #6b8087; line-height: 1.6; }

.main { min-width: 0; display: flex; flex-direction: column; }

.appbar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px 28px; background: var(--bg-trans);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 30;
}
.appbar .crumbs { font-size: 13.5px; color: var(--muted-2); }
.appbar .crumbs strong { color: var(--fg); font-weight: 600; }

.badge-env {
  display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600;
  padding: 5px 10px; border-radius: 999px; background: var(--warn-soft); color: var(--warn);
  border: 1px solid var(--line);
}
.badge-env::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

.appbar .right { display: flex; align-items: center; gap: 10px; }

.icon-btn {
  width: 34px; height: 34px; display: grid; place-items: center;
  border: 1px solid var(--line); background: var(--surface); border-radius: 9px;
  cursor: pointer; color: var(--muted); transition: background 0.16s ease, color 0.16s ease;
}
.icon-btn:hover { background: var(--surface-2); color: var(--fg); }
.icon-btn svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 1.8; }

.avatar-user {
  width: 32px; height: 32px; border-radius: 50%; background: var(--accent-soft); color: var(--accent);
  display: grid; place-items: center; font-size: 12px; font-weight: 700;
  border: 1px solid var(--line);
}

.content { padding: 30px 28px 60px; max-width: 1180px; width: 100%; }

.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 26px; flex-wrap: wrap; }
.page-head h1 { font-size: 26px; letter-spacing: -0.03em; }
.page-head p { color: var(--muted); font-size: 14.5px; margin-top: 6px; }

.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 22px; }

.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px; }
.kpi .label { font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 7px; }
.kpi .value { font-size: 27px; font-weight: 700; letter-spacing: -0.035em; margin-top: 10px; font-variant-numeric: tabular-nums; }
.kpi .delta { font-size: 12.5px; margin-top: 6px; color: var(--ok); font-weight: 600; }
.kpi .delta.down { color: var(--bad); }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.panel-head {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 18px 20px; border-bottom: 1px solid var(--line-2); flex-wrap: wrap;
}
.panel-head h2 { font-size: 15.5px; }
.panel-head .sub { font-size: 12.5px; color: var(--muted); margin-top: 3px; }

.chart { padding: 18px 20px 8px; }
.chart svg { width: 100%; height: 190px; overflow: visible; }
.chart .axis { stroke: var(--line-2); stroke-width: 1; }
.chart .line { fill: none; stroke: var(--accent); stroke-width: 2.2; stroke-linecap: round; stroke-dasharray: 1200; stroke-dashoffset: 1200; animation: draw 1.6s 0.2s ease forwards; }
.chart .area { fill: url(#g1); }
.chart .dotp { fill: var(--accent); stroke: var(--surface); stroke-width: 2.5; }
@keyframes draw { to { stroke-dashoffset: 0; } }

table.data { width: 100%; border-collapse: collapse; font-size: 14px; }
table.data th {
  text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--muted-2); font-weight: 600; padding: 11px 20px; background: var(--surface-2);
  border-bottom: 1px solid var(--line-2); white-space: nowrap;
}
table.data td { padding: 13px 20px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
table.data tr:last-child td { border-bottom: 0; }
table.data tbody tr { transition: background 0.14s ease; }
table.data tbody tr:hover { background: var(--surface-2); }
table.data .mono { font-family: var(--mono); font-size: 12.6px; color: var(--muted); }
table.data .num { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }
table.data .who { display: flex; align-items: center; gap: 10px; }
table.data .who .avatar {
  width: 28px; height: 28px; border-radius: 8px; background: var(--surface-2); color: var(--muted);
  display: grid; place-items: center; font-size: 11px; font-weight: 700; flex: none;
  border: 1px solid var(--line);
}

.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px; white-space: nowrap; }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.ok { background: var(--ok-soft); color: var(--ok); }
.pill.wait { background: var(--warn-soft); color: var(--warn); }
.pill.bad { background: var(--bad-soft); color: var(--bad); }
.pill.neutral { background: var(--surface-2); color: var(--muted); }

.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

.field {
  display: flex; align-items: center; gap: 8px; border: 1px solid var(--line);
  background: var(--surface); border-radius: 9px; padding: 8px 12px; font-size: 14px;
  color: var(--muted); min-width: 220px;
}
.field svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 1.8; flex: none; }
.field input { border: 0; outline: 0; font: inherit; color: var(--fg); background: transparent; width: 100%; }

.select {
  border: 1px solid var(--line); background: var(--surface); border-radius: 9px;
  padding: 9px 12px; font: inherit; font-size: 14px; color: var(--fg);
}

.views { display: none; }
.views.active { display: block; animation: fadein 0.25s ease; }
@keyframes fadein { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.grid-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }

.rcard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px; }
.rcard .top-line { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.rcard .avatar-lg {
  width: 42px; height: 42px; border-radius: 12px; background: var(--accent-soft); color: var(--accent);
  display: grid; place-items: center; font-weight: 700; font-size: 15px; border: 1px solid var(--line);
}
.rcard h3 { font-size: 15.5px; }
.rcard .doc { color: var(--muted); font-size: 12.5px; font-family: var(--mono); }
.rcard dl { margin: 16px 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.rcard dt { font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted-2); }
.rcard dd { margin: 3px 0 0; font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }

.key-row {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 16px 20px; border-bottom: 1px solid var(--line-2); flex-wrap: wrap;
}
.key-row:last-child { border-bottom: 0; }
.key-row .k { font-family: var(--mono); font-size: 13px; background: var(--surface-2); border: 1px solid var(--line); padding: 6px 10px; border-radius: 7px; }
.key-row .meta { font-size: 12.5px; color: var(--muted); margin-top: 5px; }
.key-row .tag { font-size: 11.5px; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 3px 9px; }

dialog.modal { border: 1px solid var(--line); border-radius: var(--r-xl); padding: 0; width: min(560px, calc(100vw - 32px)); box-shadow: var(--shadow-3); background: var(--surface); color: var(--fg); }
dialog.modal::backdrop { background: rgba(0, 0, 0, 0.6); backdrop-filter: blur(3px); }
.modal-head { padding: 22px 24px 0; }
.modal-head h2 { font-size: 19px; }
.modal-head p { color: var(--muted); font-size: 13.5px; margin-top: 5px; }
.modal-body { padding: 20px 24px; display: grid; gap: 14px; }
.modal-foot { padding: 0 24px 22px; display: flex; justify-content: flex-end; gap: 10px; }

.form-row { display: grid; gap: 6px; }
.form-row label { font-size: 13px; font-weight: 600; }
.form-row input, .form-row select {
  border: 1px solid var(--line); border-radius: 9px; padding: 11px 13px;
  font: inherit; font-size: 14.5px; background: var(--surface-2); color: var(--fg);
}
.form-row input:focus, .form-row select:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
.form-row .hint { font-size: 12px; color: var(--muted-2); }
.form-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* ---------- Responsivo ---------- */

@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-visual { max-width: 460px; }
  .explain { grid-template-columns: 1fr; gap: 28px; }
  .grid-3, .grid-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .app { grid-template-columns: 1fr; }
  .side {
    position: static; height: auto; flex-direction: row; align-items: center;
    gap: 14px; padding: 12px 16px; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--side-line);
  }
  .side .tenant, .side .foot, .nav-side .label { display: none; }
  .nav-side { flex-direction: row; gap: 4px; }
  .nav-side a { white-space: nowrap; padding: 8px 12px; font-size: 13.5px; }
  .nav-side a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--accent); }
  .content { padding: 22px 18px 48px; }
  .appbar { padding: 12px 18px; position: static; }
}

@media (max-width: 720px) {
  :root { --pad: 18px; }
  .hero { padding: 56px 0 52px; }
  .section { padding: 58px 0; }
  .grid-2, .grid-3, .grid-cards, .kpis { grid-template-columns: 1fr; }
  footer.site .cols { grid-template-columns: 1fr; gap: 24px; }
  .cta-band { padding: 36px 24px; }
  .nav a.link { display: none; }
  .nav-sep { display: none; }
  .price-table th:nth-child(2), .price-table td:nth-child(2) { display: none; }
  table.data th:nth-child(3), table.data td:nth-child(3) { display: none; }
  .form-2 { grid-template-columns: 1fr; }
  .hero h1 { font-size: clamp(32px, 9vw, 40px); }
}

@media (max-width: 420px) {
  .nav .btn-ghost { display: none; }
  .logo img { height: 22px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-delay: 0ms !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .js [data-reveal], .hero h1, .hero p.lead, .hero-actions, .hero-facts, .hero-visual {
    opacity: 1 !important; transform: none !important;
  }
}

/* =====================================================================
   PÁGINAS: CADASTRO, CONTATO, STATUS E MOCK DO PAINEL
   ===================================================================== */

/* Cadastro */
.auth { display: grid; grid-template-columns: minmax(0, 1fr) 460px; gap: 56px; align-items: start; padding: 64px 0 80px; }
.auth-side h1 { font-size: clamp(30px, 3.6vw, 44px); margin-bottom: 16px; }
.auth-side p.lead { color: var(--muted); font-size: 16.5px; margin-bottom: 28px; max-width: 46ch; }
.steps-mini { display: grid; gap: 18px; }
.steps-mini .item { display: flex; gap: 13px; align-items: flex-start; }
.steps-mini .num { width: 27px; height: 27px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font: 600 12px var(--mono); flex: none; }
.steps-mini h3 { font-size: 15px; margin-bottom: 3px; }
.steps-mini p { color: var(--muted); font-size: 14px; }

.form-card { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 28px; box-shadow: var(--shadow-2); }
.form-card h2 { font-size: 19px; margin-bottom: 6px; }
.form-card .sub { color: var(--muted); font-size: 13.5px; margin-bottom: 22px; }
.form-grid { display: grid; gap: 14px; }
.form-grid .two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-card .btn { width: 100%; margin-top: 6px; }
.form-card .fine { margin-top: 14px; font-size: 12.5px; color: var(--muted-2); text-align: center; }

/* Contato */
.contact-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 28px 0 36px; }
.contact-card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 24px; }
.contact-card .icon { width: 34px; height: 34px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; margin-bottom: 14px; }
.contact-card .icon svg { width: 17px; height: 17px; stroke: currentColor; fill: none; stroke-width: 1.9; }
.contact-card h2 { font-size: 15.5px; margin-bottom: 6px; }
.contact-card p { color: var(--muted); font-size: 14px; margin-bottom: 12px; }
.contact-card a { color: var(--accent); font-size: 13.5px; text-decoration: none; font-weight: 600; }
.contact-card a:hover { text-decoration: underline; }

.addr-card { background: var(--surface-2); border: 1px solid var(--line); border-radius: 16px; padding: 22px; font-size: 14.5px; color: var(--muted); }
.addr-card strong { color: var(--fg); display: block; margin-bottom: 4px; }

/* Status */
.status-hero { padding: 56px 0 26px; }
.status-banner {
  display: flex; align-items: center; gap: 10px;
  background: var(--ok-soft); color: var(--ok);
  border: 1px solid var(--line); border-radius: 14px;
  padding: 16px 20px; font-weight: 600; font-size: 15px;
}
.status-banner::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: currentColor; }
.status-list { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; margin-top: 20px; }
.status-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 16px 20px; border-bottom: 1px solid var(--line-2); flex-wrap: wrap; }
.status-row:last-child { border-bottom: 0; }
.status-row .name { font-weight: 600; font-size: 14.5px; }
.status-row .desc { color: var(--muted-2); font-size: 12.5px; }
.status-row .right { display: flex; align-items: center; gap: 16px; }
.uptime { display: flex; gap: 2px; }
.uptime i { display: block; width: 4px; height: 20px; border-radius: 2px; background: var(--ok); opacity: 0.85; }
.uptime i.down { background: var(--bad); }
.status-note { font-size: 12.5px; color: var(--muted-2); margin-top: 16px; }

/* Mock do painel na home */
.browser { border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: var(--surface); box-shadow: var(--shadow-3); }
.browser .bar { display: flex; align-items: center; gap: 6px; padding: 10px 14px; background: var(--surface-2); border-bottom: 1px solid var(--line-2); }
.browser .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--line); }
.browser .url { margin-left: 12px; font: 12px var(--mono); color: var(--muted-2); }
.app-mock { display: grid; grid-template-columns: 168px minmax(0, 1fr); }
.app-mock .aside { background: var(--side-bg); padding: 16px 12px; }
.app-mock .aside .logo-mini { width: 74px; height: 12px; border-radius: 3px; background: #2c4048; margin-bottom: 20px; }
.app-mock .aside i { display: block; height: 9px; border-radius: 4px; background: #23343b; margin-bottom: 11px; }
.app-mock .aside i.on { background: var(--accent); opacity: 0.85; }
.app-mock .body { padding: 16px; }
.km { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 12px; }
.km div { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: var(--surface-2); }
.km span { display: block; font-size: 10px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted-2); margin-bottom: 6px; }
.km strong { font-size: 16px; letter-spacing: -0.03em; }
.mock-chart { height: 74px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); padding: 8px 10px; margin-bottom: 12px; }
.mock-chart svg { width: 100%; height: 100%; }
.mock-table { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.mock-table .r { display: flex; justify-content: space-between; gap: 10px; padding: 9px 12px; border-bottom: 1px solid var(--line-2); font-size: 12px; color: var(--muted); }
.mock-table .r:last-child { border-bottom: 0; }
.mock-table .r b { color: var(--fg); font-weight: 600; }
.mock-table .r .ok { color: var(--ok); font-weight: 600; }

@media (max-width: 980px) {
  .auth { grid-template-columns: 1fr; gap: 32px; padding: 44px 0 60px; }
  .contact-grid { grid-template-columns: 1fr; }
  .app-mock { grid-template-columns: 120px minmax(0, 1fr); }
}
@media (max-width: 720px) {
  .form-grid .two { grid-template-columns: 1fr; }
  .km { grid-template-columns: 1fr 1fr; }
  .km div:last-child { display: none; }
}

.mock-chart svg path { stroke: var(--accent); }

/* =====================================================================
   SCROLLBAR, VOLTAR AO TOPO E WIZARD DE CADASTRO
   ===================================================================== */

html { scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--line);
  border-radius: 999px;
  border: 3px solid transparent;
  background-clip: content-box;
}
::-webkit-scrollbar-thumb:hover { background: var(--muted-2); background-clip: content-box; }

.back-top {
  position: fixed; right: 20px; bottom: 20px;
  width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--surface); color: var(--fg);
  display: grid; place-items: center; cursor: pointer;
  opacity: 0; transform: translateY(8px); pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
  box-shadow: var(--shadow-2); z-index: 60;
}
.back-top.show { opacity: 1; transform: none; pointer-events: auto; }
.back-top:hover { border-color: var(--muted-2); }
.back-top svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; }

.wizard-progress { display: flex; gap: 8px; margin-bottom: 20px; }
.wizard-progress span { height: 4px; flex: 1; border-radius: 2px; background: var(--line); transition: background 0.2s ease; }
.wizard-progress span.on { background: var(--accent); }

.step-panel { display: none; }
.step-panel.on { display: grid; gap: 14px; animation: fadein 0.22s ease; }

.step-count { font-size: 12px; color: var(--muted-2); margin-bottom: 2px; }

.wizard-nav { display: flex; gap: 10px; margin-top: 18px; }
.wizard-nav .btn { flex: 1; }
.wizard-nav .btn[hidden] { display: none; }

/* Erros de formulário (inline) */
.form-row { position: relative; }
.form-row .error {
  display: none;
  color: var(--bad);
  font-size: 12.5px;
  line-height: 1.4;
  margin-top: 5px;
}
.form-row .error.show { display: block; }
.form-row input.invalid,
.form-row select.invalid { border-color: var(--bad); }
.form-row input.invalid:focus,
.form-row select.invalid:focus { outline-color: var(--bad); }
.form-row .error a { color: var(--bad); text-decoration: underline; }

.check { display: flex; gap: 9px; align-items: flex-start; }
.check input { width: 16px; height: 16px; margin-top: 3px; flex: none; accent-color: var(--accent); }
.check label { font-weight: 400; font-size: 13px; color: var(--muted); line-height: 1.5; }
.check label a { color: var(--accent); }

.form-success { text-align: center; padding: 8px 0 4px; }
.form-success .ok-icon {
  width: 46px; height: 46px; border-radius: 50%;
  background: var(--ok-soft); color: var(--ok);
  display: grid; place-items: center; margin: 0 auto 16px;
}
.form-success .ok-icon svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 2.4; }
.form-success h3 { font-size: 18px; margin-bottom: 8px; }
.form-success p { color: var(--muted); font-size: 14px; margin-bottom: 20px; }
.form-success .btn { width: auto; }

.opt { color: var(--muted-2); font-weight: 400; font-size: 12.5px; }

/* Segmentado CNPJ/CPF + botão de revelar senha */
.seg { display: inline-flex; gap: 4px; padding: 3px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); margin-bottom: 8px; }
.seg-btn {
  border: 0; background: transparent; color: var(--muted);
  font: inherit; font-size: 12.5px; font-weight: 600;
  padding: 6px 14px; border-radius: 7px; cursor: pointer;
  transition: background 0.16s ease, color 0.16s ease;
}
.seg-btn:hover { color: var(--fg); }
.seg-btn.on { background: var(--surface); color: var(--fg); box-shadow: var(--shadow-1); }

.input-btn { position: relative; }
.input-btn input { padding-right: 44px; width: 100%; }
.reveal {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  width: 32px; height: 32px; display: grid; place-items: center;
  border: 0; background: transparent; color: var(--muted-2);
  border-radius: 8px; cursor: pointer;
}
.reveal:hover { color: var(--fg); background: var(--surface-2); }
.reveal svg { width: 17px; height: 17px; stroke: currentColor; fill: none; stroke-width: 1.8; }
.reveal .eye-off { display: none; }
.reveal.on .eye { display: none; }
.reveal.on .eye-off { display: block; }

/* =====================================================================
   AJUSTES DE RESPONSIVIDADE (mobile)
   ===================================================================== */

body { overflow-x: clip; }

@media (max-width: 980px) {
  .auth { grid-template-columns: 1fr; gap: 26px; padding: 34px 0 56px; }
  .contact-grid { grid-template-columns: 1fr; }
  .app-mock { grid-template-columns: 112px minmax(0, 1fr); }
}

@media (max-width: 720px) {
  .top .wrap { height: 60px; gap: 8px; }
  .nav { gap: 2px; min-width: 0; }
  .nav .btn { flex: none; }
  .nav a.link, .nav-sep { display: none; }

  .hero { padding: 40px 0 34px; }
  .hero h1 { font-size: clamp(28px, 8.5vw, 38px); }
  .hero p.lead { font-size: 16px; margin-bottom: 24px; }
  .hero-facts { gap: 14px; font-size: 13px; margin-top: 26px; padding-top: 18px; }

  .form-card { padding: 22px 18px; border-radius: 16px; }
  .form-card h2 { font-size: 17px; }
  .steps-mini { display: none; }
  .auth-side p.lead { margin-bottom: 0; }

  .wizard-nav {
    position: sticky; bottom: 0; z-index: 2;
    background: var(--surface);
    padding: 12px 0 2px; margin-top: 14px;
  }

  .status-row { align-items: flex-start; }
  .status-row .right { width: 100%; justify-content: space-between; }
  .price-table th, .price-table td { padding: 12px 14px; }
  .card { padding: 20px; }
  .contact-card { padding: 20px; }
  .addr-card { padding: 18px; }
  .footer .cols { gap: 22px; }
}

@media (max-width: 520px) {
  .nav .btn-ghost { display: none; }
  .logo img { height: 22px; }
  .hero h1 { font-size: 27px; }
  .page-head { gap: 12px; }
  .km { grid-template-columns: 1fr 1fr; }
  .km div:last-child { display: none; }
}

@media (hover: none) {
  .card:hover { transform: none; box-shadow: none; }
}

/* Menu mobile (hamburguer) */
.menu-btn {
  display: none;
  width: 38px; height: 38px;
  border: 1px solid var(--line); border-radius: 9px;
  background: transparent; cursor: pointer;
  align-items: center; justify-content: center;
  flex-direction: column; gap: 4px;
  flex: none;
}
.menu-btn span { display: block; width: 16px; height: 1.8px; background: var(--fg); border-radius: 2px; transition: transform 0.2s ease, opacity 0.2s ease; }
.menu-btn.on span:nth-child(1) { transform: translateY(5.8px) rotate(45deg); }
.menu-btn.on span:nth-child(2) { opacity: 0; }
.menu-btn.on span:nth-child(3) { transform: translateY(-5.8px) rotate(-45deg); }

.mobile-menu {
  position: absolute; left: 0; right: 0; top: 100%;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow-2);
  padding: 8px 18px 20px;
  z-index: 50;
}
.mobile-menu a {
  display: block;
  padding: 13px 2px;
  text-decoration: none;
  color: var(--fg);
  font-size: 15px;
  font-weight: 500;
  border-bottom: 1px solid var(--line-2);
}
.mobile-menu a[aria-current="page"] { color: var(--accent); }
.mobile-menu a.btn { width: 100%; margin-top: 14px; border-bottom: 0; color: var(--bg); }

@media (max-width: 720px) {
  .menu-btn { display: flex; }
}

@media (max-width: 430px) {
  .nav > .btn-primary { display: none; }
}

.mobile-menu a.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  width: 100%;
  padding: 13px 20px;
  margin-top: 14px;
  border-bottom: 0;
  border-radius: 10px;
  color: var(--bg);
  background: var(--fg);
}
.mobile-menu a.btn:hover { background: var(--accent); color: var(--on-accent); }

/* =====================================================================
   DOCUMENTOS LEGAIS — leitura confortável + índice
   ===================================================================== */

.doc { padding: 56px 0 84px; }
.doc .wrap { max-width: 1040px; }

.doc-layout { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 56px; align-items: start; }

.toc {
  position: sticky; top: 92px;
  font-size: 13px;
  border-left: 1px solid var(--line);
  padding-left: 18px;
}
.toc strong {
  display: block;
  font-size: 11px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted-2);
  margin-bottom: 12px;
}
.toc a {
  display: block;
  padding: 5px 0;
  color: var(--muted);
  text-decoration: none;
  line-height: 1.45;
}
.toc a:hover { color: var(--fg); }
.toc a.active { color: var(--accent); font-weight: 600; }

.doc-body { max-width: 68ch; }
.doc-body h1 { font-size: clamp(28px, 3.4vw, 36px); margin-bottom: 8px; letter-spacing: -0.03em; }
.doc-body .updated { color: var(--muted-2); font-size: 13px; margin-bottom: 34px; }

.doc-body h2 {
  font-size: 17px;
  letter-spacing: -0.01em;
  margin: 40px 0 12px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}
.doc-body h2:first-of-type { border-top: 0; padding-top: 0; margin-top: 28px; }
.doc-body p, .doc-body li { color: var(--fg); opacity: 0.84; font-size: 15px; line-height: 1.75; margin-bottom: 12px; }
.doc-body ul { padding-left: 20px; margin: 0 0 18px; }
.doc-body li { margin-bottom: 7px; }
.doc-body li::marker { color: var(--muted-2); }
.doc-body strong { color: var(--fg); opacity: 1; }
.doc-body a { color: var(--accent); }
.doc-body code { background: var(--surface-2); border: 1px solid var(--line); border-radius: 5px; padding: 1px 6px; font-size: 13px; font-family: var(--mono); }
.doc-body .note {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px 18px;
  font-size: 14px;
  color: var(--muted);
  margin: 18px 0;
}

@media (max-width: 980px) {
  .doc-layout { grid-template-columns: 1fr; gap: 0; }
  .toc { display: none; }
  .doc-body { max-width: 100%; }
}
