/* Reading layouts shared by the document index and imported source views. */
[hidden] { display: none !important; }
.skip-link { position: fixed; top: 0.75rem; left: 1rem; z-index: 20; transform: translateY(-200%); padding: 0.7rem 1rem; background: var(--surface); border: 2px solid var(--accent); border-radius: 8px; }
.skip-link:focus { transform: none; }
.docs-home { max-width: 1080px; }
.docs-introduction { margin-top: 2.5rem; }
.docs-introduction h1 { font-size: clamp(2.3rem, 5vw, 4rem); line-height: 1.2; margin: 0.8rem 0 1.5rem; }
.docs-introduction > p { max-width: 48rem; }
.docs-reading-path { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 0; margin: 2.5rem 0; list-style: none; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.docs-reading-path li + li { border-left: 1px solid var(--line); }
.docs-reading-path a { display: grid; gap: 0.3rem; padding: 1.3rem; text-decoration: none; }
.docs-reading-path a:hover strong { color: var(--accent); }
.docs-reading-path span { color: var(--accent-dark); font-size: 0.8rem; font-weight: 700; letter-spacing: 0.12em; }
.docs-reading-path small { color: var(--muted); }
.docs-filter { padding: 1.3rem; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-strong); }
.docs-filter label { display: block; margin-bottom: 0.5rem; font-weight: 700; }
.docs-filter > div { display: flex; gap: 0.6rem; }
.docs-filter input { min-width: 0; width: 100%; border: 1px solid var(--line); background: var(--surface); border-radius: 8px; padding: 0.75rem; font: inherit; color: var(--ink); }
.docs-filter button { flex-shrink: 0; font: inherit; cursor: pointer; }
.docs-filter p { margin: 0.5rem 0 0; color: var(--muted); font-size: 0.85rem; }
.docs-category { margin-top: 3.5rem; }
.docs-category .section-heading { margin-bottom: 1rem; }
.docs-category h2 { font-size: 1.6rem; }
.docs-catalog { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.docs-catalog .portal-card { padding: 1.4rem; }
.docs-catalog h3 { font-size: 1.2rem; margin: 0; }
.docs-about { padding-top: 3rem; margin-top: 3.5rem; border-top: 1px solid var(--line); }
.docs-about h2 { font-size: 1.5rem; }
.docs-about summary, .docs-source-details summary, .docs-mobile-menu summary, .docs-mobile-toc summary { cursor: pointer; font-weight: 700; }
.docs-shell { display: grid; grid-template-columns: 210px minmax(0, 760px) 190px; gap: clamp(1.5rem, 3vw, 3rem); width: min(1320px, calc(100% - 3rem)); margin: 2.5rem auto 4rem; align-items: start; }
.docs-sidebar, .docs-toc { position: sticky; top: 100px; max-height: calc(100vh - 120px); overflow-y: auto; font-size: 0.88rem; }
.docs-index-link { display: block; font-weight: 700; text-decoration: none; margin-bottom: 1.5rem; }
.docs-nav-group { margin-bottom: 1.4rem; }
.docs-nav-group p, .docs-toc p { margin: 0 0 0.5rem; color: var(--muted); font-size: 0.75rem; font-weight: 700; letter-spacing: 0.05em; }
.docs-nav-group ul, .docs-toc ul, .docs-mobile-toc ul { padding: 0; margin: 0; list-style: none; }
.docs-nav-group a { display: block; padding: 0.45rem 0.65rem; border-left: 2px solid transparent; text-decoration: none; }
.docs-nav-group a:hover, .docs-toc a:hover { color: var(--accent-dark); }
.docs-nav-group a[aria-current="page"] { color: var(--accent-dark); border-left-color: var(--accent); background: var(--surface-strong); font-weight: 700; }
.docs-body { min-width: 0; width: 100%; max-width: none; }
.docs-source-label { color: var(--muted); font-size: 0.8rem; margin: 1.2rem 0; }
.docs-body h1 { margin-top: 1.5rem; max-width: none; font-size: clamp(1.85rem, 3vw, 2.7rem); }
.docs-body h2 { max-width: none; font-size: 1.65rem; padding-top: 0.8rem; border-top: 1px solid var(--line); }
.docs-body h3 { font-size: 1.2rem; }
.docs-body [id] { scroll-margin-top: 160px; }
.docs-body article > p { line-height: 1.85; }
.docs-body li { margin: 0.4rem 0; }
.docs-body ul, .docs-body ol { padding-left: 1.5rem; }
.docs-body .command-block { margin: 1.25rem 0; box-shadow: none; font-size: 0.86rem; overflow-wrap: normal; }
.docs-body .support-matrix { font-size: 0.87rem; }
.docs-body .support-matrix th { white-space: normal; }
.docs-body .source-reference { font-size: 0.8rem; }
.docs-toc { border-left: 1px solid var(--line); padding-left: 1rem; }
.docs-toc a, .docs-mobile-toc a { display: block; padding: 0.3rem 0; color: var(--muted); text-decoration: none; overflow-wrap: anywhere; }
.docs-toc .toc-level-3, .docs-mobile-toc .toc-level-3 { padding-left: 0.8rem; font-size: 0.8rem; }
.docs-source-details { margin-top: 3rem; border-top: 1px solid var(--line); padding-top: 1.3rem; color: var(--muted); font-size: 0.85rem; }
.docs-source-details dt { font-weight: 700; margin-top: 0.75rem; }
.docs-source-details dd { margin-left: 0; }
.docs-pager { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin-top: 2rem; }
.docs-pager a { display: grid; gap: 0.35rem; padding: 1rem; border: 1px solid var(--line); border-radius: 10px; text-decoration: none; background: var(--surface); }
.docs-pager a:hover { border-color: var(--accent); }
.docs-pager a:last-child { text-align: right; }
.docs-pager small { color: var(--muted); }
.docs-mobile-menu, .docs-mobile-toc { display: none; }
@media (max-width: 1180px) {
  .docs-shell { grid-template-columns: 190px minmax(0, 1fr); }
  .docs-toc { display: none; }
  .docs-mobile-toc { display: block; margin: 1rem 0; padding: 1rem; border: 1px solid var(--line); border-radius: 8px; font-size: 0.9rem; }
  .docs-mobile-toc ul { margin-top: 0.75rem; padding-left: 0; }
  .docs-sidebar { top: 160px; max-height: calc(100vh - 180px); }
}
@media (max-width: 920px) {
  .site-header > .language-switch { grid-column: 2; grid-row: 1; }
}
@media (max-width: 760px) {
  .docs-shell { display: block; width: calc(100% - 2rem); margin-top: 1.5rem; }
  .docs-sidebar { position: static; max-height: none; margin-bottom: 2rem; }
  .docs-desktop-menu { display: none; }
  .docs-mobile-menu { display: block; border: 1px solid var(--line); border-radius: 8px; padding: 1rem; }
  .docs-mobile-menu nav { padding-top: 1rem; }
  .docs-reading-path, .docs-catalog { grid-template-columns: 1fr; }
  .docs-reading-path li + li { border-left: 0; border-top: 1px solid var(--line); }
  .docs-home { width: calc(100% - 2rem); }
  .docs-body h2 { font-size: 1.4rem; }
  .docs-pager { gap: 0.5rem; font-size: 0.85rem; }
}
