/* MultiBrain theme. Adjust these tokens for site-wide visual changes. */
:root {
  --purple: #813ed0;
  --purple-dark: #6326aa;
  --ink: #2e2639;
  --muted: #6f637b;
  --line: #e9e3f0;
  --wash: #faf8fd;
  --header: 5rem;
  --sidebar: 17.5rem;
  --radius: 1rem;
}
* { box-sizing: border-box; }
html { font-size: 16px; scroll-padding-top: calc(var(--header) + 1.5rem); }
body { margin: 0; color: var(--ink); background: #fff; font: 1rem/1.7 Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button, summary { cursor: pointer; }
button { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid #a568e0; outline-offset: 4px; }
main:focus { outline: none; }
.site-header { height: var(--header); display: flex; align-items: center; gap: 1.5rem; justify-content: space-between; padding: 0 2.5rem; border-bottom: 1px solid var(--line); background: #fff; position: sticky; top: 0; z-index: 10; }
.brand { display: inline-flex; align-items: center; gap: 1.15rem; min-width: 0; }
.official-logo { width: 11.25rem; height: auto; display: block; }
.brand-divider { height: 1.5rem; width: 1px; background: #d8cedf; }
.brand-sub { color: var(--muted); font-size: .9375rem; white-space: nowrap; }
.home-link { color: var(--muted); font-size: .875rem; display: inline-flex; align-items: center; gap: .7rem; white-space: nowrap; }
.home-link:hover { color: var(--purple); }
.layout { display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr); max-width: 100rem; margin: auto; }
#sidebar { position: sticky; top: var(--header); height: calc(100dvh - var(--header)); overflow: auto; overscroll-behavior: contain; border-right: 1px solid var(--line); padding: 2rem 1.25rem 1.5rem; display: flex; flex-direction: column; scrollbar-width: thin; }
#sidebar nav { display: flex; flex-direction: column; gap: .18rem; }
.aside-label { color: #78658b; font-weight: 600; font-size: .875rem; margin: 0 .8rem 1rem; }
#sidebar nav > a { padding: .55rem .8rem; display: flex; align-items: center; gap: .45rem; color: #63566e; border-radius: .5rem; font-size: .875rem; line-height: 1.6; border-left: 2px solid transparent; }
#sidebar nav > a:hover { background: var(--wash); color: var(--purple); }
#sidebar nav > a.active { background: #f1e7fc; border-left-color: var(--purple); color: var(--purple-dark); font-weight: 600; }
#sidebar .nav-group-title { font-size: .8125rem; line-height: 1.5; font-weight: 750; color: var(--purple-dark); letter-spacing: .065em; text-transform: uppercase; margin: 1.6rem .35rem .45rem; padding: .75rem .45rem .25rem; border-top: 1px solid #d9c9e8; }
.nav-pill { font-size: .75rem; font-weight: 400; line-height: 1.6; border: 1px solid #e0d7e8; border-radius: .25rem; margin-left: auto; padding: 0 .35rem; }
.aside-footer { font-size: .75rem; color: #94849e; margin: auto .8rem 0; padding-top: 2.5rem; }
main { min-width: 0; padding: 2rem clamp(1.5rem, 3.5vw, 4rem); }
.breadcrumb { display: flex; align-items: center; flex-wrap: wrap; gap: .6rem; font-size: .8125rem; color: #85758f; margin-bottom: 1.75rem; line-height: 1.5; }
.breadcrumb a:hover { color: var(--purple); }
.breadcrumb [aria-current] { color: var(--ink); }
.hero { border: 1px solid #ead9fa; border-radius: 1.25rem; background: linear-gradient(112deg, #fbf7ff, #f1e4ff); padding: 2rem 2.3rem; }
.eyebrow { display: block; font-size: .8125rem; color: var(--purple); font-weight: 600; letter-spacing: .055em; }
.hero h1 { margin: .65rem 0 .85rem; font-size: clamp(2rem, 3vw, 2.8rem); font-weight: 600; line-height: 1.18; letter-spacing: -.035em; }
.hero p { margin: 0; max-width: 44rem; font-size: 1rem; color: #715f80; line-height: 1.75; }
.hero-bottom { margin-top: 1.3rem; display: flex; align-items: center; flex-wrap: wrap; gap: 1.25rem; }
.button { display: inline-flex; justify-content: center; align-items: center; gap: 1.25rem; padding: .65rem 1.25rem; border: 1px solid transparent; border-radius: 2rem; background: var(--purple); color: white; font-size: .875rem; font-weight: 500; }
.button:hover { background: var(--purple-dark); }
.hero-meta { font-size: .8125rem; color: #826792; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin: 1.9rem 0 1rem; }
.section-head h2 { font-size: 1.3rem; line-height: 1.4; margin: 0; letter-spacing: -.02em; font-weight: 600; }
.section-head > span { font-size: .75rem; color: #897695; letter-spacing: .025em; }
.path-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.1rem; }
.path-card { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.4rem 1.5rem; transition: border-color .16s, background-color .16s; }
.path-card:hover { border-color: #ba8ae6; background: #fdfbff; }
.card-top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.icon { width: 2.65rem; height: 2.65rem; display: grid; place-items: center; color: var(--purple); background: #f3eafa; border-radius: .75rem; font-size: 1.4rem; }
.mini { color: #8b759d; font-size: .75rem; letter-spacing: .06em; }
.path-card h3 { font-size: 1.2rem; font-weight: 600; margin: 1rem 0 .5rem; line-height: 1.4; }
.path-card p { color: var(--muted); font-size: 1rem; margin: 0 0 1.25rem; line-height: 1.65; }
.card-link { font-size: .875rem; color: var(--purple-dark); display: flex; justify-content: space-between; gap: .5rem; font-weight: 500; margin-top: auto; }
.reference-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.ref { border: 1px solid var(--line); border-radius: .8rem; padding: 1.1rem 1.3rem; }
.ref:hover { border-color: #c7a2e6; background: var(--wash); }
.ref-icon { color: var(--purple); font-size: 1.3rem; line-height: 1.4; }
.ref h3 { font-size: 1rem; line-height: 1.5; margin: .5rem 0 .35rem; }
.ref p { color: var(--muted); font-size: .9375rem; margin: 0; }
.launch-banner { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; border-radius: .8rem; background: var(--wash); padding: 1.25rem 1.5rem; margin-top: 1.75rem; }
.launch-banner strong { font-size: 1rem; font-weight: 600; }
.launch-banner p { font-size: .9375rem; color: var(--muted); margin: .25rem 0 0; }
.launch-banner a { font-size: .875rem; color: var(--purple-dark); white-space: nowrap; }
.footer { border-top: 1px solid var(--line); display: flex; justify-content: space-between; align-items: flex-start; gap: 1.5rem; margin-top: 2.5rem; padding: 1.3rem 0 .5rem; font-size: .75rem; color: #8c7b99; }
.footer a { color: var(--purple-dark); white-space: nowrap; }
.doc { max-width: 57rem; }
.doc-title { font-weight: 600; font-size: clamp(2rem, 3vw, 2.6rem); line-height: 1.2; letter-spacing: -.03em; margin: .7rem 0 1rem; overflow-wrap: anywhere; }
.lead { font-size: 1.0625rem; color: var(--muted); margin: 0 0 1.75rem; line-height: 1.75; }
.doc h2 { font-size: 1.4rem; line-height: 1.4; font-weight: 600; margin: 2rem 0 .8rem; letter-spacing: -.015em; }
.doc h3 { font-size: 1.125rem; line-height: 1.5; margin: 1.4rem 0 .65rem; }
.doc p, .doc li { color: #62566e; }
.doc p { margin: .8rem 0; }
.doc ul, .doc ol { padding-left: 1.35rem; }
.doc li { padding-left: .15rem; margin: .55rem 0; }
.doc p a { color: var(--purple-dark); text-decoration: underline; text-decoration-color: #d7bcea; text-underline-offset: .2em; }
.note { border-left: 3px solid var(--purple); border-radius: 0 .55rem .55rem 0; background: #f7f1fc; color: #715b83; font-size: .9375rem; padding: 1rem 1.1rem; margin: 1.5rem 0; }
.table-wrap { max-width: 100%; overflow-x: auto; border: 1px solid var(--line); border-radius: .7rem; margin: 1rem 0; }
table { border-collapse: collapse; width: 100%; font-size: .9375rem; line-height: 1.7; }
th, td { text-align: left; vertical-align: top; padding: .85rem 1rem; border-bottom: 1px solid var(--line); }
th { background: var(--wash); color: #6d577f; font-weight: 600; white-space: nowrap; }
tr:last-child td { border-bottom: none; }
td:first-child { width: 31%; color: var(--ink); }
.field-table td:first-child { font-family: Consolas, "Liberation Mono", monospace; color: var(--purple-dark); font-size: .875rem; overflow-wrap: anywhere; min-width: 12rem; }
code { font-family: Consolas, "Liberation Mono", monospace; }
.codebox { background: #241b30; border: 1px solid #332341; border-radius: .8rem; overflow: hidden; margin: 1.4rem 0; }
.codehead { padding: .75rem 1rem; background: #30223e; color: #eadcf6; display: flex; gap: 1rem; align-items: center; justify-content: space-between; font-size: .875rem; }
.code-language { color: #bba7cc; font-size: .75rem; margin-left: .75rem; white-space: nowrap; }
.copy { color: #f3e9fd; background: transparent; border: 1px solid #7b608f; border-radius: .35rem; font-size: .8125rem; padding: .32rem .7rem; white-space: nowrap; min-height: 2rem; }
.copy:hover { background: #49305f; }
.codebox pre { margin: 0; padding: 1.3rem 1.4rem; overflow-x: auto; line-height: 1.8; font-size: .875rem; color: #e0d3ed; tab-size: 2; }
.codebox pre:focus-visible { outline-offset: -4px; }
.codebox code { font-size: inherit; }
.key { color: #caa1f3; }
.str { color: #bdddaf; }
.num { color: #f1c691; }
.literal { color: #97d7e4; }
.next { display: flex; flex-direction: column; gap: .35rem; border: 1px solid var(--line); padding: 1.1rem 1.4rem; border-radius: .7rem; margin-top: 2rem; text-align: right; color: var(--purple-dark); font-size: 1rem; }
.next:hover { background: var(--wash); border-color: #cfafea; }
.next small { font-size: .8125rem; color: var(--muted); }
.progress { color: var(--purple-dark); font-size: .875rem; font-weight: 500; margin: 1rem 0; }
.checklist { display: grid; gap: .7rem; }
.checklist label { display: flex; align-items: flex-start; gap: .85rem; border: 1px solid var(--line); border-radius: .6rem; padding: .85rem 1rem; cursor: pointer; }
.checklist label:has(input:checked) { border-color: #c5a2e4; background: #fbf7ff; }
.checklist input { accent-color: var(--purple); width: 1.1rem; height: 1.1rem; flex: none; margin: .3rem 0 0; }
details { border-bottom: 1px solid var(--line); padding: 1rem 0; }
summary { font-size: 1rem; font-weight: 600; padding-right: .5rem; }
summary::marker { color: var(--purple); }
.source-link { font-size: .875rem; }
#menu { display: none; }
.skip { position: fixed; top: -6rem; left: 1rem; background: white; color: var(--purple-dark); padding: .6rem 1rem; z-index: 30; }
.skip:focus { top: .6rem; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.clipboard-buffer { position: fixed; left: -10000px; top: 0; }
.no-js { padding: 1rem 2rem; color: var(--purple-dark); }
@media (min-width: 1450px) { .reference-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 1080px) {
  :root { --sidebar: 16rem; }
  .site-header { padding: 0 1.5rem; }
  main { padding: 1.5rem; }
  #sidebar { padding: 1.5rem .8rem; }
  .section-head > span { display: none; }
  .launch-banner { align-items: flex-start; flex-direction: column; gap: .7rem; }
}
@media (max-width: 860px) {
  :root { --header: 4.5rem; }
  .site-header { padding: 0 1.15rem; gap: 1rem; }
  .brand-sub, .brand-divider { display: none; }
  .official-logo { width: 10rem; }
  .home-link { margin-left: auto; }
  #menu { display: inline-flex; align-items: center; gap: .55rem; border: 1px solid var(--line); border-radius: .5rem; color: var(--purple-dark); background: var(--wash); padding: .5rem .7rem; font-size: .875rem; min-height: 2.75rem; }
  .layout { display: block; }
  #sidebar { display: none; position: fixed; inset: var(--header) 0 0; z-index: 9; background: #fff; border-right: none; height: calc(100dvh - var(--header)); padding: 1.5rem; }
  .menu-open { overflow: hidden; }
  .menu-open #sidebar { display: flex; }
  #sidebar nav > a { padding: .7rem .85rem; }
  main { padding: 1.4rem 1.2rem; }
  .hero { padding: 1.5rem; }
}
@media (max-width: 580px) {
  .home-link { font-size: .8125rem; max-width: 5.5rem; white-space: normal; line-height: 1.35; }
  .official-logo { width: 8.6rem; }
  .brand { gap: 0; }
  .site-header { gap: .65rem; }
  #menu { gap: .4rem; padding: .45rem .55rem; }
  .path-grid, .reference-grid { grid-template-columns: 1fr; }
  .hero-meta { width: 100%; }
  .hero h1 { font-size: 2rem; }
  .path-card { padding: 1.3rem; }
  .footer { flex-direction: column; gap: .75rem; }
  .codehead { align-items: flex-start; }
  .code-language { display: block; margin-left: 0; margin-top: .2rem; }
  th, td { padding: .75rem; }
  .table-wrap table { min-width: 28rem; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }
@media print {
  .site-header, #sidebar, .breadcrumb, .copy, .next, .footer, .skip { display: none !important; }
  .layout { display: block; }
  main { padding: 0; }
  .doc { max-width: none; }
  .codebox { background: #fff; color: #111; border-color: #ccc; }
  .codehead { background: #f4f4f4; color: #222; }
  .codebox pre, .codebox span { color: #111; white-space: pre-wrap; overflow-wrap: anywhere; }
  .table-wrap { overflow: visible; }
  table { font-size: .8rem; }
  h1, h2, h3 { break-after: avoid; }
}
@media (max-width: 400px) {
  .official-logo { width: 7rem; }
  .home-link { font-size: .75rem; max-width: 4.5rem; }
  .site-header { padding: 0 .9rem; }
}
