:root {
    color-scheme: dark;
    --carbon: #0b0c0f;
    --surface-1: #14161b;
    --surface-2: #1b1e25;
    --surface-3: #242833;
    --outline: #2c313c;
    --outline-soft: #20242c;
    --text-high: #f2f4f8;
    --text-med: #adb3c0;
    --text-low: #6e7585;
    --amber: #ff7a1a;
    --amber-dim: #3a2410;
    --lime: #9be600;
    --red: #e2231a;
    --blue: #2563eb;
    --purple: #7c3aed;
    --green: #16a34a;
    --cyan: #6fe3f0;
    --max: 1180px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

main section[id] {
    scroll-margin-top: 110px;
}

body {
    margin: 0;
    min-width: 320px;
    background:
        linear-gradient(180deg, rgba(11, 12, 15, 0.36), var(--carbon) 720px),
        var(--carbon);
    color: var(--text-high);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    letter-spacing: 0;
}

a {
    color: inherit;
    text-decoration: none;
}

img,
svg {
    display: block;
}

.site-header {
    position: sticky;
    z-index: 20;
    top: 14px;
    width: min(calc(100% - 32px), var(--max));
    min-height: 64px;
    margin: 14px auto 0;
    padding: 10px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 18px;
    background: rgba(20, 22, 27, 0.78);
    backdrop-filter: blur(18px);
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.28);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 900;
}

.brand-mark {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: var(--amber);
    color: var(--carbon);
}

.brand-mark svg {
    width: 21px;
    height: 21px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav-links a {
    padding: 10px 12px;
    border-radius: 10px;
    color: var(--text-med);
    font-size: 14px;
    font-weight: 700;
}

.nav-links a:hover,
.nav-links a:focus-visible {
    color: var(--text-high);
    background: var(--surface-3);
    outline: none;
}

.hero-section {
    position: relative;
    min-height: 720px;
    margin-top: -78px;
    padding: 150px 24px 58px;
    overflow: hidden;
}

.hero-section::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 82% 26%, rgba(155, 230, 0, 0.16), transparent 28%),
        radial-gradient(circle at 72% 74%, rgba(255, 122, 26, 0.18), transparent 32%),
        linear-gradient(90deg, rgba(11, 12, 15, 0.98), rgba(11, 12, 15, 0.76) 48%, rgba(11, 12, 15, 0.98)),
        repeating-linear-gradient(115deg, transparent 0 86px, rgba(255, 122, 26, 0.08) 86px 88px, transparent 88px 132px);
}

.hero-grid,
.feature-section,
.download-section {
    position: relative;
    z-index: 1;
    width: min(100%, var(--max));
    margin: 0 auto;
}

.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 0.94fr) minmax(360px, 1.06fr);
    gap: 54px;
    align-items: center;
}

.eyebrow {
    margin: 0 0 16px;
    color: var(--amber);
    font-size: 13px;
    font-weight: 900;
    text-transform: uppercase;
}

h1,
h2,
h3,
p {
    letter-spacing: 0;
}

h1 {
    max-width: 760px;
    margin: 0;
    font-size: clamp(42px, 6vw, 78px);
    line-height: 0.98;
    font-weight: 950;
}

h2 {
    margin: 0;
    font-size: clamp(32px, 4vw, 58px);
    line-height: 1;
    font-weight: 950;
}

h3 {
    margin: 0;
}

.hero-lede,
.section-copy p,
.download-section p {
    max-width: 640px;
    color: var(--text-med);
    font-size: 18px;
    line-height: 1.65;
}

.store-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 30px;
}

.store-button {
    min-width: 184px;
    min-height: 62px;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 16px;
    background: #050607;
    color: var(--text-high);
    font-weight: 950;
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.38);
    transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.store-button svg,
.store-button img {
    width: 26px;
    height: 26px;
    flex: 0 0 auto;
    object-fit: contain;
}

.store-button .store-icon-google-play {
    width: 28px;
    height: 28px;
}

.store-button span {
    display: grid;
    line-height: 1.08;
}

.store-button small {
    color: var(--text-med);
    font-size: 11px;
    font-weight: 800;
}

.store-button-muted {
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: #050607;
    color: var(--text-high);
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.24);
}

