:root {
  color-scheme: dark;
  --bg: #07090b;
  --bg-soft: #0a0d11;
  --surface: #121519;
  --surface-2: #171b20;
  --pill-bg: rgba(18, 21, 25, 0.78);
  --border: #282e35;
  --border-strong: #39434d;
  --text: #f3f5f7;
  --text-soft: #b1b7be;
  --muted: #7d858e;
  --accent: #66d7ff;
  --accent-soft: rgba(102, 215, 255, 0.11);
  --accent-card-bg: linear-gradient(145deg, rgba(23, 48, 60, 0.9), #11161b);
  --header-bg: rgb(7 9 11 / 86%);
  --code-bg: #0c0f13;
  --overlay-bg: rgb(0 0 0 / 72%);
  --hero-glow: rgb(53 117 143 / 22%);
  --max: 1180px;
  --header-h: 72px;
  --divider: rgba(255, 255, 255, 0.055);
  --content-divider: rgba(255, 255, 255, 0.045);
  --status-panel-glow: rgba(70, 154, 190, 0.16);
  --status-panel-bg-start: #11171c;
  --status-panel-bg-end: #0b0e12;
  --search-panel-bg: #0e1115;
  --search-shadow: rgba(0, 0, 0, 0.55);
  --inline-code-text: #c4eaff;
  --code-block-text: #d8dee6;
  --radius: 14px;
  --font:
    Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

html[data-theme="light"] {
  color-scheme: light;

  --bg: #f7f8fa;
  --bg-soft: #eef1f4;
  --surface: #ffffff;
  --surface-2: #f2f4f6;
  --pill-bg: #ffffff;
  --border: #d9dee4;
  --border-strong: #bcc5ce;

  --text: #15191e;
  --text-soft: #414850;
  --muted: #717983;

  --accent: #087ca7;
  --accent-soft: rgb(8 124 167 / 10%);
  --accent-card-bg: linear-gradient(145deg, #e8f6fb, #ffffff);

  --header-bg: rgb(247 248 250 / 88%);
  --divider: rgba(21, 25, 30, 0.10);
  --content-divider: rgba(21, 25, 30, 0.08);
  --status-panel-glow: rgba(8, 124, 167, 0.12);
  --status-panel-bg-start: #ffffff;
  --status-panel-bg-end: #eef6f9;
  --search-panel-bg: #ffffff;
  --search-shadow: rgba(21, 25, 30, 0.18);
  --inline-code-text: #075f80;
  --code-block-text: #27313a;
  --code-bg: #eef1f4;
  --overlay-bg: rgb(18 24 30 / 45%);
  --hero-glow: rgb(91 188 220 / 18%);
}

* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  background: var(--bg);
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text-soft);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}
a {
  color: inherit;
  text-decoration: none;
}
button,
input {
  font: inherit;
}
img {
  display: block;
  max-width: 100%;
  height: auto;
}
::selection {
  background: var(--accent);
  color: var(--bg);
}

.skip-link {
  position: fixed;
  left: 1rem;
  top: -5rem;
  z-index: 200;
  padding: 0.65rem 1rem;
  border-radius: 0.55rem;
  background: var(--text);
  color: var(--bg);
}
.skip-link:focus {
  top: 1rem;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--divider);
  background: var(--header-bg);
  backdrop-filter: blur(18px);
}
.site-header__inner {
  width: min(calc(100% - 40px), var(--max));
  min-height: var(--header-h);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--text);
  font-weight: 650;
}
.brand__mark {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: linear-gradient(145deg, var(--surface-2), var(--surface));
}
.brand__mark svg {
  width: 18px;
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.7;
}
.brand__tag {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 600;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.15rem 0.5rem;
}
.top-nav {
  display: flex;
  gap: 1.8rem;
  margin-left: auto;
}
.top-nav a,
.github-link {
  color: var(--text-soft);
  font-size: 0.84rem;
  transition: color 0.18s ease;
}
.top-nav a:hover,
.github-link:hover {
  color: var(--text);
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.search-button {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--text-soft);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 0.48rem 0.65rem;
  cursor: pointer;
}
.search-button:hover {
  border-color: var(--border-strong);
  color: var(--text);
}
.search-button kbd {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.7rem;
}
.github-link {
  display: inline-flex;
  gap: 0.35rem;
}
.menu-button {
  display: none;
  width: 38px;
  height: 38px;
  border: 0;
  background: transparent;
  cursor: pointer;
}
.menu-button span {
  display: block;
  height: 1px;
  width: 20px;
  background: var(--text);
  margin: 5px auto;
}
.mobile-nav {
  padding: 0 20px 18px;
}
.mobile-nav a {
  display: block;
  padding: 0.65rem 0;
  color: var(--text-soft);
}

