* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg: #ffffff;
  --panel: #ffffff;
  --text: #0b1220;
  --muted: #546174;
  --border: #e6eaf1;
  --shadow: 0 10px 30px rgba(10, 20, 40, 0.08);
  --accent: #0ea5e9;
  --accent-2: #0284c7;
  --radius: 14px;
}

body {
  font-family: Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

.container {
  width: min(1120px, calc(100% - 48px));
  margin: 0 auto;
}

header {
  height: 80px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 2000;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
}

.brand-wordmark {
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
  letter-spacing: 0.28em;
  font-size: 14px;
  text-transform: uppercase;
}

nav a {
  color: var(--muted);
  margin-left: 22px;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  transition: 0.2s;
}

nav a:hover {
  color: var(--text);
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-radius: 999px;
  background: var(--accent);
  color: #ffffff;
  margin-left: 22px;
}

.nav-cta:hover {
  background: var(--accent-2);
  color: #ffffff;
}

.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-around;
  width: 30px;
  height: 22px;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  height: 3px;
  width: 100%;
  background: var(--text);
  border-radius: 2px;
}

.docs-page {
  padding: 28px 0 64px;
}

.docs-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 24px;
  align-items: start;
}

.docs-sidebar {
  position: sticky;
  top: 100px;
  border: 1px solid var(--border);
  background: var(--panel);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
}

.docs-sidebar-title {
  font-weight: 800;
  color: var(--text);
  margin-bottom: 10px;
}

.docs-sidebar a {
  display: block;
  padding: 10px 10px;
  border-radius: 10px;
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
  transition: background 0.2s, color 0.2s;
}

.docs-sidebar a:hover {
  background: #f3f6fb;
  color: var(--text);
}

.docs-sidebar a.active {
  background: rgba(14, 165, 233, 0.12);
  color: var(--text);
}

.docs-content {
  border: 1px solid var(--border);
  background: var(--panel);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px 22px;
  min-height: 700px;
}

.doc-section {
  display: none;
  animation: fadeIn 0.22s ease;
}

.doc-section.active {
  display: block;
}

.docs-content h1 {
  font-size: 34px;
  line-height: 1.15;
  margin-bottom: 10px;
  letter-spacing: -0.02em;
}

.docs-content h2 {
  font-size: 18px;
  margin-top: 18px;
  margin-bottom: 10px;
}

.docs-content p {
  margin-bottom: 12px;
  color: var(--muted);
  line-height: 1.75;
  font-size: 15px;
}

.docs-content ul,
.docs-content ol {
  margin-left: 18px;
  margin-bottom: 14px;
  color: var(--muted);
}

.docs-content li {
  margin: 6px 0;
}

.highlight {
  color: var(--accent-2);
  font-weight: 800;
}

.diagram {
  margin: 18px 0;
  padding: 16px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: #fbfcff;
  color: var(--accent-2);
}

.nav-buttons {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.nav-btn {
  padding: 10px 14px;
  border-radius: 999px;
  background: var(--accent);
  color: #ffffff;
  border: none;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  transition: background 0.2s, opacity 0.2s;
}

.nav-btn:hover {
  background: var(--accent-2);
}

.nav-btn.disabled {
  opacity: 0.35;
  pointer-events: none;
  background: #b9c3d3;
  color: #ffffff;
}

.footer {
  border-top: 1px solid var(--border);
  background: #ffffff;
}

.footer-inner {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 13px;
}

.footer a {
  color: var(--muted);
  text-decoration: none;
}

.footer a:hover {
  color: var(--text);
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 900px) {
  .docs-layout {
    grid-template-columns: 1fr;
  }

  .docs-sidebar {
    position: relative;
    top: auto;
  }
}

@media (max-width: 768px) {
  .menu-toggle {
    display: flex;
  }

  header nav {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 80px;
    right: 0;
    width: 220px;
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: var(--shadow);
    padding: 10px;
    margin-right: 12px;
  }

  header nav.active {
    display: flex;
  }

  header nav a {
    margin: 0;
    padding: 10px 10px;
    border-radius: 10px;
  }

  .nav-cta {
    margin-left: 0;
    margin-top: 6px;
  }
}
