/* Shared components used across the dashboard and the app shell. */

.btn {
	display: inline-flex;
	text-decoration: none;
	align-items: center;
	justify-content: center;
	gap: var(--space-2);
	padding: 9px var(--space-4);
	border-radius: var(--radius-md);
	font-size: 0.875rem;
	font-weight: 600;
	--hover-duration: var(--duration-hover-normal);
	transition: background-color var(--hover-duration) var(--ease-hover), color var(--hover-duration) var(--ease-hover), border-color var(--hover-duration) var(--ease-hover), opacity var(--hover-duration) var(--ease-hover);
	white-space: nowrap;
}

.btn svg {
	width: 16px;
	height: 16px;
}

.btn-primary {
	background: var(--accent);
	color: var(--accent-contrast);
}

.btn-primary:hover {
	background: var(--accent-strong);
}

.btn-secondary {
	background: var(--color-surface);
	border: 1px solid var(--color-border-strong);
	color: var(--color-text);
}

.btn-secondary:hover {
	background: var(--color-border);
}

.btn-ghost {
	color: var(--color-text-muted);
}

.btn-ghost:hover {
	background: var(--color-border);
	color: var(--color-text);
}

.btn-danger {
	background: var(--color-danger-soft);
	color: var(--color-danger);
}

.btn-danger:hover {
	filter: brightness(0.95);
}

.btn:disabled {
	opacity: 0.55;
	cursor: not-allowed;
}

.btn-sm {
	--hover-duration: var(--duration-hover-compact);
	padding: 5px var(--space-3);
	font-size: 0.8125rem;
	border-radius: var(--radius-sm);
}

.icon-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	border-radius: var(--radius-md);
	color: var(--color-text-muted);
	--hover-duration: var(--duration-hover-compact);
	transition: background-color var(--hover-duration) var(--ease-hover), color var(--hover-duration) var(--ease-hover), border-color var(--hover-duration) var(--ease-hover), opacity var(--hover-duration) var(--ease-hover);
	position: relative;
}

.icon-btn svg {
	width: 18px;
	height: 18px;
}

.icon-btn:hover {
	background: var(--color-border);
	color: var(--color-text);
}

.icon-btn[aria-pressed="true"], .icon-btn.is-active {
	background: var(--accent-soft);
	color: var(--accent-strong);
}

.icon-btn:disabled {
	opacity: 0.4;
	cursor: not-allowed;
}

.storage-summary {
	margin-bottom: var(--space-4);
}

.storage-summary-line {
	font-size: 0.875rem;
	font-weight: 600;
	color: var(--color-text);
}

.storage-progress {
	height: 8px;
	margin: var(--space-2) 0;
	overflow: hidden;
	border-radius: 999px;
	background: var(--color-border);
}

.storage-progress span {
	display: block;
	width: 0;
	height: 100%;
	border-radius: inherit;
	background: var(--accent);
	transition: width var(--duration-base) var(--ease-standard);
}

.storage-available {
	font-size: 0.8125rem;
	color: var(--color-text-muted);
}

.billing-summary {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: var(--space-2);
	margin-bottom: var(--space-4);
}

.billing-actions {
	display: flex;
	flex-wrap: wrap;
	gap: var(--space-2);
}

.billing-actions[hidden],
.billing-summary [hidden] {
	display: none;
}

