/* ==========================================================================
   Paddock — F1 plugin compatibility layer
   Loads after the plugins' own sheets. Selectors are prefixed with `body`
   (one extra element of specificity) so they win without !important, except
   where a plugin itself used !important.

   Covered: F1 Driver Stats Frontend ([driver_stats]), F1 Driver Statistics
   ([f1_driver_stats], [f1_driver_comparison]), F1 Pole Position Stats
   ([f1_driver_poles], [f1_yearly_poles], [f1_pole_conversion]), F1 Driver Pole
   Comparison ([f1_compare_poles]), F1 On This Day, F1 Individual Driver
   ([f1_driver_profile]), F1 Related Comparisons, F1 Race Results Viewer.
   ========================================================================== */

/* ---------- Shared: wrappers become Paddock cards ---------- */
body :is(
	.f1-pole-stats,
	.f1-pole-comparison,
	.f1-driver-stats-container,
	.f1-comparison-container,
	.f1-filter-panel,
	.f1-stats-panel,
	.f1-results-container,
	.f1-driver-profile,
	.stats-section
) {
	font-family: var(--pdk-font);
	color: var(--pdk-text);
	background: #fff linear-gradient(90deg, var(--pdk-red), var(--pdk-red-dark) 40%, transparent 40%) top left / 100% 3px no-repeat;
	border: 1px solid var(--pdk-line);
	border-radius: var(--pdk-radius-lg);
	box-shadow: var(--pdk-shadow);
}
body :is(.driver-stats-container, .f1-otd-wrapper, .f1-viewer-wrap) { font-family: var(--pdk-font); color: var(--pdk-text); }
body .f1-driver-profile { padding: clamp(20px, 3vw, 32px); margin: 24px 0; }

/* Shared heading treatment */
body :is(
	.pole-stats-header h2,
	.comparison-header h2,
	.f1-pole-comparison .section-title,
	.f1-results-header h2,
	.f1-stats-panel h2,
	.f1-driver-info h2,
	.f1-driver-profile > h2,
	.f1-otd-header-band h2,
	.f1-otd-date-header h2
) {
	font-family: var(--pdk-font);
	font-weight: 900;
	font-style: italic;
	letter-spacing: -.01em;
	text-transform: uppercase;
	color: var(--pdk-text);
}
body .stats-section-title { font-family: var(--pdk-font); font-weight: 900; font-style: italic; text-transform: uppercase; letter-spacing: -.005em; }
body .stats-section .stats-section-title { color: var(--pdk-text) !important; border-bottom: 3px solid var(--pdk-red); position: relative; }

/* Shared table head */
body :is(.pole-stats-table thead, .conversion-stats-table thead, .yearly-comparison-table thead) {
	background: linear-gradient(180deg, #2a2a33, var(--pdk-carbon));
	color: #fff;
}
body :is(.pole-stats-table th, .conversion-stats-table th, .yearly-comparison-table th) {
	font-family: var(--pdk-font);
	font-size: .78rem;
	letter-spacing: .1em;
	border-bottom: 2px solid var(--pdk-red);
}
body :is(.pole-stats-table tbody tr.pole-row, .conversion-row, .yearly-comparison-table tbody tr):hover { background-color: var(--pdk-red-tint); }

/* ==========================================================================
   F1 Pole Position Stats
   ========================================================================== */
body .pole-stats-header { border-bottom-color: var(--pdk-red); }
body .pole-stats-subtitle { color: var(--pdk-muted); }
body .rank-cell { color: var(--pdk-red); font-style: italic; font-weight: 900; }
body .driver-cell strong { color: var(--pdk-text); }
body .nationality, body .number-cell { color: var(--pdk-muted); }
body .pole-badge {
	background: var(--pdk-red-grad);
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3), 0 6px 16px -6px rgba(var(--pdk-red-rgb), .7);
	font-style: italic;
}
body .pole-details-cell { background: var(--pdk-mist); border-bottom-color: var(--pdk-line); }
body .pole-details strong { color: var(--pdk-text); }
body .race-badge { background: var(--pdk-red-tint); color: var(--pdk-red-dark); border-color: var(--pdk-red-tint-2); font-weight: 600; }

