/* DevStride documentation site (I15467): the reading shell. Measured
   against the old Docus documentation site at 1440 px: a 4rem header, a
   90rem container with 1 / 1.5 / 2rem gutters, and from 1024 px a 13-column
   grid with 1.25rem gaps holding the navigation (3) and the page (10), the
   page itself a 13-column grid of article (10) and "On this page" (3). */

:root {
  color-scheme: light;
  --site-bg: #ffffff;
  --site-text: #404040;
  --site-heading: #171717;
  --site-muted: #737373;
  --site-border: #e5e5e5;
  --site-border-strong: #d4d4d4;
  --site-subtle: #fafafa;
  --site-elevated: #f5f5f5;
  --site-accent: #3b82f6;
  /* Text links: the brand link blue; the accent fails text contrast. */
  --site-link: #335dff;
  /* Callout boxes (I15471): one colour per type, for the bar and the tint. */
  --site-callout-info: #3b82f6;
  --site-callout-note: #737373;
  --site-callout-tip: #10b981;
  --site-callout-warning: #f59e0b;
  --site-callout-caution: #f97316;
  --site-callout-danger: #ef4444;
  --site-callout-success: #22c55e;
  --site-header-bg: rgba(255, 255, 255, 0.75);
  --site-backdrop: rgba(23, 23, 23, 0.4);
  --site-header-height: 4rem;
  --site-sans: ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto,
    sans-serif;
  --site-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
    'Liberation Mono', monospace;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    color-scheme: dark;
    --site-bg: #171717;
    --site-text: #e5e5e5;
    --site-heading: #ffffff;
    --site-muted: #a3a3a3;
    --site-border: #262626;
    --site-border-strong: #404040;
    --site-subtle: #262626;
    --site-elevated: #262626;
    --site-accent: #60a5fa;
    --site-link: #4db8ff;
    --site-callout-info: #60a5fa;
    --site-callout-note: #a3a3a3;
    --site-callout-tip: #34d399;
    --site-callout-warning: #fbbf24;
    --site-callout-caution: #fb923c;
    --site-callout-danger: #f87171;
    --site-callout-success: #4ade80;
    --site-header-bg: rgba(23, 23, 23, 0.75);
    --site-backdrop: rgba(0, 0, 0, 0.6);
  }
}

:root[data-theme='dark'] {
  color-scheme: dark;
  --site-bg: #171717;
  --site-text: #e5e5e5;
  --site-heading: #ffffff;
  --site-muted: #a3a3a3;
  --site-border: #262626;
  --site-border-strong: #404040;
  --site-subtle: #262626;
  --site-elevated: #262626;
  --site-accent: #60a5fa;
  --site-link: #4db8ff;
  --site-callout-info: #60a5fa;
  --site-callout-note: #a3a3a3;
  --site-callout-tip: #34d399;
  --site-callout-warning: #fbbf24;
  --site-callout-caution: #fb923c;
  --site-callout-danger: #f87171;
  --site-callout-success: #4ade80;
  --site-header-bg: rgba(23, 23, 23, 0.75);
  --site-backdrop: rgba(0, 0, 0, 0.6);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-padding-top: calc(var(--site-header-height) + 1rem);
}

body {
  margin: 0;
  background: var(--site-bg);
  color: var(--site-text);
  font: 16px/1.5 var(--site-sans);
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--site-link);
}

:focus-visible {
  outline: 1px solid var(--site-accent);
  outline-offset: 1px;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  z-index: 100;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  background: var(--site-bg);
  color: var(--site-link);
}

.skip-link:focus {
  top: 0.75rem;
}

.container {
  width: 100%;
  max-width: 90rem;
  margin: 0 auto;
  padding: 0 1rem;
}

@media (min-width: 640px) {
  .container {
    padding: 0 1.5rem;
  }
}

@media (min-width: 1024px) {
  .container {
    padding: 0 2rem;
  }
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--site-header-height);
  border-bottom: 1px solid var(--site-border);
  background: var(--site-header-bg);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  height: 100%;
}

.header-actions {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  gap: 0.25rem;
}

/* The brand side gives way first, so a long title ends in an ellipsis
   instead of pushing the buttons off a phone screen. */
.header-start {
  flex-shrink: 1;
  min-width: 0;
}

.site-brand {
  display: flex;
  align-items: center;
  gap: 1px;
  min-width: 0;
  color: var(--site-heading);
  text-decoration: none;
}

.site-mark {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}

