/* MU.lv UI primitives — consume tokens from mu-theme.css only */

/* -------------------------------------------------------------------------
   Shell / container
   ------------------------------------------------------------------------- */

.mu-ui-shell {
	min-height: 100vh;
	max-width: 100%;
	display: flex;
	flex-direction: column;
	overflow-x: hidden;
	background: var(--mu-bg);
}

.mu-ui-container {
	width: 100%;
	max-width: var(--mu-shell-max-width);
	margin-left: auto;
	margin-right: auto;
	padding-left: var(--mu-space-md);
	padding-right: var(--mu-space-md);
}

.mu-ui-main {
	flex: 1 1 auto;
	width: 100%;
	max-width: var(--mu-shell-max-width);
	min-width: 0;
	margin-left: auto;
	margin-right: auto;
	padding: var(--mu-space-md);
}

/* -------------------------------------------------------------------------
   Grid
   Portal contract: three children in source order — left, main, right.
   ------------------------------------------------------------------------- */

.mu-ui-grid {
	display: grid;
	gap: var(--mu-space-md);
}

.mu-ui-grid--portal {
	align-items: start;
	flex: 1 1 auto;
	width: 100%;
	max-width: var(--mu-shell-max-width);
	min-width: 0;
	margin-left: auto;
	margin-right: auto;
	padding: var(--mu-space-md);
}

.mu-ui-grid--content {
	align-items: start;
	width: 100%;
	min-width: 0;
}

.mu-ui-grid--content > * {
	min-width: 0;
	max-width: 100%;
}

/* Finite layout utilities. Desktop column placement ignores order.
   Below 1024px, mu-responsive.css unwraps portal columns so these apply. */
.mu-ui-priority-1,
.mu-ui-priority-2,
.mu-ui-priority-3,
.mu-ui-priority-4 {
	min-width: 0;
	max-width: 100%;
}

/* -------------------------------------------------------------------------
   Header
   ------------------------------------------------------------------------- */

.mu-ui-header {
	background: var(--mu-header-bg);
	background-image: linear-gradient(180deg, var(--mu-header-top) 0%, var(--mu-header-bg) 100%);
	color: var(--mu-header-text);
	border-bottom: 2px solid var(--mu-accent);
	box-shadow: inset 0 1px 0 rgba(196, 163, 90, 0.18);
}

.mu-ui-header .mu-ui-container {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--mu-space-md);
	min-height: calc(var(--mu-control-height) + var(--mu-space-xs) * 2);
	padding-top: var(--mu-space-xs);
	padding-bottom: var(--mu-space-xs);
}

.mu-ui-header a {
	color: var(--mu-header-text);
}

.mu-ui-header a:hover,
.mu-ui-header a:focus {
	color: var(--mu-accent);
}

.mu-ui-header-brand {
	display: inline-flex;
	align-items: center;
	gap: var(--mu-space-sm);
	min-width: 0;
	flex: 1 1 auto;
	overflow: hidden;
	text-overflow: ellipsis;
	padding-left: var(--mu-space-sm);
	border-left: 2px solid var(--mu-accent);
	font-family: var(--mu-font-family-brand);
	font-size: var(--mu-font-size-md);
	font-weight: var(--mu-font-weight-bold);
	letter-spacing: var(--mu-letter-spacing-brand);
	text-transform: uppercase;
	white-space: nowrap;
	color: var(--mu-accent);
	line-height: var(--mu-line-height-tight);
}

.mu-ui-header-brand img,
.mu-ui-header-brand svg {
	display: block;
	flex: 0 0 auto;
	height: var(--mu-control-height);
	width: auto;
}

.mu-ui-header-tools {
	display: flex;
	align-items: center;
	flex: 0 1 auto;
	flex-wrap: wrap;
	justify-content: flex-end;
	gap: var(--mu-space-sm);
	min-width: 0;
	font-size: var(--mu-font-size-sm);
}

.mu-ui-header-tools .mu-ui-list {
	margin: 0;
	border: 0;
}

.mu-ui-header-tools .mu-ui-list-item {
	border: 0;
	padding: 0;
}

.mu-ui-header-tools .mu-ui-nav-dropdown {
	right: 0;
	left: auto;
}

.mu-ui-header-tools .mu-ui-nav-item > a {
	display: inline-flex;
	align-items: center;
	height: var(--mu-control-height-compact);
	padding: 0 var(--mu-space-sm);
	border-bottom: 0;
	color: var(--mu-header-text);
}

.mu-ui-header-tools .mu-ui-nav-item > a:hover,
.mu-ui-header-tools .mu-ui-nav-item > a:focus,
.mu-ui-header-tools .mu-ui-nav-item:focus-within > a {
	background: transparent;
	border-bottom: 0;
	color: var(--mu-accent);
}

/* -------------------------------------------------------------------------
   Navigation
   ------------------------------------------------------------------------- */

.mu-ui-nav-state {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}

.mu-ui-nav-toggle {
	display: none;
}

.mu-ui-nav {
	background: var(--mu-header-nav);
	border-bottom: var(--mu-border-width) solid var(--mu-header-line);
	box-shadow: inset 0 1px 0 rgba(196, 163, 90, 0.12);
}

.mu-ui-nav > .mu-ui-container {
	display: flex;
	align-items: stretch;
}

