:root {
  color-scheme: dark;
  --paper: #050506;
  --paper-deep: #0b0b0e;
  --surface: #101015;
  --ink: #f8f4f8;
  --muted: #b5a6b2;
  --purple: #ff4fa3;
  --purple-readable: #ff9acc;
  --coral: #ff4fa3;
  --coral-hover: #ff7dbb;
  --accent-soft: #2a1422;
  --line: #28232a;
  --line-strong: #654457;
  --white: #ffffff;
  --page-width: 1180px;
  --page-gutter: 24px;
  --page-gutter-mobile: 14px;
  --reading-width: 720px;
  --sidebar-width: 190px;
  --toc-width: 180px;
  --space-section: 42px;
  --radius-small: 8px;
  --radius-medium: 10px;
  --radius: 12px;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --sans: "Segoe UI Variable", "Segoe UI", system-ui, sans-serif;
  --serif: Georgia, "Times New Roman", serif;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--paper);
  scrollbar-color: var(--purple) var(--paper);
  scrollbar-gutter: stable;
  scrollbar-width: thin;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--purple);
  outline-offset: 3px;
}

.page-width {
  width: min(calc(100% - (2 * var(--page-gutter))), var(--page-width));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  z-index: 50;
  top: 0;
  width: 100%;
  display: flex;
  min-height: 68px;
  align-items: center;
  justify-content: space-between;
  padding-inline: max(24px, calc((100% - 1400px) / 2));
  border-bottom: 1px solid var(--line);
  background: rgba(5, 5, 6, 0.94);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.025em;
}

