@font-face {
  font-family: "Work Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/work-sans-latin-400-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Work Sans";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/work-sans-latin-500-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Work Sans";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/work-sans-latin-600-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Saira";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/saira-latin-500-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Saira";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/saira-latin-600-normal.woff2") format("woff2");
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/jetbrains-mono-latin-400-normal.woff2") format("woff2");
}

:root {
  color-scheme: dark;
  --ink: #f4f6fa;
  --muted: #a9b4c6;
  --faint: #8390a6;
  --bg: #0e1218;
  --surface: #151b24;
  --raised: #1d2531;
  --line: rgba(230, 234, 241, 0.1);
  --brand: #a2c3dc;
  --brand-deep: #537eb1;
  --sans: "Work Sans", ui-sans-serif, system-ui, sans-serif;
  --display: "Saira", "Work Sans", ui-sans-serif, system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

html {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  font-feature-settings: "tnum";
}

body {
  margin: 0;
}

.site a {
  color: var(--brand);
  text-decoration: none;
}
.site a:hover {
  color: var(--ink);
}

.top {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  height: 64px;
  padding: 0 1.5rem;
  border-bottom: 1px solid var(--line);
  background: #0c1016;
  position: sticky;
  top: 0;
  z-index: 20;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--ink);
  font-family: var(--display);
  font-size: 19px;
  font-weight: 500;
  letter-spacing: -0.02em;
}
.brand:hover {
  color: var(--ink);
}

.nav {
  display: flex;
  gap: 1.15rem;
  align-items: center;
}
.nav a {
  color: var(--muted);
  font-weight: 500;
}
.nav a[aria-current="page"],
.nav a:hover {
  color: var(--ink);
}

.top-search {
  margin-left: auto;
  width: min(280px, 34vw);
}
.signin {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.4rem 0.9rem;
  color: var(--ink);
  font-weight: 500;
  background: var(--raised);
}
.signin:hover {
  color: var(--ink);
  border-color: rgba(162, 195, 220, 0.45);
}

.page {
  max-width: 880px;
  margin: 0 auto;
  padding: 2.5rem 1.25rem 4rem;
}

.hero h1,
.prose h1 {
  font-family: var(--display);
  font-weight: 500;
  font-size: 2.4rem;
  letter-spacing: -0.03em;
  margin: 0 0 0.6rem;
}
.lede {
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.55;
  max-width: 42rem;
}

.panel {
  margin-top: 1.75rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 1rem;
  padding: 1.15rem 1.2rem 1.25rem;
}
.panel h2,
.section-title {
  font-family: var(--display);
  font-weight: 500;
  font-size: 1.25rem;
  margin: 0 0 0.35rem;
}
.hint {
  color: var(--faint);
  margin: 0 0 0.9rem;
  line-height: 1.5;
}

.ask {
  display: grid;
  gap: 0.75rem;
}
.ask textarea,
.site input {
  font: inherit;
  width: 100%;
  box-sizing: border-box;
  min-height: 5.5rem;
  background: #0b0f14;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  padding: 0.8rem 0.9rem;
  resize: vertical;
}
.ask button,
.site button.primary {
  justify-self: start;
  font: inherit;
  font-weight: 600;
  background: linear-gradient(to top right, #537eb1 0%, #a2c3dc 100%);
  color: #0e1218;
  border: 0;
  border-radius: 999px;
  padding: 0.55rem 1.1rem;
  cursor: pointer;
}
.ask button:disabled {
  opacity: 0.55;
  cursor: default;
}

.answer {
  margin-top: 1rem;
  white-space: pre-wrap;
  line-height: 1.55;
}
.sources {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.9rem;
  padding: 0;
  margin: 0.8rem 0 0;
  list-style: none;
  color: var(--faint);
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.85rem;
  margin: 0.4rem 0 0;
  padding: 0;
  list-style: none;
}
.cards a {
  display: block;
  height: 100%;
  box-sizing: border-box;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 1rem;
  padding: 1rem 1.05rem 1.1rem;
  color: var(--ink);
}
.cards a:hover {
  border-color: rgba(162, 195, 220, 0.4);
  color: var(--ink);
}
.cards strong {
  display: block;
  font-family: var(--display);
  font-weight: 500;
  font-size: 1.05rem;
  margin-bottom: 0.3rem;
}
.cards span {
  color: var(--muted);
  line-height: 1.45;
}

.prose {
  line-height: 1.6;
}
.prose h2,
.prose h3 {
  font-family: var(--display);
  font-weight: 500;
  letter-spacing: -0.02em;
  margin: 1.6rem 0 0.4rem;
}
.prose p {
  color: var(--muted);
  margin: 0.7rem 0;
}
.prose code {
  font-family: var(--mono);
  font-size: 0.88em;
  background: var(--raised);
  border-radius: 0.35rem;
  padding: 0.1rem 0.35rem;
  color: var(--ink);
}
.error {
  color: #f28b82;
}

.foot {
  margin-top: 2.5rem;
  color: var(--faint);
  font-size: 0.85rem;
}
.foot a {
  color: var(--faint);
}

.reference {
  height: calc(100vh - 64px);
  min-height: 640px;
}
.reference .scalar-app,
.reference .scalar-api-reference {
  height: 100%;
}

.pagefind-ui {
  --pagefind-ui-primary: #a2c3dc;
  --pagefind-ui-text: #f4f6fa;
  --pagefind-ui-background: #151b24;
  --pagefind-ui-border: rgba(230, 234, 241, 0.14);
  --pagefind-ui-border-width: 1px;
  --pagefind-ui-border-radius: 999px;
  --pagefind-ui-font: "Work Sans", ui-sans-serif, system-ui, sans-serif;
  --pagefind-ui-scale: 0.85;
}