.store-button:hover,
.store-button:focus-visible {
    transform: translateY(-2px);
    border-color: rgba(255, 122, 26, 0.62);
    box-shadow: 0 22px 54px rgba(0, 0, 0, 0.46);
    outline: none;
}

.store-button-source {
    border-color: rgba(255, 255, 255, 0.12);
    background: rgba(20, 22, 27, 0.92);
}

.source-link {
    width: fit-content;
    margin-top: 16px;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: var(--text-med);
    font-size: 14px;
    font-weight: 850;
}

.source-link svg {
    width: 20px;
    height: 20px;
    color: var(--text-high);
}

.source-link span {
    border-bottom: 1px solid rgba(255, 122, 26, 0.42);
}

.source-link:hover,
.source-link:focus-visible {
    color: var(--text-high);
    outline: none;
}

.telemetry-card,
.profile-panel,
.race-card {
    border: 1px solid var(--outline);
    background: rgba(20, 22, 27, 0.86);
    box-shadow: 0 22px 70px rgba(0, 0, 0, 0.32);
}

.hero-visual {
    position: relative;
    min-height: 520px;
}

.hero-preview-board {
    position: relative;
    min-height: 430px;
}

.hero-race-preview {
    position: absolute;
    z-index: 2;
    top: 28px;
    right: 40px;
    width: min(420px, 80%);
    min-height: 245px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(255, 122, 26, 0.35);
    border-radius: 24px;
    background:
        linear-gradient(160deg, rgba(255, 122, 26, 0.16), rgba(11, 12, 15, 0) 52%),
        rgba(20, 22, 27, 0.9);
    box-shadow: 0 34px 100px rgba(0, 0, 0, 0.48);
    backdrop-filter: blur(14px);
    overflow: hidden;
}

.card-preview-bg,
.card-preview-scrim {
    position: absolute;
    inset: 0;
}

