/* Challah Bake: UI kit. Our own shadcn-style components (we do not load shadcn).
   Rules for the four form/button primitives are prefixed with :is(.cb, body) so they beat generic
   element styles from the Bricks theme (specificity 0,2,0) without !important. */

/* ------------------------------------------------------------------ Button */
:is(.cb, body) .cb-btn {
	--btn-bg: var(--cb-base);
	--btn-fg: var(--cb-white);
	--btn-bd: transparent;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: var(--cb-control-h);
	padding: 0 24px;
	font: inherit;
	font-size: var(--cb-fs-m);
	font-weight: 700;
	line-height: 1;
	letter-spacing: 0;
	text-decoration: none;
	white-space: nowrap;
	color: var(--btn-fg);
	background: var(--btn-bg);
	border: 1px solid var(--btn-bd);
	border-radius: var(--cb-r-pill);
	cursor: pointer;
	transition: background var(--cb-dur) var(--cb-ease), color var(--cb-dur) var(--cb-ease), border-color var(--cb-dur) var(--cb-ease), transform var(--cb-dur) var(--cb-ease), box-shadow var(--cb-dur) var(--cb-ease);
	-webkit-appearance: none;
	appearance: none;
}

:is(.cb, body) .cb-btn:hover {
	transform: translateY(-1px);
	box-shadow: var(--cb-shadow-m);
	color: var(--btn-fg);
}

:is(.cb, body) .cb-btn:active {
	transform: translateY(0);
	box-shadow: none;
}

:is(.cb, body) .cb-btn:focus-visible {
	outline: 3px solid var(--cb-ring);
	outline-offset: 2px;
}

:is(.cb, body) .cb-btn[disabled],
:is(.cb, body) .cb-btn.is-loading {
	opacity: 0.55;
	pointer-events: none;
}

:is(.cb, body) .cb-btn.is-loading::after {
	content: "";
	width: 14px;
	height: 14px;
	border: 2px solid currentColor;
	border-right-color: transparent;
	border-radius: 50%;
	animation: cb-spin 0.7s linear infinite;
}

:is(.cb, body) .cb-btn--primary {
	--btn-bg: var(--cb-primary);
}

:is(.cb, body) .cb-btn--primary:hover {
	--btn-bg: var(--cb-primary-hover);
}

:is(.cb, body) .cb-btn--secondary {
	--btn-bg: var(--cb-secondary);
}

:is(.cb, body) .cb-btn--outline {
	--btn-bg: transparent;
	--btn-fg: var(--cb-base);
	--btn-bd: var(--cb-line);
}

:is(.cb, body) .cb-btn--outline:hover {
	--btn-bg: var(--cb-accent);
	--btn-bd: var(--cb-primary);
	box-shadow: none;
}

:is(.cb, body) .cb-btn--ghost {
	--btn-bg: transparent;
	--btn-fg: var(--cb-base);
}

:is(.cb, body) .cb-btn--ghost:hover {
	--btn-bg: var(--cb-accent);
	box-shadow: none;
}

:is(.cb, body) .cb-btn--danger {
	--btn-bg: var(--cb-danger);
}

:is(.cb, body) .cb-btn--sm {
	min-height: 36px;
	padding: 0 16px;
	font-size: var(--cb-fs-s);
}

:is(.cb, body) .cb-btn--lg {
	min-height: 54px;
	padding: 0 34px;
	font-size: var(--cb-fs-m);
}

:is(.cb, body) .cb-btn--icon {
	width: var(--cb-control-h);
	padding: 0;
}

:is(.cb, body) .cb-btn--block {
	display: flex;
	width: 100%;
}

@keyframes cb-spin {
	to {
		transform: rotate(360deg);
	}
}

/* -------------------------------------------------------- Form controls */
.cb-form {
	display: grid;
	gap: var(--cb-s-s);
}

.cb-field {
	display: grid;
	gap: 6px;
	align-content: start;
}

.cb-label {
	font-size: var(--cb-fs-s);
	font-weight: 700;
	color: var(--cb-base);
}

.cb-label .req {
	color: var(--cb-secondary);
}