.home-main {
  overflow: hidden;
}
.hero {
  position: relative;
  min-height: 690px;
  display: grid;
  place-items: center;
  padding: 110px 20px 90px;
  border-bottom: 1px solid var(--divider);
}
.hero__glow {
  position: absolute;
  inset: -10% 10% auto;
  height: 560px;
  pointer-events: none;
  background: radial-gradient(
    circle at 50% 24%,
    var(--hero-glow),
    transparent 58%
  );
  filter: blur(10px);
}
.hero__inner {
  position: relative;
  width: min(850px, 100%);
  text-align: center;
}
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid var(--border);
  background: var(--pill-bg);
  color: var(--text-soft);
  border-radius: 999px;
  padding: 0.36rem 0.75rem;
  font-size: 0.76rem;
}
.status-pill i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 16px var(--accent);
}
.hero h1 {
  max-width: 820px;
  margin: 1.5rem auto 1rem;
  color: var(--text);
  font-size: clamp(3rem, 6.8vw, 5.8rem);
  line-height: 0.98;
  letter-spacing: -0.062em;
  font-weight: 720;
}
.hero__lead {
  max-width: 700px;
  margin: 0 auto;
  color: var(--text-soft);
  font-size: 1.05rem;
  line-height: 1.75;
}
.hero__actions {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 2rem;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 44px;
  padding: 0.7rem 1.1rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.84rem;
  font-weight: 650;
  transition: 0.18s ease;
}
.button:hover {
  transform: translateY(-1px);
}
.button--primary {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}
.button--secondary {
  background: var(--surface);
  color: var(--text);
}
.button--secondary:hover {
  background: var(--surface-2);
  border-color: var(--border-strong);
}
.tag-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.55rem;
  margin-top: 2.3rem;
}
.tag-row span {
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--pill-bg);
  color: var(--text-soft);
  font-size: 0.72rem;
}

.home-section {
  width: min(calc(100% - 40px), var(--max));
  margin: 0 auto;
  padding: 105px 0;
}
.home-section + .home-section {
  border-top: 1px solid var(--divider);
}
.home-section--intro {
  display: grid;
  grid-template-columns: 0.78fr 1.22fr;
  gap: 5rem;
}
.eyebrow {
  display: block;
  margin: 0 0 0.9rem;
  color: var(--accent);
  font-size: 0.7rem;
  font-weight: 750;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}
.section-heading h2,
.status-panel h2 {
  margin: 0;
  color: var(--text);
  letter-spacing: -0.038em;
  font-size: clamp(2rem, 4vw, 3.15rem);
  line-height: 1.05;
}
.section-heading--wide {
  max-width: 650px;
  margin-bottom: 2.6rem;
}
.section-copy > p {
  max-width: 680px;
  margin: 0 0 1.5rem;
  color: var(--text-soft);
}
.mini-card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.8rem;
}
.mini-card,
.capability-grid article {
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}
.mini-card h3,
.feature-card h3,
.capability-grid h3 {
  margin: 0 0 0.45rem;
  color: var(--text);
  font-size: 1rem;
}
.mini-card p,
.feature-card p,
.capability-grid p {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.55;
}

.feature-card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
.feature-card {
  min-height: 245px;
  padding: 1.45rem;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: linear-gradient(145deg, var(--surface-2), var(--surface));
  display: flex;
  flex-direction: column;
  transition: 0.2s ease;
}
.feature-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-strong);
  background: var(--surface-2);
}
.feature-card--accent {
  background: var(--accent-card-bg);
}
.feature-card__icon {
  color: var(--accent);
  font-size: 1.5rem;
  margin-bottom: 2.5rem;
}
.feature-card h3 {
  font-size: 1.15rem;
}
.feature-card__meta {
  margin-top: auto;
  color: var(--accent);
  font-size: 0.72rem;
}

.capability-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.9rem;
}
.capability-grid article {
  min-height: 190px;
  padding: 1.25rem;
}
.capability-grid article > span {
  color: var(--accent);
  font-family: var(--mono);
  font-size: 0.72rem;
}
.capability-grid h3 {
  margin-top: 2.2rem;
}

.status-panel {
  min-height: 300px;
  padding: 3rem;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 3rem;
  border: 1px solid var(--border);
  border-radius: 20px;
  background:
    radial-gradient(
      circle at 72% 25%,
      var(--status-panel-glow),
      transparent 36%
    ),
    linear-gradient(
      145deg,
      var(--status-panel-bg-start),
      var(--status-panel-bg-end)
    );
}
.status-panel p {
  max-width: 690px;
  color: var(--text-soft);
}

