/* RepMine Sports - public event page and on-video graphics. Dark arena look, red accent. */
:root {
  --bg: #08090c; --bg2: #0f1116; --panel: #14171e; --panel2: #1a1e27; --line: #262b36; --line2: #1f232c;
  --ink: #f4f5f7; --ink2: #c9ced8; --muted: #8b93a3; --red: #e3262c; --red2: #ff3b41; --gold: #f5b81b; --green: #22c55e;
  --head: "Barlow Condensed", "Arial Narrow", system-ui, sans-serif;
  --body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font: 15px/1.5 var(--body); }
a { color: inherit; }
img { max-width: 100%; }
.wrap { max-width: 1440px; margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); }
[hidden] { display: none !important; }

/* ---------- header */
.top { position: sticky; top: 0; z-index: 30; background: rgba(8, 9, 12, .92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line2); }
.top .wrap { display: flex; align-items: center; gap: 22px; height: 60px; }
.brand { font: italic 800 26px/1 var(--head); letter-spacing: .01em; text-decoration: none; white-space: nowrap; }
.brand span { color: var(--red); }
.top nav { display: flex; gap: 4px; margin-left: auto; overflow-x: auto; scrollbar-width: none; }
.top nav a { text-decoration: none; color: var(--ink2); padding: 8px 12px; border-radius: 8px; font-weight: 600; font-size: 14px; white-space: nowrap; }
.top nav a:hover { color: #fff; background: var(--panel); }
.top nav a.on { color: #fff; box-shadow: inset 0 -2px 0 var(--red); border-radius: 0; }

/* ---------- hero row: title | player | now on the floor */
.hero { display: grid; grid-template-columns: minmax(250px, 330px) minmax(0, 1fr) minmax(260px, 330px); gap: 18px; padding: 20px 0 8px; align-items: start; }
.title-card { padding: 6px 2px; }
.title-card .logo { max-width: 100%; max-height: 190px; display: block; margin-bottom: 10px; }
.title-card h1 { font: 800 56px/.92 var(--head); text-transform: uppercase; margin: 0 0 8px; letter-spacing: -.01em; }
.title-card h1 em { font-style: normal; color: var(--red); display: block; }
.title-card .subtitle { font: 700 28px/1.05 var(--head); margin: 6px 0 6px; }
.title-card .tagline { color: var(--ink2); font-size: 16px; margin: 0 0 14px; }
.facts { display: grid; gap: 6px; margin-bottom: 16px; font-weight: 600; }
.facts div { display: flex; gap: 10px; align-items: center; }
.btns { display: grid; gap: 10px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 13px 16px; border-radius: 10px; font: 700 16px/1 var(--body);
  text-decoration: none; border: 1px solid var(--line); background: var(--panel); color: var(--ink); cursor: pointer; }
.btn:hover { border-color: #3a4150; }
.btn.red { background: var(--red); border-color: var(--red); color: #fff; }
.btn.red:hover { background: var(--red2); }
.btn.small { padding: 8px 12px; font-size: 13px; }

/* ---------- the player */
.stage { min-width: 0; }
.pbox { position: relative; width: 100%; aspect-ratio: 16 / 9; background: #000; border-radius: 14px; overflow: hidden; box-shadow: 0 0 0 1px #20242d, 0 30px 60px rgba(0,0,0,.5); }
.pbox video.rm-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #000; transition: opacity .35s ease; opacity: 1; }
.pbox video.rm-video.off { opacity: 0; pointer-events: none; }
.pbox:fullscreen { border-radius: 0; aspect-ratio: auto; }
.pctl { display: flex; gap: 8px; align-items: center; margin-top: 10px; flex-wrap: wrap; }
.pctl .grow { flex: 1; }
.chip { display: inline-flex; gap: 6px; align-items: center; padding: 6px 11px; border-radius: 999px; background: var(--panel); border: 1px solid var(--line);
  color: var(--ink2); font: 600 13px/1 var(--body); cursor: pointer; white-space: nowrap; }
.chip.on { background: #fff; color: #000; border-color: #fff; }
.chip .dot { width: 7px; height: 7px; border-radius: 50%; background: #555; }
.chip .dot.live { background: var(--red2); box-shadow: 0 0 0 3px rgba(227,38,44,.25); }
.sound-btn { position: absolute; z-index: 6; left: 50%; top: 50%; transform: translate(-50%, -50%); background: rgba(0,0,0,.72); color: #fff;
  border: 1px solid rgba(255,255,255,.3); border-radius: 999px; padding: 12px 20px; font: 700 15px var(--body); cursor: pointer; }

/* ---------- on-video graphics (also /program) */
.ov { position: absolute; inset: 0; pointer-events: none; z-index: 3; font-family: var(--body); container-type: inline-size; }
.ov-top { position: absolute; left: 2.2%; right: 2.2%; top: 3.2%; display: flex; gap: 1.2cqw; align-items: center; }
.ov-top .grow { flex: 1; }
.ov-live { background: var(--red); color: #fff; font: 800 clamp(10px, 1.5cqw, 22px)/1 var(--body); padding: .5em .8em; border-radius: .35em; letter-spacing: .04em; }
.ov-live::before { content: ""; display: inline-block; width: .55em; height: .55em; border-radius: 50%; background: #fff; margin-right: .45em; vertical-align: .05em; animation: blink 1.6s infinite; }
@keyframes blink { 50% { opacity: .25; } }
.ov-eye, .ov-cam { background: rgba(0,0,0,.6); color: #fff; font: 700 clamp(10px, 1.4cqw, 20px)/1 var(--body); padding: .5em .75em; border-radius: .35em; }
.ov-logo { height: clamp(26px, 7cqw, 110px); width: auto; filter: drop-shadow(0 2px 6px rgba(0,0,0,.6)); }
.ov-lower { position: absolute; left: 2.2%; right: 2.2%; bottom: 4%; display: flex; align-items: stretch; height: clamp(40px, 10.5cqw, 160px);
  filter: drop-shadow(0 6px 18px rgba(0,0,0,.55)); }
.ov-num { background: var(--red); color: #fff; font: 800 clamp(14px, 3cqw, 46px)/1 var(--head); display: grid; place-items: center; padding: 0 1.6cqw;
  border-radius: .3cqw 0 0 .3cqw; white-space: nowrap; font-style: italic; }
.ov-name { flex: 1; min-width: 0; background: rgba(10,12,16,.9); color: #fff; padding: 0 1.8cqw; display: flex; flex-direction: column; justify-content: center; }
.ov-name b { font: 800 clamp(14px, 3.1cqw, 48px)/1 var(--head); text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ov-name small { font: 600 clamp(9px, 1.5cqw, 23px)/1.2 var(--body); color: #d5d9e1; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: .35em; }
.ov-clock { background: #000; color: #fff; font: 800 clamp(18px, 5cqw, 78px)/1 var(--head); display: grid; place-items: center; min-width: 15cqw; padding: 0 1.4cqw;
  font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.ov-clock.countdown { color: var(--gold); }
.ov-clock.cap { color: var(--red2); font-size: clamp(12px, 3cqw, 46px); }
.ov-clock.stopped { color: #9fe3b2; }
.ov-spon { background: #fff; color: #333; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: .6cqw 1.4cqw; min-width: 13cqw;
  border-radius: 0 .3cqw .3cqw 0; }
.ov-spon small { font: 700 clamp(6px, .9cqw, 14px)/1 var(--body); text-transform: uppercase; letter-spacing: .08em; color: #666; margin-bottom: .3em; }
.ov-spon img { max-height: 70%; max-width: 18cqw; object-fit: contain; }
.ov-lower .ov-name:last-child { border-radius: 0 .3cqw .3cqw 0; }
.ov-lanes { position: absolute; right: 2.2%; top: 13%; width: 30cqw; max-height: 62%; overflow: hidden; background: rgba(10,12,16,.88); border-radius: .5cqw; color: #fff;
  padding: .8cqw 0; font-size: clamp(9px, 1.45cqw, 22px); }
.ov-lanes-h { font: 800 1.1em/1 var(--head); text-transform: uppercase; padding: 0 1cqw .6cqw; color: var(--red2); }
.ov-lane { display: flex; gap: .8cqw; align-items: center; padding: .35cqw 1cqw; border-top: 1px solid rgba(255,255,255,.07); }
.ov-lane .n { width: 1.8em; height: 1.8em; display: grid; place-items: center; background: #2a2f3a; border-radius: .3em; font-weight: 800; flex: none; }
.ov-lane .who { flex: 1; min-width: 0; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ov-lane .who small { display: block; color: #aab1bf; font-weight: 500; font-size: .78em; }
.ov-lane .res { font-weight: 800; font-variant-numeric: tabular-nums; }
.ov-ticker { position: absolute; left: 0; right: 0; bottom: 0; height: clamp(16px, 3.3cqw, 50px); background: var(--red); color: #fff; overflow: hidden; display: flex; align-items: center; }
.ov-tick-in { white-space: nowrap; font: 700 clamp(9px, 1.7cqw, 26px)/1 var(--body); padding-left: 100%; animation: tick 25s linear infinite; }
@keyframes tick { to { transform: translateX(-100%); } }
.ov-lower:not([hidden]) ~ .ov-ticker:not([hidden]) { bottom: 0; }
.ov:has(.ov-ticker:not([hidden])) .ov-lower { bottom: calc(clamp(16px, 3.3cqw, 50px) + 2.5%); }
.ov-slate { position: absolute; inset: 0; background: radial-gradient(ellipse at center, #1c1f27 0%, #07080a 75%); display: grid; place-items: center; pointer-events: auto; }
.ov-slate img.full { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.slate-card { text-align: center; padding: 4cqw; max-width: 80%; }
.slate-logo { max-height: 22cqw; max-width: 60cqw; }
.slate-title { font: 800 clamp(22px, 6cqw, 96px)/1 var(--head); text-transform: uppercase; }
.slate-msg { font: 800 clamp(16px, 3.4cqw, 54px)/1.1 var(--head); text-transform: uppercase; margin-top: 2cqw; letter-spacing: .02em; }
.slate-sub { color: #b9c0cc; font-size: clamp(11px, 1.6cqw, 24px); margin-top: 1cqw; }
.slate-spon { background: #fff; border-radius: 1cqw; padding: 2cqw 4cqw; display: inline-block; margin: 1.5cqw 0 .5cqw; }
.slate-spon img { max-height: 16cqw; max-width: 50cqw; display: block; }
.ov.slated .ov-top .ov-logo { display: none; }

/* ---------- side panel: on the floor */
.side-card { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 16px; }
.side-card h3 { font: 800 22px/1 var(--head); text-transform: uppercase; margin: 0 0 4px; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.side-card .sub { color: var(--ink2); font-weight: 600; margin-bottom: 10px; }
.lane-row { display: grid; grid-template-columns: 30px 1fr auto; gap: 10px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line2); }
.lane-row .n { width: 26px; height: 26px; border-radius: 6px; background: var(--panel2); display: grid; place-items: center; font-weight: 800; font-size: 13px; }
.lane-row:nth-child(-n+4) .n { }
.lane-row b { display: block; font-weight: 700; line-height: 1.2; }
.lane-row small { color: var(--muted); }
.lane-row .res { font-weight: 800; font-variant-numeric: tabular-nums; }
.pill-live { background: rgba(227,38,44,.16); color: var(--red2); border-radius: 999px; padding: 4px 9px; font: 700 11px/1 var(--body); letter-spacing: .04em; text-transform: uppercase; }
.next-up { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); font-size: 13.5px; color: var(--ink2); }
.next-up b { color: var(--ink); }

/* ---------- sections */
section.block { padding: 26px 0 6px; }
.sec-h { display: flex; align-items: baseline; gap: 12px; margin: 0 0 14px; }
.sec-h h2 { font: 800 28px/1 var(--head); text-transform: uppercase; margin: 0; letter-spacing: .01em; }
.sec-h .grow { flex: 1; }
.sec-h a { color: var(--red2); font-weight: 700; text-decoration: none; font-size: 14px; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 16px; }
.day { display: grid; grid-template-columns: 170px 1fr; gap: 16px; align-items: start; }
.day img { width: 100%; aspect-ratio: 16/10; object-fit: cover; border-radius: 10px; background: var(--panel2); }
.day h3 { margin: 0 0 2px; font: 800 22px/1.1 var(--head); text-transform: uppercase; }
.day .venue { color: var(--ink2); font-weight: 600; margin-bottom: 8px; }
.day ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 4px; }
.day li::before { content: "✓"; color: var(--red2); font-weight: 800; margin-right: 8px; }
.wk { border-top: 1px solid var(--line2); padding: 12px 0; }
.wk:first-child { border-top: 0; padding-top: 0; }
.wk-h { display: flex; gap: 12px; align-items: baseline; }
.wk-n { background: var(--red); color: #fff; font: italic 800 15px/1 var(--head); padding: 5px 8px; border-radius: 6px; white-space: nowrap; }
.wk-name { font: 800 21px/1.1 var(--head); text-transform: uppercase; }
.wk-std { color: var(--ink2); font-size: 13.5px; font-weight: 600; }
.wk-desc { color: var(--ink2); white-space: pre-line; margin: 6px 0 0; font-size: 14px; }
.heats { display: grid; gap: 6px; margin-top: 10px; }
.heat { background: var(--panel2); border-radius: 10px; padding: 9px 12px; }
.heat summary { cursor: pointer; display: flex; gap: 10px; align-items: center; list-style: none; font-weight: 600; }
.heat summary::-webkit-details-marker { display: none; }
.heat summary .t { color: var(--muted); font-variant-numeric: tabular-nums; min-width: 64px; }
.heat summary .grow { flex: 1; }
.heat .lanes { margin-top: 8px; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 4px 14px; font-size: 13.5px; }
.heat .lanes span b { color: var(--muted); font-weight: 700; margin-right: 6px; }
.status { font: 700 11px/1 var(--body); text-transform: uppercase; letter-spacing: .05em; padding: 4px 7px; border-radius: 6px; background: #252a35; color: var(--ink2); }
.status.live { background: var(--red); color: #fff; }
.status.done { background: #17331f; color: #8be0a4; }
.divs { display: flex; gap: 10px; flex-wrap: wrap; }
.divs span { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 12px 22px; font: 800 20px/1 var(--head); text-transform: uppercase; }
.divs span:first-child { background: var(--red); border-color: var(--red); }

.mission { position: relative; border-radius: 16px; overflow: hidden; background: linear-gradient(100deg, #15181f 0%, #15181f 45%, #0e1015 100%); border: 1px solid var(--line);
  display: grid; grid-template-columns: 1.2fr 1fr; min-height: 220px; }
.mission .txt { padding: 26px; position: relative; z-index: 1; }
.mission h3 { font: 800 34px/1 var(--head); margin: 0 0 6px; text-transform: none; }
.mission .tag { color: var(--red2); font: 800 26px/1.1 var(--head); margin: 10px 0; }
.mission p { color: var(--ink2); white-space: pre-line; margin: 0 0 14px; }
.mission .pics { display: flex; gap: 22px; align-items: center; justify-content: center; padding: 22px; }
.mission .pics img { max-height: 110px; max-width: 45%; object-fit: contain; }

.sponsors { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
.spon { background: #fff; color: #222; border-radius: 12px; padding: 14px; text-decoration: none; display: flex; flex-direction: column; align-items: center; gap: 8px; min-height: 140px;
  justify-content: center; transition: transform .15s; }
a.spon:hover { transform: translateY(-2px); }
.spon img { max-height: 76px; max-width: 90%; object-fit: contain; }
.spon .nm { font: 800 20px/1.1 var(--head); text-align: center; }
.spon small { color: #666; font-weight: 700; text-transform: uppercase; font-size: 11px; letter-spacing: .06em; }
.spon .tl { color: #777; font-size: 12px; text-align: center; }

.clips { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.clip { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; cursor: pointer; text-align: left; color: inherit; padding: 0; font: inherit; }
.clip img { width: 100%; aspect-ratio: 16/9; object-fit: cover; display: block; background: #000; }
.clip div { padding: 8px 10px; font-weight: 700; font-size: 14px; }
.clip small { display: block; color: var(--muted); font-weight: 500; }

footer { border-top: 1px solid var(--line2); margin-top: 36px; padding: 22px 0 40px; color: var(--muted); font-size: 13.5px; }
footer .wrap { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.beta { border: 1px solid var(--line); border-radius: 6px; padding: 2px 7px; font-size: 11px; font-weight: 700; letter-spacing: .08em; }

.modal { position: fixed; inset: 0; background: rgba(0,0,0,.8); z-index: 50; display: grid; place-items: center; padding: 16px; }
.modal .in { width: min(960px, 100%); }
.modal .in .pbox { border-radius: 12px; }

.empty { color: var(--muted); padding: 10px 0; }
.notfound { min-height: 70vh; display: grid; place-items: center; text-align: center; }

@media (max-width: 1180px) {
  .hero { grid-template-columns: minmax(0, 1fr) minmax(250px, 320px); }
  .title-card { grid-column: 1 / -1; display: grid; grid-template-columns: auto 1fr; gap: 18px; align-items: center; }
  .title-card .logo { max-height: 120px; margin: 0; }
  .title-card h1 { font-size: 44px; }
  .btns { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 820px) {
  .wrap { padding: 0 12px; }
  .hero { grid-template-columns: minmax(0, 1fr); padding-top: 12px; }
  .title-card { grid-template-columns: 1fr; order: 2; }
  .stage { order: 1; }
  .side { order: 3; }
  .title-card h1 { font-size: 40px; }
  .pbox { border-radius: 10px; margin: 0 -12px; width: calc(100% + 24px); }
  .day { grid-template-columns: 1fr; }
  .mission { grid-template-columns: 1fr; }
  .top nav a { padding: 8px 8px; }
  .brand { font-size: 22px; }
}

/* ---------- gym whiteboard */
.wod { background: #f6f6f2; color: #16181d; border-radius: 14px; padding: 16px 18px; box-shadow: inset 0 0 0 6px #d9dbe0; }
.wod-nav { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 8px; font-size: 13px; }
.wod-nav .chip { background: #e6e7ea; color: #333; border-color: #d0d3d8; }
.wod-name { font: 800 40px/1 var(--head); text-transform: uppercase; margin: 2px 0 4px; color: #b3151b; }
.wod .wk-std { color: #444; }
.wod-text { font: 600 17px/1.45 "Inter", system-ui, sans-serif; white-space: pre-wrap; margin: 10px 0 14px; color: #111; }
.wod .btns { grid-template-columns: 1fr; }
.wod .btn:not(.red) { background: #fff; color: #111; border-color: #cfd3da; }
.title-card .logo.small { max-height: 70px; margin-bottom: 10px; }
@media (min-width: 1181px) { body.wb .hero { grid-template-columns: minmax(270px, 360px) minmax(0, 1fr) minmax(260px, 330px); } }
.tabsm { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 8px; }
.tabsm .chip { padding: 5px 10px; font-size: 12px; }
.lane-row.me { background: rgba(227,38,44,.12); border-radius: 8px; }
.dot-live { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--red2); margin-left: 4px; animation: blink 1.6s infinite; vertical-align: 1px; }
.wk.pickable { cursor: pointer; }
.wk.pickable:hover { border-color: #3a4150; }
.modal .in.form { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 18px; width: min(440px, 100%); display: grid; gap: 10px; max-height: 92vh; overflow: auto; }
.form h2 { font: 800 26px/1 var(--head); text-transform: uppercase; margin: 0 0 6px; }
.form label { display: grid; gap: 4px; font-size: 13px; font-weight: 600; color: var(--ink2); }
.form label small { font-weight: 500; color: var(--muted); }
.form input:not([type=checkbox]), .form select { background: var(--bg2); color: var(--ink); border: 1px solid var(--line); border-radius: 9px; padding: 11px 12px; font: 16px var(--body); width: 100%; }
.form .ck { display: flex; gap: 8px; align-items: center; }
.form .ck input { width: 20px; height: 20px; }
.form .two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; align-items: end; }
.form .row-end { display: flex; gap: 8px; align-items: center; margin-top: 4px; }
.form .err { color: #ff8f93; font-size: 13.5px; min-height: 1em; }
.ov-board .ov-lane .n { background: var(--red); }
.ov-board .ov-lane:first-of-type .n { background: var(--gold); color: #000; }
@media (max-width: 1180px) { body.wb .title-card { grid-template-columns: 1fr; } }
@media (max-width: 820px) { body.wb .title-card { order: 2; } body.wb .side { order: 3; } .wod-name { font-size: 34px; } }

.lane-row small.note { color: #9aa3b2; font-style: italic; }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 6px; }
.seg button { padding: 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg2); color: var(--ink2); font: 800 18px/1 var(--head); text-transform: uppercase; cursor: pointer; }
.seg button.on { background: var(--red); border-color: var(--red); color: #fff; }
#mineBtn { border-color: #6b4f12; color: #f5d27a; }
.flash { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%) translateY(20px); background: #222832; color: #fff; padding: 12px 18px; border-radius: 12px;
  opacity: 0; transition: .2s; z-index: 80; max-width: 92vw; box-shadow: 0 10px 30px rgba(0,0,0,.5); font-weight: 600; pointer-events: none; }
.flash.show { opacity: 1; transform: translateX(-50%); }
.seg.small button { padding: 8px; font-size: 15px; }
footer .foot-links { display: flex; gap: 16px; align-items: center; margin-left: auto; flex-wrap: wrap; }
footer .foot-links a { color: var(--ink2); text-decoration: none; font-weight: 600; }
footer .foot-links a:hover { color: #fff; }
footer .foot-links .ver { opacity: .7; font-size: 12px; }