.cb-field__help {
	margin: 0;
	font-size: var(--cb-fs-s);
	color: var(--cb-muted);
}

.cb-field__error {
	margin: 0;
	font-size: var(--cb-fs-s);
	font-weight: 600;
	color: var(--cb-danger);
}

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

:is(.cb, body) .cb-input,
:is(.cb, body) .cb-select,
:is(.cb, body) .cb-textarea {
	width: 100%;
	min-height: var(--cb-control-h);
	padding: 10px 14px;
	font: inherit;
	font-size: var(--cb-fs-m);
	color: var(--cb-base);
	background: var(--cb-white);
	border: 1px solid var(--cb-line);
	border-radius: var(--cb-r-m);
	box-shadow: var(--cb-shadow-s);
	transition: border-color var(--cb-dur) var(--cb-ease), box-shadow var(--cb-dur) var(--cb-ease);
	-webkit-appearance: none;
	appearance: none;
}

:is(.cb, body) .cb-input::placeholder,
:is(.cb, body) .cb-textarea::placeholder {
	color: var(--cb-muted);
	opacity: 0.8;
}

:is(.cb, body) .cb-input:hover,
:is(.cb, body) .cb-select:hover,
:is(.cb, body) .cb-textarea:hover {
	border-color: var(--cb-muted);
}

:is(.cb, body) .cb-input:focus,
:is(.cb, body) .cb-select:focus,
:is(.cb, body) .cb-textarea:focus {
	outline: none;
	border-color: var(--cb-primary);
	box-shadow: 0 0 0 4px var(--cb-ring);
}

:is(.cb, body) .cb-textarea {
	min-height: 110px;
	resize: vertical;
	line-height: 1.5;
}

:is(.cb, body) .cb-select {
	padding-right: 40px;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2382726B' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 14px center;
}

.cb-input[type="number"] {
	-moz-appearance: textfield;
}

.cb-input-group {
	display: flex;
	gap: 8px;
}

.cb-input-group > .cb-input {
	flex: 1;
}

/* Checkbox / radio (custom, accessible: real inputs stay in the DOM) */
.cb-check,
.cb-radio {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	cursor: pointer;
	font-size: var(--cb-fs-m);
}

.cb-check label,
.cb-radio label {
	display: flex;
	gap: 10px;
	align-items: flex-start;
	cursor: pointer;
	width: 100%;
}

.cb-check input,
.cb-radio input {
	appearance: none;
	-webkit-appearance: none;
	flex: none;
	width: 22px;
	height: 22px;
	margin: 1px 0 0;
	border: 1.5px solid var(--cb-muted);
	border-radius: 7px;
	background: var(--cb-white);
	display: grid;
	place-content: center;
	cursor: pointer;
	transition: background var(--cb-dur) var(--cb-ease), border-color var(--cb-dur) var(--cb-ease);
}

.cb-radio input {
	border-radius: 50%;
}

.cb-check input:checked,
.cb-radio input:checked {
	background: var(--cb-primary);
	border-color: var(--cb-primary);
}

.cb-check input::after {
	content: "";
	width: 11px;
	height: 6px;
	border: solid #fff;
	border-width: 0 0 2.5px 2.5px;
	transform: translateY(-1px) rotate(-45deg) scale(0);
	transition: transform 0.15s var(--cb-ease);
}

.cb-check input:checked::after {
	transform: translateY(-1px) rotate(-45deg) scale(1);
}

.cb-radio input::after {
	content: "";
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: #fff;
	transform: scale(0);
	transition: transform 0.15s var(--cb-ease);
}

.cb-radio input:checked::after {
	transform: scale(1);
}

.cb-check input:focus-visible,
.cb-radio input:focus-visible {
	outline: 3px solid var(--cb-ring);
	outline-offset: 2px;
}

.cb-check--row label:has(input:checked) > span {
	color: var(--cb-muted);
	text-decoration: line-through;
}

/* Switch */
.cb-switch {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	cursor: pointer;
	font-size: var(--cb-fs-m);
}

.cb-switch input {
	position: absolute;
	opacity: 0;
	width: 0;
	height: 0;
}

