:root {
  --bg: #ffffff;
  --ink: #18191c;
  --soft: rgba(24, 25, 28, 0.58);
  --line: rgba(24, 25, 28, 0.1);
  --here: #1f9d6b;
  --late: #d98a0b;
  --away: #d8452f;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: "Mona Sans Variable", "Mona Sans", system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

.stage {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  place-items: center;
  padding: 8px 12px;
}
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; outline: none; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
ul { list-style: none; }
.live { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.ra { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; width: min(352px, 100%); padding: 16px 14px 10px; border-radius: 26px; background: #ffffff; box-shadow: inset 0 0 0 1.500px var(--line), 0 30px 44px -30px rgba(24, 25, 28, 0.4); }
.ra__head { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 0 4px; }
.ra__what { display: grid; gap: 1px; min-width: 0; }
.ra__what strong { font-size: 16px; line-height: 20px; font-weight: 740; letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ra__what span { font-size: 12px; line-height: 16px; font-weight: 600; color: var(--soft); white-space: nowrap; }
.ra__all { flex: none; height: 30px; padding: 0 12px; border-radius: 15px; background: var(--ink); color: #ffffff; font-size: 12px; font-weight: 700; white-space: nowrap; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 8px 12px -8px rgba(24, 25, 28, 0.7); }
.ra__all:focus-visible { box-shadow: 0 0 0 2px #ffffff, 0 0 0 4px var(--ink); }

/* the summary: one bar split by share, and the counts in words below it */
.ra__sum { display: grid; gap: 7px; padding: 0 4px; }
.ra__bar { display: flex; gap: 2px; height: 10px; border-radius: 5px; overflow: hidden; }
.ra__b { display: block; flex: 0 1 0%; min-width: 0; height: 10px; border-radius: 2px; }
.ra__b--here { background: var(--here); }
.ra__b--late { background: var(--late); }
.ra__b--away { background: var(--away); }
.ra__b--none { flex-grow: 5; background: repeating-linear-gradient(135deg, rgba(24, 25, 28, 0.16) 0 3px, rgba(24, 25, 28, 0.07) 3px 6px); }
.ra__counts { display: flex; gap: 12px; font-size: 12px; line-height: 16px; font-weight: 620; color: var(--soft); white-space: nowrap; }
.ra__c { display: flex; gap: 4px; }
.ra__clip { display: block; height: 16px; line-height: 16px; overflow: hidden; font-weight: 780; }
.ra__clip span { display: block; }
.ra__c--here b { color: var(--here); }
.ra__c--late b { color: var(--late); }
.ra__c--away b { color: var(--away); }
.ra__c--none { margin-left: auto; }
.ra__c--none b { color: var(--ink); }

.ra__list { display: grid; border-top: 1.500px solid var(--line); }
.ra__pupil { display: flex; justify-content: space-between; align-items: center; gap: 8px; height: 40px; padding: 0 2px 0 4px; border-bottom: 1.500px solid var(--line); }
.ra__pupil:last-child { border-bottom: 0; }
.ra__pupil strong { min-width: 0; font-size: 13.500px; font-weight: 680; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ra__seg { position: relative; flex: none; display: grid; grid-template-columns: repeat(3, 52px); height: 28px; padding: 2px; border-radius: 14px; background: rgba(24, 25, 28, 0.055); --tint: var(--here); }
.ra__seg[data-state="late"] { --tint: var(--late); }
.ra__seg[data-state="away"] { --tint: var(--away); }
.ra__seg i { position: absolute; left: 2px; top: 2px; width: 52px; height: 24px; border-radius: 12px; background: var(--tint); box-shadow: 0 4px 8px -5px var(--tint); opacity: 0; pointer-events: none; transition: background-color 0.3s ease; }
.ra__seg button { position: relative; display: grid; place-items: center; height: 24px; border-radius: 12px; font-size: 11.500px; font-weight: 660; color: var(--soft); transition: color 0.25s ease; }
.ra__seg button[aria-checked="true"] { color: #ffffff; font-weight: 740; }
.ra__seg button:focus-visible { box-shadow: 0 0 0 2px var(--ink); }
@media (hover: hover) { .ra__seg button[aria-checked="false"]:hover { color: var(--ink); } }

.ghost { position: absolute; left: 0; top: 0; width: 24px; height: 24px; margin: -3px 0 0 -5px; transform-origin: 20% 15%; pointer-events: none; opacity: 0; fill: #17171a; stroke: #ffffff; stroke-width: 1.300; stroke-linejoin: round; filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3)); z-index: 6; }

@media (max-width: 350px) { .ra { padding: 14px 10px 8px; } .ra__seg { grid-template-columns: repeat(3, 48px); } .ra__seg i { width: 48px; } .ra__counts { gap: 9px; } }
@media (max-height: 400px) { .ra { gap: 10px; } .ra__pupil { height: 38px; } }
@media (prefers-reduced-motion: reduce) { .ra__seg i, .ra__seg button { transition: none; } }