.mu-ui-nav > .mu-ui-container > ul {
	display: flex;
	flex-wrap: wrap;
	margin: 0;
	padding: 0;
	list-style: none;
	width: 100%;
}

.mu-ui-nav-item {
	position: relative;
}

.mu-ui-nav-item + .mu-ui-nav-item {
	border-left: var(--mu-border-width) solid var(--mu-header-line);
}

.mu-ui-nav-item > a {
	display: block;
	padding: calc(var(--mu-space-xs) + var(--mu-space-2xs)) var(--mu-space-md);
	color: var(--mu-header-text);
	font-family: var(--mu-font-family-heading);
	font-size: var(--mu-font-size-xs);
	font-weight: var(--mu-font-weight-medium);
	letter-spacing: var(--mu-letter-spacing-ui);
	line-height: var(--mu-line-height-tight);
	text-transform: uppercase;
	white-space: nowrap;
	border-bottom: 2px solid transparent;
	transition: color var(--mu-duration) var(--mu-ease), background-color var(--mu-duration) var(--mu-ease), border-color var(--mu-duration) var(--mu-ease);
}

.mu-ui-nav-item > a:hover,
.mu-ui-nav-item > a:focus,
.mu-ui-nav-item:focus-within > a {
	color: var(--mu-accent);
	background: var(--mu-header-hover);
	border-bottom-color: var(--mu-accent);
}

.mu-ui-nav-item > a[aria-current="page"] {
	color: var(--mu-accent);
	background: var(--mu-header-hover);
	border-bottom-color: var(--mu-accent);
	font-weight: var(--mu-font-weight-bold);
}

.mu-ui-nav-dropdown {
	display: none;
	position: absolute;
	top: 100%;
	left: 0;
	z-index: var(--mu-z-dropdown);
	min-width: var(--mu-dropdown-min-width);
	margin: 0;
	padding: var(--mu-space-2xs) 0;
	list-style: none;
	background: var(--mu-header-nav);
	border: var(--mu-border-width) solid var(--mu-header-line);
	border-top: 2px solid var(--mu-accent);
	border-radius: var(--mu-radius);
	box-shadow: var(--mu-shadow);
}

.mu-ui-nav-dropdown .mu-ui-nav-dropdown {
	top: 0;
	left: 100%;
}

.mu-ui-nav-item:hover > .mu-ui-nav-dropdown,
.mu-ui-nav-item:focus-within > .mu-ui-nav-dropdown {
	display: block;
}

.mu-ui-nav-dropdown a {
	display: block;
	padding: var(--mu-space-xs) var(--mu-space-md);
	color: var(--mu-header-text);
	font-family: var(--mu-font-family-heading);
	font-size: var(--mu-font-size-xs);
	font-weight: var(--mu-font-weight-medium);
	letter-spacing: 0.02em;
	line-height: var(--mu-line-height-tight);
	transition: color var(--mu-duration) var(--mu-ease), background-color var(--mu-duration) var(--mu-ease);
}

.mu-ui-nav-dropdown a:hover,
.mu-ui-nav-dropdown a:focus,
.mu-ui-nav-dropdown a[aria-current="page"] {
	background: var(--mu-header-hover);
	color: var(--mu-accent);
}

.mu-ui-nav-dropdown .mu-ui-badge {
	margin-left: var(--mu-space-xs);
}

/* -------------------------------------------------------------------------
   Footer
   ------------------------------------------------------------------------- */

.mu-ui-footer {
	margin-top: auto;
	padding: var(--mu-space-sm) 0;
	border-top: var(--mu-border-width) solid var(--mu-border);
	box-shadow: inset 0 1px 0 var(--mu-accent-soft);
	background: var(--mu-surface);
	color: var(--mu-text-muted);
	font-size: var(--mu-font-size-xs);
	line-height: var(--mu-line-height-tight);
}

.mu-ui-footer .mu-ui-container {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: var(--mu-space-sm);
}

.mu-ui-footer p {
	margin: 0;
}

.mu-ui-footer a {
	color: var(--mu-text-muted);
}

.mu-ui-footer a:hover,
.mu-ui-footer a:focus {
	color: var(--mu-accent);
}

/* -------------------------------------------------------------------------
   Panel
   ------------------------------------------------------------------------- */

.mu-ui-panel {
	min-width: 0;
	max-width: 100%;
	background: var(--mu-surface);
	border: var(--mu-border-width) solid var(--mu-border);
	border-radius: var(--mu-radius);
	box-shadow: var(--mu-shadow-none);
}

.mu-ui-panel-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--mu-space-sm);
	min-width: 0;
	padding: var(--mu-space-xs) var(--mu-space-sm);
	background: var(--mu-surface-alt);
	border-bottom: var(--mu-border-width) solid var(--mu-accent);
	box-shadow: inset 2px 0 0 var(--mu-accent);
}

.mu-ui-panel-title {
	margin: 0;
	flex: 1 1 auto;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	font-family: var(--mu-font-family-heading);
	font-size: var(--mu-font-size-sm);
	font-weight: var(--mu-font-weight-bold);
	letter-spacing: var(--mu-letter-spacing-ui);
	line-height: var(--mu-line-height-tight);
	text-transform: uppercase;
	color: var(--mu-text);
}

.mu-ui-panel-head .mu-ui-badge {
	flex: 0 0 auto;
}

