.doc-layout { display:grid; grid-template-columns:210px minmax(0,1fr); gap:72px; padding-top:62px; padding-bottom:90px; }
.doc-sidebar { align-self:start; position:sticky; top:110px; max-height:calc(100vh - 130px); overflow:auto; padding-bottom:20px; }
.doc-home { display:block; font-size:23px; color:var(--ink); text-decoration:none; }
.doc-version { display:block; color:var(--muted); font:10px/1.6 var(--mono); margin:12px 0 26px; }
.doc-sidebar nav { display:grid; gap:2px; }
.doc-sidebar nav a { color:var(--ink-2); text-decoration:none; font-size:15px; line-height:1.45; padding:9px 12px; border-left:2px solid transparent; }
.doc-sidebar nav a[aria-current=page] { border-color:var(--accent); color:var(--accent); background:var(--paper-2); }
.doc-sidebar nav a:hover { color:var(--accent); }
.doc-on-page { margin-top:28px; padding-top:22px; border-top:1px solid var(--rule); }
.doc-on-page>span,.doc-next>span { font:10px/1.5 var(--mono); text-transform:uppercase; letter-spacing:.12em; color:var(--muted); }
.doc-on-page nav { margin-top:12px; }.doc-on-page nav a { font-size:13px; padding-block:6px; }
.doc-support { display:inline-block; margin:26px 12px 0; color:var(--ink); font-size:14px; text-underline-offset:5px; }
.doc-article { min-width:0; max-width:880px; }
.doc-kicker { color:var(--accent)!important; font:11px/1.5 var(--mono)!important; text-transform:uppercase; letter-spacing:.13em; margin-bottom:22px!important; }
.doc-article h1 { font-size:clamp(38px,4.5vw,62px); line-height:1.08; letter-spacing:-.045em; max-width:16ch; margin:0 0 24px; }
.doc-article h1+p { font-size:23px; line-height:1.5; color:var(--ink-2); margin-bottom:30px; }
/* Sub-headings linked from other pages (e.g. docs-api.html#quality) stop below the sticky bar. */
.doc-article h3, .doc-article h4 { scroll-margin-top:115px; }
.doc-article h2 { margin:55px 0 20px; padding-top:30px; border-top:1px solid var(--rule); font-size:32px; line-height:1.2; scroll-margin-top:115px; }
.doc-article h3 { font-size:23px; font-weight:400; line-height:1.4; margin:32px 0 14px; }
/* Body text in full ink (owner 2026-10-20: docs text too light); the lede under the h1 stays --ink-2. */
.doc-article p,.doc-article li { font-size:17px; line-height:1.7; color:var(--ink); }
.doc-article p { margin:0 0 18px; }.doc-article strong { color:var(--ink); font-weight:600; }
.doc-article ul,.doc-article ol { padding-left:25px; margin:16px 0 24px; }.doc-article li+li { margin-top:10px; }
.doc-article a { color:var(--accent); text-underline-offset:4px; }
.doc-article :not(pre)>code { font:12px/1.6 var(--mono); overflow-wrap:anywhere; color:var(--ink); background:var(--paper-2); padding:2px 4px; }
.doc-article pre { background:#15191f; color:#e6e8ed; border:1px solid #343b45; border-radius:2px; margin:20px 0 24px; padding:24px; overflow:auto; max-width:100%; font:12px/1.8 var(--mono); tab-size:4; }
.doc-article pre code { font:inherit; white-space:pre; color:inherit; }
.doc-code { position:relative; margin:20px 0 24px; min-width:0; }.doc-code pre { margin:0; padding-top:49px; }
.doc-code-label { position:absolute; top:13px; left:24px; color:#a7b0bd; font:10px/1.4 var(--mono); text-transform:uppercase; letter-spacing:.08em; }
.doc-copy { position:absolute; right:12px; top:9px; border:1px solid #4e5969; background:transparent; color:#e6e8ed; font:11px/1.5 var(--mono); padding:4px 10px; cursor:pointer; }
.doc-copy:focus-visible,.doc-sidebar a:focus-visible { outline:2px solid var(--accent); outline-offset:3px; }
.doc-prompt { padding:25px; background:#15191f; color:#e6e8ed; margin:24px 0; border-left:3px solid var(--accent); }
.doc-prompt-label { font:10px/1.5 var(--mono); text-transform:uppercase; letter-spacing:.1em; color:#a7b0bd; }
.doc-prompt pre { padding:18px 0; border:0; margin:0; white-space:pre-wrap; overflow-wrap:anywhere; }.doc-prompt p { color:#b9c1ce; margin:0; font-size:14px; }
.doc-caret { color:#8eb2ff; }.doc-prompt kbd { border:1px solid #596475; border-radius:3px; padding:1px 6px; font:12px/1.6 var(--mono); }
.doc-path { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); margin:30px 0; border-block:1px solid var(--rule-dark); }
.doc-path>span { padding:17px 12px; border-right:1px solid var(--rule); font-size:15px; line-height:1.5; }.doc-path>span:last-child { border:0; }
.doc-path b { font:11px var(--mono); color:var(--accent); display:block; margin-bottom:9px; }
.doc-note { background:var(--paper-2); padding:22px 25px; margin:28px 0; border-left:2px solid var(--accent); }.doc-note p { margin:9px 0 0; font-size:15px; }
.doc-choices { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:18px; margin:25px 0; }
.doc-choices>a { border-top:2px solid var(--rule-dark); padding:20px 0; text-decoration:none; }.doc-choices span { font:11px var(--mono); display:block; margin-bottom:12px; }
.doc-choices strong { display:block; font-size:22px; font-weight:400; line-height:1.3; }.doc-choices p { font-size:15px; margin:12px 0 0; }
.doc-table-wrap { width:100%; overflow-x:auto; margin:25px 0; }.doc-article table { width:100%; border-collapse:collapse; font-size:14px; line-height:1.6; }
.doc-article th { color:var(--ink); text-align:left; font-weight:400; background:var(--paper-2); }.doc-article th,.doc-article td { padding:14px 13px; border-bottom:1px solid var(--rule); vertical-align:top; }
.doc-article td { color:var(--ink); }.doc-article table code { font-size:11px; }
.doc-article blockquote { margin:22px 0; padding:18px 24px; border-left:2px solid var(--accent); background:var(--paper-2); }.doc-article blockquote p { margin:0; font-size:20px; }
.doc-figure { padding:15px; border:1px solid var(--rule); margin:26px 0; background:#faf7f1; }.doc-figure img { display:block; width:100%; height:auto; }.doc-figure figcaption { font-size:13px; color:#666; margin-top:14px; }
.doc-next { border-top:1px solid var(--rule); padding-top:28px; margin-top:55px; }.doc-next nav { display:flex; gap:14px 24px; flex-wrap:wrap; margin-top:18px; }.doc-next a[aria-current=page] { display:none; }
@media(max-width:1000px){.doc-layout{gap:36px;grid-template-columns:180px minmax(0,1fr)}.doc-choices{grid-template-columns:1fr}.doc-choices>a{padding-block:16px}.doc-article h1+p{font-size:21px}}
@media(max-width:760px){.doc-layout{display:block;padding-top:28px}.doc-sidebar{position:static;max-height:none;padding-bottom:22px;border-bottom:1px solid var(--rule);margin-bottom:34px}.doc-home{font-size:22px}.doc-version{margin:8px 0 15px}.doc-sidebar>nav{display:flex;flex-wrap:wrap;gap:4px 6px}.doc-sidebar nav a{padding:7px 9px;font-size:14px}.doc-on-page,.doc-support{display:none}.doc-article h2{font-size:29px;margin-top:40px}.doc-article h1{font-size:43px}.doc-path{grid-template-columns:repeat(2,minmax(0,1fr))}.doc-path>span{border-bottom:1px solid var(--rule)}.doc-article pre{padding-inline:16px;font-size:11px}.doc-code-label{left:16px}.doc-prompt{padding:19px 16px}.doc-prompt pre{padding-inline:0}.doc-article th,.doc-article td{padding:11px 9px;min-width:135px}}
/* Reference page (docs-reference.html, generated by tools/build_reference.py): a rule above each method, method names set in code type, names and defaults never broken mid-word, a compact type column; on phones each table row stacks (name, type and default on one line, the meaning below) instead of scrolling sideways. */
.doc-article:has(#py-client) h3 { border-top:1px solid var(--rule); padding-top:26px; margin-top:46px; }.doc-article:has(#py-client) h3 code { font:400 19px/1.45 var(--mono); background:none; padding:0; }
.doc-article:has(#py-client) td:first-child code { white-space:nowrap; overflow-wrap:normal; }.doc-article:has(#py-client) td:nth-child(2) { white-space:nowrap; }.doc-article:has(#py-client) td:nth-child(3) code { overflow-wrap:normal; }
@media(max-width:760px){.doc-article:has(#py-client) h3 code{font-size:16px}.doc-article:has(#py-client) table,.doc-article:has(#py-client) tbody,.doc-article:has(#py-client) tr{display:block}.doc-article:has(#py-client) thead{display:none}.doc-article:has(#py-client) tr{border-bottom:1px solid var(--rule);padding:12px 0}.doc-article:has(#py-client) td{display:inline-block;border:0;padding:2px 12px 2px 0;min-width:0;white-space:normal}.doc-article:has(#py-client) td:last-child{display:block;padding-top:6px}}
/* Reference field tables (five columns: field, type and unit, can be empty, meaning, example), each collapsed under a summary line; on phones a row stacks, with labels for the empty rule and the example. */
.doc-article:has(#py-client) table:has(th:nth-child(5)) td:nth-child(2){white-space:normal;min-width:8em}.doc-article:has(#py-client) table:has(th:nth-child(5)) td:nth-child(3){min-width:9em}.doc-article:has(#py-client) table:has(th:nth-child(5)) td:nth-child(4){min-width:16em}.doc-article:has(#py-client) table:has(th:nth-child(5)) td:nth-child(5) code{overflow-wrap:normal}
@media(max-width:760px){.doc-article:has(#py-client) table:has(th:nth-child(5)) td:nth-child(3),.doc-article:has(#py-client) table:has(th:nth-child(5)) td:nth-child(4){display:block;min-width:0;padding-top:6px}.doc-article:has(#py-client) table:has(th:nth-child(5)) td:nth-child(3):empty{display:none}.doc-article:has(#py-client) table:has(th:nth-child(5)) td:nth-child(3)::before{content:"Can be empty: ";color:var(--muted,#666)}.doc-article:has(#py-client) table:has(th:nth-child(5)) td:nth-child(5):not(:empty)::before{content:"Example: ";color:var(--muted,#666)}}
.doc-article:has(#py-client) td:first-child code:has(+ wbr){padding-right:0}.doc-article:has(#py-client) td:first-child wbr + code{padding-left:0}
.doc-article details{margin:14px 0 30px;border:1px solid var(--rule);border-radius:2px;padding:0 16px}.doc-article details>summary{cursor:pointer;padding:12px 0;font-size:15px;color:var(--accent)}.doc-article details[open]>summary{border-bottom:1px solid var(--rule)}.doc-article details .doc-table-wrap{margin:10px 0 16px}
.doc-article:has(#py-client) #contents + ul li{margin:8px 0;line-height:1.7}.doc-article:has(#py-client) #contents + ul code{white-space:nowrap;overflow-wrap:normal}