.cb-switch__track {
	position: relative;
	flex: none;
	width: 46px;
	height: 26px;
	border-radius: var(--cb-r-pill);
	background: var(--cb-line);
	transition: background var(--cb-dur) var(--cb-ease);
}

.cb-switch__track::after {
	content: "";
	position: absolute;
	top: 3px;
	left: 3px;
	width: 20px;
	height: 20px;
	border-radius: 50%;
	background: #fff;
	box-shadow: var(--cb-shadow-s);
	transition: transform var(--cb-dur) var(--cb-ease);
}

.cb-switch input:checked + .cb-switch__track {
	background: var(--cb-primary);
}

.cb-switch input:checked + .cb-switch__track::after {
	transform: translateX(20px);
}

.cb-switch input:focus-visible + .cb-switch__track {
	outline: 3px solid var(--cb-ring);
	outline-offset: 2px;
}

/* Segmented control (two big options, e.g. In person / Virtual) */
.cb-segmented {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: var(--cb-s-xs);
}

.cb-segmented__opt {
	position: relative;
	display: block;
	cursor: pointer;
}

.cb-segmented__opt input {
	position: absolute;
	opacity: 0;
	inset: 0;
}

.cb-segmented__body {
	display: grid;
	gap: 4px;
	padding: var(--cb-s-s);
	border: 1.5px solid var(--cb-line);
	border-radius: var(--cb-r-l);
	background: var(--cb-white);
	transition: border-color var(--cb-dur) var(--cb-ease), background var(--cb-dur) var(--cb-ease), box-shadow var(--cb-dur) var(--cb-ease), transform var(--cb-dur) var(--cb-ease);
}

.cb-segmented__body strong {
	font-size: var(--cb-fs-l);
	line-height: 1.1;
}

.cb-segmented__body span {
	color: var(--cb-muted);
	font-size: var(--cb-fs-s);
}

.cb-segmented__opt:hover .cb-segmented__body {
	border-color: var(--cb-primary);
	transform: translateY(-2px);
}

.cb-segmented__opt input:checked + .cb-segmented__body {
	border-color: var(--cb-primary);
	background: var(--cb-accent);
	box-shadow: 0 0 0 3px var(--cb-ring);
}

.cb-segmented__opt input:focus-visible + .cb-segmented__body {
	outline: 3px solid var(--cb-ring);
	outline-offset: 2px;
}

/* ------------------------------------------------------------ Chips + badges */
.cb-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.cb-chip {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	min-height: 36px;
	padding: 0 16px;
	font: inherit;
	font-size: var(--cb-fs-s);
	font-weight: 600;
	color: var(--cb-base);
	background: var(--cb-white);
	border: 1px solid var(--cb-line);
	border-radius: var(--cb-r-pill);
	text-decoration: none;
	cursor: default;
	transition: background var(--cb-dur) var(--cb-ease), border-color var(--cb-dur) var(--cb-ease), color var(--cb-dur) var(--cb-ease);
}

button.cb-chip,
a.cb-chip,
.cb-chip--radio,
.cb-chip--check {
	cursor: pointer;
}

button.cb-chip:not(.is-selected):hover,
a.cb-chip:hover,
.cb-chip--radio:hover,
.cb-chip--check:hover {
	border-color: var(--cb-primary);
	background: var(--cb-accent);
}

.cb-chip--radio input,
.cb-chip--check input {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}

.cb-chip--radio,
.cb-chip--check {
	position: relative;
}

.cb-chip--radio:has(input:checked),
.cb-chip--check:has(input:checked),
.cb-chip.is-selected {
	background: var(--cb-primary);
	border-color: var(--cb-primary);
	color: #fff;
}

.cb-chip--radio:has(input:focus-visible),
.cb-chip--check:has(input:focus-visible) {
	outline: 3px solid var(--cb-ring);
	outline-offset: 2px;
}

.cb-chip--sage {
	background: var(--cb-success-soft);
	border-color: transparent;
	color: var(--cb-success);
}

.cb-badge {
	display: inline-flex;
	align-items: center;
	padding: 4px 12px;
	font-size: var(--cb-fs-s);
	font-weight: 700;
	line-height: 1.2;
	border-radius: var(--cb-r-pill);
	border: 1px solid transparent;
	white-space: nowrap;
}