.mu-ui-panel-body {
	min-width: 0;
	overflow-wrap: break-word;
	padding: var(--mu-space-sm);
}

.mu-ui-panel-footer {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--mu-space-sm);
	padding: var(--mu-space-xs) var(--mu-space-sm);
	border-top: var(--mu-border-width) solid var(--mu-border);
	background: var(--mu-surface-alt);
	font-size: var(--mu-font-size-xs);
	color: var(--mu-text-muted);
}

.mu-ui-panel-footer .mu-ui-help {
	margin: 0;
	flex: 1 1 8rem;
}

.mu-ui-panel-footer .mu-ui-form {
	margin-top: 0;
	flex: 1 1 14rem;
	align-items: flex-end;
}

.mu-ui-panel-footer .mu-ui-field {
	flex: 1 1 10rem;
	max-width: 18rem;
}

.mu-ui-panel-footer .mu-ui-input,
.mu-ui-panel-footer .mu-ui-select {
	height: var(--mu-control-height-compact);
}

.mu-ui-panel-body > .mu-ui-panel-footer:last-child {
	margin: var(--mu-space-sm) calc(-1 * var(--mu-space-sm)) calc(-1 * var(--mu-space-sm));
}

.mu-ui-panel--compact .mu-ui-panel-head,
.mu-ui-panel--compact .mu-ui-panel-footer {
	padding: var(--mu-space-2xs) var(--mu-space-xs);
}

.mu-ui-panel--compact .mu-ui-panel-body {
	padding: var(--mu-space-xs);
}

.mu-ui-panel--compact .mu-ui-panel-body > .mu-ui-panel-footer:last-child {
	margin: var(--mu-space-xs) calc(-1 * var(--mu-space-xs)) calc(-1 * var(--mu-space-xs));
}

.mu-ui-panel--compact .mu-ui-panel-title {
	font-size: var(--mu-font-size-xs);
}

.mu-ui-panel--highlight {
	border-color: var(--mu-border-strong);
}

.mu-ui-panel--highlight .mu-ui-panel-head {
	background: var(--mu-header-bg);
	background-image: linear-gradient(180deg, var(--mu-header-top) 0%, var(--mu-header-bg) 100%);
	border-bottom-color: var(--mu-accent);
}

.mu-ui-panel--highlight .mu-ui-panel-title {
	color: var(--mu-accent);
}

/* -------------------------------------------------------------------------
   List
   ------------------------------------------------------------------------- */

.mu-ui-list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.mu-ui-list-item,
#events > li {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--mu-space-sm);
	min-width: 0;
	min-height: var(--mu-control-height-compact);
	padding: var(--mu-space-2xs) 0;
	border-bottom: var(--mu-border-width) solid var(--mu-border);
	font-size: var(--mu-font-size-sm);
	line-height: var(--mu-line-height-tight);
}

.mu-ui-list-item:last-child,
#events > li:last-child {
	border-bottom: 0;
}

/* Homepage only: hide surplus production event rows. Runtime still renders/updates the full list. */
.page-home #events > li:nth-child(n+9) {
	display: none;
}

.page-home #events > li:nth-child(8) {
	border-bottom: 0;
}

.mu-ui-list-item a {
	color: var(--mu-text);
	transition: color var(--mu-duration) var(--mu-ease);
}

.mu-ui-list-item a:hover,
.mu-ui-list-item a:focus {
	color: var(--mu-accent-hover);
}

.mu-ui-list-item > :first-child,
#events > li > :first-child {
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.mu-ui-list-item > :last-child:not(:first-child),
#events > li > :last-child:not(:first-child) {
	flex: 0 0 auto;
}

.mu-ui-list-item .mu-ui-badge {
	flex: 0 0 auto;
}

.mu-ui-dl {
	margin: 0;
}

.mu-ui-dl-row {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: var(--mu-space-2xs) var(--mu-space-sm);
	min-width: 0;
	padding: var(--mu-space-2xs) 0;
	border-bottom: var(--mu-border-width) solid var(--mu-border);
	font-size: var(--mu-font-size-sm);
	line-height: var(--mu-line-height-tight);
}

.mu-ui-dl-row:last-child {
	border-bottom: 0;
}

