:root {
  color-scheme: light;
  --bg: #f6f7ff;
  --bg-soft: rgba(255, 255, 255, 0.72);
  --surface: rgba(255, 255, 255, 0.86);
  --surface-strong: #ffffff;
  --text: #1d2140;
  --text-soft: #4f587f;
  --border: rgba(115, 95, 214, 0.14);
  --shadow: 0 20px 60px rgba(69, 37, 135, 0.14);
  --purple: #6f46ff;
  --purple-soft: rgba(111, 70, 255, 0.14);
  --red: #ff4f7b;
  --yellow: #ffcb4d;
  --teal: #35d1c4;
  --green: #56c77b;
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --container: 1360px;
  --doc-container: 1480px;
  --header-height: 88px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(111, 70, 255, 0.15), transparent 32%),
    radial-gradient(circle at top right, rgba(53, 209, 196, 0.12), transparent 26%),
    linear-gradient(180deg, #fbfbff 0%, #f5f7ff 100%);
}

img {
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea,
select {
  font: inherit;
}

:where(h2, h3, h4, h5, h6, [id]) {
  scroll-margin-top: calc(var(--header-height) + 24px);
}

.page-bg {
  position: fixed;
  inset: auto;
  pointer-events: none;
  filter: blur(24px);
  opacity: 0.9;
  z-index: -1;
}

.page-bg--primary {
  top: 80px;
  left: -60px;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: rgba(111, 70, 255, 0.17);
}

.page-bg--secondary {
  top: 280px;
  right: -80px;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: rgba(255, 203, 77, 0.18);
}

.site-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.site-main {
  flex: 1;
}

.container {
  width: min(calc(100% - 2rem), var(--container));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  backdrop-filter: blur(18px);
  background: rgba(246, 247, 255, 0.82);
  border-bottom: 1px solid rgba(115, 95, 214, 0.08);
}

.site-header__inner {
  width: 100%;
  padding-inline: clamp(1rem, 2.2vw, 2.25rem);
}

.header-row {
  min-height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
  min-width: 0;
  flex: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(111, 70, 255, 0.16), rgba(53, 209, 196, 0.18));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

.brand-mark__icon,
.nav-link__icon,
.section-icon__svg,
.hero-card__icon-svg,
.inline-icon,
.nav-toggle__icon {
  width: 1.1rem;
  height: 1.1rem;
  flex: none;
}

.brand-eyebrow,
.eyebrow {
  display: block;
  color: var(--purple);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.76rem;
  font-weight: 700;
}

.brand-title {
  display: block;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.site-nav ul,
.footer-links,
.hero-links,
.side-list,
.nested-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.site-nav {
  flex: 1;
  min-width: 0;
}

.site-nav ul {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: flex-end;
  width: 100%;
}

.nav-link,
.button {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  border-radius: 999px;
  transition: transform 180ms ease, background-color 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.nav-link {
  padding: 0.75rem 1rem;
  color: var(--text-soft);
  border: 1px solid transparent;
}

.nav-link:hover,
.nav-link:focus-visible,
.nav-link.is-active {
  color: var(--text);
  border-color: rgba(111, 70, 255, 0.14);
  background: rgba(255, 255, 255, 0.76);
  transform: translateY(-1px);
}

.nav-toggle {
  display: none;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.85);
  padding: 0.8rem 1rem;
  border-radius: 999px;
  color: var(--text);
  margin-left: auto;
}

.home-hero,
.doc-shell,
.guide-groups,
.split-section {
  padding-block: 2rem 4rem;
}

.doc-shell {
  width: min(calc(100% - 2rem), var(--doc-container));
}

.home-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  gap: 1.5rem;
  align-items: stretch;
  padding-top: 2.5rem;
}

.hero-panel,
.card {
  border-radius: var(--radius-xl);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.78));
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.hero-panel {
  padding: clamp(1.5rem, 3vw, 3rem);
}

.hero-panel h1,
.doc-hero h1,
.page-intro h1 {
  margin: 0.5rem 0 1rem;
  font-size: clamp(2.4rem, 5vw, 4.4rem);
  line-height: 1.02;
  letter-spacing: -0.05em;
}

.lede {
  font-size: clamp(1rem, 1.6vw, 1.16rem);
  line-height: 1.75;
  color: var(--text-soft);
  margin: 0;
}

