:root {
  color-scheme: dark;
  --black: #000;
  --ink: #fafafa;
  --ink-2: #c9cfd6;
  --muted: #9aa3ae;
  --faint: #7d858f;
  --line: rgb(255 255 255 / 0.08);
  --line-strong: rgb(255 255 255 / 0.18);
  --cyan: #00a9fe;
  --royal: #0037b0;
  --red: #fd0f21;
  --m: linear-gradient(90deg, var(--cyan), var(--royal) 55%, var(--red));
  --wrap: 1180px;
  --gutter: 24px;
  --radius: 8px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 88px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  overflow-x: clip;
  background: var(--black);
  color: var(--ink);
  font: 400 17px/1.55 'Saira', system-ui, sans-serif;
  font-stretch: 100%;
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
@media (max-width: 600px) { :root { --gutter: 16px; } }

h1, h2, h3 { margin: 0; font-weight: 400; }

/* Header */
.top { position: sticky; top: 0; z-index: 20; background: rgb(0 0 0 / 0.72); -webkit-backdrop-filter: saturate(150%) blur(14px); backdrop-filter: saturate(150%) blur(14px); border-bottom: 1px solid var(--line); }
.top-in { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 68px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; font-weight: 600; font-stretch: 118%; letter-spacing: 0.01em; white-space: nowrap; }
.brand img { width: 36px; height: 36px; }
.nav { display: flex; align-items: center; gap: 26px; font-size: 0.95rem; }
.nav a:not(.btn) { color: var(--muted); text-decoration: none; }
.nav a:not(.btn):hover { color: var(--ink); }
@media (max-width: 900px) { .nav a:not(.btn) { display: none; } }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 15px 24px; border: 0; border-radius: 6px;
  background: var(--ink); color: var(--black);
  font: 600 16px/1 'Saira', system-ui, sans-serif; font-stretch: 112%;
  text-decoration: none; cursor: pointer;
}
.btn:hover { background: var(--cyan); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.6; cursor: progress; }
.btn-small { padding: 11px 16px; font-size: 15px; }
.btn-ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-strong); }
.btn-ghost:hover { background: rgb(255 255 255 / 0.08); box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.4); }

/* Hero */
.hero { padding-top: clamp(40px, 6vw, 80px); }
.hero h1 {
  font-size: clamp(2.3rem, 7.4vw, 6.3rem);
  font-weight: 800; font-style: italic; font-stretch: 125%;
  text-transform: uppercase; line-height: 0.92; letter-spacing: -0.015em;
  /* The logo's M colours across the headline: cyan, royal, red (royal brightened to stay readable on black). */
  /* Italic caps lean past the text box and a clipped background would cut them off ("A" in AND):
     pad the paint area on every side and pull it back with matching margins so the text doesn't move. */
  width: fit-content; padding: 0.06em 0.12em 0.08em 0.12em; margin: -0.06em 0 -0.08em -0.12em;
  background: linear-gradient(100deg, #00a9fe 8%, #2f6bff 48%, #fd0f21 92%);
  -webkit-background-clip: text; background-clip: text;
  color: transparent; -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 28px rgb(0 110 255 / 0.28));
}
@media (forced-colors: active) { .hero h1 { background: none; color: CanvasText; -webkit-text-fill-color: CanvasText; } }
.lede { max-width: 54ch; margin: 30px 0 0; color: var(--ink-2); font-size: clamp(1.06rem, 1.4vw, 1.25rem); }
.actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 36px; }

