:root {
  color-scheme: light;
  --page: #f5f7fb;
  --paper: #fff;
  --ink: #17243d;
  --muted: #5c6b82;
  --line: #dce5f2;
  --deep: #172f61;
  --accent: #2c5fef;
  --soft: #edf2ff;
  --focus: #2c5fef;
  --shell: 1240px;
  font-family: var(--font-sans);
  --font-sans:
    'Helvetica Neue', Helvetica, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei',
    'Noto Sans CJK SC', Tahoma, Arial, sans-serif;
  --text-home: 2.5rem;
  --text-title: 2rem;
  --text-title-mobile: 1.75rem;
  --text-section: 1.5rem;
  --text-section-mobile: 1.375rem;
  --text-subheading: 1.25rem;
  --text-body: 1rem;
  --text-ui: 0.875rem;
  --text-caption: 0.8125rem;
  font-size: 100%;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-size: var(--text-ui);
  line-height: 1.6;
}
button,
input {
  font: inherit;
}
button,
summary {
  cursor: pointer;
}
button {
  color: inherit;
}
a {
  color: inherit;
  text-decoration: none;
}
h1,
h2,
h3,
p,
ul,
ol,
figure {
  margin: 0;
}
h1,
h2,
h3 {
  line-height: 1.3;
  font-weight: 600;
}
ul,
ol {
  padding: 0;
}
a:focus-visible,
button:focus-visible,
input:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 4px;
}
::selection {
  background: #dbe7ff;
  color: var(--deep);
}
input,
textarea {
  caret-color: var(--accent);
}
html {
  scrollbar-width: thin;
  scrollbar-color: #b9c9e2 #fff;
  scroll-behavior: smooth;
}
.shell {
  width: min(calc(100% - 80px), var(--shell));
  margin-inline: auto;
}
.skip {
  position: absolute;
  z-index: 30;
  top: -100px;
  padding: 10px 16px;
  background: #fff;
}
.skip:focus {
  top: 12px;
  left: 12px;
}
.site-header {
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.header-inner {
  min-height: 84px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  white-space: nowrap;
}
.brand strong {
  font-size: 21px;
  font-weight: 600;
  letter-spacing: normal;
}
.brand > span:last-child {
  font-size: var(--text-caption);
  color: var(--muted);
}
.brand-divider {
  width: 1px;
  height: 18px;
  background: var(--line);
  margin-inline: 3px;
}
.brand-mark {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  background: var(--accent);
  color: #fff;
  border-radius: 7px;
}
.brand-mark svg {
  width: 21px;
  height: 21px;
}
.top-nav {
  display: flex;
  align-items: center;
  gap: 28px;
  color: var(--muted);
  font-size: var(--text-ui);
  line-height: 1.6;
}
.top-nav a:hover {
  color: var(--accent);
}
.header-search {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 0;
  border-left: 1px solid var(--line);
  background: transparent;
  padding: 8px 0 8px 26px;
  min-height: 40px;
  font-size: var(--text-ui);
  line-height: 1.6;
}
.search-icon {
  display: inline-block;
  position: relative;
  border: 1.5px solid currentColor;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  flex: 0 0 14px;
}
.search-icon:after {
  content: '';
  position: absolute;
  width: 6px;
  height: 1.5px;
  background: currentColor;
  right: -4px;
  bottom: -2px;
  transform: rotate(46deg);
}
/* Homepage follows one content column; article navigation is independent. */
.manual-layout {
  display: block;
  padding-block: 0 70px;
}

.manual-main {
  min-width: 0;
}
.manual-cover {
  position: relative;
  isolation: isolate;
  background: var(--deep);
  background-image: linear-gradient(112deg, var(--deep) 8%, #234b8f 64%, #2856a1 100%);
  color: var(--paper);
}
.manual-cover::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: radial-gradient(circle, #ffffff18 .6px, transparent .9px);
  background-size: 7px 7px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 85%);
  mask-image: linear-gradient(90deg, transparent, #000 85%);
}
.manual-cover .manual-opening {
  position: relative;
  z-index: 1;
}
.manual-cover :focus-visible {
  outline-color: var(--paper);
}
.manual-cover .manual-search-hints {
  color: var(--paper);
}
.manual-cover .manual-search-hints > span {
  opacity: .9;
}
.manual-cover .manual-search-hints button {
  color: var(--paper);
}
.manual-opening {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  align-items: center;
  gap: 42px;
  padding-block: 52px 56px;
}
.manual-intro h1 {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: var(--text-home);
  letter-spacing: normal;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.manual-intro > p {
  font-size: var(--text-ui);
  color: var(--paper);
  opacity: .9;
  line-height: 1.6;
  margin-top: 18px;
}
.manual-find {
  width: 100%;
  max-width: 520px;
  justify-self: end;
}
.manual-search-hints {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 16px;
  margin-top: 10px;
  color: var(--muted);
  font-size: var(--text-caption);
  line-height: 1.6;
}
.manual-search-hints button {
  padding: 4px 0;
  border: 0;
  background: transparent;
  color: var(--accent);
  font-size: var(--text-ui);
  line-height: 1.6;
}
.manual-search-hints button:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}
.manual-search {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #fff;
  border: 1px solid #b9c9e2;
  border-radius: 7px;
  color: var(--muted);
  margin-top: 0;
  padding: 0 16px;
  min-height: 54px;
  width: 100%;
  max-width: none;
  font-size: var(--text-ui);
  line-height: 1.6;
}
.manual-search:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.manual-search kbd {
  margin-left: auto;
  font-size: var(--text-caption);
  color: var(--muted);
}

.manual-route {
  margin-top: 32px;
  padding: 26px 30px 30px;
  background: var(--page);
}
.route-heading {
  display: flex;
  align-items: baseline;
  gap: 20px;
  margin-bottom: 25px;
}
.route-heading h2,
.directory-heading h2 {
  font-size: var(--text-section);
  font-weight: 600;
  letter-spacing: normal;
  line-height: 1.5;
}
.route-heading p {
  font-size: var(--text-caption);
  color: var(--muted);
  line-height: 1.6;
}
.setup-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
  list-style: none;
}
.setup-list a {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px 8px;
  position: relative;
}
.step-number {
  grid-column: 1/-1;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--accent);
  color: var(--paper);
  font-size: var(--text-caption);
  font-weight: 600;
  position: relative;
}
.setup-list li:not(:last-child) a:after {
  content: '';
  position: absolute;
  top: 15px;
  left: 44px;
  right: -10px;
  height: 1px;
  background: var(--line);
}
.step-text {
  display: block;
  min-width: 0;
}
.step-text strong {
  font-size: var(--text-ui);
  font-weight: 600;
  display: block;
  line-height: 1.6;
}
.step-text small {
  display: block;
  font-size: var(--text-caption);
  color: var(--muted);
  line-height: 1.6;
  margin-top: 7px;
}
.row-arrow {
  color: var(--accent);
  align-self: start;
}
.setup-list a:hover strong {
  color: var(--accent);
}
.manual-directory {
  padding-top: 36px;
}
.directory-heading {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 20px;
  margin-bottom: 10px;
}
.directory-heading > span {
  font-size: var(--text-caption);
  color: var(--muted);
}
.manual-chapters {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 64px;
}
.manual-chapter {
  padding-block: 28px 24px;
  scroll-margin-top: 24px;
}
.manual-chapter:nth-child(n + 3) {
  border-top: 1px solid var(--line);
}
.manual-chapter header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}
.manual-chapter h3 {
  font-size: var(--text-subheading);
  font-weight: 600;
  letter-spacing: normal;
  line-height: 1.5;
}
.manual-chapter h3 a {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.chapter-icon {
  flex: 0 0 24px;
  color: var(--accent);
}
.manual-chapter header > span {
  font-size: var(--text-caption);
  color: var(--muted);
  white-space: nowrap;
  line-height: 1.6;
}
.manual-chapter > p {
  margin-top: 8px;
  font-size: var(--text-caption);
  color: var(--muted);
  line-height: 1.6;
  min-height: 43px;
}
.manual-chapter ul {
  list-style: none;
  margin-top: 10px;
}
.manual-chapter li a {
  padding-block: 7px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  font-size: var(--text-ui);
  line-height: 1.6;
}
.manual-chapter li a > span {
  color: #8b9cb5;
}
.manual-chapter a:hover {
  color: var(--accent);
}
.chapter-more {
  display: inline-flex;
  gap: 10px;
  font-size: var(--text-caption);
  color: var(--muted);
  margin-top: 15px;
  line-height: 1.6;
}
.mobile-toc-label {
  display: none;
  font-size: var(--text-ui);
  line-height: 1.6;
}
/* Continuous document, with navigation outside its text measure. */
.docs-layout {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr) 140px;
  gap: 48px;
  align-items: start;
  padding-block: 38px 80px;
  min-height: 75vh;
}
.sidebar,
.page-toc {
  position: sticky;
  top: 24px;
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  scrollbar-width: thin;
}
.sidebar {
  padding-right: 16px;
}
.sidebar-home {
  display: block;
  font-size: var(--text-caption);
  color: var(--muted);
  font-weight: 600;
  margin-bottom: 20px;
  line-height: 1.6;
}
.sidebar nav details {
  margin-bottom: 14px;
}
.sidebar nav summary {
  padding-block: 8px;
  font-size: var(--text-ui);
  font-weight: 600;
  line-height: 1.6;
}
.sidebar nav ul {
  list-style: none;
  padding: 3px 0 4px 8px;
}
.sidebar nav li a {
  display: block;
  padding: 7px 8px;
  color: var(--muted);
  font-size: var(--text-ui);
  line-height: 1.6;
}
.sidebar nav a:hover,
.sidebar nav .topic-overview {
  color: var(--accent);
}
.sidebar nav a[aria-current='page'] {
  color: var(--accent);
  font-weight: 600;
  background: var(--soft);
  border-radius: 4px;
}

