:root { --content-max-width: 860px; }
.content main { line-height: 1.65; }
.content h1 { margin-top: 1.25em; }
.content h2 { margin-top: 1.8em; }
.content blockquote { border-left: 3px solid #627a91; padding: .25em 1em; }
.doc-context { display:flex; justify-content:space-between; gap:1rem; margin:1rem 0; font-size:.85em; }
.doc-context .product { letter-spacing:.09em; font-weight:600; }
.chapter li { line-height:1.6; }
/* Follow mdBook's native hierarchy; no separately maintained sidebar. */
:root {
  --docs-nav-text: var(--sidebar-fg);
  --docs-nav-heading: var(--sidebar-fg);
  --docs-nav-line: var(--sidebar-spacer);
  --docs-nav-active: var(--sidebar-active);
  --docs-nav-active-bg: color-mix(in srgb, var(--sidebar-active) 12%, transparent);
}
.light {
  --docs-nav-text: #46566e;
  --docs-nav-heading: #26364c;
  --docs-nav-line: #dce3ed;
  --docs-nav-active: #5146bc;
  --docs-nav-active-bg: #efedfc;
}
.chapter { margin-top: 0; }
.chapter li.chapter-item { margin-top: .15rem; align-items: flex-start; }
.chapter li.chapter-item:not(:has(> .toggle))::before { content: ''; flex: 0 0 2rem; }
.chapter li > a:not(.toggle) {
  flex: 1;
  min-width: 0;
  padding: .4rem .4rem;
  border-radius: 0;
  color: var(--docs-nav-text);
  font-size: 1.35rem;
  line-height: 1.55;
  overflow-wrap: anywhere;
}
.chapter li > a:not(.toggle):hover { color: var(--docs-nav-active); background: var(--docs-nav-active-bg); }
.chapter li > a.active:not(.toggle) {
  color: var(--docs-nav-active);
  font-weight: 600;
}
.chapter a:focus-visible { outline: 2px solid var(--docs-nav-active); outline-offset: 2px; }
.chapter .section { padding-left: .8rem; margin-left: 0; border-left: 0; }
/* Products: small caps, a rule, and space above each group. */
.chapter > .chapter-item:has(+ li > .section) {
  margin-top: 2rem;
  padding-top: 1.3rem;
  border-top: 1px solid var(--docs-nav-line);
}
.chapter > .chapter-item:has(+ li > .section) > a:not(.toggle) {
  color: var(--docs-nav-heading);
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: .075em;
  text-transform: uppercase;
}
/* Section and subsection parents remain distinct from task links. */
.section > .chapter-item:has(+ li > .section) { margin-top: 1.25rem; }
.section > .chapter-item:has(+ li > .section) > a:not(.toggle) { font-weight: 650; color: var(--docs-nav-heading); }
.chapter li > a.toggle {
  order: -1;
  display: flex;
  flex: 0 0 2rem;
  align-items: center;
  justify-content: center;
  align-self: flex-start;
  min-height: 2.9rem;
  margin: 0;
  padding: 0;
  border-radius: 0;
  color: var(--docs-nav-text);
  opacity: 1;
}
.chapter li > a.toggle > div { display: none; }
.chapter li > a.toggle::before {
  content: '';
  width: .55rem;
  height: .55rem;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(-45deg);
  transition: transform 120ms ease;
}
.chapter li.expanded > a.toggle::before { transform: rotate(45deg); }
.chapter li > a.toggle:hover { color: var(--docs-nav-active); background: var(--docs-nav-active-bg); }
.chapter li > a.active:not(.toggle) { color: var(--docs-nav-active); }
@media (pointer: coarse) {
  .chapter li > a:not(.toggle) { padding-top: .7rem; padding-bottom: .7rem; }
  .chapter li > a.toggle { flex-basis: 2.4rem; min-height: 3.5rem; }
  .chapter li.chapter-item:not(:has(> .toggle))::before { flex-basis: 2.4rem; }
}
@media (prefers-reduced-motion: reduce) { .chapter li > a.toggle::before { transition: none; } }
.product-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(220px,1fr)); gap:1rem; margin:1.5rem 0; }
.product-card { border:1px solid var(--table-border-color); border-radius:6px; padding:1.2rem; }
.product-card h2 { margin-top:0; }
.product-card p { margin-bottom:0; }
.content img { border:1px solid var(--table-border-color); border-radius:4px; }
@media print { .doc-context { display:none; } }