.hero-actions {
  display: flex;
  gap: 0.85rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

.button {
  padding: 0.95rem 1.2rem;
  font-weight: 700;
  border: 1px solid transparent;
}

.button:hover,
.button:focus-visible,
.content-card:hover,
.content-card:focus-visible,
.hero-card:hover,
.hero-card:focus-visible,
.stacked-link:hover,
.stacked-link:focus-visible {
  transform: translateY(-2px);
}

.button--primary {
  color: white;
  background: linear-gradient(135deg, var(--purple), #8a59ff);
  box-shadow: 0 14px 32px rgba(111, 70, 255, 0.26);
}

.button--ghost {
  color: var(--text);
  background: rgba(255, 255, 255, 0.78);
  border-color: var(--border);
}

.hero-stack,
.stacked-links,
.sidebar-stack {
  display: grid;
  gap: 1rem;
}

.hero-card,
.content-card,
.stacked-link,
.nested-card {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  border: 1px solid rgba(111, 70, 255, 0.12);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 14px 34px rgba(46, 27, 82, 0.08);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.hero-card:hover,
.content-card:hover,
.stacked-link:hover,
.nested-card:hover {
  box-shadow: 0 18px 44px rgba(46, 27, 82, 0.14);
  border-color: rgba(111, 70, 255, 0.2);
}

.hero-card__icon {
  width: 2.8rem;
  height: 2.8rem;
  display: grid;
  place-items: center;
  border-radius: 16px;
}

.hero-card__icon--1 {
  background: rgba(111, 70, 255, 0.14);
  color: var(--purple);
}

.hero-card__icon--2 {
  background: rgba(53, 209, 196, 0.16);
  color: #168a81;
}

.hero-card__icon--3 {
  background: rgba(255, 79, 123, 0.16);
  color: #e03d68;
}

.hero-card__eyebrow,
.content-card__badge,
.content-card__kind,
.card-cta__eyebrow {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  color: var(--purple);
}

.hero-card strong,
.content-card h3,
.stacked-link strong,
.nested-card h3,
.cta-card-link strong {
  font-size: 1.12rem;
  line-height: 1.3;
}

.hero-card,
.content-card,
.stacked-link,
.cta-card-link {
  min-height: 100%;
}

.stats-grid,
.card-grid,
.doc-layout,
.split-section,
.footer-grid,
.feature-list,
.mini-metrics,
.guide-groups__list {
  display: grid;
  gap: 1rem;
}

.stats-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 2rem;
}

.stat-card {
  padding: 1rem 1.15rem;
  border-radius: var(--radius-md);
  background: rgba(111, 70, 255, 0.08);
  border: 1px solid rgba(111, 70, 255, 0.1);
}

.stat-card strong {
  display: block;
  font-size: 1.7rem;
  margin-bottom: 0.35rem;
}

.section-card,
.page-intro {
  padding: 1.5rem;
}

.section-card__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.15rem;
}

.section-card__header > div {
  display: flex;
  flex-direction: column;
  row-gap: 0.95rem;
}

.section-card__header h2,
.section-card__header h1 {
  margin: 0;
  font-size: clamp(1.65rem, 3vw, 2.4rem);
  letter-spacing: -0.04em;
}

.section-card__header .eyebrow,
.section-card__header p {
  margin: 0;
}

.section-card__header h1 + p,
.section-card__header h2 + p,
.section-card__header h3 + p {
  margin-top: 0.7rem;
}

.section-card__header p:not(.eyebrow) {
  color: var(--text-soft);
  line-height: 1.7;
}

.header-stack {
  display: grid;
  row-gap: 0.9rem;
}

.header-stack > * {
  margin: 0;
}

.header-stack--spacious {
  row-gap: 1.1rem;
}

.section-card--deep-dives .section-card__header {
  margin-bottom: 1.35rem;
}

.section-card--deep-dives .section-card__header > div {
  row-gap: 1.08rem;
}

.section-icon {
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  border-radius: 18px;
  background: rgba(111, 70, 255, 0.1);
  color: var(--purple);
  flex: none;
}

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

.card-grid--compact {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.mini-metrics {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: auto;
}

.mini-metrics div {
  padding: 0.75rem;
  border-radius: 14px;
  background: rgba(53, 209, 196, 0.08);
}

.mini-metrics dt {
  font-size: 0.82rem;
  color: var(--text-soft);
}

.mini-metrics dd {
  margin: 0.25rem 0 0;
  font-size: 1.2rem;
  font-weight: 800;
}

.doc-layout,
.footer-grid {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.split-section {
  grid-template-columns: 1fr;
}

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

.feature-list div {
  padding: 1rem;
  border-radius: 18px;
  background: rgba(246, 247, 255, 0.9);
  border: 1px solid rgba(111, 70, 255, 0.08);
}

.feature-list h3,
.content-card h3,
.doc-hero h2,
.nested-card h3 {
  margin: 0;
  font-size: 1.15rem;
}

.content-card p,
.stacked-link span,
.nested-card p,
.hero-card span:last-child,
.footer-copy {
  color: var(--text-soft);
  line-height: 1.7;
}

.content-card p,
.nested-card p {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 3.4em;
}

.hero-card__action,
.content-card__more,
.card-cta__action {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--purple);
  font-weight: 700;
}

.content-card__more,
.stacked-link strong {
  margin-top: auto;
}

.stacked-link {
  justify-content: space-between;
  min-height: 148px;
}

.nested-card {
  min-height: 100%;
}

.cta-card-link {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  min-height: 132px;
}

.guide-groups {
  display: grid;
  gap: 1.5rem;
}

.guide-groups__list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.nested-links {
  display: grid;
  gap: 0.6rem;
}

.nested-links a,
.hero-links a,
.side-list a,
.breadcrumbs a,
.footer-links a {
  color: var(--purple);
}

.doc-shell {
  padding-top: 2rem;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
  color: var(--text-soft);
  margin-bottom: 1rem;
}

.doc-hero {
  display: block;
  padding: 1.5rem;
}

.side-card {
  border-radius: var(--radius-lg);
  background: rgba(111, 70, 255, 0.06);
  border: 1px solid rgba(111, 70, 255, 0.08);
  padding: 1rem;
}

.side-card__title {
  margin: 0 0 0.8rem;
  font-weight: 800;
}

.hero-links,
.side-list {
  display: grid;
  gap: 0.7rem;
}

.doc-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1rem;
}

.meta-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.55rem 0.85rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(111, 70, 255, 0.12);
  color: var(--text-soft);
}