.card-preview-bg {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-preview-scrim {
    background:
        linear-gradient(180deg, rgba(11, 12, 15, 0.72), rgba(11, 12, 15, 0.2) 38%, rgba(11, 12, 15, 0.92)),
        linear-gradient(90deg, rgba(11, 12, 15, 0.7), rgba(11, 12, 15, 0.3));
}

.hero-race-preview > :not(.card-preview-bg):not(.card-preview-scrim),
.scope-race-card > :not(.card-preview-bg):not(.card-preview-scrim) {
    position: relative;
    z-index: 1;
}

.hero-preview-top {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.hero-race-preview h3 {
    margin-top: auto;
    font-size: clamp(30px, 3vw, 34px);
    line-height: 1;
}

.hero-race-preview p {
    margin: 8px 0 0;
    color: var(--text-med);
}

.hero-race-preview .ssr-race-meta {
    position: static;
    margin-top: 16px;
}

.hero-track-preview {
    position: absolute;
    left: 8px;
    bottom: 34px;
    width: min(410px, 72%);
    height: 220px;
    overflow: hidden;
    border: 1px solid var(--outline);
    border-radius: 22px;
    background: var(--surface-2);
    box-shadow: 0 34px 100px rgba(0, 0, 0, 0.48);
}

.telemetry-card {
    position: absolute;
    right: 0;
    bottom: 0;
    width: min(360px, 68%);
    padding: 18px;
    border-radius: 20px;
    backdrop-filter: blur(14px);
}

.telemetry-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    color: var(--text-med);
    font-size: 13px;
    font-weight: 850;
    text-transform: uppercase;
}

.telemetry-head strong {
    color: var(--lime);
}

.telemetry-card svg {
    width: 100%;
    height: auto;
    margin-top: 12px;
}

.grid-line {
    stroke: rgba(173, 179, 192, 0.14);
    stroke-width: 1;
}

.chart-fill {
    fill: url("#none");
    fill: rgba(255, 77, 94, 0.16);
}

.chart-line {
    fill: none;
    stroke: #ff4d5e;
    stroke-linecap: round;
    stroke-width: 5;
}

.feature-section {
    padding: 116px 0 0;
    display: grid;
    grid-template-columns: 0.8fr 1.2fr;
    gap: 44px;
    align-items: center;
}

.feature-section-flip {
    grid-template-columns: 1.1fr 0.9fr;
}

.feature-section-race {
    grid-template-columns: minmax(0, 0.98fr) minmax(360px, 1.02fr);
    align-items: start;
}

.section-copy {
    padding: 0 8px;
}

.feature-points {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 26px;
}

.feature-points article {
    min-width: 0;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 10px;
    padding: 14px;
    border: 1px solid var(--outline-soft);
    border-radius: 14px;
    background: rgba(27, 30, 37, 0.54);
}

.feature-points article > span {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: rgba(255, 122, 26, 0.14);
    color: var(--amber);
    font-size: 12px;
    font-weight: 950;
}

.feature-points h3 {
    font-size: 15px;
    line-height: 1.15;
}

.feature-points p {
    margin: 6px 0 0;
    color: var(--text-med);
    font-size: 13px;
    line-height: 1.45;
}

.app-scope-panel {
    min-width: 0;
    padding: 18px;
    border: 1px solid rgba(255, 122, 26, 0.28);
    border-radius: 24px;
    background:
        linear-gradient(145deg, rgba(255, 122, 26, 0.1), rgba(11, 12, 15, 0) 42%),
        rgba(20, 22, 27, 0.88);
    box-shadow: 0 22px 70px rgba(0, 0, 0, 0.32);
}

.scope-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
    color: var(--text-low);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.scope-head strong {
    color: var(--text-high);
}

.scope-race-card {
    position: relative;
    min-height: 220px;
    padding: 18px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    overflow: hidden;
    border: 1px solid rgba(22, 163, 74, 0.56);
    border-radius: 20px;
    background:
        linear-gradient(180deg, rgba(11, 12, 15, 0.08), rgba(11, 12, 15, 0.88)),
        radial-gradient(circle at 84% 0%, rgba(22, 163, 74, 0.28), transparent 48%),
        var(--surface-1);
}

.scope-race-card .race-card-top {
    margin-bottom: auto;
}

.scope-race-card .race-card-top span:nth-child(2) {
    background: var(--green);
    color: white;
}

.scope-race-card .race-card-top span:nth-child(3) {
    background: var(--blue);
    color: white;
}

.scope-race-card h3 {
    margin-top: 42px;
    font-size: 28px;
    line-height: 1.02;
}

.scope-race-card p {
    margin: 8px 0 16px;
    color: var(--text-med);
}

.scope-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 12px;
}

.scope-list article {
    min-width: 0;
    padding: 12px;
    border: 1px solid var(--outline-soft);
    border-radius: 14px;
    background: rgba(11, 12, 15, 0.32);
}

.scope-list span {
    display: block;
    margin-bottom: 6px;
    color: var(--amber);
    font-size: 12px;
    font-weight: 950;
    text-transform: uppercase;
}

.scope-list p {
    margin: 0;
    color: var(--text-med);
    font-size: 13px;
    line-height: 1.45;
}

.scope-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    margin-top: 12px;
}

.scope-stats div {
    min-width: 0;
    padding: 12px 8px;
    border: 1px solid var(--outline-soft);
    border-radius: 12px;
    background: var(--surface-2);
    text-align: center;
}

.scope-stats strong {
    display: block;
    color: var(--text-high);
    font-size: 18px;
    line-height: 1.08;
}

.scope-stats span {
    display: block;
    margin-top: 6px;
    color: var(--text-low);
    font-size: 11px;
    font-weight: 850;
    text-transform: uppercase;
    line-height: 1.25;
}

.race-board {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    align-items: stretch;
}

.live-data-section {
    width: min(100%, var(--max));
    margin: 0 auto;
    padding: 116px 0 0;
}

.section-copy-wide {
    max-width: 860px;
}

.data-head {
    margin-top: 34px;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: var(--text-low);
    font-size: 13px;
    font-weight: 900;
    text-transform: uppercase;
}

.data-head strong {
    color: var(--lime);
}

.data-head-track {
    margin-top: 36px;
}

.ssr-schedule-grid,
.track-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.ssr-race-card,
.track-card {
    overflow: hidden;
    border: 1px solid var(--outline);
    border-radius: 22px;
    background: var(--surface-1);
    box-shadow: 0 22px 70px rgba(0, 0, 0, 0.26);
}

