/**
 * TSO Period Dictionary — SPA styles (v1.0.21 palette rebrand)
 *
 * Palette (locked, from brand guide):
 *   Ink Aubergine  #241730  — Dominant. Type, backgrounds, the ground of the brand.
 *   Amethyst       #6B3FA0  — Primary. Pronunciation, links, category markers, the voice.
 *   Lilac          #CFACDB  — Purple made ambient. Card backgrounds, quiet fills.
 *   Flame          #E55A1C  — The single accent. Dots, entry markers, index tabs, CTAs.
 *                              Never a background fill.
 *   Peach          #F6C4A6  — Soft ground. Highlight cards, warmth, the human layer.
 *                              Never the lead.
 *   Paper          #FAF6EF  — The page. Default background of everything meant to be read.
 *   TSO Teal       #008080  — The parent thread. Language markers, indigenous-language
 *                              tags, TSO co-branding.
 *
 * Design register: editorial dictionary + magazine-cover hero.
 *   - Fraunces serif for terms, titles, eyebrows
 *   - DM Sans for body, UI, controls
 *   - Ink Aubergine hero, Amethyst voice, Flame accent
 */

.tso-pd-spa {
	/* ===== NEW BRAND TOKENS (v1.0.21) ===== */
	--tso-pd-ink-aubergine: #241730;
	--tso-pd-amethyst: #6B3FA0;
	--tso-pd-amethyst-deep: #4A2B70;        /* darker Amethyst for hover/deep states */
	--tso-pd-lilac: #CFACDB;
	--tso-pd-lilac-soft: rgba(207, 172, 219, 0.32);
	--tso-pd-flame: #E55A1C;
	--tso-pd-flame-soft: rgba(229, 90, 28, 0.12);
	--tso-pd-peach: #F6C4A6;
	--tso-pd-peach-soft: rgba(246, 196, 166, 0.32);
	--tso-pd-paper: #FAF6EF;
	--tso-pd-tso-teal: #008080;
	--tso-pd-tso-teal-soft: rgba(0, 128, 128, 0.10);

	/* ===== SEMANTIC TOKENS (map old names → new palette) ===== */
	/* These names are used throughout the codebase; mapping keeps
	 * downstream selectors intact while the palette changes. */
	--tso-pd-primary: #6B3FA0;                  /* was teal → Amethyst (voice) */
	--tso-pd-primary-deep: #4A2B70;             /* darker Amethyst */
	--tso-pd-primary-darkest: #241730;          /* was dark teal → Ink Aubergine */
	--tso-pd-accent: #CFACDB;                   /* was light teal → Lilac (ambient) */
	--tso-pd-accent-soft: rgba(207, 172, 219, 0.32);
	--tso-pd-accent-softer: rgba(207, 172, 219, 0.14);
	--tso-pd-light-accent: #E55A1C;             /* the accent, unchanged in role → Flame */
	--tso-pd-light-accent-soft: rgba(229, 90, 28, 0.12);
	--tso-pd-light-accent-softer: rgba(229, 90, 28, 0.06);
	--tso-pd-ink: #241730;                      /* type — Ink Aubergine */
	--tso-pd-ash: #5B5060;                      /* purple-tinted ash */
	--tso-pd-mist: #948995;                     /* purple-tinted mist */
	--tso-pd-paper-card: #ffffff;               /* pure white for cards on Paper page */
	--tso-pd-cream: #FAF6EF;                    /* Paper (semantic alias) */
	--tso-pd-soft-bg: rgba(246, 196, 166, 0.16);/* Peach at low opacity — the human layer */
	--tso-pd-line: rgba(107, 63, 160, 0.16);    /* Amethyst-tinted lines */
	--tso-pd-line-soft: #E5DDE8;                /* lilac-tinted dividers */
	--tso-pd-shadow-sm: 0 1px 2px rgba(36, 23, 48, 0.06), 0 1px 3px rgba(36, 23, 48, 0.08);
	--tso-pd-shadow-md: 0 4px 6px -1px rgba(36, 23, 48, 0.08), 0 2px 4px -2px rgba(36, 23, 48, 0.06);
	--tso-pd-shadow-lg: 0 10px 25px -3px rgba(107, 63, 160, 0.12), 0 4px 6px -2px rgba(36, 23, 48, 0.06);
	--tso-pd-shadow-hero: 0 12px 40px rgba(36, 23, 48, 0.22);
	--tso-pd-radius: 14px;
	--tso-pd-radius-sm: 8px;
	--tso-pd-radius-lg: 20px;

	--tso-pd-font-serif: 'Fraunces', Georgia, 'Times New Roman', serif;
	--tso-pd-font-sans: 'DM Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

	display: block;
	background: var(--tso-pd-paper);
	color: var(--tso-pd-ink);
	font-family: var(--tso-pd-font-sans);
	line-height: 1.6;
	box-sizing: border-box;
}

.tso-pd-spa *,
.tso-pd-spa *::before,
.tso-pd-spa *::after {
	box-sizing: border-box;
}

/* ========== Pronunciation speaker icon (inline base, also in pass5.css) ========== */

.tso-pd-tts-btn {
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	min-width: 28px;
	padding: 0;
	margin: 0;
	background: rgba(207, 172, 219, 0.12);
	border: 1px solid #CFACDB;
	border-radius: 50%;
	color: #6B3FA0;
	cursor: pointer;
	vertical-align: middle;
	transition: background 0.15s ease, color 0.15s ease, transform 0.1s ease;
	font-family: inherit;
	line-height: 1;
	flex-shrink: 0;
}

.tso-pd-tts-btn:hover {
	background: #6B3FA0;
	color: #fff;
}

.tso-pd-tts-btn:active {
	transform: scale(0.94);
}

.tso-pd-tts-btn svg {
	width: 14px;
	height: 14px;
	display: block;
}

.tso-pd-tts-btn.is-speaking {
	background: #E55A1C;
	border-color: #E55A1C;
	color: #fff;
	animation: tso-pd-tts-pulse 1s infinite ease-in-out;
}

@keyframes tso-pd-tts-pulse {
	0%, 100% { transform: scale(1); }
	50%      { transform: scale(1.08); }
}

/* On dark backgrounds — invert. */
.tso-pd-totd .tso-pd-tts-btn,
.tso-pd-modal__term-row .tso-pd-tts-btn {
	background: rgba(255, 255, 255, 0.16);
	border-color: rgba(255, 255, 255, 0.32);
	color: #fff;
}

.tso-pd-totd .tso-pd-tts-btn:hover,
.tso-pd-modal__term-row .tso-pd-tts-btn:hover {
	background: #fff;
	color: #4A2B70;
}

/* The mount span itself shouldn't have its own dimensions — let the button
 * decide. This prevents the "empty checkbox-like square" issue when the
 * button hasn't been injected yet. */
[data-tso-pd-pronounce] {
	display: inline-flex;
	align-items: center;
	background: transparent;
	border: 0;
	padding: 0;
	margin: 0;
}

[data-tso-pd-pronounce]:empty {
	display: none;
}

/* ========== Loading skeleton ========== */

.tso-pd-spa-skeleton {
	min-height: 280px;
	display: grid;
	place-items: center;
	background: linear-gradient(90deg, var(--tso-pd-soft-bg) 0%, var(--tso-pd-accent-soft) 50%, var(--tso-pd-soft-bg) 100%);
	background-size: 200% 100%;
	animation: tso-pd-shimmer 1.4s infinite linear;
	border-radius: var(--tso-pd-radius);
}

.tso-pd-spa-loading {
	color: var(--tso-pd-ash);
	font-size: 13px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	font-weight: 600;
	font-family: var(--tso-pd-font-sans);
}

@keyframes tso-pd-shimmer {
	0%   { background-position: 200% 0; }
	100% { background-position: -200% 0; }
}

.tso-pd-spa-noscript {
	padding: 20px;
	background: var(--tso-pd-light-accent-soft);
	border-left: 3px solid var(--tso-pd-light-accent);
	color: var(--tso-pd-ink);
	border-radius: var(--tso-pd-radius-sm);
}

@keyframes tso-pd-fade-up {
	from { opacity: 0; transform: translateY(12px); }
	to   { opacity: 1; transform: translateY(0); }
}

@keyframes tso-pd-fade-in {
	from { opacity: 0; }
	to   { opacity: 1; }
}

/* ========== Dark hero (full-bleed centered) ========== */