.site-title {
  overflow: hidden;
  font-size: 28px;
  font-weight: 900;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* A phone shows the site's first word (I15670): "DevStride", never
   "DevStri…". The rest stays in the link's name for screen readers. */
@media (max-width: 639.98px) {
  .site-title {
    font-size: 22px;
  }
  .site-title-rest {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
}

/* The search box in the middle of a wide header (I15670); a narrow one
   keeps the icon. */
.search-trigger {
  display: none;
  align-items: center;
  gap: 0.5rem;
  width: min(28rem, 100%);
  height: 2.25rem;
  padding: 0 0.5rem 0 0.75rem;
  border: 1px solid var(--site-border);
  border-radius: 6px;
  background: var(--site-subtle);
  color: var(--site-muted);
  font: inherit;
  font-size: 14px;
  cursor: pointer;
}

.search-trigger:hover {
  border-color: var(--site-border-strong);
}

.search-trigger svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.search-trigger-text {
  flex: 1;
  text-align: left;
}

.search-trigger-keys {
  display: inline-flex;
  gap: 0.25rem;
}

.search-trigger kbd {
  min-width: 1.25rem;
  padding: 0 0.25rem;
  border: 1px solid var(--site-border-strong);
  border-radius: 4px;
  background: var(--site-bg);
  color: var(--site-muted);
  font-family: inherit;
  font-size: 12px;
  line-height: 18px;
  text-align: center;
}

.icon-button {
  display: none;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--site-heading);
  cursor: pointer;
}

.icon-button:hover {
  background: var(--site-elevated);
}

.icon-button svg {
  width: 20px;
  height: 20px;
}

/* Buttons that need script stay hidden without it. */
.js .theme-toggle,
.js .search-button,
.js .ask-ai-button {
  display: inline-flex;
}

.js .search-trigger {
  display: none;
}

@media (min-width: 1024px) {
  /* The outer columns are at least as wide as what they hold, so the site's
     name is never cut while the search box has room to give; a very long
     name still ends in an ellipsis at 24rem. */
  .header-row {
    display: grid;
    grid-template-columns:
      minmax(max-content, 1fr) minmax(0, 28rem) minmax(max-content, 1fr);
  }
  .site-title {
    max-width: 24rem;
  }
  .header-row > .header-actions:last-child {
    justify-self: end;
  }
  .js .search-trigger {
    display: inline-flex;
    justify-self: center;
  }
  .js .search-icon-button {
    display: none;
  }
}

.theme-icon-dark {
  display: none;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) .theme-icon-light {
    display: none;
  }
  :root:not([data-theme='light']) .theme-icon-dark {
    display: block;
  }
}

:root[data-theme='dark'] .theme-icon-light {
  display: none;
}

:root[data-theme='dark'] .theme-icon-dark {
  display: block;
}

/* Layout */

.layout {
  display: flex;
  flex-direction: column;
}

.page-grid {
  display: flex;
  flex-direction: column;
}

.article {
  min-width: 0;
  padding: 2rem 0 4rem;
}

@media (min-width: 1024px) {
  .layout {
    display: grid;
    grid-template-columns: repeat(13, minmax(0, 1fr));
    column-gap: 1.25rem;
  }
  .site-nav {
    grid-column: span 3;
  }
  .page-grid {
    display: grid;
    grid-column: span 10;
    grid-template-columns: repeat(13, minmax(0, 1fr));
    column-gap: 1.25rem;
  }
  .article {
    grid-column: span 10;
  }
  .page-grid > .article:only-child {
    grid-column: span 13;
  }
  .toc {
    grid-column: span 3;
  }
}

/* Navigation */

.site-nav {
  padding: 2rem 0 1rem;
  font-size: 14px;
  line-height: 20px;
}

.site-nav ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav ul ul {
  margin-left: 1.25rem;
  border-left: 1px solid var(--site-border);
}

.nav-link {
  position: relative;
  display: block;
  padding: 6px 10px;
  border-radius: 6px;
  color: var(--site-muted);
  text-decoration: none;
  overflow-wrap: anywhere;
}

.nav-link:hover {
  color: var(--site-heading);
}

/* Only the reader's branch is open (I15670): every link is muted, and the
   categories that hold the current page read darker. */
.nav-trail,
.site-nav > ul > li > .nav-group[open] > summary > .nav-category {
  color: var(--site-heading);
}

.nav-group > summary {
  display: flex;
  align-items: center;
  list-style: none;
}

.nav-group > summary::-webkit-details-marker {
  display: none;
}

.nav-group > summary > .nav-link {
  flex: 1;
  min-width: 0;
}

.nav-chevron {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 6px;
  color: var(--site-muted);
  cursor: pointer;
  transition: transform 0.15s ease;
}

.nav-chevron:hover {
  color: var(--site-heading);
}

.nav-chevron svg {
  width: 14px;
  height: 14px;
}

.nav-group[open] > summary > .nav-chevron {
  transform: rotate(90deg);
}

.nav-link[aria-current='page'] {
  color: var(--site-link);
  font-weight: 500;
}

/* The active-page bar sits on its level's guide line. */
.nav-link[aria-current='page']::before {
  content: '';
  position: absolute;
  top: 2px;
  bottom: 2px;
  left: -1px;
  width: 1px;
  background: var(--site-accent);
}

.site-nav > ul > li > .nav-link[aria-current='page']::before,
.site-nav
  > ul
  > li
  > .nav-group
  > summary
  > .nav-link[aria-current='page']::before {
  left: 0;
}

