@font-face { font-family: "FC Oswald"; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/oswald-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "FC Oswald"; font-style: normal; font-weight: 700; font-display: swap; src: url("fonts/oswald-latin-700-normal.woff2") format("woff2"); }

/* Final Checkered — front end.
 * Colours follow your theme's text colour. Change the accent by adding
 *   .ils { --ils-accent: #0a7cff; }
 * to Appearance → Customize → Additional CSS.
 */
.ils {
	--ils-accent: #d9582b;
	--ils-line: color-mix(in srgb, currentColor 14%, transparent);
	--ils-soft: color-mix(in srgb, currentColor 5%, transparent);
	--ils-muted: color-mix(in srgb, currentColor 60%, transparent);
	--ils-up: #1a9b4b;
	--ils-down: #d23b3b;
	--ils-fast: #8a3ffc;
	font-variant-numeric: tabular-nums;
	line-height: 1.4;
	margin: 1.5em 0;
}
.ils *, .ils *::before, .ils *::after { box-sizing: border-box; }
.ils a { color: inherit; text-decoration: none; }
.ils a:hover { color: var(--ils-accent); }
.ils-muted { color: var(--ils-muted); }
.ils-small { font-size: .82em; }

.ils-head { margin-bottom: .75em; }
.ils-title { font-size: 1.5em; font-weight: 700; line-height: 1.2; }

.ils-tabs { display: flex; gap: .25em; border-bottom: 2px solid var(--ils-line); margin-bottom: 1.25em; overflow-x: auto; }
.ils-tabs a { padding: .6em 1em; font-weight: 600; border-bottom: 3px solid transparent; margin-bottom: -2px; white-space: nowrap; color: var(--ils-muted); }
.ils-tabs a.is-active { color: inherit; border-bottom-color: var(--ils-accent); }

.ils-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin-bottom: 1em; }
.ils-table { width: 100%; border-collapse: collapse; font-size: .92em; margin: 0; border: 0; }
.ils-table th, .ils-table td { padding: .55em .6em; border: 0; border-bottom: 1px solid var(--ils-line); text-align: left; white-space: nowrap; background: none; }
.ils-table thead th { font-size: .75em; text-transform: uppercase; letter-spacing: .04em; color: var(--ils-muted); font-weight: 600; border-bottom-width: 2px; }
.ils-table tbody tr:hover td { background: var(--ils-soft); }
.ils-table .ils-num { text-align: right; }
.ils-pos { font-weight: 700; }
.ils-pts { font-weight: 700; }
.ils-driver { font-weight: 600; width: 100%; }
.ils-leader td.ils-pos { color: var(--ils-accent); }
.ils-leader td:first-child { box-shadow: inset 3px 0 0 var(--ils-accent); }
.ils-carnum { display: inline-block; min-width: 2.4em; color: var(--ils-muted); font-weight: 600; }
.ils-raw { display: block; font-size: .72em; font-weight: 400; color: var(--ils-muted); text-decoration: line-through; }
.ils-gain { font-size: .72em; margin-left: .3em; }
.ils-gain.up { color: var(--ils-up); }
.ils-gain.down { color: var(--ils-down); }
.ils-fast { color: var(--ils-fast); font-weight: 700; }
.ils-status { color: var(--ils-muted); font-size: .9em; }
.ils-group { margin: 1.25em 0 .5em; font-size: 1.1em; }

.ils-grid td.ils-dropped { text-decoration: line-through; color: var(--ils-muted); }
.ils-grid td.ils-win { color: var(--ils-accent); font-weight: 700; }
.ils-dropped-row td { color: var(--ils-muted); }

.ils-rounds { margin: .5em 0 1.5em; }
.ils-rounds > summary { cursor: pointer; font-weight: 600; padding: .4em 0; color: var(--ils-accent); }

.ils-races { display: grid; gap: .5em; }
.ils-race-card { display: flex; align-items: center; gap: 1em; padding: .85em 1em; border: 1px solid var(--ils-line); border-radius: 10px; }
.ils-race-card:hover { border-color: var(--ils-accent); }
.ils-round { display: inline-flex; align-items: center; justify-content: center; min-width: 2.6em; height: 2.6em; border-radius: 8px; background: var(--ils-soft); font-weight: 700; font-size: .85em; }
.ils-race-main { flex: 1; display: flex; flex-direction: column; }
.ils-race-winner { text-align: right; display: flex; flex-direction: column; font-weight: 600; }

.ils-back { margin: 0 0 .75em; font-size: .9em; }
.ils-race-head { margin-bottom: 1em; }
.ils-race-title { font-size: 1.25em; }

