/* The docs site's one stylesheet. Tokens copy the product's foundations
   (src/app/globals.css): near-black text, hairline borders, weight 500 at
   most, a 4px grid. The edition's accent and corners follow below. No web
   font is loaded: the system face first paints at once. */
:root {
  --system-font:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, sans-serif;
  --font: Inter, var(--system-font);
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --background: #ffffff;
  --foreground: #101112;
  --muted: #5e5e5e;
  --faint: #8a8f98;
  --chrome: #f5f6f6;
  --soft: #fafafa;
  --border: #eeeff1;
  --border-strong: #dfe2e6;
  --accent: #056dff;
  --accent-hover: #045ede;
  --accent-subtle: #e5eeff;
  --note: #215bc4;
  --note-subtle: #f2f6ff;
  --tip: #007d53;
  --tip-subtle: #effcf5;
  --warning: #874d00;
  --warning-subtle: #fff8e0;
  --radius: 8px;
  --radius-large: 12px;
  --header: 56px;
  --sidebar: 256px;
  --toc: 224px;
}


*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header) + 16px);
}
body {
  margin: 0;
  background: var(--background);
  color: var(--foreground);
  font: 400 15px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
}
a {
  color: inherit;
}
img {
  max-width: 100%;
  height: auto;
}
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus {
  left: 16px;
  top: 12px;
  z-index: 30;
  background: var(--background);
  padding: 4px 8px;
}

/* ---- Top bar ---- */
.top {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 16px;
  height: var(--header);
  padding: 0 24px;
  background: rgb(255 255 255 / 92%);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--border);
}
.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  font-weight: 500;
  white-space: nowrap;
}
.brand img {
  border-radius: 5px;
}
.brand-docs {
  color: var(--muted);
  font-weight: 400;
}
.search-open {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  max-width: 320px;
  height: 32px;
  margin-left: 24px;
  padding: 0 8px 0 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--soft);
  color: var(--muted);
  font: inherit;
  font-size: 14px;
  cursor: pointer;
}
.search-open:hover {
  border-color: var(--faint);
}
.search-open span {
  flex: 1;
  text-align: left;
}
kbd {
  font: 12px var(--mono);
  color: var(--faint);
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  padding: 0 4px;
  background: var(--background);
}
.top-end {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-left: auto;
}
.languages {
  display: flex;
  gap: 2px;
  font-size: 13px;
}
.languages a {
  padding: 2px 8px;
  border-radius: var(--radius);
  color: var(--muted);
  text-decoration: none;
}
.languages a[aria-current] {
  color: var(--foreground);
  background: var(--chrome);
}
.button {
  display: inline-flex;
  align-items: center;
  height: 32px;
  padding: 0 12px;
  border-radius: var(--radius);
  background: var(--accent);
  color: #ffffff;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
}
.button:hover {
  background: var(--accent-hover);
}

/* ---- Columns ---- */
.shell {
  display: grid;
  grid-template-columns: var(--sidebar) minmax(0, 1fr) var(--toc);
  max-width: 1440px;
  margin: 0 auto;
}
.nav-toggle,
.nav-button {
  display: none;
}
.sidebar {
  position: sticky;
  top: var(--header);
  height: calc(100vh - var(--header));
  overflow-y: auto;
  padding: 24px 16px 48px 24px;
  border-right: 1px solid var(--border);
  font-size: 14px;
}
.nav-title {
  margin: 20px 0 4px;
  padding: 0 8px;
  color: var(--foreground);
  font-size: 13px;
  font-weight: 500;
}
.nav-title:first-child {
  margin-top: 0;
}
.sidebar ul,
.toc ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.sidebar a {
  display: block;
  padding: 4px 8px;
  border-radius: var(--radius);
  color: var(--muted);
  text-decoration: none;
}
.sidebar a:hover {
  color: var(--foreground);
  background: var(--chrome);
}
.sidebar a[aria-current] {
  color: var(--foreground);
  background: var(--chrome);
  font-weight: 500;
}
main {
  min-width: 0;
  padding: 40px 56px 64px;
}
article,
.page-foot {
  max-width: 720px;
  margin: 0 auto;
}
.toc {
  position: sticky;
  top: var(--header);
  height: calc(100vh - var(--header));
  overflow-y: auto;
  padding: 40px 24px 48px 0;
  font-size: 13px;
}
.toc-title {
  margin: 0 0 8px;
  font-weight: 500;
}
.toc a {
  display: block;
  padding: 4px 0;
  color: var(--muted);
  text-decoration: none;
}
.toc a:hover,
.toc a[aria-current] {
  color: var(--foreground);
}
.toc-3 a {
  padding-left: 12px;
}