.docs-shell {
  width: min(calc(100% - 40px), 1440px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 240px minmax(0, 820px) 210px;
  justify-content: center;
  gap: 3.4rem;
  min-height: calc(100vh - var(--header-h));
}
.docs-sidebar,
.docs-toc {
  position: relative;
}
.docs-sidebar__inner,
.docs-toc__inner {
  position: sticky;
  top: calc(var(--header-h) + 2rem);
  max-height: calc(100vh - var(--header-h) - 3rem);
  overflow: auto;
  padding: 2.1rem 0;
}
.sidebar-label,
.toc-label {
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 750;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.sidebar-group {
  margin-bottom: 1.45rem;
}
.sidebar-group > p {
  margin: 0 0 0.45rem;
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 650;
}
.sidebar-subgroup {
  margin: 0.75rem 0;
}

.sidebar-subgroup-title {
  margin: 0 0 0.2rem;
  padding-left: 0.65rem;
  color: var(--text-soft);
  font-size: 0.76rem;
  font-weight: 650;
}

.sidebar-subgroup-links {
  margin-left: 0.65rem;
}

.sidebar-nav a {
  display: block;
  margin: 0.12rem 0;
  padding: 0.42rem 0.65rem;
  color: var(--muted);
  font-size: 0.82rem;
  border-radius: 7px;
}

.sidebar-nav a:hover {
  color: var(--text);
  background: var(--surface);
}
.sidebar-nav a.is-active {
  color: var(--accent);
  background: var(--accent-soft);
}
.docs-toc nav a {
  display: block;
  padding: 0.3rem 0;
  color: var(--muted);
  font-size: 0.78rem;
  border-left: 1px solid var(--border);
  padding-left: 0.8rem;
}
.docs-toc nav a:hover {
  color: var(--text);
}
.docs-toc nav a.is-active {
  color: var(--accent);
  border-left-color: var(--accent);
}
.docs-toc nav .toc-child {
  padding-left: 1.35rem;
}
.docs-content {
  min-width: 0;
  border-left: 1px solid var(--content-divider);
  border-right: 1px solid var(--content-divider);
}
.docs-content__inner {
  padding: 2.3rem 3.2rem 6rem;
}
.breadcrumbs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 2.3rem;
  color: var(--muted);
  font-size: 0.76rem;
}
.breadcrumbs a {
  color: var(--accent);
}

.docs-content h1,
.docs-content h2,
.docs-content h3,
.docs-content h4 {
  color: var(--text);
  line-height: 1.18;
  letter-spacing: -0.032em;
  scroll-margin-top: calc(var(--header-h) + 24px);
}
.docs-content h1 {
  margin: 0 0 1.1rem;
  font-size: clamp(2.35rem, 5vw, 3.7rem);
}
.docs-content h2 {
  margin-top: 3.3rem;
  padding-top: 0.6rem;
  font-size: 1.85rem;
}
.docs-content h3 {
  margin-top: 2.2rem;
  font-size: 1.25rem;
}
.docs-content p,
.docs-content li {
  color: var(--text-soft);
}
.docs-content a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 0.18em;
}
.docs-content strong {
  color: var(--text);
}
.docs-content hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 2.5rem 0;
}
.docs-content img {
  margin: 1.6rem 0;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
}
.docs-content table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}
.docs-content th,
.docs-content td {
  padding: 0.8rem 1rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
}
.docs-content th {
  background: var(--surface);
  color: var(--text);
}
.docs-content tr:last-child td {
  border-bottom: 0;
}

code,
pre {
  font-family: var(--mono);
}
code {
  padding: 0.12rem 0.35rem;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: var(--surface);
  color: var(--inline-code-text);
  font-size: 0.84em;
}
pre {
  overflow: auto;
  padding: 1rem 1.1rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--code-bg);
}
pre code {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--code-block-text);
}
.admonition {
  margin: 1.5rem 0;
  padding: 1rem 1.1rem;
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 10px;
  background: var(--surface);
}
.admonition-title {
  margin-top: 0 !important;
  color: var(--text) !important;
  font-weight: 700;
}
details {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  padding: 0.75rem 1rem;
}
summary {
  color: var(--text);
  cursor: pointer;
  font-weight: 650;
}
.headerlink {
  opacity: 0;
  margin-left: 0.35rem;
  text-decoration: none !important;
}
h2:hover .headerlink,
h3:hover .headerlink,
h4:hover .headerlink {
  opacity: 0.7;
}

.page-nav {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.8rem;
  margin-top: 4rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}
