
:root {
  color-scheme: light;
  --topbar-h: 3.5rem;
  --sidebar-w: 17.5rem;
  --sidebar-toggle-left: calc(var(--sidebar-w) - 2.85rem);
  --bg-primary: #fbfbfe;
  --bg-secondary: #f3f2fa;
  --bg: #fbfbfe;
  --bg-soft: #f3f2fa;
  --bg-subtle: #eae8f5;
  --bg-sidebar: #f6f5fc;
  --code-bg: #f6f5fc;
  --diagram-bg: #fbfbfe;
  --text-primary: #19172e;
  --text-secondary: #4a4668;
  --text: #19172e;
  --text-strong: #0d0c18;
  --muted: #4a4668;
  --faint: #6c688c;
  --line: #dedbe8;
  --line-strong: #b8b3cc;
  --line-input: #c7c2db;
  --quote-border: #5b4b9e;
  --quote-text: #4a4668;
  --link: #5b4b9e;
  --link-hover: #483a82;
  --button-bg: #5b4b9e;
  --button-fg: #ffffff;
  --accent: #5b4b9e;
  --accent-hover: #483a82;
  --accent-teal: #2e7d9b;
  --accent-gold: #c98732;
  --row-emphasis-bg: #f0edf8;
  --row-emphasis-border: #5b4b9e;
  --row-hover-bg: #f4f2f9;
  --row-current-bg: #5b4b9e;
  --row-current-fg: #ffffff;
  --panel-shadow: 0 8px 24px rgba(25, 23, 46, .12);
  --code-tag: #5b4b9e;
  --code-string: #206d52;
  --diff-add-fg: #1d6a48;
  --diff-add-bg: #dff5e8;
  --diff-del-fg: #992336;
  --diff-del-bg: #fbe6e9;
  --scrollbar-thumb: #c7c2db;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.56;
  color: var(--text);
  background: var(--bg);
}

html[data-sidebar-collapsed="true"] {
  --sidebar-w: 0rem;
  --sidebar-toggle-left: .75rem;
}

:root[data-theme="dark"] {

color-scheme: dark;
  --bg-primary: #0f1021;
  --bg-secondary: #171930;
  --bg: #0f1021;
  --bg-soft: #171930;
  --bg-subtle: #212442;
  --bg-sidebar: #131428;
  --code-bg: #14162b;
  --diagram-bg: #171930;
  --text-primary: #f1f0fa;
  --text-secondary: #b4b1d1;
  --text: #f1f0fa;
  --text-strong: #ffffff;
  --muted: #b4b1d1;
  --faint: #8884ab;
  --line: #292d52;
  --line-strong: #3f4577;
  --line-input: #343a69;
  --quote-border: #8f7ee6;
  --quote-text: #b4b1d1;
  --link: #8f7ee6;
  --link-hover: #ada0f0;
  --button-bg: #8f7ee6;
  --button-fg: #0f1021;
  --accent: #8f7ee6;
  --accent-hover: #ada0f0;
  --accent-teal: #4fb3ce;
  --accent-gold: #e4a853;
  --row-emphasis-bg: #202347;
  --row-emphasis-border: #8f7ee6;
  --row-hover-bg: #1d203d;
  --row-current-bg: #8f7ee6;
  --row-current-fg: #0f1021;
  --panel-shadow: 0 8px 24px rgba(0, 0, 0, .6);
  --code-tag: #8f7ee6;
  --code-string: #4fb3ce;
  --diff-add-fg: #7ee787;
  --diff-add-bg: #123321;
  --diff-del-fg: #ffa198;
  --diff-del-bg: #3f191f;
  --scrollbar-thumb: #3f4577;

}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {

color-scheme: dark;
  --bg-primary: #0f1021;
  --bg-secondary: #171930;
  --bg: #0f1021;
  --bg-soft: #171930;
  --bg-subtle: #212442;
  --bg-sidebar: #131428;
  --code-bg: #14162b;
  --diagram-bg: #171930;
  --text-primary: #f1f0fa;
  --text-secondary: #b4b1d1;
  --text: #f1f0fa;
  --text-strong: #ffffff;
  --muted: #b4b1d1;
  --faint: #8884ab;
  --line: #292d52;
  --line-strong: #3f4577;
  --line-input: #343a69;
  --quote-border: #8f7ee6;
  --quote-text: #b4b1d1;
  --link: #8f7ee6;
  --link-hover: #ada0f0;
  --button-bg: #8f7ee6;
  --button-fg: #0f1021;
  --accent: #8f7ee6;
  --accent-hover: #ada0f0;
  --accent-teal: #4fb3ce;
  --accent-gold: #e4a853;
  --row-emphasis-bg: #202347;
  --row-emphasis-border: #8f7ee6;
  --row-hover-bg: #1d203d;
  --row-current-bg: #8f7ee6;
  --row-current-fg: #0f1021;
  --panel-shadow: 0 8px 24px rgba(0, 0, 0, .6);
  --code-tag: #8f7ee6;
  --code-string: #4fb3ce;
  --diff-add-fg: #7ee787;
  --diff-add-bg: #123321;
  --diff-del-fg: #ffa198;
  --diff-del-bg: #3f191f;
  --scrollbar-thumb: #3f4577;

  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; }
