/* Documentation pages (generated by scripts/build-docs.js; this file is copied to website/docs/). */
.docs .wrap { max-width: 1440px; }
.docs-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr) 220px; gap: 48px; align-items: start; padding-top: 32px; padding-bottom: 64px; }

/* Left: topics */
.docs-left, .docs-right { position: sticky; top: 88px; max-height: calc(100vh - 104px); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.docs-topics-toggle > summary { display: none; }
.docs-filter { width: 100%; font: 14px var(--font); color: var(--ink); background: var(--bg-alt); border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px; margin-bottom: 14px; }
.docs-filter:focus { outline: 2px solid color-mix(in srgb, var(--accent) 50%, transparent); outline-offset: 1px; }
.docs-group { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); margin: 18px 0 6px; }
.docs-topics ul { list-style: none; margin: 0; padding: 0; }
.docs-topics a { display: block; color: var(--ink-2); text-decoration: none; font-size: 14.5px; line-height: 1.35; padding: 5px 10px; border-radius: 7px; border-left: 2px solid transparent; }
.docs-topics a:hover { color: var(--ink); background: var(--bg-alt); }
.docs-topics a.current { color: var(--accent-ink); background: var(--accent-soft); font-weight: 600; }
.docs-home { font-weight: 600; }
.docs-none { color: var(--ink-3); font-size: 14px; padding: 6px 10px; }

/* Middle: the page */
.docs-main { min-width: 0; }
.docs-crumbs { font-size: 14px; color: var(--ink-3); margin-bottom: 10px; }
.docs-crumbs a { color: var(--ink-3); text-decoration: none; }
.docs-crumbs a:hover { color: var(--accent-ink); }
.docs-article { max-width: 780px; font-size: 16.5px; line-height: 1.7; }
.docs-article h1 { font-size: clamp(30px, 4vw, 40px); margin-bottom: 20px; }
.docs-article h2 { font-size: 26px; margin: 40px 0 14px; }
.docs-article h3 { font-size: 20px; margin: 36px 0 10px; scroll-margin-top: 84px; }
.docs-article h4 { font-size: 17px; margin: 24px 0 8px; }
.docs-article p { margin: 0 0 14px; }
.docs-article ul, .docs-article ol { margin: 0 0 16px; padding-left: 24px; }
.docs-article li { margin: 4px 0; }
.docs-article li > ul, .docs-article li > ol { margin: 4px 0; }
.docs-article strong { color: var(--ink); }
.docs-article img { border: 1px solid var(--line); border-radius: 10px; margin: 18px 0; box-shadow: 0 6px 24px rgba(17, 20, 30, .08); }
.docs-article pre { background: var(--dark); color: #e9ebf0; border-radius: 10px; padding: 14px 16px; overflow-x: auto; font: 13.5px/1.6 var(--mono); margin: 0 0 18px; }
.docs-article pre code { background: none; border: 0; padding: 0; color: inherit; font-size: inherit; }
.docs-article blockquote { margin: 0 0 16px; padding: 4px 16px; border-left: 3px solid var(--accent); color: var(--ink-2); background: var(--bg-alt); border-radius: 0 8px 8px 0; }
.docs-article .table-wrap { overflow-x: auto; margin: 0 0 18px; border: 1px solid var(--line); border-radius: 10px; }
.docs-article table { border-collapse: collapse; width: 100%; font-size: 14.5px; }
.docs-article th, .docs-article td { text-align: left; vertical-align: top; padding: 8px 12px; border-bottom: 1px solid var(--line); }
.docs-article th { background: var(--bg-alt); font-weight: 600; }
.docs-article tr:last-child td { border-bottom: 0; }
.docs-article td img { margin: 0 0 6px; }
.anchor { float: left; margin-left: -1em; width: 1em; color: var(--ink-3); text-decoration: none; opacity: 0; font-weight: 400; }
h2:hover > .anchor, h3:hover > .anchor, h4:hover > .anchor, .anchor:focus { opacity: 1; }
.docs-pager { max-width: 780px; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 48px; }
.docs-pager a { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 10px; text-decoration: none; color: var(--ink); font-weight: 600; }
.docs-pager a:hover { border-color: var(--accent); }
.docs-pager span { font-size: 13px; font-weight: 400; color: var(--ink-3); }
.docs-next { text-align: right; }
.docs-edit { max-width: 780px; margin-top: 20px; font-size: 14px; }
.docs-edit a { color: var(--ink-3); }

/* Right: on this page */
.docs-toc-title { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); margin: 0 0 10px; }
.docs-toc ul { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line); }
.docs-toc a { display: block; color: var(--ink-2); text-decoration: none; font-size: 14px; line-height: 1.35; padding: 4px 0 4px 14px; margin-left: -1px; border-left: 2px solid transparent; }
.docs-toc a:hover { color: var(--ink); }
.docs-toc a.active { color: var(--accent-ink); border-left-color: var(--accent); font-weight: 600; }
.docs-top { display: inline-block; margin-top: 14px; font-size: 13px; color: var(--ink-3); text-decoration: none; }
.docs-top:hover { color: var(--accent-ink); }

/* Overview */
.docs-intro { color: var(--ink-2); font-size: 17.5px; }
.docs-overview-group h2 { font-size: 22px; margin: 36px 0 12px; }
.docs-cards { list-style: none; padding: 0 !important; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.docs-cards li { margin: 0; }
.docs-cards a { display: flex; flex-direction: column; gap: 6px; height: 100%; padding: 14px 16px; border: 1px solid var(--line); border-radius: 10px; text-decoration: none; color: var(--ink-2); font-size: 14px; line-height: 1.5; }
.docs-cards a:hover { border-color: var(--accent); }
.docs-cards strong { color: var(--ink); font-size: 15.5px; }

/* Narrower screens: no right column, then the topics fold into a "Topics" menu above the page. */
@media (max-width: 1180px) {
  .docs-layout { grid-template-columns: 230px minmax(0, 1fr); gap: 36px; }
  .docs-right { display: none; }
}
@media (max-width: 820px) {
  .docs-layout { grid-template-columns: minmax(0, 1fr); gap: 16px; padding-top: 16px; }
  .docs-left { position: static; max-height: none; overflow: visible; }
  .docs-topics-toggle { border: 1px solid var(--line); border-radius: 10px; padding: 0 12px; }
  .docs-topics-toggle > summary { display: block; cursor: pointer; font-weight: 600; padding: 10px 0; }
  .docs-topics-toggle[open] { padding-bottom: 12px; }
  .docs-article { font-size: 16px; }
  .docs-pager { grid-template-columns: 1fr; }
}
