:root {
  --bg: #ffe6a7;
  --bg-deep: #f4d99a;
  --panel: rgba(255, 245, 218, 0.82);
  --panel-strong: rgba(255, 250, 236, 0.94);
  --text: #432818;
  --muted: #6f4b31;
  --line: rgba(111, 29, 27, 0.14);
  --accent: #6f1d1b;
  --accent-2: #bb9457;
  --accent-3: #99582a;
  --surface-dark: #432818;
  --shadow: 0 24px 60px rgba(67, 40, 24, 0.16);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --sidebar-width: 290px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Manrope", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(111, 29, 27, 0.16), transparent 34%),
    radial-gradient(circle at bottom right, rgba(187, 148, 87, 0.2), transparent 30%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-deep) 100%);
}

body.nav-open {
  overflow: hidden;
}

.page-glow {
  position: fixed;
  pointer-events: none;
  width: 26rem;
  height: 26rem;
  border-radius: 999px;
  filter: blur(70px);
  opacity: 0.35;
  z-index: 0;
}

.page-glow-a {
  top: -8rem;
  right: -8rem;
  background: rgba(111, 29, 27, 0.3);
}

.page-glow-b {
  bottom: -12rem;
  left: -10rem;
  background: rgba(187, 148, 87, 0.3);
}

.docs-layout {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 1.5rem;
  border-right: 1px solid var(--line);
  background: rgba(255, 244, 214, 0.86);
  backdrop-filter: blur(16px);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.brand-mark {
  width: 3rem;
  height: 3rem;
  border-radius: 1rem;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--accent), var(--accent-3));
  color: white;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  letter-spacing: 0.05em;
  box-shadow: 0 20px 40px rgba(111, 29, 27, 0.24);
}

.brand h1,
.section-head h3,
.hero-copy h2,
.panel h4,
.feature-card h4,
.command-card h5,
.db-card h5 {
  font-family: "Space Grotesk", sans-serif;
}

.brand h1 {
  margin: 0.15rem 0 0;
  font-size: 1.2rem;
}

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

.search-box {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  font-size: 0.84rem;
  color: var(--muted);
}

.search-box input {
  border: 1px solid rgba(111, 29, 27, 0.16);
  background: rgba(255, 251, 240, 0.92);
  border-radius: 999px;
  padding: 0.9rem 1rem;
  font: inherit;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.search-box input:focus {
  border-color: rgba(111, 29, 27, 0.45);
  box-shadow: 0 0 0 4px rgba(111, 29, 27, 0.12);
  transform: translateY(-1px);
}

.lang-switch {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.lang-switch a {
  text-decoration: none;
  color: var(--muted);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.7);
  padding: 0.5rem 0.72rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.lang-switch a:hover,
.lang-switch a.active {
  color: var(--text);
  background: linear-gradient(135deg, rgba(111, 29, 27, 0.12), rgba(187, 148, 87, 0.18));
  border-color: rgba(111, 29, 27, 0.18);
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  overflow: auto;
}

.sidebar-nav a {
  text-decoration: none;
  color: var(--muted);
  padding: 0.72rem 0.92rem;
  border-radius: 0.95rem;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
  color: var(--text);
  background: linear-gradient(135deg, rgba(111, 29, 27, 0.12), rgba(187, 148, 87, 0.18));
  transform: translateX(3px);
}

.sidebar-nav a.is-hidden {
  display: none;
}

.sidebar-footer {
  margin-top: auto;
  display: grid;
  gap: 0.35rem;
  padding: 1rem;
  border-radius: 1.1rem;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.88rem;
}

.sidebar-footer strong {
  color: var(--text);
}

.content {
  padding: 2rem clamp(1.2rem, 2.4vw, 2.5rem) 4rem;
  display: grid;
  gap: 1.5rem;
}

.doc-section {
  display: grid;
  gap: 1.1rem;
  scroll-margin-top: 1.5rem;
}

.top-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.2rem;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(111, 29, 27, 0.16);
  background: linear-gradient(135deg, rgba(111, 29, 27, 0.12), rgba(255, 250, 236, 0.95));
  box-shadow: var(--shadow);
}

.top-cta strong {
  display: block;
  margin-top: 0.2rem;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(1rem, 2vw, 1.25rem);
}

.doc-section.is-hidden,
[data-search-item].is-hidden {
  display: none;
}

.hero {
  grid-template-columns: 1.15fr 0.85fr;
  align-items: stretch;
}

.hero-copy,
.hero-panel,
.panel,
.feature-card,
.command-card,
.db-card {
  background: var(--panel);
  border: 1px solid var(--line);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow);
}

.hero-copy,
.hero-panel {
  border-radius: var(--radius-xl);
  padding: clamp(1.4rem, 2vw, 2rem);
}

.hero-copy h2 {
  font-size: clamp(2rem, 4vw, 3.45rem);
  line-height: 1.02;
  margin: 0.2rem 0 1rem;
  max-width: 14ch;
}

