/* Documentation pages. Shares tokens with site.css. */
body.docs {
  font-size: 16.5px;
}
.bar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 14px var(--margin);
  background: var(--bg);
}
.bar .wordmark {
  font-size: 17px;
}
.bar-links {
  display: flex;
  gap: 22px;
  margin-left: auto;
}
.bar-links a {
  color: var(--soft);
  text-decoration: none;
  font-size: 15px;
}
.bar-links a:hover {
  color: var(--ink);
}
.nav-toggle {
  display: none;
  margin-left: auto;
  min-height: 40px;
  padding: 0 14px;
  border: 0;
  border-radius: 6px;
  background: var(--bg-1);
  color: var(--ink);
  font: 600 15px var(--sans);
}
.search {
  position: relative;
}
.search input {
  width: 220px;
  min-height: 38px;
  padding: 0 12px;
  border: 0;
  border-radius: 6px;
  background: var(--bg-1);
  color: var(--ink);
  font: 400 15px var(--sans);
}
.search-results {
  position: absolute;
  right: 0;
  top: 44px;
  width: min(420px, 90vw);
  max-height: 60vh;
  overflow: auto;
  padding: 6px;
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 16px 40px rgb(0 0 0 / 0.45);
}
.search-results a {
  display: block;
  padding: 8px 10px;
  border-radius: 6px;
  text-decoration: none;
}
.search-results a:hover,
.search-results a:focus {
  background: var(--panel-2);
}
.search-results small {
  display: block;
  color: var(--soft);
}
.layout {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr) 220px;
  gap: 48px;
  max-width: 1440px;
  margin: 0 auto;
  padding: 24px var(--margin) 96px;
}
.sidebar {
  position: sticky;
  top: 76px;
  align-self: start;
  max-height: calc(100vh - 96px);
  overflow: auto;
}
.nav-group + .nav-group {
  margin-top: 24px;
}
.nav-title {
  margin: 0 0 6px;
  color: var(--soft);
  font-size: 14px;
  font-weight: 600;
}
.sidebar ul,
.toc ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.sidebar a {
  display: block;
  padding: 5px 10px;
  margin-left: -10px;
  border-radius: 6px;
  text-decoration: none;
  color: var(--ink);
  font-size: 15px;
}
.sidebar a:hover {
  background: var(--bg-1);
}
.sidebar a[aria-current="page"] {
  background: var(--bg-1);
  color: var(--cyan);
  font-weight: 600;
}
.version {
  margin-top: 28px;
  color: var(--soft);
  font-size: 14px;
}
.toc {
  position: sticky;
  top: 76px;
  align-self: start;
  font-size: 14px;
}
.toc a {
  display: block;
  padding: 4px 0;
  color: var(--soft);
  text-decoration: none;
}
.toc a:hover {
  color: var(--ink);
}

/* prose */
.prose {
  max-width: 78ch;
  min-width: 0;
}
.prose h1 {
  font-size: clamp(34px, 4vw, 52px);
  line-height: 1.05;
  letter-spacing: -0.035em;
  margin: 8px 0 28px;
}
.prose h2 {
  font-size: 28px;
  letter-spacing: -0.02em;
  margin: 56px 0 16px;
  scroll-margin-top: 80px;
}
.prose h3 {
  font-size: 21px;
  margin: 36px 0 12px;
  scroll-margin-top: 80px;
}
.prose h4 {
  font-size: 17px;
  margin: 28px 0 10px;
}
.prose .anchor {
  margin-left: 6px;
  color: var(--dim);
  text-decoration: none;
  opacity: 0;
  transition: opacity 160ms;
}
.prose h2:hover .anchor,
.prose h3:hover .anchor,
.prose .anchor:focus {
  opacity: 1;
}
.prose p,
.prose li {
  line-height: 1.65;
}
.prose a {
  color: var(--cyan);
  text-underline-offset: 3px;
}
.prose code {
  font: 0.9em var(--mono);
  padding: 0.1em 0.35em;
  border-radius: 4px;
  background: var(--bg-1);
}
.prose pre {
  margin: 20px 0;
  padding: 16px 18px;
  overflow: auto;
  border-radius: 8px;
  background: var(--bg-1);
  font: 13.5px / 1.6 var(--mono);
}
.prose pre code {
  padding: 0;
  background: none;
  font-size: inherit;
}
.prose pre.mermaid {
  background: var(--panel);
  text-align: center;
}
.prose blockquote {
  margin: 20px 0;
  padding: 2px 20px;
  border-radius: 8px;
  background: var(--bg-1);
  color: var(--soft);
}
.prose img {
  height: auto;
  margin: 8px auto;
}
.prose hr {
  height: 8px;
  border: 0;
  margin: 40px 0;
  background: var(--bg-1);
  border-radius: 4px;
}
.prose .table {
  overflow-x: auto;
  margin: 20px 0;
}
.prose table {
  border-collapse: collapse;
  width: 100%;
  font-size: 15px;
}
.prose th,
.prose td {
  padding: 9px 12px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}
