.docs-page {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 24px 64px;
  color: var(--color-text);
  background: transparent;
}

.docs-topbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 22px 0 24px;
  border-bottom: 1px solid rgba(35, 48, 115, 0.08);
}

.docs-topbar-left,
.docs-topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.docs-topbar-right {
  justify-content: flex-end;
}

.docs-top-link {
  color: var(--color-text-soft);
  font-size: var(--text-sm);
  font-weight: 500;
  text-decoration: none;
}

.docs-top-link--active,
.docs-top-link:hover {
  color: var(--color-navy);
}

.docs-top-sep {
  color: #b0b0b0;
}

.docs-tab {
  display: inline-flex;
  align-items: center;
  padding: 10px 16px;
  border-radius: var(--radius-full);
  color: var(--color-text-soft);
  text-decoration: none;
  font-size: var(--text-sm);
  font-weight: 500;
  background: rgba(35, 48, 115, 0.04);
  border: 1px solid transparent;
  transition:
    background var(--dur-fast) var(--ease-smooth),
    color var(--dur-fast) var(--ease-smooth),
    border-color var(--dur-fast) var(--ease-smooth),
    transform var(--dur-fast) var(--ease-smooth);
}

.docs-tab:hover {
  background: rgba(47, 88, 163, 0.08);
  color: var(--color-navy);
  border-color: rgba(47, 88, 163, 0.12);
  transform: translateY(-1px);
}

.docs-tab.active {
  background: var(--color-navy);
  color: var(--color-white);
  border-color: var(--color-navy);
}

.docs-hero {
  padding: 42px 0 16px;
}

.docs-kicker {
  color: #5f6368;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 10px;
}

.docs-title {
  font-size: clamp(32px, 4vw, 56px);
  line-height: 1.08;
  font-weight: 800;
  color: #111111;
  margin-bottom: 16px;
}

.docs-subtitle {
  max-width: 760px;
  font-size: 18px;
  line-height: 1.75;
  color: #5f6368;
}

.docs-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin-top: 32px;
}

.docs-card {
  position: relative;
  display: block;
  padding: 26px;
  border: 1px solid rgba(35, 48, 115, 0.08);
  border-radius: 24px;
  background: linear-gradient(180deg, #ffffff 0%, #f9fbff 100%);
  text-decoration: none;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition:
    border-color var(--dur-base) var(--ease-smooth),
    transform var(--dur-base) var(--ease-smooth),
    box-shadow var(--dur-base) var(--ease-smooth);
}

.docs-card::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 88px;
  height: 88px;
  background: radial-gradient(circle, rgba(143,195,227,0.28) 0%, transparent 72%);
  pointer-events: none;
}

.docs-card::after {
  content: "";
  position: absolute;
  top: 16px;
  right: 16px;
  width: 22px;
  height: 22px;
  border-top: 2px solid rgba(47, 88, 163, 0.18);
  border-right: 2px solid rgba(47, 88, 163, 0.18);
  border-top-right-radius: 8px;
}

.docs-card:hover {
  transform: translateY(-4px);
  border-color: rgba(47, 88, 163, 0.18);
  box-shadow: var(--shadow-md);
}

.docs-card-icon {
  font-size: 30px;
  margin-bottom: 16px;
}

.docs-card-title {
  font-family: var(--font-display);
  font-size: 1.35rem;
  line-height: 1.25;
  font-weight: 700;
  color: var(--color-navy);
  margin-bottom: 12px;
}

.docs-card-text {
  font-size: var(--text-base);
  line-height: 1.75;
  color: var(--color-text-soft);
  max-width: 34ch;
}

.docs-layout {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 0;
  margin-top: 24px;
  min-height: 700px;
  border: 1px solid rgba(35, 48, 115, 0.08);
  border-radius: 28px;
  background: var(--color-white);
  box-shadow: var(--shadow-sm);
  overflow: visible;
  align-items: start;
}

.docs-sidebar {
  position: sticky;
  top: calc(var(--nav-height) + 20px);
  align-self: start;
  height: fit-content;
  border-right: 1px solid rgba(35, 48, 115, 0.08);
  background: linear-gradient(180deg, #ffffff 0%, #f9fbff 100%);
  border-top-left-radius: 24px;
  border-bottom-left-radius: 24px;
}

.docs-sidebar-inner {
  padding: 20px 16px 24px;
  max-height: calc(100vh - var(--nav-height) - 40px);
  overflow-y: auto;
}

.docs-sidebar-mobile-close {
  display: none;
}

.docs-nav-group + .docs-nav-group {
  margin-top: 28px;
}

.docs-nav-title {
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-muted);
  margin-bottom: 10px;
}

.docs-nav-link,
.docs-toc a {
  display: block;
  padding: 10px 12px;
  border-radius: 12px;
  color: var(--color-text-soft);
  font-size: var(--text-sm);
  font-weight: 500;
  text-decoration: none;
  transition:
    background var(--dur-fast) var(--ease-smooth),
    color var(--dur-fast) var(--ease-smooth),
    transform var(--dur-fast) var(--ease-smooth);
}

