/* ==========================================================================
   sections-pattern.css: the look of the sections pattern's object mechanics.

   The pattern's own stylesheet, beside its own file, exactly as slides.css sits
   beside slides.js. Every value here comes from public/tokens.css: no font is
   named, no colour is spelled out, and the type inside an object stays the
   design system's own size, scaled only by the object's chosen text step.

   The surface is a grid of columns declared by the pattern. An object states its
   place with four custom properties and the grid does the arithmetic, so the
   locked responsive workspace derives display sizes from that same grid.
   ========================================================================== */

/* ChopShop's page surface. This class belongs only to its declared page. */
.chopshop {
	color: var(--fg);
	background: transparent;
}

.sections-surface {
	display: grid;
	grid-template-columns: repeat(var(--sections-columns, 12), 1fr);
	grid-auto-rows: var(--sections-row-height, 32px);
	gap: var(--s-2);
	align-items: stretch;
	width: 100%;
}

.sections-object {
	display: flex;
	flex-direction: column;
	grid-column: calc(var(--sections-col, 0) + 1) / span var(--sections-cols, 12);
	grid-row: calc(var(--sections-row, 0) + 1) / span var(--sections-rows, 4);
	min-width: 0;
	min-height: 0;
	border: var(--b-hair) solid var(--border);
	border-radius: var(--r-lg);
	background: var(--bg);
}

.sections-object[hidden] {
	display: none;
}

.sections-object[data-dragging="true"] {
	border-color: var(--marker);
}

.sections-object[data-invalid="true"] {
	border-color: var(--alert);
}

.sections-object-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--s-2);
	padding: var(--s-2) var(--s-3);
	border-bottom: var(--b-hair) solid var(--border);
	color: var(--muted);
}

[data-sections-drag] {
	cursor: grab;
	touch-action: none;
	user-select: none;
}

[data-sections-drag]:active {
	cursor: grabbing;
}

.sections-object-tools {
	display: flex;
	align-items: center;
	gap: var(--s-1);
}

.sections-object-tool {
	border: var(--b-hair) solid transparent;
	border-radius: var(--r-md);
	padding: 0 var(--s-2);
	background: transparent;
	color: var(--muted);
	font: inherit;
	cursor: pointer;
}

.sections-object-tool:hover {
	border-color: var(--border);
	color: var(--fg);
}

.sections-object-body {
	flex: 1;
	overflow: auto;
	padding: var(--s-3);
	font-size: calc(1em * var(--sections-text-scale, 1));
}

.sections-object-size {
	position: relative;
	align-self: flex-end;
	width: var(--s-4);
	height: var(--s-4);
	border-right: var(--b-rule) solid var(--border);
	border-bottom: var(--b-rule) solid var(--border);
	cursor: nwse-resize;
	touch-action: none;
}

.sections-tray {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--s-2);
	margin-bottom: var(--s-3);
	color: var(--muted);
}

.sections-tray[hidden] {
	display: none;
}

.sections-tray-chip {
	border: var(--b-hair) solid var(--border);
	border-radius: var(--r-pill);
	padding: var(--s-1) var(--s-3);
	background: transparent;
	color: var(--fg);
	font: inherit;
	cursor: pointer;
}

.sections-tray-chip:hover {
	border-color: var(--marker);
}

/* A phone reads the arrangement rather than making it: the objects stack down
   the page and nothing invites a drag. */
@media (max-width: 720px) {
	.sections-surface {
		display: block;
	}

	.sections-object {
		margin-bottom: var(--s-3);
	}

	.sections-object-size {
		display: none;
	}

	[data-sections-drag] {
		cursor: default;
	}
}

/* The open Sections workspace. Rapport and ChopShop supply different live
   object bodies, but the tabs, tray, open surface, frames and hands are this
   one pattern. A rider may override the custom properties for its own content
   dimensions without replacing the behaviour — except the cell WIDTH on a
   canvas that declares `fitToWindow`, which the pattern works out from the
   window it is being read on and writes on the workspace element itself. The
   formula below is still the only one; the fit settles the one number it
   needs. */
.sections-workspace {
	--sections-workspace-cell-w: var(--s-24);
	--sections-workspace-cell-h: var(--s-16);
	--sections-workspace-cell-gap: var(--s-2);
	/* The one real declaration — both the strip's own min-height and the
	   band body's padding-top reservation read this, never a hardcoded
	   fallback baked into each separately, so the two can never drift out
	   of step the way they did narrow (see the removed override below). */
	--sections-workspace-object-controls-height: calc(var(--s-5) + var(--s-4));
	--sections-workspace-text-xs: var(--t-xs);
	--sections-workspace-text-sm: var(--t-sm);
	--sections-workspace-text-base: var(--t-base);
	--sections-workspace-text-md: var(--t-md);
	--sections-workspace-text-lg: var(--t-lg);
	--sections-workspace-text-xl: var(--t-xl);
	display: flex;
	flex-direction: column;
	min-height: 100%;
	height: 100%;
	box-sizing: border-box;
	/* The top owns the band spacing at every width; the workspace root owns none. */
	padding: 0;
	position: relative;
}

.sections-workspace-top {
	position: relative;
	z-index: 1;
	box-sizing: border-box;
	width: 100%;
	padding: var(--sections-workspace-padding, 140px var(--s-5) 44px);
	padding-bottom: var(--s-3);
	pointer-events: none;
}

.sections-workspace-top::after {
	content: "";
	display: block;
	height: calc(var(--t-sm) + var(--s-4));
}

.sections-workspace-controls {
	position: absolute;
	top: var(--s-3);
	left: 50%;
	z-index: 1;
	display: flex;
	flex-direction: row;
	justify-content: center;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--s-2);
	box-sizing: border-box;
	width: max-content;
	max-width: calc(100% - var(--s-8));
	transform: translateX(-50%);
	pointer-events: none;
}

.sections-workspace-heading-group,
.sections-workspace-locks button,
.sections-workspace-tray-chip,
.sections-workspace-heading,
.sections-workspace-page-watch-notice {
	pointer-events: auto;
}

.sections-workspace-heading {
	justify-self: start;
	margin: 0;
}

.sections-workspace-heading-group {
	position: absolute;
	left: var(--s-4);
	bottom: var(--s-4);
	display: flex;
	align-items: baseline;
	gap: var(--s-3);
	min-width: 0;
	pointer-events: none;
}

.sections-workspace-page-watch-notice {
	margin: 0;
	color: var(--muted);
}

.sections-workspace-page-watch-notice[hidden] {
	display: none;
}

.sections-workspace-locks {
	min-width: 0;
	max-width: 100%;
	display: flex;
	align-items: baseline;
	gap: var(--s-3);
}

.sections-workspace-edit-layout {
	font-family: var(--font-mono);
	font-size: var(--t-sm);
	background: none;
	border: var(--b-hair) solid transparent;
	border-radius: var(--r-pill);
	padding: var(--s-1) var(--s-4);
	color: var(--muted);
	cursor: pointer;
	transition: background var(--dur-hover) var(--ease);
}

.sections-workspace-trouble {
	margin: 0;
}

.sections-workspace-trouble:empty {
	display: none;
}

.sections-workspace-tray {
	flex-basis: 100%;
	justify-content: center;
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: var(--s-2);
}

.sections-workspace-tray:empty {
	display: none;
}

.sections-workspace-tray-label {
	color: var(--muted);
}

.sections-workspace-tray-chip {
	font-family: var(--font-sans);
	line-height: var(--lh-tight);
	color: var(--fg-soft);
	background: var(--panel);
	border: var(--b-hair) solid var(--border);
	border-radius: var(--r-pill);
	padding: var(--s-1) var(--s-3);
	cursor: pointer;
}

.sections-workspace-tray-chip:hover {
	color: var(--fg);
	border-color: var(--accent);
}

.sections-workspace-viewport {
	position: relative;
	position: absolute;
	inset: 0;
	overflow: hidden;
	cursor: grab;
	touch-action: none;
}

.sections-workspace-viewport[data-panning="true"] {
	cursor: grabbing;
}

.sections-workspace-surface {
	position: absolute;
	left: 0;
	top: 0;
	width: 0;
	height: 0;
	overflow: visible;
}

.sections-workspace-probe {
	position: absolute;
	visibility: hidden;
	pointer-events: none;
	box-sizing: content-box;
	width: calc(var(--sections-workspace-cell-w) + var(--sections-workspace-cell-gap));
	height: calc(var(--sections-workspace-cell-h) + var(--sections-workspace-cell-gap));
	padding-left: var(--sections-workspace-cell-gap);
}

.sections-workspace-object {
	position: absolute;
	left: calc(var(--sections-workspace-col) * (var(--sections-workspace-cell-w) + var(--sections-workspace-cell-gap)));
	top: var(--sections-reading-top, calc(var(--sections-workspace-row) * (var(--sections-workspace-cell-h) + var(--sections-workspace-cell-gap))));
	width: calc(
		var(--sections-workspace-cols) *
		var(--sections-workspace-cell-w) +
		(var(--sections-workspace-cols) - 1) *
		var(--sections-workspace-cell-gap)
	);
	height: var(--sections-reading-height, calc(
		var(--sections-workspace-rows) *
		var(--sections-workspace-cell-h) +
		(var(--sections-workspace-rows) - 1) *
		var(--sections-workspace-cell-gap)
	));
	/* An object is exactly as wide as the cells it spans, its own border
	   included. Without this the border sat OUTSIDE that width, so every object
	   was two pixels wider than the arrangement said, and the right-hand one on
	   a tab that fills its window overhung the edge by those two pixels. */
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	min-width: 0;
	min-height: 0;
	background: var(--bg);
	border: var(--b-hair) solid var(--rule);
	border-radius: var(--r-lg);
	overflow: hidden;
	cursor: default;
}

.sections-workspace-object[hidden] {
	display: none;
}

.sections-workspace-object[data-dragging="true"] {
	border-color: var(--accent);
	z-index: 2;
}

.sections-workspace-drag-marker {
	position: absolute;
	left: calc(var(--sections-workspace-col) * (var(--sections-workspace-cell-w) + var(--sections-workspace-cell-gap)));
	top: calc(var(--sections-workspace-row) * (var(--sections-workspace-cell-h) + var(--sections-workspace-cell-gap)));
	width: calc(
		var(--sections-workspace-cols) *
		var(--sections-workspace-cell-w) +
		(var(--sections-workspace-cols) - 1) *
		var(--sections-workspace-cell-gap)
	);
	height: calc(
		var(--sections-workspace-rows) *
		var(--sections-workspace-cell-h) +
		(var(--sections-workspace-rows) - 1) *
		var(--sections-workspace-cell-gap)
	);
	box-sizing: border-box;
	border: var(--b-hair) dashed var(--accent);
	border-radius: var(--r-lg);
	pointer-events: none;
}

.sections-workspace-object-name {
	position: absolute;
	top: var(--s-2);
	left: var(--s-3);
	z-index: 3;
	color: var(--muted);
}

/* A card's title can be renamed, and until this line nothing said so. The hint
   is the hover only, so a reader who is not arranging sees a plain title. */
.sections-workspace-object-name[title]:hover {
	color: var(--fg);
	text-decoration: underline;
	text-decoration-style: dotted;
	text-underline-offset: 0.2em;
}

.sections-workspace-object-name-input {
	position: absolute;
	top: var(--s-2);
	left: var(--s-3);
	z-index: 3;
	font-family: var(--font-mono);
	letter-spacing: inherit;
	text-transform: inherit;
	background: var(--panel);
	border: var(--b-hair) solid var(--accent);
	border-radius: var(--r-md);
	padding: 0 var(--s-2);
	color: var(--fg);
	width: 12em;
	min-width: 0;
}

.sections-workspace-object-name-input:focus {
	outline: none;
}

.sections-workspace-object-tools {
	position: relative;
	z-index: 3;
	display: flex;
	align-items: baseline;
	gap: var(--s-3);
}

.sections-workspace-object-controls {
	position: absolute;
	top: 0;
	right: 0;
	z-index: 3;
	display: flex;
	align-items: baseline;
	gap: var(--s-3);
	min-height: var(--sections-workspace-object-controls-height, calc(var(--s-5) + var(--s-4)));
	padding: var(--s-2) var(--s-3);
	box-sizing: border-box;
	/* Opaque: the body it floats over scrolls underneath it, and without its
	   own background a scrolled row can pass through and collide with its
	   words (Add a row, History, hide). */
	background: var(--bg);
}

/* The strip is built for every object, arranging or not, so an object's own
   declared controls (settled independently of arranging) can show without it.
   Hidden collapses it fully when arranging is off and the object declares
   none — the [hidden] attribute alone loses to the class's own `display`
   above, so this override is required, the same way every other explicitly
   displayed workspace element earns its own [hidden] rule in this file. */
.sections-workspace-object-controls[hidden] {
	display: none;
}

.sections-workspace-object-own-controls {
	display: flex;
	align-items: baseline;
	gap: var(--s-3);
}

.sections-workspace-object-own-control {
	font-family: var(--font-mono);
	background: none;
	border: 0;
	padding: 0;
	color: var(--muted);
	cursor: pointer;
	letter-spacing: inherit;
	text-transform: inherit;
}

.sections-workspace-object-own-control:hover {
	color: var(--fg);
}

.sections-workspace-object-tool {
	font-family: var(--font-mono);
	background: none;
	border: 0;
	padding: 0;
	color: var(--muted);
	cursor: pointer;
	letter-spacing: inherit;
	text-transform: inherit;
}

.sections-workspace-object-tool:hover {
	color: var(--fg);
}

.sections-workspace-object-tool:disabled {
	color: var(--rule);
	cursor: default;
}

.sections-workspace-object-body {
	flex: 1;
	min-height: 0;
	overflow: auto;
	padding: 0;
	display: flex;
	flex-direction: column;
	--t-xs: calc(var(--sections-workspace-text-xs) * var(--sections-workspace-text-scale, 1));
	--t-sm: calc(var(--sections-workspace-text-sm) * var(--sections-workspace-text-scale, 1));
	--t-base: calc(var(--sections-workspace-text-base) * var(--sections-workspace-text-scale, 1));
	--t-md: calc(var(--sections-workspace-text-md) * var(--sections-workspace-text-scale, 1));
	--t-lg: calc(var(--sections-workspace-text-lg) * var(--sections-workspace-text-scale, 1));
	--t-xl: calc(var(--sections-workspace-text-xl) * var(--sections-workspace-text-scale, 1));
}

.sections-workspace-object[data-sections-band] > .sections-workspace-object-body {
	padding-top: max(var(--s-6), calc(var(--sections-heading-height, 0px) - var(--s-3)));
}

.sections-workspace-object-arrange {
	position: absolute;
	inset: 0;
	z-index: 2;
	display: none;
	box-sizing: border-box;
	outline: var(--b-hair) solid var(--accent);
	outline-offset: calc(-1 * var(--b-hair));
	cursor: move;
	touch-action: none;
	user-select: none;
	-webkit-user-select: none;
}

.sections-workspace-object[data-dragging="true"] .sections-workspace-object-arrange {
	cursor: grabbing;
}

.sections-workspace-object-zone {
	position: absolute;
	z-index: 4;
	display: none;
	box-sizing: border-box;
	touch-action: none;
}

.sections-workspace-object-zone-n,
.sections-workspace-object-zone-s {
	left: 7px;
	right: 7px;
	height: 8px;
	cursor: ns-resize;
}

.sections-workspace-object-zone-n { top: -4px; }
.sections-workspace-object-zone-s { bottom: -4px; }

.sections-workspace-object-zone-e,
.sections-workspace-object-zone-w {
	top: 7px;
	bottom: 7px;
	width: 8px;
	cursor: ew-resize;
}

.sections-workspace-object-zone-e { right: -4px; }
.sections-workspace-object-zone-w { left: -4px; }

.sections-workspace-object-zone-ne,
.sections-workspace-object-zone-se,
.sections-workspace-object-zone-sw,
.sections-workspace-object-zone-nw {
	width: 14px;
	height: 14px;
}