.mu-ui-dl-row dt {
	margin: 0;
	flex: 1 1 8rem;
	min-width: 0;
	color: var(--mu-text-muted);
	font-size: var(--mu-font-size-xs);
	font-weight: var(--mu-font-weight-medium);
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.mu-ui-dl-row dd {
	margin: 0;
	flex: 0 1 auto;
	max-width: 100%;
	text-align: right;
	color: var(--mu-text);
	font-weight: var(--mu-font-weight-medium);
	font-variant-numeric: tabular-nums;
	overflow-wrap: anywhere;
}

.mu-ui-prose {
	max-width: var(--mu-content-measure);
}

.mu-ui-prose > :first-child {
	margin-top: 0;
}

.mu-ui-prose > :last-child {
	margin-bottom: 0;
}

.mu-ui-prose p {
	margin: 0 0 var(--mu-space-sm);
}

.mu-ui-prose img {
	display: block;
	width: 100%;
	max-width: 100%;
	height: auto;
	margin: var(--mu-space-sm) 0;
}

.mu-ui-prose a {
	color: var(--mu-accent);
}

.mu-ui-prose a:hover,
.mu-ui-prose a:focus {
	color: var(--mu-accent-hover);
}

.mu-ui-prose ul {
	margin: 0 0 var(--mu-space-sm);
	padding-left: var(--mu-space-lg);
}

.mu-ui-prose li {
	margin: 0 0 var(--mu-space-2xs);
}

/* -------------------------------------------------------------------------
   Stat
   ------------------------------------------------------------------------- */

.mu-ui-stat {
	display: flex;
	flex-direction: column;
	gap: var(--mu-space-2xs);
	min-width: 0;
}

.mu-ui-stat-value {
	overflow-wrap: anywhere;
	font-family: var(--mu-font-family-heading);
	font-size: var(--mu-font-size-stat);
	font-weight: var(--mu-font-weight-bold);
	font-variant-numeric: tabular-nums;
	line-height: var(--mu-line-height-tight);
	color: var(--mu-text);
}

.mu-ui-panel--highlight .mu-ui-stat-value {
	color: var(--mu-accent);
}

.mu-ui-stat-label {
	font-size: var(--mu-font-size-xs);
	color: var(--mu-text-muted);
	line-height: var(--mu-line-height-tight);
	letter-spacing: var(--mu-letter-spacing-ui);
	text-transform: uppercase;
}

/* -------------------------------------------------------------------------
   Badge
   ------------------------------------------------------------------------- */

.mu-ui-badge {
	display: inline-block;
	flex: 0 0 auto;
	max-width: 100%;
	overflow: hidden;
	text-overflow: ellipsis;
	padding: 0 var(--mu-space-xs);
	min-height: calc(var(--mu-control-height-compact) - var(--mu-space-2xs));
	border: var(--mu-border-width) solid var(--mu-border-strong);
	border-radius: var(--mu-radius-sm);
	background: var(--mu-accent-soft);
	color: var(--mu-text);
	font-size: var(--mu-font-size-xs);
	font-weight: var(--mu-font-weight-bold);
	letter-spacing: 0.06em;
	line-height: calc(var(--mu-control-height-compact) - var(--mu-space-xs));
	text-transform: uppercase;
	white-space: nowrap;
	vertical-align: middle;
	font-variant-numeric: tabular-nums;
}

.mu-ui-badge--success {
	background: var(--mu-success-bg);
	border-color: var(--mu-success);
	color: var(--mu-success);
}

.mu-ui-badge--warning {
	background: var(--mu-warning-bg);
	border-color: var(--mu-warning);
	color: var(--mu-warning);
}

.mu-ui-badge--danger {
	background: var(--mu-danger-bg);
	border-color: var(--mu-danger);
	color: var(--mu-danger);
}

.mu-ui-badge--muted {
	background: var(--mu-surface);
	border-color: var(--mu-border);
	color: var(--mu-text-muted);
}

.mu-ui-inline-meta {
	display: inline-flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--mu-space-xs);
	max-width: 100%;
	vertical-align: middle;
}

.mu-ui-inline-meta > a {
	min-width: 0;
	overflow-wrap: anywhere;
}

.mu-ui-inline-meta .mu-ui-badge {
	margin-left: 0;
}

/* -------------------------------------------------------------------------
   Buttons
   ------------------------------------------------------------------------- */

.mu-ui-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	max-width: 100%;
	height: var(--mu-control-height);
	padding: 0 var(--mu-control-padding-x);
	border: var(--mu-border-width) solid var(--mu-border);
	border-radius: var(--mu-radius-sm);
	background: var(--mu-surface);
	color: var(--mu-text);
	font-family: var(--mu-font-family-heading);
	font-size: var(--mu-font-size-xs);
	font-weight: var(--mu-font-weight-medium);
	letter-spacing: 0.05em;
	line-height: 1;
	text-transform: uppercase;
	text-decoration: none;
	cursor: pointer;
	white-space: nowrap;
	transition: color var(--mu-duration) var(--mu-ease), background-color var(--mu-duration) var(--mu-ease), border-color var(--mu-duration) var(--mu-ease);
}

.mu-ui-button:hover,
.mu-ui-button:focus {
	border-color: var(--mu-border-strong);
	color: var(--mu-text);
	background: var(--mu-accent-soft);
}

.mu-ui-button:active:not(:disabled) {
	box-shadow: inset 0 1px 2px rgba(20, 19, 18, 0.16);
}

.mu-ui-button:disabled,
.mu-ui-button[aria-disabled="true"] {
	opacity: 0.5;
	cursor: not-allowed;
	pointer-events: none;
}

.mu-ui-button--primary {
	background: var(--mu-accent);
	border-color: var(--mu-accent);
	color: var(--mu-header-bg);
	box-shadow: inset 0 1px 0 rgba(255, 247, 230, 0.28);
}

.mu-ui-button--primary:hover,
.mu-ui-button--primary:focus {
	background: var(--mu-accent-hover);
	border-color: var(--mu-accent-hover);
	color: var(--mu-header-bg);
	box-shadow: inset 0 1px 0 rgba(255, 247, 230, 0.35);
}

.mu-ui-button--primary:active:not(:disabled) {
	background: var(--mu-accent);
	border-color: var(--mu-accent);
}

.mu-ui-button--secondary {
	background: var(--mu-surface);
	border-color: var(--mu-border-strong);
	color: var(--mu-text);
}