body .gp-pole-card { border: 1px solid var(--pdk-line); border-radius: var(--pdk-radius-lg); box-shadow: var(--pdk-shadow-sm); position: relative; overflow: hidden; }
body .gp-pole-card::before { content: ""; position: absolute; inset: 0 0 auto; height: 3px; background: var(--pdk-carbon); }
body .gp-pole-card:hover { box-shadow: var(--pdk-shadow-lg); border-color: transparent; }
body .gp-pole-card.won-race { border-color: #e9c46a; background: linear-gradient(160deg, #fff8e6, #fff 55%); }
body .gp-pole-card.won-race::before { background: linear-gradient(90deg, #c99a2e, #f5d77a, #c99a2e); }
body .gp-pole-card.podium-finish { border-color: var(--pdk-red-tint-2); background: linear-gradient(160deg, var(--pdk-red-tint), #fff 55%); }
body .gp-pole-card.podium-finish::before { background: var(--pdk-red-grad); }
body .gp-number { color: var(--pdk-red); }
body .gp-name, body .driver-name-large { color: var(--pdk-text); font-weight: 900; font-style: italic; text-transform: uppercase; }
body .gp-date, body .gp-pole-card .driver-number { color: var(--pdk-muted); }
body .driver-team { color: var(--pdk-red); }
body .podium-badge { background: var(--pdk-red-grad); color: #fff; }
body .finish-badge { background: var(--pdk-mist); color: var(--pdk-text); border-color: var(--pdk-line); }
body .dnf-badge { background: var(--pdk-carbon); color: #fff; border-color: var(--pdk-carbon); }
body .win-badge { background: linear-gradient(135deg, #f7dc7c, #d9a93a); color: #4a3500; border-color: #d9a93a; }
body .points-earned { color: var(--pdk-red-dark); }
body .wins-cell .win-badge { background: linear-gradient(135deg, #f7dc7c, #d9a93a); color: #4a3500; }
body .podiums-cell .podium-badge { background: var(--pdk-red); color: #fff; }

/* Conversion tiers: red > carbon > steel > silver */
body .conversion-row.excellent { background: linear-gradient(to right, rgba(var(--pdk-red-rgb), .08), transparent); }
body .conversion-row.good { background: linear-gradient(to right, rgba(var(--pdk-carbon-rgb), .07), transparent); }
body .conversion-row.average { background: linear-gradient(to right, rgba(98, 98, 108, .07), transparent); }
body .conversion-row.poor { background: linear-gradient(to right, rgba(198, 198, 207, .2), transparent); }
body .conversion-percentage.excellent, body .legend-item.excellent { background: var(--pdk-red-grad); color: #fff; }
body .conversion-percentage.good, body .legend-item.good { background: var(--pdk-carbon-grad); color: #fff; }
body .conversion-percentage.average, body .legend-item.average { background: linear-gradient(135deg, #6a6a74, #45454e); color: #fff; }
body .conversion-percentage.poor, body .legend-item.poor { background: #dcdce2; color: var(--pdk-text); }
body .conversion-bar { background: var(--pdk-mist); box-shadow: inset 0 1px 2px rgba(0, 0, 0, .08); }
body .bar-fill { position: relative; overflow: hidden; }
body .bar-fill.excellent { background: linear-gradient(90deg, var(--pdk-red-dark), var(--pdk-red), var(--pdk-red-bright)); }
body .bar-fill.good { background: linear-gradient(90deg, var(--pdk-black), var(--pdk-steel)); }
body .bar-fill.average { background: linear-gradient(90deg, #45454e, #7a7a84); }
body .bar-fill.poor { background: linear-gradient(90deg, #b6b6be, #d8d8de); }
body .conversion-details-cell { background: var(--pdk-mist); }
body .breakdown-label { color: var(--pdk-muted); }
body .breakdown-value { color: var(--pdk-text); }
body .conversion-legend { background: var(--pdk-mist); border-left-color: var(--pdk-red); border-radius: var(--pdk-radius); }
body .conversion-legend h4 { color: var(--pdk-text); }

/* ==========================================================================
   F1 Driver Pole Comparison
   ========================================================================== */
body .f1-pole-comparison a { color: var(--pdk-text); }
body .f1-pole-comparison a:hover { color: var(--pdk-red); }
body .comparison-header { border-bottom-color: var(--pdk-red); }
body .comparison-period { color: var(--pdk-muted); }
body .f1-pole-comparison .driver-card { background: #fff; border: 1px solid var(--pdk-line); border-radius: var(--pdk-radius-lg); position: relative; overflow: hidden; box-shadow: var(--pdk-shadow-sm); }
body .f1-pole-comparison .driver-card::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 5px; }
body .f1-pole-comparison .driver-card.driver-1 { border-color: var(--pdk-line); }
body .f1-pole-comparison .driver-card.driver-1::before { background: var(--pdk-red-grad); }
body .f1-pole-comparison .driver-card.driver-2 { border-color: var(--pdk-line); }
body .f1-pole-comparison .driver-card.driver-2::before { background: var(--pdk-carbon-grad); }
body .f1-pole-comparison .driver-header { border-bottom-color: var(--pdk-line); }
body .f1-pole-comparison .driver-header h3 { color: var(--pdk-text); font-weight: 900; font-style: italic; text-transform: uppercase; }
body .f1-pole-comparison .driver-number { color: var(--pdk-red); font-style: italic; font-weight: 900; }
body .f1-pole-comparison .detail-item .label { color: var(--pdk-muted); }
body .f1-pole-comparison .detail-item .value { color: var(--pdk-text); }

body .vs-badge {
	position: relative;
	background: var(--pdk-red-grad);
	font-family: var(--pdk-font);
	font-style: italic;
	box-shadow: 0 0 0 6px #fff, 0 0 0 8px rgba(var(--pdk-red-rgb), .25), 0 14px 34px -8px rgba(var(--pdk-red-rgb), .7);
	overflow: hidden;
}
body .vs-badge::after { content: ""; position: absolute; inset: 0; background: var(--pdk-gloss); border-radius: inherit; }
body .f1-vs { color: var(--pdk-red); font-family: var(--pdk-font); font-style: italic; font-weight: 900; }

body .comparison-section { background: var(--pdk-mist); border-radius: var(--pdk-radius-lg); }
body .f1-pole-comparison .section-title { color: var(--pdk-text); }
body .stat-comparison { border-radius: var(--pdk-radius); border: 1px solid var(--pdk-line); box-shadow: none; }
body .f1-pole-comparison .stat-label { color: var(--pdk-text); text-transform: uppercase; letter-spacing: .08em; font-size: .85rem; }
body .stat-bar { position: relative; overflow: hidden; border-radius: 6px; }
body .stat-bar::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(255, 255, 255, .22), transparent 55%); pointer-events: none; }
body .stat-bar-wrapper.driver-1-bar .stat-bar { background: linear-gradient(90deg, var(--pdk-red-dark), var(--pdk-red) 60%, var(--pdk-red-bright)); }
body .stat-bar-wrapper.driver-2-bar .stat-bar { background: linear-gradient(90deg, var(--pdk-steel), var(--pdk-carbon) 60%, var(--pdk-black)); }
/* Pole Stats also defines .conversion-bar (20px track); keep the comparison bar full height. */
body .f1-pole-comparison .stat-bar.conversion-bar { height: 50px; background-color: transparent; box-shadow: none; overflow: hidden; }
body .stat-bar.dnf-bar { background: linear-gradient(90deg, #7a7a84, #4a4a54) !important; }
body .f1-pole-comparison .stat-value { font-family: var(--pdk-font); font-style: italic; }
body .stat-winner .winner.driver-1 { background: var(--pdk-red); }
body .stat-winner .winner.driver-2 { background: var(--pdk-carbon); }
body .stat-winner .tie { color: var(--pdk-muted); }

body .yearly-comparison-table-wrapper { border: 1px solid var(--pdk-line); border-radius: var(--pdk-radius); box-shadow: none; }
body .yearly-comparison-table .driver-1-header { background: var(--pdk-red-grad); }
body .yearly-comparison-table .driver-2-header { background: linear-gradient(135deg, #3a3a44, var(--pdk-black)); }
body .year-cell { background: var(--pdk-mist); color: var(--pdk-text); font-style: italic; font-weight: 900; }
body :is(.poles-cell, .conversion-cell).winner { background: var(--pdk-red-tint); color: var(--pdk-red-dark); }
body :is(.poles-cell, .conversion-cell).tie { background: var(--pdk-mist); }
body .yearly-comparison-table tfoot { background: linear-gradient(180deg, #2a2a33, var(--pdk-black)); }
body .totals-row .winner { background: rgba(var(--pdk-red-rgb), .45); }
body .totals-row .tie { background: rgba(255, 255, 255, .08); }
body .no-data { color: var(--pdk-silver); }

body .summary-card { border: 1px solid var(--pdk-line); border-radius: var(--pdk-radius-lg); box-shadow: var(--pdk-shadow-sm); position: relative; overflow: hidden; }
body .summary-card::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--pdk-red); }
body .summary-label, body .summary-detail { color: var(--pdk-muted); }
body .summary-value { color: var(--pdk-text); }

/* ==========================================================================
   F1 Driver Stats Frontend  [driver_stats]
   ========================================================================== */
body .driver-stats-header {
	position: relative;
	overflow: hidden;
	isolation: isolate;
	background: var(--pdk-carbon-weave);
	background-color: #17171c;
	background-size: 20px 20px;
	border-radius: var(--pdk-radius-lg);
	box-shadow: var(--pdk-shadow-lg);
}
body .driver-stats-header::before {
	content: ""; position: absolute; inset: 0; z-index: -1;
	background: radial-gradient(700px 260px at 90% 0%, rgba(var(--pdk-red-rgb), .45), transparent 60%), linear-gradient(90deg, rgba(11, 11, 16, .95), rgba(11, 11, 16, .6));
}
body .driver-stats-header::after {
	content: ""; position: absolute; z-index: -1; right: -40px; top: 0; bottom: 0; width: 30%;
	background: linear-gradient(90deg, transparent 0 20%, var(--pdk-red) 20% 26%, transparent 26% 34%, rgba(var(--pdk-red-rgb), .5) 34% 36%, transparent 36%);
	transform: skewX(-22deg);
}
body .driver-stats-avatar { border: 4px solid var(--pdk-red); box-shadow: 0 0 0 6px rgba(255, 255, 255, .08), 0 12px 30px -8px rgba(0, 0, 0, .8); }
body .driver-stats-name { font-family: var(--pdk-font); font-weight: 900; font-style: italic; text-transform: uppercase; letter-spacing: -.015em; line-height: 1; }
body .driver-stats-team { color: rgba(255, 255, 255, .8); font-weight: 600; letter-spacing: .06em; text-transform: uppercase; font-size: 1rem; }
body .driver-number-badge { background: var(--pdk-red-grad); font-style: italic; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3), 0 8px 18px -8px rgba(var(--pdk-red-rgb), .9); }

body .stats-section { padding: clamp(20px, 3vw, 32px); }
body .stat-card { border-radius: var(--pdk-radius); position: relative; overflow: hidden; isolation: isolate; }
body .stat-card:hover { box-shadow: var(--pdk-shadow-lg); }
body .stat-card.stat-primary { background: var(--pdk-carbon-grad); }
body .stat-card.stat-success { background: var(--pdk-red-grad); }
body .stat-card.stat-warning { background: linear-gradient(135deg, #4a4a54 0%, #2a2a33 100%); }
body .stat-card.stat-info { background: linear-gradient(135deg, var(--pdk-red-dark) 0%, #3a0200 70%, var(--pdk-black) 100%); }
body .stat-card:is(.stat-primary, .stat-success, .stat-warning, .stat-info)::after {
	content: ""; position: absolute; inset: 0; z-index: -1;
	background: linear-gradient(180deg, rgba(255, 255, 255, .16), transparent 50%);
}
body.pdk-shine .stat-card:is(.stat-primary, .stat-success, .stat-warning, .stat-info)::before {
	content: ""; position: absolute; top: -50%; bottom: -50%; left: -60%; width: 40%; z-index: 1;
	background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .35), transparent);
	transform: skewX(-20deg); opacity: 0; pointer-events: none;
}
body.pdk-shine .stat-card:is(.stat-primary, .stat-success, .stat-warning, .stat-info):hover::before { animation: pdk-sweep 1s var(--pdk-ease); }
/* Older and newer plugin versions differ on label colours, and the pole-comparison
   sheet styles .stat-label globally — pin the colours explicitly. */
body .stat-card:is(.stat-primary, .stat-success, .stat-warning, .stat-info),
body .stat-card:is(.stat-primary, .stat-success, .stat-warning, .stat-info) :is(.stat-value, .stat-label, .stat-icon) { color: #fff !important; }
body .stat-card:is(.stat-primary, .stat-success, .stat-warning, .stat-info) .stat-label { opacity: .78; }
body .stat-card:not(.stat-primary):not(.stat-success):not(.stat-warning):not(.stat-info) { background: var(--pdk-mist); border: 1px solid var(--pdk-line); }
body .stats-section .stat-card:not(.stat-primary):not(.stat-success):not(.stat-warning):not(.stat-info),
body .stats-section .stat-card:not(.stat-primary):not(.stat-success):not(.stat-warning):not(.stat-info) .stat-value { color: var(--pdk-text) !important; }
body .stats-section .stat-card:not(.stat-primary):not(.stat-success):not(.stat-warning):not(.stat-info) .stat-label { color: var(--pdk-muted) !important; }
body .stat-card .stat-value { font-family: var(--pdk-font); font-weight: 900; font-style: italic; letter-spacing: -.02em; }
body .stat-card .stat-label { font-family: var(--pdk-font); letter-spacing: .12em; }

body .streak-category { background: var(--pdk-mist); border-radius: var(--pdk-radius); border-top: 3px solid var(--pdk-red); }
body .stats-section .streak-category h4 { color: var(--pdk-red) !important; font-family: var(--pdk-font); font-style: italic; text-transform: uppercase; font-weight: 900; font-size: 1rem; letter-spacing: .02em; }
body .streak-item { border-bottom-color: var(--pdk-line); }
body .stats-section .streak-label { color: var(--pdk-muted) !important; }
body .stats-section .streak-value { color: var(--pdk-text) !important; }

body .seasons-table-wrapper { border: 1px solid var(--pdk-line); border-radius: var(--pdk-radius); }
body .stats-section .seasons-table thead th { background: linear-gradient(180deg, #2a2a33, var(--pdk-carbon)); color: #fff !important; font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; border-bottom: 2px solid var(--pdk-red); }
body .stats-section .seasons-table tbody td { color: var(--pdk-text) !important; border-bottom-color: var(--pdk-line); }
body .seasons-table tbody tr:hover { background: var(--pdk-red-tint); }
body .seasons-table tbody tr.best-season { background: var(--pdk-red-tint); box-shadow: inset 4px 0 0 var(--pdk-red); }
body .seasons-table tbody tr.best-season:hover { background: var(--pdk-red-tint-2); }

body .recent-summary { background: var(--pdk-carbon-grad); border-radius: var(--pdk-radius); }
body .stats-section .recent-label { color: rgba(255, 255, 255, .6) !important; letter-spacing: .12em; }
body .stats-section .recent-value { color: #fff !important; font-style: italic; font-weight: 900; }
body .recent-race { background: #fff; border: 1px solid var(--pdk-line); border-left: 4px solid var(--pdk-red); border-radius: var(--pdk-radius); }
body .recent-race.race-dnf { border-left-color: var(--pdk-steel); background: var(--pdk-mist); }
body .stats-section .race-name { color: var(--pdk-text) !important; }
body .stats-section .race-position { color: var(--pdk-red) !important; font-style: italic; font-weight: 900; }
body .stats-section .recent-race.race-dnf .race-position { color: var(--pdk-steel) !important; }
body .stats-section .race-points { color: var(--pdk-muted) !important; }

body .team-entry { background: var(--pdk-mist); border-left-color: var(--pdk-silver); border-radius: var(--pdk-radius); }
body .team-entry.team-current { border-left-color: var(--pdk-red); background: var(--pdk-red-tint); }
body .stats-section .team-name { color: var(--pdk-text) !important; }
body .stats-section .current-badge { background: var(--pdk-red) !important; color: #fff !important; letter-spacing: .08em; text-transform: uppercase; }
body .stats-section .team-period { color: var(--pdk-muted) !important; }
body .driver-stats-error { background: var(--pdk-red-tint); border-left-color: var(--pdk-red); color: var(--pdk-red-dark); border-radius: var(--pdk-radius); }

/* ==========================================================================
   F1 Driver Statistics  [f1_driver_stats] [f1_driver_comparison]
   ========================================================================== */
body .f1-driver-header { border-bottom-color: var(--pdk-red); }
body .f1-driver-image, body .f1-comparison-driver img { border-color: var(--pdk-red); box-shadow: 0 0 0 5px var(--pdk-red-tint); }
body .f1-driver-info h2 { color: var(--pdk-text); }
body .f1-team { color: var(--pdk-red); text-transform: uppercase; letter-spacing: .06em; font-size: 1rem; }
body :is(.f1-number, .f1-nationality) { color: var(--pdk-muted); }
body .f1-stat-box {
	position: relative;
	overflow: hidden;
	isolation: isolate;
	background: var(--pdk-red-grad);
	border-radius: var(--pdk-radius);
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 12px 26px -12px rgba(var(--pdk-red-rgb), .7);
}
body .f1-stat-box:nth-child(even) { background: var(--pdk-carbon-grad); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1), var(--pdk-shadow); }
body .f1-stat-box::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(255, 255, 255, .16), transparent 50%); }
body .f1-stat-value { font-family: var(--pdk-font); font-weight: 900; font-style: italic; letter-spacing: -.02em; }
body .f1-stat-label { font-family: var(--pdk-font); letter-spacing: .12em; text-transform: uppercase; font-size: .75rem; }
body :is(.f1-results-table, .f1-comparison-table) { border-collapse: separate; border-spacing: 0; border: 1px solid var(--pdk-line); border-radius: var(--pdk-radius); overflow: hidden; }
body :is(.f1-results-table th, .f1-comparison-table th, .f1-results-table thead th) {
	background: linear-gradient(180deg, #2a2a33, var(--pdk-carbon));
	color: #fff;
	font-size: .78rem;
	letter-spacing: .1em;
	text-transform: uppercase;
	border-bottom: 2px solid var(--pdk-red);
}
body :is(.f1-results-table td, .f1-comparison-table td, .f1-results-table tbody td) { border-bottom-color: var(--pdk-line); }
body :is(.f1-results-table, .f1-comparison-table) tbody tr:hover { background: var(--pdk-red-tint); }
body .f1-position { color: var(--pdk-red); font-style: italic; }
body .f1-points { color: var(--pdk-text); }
body .f1-winner { background: var(--pdk-red-tint); color: var(--pdk-red-dark); box-shadow: inset 3px 0 0 var(--pdk-red); }
body .f1-comparison-driver h3 { font-weight: 900; font-style: italic; text-transform: uppercase; }

/* ==========================================================================
   F1 Race Results Viewer
   ========================================================================== */
body :is(.f1-filter-panel, .f1-stats-panel, .f1-results-container) { padding: clamp(18px, 3vw, 28px); }
body .f1-filter-group label { color: var(--pdk-text); text-transform: uppercase; letter-spacing: .08em; font-size: .75rem; }
body .f1-filter-group :is(select, input[type='text']) { border-color: var(--pdk-line); border-radius: 8px; padding: 9px 10px; }
body .f1-active-filters { background: var(--pdk-red-tint); border-left-color: var(--pdk-red); border-radius: var(--pdk-radius); }
body .f1-filter-tag { background: var(--pdk-carbon); font-weight: 600; }
body .f1-filter-tag a:hover { color: var(--pdk-red-bright); }
body .f1-results-header { border-bottom-color: var(--pdk-red); }
body .f1-results-info { color: var(--pdk-muted); }
body .f1-results-table tbody tr.f1-year-separator { border-top-color: var(--pdk-red); background: var(--pdk-red-tint); }
body .f1-team-badge { background: var(--pdk-carbon); font-weight: 600; }
body .f1-pos-first { background: linear-gradient(135deg, #f7dc7c, #d9a93a) !important; }
body .f1-pos-second { background: linear-gradient(135deg, #eeeef2, #b8b8c2) !important; }
body .f1-pos-third { background: linear-gradient(135deg, #e3a874, #b06d36) !important; }
body .f1-page-numbers a { border-color: var(--pdk-line); color: var(--pdk-text); border-radius: 8px; }
body .f1-page-numbers a:hover { background: var(--pdk-red); border-color: var(--pdk-red); color: #fff; }
body .f1-current-page { background: var(--pdk-red-grad); border-radius: 8px; }
body .f1-pagination { border-top-color: var(--pdk-line); }

/* ==========================================================================
   F1 On This Day
   ========================================================================== */
body .f1-otd-wrapper { color: var(--pdk-text); }
body .f1-otd-header-band { position: relative; overflow: hidden; isolation: isolate; background: var(--pdk-red-grad); border-radius: var(--pdk-radius-lg) var(--pdk-radius-lg) 0 0; }
body .f1-otd-header-band::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--pdk-gloss); }
body .f1-otd-header-band::after {
	content: ""; position: absolute; z-index: -1; right: 0; top: 0; bottom: 0; width: 180px;
	background: conic-gradient(rgba(255, 255, 255, .22) 25%, transparent 0 50%, rgba(255, 255, 255, .22) 0 75%, transparent 0) 0 0 / 18px 18px;
	-webkit-mask: linear-gradient(90deg, transparent, #000); mask: linear-gradient(90deg, transparent, #000);
}
body .f1-otd-header-band h2 { color: #fff; }
body .f1-otd-calendar-container { border-color: var(--pdk-line); }
body .f1-otd-cal-month-label { color: var(--pdk-text); font-weight: 900; font-style: italic; text-transform: uppercase; }
body .f1-otd-cal-btn { background: var(--pdk-carbon); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15); }
body .f1-otd-cal-btn:hover { background: var(--pdk-red); }
body .f1-otd-cal-day { background: var(--pdk-mist); }
body .f1-otd-cal-day:hover { background: var(--pdk-red-tint); border-color: var(--pdk-red); color: var(--pdk-red); }
body .f1-otd-cal-today { background: var(--pdk-red-grad) !important; box-shadow: 0 6px 14px -6px rgba(var(--pdk-red-rgb), .8); }
body .f1-otd-cal-selected { background: var(--pdk-carbon) !important; border-color: var(--pdk-carbon) !important; }
body .f1-otd-quick-date input[type="date"] { border: 1px solid var(--pdk-line); }
body :is(.f1-otd-btn-primary) { background: var(--pdk-red-grad); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 8px 18px -8px rgba(var(--pdk-red-rgb), .8); text-transform: uppercase; letter-spacing: .06em; }
body .f1-otd-btn-primary:hover { background: var(--pdk-red-dark); }
body .f1-otd-spinner { border-top-color: var(--pdk-red); }
body .f1-otd-results { background: var(--pdk-mist); border-color: var(--pdk-line); border-radius: 0 0 var(--pdk-radius-lg) var(--pdk-radius-lg); }
body .f1-otd-results:not(#f1-otd-results-panel) { border-radius: var(--pdk-radius-lg); border-top: 1px solid var(--pdk-line); }
body .f1-otd-date-header { border-bottom-color: var(--pdk-line); }
body .f1-otd-date-header h2 { color: var(--pdk-text); }
body .f1-otd-today-badge, body .f1-otd-count-badge { background: var(--pdk-red); }
body .f1-otd-stats-bar { background: #e9e9ee; }
body :is(.f1-otd-stat-pill, .f1-otd-year-badge) { background: var(--pdk-carbon); }
body .f1-otd-section { border-bottom-color: var(--pdk-line); }
body .f1-otd-section-header h3 { font-weight: 900; font-style: italic; text-transform: uppercase; letter-spacing: .01em; }
body .f1-otd-card { border-radius: var(--pdk-radius); border-top: 1px solid var(--pdk-line); border-right: 1px solid var(--pdk-line); border-bottom: 1px solid var(--pdk-line); box-shadow: var(--pdk-shadow-sm); transition: transform .25s var(--pdk-ease), box-shadow .25s; }
/* Category accents mapped onto the red / black / steel palette */
body :is(.f1-otd-cat-race_anniversary, .f1-otd-cat-pole_position) { border-bottom-color: var(--pdk-red); }
body :is(.f1-otd-cat-birthday, .f1-otd-cat-race_milestone) { border-bottom-color: var(--pdk-carbon); }
body :is(.f1-otd-cat-points_milestone, .f1-otd-cat-pole_milestone) { border-bottom-color: var(--pdk-red-dark); }
body :is(.f1-otd-cat-fastest_lap, .f1-otd-cat-fastest_lap_milestone) { border-bottom-color: #7a7a84; }
body :is(.f1-otd-type-race, .f1-otd-type-pole) { border-left-color: var(--pdk-red); }
body :is(.f1-otd-type-birthday, .f1-otd-type-races) { border-left-color: var(--pdk-carbon); }
body :is(.f1-otd-type-milestone, .f1-otd-type-pole_milestone) { border-left-color: var(--pdk-red-dark); }
body :is(.f1-otd-type-fastestlap, .f1-otd-type-fl_milestone) { border-left-color: #7a7a84; }
body .f1-otd-card:hover { transform: translateX(3px); box-shadow: var(--pdk-shadow); }
body .f1-otd-card-headline { color: var(--pdk-text); }
body .f1-otd-card-sub { color: var(--pdk-muted); }
body .f1-otd-driver-link { color: var(--pdk-red); }

/* ==========================================================================
   F1 Related Comparisons (auto-appended on "compare" posts)
   ========================================================================== */
body .f1-related-comparisons {
	background: var(--pdk-carbon-weave);
	background-color: #17171c;
	background-size: 20px 20px;
	position: relative;
	isolation: isolate;
	overflow: hidden;
	border-radius: var(--pdk-radius-lg);
	box-shadow: var(--pdk-shadow-lg);
}
body .f1-related-comparisons::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(700px 240px at 50% 0%, rgba(var(--pdk-red-rgb), .35), transparent 65%), rgba(11, 11, 16, .85); }
body .f1-related-comparisons h3 { color: #fff; font-family: var(--pdk-font); font-weight: 900; font-style: italic; text-transform: uppercase; letter-spacing: .01em; }
body .f1-related-comparisons h3::after { background: linear-gradient(90deg, var(--pdk-red), var(--pdk-red-bright)); box-shadow: 0 0 14px rgba(var(--pdk-red-rgb), .9); }
body .f1-related-card { border-radius: var(--pdk-radius); border: 1px solid transparent; }
body .f1-related-card::before { background: var(--pdk-red-grad); }
body .f1-related-card:hover { border-color: transparent; box-shadow: 0 20px 40px -14px rgba(0, 0, 0, .7); }
body .f1-related-card h4 { color: var(--pdk-text); font-family: var(--pdk-font); font-weight: 700; }
body .f1-related-label { border-radius: 3px; letter-spacing: .1em; }
body .f1-related-label.driver1 { background: var(--pdk-red-tint); color: var(--pdk-red); }
body .f1-related-label.driver2 { background: #ececf0; color: var(--pdk-carbon); }
body .f1-related-label.popular { background: var(--pdk-red); color: #fff; }
body .f1-related-meta { color: var(--pdk-muted); border-top-color: var(--pdk-line); }

/* ==========================================================================
   F1 Individual Driver  [f1_driver_profile]  (no stylesheet of its own)
   ========================================================================== */
body .f1-driver-profile > h2 { margin: 0 0 6px; font-size: clamp(1.4rem, 1.1rem + 1.2vw, 2rem); line-height: 1.1; }
body .f1-driver-profile .f1-current-season { color: var(--pdk-red); }
body .f1-driver-profile > p:first-of-type { margin: 0 0 18px; color: var(--pdk-red); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; font-size: .85rem; }
body .f1-driver-profile > label { margin-right: 8px; text-transform: uppercase; letter-spacing: .08em; font-size: .8rem; }
body .f1-driver-profile > select { min-width: 120px; font-weight: 700; }
body .f1-driver-profile > p:nth-of-type(2) {
	display: inline-flex; flex-wrap: wrap; gap: 6px 16px;
	margin: 18px 0 8px;
	padding: 12px 18px;
	background: var(--pdk-carbon-grad);
	color: rgba(255, 255, 255, .7);
	border-radius: var(--pdk-radius);
	font-size: .85rem; letter-spacing: .06em; text-transform: uppercase;
}
body .f1-driver-profile > p:nth-of-type(2) span { color: #fff; font-weight: 900; font-style: italic; font-size: 1.05rem; }
body .f1-driver-profile > h3 { margin: 28px 0 12px; font-size: 1rem; font-weight: 900; font-style: italic; text-transform: uppercase; letter-spacing: .02em; padding-left: 14px; border-left: 4px solid var(--pdk-red); }
body .f1-driver-profile canvas { background: #fff; border: 1px solid var(--pdk-line); border-radius: var(--pdk-radius); padding: 10px; }

/* ==========================================================================
   F1 Versus Master — bundled Driver Statistics module
   [f1_driver_stats] / [f1_driver_comparison] print inline styles with no
   classes, so they are matched by their style attribute.
   ========================================================================== */
.pdk-prose [style*="max-width:900px;margin:20px auto"][style*="background:#fff"],
.pdk-prose [style*="max-width:800px;margin:20px auto"][style*="background:#fff"] {
	font-family: var(--pdk-font);
	border: 1px solid var(--pdk-line);
	border-radius: var(--pdk-radius-lg) !important;
	box-shadow: var(--pdk-shadow) !important;
	background: #fff linear-gradient(90deg, var(--pdk-red), var(--pdk-red-dark) 40%, transparent 40%) top left / 100% 3px no-repeat !important;
	padding: clamp(18px, 3vw, 30px) !important;
}
.pdk-prose [style*="max-width:900px;margin:20px auto"] h2,
.pdk-prose [style*="max-width:800px;margin:20px auto"] :is(h2, h3) { font-weight: 900; font-style: italic; text-transform: uppercase; letter-spacing: -.01em; }
.pdk-prose [style*="max-width:900px;margin:20px auto"] > h3 { font-weight: 900; font-style: italic; text-transform: uppercase; font-size: 1.1rem; padding-left: 14px; border-left: 4px solid var(--pdk-red); }
.pdk-prose [style*="border-bottom:2px solid #e74c3c"] { border-bottom-color: var(--pdk-red) !important; }
.pdk-prose [style*="color:#e74c3c"] { color: var(--pdk-red) !important; }
.pdk-prose p[style*="color:#e74c3c;font-weight:600"] { text-transform: uppercase; letter-spacing: .06em; font-size: .9rem; }
.pdk-prose [style*="font-size:32px;font-weight:bold;color:#e74c3c"] { font-style: italic; font-weight: 900 !important; }

/* Badges */
.pdk-prose [style*="background:#333;color:#fff;padding:5px 12px"] { background: var(--pdk-red-grad) !important; font-style: italic; }
.pdk-prose [style*="background:#2196F3;color:#fff;padding:5px 12px"] { background: var(--pdk-carbon) !important; }
.pdk-prose [style*="background:#4caf50;color:#fff;padding:5px 12px"] { background: var(--pdk-steel) !important; }

/* Season stat tiles: red / carbon alternate */
.pdk-prose [style*="padding:15px;border-radius:8px;text-align:center;color:#fff"] {
	position: relative;
	overflow: hidden;
	border-radius: var(--pdk-radius) !important;
	padding: 18px 12px !important;
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2), var(--pdk-shadow-sm);
	transition: transform .25s var(--pdk-ease), box-shadow .25s;
}
.pdk-prose [style*="padding:15px;border-radius:8px;text-align:center;color:#fff"]:hover { transform: translateY(-4px); box-shadow: var(--pdk-shadow-lg); }
.pdk-prose [style*="padding:15px;border-radius:8px;text-align:center;color:#fff"]::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(255, 255, 255, .15), transparent 50%); pointer-events: none; }
.pdk-prose [style*="padding:15px;border-radius:8px;text-align:center;color:#fff"] small { font-size: .7rem; font-weight: 700; letter-spacing: .14em; opacity: .8; }
.pdk-prose [style*="padding:15px;border-radius:8px;text-align:center;color:#fff"] strong { display: inline-block; margin-top: 4px; font-size: 1.9rem !important; font-weight: 900; font-style: italic; letter-spacing: -.02em; }
.pdk-prose [style*="background:linear-gradient(135deg,#e74c3c"],
.pdk-prose [style*="background:linear-gradient(135deg,#f39c12"],
.pdk-prose [style*="background:linear-gradient(135deg,#4caf50"] { background: var(--pdk-red-grad) !important; }
.pdk-prose [style*="background:linear-gradient(135deg,#27ae60"],
.pdk-prose [style*="background:linear-gradient(135deg,#3498db"],
.pdk-prose [style*="background:linear-gradient(135deg,#9b59b6"] { background: var(--pdk-carbon-grad) !important; }

/* Results table cells */
.pdk-prose tr[style*="background:#333"] { background: linear-gradient(180deg, #2a2a33, var(--pdk-carbon)) !important; }
.pdk-prose tr[style*="background:#333"] th { font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; border-bottom: 2px solid var(--pdk-red); }
.pdk-prose tr[style*="border-bottom:1px solid #ddd"] { border-bottom-color: var(--pdk-line) !important; }
.pdk-prose tr[style*="border-bottom:1px solid #ddd"]:hover,
.pdk-prose tr[style*="background:#f8f9fa"]:hover { background: var(--pdk-red-tint) !important; }
.pdk-prose td[style*="color:#27ae60"] { color: var(--pdk-text) !important; }
.pdk-prose td[style*="color:#f39c12"] { color: var(--pdk-red) !important; font-style: italic; }
.pdk-prose td[style*="background:#d4edda"],
.pdk-prose td[style*="background:#c8e6c9"] { background: var(--pdk-red-tint) !important; color: var(--pdk-red-dark); box-shadow: inset 3px 0 0 var(--pdk-red); }
.pdk-prose [style*="border-bottom:1px solid #ddd"] { border-bottom-color: var(--pdk-line) !important; }

/* ---------- Responsive nudges ---------- */
@media (max-width: 768px) {
	body :is(.f1-pole-stats, .f1-pole-comparison, .f1-driver-stats-container, .f1-comparison-container) { padding: 16px; }
	body .driver-stats-container { padding: 0; }
	body .vs-badge { box-shadow: 0 0 0 4px #fff, 0 10px 24px -8px rgba(var(--pdk-red-rgb), .7); }
}

/* Plugins sit inside a white boxed article: drop their outer shadow so cards don't double up. */
.pdk-style-boxed .pdk-prose :is(.f1-pole-stats, .f1-pole-comparison, .f1-driver-stats-container, .f1-comparison-container, .f1-driver-profile) { box-shadow: none; }
