/*
 * TamilAIGuide widgets (BUILD_PLAN 2.3, R2; UI/UX Doc §4.2, §4.4, §5, §8, §11.0 Kelvi).
 * Tokens only: every colour, size and radius is a tat-hello-child --tat-* token, no raw
 * values or fallbacks. Lime (--tat-color-primary) is a fill with ink text; text and lone
 * borders that must stand out use --tat-color-hi / --tat-color-link (olive on light, lime
 * on dark). Markup: includes/class-markup.php.
 */

.tat-visually-hidden {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.tat-icon {
	flex: none;
	width: var(--tat-icon-md);
	height: var(--tat-icon-md);
}

.tat-widget-empty {
	padding: var(--tat-space-3);
	border: 1px dashed var(--tat-color-border-control);
	border-radius: var(--tat-radius-control);
	color: var(--tat-color-text-muted);
	font-size: var(--tat-text-small);
}

.tat-features__heading,
.tat-pricing__heading,
.tat-faq__heading,
.tat-scores__heading {
	margin: 0 0 var(--tat-space-3);
}

/* Hero score: the heading is a small label above the big number (UI/UX §4.2). */
.tat-scores--compact .tat-scores__heading {
	margin-bottom: var(--tat-space-1);
	color: var(--tat-color-text-muted);
	font-size: var(--tat-text-small);
	font-weight: var(--tat-weight-strong);
	line-height: var(--tat-leading-body);
}

/* Shared list rows: icon + text. */
.tat-pros-cons__list,
.tat-features__list,
.tat-pricing__limits {
	margin: 0;
	padding: 0;
	list-style: none;
}

.tat-pros-cons__list li,
.tat-features__list li,
.tat-pricing__limits li {
	display: flex;
	gap: var(--tat-space-2);
	align-items: flex-start;
	padding: var(--tat-space-1) 0;
}

.tat-pros-cons__list .tat-icon,
.tat-features__list .tat-icon,
.tat-pricing__limits .tat-icon {
	margin-top: 0.2em;
}

/* Pros / Cons: two cards; the icons carry the meaning (amber, never red, for cons, §4.2). */
.tat-pros-cons {
	display: grid;
	gap: var(--tat-space-4);
}

@media (min-width: 768px) {
	.tat-pros-cons {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

.tat-pros-cons__col {
	padding: var(--tat-space-4);
	border: 1px solid var(--tat-card-border);
	border-radius: var(--tat-card-radius);
	background: var(--tat-card-bg);
}

.tat-pros-cons__heading {
	display: flex;
	gap: var(--tat-space-2);
	align-items: center;
	margin: 0 0 var(--tat-space-2);
	font-size: var(--tat-text-h4);
}

.tat-pros-cons__col--pros .tat-icon {
	color: var(--tat-color-hi);
}

.tat-pros-cons__col--cons .tat-icon {
	color: var(--tat-color-warning);
}

/* Key features. */
@media (min-width: 768px) {
	.tat-features__list {
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		column-gap: var(--tat-space-4);
	}
}

.tat-features__list .tat-icon {
	color: var(--tat-color-hi);
}

/* Pricing cards (§5.2 card treatment, no hover: the cards aren't links). */
.tat-pricing__plans {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: var(--tat-space-3);
	margin: 0;
	padding: 0;
	list-style: none;
}

.tat-pricing__plan {
	padding: var(--tat-space-4);
	border: 1px solid var(--tat-card-border);
	border-radius: var(--tat-card-radius);
	background: var(--tat-card-bg);
	box-shadow: var(--tat-card-shadow);
}

.tat-pricing__name {
	margin: 0 0 var(--tat-space-2);
	font-size: var(--tat-text-h4);
}

.tat-pricing__price {
	margin: 0 0 var(--tat-space-3);
	font-variant-numeric: tabular-nums;
}

.tat-pricing__amount {
	font-family: var(--tat-font-display);
	font-size: var(--tat-text-h2);
	font-weight: var(--tat-weight-heading);
	line-height: 1.1;
}

.tat-pricing__period {
	color: var(--tat-color-text-muted);
	font-size: var(--tat-text-small);
}

.tat-pricing__limits {
	font-size: var(--tat-text-small);
}

.tat-pricing__limits .tat-icon {
	width: var(--tat-icon-sm);
	height: var(--tat-icon-sm);
	color: var(--tat-color-success);
}

/*
 * Hello Elementor's reset paints a hovered or focused button pink with white text, so every
 * button here sets both states itself. tests/a11y/scan.mjs fails on any that doesn't.
 */

/* FAQ accordion (§8): full-width button, caret turns when open. */
.tat-faq__item {
	margin-bottom: var(--tat-space-2);
	padding: 0 var(--tat-space-4);
	border: 1px solid var(--tat-card-border);
	border-radius: var(--tat-radius-control);
	background: var(--tat-card-bg);
}

.tat-faq__question {
	margin: 0;
	font-size: var(--tat-text-body);
}

.tat-faq__trigger {
	display: flex;
	gap: var(--tat-space-3);
	align-items: center;
	justify-content: space-between;
	width: 100%;
	min-height: var(--tat-button-min-height);
	padding: var(--tat-space-3) 0;
	border: 0;
	background: none;
	color: var(--tat-color-text);
	font: inherit;
	font-weight: var(--tat-weight-strong);
	line-height: var(--tat-leading-subheading);
	text-align: left;
	white-space: normal; /* Hello's button reset doesn't wrap, and a long Tamil question must. */
	cursor: pointer;
}

.tat-faq__trigger:hover,
.tat-faq__trigger:focus {
	background: none;
	color: var(--tat-color-link);
}

.tat-faq__trigger .tat-icon {
	box-sizing: content-box;
	padding: var(--tat-space-1);
	border-radius: var(--tat-radius-pill);
	background: var(--tat-color-raised);
	transition: transform var(--tat-motion-base) var(--tat-ease-out);
}

.tat-faq__trigger[aria-expanded="true"] .tat-icon {
	transform: rotate(180deg);
}

.tat-faq__answer {
	padding: 0 0 var(--tat-space-3);
	color: var(--tat-color-text);
}

.tat-faq__answer > :last-child {
	margin-bottom: 0;
}

/*
 * Comparison table (§4.4): scrolls inside its own focusable region; feature column sticky.
 * contain: inline-size stops the table's min-width from widening the flex/grid containers
 * Elementor wraps widgets in (otherwise the whole page scrolls sideways at 375px).
 */
.tat-compare {
	/* Containing block for visually hidden text, so it scrolls with the table instead of widening the page. */
	position: relative;
	width: 100%;
	max-width: 100%;
	contain: inline-size;
	overflow-x: auto;
	border: 1px solid var(--tat-color-border);
	border-radius: var(--tat-radius-card);
	background: var(--tat-color-surface);
}

.tat-compare:focus-visible {
	outline: var(--tat-focus-width) solid var(--tat-color-focus);
	outline-offset: var(--tat-focus-offset);
}

.tat-compare__table {
	width: 100%;
	min-width: 480px;
	margin: 0;
	border-collapse: separate;
	border-spacing: 0;
	font-variant-numeric: tabular-nums;
}

.tat-compare__table caption {
	padding: var(--tat-space-3);
	color: var(--tat-color-text-muted);
	font-size: var(--tat-text-small);
	text-align: left;
}

.tat-compare__table th,
.tat-compare__table td {
	padding: var(--tat-space-2) var(--tat-space-3);
	border: 0;
	border-top: 1px solid var(--tat-color-border);
	text-align: left;
	vertical-align: top;
}

/* Hello Elementor stripes odd body rows (table tbody > tr:nth-child(odd) > td); rows here
   are divided by lines only. Surface, not transparent, so the sticky first column stays opaque. */
.tat-compare .tat-compare__table tbody tr > * {
	background-color: var(--tat-color-surface);
}

.tat-compare__table thead th {
	font-weight: var(--tat-weight-heading);
}

.tat-compare__table th:first-child {
	position: sticky;
	left: 0;
	z-index: 1;
	background: var(--tat-color-surface);
	font-weight: var(--tat-weight-strong);
}

.tat-compare__winner {
	background: var(--tat-color-raised);
	font-weight: var(--tat-weight-strong);
}

/* The row's better cell (R7): a lime pill with ink text and a check. */
.tat-compare__mark {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	min-height: 28px;
	padding: 0 10px;
	border-radius: var(--tat-radius-pill);
	background: var(--tat-color-primary);
	color: var(--tat-color-on-primary);
	font-size: var(--tat-text-small);
	font-weight: var(--tat-weight-heading);
}

.tat-compare__mark .tat-icon {
	flex: none;
	width: 14px;
	height: 14px;
}

.tat-badge {
	display: inline-flex;
	gap: var(--tat-space-1);
	align-items: center;
	padding: 2px var(--tat-space-2);
	border-radius: var(--tat-badge-radius);
	background: var(--tat-badge-bg);
	color: var(--tat-badge-text);
	font-size: var(--tat-text-small);
	font-weight: var(--tat-weight-strong);
	white-space: nowrap;
}

.tat-badge .tat-icon {
	width: var(--tat-icon-sm);
	height: var(--tat-icon-sm);
}

/* Editorial score (§4.2, Kelvi): a big numeral, then one tile per criterion with its
   number and a decorative five-dot row (no filled bar tracks). */
.tat-scores__composite {
	margin: 0 0 var(--tat-space-3);
	font-variant-numeric: tabular-nums;
}

.tat-scores__number {
	color: var(--tat-color-hi);
	font-family: var(--tat-font-display);
	font-size: var(--tat-text-h1);
	font-weight: var(--tat-weight-h1);
	line-height: 1;
}

.tat-scores__max {
	color: var(--tat-color-text-muted);
	font-size: var(--tat-text-h4);
}

.tat-scores__list {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 170px), 1fr));
	gap: var(--tat-space-2);
	margin: 0;
	padding: 0;
	list-style: none;
}

