.docs-page {
  position: relative;
}

.docs-hero {
  padding: 86px 0 48px;
  background: radial-gradient(circle at 22% 10%, rgba(62, 207, 160, 0.16), transparent 34rem);
}

.docs-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(28px, 5vw, 74px);
  align-items: end;
}

.docs-hero h1 {
  max-width: 860px;
  margin-top: 18px;
  font-size: clamp(3rem, 6vw, 5.5rem);
  line-height: 0.96;
  letter-spacing: -0.075em;
}

.docs-lede {
  max-width: 780px;
  margin-top: 24px;
  color: var(--muted-strong);
  font-size: clamp(1.04rem, 2vw, 1.22rem);
}

.docs-hero-card {
  display: none;
}

.docs-sidebar,
.docs-panel,
.docs-card,
.docs-tree-card {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.035));
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.docs-shell-section {
  padding-top: 34px;
}

.docs-layout {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.docs-sidebar {
  position: sticky;
  top: 96px;
  border-radius: 28px;
  padding: 12px;
}

.docs-menu-toggle {
  display: none;
}

.docs-menu {
  display: grid;
  gap: 6px;
}

.docs-menu-item,
.docs-menu-toggle {
  width: 100%;
  border: 0;
  color: var(--muted-strong);
  background: transparent;
  border-radius: 18px;
  padding: 13px 14px;
  font: inherit;
  font-weight: 800;
  text-align: left;
  cursor: pointer;
  transition: 180ms ease;
}

.docs-menu-item:hover,
.docs-menu-item.is-active {
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
}

.docs-menu-item.is-active {
  box-shadow: inset 0 0 0 1px rgba(62, 207, 160, 0.26);
}

.docs-content {
  min-width: 0;
}

.docs-panel {
  border-radius: 34px;
  padding: clamp(28px, 5vw, 52px);
}

.docs-panel h2 {
  margin-top: 16px;
  font-size: clamp(2.2rem, 4.4vw, 4rem);
  line-height: 1.02;
  letter-spacing: -0.06em;
}

.docs-panel p:not(.eyebrow) {
  margin-top: 18px;
  color: var(--muted-strong);
  font-size: 1.04rem;
}

.docs-subhead {
  margin-top: 34px;
  font-size: clamp(1.45rem, 2vw, 2rem);
  letter-spacing: -0.045em;
}

.docs-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  align-items: stretch;
  margin-top: 30px;
}

.docs-card {
  box-sizing: border-box;
  min-height: 100%;
  border-radius: 26px;
  padding: 24px;
}

.docs-card-link,
.docs-card-button {
  display: flex;
  height: 100%;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  transition: 180ms ease;
}

.docs-card-button {
  width: 100%;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.docs-card-link:hover,
.docs-card-button:hover {
  transform: translateY(-2px);
  border-color: rgba(62, 207, 160, 0.42);
}

.docs-card-button:focus-visible {
  outline: 3px solid rgba(62, 207, 160, 0.5);
  outline-offset: 3px;
}

.docs-card .card-label {
  align-self: flex-start;
}

.docs-card h3 {
  margin-top: 16px;
  font-size: 1.22rem;
  letter-spacing: -0.04em;
}

.docs-card p {
  margin-top: 10px;
  color: var(--muted);
}

.docs-tree-card {
  margin-top: 30px;
  border-radius: 28px;
  padding: clamp(20px, 4vw, 34px);
  overflow-x: auto;
}

.docs-tree,
.docs-tree ul {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.docs-tree ul {
  margin-top: 10px;
  padding-left: 22px;
  border-left: 1px solid rgba(255, 255, 255, 0.16);
}

.docs-tree li {
  position: relative;
  min-width: 0;
  color: var(--muted-strong);
  line-height: 1.55;
}

.docs-tree li::before {
  content: "";
  position: absolute;
  left: -22px;
  top: 0.78em;
  width: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
}

.docs-tree > li::before {
  display: none;
}

.docs-tree span {
  color: var(--text);
  font-weight: 800;
}

.docs-tree-link,
.docs-flow-link {
  cursor: pointer;
  border-radius: 14px;
  padding: 7px 9px;
  transition: 180ms ease;
}

.docs-tree-link:hover,
.docs-tree-link:focus-visible,
.docs-flow-link:hover,
.docs-flow-link:focus-visible {
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 0 0 1px rgba(62, 207, 160, 0.28);
  outline: none;
}

.docs-tree-link::after,
.docs-flow-link::after {
  content: " →";
  color: var(--accent);
  font-weight: 800;
}

.docs-list {
  display: grid;
  gap: 14px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
}

.docs-list li {
  position: relative;
  padding-left: 24px;
  color: var(--muted-strong);
}

.docs-list li::before {
  content: "";
  position: absolute;
  top: 0.74em;
  left: 0;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--accent);
}

.docs-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.64);
}

.docs-modal {
  width: min(760px, 100%);
  max-height: min(760px, 92vh);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 30px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.docs-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 26px;
  border-bottom: 1px solid var(--line);
}

.docs-modal-header h2 {
  margin-top: 10px;
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1;
  letter-spacing: -0.06em;
}

.docs-modal-close {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 14px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.docs-modal-close:hover,
.docs-modal-close:focus-visible {
  border-color: rgba(62, 207, 160, 0.42);
  outline: none;
}

.docs-modal-body {
  max-height: 56vh;
  overflow-y: auto;
  padding: 26px;
  color: var(--muted-strong);
}

.docs-modal-body p {
  margin: 0;
  font-size: 1.04rem;
  line-height: 1.75;
}

.docs-modal-body h3 {
  margin-top: 24px;
  font-size: 1.22rem;
  letter-spacing: -0.035em;
}

.docs-modal-body ol {
  display: grid;
  gap: 12px;
  margin: 16px 0 0;
  padding-left: 24px;
}

.docs-modal-body li {
  line-height: 1.6;
}

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

  .docs-sidebar {
    position: static;
  }

  .docs-menu-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .docs-menu-icon {
    width: 18px;
    height: 12px;
    border-top: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    position: relative;
  }

  .docs-menu-icon::before {
    content: "";
    position: absolute;
    left: 0;
    top: 3px;
    width: 100%;
    border-top: 2px solid currentColor;
  }

  .docs-menu {
    display: none;
    margin-top: 8px;
  }

  .docs-sidebar.is-open .docs-menu {
    display: grid;
  }
}

@media (max-width: 680px) {
  .docs-hero {
    padding: 56px 0 26px;
  }

  .docs-hero h1 {
    font-size: clamp(2.45rem, 14vw, 4rem);
  }

  .docs-panel,
  .docs-hero-card {
    padding: 26px;
  }

  .docs-tree-card {
    padding: 20px;
  }

  .docs-tree ul {
    padding-left: 16px;
  }

  .docs-tree li::before {
    left: -16px;
    width: 10px;
  }

  .docs-modal-backdrop {
    padding: 12px;
  }

  .docs-modal-header,
  .docs-modal-body {
    padding: 20px;
  }
}