/* The app, framed as its macOS window, with the logo ring's colours glowing behind it */
.app { position: relative; isolation: isolate; margin: clamp(44px, 5.5vw, 68px) 0 0; }
.app::before {
  content: ''; position: absolute; inset: 8% 3% -6%; z-index: -1;
  background:
    radial-gradient(42% 55% at 16% 55%, rgb(0 169 254 / 0.42), transparent 70%),
    radial-gradient(40% 60% at 50% 70%, rgb(0 55 176 / 0.55), transparent 72%),
    radial-gradient(42% 55% at 86% 55%, rgb(253 15 33 / 0.36), transparent 70%);
  filter: blur(70px);
}
.app-window { overflow: hidden; border-radius: 12px; background: #0e1117; box-shadow: 0 0 0 1px rgb(255 255 255 / 0.14), 0 40px 100px rgb(0 0 0 / 0.75); }
.app-titlebar { position: relative; display: flex; align-items: center; gap: 8px; height: 30px; padding: 0 12px; background: linear-gradient(#2c2e33, #232529); border-bottom: 1px solid rgb(0 0 0 / 0.7); }
.app-titlebar i { width: 12px; height: 12px; border-radius: 50%; background: #ff5f57; }
.app-titlebar i:nth-child(2) { background: #febc2e; }
.app-titlebar i:nth-child(3) { background: #28c840; }
.app-titlebar span { position: absolute; left: 50%; transform: translateX(-50%); color: #c6c9ce; font: 500 13px/1 -apple-system, system-ui, sans-serif; }
.app img { width: 100%; height: auto; }
.app figcaption { margin-top: 18px; color: var(--muted); font-size: 0.95rem; }
@media (max-width: 600px) {
  .app-titlebar { height: 22px; gap: 6px; padding: 0 9px; }
  .app-titlebar i { width: 8px; height: 8px; }
  .app-titlebar span { font-size: 11px; }
}

/* Sections */
.section { padding-top: clamp(88px, 11vw, 144px); }
.section-head h2 { font-size: clamp(2rem, 4.4vw, 3.4rem); font-weight: 700; font-stretch: 118%; line-height: 1.02; letter-spacing: -0.01em; }
.section-head p { max-width: 60ch; margin: 18px 0 0; color: var(--ink-2); font-size: 1.1rem; }

/* Stock to track: one line in the M colours, a stop per build level */
.scale { position: relative; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); margin: 52px 0 0; padding: 26px 0 0; list-style: none; }
.scale::before { content: ''; position: absolute; top: 7px; left: 10%; right: 10%; height: 2px; background: var(--m); }
.scale li { position: relative; padding: 0 4px; text-align: center; color: var(--ink-2); font-size: 0.95rem; font-weight: 600; font-stretch: 110%; line-height: 1.25; }
.scale li::before { content: ''; position: absolute; top: -24px; left: 50%; width: 12px; height: 12px; margin-left: -6px; border-radius: 50%; background: var(--black); box-shadow: 0 0 0 2px var(--ink); }
@media (max-width: 600px) { .scale li { font-size: 0.8rem; } }

.engines { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; margin-top: 48px; }
@media (max-width: 1100px) { .engines { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 760px) { .engines { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .engines { grid-template-columns: 1fr; } }
.engine { display: flex; flex-direction: column; gap: 16px; padding: 22px 20px 20px; border-radius: var(--radius); background: linear-gradient(180deg, rgb(255 255 255 / 0.045), rgb(255 255 255 / 0.012)); box-shadow: inset 0 0 0 1px var(--line); }
.engine-top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.engine .code { font-size: 2.3rem; }
.engine .from { color: var(--muted); font-size: 0.9rem; white-space: nowrap; font-variant-numeric: tabular-nums; }
.models { margin: 0; padding: 0; list-style: none; color: var(--ink-2); font-size: 0.95rem; line-height: 1.5; }
.models li { padding: 3px 0; }
.engine-note { margin: 0; color: var(--muted); font-size: 0.88rem; line-height: 1.45; }
.pick { align-self: flex-start; margin-top: auto; padding: 10px 14px; border: 0; border-radius: 6px; background: rgb(255 255 255 / 0.08); color: var(--ink); font: 600 0.9rem/1 'Saira', system-ui, sans-serif; font-stretch: 110%; cursor: pointer; }
.pick:hover { background: var(--ink); color: var(--black); }

/* Unlocks */
.unlock {
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 64px); align-items: center;
  padding: clamp(28px, 5vw, 56px); border-radius: 14px;
  background:
    radial-gradient(90% 120% at 0% 0%, rgb(0 169 254 / 0.13), transparent 55%),
    radial-gradient(90% 120% at 100% 100%, rgb(253 15 33 / 0.12), transparent 55%),
    rgb(255 255 255 / 0.02);
  box-shadow: inset 0 0 0 1px var(--line);
}
@media (max-width: 860px) { .unlock { grid-template-columns: 1fr; } }
.unlock h2 { font-size: clamp(2rem, 4.4vw, 3.4rem); font-weight: 700; font-stretch: 118%; line-height: 1.02; letter-spacing: -0.01em; }
.unlock p { max-width: 56ch; margin: 18px 0 0; color: var(--ink-2); font-size: 1.08rem; }
.unlock .unlock-cta { color: var(--muted); font-size: 0.98rem; }
.unlock-list { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.unlock-list li { display: flex; align-items: baseline; gap: 18px; padding: 15px 18px; border-radius: var(--radius); background: rgb(0 0 0 / 0.55); box-shadow: inset 0 0 0 1px var(--line); color: var(--ink-2); }
.unlock-list b { flex: none; min-width: 3.3em; color: var(--ink); font-size: 1.2rem; font-weight: 800; font-style: italic; font-stretch: 125%; }

/* How it works: three steps, one stripe colour each */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; margin: 44px 0 0; padding: 0; list-style: none; counter-reset: step; }
.steps li { position: relative; padding-top: 26px; counter-increment: step; }
.steps li::before { content: ''; position: absolute; top: 0; left: 0; width: 64px; height: 3px; background: var(--cyan); }
.steps li:nth-child(2)::before { background: var(--royal); }
.steps li:nth-child(3)::before { background: var(--red); }
.steps h3 { font-size: 1.35rem; font-weight: 600; font-stretch: 112%; }
.steps h3::before { content: counter(step); margin-right: 12px; font-weight: 800; font-style: italic; font-stretch: 125%; }
.steps p { margin: 10px 0 0; color: var(--muted); }
@media (max-width: 820px) { .steps { grid-template-columns: 1fr; gap: 28px; } }

/* Order form */
.test-note { margin: 28px 0 0; padding: 12px 16px; border-radius: 6px; box-shadow: inset 3px 0 0 var(--red), inset 0 0 0 1px var(--line-strong); color: var(--muted); }
.test-note b { color: var(--ink); font-weight: 600; }

#order { margin-top: 44px; counter-reset: group; }
.order { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 48px; align-items: start; }
@media (max-width: 960px) { .order { grid-template-columns: 1fr; gap: 40px; } }

.group { min-width: 0; margin: 0 0 44px; padding: 0; border: 0; counter-increment: group; }
.group legend { margin-bottom: 16px; padding: 0; font-size: 1.2rem; font-weight: 600; font-stretch: 112%; }
.group legend::before { content: counter(group); display: inline-block; min-width: 1.3em; margin-right: 8px; color: var(--muted); font-weight: 800; font-style: italic; font-stretch: 125%; }
.hint { margin: 12px 0 0; color: var(--muted); font-size: 0.95rem; }

/* Selectable tiles (engine, turbo) built on real radio inputs */
.tiles { display: grid; gap: 12px; }
.tiles-engine { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.tiles-turbo { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 760px) { .tiles-engine { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 520px) { .tiles-engine { grid-template-columns: repeat(2, minmax(0, 1fr)); } .tiles-turbo { grid-template-columns: 1fr; } }

.tile { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 16px 16px 18px; border-radius: var(--radius); background: rgb(255 255 255 / 0.02); box-shadow: inset 0 0 0 1px #5a616c; cursor: pointer; }
.tile input { position: absolute; opacity: 0; pointer-events: none; }
.tile::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; border-radius: 0 0 var(--radius) var(--radius); background: var(--m); opacity: 0; }
.tile:hover { box-shadow: inset 0 0 0 1px #8a929c; }
.tile:has(input:checked) { background: rgb(255 255 255 / 0.05); box-shadow: inset 0 0 0 1px var(--ink); }
.tile:has(input:checked)::after { opacity: 1; }
.tile:has(input:focus-visible) { outline: 2px solid var(--cyan); outline-offset: 2px; }
.tile:has(input:disabled) { opacity: 0.45; cursor: not-allowed; }

.code { font-size: 2.1rem; line-height: 1; font-weight: 800; font-style: italic; font-stretch: 125%; letter-spacing: -0.01em; }
.cars { color: var(--muted); font-size: 0.9rem; line-height: 1.4; }
.price { margin-top: auto; padding-top: 6px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.tile-title { font-weight: 600; font-stretch: 110%; }

/* Fields */
.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 16px; }
.fields .full { grid-column: 1 / -1; }
@media (max-width: 600px) { .fields { grid-template-columns: 1fr; } }

.field { display: flex; flex-direction: column; gap: 8px; font-size: 0.95rem; font-weight: 500; }
.optional { color: var(--muted); font-weight: 400; }
.field input, .field select, .field textarea {
  width: 100%; padding: 12px 14px;
  border: 1px solid #5a616c; border-radius: 6px;
  background: rgb(255 255 255 / 0.02); color: var(--ink);
  font: 400 16px/1.4 'Saira', system-ui, sans-serif;
}
.field select { appearance: none; padding-right: 40px; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 20px) 55%, calc(100% - 15px) 55%; background-size: 5px 5px; background-repeat: no-repeat; }
.field select option { background: #15171b; color: var(--ink); }
.field textarea { min-height: 92px; resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: var(--faint); }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--cyan); outline-offset: 1px; border-color: transparent; }
.field[hidden] { display: none; }
.turbo-model { margin-top: 16px; }

.check { display: flex; align-items: flex-start; gap: 14px; padding: 16px; border-radius: var(--radius); background: rgb(255 255 255 / 0.02); box-shadow: inset 0 0 0 1px #5a616c; cursor: pointer; }
.check input { flex: none; width: 20px; height: 20px; margin: 3px 0 0; accent-color: var(--cyan); }
.check > span { display: block; }
.check small { display: block; margin-top: 4px; color: var(--muted); font-size: 0.95rem; }
.check:has(input:checked) { box-shadow: inset 0 0 0 1px var(--ink); }
.check:has(input:disabled) { opacity: 0.45; cursor: not-allowed; }
.check-plain, .check-plain:has(input:checked) { padding: 0; background: none; box-shadow: none; }

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

/* Summary */
.summary { position: sticky; top: 92px; padding: 26px 24px 24px; border-radius: 10px; background: rgb(255 255 255 / 0.03); box-shadow: inset 0 0 0 1px var(--line-strong); overflow: hidden; }
.summary::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--m); }
@media (max-width: 960px) { .summary { position: relative; top: 0; } }
.summary h3 { font-size: 1.2rem; font-weight: 600; font-stretch: 112%; }
.summary .empty { margin: 14px 0 0; color: var(--muted); }
.lines { margin: 18px 0 0; }
.lines div { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-top: 1px solid var(--line); }
.lines dt { color: var(--muted); }
.lines dd { margin: 0; font-variant-numeric: tabular-nums; }
.total { display: flex; justify-content: space-between; align-items: baseline; margin: 6px 0 20px; padding-top: 14px; border-top: 1px solid var(--line-strong); }
.total strong { font-size: 2rem; font-weight: 700; font-stretch: 112%; font-variant-numeric: tabular-nums; }
.summary .btn { width: 100%; }
.error { margin: 14px 0 0; color: #ff6b76; }
.error:empty { display: none; }
.fine { margin: 14px 0 0; color: var(--muted); font-size: 0.9rem; }

/* FAQ and terms */
.faq { margin-top: 32px; border-bottom: 1px solid var(--line); }
.faq details { border-top: 1px solid var(--line); }
.faq summary { display: flex; justify-content: space-between; gap: 24px; padding: 22px 0; font-size: 1.12rem; font-weight: 500; cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; color: var(--muted); font-size: 1.4rem; line-height: 1; }
.faq details[open] summary::after { content: '\2212'; }
.faq details p { max-width: 70ch; margin: -6px 0 22px; color: var(--muted); }

.terms p { max-width: 76ch; color: var(--muted); }
.terms .section-head + p { margin-top: 24px; }
.terms a { color: var(--ink); }
.terms b { color: var(--ink); font-weight: 600; }

/* Footer */
.foot { margin-top: clamp(88px, 11vw, 144px); border-top: 1px solid var(--line); color: var(--muted); font-size: 0.92rem; }
.foot-in { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 24px 40px; align-items: start; padding-top: 40px; padding-bottom: 56px; }
@media (max-width: 760px) { .foot-in { grid-template-columns: 1fr; } }
.foot img { width: 96px; height: 96px; }
.foot p { margin: 0 0 10px; max-width: 64ch; }
.foot-tag { color: var(--ink); font-weight: 500; }
.foot-legal { font-size: 0.85rem; color: var(--faint); }
.foot-nav { display: grid; gap: 8px; }
.foot-nav a { color: var(--muted); text-decoration: none; }
.foot-nav a:hover { color: var(--ink); }

/* Success page */
.done { max-width: 640px; padding-top: clamp(40px, 8vw, 96px); padding-bottom: 96px; }
.done img { width: 140px; height: 140px; margin-bottom: 36px; }
.done h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); font-weight: 800; font-style: italic; font-stretch: 125%; text-transform: uppercase; line-height: 0.95; }
.done p { color: var(--muted); }
.done h2 { margin: 40px 0 0; font-size: 1.2rem; font-weight: 600; font-stretch: 112%; }
.done ol { margin: 14px 0 36px; padding-left: 1.2em; color: var(--muted); }
.done li { margin: 8px 0; padding-left: 6px; }

/* Start-up screen, the same as the Tuned by MAR app's: logo, gradient progress line, one row per real step */
.boot { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; background: #000; transition: opacity 0.28s; animation: boot-failsafe 0s 8s forwards; }
.boot.out { opacity: 0; pointer-events: none; }
.boot-col { display: grid; justify-items: center; gap: 18px; width: min(470px, calc(100vw - 48px)); }
.boot-mark { width: 190px; height: 190px; }
.boot-status { margin: 0; color: #757575; font: 11px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; text-align: center; }
.boot-bar { width: 100%; height: 2px; border-radius: 1px; background: rgb(255 255 255 / 0.07); overflow: hidden; }
.boot-bar i { display: block; width: 0; height: 100%; background: linear-gradient(90deg, #21a8ff, #1c4ad9, #ed2629) 0 0 / min(470px, calc(100vw - 48px)) 100% no-repeat; transition: width 0.35s; }
.boot-steps { display: grid; gap: 7px; width: 100%; margin: 0; font: 11px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; }
.boot-steps div { display: flex; justify-content: space-between; gap: 16px; }
.boot-steps dt { color: #4d4d4d; }
.boot-steps dd { margin: 0; color: #4d4d4d; font-weight: 500; text-align: right; }
.boot-steps .ok dt, .boot-steps .warn dt { color: #9e9e9e; }
.boot-steps .ok dd { color: #3ddb96; }
.boot-steps .warn dd { color: #ffb547; }
@media (prefers-reduced-motion: no-preference) {
  .boot-mark { animation: boot-in 0.5s ease-out both, boot-breathe 1.6s ease-in-out 0.5s infinite alternate; }
}
@media (prefers-reduced-motion: reduce) { .boot, .boot-bar i { transition: none; } }
@keyframes boot-in { from { opacity: 0; } }
@keyframes boot-breathe { to { opacity: 0.82; } }
/* If the script never runs, the cover still gets out of the way. */
@keyframes boot-failsafe { to { visibility: hidden; pointer-events: none; } }