/* ---- The page ---- */
.crumbs {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 14px;
  font-weight: 500;
}
h1 {
  margin: 0;
  font-size: 32px;
  line-height: 1.25;
  font-weight: 500;
  letter-spacing: -0.02em;
}
.lead {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.55;
}
.page-tools {
  display: flex;
  gap: 8px;
  margin: 20px 0 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}
.tool {
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 10px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--background);
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  text-decoration: none;
  cursor: pointer;
}
.tool:hover {
  color: var(--foreground);
  border-color: var(--faint);
}
.prose {
  font-size: 16px;
  line-height: 1.7;
}
.prose > :first-child {
  margin-top: 0;
}
.prose h2 {
  margin: 48px 0 12px;
  font-size: 22px;
  line-height: 1.3;
  font-weight: 500;
  letter-spacing: -0.01em;
}
.prose h3 {
  margin: 32px 0 8px;
  font-size: 18px;
  line-height: 1.4;
  font-weight: 500;
}
.prose .anchor {
  color: inherit;
  text-decoration: none;
}
.anchor:hover::after {
  content: " #";
  color: var(--faint);
}
.prose p,
.prose ul,
.prose ol {
  margin: 0 0 16px;
}
.prose ul,
.prose ol {
  padding-left: 24px;
}
.prose li {
  margin: 4px 0;
}
.prose a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--accent) 35%, transparent);
  text-underline-offset: 3px;
}
.prose a:hover {
  text-decoration-color: var(--accent);
}
.prose strong {
  font-weight: 500;
}
.ui {
  font-weight: 500;
  white-space: nowrap;
}
code {
  font: 0.875em var(--mono);
  background: var(--chrome);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 4px;
}
figure {
  margin: 24px 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-large);
  overflow: hidden;
  background: var(--soft);
}
figure img {
  display: block;
  width: 100%;
}

/* Callouts */
.callout {
  margin: 24px 0;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-left: 3px solid var(--note);
  border-radius: var(--radius);
  background: var(--note-subtle);
  font-size: 15px;
}
.callout-tip {
  border-left-color: var(--tip);
  background: var(--tip-subtle);
}
.callout-warning {
  border-left-color: var(--warning);
  background: var(--warning-subtle);
}
.callout-title {
  margin: 0 0 4px !important;
  font-weight: 500;
  font-size: 14px;
}
.callout > :last-child {
  margin-bottom: 0;
}

/* Steps: an ordered list drawn as a numbered line down the page. */
.steps ol {
  list-style: none;
  counter-reset: step;
  padding-left: 0;
  margin: 24px 0;
}
.steps li {
  position: relative;
  counter-increment: step;
  margin: 0;
  padding: 0 0 20px 44px;
}
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--chrome);
  border: 1px solid var(--border-strong);
  font-size: 13px;
  font-weight: 500;
}
.steps li::after {
  content: "";
  position: absolute;
  left: 14px;
  top: 32px;
  bottom: 4px;
  width: 1px;
  background: var(--border-strong);
}
.steps li:last-child::after {
  display: none;
}