.tat-score {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	grid-template-areas:
		"label label"
		"value dots";
	gap: var(--tat-space-1) var(--tat-space-2);
	align-items: center;
	padding: var(--tat-space-3);
	border: 1px solid var(--tat-card-border);
	border-radius: var(--tat-radius-control);
	background: var(--tat-card-bg);
}

.tat-score__label {
	grid-area: label;
	color: var(--tat-color-text-muted);
	font-size: var(--tat-text-small);
}

.tat-score__value {
	grid-area: value;
	font-family: var(--tat-font-display);
	font-size: var(--tat-text-h3);
	font-variant-numeric: tabular-nums;
	font-weight: var(--tat-weight-heading);
}

.tat-score__max {
	color: var(--tat-color-text-muted);
	font-family: var(--tat-font-family);
	font-size: var(--tat-text-small);
	font-weight: var(--tat-weight-body);
}

.tat-score .tat-dots {
	grid-area: dots;
}

.tat-score--unrated .tat-score__value {
	color: var(--tat-color-text-muted);
	font-size: var(--tat-text-small);
	font-weight: var(--tat-weight-body);
}

/* Five-dot rating (Tamil support, score criteria): square dots, olive or lime when on. */
.tat-dots {
	display: inline-flex;
	gap: 3px;
	align-items: center;
}

.tat-dots__dot {
	width: 9px;
	height: 9px;
	border-radius: 3px;
	background: var(--tat-color-border);
}

.tat-dots__dot.is-on {
	background: var(--tat-color-hi);
}

/*
 * Category grid (PRD §11 mega menu, §12.1 homepage; 2.4). Tiles are single links with a
 * decorative icon. Grid: 2 columns on phones, 3 on tablets, 4 from 1024px, 7 from 1280px.
 * Menu (mega menu): one column inside the mobile menu, 3 columns in the desktop dropdown.
 */
.tat-category-grid__heading {
	margin: 0 0 var(--tat-space-3);
}

.tat-category-grid__list {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: var(--tat-space-2);
	margin: 0;
	padding: 0;
	list-style: none;
}

@media (min-width: 768px) {
	.tat-category-grid__list {
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: var(--tat-space-3);
	}
}

@media (min-width: 1024px) {
	.tat-category-grid--grid .tat-category-grid__list {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}
}

@media (min-width: 1280px) {
	.tat-category-grid--grid .tat-category-grid__list {
		grid-template-columns: repeat(7, minmax(0, 1fr));
	}
}

.tat-category-tile {
	display: flex;
	gap: var(--tat-space-2);
	align-items: center;
	min-height: var(--tat-button-min-height);
	height: 100%;
	padding: var(--tat-space-2) var(--tat-space-3);
	border: 1px solid var(--tat-color-border);
	border-radius: var(--tat-radius-control);
	background: var(--tat-color-surface);
	color: var(--tat-color-text);
	text-decoration: none;
	transition: border-color var(--tat-motion-fast) var(--tat-ease-out), box-shadow var(--tat-motion-fast) var(--tat-ease-out);
}

.tat-category-tile:hover {
	border-color: var(--tat-color-border-strong);
	box-shadow: var(--tat-card-shadow);
	color: var(--tat-color-text);
}

