/*
 * 2F Sim Series public design system.
 * Scoped to plugin output so it can sit safely on top of any WordPress theme.
 */

:root {
	--tfdf-brand-blue: #0788c8;
	--tfdf-brand-button: #0788c8;
	--tfdf-brand-button-text: #ffffff;
	--tfdf-brand-blue-deep: #006ea8;
	--tfdf-brand-navy: #102536;
	--tfdf-brand-navy-soft: #1d3b50;
	--tfdf-brand-ink: #172635;
	--tfdf-brand-muted: #5d6e7c;
	--tfdf-brand-line: #d9e4eb;
	--tfdf-brand-pale: #eef8fc;
	--tfdf-brand-surface: #ffffff;
	--tfdf-brand-shadow: 0 14px 38px rgba(12, 43, 64, .11);
	--tfdf-brand-radius: 16px;
}

.tfdf-template,
.tfdf-block,
.tfdf-block *,
.tfdf-archive,
.tfdf-archive *,
.tfdf-home-series-list,
.tfdf-home-series-list * { box-sizing: border-box; }

.tfdf-template {
	color: var(--tfdf-brand-ink);
	font-size: var(--tfdf-base-font, var(--tfdf-brand-base-font, 16px));
}

/* Shared race-card surface */
.tfdf-block {
	background: var(--tfdf-brand-surface) !important;
	border: 1px solid var(--tfdf-brand-line) !important;
	border-radius: var(--tfdf-brand-radius) !important;
	box-shadow: var(--tfdf-brand-shadow) !important;
	color: var(--tfdf-brand-ink) !important;
	font-size: var(--tfdf-base-font, var(--tfdf-brand-base-font, 16px));
	isolation: isolate;
	margin: 0 0 clamp(18px, 2.5vw, 28px) !important;
	max-width: 100%;
	overflow: visible;
	padding: clamp(18px, 3vw, 28px) !important;
	position: relative;
}

.tfdf-block::before {
	background: linear-gradient(90deg, var(--tfdf-accent, var(--tfdf-brand-accent, var(--tfdf-brand-blue))) 0 74%, var(--tfdf-brand-navy) 74% 100%);
	border-radius: var(--tfdf-brand-radius) var(--tfdf-brand-radius) 0 0;
	content: "";
	height: 5px;
	left: -1px;
	position: absolute;
	top: -1px;
	width: calc(100% + 2px);
	z-index: 2;
}

