/* Demo source panels: intentionally readable independently of preview density. */
.docs-example{margin-block:28px;padding:22px;border:1px solid var(--r-border);border-radius:14px;background:var(--r-surface);color:var(--r-text);min-width:0;scroll-margin-top:88px}
.docs-example>h3{font:600 17px/1.4 'Segoe UI',sans-serif;letter-spacing:-.02em;margin:0}
.docs-example>p:not(.docs-copy-status){font:14px/1.65 'Segoe UI',sans-serif;color:var(--r-muted);margin:9px 0 18px;max-width:78ch}
.docs-code{border:1px solid var(--r-border);border-radius:9px;overflow:hidden;background:var(--r-bg);margin-top:16px;min-width:0}
.docs-code-bar{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap;padding:10px 14px;border-bottom:1px solid var(--r-border);background:var(--r-subtle);font:11px/1.4 Consolas,'Courier New',monospace}
.docs-code-bar>span{font-weight:600;letter-spacing:.09em;text-transform:uppercase;color:var(--r-muted)}
.docs-code-bar button{border:1px solid var(--r-border);border-radius:5px;padding:6px 10px;background:var(--r-surface);color:var(--r-text);font:500 11px/1.4 'Segoe UI',sans-serif;white-space:nowrap}
.docs-code-bar button:hover{background:var(--r-bg)}
.docs-code-bar button:disabled{cursor:wait;opacity:.7}
.docs-code pre{margin:0;padding:18px 20px;max-height:560px;overflow:auto;overscroll-behavior:contain;white-space:pre;overflow-wrap:normal;word-break:normal;tab-size:2;color:var(--r-text);background:var(--r-bg);font:13px/1.8 Consolas,'Courier New',monospace}
.docs-code pre code{display:block;min-width:max-content;white-space:inherit;overflow-wrap:inherit;word-break:inherit;font:inherit;background:transparent;color:inherit;padding:0;border:0}
.docs-code pre:focus-visible,.docs-code-bar button:focus-visible{outline:2px solid var(--r-focus,var(--r-accent));outline-offset:-3px}
.docs-token-comment{color:var(--r-muted);font-style:italic}
.docs-token-tag,.docs-token-keyword{color:var(--r-text);color:color-mix(in srgb,var(--r-focus,var(--r-text)) 80%,var(--r-text));font-weight:600}
.docs-token-attribute{color:var(--r-text);font-weight:600}
.docs-token-string{color:var(--r-text);color:color-mix(in srgb,var(--r-focus,var(--r-text)) 80%,var(--r-text))}
.docs-token-number,.docs-token-entity{color:var(--r-text);text-decoration:underline;text-decoration-color:var(--r-border);text-underline-offset:3px}
.docs-token-punctuation{color:var(--r-muted)}
.docs-copy-status{font:12px/1.5 'Segoe UI',sans-serif;color:var(--r-muted);margin:12px 0 0;min-height:18px}
@media(max-width:520px){.docs-example{padding:16px;border-radius:10px}.docs-code pre{padding:14px;font-size:12px}.docs-code-bar{padding:9px 11px}}
@media print{.docs-code-bar button,.docs-copy-status{display:none}.docs-example{break-inside:avoid;box-shadow:none}.docs-code pre{max-height:none;overflow:visible;white-space:pre-wrap;overflow-wrap:anywhere}.docs-code pre code{min-width:0}}