.mu-ui-button--secondary:hover,
.mu-ui-button--secondary:focus {
	background: var(--mu-accent-soft);
	border-color: var(--mu-accent);
	color: var(--mu-text);
}

.mu-ui-button--danger {
	background: var(--mu-danger);
	border-color: var(--mu-danger);
	color: var(--mu-text-on-accent);
}

.mu-ui-button--danger:hover,
.mu-ui-button--danger:focus {
	background: var(--mu-danger-hover);
	border-color: var(--mu-danger-hover);
	color: var(--mu-text-on-accent);
}

.mu-ui-button--compact {
	height: var(--mu-control-height-compact);
	padding: 0 var(--mu-space-sm);
	font-size: var(--mu-font-size-xs);
}

.mu-ui-button--link {
	height: auto;
	padding: 0;
	border: 0;
	background: transparent;
	color: var(--mu-accent);
	font-weight: var(--mu-font-weight-regular);
	letter-spacing: 0;
	text-transform: none;
}

.mu-ui-button--link:hover,
.mu-ui-button--link:focus {
	background: transparent;
	border: 0;
	box-shadow: none;
	color: var(--mu-accent-hover);
}

.mu-ui-header .mu-ui-button--link {
	color: var(--mu-header-text);
}

.mu-ui-header .mu-ui-button--link:hover,
.mu-ui-header .mu-ui-button--link:focus {
	color: var(--mu-accent);
}

.mu-ui-header .mu-ui-button--primary {
	color: var(--mu-header-bg);
}

.mu-ui-header .mu-ui-button:not(.mu-ui-button--primary):not(.mu-ui-button--link) {
	background: var(--mu-header-hover);
	border-color: var(--mu-header-line);
	color: var(--mu-header-text);
}

.mu-ui-header .mu-ui-button:not(.mu-ui-button--primary):not(.mu-ui-button--link):hover,
.mu-ui-header .mu-ui-button:not(.mu-ui-button--primary):not(.mu-ui-button--link):focus {
	background: var(--mu-header-bg);
	border-color: var(--mu-accent);
	color: var(--mu-accent);
}

.mu-ui-controls {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--mu-space-xs);
	max-width: 100%;
	min-width: 0;
}

.mu-ui-controls .mu-ui-button {
	flex: 0 0 auto;
}

.mu-ui-panel-body > .mu-ui-controls:first-child {
	margin-bottom: var(--mu-space-sm);
}

.mu-ui-button img {
	max-width: var(--mu-space-xl);
	max-height: var(--mu-space-sm);
	width: auto;
	height: auto;
	object-fit: contain;
}

.mu-ui-action-row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: var(--mu-space-sm) var(--mu-space-md);
	min-width: 0;
	padding: var(--mu-space-xs) 0;
	border-bottom: var(--mu-border-width) solid var(--mu-border);
}

.mu-ui-action-row:first-child {
	padding-top: 0;
}

.mu-ui-action-row:last-child {
	padding-bottom: 0;
	border-bottom: 0;
}

.mu-ui-action-row + .mu-ui-action-row {
	border-top: 0;
}

.mu-ui-action-media {
	box-sizing: border-box;
	flex: 0 0 var(--mu-space-xl);
	display: flex;
	align-items: center;
	justify-content: center;
	width: var(--mu-space-xl);
	height: var(--mu-space-xl);
	max-width: var(--mu-space-xl);
	max-height: var(--mu-space-xl);
	overflow: hidden;
	line-height: 0;
}

.mu-ui-action-media img {
	display: block;
	max-width: 100%;
	max-height: 100%;
	width: auto;
	height: auto;
	object-fit: contain;
	object-position: center;
}

.mu-ui-action-row-body {
	flex: 1 1 12rem;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: var(--mu-space-2xs);
}

.mu-ui-action-row-title {
	font-family: var(--mu-font-family-heading);
	font-size: var(--mu-font-size-sm);
	font-weight: var(--mu-font-weight-medium);
	line-height: var(--mu-line-height-tight);
	overflow-wrap: anywhere;
}

.mu-ui-action-row .mu-ui-inline-meta {
	color: var(--mu-text-muted);
	font-size: var(--mu-font-size-xs);
}

.mu-ui-action-row .mu-ui-button {
	flex: 0 0 auto;
	max-width: 100%;
}

.mu-ui-action-row .mu-ui-help {
	margin: 0;
}

/* -------------------------------------------------------------------------
   Media row
   ------------------------------------------------------------------------- */

.mu-ui-media {
	display: flex;
	align-items: center;
	gap: var(--mu-space-sm);
	min-width: 0;
	padding: var(--mu-space-2xs) 0;
	border-bottom: var(--mu-border-width) solid var(--mu-border);
}

.mu-ui-media:last-child {
	border-bottom: 0;
	padding-bottom: 0;
}

.mu-ui-media:first-child {
	padding-top: 0;
}

.mu-ui-media-object {
	flex: 0 0 auto;
	width: var(--mu-space-xl);
	height: var(--mu-space-xl);
	overflow: hidden;
	background: var(--mu-surface-alt);
	border: var(--mu-border-width) solid var(--mu-border);
	border-radius: var(--mu-radius-sm);
}

.mu-ui-media-object img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.mu-ui-media-body {
	flex: 1 1 auto;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: var(--mu-space-2xs);
	line-height: var(--mu-line-height-tight);
}