@media (min-width: 1024px) {
  .site-nav {
    position: sticky;
    top: var(--site-header-height);
    align-self: start;
    max-height: calc(100vh - var(--site-header-height));
    margin-left: -1rem;
    padding-left: 1rem;
    padding-right: 1rem;
    overflow-y: auto;
  }
  /* The link text lines up with the logo, as on the old Docus site. */
  .site-nav > ul {
    margin-left: -10px;
  }
}

/* Under the wide layout, with script, the navigation is a slide-over. */
@media (max-width: 1023.98px) {
  .js .menu-button {
    display: inline-flex;
  }
  .js .site-nav {
    position: fixed;
    top: var(--site-header-height);
    bottom: 0;
    left: 0;
    z-index: 40;
    width: min(20rem, 85vw);
    padding: 1rem;
    overflow-y: auto;
    border-right: 1px solid var(--site-border);
    background: var(--site-bg);
    transform: translateX(-100%);
    visibility: hidden;
    transition: transform 0.2s ease, visibility 0.2s;
  }
  .js.nav-open .site-nav {
    transform: translateX(0);
    visibility: visible;
  }
  .js.nav-open .nav-backdrop {
    position: fixed;
    inset: var(--site-header-height) 0 0;
    z-index: 30;
    display: block;
    background: var(--site-backdrop);
  }
  /* Without script, the tree is read above the page. */
  html:not(.js) .site-nav {
    border-bottom: 1px solid var(--site-border);
  }
}

.nav-backdrop {
  display: none;
}

@media (prefers-reduced-motion: reduce) {
  .js .site-nav,
  .nav-chevron,
  .toc-chevron {
    transition: none;
  }
}

/* Breadcrumbs */

.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin: 0 0 0.75rem;
  padding: 0;
  list-style: none;
  font-size: 14px;
  line-height: 20px;
}

.breadcrumbs li {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  color: var(--site-muted);
}

.breadcrumbs li + li::before {
  content: '\203A';
  color: var(--site-accent);
}

.breadcrumbs a {
  color: var(--site-muted);
  text-decoration: none;
}

.breadcrumbs a:hover {
  color: var(--site-heading);
}

/* One line (I15670): a wide screen shortens the middle crumbs, a phone
   shows only the category the page is in, as the old Docus site did. */
@media (min-width: 640px) {
  .breadcrumbs ol {
    flex-wrap: nowrap;
    overflow: hidden;
  }
  .breadcrumbs li {
    min-width: 0;
  }
  .breadcrumbs a {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

@media (max-width: 639.98px) {
  .breadcrumbs li:not(:last-child) {
    display: none;
  }
  .breadcrumbs li + li::before {
    content: none;
  }
  .breadcrumbs a {
    color: var(--site-link);
    font-weight: 600;
  }
}

/* "On this page" */

.toc-list,
.toc-list ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.toc-list {
  margin-left: 10px;
  padding-left: 1rem;
  border-left: 1px solid var(--site-border);
}

.toc-list ul {
  padding-left: 0.75rem;
}

.toc-list a {
  position: relative;
  display: block;
  padding: 4px 0;
  color: var(--site-muted);
  font-size: 14px;
  line-height: 20px;
  text-decoration: none;
}

.toc-list a:hover {
  color: var(--site-heading);
}

.toc-list a.is-active {
  color: var(--site-link);
}

.toc-list > li > a.is-active::before {
  content: '';
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: calc(-1rem - 1px);
  width: 1px;
  background: var(--site-accent);
}

.toc-title {
  margin: 0 0 0.5rem;
  color: var(--site-heading);
  font-size: 14px;
  font-weight: 400;
  line-height: 20px;
}

.toc {
  display: none;
}

.toc-mobile {
  margin: 0 0 1.5rem;
  border: 1px solid var(--site-border);
  border-radius: 6px;
}

.toc-mobile summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.625rem 0.75rem;
  list-style: none;
  color: var(--site-heading);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}

.toc-mobile summary::-webkit-details-marker {
  display: none;
}

.toc-chevron {
  display: inline-flex;
  color: var(--site-muted);
  transition: transform 0.15s ease;
}

.toc-chevron svg {
  width: 16px;
  height: 16px;
}

.toc-mobile[open] .toc-chevron {
  transform: rotate(90deg);
}

.toc-mobile .toc-list {
  margin: 0 0.75rem 0.75rem;
}

@media (min-width: 1024px) {
  .toc {
    position: sticky;
    top: var(--site-header-height);
    display: block;
    align-self: start;
    max-height: calc(100vh - var(--site-header-height));
    padding: 2rem 0 1rem;
    overflow-y: auto;
  }
  .toc-mobile {
    display: none;
  }
}

/* Article */

.article h1 {
  margin: 0;
  color: var(--site-heading);
  font-size: 30px;
  font-weight: 700;
  line-height: 36px;
  text-wrap: pretty;
}

@media (min-width: 640px) {
  .article h1 {
    font-size: 36px;
    line-height: 40px;
  }
}

.page-header {
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--site-border);
}

