/* Genesis site — same palette as the app. */
:root {
  color-scheme: dark;
  --bg: #0b0c10;
  --bg-2: #0f1117;
  --panel: #13151b;
  --panel-2: #1a1d25;
  --line: #232733;
  --line-2: #2f3442;
  --text: #ecedf2;
  --text-2: #c3c7d2;
  --muted: #8b91a1;
  --accent: #7c5cff;
  --accent-hi: #9178ff;
  --accent-2: #22d3ee;
  --warn: #fbbf24;
  --ok: #34d399;
  --radius: 14px;
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --topbar: 64px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--topbar) + 16px); -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.65 var(--font); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent-2); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--accent-hi); outline-offset: 2px; border-radius: 6px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.icon { width: 20px; height: 20px; flex-shrink: 0; }
.icon.sm { width: 16px; height: 16px; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 10px; font-weight: 600; font-size: 15px; color: var(--text); border: 1px solid transparent; transition: background .15s, border-color .15s, transform .15s; white-space: nowrap; }
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 8px 24px -8px rgb(124 92 255 / .6); }
.btn-primary:hover { background: var(--accent-hi); }
.btn-ghost { background: rgb(255 255 255 / .04); border-color: var(--line-2); }
.btn-ghost:hover { background: rgb(255 255 255 / .08); }
.btn-sm { height: 34px; padding: 0 12px; font-size: 14px; border-radius: 9px; }
.btn-lg { height: 50px; padding: 0 22px; font-size: 16px; border-radius: 12px; }
.btn-block { width: 100%; }
.link { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; }

/* ---------- Top bar ---------- */
.topbar { position: sticky; top: 0; z-index: 30; height: var(--topbar); background: rgb(11 12 16 / .78); backdrop-filter: saturate(160%) blur(14px); border-bottom: 1px solid var(--line); }
.topbar-inner { max-width: 1400px; height: 100%; margin: 0 auto; padding: 0 20px; display: flex; align-items: center; gap: 20px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); font-weight: 700; font-size: 17px; letter-spacing: -.01em; }
.brand:hover { text-decoration: none; }
.brand img { border-radius: 8px; }
.topnav { display: flex; gap: 4px; }
.topnav a { color: var(--muted); font-size: 15px; font-weight: 500; padding: 6px 10px; border-radius: 8px; }
.topnav a:hover, .topnav a[aria-current] { color: var(--text); background: rgb(255 255 255 / .05); text-decoration: none; }
.menu-btn { display: none; background: none; border: 0; color: var(--text); padding: 6px; margin-left: -6px; border-radius: 8px; cursor: pointer; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); margin-top: 64px; }
.footer-inner { max-width: 1200px; margin: 0 auto; padding: 28px 20px 40px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; color: var(--muted); font-size: 14px; }
.footer-inner p { margin: 0; flex: 1; min-width: 240px; }
.footer-inner nav { display: flex; flex-wrap: wrap; gap: 16px; }
.footer-inner nav a { color: var(--muted); }
.footer-inner nav a:hover { color: var(--text); }
.footer .brand { font-size: 15px; }