.sections-workspace-object-zone-ne,
.sections-workspace-object-zone-sw { cursor: nesw-resize; }
.sections-workspace-object-zone-se,
.sections-workspace-object-zone-nw {
	cursor: nwse-resize;
}
.sections-workspace-object-zone-ne {
	top: 0;
	right: 0;
	border-top: var(--b-rule) solid var(--accent);
	border-right: var(--b-rule) solid var(--accent);
}
.sections-workspace-object-zone-se {
	right: 0;
	bottom: 0;
	border-right: var(--b-rule) solid var(--accent);
	border-bottom: var(--b-rule) solid var(--accent);
}
.sections-workspace-object-zone-sw {
	bottom: 0;
	left: 0;
	border-bottom: var(--b-rule) solid var(--accent);
	border-left: var(--b-rule) solid var(--accent);
}
.sections-workspace-object-zone-nw {
	top: 0;
	left: 0;
	border-top: var(--b-rule) solid var(--accent);
	border-left: var(--b-rule) solid var(--accent);
}

/* THE NEXT STEP CONTROL. The control belongs to the running order; where it sits
   on a Sections surface, and what it looks like there, belong here — it arrives
   carrying nothing but the design system's type classes and its own data
   attributes. It is placed by the same two custom properties an object is placed
   by, at the left edge under the lowest object on the tab, so it travels with the
   surface and a person who pans or scrolls to the bottom of the tab's content
   arrives at it. */
.sections-workspace-next-step {
	position: absolute;
	left: calc(
		var(--sections-workspace-col, 0) *
		(var(--sections-workspace-cell-w) + var(--sections-workspace-cell-gap))
	);
	top: calc(var(--sections-workspace-row, 0) * (var(--sections-workspace-cell-h) + var(--sections-workspace-cell-gap)));
	display: flex;
	align-items: center;
	gap: var(--s-2);
	/* An absolutely placed box with no width shrinks to the narrowest it can be
	   and breaks the words down the button one to a line. And no percentage
	   width helps here: the surface it is placed on is a zero-sized origin, so a
	   percentage of it is zero. Witnessed in a real browser, both ways, on
	   3 September 2026. */
	width: max-content;
	min-height: var(--sections-workspace-cell-h);
}

/* Hidden overrides the next-step row's flex display. */
.sections-workspace-next-step[hidden] {
	display: none;
}

.sections-workspace-next-step [data-running-order-next] {
	border: var(--b-hair) solid var(--border);
	border-radius: var(--r-md);
	padding: var(--s-2) var(--s-4);
	background: var(--bg);
	color: var(--fg);
	/* Body text preserves the written case and spacing. */
	font-family: var(--font-sans);
	font-size: var(--t-base);
	font-weight: 400;
	letter-spacing: normal;
	text-transform: none;
	cursor: pointer;
}

.sections-workspace-next-step [data-running-order-next]:hover {
	border-color: var(--accent);
	color: var(--accent);
}

.sections-workspace-next-step [data-running-order-end] {
	margin: 0;
	color: var(--muted);
}

@media (max-width: 1000px) {
	.sections-workspace[data-sections-migration] {
		height: auto;
		min-height: 100%;
		padding: 0;
	}

	[data-sections-migration] .sections-workspace-top {
		padding: var(--sections-workspace-narrow-padding, var(--sections-workspace-padding, 140px var(--s-5) 44px));
		padding-bottom: var(--s-3);
	}

	[data-sections-migration] .sections-workspace-heading-group {
		bottom: var(--s-4);
	}

	[data-sections-migration] .sections-workspace-viewport {
		position: static;
		flex: initial;
		overflow: visible;
		cursor: default;
		touch-action: auto;
	}

	[data-sections-migration] .sections-workspace-surface {
		position: static;
		width: auto;
		height: auto;
		transform: none !important;
		display: flex;
		flex-direction: column;
		gap: var(--s-3);
	}

	/* position stays relative, not static: an object's own controls strip
	   (.sections-workspace-object-controls, position: absolute; top: 0;
	   right: 0) anchors to its nearest positioned ancestor. Without a
	   positioning context here that ancestor becomes the whole workspace
	   surface (also static at this width), so the strip floated at the
	   page's own top corner, tens of pixels from the card it belonged to,
	   rather than sitting on it. top/left are reset to 0 because they still
	   apply under relative (unlike under static, where the base rule's grid
	   placement math was simply ignored) and this object is in normal flex
	   flow now, not the arranged grid. */
	[data-sections-migration] .sections-workspace-object {
		position: relative;
		top: 0;
		left: 0;
		width: auto;
		height: auto;
		min-height: 0;
	}

	/* The arranging layer, its resize zones and the text-size tools are
	   arranging's own touch-unfriendly affordances — hidden narrow, same as
	   always. The strip itself (.sections-workspace-object-controls) is not:
	   an object's own controls (Add a row, History, …) can live in it now,
	   independent of arranging, and narrow is not a reason to lose them. Its
	   own [hidden] attribute, set every render from the declared list, still
	   collapses it completely whenever that list is empty. */
	[data-sections-migration] .sections-workspace-object-tools,
	[data-sections-migration] .sections-workspace-object-arrange,
	[data-sections-migration] .sections-workspace-object-zone,
	[data-sections-migration] .sections-workspace-junction {
		display: none;
	}

	/* An object's own controls (Add a row, History, …) are not arranging-only
	   chrome and are never hidden narrow — only the arranging layer, tools and
	   resize zones are, just above. The band body reserved a mere 12px here once,
	   on the assumption that an unnamed banded object at this width could
	   only be showing the (now-hidden) arranging controls; now that an object's own
	   controls can occupy that same band regardless of naming, 12px let the
	   sticky table header paint straight over Add a row and History the
	   instant the body scrolled. The base rule's real reservation
	   (--sections-workspace-object-controls-height, declared once on
	   .sections-workspace) applies at every width now — nothing narrow-
	   specific left to say here at all. */

	/* The stack puts the cue last on its own, so its placement properties have
	   nothing left to say. */
	[data-sections-migration] .sections-workspace-next-step {
		position: static;
	}
}

.sections-workspace-locks,
.sections-workspace-tray {
	justify-content: center;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--s-2);
}

.sections-workspace-edit-layout {
	border-color: var(--border);
	border-radius: var(--r-md);
	background: var(--panel);
	color: var(--fg);
}

.sections-workspace-edit-layout:hover {
	border-color: var(--accent);
}

.sections-workspace-edit-layout[aria-pressed="true"],
.sections-workspace-tray-chip[aria-pressed="true"] {
	border-color: var(--accent);
	background: var(--panel-alt);
	color: var(--fg);
}

.sections-workspace-tray-chip:disabled {
	cursor: default;
}

[data-sections-edit-layout] {
	pointer-events: auto;
}

.sections-workspace-tray[hidden] {
	display: none;
}

[data-sections-arranging="true"][data-sections-editing="false"] .sections-workspace-object-tools {
	display: none;
}

[data-sections-arranging="true"][data-sections-editing="true"] .sections-workspace-object-controls {
	pointer-events: none;
}

[data-sections-arranging="true"][data-sections-editing="true"] .sections-workspace-object-tools,
[data-sections-arranging="true"][data-sections-editing="true"] .sections-workspace-object-tool {
	pointer-events: auto;
}

[data-sections-arranging="true"][data-sections-editing="true"] .sections-workspace-object-own-controls {
	pointer-events: none;
}

[data-sections-arranging="true"][data-sections-editing="true"] .sections-workspace-object {
	overflow: visible;
}

[data-sections-arranging="true"][data-sections-editing="true"] .sections-workspace-object-arrange {
	display: block;
}

[data-sections-arranging="true"][data-sections-editing="true"] .sections-workspace-object-zone {
	display: block;
}

[data-sections-arranging="true"][data-sections-editing="true"] .sections-workspace-object-body {
	pointer-events: none;
	user-select: none;
	-webkit-user-select: none;
}


/* Locking keeps the chosen arrangement at every screen width. Content keeps its
   normal text size and scrolls within each frame. The saved grid is untouched. */
.sections-workspace[data-sections-migration-responsive="true"] {
	height: 100%;
	min-height: 0;
	overflow: hidden;
}

.sections-workspace[data-sections-migration-responsive="true"] .sections-workspace-top {
	padding: var(--s-3) var(--s-4);
}

[data-sections-migration-responsive="true"] .sections-workspace-viewport {
	position: absolute;
	inset: 0;
	overflow: hidden;
	cursor: default;
	touch-action: auto;
}

.sections-workspace[data-sections-minimum-overflow="true"] .sections-workspace-viewport {
	overflow: auto;
}

.sections-workspace[data-sections-minimum-overflow="true"] .sections-workspace-surface {
	width: var(--sections-locked-scroll-width);
	height: var(--sections-locked-scroll-height);
}

[data-sections-migration-responsive="true"] .sections-workspace-surface {
	position: absolute;
	display: block;
	width: 0;
	height: 0;
	transform: translate3d(var(--sections-locked-origin-x), var(--sections-locked-origin-y), 0);
}

[data-sections-migration-responsive="true"] .sections-workspace-object {
	position: absolute;
	left: var(--sections-locked-left);
	top: var(--sections-reading-top, var(--sections-locked-top));
	width: var(--sections-locked-width);
	height: var(--sections-reading-height, var(--sections-locked-height));
	min-width: 0;
	min-height: 0;
}

/* ============================================================================
   AN OBJECT IS THE SIZE OF WHAT IS IN IT (2026-09-19, correction round 4).

   Not arranging, an object's frame is as tall as its content and as wide as
   its declared columns — never a rows-derived window with empty space in it
   (the bug Mike found in Membership and the sign-in page's visitor view). The
   surface leaves the absolute grid above for a normal, flowed CSS grid: each
   object is placed explicitly, never by grid auto-placement (round 4's
   fourth review, finding 1, found auto-placement backfilling a later band
   into an earlier one's spare columns) — column start and end come from the
   object's stored col and declared span (grid-column-start/-end, set from
   --sections-workspace-col/-cols), row start from its band, the distinct
   stored row values among the tab's objects, compressed and sorted
   (grid-row-start, from sections-pattern.js's flowBandById). Two objects
   sharing a band therefore sit side by side and the next band starts below
   whichever of them is taller, and each band is exactly one implicit grid
   row, auto-sized to its tallest object. No CSS order is set at any width
   (finding 2: an inline order fought the narrow flex rule below, which never
   set one itself and is meant to keep plain DOM order). Height is never set:
   a frame is exactly its body's own height.

   This is already true below 1001px: the narrow rule above (max-width:
   1000px) already flows every object, arranging or not, in one column. This
   block only has to say it again for the width that rule does not reach.

   Excluded whole: the locked, fitToWindow path above
   ([data-sections-migration-responsive="true"], mai-system-health's shape). That path
   already sizes from the stored rows and cols on purpose and stays exactly as
   it is — ground fact 6a of the round 4 brief records why. */
@media (min-width: 1001px) {
	.sections-workspace[data-sections-migration][data-sections-arranging="false"]:not([data-sections-migration-responsive="true"]) {
		height: auto;
		min-height: 0;
	}

	[data-sections-migration][data-sections-arranging="false"]:not([data-sections-migration-responsive="true"]) .sections-workspace-viewport {
		position: static;
		flex: initial;
		overflow: visible;
		cursor: default;
		touch-action: auto;
	}

	[data-sections-migration][data-sections-arranging="false"]:not([data-sections-migration-responsive="true"]) .sections-workspace-surface {
		position: static;
		display: grid;
		grid-template-columns: repeat(12, 1fr);
		align-items: start;
		align-content: start;
		column-gap: var(--sections-workspace-cell-gap);
		row-gap: var(--sections-workspace-cell-gap);
		width: auto;
		height: auto;
		transform: none !important;
	}

	[data-sections-migration][data-sections-arranging="false"]:not([data-sections-migration-responsive="true"]) .sections-workspace-object {
		position: relative;
		top: auto;
		left: auto;
		width: auto;
		height: auto;
		min-width: 0;
		min-height: 0;
	}

	/* The next-step control (Simple Workshop's participant view) declares no
	   explicit row of its own, only the full-width column span below; every
	   object now occupies an explicit row (its band), so grid auto-placement
	   seats the control in the first row where the whole width is free, which
	   is always the row after the last band. It only has to leave the
	   absolute positioning the arranging grid reads --sections-workspace-
	   col/row for, which a static surface is no longer a containing block
	   for. */
	[data-sections-migration][data-sections-arranging="false"]:not([data-sections-migration-responsive="true"]) .sections-workspace-next-step {
		position: static;
		grid-column: 1 / -1;
	}
}

/* ============================================================================
   PLACED TABLE OBJECT — public/placed-objects.js draws a table object's
   markup into the body the pattern supplies; this file styles it. Sizing is
   to content: no blanket per-cell minimum width. The header row and the key
   (first) column stay visible while the object body scrolls, because the
   body itself (.sections-workspace-object-body, above) is the scrolling
   ancestor and nothing here changes that.
   ============================================================================ */

.placed-table-wrap {
	width: 100%;
	box-sizing: border-box;
	overflow-x: auto;
	flex: none;
}

.placed-table {
	/* Grid, not table-layout: fixed. Each column's track is set once, on the
	   table itself, by placed-objects.js's layoutColumns — a floor declared
	   per kind in pixels (never from string length), the same
	   proportional-distribution pattern (grid-template-columns, fr units)
	   .sections-surface already uses elsewhere in this file. thead/tbody/tr
	   all display: contents below, so th/td become the grid's own items
	   directly, one row per grid row, in DOM order; position: sticky on th
	   still works, because it is evaluated against each cell's own
	   containing block, untouched by an ancestor being display: contents.
	   Borders come from grid gap + a background colour showing through it (the
	   standard collapsed-border-under-grid technique) instead of
	   border-collapse, which has no meaning once this is a grid. */
	display: grid;
	width: 100%;
	/* The table's own painted box (this rule's border and background — the
	   collapsed-border-under-grid technique) must cover every column, whichever
	   width the columns settle at. width: 100% above fills the room the object
	   gives it; min-content is the sum of its columns' own floors (every track
	   is minmax(floor, auto) or minmax(floor, 1fr) — see placed-objects.js's
	   columnTrack), so when those floors together outgrow that room, the box
	   grows with them instead of stopping short of the columns past the edge.
	   The body stays the scrolling ancestor (above), so a wider box simply
	   means more of it to scroll to, never a frame that grows.
	   NOT max-content: with the columns now sized from their real content
	   (placed-objects.js's sizer), max-content would be every column at its
	   longest value at once, so the table would overflow and ask to be scrolled
	   sideways on any page at all. */
	min-width: min-content;
	gap: var(--b-hair);
	background: var(--rule);
	border: var(--b-hair) solid var(--rule);
	font-family: var(--font-sans);
	font-size: var(--t-sm);
}

.placed-table thead,
.placed-table tbody,
.placed-table tr {
	display: contents;
}

.placed-table th,
.placed-table td {
	background: var(--bg);
	padding: var(--s-2);
	text-align: left;
	vertical-align: top;
	/* Content decides whether a cell wraps: short values (dates, choices, the
	   key) stay one line because their column sits at a floor wide enough for
	   them; a "long" column (Membership's notes) wraps here (read-only) and
	   in its own textarea (editable). word-break stays normal — every capped
	   column's floor is wide enough for its own real content, so it never
	   needs to split a short word mid-way; overflow-wrap is the last-resort
	   safety net for a single token genuinely too long for the column at all
	   (a bare URL, say), never the everyday behaviour. */
	white-space: normal;
	word-break: normal;
	overflow-wrap: break-word;
}

.placed-table th {
	font-family: var(--font-mono);
	font-size: var(--t-xs);
	font-weight: 400;
	position: sticky;
	top: 0;
	z-index: 2;
	background: var(--bg);
}

.placed-table td:first-child,
.placed-table th:first-child {
	position: sticky;
	left: 0;
	z-index: 1;
	background: var(--bg);
}

