/* Landing pages: same dark theme, red-to-orange accent and card style as the
   home page of the main app. */
:root {
    --bg: #0a0a0a;
    --bg-alt: #111111;
    --panel: rgba(23, 23, 23, 0.7);
    --border: rgba(255, 255, 255, 0.08);
    --text: #ffffff;
    --muted: #a3a3a3;
    --accent: #dc2626;
    --accent-hover: #b91c1c;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    line-height: 1.55;
}

a { color: inherit; }
img { display: block; max-width: 100%; }

.wrap { max-width: 1080px; margin: 0 auto; padding-left: 20px; padding-right: 20px; }

/* Hero */
.hero {
    position: relative;
    min-height: 640px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* The photo fills the right two thirds and fades out towards the headline. */
.hero-photo {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 68%;
    background-size: cover;
    background-position: center;
    -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 45%);
    mask-image: linear-gradient(90deg, transparent 0%, #000 45%);
}

.hero-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(10, 10, 10, 0.45) 0%, rgba(10, 10, 10, 0) 25%, rgba(10, 10, 10, 0) 75%, var(--bg) 100%);
}

/* Narrow screens: the photo sits behind the text, dimmed, under a darker shade so it does not compete
   with the text. */
@media (max-width: 820px) {
    .hero-photo { width: 100%; opacity: 0.4; -webkit-mask-image: none; mask-image: none; }
    .hero-shade { background: linear-gradient(180deg, rgba(10, 10, 10, 0.6) 0%, rgba(10, 10, 10, 0.35) 25%, rgba(10, 10, 10, 0.35) 75%, var(--bg) 100%); }
}

/* Room for the fixed header (.bar). */
.hero { padding-top: 64px; }