.tat-category-tile__icon {
	display: inline-flex;
	flex: none;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border-radius: var(--tat-radius-control);
	background: var(--tat-color-raised);
	color: var(--tat-color-hi);
}

.tat-category-tile__icon .tat-icon {
	width: var(--tat-icon-lg);
	height: var(--tat-icon-lg);
}

.tat-category-tile__text {
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.tat-category-tile__name {
	font-size: var(--tat-text-small);
	font-weight: var(--tat-weight-strong);
	line-height: var(--tat-leading-subheading);
	overflow-wrap: anywhere;
}

.tat-category-tile__count {
	color: var(--tat-color-text-muted);
	font-size: var(--tat-text-small);
}

.tat-category-grid--menu .tat-category-grid__list {
	grid-template-columns: minmax(0, 1fr);
}

@media (min-width: 1024px) {
	.tat-category-grid--menu .tat-category-grid__list {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

.tat-category-grid--menu .tat-category-tile {
	border-color: transparent;
}

.tat-category-grid__all {
	margin: var(--tat-space-3) 0 0;
}

.tat-link-arrow {
	display: inline-flex;
	gap: var(--tat-space-1);
	align-items: center;
	min-height: var(--tat-button-min-height);
	color: var(--tat-color-link);
	font-weight: var(--tat-weight-strong);
}

.tat-link-arrow .tat-icon {
	width: var(--tat-icon-sm);
	height: var(--tat-icon-sm);
	transition: transform var(--tat-motion-fast) var(--tat-ease-out);
}

.tat-link-arrow:hover .tat-icon {
	transform: translateX(2px);
}

@media (prefers-reduced-motion: reduce) {
	.tat-category-tile,
	.tat-link-arrow .tat-icon,
	.tat-faq__trigger .tat-icon {
		transition: none;
	}
}

/*
 * Cards (PRD §13 / §13.6, UI/UX §5.2, §11.0; BUILD_PLAN 2.12, R2): 24px radius, soft
 * ink-tinted shadow, 2px lift + deeper shadow on hover (desktop). The title link stretches over the card, so
 * the whole card is one target; the copy button sits above it.
 */
.tat-card {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: var(--tat-space-2);
	height: 100%;
	padding: var(--tat-space-4);
	border: 1px solid var(--tat-card-border);
	border-radius: var(--tat-card-radius);
	background: var(--tat-card-bg);
	box-shadow: var(--tat-card-shadow);
	transition: transform var(--tat-motion-fast) var(--tat-ease-out), box-shadow var(--tat-motion-fast) var(--tat-ease-out);
}

@media (hover: hover) {
	.tat-card:not(.tat-card--skeleton):hover {
		box-shadow: var(--tat-card-shadow-hover);
		transform: translateY(var(--tat-lift-hover));
	}
}

.tat-card:focus-within {
	box-shadow: var(--tat-card-shadow-hover);
}

.tat-card__title {
	margin: 0;
	font-family: var(--tat-font-display);
	font-size: var(--tat-text-h4);
	line-height: var(--tat-leading-subheading);
}

.tat-card__link {
	color: var(--tat-color-text);
	text-decoration: none;
}

.tat-card__link::after {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: inherit;
}

.tat-card__link:hover {
	color: var(--tat-color-link);
}

.tat-card__link:focus-visible {
	outline: none;
}

.tat-card__link:focus-visible::after {
	outline: var(--tat-focus-width) solid var(--tat-color-focus);
	outline-offset: var(--tat-focus-offset);
}

.tat-card__summary,
.tat-card__preview {
	margin: 0;
	color: var(--tat-color-text-muted);
	font-size: var(--tat-text-small);
}

.tat-card__preview {
	padding: var(--tat-space-2) var(--tat-space-3);
	border-radius: var(--tat-radius-control);
	background: var(--tat-color-raised);
	font-family: var(--tat-font-mono);
	white-space: pre-line;
}

.tat-card__meta {
	display: flex;
	flex-wrap: wrap;
	gap: var(--tat-space-2);
	align-items: center;
	margin-top: auto;
	padding-top: var(--tat-space-1);
}

.tat-card__note,
.tat-card__eyebrow {
	color: var(--tat-color-text-muted);
	font-size: var(--tat-text-small);
}

.tat-card__eyebrow {
	font-weight: var(--tat-weight-strong);
}

/* Logos sit on white in both themes (PRD §13 imagery); without one, a tinted monogram. */
.tat-card__logo {
	display: inline-flex;
	flex: none;
	align-items: center;
	justify-content: center;
	overflow: hidden;
	width: 48px;
	height: 48px;
	border: 1px solid var(--tat-color-border);
	border-radius: var(--tat-radius-control);
	background: var(--tat-white);
}

.tat-card__logo img {
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.tat-card__logo--placeholder {
	border-color: transparent;
	background: var(--tat-color-raised);
	color: var(--tat-on-tile);
	font-family: var(--tat-font-display);
	font-size: var(--tat-text-h4);
	font-weight: var(--tat-weight-h1);
}

/* Eight stable tints for monograms (Components::tile_tint()); same in both themes. */
.tat-tile--1 { background: var(--tat-tile-1); }
.tat-tile--2 { background: var(--tat-tile-2); }
.tat-tile--3 { background: var(--tat-tile-3); }
.tat-tile--4 { background: var(--tat-tile-4); }
.tat-tile--5 { background: var(--tat-tile-5); }
.tat-tile--6 { background: var(--tat-tile-6); }
.tat-tile--7 { background: var(--tat-tile-7); }
.tat-tile--8 { background: var(--tat-tile-8); }

.tat-card__versus {
	display: flex;
	gap: var(--tat-space-2);
	align-items: center;
}

.tat-card__vs {
	color: var(--tat-color-text-muted);
	font-size: var(--tat-text-small);
	font-weight: var(--tat-weight-strong);
}

.tat-card__image {
	overflow: hidden;
	margin: calc(-1 * var(--tat-space-4)) calc(-1 * var(--tat-space-4)) 0;
	border-radius: var(--tat-card-radius) var(--tat-card-radius) 0 0;
	aspect-ratio: 16 / 9;
}

.tat-card__image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.tat-card__score {
	display: inline-flex;
	gap: var(--tat-space-1);
	align-items: center;
	font-size: var(--tat-text-small);
	font-variant-numeric: tabular-nums;
	font-weight: var(--tat-weight-strong);
}

.tat-card__score .tat-icon {
	width: var(--tat-icon-sm);
	height: var(--tat-icon-sm);
	color: var(--tat-color-hi);
}

/* Tamil support on tool cards: a short label and the five dots. */
.tat-card__tamil {
	display: inline-flex;
	gap: var(--tat-space-2);
	align-items: center;
	color: var(--tat-color-text-muted);
	font-size: var(--tat-text-small);
}

.tat-card__action {
	position: relative;
	z-index: 1;
	display: inline-flex;
	gap: var(--tat-space-1);
	align-items: center;
	align-self: flex-start;
	min-height: var(--tat-button-min-height);
	padding: 0 var(--tat-space-3);
	border: 1px solid var(--tat-color-border-control);
	border-radius: var(--tat-radius-pill);
	background: var(--tat-color-surface);
	color: var(--tat-color-text);
	font: inherit;
	font-weight: var(--tat-weight-strong);
	cursor: pointer;
}

.tat-card__action:hover,
.tat-card__action:focus {
	border-color: var(--tat-color-text);
	background: var(--tat-color-raised);
	color: var(--tat-color-text);
}

.tat-card__action .tat-icon {
	width: var(--tat-icon-sm);
	height: var(--tat-icon-sm);
}

/* Hero logo (tool page): the card logo tile at 64px, initial when there's no logo. */
.tat-tool-logo .tat-card__logo {
	width: 64px;
	height: 64px;
}

.tat-tool-logo .tat-card__logo--placeholder {
	font-size: var(--tat-text-h3);
}

/* Tags and price badges (PRD §13.6). Lime (badge tokens) for Trending, Best match, Winner. */
.tat-tag {
	display: inline-flex;
	align-items: center;
	padding: 2px var(--tat-space-2);
	border: 1px solid var(--tat-color-border);
	border-radius: var(--tat-radius-pill);
	color: var(--tat-color-text);
	font-size: var(--tat-text-small);
}

.tat-badge--price,
.tat-badge--premium {
	border: 1px solid var(--tat-color-border);
	background: var(--tat-color-raised);
	color: var(--tat-color-text);
}

.tat-badge--free {
	border-color: var(--tat-color-success-border);
	color: var(--tat-color-success);
}

.tat-badge--freemium {
	border-color: var(--tat-color-border-strong);
	color: var(--tat-color-text);
}

/* Skeleton loaders (UI/UX §5.2): the card's own proportions, a soft pulse. */
.tat-skeleton {
	display: block;
	border-radius: var(--tat-radius-control);
	background: var(--tat-color-raised);
	animation: tat-pulse 1.4s ease-in-out infinite;
}

.tat-skeleton--logo {
	width: 48px;
	height: 48px;
}

.tat-skeleton--image {
	margin: calc(-1 * var(--tat-space-4)) calc(-1 * var(--tat-space-4)) 0;
	border-radius: var(--tat-card-radius) var(--tat-card-radius) 0 0;
	aspect-ratio: 16 / 9;
}

.tat-skeleton--title {
	width: 60%;
	height: 20px;
}

.tat-skeleton--line {
	width: 100%;
	height: 12px;
}

.tat-skeleton--short {
	width: 70%;
}

.tat-skeleton--badge {
	width: 72px;
	height: 22px;
	margin-top: auto;
	border-radius: var(--tat-radius-pill);
}

@keyframes tat-pulse {
	50% {
		opacity: 0.5;
	}
}

/* Empty state (UI/UX §5.2, §7): message + one next action, no illustration. */
.tat-empty {
	display: flex;
	flex-direction: column;
	gap: var(--tat-space-2);
	align-items: flex-start;
	padding: var(--tat-space-5) var(--tat-space-4);
	border: 1px dashed var(--tat-color-border-control);
	border-radius: var(--tat-card-radius);
}

.tat-empty__message {
	margin: 0;
	font-weight: var(--tat-weight-strong);
}

/* Toast (UI/UX §5.4): bottom-centre on phones, bottom-right from 1024px; one at a time. */
.tat-toast-region {
	position: fixed;
	right: var(--tat-space-3);
	bottom: var(--tat-space-3);
	left: var(--tat-space-3);
	z-index: var(--tat-z-toast);
	display: flex;
	justify-content: center;
	pointer-events: none;
}

@media (min-width: 1024px) {
	.tat-toast-region {
		left: auto;
		justify-content: flex-end;
	}
}

.tat-toast {
	padding: var(--tat-space-2) var(--tat-space-4);
	border-radius: var(--tat-radius-pill);
	background: var(--tat-color-text);
	color: var(--tat-color-bg);
	box-shadow: var(--tat-shadow-overlay);
	font-weight: var(--tat-weight-strong);
	animation: tat-toast-in var(--tat-motion-base) var(--tat-ease-out);
}

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

/* Post grid (UI/UX §4.1, §4.2): fewer cards leave columns empty, never placeholders. */
.tat-post-grid__head {
	display: flex;
	flex-wrap: wrap;
	gap: var(--tat-space-2) var(--tat-space-4);
	align-items: baseline;
	justify-content: space-between;
	margin-bottom: var(--tat-space-4);
}

.tat-post-grid__heading {
	margin: 0;
}

.tat-post-grid__list {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
	gap: var(--tat-space-4);
	margin: 0;
	padding: 0;
	list-style: none;
}

.tat-post-grid__item {
	display: flex;
	min-width: 0;
}

.tat-post-grid__item > .tat-card {
	flex: 1;
}

/* Carousel: a swipe row below 1024px (no autoplay, UI/UX §8), the grid from 1024px. */
@media (max-width: 1023px) {
	.tat-post-grid--carousel .tat-post-grid__list {
		grid-auto-columns: minmax(260px, 80%);
		grid-auto-flow: column;
		grid-template-columns: none;
		overflow-x: auto;
		overscroll-behavior-x: contain;
		padding-bottom: var(--tat-space-2);
		scroll-snap-type: x mandatory;
		scroll-padding-inline: 0;
	}

	.tat-post-grid--carousel .tat-post-grid__item {
		scroll-snap-align: start;
	}
}

@media (min-width: 1024px) {
	.tat-post-grid--carousel .tat-post-grid__list {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}
}

/* Archive intro (PRD §6.1.3): live H1 + description beside decorative header art. */
.tat-archive-intro {
	display: grid;
	gap: var(--tat-space-4);
	align-items: center;
}

@media (min-width: 768px) {
	.tat-archive-intro--image {
		grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
	}
}

.tat-archive-intro__title {
	margin: 0 0 var(--tat-space-3);
}

.tat-archive-intro__art {
	overflow: hidden;
	border-radius: var(--tat-card-radius);
	aspect-ratio: 16 / 9;
}

.tat-archive-intro__art img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* Filter bar (UI/UX §4.3): sticky beneath the header. The widget wrapper is the sticky
   element, so it stays stuck while its container (filters + results) scrolls by. */
.elementor-widget-tat-tool-filters {
	position: sticky;
	top: var(--tat-header-height);
	z-index: var(--tat-z-filter-bar);
}

/* While the phone sheet is open its backdrop must cover the sticky header (z 100) too. */
.elementor-widget-tat-tool-filters:has(.tat-filters.is-open) {
	z-index: var(--tat-z-modal);
}

.admin-bar .elementor-widget-tat-tool-filters {
	top: calc(var(--tat-header-height) + 32px);
}

.tat-filters {
	padding: var(--tat-space-3) 0;
	border-bottom: 1px solid var(--tat-color-border);
	background: var(--tat-color-bg);
}

.tat-filters__panel {
	display: flex;
	flex-wrap: wrap;
	gap: var(--tat-space-3) var(--tat-space-4);
	align-items: flex-end;
}

/* Outside the open sheet the head is visually hidden, but its H2 stays in the outline. */
.tat-filters__sheet-head {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

.tat-filters__sheet-head .tat-filters__close {
	display: none;
}

.tat-filters__group {
	display: flex;
	flex-direction: column;
	gap: var(--tat-space-1);
	min-width: 0;
	margin: 0;
	padding: 0;
	border: 0;
}

.tat-filters__label {
	padding: 0;
	color: var(--tat-color-text-muted);
	font-size: var(--tat-text-small);
	font-weight: var(--tat-weight-strong);
}

.tat-filters__chips {
	display: flex;
	flex-wrap: wrap;
	gap: var(--tat-space-2);
}

/* Chip = a labelled checkbox; the whole pill is the 44px target. */
.tat-chip {
	position: relative;
	display: inline-flex;
}

.tat-chip input {
	position: absolute;
	opacity: 0;
	inset: 0;
	margin: 0;
	cursor: pointer;
}

.tat-chip span {
	display: inline-flex;
	align-items: center;
	min-height: var(--tat-button-min-height);
	padding: 0 var(--tat-space-3);
	border: 1px solid var(--tat-color-border-control);
	border-radius: var(--tat-radius-pill);
	background: var(--tat-color-surface);
	color: var(--tat-color-text);
	font-size: var(--tat-text-small);
	font-weight: var(--tat-weight-strong);
}

.tat-chip input:checked + span {
	border-color: var(--tat-color-primary);
	background: var(--tat-color-primary);
	color: var(--tat-color-on-primary);
}

.tat-chip input:focus-visible + span {
	outline: var(--tat-focus-width) solid var(--tat-color-focus);
	outline-offset: var(--tat-focus-offset);
}

.tat-filters__select {
	min-height: var(--tat-button-min-height);
	padding: 0 var(--tat-space-5) 0 var(--tat-space-3);
	border: 1px solid var(--tat-input-border);
	border-radius: var(--tat-input-radius);
	background-color: var(--tat-input-bg);
	color: var(--tat-color-text);
	font: inherit;
	font-size: var(--tat-text-small);
}

.tat-filters__actions {
	display: flex;
	flex-wrap: wrap;
	gap: var(--tat-space-3);
	align-items: center;
	min-height: var(--tat-button-min-height);
}

.tat-filters__apply,
.tat-filters__toggle {
	display: inline-flex;
	gap: var(--tat-space-2);
	align-items: center;
	justify-content: center;
	min-height: var(--tat-button-min-height);
	padding: 0 var(--tat-space-4);
	border: 0;
	border-radius: var(--tat-button-radius);
	background: var(--tat-button-bg);
	color: var(--tat-button-text);
	font: inherit;
	font-weight: var(--tat-weight-strong);
	cursor: pointer;
}

.tat-filters__apply:hover,
.tat-filters__apply:focus {
	background: var(--tat-button-bg-hover);
	color: var(--tat-button-text);
}

.tat-filters__toggle {
	border: 1px solid var(--tat-color-border-control);
	background: var(--tat-color-surface);
	color: var(--tat-color-text);
}

.tat-filters__toggle:hover,
.tat-filters__toggle:focus {
	background: var(--tat-color-raised);
	color: var(--tat-color-text);
}

.tat-filters__close:hover,
.tat-filters__close:focus {
	background: var(--tat-color-raised);
	color: var(--tat-color-text);
}

.tat-filters__toggle[hidden] {
	display: none;
}

.tat-filters__toggle .tat-icon,
.tat-filters__close .tat-icon {
	width: var(--tat-icon-md);
	height: var(--tat-icon-md);
}

.tat-filters__clear {
	color: var(--tat-color-link);
	font-weight: var(--tat-weight-strong);
}

/* Enhanced, from 1024px: changes apply at once, so the submit button goes. */
@media (min-width: 1024px) {
	.tat-filters.is-enhanced .tat-filters__apply,
	.tat-filters.is-enhanced .tat-filters__toggle {
		display: none;
	}
}

/* Enhanced, below 1024px: a "Filters (n)" button and a bottom sheet (UI/UX §4.3, §5.5). */
@media (max-width: 1023px) {
	.tat-filters.is-enhanced .tat-filters__panel {
		display: none;
	}

	.tat-filters.is-enhanced.is-open .tat-filters__panel {
		position: fixed;
		right: 0;
		bottom: 0;
		left: 0;
		z-index: var(--tat-z-modal);
		display: flex;
		flex-direction: column;
		flex-wrap: nowrap;
		align-items: stretch;
		max-height: 85vh;
		max-height: 85dvh;
		padding: var(--tat-space-4) var(--tat-space-4) calc(var(--tat-space-4) + env(safe-area-inset-bottom, 0px));
		overflow-y: auto;
		border-radius: var(--tat-card-radius) var(--tat-card-radius) 0 0;
		background: var(--tat-color-surface);
		box-shadow: var(--tat-shadow-overlay);
		animation: tat-sheet-in var(--tat-motion-base) var(--tat-ease-out);
	}

	.tat-filters.is-open .tat-filters__sheet-head {
		position: static;
		display: flex;
		align-items: center;
		justify-content: space-between;
		width: auto;
		height: auto;
		margin: 0;
		overflow: visible;
		clip-path: none;
		white-space: normal;
	}

	.tat-filters.is-open .tat-filters__sheet-head .tat-filters__close {
		display: inline-flex;
	}

	.tat-filters__title {
		margin: 0;
		font-size: var(--tat-text-h3);
	}

	.tat-filters__close {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		width: 44px;
		height: 44px;
		padding: 0;
		border: 0;
		border-radius: var(--tat-radius-pill);
		background: none;
		color: var(--tat-color-text);
		cursor: pointer;
	}

	.tat-filters.is-open .tat-filters__select {
		width: 100%;
	}

	.tat-filters.is-open .tat-filters__apply {
		flex: 1;
	}
}

.tat-filters__backdrop {
	position: fixed;
	inset: 0;
	z-index: var(--tat-z-overlay);
	background: var(--tat-scrim);
}

.tat-sheet-open {
	overflow: hidden;
}

@keyframes tat-sheet-in {
	from {
		transform: translateY(24px);
		opacity: 0;
	}
}

/* Results (UI/UX §4.3): a 200ms fade while the grid updates. */
.tat-results {
	display: flex;
	flex-direction: column;
	gap: var(--tat-space-4);
	padding-top: var(--tat-space-4);
	transition: opacity var(--tat-motion-base) var(--tat-ease-out);
}

.tat-results.is-updating {
	opacity: 0.4;
}

.tat-results__count {
	margin: 0;
	color: var(--tat-color-text-muted);
	font-size: var(--tat-text-small);
	font-weight: var(--tat-weight-strong);
}

.tat-pagination .page-numbers {
	display: flex;
	flex-wrap: wrap;
	gap: var(--tat-space-2);
	margin: 0;
	padding: 0;
	list-style: none;
}

.tat-pagination a.page-numbers,
.tat-pagination span.page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 44px;
	min-height: 44px;
	padding: 0 var(--tat-space-3);
	border: 1px solid var(--tat-color-border);
	border-radius: var(--tat-radius-pill);
	color: var(--tat-color-text);
	font-weight: var(--tat-weight-strong);
	text-decoration: none;
}

.tat-pagination a.page-numbers:hover {
	border-color: var(--tat-color-text);
	color: var(--tat-color-text);
}

.tat-pagination span.page-numbers.current {
	border-color: var(--tat-color-text);
	background: var(--tat-color-text);
	color: var(--tat-color-bg);
}

@media (prefers-reduced-motion: reduce) {
	.tat-results,
	.tat-filters__panel {
		transition: none;
		animation: none;
	}
}

/* Prompt Library model tabs (UI/UX §4.5, Kelvi): pills, the current one inverted; a
   horizontal scroll row when they don't fit. */
.tat-prompt-nav {
	display: flex;
	flex-wrap: wrap;
	gap: var(--tat-space-3);
	align-items: center;
	justify-content: space-between;
	padding-bottom: var(--tat-space-3);
}

.tat-tabs {
	min-width: 0;
	max-width: 100%;
	overflow-x: auto;
	scrollbar-width: thin;
}

.tat-tabs__list {
	display: flex;
	gap: var(--tat-space-2);
	margin: 0;
	padding: 0;
	list-style: none;
	white-space: nowrap;
}

.tat-tabs__link {
	display: inline-flex;
	align-items: center;
	min-height: var(--tat-button-min-height);
	padding: 0 var(--tat-space-4);
	border: 1px solid var(--tat-color-border);
	border-radius: var(--tat-radius-pill);
	color: var(--tat-color-text-muted);
	font-weight: var(--tat-weight-strong);
	text-decoration: none;
}

.tat-tabs__link:hover {
	border-color: var(--tat-color-border-strong);
	color: var(--tat-color-text);
}

.tat-tabs__link[aria-current="page"] {
	border-color: var(--tat-color-text);
	background: var(--tat-color-text);
	color: var(--tat-color-bg);
}

.tat-toggle-link {
	display: inline-flex;
	gap: var(--tat-space-1);
	align-items: center;
	min-height: var(--tat-button-min-height);
	margin-bottom: var(--tat-space-1);
	padding: 0 var(--tat-space-3);
	border: 1px solid var(--tat-color-border-control);
	border-radius: var(--tat-radius-pill);
	color: var(--tat-color-text);
	font-size: var(--tat-text-small);
	font-weight: var(--tat-weight-strong);
	text-decoration: none;
}

.tat-toggle-link.is-on {
	border-color: var(--tat-color-primary);
	background: var(--tat-color-primary);
	color: var(--tat-color-on-primary);
}

.tat-toggle-link .tat-icon {
	width: var(--tat-icon-sm);
	height: var(--tat-icon-sm);
}

/* Search results (UI/UX §4.6): a jump list, then one section per content type. */
.tat-search {
	display: flex;
	flex-direction: column;
	gap: var(--tat-space-5);
}

.tat-search__title {
	margin: 0;
	overflow-wrap: anywhere;
}

.tat-search__jump ul {
	display: flex;
	flex-wrap: wrap;
	gap: var(--tat-space-2);
	margin: 0;
	padding: 0;
	list-style: none;
}

.tat-search__jump a {
	display: inline-flex;
	gap: var(--tat-space-1);
	align-items: center;
	min-height: var(--tat-button-min-height);
	padding: 0 var(--tat-space-3);
	border: 1px solid var(--tat-color-border-control);
	border-radius: var(--tat-radius-pill);
	color: var(--tat-color-text);
	font-size: var(--tat-text-small);
	font-weight: var(--tat-weight-strong);
	text-decoration: none;
}

.tat-search__n {
	color: var(--tat-color-text-muted);
	font-weight: var(--tat-weight-body);
}

.tat-search__group {
	scroll-margin-top: calc(var(--tat-header-height) + var(--tat-space-3));
}

.tat-search__back {
	margin: 0;
}

.tat-empty .tat-category-grid {
	width: 100%;
}

/* Premium preview (BUILD_PLAN 2.11; UI/UX §4.5): blurred filler (never the prompt) under
   a lock and "Unlock with Premium". The blur says there's real content here. */
.tat-premium {
	position: relative;
	display: grid;
	place-items: center;
	overflow: hidden;
	min-height: 96px;
	border: 1px solid var(--tat-color-border);
	border-radius: var(--tat-radius-control);
	background: var(--tat-color-raised);
}

.tat-premium__blur {
	grid-area: 1 / 1;
	margin: 0;
	padding: var(--tat-space-3);
	color: var(--tat-color-text);
	filter: blur(5px);
	user-select: none;
	pointer-events: none;
}

.tat-premium__gate {
	position: relative;
	z-index: 1;
	display: inline-flex;
	grid-area: 1 / 1;
	gap: var(--tat-space-1);
	align-items: center;
	min-height: var(--tat-button-min-height);
	padding: 0 var(--tat-space-3);
	border: 1px solid var(--tat-color-border-control);
	border-radius: var(--tat-radius-pill);
	background: var(--tat-color-surface);
	color: var(--tat-color-text);
	font-weight: var(--tat-weight-strong);
	text-decoration: none;
}

.tat-premium__gate--link {
	border-color: transparent;
	background: var(--tat-button-bg);
	color: var(--tat-button-text);
}

.tat-premium__gate .tat-icon {
	width: var(--tat-icon-sm);
	height: var(--tat-icon-sm);
}

/* Prompt on its own page (Kelvi, R8): a card with a head row (label, lime Copy) above the
   text. */
.tat-prompt-box {
	display: flex;
	flex-direction: column;
	gap: var(--tat-space-3);
	padding: var(--tat-space-4);
	border: 1px solid var(--tat-color-border);
	border-radius: var(--tat-radius-card);
	background: var(--tat-color-surface);
	box-shadow: var(--tat-shadow-card);
}

.tat-prompt-box--premium {
	padding: 0;
	border: 0;
	background: none;
	box-shadow: none;
}

.tat-prompt-box__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--tat-space-3);
}

.tat-prompt-box__label {
	color: var(--tat-color-text-muted);
	font-family: var(--tat-font-mono);
	font-size: var(--tat-text-small);
}

.tat-prompt-box .tat-prompt-box__copy {
	align-self: center;
	border-color: transparent;
	background: var(--tat-color-primary);
	color: var(--tat-color-on-primary);
}

.tat-prompt-box .tat-prompt-box__copy:hover,
.tat-prompt-box .tat-prompt-box__copy:focus-visible {
	border-color: transparent;
	background: var(--tat-color-primary-strong);
	color: var(--tat-color-on-primary);
}

.tat-prompt-box--premium .tat-premium {
	width: 100%;
	min-height: 160px;
}

.tat-prompt-box__text {
	box-sizing: border-box;
	width: 100%;
	margin: 0;
	padding: var(--tat-space-4);
	overflow-x: auto;
	border: 1px solid var(--tat-color-border);
	border-radius: var(--tat-radius-control);
	background: var(--tat-color-raised);
	color: var(--tat-color-text);
	font: inherit;
	font-family: var(--tat-font-mono);
	line-height: var(--tat-leading-body);
	white-space: pre-wrap;
	overflow-wrap: anywhere;
}

/* Comparison verdict (UI/UX §4.4; canvas v4): a soft lime band with the trophy on a lime
   tile (ink icon). */
.tat-verdict {
	display: flex;
	gap: 20px;
	align-items: center;
	padding: var(--tat-space-4) 28px;
	border: 1px solid var(--tat-color-border);
	border-radius: var(--tat-radius-lg);
	background: var(--tat-color-hi-soft);
}

.tat-verdict__icon {
	display: inline-flex;
	flex: none;
	align-items: center;
	justify-content: center;
	width: 52px;
	height: 52px;
	border-radius: 16px;
	background: var(--tat-color-primary);
	color: var(--tat-color-on-primary);
}

.tat-verdict__icon .tat-icon {
	width: var(--tat-icon-md);
	height: var(--tat-icon-md);
}

.tat-verdict__body {
	display: flex;
	flex: 1;
	flex-direction: column;
	gap: var(--tat-space-2);
	min-width: 0;
}

.tat-verdict__head {
	display: flex;
	gap: var(--tat-space-3);
	align-items: center;
}

.tat-verdict__title {
	margin: 0;
	font-family: var(--tat-font-display);
	font-size: var(--tat-text-h3);
	line-height: var(--tat-leading-subheading);
}

.tat-verdict__text {
	max-width: 70ch;
	margin: 0;
}

/* Tool page sections (PRD §6.1.2): overview, how to use, video, screenshots. */
.tat-tool-section__heading {
	margin: 0 0 var(--tat-space-3);
}

.tat-overview p,
.tat-prose > :first-child {
	margin-top: 0;
}

.tat-overview p {
	max-width: 70ch;
	margin-bottom: var(--tat-space-3);
}

.tat-overview p:last-child,
.tat-prose > :last-child {
	margin-bottom: 0;
}

.tat-prose {
	max-width: 70ch;
}

.tat-prose ol,
.tat-prose ul {
	padding-left: 1.5em;
}

.tat-prose li + li {
	margin-top: var(--tat-space-2);
}

.tat-video__frame {
	overflow: hidden;
	border-radius: var(--tat-card-radius);
	background: var(--tat-color-border);
	aspect-ratio: 16 / 9;
}

.tat-video__frame iframe {
	display: block;
	width: 100%;
	height: 100%;
	border: 0;
}

/* A guide's video under its intro (GUIDES_PLAN §2.3): a poster link until clicked. A Short
   is a 9:16 phone-sized frame, a walkthrough the full column at 16:9. */
.tat-guide-video {
	margin: var(--tat-space-5) 0;
}

.tat-guide-video__frame {
	position: relative;
	overflow: hidden;
	border-radius: var(--tat-card-radius);
	background: var(--tat-color-raised);
	aspect-ratio: 16 / 9;
}

.tat-guide-video--short .tat-guide-video__frame {
	max-width: 320px;
	aspect-ratio: 9 / 16;
}

.tat-guide-video__frame iframe,
.tat-guide-video__play {
	display: block;
	width: 100%;
	height: 100%;
	border: 0;
}

.tat-guide-video__play img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.tat-guide-video__icon {
	position: absolute;
	top: 50%;
	left: 50%;
	display: grid;
	place-items: center;
	width: 64px;
	height: 64px;
	border-radius: 50%;
	background: var(--tat-color-primary);
	box-shadow: var(--tat-shadow-glow);
	color: var(--tat-color-on-primary);
	transform: translate(-50%, -50%);
	transition: transform var(--tat-motion-fast) var(--tat-ease-out);
}

.tat-guide-video__play:hover .tat-guide-video__icon {
	transform: translate(-50%, -50%) scale(1.08);
}

.tat-guide-video__play:focus-visible {
	outline: var(--tat-focus-width) solid var(--tat-color-focus);
	outline-offset: calc(-1 * var(--tat-focus-width) - 2px);
}

.tat-guide-video__reel {
	margin-top: var(--tat-space-3);
	font-size: var(--tat-text-small);
}

@media (prefers-reduced-motion: reduce) {
	.tat-guide-video__icon {
		transition: none;
	}
}

/* Screenshots: one per view with dots on phones, a 3-across grid from 1024px. */
.tat-shots__track {
	position: relative;
	display: grid;
	grid-auto-columns: 100%;
	grid-auto-flow: column;
	gap: var(--tat-space-3);
	margin: 0;
	padding: 0;
	overflow-x: auto;
	overscroll-behavior-x: contain;
	list-style: none;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
}

.tat-shots__track::-webkit-scrollbar {
	display: none;
}

.tat-shots__slide {
	scroll-snap-align: start;
}

.tat-shots__link {
	display: block;
	overflow: hidden;
	border: 1px solid var(--tat-color-border);
	border-radius: var(--tat-card-radius);
	background: var(--tat-white);
	aspect-ratio: 16 / 10;
}

.tat-shots__link img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: top;
}

.tat-shots__dots {
	display: flex;
	gap: var(--tat-space-1);
	justify-content: center;
	margin-top: var(--tat-space-2);
}

/* 24px hit area around an 8px dot (WCAG 2.5.8 target spacing). */
.tat-shots__dot {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 24px;
	height: 24px;
	padding: 0;
	border: 0;
	background: none;
	cursor: pointer;
}

.tat-shots__dot::before {
	content: "";
	width: 8px;
	height: 8px;
	border-radius: var(--tat-radius-pill);
	background: var(--tat-color-border-control);
}

.tat-shots__dot[aria-current="true"]::before {
	width: 20px;
	background: var(--tat-color-hi);
}

/* Doubled class: Hello Elementor's button:hover / :focus reset would paint the dot's box pink. */
.tat-shots .tat-shots__dot:hover,
.tat-shots .tat-shots__dot:focus {
	border: 0;
	background: none;
	color: inherit;
}

.tat-shots .tat-shots__dot:not([aria-current="true"]):hover::before {
	background: var(--tat-color-text-muted);
}

@media (min-width: 1024px) {
	.tat-shots__track {
		grid-auto-flow: row;
		grid-template-columns: repeat(3, minmax(0, 1fr));
		overflow: visible;
	}

	.tat-shots__dots {
		display: none;
	}
}

/* Tool facts (UI/UX §4.2): hero badges, language and persona lists, "Last verified". */
.tat-tool-badges,
.tat-tool-list__items {
	display: flex;
	flex-wrap: wrap;
	gap: var(--tat-space-2);
	margin: 0;
	padding: 0;
	list-style: none;
}

.tat-tool-list__heading {
	margin: 0 0 var(--tat-space-2);
	font-size: var(--tat-text-h4);
	line-height: var(--tat-leading-subheading);
}

.tat-tag .tat-icon,
.tat-badge--tamil .tat-icon {
	width: var(--tat-icon-sm);
	height: var(--tat-icon-sm);
	margin-right: var(--tat-space-1);
}

.tat-tag--highlight,
.tat-badge--tamil {
	border: 1px solid var(--tat-color-success-border);
	background: transparent;
	color: var(--tat-color-success);
	font-weight: var(--tat-weight-strong);
}

.tat-verified {
	margin: 0;
	color: var(--tat-color-text-muted);
	font-size: var(--tat-text-small);
}

/* Affiliate CTA (PRD §12): the primary button, a lime pill with ink text; opens in a new tab. */
.tat-cta {
	display: inline-flex;
	gap: var(--tat-space-2);
	align-items: center;
	justify-content: center;
	min-height: var(--tat-button-min-height);
	padding: var(--tat-space-2) var(--tat-space-4);
	border-radius: var(--tat-button-radius);
	background: var(--tat-button-bg);
	color: var(--tat-button-text);
	font-weight: var(--tat-weight-strong);
	line-height: 1.4;
	text-align: center;
	text-decoration: none;
	transition: transform var(--tat-motion-fast) var(--tat-ease-out), box-shadow var(--tat-motion-fast) var(--tat-ease-out);
}

.tat-cta:hover,
.tat-cta:focus-visible {
	background: var(--tat-button-bg-hover);
	color: var(--tat-button-text);
}

@media (hover: hover) {
	.tat-cta:hover {
		box-shadow: var(--tat-card-shadow-hover);
		transform: translateY(var(--tat-lift-hover));
	}
}

.tat-cta:active {
	transform: translateY(0);
}

/* CSS class tat-cta-block on the widget: the button fills its column (hero score card). */
.tat-cta-block .tat-cta {
	width: 100%;
}

.tat-cta .tat-icon {
	flex: none;
	width: var(--tat-icon-sm);
	height: var(--tat-icon-sm);
}

/* Sticky CTA bar: phones and tablets only, after the hero scrolls away (UI/UX §4.2). */
.tat-sticky-cta {
	position: fixed;
	right: 0;
	bottom: 0;
	left: 0;
	z-index: var(--tat-z-sticky-cta);
	padding: var(--tat-space-2) var(--tat-space-3) calc(var(--tat-space-2) + env(safe-area-inset-bottom, 0px));
	border-top: 1px solid var(--tat-color-border);
	background: var(--tat-color-surface);
	box-shadow: var(--tat-shadow-overlay);
}

.tat-sticky-cta[hidden] {
	display: none;
}

.tat-sticky-cta .tat-cta {
	width: 100%;
}

/* Keep the footer's last links reachable above the bar, and keyboard focus out from under
   it (WCAG 2.4.11; R9). */
@media (max-width: 1023px) {
	body:has(.tat-sticky-cta:not([hidden])) {
		padding-bottom: 80px;
	}

	/* Whenever the page has the bar: it appears mid-scroll, after the hero leaves. */
	html:has(.tat-sticky-cta) {
		scroll-padding-bottom: calc(80px + var(--tat-space-3));
	}
}

@media (min-width: 1024px) {
	.tat-sticky-cta,
	.tat-sticky-cta[hidden] {
		display: none;
	}
}

@media (prefers-reduced-motion: reduce) {
	.tat-cta {
		transition: none;
	}

	.tat-cta:hover {
		transform: none;
	}
}

@media (prefers-reduced-motion: reduce) {
	.tat-card,
	.tat-skeleton,
	.tat-toast {
		transition: none;
		animation: none;
	}
}

/* Breadcrumb (tool and category heroes, BUILD_PLAN R5 / R6). */
.tat-crumbs__list {
	display: flex;
	flex-wrap: wrap;
	gap: var(--tat-space-2);
	margin: 0;
	padding: 0;
	color: var(--tat-color-text-muted);
	font-size: var(--tat-text-small);
	list-style: none;
}

.tat-crumbs__list li + li::before {
	margin-right: var(--tat-space-2);
	content: '/';
}

.tat-crumbs a {
	color: var(--tat-color-text-muted);
	text-decoration: none;
}

.tat-crumbs a:hover,
.tat-crumbs a:focus-visible {
	color: var(--tat-color-text);
	text-decoration: underline;
}

.tat-crumbs [aria-current] {
	color: var(--tat-color-text);
}
