/*
 * ROF Worldwide — base styles. Hand-written, no build step.
 * Dark, industrial, carbon fibre, high contrast. Mobile first.
 */

:root {
  --bg: #0a0b0d;
  --surface: #121418;
  --surface-2: #1a1d22;
  --line: #2a2e35;
  --text: #f2f3f5;
  --muted: #9aa0a9;
  --accent: #e4b100;        /* ROF gold/yellow; confirm with brand guide */
  --accent-ink: #0a0b0d;
  --ok: #3ccf7a;
  --warn: #f0a202;
  --bad: #ff5a4f;
  --radius: 4px;
  --gutter: 16px;
  --max: 1080px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--bg);
  color: var(--text);
  font: 16px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
}

/* Subtle carbon-fibre weave, pure CSS. */
.carbon {
  background-color: var(--bg);
  background-image:
    linear-gradient(45deg, rgba(255,255,255,.025) 25%, transparent 25%, transparent 75%, rgba(255,255,255,.025) 75%),
    linear-gradient(45deg, rgba(255,255,255,.025) 25%, transparent 25%, transparent 75%, rgba(255,255,255,.025) 75%);
  background-size: 8px 8px;
  background-position: 0 0, 4px 4px;
}

a { color: var(--text); }
a:hover { color: var(--accent); }

img { max-width: 100%; height: auto; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

/* Header */
.site-header { border-bottom: 1px solid var(--line); background: rgba(10,11,13,.92); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 56px; flex-wrap: wrap; }
.brand { font-weight: 800; letter-spacing: .22em; text-transform: uppercase; text-decoration: none; font-size: 15px; }
.brand span { color: var(--accent); }
.nav { display: flex; gap: 18px; font-size: 13px; letter-spacing: .12em; text-transform: uppercase; overflow-x: auto; max-width: 100%; align-items: center; }
.nav a, .nav button { white-space: nowrap; }
.nav a { text-decoration: none; color: var(--muted); }
.nav a:hover { color: var(--text); }

/* Type */
.eyebrow { font-size: 12px; letter-spacing: .28em; text-transform: uppercase; color: var(--accent); margin: 0 0 8px; }
h1, h2, h3 { line-height: 1.1; margin: 0 0 12px; letter-spacing: .04em; text-transform: uppercase; }
h1 { font-size: clamp(34px, 9vw, 64px); font-weight: 800; }
h2 { font-size: clamp(22px, 5vw, 30px); font-weight: 700; }
h3 { font-size: 16px; font-weight: 700; letter-spacing: .12em; }
.lead { color: var(--muted); font-size: 18px; max-width: 36em; }
.mono { font-family: var(--mono); }

/* Sections */
.hero { padding: 72px 0 56px; border-bottom: 1px solid var(--line); }
.section { padding: 48px 0; }

/* The ROF chain: tap → verify → … */
.chain { list-style: none; padding: 0; margin: 24px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chain li { font-size: 12px; letter-spacing: .16em; text-transform: uppercase; padding: 6px 10px; border: 1px solid var(--line); border-radius: var(--radius); color: var(--muted); }
.chain li:first-child { border-color: var(--accent); color: var(--accent); }

.grid { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 720px) { .grid { grid-template-columns: repeat(3, 1fr); } }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.card p { color: var(--muted); margin: 0; }

/* Buttons */
.btn { display: inline-block; padding: 12px 18px; border-radius: var(--radius); border: 1px solid var(--accent); background: var(--accent); color: var(--accent-ink); font-weight: 700; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; text-decoration: none; cursor: pointer; }
.btn:hover { filter: brightness(1.08); color: var(--accent-ink); }
.btn--ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--text); color: var(--text); }

/* Status badges used by certificates later */
.badge { display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; padding: 4px 8px; border-radius: var(--radius); border: 1px solid currentColor; }
.badge--ok { color: var(--ok); }
.badge--warn { color: var(--warn); }
.badge--bad { color: var(--bad); }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 24px 0 40px; color: var(--muted); font-size: 13px; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* ---------- Application components (functional placeholder design) ---------- */

