@font-face {
  font-family: "Instrument Sans";
  src: url("fonts/instrument-sans.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}

:root {
  color-scheme: light;
  --paper: #f8f9fc;
  --surface: #fff;
  --ink: #171d2c;
  --muted: #525d70;
  --line: #dde2ec;
  --accent: #294bb7;
  --mono: ui-monospace, "SFMono-Regular", Consolas, monospace;
  --sans: "Instrument Sans", system-ui, sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 1rem/1.65 var(--sans); }
a { color: inherit; text-underline-offset: .2em; }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
h1, h2, h3 { line-height: 1.08; letter-spacing: -.045em; }
h1 { margin: 0 0 1.2rem; font-size: clamp(2.65rem, 5.6vw, 5rem); }
h2 { font-size: clamp(1.55rem, 2.5vw, 2.15rem); }
p { margin: 0 0 1rem; }
button { font: inherit; }
code { font-family: var(--mono); }
.shell { width: min(91rem, calc(100% - 4rem)); margin-inline: auto; }
.skip { position: fixed; top: .75rem; left: .75rem; z-index: 4; padding: .55rem .8rem; background: var(--surface); transform: translateY(-200%); }
.skip:focus { transform: none; }
#main:focus { outline: none; }

.header {
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.header-inner, .footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4.4rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  text-decoration: none;
  font-size: 1.9rem;
  font-weight: 700;
  letter-spacing: -.08em;
  line-height: 1;
}
.brand-mark {
  position: relative;
  display: inline-block;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: .7rem;
  color: #d6e3ff;
  background: #213564;
}
.brand-mark::before, .brand-mark::after, .brand-mark i, .brand-mark b { position: absolute; display: block; }
.brand-mark::before {
  content: "";
  inset: .53rem auto .55rem .55rem;
  width: .47rem;
  border: solid currentColor;
  border-width: 2px 0 2px 2px;
  border-radius: .25rem 0 0 .25rem;
}
.brand-mark::after {
  content: "";
  left: .9rem;
  top: .49rem;
  width: .23rem;
  height: .23rem;
  border-radius: 50%;
  background: currentColor;
}
.brand-mark i {
  left: .36rem;
  top: .96rem;
  width: .43rem;
  height: .43rem;
  border-radius: 50%;
  background: currentColor;
}
.brand-mark b {
  right: .43rem;
  bottom: .59rem;
  width: .72rem;
  height: .42rem;
  border: solid currentColor;
  border-width: 0 0 2px 2px;
  transform: rotate(-45deg);
}
.project-links { display: flex; gap: 1.35rem; }
.project-links a, .footer a { text-decoration: none; color: var(--muted); font-size: .91rem; font-weight: 650; }
.project-links a:hover, .footer a:hover { color: var(--accent); text-decoration: underline; }

.site-layout {
  display: grid;
  grid-template-columns: 13.25rem minmax(0, 1fr);
  gap: clamp(1.5rem, 3.5vw, 4.25rem);
  min-height: calc(100vh - 9rem);
}
.desktop-nav { border-right: 1px solid var(--line); padding: 2rem 1.1rem 2rem 0; }
.docs-nav { font-size: .92rem; }
.docs-nav ul { padding: 0; margin: 0; list-style: none; }
.docs-nav a {
  display: block;
  padding: .32rem .7rem;
  border: 1px solid transparent;
  border-radius: .48rem;
  color: var(--muted);
  font-weight: 550;
  text-decoration: none;
}
.docs-nav a:hover { background: #eceff6; color: var(--ink); }
.docs-nav a[aria-current] { background: #e9eefc; border-color: #d6e0fa; color: var(--accent); font-weight: 700; }
.docs-nav a:focus-visible { outline-offset: -2px; }
.nav-group { margin-top: 1.45rem; }
.nav-group p, .docs-nav .nav-heading {
  padding-inline: .75rem;
  margin-bottom: .25rem;
  color: var(--ink);
  font-size: .83rem;
  font-weight: 700;
}
.mobile-nav { display: none; }

.section-label {
  margin-bottom: .85rem;
  color: var(--accent);
  font: 600 .72rem/1.45 var(--mono);
  letter-spacing: .04em;
  text-transform: uppercase;
}
.lede { max-width: 39ch; color: var(--muted); font-size: clamp(1rem, 1.5vw, 1.16rem); }
.copy {
  padding: .16rem .5rem;
  border: 1px solid #7284ab;
  border-radius: .32rem;
  color: inherit;
  background: transparent;
  cursor: pointer;
}
.copy:hover { background: #2e3f65; }
.copy-feedback { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.collection { padding-block: 2rem 3.5rem; }
.collection > h2 { margin: 0 0 1.05rem; }
.section-index { max-width: 67rem; padding-top: 3rem; }
.section-index > h1 { font-size: clamp(2.3rem, 4vw, 3.75rem); }
.section-index > .prose { max-width: 48rem; margin-bottom: 2rem; }
.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .9rem; }
.card {
  position: relative;
  display: block;
  padding: 1.12rem 2.55rem 1.15rem 1.2rem;
  border: 1px solid var(--line);
  border-radius: .85rem;
  background: var(--surface);
  text-decoration: none;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.card:hover { transform: translateY(-2px); border-color: #a9b9e0; box-shadow: 0 .4rem 1.3rem #162c530e; }
.card strong { display: block; margin-bottom: .3rem; font-size: 1.15rem; letter-spacing: -.025em; }
.card p { margin: 0; color: var(--muted); font-size: .96rem; }
.card span { position: absolute; top: 1.1rem; right: 1.1rem; color: var(--accent); }

.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 48rem) minmax(9rem, 12rem);
  column-gap: clamp(1.5rem, 3.3vw, 3.5rem);
  row-gap: 1.5rem;
  align-items: start;
  padding-block: 3rem 4rem;
}
.article-layout.no-outline { grid-template-columns: minmax(0, 48rem); }
.article-header { grid-column: 1; grid-row: 1; border-bottom: 1px solid var(--line); padding-bottom: 1.3rem; }
.article-header h1 { margin-bottom: 0; font-size: clamp(2.3rem, 4vw, 3.75rem); }
.article-header .lede { max-width: 54ch; margin: .8rem 0 0; }
.article-layout .prose { grid-column: 1; grid-row: 2; }
.prose { min-width: 0; overflow-wrap: anywhere; }
.prose h2 { margin: 2.4rem 0 .85rem; }
.prose h3 { margin: 1.8rem 0 .7rem; font-size: 1.2rem; letter-spacing: -.025em; }
.prose :is(h2, h3) { scroll-margin-top: 1.25rem; }
.prose a { color: var(--accent); }
.prose a:hover { text-decoration-thickness: 2px; }
.prose li { margin-bottom: .4rem; }
.prose pre {
  margin: 0;
  padding: .9rem 1rem 1rem;
  overflow: auto;
  overflow-wrap: normal;
  font-size: .85rem;
  line-height: 1.6;
}
.prose pre:focus-visible { outline: 2px solid #a6befd; outline-offset: -3px; }
.code-sample {
  margin: 1.15rem 0 1.6rem;
  overflow: hidden;
  border: 1px solid #343746;
  border-radius: .75rem;
  background: #282a36;
  color: #e3e6f4;
}
.code-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  min-height: 2.5rem;
  padding: .35rem .75rem .35rem 1rem;
  border-bottom: 1px solid #424657;
  background: #252732;
  font: .76rem/1.4 var(--mono);
}
.code-toolbar .copy { border-color: #6c728a; }
.code-toolbar .copy:hover { background: #3b4053; }
.prose .workflow-download {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .35rem .7rem;
  border: 1px solid var(--line);
  border-radius: .45rem;
  background: var(--surface);
  font-size: .9rem;
  font-weight: 650;
  text-decoration: none;
}
.prose .workflow-download:hover { border-color: #a9b9e0; }
.prose :not(pre) > code { padding: .1em .3em; border-radius: .25rem; background: #e9edf7; overflow-wrap: anywhere; font-size: .88em; }
.prose table {
  width: 100%;
  margin: 1.2rem 0 1.6rem;
  border-collapse: collapse;
  background: var(--surface);
  font-size: .94rem;
  line-height: 1.5;
}
.prose :is(th, td) {
  padding: .65rem .8rem;
  border: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  overflow-wrap: anywhere;
}
.prose th { background: #e9edf7; }
.outline { grid-column: 2; grid-row: 1 / span 2; border-left: 1px solid var(--line); padding-left: 1rem; font-size: .88rem; }
.outline p { margin-bottom: .35rem; font-weight: 700; }
.outline ul { padding: 0; margin: 0; list-style: none; }
.outline ul ul { padding-left: .65rem; }
.outline a { display: inline-block; padding-block: .15rem; color: var(--muted); text-decoration: none; }
.outline a:hover { text-decoration: underline; }
.article-pagination { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 2.5rem; }
.article-pagination a { flex: 1 1 12rem; padding: .8rem 1rem; border: 1px solid var(--line); border-radius: .65rem; background: var(--surface); text-decoration: none; }
.article-pagination a:hover { border-color: #a9b9e0; }
.article-pagination span { display: block; color: var(--muted); font-size: .82rem; }
.footer { border-top: 1px solid var(--line); color: var(--muted); font-weight: 650; }

@media (min-width: 1081px) and (min-height: 720px) {
  .outline { position: sticky; top: 1.25rem; }
}
@media (max-width: 1080px) {
  .article-layout { grid-template-columns: minmax(0, 48rem); }
  .outline {
    grid-column: 1;
    grid-row: 2;
    padding: .8rem 1rem;
    border: 1px solid var(--line);
    border-radius: .65rem;
    background: var(--surface);
  }
  .article-layout:not(.no-outline) .prose { grid-row: 3; }
}
@media (max-width: 760px) {
  .shell { width: calc(100% - 2rem); }
  .header-inner, .footer { min-height: 3.65rem; }
  .site-layout { display: block; }
  .desktop-nav { display: none; }
  .mobile-nav { display: block; margin-top: .8rem; border: 1px solid var(--line); border-radius: .7rem; background: var(--surface); }
  .mobile-nav summary { padding: .55rem .85rem; cursor: pointer; font-weight: 650; }
  .mobile-nav .docs-nav { padding: 0 .55rem .55rem; }
  .mobile-nav .nav-group { margin-top: .65rem; }
  .article-layout { padding-block: 1.75rem 3rem; row-gap: 1.15rem; }
  .section-index { padding-top: 1.75rem; }
}
@media (max-width: 510px) {
  .prose table { font-size: .87rem; }
  .prose :is(th, td) { padding: .4rem .48rem; }
  .cards { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .card { transition: none; }
}