/* The page's one-sentence summary, under its title (I15471). */
.page-lede {
  margin: 1rem 0 0;
  color: var(--site-muted);
  font-size: 18px;
  line-height: 28px;
  text-wrap: pretty;
}

.prose {
  line-height: 28px;
  overflow-wrap: break-word;
}

.prose h2,
.prose h3,
.prose h4 {
  position: relative;
  color: var(--site-heading);
  font-weight: 700;
}

.prose h2 {
  margin: 3rem 0 1.5rem;
  font-size: 24px;
  line-height: 32px;
}

.prose h3 {
  margin: 2rem 0 1rem;
  font-size: 20px;
  line-height: 28px;
}

.prose h4 {
  margin: 1.5rem 0 0.75rem;
  font-size: 18px;
  line-height: 28px;
}

.prose > :first-child {
  margin-top: 0;
}

.anchor {
  margin-left: 0.5rem;
  color: var(--site-muted);
  font-weight: 400;
  text-decoration: none;
  opacity: 0;
}

.prose h2:hover .anchor,
.prose h3:hover .anchor,
.prose h4:hover .anchor,
.anchor:focus {
  opacity: 1;
}

.prose p,
.prose ul,
.prose ol,
.prose blockquote,
.prose pre,
.prose .table-wrap {
  margin: 1.25rem 0;
}

/* Links read as clean blue text, underlined on hover (I15670). */
.prose a {
  font-weight: 500;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.15s;
}

.prose a:hover {
  border-bottom-color: currentColor;
}

.prose a:focus-visible {
  text-decoration: underline;
}

.prose a.anchor,
.prose a.zoom {
  border: 0;
}

/* Light, evenly spaced lists (I15670). */
.prose ul,
.prose ol {
  padding-left: 1.5rem;
}

.prose li {
  margin: 0.375rem 0;
  padding-left: 0.375rem;
}

.prose li > p {
  margin: 0;
}

.prose li > ul,
.prose li > ol {
  margin: 0.375rem 0 0;
}

.prose li ul {
  list-style-type: disc;
}

.prose ol > li::marker {
  color: var(--site-muted);
}

.prose ul > li::marker {
  color: var(--site-border-strong);
}

.prose strong {
  color: var(--site-heading);
}

.prose blockquote {
  padding: 0.75rem 1rem;
  border-left: 4px solid var(--site-accent);
  border-radius: 6px;
  background: var(--site-subtle);
}

/* A callout box (I15471): a quote with a type. The bar takes the type's
   colour and the background a light tint of it over the page. Since I15670
   it reads like the old Docus site's alerts: the type's icon, a coloured
   title, compact text in the type's hue. */
.prose blockquote[data-callout] {
  position: relative;
  padding: 1rem 1rem 1rem 2.75rem;
  border-left-color: var(--callout);
  border-radius: 8px;
  background: color-mix(in srgb, var(--callout) 10%, var(--site-bg));
  color: color-mix(in srgb, var(--callout) 45%, var(--site-heading));
  font-size: 14px;
  line-height: 20px;
}

.prose blockquote[data-callout] p {
  margin: 0 0 0.5rem;
}

.prose blockquote[data-callout] strong {
  color: inherit;
}

.prose blockquote[data-callout] a {
  text-decoration: underline;
}

.prose blockquote[data-callout] > :last-child {
  margin-bottom: 0;
}

.prose .callout-title {
  margin: 0 0 0.25rem;
  font-size: 16px;
  font-weight: 600;
  line-height: 24px;
}

.callout-icon {
  position: absolute;
  top: 1rem;
  left: 1rem;
  width: 20px;
  height: 20px;
  color: var(--callout);
}

.prose blockquote[data-callout] .callout-title + * {
  margin-top: 0;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) .prose blockquote[data-callout] {
    background: color-mix(in srgb, var(--callout) 10%, #0a0a0a);
  }
}

