:root {
  --bg: #05060a;
  --panel: rgba(255, 255, 255, 0.025);
  --panel-2: rgba(255, 255, 255, 0.045);
  --text: #f5f7ff;
  --muted: rgba(226, 234, 250, 0.6);
  --muted-2: rgba(226, 234, 250, 0.38);
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.14);
  --cyan: #22d3ee;
  --violet: #8b5cf6;
  --amber: #f2b33d;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Consolas, monospace;
  --max: 1180px;
  --ease: cubic-bezier(0.22, 0.7, 0.25, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 92px;
  background: var(--bg);
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, "SF Pro Display", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 14px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body::before {
  content: "";
  position: fixed;
  z-index: -1;
  top: -20vh;
  left: -8vw;
  width: 90vw;
  height: 70vh;
  pointer-events: none;
  background:
    radial-gradient(50% 50% at 30% 40%, rgba(34, 211, 238, 0.1), transparent 70%),
    radial-gradient(48% 48% at 74% 46%, rgba(139, 92, 246, 0.12), transparent 72%);
  filter: blur(60px);
}

a {
  color: var(--cyan);
  text-decoration: none;
  transition: color 0.18s;
}

a:hover {
  color: #7ff2ff;
}

code,
kbd,
pre {
  font-family: var(--mono);
}

code {
  padding: 1px 5px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.045);
  color: rgba(244, 248, 255, 0.9);
  font-size: 0.86em;
  white-space: nowrap;
}

.doc-nav {
  position: sticky;
  z-index: 40;
  top: 0;
  border-bottom: 1px solid var(--line);
  background: rgba(5, 6, 10, 0.78);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  backdrop-filter: blur(20px) saturate(160%);
}

.doc-nav__inner {
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: var(--max);
  margin: 0 auto;
  padding: 13px 26px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.brand:hover {
  color: #fff;
}

.brand__mark {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: linear-gradient(135deg, #7ff2ff, #22d3ee 48%, #8b5cf6);
  color: #04131a;
  box-shadow: 0 0 18px rgba(34, 211, 238, 0.28);
}

.brand__mark svg {
  width: 15px;
  height: 15px;
}

.brand__ver {
  padding: 1px 5px;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--muted-2);
  font-size: 8.5px;
  font-weight: 500;
}

.doc-nav__spacer {
  flex: 1;
}

.doc-nav__link {
  padding: 6px 10px;
  border-radius: 7px;
  color: var(--muted);
  font-size: 11px;
}

.doc-nav__link:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
}

.doc {
  display: grid;
  grid-template-columns: 214px minmax(0, 1fr);
  gap: 52px;
  max-width: var(--max);
  margin: 0 auto;
  padding: 38px 26px 90px;
}

.toc {
  position: sticky;
  top: 92px;
  align-self: start;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  padding-right: 6px;
}

.toc__label {
  display: block;
  margin-bottom: 10px;
  color: var(--muted-2);
  font-size: 8.5px;
  font-weight: 650;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.toc a {
  display: block;
  padding: 4px 9px;
  border-left: 1px solid var(--line);
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.8;
}

.toc a:hover {
  border-left-color: var(--cyan);
  background: linear-gradient(90deg, rgba(34, 211, 238, 0.08), transparent);
  color: #fff;
}

.toc a.is-current {
  border-left-color: var(--cyan);
  color: #fff;
  background: linear-gradient(90deg, rgba(34, 211, 238, 0.12), transparent);
}

.main {
  min-width: 0;
}

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 3px 9px 3px 7px;
  border: 1px solid rgba(34, 211, 238, 0.18);
  border-radius: 99px;
  background: rgba(34, 211, 238, 0.055);
  color: rgba(180, 244, 255, 0.82);
  font-size: 8.5px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.eyebrow__dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 8px var(--cyan);
}

.doc-hero h1 {
  margin: 16px 0 10px;
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.1;
}

.doc-hero p {
  max-width: 62ch;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.main h2 {
  margin: 52px 0 12px;
  padding-top: 4px;
  font-size: 1.36rem;
  font-weight: 600;
  letter-spacing: -0.022em;
}

.main h2:first-of-type {
  margin-top: 40px;
}

.main h3 {
  margin: 28px 0 8px;
  font-size: 0.98rem;
  font-weight: 600;
  letter-spacing: -0.012em;
}

.main p {
  margin: 0 0 13px;
  color: var(--muted);
}

.main ul,
.main ol {
  margin: 0 0 15px;
  padding-left: 19px;
  color: var(--muted);
}

.main li {
  margin-bottom: 5px;
}

.main li > code,
.main p > code {
  font-size: 0.84em;
}

.main strong {
  color: rgba(245, 249, 255, 0.94);
  font-weight: 600;
}

.lead {
  color: rgba(235, 241, 255, 0.72) !important;
  font-size: 14.5px;
}

pre {
  position: relative;
  margin: 0 0 18px;
  padding: 16px 18px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.015)),
    #070910;
  color: rgba(233, 241, 255, 0.9);
  font-size: 11.5px;
  line-height: 1.75;
  tab-size: 2;
}

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