.docs-nav-link:hover,
.docs-toc a:hover {
  background: rgba(47, 88, 163, 0.06);
  color: var(--color-navy);
  transform: translateX(2px);
}

.docs-nav-link.active,
.docs-toc a.active {
  background: var(--color-navy);
  color: var(--color-white);
}

.docs-toc {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.docs-content-wrap {
  min-width: 0;
  background: #ffffff;
}

.docs-content-topnav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  padding: 18px 24px;
  border-bottom: 1px solid #ececec;
}

.docs-sidebar-toggle {
  display: none;
  padding: 10px 14px;
  border: 1px solid #dddddd;
  border-radius: 12px;
  background: #ffffff;
  color: #111111;
  font-size: 14px;
  font-weight: 600;
}

.docs-content {
  padding: 28px 32px 40px;
  max-width: 920px;
}

.docs-meta {
  margin-bottom: 18px;
}

.docs-meta-label {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  background: rgba(47, 88, 163, 0.08);
  color: var(--color-blue);
  font-size: var(--text-xs);
  font-weight: 700;
}

.docs-rendered {
  color: var(--color-text);
}

.docs-rendered h2 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 2.2vw, 2.35rem);
  font-weight: 700;
  line-height: 1.2;
  color: var(--color-navy);
  margin: 0 0 22px;
  scroll-margin-top: 110px;
}

.docs-rendered p {
  font-size: var(--text-base);
  line-height: 1.9;
  color: var(--color-text-soft);
  margin: 0 0 16px;
}

.docs-rendered b {
  color: var(--color-navy);
  font-weight: 700;
}

.docs-rendered i {
  color: var(--color-blue);
}

.docs-rendered strong.docs-mark {
  color: var(--color-blue);
  font-weight: 700;
}

.docs-rendered a.docs-link {
  color: var(--color-blue);
  font-weight: 700;
  text-decoration: none;
}

.docs-rendered a.docs-link:hover {
  color: var(--color-navy);
  text-decoration: underline;
}

.docs-rendered ul {
  margin: 0 0 18px 20px;
  padding: 0;
  list-style: circle;
}

.docs-rendered li {
  font-size: 16px;
  line-height: 1.8;
  color: #333333;
  margin-bottom: 8px;
}

.docs-overlay.hidden {
  display: none;
}

@media (max-width: 1100px) {
  .docs-cards {
    grid-template-columns: 1fr;
  }

  .docs-layout {
    grid-template-columns: 240px minmax(0, 1fr);
  }

  .docs-content {
    padding: 24px;
  }
}

@media (max-width: 900px) {
  .docs-layout {
    grid-template-columns: 1fr;
    border-radius: 20px;
    overflow: hidden;
  }

  .docs-sidebar {
    position: fixed;
    top: 0;
    right: 0;
    left: auto;
    bottom: 0;
    width: 340px;
    max-width: 88vw;
    z-index: 30;
    transform: translateX(100%);
    transition: transform 0.28s ease;
    border-right: none;
    border-left: 1px solid #ececec;
    border-radius: 0;
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.08);
    background: #ffffff;
  }

  .docs-sidebar.open {
    transform: translateX(0);
  }

  .docs-sidebar-inner {
    position: static;
    height: 100%;
    max-height: none;
    overflow-y: auto;
    padding: 18px 16px 24px;
  }

  .docs-sidebar-mobile-close {
    display: inline-flex;
    margin-bottom: 18px;
    margin-left: auto;
    padding: 8px 12px;
    border: 1px solid #dddddd;
    border-radius: 10px;
    background: #ffffff;
    color: #111111;
    font-size: 14px;
    font-weight: 600;
  }

  .docs-sidebar-toggle {
    display: inline-flex;
    margin-left: auto;
  }

  .docs-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.28);
    z-index: 20;
  }

  .docs-content-topnav {
    padding: 14px 16px;
    justify-content: flex-end;
  }

  .docs-content {
    padding: 20px 16px 30px;
  }
}

@media (max-width: 768px) {
  .docs-page {
    padding: 0 16px 56px;
  }

  .docs-topbar {
    grid-template-columns: 1fr;
    align-items: flex-start;
  }

  .docs-topbar-right {
    justify-content: flex-start;
  }

  .docs-title {
    font-size: 36px;
  }

  .docs-subtitle {
    font-size: 16px;
  }

  .docs-rendered h2 {
    font-size: 28px;
  }

  .docs-rendered p,
  .docs-rendered li {
    font-size: 15px;
  }
}

@media (max-width: 480px) {
  .docs-page {
    padding: 0 12px 48px;
  }

  .docs-card {
    padding: 18px;
    border-radius: 16px;
  }

  .docs-card-title {
    font-size: 20px;
  }

  .docs-content {
    padding: 18px 14px 26px;
  }

  .docs-rendered h2 {
    font-size: 24px;
  }
}