:root[data-theme='dark'] .prose blockquote[data-callout] {
  background: color-mix(in srgb, var(--callout) 10%, #0a0a0a);
}

.prose blockquote[data-callout='info'] {
  --callout: var(--site-callout-info);
}

.prose blockquote[data-callout='note'] {
  --callout: var(--site-callout-note);
}

.prose blockquote[data-callout='tip'] {
  --callout: var(--site-callout-tip);
}

.prose blockquote[data-callout='warning'] {
  --callout: var(--site-callout-warning);
}

.prose blockquote[data-callout='caution'] {
  --callout: var(--site-callout-caution);
}

.prose blockquote[data-callout='danger'] {
  --callout: var(--site-callout-danger);
}

.prose blockquote[data-callout='success'] {
  --callout: var(--site-callout-success);
}

.prose blockquote > :first-child {
  margin-top: 0;
}

.prose blockquote > :last-child {
  margin-bottom: 0;
}

.prose code {
  padding: 2px 6px;
  border: 1px solid var(--site-border-strong);
  border-radius: 6px;
  background: var(--site-subtle);
  color: var(--site-heading);
  font-family: var(--site-mono);
  font-size: 0.875em;
  font-weight: 500;
}

.prose td code,
.prose th code {
  font-size: 12px;
  line-height: 20px;
}

/* Long lines wrap instead of scrolling sideways (I15670). */
.prose pre {
  padding: 0.75rem 1rem;
  overflow-x: auto;
  border: 1px solid var(--site-border);
  border-radius: 6px;
  background: var(--site-subtle);
  font-size: 14px;
  line-height: 22px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.prose pre code {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font-size: inherit;
  font-weight: 400;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--site-border);
  border-radius: 6px;
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  line-height: 20px;
}

.prose th,
.prose td {
  padding: 12px 16px;
  border: 1px solid var(--site-border);
  text-align: left;
  vertical-align: top;
}

.prose tr > :first-child {
  border-left: 0;
}

.prose tr > :last-child {
  border-right: 0;
}

/* Only the table's outer edge loses its line, so the header row keeps the
   rule under it (I15670). */
.prose table > :first-child > tr:first-child > * {
  border-top: 0;
}

.prose table > :last-child > tr:last-child > * {
  border-bottom: 0;
}

.prose th {
  color: var(--site-heading);
  font-weight: 600;
}

.prose thead th {
  background: var(--site-subtle);
}

.prose img,
.prose video {
  display: block;
  max-width: 100%;
  height: auto;
  border: 1px solid var(--site-border);
  border-radius: 6px;
}

.prose a.zoom {
  display: inline-block;
  max-width: 100%;
  cursor: zoom-in;
}

.prose hr {
  margin: 2rem 0;
  border: 0;
  border-top: 1px solid var(--site-border);
}

/* Previous and next */

.pager {
  display: grid;
  gap: 1rem;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--site-border);
}

@media (min-width: 640px) {
  .pager {
    grid-template-columns: 1fr 1fr;
  }
}

.pager-link {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.25rem;
  padding: 1.25rem 1.5rem;
  border: 1px solid var(--site-border);
  border-radius: 8px;
  text-decoration: none;
}

.pager-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  margin-bottom: 0.5rem;
  border: 1px solid var(--site-border);
  border-radius: 9999px;
  color: var(--site-heading);
}

.pager-icon svg {
  width: 16px;
  height: 16px;
}

.pager-link:hover .pager-icon {
  border-color: var(--site-accent);
  color: var(--site-link);
}

.pager-desc {
  display: -webkit-box;
  overflow: hidden;
  color: var(--site-muted);
  font-size: 14px;
  line-height: 20px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.pager-link:hover {
  border-color: var(--site-accent);
}

.pager-next {
  align-items: flex-end;
  text-align: right;
}

@media (min-width: 640px) {
  .pager-next {
    grid-column: 2;
  }
}

.pager-label {
  color: var(--site-muted);
  font-size: 14px;
}

.pager-title {
  color: var(--site-heading);
  font-weight: 600;
}

/* Listing pages */

.cards {
  display: grid;
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 640px) {
  .cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.card {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  height: 100%;
  padding: 1rem;
  border: 1px solid var(--site-border);
  border-radius: 8px;
  text-decoration: none;
}

.card:hover {
  border-color: var(--site-accent);
}

.card-title {
  color: var(--site-heading);
  font-weight: 600;
}

.card-preview {
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--site-muted);
  font-size: 14px;
  line-height: 20px;
}

/* Footer */

.site-footer {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--site-border);
  color: var(--site-muted);
  font-size: 14px;
}

/* The pager already draws the rule above the footer (I15670). */
.pager + .site-footer {
  margin-top: 1.5rem;
  padding-top: 0;
  border-top: 0;
}

/* Not-found page */

.not-found {
  padding-top: 4rem;
  padding-bottom: 4rem;
}

.not-found h1 {
  color: var(--site-heading);
  font-size: 36px;
  line-height: 40px;
}

/* Full-size images */

.lightbox {
  max-width: 96vw;
  max-height: 96vh;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: var(--site-bg);
  overflow: visible;
}

.lightbox::backdrop {
  background: rgba(0, 0, 0, 0.8);
}

.lightbox-image {
  display: block;
  max-width: 96vw;
  max-height: 96vh;
  border-radius: 8px;
}

.lightbox-close {
  position: absolute;
  top: -0.75rem;
  right: -0.75rem;
  width: 2rem;
  height: 2rem;
  border: 1px solid var(--site-border);
  border-radius: 999px;
  background: var(--site-bg);
  color: var(--site-heading);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

/* Search (I15468) */

.search {
  width: min(40rem, calc(100vw - 2rem));
  max-height: min(36rem, calc(100vh - 6rem));
  margin: 4rem auto auto;
  padding: 0;
  border: 1px solid var(--site-border);
  border-radius: 8px;
  background: var(--site-bg);
  color: var(--site-text);
  overflow: hidden;
}

.search[open] {
  display: flex;
  flex-direction: column;
}

.search::backdrop {
  background: var(--site-backdrop);
}

.search-box {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--site-border);
}