.ils-notes { padding: .75em 1em; border-left: 3px solid var(--ils-accent); background: var(--ils-soft); margin-bottom: 1em; font-size: .92em; }
.ils-notes ul { margin: .3em 0 0 1.2em; padding: 0; }

.ils-driver-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: .6em; }
.ils-driver-card { display: flex; flex-direction: column; gap: .15em; padding: .9em 1em; border: 1px solid var(--ils-line); border-radius: 10px; }
.ils-driver-card:hover { border-color: var(--ils-accent); }
.ils-carnum-big { font-size: 1.6em; font-weight: 800; color: var(--ils-accent); line-height: 1; }

.ils-profile { display: flex; gap: 1em; align-items: center; margin-bottom: 1em; }
.ils-profile .ils-carnum-big { font-size: 2.6em; min-width: 1.6em; }
.ils-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(105px, 1fr)); gap: .5em; margin-bottom: 1.25em; }
.ils-stat { padding: .7em .8em; border-radius: 10px; background: var(--ils-soft); display: flex; flex-direction: column; }
.ils-stat-v { font-size: 1.35em; font-weight: 700; }
.ils-stat-l { font-size: .75em; text-transform: uppercase; letter-spacing: .04em; color: var(--ils-muted); }

@media (max-width: 600px) {
	.ils-race-winner { display: none; }
	.ils-table th, .ils-table td { padding: .45em .4em; }
}

