@font-face {
  font-family: Rubik;
  src: url("rubik.ttf") format("truetype");
  font-weight: 300 900;
  font-display: swap;
}

@font-face {
  font-family: "Space Grotesk";
  src: url("space-grotesk.ttf") format("truetype");
  font-weight: 300 700;
  font-display: swap;
}

:root {
  color-scheme: light;
  --paper: #f3f0e6;
  --rail: #ece9df;
  --surface: #fcfaf4;
  --ink: #202520;
  --muted: #525951;
  --subtle: #626860;
  --line: #d3d2c6;
  --accent: #422082;
  --accent-text: #422082;
  --accent-fill: #eae2f4;
  --accent-line: #c7b5df;
  --focus: #7446c1;
  --button-bg: #542a94;
  --button-text: #fff;
  --button-hover: #422082;
  --header: #191d1a;
  --header-text: #f4f2e9;
  --header-muted: #c5c7be;
  --header-line: #444a42;
  --header-accent: #c4a7ff;
  --grid-line: #4220820c;
  --header-size: 68px;
  --body-font: Rubik, system-ui, sans-serif;
  --display-font: Rubik, system-ui, sans-serif;
  --code-font: ui-monospace, SFMono-Regular, Consolas, monospace;
}

html[lang="en"] { --display-font: "Space Grotesk", Rubik, system-ui, sans-serif; }

html[data-theme="dark"] {
  color-scheme: dark;
  --paper: #191d1a;
  --rail: #1f231f;
  --surface: #242a24;
  --ink: #f4f2e9;
  --muted: #c1c8bd;
  --subtle: #aeb7aa;
  --line: #444b43;
  --accent: #caadff;
  --accent-text: #d9c5ff;
  --accent-fill: #392e4b;
  --accent-line: #625174;
  --focus: #c4a7ff;
  --button-bg: #c4a7ff;
  --button-text: #211337;
  --button-hover: #d7c1ff;
  --header: #141715;
  --grid-line: #c6a5ff14;
}

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

html { scroll-padding-top: calc(var(--header-size) + 22px); }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 15px/1.55 var(--body-font);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-underline-offset: .23em; }
button, input { font: inherit; }
button { cursor: pointer; }
button:not(:disabled), a { touch-action: manipulation; }
button[disabled] { cursor: default; }
button:focus-visible, a:focus-visible, input:focus-visible, summary:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}

[hidden] { display: none !important; }

.skip-link {
  position: fixed;
  z-index: 5;
  top: 10px;
  left: 10px;
  display: inline-block;
  padding: 9px 15px;
  border-radius: 6px;
  transform: translateY(-200%);
  background: var(--surface);
  color: var(--ink);
}

.skip-link:focus { transform: translateY(0); }

.site-header {
  position: sticky;
  z-index: 3;
  top: 0;
  border-bottom: 1px solid var(--header-line);
  background: var(--header);
  color: var(--header-text);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: 1620px;
  min-height: var(--header-size);
  margin-inline: auto;
  padding-inline: clamp(16px, 2.5vw, 40px);
}

.brand {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid #c4a7ff4d;
  border-radius: 8px;
  background: #422082;
  color: #e9dcff;
  font-weight: 650;
}

.brand-mark svg { width: 21px; height: 21px; }

.brand-name {
  font-family: "Space Grotesk", Rubik, sans-serif;
  font-size: 23px;
  font-weight: 650;
  letter-spacing: -.055em;
  line-height: 1;
}

.brand-label {
  opacity: .88;
  font-size: 13px;
  line-height: 1.25;
  white-space: nowrap;
}

.brand-label::before {
  margin-inline: 4px 10px;
  color: var(--header-muted);
  content: "/";
}

.header-tools {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: end;
  gap: 13px;
  min-width: 0;
}

.search-trigger, .icon-button, .mobile-menu {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 10px;
  border: 1px solid var(--header-line);
  border-radius: 7px;
  background: transparent;
  color: inherit;
}

.search-trigger {
  justify-content: flex-start;
  width: min(100%, 234px);
  padding-inline: 10px 8px;
  background: #ffffff08;
  color: var(--header-muted);
  font-size: 13px;
}