.placed-table td:first-child::before,
.placed-table th:first-child::before {
	/* The gutter beside the pinned column. The scrolling ancestor is the
	   object's own body, which carries 16px of padding each side, and a
	   sticky cell can only ever cover the content box — so a column scrolled
	   under the pinned one still painted its last few letters in that 16px
	   strip, which read as fragments of words stuck to the left edge. This
	   strip travels with the pinned cell and covers it. At rest it sits over
	   the body's own padding, where there is nothing but the page's
	   background anyway, so it shows only while there is something to
	   hide. */
	content: "";
	position: absolute;
	top: 0;
	bottom: 0;
	right: 100%;
	width: var(--s-4);
	background: var(--bg);
}

.placed-table td:first-child::after,
.placed-table th:first-child::after {
	/* The other side of the same problem: a sticky cell covers its own width
	   and no more, so the part of whichever column is half-way under the
	   pinned one that has not passed behind yet stayed visible between the
	   pinned column and the next whole one — loose text with no header above
	   it. placed-objects.js measures that gap from the columns' own laid-out
	   positions on every scroll and every render and writes it here; at rest,
	   with nothing half-hidden, it is zero wide and paints nothing. The
	   grid's own hairline gap is left uncovered, so the pinned column keeps a
	   border beside it either way. */
	content: "";
	position: absolute;
	top: 0;
	bottom: 0;
	left: 100%;
	width: var(--placed-table-cover, 0px);
	background: var(--bg);
}

.placed-table th:first-child {
	z-index: 3;
}

.placed-table-caption {
	display: block;
	margin-top: var(--s-1);
	font-weight: 400;
	text-transform: none;
	color: var(--muted);
}

.placed-table input,
.placed-table select,
.placed-table textarea {
	/* The column's own grid track (set once by placed-objects.js's
	   layoutColumns) decides the width now, not the field — so every field
	   simply fills its own cell. A select still grows itself past the
	   track's floor, natively, to its own widest real option. */
	box-sizing: border-box;
	width: 100%;
	border: 0;
	/* A browser's own default padding on a form field (2px each side on a
	   textarea) is room the value does not get, while the sizer beside it
	   measures the text with no padding at all — so a column sized to exactly
	   fit its value still wrapped it. The cell's own padding is the spacing
	   here; the field has none of its own. */
	padding: 0;
	background: transparent;
	color: var(--fg);
	font: inherit;
}

.placed-table select {
	/* The choice track's own cap on how far a select may grow past its
	   floor: max-width on the grid item, not part of the track itself —
	   CSS's min()/max() do not accept max-content as an argument, so a
	   track cannot express "grow to content, up to a cap" in one
	   declaration (see layoutColumns's own comment). */
	max-width: 200px;
}

.placed-table input::placeholder,
.placed-table textarea::placeholder {
	color: var(--fg-soft);
}

.placed-table td.placed-table-cell {
	/* The cell holds two things in the same place: the field a person types
	   into, and the zero-height sizer that tells the browser how wide this
	   cell's real value is (placed-objects.js's buildSizer). One grid area
	   for both, so the sizer decides the cell's width and the field decides
	   its height, and neither is ever below or beside the other. */
	display: grid;
}

.placed-table td.placed-table-cell > * {
	grid-area: 1 / 1;
}

.placed-table-sizer {
	/* Invisible, takes no room, still measurable: height 0 with its overflow
	   hidden means nothing of it is ever drawn and it adds nothing to the
	   row's height, while its text still reports the width this value really
	   needs. pre, because a wrapped copy would report the width it had already
	   been squeezed into rather than the width it wants. */
	display: block;
	height: 0;
	overflow: hidden;
	white-space: pre;
	font: inherit;
	pointer-events: none;
}

.placed-table td.placed-table-cell-key .placed-table-sizer {
	/* The pinned column's own sizer, and only that one, insists on its width
	   rather than offering it. A sizer with its overflow hidden tells the
	   browser its smallest acceptable width is zero — which is right for every
	   column that may be squeezed and wrap, and wrong for the membership
	   number, which stays on screen while the rest scroll behind it and has to
	   stay readable. min-content here is this value's own text, so the key
	   column's auto track (placed-objects.js's columnTrack) can never settle
	   narrower than a whole membership number. */
	min-width: min-content;
}

.placed-table-field {
	/* A "long" column's own field: a textarea, the one kind of cell that
	   wraps and grows — its column carries no character cap, so this is
	   never fighting a too-narrow width, only genuinely long content. One
	   row until content needs more; grown by placed-objects.js's own input
	   handler, never by CSS resize. */
	display: block;
	resize: none;
	overflow: hidden;
	white-space: pre-wrap;
	vertical-align: top;
}

.placed-table input[type="date"] {
	font: inherit;
	color: var(--fg);
}

.placed-table-row-pending td {
	background: var(--panel);
}

/* .placed-table th, .placed-table td above sets white-space: normal at
   (class + tag) specificity; this needs to outrank it by the same margin to
   actually win, or a row action's own label wraps letter by letter. */
.placed-table td.placed-table-actions {
	display: flex;
	gap: var(--s-2);
	white-space: nowrap;
	word-break: normal;
}

.placed-table-actions button {
	border: var(--b-hair) solid var(--border);
	border-radius: var(--r-sm);
	background: var(--bg);
	color: var(--fg);
	padding: var(--s-1) var(--s-2);
	font: inherit;
	cursor: pointer;
}

/* :first-child is not decoration here, it is load-bearing: the beside row's
   one cell IS its tr's first (and only) child, so without it this rule tied
   .placed-table td:first-child's own specificity (0,2,1) and lost on source
   order — sticky positioning and an opaque background always won, and this
   whole rule was dead. Matching :first-child too makes the specificity an
   exact tie, which this rule then wins by coming later in the file. */
/* The detail row's own cell is not the pinned column (it spans every column
   and stays put; see below), so the gutter strip above has nothing to cover
   for it — and, left in place on a cell that is deliberately not positioned,
   it would be laid out against the page instead of against the cell. */
.placed-table-beside-row td:first-child::before,
.placed-table-beside-row td:first-child::after {
	content: none;
}

.placed-table-beside-row td:first-child {
	position: static;
	border-top: 0;
	padding-top: 0;
	/* Round 6 (Mike, 20 September 2026: "the detail line under the row is a
	   green filled block"). This cell spans the whole row, and a transparent
	   background let the table's own gap colour (--rule, the background this
	   grid paints its borders with) show through the entire span — a filled
	   band across the table, not a line under a row. The page's own background
	   puts it back to what it is: a quiet line under its row, in the row's own
	   width. */
	background: var(--bg);
	/* Round 5: this cell spans every column (grid-column: 1 / -1,
	   placed-objects.js) and wraps its own long line (white-space: normal,
	   inherited from .placed-table th/td above) — but CSS grid track sizing
	   still measures a spanning item's UNWRAPPED (max-content) width when
	   deciding how far a max-content track (the action column, ACTIONS_TRACK
	   in placed-objects.js) must grow, regardless of whether the item will
	   actually wrap once laid out. Every fixed-width column track is already
	   at its own limit, so the entire deficit landed on the one flexible
	   track: measured at 1000px wide, this beside line alone pushed the
	   action column to 698px and forced Simple to scroll sideways, which the
	   outcome says it never does. contain: inline-size makes this cell
	   report no preferred size of its own to that measurement — it still
	   receives whatever width the data rows above it settle the grid at, and
	   still wraps inside it exactly as before; only its OWN contribution to
	   deciding that width is removed. */
	contain: inline-size;
}

.placed-table-beside {
	margin: 0;
	color: var(--fg-soft);
}

.placed-table-hint {
	margin: var(--s-4) 0 0;
	color: var(--fg-soft);
	/* Round 5b correction, finding 5: the hint sat inside the same scrolling
	   body as the table's own columns (placed-objects.js's layoutWrap appends
	   it into .placed-table-wrap, a plain sibling of the table), so scrolling
	   sideways to see a far column carried the caption off with it. The same
	   technique the key column already uses (:1031 onward, below) keeps it in
	   view instead: sticky to the scrolling body's own left edge — but sticky
	   only ever has room to move an element WITHIN its own containing block
	   (.placed-table-wrap), and a plain block <p> at its default width: auto
	   fills that containing block exactly, leaving no room to move at all
	   (witnessed directly: it scrolled off with everything else, unchanged).
	   width: fit-content shrinks it to its own text's real width — well under
	   the wrap's, so sticky has somewhere to go — while still capping at the
	   wrap's own width so a hint too long to fit on one line still wraps,
	   exactly as it did before. */
	position: sticky;
	left: 0;
	width: fit-content;
}

.placed-table-saved-label {
	margin: 0 0 var(--s-2);
	color: var(--muted);
}

.placed-table-status {
	margin: var(--s-4) 0 0;
	color: var(--fg-soft);
}

.placed-table-status-ok {
	color: var(--status-ok);
}

.placed-table-status-refusal,
.placed-table-status-error {
	color: var(--status-alert);
}

.placed-table-status-notice {
	margin: var(--s-2) 0 0;
	color: var(--status-alert);
}

.placed-table-history {
	margin: var(--s-4) 0 0;
	padding-left: var(--s-5);
}

.placed-table-history li + li {
	margin-top: var(--s-2);
}

.placed-table-history button {
	border: 0;
	padding: 0;
	background: none;
	color: var(--fg);
	text-align: left;
	cursor: pointer;
}

/* Keep individual corners inside their owner; the gap between four objects
   belongs to their shared divider. Hover and dragging identify the full owner. */
.sections-workspace-object:has(> .sections-workspace-object-zone:hover) > .sections-workspace-object-arrange,
.sections-workspace-object[data-junction-hover="true"] > .sections-workspace-object-arrange,
.sections-workspace-object[data-dragging="true"] > .sections-workspace-object-arrange {
	background: color-mix(in srgb, var(--accent) 12%, transparent);
	outline-width: var(--b-rule);
}
.sections-workspace-junction {
	position: absolute;
	z-index: 5;
	width: 8px;
	height: 8px;
	transform: translate(-50%, -50%);
	background: var(--accent);
	cursor: move;
	touch-action: none;
}

/* One object-owned rectangle in both reading and Edit layout, at every width. */
.sections-workspace.sections-workspace[data-sections-geometry="objects"] {
	height: 100%;
	min-height: 0;
	overflow: hidden;
}
.sections-workspace[data-sections-geometry="objects"] .sections-workspace-viewport {
	position: absolute;
	inset: 0;
	overflow: auto;
}
.sections-workspace[data-sections-geometry="objects"] .sections-workspace-surface {
	position: absolute;
	display: block;
	width: var(--sections-locked-scroll-width);
	height: var(--sections-locked-scroll-height);
}
.sections-workspace[data-sections-geometry="objects"] .sections-workspace-object {
	position: absolute;
	left: var(--sections-object-left);
	top: var(--sections-object-top);
	width: var(--sections-object-width);
	height: var(--sections-object-height);
	min-width: 0;
	min-height: 0;
}
.sections-workspace[data-sections-geometry="objects"] [data-sections-scroll-or-grow="grow"] > .sections-workspace-object-body {
	flex: 1 0 auto;
	height: auto;
	overflow: visible;
}
/* The collection's chosen frame is independent of its contents. One shared
   reading body owns wheel, scrollbar and reading-position restoration. */
.sections-workspace[data-sections-geometry="objects"] [data-sections-list-frame] > .sections-workspace-object-body {
	flex: 1 1 0;
	height: 0;
	min-width: 0;
	min-height: 0;
	overflow: auto;
	overscroll-behavior: contain;
}
.sections-workspace [data-sections-video-shape] video {
	object-fit: contain;
}
/* Arranging tools overlay the existing content band instead of adding padding. */
.sections-workspace[data-sections-geometry="objects"] .sections-workspace-object:not([data-sections-content-band]) > .sections-workspace-object-body {
	padding-top: 0;
}

/* One current view. Historical flow/fit selectors above run only while a copied
   old grid is being measured, never alongside these canvas-unit rectangles. */
.sections-workspace[data-sections-geometry="objects"] {
	height: 100%;
	min-height: 0;
	overflow: hidden;
}
.sections-workspace[data-sections-geometry="objects"] .sections-workspace-top {
	padding: var(--s-3) var(--s-4);
}
.sections-workspace[data-sections-geometry="objects"] .sections-workspace-viewport {
	position: absolute;
	inset: 0;
	overflow: auto;
	touch-action: auto;
}
.sections-workspace[data-sections-geometry="objects"] .sections-workspace-surface {
	position: absolute;
	left: 0;
	top: 0;
	width: var(--sections-canvas-width, 1px);
	height: var(--sections-canvas-height, 1px);
	display: block;
}
.sections-workspace[data-sections-geometry="objects"] [data-sections-frameless] {
	border: 0;
	border-radius: 0;
	background: transparent;
}
[data-sections-fold-content-hidden] { display: none !important; }

/* Held placements belong to their holder's body, not the canvas plane. */
.sections-held-objects {
	display: flex;
	flex-direction: column;
	min-width: 0;
	overflow-anchor: none;
}
.sections-workspace[data-sections-geometry="objects"] .sections-held-objects > [data-sections-held-object] {
	position: relative;
	left: auto;
	top: auto;
	flex: none;
	width: 100%;
	max-width: 100%;
}
.sections-held-owner-content:empty { display: none; }

/* Content drawn from a model has no authored box. Keep its natural height
   between measurements instead of resizing every card to measure it. */
.sections-workspace[data-sections-geometry="objects"] .sections-held-objects > [data-sections-natural-height] {
	height: auto;
	min-height: var(--sections-natural-min-height);
}

.sections-workspace-controls > .sections-workspace-page-controls {
	position: static;
	transform: none;
	pointer-events: auto;
}

[data-sections-owner-heading] { position: relative; z-index: 3; pointer-events: auto; }
[data-sections-arranging="true"][data-sections-editing="true"] .sections-workspace-object-own-controls { pointer-events: auto; }


/* The native range and the painted plane share the accepted Sections view.
   Clipping here prevents transformed objects from adding a second scroll range. */
.sections-navigation-track { position: relative; overflow-anchor: none; }
.sections-navigation-plane { position: sticky; left: 0; top: 0; overflow: clip; }
/* Sections restores the page viewport itself. Scroll object bodies retain
   their browser anchoring. */
.sections-workspace[data-sections-geometry="objects"] .sections-workspace-viewport { overflow-anchor: none; overscroll-behavior: contain; }
/* An anchored chip can leave less room than an object's accepted width. Keep
   both native scrollbars visible inside that room, including on macOS, so the
   rest of a table or a wide module can be reached without a trackpad gesture. */
body[data-kit-page-room] .sections-workspace-viewport::-webkit-scrollbar {
	width: var(--s-3);
	height: var(--s-3);
}
body[data-kit-page-room] .sections-workspace-viewport::-webkit-scrollbar-track,
body[data-kit-page-room] .sections-workspace-viewport::-webkit-scrollbar-corner { background: var(--panel); }
body[data-kit-page-room] .sections-workspace-viewport::-webkit-scrollbar-thumb {
	background: var(--muted);
	border: var(--s-1) solid var(--panel);
}

/* History is a shared reading panel; its scroll stays inside the controls. */
.sections-workspace-history {
	display: flex;
	flex-direction: column;
	flex-basis: 100%;
	min-width: 0;
	max-width: 100%;
	box-sizing: border-box;
	max-height: 40vh;
	overflow: auto;
	padding: var(--s-2);
	gap: var(--s-1);
	background: var(--bg);
	border: 1px solid var(--border);
	border-radius: var(--r-sm);
	pointer-events: auto;
}

.sections-workspace-other-window {
	flex-basis: 100%;
	text-align: center;
}

/* Each row stays inside the shared controls even with long catalogue words. */
.sections-workspace-locks > *,
.sections-workspace-history > * {
	min-width: 0;
	max-width: 100%;
	overflow-wrap: anywhere;
}

