/**
 * Champion Tree Register — list + single.
 * Pattern aligned with Programs/News/Contact card grids (Figma Champion Tree Grid not designed).
 */

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

/*
 * Shell matches News / Programs-Grants: flex row + align-items:flex-start so the
 * sticky sidebar is content-sized (not stretched to the full results height).
 * Intro lives inside .wsfd-ct-list__results (right column), above the card grid —
 * not a full-width first flex row (that previously spanned over sidebar + cards).
 */
.wsfd-ct-list {
	--wsfd-ct-thumb-size: 320px;
	display: flex;
	flex-wrap: wrap;
	gap: 40px 48px;
	align-items: flex-start;
	width: 100%;
	max-width: none;
	padding: 48px var(--wsfd-page-inline, var(--wsfd-page-gutter, 64px)) 80px;
	box-sizing: border-box;
	background: #fff;
}

.wsfd-ct-list__intro {
	box-sizing: border-box;
	font-family: var(--wsfd-font-body);
	font-size: 18px;
	line-height: 1.55;
	color: #000d04;
}

/* Row 77 — intro paragraph full width of results column. */
.wsfd-ct-list__intro > * {
	max-width: 100%;
}

.wsfd-ct-list__intro p {
	margin: 0 0 1em;
}

.wsfd-ct-list__intro p:last-child {
	margin-bottom: 0;
}

