/**
 * DevHub — Component Decisions gallery
 * Consolidation surface for tf_comp_decision CPT rows.
 * Matches DevHub dark chrome (camcom-v2/css/devhub.css tokens).
 *
 * Two view modes:
 *   INDEX  — grid of family cards
 *   DETAIL — one family's variants as screenshot tiles
 */

.tf-cd {
	max-width: var(--dh-content-width, 1400px);
	margin: 0 auto;
	padding: 0 var(--dh-gutter, 32px) 64px;
	color: var(--dh-text, #e0e0e0);
}

/* ── Stats bar (header meta) ─────────────────────────────────────── */

.tf-cd__stats {
	display: flex;
	gap: 24px;
	margin-top: 16px;
	font-size: 13px;
	color: var(--dh-text-muted, #888);
}

.tf-cd__stats strong {
	color: var(--dh-text, #e0e0e0);
	font-weight: 600;
	margin-right: 6px;
}

.tf-cd__stats-project {
	color: var(--dh-accent, #68de7c);
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	font-size: 11px;
}

.tf-cd__status-inline {
	display: inline-block;
	padding: 2px 10px;
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	border-radius: var(--dh-radius-pill, 100px);
}

.tf-cd__status-inline--decided {
	background: rgba(104, 222, 124, 0.14);
	color: var(--dh-accent, #68de7c);
}

.tf-cd__status-inline--undecided {
	background: rgba(217, 161, 58, 0.14);
	color: #d9a13a;
}

.tf-cd__status-inline--locked {
	background: rgba(255, 255, 255, 0.06);
	color: var(--dh-text-muted, #888);
}

/* ── Detail-mode toolbar ─────────────────────────────────────────── */

.tf-cd__detail-toolbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	margin: 24px 0;
	padding-bottom: 16px;
	border-bottom: 1px solid var(--dh-border, #2a2d31);
}

/* ── Tabs (index mode) ───────────────────────────────────────────── */

.tf-cd__tabs {
	display: flex;
	gap: 2px;
	margin: 24px 0 24px;
	border-bottom: 1px solid var(--dh-border, #2a2d31);
}

.tf-cd__tab {
	padding: 12px 20px;
	text-decoration: none;
	color: var(--dh-text-muted, #888);
	font-weight: 500;
	font-size: 14px;
	border-bottom: 2px solid transparent;
	margin-bottom: -1px;
	transition: color 0.15s, border-color 0.15s;
}

.tf-cd__tab:hover {
	color: var(--dh-text, #e0e0e0);
}

.tf-cd__tab.is-active {
	color: var(--dh-accent, #68de7c);
	border-bottom-color: var(--dh-accent, #68de7c);
}

.tf-cd__panel {
	display: none;
}

.tf-cd__panel.is-active {
	display: block;
}

.tf-cd__empty {
	padding: 32px;
	text-align: center;
	color: var(--dh-text-muted, #888);
	background: var(--dh-surface, #1a1d21);
	border: 1px dashed var(--dh-border, #2a2d31);
	border-radius: var(--dh-radius-sm, 8px);
}

.tf-cd__hint {
	padding: 16px 20px;
	background: var(--dh-surface, #1a1d21);
	border-left: 3px solid var(--dh-accent, #68de7c);
	border-radius: var(--dh-radius-sm, 8px);
	margin-bottom: 24px;
	color: var(--dh-text-muted, #888);
	font-size: 13px;
	line-height: 1.6;
}

/* ── Family grid (index mode) ────────────────────────────────────── */

.tf-cd__family-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: 12px;
}

.tf-cd__family-card {
	display: block;
	background: var(--dh-surface, #1a1d21);
	border: 1px solid var(--dh-border, #2a2d31);
	border-radius: var(--dh-radius, 14px);
	padding: 20px;
	text-decoration: none;
	color: var(--dh-text, #e0e0e0);
	transition: background 0.15s, border-color 0.15s, transform 0.1s;
	position: relative;
}

.tf-cd__family-card:hover {
	background: var(--dh-surface-hover, #22262b);
	border-color: var(--dh-text-faint, #555);
	transform: translateY(-1px);
}

.tf-cd__family-card--decided {
	border-left: 3px solid var(--dh-accent, #68de7c);
}

.tf-cd__family-card--locked {
	border-left: 3px solid var(--dh-text-faint, #555);
	opacity: 0.75;
}

.tf-cd__family-card--undecided {
	border-left: 3px solid #d9a13a;
}

.tf-cd__family-card-header {
	display: flex;
	flex-direction: column;
	gap: 4px;
	margin-bottom: 16px;
}

.tf-cd__family-card-title {
	margin: 0;
	font-size: 15px;
	font-weight: 600;
	color: var(--dh-text, #e0e0e0);
	line-height: 1.3;
}

.tf-cd__family-card-slug {
	font-family: SFMono-Regular, Consolas, monospace;
	font-size: 11px;
	color: var(--dh-text-muted, #888);
}

.tf-cd__family-card-meta {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
}

.tf-cd__family-card-count {
	font-size: 12px;
	color: var(--dh-text-muted, #888);
}

.tf-cd__family-status {
	font-size: 10px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	padding: 4px 10px;
	border-radius: var(--dh-radius-pill, 100px);
}

.tf-cd__family-status--decided {
	background: rgba(104, 222, 124, 0.14);
	color: var(--dh-accent, #68de7c);
}

.tf-cd__family-status--undecided {
	background: rgba(217, 161, 58, 0.14);
	color: #d9a13a;
}

.tf-cd__family-status--locked {
	background: rgba(255, 255, 255, 0.06);
	color: var(--dh-text-muted, #888);
}

.tf-cd__family-card-flag {
	position: absolute;
	top: 12px;
	right: 12px;
	font-size: 11px;
	color: #d9a13a;
}

/* ── Variant grid (detail mode) ──────────────────────────────────── */

.tf-cd__variant-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(460px, 1fr));
	gap: 20px;
}

.tf-cd__variant {
	background: var(--dh-surface, #1a1d21);
	border: 1px solid var(--dh-border, #2a2d31);
	border-radius: var(--dh-radius, 14px);
	overflow: hidden;
	transition: border-color 0.15s, transform 0.1s;
}

.tf-cd__variant:hover {
	transform: translateY(-1px);
}

.tf-cd__variant.is-winner {
	border-color: var(--dh-accent, #68de7c);
	box-shadow: 0 0 0 1px var(--dh-accent, #68de7c);
}

.tf-cd__variant-shot {
	position: relative;
	background: #0a0c10;
	aspect-ratio: 4 / 3;
	overflow: hidden;
}

.tf-cd__variant-shot img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
	object-position: center;
}

/* Whole-shot clickable region → lightbox trigger. */
.tf-cd__shot-link {
	display: block;
	position: absolute;
	inset: 0;
	cursor: zoom-in;
}

.tf-cd__expand-icon {
	position: absolute;
	top: 10px;
	right: 10px;
	width: 34px;
	height: 34px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(15, 17, 20, 0.78);
	color: #f0f0f0;
	border: 1px solid rgba(255, 255, 255, 0.18);
	border-radius: var(--dh-radius-sm, 8px);
	font-size: 15px;
	line-height: 1;
	opacity: 0;
	transform: translateY(-2px);
	transition: opacity 0.15s, transform 0.15s;
	z-index: 1;
}

.tf-cd__variant-shot:hover .tf-cd__expand-icon,
.tf-cd__shot-link:focus-visible .tf-cd__expand-icon {
	opacity: 1;
	transform: translateY(0);
}

.tf-cd__variant-placeholder {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 12px;
	background: repeating-linear-gradient(
		45deg,
		rgba(255, 255, 255, 0.02),
		rgba(255, 255, 255, 0.02) 8px,
		rgba(255, 255, 255, 0.04) 8px,
		rgba(255, 255, 255, 0.04) 16px
	);
	color: var(--dh-text-muted, #888);
	font-size: 13px;
}

.tf-cd__placeholder-badge {
	padding: 6px 14px;
	background: rgba(0, 0, 0, 0.6);
	border-radius: var(--dh-radius-pill, 100px);
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.08em;
}

.tf-cd__placeholder-openraw {
	color: var(--dh-text-muted, #888);
	text-decoration: none;
	font-size: 12px;
	padding: 4px 12px;
}

.tf-cd__placeholder-openraw:hover {
	color: var(--dh-text, #e0e0e0);
}

/* ── Pick overlay button ─────────────────────────────────────────── */

.tf-cd__pick-overlay {
	position: absolute;
	bottom: 12px;
	right: 12px;
	padding: 8px 16px;
	background: var(--dh-accent, #68de7c);
	color: #0f1114;
	border: 0;
	border-radius: var(--dh-radius-sm, 8px);
	font-size: 12px;
	font-weight: 700;
	cursor: pointer;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
	transition: opacity 0.15s, transform 0.1s;
	z-index: 2;
}

.tf-cd__pick-overlay:hover {
	transform: translateY(-1px);
	opacity: 0.92;
}

.tf-cd__pick-overlay.is-winner {
	background: rgba(15, 17, 20, 0.85);
	color: var(--dh-accent, #68de7c);
	border: 1px solid var(--dh-accent, #68de7c);
}

.tf-cd__pick-overlay.is-winner:hover {
	background: rgba(217, 65, 65, 0.14);
	color: #ff8080;
	border-color: #ff8080;
}

/* ── Dismiss overlay button ──────────────────────────────────────── */

.tf-cd__dismiss-overlay {
	position: absolute;
	bottom: 12px;
	left: 12px;
	padding: 8px 14px;
	background: rgba(15, 17, 20, 0.72);
	color: var(--dh-text-muted, #a0a0a0);
	border: 1px solid rgba(255, 255, 255, 0.16);
	border-radius: var(--dh-radius-sm, 8px);
	font-size: 12px;
	font-weight: 600;
	cursor: pointer;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
	transition: background 0.15s, color 0.15s, transform 0.1s;
	z-index: 2;
}

.tf-cd__dismiss-overlay:hover {
	background: rgba(217, 65, 65, 0.18);
	color: #ff8080;
	border-color: rgba(255, 128, 128, 0.5);
	transform: translateY(-1px);
}

.tf-cd__dismiss-overlay.is-dismissed {
	background: rgba(104, 222, 124, 0.14);
	color: var(--dh-accent, #68de7c);
	border-color: rgba(104, 222, 124, 0.5);
}

.tf-cd__dismiss-overlay.is-dismissed:hover {
	background: rgba(104, 222, 124, 0.24);
	color: var(--dh-accent, #68de7c);
}

/* ── Dismissed variant treatment ─────────────────────────────────── */

/* Muted + shoved to end of grid via CSS order. Winner always wins the
   visibility fight — if both flags are set the winner styling survives. */
.tf-cd__variant.is-dismissed {
	opacity: 0.32;
	order: 1;
	transition: opacity 0.15s;
}

.tf-cd__variant.is-dismissed:hover {
	opacity: 0.7;
}

.tf-cd__variant.is-dismissed.is-winner {
	opacity: 1;
	order: 0;
}

/* ── Variant footer ──────────────────────────────────────────────── */

.tf-cd__variant-footer {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 10px;
	padding: 10px 14px;
	font-size: 12px;
	border-top: 1px solid var(--dh-border, #2a2d31);
}

.tf-cd__variant-label {
	flex: 1 1 auto;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	color: var(--dh-text, #e0e0e0);
}

.tf-cd__restore-snapshot {
	background: rgba(217, 65, 65, 0.10);
	color: #ff8080;
	border: 1px solid rgba(255, 128, 128, 0.28);
	border-radius: var(--dh-radius-sm, 8px);
	cursor: pointer;
	font-size: 11px;
	font-weight: 600;
	padding: 3px 10px;
	transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.tf-cd__restore-snapshot:hover {
	background: rgba(217, 65, 65, 0.18);
	color: #ffaaaa;
	border-color: rgba(255, 170, 170, 0.55);
}

.tf-cd__variant-anchor {
	font-family: SFMono-Regular, Consolas, monospace;
	font-size: 11px;
	color: var(--dh-text-faint, #555);
}

.tf-cd__variant-openraw {
	color: var(--dh-text-muted, #888);
	text-decoration: none;
	font-size: 11px;
	padding: 4px 8px;
	border-radius: 4px;
}

.tf-cd__variant-openraw:hover {
	background: rgba(255, 255, 255, 0.06);
	color: var(--dh-text, #e0e0e0);
}

/* ── Search tab ──────────────────────────────────────────────────── */

.tf-cd__search-controls {
	display: flex;
	align-items: center;
	gap: 16px;
	margin-bottom: 20px;
}

.tf-cd__search-input {
	flex: 1;
	padding: 10px 14px;
	font-size: 14px;
	background: var(--dh-surface, #1a1d21);
	color: var(--dh-text, #e0e0e0);
	border: 1px solid var(--dh-border, #2a2d31);
	border-radius: var(--dh-radius-sm, 8px);
}

.tf-cd__search-input:focus {
	outline: 2px solid var(--dh-accent, #68de7c);
	outline-offset: -1px;
}

.tf-cd__search-input::placeholder {
	color: var(--dh-text-faint, #555);
}

.tf-cd__search-count {
	font-size: 13px;
	color: var(--dh-text-muted, #888);
	white-space: nowrap;
}

.tf-cd__search-results {
	background: var(--dh-surface, #1a1d21);
	border: 1px solid var(--dh-border, #2a2d31);
	border-radius: var(--dh-radius, 14px);
	overflow: hidden;
}

.tf-cd__search-row {
	display: grid;
	grid-template-columns: 200px 1fr 200px auto 220px;
	align-items: center;
	gap: 16px;
	padding: 10px 16px;
	border-bottom: 1px solid var(--dh-border, #2a2d31);
	font-size: 13px;
	color: var(--dh-text, #e0e0e0);
}

.tf-cd__search-row:last-child {
	border-bottom: 0;
}

.tf-cd__search-row:hover {
	background: var(--dh-surface-hover, #22262b);
}

.tf-cd__search-row.is-hidden {
	display: none;
}

.tf-cd__search-family {
	font-family: SFMono-Regular, Consolas, monospace;
	font-size: 12px;
	color: var(--dh-accent, #68de7c);
	text-decoration: none;
}

.tf-cd__search-family:hover {
	text-decoration: underline;
}

.tf-cd__search-label {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.tf-cd__search-anchor {
	font-family: SFMono-Regular, Consolas, monospace;
	font-size: 11px;
	color: var(--dh-text-faint, #555);
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.tf-cd__search-openraw {
	color: var(--dh-text-muted, #888);
	text-decoration: none;
	font-size: 11px;
	padding: 4px 8px;
	border-radius: 4px;
}

.tf-cd__search-openraw:hover {
	background: rgba(255, 255, 255, 0.06);
	color: var(--dh-text, #e0e0e0);
}

.tf-cd__search-move {
	padding: 6px 10px;
	font-size: 12px;
	background: var(--dh-bg, #0f1114);
	color: var(--dh-text, #e0e0e0);
	border: 1px solid var(--dh-border, #2a2d31);
	border-radius: 4px;
}

/* ── Rediscover tab ──────────────────────────────────────────────── */

.tf-cd__rediscover-list {
	background: var(--dh-surface, #1a1d21);
	border: 1px solid var(--dh-border, #2a2d31);
	border-radius: var(--dh-radius, 14px);
	overflow: hidden;
}

.tf-cd__rediscover-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 12px 16px;
	border-bottom: 1px solid var(--dh-border, #2a2d31);
}

.tf-cd__rediscover-row:last-child {
	border-bottom: 0;
}

.tf-cd__rediscover-row:hover {
	background: var(--dh-surface-hover, #22262b);
}

.tf-cd__rediscover-row label {
	display: flex;
	align-items: center;
	gap: 12px;
	cursor: pointer;
	flex: 1;
	color: var(--dh-text, #e0e0e0);
}

.tf-cd__rediscover-label {
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 13px;
}

.tf-cd__rediscover-label code {
	font-size: 12px;
	color: var(--dh-accent, #68de7c);
	background: rgba(104, 222, 124, 0.06);
	padding: 2px 8px;
	border-radius: 4px;
}

.tf-cd__rediscover-count {
	font-size: 12px;
	color: var(--dh-text-muted, #888);
}

.tf-cd__rediscover-badge {
	font-size: 10px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	padding: 4px 10px;
	background: rgba(217, 161, 58, 0.14);
	color: #d9a13a;
	border-radius: var(--dh-radius-pill, 100px);
}

/* ── Single-component preview page ──────────────────────────────── */

.tf-comp-single {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 320px;
	gap: 20px;
	margin-top: 20px;
}

@media (max-width: 900px) {
	.tf-comp-single {
		grid-template-columns: 1fr;
	}
}

.tf-comp-single__preview {
	background: repeating-linear-gradient(
		45deg,
		rgba(255, 255, 255, 0.02),
		rgba(255, 255, 255, 0.02) 8px,
		rgba(255, 255, 255, 0.04) 8px,
		rgba(255, 255, 255, 0.04) 16px
	);
	border: 1px solid var(--dh-border, #2a2d31);
	border-radius: var(--dh-radius, 14px);
	padding: 16px;
	overflow: hidden;
}

.tf-comp-single__frame {
	display: block;
	width: 100%;
	min-height: 240px;
	background: #0f1114;
	border: 0;
	border-radius: var(--dh-radius-sm, 8px);
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.tf-comp-single__empty {
	padding: 60px 20px;
	text-align: center;
	color: var(--dh-text-muted, #888);
	font-size: 13px;
}

.tf-comp-single__meta {
	background: var(--dh-surface, #1a1d21);
	border: 1px solid var(--dh-border, #2a2d31);
	border-radius: var(--dh-radius, 14px);
	padding: 18px 20px;
	align-self: start;
	position: sticky;
	top: 20px;
}

.tf-comp-single__meta-title {
	margin: 0 0 14px;
	font-size: 12px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--dh-text-muted, #a0a0a0);
}

.tf-comp-single__meta-list {
	margin: 0;
	display: grid;
	grid-template-columns: max-content 1fr;
	column-gap: 14px;
	row-gap: 10px;
	font-size: 13px;
}

.tf-comp-single__meta-list dt {
	color: var(--dh-text-muted, #a0a0a0);
	font-weight: 600;
	text-transform: uppercase;
	font-size: 11px;
	letter-spacing: 0.06em;
	padding-top: 2px;
}

.tf-comp-single__meta-list dd {
	margin: 0;
	color: var(--dh-text, #e0e0e0);
	word-break: break-word;
}

.tf-comp-single__meta-list a {
	color: var(--dh-accent, #68de7c);
	text-decoration: none;
}

.tf-comp-single__meta-list a:hover {
	text-decoration: underline;
}

.tf-comp-single__meta-list code {
	font-size: 12px;
	padding: 1px 6px;
	background: rgba(255, 255, 255, 0.06);
	border-radius: 4px;
}

.tf-comp-single__meta-cta {
	display: block;
	margin-top: 18px;
	padding: 10px 14px;
	background: var(--dh-accent, #68de7c);
	color: #0f1114;
	border-radius: var(--dh-radius-sm, 8px);
	font-size: 12px;
	font-weight: 700;
	text-align: center;
	text-decoration: none;
	transition: opacity 0.15s, transform 0.1s;
}

.tf-comp-single__meta-cta:hover {
	transform: translateY(-1px);
	opacity: 0.92;
}

.tf-comp-single__status {
	padding: 3px 8px;
	background: rgba(255, 255, 255, 0.08);
	border-radius: var(--dh-radius-pill, 100px);
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.06em;
}

.tf-comp-single__status--ready {
	background: rgba(104, 222, 124, 0.14);
	color: var(--dh-accent, #68de7c);
}

.tf-comp-single__status--deployed {
	background: rgba(72, 158, 255, 0.14);
	color: #6ea9ff;
}

/* ── Bulk template-type classifier ───────────────────────────────── */

.tf-classify {
	max-width: var(--dh-content-width, 1400px);
	margin: 0 auto;
	padding: 8px 0 64px;
}

.tf-classify__tabs {
	display: flex;
	gap: 2px;
	margin-bottom: 20px;
	border-bottom: 1px solid var(--dh-border, #2a2d31);
}

.tf-classify__tab {
	padding: 10px 18px;
	text-decoration: none;
	color: var(--dh-text-muted, #888);
	font-weight: 500;
	font-size: 13px;
	border-bottom: 2px solid transparent;
	margin-bottom: -1px;
	transition: color 0.15s, border-color 0.15s;
}

.tf-classify__tab:hover {
	color: var(--dh-text, #e0e0e0);
}

.tf-classify__tab.is-active {
	color: var(--dh-accent, #68de7c);
	border-bottom-color: var(--dh-accent, #68de7c);
}

.tf-classify__tab span {
	display: inline-block;
	margin-left: 8px;
	padding: 1px 8px;
	background: rgba(255, 255, 255, 0.08);
	border-radius: var(--dh-radius-pill, 100px);
	font-size: 11px;
}

.tf-classify__rows {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.tf-classify__row {
	display: grid;
	grid-template-columns: 200px 1fr auto auto;
	gap: 16px;
	align-items: center;
	padding: 12px 16px;
	background: var(--dh-surface, #1a1d21);
	border: 1px solid var(--dh-border, #2a2d31);
	border-radius: var(--dh-radius, 14px);
	transition: border-color 0.15s;
}

.tf-classify__row.is-classified {
	border-left: 3px solid var(--dh-accent, #68de7c);
}

.tf-classify__thumb {
	position: relative;
	display: block;
	width: 200px;
	height: 134px;
	background: #0a0c10;
	border-radius: var(--dh-radius-sm, 8px);
	overflow: hidden;
	cursor: zoom-in;
	image-rendering: -webkit-optimize-contrast;
}

.tf-classify__thumb img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: top center;
}

.tf-classify__thumb-placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	color: var(--dh-text-muted, #666);
	font-size: 10px;
	text-transform: uppercase;
	letter-spacing: 0.08em;
}

.tf-classify__meta {
	min-width: 0;
}

.tf-classify__meta-head {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
	margin-bottom: 4px;
}

.tf-classify__title {
	color: var(--dh-text, #e0e0e0);
	text-decoration: none;
	font-weight: 600;
	font-size: 14px;
}

.tf-classify__title:hover {
	color: var(--dh-accent, #68de7c);
}

.tf-classify__status {
	padding: 2px 10px;
	font-size: 10px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	border-radius: var(--dh-radius-pill, 100px);
}

.tf-classify__status--approved { background: rgba(104, 222, 124, 0.14); color: var(--dh-accent, #68de7c); }
.tf-classify__status--review   { background: rgba(217, 161, 58, 0.14);  color: #d9a13a; }
.tf-classify__status--rejected { background: rgba(217, 65, 65, 0.14);   color: #ff8080; }

.tf-classify__hint {
	color: var(--dh-text-muted, #888);
	font-size: 12px;
}

.tf-classify__hint code {
	font-size: 11px;
	padding: 1px 6px;
	background: rgba(255, 255, 255, 0.06);
	border-radius: 4px;
}

.tf-classify__picks {
	display: flex;
	gap: 6px;
	flex-wrap: wrap;
}

.tf-classify__pick {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 6px 12px;
	background: rgba(255, 255, 255, 0.04);
	border: 1px solid rgba(255, 255, 255, 0.12);
	border-radius: var(--dh-radius-sm, 8px);
	font-size: 12px;
	color: var(--dh-text-muted, #a0a0a0);
	cursor: pointer;
	transition: background 0.15s, color 0.15s, border-color 0.15s;
	user-select: none;
}

.tf-classify__pick:hover {
	background: rgba(255, 255, 255, 0.08);
	color: var(--dh-text, #e0e0e0);
}

.tf-classify__pick input {
	margin: 0;
}

.tf-classify__pick:has(input:checked) {
	background: rgba(255, 255, 255, 0.1);
	color: var(--dh-text, #e0e0e0);
	border-color: rgba(255, 255, 255, 0.25);
}

.tf-classify__pick--gutenberg:has(input:checked) {
	background: rgba(104, 222, 124, 0.14);
	color: var(--dh-accent, #68de7c);
	border-color: rgba(104, 222, 124, 0.5);
}

.tf-classify__state {
	min-width: 80px;
	font-size: 12px;
	color: var(--dh-text-muted, #888);
	text-align: right;
}

@media (max-width: 900px) {
	.tf-classify__row {
		grid-template-columns: 160px 1fr;
	}
	.tf-classify__thumb {
		width: 160px;
		height: 108px;
	}
	.tf-classify__picks, .tf-classify__state {
		grid-column: 1 / -1;
	}
}

.tf-classify__thumb-expand {
	position: absolute;
	top: 6px;
	right: 6px;
	width: 24px;
	height: 24px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(15, 17, 20, 0.78);
	color: #f0f0f0;
	border: 1px solid rgba(255, 255, 255, 0.18);
	border-radius: 6px;
	font-size: 12px;
	line-height: 1;
	opacity: 0;
	transition: opacity 0.15s;
	pointer-events: none;
}

.tf-classify__thumb:hover .tf-classify__thumb-expand {
	opacity: 1;
}

.tf-cd__bulk-dismiss {
	padding: 8px 16px;
	background: rgba(217, 65, 65, 0.14);
	color: #ff8080;
	border: 1px solid rgba(255, 128, 128, 0.36);
	border-radius: var(--dh-radius-sm, 8px);
	font-size: 12px;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.15s, color 0.15s, border-color 0.15s, transform 0.1s;
}

.tf-cd__bulk-dismiss:hover {
	background: rgba(217, 65, 65, 0.22);
	color: #ffaaaa;
	border-color: rgba(255, 170, 170, 0.6);
	transform: translateY(-1px);
}

.tf-cd__bulk-dismiss:disabled {
	opacity: 0.55;
	cursor: default;
	transform: none;
}

/* ── Kind filter tabs (index mode) ──────────────────────────────── */

.tf-cd__kind-tabs {
	display: flex;
	gap: 6px;
	margin: 20px 0 12px;
	flex-wrap: wrap;
}

.tf-cd__kind-tab {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 8px 16px;
	background: var(--dh-surface, #1a1d21);
	border: 1px solid var(--dh-border, #2a2d31);
	border-radius: var(--dh-radius-pill, 100px);
	color: var(--dh-text-muted, #888);
	text-decoration: none;
	font-size: 12px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.tf-cd__kind-tab:hover {
	background: var(--dh-surface-hover, #22262b);
	color: var(--dh-text, #e0e0e0);
}

.tf-cd__kind-tab.is-active {
	background: rgba(104, 222, 124, 0.14);
	color: var(--dh-accent, #68de7c);
	border-color: rgba(104, 222, 124, 0.5);
}

.tf-cd__kind-tab-count {
	padding: 1px 8px;
	background: rgba(255, 255, 255, 0.08);
	border-radius: var(--dh-radius-pill, 100px);
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0;
	text-transform: none;
}

.tf-cd__kind-tab.is-active .tf-cd__kind-tab-count {
	background: rgba(104, 222, 124, 0.22);
}

/* ── Kind badge on family cards + kind picker on detail header ── */

.tf-cd__kind-badge {
	font-size: 10px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	padding: 3px 8px;
	border-radius: var(--dh-radius-pill, 100px);
}

.tf-cd__kind-badge--component { background: rgba(104, 222, 124, 0.14); color: var(--dh-accent, #68de7c); }
.tf-cd__kind-badge--pattern   { background: rgba(72, 158, 255, 0.14);  color: #6ea9ff; }
.tf-cd__kind-badge--layout    { background: rgba(217, 161, 58, 0.14);  color: #d9a13a; }
.tf-cd__kind-badge--undecided { background: rgba(255, 255, 255, 0.06); color: var(--dh-text-muted, #888); }

.tf-cd__detail-actions {
	display: flex;
	align-items: center;
	gap: 12px;
	flex-wrap: wrap;
}

.tf-cd__kind-pills {
	display: inline-flex;
	gap: 6px;
	flex-wrap: wrap;
}

.tf-cd__kind-pill {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 6px 12px;
	background: rgba(255, 255, 255, 0.04);
	border: 1px solid rgba(255, 255, 255, 0.12);
	border-radius: var(--dh-radius-sm, 8px);
	font-size: 12px;
	color: var(--dh-text-muted, #a0a0a0);
	cursor: pointer;
	transition: background 0.15s, color 0.15s, border-color 0.15s;
	user-select: none;
}

.tf-cd__kind-pill:hover {
	background: rgba(255, 255, 255, 0.08);
	color: var(--dh-text, #e0e0e0);
}

.tf-cd__kind-pill input {
	margin: 0;
}

.tf-cd__kind-pill:has(input:disabled) {
	opacity: 0.55;
	cursor: default;
}

.tf-cd__kind-pill--component:has(input:checked) {
	background: rgba(104, 222, 124, 0.14);
	color: var(--dh-accent, #68de7c);
	border-color: rgba(104, 222, 124, 0.5);
}

.tf-cd__kind-pill--pattern:has(input:checked) {
	background: rgba(72, 158, 255, 0.14);
	color: #6ea9ff;
	border-color: rgba(110, 169, 255, 0.5);
}

.tf-cd__kind-pill--layout:has(input:checked) {
	background: rgba(217, 161, 58, 0.14);
	color: #d9a13a;
	border-color: rgba(217, 161, 58, 0.5);
}

.tf-cd__kind-pill--undecided:has(input:checked) {
	background: rgba(255, 255, 255, 0.1);
	color: var(--dh-text, #e0e0e0);
	border-color: rgba(255, 255, 255, 0.25);
}

/* ── Group membership chips + picker (detail mode variants) ────── */

.tf-cd__group-row {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 8px 14px;
	border-top: 1px solid var(--dh-border, #2a2d31);
	font-size: 12px;
}

.tf-cd__group-chip {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 3px 10px;
	border-radius: var(--dh-radius-pill, 100px);
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.06em;
}

.tf-cd__group-chip--canonical {
	background: rgba(104, 222, 124, 0.14);
	color: var(--dh-accent, #68de7c);
}

.tf-cd__group-chip--member {
	background: rgba(72, 158, 255, 0.14);
	color: #6ea9ff;
}

.tf-cd__group-remove {
	background: rgba(217, 65, 65, 0.10);
	color: #ff8080;
	border: 1px solid rgba(255, 128, 128, 0.28);
	border-radius: var(--dh-radius-sm, 8px);
	cursor: pointer;
	font-size: 11px;
	font-weight: 600;
	padding: 4px 10px;
	transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.tf-cd__group-remove:hover {
	background: rgba(217, 65, 65, 0.18);
	color: #ffaaaa;
	border-color: rgba(255, 170, 170, 0.55);
}

.tf-cd__group-hint {
	color: var(--dh-text-muted, #888);
	font-size: 11px;
	font-style: italic;
}

.tf-cd__group-menu-wrap {
	position: relative;
	display: inline-block;
}

.tf-cd__group-add {
	padding: 6px 14px;
	background: rgba(72, 158, 255, 0.14);
	color: #6ea9ff;
	border: 1px solid rgba(110, 169, 255, 0.36);
	border-radius: var(--dh-radius-sm, 8px);
	font-size: 12px;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.tf-cd__group-add:hover {
	background: rgba(72, 158, 255, 0.22);
	color: #a0c8ff;
	border-color: rgba(160, 200, 255, 0.6);
}

.tf-cd__group-menu {
	position: absolute;
	bottom: calc(100% + 6px);
	left: 0;
	z-index: 20;
	min-width: 240px;
	max-width: 340px;
	background: var(--dh-surface, #1a1d21);
	border: 1px solid var(--dh-border, #2a2d31);
	border-radius: var(--dh-radius-sm, 8px);
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
	padding: 6px;
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.tf-cd__group-menu[hidden] {
	display: none !important;
}

.tf-cd__group-menu-item {
	text-align: left;
	background: transparent;
	color: var(--dh-text, #e0e0e0);
	border: 0;
	padding: 8px 12px;
	border-radius: var(--dh-radius-sm, 8px);
	font-size: 13px;
	cursor: pointer;
	transition: background 0.12s, color 0.12s;
}

.tf-cd__group-menu-item:hover {
	background: rgba(104, 222, 124, 0.14);
	color: var(--dh-accent, #68de7c);
}

.tf-cd__variant.is-group-member {
	border-color: rgba(110, 169, 255, 0.6);
}

/* ── Reconcile buttons (detail toolbar + index toolbar) ────────── */

.tf-cd__reconcile-family,
.tf-cd__reconcile-all {
	padding: 8px 16px;
	background: rgba(72, 158, 255, 0.14);
	color: #6ea9ff;
	border: 1px solid rgba(110, 169, 255, 0.36);
	border-radius: var(--dh-radius-sm, 8px);
	font-size: 12px;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.15s, color 0.15s, border-color 0.15s, transform 0.1s;
}

.tf-cd__reconcile-family:hover,
.tf-cd__reconcile-all:hover {
	background: rgba(72, 158, 255, 0.22);
	color: #a0c8ff;
	border-color: rgba(160, 200, 255, 0.6);
	transform: translateY(-1px);
}

.tf-cd__reconcile-family.is-dirty,
.tf-cd__reconcile-all.is-dirty {
	background: rgba(217, 161, 58, 0.18);
	color: #ffd77a;
	border-color: rgba(217, 161, 58, 0.55);
}

.tf-cd__reconcile-family:disabled,
.tf-cd__reconcile-all:disabled {
	opacity: 0.55;
	cursor: default;
	transform: none;
}

.tf-cd__index-toolbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	margin-top: 16px;
	flex-wrap: wrap;
}
