/* Documentation inherits the landing page's font and palette from ../style.css. */
.docs-page { --docs-header-height: 77px; }
.docs-header { position: sticky; top: 0; z-index: 10; background: var(--palette-ink); border-bottom: 1px solid var(--line); }
.docs-header-inner { display: flex; align-items: center; gap: 1.75rem; min-height: 76px; }
.docs-header .brand span { font-size: 1.65rem; }
.docs-header .brand img { width: 36px; }
.docs-header-label { padding-left: 1.75rem; border-left: 1px solid var(--line); font-size: 0.95rem; }
.docs-source { display: inline-flex; align-items: center; gap: 0.6rem; min-height: 44px; margin-left: auto; font-size: 0.9rem; text-decoration: none; color: var(--text-soft); }
.docs-source:hover { color: var(--accent-text); }
.docs-layout { display: grid; grid-template-columns: 13.5rem minmax(0, 1fr) 10.5rem; gap: 3rem; align-items: start; }
.docs-sidebar, .docs-toc { position: sticky; top: var(--docs-header-height); max-height: calc(100dvh - var(--docs-header-height)); overflow-y: auto; padding-block: 2.75rem; font-size: 0.9rem; }
.docs-sidebar { grid-column: 1; grid-row: 1; padding-right: 1.5rem; border-right: 1px solid var(--line); }
.docs-sidebar > summary { display: none; }
.docs-sidebar nav > p { margin: 1.75rem 0 0.5rem 0.75rem; font-weight: 600; }
.docs-sidebar nav > p:first-child { margin-top: 0; }
.docs-sidebar ul, .docs-toc ul { list-style: none; padding: 0; margin: 0; }
.docs-sidebar a { display: block; padding: 0.65rem 0.75rem; border-radius: var(--radius-s); color: var(--text-soft); text-decoration: none; }
.docs-sidebar a:hover { background: var(--surface); color: var(--palette-paper); }
.docs-sidebar a[aria-current="page"] { background: var(--palette-wine); color: var(--palette-paper); font-weight: 600; }
.docs-sidebar .docs-sidebar-note { margin: 2.5rem 0.75rem 0; padding-top: 1rem; border-top: 1px solid var(--line); color: var(--text-soft); font-size: 0.8rem; }
.docs-sidebar-note .status-label { display: inline-block; margin-bottom: 0.6rem; }
.docs-main { grid-column: 2; grid-row: 1; min-width: 0; padding-block: 2.75rem 4rem; }
.docs-breadcrumb { display: flex; align-items: center; gap: 0.7rem; flex-wrap: wrap; margin-bottom: 1.75rem; font-size: 0.8rem; color: var(--text-soft); }
.docs-breadcrumb a { text-decoration: none; }
.docs-breadcrumb a:hover { text-decoration: underline; }
.docs-breadcrumb svg { width: 0.9rem; height: 0.9rem; }
.docs-article { font-size: 1.0625rem; line-height: 1.75; overflow-wrap: anywhere; }
.docs-article h1 { font-size: 3rem; line-height: 1.1; letter-spacing: -0.035em; font-weight: 650; }
.docs-article .docs-lead { font-size: 1.25rem; line-height: 1.6; color: var(--text-soft); margin-top: 1.25rem; }
.docs-article h2 { font-size: 1.75rem; line-height: 1.25; letter-spacing: -0.02em; margin-block: 2.75rem 1rem; }
.docs-article h3 { font-size: 1.2rem; line-height: 1.4; margin-block: 1.75rem 0.75rem; }
.docs-article p { margin-block: 1rem; max-width: 70ch; }
.docs-article ul, .docs-article ol { padding-left: 1.4rem; margin-block: 1rem; }
.docs-article li { padding-left: 0.25rem; margin-block: 0.5rem; }
.docs-article li::marker { color: var(--text-soft); }
.docs-article a { color: var(--accent-text); }
.docs-article a:hover { color: var(--palette-paper); }
.docs-article h2 a { color: inherit; text-decoration: none; }
.docs-article h2 a:hover { text-decoration: underline; text-decoration-color: var(--accent-text); }
.docs-article [id] { scroll-margin-top: calc(var(--docs-header-height) + 1.5rem); }
.docs-article h2:target { color: var(--accent-text); }
.docs-article :not(pre) > code { padding: 0.12em 0.3em; border-radius: var(--radius-s); background: var(--surface); }
.docs-article pre { max-width: 100%; padding: 1.25rem; margin-block: 1.25rem; overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--surface); font-size: 0.95rem; line-height: 1.75; tab-size: 2; }
.docs-article pre:focus-visible { outline-offset: 2px; }
.docs-callout { padding: 1.25rem 1.5rem; margin-block: 1.75rem; background: color-mix(in srgb, var(--palette-wine) 24%, var(--palette-ink)); border: 1px solid var(--palette-wine); border-radius: var(--radius-s); }
.docs-callout > strong { display: flex; align-items: center; gap: 0.65rem; font-size: 1rem; }
.docs-callout p { margin: 0.5rem 0 0; font-size: 0.95rem; line-height: 1.65; }
.docs-facts { margin: 1.5rem 0; }
.docs-facts > div { display: grid; grid-template-columns: 9rem minmax(0, 1fr); gap: 1.5rem; padding-block: 1rem; border-bottom: 1px solid var(--line); }
.docs-facts dt { font-weight: 600; }
.docs-facts dd { margin: 0; color: var(--text-soft); }
.docs-routes { list-style: none; padding: 0 !important; margin-block: 1.5rem !important; }
.docs-routes li { padding: 0; margin: 0; border-top: 1px solid var(--line); }
.docs-routes li:last-child { border-bottom: 1px solid var(--line); }
.docs-routes a { display: flex; justify-content: space-between; align-items: center; gap: 1.5rem; padding-block: 1.15rem; text-decoration: none; }
.docs-routes a:hover strong { text-decoration: underline; }
.docs-routes strong { font-size: 1.05rem; font-weight: 600; }
.docs-routes small { display: block; margin-top: 0.2rem; color: var(--text-soft); font-size: 0.9rem; }
.docs-toc { grid-column: 3; grid-row: 1; }
.docs-toc > summary { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; min-height: 44px; font-weight: 600; margin-bottom: 0.5rem; }
.docs-toc > summary svg { width: 1rem; }
.docs-toc nav { border-left: 1px solid var(--line); padding-left: 1rem; }
.docs-toc a { display: block; padding-block: 0.45rem; color: var(--text-soft); text-decoration: none; font-size: 0.82rem; }
.docs-toc a:hover, .docs-toc a:focus-visible { color: var(--accent-text); }
.docs-pager { display: flex; justify-content: space-between; gap: 1.5rem; border-top: 1px solid var(--line); padding-top: 1.5rem; margin-top: 3rem; }
.docs-pager a { display: flex; flex-direction: column; justify-content: center; min-height: 64px; text-decoration: none; font-size: 1rem; }
.docs-pager a:hover { text-decoration: underline; }
.docs-pager span { font-size: 0.8rem; color: var(--text-soft); }
.docs-pager a[rel="next"] { margin-left: auto; text-align: right; }
.docs-footer { padding-block: 1.5rem; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 1rem; color: var(--text-soft); font-size: 0.8rem; }
@media (max-width: 1200px) {
  .docs-layout { grid-template-columns: 12rem minmax(0, 1fr); column-gap: 2.5rem; row-gap: 0; }
  .docs-sidebar { grid-row: 1 / 3; }
  .docs-toc { grid-column: 2; grid-row: 1; position: static; padding-block: 1.75rem 0; max-height: none; }
  .docs-toc > summary { margin: 0; font-size: 0.85rem; }
  .docs-toc nav { padding-block: 0.5rem; }
  .docs-main { grid-row: 2; padding-top: 1.5rem; }
}
@media (max-width: 760px) {
  .docs-page { --docs-header-height: 0px; }
  .docs-header { position: static; }
  .docs-header-inner { gap: 1rem; min-height: 76px; }
  .docs-header .brand span { font-size: 1.5rem; }
  .docs-header-label { padding-left: 1rem; font-size: 0.85rem; }
  .docs-source { display: none; }
  .docs-layout { display: flex; flex-direction: column; gap: 0; }
  .docs-sidebar, .docs-toc, .docs-main { width: 100%; position: static; max-height: none; }
  .docs-sidebar { padding: 0; border-right: 0; border-bottom: 1px solid var(--line); }
  .docs-sidebar > summary { display: flex; align-items: center; justify-content: space-between; min-height: 56px; font-weight: 600; }
  .docs-sidebar > nav { padding: 0.75rem 0 1.5rem; }
  .docs-sidebar a { min-height: 44px; }
  .docs-sidebar .docs-sidebar-note { margin-top: 1.5rem; }
  .docs-toc { padding: 0.4rem 0; border-bottom: 1px solid var(--line); }
  .docs-toc a { min-height: 44px; display: flex; align-items: center; }
  .docs-main { padding-block: 1.75rem 3rem; }
  .docs-breadcrumb { margin-bottom: 1.4rem; }
  .docs-article h1 { font-size: 2.35rem; }
  .docs-article .docs-lead { font-size: 1.125rem; }
  .docs-article h2 { font-size: 1.55rem; margin-top: 2.25rem; }
  .docs-article { font-size: 1rem; }
  .docs-callout { padding: 1rem; }
  .docs-facts > div { grid-template-columns: 1fr; gap: 0.35rem; }
  .docs-pager { gap: 1rem; }
  .docs-footer { flex-direction: column; gap: 0.5rem; }
}
@media print {
  .docs-header, .docs-sidebar, .docs-toc, .docs-pager, .docs-footer, .docs-breadcrumb, .skip-link { display: none; }
  .docs-layout { display: block; width: 100%; }
  .docs-main { padding: 0; }
  .docs-page, .docs-article, .docs-article a, .docs-article a:hover, .docs-facts dd, .docs-routes small, .docs-article .docs-lead { color: var(--palette-ink); background: white; }
  .docs-callout, .docs-article pre, .docs-article :not(pre) > code { background: none; }
  .docs-article pre { white-space: pre-wrap; overflow-wrap: anywhere; }
}