.prose th {
  color: var(--soft);
  font-weight: 600;
}
.prose ul,
.prose ol {
  padding-left: 1.4em;
}
.edit {
  margin-top: 64px;
  font-size: 14px;
}
.edit a {
  color: var(--soft);
}

/* overview (docs/index.html) */
.docs-overview .prose {
  max-width: 980px;
}
.prose .lead {
  margin: -8px 0 36px;
  max-width: 64ch;
  color: var(--soft);
  font-size: var(--s-lead);
  line-height: 1.55;
}
.prose .lead code {
  color: var(--ink);
}
.prose .start-path {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 20px;
  padding: 0;
  list-style: none;
  counter-reset: none;
}
.start-path a {
  display: flex;
  flex-direction: column;
  gap: 8px;
  height: 100%;
  padding: 18px 18px 20px;
  border-radius: var(--radius);
  background: var(--bg-1);
  color: var(--ink);
  text-decoration: none;
  transition: background-color 160ms var(--ease);
}
.start-path a:hover {
  background: var(--panel);
}
.start-path .step {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--cyan);
  color: var(--on-field);
  font-weight: 700;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}
.start-path .step-title {
  font-weight: 600;
  font-size: 18px;
}
.start-path code {
  align-self: flex-start;
  max-width: 100%;
  overflow-wrap: anywhere;
  background: var(--bg);
  color: var(--cyan);
}
.start-path .step-desc {
  color: var(--soft);
  font-size: 15px;
  line-height: 1.5;
}
.start-path .step-desc code {
  color: var(--soft);
}
.whats-new {
  margin: 0 0 8px;
  padding: 16px 20px;
  border-radius: var(--radius);
  background: var(--bg-1);
  box-shadow: inset 3px 0 0 var(--pass);
}
.whats-new-title {
  margin: 0 0 6px;
  color: var(--pass);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.whats-new ul {
  margin: 0;
  padding-left: 1.2em;
}
.whats-new p {
  margin: 8px 0 0;
  font-size: 15px;
}
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 10px;
  margin: 0;
  padding: 0 !important;
  list-style: none;
}
.prose .card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  height: 100%;
  padding: 14px 16px 16px;
  border-radius: var(--radius);
  background: var(--bg-1);
  color: var(--ink);
  text-decoration: none;
  transition: background-color 160ms var(--ease);
}
.prose .card:hover {
  background: var(--panel);
}
.prose .card:hover .card-title {
  color: var(--cyan);
}
.card-title {
  font-weight: 600;
  font-size: 16.5px;
}
.card-desc {
  color: var(--soft);
  font-size: 15px;
  line-height: 1.5;
}
.card-meta {
  margin-top: auto;
  padding-top: 4px;
  color: var(--dim);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}
.overview-foot {
  margin-top: 56px;
  color: var(--soft);
  font-size: 15px;
}
@media (prefers-reduced-motion: reduce) {
  .start-path a,
  .prose .card {
    transition: none;
  }
}
@media (max-width: 820px) {
  .start-path {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 1180px) {
  .layout {
    grid-template-columns: 230px minmax(0, 1fr);
  }
  .toc {
    display: none;
  }
}
@media (max-width: 820px) {
  .bar {
    flex-wrap: wrap;
    gap: 12px;
  }
  .bar-links {
    display: none;
  }
  .nav-toggle {
    display: block;
  }
  .search {
    order: 3;
    width: 100%;
  }
  .search input {
    width: 100%;
  }
  .layout {
    grid-template-columns: minmax(0, 1fr);
    padding-top: 8px;
  }
  .sidebar {
    display: none;
    position: static;
    max-height: none;
  }
  .sidebar.open {
    display: block;
  }
}
