/* Writing Algorithms: lecture deck + game.
   The stage is a fixed 1920 x 1080 canvas scaled to fit the screen,
   so every size below is in stage pixels. */

:root {
  --blue: #2B37E6;
  --blue-deep: #1F29C2;
  --yellow: #FFD84D;
  --ink: #0C1033;
  --paper: #F2F3FF;
  --white: #FFFFFF;
  --line: #D9DCF2;
  --good: #1FCB7E;
  --bad: #FF5C6C;

  --display: 'Archivo', 'Arial Black', system-ui, sans-serif;
  --sans: 'Archivo', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, Menlo, Consolas, monospace;

  --ease: cubic-bezier(.2, .7, .2, 1);
}

/* Each slide sets a tone; the stage and page background follow it. */
[data-tone="blue"]   { --bg: var(--blue);   --fg: #fff;       --fg-2: rgba(255,255,255,.78); --fg-3: rgba(255,255,255,.5); --rule: rgba(255,255,255,.2); }
[data-tone="yellow"] { --bg: var(--yellow); --fg: var(--ink); --fg-2: rgba(12,16,51,.76);   --fg-3: rgba(12,16,51,.5);   --rule: rgba(12,16,51,.18); }
[data-tone="navy"]   { --bg: var(--ink);    --fg: #fff;       --fg-2: rgba(255,255,255,.74); --fg-3: rgba(255,255,255,.46); --rule: rgba(255,255,255,.16); }

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html, body { height: 100%; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  transition: background-color .5s var(--ease);
}
/* Keep "<=" as typed, the way students write it. !important because every
   `font:` shorthand below would otherwise switch ligatures back on. */
* { font-variant-ligatures: none !important; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }
[hidden] { display: none !important; }

:focus-visible { outline: 4px solid var(--fg); outline-offset: 4px; border-radius: 10px; }

.viewport { position: fixed; inset: 0; overflow: hidden; }
.stage {
  position: absolute;
  left: 50%; top: 50%;
  width: 1920px; height: 1080px;
  transform: translate(-50%, -50%) scale(var(--scale, 1));
  background: var(--bg);
  color: var(--fg);
  overflow: hidden;
  transition: background-color .5s var(--ease), color .5s var(--ease);
}

kbd {
  display: inline-grid; place-items: center;
  min-width: 1.9em; height: 1.7em; padding: 0 .4em; margin: 0 .3em 0 0;
  border: 2px solid var(--rule); border-radius: 8px;
  font: 700 .85em var(--mono);
}
kbd:not(:first-child) { margin-left: 1.2em; }

/* ---------- Slides ---------- */

.slides { position: absolute; inset: 0 0 96px 0; }
.slide {
  position: absolute; inset: 0;
  padding: 72px 96px 24px;
  opacity: 0; visibility: hidden;
  transform: translateX(40px);
  transition: opacity .45s var(--ease), transform .45s var(--ease), visibility 0s linear .45s;
}
.slide.is-before { transform: translateX(-40px); }
.slide.is-active {
  opacity: 1; visibility: visible; transform: none;
  transition: opacity .45s var(--ease), transform .45s var(--ease), visibility 0s;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  min-height: 64px; padding: 0 30px;
  border-radius: 16px;
  font: 700 26px/1 var(--sans);
  background: var(--fg); color: var(--bg);
  transition: transform .15s var(--ease), opacity .2s;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .35; cursor: default; transform: none; }
.btn--line { background: transparent; color: var(--fg); box-shadow: inset 0 0 0 3px var(--fg); }
.btn--go { background: var(--yellow); color: var(--ink); min-height: 84px; padding: 0 44px; font-size: 32px; border-radius: 20px; }

.icon-btn {
  width: 52px; height: 52px; border-radius: 14px;
  display: grid; place-items: center;
  color: var(--fg);
  transition: background-color .2s;
}
.icon-btn:hover { background: var(--rule); }
.icon-btn svg { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Footer bar ---------- */

.bar {
  position: absolute; left: 0; right: 0; bottom: 0; height: 96px;
  padding: 0 72px 0 96px;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 32px;
  color: var(--fg-2);
}
.bar__title { font: 600 22px var(--sans); }
.bar__tools { display: flex; align-items: center; justify-content: flex-end; gap: 6px; }
.bar__count { font: 600 22px var(--mono); margin-right: 18px; font-variant-numeric: tabular-nums; }

.progress { display: flex; gap: 8px; align-items: center; }
.progress button {
  width: 44px; height: 30px; display: grid; place-items: center; border-radius: 8px;
}
.progress button::before {
  content: ''; width: 100%; height: 8px; border-radius: 99px;
  background: var(--rule);
  transition: background-color .3s, height .3s;
}
.progress button.is-done::before { background: var(--fg-3); }
.progress button[aria-current="step"]::before { background: var(--fg); height: 12px; }
.progress button.is-gap { margin-left: 18px; }

/* ---------- Cover ---------- */

.cover {
  height: 100%;
  display: grid; grid-template-columns: 1fr 700px; align-items: center; gap: 40px;
}
.cover__kicker { font: 600 30px var(--sans); color: var(--fg-2); }
.cover__title {
  font: 900 156px/.9 var(--display);
  font-stretch: 112%;
  letter-spacing: -.025em;
  margin: 28px 0 44px;
  max-width: 10ch;
}
.cover__lead { font: 500 38px/1.35 var(--sans); color: var(--fg-2); max-width: 22em; }
.cover__author {
  margin-top: 48px;
  font: 900 52px var(--display);
  font-stretch: 112%;
  letter-spacing: -.01em;
  color: var(--yellow);
}
.cover__keys { margin-top: 48px; font: 600 24px var(--sans); color: var(--fg-3); }

.cover__hero { text-align: right; }
.hero__fact {
  font: 900 440px/.8 var(--display);
  font-stretch: 125%;
  letter-spacing: -.04em;
  color: var(--yellow);
}
.hero__expand {
  margin-top: 56px;
  font: 700 52px var(--mono);
  display: flex; justify-content: flex-end; gap: .45em;
}
.hero__expand span { transition: opacity .3s var(--ease), transform .3s var(--ease); }
.hero__expand span.is-off { opacity: .18; }
.hero__total { margin-top: 18px; font: 500 40px var(--mono); color: var(--fg-2); }
.hero__total b { color: var(--fg); font-weight: 800; display: inline-block; min-width: 3ch; text-align: left; }

/* ---------- Question slides ---------- */

.q {
  height: 100%;
  display: grid; grid-template-columns: 1fr 480px; gap: 120px; align-items: center;
}
.q__tag { font: 800 34px var(--sans); }
.q__tag span { color: var(--fg-3); font-weight: 600; }
.q__text {
  margin-top: 28px;
  font: 800 92px/1.02 var(--display);
  font-stretch: 104%;
  letter-spacing: -.02em;
  max-width: 15ch;
}
.q__formula {
  margin-top: 28px;
  font: 800 136px/1 var(--mono);
  letter-spacing: -.03em;
}
.q__check {
  margin-top: 56px;
  display: inline-block;
  padding: 22px 30px;
  border: 3px solid var(--fg);
  border-radius: 20px;
  font: 500 32px/1.35 var(--sans);
  max-width: 34em;
}
.q__check b { font: 800 1.1em var(--mono); }
.q__hint { margin-top: 28px; font: 500 28px/1.4 var(--sans); max-width: 34em; }
.q__hint summary {
  display: inline-flex; align-items: center; gap: 12px;
  cursor: pointer; list-style: none;
  font-weight: 700; color: var(--fg-2);
  border-bottom: 3px solid var(--rule);
  padding-bottom: 2px;
}
.q__hint summary::-webkit-details-marker { display: none; }
.q__hint summary::before { content: '+'; font: 800 32px var(--mono); }
.q__hint[open] summary::before { content: '−'; }
.q__hint p { margin-top: 14px; }

/* Thinking timer */
.timer { display: flex; flex-direction: column; align-items: center; gap: 28px; }
.timer__ring { position: relative; width: 400px; height: 400px; }
.timer__ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.timer__track, .timer__arc { fill: none; stroke-width: 18; }
.timer__track { stroke: var(--rule); }
.timer__arc { stroke: var(--fg); stroke-linecap: round; transition: stroke-dashoffset .3s linear, stroke .3s; }
.timer__face { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.timer__time { font: 800 104px/1 var(--mono); font-variant-numeric: tabular-nums; letter-spacing: -.04em; }
.timer__cap { margin-top: 8px; font: 600 24px var(--sans); color: var(--fg-2); }
.timer.is-low .timer__arc { stroke: #E5213A; }
.timer.is-done .timer__time { animation: blink .5s steps(2) 6; }
.timer__presets { display: flex; gap: 8px; padding: 6px; border-radius: 16px; box-shadow: inset 0 0 0 3px var(--rule); }
.timer__presets button { padding: 10px 20px; border-radius: 11px; font: 700 22px var(--sans); color: var(--fg-2); }
.timer__presets button[aria-pressed="true"] { background: var(--fg); color: var(--bg); }
.timer__ctrl { display: flex; gap: 12px; }
@keyframes blink { 50% { opacity: .15; } }

/* ---------- Solution slides ---------- */

.sol { height: 100%; display: grid; grid-template-rows: auto 1fr; gap: 28px; }
.sol__head { display: flex; align-items: baseline; gap: 36px; }
.sol__tag { font: 800 54px/1 var(--display); font-stretch: 106%; letter-spacing: -.02em; white-space: nowrap; }
.sol__q { font: 500 28px/1.35 var(--sans); color: var(--fg-2); }
.sol__grid { display: grid; grid-template-columns: 1020px 1fr; gap: 44px; min-height: 0; }

.code-col { display: flex; flex-direction: column; gap: 18px; min-height: 0; }
.code {
  position: relative;
  list-style: none;
  padding: 24px 32px 24px 104px;
  border-radius: 28px;
  background: var(--blue-deep);
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.1);
}
.line {
  position: relative;
  display: flex; gap: 26px; align-items: baseline;
  padding: 8px 20px;
  border-radius: 12px;
  font: 500 37px/1.3 var(--mono);
  transition: background-color .25s var(--ease);
}
.line__n { flex: none; width: 1.4em; text-align: right; color: rgba(255,255,255,.4); font-weight: 700; }
.line__code {
  color: #fff; white-space: pre;
  opacity: 0; transform: translateX(-14px);
  transition: opacity .35s var(--ease), transform .35s var(--ease);
}
.line.is-shown .line__code { opacity: 1; transform: none; }
.line .kw { color: var(--yellow); font-weight: 700; }
.line .num { color: #9FE8FF; }
.line.is-current { background: var(--yellow); }
.line.is-current .line__n,
.line.is-current .line__code,
.line.is-current .kw,
.line.is-current .num { color: var(--ink); }
.line.is-next .line__n { color: var(--yellow); }

.loop-arc { position: absolute; left: 22px; top: 0; width: 78px; height: 100%; overflow: visible; pointer-events: none; }
.loop-arc path { fill: none; stroke: var(--yellow); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }
.loop-arc .head { fill: var(--yellow); stroke: none; }
.loop-arc text { fill: var(--yellow); font: 700 20px var(--sans); }
.loop-arc g { opacity: 0; transition: opacity .4s var(--ease); }
.loop-arc g.is-shown { opacity: 1; }
.loop-arc g.is-jump { animation: jump .6s var(--ease); }
@keyframes jump { 40% { opacity: .2; } }

.sol__hint { font: 600 24px var(--sans); color: var(--fg-3); padding-left: 8px; }
.sol__note { font: 500 26px/1.4 var(--sans); color: var(--fg-2); padding-left: 8px; max-width: 46em; }

/* Trace panel */
.trace {
  display: flex; flex-direction: column; gap: 16px;
  min-height: 0;
  padding: 28px 30px;
  border-radius: 28px;
  background: var(--white); color: var(--ink);
  --fg: var(--ink); --bg: var(--white); --rule: var(--line);
}
.trace__head h3 { font: 800 40px/1 var(--display); font-stretch: 106%; }
.trace__head p { margin-top: 6px; font: 500 22px/1.35 var(--sans); color: #4A4F75; }
.trace__ctrl { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.trace__fixed { flex-basis: 100%; font: 500 22px/1.35 var(--sans); color: #4A4F75; }
.field {
  display: flex; align-items: center; gap: 12px;
  padding: 6px 6px 6px 18px;
  border-radius: 14px; background: var(--paper);
  font: 700 28px var(--mono);
}
.field input {
  width: 110px; height: 52px; padding: 0 12px;
  border: 2px solid var(--line); border-radius: 10px;
  background: var(--white);
  font: 700 28px var(--mono);
}
.field input:focus-visible { outline: 3px solid var(--blue); outline-offset: 1px; border-radius: 10px; }
.trace__btns { display: flex; gap: 10px; }
.trace__btns .btn { min-height: 58px; padding: 0 24px; font-size: 24px; }
.trace__btns .btn--step { background: var(--blue); color: #fff; }
.trace__err { min-height: 0; font: 600 21px/1.3 var(--sans); color: #D62839; }
.trace__err:empty { display: none; }

.vars { display: flex; flex-wrap: wrap; gap: 10px; }
.var {
  display: flex; align-items: baseline; gap: 12px;
  padding: 8px 16px; border-radius: 12px;
  background: var(--paper);
  font: 500 24px var(--mono);
  transition: background-color .3s;
}
.var b { font-weight: 800; font-size: 28px; min-width: 1ch; }
.var.is-changed { background: var(--yellow); }

.ttable { flex: 1; min-height: 0; overflow: auto; border-radius: 16px; box-shadow: inset 0 0 0 2px var(--line); }
.ttable table { width: 100%; border-collapse: collapse; font: 500 25px var(--mono); }
.ttable th {
  position: sticky; top: 0;
  padding: 12px 16px; text-align: left;
  background: var(--paper);
  font: 700 21px var(--mono); color: #4A4F75;
}
.ttable td { padding: 6px 16px; border-top: 2px solid var(--paper); font-variant-numeric: tabular-nums; }
.ttable tr.is-new td { background: #FFF4C2; }
.ttable .no { color: #D62839; font-weight: 700; }
.ttable .yes { color: #0C8A55; font-weight: 700; }
.ttable__empty td { color: #8A8FB3; font-family: var(--sans); font-size: 22px; padding: 18px 16px; }

.out {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px 24px; border-radius: 16px;
  background: var(--ink); color: #fff;
}
.out span { font: 600 22px var(--sans); color: rgba(255,255,255,.7); }
.out output { font: 800 44px var(--mono); color: var(--yellow); min-height: 1.2em; }
.out.is-printed { animation: pop .5s var(--ease); }
@keyframes pop { 40% { transform: scale(1.04); } }

/* ---------- Game slide (setup) ---------- */

.gs { height: 100%; display: grid; grid-template-columns: 1fr 760px; gap: 96px; align-items: center; }
.gs__kicker { font: 600 30px var(--sans); color: var(--fg-2); }
.gs__title {
  margin: 20px 0 48px;
  font: 900 132px/.92 var(--display); font-stretch: 112%;
  letter-spacing: -.025em;
  color: var(--yellow);
}
.gs__rules { list-style: none; padding: 0; display: grid; gap: 18px; font: 500 32px/1.35 var(--sans); color: var(--fg-2); }
.gs__rules li { display: flex; gap: 18px; }
.gs__rules li::before { content: '!'; flex: none; width: 34px; font: 900 34px/1.3 var(--display); color: var(--yellow); }

.setup {
  padding: 44px;
  border-radius: 32px;
  background: rgba(255,255,255,.06);
  box-shadow: inset 0 0 0 2px var(--rule);
}
.setup__label { font: 700 28px var(--sans); }
.seg { display: inline-flex; gap: 8px; margin: 16px 0 32px; padding: 6px; border-radius: 18px; box-shadow: inset 0 0 0 3px var(--rule); }
.seg button { width: 84px; height: 60px; border-radius: 13px; font: 800 30px var(--mono); color: var(--fg-2); }
.seg button[aria-checked="true"] { background: var(--fg); color: var(--ink); }
.setup__teams { display: grid; gap: 14px; }
.team-row { display: flex; align-items: center; gap: 16px; }
.team-row input {
  flex: 1; height: 68px; padding: 0 22px;
  border-radius: 16px; border: 0;
  background: rgba(255,255,255,.08);
  box-shadow: inset 0 0 0 2px var(--rule);
  font: 700 30px var(--sans);
}
.team-row input:focus-visible { outline: none; box-shadow: inset 0 0 0 3px var(--team); }
.badge {
  flex: none; display: grid; place-items: center;
  width: 56px; height: 56px; border-radius: 16px;
  background: var(--team); color: var(--ink);
  font: 900 30px var(--display);
}
.setup__actions { display: flex; gap: 16px; margin-top: 36px; }

/* ---------- Game overlay ---------- */

.game {
  position: absolute; inset: 0; z-index: 20;
  --bg: var(--ink); --fg: #fff; --fg-2: rgba(255,255,255,.74); --fg-3: rgba(255,255,255,.46); --rule: rgba(255,255,255,.16);
  background: var(--ink); color: #fff;
  display: flex; flex-direction: column;
  padding: 44px 80px 40px;
}
.g-top { display: flex; align-items: center; gap: 32px; }
.g-name { font: 900 40px/1 var(--display); font-stretch: 112%; color: var(--yellow); }
.g-count { margin-top: 8px; font: 600 24px var(--sans); color: var(--fg-2); }
.g-teams { list-style: none; padding: 0; margin-left: auto; display: flex; gap: 14px; }
.g-team {
  display: flex; align-items: center; gap: 14px;
  padding: 10px 22px 10px 10px; border-radius: 20px;
  background: rgba(255,255,255,.06);
  box-shadow: inset 0 0 0 2px var(--rule);
  transition: box-shadow .3s, transform .3s var(--ease), background-color .3s;
}
.g-team .badge { width: 48px; height: 48px; font-size: 26px; border-radius: 13px; }
.g-team__name { font: 700 22px var(--sans); color: var(--fg-2); }
.g-team__score { font: 800 34px/1 var(--mono); font-variant-numeric: tabular-nums; }
.g-team.is-turn { background: rgba(255,255,255,.12); box-shadow: inset 0 0 0 3px var(--team); transform: translateY(-3px); }
.g-team.is-turn .g-team__name { color: #fff; }
.g-tools { display: flex; gap: 6px; }

.g-play { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.g-right { display: flex; flex-direction: column; justify-content: center; min-height: 0; }
.g-right--order { justify-content: flex-start; }
.g-timer { position: relative; height: 14px; margin: 52px 0 36px; border-radius: 99px; background: rgba(255,255,255,.1); }
.g-timer__fill { position: absolute; inset: 0 auto 0 0; width: 100%; border-radius: inherit; background: var(--team, var(--yellow)); }
.g-timer.is-low .g-timer__fill { background: var(--bad); }
.g-timer__num {
  position: absolute; right: 0; bottom: 22px;
  font: 800 30px var(--mono); font-variant-numeric: tabular-nums;
}
.g-timer.is-low .g-timer__num { color: var(--bad); }

.g-body { flex: 1; min-height: 0; display: grid; grid-template-columns: 1fr 780px; gap: 72px; }
.g-left { display: flex; flex-direction: column; min-height: 0; }
.g-turn { display: flex; align-items: center; gap: 14px; font: 800 30px var(--sans); color: var(--team); }
.g-turn .badge { width: 44px; height: 44px; font-size: 24px; border-radius: 12px; }
.g-kind { margin-top: 22px; font: 600 24px var(--sans); color: var(--fg-3); }
.g-q { margin-top: 10px; font: 800 60px/1.08 var(--display); font-stretch: 102%; letter-spacing: -.015em; max-width: 19ch; }
.g-visual { margin-top: 28px; min-height: 0; }
.g-code {
  display: inline-block;
  padding: 18px 26px; border-radius: 20px;
  background: rgba(255,255,255,.06);
  box-shadow: inset 0 0 0 2px var(--rule);
  font: 500 26px/1.55 var(--mono);
  white-space: pre;
}
.g-code .n { color: var(--fg-3); }

.g-options { display: flex; flex-direction: column; justify-content: center; gap: 16px; }
.g-opt {
  display: flex; align-items: center; gap: 24px;
  min-height: 108px; padding: 18px 28px;
  border-radius: 22px;
  background: rgba(255,255,255,.06);
  box-shadow: inset 0 0 0 2px var(--rule);
  text-align: left;
  font: 700 32px/1.25 var(--sans);
  transition: box-shadow .2s, background-color .2s, transform .15s var(--ease), opacity .3s;
}
.g-opt:not(:disabled):hover { box-shadow: inset 0 0 0 3px rgba(255,255,255,.5); transform: translateX(4px); }
.g-opt:disabled { cursor: default; }
.g-key {
  flex: none; display: grid; place-items: center;
  width: 58px; height: 58px; border-radius: 14px;
  background: rgba(255,255,255,.1);
  font: 800 28px var(--mono);
}
.g-opt.is-right { background: rgba(31,203,126,.16); box-shadow: inset 0 0 0 3px var(--good); }
.g-opt.is-right .g-key { background: var(--good); color: var(--ink); }
.g-opt.is-wrong { background: rgba(255,92,108,.12); box-shadow: inset 0 0 0 3px var(--bad); opacity: .7; }
.g-opt.is-wrong .g-key { background: var(--bad); color: var(--ink); }
.g-opt.is-wrong .g-opt__text { text-decoration: line-through; text-decoration-thickness: 3px; }
.g-options--tf { flex-direction: row; align-items: stretch; }
.g-options--tf .g-opt { flex: 1; flex-direction: column; justify-content: center; min-height: 300px; font-size: 52px; gap: 20px; }

/* Order questions */
.g-pool { display: flex; flex-wrap: wrap; gap: 12px; align-content: flex-start; }
.g-tile {
  padding: 14px 20px; border-radius: 14px;
  background: rgba(255,255,255,.1);
  box-shadow: inset 0 0 0 2px var(--rule);
  font: 600 25px var(--mono);
  transition: transform .15s var(--ease), background-color .2s;
}
.g-tile:hover { background: rgba(255,255,255,.18); transform: translateY(-2px); }
.g-slots { list-style: none; padding: 0; display: grid; gap: 10px; align-content: center; }
.g-slot { display: flex; align-items: center; gap: 16px; }
.g-slot__n { flex: none; width: 44px; text-align: right; font: 800 26px var(--mono); color: var(--fg-3); }
.g-slot__box {
  flex: 1; min-height: 62px; padding: 10px 20px;
  display: flex; align-items: center;
  border-radius: 14px;
  box-shadow: inset 0 0 0 2px var(--rule);
  background: rgba(255,255,255,.03);
  font: 600 25px var(--mono); text-align: left;
}
.g-slot__box:empty::after { content: 'Tap a step'; font: 500 22px var(--sans); color: var(--fg-3); }
.g-slot__box.is-filled { background: rgba(255,255,255,.1); }
.g-slot__box.is-right { box-shadow: inset 0 0 0 3px var(--good); background: rgba(31,203,126,.14); }
.g-slot__box.is-wrong { box-shadow: inset 0 0 0 3px var(--bad); background: rgba(255,92,108,.12); }
.g-check { margin-top: 18px; align-self: flex-start; }

.g-feedback {
  display: flex; align-items: center; gap: 28px;
  min-height: 108px; margin-top: 28px; padding: 18px 20px 18px 32px;
  border-radius: 24px;
  background: rgba(255,255,255,.06);
}
.g-msg { flex: 1; font: 600 30px/1.35 var(--sans); }
.g-msg b { font-weight: 800; }
.g-feedback.is-good { background: rgba(31,203,126,.16); }
.g-feedback.is-bad { background: rgba(255,92,108,.14); }
.g-feedback .btn { background: var(--yellow); color: var(--ink); }

/* End screen */
.g-end { flex: 1; display: grid; grid-template-rows: auto 1fr auto; justify-items: center; gap: 24px; padding-top: 12px; }
.g-end__title { font: 900 120px/1 var(--display); font-stretch: 112%; letter-spacing: -.025em; color: var(--yellow); text-align: center; }
.g-end__sub { font: 600 30px var(--sans); color: var(--fg-2); margin-top: 12px; text-align: center; }
.podium { display: flex; align-items: flex-end; gap: 36px; height: 100%; padding-top: 20px; }
.podium__col { width: 230px; display: flex; flex-direction: column; align-items: center; gap: 14px; height: 100%; justify-content: flex-end; }
.podium__name { font: 800 30px var(--sans); text-align: center; }
.podium__score { font: 800 40px var(--mono); }
.podium__bar {
  width: 100%; border-radius: 22px 22px 0 0;
  background: var(--team);
  display: grid; place-items: start center; padding-top: 18px;
  font: 900 64px var(--display); color: var(--ink);
  height: 0; transition: height 1.1s var(--ease);
}
.g-end__actions { display: flex; gap: 16px; }
.g-end__actions .btn--go { min-height: 72px; font-size: 28px; }

.g-confetti { position: absolute; inset: 0; width: 1920px; height: 1080px; pointer-events: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
  .slide, .slide.is-before { transform: none; }
}