/* A proposed placement has no module view and is absent from saved layouts. */
.sections-catalogue-placement {
	position: absolute;
	box-sizing: border-box;
	border: 2px dashed var(--accent);
	background: var(--bg);
	color: var(--fg);
	padding: var(--s-3);
	pointer-events: none;
	z-index: 5;
}
.sections-catalogue-placement-actions { display: flex; gap: var(--s-2); pointer-events: auto; }
.sections-catalogue-choice { display: block; width: 100%; text-align: left; }
.sections-catalogue-unavailable { padding: var(--s-3); }
.sections-catalogue-choice {
	font: inherit;
	color: var(--fg);
	background: var(--bg);
	border: 1px solid var(--rule);
	border-radius: var(--r-sm);
	padding: var(--s-2) var(--s-3);
	margin-bottom: var(--s-1);
	cursor: pointer;
}
.sections-catalogue-choice:disabled { opacity: 0.5; cursor: default; }

/* Member gestures have their own handles; reading content remains interactive. */
[data-sections-member-movable] { overflow: visible; }
[data-sections-member-movable] > .sections-workspace-object-zone { display: block; touch-action: none; }
[data-sections-member-movable] > .sections-workspace-object-arrange {
	display: block;
	height: 12px;
	bottom: auto;
	touch-action: none;
}
.sections-catalogue-placement { display: flex; align-items: center; gap: var(--s-2); }

.sections-workspace-snap-guide {
	position: absolute;
	z-index: 4;
	pointer-events: none;
	background: var(--accent);
}

.sections-workspace-snap-guide[data-sections-snap-guide="x"] {
	top: -100000px;
	width: 1px;
	height: 200000px;
}

.sections-workspace-snap-guide[data-sections-snap-guide="y"] {
	left: -100000px;
	height: 1px;
	width: 200000px;
}

/* Shared review heading: fixed above the reading owner and retained on fold. */
[data-sections-heading-variant="review"] {
	background: color-mix(in srgb, var(--panel) 88%, var(--accent));
}
.sections-owner-heading {
	flex: none;
	display: flex;
	justify-content: space-between;
	align-items: start;
	flex-wrap: wrap;
	gap: var(--s-2);
	padding: var(--s-4);
	border-bottom: var(--b-hair) solid var(--accent);
	min-width: 0;
}
.sections-owner-heading-title {
	border: 0;
	padding: 0;
	margin: 0;
	background: transparent;
	color: var(--marker);
	font-family: var(--font-sans);
	font-size: var(--t-sm);
	font-weight: 800;
	letter-spacing: 0.06em;
	text-align: left;
	cursor: pointer;
	overflow-wrap: anywhere;
}
.sections-owner-heading-actions {
	display: flex;
	align-items: flex-start;
	gap: calc(var(--s-3) / 2);
	flex-wrap: wrap;
	min-width: 0;
}
.sections-owner-heading-control {
	border: var(--b-hair) solid var(--border, var(--rule));
	background: var(--panel);
	color: var(--muted);
	border-radius: var(--r-md);
	padding: calc(var(--s-1) + var(--b-hair)) var(--s-2);
	font-family: var(--font-sans);
	font-size: var(--t-xs);
	font-weight: 700;
	letter-spacing: 0.04em;
	cursor: pointer;
	overflow-wrap: anywhere;
}
.sections-owner-heading-control:hover { border-color: var(--accent); color: var(--fg); }
.sections-owner-heading-control:disabled { opacity: 0.5; cursor: wait; }
.sections-owner-heading-count {
	border: 0;
	padding: 0;
	background: transparent;
	color: var(--accent);
	font-family: var(--font-sans);
	font-size: var(--t-sm);
}
button.sections-owner-heading-count { cursor: pointer; }
button.sections-owner-heading-count:disabled { opacity: 1; cursor: default; }
.sections-owner-heading :is(button):focus-visible {
	outline: var(--focus-ring-width) solid var(--accent);
	outline-offset: var(--focus-ring-offset);
}
/* Model status determines filtering. Nothing is removed or settled. */
[data-sections-filtered="true"] { display: none !important; }
[data-sections-wrap="off"] {
	white-space: pre;
	overflow-wrap: normal;
	word-break: normal;
	overflow-x: auto;
}
[data-sections-reading-text] { min-width: 0; }
[data-sections-reached] {
	outline: var(--focus-ring-width) solid var(--accent);
	outline-offset: calc(-1 * var(--focus-ring-width));
}

/* Shared review content roles. */
.sections-review-facts {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}
.sections-review-facts span {
	border: 1px solid var(--border);
	background: var(--panel);
	border-radius: 4px;
	padding: 7px 10px;
	color: var(--muted);
	font-size: var(--t-sm);
}
.sections-review-group {
	padding: 14px;
	display: grid;
	gap: 10px;
}
.sections-review-group + .sections-review-group {
	border-top: 1px solid var(--border);
}
.sections-review-subhead-row {
	display: flex;
	justify-content: space-between;
	gap: 8px;
}
.sections-review-subhead {
	margin: 0;
	color: var(--fg-soft);
	font-size: var(--t-xs);
	letter-spacing: 0.05em;
}
.sections-review-subhead-row span {
	color: var(--muted);
	font-size: var(--t-xs);
}
.sections-review-list {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 8px;
	align-items: start;
}
.sections-review-card {
	border: 1px solid var(--border);
	background: var(--sections-review-card-surface);
	border-radius: 6px;
	padding: 12px;
	display: grid;
	gap: 9px;
	align-content: start;
}
.sections-review-card textarea,
.sections-review-card input,
.sections-review-card select {
	box-sizing: border-box;
	width: 100%;
	border: 1px solid var(--border);
	background: var(--panel-alt);
	color: var(--fg);
	border-radius: 4px;
	padding: 9px;
	line-height: 1.4;
}
.sections-review-card input[type="checkbox"] {
	width: auto;
	flex: 0 0 auto;
	padding: 0;
	margin: 0;
	accent-color: var(--marker);
}
.sections-review-card textarea {
	resize: none;
	overflow-y: hidden;
}
.sections-review-words {
	margin: 0;
	padding: 9px;
	border: 1px solid transparent;
	white-space: pre-wrap;
	overflow-wrap: anywhere;
	line-height: 1.4;
	color: var(--fg);
}
.sections-review-words[hidden],
.sections-review-card textarea[hidden] {
	display: none;
}
.sections-review-card textarea[data-review-editing] {
	border-color: var(--accent);
}
.sections-review-actions .sections-review-icon {
	align-self: center;
}
.sections-review-reason {
	margin: 0;
	color: var(--fg-soft);
	font-size: var(--t-sm);
	line-height: 1.45;
	cursor: pointer;
}
.sections-review-reason.sections-review-collapsed {
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.sections-review-empty {
	color: var(--muted);
	font-size: var(--t-sm);
	padding: 8px 0;
}
.sections-review-label {
	color: var(--marker);
	font-size: var(--t-xs);
	font-weight: 800;
	text-transform: uppercase;
}
.sections-review-settled {
	border-color: var(--accent);
}
.sections-review-card.sections-review-settled {
	border-color: var(--accent);
}
.sections-review-title {
	margin: 0;
	font-size: var(--t-sm);
}
.sections-review-actions {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
}
.sections-review-approve,
.sections-review-secondary {
	border-radius: 4px;
	padding: 7px 10px;
	font-size: var(--t-xs);
	font-weight: 800;
	cursor: pointer;
}
.sections-review-approve {
	border: 1px solid var(--marker);
	background: var(--marker);
	color: var(--sections-review-action-ink);
}
.sections-review-secondary {
	border: 1px solid var(--border);
	background: var(--sections-review-card-surface);
	color: var(--fg-soft);
}
.sections-review-feedback {
	color: var(--accent);
	font-size: var(--t-sm);
	line-height: 1.4;
}
.sections-review-collection .sections-review-feedback,
.sections-review-large .sections-review-feedback {
	font-size: var(--t-md);
}
.sections-review-collection textarea,
.sections-review-collection .sections-review-prose,
.sections-review-large textarea,
.sections-review-large .sections-review-prose,
.sections-review-large .sections-review-words {
	font-size: var(--t-md);
}
.sections-review-result:not(:empty) {
	padding: 14px;
}
.sections-review-actions:has(.sections-review-question) {
	align-items: center;
}
.sections-review-question {
	flex: 0 1 auto;
}
.sections-review-feedback.sections-review-working::before {
	content: "";
	display: inline-block;
	width: 12px;
	height: 12px;
	border: 2px solid currentColor;
	border-right-color: transparent;
	border-radius: 50%;
	margin-right: 8px;
	vertical-align: middle;
	animation: sections-review-working-spin 0.7s linear infinite;
}
@keyframes sections-review-working-spin {
	to {
		transform: rotate(360deg);
	}
}
.sections-review-collection button:disabled,
.sections-review-large button:disabled {
	opacity: 0.5;
	cursor: wait;
}
.sections-review-top {
	display: flex;
	justify-content: space-between;
	gap: 8px;
}
.sections-review-age,
.sections-review-metadata {
	color: var(--muted);
	font-size: var(--t-xs);
}
.sections-review-prose {
	margin: 0;
	color: var(--fg-soft);
	font-size: var(--t-base);
	line-height: 1.5;
	white-space: pre-wrap;
}
.sections-review-metadata {
	display: grid;
	gap: 3px;
	overflow-wrap: anywhere;
}
.sections-review-disclosure {
	border-top: var(--b-hair) solid var(--border);
	padding-top: var(--s-2);
}
.sections-review-summary {
	color: var(--accent);
	cursor: pointer;
	font-family: var(--font-sans);
	font-size: var(--t-sm);
}
.reject {
	justify-self: start;
	border: 1px solid var(--border);
	color: var(--accent);
	cursor: pointer;
	font-size: var(--t-sm);
}
.sections-review-group pre {
	margin: 0;
	white-space: pre-wrap;
	overflow-wrap: anywhere;
	background: var(--sections-review-card-surface);
	border: 1px solid var(--border);
	border-radius: 4px;
	padding: 12px;
	color: var(--fg-soft);
	font-size: var(--t-sm);
	line-height: 1.5;
}
.sections-review-facts {
	padding: 0 20px 16px;
}
.sections-review-selection-bar {
	display: grid;
	grid-template-columns: 2.25rem minmax(0, 1fr) minmax(12rem, 0.4fr) auto;
	gap: 0 20px;
	align-items: center;
	padding: 10px 14px 10px 0;
	z-index: 5;
	background: color-mix(in srgb, var(--panel) 88%, var(--accent));
}
.sections-review-selection-bar > .sections-review-approve {
	grid-column: 3;
	grid-row: 1;
	justify-self: start;
}
.sections-review-selection-bar > .sections-review-secondary {
	grid-column: 4;
	grid-row: 1;
	justify-self: start;
}
.sections-review-selection-bar > .sections-review-feedback {
	grid-column: 2;
	grid-row: 1;
}
.sections-review-selection-bar > .sections-review-feedback:not(:empty) {
	padding: 0;
}
.sections-review-selection-bar.sections-review-selected {
	position: sticky;
	bottom: 0;
	border-top: 1px solid var(--marker);
}
.sections-review-actions input {
	height: 16px;
	margin: 0;
	accent-color: var(--marker);
}
.sections-review-numbered {
	display: grid;
	grid-template-columns: 2.25rem minmax(0, 1fr) minmax(12rem, 0.4fr);
	gap: 0 20px;
	align-items: start;
	padding: 10px 14px 10px 0;
	border-left: 3px solid transparent;
	background: var(--sections-review-card-surface);
	border-radius: 0 4px 4px 0;
}
[data-review-state="waiting"] {
	border-left-color: var(--marker);
}
[data-review-state="agreed"],
[data-review-state="replaced"] {
	border-left-color: var(--sections-review-agreed-step);
}
[data-review-state="declined"],
[data-review-state="removed"] {
	border-left-color: var(--amber);
}
.sections-review-number {
	justify-self: end;
	margin-top: 1px;
	font-size: var(--t-sm);
	font-weight: 800;
	line-height: 22px;
	color: var(--fg-soft);
	font-variant-numeric: tabular-nums;
}
.sections-review-number:not(:empty) {
	min-width: 22px;
	padding: 0 4px;
	box-sizing: border-box;
	text-align: center;
	border: 1px solid var(--rule);
	overflow-wrap: anywhere;
	font-size: var(--t-md);
	line-height: 1.55;
	color: var(--fg);
}
.sections-review-formatted[hidden] {
	display: none;
}
.sections-review-changes {
	display: none;
	margin-top: 12px;
}
.sections-review-numbered:has(.sections-review-information[open]) .sections-review-changes {
	display: block;
}
.sections-review-heading {
	font-size: 1.05em;
}
.sections-review-formatted code {
	font-family: var(--font-mono);
	font-size: 0.88em;
	background: var(--panel-alt);
	border-radius: 3px;
	padding: 0 4px;
	-webkit-box-decoration-break: clone;
	box-decoration-break: clone;
}
[data-review-state="declined"] .sections-review-formatted,
[data-review-state="removed"] .sections-review-formatted,
[data-review-state="replaced"] .sections-review-formatted {
	color: var(--muted);
}
[data-review-state="replaced"] .sections-review-formatted {
	text-decoration: line-through;
}
.sections-review-formatted del.sections-review-out {
	color: var(--muted);
	text-decoration: line-through;
}
.sections-review-formatted ins.sections-review-in {
	text-decoration: underline;
	text-decoration-color: var(--sections-review-agreed-step);
	text-decoration-thickness: 2px;
	text-underline-offset: 3px;
	background: color-mix(in srgb, var(--sections-review-agreed-step) 16%, transparent);
}
.sections-review-numbered textarea {
	box-sizing: border-box;
	width: 100%;
	border: 1px solid var(--accent);
	background: var(--panel-alt);
	color: var(--fg);
	border-radius: 4px;
	padding: 9px;
	font-size: var(--t-md);
	line-height: 1.55;
	resize: none;
	overflow-y: hidden;
}
.sections-review-numbered textarea[hidden],
.sections-review-numbered button[hidden] {
	display: none;
}
.sections-review-reason-input {
	margin: 0;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
}
.sections-review-reason-input textarea {
	flex-basis: 100%;
	margin-top: 12px;
	min-height: 72px;
	border-color: var(--amber);
}
.sections-review-declined-reason {
	margin: 8px 0 0;
	padding-left: 10px;
	border-left: 2px solid var(--amber);
	color: var(--fg-soft);
	font-size: var(--t-md);
	line-height: 1.5;
	white-space: pre-wrap;
}
.sections-review-side {
	display: grid;
	gap: 6px;
	align-content: start;
}
.sections-review-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	align-items: center;
	min-height: 29px;
}
.sections-review-mark {
	font-size: var(--t-xs);
	font-weight: 800;
	letter-spacing: 0.04em;
}
[data-review-state="agreed"] .sections-review-mark {
	color: var(--sections-review-agreed-step);
}
[data-review-state="declined"] .sections-review-mark,
[data-review-state="removed"] .sections-review-mark {
	color: var(--amber);
}
.sections-review-icon[aria-pressed="true"] {
	border-color: var(--accent);
	background: var(--panel-alt);
	color: var(--fg);
}
.sections-review-icon {
	border: 1px solid var(--border);
	background: var(--sections-review-card-surface);
	color: var(--fg-soft);
	border-radius: 4px;
	padding: 4px 8px;
	font-size: var(--t-sm);
	line-height: 1.2;
	cursor: pointer;
}
.sections-review-information {
	border-top: 0;
	padding-top: 0;
}
.sections-review-information summary {
	list-style: none;
	color: var(--muted);
	font-size: var(--t-md);
	padding: 0 4px;
}
.sections-review-information summary::-webkit-details-marker {
	display: none;
}
.sections-review-information[open] {
	flex-basis: 100%;
}
.sections-review-information .sections-review-metadata {
	margin-top: 4px;
}
.sections-review-why {
	border-top: 0;
	padding-top: 0;
	margin: 0;
	color: var(--muted);
	font-size: var(--t-sm);
	line-height: 1.45;
}
.sections-review-why summary {
	color: var(--muted);
	font-size: var(--t-xs);
	font-weight: 700;
	letter-spacing: 0.04em;
}
.sections-review-why p {
	margin: 4px 0 0;
}
.sections-review-annotation,
.sections-review-warning {
	margin: 0;
	color: var(--fg-soft);
	font-size: var(--t-sm);
	line-height: 1.45;
	overflow-wrap: anywhere;
}
.sections-review-warning {
	margin-top: 8px;
	border-left: 2px solid var(--amber);
	padding-left: 10px;
}
.sections-review-annotation a {
	color: var(--accent);
}
.sections-review-side .sections-review-feedback:empty {
	display: none;
}
.sections-review-number:not(:empty) {
	border: 0;
	background: var(--marker);
	color: var(--sections-review-action-ink);
	font-family: var(--font-mono);
	font-size: var(--t-sm);
	min-width: 24px;
	line-height: 24px;
}
[data-review-state="agreed"] .sections-review-number:not(:empty),
[data-review-state="replaced"] .sections-review-number:not(:empty) {
	background: var(--sections-review-agreed-step);
}
[data-review-state="declined"] .sections-review-number:not(:empty),
[data-review-state="removed"] .sections-review-number:not(:empty) {
	background: transparent;
	color: var(--amber);
	box-shadow: inset 0 0 0 1px var(--amber);
}
.sections-review-why {
	color: var(--fg-soft);
	font-size: var(--t-md);
	line-height: 1.5;
}
.sections-review-why summary {
	color: var(--accent);
	font-size: var(--t-sm);
}
.sections-review-why p {
	color: var(--fg-soft);
}
@container (max-width: 52rem) {
	.sections-review-numbered,
	.sections-review-selection-bar {
		grid-template-columns: 2rem minmax(0, 1fr);
	}
	.sections-review-side {
		grid-column: 2;
		margin-top: 8px;
	}
	.sections-review-selection-bar > .sections-review-approve,
	.sections-review-selection-bar > .sections-review-secondary,
	.sections-review-selection-bar > .sections-review-feedback {
		grid-column: 2;
		grid-row: auto;
	}
}
.sections-review-open-error:not([hidden]) {
	position: fixed;
	top: var(--s-24);
	left: var(--s-4);
	z-index: 10;
	padding: var(--s-4);
	background: var(--bg);
	color: var(--fg);
	border: 1px solid var(--status-alert);
	border-radius: var(--r-sm);
}
.sections-review-open-error[data-relay-updating="true"] {
	top: var(--s-16);
	padding: var(--s-2);
	border: 0;
}
.sections-review-open-error[data-relay-updating="true"] h1 {
	margin: 0;
}
.sections-review-open-error a {
	color: var(--accent);
}
/* These roles are available to every Sections canvas. These two exact existing
   colours are settled by the piece-8 brief; the design-system copy is untouched. */