.muted { color: var(--muted); }
.small { font-size: 13px; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.stack > * + * { margin-top: 16px; }
.row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.row--between { justify-content: space-between; }
.cols-2 { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 860px) { .cols-2 { grid-template-columns: 1fr 1fr; } .cols-2--wide { grid-template-columns: 2fr 1fr; } }
.page { padding-block: 32px 56px; }
.page-head { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: flex-end; margin-bottom: 20px; }
.page-head h1 { font-size: clamp(26px, 6vw, 40px); margin: 0; }
.section-title { font-size: 14px; letter-spacing: .18em; color: var(--muted); margin: 28px 0 12px; }
hr { border: 0; border-top: 1px solid var(--line); margin: 24px 0; }
code, .code { font-family: var(--mono); font-size: 13px; background: var(--surface-2); padding: 1px 5px; border-radius: 3px; }

.link-btn { background: none; border: 0; padding: 0; color: var(--muted); font: inherit; letter-spacing: inherit; text-transform: inherit; cursor: pointer; }
.link-btn:hover { color: var(--text); }
.btn--sm { padding: 7px 11px; font-size: 11px; }
.btn--danger { background: transparent; border-color: var(--bad); color: var(--bad); }
.btn--danger:hover { background: var(--bad); color: #fff; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
form.inline { display: inline; }

/* Alerts / flash */
.alert { border: 1px solid var(--line); border-left: 3px solid var(--muted); background: var(--surface); padding: 12px 14px; border-radius: var(--radius); margin: 0 0 16px; }
.alert--ok { border-left-color: var(--ok); }
.alert--warn { border-left-color: var(--warn); }
.alert--bad { border-left-color: var(--bad); }
.alert ul { margin: 6px 0 0; padding-left: 18px; }
.flash-wrap { padding-top: 16px; }

/* Forms */
.form { max-width: 560px; }
.form--wide { max-width: none; }
.field { margin: 0 0 16px; }
.field label, .label { display: block; font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.field .hint { font-size: 13px; color: var(--muted); margin-top: 4px; }
.field .error { font-size: 13px; color: var(--bad); margin-top: 4px; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=datetime-local], input[type=url], input[type=tel], input[type=search], input[type=file], select, textarea {
  width: 100%; background: var(--surface-2); color: var(--text); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 11px 12px; font: 16px/1.3 var(--font);
}
input:focus, select:focus, textarea:focus { border-color: var(--accent); outline: none; }
textarea { min-height: 110px; resize: vertical; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; color: var(--text); text-transform: none; letter-spacing: 0; font-weight: 400; }
.check input { margin-top: 4px; width: 18px; height: 18px; accent-color: var(--accent); }
.field-grid { display: grid; gap: 0 16px; grid-template-columns: 1fr; }
@media (min-width: 720px) { .field-grid { grid-template-columns: repeat(2, 1fr); } .field-grid--3 { grid-template-columns: repeat(3, 1fr); } }
fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin: 0 0 20px; }
legend { padding: 0 6px; font-size: 12px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--accent); }
.auth-card { max-width: 440px; margin: 40px auto; }

/* Filters bar */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; align-items: flex-end; }
.filters input, .filters select { width: auto; min-width: 140px; padding: 8px 10px; font-size: 14px; }
.filters .btn { padding: 9px 14px; }

/* Tables */
.table-wrap { width: 100%; overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
table.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th, .table td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.table th { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); font-weight: 700; background: var(--surface-2); white-space: nowrap; }
.table tr:last-child td { border-bottom: 0; }
.table td.num, .table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.table tr.is-me td { background: rgba(228,177,0,.08); }

/* Definition lists */
dl.meta { display: grid; grid-template-columns: minmax(120px, 40%) 1fr; gap: 8px 16px; margin: 0; font-size: 15px; }
dl.meta dt { color: var(--muted); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; padding-top: 2px; }
dl.meta dd { margin: 0; word-break: break-word; }