.cb-badge--solid {
	background: var(--cb-base);
	color: #fff;
}

.cb-badge--rose {
	background: var(--cb-secondary-soft);
	color: color-mix(in srgb, var(--cb-secondary) 70%, #000);
}

.cb-badge--honey {
	background: var(--cb-primary-soft);
	color: var(--cb-primary);
}

.cb-badge--sage {
	background: var(--cb-success-soft);
	color: var(--cb-success);
}

.cb-badge--outline {
	background: transparent;
	border-color: var(--cb-line);
	color: var(--cb-base);
}

/* -------------------------------------------------------------------- Card */
.cb-card {
	display: flex;
	flex-direction: column;
	background: var(--cb-white);
	border: 1px solid var(--cb-line);
	border-radius: var(--cb-r-l);
	box-shadow: var(--cb-shadow-s);
	overflow: hidden;
	transition: box-shadow var(--cb-dur) var(--cb-ease), transform var(--cb-dur) var(--cb-ease), border-color var(--cb-dur) var(--cb-ease);
}

.cb-card__body {
	padding: var(--cb-s-s);
	flex: 1;
}

.cb-card__footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--cb-s-xs);
	padding: var(--cb-s-xs) var(--cb-s-s);
	border-top: 1px solid var(--cb-line);
}

.cb-card--pad {
	padding: var(--cb-s-m);
}

.anim-hover-lift:hover {
	transform: translateY(-4px);
	box-shadow: var(--cb-shadow-m);
}

/* ------------------------------------------------------------------ Alerts */
.cb-alert {
	padding: 14px 18px;
	border-radius: var(--cb-r-m);
	border: 1px solid var(--cb-line);
	background: var(--cb-accent);
	font-size: var(--cb-fs-s);
	line-height: 1.5;
}

