:root {
      --brand: #16a34a;
      --brand-dark: #15803d;
      --sidebar-bg: #0f172a;
      --sidebar-text: #94a3b8;
      --header-h: 56px;
      --sidebar-w: 268px;
    }

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

    html { scroll-behavior: smooth; font-size: 15px; }

    body {
      font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
      background: #fff;
      color: #1e293b;
      line-height: 1.7;
    }

    /* ── HEADER ───────────────────────────────────────────────── */
    .header {
      position: fixed;
      top: 0; left: 0; right: 0;
      height: var(--header-h);
      background: var(--sidebar-bg);
      border-bottom: 1px solid rgba(255,255,255,0.07);
      display: flex;
      align-items: center;
      padding: 0 20px;
      gap: 14px;
      z-index: 200;
    }

    .mobile-toggle {
      display: none;
      background: none;
      border: none;
      color: #94a3b8;
      font-size: 20px;
      cursor: pointer;
      padding: 4px 6px;
      line-height: 1;
    }

    .header-logo {
      display: flex;
      align-items: center;
      gap: 9px;
      text-decoration: none;
      flex-shrink: 0;
    }

    .header-logo-icon {
      width: 30px; height: 30px;
      background: var(--brand);
      border-radius: 7px;
      display: flex; align-items: center; justify-content: center;
      font-size: 15px;
    }

    .header-logo-text {
      color: #fff;
      font-weight: 700;
      font-size: 15px;
      letter-spacing: -0.02em;
    }

    .header-divider {
      width: 1px; height: 18px;
      background: rgba(255,255,255,0.12);
      flex-shrink: 0;
    }

    .header-title {
      font-size: 13px;
      color: #64748b;
      font-weight: 500;
    }

    .header-search-wrap {
      margin-left: auto;
      position: relative;
    }

    .search-input {
      width: 240px;
      background: rgba(255,255,255,0.06);
      border: 1px solid rgba(255,255,255,0.1);
      color: #e2e8f0;
      border-radius: 8px;
      padding: 7px 12px 7px 34px;
      font-size: 13px;
      outline: none;
      transition: border-color .2s, background .2s;
      background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='none' viewBox='0 0 24 24' stroke='%2364748b' stroke-width='2.5'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath stroke-linecap='round' d='m21 21-4.35-4.35'/%3E%3C/svg%3E");
      background-repeat: no-repeat;
      background-position: 10px center;
    }

    .search-input:focus {
      border-color: var(--brand);
      background-color: rgba(255,255,255,0.09);
    }

    .search-input::placeholder { color: #475569; }

    .search-results {
      display: none;
      position: absolute;
      top: calc(100% + 8px);
      right: 0;
      width: 340px;
      background: #1e293b;
      border: 1px solid rgba(255,255,255,0.1);
      border-radius: 10px;
      box-shadow: 0 20px 40px rgba(0,0,0,.5);
      overflow: hidden;
      z-index: 300;
      max-height: 380px;
      overflow-y: auto;
    }

    .search-empty {
      padding: 20px;
      text-align: center;
      color: #475569;
      font-size: 13px;
    }

    .search-result {
      display: block;
      padding: 11px 16px;
      border-bottom: 1px solid rgba(255,255,255,0.05);
      text-decoration: none;
      cursor: pointer;
      transition: background .15s;
    }

    .search-result:hover { background: rgba(255,255,255,0.06); }

    .search-result-title { color: #e2e8f0; font-size: 13px; font-weight: 600; margin-bottom: 2px; }
    .search-result-crumb { color: #475569; font-size: 11px; }

    /* ── BARRA DE BUSCA PRINCIPAL ────────────────────────────── */
    .main-search-bar {
      position: sticky;
      top: var(--header-h);
      z-index: 150;
      background: #fff;
      border-bottom: 1px solid #e2e8f0;
      padding: 12px 40px;
      box-shadow: 0 2px 8px rgba(0,0,0,.05);
    }

    .main-search-wrap {
      position: relative;
      max-width: 640px;
    }

    .main-search-icon {
      position: absolute;
      left: 14px;
      top: 50%;
      transform: translateY(-50%);
      color: #94a3b8;
      pointer-events: none;
    }

    .main-search-input {
      width: 100%;
      padding: 11px 80px 11px 44px;
      border: 1.5px solid #e2e8f0;
      border-radius: 12px;
      font-size: 14px;
      color: #1e293b;
      background: #f8fafc;
      outline: none;
      transition: border-color .2s, box-shadow .2s;
    }

    .main-search-input:focus {
      border-color: var(--brand);
      box-shadow: 0 0 0 3px rgba(22,163,74,.12);
      background: #fff;
    }

    .main-search-input::placeholder { color: #94a3b8; }

    .main-search-kbd {
      position: absolute;
      right: 12px;
      top: 50%;
      transform: translateY(-50%);
      font-size: 11px;
      font-weight: 600;
      color: #94a3b8;
      background: #f1f5f9;
      border: 1px solid #e2e8f0;
      border-radius: 5px;
      padding: 2px 7px;
      pointer-events: none;
    }

    .main-search-results {
      display: none;
      position: absolute;
      top: calc(100% + 6px);
      left: 0;
      width: 100%;
      background: #fff;
      border: 1px solid #e2e8f0;
      border-radius: 12px;
      box-shadow: 0 12px 32px rgba(0,0,0,.12);
      overflow: hidden;
      z-index: 300;
      max-height: 380px;
      overflow-y: auto;
    }

    .main-search-result {
      display: block;
      padding: 12px 16px;
      border-bottom: 1px solid #f1f5f9;
      text-decoration: none;
      transition: background .15s;
    }

    .main-search-result:last-child { border-bottom: none; }
    .main-search-result:hover { background: #f8fafc; }
    .main-search-result-title { color: #1e293b; font-size: 13.5px; font-weight: 600; margin-bottom: 2px; }
    .main-search-result-crumb { color: #64748b; font-size: 11.5px; }
    .main-search-result-preview { color: #94a3b8; font-size: 12px; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

    .main-search-empty {
      padding: 20px;
      text-align: center;
      color: #94a3b8;
      font-size: 13px;
    }

    @media (max-width: 900px) {
      .main-search-bar { padding: 10px 16px; }
    }

    /* ── LAYOUT ───────────────────────────────────────────────── */
    .layout {
      display: flex;
      min-height: 100vh;
      padding-top: var(--header-h);
    }

    /* ── SIDEBAR ──────────────────────────────────────────────── */
    .sidebar {
      width: var(--sidebar-w);
      background: var(--sidebar-bg);
      position: fixed;
      top: var(--header-h);
      left: 0;
      bottom: 0;
      overflow-y: auto;
      padding: 20px 0 60px;
      scrollbar-width: thin;
      scrollbar-color: rgba(255,255,255,0.08) transparent;
      z-index: 100;
    }

    .sidebar::-webkit-scrollbar { width: 4px; }
    .sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); border-radius: 2px; }

    .nav-group { margin-bottom: 8px; }

    .nav-group-label {
      font-size: 10px;
      font-weight: 700;
      letter-spacing: .1em;
      text-transform: uppercase;
      color: #334155;
      padding: 14px 20px 5px;
    }

    .nav-link {
      display: flex;
      align-items: center;
      gap: 8px;
      padding: 6px 20px;
      color: var(--sidebar-text);
      text-decoration: none;
      font-size: 13.5px;
      border-left: 2px solid transparent;
      transition: color .15s, background .15s, border-color .15s;
    }

    .nav-link:hover {
      color: #cbd5e1;
      background: rgba(255,255,255,0.04);
    }

    .nav-link.active {
      color: #4ade80;
      border-left-color: var(--brand);
      background: rgba(22,163,74,0.09);
      font-weight: 500;
    }

    .nav-link-sub { padding-left: 36px; font-size: 13px; }

    .nav-icon { font-size: 13px; flex-shrink: 0; width: 16px; text-align: center; }

    /* ── MAIN ─────────────────────────────────────────────────── */
    .main {
      margin-left: var(--sidebar-w);
      flex: 1;
      padding: 52px 56px 100px;
      max-width: calc(var(--sidebar-w) + 800px);
    }

    /* ── SECTIONS ─────────────────────────────────────────────── */
    .doc-section {
      margin-bottom: 72px;
      scroll-margin-top: calc(var(--header-h) + 28px);
    }

    .section-header {
      display: flex;
      align-items: flex-start;
      gap: 14px;
      margin-bottom: 20px;
    }

    .section-icon {
      width: 42px; height: 42px;
      border-radius: 10px;
      display: flex; align-items: center; justify-content: center;
      font-size: 20px;
      flex-shrink: 0;
      margin-top: 3px;
    }

    .icon-green { background: #dcfce7; }
    .icon-blue  { background: #dbeafe; }
    .icon-purple{ background: #ede9fe; }
    .icon-amber { background: #fef3c7; }
    .icon-rose  { background: #ffe4e6; }
    .icon-slate { background: #f1f5f9; }
    .icon-cyan  { background: #cffafe; }
    .icon-orange{ background: #ffedd5; }

    h1 {
      font-size: 26px;
      font-weight: 700;
      color: #0f172a;
      line-height: 1.3;
      letter-spacing: -.03em;
    }

    .lead {
      font-size: 15.5px;
      color: #64748b;
      line-height: 1.75;
      margin-top: 6px;
    }

    h2 {
      font-size: 17px;
      font-weight: 700;
      color: #1e293b;
      margin: 36px 0 12px;
      padding-top: 36px;
      border-top: 1px solid #f1f5f9;
      scroll-margin-top: calc(var(--header-h) + 20px);
    }

    h2.no-border { border-top: none; padding-top: 0; margin-top: 0; }

    h3 {
      font-size: 14.5px;
      font-weight: 600;
      color: #334155;
      margin: 20px 0 8px;
    }

    p { color: #475569; margin-bottom: 14px; }

    ul, ol { color: #475569; padding-left: 20px; margin-bottom: 14px; }
    li { margin-bottom: 5px; }

    a { color: var(--brand); text-decoration: none; }
    a:hover { text-decoration: underline; }

    strong { color: #1e293b; }

    hr { border: none; border-top: 1px solid #f1f5f9; margin: 36px 0; }

    /* ── CODE ─────────────────────────────────────────────────── */
    code {
      font-family: 'Cascadia Code', 'Fira Code', 'Courier New', monospace;
      font-size: 12.5px;
      background: #f1f5f9;
      border: 1px solid #e2e8f0;
      padding: 1px 5px;
      border-radius: 4px;
      color: #0f172a;
    }

    pre {
      background: #0f172a;
      border-radius: 10px;
      padding: 20px 22px;
      overflow-x: auto;
      margin: 12px 0 20px;
      line-height: 1.7;
    }

    pre code {
      background: none;
      border: none;
      padding: 0;
      color: #e2e8f0;
      font-size: 13px;
    }

    .pre-wrap { border-radius: 0 0 10px 10px; margin-top: 0; }

    .pre-label {
      background: #1e293b;
      border-radius: 10px 10px 0 0;
      padding: 8px 18px;
      font-size: 11px;
      font-weight: 600;
      letter-spacing: .07em;
      text-transform: uppercase;
      color: #64748b;
    }

    /* ── CALLOUTS ─────────────────────────────────────────────── */
    .callout {
      display: flex;
      gap: 12px;
      border-radius: 10px;
      padding: 14px 18px;
      margin: 16px 0 20px;
      border-width: 1px;
      border-style: solid;
    }

    .callout-emoji { font-size: 17px; flex-shrink: 0; margin-top: 1px; }
    .callout-body { flex: 1; }
    .callout-body p { margin: 0; font-size: 13.5px; line-height: 1.6; }
    .callout-title { font-weight: 600; font-size: 13.5px; margin-bottom: 3px; }

    .c-info  { background: #eff6ff; border-color: #bfdbfe; }
    .c-info  .callout-title, .c-info  p { color: #1e40af; }

    .c-tip   { background: #f0fdf4; border-color: #bbf7d0; }
    .c-tip   .callout-title, .c-tip   p { color: #166534; }

    .c-warn  { background: #fffbeb; border-color: #fde68a; }
    .c-warn  .callout-title, .c-warn  p { color: #92400e; }

    .c-danger{ background: #fff1f2; border-color: #fecdd3; }
    .c-danger .callout-title, .c-danger p { color: #9f1239; }

    /* ── BADGES ───────────────────────────────────────────────── */
    .badge {
      display: inline-flex;
      align-items: center;
      font-size: 10px;
      font-weight: 700;
      letter-spacing: .05em;
      text-transform: uppercase;
      padding: 2px 8px;
      border-radius: 999px;
      vertical-align: middle;
      border-width: 1px;
      border-style: solid;
    }

    .b-free    { background: #f1f5f9; color: #475569; border-color: #cbd5e1; }
    .b-starter { background: #eff6ff; color: #1d4ed8; border-color: #bfdbfe; }
    .b-pro     { background: #fdf4ff; color: #7e22ce; border-color: #e9d5ff; }
    .b-rede    { background: #fff7ed; color: #c2410c; border-color: #fed7aa; }

    /* ── STEPS ────────────────────────────────────────────────── */
    .steps { margin: 18px 0 24px; }

    .step {
      display: flex;
      gap: 16px;
      margin-bottom: 18px;
      position: relative;
    }

    .step:not(:last-child)::before {
      content: '';
      position: absolute;
      left: 15px;
      top: 34px;
      bottom: -4px;
      width: 2px;
      background: #e2e8f0;
      border-radius: 2px;
    }

    .step-num {
      width: 32px; height: 32px;
      background: var(--brand);
      color: #fff;
      border-radius: 50%;
      display: flex; align-items: center; justify-content: center;
      font-size: 12px;
      font-weight: 700;
      flex-shrink: 0;
    }

    .step-body { padding-top: 4px; flex: 1; }
    .step-title { font-weight: 600; color: #1e293b; font-size: 14px; margin-bottom: 3px; }
    .step-desc { color: #64748b; font-size: 14px; line-height: 1.6; }

    /* ── TABLES ───────────────────────────────────────────────── */
    .table-wrap { overflow-x: auto; margin: 16px 0 24px; border-radius: 10px; border: 1px solid #e2e8f0; }

    table { width: 100%; border-collapse: collapse; font-size: 13.5px; }

    thead th {
      text-align: left;
      padding: 10px 14px;
      background: #f8fafc;
      border-bottom: 1px solid #e2e8f0;
      font-weight: 600;
      color: #374151;
      font-size: 11.5px;
      text-transform: uppercase;
      letter-spacing: .05em;
    }

    tbody td {
      padding: 11px 14px;
      border-bottom: 1px solid #f1f5f9;
      color: #475569;
      vertical-align: top;
    }

    tbody tr:last-child td { border-bottom: none; }
    tbody tr:hover td { background: #fafafa; }

    .td-center { text-align: center; }
    .tick { color: var(--brand); font-weight: 700; }
    .dash { color: #cbd5e1; }

    /* ── FEATURE GRID ─────────────────────────────────────────── */
    .feat-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
      gap: 14px;
      margin: 24px 0;
    }

    .feat-card {
      background: #f8fafc;
      border: 1px solid #e2e8f0;
      border-radius: 10px;
      padding: 18px 16px;
      transition: box-shadow .2s, border-color .2s;
      text-decoration: none;
      color: inherit;
      display: block;
      cursor: pointer;
    }

    .feat-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,.08); border-color: #bbf7d0; text-decoration: none; }

    .feat-icon { font-size: 24px; margin-bottom: 10px; }
    .feat-title { font-size: 13.5px; font-weight: 600; color: #1e293b; margin-bottom: 4px; }
    .feat-desc { font-size: 12.5px; color: #64748b; line-height: 1.5; }

    /* ── PLANS GRID ───────────────────────────────────────────── */
    .plans-grid {
      display: grid;
      grid-template-columns: repeat(4, 1fr);
      gap: 12px;
      margin: 24px 0 32px;
    }

    .plan-card {
      border: 1px solid #e2e8f0;
      border-radius: 12px;
      padding: 22px 16px;
      text-align: center;
    }

    .plan-card.highlight {
      border-color: var(--brand);
      background: #f0fdf4;
      position: relative;
    }

    .plan-rec {
      position: absolute;
      top: -10px; left: 50%;
      transform: translateX(-50%);
      background: var(--brand);
      color: #fff;
      font-size: 9px;
      font-weight: 700;
      padding: 2px 10px;
      border-radius: 999px;
      text-transform: uppercase;
      letter-spacing: .06em;
    }

    .plan-name { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 10px; color: #475569; }
    .plan-price { font-size: 28px; font-weight: 800; color: #0f172a; letter-spacing: -.04em; }
    .plan-period { font-size: 12px; color: #94a3b8; margin-bottom: 14px; }
    .plan-limit { font-size: 13px; color: #475569; }

    /* ── CHECK LIST ───────────────────────────────────────────── */
    .check-list { list-style: none; padding: 0; margin: 12px 0 16px; }
    .check-list li { padding: 5px 0 5px 26px; position: relative; color: #475569; font-size: 14px; }
    .check-list li::before { content: '✓'; position: absolute; left: 0; color: var(--brand); font-weight: 700; }

    /* ── CHANNEL CARDS ────────────────────────────────────────── */
    .channel-list { display: flex; flex-direction: column; gap: 12px; margin: 16px 0; }

    .channel-card {
      display: flex;
      align-items: flex-start;
      gap: 14px;
      padding: 16px 18px;
      background: #f8fafc;
      border: 1px solid #e2e8f0;
      border-radius: 10px;
    }

    .channel-emoji { font-size: 26px; flex-shrink: 0; }
    .channel-name { font-weight: 600; font-size: 14px; color: #1e293b; margin-bottom: 2px; }
    .channel-desc { font-size: 13px; color: #64748b; }

    /* ── INTRO CARD ───────────────────────────────────────────── */
    .intro-card {
      background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
      border: 1px solid #bbf7d0;
      border-radius: 14px;
      padding: 28px 32px;
      margin-bottom: 40px;
    }

    .intro-card h1 { color: #14532d; font-size: 28px; }
    .intro-card .lead { color: #166534; font-size: 16px; }

    .version-row {
      display: flex;
      align-items: center;
      gap: 10px;
      margin-top: 16px;
    }

    .version-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--brand); flex-shrink: 0; }
    .version-text { font-size: 12px; color: #4ade80; font-weight: 500; }

    /* ── BACK TO TOP ──────────────────────────────────────────── */
    .back-top {
      position: fixed;
      bottom: 24px; right: 24px;
      width: 40px; height: 40px;
      background: var(--brand);
      color: #fff;
      border: none;
      border-radius: 50%;
      font-size: 18px;
      cursor: pointer;
      opacity: 0;
      transform: translateY(12px);
      transition: opacity .3s, transform .3s;
      box-shadow: 0 4px 16px rgba(22,163,74,.4);
      z-index: 99;
      display: flex;
      align-items: center;
      justify-content: center;
    }

    .back-top.show { opacity: 1; transform: translateY(0); }

    /* ── RESPONSIVE ───────────────────────────────────────────── */
    @media (max-width: 900px) {
      .sidebar {
        transform: translateX(-100%);
        transition: transform .28s cubic-bezier(.4,0,.2,1);
      }
      .sidebar.open { transform: translateX(0); }
      .main { margin-left: 0; padding: 32px 20px 80px; }
      .mobile-toggle { display: flex; }
      .plans-grid { grid-template-columns: repeat(2, 1fr); }
      .feat-grid { grid-template-columns: repeat(2, 1fr); }
      .search-input { width: 190px; }
    }

    @media (max-width: 520px) {
      .header-search-wrap { display: none; }
      .plans-grid { grid-template-columns: 1fr 1fr; }
    }

    /* ── OVERLAY ──────────────────────────────────────────────── */
    .overlay {
      display: none;
      position: fixed;
      inset: 0;
      background: rgba(0,0,0,.4);
      z-index: 99;
    }

    .overlay.show { display: block; }