/* Stats */
.stats { display: grid; gap: 12px; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 720px) { .stats { grid-template-columns: repeat(4, 1fr); } }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.stat b { display: block; font-size: 26px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat span { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.stat--alert b { color: var(--warn); }
a.stat { text-decoration: none; }
a.stat:hover { border-color: var(--accent); }

.badge--neutral { color: var(--muted); }
.badge--accent { color: var(--accent); }

/* Tabs (account area) */
.tabs { display: flex; gap: 4px; overflow-x: auto; border-bottom: 1px solid var(--line); margin-bottom: 24px; }
.tabs a { padding: 12px 14px; text-decoration: none; color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; white-space: nowrap; border-bottom: 2px solid transparent; }
.tabs a.is-active { color: var(--text); border-bottom-color: var(--accent); }
.count { display: inline-block; min-width: 18px; padding: 0 5px; margin-left: 4px; border-radius: 9px; background: var(--accent); color: var(--accent-ink); font-size: 11px; text-align: center; }

/* Cards list */
.list { list-style: none; padding: 0; margin: 0; }
.list li { border-bottom: 1px solid var(--line); padding: 12px 0; }
.list li:last-child { border-bottom: 0; }
.card h3 a { text-decoration: none; }
.card .card-foot { margin-top: 14px; }
.card--link { text-decoration: none; display: block; }
.card--link:hover { border-color: var(--accent); }
.card--unread { border-left: 3px solid var(--accent); }

/* Photos */
.photos { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
.photos img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface-2); }
.photo-lg img { width: 100%; max-height: 70vh; object-fit: contain; background: #000; border-radius: var(--radius); }
.thumb { width: 64px; height: 48px; object-fit: cover; border-radius: 3px; }
.avatar { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; background: var(--surface-2); display: inline-flex; align-items: center; justify-content: center; font-weight: 800; border: 1px solid var(--line); }

/* Verification result */
.verdict { border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; background: var(--surface); }
.verdict--ok { border-color: var(--ok); }
.verdict--bad { border-color: var(--bad); }
.verdict--warn { border-color: var(--warn); }
.verdict .big { font-size: clamp(26px, 7vw, 40px); font-weight: 800; letter-spacing: .06em; text-transform: uppercase; margin: 6px 0 10px; }
.verdict--ok .big { color: var(--ok); }
.verdict--bad .big { color: var(--bad); }
.verdict--warn .big { color: var(--warn); }

/* Certificate */
.certificate { border: 1px solid var(--accent); border-radius: var(--radius); padding: 28px; background: linear-gradient(180deg, var(--surface), var(--bg)); position: relative; }
.certificate::before { content: ""; position: absolute; inset: 6px; border: 1px solid rgba(228,177,0,.25); pointer-events: none; }
.certificate h1 { font-size: clamp(24px, 6vw, 36px); }
.certificate--void { border-color: var(--bad); }
.qr svg { width: 160px; height: 160px; background: #fff; padding: 8px; border-radius: var(--radius); }

/* Leaderboard ranks in admin tables */
.rank { font-weight: 800; font-variant-numeric: tabular-nums; }
.rank--1 { color: var(--accent); }

/* Bars (simple analytics) */
.bars { display: grid; gap: 6px; }
.bar { display: grid; grid-template-columns: 80px 1fr 48px; gap: 8px; align-items: center; font-size: 13px; }


/* Pagination */
.pagination { display: flex; flex-wrap: wrap; gap: 6px; margin: 20px 0 0; list-style: none; padding: 0; font-size: 14px; }
.pagination a, .pagination span { display: inline-block; padding: 6px 11px; border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--muted); }
.pagination .is-current span { border-color: var(--accent); color: var(--text); }

/* Admin layout */
.admin { display: grid; grid-template-columns: 1fr; min-height: 100vh; }
@media (min-width: 960px) { .admin { grid-template-columns: 230px 1fr; } }
.admin-side { background: var(--surface); border-right: 1px solid var(--line); padding: 16px 0; }
.admin-side .brand { display: block; padding: 4px 18px 16px; }
.admin-side nav { display: flex; flex-wrap: wrap; gap: 2px; padding: 0 8px; }
@media (min-width: 960px) { .admin-side nav { flex-direction: column; flex-wrap: nowrap; } }
.admin-side nav a { display: block; padding: 7px 10px; font-size: 13px; color: var(--muted); text-decoration: none; border-radius: var(--radius); }
.admin-side nav a:hover, .admin-side nav a.is-active { color: var(--text); background: var(--surface-2); }
.admin-side nav .group { width: 100%; font-size: 10px; letter-spacing: .2em; text-transform: uppercase; color: var(--accent); padding: 12px 10px 4px; }
.admin-main { padding: 20px var(--gutter) 60px; min-width: 0; }
.admin-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 13px; color: var(--muted); margin-bottom: 16px; }

/* Footer links */
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 8px 18px; justify-content: space-between; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--text); }

