@font-face{
  font-family: hyperSuperFast;
  src: url(/fonts/HyperSuperFast.ttf);
}

:root{
  --h2-color: #181818;

  /* NEW: general theme */
  --page-bg: #ffffff;
  --text-color: #181818;
  --link-color: #181818;

  /* light “chip” background used by current-points headers */
  --soft-chip-bg: rgba(0,0,0,0.05);
  --soft-chip-text: #181818;

  /* table wrapper / misc white panels */
  --panel-bg: #ffffff;
}

.darkmode{
  --h2-color: #ebebeb;

  /* NEW: general theme */
  --page-bg: #0f0f10;
  --text-color: #ebebeb;
  --link-color: #ebebeb;

  --soft-chip-bg: rgba(255,255,255,0.08);
  --soft-chip-text: #ffffff;

  --panel-bg: #151515;
}

body{
  background: var(--page-bg);
  color: var(--text-color);
}

p {
    width: 40%; /* A defined width is helpful for wrapping */
    overflow-wrap: break-word;
}

@media (max-width: 700px){
    p {
    width: 90%; /* A defined width is helpful for wrapping */
    overflow-wrap: break-word;
    }
}

.results-wrap{
  max-width: 820px;
  margin: 18px auto 40px;
  padding: 0 12px;
  font-family: "hyperSuperFast";
}

.race-hero{
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  height: 160px;
  display: grid;
  grid-template-columns: 52px 1fr 52px;
  align-items: center;
  box-shadow: 0 0 18px rgba(0,0,0,0.18);
  margin-bottom: 14px;
}

.race-bg{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  object-fit: cover;
  z-index: 0;
}

.race-overlay{
  position:absolute;
  inset:0;
  background: rgba(0,0,0,0.55);
  z-index: 1;
}

.race-hero-content{
  z-index: 2;
  text-align:center;
  padding: 0 10px;
}

.race-title{
  font-size: 22px;
  letter-spacing: 1px;
  color: #fff;
  text-shadow: -2px -2px 0 #000, 2px -2px 0 #000, -2px 2px 0 #000, 2px 2px 0 #000;
}

.race-sub{
  margin-top: 8px;
  font-size: 14px;
  color: rgba(255,255,255,0.9);
  display:flex;
  justify-content:center;
  gap: 10px;
  flex-wrap: wrap;
}

.race-chip{
  background: rgba(92,192,179,0.25);
  border: 1px solid rgba(92,192,179,0.55);
  padding: 6px 10px;
  border-radius: 999px;
}

.race-nav{
  z-index: 2;
  appearance:none;
  border:0;
  background: transparent;
  color: #fff;
  font-size: 42px;
  cursor: pointer;
  line-height: 1;
  opacity: 0.9;
}
.race-nav:hover{ opacity: 1; }

.podium{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 10px 0 14px;
}

.podium-card{
  background: rgba(0,0,0,0.85);
  border-radius: 14px;
  border: 1px solid rgba(255, 183, 3, 0.25);
  padding: 10px 10px;
  text-align: center;
  color: #fff;
  box-shadow: 0 0 14px rgba(255,183,3,0.12);
}

.podium-pos{
  font-size: 14px;
  opacity: 0.85;
  letter-spacing: 1px;
  margin-bottom: 6px;
}

.podium-num{
  width: 88px;
  height: auto;
  filter: drop-shadow(0 0 8px rgba(0,0,0,0.55));
}

.podium-picks{
  margin-top: 8px;
  font-size: 13px;
  opacity: 0.9;
}

.results-board{
  background: rgba(0,0,0,0.85);
  border: 1px solid rgba(92,192,179,0.25);
  border-radius: 14px;
  padding: 10px;
}

.finisher{
  display: grid;
  grid-template-columns: 46px 90px 1fr;
  gap: 10px;
  align-items: center;
  padding: 10px 6px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  color: #fff;
}

.finisher:last-child{ border-bottom: 0; }

.finisher-pos{
  text-align:center;
  font-size: 18px;
  opacity: 0.95;
}

.finisher-num{
  display:flex;
  align-items:center;
  justify-content:center;
}

.finisher-num img{
  width: 72px;
  height: auto;
  filter: drop-shadow(0 0 8px rgba(0,0,0,0.55));
}

.num-fallback{
  display:none;
  font-size: 22px;
  text-shadow: -2px -2px 0 #000, 2px -2px 0 #000, -2px 2px 0 #000, 2px 2px 0 #000;
}

.finisher-picks{
  font-family: "Titillium Web", sans-serif;
  font-size: 14px;
}

.pick-count{
  display:inline-block;
  margin-bottom: 6px;
  color: rgba(255,255,255,0.85);
}

.muted{
  color: rgba(255,255,255,0.6);
}

.chips{
  display:flex;
  gap: 6px;
  flex-wrap: wrap;
}

.chip{
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 13px;
  color: rgba(255,255,255,0.95);
}

.chip.more{
  border-color: rgba(92,192,179,0.55);
  color: #5cc0b3;
}

@media (max-width: 640px){
  .podium{ grid-template-columns: 1fr; }
  .finisher{ grid-template-columns: 36px 78px 1fr; }
  .race-hero{ height: 180px; }
}

.primary-header .primary-navigation a {
  font-family: "Titillium Web", sans-serif !important;
}

/* Ensure the fallback uses your arcade font */
.num-fallback,
.podium-fallback {
  font-family: "hyperSuperFast";
  font-weight: 700;
  color: #fff;
  text-shadow:
    -2px -2px 0 #000,
     2px -2px 0 #000,
    -2px  2px 0 #000,
     2px  2px 0 #000;
}

/* PODIUM fallback (match ~88px image width) */
.podium-fallback{
  display: none;            /* shown via onerror */
  width: 88px;
  height: 44px;
  line-height: 44px;
  text-align: center;
  font-size: 34px;
  border-radius: 10px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
}

/* FULL LIST fallback (match ~72px image width) */
.num-fallback{
  display: none;            /* shown via onerror */
  width: 72px;
  height: 40px;
  line-height: 40px;
  justify-content: center;  /* because we set inline-flex */
  align-items: center;
  font-size: 28px;
  border-radius: 10px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
}

.theme-toggle-wrap{
  width: 700px;
  max-width: 100%;
  margin: 10px auto 0;
  padding: 0 12px;
  display: flex;
  justify-content: flex-end;
  box-sizing: border-box;
}

.theme-toggle{
  font-family: "hyperSuperFast";
  background: rgba(0,0,0,0.85);
  color: #fff;
  border: 1px solid rgba(92,192,179,0.45);
  border-radius: 999px;
  padding: 8px 12px;
  cursor: pointer;
  line-height: 1;
}

.darkmode .theme-toggle{
  background: rgba(255,255,255,0.06);
  color: #fff;
}
