:root {
  --ice: #F4F7FA;
  --ice-2: #E6ECF2;
  --ink: #0E1A2B;
  --muted: #56657A;
  --leaf: #00205B;
  --crease: #A7D3F2;
  --lamp: #E4002B;
  --lamp-soft: #FDE3E6;
  --good: #1F7A4D;
  --rule: #CBD5E0;
  --display: "Big Shoulders Display", "Arial Narrow", sans-serif;
  --body: "Archivo", system-ui, sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ice);
  color: var(--ink);
  font: 400 17px/1.55 var(--body);
  font-variant-numeric: tabular-nums;
}
main, .foot { max-width: 760px; margin: 0 auto; padding: 0 20px; }
h1, h2, p, ul, ol { margin: 0; }
a { color: var(--leaf); }
:focus-visible { outline: 3px solid var(--lamp); outline-offset: 3px; }

.skip { position: absolute; left: -999px; }
.skip:focus { left: 12px; top: 12px; background: #fff; padding: 8px 12px; z-index: 10; }

/* Status bar */
.topbar {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 20px;
  background: var(--leaf); color: #fff;
  font-size: 14px; font-weight: 500;
  justify-content: center; text-align: center;
}
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--crease); flex: none; }
.topbar.is-live { background: var(--lamp); }
.topbar.is-live .dot, .live-flag .dot { background: #fff; animation: blink 1.2s steps(2, start) infinite; }

/* Hero */
.hero { padding: 40px 0 36px; border-bottom: 2px solid var(--leaf); }
.site { font: 700 18px/1 var(--display); letter-spacing: .02em; color: var(--muted); margin-bottom: 28px; }
.site b { color: var(--lamp); font-weight: 900; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 12px; }
.question { font: 800 clamp(28px, 6vw, 44px)/1 var(--display); color: var(--leaf); }
.verdict {
  font: 900 clamp(120px, 34vw, 260px)/.82 var(--display);
  color: var(--leaf);
  letter-spacing: -.02em;
  margin-top: 6px;
}
.lamp { overflow: visible; width: clamp(96px, 22vw, 168px); height: auto; margin-bottom: 8px; }
.lamp-glow { opacity: 0; transition: opacity .25s; }
.lamp.on .lamp-glow { opacity: 1; }
.lamp:not(.on) .lamp-dome { fill: #8C98A8; }
.lamp.flash .lamp-glow { animation: flash .35s ease-in-out 3; }
.lede { font-size: clamp(18px, 2.6vw, 21px); max-width: 62ch; margin-top: 22px; text-wrap: pretty; }
.lede, .block-sub, .comp-joke, .tile-note, .log .note { text-wrap: pretty; }
.nw { white-space: nowrap; }
.lede strong { color: var(--lamp); font-weight: 700; }

/* Live */
.live { background: var(--ink); color: #fff; padding: 24px 22px; margin: 28px 0 0; border-radius: 6px; }
.live-flag { display: flex; align-items: center; gap: 8px; font-weight: 600; color: #FF8C97; font-size: 14px; }
.live-score { font: 800 clamp(36px, 8vw, 56px)/1 var(--display); margin-top: 10px; }
.live-clock { color: #B9C4D2; font-size: 15px; margin-top: 4px; }
.live-line { margin-top: 18px; border-top: 1px solid #2A3A52; padding-top: 14px; }
.live-big { font: 900 clamp(44px, 11vw, 76px)/1 var(--display); }
.live-sub { color: #B9C4D2; }

/* Report card */
.card { padding: 36px 0; border-bottom: 1px solid var(--rule); }
.card-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; }
.card h2 { font: 800 clamp(28px, 5vw, 38px)/1.05 var(--display); color: var(--leaf); }
.card-comment { color: var(--muted); margin-top: 6px; }
.card-overall span {
  display: grid; place-items: center; width: 84px; height: 84px; border: 4px solid var(--lamp); border-radius: 50%;
  font: 900 56px/1 var(--display); color: var(--lamp); transform: rotate(-8deg);
}
.card-wrap { overflow-x: auto; margin-top: 18px; }
.card-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.card-table th, .card-table td { padding: 12px 10px 12px 0; border-top: 1px solid var(--rule); text-align: left; vertical-align: baseline; }
.card-table thead th { border-top: 0; font-size: 13px; font-weight: 600; color: var(--muted); padding-bottom: 6px; }
.card-table tbody th { font-weight: 600; }
.card-table small { display: block; font-weight: 400; font-size: 13px; color: var(--muted); margin-top: 2px; }
.card-table .num { white-space: nowrap; }
.card-table .bob { font: 800 22px/1 var(--display); color: var(--ink); }
.card-table .grade { font: 900 30px/1 var(--display); text-align: right; padding-right: 0; width: 1%; }
.g-A, .g-B { color: var(--good); }
.g-C { color: var(--muted); }
.g-D, .g-F { color: var(--lamp); }
.card-shot { margin-top: 14px; font: 800 clamp(20px, 3.4vw, 26px)/1.15 var(--display); color: var(--lamp); text-wrap: balance; }
.card-table tr.aux .grade { opacity: .5; }
.card-table .grade sup { font: 700 14px/1 var(--body); margin-left: 2px; vertical-align: super; }
.card-foot { color: var(--muted); font-size: 13px; margin-top: 10px; }
@media (max-width: 620px) {
  .card-table thead th:nth-child(3), .card-table tbody td:nth-child(3) { display: none; }
  .card-table th, .card-table td { padding-right: 8px; }
}

/* Comp vs table */
.vs { display: grid; gap: 2px; margin-top: 10px; max-width: 420px; font-size: 14px; }
.vs-row { display: grid; grid-template-columns: 120px 1fr 1fr; gap: 8px; padding: 4px 0; }
.vs-row:first-child { color: var(--muted); font-size: 12px; }
.vs-row span:not(:first-child) { font-variant-numeric: tabular-nums; font-weight: 600; }
.vs-row.is-bob { color: var(--lamp); border-top: 1px solid var(--rule); }

.btn.btn-ghost { background: transparent; color: var(--leaf); box-shadow: inset 0 0 0 2px var(--leaf); }
.btn.btn-ghost:hover { background: var(--ice-2); }

/* Comp */
.comp { padding: 40px 0; border-bottom: 1px solid var(--rule); }
.comp h2 { font: 800 clamp(28px, 5vw, 38px)/1.05 var(--display); color: var(--leaf); }
.comp-list { list-style: none; padding: 0; margin-top: 8px; }
.comp-item { padding: 22px 0; border-top: 1px solid var(--rule); }
.comp-item:first-child { border-top: 0; }
.comp-lens { font-size: 14px; font-weight: 600; color: var(--lamp); }
.comp-name { font: 900 clamp(34px, 7.5vw, 60px)/.98 var(--display); color: var(--ink); margin-top: 4px; }
.comp-name span { color: var(--leaf); }
.comp-detail { margin-top: 8px; color: var(--muted); font-size: 15px; }
.comp-joke { margin-top: 6px; font-weight: 600; max-width: 60ch; }
.comp-spin { font-size: 18px; padding: 10px 18px; margin: 4px 0 18px; display: inline-flex; align-items: center; gap: 8px; }
.comp-spin:disabled { opacity: .75; cursor: progress; }
.comp-spin .dot { width: 12px; height: 12px; border-radius: 50%; background: #8C98A8; }
.comp-spin .dot.on { background: var(--lamp); box-shadow: 0 0 10px var(--lamp); animation: dotflash .5s ease-out; }
@keyframes dotflash { 0% { transform: scale(1.5); } 100% { transform: scale(1); } }
.reel-win { overflow: hidden; position: relative; margin-top: 4px; }
.reel-strip { will-change: transform; }
.reel-cell { display: flex; align-items: flex-end; gap: .25em; margin: 0 !important; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.comp-name.landed span { color: var(--lamp); transition: color .25s; }
.comp-item :is(.comp-detail, .vs, .comp-joke) { transition: opacity .22s ease-out, transform .22s ease-out; }
.comp-item.is-spinning :is(.comp-detail, .vs, .comp-joke) { opacity: 0; transform: translateY(4px); transition-duration: .15s; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.comp-bob { color: var(--muted); font-size: 12px; border-top: 1px solid var(--rule); padding-top: 14px; }

/* Tiles */
.tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0; border-bottom: 1px solid var(--rule); }
.tile { padding: 28px 18px 30px 0; }
.tile + .tile { padding-left: 18px; border-left: 1px solid var(--rule); }
.tile-num { font: 900 clamp(44px, 9vw, 72px)/1 var(--display); color: var(--leaf); }
.tile-red .tile-num { color: var(--lamp); }
.tile-label { font-weight: 600; margin-top: 6px; line-height: 1.3; }
.tile-note { color: var(--muted); font-size: 14px; margin-top: 8px; line-height: 1.4; }

/* Blocks */
.block { padding: 40px 0; border-bottom: 1px solid var(--rule); }
.block h2 { font: 800 clamp(28px, 5vw, 38px)/1.05 var(--display); color: var(--leaf); }
.block-sub { color: var(--muted); margin-top: 8px; max-width: 62ch; }

/* League strip */
.strip { margin-top: 24px; }
.strip svg { width: 100%; height: auto; display: block; overflow: visible; }
.strip text { font: 500 12px var(--body); fill: var(--muted); }
.strip .bob-label { font: 800 15px var(--display); fill: var(--lamp); letter-spacing: .02em; }
.strip .ref-label { font: 600 12px var(--body); fill: var(--ink); }

/* Game log */
.log { list-style: none; padding: 0; margin-top: 22px; }
.log li { display: grid; grid-template-columns: 74px 1fr auto; gap: 4px 14px; padding: 14px 0; border-top: 1px solid var(--rule); align-items: baseline; position: relative; }
.log .date { font-size: 14px; color: var(--muted); }
.log .opp { font-weight: 700; }
.log .res { font-weight: 500; color: var(--muted); }
.log .res.L { color: var(--ink); }
.log .line { text-align: right; font-weight: 600; white-space: nowrap; }
.log .line.bad { color: var(--lamp); }
.log .bar { grid-column: 2 / 4; height: 6px; background: var(--ice-2); border-radius: 3px; position: relative; margin-top: 4px; }
.log .bar i { position: absolute; top: 0; bottom: 0; left: 0; border-radius: 3px; background: var(--leaf); }
.log .bad + .bar i, .log .bar.bad i { background: var(--lamp); }
.log .bar b { position: absolute; top: -4px; bottom: -4px; width: 2px; background: var(--ink); }
.log .note { grid-column: 2 / 4; font-size: 14px; color: var(--muted); margin-top: 4px; }
.stamp {
  display: inline-block; margin-left: 8px;
  font: 800 13px/1 var(--display); letter-spacing: .04em;
  color: var(--lamp); border: 2px solid var(--lamp); border-radius: 3px;
  padding: 3px 6px 2px; transform: rotate(-3deg);
}

/* Career chart */
.career-head { display: grid; grid-template-columns: 180px 1fr; gap: 22px; align-items: end; }
.photo { margin: 0; }
.photo img { width: 100%; height: auto; display: block; border-radius: 4px; filter: grayscale(1) contrast(1.05); }
.photo figcaption { font-size: 12px; color: var(--muted); margin-top: 6px; line-height: 1.35; }
@media (max-width: 620px) { .career-head { grid-template-columns: 120px 1fr; gap: 14px; } }
.career { margin-top: 24px; }
.career svg { width: 100%; height: auto; display: block; overflow: visible; }
.career text { font: 500 11px var(--body); fill: var(--muted); }
.career .tag { font: 700 11px var(--body); fill: var(--leaf); }

/* Quotes */
.receipts ul { list-style: none; padding: 0; margin-top: 18px; display: grid; gap: 18px; }
.receipts li { border-left: 4px solid var(--leaf); padding: 2px 0 2px 16px; }
.receipts q { font: 800 clamp(22px, 4vw, 30px)/1.15 var(--display); color: var(--ink); quotes: "\201C" "\201D"; }
.receipts cite { display: block; font-style: normal; color: var(--muted); font-size: 14px; margin-top: 6px; }

/* Share + footer */
.share { padding: 40px 0; text-align: center; }
.btn {
  font: 800 22px/1 var(--display); letter-spacing: .02em;
  background: var(--leaf); color: #fff; border: 0; border-radius: 4px;
  padding: 16px 26px; cursor: pointer;
}
.btn:hover { background: #0A2F78; }
.share-msg { color: var(--muted); font-size: 14px; margin-top: 10px; min-height: 1.4em; }
.foot { padding-top: 10px; padding-bottom: 48px; color: var(--muted); font-size: 14px; }
.foot details { border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); padding: 14px 0; margin-bottom: 18px; }
.foot summary { cursor: pointer; font-weight: 600; color: var(--ink); }
.foot ul { padding-left: 18px; margin-top: 10px; display: grid; gap: 6px; }

@keyframes blink { to { visibility: hidden; } }
@keyframes flash { 50% { opacity: .15; } }

@media (max-width: 620px) {
  body { font-size: 16px; }
  .tiles { grid-template-columns: 1fr; }
  .tile, .tile + .tile { padding: 22px 0; border-left: 0; }
  .tile + .tile { border-top: 1px solid var(--rule); }
  .log li { grid-template-columns: 58px 1fr auto; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