.tfdf-block::after {
	background: repeating-conic-gradient(from 45deg, rgba(16,37,54,.7) 0 25%, transparent 0 50%) 50% / 12px 12px;
	content: "";
	height: 34px;
	mask-image: linear-gradient(90deg, transparent, #000);
	opacity: .055;
	pointer-events: none;
	position: absolute;
	right: 0;
	top: 5px;
	width: 120px;
	z-index: 0;
}

.tfdf-block > * { position: relative; z-index: 1; }

.tfdf-block h1,
.tfdf-block h2,
.tfdf-block h3,
.tfdf-block h4 {
	color: var(--tfdf-brand-navy) !important;
	font-style: normal;
	letter-spacing: -.025em;
	line-height: 1.12;
	text-align: left !important;
}

.tfdf-block > h3,
.tfdf-block > h4 {
	align-items: center;
	display: flex;
	gap: 10px;
	margin: 0 0 18px !important;
	padding: 0 0 12px;
	position: relative;
}

.tfdf-block > h3::before,
.tfdf-block > h4::before {
	background: var(--tfdf-accent, var(--tfdf-brand-accent, var(--tfdf-brand-blue)));
	content: "";
	flex: 0 0 5px;
	height: 1.15em;
	transform: skewX(-12deg);
}

.tfdf-block > h3::after,
.tfdf-block > h4::after {
	background: linear-gradient(90deg, var(--tfdf-brand-line), transparent);
	bottom: 0;
	content: "";
	height: 1px;
	left: 0;
	position: absolute;
	width: min(100%, 720px);
}

.tfdf-block p,
.tfdf-block li,
.tfdf-block dd,
.tfdf-block td { color: var(--tfdf-brand-ink); }
.tfdf-block small { color: var(--tfdf-brand-muted); }
.tfdf-block a { color: var(--tfdf-brand-blue-deep); font-weight: 750; text-underline-offset: 3px; }

/* Entity hero blocks */
.tfdf-entity-header {
	background:
		linear-gradient(112deg, #fff 0 64%, rgba(7,136,200,.07) 64% 100%) !important;
	min-height: 190px;
	overflow: hidden;
	padding: clamp(24px, 4vw, 42px) !important;
}

.tfdf-entity-header::before { height: 7px; }
.tfdf-entity-header__eyebrow,
.tfdf-public-kicker,
.tfdf-archive__eyebrow {
	color: var(--tfdf-brand-blue-deep) !important;
	font-size: .73rem !important;
	font-weight: 900 !important;
	letter-spacing: .14em !important;
	margin: 0 0 8px !important;
	text-transform: uppercase;
}

.tfdf-entity-header h2 {
	font-size: clamp(2rem, 5vw, 4rem) !important;
	font-weight: 950;
	margin: 0 !important;
	max-width: 780px;
	text-transform: uppercase;
}

.tfdf-entity-header__title-row,
.tfdf-series-header__title-row {
	align-items: center !important;
	display: flex !important;
	flex-wrap: wrap;
	gap: 10px 14px !important;
}

.tfdf-entity-header__parent,
.tfdf-entity-header__meta {
	color: var(--tfdf-brand-muted) !important;
	font-size: .95rem;
	font-weight: 750;
	margin: 12px 0 0 !important;
}

.tfdf-entity-header__description {
	color: var(--tfdf-brand-muted) !important;
	line-height: 1.65;
	margin: 16px 0 0 !important;
	max-width: 760px;
}

.tfdf-series-header__layout,
.tfdf-series-header.has-image .tfdf-series-header__layout {
	align-items: center !important;
	display: grid !important;
	gap: clamp(24px, 4vw, 46px) !important;
	grid-template-columns: minmax(0, 1fr) minmax(260px, 38%) !important;
}

.tfdf-series-header:not(.has-image) .tfdf-series-header__content { padding-right: 0; }
.tfdf-series-header__title-row h2 { font-size: clamp(2rem, 5vw, 4rem) !important; font-weight: 950; text-transform: uppercase; }
.tfdf-series-header__status,
.tfdf-series-header__chips span,
.tfdf-status-badge,
.tfdf-home-series-badge {
	align-items: center;
	background: var(--tfdf-brand-pale) !important;
	border: 1px solid #b9deef !important;
	border-radius: 999px !important;
	color: #075d87 !important;
	display: inline-flex;
	font-size: .72rem !important;
	font-weight: 900 !important;
	letter-spacing: .055em;
	line-height: 1;
	min-height: 29px;
	padding: 6px 10px !important;
	text-transform: uppercase;
}

.tfdf-series-header__chips,
.tfdf-series-header__actions { display: flex !important; flex-wrap: wrap; gap: 9px !important; margin-top: 18px !important; }
.tfdf-series-header__media,
.tfdf-team-profile__media {
	background: #eaf3f8 !important;
	border: 1px solid #cfe0e9;
	border-radius: 12px !important;
	box-shadow: 0 18px 38px rgba(13,47,69,.17) !important;
	overflow: hidden;
	position: relative;
}
.tfdf-series-header__media::after,
.tfdf-team-profile__media::after {
	background: linear-gradient(100deg, transparent 70%, rgba(7,136,200,.34) 70% 74%, transparent 74%);
	content: "";
	inset: 0;
	pointer-events: none;
	position: absolute;
}
.tfdf-series-header__image { aspect-ratio: 16 / 10; display: block; height: 100%; object-fit: cover; width: 100%; }

.tfdf-team-profile.has-image {
	align-items: center;
	display: grid;
	gap: clamp(24px, 4vw, 44px);
	grid-template-columns: minmax(0, 1fr) minmax(190px, 30%);
}
.tfdf-team-profile__image { aspect-ratio: 1; display: block; object-fit: contain; width: 100%; }
.tfdf-driver-header.has-image { align-items: center; display: grid; gap: clamp(24px, 4vw, 44px); grid-template-columns: minmax(0, 1fr) minmax(180px, 28%); }
.tfdf-driver-profile__media { overflow: hidden; border: 1px solid #cfe0e9; border-radius: 12px; background: #eaf3f8; box-shadow: 0 18px 38px rgba(13,47,69,.17); }
.tfdf-driver-profile__image { aspect-ratio: 1; display: block; width: 100%; object-fit: cover; }
.tfdf-team-profile { border-top-color: var(--tfdf-team-primary, #0788c8) !important; }
.tfdf-team-profile__contact, .tfdf-team-profile__history, .tfdf-team-profile__social { margin-top: 12px; color: var(--tfdf-brand-muted); }

/* Action controls */
.tfdf-block .button,
.tfdf-block button,
.tfdf-block input[type="submit"],
.tfdf-block input[type="button"],
.tfdf-block input[type="reset"],
.tfdf-series-entry-form .button,
.tfdf-series-entry-form button,
.tfdf-series-entry-form input[type="submit"],
.tfdf-series-entry-form input[type="button"],
.tfdf-series-entry-form input[type="reset"],
.tfdf-account-shell .button,
.tfdf-account-shell button,
.tfdf-account-shell input[type="submit"],
.tfdf-account-shell input[type="button"],
.tfdf-account-shell input[type="reset"],
.tfdf-series-header__button,
.tfdf-public-button,
.tfdf-archive-card__button,
.tfdf-archive-card-button,
.tfdf-home-series-item__cta {
	align-items: center;
	background: var(--tfdf-brand-button) !important;
	background-color: var(--tfdf-brand-button) !important;
	border: 2px solid var(--tfdf-brand-button) !important;
	border-radius: 8px !important;
	box-shadow: 0 7px 18px rgba(7,136,200,.2);
	color: var(--tfdf-brand-button-text) !important;
	-webkit-text-fill-color: var(--tfdf-brand-button-text) !important;
	cursor: pointer;
	display: inline-flex;
	font-weight: 900 !important;
	justify-content: center;
	letter-spacing: .015em;
	line-height: 1.1;
	min-height: 44px;
	padding: 10px 15px !important;
	text-decoration: none !important;
	transform: skewX(-3deg);
	transition: box-shadow .18s ease, transform .18s ease, filter .18s ease;
}

.tfdf-block .button:hover,
.tfdf-block button:hover,
.tfdf-series-entry-form .button:hover,
.tfdf-series-entry-form button:hover,
.tfdf-account-shell .button:hover,
.tfdf-account-shell button:hover,
.tfdf-series-header__button:hover,
.tfdf-public-button:hover,
.tfdf-archive-card__button:hover,
.tfdf-archive-card-button:hover,
.tfdf-home-series-item__cta:hover { box-shadow: 0 11px 24px rgba(7,136,200,.28); filter: brightness(.94); transform: skewX(-3deg) translateY(-1px); }
.tfdf-public-button--disabled,
.tfdf-block .button:disabled,
.tfdf-block button:disabled,
.tfdf-account-shell .button:disabled,
.tfdf-account-shell button:disabled { background: var(--tfdf-brand-button) !important; border-color: var(--tfdf-brand-button) !important; box-shadow: none; color: #fff !important; cursor: not-allowed; opacity: .58; }

/* Tables and timing screens */
.tfdf-table-wrap,
.tfdf-scroll-x,
.tfdf-table-scroll {
	border: 1px solid var(--tfdf-brand-line);
	border-radius: 11px;
	max-width: 100%;
	overflow-x: auto;
	overscroll-behavior-inline: contain;
	-webkit-overflow-scrolling: touch;
}

.tfdf-block .tfdf-table,
.tfdf-template .tfdf-table {
	background: #fff !important;
	border: 0 !important;
	border-collapse: separate !important;
	border-radius: 0 !important;
	border-spacing: 0;
	font-size: clamp(.8rem, 1.4vw, .92rem);
	margin: 0;
	max-width: none;
	width: 100%;
}

.tfdf-block .tfdf-table th,
.tfdf-block .tfdf-table td {
	border: 0 !important;
	border-bottom: 1px solid #e4ebf0 !important;
	color: var(--tfdf-brand-ink) !important;
	padding: 12px 14px !important;
	text-align: left;
	vertical-align: middle;
}

.tfdf-block .tfdf-table thead th {
	background: var(--tfdf-brand-navy) !important;
	border-bottom-color: var(--tfdf-accent, var(--tfdf-brand-accent, var(--tfdf-brand-blue))) !important;
	border-bottom-width: 3px !important;
	color: #fff !important;
	font-size: .71rem;
	font-weight: 900;
	letter-spacing: .075em;
	text-transform: uppercase;
	white-space: nowrap;
}

.tfdf-block .tfdf-table tbody tr:nth-child(even),
.tfdf-template .tfdf-table tbody tr:nth-child(even) { background: #f3f8fb !important; }
.tfdf-block .tfdf-table tbody tr:hover,
.tfdf-template .tfdf-table tbody tr:hover { background: #e8f5fb !important; }
.tfdf-block .tfdf-table tbody tr:last-child > * { border-bottom: 0 !important; }
.tfdf-block .tfdf-table td:first-child,
.tfdf-block .tfdf-table th:first-child { padding-left: 17px !important; }
.tfdf-block .tfdf-table td:last-child,
.tfdf-block .tfdf-table th:last-child { padding-right: 17px !important; }

.tfdf-series-standings .tfdf-standings-table tbody tr:nth-child(1) td:first-child,
.tfdf-round-results table tbody tr:nth-child(1) td:first-child { box-shadow: inset 5px 0 #d9a514; font-weight: 950; }
.tfdf-series-standings .tfdf-standings-table tbody tr:nth-child(2) td:first-child,
.tfdf-round-results table tbody tr:nth-child(2) td:first-child { box-shadow: inset 5px 0 #9caab3; font-weight: 900; }
.tfdf-series-standings .tfdf-standings-table tbody tr:nth-child(3) td:first-child,
.tfdf-round-results table tbody tr:nth-child(3) td:first-child { box-shadow: inset 5px 0 #b67643; font-weight: 900; }

.tfdf-series-key-info .tfdf-table,
.tfdf-driver-season-summary .tfdf-table,
.tfdf-driver-best-results .tfdf-table,
.tfdf-driver-career-summary .tfdf-table,
.tfdf-car-usage .tfdf-table,
.tfdf-circuit-summary .tfdf-table { border: 1px solid var(--tfdf-brand-line) !important; border-radius: 10px !important; overflow: hidden; }
.tfdf-series-key-info .tfdf-table tbody th,
.tfdf-driver-season-summary .tfdf-table tbody th,
.tfdf-driver-best-results .tfdf-table tbody th,
.tfdf-driver-career-summary .tfdf-table tbody th,
.tfdf-car-usage .tfdf-table tbody th,
.tfdf-circuit-summary .tfdf-table tbody th { background: var(--tfdf-brand-pale) !important; color: #075d87 !important; font-size: .76rem; font-weight: 900; letter-spacing: .055em; text-transform: uppercase; width: 42%; }

.tfdf-round-results > div[id^="tfdf-session-"] {
	background: #f8fbfd;
	border: 1px solid var(--tfdf-brand-line);
	border-radius: 12px;
	margin-top: 18px !important;
	overflow-x: auto;
	padding: clamp(14px, 2.5vw, 20px);
}
.tfdf-round-results > div[id^="tfdf-session-"] > h4 { font-size: 1.2rem; text-transform: uppercase; }

/* Fields inside public blocks */
.tfdf-block label { color: var(--tfdf-brand-navy); font-size: .84rem; font-weight: 850; }
.tfdf-block input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]),
.tfdf-block select,
.tfdf-block textarea {
	background: #fff !important;
	border: 1px solid #c9d6df !important;
	border-radius: 8px !important;
	box-shadow: inset 0 1px 2px rgba(9,31,46,.04);
	color: var(--tfdf-brand-ink) !important;
	min-height: 44px;
	padding: 10px 12px !important;
}
.tfdf-block textarea { min-height: 120px; resize: vertical; }
.tfdf-block input:focus,
.tfdf-block select:focus,
.tfdf-block textarea:focus { border-color: var(--tfdf-accent, var(--tfdf-brand-accent, var(--tfdf-brand-blue))) !important; box-shadow: 0 0 0 3px rgba(7,136,200,.16) !important; outline: 0; }

/* Public operational components */
.tfdf-public-component { padding: clamp(20px, 3vw, 30px) !important; }
.tfdf-public-heading { align-items: flex-start; display: flex; gap: 18px; justify-content: space-between; }
.tfdf-public-count { align-items: center; background: var(--tfdf-brand-navy); border-radius: 999px; color: #fff; display: inline-flex; font-size: .8rem; font-weight: 900; justify-content: center; min-height: 32px; min-width: 32px; padding: 5px 10px; }
.tfdf-public-status { border-radius: 999px; display: inline-flex; font-size: .72rem; font-weight: 900; letter-spacing: .05em; padding: 7px 11px; text-transform: uppercase; }
.tfdf-public-status--open { background: #daf6e6; color: #14613a; }
.tfdf-public-status--closed { background: #e9eef2; color: #536470; }
.tfdf-public-status--tbc { background: #fff0c7; color: #815508; }
.tfdf-public-stat { background: #f3f8fb; border-left: 5px solid var(--tfdf-accent, var(--tfdf-brand-accent, var(--tfdf-brand-blue))); border-radius: 8px; display: grid; gap: 3px; margin-top: 16px; padding: 13px 16px; }
.tfdf-public-stat strong { color: var(--tfdf-brand-navy); font-size: 1.45rem; font-variant-numeric: tabular-nums; }

.tfdf-public-announcement-list { display: grid; gap: 12px; }
.tfdf-public-announcement { background: #f6fafc !important; border: 1px solid var(--tfdf-brand-line) !important; border-left: 5px solid var(--tfdf-accent, var(--tfdf-brand-accent, var(--tfdf-brand-blue))) !important; border-radius: 10px !important; padding: 16px !important; }
.tfdf-public-announcement h4 { margin: 4px 0 8px !important; }
.tfdf-public-announcement p { margin-bottom: 0; }

.tfdf-event-countdown {
	background: linear-gradient(125deg, var(--tfdf-brand-navy) 0 76%, var(--tfdf-brand-navy-soft) 76% 100%) !important;
	border-color: #25465c !important;
	color: #fff !important;
	overflow: hidden;
	text-align: center;
}
.tfdf-event-countdown::before { background: var(--tfdf-accent, var(--tfdf-brand-accent, var(--tfdf-brand-blue))); }
.tfdf-event-countdown::after { background-image: repeating-conic-gradient(from 45deg, rgba(255,255,255,.45) 0 25%, transparent 0 50%); background-position: right top; background-repeat: repeat; background-size: 12px 12px; height: 100%; mask-image: linear-gradient(90deg, transparent, #000); opacity: .07; top: 0; width: 42%; }
.tfdf-event-countdown h3,
.tfdf-event-countdown h3 a { color: #fff !important; justify-content: center; text-align: center !important; }
.tfdf-event-countdown h3::before,
.tfdf-event-countdown h3::after { display: none; }
.tfdf-event-countdown .tfdf-countdown-date,
.tfdf-event-countdown .tfdf-countdown-state { color: #c8d9e4 !important; }
.tfdf-event-countdown .tfdf-public-kicker { color: #fff !important; }
.tfdf-countdown-units { display: grid; gap: 8px; grid-template-columns: repeat(4, minmax(72px, 1fr)); margin: 18px auto 10px; max-width: 660px; }
.tfdf-countdown-units span { background: rgba(255,255,255,.08) !important; border: 1px solid rgba(255,255,255,.14); border-radius: 8px !important; padding: 13px 7px !important; }
.tfdf-countdown-units strong { color: #fff; display: block; font-size: clamp(1.65rem, 4vw, 2.75rem); font-variant-numeric: tabular-nums; line-height: 1; }
.tfdf-countdown-units small { color: #a9c2d1 !important; display: block; font-size: .65rem; font-weight: 850; letter-spacing: .12em; margin-top: 6px; text-transform: uppercase; }

/* Archives and homepage cards */
body.tfdf-archive-page .tfdf-archive__header,
body.tfdf-archive-page .tfdf-archive-empty,
body.tfdf-archive-page .tfdf-archive-card,
.tfdf-home-series-item__link,
.tfdf-home-series-empty {
	background: #fff !important;
	border: 1px solid var(--tfdf-brand-line) !important;
	border-radius: var(--tfdf-brand-radius) !important;
	box-shadow: var(--tfdf-brand-shadow) !important;
	color: var(--tfdf-brand-ink) !important;
}

body.tfdf-archive-page .tfdf-archive__header {
	background: linear-gradient(112deg, #fff 0 66%, rgba(7,136,200,.08) 66% 100%) !important;
	overflow: hidden;
	padding: clamp(24px, 4vw, 42px) !important;
	position: relative;
}
body.tfdf-archive-page .tfdf-archive__header > * { max-width: 100%; position: relative; z-index: 1; }
body.tfdf-archive-page .tfdf-archive__header h1 { color: var(--tfdf-brand-navy) !important; font-size: clamp(2.2rem, 5vw, 4rem) !important; font-weight: 950; text-transform: uppercase; }

body.tfdf-archive-page .tfdf-archive-card {
	border-top: 5px solid var(--tfdf-accent, var(--tfdf-brand-accent, var(--tfdf-brand-blue))) !important;
	padding: 21px !important;
	transition: box-shadow .18s ease, transform .18s ease;
}
body.tfdf-archive-page .tfdf-archive-card:hover { box-shadow: 0 20px 44px rgba(12,43,64,.16) !important; transform: translateY(-3px); }
body.tfdf-archive-page .tfdf-archive-card__title,
body.tfdf-archive-page .tfdf-archive-card__title a { color: var(--tfdf-brand-navy) !important; font-weight: 900; }
body.tfdf-archive-page .tfdf-archive-card__meta-row { border-bottom: 1px solid #edf1f4; padding: 6px 0; }
body.tfdf-archive-page .tfdf-archive-card__meta-row:last-child { border-bottom: 0; }
body.tfdf-archive-page .tfdf-archive-card__meta dt { color: var(--tfdf-brand-muted) !important; }

body.tfdf-archive-page .tfdf-archive__filter,
.tfdf-series-archive-filter {
	background: #fff !important;
	border: 1px solid #b9d5e4 !important;
	border-radius: 999px !important;
	color: #075d87 !important;
	font-weight: 850;
}
body.tfdf-archive-page .tfdf-archive__filter.is-active,
.tfdf-series-archive-filter.is-active { background: var(--tfdf-accent, var(--tfdf-brand-accent, var(--tfdf-brand-blue))) !important; color: var(--tfdf-brand-accent-text, #fff) !important; }

.tfdf-home-series-item__link {
	border-left: 6px solid var(--tfdf-accent, var(--tfdf-brand-accent, var(--tfdf-brand-blue))) !important;
	padding: 17px 19px !important;
	transition: box-shadow .18s ease, transform .18s ease;
}
.tfdf-home-series-item__link:hover { box-shadow: 0 18px 38px rgba(12,43,64,.16) !important; transform: translateY(-2px); }
.tfdf-home-series-item__title { color: var(--tfdf-brand-navy) !important; font-size: 1.12rem !important; font-weight: 900 !important; }

/* Keyboard and motion */
.tfdf-block a:focus-visible,
.tfdf-block button:focus-visible,
.tfdf-archive a:focus-visible,
.tfdf-home-series-list a:focus-visible { outline: 3px solid rgba(7,136,200,.35); outline-offset: 3px; }

@media (max-width: 780px) {
	.tfdf-block { border-radius: 13px !important; padding: 18px !important; }
	.tfdf-block::before { border-radius: 13px 13px 0 0; }
	.tfdf-entity-header { min-height: 0; padding: 24px 20px 26px !important; }
	.tfdf-entity-header h2 { font-size: clamp(1.8rem, 10vw, 3rem) !important; max-width: 100%; }
	.tfdf-series-header__layout,
	.tfdf-series-header.has-image .tfdf-series-header__layout,
	.tfdf-team-profile.has-image, .tfdf-driver-header.has-image { grid-template-columns: 1fr !important; }
	.tfdf-series-header:not(.has-image) .tfdf-series-header__content { padding-right: 0; }
	.tfdf-series-header__media,
	.tfdf-team-profile__media, .tfdf-driver-profile__media { grid-row: 1; }
	.tfdf-series-header__image { max-height: 300px; }
	.tfdf-team-profile__image, .tfdf-driver-profile__image { max-height: 260px; }
	.tfdf-public-heading { align-items: flex-start; flex-direction: column; }
	.tfdf-table-wrap,
	.tfdf-scroll-x,
	.tfdf-table-scroll { border-radius: 9px; }
	.tfdf-block > .tfdf-table { display: block; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
	.tfdf-block .tfdf-table th,
	.tfdf-block .tfdf-table td { padding: 10px 11px !important; white-space: nowrap; }
	.tfdf-countdown-units { grid-template-columns: repeat(2, minmax(90px, 1fr)); }
	body.tfdf-archive-page .tfdf-archive__header > * { max-width: 100%; }
	.tfdf-home-series-item__link { display: grid !important; gap: 13px; }
	.tfdf-home-series-item__meta { flex-wrap: wrap; justify-content: space-between; }
	.tfdf-home-series-item__cta { width: 100%; }
}

@media (max-width: 480px) {
	.tfdf-block { margin-bottom: 16px !important; padding: 16px !important; }
	.tfdf-block > h3 { font-size: 1.18rem; }
	.tfdf-series-header__chips,
	.tfdf-series-header__actions { align-items: stretch; flex-direction: column; }
	.tfdf-series-header__button,
	.tfdf-public-button,
	.tfdf-block .button,
	.tfdf-block button[type="submit"] { justify-content: center; width: 100%; }
	.tfdf-event-countdown { padding: 20px 14px !important; }
	.tfdf-countdown-units { gap: 6px; }
}

@media (prefers-reduced-motion: reduce) {
	.tfdf-block *,
	.tfdf-archive *,
	.tfdf-home-series-list * { scroll-behavior: auto !important; transition: none !important; }
}
.tfdf-driver-profile>.tfdf-membership-card{position:relative;overflow:hidden;margin:0 0 22px;padding:clamp(20px,3vw,30px);border:1px solid rgba(7,136,200,.22);border-left:5px solid #0788c8;border-radius:14px;background:linear-gradient(135deg,#fff 0%,#f2f8fc 100%);color:#13233a;box-shadow:0 14px 34px rgba(19,35,58,.1)}
.tfdf-driver-profile>.tfdf-membership-card .tfdf-membership-card__heading{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;margin-bottom:18px}.tfdf-driver-profile>.tfdf-membership-card h3{margin:2px 0 0;color:#13233a}.tfdf-driver-profile>.tfdf-membership-card dl{display:grid;grid-template-columns:repeat(auto-fit,minmax(140px,1fr));gap:12px;margin:0}.tfdf-driver-profile>.tfdf-membership-card dl div{padding:12px;border-radius:10px;background:#fff}.tfdf-driver-profile>.tfdf-membership-card dt{font-size:.75rem;font-weight:800;letter-spacing:.07em;text-transform:uppercase;color:#52657c}.tfdf-driver-profile>.tfdf-membership-card dd{margin:3px 0 0;font-weight:800;color:#13233a}
@media(max-width:600px){.tfdf-driver-profile>.tfdf-membership-card .tfdf-membership-card__heading{flex-direction:column}.tfdf-driver-profile>.tfdf-membership-card .tfdf-status-badge{align-self:flex-start}}
.tfdf-award-grid,.tfdf-stat-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(145px,1fr));gap:12px}
.tfdf-award-card,.tfdf-stat-grid>article{position:relative;overflow:hidden;padding:18px;border:1px solid #d8e3eb;border-radius:12px;background:#fff;color:#172535;box-shadow:0 8px 22px rgba(7,25,43,.07)}
.tfdf-award-card:before,.tfdf-stat-grid>article:before{content:"";position:absolute;inset:0 auto 0 0;width:4px;background:var(--tfdf-brand-accent,#0788c8)}
.tfdf-award-card span,.tfdf-stat-grid span{display:block;margin-bottom:5px;color:#526576;font-size:.76rem;font-weight:800;letter-spacing:.055em;text-transform:uppercase}
.tfdf-award-card h4,.tfdf-stat-grid strong{margin:0;color:#10243a;font-size:clamp(1.08rem,2vw,1.5rem);line-height:1.18}
.tfdf-award-card p{margin:8px 0 0;color:#465a6b}.tfdf-stat-note{margin:14px 0 0;color:#526576;font-size:.85rem}
.tfdf-series-history>article{margin-top:12px;padding:18px;border:1px solid #d8e3eb;border-radius:12px;background:#fff;color:#172535}.tfdf-series-history>article h4{margin-top:0}.tfdf-series-history>article li{margin:.35em 0}
@media(max-width:560px){.tfdf-award-grid,.tfdf-stat-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.tfdf-award-card,.tfdf-stat-grid>article{padding:14px 12px}.tfdf-stat-grid strong{font-size:1.08rem}}

/*
 * Complete block consistency. Some newer public components have their own
 * inner layouts, but every one should still read as part of the same 2F race
 * weekend interface: white technical surface, blue timing line, navy type and
 * restrained chequer detail. No logos are added to content blocks.
 */
.tfdf-public-component:not(.tfdf-event-countdown) {
	background: var(--tfdf-brand-surface) !important;
	border: 1px solid var(--tfdf-brand-line) !important;
	border-radius: var(--tfdf-brand-radius) !important;
	box-shadow: var(--tfdf-brand-shadow) !important;
	color: var(--tfdf-brand-ink) !important;
	isolation: isolate;
	overflow: hidden;
	position: relative;
}

.tfdf-public-component:not(.tfdf-event-countdown)::before {
	background: linear-gradient(90deg, var(--tfdf-accent, var(--tfdf-brand-accent, var(--tfdf-brand-blue))) 0 76%, var(--tfdf-brand-navy) 76% 100%);
	border-radius: var(--tfdf-brand-radius) var(--tfdf-brand-radius) 0 0;
	content: "";
	height: 5px;
	left: -1px;
	position: absolute;
	top: -1px;
	width: calc(100% + 2px);
	z-index: 2;
}

.tfdf-public-component:not(.tfdf-event-countdown)::after {
	background: repeating-conic-gradient(from 45deg, rgba(16,37,54,.68) 0 25%, transparent 0 50%) 50% / 12px 12px;
	content: "";
	height: 34px;
	mask-image: linear-gradient(90deg, transparent, #000);
	opacity: .05;
	pointer-events: none;
	position: absolute;
	right: 0;
	top: 5px;
	width: 120px;
	z-index: 0;
}

.tfdf-public-component:not(.tfdf-event-countdown) > * { position: relative; z-index: 1; }
.tfdf-public-component h2,
.tfdf-public-component h3,
.tfdf-public-component h4,
.tfdf-public-component strong { color: var(--tfdf-brand-navy) !important; }
.tfdf-public-component p,
.tfdf-public-component li,
.tfdf-public-component span,
.tfdf-public-component time { color: var(--tfdf-brand-ink); }

.tfdf-news-card,
.tfdf-document-grid > article,
.tfdf-season-history-grid > article,
.tfdf-public-info-grid > article,
.tfdf-sponsor-card,
.tfdf-timetable-list > article,
.tfdf-weather-grid > article,
.tfdf-session-meta-grid > span,
.tfdf-public-stat-grid > article {
	background: #f8fbfd !important;
	border: 1px solid #d8e4eb !important;
	border-left: 4px solid var(--tfdf-accent, var(--tfdf-brand-accent, var(--tfdf-brand-blue))) !important;
	border-radius: 10px !important;
	box-shadow: none !important;
	color: var(--tfdf-brand-ink) !important;
	position: relative;
}

.tfdf-sponsor-card { border-left-width: 1px !important; border-top: 4px solid var(--tfdf-accent, var(--tfdf-brand-accent, var(--tfdf-brand-blue))) !important; }
.tfdf-news-card h4,
.tfdf-document-grid h4,
.tfdf-season-history-grid h4 { margin-top: 8px; }
.tfdf-public-stat-grid > article strong { font-variant-numeric: tabular-nums; }
.tfdf-timetable-list > article time { color: var(--tfdf-brand-blue-deep) !important; font-variant-numeric: tabular-nums; }
.tfdf-public-empty { color: var(--tfdf-brand-muted) !important; }

@media (max-width: 780px) {
	.tfdf-public-component:not(.tfdf-event-countdown) { border-radius: 13px !important; }
	.tfdf-public-component:not(.tfdf-event-countdown)::before { border-radius: 13px 13px 0 0; }
}

/*
 * Final contrast contract. The brand system intentionally loads after every
 * component stylesheet, so dark motorsport surfaces must also finish their
 * complete text cascade here. This prevents both theme rules and the generic
 * light-card typography above from producing navy text on navy backgrounds.
 */
.tfdf-template .tfdf-series-header__button,
.tfdf-series-header .tfdf-series-header__button,
.tfdf-block .tfdf-public-button,
.tfdf-public-component .tfdf-public-button {
	color: #fff !important;
	-webkit-text-fill-color: #fff !important;
}

.tfdf-public-component .tfdf-public-count,
.tfdf-public-component .tfdf-public-count span {
	color: #fff !important;
	-webkit-text-fill-color: #fff !important;
}

.tfdf-public-component .tfdf-championship-scoring,
.tfdf-public-component .tfdf-championship-scoring h2,
.tfdf-public-component .tfdf-championship-scoring h3,
.tfdf-public-component .tfdf-championship-scoring h4,
.tfdf-public-component .tfdf-championship-scoring p,
.tfdf-public-component .tfdf-championship-scoring strong,
.tfdf-public-component .tfdf-championship-scoring span,
.tfdf-public-component .tfdf-championship-scoring small,
.tfdf-public-component .tfdf-championship-scoring li,
.tfdf-public-component .tfdf-championship-scoring a {
	color: #fff !important;
	-webkit-text-fill-color: #fff !important;
}

.tfdf-event-countdown,
.tfdf-event-countdown h2,
.tfdf-event-countdown h3,
.tfdf-event-countdown h4,
.tfdf-event-countdown h3 a,
.tfdf-event-countdown p,
.tfdf-event-countdown time,
.tfdf-event-countdown strong,
.tfdf-event-countdown .tfdf-countdown-units strong {
	color: #fff !important;
	-webkit-text-fill-color: #fff !important;
}

.tfdf-event-countdown small,
.tfdf-event-countdown .tfdf-countdown-date,
.tfdf-event-countdown .tfdf-countdown-state,
.tfdf-event-countdown .tfdf-countdown-units small {
	color: #c8d9e4 !important;
	-webkit-text-fill-color: #c8d9e4 !important;
}