.ssr-race-card {
    min-height: 300px;
    padding: 0;
    background: var(--surface-1);
}

.ssr-race-preview {
    position: relative;
    min-height: 300px;
    height: 100%;
    overflow: hidden;
    background:
        radial-gradient(circle at 80% 20%, rgba(255, 122, 26, 0.18), transparent 34%),
        var(--surface-2);
}

.ssr-race-preview > img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ssr-race-scrim {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(11, 12, 15, 0.64), rgba(11, 12, 15, 0.08) 30%, rgba(11, 12, 15, 0.88) 100%),
        linear-gradient(90deg, rgba(11, 12, 15, 0.58), rgba(11, 12, 15, 0.26), rgba(11, 12, 15, 0.18));
}

.ssr-race-top {
    position: relative;
    z-index: 2;
    min-height: 30px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    padding: 10px;
}

.badge-flow {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

.skill-badge,
.class-chip {
    height: 28px;
    border-radius: 7px;
    padding: 0 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    line-height: 1;
    font-weight: 950;
}

.skill-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0 2px 0 0;
    background: transparent;
    color: var(--text-med);
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.68);
}

.skill-badge i {
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: var(--amber);
}

.class-chip {
    color: white;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.26);
}

.class-chip-hypercar {
    background: var(--red);
}

.class-chip-lmp2 {
    background: var(--blue);
}

.class-chip-lmp3 {
    background: var(--purple);
}

.class-chip-gt3 {
    background: var(--green);
}

.class-chip-mixed {
    background: #c792ea;
}

.race-track-logo {
    flex: 0 1 auto;
    width: auto;
    max-width: 86px;
    height: 26px;
    object-fit: contain;
    filter: drop-shadow(0 5px 10px rgba(0, 0, 0, 0.68));
}

.ssr-race-title {
    position: absolute;
    z-index: 2;
    left: 14px;
    right: 14px;
    bottom: 64px;
}

.ssr-race-title h3 {
    margin: 0;
    font-size: 24px;
    line-height: 1.08;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.72);
}

.ssr-race-title p {
    margin: 8px 0 0;
    color: var(--text-med);
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.72);
}

.ssr-race-meta {
    position: absolute;
    z-index: 2;
    left: 14px;
    right: 14px;
    bottom: 14px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.ssr-race-meta > span:not(.safety-badge),
.ssr-race-meta > strong {
    border-radius: 8px;
    padding: 7px 9px;
    background: rgba(27, 30, 37, 0.86);
    color: var(--text-med);
    font-size: 12px;
    font-weight: 900;
    backdrop-filter: blur(12px);
}

.ssr-race-meta strong {
    border: 1px solid rgba(255, 122, 26, 0.44);
    background: rgba(255, 122, 26, 0.14);
    color: var(--amber);
}

.safety-badge {
    --sr-bg: #8f6a3a;
    --sr-ink: #ffffff;
    height: 31px;
    min-width: 0;
    display: inline-flex;
    align-items: stretch;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.36);
    border-radius: 6px;
    background: transparent;
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.24);
    font-size: 13px;
    line-height: 1;
    font-weight: 950;
    letter-spacing: 0;
    white-space: nowrap;
}

.safety-prefix,
.safety-rank {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
}

.safety-prefix {
    padding: 0 10px;
    background: #f4f5f7;
    color: var(--sr-bg);
}

.safety-rank {
    padding: 0 12px;
    background: var(--sr-bg);
    color: var(--sr-ink);
}

.safety-badge-bronze {
    --sr-bg: #9a7442;
}

.safety-badge-silver {
    --sr-bg: #aeb4bc;
    --sr-ink: #ffffff;
}

.safety-badge-gold {
    --sr-bg: #c59a34;
}

.safety-badge-platinum {
    --sr-bg: #5bb4c3;
    --sr-ink: #061114;
}

.track-card {
    min-height: 330px;
}

.track-preview {
    position: relative;
    height: 170px;
    overflow: hidden;
    background: var(--surface-2);
}

.track-preview-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.track-preview-scrim {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
}

