/* Fonts and shared design tokens */
@font-face {
  font-family: Montserrat;
  src: url('./montserrat-regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: Montserrat;
  src: url('./montserrat-semibold.ttf') format('truetype');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
:root {
  color-scheme: dark;
  --background: #212121;
  --text: #f2f0eb;
  --muted: #b2afaa;
  --accent: #dfa59a;
  --line: #363636;
  --header-height: 76px;
  --sidebar-width: 228px;
  --content-width: 1680px;
  --mono: ui-monospace, SFMono-Regular, Consolas, monospace;
}
* {
  box-sizing: border-box;
}
html {
  scroll-padding-top: 112px;
}
body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font-family: Montserrat, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}
a {
  color: inherit;
  text-underline-offset: 5px;
}
a:hover {
  color: var(--accent);
}
button {
  font: inherit;
  cursor: pointer;
}
button,
a {
  -webkit-tap-highlight-color: transparent;
}
a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 5px;
}
h1:focus,
h2:focus,
#main:focus {
  outline: none;
}
::selection {
  background: var(--accent);
  color: var(--background);
}
h1,
h2,
h3,
p,
figure {
  margin: 0;
}
/* Top navigation and language switcher */
.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  height: var(--header-height);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  column-gap: 24px;
  padding: 0 30px;
  background: #202020;
  border-bottom: 1px solid var(--line);
}
.header-brand {
  grid-column: 1;
  grid-row: 1;
  display: flex;
  align-items: center;
  gap: 20px;
}
.home-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  text-decoration: none;
}
.home-logo img {
  display: block;
  width: 54px;
  height: 54px;
}
.header-links {
  grid-column: 2;
  grid-row: 1;
  justify-self: center;
  display: flex;
  align-items: center;
  gap: clamp(20px, 3vw, 40px);
  font-size: clamp(17px, 1.6vw, 20px);
  font-weight: 600;
  white-space: nowrap;
}
.header-links a,
.header-actions > a {
  text-decoration: none;
  color: var(--muted);
}
.header-links a:hover,
.header-actions > a:hover {
  color: var(--text);
}
.header-links a[aria-current='page'] {
  color: var(--accent);
}
.header-actions {
  grid-column: 3;
  grid-row: 1;
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 14px;
}
.language-switcher {
  position: relative;
  font-size: 13px;
  line-height: 1.4;
}
.language-switcher summary {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 40px;
  cursor: pointer;
  list-style: none;
  color: var(--text);
  font-weight: 600;
  padding: 7px 3px;
}
.language-switcher summary::-webkit-details-marker {
  display: none;
}
.language-switcher summary::after {
  content: '';
  width: 6px;
  height: 6px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
}
.language-switcher[open] summary::after {
  transform: translateY(2px) rotate(225deg);
}
.language-switcher ul {
  position: absolute;
  right: 0;
  top: 100%;
  min-width: 150px;
  list-style: none;
  margin: 6px 0 0;
  padding: 6px;
  background: #292929;
  border: 1px solid #45413f;
  border-radius: 8px;
  box-shadow: 0 12px 30px #0005;
}
.language-switcher a {
  display: block;
  padding: 10px 13px;
  border-radius: 4px;
  text-decoration: none;
  color: var(--muted);
  white-space: nowrap;
}
.language-switcher a:hover {
  background: #34302e;
  color: var(--text);
}
.language-switcher a[aria-current] {
  color: var(--accent);
  background: #302a28;
}
.section-menu-toggle {
  display: none;
}
body > main > .content,
/* Page layout and generated Markdown navigation */
#main {
  width: 100%;
  min-width: 0;
}
body > main > .sidebar-toggle,
.sidebar:not(.page-sidebar) {
  display: none;
}
.page-layout {
  /* Match both gutters so the article stays centered in the full viewport. */
  padding: 0 max(calc(var(--sidebar-width) + 28px), calc((100% - var(--content-width)) / 2));
  min-width: 0;
}
.page-layout:has(.document-directory):not(:has(.documentation-tree)) {
  padding-inline: 26px;
}
.page-layout .page-sidebar[hidden],
.site-header .section-menu-toggle[hidden] {
  display: none;
}
.page-sidebar {
  position: fixed;
  left: 0;
  top: var(--header-height);
  bottom: 0;
  width: var(--sidebar-width);
  border: 0;
  background: var(--background);
  overflow: auto;
  z-index: 20;
}
.sidebar-inner {
  padding: 48px 16px 40px 25px;
}
#section-links ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
#section-links li {
  margin: 0 0 12px;
}
#section-links a {
  display: block;
  color: #a6a3a0;
  font-size: 18px;
  font-weight: 600;
  text-decoration: none;
  line-height: 1.45;
  padding: 10px 0;
}
#section-links a:hover {
  color: var(--text);
}
#section-links a[aria-current] {
  color: var(--accent);
}
#section-links.chapter-links li {
  padding-left: calc(var(--chapter-depth, 0) * 14px);
}
#section-links.chapter-links .subchapter a {
  font-size: 15px;
  font-weight: 400;
  padding-top: 4px;
  padding-bottom: 4px;
}
.page-layout:has(.documentation-tree) .sidebar-inner { padding-top: 28px; }
#section-links .documentation-tree li { margin: 0; padding: 0; }
#section-links .documentation-tree summary {
  display: flex;
  align-items: flex-start;
  list-style: none;
  cursor: pointer;
}
.documentation-tree summary::-webkit-details-marker { display: none; }
.documentation-tree summary::before {
  content: '';
  flex: 0 0 6px;
  width: 6px;
  height: 6px;
  margin: 19px 10px 0 1px;
  border-right: 1px solid var(--muted);
  border-bottom: 1px solid var(--muted);
  transform: rotate(-45deg);
}
.documentation-tree details[open] > summary::before { transform: rotate(45deg); }
#section-links :is(.documentation-guide, .chapter-icon-link) {
  display: flex;
  flex: 1;
  align-items: flex-start;
  min-width: 0;
  gap: 8px;
  padding: 9px 0;
  font-size: 18px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
