:root {
  color-scheme: light;
  --ink: #101820;
  --muted: #5b6875;
  --paper: #fbfcff;
  --panel: rgba(255, 255, 255, 0.82);
  --line: rgba(16, 24, 32, 0.12);
  --cyan: #00c2ff;
  --teal: #05a89d;
  --lime: #a9e34b;
  --amber: #ffbd2e;
  --blue: #1455ff;
  --shadow: 0 24px 80px rgba(16, 24, 32, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Aptos", "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 8% 4%, rgba(0, 194, 255, 0.18), transparent 28rem),
    radial-gradient(circle at 92% 0%, rgba(169, 227, 75, 0.18), transparent 30rem),
    linear-gradient(180deg, #f7fbff 0%, #fbfcff 48%, #f1fbf7 100%);
}

a {
  color: inherit;
}

code,
pre {
  font-family: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
}

.docs-topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 70px;
  padding: 12px max(20px, calc((100vw - 1460px) / 2));
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(18px);
}

.docs-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-left: auto;
}

.docs-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.docs-brand img {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.docs-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.docs-nav a {
  padding: 9px 12px;
  border-radius: 999px;
  color: var(--muted);
  text-decoration: none;
  font-weight: 800;
}

.docs-nav a:hover {
  color: var(--ink);
  background: rgba(0, 194, 255, 0.13);
}

.docs-language-switcher {
  display: inline-flex;
  align-items: center;
  padding: 7px;
  border: 1px solid rgba(0, 194, 255, 0.22);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.86);
  font-size: 0.82rem;
  font-weight: 900;
  white-space: nowrap;
}

.docs-language-switcher select {
  min-width: 148px;
  border: 0;
  border-radius: 999px;
  padding: 8px 28px 8px 10px;
  color: var(--ink);
  background: rgba(0, 194, 255, 0.1);
  font: inherit;
  outline: none;
}

.docs-language-switcher:focus-within {
  border-color: var(--cyan);
  box-shadow: 0 0 0 4px rgba(0, 194, 255, 0.12);
}

.docs-shell {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr) 240px;
  gap: 24px;
  width: min(1460px, calc(100% - 32px));
  margin: 24px auto 64px;
  align-items: start;
}

.docs-sidebar,
.docs-toc {
  position: sticky;
  top: 92px;
  max-height: calc(100vh - 112px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--panel);
  box-shadow: 0 18px 52px rgba(16, 24, 32, 0.08);
}

.docs-sidebar {
  padding: 18px;
}

.sidebar-header {
  display: grid;
  gap: 4px;
  margin-bottom: 16px;
}

.eyebrow {
  margin: 0;
  color: var(--teal);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.sidebar-header strong {
  font-size: 1.34rem;
  letter-spacing: -0.04em;
}

.search-box {
  display: grid;
  gap: 7px;
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 900;
}

.search-box input {
  width: 100%;
  border: 1px solid rgba(0, 194, 255, 0.24);
  border-radius: 16px;
  padding: 12px 13px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.82);
  font: inherit;
  outline: none;
}

.search-box input:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 4px rgba(0, 194, 255, 0.12);
}

.tree-group {
  margin-top: 16px;
}

.tree-group:first-child {
  margin-top: 0;
}

.tree-label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.tree-label::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--cyan), var(--lime));
}

.tree-link {
  display: grid;
  gap: 2px;
  width: 100%;
  margin: 3px 0;
  padding: 10px 11px;
  border-radius: 14px;
  color: var(--muted);
  text-decoration: none;
}

.tree-link:hover,
.tree-link.active {
  color: var(--ink);
  background: linear-gradient(135deg, rgba(0, 194, 255, 0.13), rgba(169, 227, 75, 0.14));
}

.tree-link span {
  font-weight: 900;
}

.tree-link code {
  color: inherit;
  font-size: 0.72rem;
  opacity: 0.75;
}

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

.docs-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  margin-bottom: 20px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 34px;
  background:
    radial-gradient(circle at 88% 14%, rgba(255, 189, 46, 0.2), transparent 20rem),
    linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(229, 250, 255, 0.72));
  box-shadow: var(--shadow);
}

.docs-hero h1 {
  margin: 8px 0 12px;
  font-size: clamp(2.4rem, 5vw, 5.1rem);
  line-height: 0.95;
  letter-spacing: -0.07em;
}

.docs-hero p {
  max-width: 780px;
  margin: 0;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.6;
}

.docs-page-description {
  padding: 0 4px;
}

.quick-install {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 14px;
  border-radius: 22px;
  color: white;
  background: #101820;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08), 0 16px 38px rgba(16, 24, 32, 0.16);
}

.quick-install span {
  color: var(--lime);
  font-weight: 900;
}

.quick-install code {
  display: block;
  min-width: 0;
  overflow: visible;
  white-space: normal;
  overflow-wrap: anywhere;
  font-size: clamp(0.9rem, 1.6vw, 1.05rem);
  line-height: 1.45;
}