/* The input has no outline of its own (a form field shows focus by its
   border), so the line under it carries the focus. */
.search-box:focus-within {
  border-bottom-color: var(--site-accent);
}

.search-input {
  flex: 1;
  min-width: 0;
  padding: 0.25rem 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--site-heading);
  font: inherit;
  font-size: 16px;
}

.search-input::placeholder {
  color: var(--site-muted);
}

.search-close {
  padding: 0.125rem 0.375rem;
  border: 1px solid var(--site-border);
  border-radius: 4px;
  background: var(--site-subtle);
  color: var(--site-muted);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}

.search-status {
  margin: 0;
  padding: 0.5rem 1rem 0;
  color: var(--site-muted);
  font-size: 14px;
}

.search-status:empty {
  display: none;
}

.search-results {
  padding: 0.5rem;
  overflow-y: auto;
}

.search-results:empty {
  display: none;
}

.search-group + .search-group {
  margin-top: 0.5rem;
}

.search-group-title {
  padding: 0.25rem 0.5rem;
  color: var(--site-muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.search-result {
  display: block;
  padding: 0.5rem;
  border-radius: 6px;
  color: var(--site-text);
  text-decoration: none;
}

.search-result[aria-selected='true'] {
  background: var(--site-elevated);
}

.search-result-heading {
  display: block;
  color: var(--site-heading);
  font-weight: 600;
}

.search-result-excerpt {
  display: block;
  margin-top: 0.125rem;
  color: var(--site-muted);
  font-size: 14px;
  line-height: 20px;
}

.search-result mark {
  border-radius: 2px;
  background: rgba(59, 130, 246, 0.18);
  color: inherit;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) .search-result mark {
    background: rgba(96, 165, 250, 0.3);
  }
}

:root[data-theme='dark'] .search-result mark {
  background: rgba(96, 165, 250, 0.3);
}

/* Ask AI (I15479): a button ask-ai.js puts in the header only when answers
   are on, and its dialog. Colours come from the tokens above, so the dark
   appearance needs nothing of its own. */

.ask-ai-button {
  display: none;
  flex-shrink: 0;
  align-items: center;
  height: 2.25rem;
  padding: 0 0.75rem;
  border: 1px solid var(--site-border);
  border-radius: 6px;
  background: transparent;
  color: var(--site-heading);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}

.ask-ai-button:hover {
  background: var(--site-elevated);
}

.ask-ai-button {
  gap: 0.375rem;
}

.ask-ai-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: var(--site-link);
}

/* A phone shows only the sparkle; the button keeps its name (I15670). */
@media (max-width: 639.98px) {
  .ask-ai-button {
    padding: 0 0.5rem;
  }
  .ask-ai-button-text {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
}

.ask-ai {
  width: min(40rem, calc(100vw - 2rem));
  max-height: min(40rem, calc(100vh - 6rem));
  margin: 4rem auto auto;
  padding: 0;
  border: 1px solid var(--site-border);
  border-radius: 8px;
  background: var(--site-bg);
  color: var(--site-text);
  overflow: hidden;
}

.ask-ai[open] {
  display: flex;
  flex-direction: column;
}

.ask-ai::backdrop {
  background: var(--site-backdrop);
}

.ask-ai-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.75rem 1rem 0;
}

.ask-ai-title {
  margin: 0;
  color: var(--site-heading);
  font-size: 16px;
  font-weight: 600;
}

.ask-ai-close {
  padding: 0.125rem 0.375rem;
  border: 1px solid var(--site-border);
  border-radius: 4px;
  background: var(--site-subtle);
  color: var(--site-muted);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}

.ask-ai-box {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--site-border);
}

.ask-ai-label {
  color: var(--site-muted);
  font-size: 14px;
}

/* A form field shows focus by its border only, never an outline. */
.ask-ai-input {
  width: 100%;
  min-height: 4.5rem;
  padding: 0.5rem 0.625rem;
  border: 1px solid var(--site-border-strong);
  border-radius: 6px;
  outline: 0;
  background: var(--site-bg);
  color: var(--site-heading);
  font: inherit;
  font-size: 16px;
  resize: vertical;
}

.ask-ai-input:focus,
.ask-ai-input:focus-visible {
  border-color: var(--site-accent);
  outline: 0;
}

.ask-ai-input::placeholder {
  color: var(--site-muted);
}

.ask-ai-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.ask-ai-count {
  color: var(--site-muted);
  font-size: 12px;
}

