/* ==========================================================================
   FP MOTORSPORTS — brand v2 design system
   Palette: navy #273285 (primary) · lime #CCDA53 (accent only) ·
   grey #B7B7B9 · black #000000 (body text) · white #FFFFFF (dominant).
   Type: Saira Condensed (display) · IBM Plex Sans (body) ·
   IBM Plex Sans Arabic (body, RTL). Mobile-first. RTL-ready.
   ========================================================================== */

/* ---- Tokens --------------------------------------------------------------- */
:root {
  /* --- Brand v2 core palette (the five colours) --- */
  --navy:  #273285;        /* primary: structure, headings, rules */
  --lime:  #ccda53;        /* accent ONLY — never text on white (1.53:1) */
  --grey:  #b7b7b9;        /* dividers, disabled, secondary fills */
  --black: #000000;        /* body text */
  --white: #ffffff;        /* dominant surface */

  /* --- Legacy names, remapped onto the new palette so nothing breaks. --- */
  /* Old blue family -> navy (single primary; gradients now flat). */
  --blue: var(--navy);
  --blue-deep: #1d2668;    /* darker navy for primary-button hover */
  --blue-glow: var(--navy);
  /* Name now WRONG: the accent is lime, not red. Use --lime going forward. */
  --red: var(--lime);
  --red-deep: var(--lime);

  /* Semantic alert colour — NOT the brand accent. ~5.9:1 on white (AA).
     Never #CE1126 (Kuwait-flag red, logo-only) or #D0302D (retired brand red). */
  --danger: #b3261e;
  --danger-tint: #fdecea;   /* invalid-field / error-box background */

  /* Name now WRONG: --ink was the dark-grey ground; body text is black. */
  --ink: var(--black);
  --steel: var(--navy);            /* raised dark panels -> navy structure */
  --steel-2: rgba(255,255,255,.14); /* hairline borders/dividers on dark surfaces */
  --ink-grey: #1c1c1e;             /* charcoal ground — scoped opt-in; near-black, uses the normal dark-ground treatment */

  /* Text greys tuned to pass on white; --grey stays decorative-only. */
  --smoke: #5a5a5a;        /* captions / secondary text (~7:1 on white) */
  --muted: #6a6a72;        /* footer / tertiary text (~5.9:1 on white) */
  --slate: var(--smoke);   /* secondary text — no longer flattened to black */

  /* Dark-surface variants — applied via the scoped block below so the same
     components stay legible on navy/near-black grounds. */
  --smoke-dark: #c2c8d4;   /* secondary text on dark (~7:1 on navy) */
  --danger-dark: #ff8a80;  /* alert text on dark (~6:1 on navy) */

  --paper: var(--white);
  --mist: #f4f5f8;         /* distinct cool off-white so sections separate from #fff */

  /* Borders: --line for interactive controls (~3.4:1), --line-soft decorative only. */
  --line: #8e8e95;
  --line-soft: #b7b7b9;
  --mist-2: var(--line-soft);

  --ok: #1faa6b;
  --warn: #e0a327;

  --wrap: 1140px;
  --radius: 4px;           /* sharp, mechanical */
  --radius-lg: 10px;
  --gutter: clamp(1rem, 4vw, 2rem);

  --shadow: 0 1px 2px rgba(0, 0, 0, .06), 0 8px 24px rgba(0, 0, 0, .08);
  --shadow-dark: 0 12px 40px rgba(0, 0, 0, .45);

  --font-display: 'Saira Condensed', 'Arial Narrow', sans-serif;
  --font-body: 'IBM Plex Sans', Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "Menlo", "Consolas", monospace;

  --ease: cubic-bezier(.2, .7, .2, 1);
}

/* Arabic body face in RTL — remap the body-font token only (no component
   changes). Saira Condensed has no Arabic glyphs, so Arabic display headings
   fall back to sans-serif until addressed in a later step. */
[dir="rtl"] {
  --font-body: 'IBM Plex Sans Arabic', 'IBM Plex Sans', Arial, sans-serif;
}

/* Dark surfaces re-point the text + alert tokens to their on-dark variants, so
   the same components (panels, footer, admin shell, dashboard) stay legible on
   navy/near-black grounds without per-usage overrides. */
.adm, .adm-login, .site-header, .hero, .page-intro,
.section--ink, .cta-band--ink, .site-footer, .dash {
  --smoke: var(--smoke-dark);
  --slate: var(--smoke-dark);
  --danger: var(--danger-dark);
}

