/* acrkchallenge: shared styles of the public pages and the console. Design from the claude.ai mockup
   ("ACR Challenge – mockup"): dark ground, one orange accent, Saira Condensed over IBM Plex. */

:root {
  --bg: #0d0f14; --bg-soft: #141a27; --panel: #151922; --panel-2: #1b2130; --line: #262d3d; --line-2: #303850;
  --text: #eef1f7; --text-2: #b3bccf; --muted: #98a2b8; --faint: #4c566e;
  --accent: #ff5a36; --accent-ink: #0d0f14; --accent-soft: #ff8a70; --accent-bg: #22161a; --accent-line: #4a2a26;
  --gold: #e6b84f; --silver: #b9c2d3; --bronze: #d08a5c; --ok: #4fd1a5; --bad: #ff8a8a; --bad-bg: #1c1418; --bad-chip: #3a1d22;
  --display: "Saira Condensed", "Arial Narrow", sans-serif;
  --body: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Consolas, monospace;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #f4f5f8; --bg-soft: #e9ecf3; --panel: #ffffff; --panel-2: #eef0f6; --line: #e1e4ec; --line-2: #ccd2e0;
    --text: #171a22; --text-2: #3a4256; --muted: #5b657c; --faint: #9aa3b8;
    --accent: #d8401e; --accent-ink: #ffffff; --accent-soft: #c03414; --accent-bg: #fdece8; --accent-line: #f3c5bb;
    --gold: #b8860b; --silver: #7c869b; --bronze: #a8643a; --ok: #0f8f6a; --bad: #c23636; --bad-bg: #fdeeee; --bad-chip: #f8d4d4;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.5 var(--body); }
a { color: var(--accent); }
a:hover { color: var(--accent-soft); }
h1, h2, h3 { margin: 0; font-family: var(--display); font-weight: 700; text-transform: uppercase; letter-spacing: .01em; line-height: 1; }
h1 { font-size: clamp(40px, 6vw, 72px); }
h2 { font-size: clamp(26px, 3vw, 38px); }
h3 { font-size: 26px; }
button, input, select, textarea { font: inherit; }
[hidden] { display: none !important; }

.mono { font-family: var(--mono); font-weight: 500; font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.eyebrow { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.wrap { max-width: 1320px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 64px); }

/* ---- header and footer */
.site-header { background: var(--bg); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.site-header .wrap { display: flex; align-items: center; gap: 32px; min-height: 72px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); font: 700 28px var(--display); text-transform: uppercase; letter-spacing: .01em; }
.brand:hover { color: var(--text); }
.brand i { display: inline-block; width: 14px; height: 26px; background: var(--accent); transform: skewX(-14deg); }
.nav { display: flex; gap: 28px; flex-grow: 1; flex-wrap: wrap; }
.nav a { color: var(--muted); text-decoration: none; font-weight: 500; padding: 24px 0 21px; border-bottom: 3px solid transparent; }
.nav a:hover { color: var(--text); }
.nav a[aria-current="page"] { color: var(--text); border-color: var(--accent); }
.nav-dot { display: inline-grid; place-items: center; min-width: 18px; height: 18px; margin-left: 6px; border-radius: 50%;
  background: var(--accent); color: var(--accent-ink); font-size: 11px; font-weight: 700; line-height: 1; vertical-align: 1px; }
.sp-notice { border-color: var(--accent-line); background: var(--accent-bg); }
.sp-notice ol { margin: 8px 0 0; padding-left: 22px; }
.sp-notice li { margin: 4px 0; }
.nav a.rally { color: var(--rally, #b38cff); }
.nav a.rally[aria-current="page"] { border-color: var(--rally, #b38cff); }
.site-footer { border-top: 1px solid var(--line); margin-top: 56px; padding: 28px 0; color: var(--muted); font-size: 13px; }
.site-footer .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.site-footer .disclaimer { flex-basis: 100%; margin: 0; font-size: 12px; line-height: 1.5; }
.site-footer .credits { flex-basis: 100%; margin: -12px 0 0; line-height: 1.5; } /* close to the line above, despite the wrap's gap */
.site-footer .credits a { color: inherit; text-decoration: underline; }

/* ---- controls */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 20px; border-radius: 10px;
  background: var(--accent); color: var(--accent-ink); border: 1px solid var(--accent); font-weight: 600; text-decoration: none; cursor: pointer; }
.btn:hover { color: var(--accent-ink); filter: brightness(1.08); }
.btn.ghost { background: transparent; color: var(--text); border-color: var(--line-2); }
.btn.ghost:hover { color: var(--text); border-color: var(--muted); }
.btn.small { padding: 7px 12px; font-size: 13px; border-radius: 8px; }
.btn.danger { color: var(--bad); border-color: var(--bad); background: transparent; }
.btn[disabled] { opacity: .5; cursor: default; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; background: var(--panel-2); border: 1px solid var(--line); font-size: 13px; }
.chip.one-shot { background: var(--accent-bg); border-color: var(--accent); color: var(--accent-soft); font-weight: 600; }
.chip.two-shot { background: color-mix(in srgb, var(--gold) 14%, transparent); border-color: var(--gold); color: var(--gold); font-weight: 600; }
.badge { display: inline-flex; padding: 4px 10px; border-radius: 999px; background: var(--accent-bg); border: 1px solid var(--accent-line); color: var(--accent-soft);
  font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.lang { background: var(--panel-2); color: var(--text); border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; cursor: pointer; }
input, select, textarea { width: 100%; padding: 10px 12px; border-radius: 8px; background: var(--bg); color: var(--text); border: 1px solid var(--line-2); }
input:focus, select:focus, textarea:focus, .btn:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 6px; font-weight: 500; }
textarea { resize: vertical; }

/* ---- panels, cards, tables */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 18px 24px; border-bottom: 1px solid var(--line); }
.panel-head h3 { font-size: 26px; }
.hero { background: linear-gradient(180deg, var(--bg-soft) 0%, var(--bg) 100%); border-bottom: 1px solid var(--line); padding: clamp(28px, 5vw, 56px) 0; }
.hero .wrap { display: flex; gap: 48px; align-items: center; flex-wrap: wrap; }
.hero .text { flex: 1 1 420px; display: flex; flex-direction: column; gap: 18px; }
.hero p { margin: 0; color: var(--text-2); font-size: 17px; max-width: 620px; }
.hero .art { flex: 0 1 560px; width: 100%; }
/* events and semester standings: the text on the left, the picture on the right (2026-11-17); on a phone the picture stays on top */
@media (min-width: 1000px) { .hero.art-right .art { order: 2; } }
.actions { display: flex; gap: 12px; flex-wrap: wrap; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }

.cover { position: relative; width: 100%; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 12px; border: 1px solid var(--line-2);
  background: linear-gradient(135deg, #1b2a3a 0%, #26202f 100%); }
.cover img, .cover svg { width: 100%; height: 100%; object-fit: cover; display: block; }
.cover .tag { position: absolute; left: 12px; bottom: 10px; padding: 3px 8px; border-radius: 6px; background: var(--bg); color: var(--muted);
  font-size: 11px; letter-spacing: .06em; text-transform: uppercase; }

.shot-thumb { display: inline-flex; align-items: center; gap: 12px; align-self: flex-start; padding: 0; border: 0; background: none;
  color: var(--text-2); font: inherit; font-size: 14px; text-align: left; cursor: zoom-in; }
.shot-thumb img { width: 160px; max-width: 100%; aspect-ratio: 16 / 9; object-fit: contain; display: block; border-radius: 8px;
  border: 1px solid var(--line-2); background: var(--bg-soft); }
.shot-thumb:hover img { border-color: var(--accent); }
.stage-card .shot-thumb { flex-direction: column; align-items: flex-start; gap: 6px; font-size: 13px; }
.stage-media { display: flex; flex-wrap: wrap; gap: 12px 20px; }
.video-thumb { cursor: pointer; text-decoration: none; }
.video-thumb:hover span:last-child { color: var(--text); }
.shot-thumb .frame { position: relative; display: block; }
.shot-thumb .more { position: absolute; right: 6px; bottom: 6px; padding: 1px 7px; border-radius: 999px; font-size: 12px;
  background: rgba(0, 0, 0, .7); color: #fff; }
.video-thumb .frame img { object-fit: cover; }
.video-thumb:hover .frame img { border-color: var(--accent); }
.video-thumb svg { position: absolute; left: 50%; top: 50%; width: 42px; transform: translate(-50%, -50%); opacity: .9; }
.video-thumb:hover svg { opacity: 1; }
.lightbox { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 16px;
  background: rgba(0, 0, 0, .85); cursor: zoom-out; }
.lightbox img { max-width: 100%; max-height: 100%; border-radius: 8px; cursor: pointer; }
.lightbox .count { position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%); padding: 2px 10px; border-radius: 999px;
  font-size: 13px; background: rgba(0, 0, 0, .7); color: #fff; }

.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; align-items: stretch; }
.card { display: flex; flex-direction: column; overflow: hidden; }
.card .body { padding: 20px 24px 24px; display: flex; flex-direction: column; gap: 12px; flex-grow: 1; }
.card .cover { border-radius: 0; border: 0; border-bottom: 1px solid var(--line); }
.card h3 a { color: var(--text); text-decoration: none; }
.card .row { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.card .go { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; text-decoration: none; margin-top: auto; }
.th { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; }

.podium { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.podium .name { flex-grow: 1; font-weight: 500; }
.pos { width: 34px; height: 34px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center;
  font: 700 20px var(--display); background: var(--panel-2); color: var(--text); flex-shrink: 0; }
.pos.p1 { background: var(--gold); color: #0d0f14; }
.pos.p2 { background: var(--silver); color: #0d0f14; }
.pos.p3 { background: var(--bronze); color: #0d0f14; }
.pos.rit { background: var(--bad-chip); color: var(--bad); font: 600 12px var(--body); }
.pos.sm { width: 30px; height: 30px; font-size: 17px; border-radius: 7px; justify-self: start; }
.pos.sm.rit { width: auto; padding: 0 6px; font-size: 11px; }

.table { width: 100%; }
.table .tr { display: grid; gap: 12px; align-items: center; padding: 14px 24px; border-bottom: 1px solid var(--line); min-width: 0; }
.table .tr:last-child { border-bottom: 0; }
.table .tr.head { padding: 12px 24px; }
.table .tr.retired { background: var(--bad-bg); }
.table-scroll { overflow-x: auto; }
.table-scroll .table { min-width: 640px; }
.cell-sub { display: block; font-size: 12px; color: var(--muted); font-weight: 400; }
.miss { color: var(--gold); font-size: 13px; }
a.stage-video { display: inline-flex; opacity: .85; }
a.stage-video svg { width: 22px; }
a.stage-video:hover { opacity: 1; }
a.cell-sub.miss { color: var(--gold); text-decoration: none; }
a.cell-sub.miss:hover { text-decoration: underline; }
.table .tr.late-head { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; border-top: 1px solid var(--line); }
.table .tr.late { opacity: .85; }
.badge.closed { background: var(--bad-chip); border-color: var(--bad); color: var(--bad); }
/* A rally on the game's Rally Weekend, in violet like its card in acrk-tray (rallyInk). */
:root { --rally: #b38cff; --rally-bg: color-mix(in srgb, #b38cff 12%, transparent); }
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) { --rally: #6d3fd6; --rally-bg: color-mix(in srgb, #6d3fd6 9%, transparent); } }
:root[data-theme="light"] { --rally: #6d3fd6; --rally-bg: color-mix(in srgb, #6d3fd6 9%, transparent); }
.badge.rally { background: var(--rally-bg); border-color: var(--rally); color: var(--rally); }
.panel.rally-test { border-color: var(--rally); background: linear-gradient(180deg, var(--rally-bg), var(--panel) 60%); }
.rally-body { padding: 8px 24px 22px; display: flex; flex-direction: column; gap: 10px; color: var(--text-2); }
.rally-body p { margin: 0; max-width: 820px; }
.rally-body h4 { margin: 10px 0 0; font-size: 15px; color: var(--text); }
.rally-body ol { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 6px; max-width: 820px; }
.rally-body ul { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; }
.btn.rally-btn { background: var(--rally); border-color: var(--rally); color: #fff; }
/* The Real Rally guide (real-rally.html): numbered steps down the page, details two by two. */
.guide-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 16px; }
.guide-step { display: flex; gap: 22px; align-items: flex-start; padding: 22px 24px; }
.guide-step .n { font: 700 44px var(--display); color: var(--rally); line-height: 1; min-width: 32px; }
.guide-step p { margin: 6px 0 0; max-width: 760px; }
.guide-step .btn { margin-top: 12px; }
.guide-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); gap: 24px; }
.guide-grid .rally-body { padding-top: 0; }
.table .tr.rally-day { padding: 10px 24px; background: var(--panel-2); }
.table .tr.rally-service { display: flex; gap: 10px; padding: 8px 24px; color: var(--rally); font-size: 13px; font-weight: 600; }
.bad { color: var(--bad); }
.ok { color: var(--ok); }
.empty { padding: 28px 24px; color: var(--muted); }

.notice { display: flex; gap: 14px; align-items: flex-start; padding: 16px 20px; border-radius: 14px; border: 1px solid var(--accent-line); background: var(--bad-bg); color: var(--text-2); font-size: 14px; }
.stage-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px; }
.stage-card { padding: 18px; display: flex; flex-direction: column; gap: 8px; }
.stage-card.open { border-color: var(--accent); }
.stage-card .no { font: 700 34px var(--display); }
.stage-card.open .no { color: var(--accent); }
.stage-card.upcoming .no { color: var(--faint); }
.stage-card .state { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; font-weight: 600; color: var(--muted); }
.stage-card.open .state { color: var(--accent); }
.cell { font: 500 13px var(--mono); }
.cell.penalty, .cell.dnf { color: var(--bad); }
.cell.pending { color: var(--faint); }
/* the semester standings: drivers down, combos or events across, the driver's column fixed while the rest scrolls */
.matrix-scroll { overflow-x: auto; scrollbar-color: var(--line-2) var(--panel); }
.matrix { border-collapse: separate; border-spacing: 0; width: max-content; min-width: 100%; }
.matrix th, .matrix td { padding: 12px 14px; border-bottom: 1px solid var(--line); text-align: center; vertical-align: middle; }
.matrix tbody tr:last-child > * { border-bottom: 0; }
.matrix thead th { vertical-align: bottom; width: 128px; min-width: 128px; max-width: 160px; font-weight: 400; line-height: 1.3; }
.matrix thead .h1 { display: block; font-size: 13px; font-weight: 600; color: var(--text); text-decoration: none; }
.matrix thead a.h1:hover { color: var(--accent); }
.matrix thead .h2 { display: block; font-size: 12px; color: var(--muted); }
.matrix.thumbs thead tr:last-child th:not(.lead) { vertical-align: top; }
.matrix thead .car-thumb { display: flex; align-items: center; justify-content: center; width: 112px; aspect-ratio: 11 / 5; margin: 0 auto 6px; font-size: 12px; color: var(--muted); }
.matrix thead .car-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 6px; }
.matrix .lead { position: sticky; left: 0; z-index: 1; background: var(--panel); text-align: left; min-width: 230px; border-right: 1px solid var(--line); }
.matrix thead .lead { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; }
.matrix thead th.group { width: auto; max-width: none; border-bottom-color: var(--line-2); }
.matrix .gstart { border-left: 1px solid var(--line-2); }
.matrix .who { display: flex; align-items: center; gap: 12px; }
.matrix .who .name { font-weight: 500; }
.matrix td .pos.sm { display: inline-flex; }
.matrix td .t { display: block; margin-top: 4px; font: 500 12px var(--mono); color: var(--muted); }
@media (max-width: 720px) { .matrix .lead { min-width: 170px; } .matrix th, .matrix td { padding: 10px; } }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 24px; }
.step { padding: 24px; display: flex; flex-direction: column; gap: 10px; }
.step .n { font: 700 44px var(--display); color: var(--accent); line-height: 1; }
.step .btn { align-self: flex-start; margin-top: 4px; }
.section { padding: 40px 0 8px; display: flex; flex-direction: column; gap: 22px; }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.two-cols { display: flex; gap: 28px; align-items: flex-start; flex-wrap: wrap; }
.two-cols > .main { flex: 1 1 640px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.two-cols > .side { flex: 0 1 400px; width: 100%; display: flex; flex-direction: column; gap: 20px; }
.filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; padding: 20px; }
.ta-filters { padding-bottom: 0; }
.table .tr.mine { background: var(--accent-bg); box-shadow: inset 3px 0 0 var(--accent); }
.combo-pick { display: flex; align-items: flex-end; }
.combo-pick > div { flex: 1; min-width: 0; }
.combo-pick .car-thumb { flex: none; width: 112px; aspect-ratio: 11 / 5; }
.combo-pick .car-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 6px; }
.loading { padding: 48px 0; color: var(--muted); }
.error-box { padding: 20px; color: var(--bad); }

@media (max-width: 720px) {
  .site-header .wrap { gap: 12px; }
  .nav { gap: 18px; order: 3; width: 100%; }
  .nav a { padding: 8px 0 10px; }
  .site-header .lang { margin-left: auto; }
  .table .tr { padding: 12px 16px; }
}
/* the invitation page (invite.html): a louder hero beside a 3:4 poster, and the closing call, centred */
.invite-hero { padding-top: clamp(18px, 3vw, 32px); }
.invite-hero .text { gap: 32px; }
.invite-hero .eyebrow { font-size: clamp(16px, 2vw, 22px); }
.invite-hero p { font-size: clamp(19px, 2.2vw, 28px); line-height: 1.4; white-space: pre-line; }
.invite-hero .art { flex: 0 1 471px; }
.invite-poster { display: block; width: 100%; height: auto; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 12px; border: 1px solid var(--line-2); }
.invite-final { padding: clamp(28px, 5vw, 48px); display: flex; flex-direction: column; align-items: center; gap: 16px; text-align: center;
  background: linear-gradient(135deg, var(--accent-bg) 0%, var(--panel) 70%); border-color: var(--accent-line); }
.invite-final p { margin: 0; font-size: 17px; max-width: 560px; }
.invite-final .actions { justify-content: center; }
/* the welcome page (welcome.html): its texts keep their line breaks */
.welcome-text { white-space: pre-line; }
.video-panel { padding: clamp(18px, 3vw, 28px); display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: clamp(18px, 3vw, 36px); align-items: center; }
.video-panel .frame { position: relative; display: block; border-radius: 12px; overflow: hidden; border: 1px solid var(--line);
  background: url(/img/attack-800.webp) center / cover; }
.video-panel .frame img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.video-panel .frame svg { position: absolute; right: 14px; bottom: 14px; width: 64px; opacity: .9; filter: drop-shadow(0 2px 6px rgba(0,0,0,.5)); }
.video-panel .frame:hover { border-color: var(--accent); }
.video-panel .frame:hover svg { opacity: 1; }
.video-panel .text p { margin: 12px 0 18px; font-size: 16px; white-space: pre-line; }
@media (max-width: 720px) { .video-panel { grid-template-columns: 1fr; } }
/* the liveries (liveries.html): cards with a preview that opens full size, stars to vote, and the form to send one */
.livery-shot { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
.livery-shot:hover .cover img { filter: brightness(1.06); }
.livery .body { gap: 10px; }
.livery h3 { font-size: 24px; }
.livery .desc { margin: 0; color: var(--text-2); font-size: 14px; white-space: pre-line; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.livery .desc.open { display: block; }
.livery .more, .livery .report { align-self: flex-start; padding: 0; border: 0; background: none; color: var(--accent); font-size: 13px; cursor: pointer; }
.livery .report { color: var(--muted); font-size: 12px; text-decoration: underline; }
.livery .report[disabled] { text-decoration: none; cursor: default; }
.livery .foot { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: auto; padding-top: 6px; }
.stars { display: flex; align-items: center; gap: 2px; flex-wrap: wrap; font-size: 13px; }
.stars button { padding: 0 1px; border: 0; background: none; color: var(--faint); font-size: 22px; line-height: 1; cursor: pointer; }
.stars button.on { color: var(--gold); }
.stars.mine button.on { color: var(--accent); }
.stars:hover button { color: var(--accent); }
.stars button:hover ~ button { color: var(--faint); }
.stars .muted { margin-left: 8px; }
.livery-form { padding: 24px; display: flex; flex-direction: column; gap: 18px; max-width: 900px; }
.livery-form .fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; }
.livery-form .hint { margin-top: 6px; font-size: 12px; color: var(--muted); }
.livery-form input[type="file"] { padding: 6px; }
.livery-form #f-preview { display: block; margin-top: 10px; max-width: 320px; border-radius: 8px; border: 1px solid var(--line-2); }
.msg { font-size: 14px; color: var(--accent-soft); }
.msg.ok { color: var(--ok); }
@media (max-width: 720px) { #car-thumb { display: none; } }

/* The drivers' survey (survey.html): one panel per question, the options as chips. */
.survey { display: flex; flex-direction: column; gap: 16px; max-width: 900px; }
.survey fieldset { margin: 0; padding: 20px 24px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); min-width: 0; }
.survey legend { padding: 0; font-weight: 600; font-size: 16px; float: left; width: 100%; margin-bottom: 4px; }
.survey legend + * { clear: both; }
.survey .hint { font-size: 12px; color: var(--muted); margin-bottom: 12px; }
.choices { display: flex; flex-wrap: wrap; gap: 8px; }
.choices label { position: relative; margin: 0; display: inline-flex; align-items: center; padding: 8px 14px; border-radius: 999px;
  border: 1px solid var(--line-2); background: var(--bg); color: var(--text-2); font-size: 14px; cursor: pointer; }
.choices input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.choices label:has(input:checked) { border-color: var(--accent); background: var(--accent-bg); color: var(--text); }
.choices label:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.survey .send { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }

/* The survey's results (survey-results.html): one panel per question, a bar per option, the most picked in the accent. */
.bars { display: flex; flex-direction: column; gap: 12px; padding: 20px 24px; }
.bar-row { display: grid; grid-template-columns: minmax(110px, 200px) 1fr 92px; gap: 14px; align-items: center; font-size: 14px; }
.bar-row .name { color: var(--text-2); }
.bar-track { display: block; height: 12px; border-radius: 999px; background: var(--panel-2); overflow: hidden; }
.bar-fill { display: block; height: 100%; border-radius: 999px; background: var(--faint); }
.bar-row.top .name { color: var(--text); font-weight: 600; }
.bar-row.top .bar-fill { background: var(--accent); }
.bar-row .num { text-align: right; color: var(--muted); font-size: 13px; }
.bar-row.top .num { color: var(--text); }
@media (max-width: 560px) { .bar-row { grid-template-columns: 1fr 76px; } .bar-track { grid-column: 1 / -1; grid-row: 2; } }

/* the Real Rally's podium (podium.html, 2026-11-17): the picture, then the places as it shows them (2, 1, 3, the fourth) */
/* lower than 16:9, so that the names under it show without scrolling: the crop keeps the trophies and the steps' numbers */
.podium-art .cover { aspect-ratio: 2.5 / 1; }
.podium-art .cover img { object-position: 50% 70%; }
.hero.compact { padding: clamp(20px, 3vw, 32px) 0; }
.hero.compact h1 { font-size: clamp(34px, 4.5vw, 52px); }
.podium { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; align-items: end; }
.podium-place { padding: 18px 20px; display: flex; flex-direction: column; gap: 8px; border-top: 4px solid var(--line-2); }
.podium-place.p1 { border-top-color: var(--gold); padding-top: 30px; padding-bottom: 30px; }
.podium-place.p2 { border-top-color: var(--silver); }
.podium-place.p3 { border-top-color: var(--bronze); }
.podium-place.p4 { border-top-color: var(--rally); opacity: .85; }
.podium-place.empty { opacity: .6; }
.podium-top { display: flex; align-items: center; gap: 10px; }
.podium-label { font: 600 13px var(--body); text-transform: uppercase; letter-spacing: .06em; color: var(--text-2); }
.podium-name { font: 700 30px var(--display); text-transform: uppercase; line-height: 1.05; overflow-wrap: anywhere; }
.podium-place.p1 .podium-name { font-size: 40px; color: var(--gold); }
.podium-time { font-size: 20px; }
.podium-sub { font-size: 13px; }
@media (max-width: 860px) {
  .podium { grid-template-columns: 1fr 1fr; }
  .podium-place.p1 { order: -1; grid-column: 1 / -1; }
}
@media (max-width: 480px) { .podium { grid-template-columns: 1fr; } }
/* back and forth among the closed rallies (2026-11-30) */
.podium-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.podium-nav .btn { min-width: 0; text-align: left; justify-self: start; }
.podium-nav .btn > span { min-width: 0; overflow-wrap: anywhere; }
.podium-nav-next { grid-column: 2; justify-self: end !important; text-align: right !important; }
.podium-nav-label { display: block; font: 600 11px var(--body); text-transform: uppercase; letter-spacing: .06em; color: var(--text-2); }