.sections-workspace {
	--sections-review-card-surface: #101013;
	--sections-review-action-ink: #111;
	--sections-review-agreed-step: #5fbf7a;
}
.sections-review-section-body {
	padding: 0;
	scrollbar-gutter: stable;
	overscroll-behavior: contain;
	overflow-anchor: none;
	container-type: inline-size;
}
.sections-review-section-body::-webkit-scrollbar {
	width: 12px;
	height: 12px;
}
.sections-review-section-body::-webkit-scrollbar-track {
	background: var(--panel);
}
.sections-review-section-body::-webkit-scrollbar-thumb {
	background: var(--muted);
	border: 3px solid var(--panel);
	border-radius: 6px;
}
.sections-review-group {
	padding: 14px !important;
}
.sections-review-group > .sections-held-owner-content {
	margin-bottom: 0;
}
.sections-review-group .sections-held-objects {
	gap: 8px;
}
.sections-review-group .sections-held-objects > [data-sections-held-object]:has(> .sections-workspace-object-body > .sections-review-disclosure) {
	margin-top: 2px;
}
.sections-review-section-body > .sections-held-objects > [data-sections-held-object] + [data-sections-held-object] {
	border-top: 1px solid var(--border);
}
.sections-review-subhead {
	margin: 0;
	color: var(--fg-soft);
	font-size: var(--t-xs);
	letter-spacing: 0.05em;
}
.sections-review-list {
	display: grid;
	gap: 8px;
	align-items: start;
}
.sections-review-group :is(p, h3, h4, button, select),
.sections-review-numbered {
	overflow-wrap: anywhere;
	min-width: 0;
}
.sections-review-group :is(button, input, textarea),
.sections-review-numbered :is(button, input, textarea) {
	font-family: var(--font-sans);
}
.sections-review-numbered .sections-review-actions {
	min-height: 29px;
	align-items: center;
}
.sections-review-numbered .sections-review-number {
	justify-self: end;
	margin-top: 1px;
	font-weight: 800;
	font-variant-numeric: tabular-nums;
}
.sections-review-numbered .sections-review-number:not(:empty) {
	padding: 0 4px;
	box-sizing: border-box;
	text-align: center;
	border-radius: var(--r-pill);
}
.sections-review-formatted {
	white-space: pre-wrap;
	overflow-wrap: anywhere;
	font-size: var(--t-md);
	line-height: 1.55;
	color: var(--fg);
}
.sections-review-collection > .sections-held-objects {
	padding: 14px;
	gap: 28px;
}
.sections-review-collection > .sections-held-objects > [data-sections-held-object] {
	border: 0 !important;
}
.sections-review-nested-body {
	padding: 3px 0 0 !important;
}
.sections-review-nested-body > .sections-held-objects {
	gap: 0;
}
[data-sections-heading-variant="group"] > .sections-owner-heading {
	padding: 0;
	margin: 0 0 8px;
	gap: 10px;
	align-items: center;
	justify-content: start;
	border: 0;
}
[data-sections-heading-variant="group"] > .sections-owner-heading .sections-owner-heading-title {
	text-transform: uppercase;
}
[data-sections-heading-variant="group"] > .sections-owner-heading .sections-owner-heading-title::before {
	content: "▾";
	margin-right: 6px;
	display: inline-block;
}
[data-sections-heading-variant="group"][data-sections-folded="true"]
	> .sections-owner-heading
	.sections-owner-heading-title::before {
	content: "▸";
}
[data-sections-heading-variant="group"] .sections-owner-heading-count {
	color: var(--marker);
	font-size: var(--t-sm);
	font-weight: 800;
	min-width: 22px;
	padding: 0 6px;
	box-sizing: border-box;
	border: 1px solid var(--marker);
	border-radius: var(--r-pill);
	text-align: center;
	font-variant-numeric: tabular-nums;
}
.sections-owner-heading input.sections-review-tick,
.sections-review-actions input.sections-review-tick {
	width: 16px;
	height: 16px;
	margin: 0;
	accent-color: var(--marker);
}
.sections-review-selection-holder {
	padding: 0 !important;
}
[data-sections-held-object]:has(> .sections-review-selection-holder):has(.sections-review-selected) {
	position: sticky !important;
	bottom: 0;
	z-index: 5;
}
.sections-review-selection-bar > .sections-review-feedback {
	grid-column: 2;
	grid-row: 1;
}
.sections-review-selection-bar > .sections-review-feedback:not(:empty) {
	padding: 0;
}
.sections-review-changes {
	display: none;
	margin-top: 12px;
}
.sections-review-numbered:has(.sections-review-information[open]) .sections-review-changes {
	display: block;
}
.sections-review-reason.sections-review-collapsed {
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.sections-review-group [hidden],
.sections-review-numbered [hidden] {
	display: none !important;
}
.sections-review-section-body [data-sections-wrap="off"] {
	white-space: pre;
	overflow-wrap: normal;
	word-break: normal;
	overflow-x: auto;
}
@container (max-width: 52rem) {
	.sections-review-selection-bar
		> :is(.sections-review-approve, .sections-review-secondary, .sections-review-feedback) {
		grid-column: 2;
		grid-row: auto;
	}
}
@media (max-width: 820px) {
	.sections-review-facts {
		padding-left: 12px;
		padding-right: 12px;
	}
}
/* A reached review item keeps its indication when its inner words update. */
[data-sections-reached] > .sections-workspace-object-body > .sections-review-numbered {
 outline: var(--focus-ring-width) solid var(--accent);
 outline-offset: calc(-1 * var(--focus-ring-width));
}

:where(.sections-review-section-body) :where(button,input,textarea) { font: inherit; }

.sections-review-collection > .sections-held-objects > [data-sections-held-object] + [data-sections-held-object]:has(> .sections-review-selection-holder) { margin-top: -18px; }
.sections-review-collection > .sections-held-objects > [data-sections-held-object]:first-child:has(> .sections-review-selection-holder) { margin-top: 10px; }

/* Shared reading faces for Sections feed, reference and question objects.
   Content owners declare these classes; all spacing, type, colours and states
   belong here. rp-* hooks in Rapport retain interaction identity only. */
.sections-reading-surface {
	background: var(--bg);
	color: var(--fg);
}

.sections-reading-ai-card-dialog {
	background: var(--bg);
	color: var(--fg);
	border: 1px solid var(--border);
	border-radius: var(--r-md);
	padding: var(--s-6);
	width: min(36rem, 90vw);
}
.sections-reading-ai-card-dialog select { width: 100%; margin-block: var(--s-3); }

.sections-reading-object-body {
	transition: opacity var(--dur-panel) var(--ease);
}

.sections-reading-object-body[data-busy="true"] {
	opacity: 0.5;
}

/* ---- the state line object ----------------------------------------------- */

.sections-reading-state-foot {
	display: flex;
	align-items: baseline;
	gap: var(--s-3);
	margin-top: var(--s-3);
}

.sections-reading-state-foot p {
	margin: 0;
}

/* ---- the thread list object ---------------------------------------------- */

.sections-reading-scopes {
	display: flex;
	gap: var(--s-1);
	padding-bottom: var(--s-2);
	border-bottom: var(--b-hair) solid var(--rule);
	margin-bottom: var(--s-2);
}

.sections-reading-scope {
	display: flex;
	align-items: baseline;
	gap: var(--s-2);
	font-family: var(--font-sans);
	background: none;
	border: 0;
	border-radius: var(--r-md);
	padding: var(--s-1) var(--s-3);
	color: var(--fg-soft);
	cursor: pointer;
	transition: background var(--dur-hover) var(--ease);
}

.sections-reading-scope:hover {
	background: var(--panel);
	color: var(--fg);
}

.sections-reading-scope[aria-current] {
	background: var(--panel-alt);
	color: var(--fg);
}

.sections-reading-scope-count {
	font-family: var(--font-mono);
	color: var(--muted);
}

/* The date group headings speak in the display voice, small. */
.sections-reading-group {
	position: sticky;
	top: 0;
	z-index: 1;
	margin: 0;
	padding: var(--s-3) var(--s-2) var(--s-2);
	background: var(--bg);
	font-family: var(--font-display);
	font-size: var(--t-md);
	font-weight: 400;
	line-height: var(--lh-display);
	color: var(--fg-soft);
}

.sections-reading-threads {
	list-style: none;
	margin: 0;
	padding: 0;
}

.sections-reading-thread {
	border-bottom: var(--b-hair) solid var(--rule);
}

.sections-reading-thread:last-child {
	border-bottom: 0;
}

.sections-reading-thread-open {
	display: grid;
	gap: var(--s-1);
	width: 100%;
	text-align: left;
	font-family: var(--font-sans);
	background: none;
	border: 0;
	border-radius: var(--r-md);
	padding: var(--s-3);
	color: var(--fg);
	cursor: pointer;
	transition: background var(--dur-hover) var(--ease);
}

.sections-reading-thread-open:hover {
	background: var(--panel);
}

.sections-reading-thread[aria-current="true"] .sections-reading-thread-open {
	background: var(--panel-alt);
}

.sections-reading-thread-top {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: var(--s-3);
	min-width: 0;
}

.sections-reading-thread-who {
	font-weight: 600;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.sections-reading-thread-date {
	white-space: nowrap;
}

.sections-reading-thread-subject,
.sections-reading-thread-snippet {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.sections-reading-thread-tags {
	display: flex;
	flex-wrap: wrap;
	gap: var(--s-1);
	margin-top: var(--s-1);
}

.sections-reading-tag {
	border: var(--b-hair) solid var(--border);
	border-radius: var(--r-pill);
	padding: 0 var(--s-2);
	color: var(--muted);
}

.sections-reading-tag-clip {
	color: var(--fg-soft);
}

.sections-reading-empty {
	margin: var(--s-6) 0;
}

/* ---- the conversation object --------------------------------------------- */

.sections-reading-conv-head {
	padding: var(--s-1) 0 var(--s-3);
	border-bottom: var(--b-hair) solid var(--rule);
	margin-bottom: var(--s-4);
}

.sections-reading-conv-head h1 {
	margin: 0 0 var(--s-1);
	overflow-wrap: anywhere;
}

.sections-reading-conv-head p {
	margin: 0;
	overflow-wrap: anywhere;
}

/* Newest first, so the message at the top is the one that needs an answer. */
.sections-reading-msg {
	background: var(--panel);
	border: var(--b-hair) solid var(--border);
	border-radius: var(--r-lg);
	padding: var(--s-5);
	margin: 0 0 var(--s-4);
}

.sections-reading-msg[data-mine="true"] {
	background: var(--panel-alt);
}

.sections-reading-msg-head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: var(--s-3);
	margin-bottom: var(--s-3);
}

.sections-reading-msg-from {
	font-weight: 600;
	overflow-wrap: anywhere;
}

.sections-reading-msg-when {
	white-space: nowrap;
}

.sections-reading-msg-body {
	white-space: pre-wrap;
	overflow-wrap: anywhere;
}

/* The quoted history is behind a closed control, always. What a person actually
   wrote this time is the message; the rest is the paper trail underneath it. */
.sections-reading-quoted {
	margin-top: var(--s-4);
	padding-top: var(--s-3);
	border-top: var(--b-hair) solid var(--rule);
}

.sections-reading-quoted summary {
	cursor: pointer;
	color: var(--link);
	list-style: none;
}

.sections-reading-quoted summary::-webkit-details-marker {
	display: none;
}

.sections-reading-quoted summary::before {
	content: "+ ";
}

.sections-reading-quoted[open] summary::before {
	content: "- ";
}

.sections-reading-quoted-body {
	white-space: pre-wrap;
	overflow-wrap: anywhere;
	margin-top: var(--s-3);
}

/* ---- the writing surface object ------------------------------------------ */

.sections-reading-reply-label {
	margin: 0;
	color: var(--muted);
}

/* ---- the single-column views -------------------------------------------- */

.sections-reading-shell {
	max-width: 46rem;
	margin: 0 auto;
	padding: var(--s-24) var(--s-6) var(--s-24);
}

.sections-reading-kicker {
	color: var(--muted);
	margin: 0 0 var(--s-3);
}

.sections-reading-head {
	margin: 0 0 var(--s-16);
}

.sections-reading-head h1 {
	margin: 0 0 var(--s-4);
}

/* The state line: the whole truth in numbers, in one breath, in the display
   voice. Each count is its own phrase so the eye can take them one at a time. */
.sections-reading-state {
	margin: 0;
	font-family: var(--font-display);
	font-size: var(--t-lg);
	font-weight: 400;
	line-height: var(--lh-display);
	color: var(--fg);
}

.sections-reading-state-bit {
	display: inline;
	margin-right: var(--s-2);
}

.sections-reading-next h1 {
	margin: var(--s-3) 0 var(--s-4);
}

/* Inside an object the next one thing keeps its display voice at object scale. */
.sections-reading-object-body .sections-reading-next h1,
.sections-reading-object-body > .t-h1,
.sections-reading-object-body h1.t-h1 {
	font-size: var(--t-xl);
}

.sections-reading-next p {
	margin: 0 0 var(--s-3);
}

.sections-reading-who {
	color: var(--fg-soft);
}

.sections-reading-muted {
	color: var(--muted);
}

.sections-reading-alert {
	color: var(--status-alert);
	font-weight: 700;
}

/* What they actually said, quoted rather than paraphrased. */
.sections-reading-said {
	margin: var(--s-6) 0;
	padding: 0 0 0 var(--s-5);
	border-left: var(--b-rule) solid var(--rule);
	color: var(--fg-soft);
}

/* The whole spear, before Mike sends it. He reads what is going out. */
.sections-reading-letter {
	white-space: pre-wrap;
	overflow-wrap: anywhere;
	background: var(--panel);
	border: var(--b-hair) solid var(--border);
	border-radius: var(--r-lg);
	padding: var(--s-6);
	margin: var(--s-6) 0;
}

.sections-reading-send {
	margin: var(--s-8) 0 var(--s-3);
}

/* The answer, written right here (stage 3). The compose box is the same quiet
   card as the letter above it: Mike's words, the signature box, one button. */
.sections-reading-answer {
	margin: var(--s-8) 0 var(--s-3);
}

.sections-reading-object-body .sections-reading-answer {
	margin-top: var(--s-3);
}

.sections-reading-compose {
	width: 100%;
	box-sizing: border-box;
	min-height: 11rem;
	font-family: var(--font-sans);
	font-size: var(--t-md);
	line-height: var(--lh-normal);
	color: var(--fg);
	background: var(--panel);
	border: var(--b-hair) solid var(--border);
	border-radius: var(--r-lg);
	padding: var(--s-5);
	margin: 0 0 var(--s-4);
	resize: vertical;
}

.sections-reading-object-body .sections-reading-compose {
	min-height: 7rem;
}

.sections-reading-link-lead {
	margin: 0 0 var(--s-2);
}

/* The signature box (Mike's decision, 22 August 2026): what is in it is what
   sends, and empty means no signature. Smaller than the compose box above it,
   because a signature is a few lines, not a letter. */
.sections-reading-signature {
	min-height: 4.5rem;
	font-size: var(--t-base);
}

.sections-reading-object-body .sections-reading-signature {
	min-height: 4.5rem;
}

/* The quick-picks under the signature box: one press puts that links.txt line
   in the box, and Mike edits the wording from there. */
.sections-reading-picks {
	display: flex;
	flex-wrap: wrap;
	gap: var(--s-2);
	margin: 0 0 var(--s-4);
}

.sections-reading-pick-line {
	font-family: var(--font-sans);
	line-height: var(--lh-tight);
	color: var(--fg-soft);
	background: var(--panel);
	border: var(--b-hair) solid var(--border);
	border-radius: var(--r-pill);
	padding: var(--s-1) var(--s-4);
	cursor: pointer;
	transition: border-color var(--dur-hover) var(--ease);
}

.sections-reading-pick-line:hover {
	color: var(--fg);
	border-color: var(--accent);
}

/* Answer actions and file names belong to the shared reading form. */
.sections-reading-answer-actions,
.sections-reading-answer-files li {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--s-3);
}

.sections-reading-answer-files {
	list-style: none;
	padding: 0;
	margin: 0;
}

.sections-reading-answer-files li {
	margin-block: var(--s-2);
	overflow-wrap: anywhere;
}

[data-rp-attach-hidden] [data-rp-attach] {
	display: none;
}

.sections-reading-answer-actions {
	margin-top: var(--s-4);
}

.sections-reading-button {
	font-family: var(--font-sans);
	font-size: var(--t-md);
	font-weight: 600;
	line-height: var(--lh-tight);
	background: var(--accent);
	color: var(--accent-ink);
	border: 0;
	border-radius: var(--r-pill);
	padding: var(--s-4) var(--s-10);
	cursor: pointer;
	transition: filter var(--dur-hover) var(--ease);
}

.sections-reading-button:hover {
	background: var(--accent-hover);
}

.sections-reading-button:active {
	transform: translateY(var(--press-y));
}

.sections-reading-button[disabled] {
	opacity: 0.6;
	cursor: default;
}

/* The full list is behind one press, and the press itself stays quiet: a list
   feeds both the fear and the hyperfocus, so it never greets him. */
.sections-reading-foot {
	margin-top: var(--s-20);
	padding-top: var(--s-6);
	border-top: var(--b-hair) solid var(--rule);
}

.sections-reading-quiet-button {
	font-family: var(--font-sans);
	background: none;
	border: 0;
	padding: 0;
	color: var(--link);
	cursor: pointer;
	border-bottom: var(--b-hair) solid transparent;
}

.sections-reading-quiet-button:hover {
	border-bottom-color: var(--link);
}

.sections-reading-everything {
	margin: 0 0 var(--s-6);
}

/* The whole board's section headings join the display voice too. */
.sections-reading-everything h2 {
	margin: var(--s-8) 0 var(--s-3);
	font-family: var(--font-display);
	font-size: var(--t-lg);
	font-weight: 400;
	line-height: var(--lh-display);
}

.sections-reading-everything > h2:first-child {
	margin-top: 0;
}

.sections-reading-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.sections-reading-list li {
	display: grid;
	gap: var(--s-1);
	padding: var(--s-3) 0;
	border-bottom: var(--b-hair) solid var(--rule);
}

.sections-reading-list li:last-child {
	border-bottom: 0;
}

.sections-reading-row-who {
	font-weight: 600;
	overflow-wrap: anywhere;
}

.sections-reading-row-detail,
.sections-reading-row-flag {
	overflow-wrap: anywhere;
}

.sections-reading-foot > p:last-child {
	margin: var(--s-6) 0 0;
}

@media (max-width: 40rem) {
	.sections-reading-surface > .sections-reading-shell {
		padding: var(--s-16) var(--s-5) var(--s-16);
	}
}

.sections-reading-object-content { container-type: inline-size; box-sizing: border-box; padding: var(--s-3) var(--s-4) var(--s-4); min-height: 0; }

.sections-reading-line-content {
	box-sizing: border-box;
	padding: var(--s-3) var(--s-4) var(--s-4);
}

/* The owned face responds to its object width, including after adoption on a phone. */
@container (max-width: 40rem) {
	.sections-reading-object-content .sections-reading-shell {
		padding: var(--s-16) var(--s-5) var(--s-16);
	}

	.sections-reading-object-body .sections-reading-conv-head h1 {
		font-size: var(--t-lg);
	}
}

/* Shared work-context faces for Sections feed and reference objects.
   The read capability and model stay with the content owner. */
.sections-work-object {
	background: transparent;
	color: var(--fg);
	font-family: var(--font-sans);
}
.sections-work-loading {
	width: min(1640px, 100%);
	margin: 0 auto;
}
.sections-work-loading {
	box-sizing: border-box;
	padding: var(--s-3);
}
.sections-work-work-section {
	display: grid;
	gap: var(--s-3);
	padding: var(--s-4);
	border: var(--b-hair) solid var(--border);
	border-radius: var(--r-sm);
	background: var(--panel);
	box-shadow: var(--shadow-sm);
}
.sections-work-work-section-head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: var(--s-3);
	padding-bottom: var(--s-2);
	border-bottom: var(--b-hair) solid var(--border);
}
.sections-work-work-section h2,
.sections-work-work-section h3,
.sections-work-work-section p {
	margin: 0;
}
.sections-work-work-section h2 {
	font: var(--t-lg) / var(--lh-tight) var(--font-display);
}
.sections-work-work-section h3 {
	font: var(--t-sm) / var(--lh-tight) var(--font-display);
}
.sections-work-work-signal,
.sections-work-needs-mike-explicit,
.sections-work-needs-mike-possible,
.sections-work-unresolved-capture,
.sections-work-current-work-item,
.sections-work-selected-work,
.sections-work-chat-family,
.sections-work-ungrouped {
	display: grid;
	gap: var(--s-2);
	padding: var(--s-3);
	border: var(--b-hair) solid var(--border);
	border-radius: var(--r-sm);
	background: color-mix(in srgb, var(--panel-alt) 72%, transparent);
}
.sections-work-work-signal-red {
	border-left: var(--b-stroke) solid var(--status-alert);
}
.sections-work-needs-mike-explicit {
	border: var(--b-stroke) solid var(--marker);
	background: color-mix(in srgb, var(--marker) 12%, var(--panel));
}
.sections-work-needs-mike-possible {
	border-color: color-mix(in srgb, var(--muted) 55%, var(--border));
	color: var(--fg-soft);
}
.sections-work-needs-mike-possible .t-microlabel,
.sections-work-needs-mike-possible .t-mono,
.sections-work-possible-evidence {
	color: var(--muted);
}
.sections-work-unresolved-list {
	display: grid;
	gap: var(--s-2);
	padding-top: var(--s-2);
	border-top: var(--b-hair) solid var(--border);
}
.sections-work-unresolved-capture {
	border-left: var(--b-stroke) solid var(--status-warn);
}
.sections-work-signal-relations,
.sections-work-work-relations,
.sections-work-ref-list,
.sections-work-current-work-item header {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--s-2);
}
.sections-work-work-relations {
	align-items: stretch;
}
.sections-work-work-relations > div {
	flex: 1 1 260px;
	display: grid;
	gap: var(--s-1);
}
.sections-work-continuity-ref,
.sections-work-work-select,
.sections-work-chat-select,
.sections-work-lane-ref {
	display: inline-flex;
	align-items: center;
	min-height: 26px;
	padding: var(--s-1) var(--s-2);
	border: var(--b-hair) solid var(--border);
	border-radius: var(--r-sm);
	background: var(--panel);
	color: var(--fg-soft);
	font: var(--t-xs) / var(--lh-normal) var(--font-mono);
	overflow-wrap: anywhere;
}
button.sections-work-work-select,
button.sections-work-chat-select {
	cursor: pointer;
}
button.sections-work-work-select:hover,
button.sections-work-chat-select:hover {
	border-color: var(--marker);
	color: var(--marker);
}
.sections-work-current-work-path {
	color: var(--muted);
	font-size: var(--t-xs);
	overflow-wrap: anywhere;
}
.sections-work-chat-family {
	gap: var(--s-2);
}
.sections-work-chat-parent {
	display: flex;
}
.sections-work-chat-workers {
	display: grid;
	gap: var(--s-1);
	margin-left: var(--s-6);
	padding-left: var(--s-3);
	border-left: var(--b-stroke) solid var(--border);
}
.sections-work-handoffs {
	display: grid;
	gap: var(--s-2);
}
.sections-work-handoffs ul{
	display: grid;
	gap: var(--s-1);
	margin: 0;
	padding: 0;
	list-style: none;
}
.sections-work-handoffs li{
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--s-2);
}
.sections-work-none {
	color: var(--muted);
	font-size: var(--t-sm);
}
.sections-work-kind.area {
	color: var(--clay);
}
.sections-work-kind.arc {
	color: var(--marker);
}
.sections-work-kind.aim {
	color: var(--cyan);
}
.sections-work-kind.file {
	color: var(--muted);
}