.ask-ai-submit {
  padding: 0.375rem 0.875rem;
  border: 1px solid var(--site-border-strong);
  border-radius: 6px;
  background: var(--site-elevated);
  color: var(--site-heading);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.ask-ai-submit:disabled {
  opacity: 0.6;
  cursor: default;
}

.ask-ai-result {
  padding: 0.75rem 1rem;
  overflow-y: auto;
}

.ask-ai-result:empty {
  display: none;
}

.ask-ai-message,
.ask-ai-empty {
  margin: 0;
  color: var(--site-muted);
  font-size: 14px;
}

.ask-ai-paragraph {
  margin: 0 0 0.75rem;
  color: var(--site-text);
  white-space: pre-line;
}

.ask-ai-cite {
  font-size: 0.875em;
  text-decoration: none;
}

.ask-ai-sources-title {
  margin: 0.25rem 0 0.25rem;
  color: var(--site-muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.ask-ai-sources {
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 14px;
}

.ask-ai-source + .ask-ai-source {
  margin-top: 0.25rem;
}

.ask-ai-note {
  margin: 0.75rem 0 0;
  color: var(--site-muted);
  font-size: 12px;
}

.ask-ai-results {
  margin: 0.5rem 0 0;
  padding: 0;
  list-style: none;
}

.ask-ai-result-link {
  display: block;
  padding: 0.5rem;
  border-radius: 6px;
  color: var(--site-text);
  text-decoration: none;
}

.ask-ai-result-link:hover {
  background: var(--site-elevated);
}

.ask-ai-result-heading {
  display: block;
  color: var(--site-heading);
  font-weight: 600;
}

.ask-ai-result-excerpt {
  display: block;
  margin-top: 0.125rem;
  color: var(--site-muted);
  font-size: 14px;
  line-height: 20px;
}

@media print {
  .site-header,
  .site-nav,
  .toc,
  .toc-mobile,
  .pager,
  .anchor,
  .search,
  .ask-ai {
    display: none;
  }
  .article {
    padding: 0;
  }
}

/* Home (I15671): the front door of the documentation site — a navy hero with
   the headline, pitch, search box and "Start here", then a card per
   section. Poppins is the brand face, self-hosted (the security header
   allows fonts from this site only) and used only where the old site
   used it at a bold weight. */

@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/_shared/poppins-600.f4e80d9dfd.woff2') format('woff2');
}

@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/_shared/poppins-700.9338e65fc0.woff2') format('woff2');
}

.home {
  --home-font: 'Poppins', var(--site-sans);
  --home-navy: #060646;
  --home-blue-light: #4db8ff;
  --home-green: #00d68c;
  --home-eyebrow: #335dff;
  --home-band: #f9fafb;
}

:root[data-theme='dark'] .home {
  --home-eyebrow: #4db8ff;
  --home-band: #111111;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) .home {
    --home-eyebrow: #4db8ff;
    --home-band: #111111;
  }
}

/* The navigation is the phone's slide-over only: a wide screen has none. */
@media (min-width: 1024px) {
  .home .layout {
    display: none;
  }
}

.home-main {
  min-width: 0;
}

.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  justify-content: center;
  padding: 5rem 1.5rem 4rem;
  color: #ffffff;
  background: radial-gradient(
      68% 55% at 88% -15%,
      rgba(0, 153, 255, 0.14),
      transparent 60%
    ),
    radial-gradient(60% 50% at 4% 118%, rgba(0, 206, 132, 0.1), transparent 60%),
    radial-gradient(120% 130% at 50% 0%, #1a1a63 0%, #0b0b3d 46%, #060626 100%);
}

/* The dotted texture, drawn rather than loaded. */
.hero::before {
  position: absolute;
  inset: 0;
  z-index: -1;
  content: '';
  background-image: radial-gradient(
    rgba(255, 255, 255, 0.14) 1.2px,
    transparent 1.2px
  );
  background-size: 24px 24px;
  -webkit-mask-image: radial-gradient(
    120% 95% at 50% 0%,
    #000000 30%,
    transparent 85%
  );
  mask-image: radial-gradient(120% 95% at 50% 0%, #000000 30%, transparent 85%);
  pointer-events: none;
}

.hero-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 760px;
  text-align: center;
}

.hero-eyebrow {
  margin: 0 0 1rem;
  font-family: var(--home-font);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
}

.hero-title {
  margin: 0 0 1.125rem;
  font-family: var(--home-font);
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.03em;
  color: #ffffff;
}

.hero-highlight {
  background: linear-gradient(92deg, #39a9ff 0%, #00d68c 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

.hero-pitch {
  max-width: 52ch;
  margin: 0 auto 2rem;
  font-size: 1.1875rem;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.74);
}

/* Looks like a box, opens the search dialog; hidden without script. */
.hero-search {
  display: none;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  max-width: 560px;
  padding: 0.875rem 1rem 0.875rem 1.125rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.07);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.72);
  font: inherit;
  font-size: 1rem;
  text-align: left;
  cursor: text;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.js .hero-search {
  display: flex;
}

.hero-search:hover {
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.1);
}

.hero-search:focus-visible,
.hero-cta:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 3px;
}

.hero-search svg {
  flex-shrink: 0;
  width: 1.25rem;
  height: 1.25rem;
  color: var(--home-blue-light);
}