/* Cards */
.cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 24px 0 32px;
}
.prose .card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-large);
  color: var(--foreground);
  text-decoration: none;
  transition:
    border-color 0.15s,
    background 0.15s;
}
.prose .card:hover {
  border-color: var(--border-strong);
  background: var(--soft);
}
.card-title {
  font-weight: 500;
}
.card-text {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

/* Tables */
.table {
  overflow-x: auto;
  margin: 24px 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  line-height: 1.5;
}
th,
td {
  padding: 8px 12px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--border);
}
th {
  background: var(--soft);
  font-weight: 500;
}
tr:last-child td {
  border-bottom: 0;
}

/* Foot of the page */
.page-foot {
  margin-top: 56px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}
.updated {
  margin: 0 0 24px;
  color: var(--faint);
  font-size: 13px;
}
.pager {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.pager a {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-large);
  text-decoration: none;
  font-weight: 500;
}
.pager a:hover {
  border-color: var(--border-strong);
}
.pager span {
  color: var(--faint);
  font-size: 13px;
  font-weight: 400;
}
.pager-next {
  text-align: right;
}
.missing {
  max-width: 560px;
  margin: 80px auto;
  text-align: center;
}

/* ---- Search ---- */
.search {
  width: min(640px, calc(100vw - 32px));
  max-height: min(560px, calc(100vh - 96px));
  margin: 72px auto auto;
  padding: 0;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-large);
  background: var(--background);
  color: var(--foreground);
  box-shadow: 0 16px 48px rgb(0 0 0 / 16%);
  overflow: hidden;
}
.search[open] {
  display: flex;
  flex-direction: column;
}
.search::backdrop {
  background: rgb(0 0 0 / 24%);
}
.search-box {
  display: flex;
  gap: 8px;
  padding: 12px;
  border-bottom: 1px solid var(--border);
}
.search-box input {
  flex: 1;
  min-width: 0;
  height: 36px;
  padding: 0 8px;
  border: 0;
  outline: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 16px;
}
.search-box input::-webkit-search-cancel-button {
  display: none;
}
.search-close {
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--background);
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  padding: 0 10px;
  cursor: pointer;
}
.search-results {
  list-style: none;
  margin: 0;
  padding: 8px;
  overflow-y: auto;
}
.search-results a {
  display: block;
  padding: 8px 12px;
  border-radius: var(--radius);
  text-decoration: none;
}
.search-results a:hover,
.search-results [aria-selected="true"] a {
  background: var(--chrome);
}
.result-title {
  display: block;
  font-weight: 500;
}
.result-path,
.result-text {
  display: block;
  color: var(--muted);
  font-size: 13px;
}
.result-text mark {
  background: var(--accent-subtle);
  color: var(--foreground);
  border-radius: 2px;
}
.search-empty {
  padding: 16px 12px;
  color: var(--muted);
}

/* ---- Narrow screens ---- */
@media (max-width: 1200px) {
  .shell {
    grid-template-columns: var(--sidebar) minmax(0, 1fr);
  }
  .toc {
    display: none;
  }
}
@media (max-width: 860px) {
  .top {
    padding: 0 16px;
    gap: 12px;
  }
  .search-open {
    margin-left: auto;
    width: 32px;
    padding: 0;
    justify-content: center;
  }
  .search-open span,
  .search-open kbd,
  .top-end .button {
    display: none;
  }
  .top-end {
    margin-left: 0;
  }
  .shell {
    display: block;
  }
  .nav-button {
    display: flex;
    align-items: center;
    height: 44px;
    padding: 0 16px;
    border-bottom: 1px solid var(--border);
    color: var(--muted);
    font-size: 14px;
    cursor: pointer;
  }
  .nav-button::after {
    content: "";
    margin-left: auto;
    width: 6px;
    height: 6px;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: rotate(45deg);
  }
  .sidebar {
    display: none;
    position: static;
    height: auto;
    padding: 8px 16px 16px;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }
  .nav-toggle:checked ~ .sidebar {
    display: block;
  }
  main {
    padding: 24px 16px 48px;
  }
  h1 {
    font-size: 26px;
  }
  .lead {
    font-size: 16px;
  }
  .cards {
    grid-template-columns: minmax(0, 1fr);
  }
  .ui {
    white-space: normal;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}