/* bean-counter: content scoped to its page, with unchanged selector priority. */
:where(.bean-counter-page) #build-stamp { display: none; }
:where(.bean-counter-page) #bean-counter {
	-webkit-overflow-scrolling: touch;
	background: var(--bg);
	color: var(--fg);
}

:where(.bean-counter-page) #kit-chrome .topbar {
	pointer-events: auto;
}

:where(.bean-counter-page) .bean-object-content {
	padding: var(--s-3) var(--s-4) var(--s-4);
	display: flex;
	flex-direction: column;
	gap: var(--s-3);
}

:where(.bean-counter-page) .bean-title {
	margin: 0;
	overflow-wrap: anywhere;
}

:where(.bean-counter-page) .bean-note {
	margin: 0;
	color: var(--muted);
}

:where(.bean-counter-page) .bean-section-title {
	margin: 0;
	color: var(--muted);
}

:where(.bean-counter-page) .bean-say {
	margin: 0;
	color: var(--fg-soft);
}

:where(.bean-counter-page) .bean-rows {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
}

:where(.bean-counter-page) .bean-row {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: var(--s-4);
	padding: var(--s-3) 0;
	border-bottom: var(--b-hair) solid var(--rule);
}

:where(.bean-counter-page) .bean-row:last-child {
	border-bottom: none;
}

:where(.bean-counter-page) .bean-row-name {
	margin: 0;
	min-width: 0;
	overflow-wrap: anywhere;
}

:where(.bean-counter-page) .bean-row-value {
	margin: 0;
	flex: none;
	font-weight: 700;
	white-space: nowrap;
}

:where(.bean-counter-page) .bean-figure {
	margin: 0;
	font-family: var(--font-display);
	font-size: var(--t-2xl);
	line-height: var(--lh-tight);
	overflow-wrap: anywhere;
}

:where(.bean-counter-page) .bean-picks {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
}

:where(.bean-counter-page) .bean-pick {
	border-bottom: var(--b-hair) solid var(--rule);
}

:where(.bean-counter-page) .bean-pick:last-child {
	border-bottom: none;
}

:where(.bean-counter-page) .bean-pick-label {
	display: flex;
	align-items: center;
	gap: var(--s-3);

	min-height: 44px;
	padding: var(--s-2) 0;
	cursor: pointer;
}

:where(.bean-counter-page) .bean-pick-box {
	flex: none;
	width: 20px;
	height: 20px;
	accent-color: var(--accent);
}

:where(.bean-counter-page) .bean-pick-code {
	color: var(--muted);
}

:where(.bean-counter-page) .bean-action {
	align-self: flex-start;
	appearance: none;
	min-height: 44px;
	padding: var(--s-3) var(--s-5);
	border: var(--b-hair) solid var(--accent);
	border-radius: var(--r-md);
	background: var(--accent);
	color: var(--accent-ink);
	cursor: pointer;
	transition: background var(--dur-hover) var(--ease);
}

:where(.bean-counter-page) .bean-action:hover {
	background: var(--accent-hover);
}

:where(.bean-counter-page) .bean-action:active {
	transform: translateY(var(--press-y));
}


/* membership: content scoped to its page, with unchanged selector priority. */
:where(.membership-page) .membership-status {
	min-height: var(--s-6);
	margin: 0;
	font-family: var(--font-mono);
	font-size: var(--t-xs);
	color: var(--fg-soft);
}

:where(.membership-page) .membership-status.ok {
	color: var(--status-ok);
}

:where(.membership-page) .membership-status.error {
	color: var(--status-alert);
}

:where(.membership-page) .membership-reload-error {
	margin: var(--s-2) 0 0;
	font-family: var(--font-mono);
	font-size: var(--t-xs);
	color: var(--status-alert);
}

:where(.membership-page) .membership-member-entry,
:where(.membership-page) .membership-came-in,
:where(.membership-page) .membership-reports {
	display: grid;
	gap: var(--s-4);
}

:where(.membership-page) .membership-member-name,
:where(.membership-page) .membership-member-status,
:where(.membership-page) .membership-member-beside,
:where(.membership-page) .membership-empty,
:where(.membership-page) .membership-save-failure-meta,
:where(.membership-page) .membership-save-failure-reason,
:where(.membership-page) .membership-save-failure-code,
:where(.membership-page) .membership-setup-stop-meta,
:where(.membership-page) .membership-setup-stop-step,
:where(.membership-page) .membership-setup-stop-reason,
:where(.membership-page) .membership-setup-stop-phone,
:where(.membership-page) .membership-send-meta,
:where(.membership-page) .membership-send-question,
:where(.membership-page) .membership-send-answer,
:where(.membership-page) .membership-send-notes,
:where(.membership-page) .membership-send-limit,
:where(.membership-page) .membership-came-in-preview,
:where(.membership-page) .membership-send-earlier,
:where(.membership-page) .membership-reports-heading,
:where(.membership-page) .membership-report-identity,
:where(.membership-page) .membership-report-state {
	margin: 0;
}

:where(.membership-page) .membership-member-notes,
:where(.membership-page) .membership-member-sends,
:where(.membership-page) .membership-member-setup-stops,
:where(.membership-page) .membership-member-save-failures,
:where(.membership-page) .membership-save-failure,
:where(.membership-page) .membership-setup-stop,
:where(.membership-page) .membership-send {
	display: grid;
	gap: var(--s-2);
}

:where(.membership-page) .membership-member-sends-refresh,
:where(.membership-page) .membership-member-setup-stops-refresh,
:where(.membership-page) .membership-member-save-failures-refresh {
	justify-self: start;
}

:where(.membership-page) .membership-notes-field {
	display: block;
	box-sizing: border-box;
	width: 100%;
	overflow: hidden;
	resize: none;
	field-sizing: content;
	padding: var(--s-3);
	border: 1px solid var(--border);
	border-radius: var(--r-sm);
	background: var(--bg);
	color: var(--fg);
}