.page-nav__item {
  padding: 0.9rem 1rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  text-decoration: none !important;
}
.page-nav__item span {
  display: block;
  color: var(--muted);
  font-size: 0.7rem;
}
.page-nav__item strong {
  color: var(--text);
  font-size: 0.85rem;
}
.page-nav__item--next {
  text-align: right;
  grid-column: 2;
}

.site-footer {
  border-top: 1px solid var(--divider);
}
.site-footer__inner {
  width: min(calc(100% - 40px), var(--max));
  min-height: 120px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  color: var(--muted);
  font-size: 0.72rem;
}
.site-footer nav {
  display: flex;
  gap: 1.3rem;
}
.site-footer a:hover {
  color: var(--text);
}

.search-dialog[hidden] {
  display: none;
}
.search-dialog {
  position: fixed;
  inset: 0;
  z-index: 300;
}
.search-dialog__backdrop {
  position: absolute;
  inset: 0;
  background: var(--overlay-bg);
  backdrop-filter: blur(8px);
}
.search-panel {
  position: relative;
  width: min(calc(100% - 32px), 720px);
  max-height: min(78vh, 700px);
  margin: 10vh auto 0;
  overflow: auto;
  border: 1px solid var(--border-strong);
  border-radius: 16px;
  background: var(--search-panel-bg);
  box-shadow: 0 30px 100px var(--search-shadow);
}
.search-panel__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1rem 0.5rem;
}
.search-panel__top label {
  color: var(--text);
  font-size: 0.8rem;
  font-weight: 700;
}
.icon-button {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 1.5rem;
  cursor: pointer;
}
.search-input {
  display: block;
  width: calc(100% - 2rem);
  margin: 0.5rem 1rem 1rem;
  padding: 0.9rem 1rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  outline: none;
}
.search-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.search-results {
  padding: 0 1rem 1rem;
}
.search-result {
  display: block;
  padding: 0.85rem;
  border-top: 1px solid var(--border);
  border-radius: 8px;
}
.search-result:hover {
  background: var(--surface);
}
.search-result strong {
  color: var(--text);
}
.search-result p {
  margin: 0.25rem 0 0;
  color: var(--muted);
  font-size: 0.78rem;
}
.search-empty {
  color: var(--muted);
  padding: 1rem 0;
  text-align: center;
}

.not-found {
  width: min(calc(100% - 40px), 760px);
  min-height: 70vh;
  margin: 0 auto;
  display: grid;
  place-content: center;
  text-align: center;
}
.not-found h1 {
  color: var(--text);
  font-size: 3rem;
  margin: 0;
}
.not-found .button {
  margin: 1rem auto 0;
}

@media (max-width: 1120px) {
  .docs-shell {
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 0;
  }
  .docs-toc {
    display: none;
  }
  .capability-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 840px) {
  .top-nav,
  .github-link,
  .search-button span:not(:first-child),
  .search-button kbd {
    display: none;
  }
  .menu-button {
    display: block;
  }
  .docs-shell {
    width: 100%;
    display: block;
  }
  .docs-sidebar {
    display: none;
  }
  .docs-content {
    border: 0;
  }
  .docs-content__inner {
    padding: 2rem 20px 5rem;
  }
  .home-section--intro {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .feature-card-grid,
  .mini-card-grid {
    grid-template-columns: 1fr;
  }
  .status-panel {
    align-items: flex-start;
    flex-direction: column;
    padding: 2rem;
  }
}
@media (max-width: 600px) {
  .site-header__inner {
    width: calc(100% - 28px);
  }
  .brand__tag {
    display: none;
  }
  .hero {
    min-height: 610px;
    padding-top: 80px;
  }
  .hero h1 {
    font-size: clamp(2.7rem, 13vw, 4rem);
  }
  .hero__actions {
    flex-direction: column;
    align-items: stretch;
  }
  .home-section {
    width: calc(100% - 32px);
    padding: 72px 0;
  }
  .capability-grid {
    grid-template-columns: 1fr;
  }
  .page-nav {
    grid-template-columns: 1fr;
  }
  .page-nav__item--next {
    grid-column: auto;
    text-align: left;
  }
  .site-footer__inner {
    align-items: flex-start;
    flex-direction: column;
    padding: 2rem 0;
  }
}

.theme-button {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;

  padding: 0;
  border: 1px solid var(--border);
  border-radius: 9px;

  background: var(--surface);
  color: var(--text-soft);

  cursor: pointer;
  transition:
    color 0.18s ease,
    border-color 0.18s ease,
    background 0.18s ease;
}

.theme-button:hover {
  color: var(--text);
  border-color: var(--border-strong);
  background: var(--surface-2);
}

.theme-button__light {
  display: none;
}

html[data-theme="light"] .theme-button__dark {
  display: none;
}

html[data-theme="light"] .theme-button__light {
  display: inline;
}