.tok-com { color: rgba(148, 163, 190, 0.6); }
.tok-key { color: #7ff2ff; }
.tok-str { color: #a7f3c0; }
.tok-num { color: #f2b33d; }
.tok-tag { color: #c4b5fd; }
.tok-attr { color: #93c5fd; }

.table-wrap {
  margin: 0 0 18px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

th,
td {
  padding: 9px 13px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.055);
  text-align: left;
  vertical-align: top;
}

th {
  background: rgba(255, 255, 255, 0.03);
  color: rgba(244, 248, 255, 0.82);
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  white-space: nowrap;
}

td {
  color: var(--muted);
}

td:first-child {
  color: rgba(245, 249, 255, 0.86);
  white-space: nowrap;
}

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

.note {
  display: flex;
  gap: 10px;
  margin: 0 0 18px;
  padding: 12px 14px;
  border: 1px solid rgba(34, 211, 238, 0.17);
  border-left: 2px solid var(--cyan);
  border-radius: 9px;
  background: rgba(34, 211, 238, 0.045);
  color: rgba(214, 240, 248, 0.76);
  font-size: 12.5px;
}

.note--warn {
  border-color: rgba(242, 179, 61, 0.2);
  border-left-color: var(--amber);
  background: rgba(242, 179, 61, 0.05);
  color: rgba(248, 231, 198, 0.8);
}

.note svg {
  flex: 0 0 auto;
  width: 15px;
  height: 15px;
  margin-top: 2px;
  color: var(--cyan);
}

.note--warn svg {
  color: var(--amber);
}

.note p {
  margin: 0;
  color: inherit;
}

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

.theme-card {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
}

.theme-card__swatch {
  display: block;
  width: 100%;
  height: 44px;
  margin-bottom: 10px;
  border-radius: 8px;
}

.theme-card__swatch--glass {
  background: linear-gradient(135deg, #0b1520, #14243a 55%, #3b1f6b);
  box-shadow: inset 0 0 0 1px rgba(127, 242, 255, 0.3);
}

.theme-card__swatch--neon {
  background: linear-gradient(135deg, #05060f, #16103a 45%, #4a0b3d);
  box-shadow: inset 0 0 0 1px rgba(0, 240, 255, 0.45);
}

.theme-card__swatch--desert {
  background: linear-gradient(135deg, #3b2417, #8a4a2a 50%, #e0a860);
  box-shadow: inset 0 0 0 1px rgba(242, 179, 61, 0.5);
}

.theme-card b {
  display: block;
  margin-bottom: 3px;
  font-size: 12px;
  font-weight: 600;
}

.theme-card span {
  color: var(--muted-2);
  font-size: 10.5px;
  line-height: 1.5;
}

.doc-foot {
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.012);
}

.doc-foot__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  max-width: var(--max);
  margin: 0 auto;
  padding: 22px 26px;
  color: var(--muted-2);
  font-size: 11px;
}

.doc-foot__inner a {
  color: var(--muted);
}

@media (max-width: 900px) {
  .doc {
    grid-template-columns: 1fr;
    gap: 0;
    padding-top: 26px;
  }

  .toc {
    position: static;
    display: flex;
    gap: 6px;
    max-height: none;
    margin-bottom: 22px;
    padding: 0 0 14px;
    overflow-x: auto;
    overflow-y: hidden;
    border-bottom: 1px solid var(--line);
  }

  .toc__label {
    display: none;
  }

  .toc a {
    flex: 0 0 auto;
    padding: 5px 10px;
    border: 1px solid var(--line);
    border-radius: 99px;
    line-height: 1.4;
    white-space: nowrap;
  }

  .toc a:hover,
  .toc a.is-current {
    border-color: rgba(34, 211, 238, 0.4);
    background: rgba(34, 211, 238, 0.08);
  }
}

@media (max-width: 700px) {
  .theme-cards {
    grid-template-columns: 1fr;
  }

  .doc-nav__link {
    display: none;
  }

  .doc-nav__inner,
  .doc,
  .doc-foot__inner {
    padding-left: 16px;
    padding-right: 16px;
  }

  pre {
    padding: 13px 14px;
    font-size: 11px;
  }

  .main h2 {
    margin-top: 42px;
  }
}

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

  * {
    transition-duration: 0.001ms !important;
  }
}
