:root {
  --docs-bg: #0b0e13;
  --docs-panel: #11161e;
  --docs-panel-strong: #171e28;
  --docs-line: #26303d;
  --docs-text: #e8edf4;
  --docs-muted: #a7b0bd;
  --docs-dim: #748092;
  --docs-cyan: #69d6e8;
  --docs-green: #83d9a1;
  --docs-amber: #f1c875;
  --docs-purple: #c7a4f4;
  --docs-red: #f29a9a;
  --docs-mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  --docs-sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html { background: var(--docs-bg); scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--docs-text);
  background:
    radial-gradient(circle at 80% -10%, rgba(65, 131, 151, .16), transparent 33rem),
    var(--docs-bg);
  font: 15px/1.7 var(--docs-sans);
}

a { color: var(--docs-cyan); }
a:hover { color: #b5f1f8; }

code, pre, .eyebrow, .breadcrumbs, .label, .version, .docs-brand span {
  font-family: var(--docs-mono);
}

code {
  color: #d8f6fa;
  background: rgba(105, 214, 232, .09);
  border: 1px solid rgba(105, 214, 232, .14);
  border-radius: 4px;
  padding: .12em .32em;
  font-size: .91em;
}

pre {
  overflow: auto;
  margin: 1rem 0;
  padding: 1rem 1.1rem;
  border: 1px solid var(--docs-line);
  border-radius: 9px;
  color: #d8e1ec;
  background: #090c11;
  font: 13px/1.65 var(--docs-mono);
  tab-size: 2;
}

pre code { padding: 0; border: 0; background: transparent; color: inherit; }

.docs-header {
  position: sticky;
  z-index: 10;
  top: 0;
  border-bottom: 1px solid rgba(38, 48, 61, .86);
  background: rgba(11, 14, 19, .9);
  backdrop-filter: blur(16px);
}

.docs-header-inner {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  max-width: 1240px;
  min-height: 64px;
  margin: 0 auto;
  padding: 0 1.3rem;
}

.docs-brand {
  flex: 0 0 auto;
  color: var(--docs-text);
  font-size: 17px;
  font-weight: 750;
  letter-spacing: -.02em;
  text-decoration: none;
}

.docs-brand::before {
  display: inline-block;
  width: 9px;
  height: 9px;
  margin: 0 8px 1px 0;
  border-radius: 50%;
  background: var(--docs-cyan);
  box-shadow: 0 0 16px rgba(105, 214, 232, .75);
  content: "";
}

.docs-brand span {
  margin-left: 5px;
  color: var(--docs-dim);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.docs-top-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: .25rem .8rem;
  margin-left: auto;
}

.docs-top-nav a {
  padding: .35rem .15rem;
  color: var(--docs-muted);
  font-size: 13px;
  text-decoration: none;
}

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

.docs-top-nav .launch {
  margin-left: .35rem;
  padding: .45rem .75rem;
  border: 1px solid rgba(105, 214, 232, .38);
  border-radius: 6px;
  color: var(--docs-cyan);
}

.docs-shell {
  max-width: 1240px;
  margin: 0 auto;
  padding: 2.6rem 1.3rem 5rem;
}

.breadcrumbs {
  margin-bottom: 1.3rem;
  color: var(--docs-dim);
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.breadcrumbs a { color: var(--docs-dim); text-decoration: none; }
.breadcrumbs a:hover { color: var(--docs-cyan); }

.doc-layout {
  display: grid;
  grid-template-columns: 205px minmax(0, 1fr);
  gap: 3rem;
  align-items: start;
}

.doc-rail {
  position: sticky;
  top: 89px;
  padding-top: .25rem;
}

.rail-title {
  margin: 0 0 .6rem;
  color: var(--docs-dim);
  font: 11px/1.3 var(--docs-mono);
  letter-spacing: .08em;
  text-transform: uppercase;
}

.rail-links {
  display: grid;
  gap: .15rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.rail-links a {
  display: block;
  padding: .3rem .55rem;
  border-left: 2px solid transparent;
  color: var(--docs-muted);
  font-size: 13px;
  text-decoration: none;
}

.rail-links a:hover,
.rail-links a[aria-current="page"] {
  border-left-color: var(--docs-cyan);
  color: var(--docs-text);
  background: rgba(105, 214, 232, .06);
}

.rail-source {
  margin-top: 1.8rem;
  padding-top: 1rem;
  border-top: 1px solid var(--docs-line);
  color: var(--docs-dim);
  font-size: 12px;
}

.doc-content { max-width: 860px; min-width: 0; }

.doc-content h1,
.docs-home h1 {
  max-width: 900px;
  margin: 0 0 .8rem;
  color: #f7f9fc;
  font-size: clamp(2.2rem, 5vw, 4.2rem);
  line-height: 1.04;
  letter-spacing: -.055em;
}

.doc-content h2 {
  margin: 2.8rem 0 .7rem;
  color: #f2f6fb;
  font-size: 1.55rem;
  line-height: 1.2;
  letter-spacing: -.025em;
}

.doc-content h3 {
  margin: 1.8rem 0 .45rem;
  color: #edf3f9;
  font-size: 1.03rem;
  line-height: 1.3;
}

.doc-content p { margin: .7rem 0 1rem; color: var(--docs-muted); }
.doc-content strong { color: var(--docs-text); }
.doc-content ul, .doc-content ol { margin: .6rem 0 1.15rem; padding-left: 1.3rem; color: var(--docs-muted); }
.doc-content li { margin: .35rem 0; }

.eyebrow {
  display: inline-block;
  margin-bottom: 1rem;
  color: var(--docs-cyan);
  font-size: 11px;
  letter-spacing: .11em;
  text-transform: uppercase;
}

.lede {
  max-width: 730px;
  margin: 0 0 1.6rem;
  color: #bac5d2;
  font-size: 1.13rem;
  line-height: 1.65;
}

.page-meta {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin: 1.3rem 0 2.1rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .26rem .58rem;
  border: 1px solid var(--docs-line);
  border-radius: 999px;
  color: var(--docs-muted);
  font: 11px/1.3 var(--docs-mono);
}

.badge.live { border-color: rgba(131, 217, 161, .35); color: var(--docs-green); }
.badge.caution { border-color: rgba(241, 200, 117, .35); color: var(--docs-amber); }
.badge.separate { border-color: rgba(199, 164, 244, .35); color: var(--docs-purple); }

.note {
  margin: 1.35rem 0;
  padding: .9rem 1rem .9rem 1.1rem;
  border: 1px solid var(--docs-line);
  border-left: 3px solid var(--docs-cyan);
  border-radius: 7px;
  background: rgba(17, 22, 30, .82);
}

.note p { margin: 0; }
.note.warn { border-left-color: var(--docs-amber); }
.note.danger { border-left-color: var(--docs-red); }
.note.good { border-left-color: var(--docs-green); }

.card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin: 1.8rem 0;
}

.card {
  display: flex;
  min-height: 168px;
  flex-direction: column;
  padding: 1.15rem;
  border: 1px solid var(--docs-line);
  border-radius: 10px;
  background: linear-gradient(150deg, rgba(23, 30, 40, .92), rgba(17, 22, 30, .8));
}

.card:hover { border-color: rgba(105, 214, 232, .45); }
.card h2, .card h3 { margin: 0 0 .35rem; }
.card h2 { font-size: 1.1rem; }
.card p { margin: 0 0 .8rem; font-size: 13px; }
.card .card-link { margin-top: auto; font-size: 13px; text-decoration: none; }

.section-kicker {
  margin: 2.2rem 0 .55rem;
  color: var(--docs-dim);
  font: 11px/1.3 var(--docs-mono);
  letter-spacing: .1em;
  text-transform: uppercase;
}

.data-table {
  width: 100%;
  margin: 1.1rem 0 1.5rem;
  border-collapse: collapse;
  font-size: 13px;
}

.data-table th, .data-table td {
  padding: .7rem .65rem;
  border-bottom: 1px solid var(--docs-line);
  vertical-align: top;
  text-align: left;
}

.data-table th {
  color: var(--docs-dim);
  font: 10px/1.3 var(--docs-mono);
  letter-spacing: .07em;
  text-transform: uppercase;
}

.data-table td { color: var(--docs-muted); }
.data-table td:first-child { color: var(--docs-text); }
.data-table a { text-decoration: none; }
.version { white-space: nowrap; color: var(--docs-amber); font-size: 12px; }

.flow {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .55rem;
  margin: 1.4rem 0;
}

.flow-step {
  position: relative;
  padding: .8rem .75rem;
  border: 1px solid var(--docs-line);
  border-radius: 8px;
  background: var(--docs-panel);
  color: var(--docs-muted);
  font-size: 12px;
}

.flow-step:not(:last-child)::after {
  position: absolute;
  top: 50%;
  right: -.62rem;
  color: var(--docs-cyan);
  content: "→";
}

.flow-step strong { display: block; margin-bottom: .2rem; color: var(--docs-text); }

.explainer-frame {
  width: 100%;
  min-height: 430px;
  margin: 1rem 0 .4rem;
  border: 1px solid var(--docs-line);
  border-radius: 9px;
  background: #080b0f;
}

.frame-fallback { margin: 0 0 1.7rem; color: var(--docs-dim); font-size: 12px; }

.source-list {
  display: grid;
  gap: .35rem;
  margin: .8rem 0;
  padding: 0;
  list-style: none;
}

.source-list li { margin: 0; }

.source-list a {
  display: inline-block;
  padding: .2rem 0;
  text-decoration: none;
}

.docs-home { max-width: 1050px; }
.docs-home .lede { max-width: 760px; }
.home-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.home-grid .card { min-height: 190px; }

.docs-footer {
  border-top: 1px solid var(--docs-line);
  color: var(--docs-dim);
  font-size: 12px;
}

.docs-footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  max-width: 1240px;
  margin: 0 auto;
  padding: 1.25rem 1.3rem 2rem;
}

.docs-footer a { color: var(--docs-muted); text-decoration: none; }
.docs-footer nav { display: flex; flex-wrap: wrap; gap: .8rem; }

@media (max-width: 860px) {
  .docs-header-inner { align-items: flex-start; flex-direction: column; padding-top: .8rem; padding-bottom: .8rem; }
  .docs-top-nav { justify-content: flex-start; margin-left: 0; }
  .docs-top-nav .launch { margin-left: 0; }
  .doc-layout { display: block; }
  .doc-rail { position: static; margin-bottom: 2rem; padding: .8rem; border: 1px solid var(--docs-line); border-radius: 8px; }
  .rail-links { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rail-source { margin-top: 1rem; }
  .home-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
  .docs-shell { padding-top: 1.8rem; }
  .docs-top-nav { gap: .2rem .55rem; }
  .docs-top-nav a { font-size: 12px; }
  .doc-content h1, .docs-home h1 { font-size: 2.45rem; }
  .card-grid, .home-grid, .flow { grid-template-columns: 1fr; }
  .flow-step:not(:last-child)::after { top: auto; right: auto; bottom: -.75rem; left: 50%; content: "↓"; }
  .data-table { display: block; overflow-x: auto; white-space: normal; }
  .docs-footer-inner { align-items: flex-start; flex-direction: column; }
}
