.docs-page {
  background: var(--bg);
}

.docs-hero {
  position: relative;
  overflow: hidden;
  padding: 152px 0 64px;
  border-bottom: 1px solid var(--line);
}

.docs-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(760px 460px at 82% 0%, rgba(1, 150, 240, 0.18), transparent 68%),
    radial-gradient(620px 380px at 5% 20%, rgba(28, 42, 96, 0.5), transparent 70%);
}

.docs-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.3;
  background-image:
    linear-gradient(rgba(92, 200, 255, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(92, 200, 255, 0.055) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 70% 90% at 75% 20%, #000, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 70% 90% at 75% 20%, #000, transparent 70%);
}

.docs-hero .container {
  position: relative;
  z-index: 1;
}

.docs-hero h1 {
  max-width: 850px;
  font-size: clamp(2.5rem, 4.8vw, 4.2rem);
}

.docs-hero > .container > p {
  max-width: 690px;
  margin-top: 20px;
  color: var(--muted);
  font-size: 1.06rem;
  line-height: 1.65;
}

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

.docs-hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 28px;
}

.docs-hero-meta span {
  padding: 6px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.025);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.68rem;
}

.docs-layout {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  align-items: start;
  gap: 64px;
  padding: 58px 0 104px;
}

.docs-sidebar {
  position: sticky;
  top: 102px;
  min-width: 0;
}

.docs-sidebar-title {
  display: block;
  margin-bottom: 13px;
  color: var(--muted-2);
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.docs-toc {
  display: grid;
  gap: 1px;
  padding-left: 0;
  border-left: 1px solid var(--line);
}

.docs-toc a {
  display: block;
  padding: 8px 0 8px 15px;
  border-left: 2px solid transparent;
  margin-left: -1px;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.4;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.docs-toc a:hover {
  color: var(--text);
}

.docs-toc a.is-active {
  border-left-color: var(--brand);
  background: linear-gradient(90deg, rgba(1, 150, 240, 0.1), transparent);
  color: var(--brand-soft);
}

.docs-nav a[aria-current="page"] {
  color: var(--text);
}

.docs-nav a[aria-current="page"]::after {
  right: 0;
}

.docs-side-links {
  display: grid;
  gap: 3px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.docs-side-links > span {
  margin-bottom: 6px;
  color: var(--muted-2);
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.docs-side-links a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 0;
  color: var(--muted);
  font-size: 0.78rem;
  transition: color 0.2s ease;
}

.docs-side-links a:hover {
  color: var(--brand-soft);
}

.docs-side-links .icon {
  width: 13px;
  height: 13px;
}

.docs-side-note {
  margin-top: 26px;
  padding: 17px;
  border: 1px solid rgba(1, 150, 240, 0.2);
  border-radius: 14px;
  background: rgba(1, 150, 240, 0.055);
}

.docs-side-note-icon {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  margin-bottom: 11px;
  border: 1px solid rgba(92, 200, 255, 0.25);
  border-radius: 8px;
  color: var(--brand-soft);
}

.docs-side-note strong {
  display: block;
  font-size: 0.84rem;
}

.docs-side-note p {
  margin: 5px 0 13px;
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1.45;
}

.docs-side-note .btn {
  width: 100%;
  min-height: 36px;
  padding: 0 12px;
  font-size: 0.75rem;
}

.docs-content {
  max-width: 840px;
  min-width: 0;
}

.doc-section {
  padding-bottom: 44px;
  margin-bottom: 44px;
  border-bottom: 1px solid var(--line);
  scroll-margin-top: 98px;
}

.doc-section:last-child {
  margin-bottom: 0;
  border-bottom: 0;
}

.doc-eyebrow {
  display: block;
  margin-bottom: 10px;
  color: var(--brand-soft);
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.doc-section h2 {
  margin-bottom: 15px;
  font-size: clamp(1.65rem, 2.8vw, 2.35rem);
}

.doc-section h3 {
  margin: 30px 0 8px;
  font-size: 1.02rem;
}

.doc-section p,
.doc-section li {
  color: var(--muted);
  font-size: 0.91rem;
  line-height: 1.7;
}

.doc-section p + p {
  margin-top: 10px;
}

.doc-lead {
  max-width: 720px;
  font-size: 1rem !important;
  color: #b8c6e1 !important;
}

.doc-list {
  display: grid;
  gap: 9px;
  margin: 15px 0;
  padding: 0;
  list-style: none;
}

.doc-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.doc-list .icon {
  width: 17px;
  height: 17px;
  margin-top: 3px;
  flex: none;
  color: var(--success);
}

.doc-list strong {
  color: var(--text);
  font-weight: 600;
}

.doc-list-numbered {
  counter-reset: doc-list;
}

.doc-list-numbered li {
  counter-increment: doc-list;
}

.doc-list-numbered li::before {
  content: counter(doc-list);
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  margin-top: 1px;
  flex: none;
  border: 1px solid rgba(1, 150, 240, 0.3);
  border-radius: 6px;
  background: rgba(1, 150, 240, 0.1);
  color: var(--brand-soft);
  font-family: var(--mono);
  font-size: 0.63rem;
}

.doc-callout {
  margin: 22px 0;
  padding: 16px 19px;
  border: 1px solid rgba(1, 150, 240, 0.19);
  border-left: 3px solid var(--brand);
  border-radius: 0 12px 12px 0;
  background: rgba(1, 150, 240, 0.055);
  color: #b9c8e4;
  font-size: 0.85rem;
  line-height: 1.6;
}

.doc-callout strong {
  color: var(--text);
}

.doc-steps {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin: 22px 0;
}

.doc-step {
  padding: 19px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.014));
}

.doc-step-num {
  color: var(--brand-soft);
  font-family: var(--mono);
  font-size: 0.62rem;
}

.doc-step h3 {
  margin: 7px 0 5px;
  font-size: 0.91rem;
}

.doc-step p {
  font-size: 0.79rem;
  line-height: 1.55;
}

.doc-step a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 9px;
  color: var(--brand-soft);
  font-size: 0.74rem;
  font-weight: 600;
}

.doc-step .icon {
  width: 13px;
  height: 13px;
}

.doc-kbd {
  display: inline-block;
  padding: 1px 6px;
  border: 1px solid var(--line-strong);
  border-bottom-width: 2px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.055);
  color: #dce7f8;
  font-family: var(--mono);
  font-size: 0.7rem;
  line-height: 1.5;
  white-space: nowrap;
}