.track-preview-map {
    position: absolute;
    inset: 14px;
    width: calc(100% - 28px);
    height: calc(100% - 28px);
    object-fit: contain;
    filter: drop-shadow(0 12px 22px rgba(0, 0, 0, 0.58));
}

.track-preview-logo {
    position: absolute;
    top: 12px;
    left: 12px;
    width: auto;
    max-width: 122px;
    height: 30px;
    object-fit: contain;
    filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.62));
}

.track-preview-flag {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.5);
}

.track-card-body {
    padding: 16px;
}

.track-card h3 {
    font-size: 22px;
    line-height: 1.1;
}

.track-card p {
    margin: 8px 0 14px;
    color: var(--text-med);
}

.track-facts {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.track-facts span {
    border: 1px solid var(--outline);
    border-radius: 8px;
    padding: 6px 8px;
    background: var(--surface-2);
    color: var(--text-med);
    font-size: 12px;
    font-weight: 850;
}

.race-card {
    min-height: 360px;
    padding: 18px;
    border-radius: 24px;
    background:
        linear-gradient(180deg, rgba(11, 12, 15, 0.18), rgba(11, 12, 15, 0.88)),
        radial-gradient(circle at 80% 0%, rgba(22, 163, 74, 0.28), transparent 46%),
        var(--surface-1);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.race-card-next {
    border-color: rgba(22, 163, 74, 0.66);
}

.race-card-blue {
    border-color: rgba(37, 99, 235, 0.66);
    background:
        linear-gradient(180deg, rgba(11, 12, 15, 0.18), rgba(11, 12, 15, 0.88)),
        radial-gradient(circle at 84% 0%, rgba(37, 99, 235, 0.32), transparent 46%),
        var(--surface-1);
}

.race-card-lime {
    border-color: rgba(155, 230, 0, 0.62);
    background:
        linear-gradient(180deg, rgba(11, 12, 15, 0.18), rgba(11, 12, 15, 0.88)),
        radial-gradient(circle at 84% 0%, rgba(155, 230, 0, 0.22), transparent 46%),
        var(--surface-1);
}

.race-card-top {
    margin-bottom: auto;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.race-card-top span,
.race-meta > span:not(.safety-badge),
.race-meta > strong,
.status-chip {
    border-radius: 8px;
    padding: 6px 9px;
    font-size: 12px;
    font-weight: 950;
}

.race-card-top span:first-child {
    background: var(--amber);
    color: var(--carbon);
}

.race-card-top span:last-child {
    background: var(--green);
    color: white;
}

.race-card-blue .race-card-top span {
    background: var(--blue);
    color: white;
}

.race-card-blue .race-card-top span:last-child {
    background: var(--purple);
}

.race-card-lime .race-card-top span {
    background: var(--lime);
    color: var(--carbon);
}

.race-card h3 {
    margin-top: 64px;
    font-size: 24px;
    line-height: 1.08;
}

.race-card p {
    margin: 7px 0 16px;
    color: var(--text-med);
}

.race-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.race-meta > span:not(.safety-badge) {
    background: var(--surface-3);
    color: var(--text-high);
}

.race-meta > strong {
    background: rgba(255, 122, 26, 0.16);
    color: var(--amber);
    border: 1px solid rgba(255, 122, 26, 0.44);
}

.time-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    padding-top: 16px;
    border-top: 1px solid var(--outline-soft);
    color: var(--text-low);
    font-variant-numeric: tabular-nums;
}

.time-grid b {
    color: var(--text-high);
}

.profile-panel {
    padding: 22px;
    border-radius: 28px;
}

.profile-head {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 14px;
    align-items: center;
}

.avatar {
    width: 76px;
    height: 76px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    border: 2px solid #8f9499;
    background: linear-gradient(#006edb 0 50%, #ffd33d 50%);
    color: rgba(255, 255, 255, 0.94);
    font-weight: 950;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.36);
}

.profile-head p {
    margin: 0 0 4px;
    color: var(--text-low);
    font-weight: 850;
    text-transform: uppercase;
}

.profile-head h3 {
    font-size: 28px;
}

.status-chip {
    background: rgba(22, 163, 74, 0.16);
    color: #57c77a;
    border: 1px solid rgba(22, 163, 74, 0.36);
    white-space: nowrap;
}

.rating-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-top: 24px;
}

.rating-grid div,
.career-grid div {
    border: 1px solid var(--outline);
    border-radius: 18px;
    background: var(--surface-2);
}

.rating-grid div {
    padding: 18px;
}

.rating-grid span,
.career-grid span {
    display: block;
    color: var(--text-low);
    font-size: 12px;
    font-weight: 850;
    text-transform: uppercase;
}

.rating-grid strong {
    display: block;
    margin: 12px 0 12px;
    font-size: 34px;
    color: var(--amber);
}

.rating-grid div:last-child strong {
    color: var(--text-high);
}

.rating-grid i {
    display: block;
    height: 9px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--amber) var(--value), var(--surface-3) var(--value));
}