.wsfd-ct-list__intro a {
	color: var(--wsfd-forest, #0f5624);
	text-decoration: underline;
	text-underline-offset: 2px;
}

.wsfd-ct-list__intro a:focus-visible {
	outline: 2px solid #d1422a;
	outline-offset: 2px;
}

/* Sidebar chrome mirrors News / Programs-Grants filter panel tokens. */
.wsfd-ct-list__sidebar {
	flex: 0 0 280px;
	width: 280px;
	max-width: 100%;
	box-sizing: border-box;
	min-width: 0;
	position: sticky;
	top: 24px;
	/* R93 — long sticky filters must scroll so bottom controls stay reachable. */
	max-height: calc(100vh - 48px);
	overflow-x: hidden;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	/* Keep filters above scrolling card media when columns share a paint band. */
	z-index: 2;
	padding: 12px;
	border: 3px solid var(--wsfd-growth, #f4ebe0);
	border-radius: 8px;
	display: flex;
	flex-direction: column;
	gap: 32px;
	background: #fff;
}

/* R89 — Forestry section nav above CT filters (same tokens as child sidebar). */
.wsfd-ct-list__section-nav {
	margin: 0;
	padding: 0;
}

.wsfd-ct-list__section-nav .wsfd-page__nav-heading {
	margin: 0;
}

.wsfd-ct-list__section-nav .wsfd-page__nav-list {
	margin: 0;
}

.wsfd-ct-list__sidebar-heading {
	margin: 0;
	font-family: var(--wsfd-font-serif) !important;
	font-weight: 600 !important;
	font-size: 22px !important;
	line-height: 26px !important;
	color: var(--wsfd-protection, #371f1b) !important;
}

.wsfd-ct-list__rule {
	height: 1px;
	width: 100%;
	margin: 8px 0;
	background: var(--wsfd-growth, #f4ebe0);
}

.wsfd-ct-list__search {
	width: 100%;
	box-sizing: border-box;
	padding: 10px 12px;
	border: 2px solid var(--wsfd-bark, #d2b99a);
	border-radius: 8px;
	font-family: var(--wsfd-font-body);
	font-size: 16px;
	line-height: 1.4;
	color: var(--wsfd-conserve, #000d04);
	background: #fff;
}

.wsfd-ct-list__search:focus-visible {
	outline: 2px solid #d1422a;
	outline-offset: 2px;
}

/* View toggles + Image size on one row; wrap only when sidebar is narrow. */
.wsfd-ct-list__view-row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 16px;
	min-width: 0;
}

.wsfd-ct-list__view-toggle {
	display: flex;
	flex: 0 0 auto;
	gap: 8px;
	align-items: center;
}

.wsfd-ct-list__view-btn {
	appearance: none;
	box-sizing: border-box;
	width: 38px;
	height: 38px;
	padding: 0;
	border-radius: 20px;
	border: 2px solid rgba(255, 255, 255, 0.5);
	background: var(--wsfd-protection, #371f1b);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
}

.wsfd-ct-list__view-btn.is-active {
	background: #d1422a;
}

.wsfd-ct-list__view-btn:focus-visible {
	outline: 2px solid #d1422a;
	outline-offset: 2px;
}

.wsfd-ct-list__sidebar-heading label {
	all: unset;
	cursor: pointer;
	font: inherit;
	color: inherit;
}

.wsfd-ct-list__view-btn img {
	display: block;
	width: 16px;
	height: auto;
	pointer-events: none;
}

.wsfd-ct-list__view-btn img[hidden] {
	display: none;
}

/* CT-only: image size beside View toggles (News has no equivalent). */
.wsfd-ct-list__size {
	display: flex;
	flex: 1 1 140px;
	flex-direction: row;
	align-items: center;
	gap: 8px;
	min-width: 0;
}

.wsfd-ct-list__slider-label {
	flex: 0 0 auto;
	margin: 0;
	font-family: var(--wsfd-font-body);
	font-size: 14px;
	font-weight: 700;
	line-height: 1.2;
	color: var(--wsfd-protection, #371f1b);
	white-space: nowrap;
}

.wsfd-ct-list__slider {
	appearance: none;
	-webkit-appearance: none;
	flex: 1 1 auto;
	width: 100%;
	min-width: 72px;
	height: 28px;
	margin: 0;
	padding: 0;
	background: transparent;
	cursor: pointer;
}

.wsfd-ct-list__slider:focus {
	outline: none;
}

.wsfd-ct-list__slider:focus-visible {
	outline: 2px solid #d1422a;
	outline-offset: 4px;
}

.wsfd-ct-list__slider::-webkit-slider-runnable-track {
	height: 6px;
	border-radius: 3px;
	background: var(--wsfd-bark, #d2b99a);
	border: none;
}

.wsfd-ct-list__slider::-moz-range-track {
	height: 6px;
	border-radius: 3px;
	background: var(--wsfd-bark, #d2b99a);
	border: none;
}

.wsfd-ct-list__slider::-webkit-slider-thumb {
	appearance: none;
	-webkit-appearance: none;
	width: 18px;
	height: 18px;
	margin-top: -6px;
	border: 2px solid rgba(255, 255, 255, 0.5);
	border-radius: 50%;
	background: var(--wsfd-protection, #371f1b);
	box-shadow: none;
}

.wsfd-ct-list__slider::-moz-range-thumb {
	width: 18px;
	height: 18px;
	border: 2px solid rgba(255, 255, 255, 0.5);
	border-radius: 50%;
	background: var(--wsfd-protection, #371f1b);
	box-shadow: none;
}

.wsfd-ct-list__slider:hover::-webkit-slider-thumb,
.wsfd-ct-list__slider:focus-visible::-webkit-slider-thumb {
	background: #d1422a;
}

.wsfd-ct-list__slider:hover::-moz-range-thumb,
.wsfd-ct-list__slider:focus-visible::-moz-range-thumb {
	background: #d1422a;
}

.wsfd-ct-list__county-select {
	display: block;
	width: 100%;
	box-sizing: border-box;
	min-height: 44px;
	padding: 10px 36px 10px 12px;
	border: 2px solid var(--wsfd-bark, #d2b99a);
	border-radius: 8px;
	font-family: var(--wsfd-font-body);
	font-size: 16px;
	line-height: 1.4;
	color: var(--wsfd-protection, #371f1b);
	background-color: #fff;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%23371f1b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 12px center;
	background-size: 12px 8px;
	appearance: none;
	-webkit-appearance: none;
	cursor: pointer;
}

.wsfd-ct-list__county-select:focus-visible {
	outline: 2px solid #d1422a;
	outline-offset: 2px;
}

.wsfd-ct-list__results {
	flex: 1 1 0;
	min-width: 0;
	position: relative;
	z-index: 0;
	display: flex;
	flex-direction: column;
	gap: 24px;
	align-items: stretch;
}

.wsfd-ct-list__cards {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 24px;
}

.wsfd-ct-list__cards.is-grid {
	grid-template-columns: repeat(3, minmax(0, 1fr));
}

.wsfd-ct-list__cards.is-list {
	/* Column tracks defined with --wsfd-ct-list-cols further below (subgrid). */
	gap: 16px;
}

.wsfd-ct-card {
	margin: 0;
	min-width: 0;
}

.wsfd-ct-card.is-hidden {
	display: none !important;
}

.wsfd-ct-list__cards.is-list .wsfd-ct-card.is-hidden {
	display: none !important;
}

.wsfd-ct-list__empty {
	grid-column: 1 / -1;
	padding: 24px;
	font-family: var(--wsfd-font-body);
	font-size: 18px;
	color: var(--wsfd-protection, #371f1b);
}

/* -------------------------------------------------------------------------- */
/* Cards — visual language from Programs/Grants (.wsfd-pg-card)               */
/* -------------------------------------------------------------------------- */

.wsfd-ct-card__link {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 16px;
	height: 100%;
	box-sizing: border-box;
	padding: 16px 24px 24px;
	border-radius: 8px;
	border: 4px solid var(--wsfd-ember, #633c35);
	background: var(--wsfd-protection, #371f1b);
	color: #fff;
	text-decoration: none;
	min-width: 0;
	transition:
		background-color 0.25s ease,
		border-color 0.25s ease,
		color 0.25s ease;
}

/*
 * Beat UA / global a:visited (near-black). Dark cards stay light text for
 * :link and :visited; hover/focus-visible still invert to Growth.
 */
.wsfd-ct-card__link:link,
.wsfd-ct-card__link:visited {
	color: #fff;
}

.wsfd-ct-card__link:link .wsfd-ct-card__title,
.wsfd-ct-card__link:visited .wsfd-ct-card__title,
.wsfd-ct-card__link:link .wsfd-ct-card__latin,
.wsfd-ct-card__link:visited .wsfd-ct-card__latin,
.wsfd-ct-card__link:link .wsfd-ct-card__stats,
.wsfd-ct-card__link:visited .wsfd-ct-card__stats,
.wsfd-ct-card__link:link .wsfd-ct-card__stat-full,
.wsfd-ct-card__link:visited .wsfd-ct-card__stat-full,
.wsfd-ct-card__link:link .wsfd-ct-card__stat-short,
.wsfd-ct-card__link:visited .wsfd-ct-card__stat-short {
	/*
	 * Inherit link fill (via body/identity/stats) so AC sees a solid computed
	 * bg and hover fades as one surface — no second transitioning bg.
	 */
	background-color: inherit;
}

.wsfd-ct-card__link:link .wsfd-ct-card__title,
.wsfd-ct-card__link:visited .wsfd-ct-card__title {
	color: #fff;
}

.wsfd-ct-card__link:link .wsfd-ct-card__latin,
.wsfd-ct-card__link:visited .wsfd-ct-card__latin,
.wsfd-ct-card__link:link .wsfd-ct-card__stats,
.wsfd-ct-card__link:visited .wsfd-ct-card__stats,
.wsfd-ct-card__link:link .wsfd-ct-card__stat-full,
.wsfd-ct-card__link:visited .wsfd-ct-card__stat-full,
.wsfd-ct-card__link:link .wsfd-ct-card__stat-short,
.wsfd-ct-card__link:visited .wsfd-ct-card__stat-short {
	color: #f4ebe0;
}

.wsfd-ct-card__link:hover,
.wsfd-ct-card__link:focus-visible,
.wsfd-ct-card__link:visited:hover,
.wsfd-ct-card__link:visited:focus-visible {
	background: var(--wsfd-growth, #f4ebe0);
	border-color: var(--wsfd-bark, #d2b99a);
	color: var(--wsfd-protection, #371f1b);
}

.wsfd-ct-card__link:focus-visible {
	outline: 2px solid #d1422a;
	outline-offset: 2px;
}

.wsfd-ct-card__media {
	position: relative;
	display: block;
	width: 100%;
	max-width: 100%;
	overflow: hidden;
	border-radius: 10px;
	border: 2px solid var(--wsfd-ember, #633c35);
	background: #2a1714;
	/* Contain positioned badge / hover veil inside the media frame. */
	isolation: isolate;
}

.wsfd-ct-list__cards.is-grid .wsfd-ct-card__media {
	height: var(--wsfd-ct-thumb-size, 320px);
	max-height: 320px;
	aspect-ratio: auto;
	flex: none;
}

.wsfd-ct-card__link:hover .wsfd-ct-card__media,
.wsfd-ct-card__link:focus-visible .wsfd-ct-card__media {
	border-color: var(--wsfd-bark, #d2b99a);
}

.wsfd-ct-card__media::before {
	content: '';
	position: absolute;
	inset: 0;
	border-radius: 0;
	background: rgba(0, 0, 0, 0.5);
	opacity: 0;
	pointer-events: none;
	z-index: 1;
	transition: opacity 0.25s ease;
}

.wsfd-ct-card__media::after {
	content: '';
	position: absolute;
	left: 50%;
	top: 50%;
	width: 50px;
	height: 50px;
	border-radius: 0;
	transform: translate(-50%, -50%) scale(0.92);
	opacity: 0;
	pointer-events: none;
	z-index: 2;
	background-color: #fff;
	-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'%3E%3Ccircle cx='8' cy='8' r='7' stroke='%23000' stroke-width='1.5'/%3E%3Cpath d='M5.5 8h5M8 5.5L10.5 8 8 10.5' stroke='%23000' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
	mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'%3E%3Ccircle cx='8' cy='8' r='7' stroke='%23000' stroke-width='1.5'/%3E%3Cpath d='M5.5 8h5M8 5.5L10.5 8 8 10.5' stroke='%23000' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
	-webkit-mask-size: contain;
	mask-size: contain;
	-webkit-mask-repeat: no-repeat;
	mask-repeat: no-repeat;
	-webkit-mask-position: center;
	mask-position: center;
	transition: opacity 0.25s ease, transform 0.25s ease;
}

.wsfd-ct-card__link:hover .wsfd-ct-card__media::before,
.wsfd-ct-card__link:focus-visible .wsfd-ct-card__media::before,
.wsfd-ct-card__link:hover .wsfd-ct-card__media::after,
.wsfd-ct-card__link:focus-visible .wsfd-ct-card__media::after {
	opacity: 1;
}

.wsfd-ct-card__link:hover .wsfd-ct-card__media::after,
.wsfd-ct-card__link:focus-visible .wsfd-ct-card__media::after {
	transform: translate(-50%, -50%) scale(1);
}

.wsfd-ct-list__cards.is-list {
	--wsfd-ct-list-thumb: clamp(48px, calc(var(--wsfd-ct-thumb-size, 320px) * 0.28), 96px);
	/*
	 * Subgrid link uses padding-inline 14px + border 4px. Those insets shrink the
	 * first/last tracks' item areas — without chrome compensation the fixed-size
	 * thumb overflows into the identity column (clipped "A" in "American…").
	 */
	--wsfd-ct-list-chrome-x: calc(14px + 4px);
	/*
	 * Shared tracks via subgrid so county/metrics columns line up across rows.
	 * County + metrics are max-content (no greedy fr) — leftover width goes to name.
	 * (left chrome) thumb | name+latin | county | circ | height | crown | points (right chrome)
	 */
	--wsfd-ct-list-cols:
		calc(var(--wsfd-ct-list-thumb, 64px) + var(--wsfd-ct-list-chrome-x))
		minmax(120px, 1fr)
		max-content
		max-content
		max-content
		max-content
		max-content
		var(--wsfd-ct-list-chrome-x);
	grid-template-columns: var(--wsfd-ct-list-cols);
	column-gap: 10px;
	row-gap: 16px;
	align-items: center;
}

.wsfd-ct-list__cards.is-list .wsfd-ct-card {
	display: grid;
	grid-template-columns: subgrid;
	grid-column: 1 / -1;
	min-width: 0;
}

.wsfd-ct-list__cards.is-list .wsfd-ct-card__link {
	display: grid;
	grid-template-columns: subgrid;
	grid-column: 1 / -1;
	column-gap: inherit;
	row-gap: 0;
	align-items: center;
	padding: 10px 14px;
	height: auto;
}

.wsfd-ct-list__cards.is-list .wsfd-ct-card__media {
	/* Fill remaining first-track space after chrome inset; never exceed thumb size. */
	box-sizing: border-box;
	width: 100%;
	max-width: var(--wsfd-ct-list-thumb, 64px);
	height: auto;
	flex: none;
	aspect-ratio: 1;
	justify-self: stretch;
	border-width: 2px;
	border-radius: 6px;
}

.wsfd-ct-list__cards.is-list .wsfd-ct-card__link:hover .wsfd-ct-card__media::before,
.wsfd-ct-list__cards.is-list .wsfd-ct-card__link:focus-visible .wsfd-ct-card__media::before,
.wsfd-ct-list__cards.is-list .wsfd-ct-card__link:hover .wsfd-ct-card__media::after,
.wsfd-ct-list__cards.is-list .wsfd-ct-card__link:focus-visible .wsfd-ct-card__media::after,
.wsfd-ct-list__cards.is-list .wsfd-ct-card__media::before,
.wsfd-ct-list__cards.is-list .wsfd-ct-card__media::after {
	content: none;
	opacity: 0;
}

.wsfd-ct-list__cards.is-list .wsfd-ct-card__badge {
	display: none;
}

.wsfd-ct-card__img,
.wsfd-ct-card__placeholder {
	display: block;
	width: 100%;
	max-width: 100%;
	height: 100%;
	object-fit: cover;
	/* Fill padding box; media overflow:hidden clips to frame radius (avoid inherit under border). */
	border-radius: 0;
	/* Defeat WP/Divi height:auto on .wp-post-image blowing past media frame. */
	object-position: center;
}

.wsfd-ct-card__placeholder {
	background: linear-gradient(135deg, #633c35 0%, #2a1714 100%);
}

.wsfd-ct-card__badge {
	position: absolute;
	left: 10px;
	bottom: 10px;
	z-index: 1;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 6px 12px;
	border-radius: 20px;
	border: 2px solid rgba(255, 255, 255, 0.5);
	background: #063915;
	color: #fff;
	font-family: var(--wsfd-font-body);
	font-size: 12px;
	font-weight: 700;
	line-height: 1;
}

/* Card hover sets link color dark — keep badge label white on dark fill */
.wsfd-ct-card__link:hover .wsfd-ct-card__badge,
.wsfd-ct-card__link:focus-visible .wsfd-ct-card__badge,
.wsfd-ct-card__link:active .wsfd-ct-card__badge {
	color: #fff;
}

.wsfd-ct-card__body {
	display: flex;
	flex-direction: column;
	gap: 8px;
	width: 100%;
	margin-top: -8px;
	min-width: 0;
	/* Pass link fill to title/latin/stats for AC sampling + synced hover. */
	background-color: inherit;
}

.wsfd-ct-card__identity {
	display: contents;
	background-color: inherit;
}

.wsfd-ct-list__cards.is-list .wsfd-ct-card__body,
.wsfd-ct-list__cards.is-list .wsfd-ct-card__stats {
	display: contents;
}

.wsfd-ct-list__cards.is-list .wsfd-ct-card__identity {
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 2px;
	min-width: 0;
	align-self: center;
}

.wsfd-ct-list__cards.is-list .wsfd-ct-card__media,
.wsfd-ct-list__cards.is-list .wsfd-ct-card__stat {
	align-self: center;
}

.wsfd-ct-card__title {
	font-family: 'Dunbar Tall', dunbar-tall, var(--wsfd-font-display);
	font-weight: 700;
	font-size: 24px;
	line-height: 30px;
	color: #fff;
	background-color: inherit;
	transition: color 0.25s ease;
}

.wsfd-ct-card__link:hover .wsfd-ct-card__title,
.wsfd-ct-card__link:focus-visible .wsfd-ct-card__title,
.wsfd-ct-card__link:visited:hover .wsfd-ct-card__title,
.wsfd-ct-card__link:visited:focus-visible .wsfd-ct-card__title {
	color: var(--wsfd-protection, #371f1b);
}

.wsfd-ct-list__cards.is-list .wsfd-ct-card__title {
	font-size: 16px;
	line-height: 1.3;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.wsfd-ct-card__latin {
	font-family: 'New Science Serif', new-science-serif, var(--wsfd-font-serif);
	font-style: italic;
	font-size: 16px;
	line-height: 1.35;
	color: #f4ebe0;
	/* Inherit card fill so contrast tools sample the real surface, not page/#fff. */
	background-color: inherit;
	transition: color 0.25s ease;
}

.wsfd-ct-card__link:hover .wsfd-ct-card__latin,
.wsfd-ct-card__link:focus-visible .wsfd-ct-card__latin,
.wsfd-ct-card__link:visited:hover .wsfd-ct-card__latin,
.wsfd-ct-card__link:visited:focus-visible .wsfd-ct-card__latin {
	color: var(--wsfd-conserve, #000d04);
}

.wsfd-ct-list__cards.is-list .wsfd-ct-card__latin {
	font-size: 13px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.wsfd-ct-card__county {
	display: inline-flex;
	align-self: flex-start;
	align-items: center;
	justify-content: center;
	padding: 6px 12px;
	border-radius: 20px;
	border: 2px solid rgba(255, 255, 255, 0.5);
	background: #063915;
	color: #fff;
	font-family: var(--wsfd-font-body);
	font-size: 13px;
	font-weight: 700;
	line-height: 1;
	white-space: nowrap;
}

.wsfd-ct-card__county:empty {
	display: none;
}

.wsfd-ct-card__link:hover .wsfd-ct-card__county,
.wsfd-ct-card__link:focus-visible .wsfd-ct-card__county,
.wsfd-ct-card__link:active .wsfd-ct-card__county {
	color: #fff;
}

.wsfd-ct-list__cards.is-list .wsfd-ct-card__county {
	/* Override base align-self:flex-start so the pill centers in the row */
	align-self: center;
	justify-self: start;
	font-size: 12px;
	padding: 4px 10px;
	max-width: 100%;
	overflow: hidden;
	text-overflow: ellipsis;
	min-width: 0;
}

.wsfd-ct-card__stats {
	display: flex;
	flex-direction: column;
	gap: 2px;
	margin-top: 4px;
	font-family: var(--wsfd-font-body);
	font-size: 14px;
	line-height: 1.4;
	color: #f4ebe0;
	background-color: inherit;
	transition: color 0.25s ease;
}

.wsfd-ct-card__stat {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	min-width: 0;
	background-color: inherit;
}

.wsfd-ct-card__stat-full,
.wsfd-ct-card__stat-short {
	color: inherit;
	background-color: inherit;
	transition: color 0.25s ease;
}

.wsfd-ct-metric-icon {
	flex-shrink: 0;
	width: 14px;
	height: 14px;
	color: inherit;
}

.wsfd-ct-card__link:hover .wsfd-ct-card__stats,
.wsfd-ct-card__link:focus-visible .wsfd-ct-card__stats,
.wsfd-ct-card__link:visited:hover .wsfd-ct-card__stats,
.wsfd-ct-card__link:visited:focus-visible .wsfd-ct-card__stats,
.wsfd-ct-card__link:hover .wsfd-ct-card__stat-full,
.wsfd-ct-card__link:focus-visible .wsfd-ct-card__stat-full,
.wsfd-ct-card__link:visited:hover .wsfd-ct-card__stat-full,
.wsfd-ct-card__link:visited:focus-visible .wsfd-ct-card__stat-full,
.wsfd-ct-card__link:hover .wsfd-ct-card__stat-short,
.wsfd-ct-card__link:focus-visible .wsfd-ct-card__stat-short,
.wsfd-ct-card__link:visited:hover .wsfd-ct-card__stat-short,
.wsfd-ct-card__link:visited:focus-visible .wsfd-ct-card__stat-short {
	color: var(--wsfd-conserve, #000d04);
}

.wsfd-ct-card__stat-short {
	display: none;
}

.wsfd-ct-list__cards.is-list .wsfd-ct-card__stat {
	min-width: 0;
	font-size: 12px;
	line-height: 1.3;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	color: #f4ebe0;
	background-color: inherit;
	transition: color 0.25s ease;
}

.wsfd-ct-list__cards.is-list .wsfd-ct-card__link:hover .wsfd-ct-card__stat,
.wsfd-ct-list__cards.is-list .wsfd-ct-card__link:focus-visible .wsfd-ct-card__stat,
.wsfd-ct-list__cards.is-list .wsfd-ct-card__link:visited:hover .wsfd-ct-card__stat,
.wsfd-ct-list__cards.is-list .wsfd-ct-card__link:visited:focus-visible .wsfd-ct-card__stat {
	color: var(--wsfd-conserve, #000d04);
}

.wsfd-ct-list__cards.is-list .wsfd-ct-card__stat-full {
	display: none;
}

.wsfd-ct-list__cards.is-list .wsfd-ct-card__stat-short {
	display: inline;
}

.wsfd-ct-list__cards.is-list .wsfd-ct-card__stat:has(.wsfd-ct-card__stat-short)::before {
	content: attr(data-label) ': ';
	font-weight: 600;
	color: #fff;
}

.wsfd-ct-list__cards.is-list .wsfd-ct-card__stat .wsfd-ct-metric-icon {
	order: -1;
	width: 12px;
	height: 12px;
}

.wsfd-ct-list__cards.is-list .wsfd-ct-card__link:hover .wsfd-ct-card__stat:has(.wsfd-ct-card__stat-short)::before,
.wsfd-ct-list__cards.is-list .wsfd-ct-card__link:focus-visible .wsfd-ct-card__stat:has(.wsfd-ct-card__stat-short)::before {
	color: var(--wsfd-protection, #371f1b);
}

/* Light card theme — reverse default/hover pairs (tokens only). */
[data-wsfd-card-theme="light"] .wsfd-ct-card__link,
[data-wsfd-card-theme="light"] .wsfd-ct-card__link:link,
[data-wsfd-card-theme="light"] .wsfd-ct-card__link:visited {
	background: var(--wsfd-growth, #f4ebe0);
	border-color: var(--wsfd-bark, #d2b99a);
	color: var(--wsfd-protection, #371f1b);
}

[data-wsfd-card-theme="light"] .wsfd-ct-card__title,
[data-wsfd-card-theme="light"] .wsfd-ct-card__link:link .wsfd-ct-card__title,
[data-wsfd-card-theme="light"] .wsfd-ct-card__link:visited .wsfd-ct-card__title {
	color: var(--wsfd-protection, #371f1b);
	background-color: inherit;
}

[data-wsfd-card-theme="light"] .wsfd-ct-card__latin,
[data-wsfd-card-theme="light"] .wsfd-ct-card__stats,
[data-wsfd-card-theme="light"] .wsfd-ct-card__stat-full,
[data-wsfd-card-theme="light"] .wsfd-ct-card__stat-short,
[data-wsfd-card-theme="light"] .wsfd-ct-list__cards.is-list .wsfd-ct-card__stat,
[data-wsfd-card-theme="light"] .wsfd-ct-card__link:link .wsfd-ct-card__latin,
[data-wsfd-card-theme="light"] .wsfd-ct-card__link:visited .wsfd-ct-card__latin,
[data-wsfd-card-theme="light"] .wsfd-ct-card__link:link .wsfd-ct-card__stats,
[data-wsfd-card-theme="light"] .wsfd-ct-card__link:visited .wsfd-ct-card__stats,
[data-wsfd-card-theme="light"] .wsfd-ct-card__link:link .wsfd-ct-card__stat-full,
[data-wsfd-card-theme="light"] .wsfd-ct-card__link:visited .wsfd-ct-card__stat-full,
[data-wsfd-card-theme="light"] .wsfd-ct-card__link:link .wsfd-ct-card__stat-short,
[data-wsfd-card-theme="light"] .wsfd-ct-card__link:visited .wsfd-ct-card__stat-short {
	color: var(--wsfd-conserve, #000d04);
	background-color: inherit;
}

[data-wsfd-card-theme="light"] .wsfd-ct-card__media {
	border-color: var(--wsfd-bark, #d2b99a);
}

[data-wsfd-card-theme="light"] .wsfd-ct-list__cards.is-list .wsfd-ct-card__stat:has(.wsfd-ct-card__stat-short)::before {
	color: var(--wsfd-protection, #371f1b);
}

[data-wsfd-card-theme="light"] .wsfd-ct-card__link:hover,
[data-wsfd-card-theme="light"] .wsfd-ct-card__link:focus-visible,
[data-wsfd-card-theme="light"] .wsfd-ct-card__link:visited:hover,
[data-wsfd-card-theme="light"] .wsfd-ct-card__link:visited:focus-visible {
	background: var(--wsfd-protection, #371f1b);
	border-color: var(--wsfd-ember, #633c35);
	color: #fff;
}

[data-wsfd-card-theme="light"] .wsfd-ct-card__link:hover .wsfd-ct-card__title,
[data-wsfd-card-theme="light"] .wsfd-ct-card__link:focus-visible .wsfd-ct-card__title,
[data-wsfd-card-theme="light"] .wsfd-ct-card__link:visited:hover .wsfd-ct-card__title,
[data-wsfd-card-theme="light"] .wsfd-ct-card__link:visited:focus-visible .wsfd-ct-card__title {
	color: #fff;
}

[data-wsfd-card-theme="light"] .wsfd-ct-card__link:hover .wsfd-ct-card__latin,
[data-wsfd-card-theme="light"] .wsfd-ct-card__link:focus-visible .wsfd-ct-card__latin,
[data-wsfd-card-theme="light"] .wsfd-ct-card__link:visited:hover .wsfd-ct-card__latin,
[data-wsfd-card-theme="light"] .wsfd-ct-card__link:visited:focus-visible .wsfd-ct-card__latin,
[data-wsfd-card-theme="light"] .wsfd-ct-card__link:hover .wsfd-ct-card__stats,
[data-wsfd-card-theme="light"] .wsfd-ct-card__link:focus-visible .wsfd-ct-card__stats,
[data-wsfd-card-theme="light"] .wsfd-ct-card__link:visited:hover .wsfd-ct-card__stats,
[data-wsfd-card-theme="light"] .wsfd-ct-card__link:visited:focus-visible .wsfd-ct-card__stats,
[data-wsfd-card-theme="light"] .wsfd-ct-card__link:hover .wsfd-ct-card__stat-full,
[data-wsfd-card-theme="light"] .wsfd-ct-card__link:focus-visible .wsfd-ct-card__stat-full,
[data-wsfd-card-theme="light"] .wsfd-ct-card__link:visited:hover .wsfd-ct-card__stat-full,
[data-wsfd-card-theme="light"] .wsfd-ct-card__link:visited:focus-visible .wsfd-ct-card__stat-full,
[data-wsfd-card-theme="light"] .wsfd-ct-card__link:hover .wsfd-ct-card__stat-short,
[data-wsfd-card-theme="light"] .wsfd-ct-card__link:focus-visible .wsfd-ct-card__stat-short,
[data-wsfd-card-theme="light"] .wsfd-ct-card__link:visited:hover .wsfd-ct-card__stat-short,
[data-wsfd-card-theme="light"] .wsfd-ct-card__link:visited:focus-visible .wsfd-ct-card__stat-short,
[data-wsfd-card-theme="light"] .wsfd-ct-list__cards.is-list .wsfd-ct-card__link:hover .wsfd-ct-card__stat,
[data-wsfd-card-theme="light"] .wsfd-ct-list__cards.is-list .wsfd-ct-card__link:focus-visible .wsfd-ct-card__stat,
[data-wsfd-card-theme="light"] .wsfd-ct-list__cards.is-list .wsfd-ct-card__link:visited:hover .wsfd-ct-card__stat,
[data-wsfd-card-theme="light"] .wsfd-ct-list__cards.is-list .wsfd-ct-card__link:visited:focus-visible .wsfd-ct-card__stat {
	color: #f4ebe0;
}

[data-wsfd-card-theme="light"] .wsfd-ct-card__link:hover .wsfd-ct-card__media,
[data-wsfd-card-theme="light"] .wsfd-ct-card__link:focus-visible .wsfd-ct-card__media {
	border-color: var(--wsfd-ember, #633c35);
}

[data-wsfd-card-theme="light"] .wsfd-ct-list__cards.is-list .wsfd-ct-card__link:hover .wsfd-ct-card__stat:has(.wsfd-ct-card__stat-short)::before,
[data-wsfd-card-theme="light"] .wsfd-ct-list__cards.is-list .wsfd-ct-card__link:focus-visible .wsfd-ct-card__stat:has(.wsfd-ct-card__stat-short)::before {
	color: #fff;
}

/* -------------------------------------------------------------------------- */
/* Single                                                                     */
/* -------------------------------------------------------------------------- */

.wsfd-ct-single {
	width: 100%;
	background: #fff;
}

/* Single hero: shared .wsfd-page-hero--child (pages.css). */

.wsfd-ct-single__layout {
	display: grid;
	grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
	gap: 40px 48px;
	padding: 48px var(--wsfd-page-inline, var(--wsfd-page-gutter, 64px)) 80px;
	box-sizing: border-box;
}

.wsfd-ct-single__media {
	margin: 0;
}

.wsfd-ct-single__media img {
	display: block;
	width: 100%;
	height: auto;
	object-fit: cover;
}

.wsfd-ct-single__section-title {
	margin: 0 0 16px;
	font-family: 'Dunbar Tall', dunbar-tall, var(--wsfd-font-display);
	font-weight: 700;
	font-size: 28px;
	line-height: 1.25;
	color: #371f1b;
}

.wsfd-ct-single__dl {
	margin: 0;
	display: grid;
	gap: 12px;
}

.wsfd-ct-single__dl-row {
	display: grid;
	grid-template-columns: minmax(140px, 220px) minmax(0, 1fr);
	gap: 12px 24px;
	padding-bottom: 12px;
	border-bottom: 1px solid #d2b99a;
}

.wsfd-ct-single__dl-row dt {
	margin: 0;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-family: var(--wsfd-font-body);
	font-weight: 700;
	font-size: 16px;
	color: #371f1b;
}

.wsfd-ct-single__dl-row .wsfd-ct-metric-icon {
	width: 16px;
	height: 16px;
	color: var(--wsfd-protection, #371f1b);
}

.wsfd-ct-single__dl-label {
	min-width: 0;
}

.wsfd-ct-single__dl-row dd {
	margin: 0;
	font-family: var(--wsfd-font-body);
	font-size: 16px;
	color: #000d04;
}

.wsfd-ct-single__story {
	margin-top: 36px;
}

.wsfd-ct-single__content {
	font-family: var(--wsfd-font-body);
	font-size: 18px;
	line-height: 1.55;
	color: #000d04;
}

.wsfd-ct-single__back {
	margin: 36px 0 0;
}

.wsfd-ct-single__back a {
	font-family: var(--wsfd-font-body);
	font-weight: 700;
	font-size: 16px;
	color: #0f5624;
	text-decoration: underline;
	text-underline-offset: 2px;
}

.wsfd-ct-single__back a:focus-visible {
	outline: 2px solid #d1422a;
	outline-offset: 2px;
}

/* -------------------------------------------------------------------------- */
/* TB full-bleed shells (intentional locks — outer shell only)                */
/* Direct-child rows/columns; nested Divi content modules stay editable.      */
/* List photo hero uses shared .wsfd-page-hero--child (pages.css), not CT.    */
/* Still locked: shortcode card chrome, CT list/single layout.                */
/* -------------------------------------------------------------------------- */

body .et_pb_section.wsfd-ct-body,
body .et_pb_section.wsfd-ct-single-body {
	width: 100% !important;
	max-width: none !important;
}

body .et_pb_section.wsfd-ct-body > .et_pb_row,
body .et_pb_section.wsfd-ct-single-body > .et_pb_row {
	width: 100% !important;
	max-width: none !important;
	margin-left: 0 !important;
	margin-right: 0 !important;
	padding-left: 0 !important;
	padding-right: 0 !important;
}

/*
 * Divi Theme Options: @media (min-width:981px) { .et_block_row { padding: 2% 0; } }
 * Zero on CT list/single TB *shell* rows only (same pattern as About / PG).
 */
body.page-id-105 .wsfd-ct-body.et_pb_section > .et_pb_row.et_block_row,
body.single-champion-tree .wsfd-ct-single-body.et_pb_section > .et_pb_row,
body.single-champion-tree .wsfd-ct-single-body.et_pb_section > .et_pb_row.et_block_row {
	padding-top: 0 !important;
	padding-bottom: 0 !important;
	padding: 0 !important;
}

body.page-id-105 .wsfd-ct-body.et_pb_section {
	padding: 0 !important;
}

body.single-champion-tree .wsfd-ct-single-body.et_pb_section {
	padding: 0 !important;
}

/*
 * Legacy CT list TB hero — hide if an old body layout still ships it.
 * Register list now uses shared .wsfd-page-hero--child from the shortcode.
 */
body.page-id-105 .et_pb_section.wsfd-ct-hero {
	display: none !important;
}

/* -------------------------------------------------------------------------- */
/* Responsive                                                                 */
/* -------------------------------------------------------------------------- */

@media (max-width: 1100px) {
	.wsfd-ct-list__cards.is-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 900px) {
	/*
	 * Stack like News (980) / PG (834): when sidebar is full-width above results,
	 * sticky MUST turn off or scrolling cards paint over the filter panel.
	 */
	.wsfd-ct-list {
		flex-direction: column;
		flex-wrap: nowrap;
		padding: 32px var(--wsfd-page-gutter, 24px) 64px;
		gap: 28px;
	}

	.wsfd-ct-list__sidebar {
		flex: none;
		width: 100%;
		position: static;
		z-index: auto;
	}

	.wsfd-ct-list__results {
		width: 100%;
	}

	.wsfd-ct-single__layout {
		grid-template-columns: 1fr;
		padding: 32px var(--wsfd-page-gutter, 24px) 64px;
	}

	.wsfd-ct-list__cards.is-list {
		grid-template-columns:
			calc(var(--wsfd-ct-list-thumb, 64px) + var(--wsfd-ct-list-chrome-x, 18px))
			minmax(0, 1fr)
			var(--wsfd-ct-list-chrome-x, 18px);
	}

	.wsfd-ct-list__cards.is-list .wsfd-ct-card__link {
		row-gap: 8px;
	}

	.wsfd-ct-list__cards.is-list .wsfd-ct-card__identity {
		grid-column: 2;
	}

	.wsfd-ct-list__cards.is-list .wsfd-ct-card__county,
	.wsfd-ct-list__cards.is-list .wsfd-ct-card__stat {
		grid-column: 2;
	}
}

@media (max-width: 640px) {
	.wsfd-ct-list__cards.is-grid {
		grid-template-columns: 1fr;
	}

	.wsfd-ct-single__dl-row {
		grid-template-columns: 1fr;
		gap: 4px;
	}
}