.brand { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; font-size: 1.3rem; letter-spacing: -0.02em; }
/* The helmet mark beside the name: its visor is a hole, so it shows whatever is behind the header. */
.brand img { width: 1.45em; height: 1.45em; flex: none; }
/* Language switch: a small segmented control, the current language filled in. */
.seg { display: inline-flex; padding: 3px; background: rgba(10, 10, 10, 0.55); border: 1px solid rgba(255, 255, 255, 0.16); border-radius: 999px; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.seg a { min-width: 34px; padding: 5px 9px; border-radius: 999px; color: #b5b5b5; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.04em; line-height: 1.2; text-align: center; text-decoration: none; transition: color 0.15s, background 0.15s; }
.seg a:hover { color: #fff; background: rgba(255, 255, 255, 0.08); }
.seg a[aria-current] { background: var(--accent); color: #fff; cursor: default; }

.hero-body {
    position: relative;
    width: 100%;
    margin-top: auto;
    margin-bottom: auto;
    padding-top: 40px;
    padding-bottom: 72px;
}

.eyebrow {
    margin: 0 0 14px;
    color: #ef4444;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

h1, .hero-h1 {
    margin: 0 0 20px;
    max-width: 640px;
    font-size: clamp(2.2rem, 5.5vw, 3.75rem);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

/* The hero's two text boxes are grid cells. A script in the page (render.mjs,
   heroScript) briefly adds the text in all four languages to each cell, as
   unseen items sharing the cell, to give it the height of its tallest language;
   switching language then moves nothing. */
.hero-stack { display: grid; }
.hero-stack > * { grid-area: 1 / 1; min-width: 0; }
.hero-ghost { visibility: hidden; pointer-events: none; -webkit-user-select: none; user-select: none; }

/* The common page (render.mjs, audience 'home'): the hero holds the text and the photo of both sides in
   the same place, and a switch above the headline picks which one shows (home.js). */
.hero-photo { transition: opacity 0.35s; }
.hero-photo.is-off { opacity: 0; }
.hero-text.is-off { visibility: hidden; pointer-events: none; }
.pick { display: inline-flex; max-width: 100%; margin: 0 0 26px; padding: 4px; background: rgba(10, 10, 10, 0.55); border: 1px solid rgba(255, 255, 255, 0.16); border-radius: 999px; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.pick button { flex: 1 1 0; padding: 10px 22px; border: 0; border-radius: 999px; background: transparent; color: #cfcfcf; font: inherit; font-size: 0.98rem; font-weight: 700; white-space: nowrap; cursor: pointer; transition: color 0.15s, background 0.15s; }
.pick button:hover { color: #fff; background: rgba(255, 255, 255, 0.08); }
.pick button[aria-pressed="true"] { background: var(--accent); color: #fff; cursor: default; }
.shared-defs { position: absolute; }
/* Only one headline is the <h1>; the other side's, and the sizing copies, are <p> and must weigh the same. */
p.hero-h1 { font-weight: bold; }
@media (max-width: 480px) {
    .pick { display: flex; }
    .pick button { padding: 10px 8px; font-size: 0.92rem; }
}


.grad {
    background: linear-gradient(90deg, #ef4444, #ea580c);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.h2-line { display: block; }

.sub { margin: 0 0 8px; max-width: 520px; color: #d4d4d4; font-size: 1.15rem; }

.cta {
    display: inline-block;
    margin-top: 22px;
    padding: 15px 30px;
    border: 0;
    border-radius: 12px;
    background: var(--accent);
    box-shadow: 0 0 24px rgba(220, 38, 38, 0.35);
    color: #fff;
    font: inherit;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s, box-shadow 0.15s;
}

.cta:hover { background: var(--accent-hover); box-shadow: 0 0 32px rgba(220, 38, 38, 0.5); }
.cta:disabled { opacity: 0.6; cursor: default; }

/* The header: fixed at the top of the screen with the brand, the language
   switch and the Join button. Clear while it sits over the hero; form.js adds
   .is-scrolled once the page has moved, and .is-listed for someone already on
   the list (no Join button then). */
.bar { position: fixed; top: 0; left: 0; right: 0; z-index: 50; border-bottom: 1px solid transparent; transition: background 0.25s, border-color 0.25s; }
.bar.is-scrolled { background: rgba(10, 10, 10, 0.88); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-bottom-color: var(--border); }
.bar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 12px; padding-bottom: 12px; }
.bar-ctrl { display: flex; align-items: center; gap: 12px; }
.bar .cta { margin: 0; padding: 9px 18px; font-size: 0.92rem; box-shadow: none; white-space: nowrap; }
.bar.is-listed .cta { display: none; }
/* Jumping to the signup leaves room for the header. */
#signup { scroll-margin-top: 56px; }
@media (max-width: 520px) {
    .bar .wrap { gap: 8px; }
    .bar .brand { font-size: 1.1rem; }
    .bar-ctrl { gap: 8px; }
    .bar .cta { padding: 8px 12px; font-size: 0.85rem; }
    .seg a { min-width: 28px; padding: 5px 6px; }
}

/* Sections */
.section { padding: 72px 0; }
.section.alt { background: var(--bg-alt); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

h2 { margin: 0 0 12px; font-size: clamp(1.6rem, 4vw, 2.25rem); letter-spacing: -0.02em; line-height: 1.15; }
h3 { margin: 0 0 8px; font-size: 1.15rem; }
.lead { margin: 0 0 32px; color: var(--muted); font-size: 1.1rem; max-width: 640px; }

/* Icon cards */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 24px; }

.card {
    padding: 32px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 24px;
    transition: border-color 0.15s;
}

.card:hover { border-color: rgba(255, 255, 255, 0.18); }
.card p { margin: 0; color: var(--muted); }

.card-head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.card-head h3 { margin: 0; }

.tile {
    width: 48px;
    height: 48px;
    flex: none;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
}

.tile svg { width: 24px; height: 24px; }
.tile-red { background: rgba(239, 68, 68, 0.12); color: #ef4444; }
.tile-blue { background: rgba(59, 130, 246, 0.12); color: #3b82f6; }
.tile-orange { background: rgba(249, 115, 22, 0.12); color: #f97316; }
.tile-green { background: rgba(34, 197, 94, 0.12); color: #22c55e; }

/* How it works: a carousel, example screen above, step text below */
.how-title { text-align: center; }
.how { max-width: 720px; margin: 32px auto 0; }

.how-track {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 24px;
}

.how-track::-webkit-scrollbar { display: none; }
.how-track:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.how-slide { flex: 0 0 100%; min-width: 0; scroll-snap-align: start; display: flex; flex-direction: column; }

.how-stage {
    height: 420px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    background: radial-gradient(circle at 70% 20%, rgba(239, 68, 68, 0.18), transparent 60%), var(--bg-alt);
    border-bottom: 1px solid var(--border);
}

.how-stage > .mock-card { width: 100%; max-width: 340px; }
/* A slide's screen stays hidden until the slide is the active one, so it never
   shows finished and then starts over. */
.how.js .how-slide .mock-card { opacity: 0; transition: opacity 0.2s; }
.how.js .how-slide.is-active .mock-card { opacity: 1; animation: how-in 0.5s ease both; }
@keyframes how-in { from { opacity: 0; transform: translateY(14px) scale(0.98); } }

.how-caption { display: flex; gap: 16px; align-items: flex-start; padding: 24px 28px 28px; }
.how-caption h3 { margin: 0 0 4px; font-size: 1.25rem; }
.how-caption p { margin: 0; color: var(--muted); }

.num {
    flex: none;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: linear-gradient(135deg, #ef4444, #ea580c);
    font-weight: 800;
}

.how-nav { display: flex; align-items: center; justify-content: center; gap: 20px; margin-top: 18px; }
.how:not(.js) .how-nav { display: none; }

.how-arrow {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    color: #d4d4d4;
    cursor: pointer;
    transition: border-color 0.15s, color 0.15s;
}

.how-arrow:hover { border-color: rgba(255, 255, 255, 0.4); color: #fff; }
.how-arrow svg { width: 20px; height: 20px; }

.how-dots { display: flex; align-items: center; gap: 8px; }
.how-dot { width: 12px; height: 12px; padding: 0; overflow: hidden; background: #333; border: 0; border-radius: 999px; cursor: pointer; transition: width 0.3s; }
.how-dot.is-active { width: 40px; }
.how-dot i { display: block; width: 0; height: 100%; background: linear-gradient(90deg, #ef4444, #ea580c); }
.how-dot.is-active i { width: 100%; }
.how.auto .how-dot.is-active i { width: 0; animation: how-fill 5s linear forwards; }
.how.auto:hover .how-dot.is-active i { animation-play-state: paused; }
@keyframes how-fill { to { width: 100%; } }

@media (max-width: 520px) {
    .how-stage { height: 410px; padding: 20px 12px; }
    .how-caption { padding: 20px 20px 24px; }
}

.mock-card { overflow: hidden; background: #171717; border: 1px solid rgba(255, 255, 255, 0.12); border-radius: 20px; box-shadow: 0 24px 48px rgba(0, 0, 0, 0.5); }
.mock-card img { width: 100%; height: 150px; object-fit: cover; }
.mock-body { padding: 20px; }
.mock-body p { margin: 0; }
.mock-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: 1.1rem; }
.mock-price { font-weight: 800; white-space: nowrap; }
.mock-price small { color: var(--muted); font-weight: 400; }
.mock-muted { color: var(--muted); font-size: 0.9rem; }
.mock-label { margin-bottom: 14px !important; color: #ef4444; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; }
.mock-line { margin-top: 14px !important; padding-top: 14px; border-top: 1px solid var(--border); color: #d4d4d4; }

/* Class switch on the listing: two chips, one on. */
.mock-classes { display: flex; gap: 6px; margin-top: 12px; padding: 4px; background: #0f0f0f; border: 1px solid var(--border); border-radius: 12px; }
.mock-classes button { flex: 1; padding: 7px 8px; background: transparent; border: 0; border-radius: 9px; color: var(--muted); font: inherit; font-size: 0.85rem; font-weight: 700; cursor: pointer; transition: background 0.2s, color 0.2s; -webkit-tap-highlight-color: transparent; }
.mock-classes button.is-on { background: linear-gradient(135deg, #ef4444, #ea580c); color: #fff; }
.mock-split { display: flex; justify-content: space-between; gap: 12px; }
.mock-split strong { color: #fff; }

/* The class of a kart, as a red chip. */
.mock-class { flex: none; display: inline-block; padding: 4px 10px; border-radius: 999px; background: linear-gradient(135deg, #ef4444, #ea580c); color: #fff; font-size: 0.78rem; font-weight: 700; line-height: 1.3; white-space: nowrap; }

/* Renters, step 1: two karts side by side, each one a button. */
.mock-pick { width: 100%; max-width: 400px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.mock-kart { display: block; padding: 0; color: inherit; font: inherit; text-align: left; cursor: pointer; transition: border-color 0.2s, box-shadow 0.2s, opacity 0.2s; -webkit-tap-highlight-color: transparent; }
.mock-kart img { display: block; height: 120px; }
.mock-kart .mock-body { display: block; padding: 14px; }
.mock-kart strong { display: block; font-size: 1rem; }
.mock-kart .mock-muted { display: block; }
.mock-kart .mock-class { margin-top: 12px; }
.mock-kart:hover { border-color: rgba(255, 255, 255, 0.35); }
.mock-kart.is-on { border-color: #ef4444; box-shadow: 0 0 0 1px #ef4444, 0 24px 48px rgba(0, 0, 0, 0.5); }
@media (max-width: 520px) {
    .mock-pick { gap: 8px; }
    .mock-kart img { height: 104px; }
    .mock-kart .mock-body { padding: 12px 10px; }
    .mock-kart strong { font-size: 0.92rem; }
}

.mock-person { display: flex; gap: 12px; align-items: center; }
.avatar { flex: none; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: rgba(59, 130, 246, 0.15); color: #3b82f6; font-weight: 800; }

.mock-actions { position: relative; display: flex; gap: 10px; margin-top: 16px; }
.mock-actions button { flex: 1; padding: 10px; border: 0; border-radius: 10px; font: inherit; font-weight: 700; text-align: center; cursor: pointer; }
.btn-yes { background: var(--accent); color: #fff; animation: how-pulse 1.8s ease-in-out infinite; }
.mock-actions .btn-no { background: transparent; border: 1px solid #333; color: var(--muted); }
.mock-actions .btn-no:hover { border-color: #666; color: #fff; }
/* The answer: grows out of the clicked button until it covers both. */
.mock-result { position: absolute; top: 0; right: 0; bottom: 0; left: 0; display: flex; align-items: center; justify-content: center; border-radius: 10px; font-weight: 700; visibility: hidden; z-index: 1; }
.mock-actions button { transition: opacity 0.35s; -webkit-tap-highlight-color: transparent; }
.mock-actions[data-state] .btn-yes { animation: none; }
/* Once answered, both buttons go: the chosen one at once, since the answer starts
   on top of it (otherwise its edge shows around the answer), the other one fades. */
.mock-actions[data-state] button { opacity: 0; visibility: hidden; pointer-events: none; transition: none; }
.mock-actions[data-state="approve"] .btn-no, .mock-actions[data-state="decline"] .btn-yes { transition: opacity 0.35s, visibility 0s 0.35s; }
.result-yes { background: #182c20; color: #22c55e; }
.result-no { background: #311c1c; color: #ef4444; }
.mock-actions[data-state="approve"] .result-yes { visibility: visible; animation: result-yes 0.9s ease-in-out both; }
.mock-actions[data-state="decline"] .result-no { visibility: visible; animation: result-no 0.9s ease-in-out both; }
@keyframes result-yes { from { clip-path: inset(0 52% 0 0 round 10px); } to { clip-path: inset(0 0 0 0 round 10px); } }
@keyframes result-no { from { clip-path: inset(0 0 0 52% round 10px); } to { clip-path: inset(0 0 0 0 round 10px); } }
@keyframes how-pulse { 50% { box-shadow: 0 0 22px rgba(220, 38, 38, 0.6); } }

.mock-ticks { list-style: none; margin: 0; padding: 0; }
.mock-ticks li { display: flex; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--border); }
.mock-ticks li:first-child { border-top: 0; padding-top: 0; }
.mock-ticks svg { flex: none; width: 22px; height: 22px; padding: 4px; border-radius: 50%; background: rgba(34, 197, 94, 0.15); color: #22c55e; }
.how.js .is-active .mock-ticks li { animation: how-in 0.4s ease both; }
.how.js .is-active .mock-ticks li:nth-child(2) { animation-delay: 0.35s; }
.how.js .is-active .mock-ticks li:nth-child(3) { animation-delay: 0.7s; }
.mock-done { position: relative; overflow: hidden; margin-top: 14px !important; padding: 10px; border-radius: 10px; background: rgba(34, 197, 94, 0.12); color: #22c55e; text-align: center; font-weight: 700; }
.done-fill { position: absolute; top: 0; bottom: 0; left: 0; width: 0; background: rgba(34, 197, 94, 0.3); }
.done-text { position: relative; }
.done-icon { position: absolute; top: 0; right: 0; bottom: 0; left: 0; display: flex; align-items: center; justify-content: center; opacity: 0; color: #fff; }
.done-icon svg { width: 22px; height: 22px; }
.done-art { position: relative; display: flex; }
.done-wheel svg { stroke-width: 2.75; animation: done-spin 0.45s linear infinite; }
.done-icon i { position: absolute; top: 50%; left: 50%; opacity: 0; }
.ray { width: 2px; height: 7px; margin: -3.5px 0 0 -1px; border-radius: 2px; background: #fff; }
.ray:nth-of-type(1) { --a: 30deg; }
.ray:nth-of-type(2) { --a: 90deg; }
.ray:nth-of-type(3) { --a: 150deg; }
.ray:nth-of-type(4) { --a: 210deg; }
.ray:nth-of-type(5) { --a: 270deg; }
.ray:nth-of-type(6) { --a: 330deg; }
.puff { width: 8px; height: 8px; margin: 0 0 0 -19px; border-radius: 50%; background: rgba(255, 255, 255, 0.8); }
/* The closing button: appears after the ticks, fills up like a loading bar,
   turns solid and shows its icon, then goes back to its text. */
.how.js .is-active .mock-done { animation: how-in 0.4s ease 1.05s both, done-solid 1.6s ease 2.9s; }
.how.js .is-active .done-fill { animation: done-load 1.4s ease-in-out 1.5s both; }
.how.js .is-active .done-text { animation: done-text 1.6s ease 2.9s; }
.how.js .is-active .done-icon { animation: done-icon 1.6s ease 2.9s; }
@keyframes done-load { 0% { width: 0; opacity: 1; } 90% { width: 100%; opacity: 1; } 100% { width: 100%; opacity: 0; } }
@keyframes done-solid { 12%, 85% { background: #16a34a; } }
@keyframes done-text { 12%, 85% { opacity: 0; } }
@keyframes done-icon { 0%, 100% { opacity: 0; transform: scale(0.6); } 12%, 85% { opacity: 1; transform: scale(1); } }
@keyframes done-spin { to { transform: rotate(360deg); } }
/* Flag: pops in, six rays burst outwards. */
.how.js .is-active .done-flag .done-art { animation: done-pop 0.5s ease-out 3.05s both; }
.how.js .is-active .ray { animation: done-ray 0.65s ease-out 3.2s both; }
@keyframes done-pop { 0% { transform: scale(0.3); } 55% { transform: scale(1.4); } 100% { transform: scale(1); } }
@keyframes done-ray {
    0% { opacity: 0; transform: rotate(var(--a)) translateY(-9px) scaleY(0.4); }
    30% { opacity: 1; }
    100% { opacity: 0; transform: rotate(var(--a)) translateY(-19px) scaleY(1); }
}
/* Wheel: pulls away to the right, smoke puffs drift off to the left. */
.how.js .is-active .done-wheel .done-art { animation: done-drive 1.1s cubic-bezier(0.2, 0.8, 0.3, 1) 3.1s both; }
.how.js .is-active .puff { animation: done-puff 0.7s ease-out both; }
.how.js .is-active .puff:nth-of-type(1) { animation-delay: 3.1s; }
.how.js .is-active .puff:nth-of-type(2) { animation-delay: 3.3s; }
.how.js .is-active .puff:nth-of-type(3) { animation-delay: 3.5s; }
.how.js .is-active .puff:nth-of-type(4) { animation-delay: 3.7s; }
@keyframes done-drive { from { transform: translateX(-4px); } to { transform: translateX(12px); } }
@keyframes done-puff {
    0% { opacity: 0; transform: translate(0, 0) scale(0.4); }
    20% { opacity: 0.85; }
    100% { opacity: 0; transform: translate(-16px, -8px) scale(1.9); }
}

@media (prefers-reduced-motion: reduce) {
    .how * { animation: none !important; }
}

/* Rental kart vs race kart: a half-and-half blueprint with the specs on each side */
.bp { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 380px) minmax(0, 1fr); gap: 44px; align-items: stretch; }

.bp-art {
    padding: 8px;
    background: radial-gradient(circle at 75% 30%, rgba(239, 68, 68, 0.14), transparent 55%), #0c0c0c;
    border: 1px solid var(--border);
    border-radius: 24px;
}

.bp-svg { display: block; width: 100%; height: auto; }
.bp-svg .r, .bp-svg .g { fill: none; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.bp-svg .r { stroke: #8593a3; }
/* Rods and linkages: thinner than bodywork and tyres. */
.bp-svg .t { stroke-width: 1.5; }
/* Frame tubes: a wide stroke in the line colour and a narrower one in the fill
   colour on top, which leaves two parallel lines (blueprint.mjs#tubes). `s` is
   a lighter tube, `ax` the axle, `p` a pedal. The fill colours are the line
   colour at 24% over the panel. */
.bp-svg .tube { stroke-width: 8.4; stroke-linecap: butt; }
.bp-svg .tube.s { stroke-width: 6.4; }
.bp-svg .tube.ax { stroke-width: 12.4; }
.bp-svg .tube.p { stroke-width: 4.8; stroke-linecap: round; }
.bp-svg .ri, .bp-svg .gi { fill: none; stroke-width: 4.4; stroke-linecap: butt; stroke-linejoin: round; }
.bp-svg .ri { stroke: #292c30; }
.bp-svg .gi { stroke: #421c13; }
.bp-svg .ri.s, .bp-svg .gi.s { stroke-width: 2.8; }
.bp-svg .ri.ax, .bp-svg .gi.ax { stroke-width: 8.4; }
.bp-svg .ri.p, .bp-svg .gi.p { stroke-width: 2; stroke-linecap: round; }
/* Plates: a part's shape in the panel's own background, painted under the part
   to hide what it covers (blueprint.mjs#plates). */
.bp-svg .plr { fill: url(#bp-plate-r); stroke: none; }
.bp-svg .plg { fill: url(#bp-plate-g); stroke: none; }
.bp-svg .h { fill: none; stroke: #8593a3; stroke-width: 1.6; stroke-dasharray: 5 5; opacity: 0.7; }
.bp-svg .g { stroke: url(#bp-grad); }
/* The glow of the race half is a picture placed under the lines, made once by
   tools/blueprint-glow.py. A live blur filter had to be recomputed by phones
   over the whole drawing at full screen resolution, which made the page slow. */
/* The other way to glow (GLOW = 'lines' in blueprint.mjs): a live blur per line. */
.bp-svg.glow-lines .g { filter: drop-shadow(0 0 5px rgba(239, 68, 68, 0.55)); }
.bp-svg .bp-glow-img { pointer-events: none; }
.bp.js .bp-svg .bp-glow-img { opacity: 0; }
/* It fades in only once the lines are drawn (they finish after 2.1 s), so the
   phone never draws lines and blends the glow in the same frames. */
.bp.js.in .bp-svg .bp-glow-img { opacity: 1; transition: opacity 0.6s ease 2.15s; }
/* A shape that is filled only: its outline is drawn by separate paths. */
.bp-svg .ns { stroke: none; }
.bp-svg .r.fill { fill: rgba(133, 147, 163, 0.14); }
.bp-svg .g.fill { fill: rgba(239, 68, 68, 0.16); }
.bp-axis { fill: none; stroke: rgba(255, 255, 255, 0.3); stroke-width: 1; stroke-dasharray: 6 6; }
.bp-marks { fill: none; stroke: rgba(255, 255, 255, 0.25); stroke-width: 1; }

/* Drawn in line by line once on screen (reveal.js adds .js, then .in). */
.bp.js .bp-svg .r, .bp.js .bp-svg .g, .bp.js .bp-svg .ri, .bp.js .bp-svg .gi { stroke-dasharray: 1; stroke-dashoffset: 1; fill-opacity: 0; }
.bp.js .bp-svg .h { opacity: 0; }
.bp.js.in .bp-svg .h { opacity: 0.7; transition: opacity 0.6s ease 1.4s; }
.bp.js.in .bp-svg .r, .bp.js.in .bp-svg .ri { animation: bp-draw 1.6s ease-in-out forwards; }
.bp.js.in .bp-svg .g, .bp.js.in .bp-svg .gi { animation: bp-draw 1.6s ease-in-out 0.5s forwards; }
@keyframes bp-draw { 70% { fill-opacity: 0; } 100% { stroke-dashoffset: 0; fill-opacity: 1; } }

.bp-col { display: flex; flex-direction: column; }
.bp-col h3 { margin: 0 0 8px; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; }
.bp-rental { text-align: right; }
.bp-rental h3 { color: #8593a3; }
.bp-race h3 { color: #ef4444; }
.bp-col dl { flex: 1; margin: 0; display: flex; flex-direction: column; justify-content: space-around; }

.bp-spec { position: relative; padding: 14px 0; }
.bp-spec dt { color: var(--muted); font-size: 0.85rem; }
.bp-spec dd { margin: 2px 0 0; font-size: clamp(1.5rem, 2.6vw, 2.1rem); font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; }
.bp-spec small { display: block; margin-top: 4px; color: var(--muted); font-size: 0.9rem; font-weight: 400; letter-spacing: 0; }
.bp-rental dd { color: #aab4c0; }
.bp-race dd { background: linear-gradient(90deg, #ef4444, #ea580c); -webkit-background-clip: text; background-clip: text; color: transparent; }
.bp-race small { -webkit-text-fill-color: var(--muted); }

/* Leader line from each spec towards the drawing. */
.bp-spec::after { content: ""; position: absolute; top: 50%; width: 28px; height: 1px; }
.bp-rental .bp-spec::after { right: -36px; background: linear-gradient(90deg, transparent, #8593a3); }
.bp-race .bp-spec::after { left: -36px; background: linear-gradient(90deg, #ef4444, transparent); }

@media (max-width: 820px) {
    .bp { grid-template-columns: 1fr 1fr; gap: 20px 16px; }
    .bp-art { grid-column: 1 / -1; grid-row: 1; width: 100%; max-width: 360px; margin: 0 auto; }
    .bp-rental { text-align: left; }
    .bp-spec { padding: 10px 0; border-top: 1px solid var(--border); }
    .bp-spec::after { display: none; }
    .bp-spec dd { font-size: 1.35rem; }
}

/* Your day at the track: outline, timeline, two lists */
.day { display: grid; grid-template-columns: minmax(260px, 380px) minmax(0, 1fr); gap: 48px; align-items: center; }

.day-track {
    margin: 0;
    padding: 12px 12px 18px;
    background: radial-gradient(circle at 70% 25%, rgba(239, 68, 68, 0.14), transparent 60%), #0c0c0c;
    border: 1px solid var(--border);
    border-radius: 24px;
    text-align: center;
}

.day-track svg { display: block; width: 100%; height: auto; }
.trk-bed { fill: none; stroke: rgba(255, 255, 255, 0.08); stroke-width: 11; stroke-linejoin: round; }
.trk-line { fill: none; stroke: url(#trk-grad); stroke-width: 4; stroke-linejoin: round; stroke-linecap: round; filter: drop-shadow(0 0 6px rgba(239, 68, 68, 0.6)); }
/* Start line: a thin line out of the track with a triangle pointing the lap
   direction, in the colour of the track. */
.trk-start { filter: drop-shadow(0 0 4px rgba(239, 68, 68, 0.6)); }
.trk-flag { fill: none; stroke: #f04e23; stroke-width: 1.6; stroke-linecap: round; }
.trk-arrow { fill: #f04e23; stroke: #f04e23; stroke-width: 1; stroke-linejoin: round; }
.day-track figcaption strong { display: block; font-size: 1.2rem; }
.day-track figcaption span { color: var(--muted); font-size: 0.95rem; }

/* The lap draws itself once on screen (reveal.js adds .js, then .in): the start
   line appears, then the line runs one lap from it in the driving direction. It
   is a dash growing from nothing to the whole path; --from and --to are its
   offsets, worked out per track by lapDraw in render.mjs. */
.day.js .trk-line { visibility: hidden; stroke-dasharray: 0 1; stroke-dashoffset: var(--from); }
.day.js.in .trk-line { visibility: visible; animation: trk-draw 2.6s ease-in-out 0.5s both; }
@keyframes trk-draw { to { stroke-dasharray: 1 0; stroke-dashoffset: var(--to); } }
.day.js .trk-start { opacity: 0; }
.day.js.in .trk-start { opacity: 1; transition: opacity 0.4s ease; }

.day-steps { list-style: none; margin: 0; padding: 0; }
.day-steps li { position: relative; display: flex; gap: 18px; padding-bottom: 26px; }
.day-steps li:last-child { padding-bottom: 0; }
.day-steps li::before { content: ""; position: absolute; top: 40px; bottom: 0; left: 19px; width: 2px; background: linear-gradient(180deg, rgba(239, 68, 68, 0.6), rgba(239, 68, 68, 0.1)); }
.day-steps li:last-child::before { display: none; }
.day-steps h3 { margin: 6px 0 4px; }
.day-steps p { margin: 0; color: var(--muted); }

.day-lists { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; margin-top: 44px; }
.day-list { padding: 24px 26px; background: var(--panel); border: 1px solid var(--border); border-radius: 20px; }
.day-list h3 { margin: 0; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: #ef4444; }
.day-list .ticks { margin-top: 16px; }
.day-list .ticks li:last-child { margin-bottom: 0; }
.ticks-plus svg { color: #f97316; }

@media (max-width: 820px) {
    .day { grid-template-columns: 1fr; gap: 32px; }
    .day-track { width: 100%; max-width: 340px; margin: 0 auto; }
}

/* Straight answers */
.faq-wrap { max-width: 820px; }
.faq { margin-top: 24px; }
.faq details { border-top: 1px solid var(--border); }
.faq details:last-child { border-bottom: 1px solid var(--border); }
.faq summary { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 20px 0; font-size: 1.15rem; font-weight: 700; cursor: pointer; list-style: none; -webkit-tap-highlight-color: transparent; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary svg { flex: none; width: 22px; height: 22px; color: #ef4444; transition: transform 0.2s; }
.faq details[open] summary svg { transform: rotate(180deg); }
.faq summary:hover span { color: #fff; text-decoration: underline; text-decoration-color: rgba(239, 68, 68, 0.6); text-underline-offset: 4px; }
.faq p { margin: 0 0 22px; max-width: 700px; color: #d4d4d4; }

/* Tick lists */
.ticks { list-style: none; margin: 20px 0 0; padding: 0; }
.ticks li { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 16px; color: #d4d4d4; font-size: 1.05rem; }
.ticks svg { flex: none; width: 22px; height: 22px; margin-top: 3px; color: #22c55e; }
.ticks strong { color: #fff; }

/* Owners: one booking, linked to what it pays for, then the day rate */
.flow { display: grid; grid-template-columns: minmax(250px, 300px) auto minmax(0, 1fr); align-items: center; }

/* The booking, drawn as a ticket. */
.flow-ticket {
    padding: 22px;
    background: #171717;
    border: 1px solid rgba(239, 68, 68, 0.45);
    border-radius: 20px;
    box-shadow: 0 0 40px rgba(220, 38, 38, 0.14), 0 24px 48px rgba(0, 0, 0, 0.45);
}

.flow-ticket p { margin: 0; }
.flow-status { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 16px !important; padding: 10px; border-radius: 10px; background: rgba(34, 197, 94, 0.12); color: #22c55e; font-weight: 700; }
.flow-status svg { width: 18px; height: 18px; stroke-width: 3; }

/* The link between the two: a line, a label, an arrow head. */
.flow-link { display: flex; align-items: center; min-width: 150px; color: #ea580c; }
.flow-link::before, .flow-link::after { content: ""; flex: 1; min-width: 14px; height: 2px; }
.flow-link::before { background: linear-gradient(90deg, rgba(239, 68, 68, 0.2), #ef4444); }
.flow-link::after { background: linear-gradient(90deg, #ef4444, #ea580c); }
.flow-link span { padding: 5px 12px; border: 1px solid rgba(239, 68, 68, 0.6); border-radius: 999px; color: #ef4444; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; white-space: nowrap; }
.flow-link svg { order: 3; flex: none; width: 20px; height: 20px; margin-left: -8px; stroke-width: 2.5; }

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

.pay {
    position: relative;
    display: flex;
    gap: 14px;
    align-items: flex-start;
    padding: 18px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 20px;
}

.pay .tile { flex: none; width: 44px; height: 44px; border-radius: 14px; }
.pay h3 { margin: 0 0 4px; padding-right: 30px; font-size: 1.05rem; }
.pay p { margin: 0; color: var(--muted); font-size: 0.95rem; }

.pay-tick {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
}

.pay-tick svg { width: 14px; height: 14px; stroke-width: 3; }

/* "or" between the items: one badge where the four cards meet, or one between
   each pair when they are stacked. */
.pay-or {
    position: absolute;
    top: -7px;
    left: -7px;
    z-index: 1;
    display: none;
    padding: 5px 12px;
    transform: translate(-50%, -50%);
    background: var(--bg-alt);
    border: 1px solid rgba(239, 68, 68, 0.6);
    border-radius: 999px;
    color: #ef4444;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}
.pay:nth-child(4) .pay-or { display: block; }

/* Ticked off one after another once on screen (reveal.js adds .js, then .in). */
.flow.js .pay-tick { opacity: 0; transform: scale(0.3); }
.flow.js.in .pay-tick { animation: pay-pop 0.45s cubic-bezier(0.3, 1.6, 0.5, 1) forwards; }
.flow.js.in .pay:nth-child(1) .pay-tick { animation-delay: 0.3s; }
.flow.js.in .pay:nth-child(2) .pay-tick { animation-delay: 0.65s; }
.flow.js.in .pay:nth-child(3) .pay-tick { animation-delay: 1s; }
.flow.js.in .pay:nth-child(4) .pay-tick { animation-delay: 1.35s; }
@keyframes pay-pop { to { opacity: 1; transform: scale(1); } }

/* Narrow screens: the booking on top, the link pointing down, the items below. */
@media (max-width: 900px) {
    .flow { grid-template-columns: 1fr; justify-items: center; }
    .flow-ticket { width: 100%; max-width: 340px; }
    .flow-link { flex-direction: column; min-width: 0; height: 96px; }
    .flow-link::before, .flow-link::after { width: 2px; min-width: 0; height: auto; }
    .flow-link::before { background: linear-gradient(180deg, rgba(239, 68, 68, 0.2), #ef4444); }
    .flow-link::after { background: linear-gradient(180deg, #ef4444, #ea580c); }
    .flow-link svg { margin: -8px 0 0; transform: rotate(90deg); }
    .pays { width: 100%; }
}

@media (max-width: 560px) {
    .pays { grid-template-columns: 1fr; }
    .pay-or { display: block; left: 50%; }
}

.earn { margin-top: 56px; text-align: center; }
.earn-estimate { margin: 0 0 4px; color: var(--muted); font-size: 1.1rem; }
.earn-big {
    margin: 0;
    font-size: clamp(2.6rem, 9vw, 5rem);
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1.1;
    background: linear-gradient(90deg, #ef4444, #ea580c);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.earn-label { margin: 8px 0 0; font-size: 1.2rem; }

/* Signup form */
.signup {
    max-width: 640px;
    margin: 0 auto;
    padding: 36px 28px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 24px;
}

.timing { margin: 0 0 14px; color: var(--muted); }
/* The reward for joining now, and its conditions folded away under the form. */
.reward { margin: 0 0 22px; color: #d4d4d4; }
.reward span { color: #ef4444; font-weight: 700; }
.hero-reward { max-width: 460px; margin: 18px 0 0; font-size: 0.95rem; }
.signup.is-listed > .reward { display: none; }
.terms { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--border); color: var(--muted); font-size: 0.88rem; }
.terms summary { cursor: pointer; color: #d4d4d4; font-weight: 700; }
.terms ul { margin: 12px 0 0; padding-left: 18px; }
.terms li { margin-bottom: 6px; }

.field { display: block; margin-bottom: 16px; }
.field span { display: block; margin-bottom: 6px; color: var(--muted); font-size: 0.9rem; }

input[type="text"], input[type="email"], input[type="number"], select, textarea {
    width: 100%;
    padding: 12px 14px;
    background: var(--bg);
    border: 1px solid #262626;
    border-radius: 12px;
    color: var(--text);
    font: inherit;
}

input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); }
textarea { resize: vertical; }


.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.form-error { margin: 12px 0 0; color: #f87171; }

/* Step 1: the email and its button on one line. */
.join { display: flex; gap: 10px; }
.join input { flex: 1; min-width: 0; }
.join input[name="firstName"] { flex: 0 1 200px; }
.join .cta { flex: none; margin-top: 0; padding: 12px 24px; white-space: nowrap; }
.next { margin: 14px 0 0; color: #737373; font-size: 0.85rem; }
@media (max-width: 520px) {
    .join { flex-direction: column; }
    .join input, .join input[name="firstName"] { flex: none; }
    .join .cta { padding: 14px 24px; }
}

/* Step 2, shown once the email is in: optional questions answered with chips. */
.listed-title { display: flex; align-items: center; gap: 12px; margin: 0 0 8px; font-size: 1.3rem; }
.listed-title svg { flex: none; width: 28px; height: 28px; padding: 5px; border-radius: 50%; background: rgba(34, 197, 94, 0.15); color: #22c55e; }
.listed:not([hidden]) { animation: listed-in 0.4s ease both; }
@keyframes listed-in { from { opacity: 0; transform: translateY(10px); } }
.signup.is-listed > h2, .signup.is-listed > .timing { display: none; }
.listed-text { margin: 0 0 24px; color: var(--muted); }
.q { margin: 0 0 20px; padding: 0; border: 0; min-width: 0; }
.q legend { margin-bottom: 10px; padding: 0; font-weight: 700; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.chip input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.chip span { display: block; padding: 9px 16px; background: var(--bg); border: 1px solid #333; border-radius: 999px; color: #d4d4d4; font-size: 0.95rem; transition: background 0.15s, border-color 0.15s, color 0.15s; }
.chip:hover span { border-color: #666; }
.chip input:checked + span { background: linear-gradient(135deg, #ef4444, #ea580c); border-color: transparent; color: #fff; font-weight: 700; }
.chip input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.listed .field span { color: var(--text); font-size: 1rem; font-weight: 700; margin-bottom: 10px; }
.cta-quiet { margin-top: 8px; background: transparent; border: 1px solid rgba(255, 255, 255, 0.25); box-shadow: none; }
.cta-quiet:hover { background: rgba(255, 255, 255, 0.06); border-color: rgba(255, 255, 255, 0.5); box-shadow: none; }
.details-thanks { margin: 8px 0 0; color: var(--muted); }
.details-thanks strong { color: var(--text); }

.share { margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--border); }
.share p { margin: 0 0 14px; color: #d4d4d4; }
.share-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.share-actions button { padding: 10px 18px; background: transparent; border: 1px solid #333; border-radius: 10px; color: var(--text); font: inherit; font-weight: 700; cursor: pointer; transition: border-color 0.15s; }
.share-actions button:hover { border-color: #666; }
.not-you { display: block; margin: 22px 0 0; padding: 0; background: none; border: 0; color: #737373; font: inherit; font-size: 0.85rem; text-decoration: underline; cursor: pointer; }
.not-you:hover { color: var(--text); }

.cross { margin: 28px 0 0; text-align: center; }
.cross a { color: var(--muted); }
.cross a:hover { color: var(--text); }

footer { padding-top: 28px; padding-bottom: 44px; border-top: 1px solid var(--border); color: var(--muted); font-size: 0.85rem; }
footer h2 { margin: 0 0 6px; font-size: 0.9rem; letter-spacing: 0; color: var(--text); }
footer p { margin: 0 0 8px; }
