/* Live results screen. Drawn on a fixed 1920 x 1080 board and scaled to fit any TV. */

html,
body {
  height: 100%;
  overflow: hidden;
  background: var(--deep);
}
body {
  cursor: default;
}
body.idle {
  cursor: none;
}

.stage {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.board {
  position: relative;
  flex: none;
  width: 1920px;
  height: 1080px;
  padding: 0 64px;
  background: var(--bg);
  display: grid;
  grid-template-rows: 172px minmax(0, 1fr) 86px;
  grid-template-columns: minmax(0, 1fr);
  transform-origin: center center;
  overflow: hidden;
}

/* header */
.head {
  min-width: 0;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 40px;
  padding-bottom: 26px;
  border-bottom: 1px solid var(--line);
}
.title-wrap {
  display: flex;
  align-items: center;
  gap: 40px;
  min-width: 0;
}
.event-logo {
  height: 104px;
  max-width: 320px;
  padding-right: 40px;
  border-right: 1px solid var(--line);
  align-self: flex-end;
  margin-bottom: 2px;
}
.title {
  min-width: 0;
}
.event {
  font-size: 62px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sub {
  margin-top: 14px;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}
.clockwrap {
  display: flex;
  align-items: flex-end;
  gap: 30px;
  flex: none;
}
.pill {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 46px;
  padding: 0 20px;
  margin-bottom: 14px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.pill i {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--dim);
}
.pill.live {
  border-color: var(--orange);
}
.pill.live i {
  background: var(--orange);
  animation: pulse 1.4s ease-in-out infinite;
}
.pill.done i {
  background: var(--bone);
}
@keyframes pulse {
  50% {
    opacity: 0.25;
  }
}
.raceclock {
  font-size: 118px;
  font-weight: 600;
  line-height: 0.86;
  letter-spacing: -0.03em;
  min-width: 4.2ch;
  text-align: right;
}

/* live view */
.view {
  position: relative;
  min-height: 0;
}
.cols {
  display: grid;
  grid-template-columns: 96px 150px minmax(0, 1fr) 572px 300px 250px;
  align-items: end;
  height: 52px;
  padding: 0 28px 10px 24px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--dim);
}
.cols .c-time {
  text-align: right;
}
.cols .c-track {
  display: flex;
  gap: 6px;
}
.rows {
  position: relative;
  height: 776px;
}
.row {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 120px;
  display: grid;
  grid-template-columns: 96px 150px minmax(0, 1fr) 572px 300px 250px;
  align-items: center;
  padding: 0 28px 0 24px;
  border-radius: 16px;
  background: var(--panel);
  border: 1px solid transparent;
  transition: transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1), background 0.4s ease, border-color 0.4s ease, opacity 0.4s ease;
  will-change: transform;
}
.row.finished {
  background: var(--card);
}
.row.out {
  opacity: 0.55;
}
.row.hit {
  border-color: var(--orange);
}
.row .pos {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  font-size: 66px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
}
.row .pos .mv {
  height: 22px;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.02em;
}
.row .pos .mv.up {
  color: var(--orange);
}
.row .pos .mv.down {
  color: var(--dim);
}
.row .pos.none {
  color: var(--dim);
  font-weight: 400;
}
.lane {
  display: flex;
  align-items: center;
  gap: 14px;
}
.lane .lanebars {
  font-size: 34px;
}
.lane b {
  min-width: 26px;
  font-size: 34px;
  font-weight: 600;
  color: var(--muted);
}
.team {
  min-width: 0;
  padding-right: 24px;
}
.team .name {
  font-family: var(--serif);
  font-size: 44px;
  font-weight: 600;
  line-height: 1.08;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.team .who {
  margin-top: 6px;
  font-size: 21px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.div {
  display: inline-block;
  margin-left: 10px;
  padding: 1px 10px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--bone);
  vertical-align: 3px;
}

.track {
  display: flex;
  gap: 8px;
  align-items: stretch;
}
.cell {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.cell .lab {
  height: 16px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--dim);
  white-space: nowrap;
  overflow: hidden;
}
.cell .bar {
  display: flex;
  gap: 3px;
  height: 10px;
}
.cell .bar i {
  flex: 1;
  border-radius: 5px;
  background: var(--line);
}
.cell .bar i.r {
  flex: 0 0 32%;
}
.cell .bar i.d {
  background: var(--done);
}
.cell .bar i.n {
  background: var(--orange);
  animation: pulse 1.6s ease-in-out infinite;
}
.cell .t {
  height: 24px;
  font-size: 21px;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
}
.cell .rt {
  height: 18px;
  margin-top: -3px;
  font-size: 16px;
  font-weight: 600;
  color: var(--dim);
  white-space: nowrap;
}
.cell.done .lab,
.cell.now .lab {
  color: var(--bone);
}
.cell.now .t,
.cell .rt.live {
  color: var(--bone);
}
.cell .t.best {
  color: var(--orange);
}
.cell .rt.best {
  color: var(--bone);
}

.now {
  min-width: 0;
  padding-left: 30px;
}
.now .st.run {
  color: var(--muted);
}
.now .st.go {
  color: var(--orange);
}
.now .st {
  font-size: 25px;
  font-weight: 700;
  letter-spacing: 0.04em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.now .tm {
  margin-top: 4px;
  font-size: 40px;
  font-weight: 600;
  line-height: 1;
}
.now.reps .st {
  color: var(--orange);
}
.reps-n {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-top: 2px;
}
.reps-n b {
  font-size: 56px;
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.02em;
}
.reps-n span {
  font-size: 24px;
  color: var(--muted);
}
.repbar {
  margin-top: 8px;
  height: 8px;
  border-radius: 4px;
  background: var(--line);
  overflow: hidden;
}
.repbar i {
  display: block;
  height: 100%;
  background: var(--orange);
  transition: width 0.25s ease-out;
}
.now .fin {
  font-size: 25px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.now .fin small {
  display: block;
  margin-top: 6px;
  font-size: 19px;
  letter-spacing: 0.02em;
  text-transform: none;
  font-weight: 500;
  color: var(--muted);
}

.time {
  text-align: right;
}
.time .big {
  font-size: 52px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
}
.time .small {
  margin-top: 8px;
  font-size: 19px;
  color: var(--muted);
  white-space: nowrap;
}
.time .lead {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.time .pen {
  color: var(--warn);
}

/* results + leaderboard */
.res-title {
  display: flex;
  align-items: baseline;
  gap: 26px;
  padding: 34px 0 20px;
}
.res-title .serif {
  font-size: 52px;
  font-weight: 600;
}
.res-title .eyebrow {
  font-size: 20px;
}
.res {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 8px;
  font-size: 24px;
}
.res th {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--dim);
  text-align: right;
  padding: 0 12px 2px;
}
.res th.l {
  text-align: left;
}
.res td {
  background: var(--panel);
  padding: 16px 12px;
  text-align: right;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
}
.res td:first-child {
  border-radius: 14px 0 0 14px;
  padding-left: 24px;
}
.res td:last-child {
  border-radius: 0 14px 14px 0;
  padding-right: 24px;
}
.res td.l {
  text-align: left;
}
.res td.pos {
  font-size: 46px;
  font-weight: 700;
  color: var(--bone);
  width: 70px;
}
.res td.tm .nm {
  font-family: var(--serif);
  font-size: 34px;
  font-weight: 600;
  color: var(--bone);
  max-width: 560px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.res td.tm .wh {
  font-size: 17px;
  font-weight: 500;
  margin-top: 4px;
  max-width: 560px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.res td.sp small {
  display: block;
  margin-top: 4px;
  font-size: 16px;
  color: var(--dim);
}
.res td.sp .best {
  color: var(--orange);
}
.res td.sp small.best {
  color: var(--bone);
}
.res td.total {
  font-size: 40px;
  font-weight: 700;
  color: var(--bone);
}
.res td.total small {
  display: block;
  font-size: 15px;
  color: var(--warn);
  font-weight: 600;
}
.res tr.first td {
  background: var(--card);
}

.board-cols {
  display: grid;
  gap: 36px;
}
.bcol h3 {
  margin: 0 0 12px;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}
.bitem {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  align-items: center;
  gap: 14px;
  height: 74px;
  padding: 0 20px;
  margin-bottom: 8px;
  border-radius: 14px;
  background: var(--panel);
}
.bitem .r {
  font-size: 30px;
  font-weight: 700;
}
.bitem .n {
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bitem .h {
  font-size: 15px;
  color: var(--muted);
  margin-top: 2px;
}
.bitem .t {
  font-size: 32px;
  font-weight: 700;
}
.bitem:first-of-type {
  background: var(--card);
}
.empty-board {
  font-size: 30px;
  color: var(--muted);
  padding: 30px 0;
}

/* message */
.message {
  display: flex;
  align-items: center;
  justify-content: center;
}
.msg {
  font-size: 104px;
  font-weight: 600;
  line-height: 1.08;
  text-align: center;
  max-width: 1500px;
}

/* footer */
.foot {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  border-top: 1px solid var(--line);
}
.ticker {
  display: flex;
  align-items: center;
  gap: 18px;
  min-width: 0;
  font-size: 22px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
}
.ticker .k {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--dim);
}
.ticker b {
  color: var(--bone);
  font-weight: 600;
}
.ticker .item {
  display: inline-flex;
  gap: 10px;
  align-items: baseline;
}
.ticker .item.fresh b {
  color: var(--orange);
}
.ticker .sep {
  color: var(--dim);
}
.credit {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: none;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--dim);
}
.credit img {
  height: 46px;
  display: block;
}

/* countdown */
.countdown {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(15, 18, 21, 0.9);
  z-index: 10;
}
.cd-label {
  font-size: 34px;
  letter-spacing: 0.3em;
}
.cd-n {
  font-size: 440px;
  font-weight: 700;
  line-height: 1;
  color: var(--orange);
  letter-spacing: -0.04em;
}
.countdown.go .cd-n {
  color: var(--bone);
}

.offline {
  position: absolute;
  right: 64px;
  bottom: 104px;
  z-index: 11;
  padding: 12px 22px;
  border-radius: 999px;
  background: var(--bad);
  color: #fff;
  font-size: 20px;
  font-weight: 700;
}

.fs {
  position: fixed;
  top: 14px;
  right: 14px;
  z-index: 50;
  height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--panel);
  font-size: 14px;
  font-weight: 600;
}

/* adidas look */
html[data-theme='adidas'] .event {
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.005em;
}
html[data-theme='adidas'] .team .name,
html[data-theme='adidas'] .res td.tm .nm,
html[data-theme='adidas'] .bitem .n,
html[data-theme='adidas'] .msg {
  font-weight: 700;
  letter-spacing: -0.015em;
}
html[data-theme='adidas'] .board {
  /* the shoe's red glow over a fine mesh, as in the campaign's third picture */
  background:
    radial-gradient(ellipse 52% 38% at 78% -6%, rgba(232, 52, 78, 0.34), transparent 70%),
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px) 0 0 / 26px 26px,
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px) 0 0 / 26px 26px,
    #050506;
}
html[data-theme='adidas'] .row {
  background: rgba(20, 20, 22, 0.94);
}
html[data-theme='adidas'] .row.finished {
  background: rgba(34, 34, 38, 0.96);
}
html[data-theme='adidas'] .res td {
  background: rgba(20, 20, 22, 0.94);
}
html[data-theme='adidas'] .res tr.first td {
  background: rgba(34, 34, 38, 0.96);
}
html[data-theme='adidas'] .pill.live {
  background: var(--orange);
  border-color: var(--orange);
  color: #fff;
}
html[data-theme='adidas'] .pill.live i {
  background: #fff;
}
html[data-theme='adidas'] .event-logo {
  height: 112px;
}

/* finish moment: a band across the bottom of the board */
.finish-banner {
  position: absolute;
  left: 64px;
  right: 64px;
  bottom: 104px;
  z-index: 9;
  height: 196px;
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 40px;
  padding: 0 48px 0 0;
  border-radius: 20px;
  background: var(--orange);
  color: var(--on-accent);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
  transform: translateY(260px);
  opacity: 0;
  transition: transform 0.55s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.35s ease;
  pointer-events: none;
  overflow: hidden;
}
.finish-banner.show {
  transform: none;
  opacity: 1;
}
.fb-tag {
  align-self: stretch;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.22);
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
}
.fb-name {
  font-family: var(--serif);
  font-size: 68px;
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.015em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.fb-who {
  margin-top: 10px;
  font-size: 26px;
  font-weight: 600;
  opacity: 0.9;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.fb-time {
  font-size: 104px;
  font-weight: 800;
  letter-spacing: -0.03em;
}
.fb-pos {
  min-width: 150px;
  text-align: right;
  font-size: 64px;
  font-weight: 800;
  text-transform: uppercase;
}

/* ---------- simple board (default): fewer, bigger things ---------- */
.board.simple .cols {
  display: none;
}
.board.simple .rows {
  height: 816px;
  margin-top: 6px;
}
.board.simple .row {
  height: 126px;
  grid-template-columns: 120px 150px minmax(0, 1fr) 320px 360px 260px;
  padding: 0 32px 0 28px;
}
.board.simple .lane {
  gap: 14px;
}
.board.simple .lane b {
  min-width: 30px;
  font-size: 40px;
}
.board.simple .lane .lanebars {
  font-size: 40px;
}
.board.simple .row .pos {
  font-size: 84px;
}
.board.simple .row .pos .mv {
  font-size: 22px;
}
.board.simple .team .name {
  font-size: 58px;
  line-height: 1.02;
}
.board.simple .team .who {
  margin-top: 10px;
  font-size: 24px;
}
.prog {
  display: flex;
  align-items: center;
  gap: 6px;
  padding-right: 44px;
}
.prog i {
  flex: 1;
  height: 14px;
  border-radius: 7px;
  background: var(--line);
}
.prog i.f {
  flex: 0.55;
}
.prog i.d {
  background: var(--done);
}
.prog i.n {
  background: var(--orange);
  animation: pulse 1.6s ease-in-out infinite;
}
.prog i.r {
  background: transparent;
  box-shadow: inset 0 0 0 3px var(--orange);
}
.board.simple .now {
  padding-left: 0;
}
.board.simple .now .st {
  font-size: 32px;
}
.board.simple .now .tm {
  margin-top: 6px;
  font-size: 56px;
}
.board.simple .now .fin {
  font-size: 30px;
}
.board.simple .reps-n b {
  font-size: 72px;
}
.board.simple .reps-n span {
  font-size: 30px;
}
.board.simple .repbar {
  height: 10px;
  margin-top: 6px;
}
.board.simple .time .big {
  font-size: 66px;
}
.board.simple .time .lead {
  font-size: 36px;
}
.board.simple .time .small {
  font-size: 22px;
}