.doc-layout {
  grid-template-columns: minmax(0, 1.14fr) 380px;
  align-items: start;
  margin-top: 1.5rem;
}

.doc-layout + .section-card {
  margin-top: 1.6rem;
}

.article-content {
  padding: clamp(1.25rem, 2vw, 2rem);
}

.prose {
  line-height: 1.8;
  color: var(--text);
}

.prose > * {
  margin-block: 0;
}

.prose p,
.prose li {
  color: var(--text-soft);
}

.prose > * + * {
  margin-top: 1rem;
}

.prose > :first-child {
  margin-top: 0;
}

.prose h2,
.prose h3,
.prose h4 {
  color: var(--text);
  letter-spacing: -0.03em;
}

.prose h2 {
  margin-top: 2.35rem;
  font-size: clamp(1.5rem, 2vw, 2rem);
}

.prose h3 {
  margin-top: 1.65rem;
  font-size: 1.2rem;
}

.prose h4 {
  margin-top: 1.4rem;
}

.prose :is(h2, h3, h4) + * {
  margin-top: 0.7rem;
}

.prose > :is(ul, ol) {
  padding-left: 1.4rem;
}

.prose > :is(ul, ol) > li + li {
  margin-top: 0.4rem;
}

.heading-anchor {
  margin-left: 0.5rem;
  color: rgba(111, 70, 255, 0.5);
  font-size: 0.85em;
}

