:root {
  color-scheme: light;
  --bg: #ffffff;
  --soft: #f8fafc;
  --soft-2: #f1f5f9;
  --text: #0f172a;
  --muted: #64748b;
  --faint: #94a3b8;
  --line: #e2e8f0;
  --code-bg: #0f172a;
  --code-text: #e2e8f0;
  --accent: #e11d48;
  --accent-dark: #be123c;
  --green: #059669;
  --radius: 10px;
  --shadow: 0 18px 60px rgba(15, 23, 42, .08);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.7;
  text-rendering: optimizeLegibility;
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 70px;
  padding: 0 clamp(20px, 5vw, 56px);
  background: rgba(255, 255, 255, .9);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0;
  white-space: nowrap;
}

.mark {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: var(--accent);
  color: white;
  font-size: .8rem;
  font-weight: 900;
}

.top-links {
  display: flex;
  gap: 20px;
  margin-left: auto;
  color: var(--muted);
  font-size: .94rem;
}

.version-pill {
  border: 1px solid #fecdd3;
  border-radius: 999px;
  background: #fff1f2;
  color: var(--accent-dark);
  font-size: .76rem;
  font-weight: 850;
  line-height: 1;
  padding: 6px 9px;
  white-space: nowrap;
}

.top-links a:hover,
.sidebar-group a:hover,
.on-this-page a:hover {
  color: var(--accent);
}

.marketing {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

.landing-hero {
  min-height: calc(100vh - 70px);
  display: grid;
  align-content: center;
  padding: 72px 0;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--accent);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  letter-spacing: 0;
  line-height: 1.12;
}

h1 {
  max-width: 920px;
  margin: 0;
  font-size: clamp(2.6rem, 6vw, 5.8rem);
  font-weight: 850;
}

h2 {
  margin: 0 0 16px;
  font-size: clamp(1.8rem, 3vw, 2.55rem);
}

h3 {
  margin: 28px 0 8px;
  font-size: 1.1rem;
}

.lead {
  max-width: 760px;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 1.17rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 16px;
  background: white;
  color: var(--text);
  font-weight: 750;
}

.button.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

.button:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.button.primary:hover {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
  color: white;
}

.hero-code {
  max-width: 620px;
  margin-top: 34px;
}

.feature-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  padding: 0 0 80px;
}

.feature-strip article,
.diagram-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
  box-shadow: var(--shadow);
  padding: 24px;
}

.feature-strip h2 {
  font-size: 1.1rem;
}

.feature-strip p,
.split-section p,
.doc-article p,
.doc-article li {
  color: var(--muted);
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  gap: 42px;
  align-items: center;
  padding: 80px 0 110px;
  border-top: 1px solid var(--line);
}

.docs-page {
  background: white;
}

.docs-header {
  padding-left: 22px;
  padding-right: 22px;
}

.doc-search {
  flex: 0 1 430px;
}

.doc-search input {
  width: 100%;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--soft);
  color: var(--text);
  padding: 0 16px;
  outline: none;
}

.doc-search input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(225, 29, 72, .09);
}

.docs-layout {
  display: grid;
  grid-template-columns: 286px minmax(0, 820px) 230px;
  gap: 44px;
  width: min(1440px, calc(100% - 36px));
  margin: 0 auto;
}

.docs-sidebar,
.on-this-page {
  position: sticky;
  top: 90px;
  align-self: start;
  height: calc(100vh - 110px);
  overflow: auto;
  padding: 32px 0;
}

.docs-sidebar {
  border-right: 1px solid var(--line);
  padding-right: 26px;
}

.sidebar-group {
  margin-bottom: 26px;
}

.sidebar-group p,
.on-this-page p {
  margin: 0 0 10px;
  color: var(--text);
  font-size: .78rem;
  font-weight: 850;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.sidebar-group a,
.on-this-page a {
  display: block;
  color: var(--muted);
  font-size: .94rem;
  line-height: 1.35;
  padding: 5px 0;
}

.sidebar-group a.active,
.on-this-page a.active {
  color: var(--accent);
  font-weight: 750;
}

.on-this-page {
  border-left: 1px solid var(--line);
  padding-left: 24px;
}

.doc-article {
  min-width: 0;
  padding: 58px 0 100px;
}

.doc-article section {
  padding: 0 0 58px;
  margin-bottom: 58px;
  border-bottom: 1px solid var(--line);
  scroll-margin-top: 96px;
}

.doc-article h1 {
  font-size: clamp(2.4rem, 5vw, 4.8rem);
}

.doc-article h2 {
  font-size: 2rem;
}

.doc-article p {
  margin: 0 0 18px;
}

.doc-article ul {
  padding-left: 22px;
}

.callout {
  margin: 22px 0;
  border: 1px solid #fecdd3;
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  background: #fff1f2;
  color: #7f1d1d;
  padding: 16px 18px;
}

.callout code {
  color: #7f1d1d;
  background: rgba(225, 29, 72, .1);
}

pre {
  position: relative;
  margin: 22px 0;
  border-radius: var(--radius);
  background: var(--code-bg);
  color: var(--code-text);
  overflow: auto;
  padding: 20px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.06);
}

pre code {
  color: var(--code-text);
  font-size: .91rem;
  line-height: 1.65;
  white-space: pre;
}

:not(pre) > code {
  border-radius: 6px;
  background: var(--soft-2);
  color: #be123c;
  padding: 2px 6px;
  font-size: .9em;
}

.copy-button {
  position: absolute;
  top: 10px;
  right: 10px;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 7px;
  background: rgba(255,255,255,.08);
  color: #cbd5e1;
  cursor: pointer;
  font-size: .75rem;
  padding: 5px 8px;
}

.copy-button:hover {
  background: rgba(255,255,255,.15);
  color: white;
}

.mermaid {
  margin: 22px 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--soft);
  padding: 18px;
}

.command-list {
  display: grid;
  gap: 10px;
}

.command-list code {
  display: block;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
  color: var(--text);
  padding: 12px 14px;
}

.faq h3 {
  color: var(--text);
}

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

  .on-this-page {
    display: none;
  }

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

@media (max-width: 820px) {
  .site-header {
    position: static;
    flex-wrap: wrap;
    gap: 12px;
    padding: 16px 18px;
  }

  .top-links {
    width: 100%;
    margin-left: 0;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .doc-search {
    flex-basis: 100%;
    order: 3;
  }

  .docs-layout {
    display: block;
    width: min(100% - 28px, 820px);
  }

  .docs-sidebar {
    position: static;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    padding: 24px 0;
  }

  .doc-article {
    padding-top: 36px;
  }

  .landing-hero {
    min-height: auto;
    padding: 56px 0;
  }

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

  .split-section {
    padding: 56px 0 80px;
  }
}

@media (max-width: 520px) {
  h1 {
    font-size: 2.45rem;
  }

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

  pre {
    padding: 16px;
  }
}
