/* Reading-first: system serif for prose, system sans for UI, the icon's blue as the one accent. */
:root {
  color-scheme: dark light;
  --paper: #0c0e12;
  --surface: #14171c;
  --ink: #eceef2;
  --muted: #a0a6b1;
  --rule: #262a32;
  --mark: #4f8df5;
  --mark-fill: #1e3a8a;
  --mark-ink: #eceef2;
  --mark-soft: rgba(79, 141, 245, 0.18);
  --link: #eceef2;
  --btn: #eceef2;
  --btn-ink: #0c0e12;
  --sans: Inter, system-ui, -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  --serif: Charter, "Iowan Old Style", "Palatino Linotype", "Songti SC", "Noto Serif CJK SC", Georgia, serif;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --paper: #fbfbfa;
    --surface: #f1f1ef;
    --ink: #16181d;
    --muted: #596070;
    --rule: #dcdde1;
    --mark: #2563eb;
    --mark-fill: #dbeafe;
    --mark-ink: #16181d;
    --mark-soft: rgba(37, 99, 235, 0.1);
    --link: #16181d;
    --btn: #16181d;
    --btn-ink: #fbfbfa;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
}
:root[data-theme="light"] {
  color-scheme: light;
  --paper: #fbfbfa;
  --surface: #f1f1ef;
  --ink: #16181d;
  --muted: #596070;
  --rule: #dcdde1;
  --mark: #2563eb;
  --mark-fill: #dbeafe;
  --mark-ink: #16181d;
  --mark-soft: rgba(37, 99, 235, 0.1);
  --link: #16181d;
  --btn: #16181d;
  --btn-ink: #fbfbfa;
}
.theme-toggle {
  display: inline-flex;
  margin-inline-start: 6px;
  border: 1px solid var(--rule);
  border-radius: 9999px;
  padding: 2px;
}
.theme-toggle button {
  font: inherit;
  font-size: 13px;
  line-height: 1.4;
  color: var(--muted);
  background: none;
  border: 0;
  border-radius: 9999px;
  padding: 2px 10px;
  cursor: pointer;
}
.theme-toggle button:hover {
  color: var(--ink);
}
.theme-toggle button[aria-pressed="true"] {
  background: var(--mark-fill);
  color: var(--mark-ink);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  font: 16px/1.7 var(--sans);
  background: var(--paper);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}