a { color: var(--link); text-underline-offset: .16em; }
a:hover { color: var(--link-hover); }
a:focus-visible, summary:focus-visible, button:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; }

.skip-link {
  position: absolute;
  top: -5rem;
  left: 1rem;
  z-index: 30;
  padding: .5rem .8rem;
  background: var(--bg);
  border: 1px solid var(--line);
}
.skip-link:focus { top: .5rem; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  min-height: var(--topbar-h);
  padding: 0 1.25rem;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.topbar a { text-decoration: none; }
.brand { display: inline-flex; align-items: center; gap: .55rem; color: var(--text-strong); font-size: 1.05rem; font-weight: 700; }
.brand img { display: block; flex-shrink: 0; }
.brand:hover { color: var(--text-strong); }
.top-links { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem; }
.top-links > a {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .32rem .6rem;
  border-radius: .375rem;
  color: var(--muted);
  font-size: .85rem;
}
.top-links > a:hover { color: var(--text); background: var(--bg-subtle); }
.top-links > a[aria-current] { color: var(--link); }
.top-github-link svg { flex-shrink: 0; }

.picker { position: relative; }
.picker summary {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .32rem .55rem;
  border-radius: .375rem;
  color: var(--muted);
  cursor: pointer;
  font-size: .85rem;
  list-style: none;
  user-select: none;
}
.picker summary::-webkit-details-marker { display: none; }
.picker summary:hover { color: var(--text); background: var(--bg-subtle); }
.picker[open] summary { color: var(--text); background: var(--bg-subtle); }
.picker-icon { flex-shrink: 0; }
.picker-value { overflow: hidden; max-width: 11rem; text-overflow: ellipsis; white-space: nowrap; }
.picker-caret { flex-shrink: 0; opacity: .7; transition: transform .12s ease; }
.picker[open] .picker-caret { transform: rotate(180deg); }
.picker-panel {
  position: absolute;
  top: calc(100% + .4rem);
  right: 0;
  z-index: 25;
  display: grid;
  min-width: 11.5rem;
  max-height: min(24rem, calc(100vh - var(--topbar-h) - 1rem));
  padding: .35rem;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: .5rem;
  background: var(--bg);
  box-shadow: var(--panel-shadow);
}
.picker-row {
  display: flex;
  align-items: center;
  gap: .5rem;
  width: 100%;
  padding: .42rem .6rem;
  border: 0;
  border-radius: .375rem;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: .85rem;
  line-height: 1.4;
  text-align: left;
  text-decoration: none;
  white-space: nowrap;
}
a.picker-row:not([aria-current]):hover,
button.picker-row:not([aria-current]):not(:disabled):hover { background: var(--bg-subtle); }
button.picker-row:disabled { color: var(--muted); cursor: default; }
.picker-row.is-current, .picker-row[aria-current] {
  background: var(--row-current-bg);
  color: var(--row-current-fg);
}
.picker-note {
  margin: .3rem .45rem .35rem;
  color: var(--muted);
  font-size: .8rem;
  line-height: 1.45;
}
.theme-icons { display: inline-flex; flex-shrink: 0; }
.theme-icon { display: none; }
html:not([data-theme-choice]) .theme-icon-system,
html[data-theme-choice="system"] .theme-icon-system,
html[data-theme-choice="light"] .theme-icon-light,
html[data-theme-choice="dark"] .theme-icon-dark { display: block; }

.top-search {
  display: flex;
  align-items: center;
  gap: .15rem;
  margin-left: .35rem;
  padding: .14rem .28rem .14rem .7rem;
  border: 1px solid var(--line-input);
  border-radius: .45rem;
  background: var(--bg);
}
.top-search:focus-within { border-color: var(--link); box-shadow: 0 0 0 1px var(--link); }
.top-search input {
  width: 10.5rem;
  min-width: 5rem;
  padding: .3rem 0;
  border: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: .83rem;
}
.top-search input:focus-visible { outline: none; }
.top-search input::placeholder { color: var(--muted); }
.top-search button {
  display: flex;
  flex-shrink: 0;
  padding: .28rem;
  border: 0;
  border-radius: .3rem;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
.top-search button:hover { color: var(--text); }

.layout {
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr) 16.5rem;
  min-height: calc(100vh - var(--topbar-h));
  transition: grid-template-columns .25s cubic-bezier(.4, 0, .2, 1);
}
.sidebar {
  position: relative;
  min-width: 0;
  width: var(--sidebar-w);
  overflow: visible;
  border-right: 1px solid var(--line);
  background: var(--bg-sidebar);
  transition: width .25s cubic-bezier(.4, 0, .2, 1), border-color .25s ease;
}
html[data-sidebar-collapsed="true"] .sidebar {
  border-right-color: transparent;
}
.nav-toggle { display: none; }
.sidebar-toggle {
  position: fixed;
  top: calc(var(--topbar-h) + 1.72rem);
  left: var(--sidebar-toggle-left);
  z-index: 15;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.65rem;
  height: 1.65rem;
  padding: 0;
  border: 0;
  border-radius: .3rem;
  background: transparent;
  color: var(--faint);
  cursor: pointer;
  transition: left .25s cubic-bezier(.4, 0, .2, 1), color .15s ease, background-color .15s ease;
}
.sidebar-toggle:hover {
  color: var(--text);
  background: var(--bg-subtle);
}
.sidebar-toggle:focus-visible {
  outline: 1.5px solid var(--line-strong);
  outline-offset: 1px;
}
html[data-sidebar-collapsed="true"] .sidebar-toggle {
  border: 1px solid var(--line);
  background: var(--bg-soft);
}
.sidebar-toggle-icon { display: block; flex-shrink: 0; }
.sidebar-icon-arrow {
  transform-origin: 9.5px 8px;
  transition: transform .2s ease;
}
html[data-sidebar-collapsed="true"] .sidebar-icon-arrow {
  transform: rotate(180deg);
}
.sidebar-inner {
  position: sticky;
  top: var(--topbar-h);
  width: 17.5rem;
  max-height: calc(100vh - var(--topbar-h));
  overflow-y: auto;
  padding: 3.7rem 1.35rem 3rem;
  scrollbar-color: var(--scrollbar-thumb) transparent;
  transition: opacity .2s ease, transform .25s cubic-bezier(.4, 0, .2, 1);
}
html[data-sidebar-collapsed="true"] .sidebar-inner {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateX(-1rem);
}
.nav-title {
  margin: 0 .3rem .7rem;
  padding-bottom: .5rem;
  border-bottom: 1px solid var(--line-strong);
  color: var(--muted);
  font-size: .95rem;
  font-weight: 700;
}
.sidebar a, .sidebar summary {
  display: block;
  padding: .24rem .35rem;
  color: var(--muted);
  font-size: .89rem;
  line-height: 1.45;
  text-decoration: none;
}
.sidebar a:hover, .sidebar summary:hover { color: var(--link); }
.sidebar a[aria-current="page"] {
  color: var(--link);
  font-weight: 700;
  background: var(--bg);
  border-radius: .25rem;
  box-shadow: inset 2px 0 0 var(--link);
}
.nav-home { margin: .45rem 0; }
.nav-section { margin: .2rem 0; }
.nav-section summary { position: relative; padding-left: 1.1rem; cursor: pointer; list-style: none; }
.nav-section summary::-webkit-details-marker { display: none; }
.nav-section summary::before {
  content: "";
  position: absolute;
  top: .69rem;
  left: .35rem;
  width: .33rem;
  height: .33rem;
  border-right: 1.5px solid var(--faint);
  border-bottom: 1.5px solid var(--faint);
  transform: rotate(-45deg);
}
.nav-section[open] summary::before { transform: rotate(45deg); }
.nav-section[open] > summary { color: var(--text); font-weight: 650; }
.nav-children { margin: .12rem 0 .5rem 1.1rem; padding-left: .7rem; border-left: 1px solid var(--line); }
.nav-children a { padding: .2rem .35rem; font-size: .83rem; }

main { min-width: 0; }
.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  max-width: 64rem;
  margin: 0 auto;
  padding: 2.4rem clamp(2rem, 4vw, 4rem) 0;
  color: var(--muted);
  font-size: .87rem;
}
.breadcrumbs a { text-decoration: none; }
.breadcrumbs a:hover { text-decoration: underline; }
article {
  max-width: 64rem;
  margin: 0 auto;
  padding: 1rem clamp(2rem, 4vw, 4rem) 6rem;
}
.home article { padding-top: 3.2rem; }
article > :first-child { margin-top: 0; }
article h1, article h2, article h3, article h4 { scroll-margin-top: calc(var(--topbar-h) + 1.5rem); line-height: 1.28; }
article h1 { margin: .2rem 0 1.25rem; font-size: clamp(2rem, 2.7vw, 2.6rem); font-weight: 700; letter-spacing: -.025em; }
article h2 { margin: 2.5rem 0 1rem; font-size: 1.55rem; font-weight: 650; }
article h3 { margin: 1.9rem 0 .8rem; font-size: 1.2rem; }
article { overflow-wrap: anywhere; }
article > * { min-width: 0; max-width: 100%; }
article p { margin: .75rem 0 1.15rem; }
article li { margin: .2rem 0; }
article pre { overflow-x: auto; max-width: 100%; margin: 1.2rem 0; padding: .85rem 1rem; border: 1px solid var(--line); border-radius: .25rem; background: var(--bg-soft); font-size: .78rem; line-height: 1.5; }
article pre code { white-space: pre; }
article :not(pre) > code { padding: .08rem .2rem; border-radius: .18rem; background: var(--bg-subtle); font-size: .85em; overflow-wrap: anywhere; }
article table { display: block; width: 100%; max-width: 100%; overflow-x: auto; border-collapse: collapse; font-size: .82rem; line-height: 1.45; }
article th, article td { min-width: 8rem; padding: .45rem .65rem; border: 1px solid var(--line); text-align: left; vertical-align: top; }
article th { background: var(--bg-subtle); }
article th:first-child, article td:first-child { position: sticky; left: 0; min-width: 10rem; background: var(--bg); }
article th:first-child { background: var(--bg-subtle); }
article tbody tr:hover > td { background: var(--row-hover-bg); }
article tbody tr.is-emphasized > td,
article tbody tr:has(> td:first-child strong):has(> td:nth-child(n+2) strong) > td {
  background: var(--row-emphasis-bg);
  color: var(--text-strong);
  font-weight: 600;
}
article tbody tr.is-emphasized > td:first-child,
article tbody tr:has(> td:first-child strong):has(> td:nth-child(n+2) strong) > td:first-child {
  box-shadow: inset 3px 0 0 var(--row-emphasis-border);
}
article tbody tr.is-emphasized:hover > td,
article tbody tr:has(> td:first-child strong):has(> td:nth-child(n+2) strong):hover > td {
  background: color-mix(in srgb, var(--row-emphasis-bg) 75%, var(--row-emphasis-border) 25%);
}
.pin-table-first-col article th:first-child,
.pin-table-first-col article td:first-child { width: 1%; white-space: nowrap; }
article blockquote { margin: 1.2rem 0; padding: .25rem 0 .25rem 1rem; border-left: 3px solid var(--quote-border); color: var(--quote-text); }
article blockquote p { margin: .2rem 0; }
article hr { margin: 2rem 0; border: 0; border-top: 1px solid var(--line); }

