/* Z2 Track Days concept site.
   Tokens first, then base, layout, components. One stylesheet, no build step. */
:root {
  --asphalt: #1c1e22;
  --asphalt-2: #2a2d33;
  --paper: #f2f3f0;
  --white: #ffffff;
  --ink: #16181b;
  --muted: #5b616b;
  --line: #d5d8d3;
  --z2: #1740d6;          /* Z2 logo blue */
  --z2-dark: #0f2c9a;
  --curb: #d3232a;        /* sold out, warnings */
  /* Group colours come straight from Z2's own session sheet */
  --ga: #ffe14d;          /* A  Advanced */
  --gbp: #cdd4df;         /* B+ Fast intermediate */
  --gbm: #86a8ea;         /* B- Intermediate */
  --gc: #92d050;          /* C  Novice school */
  --gn: #f4a259;          /* NRS New Racer School */
  --display: "Saira Condensed", "Arial Narrow", sans-serif;
  --body: "Source Sans 3", system-ui, sans-serif;
  --wrap: 1180px;
  --r: 6px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 1.0625rem/1.55 var(--body); }
[hidden] { display: none !important; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--z2); text-underline-offset: 3px; }
a:hover { color: var(--z2-dark); }
:focus-visible { outline: 3px solid var(--z2); outline-offset: 2px; }
h1, h2, h3, h4 { font-family: var(--display); font-weight: 700; line-height: 1.05; margin: 0 0 .5em; letter-spacing: .005em; }
h1 { font-size: clamp(2.6rem, 6vw, 4.6rem); }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.75rem); }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.2rem; }
p { margin: 0 0 1em; max-width: 68ch; }
ul, ol { padding-left: 1.2em; margin: 0 0 1em; max-width: 68ch; }
li { margin-bottom: .35em; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.lede { font-size: 1.25rem; color: var(--muted); }
.muted { color: var(--muted); }
.small { font-size: .92rem; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* ---------- Concept notice + header ---------- */
.concept { background: var(--ga); color: var(--ink); font-size: .92rem; padding: 7px 0; }
.concept a { color: var(--ink); font-weight: 600; }
.top { background: var(--asphalt); color: #fff; position: sticky; top: 0; z-index: 20; }
.top .wrap { display: flex; align-items: center; gap: 24px; min-height: 64px; }
.brand img { height: 34px; width: auto; filter: invert(1); }
.nav { display: flex; gap: 4px; margin-left: auto; align-items: center; flex-wrap: wrap; }
.nav a { color: #e8eaee; text-decoration: none; padding: 8px 10px; border-radius: var(--r); font-weight: 600; font-size: .98rem; }
.nav a:hover, .nav a[aria-current="page"] { background: var(--asphalt-2); color: #fff; }
.nav a.cta { background: var(--z2); color: #fff; margin-left: 8px; }
.nav a.cta:hover { background: #2a55f0; }
.menu-btn { display: none; margin-left: auto; background: none; border: 1px solid #555b66; color: #fff; padding: 8px 12px; border-radius: var(--r); font: 600 1rem var(--body); }
@media (max-width: 1120px) {
  .menu-btn { display: block; }
  .nav { display: none; width: 100%; flex-direction: column; align-items: stretch; padding-bottom: 14px; margin: 0; }
  .nav.open { display: flex; }
  .top .wrap { flex-wrap: wrap; }
  .nav a.cta { margin-left: 0; text-align: center; }
}

/* ---------- Buttons ---------- */
.btn { display: inline-block; background: var(--z2); color: #fff; font: 600 1.05rem var(--body); padding: 12px 20px; border: 0; border-radius: var(--r); text-decoration: none; cursor: pointer; }
.btn:hover { background: var(--z2-dark); color: #fff; }
.btn.ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 2px var(--ink); }
.btn.ghost:hover { background: var(--ink); color: #fff; }
.btn.light { background: #fff; color: var(--ink); }
.btn.light:hover { background: var(--ga); color: var(--ink); }
.btn.sm { padding: 7px 12px; font-size: .95rem; }
.btn[disabled] { background: #9aa0aa; cursor: not-allowed; }
.btn-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 1.2em; }

/* ---------- Sections ---------- */
.band { padding: 64px 0; }
.band.tight { padding: 40px 0; }
.band.dark { background: var(--asphalt); color: #fff; }
.band.dark .lede, .band.dark .muted { color: #b6bcc7; }
.band.dark a:not(.btn) { color: #9db4ff; }
.band.white { background: var(--white); }
.band.blue { background: var(--z2); color: #fff; }
.band.blue a:not(.btn) { color: #fff; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.split.wide-left { grid-template-columns: 1.3fr 1fr; }
.cols-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.cols-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px; }
@media (max-width: 860px) { .split, .split.wide-left, .cols-3, .cols-2 { grid-template-columns: 1fr; gap: 28px; } .band { padding: 44px 0; } }
.photo { border-radius: var(--r); width: 100%; object-fit: cover; }
.page-head { background: var(--asphalt); color: #fff; padding: 48px 0 40px; }
.page-head .lede { color: #b6bcc7; max-width: 60ch; }
.crumbs { font-size: .92rem; margin-bottom: 14px; }
.crumbs a { color: #9db4ff; }

/* ---------- Hero ---------- */
.hero { background: var(--asphalt); color: #fff; position: relative; overflow: hidden; }
.hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 60% 40%; filter: grayscale(1) contrast(1.1); opacity: .55; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(28,30,34,.95) 0%, rgba(28,30,34,.6) 55%, rgba(28,30,34,.15) 100%); }
.hero .wrap { position: relative; z-index: 1; padding-top: 84px; padding-bottom: 36px; }
.hero h1 { max-width: 13ch; }
.hero .lede { color: #d5d9e0; max-width: 46ch; }
.hero-day { margin-top: 56px; }
.hero-day p { color: #c3c8d1; font-size: .98rem; margin: 0 0 10px; max-width: none; }

/* ---------- Session strip (the day as 20-minute blocks) ---------- */
.strip { display: flex; height: 46px; border-radius: 4px; overflow: hidden; gap: 2px; }
.strip i { display: block; flex: var(--m) 1 0; min-width: 0; font: 700 .95rem/46px var(--display); font-style: normal; text-align: center; color: var(--ink); overflow: hidden; }
.strip .gA, .chip.gA, .dot.gA { background: var(--ga); }
.strip .gBp, .chip.gBp, .dot.gBp { background: var(--gbp); }
.strip .gBm, .chip.gBm, .dot.gBm { background: var(--gbm); }
.strip .gC, .chip.gC, .dot.gC { background: var(--gc); }
.chip.gN, .dot.gN { background: var(--gn); }
.strip .brk { background: repeating-linear-gradient(135deg, #4a4f58 0 6px, #3a3e46 6px 12px); color: #fff; font-family: var(--body); font-weight: 600; font-size: .85rem; }
.strip-times { display: flex; justify-content: space-between; font-size: .85rem; color: var(--muted); margin-top: 6px; font-variant-numeric: tabular-nums; }
.band.dark .strip-times, .hero .strip-times { color: #aab0bb; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 20px; margin: 14px 0 0; padding: 0; list-style: none; font-size: .95rem; max-width: none; }
.legend li { display: flex; align-items: center; gap: 8px; margin: 0; }
.dot { width: 14px; height: 14px; border-radius: 3px; display: inline-block; flex: none; }
@media (max-width: 700px) { .strip i { font-size: 0; } .strip { height: 34px; gap: 1px; } }

/* ---------- Schedule rows (timing-sheet layout) ---------- */
/* Suit sizes: the size column stays in view while the chart scrolls on a phone. */
.size-chart { min-width: 820px; overflow: visible; font-variant-numeric: tabular-nums; }
.size-chart th, .size-chart td { white-space: nowrap; padding-left: 12px; padding-right: 12px; }
.size-chart th:first-child { position: sticky; left: 0; border-right: 1px solid var(--line); }
.size-chart tbody th { background: var(--white); font-weight: 700; }

/* Schedule filters: the selected track sits on a strip of red and white kerb. */
.filters { display: flex; gap: 28px; margin: 0 0 24px; border-bottom: 2px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.filters::-webkit-scrollbar { display: none; }
.filters button { position: relative; flex: none; font: 600 1.25rem/1.2 var(--display); padding: 8px 0 14px; border: 0; background: none; color: var(--muted); cursor: pointer; }
.filters button:hover { color: var(--ink); }
.filters button:focus-visible { outline: 2px solid var(--z2); outline-offset: -2px; }
.filters button[aria-pressed="true"] { color: var(--ink); }
.filters button[aria-pressed="true"]::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 8px; border-block: 1px solid var(--ink); background: repeating-linear-gradient(90deg, var(--curb) 0 14px, #fff 14px 28px); }
.month { font-family: var(--display); font-size: 1.35rem; font-weight: 700; color: var(--muted); margin: 34px 0 8px; }
.ev { display: grid; grid-template-columns: 120px 1fr auto; gap: 8px 24px; align-items: center; background: var(--white); border-left: 6px solid var(--z2); border-radius: var(--r); padding: 16px 20px; margin-bottom: 10px; }
.ev.special { border-left-color: var(--curb); }
.ev-date { font-family: var(--display); line-height: 1; }
.ev-date b { display: block; font-size: 2.5rem; font-weight: 700; }
.ev-date span { font-size: 1.05rem; color: var(--muted); font-weight: 600; }
.ev h3 { margin: 0 0 2px; font-size: 1.55rem; }
.ev h3 a { color: var(--ink); text-decoration: none; }
.ev h3 a:hover { color: var(--z2); text-decoration: underline; }
.ev p { margin: 0; color: var(--muted); font-size: .98rem; }
.ev-side { text-align: right; }
.ev-price { font: 700 1.5rem var(--display); display: block; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; padding: 0; list-style: none; max-width: none; }
.tags li { font-size: .82rem; font-weight: 600; background: var(--paper); border: 1px solid var(--line); border-radius: 4px; padding: 2px 8px; margin: 0; }
.avail { grid-column: 2 / -1; display: grid; gap: 6px; }
.avail-day { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: .9rem; }
.avail-day > span:first-child { width: 4.2em; color: var(--muted); font-weight: 600; }
.chip { display: inline-flex; align-items: baseline; gap: 6px; padding: 3px 9px; border-radius: 4px; font-weight: 600; font-size: .88rem; color: var(--ink); white-space: nowrap; }
.chip b { font-family: var(--display); font-size: 1.05rem; }
.chip.gR { background: #fff; box-shadow: inset 0 0 0 1px var(--ink); }
.chip.out { background: #e6e7e4; color: #7b808a; text-decoration: line-through; }
.chip.low { box-shadow: inset 0 0 0 2px var(--curb); }
@media (max-width: 760px) {
  .ev { grid-template-columns: 76px 1fr; padding: 14px; }
  .ev-date b { font-size: 2rem; }
  .ev-side { grid-column: 1 / -1; text-align: left; display: flex; align-items: center; gap: 14px; }
  .avail { grid-column: 1 / -1; }
}

/* ---------- Cards, tables, lists ---------- */
.card { background: var(--white); border-radius: var(--r); padding: 24px; }
.card.line { border: 1px solid var(--line); }
.card h3 { margin-bottom: .4em; }
.card > :last-child { margin-bottom: 0; }
.band.white .card { background: var(--paper); }
.group-card { border-top: 10px solid; }
.group-card.gA { border-color: var(--ga); } .group-card.gBp { border-color: var(--gbp); }
.group-card.gBm { border-color: var(--gbm); } .group-card.gC { border-color: var(--gc); }
.groups { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
@media (max-width: 980px) { .groups { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .groups { grid-template-columns: 1fr; } }
table { border-collapse: collapse; width: 100%; background: var(--white); border-radius: var(--r); overflow: hidden; }
th, td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-family: var(--display); font-size: 1.1rem; background: #e7e9e5; }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table-scroll { overflow-x: auto; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 0; margin: 0 0 1.2em; padding: 0; border-top: 2px solid currentColor; }
.facts div { padding: 10px 14px 10px 0; border-bottom: 1px solid var(--line); }
.band.dark .facts div { border-color: #40444c; }
.facts dt { font-size: .88rem; color: var(--muted); }
.band.dark .facts dt { color: #aab0bb; }
.facts dd { margin: 0; font: 700 1.55rem var(--display); }
.timeline { list-style: none; padding: 0; margin: 0; max-width: none; }
.timeline li { display: grid; grid-template-columns: 5.2em 1fr; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); margin: 0; }
.timeline time { font: 700 1.4rem var(--display); }
.timeline p { margin: 0; }
.steps { counter-reset: s; list-style: none; padding: 0; max-width: none; display: grid; gap: 14px; }
.steps li { counter-increment: s; background: var(--white); border-radius: var(--r); padding: 18px 20px 18px 68px; position: relative; margin: 0; }
.steps li::before { content: counter(s); position: absolute; left: 20px; top: 12px; font: 700 2.2rem var(--display); color: var(--z2); }
.steps h3 { font-size: 1.3rem; margin-bottom: .2em; }
.steps p { margin: 0; }
.note { border-left: 6px solid var(--ga); background: var(--white); padding: 14px 18px; border-radius: 0 var(--r) var(--r) 0; margin: 0 0 1.2em; max-width: 72ch; }
.note.warn { border-left-color: var(--curb); }
.note > :last-child { margin-bottom: 0; }
blockquote { margin: 0 0 1.2em; padding: 0 0 0 20px; border-left: 6px solid var(--z2); font-size: 1.3rem; font-family: var(--display); font-weight: 600; max-width: 34ch; line-height: 1.25; }
blockquote cite { display: block; font: 400 .95rem var(--body); color: var(--muted); margin-top: 6px; font-style: normal; }
.band.dark blockquote cite { color: #aab0bb; }
.sponsors { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; list-style: none; padding: 0; max-width: none; }
.sponsors li { background: #fff; border-radius: var(--r); height: 84px; display: flex; align-items: center; justify-content: center; padding: 14px; margin: 0; }
.sponsors img { max-height: 54px; width: auto; object-fit: contain; }

/* ---------- Flags (drawn in CSS so they stay sharp and need no images) ---------- */
.flags { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; list-style: none; padding: 0; max-width: none; }
.flags li { background: var(--white); border-radius: var(--r); padding: 18px; margin: 0; }
.flag { width: 84px; height: 58px; border: 2px solid var(--ink); border-radius: 2px; margin-bottom: 12px; }
.f-green { background: #1e9e3c; } .f-yellow { background: #ffd500; } .f-red { background: #d3232a; } .f-black { background: #111; }
.f-debris { background: repeating-linear-gradient(90deg, #ffd500 0 12px, #d3232a 12px 24px); }
.f-wet { background: repeating-linear-gradient(90deg, #111 0 12px, #1e9e3c 12px 24px); }
.f-check { background: conic-gradient(#111 25%, #fff 0 50%, #111 0 75%, #fff 0) 0 0 / 28px 28px; }
.f-mech { background: radial-gradient(circle at 50% 50%, #e2571c 0 15px, #111 16px); }

/* ---------- FAQ ---------- */
.search { width: 100%; max-width: 520px; font: 400 1.1rem var(--body); padding: 12px 14px; border: 2px solid var(--ink); border-radius: var(--r); background: #fff; }
details { background: var(--white); border-radius: var(--r); margin-bottom: 8px; }
summary { cursor: pointer; padding: 15px 20px; font: 700 1.3rem var(--display); list-style-position: inside; }
details > div { padding: 0 20px 18px; }
details > div > :last-child { margin-bottom: 0; }
.faq-cat { margin: 36px 0 12px; }

/* ---------- Checklist ---------- */
.check { list-style: none; padding: 0; max-width: none; columns: 2; column-gap: 32px; }
.check li { break-inside: avoid; margin: 0 0 6px; }
.check label { display: flex; gap: 10px; align-items: flex-start; padding: 6px 8px; border-radius: 4px; cursor: pointer; }
.check label:hover { background: #e7e9e5; }
.check input { width: 20px; height: 20px; margin-top: 3px; accent-color: var(--z2); flex: none; }
.check input:checked + span { color: var(--muted); text-decoration: line-through; }
@media (max-width: 700px) { .check { columns: 1; } }

/* ---------- Booking dialog ---------- */
dialog { border: 0; border-radius: 8px; padding: 0; width: min(560px, 94vw); color: var(--ink); }
dialog::backdrop { background: rgba(20, 22, 26, .7); }
.dlg-head { background: var(--asphalt); color: #fff; padding: 18px 24px; }
.dlg-head h2 { font-size: 1.7rem; margin: 0; }
.dlg-body { padding: 20px 24px 24px; }
.field { margin-bottom: 16px; }
.field > label, .field > legend { font-weight: 600; display: block; margin-bottom: 6px; padding: 0; }
fieldset { border: 0; padding: 0; margin: 0; }
select { font: 400 1.05rem var(--body); padding: 10px; width: 100%; border: 2px solid var(--ink); border-radius: var(--r); background: #fff; }
.opt { display: flex; gap: 10px; align-items: flex-start; padding: 5px 0; }
.opt input { width: 19px; height: 19px; margin-top: 3px; accent-color: var(--z2); }
.total { display: flex; justify-content: space-between; align-items: baseline; border-top: 2px solid var(--ink); padding-top: 12px; font: 700 1.9rem var(--display); }
.dlg-foot { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }

/* ---------- Picker ---------- */
.picker .q { margin-bottom: 18px; }
.picker .q p { font-weight: 600; margin-bottom: 6px; }
.picker .ans { display: flex; flex-wrap: wrap; gap: 8px; }
.picker .ans button { font: 600 1rem var(--body); padding: 8px 14px; border-radius: var(--r); border: 2px solid var(--ink); background: #fff; cursor: pointer; color: var(--ink); }
.picker .ans button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.picker-result { padding: 18px 20px; border-radius: var(--r); background: var(--white); border-top: 10px solid var(--line); min-height: 6em; }

/* ---------- Footer ---------- */
.foot { background: var(--asphalt); color: #c3c8d1; padding: 48px 0 28px; font-size: .98rem; }
.foot h4 { color: #fff; font-size: 1.15rem; }
.foot a { color: #c3c8d1; }
.foot a:hover { color: #fff; }
.foot ul { list-style: none; padding: 0; }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; }
.foot-base { border-top: 1px solid #40444c; margin-top: 28px; padding-top: 18px; font-size: .88rem; }
@media (max-width: 860px) { .foot-grid { grid-template-columns: 1fr 1fr; } }

/* ---------- Proposal page ---------- */
.finding { display: grid; grid-template-columns: 1fr 1fr; gap: 0; background: var(--white); border-radius: var(--r); margin-bottom: 12px; overflow: hidden; }
.finding > div { padding: 20px 24px; }
.finding > div:first-child { border-right: 1px solid var(--line); }
.finding h3 { font-size: 1.35rem; }
.finding p:last-child, .finding ul:last-child { margin-bottom: 0; }
.finding .lab { font-size: .88rem; font-weight: 600; color: var(--muted); margin-bottom: 4px; }
@media (max-width: 760px) { .finding { grid-template-columns: 1fr; } .finding > div:first-child { border-right: 0; border-bottom: 1px solid var(--line); } }

/* ---------- Instagram tiles, reel, link-in-bio page ---------- */
.ig { list-style: none; padding: 0; max-width: none; display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; }
.ig li { margin: 0; }
.ig a { display: block; text-decoration: none; color: var(--ink); font-size: .95rem; line-height: 1.35; }
.ig img { aspect-ratio: 1; object-fit: cover; width: 100%; border-radius: var(--r); margin-bottom: 8px; }
.ig a:hover span { text-decoration: underline; }
@media (max-width: 980px) { .ig { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 520px) { .ig { grid-template-columns: repeat(2, 1fr); } }
.reel { max-width: 420px; justify-self: center; width: 100%; }
.reel a { display: block; position: relative; border-radius: var(--r); overflow: hidden; }
.reel img { width: 100%; }
.reel .play { position: absolute; left: 16px; bottom: 16px; background: #fff; color: var(--ink); font-weight: 600; padding: 10px 16px 10px 40px; border-radius: 999px; }
.reel .play::before { content: ""; position: absolute; left: 16px; top: 50%; margin-top: -8px; border: 8px solid transparent; border-left: 13px solid var(--z2); border-right: 0; }
.reel iframe { width: 100%; height: 720px; border: 0; border-radius: var(--r); background: #fff; display: block; }
.bio-wrap { max-width: 560px; }
.bio-h { font-size: 2.6rem; margin-bottom: .2em; }
.bio-wrap .lede { margin-bottom: 10px; font-size: 1.1rem; }
.bio-list { list-style: none; padding: 0; max-width: none; display: grid; gap: 10px; }
.bio-list li { margin: 0; }
.bio { display: flex; align-items: center; gap: 16px; background: var(--white); color: var(--ink); text-decoration: none; padding: 16px 18px; border-radius: var(--r); font-weight: 600; font-size: 1.1rem; border-left: 6px solid var(--ink); min-height: 60px; }
.bio:hover { background: var(--ink); color: #fff; }
.bio.ev-link { border-left-color: var(--z2); }
.bio b { font: 700 1.5rem var(--display); min-width: 4.6em; }
.bio small { font-weight: 400; font-size: .92rem; color: var(--muted); }
.bio:hover small { color: #c3c8d1; }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
@media print { .top, .concept, .foot, .btn-row, .filters { display: none; } body { background: #fff; } }