.doc-main {
  min-width: 0;
  padding: 0;
}
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  font-size: var(--text-caption);
  color: var(--muted);
  margin-bottom: 25px;
  line-height: 1.6;
}
.breadcrumb a:hover {
  color: var(--accent);
}
.doc-heading {
  padding-bottom: 25px;
  margin-bottom: 30px;
  border-bottom: 1px solid var(--line);
}
.doc-heading h1 {
  font-family: var(--font-sans);
  font-size: var(--text-title);
  font-weight: 600;
  line-height: 1.45;
  letter-spacing: normal;
  overflow-wrap: anywhere;
}
.doc-heading p {
  font-size: var(--text-ui);
  color: var(--muted);
  line-height: 1.8;
  margin-top: 14px;
}
.published-date {
  display: block;
  font-size: var(--text-caption);
  color: var(--muted);
  margin-top: 12px;
  line-height: 1.6;
}
.article-content {
  max-width: 46rem;
  font-size: var(--text-body);
  line-height: 1.8;
  overflow-wrap: anywhere;
}
.article-content h2 {
  font-size: var(--text-section);
  font-weight: 600;
  line-height: 1.5;
}
.article-content h3 {
  font-size: var(--text-subheading);
  font-weight: 600;
  line-height: 1.5;
}
.article-content :is(h2, h3) {
  margin: 35px 0 14px;
  letter-spacing: normal;
  scroll-margin-top: 24px;
}
.article-content h2:first-child {
  margin-top: 0;
}
.article-content p {
  margin-bottom: 20px;
}
.article-content :is(ul, ol) {
  margin-bottom: 20px;
  padding-left: 22px;
}
.article-content li + li {
  margin-top: 7px;
}
.article-content code {
  padding: 2px 4px;
  border-radius: 3px;
  background: var(--soft);
}
.article-content pre {
  overflow-x: auto;
  background: var(--page);
  padding: 16px;
  margin-block: 20px;
}
.article-content blockquote {
  margin: 20px 0;
  padding: 10px 16px;
  border-left: 1px solid #8aa4d1;
  background: var(--page);
}
.article-content table {
  display: block;
  max-width: 100%;
  overflow-x: auto;
  border-collapse: collapse;
  margin-block: 20px;
}
.article-content th,
.article-content td {
  border: 1px solid var(--line);
  padding: 8px 12px;
  text-align: left;
}
.article-content th {
  background: var(--page);
}
.article-content figure {
  margin: 24px 0 30px;
}
.zoom-image {
  display: block;
  border: 1px solid var(--line);
  padding: 0;
  background: #fff;
}
.zoom-image:hover {
  border-color: var(--accent);
}
.zoom-image img {
  display: block;
  max-width: 100%;
  max-height: 470px;
  object-fit: contain;
  margin: auto;
}
.zoom-image span {
  display: block;
  font-size: var(--text-caption);
  color: var(--muted);
  padding: 8px 10px;
  text-align: right;
  line-height: 1.6;
}
.page-toc {
  border-left: 1px solid var(--line);
  padding-left: 18px;
  margin-top: 7px;
}
.page-toc ul,
.inline-toc ul {
  list-style: none;
}
.page-toc h2 {
  font-size: var(--text-caption);
  font-weight: 600;
  margin-bottom: 12px;
  line-height: 1.6;
}
.page-toc a,
.inline-toc a {
  display: block;
  color: var(--muted);
  padding-block: 5px;
  font-size: var(--text-caption);
  line-height: 1.6;
}
.page-toc a:hover,
.inline-toc a:hover {
  color: var(--accent);
}
.toc-level-3 {
  padding-left: 9px;
}
.inline-toc {
  display: none;
}
.neighbors {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(180px, 100%), 1fr));
  gap: 24px;
  border-top: 1px solid var(--line);
  margin-top: 35px;
  padding-top: 24px;
}
.neighbors a span {
  display: block;
  color: var(--muted);
  font-size: var(--text-caption);
  margin-bottom: 9px;
  line-height: 1.6;
}
.neighbors a strong {
  font-size: var(--text-ui);
  font-weight: 600;
  line-height: 1.6;
}
.neighbors a:hover {
  color: var(--accent);
}
.category {
  grid-column: 2/-1;
  max-width: 780px;
}
.category h2 {
  font-size: var(--text-section);
  font-weight: 600;
  line-height: 1.5;
}
.category-list {
  list-style: none;
}
.category-list a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  border-bottom: 1px solid var(--line);
  padding-block: 20px;
  font-size: var(--text-ui);
  line-height: 1.6;
}
.category-list strong {
  font-size: var(--text-body);
  font-weight: 600;
}
.category-list p {
  font-size: var(--text-caption);
  color: var(--muted);
  margin-top: 5px;
  line-height: 1.6;
}
.category-list a:hover {
  color: var(--accent);
}
.site-footer {
  border-top: 1px solid var(--line);
  background: #fff;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  min-height: 70px;
  font-size: var(--text-caption);
  color: var(--muted);
  line-height: 1.6;
}
.footer-inner a:hover {
  color: var(--accent);
}
.preview-banner {
  padding: 10px 20px;
  background: var(--soft);
  color: var(--deep);
  font-size: var(--text-caption);
  text-align: center;
  line-height: 1.6;
}
.preview-banner a {
  display: inline-block;
  margin-left: 16px;
  text-decoration: underline;
  white-space: nowrap;
}
.local-runtime-banner {
  display: flex;
  flex-wrap: wrap;
  gap: 0 12px;
  justify-content: center;
  padding: 3px 12px;
  font-size: var(--text-caption);
  color: var(--muted);
  background: #fff;
  border-bottom: 1px solid var(--line);
  line-height: 1.6;
}
.local-runtime-banner a {
  margin-left: 8px;
}
.error-page {
  min-height: 60vh;
  padding-block: 80px;
}
.error-page h1 {
  font-size: 28px;
  margin-bottom: 24px;
}
.error-page a {
  color: var(--accent);
  text-decoration: underline;
}
dialog {
  color: var(--ink);
  background: #fff;
  border: 0;
  border-radius: 12px;
  padding: 0;
  box-shadow: 0 18px 70px #152b4c30;
}
dialog::backdrop {
  background: #12213b91;
}
#search-dialog {
  width: min(610px, calc(100vw - 32px));
  margin-top: min(12vh, 90px);
  max-height: min(76vh, 680px);
}
.dialog-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 22px 14px;
}
.dialog-heading h2 {
  font-size: 18px;
}
.close-button {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  background: transparent;
  border: 0;
  border-radius: 5px;
  font-size: 22px;
  line-height: 1;
}
.close-button:hover {
  background: var(--soft);
}
.dialog-field {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 22px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--accent);
  background: var(--page);
}
.dialog-field:focus-within {
  border-color: var(--accent);
}
.dialog-field input {
  width: 100%;
  padding: 12px 0;
  background: transparent;
  color: var(--ink);
  border: 0;
  outline: none;
}
.search-status {
  padding: 13px 22px 5px;
  font-size: var(--text-caption);
  color: var(--muted);
  line-height: 1.6;
}
.search-results {
  padding: 4px 12px 16px;
}
.search-results a {
  display: block;
  padding: 12px 10px;
  border-radius: 6px;
}
.search-results a:hover,
.search-results a:focus-visible {
  background: var(--soft);
}
.search-results a strong {
  font-size: var(--text-ui);
  line-height: 1.6;
}
.result-category {
  display: block;
  font-size: var(--text-caption);
  color: var(--muted);
  margin-bottom: 3px;
  line-height: 1.6;
}
.result-excerpt {
  display: block;
  font-size: var(--text-caption);
  color: var(--muted);
  margin-top: 5px;
  overflow-wrap: anywhere;
  line-height: 1.6;
}
.result-excerpt mark,
.search-results strong mark {
  background: #dbe7ff;
  color: var(--deep);
}
#image-dialog {
  max-width: 95vw;
  max-height: 95vh;
  padding: 12px;
}
#image-dialog form {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 8px;
}
#image-dialog-title {
  font-size: var(--text-ui);
  line-height: 1.6;
  color: var(--muted);
}
#image-dialog-title:focus {
  outline: none;
}
#image-dialog .close-button {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  border-radius: 50%;
  background: var(--page);
  color: var(--ink);
}
#image-dialog .close-button:hover {
  background: var(--soft);
}
#image-dialog .close-button:focus-visible {
  outline-offset: 2px;
}
#image-dialog img {
  display: block;
  max-width: calc(95vw - 28px);
  max-height: calc(95vh - 88px);
  object-fit: contain;
}
dialog[open] {
  animation: dialog-enter 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes dialog-enter {
  from {
    transform: translateY(-8px);
    box-shadow: 0 8px 24px #152b4c20;
  }
  to {
    transform: translateY(0);
    box-shadow: 0 18px 70px #152b4c30;
  }
}
@media (max-width: 1100px) {
  .manual-opening {
    gap: 24px;
  }

  .manual-intro h1 {
    font-size: var(--text-home);
    font-family: var(--font-sans);
    font-weight: 600;
    line-height: 1.4;
    letter-spacing: normal;
    overflow-wrap: anywhere;
  }
  .setup-list {
    gap: 16px;
  }
  .manual-chapters {
    column-gap: 32px;
  }
  .docs-layout {
    grid-template-columns: 185px minmax(0, 1fr);
    gap: 36px;
  }
  .page-toc {
    display: none;
  }
  .inline-toc {
    display: block;
    border-block: 1px solid var(--line);
    margin-bottom: 25px;
    padding: 12px 0;
  }
  .inline-toc summary {
    font-size: var(--text-ui);
    color: var(--muted);
    line-height: 1.6;
  }
}
@media (max-width: 820px) {
  .shell {
    width: calc(100% - 48px);
  }

  .manual-opening {
    grid-template-columns: 1fr;
    padding-block: 36px;
    gap: 25px;
  }
  .manual-intro h1 {
    font-size: var(--text-home);
    font-family: var(--font-sans);
    font-weight: 600;
    line-height: 1.4;
    letter-spacing: normal;
    overflow-wrap: anywhere;
  }

  .manual-find {
    max-width: none;
  }
  .manual-search {
    max-width: none;
    font-size: var(--text-ui);
    line-height: 1.6;
  }
  .setup-list {
    grid-template-columns: 1fr 1fr;
    gap: 22px;
  }
  .setup-list li:nth-child(2) a:after {
    display: none;
  }
  .route-heading {
    display: block;
    margin-bottom: 20px;
  }
  .route-heading p {
    margin-top: 7px;
    font-size: var(--text-caption);
    line-height: 1.6;
  }
  .manual-chapters {
    grid-template-columns: 1fr;
  }
  .manual-chapter:nth-child(n + 2) {
    border-top: 1px solid var(--line);
  }
  .manual-chapter > p {
    min-height: 0;
    font-size: var(--text-caption);
    line-height: 1.6;
  }
  .docs-layout {
    grid-template-columns: 160px minmax(0, 1fr);
    gap: 28px;
  }
  .header-inner {
    min-height: 74px;
  }
  .top-nav {
    gap: 18px;
    font-size: var(--text-ui);
    line-height: 1.6;
  }
}
@media (max-width: 570px) {
  .shell {
    width: calc(100% - 36px);
  }
  .header-inner {
    min-height: 66px;
    gap: 12px;
  }
  .brand {
    gap: 9px;
  }
  .brand strong {
    font-size: 18px;
  }
  .brand > span:last-child {
    font-size: var(--text-caption);
  }
  .brand-mark {
    width: 27px;
    height: 27px;
  }
  .top-nav > a {
    display: none;
  }
  .header-search {
    border: 0;
    padding: 8px 2px;
    gap: 8px;
    font-size: var(--text-ui);
    line-height: 1.6;
  }
  .manual-layout {
    display: block;
    padding: 0 0 40px;
  }
  .mobile-toc-label {
    display: list-item;
    padding: 12px 0;
    font-size: var(--text-ui);
    font-weight: 600;
    line-height: 1.6;
  }

  .manual-opening {
    padding-block: 28px;
    gap: 22px;
  }
  .manual-intro h1 {
    font-size: var(--text-title);
    line-height: 1.4;
    font-family: var(--font-sans);
    font-weight: 600;
    letter-spacing: normal;
    overflow-wrap: anywhere;
  }

  .manual-intro > p {
    font-size: var(--text-ui);
    margin-top: 14px;
    line-height: 1.6;
  }

  .manual-search {
    margin-top: 0;
    min-height: 50px;
    font-size: var(--text-ui);
    line-height: 1.6;
  }
  .manual-route {
    margin-top: 22px;
    padding: 20px 18px 24px;
  }
  .route-heading h2,
  .directory-heading h2 {
    font-size: var(--text-section-mobile);
    font-weight: 600;
    line-height: 1.5;
  }
  .setup-list {
    gap: 22px 18px;
  }
  .step-text strong {
    font-size: var(--text-ui);
    line-height: 1.6;
  }
  .step-text small {
    font-size: var(--text-caption);
    line-height: 1.6;
  }
  .directory-heading {
    margin-bottom: 0;
  }
  .manual-directory {
    padding-top: 28px;
  }
  .manual-chapter {
    padding-block: 25px;
  }
  .manual-chapter h3 {
    font-size: var(--text-subheading);
    font-weight: 600;
    line-height: 1.5;
  }
  .manual-chapter li a {
    font-size: var(--text-ui);
    min-height: 40px;
    line-height: 1.6;
  }
  .chapter-more {
    min-height: 36px;
    align-items: center;
    margin-top: 9px;
    font-size: var(--text-caption);
    line-height: 1.6;
  }
  .docs-layout {
    display: block;
    padding-block: 16px 45px;
  }
  .docs-layout > .sidebar {
    position: static;
    max-height: none;
    padding: 0;
    border-bottom: 1px solid var(--line);
    margin-bottom: 27px;
  }
  .sidebar nav {
    max-height: 60vh;
    overflow: auto;
    padding: 12px 0;
  }
  .sidebar .mobile-toc-label {
    padding-block: 10px;
  }
  .sidebar-home {
    margin-bottom: 10px;
    font-size: var(--text-caption);
    line-height: 1.6;
  }
  .breadcrumb {
    margin-bottom: 18px;
    font-size: var(--text-caption);
    line-height: 1.6;
  }
  .doc-heading h1 {
    font-size: var(--text-title-mobile);
    line-height: 1.45;
    font-family: var(--font-sans);
    font-weight: 600;
    letter-spacing: normal;
  }
  .doc-heading {
    padding-bottom: 23px;
    margin-bottom: 25px;
  }
  .doc-heading p {
    font-size: var(--text-caption);
  }
  .article-content {
    font-size: var(--text-body);
    line-height: 1.8;
  }
  .category-list a {
    padding-block: 18px;
    font-size: var(--text-ui);
    line-height: 1.6;
  }
  .inline-toc {
    margin-bottom: 22px;
  }
  .local-runtime-banner a {
    display: none;
  }
  .footer-inner {
    min-height: 65px;
    font-size: var(--text-caption);
    gap: 10px;
    line-height: 1.6;
  }
  .preview-banner {
    font-size: var(--text-caption);
    line-height: 1.6;
  }
  .local-runtime-banner {
    font-size: var(--text-caption);
    padding: 3px 10px;
    line-height: 1.6;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
@media (max-width: 570px) {
  .article-content h2 {
    font-size: var(--text-section-mobile);
  }
}

/* Touch layouts keep the reading measure and expose navigation on demand. */
@media (max-width: 570px), (max-width: 900px) and (any-pointer: coarse) {
  .docs-layout {
    display: block;
    padding-block: 16px 45px;
  }
  .docs-layout > .sidebar {
    position: static;
    max-height: none;
    padding: 0;
    border-bottom: 1px solid var(--line);
    margin-bottom: 27px;
  }
  .mobile-toc-label {
    display: list-item;
    padding-block: 12px;
  }
  .sidebar nav {
    max-height: 60dvh;
    overflow: auto;
    padding-block: 12px;
  }
  .sidebar-home {
    margin-bottom: 10px;
  }
}
/* Touch controls remain usable on wider tablets, including attached pointers. */
@media (max-width: 570px), (max-width: 1366px) and (any-pointer: coarse) {
  .header-search,
  .manual-search-hints button,
  .sidebar summary,
  .sidebar-home,
  .sidebar nav li a,
  .manual-chapter li a,
  .chapter-more,
  .inline-toc summary,
  .inline-toc a,
  .page-toc a,
  .footer-inner a,
  .top-nav a,
  .brand {
    min-height: 44px;
    align-content: center;
  }
  .close-button {
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
  }
  .dialog-field input {
    font-size: var(--text-body);
  }
  #search-dialog {
    margin-top: 16px;
    max-height: calc(100dvh - 32px);
  }
  #image-dialog {
    max-height: calc(100dvh - 24px);
  }
  #image-dialog img {
    max-height: calc(100dvh - 104px);
  }
}
/* Use a tablet's extra width for the guide index without squeezing the text. */
@media (min-width: 740px) and (max-width: 820px) {
  .manual-chapters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .manual-chapter:nth-child(2) {
    border-top: 0;
  }
}