:is(.documentation-guide, .chapter-icon-link) img { flex: 0 0 20px; margin-top: 3px; }
#section-links .documentation-branch > ul { padding: 6px 0 16px 17px; }
#section-links .documentation-branch:has(.documentation-subbranch) > ul { padding-left: 42px; }
#section-links .documentation-branch ul ul { padding-left: 24px; }
@media (min-width: 1101px) {
  .page-sidebar:has(.documentation-subbranch) { width: calc(var(--sidebar-width) + 16px); }
}
#section-links :is(.documentation-chapter-link, .documentation-subguide) {
  padding: 6px 0;
  font-size: 18px;
  line-height: 1.5;
  font-weight: 400;
  overflow-wrap: anywhere;
}
.documentation-branch ul summary::before { margin: 16px 8px 0 1px; flex-basis: 5px; width: 5px; height: 5px; }
.documentation-tree summary > a { min-width: 0; }
/* Homepage hero and content sections */
.sections-root {
  max-width: var(--content-width);
  margin: 0 auto;
  min-width: 0;
}
.section-copy,
.markdown-body {
  min-width: 0;
}
.page-section {
  padding: 36px 0;
  scroll-margin-top: 8px;
}
.page-section h1,
.page-section h2 {
  scroll-margin-top: var(--section-anchor-offset, 56px);
}
.page-section .section-copy {
  max-width: 780px;
}
.section-hero {
  --hero-top-space: 72px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 72px;
  padding: var(--hero-top-space) 0 64px;
  text-align: center;
}
.section-hero .section-copy {
  width: 100%;
  max-width: 960px;
  container-type: inline-size;
}
.section-hero h1 {
  scroll-margin-top: calc(var(--section-anchor-offset, 56px) + var(--hero-top-space));
  font-size: clamp(36px, 3.7vw, 52px);
  font-weight: 400;
  letter-spacing: -1.6px;
  line-height: 1.15;
  max-width: 960px;
  margin: 0 auto;
  text-wrap: balance;
}
.section-hero h1 strong {
  display: block;
  margin-top: 10px;
  color: var(--accent);
  font-size: 0.85em;
  font-weight: 400;
}
.section-copy .eyebrow {
  color: var(--accent);
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 16px;
  line-height: 1.5;
}
.hero-art {
  width: 100%;
  max-width: 1300px;
  min-width: 0;
  margin: 0 auto;
}
.hero-art > img,
.hero-art > svg {
  display: block;
  width: 100%;
  height: auto;
}
.section-hero .section-copy p:not(.eyebrow) {
  max-width: 650px;
  margin: 22px auto 0;
  line-height: 1.85;
  font-size: 17px;
}
.section-copy .hero-highlights {
  display: grid;
  grid-template-columns: repeat(var(--highlight-columns), minmax(0, 1fr));
  justify-content: center;
  gap: 18px 30px;
  margin: 48px 0 0;
  padding: 0;
  list-style: none;
}
.hero-highlights li {
  display: flex;
  align-items: center;
  justify-self: center;
  gap: 10px;
  color: #c8c7c3;
  font-size: 16px;
  line-height: 1.5;
}
.hero-highlights img {
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
}
@container (max-width: 820px) {
  .section-copy .hero-highlights {
    grid-template-columns: repeat(var(--highlight-compact-columns), max-content);
    gap: 20px 28px;
  }
}
@container (max-width: 480px) {
  .section-copy .hero-highlights {
    grid-template-columns: repeat(var(--highlight-compact-columns), minmax(0, 1fr));
    gap: 22px 16px;
  }
  .hero-highlights li {
    flex-direction: column;
    gap: 8px;
    font-size: 15px;
    text-align: center;
  }
}
.page-section h2 {
  font-weight: 600;
  font-size: 27px;
  line-height: 1.4;
  letter-spacing: -0.6px;
  margin-bottom: 19px;
}
.page-section h3 {
  font-size: 20px;
  font-weight: 600;
  margin: 24px 0 12px;
}
.section-copy p {
  color: var(--muted);
  font-size: 17px;
  line-height: 1.85;
  margin: 20px 0 0;
}
.section-copy strong {
  color: var(--text);
  font-weight: 600;
}
.section-copy .anchor,
.document-page .anchor {
  text-decoration: none;
  color: inherit;
}
.section-copy a:not(.anchor) {
  color: #d0c6bd;
}
.section-copy a:not(.anchor):hover {
  color: var(--accent);
}
.section-copy ul,
.section-copy ol {
  color: var(--muted);
  padding-left: 24px;
}
.section-copy img,
.document-page img {
  max-width: 100%;
  height: auto;
}
.section-copy blockquote {
  margin: 20px 0;
  padding-left: 20px;
  border-left: 2px solid var(--accent);
}
.section-hero:has(+ .feature-more) {
  padding-bottom: 16px;
}

