/* The hub: today's show. One scoreboard, one lineup of lit-bulb tiles. */
body.hub { --accent: var(--gold); }
.hub-header, .hub-main { width: min(100% - 32px, 1120px); margin-inline: auto; position: relative; z-index: 2; }
.hub-header { min-height: 68px; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.wordmark { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font: 400 24px/1 var(--display); letter-spacing: .08em; text-decoration: none; }
.wordmark.small { font-size: 16px; }
.signal { width: 20px; aspect-ratio: 1; border-radius: 50%; position: relative; background: var(--gold); box-shadow: 0 0 22px #ffc94a80; flex: none; }
.signal::after { content: ''; position: absolute; inset: 5.5px; border-radius: 50%; background: var(--bg); }
.wordmark.small .signal { width: 14px; }
.wordmark.small .signal::after { inset: 4px; }
.streak-pill { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); color: var(--ink); text-decoration: none; font-size: 1rem; }
.streak-pill b { font: 800 1.05rem/1 var(--meter); color: var(--gold2); }
.streak-pill:hover { border-color: var(--gold); }

/* ---------- the scoreboard ---------- */
.board {
  position: relative; isolation: isolate; overflow: clip; text-align: center;
  padding: 26px clamp(18px,5vw,48px) clamp(20px,4vw,32px); border-radius: 28px;
  border: 1px solid #7a55a3;
  background:
    radial-gradient(70% 90% at 50% 0%, #6a2fa255, transparent 70%),
    linear-gradient(180deg, #2f1652, #1e0f35);
  box-shadow: var(--deep), inset 0 1px 0 #ffffff1a;
}
/* a frame of marquee bulbs around the board */
.board::before {
  content: ''; position: absolute; inset: 8px; z-index: -1; border-radius: 22px; pointer-events: none;
  background:
    radial-gradient(circle, var(--gold2) 0 2px, transparent 2.6px) 0 0 / 18px 6px repeat-x,
    radial-gradient(circle, var(--gold2) 0 2px, transparent 2.6px) 0 100% / 18px 6px repeat-x;
  opacity: .5;
}
.board-top { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; color: var(--dim); font-size: .88rem; }
.board-top p { margin: 0; }
.board-date { color: var(--ink); font-weight: 650; }
.board-reset b { font-family: var(--meter); color: var(--gold2); }
.board-title { margin: 18px 0 4px; font: 400 clamp(1.05rem,4.6vw,1.4rem)/1.2 var(--display); letter-spacing: .14em; color: var(--dim); }
.board-score { margin: 0; display: flex; justify-content: center; align-items: baseline; gap: 10px; font-family: var(--display); }
.board-score b { font-weight: 400; font-size: clamp(3.6rem,19vw,6.5rem); line-height: 1; color: var(--gold); text-shadow: 0 0 34px #ffc94a70, 0 4px 0 #6e3d00; }
.board-score span { font-size: clamp(1rem,4.6vw,1.5rem); color: var(--dim); }
.board-bulbs { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; margin: 18px 0 8px; }
.board-bulbs i { width: 16px; height: 16px; border-radius: 50%; background: #ffffff14; border: 1px solid #ffffff2e; }
.board-bulbs i.on { background: var(--b); border-color: transparent; box-shadow: 0 0 12px var(--b); }
.board-bulbs i.off { opacity: .35; border-style: dashed; }
.daily-progress { margin: 6px 0 0; color: var(--dim); font-size: .92rem; }
.board-cta { max-width: 420px; margin: 18px auto 0; }

/* ---------- lineup ---------- */
#lineup, #stats, #daily-total { scroll-margin-top: 12px; }
#lineup { margin-top: clamp(30px,6vw,52px); }
.sec-head { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 4px 16px; margin-bottom: 14px; }
.sec-head h2, .daily-card h2, .stats-card h2 { margin: 0; font-size: clamp(1.3rem,3vw,1.7rem); line-height: 1.2; }
.sec-head p { margin: 0; color: var(--dim); font-size: .9rem; }
.games { display: grid; gap: 12px; grid-template-columns: minmax(0,1fr); }
.gamecard {
  --c: var(--gold); position: relative; display: grid; grid-template-columns: 56px minmax(0,1fr); grid-template-areas: "ge copy" "ge bulbs" "ge status";
  column-gap: 14px; row-gap: 6px; align-items: center; padding: 14px 16px; border-radius: 20px;
  color: var(--ink); text-decoration: none;
  background: linear-gradient(135deg, color-mix(in srgb,var(--c) 14%,var(--panel)), var(--panel) 60%);
  border: 1px solid color-mix(in srgb,var(--c) 30%,var(--line));
  transition: transform .12s, border-color .12s;
}
.gamecard:hover { border-color: var(--c); transform: translateY(-2px); }
.gamecard:active { transform: translateY(1px); }
.gamecard .ge {
  grid-area: ge; width: 56px; height: 56px; display: grid; place-items: center; font-size: 30px; line-height: 1; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, color-mix(in srgb,var(--c) 40%,var(--bg2)), var(--bg) 80%);
  border: 2px solid color-mix(in srgb,var(--c) 65%,transparent);
}
.gamecard-copy { grid-area: copy; min-width: 0; }
.gamecard h3 { color: var(--c); font: 400 1.12rem/1.2 var(--display); letter-spacing: .04em; margin: 0 0 2px; }
.gamecard p { color: var(--dim); font-size: .88rem; line-height: 1.35; margin: 0; }
.bulbs { grid-area: bulbs; display: flex; gap: 6px; }
.bulbs i { width: 11px; height: 11px; border-radius: 50%; background: #ffffff14; border: 1px solid #ffffff26; }
.bulbs i.on { background: var(--b); border-color: transparent; box-shadow: 0 0 8px var(--b); }
.status { grid-area: status; font: 700 .8rem/1.3 var(--mono); color: var(--c); }
.status.done { color: var(--green); }
.status.wait { color: var(--dim); font-weight: 500; }
.status.resume { color: var(--violet); }
.gamecard.wait { opacity: .7; }
.gamecard.done .ge { border-color: var(--green); }
.gamecard.done::after { content: '✓'; position: absolute; top: 12px; right: 14px; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; background: var(--green); color: var(--on-accent); font-weight: 800; font-size: .8rem; }

/* ---------- scorecard + stats ---------- */
.hub-split { display: grid; gap: 16px; margin-top: clamp(30px,6vw,52px); }
.daily-card, .stats-card { padding: clamp(16px,4vw,24px); border-radius: 22px; border: 1px solid var(--line); background: var(--panel); }
.daily-games { margin: 12px 0 0; padding: 0; list-style: none; display: grid; gap: 0 18px; }
.daily-games li { display: flex; justify-content: space-between; align-items: center; gap: 8px; min-height: 46px; border-bottom: 1px solid var(--line); font-size: .9rem; }
.dg-name { font-weight: 650; }
.daily-games b { font-family: var(--meter); color: var(--c); }
.daily-games .muted { color: var(--dim); font-weight: 400; }
.daily-games li a { display: inline-flex; align-items: center; min-height: 36px; padding: 0 14px; border-radius: 999px; background: color-mix(in srgb,var(--c) 18%,transparent); border: 1px solid color-mix(in srgb,var(--c) 50%,transparent); color: var(--ink); text-decoration: none; font-weight: 700; font-size: .85rem; }
#daily-share:not([hidden]) { margin-top: 16px; }
#daily-share-status { margin: 8px 0 0; color: var(--green); }
#daily-share-status:empty { display: none; }
.streakbar { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; margin: 14px 0 6px; }
.streakbar div { display: grid; gap: 2px; padding: 14px 6px; text-align: center; border-radius: 16px; background: var(--bg); border: 1px solid var(--line); }
.streakbar b { font: 400 clamp(1.5rem,6vw,2rem)/1.1 var(--display); color: var(--gold); }
.streakbar small { font-size: .78rem; color: var(--dim); }
.stats-card .how { background: transparent; }
.stats-card .tiny { text-align: left; margin: 8px 0 0; }
.stats-card th { font-weight: 600; }
.stats-card tr > :not(:first-child) { text-align: right; }

.hub-footer { margin: 40px 0 24px; padding-top: 18px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 4px 24px; }
.hub-footer .foot { margin: 0; }
.hub-footer .legal-note { flex-basis: 100%; margin: 0; }

@media (min-width: 30em) {
  .games { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .gamecard { grid-template-columns: minmax(0,1fr); grid-template-areas: "ge" "copy" "bulbs" "status"; align-items: start; row-gap: 10px; }
  .gamecard p { min-height: 2.7em; }
}
@media (min-width: 48em) {
  .games { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .hub-split { grid-template-columns: minmax(0,1.2fr) minmax(0,1fr); align-items: start; }
  .daily-games { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (min-width: 64em) {
  .games { grid-template-columns: repeat(4,minmax(0,1fr)); }
}
@media (prefers-reduced-motion: no-preference) {
  .board-bulbs i.on { animation: bulb-on .5s ease-out backwards; }
  @keyframes bulb-on { from { transform: scale(.4); box-shadow: 0 0 30px var(--b); } }
}

/* legal pages and 404 reuse the hub body */
.hub .prose { width: min(100% - 32px, 640px); margin-inline: auto; padding-top: 16px; }
/* live daily score: a meter of points earned vs. the max of the games played so far */
.board-meter{--f:0;position:relative;max-width:420px;height:12px;margin:16px auto 0;border-radius:999px;background:#ffffff14;border:1px solid #ffffff22;overflow:hidden}
.board-meter i{position:absolute;inset:0 auto 0 0;width:calc(var(--f) * 100%);border-radius:inherit;background:linear-gradient(90deg,var(--gold),#ffe39a);box-shadow:0 0 14px #ffc94a99;transition:width 1s cubic-bezier(.3,.8,.3,1)}
.board-played{margin:8px 0 0;color:var(--ink);font-size:.9rem;font-weight:600}
.board-played:empty{display:none}
.board-score{flex-wrap:nowrap}
.board-score b{font-size:clamp(2.6rem,14vw,6.5rem)}
.board-score span{white-space:nowrap}
/* the status line stays for screen readers and tests; the meter line above says the same thing visually */
.daily-progress{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