.search-trigger:hover, .icon-button:hover, .mobile-menu:hover { background: #ffffff14; color: var(--header-text); }

.search-trigger svg, .icon-button svg, .mobile-menu svg, .github-link svg {
  flex: none;
  width: 17px;
  height: 17px;
}

.search-trigger .shortcut {
  margin-left: auto;
  padding: 0 5px;
  border: 1px solid var(--header-line);
  border-radius: 4px;
  background: transparent;
  box-shadow: none;
  color: var(--header-muted);
  font: 500 11px/1.7 var(--code-font);
  white-space: nowrap;
}

.locale-switch {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--header-line);
  border-radius: 7px;
}

.locale-switch a, .locale-switch span {
  display: inline-grid;
  min-width: 31px;
  min-height: 27px;
  place-items: center;
  padding-inline: 4px;
  border-radius: 4px;
  color: var(--header-muted);
  font-size: 11px;
  font-weight: 650;
  line-height: 1;
  text-decoration: none;
}

.locale-switch [aria-current] {
  background: #c4a7ff1d;
  color: #e3d1ff;
}

.locale-switch a:hover { color: #fff; }

.icon-button, .mobile-menu { width: 38px; flex: 0 0 auto; padding: 0; }
.mobile-menu { display: none; }
html:not(.docs-js) :is(.search-trigger, .docs-color-mode) { display: none; }

.github-link {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 7px;
  padding: 7px 0 7px 2px;
  color: var(--header-text);
  font-size: 13px;
  white-space: nowrap;
  text-decoration: none;
}

.github-link:hover { color: var(--header-accent); }

.shell {
  display: grid;
  grid-template-columns: clamp(188px, 16vw, 244px) minmax(0, 1fr) clamp(132px, 13vw, 196px);
  max-width: 1620px;
  min-height: calc(100vh - var(--header-size));
  margin-inline: auto;
}

.side-nav {
  min-width: 0;
  border-right: 1px solid var(--line);
  background: var(--rail);
}

.side-inner {
  position: sticky;
  top: calc(var(--header-size) + 1px);
  max-height: calc(100vh - var(--header-size) - 1px);
  overflow-y: auto;
  padding: 32px 14px 26px clamp(15px, 2.3vw, 34px);
  scrollbar-width: thin;
}

.nav-caption, .page-toc > p, .page-toc > strong, .page-toc > h2 {
  margin: 0 9px 12px;
  color: var(--subtle);
  font-size: 11px;
  font-weight: 650;
  line-height: 1.45;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.docs-nav-list {
  display: grid;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.docs-nav-row {
  display: flex;
  align-items: stretch;
  gap: 2px;
  border: 1px solid transparent;
  border-radius: 6px;
}

.docs-nav-row > a {
  flex: 1 1 auto;
  min-width: 0;
  padding: 8px 9px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.34;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.docs-nav-row:hover { background: var(--surface); }
.docs-nav-row > a:hover { color: var(--ink); }
.docs-nav-row-active > a { color: var(--accent); font-weight: 600; }

.docs-nav-row:has(> [aria-current="page"]) {
  border-color: var(--accent-line);
  background: var(--accent-fill);
}

.docs-nav-toggle {
  display: none;
  flex: 0 0 2rem;
  min-height: 2rem;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--muted);
}

.docs-js .docs-nav-toggle { display: grid; }
.docs-nav-toggle:hover { background: var(--accent-fill); color: var(--accent); }

.docs-nav-toggle > span {
  width: .42rem;
  height: .42rem;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(-45deg);
}

.docs-nav-toggle[aria-expanded="true"] > span { transform: rotate(45deg); }

.docs-nav-children {
  margin: 2px 0 4px .65rem;
  padding-inline-start: .45rem;
  border-inline-start: 1px solid var(--line);
}

.docs-js [data-expanded="false"] > .docs-nav-children { display: none; }

.main-content {
  width: 100%;
  max-width: 1168px;
  min-width: 0;
  justify-self: center;
  padding: clamp(38px, 5.1vw, 77px) clamp(23px, 4.4vw, 68px) 0;
}

.page-toc {
  position: sticky;
  top: calc(var(--header-size) + 45px);
  align-self: start;
  max-height: calc(100vh - var(--header-size) - 60px);
  margin: 77px 18px 0 0;
  overflow-y: auto;
  padding-left: 15px;
  border-left: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.38;
}

.page-toc > p, .page-toc > strong, .page-toc > h2 { display: block; margin: 0 0 10px; }
.page-toc nav, .page-toc > ul { display: grid; gap: 9px; }
.page-toc ul { margin: 0; padding: 0; list-style: none; }
.page-toc a { display: block; margin-top: 9px; text-decoration: none; }
.page-toc a:hover { color: var(--accent); text-decoration: underline; }

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(0, .92fr);
  align-items: center;
  gap: clamp(22px, 3vw, 48px);
  margin-bottom: clamp(48px, 6vw, 84px);
}

.hero h1 {
  max-width: 12.5ch;
  margin: 0;
  padding-inline: 0;
  font-family: var(--display-font);
  font-size: clamp(40px, 4.25vw, 70px);
  font-weight: 650;
  line-height: 1.015;
  letter-spacing: -.062em;
  text-wrap: balance;
}

.hero h1 .accent, .accent { color: var(--accent); }
.hero h1 .accent { display: inline; }

.lede {
  max-width: 42ch;
  margin: 20px 0 0;
  color: var(--muted);
  font-size: clamp(15px, 1.25vw, 18px);
  line-height: 1.56;
  text-wrap: pretty;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 25px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 43px;
  padding: 9px 13px;
  border: 1px solid transparent;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
  text-decoration: none;
}

.button svg { width: 14px; height: 14px; }
.button.primary { background: var(--button-bg); color: var(--button-text); }
.button.primary:hover { background: var(--button-hover); }
.button.secondary { border-color: var(--line); background: var(--surface); color: var(--ink); }
.button.secondary:hover { border-color: var(--accent-line); color: var(--accent); }

.answer-preview {
  position: relative;
  align-self: center;
  min-width: 0;
  min-height: 244px;
  margin: 0;
  padding: clamp(16px, 2.2vw, 28px);
  border: 1px solid var(--accent-line);
  border-radius: 13px;
  background-color: var(--surface);
  background-image: linear-gradient(var(--grid-line) 1px, transparent 1px), linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 21px 21px;
}

.preview-top {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  margin: 0 0 17px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
}

.status-dot {
  display: inline-block;
  flex: 0 0 7px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
}

.preview-top svg, .preview-source svg {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
}

.preview-question {
  margin: 0;
  color: var(--ink);
  font-size: clamp(17px, 1.48vw, 22px);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -.026em;
  text-wrap: pretty;
}

.preview-result {
  margin: 15px 0 0;
  padding: 11px 12px;
  border: 1px solid var(--accent-line);
  border-radius: 7px;
  background: var(--accent-fill);
  color: var(--accent-text);
  font-size: 14px;
  line-height: 1.43;
}

.preview-result > p:first-child { margin: 0; }

.preview-source {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 550;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.preview-source svg { width: 13px; height: 13px; }
.preview-source a { color: var(--accent); }

.preview-quote {
  margin: 7px 0 0;
  padding-left: 9px;
  border-left: 2px solid var(--accent-line);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.architecture, .guides, .section-index { margin-bottom: clamp(42px, 5.5vw, 74px); }

.section-heading {
  display: grid;
  gap: 8px;
  margin: 0 0 21px;
}

.section-heading h2 {
  margin: 0;
  padding-inline: 0;
  font-family: var(--display-font);
  font-size: clamp(27px, 3.1vw, 43px);
  font-weight: 650;
  line-height: 1.1;
  letter-spacing: -.05em;
  text-wrap: balance;
}

.section-heading p {
  max-width: 69ch;
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  text-wrap: pretty;
}

.diagram-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface);
}

.tabs {
  display: flex;
  gap: 5px;
  padding: 8px;
  border-bottom: 1px solid var(--line);
  background: var(--rail);
}

.tabs button {
  min-height: 38px;
  padding: 7px 11px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 550;
  line-height: 1.23;
}

.tabs button:hover { color: var(--accent); }
.tabs button[aria-selected="true"] {
  border-color: var(--accent-line);
  background: var(--accent-fill);
  color: var(--accent-text);
}

.diagram-panel {
  min-width: 0;
  margin: 0;
  padding: clamp(13px, 2.25vw, 28px);
  background-image: linear-gradient(var(--grid-line) 1px, transparent 1px), linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 21px 21px;
}

.diagram-flow {
  display: flex;
  align-items: stretch;
  gap: clamp(5px, 1vw, 12px);
  min-width: 0;
}

.diagram-node {
  display: flex;
  flex: 1 1 0;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 5px;
  min-width: 0;
  min-height: 94px;
  padding: 11px clamp(6px, .8vw, 13px);
  border: 1px solid var(--line);
  border-top-color: var(--accent-line);
  border-radius: 7px;
  background: var(--surface);
  text-decoration: none;
  overflow-wrap: anywhere;
}

a.diagram-node:hover { border-color: var(--accent); }
.diagram-node small, .diagram-node span { color: var(--muted); font-size: 11px; line-height: 1.28; }
.diagram-node strong { color: var(--ink); font-size: clamp(12px, 1.15vw, 16px); font-weight: 620; line-height: 1.22; }
.diagram-node em { color: var(--accent-text); font-size: 10px; font-style: normal; font-weight: 600; }
.diagram-node svg { width: 17px; height: 17px; color: var(--accent); }

.diagram-arrow {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  align-self: center;
  color: var(--accent);
  font-size: 18px;
  line-height: 1;
}

.diagram-arrow svg { width: 14px; height: 14px; }
.diagram-note { margin: 15px 0 0; color: var(--muted); font-size: 12px; }

.guide-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.guide-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 9px;
  min-width: 0;
  min-height: 150px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
  text-decoration: none;
}

.guide-card:focus-within { border-color: var(--accent-line); }

@supports (grid-template-rows: subgrid) {
  .guide-card {
    display: grid;
    grid-row: span 4;
    grid-template-rows: subgrid;
    align-items: start;
    justify-items: start;
  }
}

.guide-icon {
  display: grid;
  width: 31px;
  height: 31px;
  place-items: center;
  border: 1px solid var(--accent-line);
  border-radius: 6px;
  background: var(--accent-fill);
  color: var(--accent);
}

.guide-icon svg { width: 17px; height: 17px; }
.guide-card h3 {
  margin: 0;
  padding-inline: 0;
  font-size: 15px;
  font-weight: 630;
  line-height: 1.28;
  letter-spacing: -.015em;
}
.guide-card p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.4; text-wrap: pretty; }
.guide-action { display: inline-flex; align-items: center; gap: 6px; margin-top: auto; padding-top: 4px; color: var(--accent); font-size: 12px; font-weight: 600; text-decoration: none; }
.guide-action svg { width: 13px; height: 13px; }
.guide-action:hover { text-decoration: underline; }