a {
  color: var(--link);
  text-decoration-color: var(--muted);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
a:hover {
  text-decoration-color: var(--mark);
  text-decoration-thickness: 2px;
}
:focus-visible {
  outline: 2px solid var(--mark);
  outline-offset: 2px;
}
.wrap {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 20px;
}
header.site {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--paper) 85%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--rule);
}
header.site .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  flex-wrap: wrap;
  min-height: 60px;
  padding-top: 10px;
  padding-bottom: 10px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 650;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
}
.brand img {
  width: 24px;
  height: 24px;
  border-radius: 5px;
}
nav.site {
  display: flex;
  align-items: center;
  gap: 6px 18px;
  font-size: 14px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
nav.site a {
  color: var(--muted);
  text-decoration: none;
}
nav.site a:hover,
nav.site a[aria-current] {
  color: var(--ink);
}
main {
  padding: 48px 0 72px;
}
h1 {
  font: 600 40px/1.15 var(--serif);
  letter-spacing: -0.03em;
  margin: 0 0 8px;
}
h2 {
  font: 600 20px/1.3 var(--serif);
  letter-spacing: -0.015em;
  margin: 40px 0 8px;
}
.meta {
  color: var(--muted);
  font-size: 14px;
  margin: 0 0 32px;
}
p,
li {
  max-width: 66ch;
}
ul {
  padding-inline-start: 1.2em;
}
li {
  margin: 6px 0;
}
code {
  font:
    0.9em ui-monospace,
    SFMono-Regular,
    Menlo,
    Consolas,
    monospace;
  background: var(--mark-soft);
  padding: 1px 5px;
  border-radius: 4px;
}
.lede {
  font: 21px/1.55 var(--serif);
  color: var(--muted);
  max-width: 28em;
  margin: 0 0 32px;
}
.cta {
  display: inline-block;
  background: var(--btn);
  color: var(--btn-ink);
  padding: 11px 22px;
  border-radius: 9999px;
  text-decoration: none;
  font-weight: 600;
  margin: 0 8px 8px 0;
}
.cta:hover {
  background: var(--mark-fill);
  color: var(--mark-ink);
}
.cta.alt {
  background: none;
  color: var(--ink);
  border: 1px solid var(--rule);
}
.cta.alt:hover {
  border-color: var(--mark);
  background: none;
  color: var(--ink);
}
.demo {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--rule);
  border-radius: 14px;
}
main:not(.home) .wrap {
  max-width: 760px;
}
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 56px;
  align-items: center;
  padding: 40px 0 24px;
}
.hero h1 {
  font-size: 64px;
  line-height: 1.04;
  letter-spacing: -0.035em;
  max-width: 9em;
  margin: 0 0 20px;
}
.hero .demo {
  max-width: 460px;
  justify-self: end;
}
.points {
  margin-top: 56px;
  border-top: 1px solid var(--rule);
}
.points > div {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 16px 56px;
  padding: 26px 0;
  border-bottom: 1px solid var(--rule);
}
.points h3 {
  margin: 0;
  font: 600 22px/1.3 var(--serif);
  letter-spacing: -0.01em;
}
.points p {
  margin: 0;
  color: var(--muted);
}
.note {
  max-width: 44em;
  margin: 32px 0 0;
  color: var(--muted);
}
.note::before {
  content: "";
  display: inline-block;
  width: 0.9em;
  height: 0.9em;
  margin-inline-end: 0.5em;
  background: var(--mark);
  border-radius: 2px;
  vertical-align: -0.1em;
}
footer.site {
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 14px;
  padding: 24px 0 40px;
}
footer.site .wrap {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  justify-content: space-between;
}
footer.site a {
  color: var(--muted);
}
footer.site .langs {
  flex-basis: 100%;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
}
footer.site .langs a[aria-current] {
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
}
@media (max-width: 860px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 36px;
    padding-top: 16px;
  }
  .hero .demo {
    justify-self: start;
  }
  .points > div {
    grid-template-columns: 1fr;
    gap: 6px;
  }
}
@media (max-width: 520px) {
  h1 {
    font-size: 30px;
  }
  .hero h1 {
    font-size: 42px;
  }
  .lede {
    font-size: 18px;
  }
}

/* Documentation pages generated from guide/*.md by tools/build-guide.mjs */
main.doc .wrap {
  max-width: 1080px;
}
.prose p,
.prose li {
  max-width: 88ch;
}
.prose h3 {
  font: 600 17px/1.3 var(--serif);
  margin: 28px 0 6px;
}
.prose h4 {
  font: 600 15px/1.3 var(--sans);
  margin: 22px 0 4px;
}
.prose ol {
  padding-inline-start: 1.4em;
}
.prose a {
  color: var(--link);
}
.prose pre {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 8px;
  padding: 12px 14px;
  overflow-x: auto;
}
.prose pre code {
  background: none;
  padding: 0;
}
.prose table {
  display: block;
  overflow-x: auto;
  border-collapse: collapse;
  margin: 16px 0;
  font-size: 14.5px;
}
.prose th,
.prose td {
  border: 1px solid var(--rule);
  padding: 6px 10px;
  text-align: start;
  vertical-align: top;
}
.prose th {
  background: var(--surface);
}
.prose blockquote {
  margin: 16px 0;
  padding: 2px 16px;
  border-inline-start: 3px solid var(--mark);
  color: var(--muted);
}
.crumb {
  margin: 0 0 16px;
  font-size: 14px;
}

/* Arabic letters join, so they must not be spaced apart. */
html[lang="ar"] * {
  letter-spacing: normal;
}

/* Code, commands and addresses read left to right inside right-to-left pages. */
html[dir="rtl"] pre,
html[dir="rtl"] code {
  direction: ltr;
  unicode-bidi: isolate;
}
html[dir="rtl"] pre {
  text-align: left;
}
