/* Read mode: retain the diagram atlas's colors and use a measured prose column. */
.reading-page { background: var(--paper); }
.reading-page .app-header { min-height: 86px; }
.docs-layout { display: grid; grid-template-columns: 240px minmax(0, 74ch) minmax(150px, 190px); gap: 40px; max-width: 1480px; padding: 32px 28px 48px; margin: auto; align-items: start; }
.docs-sidebar, .docs-toc { position: sticky; top: 76px; max-height: calc(100dvh - 100px); overflow-y: auto; scrollbar-width: thin; scrollbar-color: #b9cadd transparent; }
.docs-sidebar { padding-right: 10px; }
.docs-version { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px; font-size: 14px; font-weight: 650; padding-bottom: 16px; }
.docs-version span { font-size: 11px; color: var(--muted); font-weight: 400; }
.docs-search { padding-bottom: 18px; margin-bottom: 18px; border-bottom: 1px solid var(--line); }
.docs-search label { display: block; font-size: 12px; font-weight: 600; margin-bottom: 7px; }
.search-field { position: relative; }
.search-field input { width: 100%; min-width: 0; border: 1px solid #b9cadd; border-radius: 5px; background: var(--paper); padding: 9px 26px 9px 10px; color: var(--ink); font-size: 12px; }
.search-field input::placeholder { color: var(--muted); opacity: 1; }
.search-field kbd { position: absolute; right: 10px; top: 9px; color: var(--muted); pointer-events: none; }
#search-status { font-size: 12px; color: var(--muted); margin-top: 8px; }
#search-status:empty { display: none; }
#search-results { margin: 12px 0 0; padding: 0; list-style: none; }
#search-results li { border-bottom: 1px solid var(--line); padding: 10px 0; }
#search-results a { color: var(--blue); font-size: 13px; font-weight: 600; overflow-wrap: anywhere; text-underline-offset: 3px; }
#search-results p { font-size: 12px; color: var(--muted); margin-top: 4px; line-height: 1.5; }
.docs-menu { border: 0; margin: 0; padding: 0; }
.docs-menu > summary { display: none; }
.docs-nav-group { margin-bottom: 20px; }
.docs-nav-group > p { font-size: 12px; font-weight: 650; margin: 0 0 5px 8px; }
.docs-nav-group ul, .docs-toc ul { list-style: none; padding: 0; margin: 0; }
.docs-nav-group a { display: block; padding: 6px 8px; font-size: 13px; line-height: 1.45; color: var(--muted); text-decoration: none; border-radius: 4px; }
.docs-nav-group a:hover { color: var(--blue); background: var(--ground); }
.docs-nav-group a[aria-current] { color: var(--blue); font-weight: 600; background: var(--blue-soft); }
.docs-main { min-width: 0; }
.docs-main:focus, .materials-main:focus { outline: none; }
.docs-breadcrumb { display: flex; gap: 9px; flex-wrap: wrap; color: var(--muted); font-size: 12px; margin: 2px 0 24px; }
.docs-breadcrumb a { color: var(--muted); text-underline-offset: 3px; }
.prose { font-size: 16px; line-height: 1.75; overflow-wrap: break-word; }
.prose > :first-child { margin-top: 0; }
.prose h1 { font-size: 32px; line-height: 1.25; font-weight: 650; letter-spacing: -.025em; margin: 0 0 24px; overflow-wrap: anywhere; text-wrap: balance; }
.prose h2 { font-size: 23px; line-height: 1.35; margin: 42px 0 15px; letter-spacing: -.015em; overflow-wrap: anywhere; text-wrap: balance; }
.prose h3 { font-size: 18px; line-height: 1.4; margin: 30px 0 12px; overflow-wrap: anywhere; }
.prose h4 { font-size: 16px; margin: 24px 0 10px; }
.prose p { margin: 0 0 18px; }
.prose a, .page-source a, .reading-footer a { color: var(--blue); text-underline-offset: 3px; }
.prose a:hover, .reading-footer a:hover { color: var(--navy); }
.prose strong { font-weight: 650; }
.prose ul, .prose ol { margin: 0 0 22px; padding-left: 24px; }
.prose li { margin: 7px 0; padding-left: 3px; }
.prose li > p { margin-bottom: 8px; }
.prose :is(h2, h3, h4) { scroll-margin-top: 74px; }
.prose .heading-anchor { color: var(--muted); opacity: 0; text-decoration: none; font-size: .8em; }
.prose :is(h2, h3):hover .heading-anchor, .prose .heading-anchor:focus-visible { opacity: 1; }
.prose :not(pre) > code { font-size: .85em; padding: 2px 4px; background: var(--ground); border-radius: 3px; overflow-wrap: anywhere; }
.code-block { border: 1px solid var(--line); border-radius: 6px; background: #f5f7fa; margin: 22px 0; min-width: 0; }
.code-toolbar { display: flex; align-items: center; justify-content: space-between; min-height: 34px; padding: 4px 14px; border-bottom: 1px solid var(--line); font-size: 11px; color: var(--muted); }
.copy-code { border: 0; background: transparent; color: var(--blue); font-size: 12px; min-height: 28px; padding: 2px 0 2px 12px; }
.copy-code:hover { text-decoration: underline; text-underline-offset: 3px; }
.copy-code:disabled { color: var(--muted); cursor: default; }
.prose pre { overflow: auto; margin: 0; padding: 16px; tab-size: 4; scrollbar-width: thin; scrollbar-color: #a8bfd4 #f5f7fa; }
.prose pre code { font-size: 12px; line-height: 1.75; white-space: pre; }
.hljs-keyword, .hljs-built_in, .hljs-selector-tag { color: #734086; }
.hljs-string, .hljs-attr, .hljs-doctag { color: #286647; }
.hljs-comment { color: #53677e; }
.hljs-title, .hljs-title.function_, .hljs-title.class_ { color: #245e98; }
.hljs-number, .hljs-literal, .hljs-symbol { color: #98471e; }
.hljs-params, .hljs-subst { color: var(--ink); }
.table-scroll { overflow-x: auto; max-width: 100%; margin: 22px 0 28px; scrollbar-width: thin; scrollbar-color: #a8bfd4 transparent; }
.prose table { width: 100%; border-collapse: collapse; font-size: 13px; line-height: 1.65; }
.prose th { text-align: left; font-size: 12px; font-weight: 650; background: var(--ground); }
.prose th, .prose td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; min-width: 110px; }
.prose td:first-child { min-width: 130px; }
.prose td code { white-space: normal; }
.prose blockquote { margin: 24px 0; padding: 16px 20px; border: 1px solid var(--line); background: var(--ground); }
.prose blockquote p:last-child { margin-bottom: 0; }
.docs-toc { padding-left: 16px; border-left: 1px solid var(--line); }
.docs-toc > p { font-size: 12px; font-weight: 600; margin-bottom: 10px; }
.docs-toc li { margin: 9px 0; }
.docs-toc a { color: var(--muted); text-decoration: none; font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }
.docs-toc a:hover, .docs-toc a[aria-current] { color: var(--blue); text-decoration: underline; text-underline-offset: 3px; }
.docs-pagination { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 48px; padding-top: 20px; border-top: 1px solid var(--line); }
.docs-pagination a { color: var(--blue); text-decoration: none; font-size: 14px; line-height: 1.5; }
.docs-pagination a:last-child { text-align: right; }
.docs-pagination a:hover { text-decoration: underline; text-underline-offset: 3px; }
.docs-pagination a span { display: block; color: var(--muted); font-size: 11px; margin-bottom: 4px; }
.page-source { margin-top: 32px; font-size: 12px; }
.reading-footer { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; border-top: 1px solid var(--line); padding: 20px; font-size: 12px; color: var(--muted); }
.materials-main { max-width: 80ch; padding: 40px 24px 64px; margin: auto; }
[hidden] { display: none !important; }
@media (max-width: 1200px) {
  .docs-layout { grid-template-columns: 225px minmax(0, 74ch); gap: 32px; max-width: 1120px; }
  .docs-toc { display: none; }
}
@media (max-width: 900px) {
  .docs-layout { display: block; padding: 20px 22px 40px; }
  .docs-sidebar { position: static; max-height: none; overflow: visible; padding: 0; margin-bottom: 28px; }
  .docs-version { padding-bottom: 12px; }
  .docs-search { margin-bottom: 0; padding-bottom: 16px; border-bottom: 0; }
  .search-field input { font-size: 16px; padding: 10px 28px 10px 12px; }
  .search-field kbd { display: none; }
  .docs-menu { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
  .docs-menu > summary { display: list-item; padding: 12px 0; color: var(--blue); font-size: 14px; font-weight: 600; cursor: pointer; }
  .docs-menu nav { padding: 12px 0 0; }
  .docs-nav-group a { padding: 9px 8px; }
  .docs-main { max-width: 74ch; margin: auto; }
  .prose h1 { font-size: 28px; }
  .prose h2 { font-size: 22px; }
  .reading-page .app-header { align-items: flex-start; }
  .reading-page .source-link { display: none; }
}
@media (max-width: 420px) {
  .docs-layout { padding: 20px 18px 36px; }
  .prose h1 { font-size: 26px; }
  .prose pre { padding: 12px; }
  .prose pre code { font-size: 11px; }
  .docs-pagination { gap: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
