/* Mohave — sitio wiki, paleta gris + logo, dark-first underground */
:root {
  --bg: #141416;
  --bg-alt: #1c1c20;
  --panel: #1e1e22;
  --panel-2: #232328;
  --border: #2e2e34;
  --border-strong: #3d3d45;
  --text: #e4e4e7;
  --text-dim: #a1a1aa;
  --accent: #71717a;
  --accent-strong: #fafafa;
  --code-bg: #101013;
  --code-text: #d4d4d8;
  --code-border: #26262c;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.25);
  --mono: "SF Mono", "Cascadia Code", Consolas, Menlo, monospace;
}

[data-theme="light"] {
  --bg: #f4f4f5;
  --bg-alt: #ececee;
  --panel: #ffffff;
  --panel-2: #f7f7f8;
  --border: #d4d4d8;
  --border-strong: #b8b8c0;
  --text: #27272a;
  --text-dim: #52525b;
  --accent: #3f3f46;
  --accent-strong: #18181b;
  --code-bg: #1c1c1f;
  --code-text: #d4d4d8;
  --code-border: #33333a;
  --shadow: 0 1px 2px rgba(0,0,0,.05), 0 8px 24px rgba(0,0,0,.06);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background:
    radial-gradient(1200px 500px at 80% -10%, rgba(255,255,255,.03), transparent 60%),
    var(--bg);
  color: var(--text);
  line-height: 1.6;
  transition: background .25s, color .25s;
}

.layout { display: flex; min-height: 100vh; }

/* ---------- Sidebar ---------- */
.sidebar {
  width: 264px;
  flex-shrink: 0;
  background: var(--panel);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 18px 16px;
  border-bottom: 1px solid var(--border);
}
.brand-logo {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  box-shadow: var(--shadow);
}
.brand-name { font-size: 20px; font-weight: 700; letter-spacing: 0.5px; }
.brand-sub { font-size: 12px; color: var(--text-dim); font-family: var(--mono); }

.nav { padding: 12px 10px; flex: 1; }
.nav-item {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  padding: 9px 12px;
  font-size: 14px;
  color: var(--text-dim);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background .15s, color .15s;
}
.nav-item:hover { background: var(--bg-alt); color: var(--text); }
.nav-item.active { background: var(--accent-strong); color: var(--bg); font-weight: 600; }
[data-theme="light"] .nav-item.active { color: #fff; }

.sidebar-foot { padding: 14px; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 8px; }

/* ---------- Theme toggle ---------- */
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-alt);
  color: var(--text-dim);
  font-size: 13px;
  cursor: pointer;
  transition: all .15s;
}
.theme-toggle:hover { border-color: var(--border-strong); color: var(--text); }
.theme-toggle .ico { font-size: 15px; line-height: 1; }

/* ---------- Content ---------- */
.content { flex: 1; max-width: 880px; padding: 40px 48px 80px; }

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

h1 { font-size: 30px; margin-bottom: 16px; letter-spacing: -0.5px; }
h2 { font-size: 21px; margin: 34px 0 12px; padding-top: 10px; border-top: 1px solid var(--border); }
h3 { font-size: 17px; margin: 22px 0 8px; }
h4 { font-size: 15px; margin-bottom: 4px; }
p { margin-bottom: 12px; color: var(--text); }
.muted { color: var(--text-dim); }
a { color: var(--accent-strong); text-decoration: none; }
a:hover { text-decoration: underline; }
code {
  font-family: var(--mono);
  font-size: 0.88em;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  padding: 2px 7px;
  border-radius: 6px;
}

/* ---------- Hero ---------- */
.hero { text-align: center; padding: 40px 0 30px; }
.hero-logo {
  width: 110px;
  height: 110px;
  margin-bottom: 18px;
  border-radius: 28px;
  box-shadow: var(--shadow);
}
.hero h1 { font-size: 44px; margin-bottom: 10px; letter-spacing: -1px; }
.hero-tag { font-size: 17px; color: var(--text-dim); max-width: 620px; margin: 0 auto 24px; }
.hero-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-bottom: 22px; }
.hero-badges { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }

.badge {
  font-size: 12px;
  font-family: var(--mono);
  padding: 4px 13px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--panel);
  color: var(--text-dim);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all .15s;
}
.btn:hover { border-color: var(--border-strong); transform: translateY(-1px); box-shadow: var(--shadow); }
.btn-primary { background: var(--accent-strong); color: var(--bg); border-color: var(--accent-strong); }
[data-theme="light"] .btn-primary { color: #fff; }
.btn-primary:hover { filter: brightness(1.15); }
.btn-ghost { background: transparent; }
.btn-block { width: 100%; text-align: center; }

/* ---------- Cards ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin: 26px 0; }
.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
  transition: border-color .15s, transform .15s;
}
.card:hover { border-color: var(--border-strong); }
.card h3 { margin-top: 0; }
.card p { font-size: 14px; color: var(--text-dim); margin-bottom: 0; }

/* ---------- Code / consola ---------- */
.code, pre.code {
  background: var(--code-bg);
  color: var(--code-text);
  border: 1px solid var(--code-border);
  border-radius: var(--radius);
  padding: 16px 18px;
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.55;
  margin: 14px 0;
  box-shadow: var(--shadow);
  text-decoration: none;
}
/* dentro de la consola no hay subrayados ni estilos inline */
.code code, pre.code code,
.code a, pre.code a,
.code strong, pre.code strong {
  background: none;
  border: none;
  padding: 0;
  border-radius: 0;
  color: inherit;
  font: inherit;
  text-decoration: none;
}
.code .dim, pre.code .dim { color: #63636b; }
.code .kw, pre.code .kw { color: #93c5fd; }
.code .str, pre.code .str { color: #86efac; }
.code .com, pre.code .com { color: #63636b; font-style: italic; }

/* ---------- Tables ---------- */
table.ops { width: 100%; border-collapse: collapse; margin: 14px 0; font-size: 14px; }
table.ops th, table.ops td { text-align: left; padding: 8px 12px; border-bottom: 1px solid var(--border); }
table.ops th { color: var(--text-dim); font-weight: 600; font-size: 13px; }

/* ---------- Features ---------- */
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; margin: 14px 0 8px; }
.feature {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  box-shadow: var(--shadow);
}
.feature h4 { font-family: var(--mono); font-size: 13.5px; }
.feature p { font-size: 13px; color: var(--text-dim); margin-bottom: 0; }

/* ---------- Examples ---------- */
.example-list { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 20px; }
.example-chip {
  font-family: var(--mono);
  font-size: 12.5px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 5px 14px;
  color: var(--text);
  text-decoration: none;
  transition: all .15s;
}
.example-chip:hover { border-color: var(--border-strong); transform: translateY(-1px); }

/* ---------- Lists ---------- */
ul, ol { margin: 10px 0 14px 22px; }
li { margin-bottom: 6px; }

/* ---------- Responsive ---------- */
@media (max-width: 820px) {
  .layout { flex-direction: column; }
  .sidebar { width: 100%; height: auto; position: static; border-right: none; border-bottom: 1px solid var(--border); }
  .nav { display: flex; flex-wrap: wrap; padding: 8px; }
  .nav-item { width: auto; }
  .content { padding: 24px 20px 60px; }
  .hero h1 { font-size: 34px; }
}