.index-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 28px;
}

a.index-entry {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  text-decoration: none;
}

.index-entry span { color: var(--muted); }
a.index-entry:hover, a.index-entry:hover span { color: var(--accent); }

.page-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 7px 18px;
  min-height: 64px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}

.page-footer p { margin: 0; }
.page-footer a:hover { color: var(--accent); }

.search-dialog {
  --search-dialog-top: clamp(18px, 12dvh, 116px);
  position: fixed;
  width: min(560px, calc(100vw - 28px));
  max-height: min(520px, calc(100dvh - var(--search-dialog-top) - 16px));
  margin: var(--search-dialog-top) auto auto;
  padding: 15px;
  overflow: hidden;
  border: 1px solid var(--accent-line);
  border-radius: 11px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 15px 52px #191d1a33;
}

.search-dialog[open], .search-dialog > form[method="get"] {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.search-dialog :is(.dialog-header, .search-field, .search-preview-status, .search-show-all) { flex: none; }
.search-dialog::backdrop { background: #191d1a75; }

.dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 11px;
}

.dialog-header h2 { margin: 0; font-size: 16px; }
.dialog-header button { min-height: 28px; border: 1px solid var(--line); border-radius: 5px; background: var(--paper); color: var(--ink); }
.search-field { width: 100%; min-height: 40px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 6px; background: var(--paper); color: var(--ink); }
.search-preview-status { margin: 10px 0 0; color: var(--muted); font-size: 13px; }
.search-preview-status:empty { margin: 0; }
.search-preview-status[data-ready="true"] {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.search-preview-results {
  min-height: 0;
  margin: 10px 0 0;
  padding: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  border-top: 1px solid var(--line);
  list-style: none;
}

.search-preview-results li { border-bottom: 1px solid var(--line); }
.search-preview-link {
  display: block;
  padding: 8px 10px;
  border-radius: 5px;
  color: var(--ink);
  text-decoration: none;
  overflow-wrap: anywhere;
}

.search-preview-link:is(:hover, :focus-visible) { background: var(--accent-fill); }
.search-preview-title { display: block; color: var(--accent); font-size: 14px; font-weight: 650; }
.search-preview-context, .search-preview-excerpt {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.search-preview-context:empty, .search-preview-excerpt:empty { display: none; }
.search-show-all {
  align-self: flex-start;
  min-height: 36px;
  margin: 6px 0 0;
  padding: 4px 10px;
  border: 1px solid transparent;
  border-radius: 5px;
  background: transparent;
  color: var(--accent);
  font-size: 13px;
}

.search-show-all:hover { background: var(--accent-fill); }
.search-results { display: grid; gap: 4px; margin: 12px 0 0; padding: 0; list-style: none; }
.search-results a { display: block; padding: 6px 9px; border-radius: 5px; color: var(--accent); }
.search-results a:hover { background: var(--accent-fill); }
.search-results p, .search-results li { color: var(--muted); font-size: 13px; }

@media (max-width: 1190px) {
  .shell { grid-template-columns: 192px minmax(0, 1fr); }
  .page-toc { display: none; }
}

@media (max-width: 880px) {
  .header-tools { gap: 7px; }
  .header-inner { gap: 9px; }
  .brand-label { display: none; }
  .main-content { padding-inline: 24px; }
  .hero h1 { font-size: clamp(36px, 5.7vw, 53px); }
  .hero { grid-template-columns: minmax(0, 1fr) minmax(0, .82fr); gap: 16px; }
  .answer-preview { padding: 15px; }
  .guide-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  :root { --header-size: 58px; }
  .header-inner { min-height: var(--header-size); padding-inline: 12px; }
  .docs-js .mobile-menu { display: inline-flex; }
  .brand { gap: 6px; }
  .brand-mark { width: 30px; height: 30px; border-radius: 6px; }
  .brand-mark svg { width: 18px; height: 18px; }
  .brand-name { font-size: 19px; }
  .search-trigger :is(.shortcut, .search-label) { display: none; }
  .search-trigger, .mobile-menu, .icon-button { flex: 0 0 auto; width: 34px; min-height: 34px; justify-content: center; padding: 0; }
  .github-link { min-height: 34px; width: 28px; justify-content: center; padding: 0; font-size: 0; }
  .github-link span, .search-symbol { font-size: 17px; }
  .locale-switch { gap: 1px; padding: 2px; }
  .locale-switch a, .locale-switch span { min-width: 24px; min-height: 25px; font-size: 10px; }
  .shell { display: block; }
  html:not(.docs-js) .side-nav {
    max-height: min(12rem, 40vh);
    overflow-y: auto;
    border-bottom: 1px solid var(--line);
  }
  .docs-js .side-nav {
    position: fixed;
    z-index: 2;
    top: var(--header-size);
    bottom: 0;
    left: 0;
    display: none;
    width: min(302px, 86vw);
    overflow-y: auto;
    box-shadow: 18px 0 48px #191d1a28;
  }
  .docs-js .side-nav[data-open="true"] { display: block; }
  .side-inner { position: static; max-height: none; padding: 21px 16px; }
  .docs-nav-row > a, .docs-nav-toggle { min-height: 36px; }
  .docs-nav-toggle { flex-basis: 2.5rem; }
  .main-content { padding: 36px clamp(16px, 5.4vw, 33px) 0; }
  .hero h1 { font-size: clamp(39px, 8vw, 57px); }
}

@media (max-width: 535px) {
  .hero { grid-template-columns: minmax(0, 1fr); gap: 25px; margin-bottom: 43px; }
  .answer-preview { min-height: auto; padding: 16px; }
  .lede { margin-top: 14px; }
  .hero-actions { margin-top: 18px; }
  .section-heading { margin-bottom: 15px; }
  .section-heading p { font-size: 14px; }
  .tabs { gap: 2px; padding: 5px; }
  .tabs button { flex: 1; min-height: 36px; padding: 6px 3px; font-size: 11.5px; }
  .diagram-flow { flex-direction: column; align-items: stretch; gap: 5px; }
  .diagram-node { min-height: 62px; padding: 9px 11px; }
  .diagram-node strong { font-size: 14px; }
  .diagram-arrow { transform: rotate(90deg); }
  .guide-grid, .index-grid { grid-template-columns: minmax(0, 1fr); }
  .guide-card { min-height: 139px; padding: 11px; }
}

@media (max-width: 365px) {
  .header-inner { padding-inline: 8px; gap: 6px; }
  .header-tools { gap: 5px; }
  .brand-name { font-size: 17px; }
  .brand-mark { width: 26px; height: 26px; }
  .search-trigger, .mobile-menu, .icon-button { width: 30px; min-height: 32px; }
  .github-link { display: none; }
}

@media (prefers-reduced-motion: no-preference) {
  .button, .guide-card, .diagram-node, .tabs button, .docs-nav-row, .docs-nav-toggle {
    transition: color .14s ease, background-color .14s ease, border-color .14s ease;
  }
}
