/* Required behavior only. Visual presentation belongs to the host or Breckly.Brand. */
[hidden] { display: none !important; }
.sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap; border:0; }
[data-copy-state="idle"] [data-when]:not([data-when="idle"]),
[data-copy-state="copied"] [data-when]:not([data-when="copied"]),
[data-copy-state="failed"] [data-when]:not([data-when="failed"]) { display:none; }

/* Overlay placement is behavior, not a palette or theme. */
.popover, .hovercard { position:fixed; z-index:100; }
.dialog-backdrop { position:fixed; inset:0; z-index:200; display:grid; place-items:center; }
.dialog, .wizard-layer { max-width:100vw; max-height:100dvh; overflow:auto; }

/* TimeChart measures its host before drawing. Reserve plot geometry even without a theme. */
.tc-frame { position:relative; min-width:0; }
.tc-box { position:relative; height:var(--tc-h, 180px); min-width:0; touch-action:pan-y; user-select:none; }
.tc-box svg { position:absolute; inset:0; display:block; width:100%; height:100%; overflow:visible; }
@media (max-width:639px) { .tc-box { height:calc(var(--tc-h, 180px) * .82); } }

/* DataTable: resize handles (Resizable) and the pinned first column (PinFirstColumn) are placement, not presentation. */
.dt-resize { position:absolute; top:0; bottom:0; right:0; width:8px; cursor:col-resize; touch-action:none; z-index:3; }
.dt-resizing, .dt-resizing * { cursor:col-resize !important; user-select:none; }
.dt-check-col { width:40px; }
.dt-table tr > .dt-pin-check, .dt-table tr > .dt-pin { position:sticky; left:0; z-index:1; }
.dt-table thead tr > th.dt-pin-check, .dt-table thead tr > th.dt-pin { position:sticky; z-index:4; }
.dt-table tr:has(> .dt-pin-check) > .dt-pin { left:40px; }
/* A group heading spans the leading columns: its toggle stays in view while the table scrolls sideways. */
.dt-group-toggle { position:sticky; left:6px; }
.dt-table tr:has(> .dt-pin-check) .dt-group-toggle, .dt-table tr:has(> .dt-check) .dt-group-toggle { left:46px; }
.dt-group-cell { white-space:nowrap; }

/* Docs: a wide table scrolls in its own region; a diagram never overflows its column. */
.md-table { overflow-x:auto; max-width:100%; }
.diagram-canvas svg { display:block; max-width:100%; height:auto; margin-inline:auto; }
/* The diagram viewer covers the viewport; its content pans and zooms from its top-left corner (Behavior/PanZoom.cs). */
.diagram-viewer { position:fixed; inset:0; z-index:210; display:grid; grid-template-rows:auto minmax(0, 1fr) auto; }
.diagram-stage { position:relative; overflow:hidden; touch-action:none; user-select:none; cursor:grab; }
.diagram-stage.dragging { cursor:grabbing; }
.diagram-pan { position:absolute; left:0; top:0; transform-origin:0 0; will-change:transform; }
.diagram-pan > svg { display:block; max-width:none; }
body.diagram-viewer-open { overflow:hidden; }