.quick-install button,
.anchor-copy {
  border: 0;
  border-radius: 999px;
  color: #111827;
  background: linear-gradient(135deg, var(--amber), var(--lime));
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}

.quick-install button {
  padding: 9px 12px;
}

.docs-content {
  padding: 36px min(5vw, 58px);
  border: 1px solid var(--line);
  border-radius: 34px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
}

.docs-content h1,
.docs-content h2,
.docs-content h3 {
  position: relative;
  scroll-margin-top: 96px;
  letter-spacing: -0.04em;
}

.docs-content h1 {
  margin: 0 0 22px;
  font-size: clamp(2.1rem, 4vw, 4rem);
}

.docs-content h2 {
  margin: 42px 0 14px;
  padding-top: 8px;
  font-size: clamp(1.6rem, 2.4vw, 2.35rem);
  border-top: 1px solid var(--line);
}

.docs-content h3 {
  margin: 28px 0 10px;
  font-size: 1.26rem;
}

.docs-content p,
.docs-content li {
  color: #2f3a45;
  font-size: 1rem;
  line-height: 1.72;
}

.docs-content a {
  color: #0758c8;
  font-weight: 800;
}

.docs-content img {
  display: block;
  max-width: 100%;
  height: auto;
  border: 1px solid rgba(16, 24, 32, 0.12);
  border-radius: 18px;
  background: #f4efe6;
  box-shadow: 0 14px 44px rgba(16, 24, 32, 0.14);
}

.docs-content ul,
.docs-content ol {
  padding-left: 1.4rem;
}

.docs-content pre {
  overflow: auto;
  padding: 18px;
  border-radius: 18px;
  color: #e8f3ff;
  background: #101820;
  line-height: 1.55;
}

.docs-content :not(pre) > code {
  padding: 0.16rem 0.34rem;
  border-radius: 7px;
  color: #0f766e;
  background: rgba(5, 168, 157, 0.12);
  font-size: 0.9em;
}

.docs-content blockquote {
  margin: 18px 0;
  padding: 14px 18px;
  border-left: 4px solid var(--cyan);
  border-radius: 0 16px 16px 0;
  background: rgba(0, 194, 255, 0.08);
}

.docs-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 18px 0;
  overflow: hidden;
  border-radius: 16px;
  box-shadow: inset 0 0 0 1px var(--line);
}

.docs-content th,
.docs-content td {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  text-align: start;
  vertical-align: top;
}

.docs-content th {
  background: rgba(0, 194, 255, 0.1);
}

.docs-content td img {
  min-width: min(280px, 36vw);
}

.anchor-copy {
  margin-left: 8px;
  padding: 4px 8px;
  vertical-align: middle;
  opacity: 0;
  transform: translateY(-1px);
}

h2:hover .anchor-copy,
h3:hover .anchor-copy {
  opacity: 1;
}

.docs-toc {
  padding: 18px;
}

.docs-toc strong {
  display: block;
  margin-bottom: 12px;
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.docs-toc a {
  display: block;
  padding: 7px 0 7px 12px;
  border-left: 2px solid var(--line);
  color: var(--muted);
  text-decoration: none;
  line-height: 1.35;
}

.docs-toc a:hover {
  color: var(--ink);
  border-left-color: var(--cyan);
}

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

.pager a {
  min-height: 86px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--panel);
  color: var(--ink);
  text-decoration: none;
  font-weight: 900;
}

.pager a:empty {
  display: none;
}

.empty-state {
  padding: 18px;
  border-radius: 18px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.72);
}

html[dir="rtl"] .docs-actions {
  margin-right: auto;
  margin-left: 0;
}

html[dir="rtl"] .docs-toc a {
  padding-right: 12px;
  padding-left: 0;
  border-right: 2px solid var(--line);
  border-left: 0;
}

html[dir="rtl"] .docs-toc a:hover {
  border-right-color: var(--cyan);
}

html[dir="rtl"] .docs-content ul,
html[dir="rtl"] .docs-content ol {
  padding-right: 1.4rem;
  padding-left: 0;
}

html[dir="rtl"] .docs-content blockquote {
  border-right: 4px solid var(--cyan);
  border-left: 0;
  border-radius: 16px 0 0 16px;
}

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

  .docs-toc {
    display: none;
  }
}

@media (max-width: 820px) {
  .docs-topbar {
    position: static;
    align-items: flex-start;
    flex-direction: column;
  }

  .docs-actions {
    width: 100%;
    align-items: flex-start;
    justify-content: flex-start;
    flex-direction: column-reverse;
    margin-left: 0;
  }

  .docs-nav {
    justify-content: flex-start;
  }

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

  .docs-sidebar {
    position: static;
    max-height: none;
  }

  .pager {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .docs-shell {
    width: min(100% - 20px, 1460px);
  }

  .docs-content {
    padding: 24px 18px;
  }

  .quick-install {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .quick-install button {
    grid-column: 1 / -1;
  }
}
