/* Chart Race. Scoreboard is the base look; styles/data-desk.json and styles/arcade.json restyle it. */

/* Parts that belong to one look only */
.cr-v-scoreboard { display: var(--wp--custom--show--scoreboard) !important; }
.cr-v-desk { display: var(--wp--custom--show--desk) !important; }
.cr-v-arcade { display: var(--wp--custom--show--arcade) !important; }
.cr-media-dark { display: var(--wp--custom--show--dark-media) !important; }
.cr-media-light { display: var(--wp--custom--show--light-media) !important; }

body { -webkit-font-smoothing: antialiased; }
:where(a, button, input):focus-visible { outline: 3px solid var(--wp--preset--color--accent); outline-offset: 3px; }
.cr-main { margin-block-start: 0; }
.cr-main > * + * { margin-block-start: 0; }

/* Header */
.cr-header { border-bottom: 1px solid var(--wp--preset--color--line); }
/* The hidden Data Desk top line is the header's first child, so the visible row would otherwise get a block gap that pushes the whole page down */
.cr-header > * { margin-block: 0; }
.cr-header-inner { padding-block: 18px; gap: 16px; }
.cr-logo { display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; min-height: 44px; }
.cr-logo-mark { flex: 0 0 auto; }
.cr-wordmark { font-family: var(--wp--custom--font--display); font-weight: var(--wp--custom--display--weight); font-style: var(--wp--custom--display--style); text-transform: var(--wp--custom--display--transform); font-size: 30px; line-height: 1; letter-spacing: 0.02em; }
.cr-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 28px; font-size: 0.9375rem; font-weight: 600; }
.cr-nav a { color: var(--wp--preset--color--muted); text-decoration: none; padding-block: 12px; }
.cr-nav a:hover { color: var(--wp--preset--color--contrast); text-decoration: underline; }
.cr-nav a.cr-nav-cta { color: var(--wp--preset--color--on-accent); background: var(--wp--preset--color--accent); padding: 12px 18px; border-radius: var(--wp--custom--button--radius); font-weight: 700; }
.cr-nav a.cr-nav-cta:hover { color: var(--wp--preset--color--on-accent); text-decoration: none; filter: brightness(1.08); }
.cr-topline { border-bottom: 1px solid var(--wp--preset--color--line); }
.cr-topline-inner { max-width: var(--wp--style--global--wide-size); margin-inline: auto; padding-block: 10px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; font-family: var(--wp--preset--font-family--plex-mono); font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--wp--preset--color--subtle); }

/* Labels and quiet text */
.cr-label { margin: 0; font-family: var(--wp--custom--font--label); font-size: var(--wp--custom--label--size); font-weight: var(--wp--custom--label--weight); text-transform: var(--wp--custom--label--transform); letter-spacing: var(--wp--custom--label--tracking); color: var(--wp--custom--label--color); line-height: 1.6; }
.cr-label-quiet { color: var(--wp--preset--color--subtle); }
.cr-quiet { color: var(--wp--preset--color--subtle); }

