/* Standalone documents use the site's Onest font and light theme palette. */
@font-face {
  font-family: "Onest";
  src: url("/fonts/onest/Onest-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;
  --page: rgb(250 250 250);
  --surface: white;
  --heading: rgb(24 29 39);
  --text: rgb(65 70 81);
  --muted: rgb(83 88 98);
  --border: rgb(233 234 235);
  --brand: rgb(47 84 184);
  --brand-soft: rgb(239 244 255);
  --motion-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

html {
  scroll-behavior: smooth;
}

* {
  box-sizing: border-box;
  scrollbar-width: thin;
  scrollbar-color: transparent transparent;
}

/* Match the site's thin brand scrollbar, revealed on hover or during scroll. */
*::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
*::-webkit-scrollbar-track {
  background: transparent;
}
*::-webkit-scrollbar-thumb {
  background: color-mix(in srgb, rgb(89 130 235) 28%, transparent);
  backdrop-filter: blur(4px);
  border-radius: 9999px;
  border: 2px solid transparent;
  background-clip: content-box;
  opacity: 0;
  transition:
    opacity 0.3s ease,
    background-color 0.2s ease,
    box-shadow 0.2s ease;
}
*:hover::-webkit-scrollbar-thumb,
*:active::-webkit-scrollbar-thumb,
body.scrolling::-webkit-scrollbar-thumb {
  opacity: 1;
}
*::-webkit-scrollbar-thumb:hover {
  background: color-mix(in srgb, rgb(89 130 235) 58%, transparent);
  background-clip: content-box;
  box-shadow: 0 0 8px color-mix(in srgb, rgb(89 130 235) 35%, transparent);
}
*:hover,
*:active,
body.scrolling {
  scrollbar-color: color-mix(in srgb, rgb(89 130 235) 58%, transparent)
    transparent;
}
body {
  margin: 0;
  background: var(--page);
  color: var(--text);
  font-family: "Onest", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
.page-shell {
  max-width: 960px;
  margin: auto;
  padding: 32px 24px 64px;
}
.document-nav {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  grid-template-areas: "home brand language";
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 32px;
}
.brand {
  grid-area: brand;
  display: inline-flex;
  flex-shrink: 0;
}
.brand img {
  display: block;
  max-width: 100%;
  height: auto;
}
a {
  color: var(--brand);
  text-underline-offset: 4px;
}
a:hover {
  text-decoration: underline;
}
a:focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 5px;
  border-radius: 4px;
}
/* Match the site's Button secondary and flatPrimaryButton variants. */
.home-link,
.document-tabs a,
.language-switch a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 40px;
  padding: 9px 16px;
  border-radius: 12px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px rgb(213 215 218);
  color: var(--text);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: -0.01em;
  text-decoration: none;
  white-space: nowrap;
  transition:
    background-color 220ms ease,
    color 220ms ease,
    box-shadow 220ms ease,
    transform 180ms var(--motion-ease);
}
.home-link:active,
.document-tabs a:active {
  transform: scale(0.97);
}
.home-link:hover,
.document-tabs a:hover,
.language-switch a:hover {
  background: var(--border);
  color: var(--heading);
  text-decoration: none;
}
.home-link:focus-visible,
.document-tabs a:focus-visible,
.language-switch a:focus-visible {
  outline: 2px solid rgb(89 130 235);
  outline-offset: 2px;
  border-radius: 12px;
}
.home-link svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: rgb(113 118 128);
  transition: transform 220ms var(--motion-ease);
}
@media (hover: hover) {
  .home-link:hover svg {
    transform: translateX(-2px);
  }
}
.home-link {
  grid-area: home;
  width: 44px;
  min-height: 44px;
  padding: 0;
}
.home-label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.document-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: fit-content;
  max-width: 100%;
  gap: 8px;
  margin-bottom: 20px;
}
.document-tabs a {
  min-height: 44px;
  padding-inline: 24px;
  background: rgb(245 245 245);
  box-shadow: inset 0 0 0 1px rgb(213 215 218);
  transition:
    background-color 260ms ease,
    color 260ms ease,
    box-shadow 260ms ease,
    transform 180ms var(--motion-ease);
}
.document-tabs a[aria-current] {
  color: white;
  background: rgb(89 130 235);
  box-shadow: none;
}
.document-tabs a[aria-current]:hover {
  background: rgb(61 103 214);
  color: white;
}
.document-actions {
  display: contents;
}
.language-switch {
  grid-area: language;
  display: flex;
  gap: 0;
  border-radius: 12px;
  background: rgb(245 245 245);
}
.language-switch a {
  min-width: 44px;
  min-height: 44px;
  padding-inline: 12px;
  font-size: 14px;
  background: transparent;
  box-shadow: none;
  transition:
    background-color 260ms ease,
    color 260ms ease;
}
.language-switch a[aria-current] {
  background: var(--brand-soft);
  color: var(--brand);
  box-shadow: none;
}
.language-switch a[aria-current]:hover {
  background: rgb(224 233 255);
  color: var(--brand);
}
.language-switch a:first-of-type {
  border-radius: 12px 0 0 12px;
}
.language-switch a:last-of-type {
  border-radius: 0 12px 12px 0;
}
.wrap {
  animation: document-enter 750ms var(--motion-ease) backwards;
  padding: 48px 56px;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: var(--surface);
  overflow-wrap: anywhere;
}
header {
  margin-bottom: 32px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--border);
}
h1,
h2 {
  color: var(--heading);
  letter-spacing: -0.025em;
  line-height: 1.25;
}
h1 {
  margin: 0 0 12px;
  font-size: clamp(30px, 5vw, 40px);
  font-weight: 600;
}
h2 {
  margin: 36px 0 12px;
  font-size: 21px;
  font-weight: 600;
  scroll-margin-top: 24px;
}
.meta {
  font-size: 14px;
  color: var(--muted);
}
p {
  margin: 16px 0;
}
ul,
ol {
  padding-left: 24px;
}
li + li {
  margin-top: 8px;
}
.toc {
  background: var(--page);
  border-radius: 16px;
  padding: 24px;
  margin: 28px 0 36px;
}
.toc h2 {
  margin: 0 0 14px;
  font-size: 15px;
}
.toc ol {
  list-style: none;
  padding: 0;
  margin: 0;
}
.toc li {
  margin: 0;
}
.toc a {
  transition: color 220ms ease;
  display: block;
  padding: 6px 0;
  font-size: 15px;
  text-decoration: none;
  color: var(--muted);
}
.toc a:hover {
  color: var(--brand);
  text-decoration: underline;
}
table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: 14px;
}
th,
td {
  text-align: left;
  padding: 14px 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
th {
  background: var(--page);
  font-weight: 600;
  color: var(--heading);
}
td:first-child {
  width: 28%;
  font-weight: 500;
}
hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 40px 0 20px;
}
footer {
  font-size: 14px;
  color: var(--muted);
}