.rating-grid div:last-child i {
    background: linear-gradient(90deg, var(--text-high) var(--value), var(--surface-3) var(--value));
}

.career-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-top: 14px;
}

.career-grid div {
    min-height: 118px;
    padding: 20px 10px;
    text-align: center;
}

.career-grid strong {
    display: block;
    margin-bottom: 8px;
    color: var(--lime);
    font-size: 32px;
}

.career-grid div:nth-child(2) strong {
    color: #e6c04a;
}

.career-grid div:nth-child(3) strong {
    color: #57c77a;
}

.career-grid div:nth-child(4) strong {
    color: var(--cyan);
}

.download-section {
    margin-top: 118px;
    margin-bottom: 40px;
    padding: 44px;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 28px;
    align-items: center;
    border: 1px solid rgba(255, 122, 26, 0.36);
    border-radius: 28px;
    background:
        linear-gradient(135deg, rgba(255, 122, 26, 0.16), rgba(155, 230, 0, 0.08)),
        var(--surface-1);
}

.download-section p {
    margin-bottom: 0;
}

.store-row-download {
    margin-top: 0;
    justify-content: flex-end;
}

.site-footer {
    width: min(calc(100% - 32px), var(--max));
    margin: 0 auto 28px;
    padding: 20px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    border-top: 1px solid var(--outline-soft);
    color: var(--text-med);
}

.site-footer .brand {
    color: var(--text-high);
}

.site-footer .brand-mark {
    width: 34px;
    height: 34px;
    border-radius: 10px;
}

.site-footer .brand-mark svg {
    width: 19px;
    height: 19px;
}

.site-footer nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.site-footer nav a {
    padding: 9px 10px;
    border-radius: 9px;
    color: var(--text-med);
    font-size: 13px;
    font-weight: 850;
}

.site-footer nav a:hover,
.site-footer nav a:focus-visible {
    color: var(--text-high);
    background: var(--surface-2);
    outline: none;
}

.legal-page {
    width: min(calc(100% - 32px), 920px);
    margin: 0 auto;
}

.legal-hero {
    position: relative;
    padding: 92px 0 34px;
}

.legal-hero h1 {
    max-width: 860px;
    font-size: clamp(40px, 6vw, 70px);
}

.legal-hero p:last-child {
    margin: 18px 0 0;
    color: var(--text-med);
    font-size: 18px;
    font-weight: 850;
}

.legal-content {
    margin-bottom: 80px;
    padding: 28px;
    border: 1px solid var(--outline);
    border-radius: 24px;
    background: rgba(20, 22, 27, 0.78);
    box-shadow: 0 22px 70px rgba(0, 0, 0, 0.28);
}

.legal-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
    padding-bottom: 22px;
    border-bottom: 1px solid var(--outline-soft);
}

.legal-summary span,
.legal-summary a {
    border: 1px solid var(--outline);
    border-radius: 8px;
    padding: 8px 10px;
    background: var(--surface-2);
    color: var(--text-med);
    font-size: 13px;
    font-weight: 850;
}

.legal-summary a {
    color: var(--amber);
}

.legal-content p {
    margin: 0 0 16px;
    color: var(--text-med);
    font-size: 16px;
    line-height: 1.75;
}

.legal-section {
    padding-top: 24px;
    border-top: 1px solid var(--outline-soft);
}

.legal-section + .legal-section {
    margin-top: 12px;
}