/* Hero */
.cr-hero { background: var(--wp--custom--hero--background); color: var(--wp--custom--hero--text); padding-block: 72px 64px; }
.cr-hero-columns { gap: 56px; margin-block: 0; }
.cr-hero-text > * { margin-block: 0; }
.cr-hero-text > * + * { margin-block-start: 24px; }
.cr-live { display: flex; align-items: center; gap: 10px; color: var(--wp--preset--color--muted); }
.cr-live::before { content: ""; display: var(--wp--custom--show--scoreboard); width: 10px; height: 10px; border-radius: 50%; background: var(--wp--preset--color--hot); flex: 0 0 auto; }
.cr-hero-title { margin: 0; }
.cr-highlight { color: var(--wp--custom--hero--highlight); }
.cr-hero-intro { max-width: 34em; font-size: 1.1875rem; color: var(--wp--preset--color--muted); }
.cr-buttons { gap: 12px; }
.cr-buttons .wp-block-button__link { display: inline-flex; align-items: center; gap: 10px; min-height: 48px; box-sizing: border-box; border: var(--wp--custom--button--border); box-shadow: var(--wp--custom--button--shadow); }
.cr-buttons .wp-block-button__link:hover { filter: brightness(1.08); }
.cr-buttons .is-style-outline .wp-block-button__link { background: transparent; color: var(--wp--preset--color--contrast); border: 1.5px solid #3A4456; box-shadow: none; }
.cr-buttons-end { justify-content: flex-end; }
.cr-media { margin: 0; display: flex; flex-direction: column; gap: 12px; }
.cr-media video { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; background: #000; border: var(--wp--custom--media--border); border-radius: var(--wp--custom--media--radius); box-shadow: var(--wp--custom--media--shadow); box-sizing: border-box; }
.cr-media figcaption { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; font-size: 0.875rem; color: var(--wp--preset--color--subtle); }
.cr-media figcaption a { color: var(--wp--custom--hero--text); font-weight: 600; text-decoration: none; }
.cr-media figcaption a:hover { text-decoration: underline; }

/* Standings band */
.cr-band { background: var(--wp--custom--band--background); color: var(--wp--custom--band--text); border-block: 1px solid var(--wp--preset--color--line); padding-block: 48px; }
.cr-standings { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 28px 56px; align-items: center; }
.cr-standings-intro p { margin: 8px 0 0; color: var(--wp--preset--color--subtle); }
.cr-standings-title { margin: 0; display: flex; align-items: center; gap: 14px; font-size: 1.75rem; line-height: 1.1; color: var(--wp--custom--band--highlight); }
.cr-flag { display: var(--wp--custom--show--scoreboard); width: 36px; height: 24px; flex: 0 0 auto; background: repeating-conic-gradient(var(--wp--preset--color--contrast) 0 25%, var(--wp--preset--color--base) 0 50%) 0 0 / 12px 12px; }
.cr-standings-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.cr-standings-list li { display: grid; grid-template-columns: 2rem 10rem minmax(0, 1fr) 4.5rem; gap: 12px; align-items: center; font-family: var(--wp--preset--font-family--barlow-condensed); font-weight: 700; font-size: 1.375rem; text-transform: uppercase; letter-spacing: 0.02em; line-height: 1.2; }
.cr-rank { color: var(--wp--custom--band--highlight); }
.cr-track { display: block; height: 22px; }
.cr-bar { display: block; height: 100%; border-radius: 0 4px 4px 0; }
.cr-bar-1 { background: var(--wp--custom--bars--1); }
.cr-bar-2 { background: var(--wp--custom--bars--2); }
.cr-bar-3 { background: var(--wp--custom--bars--3); }
.cr-bar-4 { background: var(--wp--custom--bars--4); }
.cr-bar-5 { background: var(--wp--custom--bars--5); }
.cr-value { text-align: right; font-variant-numeric: tabular-nums; }
@media (max-width: 800px) {
	.cr-standings { grid-template-columns: minmax(0, 1fr); }
	.cr-standings-list li { grid-template-columns: 1.5rem 6.5rem minmax(0, 1fr) 4rem; font-size: 1.125rem; gap: 8px; }
}

/* Sections */
.cr-section { padding-block: 88px 24px; }
.cr-section + .cr-section { padding-block: 72px 88px; }
.cr-section h2 { margin-block: 0; }
.cr-section-head { gap: 16px; margin-block-end: 32px; }
.cr-section-head p { margin: 0; }
.cr-more a { color: var(--wp--preset--color--muted); font-weight: 600; font-size: 0.9375rem; }

/* Race cards */
.cr-cards { gap: 28px; }
.cr-card { background: var(--wp--custom--card--background); border: var(--wp--custom--card--border); border-radius: var(--wp--custom--card--radius); box-shadow: var(--wp--custom--card--shadow); overflow: hidden; display: flex; flex-direction: column; margin: 0; }
.cr-card > * { margin-block: 0; }
.cr-card-image { margin: 0; }
.cr-card-image img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }
.cr-card-image-short { aspect-ratio: 16 / 9; background: #0B0E13; display: flex !important; justify-content: center; overflow: hidden; }
.cr-card-image-short img { width: auto; height: 100%; aspect-ratio: 9 / 16; object-position: top; }
.cr-card-soon .cr-card-image img { opacity: 0.45; }
.cr-card-body { padding: 20px 22px 24px; }
.cr-card-body > * { margin-block: 0; }
.cr-card-body > * + * { margin-block-start: 8px; }
.cr-card h3 a { color: inherit; text-decoration: none; }
.cr-card h3 a:hover { text-decoration: underline; }

/* How a race is made */
.cr-section h2 + .cr-steps { margin-block-start: 40px; }
.cr-steps { border-top: var(--wp--custom--rule); gap: 0 28px; }
.cr-step { padding-block: 28px 8px; }
.cr-step > * { margin-block: 0; }
.cr-step > * + * { margin-block-start: 12px; }
.cr-step-number { font-family: var(--wp--custom--font--display); font-weight: 800; font-size: 4rem; line-height: 1; color: var(--wp--preset--color--accent); }

/* Suggest a race */
.cr-suggest { background: var(--wp--preset--color--surface); border-block: 1px solid var(--wp--preset--color--line); padding-block: 72px; }
.cr-suggest .wp-block-columns { gap: 32px 48px; margin: 0; }
.cr-suggest h2 { margin: 0 0 12px; }
.cr-suggest p { margin: 0; max-width: 32em; }
@media (max-width: 781px) {
	.cr-buttons-end { justify-content: flex-start; }
}

/* Footer */
.cr-footer { padding-block: 40px 56px; font-size: 0.875rem; color: var(--wp--preset--color--subtle); }
.cr-footer p { margin: 0; }
.cr-footer strong { color: var(--wp--preset--color--contrast); }

/* Other pages */
.cr-page-title { font-size: var(--wp--preset--font-size--x-large); margin-block: 64px 32px; }
