.docs-page {
  --topbar-offset: 72px;
}

.docs-page .topbar,
.docs-page .site-footer,
.docs-shell {
  max-width: 1280px;
}

.docs-page .topbar {
  padding: 10px 14px;
  border-radius: 0 0 16px 16px;
}

.docs-page .brand-lockup {
  gap: 12px;
}

.docs-page .brand-mark {
  width: 42px;
  height: 42px;
  flex-basis: 42px;
}

.docs-page .brand-lockup h1 {
  font-size: 1.32rem;
}

.docs-page .ghost-link {
  padding: 9px 12px;
}

.docs-shell {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 24px;
  min-width: 0;
  margin: 0 auto;
  align-items: start;
}

.docs-sidebar {
  position: sticky;
  top: calc(var(--topbar-offset) + 20px);
  max-height: calc(100vh - var(--topbar-offset) - 38px);
  padding: 20px;
  overflow-y: auto;
}

.docs-nav {
  display: grid;
  gap: 4px;
  margin-top: 12px;
}

.docs-nav a {
  position: relative;
  padding: 10px 12px 10px 15px;
  border: 1px solid transparent;
  border-radius: 10px;
  color: var(--muted);
  font-size: 0.9rem;
  transition: color 0.16s ease, background 0.16s ease;
}

.docs-nav a:hover,
.docs-nav a:focus-visible,
.docs-nav a.is-active {
  color: var(--text);
  background: rgba(157, 92, 255, 0.1);
}

.docs-nav a.is-active {
  border-color: rgba(157, 92, 255, 0.3);
  box-shadow: inset 3px 0 0 var(--purple);
}

.docs-content {
  min-width: 0;
  display: grid;
  gap: 24px;
}

.docs-hero,
.docs-section {
  min-width: 0;
  padding: clamp(24px, 3vw, 36px);
  scroll-margin-top: calc(var(--topbar-offset) + 18px);
}

.docs-hero {
  padding-block: 34px;
  background:
    radial-gradient(circle at 90% 10%, rgba(157, 92, 255, 0.2), transparent 35%),
    var(--panel);
}

.docs-hero h2,
.docs-section h2,
.docs-section h3 {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
}

.docs-hero h2 {
  max-width: 780px;
  margin-top: 10px;
  font-size: clamp(2rem, 5vw, 3.5rem);
  line-height: 1.04;
}

.docs-hero > p:not(.section-pill):not(.docs-updated),
.docs-section > p,
.docs-section li p,
.docs-card p,
.file-list p,
.callout p,
.troubleshooting-list p {
  color: var(--muted);
  line-height: 1.65;
}

.docs-hero > p:not(.section-pill):not(.docs-updated) {
  max-width: 790px;
  margin: 16px 0 0;
}

.docs-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.docs-updated {
  margin: 18px 0 0;
  color: var(--soft);
  font-size: 0.84rem;
}

.docs-section h2 {
  margin-top: 8px;
  font-size: clamp(1.55rem, 3vw, 2.2rem);
}

.docs-section h3 {
  margin-top: 22px;
  font-size: 1.05rem;
}

.docs-section > p {
  margin: 12px 0 0;
  max-width: 92ch;
}

.docs-section a:not(.button) {
  color: var(--text);
  border-bottom: 1px solid rgba(157, 92, 255, 0.5);
}

.docs-section code {
  padding: 0.14em 0.38em;
  border: 1px solid rgba(157, 92, 255, 0.2);
  border-radius: 6px;
  color: #decaff;
  background: rgba(157, 92, 255, 0.08);
  font-family: Consolas, "SFMono-Regular", monospace;
  font-size: 0.92em;
  overflow-wrap: anywhere;
}

.step-list,
.compact-steps {
  display: grid;
  gap: 12px;
  margin: 18px 0 0;
  padding-left: 24px;
}

.step-list li,
.compact-steps li {
  padding-left: 6px;
  color: var(--muted);
  line-height: 1.58;
}

.step-list li::marker,
.compact-steps li::marker {
  color: var(--purple);
  font-weight: 700;
}

.step-list strong,
.compact-steps strong {
  color: var(--text);
}

.step-list li p {
  margin: 4px 0 0;
}

.callout {
  margin-top: 18px;
  padding: 16px 18px;
  border: 1px solid var(--border-soft);
  border-left-width: 4px;
  border-radius: 14px;
  background: var(--panel-soft);
}

.callout strong {
  display: block;
  font-family: "Space Grotesk", sans-serif;
}

.callout p {
  margin: 6px 0 0;
}

.callout-note {
  border-left-color: var(--purple);
}

.callout-danger {
  border-color: rgba(255, 155, 195, 0.38);
  border-left-color: var(--danger);
  background: rgba(255, 155, 195, 0.06);
}

.callout-danger strong {
  color: #ffc5dc;
}

.docs-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.docs-card,
.file-list article {
  padding: 16px;
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  background: var(--panel-soft);
}

.docs-card strong {
  display: block;
  margin-top: 5px;
  font-family: "Space Grotesk", sans-serif;
}

.docs-card p,
.file-list p {
  margin: 7px 0 0;
}

.file-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.file-list article > code {
  display: inline-block;
}

.command-table-wrap,
.compatibility-table-wrap {
  margin-top: 18px;
  overflow-x: auto;
  border: 1px solid var(--border-soft);
  border-radius: 14px;
}

.docs-table {
  width: 100%;
  min-width: 700px;
  border-collapse: collapse;
  background: rgba(255, 255, 255, 0.012);
}

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

.docs-table th {
  color: var(--text);
  background: rgba(157, 92, 255, 0.06);
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.88rem;
}

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

.docs-table td strong {
  color: var(--text);
}

.compatibility-table {
  min-width: 850px;
}

.server-support-table {
  min-width: 920px;
}

.server-support-table th:first-child {
  width: 15%;
}

.server-support-table th:last-child {
  width: 24%;
}

.status-chip {
  display: inline-flex;
  padding: 5px 9px;
  border: 1px solid;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
}

.status-required {
  border-color: rgba(255, 155, 195, 0.42);
  color: #ffc5dc;
  background: rgba(255, 155, 195, 0.07);
}

.status-supported {
  border-color: rgba(130, 223, 180, 0.42);
  color: var(--success);
  background: rgba(130, 223, 180, 0.07);
}

.troubleshooting-list {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.troubleshooting-list details {
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  background: var(--panel-soft);
}

.troubleshooting-list summary {
  padding: 14px 16px;
  color: var(--text);
  cursor: pointer;
  font-family: "Space Grotesk", sans-serif;
}

.troubleshooting-list p {
  margin: 0;
  padding: 0 16px 16px;
}

@media (max-width: 1040px) {
  .docs-shell {
    grid-template-columns: minmax(0, 1fr);
  }

  .docs-sidebar {
    position: static;
  }

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

@media (max-width: 780px) {
  .docs-page {
    --topbar-offset: 64px;
  }

  .docs-sidebar {
    display: none;
  }

  .docs-card-grid,
  .file-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .docs-hero,
  .docs-section {
    padding: 19px;
  }

  .docs-page .topbar-actions .ghost-link:first-child {
    display: none;
  }
}

@media (max-width: 520px) {
  .docs-page .topbar-actions .ghost-link:last-child {
    display: none;
  }

  .docs-page .topbar-actions {
    flex-wrap: nowrap;
  }
}