.lead {
  max-width: 62ch;
  font-size: 1.02rem;
  line-height: 1.7;
  color: var(--muted);
}

.hero-badges,
.pill-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.hero-badges span,
.pill {
  display: inline-flex;
  padding: 0.56rem 0.82rem;
  border-radius: 999px;
  border: 1px solid rgba(111, 29, 27, 0.14);
  background: rgba(255, 249, 235, 0.82);
  font-size: 0.9rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1.4rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.9rem;
  padding: 0.85rem 1.1rem;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
}

.button-primary {
  color: white;
  background: linear-gradient(135deg, var(--accent), var(--accent-3));
  box-shadow: 0 16px 32px rgba(111, 29, 27, 0.26);
}

.button-invite {
  color: white;
  background: linear-gradient(135deg, #5865f2, #404eed);
  box-shadow: 0 18px 34px rgba(64, 78, 237, 0.3);
}

.button-secondary {
  color: var(--text);
  background: rgba(255, 250, 238, 0.86);
  border: 1px solid var(--line);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
}

.stat-card {
  padding: 1rem;
  border-radius: 1.2rem;
  background: linear-gradient(180deg, rgba(255, 251, 241, 0.96), rgba(255, 230, 167, 0.78));
  border: 1px solid rgba(111, 29, 27, 0.1);
}

.stat-card strong {
  display: block;
  font-size: 1.7rem;
  margin-bottom: 0.3rem;
}

.stat-card span,
.muted {
  color: var(--muted);
  line-height: 1.7;
}

.info-note {
  margin-top: 1rem;
  padding: 1rem 1.05rem;
  border-radius: 1.2rem;
  background: linear-gradient(135deg, rgba(187, 148, 87, 0.2), rgba(255, 250, 236, 0.88));
  border: 1px solid rgba(153, 88, 42, 0.16);
}

.section-head h3 {
  margin: 0.2rem 0 0;
  font-size: clamp(1.6rem, 2.6vw, 2.3rem);
}

.two-col,
.feature-grid,
.command-grid,
.db-grid {
  display: grid;
  gap: 1rem;
}

.two-col,
.feature-grid,
.command-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

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

.panel,
.feature-card,
.command-card,
.db-card {
  border-radius: var(--radius-lg);
  padding: 1.15rem 1.2rem;
}

.panel h4,
.feature-card h4,
.command-card h5,
.db-card h5 {
  margin: 0 0 0.55rem;
}

.panel p,
.feature-card p,
.command-card span,
.db-card p,
.bullet-list,
.number-list {
  margin: 0;
  color: var(--muted);
  line-height: 1.72;
}

.feature-card,
.command-card,
.db-card {
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.feature-card:hover,
.command-card:hover,
.db-card:hover,
.panel:hover {
  transform: translateY(-3px);
  border-color: rgba(111, 29, 27, 0.2);
}

.bullet-list,
.number-list {
  padding-left: 1.15rem;
  display: grid;
  gap: 0.5rem;
}

.table-wrap {
  overflow: auto;
  border-radius: 1.2rem;
  border: 1px solid var(--line);
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 680px;
  background: var(--panel-strong);
}

thead th {
  text-align: left;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  background: rgba(187, 148, 87, 0.18);
}

th,
td {
  padding: 0.95rem 1rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

tbody tr:last-child td {
  border-bottom: 0;
}

.code-block {
  border-radius: 1.25rem;
  background: linear-gradient(180deg, #432818 0%, #2f1a10 100%);
  color: #fff4d8;
  overflow: auto;
}

.code-block pre {
  margin: 0;
  padding: 1rem 1.1rem;
  font-family: "Consolas", "Courier New", monospace;
  font-size: 0.92rem;
  line-height: 1.65;
}

code {
  font-family: "Consolas", "Courier New", monospace;
  background: rgba(187, 148, 87, 0.18);
  padding: 0.15rem 0.34rem;
  border-radius: 0.45rem;
}

.mobile-toggle {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 20;
  width: 3.1rem;
  height: 3.1rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 248, 229, 0.92);
  backdrop-filter: blur(10px);
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 0.22rem;
}

.mobile-toggle span {
  width: 1.15rem;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1200px) {
  .hero,
  .two-col,
  .feature-grid,
  .command-grid,
  .db-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 940px) {
  .docs-layout {
    grid-template-columns: 1fr;
  }

  .mobile-toggle {
    display: inline-flex;
  }

  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: min(88vw, 320px);
    transform: translateX(-100%);
    transition: transform 0.28s ease;
    box-shadow: var(--shadow);
    z-index: 15;
  }

  body.nav-open .sidebar {
    transform: translateX(0);
  }

  .content {
    padding-top: 5rem;
  }
}

@media (max-width: 640px) {
  .content {
    padding-inline: 1rem;
  }

  .top-cta {
    align-items: flex-start;
    flex-direction: column;
  }

  .hero-copy,
  .hero-panel,
  .panel,
  .feature-card,
  .command-card,
  .db-card {
    padding: 1rem;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  table {
    min-width: 560px;
  }
}