.brand-symbol {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.header-links,
.site-footer-inner,
.site-footer nav,
.hero-action-row {
  display: flex;
  align-items: center;
}

.header-links {
  gap: 24px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.header-links a,
.site-footer a {
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 4px;
  transition: text-decoration-color 140ms ease;
}

.header-links a:hover,
.site-footer a:hover {
  text-decoration-color: currentColor;
}

.landing-shell {
  display: grid;
  min-height: max(100vh, 100dvh);
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.landing-main {
  display: grid;
  min-height: 0;
}

.landing-hero {
  display: grid;
  min-height: 0;
  grid-template-columns: 1fr;
  align-content: center;
  padding: clamp(28px, 4vh, 48px) 0;
}

.hero-copy {
  min-width: 0;
}

h1,
h2,
p {
  margin-top: 0;
}

.hero-copy h1 {
  max-width: 820px;
  margin-bottom: 0;
  font-size: clamp(50px, 4.9vw, 70px);
  font-weight: 700;
  letter-spacing: -0.058em;
  line-height: 0.94;
}

.hero-copy h1 span {
  display: block;
  margin-top: 5px;
  color: var(--purple);
}

.hero-summary {
  max-width: 600px;
  margin: 20px 0 0;
  color: var(--muted);
}

.hero-action-row {
  margin-top: 28px;
  gap: 20px;
}

.hero-footnote {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.hero-footnote code {
  color: var(--ink);
  font-family: var(--mono);
}

.hero-installer {
  width: min(100%, 720px);
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.hero-installer-heading > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.hero-install-panel {
  margin-top: 10px;
}

.hero-code-block pre {
  padding-block: 13px;
}

.primary-action {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 0 19px;
  border: 0;
  border-radius: var(--radius);
  background: var(--coral);
  color: #211011;
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.26);
  transition: background-color 140ms ease, box-shadow 140ms ease;
}

.primary-action:hover {
  background: var(--coral-hover);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.34);
}

.primary-action:active {
  background: #f74099;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.24);
}

.secondary-action {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  padding: 0 17px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: transparent;
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
  transition: border-color 140ms ease, color 140ms ease;
}

.secondary-action:hover {
  border-color: var(--purple-readable);
  color: var(--purple-readable);
}

.site-footer {
  border-top: 1px solid var(--line);
  background: #080809;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
}

.site-footer-inner {
  min-height: 84px;
  justify-content: space-between;
  gap: 24px;
}

.site-footer nav {
  gap: 18px;
}

/* Docs */

.docs-shell {
  display: grid;
  min-height: max(100vh, 100dvh);
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.docs-main {
  width: min(calc(100% - (2 * var(--page-gutter))), var(--page-width));
  margin-inline: auto;
  padding: var(--space-section) 0 96px;
}

.docs-layout {
  display: grid;
  grid-template-columns:
    var(--sidebar-width)
    minmax(0, var(--reading-width))
    var(--toc-width);
  align-items: start;
  justify-content: space-between;
  column-gap: clamp(32px, 4vw, 58px);
}

.docs-layout > * {
  min-width: 0;
}

.docs-sidebar {
  position: sticky;
  top: 96px;
  grid-column: 1;
  grid-row: 1;
  max-height: calc(100vh - 116px);
  overflow-y: auto;
  padding: 14px 8px 24px 0;
  scrollbar-width: thin;
}

.docs-sidebar section + section {
  margin-top: 30px;
}

.docs-sidebar h2 {
  margin: 0 0 10px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.docs-sidebar ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.docs-sidebar li + li {
  margin-top: 4px;
}

.docs-sidebar a {
  display: block;
  padding: 8px 12px;
  border-radius: var(--radius-small);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
  transition: background-color 140ms ease, color 140ms ease;
}

.docs-sidebar a:hover {
  color: var(--ink);
}

.docs-sidebar a.is-current {
  background: var(--accent-soft);
  color: var(--purple-readable);
  font-weight: 650;
}

.docs-page {
  grid-column: 2;
  grid-row: 1;
  min-width: 0;
}

.docs-intro {
  padding: 14px 0 0;
}

.docs-kicker {
  margin-bottom: 12px;
  color: var(--coral);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.docs-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.docs-intro h1 {
  max-width: 620px;
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(44px, 4.6vw, 60px);
  font-weight: 500;
  letter-spacing: -0.045em;
  line-height: 1;
}

.copy-page-button {
  flex: 0 0 auto;
  min-height: 36px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius-medium);
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
  font-weight: 650;
  transition: border-color 140ms ease, color 140ms ease;
}

.copy-page-button:hover {
  border-color: var(--line-strong);
  color: var(--ink);
}

.docs-summary {
  max-width: 640px;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.6;
}

.docs-content a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--coral);
  text-underline-offset: 3px;
}

.docs-toc {
  position: sticky;
  top: 96px;
  grid-column: 3;
  grid-row: 1;
  max-height: calc(100vh - 116px);
  overflow-y: auto;
  padding: 18px 0 28px 18px;
  scrollbar-width: thin;
}

.docs-toc strong {
  display: block;
  margin-bottom: 12px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
}

.docs-toc ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

.docs-toc li + li {
  margin-top: 8px;
}

.docs-toc a {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
  transition: color 140ms ease;
}

.docs-toc a:hover,
.docs-toc a.is-active {
  color: var(--coral);
}

.docs-content {
  min-width: 0;
  margin-top: 32px;
}

.docs-content > :first-child {
  margin-top: 0;
}

.doc-section {
  padding-bottom: 0;
}

.doc-section + .doc-section {
  padding-top: var(--space-section);
  border-top: 1px solid var(--line);
}

.docs-content h2 {
  scroll-margin-top: 84px;
  position: relative;
  margin: 0 0 18px;
  font-family: var(--serif);
  font-size: 31px;
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1.16;
}

.docs-content h3 {
  scroll-margin-top: 84px;
  position: relative;
  margin: 30px 0 14px;
  color: var(--ink);
  font-size: 18px;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.heading-anchor {
  position: absolute;
  top: 0;
  right: calc(100% + 8px);
  color: var(--purple-readable) !important;
  text-decoration: none !important;
  opacity: 0;
  transition: opacity 140ms ease;
}

.heading-anchor::before {
  content: "#";
}

.docs-content h2:hover .heading-anchor,
.docs-content h3:hover .heading-anchor,
.heading-anchor:focus-visible {
  opacity: 1;
}

.docs-content p,
.docs-content ol,
.docs-content ul,
.docs-content blockquote {
  max-width: var(--reading-width);
}

.docs-content p,
.docs-content li {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.72;
}

.docs-content p {
  margin-bottom: 18px;
}

.docs-content ol,
.docs-content ul {
  margin: 0;
  padding-left: 24px;
}

.docs-content li + li {
  margin-top: 10px;
}

.docs-content strong {
  color: var(--ink);
}

.docs-content li::marker {
  color: var(--coral);
}

.docs-content blockquote {
  position: relative;
  margin: 24px 0;
  padding: 16px 18px 16px 44px;
  border: 1px solid #57283e;
  border-radius: var(--radius-medium);
  background: #180b13;
}

.docs-content blockquote::before {
  content: "i";
  position: absolute;
  top: 18px;
  left: 18px;
  display: grid;
  width: 16px;
  height: 16px;
  place-items: center;
  border: 1px solid #ff80bd;
  border-radius: 50%;
  color: #ffb2d5;
  font-family: var(--serif);
  font-size: 11px;
  font-weight: 700;
}

.docs-content blockquote p {
  margin: 0;
  color: #f1cedf;
  font-size: 13px;
  line-height: 1.6;
}

.code-block {
  position: relative;
  overflow: visible;
  border: 1px solid var(--line);
  border-radius: var(--radius-medium);
  background: #0b0a0e;
  color: var(--white);
}

.copy-button {
  display: grid;
  width: 28px;
  height: 28px;
  padding: 0;
  place-items: center;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.copy-button::before,
.copy-button::after {
  content: "";
  position: absolute;
  width: 9px;
  height: 10px;
  border: 1px solid currentColor;
  border-radius: 2px;
}

.copy-button::before {
  top: 6px;
  left: 6px;
}

.copy-button::after {
  top: 10px;
  left: 10px;
  background: #0b0a0e;
}

.code-block > .copy-button {
  position: absolute;
  z-index: 1;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
}

.copy-button:hover {
  color: var(--purple-readable);
}

.copy-button[data-state="copied"] {
  background: transparent;
  color: var(--coral);
}

.copy-button[data-state="copied"]::before {
  content: "✓";
  width: auto;
  height: auto;
  border: 0;
  font-size: 15px;
  font-weight: 700;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.copy-button[data-state="copied"]::after {
  display: none;
}

.copy-tooltip {
  position: absolute;
  right: 50%;
  bottom: calc(100% + 7px);
  padding: 5px 7px;
  border-radius: 5px;
  background: #211f26;
  color: var(--white);
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  opacity: 0;
  pointer-events: none;
  transform: translate(50%, 3px);
  transition: opacity 120ms ease, transform 120ms ease;
}

.copy-button:hover .copy-tooltip,
.copy-button:focus-visible .copy-tooltip {
  opacity: 1;
  transform: translate(50%, 0);
}

.code-block pre {
  overflow-x: auto;
  margin: 0;
  padding: 18px 20px;
}

.code-block > .copy-button + pre {
  padding-right: 60px;
}

.code-block code {
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.55;
  white-space: pre;
}

.docs-content .code-block {
  margin: 18px 0 24px;
}

.docs-content table {
  width: 100%;
  margin: 24px 0;
  border-collapse: collapse;
  font-size: 13px;
}

.docs-content :not(pre) > code {
  padding: 0.12em 0.35em;
  border-radius: 4px;
  background: var(--surface);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 0.92em;
}

.docs-content .primary-action {
  color: #211011;
  text-decoration: none;
}

.docs-content .docs-action-row {
  margin: 26px 0 18px;
}

.docs-content th,
.docs-content td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  text-align: left;
  vertical-align: top;
}

.docs-content th {
  color: var(--ink);
  font-weight: 700;
}

@media (max-width: 820px) {
  .landing-hero {
    align-content: center;
  }
}

@media (max-width: 1180px) {
  .docs-layout {
    grid-template-columns: var(--sidebar-width) minmax(0, var(--reading-width));
    justify-content: center;
  }

  .docs-toc {
    display: none;
  }
}

@media (max-width: 940px) {
  .docs-layout {
    display: block;
    max-width: var(--reading-width);
    margin-inline: auto;
  }

  .docs-sidebar {
    display: none;
  }

  .docs-content {
    margin-top: 32px;
  }
}

@media (max-width: 720px) {
  .docs-content {
    margin-top: 28px;
  }
}

@media (max-width: 600px) {
  .page-width {
    width: min(
      calc(100% - (2 * var(--page-gutter-mobile))),
      var(--page-width)
    );
  }

  .site-header {
    min-height: 56px;
    padding-inline: 14px;
  }

  .docs-content h2,
  .docs-content h3 {
    scroll-margin-top: 72px;
  }

  .header-links {
    display: none;
  }

  .landing-hero {
    gap: 22px;
    padding: 22px 0 18px;
  }

  .hero-copy h1 {
    font-size: clamp(42px, 12.4vw, 58px);
  }

  .hero-copy h1 span {
    margin-top: 4px;
  }

  .hero-action-row {
    margin-top: 20px;
    justify-content: space-between;
    gap: 12px;
  }

  .hero-installer {
    margin-top: 18px;
    padding-top: 14px;
  }

  .hero-code-block pre {
    overflow-x: hidden;
  }

  .hero-code-block code {
    overflow-wrap: anywhere;
    white-space: pre-wrap;
  }

  .primary-action {
    min-height: 43px;
    padding: 0 13px;
    font-size: 13px;
  }

  .secondary-action {
    min-height: 43px;
    padding: 0 13px;
    font-size: 13px;
  }

  .site-footer {
    font-size: 9px;
  }

  .site-footer-inner {
    min-height: 84px;
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    gap: 10px;
  }

  .site-footer nav {
    gap: 10px;
  }

  .docs-main {
    width: min(
      calc(100% - (2 * var(--page-gutter-mobile))),
      var(--reading-width)
    );
    padding: 32px 0 56px;
  }

  .docs-intro {
    padding: 8px 0 0;
  }

  .docs-title-row {
    align-items: flex-start;
  }

  .docs-intro h1 {
    font-size: clamp(38px, 11vw, 48px);
  }

  .docs-summary {
    font-size: 15px;
  }

  .copy-page-button {
    min-height: 32px;
    padding-inline: 10px;
    font-size: 11px;
  }

  .docs-content h2 {
    font-size: 26px;
  }

  .heading-anchor {
    right: auto;
    left: -13px;
  }

  .doc-section + .doc-section {
    padding-top: 32px;
  }
}

@media (max-width: 340px) {
  .header-links {
    gap: 8px;
    font-size: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
