/*
 * Complaints plugin
 * Uses the b4 theme's color variables (automatic dark mode); falls back to defaults in other themes.
 */

.cpl,
.cpl-box-section {
	--cpl-open: #2f6fed;
	--cpl-unanswered: #e8590c;
	--cpl-resolved: #16a34a;
	--cpl-bg: var(--bg, #fff);
	--cpl-surface: var(--surface, #fff);
	--cpl-surface-2: var(--surface-2, #f3f4f6);
	--cpl-text: var(--text, #14161a);
	--cpl-text-soft: var(--text-soft, #3d424b);
	--cpl-muted: var(--muted, #6b7280);
	--cpl-border: var(--border, #e6e8ec);
	--cpl-accent: var(--accent, #e63946);
	--cpl-accent-soft: color-mix(in srgb, var(--cpl-accent) 14%, transparent);
	--cpl-radius: var(--radius, 16px);
	--cpl-shadow: var(--shadow, 0 1px 2px rgb(16 24 40 / 4%), 0 6px 20px rgb(16 24 40 / 6%));
	--cpl-dark: #12151c;
	color: var(--cpl-text);
}

.cpl *,
.cpl-box-section * {
	box-sizing: border-box;
}

.cpl-container {
	width: 100%;
	max-width: calc(var(--container, 1240px) + var(--gutter, 20px) * 2);
	margin-inline: auto;
	padding-inline: var(--gutter, 20px);
}

.cpl-narrow {
	max-width: calc(900px + var(--gutter, 20px) * 2);
}

.cpl .cpl-icon,
.cpl-box-section .cpl-icon {
	width: 20px;
	height: 20px;
	flex-shrink: 0;
}

.cpl .screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
}

/* ---------- Buttons ---------- */
.cpl-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 11px 22px;
	border: 1.5px solid transparent;
	border-radius: 12px;
	font: inherit;
	font-weight: 800;
	font-size: .95rem;
	line-height: 1.6;
	text-decoration: none;
	cursor: pointer;
	transition: filter .15s ease, transform .15s ease, background-color .2s ease, border-color .2s ease;
}

.cpl-btn:active {
	transform: scale(.97);
}

.cpl-btn--primary,
.cpl-btn--primary:hover,
.cpl-btn--primary:focus {
	background: var(--cpl-accent);
	color: #fff;
}

.cpl-btn--primary:hover {
	filter: brightness(1.08);
}

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

.cpl-btn--ghost:hover {
	border-color: var(--cpl-accent);
	color: var(--cpl-accent);
}

.cpl-btn--light,
.cpl-btn--light:hover {
	background: rgb(255 255 255 / 10%);
	border-color: rgb(255 255 255 / 25%);
	color: #fff;
}

.cpl-btn--light:hover {
	background: rgb(255 255 255 / 18%);
}

.cpl-btn--lg {
	padding: 13px 28px;
	font-size: 1.02rem;
}

.cpl-btn--sm {
	padding: 6px 14px;
	font-size: .85rem;
	border-radius: 10px;
}

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

/* ---------- Breadcrumb and notices ---------- */
.cpl-breadcrumb {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px;
	margin: 24px 0 18px;
	font-size: .85rem;
	color: var(--cpl-muted);
}

.cpl-breadcrumb a {
	color: inherit;
	text-decoration: none;
}

.cpl-breadcrumb a:hover {
	color: var(--cpl-accent);
}

.cpl-breadcrumb > span:last-child {
	overflow: hidden;
	max-width: 40ch;
	white-space: nowrap;
	text-overflow: ellipsis;
}

.cpl-notice {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	margin: 20px 0;
	padding: 14px 18px;
	border-radius: 12px;
	background: var(--cpl-surface-2);
	border: 1px solid var(--cpl-border);
	line-height: 1.9;
}

.cpl-notice .cpl-icon {
	margin-top: 4px;
}

.cpl-notice a {
	color: var(--cpl-accent);
	font-weight: 700;
}

.cpl-notice--success {
	background: color-mix(in srgb, var(--cpl-resolved) 12%, var(--cpl-surface));
	border-color: color-mix(in srgb, var(--cpl-resolved) 35%, transparent);
}

.cpl-notice--success .cpl-icon {
	color: var(--cpl-resolved);
}

.cpl-notice--error {
	background: color-mix(in srgb, var(--cpl-accent) 10%, var(--cpl-surface));
	border-color: color-mix(in srgb, var(--cpl-accent) 35%, transparent);
}

.cpl-notice--error .cpl-icon {
	color: var(--cpl-accent);
}

/* ==========================================================================
   Status colors
   ========================================================================== */
.cpl-is-open { --cpl-c: var(--cpl-open); }
.cpl-is-unanswered { --cpl-c: var(--cpl-unanswered); }
.cpl-is-resolved { --cpl-c: var(--cpl-resolved); }

/* ==========================================================================
   List page
   ========================================================================== */
.cpl-hero {
	padding: 4px 0 0;
	color: #fff;
	background:
		radial-gradient(ellipse 60% 90% at 0% 0%, color-mix(in srgb, var(--cpl-accent) 32%, transparent), transparent 70%),
		radial-gradient(ellipse 50% 80% at 100% 20%, rgb(139 92 246 / 28%), transparent 70%),
		var(--cpl-dark);
}

.cpl-hero .cpl-breadcrumb,
.cpl-hero .cpl-breadcrumb a {
	color: rgb(255 255 255 / 70%);
}

.cpl-hero .cpl-breadcrumb a:hover {
	color: #fff;
}

.cpl-hero-main {
	max-width: 720px;
	padding: 8px 0 8px;
}

.cpl-hero-title {
	margin: 0 0 12px;
	font-size: clamp(1.5rem, 1.1rem + 1.8vw, 2.4rem);
	line-height: 1.45;
	font-weight: 900;
	color: #fff;
}

.cpl-hero-lead {
	margin: 0 0 18px;
	font-size: 1.05rem;
	color: rgb(255 255 255 / 82%);
}

.cpl-checks {
	display: grid;
	gap: 10px;
	margin: 0 0 28px;
	padding: 0;
	list-style: none;
}

.cpl-checks li {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	color: rgb(255 255 255 / 88%);
	line-height: 1.8;
}

.cpl-checks .cpl-icon {
	width: 22px;
	height: 22px;
	padding: 3px;
	border-radius: 999px;
	background: var(--cpl-resolved);
	color: #fff;
	stroke-width: 3;
}

/* Tabs */
.cpl-tabs {
	display: grid;
	grid-auto-flow: column;
	grid-auto-columns: minmax(130px, 1fr);
	margin-top: 36px;
	overflow-x: auto;
	scrollbar-width: none;
}

.cpl-tab {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	padding: 22px 12px 16px;
	border: 1px solid rgb(255 255 255 / 10%);
	border-bottom: 0;
	background: rgb(255 255 255 / 6%);
	color: rgb(255 255 255 / 80%);
	font-weight: 800;
	text-decoration: none;
	transition: background-color .2s ease, color .2s ease;
}

.cpl-tab:first-child {
	border-start-start-radius: 14px;
}

.cpl-tab:last-child {
	border-start-end-radius: 14px;
}

.cpl-tab:hover {
	background: rgb(255 255 255 / 12%);
	color: #fff;
}

.cpl-tab .cpl-icon {
	width: 28px;
	height: 28px;
}

.cpl-tab.is-active,
.cpl-tab.is-active:hover {
	background: var(--cpl-bg);
	border-color: var(--cpl-bg);
	color: var(--cpl-text);
}

.cpl-tab.is-active .cpl-icon {
	color: var(--cpl-accent);
}

.cpl-tab--open.is-active .cpl-icon { color: var(--cpl-open); }
.cpl-tab--unanswered.is-active .cpl-icon { color: var(--cpl-unanswered); }
.cpl-tab--resolved.is-active .cpl-icon { color: var(--cpl-resolved); }

.cpl-tab-count {
	position: absolute;
	top: 8px;
	inset-inline-end: 12px;
	font-size: .85rem;
	opacity: .85;
}

.cpl-tab-label {
	font-size: .98rem;
}

/* Search */
.cpl-search {
	position: relative;
	display: flex;
	gap: 8px;
	margin: 28px 0 8px;
}

.cpl-search > .cpl-icon {
	position: absolute;
	top: 50%;
	inset-inline-start: 18px;
	margin-top: -10px;
	color: var(--cpl-muted);
}

.cpl-search input {
	flex: 1;
	min-width: 0;
	height: 54px;
	padding-inline: 50px 18px;
	border: 1px solid var(--cpl-border);
	border-radius: 14px;
	background: var(--cpl-surface);
	color: var(--cpl-text);
	font: inherit;
	outline: 0;
	transition: border-color .2s ease, box-shadow .2s ease;
}

.cpl-search input:focus {
	border-color: var(--cpl-accent);
	box-shadow: 0 0 0 4px var(--cpl-accent-soft);
}

.cpl-search .cpl-btn {
	border-radius: 14px;
	padding-inline: 26px;
}

.cpl-result-info {
	margin: 14px 0 0;
	font-size: .9rem;
	color: var(--cpl-muted);
}

.cpl-result-info a {
	margin-inline-start: 8px;
	color: var(--cpl-accent);
	font-weight: 700;
}

/* ==========================================================================
   Complaint card (list and single page header)
   ========================================================================== */
.cpl-list {
	display: grid;
	gap: 16px;
	margin: 20px 0 8px;
}

.cpl-item {
	position: relative;
	display: grid;
	grid-template-columns: minmax(200px, 240px) minmax(0, 1fr);
	background: var(--cpl-surface);
	border: 1px solid var(--cpl-border);
	border-radius: var(--cpl-radius);
	overflow: hidden;
	transition: box-shadow .2s ease, border-color .2s ease;
}

.cpl-list .cpl-item:hover {
	border-color: transparent;
	box-shadow: var(--cpl-shadow);
}

.cpl-status {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 2px;
	padding: 22px 16px;
	background: var(--cpl-c);
	color: #fff;
	text-align: center;
}

.cpl-status-icon .cpl-icon {
	width: 40px;
	height: 40px;
	margin-bottom: 6px;
}

.cpl-status-kicker {
	font-size: .82rem;
	opacity: .85;
}

.cpl-status-title {
	font-size: 1.08rem;
	font-weight: 900;
	line-height: 1.6;
}

.cpl-status-time {
	font-size: .85rem;
	opacity: .92;
}

.cpl-item-body {
	display: flex;
	flex-direction: column;
	gap: 12px;
	min-width: 0;
	padding: 20px 24px;
}

.cpl-item-title,
.cpl-single-title {
	margin: 0;
	font-size: 1.15rem;
	line-height: 1.7;
	font-weight: 900;
	color: var(--cpl-text);
}

.cpl-single-title {
	font-size: clamp(1.3rem, 1.05rem + 1vw, 1.8rem);
	line-height: 1.55;
}

.cpl-item-title a {
	color: inherit;
	text-decoration: none;
}

.cpl-item:hover .cpl-item-title a {
	color: var(--cpl-accent);
}

.cpl-stretched::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
}

.cpl-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px 14px;
	font-size: .85rem;
	color: var(--cpl-muted);
}

.cpl-meta > span {
	display: inline-flex;
	align-items: center;
	gap: 5px;
}

.cpl-meta .cpl-icon {
	width: 16px;
	height: 16px;
}

.cpl-badge {
	padding: 1px 12px;
	border-radius: 6px;
	background: var(--cpl-c);
	color: #fff;
	font-weight: 800;
	font-size: .8rem;
	line-height: 1.9;
}

.cpl-chip {
	padding: 1px 10px;
	border-radius: 6px;
	background: var(--cpl-surface-2);
	color: var(--cpl-text-soft);
	font-weight: 700;
	font-size: .8rem;
	line-height: 1.9;
}

.cpl-site {
	position: relative;
	z-index: 2;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px;
	padding-top: 14px;
	border-top: 1px solid var(--cpl-border);
}

.cpl-site-thumb {
	display: block;
	flex-shrink: 0;
	width: 72px;
	height: 48px;
	border-radius: 10px;
	overflow: hidden;
	background: var(--cpl-surface-2);
}

.cpl-site-thumb img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.cpl-site-text {
	display: flex;
	flex-direction: column;
	min-width: 0;
	line-height: 1.6;
}

.cpl-site-label {
	font-size: .78rem;
	color: var(--cpl-muted);
}

.cpl-site-name {
	font-weight: 800;
	color: var(--cpl-text);
	text-decoration: none;
}

.cpl-site-name:hover {
	color: var(--cpl-accent);
}

.cpl-site-more {
	margin-inline-start: auto;
	font-size: .85rem;
	font-weight: 700;
	color: var(--cpl-accent);
	text-decoration: none;
}

@media (max-width: 700px) {
	.cpl-item {
		grid-template-columns: 1fr;
	}

	.cpl-status {
		display: grid;
		grid-template-columns: auto 1fr;
		grid-template-areas: "icon title" "icon time";
		justify-items: start;
		column-gap: 12px;
		padding: 12px 16px;
		text-align: start;
	}

	.cpl-status-icon {
		grid-area: icon;
	}

	.cpl-status-icon .cpl-icon {
		width: 30px;
		height: 30px;
		margin: 0;
	}

	.cpl-status-kicker {
		display: none;
	}

	.cpl-status-title {
		grid-area: title;
		font-size: .98rem;
	}

	.cpl-status-time {
		grid-area: time;
		font-size: .8rem;
	}

	.cpl-item-body {
		padding: 16px 18px;
	}

	.cpl-item-title {
		font-size: 1.02rem;
	}

	.cpl-search .cpl-btn {
		display: none;
	}
}

.cpl-empty {
	padding: 56px 20px;
	text-align: center;
	color: var(--cpl-muted);
}

.cpl-empty .cpl-icon {
	width: 44px;
	height: 44px;
	opacity: .5;
}

/* Pagination for themes that don't style it */
.cpl .pagination {
	margin-top: 36px;
}

/* ==========================================================================
   Single complaint page
   ========================================================================== */
.cpl-single-page {
	padding-bottom: 32px;
}

.cpl-single-head .cpl-status {
	padding-block: 28px;
}

.cpl-section {
	margin-top: 28px;
	padding: 24px 28px;
	border: 1px solid var(--cpl-border);
	border-radius: var(--cpl-radius);
	background: var(--cpl-surface);
}

.cpl-section-title {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0 0 14px;
	font-size: 1.1rem;
	font-weight: 900;
	color: var(--cpl-text);
}

.cpl-section-title::before {
	content: "";
	width: 5px;
	height: 1.1em;
	border-radius: 4px;
	background: var(--cpl-accent);
}

.cpl-content {
	font-size: 1.02rem;
	line-height: 2.05;
	color: var(--cpl-text-soft);
	overflow-wrap: anywhere;
}

.cpl-content p:last-child {
	margin-bottom: 0;
}

.cpl-doc-links {
	display: grid;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.cpl-doc-links a {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 10px 14px;
	border-radius: 10px;
	background: var(--cpl-surface-2);
	color: var(--cpl-text);
	text-decoration: none;
	font-size: .9rem;
	transition: color .2s ease;
}

.cpl-doc-links a span {
	flex: 1;
	min-width: 0;
	overflow: hidden;
	white-space: nowrap;
	text-overflow: ellipsis;
	text-align: left;
}

.cpl-doc-links a:hover {
	color: var(--cpl-accent);
}

.cpl-doc-links .cpl-icon {
	width: 17px;
	height: 17px;
	color: var(--cpl-muted);
}

/* ==========================================================================
   Complaint form
   ========================================================================== */
.cpl-new-page {
	padding-bottom: 40px;
}

.cpl-page-head h1 {
	margin: 0 0 6px;
	font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem);
	font-weight: 900;
	color: var(--cpl-text);
}

.cpl-page-head p {
	margin: 0;
	color: var(--cpl-muted);
}

.cpl-steps {
	display: none;
	counter-reset: none;
	margin: 26px 0 0;
	padding: 0;
	list-style: none;
}

.cpl-steps.is-visible {
	display: flex;
}

.cpl-steps li {
	display: flex;
	flex: 1;
	align-items: center;
	gap: 8px;
	padding-bottom: 12px;
	border-bottom: 3px solid var(--cpl-border);
	font-size: .9rem;
	font-weight: 700;
	color: var(--cpl-muted);
	transition: border-color .3s ease, color .3s ease;
}

.cpl-steps li span {
	display: grid;
	place-items: center;
	width: 28px;
	height: 28px;
	border-radius: 999px;
	background: var(--cpl-surface-2);
	font-size: .85rem;
	transition: background-color .3s ease, color .3s ease;
}

.cpl-steps li.is-active,
.cpl-steps li.is-done {
	border-color: var(--cpl-accent);
	color: var(--cpl-text);
}

.cpl-steps li.is-active span,
.cpl-steps li.is-done span {
	background: var(--cpl-accent);
	color: #fff;
}

.cpl-form {
	margin-top: 24px;
}

.cpl-step {
	min-width: 0;
	margin: 0 0 28px;
	padding: 0;
	border: 0;
}

.cpl-form.is-js .cpl-step {
	animation: cpl-fade .25s ease;
}

.cpl-step-title {
	margin-bottom: 6px;
	padding: 0;
	font-size: 1.25rem;
	font-weight: 900;
	color: var(--cpl-text);
}

.cpl-hint {
	margin: 0 0 14px;
	font-size: .88rem;
	color: var(--cpl-muted);
	line-height: 1.9;
}

.cpl-step-nav {
	display: none;
	justify-content: space-between;
	gap: 10px;
	margin-top: 22px;
}

.cpl-step-nav > :only-child {
	margin-inline-start: auto;
}

.cpl-form.is-js .cpl-step-nav,
.cpl-step[data-step="2"] .cpl-step-nav {
	display: flex;
}

.cpl-form:not(.is-js) [data-cpl-prev] {
	display: none;
}

/* Site picker */
.cpl-picker {
	position: relative;
}

.cpl-picker-field {
	position: relative;
}

.cpl-picker-field > .cpl-icon {
	position: absolute;
	top: 50%;
	inset-inline-start: 16px;
	margin-top: -10px;
	color: var(--cpl-muted);
	pointer-events: none;
}

.cpl-picker-input {
	width: 100%;
	height: 56px;
	padding-inline: 48px 16px;
	font-size: 1.02rem;
}

.cpl-picker.is-loading .cpl-picker-field > .cpl-icon {
	animation: cpl-pulse 1s ease infinite;
}

.cpl-suggest {
	position: absolute;
	top: calc(100% + 6px);
	inset-inline: 0;
	z-index: 20;
	max-height: 340px;
	margin: 0;
	padding: 6px;
	overflow-y: auto;
	list-style: none;
	background: var(--cpl-surface);
	border: 1px solid var(--cpl-border);
	border-radius: 14px;
	box-shadow: 0 16px 48px rgb(16 24 40 / 18%);
}

.cpl-suggest li {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 8px 10px;
	border-radius: 10px;
	cursor: pointer;
	font-weight: 700;
}

.cpl-suggest li[aria-selected="true"],
.cpl-suggest li:hover {
	background: var(--cpl-surface-2);
	color: var(--cpl-accent);
}

.cpl-suggest img,
.cpl-suggest .cpl-suggest-ph {
	flex-shrink: 0;
	width: 52px;
	height: 36px;
	border-radius: 8px;
	object-fit: cover;
	background: var(--cpl-surface-2);
}

.cpl-suggest .cpl-suggest-empty {
	cursor: default;
	font-weight: 500;
	color: var(--cpl-muted);
	background: none;
}

.cpl-picked {
	display: none;
	align-items: center;
	gap: 14px;
	padding: 12px 14px;
	border: 1.5px solid var(--cpl-accent);
	border-radius: 14px;
	background: var(--cpl-accent-soft);
}

.cpl-picker.is-picked .cpl-picked {
	display: flex;
}

.cpl-picker.is-picked .cpl-picker-field {
	display: none;
}

.cpl-picked-thumb {
	flex-shrink: 0;
	width: 64px;
	height: 44px;
	border-radius: 10px;
	overflow: hidden;
	background: var(--cpl-surface-2);
}

.cpl-picked-thumb img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.cpl-picked-text {
	display: flex;
	flex: 1;
	flex-direction: column;
	min-width: 0;
	line-height: 1.6;
}

.cpl-picked-text small {
	font-size: .78rem;
	color: var(--cpl-muted);
}

.cpl-picked-title {
	font-weight: 900;
	color: var(--cpl-text);
}

/* Topics */
.cpl-types {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
	gap: 12px;
}

.cpl-type {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 2px;
	padding: 18px;
	border: 1.5px solid var(--cpl-border);
	border-radius: 14px;
	background: var(--cpl-surface);
	cursor: pointer;
	transition: border-color .2s ease, box-shadow .2s ease, transform .15s ease;
}

.cpl-type:hover {
	border-color: color-mix(in srgb, var(--cpl-accent) 50%, var(--cpl-border));
	box-shadow: var(--cpl-shadow);
}

.cpl-type input {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}

.cpl-type:has(input:checked) {
	border-color: var(--cpl-accent);
	background: var(--cpl-accent-soft);
}

.cpl-type:has(input:focus-visible) {
	outline: 2px solid var(--cpl-accent);
	outline-offset: 2px;
}

.cpl-type-head {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	margin-bottom: 12px;
}

.cpl-type-icon .cpl-icon {
	width: 38px;
	height: 38px;
	color: var(--cpl-resolved);
}

.cpl-type-arrow .cpl-icon {
	width: 18px;
	height: 18px;
	color: var(--cpl-muted);
}

html:not([dir="rtl"]) .cpl-type-arrow .cpl-icon {
	transform: scaleX(-1);
}

.cpl-type-kicker {
	font-size: .72rem;
	font-weight: 800;
	color: var(--cpl-muted);
}

.cpl-type-label {
	font-size: 1.15rem;
	font-weight: 900;
	color: var(--cpl-text);
}

.cpl-type-desc {
	margin-top: 4px;
	font-size: .84rem;
	line-height: 1.85;
	color: var(--cpl-muted);
}

/* Fields */
.cpl-summary {
	margin: 0 0 18px;
	padding: 10px 14px;
	border-radius: 10px;
	background: var(--cpl-surface-2);
	font-size: .9rem;
	color: var(--cpl-text-soft);
}

.cpl-summary strong {
	color: var(--cpl-text);
}

.cpl-field {
	position: relative;
	margin-bottom: 18px;
}

.cpl-field > label,
.cpl-label {
	display: block;
	margin-bottom: 6px;
	font-size: .92rem;
	font-weight: 800;
	color: var(--cpl-text);
}

.cpl-field small,
.cpl-label small {
	font-weight: 500;
	color: var(--cpl-muted);
}

.cpl-field-row {
	display: grid;
	gap: 0 16px;
}

@media (min-width: 640px) {
	.cpl-field-row {
		grid-template-columns: 1fr 1fr;
	}
}

.cpl-form input[type="text"],
.cpl-form input[type="email"],
.cpl-form input[type="url"],
.cpl-form textarea {
	width: 100%;
	padding: 12px 16px;
	border: 1px solid var(--cpl-border);
	border-radius: 12px;
	background: var(--cpl-surface);
	color: var(--cpl-text);
	font: inherit;
	outline: 0;
	transition: border-color .2s ease, box-shadow .2s ease;
}

.cpl-form input.cpl-picker-input {
	height: 56px;
	padding-inline: 48px 16px;
	font-size: 1.02rem;
}

.cpl-form textarea {
	min-height: 180px;
	resize: vertical;
	line-height: 1.9;
}

.cpl-form input:focus,
.cpl-form textarea:focus {
	border-color: var(--cpl-accent);
	box-shadow: 0 0 0 4px var(--cpl-accent-soft);
}

.cpl-form [aria-invalid="true"] {
	border-color: var(--cpl-accent);
}

.cpl-counter {
	display: block;
	margin-top: 4px;
	font-size: .78rem;
	color: var(--cpl-muted);
	text-align: end;
}

.cpl-counter.is-short {
	color: var(--cpl-unanswered);
}

.cpl-error {
	margin: 6px 0 0;
	font-size: .85rem;
	font-weight: 700;
	color: var(--cpl-accent);
}

.cpl-link-rows {
	display: grid;
	gap: 8px;
	margin-bottom: 10px;
}

.cpl-link-row {
	position: relative;
	display: flex;
	align-items: center;
	gap: 8px;
}

.cpl-form .cpl-link-row input {
	flex: 1;
}

.cpl-link-remove {
	display: grid;
	place-items: center;
	flex-shrink: 0;
	width: 40px;
	height: 40px;
	padding: 0;
	border: 0;
	border-radius: 10px;
	background: transparent;
	color: var(--cpl-muted);
	cursor: pointer;
}

.cpl-link-remove:hover {
	background: var(--cpl-surface-2);
	color: var(--cpl-accent);
}

.cpl-form:not(.is-js) .cpl-link-remove,
.cpl-form:not(.is-js) .cpl-add-link {
	display: none;
}

.cpl-agree {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	margin-top: 6px;
	font-size: .9rem;
	line-height: 1.9;
	color: var(--cpl-text-soft);
	cursor: pointer;
}

.cpl-agree input {
	margin-top: 7px;
	accent-color: var(--cpl-accent);
}

.cpl-hp {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
}

.cpl-login {
	margin-top: 28px;
	padding: 36px 24px;
	border: 1px solid var(--cpl-border);
	border-radius: var(--cpl-radius);
	background: var(--cpl-surface);
	text-align: center;
}

.cpl-login > .cpl-icon {
	width: 40px;
	height: 40px;
	color: var(--cpl-accent);
}

.cpl-login-actions {
	display: flex;
	justify-content: center;
	gap: 10px;
}

/* ==========================================================================
   Home page box
   ========================================================================== */
.cpl-box-section {
	margin-top: 32px;
}

.cpl-box {
	position: relative;
	display: grid;
	gap: 28px;
	padding: 28px 24px;
	border-radius: var(--cpl-radius);
	overflow: hidden;
	color: #fff;
	background:
		radial-gradient(ellipse 60% 120% at 0% 0%, color-mix(in srgb, var(--cpl-accent) 38%, transparent), transparent 70%),
		radial-gradient(ellipse 50% 100% at 100% 100%, rgb(139 92 246 / 30%), transparent 70%),
		var(--cpl-dark);
}

@media (min-width: 900px) {
	.cpl-box {
		grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
		align-items: center;
		gap: 40px;
		padding: 40px 44px;
	}
}

.cpl-box-kicker {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 4px 12px;
	border-radius: 999px;
	background: rgb(255 255 255 / 10%);
	font-size: .82rem;
	font-weight: 800;
	color: rgb(255 255 255 / 90%);
}

.cpl-box-kicker .cpl-icon {
	width: 17px;
	height: 17px;
}

.cpl-box-title {
	margin: 14px 0 10px;
	font-size: clamp(1.35rem, 1.05rem + 1.2vw, 1.9rem);
	line-height: 1.5;
	font-weight: 900;
	color: #fff;
}

.cpl-box-text {
	margin: 0 0 22px;
	line-height: 2;
	color: rgb(255 255 255 / 76%);
}

.cpl-box-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.cpl-box-stats {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 12px;
}

.cpl-stat {
	display: flex;
	flex-direction: column;
	gap: 2px;
	padding: 16px 18px;
	border: 1px solid rgb(255 255 255 / 10%);
	border-radius: 14px;
	background: rgb(255 255 255 / 6%);
	color: #fff;
	text-decoration: none;
	transition: background-color .2s ease, transform .2s ease;
}

.cpl-stat:hover {
	background: rgb(255 255 255 / 12%);
	color: #fff;
	transform: translateY(-2px);
}

.cpl-stat-num {
	font-size: clamp(1.4rem, 1.1rem + 1vw, 1.9rem);
	font-weight: 900;
	line-height: 1.5;
}

.cpl-stat-label {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-size: .88rem;
	color: rgb(255 255 255 / 75%);
}

.cpl-stat-label::before {
	content: "";
	width: 8px;
	height: 8px;
	border-radius: 999px;
	background: #fff;
}

.cpl-stat--open .cpl-stat-label::before { background: #6c9cff; }
.cpl-stat--unanswered .cpl-stat-label::before { background: #ff8c42; }
.cpl-stat--resolved .cpl-stat-label::before { background: #4ade80; }

/* ---------- Animation ---------- */
@keyframes cpl-fade {
	from { opacity: 0; transform: translateY(6px); }
	to { opacity: 1; transform: none; }
}

@keyframes cpl-pulse {
	50% { opacity: .3; }
}

@media (prefers-reduced-motion: reduce) {
	.cpl *,
	.cpl-box-section * {
		animation: none !important;
		transition: none !important;
	}
}
