/* Docs layout adapter for shared v3. No shared shell/control copies. */
html { scroll-behavior: smooth; scrollbar-gutter: stable; }
.doc-layout { display: grid; grid-template-columns: 258px minmax(0, 1fr); gap: 36px; align-items: start; }
.doc-sidebar { position: sticky; top: 20px; min-width: 0; }
.doc-navigation { box-sizing: border-box; display: flex; flex-direction: column; width: 100%; max-height: var(--doc-nav-height, calc(100dvh - 180px)); padding: 0; overflow: hidden; }
.doc-navigation > .doc-nav-heading { flex: none; margin: 0; padding: 14px 16px; border-bottom: 1px solid var(--dpu-line); color: var(--dpu-ink); font-size: 13px; font-weight: 600; }
.doc-nav-scroll { box-sizing: border-box; min-height: 0; overflow: auto; overscroll-behavior-y: contain; scrollbar-gutter: stable; padding: 10px 7px 14px 10px; }
.doc-tree, .doc-tree ul { list-style: none; padding: 0; margin: 0; }
.doc-tree ul { margin-left: 16px; padding-left: 0; }
.doc-tree li { margin: 1px 0; }
.doc-tree-row { display: grid; grid-template-columns: 24px minmax(0, 1fr); align-items: start; }
.doc-tree a { grid-column: 2; grid-row: 1; min-width: 0; display: block; padding: 7px 6px; border-radius: 4px; color: #4b6477; line-height: 1.4; text-decoration: none; overflow-wrap: anywhere; }
.doc-navigation .doc-tree a[aria-current] { box-shadow: none; border: 0; font-weight: 600; background: #f0f6fa; color: #0869a2; }
.doc-tree-toggle { grid-column: 1; grid-row: 1; background: transparent; border: 0; color: var(--dpu-muted); width: 24px; height: 32px; display: grid; place-items: center; cursor: pointer; padding: 0; border-radius: 4px; }
.doc-tree-toggle:hover { color: var(--dpu-blue); background: var(--dpu-wash); }
.doc-tree-toggle .dpu-icon { width: 14px; height: 14px; transform: rotate(90deg); }
.doc-tree-toggle[aria-expanded=false] .dpu-icon { transform: none; }
.doc-tree :is(a, button):focus-visible { outline: 2px solid var(--dpu-focus); outline-offset: -2px; }
.doc-mobile-toggle { display: none; }
.doc-article { min-width: 0; }
.doc-breadcrumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 5px 8px; font-size: 12px; line-height: 1.6; color: var(--dpu-muted); margin-bottom: 18px; }
.doc-breadcrumbs a { color: inherit; text-decoration: none; }
.doc-breadcrumbs a:hover { color: var(--dpu-blue); text-decoration: underline; }
.doc-breadcrumbs svg { width: 12px; height: 12px; flex: none; }
.doc-article .dpu-page-title { margin: 0 0 24px; }
.doc-article :is(h2,h3,pre,table) { scroll-margin-top: 24px; }
/* Screenshots have their own baked-in shadows; don't add a second frame. */
.doc-article .dpu-prose img { border: 0; border-radius: 0; padding: 0; box-shadow: none; }
.doc-article .dpu-prose pre { margin: 18px 0 24px; }
.doc-legacy { margin: 20px 0; }
.doc-legacy > summary { cursor: pointer; }
.doc-article .doc-legacy > summary > h2 { margin: 0; font-size: 17px; }
.doc-code-tools { display: flex; justify-content: flex-end; margin-bottom: -8px; }
.doc-code-tools .dpu-btn { min-height: 28px; height: 28px; padding: 3px 8px; font-size: 12px; }
.doc-editions { margin-top: 32px; }
.doc-editions table { width: 100%; font-size: 14px; border-collapse: separate; border-spacing: 0; border: 1px solid var(--dpu-line); border-radius: 6px; overflow: hidden; }
.doc-editions :is(th,td) { border: 0; border-bottom: 1px solid var(--dpu-line); padding: 12px 14px; }
.doc-editions tbody tr:last-child :is(th,td) { border-bottom: 0; }
.doc-editions thead th, .doc-editions table:not(.dpu-availability) tbody > tr:first-child > th { background: var(--dpu-wash); text-align: center; }
.doc-editions td { text-align: center; }
.doc-editions th:first-child { text-align: left; }
.doc-editions th a { color: var(--dpu-text); text-decoration: none; }
.doc-editions th a:hover { color: var(--dpu-blue); text-decoration: underline; }
.doc-support { display: inline-flex; width: 30px; height: 30px; box-sizing: border-box; padding: 0; border: 0; border-radius: 5px; background: transparent; align-items: center; justify-content: center; vertical-align: middle; cursor: help; }
.doc-support:hover { background: var(--dpu-wash); }
.doc-support:focus-visible { outline: 2px solid var(--dpu-focus); outline-offset: 2px; }
.doc-support svg { flex: none; }
.doc-support-tooltip { position: fixed; z-index: 10; max-width: min(240px, calc(100vw - 24px)); box-sizing: border-box; border-radius: 5px; padding: 8px 11px; background: var(--dpu-ink); color: #fff; font-size: 13px; line-height: 1.4; box-shadow: 0 3px 10px #20313f26; }
@media (max-width: 980px) {
  .doc-layout { grid-template-columns: 224px minmax(0,1fr); gap: 24px; }
}
@media (max-width: 720px) {
  .doc-layout { display: block; }
  .doc-sidebar { position: static; margin-bottom: 24px; }
  .doc-mobile-toggle:not([hidden]) { display: flex; justify-content: space-between; width: 100%; margin-bottom: 8px; }
  .doc-navigation.is-enhanced:not(.is-mobile-open) { display: none; }
  .doc-navigation { max-height: min(55dvh, var(--doc-nav-height, 55dvh)); }
  .doc-editions :is(th,td) { padding: 9px 7px; }
  .doc-editions table { font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* Before enhancement, the generated availability matrix remains readable. */
.doc-editions th { font-weight: 500; color: var(--dpu-ink); }
.doc-editions tbody th { background: var(--dpu-wash); text-align: left; }
.doc-editions .editions-note { margin: 10px 0 0; font-size: 13px; color: var(--dpu-muted); }
.doc-tree-toggle[hidden], .doc-mobile-toggle[hidden] { display: none; }
.doc-mobile-toggle[aria-expanded=true] > .dpu-chevron { transform: rotate(90deg); }
.doc-article .dpu-disclosure > div { padding-inline: 0; }
.doc-site pre { tab-size: 4; }
.doc-site .dpw-body-edit {
  position: fixed; right: 18px; bottom: 18px; z-index: 2200;
  display: flex; align-items: center; gap: 8px; padding: 10px 12px;
  border-radius: 999px; background: rgba(20, 27, 44, .95);
  color: #f5f7ff; box-shadow: 0 16px 34px rgba(13, 20, 33, .35);
  backdrop-filter: blur(6px); font-family: "Segoe UI", Tahoma, sans-serif;
}
.dpw-admin-overlay-label { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: #b8c3df; }
.dpw-admin-overlay-action {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 6px 11px; border-radius: 999px; background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .12); color: #f5f7ff;
  font-size: 13px; text-decoration: none; font-weight: 600; line-height: 1;
}
.dpw-admin-overlay-action:hover { background: rgba(255, 255, 255, .16); border-color: rgba(255, 255, 255, .25); }
.dpw-admin-overlay-action:focus-visible { outline: 2px solid #8fd0ff; outline-offset: 2px; }
@media (max-width: 720px) {
  .doc-site .dpw-body-edit { left: 10px; right: 10px; bottom: 10px; flex-wrap: wrap; border-radius: 16px; }
}