.feature-more {
  margin: 0 0 64px;
  text-align: center;
}
.feature-more a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 6px 12px;
  color: var(--muted);
  font-size: 15px;
  text-decoration: none;
}
.feature-more a:hover {
  color: var(--accent);
}
.section-art {
  width: 100%;
  max-width: 400px;
  min-width: 0;
  align-self: start;
  justify-self: center;
}
.section-art > svg,
.section-art > img {
  display: block;
  width: 100%;
  height: auto;
}
.detail-section {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(36px, 4vw, 64px);
  align-items: center;
  border-top: 1px solid var(--line);
  padding: 64px 0 80px;
}
.detail-section .section-copy {
  max-width: 560px;
}
.detail-section h2 {
  font-size: clamp(30px, 2.8vw, 38px);
  line-height: 1.2;
  letter-spacing: -1px;
  margin-bottom: 32px;
}
.detail-section .section-copy p {
  font-size: 17px;
  line-height: 1.85;
  margin-top: 20px;
}
.detail-section .section-copy ul {
  margin: 0;
  font-size: 16px;
  line-height: 1.85;
}
.detail-section .section-copy p + ul {
  margin-top: 24px;
}
.detail-section .section-copy li + li {
  margin-top: 16px;
}
.detail-section .section-copy blockquote {
  margin: 32px 0 0;
  padding-left: 18px;
  border-color: var(--accent);
}
.detail-section .section-copy blockquote p {
  margin: 0;
  font-size: 16px;
}
.detail-section .section-copy blockquote p + p {
  margin-top: 8px;
}
.detail-section .section-copy blockquote strong {
  color: var(--accent);
}
.detail-section .section-art {
  max-width: 680px;
  align-self: center;
}
.detail-section.art-first {
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
}
.detail-section.art-first .section-copy {
  grid-column: 2;
  grid-row: 1;
}
.detail-section.art-first .section-art {
  grid-column: 1;
  grid-row: 1;
}
/* Illustrated Markdown subchapters form one continuous, responsive diagram story. */
.section-diagram-story.detail-section {
  display: block;
  border-top: 0;
  padding: 72px 0 96px;
  container-type: inline-size;
}
.section-diagram-story .section-copy {
  max-width: 1120px;
  margin-inline: auto;
}
.section-diagram-story .markdown-body > h2 {
  margin: 0 0 52px;
  font-size: 28px;
  font-weight: 400;
  text-align: center;
  color: var(--muted);
  letter-spacing: -.6px;
}
.diagram-step {
  display: grid;
  grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr);
  align-items: center;
  gap: clamp(32px, 4vw, 72px);
  padding-block: 20px;
}
.diagram-step + .diagram-step { margin-top: 32px; }
.diagram-copy { min-width: 0; }
.section-diagram-story .diagram-copy h3 {
  margin: 0;
  font-size: clamp(28px, 2.4vw, 36px);
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: -.8px;
  text-wrap: balance;
}
.diagram-step:nth-child(3n + 1) h3 { color: #a9d0eb; }
.diagram-step:nth-child(3n + 2) h3 { color: var(--accent); }
.diagram-step:nth-child(3n) h3 { color: #c5dca5; }
.section-diagram-story .diagram-copy p {
  margin: 18px 0 0;
  font-size: 18px;
  line-height: 1.75;
  max-width: 480px;
}
.diagram-art {
  width: 100%;
  max-width: 420px;
  min-width: 0;
  justify-self: center;
  margin: 0;
}
.diagram-art > :is(svg, img) { display: block; width: 100%; height: auto; }
.diagram-examples {
  grid-column: 1 / -1;
  width: 100%;
  max-width: 800px;
  min-width: 0;
  justify-self: center;
  text-align: left;
}
.section-diagram-story .diagram-examples p {
  margin: 12px 0 0;
  font-size: 15px;
  line-height: 1.7;
}
.section-diagram-story .markdown-body > .feature-more { margin: 48px auto 0; text-align: center; }
@container (max-width: 740px) {
  .diagram-step { grid-template-columns: 1fr; gap: 28px; text-align: center; }
  .section-diagram-story .diagram-copy p { margin-inline: auto; }
  .diagram-step + .diagram-step { margin-top: 48px; }
  .section-diagram-story .diagram-copy h3 { font-size: clamp(27px, 4.4vw, 34px); }
}
.section-cards {
  display: block;
  container-type: inline-size;
}
.section-diagram-story + .section-cards { border-top: 0; }
.section-cards.detail-section .section-copy {
  max-width: none;
}
.section-cards h2 {
  text-align: center;
}
.section-cards .section-copy .feature-more {
  margin: 40px auto 0;
  font-size: 15px;
}
.section-cards .section-footer { text-align: center; }
.section-copy .feature-more a { color: var(--muted); }
.section-copy .feature-more a:hover { color: var(--accent); }
.section-cards .markdown-body > p {
  max-width: 680px;
  margin: 24px auto 0;
  text-align: center;
}
/* Homepage option cards */
.section-options {
  display: grid;
  grid-template-columns: repeat(var(--option-columns, 3), minmax(0, 1fr));
  column-gap: clamp(32px, 4vw, 72px);
  row-gap: 64px;
  margin-top: 64px;
}
.section-option {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.section-option h3 {
  font-size: 21px;
  line-height: 1.4;
  margin: 0 0 16px;
}
.section-cards .section-copy .section-option p {
  font-size: 17px;
  line-height: 1.9;
  margin: 0 0 24px;
  max-width: 480px;
}
.section-cards .section-copy .section-option ul {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  list-style: none;
  padding: 0;
  margin: auto 0 0;
}
.section-cards .section-copy .section-option li {
  margin: 0;
}
.section-option a:not(.anchor) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 9px 16px;
  border: 1px solid #4a4947;
  border-radius: 7px;
  background: #282827;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.5;
  white-space: nowrap;
  text-decoration: none;
}
.section-option:first-child li:first-child a {
  border-color: #8a6b63;
  background: #302b29;
}
.section-option a:not(.anchor):hover {
  border-color: var(--accent);
  background: #302b29;
  color: var(--accent);
}

.section-icon-cards .section-option {
  align-items: center;
  text-align: center;
}
.section-icon-cards .section-option > img {
  display: block;
  width: 72px;
  height: 72px;
  margin-bottom: 24px;
}
.section-icon-cards .section-option h3 {
  display: grid;
  align-content: center;
  min-height: 2.8em;
  color: #dedbd5;
  font-weight: 400;
  letter-spacing: -.4px;
  text-wrap: balance;
  overflow-wrap: anywhere;
}
.section-icon-cards .section-copy .section-option p {
  max-width: 320px;
  margin-bottom: 0;
  font-size: 16px;
  line-height: 1.8;
}
@container (max-width: 760px) {
  .section-options { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@container (max-width: 480px) {
  .section-options { grid-template-columns: 1fr; }
}

.section-copy .section-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px;
  list-style: none;
  padding: 0;
  margin: 24px 0 0;
}
.section-actions li {
  margin: 0;
}
.section-copy .section-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 9px 18px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.6;
  text-decoration: none;
}
.section-copy .section-actions li:first-child a {
  color: var(--background);
  background: var(--accent);
  border-color: var(--accent);
}
.section-copy .section-actions a:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.section-copy .section-actions li:first-child a:hover {
  color: var(--background);
  background: #efbaaf;
}
.detail-section.section-callout {
  display: block;
}
.section-callout {
  text-align: center;
}
.section-callout .section-copy {
  max-width: none;
}
.section-callout .markdown-body > p {
  max-width: 650px;
  margin-left: auto;
  margin-right: auto;
}
.section-footer {
  margin-top: 64px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.page-section .section-footer p {
  color: var(--muted);
  font-size: 12px;
}

.markdown-body,
/* Markdown documents, directories, catalogs, and lessons */
.document-page {
  overflow-wrap: anywhere;
}
.document-page {
  max-width: 900px;
  min-width: 0;
  margin: 0 auto;
  padding: 60px 0 100px;
}
.document-page h1 {
  font-size: 32px;
  line-height: 1.4;
  margin: 25px 0;
}
.document-page h2 {
  font-size: 24px;
  line-height: 1.5;
  margin: 45px 0 18px;
}
.document-page h2 img {
  width: 48px;
  height: 48px;
  margin-right: 14px;
  vertical-align: middle;
}
.document-page h3 {
  font-size: 20px;
  margin: 30px 0 15px;
}
.document-page :is(h1, h2, h3, h4, h5, h6) {
  scroll-margin-top: 16px;
}
.document-page p {
  margin: 16px 0;
  color: var(--muted);
}
.document-page table {
  display: block;
  overflow: auto;
  max-width: 100%;
}
.document-page th,
.document-page td {
  padding: 8px 14px;
  border-bottom: 1px solid var(--line);
}
.document-page.document-catalog {
  max-width: 1120px;
  padding: 64px 0 80px;
  container-type: inline-size;
}
.document-catalog.document-page > h1 {
  max-width: 800px;
  margin: 0 auto;
  font-size: clamp(32px, 3.6vw, 46px);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -1.7px;
  text-align: center;
}
.document-catalog > p {
  max-width: 660px;
  margin: 24px auto 0;
  font-size: 18px;
  line-height: 1.8;
  text-align: center;
}
.document-lead-art { margin: 48px 0 16px; }
.document-lead-art .document-art { max-width: 900px; }
/* An italic Markdown paragraph after the illustration becomes its small caption. */
.document-lead-art + p:has(> em:only-child) {
  max-width: 660px;
  margin: 20px auto 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.7;
  text-align: center;
}
.document-lead-art + p > em:only-child { font-style: normal; }
.document-chapter {
  margin: 0;
  padding: 56px 0 64px;
}
.document-chapter:first-of-type { margin-top: 56px; }
.document-chapter > h2 {
  margin: 0 0 12px;
  color: var(--text);
  font-size: clamp(28px, 2.7vw, 34px);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -.8px;
  scroll-margin-top: 64px;
}
.document-illustration {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  align-items: center;
  gap: 32px 48px;
}
.document-illustration > h2 {
  grid-column: 1 / -1;
  margin: 0;
}
.document-illustration-copy { min-width: 0; }
.document-illustration-copy p,
.document-illustration-copy ul {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.85;
}
.document-illustration-copy ul { padding-left: 22px; }
.document-illustration-copy li + li { margin-top: 16px; }
.document-illustration-copy blockquote {
  margin: 28px 0 0;
  padding-left: 18px;
  border-left: 2px solid var(--accent);
}
.document-illustration-copy blockquote p { margin: 8px 0 0; }
.document-illustration-copy blockquote strong { color: var(--accent); }
.document-art {
  width: 100%;
  min-width: 0;
  max-width: 600px;
  margin: 0 auto;
}
.document-art > :is(img, svg) { display: block; width: 100%; height: auto; }
.document-illustration-wide {
  grid-template-columns: 1fr;
}
.document-illustration-wide .document-art { max-width: 1000px; }
@container (max-width: 760px) {
  .document-chapter { padding: 40px 0 48px; }
  .document-illustration { grid-template-columns: 1fr; gap: 32px; }
  .document-art { max-width: 520px; }
}
.document-page.document-guide {
  max-width: 1120px;
  padding: 64px 0 80px;
  container-type: inline-size;
  counter-reset: lesson;
}
.document-page.document-guide > h1 {
  margin: 0;
  font-size: clamp(36px, 4vw, 52px);
  font-weight: 600;
  letter-spacing: -1.5px;
  text-align: left;
}
.document-guide > p {
  max-width: 640px;
  margin: 18px 0 0;
  font-size: 20px;
  text-align: left;
}
.document-guide > .document-chapter,
.document-guide-group { counter-increment: lesson; }
.document-guide > .document-chapter > h2::before,
.document-guide-group > h2::before {
  content: counter(lesson, decimal-leading-zero);
  margin-right: 16px;
  color: var(--accent);
  font-size: 16px;
  letter-spacing: 0;
  vertical-align: middle;
}
.document-guide-group { margin-top: 80px; }
.document-guide-group > h2 {
  margin: 0;
  font-size: clamp(32px, 3.2vw, 40px);
  line-height: 1.25;
  font-weight: 600;
  letter-spacing: -1px;
}
.document-guide-group > p { max-width: 760px; font-size: 18px; line-height: 1.8; }
.document-guide-group .document-chapter { padding: 48px 0 64px; }
.document-guide-group .document-chapter:first-of-type { margin-top: 0; }
.document-guide-group .document-chapter > h3 {
  grid-column: 1 / -1;
  margin: 0;
  font-size: clamp(25px, 2.6vw, 30px);
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -.6px;
  scroll-margin-top: 48px;
}
.document-guide .document-text > h3 { margin-bottom: 24px; }
.document-guide .document-illustration-copy h4 {
  margin: 40px 0 16px;
  font-size: 22px;
  font-weight: 600;
  line-height: 1.4;
}
.document-guide .document-text .document-illustration-copy { max-width: 760px; }
.document-guide :is(.document-illustration, .document-code-lesson) {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 28px 56px;
  align-items: center;
}
.document-guide .document-illustration-wide { grid-template-columns: 1fr; }
.document-guide .document-code-lesson > h3 { margin: 0; }
.document-guide .document-illustration-copy :is(p, ul) { font-size: 17px; line-height: 1.8; }
.document-guide .document-illustration-copy > :first-child { margin-top: 0; }
.document-guide .document-illustration-copy > :last-child { margin-bottom: 0; }
.document-guide .document-illustration-copy > p:last-child:has(a) { font-size: 15px; }
.document-guide .document-art { max-width: 560px; container-type: inline-size; }
.document-guide .document-art:has(.learn-objects) { max-width: 420px; }
.document-guide .document-lesson-example { min-width: 0; }
.document-lesson-details { grid-column: 1 / -1; min-width: 0; }
.document-guide pre,
.diagram-examples pre {
  margin: 24px 0;
  padding: 44px 22px 22px;
  font-size: 14px;
}
.document-guide .document-lesson-example pre { margin: 0; }
.document-guide details,
.diagram-examples details { margin: 0; }
.document-lesson-details > details + details { margin-top: 18px; }
.document-guide summary,
.diagram-examples summary {
  display: flex;
  align-items: baseline;
  gap: 12px;
  width: fit-content;
  color: var(--accent);
  font-size: 15px;
  line-height: 1.6;
  cursor: pointer;
  list-style: none;
}
:is(.document-guide, .diagram-examples) summary::-webkit-details-marker { display: none; }
:is(.document-guide, .diagram-examples) summary::before { content: "+"; font-size: 20px; }
:is(.document-guide, .diagram-examples) details[open] > summary::before { content: "−"; }
:is(.document-guide, .diagram-examples) summary:hover { color: var(--text); }
@container (max-width: 760px) {
  .document-guide :is(.document-illustration, .document-code-lesson) { grid-template-columns: 1fr; gap: 28px; }
  .document-guide :is(.document-art, .document-illustration-copy, .document-lesson-example) {
    grid-column: 1;
    grid-row: auto;
  }
}
.catalog-section > p {
  max-width: 660px;
  margin: 0 0 24px;
  font-size: 16px;
}
.catalog-section a {
  text-decoration-color: #6c5b56;
}
.catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: 32px 40px;
}
.catalog-feature {
  min-width: 0;
  padding: 26px 0 12px;
  border-top: 1px solid var(--line);
}
.catalog-feature > img {
  display: block;
  width: 64px;
  height: 64px;
  margin-bottom: 22px;
}
.catalog-feature :is(h3, h4) {
  margin: 0 0 12px;
  scroll-margin-top: calc(var(--header-height) + 110px);
  color: #dedbd5;
  font-size: 21px;
  font-weight: 600;
  line-height: 1.45;
  letter-spacing: -.4px;
}
.catalog-feature p {
  margin: 0;
  font-size: 16px;
  line-height: 1.8;
}
.catalog-feature p + p {
  margin-top: 12px;
}
.section-feature-catalog {
  display: block;
  container-type: inline-size;
}
.detail-section.section-feature-catalog .section-copy { max-width: none; }
.homepage-catalog > h2,
.section-feature-catalog .section-footer { text-align: center; }
.homepage-catalog { max-width: 1120px; margin: 0 auto; }
.homepage-catalog > h2 { max-width: 960px; margin: 0 auto; }
.homepage-catalog > p {
  max-width: 660px;
  margin: 24px auto 0;
  font-size: 18px;
  line-height: 1.8;
  text-align: center;
}
.homepage-catalog .document-chapter { margin: 0; padding: 56px 0 64px; }
.homepage-catalog .document-chapter > h3 {
  margin: 0 0 12px;
  color: var(--text);
  font-size: clamp(28px, 2.7vw, 34px);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -.8px;
  scroll-margin-top: 64px;
}
.homepage-catalog .document-illustration > h3 {
  grid-column: 1 / -1;
  margin: 0;
}
.homepage-catalog .document-illustration-copy :is(p, ul) {
  margin: 16px 0;
  font-size: 16px;
  line-height: 1.85;
}
.homepage-catalog .document-illustration-copy blockquote { margin: 28px 0 0; }
.homepage-catalog .document-illustration-copy blockquote p { margin: 8px 0 0; }
.homepage-catalog .catalog-section > p {
  margin: 0 0 24px;
  font-size: 16px;
}
.homepage-catalog .catalog-feature p {
  margin: 0;
  font-size: 16px;
  line-height: 1.8;
}
.page-layout:has(.document-catalog) .sidebar-inner {
  padding-top: 28px;
}
.page-layout:has(.document-catalog) #section-links li {
  margin-bottom: 2px;
}
.document-directory {
  max-width: 820px;
  padding: 48px 0 72px;
}
.document-directory h1 {
  font-size: clamp(30px, 3vw, 38px);
  line-height: 1.25;
  letter-spacing: -1px;
  margin: 0 0 12px;
}
.document-directory > p {
  margin: 0 0 32px;
}
.directory-list {
  border-top: 1px solid var(--line);
}
.directory-list > div {
  border-bottom: 1px solid var(--line);
}
.directory-row {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 24px;
  align-items: center;
  gap: 24px;
  min-height: 106px;
  padding: 22px 16px;
  border-radius: 8px;
  color: var(--text);
  text-decoration: none;
  transition: background-color .16s ease;
}
.directory-link:hover,
.directory-link:focus-visible {
  background: #2a2725;
  color: var(--text);
}
.directory-row > img {
  display: block;
  width: 48px;
  height: 48px;
}
.directory-copy {
  min-width: 0;
}
.document-directory .directory-copy h2 {
  margin: 0 0 5px;
  font-size: 21px;
  font-weight: 600;
  line-height: 1.35;
}
.document-directory .directory-copy p {
  margin: 0;
  font-size: 15px;
  line-height: 1.7;
}
.directory-arrow {
  color: var(--accent);
  font-size: 24px;
  line-height: 1;
}
.directory-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  list-style: none;
  padding: 0;
  margin: 12px 0 0;
  line-height: 1.65;
}
.directory-actions a {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  color: var(--accent);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}
.directory-actions a:hover {
  color: var(--text);
  text-decoration: underline;
}
.document-setup {
  max-width: 820px;
  padding: 48px 0 72px;
}
.document-setup h1 {
  font-size: clamp(28px, 3vw, 34px);
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: -.9px;
  margin: 0 0 40px;
}
.setup-section {
  padding: 20px 0 44px;
}
.document-setup .setup-section > h2 {
  margin: 0 0 20px;
  font-size: 24px;
  font-weight: 400;
  line-height: 1.4;
}
.setup-copy {
  font-size: 16px;
}
.document-setup .setup-copy p {
  margin: 16px 0 0;
}
.document-setup .setup-copy p a {
  color: var(--accent);
  text-decoration: none;
}
.setup-copy a:hover { text-decoration: underline; }
.setup-copy pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  margin: 0 0 16px;
  padding: 18px 72px 18px 18px;
  border: 1px solid #3d3935;
  border-radius: 7px;
  background: #1c1c1c;
  color: #e3ded6;
  font-size: 15px;
  line-height: 1.9;
}
.setup-copy pre code { font-size: inherit; }
.setup-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  list-style: none;
  padding: 0;
  margin: 0 0 20px;
}
.document-setup .setup-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 16px;
  border: 1px solid #53465e;
  border-radius: 7px;
  background: #2c2732;
  color: #cfb5ee;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}