.doc-section code {
  padding: 1px 5px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.045);
  color: #cfe6ff;
  font-family: var(--mono);
  font-size: 0.76em;
  white-space: nowrap;
}

.doc-code {
  margin: 18px 0;
  padding: 17px 19px;
  border: 1px solid var(--line-strong);
  border-radius: 13px;
  background: #090f1d;
  overflow-x: auto;
  color: #c9d8ef;
  font-family: var(--mono);
  font-size: 0.76rem;
  line-height: 1.7;
}

.doc-code code {
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font-size: inherit;
  white-space: pre;
}

.doc-table-wrap {
  margin: 18px 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(92, 200, 255, 0.3) transparent;
}

.doc-table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
}

.doc-table th,
.doc-table td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  font-size: 0.79rem;
  line-height: 1.55;
}

.doc-table th {
  color: var(--text);
  font-weight: 600;
  background: rgba(255, 255, 255, 0.03);
}

.doc-table td {
  color: var(--muted);
}

.doc-table tr:last-child th,
.doc-table tr:last-child td {
  border-bottom: 0;
}

.doc-markdown {
  max-width: 900px;
}

.doc-markdown h2 {
  margin: 42px 0 12px;
  scroll-margin-top: 100px;
  font-size: clamp(1.55rem, 2.6vw, 2.15rem);
}

.doc-markdown h3 {
  margin: 28px 0 8px;
  scroll-margin-top: 100px;
  font-size: 1.02rem;
}

.doc-markdown p,
.doc-markdown li {
  color: var(--muted);
  font-size: 0.91rem;
  line-height: 1.7;
}

.doc-markdown p + p {
  margin-top: 10px;
}

.doc-markdown ul,
.doc-markdown ol {
  display: grid;
  gap: 7px;
  margin: 13px 0;
  padding-left: 22px;
}