.hero-search-text {
  flex: 1;
}

.hero-search-keys {
  display: inline-flex;
  gap: 0.25rem;
}

.hero-search kbd {
  padding: 0.3rem 0.45rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.8);
  font-family: inherit;
  font-size: 0.75rem;
  line-height: 1;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.875rem;
  margin-top: 1.5rem;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1.5rem;
  border-radius: 10px;
  background: var(--home-green);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15), 0 8px 20px rgba(0, 214, 140, 0.24);
  color: var(--home-navy);
  font-family: var(--home-font);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.1s ease, background 0.15s ease;
}

.hero-cta:hover {
  background: #1ae49c;
  transform: translateY(-1px);
}

.hero-cta svg {
  width: 1rem;
  height: 1rem;
}

/* The root landing article's own words, between the hero and the cards. */
.home-body {
  max-width: 48rem;
  margin: 0 auto;
  padding: 3.5rem 1.5rem 1rem;
}

.modules {
  padding: 4.5rem 1.5rem;
  background: var(--home-band);
}

.modules-inner {
  max-width: 1180px;
  margin: 0 auto;
}

.section-eyebrow {
  margin: 0 0 2rem;
  font-family: var(--home-font);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-align: center;
  text-transform: uppercase;
  color: var(--home-eyebrow);
}

.modules-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.modules-grid > li {
  display: flex;
}

.module-card {
  --accent: #0099ff;
  --accent-text: #0077cc;
  position: relative;
  display: flex;
  flex: 1;
  flex-direction: column;
  overflow: hidden;
  padding: 1.5rem;
  border: 1px solid var(--site-border);
  border-radius: 16px;
  background: var(--site-bg);
  color: inherit;
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease,
    border-color 0.18s ease;
}

.module-card.tint-1 {
  --accent: #00d68c;
  --accent-text: #007a50;
}

.module-card.tint-2 {
  --accent: #ffbb00;
  --accent-text: #8a6300;
}

.module-card.tint-3 {
  --accent: #ff3355;
  --accent-text: #d81b3f;
}

:root[data-theme='dark'] .module-card {
  --accent-text: var(--accent);
  --chip-text: var(--site-muted);
  background: #1c1c1c;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) .module-card {
    --accent-text: var(--accent);
    --chip-text: var(--site-muted);
    background: #1c1c1c;
  }
}

/* An accent wash that fades in on hover. */
.module-card::before {
  position: absolute;
  inset: 0;
  content: '';
  background: radial-gradient(
    80% 60% at 0% 0%,
    color-mix(in srgb, var(--accent) 16%, transparent),
    transparent 70%
  );
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}

.module-card:hover {
  border-color: color-mix(in srgb, var(--accent) 55%, var(--site-border));
  box-shadow: 0 18px 40px -18px color-mix(in srgb, var(--accent) 45%, transparent);
  transform: translateY(-3px);
}

.module-card:hover::before {
  opacity: 1;
}

.module-card:focus-visible {
  outline: 2px solid var(--site-accent);
  outline-offset: 2px;
}

.module-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.module-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 12px;
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  color: var(--accent-text);
  font-family: var(--home-font);
  font-size: 1.125rem;
  font-weight: 700;
}

.module-count {
  padding: 0.25rem 0.6rem;
  border: 1px solid var(--site-border);
  border-radius: 999px;
  color: var(--site-muted);
  font-size: 0.75rem;
  font-weight: 500;
}

.module-title {
  margin: 0 0 0.5rem;
  font-family: var(--home-font);
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--site-heading);
}

.module-desc {
  margin: 0 0 1rem;
  color: var(--site-muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.module-topics {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  margin: 0 0 1.125rem;
  padding: 0;
  list-style: none;
}

.module-topics li {
  padding: 0.25rem 0.55rem;
  border-radius: 6px;
  background: var(--site-elevated);
  /* Body text in light mode reaches 4.5:1 on the chip; dark keeps muted. */
  color: var(--chip-text, var(--site-text));
  font-size: 0.75rem;
  font-weight: 500;
}

.module-more {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  margin-top: auto;
  color: var(--accent-text);
  font-size: 0.875rem;
  font-weight: 600;
}

.module-more svg {
  width: 1rem;
  height: 1rem;
  transition: transform 0.15s ease;
}

.module-card:hover .module-more svg {
  transform: translateX(3px);
}

.home-main .site-footer {
  padding: 2rem 0;
}

@media (max-width: 1023.98px) {
  .modules-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 767.98px) {
  .hero {
    padding: 3.5rem 1rem 3rem;
  }
  .hero-pitch {
    font-size: 1rem;
  }
  .hero-search-keys {
    display: none;
  }
}

@media (max-width: 639.98px) {
  .modules {
    padding: 3rem 1rem;
  }
  .modules-grid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-cta:hover,
  .module-card:hover,
  .module-card:hover .module-more svg {
    transform: none;
  }
}