.mu-ui-media-body a {
	color: var(--mu-text);
	font-size: var(--mu-font-size-sm);
	font-weight: var(--mu-font-weight-medium);
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	transition: color var(--mu-duration) var(--mu-ease);
}

.mu-ui-media-body a:hover,
.mu-ui-media-body a:focus {
	color: var(--mu-accent-hover);
}

.mu-ui-media-body span {
	color: var(--mu-text-muted);
	font-size: var(--mu-font-size-xs);
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

/* -------------------------------------------------------------------------
   Empty state
   ------------------------------------------------------------------------- */

.mu-ui-empty {
	padding: var(--mu-space-sm) 0;
	color: var(--mu-text-muted);
	font-size: var(--mu-font-size-sm);
	line-height: var(--mu-line-height-tight);
	text-align: center;
}

/* -------------------------------------------------------------------------
   Pagination (CMS #pagination markup wrapped in .mu-ui-pagination)
   ------------------------------------------------------------------------- */

.mu-ui-pagination,
.mu-ui-pagination #pagination,
.mu-ui-pagination ul,
.mu-ui-pagination li {
	margin: 0;
	padding: 0;
	list-style: none;
}

.mu-ui-pagination {
	display: flex;
	flex-wrap: wrap;
	gap: var(--mu-space-xs);
	align-items: center;
	font-size: var(--mu-font-size-xs);
}

.mu-ui-pagination a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: var(--mu-control-height-compact);
	height: var(--mu-control-height-compact);
	padding: 0 var(--mu-space-xs);
	border: var(--mu-border-width) solid var(--mu-border);
	border-radius: var(--mu-radius-sm);
	background: var(--mu-surface);
	color: var(--mu-text);
	transition: color var(--mu-duration) var(--mu-ease), background-color var(--mu-duration) var(--mu-ease), border-color var(--mu-duration) var(--mu-ease);
}

.mu-ui-pagination a:hover,
.mu-ui-pagination a:focus {
	border-color: var(--mu-accent);
	color: var(--mu-accent);
}

.mu-ui-pagination a.on {
	background: var(--mu-header-bg);
	border-color: var(--mu-accent);
	color: var(--mu-accent);
	cursor: default;
}

.mu-ui-pagination #pagination ul li {
	display: flex;
	flex-wrap: wrap;
	gap: var(--mu-space-xs);
	align-items: center;
}

/* -------------------------------------------------------------------------
   Table
   ------------------------------------------------------------------------- */

.mu-ui-table-wrap {
	width: 100%;
	max-width: 100%;
	min-width: 0;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}

.mu-ui-table-wrap:not(:first-child) {
	margin-top: var(--mu-space-sm);
}

.mu-ui-table {
	width: 100%;
	border-collapse: collapse;
	font-size: var(--mu-font-size-sm);
	line-height: var(--mu-line-height-tight);
}

.mu-ui-table th,
.mu-ui-table td {
	padding: var(--mu-space-xs) var(--mu-space-xs);
	border-bottom: var(--mu-border-width) solid var(--mu-border);
	text-align: left;
	vertical-align: middle;
}

.mu-ui-table th {
	background: var(--mu-surface-alt);
	color: var(--mu-text);
	font-family: var(--mu-font-family-heading);
	font-size: var(--mu-font-size-xs);
	font-weight: var(--mu-font-weight-bold);
	letter-spacing: var(--mu-letter-spacing-ui);
	text-transform: uppercase;
	white-space: nowrap;
	border-bottom-color: var(--mu-accent);
}

.mu-ui-table tbody tr {
	transition: background-color var(--mu-duration) var(--mu-ease);
}

.mu-ui-table tbody tr:nth-child(even) {
	background: color-mix(in srgb, var(--mu-accent-soft) 42%, var(--mu-surface));
}

.mu-ui-table tbody tr:hover {
	background: var(--mu-surface-alt);
}

.mu-ui-table a {
	color: var(--mu-text);
	transition: color var(--mu-duration) var(--mu-ease);
}

.mu-ui-table a:hover,
.mu-ui-table a:focus {
	color: var(--mu-accent-hover);
}

.mu-ui-table .mu-ui-badge {
	margin-left: var(--mu-space-xs);
}

.mu-ui-table .mu-ui-inline-meta .mu-ui-badge {
	margin-left: 0;
}

.mu-ui-table img {
	display: inline-block;
	max-height: 24px;
	vertical-align: middle;
}

.mu-ui-table-num {
	text-align: right;
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
	font-weight: var(--mu-font-weight-medium);
}

.mu-ui-table th.mu-ui-table-num:first-child,
.mu-ui-table td.mu-ui-table-num:first-child {
	width: 1%;
	white-space: nowrap;
}

.mu-ui-panel .mu-ui-panel + .mu-ui-panel {
	margin-top: var(--mu-space-sm);
}

/* -------------------------------------------------------------------------
   Form
   ------------------------------------------------------------------------- */

.mu-ui-form {
	display: flex;
	flex-wrap: wrap;
	gap: var(--mu-space-xs);
	align-items: flex-end;
}

.mu-ui-form:not(:first-child) {
	margin-top: var(--mu-space-sm);
}

.mu-ui-field {
	flex: 1 1 12rem;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: var(--mu-space-2xs);
}

