/*
 * BIM.works documentation site — one stylesheet for every page.
 * Values from docs/design-system.md and the DocsPage handoff (Docs Site.dc.html): the app scale
 * is 15 px, the reading ramp (H1 26/600, H2 20/600, H3 16/600) is the named deviation, one
 * accent (--bw-blue), one code theme for every language.
 */
:root {
	--bw-blue-light: #00A0E3;
	--bw-blue: #008CC9;
	--bw-blue-deep: #005E93;
	--bw-blue-tint: #D1EEFA;
	--bw-progress: #E68523;
	--bw-text-dense: #1B2733;
	--bw-text-strong: #333333;
	--bw-text-label: #555555;
	--bw-text-secondary: #666666;
	--bw-text-note: #777777;
	--bw-text-muted: #888888;
	--bw-text-quiet: #999999;
	--bw-surface: #FFFFFF;
	--bw-inset: #F7F7F7;
	--bw-chrome: #EEEEEE;
	--bw-rule-strong: #DDDDDD;
	--bw-rule: #E4E4E4;
	--bw-rule-light: #EEEEEE;
	--bw-rule-hairline: #F2F2F2;
	--bw-border-dense: #D0D4D9;
	--bw-divider-cool: #EEF0F3;
	--bw-pill-ok: #95C753;
	--bw-danger: #F16D64;
	--bw-warning: #EFB920;
	--bw-changed: #2E7D32;
	--bw-expires-soon: #B45309;
	--bw-note-warning: #FDF6E1;
	--bw-match: #FCE59A;
	--bw-banner-idle: #F4F9F4;
	--bw-console: #292B36;
	--bw-console-rule: #3A3D4A;
	--bw-console-text: #AAB0BC;
	--bw-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
	--bw-font-mono: ui-monospace, Menlo, Consolas, monospace;
	--bw-shadow-anchored: 0 0 0 1px rgba(99, 114, 130, .16), 0 8px 16px rgba(27, 39, 51, .08);
	--bw-shadow-dialog: 0 8px 30px rgba(0, 0, 0, .25);
	--rail-width: 260px;
	--outline-width: 220px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body.docs {
	margin: 0;
	font-family: var(--bw-font);
	font-size: 15px;
	line-height: 1.35;
	color: var(--bw-text-strong);
	background: var(--bw-surface);
	min-height: 100%;
}
a { color: var(--bw-blue); text-decoration: none; }
a:hover { color: var(--bw-blue-deep); }
a:focus-visible, button:focus-visible, input:focus-visible, [tabindex]:focus-visible { outline: 2px solid var(--bw-blue-deep); outline-offset: 1px; }
button { font-family: inherit; }
kbd { font-family: var(--bw-font-mono); font-size: 11px; color: var(--bw-text-muted); border: 1px solid var(--bw-rule-strong); border-radius: 3px; padding: 0 4px; line-height: 1.5; }
.skip { position: absolute; left: -9999px; top: 0; background: #fff; padding: 8px; z-index: 100; }
.skip:focus { left: 8px; top: 8px; }
[hidden] { display: none !important; }

/* Same SVG artwork and palette as the app's ProfileMenu logo. */
.brand-logo { display: block; flex-shrink: 0; width: 80px; height: 32px; }
.brand-logo .bodem { fill: #DBAD3A; }
.brand-logo .links { fill: #F3C746; }
.brand-logo .midden { fill: #F9E3A2; }
.brand-logo .rechts { fill: #FCF1D1; }
.brand-logo .bim { fill: #6B7173; }
.brand-logo .works { fill: #EFB920; }

/* ---- docs bar ---- */
.docs-bar {
	height: 48px;
	border-bottom: 1px solid var(--bw-rule-strong);
	display: flex;
	align-items: center;
	padding: 0 20px;
	gap: 20px;
	background: var(--bw-surface);
	position: sticky;
	top: 0;
	z-index: 20;
}
.wordmark { display: flex; align-items: center; flex-shrink: 0; gap: 6px; color: var(--bw-text-strong); }
.wordmark-docs { font-size: 13px; color: var(--bw-text-note); }
.part-tabs { display: flex; gap: 16px; height: 48px; align-items: stretch; flex-shrink: 0; }
.part-tab { display: flex; align-items: center; font-size: 14px; color: var(--bw-text-label); white-space: nowrap; }
.part-tab:hover { color: var(--bw-text-strong); }
.part-tab.active { color: var(--bw-text-strong); box-shadow: inset 0 -2px 0 var(--bw-blue); }
.docs-bar-spacer { flex: 1; }
.rail-toggle { display: none; background: none; border: 1px solid var(--bw-rule-strong); border-radius: 3px; padding: 2px 8px; font-size: 14px; color: var(--bw-text-label); cursor: pointer; }
.search-field {
	display: flex; align-items: center; gap: 6px;
	border: 1px solid var(--bw-rule-strong); background: var(--bw-surface);
	padding: 4px 6px; width: 240px; cursor: text; text-align: left; font-size: 13px; color: var(--bw-text-quiet);
}
.search-field .search-placeholder { flex: 1; }
.search-field-large { width: 560px; max-width: 100%; padding: 8px 10px; font-size: 15px; gap: 8px; margin-top: 6px; }
.version-pill { font-size: 12px; background: var(--bw-chrome); color: var(--bw-text-label); border-radius: 3px; padding: 1px 4px; white-space: nowrap; }
.open-app { font-size: 14px; white-space: nowrap; }
/* only when this browser holds no session: the head script's html.docs-signed-out (Shell.java) */
.docs-login { display: none; white-space: nowrap; }
html.docs-signed-out .docs-login { display: inline-block; }

/* ---- layout ---- */
.layout { display: grid; grid-template-columns: var(--rail-width) minmax(0, 1fr) var(--outline-width); min-height: calc(100vh - 48px - 41px); }
.rail {
	background: var(--bw-inset);
	border-right: 1px solid var(--bw-rule);
	padding: 14px 0 24px;
	font-size: 14px;
	color: var(--bw-text-label);
	display: flex;
	flex-direction: column;
	position: sticky;
	top: 48px;
	align-self: start;
	max-height: calc(100vh - 48px);
	overflow-y: auto;
	/* placed explicitly: its edge handle (below) shares the cell */
	grid-row: 1;
	grid-column: 1;
}
/* the rail's width is the reader's (docs.js inserts the handle and keeps the choice in localStorage): at
   least 200 px, at most half the window, 260 px until they drag it; the drawer under 800 px keeps 260 px */
@media (min-width: 801px) {
	:root { --rail-width: clamp(200px, var(--rail-width-chosen, 260px), 50vw); }
}
/* the handle straddles the rail's right border, as tall as the rail (docs.js) and sticky with it;
   hover, focus or a drag turns the border blue */
.rail-resizer {
	grid-row: 1;
	grid-column: 1;
	justify-self: end;
	align-self: start;
	position: sticky;
	top: 48px;
	z-index: 1;
	width: 6px;
	height: calc(100vh - 48px);
	margin-right: -4px;
	cursor: col-resize;
	touch-action: none;
}
.rail-resizer::after { content: ""; position: absolute; top: 0; bottom: 0; left: 1px; width: 2px; transition: background-color 120ms ease; }
.rail-resizer:hover::after, .rail-resizer:focus-visible::after, .rail-resizer.dragging::after { background: var(--bw-blue); }
.rail-resizer:focus-visible { outline: none; }
body.rail-resizing { cursor: col-resize; user-select: none; }
/* a demo's iframe under the pointer would swallow the drag */
body.rail-resizing iframe { pointer-events: none; }
/* three levels, three looks: the part is the rail's list header (design system §2.2) ruled off from
   its sections, a section title is a 600 heading in its own spelling, its pages are indented under it */
.rail-part { padding: 6px 16px 10px; margin-bottom: 10px; border-bottom: 1px solid var(--bw-rule); font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--bw-text-secondary); }
.rail-part.active { color: var(--bw-text-strong); }
.rail-section + .rail-section { margin-top: 14px; }
.rail-title { display: block; padding: 6px 16px; font-weight: 600; color: var(--bw-text-strong); }
.rail-title.active { background: var(--bw-surface); border-left: 3px solid var(--bw-blue); padding-left: 13px; }
.rail-sdk > summary { cursor: pointer; display: list-item; list-style-position: inside; }
/* a titled section folds to its title (docs.js): the +/- sits at the title row's right edge, faded in while the
   pointer is over the section or focus is in it (design system §2.5: hover-revealed row buttons show on
   :focus-within too), always on a touch screen; the title keeps clear of it */
.rail-section.foldable { position: relative; }
.rail-section.foldable > .rail-title { padding-right: 36px; }
.rail-section.folded > .rail-item, .rail-section.folded > .rail-subs { display: none; }
.rail-fold {
	position: absolute; top: 5px; right: 8px; width: 20px; height: 20px; padding: 0;
	display: flex; align-items: center; justify-content: center;
	border: 0; border-radius: 3px; background: none; cursor: pointer;
	color: var(--bw-text-quiet); opacity: 0; transition: opacity 120ms ease;
}
.rail-fold svg { stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; }
.rail-section.foldable:not(.folded) .rail-fold-bar { display: none; }
.rail-section.foldable:hover > .rail-fold, .rail-section.foldable:focus-within > .rail-fold { opacity: 1; }
.rail-fold:hover { background: var(--bw-blue-tint); color: var(--bw-text-strong); }
@media (hover: none) { .rail-fold { opacity: 1; } }
.sdk-generation-status { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
[data-sdk-refresh] { flex-shrink: 0; font-size: 12px; }
@media (max-width: 1200px) { .sdk-generation-status { display: none; } }
.rail-item { display: block; padding: 6px 16px 6px 28px; color: var(--bw-text-label); }
.rail-item:hover { background: var(--bw-blue-tint); color: var(--bw-text-strong); }
.rail-item.active { background: var(--bw-surface); border-left: 3px solid var(--bw-blue); padding-left: 25px; color: var(--bw-text-strong); }
.rail-item .dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 8px; vertical-align: middle; }
.dot-draft { background: var(--bw-rule-strong); }

.article-wrap { min-width: 0; container-type: inline-size; } /* blocks that may outgrow the reading column (.demo) size against it with cqw */
.article {
	--article-pad-x: 48px;
	max-width: 856px;
	padding: 32px var(--article-pad-x) 48px;
	display: flex;
	flex-direction: column;
	gap: 18px;
	font-size: 15px;
	line-height: 1.6;
}
.article > * { margin: 0; }
.article p { margin: 0; }
.lede { color: var(--bw-text-label); }
.part-label { font-size: 11px; text-transform: uppercase; letter-spacing: .03em; color: var(--bw-text-note); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.part-label a { color: var(--bw-text-note); }
.part-label .sep, .sep { color: var(--bw-rule-strong); }
.part-label-spacer { flex: 1; }
.badge { text-transform: none; letter-spacing: 0; background: var(--bw-chrome); color: var(--bw-text-label); border-radius: 3px; padding: 1px 4px; font-size: 12px; }
.badge-requires { background: var(--bw-note-warning); }

/* reading type ramp */
.article h1 { font-size: 26px; font-weight: 600; line-height: 1.25; margin: 0; }
.article h2 { font-size: 20px; font-weight: 600; line-height: 1.3; margin: 12px 0 0; padding-top: 14px; border-top: 1px solid var(--bw-rule-light); }
.article h3 { font-size: 16px; font-weight: 600; line-height: 1.3; margin: 6px 0 0; }
.article h4 { font-size: 15px; font-weight: 600; margin: 4px 0 0; }
.article h5, .article h6 { font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; color: var(--bw-text-note); }
h1 .anchor, h2 .anchor, h3 .anchor, h4 .anchor, h5 .anchor, h6 .anchor, dt .anchor { font-weight: 400; color: var(--bw-text-quiet); margin-left: 8px; opacity: 0; transition: opacity 120ms ease; font-size: .85em; }
h1:hover .anchor, h2:hover .anchor, h3:hover .anchor, h4:hover .anchor, h5:hover .anchor, h6:hover .anchor, dt:hover .anchor, .anchor:focus-visible { opacity: 1; }
:target { scroll-margin-top: 64px; }
h2:target, h3:target, h4:target, p:target, .code-block:target, .glossary-entry:target, .example:target, .lesson:target, .table-wrap:target, tr:target { animation: target-flash 1.6s ease-out; }
@keyframes target-flash { from { background: var(--bw-blue-tint); } to { background: transparent; } }
.article ul, .article ol { margin: 0; padding-left: 24px; }
.article li + li { margin-top: 4px; }
.article li > p + p { margin-top: 6px; }
.article hr { border: 0; border-top: 1px solid var(--bw-rule-light); }
.article blockquote { margin: 0; padding: 0 0 0 12px; border-left: 3px solid var(--bw-rule-strong); color: var(--bw-text-label); }
.article img { max-width: 100%; height: auto; border: 1px solid var(--bw-rule); border-radius: 4px; }
.article strong { font-weight: 600; }
code { font-family: var(--bw-font-mono); font-size: 13px; }
.article p code, .article li code, .article td code, .article dd code, .article h2 code, .article h3 code { background: var(--bw-inset); border: 1px solid var(--bw-rule); border-radius: 3px; padding: 0 4px; }
a.term { color: var(--bw-blue); border-bottom: 1px dotted var(--bw-blue); }
/* a scope or error-code link: the name in code, with the term link's dotted underline */
a.scope:not(.sym), a.error:not(.sym) { text-decoration: none; }
a.scope:not(.sym) code, a.error:not(.sym) code { color: var(--bw-blue); border-bottom: 1px dotted var(--bw-blue); }
a.scope:not(.sym):not(:has(code)), a.error:not(.sym):not(:has(code)) { color: var(--bw-blue); border-bottom: 1px dotted var(--bw-blue); }
.tok-str a.sym { color: inherit; }
/* the error tables: fixed columns, so a long code name wraps in its own column instead of squeezing the description */
.error-table table { table-layout: fixed; }
.error-table th:first-child { width: 3.5em; }
.error-table th:nth-child(2) { width: 38%; }
.article .error-table td code { white-space: normal; overflow-wrap: anywhere; }
.error-table td .anchor { margin-left: 4px; }
a.pill-scope { color: var(--bw-text-label); text-decoration: none; }
a.pill-scope:hover { background: var(--bw-blue-tint); color: var(--bw-blue-deep); }
.scope-table td:first-child { white-space: nowrap; }
.scope-table td .anchor { margin-left: 4px; }
.scope-needs { margin-top: 4px; color: var(--bw-text-label); }
.scope-needs b { font-weight: 600; }
.scope-ops a.op { font-size: 12px; }
a.ext::after { content: " ↗"; font-size: 11px; color: var(--bw-text-quiet); }
.broken-link { color: var(--bw-danger); border-bottom: 1px dashed var(--bw-danger); }
.draft { color: var(--bw-expires-soon); font-weight: 600; }

/* code theme */
.code-block { border: 1px solid var(--bw-rule); border-radius: 4px; overflow: hidden; background: var(--bw-inset); position: relative; }
.code-title { font-size: 12px; color: var(--bw-text-note); padding: 6px 12px; border-bottom: 1px solid var(--bw-rule); background: var(--bw-surface); }
.code-tools { position: absolute; top: 4px; right: 6px; display: flex; gap: 6px; align-items: center; font-size: 11px; color: var(--bw-text-quiet); opacity: .0; transition: opacity 120ms ease; }
.code-block:hover .code-tools, .code-block:focus-within .code-tools { opacity: 1; }
.code-copy { font-size: 11px; padding: 1px 7px; border: 1px solid var(--bw-border-dense); border-radius: 3px; background: var(--bw-surface); color: #222222; cursor: pointer; }
.code-copy.copied { color: var(--bw-changed); border-color: var(--bw-changed); }
.code-tools .anchor { color: var(--bw-text-quiet); }
pre.code { margin: 0; padding: 12px; font-family: var(--bw-font-mono); font-size: 13px; line-height: 1.5; color: var(--bw-text-strong); overflow-x: auto; white-space: pre; tab-size: 4; }
pre.code code { font-size: inherit; display: block; }
.ln { display: inline-block; min-width: 100%; }
.ln.hl { background: var(--bw-blue-tint); margin: 0 -12px; padding: 0 12px; min-width: calc(100% + 24px); }
.ln:target { background: var(--bw-blue-tint); }
.tok-kw { color: var(--bw-blue-deep); }
.tok-type { color: var(--bw-blue-deep); font-weight: 500; }
.tok-str { color: var(--bw-changed); }
.tok-num { color: var(--bw-expires-soon); }
.tok-cm { color: var(--bw-text-muted); }
.tok-p { color: var(--bw-text-label); }
a.sym { color: var(--bw-text-strong); border-bottom: 1px dotted var(--bw-blue); }
a.op { font-family: var(--bw-font-mono); font-size: 13px; }
.term-card-head b.mono { font-family: var(--bw-font-mono); font-size: 13px; }

/* tabs (code groups, example blocks) */
.tabs { display: flex; height: 34px; }
.tab { display: flex; align-items: center; padding: 0 12px; font-size: 12px; color: var(--bw-text-secondary); background: none; border: 0; cursor: pointer; height: 34px; }
.tab:hover { color: var(--bw-text-strong); }
.tab.active { color: var(--bw-text-strong); font-weight: 600; box-shadow: inset 0 -2px 0 var(--bw-blue); }
.tab-pane { display: none; }
.tab-pane.active { display: block; }
.code-group { border: 1px solid var(--bw-rule); border-radius: 4px; overflow: hidden; }
.code-group > .tabs { border-bottom: 1px solid var(--bw-rule); background: var(--bw-surface); }
/* which SDK family a code group's code is in (reference/sdk): "OpenAPI SDK" or "Classic SDK", at the end of the tab row */
.code-group > .tabs .sdk-family { margin-left: auto; align-self: center; padding: 0 12px; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--bw-text-secondary); text-decoration: none; white-space: nowrap; }
.code-group > .tabs a.sdk-family:hover { color: var(--bw-text-label); text-decoration: underline; }
.code-group pre.code { background: var(--bw-inset); }

/* example block */
.example { border: 1px solid var(--bw-rule); border-radius: 4px; overflow: hidden; }
.example-bar { height: 34px; display: flex; align-items: center; border-bottom: 1px solid var(--bw-rule); background: var(--bw-surface); padding-right: 4px; }
.example-actions { margin-left: auto; display: flex; gap: 6px; align-items: center; }
.btn { font-size: 12px; padding: 3px 9px; border: 1px solid var(--bw-border-dense); border-radius: 3px; background: var(--bw-surface); color: #222222; cursor: pointer; line-height: 1.4; }
.btn:hover { background: var(--bw-inset); color: #222222; }
.btn-primary { border-color: var(--bw-blue); background: var(--bw-blue); color: #FFFFFF; }
.btn-primary:hover { background: var(--bw-blue-deep); color: #FFFFFF; }
.example pre.code { background: var(--bw-inset); }
.example-notes { padding: 10px 12px; font-size: 13px; line-height: 1.5; }
/* a runnable example (run:): the viewer-lesson frame and the console under the code */
.example-run { border-top: 1px solid var(--bw-rule); }
.example-stage { height: 420px; background: var(--bw-inset); border-bottom: 1px solid var(--bw-rule); }
.example-output { padding: 8px 12px; display: flex; flex-direction: column; gap: 8px; background: var(--bw-surface); }
.example-status { font-size: 12px; line-height: 1.5; color: var(--bw-text-note); }
.example-status.ok { color: var(--bw-changed); }
.example-status.warn { color: var(--bw-expires-soon); }

/* lesson block */
.lesson { border: 1px solid var(--bw-rule); border-radius: 4px; overflow: hidden; display: flex; flex-direction: column; }
.lesson-head { padding: 10px 12px; border-bottom: 1px solid var(--bw-rule); display: flex; flex-direction: column; gap: 4px; }
.lesson-meta { display: flex; align-items: center; gap: 10px; }
.label-upper { font-size: 11px; text-transform: uppercase; letter-spacing: .03em; color: var(--bw-text-note); }
.lesson-model { margin-left: auto; font-size: 11px; color: var(--bw-text-muted); }
.lesson-goal { font-size: 15px; }
.lesson-editor pre.code { background: var(--bw-surface); min-height: 100px; }
.lesson-foot { height: 34px; border-top: 1px solid var(--bw-rule); display: flex; align-items: center; gap: 6px; padding: 0 12px; font-size: 12px; color: var(--bw-text-note); }
.lesson-hints, .lesson-solution { border-top: 1px solid var(--bw-rule); padding: 8px 12px; font-size: 13px; }
.lesson-hints summary, .lesson-solution summary { cursor: pointer; color: var(--bw-blue); }
.lesson-hints ol { margin: 6px 0 0; padding-left: 20px; }
.lesson-solution pre.code { margin-top: 8px; border: 1px solid var(--bw-rule); border-radius: 4px; }

/* lesson block: the interactive round (docs/bql-course-design.md §4, design screen 1d) */
.lesson-foot-spacer { flex: 1; }
.lesson-actions { display: flex; gap: 6px; align-items: center; }
.lesson-status.ok { color: var(--bw-changed); }
.lesson-status.warn { color: var(--bw-expires-soon); }
.pill-state { text-transform: none; letter-spacing: 0; }
.pill-progress { background: var(--bw-progress); color: #FFFFFF; border-radius: 5px; padding: 1px 6px; font-weight: 400; }
.lesson-code { display: grid; grid-template-columns: 32px minmax(0, 1fr); background: var(--bw-surface); padding: 8px 0; min-height: 140px; }
.lesson-gutter {
	font-family: var(--bw-font-mono); font-size: 13px; line-height: 1.5; color: var(--bw-text-quiet);
	text-align: right; padding-right: 8px; border-right: 1px solid var(--bw-rule-light); white-space: pre; user-select: none;
}
.lesson-input {
	font-family: var(--bw-font-mono); font-size: 13px; line-height: 1.5; color: var(--bw-text-strong);
	border: 0; outline: 0; resize: vertical; padding: 0 12px; margin: 0; background: transparent; overflow: hidden; min-height: 100px;
}
.lesson-input:focus-visible { outline: 0; background: #FCFDFE; }
/* the app's Monaco editor in the textarea's place (docs.js mountLessonEditor); its widgets are styled with the request editor's below */
.lesson-code.has-monaco { display: block; padding: 0; min-height: 0; }
.lesson-code.has-monaco > .lesson-gutter, .lesson-code.has-monaco > .lesson-input { display: none; }
.lesson-monaco { width: 100%; background: var(--bw-surface); }
.lesson-result { border-top: 1px solid var(--bw-rule); padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; }
.lesson-verdict { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--bw-text-note); flex-wrap: wrap; }
.lesson-verdict-text { min-width: 0; }
.lesson-note { font-size: 11px; color: var(--bw-text-muted); line-height: 1.5; }
.link-button { border: 0; background: none; padding: 0; font: inherit; color: var(--bw-blue); cursor: pointer; }
/* the dense result table of design 1d; .article table sets 13px, so these need its specificity */
.article .lesson-table { font-size: 12px; }
.article .lesson-table th { font-size: 10px; padding: 4px 12px 4px 0; }
.article .lesson-table td { padding: 4px 12px 4px 0; border-bottom: 1px solid var(--bw-divider-cool); }
.article .lesson-table .row-number { color: var(--bw-text-quiet); }
.lesson-table-compact { max-height: 220px; overflow-y: auto; display: block; }
.lesson-json { max-height: 320px; overflow: auto; background: var(--bw-inset); border: 1px solid var(--bw-rule); border-radius: 4px; }
.lesson-stage { height: 420px; background: var(--bw-inset); border: 1px solid var(--bw-rule); border-radius: 4px; overflow: hidden; }
.lesson-viewer-frame { display: block; width: 100%; height: 100%; border: 0; background: var(--bw-surface); }
.lesson-runner-frame { position: absolute; left: -9999px; top: 0; width: 1px; height: 1px; border: 0; }
.lesson-download { text-decoration: none; }
.lesson-accept { margin-top: 8px; display: flex; flex-direction: column; gap: 6px; }
.lesson-accept pre.code { border: 1px solid var(--bw-rule); border-radius: 4px; }
.lesson-hints li[hidden] { display: none; }
/* lesson block: a JavaScript round of the viewer course (docs/bql-course-design.md §12) */
.lesson-given { font-size: 12px; line-height: 1.5; color: var(--bw-text-note); }
.lesson-given code { font-size: 11px; }
.lesson-input { tab-size: 4; }
.article .lesson-state td:first-child { color: var(--bw-text-note); white-space: nowrap; }
.lesson-console {
	margin: 0; max-height: 220px; overflow: auto; padding: 8px 12px; border-radius: 4px;
	font-family: var(--bw-font-mono); font-size: 12px; line-height: 1.5; white-space: pre-wrap; word-break: break-word;
	background: var(--bw-console); color: var(--bw-console-text);
}
.lesson-console-warn { color: #E8C468; }
.lesson-console-error { color: #FF8A80; }

/* course progress: the rail dots and the panel on the course index */
.rail-count { text-transform: none; letter-spacing: 0; color: var(--bw-text-quiet); font-weight: 400; float: right; }
.dot-lesson { background: var(--bw-rule-strong); }
.dot-passed { background: var(--bw-pill-ok); }
.dot-progress { background: var(--bw-progress); }
.dot-none { background: var(--bw-rule-strong); }
.course-progress { border: 1px solid var(--bw-rule); border-radius: 4px; padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; }
.course-progress-head { display: flex; align-items: center; gap: 10px; }
.course-count { font-size: 12px; color: var(--bw-text-note); }
.course-lessons { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.course-lessons li { display: flex; align-items: center; gap: 8px; }
.course-lessons .dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.course-lesson-state { margin-left: auto; font-size: 11px; color: var(--bw-text-muted); font-variant-numeric: tabular-nums; }
.course-progress-note { font-size: 11px; color: var(--bw-text-muted); line-height: 1.5; }

/* the API part (design 2a): language dropdown, rail, path block, dense tables, outline */
.lang-select { font-size: 13px; padding: 2px 4px; border: 1px solid var(--bw-rule-strong); background: #FBFCFD; color: var(--bw-text-strong); max-width: 240px; font-family: inherit; }
.rail-part-api { display: flex; justify-content: space-between; align-items: baseline; }
.rail-part-api .rail-count { float: none; }
.mono { font-family: var(--bw-font-mono); }
.rail-op { display: flex; align-items: center; gap: 8px; }
.rail-op .mono { font-size: 13px; }
.method { font-family: var(--bw-font-mono); font-size: 10px; font-weight: 600; width: 40px; flex: none; color: var(--bw-text-label); }
.method-get { color: var(--bw-changed); }
.method-post { color: var(--bw-blue-deep); }
.method-delete { color: var(--bw-danger); }
.method-put, .method-patch { color: var(--bw-expires-soon); }
.article h1.mono { font-family: var(--bw-font-mono); }
.api-path { display: flex; align-items: flex-start; border: 1px solid var(--bw-rule); border-radius: 4px; overflow: hidden; }
.api-path-method { padding: 12px 10px; background: var(--bw-surface); border-right: 1px solid var(--bw-rule); align-self: stretch; display: flex; align-items: flex-start; }
.api-path pre { margin: 0; flex: 1; min-width: 0; background: var(--bw-inset); padding: 12px; font-family: var(--bw-font-mono); font-size: 13px; line-height: 1.5; color: var(--bw-text-strong); overflow-x: auto; white-space: pre; }
.api-path .host { color: var(--bw-text-muted); }
.pill-method { font-family: var(--bw-font-mono); background: var(--bw-blue-tint); color: var(--bw-blue-deep); }
.article table.dense { font-size: 12px; }
.article table.dense td { padding: 4px 12px 4px 0; }
.req, .opt { font-family: var(--bw-font); font-size: 12px; margin-left: 6px; white-space: nowrap; }
.req { color: var(--bw-expires-soon); }
.opt { color: var(--bw-text-quiet); }
.status-2xx { color: var(--bw-changed); }
.status-4xx, .status-5xx { color: var(--bw-expires-soon); }
.outline-scope { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.pill-scope { font-family: var(--bw-font-mono); }
.dot-scope { width: 8px; height: 8px; border-radius: 50%; background: var(--bw-rule-strong); display: inline-block; }
.dot-scope.granted { background: var(--bw-pill-ok); }
.dot-scope.missing { background: var(--bw-danger); }
.outline-text { color: var(--bw-text-label); }

/* try-it: the OpenAPI executor (design 2a, brief §10.5) */
.try-it { border: 1px solid var(--bw-rule); border-radius: 4px; overflow: hidden; }
.try-it-head { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-bottom: 1px solid var(--bw-rule); font-size: 13px; }
.try-it-path { font-size: 13px; }
.try-it-ref { margin-left: auto; font-size: 12px; }
.try-it-bar { height: 34px; display: flex; align-items: center; border-bottom: 1px solid var(--bw-rule); background: var(--bw-surface); padding-right: 4px; font-size: 12px; color: var(--bw-text-secondary); }
.try-it-cred { margin-left: auto; font-size: 11px; color: var(--bw-text-muted); padding: 0 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.try-it-cred.warn { color: var(--bw-expires-soon); }
.try-it-actions { display: flex; gap: 6px; align-items: center; flex: none; }
.try-it-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.try-it-request { border-right: 1px solid var(--bw-rule); display: flex; flex-direction: column; min-width: 0; }
.try-it-pane { display: none; }
.try-it-pane.active { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.try-it-pane pre.code { flex: 1; background: var(--bw-surface); white-space: pre-wrap; word-break: break-word; }
.try-it-kv { display: grid; grid-template-columns: 110px minmax(0, 1fr); font-size: 12px; border-bottom: 1px solid var(--bw-rule-light); }
.try-it-key { padding: 6px 12px; color: var(--bw-text-note); border-bottom: 1px solid var(--bw-rule-hairline); }
.try-it-val { padding: 6px 12px; font-family: var(--bw-font-mono); color: var(--bw-text-strong); border-bottom: 1px solid var(--bw-rule-hairline); display: flex; gap: 8px; align-items: center; min-width: 0; flex-wrap: wrap; }
.try-it-val code { font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.try-it-kv > :nth-last-child(-n+2) { border-bottom: 0; }
.try-it-paste { font-family: var(--bw-font); font-size: 11px; }
.try-it-in { margin-left: 6px; font-size: 10px; text-transform: uppercase; color: var(--bw-text-quiet); }
.try-it-key .req { margin-left: 6px; font-size: 10px; }
.try-it-none { font-family: var(--bw-font); color: var(--bw-text-note); }
.try-it-input { font: inherit; font-size: 12px; font-family: var(--bw-font-mono); border: 1px solid var(--bw-rule-strong); padding: 2px 4px; width: 100%; background: var(--bw-surface); color: var(--bw-text-strong); }
.try-it-caption { padding: 6px 12px 0; font-size: 11px; text-transform: uppercase; letter-spacing: .03em; color: var(--bw-text-note); display: flex; gap: 8px; }
.try-it-valid, .try-it-note { text-transform: none; letter-spacing: 0; }
.try-it-valid.ok { color: var(--bw-changed); }
.try-it-valid.bad { color: var(--bw-danger); }
.try-it-editor { flex: 1; min-height: 120px; }
.try-it-textarea { min-height: 96px; white-space: pre; overflow-x: auto; overflow-y: hidden; }
.try-it-valid.warn { color: var(--bw-expires-soon); }
/*
 * The request editor (docs/api-request-editor-design.md §6): the app's Monaco editor takes the place
 * of the textarea when it and the schema bundle load. Its theme is the BIM.works UI's "bimworks"
 * (BimRepository/www/js/monaco-dsl/monacotheme.js), whose JSON colours are the ones highlightJson
 * uses, so an editable body and a rendered one look alike. Monaco injects its stylesheet at runtime,
 * after this file.
 */
.try-it-editor.has-monaco { display: block; padding: 0; min-height: 0; }
.try-it-editor.has-monaco > .lesson-gutter, .try-it-editor.has-monaco > .try-it-textarea { display: none; }
.try-it-monaco { width: 100%; min-height: 96px; background: var(--bw-surface); }
/* The rule for a (the brand blue) would colour Monaco's completion labels, which are <a>s: inside the editor
   they inherit, at one class of specificity so Monaco's own link rules (hovers) still win. Its floating
   widgets (the completion list and its details, hovers) are anchored surfaces: radius 4, the hairline ring */
.try-it-monaco :where(.monaco-editor a), .lesson-monaco :where(.monaco-editor a) { color: inherit; }
.try-it-monaco .monaco-editor .suggest-widget, .try-it-monaco .monaco-editor .suggest-details-container .suggest-details, .try-it-monaco .monaco-editor .monaco-hover,
.lesson-monaco .monaco-editor .suggest-widget, .lesson-monaco .monaco-editor .suggest-details-container .suggest-details, .lesson-monaco .monaco-editor .monaco-hover { border-color: transparent; border-radius: 4px; box-shadow: var(--bw-shadow-anchored); }
.try-it-response { background: var(--bw-inset); display: flex; flex-direction: column; min-height: 236px; min-width: 0; }
/* an operation whose scope needs a user feature the reader's account lacks (docs.js showGate): Send and the response dimmed, the reason under the bar */
.try-it-gate { padding: 6px 12px; font-size: 12px; line-height: 1.45; color: var(--bw-text-strong); background: var(--bw-note-warning); border-bottom: 1px solid var(--bw-rule); }
.try-it-unavailable [data-try-send]:disabled, .try-it-unavailable [data-try-send]:disabled:hover { opacity: .5; cursor: not-allowed; background: var(--bw-blue); }
.try-it-unavailable .try-it-response { opacity: .5; }
.try-it-status { height: 30px; display: flex; align-items: center; gap: 10px; padding: 0 12px; font-size: 12px; border-bottom: 1px solid var(--bw-rule); color: var(--bw-text-note); }
.try-it-spacer { flex: 1; }
.try-it-rtabs, .try-it-rtabs .tab { height: 30px; }
.try-it-download { font-size: 12px; }
.pill-status { font-size: 11px; font-weight: 600; color: #FFFFFF; border-radius: 5px; padding: 1px 6px; background: var(--bw-pill-ok); white-space: nowrap; }
.pill-status.warn { background: var(--bw-progress); }
.pill-status.error { background: var(--bw-danger); }
.try-it-out { flex: 1; background: transparent; white-space: pre-wrap; word-break: break-word; max-height: 480px; overflow: auto; }
.try-it-out .tok-err { color: var(--bw-danger); }
.pill { font-size: 11px; font-weight: 600; border-radius: 9px; padding: 1px 8px; background: #EFEFEF; color: var(--bw-text-label); }
.pill-ok { background: var(--bw-pill-ok); color: #FFFFFF; border-radius: 5px; padding: 1px 6px; font-weight: 400; }
.pill-error { background: var(--bw-danger); color: #FFFFFF; border-radius: 5px; padding: 1px 6px; font-weight: 400; }

/* examples block: one snippet in the language of the docs-bar dropdown */
.examples { border: 1px solid var(--bw-rule); border-radius: 4px; overflow: hidden; }
.examples-bar { height: 34px; display: flex; align-items: center; border-bottom: 1px solid var(--bw-rule); font-size: 12px; color: var(--bw-text-secondary); padding: 0 8px 0 12px; gap: 10px; }
.examples-lang { color: var(--bw-text-strong); font-weight: 600; }
.examples-note { color: var(--bw-text-quiet); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.examples-bar .link-button { font-size: 11px; margin-left: auto; white-space: nowrap; }
.examples pre.code { background: var(--bw-inset); white-space: pre-wrap; word-break: break-word; }

/* demo block (live demos): a cover until the reader runs it, then the docs-runtime frame */
.demo { border: 1px solid var(--bw-rule); border-radius: 4px; overflow: hidden; display: flex; flex-direction: column; background: var(--bw-surface); }
/* A demo may outgrow the reading column: up to 30% wider than the column when the main column has
   the room (wide viewports), never past the column padding, so it stays the column width on narrow
   ones. 100cqw is the .article-wrap width; the article is left-aligned in it, so the extra goes right. */
.demo { width: min(130%, calc(100cqw - 2 * var(--article-pad-x))); }
.demo-bar { min-height: 34px; display: flex; align-items: center; gap: 8px; padding: 0 8px 0 12px; border-bottom: 1px solid var(--bw-rule); font-size: 13px; }
.demo-title { font-weight: 600; color: var(--bw-text-strong); }
.demo-status { font-size: 11px; color: var(--bw-text-note); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; flex: 1; }
.demo-actions { margin-left: auto; display: flex; gap: 6px; align-items: center; }
.demo-stage { position: relative; height: var(--demo-height, 520px); background: var(--bw-inset); }
.demo-stage iframe { display: block; width: 100%; height: 100%; border: 0; background: var(--bw-surface); }
.demo-cover { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 24px; text-align: center; background: repeating-linear-gradient(135deg, var(--bw-inset) 0 12px, var(--bw-rule-hairline) 12px 24px); }
.demo-cover .btn-primary { font-size: 14px; padding: 6px 16px; }
.demo-needs { font-size: 12px; color: var(--bw-text-note); max-width: 420px; line-height: 1.5; }
.demo-notes { padding: 10px 12px; font-size: 13px; line-height: 1.5; border-top: 1px solid var(--bw-rule); }
.demo.running .demo-cover { display: none; }
.demo:fullscreen { border: 0; border-radius: 0; }
.demo:fullscreen .demo-stage { height: auto; flex: 1; }
.demo:fullscreen .demo-notes { display: none; }
.article:has(.demo) { max-width: 960px; }

/* explainer block: a static figure until its module (assets/explainers/<name>.js) draws the widget; no server,
   no token. As wide as a demo; the stage keeps the block's height while the cover shows, so nothing jumps.
   The module styles its own content, scoped under one class. */
.explainer { border: 1px solid var(--bw-rule); border-radius: 4px; overflow: hidden; background: var(--bw-surface); width: min(130%, calc(100cqw - 2 * var(--article-pad-x))); }
.explainer-bar { min-height: 34px; display: flex; align-items: center; gap: 8px; padding: 0 12px; border-bottom: 1px solid var(--bw-rule); font-size: 13px; }
.explainer-title { font-weight: 600; color: var(--bw-text-strong); }
.explainer-status { font-size: 11px; color: var(--bw-text-note); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; flex: 1; text-align: right; }
.explainer-stage { min-height: var(--explainer-height, 560px); display: flex; flex-direction: column; background: var(--bw-inset); }
.explainer-cover { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 24px 16px; }
.explainer-figure { width: 100%; max-width: 560px; }
.explainer-figure svg { display: block; width: 100%; height: auto; }
.explainer-alt { max-width: 560px; font-size: 13px; line-height: 1.5; color: var(--bw-text-note); text-align: center; }
.explainer.running .explainer-stage { display: block; min-height: 0; background: var(--bw-surface); }
.explainer.running .explainer-cover { display: none; }
.article:has(.explainer) { max-width: 960px; }

/* callouts */
.callout { display: flex; gap: 10px; border-left: 3px solid var(--bw-blue); border-radius: 3px; padding: 8px 12px; font-size: 13px; line-height: 1.5; background: var(--bw-inset); }
.callout-label { font-weight: 600; color: var(--bw-blue-deep); white-space: nowrap; }
.callout-body { flex: 1; min-width: 0; }
.callout-body > p + p { margin-top: 6px; }
.callout-body ul { padding-left: 18px; }
.callout-warning { border-left-color: var(--bw-warning); background: var(--bw-note-warning); }
.callout-warning .callout-label { color: var(--bw-text-strong); }
.callout-tip { border-left-color: var(--bw-pill-ok); background: var(--bw-banner-idle); }
.callout-tip .callout-label { color: var(--bw-changed); }

/* tables */
.table-wrap { overflow-x: auto; }
.article table { border-collapse: collapse; font-size: 13px; width: 100%; font-variant-numeric: tabular-nums; }
.article th { text-align: left; font-size: 10px; text-transform: uppercase; font-weight: 500; color: var(--bw-text-muted); padding: 4px 12px 4px 0; border-bottom: 1px solid var(--bw-divider-cool); }
.article td { padding: 5px 12px 5px 0; border-bottom: 1px solid var(--bw-divider-cool); vertical-align: top; line-height: 1.45; }
.article tr:hover td { background: #F4F8FC; }
.article td code { white-space: nowrap; }
/* a screenshot in a table cell (the changelog): a 16:10 thumbnail that docs.js opens full size */
.article td > img { display: block; width: 176px; max-width: none; aspect-ratio: 16 / 10; object-fit: cover; }
.article td:has(> img) { width: 176px; padding-right: 16px; }
.article td > img.shot { cursor: zoom-in; }
@media (max-width: 720px) {
	.article td > img, .article td:has(> img) { width: 96px; }
	.article td:has(> img) { padding-right: 10px; }
}
/* the full-size view: a dialog (radius 8, heavy shadow, scrim), captioned with the alt text */
.shot-dialog { padding: 0; border: 0; border-radius: 8px; box-shadow: var(--bw-shadow-dialog); background: var(--bw-surface); max-width: calc(100vw - 32px); max-height: calc(100vh - 32px); overflow: hidden; }
.shot-dialog::backdrop { background: rgba(38, 50, 56, .28); }
.shot-dialog figure { margin: 0; }
.shot-dialog img { display: block; width: auto; height: auto; max-width: calc(100vw - 32px); max-height: calc(100vh - 80px); }
.shot-dialog figcaption { display: flex; align-items: center; gap: 12px; padding: 8px 10px 8px 16px; font-size: 13px; line-height: 1.45; color: var(--bw-text-label); border-top: 1px solid var(--bw-rule-light); }
.shot-dialog figcaption span { flex: 1; min-width: 0; }

/* lists of links */
.article-links { margin-top: 12px; border-top: 1px solid var(--bw-rule-light); padding-top: 14px; display: grid; grid-template-columns: 1fr 1fr; gap: 20px; font-size: 13px; }
.link-list { display: flex; flex-direction: column; gap: 6px; }
.list-header { font-size: 12px; color: var(--bw-text-quiet); height: 30px; display: flex; align-items: center; border-bottom: 1px solid var(--bw-rule-light); }
.link-kind { color: var(--bw-text-quiet); }
.prev-next { display: flex; justify-content: space-between; border-top: 1px solid var(--bw-rule-light); padding-top: 14px; margin-top: 12px; font-size: 13px; gap: 20px; }
.facts-line { font-size: 11px; color: var(--bw-text-note); display: flex; gap: 14px; padding-top: 10px; flex-wrap: wrap; }
.page-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.page-list li { display: flex; flex-direction: column; gap: 2px; padding: 6px 0; border-bottom: 1px solid var(--bw-rule-hairline); }
.page-summary { font-size: 13px; color: var(--bw-text-note); }
.section-summary { color: var(--bw-text-label); }

/* outline */
.outline { padding: 32px 20px 0 0; font-size: 12px; color: var(--bw-text-note); display: flex; flex-direction: column; gap: 20px; position: sticky; top: 48px; align-self: start; max-height: calc(100vh - 48px); overflow-y: auto; }
.outline-box { display: flex; flex-direction: column; gap: 6px; }
.outline-box + .outline-box { border-top: 1px solid var(--bw-rule-light); padding-top: 14px; }
.outline-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.outline-list a { color: var(--bw-text-note); display: block; }
.outline-list a:hover { color: var(--bw-text-strong); }
.outline-item.level-3 { padding-left: 12px; }
.outline-item.current > a { color: var(--bw-text-strong); border-left: 2px solid var(--bw-blue); padding-left: 8px; margin-left: -10px; }

/* glossary */
.glossary { display: flex; flex-direction: column; gap: 0; }
.glossary-letter { margin-top: 12px; }
.glossary-entry { padding: 8px 0; border-bottom: 1px solid var(--bw-rule-hairline); }
.glossary-entry dt { display: flex; align-items: baseline; gap: 10px; font-weight: 600; }
.glossary-aliases { font-weight: 400; font-size: 12px; color: var(--bw-text-quiet); }
.glossary-entry dd { margin: 4px 0 0; color: var(--bw-text-strong); }
.glossary-entry .see, .glossary-entry .more { font-size: 13px; margin-left: 6px; }

/* glossary hover card */
.term-card { position: absolute; width: 300px; background: var(--bw-surface); border-radius: 4px; box-shadow: var(--bw-shadow-anchored); padding: 10px 12px; font-size: 13px; line-height: 1.45; color: var(--bw-text-dense); display: flex; flex-direction: column; gap: 4px; z-index: 30; }
.term-card-head { display: flex; align-items: baseline; gap: 8px; }
.term-card-head b { font-weight: 600; }
.term-card-head span { font-size: 11px; color: var(--bw-text-quiet); }
.term-card-links { display: flex; gap: 10px; font-size: 12px; padding-top: 4px; flex-wrap: wrap; }

/* landing */
.landing-main { max-width: 960px; margin: 0 auto; padding: 72px 40px 56px; display: flex; flex-direction: column; gap: 40px; }
.landing-hero { display: flex; flex-direction: column; gap: 14px; align-items: flex-start; }
.landing-hero h1 { margin: 0; font-size: 26px; font-weight: 600; line-height: 1.25; }
.landing-intro { margin: 0; font-size: 15px; line-height: 1.6; color: var(--bw-text-label); max-width: 560px; }
.landing-banner { width: 560px; max-width: 100%; }
.part-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.card { border: 1px solid var(--bw-rule-strong); border-radius: 6px; padding: 10px; background: var(--bw-surface); display: flex; flex-direction: column; gap: 8px; }
.card-title { font-size: 15px; font-weight: 600; color: var(--bw-text-strong); }
.card-line { font-size: 13px; color: var(--bw-text-label); line-height: 1.45; }
.card-links { display: flex; flex-direction: column; gap: 4px; font-size: 13px; margin-top: 2px; }
.quick-links { display: flex; flex-wrap: wrap; gap: 14px; font-size: 13px; align-items: center; }
.quick-label { color: var(--bw-text-quiet); }
.landing-body { display: flex; flex-direction: column; gap: 18px; line-height: 1.6; }
.landing-body h2 { font-size: 20px; font-weight: 600; margin: 0; }

/* footer */
.site-footer { border-top: 1px solid var(--bw-rule-light); padding: 12px 20px; display: flex; align-items: center; gap: 14px; font-size: 11px; color: var(--bw-text-note); flex-wrap: wrap; }
.footer-spacer { flex: 1; }

/* search palette: two lines per result (where it is, then the text around the match), query words marked */
.palette-backdrop { position: fixed; inset: 0; background: rgba(38, 50, 56, .28); display: flex; justify-content: center; align-items: flex-start; padding-top: 8vh; z-index: 1200; }
.palette { width: 800px; max-width: calc(100vw - 32px); background: var(--bw-surface); border-radius: 6px; box-shadow: var(--bw-shadow-anchored); font-size: 14px; color: var(--bw-text-dense); overflow: hidden; display: flex; flex-direction: column; max-height: 80vh; }
.palette-head { padding: 12px 16px; border-bottom: 1px solid var(--bw-rule-light); display: flex; align-items: center; gap: 12px; }
/* the input always has the focus while the palette is open; the head's underline is its focus ring */
.palette-head:focus-within { box-shadow: inset 0 -2px 0 var(--bw-blue); }
.palette-input { flex: 1; min-width: 0; border: 0; padding: 4px 0; font-size: 19px; font-family: inherit; outline: none; background: transparent; color: var(--bw-text-dense); }
.palette-input:focus-visible { outline: none; }
/* flex: none, or the overflowing results squeeze the scrollable row (its min-height is 0) and clip the chips */
.palette-filters { flex: none; display: flex; gap: 6px; padding: 8px 16px; border-bottom: 1px solid var(--bw-rule-light); overflow-x: auto; scrollbar-width: none; }
.palette-filters:empty { display: none; }
.palette-filter { flex: none; display: inline-flex; align-items: center; gap: 6px; font: inherit; font-size: 12px; line-height: 1; padding: 5px 9px; border: 1px solid var(--bw-rule-strong); border-radius: 12px; background: var(--bw-surface); color: var(--bw-text-label); cursor: pointer; }
.palette-filter:hover:not(:disabled) { border-color: var(--bw-blue); color: var(--bw-blue-deep); }
.palette-filter.active { background: var(--bw-blue); border-color: var(--bw-blue); color: #FFFFFF; }
.palette-filter:disabled { color: var(--bw-text-quiet); border-color: var(--bw-rule-light); cursor: default; }
.palette-filter .n { font-size: 11px; color: var(--bw-text-quiet); }
.palette-filter.active .n { color: inherit; opacity: .85; }
.palette-results { overflow-y: auto; flex: 1; padding-bottom: 6px; }
.palette-group { display: flex; align-items: center; gap: 8px; padding: 4px 16px; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--bw-text-quiet); margin-top: 8px; }
.palette-clear { margin-left: auto; padding: 0; border: 0; background: none; font: inherit; text-transform: none; letter-spacing: 0; color: var(--bw-blue); cursor: pointer; }
.palette-clear:hover { color: var(--bw-blue-deep); text-decoration: underline; }
.palette-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 16px; row-gap: 2px; padding: 7px 16px 7px 13px; border-left: 3px solid transparent; cursor: pointer; color: inherit; }
.palette-row:hover { color: inherit; }
.palette-row.active { background: var(--bw-blue-tint); border-left-color: var(--bw-blue); }
.palette-row .primary { font-weight: 600; color: var(--bw-text-dense); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.palette-row .primary .section { font-weight: 400; color: var(--bw-text-label); }
.palette-row .primary .section::before { content: "\203A"; margin: 0 6px; color: var(--bw-text-quiet); }
.palette-row .primary.mono { font-family: var(--bw-font-mono); }
.palette-row .source { font-size: 12px; color: var(--bw-text-quiet); white-space: nowrap; align-self: center; }
.palette-row .excerpt { grid-column: 1 / -1; font-size: 13px; line-height: 1.45; color: var(--bw-text-secondary); overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.palette-row mark { background: var(--bw-match); color: inherit; border-radius: 2px; padding: 0 1px; }
.palette-empty { padding: 14px 16px; color: var(--bw-text-quiet); font-size: 14px; }
.palette-foot { padding: 8px 16px; border-top: 1px solid var(--bw-rule-light); font-size: 12px; color: var(--bw-text-muted); display: flex; gap: 16px; }
.palette-count { margin-left: auto; }

/* the words of the search that opened the page (docs.js "search hits") */
mark.search-hit { background: var(--bw-match); color: var(--bw-text-dense); border-radius: 2px; padding: 0 1px; }
mark.search-hit.current { box-shadow: 0 0 0 2px var(--bw-warning); }
.search-hits { position: fixed; bottom: 16px; left: 50%; transform: translateX(-50%); z-index: 1100; display: flex; align-items: center; gap: 12px; max-width: calc(100vw - 32px); padding: 6px 6px 6px 14px; background: var(--bw-surface); border-radius: 4px; box-shadow: var(--bw-shadow-anchored); font-size: 13px; color: var(--bw-text-label); }
.search-hits span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search-hits button { flex: none; font: inherit; font-size: 12px; padding: 3px 10px; border: 1px solid var(--bw-border-dense); border-radius: 3px; background: var(--bw-surface); color: var(--bw-text-strong); cursor: pointer; }

/* ---- showcase pages (Viewer3D/docs/rich-annotations-design.md §13.2): the examples are the tree under the page's item in
   the rail, the description of the open one sits beside the one live viewer and can be hidden ---- */
body.layout-showcase .layout { grid-template-columns: var(--rail-width) minmax(0, 1fr); min-height: 0; }
/* a wide page (the Demos part): the rail stays, as on every page, and the outline's column goes to the application;
   the demo takes the rest of the window's width, the text keeps its reading measure */
body.layout-wide .layout { grid-template-columns: var(--rail-width) minmax(0, 1fr); }
body.layout-wide .article, body.layout-wide .article:has(.demo) { max-width: 1480px; margin: 0 auto; width: 100%; }
body.layout-wide .article > :not(.demo) { max-width: 856px; }
body.layout-wide .demo { width: 100%; }
body.layout-showcase .article { max-width: none; padding: 0; gap: 0; }
/* the page is the window: list and viewer scroll and resize inside it, the document does not */
body.layout-showcase .site-footer { display: none; }
/* the tree: group labels and examples a level below the page's item; with one open, the page is the open node, the example the selected one */
.rail-subs { display: flex; flex-direction: column; padding-bottom: 6px; }
.rail-group { padding: 10px 16px 2px 40px; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--bw-text-note); }
.rail-sub { display: block; padding: 4px 16px 4px 40px; font-size: 13px; color: var(--bw-text-label); }
.rail-sub:hover { background: var(--bw-blue-tint); color: var(--bw-text-strong); }
.rail-sub.active { background: var(--bw-surface); border-left: 3px solid var(--bw-blue); padding-left: 37px; color: var(--bw-text-strong); }
.rail-item.rail-parent.active:has(+ .rail-subs .rail-sub.active) { background: none; border-left: 0; padding-left: 28px; font-weight: 600; }
.showcase { display: grid; grid-template-columns: clamp(320px, 30vw, 460px) minmax(0, 1fr); height: calc(100vh - 48px); }
.showcase-text { overflow-y: auto; border-right: 1px solid var(--bw-rule); padding: 20px 20px 32px; display: flex; flex-direction: column; gap: 12px; font-size: 14px; }
/* hidden, the viewer takes the width (docs.js; Shell.java's head script sets it before the first paint) */
.showcase-text-hidden .showcase { grid-template-columns: minmax(0, 1fr); }
.showcase-text-hidden .showcase-text { display: none; }
.showcase-text h1 { font-size: 22px; margin: 0; }
.showcase-text .lede { font-size: 14px; margin: 0; }
.showcase-about { color: var(--bw-text-label); }
.showcase-about > summary { cursor: pointer; font-size: 13px; color: var(--bw-text-note); }
.showcase-about > summary:hover { color: var(--bw-text-strong); }
.showcase-about > p { margin: 6px 0 0; }
.showcase-examples { display: flex; flex-direction: column; gap: 24px; margin-top: 4px; padding-top: 16px; border-top: 1px solid var(--bw-rule-light); }
.showcase-part { display: flex; flex-direction: column; }
/* the part is the example's eyebrow */
.article .showcase-part h2 { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--bw-text-note); margin: 0 0 4px; padding: 0; border: 0; }
.showcase-part h2 .anchor { display: none; }
.showcase-row { display: flex; flex-direction: column; gap: 10px; }
.showcase-row + .showcase-row { margin-top: 24px; }
.showcase.scripted .showcase-row { margin-top: 0; }
.article .showcase-row-title { margin: 0; }
.showcase-row-body { display: flex; flex-direction: column; gap: 10px; }
.showcase-row-body p { margin: 0; }
.showcase.scripted .showcase-part:not(.open), .showcase.scripted .showcase-row:not(.open) { display: none; }
.showcase-row .example-caption { margin: 0; padding: 6px 10px; font-size: 12px; color: var(--bw-text-note); border-top: 1px solid var(--bw-rule); background: var(--bw-surface); }
.showcase-row .example pre.code { font-size: 12px; }
.showcase-viewer { display: flex; flex-direction: column; min-width: 0; background: var(--bw-inset); }
.showcase .demo { width: auto; flex: 1; border: 0; border-radius: 0; min-height: 0; }
.showcase .demo-stage { height: auto; flex: 1; min-height: 240px; }
.showcase-bar { min-height: 38px; display: flex; align-items: center; gap: 10px; padding: 0 8px 0 12px; border-top: 1px solid var(--bw-rule); background: var(--bw-surface); font-size: 13px; }
.showcase-current { font-weight: 600; color: var(--bw-text-strong); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.showcase-position { color: var(--bw-text-note); white-space: nowrap; }
.showcase-step-status { flex: 1; min-width: 0; font-size: 12px; color: var(--bw-text-note); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.showcase-step-status.error { color: #B91C1C; }
.showcase-actions { display: flex; gap: 6px; }
@media (max-width: 900px) {
	/* the viewer on top at 45 % of the height, the description scrolling under it; without it the viewer has the window */
	.showcase { grid-template-columns: minmax(0, 1fr); height: auto; }
	.showcase-viewer { order: -1; position: sticky; top: 48px; height: 45vh; z-index: 5; }
	.showcase-text-hidden .showcase-viewer { height: calc(100vh - 48px); }
	.showcase-text { overflow: visible; border-right: 0; }
	body.layout-showcase .site-footer { display: block; }
	.showcase .demo-bar .pill { display: none; }
	.showcase .demo-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
}

/* embed mode (the app's docs panel) */
body.embed .site-footer, body.embed .open-app, body.embed .docs-login, body.embed .part-tabs { display: none; }
body.embed .docs-bar { position: static; }

/* responsive */
@media (max-width: 1100px) {
	.layout { grid-template-columns: var(--rail-width) minmax(0, 1fr); }
	.outline { display: none; }
	/* signed out, "Log in" leads to the app too: on a narrow bar it takes the place of "Open BIM.works" */
	html.docs-signed-out .open-app { display: none; }
	.part-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1400px) and (min-width: 1101px) {
	.part-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 800px) {
	.layout, body.layout-wide .layout, body.layout-showcase .layout { grid-template-columns: minmax(0, 1fr); }
	.rail { position: fixed; top: 48px; left: 0; bottom: 0; width: var(--rail-width); height: calc(100vh - 48px); max-height: none; transform: translateX(-100%); transition: transform 200ms ease; z-index: 15; box-shadow: var(--bw-shadow-anchored); }
	.rail.open { transform: translateX(0); }
	.rail-toggle { display: inline-flex; }
	.rail-resizer { display: none; }
	.part-tabs { display: none; }
	.docs-bar { gap: 12px; padding: 0 12px; }
	.search-field { width: auto; }
	.search-field .search-placeholder { display: none; }
	.palette-foot > span:not(.palette-count) { display: none; }
	.article { --article-pad-x: 16px; padding: 20px var(--article-pad-x) 40px; }
	.article-links { grid-template-columns: 1fr; }
	.try-it-body { grid-template-columns: minmax(0, 1fr); }
	.try-it-request { border-right: 0; border-bottom: 1px solid var(--bw-rule); }
	.lang-select { display: none; }
	.landing-main { padding: 40px 16px; }
	.part-cards { grid-template-columns: minmax(0, 1fr); }
}
/* ---- editing in the browser (LOCALDEV only, assets/docs-edit.js; docs/documentation-inline-editing-design.md §4.4) ---- */
.docs-edit-toggle { flex-shrink: 0; }
.docs-edit-toggle[aria-pressed="true"] { border-color: var(--bw-blue); background: var(--bw-blue); color: #FFFFFF; }
.docs-edit-toggle[aria-pressed="true"]:hover { background: var(--bw-blue-deep); color: #FFFFFF; }
.docs-edit-bar { position: sticky; top: 48px; z-index: 19; display: flex; align-items: center; gap: 8px; padding: 6px 20px; border-bottom: 1px solid var(--bw-rule-strong); background: var(--bw-inset); font-size: 12px; color: var(--bw-text-label); }
.docs-edit-file { font-family: var(--bw-font-mono); color: var(--bw-text-strong); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.docs-edit-status { flex: 1; min-width: 0; text-align: right; position: relative; }
.docs-edit-problems { display: inline-block; }
.docs-edit-problems > summary { cursor: pointer; color: var(--bw-blue); }
.docs-edit-problems > ul { position: absolute; right: 0; top: calc(100% + 8px); z-index: 30; width: min(720px, 90vw); max-height: 50vh; overflow: auto; margin: 0; padding: 10px 12px 10px 28px; text-align: left; background: var(--bw-surface); border-radius: 4px; box-shadow: var(--bw-shadow-anchored); font-family: var(--bw-font-mono); font-size: 12px; color: var(--bw-text-strong); }
.docs-edit-problems li + li { margin-top: 6px; }
.docs-editing .article-wrap, .docs-editing .landing-main { position: relative; }
.docs-edit-layer { position: absolute; left: 0; top: 0; width: 0; height: 0; z-index: 5; }
.docs-edit-button { position: absolute; width: 24px; height: 24px; padding: 0; display: flex; align-items: center; justify-content: center; border: 1px solid var(--bw-border-dense); border-radius: 3px; background: var(--bw-surface); color: var(--bw-text-note); cursor: pointer; opacity: .45; transition: opacity 120ms ease; }
.docs-edit-button:hover, .docs-edit-button:focus-visible, .docs-edit-button.active { opacity: 1; color: var(--bw-blue-deep); border-color: var(--bw-blue); }
.docs-edit-button:hover { background: var(--bw-inset); }
.docs-edit-button:disabled { opacity: .25; cursor: default; color: var(--bw-text-quiet); border-color: var(--bw-border-dense); background: var(--bw-surface); }
.docs-edit-target { outline: 1px dashed var(--bw-blue); outline-offset: 4px; }
.docs-edit-flash { animation: target-flash 1.6s ease-out; }
.docs-editor { border: 1px solid var(--bw-border-dense); border-radius: 4px; background: var(--bw-surface); overflow: hidden; }
.part-cards > .docs-editor { grid-column: 1 / -1; }
.docs-editor-bar { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-bottom: 1px solid var(--bw-rule); font-size: 12px; color: var(--bw-text-label); }
.docs-editor-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.docs-editor-surface { height: 120px; }
.docs-editor-surface.plain { height: auto; }
.docs-editor-textarea { display: block; width: 100%; border: 0; padding: 8px 10px; font-family: var(--bw-font-mono); font-size: 13px; line-height: 1.5; color: var(--bw-text-strong); resize: vertical; }
.docs-editor-textarea:focus-visible { outline: 0; }
.docs-editor-message { padding: 6px 10px; border-top: 1px solid var(--bw-rule); font-size: 12px; color: var(--bw-text-strong); }
.docs-editor-message[data-kind="error"] { background: var(--bw-note-warning); }
.docs-editor-message[data-kind="progress"] { color: var(--bw-text-label); }
.docs-editor-message .btn { margin-left: 6px; }
/* the texts of api.yml (docs/documentation-api-yml-editing-plan.md §4.8): a field per text; under a table row, a row of its own */
.docs-editor-field { padding: 8px 10px; }
.docs-editor-field + .docs-editor-field { border-top: 1px solid var(--bw-rule); }
.docs-editor-label { display: block; margin-bottom: 6px; font-size: 12px; color: var(--bw-text-label); }
.docs-editor-line { box-sizing: border-box; display: block; width: 100%; height: 26px; padding: 0 6px; border: 1px solid var(--bw-border-dense); border-radius: 3px; background: var(--bw-surface); font: inherit; font-size: 13px; color: var(--bw-text-strong); }
.docs-editor-line:focus { border-color: var(--bw-blue-deep); }
.docs-editor-field > .docs-editor-surface { border: 1px solid var(--bw-border-dense); border-radius: 3px; }
tr.docs-edit-row > td { padding: 4px 0 12px; border-top: 0; background: transparent; }
.docs-editor-local { margin: 0 0 6px; }
.docs-editor-new { background: var(--bw-inset); }
.docs-api-panel { margin: 0 0 24px; padding: 10px 12px; border: 1px solid var(--bw-border-dense); border-radius: 4px; background: var(--bw-surface); font-size: 13px; }
.docs-api-panel-head { margin-bottom: 8px; color: var(--bw-text-label); }
.docs-api-panel table { width: 100%; }
.docs-api-panel-where { font-family: var(--bw-font-mono); font-size: 12px; color: var(--bw-text-strong); }
.docs-api-panel-now { color: var(--bw-text-note); }
.docs-api-badge { display: inline-block; padding: 0 6px; border: 1px solid var(--bw-border-dense); border-radius: 3px; font-family: inherit; font-size: 11px; color: var(--bw-text-label); }

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation: none !important; transition: none !important; }
}
@media print {
	.docs-bar, .rail, .rail-resizer, .outline, .site-footer, .code-tools, .example-actions, .example-run, .prev-next, .facts-line, .demo, .search-hits { display: none !important; }
	.layout { display: block; }
	.article { max-width: none; padding: 0; }
	a { color: inherit; }
}