.legal-section h2 {
    margin-bottom: 14px;
    color: var(--text-high);
    font-size: 22px;
    line-height: 1.2;
}

@media (max-width: 1040px) {
    .hero-grid,
    .feature-section,
    .feature-section-flip,
    .download-section {
        grid-template-columns: 1fr;
    }

    .hero-copy {
        max-width: 780px;
    }

    .hero-visual {
        min-height: 470px;
    }

    .download-section,
    .store-row-download {
        justify-content: flex-start;
    }

    .feature-section-race {
        gap: 22px;
    }
}

@media (max-width: 820px) {
    .nav-links {
        display: none;
    }

    .hero-section {
        min-height: auto;
        padding: 118px 18px 58px;
    }

    .hero-grid {
        gap: 34px;
    }

    .race-board,
    .ssr-schedule-grid,
    .track-grid,
    .career-grid {
        grid-template-columns: 1fr;
    }

    .feature-section {
        padding: 78px 18px 0;
    }

    .live-data-section {
        padding: 78px 18px 0;
    }

    .data-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .feature-section-race .section-copy {
        padding: 0;
    }

    .feature-section-race h2 {
        max-width: 680px;
        font-size: 34px;
        line-height: 1.04;
    }

    .feature-points,
    .scope-list {
        grid-template-columns: 1fr;
    }

    .feature-points {
        gap: 8px;
        margin-top: 20px;
    }

    .feature-points article {
        padding: 12px;
    }

    .app-scope-panel {
        padding: 14px;
        border-radius: 20px;
    }

    .scope-race-card {
        min-height: 190px;
        padding: 16px;
    }

    .scope-race-card h3 {
        margin-top: 34px;
        font-size: 24px;
    }

    .scope-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .hero-visual {
        min-height: 430px;
    }

    .telemetry-card {
        right: 0;
        bottom: 0;
        width: min(360px, 92vw);
    }

    .profile-head,
    .rating-grid {
        grid-template-columns: 1fr;
    }

    .download-section {
        margin: 80px 14px 30px;
        padding: 28px;
    }

    .site-footer {
        align-items: flex-start;
        flex-direction: column;
    }

    .site-footer nav {
        justify-content: flex-start;
    }

    .legal-content {
        padding: 22px;
    }
}

@media (max-width: 920px) {
    .feature-points {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .site-header {
        width: calc(100% - 20px);
        min-height: 58px;
        margin-top: 10px;
    }

    .brand {
        font-size: 15px;
    }

    h1 {
        font-size: 42px;
    }

    .feature-section-race h2 {
        font-size: 32px;
    }

    .hero-lede,
    .section-copy p,
    .download-section p {
        font-size: 16px;
    }

    .feature-section-race {
        padding-top: 58px;
        gap: 16px;
    }

    .feature-section-race .eyebrow {
        margin-bottom: 12px;
    }

    .feature-points h3 {
        font-size: 14px;
    }

    .feature-points p,
    .scope-list p {
        font-size: 12px;
        line-height: 1.42;
    }

    .scope-head {
        align-items: flex-start;
        flex-direction: column;
        gap: 4px;
        margin-bottom: 10px;
    }

    .scope-race-card {
        min-height: 170px;
    }

    .scope-race-card h3 {
        font-size: 22px;
    }

    .scope-race-card p {
        font-size: 13px;
    }

    .hero-grid {
        display: grid;
    }

    .hero-copy {
        position: relative;
        z-index: 2;
    }

    .hero-visual {
        min-height: 390px;
    }

    .store-row,
    .store-button {
        width: 100%;
    }

    .hero-race-preview,
    .hero-track-preview,
    .telemetry-card {
        position: relative;
        inset: auto;
        width: 100%;
        transform: none;
    }

    .hero-race-preview {
        min-height: 245px;
        padding: 18px;
    }

    .hero-race-preview .ssr-race-meta {
        position: static;
        margin-top: 16px;
    }

    .hero-preview-board {
        display: grid;
        gap: 12px;
        min-height: 0;
    }

    .hero-track-preview {
        height: 190px;
    }

    .telemetry-card {
        display: block;
    }

    .download-section {
        width: auto;
    }

}
