/* ============ OFFROAD-BG public theme ============ */
:root {
  --ink: #0b0b0c; --ink2: #141416; --ink3: #1d1d21; --line: #2b2b31;
  --text: #f4f1ea; --muted: #a7a39a; --orange: #ff7a00; --orange2: #ff9a1f; --yellow: #ffc107;
  --mud: #6b4a2b; --ok: #3ccf6e; --bad: #ff4d3d; --radius: 14px;
  --display: "Russo One", "Arial Black", Impact, sans-serif;
  --body: "Rubik", system-ui, "Segoe UI", Roboto, Arial, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--ink); color: var(--text); font-family: var(--body); line-height: 1.55; font-size: 16px; overflow-x: hidden; }
a { color: var(--orange2); text-decoration: none; }
a:hover { color: var(--yellow); }
img { max-width: 100%; }
h1, h2, h3, .display { font-family: var(--display); font-weight: 400; letter-spacing: .01em; line-height: 1.05; margin: 0 0 .5em; text-transform: uppercase; }
h1 { font-size: clamp(2rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.4rem); }
h3 { font-size: 1.15rem; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 16px; }
.section { padding: 72px 0; position: relative; }
.section.tight { padding: 40px 0; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.eyebrow { font-family: var(--display); color: var(--orange); letter-spacing: .14em; font-size: .85rem; text-transform: uppercase; display: inline-flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.eyebrow::before { content: ""; width: 28px; height: 4px; background: var(--orange); transform: skewX(-25deg); }
.sec-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 28px; flex-wrap: wrap; }
.sec-head h2 { margin: 0; }
.accent { color: var(--orange); }
.hl { background: linear-gradient(transparent 62%, rgba(255,122,0,.55) 62%); }

/* tyre track & hazard patterns */
.hazard { background: repeating-linear-gradient(-45deg, var(--yellow) 0 18px, var(--ink) 18px 36px); height: 10px; }

/* ---------- header ---------- */
.topbar { position: sticky; top: 0; z-index: 60; background: rgba(11,11,12,.86); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.topbar-in { display: flex; align-items: center; gap: 18px; min-height: 66px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-family: var(--display); font-size: 1.25rem; letter-spacing: .02em; }
.brand:hover { color: var(--text); }
.brand .mark { width: 38px; height: 38px; display: grid; place-items: center; background: var(--orange); color: var(--ink); clip-path: polygon(18% 0, 100% 0, 82% 100%, 0 100%); font-size: 1rem; }
.brand img { height: 40px; }
.brand b { color: var(--orange); font-weight: 400; }
.mainnav { margin-left: auto; display: flex; align-items: center; gap: 2px; }
.mainnav > a, .dd > a { color: var(--text); padding: 9px 12px; font-weight: 600; font-size: .95rem; border-radius: 8px; display: block; }
.mainnav > a:hover, .dd > a:hover { background: var(--ink3); color: var(--text); }
.dd { position: relative; }
.dd-menu { display: none; position: absolute; right: 0; top: 100%; background: var(--ink2); border: 1px solid var(--line); border-radius: 12px; min-width: 270px; padding: 8px; box-shadow: 0 20px 50px rgba(0,0,0,.55); }
.dd:hover .dd-menu, .dd:focus-within .dd-menu { display: block; }
.dd-menu a { display: block; padding: 9px 12px; color: var(--text); border-radius: 8px; }
.dd-menu a:hover { background: var(--ink3); }
.navtoggle { display: none; margin-left: auto; background: none; border: 1px solid var(--line); color: var(--text); font-size: 1.3rem; border-radius: 8px; padding: 4px 12px; }
.adminlink { color: var(--yellow) !important; }

/* ---------- buttons ---------- */
.btn { --bg: var(--ink3); --fg: var(--text); display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 13px 24px; background: var(--bg); color: var(--fg); border: 0; font-family: var(--display); font-size: .95rem; letter-spacing: .04em; text-transform: uppercase; cursor: pointer; clip-path: polygon(10px 0, 100% 0, calc(100% - 10px) 100%, 0 100%); transition: transform .15s, filter .15s; }
.btn:hover { color: var(--fg); filter: brightness(1.12); transform: translateY(-2px); }
.btn.primary { --bg: var(--orange); --fg: #120800; }
.btn.yellow { --bg: var(--yellow); --fg: #120800; }
.btn.ghost { --bg: rgba(255,255,255,.08); box-shadow: inset 0 0 0 1px rgba(255,255,255,.25); }
.btn.big { padding: 17px 34px; font-size: 1.1rem; }
.btn.small { padding: 8px 14px; font-size: .78rem; }
.btn .arr { transition: transform .2s; }
.btn:hover .arr { transform: translateX(4px); }

/* ---------- hero ---------- */
.hero { position: relative; overflow: hidden; isolation: isolate; padding: 64px 0 90px; min-height: calc(100vh - 66px); display: flex; align-items: center; }
.hero::before { content: ""; position: absolute; inset: -40px; z-index: -2; background: var(--hero) center/cover no-repeat, #1a120a; filter: blur(22px) saturate(1.3) brightness(.45); transform: scale(1.08); }
.hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background:
  radial-gradient(ellipse 60% 70% at 20% 40%, rgba(255,122,0,.22), transparent 70%),
  linear-gradient(180deg, rgba(11,11,12,.2), rgba(11,11,12,.15) 55%, var(--ink) 100%); }
/* dedicated background photo (no text on it): only slightly softened, darkened on the text side */
.hero.has-bg::before { inset: -8px; background-position: center 62%; filter: blur(2.5px) saturate(1.05) brightness(.62); transform: none; }
.hero.has-bg::after { background:
  linear-gradient(90deg, rgba(11,11,12,.88) 0%, rgba(11,11,12,.62) 38%, rgba(11,11,12,.18) 70%, rgba(11,11,12,.3) 100%),
  linear-gradient(180deg, rgba(11,11,12,.35), transparent 30%, transparent 62%, var(--ink) 100%); }
.phero.has-bg::before { background-position: center 55%; filter: blur(3px) brightness(.42); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 56px; align-items: center; }
.hero h1 { font-size: clamp(2.6rem, 7vw, 5.6rem); line-height: .92; margin-bottom: .25em; text-shadow: 0 6px 30px rgba(0,0,0,.5); }
.hero h1 .accent { display: block; color: var(--orange); -webkit-text-stroke: 0; }
.hero .lead { font-size: 1.15rem; color: #e9e2d6; max-width: 560px; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin: 20px 0 26px; }
.chip { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; background: rgba(0,0,0,.45); border: 1px solid rgba(255,255,255,.14); border-radius: 99px; font-weight: 600; font-size: .95rem; backdrop-filter: blur(6px); }
.chip svg { width: 18px; height: 18px; color: var(--orange); }
.chip.live { background: var(--bad); border-color: var(--bad); }
.cta { display: flex; flex-wrap: wrap; gap: 12px; }
.poster { position: relative; transform: rotate(2.2deg); }
.poster img { display: block; width: 100%; border-radius: 10px; box-shadow: 0 40px 80px rgba(0,0,0,.6), 0 0 0 6px rgba(255,255,255,.06); }
.badge15 { position: absolute; left: -26px; bottom: -26px; z-index: 3; width: 118px; height: 118px; border-radius: 50%; background: var(--yellow); color: var(--ink); display: grid; place-items: center; text-align: center; font-family: var(--display); line-height: .9; box-shadow: 0 14px 30px rgba(0,0,0,.45); transform: rotate(-10deg); }
.badge15 b { font-size: 2.6rem; display: block; font-weight: 400; }
.badge15 span { font-size: .72rem; letter-spacing: .08em; }

.countdown { display: flex; gap: 10px; margin: 0 0 26px; }
.countdown div { min-width: 78px; padding: 10px 8px 8px; background: rgba(0,0,0,.5); border: 1px solid rgba(255,255,255,.12); border-top: 3px solid var(--orange); text-align: center; border-radius: 6px; }
.countdown b { display: block; font-family: var(--display); font-size: 2rem; line-height: 1; font-weight: 400; font-variant-numeric: tabular-nums; }
.countdown span { font-size: .7rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); }
.reg-status { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; margin-top: 14px; font-size: .95rem; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px rgba(60,207,110,.2); animation: pulse 1.6s infinite; }
.dot.red { background: var(--bad); box-shadow: 0 0 0 4px rgba(255,77,61,.2); }
@keyframes pulse { 50% { opacity: .35; } }

/* ticker */
.ticker { background: var(--yellow); color: var(--ink); transform: rotate(-1.4deg) scale(1.02); margin: -26px 0 0; position: relative; z-index: 5; overflow: hidden; border-block: 4px solid var(--ink); box-shadow: 0 10px 30px rgba(0,0,0,.4); }
.ticker-in { display: flex; gap: 40px; white-space: nowrap; padding: 12px 0; font-family: var(--display); font-size: 1.15rem; text-transform: uppercase; animation: marquee 38s linear infinite; width: max-content; }
.ticker-in span::after { content: "✦"; margin-left: 40px; color: var(--orange); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* stats */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--ink2); }
.stat { padding: 26px 22px; border-right: 1px solid var(--line); }
.stat:last-child { border-right: 0; }
.stat b { display: block; font-family: var(--display); font-weight: 400; font-size: clamp(2.2rem, 4vw, 3.2rem); line-height: 1; color: var(--orange); }
.stat span { color: var(--muted); text-transform: uppercase; letter-spacing: .1em; font-size: .78rem; font-weight: 600; }

/* class cards */
.classgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; }
.ccard { position: relative; background: linear-gradient(160deg, var(--ink3), var(--ink2)); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 24px 24px; overflow: hidden; transition: transform .2s, border-color .2s; display: flex; flex-direction: column; }
.ccard:hover { transform: translateY(-4px); border-color: var(--orange); }
.ccard::after { content: ""; position: absolute; right: -40px; top: -40px; width: 160px; height: 160px; background: radial-gradient(circle, rgba(255,122,0,.18), transparent 70%); }
.ccard .ico { width: 54px; height: 54px; display: grid; place-items: center; background: var(--orange); color: var(--ink); clip-path: polygon(15% 0, 100% 0, 85% 100%, 0 100%); margin-bottom: 18px; }
.ccard .ico svg { width: 28px; height: 28px; }
.ccard h3 { font-size: 1.45rem; }
.ccard p { color: var(--muted); margin: 0 0 16px; }
.pills { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 18px; }
.pill { padding: 4px 10px; border-radius: 6px; background: rgba(255,255,255,.07); border: 1px solid var(--line); font-size: .85rem; font-weight: 600; }
.ccard .more { margin-top: auto; font-family: var(--display); font-size: .85rem; text-transform: uppercase; letter-spacing: .06em; }

/* timeline */
.timeline { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 0; position: relative; }
.tl { position: relative; padding: 30px 22px 10px 0; }
.tl::before { content: ""; position: absolute; top: 8px; left: 0; right: 0; height: 4px; background: repeating-linear-gradient(90deg, var(--orange) 0 14px, transparent 14px 22px); }
.tl::after { content: ""; position: absolute; top: 0; left: 0; width: 20px; height: 20px; background: var(--yellow); border: 4px solid var(--ink); border-radius: 50%; }
.tl .day { font-family: var(--display); color: var(--orange); font-size: .9rem; letter-spacing: .08em; }
.tl h3 { margin: 6px 0; font-size: 1.25rem; }
.tl p { color: var(--muted); margin: 0; font-size: .92rem; }

/* info tiles */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.tile { display: flex; gap: 14px; align-items: center; padding: 18px; background: var(--ink2); border: 1px solid var(--line); border-radius: 12px; color: var(--text); transition: border-color .2s, background .2s; }
.tile:hover { border-color: var(--orange); background: var(--ink3); color: var(--text); }
.tile .ti { flex: none; width: 42px; height: 42px; border-radius: 10px; background: rgba(255,122,0,.14); color: var(--orange); display: grid; place-items: center; }
.tile .ti svg { width: 22px; height: 22px; }
.tile b { display: block; }
.tile small { color: var(--muted); }

/* fees */
.cfee { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin: 0 0 16px; padding: 10px 14px; border: 1px dashed rgba(255,122,0,.5); border-radius: 10px; color: var(--text); }
.cfee:hover { color: var(--text); border-color: var(--orange); }
.cfee span { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.cfee b { font-family: var(--display); font-weight: 400; font-size: 1.3rem; color: var(--orange); }
.cfee small { color: var(--muted); }
.earlybanner { display: flex; align-items: center; gap: 14px 20px; flex-wrap: wrap; padding: 16px 20px; border-radius: var(--radius); background: rgba(255,193,7,.08); border: 1px solid rgba(255,193,7,.45); margin-bottom: 26px; }
.earlybanner b { color: var(--yellow); }
.earlybanner .btn { margin-left: auto; }
.feegrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; }
.feecard { position: relative; display: flex; flex-direction: column; background: linear-gradient(160deg, var(--ink3), var(--ink2)); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.feecard .fc-top { padding: 26px 24px 8px; flex: 1; }
.feecard .ico { width: 48px; height: 48px; display: grid; place-items: center; background: var(--orange); color: var(--ink); clip-path: polygon(15% 0, 100% 0, 85% 100%, 0 100%); margin-bottom: 16px; }
.feecard .ico svg { width: 26px; height: 26px; }
.feecard h3 { font-size: 1.35rem; margin-bottom: 6px; }
.feecard p { margin: 0 0 14px; }
.prices { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; border-top: 1px solid var(--line); }
.pr { padding: 16px 24px 20px; display: flex; flex-direction: column; gap: 2px; }
.pr + .pr { border-left: 1px solid var(--line); }
.pr .lbl { font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; }
.pr .amt { font-family: var(--display); font-size: 1.5rem; line-height: 1.15; color: var(--text); }
.pr.main .amt { color: var(--orange); font-size: 2.1rem; }
.feecard.has-early .pr.main { background: rgba(255,122,0,.07); }
.feenote { margin-top: 44px; max-width: 820px; }

/* CTA band */
.band { position: relative; overflow: hidden; background: var(--orange); color: #140900; border-radius: 18px; padding: 46px 40px; display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center; }
.band::before { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(90deg, transparent 0 16px, rgba(0,0,0,.06) 16px 28px); }
.band > * { position: relative; }
.band h2 { margin: 0 0 6px; }
.band p { margin: 0; font-weight: 500; }
.band .btn { --bg: var(--ink); --fg: var(--text); }

/* crews */
.crews { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.crew { display: flex; gap: 14px; align-items: center; padding: 14px 16px; background: var(--ink2); border: 1px solid var(--line); border-radius: 12px; }
.crew .no { flex: none; width: 48px; height: 48px; display: grid; place-items: center; background: #fff; color: var(--ink); font-family: var(--display); font-size: 1.1rem; border-radius: 8px; border: 3px solid var(--orange); }
.crew .no.none { background: var(--ink3); color: var(--muted); border-color: var(--line); font-size: .8rem; }
.crew b { display: block; line-height: 1.25; }
.crew small { color: var(--muted); }

/* events list */
.evlist { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.evitem { display: block; padding: 20px; background: var(--ink2); border: 1px solid var(--line); border-radius: 12px; color: var(--text); position: relative; overflow: hidden; }
.evitem:hover { border-color: var(--orange); color: var(--text); }
.evitem .evdate { font-family: var(--display); color: var(--orange); font-size: .85rem; letter-spacing: .05em; }
.evitem .evname { font-family: var(--display); font-size: 1.2rem; text-transform: uppercase; margin: 4px 0; }
.yearhdr { font-family: var(--display); color: var(--muted); margin: 26px 0 12px; }

/* page hero (inner pages) */
.phero { position: relative; overflow: hidden; isolation: isolate; padding: 54px 0 46px; border-bottom: 1px solid var(--line); }
.phero::before { content: ""; position: absolute; inset: -30px; z-index: -2; background: var(--hero, none) center/cover, linear-gradient(120deg, #2a1606, #0b0b0c 60%); filter: blur(18px) brightness(.4); transform: scale(1.06); }
.phero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(11,11,12,.92), rgba(11,11,12,.55)); }
.phero h1 { margin: 0; }
.phero .sub { color: var(--muted); margin-top: 8px; font-weight: 500; }

.eventnav { background: var(--ink2); border-bottom: 1px solid var(--line); position: sticky; top: 66px; z-index: 40; }
.eventnav-in { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.eventnav-in::-webkit-scrollbar { display: none; }
.eventnav a { padding: 14px 14px 12px; color: var(--muted); font-weight: 600; white-space: nowrap; border-bottom: 3px solid transparent; font-size: .93rem; }
.eventnav a:hover, .eventnav a.on { color: var(--text); border-bottom-color: var(--orange); }
.eventnav a.reg { color: var(--orange); }
.livedot { display: inline-block; width: 8px; height: 8px; background: var(--bad); border-radius: 50%; animation: pulse 1.4s infinite; margin-left: 4px; }

/* prose */
.prose { max-width: 860px; font-size: 1.03rem; }
.prose h2 { font-size: 1.6rem; margin-top: 1.4em; }
.prose h3, .prose h4 { font-family: var(--display); text-transform: uppercase; font-weight: 400; margin-top: 1.4em; color: var(--orange2); }
.prose img { height: auto; border-radius: 10px; }
.prose table { border-collapse: collapse; width: 100%; }
.prose td, .prose th { border: 1px solid var(--line); padding: 8px 10px; }
.prose a { text-decoration: underline; text-underline-offset: 3px; }
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 40px; align-items: start; }
.side { position: sticky; top: 140px; display: grid; gap: 14px; }
.card { background: var(--ink2); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.card h3 { font-size: 1rem; color: var(--orange); }
.links { list-style: none; margin: 0; padding: 0; }
.links li a { display: flex; justify-content: space-between; padding: 9px 0; border-bottom: 1px solid var(--line); color: var(--text); }
.links li:last-child a { border-bottom: 0; }
.links li a:hover, .links li a.on { color: var(--orange); }

/* rules section + PDF viewer */
.rulegrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; margin-top: 28px; }
.rulecard { display: flex; flex-direction: column; gap: 14px; padding: 24px; background: var(--ink2); border: 1px solid var(--line); border-radius: var(--radius); color: var(--text); transition: border-color .15s, transform .15s; }
.rulecard:hover { border-color: var(--orange); color: var(--text); transform: translateY(-3px); }
.rc-title { font-family: var(--display); font-size: 1.15rem; line-height: 1.25; flex: 1; }
.rulecard .more { color: var(--orange); font-weight: 600; }
.doc-ico { align-self: flex-start; font-family: var(--display); font-size: .72rem; letter-spacing: .08em; background: var(--orange); color: var(--ink); padding: 5px 9px; border-radius: 6px; }
.pdfbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.pdfbar .sp { flex: 1; }
.pdfview { display: grid; gap: 12px; }
.pdfview canvas { display: block; background: #fff; border-radius: 6px; box-shadow: 0 10px 30px rgba(0,0,0,.45); }
.docxview .docx-wrapper { background: transparent !important; padding: 0 !important; display: grid !important; gap: 12px; }
.docxview .docx-wrapper > section.docx { width: 100% !important; padding: clamp(18px, 5vw, 56px) !important; margin: 0 !important; border-radius: 6px; box-shadow: 0 10px 30px rgba(0,0,0,.45); color: #111; overflow-x: auto; }
.docxview table { max-width: 100%; }
.pdf-loading { padding: 60px 20px; text-align: center; border: 1px dashed var(--line); border-radius: var(--radius); }

/* forms */
.form label { display: block; margin-bottom: 16px; font-weight: 600; font-size: .92rem; color: #ddd7cc; }
.form input, .form select, .form textarea { width: 100%; margin-top: 6px; padding: 13px 14px; border-radius: 10px; border: 1.5px solid #34343b; background: #101012; color: var(--text); font: inherit; font-weight: 400; transition: border-color .15s, box-shadow .15s; }
.form input:focus, .form select:focus, .form textarea:focus { outline: none; border-color: var(--orange); box-shadow: 0 0 0 4px rgba(255,122,0,.18); }
.form input::placeholder { color: #66625a; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.req { color: var(--orange); }
label.err input, label.err select { border-color: var(--bad); }
.errmsg { color: var(--bad); font-weight: 600; display: block; margin-top: 4px; }
.form .check { display: flex; gap: 12px; align-items: flex-start; font-weight: 400; color: var(--text); }
.form .check input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--orange); flex: none; }
.step { background: var(--ink2); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 26px 10px; margin-bottom: 18px; position: relative; }
.step-h { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.step-h .n { width: 38px; height: 38px; display: grid; place-items: center; background: var(--orange); color: var(--ink); font-family: var(--display); clip-path: polygon(15% 0, 100% 0, 85% 100%, 0 100%); flex: none; }
.step-h h3 { margin: 0; font-size: 1.2rem; }
.step-h small { display: block; color: var(--muted); font-family: var(--body); text-transform: none; font-size: .85rem; letter-spacing: 0; }
.cls-group { margin-bottom: 14px; }
.cls-group > b { display: block; font-family: var(--display); font-weight: 400; color: var(--muted); font-size: .85rem; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 8px; }
.cls-opts { display: grid; grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); gap: 8px; }
.cls-opt { position: relative; margin: 0 !important; }
.cls-opt input { position: absolute; opacity: 0; pointer-events: none; }
.cls-opt span { display: block; padding: 13px 14px; border: 1.5px solid #34343b; border-radius: 10px; background: #101012; cursor: pointer; font-weight: 600; transition: all .15s; }
.cls-opt span:hover { border-color: #5a5a63; }
.cls-opt input:checked + span { border-color: var(--orange); background: rgba(255,122,0,.12); box-shadow: 0 0 0 3px rgba(255,122,0,.15); }
.cls-opt input:checked + span::after { content: "✓"; float: right; color: var(--orange); }
.cls-opt input:focus-visible + span { outline: 2px solid var(--yellow); }
.reg-layout { display: grid; grid-template-columns: 360px minmax(0, 1fr); gap: 36px; align-items: start; }
.reg-side { position: sticky; top: 140px; }
.reg-side .poster { transform: rotate(-1.5deg); margin-bottom: 26px; }
.checklist { list-style: none; padding: 0; margin: 0; }
.checklist li { padding: 8px 0 8px 30px; position: relative; border-bottom: 1px dashed var(--line); font-size: .93rem; }
.checklist li::before { content: "✓"; position: absolute; left: 4px; color: var(--orange); font-weight: 800; }
.submitbar { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin-top: 8px; }
.notice { background: rgba(255,122,0,.08); border: 1px solid rgba(255,122,0,.35); border-left: 5px solid var(--orange); padding: 14px 18px; border-radius: 10px; margin: 0 0 20px; }
.notice.closed { background: rgba(255,77,61,.08); border-color: rgba(255,77,61,.4); border-left-color: var(--bad); }
.flashes { padding-top: 16px; }
.flash { padding: 12px 16px; border-radius: 10px; margin-bottom: 8px; background: var(--ink3); border: 1px solid var(--line); }
.flash.ok { border-color: var(--ok); }
.flash.error { border-color: var(--bad); color: #ffb4a8; }
.done-hero { text-align: center; padding: 70px 16px; }
.done-hero .big-check { width: 96px; height: 96px; margin: 0 auto 22px; border-radius: 50%; display: grid; place-items: center; background: var(--orange); color: var(--ink); font-size: 3rem; box-shadow: 0 0 0 12px rgba(255,122,0,.15); }

/* tables */
.tablewrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 26px; background: var(--ink2); }
.tbl { width: 100%; border-collapse: collapse; font-size: .95rem; }
.tbl th { text-align: left; background: var(--ink3); color: var(--muted); font-weight: 700; font-size: .74rem; text-transform: uppercase; letter-spacing: .08em; padding: 12px; white-space: nowrap; }
.tbl td { padding: 12px; border-top: 1px solid var(--line); vertical-align: middle; }
.tbl tbody tr:hover { background: rgba(255,122,0,.06); }
.tbl .num { text-align: right; width: 1%; white-space: nowrap; font-variant-numeric: tabular-nums; }
.tbl .time { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.tbl .total { font-weight: 800; color: var(--yellow); }
.tbl .rank { font-family: var(--display); font-size: 1.05rem; color: var(--text); }
.tbl tr:nth-child(1) .rank { color: var(--yellow); }
.tbl tr:nth-child(2) .rank { color: #d8d8d8; }
.tbl tr:nth-child(3) .rank { color: #d08b4c; }
.tbl tr.incomplete td { color: var(--muted); }
.bibno { display: inline-grid; place-items: center; min-width: 38px; height: 30px; padding: 0 6px; background: #fff; color: var(--ink); font-family: var(--display); border-radius: 5px; font-size: .9rem; }
.coef { color: var(--orange); font-size: .7rem; }
.st { font-size: .68rem; font-weight: 800; padding: 2px 6px; border-radius: 4px; background: var(--ink3); }
.st-dnf { background: #5a3d0a; color: #ffd27a; }
.st-dns { background: #3a3f48; color: #cfd5de; }
.st-dsq { background: #6b1f14; color: #ffb4a8; }
.pen { color: var(--yellow); font-weight: 800; }
.clshdr { margin: 34px 0 12px; display: flex; gap: 12px; align-items: baseline; font-size: 1.4rem; }
.clshdr .muted { font-family: var(--body); font-size: 1rem; }
.tabs { display: flex; gap: 6px; margin: 0 0 18px; overflow-x: auto; }
.tabs a { padding: 11px 18px; color: var(--text); font-family: var(--display); font-size: .9rem; text-transform: uppercase; background: var(--ink2); border: 1px solid var(--line); border-radius: 8px; white-space: nowrap; }
.tabs a.on, .tabs a:hover { background: var(--orange); color: var(--ink); border-color: var(--orange); }
.filterchips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.filterchips a { padding: 6px 13px; border-radius: 99px; background: var(--ink2); border: 1px solid var(--line); color: var(--text); font-size: .85rem; font-weight: 600; }
.filterchips a.on { background: var(--text); color: var(--ink); }
.show-sm { display: none; }

/* contact + footer */
.contact { display: grid; grid-template-columns: 1fr 1.1fr; gap: 40px; }
.footer { position: relative; background: #070708; margin-top: 40px; }
.footer-in { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 30px; padding: 50px 16px 26px; }
.footer h4 { font-family: var(--display); font-weight: 400; text-transform: uppercase; color: var(--orange); margin: 0 0 12px; }
.footer a { color: var(--text); display: block; padding: 3px 0; }
.footer a:hover { color: var(--orange); }
.footer-bot { border-top: 1px solid var(--line); padding: 16px; color: var(--muted); font-size: .85rem; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }

/* galleries & archive images */
.prose.wide { max-width: none; }
.prose.wide img { display: block; margin: 10px 0 24px; background: #fff; border-radius: 6px; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.gallery p { display: contents; }
.gallery br { display: none; }
.gallery a { display: block; aspect-ratio: 4/3; overflow: hidden; border-radius: 8px; background: var(--ink3); }
.gallery img { width: 100%; height: 100%; object-fit: cover; border-radius: 0; transition: transform .3s; }
.gallery a:hover img { transform: scale(1.06); }
.lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(0,0,0,.92); display: grid; place-items: center; padding: 20px; cursor: zoom-out; }
.lightbox img { max-width: 100%; max-height: 100%; border-radius: 6px; box-shadow: 0 20px 60px rgba(0,0,0,.6); }
.lightbox button { position: absolute; top: 50%; background: rgba(255,255,255,.1); border: 0; color: #fff; font-size: 2rem; width: 54px; height: 54px; border-radius: 50%; cursor: pointer; }
.lightbox .prev { left: 16px; } .lightbox .next { right: 16px; }

/* reveal on scroll */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } .ticker-in { animation: none; } }

@media (max-width: 960px) {
  .hero { min-height: 0; padding: 40px 0 70px; }
  .hero-grid, .layout, .reg-layout, .contact, .footer-in { grid-template-columns: 1fr; }
  .poster { max-width: 520px; margin: 10px auto 0; }
  .side, .reg-side { position: static; }
  .reg-side .poster { display: none; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stat:nth-child(2) { border-right: 0; }
  .stat:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .band { grid-template-columns: 1fr; padding: 34px 24px; }
}
@media (max-width: 760px) {
  .navtoggle { display: block; }
  .mainnav { display: none; position: absolute; top: 66px; left: 0; right: 0; background: var(--ink); flex-direction: column; align-items: stretch; padding: 10px 16px 18px; border-bottom: 1px solid var(--line); }
  body.navopen .mainnav { display: flex; }
  .dd-menu { position: static; display: block; box-shadow: none; border: 0; padding: 0 0 0 12px; background: none; }
  .row2 { grid-template-columns: 1fr; }
  .section { padding: 52px 0; }
  .countdown div { min-width: 0; flex: 1; }
  .countdown b { font-size: 1.6rem; }
  .hide-sm { display: none; }
  .show-sm { display: block; }
  .badge15 { width: 90px; height: 90px; left: -6px; bottom: -18px; }
  .badge15 b { font-size: 2rem; }
  .step { padding: 20px 16px 6px; }
}

/* =================== muddy tyre marks =================== */
.tyremarks { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
/* each <i> is one vehicle's swirling pair of tracks (tools/make_tracks.py): image set per placement, --x/--y centre, --w size, --r angle, --o opacity */
.tyremarks i { position: absolute; left: var(--x, 70%); top: var(--y, 50%); width: var(--w, 760px); aspect-ratio: 1; opacity: var(--o, .3);
  transform: translate(-50%, -50%) rotate(var(--r, 0deg)); background: center / contain no-repeat; }
.tyremarks i:nth-child(2) { --x: var(--x2, 10%); --y: var(--y2, 50%); --w: var(--w2, 640px); --r: var(--r2, 0deg); --o: var(--o2, .2); }
.tyremarks b { position: absolute; width: 220px; height: 220px; right: var(--sx, -40px); bottom: var(--sy, -60px); background: url("mud.svg") center / contain no-repeat; opacity: var(--so, .3); transform: rotate(var(--sr, 20deg)); }
.section > .wrap, .phero > .wrap, .footer > *:not(.tyremarks), .done-hero > *:not(.tyremarks) { position: relative; z-index: 1; }
.hero > .wrap { position: relative; z-index: 1; }
/* placements */
.tm-a { --x: 74%; --y: 46%; --w: 900px; --r: -8deg; --o: .3; --x2: 6%; --y2: 70%; --w2: 760px; --r2: 20deg; --o2: .22; }   /* hero */
.tm-b { --x: 92%; --y: 55%; --w: 820px; --r: 10deg; --o: .3; --x2: 2%; --y2: 30%; --w2: 700px; --r2: -30deg; --o2: .2; }  /* class cards */
.tm-c { --x: 64%; --y: 50%; --w: 780px; --r: 62deg; --o: .22; --x2: 120%; }                                             /* band across a section */
.tm-d { --x: 86%; --y: 40%; --w: 720px; --r: -20deg; --o: .3; --x2: 120%; --sx: -30px; --sy: -100px; }                  /* page headers */
.tm-e { --x: 10%; --y: 60%; --w: 680px; --r: 15deg; --o: .26; --x2: 88%; --y2: 40%; --w2: 620px; --r2: -40deg; --o2: .18; } /* contact / footer */
.tm-a i:nth-child(1), .tm-e i:nth-child(1) { background-image: url("tracks/loop.webp?v=2"); }
.tm-a i:nth-child(2), .tm-c i:nth-child(1) { background-image: url("tracks/s.webp?v=2"); }
.tm-b i:nth-child(1), .tm-e i:nth-child(2) { background-image: url("tracks/hook.webp?v=2"); }
.tm-b i:nth-child(2), .tm-d i:nth-child(1) { background-image: url("tracks/arc.webp?v=2"); }
.done-hero { position: relative; overflow: hidden; }
.footer { overflow: hidden; }
@media (max-width: 760px) { .tyremarks i { --w: 560px; } .tyremarks i:nth-child(2) { display: none; } }
@media print { .tyremarks { display: none; } }

/* =================== live results =================== */
.livebar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0 0 18px; padding: 8px 12px; border: 1px solid rgba(255,255,255,.1); border-radius: 10px; background: rgba(255,255,255,.03); font-size: .9rem; }
.livebar .dot { width: 9px; height: 9px; border-radius: 50%; background: #e5372b; box-shadow: 0 0 0 0 rgba(229,55,43,.6); animation: lvpulse 1.6s infinite; }
.livebar b { text-transform: uppercase; letter-spacing: .08em; font-size: .78rem; }
.livebar .lv-t { color: var(--muted, #9aa0a8); margin-right: auto; }
.lv-btn { background: transparent; color: inherit; border: 1px solid rgba(255,255,255,.2); border-radius: 6px; padding: 4px 10px; font: inherit; font-size: .8rem; cursor: pointer; }
.lv-btn:hover { border-color: var(--orange); }
#results-live.stale .livebar .dot { background: #888; animation: none; }
#results-live.stale .lv-t::after { content: " · няма връзка, ще опитам пак"; }
tr.upd td { animation: lvflash 2.4s ease-out; }
@keyframes lvpulse { 70% { box-shadow: 0 0 0 8px rgba(229,55,43,0); } 100% { box-shadow: 0 0 0 0 rgba(229,55,43,0); } }
@keyframes lvflash { 0%, 30% { background: rgba(255,122,0,.22); } 100% { background: transparent; } }
@media (prefers-reduced-motion: reduce) { .livebar .dot, tr.upd td { animation: none; } }