.reading-footer { margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.reading-footer h2 { margin: 0 0 1.1rem; color: var(--muted); font-size: 1rem; font-weight: 600; }
.related-pages { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.2rem 2rem; padding: 0; list-style: none; }
.related-pages li { margin: 0; color: var(--muted); font-size: .9rem; line-height: 1.55; }
.related-pages a:first-child { display: block; margin-bottom: .25rem; font-weight: 600; text-decoration: none; }
.related-pages a:hover { text-decoration: underline; }
.next-page { margin-top: 1.8rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.next-page h2 { margin-bottom: .6rem; }
.next-page > div { color: var(--muted); font-size: .93rem; }
.next-page a:first-child { display: block; margin-bottom: .3rem; font-weight: 600; text-decoration: none; }
.next-page a:first-child::after { content: " →"; }
.next-page a:hover { text-decoration: underline; }

.toc-panel { min-width: 0; border-left: 1px solid var(--line); }
.toc-inner { position: sticky; top: var(--topbar-h); max-height: calc(100vh - var(--topbar-h)); overflow-y: auto; padding: 2.2rem 1.1rem 2rem; scrollbar-color: var(--scrollbar-thumb) transparent; }
.page-actions { display: grid; gap: .3rem; margin: 0 0 1.8rem; }
.toc-panel .page-actions a { color: var(--link); font-size: .87rem; }
.toc-title { padding-bottom: .5rem; border-bottom: 1px solid var(--line-strong); color: var(--muted); font-size: .9rem; font-weight: 700; }
.toc-panel nav:not(.page-actions) {
  position: relative;
  margin-top: .75rem;
  padding-left: .75rem;
  border-left: 1px solid var(--line);
}
.toc-indicator {
  position: absolute;
  left: -1px;
  top: 0;
  width: 2px;
  background: var(--link);
  border-radius: 2px;
  pointer-events: none;
  opacity: 0;
  transform: translateY(0);
  transition: transform .2s cubic-bezier(.4, 0, .2, 1), height .2s cubic-bezier(.4, 0, .2, 1), opacity .15s ease;
}
.toc-panel ul { margin: 0; padding: 0; list-style: none; }
.toc-panel li { margin: .35rem 0; }
.toc-panel li ul { margin: .2rem 0 .4rem .6rem; }
.toc-panel a {
  display: block;
  padding: .2rem .45rem;
  margin: 0 -.45rem;
  border-radius: .25rem;
  color: var(--faint);
  font-size: .83rem;
  line-height: 1.4;
  text-decoration: none;
  transition: color .15s ease, background-color .15s ease;
}
.toc-panel a:hover {
  color: var(--link);
  background: var(--bg-subtle);
}
.toc-panel a.is-active,
.toc-panel a[data-active="true"],
.toc-panel a[aria-current="true"] {
  color: var(--link);
  font-weight: 600;
  background: var(--bg-subtle);
}
.toc-panel li:has(> a[href="#contents"]) { display: none; }

.section-label { margin: 0 0 .7rem; color: var(--muted); font-size: .88rem; }
.home article > h1 + p { max-width: 70ch; font-size: 1.05rem; }
.directory { max-width: 53rem; }
.directory > div { padding: .72rem .2rem .8rem; }
.directory a { font-weight: 700; text-decoration: none; }
.directory a:hover { text-decoration: underline; }
.directory p { margin: .15rem 0 0; color: var(--muted); font-size: .91rem; }
.diagram-scroll, .architecture-diagram { display: block; max-width: 100%; overflow-x: auto; }

@media (min-width: 1181px) {
  article h2#contents, article h2#contents + ul { display: none; }
}
@media (max-width: 1180px) {
  :root {
    --sidebar-w: 16.5rem;
  }
  .layout { grid-template-columns: var(--sidebar-w) minmax(0, 1fr); }
  .sidebar-inner { width: 16.5rem; }
  .toc-panel { display: none; }
}
@media (max-width: 760px) {
  :root { --topbar-h: 6rem; }
  .topbar { display: grid; grid-template-columns: 2rem minmax(0, 1fr); align-items: start; gap: .6rem; padding: .65rem 1rem; }
  .brand span { display: none; }
  .top-links > .top-docs-link, .top-github-link span, .top-devin-link span { display: none; }
  .top-links { justify-content: flex-end; gap: .35rem; }
  .top-search { flex: 1 1 100%; margin-left: 0; }
  .top-search input { width: auto; flex: 1 1 5rem; min-width: 5rem; }
  .layout { display: block; }
  .sidebar-toggle { display: none; }
  .sidebar { width: auto; overflow: visible; border-right: 0; border-bottom: 1px solid var(--line); }
  .sidebar-inner { width: auto; opacity: 1 !important; visibility: visible !important; transform: none !important; }
  .nav-toggle { display: block; width: 100%; padding: .85rem 1.25rem; border: 0; background: var(--bg-subtle); color: var(--text); text-align: left; font: inherit; cursor: pointer; }
  .nav-toggle::after { content: "+"; float: right; }
  .nav-toggle[aria-expanded="true"]::after { content: "−"; }
  .sidebar-inner { display: none; position: static; max-height: none; padding: .8rem 1rem 1rem; }
  .sidebar-inner.is-open { display: block; }
  .breadcrumbs { padding: 1.4rem 1.25rem 0; }
  article, .home article { padding: 1.5rem 1.25rem 4rem; }
  article h1 { font-size: 2rem; }
  .related-pages { grid-template-columns: 1fr; gap: 1rem; }
  .architecture-diagram, .diagram-scroll { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; }
  .architecture-diagram img, .diagram-scroll img { min-width: 720px; max-width: none; height: auto; }
}
@media (max-width: 480px) {
  .picker summary { padding: .28rem .4rem; }
  .picker-value { max-width: 7.5rem; font-size: .78rem; }
  .picker-panel { min-width: 10rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .picker-caret { transition: none; }
  .layout { transition: none; }
  .sidebar { transition: none; }
  .sidebar-inner { transition: none; }
  .sidebar-toggle { transition: none; }
  .sidebar-icon-arrow { transition: none; }
  .toc-indicator { transition: none !important; }
}

.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
input:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; }
.search-form label { display: block; margin-bottom: .4rem; color: var(--muted); }
.search-form > div { display: flex; gap: .6rem; }
.search-form input { width: 100%; min-width: 0; padding: .6rem .8rem; border: 1px solid var(--line-input); border-radius: .25rem; font: inherit; background: var(--bg); color: var(--text); }
.search-form button { padding: .6rem 1rem; border: 0; border-radius: .25rem; background: var(--button-bg); color: var(--button-fg); font: inherit; cursor: pointer; }
#search-results { padding: 0; list-style: none; }
#search-results li { padding: 1rem 0; border-top: 1px solid var(--line); }
#search-results a { font-weight: 600; }
#search-results p { margin: .4rem 0 0; color: var(--muted); font-size: .93rem; }

.code-block { margin: 1.3rem 0; overflow: hidden; border: 1px solid var(--line); border-radius: .3rem; }
.code-toolbar { display: flex; align-items: center; justify-content: space-between; padding: .35rem .85rem; border-bottom: 1px solid var(--line); background: var(--bg-soft); color: var(--muted); font-size: .72rem; }
.copy-code { border: 1px solid var(--line-input); border-radius: .25rem; padding: .2rem .65rem; background: var(--bg); color: var(--text); font: inherit; cursor: pointer; }
.copy-code:hover { border-color: var(--link); color: var(--link); }
.code-block .highlight { min-width: 0; }
.code-block pre { margin: 0; border: 0; border-radius: 0; background: var(--code-bg); padding: .85rem 1rem; font-size: .78rem; line-height: 1.5; }
.code-block .chroma { background: var(--code-bg); }
.code-block .chroma .gi { color: var(--diff-add-fg); background: var(--diff-add-bg); }
.code-block .chroma .gd { color: var(--diff-del-fg); background: var(--diff-del-bg); }
.code-block .chroma .nt { color: var(--code-tag); font-weight: 600; }

.code-block .chroma .s, .code-block .chroma .s1, .code-block .chroma .s2 { color: var(--code-string); font-weight: 400; }

.diagram-block { margin: 1.5rem 0; }
.mermaid-diagram { overflow-x: auto; padding: 1rem; border: 1px solid var(--line); border-radius: .3rem; background: var(--diagram-bg); text-align: center; }
.mermaid-diagram svg { display: block; max-width: 100%; height: auto; margin: 0 auto; }
.diagram-source { margin-top: .6rem; }
.diagram-source summary { color: var(--muted); font-size: .85rem; cursor: pointer; }
.diagram-source .code-block { margin-top: .7rem; }
.diagram-status { color: var(--muted); font-size: .9rem; }

.nav-children .nav-section > summary { font-size: .83rem; }
.code-block .chroma .line:has(.gi) { background: var(--diff-add-bg); }
.code-block .chroma .line:has(.gd) { background: var(--diff-del-bg); }

.search-form, .search-form input, .search-form select, .search-form button { font-size: .83rem; }
@media (max-width: 1180px) {
  article pre, article .code-block pre { font-size: .75rem; }
  article table { font-size: .79rem; }
}
@media (max-width: 760px) {
  article pre, article .code-block pre { padding: .75rem .85rem; font-size: .72rem; }
  article table { font-size: .75rem; }
  article th, article td { padding: .38rem .5rem; }
}

/* Celestial-Artisan Hero Banner & Feature Cards */
.hero-banner {
  position: relative;
  overflow: hidden;
  margin: 0 0 2.5rem;
  padding: 2.2rem 1.8rem;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  background:
    radial-gradient(ellipse 60% 70% at 20% 30%, color-mix(in srgb, var(--accent) 14%, transparent), transparent 70%),
    radial-gradient(ellipse 50% 60% at 75% 30%, color-mix(in srgb, var(--accent-teal) 12%, transparent), transparent 70%),
    radial-gradient(ellipse 45% 55% at 50% 90%, color-mix(in srgb, var(--accent-gold) 10%, transparent), transparent 70%),
    var(--bg-soft);
  box-shadow: 0 4px 20px rgba(0, 0, 0, .05);
}
.hero-banner-inner {
  display: flex;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
}
.hero-brand {
  flex-shrink: 0;
}
.hero-emblem-wrap {
  display: inline-flex;
  padding: 0.4rem;
  border-radius: 50%;
  background: radial-gradient(circle at center, color-mix(in srgb, var(--accent) 15%, transparent), transparent 70%);
  filter: drop-shadow(0 4px 14px color-mix(in srgb, var(--accent) 25%, transparent));
}
.hero-emblem {
  display: block;
  width: 112px;
  height: 112px;
  border-radius: 50%;
}
.hero-content {
  flex: 1 1 20rem;
  min-width: 0;
}
.hero-badge {
  display: inline-block;
  margin-bottom: 0.6rem;
  padding: 0.2rem 0.65rem;
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
  border-radius: 1rem;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 8%, transparent);
  font-size: 0.76rem;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.hero-title {
  margin: 0 0 0.6rem;
  font-size: clamp(1.8rem, 2.5vw, 2.3rem);
  font-weight: 750;
  letter-spacing: -0.025em;
  line-height: 1.2;
  color: var(--text-strong);
}
.hero-subtitle {
  margin: 0 0 1.25rem;
  max-width: 52ch;
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.55;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: center;
}
.btn-primary {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1rem;
  border-radius: 0.375rem;
  background: var(--button-bg);
  color: var(--button-fg);
  font-weight: 600;
  font-size: 0.88rem;
  text-decoration: none;
  transition: opacity .15s ease, transform .12s ease;
}
.btn-primary:hover {
  opacity: 0.92;
  color: var(--button-fg);
  text-decoration: none;
}
.btn-secondary {
  display: inline-flex;
  align-items: center;
  padding: 0.48rem 0.95rem;
  border: 1px solid var(--line-strong);
  border-radius: 0.375rem;
  background: var(--bg);
  color: var(--text);
  font-weight: 550;
  font-size: 0.88rem;
  text-decoration: none;
  transition: border-color .15s ease, background-color .15s ease;
}
.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
  text-decoration: none;
}

/* Documentation Pillars Grid */
.pillars-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
  gap: 1rem;
  margin: 1.2rem 0 2.5rem;
}
.pillar-card {
  padding: 1.2rem 1.25rem;
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  background: var(--bg-soft);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.pillar-card:hover {
  border-color: var(--line-strong);
  box-shadow: 0 4px 12px rgba(0, 0, 0, .05);
}
.pillar-card h3 {
  margin: 0 0 0.45rem;
  font-size: 1.05rem;
  font-weight: 650;
}
.pillar-card h3 a {
  color: var(--text-strong);
  text-decoration: none;
}
.pillar-card h3 a:hover {
  color: var(--link);
  text-decoration: underline;
}
.pillar-card p {
  margin: 0 0 0.75rem;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.48;
}
.pillar-card ul {
  margin: 0;
  padding-left: 1.1rem;
  font-size: 0.82rem;
}
.pillar-card li {
  margin: 0.2rem 0;
}
.pillar-card li a {
  color: var(--link);
  text-decoration: none;
}
.pillar-card li a:hover {
  text-decoration: underline;
}

/* Architecture steps */
.architecture-steps {
  margin: 1rem 0 2rem;
  padding-left: 1.4rem;
  line-height: 1.6;
}
.architecture-steps li {
  margin: 0.35rem 0;
}