@keyframes document-enter {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .wrap,
  .home-link,
  .home-link svg,
  .document-tabs a,
  .language-switch a,
  .toc a {
    animation: none;
    transition: none;
    transform: none;
  }

  .home-link:active,
  .home-link:hover svg,
  .document-tabs a:active {
    transform: none;
  }
}
@media (max-width: 600px) {
  .page-shell {
    padding: 20px 16px 32px;
  }
  .document-nav {
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr) auto;
    grid-template-areas: "home brand language";
    gap: 8px;
    margin-bottom: 20px;
  }
  .brand {
    grid-area: brand;
  }
  .document-actions {
    display: contents;
  }
  .language-switch {
    grid-area: language;
    gap: 0;
    border-radius: 12px;
    background: rgb(245 245 245);
  }
  .language-switch a {
    min-width: 40px;
    min-height: 44px;
    padding-inline: 8px;
    background: transparent;
    box-shadow: none;
  }
  .language-switch a[aria-current] {
    background: var(--brand-soft);
  }
  .brand img {
    width: 128px;
  }
  .home-link {
    grid-area: home;
    width: 40px;
    min-height: 44px;
    padding: 0;
  }
  .home-label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
  .document-tabs {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 16px;
  }
  .document-tabs a {
    min-height: 44px;
    padding: 10px 12px;
    font-size: 14px;
    white-space: normal;
    text-align: center;
    overflow-wrap: anywhere;
    background: rgb(245 245 245);
    box-shadow: inset 0 0 0 1px rgb(213 215 218);
  }
  .wrap {
    padding: 28px 20px;
    border-radius: 20px;
  }
  .toc {
    padding: 20px;
  }
  h2 {
    font-size: 19px;
  }
  th,
  td {
    padding: 12px 8px;
  }
}