/* Collapsible season bars: [final_checkered_leagues] or [final_checkered collapsed="yes"] */
.ils-leagues .ils-collapse + .ils-collapse { margin-top: .75em; }
.ils-collapse { border: 1px solid var(--ils-line); border-radius: 12px; margin: 1em 0; }
.ils-collapse[open] { border-color: var(--ils-accent); }
.ils-bar { display: flex; align-items: center; gap: 1em; padding: 1em 1.2em; cursor: pointer; list-style: none; user-select: none; }
.ils-bar::-webkit-details-marker { display: none; }
.ils-bar::marker { content: ""; }
.ils-bar:hover .ils-title { color: var(--ils-accent); }
.ils-bar-main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.ils-bar .ils-title { font-size: 1.25em; }
.ils-bar-leader { display: flex; flex-direction: column; text-align: right; font-weight: 600; white-space: nowrap; }
.ils-arrow { flex: none; width: 2.2em; height: 2.2em; border-radius: 50%; background: var(--ils-soft); position: relative; transition: transform .2s ease; }
.ils-arrow::before { content: ""; position: absolute; left: 50%; top: 45%; width: .55em; height: .55em; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translate(-50%, -50%) rotate(45deg); }
.ils-collapse[open] .ils-arrow { transform: rotate(180deg); background: var(--ils-accent); color: #fff; }
.ils-collapse-body { padding: 0 1.2em 1em; }
@media (max-width: 600px) { .ils-bar-leader { display: none; } }
.ils-bar:focus { outline: none; }
.ils-bar:focus-visible { outline: 2px solid var(--ils-accent); outline-offset: -2px; border-radius: 12px; }

/* ---------- Racing font for headings & numbers ---------- */
.ils { --ils-display: "FC Oswald", "Oswald", Impact, "Arial Narrow", sans-serif; container-type: inline-size; }
.ils-title, .ils-tabs a, .ils-race-title, .ils-group, .ils-table thead th, .ils-pos, .ils-pts, .ils-round,
.ils-stat-v, .ils-hero-name, .ils-hero-pos, .ils-section, .ils-chip, .ils-badge strong { font-family: var(--ils-display); }
.ils-title { font-weight: 700; letter-spacing: .01em; }
.ils-tabs a { text-transform: uppercase; letter-spacing: .05em; font-weight: 500; }

/* ---------- Driver page: race-poster hero ---------- */
.ils-hero { --ink: #fff; position: relative; overflow: hidden; isolation: isolate; display: grid; grid-template-columns: minmax(240px, 1.1fr) 1fr; align-items: center; gap: 1.25em;
	padding: 1.5em 1.75em 1.5em 2.4em; border-radius: 18px; margin-bottom: 1.1em; color: var(--ink);
	background:
		radial-gradient(120% 140% at 0% 100%, color-mix(in srgb, var(--c1) 55%, transparent) 0%, transparent 60%),
		radial-gradient(90% 120% at 100% 0%, color-mix(in srgb, var(--c2) 45%, transparent) 0%, transparent 55%),
		linear-gradient(135deg, #1a1c20, #0e0f12);
	box-shadow: 0 10px 30px rgba(0,0,0,.18); }
.ils-hero a { color: inherit; }
.ils-hero-stripes { position: absolute; left: 0; top: 0; bottom: 0; display: flex; z-index: 1; }
.ils-hero-stripes span { width: 8px; height: 100%; }
.ils-hero-stripes span:nth-child(1) { background: var(--c1); }
.ils-hero-stripes span:nth-child(2) { background: var(--c2); }
.ils-hero-stripes span:nth-child(3) { background: var(--c3); }
.ils-hero-flag { position: absolute; right: -40px; top: -40px; width: 220px; height: 220px; transform: rotate(18deg); opacity: .09; z-index: -1;
	background: repeating-conic-gradient(#fff 0 25%, transparent 0 50%) 0 0 / 36px 36px; }
.ils-hero-bignum { position: absolute; right: .15em; bottom: -.18em; font-family: var(--ils-display); font-weight: 700; font-size: 11em; line-height: 1; letter-spacing: -.02em;
	color: transparent; -webkit-text-stroke: 2px rgba(255,255,255,.10); z-index: -1; pointer-events: none; }
.ils-hero-car svg { width: 100%; height: auto; display: block; filter: drop-shadow(0 14px 14px rgba(0,0,0,.45)); }
.ils-hero-car svg ellipse { opacity: .45; }
.ils-hero-pos { font-size: .85em; text-transform: uppercase; letter-spacing: .12em; color: rgba(255,255,255,.7); font-weight: 500; display: flex; align-items: center; gap: .6em; }
.ils-hero-pos span { background: var(--ils-accent); color: #fff; border-radius: 6px; padding: .05em .5em; font-size: 1.35em; letter-spacing: .02em; font-weight: 700; }
.ils-hero-name { font-size: 2.7em; font-weight: 700; line-height: 1; margin: .25em 0 .2em; text-transform: uppercase; letter-spacing: .01em; text-shadow: 0 2px 12px rgba(0,0,0,.35); }
.ils-hero-sub { color: rgba(255,255,255,.72); margin-bottom: 1em; }
.ils-badges { display: flex; flex-wrap: wrap; gap: .45em; }
.ils-badge { display: inline-flex; align-items: center; gap: .35em; padding: .38em .8em; border-radius: 999px; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.14); font-size: .9em; white-space: nowrap; backdrop-filter: blur(4px); }
.ils-badge strong { font-size: 1.2em; font-weight: 700; }
.ils-badge em { font-style: normal; color: rgba(255,255,255,.65); font-size: .9em; }
.ils-badge em.up { color: #5fd38d; }
.ils-badge em.down { color: #ff7b72; }
.ils-badge-pts strong { color: #ffb08a; }
.ils-lic { background: var(--lic); border-color: transparent; }
.ils-lic strong { background: rgba(255,255,255,.25); border-radius: 4px; padding: 0 .35em; }

/* ---------- Stat tiles ---------- */
.ils-stats-driver { grid-template-columns: repeat(5, 1fr); gap: .6em; }
.ils-stats-driver .ils-stat { position: relative; overflow: hidden; padding: .8em .9em .7em; border-radius: 12px; background: var(--ils-soft); border: 1px solid var(--ils-line); }
.ils-stats-driver .ils-stat::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: linear-gradient(90deg, var(--c1), var(--c2)); }
.ils-stats-driver .ils-stat-v { font-size: 1.7em; font-weight: 700; line-height: 1.1; }
.ils-stats-driver .ils-stat-l { margin-top: .15em; }
.ils-stats-driver .ils-stat.is-key { background: #17191d; color: #fff; border-color: #17191d; }
.ils-stats-driver .ils-stat.is-key .ils-stat-l { color: rgba(255,255,255,.6); }
.ils-stats-driver .ils-stat.is-wins { background: linear-gradient(135deg, #e0b02a, #b9861a); border-color: #b9861a; }
.ils-stats-driver .ils-stat.is-wins::before { background: rgba(255,255,255,.5); }
.ils-stats-driver .ils-stat.is-wins .ils-stat-l { color: rgba(255,255,255,.85); }

/* ---------- Section headings with a little checkered flag ---------- */
.ils-section { display: flex; align-items: center; gap: .55em; margin: 1.6em 0 .6em; font-size: 1em; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: inherit; }
.ils-section::before { content: ""; width: 18px; height: 18px; border-radius: 3px; flex: none;
	background: repeating-conic-gradient(currentColor 0 25%, transparent 0 50%) 0 0 / 9px 9px; opacity: .85; }
.ils-section::after { content: ""; flex: 1; height: 2px; background: var(--ils-line); }

/* ---------- Finishes chart ---------- */
.ils-chart-wrap { padding: .6em .4em .3em; border: 1px solid var(--ils-line); border-radius: 14px; background: var(--ils-soft); }
.ils-chart { width: 100%; height: auto; display: block; }
.ils-chart .ils-grid { stroke: currentColor; stroke-opacity: .1; }
.ils-chart .ils-axis { fill: currentColor; fill-opacity: .55; font-size: 12px; font-family: var(--ils-display); }
.ils-chart .ils-line { fill: none; stroke: var(--ils-line-color, var(--ils-accent)); stroke-width: 3.5; stroke-linejoin: round; stroke-linecap: round; }
.ils-chart .ils-dot { fill: var(--ils-line-color, var(--ils-accent)); stroke: #fff; stroke-width: 2.5; }
.ils-chart .ils-dot-1 { fill: #d4a21a; }
.ils-chart .ils-dot-2 { fill: #9aa4ad; }
.ils-chart .ils-dot-3 { fill: #b8743a; }

/* ---------- Race log ---------- */
.ils-log { border-radius: 12px; overflow: hidden; }
.ils-log thead th { background: #17191d; color: rgba(255,255,255,.75); border-bottom: 0; padding-top: .7em; padding-bottom: .7em; }
.ils-log tbody tr:nth-child(even) td { background: var(--ils-soft); }
.ils-log td { vertical-align: middle; }
.ils-chip { display: inline-block; min-width: 2.7em; text-align: center; padding: .12em .45em; border-radius: 6px; font-weight: 700; background: color-mix(in srgb, currentColor 9%, transparent); }
.ils-chip-1 { background: linear-gradient(135deg, #e0b02a, #b9861a); color: #fff; }
.ils-chip-2 { background: linear-gradient(135deg, #b3bcc4, #8a949d); color: #fff; }
.ils-chip-3 { background: linear-gradient(135deg, #c98a4f, #a0612c); color: #fff; }

/* Drivers grid cars */
.ils-card-car svg { width: 100%; height: auto; display: block; margin: -.3em 0 .2em; }
.ils-driver-card strong { font-family: var(--ils-display); font-weight: 500; font-size: 1.1em; text-transform: uppercase; letter-spacing: .02em; }

/* ---------- Narrow content columns ---------- */
@container (max-width: 720px) {
	.ils-hero { grid-template-columns: 1fr; padding-left: 2em; }
	.ils-hero-car { max-width: 440px; width: 100%; margin: 0 auto; }
	.ils-hero-bignum { font-size: 8em; }
}
@container (max-width: 480px) {
	.ils-stats-driver { grid-template-columns: repeat(2, 1fr); }
	.ils-hero-name { font-size: 2em; }
	.ils-hero-bignum { font-size: 6em; }
}
/* Soft spotlight so dark cars stand out on the dark banner. */
.ils-hero-car { border-radius: 50%; background: radial-gradient(ellipse 60% 55% at 50% 55%, rgba(255,255,255,.20), rgba(255,255,255,0) 70%); }
/* "No points" seasons hide points columns. */
.ils-nopts .ils-ptscol { display: none; }

/* Dirt modified made of colour layers (driver's paint) */
.ils-car-img { position: relative; display: block; width: 100%; aspect-ratio: 1400 / 518; }
.ils-car-img > img.ils-car-base, .ils-car-img > .ils-car-l, .ils-car-img > .ils-car-num { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.ils-car-img > .ils-car-l { -webkit-mask-size: 100% 100%; mask-size: 100% 100%; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; }
.ils-hero-car .ils-car-img { filter: drop-shadow(0 14px 14px rgba(0,0,0,.45)); }
.ils-card-car .ils-car-img { margin: .1em 0 .35em; }

/* v1.8.2: smaller car, brighter backdrop so dark noses/tires stand out */
.ils-hero-car { width: 86%; justify-self: center; border-radius: 40%;
	background: radial-gradient(ellipse 50% 50% at 50% 55%, rgba(255,255,255,.40) 0%, rgba(255,255,255,.20) 55%, rgba(255,255,255,0) 100%); padding: 4% 3%; }
.ils-hero-car .ils-car-img { filter: drop-shadow(0 10px 10px rgba(0,0,0,.35)); }
@container (max-width: 720px) { .ils-hero-car { width: 78%; max-width: 400px; } }

/* v1.8.3: car side gets more room; glow leans toward the nose */
.ils-hero { grid-template-columns: minmax(260px, 1.45fr) minmax(220px, 1fr); }
.ils-hero-car { width: 90%; background: radial-gradient(ellipse 46% 46% at 54% 55%, rgba(255,255,255,.44) 0%, rgba(255,255,255,.22) 55%, rgba(255,255,255,0) 100%); }
.ils-hero-name { font-size: 2.4em; }
@container (max-width: 720px) { .ils-hero { grid-template-columns: 1fr; } .ils-hero-car { width: 78%; } }

/* Banner above the league (Shortcodes & Help → Promotion links → Public pages) */
.ils-banner { max-width: 728px; margin: 0 auto 18px; }
.ils-banner a, .ils-banner img { display: block; }
.ils-banner img { width: 100%; height: auto; border-radius: 6px; }

/* League header: centered, with optional logo */
.ils-head--center { text-align: center; margin-bottom: 1.1em; }
.ils-head--center .ils-title { font-size: 1.8em; }
.ils-logo { display: block; margin: 0 auto .5em; max-height: 120px; max-width: 70%; width: auto; height: auto; }
.ils-bar-logo { flex: 0 0 auto; width: 52px; height: 52px; object-fit: contain; }
@media (max-width: 600px) { .ils-bar-logo { width: 40px; height: 40px; } .ils-logo { max-height: 90px; } }

/* Schedule */
.ils-sched { display: flex; flex-direction: column; gap: .5em; }
.ils-sched-row { display: flex; align-items: center; gap: 1em; padding: .8em 1em; border: 1px solid var(--ils-line); border-radius: 10px; }
.ils-sched-row.is-next { border-color: var(--ils-accent); box-shadow: inset 4px 0 0 var(--ils-accent); }
.ils-sched-main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.ils-sched-main strong { overflow: hidden; text-overflow: ellipsis; }
.ils-sched-when { display: flex; flex-direction: column; align-items: flex-end; text-align: right; white-space: nowrap; }
.ils-sched-date { font-weight: 600; }
.ils-next-tag { align-self: flex-start; margin-top: .3em; font-size: .7em; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: #fff; background: var(--ils-accent); border-radius: 99px; padding: .15em .7em; }
.ils .ils-btn { flex: 0 0 auto; display: inline-block; min-width: 7.5em; text-align: center; padding: .5em .9em; border-radius: 8px; font-weight: 700; font-size: .9em; text-decoration: none; background: var(--ils-accent); color: #fff; border: 1px solid var(--ils-accent); }
.ils .ils-btn:hover { color: #fff; filter: brightness(.92); }
.ils .ils-btn.is-off { background: transparent; color: var(--ils-muted); border-color: var(--ils-line); cursor: default; filter: none; }
@media (max-width: 600px) {
	.ils-sched-row { flex-wrap: wrap; gap: .6em; padding: .75em; }
	.ils-sched-main { flex: 1 1 calc(100% - 4em); }
	.ils-sched-when { flex-direction: row; gap: .5em; align-items: baseline; flex: 1; }
	.ils .ils-btn { min-width: 0; }
}

/* ---------- Number panel (driver's number in their paint, car type underneath) ---------- */
.ils-plate { display: block; }
.ils-plate-svg { display: block; width: 100%; height: auto; }
.ils-plate-car { display: block; margin-top: .55em; font-family: var(--ils-display); font-weight: 500; text-transform: uppercase; letter-spacing: .08em; font-size: .78em; color: var(--ils-accent); line-height: 1.25; }
.ils-card-plate { display: block; margin-bottom: .35em; }
.ils-hero-plate { align-self: center; max-width: 420px; width: 100%; justify-self: center; }
.ils-hero-plate .ils-plate-svg { filter: drop-shadow(0 14px 18px rgba(0,0,0,.45)); }
.ils-hero-plate .ils-plate-car { text-align: center; font-size: .95em; color: rgba(255,255,255,.85); margin-top: .8em; }
@container (max-width: 720px) { .ils-hero-plate { max-width: 360px; margin: 0 auto; } }

/* Download results (CSV) */
.ils .ils-dl { display: inline-block; margin-top: .55em; font-size: .85em; font-weight: 600; color: var(--ils-accent); text-decoration: none; border: 1px solid var(--ils-line); border-radius: 99px; padding: .3em .9em; }
.ils .ils-dl:hover { border-color: var(--ils-accent); }

/* Qualifying */
.ils-pole { display: inline-block; margin-left: .4em; font-size: .7em; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: #fff; background: var(--ils-accent); border-radius: 99px; padding: .1em .55em; vertical-align: middle; }