@media print {
  .site-header, .site-footer, .no-print, .tabs { display: none !important; }
  body, .carbon, .certificate { background: #fff !important; color: #000 !important; }
  .certificate { border-color: #000; }
  .muted, dl.meta dt { color: #444 !important; }
}

/* Spacing utilities (CSP forbids inline style attributes, so use these). */
.mt { margin-top: 16px; } .mt-lg { margin-top: 32px; } .mb { margin-bottom: 16px; } .m0 { margin: 0; }
progress.bar-meter { width: 100%; height: 10px; appearance: none; -webkit-appearance: none; border: 0; background: var(--surface-2); border-radius: 2px; }
progress.bar-meter::-webkit-progress-bar { background: var(--surface-2); }
progress.bar-meter::-webkit-progress-value { background: var(--accent); }
progress.bar-meter::-moz-progress-bar { background: var(--accent); }

/* === Admin catalog (customers, rods, batches, NFC, transfers) === */
.big-code { font-size: 20px; letter-spacing: .12em; padding: 2px 8px; }
.table tr.is-suspicious td { background: rgba(220, 60, 60, .08); }

/* ---- Admin content area: dashboard, countries, audit log, contact form ---- */
.hp { position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.sr-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.bars--wide .bar { grid-template-columns: minmax(110px, 38%) 1fr 48px; }
.table input.input--narrow, .input--narrow { width: 110px; min-width: 0; }
.table input[type=text], .table input[type=number] { padding: 7px 9px; font-size: 14px; }
.table .error { color: var(--bad); }
details.card > summary { cursor: pointer; }
.audit-diff summary { cursor: pointer; color: var(--accent); font-size: 13px; }
.audit-diff pre { max-width: 460px; max-height: 320px; overflow: auto; white-space: pre-wrap; word-break: break-word; font: 12px/1.4 var(--mono); background: var(--surface-2); padding: 8px; border-radius: var(--radius); margin: 4px 0 8px; }

/* ---------- Public site (home, verify, certificates, competitions, strikes, catch map) ---------- */
.strike-card img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: var(--radius); background: var(--surface-2); display: block; }
.strike-card h3 { margin-bottom: 4px; }
.strike-card p + p { margin-top: 2px; }
.faq ul { color: var(--muted); padding-left: 18px; margin: 0; }
.registration p { margin: 0; }
.qr { text-align: center; }
.qr svg { display: inline-block; }
@media (min-width: 860px) { .certificate .qr { text-align: right; } }
@media print { .qr svg { width: 140px; height: 140px; } }

/* Leaderboards (x-leaderboard): championship podium for the top 3, compact board from #4.
   Layout follows the width of the box it sits in (container queries), so the same component works
   full width on a leaderboard page and inside a half-width column. */
.lb-board { --gold: var(--accent); --silver: #c9d0d8; --bronze: #cd8a55; container-type: inline-size; }
.lb-head { margin-bottom: 20px; }
.lb-title { font-size: clamp(30px, 6vw, 52px); line-height: 1.02; margin: 4px 0 12px; text-wrap: balance; }
.lb-meta { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; color: var(--muted); font-size: 14px; }

.podium-stage {
  margin: 8px 0 32px; padding: 24px 0 0;
  background: radial-gradient(ellipse 60% 70% at 50% 0%, rgba(228,177,0,.16), transparent 70%);
  border-bottom: 1px solid var(--line);
}
.podium-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px;
  grid-template-columns: 1fr 1fr; grid-template-areas: "first first" "second third"; }
.podium-grid--n1 { grid-template-areas: "first first"; }
.podium-spot { display: flex; flex-direction: column; min-width: 0; animation: podium-rise .6s cubic-bezier(.2,.8,.2,1) both; }
.podium-spot--1 { grid-area: first; }
.podium-spot--2 { grid-area: second; animation-delay: .12s; }
.podium-spot--3 { grid-area: third; animation-delay: .2s; }
@keyframes podium-rise { from { transform: translateY(18px); } to { transform: none; } }

.podium-card { --medal: var(--gold); position: relative; display: flex; flex-direction: column; flex: 1;
  background: var(--surface); border: 1px solid var(--line); border-top: 3px solid var(--medal); border-radius: var(--radius); overflow: hidden; }
.podium-card--2 { --medal: var(--silver); }
.podium-card--3 { --medal: var(--bronze); }
.podium-card--1 { border: 2px solid var(--gold); border-top-width: 4px;
  box-shadow: 0 0 0 1px rgba(228,177,0,.25), 0 18px 60px -20px rgba(228,177,0,.45); }
.podium-card.is-me { outline: 2px dashed var(--medal); outline-offset: 3px; }

.podium-photo { position: relative; aspect-ratio: 4 / 3; background: linear-gradient(135deg, var(--surface-2), #0e1013); overflow: hidden; }
.podium-card--2 .podium-photo, .podium-card--3 .podium-photo { aspect-ratio: 1 / 1; }
.podium-card--1 .podium-photo { aspect-ratio: 16 / 11; }
.podium-photo a { display: block; height: 100%; }
.podium-photo img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.podium-photo a:hover img { transform: scale(1.04); }
.podium-photo::after { content: ""; position: absolute; inset: 45% 0 0; background: linear-gradient(transparent, rgba(10,11,13,.85)); pointer-events: none; }
.podium-initials { position: absolute; inset: 0; display: grid; place-items: center; font-size: clamp(40px, 14cqi, 110px); font-weight: 800; letter-spacing: .06em; color: var(--medal); opacity: .5; }
.podium-rank { position: absolute; left: 12px; bottom: 6px; z-index: 1; font-size: 64px; font-weight: 900; line-height: 1; color: var(--medal);
  font-variant-numeric: tabular-nums; text-shadow: 0 2px 16px rgba(0,0,0,.7); }
.podium-card--1 .podium-rank { font-size: 96px; }

.podium-body { padding: 12px 14px 16px; display: grid; gap: 2px; }
.podium-place { margin: 0; font-size: 11px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--medal); }
.podium-name { margin: 0; font-size: 18px; letter-spacing: .04em; overflow-wrap: anywhere; }
.podium-name a { text-decoration: none; }
.podium-country { margin: 0; color: var(--muted); font-size: 13px; letter-spacing: .12em; }
.podium-score { margin: 8px 0 4px; font-size: 28px; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; }
.podium-card--1 .podium-name { font-size: 24px; }
.podium-card--1 .podium-score { font-size: 40px; color: var(--gold); }
.podium-stat { margin: 0; font-size: 13px; color: var(--muted); }
.podium-stat span { display: block; font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: var(--text); opacity: .7; margin-top: 6px; }
.podium-step { display: none; }

@container (min-width: 700px) {
  .podium-grid { grid-template-columns: 1fr 1.35fr 1fr; grid-template-areas: "second first third"; align-items: end; gap: 18px; }
  .podium-grid--n1 { grid-template-columns: minmax(0, 520px); justify-content: center; grid-template-areas: "first"; }
  .podium-grid--n2 { grid-template-columns: 1fr 1.35fr; grid-template-areas: "second first"; }
  .podium-card--2 .podium-photo, .podium-card--3 .podium-photo { aspect-ratio: 4 / 3; }
  .podium-step { display: grid; place-items: center; margin-top: 10px; border: 1px solid var(--line); border-bottom: 0;
    background: linear-gradient(var(--surface-2), var(--bg)); font-size: 22px; font-weight: 800; color: var(--muted);
    border-radius: var(--radius) var(--radius) 0 0; }
  .podium-spot--1 .podium-step { height: 96px; color: var(--gold); border-color: rgba(228,177,0,.5); font-size: 30px; }
  .podium-spot--2 .podium-step { height: 64px; color: var(--silver); }
  .podium-spot--3 .podium-step { height: 40px; color: var(--bronze); }
  .podium-card--1 .podium-body { padding: 16px 20px 20px; }
  .podium-card--1 .podium-name { font-size: 28px; }
  .podium-card--1 .podium-score { font-size: 48px; }
}

.board-wrap { margin-top: 8px; }
.board-head, .board-row { display: grid; grid-template-columns: 36px 48px minmax(0, 1fr) auto; gap: 12px; align-items: center; }
.board-head { padding: 0 12px 8px; font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.board-head span:nth-child(2) { grid-column: 2 / 4; }
.board { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.board-row { padding: 10px 12px; border-top: 1px solid var(--line); }
.board-row:first-child { border-top: 0; }
.board-row.is-me { background: rgba(228,177,0,.08); box-shadow: inset 3px 0 0 var(--accent); }
.board-rank { font-weight: 800; font-size: 18px; text-align: center; font-variant-numeric: tabular-nums; color: var(--muted); }
.board-thumb { width: 48px; height: 48px; border-radius: var(--radius); overflow: hidden; background: var(--surface-2); display: grid; place-items: center; font-weight: 800; color: var(--muted); font-size: 14px; }
.board-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.board-who { min-width: 0; display: grid; gap: 2px; }
.board-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board-name a { text-decoration: none; }
.board-stat { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board-stat a { color: var(--muted); }
.board-score { font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; text-align: right; }
@container (min-width: 700px) {
  .board-head, .board-row { grid-template-columns: 48px 56px minmax(0, 1fr) auto; gap: 16px; }
  .board-thumb { width: 56px; height: 56px; }
  .board-score { font-size: 18px; }
}

/* Rod transfer portal */
[hidden] { display: none !important; }
.portal-serial { font-size: clamp(20px, 5.5vw, 30px); font-weight: 700; letter-spacing: .04em; margin: 2px 0 0; overflow-wrap: anywhere; }
.steps { margin: 0 0 12px; padding-left: 22px; }
.steps li { margin: 4px 0; }
.steps li.is-done { color: var(--muted); }
.steps li.is-done::marker { content: "✓  "; color: var(--ok); }
.steps li.is-current { font-weight: 700; }
.history { list-style: none; margin: 0; padding: 0; }
.history__item { padding: 10px 0 10px 16px; border-left: 2px solid var(--line); position: relative; }
.history__item::before { content: ""; position: absolute; left: -6px; top: 16px; width: 10px; height: 10px; border-radius: 50%; background: var(--line); }
.history__item.is-current::before { background: var(--ok); }
.notes { white-space: pre-wrap; overflow-wrap: anywhere; font-family: inherit; margin: 0; background: var(--surface-2); padding: 10px 12px; border-radius: 8px; }

/* International phone field */
input.country-search, input.list-search { display: block; width: 100%; margin-bottom: 6px; padding: 8px 10px 8px 32px; font-size: 14px;
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%238a8f98' stroke-width='1.6'%3E%3Ccircle cx='7' cy='7' r='5'/%3E%3Cpath d='M11 11l3.5 3.5' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat 10px center / 14px 14px; }
.filters input.country-search { width: auto; min-width: 150px; margin-bottom: 0; }
input.list-search { max-width: 360px; margin-bottom: 10px; }
.check-list { max-height: 340px; overflow-y: auto; padding: 4px; border: 1px solid var(--line); border-radius: 6px; }
[hidden] { display: none !important; }
.phone-input { display: grid; grid-template-columns: minmax(0, 1.3fr) auto minmax(0, 1fr); gap: 8px; align-items: center; }
.phone-input select { min-width: 0; }
.phone-input__dial { font-family: var(--mono); color: var(--muted); padding: 0 2px; }
@media (max-width: 560px) {
  .phone-input { grid-template-columns: auto minmax(0, 1fr); }
  .phone-input select { grid-column: 1 / -1; }
}

/* Leaderboard hero: large cover image with the title over it (components/leaderboard/hero.blade.php) */
.lb-hero { position: relative; isolation: isolate; overflow: hidden; display: flex; align-items: flex-end;
  min-height: clamp(340px, 44vw, 580px); background: #05080d; color: #fff; border-bottom: 1px solid var(--line); }
.lb-hero__media, .lb-hero__img { position: absolute; inset: 0; width: 100%; height: 100%; }
.lb-hero__media { z-index: -2; }
.lb-hero__img { display: block; object-fit: cover; object-position: 50% 50%; filter: saturate(1.08) contrast(1.06); transform: scale(1.03); }
@media (prefers-reduced-motion: no-preference) {
  .lb-hero__img { animation: lb-hero-drift 24s ease-out both; }
  @keyframes lb-hero-drift { from { transform: scale(1.1); } to { transform: scale(1.03); } }
}
/* Which part of the photo to keep when it is cropped (set by the admin per leaderboard). */
.lb-hero--focus-top .lb-hero__img { object-position: 50% 15%; }
.lb-hero--focus-bottom .lb-hero__img { object-position: 50% 85%; }
.lb-hero--focus-left .lb-hero__img { object-position: 15% 50%; }
.lb-hero--focus-right .lb-hero__img { object-position: 85% 50%; }
/* Readability: always a dark gradient under the text, whatever the photo. */
.lb-hero__shade { position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    linear-gradient(180deg, rgba(5, 8, 13, .55) 0%, rgba(5, 8, 13, .12) 28%, rgba(5, 8, 13, .45) 58%, rgba(10, 11, 13, .94) 88%, var(--bg) 100%),
    linear-gradient(90deg, rgba(5, 8, 13, .78) 0%, rgba(5, 8, 13, .35) 45%, rgba(5, 8, 13, 0) 75%); }
.lb-hero__body { position: relative; padding-top: 56px; padding-bottom: 34px; }
.lb-hero__before { font-size: 14px; margin-bottom: 18px; }
.lb-hero__before a { color: #e8eaee; }
.lb-hero__eyebrow { text-shadow: 0 1px 12px rgba(0, 0, 0, .8); }
.lb-hero__title { color: #fff; text-transform: uppercase; letter-spacing: .02em; max-width: 16ch;
  font-size: clamp(34px, 7.4vw, 76px); line-height: .98; margin: 6px 0 14px; text-shadow: 0 2px 24px rgba(0, 0, 0, .65); }
.lb-hero__method { display: inline-block; margin: 0 0 14px; padding: 6px 12px; border: 1px solid var(--accent); color: var(--accent);
  font-size: 12px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; background: rgba(5, 8, 13, .55); }
.lb-hero__meta { color: #dde1e6; text-shadow: 0 1px 10px rgba(0, 0, 0, .9); }
.lb-hero + .page { padding-top: 22px; }
@media (max-width: 700px) {
  .lb-hero { min-height: 400px; }
  .lb-hero__body { padding-top: 40px; padding-bottom: 24px; }
  .lb-hero__shade { background:
    linear-gradient(180deg, rgba(5, 8, 13, .5) 0%, rgba(5, 8, 13, .2) 30%, rgba(5, 8, 13, .7) 62%, rgba(10, 11, 13, .96) 90%, var(--bg) 100%); }
}

/* Admin: leaderboard cover image preview */
.hero-preview { position: relative; overflow: hidden; aspect-ratio: 21 / 8; background: #05080d; border: 1px solid var(--line); margin-bottom: 10px; }
.hero-preview img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 50%; }
.hero-preview.lb-hero--focus-top img { object-position: 50% 15%; }
.hero-preview.lb-hero--focus-bottom img { object-position: 50% 85%; }
.hero-preview.lb-hero--focus-left img { object-position: 15% 50%; }
.hero-preview.lb-hero--focus-right img { object-position: 85% 50%; }
.hero-preview__shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(5, 8, 13, .2) 30%, rgba(5, 8, 13, .9) 100%), linear-gradient(90deg, rgba(5, 8, 13, .7), rgba(5, 8, 13, 0) 70%); }
.hero-preview__text { position: absolute; left: 16px; bottom: 12px; right: 16px; color: #fff; }
.hero-preview__text strong { display: block; font-size: clamp(18px, 3vw, 28px); text-transform: uppercase; line-height: 1.05; text-shadow: 0 2px 12px rgba(0, 0, 0, .7); }
.hero-preview__text .eyebrow { margin: 0; }
.hero-preview__badge { position: absolute; top: 10px; right: 10px; }
.filter-pair { display: inline-flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-right: 8px; max-width: 100%; }
@media (max-width: 600px) {
  .filter-pair { display: flex; width: 100%; }
  .filter-pair select, .filters .filter-pair input.country-search { flex: 1 1 140px; min-width: 0; }
}
.filter-label { font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); align-self: center; }