.doc-markdown table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
}

.doc-markdown .table-wrap,
.doc-markdown table {
  margin: 18px 0;
}

.doc-markdown table th,
.doc-markdown table td {
  padding: 10px 12px;
  border: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  font-size: 0.78rem;
  line-height: 1.55;
}

.doc-markdown table th {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
  font-weight: 600;
}

.doc-markdown table td {
  color: var(--muted);
}

.doc-markdown code {
  padding: 1px 5px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.045);
  color: #cfe6ff;
  font-family: var(--mono);
  font-size: 0.78em;
}

.doc-markdown strong {
  color: var(--text);
}

.doc-scroll-table {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
  scrollbar-width: thin;
  scrollbar-color: rgba(92, 200, 255, 0.3) transparent;
}

.doc-platforms {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin: 22px 0;
}

.doc-platform {
  padding: 19px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.014));
}

.doc-platform h3 {
  margin: 0 0 4px;
  font-size: 0.95rem;
}

.doc-platform p {
  margin-bottom: 12px;
  font-size: 0.78rem;
  line-height: 1.5;
}

.doc-platform > a,
.doc-platform-links a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--brand-soft);
  font-size: 0.75rem;
  font-weight: 600;
}

.doc-platform .icon {
  width: 13px;
  height: 13px;
}

.doc-platform-links {
  display: flex;
  flex-wrap: wrap;
  gap: 9px 14px;
}

.doc-inline-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--brand-soft);
  font-weight: 600;
}

.doc-release-status {
  display: inline-block;
  margin-left: 4px;
  padding: 1px 6px;
  border: 1px solid rgba(85, 224, 162, 0.25);
  border-radius: 999px;
  color: #b9f5d9;
  font-family: var(--mono);
  font-size: 0.58rem;
  font-weight: 400;
  vertical-align: 1px;
}

.doc-inline-link .icon {
  width: 15px;
  height: 15px;
}

.doc-faq {
  border-bottom: 1px solid var(--line);
}

.doc-faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 15px 2px;
  color: #dce6f7;
  font-size: 0.88rem;
  font-weight: 600;
  list-style: none;
  cursor: pointer;
}

.doc-faq summary::-webkit-details-marker {
  display: none;
}

.doc-faq summary .icon {
  width: 15px;
  height: 15px;
  color: var(--brand-soft);
  transform: rotate(90deg);
  transition: transform 0.2s ease;
}

.doc-faq[open] summary .icon {
  transform: rotate(-90deg);
}

.doc-faq p {
  padding: 0 28px 15px 2px;
  font-size: 0.83rem;
  line-height: 1.65;
}

.docs-page .site-footer {
  margin-top: 0;
}

@media (max-width: 1100px) {
  .docs-layout {
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 40px;
  }
}

@media (max-width: 980px) {
  .docs-hero {
    padding-top: 132px;
  }

  .docs-layout {
    grid-template-columns: 1fr;
    gap: 34px;
    padding-top: 40px;
  }

  .docs-sidebar {
    position: static;
  }

  .docs-sidebar-inner {
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.025);
  }

  .docs-toc {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2px 22px;
    border-left: 0;
  }

  .docs-toc a {
    border-left: 0;
    border-bottom: 1px solid var(--line);
    padding: 8px 0;
  }

  .docs-toc a.is-active {
    border-bottom-color: var(--brand);
    background: transparent;
  }

  .docs-side-note {
    display: none;
  }

  .docs-side-links {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px 18px;
    border-top: 0;
    padding-top: 12px;
  }

  .docs-side-links > span {
    grid-column: 1 / -1;
  }

  .docs-side-links a {
    border-bottom: 1px solid var(--line);
  }

  .docs-content {
    max-width: 100%;
  }
}