/* ---------- Home ---------- */
.hero { position: relative; max-width: 1200px; margin: 0 auto; padding: 72px 20px 24px; text-align: center; }
.hero-glow { position: absolute; inset: -80px 0 auto; height: 620px; z-index: -1; background: radial-gradient(600px 300px at 50% 30%, rgb(124 92 255 / .28), transparent 70%), radial-gradient(500px 260px at 72% 55%, rgb(34 211 238 / .14), transparent 70%); pointer-events: none; }
.badge { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 22px; padding: 6px 14px; border: 1px solid var(--line-2); border-radius: 999px; background: rgb(255 255 255 / .03); color: var(--text-2); font-size: 13px; font-weight: 500; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px rgb(52 211 153 / .15); }
.hero h1 { margin: 0 auto; max-width: 900px; font-size: clamp(38px, 6.4vw, 68px); line-height: 1.04; letter-spacing: -.035em; font-weight: 800; }
.grad { background: linear-gradient(90deg, #a48bff, #7c5cff 40%, #22d3ee); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { max-width: 660px; margin: 22px auto 0; color: var(--text-2); font-size: clamp(17px, 2.1vw, 19px); line-height: 1.6; }
.hero-cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 32px; }
.hero-note { margin: 14px 0 0; font-size: 14px; }
.window { margin: 56px auto 0; max-width: 1100px; border: 1px solid var(--line-2); border-radius: 16px; overflow: hidden; background: var(--panel); box-shadow: 0 40px 120px -40px rgb(124 92 255 / .45), 0 30px 60px -30px rgb(0 0 0 / .8); }
.window-bar { display: flex; gap: 7px; padding: 12px 14px; border-bottom: 1px solid var(--line); background: var(--bg-2); }
.window-bar span { width: 11px; height: 11px; border-radius: 50%; background: #2c303c; }
.window-bar span:nth-child(1) { background: #ff5f57; } .window-bar span:nth-child(2) { background: #febc2e; } .window-bar span:nth-child(3) { background: #28c840; }

.section { max-width: 1200px; margin: 0 auto; padding: 96px 20px 0; }
.section-head { text-align: center; max-width: 680px; margin: 0 auto 40px; }
.section h2 { font-size: clamp(28px, 3.6vw, 40px); line-height: 1.15; letter-spacing: -.025em; margin: 0 0 12px; }
.section-head p { margin: 0; font-size: 17px; }
.eyebrow { margin: 0 0 10px; color: var(--accent-hi); font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }

.features { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }
.feature { padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(180deg, var(--panel), var(--bg-2)); transition: border-color .2s, transform .2s; }
.feature:hover { border-color: var(--line-2); transform: translateY(-2px); }
.feature-icon { display: inline-grid; place-items: center; width: 40px; height: 40px; margin-bottom: 14px; border-radius: 10px; color: var(--accent-hi); background: rgb(124 92 255 / .12); border: 1px solid rgb(124 92 255 / .25); }
.feature h3 { margin: 0 0 6px; font-size: 17px; letter-spacing: -.01em; }
.feature p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.55; }

.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 48px; align-items: center; }
.split.reverse .split-text { order: 2; }
.split .window { margin: 0; }
.split-text p.muted { font-size: 17px; line-height: 1.65; margin: 0 0 18px; }

.install-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.card { padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.card-title { display: flex; align-items: center; gap: 10px; margin: 0 0 16px; font-size: 18px; }
.card-title .icon { color: var(--accent-hi); }
.dl-list { display: grid; gap: 8px; margin-bottom: 14px; }
.dl { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg-2); color: var(--text); transition: border-color .15s, background .15s; }
.dl:hover { border-color: var(--accent); background: rgb(124 92 255 / .08); text-decoration: none; }
.dl .icon { color: var(--muted); }
.dl strong { display: block; font-size: 15px; }
.dl small { display: block; color: var(--muted); font-size: 13px; }
.dl.mine { border-color: rgb(124 92 255 / .6); background: rgb(124 92 255 / .1); }
.dl.mine .icon { color: var(--accent-hi); }
.cmd-label { margin: 16px 0 6px; color: var(--text-2); font-size: 13px; font-weight: 600; }

/* ---------- Docs layout ---------- */
.docs-layout { max-width: 1400px; margin: 0 auto; display: grid; grid-template-columns: 260px minmax(0, 1fr) 220px; gap: 48px; padding: 0 20px; }
.sidebar { position: sticky; top: var(--topbar); align-self: start; height: calc(100vh - var(--topbar)); overflow-y: auto; padding: 28px 8px 28px 0; scrollbar-width: thin; }
.side-group { margin-bottom: 22px; }
.side-title { margin: 0 0 8px; padding: 0 12px; color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.sidebar ul, .toc ul { list-style: none; margin: 0; padding: 0; }
.sidebar a { display: block; padding: 7px 12px; border-radius: 8px; color: var(--text-2); font-size: 15px; font-weight: 500; }
.sidebar a:hover { background: rgb(255 255 255 / .04); color: var(--text); text-decoration: none; }
.sidebar a[aria-current] { background: rgb(124 92 255 / .14); color: #fff; box-shadow: inset 2px 0 0 var(--accent); }
.side-cta { margin-top: 28px; padding: 0 4px; }
.content { min-width: 0; padding: 40px 0 0; }
.content > .eyebrow { margin-bottom: 6px; }
.toc { position: sticky; top: var(--topbar); align-self: start; max-height: calc(100vh - var(--topbar)); overflow-y: auto; padding: 40px 0 24px; }
.toc .side-title { padding: 0; }
.toc a { display: block; padding: 5px 0 5px 12px; border-left: 1px solid var(--line); color: var(--muted); font-size: 14px; line-height: 1.4; }
.toc .d3 a { padding-left: 24px; font-size: 13px; }
.toc a:hover { color: var(--text); text-decoration: none; }
.toc a.active { color: var(--text); border-left-color: var(--accent); }

/* ---------- Prose ---------- */
.prose { max-width: 760px; color: var(--text-2); font-size: 16.5px; line-height: 1.75; }
.prose h1 { margin: 0 0 20px; color: var(--text); font-size: clamp(32px, 4.4vw, 44px); line-height: 1.1; letter-spacing: -.03em; }
.prose h2, .prose h3, .prose h4 { position: relative; color: var(--text); letter-spacing: -.015em; }
.prose h2 { margin: 56px 0 16px; padding-top: 28px; border-top: 1px solid var(--line); font-size: 26px; line-height: 1.25; }
.prose h3 { margin: 36px 0 12px; font-size: 19px; }
.prose h4 { margin: 28px 0 10px; font-size: 16px; }
.anchor { position: absolute; left: -22px; color: var(--muted); opacity: 0; font-weight: 400; text-decoration: none; }
.prose h2 .anchor { top: 28px; }
.prose :is(h2, h3, h4):hover .anchor { opacity: 1; }
.prose p { margin: 0 0 16px; }
.prose strong { color: var(--text); font-weight: 600; }
.prose ul, .prose ol { margin: 0 0 18px; padding-left: 24px; }
.prose li { margin: 6px 0; padding-left: 4px; }
.prose li::marker { color: var(--muted); }
.prose ol > li::marker { color: var(--accent-hi); font-weight: 700; }
.prose a { color: var(--accent-2); text-decoration: underline; text-decoration-color: rgb(34 211 238 / .35); text-underline-offset: 3px; }
.prose a:hover { text-decoration-color: currentColor; }
.prose :not(pre) > code { padding: .15em .4em; border: 1px solid var(--line); border-radius: 6px; background: var(--panel-2); color: var(--text); font: .87em/1.4 var(--mono); }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 40px 0; }
.prose img { border-radius: 10px; border: 1px solid var(--line); }

/* Code blocks with a header and a copy button */
.code { margin: 14px 0 20px; border: 1px solid var(--line-2); border-radius: 12px; background: #090a0e; overflow: hidden; }
.code-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 8px 6px 14px; border-bottom: 1px solid var(--line); background: var(--panel); color: var(--muted); font-size: 12.5px; font-weight: 600; }
.code-head > span { display: inline-flex; align-items: center; gap: 6px; }
.copy { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border: 1px solid var(--line-2); border-radius: 7px; background: var(--panel-2); color: var(--text-2); font: 600 12.5px var(--font); cursor: pointer; transition: background .15s, color .15s; }
.copy:hover { background: #262a36; color: var(--text); }
.copy.done { color: var(--ok); border-color: rgb(52 211 153 / .4); }
.code pre { margin: 0; padding: 16px 18px; overflow-x: auto; }
.code code { color: #e6e8ef; font: 14px/1.65 var(--mono); white-space: pre; }

/* Callouts */
.callout { display: flex; gap: 14px; margin: 20px 0 24px; padding: 16px 18px; border: 1px solid rgb(251 191 36 / .35); border-radius: 12px; background: linear-gradient(180deg, rgb(251 191 36 / .08), rgb(251 191 36 / .03)); color: var(--text-2); font-size: 15.5px; line-height: 1.65; }
.callout-icon { margin-top: 3px; color: var(--warn); }
.callout p { margin: 0 0 8px; } .callout p:last-child, .callout ul:last-child { margin-bottom: 0; }
.callout strong { color: var(--warn); }
.section .callout { margin-top: 16px; }

/* Tables */
.table { margin: 16px 0 24px; border: 1px solid var(--line); border-radius: 12px; overflow-x: auto; }
.table table { width: 100%; border-collapse: collapse; font-size: 14.5px; line-height: 1.5; }
.table th { position: sticky; top: 0; background: var(--panel); color: var(--text); font-weight: 600; text-align: left; white-space: nowrap; }
.table th, .table td { padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: rgb(255 255 255 / .02); }

/* Install tabs */
.tabs { margin: 32px 0 8px; }
.tablist { display: inline-flex; gap: 4px; padding: 4px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
.tablist [role=tab] { height: 38px; padding: 0 18px; border: 0; border-radius: 9px; background: none; color: var(--muted); font: 600 15px var(--font); cursor: pointer; }
.tablist [role=tab]:hover { color: var(--text); }
.tablist [role=tab][aria-selected=true] { background: var(--accent); color: #fff; }
.tabpanel { padding-top: 8px; }
.tabpanel > h3:first-child { margin-top: 24px; }
.prose h3[id^="opcion"] { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); font-size: 17px; }
.prose h3[id^="opcion"] .anchor { display: none; }

/* Previous / next */
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; max-width: 760px; margin: 56px 0 0; }
.pager-link { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; color: var(--text); }
.pager-link:hover { border-color: var(--accent); text-decoration: none; }
.pager-link span { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-size: 13px; }
.pager-link.next { text-align: right; align-items: flex-end; grid-column: 2; }
.scrim { display: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
  .docs-layout { grid-template-columns: 240px minmax(0, 1fr); gap: 40px; }
  .toc { display: none; }
}
@media (max-width: 900px) {
  .menu-btn { display: inline-grid; place-items: center; }
  .docs .topnav { display: none; }
  .docs-layout { grid-template-columns: minmax(0, 1fr); padding: 0 16px; }
  .sidebar { position: fixed; top: var(--topbar); left: 0; z-index: 25; width: 284px; height: calc(100vh - var(--topbar)); padding: 20px 12px; background: var(--bg); border-right: 1px solid var(--line); transform: translateX(-100%); transition: transform .2s ease; }
  .nav-open .sidebar { transform: none; }
  .nav-open .scrim { display: block; position: fixed; inset: var(--topbar) 0 0; z-index: 20; background: rgb(0 0 0 / .55); }
  .content { padding-top: 28px; }
  .anchor { display: none; }
  .split, .install-grid { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .split.reverse .split-text { order: 0; }
  .section { padding-top: 72px; }
}
@media (max-width: 560px) {
  .topbar-inner { padding: 0 16px; gap: 12px; }
  .topnav { display: none; }
  .brand { margin-right: auto; }
  .topbar-coffee { margin-left: 0; }
  .hero { padding: 48px 16px 8px; }
  .hero-cta .btn { width: 100%; }
  .window { margin-top: 36px; border-radius: 12px; }
  .section { padding-left: 16px; padding-right: 16px; }
  .card { padding: 18px; }
  .prose { font-size: 16px; }
  .prose h2 { font-size: 23px; }
  .tablist { display: flex; width: 100%; }
  .tablist [role=tab] { flex: 1; padding: 0 8px; }
  .pager { grid-template-columns: 1fr; }
  .pager-link.next { grid-column: auto; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
.sidebar a.btn { display: flex; padding: 0 16px; color: #fff; font-weight: 600; }
.sidebar a.btn:hover { background: var(--accent-hi); }

/* ---------- Support (Buy Me a Coffee) ---------- */
.btn-coffee { background: #ffdd00; color: #1a1400; box-shadow: 0 8px 24px -10px rgb(255 221 0 / .55); }
.btn-coffee:hover { background: #ffe633; }
.topbar-coffee { margin-left: auto; }
.topnav { margin-right: 0; }
.support { display: flex; align-items: center; gap: 18px; max-width: 760px; margin: 48px 0 0; padding: 20px 22px; border: 1px solid rgb(255 221 0 / .28); border-radius: var(--radius); background: linear-gradient(135deg, rgb(255 221 0 / .08), rgb(124 92 255 / .06)); }
.support > div { flex: 1; min-width: 0; }
.support p { margin: 0; font-size: 15px; line-height: 1.55; }
.support-title { color: var(--text); font-weight: 700; font-size: 16.5px !important; margin-bottom: 4px !important; }
.support-icon { display: inline-grid; place-items: center; flex-shrink: 0; width: 46px; height: 46px; border-radius: 12px; background: rgb(255 221 0 / .14); color: #ffdd00; }
.support-hero { max-width: none; margin: 0; padding: 28px 30px; }
.support-hero .support-title { font-size: 20px !important; }
.section .support:not(.support-hero) { max-width: none; margin-top: 16px; }
.side-support { margin-top: 18px; padding: 14px; border: 1px solid rgb(255 221 0 / .25); border-radius: 12px; background: rgb(255 221 0 / .05); }
.side-support p { margin: 0 0 10px; color: var(--text-2); font-size: 14px; }
.sidebar a.btn-coffee, .sidebar a.btn-coffee:hover { color: #1a1400; }
.sidebar a.btn-coffee:hover { background: #ffe633; }
.footer-coffee { display: inline-flex; align-items: center; gap: 6px; color: #ffdd00 !important; }
.footer-inner p a { color: var(--text-2); }
@media (max-width: 900px) {
  .support { flex-wrap: wrap; }
  .support .btn { width: 100%; }
}
@media (max-width: 560px) {
  .topbar-coffee span { display: none; }
  .topbar-coffee { padding: 0 10px; }
  .support-hero { padding: 22px; }
}

/* ---------- Language switcher ---------- */
.lang-switch { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; padding: 6px 10px; border-radius: 8px; color: var(--muted); font-size: 14px; font-weight: 500; }
.lang-switch:hover { color: var(--text); background: rgb(255 255 255 / .05); text-decoration: none; }
.lang-switch + .topbar-coffee { margin-left: 0; }
@media (max-width: 560px) {
  .brand { margin-right: 0; }
  .lang-switch { padding: 6px; }
  .lang-switch span { font-size: 0; }
  .lang-switch span::before { content: attr(data-short); font-size: 13px; font-weight: 600; }
}