.mu-ui-label {
	font-size: var(--mu-font-size-xs);
	font-weight: var(--mu-font-weight-medium);
	letter-spacing: var(--mu-letter-spacing-ui);
	text-transform: uppercase;
	color: var(--mu-text-muted);
	line-height: var(--mu-line-height-tight);
}

.mu-ui-input,
.mu-ui-select {
	width: 100%;
	max-width: 100%;
	height: var(--mu-control-height);
	padding: 0 var(--mu-control-padding-x);
	border: var(--mu-border-width) solid var(--mu-border);
	border-radius: var(--mu-radius-sm);
	background: var(--mu-surface-inset);
	color: var(--mu-text);
	font-family: var(--mu-font-family);
	font-size: var(--mu-font-size-sm);
	transition: border-color var(--mu-duration) var(--mu-ease), box-shadow var(--mu-duration) var(--mu-ease);
}

.mu-ui-input::placeholder,
.mu-ui-select::placeholder {
	color: var(--mu-text-soft);
	opacity: 1;
}

.mu-ui-input:hover,
.mu-ui-select:hover {
	border-color: var(--mu-border-strong);
}

.mu-ui-input:focus,
.mu-ui-select:focus {
	outline: 0;
	border-color: var(--mu-accent);
	box-shadow: 0 0 0 1px var(--mu-accent);
}

.mu-ui-input[readonly],
.mu-ui-input:disabled,
.mu-ui-select:disabled {
	background: var(--mu-surface-alt);
	color: var(--mu-text-muted);
	border-color: var(--mu-border);
	box-shadow: none;
	cursor: not-allowed;
}

.mu-ui-field:has(.mu-ui-error) .mu-ui-input,
.mu-ui-field:has(.mu-ui-error) .mu-ui-select,
.mu-ui-input.mu-ui-input--error,
.mu-ui-select.mu-ui-select--error {
	border-color: var(--mu-danger);
}

.mu-ui-field:has(.mu-ui-error) .mu-ui-input:focus,
.mu-ui-field:has(.mu-ui-error) .mu-ui-select:focus,
.mu-ui-input.mu-ui-input--error:focus,
.mu-ui-select.mu-ui-select--error:focus {
	box-shadow: 0 0 0 1px var(--mu-danger);
}

.mu-ui-form--stack {
	flex-direction: column;
	flex-wrap: nowrap;
	align-items: stretch;
	align-self: start;
	width: min(100%, var(--mu-form-measure));
	max-width: var(--mu-form-measure);
	margin-left: 0;
	margin-right: 0;
}

.mu-ui-form--stack .mu-ui-field,
.mu-ui-form--stack .mu-ui-check,
.mu-ui-form--stack > .mu-ui-help,
.mu-ui-form--stack > .mu-ui-error,
.mu-ui-form--stack > .mu-ui-alert {
	flex: 0 0 auto;
	width: 100%;
}

.mu-ui-form--stack > .mu-ui-button {
	flex: 0 0 auto;
	align-self: flex-start;
}

.mu-ui-check {
	display: flex;
	align-items: flex-start;
	gap: var(--mu-space-xs);
	max-width: 100%;
	font-size: var(--mu-font-size-sm);
	line-height: var(--mu-line-height-body);
	color: var(--mu-text);
}

.mu-ui-check input[type="checkbox"],
.mu-ui-check input[type="radio"] {
	flex: 0 0 auto;
	width: auto;
	height: auto;
	margin: 0.2em 0 0;
	accent-color: var(--mu-accent);
}

.mu-ui-check input:disabled {
	cursor: not-allowed;
	opacity: 0.5;
}

.mu-ui-check > span,
.mu-ui-check > label {
	flex: 1 1 auto;
	min-width: 0;
	overflow-wrap: anywhere;
}

.mu-ui-field .g-recaptcha,
.mu-ui-field .QapTcha {
	overflow: visible;
	line-height: 0;
}

.QapTcha {
	width: 215px;
}

.QapTcha .clr {
	clear: both;
}

.QapTcha .bgSlider {
	width: 215px;
	height: var(--mu-control-height);
	float: left;
	border: var(--mu-border-width) solid var(--mu-border);
	background: var(--mu-surface-inset);
	position: relative;
}

.QapTcha .slider {
	width: var(--mu-control-height);
	height: var(--mu-control-height);
	background: var(--mu-accent);
	cursor: e-resize;
	position: relative;
	top: 0;
	left: 0;
}

.QapTcha .txtStatus {
	width: 215px;
	margin-top: var(--mu-space-xs);
	text-align: left;
	color: var(--mu-danger);
	font-size: var(--mu-font-size-xs);
	clear: both;
	line-height: var(--mu-line-height-tight);
}

.QapTcha .dropSuccess {
	color: var(--mu-success);
}

.QapTcha .dropError {
	color: var(--mu-danger);
}

.mu-ui-field .g-recaptcha iframe {
	display: block;
}

.mu-ui-help {
	margin: 0;
	font-size: var(--mu-font-size-xs);
	color: var(--mu-text-muted);
}

.mu-ui-form > .mu-ui-help {
	flex: 1 1 100%;
}

.mu-ui-error {
	margin: 0;
	font-size: var(--mu-font-size-xs);
	color: var(--mu-danger);
}

/* -------------------------------------------------------------------------
   Alert / CMS notice hook
   ------------------------------------------------------------------------- */

