@font-face {
  font-family: Assistant;
  src: url('/raceclub-assistant.woff2') format('woff2');
  font-display: swap;
  font-weight: 400;
}
@font-face {
  font-family: Assistant;
  src: url('/raceclub-assistant-bold.woff2') format('woff2');
  font-display: swap;
  font-weight: 700;
}
@font-face {
  font-family: Anton;
  src: url('/raceclub-anton.woff2') format('woff2');
  font-display: swap;
  font-weight: 400;
}

:root {
  color-scheme: light;
  --paper: #f7f6f2;
  --surface: #fff;
  --ink: #17191b;
  --charcoal: #1d2023;
  --black: #111315;
  --muted: #545757;
  --line: #dedcd6;
  --red: #d71920;
  --red-hover: #ad1419;
  --page-width: 1400px;
  --page-gutter: clamp(16px, 3.2vw, 48px);
  --display: Anton, 'Arial Narrow', sans-serif;
  font: 16px/1.5 Assistant, Arial, sans-serif;
  color: var(--ink);
  background: var(--paper);
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; }
a { color: inherit; text-underline-offset: .2em; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; }
h1, h2, h3 { margin: 0; overflow-wrap: anywhere; }
h1, h2 {
  font-family: var(--display);
  font-weight: 400;
  line-height: 1.13;
  text-transform: uppercase;
}
h1 { font-size: clamp(2rem, 4vw, 3.5rem); }
h2 { font-size: clamp(1.25rem, 2vw, 1.75rem); }
p { margin: 0 0 1rem; }
p, small, dd, .badge { overflow-wrap: anywhere; }

button, input, select, textarea { font: inherit; }
button, .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 44px;
  max-width: 100%;
  padding: .65rem 1.125rem;
  border: 1px solid var(--ink);
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  text-align: center;
  text-decoration: none;
  font-weight: 700;
  line-height: 1.25;
  cursor: pointer;
}
button:not(:disabled):hover, .button:hover { background: var(--ink); color: var(--surface); }
button.primary, .button.primary { border-color: var(--red); background: var(--red); color: var(--surface); }
button.primary:not(:disabled):hover, .button.primary:hover { border-color: var(--red-hover); background: var(--red-hover); }
button:disabled { opacity: .65; cursor: not-allowed; }

label { display: flex; flex-direction: column; gap: .375rem; color: var(--ink); font-weight: 700; }
input, select, textarea {
  min-width: 0;
  min-height: 44px;
  width: 100%;
  padding: .6rem .75rem;
  border: 1px solid #777974;
  border-radius: 0;
  color: var(--ink);
  background: var(--surface);
}
textarea { min-height: 112px; resize: vertical; }
.actions { display: flex; flex-wrap: wrap; gap: .75rem; }
.small, small { color: var(--muted); font-size: .9rem; }
.page-width { width: min(var(--page-width), 100% - var(--page-gutter) * 2); margin-inline: auto; }

.skip {
  position: fixed;
  z-index: 10;
  inset: 12px auto auto 16px;
  padding: .75rem 1rem;
  transform: translateY(calc(-100% - 20px));
  color: var(--ink);
  background: var(--surface);
}
.skip:focus { transform: none; }

.store-announcement {
  padding: 10px var(--page-gutter);
  background: var(--black);
  color: var(--surface);
  text-align: center;
  font: 400 clamp(.69rem, 2.2vw, .875rem)/1.3 var(--display);
  letter-spacing: .08em;
  text-transform: uppercase;
}
.store-header { border-bottom: 1px solid var(--line); }
.store-header-inner {
  min-height: 84px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: clamp(18px, 3.5vw, 52px);
  align-items: center;
}
.store-brand { display: inline-flex; width: max-content; }
.store-brand img { display: block; width: clamp(132px, 16vw, 180px); height: auto; }
.store-nav, .account, .store-footer nav { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 24px; }
.store-nav a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  color: var(--muted);
  text-decoration: none;
  font-weight: 700;
}
.store-nav a:hover, .store-nav a[aria-current] { color: var(--ink); text-decoration: underline; }
.store-nav a[aria-current] { text-decoration-color: var(--red); text-decoration-thickness: 2px; }
.account { justify-content: flex-end; gap: 6px 14px; min-width: 0; }
.account span { max-width: 18ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; }
.account button { padding-inline: 12px; white-space: nowrap; }
.store-footer { padding: 24px 0; background: var(--charcoal); color: var(--surface); }
.store-footer-inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .5rem 2rem; }
.store-footer strong { font-family: var(--display); font-weight: 400; text-transform: uppercase; letter-spacing: .035em; }
.store-footer a { display: inline-flex; align-items: center; min-height: 44px; }

.login-shell {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: 1120px;
  margin-block: clamp(24px, 5vw, 70px);
  background: var(--surface);
  border: 1px solid var(--line);
}
.login-photo {
  min-height: 220px;
  border-right: 3px solid var(--red);
  background: var(--charcoal) url('/raceclub-garage.webp') center 59% / cover no-repeat;
}
.login-access { min-width: 0; padding: clamp(20px, 5vw, 58px); }
.login-access h1 { margin: 0 0 16px; }
.login-access p, .login-help { color: var(--muted); }
.login-access #driver-login-status {
  padding: 10px 14px;
  border-inline-start: 3px solid var(--ink);
  background: var(--paper);
  color: var(--ink);
}
.login-access #driver-login-status[role=alert] { border-color: var(--red); }
.login-access form { display: grid; gap: 14px; }
.login-help { margin-top: 24px; border-top: 1px solid var(--line); padding-top: 16px; }
.login-help p:last-child { margin-bottom: 0; }

@media (max-width: 760px) {
  .store-header-inner {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 4px 12px;
    min-height: 0;
    padding-block: 10px 0;
  }
  .store-nav { grid-column: 1 / -1; grid-row: 2; gap: 0 16px; }
  .store-nav a { font-size: .91rem; min-height: 42px; }
  .account { grid-column: 2; grid-row: 1; gap: 0 8px; font-size: .94rem; }
  .account span { max-width: 14ch; }
  .account button { padding-inline: 9px; min-height: 36px; }
  .login-shell { grid-template-columns: minmax(0, 1fr); }
  .login-photo { min-height: 160px; border-right: 0; border-bottom: 3px solid var(--red); }
}
@media (max-width: 400px) {
  .account span { display: none; }
}