:where(.membership-page) .membership-send {
	padding: var(--s-4);
	border-left: var(--s-1) solid var(--marker);
	background: var(--panel-alt);
}

:where(.membership-page) .membership-setup-stop,
:where(.membership-page) .membership-save-failure {
	padding: var(--s-4);
	border-left: var(--s-1) solid var(--status-alert);
	background: var(--panel-alt);
}

:where(.membership-page) .membership-setup-stop-reason,
:where(.membership-page) .membership-save-failure-reason {
	min-width: 0;
	overflow-wrap: anywhere;
	white-space: pre-wrap;
}

:where(.membership-page) .membership-save-failure-meta,
:where(.membership-page) .membership-setup-stop-meta,
:where(.membership-page) .membership-setup-stop-step {
	overflow-wrap: anywhere;
}

:where(.membership-page) .membership-save-failure-meta,
:where(.membership-page) .membership-setup-stop-meta,
:where(.membership-page) .membership-setup-stop-phone {
	color: var(--fg-soft);
}

:where(.membership-page) .membership-setup-stop-code {
	margin: 0;
	color: var(--status-alert);
}

:where(.membership-page) .membership-send-answer,
:where(.membership-page) .membership-came-in-preview,
:where(.membership-page) .membership-came-in-email {
	min-width: 0;
	overflow-wrap: anywhere;
	white-space: pre-wrap;
}

:where(.membership-page) .membership-member-entry > *,
:where(.membership-page) .membership-came-in-item > * {
	min-width: 0;
}

:where(.membership-page) .membership-member-name,
:where(.membership-page) .membership-member-status,
:where(.membership-page) .membership-member-beside,
:where(.membership-page) .membership-send-meta,
:where(.membership-page) .membership-send-question,
:where(.membership-page) .membership-send-limit {
	overflow-wrap: anywhere;
}

:where(.membership-page) .membership-send-earlier,
:where(.membership-page) .membership-send-limit,
:where(.membership-page) .membership-send-meta {
	color: var(--fg-soft);
}

:where(.membership-page) .membership-came-in-item {
	display: grid;
	gap: var(--s-1);
	box-sizing: border-box;
	width: 100%;
	padding: var(--s-4);
	border: 1px solid var(--border);
	border-radius: var(--r-sm);
	background: var(--bg);
	color: var(--fg);
	text-align: left;
}

:where(.membership-page) button.membership-came-in-item {
	cursor: pointer;
}

:where(.membership-page) .membership-reports {
	border-top: 1px solid var(--border);
	padding-top: var(--s-6);
}

:where(.membership-page) .membership-report-url,
:where(.membership-page) .membership-report-identity {
	min-width: 0;
	overflow-wrap: anywhere;
}

:where(.membership-page) .membership-member-moves,
:where(.membership-page) .membership-move-finish {
	display: grid;
	gap: var(--s-2);
}

:where(.membership-page) .membership-member-moves-refresh {
	justify-self: start;
}

:where(.membership-page) .membership-move-finish {
	padding: var(--s-4);
	border-left: var(--s-1) solid var(--marker);
	background: var(--panel-alt);
}

:where(.membership-page) .membership-move-outcome,
:where(.membership-page) .membership-move-meta,
:where(.membership-page) .membership-move-unresolved,
:where(.membership-page) .membership-move-phone {
	margin: 0;
	overflow-wrap: anywhere;
}

:where(.membership-page) .membership-move-meta,
:where(.membership-page) .membership-move-phone {
	color: var(--fg-soft);
}

:where(.membership-page) .membership-member-entry,
:where(.membership-page) .membership-timesaver-installs,
:where(.membership-page) .membership-member-entry-object > .membership-empty,
:where(.membership-page) .membership-came-in-object > *,
:where(.membership-page) .membership-table-object > .placed-object-words {
	box-sizing: border-box;
	padding: var(--s-3) var(--s-4) var(--s-4);
}

:where(.membership-page) .membership-timesaver-installs,
:where(.membership-page) .membership-timesaver-install {
	display: grid;
	gap: var(--s-3);
}

:where(.membership-page) .membership-timesaver-installs h2 { margin: 0; }

:where(.membership-page) .membership-timesaver-install { border-top: 1px solid var(--border); padding-top: var(--s-3); }

:where(.membership-page) .membership-timesaver-install summary { cursor: pointer; }

:where(.membership-page) .membership-timesaver-install > article { margin-top: var(--s-3); }


/* mmyl-money-machine: content scoped to its page, with unchanged selector priority. */
:where(.mmyl-money-machine-page, .mikes-money-machine-page, .mmyl-monthly-statement-page) #mmyl-money-machine,
:where(.mmyl-money-machine-page, .mikes-money-machine-page, .mmyl-monthly-statement-page) #mikes-money-machine {
 background: var(--bg); color: var(--fg);
}

:where(.mmyl-money-machine-page, .mikes-money-machine-page, .mmyl-monthly-statement-page) .mmyl-content { container: money-content / inline-size; }

:where(.mmyl-money-machine-page, .mikes-money-machine-page, .mmyl-monthly-statement-page) .mmyl-content > .mmyl-layout { padding: 0 var(--s-4) var(--s-16); }

:where(.mmyl-money-machine-page, .mikes-money-machine-page, .mmyl-monthly-statement-page) .mmyl-layout { max-width: 680px; margin: 0 auto; display: grid; gap: var(--s-10); font-family: var(--font-sans); font-size: var(--t-base); line-height: var(--lh-normal); }

:where(.mmyl-money-machine-page, .mikes-money-machine-page, .mmyl-monthly-statement-page) .mmyl-now,
:where(.mmyl-money-machine-page, .mikes-money-machine-page, .mmyl-monthly-statement-page) .mmyl-statement { display: grid; gap: var(--s-10); align-content: start; min-width: 0; }

:where(.mmyl-money-machine-page, .mikes-money-machine-page, .mmyl-monthly-statement-page) .mmyl-layout *,
:where(.mmyl-money-machine-page, .mikes-money-machine-page, .mmyl-monthly-statement-page) .mmyl-layout *::before,
:where(.mmyl-money-machine-page, .mikes-money-machine-page, .mmyl-monthly-statement-page) .mmyl-layout *::after { box-sizing: border-box; }

:where(.mmyl-money-machine-page, .mikes-money-machine-page, .mmyl-monthly-statement-page) .mmyl-layout h2,
:where(.mmyl-money-machine-page, .mikes-money-machine-page, .mmyl-monthly-statement-page) .mmyl-layout p,
:where(.mmyl-money-machine-page, .mikes-money-machine-page, .mmyl-monthly-statement-page) .mmyl-layout dl,
:where(.mmyl-money-machine-page, .mikes-money-machine-page, .mmyl-monthly-statement-page) .mmyl-layout dd { margin: 0; }

:where(.mmyl-money-machine-page, .mikes-money-machine-page, .mmyl-monthly-statement-page) .mmyl-layout .mmyl-section-title { font-family: var(--font-display); font-size: var(--t-xl); font-weight: 400; line-height: var(--lh-display); margin-bottom: var(--s-2); }

:where(.mmyl-money-machine-page, .mikes-money-machine-page, .mmyl-monthly-statement-page) .mmyl-move { border: var(--b-stroke) solid var(--fg); border-radius: var(--r-lg); padding: var(--s-5) var(--s-6) var(--s-6); }

:where(.mmyl-money-machine-page, .mikes-money-machine-page, .mmyl-monthly-statement-page) .mmyl-move-title { font-family: var(--font-sans); font-weight: 600; font-size: var(--t-md); line-height: var(--lh-normal); }

:where(.mmyl-money-machine-page, .mikes-money-machine-page, .mmyl-monthly-statement-page) .mmyl-layout .mmyl-move-amount { margin: var(--s-1) 0 var(--s-4); }

:where(.mmyl-money-machine-page, .mikes-money-machine-page, .mmyl-monthly-statement-page) .mmyl-move-amount .mmyl-value { font-family: var(--font-display); font-size: calc(var(--mmyl-value-size, 30px) * 1.9); font-weight: 400; line-height: var(--lh-hero); padding: 0 .12em; }

:where(.mmyl-money-machine-page, .mikes-money-machine-page, .mmyl-monthly-statement-page) .mmyl-account { background: var(--panel); border-radius: var(--r-lg); padding: var(--s-5) var(--s-6) var(--s-6); min-width: 0; }

:where(.mmyl-money-machine-page, .mikes-money-machine-page, .mmyl-monthly-statement-page) .mmyl-account .mmyl-section-title { font-size: var(--t-lg); }

:where(.mmyl-money-machine-page, .mikes-money-machine-page, .mmyl-monthly-statement-page) .mmyl-rows { display: grid; grid-template-columns: minmax(0, 1fr) auto; }

:where(.mmyl-money-machine-page, .mikes-money-machine-page, .mmyl-monthly-statement-page) .mmyl-row { display: grid; grid-template-columns: subgrid; grid-column: 1 / -1; align-items: baseline; gap: var(--s-4); padding: calc(var(--mmyl-body-gap, 12px) * .75) 0; border-bottom: var(--b-hair) solid var(--border); }

:where(.mmyl-money-machine-page, .mikes-money-machine-page, .mmyl-monthly-statement-page) .mmyl-name { min-width: 0; color: var(--fg); overflow-wrap: anywhere; }

:where(.mmyl-money-machine-page, .mikes-money-machine-page, .mmyl-monthly-statement-page) .mmyl-row dd { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: baseline; gap: var(--s-2) var(--s-3); text-align: right; min-width: 0; }

:where(.mmyl-money-machine-page, .mikes-money-machine-page, .mmyl-monthly-statement-page) .mmyl-value,
:where(.mmyl-money-machine-page, .mikes-money-machine-page, .mmyl-monthly-statement-page) .mmyl-signed { font-size: var(--t-base); font-family: var(--font-sans); font-variant-numeric: tabular-nums; line-height: var(--lh-normal); white-space: nowrap; }

:where(.mmyl-money-machine-page, .mikes-money-machine-page, .mmyl-monthly-statement-page) .mmyl-sign { margin-right: var(--s-1); }

:where(.mmyl-money-machine-page, .mikes-money-machine-page, .mmyl-monthly-statement-page) .mmyl-sign:empty { display: none; }

:where(.mmyl-money-machine-page, .mikes-money-machine-page, .mmyl-monthly-statement-page) .mmyl-aud,
:where(.mmyl-money-machine-page, .mikes-money-machine-page, .mmyl-monthly-statement-page) .mmyl-as-of { color: var(--muted); font-size: var(--t-sm); }

:where(.mmyl-money-machine-page, .mikes-money-machine-page, .mmyl-monthly-statement-page) .mmyl-aud { white-space: nowrap; }

:where(.mmyl-money-machine-page, .mikes-money-machine-page, .mmyl-monthly-statement-page) .mmyl-as-of { display: block; }

:where(.mmyl-money-machine-page, .mikes-money-machine-page, .mmyl-monthly-statement-page) .mmyl-total { border-top: var(--b-rule) solid var(--fg); border-bottom: 0; font-weight: 600; }

:where(.mmyl-money-machine-page, .mikes-money-machine-page, .mmyl-monthly-statement-page) .mmyl-landed { grid-column: 1 / -1; min-width: 0; }

:where(.mmyl-money-machine-page, .mikes-money-machine-page, .mmyl-monthly-statement-page) .mmyl-landed > summary { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; gap: var(--s-4); padding: 9px 0; border-top: var(--b-rule) solid var(--fg); border-bottom: var(--b-hair) solid var(--border); font-weight: 600; cursor: pointer; list-style: none; }

:where(.mmyl-money-machine-page, .mikes-money-machine-page, .mmyl-monthly-statement-page) .mmyl-landed > summary::-webkit-details-marker { display: none; }

:where(.mmyl-money-machine-page, .mikes-money-machine-page, .mmyl-monthly-statement-page) .mmyl-chevron { display: inline-block; width: var(--s-4); color: var(--muted); }

:where(.mmyl-money-machine-page, .mikes-money-machine-page, .mmyl-monthly-statement-page) .mmyl-landed[open] .mmyl-chevron { transform: rotate(90deg); }

:where(.mmyl-money-machine-page, .mikes-money-machine-page, .mmyl-monthly-statement-page) .mmyl-landings { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; margin: var(--s-2) 0 var(--s-4); }

:where(.mmyl-money-machine-page, .mikes-money-machine-page, .mmyl-monthly-statement-page) .mmyl-landings th,
:where(.mmyl-money-machine-page, .mikes-money-machine-page, .mmyl-monthly-statement-page) .mmyl-landings td { text-align: right; padding: 6px 0 6px var(--s-4); border-bottom: var(--b-hair) solid var(--border); }

:where(.mmyl-money-machine-page, .mikes-money-machine-page, .mmyl-monthly-statement-page) .mmyl-landings th { font-weight: 400; color: var(--muted); font-size: var(--t-sm); }

:where(.mmyl-money-machine-page, .mikes-money-machine-page, .mmyl-monthly-statement-page) .mmyl-landings td { white-space: nowrap; }

:where(.mmyl-money-machine-page, .mikes-money-machine-page, .mmyl-monthly-statement-page) .mmyl-landings th:first-child,
:where(.mmyl-money-machine-page, .mikes-money-machine-page, .mmyl-monthly-statement-page) .mmyl-landings td:first-child { text-align: left; padding-left: 0; white-space: normal; }

:where(.mmyl-money-machine-page, .mikes-money-machine-page, .mmyl-monthly-statement-page) .mmyl-coming-line { color: var(--muted); }

:where(.mmyl-money-machine-page, .mikes-money-machine-page, .mmyl-monthly-statement-page) .mmyl-upload-error { grid-column: 1 / -1; color: var(--muted); overflow-wrap: anywhere; }

:where(.mmyl-money-machine-page, .mikes-money-machine-page, .mmyl-monthly-statement-page) .mmyl-invoice-drop { display: grid; place-items: center; width: var(--s-8); min-height: var(--s-8); border: var(--b-hair) dashed var(--fg-soft); border-radius: var(--r-md); cursor: pointer; }

:where(.mmyl-money-machine-page, .mikes-money-machine-page, .mmyl-monthly-statement-page) .mmyl-invoice-drop:focus-visible { outline: var(--b-hair) solid var(--fg); outline-offset: var(--s-1); }

@container money-content (min-width: 1280px) {
	:where(.mmyl-money-machine-page, .mikes-money-machine-page, .mmyl-monthly-statement-page) .mmyl-layout { max-width: 1260px; grid-template-columns: minmax(0, 520px) minmax(0, 680px); column-gap: var(--s-16); justify-content: center; }

}
@container money-content (max-width: 560px) {
	:where(.mmyl-money-machine-page, .mikes-money-machine-page, .mmyl-monthly-statement-page) .mmyl-move,
	:where(.mmyl-money-machine-page, .mikes-money-machine-page, .mmyl-monthly-statement-page) .mmyl-account { padding: var(--s-4); }

	:where(.mmyl-money-machine-page, .mikes-money-machine-page, .mmyl-monthly-statement-page) .mmyl-row { gap: var(--s-2); }

	:where(.mmyl-money-machine-page, .mikes-money-machine-page, .mmyl-monthly-statement-page) .mmyl-move-amount .mmyl-value { font-size: calc(var(--mmyl-value-size, 30px) * 1.4); }

	:where(.mmyl-money-machine-page, .mikes-money-machine-page, .mmyl-monthly-statement-page) .mmyl-landings th,
	:where(.mmyl-money-machine-page, .mikes-money-machine-page, .mmyl-monthly-statement-page) .mmyl-landings td { font-size: var(--t-xs); padding-left: var(--s-1); }

}
:where(.mmyl-money-machine-page, .mikes-money-machine-page, .mmyl-monthly-statement-page) .mmyl-pick { display: flex; align-items: center; gap: var(--s-2); padding: var(--s-2) 0; overflow-wrap: anywhere; }