.prose code {
  padding: 0.18rem 0.38rem;
  border-radius: 8px;
  background: rgba(111, 70, 255, 0.08);
  color: #5b3fd0;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

.prose pre {
  position: relative;
  margin: 0;
  padding: 0.95rem 1rem 1rem !important;
  border-radius: 0 0 20px 20px;
  background: transparent !important;
  border: 0;
  box-shadow: none;
  overflow: auto;
  color: #f3f0ff;
}

.prose pre code {
  padding: 0;
  background: transparent;
  color: #f3f0ff;
  display: block;
  min-width: 0;
  font-size: 0.9rem;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
  tab-size: 2;
}

.code-frame {
  display: grid;
  gap: 0;
  margin: 1.1rem 0 1.35rem;
  border-radius: 20px;
  overflow: hidden;
  background:
    radial-gradient(circle at top right, rgba(53, 209, 196, 0.14), transparent 34%),
    linear-gradient(180deg, #21184c 0%, #261f5f 100%);
  border: 1px solid rgba(127, 108, 255, 0.34);
  box-shadow: 0 20px 34px rgba(44, 24, 93, 0.22);
}

.code-frame__toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 1rem 0.35rem;
  border-bottom: 1px solid rgba(193, 181, 255, 0.16);
  color: rgba(234, 230, 255, 0.82);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.code-frame__toolbar > span {
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
}

.copy-button {
  border: 1px solid rgba(193, 181, 255, 0.28);
  background: rgba(255, 255, 255, 0.12);
  color: #f7f4ff;
  border-radius: 999px;
  padding: 0.4rem 0.72rem;
  cursor: pointer;
  flex: none;
}

.copy-button:hover,
.copy-button:focus-visible {
  background: rgba(111, 70, 255, 0.28);
}

.article-content > .code-frame,
.article-content .prose > .code-frame,
.prose > .code-frame {
  width: 100%;
  max-width: 100%;
}

@media (min-width: 1081px) {
  .prose pre code {
    font-size: 0.86rem;
  }
}

.token.comment,
.token.prolog,
.token.doctype,
.token.cdata {
  color: #95a0d6;
}

.token.punctuation,
.token.operator {
  color: #d9deff;
}

.token.keyword,
.token.rule,
.token.selector,
.token.atrule {
  color: #ff89b6;
}

.token.string,
.token.attr-value,
.token.char,
.token.builtin,
.token.inserted {
  color: #72ead8;
}

.token.function,
.token.property,
.token.symbol,
.token.tag {
  color: #ffd66f;
}

.token.number,
.token.boolean,
.token.constant,
.token.class-name {
  color: #c6a4ff;
}

.token.variable,
.token.parameter,
.token.regex,
.token.namespace {
  color: #9fd5ff;
}

.table-scroll {
  overflow-x: auto;
  border-radius: 18px;
  border: 1px solid rgba(111, 70, 255, 0.12);
  margin: 1.2rem 0;
}

.prose table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  background: rgba(255, 255, 255, 0.82);
}

.prose th,
.prose td {
  padding: 0.9rem 1rem;
  text-align: left;
  border-bottom: 1px solid rgba(111, 70, 255, 0.08);
}

.prose th {
  background: rgba(111, 70, 255, 0.07);
  color: var(--text);
}

.prose blockquote {
  margin: 1rem 0;
  padding: 1rem 1.2rem;
  border-left: 4px solid var(--purple);
  background: rgba(111, 70, 255, 0.05);
  border-radius: 0 18px 18px 0;
}

.prose hr {
  border: 0;
  height: 1px;
  background: linear-gradient(90deg, rgba(111, 70, 255, 0), rgba(111, 70, 255, 0.2), rgba(111, 70, 255, 0));
  margin: 2rem 0;
}

.side-list--cards li a,
.stacked-link {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding: 0.95rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(111, 70, 255, 0.1);
}

.side-list--cards span,
.stacked-link span {
  color: var(--text-soft);
}

.depth-3 {
  padding-left: 0.85rem;
}

.faq-group {
  display: grid;
  gap: 0.85rem;
  margin: 1rem 0 1.5rem;
}

.faq-item {
  border: 1px solid rgba(111, 70, 255, 0.12);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.85);
  overflow: hidden;
}

.faq-item summary {
  list-style: none;
  cursor: pointer;
  font-weight: 800;
  padding: 1rem 1.15rem;
  color: var(--text);
}

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

.faq-item[open] summary {
  border-bottom: 1px solid rgba(111, 70, 255, 0.1);
}

.faq-item__answer {
  padding: 1rem 1.15rem 1.1rem;
  color: var(--text-soft);
}

.site-footer {
  margin-top: 2rem;
  padding: 0;
  border-top: 1px solid rgba(111, 70, 255, 0.12);
  background: rgba(255, 255, 255, 0.4);
}

.footer-grid {
  align-items: start;
  gap: 1rem;
  padding: 1.8rem 0 2rem;
  border-radius: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.footer-title {
  font-size: 1.05rem;
  font-weight: 800;
  margin: 0 0 0.5rem;
}

.footer-copy {
  margin: 0;
}

.footer-links {
  display: grid;
  gap: 0.6rem;
}

.not-found {
  margin-top: 2rem;
  margin-bottom: 4rem;
}

@media (max-width: 1080px) {
  .home-hero,
  .doc-hero,
  .doc-layout,
  .split-section,
  .footer-grid,
  .feature-list,
  .guide-groups__list {
    grid-template-columns: 1fr;
  }

  .card-grid,
  .card-grid--compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  :root {
    --header-height: 78px;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .site-nav {
    position: absolute;
    top: calc(100% + 0.6rem);
    left: 1rem;
    right: 1rem;
    padding: 0.75rem;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(111, 70, 255, 0.14);
    box-shadow: var(--shadow);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 180ms ease, transform 180ms ease, visibility 180ms ease;
    flex: none;
  }

  .site-nav.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  .site-nav ul {
    flex-direction: column;
    align-items: stretch;
  }

  .nav-link {
    width: 100%;
    justify-content: flex-start;
  }

  .stats-grid,
  .card-grid,
  .card-grid--compact {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .container {
    width: min(calc(100% - 1rem), var(--container));
  }

  .hero-panel,
  .section-card,
  .article-content,
  .doc-hero {
    padding: 1.1rem;
  }

  .hero-actions,
  .doc-meta {
    flex-direction: column;
    align-items: stretch;
  }

  .button,
  .meta-pill {
    justify-content: center;
  }

  .code-frame__toolbar {
    padding: 0.75rem 0.85rem 0.35rem;
  }

  .prose pre {
    padding: 0.85rem 0.85rem 0.95rem !important;
  }

  .prose pre code {
    font-size: 0.84rem;
  }
}