@media (max-width: 760px) {
  .docs-hero {
    padding-top: 116px;
    padding-bottom: 48px;
  }

  .docs-hero h1 {
    font-size: 2.4rem;
  }

  .docs-hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .docs-hero-actions .btn {
    width: 100%;
  }

  .docs-steps,
  .doc-platforms {
    grid-template-columns: 1fr;
  }

  .docs-toc {
    grid-template-columns: 1fr;
  }

  .doc-section {
    padding-bottom: 34px;
    margin-bottom: 34px;
  }

  .doc-table th,
  .doc-table td {
    padding: 10px 12px;
  }

  .docs-back {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .docs-page {
    scroll-behavior: auto;
  }
}

@media print {
  @page {
    size: A4;
    margin: 16mm;
  }

  body,
  .docs-page {
    background: #fff !important;
    color: #111 !important;
  }

  body::before,
  body::after,
  .site-header,
  .site-footer,
  .skip-link,
  .docs-sidebar,
  .docs-hero-actions,
  .docs-hero-meta,
  .docs-side-note,
  .docs-side-links,
  .menu-toggle,
  .docs-nav,
  .header-actions {
    display: none !important;
  }

  .docs-hero {
    padding: 0 0 18px;
    border: 0;
    background: none;
  }

  .docs-hero::before,
  .docs-hero::after {
    display: none;
  }

  .docs-hero h1 {
    color: #111 !important;
    font-size: 30pt;
    line-height: 1.1;
  }

  .docs-hero > .container > p {
    color: #333 !important;
  }

  .docs-hero .eyebrow {
    color: #0b6fa8 !important;
  }

  .docs-layout {
    display: block;
    padding: 0;
  }

  .docs-content,
  .doc-markdown {
    max-width: none;
  }

  .doc-section {
    padding-bottom: 22px;
    margin-bottom: 22px;
    border-color: #ddd !important;
  }

  .doc-section h2,
  .doc-section h3,
  .doc-section p,
  .doc-section li,
  .doc-section td,
  .doc-section th,
  .doc-markdown h2,
  .doc-markdown h3,
  .doc-markdown p,
  .doc-markdown li,
  .doc-markdown td,
  .doc-markdown th,
  .doc-markdown strong {
    color: #111 !important;
  }

  .doc-section h2,
  .doc-markdown h2 {
    break-after: avoid;
  }

  .doc-section h3,
  .doc-markdown h3 {
    break-after: avoid;
  }

  .doc-table,
  .doc-markdown table {
    font-size: 9pt;
  }

  .doc-table th,
  .doc-markdown table th {
    background: #f1f5f9 !important;
    color: #111 !important;
  }

  .doc-table th,
  .doc-table td,
  .doc-markdown table th,
  .doc-markdown table td {
    border-color: #ddd !important;
  }

  .doc-table-wrap,
  .doc-scroll-table {
    overflow: visible;
    border-color: #ddd;
  }

  tr,
  .doc-step,
  .doc-platform,
  .doc-callout,
  .doc-faq {
    break-inside: avoid;
  }

  .doc-code {
    background: #f6f8fa;
    border-color: #ddd;
    color: #111;
  }

  a {
    color: #0b5c9e !important;
    text-decoration: underline;
  }

  .reveal,
  html.js .reveal {
    opacity: 1 !important;
    transform: none !important;
  }
}

@media print {
  html,
  body,
  .docs-page {
    background: #fff !important;
  }

  body * {
    color: #111 !important;
    background: transparent !important;
    background-image: none !important;
    box-shadow: none !important;
    text-shadow: none !important;
    border-color: #c9ced8 !important;
  }

  a,
  a * {
    color: #0b5c9e !important;
    text-decoration: underline !important;
  }

  .doc-table th,
  .doc-step,
  .doc-platform,
  .doc-callout,
  .doc-code,
  .doc-kbd,
  .doc-release-status,
  .doc-faq {
    background: #f5f7fa !important;
  }

  .doc-callout {
    border-left-color: #0b5c9e !important;
  }

  .doc-kbd,
  .doc-release-status {
    border-color: #999 !important;
  }

  .doc-code,
  .doc-code code,
  .doc-section code,
  code {
    background: #f5f7fa !important;
    color: #111 !important;
  }

  .docs-hero .eyebrow,
  .doc-eyebrow {
    color: #0b5c9e !important;
  }

  .doc-lead {
    color: #111 !important;
  }

  .doc-table th,
  .doc-table td,
  .doc-markdown table th,
  .doc-markdown table td {
    color: #111 !important;
  }

  .icon,
  svg {
    color: #111 !important;
  }
}
