:root {
  --bg: #f6f1e8;
  --bg-elev: #fffaf2;
  --panel: rgba(255, 251, 245, 0.88);
  --panel-strong: #fff;
  --ink: #181511;
  --muted: #625a4f;
  --muted-2: #8a8174;
  --line: rgba(24, 21, 17, 0.1);
  --line-strong: rgba(24, 21, 17, 0.18);
  --accent: #a46a13;
  --accent-strong: #8b560b;
  --accent-soft: rgba(164, 106, 19, 0.1);
  --success: #255f4b;
  --shadow: 0 24px 60px rgba(30, 25, 20, 0.08);
  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 28px;
  --content: 1200px;
  --font-sans: "Manrope", "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", "SFMono-Regular", monospace;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(164, 106, 19, 0.08), transparent 34%),
    linear-gradient(180deg, #fbf7f1 0%, var(--bg) 45%, #f2ece3 100%);
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
}

[data-lang] {
  display: none;
}

body[data-doc-lang="es"] [data-lang="es"],
body[data-doc-lang="en"] [data-lang="en"] {
  display: initial;
}

body[data-doc-lang="es"] [data-lang-block="es"],
body[data-doc-lang="en"] [data-lang-block="en"] {
  display: block;
}

[data-lang-block] {
  display: none;
}

.docs-shell {
  width: min(calc(100% - 32px), var(--content));
  margin: 0 auto;
}

.docs-topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(14px);
  background: rgba(246, 241, 232, 0.78);
  border-bottom: 1px solid rgba(24, 21, 17, 0.05);
}

.docs-topbar__inner {
  width: min(calc(100% - 32px), var(--content));
  margin: 0 auto;
  min-height: 74px;
  display: flex;
  gap: 24px;
  align-items: center;
  justify-content: space-between;
}

.docs-brand {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.docs-brand__eyebrow {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 800;
}

.docs-brand__title {
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.docs-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
}

.docs-nav__link {
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
  transition: background 160ms ease, color 160ms ease;
}

.docs-nav__link:hover,
.docs-nav__link[aria-current="page"] {
  background: rgba(24, 21, 17, 0.06);
  color: var(--ink);
}

.lang-switch {
  display: inline-flex;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.6);
}

.lang-switch button {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-family: inherit;
  font-size: 0.84rem;
  font-weight: 800;
  padding: 9px 14px;
  border-radius: 999px;
  cursor: pointer;
}

.lang-switch button.is-active {
  background: var(--ink);
  color: #fff;
}

.docs-hero {
  padding: 64px 0 36px;
}

.docs-hero__card {
  padding: clamp(28px, 4vw, 48px);
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.8), rgba(255, 248, 239, 0.96));
  border: 1px solid rgba(24, 21, 17, 0.08);
  box-shadow: var(--shadow);
}

.docs-hero__label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

.docs-hero__label::before {
  content: "";
  width: 28px;
  height: 1px;
  background: currentColor;
}

.docs-hero h1 {
  margin: 0 0 14px;
  font-size: clamp(2.2rem, 4vw, 4.4rem);
  line-height: 0.98;
  letter-spacing: -0.05em;
}

.docs-hero p {
  margin: 0;
  max-width: 760px;
  color: var(--muted);
  font-size: clamp(1rem, 1.6vw, 1.12rem);
  line-height: 1.7;
}

.docs-actions {
  margin-top: 24px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.docs-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: 999px;
  padding: 13px 18px;
  font-size: 0.94rem;
  font-weight: 800;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.docs-btn:hover {
  transform: translateY(-1px);
}

.docs-btn--primary {
  background: var(--ink);
  color: #fff;
  box-shadow: 0 10px 24px rgba(24, 21, 17, 0.16);
}

.docs-btn--secondary {
  background: rgba(255, 255, 255, 0.76);
  color: var(--ink);
  border: 1px solid var(--line);
}

.docs-grid {
  display: grid;
  gap: 20px;
}

.docs-grid--cards {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.docs-card {
  padding: 24px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 10px 24px rgba(30, 25, 20, 0.04);
}

.docs-card__kicker {
  display: inline-flex;
  margin-bottom: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.docs-card h2,
.docs-card h3 {
  margin: 0 0 10px;
  font-size: 1.2rem;
  line-height: 1.2;
  letter-spacing: -0.03em;
}

.docs-card p {
  margin: 0 0 14px;
  color: var(--muted);
  line-height: 1.7;
}

.docs-card ul {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
}

.docs-card li + li {
  margin-top: 10px;
}

.docs-card__link {
  margin-top: 16px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  color: var(--accent-strong);
}

.docs-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 32px;
  padding-bottom: 72px;
}

.docs-aside {
  position: sticky;
  top: 96px;
  align-self: start;
  padding: 18px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid var(--line);
}

.docs-aside__title {
  margin: 0 0 12px;
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted-2);
}

.docs-toc {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.docs-toc a {
  padding: 9px 10px;
  border-radius: 12px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
}

.docs-toc a.is-active,
.docs-toc a:hover {
  background: rgba(24, 21, 17, 0.05);
  color: var(--ink);
}

.docs-article {
  display: grid;
  gap: 20px;
}

.docs-section {
  padding: 28px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid var(--line);
  scroll-margin-top: 94px;
}

.docs-section h2 {
  margin: 0 0 12px;
  font-size: clamp(1.4rem, 2vw, 1.9rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.docs-section h3 {
  margin: 22px 0 10px;
  font-size: 1rem;
  letter-spacing: -0.02em;
}

.docs-section p,
.docs-section li {
  color: var(--muted);
  line-height: 1.72;
}

.docs-section ul,
.docs-section ol {
  margin: 14px 0 0;
  padding-left: 18px;
}

.docs-section li + li {
  margin-top: 8px;
}

.docs-note {
  margin-top: 18px;
  padding: 16px 18px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--bg-elev);
}

.docs-note strong {
  color: var(--ink);
}

.docs-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.docs-badge {
  padding: 9px 12px;
  border-radius: 999px;
  background: rgba(24, 21, 17, 0.06);
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 800;
}

.docs-table-wrap {
  overflow-x: auto;
  margin-top: 18px;
}

.docs-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}

.docs-table th,
.docs-table td {
  text-align: left;
  vertical-align: top;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
}

.docs-table th {
  color: var(--ink);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.docs-code,
code {
  font-family: var(--font-mono);
  font-size: 0.88em;
}

.docs-code {
  display: block;
  padding: 16px 18px;
  margin-top: 16px;
  border-radius: 16px;
  overflow-x: auto;
  background: #15120f;
  color: #f4e7d1;
}

.docs-footer {
  padding: 32px 0 64px;
  color: var(--muted-2);
  font-size: 0.92rem;
}

.docs-footer__inner {
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

@media (max-width: 1080px) {
  .docs-grid--cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .docs-layout {
    grid-template-columns: 1fr;
  }

  .docs-aside {
    position: static;
  }
}

@media (max-width: 720px) {
  .docs-topbar__inner {
    padding: 12px 0;
    align-items: flex-start;
    flex-direction: column;
  }

  .docs-nav {
    width: 100%;
    justify-content: flex-start;
  }

  .docs-grid--cards {
    grid-template-columns: 1fr;
  }

  .docs-hero {
    padding-top: 44px;
  }

  .docs-section,
  .docs-card,
  .docs-hero__card {
    padding: 22px;
  }
}