:where(.mmyl-money-machine-page, .mikes-money-machine-page, .mmyl-monthly-statement-page) .mmyl-pick[hidden] { display: none; }

:where(.mmyl-money-machine-page, .mikes-money-machine-page, .mmyl-monthly-statement-page) .mmyl-pick-tools { display: flex; flex-wrap: wrap; gap: var(--s-2); padding: var(--s-2) 0; }

:where(.mmyl-money-machine-page, .mikes-money-machine-page, .mmyl-monthly-statement-page) .mmyl-pick-tools input { flex: 1 1 100%; min-width: 0; }

:where(.mmyl-money-machine-page, .mikes-money-machine-page, .mmyl-monthly-statement-page) .mmyl-pick-tools input,
:where(.mmyl-money-machine-page, .mikes-money-machine-page, .mmyl-monthly-statement-page) .mmyl-pick-tools button { color: var(--fg); background: var(--bg); border: var(--b-hair) solid var(--fg-soft); border-radius: var(--r-sm); padding: var(--s-2); }

:where(.mmyl-money-machine-page, .mikes-money-machine-page, .mmyl-monthly-statement-page) .mmyl-pick-tools button { cursor: pointer; }

:where(.mmyl-money-machine-page, .mikes-money-machine-page, .mmyl-monthly-statement-page) .mmyl-pick-tools :focus-visible { outline: var(--b-hair) solid var(--fg); outline-offset: var(--s-1); }


/* mikes-money-machine: content scoped to its page, with unchanged selector priority. */
:where(.mikes-money-machine-page) .mikes-moves-body { display: flex; flex-direction: column; gap: var(--s-3); padding-top: var(--s-6); }

:where(.mikes-money-machine-page) .mikes-moves-body .mmyl-name { font-weight: 600; font-size: var(--t-base); }

:where(.mikes-money-machine-page) .mikes-moves-form { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: end; gap: var(--s-2); order: 2; }

:where(.mikes-money-machine-page) .mikes-moves-form label { display: flex; flex: 1 1 10rem; min-width: 0; flex-direction: column; gap: var(--s-2); }

:where(.mikes-money-machine-page) .mikes-moves-form input,
:where(.mikes-money-machine-page) .mikes-moves-form select,
:where(.mikes-money-machine-page) .mikes-moves-body button {
	box-sizing: border-box; max-width: 100%; min-width: 0; padding: var(--s-2) var(--s-3);
	font-family: var(--font-sans); font-size: var(--t-sm); color: var(--fg); background: var(--bg);
	border: var(--b-hair) solid var(--fg-soft); border-radius: var(--r-sm); min-height: var(--s-10);
}

:where(.mikes-money-machine-page) .mikes-moves-form select { flex: 1 1 10rem; }

:where(.mikes-money-machine-page) .mikes-moves-body button { cursor: pointer; }

:where(.mikes-money-machine-page) .mikes-moves-body button:disabled { opacity: var(--opacity-disabled, 0.5); cursor: wait; }

:where(.mikes-money-machine-page) .mikes-moves-body :focus-visible { outline: var(--b-hair) solid var(--fg); outline-offset: var(--s-1); }

:where(.mikes-money-machine-page) .mikes-moves-list { display: grid; gap: var(--s-2); }

:where(.mikes-money-machine-page) .mikes-move { display: grid; grid-template-columns: auto minmax(0, 1fr) max-content max-content; gap: var(--s-2); align-items: baseline; padding-top: var(--s-2); border-top: var(--b-hair) solid var(--fg-soft); }

:where(.mikes-money-machine-page) .mikes-move > span { overflow-wrap: anywhere; }

:where(.mikes-money-machine-page) .mikes-move-amount { text-align: right; white-space: nowrap; }

:where(.mikes-money-machine-page) .mikes-moves-status { margin: 0; color: var(--fg-soft); }

@media (max-width: 560px) {
	:where(.mikes-money-machine-page) .mikes-move { grid-template-columns: minmax(0, 1fr) max-content; }

	:where(.mikes-money-machine-page) .mikes-move-date { grid-column: 1; }

	:where(.mikes-money-machine-page) .mikes-move-kind { grid-column: 1; grid-row: span 1; }

	:where(.mikes-money-machine-page) .mikes-move-amount { grid-column: 2; grid-row: 1; }

	:where(.mikes-money-machine-page) .mikes-move button { grid-column: 2; grid-row: 2; }

}

/* mmyl-monthly-statement: content scoped to its page, with unchanged selector priority. */
:where(.mmyl-monthly-statement-page) .statement-content { padding: var(--s-6); box-sizing: border-box; }

:where(.mmyl-monthly-statement-page) #mmyl-statement {
	box-sizing: border-box;
	max-width: 100%;
	color: var(--fg);
	background: var(--bg);
}

:where(.mmyl-monthly-statement-page) #mmyl-statement header {
	margin-bottom: var(--s-8);
}

:where(.mmyl-monthly-statement-page) #mmyl-statement h1,
:where(.mmyl-monthly-statement-page) #mmyl-statement h2,
:where(.mmyl-monthly-statement-page) #mmyl-statement h3 {
	margin: var(--s-4) 0 var(--s-3);
}

:where(.mmyl-monthly-statement-page) #mmyl-statement section {
	margin-bottom: var(--s-8);
}

:where(.mmyl-monthly-statement-page) #mmyl-statement table {
	width: 100%;
	border-collapse: collapse;
	table-layout: fixed;
}

:where(.mmyl-monthly-statement-page) #mmyl-statement th,
:where(.mmyl-monthly-statement-page) #mmyl-statement td {
	text-align: left;
	vertical-align: top;
	padding: var(--s-2);
	border-bottom: var(--b-hair) solid var(--border);
	overflow-wrap: anywhere;
}

:where(.mmyl-monthly-statement-page) #mmyl-statement dl {
	margin: 0;
}

:where(.mmyl-monthly-statement-page) #mmyl-statement dl > div {
	display: flex;
	justify-content: space-between;
	gap: var(--s-4);
	padding: var(--s-2) 0;
	border-bottom: var(--b-hair) solid var(--border);
}

:where(.mmyl-monthly-statement-page) #mmyl-statement dd {
	margin: 0;
	text-align: right;
}

:where(.mmyl-monthly-statement-page) .statement-warning {
	color: var(--status-alert);
}

/* System Health: the page surface and its BlocksEngine / BlocksItem look.
   The shared sheet travels with either module via MODULE_STYLESHEETS.
   :where() restricts these rules to this page without adding selector weight. */
/* System Health - the machine face. A read-only config of the blocks engine:
   the grouped (sections-pattern) surface renders one group (the hero head)
   and the derived blocks below it. The sysh-* row rules are unchanged from
   the bespoke canvas; .cc-* maps the engine's grouped markup onto that look.
   The .sysh-shell / .sysh-hero rules stay for the loading + degrade states,
   which render before (or instead of) the engine. */

:where(body.system-health-page) #mai-system-health {
	background: transparent;
	color: var(--fg);
	font-family: var(--font-sans);
}

/* --- the engine's grouped surface, wearing the canvas's shell --- */
:where(body.system-health-page) #mai-system-health .cc-groups {
	box-sizing: border-box;
	min-height: 100%;
	padding: 118px var(--s-5) var(--s-12);
}

:where(body.system-health-page) #mai-system-health .cc-group {
	width: min(1100px, 100%);
	margin: 0 auto;
}

/* the group head is the hero: kicker above title above note */
:where(body.system-health-page) #mai-system-health .cc-group-head {
	display: flex;
	flex-direction: column;
	gap: var(--s-2);
}

:where(body.system-health-page) #mai-system-health .cc-group-kicker {
	order: -1;
	font-family: var(--font-mono);
	font-size: var(--t-xs);
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--accent);
	margin-bottom: calc(-1 * var(--s-1));
}

:where(body.system-health-page) #mai-system-health .cc-group-title {
	font-family: var(--font-display);
	font-size: var(--t-xl);
	line-height: var(--lh-display);
	letter-spacing: -0.002em;
	font-weight: 400;
}

:where(body.system-health-page) #mai-system-health .cc-group-note {
	font-family: var(--font-sans);
	font-size: var(--t-base);
	line-height: var(--lh-normal);
	color: var(--muted);
	max-width: 64ch;
	margin: var(--s-2) 0 0;
}

/* blocks flow like the bespoke sections did */
:where(body.system-health-page) #mai-system-health .cc-group-blocks {
	display: grid;
	gap: var(--s-4);
	margin-top: var(--s-2);
}

:where(body.system-health-page) #mai-system-health .cc-block {
	display: grid;
	gap: var(--s-2);
}

/* an authored hide-when-empty block renders nothing - no gap ghost */
:where(body.system-health-page) #mai-system-health .cc-block:empty {
	display: none;
}

:where(body.system-health-page) .sysh-shell {
	box-sizing: border-box;
	min-height: 100%;
	padding: 118px var(--s-5) var(--s-12);
	display: grid;
	gap: var(--s-4);
}

:where(body.system-health-page) .sysh-hero,
:where(body.system-health-page) .sysh-section {
	width: min(1100px, 100%);
	margin: 0 auto;
}

:where(body.system-health-page) .sysh-hero {
	display: grid;
	gap: var(--s-2);
}

:where(body.system-health-page) .sysh-kicker {
	font-family: var(--font-mono);
	font-size: var(--t-xs);
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--accent);
}

:where(body.system-health-page) .sysh-hero .sysh-kicker {
	margin-bottom: calc(-1 * var(--s-1));
}

:where(body.system-health-page) .sysh-muted {
	color: var(--muted);
	max-width: 64ch;
}

:where(body.system-health-page) #mai-system-health .cc-group-note code,
:where(body.system-health-page) .sysh-muted code {
	font-family: var(--font-mono);
	color: var(--fg);
	font-size: 0.9em;
	background: var(--panel-alt);
	border: var(--b-hair) solid var(--border);
	border-radius: var(--r-sm);
	padding: 0.05em 0.4em;
}

:where(body.system-health-page) .sysh-error {
	color: var(--alert);
}

/* --- the spine: calm by default, alerted when a finding exists --- */
:where(body.system-health-page) .sysh-spine {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: var(--s-2);
	margin-top: var(--s-2);
	padding: var(--s-3) var(--s-4);
	border: var(--b-hair) solid var(--border);
	border-radius: var(--r-lg);
	font-size: var(--t-md);
}

:where(body.system-health-page) .sysh-spine strong {
	font-weight: 700;
}

:where(body.system-health-page) .sysh-spine .sysh-sum {
	color: var(--muted);
	font-size: var(--t-sm);
}

:where(body.system-health-page) .sysh-spine.calm {
	background: color-mix(in srgb, var(--cyan) 12%, var(--panel));
	border-color: color-mix(in srgb, var(--cyan) 40%, var(--border));
}

:where(body.system-health-page) .sysh-spine.alerted {
	background: color-mix(in srgb, var(--alert) 14%, var(--panel));
	border-color: color-mix(in srgb, var(--alert) 55%, var(--border));
}

:where(body.system-health-page) .sysh-dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	flex: none;
	background: var(--cyan);
	animation: sysh-pulse 1.6s ease-in-out infinite;
}

:where(body.system-health-page) .sysh-spine.alerted .sysh-dot {
	background: var(--alert);
}

@keyframes sysh-pulse {
	0%,
	100% {
		opacity: 1;
	}
	50% {
		opacity: 0.3;
	}
}

@media (prefers-reduced-motion: reduce) {
	:where(body.system-health-page) .sysh-dot {
		animation: none;
	}
}

:where(body.system-health-page) .sysh-degraded {
	color: var(--muted);
	font-size: var(--t-xs);
	margin: var(--s-2) 0 0;
}

/* --- sections --- */
:where(body.system-health-page) .sysh-section {
	display: grid;
	gap: var(--s-2);
}

:where(body.system-health-page) .sysh-sec-head {
	display: flex;
	align-items: baseline;
	gap: var(--s-3);
	border-bottom: var(--b-hair) solid var(--border);
	padding-bottom: var(--s-1);
}

:where(body.system-health-page) .sysh-sec-title {
	color: var(--muted);
	font-size: var(--t-sm);
}

:where(body.system-health-page) .sysh-cards {
	display: grid;
	gap: var(--s-1);
}

:where(body.system-health-page) .sysh-card {
	box-sizing: border-box;
	display: flex;
	align-items: baseline;
	flex-wrap: wrap;
	gap: var(--s-2);
	padding: var(--s-2) var(--s-3);
	border: var(--b-hair) solid var(--border);
	border-radius: var(--r-sm);
	background: var(--panel);
	font-size: var(--t-sm);
}

:where(body.system-health-page) .sysh-name {
	font-family: var(--font-mono);
	font-size: var(--t-sm);
	color: var(--accent);
	background: var(--panel-alt);
	border: var(--b-hair) solid var(--border);
	border-radius: var(--r-sm);
	padding: 0.05em 0.4em;
}

:where(body.system-health-page) .sysh-meta {
	color: var(--muted);
	font-family: var(--font-mono);
	font-size: var(--t-xs);
}

:where(body.system-health-page) .sysh-flag {
	margin-left: auto;
	font-family: var(--font-mono);
	font-size: var(--t-xs);
	text-transform: uppercase;
	letter-spacing: 0.04em;
	padding: 0.05em 0.45em;
	border-radius: var(--r-sm);
	background: color-mix(in srgb, var(--alert) 18%, transparent);
	color: var(--alert);
}

:where(body.system-health-page) .sysh-flag.ok {
	background: color-mix(in srgb, var(--cyan) 18%, transparent);
	color: var(--cyan-ink, var(--cyan));
}

:where(body.system-health-page) .sysh-flag.off {
	background: color-mix(in srgb, var(--muted) 18%, transparent);
	color: var(--muted);
}

:where(body.system-health-page) .sysh-flag.warn {
	background: color-mix(in srgb, var(--amber) 20%, transparent);
	color: var(--amber);
}

:where(body.system-health-page) .sysh-flag.alert {
	background: color-mix(in srgb, var(--alert) 20%, transparent);
	color: var(--alert);
}

/* --- finding cards (in the FINDINGS section) --- */
:where(body.system-health-page) .sysh-finding {
	align-items: flex-start;
	flex-wrap: nowrap;
}

:where(body.system-health-page) .sysh-finding .sysh-cdot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	margin-top: 0.4em;
	flex: none;
}

:where(body.system-health-page) .sysh-finding.alert {
	border-color: color-mix(in srgb, var(--alert) 55%, var(--border));
}

:where(body.system-health-page) .sysh-finding.alert .sysh-cdot {
	background: var(--alert);
}

:where(body.system-health-page) .sysh-finding.warn {
	border-color: color-mix(in srgb, var(--amber) 55%, var(--border));
}

:where(body.system-health-page) .sysh-finding.warn .sysh-cdot {
	background: var(--amber);
}

:where(body.system-health-page) .sysh-ctitle {
	margin: 0 0 0.15em;
	font-weight: 600;
}

:where(body.system-health-page) .sysh-cdetail {
	margin: 0;
	color: var(--muted);
	font-family: var(--font-mono);
	font-size: var(--t-xs);
}

:where(body.system-health-page) .system-health-content { display: flex; flex-direction: column; flex: 1; min-height: 0; }
:where(body.system-health-page) .system-health-content > #mai-system-health { flex: 1; min-height: 0; }

/* A narrower room changes frame widths, never text size. The object keeps its
   own reading areas; a non-scrollable owner is clipped within the same frame. */
.sections-workspace [data-sections-room-fitted] > .sections-workspace-object-body {
	min-width: 0;
	max-width: 100%;
	overflow-x: auto;
}
.sections-workspace[data-sections-geometry="objects"][data-sections-room-fitted] .sections-workspace-viewport {
	overflow-x: hidden;
}
.sections-workspace[data-sections-migration] .sections-workspace-surface {
	max-width: 100%;
}

.sections-workspace [data-sections-room-fitted] > .sections-workspace-object-controls {
	max-width: 100%;
	overflow-x: auto;
}
.sections-workspace [data-sections-room-fitted] .sections-workspace-object-own-controls {
	flex-shrink: 0;
}