.cb-alert--danger {
	background: var(--cb-danger-soft);
	border-color: color-mix(in srgb, var(--cb-danger) 30%, #fff);
	color: var(--cb-danger);
}

.cb-alert--success {
	background: var(--cb-success-soft);
	border-color: color-mix(in srgb, var(--cb-success) 30%, #fff);
	color: var(--cb-success);
}

.cb-alert--info {
	background: var(--cb-accent);
}

/* -------------------------------------------------------------------- Tabs */
.cb-tabs {
	display: flex;
	gap: 6px;
	border-bottom: 1px solid var(--cb-line);
	margin-bottom: var(--cb-s-m);
	overflow-x: auto;
	scrollbar-width: none;
}

.cb-tab {
	position: relative;
	padding: 12px 18px;
	font: inherit;
	font-weight: 700;
	color: var(--cb-muted);
	background: none;
	border: 0;
	cursor: pointer;
	white-space: nowrap;
}

.cb-tab::after {
	content: "";
	position: absolute;
	left: 12px;
	right: 12px;
	bottom: -1px;
	height: 3px;
	border-radius: 3px 3px 0 0;
	background: var(--cb-primary);
	transform: scaleX(0);
	transition: transform var(--cb-dur) var(--cb-ease);
}

.cb-tab:hover {
	color: var(--cb-base);
}

.cb-tab.is-active {
	color: var(--cb-base);
}

.cb-tab.is-active::after {
	transform: scaleX(1);
}

/* ------------------------------------------------------------------ Dialog */
.cb-dialog {
	width: min(560px, calc(100vw - 32px));
	max-height: calc(100vh - 48px);
	padding: 0;
	color: var(--cb-base);
	background: var(--cb-white);
	border: 0;
	border-radius: var(--cb-r-xl);
	box-shadow: var(--cb-shadow-l);
	overflow: auto;
}

.cb-dialog::backdrop {
	background: color-mix(in srgb, var(--cb-black) 45%, transparent);
	backdrop-filter: blur(3px);
}

.cb-dialog[open] {
	animation: cb-pop 0.35s var(--cb-ease);
}

.cb-dialog__head {
	padding: var(--cb-s-m) var(--cb-s-m) 0;
}

.cb-dialog__title {
	font-size: var(--cb-h4);
	margin-bottom: 6px;
}

.cb-dialog__body {
	padding: var(--cb-s-s) var(--cb-s-m);
}

.cb-dialog__foot {
	display: flex;
	justify-content: flex-end;
	flex-wrap: wrap;
	gap: 10px;
	padding: 0 var(--cb-s-m) var(--cb-s-m);
}

@keyframes cb-pop {
	from {
		opacity: 0;
		transform: translateY(12px) scale(0.97);
	}
}

/* ------------------------------------------------------------------- Table */
.cb-table-wrap {
	overflow-x: auto;
	border: 1px solid var(--cb-line);
	border-radius: var(--cb-r-l);
	background: var(--cb-white);
}

.cb-table {
	width: 100%;
	border-collapse: collapse;
	font-size: var(--cb-fs-s);
}

.cb-table th {
	text-align: left;
	padding: 12px 16px;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--cb-muted);
	background: var(--cb-accent);
	white-space: nowrap;
}

.cb-table td {
	padding: 12px 16px;
	border-top: 1px solid var(--cb-line);
	vertical-align: middle;
}

.cb-table tr:hover td {
	background: color-mix(in srgb, var(--cb-accent) 45%, #fff);
}

/* ------------------------------------------------------------ Avatar, flag */
.cb-avatar {
	display: inline-block;
	flex: none;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	object-fit: cover;
	background: var(--cb-accent);
	border: 2px solid var(--cb-white);
	box-shadow: 0 0 0 1px var(--cb-line);
}

.cb-avatar--sm {
	width: 28px;
	height: 28px;
	border-width: 1.5px;
}

.cb-avatar--lg {
	width: 72px;
	height: 72px;
}

.cb-avatar--xl {
	width: 96px;
	height: 96px;
	border-width: 3px;
}

.cb-avatar-edit {
	display: flex;
	align-items: center;
	gap: var(--cb-s-m);
	padding-bottom: var(--cb-s-s);
}

.cb-avatar-edit__text {
	display: grid;
	gap: 6px;
}

.cb-avatar-edit__text .cb-btn input {
	display: none;
}

.cb-avatar--blank {
	background: var(--cb-primary-soft);
}

.cb-avatar-stack {
	display: inline-flex;
}

.cb-avatar-stack .cb-avatar + .cb-avatar {
	margin-left: -10px;
}

.cb-flag.fi {
	width: 1.35em;
	height: 1em;
	border-radius: 3px;
	box-shadow: 0 0 0 1px rgba(58, 34, 23, 0.12);
	vertical-align: -0.12em;
}

/* ---------------------------------------------------------------- Progress */
.cb-progress {
	position: relative;
	height: 10px;
	border-radius: var(--cb-r-pill);
	background: var(--cb-accent);
	overflow: hidden;
}

.cb-progress > span {
	display: block;
	height: 100%;
	width: var(--cb-pct, 0%);
	border-radius: inherit;
	background: var(--cb-primary);
	transition: width 0.9s var(--cb-ease);
}

/* Braid variant: a twisted-rope fill that reads as a challah braid */
.cb-progress--braid {
	height: 14px;
	background: var(--cb-accent);
	box-shadow: inset 0 0 0 1px var(--cb-line);
}

.cb-progress--braid > span {
	width: var(--cb-pct, 0%);
	background:
		repeating-linear-gradient(115deg, rgba(255, 255, 255, 0.34) 0 5px, transparent 5px 12px),
		linear-gradient(90deg, var(--cb-primary), var(--cb-secondary));
	background-size: 24px 24px, 100% 100%;
	animation: cb-braid 1.4s linear infinite;
}

.cb-progress--lg {
	height: 20px;
}

@keyframes cb-braid {
	to {
		background-position: 24px 0, 0 0;
	}
}

.cb-divider {
	height: 1px;
	border: 0;
	background: var(--cb-line);
	margin: var(--cb-s-m) 0;
}

/* ---------------------------------------------------------------- Skeleton */
.cb-skeleton {
	border-radius: var(--cb-r-m);
	background: linear-gradient(100deg, var(--cb-accent) 30%, #fff 50%, var(--cb-accent) 70%);
	background-size: 300% 100%;
	animation: cb-shimmer 1.3s ease-in-out infinite;
}

.cb-skeleton--title {
	height: 34px;
	width: 55%;
	margin-bottom: var(--cb-s-s);
}

.cb-skeleton--block {
	height: 180px;
}

.cb-skeleton--card {
	height: 320px;
	border-radius: var(--cb-r-l);
}

@keyframes cb-shimmer {
	from {
		background-position: 100% 0;
	}
	to {
		background-position: 0 0;
	}
}

/* ------------------------------------------------------------- Empty state */
.cb-empty {
	display: grid;
	justify-items: center;
	gap: var(--cb-s-xs);
	text-align: center;
	padding: var(--cb-s-xl) var(--cb-s-m);
	border: 1.5px dashed var(--cb-line);
	border-radius: var(--cb-r-xl);
	background: color-mix(in srgb, var(--cb-accent) 40%, #fff);
}

.cb-empty__art {
	font-size: 44px;
}

.cb-empty__title {
	font-size: var(--cb-h4);
}

/* ------------------------------------------------------------------- Toast */
.cb-toasts {
	position: fixed;
	z-index: 100000;
	right: 16px;
	bottom: 16px;
	display: grid;
	gap: 10px;
	width: min(380px, calc(100vw - 32px));
}

.cb-toast {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	padding: 14px 16px;
	font-size: var(--cb-fs-s);
	font-weight: 600;
	color: var(--cb-base);
	background: var(--cb-white);
	border: 1px solid var(--cb-line);
	border-left: 4px solid var(--cb-primary);
	border-radius: var(--cb-r-m);
	box-shadow: var(--cb-shadow-m);
	animation: cb-toast-in 0.4s var(--cb-ease);
}

.cb-toast--success {
	border-left-color: var(--cb-success);
}

.cb-toast--error {
	border-left-color: var(--cb-danger);
}

.cb-toast.is-leaving {
	opacity: 0;
	transform: translateY(8px);
	transition: opacity 0.3s, transform 0.3s;
}

@keyframes cb-toast-in {
	from {
		opacity: 0;
		transform: translateY(12px);
	}
}

/* -------------------------------------------------------------- Stat tiles */
.cb-stats {
	display: grid;
	gap: var(--cb-s-m);
	grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
	text-align: center;
}

.cb-stat {
	display: grid;
	gap: 4px;
}

.cb-stat__num {
	font-size: var(--cb-display);
	font-weight: 700;
	line-height: 1;
	letter-spacing: -0.04em;
	color: var(--cb-primary);
	font-variant-numeric: tabular-nums;
}

.cb-stat__label {
	font-size: var(--cb-fs-s);
	font-weight: 600;
	color: var(--cb-muted);
}

/* ---------------------------------------------------------- Rating (stars) */
.cb-rating {
	display: inline-flex;
	align-items: center;
	gap: 2px;
}

.cb-star {
	font-size: 20px;
	line-height: 1;
	color: var(--cb-line);
}

.cb-star.is-full {
	color: var(--cb-primary);
}

.cb-star.is-half {
	background: linear-gradient(90deg, var(--cb-primary) 50%, var(--cb-line) 50%);
	-webkit-background-clip: text;
	background-clip: text;
	-webkit-text-fill-color: transparent;
}

.cb-rating--sm .cb-star {
	font-size: 15px;
}

.cb-rating__count {
	margin-left: 8px;
	font-size: var(--cb-fs-s);
	font-weight: 600;
	color: var(--cb-muted);
}

.cb-stars-input {
	display: inline-flex;
	flex-direction: row-reverse;
	justify-content: flex-end;
	gap: 4px;
}

.cb-stars-input input {
	position: absolute;
	opacity: 0;
}

.cb-stars-input label {
	font-size: 34px;
	line-height: 1;
	color: var(--cb-line);
	cursor: pointer;
	transition: color 0.15s, transform 0.15s var(--cb-ease);
}

.cb-stars-input label:hover,
.cb-stars-input label:hover ~ label,
.cb-stars-input input:checked ~ label {
	color: var(--cb-primary);
}

.cb-stars-input label:hover {
	transform: scale(1.12);
}

.cb-stars-input input:focus-visible + label {
	outline: 3px solid var(--cb-ring);
	border-radius: 6px;
}

/* ---------------------------------------------------------------- Dropzone */
.cb-dropzone {
	position: relative;
	display: grid;
	justify-items: center;
	gap: 6px;
	padding: var(--cb-s-m);
	text-align: center;
	color: var(--cb-muted);
	font-size: var(--cb-fs-s);
	border: 1.5px dashed var(--cb-muted);
	border-radius: var(--cb-r-l);
	background: color-mix(in srgb, var(--cb-accent) 35%, #fff);
	cursor: pointer;
	transition: border-color var(--cb-dur) var(--cb-ease), background var(--cb-dur) var(--cb-ease);
}

.cb-dropzone:hover,
.cb-dropzone.is-over {
	border-color: var(--cb-primary);
	background: var(--cb-accent);
}

.cb-dropzone input[type="file"] {
	position: absolute;
	inset: 0;
	opacity: 0;
	cursor: pointer;
}

.cb-dropzone strong {
	color: var(--cb-base);
	font-size: var(--cb-fs-m);
}

.cb-dropzone__preview {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 10px;
	border: 1px solid var(--cb-line);
	border-radius: var(--cb-r-m);
	background: var(--cb-white);
}

.cb-dropzone__preview img {
	width: 64px;
	height: 64px;
	border-radius: var(--cb-r-s);
	object-fit: cover;
}

.cb-dropzone__preview .grow {
	flex: 1;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

/* ----------------------------------------------------------------- Stepper */
.cb-stepper {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	counter-reset: step;
}

.cb-stepper__item {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 8px 14px 8px 8px;
	font-size: var(--cb-fs-s);
	font-weight: 700;
	color: var(--cb-muted);
	background: none;
	border: 0;
	border-radius: var(--cb-r-pill);
	cursor: pointer;
	counter-increment: step;
}

.cb-stepper__item::before {
	content: counter(step);
	display: grid;
	place-content: center;
	width: 28px;
	height: 28px;
	font-size: 13px;
	color: var(--cb-muted);
	background: var(--cb-white);
	border: 1.5px solid var(--cb-line);
	border-radius: 50%;
}

.cb-stepper__item.is-active {
	color: var(--cb-base);
	background: var(--cb-accent);
}

.cb-stepper__item.is-active::before {
	color: #fff;
	background: var(--cb-primary);
	border-color: var(--cb-primary);
}

.cb-stepper__item.is-done::before {
	content: "\2713";
	color: #fff;
	background: var(--cb-success);
	border-color: var(--cb-success);
}

/* Number +/- control */
.cb-stepper-input {
	display: inline-flex;
	gap: 6px;
	align-items: center;
}

.cb-stepper-input .cb-input {
	width: 72px;
	text-align: center;
}

@media (prefers-reduced-motion: reduce) {
	.cb-progress--braid > span,
	.cb-skeleton {
		animation: none;
	}
}

/* Two-option pill toggle (e.g. ben / bas) */
.cb-toggle {
	display: inline-grid;
	grid-auto-flow: column;
	gap: 4px;
	padding: 4px;
	border: 1px solid var(--cb-line);
	border-radius: var(--cb-r-pill);
	background: var(--cb-white);
}

.cb-toggle__opt {
	position: relative;
	cursor: pointer;
}

.cb-toggle__opt input {
	position: absolute;
	opacity: 0;
	inset: 0;
}

.cb-toggle__opt span {
	display: grid;
	place-items: center;
	min-width: 96px;
	padding: 8px 18px;
	font-weight: 700;
	line-height: 1.1;
	border-radius: var(--cb-r-pill);
	transition: background var(--cb-dur) var(--cb-ease), color var(--cb-dur) var(--cb-ease);
}

.cb-toggle__opt small {
	font-size: 11px;
	font-weight: 500;
	opacity: 0.75;
}

.cb-toggle__opt input:checked + span {
	color: #fff;
	background: var(--cb-primary);
}

.cb-toggle__opt input:focus-visible + span {
	outline: 3px solid var(--cb-ring);
	outline-offset: 2px;
}