/* Plan cards: the dashboard's Upgrade dialog and Account settings > Plan and billing. */.upgrade-plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.upgrade-plan { display: flex; flex-direction: column; gap: 8px; padding: 18px; border-radius: 14px; background: color-mix(in srgb, var(--color-text) 4.5%, var(--color-surface)); }
.upgrade-plan.is-team { background: linear-gradient(135deg, #1d2d3e 0%, #2a4058 60%, #34506e 100%); color: #f1f4f8; }
.upgrade-plan h3 { margin: 0; font-size: 1rem; }
.upgrade-price { margin: 0; color: inherit; font-size: .875rem; }
.upgrade-price strong { font-size: 1.6rem; letter-spacing: -.02em; }
.upgrade-plan ul { flex: 1; margin: 0; padding-left: 1.1rem; font-size: .8125rem; line-height: 1.6; }
.upgrade-plan.is-team ul { color: #c3cfdc; }
.upgrade-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.upgrade-actions[hidden], .upgrade-current[hidden] { display: none; }
.upgrade-actions .btn { flex: 1; justify-content: center; }
.upgrade-current { margin: 0; color: var(--color-success); font-size: .8125rem; font-weight: 650; }
.upgrade-note { margin: 12px 0 0; color: var(--color-text-muted); font-size: .75rem; }
.upgrade-plan.is-current { box-shadow: inset 0 0 0 2px var(--accent); }
.billing-plans { margin-bottom: var(--space-3); }
.settings-dialog .upgrade-plans { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.settings-dialog .upgrade-actions .btn { flex-basis: 100%; }
.billing-note { margin-bottom: var(--space-4); }
.storage-plan-link { margin-bottom: var(--space-4); }
@media (forced-colors: active) { .upgrade-plan { border: 1px solid CanvasText; } }

/* Tooltip: a single portal element (see tooltip.js) rendered as a direct
   child of <body> and positioned via getBoundingClientRect(), so it can
   never be clipped by a scrollable/positioned ancestor the way a
   pseudo-element anchored to the trigger button would be. The accessible
   label already lives in the element's aria-label, so this is a visual
   affordance only. */
.floating-tooltip {
	margin: 0;
	border: 0;
	inset: auto;
	position: fixed;
	top: 0;
	left: 0;
	background: var(--color-text);
	color: var(--color-bg);
	font-size: 0.75rem;
	font-weight: 500;
	padding: 4px 8px;
	border-radius: var(--radius-sm);
	white-space: normal;
	line-height: 1.5;
	max-width: min(20rem, calc(100vw - 16px));
	overflow: hidden;
	text-overflow: ellipsis;
	opacity: 0;
	pointer-events: none;
	transition: opacity var(--duration-hover-compact) var(--ease-hover);
	z-index: 1000;
}

.floating-tooltip.is-visible {
	opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
	.floating-tooltip {
		transition: none;
	}
}

.input, .textarea, .select {
	width: 100%;
	padding: 8px var(--space-3);
	border: 1px solid var(--color-border-strong);
	border-radius: var(--radius-md);
	background: var(--color-surface);
	color: var(--color-text);
	font-size: 0.875rem;
}

.input:focus-visible, .textarea:focus-visible, .select:focus-visible {
	outline: none;
	border-color: var(--accent);
	box-shadow: 0 0 0 3px var(--accent-soft);
}

.textarea {
	resize: vertical;
	min-height: 4.5rem;
	font-family: inherit;
}

.label {
	display: block;
	font-size: 0.75rem;
	font-weight: 600;
	color: var(--color-text-muted);
	margin-bottom: 4px;
}

.field {
	margin-bottom: var(--space-3);
}

.badge {
	display: inline-flex;
	align-items: center;
	padding: 2px 8px;
	border-radius: 999px;
	font-size: 0.6875rem;
	font-weight: 700;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	background: var(--accent-soft);
	color: var(--accent-strong);
}

.badge-neutral {
	background: var(--color-border);
	color: var(--color-text-muted);
}

/* Accent color picker (project creation, and anywhere else a curated set of
   swatches replaces a free-form color input). Each swatch is a <label>
   wrapping a visually-hidden radio; the checkmark svg inside only shows
   once its own radio is :checked, via :has() on the label itself; no JS
   needed to keep a selection indicator in sync. Previously the radio was
   hidden with nothing marking which swatch was actually selected. */
.color-swatch-group {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.color-swatch {
	position: relative;
	width: 30px;
	height: 30px;
	border-radius: 50%;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.12);
	transition: opacity var(--duration-hover-compact) var(--ease-hover);
}

.color-swatch:hover {
	opacity: 0.86;
}

.color-swatch svg {
	width: 16px;
	height: 16px;
	color: #fff;
	opacity: 0;
	filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.35));
	transition: opacity var(--duration-hover-compact) var(--ease-hover);
}

.color-swatch:has(:checked) {
	box-shadow: 0 0 0 2px var(--color-surface), 0 0 0 4px var(--color-text);
}

.color-swatch:has(:checked) svg {
	opacity: 1;
}

.color-swatch:has(:focus-visible) {
	outline: 2px solid var(--accent);
	outline-offset: 2px;
}

/* Dialogs */
/* Two compounding bugs, both the same root shape: an AUTHOR-origin rule
   silently overriding a UA-stylesheet default that this component actually
   depended on; author CSS always beats user-agent CSS regardless of
   selector specificity, so neither of these needed high specificity to win,
   they just needed to exist.
   1. A native <dialog> that ISN'T open gets `display: none` from the UA
      stylesheet (`dialog:not([open])`). The old bare `dialog.modal {
      display: flex; ... }` below applied UNCONDITIONALLY; to every
      dialog in the DOM, open or not; silently overriding that `display:
      none` and putting every closed dialog back in normal document flow,
      full height, wherever it happens to sit in the HTML (which is after
      all the main page content). That's the actual, literal cause of
      "modals render near the bottom of the page and create page scroll":
      they were never hidden at all, just visually stacked below
      everything else, every single page load, whether ever opened or not.
      Scoped to `dialog.modal[open]` now, with an explicit `display: none`
      on the closed state for clarity even though the UA default already
      covers it.
   2. A native <dialog> shown via showModal() centers itself by default via
      `dialog:modal { position: fixed; inset-block: 0; margin: auto; }`;
      but base.css's `*, *::before, *::after { margin: 0; }` reset zeroed
      that `margin: auto` out too. With `inset-block: 0` still in effect
      but margin no longer auto, the browser resolved the over-constrained
      box by anchoring to one edge instead of centering; dialogs that DID
      open rendered pinned near the bottom of the viewport instead of
      centered. `margin: auto` restores it; `position`/`inset-block`
      themselves were never touched by any of our own rules. */
/* One modal size system (docs/DESIGN_SYSTEM.md, Dialogs and panels): every
   ordinary dialog is --modal-width wide; .modal-small is only for a short
   confirm, alert or one-field prompt. Height follows the content up to
   --modal-max-height, then the body scrolls under a fixed header and footer.
   .modal-fill keeps the full height for content that changes in place (tabs,
   live lists, chat) so the frame does not jump. Phones get the same rules at
   full width inside a 16 px gutter. Helper panels listed in the design system
   keep their own size; nothing else sets a width. */
dialog.modal {
	--modal-width: 720px;
	--modal-max-height: min(820px, calc(100dvh - 48px));
	border: 1px solid var(--color-border-strong);
	border-radius: var(--radius-lg);
	padding: 0;
	background: var(--color-surface);
	color: var(--color-text);
	box-shadow: 0 24px 80px color-mix(in srgb, var(--color-shadow) 25%, transparent), 0 2px 8px color-mix(in srgb, var(--color-shadow) 12%, transparent);
	width: min(var(--modal-width), calc(100vw - 32px));
	max-width: calc(100vw - 32px);
	max-height: var(--modal-max-height);
	overflow: hidden;
}

dialog.modal.modal-small { --modal-width: 440px; }
dialog.modal.modal-fill { height: var(--modal-max-height); }

@media (max-width: 600px) {
	dialog.modal { --modal-max-height: calc(100dvh - 32px); }
}

dialog.modal:not([open]) {
	display: none;
}

dialog.modal[open] {
	margin: auto;
	display: flex;
	flex-direction: column;
}

dialog.modal::backdrop {
	background: rgba(10, 11, 15, 0.5);
}

html.has-open-modal { overflow: hidden; }

dialog.modal[open] {
	animation: modal-open 0.3s ease both;
}

dialog.modal[open]::backdrop {
	animation: modal-backdrop-open 0.3s ease both;
}

@keyframes modal-open {
	from { opacity: 0; transform: scale(0.98); }
	to { opacity: 1; transform: scale(1); }
}

@keyframes modal-backdrop-open {
	from { opacity: 0; }
	to { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
	dialog.modal[open], dialog.modal[open]::backdrop { animation: none; }
}

.modal-header {
	display: flex;
	flex: 0 0 auto;
	align-items: center;
	justify-content: space-between;
	padding: var(--space-4) var(--space-5);
	border-bottom: 1px solid var(--color-border);
	gap: var(--space-3);
	background: color-mix(in srgb, var(--color-surface-raised) 55%, var(--color-surface));
}

.modal-header h2 {
	font-size: 1.0625rem;
	font-weight: 600;
}

.modal-body {
	flex: 1 1 auto;
	min-height: 0;
	min-width: 0;
	padding: var(--space-5);
	overflow-y: auto;
}

.modal-footer {
	display: flex;
	flex: 0 0 auto;
	align-items: center;
	justify-content: flex-end;
	gap: var(--space-2);
	padding: var(--space-4) var(--space-5);
	border-top: 1px solid var(--color-border);
	background: color-mix(in srgb, var(--color-bg) 38%, var(--color-surface));
}

.modal > form { display: flex; flex-direction: column; min-height: 0; max-height: inherit; flex: 1; }
.modal-footer[hidden] { display: none; }
/* One checkbox with its label on one line, for dialogs that have no settings-toggle list. */
.modal .check-row { display: flex; align-items: center; gap: 10px; min-height: 34px; margin: var(--space-3) 0; cursor: pointer; }
.modal-description { margin: 4px 0 0; color: var(--color-text-muted); font-size: 0.8125rem; line-height: 1.5; }
.modal .input, .modal .select { min-height: 38px; border-radius: var(--radius-md); }
.modal textarea.input { min-height: 84px; line-height: 1.6; }
.modal :is(.input, .select):focus-visible { outline: 3px solid var(--accent-soft); outline-offset: 1px; border-color: var(--accent); }
.modal .modal-body { overscroll-behavior: contain; scrollbar-width: thin; }
.modal .field { min-width: 0; }
.modal .modal-footer { flex-wrap: wrap; }
.modal .modal-header > div { min-width: 0; }
.modal .modal-header h2 { font-size: 1.125rem; font-weight: 650; letter-spacing: -0.02em; }
.modal .modal-header p { line-height: 1.5; }
.modal .modal-body > * { min-width: 0; }
.modal label:not(.btn) { font-size: 0.8125rem; line-height: 1.45; }
.modal .share-ai-warning { padding: 14px 16px; line-height: 1.55; font-size: 0.8125rem; }
.modal .share-ai-warning span { overflow-wrap: anywhere; }
.modal .share-copy-row > .input { min-width: 0; }
.modal :is(.share-ai-credentials, .integration-row, .integration-form, .ai-bridge-connection) { padding: 16px; border-radius: 12px; }
.modal :is(.integration-form-grid, .integration-form) { gap: 12px; }
.modal :is(.integration-event-options, .integration-row-copy span, .integration-row-copy small) { font-size: 0.8125rem; line-height: 1.5; }
.modal .integration-event-options label { display: flex; align-items: center; gap: 10px; min-height: 34px; }
.modal :is(.settings-tabs, .ai-tabs) { gap: 4px; padding: 8px 20px; background: var(--color-bg); }
.modal :is(.settings-tabs, .ai-tabs) button { min-height: 42px; padding: 10px 14px; border: 1px solid transparent; border-radius: 9px; font-size: 0.8125rem; font-weight: 600; }
.modal :is(.settings-tabs, .ai-tabs) button[aria-selected="true"] { border-color: var(--color-border); background: var(--color-surface); color: var(--color-text); box-shadow: var(--shadow-sm); }

/* One control scale for all form surfaces; board objects keep their own scale. */
:is(dialog.modal, .inspector) :is(.input, .select, .textarea, .btn, .inspector-choice-trigger, .palette-trigger) {
	min-height: 42px;
	min-width: 0;
	border-radius: 10px;
	font-size: 0.875rem;
	font-weight: 500;
	line-height: 1.4;
}
:is(dialog.modal, .inspector) :is(.input, .select, .textarea) { padding: 10px 12px; }
:is(dialog.modal, .inspector) .btn { padding: 10px 14px; text-decoration: none; }
:is(dialog.modal, .inspector) .btn:hover { text-decoration: none; }
:is(dialog.modal, .inspector) .label { font-size: 0.8125rem; line-height: 1.45; font-weight: 500; }
:is(dialog.modal, .inspector) :is(.input, .textarea)::placeholder { color: var(--color-text-faint); font-weight: 400; }
:is(dialog.modal, .inspector) .icon-btn { flex-shrink: 0; }
:is(dialog.modal, .inspector) input:is([type="checkbox"], [type="radio"]):where(:not(.visually-hidden):not(.sr-only)) {
	appearance: none;
	display: inline-grid;
	place-content: center;
	width: 21px;
	height: 21px;
	min-width: 21px;
	flex: 0 0 21px;
	margin: 0;
	border: 1.5px solid var(--color-border-strong);
	border-radius: 6px;
	background: var(--color-surface);
	color: var(--accent-contrast);
	vertical-align: middle;
	cursor: pointer;
}
:is(dialog.modal, .inspector) input[type="radio"]:where(:not(.visually-hidden):not(.sr-only)) { border-radius: 50%; }
:is(dialog.modal, .inspector) input:is([type="checkbox"], [type="radio"]):checked { background: var(--accent); border-color: var(--accent); }
:is(dialog.modal, .inspector) input[type="checkbox"]:checked::after {
	content: "";
	width: 9px;
	height: 5px;
	border-left: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: translateY(-1px) rotate(-45deg);
}
:is(dialog.modal, .inspector) input[type="radio"]:checked::after { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
:is(dialog.modal, .inspector) input:indeterminate::after { content: ""; width: 9px; height: 2px; background: var(--accent); }
:is(dialog.modal, .inspector) input:disabled { opacity: 0.5; cursor: not-allowed; }
:is(dialog.modal, .inspector) input:is([type="checkbox"], [type="radio"]):focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
:is(dialog.modal, .inspector) select:not([multiple]) {
	appearance: none;
	padding-right: 32px;
	background-image: linear-gradient(45deg, transparent 50%, var(--color-text-muted) 50%), linear-gradient(135deg, var(--color-text-muted) 50%, transparent 50%);
	background-position: calc(100% - 17px) 50%, calc(100% - 12px) 50%;
	background-size: 5px 5px;
	background-repeat: no-repeat;
}
@supports (appearance: base-select) {
	:is(dialog.modal, .inspector) select:not([multiple]),
	:is(dialog.modal, .inspector) select:not([multiple])::picker(select) { appearance: base-select; }
	:is(dialog.modal, .inspector) select:not([multiple]) { background-image: none; padding-right: 12px; align-items: center; }
	:is(dialog.modal, .inspector) select::picker-icon { content: ""; width: 16px; height: 16px; background-color: var(--color-text-muted); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6l6 -6'/%3E%3C/svg%3E") center / 16px 16px no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6l6 -6'/%3E%3C/svg%3E") center / 16px 16px no-repeat; }
	:is(dialog.modal, .inspector) select::picker(select) {
		margin-top: 6px;
		padding: 6px;
		border: 1px solid var(--color-border-strong);
		border-radius: 12px;
		background: var(--color-surface);
		color: var(--color-text);
		box-shadow: var(--shadow-lg);
		font: 400 0.875rem/1.4 var(--font-sans);
		max-height: min(360px, 50dvh);
		scrollbar-width: thin;
	}
	:is(dialog.modal, .inspector) select option { min-height: 40px; padding: 9px 12px; gap: 10px; border-radius: 7px; white-space: normal; }
	:is(dialog.modal, .inspector) select option:is(:hover, :focus-visible, :checked) { background: var(--accent-soft); color: var(--color-text); }
}
@media (forced-colors: active) {
	:is(dialog.modal, .inspector) input:is([type="checkbox"], [type="radio"]) { appearance: auto; }
	:is(dialog.modal, .inspector) input::after { display: none; }
}

.settings-tabs { display: flex; flex: 0 0 auto; gap: 4px; padding: 12px 20px; border-bottom: 1px solid var(--color-border); overflow-x: auto; }
.settings-tabs [role="tab"] { flex: 1; padding: 10px 12px; border-radius: var(--radius-md); white-space: nowrap; font-size: 0.8125rem; font-weight: 600; color: var(--color-text-muted); }
.settings-tabs [role="tab"]:hover { background: var(--color-surface-raised); color: var(--color-text); }
.settings-tabs [aria-selected="true"] { color: var(--accent); background: var(--accent-soft); }
.settings-body { flex: 1; }
.settings-panel[hidden] { display: none; }
.settings-panel { outline-offset: 4px; }
.settings-section-title { margin: 24px 0 10px; font-size: 0.875rem; font-weight: 650; color: var(--color-text); }
.settings-panel > .settings-section-title:first-child { margin-top: 0; }
.settings-panel .form-hint { margin-bottom: 14px; line-height: 1.6; }
.settings-panel form { padding: 18px; margin: 12px 0 24px; border: 1px solid var(--color-border); border-radius: var(--radius-md); background: color-mix(in srgb, var(--color-bg) 40%, var(--color-surface)); }
.settings-form { display: grid; gap: 14px; }
.settings-panel form > .btn { justify-self: start; }
.settings-panel .profile-settings-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.settings-panel .profile-settings-form > :first-child, .settings-panel .profile-settings-form > .btn { grid-column: 1 / -1; }
.settings-theme-picker { display: flex; gap: 8px; }
.settings-theme-picker > button { flex: 1; min-height: 44px; }
.settings-theme-picker [aria-pressed="true"] { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }
/* Settings checkboxes, shared by Account and Project settings. */
.settings-toggle { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); padding: 10px 0; cursor: pointer; }
.settings-toggle + .settings-toggle { border-top: 1px solid var(--color-border); }
.settings-toggle span { display: grid; gap: 2px; }
.settings-toggle strong { font-size: 0.8125rem; }
.settings-toggle small { color: var(--color-text-muted); font-size: 0.75rem; }
.settings-toggle input { flex: none;  width: 18px; height: 18px; accent-color: var(--accent); }
@media (max-width: 720px) {
	.settings-tabs { padding: 8px 12px; }
	.settings-tabs [role="tab"] { padding: 10px 8px; }
	.settings-panel form { padding: 14px; }
	.settings-panel .profile-settings-form { grid-template-columns: 1fr; }
}

.modal-resize-handle {
	position: absolute;
	right: 3px;
	bottom: 3px;
	width: 20px;
	height: 20px;
	cursor: nwse-resize;
	touch-action: none;
	z-index: 5;
}

.modal-resize-handle::after {
	content: "";
	position: absolute;
	right: 3px;
	bottom: 3px;
	width: 9px;
	height: 9px;
	border-right: 2px solid var(--color-border-strong);
	border-bottom: 2px solid var(--color-border-strong);
	border-radius: 0 0 3px;
}

.modal-resize-handle:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

@media (max-width: 720px) {
	.modal-resize-handle { display: none; }
}

/* Auto-layout picker (replaces a window.prompt() with real buttons) */
.layout-choice-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: var(--space-2);
}

.layout-scope { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.layout-scope > button { flex: 1 1 10rem; min-height: 42px; }
.layout-scope > [aria-pressed="true"] { background: var(--accent-soft); color: var(--accent); border-color: var(--accent); }
.layout-scope-hint { color: var(--color-text-muted); font-size: 0.875rem; margin: var(--space-3) 0 var(--space-4); }

.layout-choice-grid > .layout-choice:last-child:nth-child(odd) { grid-column: 1 / -1; }

.layout-choice {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 4px;
	padding: var(--space-3) var(--space-2);
	border: 1.5px solid var(--color-border);
	border-radius: var(--radius-md);
	background: var(--color-surface);
	text-align: center;
	--hover-duration: var(--duration-hover-compact);
	transition: border-color var(--hover-duration) var(--ease-hover), background-color var(--hover-duration) var(--ease-hover), color var(--hover-duration) var(--ease-hover);
}

.layout-choice:hover, .layout-choice:focus-visible { border-color: var(--accent); background: var(--accent-soft); }

.layout-choice-icon { width: 26px; height: 26px; color: var(--accent); }

.layout-choice-label { font-size: 0.8125rem; font-weight: 600; }

.layout-choice-hint { font-size: 0.6875rem; color: var(--color-text-faint); line-height: 1.3; }

/* Toasts */
.toast-region {
	position: fixed;
	inset: auto var(--space-5) var(--space-5) auto;
	bottom: var(--space-5);
	right: var(--space-5);
	display: flex;
	flex-direction: column;
	gap: var(--space-2);
	max-width: 22rem;
	margin: 0;
	padding: 0;
	border: 0;
	background: transparent;
	pointer-events: none;
}

.toast {
	display: flex;
	align-items: flex-start;
	gap: var(--space-2);
	padding: var(--space-3) var(--space-4);
	background: var(--color-surface-raised);
	border: 1px solid var(--color-border);
	border-radius: var(--radius-md);
	box-shadow: var(--shadow-md);
	font-size: 0.875rem;
	animation: toast-in var(--duration-base) var(--ease-standard);
	pointer-events: auto;
}

@keyframes toast-in {
	from { opacity: 0; transform: translateY(8px); }
	to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
	.toast { animation: none; }
}

.toast.has-action { align-items: center; }
.toast-action { flex: none; margin-left: auto; padding: 6px 12px; border: 0; border-radius: var(--radius-sm); background: var(--accent-soft); color: var(--accent-strong); font-size: 0.8125rem; font-weight: 700; }
.toast.is-error { border-color: var(--color-danger); }
.toast.is-success { border-color: var(--color-success); }

/* Context menu */
.context-menu {
	position: fixed;
	min-width: 200px;
	background: var(--color-surface-raised);
	border: 1px solid var(--color-border);
	border-radius: var(--radius-md);
	box-shadow: var(--shadow-lg);
	padding: 4px;
	z-index: 150;
}

.context-menu button {
	display: flex;
	align-items: center;
	gap: var(--space-2);
	width: 100%;
	padding: 7px var(--space-2);
	border-radius: var(--radius-sm);
	font-size: 0.8125rem;
	color: var(--color-text);
	text-align: left;
}

.context-menu button:hover, .context-menu button:focus-visible {
	background: var(--color-border);
}

.context-menu button[data-danger="true"] { color: var(--color-danger); }
.context-menu button[data-danger="true"] svg { color: var(--color-danger); }
.context-menu button[data-danger="true"]:hover { background: color-mix(in srgb, var(--color-danger) 12%, transparent); }

.context-menu button svg {
	width: 15px;
	height: 15px;
	color: var(--color-text-muted);
}

/* The command palette's result rows reuse this class name for the same
   row layout/hover styling as a context-menu item, but live outside any
   .context-menu ancestor (they're in the command palette dialog); so the
   ".context-menu button svg" size rule above never matched them. Without
   an explicit size, an SVG with only a viewBox (no width/height
   attributes) renders at its browser-default intrinsic size instead of
   shrinking to fit its flex row. */
.context-menu-item svg {
	width: 16px;
	height: 16px;
	flex-shrink: 0;
	color: var(--color-text-muted);
}

.context-menu hr {
	border: none;
	border-top: 1px solid var(--color-border);
	margin: 4px 0;
}

.menu-divider {
	border: none;
	border-top: 1px solid var(--color-border);
	margin: 4px 0;
}

/* Empty states */
.empty-state {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	padding: var(--space-7) var(--space-5);
	color: var(--color-text-muted);
}

.empty-state svg {
	width: 40px;
	height: 40px;
	color: var(--color-text-faint);
	margin-bottom: var(--space-3);
}

.empty-state h3 {
	color: var(--color-text);
	font-size: 1rem;
	margin-bottom: 4px;
}

/* Skeleton loading */
.skeleton {
	background: linear-gradient(90deg, var(--color-border) 25%, var(--color-bg) 50%, var(--color-border) 75%);
	background-size: 200% 100%;
	border-radius: var(--radius-md);
	animation: skeleton-shimmer 1.4s ease-in-out infinite;
}

@keyframes skeleton-shimmer {
	0% { background-position: 200% 0; }
	100% { background-position: -200% 0; }
}

@media (prefers-reduced-motion: reduce) {
	.skeleton { animation: none; }
}

.visually-hidden-focusable:not(:focus):not(:focus-within) {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
}
.palette-trigger {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 32px;
	padding: 5px 9px;
	border: 1px solid var(--color-border);
	border-radius: var(--radius-md);
	background: var(--color-surface);
	color: var(--color-text);
	font: inherit;
	font-size: 0.8125rem;
	cursor: pointer;
}

.palette-trigger:hover, .palette-trigger[aria-expanded="true"] { border-color: var(--color-border-strong); background: var(--color-surface-raised); }
.palette-trigger__swatch, .palette-option > span { width: 18px; height: 18px; flex: 0 0 auto; border: 1px solid color-mix(in srgb, var(--color-text) 18%, transparent); border-radius: 50%; background: var(--swatch); }
.palette-trigger__swatch.is-transparent,
.palette-option > span.is-transparent {
	background-color: #fff;
	background-image: linear-gradient(45deg, #cbd5e1 25%, transparent 25%), linear-gradient(-45deg, #cbd5e1 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #cbd5e1 75%), linear-gradient(-45deg, transparent 75%, #cbd5e1 75%);
	background-position: 0 0, 0 4px, 4px -4px, -4px 0;
	background-size: 8px 8px;
}
/* Default follows a rule (theme, contrast or the enclosing Text): shown as a split theme swatch. */
.palette-trigger__swatch.is-default,
.palette-option > span.is-default { background: linear-gradient(135deg, var(--color-surface) 0 50%, var(--color-text) 50% 100%); }
.palette-popover { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 3px; width: min(260px, calc(100vw - 24px)); padding: 6px; border: 1px solid var(--color-border-strong); border-radius: var(--radius-lg); background: var(--color-surface-raised); box-shadow: var(--shadow-lg); }
.palette-option { display: flex; align-items: center; gap: 7px; min-width: 0; padding: 6px 8px; border: 0; border-radius: var(--radius-md); background: transparent; color: var(--color-text); text-align: left; cursor: pointer; }
.palette-option:hover, .palette-option:focus-visible, .palette-option[aria-selected="true"] { background: var(--accent-soft); outline: 0; }
.palette-option b { overflow: hidden; font-size: 0.75rem; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.palette-custom { display: grid; grid-column: 1 / -1; gap: 4px; padding: 7px 8px 4px; border-top: 1px solid var(--color-border); color: var(--color-text-muted); font-size: 0.6875rem; font-weight: 650; }
.palette-custom > span { display: flex; gap: 6px; }
.palette-custom input { width: 0; min-width: 0; flex: 1; padding: 6px 8px; border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-surface); color: var(--color-text); font: 0.75rem var(--font-mono); }
.palette-custom small { min-height: 1em; color: var(--color-danger); font-weight: 500; }
.offline-comparison { overflow: auto; max-height: 50vh; }
.offline-comparison table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.offline-comparison th, .offline-comparison td { padding: 12px; border-bottom: 1px solid var(--color-border); text-align: left; vertical-align: top; overflow-wrap: anywhere; }
.offline-comparison th:first-child { width: 22%; text-transform: capitalize; }
.offline-comparison pre { margin: 0; white-space: pre-wrap; font: inherit; overflow-wrap: anywhere; }
.offline-review-dialog .modal-footer { flex-wrap: wrap; }

/* Both navigation hamburgers share one line-to-cross animation. */
.animated-menu-trigger path { transform-origin: 12px 12px; transition: transform 200ms var(--ease-standard), opacity 140ms ease; }
.animated-menu-trigger[aria-expanded="true"] .project-menu-line-top { transform: rotate(45deg) translateY(6px); }
.animated-menu-trigger[aria-expanded="true"] .project-menu-line-middle { opacity: 0; transform: scaleX(0.5); }
.animated-menu-trigger[aria-expanded="true"] .project-menu-line-bottom { transform: rotate(-45deg) translateY(-6px); }
@media (prefers-reduced-motion: reduce) { .animated-menu-trigger path { transition: none; } }
/* Support identity stays outside the scrolling dashboard/Board. */
body:has(> .support-banner) {
	display: grid;
	grid-template-rows: auto minmax(0, 1fr);
	height: 100dvh;
	overflow: hidden;
}
.support-banner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px 16px;
	padding: 6px 16px;
	background: #ffe3a3;
	color: #332400;
	font-size: 13px;
	line-height: 1.4;
	z-index: 100;
}
.support-banner > span { min-width: 0; overflow-wrap: anywhere; }
.support-banner .btn { flex-shrink: 0; min-height: 32px; color: #332400; background: #fff6df; border-color: #9c7528; }
body:has(> .support-banner) > .dash-shell,
body:has(> .support-banner) > .app-shell,
body:has(> .support-banner) .dash-sidebar,
body:has(> .support-banner) .dash-main { height: 100%; min-height: 0; }
.support-form-error { color: var(--color-danger, #b42318); }
@media (max-width: 540px) {
	.support-banner { flex-wrap: wrap; padding: 6px 10px; }
	.support-banner .btn { min-height: 40px; }
}
@media (max-width: 900px) {
	body:has(> .support-banner) .dash-sidebar { top: var(--support-banner-height, 0px); height: calc(100dvh - var(--support-banner-height, 0px)); }
	body:has(> .support-banner) .dash-sidebar-toggle { top: calc(var(--support-banner-height, 0px) + (var(--workspace-header-height) - 44px) / 2); }
}
@media (max-width: 560px) {
	body:has(> .support-banner) .dash-sidebar-toggle { top: calc(var(--support-banner-height, 0px) + 8px); }
}
html[data-device="phone"] body:has(> .support-banner) .inspector { top: var(--support-banner-height, 0px); height: calc(100dvh - var(--support-banner-height, 0px)); }
html[data-device="phone"] body:has(> .support-banner) dialog.modal:is(.tasks-dialog, .timeline-dialog, .today-dialog, #outline-dialog) {
	margin-top: var(--support-banner-height, 0px);
	height: calc(100dvh - var(--support-banner-height, 0px)) !important;
	max-height: calc(100dvh - var(--support-banner-height, 0px)) !important;
}
.support-dialog-form { display: contents; }

/* A person's profile picture replaces their initials wherever an avatar is shown. */
[data-photo] {
	background-color: var(--color-surface-raised) !important;
	background-image: var(--photo) !important;
	background-position: center !important;
	background-size: cover !important;
	color: transparent !important;
}

/* Shared full-gradient color picker (color-picker.js). */
.color-picker { display: flex; flex-direction: column; gap: 8px; width: min(248px, 100%); }
.color-picker__row { display: flex; align-items: center; gap: 6px; }
.color-picker__preview { flex: 0 0 28px; height: 28px; border: 1px solid var(--color-border-strong); border-radius: 8px; }
.color-picker .color-picker__hex { flex: 1; min-width: 0; width: auto; padding: 6px 8px; font: 0.75rem var(--font-mono); }
.color-picker__error { min-height: 0; color: var(--color-danger); font-size: 0.6875rem; }
.color-picker__error:empty { display: none; }
.color-picker__area { position: relative; height: 140px; border-radius: 10px; background: linear-gradient(to top, #000, transparent), linear-gradient(to right, #fff, var(--hue, #f00)); cursor: crosshair; touch-action: none; }
.color-picker__area:focus-visible { outline: 2px solid var(--accent-strong); outline-offset: 2px; }
.color-picker__thumb { position: absolute; width: 14px; height: 14px; border: 2px solid #fff; border-radius: 50%; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.45), 0 1px 3px rgba(0, 0, 0, 0.3); transform: translate(-50%, -50%); pointer-events: none; }
.color-picker__hue { width: 100%; height: 14px; margin: 0; border-radius: 999px; background: linear-gradient(to right, #f00, #ff0, #0f0, #0ff, #00f, #f0f, #f00); appearance: none; -webkit-appearance: none; }
.color-picker__hue::-webkit-slider-thumb { width: 16px; height: 16px; border: 2px solid #fff; border-radius: 50%; background: transparent; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.45); -webkit-appearance: none; }
.color-picker__hue::-moz-range-thumb { width: 14px; height: 14px; border: 2px solid #fff; border-radius: 50%; background: transparent; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.45); }
.color-picker__hue:focus-visible { outline: 2px solid var(--accent-strong); outline-offset: 2px; }
.color-picker__recent { display: flex; flex-wrap: wrap; gap: 6px; }
.color-picker__recent[hidden] { display: none; }
.color-picker__swatch { width: 22px; height: 22px; border: 1px solid var(--color-border-strong); border-radius: 6px; background: var(--swatch); }
.color-picker__swatch:focus-visible { outline: 2px solid var(--accent-strong); outline-offset: 2px; }
.color-picker-popover { padding: 10px; }
.palette-custom .color-picker { width: 100%; }
@media (forced-colors: active) { .color-picker__thumb { border-color: CanvasText; } }

.profile-identity { display: flex; align-items: center; gap: var(--space-4); margin-bottom: var(--space-2); }
.profile-identity__avatar { display: inline-flex; flex: 0 0 64px; align-items: center; justify-content: center; width: 64px; height: 64px; border-radius: 50%; background: var(--profile-color, var(--accent)); box-shadow: 0 0 0 3px var(--color-surface), 0 0 0 5px var(--profile-color, var(--accent)); color: #fff; font-size: 1.25rem; font-weight: 700; }
.profile-identity__actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); }
.profile-identity__actions [hidden] { display: none; }
.palette-custom { min-width: 0; }
.palette-custom .color-picker__area { height: 110px; }
.color-picker__row .btn { flex: 0 0 auto; }
.color-picker__hue { min-width: 0; }
.color-picker .color-picker__hue { width: 100%; padding: 0; border: 0; flex: none; }
.color-picker .color-picker__row .color-picker__hex { flex: 1 1 0; width: 0; min-width: 0; }
.color-picker, .color-picker__row { min-width: 0; max-width: 100%; }
.palette-popover { overflow-x: hidden; }
.color-picker .color-picker__hue { height: 14px; border-radius: 999px; background: linear-gradient(to right, #f00, #ff0, #0f0, #0ff, #00f, #f0f, #f00); }

/* Shared by comments and chat on Boards and in the Team chat dialog. */
.comment-pin__avatar, .comment-row__avatar { display: grid; flex: 0 0 auto; width: 22px; height: 22px; place-items: center; overflow: hidden; border-radius: 50%; background: color-mix(in srgb, var(--accent) 70%, #000); background-position: center; background-size: cover; color: #fff; font-size: 0.5625rem; font-weight: 800; }
.comment-pin__avatar[data-photo], .comment-row__avatar[data-photo] { color: transparent; }
.comment-item__meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; font-size: 0.75rem; }
.comment-item__meta small { color: var(--color-text-faint); }
.comment-action { padding: 0; border: 0; background: none; color: var(--color-text-muted); font: inherit; font-size: 0.75rem; cursor: pointer; }
.comment-action:hover, .comment-action:focus-visible { color: var(--color-text); text-decoration: underline; }
.comment-body { font-size: 0.8125rem; line-height: 1.45; overflow-wrap: anywhere; }
.comment-hint { color: var(--color-text-faint); font-size: 0.6875rem; }
/* Kept on this device until the connection returns: a comment, a chat message, a Task card. The color of the Offline save status. */
.waiting-mark, .comment-item__meta .waiting-mark { display: inline-flex; align-items: center; gap: 4px; color: var(--color-warning); font-size: 0.6875rem; font-weight: 600; line-height: 1.3; }
.waiting-mark svg { flex: 0 0 auto; width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
/* Says that a panel shows this device's copy because there is no connection. */
.panel-offline-note { margin: 0; padding: 8px 10px; border-radius: var(--radius-sm); background: color-mix(in srgb, var(--color-warning) 14%, transparent); color: var(--color-text); font-size: 0.75rem; line-height: 1.45; overflow-wrap: anywhere; }
.panel-offline-note[hidden] { display: none; }
.comment-mentions { position: absolute; bottom: calc(100% - 40px); left: 0; z-index: 2; min-width: 200px; margin: 0; padding: 4px; border: 1px solid var(--color-border); border-radius: var(--radius-sm); background: var(--color-surface-raised); box-shadow: var(--shadow-md); list-style: none; }
.comment-mentions[hidden] { display: none; }
.comment-mentions li { display: flex; align-items: center; gap: 6px; padding: 4px 6px; border-radius: var(--radius-sm); font-size: 0.8125rem; cursor: pointer; }
.comment-mentions li[aria-selected="true"], .comment-mentions li:hover { background: var(--accent-soft); }
/* Chat (Board panel and Team dialog). */
.comments-panel__modes { display: flex; gap: 4px; padding: 3px; border-radius: var(--radius-md); background: var(--color-bg); }
.comments-panel__modes button { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border: 0; border-radius: var(--radius-sm); background: none; color: var(--color-text-muted); font: inherit; font-size: 0.875rem; font-weight: 600; cursor: pointer; }
.comments-panel__modes button[aria-selected="true"] { background: var(--color-surface-raised); color: var(--color-text); box-shadow: var(--shadow-sm); }
.comments-panel__comments, .comments-panel__chat { display: flex; flex: 1; flex-direction: column; gap: var(--space-2); min-height: 0; }
.comments-panel__comments[hidden], .comments-panel__chat[hidden] { display: none; }
.comments-panel__chat-root { display: flex; flex: 1; min-height: 0; }
.comments-panel__chat-root > div { display: flex; flex: 1; flex-direction: column; min-height: 0; }
.comments-panel__chat-root > div[hidden] { display: none; }
.comments-btn__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.comments-btn__dot[hidden] { display: none; }
[data-chat-count]:empty { display: none; }
[data-chat-count] { color: var(--accent); font-weight: 700; }
.chat { display: flex; flex: 1; flex-direction: column; gap: var(--space-2); min-height: 0; }
.chat__messages { display: flex; flex: 1; flex-direction: column; gap: var(--space-3); min-height: 120px; margin: 0; padding: 0 2px; overflow-y: auto; list-style: none; }
.chat-message { display: flex; gap: var(--space-2); padding: 4px; border-radius: var(--radius-sm); }
.chat-message.is-unread { background: color-mix(in srgb, var(--accent-soft) 60%, transparent); }
.chat-message__main { flex: 1; min-width: 0; }
.chat-mention { padding: 0 2px; border-radius: 4px; background: var(--accent-soft); color: inherit; font-weight: 600; }
.chat__composer { position: relative; display: flex; align-items: flex-end; gap: var(--space-2); }
.chat__composer[hidden] { display: none; }
.chat__input { flex: 1; min-height: 40px; resize: vertical; font-size: 0.8125rem; }
.chat__readonly { margin: 0; color: var(--color-text-muted); font-size: 0.75rem; }
.chat__readonly[hidden] { display: none; }
.chat__empty { padding: var(--space-4) var(--space-2); color: var(--color-text-muted); font-size: 0.8125rem; text-align: center; }
.chat__older { align-self: center; }
.chat__settings { color: var(--color-text-muted); font-size: 0.75rem; }
.chat__settings summary { cursor: pointer; }
.chat__settings[open] { display: flex; flex-direction: column; gap: 6px; }
.chat__toggle, .chat__retention { display: flex; align-items: center; gap: 6px; }
.chat__retention[hidden] { display: none; }
.chat .comment-mentions { bottom: calc(100% + 4px); }
.team-chat-dialog__body { display: flex; }

/* Account settings: calendar link. */
.calendar-feed { display: grid; gap: var(--space-2); }
.calendar-feed__lead { margin: 0; color: var(--color-text-muted); font-size: 0.8125rem; }
.calendar-feed__actions { display: flex; flex-wrap: wrap; gap: var(--space-2); }

/* Standard mode: the power tools leave menus and toolbars until Advanced is on. */
html[data-advanced="false"] [data-advanced-only] { display: none !important; }
/* Another language: the app shows once its text is translated, or after two seconds whatever happens. */
html[data-translating] body { visibility: hidden; animation: reveal-translated 0s linear 2s forwards; }
@keyframes reveal-translated { to { visibility: visible; } }

/* Try-out accounts: a navy band above the app with the way to keep the work or leave. It is part of the page, so nothing hides under it. */
body:has(> .demo-bar) { --demo-bar-height: 48px; }
body:has(> .demo-bar) :is(.app-shell, .dash-shell, .dash-main) { height: calc(100dvh - var(--demo-bar-height)); }
@media (min-width: 901px) { body:has(> .demo-bar) .dash-sidebar { height: calc(100dvh - var(--demo-bar-height)); } }
@media (max-width: 900px) { body:has(> .demo-bar) .dash-sidebar-toggle { top: calc(var(--demo-bar-height) + (var(--workspace-header-height) - 44px) / 2); } }
.demo-bar { position: relative; z-index: 60; display: flex; flex-wrap: nowrap; align-items: center; justify-content: center; gap: 8px 20px; min-height: var(--demo-bar-height); padding: 6px 16px; background: #1b2a41; color: #dfe6ef; font-size: 0.8125rem; line-height: 1.35; }
.demo-bar p { min-width: 0; margin: 0; }
.demo-bar strong { color: #fff; }
.demo-bar__actions { display: flex; flex: none; gap: 8px; }
.demo-bar .btn { border-radius: 999px; white-space: nowrap; }
.demo-bar__leave { border: 1px solid rgb(255 255 255 / 0.35); background: transparent; color: #fff; }
.demo-bar__leave:hover { border-color: #ff8aa7; background: rgb(255 255 255 / 0.08); }
.demo-bar .btn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.demo-keep-dialog__body { display: grid; gap: 4px; }
.demo-keep-dialog__error { margin: 0; color: var(--color-danger); font-size: 0.8125rem; }
.demo-keep-dialog__error:empty { display: none; }
.account-delete-ends { display: grid; gap: var(--space-2); margin-bottom: var(--space-4); padding: 12px 16px; border-radius: 12px; background: color-mix(in srgb, var(--color-warning) 12%, transparent); color: var(--color-text); font-size: 0.8125rem; line-height: 1.5; }
.account-delete-ends[hidden] { display: none; }
.account-delete-ends p, .account-delete-ends ul { margin: 0; }
.account-delete-ends ul { padding-left: 1.25rem; }
.account-delete-blocked { display: grid; gap: var(--space-2); margin-bottom: var(--space-4); padding: 12px 16px; border-radius: 12px; background: var(--color-danger-soft); color: var(--color-text); font-size: 0.8125rem; line-height: 1.5; }
.account-delete-blocked[hidden] { display: none; }
.account-delete-blocked p, .account-delete-blocked ul { margin: 0; }
.account-delete-blocked ul { padding-left: 1.25rem; }
.account-delete-blocked a { font-weight: 600; overflow-wrap: anywhere; }
body.is-presenting .demo-bar { display: none; }
@media (max-width: 760px) {
	.demo-bar { justify-content: space-between; gap: 10px; padding: 6px 8px 6px 12px; font-size: 0.75rem; }
	.demo-bar__note { display: none; }
}

/* Feedback from the signed-in views (feedback-dialog.js): the /feedback page's content in a dialog. */
.feedback-dialog [hidden] { display: none !important; }
.feedback-kinds { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 var(--space-4); padding: 0; border: 0; min-width: 0; }
.feedback-kinds legend { width: 100%; margin-bottom: 8px; padding: 0; }
.feedback-kind { position: relative; cursor: pointer; }
.feedback-kind input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.feedback-kind span { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 16px; border-radius: 999px; background: var(--surface-tint, var(--color-bg)); color: var(--color-text); font-size: 0.8125rem; font-weight: 600; }
.feedback-kind svg { width: 18px; height: 18px; color: var(--color-text-muted); }
.feedback-kind:hover span { background: color-mix(in srgb, var(--color-text) 9%, var(--color-surface)); }
.feedback-kind input:checked + span { background: var(--accent-soft); box-shadow: inset 0 0 0 2px var(--accent-strong); color: var(--accent-strong); }
.feedback-kind input:checked + span svg { color: var(--accent-strong); }
.feedback-kind input:focus-visible + span { outline: 2px solid var(--accent-strong); outline-offset: 3px; }
.feedback-sender { display: grid; gap: 2px; margin: 0 0 var(--space-4); padding: 10px 14px; border-radius: 12px; background: var(--surface-tint, var(--color-bg)); }
.feedback-sender p { margin: 0; font-size: 0.8125rem; overflow-wrap: anywhere; }
.feedback-sender .label { margin: 0; }
.feedback-sender span[data-sender-email] { color: var(--color-text-muted); }
.feedback-dialog .textarea { min-height: 140px; line-height: 1.6; }
.feedback-field-foot { display: flex; justify-content: space-between; gap: var(--space-3); margin-top: 6px; }
.feedback-count { margin-left: auto; color: var(--color-text-muted); font-size: 0.75rem; font-variant-numeric: tabular-nums; }
.feedback-error { margin: 0; color: var(--color-danger); font-size: 0.75rem; font-weight: 600; }
.feedback-dialog [aria-invalid="true"] { border-color: var(--color-danger); }
.feedback-consent { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; }
.feedback-consent input { flex: none; width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--accent); }
.feedback-consent + .feedback-error { margin-top: 6px; }
.feedback-dialog-note { margin: var(--space-3) 0 0; color: var(--color-text-muted); font-size: 0.75rem; line-height: 1.5; }
.feedback-dialog-loading { margin: 0; color: var(--color-text-muted); }
.feedback-dialog-blocked { display: grid; justify-items: start; gap: var(--space-3); }
.feedback-dialog-blocked p { margin: 0; line-height: 1.55; }
.feedback-dialog-done { display: grid; justify-items: center; gap: var(--space-2); padding: var(--space-4) 0; text-align: center; outline: none; }
.feedback-dialog-done h3 { margin: 0; font-size: 1.125rem; }
.feedback-dialog-done p { margin: 0; color: var(--color-text-muted); }
.feedback-dialog-done__icon { display: inline-grid; width: 48px; height: 48px; place-items: center; border-radius: 50%; background: var(--accent-soft); color: var(--accent-strong); }
.feedback-dialog-done__icon svg { width: 24px; height: 24px; }
.feedback-dialog-status { margin: 0 auto 0 0; align-self: center; color: var(--color-text-muted); font-size: 0.8125rem; }
.feedback-dialog-status:empty { display: none; }
@media (max-width: 720px) {
	.feedback-kind span { padding: 0 12px; }
	.feedback-dialog .modal-footer .btn { flex: 1 1 auto; }
}