.setup-actions a:hover {
  border-color: #cfb5ee;
  background: #362d3d;
  text-decoration: none;
}
@media (max-width: 760px) {
  .document-directory {
    padding-top: 40px;
  }
  .directory-row {
    grid-template-columns: 40px minmax(0, 1fr) 20px;
    gap: 16px;
    padding: 20px 4px;
  }
  .directory-row > img {
    width: 40px;
    height: 40px;
  }
  .document-directory .directory-copy h2 {
    font-size: 19px;
  }
  .document-directory .directory-copy p {
    font-size: 14px;
  }
}
@media (max-width: 560px) {
  .document-setup { padding-top: 32px; }
  .document-setup .setup-section > h2 {
    font-size: 21px;
  }
  .setup-actions li { flex: 1 1 100px; }
  .document-setup .setup-actions a { width: 100%; }
}

code {
  font-family: var(--mono);
  font-size: 0.9em;
}
pre {
  position: relative;
  max-width: 100%;
  overflow: auto;
  background: #292929;
  border-radius: 5px;
  margin: 24px 0;
  padding: 24px 90px 24px 24px;
  font-size: 14px;
  line-height: 1.7;
}
/* Docsify's Prism tokens use the same palette in local and remote Markdown. */
pre code .token:is(.comment, .prolog, .doctype, .cdata) {
  color: #a4a09a;
}
pre code .token.punctuation {
  color: #c4beb6;
}
pre code .token:is(.property, .tag, .attr-name, .selector, .deleted) {
  color: #e5b5a4;
}
pre code .token:is(.string, .char, .attr-value, .builtin, .inserted) {
  color: #c1d4ab;
}
pre code .token:is(.number, .boolean, .constant) {
  color: #ecc28b;
}
pre code .token:is(.keyword, .atrule) {
  color: #cdb7e5;
}
pre code .token:is(.function, .class-name) {
  color: #b5d2df;
}
pre code .token:is(.operator, .entity, .url, .variable, .regex, .symbol) {
  color: #dfc9a4;
}
pre code .token.bold {
  font-weight: 600;
}
pre code .token.italic {
  font-style: italic;
}
.copy-button {
  position: absolute;
  right: 12px;
  top: 12px;
  background: none;
  color: var(--muted);
  border: 1px solid #555;
  border-radius: 3px;
  font-size: 13px;
  padding: 5px 9px;
}
.copy-button:hover {
  color: var(--text);
  border-color: var(--accent);
}
/* Accessibility and loading state */
.skip-link {
  position: fixed;
  z-index: 40;
  top: -100px;
  left: 15px;
  background: var(--accent);
  color: #212121;
  padding: 10px 18px;
}
.skip-link:focus {
  top: 12px;
}
.loading-message {
  padding: 80px 30px;
  max-width: 800px;
  margin: auto;
}
/* Viewport adaptations; the menu toggle controls drawer behavior */
@media (max-width: 1100px) {
  .detail-section {
    grid-template-columns: 1fr;
    gap: 52px;
    padding: 56px 0 72px;
  }
  .detail-section .section-copy {
    max-width: 650px;
  }
  .detail-section .section-art {
    max-width: 660px;
  }
  .detail-section.art-first {
    grid-template-columns: 1fr;
  }
  .detail-section.art-first .section-copy,
  .detail-section.art-first .section-art {
    grid-column: auto;
    grid-row: auto;
  }

  .section-art {
    max-width: 440px;
    margin: 0 auto;
  }
  .page-layout {
    padding: 0 26px;
  }
  .section-hero {
    --hero-top-space: 56px;
    gap: 48px;
    padding: var(--hero-top-space) 0 56px;
  }
  .section-hero h1 {
    font-size: clamp(40px, 5.5vw, 56px);
    letter-spacing: -1.4px;
  }
  .section-hero .section-copy p:not(.eyebrow) {
    font-size: 17px;
  }
  .section-menu-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    background: none;
    border: 0;
    padding: 12px 0;
    color: var(--muted);
    font-size: 13px;
  }
  .menu-indicator {
    font-size: 18px;
    line-height: 1;
  }
  .page-sidebar {
    display: none;
    position: fixed;
    top: var(--header-height);
    bottom: auto;
    left: 0;
    width: 100%;
    max-height: calc(100dvh - var(--header-height));
    border: 0;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 18px 35px #0004;
  }
  .page-sidebar.menu-open {
    display: block;
  }
  .sidebar-inner {
    padding: 22px 26px;
  }
  #section-links ul {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2px;
  }
  #section-links li {
    margin: 0;
  }
  #section-links a {
    font-size: 18px;
    padding: 11px 0;
  }
}
@media (max-width: 1000px) {
  :root {
    --header-height: 108px;
  }
  html {
    scroll-padding-top: 136px;
  }
  .site-header {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 64px 1fr;
    padding: 0 22px;
  }
  .header-brand {
    gap: 18px;
  }
  .home-logo img {
    width: 44px;
    height: 44px;
  }
  .header-links {
    grid-column: 1 / -1;
    grid-row: 2;
    align-self: start;
    max-width: 100%;
    gap: clamp(8px, 2vw, 28px);
    font-size: clamp(12px, 3.35vw, 17px);
  }
  .header-actions {
    grid-column: 2;
    gap: 14px;
  }
  .header-actions .source-link {
    display: none;
  }
}
@media (max-width: 760px) {
  .section-hero {
    --hero-top-space: 48px;
    padding: var(--hero-top-space) 0 48px;
  }
  .section-hero h1 {
    font-size: clamp(37px, 9.2vw, 56px);
    letter-spacing: -1.5px;
    max-width: 600px;
  }
  .section-copy .eyebrow {
    font-size: 16px;
    margin-bottom: 16px;
  }
  .section-hero .section-copy p:not(.eyebrow) {
    font-size: 16px;
    margin: 20px auto 0;
    max-width: 540px;
  }
  .hero-art {
    max-width: 100%;
  }
  .page-section {
    padding: 48px 0;
  }
  .page-section h2 {
    font-size: 24px;
  }
  .section-copy p {
    font-size: 17px;
  }
  .detail-section {
    gap: 44px;
    padding: 48px 0 64px;
  }
  .detail-section h2 {
    font-size: 32px;
  }
  .detail-section .section-copy p,
  .detail-section .section-copy ul {
    font-size: 17px;
  }
  .section-options {
    gap: 44px;
    margin-top: 44px;
  }

  .document-page {
    padding: 25px 0 60px;
  }
  .document-page h1 {
    font-size: 27px;
  }
}
@media (max-width: 420px) {
  .site-header {
    padding: 0 16px;
  }
  .header-brand {
    gap: 12px;
  }
  .header-actions {
    gap: 10px;
  }
}
@media (max-width: 360px) {
  .site-header {
    padding: 0 12px;
  }
  .header-brand {
    gap: 8px;
  }
  .header-actions {
    gap: 8px;
  }
  .language-switcher {
    font-size: 12px;
  }
}
@media (max-width: 375px) {
  .page-layout {
    padding: 0 22px;
  }
  .section-hero h1 {
    font-size: 35px;
  }
  .section-copy p {
    font-size: 16px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
