html { --sidebar-target-width: 264px; }
.page-comments { margin-top: 4rem; padding-top: 1.6rem; border-top: 1px solid var(--table-border-color); }
.content .page-comments h2 { margin: 0 0 1.6rem; }
.page-comments .giscus { min-width: 0; }
.comments-fallback { display: inline-block; margin-top: 1.2rem; font-size: .875em; }
@media print { .page-comments { display: none !important; } }
html.light, html:not(.js) {
  --bg: oklch(98% .004 215);
  --fg: oklch(25% .018 225);
  --sidebar-bg: oklch(96% .006 215);
  --sidebar-fg: oklch(29% .018 225);
  --sidebar-active: oklch(43% .105 200);
  --icons: oklch(47% .014 225);
  --icons-hover: oklch(25% .018 225);
  --links: oklch(43% .105 200);
  --table-border-color: oklch(87% .012 215);
  --table-header-bg: oklch(94% .008 215);
  --table-alternate-bg: oklch(96% .006 215);
  --theme-hover: oklch(92% .011 215);
  --searchbar-bg: oklch(98% .004 215);
  --searchbar-fg: oklch(25% .018 225);
  --inline-code-color: oklch(38% .045 75);
}
html { font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif; }
.content { max-width: 1060px; margin-inline: auto; overflow: visible; }
html.js:not(.sidebar-resizing) .page-wrapper { transition: none; }
.content main { max-width: 780px; margin: auto; }
#mdbook-menu-bar { position: sticky; top: 0 !important; border-bottom: 1px solid var(--table-border-color); }
#mdbook-menu-bar .menu-title { font-size: 1.6rem; font-weight: 650; letter-spacing: 0; }
#mdbook-menu-bar .fa-svg, #mdbook-menu-bar .icon-button { color: var(--icons); transition: color 150ms ease; }
#mdbook-menu-bar .fa-svg:hover, #mdbook-menu-bar .icon-button:hover { color: var(--fg); }
.sidebar { border-right: 1px solid var(--table-border-color); }
.sidebar .sidebar-scrollbox { padding: 18px 10px 28px; }
#mdbook-sidebar .chapter { margin: 0; line-height: 1.45; }
#mdbook-sidebar .chapter > .chapter-item { margin: 0 0 2px; }
#mdbook-sidebar .chapter > .chapter-item > .section { display: none; margin: 2px 0 8px; padding-left: 14px; }
#mdbook-sidebar .chapter > .chapter-item:has(> .chapter-link-wrapper a.active) > .section,
#mdbook-sidebar .chapter > .chapter-item:has(> .section a.active) > .section { display: block; }
#mdbook-sidebar .on-this-page { display: none; }
#mdbook-sidebar .chapter-item > .chapter-link-wrapper > a { display: block; flex: 1; padding: 8px 10px; border-radius: 6px; line-height: 1.4; }
#mdbook-sidebar .chapter > .chapter-item > .chapter-link-wrapper > a { font-weight: 560; }
#mdbook-sidebar .section .chapter-link-wrapper > a { padding: 6px 10px; font-weight: 400; }
#mdbook-sidebar .chapter-item > .chapter-link-wrapper > a:hover { background: var(--theme-hover); text-decoration: none; }
#mdbook-sidebar .chapter-item > .chapter-link-wrapper > a.active { background: var(--theme-hover); color: var(--sidebar-active); font-weight: 650; }
#mdbook-sidebar .chapter-item > .chapter-link-wrapper > a:focus-visible { outline: 2px solid var(--links); outline-offset: -2px; }
.sidebar-backdrop { display: none; }
.content p, .content li { line-height: 1.68; }
.content h1 { font-size: 2.8rem; line-height: 1.28; margin-bottom: 1.5rem; letter-spacing: -.025em; }
.content h2 { margin-top: 2.8rem; font-size: 2.05rem; line-height: 1.35; }
.content h3 { font-size: 1.7rem; line-height: 1.4; }
.content p { margin-block: 1.25rem; }
.content img { width: 100%; height: auto; }
.content a:has(> img) { display: block; }
.figure-link { position: relative; cursor: zoom-in; text-decoration: none; }
.figure-zoom-label { display: block; text-align: right; font-size: .85em; line-height: 1.5; padding: .3rem 0; }
.figure-link:focus-visible { outline: 2px solid var(--links); outline-offset: 3px; }
.figure-viewer { width: min(1200px, 96vw); height: 92dvh; max-width: 96vw; max-height: 92dvh; padding: 0; border: 1px solid var(--table-border-color); border-radius: 6px; color: var(--fg); background: var(--bg); }
.figure-viewer::backdrop { background: oklch(20% .015 160 / .65); }
.figure-viewer[open] { display: flex; flex-direction: column; }
.figure-viewer-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; padding: .8rem 1rem; border-bottom: 1px solid var(--table-border-color); }
.figure-viewer-toolbar strong { margin-right: auto; font-size: 1.6rem; flex: 1 1 18rem; }
.figure-viewer-toolbar button { min-height: 40px; padding: .3rem .7rem; font: inherit; color: var(--fg); background: var(--bg); border: 1px solid var(--table-border-color); border-radius: 4px; cursor: pointer; }
.figure-viewer-toolbar button:hover { background: var(--theme-hover); }
.figure-viewer-toolbar button:disabled { opacity: .5; cursor: default; }
.figure-viewer-toolbar button:focus-visible, .figure-viewport:focus-visible { outline: 2px solid var(--links); outline-offset: -2px; }
.figure-viewer-toolbar output { min-width: 4rem; text-align: center; font-variant-numeric: tabular-nums; }
.figure-viewport { flex: 1; min-height: 0; overflow: auto; padding: 12px; background: oklch(96% .006 160); overscroll-behavior: contain; }
.figure-viewport img { display: block; max-width: none; margin: auto; }
@media (max-width: 600px) {
  .figure-viewer-toolbar { gap: .4rem; padding: .6rem; }
  .figure-viewer-toolbar strong { flex-basis: 100%; }
  .figure-viewer-toolbar button { font-size: 1.4rem; }
}
@media print { .figure-zoom-label, .figure-viewer { display: none !important; } }
.content table { display: block; overflow-x: auto; font-size: .95em; }
.content th, .content td { padding: .75rem 1rem; }
.content th { background: var(--table-header-bg); font-weight: 600; }
.content details { margin: 1.5rem 0; }
.content summary { cursor: pointer; padding: .7rem 0; }
.content code { font-variant-ligatures: none; }
.content .lesson-context { margin: .65rem 0 .4rem; color: var(--icons); font-size: .875em; font-weight: 600; letter-spacing: .02em; }
.lesson-context + h1 { margin-top: 0; }
.chapter-index { border-top: 1px solid var(--table-border-color); }
.chapter-index-row { display: grid; grid-template-columns: 2.25rem minmax(0, 1fr) auto; gap: 1rem; align-items: center; padding: 1rem .35rem; border-bottom: 1px solid var(--table-border-color); }
.chapter-index-row:hover, .chapter-index-row:focus-within { background: var(--table-alternate-bg); }
.chapter-number { padding-top: .2rem; color: var(--icons); font-size: .875em; font-variant-numeric: tabular-nums; }
.chapter-summary > a { font-weight: 650; font-size: 1.08em; text-decoration: none; }
.chapter-summary > a:hover { text-decoration: underline; }
.chapter-summary p { margin: .25rem 0 0; color: var(--fg); font-size: .925em; line-height: 1.55; }
.chapter-actions { display: flex; align-items: center; gap: .85rem; white-space: nowrap; font-size: .875em; }
.chapter-actions a { min-height: 32px; display: inline-flex; align-items: center; }
.chapter-index a:focus-visible { outline: 2px solid var(--links); outline-offset: 3px; }
.lesson-toolbar { position: sticky; top: 50px; z-index: 100; padding: .5rem 0 .7rem; margin: 0 0 1.5rem; background: var(--bg); border-bottom: 1px solid var(--table-border-color); box-shadow: 0 10px 16px -18px var(--fg); }
.lesson-links { display: flex; flex-wrap: wrap; gap: .8rem 1.2rem; align-items: center; }
.lesson-links a { display: inline-flex; align-items: center; justify-content: center; min-height: 36px; text-decoration: none; white-space: nowrap; }
.lesson-links > a { padding: .25rem .4rem; }
.lesson-primary { display: inline-flex; align-items: stretch; gap: .4rem; }
.lesson-primary a { min-width: 4.3rem; padding: .25rem .6rem; border-bottom: 2px solid transparent; color: var(--fg); }
.lesson-primary a[aria-current] { font-weight: 700; color: var(--links); border-bottom-color: var(--links); }
.lesson-primary a:hover:not([aria-current]), .lesson-links > a:hover { color: var(--links); background: var(--table-alternate-bg); }
.comparison-toggle { display: none; }
.lesson-comparison { display: none; }
.lesson-comparison[hidden] { display: none !important; }
.study-panel[hidden], .study-panel iframe[hidden] { display: none !important; }
.study-panel { position: fixed; inset: auto 0 0; height: var(--study-height, 56dvh); z-index: 450; display: flex; flex-direction: column; background: var(--bg); border-top: 1px solid var(--table-border-color); }
.study-resize { flex: 0 0 10px; cursor: ns-resize; touch-action: none; border-bottom: 1px solid var(--table-border-color); }
.study-resize[hidden], .study-header select[hidden] { display: none; }
.study-width-resize { position: absolute; inset: 0 auto 0 -5px; width: 10px; cursor: ew-resize; touch-action: none; }
.study-width-resize[hidden] { display: none; }
.study-width-resize:hover, .study-width-resize:focus-visible { background: var(--table-alternate-bg); outline: 2px solid var(--links); outline-offset: -2px; }
.study-resize:hover, .study-resize:focus-visible { background: var(--table-alternate-bg); outline: 2px solid var(--links); outline-offset: -2px; }
.study-resizing { cursor: ns-resize; user-select: none; }
.study-width-resizing { cursor: ew-resize; }
.study-resizing .study-panel iframe { pointer-events: none; }
.study-header select { min-width: 0; max-width: 24rem; flex: 1; min-height: 36px; padding: .25rem .5rem; font: inherit; color: var(--fg); background: var(--bg); border: 1px solid var(--table-border-color); border-radius: .25rem; }
.study-header { display: flex; align-items: center; gap: .8rem; min-height: 48px; padding: .8rem 1.2rem; border-bottom: 1px solid var(--table-border-color); }
.study-header strong { margin-right: auto; white-space: nowrap; }
.study-header span { font-size: .875em; }
.study-header a { white-space: nowrap; }
.study-header button { min-height: 36px; padding: .25rem .6rem; font: inherit; color: var(--fg); background: var(--bg); border: 1px solid var(--table-border-color); border-radius: .25rem; cursor: pointer; white-space: nowrap; }
.study-panel iframe { flex: 1; min-height: 0; width: 100%; border: 0; background: var(--bg); }
.study-header :focus-visible { outline: 2px solid var(--links); outline-offset: 2px; }
.embedded-study .study-run-information > summary { display: list-item; padding: .7rem 1rem; cursor: pointer; border-bottom: 1px solid var(--line); }
.embedded-study .trace-controls { position: sticky; top: -22px; z-index: 2; background: var(--bg); padding-block: 8px; border-bottom: 1px solid var(--line); }
@media (max-width: 900px) {
  .embedded-study nav.tabs { display: flex; flex-wrap: nowrap; overflow-x: auto; gap: 4px; }
  .embedded-study nav.tabs button { flex: none; white-space: nowrap; min-height: 36px; padding: 7px 10px; }
  .embedded-study .timebar .tlabel { flex-basis: 100%; white-space: normal; overflow: visible; text-overflow: clip; text-align: left; overflow-wrap: anywhere; }
  .embedded-study .trace-grid { min-height: 0; align-items: start; }
  .embedded-study .function-tree, .embedded-study .function-sequence { min-height: 0; }
}
.study-expanded { inset-block-start: 50px; height: auto; }
body.study-open .page-wrapper { padding-bottom: var(--study-height, 56dvh); }
body.study-fullscreen { overflow: hidden; }
@media (min-width: 1200px) {
  body.study-side #mdbook-sidebar-resize-handle, body.study-side .lesson-outline,
  body.study-side .comparison-toggle, body.study-side .nav-wide-wrapper { display: none; }
  body.study-side .page-wrapper { margin-inline-start: 0 !important; padding-bottom: 0; }
  body.study-side .page { padding-inline: 0; }
  body.study-side .content { width: var(--study-reading-width, 48%); max-width: none; margin-inline: 0; padding-inline: 24px; box-sizing: border-box; }
  body.study-side .content main:has(.lesson-toolbar) { margin-inline: 0; max-width: none; }
  body.study-side .study-panel { top: 50px; height: auto; border-top: 0; border-left: 1px solid var(--table-border-color); }
  body.study-side .study-header { flex-wrap: wrap; gap: .5rem .75rem; }
  body.study-side .study-header select { max-width: none; flex-basis: 100%; order: 1; }
  body.study-side #mdbook-sidebar { top: 50px; z-index: 500; width: var(--sidebar-target-width); }
  body.study-side .sidebar-backdrop { display: block; position: fixed; inset: 50px 0 0; z-index: 490; border: 0; background: oklch(25% .01 240 / .2); cursor: pointer; }
}
@media (max-width: 900px) {
  .study-panel { top: 50px; height: auto; }
  .study-header { gap: .6rem; flex-wrap: wrap; }
  .study-header span:empty { display: none; }
  .study-header select { max-width: none; flex-basis: 100%; order: 1; }
}
.lesson-outline { display: none; }
@media (min-width: 1200px) {
  .content:has(.lesson-toolbar), .content:has(.guide-outline) { max-width: 1120px; }
  .content main:has(.lesson-toolbar), .content main:has(.guide-outline) { position: relative; margin-inline-start: 20px; margin-inline-end: 260px; }
  .lesson-outline { display: block; position: absolute; inset: 0 -240px 0 auto; width: 208px; }
  .lesson-outline nav { position: sticky; top: 70px; max-height: calc(100vh - 90px); overflow-y: auto; font-size: .875em; }
  .lesson-outline p { margin: 0 0 .75rem; font-weight: 600; }
  .lesson-outline ol { list-style: none; margin: 0; padding: 0; }
  .lesson-outline a { display: block; padding: .5rem 0; text-decoration: none; line-height: 1.5; color: var(--fg); }
  .lesson-outline a[aria-current] { color: var(--links); font-weight: 600; }
  .lesson-outline a:hover { text-decoration: underline; }
  .lesson-outline a:focus-visible { outline: 2px solid var(--links); outline-offset: 2px; }
  .comparison-toggle { display: inline-flex; align-items: center; min-height: 36px; font: inherit; padding: .25rem .65rem; color: var(--fg); background: var(--bg); border: 1px solid var(--table-border-color); border-radius: .25rem; cursor: pointer; }
  .comparison-toggle[aria-expanded="true"] { background: var(--table-alternate-bg); }
  .content:has(.comparison-open) { max-width: 1480px; }
  .content main.comparison-open { max-width: none; margin-inline-end: min(44%, 600px); }
  .comparison-open .lesson-outline { display: none; }
  body:has(.comparison-open) .nav-wide-wrapper { display: none; }
  .lesson-comparison { display: block; position: absolute; inset: 0 auto 0 calc(100% + 32px); width: min(calc(78.5714% - 32px), 560px); }
  .comparison-panel { position: sticky; top: 60px; display: flex; flex-direction: column; max-height: calc(100dvh - 80px); border: 1px solid var(--table-border-color); background: var(--bg); }
  .comparison-header { display: flex; justify-content: space-between; align-items: center; padding: .75rem 1rem; border-bottom: 1px solid var(--table-border-color); }
  .comparison-panel button, .comparison-panel select { min-height: 36px; font: inherit; color: var(--fg); background: var(--bg); border: 1px solid var(--table-border-color); border-radius: .25rem; padding: .25rem .5rem; }
  .comparison-panel button { cursor: pointer; }
  .comparison-panel > label { display: flex; align-items: center; gap: .75rem; margin: .75rem 1rem 0; }
  .comparison-panel select { flex: 1; min-width: 0; }
  .comparison-panel .comparison-follow { margin-block: .75rem; font-size: .875em; }
  .comparison-follow input { accent-color: var(--links); }
  .comparison-body { overflow-y: auto; overscroll-behavior: contain; min-height: 0; padding: 0 1rem 1rem; font-size: .9375em; border-top: 1px solid var(--table-border-color); }
  .comparison-body h2 { margin-top: 1rem; font-size: 1.25em; }
  .comparison-panel :focus-visible { outline: 2px solid var(--links); outline-offset: 2px; }
  body.study-open:not(.study-fullscreen) .comparison-panel { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto auto minmax(0, 1fr); box-sizing: border-box; max-height: calc(100dvh - var(--study-height, 56dvh) - 65px); }
  body.study-open:not(.study-fullscreen) .comparison-header { grid-column: 1 / -1; padding: 0 .75rem; }
  body.study-open:not(.study-fullscreen) .comparison-panel > label { margin: .125rem .5rem; }
  body.study-open:not(.study-fullscreen) .comparison-body { grid-column: 1 / -1; padding-bottom: .25rem; }
  body.study-open:not(.study-fullscreen) .lesson-outline nav { max-height: calc(100dvh - var(--study-height, 56dvh) - 90px); }
}
.content h2[id] { scroll-margin-top: var(--lesson-offset, 165px); }
.content main:has(.guide-outline) h2[id] { scroll-margin-top: 70px; }
.lesson-toolbar :focus-visible { outline: 2px solid var(--links); outline-offset: 3px; }
.content:has(.report-catalog) { max-width: 1120px; }
.content main.report-catalog { max-width: 1040px; margin-inline: auto; }
.report-toolbar { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 1rem; align-items: end; }
.report-choices { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem; }
.report-search { display: flex; align-items: end; gap: .65rem; }
.report-toolbar label { display: flex; flex-direction: column; align-items: stretch; gap: .35rem; min-width: 0; color: var(--icons); font-size: .83em; font-weight: 600; white-space: nowrap; }
.report-toolbar select { min-height: 40px; font-size: 1.16em; font-weight: 400; }
.report-query { flex: 1; }
.report-toolbar input { box-sizing: border-box; min-height: 40px; padding: .4rem .55rem; font: inherit; font-size: 1.16em; font-weight: 400; color: var(--fg); background: var(--bg); border: 1px solid var(--table-border-color); border-radius: .25rem; min-width: 0; width: 100%; }
.report-toolbar button { min-height: 40px; padding: .4rem .7rem; font: inherit; color: var(--fg); background: var(--bg); border: 1px solid var(--table-border-color); border-radius: .25rem; cursor: pointer; }
.report-toolbar button:disabled { opacity: .5; cursor: default; }
.report-toolbar output { align-self: center; white-space: nowrap; font-size: .875em; color: var(--icons); font-variant-numeric: tabular-nums; }
.report-catalog h2 { margin-top: 2rem; padding-bottom: .5rem; border-bottom: 1px solid var(--table-border-color); }
.report-catalog table { display: table; width: 100%; table-layout: fixed; border: 0; border-collapse: collapse; }
.report-catalog th:first-child { width: 13%; }
.report-catalog th:last-child { width: 26%; }
.report-catalog th { background: transparent; color: var(--icons); font-size: .84em; font-weight: 600; text-align: left; }
.report-catalog th, .report-catalog td { border: 0; border-bottom: 1px solid var(--table-border-color); }
.report-catalog tbody tr, .report-catalog tbody tr:nth-child(even) { background: transparent; }
.report-catalog tbody td:first-child { font-weight: 600; }
.report-catalog td { overflow-wrap: anywhere; }
.report-catalog td a { display: inline-block; white-space: nowrap; padding: .25rem 0; }
.report-catalog tbody tr:hover, .report-catalog tbody tr:focus-within { background: var(--table-alternate-bg); }
#mdbook-sidebar-toggle:focus-visible { outline: 2px solid var(--links); outline-offset: -4px; }
.report-catalog [hidden], .sidebar-backdrop[hidden] { display: none !important; }
@media (max-width: 900px) {
  .report-toolbar { grid-template-columns: 1fr; gap: .55rem; }
  #mdbook-sidebar-toggle-anchor:checked ~ .page-wrapper { margin-inline-start: 0; transform: none; }
  #mdbook-sidebar { top: 50px; width: min(300px, calc(100vw - 56px)); z-index: 300; }
  #mdbook-sidebar-resize-handle { display: none; }
  #mdbook-menu-bar { z-index: 400; }
  .sidebar-backdrop { display: block; position: fixed; inset: 50px 0 0; z-index: 200; border: 0; background: oklch(25% .01 240 / .25); cursor: pointer; }
}
@media (max-width: 600px) {
  #mdbook-menu-bar a[href$="print.html"] { display: none; }
  .chapter-index-row { grid-template-columns: 1.75rem minmax(0, 1fr); gap: .25rem .6rem; padding: .8rem 0; }
  .chapter-actions { grid-column: 2; flex-wrap: wrap; gap: .15rem .9rem; }
  .report-choices { gap: .4rem; }
  .report-choices label { gap: .15rem; }
  .report-choices select { width: 100%; }
  .report-catalog table, .report-catalog tbody { display: block; width: 100%; }
  .report-catalog thead { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .report-catalog tbody tr { display: grid; grid-template-columns: 5.25rem minmax(0, 1fr); gap: .1rem .75rem; padding: .55rem .1rem; border-bottom: 1px solid var(--table-border-color); }
  .report-catalog tbody td { display: block; width: auto; padding: 0; border: 0; }
  .report-catalog tbody td:first-child { font-size: .875em; color: var(--icons); }
  .report-catalog tbody td:last-child { grid-column: 2; font-size: .875em; }
  .report-catalog tbody td:last-child a { padding: .2rem .5rem .2rem 0; }
}
@media (max-width: 440px) { .report-search { flex-wrap: wrap; } .report-query { flex-basis: calc(100% - 70px); } .report-toolbar output { margin-left: auto; } }
@media (max-width: 440px) { .lesson-links { gap: .8rem 1.2rem; } .lesson-primary { width: 100%; box-sizing: border-box; border-bottom: 1px solid var(--table-border-color); } .lesson-primary a { flex: 1; } .lesson-links > a { min-height: 40px; padding-inline: .6rem; } .content main:has(.lesson-toolbar) { padding-bottom: 5rem; } }
@media (max-height: 500px) {
  .lesson-toolbar { position: static; }
  .content h2[id] { scroll-margin-top: 70px; }
}
@media (max-height: 600px) { .study-panel { top: 50px; height: auto; } }
@media print { .lesson-toolbar, .lesson-outline, .lesson-comparison, .study-panel { display: none; } .content main.comparison-open { margin: auto; max-width: 760px; } body.study-fullscreen { overflow: visible; } body.study-open .page-wrapper { padding-bottom: 0; } }
@media print { .content details { display: block; } }
@media print { body.study-side .content { width: auto; margin: auto; } }

:is(.study-header, .comparison-panel, .report-toolbar, .report-choices, .figure-viewer-toolbar) :is(button, select, input) {
  border-radius: 6px;
  border: 1px solid var(--table-border-color);
  color: var(--fg);
  background-color: var(--bg);
  font: inherit;
  min-height: 36px;
  padding: .4rem .65rem;
}
:is(.study-header, .comparison-panel, .report-toolbar, .report-choices) select {
  appearance: none;
  padding-right: 2rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath d='m4 6 4 4 4-4' fill='none' stroke='%23758085' stroke-width='1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right .6rem center;
}
:is(.study-header, .comparison-panel, .report-toolbar, .figure-viewer-toolbar) button:hover:not(:disabled) {
  border-color: var(--links);
  background-color: var(--quote-bg);
}
:is(.study-header, .comparison-panel, .report-toolbar, .report-choices, .figure-viewer-toolbar) :focus-visible {
  outline: 2px solid var(--links);
  outline-offset: 2px;
}