.mu-ui-alert {
	padding: var(--mu-space-xs) var(--mu-space-sm);
	border: var(--mu-border-width) solid var(--mu-border);
	border-radius: var(--mu-radius);
	background: var(--mu-surface);
	color: var(--mu-text);
	font-size: var(--mu-font-size-sm);
	box-shadow: inset 2px 0 0 var(--mu-border-strong);
}

.mu-ui-alert--success {
	background: var(--mu-success-bg);
	border-color: var(--mu-success);
	color: var(--mu-success);
	box-shadow: inset 2px 0 0 var(--mu-success);
}

.mu-ui-alert--warning {
	background: var(--mu-warning-bg);
	border-color: var(--mu-warning);
	color: var(--mu-warning);
	box-shadow: inset 2px 0 0 var(--mu-warning);
}

.mu-ui-alert--danger {
	background: var(--mu-danger-bg);
	border-color: var(--mu-danger);
	color: var(--mu-danger);
	box-shadow: inset 2px 0 0 var(--mu-danger);
}

.mu-ui-dialog {
	position: fixed;
	inset: 0;
	z-index: var(--mu-z-modal);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: var(--mu-space-md);
}

.mu-ui-dialog[hidden] {
	display: none;
}

.mu-ui-dialog::before {
	content: "";
	position: absolute;
	inset: 0;
	background: var(--mu-header-bg);
	opacity: 0.55;
}

.mu-ui-dialog-panel {
	position: relative;
	z-index: 1;
	width: 100%;
	max-width: var(--mu-content-measure);
	max-height: 80vh;
	overflow: auto;
}

.mu-ui-panel-body > .mu-ui-alert:not(:last-child) {
	margin-bottom: var(--mu-space-sm);
}

/* -------------------------------------------------------------------------
   CMS hooks (production App.notice / #exception / leanModal)
   ------------------------------------------------------------------------- */

#exception,
#loading {
	display: none;
}

#exception {
	width: 100%;
	min-height: var(--mu-control-height);
	margin: 0;
	padding: var(--mu-space-xs) var(--mu-space-sm);
	text-align: center;
	color: var(--mu-text-on-accent);
	background: var(--mu-danger);
	position: fixed;
	z-index: var(--mu-z-notice);
	left: 0;
	top: 0;
}

#loading {
	position: fixed;
	z-index: var(--mu-z-notice);
	top: var(--mu-space-md);
	right: var(--mu-space-md);
	padding: var(--mu-space-xs) var(--mu-space-sm);
	background: var(--mu-header-bg);
	color: var(--mu-header-text);
	border-radius: var(--mu-radius);
	font-size: var(--mu-font-size-sm);
}

#notifier-box {
	position: fixed;
	top: var(--mu-space-sm);
	right: var(--mu-space-md);
	z-index: var(--mu-z-notice);
	max-width: 24rem;
}

#notifier-box .message-box {
	background: var(--mu-header-bg);
	color: var(--mu-header-text);
	margin: 0 0 var(--mu-space-xs);
	padding: var(--mu-space-sm);
	border: var(--mu-border-width) solid var(--mu-accent);
	border-radius: var(--mu-radius);
}

#notifier-box .message-box .success {
	color: var(--mu-accent);
	margin: 0 0 var(--mu-space-xs);
	font-size: var(--mu-font-size-xs);
	font-weight: var(--mu-font-weight-bold);
	letter-spacing: var(--mu-letter-spacing-ui);
	text-transform: uppercase;
}

#notifier-box .message-box .error {
	color: var(--mu-danger-bg);
	margin: 0 0 var(--mu-space-xs);
	font-size: var(--mu-font-size-xs);
	font-weight: var(--mu-font-weight-bold);
	letter-spacing: var(--mu-letter-spacing-ui);
	text-transform: uppercase;
}

#notifier-box .message-box .warning {
	color: var(--mu-accent-hover);
	margin: 0 0 var(--mu-space-xs);
	font-size: var(--mu-font-size-xs);
	font-weight: var(--mu-font-weight-bold);
	letter-spacing: var(--mu-letter-spacing-ui);
	text-transform: uppercase;
}

#notifier-box .message-box a.message-close {
	float: right;
	width: var(--mu-space-md);
	height: var(--mu-space-md);
	margin-left: var(--mu-space-xs);
	color: var(--mu-accent);
	text-align: center;
	line-height: var(--mu-space-md);
	text-decoration: none;
}

#notifier-box .message-box a.message-close::before {
	content: "\00d7";
}

#notifier-box .message-box .message-body {
	font-size: var(--mu-font-size-sm);
	line-height: var(--mu-line-height-tight);
}

#server_click {
	display: none;
}

#select_server {
	display: none;
	background: var(--mu-surface);
	color: var(--mu-text);
	border: var(--mu-border-width) solid var(--mu-border);
	border-radius: var(--mu-radius);
	padding: var(--mu-space-md);
}

#lean_overlay {
	position: fixed;
	z-index: var(--mu-z-overlay);
	top: 0;
	left: 0;
	height: 100%;
	width: 100%;
	background: var(--mu-header-bg);
	opacity: 0.55;
	display: none;
}

.ui-dialog {
	z-index: var(--mu-z-modal);
	background: var(--mu-surface);
	color: var(--mu-text);
	border: var(--mu-border-width) solid var(--mu-border);
	border-radius: var(--mu-radius);
}