/* ---- Reset ---------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  font-size: 17px;
  overflow-x: hidden;
}
img, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4 { margin: 0; font-family: var(--font-display); font-weight: 700; line-height: 1.02; letter-spacing: .01em; }

/* ---- Layout helpers ------------------------------------------------------- */
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: clamp(3rem, 8vw, 6rem); }
.section--ink { background: var(--ink); color: #fff; }
.section--mist { background: var(--mist); }
.section--tight { padding-block: clamp(2rem, 5vw, 3.5rem); }

/* Eyebrow with signature sector stripe */
.eyebrow {
  display: inline-flex; align-items: center; gap: .6rem;
  font-family: var(--font-display); text-transform: uppercase;
  font-weight: 600; letter-spacing: .22em; font-size: .78rem;
  color: var(--blue);
}
.section--ink .eyebrow { color: var(--lime); }
.eyebrow::before {
  content: ""; width: 34px; height: 10px; border-radius: 1px;
  background: linear-gradient(90deg, var(--blue) 0 50%, var(--red) 50% 100%);
}
/* On dark grounds the navy half of the sector stripe vanishes — go solid lime. */
.section--ink .eyebrow::before, .cta-band--ink .eyebrow::before,
.page-intro .eyebrow::before, .hero .eyebrow::before { background: var(--lime); }
.section-head { max-width: 640px; margin-bottom: clamp(2rem, 5vw, 3rem); }
.section-head h2 {
  font-size: clamp(2rem, 6vw, 3.2rem);
  text-transform: uppercase; margin-top: .6rem;
}
.section-head p { color: var(--slate); font-size: 1.05rem; }
.section--ink .section-head p { color: var(--smoke); }

/* ---- Buttons -------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; gap: .55rem;
  padding: .9rem 1.5rem; border-radius: var(--radius);
  font-family: var(--font-display); font-weight: 600;
  text-transform: uppercase; letter-spacing: .06em; font-size: .95rem;
  border: 2px solid transparent; transition: transform .15s var(--ease), background .15s, box-shadow .15s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
/* Primary CTA — navy field, white text (~13:1). Never white on lime. */
.btn--red { background: var(--navy); color: #fff; }
.btn--red:hover { background: var(--blue-deep); box-shadow: 0 8px 20px rgba(39,50,133, .35); }
.btn--blue { background: var(--blue); color: #fff; }
.btn--blue:hover { background: var(--blue-deep); box-shadow: 0 8px 20px rgba(39,50,133, .35); }
.btn--ghost { border-color: currentColor; color: #fff; background: transparent; }
.btn--ghost:hover { background: rgba(255, 255, 255, .12); }
.btn--wa { background: #25d366; color: #06301a; }
.btn--wa:hover { background: #1fbe5a; box-shadow: 0 8px 20px rgba(37, 211, 102, .3); }
.btn--lg { padding: 1.05rem 2rem; font-size: 1.05rem; }
/* Login-page button variants */
.btn--primary { background: var(--navy); color: #fff; }
.btn--primary:hover { background: var(--blue-deep); box-shadow: 0 8px 20px rgba(39,50,133,.35); }
.btn--secondary { background: transparent; border-color: var(--navy); color: var(--navy); }
.btn--secondary:hover { background: rgba(39,50,133,.08); }
.btn--ghost-dark { background: transparent; border-color: var(--line); color: var(--smoke); }
.btn--ghost-dark:hover { color: var(--navy); border-color: var(--navy); }

/* ---- Header / nav --------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(20, 22, 27, .92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--steel-2);
}
.nav { display: flex; align-items: center; gap: 1rem; height: 86px; }
.brand { display: flex; align-items: center; gap: .6rem; }
/* Shared white plate for the logo wherever it sits on a dark surface (header,
   footer, admin + coach-portal sidebars). The artwork is a wide 2.73:1 lockup on
   a white background, so it's wrapped in .logo-plate and presented as one clean
   rounded white plate. The plate treatment is IDENTICAL everywhere; only the
   inner image width differs per context. Size by width only, height auto — never
   distort or clip the lockup. */
.logo-plate { background: #fff; border-radius: 10px; padding: 8px 12px; display: inline-block; line-height: 0; }
.logo-plate img { height: auto; }
.brand .logo-plate img { width: 104px; }
.brand__name {
  font-family: var(--font-display); font-weight: 700; text-transform: uppercase;
  color: #fff; font-size: 1.15rem; letter-spacing: .04em; line-height: 1;
}
.brand__name span { color: var(--red); }
.nav__links { display: none; align-items: center; gap: .35rem; }
.nav__links a {
  color: #cfd5e0; font-family: var(--font-display); text-transform: uppercase;
  font-weight: 500; letter-spacing: .05em; font-size: .92rem;
  padding: .5rem .8rem; border-radius: var(--radius); position: relative;
}
.nav__links a:hover { color: #fff; background: rgba(255, 255, 255, .06); }
.nav__links a[aria-current="page"] { color: #fff; }
.nav__links a[aria-current="page"]::after {
  content: ""; position: absolute; left: .8rem; right: .8rem; bottom: .25rem; height: 3px;
  background: var(--lime);   /* lime keyline — visible on the dark header (navy would vanish) */
  border-radius: 2px;
}
/* Pinned right. On mobile (nav__links hidden) the auto margin pushes the
   actions to the edge; on desktop nav__links (flex:1) fills the gap first, so
   this margin resolves to zero and the actions stay flush right. */
.nav__actions { display: flex; align-items: center; gap: .5rem; margin-inline-start: auto; }
.nav__actions .btn--wa { display: none; }
@media (min-width: 520px) { .nav__actions .btn--wa { display: inline-flex; } }
.lang-toggle {
  background: transparent; border: 1px solid var(--steel-2); color: #cfd5e0;
  border-radius: var(--radius); padding: .45rem .7rem; font-family: var(--font-display);
  font-size: .85rem; letter-spacing: .04em; text-transform: uppercase;
}
.lang-toggle:hover { color: #fff; border-color: var(--smoke); }
.nav__toggle {
  display: inline-grid; place-items: center; width: 42px; height: 42px;
  background: transparent; border: 1px solid var(--steel-2); border-radius: var(--radius);
}
.nav__toggle span, .nav__toggle span::before, .nav__toggle span::after {
  content: ""; display: block; width: 20px; height: 2px; background: #fff; position: relative;
  transition: transform .2s var(--ease), opacity .2s;
}
.nav__toggle span::before { position: absolute; top: -6px; }
.nav__toggle span::after { position: absolute; top: 6px; }
.nav[data-open="true"] .nav__toggle span { background: transparent; }
.nav[data-open="true"] .nav__toggle span::before { transform: translateY(6px) rotate(45deg); }
.nav[data-open="true"] .nav__toggle span::after { transform: translateY(-6px) rotate(-45deg); }

/* Mobile drawer */
.nav__drawer {
  position: fixed; inset: 66px 0 auto 0; z-index: 99;
  background: var(--ink); border-bottom: 1px solid var(--steel-2);
  transform: translateY(-120%); transition: transform .28s var(--ease);
  padding: 1rem var(--gutter) 1.5rem;
}
.nav[data-open="true"] ~ .nav__drawer { transform: translateY(0); }
.nav__drawer a {
  display: block; color: #dfe4ee; font-family: var(--font-display);
  text-transform: uppercase; letter-spacing: .05em; font-size: 1.1rem;
  padding: .85rem .25rem; border-bottom: 1px solid var(--steel-2);
}
.nav__drawer a[aria-current="page"] { color: var(--red); }

/* ---- Hero ----------------------------------------------------------------- */
.hero {
  position: relative; background: var(--ink); color: #fff; overflow: hidden;
  padding-block: clamp(2.5rem, 7vw, 5rem);
}
.hero__track {            /* asphalt + speed-line ambiance */
  position: absolute; inset: 0; z-index: 0;
  background:
    repeating-linear-gradient(115deg, rgba(255,255,255,.03) 0 2px, transparent 2px 26px),
    radial-gradient(1000px 500px at 80% -20%, rgba(39,50,133,.28), transparent 60%),
    radial-gradient(900px 500px at 10% 120%, rgba(204,218,83,.18), transparent 55%),
    var(--ink);
}
.hero__kerb {             /* red/white kerb stripe at the base */
  position: absolute; left: 0; right: 0; bottom: 0; height: 12px; z-index: 1;
  background: repeating-linear-gradient(90deg, var(--red) 0 28px, #fff 28px 56px);
  opacity: .9;
}
.hero__inner { position: relative; z-index: 2; display: grid; gap: 2rem; align-items: center; }
.hero__eyebrow {
  display: inline-flex; align-items: center; gap: .6rem;
  font-family: var(--font-display); text-transform: uppercase; letter-spacing: .2em;
  font-size: .8rem; color: var(--smoke-dark); margin-bottom: 1rem;
}
.hero__eyebrow::before { content:""; width: 34px; height: 10px; border-radius:1px; background: var(--lime); }
.hero h1 {
  font-size: clamp(2.8rem, 11vw, 6rem); text-transform: uppercase; line-height: .9;
  font-style: italic; letter-spacing: -.01em;
}
.hero h1 em { color: var(--red); font-style: italic; }
.hero__sub { font-size: clamp(1.05rem, 3vw, 1.3rem); color: #c7cedd; max-width: 46ch; margin: 1.25rem 0 0; }
.hero__sub--short { display: none; } /* phones only (see max-width:560 block) */
.hero__cta { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.75rem; }
.hero__stats { display: flex; flex-wrap: wrap; gap: 1.5rem 2.5rem; margin-top: 2rem; }
.hero__figure { position: relative; }
.hero__figure img { width: 100%; filter: drop-shadow(0 30px 40px rgba(0,0,0,.5)); }

/* Timing-style stat */
.stat { display: flex; flex-direction: column; gap: .15rem; }
.stat__num { font-family: var(--font-mono); font-weight: 700; font-size: clamp(1.6rem, 5vw, 2.1rem); color: #fff; letter-spacing: -.02em; }
.stat__num b { color: var(--navy); font-weight: 700; }
.stat__label { font-size: .78rem; text-transform: uppercase; letter-spacing: .12em; color: var(--smoke); }

/* Homepage hero — tighten the stack at phone widths so it isn't so tall before
   the next section. Desktop uses the base clamps above and is unchanged. */
@media (max-width: 560px) {
  .hero { padding-block: 1.6rem; }
  .hero__eyebrow { margin-bottom: .55rem; }
  /* The hero photo is landscape (two karts, one at each edge, empty asphalt
     between). A portrait phone crop from centre lands on that empty middle and
     clips both karts, so weight it right to keep the blue kart in frame. */
  .hero .hero__bg { object-position: 66% center; } /* beats the later base rule */
  /* Let the stacked headline take more of the width. */
  .hero h1 { font-size: clamp(3.4rem, 17vw, 4.2rem); }
  .hero__sub { margin-top: .85rem; }
  .hero__sub--full { display: none; }
  .hero__sub--short { display: block; }
  .hero__cta { margin-top: 1.2rem; }
  /* Three stats across as a set, with smaller type (was wrapping 2-then-1). */
  .hero__stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; margin-top: 1.4rem; }
  .hero__stats .stat { gap: .1rem; }
  .stat__num { font-size: 1.4rem; }
  .stat__label { font-size: .62rem; letter-spacing: .05em; }
}

/* ---- Feature cards -------------------------------------------------------- */
.cards { display: grid; gap: 1.25rem; grid-template-columns: 1fr; }
.card {
  position: relative; background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius-lg); overflow: hidden; padding: 1.75rem 1.5rem 1.5rem;
  transition: transform .2s var(--ease), box-shadow .2s;
}
.card::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 5px; background: var(--accent, var(--blue)); }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card__no { font-family: var(--font-mono); font-size: .8rem; color: var(--smoke); letter-spacing: .1em; }
.card__icon { width: 46px; height: 46px; margin: .25rem 0 1rem; color: var(--accent, var(--blue)); }
.card h3 { font-size: 1.5rem; text-transform: uppercase; }
.card p { color: var(--slate); margin: .5rem 0 1.25rem; font-size: .98rem; }
.card__link {
  font-family: var(--font-display); text-transform: uppercase; font-weight: 600;
  letter-spacing: .05em; font-size: .9rem; color: var(--accent, var(--blue));
  display: inline-flex; align-items: center; gap: .4rem;
}
.card__link::after { content: "→"; transition: transform .15s var(--ease); }
.card:hover .card__link::after { transform: translateX(4px); }
[dir="rtl"] .card__link::after { content: "←"; }
[dir="rtl"] .card:hover .card__link::after { transform: translateX(-4px); }

/* ---- Location block ------------------------------------------------------- */
.location { display: grid; gap: 1.5rem; }
.location__map {
  position: relative; min-height: 260px; border-radius: var(--radius-lg); overflow: hidden;
  border: 1px solid var(--steel-2);
  background:
    linear-gradient(135deg, rgba(39,50,133,.25), transparent 60%),
    repeating-linear-gradient(0deg, rgba(255,255,255,.05) 0 1px, transparent 1px 44px),
    repeating-linear-gradient(90deg, rgba(255,255,255,.05) 0 1px, transparent 1px 44px),
    var(--steel);
  display: grid; place-items: center; text-align: center;
}
.location__pin { font-family: var(--font-display); text-transform: uppercase; color: #fff; }
.location__pin b { display: block; color: var(--navy); font-size: 1.6rem; }
.location__info h3 { font-size: 1.8rem; text-transform: uppercase; }
.info-list { margin-top: 1rem; display: grid; gap: .85rem; }
.info-list li { display: grid; grid-template-columns: 26px 1fr; gap: .75rem; align-items: start; }
.info-list svg { width: 20px; height: 20px; color: var(--blue); margin-top: .2rem; }
.section--ink .info-list svg { color: var(--blue-glow); }
.info-list b { display: block; font-family: var(--font-display); text-transform: uppercase; letter-spacing: .04em; font-size: .95rem; }
.info-list span { color: var(--smoke); font-size: .95rem; }

/* ---- WhatsApp CTA band ---------------------------------------------------- */
.cta-band {
  position: relative; background: var(--blue); color: #fff; overflow: hidden;
  padding-block: clamp(2.5rem, 6vw, 4rem);
}
.cta-band::after {  /* checkered corner motif */
  content: ""; position: absolute; top: 0; right: 0; width: 180px; height: 100%;
  background-image:
    conic-gradient(rgba(255,255,255,.1) 90deg, transparent 90deg 180deg, rgba(255,255,255,.1) 180deg 270deg, transparent 270deg);
  background-size: 30px 30px; opacity: .5;
}
[dir="rtl"] .cta-band::after { right: auto; left: 0; }
.cta-band__inner { position: relative; z-index: 1; display: grid; gap: 1.25rem; align-items: center; }
.cta-band h2 { font-size: clamp(1.8rem, 5vw, 2.8rem); text-transform: uppercase; }
.cta-band p { color: #d6e0f4; margin: .5rem 0 0; }
/* Dark variant — used for the "Coach with us" recruitment band above the footer */
.cta-band--ink { background: var(--ink); border-top: 1px solid var(--steel-2); }
.cta-band--ink .eyebrow { color: var(--lime); }
.cta-band--ink p { color: var(--smoke); }

/* ---- Included / benefits grid -------------------------------------------- */
.grid-2 { display: grid; gap: 1.25rem; grid-template-columns: 1fr; }
.grid-3 { display: grid; gap: 1.25rem; grid-template-columns: 1fr; }
.tile {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 1.5rem; display: flex; gap: 1rem; align-items: flex-start;
}
.section--ink .tile { background: var(--steel); border-color: var(--steel-2); }
.tile__mark {
  flex: 0 0 auto; width: 42px; height: 42px; border-radius: var(--radius);
  display: grid; place-items: center; background: rgba(39,50,133,.1); color: var(--blue);
}
.section--ink .tile__mark { background: rgba(39,50,133,.18); color: var(--blue-glow); }
.tile h4 { font-family: var(--font-display); text-transform: uppercase; font-size: 1.15rem; }
.tile p { margin: .3rem 0 0; color: var(--slate); font-size: .95rem; }
.section--ink .tile p { color: var(--smoke); }

/* ---- Results table (timing board) ---------------------------------------- */
.board { border: 1px solid var(--steel-2); border-radius: var(--radius-lg); overflow: hidden; background: var(--steel); }
.board__head { display: flex; align-items: center; justify-content: space-between; padding: 1rem 1.25rem; background: var(--ink); border-bottom: 1px solid var(--steel-2); }
.board__head h3 { color: #fff; text-transform: uppercase; font-size: 1.15rem; }
.board__head span { font-family: var(--font-mono); font-size: .8rem; color: var(--smoke); }
.table-scroll { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; min-width: 480px; }
table.data th, table.data td { padding: .8rem 1rem; text-align: start; border-bottom: 1px solid var(--steel-2); }
table.data thead th {
  font-family: var(--font-display); text-transform: uppercase; letter-spacing: .06em;
  font-size: .75rem; color: var(--smoke); font-weight: 600;
}
table.data tbody td { color: #dfe4ee; font-size: .95rem; }
table.data tbody tr:hover { background: rgba(255,255,255,.03); }
.pos { font-family: var(--font-mono); font-weight: 700; color: #fff; }
.pos--p1 { color: #ffd23f; } .pos--p2 { color: #cfd5e0; } .pos--p3 { color: #e0925a; }
.time { font-family: var(--font-mono); color: var(--smoke-dark); }
.badge { display: inline-block; padding: .2rem .55rem; border-radius: 999px; font-family: var(--font-display); text-transform: uppercase; font-size: .7rem; letter-spacing: .06em; }
.badge--red { background: var(--lime); color: var(--navy); }
.badge--blue { background: rgba(39,50,133,.12); color: var(--navy); }
.badge--ok { background: rgba(31,170,107,.18); color: #4bd699; }
.badge--warn { background: rgba(224,163,39,.18); color: #f0c04b; }
.badge--muted { background: rgba(139,147,163,.16); color: #b7bece; }

/* light-surface table variant */
.board--light { background: var(--paper); border-color: var(--line); }
.board--light .board__head { background: var(--mist); border-color: var(--line-soft); }
.board--light .board__head h3 { color: var(--ink); }
.board--light .board__head span { color: var(--slate); }
.board--light table.data th, .board--light table.data td { border-color: var(--line-soft); }
.board--light table.data tbody td { color: var(--ink); }
.board--light .pos { color: var(--ink); }
.board--light .time { color: var(--blue); }
.board--light table.data tbody tr:hover { background: var(--mist); }

/* ---- Warehouse feature (members) ----------------------------------------- */
.split { display: grid; gap: 1.5rem; align-items: center; }
.split__media { border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow); }
.figure-note { font-family: var(--font-mono); font-size: .72rem; color: var(--smoke); margin-top: .5rem; text-transform: uppercase; letter-spacing: .08em; }

/* ---- Pricing tiers -------------------------------------------------------- */
.price { font-family: var(--font-mono); font-weight: 700; }
.price b { font-size: 2rem; color: var(--ink); }
.section--ink .price b { color: #fff; }
.price small { color: var(--smoke); font-family: var(--font-body); font-weight: 400; }
.plan {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 1.75rem 1.5rem; display: flex; flex-direction: column; gap: .5rem;
}
.plan--feature { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(39,50,133,.12); }
.plan h4 { font-family: var(--font-display); text-transform: uppercase; font-size: 1.35rem; }
.plan ul { display: grid; gap: .6rem; margin: 1rem 0 1.5rem; }
.plan li { display: grid; grid-template-columns: 20px 1fr; gap: .6rem; color: var(--slate); font-size: .95rem; }
.plan li svg { width: 16px; height: 16px; color: var(--ok); margin-top: .3rem; }
.plan .btn { margin-top: auto; justify-content: center; }
.plan__tag { align-self: flex-start; }

/* ---- Forms (booking) ------------------------------------------------------ */
.form-card {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 4vw, 2.5rem); box-shadow: var(--shadow);
}
/* min-width:0 lets the field shrink inside a grid/flex track instead of forcing
   the track wider — matters for native date inputs on iOS (see below). */
.field { margin-bottom: 1.15rem; min-width: 0; }
.field label { display: block; font-family: var(--font-display); text-transform: uppercase; letter-spacing: .05em; font-size: .82rem; margin-bottom: .4rem; }
.field .req { color: var(--danger); }
.field input, .field select, .field textarea {
  width: 100%; padding: .85rem 1rem; border: 1px solid var(--line); border-radius: var(--radius);
  font-size: 1rem; font-family: var(--font-body); background: #fff; color: var(--ink);
}
/* iOS Safari gives native date inputs an intrinsic width that ignores width:100%,
   so they overflow the card. Strip the native appearance and pin the box model. */
.field input[type="date"] {
  width: 100%; max-width: 100%; min-width: 0;
  -webkit-appearance: none; appearance: none; box-sizing: border-box;
}
.field textarea { resize: vertical; min-height: 3.5rem; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--blue); outline-offset: 1px; border-color: var(--blue); }
.field .hint { font-size: .8rem; color: var(--smoke); margin-top: .35rem; }
.field .error { font-size: .82rem; color: var(--danger); margin-top: .35rem; min-height: 1em; }
/* Empty error placeholders would otherwise reserve a full line (min-height +
   margin) under only *some* fields, breaking the vertical rhythm. Collapse them
   until an error is actually shown. */
.field .error:empty { min-height: 0; margin-top: 0; }
.field input[aria-invalid="true"], .field select[aria-invalid="true"], .field textarea[aria-invalid="true"] { border-color: var(--danger); background: var(--danger-tint); }
/* The row's gap handles spacing between its fields; give the ROW the bottom
   margin and zero the children's, so stacked fields on mobile don't get grid-gap
   PLUS field margin (double spacing). */
.form-row { display: grid; gap: 1.15rem; grid-template-columns: 1fr; margin-bottom: 1.15rem; }
.form-row[hidden] { display: none; }
.form-row .field { margin-bottom: 0; }
.form-note { font-size: .85rem; color: var(--slate); }
.form-note a { color: var(--blue); text-decoration: underline; font-weight: 600; }
.session-pick { display: grid; gap: .6rem; grid-template-columns: 1fr; }
/* Two-row grid: radio | name | price on the top row, the description spanning
   the name+price columns underneath. Grid areas mirror automatically in RTL. */
.session-pick label {
  display: grid; grid-template-columns: auto 1fr auto;
  grid-template-areas: "radio name price" "radio desc desc";
  align-items: center; column-gap: .75rem; row-gap: .2rem; padding: .85rem 1rem;
  border: 1px solid var(--line); border-radius: var(--radius); cursor: pointer; text-transform: none; letter-spacing: 0; font-family: var(--font-body); margin: 0;
}
.session-pick input { grid-area: radio; width: auto; }
.session-pick label:has(input:checked) { border-color: var(--blue); background: rgba(39,50,133,.05); box-shadow: inset 0 0 0 1px var(--blue); }
.session-pick .s-name { grid-area: name; min-width: 0; }
.session-pick .s-price { grid-area: price; font-family: var(--font-mono); font-weight: 700; color: var(--blue); }
.session-pick .s-desc { grid-area: desc; font-size: .8rem; color: var(--smoke); line-height: 1.35; }
/* Package intro: full width above the variant options (spans both columns at
   the 2-col breakpoint), so the variants sit side by side in the next row. */
.session-pick__note { grid-column: 1 / -1; margin: 0 0 .1rem; }

/* ---- Two-step session picker (drifting / circuit) -------------------------
   Top-level options (Lesson, Taxi drive) stack full width in a single column so
   that a session's variant panel can slide open UNDER its card and push the
   next option down. The card border lives on .s-opt so the whole option — card
   plus its open panel — reads as one selected block. */
/* Two-class selector so this beats the ≥720px `.session-pick { 1fr 1fr }` rule
   (equal single-class specificity would otherwise let the later 2-col rule win). */
.session-pick.session-pick--stepped { grid-template-columns: 1fr; gap: .7rem; }
.session-pick--stepped .s-opt {
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease), background .2s var(--ease);
}
.session-pick--stepped .s-card {
  display: grid; grid-template-columns: auto 1fr auto;
  grid-template-areas: "radio name price" "radio desc desc";
  align-items: center; column-gap: .75rem; row-gap: .2rem; padding: .85rem 1rem;
  cursor: pointer; text-transform: none; letter-spacing: 0; font-family: var(--font-body); margin: 0;
}
.session-pick--stepped .s-card input { grid-area: radio; width: auto; }
.session-pick--stepped .s-card .s-name { grid-area: name; min-width: 0; }
.session-pick--stepped .s-card .s-price { grid-area: price; font-family: var(--font-mono); font-weight: 700; color: var(--blue); }
/* The Lesson card shows a soft "choose your car" hint in the price slot, not a price. */
.session-pick--stepped .s-card .s-price--multi { font-family: var(--font-body); font-weight: 600; font-size: .78rem; color: var(--smoke); }
.session-pick--stepped .s-card .s-desc { grid-area: desc; font-size: .8rem; color: var(--smoke); line-height: 1.35; }
/* Selected top-level card: highlight the whole option block, and keep it lit
   while its variants are open. */
.session-pick--stepped .s-opt:has(> .s-card input:checked) {
  border-color: var(--blue); box-shadow: inset 0 0 0 1px var(--blue); background: rgba(39,50,133,.05);
}
/* Reveal panel: animate the grid track 0fr -> 1fr so it opens to the natural
   height of its content. The inner clips + collapses to zero when closed. */
.session-pick--stepped .s-variants { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .28s var(--ease); }
.session-pick--stepped .s-opt.is-open .s-variants { grid-template-rows: 1fr; }
.session-pick--stepped .s-variants-inner {
  overflow: hidden; min-height: 0;
  display: grid; grid-template-columns: 1fr; gap: .5rem; padding: 0 1rem;
}
.session-pick--stepped .s-opt.is-open .s-variants-inner { padding-bottom: .9rem; }
/* Variant chips — each a bookable option with its own price. */
.session-pick--stepped .s-variant {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; column-gap: .6rem;
  padding: .6rem .8rem; margin: 0; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--paper); cursor: pointer; text-transform: none; letter-spacing: 0; font-family: var(--font-body);
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease), background .15s var(--ease);
}
.session-pick--stepped .s-variant input { width: auto; }
.session-pick--stepped .s-variant .sv-name { min-width: 0; }
.session-pick--stepped .s-variant .sv-price { font-family: var(--font-mono); font-weight: 700; color: var(--blue); }
.session-pick--stepped .s-variant:has(input:checked) {
  border-color: var(--blue); background: rgba(39,50,133,.08); box-shadow: inset 0 0 0 1px var(--blue);
}
/* Two variants side by side once there's room; stacked at mobile (390px). */
@media (min-width: 560px) { .session-pick--stepped .s-variants-inner { grid-template-columns: 1fr 1fr; } }
@media (prefers-reduced-motion: reduce) {
  .session-pick--stepped .s-variants { transition: none; }
  .session-pick--stepped .s-opt, .session-pick--stepped .s-variant { transition: none; }
}
.form-success {
  border: 1px solid var(--ok); background: rgba(31,170,107,.08);
  border-radius: var(--radius-lg); padding: 1.5rem; margin-top: 1rem;
}
.form-success h3 { font-family: var(--font-display); text-transform: uppercase; color: var(--ink); }
.form-success .summary { font-family: var(--font-mono); font-size: .9rem; background: var(--mist); border-radius: var(--radius); padding: 1rem; margin: 1rem 0; }
.form-error {
  border: 1px solid var(--danger); background: var(--danger-tint);
  border-radius: var(--radius-lg); padding: 1.15rem 1.5rem; margin-top: 1rem;
  color: var(--ink); font-size: .95rem;
}

/* ---- Dashboard ------------------------------------------------------------ */
.dash { background: var(--ink); min-height: 100vh; color: #fff; }
.dash__bar { display: flex; align-items: center; gap: 1rem; padding: 1rem var(--gutter); border-bottom: 1px solid var(--steel-2); background: var(--steel); }
.dash__bar .brand__name { font-size: 1rem; }
.dash__tag { font-family: var(--font-mono); font-size: .72rem; color: var(--smoke); border: 1px solid var(--steel-2); padding: .2rem .5rem; border-radius: 999px; }
.dash__back { font-family: var(--font-display); text-transform: uppercase; letter-spacing: .04em; font-size: .8rem; color: var(--smoke-dark); border: 1px solid var(--steel-2); border-radius: var(--radius); padding: .35rem .7rem; }
.dash__back:hover { color: #fff; border-color: var(--smoke); }
.dash__live { margin-inline-start: auto; display: inline-flex; align-items: center; gap: .5rem; font-family: var(--font-mono); font-size: .8rem; color: #4bd699; }
.dash__live .dot { width: 9px; height: 9px; border-radius: 50%; background: #4bd699; box-shadow: 0 0 0 0 rgba(75,214,153,.6); animation: pulse 2s infinite; }
@keyframes pulse { 0%{box-shadow:0 0 0 0 rgba(75,214,153,.55)} 70%{box-shadow:0 0 0 10px rgba(75,214,153,0)} 100%{box-shadow:0 0 0 0 rgba(75,214,153,0)} }
.dash__body { padding: var(--gutter); display: grid; gap: 1.25rem; grid-template-columns: 1fr; max-width: 1320px; margin-inline: auto; }
.panel { background: var(--steel); border: 1px solid var(--steel-2); border-radius: var(--radius-lg); overflow: hidden; }
.panel__head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .25rem .75rem; padding: .9rem 1.15rem; border-bottom: 1px solid var(--steel-2); }
.panel__head h3 { font-size: 1.1rem; text-transform: uppercase; color: #fff; }
.panel__head .meta { font-family: var(--font-mono); font-size: .75rem; color: var(--smoke); }
.panel__body { padding: 1.15rem; }
.kpis { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
.kpi { background: var(--ink); border: 1px solid var(--steel-2); border-radius: var(--radius); padding: 1rem; }
.kpi .k-num { font-family: var(--font-mono); font-weight: 700; font-size: 1.8rem; color: #fff; }
.kpi .k-num b { color: var(--navy); }
.kpi .k-lab { font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; color: var(--smoke); }

/* occupancy */
.occ { text-align: center; }
.occ__gauge { --pct: 70; position: relative; width: 170px; height: 170px; margin: .5rem auto 1rem; border-radius: 50%;
  background: conic-gradient(var(--red) calc(var(--pct)*1%), var(--steel-2) 0); display: grid; place-items: center; }
.occ__gauge::after { content: ""; position: absolute; inset: 16px; border-radius: 50%; background: var(--steel); }
.occ__val { position: relative; z-index: 1; font-family: var(--font-mono); font-weight: 700; }
.occ__val b { font-size: 2.4rem; color: #fff; display: block; line-height: 1; }
.occ__val span { font-size: .75rem; color: var(--smoke); text-transform: uppercase; letter-spacing: .1em; }
.occ__track { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; margin-top: .5rem; }
.occ__slot { width: 22px; height: 22px; border-radius: 4px; background: var(--steel-2); }
.occ__slot.on { background: var(--red); }

/* instructor slot grid */
.slot-grid { overflow-x: auto; }
.slot-grid table { border-collapse: collapse; width: 100%; min-width: 520px; }
.slot-grid th, .slot-grid td { border: 1px solid var(--steel-2); padding: .5rem; text-align: center; font-size: .82rem; }
.slot-grid thead th { font-family: var(--font-display); text-transform: uppercase; color: var(--smoke); font-weight: 600; letter-spacing: .04em; }
.slot-grid tbody th { font-family: var(--font-mono); color: #cfd5e0; text-align: end; white-space: nowrap; }
.slot { border-radius: 4px; padding: .35rem .2rem; font-family: var(--font-display); text-transform: uppercase; font-size: .72rem; letter-spacing: .04em; }
.slot--open { background: rgba(31,170,107,.15); color: #4bd699; }
.slot--booked { background: rgba(39,50,133,.28); color: #cfe0ff; }
.slot--blocked { background: rgba(139,147,163,.14); color: #8b93a3; }

.dash-footer { text-align: center; padding: 1.5rem; color: var(--smoke); font-size: .8rem; border-top: 1px solid var(--steel-2); }

/* ---- Footer --------------------------------------------------------------- */
.site-footer { background: #0f1116; color: #cfd5e0; padding-block: clamp(2.5rem, 6vw, 3.5rem); border-top: 3px solid var(--lime); }
.site-footer .wrap { display: grid; gap: 2rem; grid-template-columns: 1fr; }
.footer-brand { display: flex; align-items: center; gap: .6rem; margin-bottom: .75rem; }
/* Same plate as the header; matched to the sidebar logo's visual weight (128px). */
.footer-brand .logo-plate img { width: 128px; }
.footer-brand .brand__name { color: #fff; }
.site-footer p { color: var(--smoke); font-size: .92rem; margin: 0; max-width: 40ch; }
.footer-cols { display: grid; gap: 1.5rem; grid-template-columns: repeat(2, 1fr); }
.footer-cols h4 { font-family: var(--font-display); text-transform: uppercase; color: #fff; font-size: .95rem; letter-spacing: .06em; margin-bottom: .6rem; }
.footer-cols a { display: block; padding: .3rem 0; color: var(--smoke); font-size: .92rem; }
.footer-cols a:hover { color: #fff; }
.footer-bottom {
  border-top: 1px solid #23262f; margin-top: 2rem; padding-top: 1.5rem;
  display: flex; flex-wrap: wrap; gap: .5rem 1rem; align-items: center; justify-content: space-between;
}
.footer-bottom .powered { font-family: var(--font-display); text-transform: uppercase; letter-spacing: .08em; font-size: .85rem; color: #fff; }
.footer-bottom .powered b { color: var(--red); }
.footer-bottom small { color: var(--smoke); font-size: .8rem; }

/* ---- Utilities & page intro ---------------------------------------------- */
.page-intro { background: var(--ink); color: #fff; position: relative; overflow: hidden; padding-block: clamp(2.5rem, 6vw, 4rem); }
.page-intro::before { content:""; position:absolute; inset:0; background: radial-gradient(700px 300px at 85% -30%, rgba(39,50,133,.25), transparent 60%); }
.page-intro__inner { position: relative; z-index: 1; }
.page-intro h1 { font-size: clamp(2.2rem, 8vw, 4rem); text-transform: uppercase; font-style: italic; }
.page-intro p { color: #c7cedd; max-width: 52ch; margin-top: 1rem; }
.breadcrumb { font-family: var(--font-mono); font-size: .8rem; color: var(--smoke); margin-bottom: 1rem; }
.breadcrumb a:hover { color: #fff; }

/* ---- Charcoal grounds (opt-in) -------------------------------------------
   Two sections move off the default black onto charcoal #1C1C1E: the index
   "Find us" block (.section--charcoal, alongside .section--ink) and flat
   page-intro headers (.page-intro--charcoal, e.g. book.html). Charcoal is
   near-black, so these only swap the ground colour — eyebrow (lime, 13:1),
   primary CTAs, secondary text and hairlines all inherit the normal
   dark-ground treatment from .section--ink / .page-intro. */
.section--charcoal { background: var(--ink-grey); }
.page-intro--charcoal { background: var(--ink-grey); }
.lede { font-size: 1.1rem; color: var(--slate); max-width: 60ch; }

/* ---- Responsive ----------------------------------------------------------- */
@media (min-width: 720px) {
  .cards { grid-template-columns: repeat(3, 1fr); }
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .form-row { grid-template-columns: 1fr 1fr; }
  .session-pick { grid-template-columns: 1fr 1fr; }
  .location { grid-template-columns: 1.1fr .9fr; }
  .split { grid-template-columns: 1fr 1fr; }
  .cta-band__inner { grid-template-columns: 1fr auto; }
  .cta-band__inner .btn { justify-self: end; }
  .site-footer .wrap { grid-template-columns: 1.4fr 1fr; }
  .footer-cols { grid-template-columns: repeat(3, 1fr); }
  .kpis { grid-template-columns: repeat(4, 1fr); }
  .kpis--3 { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 960px) {
  /* Left-align the links next to the logo; free space falls between the link
     group and the right-hand actions (which stay pinned right). */
  .nav__links { display: flex; justify-content: flex-start; }
  .brand .logo-plate img { width: 116px; }
  .nav__toggle { display: none; }
  .dash__body { grid-template-columns: 2fr 1fr; }
  .dash__body .panel--wide { grid-column: 1 / -1; }
}

/* ---- RTL ------------------------------------------------------------------ */
[dir="rtl"] body { font-family: var(--font-body); }
[dir="rtl"] .hero h1, [dir="rtl"] .page-intro h1 { font-style: normal; }

/* ---- Motion / a11y -------------------------------------------------------- */
:focus-visible { outline: 2px solid var(--blue-glow); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}

/* reveal-on-scroll */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; } }

/* ---- Photo media (real images) ------------------------------------------- */
/* Source photos are ~750px wide; cover-fit + dark scrims keep softness subtle. */

/* Hero: full-bleed background photo with dark overlay, text on top */
.hero { isolation: isolate; }
.hero__bg {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: center 62%; z-index: 0;
}
/* Left-weighted scrim: dark behind the text, clearing to ~25% at right */
.hero__overlay {
  position: absolute; inset: 0; z-index: 1;
  background:
    linear-gradient(90deg,
      rgba(20,22,27,.90) 0%,
      rgba(20,22,27,.72) 28%,
      rgba(20,22,27,.45) 60%,
      rgba(20,22,27,.25) 100%),
    radial-gradient(760px 440px at 90% 0%, rgba(39,50,133,.20), transparent 62%);
}
[dir="rtl"] .hero__overlay {
  background:
    linear-gradient(270deg,
      rgba(20,22,27,.90) 0%,
      rgba(20,22,27,.72) 28%,
      rgba(20,22,27,.45) 60%,
      rgba(20,22,27,.25) 100%),
    radial-gradient(760px 440px at 10% 0%, rgba(39,50,133,.20), transparent 62%);
}
.hero__content { max-width: 640px; }

/* Academy header: photo behind the dark intro */
.page-intro__bg {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: 30% 42%; z-index: 0; opacity: .5;
}
.page-intro__scrim {
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(180deg, rgba(20,22,27,.55), rgba(20,22,27,.88));
}
.page-intro__inner { z-index: 2; }

/* Members storage photo */
.split__media { aspect-ratio: 4 / 3; }
.split__media img { width: 100%; height: 100%; object-fit: cover; }

/* Location photo */
.location__map { padding: 0; }
.location__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; }
.location__map .location__pin {
  position: absolute; inset-inline-start: 1rem; bottom: 1rem; z-index: 1; text-align: start;
  background: rgba(20,22,27,.72); padding: .55rem .9rem; border-radius: var(--radius);
  backdrop-filter: blur(4px);
}
.location__map .location__pin b { font-size: 1rem; color: var(--navy); }

/* Section-break image bands */
.section-break { position: relative; height: clamp(180px, 26vw, 300px); overflow: hidden; background: var(--ink); }
.section-break img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; }
.section-break__scrim {
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(90deg, rgba(20,22,27,.9) 0%, rgba(20,22,27,.5) 45%, rgba(204,218,83,.28) 100%);
}
.section-break .wrap { position: relative; z-index: 2; height: 100%; display: flex; align-items: center; }
.section-break__label { color: #fff; }
.section-break__label h3 { font-size: clamp(1.3rem, 4vw, 2rem); text-transform: uppercase; font-style: italic; margin-top: .4rem; }
[dir="rtl"] .section-break__label h3 { font-style: normal; }
[dir="rtl"] .section-break__scrim { background: linear-gradient(270deg, rgba(20,22,27,.9) 0%, rgba(20,22,27,.5) 45%, rgba(204,218,83,.28) 100%); }

/* ---- Slot picker (book.html) — driven by config availability ------------- */
.slotpick { border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 1rem; background: var(--mist); }
.slotpick__days { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: 1rem; }
.slotpick__day { font-family: var(--font-display); text-transform: uppercase; font-size: .85rem; letter-spacing: .03em; padding: .5rem .85rem; border: 1px solid var(--line); background: #fff; color: var(--slate); border-radius: var(--radius); cursor: pointer; }
.slotpick__day[aria-pressed="true"] { background: var(--blue); color: #fff; border-color: var(--blue); }
.slotpick__slots { display: flex; flex-wrap: wrap; gap: .5rem; }
.slotpick__slot { display: inline-flex; flex-direction: column; align-items: flex-start; gap: .1rem; padding: .55rem .9rem; border: 1px solid var(--line); background: #fff; border-radius: var(--radius); font-family: var(--font-body); cursor: pointer; text-align: start; }
.slotpick__slot b { font-family: var(--font-display); text-transform: uppercase; font-size: .9rem; letter-spacing: .02em; }
.slotpick__slot small { font-size: .7rem; color: var(--smoke); text-transform: uppercase; letter-spacing: .06em; }
.slotpick__slot[aria-pressed="true"] { border-color: var(--blue); box-shadow: inset 0 0 0 1px var(--blue); background: rgba(39,50,133,.05); }
.slotpick__slot:disabled { opacity: .5; cursor: not-allowed; }
.slotpick__empty { color: var(--smoke); font-size: .9rem; margin: 0; }

/* ==========================================================================
   Disciplines — booking discipline picker + apply checkboxes.
   Added for the four-discipline (config-driven) feature.
   ========================================================================== */

/* Discipline picker (book.html) — light form context */
.disc-pick { display: grid; gap: .6rem; grid-template-columns: 1fr; }
.disc-chip {
  display: flex; align-items: center; gap: .85rem; text-align: start;
  padding: .8rem .95rem; border: 1px solid var(--line); background: #fff;
  border-radius: var(--radius-lg); cursor: pointer; font-family: var(--font-body);
  transition: border-color .15s, box-shadow .15s;
  /* Uniform height regardless of label length, so a long name (e.g. "Circuit
     Racing") never makes one card taller than the rest of the row. */
  min-height: 66px;
}
.disc-chip:hover { border-color: var(--accent, var(--blue)); }
.disc-chip__icon {
  flex: 0 0 40px; width: 40px; height: 40px; display: grid; place-items: center;
  border-radius: var(--radius); background: rgba(39,50,133,.06); color: var(--accent, var(--blue));
}
.disc-chip__icon svg { width: 24px; height: 24px; }
.disc-chip__text { min-width: 0; }
.disc-chip b {
  display: block; font-family: var(--font-display); text-transform: uppercase;
  font-size: 1rem; letter-spacing: .02em; color: var(--ink);
  white-space: nowrap;  /* keep the name on one line */
}
/* Description: always visible, on its own line under the name. */
.disc-chip__desc { display: block; font-size: .78rem; color: var(--slate); margin-top: .12rem; }
.disc-chip[aria-pressed="true"] { border-color: var(--accent, var(--blue)); box-shadow: inset 0 0 0 1px var(--accent, var(--blue)); background: rgba(39,50,133,.04); }
@media (min-width: 620px) { .disc-pick { grid-template-columns: 1fr 1fr; } }

/* Apply-to-coach discipline checkboxes */
.check-grid { display: grid; gap: .5rem; grid-template-columns: 1fr 1fr; }
.check-chip {
  display: flex; align-items: center; gap: .55rem; padding: .65rem .8rem;
  border: 1px solid var(--line); border-radius: var(--radius); background: #fff; cursor: pointer;
  font-family: var(--font-body); text-transform: none; letter-spacing: 0; font-size: .95rem; margin: 0;
}
.check-chip input { width: auto; }
.check-chip:has(input:checked) { border-color: var(--blue); box-shadow: inset 0 0 0 1px var(--blue); background: rgba(39,50,133,.05); }

/* ==========================================================================
   Time-level slot picker (book.html) — day fullness states + time grid.
   ========================================================================== */
.slot-legend { display: flex; flex-wrap: wrap; gap: .9rem; margin-bottom: .85rem; font-size: .72rem; }
.slot-legend__item { display: inline-flex; align-items: center; gap: .35rem; text-transform: uppercase; letter-spacing: .05em; color: var(--slate); }
.slot-legend__item::before { content: ""; width: 10px; height: 10px; border-radius: 3px; }
.slot-legend__item.is-available::before { background: var(--ok); }
.slot-legend__item.is-limited::before { background: var(--warn); }
.slot-legend__item.is-full::before { background: var(--mist); border: 1px solid var(--smoke); }

/* Day buttons carry a fullness state (available / limited / full) */
.slotpick__day { min-height: 44px; }
.slotpick__day b { display: block; }
.slotpick__day small { display: block; font-size: .62rem; text-transform: uppercase; letter-spacing: .05em; color: var(--smoke); margin-top: .1rem; }
.slotpick__day.is-available { border-color: rgba(31,170,107,.55); }
.slotpick__day.is-limited { border-color: rgba(224,163,39,.65); }
.slotpick__day.is-full { opacity: .55; }
.slotpick__day[aria-pressed="true"] small { color: rgba(255,255,255,.85); }

/* Concrete start-time grid — 2 columns + 44px targets on mobile */
.time-grid { display: grid; gap: .5rem; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); margin-top: .25rem; }
.time-grid:empty { margin: 0; }
.time-slot { display: flex; flex-direction: column; align-items: flex-start; gap: .1rem; min-height: 44px; padding: .5rem .7rem; border: 1px solid var(--line); background: #fff; border-radius: var(--radius); cursor: pointer; font-family: var(--font-body); text-align: start; }
.time-slot b { font-family: var(--font-mono); font-size: .98rem; color: var(--ink); }
.time-slot small { font-size: .64rem; color: var(--smoke); text-transform: uppercase; letter-spacing: .04em; }
.time-slot[aria-pressed="true"], .time-slot.is-selected { border-color: var(--blue); box-shadow: inset 0 0 0 1px var(--blue); background: rgba(39,50,133,.05); }
.time-slot[disabled], .time-slot.is-full { opacity: .45; cursor: default; background: var(--mist); }

/* Karting drivers stepper */
.kart-stepper { display: inline-flex; align-items: center; gap: .75rem; margin-top: .25rem; }
.kart-stepper__btn { width: 2.25rem; height: 2.25rem; border: 1px solid var(--line); background: #fff; border-radius: var(--radius); font-size: 1.25rem; line-height: 1; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.kart-stepper__btn:disabled { opacity: .4; cursor: default; }
.kart-stepper__val { font-family: var(--font-mono); font-size: 1.25rem; font-weight: 700; min-width: 2rem; text-align: center; }

.session-pick .s-dur { font-style: normal; font-family: var(--font-mono); font-size: .72rem; color: var(--smoke); margin-inline-start: .3rem; }

@media (max-width: 560px) {
  .time-grid { grid-template-columns: 1fr 1fr; }
  .slotpick__day { flex: 1 1 auto; }
}

/* ==========================================================================
   Discipline cards (index #disciplines) — four-across grid. Scoped to
   #disciplineCards so the 3-up "three ways" cards are unaffected.
   4 across >=1000px, 2x2 700-999px, single column <700px. Equal heights.
   ========================================================================== */
#disciplineCards { grid-template-columns: 1fr; margin-bottom: 0; }
#disciplineCards .card { display: flex; flex-direction: column; }
#disciplineCards .card__link { margin-top: auto; }
@media (min-width: 700px) { #disciplineCards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { #disciplineCards { grid-template-columns: repeat(4, 1fr); } }

/* ==========================================================================
   RTL safety. The language toggle sets <html dir="rtl">; flex/grid rows and
   logical text-align mirror automatically. These handle the Latin-locked
   bits that must not be reordered by the bidi algorithm.
   ========================================================================== */
[dir="rtl"] .brand__name { direction: ltr; }   /* logo stays FP·MOTORSPORTS */
[dir="rtl"] .powered b { direction: ltr; }
[dir="rtl"] .summary { direction: ltr; text-align: left; }  /* booking summary block */

/* Arabic display headings use Cairo (Oswald has no Arabic glyphs); its tall
   glyphs get clipped at the tight Latin line-height (1.02). Give the big
   hero/intro headings more leading + a little top room in RTL. */
[dir="rtl"] .hero h1,
[dir="rtl"] .page-intro h1 { line-height: 1.3; padding-block-start: .12em; }

/* ==========================================================================
   Apply page — supporting-documents upload (demo, TODO PHASE 2).
   ========================================================================== */
.field .opt { font-family: var(--font-body); text-transform: none; letter-spacing: 0; font-size: .78rem; color: var(--smoke); font-weight: 400; }
.dropzone { border: 2px dashed var(--line); border-radius: var(--radius-lg); background: var(--mist); padding: 1.5rem 1rem; text-align: center; cursor: pointer; transition: border-color .15s, background .15s; }
.dropzone:hover, .dropzone:focus-visible { border-color: var(--blue); outline: none; }
.dropzone.is-drag { border-color: var(--blue); background: rgba(39,50,133,.06); }
.dropzone svg { width: 34px; height: 34px; color: var(--blue); margin: 0 auto .5rem; }
.dropzone__hint { font-weight: 600; margin: 0; }
.dropzone__accept { font-size: .82rem; color: var(--slate); margin: .25rem 0 .9rem; }
.filegrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .6rem; margin-top: .75rem; }
.filegrid:empty { margin: 0; }
.filecard { position: relative; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; overflow: hidden; display: flex; flex-direction: column; }
.filecard__thumb { height: 90px; background: var(--mist); display: grid; place-items: center; overflow: hidden; }
.filecard__thumb img { width: 100%; height: 100%; object-fit: cover; }
.filecard__pdf { font-family: var(--font-display); font-weight: 700; color: var(--navy); letter-spacing: .05em; }
.filecard__meta { padding: .45rem .55rem; display: grid; gap: .1rem; }
.filecard__name { font-size: .8rem; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.filecard__size { font-family: var(--font-mono); font-size: .72rem; color: var(--smoke); }
.filecard__note { font-size: .68rem; color: var(--warn); }
.filecard__del { position: absolute; top: .3rem; inset-inline-end: .3rem; width: 24px; height: 24px; border-radius: 50%; border: 0; background: rgba(20,22,27,.7); color: #fff; font-size: .8rem; line-height: 1; cursor: pointer; }
.filecard__del:hover { background: var(--red); }

/* ---- Membership plan picker (join.html) ---- */
.plan-pick { display: grid; gap: .6rem; grid-template-columns: 1fr; }
.plan-pick .plan-card { position: relative; display: flex; flex-direction: column; gap: .25rem; border: 1px solid var(--line); border-radius: var(--radius); padding: .9rem 1rem; margin: 0; cursor: pointer; text-transform: none; letter-spacing: 0; transition: border-color .15s, box-shadow .15s, background .15s; }
.plan-card:hover { border-color: var(--blue); }
.plan-card input { position: absolute; opacity: 0; pointer-events: none; }
.plan-card.is-sel { border-color: var(--blue); box-shadow: inset 0 0 0 1px var(--blue); background: rgba(39,50,133,.05); }
.plan-card__name { font-family: var(--font-display); text-transform: uppercase; letter-spacing: .04em; font-size: 1.05rem; color: var(--ink); }
.plan-card__price { font-family: var(--font-mono); color: var(--slate); font-size: .95rem; }
.plan-card__price small { color: var(--smoke); font-size: .8rem; }
.plan-card__tag { align-self: flex-start; margin-top: .3rem; font-size: .72rem; font-family: var(--font-display); text-transform: uppercase; letter-spacing: .05em; color: var(--blue); background: rgba(39,50,133,.1); border-radius: 999px; padding: .15rem .6rem; }
@media (min-width: 620px) { .plan-pick { grid-template-columns: repeat(3, 1fr); } }

/* ---- Membership duration picker (join.html) ---- */
.dur-pick { display: grid; gap: .5rem; grid-template-columns: repeat(2, 1fr); }
.dur-pick .dur-card { position: relative; display: flex; flex-direction: column; gap: .15rem; border: 1px solid var(--line); border-radius: var(--radius); padding: .7rem .8rem; margin: 0; cursor: pointer; text-transform: none; letter-spacing: 0; transition: border-color .15s, box-shadow .15s, background .15s; }
.dur-card:hover { border-color: var(--blue); }
.dur-card input { position: absolute; opacity: 0; pointer-events: none; }
.dur-card.is-sel { border-color: var(--blue); box-shadow: inset 0 0 0 1px var(--blue); background: rgba(39,50,133,.05); }
.dur-card__mo { font-family: var(--font-display); text-transform: uppercase; letter-spacing: .03em; font-size: .92rem; color: var(--ink); }
.dur-card__price { font-family: var(--font-mono); font-size: .76rem; color: var(--slate); }
.dur-card__save { align-self: flex-start; margin-top: .25rem; font-size: .66rem; font-family: var(--font-display); text-transform: uppercase; letter-spacing: .04em; color: var(--ok); background: rgba(31,170,107,.12); border-radius: 999px; padding: .12rem .5rem; }
@media (min-width: 620px) { .dur-pick { grid-template-columns: repeat(4, 1fr); } }

/* ---- Vehicles-for-storage rows (join.html) ---- */
#joinVehSection { margin-bottom: 1.15rem; }
.jveh { border: 1px solid var(--line); border-radius: var(--radius); padding: .85rem; margin-bottom: .6rem; background: #fff; }
.jveh__grid { display: grid; gap: .7rem; grid-template-columns: 1fr 1fr; }
.jveh__rm { margin-top: .7rem; background: none; border: 1px solid var(--line); color: var(--slate); border-radius: 999px; padding: .3rem .85rem; font-size: .76rem; cursor: pointer; font-family: var(--font-display); text-transform: uppercase; letter-spacing: .04em; }
.jveh__rm:hover { color: var(--navy); border-color: var(--lime); }
#joinAddVeh { display: inline-flex; align-items: center; border: 1px solid var(--blue); background: transparent; color: var(--blue); border-radius: 999px; padding: .45rem 1rem; font-family: var(--font-display); text-transform: uppercase; letter-spacing: .04em; font-size: .82rem; cursor: pointer; }
#joinAddVeh:hover { background: rgba(39,50,133,.08); }
@media (max-width: 520px) { .jveh__grid { grid-template-columns: 1fr; } }

/* ---- Nav: compact "Log in" ghost button (injected by app.js) ------------- */
.nav__login {
  background: transparent; border: 1px solid var(--steel-2); color: #cfd5e0;
  border-radius: var(--radius); padding: .4rem .9rem; font-family: var(--font-display);
  font-size: .8rem; letter-spacing: .04em; text-transform: uppercase; cursor: pointer;
  text-decoration: none; display: inline-flex; align-items: center; white-space: nowrap;
  transition: color .15s, border-color .15s;
}
.nav__login:hover { color: #fff; border-color: var(--smoke); }

/* ---- Utility: visually hidden but not display:none (honeypot, etc.) ------- */
.vh-hidden {
  position: absolute; inset-inline-start: 0; top: 0;
  width: 1px; height: 1px; overflow: hidden; opacity: 0; pointer-events: none;
}

/* ---- Text link styled as a button (no bg, inherits font) ------------------- */
.link-btn {
  background: none; border: none; color: var(--navy); cursor: pointer;
  font-family: inherit; font-size: inherit; padding: 0;
  text-decoration: underline; min-height: 44px; display: inline-flex; align-items: center;
}
.link-btn:hover { color: var(--blue); }

/* ---- Booking form member card (book.html) --------------------------------- */
.bk-member-card { margin-bottom: 1.5rem; }
.bk-mb-prompt {
  background: var(--mist); border: 1px solid var(--mist-2);
  border-radius: var(--radius); padding: .8rem 1rem;
}
.bk-mb-prompt__lead { margin: 0 0 .5rem; }
.bk-mb-full { width: 100%; margin-bottom: .5rem; }
.bk-mb-msg { margin: .4rem 0 0; font-size: .86rem; }
.bk-mb-signed {
  background: var(--mist); border: 1px solid var(--mist-2);
  border-radius: var(--radius); padding: .8rem 1rem; margin-bottom: 1.1rem;
}
.bk-mb-signed__msg { margin: 0 0 .3rem; font-size: .9rem; }
.bk-mb-signed__note { margin: 0; font-size: .84rem; color: var(--smoke); }
.bk-mb-signed__actions { margin: .3rem 0 0; font-size: .84rem; }
.bk-mb-signed__actions a { color: var(--blue); text-decoration: underline; }
.bk-mb-signed__actions a:hover { color: var(--navy); }

/* ---- Booking form member card tabs (book.html) ---------------------------- */
.bk-mb-tabs { display: flex; gap: .25rem; margin-bottom: .6rem; }
.bk-mb-tab {
  flex: 1; padding: .35rem .5rem; font-size: .78rem; font-family: var(--font-display);
  letter-spacing: .04em; text-transform: uppercase; cursor: pointer;
  background: transparent; border: 1px solid var(--mist-2); border-radius: var(--radius);
  color: var(--smoke); line-height: 1.2;
}
.bk-mb-tab[aria-selected="true"] { background: var(--navy); color: #fff; border-color: var(--navy); }
.bk-mb-tab:hover:not([aria-selected="true"]) { border-color: var(--navy); color: var(--navy); }

/* ---- Login page (login.html) --------------------------------------------- */

/* Narrow outer padding for the page body (between page-intro and footer) */
.lg-body { padding-block: clamp(2rem, 5vw, 3.5rem); }

/* Two-column layout: navy left panel + card on the right.
   On mobile (< 900px) the panel is hidden and only the card shows. */
.lg-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: stretch;
  max-width: 980px;
  margin-inline: auto;
}
@media (min-width: 900px) {
  .lg-layout { grid-template-columns: 42fr 58fr; gap: 3.5rem; }
}

/* Left navy panel — hidden on mobile */
.lg-panel {
  display: none;
  background: var(--navy); border-radius: var(--radius-lg);
  padding: clamp(2rem, 4vw, 2.8rem); color: #fff;
}
@media (min-width: 900px) { .lg-panel { display: block; } }

.lg-panel__title {
  font-family: var(--font-display); text-transform: uppercase; font-size: clamp(1.4rem, 3vw, 1.9rem);
  font-style: italic; margin: 0 0 1.5rem; letter-spacing: .02em;
}
[dir="rtl"] .lg-panel__title { font-style: normal; }

.lg-panel__lime {
  width: 2.2rem; height: 4px; background: var(--lime); border-radius: 2px; margin-bottom: 1.6rem;
}

.lg-benefits { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 1rem; }
.lg-benefits li {
  display: flex; align-items: flex-start; gap: .75rem;
  font-size: .95rem; color: #c2c8d4; line-height: 1.5;
}
.lg-benefits li::before {
  content: ""; flex-shrink: 0; width: 18px; height: 18px; margin-top: .12em;
  background: var(--lime); border-radius: 50%;
  /* checkmark via clip-path */
  clip-path: polygon(20% 50%, 40% 70%, 80% 25%, 85% 30%, 40% 80%, 15% 55%);
}

.lg-panel__not-member {
  margin-top: 2rem; padding-top: 1.4rem; border-top: 1px solid var(--steel-2);
  font-size: .85rem; color: #8899bb;
}
.lg-panel__not-member a { color: var(--lime); text-decoration: underline; }
.lg-panel__not-member a:hover { color: #fff; }

/* Right-side card */
.lg-card { width: 100%; max-width: 480px; margin-inline: auto; padding: 1.5rem; display: flex; flex-direction: column; }
@media (min-width: 900px) { .lg-card { max-width: none; margin: 0; padding: 2rem; } }
.lg-card > .lg-in-panel,
.lg-card > .lg-pw-panel,
.lg-card > .form-card { flex: 1; }

/* Tab bar */
.lg-tabs {
  display: flex; border-bottom: 2px solid var(--line-soft); margin-bottom: 1.8rem; gap: 0;
}
.lg-tab {
  flex: 1; background: none; border: none; padding: .75rem .5rem;
  font-family: var(--font-display); text-transform: uppercase; letter-spacing: .05em;
  font-size: .88rem; color: var(--smoke); cursor: pointer; border-bottom: 3px solid transparent;
  margin-bottom: -2px; transition: color .15s, border-color .15s;
}
.lg-tab:hover { color: var(--navy); }
.lg-tab[aria-selected="true"] { color: var(--navy); border-bottom-color: var(--navy); font-weight: 600; }
.lg-tab:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

/* Tab panels */
.lg-panel-code[hidden],
.lg-panel-pw[hidden] { display: none; }

/* Code step rows */
.lg-step1[hidden],
.lg-step2[hidden] { display: none; }

/* Large code input */
.lg-code-input {
  font-size: 2rem; letter-spacing: .35em; text-align: center; font-family: var(--font-mono);
  font-weight: 600; padding: .7rem .5rem;
}
[dir="rtl"] .lg-code-input { direction: ltr; text-align: center; }

/* Resend row */
.lg-resend-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: .75rem; flex-wrap: wrap; }
.lg-countdown { font-size: .82rem; color: var(--smoke); }
.lg-other-email { background: none; border: none; color: var(--blue); text-decoration: underline; font-size: .84rem; cursor: pointer; padding: 0; font-family: var(--font-body); }
.lg-other-email:hover { color: var(--navy); }

/* Password field show/hide toggle */
.lg-pw-wrap { position: relative; }
.lg-pw-wrap input { padding-inline-end: 3rem; }
.lg-pw-toggle {
  position: absolute; inset-inline-end: .75rem; top: 50%; transform: translateY(-50%);
  background: none; border: none; cursor: pointer; color: var(--smoke); padding: .25rem; line-height: 1;
}
.lg-pw-toggle:hover { color: var(--navy); }

/* Forgot password link */
.lg-forgot { display: block; text-align: end; margin-bottom: 1rem; font-size: .84rem; color: var(--blue); text-decoration: underline; background: none; border: none; cursor: pointer; font-family: var(--font-body); padding: 0; }
.lg-forgot:hover { color: var(--navy); }
.lg-forgot-note { font-size: .84rem; color: var(--smoke); background: var(--mist); border-radius: var(--radius); padding: .65rem .85rem; margin-bottom: 1rem; line-height: 1.5; }

/* Error message */
.lg-err { font-size: .85rem; color: var(--danger); min-height: 1.1em; margin-bottom: .75rem; }
.lg-err:empty { margin-bottom: 0; }
#lgStatus:empty { min-height: 0; margin: 0; }

/* "Already signed in" panel */
.lg-in-panel[hidden] { display: none; }
.lg-in-panel { padding: 1.5rem; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--paper); }
.lg-in-panel__name { font-size: 1.1rem; font-weight: 600; font-family: var(--font-display); text-transform: uppercase; letter-spacing: .04em; margin: 0 0 .4rem; }
.lg-in-panel__role { display: inline-block; font-size: .75rem; font-family: var(--font-display); text-transform: uppercase; letter-spacing: .06em; padding: .2rem .65rem; border-radius: 999px; background: rgba(39,50,133,.1); color: var(--navy); margin-bottom: 1.2rem; }
.lg-in-panel__actions { display: flex; flex-direction: column; gap: .7rem; }
.lg-in-panel__actions a,
.lg-in-panel__actions button { text-align: start; }
.lg-in-panel__actions [hidden] { display: none !important; }

/* Set-password panel */
.lg-pw-panel[hidden] { display: none; }
.lg-pw-panel { padding: 1.5rem; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--paper); }
.lg-pw-panel h2 { font-family: var(--font-display); text-transform: uppercase; letter-spacing: .03em; font-size: 1.25rem; margin: 0 0 .4rem; }
.lg-pw-panel p { font-size: .9rem; color: var(--smoke); margin: 0 0 1.3rem; line-height: 1.5; }