.tso-pd-hero {
	position: relative;
	overflow: hidden;
	background: linear-gradient(135deg, var(--tso-pd-primary-darkest) 0%, #1A0E22 50%, var(--tso-pd-primary-darkest) 100%);
	color: #fff;
	border-radius: var(--tso-pd-radius);
	box-shadow: var(--tso-pd-shadow-hero);
	margin-bottom: 0;
	animation: tso-pd-fade-up 0.7s cubic-bezier(0.22, 0.61, 0.36, 1) forwards;
}

.tso-pd-hero::before {
	content: "";
	position: absolute;
	inset: 0;
	background:
		radial-gradient(ellipse at 28% 38%, rgba(207, 172, 219, 0.32) 0%, transparent 55%),
		radial-gradient(ellipse at 78% 18%, rgba(229, 90, 28, 0.18) 0%, transparent 50%),
		radial-gradient(ellipse at 65% 90%, rgba(207, 172, 219, 0.14) 0%, transparent 60%);
	pointer-events: none;
}

.tso-pd-hero::after {
	content: "";
	position: absolute;
	inset: 0;
	background: radial-gradient(circle at 88% 88%, rgba(107, 63, 160, 0.18) 0%, transparent 35%);
	pointer-events: none;
}

.tso-pd-hero__inner {
	position: relative;
	z-index: 2;
	max-width: 760px;
	margin: 0 auto;
	padding: 72px 32px 64px 32px;
	text-align: center;
}

@media (max-width: 640px) {
	.tso-pd-hero__inner {
		padding: 48px 22px 40px 22px;
	}
}

.tso-pd-hero__eyebrow {
	display: inline-block;
	margin: 0 0 18px 0;
	font-size: 11px;
	letter-spacing: 0.32em;
	text-transform: uppercase;
	color: var(--tso-pd-light-accent);
	font-weight: 700;
	font-family: var(--tso-pd-font-sans);
}

.tso-pd-hero__title {
	margin: 0 0 14px 0;
	font-family: var(--tso-pd-font-serif);
	font-size: clamp(2.5rem, 5vw + 1rem, 4rem);
	font-weight: 800;
	line-height: 1.02;
	letter-spacing: -0.035em;
	color: #fff;
	font-variation-settings: "opsz" 144;
}

.tso-pd-hero__title-break {
	display: block;
}

.tso-pd-hero__subtitle {
	margin: 0 auto 36px auto;
	max-width: 560px;
	font-size: 16px;
	line-height: 1.55;
	color: rgba(255, 255, 255, 0.72);
	font-family: var(--tso-pd-font-sans);
}

.tso-pd-hero__subtitle-em {
	color: rgba(255, 255, 255, 0.55);
	font-size: 14px;
	display: block;
	margin-top: 4px;
}

/* Hero search bar — backdrop-blurred, floating over the dark gradient */

.tso-pd-hero__search {
	position: relative;
	max-width: 580px;
	margin: 0 auto 36px auto;
}

.tso-pd-hero__search-wrap {
	position: relative;
	z-index: 30;
	display: flex;
	align-items: center;
	background: rgba(255, 255, 255, 0.08);
	border: 2px solid rgba(255, 255, 255, 0.12);
	border-radius: var(--tso-pd-radius);
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
	transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.tso-pd-hero__search-wrap:focus-within {
	border-color: var(--tso-pd-accent);
	background: rgba(255, 255, 255, 0.14);
	box-shadow: 0 0 0 4px rgba(207, 172, 219, 0.15);
}

.tso-pd-hero__search-icon {
	position: absolute;
	left: 20px;
	width: 18px;
	height: 18px;
	color: rgba(255, 255, 255, 0.55);
	pointer-events: none;
}

.tso-pd-hero__search-input {
	flex: 1;
	width: 100%;
	padding: 18px 52px 18px 54px;
	border: 0;
	background: transparent;
	font-size: 16px;
	font-family: var(--tso-pd-font-sans);
	color: #fff;
	outline: none;
}

.tso-pd-hero__search-input::placeholder {
	color: rgba(255, 255, 255, 0.42);
}

.tso-pd-hero__search-clear {
	position: absolute;
	right: 14px;
	width: 30px;
	height: 30px;
	background: rgba(255, 255, 255, 0.14);
	border: 0;
	border-radius: 50%;
	color: rgba(255, 255, 255, 0.85);
	cursor: pointer;
	display: none;
	align-items: center;
	justify-content: center;
	padding: 0;
	font-size: 14px;
	transition: background 0.15s ease;
}

.tso-pd-hero__search-clear.is-visible {
	display: flex;
}

.tso-pd-hero__search-clear:hover {
	background: rgba(255, 255, 255, 0.22);
}

/* ========== Hero search autocomplete dropdown (v1.0.25) ==========
 * Sits beneath the search input, flush-aligned, absolutely positioned
 * inside the search-wrap (which is already position:relative). Hidden by
 * default via the HTML [hidden] attribute; JS flips it on when the
 * /search-suggest call returns one or more items.
 */
.tso-pd-hero__suggest {
	position: absolute;
	top: calc(100% + 6px);
	left: 0;
	right: 0;
	z-index: 20;
	margin: 0;
	padding: 6px 0;
	list-style: none;
	background: var(--tso-pd-paper, #FAF6EF);
	color: var(--tso-pd-ink, #241730);
	border: 1px solid var(--tso-pd-line-soft, #E5DDE8);
	border-radius: var(--tso-pd-radius, 14px);
	box-shadow: 0 16px 40px rgba(36, 23, 48, 0.22);
	max-height: 420px;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
}

.tso-pd-hero__suggest-item {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 12px;
	padding: 10px 16px;
	cursor: pointer;
	font-family: var(--tso-pd-font-sans, 'DM Sans', sans-serif);
	line-height: 1.4;
	transition: background 0.1s ease;
}

.tso-pd-hero__suggest-item:hover,
.tso-pd-hero__suggest-item.is-active {
	background: var(--tso-pd-accent-soft, rgba(207, 172, 219, 0.32));
	color: var(--tso-pd-amethyst-deep, #4A2B70);
}

.tso-pd-hero__suggest-term {
	font-family: var(--tso-pd-font-serif, 'Fraunces', serif);
	font-size: 16px;
	font-weight: 600;
	color: inherit;
	flex: 1 1 auto;
	min-width: 0;
	/* Wrap gracefully for long multi-word terms */
	word-break: break-word;
}

.tso-pd-hero__suggest-meta {
	font-size: 11px;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--tso-pd-amethyst, #6B3FA0);
	flex-shrink: 0;
	font-weight: 700;
}

.tso-pd-hero__suggest-item.is-active .tso-pd-hero__suggest-meta {
	color: var(--tso-pd-amethyst-deep, #4A2B70);
}

/* On very narrow phones the dropdown breaks out of the hero padding
 * if the search-wrap sits in a padded container. Keep it inside. */
@media (max-width: 480px) {
	.tso-pd-hero__suggest {
		max-height: 60vh;
	}
	.tso-pd-hero__suggest-item {
		padding: 12px 14px;
	}
	.tso-pd-hero__suggest-term { font-size: 15px; }
	.tso-pd-hero__suggest-meta { font-size: 10px; }
}

/* Hero stats — inline */

.tso-pd-hero__stats {
	display: inline-flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 40px;
	margin-top: 32px;
	padding-top: 24px;
	border-top: 1px solid rgba(255, 255, 255, 0.10);
	width: 100%;
	max-width: 520px;
}

@media (max-width: 480px) {
	.tso-pd-hero__stats {
		gap: 28px;
		margin-top: 24px;
		padding-top: 20px;
	}
}

.tso-pd-hero__stat {
	display: flex;
	flex-direction: column;
	align-items: center;
}

.tso-pd-hero__stat-num {
	font-family: var(--tso-pd-font-serif);
	font-size: 28px;
	font-weight: 800;
	line-height: 1;
	color: var(--tso-pd-accent);
	font-variant-numeric: tabular-nums;
	letter-spacing: -0.01em;
	margin-bottom: 6px;
}

.tso-pd-hero__stat-label {
	font-size: 10px;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, 0.50);
	font-weight: 500;
}

/* ========== Sticky category bar ========== */

.tso-pd-catbar {
	position: sticky;
	top: 0;
	z-index: 50;
	margin-top: 28px;
	background: var(--tso-pd-cream);
	border-bottom: 1px solid var(--tso-pd-line-soft);
	margin-left: -16px;
	margin-right: -16px;
	padding: 0 16px;
}

.tso-pd-catbar__inner {
	display: flex;
	gap: 8px;
	overflow-x: auto;
	padding: 14px 0;
	scrollbar-width: thin;
	scrollbar-color: var(--tso-pd-accent) transparent;
	scroll-behavior: smooth;
	-webkit-overflow-scrolling: touch;
}

.tso-pd-catbar__inner::-webkit-scrollbar {
	height: 4px;
}

.tso-pd-catbar__inner::-webkit-scrollbar-thumb {
	background: rgba(107, 63, 160, 0.2);
	border-radius: 4px;
}

.tso-pd-cat-btn {
	flex-shrink: 0;
	padding: 8px 16px;
	background: var(--tso-pd-paper);
	border: 1.5px solid var(--tso-pd-line-soft);
	border-radius: 10px;
	font-size: 13px;
	font-weight: 600;
	font-family: var(--tso-pd-font-sans);
	color: var(--tso-pd-ash);
	cursor: pointer;
	white-space: nowrap;
	transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.1s ease;
}

.tso-pd-cat-btn:hover {
	border-color: var(--tso-pd-accent);
	color: var(--tso-pd-primary-deep);
}

.tso-pd-cat-btn:active {
	transform: scale(0.97);
}

.tso-pd-cat-btn.is-active {
	background: var(--tso-pd-accent-soft);
	border-color: var(--tso-pd-primary);
	color: var(--tso-pd-primary-deep);
}

.tso-pd-cat-btn__count {
	margin-left: 6px;
	font-size: 11px;
	opacity: 0.6;
	font-weight: 500;
}

/* ========== Secondary filter row (Language / Age / Type) ========== */

.tso-pd-subfilters {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	align-items: center;
	margin: 18px 0 4px 0;
}

.tso-pd-subfilters__label {
	font-size: 10px;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	font-weight: 700;
	color: var(--tso-pd-ash);
	margin-right: 4px;
}

.tso-pd-chip {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	padding: 5px 11px;
	background: var(--tso-pd-paper);
	border: 1px solid var(--tso-pd-line-soft);
	border-radius: 99px;
	font-size: 12px;
	color: var(--tso-pd-ash);
	cursor: pointer;
	transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
	font-family: var(--tso-pd-font-sans);
	font-weight: 500;
}

.tso-pd-chip:hover {
	border-color: var(--tso-pd-accent);
	color: var(--tso-pd-primary-deep);
}

.tso-pd-chip:active {
	transform: scale(0.96);
}

.tso-pd-chip.is-active {
	background: var(--tso-pd-primary);
	border-color: var(--tso-pd-primary);
	color: #fff;
}

.tso-pd-chip__count {
	font-size: 10px;
	opacity: 0.7;
}

.tso-pd-subfilters__reset {
	margin-left: auto;
	background: transparent;
	border: 0;
	color: var(--tso-pd-light-accent);
	font-size: 12px;
	font-weight: 600;
	cursor: pointer;
	padding: 5px 10px;
	border-radius: 99px;
	transition: background 0.15s ease;
	font-family: var(--tso-pd-font-sans);
	display: none;
}

.tso-pd-subfilters__reset.is-visible {
	display: inline-flex;
}

.tso-pd-subfilters__reset:hover {
	background: var(--tso-pd-light-accent-soft);
}

/* ========== Term of the Day feature card (centered + compact) ========== */

.tso-pd-totd {
	position: relative;
	max-width: 540px;
	margin: 28px auto;
	padding: 28px 32px 26px 32px;
	background: linear-gradient(135deg, var(--tso-pd-primary) 0%, var(--tso-pd-primary-deep) 100%);
	color: #fff;
	border-radius: var(--tso-pd-radius);
	box-shadow: var(--tso-pd-shadow-lg);
	overflow: hidden;
	transition: transform 0.25s cubic-bezier(0.22, 0.61, 0.36, 1), box-shadow 0.25s ease;
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	gap: 8px;
	opacity: 0;
	animation: tso-pd-fade-up 0.5s cubic-bezier(0.22, 0.61, 0.36, 1) 0.1s forwards;
}

@media (max-width: 640px) {
	.tso-pd-totd {
		padding: 22px 22px 20px 22px;
	}
}

.tso-pd-totd::before {
	content: "";
	position: absolute;
	top: -60%;
	right: -20%;
	width: 220px;
	height: 220px;
	background: radial-gradient(circle, var(--tso-pd-accent) 0%, transparent 65%);
	opacity: 0.45;
	border-radius: 50%;
	pointer-events: none;
}

.tso-pd-totd::after {
	content: "";
	position: absolute;
	bottom: -50%;
	left: -10%;
	width: 200px;
	height: 200px;
	background: radial-gradient(circle, var(--tso-pd-light-accent) 0%, transparent 70%);
	opacity: 0.2;
	border-radius: 50%;
	pointer-events: none;
}

.tso-pd-totd__label-col {
	position: relative;
	z-index: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 4px;
}

.tso-pd-totd__label {
	display: inline-block;
	font-size: 9px;
	letter-spacing: 0.24em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, 0.92);
	font-weight: 700;
	font-family: var(--tso-pd-font-sans);
	padding: 4px 11px;
	background: rgba(255, 255, 255, 0.18);
	border-radius: 99px;
}

.tso-pd-totd__date {
	display: block;
	font-size: 10px;
	color: rgba(255, 255, 255, 0.55);
	font-family: var(--tso-pd-font-sans);
	letter-spacing: 0.02em;
}

.tso-pd-totd__content {
	position: relative;
	z-index: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 4px;
	width: 100%;
}

.tso-pd-totd__term-row {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	margin: 4px 0 0 0;
}

.tso-pd-totd__term {
	margin: 0;
	font-family: var(--tso-pd-font-serif);
	font-size: clamp(1.5rem, 2.2vw + 0.5rem, 1.85rem);
	font-weight: 800;
	line-height: 1.1;
	letter-spacing: -0.02em;
	font-variation-settings: "opsz" 144;
}

.tso-pd-totd__phonetic {
	margin: 0;
	font-family: var(--tso-pd-font-serif);
	font-size: 13px;
	font-style: italic;
	color: rgba(255, 255, 255, 0.78);
}

.tso-pd-totd__def {
	margin: 6px auto 12px auto;
	max-width: 440px;
	font-size: 14px;
	line-height: 1.5;
	color: rgba(255, 255, 255, 0.92);
	font-weight: 400;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.tso-pd-totd__cta {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 8px 18px;
	background: #fff;
	color: var(--tso-pd-primary-deep);
	text-decoration: none;
	font-size: 12px;
	font-weight: 600;
	font-family: var(--tso-pd-font-sans);
	border-radius: 99px;
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.tso-pd-totd__cta:hover {
	transform: translateY(-1px);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
	color: var(--tso-pd-primary-deep);
}

.tso-pd-totd__cta-arrow svg {
	width: 12px;
	height: 12px;
}

/* ========== Results meta line ========== */

.tso-pd-meta {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin: 24px 0 14px 0;
	font-size: 13px;
	color: var(--tso-pd-ash);
}

.tso-pd-meta__count {
	font-weight: 500;
	font-family: var(--tso-pd-font-sans);
}

.tso-pd-meta__count strong {
	color: var(--tso-pd-ink);
	font-weight: 700;
}

/* ========== Results grid ========== */

.tso-pd-results {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
	gap: 16px;
	opacity: 0;
	animation: tso-pd-fade-up 0.5s cubic-bezier(0.22, 0.61, 0.36, 1) 0.2s forwards;
}

.tso-pd-results.is-loading {
	opacity: 0.5;
	pointer-events: none;
}

.tso-pd-card {
	position: relative;
	background: var(--tso-pd-paper);
	border: 1px solid var(--tso-pd-line-soft);
	border-radius: var(--tso-pd-radius);
	padding: 22px 24px 20px 24px;
	cursor: pointer;
	transition: transform 0.22s cubic-bezier(0.22, 0.61, 0.36, 1), box-shadow 0.22s ease, border-color 0.22s ease;
	overflow: hidden;
	opacity: 0;
	display: flex;
	flex-direction: column;
	gap: 6px;
	animation: tso-pd-fade-up 0.45s cubic-bezier(0.22, 0.61, 0.36, 1) forwards;
}

.tso-pd-card:hover {
	transform: translateY(-3px);
	box-shadow: 0 12px 40px rgba(107, 63, 160, 0.12);
	border-color: var(--tso-pd-card-cat-color, var(--tso-pd-accent));
}

/* Top accent bar — colored by category */
.tso-pd-card__bar {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 3px;
	background: linear-gradient(90deg, var(--tso-pd-card-cat-color, var(--tso-pd-primary)) 0%, var(--tso-pd-card-cat-color, var(--tso-pd-primary)) 60%, var(--tso-pd-accent) 100%);
}

.tso-pd-card__head {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 10px;
	margin-bottom: 2px;
	margin-top: 4px;
}

.tso-pd-card__eyebrow {
	font-size: 11px;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--tso-pd-card-cat-color, var(--tso-pd-primary));
	font-weight: 700;
	font-family: var(--tso-pd-font-sans);
	min-height: 14px;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	line-height: 1.3;
}

/* "Primary" badge in top-right */
.tso-pd-card__type {
	display: inline-flex;
	padding: 4px 11px;
	font-size: 10px;
	background: var(--tso-pd-accent-soft);
	color: var(--tso-pd-primary-deep);
	border-radius: 99px;
	font-weight: 600;
	letter-spacing: 0.04em;
	white-space: nowrap;
	text-transform: capitalize;
	font-family: var(--tso-pd-font-sans);
}

.tso-pd-card__term-row {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 2px 0 2px 0;
}

.tso-pd-card__term {
	margin: 0;
	font-family: var(--tso-pd-font-serif);
	font-size: 22px;
	font-weight: 700;
	line-height: 1.15;
	color: var(--tso-pd-ink);
	letter-spacing: -0.02em;
	font-variation-settings: "opsz" 144;
	flex: 1 1 auto;
}

.tso-pd-card__phonetic {
	margin: 0 0 8px 0;
	font-family: var(--tso-pd-font-serif);
	font-size: 12px;
	font-style: italic;
	color: var(--tso-pd-ash);
}

.tso-pd-card__pos {
	font-style: normal;
	font-family: var(--tso-pd-font-sans);
	color: var(--tso-pd-ash);
}

.tso-pd-card__simple {
	margin: 0 0 14px 0;
	font-size: 13px;
	line-height: 1.55;
	color: #555;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.tso-pd-card__chips {
	display: flex;
	flex-wrap: wrap;
	gap: 5px;
	margin-top: auto;
}

.tso-pd-card__chip {
	display: inline-flex;
	padding: 3px 10px;
	font-size: 11px;
	border-radius: 99px;
	letter-spacing: 0.02em;
	font-weight: 600;
	font-family: var(--tso-pd-font-sans);
}

.tso-pd-card__chip--age {
	background: var(--tso-pd-accent-soft);
	color: var(--tso-pd-primary-deep);
}

.tso-pd-card__chip--level {
	background: var(--tso-pd-light-accent-soft);
	color: var(--tso-pd-light-accent);
}

.tso-pd-totd__term-row {
	display: flex;
	align-items: center;
	gap: 6px;
	margin: 0 0 4px 0;
}

.tso-pd-modal__term-row {
	display: flex;
	align-items: flex-start;
	gap: 8px;
}

.tso-pd-modal__term-row .tso-pd-modal__term {
	flex: 1 1 auto;
}

/* ========== Pagination ========== */

.tso-pd-pagination {
	display: flex;
	justify-content: center;
	margin-top: 32px;
}

.tso-pd-load-more {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 13px 26px;
	background: var(--tso-pd-paper);
	border: 2px solid var(--tso-pd-primary);
	color: var(--tso-pd-primary-deep);
	font-size: 14px;
	font-weight: 600;
	font-family: var(--tso-pd-font-sans);
	border-radius: 99px;
	cursor: pointer;
	transition: background 0.18s ease, color 0.18s ease, transform 0.1s ease;
}

.tso-pd-load-more:hover {
	background: var(--tso-pd-primary);
	color: #fff;
}

.tso-pd-load-more:active {
	transform: scale(0.98);
}

.tso-pd-load-more:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

/* ========== Empty state ========== */

.tso-pd-empty {
	grid-column: 1 / -1;
	padding: 64px 24px;
	text-align: center;
	background: var(--tso-pd-soft-bg);
	border-radius: var(--tso-pd-radius);
	border: 1px dashed var(--tso-pd-line);
}

.tso-pd-empty__title {
	margin: 0 0 8px 0;
	font-family: var(--tso-pd-font-serif);
	font-size: 19px;
	font-weight: 700;
	color: var(--tso-pd-ink);
}

.tso-pd-empty__body {
	margin: 0;
	color: var(--tso-pd-ash);
	font-size: 14px;
}

/* ========== Modal ========== */

.tso-pd-modal {
	/* Modal is appended to document.body, outside .tso-pd-spa. It needs
	 * its own CSS variable scope or backgrounds and colors fall back to
	 * the property's initial value (transparent, black). */
	--tso-pd-primary: #6B3FA0;
	--tso-pd-primary-deep: #4A2B70;
	--tso-pd-accent: #CFACDB;
	--tso-pd-accent-soft: rgba(207, 172, 219, 0.12);
	--tso-pd-accent-softer: rgba(207, 172, 219, 0.05);
	--tso-pd-light-accent: #E55A1C;
	--tso-pd-light-accent-soft: rgba(229, 90, 28, 0.10);
	--tso-pd-light-accent-softer: rgba(229, 90, 28, 0.05);
	--tso-pd-ink: #1a1816;
	--tso-pd-ash: #5e5b58;
	--tso-pd-paper: #ffffff;
	--tso-pd-soft-bg: rgba(246, 196, 166, 0.16);
	--tso-pd-line: rgba(107, 63, 160, 0.16);
	--tso-pd-line-soft: #E8E7E0;
	--tso-pd-radius: 14px;
	--tso-pd-radius-sm: 8px;
	--tso-pd-radius-lg: 20px;
	--tso-pd-font-serif: 'Fraunces', Georgia, 'Times New Roman', serif;
	--tso-pd-font-sans: 'DM Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

	position: fixed;
	inset: 0;
	z-index: 999999;
	background: rgba(26, 24, 22, 0.55);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.22s ease;
	overflow-y: auto;
	font-family: var(--tso-pd-font-sans);
	color: var(--tso-pd-ink);
}

.tso-pd-modal.is-open {
	opacity: 1;
	pointer-events: auto;
}

.tso-pd-modal__dialog {
	position: relative;
	background: #ffffff;
	background: var(--tso-pd-paper, #ffffff);
	border-radius: var(--tso-pd-radius-lg, 20px);
	max-width: 740px;
	width: 100%;
	max-height: 90vh;
	/* Dialog is now a flex column. Header sits on top, body scrolls.
	 * Overflow handling moved to .tso-pd-modal__body. */
	display: flex;
	flex-direction: column;
	overflow: hidden;
	box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
	transform: scale(0.96) translateY(8px);
	transition: transform 0.25s cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* Header — slim white bar pinned to top of dialog with the close button.
 * On mobile this becomes the always-visible "exit" affordance. */
.tso-pd-modal__header {
	position: relative;
	z-index: 5;
	background: #fff;
	background: var(--tso-pd-paper, #fff);
	padding: 14px 18px;
	display: flex;
	justify-content: flex-end;
	align-items: center;
	border-bottom: 1px solid transparent;
	transition: border-color 0.18s ease, box-shadow 0.18s ease;
	flex-shrink: 0;
}

/* Subtle shadow appears under header once body scrolls, indicating
 * scroll position. Driven by JS adding .has-scrolled to dialog. */
.tso-pd-modal__dialog.has-scrolled .tso-pd-modal__header {
	border-bottom-color: var(--tso-pd-line-soft, #E8E7E0);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

/* Scrollable body — this is the actual scroll container now */
.tso-pd-modal__body {
	flex: 1 1 auto;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch; /* iOS momentum scroll */
	padding: 8px 40px 32px 40px;
}

.tso-pd-modal__dialog::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 3px;
	background: linear-gradient(90deg, var(--tso-pd-primary), var(--tso-pd-accent), var(--tso-pd-light-accent));
	border-radius: var(--tso-pd-radius-lg) var(--tso-pd-radius-lg) 0 0;
	z-index: 6;
	pointer-events: none;
}

.tso-pd-modal.is-open .tso-pd-modal__dialog {
	transform: scale(1) translateY(0);
}

@media (max-width: 600px) {
	.tso-pd-modal {
		padding: 0;
	}
	.tso-pd-modal__dialog {
		max-height: 100vh;
		max-height: 100dvh;
		height: 100vh;
		height: 100dvh;
		border-radius: 0;
	}
	.tso-pd-modal__dialog::before {
		border-radius: 0;
	}
	/* Mobile header: extra top padding to clear iOS Dynamic Island / notch.
	 * Solid white background ensures the close button is always readable. */
	.tso-pd-modal__header {
		padding: calc(12px + env(safe-area-inset-top, 0px)) 16px 12px 16px;
		background: #fff;
	}
	/* Mobile body: more compact padding */
	.tso-pd-modal__body {
		padding: 6px 22px calc(28px + env(safe-area-inset-bottom, 0px)) 22px;
	}
	/* Mobile close button: 44x44 tap target */
	.tso-pd-modal__close {
		width: 44px;
		height: 44px;
		font-size: 20px;
	}
	/* Term name shrinks on small screens so it fits */
	.tso-pd-modal__term {
		font-size: 28px;
		line-height: 1.1;
	}
}

.tso-pd-modal__close {
	width: 38px;
	height: 38px;
	background: var(--tso-pd-primary-deep, #4A2B70);
	border: 0;
	border-radius: 50%;
	color: #fff;
	cursor: pointer;
	font-size: 18px;
	font-weight: 700;
	line-height: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 0.15s ease, transform 0.12s ease, box-shadow 0.15s ease;
	box-shadow: 0 4px 12px rgba(36, 23, 48, 0.25);
	flex-shrink: 0;
	padding: 0;
	/* Blink: soft brightness pulse + halo ring so visitors always notice
	 * the close action is available. Slower than 1s so it doesn't feel
	 * frantic. Pauses on hover so it's stable when about to click. */
	animation: tso-pd-modal-close-pulse 2.4s ease-in-out infinite;
}

.tso-pd-modal__close > svg {
	width: 20px;
	height: 20px;
	display: block;
	flex-shrink: 0;
	stroke: #fff;
	stroke-width: 2.4;
	fill: none;
}

.tso-pd-modal__close:hover {
	background: var(--tso-pd-light-accent, #E55A1C);
	transform: scale(1.06);
	color: #fff;
	box-shadow: 0 6px 16px rgba(229, 90, 28, 0.35);
	animation-play-state: paused;
}

.tso-pd-modal__close:active {
	transform: scale(0.96);
}

@keyframes tso-pd-modal-close-pulse {
	0%, 100% {
		box-shadow: 0 4px 12px rgba(36, 23, 48, 0.25);
	}
	50% {
		box-shadow: 0 4px 14px rgba(36, 23, 48, 0.35), 0 0 0 6px rgba(229, 90, 28, 0.20);
	}
}

@media (prefers-reduced-motion: reduce) {
	.tso-pd-modal__close { animation: none; }
}

.tso-pd-modal__eyebrow {
	margin: 0 0 8px 0;
	font-size: 11px;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--tso-pd-primary);
	font-weight: 700;
	font-family: var(--tso-pd-font-sans);
}

.tso-pd-modal__term {
	margin: 0 0 6px 0;
	font-family: var(--tso-pd-font-serif);
	font-size: clamp(1.75rem, 3.2vw + 0.5rem, 2.5rem);
	line-height: 1.05;
	font-weight: 800;
	color: var(--tso-pd-ink);
	letter-spacing: -0.025em;
	padding-right: 44px;
	font-variation-settings: "opsz" 144;
}

.tso-pd-modal__phonetic {
	margin: 0 0 16px 0;
	font-family: var(--tso-pd-font-serif);
	font-size: 15px;
	font-style: italic;
	color: var(--tso-pd-primary);
}

.tso-pd-modal__chips {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin: 0 0 24px 0;
	padding-bottom: 22px;
	border-bottom: 1px solid var(--tso-pd-line-soft);
}

.tso-pd-modal__chips .tso-pd-chip {
	cursor: default;
	padding: 4px 11px;
}

.tso-pd-modal__section {
	margin-bottom: 22px;
}

.tso-pd-modal__section-title {
	margin: 0 0 10px 0;
	font-size: 11px;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--tso-pd-primary);
	font-weight: 700;
	font-family: var(--tso-pd-font-sans);
}

/* ========== Color-coded info boxes ========== */

.tso-pd-info-box {
	border-radius: var(--tso-pd-radius-sm);
	padding: 18px 22px;
	margin-bottom: 14px;
	border-left: 4px solid;
	font-family: var(--tso-pd-font-sans);
}

.tso-pd-info-box:last-child {
	margin-bottom: 0;
}

.tso-pd-info-box p {
	margin: 0;
	font-size: 15px;
	line-height: 1.65;
	color: var(--tso-pd-ink);
}

.tso-pd-info-box p + p {
	margin-top: 10px;
}

.tso-pd-info-box__label {
	display: block;
	margin: 0 0 8px 0;
	font-size: 10px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.14em;
}

/* Teal — Definition, Health Guidance, Fact, Cultural Notes Global */
.tso-pd-info-box--teal {
	background: var(--tso-pd-accent-soft);
	border-left-color: var(--tso-pd-primary);
}
.tso-pd-info-box--teal .tso-pd-info-box__label {
	color: var(--tso-pd-primary);
}

/* Warm — Cultural Notes Africa, Myth */
.tso-pd-info-box--warm {
	background: var(--tso-pd-light-accent-soft);
	border-left-color: var(--tso-pd-light-accent);
}
.tso-pd-info-box--warm .tso-pd-info-box__label {
	color: var(--tso-pd-light-accent);
}

/* Light teal accent — Simple Definition, Example */
.tso-pd-info-box--accent {
	background: var(--tso-pd-accent-softer);
	border-left-color: var(--tso-pd-accent);
}
.tso-pd-info-box--accent .tso-pd-info-box__label {
	color: var(--tso-pd-primary-deep);
}

/* Muted — Synonyms, secondary metadata */
.tso-pd-info-box--muted {
	background: var(--tso-pd-soft-bg);
	border-left-color: var(--tso-pd-line);
}
.tso-pd-info-box--muted .tso-pd-info-box__label {
	color: var(--tso-pd-ash);
}

/* Example as italicized quote */
.tso-pd-info-box__example {
	font-family: var(--tso-pd-font-serif);
	font-style: italic;
	font-size: 16px !important;
}

/* Simple definition lede */
.tso-pd-modal__lede {
	padding: 16px 22px;
	background: var(--tso-pd-accent-soft);
	border-left: 4px solid var(--tso-pd-primary);
	border-radius: var(--tso-pd-radius-sm);
	font-size: 16px;
	color: var(--tso-pd-ink);
	font-weight: 500;
	margin-bottom: 22px;
	line-height: 1.55;
}

.tso-pd-modal__body {
	font-size: 15px;
	line-height: 1.7;
	color: var(--tso-pd-ink);
	font-family: var(--tso-pd-font-sans);
}

.tso-pd-modal__body p {
	margin: 0 0 14px 0;
}

.tso-pd-modal__body p:last-child {
	margin-bottom: 0;
}

/* ========== Cultural notes tabs ========== */

.tso-pd-modal__tabs {
	display: flex;
	gap: 2px;
	margin-bottom: 14px;
	border-bottom: 2px solid var(--tso-pd-line-soft);
}

.tso-pd-modal__tab {
	appearance: none;
	background: transparent;
	border: 0;
	padding: 11px 18px;
	font-size: 13px;
	font-weight: 500;
	font-family: var(--tso-pd-font-sans);
	color: var(--tso-pd-ash);
	cursor: pointer;
	border-bottom: 3px solid transparent;
	margin-bottom: -2px;
	transition: color 0.15s ease, border-color 0.15s ease;
}

.tso-pd-modal__tab.is-active {
	color: var(--tso-pd-primary-deep);
	border-bottom-color: var(--tso-pd-primary);
	font-weight: 700;
}

.tso-pd-modal__tab-panel[hidden] {
	display: none;
}

/* ========== Myth + Fact dual-panel ========== */

.tso-pd-mf {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 14px;
}

@media (max-width: 540px) {
	.tso-pd-mf {
		grid-template-columns: 1fr;
	}
}

.tso-pd-mf__myth,
.tso-pd-mf__fact {
	padding: 18px 20px;
	border-radius: var(--tso-pd-radius-sm);
	font-size: 14px;
	line-height: 1.55;
	border-left: 4px solid;
	font-family: var(--tso-pd-font-sans);
}

.tso-pd-mf__myth {
	background: var(--tso-pd-light-accent-soft);
	border-left-color: var(--tso-pd-light-accent);
}

.tso-pd-mf__fact {
	background: var(--tso-pd-accent-soft);
	border-left-color: var(--tso-pd-primary);
}

.tso-pd-mf__label {
	margin: 0 0 8px 0;
	font-size: 10px;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	font-weight: 700;
}

.tso-pd-mf__myth .tso-pd-mf__label {
	color: var(--tso-pd-light-accent);
}

.tso-pd-mf__fact .tso-pd-mf__label {
	color: var(--tso-pd-primary);
}

.tso-pd-mf__myth p:last-child,
.tso-pd-mf__fact p:last-child {
	margin: 0;
}

.tso-pd-mf__myth p.tso-pd-mf__body {
	font-style: italic;
	font-family: var(--tso-pd-font-serif);
}

/* ========== Chips list inside modal ========== */

.tso-pd-chiplist {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 5px;
}

.tso-pd-chiplist .tso-pd-chip {
	cursor: default;
	font-size: 12px;
	padding: 4px 11px;
}

.tso-pd-chiplist .tso-pd-chip--link {
	cursor: pointer;
	border-color: var(--tso-pd-accent);
}

.tso-pd-chiplist .tso-pd-chip--link:hover {
	background: var(--tso-pd-accent);
	color: #fff;
	border-color: var(--tso-pd-accent);
}

.tso-pd-chiplist .tso-pd-chip--link a {
	color: inherit;
	text-decoration: none;
}

/* ========== Sources + CTA ========== */

.tso-pd-modal__sources {
	padding: 18px 22px;
	background: var(--tso-pd-soft-bg);
	border-radius: var(--tso-pd-radius-sm);
}

.tso-pd-modal__sources a {
	display: inline-flex;
	color: var(--tso-pd-primary-deep);
	text-decoration: none;
	font-size: 13px;
	font-weight: 500;
	margin-right: 12px;
}

.tso-pd-modal__sources a:hover {
	text-decoration: underline;
}

.tso-pd-modal__cta {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin-top: 10px;
	padding: 11px 20px;
	background: var(--tso-pd-primary);
	color: #fff;
	text-decoration: none;
	font-size: 13px;
	font-weight: 600;
	font-family: var(--tso-pd-font-sans);
	border-radius: 99px;
	transition: background 0.15s ease, transform 0.1s ease;
}

.tso-pd-modal__cta:hover {
	background: var(--tso-pd-primary-deep);
	color: #fff;
}

/* ========== Compact ToD widget mode ========== */

.tso-pd-spa[data-mode="totd"] .tso-pd-totd {
	max-width: 540px;
	margin: 0 auto;
}

/* ========== Search-only mode ========== */

.tso-pd-spa[data-mode="search"] .tso-pd-searchbar {
	margin-bottom: 16px;
	position: relative;
}

.tso-pd-spa[data-mode="search"] .tso-pd-searchbar__wrap {
	position: relative;
	display: flex;
	align-items: center;
	background: var(--tso-pd-paper);
	border: 2px solid var(--tso-pd-line);
	border-radius: var(--tso-pd-radius);
	transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.tso-pd-spa[data-mode="search"] .tso-pd-searchbar__wrap:focus-within {
	border-color: var(--tso-pd-primary);
	box-shadow: 0 0 0 4px var(--tso-pd-accent-soft);
}

.tso-pd-spa[data-mode="search"] .tso-pd-searchbar__icon {
	position: absolute;
	left: 18px;
	width: 18px;
	height: 18px;
	color: var(--tso-pd-mist);
	pointer-events: none;
}

.tso-pd-spa[data-mode="search"] .tso-pd-searchbar__input {
	flex: 1;
	width: 100%;
	padding: 16px 50px 16px 50px;
	border: 0;
	background: transparent;
	font-size: 16px;
	font-family: var(--tso-pd-font-sans);
	color: var(--tso-pd-ink);
	outline: none;
}

.tso-pd-spa[data-mode="search"] .tso-pd-searchbar__input::placeholder {
	color: var(--tso-pd-mist);
}

.tso-pd-spa[data-mode="search"] .tso-pd-searchbar__clear {
	position: absolute;
	right: 12px;
	width: 28px;
	height: 28px;
	background: var(--tso-pd-soft-bg);
	border: 0;
	border-radius: 50%;
	color: var(--tso-pd-ash);
	cursor: pointer;
	display: none;
	align-items: center;
	justify-content: center;
	padding: 0;
	transition: background 0.15s ease, color 0.15s ease;
	font-size: 14px;
}

.tso-pd-spa[data-mode="search"] .tso-pd-searchbar__clear.is-visible {
	display: flex;
}

.tso-pd-spa[data-mode="search"] .tso-pd-searchbar__clear:hover {
	background: var(--tso-pd-light-accent-soft);
	color: var(--tso-pd-light-accent);
}

.tso-pd-spa[data-mode="search"] .tso-pd-suggest {
	position: absolute;
	top: calc(100% + 4px);
	left: 0;
	right: 0;
	background: var(--tso-pd-paper);
	border: 1px solid var(--tso-pd-line);
	border-radius: var(--tso-pd-radius-sm);
	box-shadow: var(--tso-pd-shadow-lg);
	max-height: 360px;
	overflow-y: auto;
	z-index: 100;
	display: none;
}

.tso-pd-spa[data-mode="search"] .tso-pd-suggest.is-visible {
	display: block;
}

.tso-pd-suggest__item {
	display: block;
	padding: 12px 18px;
	border-bottom: 1px solid var(--tso-pd-line-soft);
	color: var(--tso-pd-ink);
	text-decoration: none;
	font-size: 14px;
	transition: background 0.12s ease;
	font-family: var(--tso-pd-font-sans);
}

.tso-pd-suggest__item:last-child {
	border-bottom: 0;
}

.tso-pd-suggest__item:hover,
.tso-pd-suggest__item:focus {
	background: var(--tso-pd-accent-soft);
	color: var(--tso-pd-primary-deep);
	outline: 0;
}

.tso-pd-suggest__term {
	font-weight: 600;
	font-family: var(--tso-pd-font-serif);
}

.tso-pd-suggest__type {
	font-size: 11px;
	color: var(--tso-pd-ash);
	margin-left: 8px;
	font-family: var(--tso-pd-font-sans);
}

/* ========== Reduced motion ========== */

@media (prefers-reduced-motion: reduce) {
	.tso-pd-spa *,
	.tso-pd-spa *::before,
	.tso-pd-spa *::after,
	.tso-pd-modal,
	.tso-pd-modal__dialog {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
	}
}

/* ========== Top Navigation Bar (rendered above hero) ========== */

.tso-pd-topnav {
	position: relative;
	background: linear-gradient(135deg, #0A0512 0%, var(--tso-pd-primary-darkest, #241730) 100%);
	color: #fff;
	border-radius: var(--tso-pd-radius) var(--tso-pd-radius) 0 0;
	overflow: hidden;
	margin-bottom: -1px;
}

.tso-pd-topnav::before {
	content: "";
	position: absolute;
	inset: 0;
	background: radial-gradient(ellipse at 85% 0%, rgba(207, 172, 219, 0.18) 0%, transparent 60%);
	pointer-events: none;
}

.tso-pd-topnav__inner {
	position: relative;
	z-index: 2;
	max-width: 1200px;
	margin: 0 auto;
	padding: 16px 28px;
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 16px;
	flex-wrap: wrap;
}

@media (max-width: 640px) {
	.tso-pd-topnav__inner {
		padding: 14px 18px;
	}
}

.tso-pd-topnav__brand {
	display: flex;
	align-items: center;
	gap: 12px;
	text-decoration: none;
	color: #fff;
}

.tso-pd-topnav__brand-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	font-size: 20px;
	background: linear-gradient(135deg, var(--tso-pd-primary, #6B3FA0) 0%, var(--tso-pd-primary-deep, #4A2B70) 100%);
	border-radius: 10px;
}

.tso-pd-topnav__brand-text {
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.tso-pd-topnav__brand-title {
	font-family: var(--tso-pd-font-serif, 'Fraunces', serif);
	font-size: 16px;
	font-weight: 700;
	color: #fff;
	letter-spacing: -0.3px;
	line-height: 1.1;
}

.tso-pd-topnav__brand-sub {
	color: var(--tso-pd-accent, #CFACDB);
	font-size: 10px;
	font-weight: 600;
	letter-spacing: 0.18em;
	text-transform: uppercase;
}

.tso-pd-topnav__buttons {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
}

.tso-pd-topnav__btn {
	background: rgba(255, 255, 255, 0.08);
	border: 1px solid rgba(255, 255, 255, 0.15);
	border-radius: 10px;
	padding: 8px 14px;
	color: #fff;
	font-size: 12px;
	font-weight: 600;
	font-family: var(--tso-pd-font-sans, 'DM Sans', sans-serif);
	text-decoration: none;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	transition: background 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
	cursor: pointer;
}

.tso-pd-topnav__btn:hover {
	background: rgba(255, 255, 255, 0.14);
	border-color: rgba(255, 255, 255, 0.25);
	color: #fff;
}

.tso-pd-topnav__btn--primary {
	background: var(--tso-pd-primary, #6B3FA0);
	border-color: var(--tso-pd-primary, #6B3FA0);
}

.tso-pd-topnav__btn--primary:hover {
	background: var(--tso-pd-primary-deep, #4A2B70);
	border-color: var(--tso-pd-primary-deep, #4A2B70);
}

/* Hero connects to the topnav — kill the upper radius so they merge */
.tso-pd-topnav + .tso-pd-hero {
	border-top-left-radius: 0;
	border-top-right-radius: 0;
}

/* ========== Footer (four columns + bottom strip) ========== */

.tso-pd-footer {
	margin: 56px -16px -16px -16px;
	padding: 48px 28px 28px 28px;
	background: linear-gradient(135deg, var(--tso-pd-primary-darkest, #241730) 0%, #0A0512 100%);
	color: rgba(255, 255, 255, 0.78);
	border-radius: var(--tso-pd-radius);
	font-family: var(--tso-pd-font-sans, 'DM Sans', sans-serif);
}

.tso-pd-footer__inner {
	max-width: 1100px;
	margin: 0 auto;
}

.tso-pd-footer__grid {
	display: grid;
	grid-template-columns: 1.6fr 1fr 1fr 1fr;
	gap: 36px;
	padding-bottom: 36px;
	border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

@media (max-width: 800px) {
	.tso-pd-footer__grid {
		grid-template-columns: 1fr 1fr;
		gap: 28px;
	}
}

@media (max-width: 480px) {
	.tso-pd-footer__grid {
		grid-template-columns: 1fr;
		gap: 28px;
	}
}

.tso-pd-footer__col--brand {
	max-width: 280px;
}

.tso-pd-footer__brand-row {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 14px;
}

.tso-pd-footer__brand-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	font-size: 16px;
	background: linear-gradient(135deg, var(--tso-pd-primary, #6B3FA0) 0%, var(--tso-pd-primary-deep, #4A2B70) 100%);
	border-radius: 8px;
}

.tso-pd-footer__brand-title {
	font-family: var(--tso-pd-font-serif, 'Fraunces', serif);
	font-size: 16px;
	font-weight: 700;
	color: #fff;
	letter-spacing: -0.3px;
}

.tso-pd-footer__brand-body {
	margin: 0;
	font-size: 13px;
	line-height: 1.6;
	color: rgba(255, 255, 255, 0.58);
}

.tso-pd-footer__col-head {
	font-size: 11px;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--tso-pd-accent, #CFACDB);
	font-weight: 700;
	margin-bottom: 14px;
}

.tso-pd-footer__links {
	display: flex;
	flex-direction: column;
	gap: 9px;
}

.tso-pd-footer__links a {
	color: rgba(255, 255, 255, 0.72);
	text-decoration: none;
	font-size: 13px;
	transition: color 0.15s ease;
}

.tso-pd-footer__links a:hover {
	color: #fff;
}

.tso-pd-footer__bottom {
	display: flex;
	justify-content: space-between;
	align-items: center;
	flex-wrap: wrap;
	gap: 12px;
	padding-top: 24px;
	font-size: 12px;
	color: rgba(255, 255, 255, 0.42);
}

.tso-pd-footer__bottom p {
	margin: 0;
}

/* ========== Term of the Day side drawer ========== */

.tso-pd-tod-trigger {
	position: fixed;
	right: 0;
	top: 50%;
	transform: translate(0, -50%) rotate(-90deg);
	transform-origin: 100% 100%;
	background: linear-gradient(135deg, var(--tso-pd-primary, #6B3FA0) 0%, var(--tso-pd-primary-deep, #4A2B70) 100%);
	color: #fff;
	border: 0;
	border-radius: 12px 12px 0 0;
	padding: 11px 22px 12px 18px;
	font-family: var(--tso-pd-font-sans, 'DM Sans', sans-serif);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	gap: 10px;
	z-index: 99996;
	box-shadow: 0 8px 28px rgba(36, 23, 48, 0.35);
	transition: transform 0.3s cubic-bezier(0.22, 0.61, 0.36, 1), box-shadow 0.2s ease, padding 0.2s ease;
	margin-right: -1px;
}

.tso-pd-tod-trigger:hover {
	box-shadow: 0 12px 32px rgba(36, 23, 48, 0.45);
	padding-right: 28px;
}

.tso-pd-tod-trigger.is-hidden {
	transform: translate(100%, -50%) rotate(-90deg);
	pointer-events: none;
}

/* Blinking dot */
.tso-pd-tod-trigger__dot {
	display: inline-block;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--tso-pd-light-accent, #E55A1C);
	box-shadow: 0 0 0 0 rgba(229, 90, 28, 0.7);
	animation: tso-pd-blink 1.6s ease-in-out infinite;
}

@keyframes tso-pd-blink {
	0%   { box-shadow: 0 0 0 0 rgba(229, 90, 28, 0.7); opacity: 1; }
	70%  { box-shadow: 0 0 0 10px rgba(229, 90, 28, 0); opacity: 0.85; }
	100% { box-shadow: 0 0 0 0 rgba(229, 90, 28, 0); opacity: 1; }
}

.tso-pd-tod-trigger__text {
	display: inline-block;
	line-height: 1;
}

/* The drawer panel — slides in from the right */
.tso-pd-tod-drawer {
	--tso-pd-primary: #6B3FA0;
	--tso-pd-primary-deep: #4A2B70;
	--tso-pd-primary-darkest: #241730;
	--tso-pd-accent: #CFACDB;
	--tso-pd-light-accent: #E55A1C;
	--tso-pd-font-serif: 'Fraunces', Georgia, serif;
	--tso-pd-font-sans: 'DM Sans', system-ui, sans-serif;

	position: fixed;
	top: 0;
	right: 0;
	bottom: 0;
	width: 380px;
	max-width: 92vw;
	z-index: 99998;
	background: linear-gradient(160deg, var(--tso-pd-primary-darkest) 0%, #1A0E22 60%, var(--tso-pd-primary-darkest) 100%);
	color: #fff;
	padding: 64px 32px 32px 32px;
	transform: translateX(100%);
	transition: transform 0.32s cubic-bezier(0.22, 0.61, 0.36, 1);
	box-shadow: -20px 0 50px rgba(36, 23, 48, 0.4);
	overflow-y: auto;
	font-family: var(--tso-pd-font-sans);
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.tso-pd-tod-drawer::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 220px;
	background: radial-gradient(ellipse at 50% 0%, rgba(207, 172, 219, 0.28) 0%, transparent 60%);
	pointer-events: none;
}

.tso-pd-tod-drawer.is-open {
	transform: translateX(0);
}

.tso-pd-tod-backdrop {
	position: fixed;
	inset: 0;
	z-index: 99997;
	background: rgba(0, 30, 25, 0.42);
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.32s ease;
	backdrop-filter: blur(2px);
	-webkit-backdrop-filter: blur(2px);
}

.tso-pd-tod-backdrop.is-open {
	opacity: 1;
	pointer-events: auto;
}

.tso-pd-tod-drawer__close {
	position: absolute;
	top: 16px;
	right: 16px;
	width: 32px;
	height: 32px;
	background: rgba(255, 255, 255, 0.12);
	border: 0;
	border-radius: 50%;
	color: #fff;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 0.15s ease;
	z-index: 2;
}

.tso-pd-tod-drawer__close:hover {
	background: rgba(255, 255, 255, 0.22);
}

.tso-pd-tod-drawer__close svg {
	display: block;
}

.tso-pd-tod-drawer__label-row {
	position: relative;
	z-index: 1;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 6px;
	margin-bottom: 4px;
}

.tso-pd-tod-drawer__label {
	display: inline-block;
	padding: 4px 12px;
	background: rgba(255, 255, 255, 0.16);
	border-radius: 99px;
	font-size: 9px;
	letter-spacing: 0.24em;
	text-transform: uppercase;
	font-weight: 700;
	color: rgba(255, 255, 255, 0.95);
}

.tso-pd-tod-drawer__date {
	font-size: 11px;
	color: rgba(255, 255, 255, 0.5);
	letter-spacing: 0.02em;
}

.tso-pd-tod-drawer__term-row {
	position: relative;
	z-index: 1;
	display: flex;
	align-items: center;
	gap: 8px;
	margin-top: 4px;
}

.tso-pd-tod-drawer__term {
	margin: 0;
	font-family: var(--tso-pd-font-serif);
	font-size: 30px;
	font-weight: 800;
	line-height: 1.05;
	letter-spacing: -0.025em;
	color: #fff;
	font-variation-settings: "opsz" 144;
}

.tso-pd-tod-drawer__phonetic {
	position: relative;
	z-index: 1;
	margin: 4px 0 6px 0;
	font-family: var(--tso-pd-font-serif);
	font-size: 14px;
	font-style: italic;
	color: rgba(255, 255, 255, 0.7);
}

.tso-pd-tod-drawer__cat {
	position: relative;
	z-index: 1;
	margin: 0 0 8px 0;
	font-size: 11px;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	font-weight: 700;
	font-family: var(--tso-pd-font-sans);
	display: flex;
	align-items: center;
}

.tso-pd-tod-drawer__def {
	position: relative;
	z-index: 1;
	margin: 8px 0 20px 0;
	padding: 16px 18px;
	background: rgba(255, 255, 255, 0.08);
	border-left: 3px solid var(--tso-pd-accent);
	border-radius: 8px;
	font-size: 14.5px;
	line-height: 1.6;
	color: rgba(255, 255, 255, 0.92);
}

.tso-pd-tod-drawer__cta {
	position: relative;
	z-index: 1;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin-top: auto;
	padding: 11px 22px;
	background: #fff;
	color: var(--tso-pd-primary-deep);
	text-decoration: none;
	font-size: 13px;
	font-weight: 700;
	font-family: var(--tso-pd-font-sans);
	border-radius: 99px;
	transition: transform 0.15s ease, box-shadow 0.15s ease;
	align-self: flex-start;
}

.tso-pd-tod-drawer__cta:hover {
	transform: translateY(-1px);
	box-shadow: 0 8px 20px rgba(0, 0, 0, 0.22);
	color: var(--tso-pd-primary-deep);
}

.tso-pd-tod-drawer__cta-arrow svg {
	width: 14px;
	height: 14px;
}

/* Speaker button on the dark drawer — invert */
.tso-pd-tod-drawer .tso-pd-tts-btn {
	background: rgba(255, 255, 255, 0.18);
	border-color: rgba(255, 255, 255, 0.36);
	color: #fff;
}

.tso-pd-tod-drawer .tso-pd-tts-btn:hover {
	background: #fff;
	color: var(--tso-pd-primary-deep);
}

/* Hide the trigger on very narrow screens — drawer still openable via menu links */
@media (max-width: 380px) {
	.tso-pd-tod-trigger__text {
		display: none;
	}
	.tso-pd-tod-trigger {
		padding: 11px 14px;
	}
}

/* ========== About PERIOD. modal ========== */

.tso-pd-about-modal {
	--tso-pd-primary: #6B3FA0;
	--tso-pd-primary-deep: #4A2B70;
	--tso-pd-primary-darkest: #241730;
	--tso-pd-accent: #CFACDB;
	--tso-pd-accent-soft: rgba(107, 63, 160, 0.12);
	--tso-pd-light-accent: #E55A1C;
	--tso-pd-tso-teal: #008080;
	--tso-pd-ink: #241730;
	--tso-pd-ash: #5B5060;
	--tso-pd-paper: #ffffff;
	--tso-pd-cream: #FAF6EF;
	--tso-pd-soft-bg: rgba(246, 196, 166, 0.16);
	--tso-pd-line-soft: #E5DDE8;
	--tso-pd-radius: 14px;
	--tso-pd-radius-sm: 8px;
	--tso-pd-radius-lg: 20px;
	--tso-pd-font-serif: 'Fraunces', Georgia, 'Times New Roman', serif;
	--tso-pd-font-sans: 'DM Sans', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;

	position: fixed;
	inset: 0;
	z-index: 999999;
	background: rgba(0, 30, 25, 0.55);
	display: flex;
	align-items: flex-start;
	justify-content: center;
	padding: 40px 20px;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.28s ease;
	overflow-y: auto;
	font-family: var(--tso-pd-font-sans);
	color: var(--tso-pd-ink);
}

.tso-pd-about-modal.is-open {
	opacity: 1;
	pointer-events: auto;
}

@media (max-width: 600px) {
	.tso-pd-about-modal { padding: 0; }
}

.tso-pd-about-modal__dialog {
	position: relative;
	background: var(--tso-pd-cream, #FAF6EF);
	border-radius: var(--tso-pd-radius-lg);
	max-width: 900px;
	width: 100%;
	padding: 48px 40px 36px 40px;
	box-shadow: 0 25px 60px -12px rgba(0, 0, 0, 0.3);
	transform: scale(0.96) translateY(12px);
	transition: transform 0.32s cubic-bezier(0.22, 0.61, 0.36, 1);
	margin: auto;
}

.tso-pd-about-modal.is-open .tso-pd-about-modal__dialog {
	transform: scale(1) translateY(0);
}

@media (max-width: 600px) {
	.tso-pd-about-modal__dialog {
		border-radius: 0;
		max-width: 100%;
		min-height: 100vh;
		padding: 36px 22px 28px 22px;
	}
}

.tso-pd-about-modal__close {
	position: absolute;
	top: 16px;
	right: 16px;
	width: 36px;
	height: 36px;
	background: rgba(0, 0, 0, 0.06);
	border: 0;
	border-radius: 50%;
	color: var(--tso-pd-ash);
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 0.15s ease, color 0.15s ease;
	z-index: 2;
}

.tso-pd-about-modal__close:hover {
	background: rgba(229, 90, 28, 0.12);
	color: var(--tso-pd-light-accent);
}

/* Hero head */
.tso-pd-about__head {
	text-align: center;
	margin-bottom: 36px;
	padding-bottom: 28px;
	border-bottom: 1px solid var(--tso-pd-line-soft);
}

.tso-pd-about__tag {
	margin: 0 0 14px 0;
	font-size: 11px;
	letter-spacing: 0.32em;
	text-transform: uppercase;
	color: var(--tso-pd-light-accent);
	font-weight: 700;
}

.tso-pd-about__h1 {
	margin: 0 0 14px 0;
	font-family: var(--tso-pd-font-serif);
	font-size: clamp(2.5rem, 5vw + 0.5rem, 4rem);
	font-weight: 800;
	line-height: 1;
	letter-spacing: -0.035em;
	color: var(--tso-pd-primary-darkest);
	font-variation-settings: "opsz" 144;
}

.tso-pd-about__acronym {
	margin: 0 auto;
	max-width: 580px;
	font-size: 14.5px;
	line-height: 1.65;
	color: var(--tso-pd-ash);
	font-family: var(--tso-pd-font-serif);
}

.tso-pd-about__acronym strong {
	color: var(--tso-pd-primary);
	font-weight: 800;
}

/* Section blocks */
.tso-pd-about__section {
	margin-bottom: 28px;
}

.tso-pd-about__section--dark {
	background: var(--tso-pd-primary-darkest);
	color: #fff;
	padding: 28px 28px;
	border-radius: var(--tso-pd-radius);
	margin-left: -8px;
	margin-right: -8px;
}

.tso-pd-about__section--dark .tso-pd-about__h2 {
	color: var(--tso-pd-accent);
}

.tso-pd-about__section--dark .tso-pd-about__p {
	color: rgba(255, 255, 255, 0.82);
}

.tso-pd-about__section--gold {
	padding: 22px 24px;
	background: rgba(0, 128, 128, 0.06);
	border-left: 4px solid var(--tso-pd-tso-teal);
	border-radius: var(--tso-pd-radius-sm);
}

.tso-pd-about__h2 {
	margin: 0 0 12px 0;
	font-family: var(--tso-pd-font-serif);
	font-size: 22px;
	font-weight: 700;
	color: var(--tso-pd-primary-deep);
	letter-spacing: -0.02em;
}

.tso-pd-about__h2--small {
	font-size: 16px;
	color: var(--tso-pd-tso-teal);
	margin-bottom: 8px;
}

.tso-pd-about__p {
	margin: 0;
	font-size: 14.5px;
	line-height: 1.7;
	color: var(--tso-pd-ink);
}

.tso-pd-about__p--small {
	font-size: 13px;
	line-height: 1.65;
}

.tso-pd-about__p strong {
	color: var(--tso-pd-primary-deep);
	font-weight: 700;
}

.tso-pd-about__section--dark .tso-pd-about__p strong {
	color: #fff;
}

/* Three-phase grid */
.tso-pd-about__phase-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 14px;
	margin-top: 18px;
}

@media (max-width: 720px) {
	.tso-pd-about__phase-grid { grid-template-columns: 1fr; }
}

.tso-pd-about__phase-card {
	display: flex;
	flex-direction: column;
	gap: 12px;
	padding: 18px 20px;
	background: #fff;
	border: 1px solid var(--tso-pd-line-soft);
	border-radius: var(--tso-pd-radius-sm);
}

.tso-pd-about__phase-num {
	width: 36px;
	height: 36px;
	border-radius: 8px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-family: var(--tso-pd-font-serif);
	font-size: 14px;
	font-weight: 800;
	color: #fff;
	letter-spacing: 0.02em;
}

.tso-pd-about__phase-body {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.tso-pd-about__phase-title {
	font-family: var(--tso-pd-font-serif);
	font-size: 17px;
	font-weight: 700;
	color: var(--tso-pd-ink);
	letter-spacing: -0.01em;
}

.tso-pd-about__phase-desc {
	font-size: 13px;
	line-height: 1.55;
	color: var(--tso-pd-ash);
}

/* Stat grid */
.tso-pd-about__stat-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 12px;
	margin: 28px 0;
}

@media (max-width: 720px) {
	.tso-pd-about__stat-grid { grid-template-columns: repeat(2, 1fr); }
}

.tso-pd-about__stat-card {
	padding: 18px 16px;
	background: #fff;
	border: 1px solid var(--tso-pd-line-soft);
	border-radius: var(--tso-pd-radius-sm);
	text-align: center;
}

.tso-pd-about__stat-card-num {
	font-family: var(--tso-pd-font-serif);
	font-size: 26px;
	font-weight: 800;
	color: var(--tso-pd-primary);
	letter-spacing: -0.01em;
	margin-bottom: 4px;
}

.tso-pd-about__stat-card-label {
	font-size: 11px;
	color: var(--tso-pd-ash);
	line-height: 1.4;
}

/* ========== About modal CTA (blinking "Learn more" button) ========== */

.tso-pd-about__cta-wrap {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	margin-top: 28px;
	padding-top: 24px;
	border-top: 1px solid var(--tso-pd-line-soft);
}

.tso-pd-about__cta {
	position: relative;
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: 14px 28px;
	background: linear-gradient(135deg, var(--tso-pd-primary, #6B3FA0) 0%, var(--tso-pd-primary-deep, #4A2B70) 100%);
	color: #fff;
	text-decoration: none;
	font-family: var(--tso-pd-font-sans, 'DM Sans', sans-serif);
	font-size: 14px;
	font-weight: 700;
	letter-spacing: 0.01em;
	border-radius: 99px;
	box-shadow: 0 8px 22px rgba(36, 23, 48, 0.30);
	transition: transform 0.18s cubic-bezier(0.22, 0.61, 0.36, 1), box-shadow 0.18s ease;
	overflow: visible;
	z-index: 1;
	animation: tso-pd-about-cta-blink 2.2s ease-in-out infinite;
}

.tso-pd-about__cta:hover {
	transform: translateY(-2px) scale(1.02);
	box-shadow: 0 14px 32px rgba(36, 23, 48, 0.40);
	color: #fff;
	animation-play-state: paused;
}

.tso-pd-about__cta:active {
	transform: translateY(0) scale(0.98);
}

/* The blink is a soft brightness/scale pulse — not a jarring opacity flicker,
 * which would feel low-quality. */
@keyframes tso-pd-about-cta-blink {
	0%, 100% {
		box-shadow: 0 8px 22px rgba(36, 23, 48, 0.30);
		filter: brightness(1);
	}
	50% {
		box-shadow: 0 10px 28px rgba(229, 90, 28, 0.35), 0 0 0 4px rgba(229, 90, 28, 0.12);
		filter: brightness(1.08);
	}
}

/* Decorative pulse halo behind the button — radiates orange */
.tso-pd-about__cta-pulse {
	position: absolute;
	inset: -6px;
	border-radius: 99px;
	border: 2px solid var(--tso-pd-light-accent, #E55A1C);
	opacity: 0;
	z-index: -1;
	pointer-events: none;
	animation: tso-pd-about-cta-pulse 2.2s ease-out infinite;
}

@keyframes tso-pd-about-cta-pulse {
	0%   { transform: scale(0.95); opacity: 0.55; }
	100% { transform: scale(1.18); opacity: 0; }
}

.tso-pd-about__cta-label {
	display: inline-block;
}

.tso-pd-about__cta-arrow {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	transition: transform 0.2s ease;
}

.tso-pd-about__cta:hover .tso-pd-about__cta-arrow {
	transform: translate(2px, -2px);
}

.tso-pd-about__cta-hint {
	margin: 0;
	font-size: 11px;
	color: var(--tso-pd-ash);
	font-style: italic;
	font-family: var(--tso-pd-font-serif, 'Fraunces', serif);
}

@media (max-width: 480px) {
	.tso-pd-about__cta {
		padding: 12px 22px;
		font-size: 13px;
		text-align: center;
	}
}

/* Respect reduced motion preferences — disable the pulse/blink. */
@media (prefers-reduced-motion: reduce) {
	.tso-pd-about__cta,
	.tso-pd-about__cta-pulse {
		animation: none;
	}
}

/* ========== Games Balloon FAB (bottom-right floater) ========== */

.tso-pd-balloon {
	position: fixed;
	bottom: 24px;
	right: 24px;
	z-index: 99995;
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 14px;
	font-family: var(--tso-pd-font-sans, 'DM Sans', sans-serif);
}

@media (max-width: 520px) {
	.tso-pd-balloon {
		bottom: 18px;
		right: 18px;
	}
}

/* Tooltip ("Play today's games") that auto-fades on first load */
.tso-pd-balloon__tip {
	position: absolute;
	bottom: 72px;
	right: 0;
	padding: 7px 14px;
	background: rgba(36, 23, 48, 0.92);
	color: #fff;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.02em;
	border-radius: 99px;
	white-space: nowrap;
	pointer-events: none;
	transition: opacity 0.5s ease, transform 0.5s ease;
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.22);
	animation: tso-pd-balloon-bob 2.4s ease-in-out infinite;
}

.tso-pd-balloon__tip::after {
	content: "";
	position: absolute;
	bottom: -5px;
	right: 22px;
	width: 10px;
	height: 10px;
	background: rgba(36, 23, 48, 0.92);
	transform: rotate(45deg);
}

.tso-pd-balloon__tip.is-faded {
	opacity: 0;
	transform: translateY(6px);
}

@keyframes tso-pd-balloon-bob {
	0%, 100% { transform: translateY(0); }
	50%      { transform: translateY(-4px); }
}

/* The expand-panel — initially hidden, slides up on open */
.tso-pd-balloon__panel {
	display: flex;
	flex-direction: column;
	gap: 8px;
	min-width: 240px;
	padding: 16px 18px 18px 18px;
	background: #fff;
	border-radius: 18px;
	box-shadow: 0 18px 48px rgba(36, 23, 48, 0.28), 0 4px 12px rgba(0, 0, 0, 0.08);
	opacity: 0;
	pointer-events: none;
	transform: translateY(8px) scale(0.96);
	transform-origin: bottom right;
	transition: opacity 0.22s ease, transform 0.28s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.tso-pd-balloon.is-open .tso-pd-balloon__panel {
	opacity: 1;
	pointer-events: auto;
	transform: translateY(0) scale(1);
}

.tso-pd-balloon__heading {
	display: flex;
	flex-direction: column;
	gap: 2px;
	padding: 0 4px 10px 4px;
	border-bottom: 1px solid #F0EFEA;
	margin-bottom: 4px;
}

.tso-pd-balloon__heading-eyebrow {
	font-size: 9px;
	letter-spacing: 0.22em;
	text-transform: uppercase;
	font-weight: 700;
	color: var(--tso-pd-primary, #6B3FA0);
}

.tso-pd-balloon__heading-sub {
	font-size: 11px;
	color: #5e5b58;
	font-style: italic;
	font-family: var(--tso-pd-font-serif, 'Fraunces', serif);
}

.tso-pd-balloon__opt {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 10px 12px;
	border-radius: 12px;
	text-decoration: none;
	color: #1a1816;
	transition: background 0.15s ease, transform 0.12s ease;
	opacity: 0;
	transform: translateY(6px);
	animation: tso-pd-balloon-opt-in 0.32s ease forwards;
}

.tso-pd-balloon__opt:hover {
	transform: translateX(2px);
}

.tso-pd-balloon__opt--teal {
	background: rgba(207, 172, 219, 0.12);
}

.tso-pd-balloon__opt--teal:hover {
	background: rgba(207, 172, 219, 0.22);
	color: #4A2B70;
}

.tso-pd-balloon__opt--warm {
	background: rgba(229, 90, 28, 0.10);
}

.tso-pd-balloon__opt--warm:hover {
	background: rgba(229, 90, 28, 0.18);
	color: #E55A1C;
}

@keyframes tso-pd-balloon-opt-in {
	to { opacity: 1; transform: translateY(0); }
}

.tso-pd-balloon__opt-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	border-radius: 12px;
	font-size: 18px;
	background: #fff;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
	flex-shrink: 0;
}

.tso-pd-balloon__opt-text {
	display: flex;
	flex-direction: column;
	gap: 1px;
	line-height: 1.2;
}

.tso-pd-balloon__opt-label {
	font-family: var(--tso-pd-font-serif, 'Fraunces', serif);
	font-size: 15px;
	font-weight: 700;
	letter-spacing: -0.01em;
}

.tso-pd-balloon__opt-hint {
	font-size: 10px;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	font-weight: 600;
	color: #5e5b58;
	opacity: 0.7;
}

/* The FAB itself — circular, pulses */
.tso-pd-balloon__fab {
	position: relative;
	width: 60px;
	height: 60px;
	border-radius: 50%;
	border: 0;
	background: linear-gradient(135deg, var(--tso-pd-primary, #6B3FA0) 0%, var(--tso-pd-primary-deep, #4A2B70) 100%);
	color: #fff;
	cursor: pointer;
	box-shadow: 0 8px 24px rgba(36, 23, 48, 0.32), 0 2px 6px rgba(0, 0, 0, 0.12);
	display: flex;
	align-items: center;
	justify-content: center;
	transition: transform 0.2s cubic-bezier(0.22, 0.61, 0.36, 1), box-shadow 0.2s ease;
	overflow: visible;
}

.tso-pd-balloon__fab:hover {
	transform: scale(1.06);
	box-shadow: 0 12px 32px rgba(36, 23, 48, 0.42), 0 4px 10px rgba(0, 0, 0, 0.16);
}

.tso-pd-balloon__fab:active {
	transform: scale(0.96);
}

/* Pulse halo behind the FAB */
.tso-pd-balloon__fab-pulse {
	position: absolute;
	inset: -4px;
	border-radius: 50%;
	border: 2px solid var(--tso-pd-light-accent, #E55A1C);
	opacity: 0;
	animation: tso-pd-fab-pulse 2.4s ease-out infinite;
	pointer-events: none;
}

@keyframes tso-pd-fab-pulse {
	0%   { transform: scale(0.9); opacity: 0.7; }
	100% { transform: scale(1.55); opacity: 0; }
}

.tso-pd-balloon.is-open .tso-pd-balloon__fab-pulse {
	animation: none;
	opacity: 0;
}

/* Swap play ↔ close icon based on open state */
.tso-pd-balloon__fab-icon {
	position: absolute;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: opacity 0.18s ease, transform 0.22s ease;
}

.tso-pd-balloon__fab-icon--open {
	opacity: 1;
	transform: scale(1);
	margin-left: 2px; /* visual centering of play triangle */
}

.tso-pd-balloon__fab-icon--close {
	opacity: 0;
	transform: scale(0.6) rotate(-45deg);
}

.tso-pd-balloon.is-open .tso-pd-balloon__fab-icon--open {
	opacity: 0;
	transform: scale(0.6) rotate(45deg);
}

.tso-pd-balloon.is-open .tso-pd-balloon__fab-icon--close {
	opacity: 1;
	transform: scale(1) rotate(0);
}

/* ========== Back-to-Dictionary link (inside game/archive/suggest heroes) ========== */

.tso-pd-back-link {
	position: absolute;
	top: 18px;
	left: 22px;
	z-index: 5;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 8px 14px 8px 10px;
	background: rgba(255, 255, 255, 0.10);
	border: 1px solid rgba(255, 255, 255, 0.18);
	border-radius: 99px;
	color: rgba(255, 255, 255, 0.85);
	text-decoration: none;
	font-size: 11px;
	font-weight: 600;
	font-family: var(--tso-pd-font-sans, 'DM Sans', sans-serif);
	letter-spacing: 0.02em;
	backdrop-filter: blur(6px);
	-webkit-backdrop-filter: blur(6px);
	transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.12s ease;
	/* Ensure it stays tappable — minimum 44x44 target with the padding above */
	min-height: 34px;
}

.tso-pd-back-link:hover {
	background: rgba(255, 255, 255, 0.18);
	border-color: rgba(255, 255, 255, 0.32);
	color: #fff;
	transform: translateX(-2px);
}

.tso-pd-back-link svg {
	display: block;
	flex-shrink: 0;
}

/* The hero containers need position:relative for the back link to anchor */
.tso-pd-game__hero,
.tso-pd-archive__hero,
.tso-pd-suggest__hero {
	position: relative;
}

/* On mobile, flow the back link inline at the top of the hero instead
 * of absolute-positioning it. Absolute positioning is fragile on mobile —
 * theme wrappers, viewport notches, and short hero padding can clip the
 * tap target. Inline-flow always shows the full button.
 *
 * The button gets larger padding here (12x18, 44px+ tap target) per
 * Apple/Google accessibility minimums for touch targets. */
@media (max-width: 640px) {
	.tso-pd-back-link {
		position: static;
		top: auto;
		left: auto;
		margin-bottom: 18px;
		margin-left: 0;
		padding: 10px 16px 10px 12px;
		font-size: 12px;
		min-height: 40px;
		align-self: flex-start;
	}

	.tso-pd-game__hero,
	.tso-pd-archive__hero,
	.tso-pd-suggest__hero {
		display: flex;
		flex-direction: column;
		align-items: flex-start;
		padding-top: 24px !important;
	}

	/* Re-center the hero text content while keeping the back link left-aligned */
	.tso-pd-game__hero > *:not(.tso-pd-back-link),
	.tso-pd-archive__hero > *:not(.tso-pd-back-link),
	.tso-pd-suggest__hero > *:not(.tso-pd-back-link) {
		align-self: stretch;
		text-align: center;
	}
}

/* ========== Sections wrapper (padding for everything below hero) ========== */

.tso-pd-sections {
	max-width: 1200px;
	margin: 0 auto;
	padding: 48px 24px 0 24px;
	display: flex;
	flex-direction: column;
	gap: 56px;
}

@media (max-width: 640px) {
	.tso-pd-sections {
		padding: 32px 16px 0 16px;
		gap: 40px;
	}
}

.tso-pd-section {
	width: 100%;
}

.tso-pd-section__title {
	margin: 0 0 6px 0;
	font-family: var(--tso-pd-font-serif, 'Fraunces', serif);
	font-size: 28px;
	font-weight: 700;
	letter-spacing: -0.025em;
	color: var(--tso-pd-ink);
	font-variation-settings: "opsz" 144;
}

.tso-pd-section__sub {
	margin: 0 0 24px 0;
	font-size: 14px;
	color: var(--tso-pd-ash);
	font-family: var(--tso-pd-font-serif, 'Fraunces', serif);
	font-style: italic;
	line-height: 1.5;
}

/* ========== Hero browse buttons (4 pills under search) ========== */

.tso-pd-hero__browse {
	position: relative;
	z-index: 10;
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 10px;
	margin-top: 22px;
}

.tso-pd-hero__browse-btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 10px 18px;
	background: rgba(255, 255, 255, 0.10);
	border: 1px solid rgba(255, 255, 255, 0.22);
	border-radius: 99px;
	color: #fff;
	font-size: 13px;
	font-weight: 600;
	font-family: var(--tso-pd-font-sans, 'DM Sans', sans-serif);
	letter-spacing: 0.01em;
	cursor: pointer;
	backdrop-filter: blur(6px);
	-webkit-backdrop-filter: blur(6px);
	transition: background 0.15s ease, border-color 0.15s ease, transform 0.12s ease;
}

.tso-pd-hero__browse-btn:hover {
	background: rgba(255, 255, 255, 0.18);
	border-color: rgba(255, 255, 255, 0.4);
	transform: translateY(-1px);
}

.tso-pd-hero__browse-icon {
	font-size: 15px;
	line-height: 1;
}

@media (max-width: 540px) {
	.tso-pd-hero__browse-btn {
		font-size: 12px;
		padding: 9px 14px;
	}
	.tso-pd-hero__browse-icon { font-size: 13px; }
}

/* ========== Carousels (two rows, opposite directions, pause on hover) ========== */

.tso-pd-carousels {
	display: flex;
	flex-direction: column;
	gap: 18px;
	overflow: hidden;
	margin-left: -24px;
	margin-right: -24px;
	padding: 4px 0;
	-webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
	mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}

.tso-pd-carousel {
	overflow: hidden;
	width: 100%;
}

.tso-pd-carousel__track {
	display: flex;
	gap: 16px;
	width: max-content;
	/* Default: no animation. The direction modifier class sets the
	 * specific animation. Each track *must* have either --left or --right
	 * on its parent or it won't scroll. */
	animation: tso-pd-scroll-left 60s linear infinite;
	will-change: transform;
}

/* Explicit direction classes — using different keyframes (not
 * animation-direction: reverse) for clean behavior on all browsers,
 * especially mobile Safari which can glitch when animation properties
 * are combined inconsistently. */
.tso-pd-carousel--left .tso-pd-carousel__track {
	animation-name: tso-pd-scroll-left;
}

.tso-pd-carousel--right .tso-pd-carousel__track {
	animation-name: tso-pd-scroll-right;
}

@keyframes tso-pd-scroll-left {
	0%   { transform: translateX(0); }
	100% { transform: translateX(-50%); }
}

@keyframes tso-pd-scroll-right {
	0%   { transform: translateX(-50%); }
	100% { transform: translateX(0); }
}

.tso-pd-carousel:hover .tso-pd-carousel__track {
	animation-play-state: paused;
}

/* Slow carousels significantly on mobile — small screens make the
 * scroll feel twice as fast because cards swipe past in half the time
 * it takes them to cross a desktop viewport. Doubling the duration
 * brings the perceived speed back in line.
 *
 * Also: cards shrink from 280px to 220px so two cards fit visibly on
 * standard phone widths (~360-414px viewport). Without this, only one
 * card is fully visible and the carousel feels broken. */
@media (max-width: 720px) {
	.tso-pd-carousel__track {
		animation-duration: 120s;
	}
	.tso-pd-carousel-card {
		flex: 0 0 220px;
	}
}

.tso-pd-carousel-card {
	flex: 0 0 280px;
	background: var(--tso-pd-paper, #fff);
	border: 1px solid var(--tso-pd-line-soft, #E8E7E0);
	border-top: 3px solid var(--tso-pd-card-cat-color, var(--tso-pd-primary, #6B3FA0));
	border-radius: var(--tso-pd-radius, 14px);
	padding: 16px 18px;
	text-align: left;
	cursor: pointer;
	transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
	font-family: var(--tso-pd-font-sans, 'DM Sans', sans-serif);
	color: var(--tso-pd-ink, #1a1816);
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.tso-pd-carousel-card:hover {
	transform: translateY(-3px);
	box-shadow: 0 10px 28px rgba(107, 63, 160, 0.16);
}

.tso-pd-carousel-card__eyebrow {
	font-size: 10px;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	font-weight: 700;
	display: inline-flex;
	align-items: center;
	gap: 4px;
	line-height: 1.2;
}

.tso-pd-carousel-card__term-row {
	display: flex;
	align-items: center;
	gap: 6px;
}

.tso-pd-carousel-card__term {
	margin: 0;
	font-family: var(--tso-pd-font-serif, 'Fraunces', serif);
	font-size: 18px;
	font-weight: 700;
	line-height: 1.15;
	letter-spacing: -0.015em;
	flex: 1;
}

.tso-pd-carousel-card__phonetic {
	margin: 0;
	font-family: var(--tso-pd-font-serif, 'Fraunces', serif);
	font-size: 12px;
	font-style: italic;
	color: var(--tso-pd-ash, #5e5b58);
}

.tso-pd-carousel-card__def {
	margin: 4px 0 0 0;
	font-size: 12.5px;
	line-height: 1.5;
	color: #4d4b48;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* ========== Feature cards section (Quiz + WoD, 1/2 + 1/2) ========== */

.tso-pd-feature-cards {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 18px;
}

@media (max-width: 720px) {
	.tso-pd-feature-cards { grid-template-columns: 1fr; }
}

.tso-pd-feature-card {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 14px;
	padding: 28px 26px 26px 26px;
	border-radius: 18px;
	background: var(--tso-pd-paper, #fff);
	border: 1px solid var(--tso-pd-line-soft, #E8E7E0);
	text-align: left;
	text-decoration: none;
	color: var(--tso-pd-ink, #1a1816);
	cursor: pointer;
	overflow: hidden;
	transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
	font-family: var(--tso-pd-font-sans, 'DM Sans', sans-serif);
}

.tso-pd-feature-card:hover {
	transform: translateY(-3px);
	box-shadow: 0 18px 40px rgba(36, 23, 48, 0.16);
	color: var(--tso-pd-ink, #1a1816);
}

/* Background glow per variant */
.tso-pd-feature-card__glow {
	position: absolute;
	inset: 0;
	pointer-events: none;
	opacity: 0.6;
	z-index: 0;
}

.tso-pd-feature-card--quiz .tso-pd-feature-card__glow {
	background: radial-gradient(circle at 100% 0%, rgba(207, 172, 219, 0.22) 0%, transparent 55%);
}

.tso-pd-feature-card--quiz {
	border-top: 3px solid var(--tso-pd-primary, #6B3FA0);
}

.tso-pd-feature-card--wod .tso-pd-feature-card__glow {
	background: radial-gradient(circle at 100% 0%, rgba(246, 196, 166, 0.55) 0%, transparent 55%);
}

.tso-pd-feature-card--wod {
	border-top: 3px solid var(--tso-pd-light-accent, #E55A1C);
}

/* Make sure card content sits above the glow */
.tso-pd-feature-card > *:not(.tso-pd-feature-card__glow) {
	position: relative;
	z-index: 1;
}

.tso-pd-feature-card__head {
	display: flex;
	align-items: center;
	gap: 12px;
}

.tso-pd-feature-card__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 42px;
	height: 42px;
	font-size: 20px;
	background: var(--tso-pd-accent-soft, rgba(207, 172, 219, 0.14));
	border-radius: 12px;
	flex-shrink: 0;
}

.tso-pd-feature-card--wod .tso-pd-feature-card__icon {
	background: rgba(246, 196, 166, 0.4);
}

.tso-pd-feature-card__label {
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.tso-pd-feature-card__eyebrow {
	font-size: 10px;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	font-weight: 700;
	color: var(--tso-pd-primary, #6B3FA0);
}

.tso-pd-feature-card--wod .tso-pd-feature-card__eyebrow {
	color: var(--tso-pd-light-accent, #E55A1C);
}

.tso-pd-feature-card__date {
	font-size: 11px;
	color: var(--tso-pd-ash, #5e5b58);
}

.tso-pd-feature-card__title {
	margin: 0;
	font-family: var(--tso-pd-font-serif, 'Fraunces', serif);
	font-size: 22px;
	font-weight: 700;
	letter-spacing: -0.02em;
	line-height: 1.15;
}

.tso-pd-feature-card__body {
	margin: 0;
	font-size: 13.5px;
	line-height: 1.6;
	color: #4f4d4a;
}

.tso-pd-feature-card__stats {
	display: flex;
	gap: 16px;
	padding-top: 4px;
}

.tso-pd-feature-card__stat {
	display: flex;
	flex-direction: column;
	gap: 1px;
}

.tso-pd-feature-card__stat-num {
	font-family: var(--tso-pd-font-serif, 'Fraunces', serif);
	font-size: 22px;
	font-weight: 700;
	color: var(--tso-pd-primary-deep, #4A2B70);
	letter-spacing: -0.01em;
}

.tso-pd-feature-card__stat-label {
	font-size: 10px;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--tso-pd-ash, #5e5b58);
	font-weight: 600;
}

.tso-pd-feature-card__cta {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	margin-top: auto;
	padding-top: 8px;
	font-size: 12.5px;
	font-weight: 700;
	letter-spacing: 0.02em;
	color: var(--tso-pd-primary-deep, #4A2B70);
}

.tso-pd-feature-card--wod .tso-pd-feature-card__cta {
	color: var(--tso-pd-light-accent, #E55A1C);
}

/* WoD body content */
.tso-pd-feature-card__wod-body {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.tso-pd-feature-card__wod-cat {
	font-size: 10px;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	font-weight: 700;
}

.tso-pd-feature-card__wod-term-row {
	display: flex;
	align-items: center;
	gap: 8px;
}

.tso-pd-feature-card__wod-term {
	margin: 0;
	font-family: var(--tso-pd-font-serif, 'Fraunces', serif);
	font-size: 26px;
	font-weight: 700;
	letter-spacing: -0.025em;
	line-height: 1.1;
}

.tso-pd-feature-card__wod-phonetic {
	margin: 0;
	font-family: var(--tso-pd-font-serif, 'Fraunces', serif);
	font-size: 12.5px;
	font-style: italic;
	color: var(--tso-pd-ash, #5e5b58);
}

.tso-pd-feature-card__wod-def {
	margin: 4px 0 0 0;
	font-size: 13px;
	line-height: 1.6;
	color: #4f4d4a;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* ========== Video block (5 per-language sections) ========== */

.tso-pd-video-block-head {
	margin-bottom: -32px; /* tighten gap to first language section */
}

.tso-pd-video-section {
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.tso-pd-video-section__head {
	display: flex;
	align-items: center;
	gap: 12px;
	flex-wrap: wrap;
}

.tso-pd-video-section__title {
	margin: 0;
	font-family: var(--tso-pd-font-serif, 'Fraunces', serif);
	font-size: 18px;
	font-weight: 700;
	letter-spacing: -0.015em;
	color: var(--tso-pd-ink, #1a1816);
}

.tso-pd-video-section__lang-badge {
	font-size: 10px;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	font-weight: 700;
	padding: 4px 10px;
	background: var(--tso-pd-accent-soft, rgba(207, 172, 219, 0.16));
	color: var(--tso-pd-primary-deep, #4A2B70);
	border-radius: 99px;
	font-family: var(--tso-pd-font-sans, 'DM Sans', sans-serif);
}

/* ========== Video carousel — auto-scroll, pause on hover ========== */

.tso-pd-video-carousel {
	overflow: hidden;
	margin-left: -24px;
	margin-right: -24px;
	padding: 4px 0;
	-webkit-mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent);
	mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent);
}

.tso-pd-video-carousel__track {
	display: flex;
	gap: 16px;
	width: max-content;
	padding: 0 24px;
	/* 22 cards (11 × 2 dupes) at ~280px + 16px gap = ~6512px total.
	 * 80s feels like a steady, leisurely scroll without being soporific. */
	animation: tso-pd-vid-scroll-left 90s linear infinite;
	will-change: transform;
}

.tso-pd-video-carousel--right .tso-pd-video-carousel__track {
	animation-name: tso-pd-vid-scroll-right;
}

@keyframes tso-pd-vid-scroll-left {
	0%   { transform: translateX(0); }
	100% { transform: translateX(-50%); }
}

@keyframes tso-pd-vid-scroll-right {
	0%   { transform: translateX(-50%); }
	100% { transform: translateX(0); }
}

.tso-pd-video-carousel:hover .tso-pd-video-carousel__track {
	animation-play-state: paused;
}

/* Mobile slowdown — match the featured-terms carousel mobile policy.
 * Video carousels have 11 cards per row so they already loop slowly,
 * but smaller cards on a smaller screen visually feel faster. */
@media (max-width: 720px) {
	.tso-pd-video-carousel__track {
		animation-duration: 160s;
	}
}

/* ===== Video card ===== */

.tso-pd-video-card {
	flex: 0 0 calc((1200px - 24px - 24px - 48px) / 4); /* fit 4 visible at ~1200px max */
	width: 270px;
	background: var(--tso-pd-paper, #fff);
	border: 1px solid var(--tso-pd-line-soft, #E8E7E0);
	border-radius: 14px;
	overflow: hidden;
	cursor: pointer;
	padding: 0;
	text-align: left;
	color: var(--tso-pd-ink, #1a1816);
	font-family: var(--tso-pd-font-sans, 'DM Sans', sans-serif);
	transition: transform 0.2s cubic-bezier(0.22, 0.61, 0.36, 1), box-shadow 0.2s ease, border-color 0.2s ease;
	display: flex;
	flex-direction: column;
}

.tso-pd-video-card:hover {
	transform: translateY(-3px);
	box-shadow: 0 14px 32px rgba(36, 23, 48, 0.18);
	border-color: var(--tso-pd-accent, #CFACDB);
}

@media (max-width: 720px) {
	.tso-pd-video-card { width: 220px; }
}

.tso-pd-video-card__thumb {
	position: relative;
	width: 100%;
	aspect-ratio: 16 / 9;
	background: #000;
	overflow: hidden;
}

.tso-pd-video-card__thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.4s ease;
}

.tso-pd-video-card:hover .tso-pd-video-card__thumb img {
	transform: scale(1.05);
}

.tso-pd-video-card__play {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 50px;
	height: 50px;
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.65);
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	pointer-events: none;
	transition: background 0.18s ease, transform 0.18s ease;
}

.tso-pd-video-card:hover .tso-pd-video-card__play {
	background: var(--tso-pd-light-accent, #E55A1C);
	transform: translate(-50%, -50%) scale(1.1);
}

.tso-pd-video-card__play svg {
	margin-left: 3px; /* visual center for the play triangle */
}

.tso-pd-video-card__title {
	padding: 12px 14px 14px 14px;
	font-family: var(--tso-pd-font-serif, 'Fraunces', serif);
	font-size: 14px;
	font-weight: 600;
	line-height: 1.35;
	letter-spacing: -0.01em;
	color: var(--tso-pd-ink, #1a1816);
	flex: 1;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* ========== Video lightbox (YouTube embed in modal) ========== */

.tso-pd-video-lightbox {
	position: fixed;
	inset: 0;
	z-index: 999998;
	background: rgba(0, 30, 25, 0.78);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.28s ease;
	backdrop-filter: blur(4px);
	-webkit-backdrop-filter: blur(4px);
}

.tso-pd-video-lightbox.is-open {
	opacity: 1;
	pointer-events: auto;
}

@media (max-width: 600px) {
	.tso-pd-video-lightbox { padding: 12px; }
}

.tso-pd-video-lightbox__inner {
	width: 100%;
	max-width: 960px;
	background: #000;
	border-radius: 16px;
	overflow: hidden;
	box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5);
	transform: scale(0.94);
	transition: transform 0.32s cubic-bezier(0.22, 0.61, 0.36, 1);
	display: flex;
	flex-direction: column;
}

.tso-pd-video-lightbox.is-open .tso-pd-video-lightbox__inner {
	transform: scale(1);
}

.tso-pd-video-lightbox__bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 14px 18px;
	background: #0a0a0a;
	color: #fff;
}

.tso-pd-video-lightbox__title {
	font-family: var(--tso-pd-font-serif, 'Fraunces', serif);
	font-size: 14.5px;
	font-weight: 600;
	color: #fff;
	flex: 1;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.tso-pd-video-lightbox__close {
	width: 32px;
	height: 32px;
	background: rgba(255, 255, 255, 0.10);
	border: 0;
	border-radius: 50%;
	color: #fff;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 0.15s ease;
	flex-shrink: 0;
}

.tso-pd-video-lightbox__close:hover {
	background: rgba(255, 255, 255, 0.22);
}

.tso-pd-video-lightbox__frame-wrap {
	position: relative;
	width: 100%;
	aspect-ratio: 16 / 9;
	background: #000;
}

.tso-pd-video-lightbox__frame {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
}

/* ========== Full searchable grid section (hidden by default) ========== */

.tso-pd-full-grid-section[hidden] {
	display: none;
}

.tso-pd-full-grid__head {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 12px;
	margin-bottom: 16px;
}

.tso-pd-full-grid__head .tso-pd-section__title {
	margin: 0;
}

.tso-pd-full-grid__close {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 6px 14px 6px 10px;
	background: rgba(0, 0, 0, 0.04);
	border: 1px solid var(--tso-pd-line-soft, #E8E7E0);
	border-radius: 99px;
	color: var(--tso-pd-ash, #5e5b58);
	font-size: 12px;
	font-weight: 600;
	font-family: var(--tso-pd-font-sans, 'DM Sans', sans-serif);
	cursor: pointer;
	transition: background 0.15s ease, color 0.15s ease;
}

.tso-pd-full-grid__close:hover {
	background: rgba(229, 90, 28, 0.10);
	color: var(--tso-pd-light-accent, #E55A1C);
}

.tso-pd-catbar.is-highlighted,
.tso-pd-subfilters.is-highlighted {
	animation: tso-pd-highlight-flash 1.8s ease-out;
}

@keyframes tso-pd-highlight-flash {
	0%   { box-shadow: 0 0 0 0 rgba(229, 90, 28, 0.5); }
	30%  { box-shadow: 0 0 0 8px rgba(229, 90, 28, 0.20); }
	100% { box-shadow: 0 0 0 0 rgba(229, 90, 28, 0); }
}

/* ========== Hide floating UI when term modal is open ========== */
/* The Term of the Day side-trigger pill, games balloon FAB, and chatbot
 * shouldn't compete with the modal for attention. They re-appear when
 * the modal closes. */
body.tso-pd-modal-open .tso-pd-tod-trigger,
body.tso-pd-modal-open .tso-pd-balloon,
body.tso-pd-modal-open .tso-pd-bot {
	display: none !important;
}
