/* Reaction Test. Sister site of Random Wheel: same light, same glass, same type.
   Layout idea: the pad is the poster. Its colour is the signal. The run and the record sit in a quiet glass rail beside it. */
:root {
  --paper: #080A1C;
  --panel: #15173A;
  --ink: #F3F1FF;
  --ink-soft: #B3B0D0;
  --line: #2D2F5C;
  --signal-ink: #1A1033;
  --focus: #B5A8FF;
  --glass: rgba(255, 255, 255, 0.055);
  --glass-line: rgba(255, 255, 255, 0.13);
  --field: rgba(6, 8, 24, 0.55);
  --lift: 0 18px 50px -22px rgba(0, 0, 0, 0.8);
  --aurora: 0.55;
  --violet: #7B5CFF;
  --rose: #FF5C8A;
  --amber: #FFB627;
  --aqua: #2ED3C6;
  --go: #2EE6A6;
  --stop: #FF4D5E;
  --font-display: "Bricolage Grotesque", "Trebuchet MS", "Segoe UI", sans-serif;
  --font-body: "Manrope", "Segoe UI", Verdana, sans-serif;
  --radius: 20px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
html, body { overflow-x: clip; }
body {
  margin: 0; min-height: 100vh;
  background: var(--paper); color: var(--ink);
  font-family: var(--font-body); font-size: 17px; font-weight: 500; line-height: 1.5;
}
button, input, textarea, select { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* The light behind everything */
body::before, body::after {
  content: ""; position: fixed; z-index: -1; pointer-events: none;
  width: 90vmax; height: 90vmax; border-radius: 50%; opacity: var(--aurora);
}
body::before {
  left: -30vmax; top: -38vmax;
  background: radial-gradient(closest-side, var(--violet), transparent 70%);
  animation: drift-a 26s ease-in-out infinite alternate;
}
body::after {
  right: -34vmax; bottom: -44vmax;
  background: radial-gradient(closest-side, var(--rose), transparent 68%), radial-gradient(closest-side at 30% 30%, var(--amber), transparent 60%);
  animation: drift-b 32s ease-in-out infinite alternate;
}
@keyframes drift-a { to { transform: translate(14vmax, 10vmax) scale(1.15); } }
@keyframes drift-b { to { transform: translate(-12vmax, -9vmax) scale(1.1); } }

.shell { max-width: 1220px; margin: 0 auto; padding: 0 24px 64px; }

/* Header */
.top { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 22px; padding: 22px 0 14px; }
.brand {
  font-family: var(--font-display); font-weight: 800; font-size: 23px; line-height: 1; letter-spacing: -0.02em;
  margin: 0; display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none;
}
.brand svg { flex: none; filter: drop-shadow(0 0 8px rgba(255, 92, 138, 0.55)); }
.modes { display: flex; flex-wrap: wrap; gap: 4px; padding: 4px; border-radius: 999px; background: var(--glass); border: 1px solid var(--glass-line); }
.modes a {
  text-decoration: none; color: var(--ink); padding: 7px 13px; border-radius: 999px; font-weight: 700;
  transition: background 160ms ease, color 160ms ease;
}
.modes a:hover { background: var(--glass-line); }
.modes a[aria-current="page"] { background: linear-gradient(120deg, var(--violet), var(--rose)); color: #FFFFFF; }
.top-tools { margin-inline-start: auto; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }

.btn {
  border: 1px solid var(--glass-line); background: var(--glass); color: var(--ink);
  border-radius: 12px; padding: 8px 14px; font-weight: 700; cursor: pointer; line-height: 1.2;
  display: inline-flex; align-items: center; gap: 7px; text-decoration: none;
  transition: transform 140ms ease, border-color 140ms ease, background 140ms ease;
}
.btn:hover { border-color: var(--violet); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }
.btn.quiet { font-weight: 500; }
.btn[aria-pressed="true"] { background: color-mix(in srgb, var(--violet) 26%, transparent); border-color: var(--violet); }
.btn svg { flex: none; }
#markBtn svg { color: var(--amber); }
#siteShareBtn svg { color: var(--rose); }

/* Page title */
.head { padding: 6px 0 20px; display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 14px 28px; }
.head > div:first-child { max-width: 760px; min-width: 0; flex: 1 1 420px; }
.spread { display: flex; gap: 8px; flex: none; }
.head h1 {
  font-family: var(--font-display); font-weight: 800; letter-spacing: -0.03em;
  font-size: clamp(32px, 5.2vw, 56px); line-height: 1.02; margin: 0; text-wrap: balance;
}
.head p { margin: 10px 0 0; color: var(--ink-soft); font-size: 18px; max-width: 58ch; }


/* Main grid: the pad takes the room, the run and the record sit in a quiet glass rail beside it */
.work { display: grid; gap: 26px; grid-template-columns: minmax(0, 1fr) 320px; align-items: start; }
.stage { display: flex; flex-direction: column; gap: 14px; min-width: 0; animation: arrive 700ms cubic-bezier(.2, .9, .2, 1) both; }

/* A friend's score to beat */
.beat {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 10px 12px 10px 16px; border-radius: 16px;
  background: linear-gradient(120deg, color-mix(in srgb, var(--amber) 26%, transparent), color-mix(in srgb, var(--rose) 22%, transparent));
  border: 1px solid color-mix(in srgb, var(--amber) 60%, transparent); font-weight: 700;
}
.beat svg { flex: none; color: var(--amber); }
.beat span { flex: 1 1 200px; min-width: 0; }
.beat b { font-family: var(--font-display); font-size: 20px; }

/* The pad. Its colour is the signal, so it changes in one frame: no fades on it, ever. */
.pad {
  position: relative; overflow: hidden; cursor: pointer; min-height: clamp(320px, 54vh, 540px);
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 10px;
  padding: 34px 22px 54px; border-radius: 30px; border: 1px solid var(--glass-line); box-shadow: var(--lift);
  user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; touch-action: manipulation; -webkit-tap-highlight-color: transparent;
  background:
    radial-gradient(90% 120% at 12% 0%, color-mix(in srgb, var(--violet) 62%, transparent), transparent 62%),
    radial-gradient(90% 120% at 92% 100%, color-mix(in srgb, var(--rose) 46%, transparent), transparent 60%),
    #12143A;
}
.pad:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.pad p { margin: 0; position: relative; }
.pad-k { font-size: 14px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; opacity: 0.82; min-height: 21px; }
.pad-big {
  font-family: var(--font-display); font-weight: 800; letter-spacing: -0.035em; line-height: 0.98;
  font-size: clamp(46px, 9vw, 104px); text-wrap: balance; font-variant-numeric: tabular-nums;
}
.pad-sub { font-size: 19px; font-weight: 600; max-width: 34ch; opacity: 0.92; text-wrap: balance; min-height: 28px; }
.pad-big:empty, .pad-sub:empty, .pad-k:empty { display: none; }

/* waiting to start: a slow sheen and a ring that breathes, so the page feels alive before you press */
.pad.idle::before, .pad.done::before, .pad.shown::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(105deg, transparent 40%, rgba(255, 255, 255, 0.16) 50%, transparent 60%);
  transform: translateX(-120%); animation: sheen 5s ease-in-out 1s infinite;
}
.pad.idle::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: min(70%, 420px); aspect-ratio: 1; border-radius: 50%; pointer-events: none;
  border: 2px solid rgba(255, 255, 255, 0.2); transform: translate(-50%, -50%) scale(0.7); animation: breathe 2.6s ease-out infinite;
}
@keyframes sheen { 0%, 62% { transform: translateX(-120%); } 82%, 100% { transform: translateX(120%); } }
@keyframes breathe { from { opacity: 0.9; transform: translate(-50%, -50%) scale(0.55); } to { opacity: 0; transform: translate(-50%, -50%) scale(1.25); } }

.pad.wait { background: linear-gradient(155deg, #8E0F2A, var(--stop) 70%, #FF7A66); border-color: transparent; }
.pad.go { background: linear-gradient(155deg, #07A363, var(--go) 70%, #A6FFD9); border-color: transparent; color: #04241A; }
.pad.early { background: linear-gradient(155deg, #C97A00, var(--amber) 70%, #FFE08A); border-color: transparent; color: var(--signal-ink); }
.pad.shown, .pad.done {
  background:
    radial-gradient(90% 120% at 12% 0%, color-mix(in srgb, var(--go) 40%, transparent), transparent 62%),
    radial-gradient(90% 120% at 92% 100%, color-mix(in srgb, var(--violet) 56%, transparent), transparent 60%),
    #12143A;
}
.pad.shown .pad-big, .pad.done .pad-big { animation: pop 420ms cubic-bezier(.2, 1.4, .3, 1) both; }
.pad.done .pad-big { background: linear-gradient(120deg, var(--amber), var(--rose)); -webkit-background-clip: text; background-clip: text; color: transparent; }
@keyframes pop { from { opacity: 0; transform: scale(0.72); } }

/* the sound test and the lights test give their signal another way, so the pad itself stays dark while you wait */
body[data-sig="sound"] .pad.wait {
  background: radial-gradient(80% 110% at 50% 50%, color-mix(in srgb, var(--violet) 58%, transparent), transparent 70%), #0C0E2C; border-color: var(--glass-line);
}
body[data-sig="f1"] .pad.wait { background: linear-gradient(180deg, #0B0D26, #12143A); border-color: var(--glass-line); }

/* The start lights */
.lights { display: none; gap: clamp(8px, 2vw, 18px); padding: clamp(10px, 2vw, 18px); border-radius: 22px; background: #05060F; border: 1px solid #23264A; box-shadow: 0 18px 40px -18px #000; }
body[data-mode="f1"] .lights { display: flex; }
.lamp {
  width: clamp(40px, 9vw, 86px); aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #3A1B22, #1B0C10 70%); border: 3px solid #101223; box-shadow: inset 0 -6px 12px rgba(0, 0, 0, 0.6);
}
.lamp.on {
  background: radial-gradient(circle at 35% 30%, #FFB0A8, #FF2D3F 45%, #B5001A 100%);
  box-shadow: 0 0 34px 6px rgba(255, 45, 63, 0.75), inset 0 -6px 12px rgba(120, 0, 10, 0.5);
}

/* one dot per round along the bottom of the pad */
.dots { position: absolute; left: 0; right: 0; bottom: 20px; display: flex; justify-content: center; gap: 9px; }
.dots i { width: 11px; height: 11px; border-radius: 50%; background: currentColor; opacity: 0.25; }
.dots i.on { opacity: 0.95; }
.dots i.now { opacity: 0.6; box-shadow: 0 0 0 4px color-mix(in srgb, currentColor 25%, transparent); }

.hint { margin: 0; font-size: 14.5px; color: var(--ink-soft); text-align: center; }
.mark { margin: 2px 0 0; text-align: center; font-family: var(--font-display); font-weight: 700; letter-spacing: 0.01em; font-size: 15px; color: var(--ink-soft); opacity: 0.8; }
.acts { display: flex; flex-wrap: wrap; gap: 8px; }
.btn.hot { background: linear-gradient(120deg, var(--amber), var(--rose)); color: var(--signal-ink); border-color: transparent; font-weight: 800; }

/* The result */
.sum {
  background: var(--glass); border: 1px solid var(--glass-line); border-radius: var(--radius); box-shadow: var(--lift);
  padding: 20px 22px; display: flex; flex-direction: column; gap: 16px; animation: settle 500ms cubic-bezier(.2, .8, .2, 1) both;
}
.sum-head h2 { font-family: var(--font-display); font-weight: 800; letter-spacing: -0.02em; font-size: clamp(26px, 3.4vw, 36px); line-height: 1.05; margin: 0; }
.sum-head p { margin: 4px 0 0; color: var(--ink-soft); }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; }
.tile { background: var(--field); border: 1px solid var(--glass-line); border-radius: 14px; padding: 10px 14px; display: flex; flex-direction: column; min-width: 0; }
.tile span { font-size: 12.5px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-soft); }
.tile b { font-family: var(--font-display); font-weight: 800; font-size: 26px; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tile:first-child b { background: linear-gradient(120deg, var(--amber), var(--rose)); -webkit-background-clip: text; background-clip: text; color: transparent; }

.bars { display: flex; align-items: flex-end; gap: 8px; }
.bar { flex: 1 1 0; min-width: 0; max-width: 84px; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.bar b { font-size: 13.5px; font-weight: 800; font-variant-numeric: tabular-nums; }
.bar span { font-size: 12px; color: var(--ink-soft); font-weight: 700; }
.bar-box { width: 100%; height: 92px; display: flex; align-items: flex-end; }
.bar-box i { display: block; width: 100%; border-radius: 9px 9px 4px 4px; background: linear-gradient(180deg, var(--violet), color-mix(in srgb, var(--violet) 40%, transparent)); animation: grow 520ms cubic-bezier(.2, .9, .2, 1) both; transform-origin: bottom; }
.bar.best .bar-box i { background: linear-gradient(180deg, var(--go), color-mix(in srgb, var(--go) 40%, transparent)); }
.bar.best b { color: var(--go); }
@keyframes grow { from { transform: scaleY(0.05); } }

.gauge { display: flex; flex-direction: column; gap: 4px; padding-top: 26px; }
.g-track { position: relative; height: 12px; border-radius: 999px; background: linear-gradient(90deg, var(--go), var(--amber) 50%, var(--rose)); }
.g-ref { position: absolute; top: -5px; width: 3px; height: 22px; margin-left: -1.5px; border-radius: 2px; background: var(--ink); }
.g-you { position: absolute; top: -7px; width: 26px; height: 26px; margin-left: -13px; border-radius: 50%; background: var(--ink); border: 4px solid var(--paper); box-shadow: 0 0 0 2px var(--ink); }
.g-you b { position: absolute; left: 50%; bottom: 30px; transform: translateX(-50%); font-size: 13px; font-weight: 800; }
.g-ends { display: flex; justify-content: space-between; font-size: 12.5px; font-weight: 700; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.sum-lines p { margin: 0 0 4px; font-weight: 700; }
.sum-lines p.good { color: var(--go); }

/* The rail: this run, then the record */
.rounds { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.rounds li { display: flex; justify-content: space-between; gap: 10px; padding: 6px 12px; border-radius: 10px; background: var(--field); border: 1px solid transparent; color: var(--ink-soft); font-size: 15.5px; }
.rounds li b { font-variant-numeric: tabular-nums; font-weight: 800; }
.rounds li.on { color: var(--ink); }
.rounds li.now { border-color: var(--violet); color: var(--ink); }
.rounds li.now b { color: var(--focus); font-weight: 700; }
.rec { margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.rec div { background: var(--field); border: 1px solid var(--glass-line); border-radius: 12px; padding: 8px 12px; }
.rec div:last-child { grid-column: 1 / -1; display: flex; align-items: baseline; justify-content: space-between; }
.rec dt { font-size: 12px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-soft); }
.rec dd { margin: 0; font-family: var(--font-display); font-weight: 800; font-size: 22px; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.spark { height: 56px; display: flex; align-items: flex-end; gap: 3px; margin-bottom: 6px; }
.spark i { flex: 1 1 0; min-width: 0; border-radius: 4px 4px 2px 2px; background: color-mix(in srgb, var(--violet) 75%, transparent); }
.spark i.best { background: var(--go); }
.rail .btn { align-self: flex-start; }
.fs-exit {
  display: none; position: fixed; top: 14px; left: 14px; z-index: 30; width: 46px; height: 46px; padding: 0;
  justify-content: center; border-radius: 50%; background: var(--panel);
}
/* The glass rail */
.rail { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.card {
  background: var(--glass); border: 1px solid var(--glass-line); border-radius: var(--radius);
  box-shadow: var(--lift); padding: 18px 20px; display: flex; flex-direction: column; gap: 12px; min-width: 0;
}
.rail > .card { animation: settle 600ms cubic-bezier(.2, .8, .2, 1) both; }
.rail > .card:nth-child(1) { animation-delay: 120ms; }
.rail > .card:nth-child(2) { animation-delay: 190ms; }
@keyframes arrive { from { opacity: 0; transform: translateY(14px) scale(0.98); } }
@keyframes settle { from { opacity: 0; transform: translateY(16px); } }
.card h2 { font-family: var(--font-display); font-size: 18px; font-weight: 700; letter-spacing: -0.01em; margin: 0; display: flex; align-items: center; gap: 10px; }
.pill {
  font-family: var(--font-body); font-size: 13px; font-weight: 700; color: #FFFFFF; border-radius: 999px; padding: 2px 11px;
  background: linear-gradient(120deg, var(--violet), var(--rose)); font-variant-numeric: tabular-nums;
}
.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
textarea, .field input, .field select {
  background: var(--field); border: 1px solid var(--glass-line); border-radius: 12px; color: var(--ink);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}
textarea { width: 100%; min-height: 250px; resize: vertical; padding: 12px 14px; border-radius: 14px; line-height: 1.45; }
textarea.small { min-height: 84px; }
textarea:focus-visible, .field input:focus-visible, .field select:focus-visible {
  outline: none; border-color: var(--violet); box-shadow: 0 0 0 4px color-mix(in srgb, var(--violet) 28%, transparent);
}
.field { display: flex; flex-direction: column; gap: 4px; font-size: 14px; color: var(--ink-soft); }
.field input, .field select { padding: 8px 10px; font-size: 17px; }
.field select option { background: var(--panel); color: var(--ink); }
.note { font-size: 14px; color: var(--ink-soft); margin: 0; }
.example-flag { font-size: 13px; color: var(--ink-soft); border: 1px dashed var(--glass-line); border-radius: 8px; padding: 5px 9px; margin: 0; }
.check { display: flex; gap: 9px; align-items: center; font-size: 15.5px; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--violet); flex: none; }
.seg { display: flex; gap: 4px; padding: 4px; border-radius: 14px; background: var(--field); border: 1px solid var(--glass-line); }
.seg button {
  flex: 1 1 0; min-width: 0; border: 0; background: none; border-radius: 10px; padding: 8px 8px; font-weight: 700; cursor: pointer; line-height: 1.2;
  transition: background 160ms ease;
}
.seg button[aria-pressed="true"] { background: linear-gradient(120deg, var(--violet), var(--rose)); color: #FFFFFF; }

.field input[type="text"] { width: 100%; }
.field > span { display: block; }
.btn.sure { border-color: var(--amber); background: color-mix(in srgb, var(--amber) 22%, transparent); }
textarea:disabled, .seg button:disabled, .check input:disabled + span { opacity: 0.55; }
.seg button:disabled { cursor: default; }
.seg button { flex: 1 1 auto; white-space: nowrap; padding-inline: 6px; }
/* Text below the tool */
.about { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 22px 32px; margin-top: 44px; }
.about h3 { font-family: var(--font-display); font-weight: 700; letter-spacing: -0.01em; font-size: 19px; margin: 0 0 6px; text-wrap: balance; }
.about p { margin: 0; color: var(--ink-soft); max-width: 46ch; }
.guide { margin-top: 40px; max-width: 820px; }
.guide h2 { font-family: var(--font-display); font-weight: 700; letter-spacing: -0.01em; font-size: 23px; margin: 30px 0 6px; text-wrap: balance; }
.guide h3 { font-size: 17px; margin: 18px 0 4px; }
.guide p, .guide li { color: var(--ink-soft); max-width: 70ch; }
.guide p { margin: 0 0 10px; }
.guide ol, .guide ul { margin: 0 0 10px; padding-left: 22px; }
.guide li { margin-bottom: 4px; }
.jobs { margin-top: 30px; }
.jobs h3 { font-family: var(--font-display); font-weight: 700; font-size: 19px; margin: 0 0 6px; }
.jobs p { margin: 0; line-height: 1.9; color: var(--ink-soft); }
.jobs a, .guide a, .foot a, .doc a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.foot { margin-top: 36px; padding-top: 16px; border-top: 1px solid var(--glass-line); color: var(--ink-soft); font-size: 14px; }

/* Ads: two fixed spots, labelled, and invisible until Google fills them */
.ad { margin: 34px 0 0; text-align: center; min-width: 0; }
.ad-label { display: none; margin: 0 0 6px; font-size: 12px; color: var(--ink-soft); }
.ad:has(ins[data-ad-status="filled"]) .ad-label { display: block; }
.ad ins[data-ad-status="unfilled"] { display: none !important; }

/* About, contact, privacy and terms */
.doc { max-width: 70ch; margin: 10px 0 0; }
.doc h1 { font-family: var(--font-display); font-weight: 800; letter-spacing: -0.025em; font-size: clamp(28px, 5vw, 40px); line-height: 1.1; margin: 10px 0 4px; }
.doc h2 { font-size: 20px; margin: 30px 0 6px; }
.doc p, .doc ul { margin: 0 0 12px; }
.doc ul { padding-inline-start: 22px; }
.doc li { margin-bottom: 6px; }

.field.wide { width: 100%; }
.field.wide > span { color: var(--ink); font-weight: 700; }
.contact-form { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; max-width: 560px; margin: 0 0 14px; }
.contact-form .field input, .contact-form textarea { font-size: 16px; color: var(--ink); }
.contact-form .field input { padding: 9px 12px; }
.contact-form textarea { min-height: 170px; }
.contact-form .cf-turnstile { min-height: 65px; max-width: 100%; }
.contact-form .btn { background: linear-gradient(120deg, var(--violet), var(--rose)); color: #FFFFFF; border-color: transparent; padding: 10px 20px; }
.contact-form .note { margin: 0; }
.contact-form .note.bad { color: var(--rose); }

.toast {
  position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%);
  background: var(--ink); color: var(--paper); border-radius: 999px; padding: 10px 20px; box-shadow: var(--lift);
  font-size: 15px; font-weight: 600; z-index: 40; max-width: calc(100% - 32px); opacity: 0; pointer-events: none;
  transition: opacity 160ms ease;
}
.toast.show { opacity: 1; }

/* The daily chip beside Bookmark and Share */
.btn.chip svg { color: var(--amber); }
.btn.chip b { background: linear-gradient(120deg, var(--amber), var(--rose)); color: var(--signal-ink); border-radius: 999px; padding: 0 8px; font-size: 13px; font-variant-numeric: tabular-nums; }

/* Aim trainer: the pad becomes an arena and one target lives inside it */
.pad.arena { justify-content: flex-start; cursor: crosshair; padding-top: 18px; background: linear-gradient(180deg, #0B0D26, #12143A); }
.pad.arena::before, .pad.arena::after { content: none; }
.target {
  position: absolute; border-radius: 50%; cursor: crosshair;
  background: radial-gradient(circle, #FFFFFF 0 14%, var(--go) 15% 42%, #0A7C52 43% 60%, var(--go) 61% 100%);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.9), 0 0 26px 2px color-mix(in srgb, var(--go) 70%, transparent);
}
.pad.oops { animation: oops 240ms ease-out; }
@keyframes oops { from { box-shadow: inset 0 0 0 6px var(--stop), var(--lift); } to { box-shadow: inset 0 0 0 0 transparent, var(--lift); } }

/* Clicks per second and the space bar: a count that climbs and a bar that runs out */
.pad.counting { background: radial-gradient(80% 110% at 50% 40%, color-mix(in srgb, var(--violet) 62%, transparent), transparent 72%), #0C0E2C; }
.pad.counting .pad-big { font-size: clamp(90px, 20vw, 220px); }
.time-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 12px; background: rgba(255, 255, 255, 0.12); }
.time-bar i { display: block; height: 100%; transform-origin: left; background: linear-gradient(90deg, var(--amber), var(--rose)); }

/* A personal best gets a moment */
.pad.done.best { box-shadow: 0 0 0 2px var(--amber), 0 0 60px -6px color-mix(in srgb, var(--amber) 70%, transparent), var(--lift); }
.sum.best { border-color: color-mix(in srgb, var(--amber) 70%, transparent); }
.sum.best .sum-lines p.good:first-child {
  display: inline-block; padding: 6px 14px; border-radius: 999px; color: var(--signal-ink);
  background: linear-gradient(110deg, var(--amber) 30%, #FFF1C2 50%, var(--amber) 70%); background-size: 220% 100%; animation: shine 1.8s ease-in-out 2;
}
@keyframes shine { from { background-position: 100% 0; } to { background-position: -20% 0; } }
.burst { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 50; }

.pics { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 14.5px; color: var(--ink-soft); }
.bars.many { gap: 3px; }
.bars.many .bar b, .bars.many .bar span { display: none; }
.bars.many .bar-box i { border-radius: 5px 5px 2px 2px; }

/* Today's challenge, in the rail and on its own page */
.today { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 5px; }
.today li { display: flex; align-items: center; gap: 8px; padding: 7px 12px; border-radius: 10px; background: var(--field); border: 1px solid transparent; font-size: 15px; }
.today li::before { content: ""; flex: none; width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--line); }
.today li.on::before { border-color: var(--go); background: var(--go) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.4l2.6 2.6L12 5.5' fill='none' stroke='%2304241A' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 12px no-repeat; }
.today li.here { border-color: var(--violet); }
.today a { color: inherit; font-weight: 700; text-decoration: none; }
.today a:hover { text-decoration: underline; }
.today span { color: var(--ink-soft); font-size: 13px; }
.today b { margin-left: auto; font-variant-numeric: tabular-nums; white-space: nowrap; }
.today.big li { padding: 12px 16px; font-size: 18px; flex-wrap: wrap; }
.today.big span { font-size: 15px; }
.today.big .btn { text-decoration: none; }

.hub { display: flex; flex-direction: column; gap: 18px; max-width: 900px; }
.hub .sum { animation: none; }
.days { display: grid; grid-template-columns: repeat(14, minmax(0, 1fr)); gap: 6px; }
.day { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 12px; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.day i { width: 100%; max-width: 34px; aspect-ratio: 1; border-radius: 9px; background: var(--field); border: 1px solid var(--glass-line); }
.day.part i { background: color-mix(in srgb, var(--violet) 45%, transparent); }
.day.on i { background: linear-gradient(140deg, var(--amber), var(--rose)); border-color: transparent; }
.day.now i { outline: 2px solid var(--focus); outline-offset: 2px; }
.day.now span { color: var(--ink); font-weight: 800; }

.badges { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.badge { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 3px; padding: 16px 12px 14px; border-radius: 16px; background: var(--field); border: 1px solid var(--glass-line); }
.badge-art { width: 62px; height: 62px; }
.badge-art svg { width: 100%; height: 100%; }
.badge .hex { fill: #1C1F45; stroke: var(--line); stroke-width: 2; }
.badge .glyph { stroke: #5C5F8C; }
.badge strong { font-family: var(--font-display); font-size: 17px; letter-spacing: -0.01em; }
.badge span { font-size: 13.5px; color: var(--ink-soft); line-height: 1.35; }
.badge em { font-style: normal; font-size: 12px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-soft); margin-top: 4px; }
.badge.amber { --tone: var(--amber); } .badge.rose { --tone: var(--rose); } .badge.aqua { --tone: var(--go); } .badge.violet { --tone: #9C86FF; }
.badge.got { border-color: color-mix(in srgb, var(--tone) 60%, transparent); background: linear-gradient(180deg, color-mix(in srgb, var(--tone) 16%, transparent), var(--field)); }
.badge.got .hex { fill: color-mix(in srgb, var(--tone) 30%, #12143A); stroke: var(--tone); }
.badge.got .glyph { stroke: #FFFFFF; }
.badge.got .badge-art { filter: drop-shadow(0 0 10px color-mix(in srgb, var(--tone) 60%, transparent)); }
.badge.got em { color: var(--tone); }

/* Classroom */
.klass-table { overflow-x: auto; }
.klass-table table, .sheet table { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; }
.klass-table th, .klass-table td { padding: 7px 10px; text-align: right; white-space: nowrap; }
.klass-table th { font-size: 12.5px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-soft); font-weight: 800; }
.klass-table td { border-top: 1px solid var(--glass-line); font-weight: 700; }
.klass-table th:nth-child(2), .klass-table td:nth-child(2), .klass-table th:nth-child(3), .klass-table td:nth-child(3) { text-align: left; }
.klass-table td:nth-child(2) { white-space: normal; overflow-wrap: anywhere; min-width: 120px; }
.klass-table .btn { padding: 4px 10px; font-size: 13.5px; }
ol.plain { margin: 0; padding-left: 20px; color: var(--ink-soft); font-size: 15px; }
ol.plain li { margin-bottom: 5px; }
.print-area { display: none; }

/* Full screen: the pad fills the screen and everything else steps aside */
.stage:fullscreen, body.faux-full .stage { background: var(--paper); padding: 70px 22px 18px; overflow: auto; }
body.faux-full .stage { position: fixed; inset: 0; z-index: 20; }
.stage:fullscreen .fs-exit, body.faux-full .fs-exit { display: inline-flex; }
.stage:fullscreen .pad, body.faux-full .pad { flex: 1 1 auto; min-height: 0; }
.stage:fullscreen .sum, body.faux-full .sum, .stage:fullscreen .klass, body.faux-full .klass, .stage:fullscreen .hint, body.faux-full .hint, .stage:fullscreen .beat, body.faux-full .beat { display: none; }

@media (max-width: 1020px) {
  .work { grid-template-columns: minmax(0, 1fr) 280px; gap: 20px; }
}
@media (max-width: 880px) {
  .shell { padding: 0 16px 48px; }
  .work { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .head { padding-bottom: 12px; }
  .head p { font-size: 16px; }
  .pad { min-height: clamp(300px, 50vh, 460px); border-radius: 24px; }
  .pad-sub { font-size: 17px; }
}
@media (max-width: 600px) {
  .top { gap: 10px 12px; padding: 14px 0 10px; }
  .brand { font-size: 19px; }
  .modes { order: 3; width: 100%; }
  .modes a { flex: 1 1 0; text-align: center; padding: 7px 6px; font-size: 15px; white-space: nowrap; }
  .top-tools { gap: 6px; }
  .top-tools .btn { padding: 7px 10px; font-size: 14px; }
  .head h1 { font-size: 30px; }
  .spread .btn span { display: none; }
  .spread .btn { padding: 9px 11px; }
  .sum { padding: 16px; }
  .tile b { font-size: 22px; }
  .acts .btn { flex: 1 1 auto; justify-content: center; text-align: center; }
}
@media (prefers-reduced-motion: reduce) {
  body::before, body::after, .pad::before, .pad::after, .stage, .rail > .card, .sum, .bar-box i, .pad .pad-big { animation: none !important; }
  .btn { transition: none; }
}
@media (max-width: 600px) {
  .modes { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .modes::-webkit-scrollbar { display: none; }
  .modes a { flex: 0 0 auto; padding: 7px 13px; }
  .days { grid-template-columns: repeat(7, minmax(0, 1fr)); }
  .pad.counting .pad-big { font-size: 96px; }
}
@media print {
  body { background: #FFFFFF; color: #000000; }
  body::before, body::after, .toast, .burst { display: none !important; }
  body.printing .shell { display: none !important; }
  body.printing .print-area { display: block; }
  .sheet { font-family: Arial, Helvetica, sans-serif; font-size: 12pt; color: #000000; }
  .sheet h1 { font-size: 20pt; margin: 0 0 10pt; }
  .sheet h2 { font-size: 13pt; margin: 12pt 0 4pt; }
  .sheet p, .sheet li { margin: 0 0 6pt; }
  .sheet p.fill { margin: 0 0 10pt; white-space: nowrap; overflow: hidden; }
  .sheet table { margin-top: 4pt; }
  .sheet th, .sheet td { border: 1px solid #000000; padding: 5pt 8pt; text-align: left; height: 16pt; }
  .sheet .foot-line { margin-top: 12pt; font-size: 9pt; color: #444444; }
}

/* Guide pages */
.article .sum { margin: 22px 0 6px; animation: none; }
.article .sum-head p { max-width: none; margin: 4px 0 0; }
.article .sum .btn { text-decoration: none; }
.article .tile b { font-size: 22px; white-space: normal; }
.calc-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 14px 18px; }
.calc-row .field input { width: 130px; }
.facts { overflow-x: auto; margin: 10px 0 12px; border: 1px solid var(--glass-line); border-radius: 14px; background: var(--glass); }
.facts table { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; }
.facts th, .facts td { padding: 9px 14px; text-align: left; vertical-align: top; }
.facts th { font-size: 12.5px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-soft); font-weight: 800; }
.facts td { border-top: 1px solid var(--glass-line); color: var(--ink-soft); }
.facts td:first-child { color: var(--ink); font-weight: 800; white-space: nowrap; }
.guide p.formula { font-family: var(--font-display); font-weight: 800; font-size: 26px; color: var(--ink); margin: 6px 0 12px; }
.picks .pick { text-decoration: none; color: inherit; gap: 6px; transition: transform 160ms ease, border-color 160ms ease; }
.picks .pick:hover, .picks .pick:focus-visible { transform: translateY(-2px); border-color: color-mix(in srgb, var(--amber) 60%, transparent); }
.picks .pick h2 { font-family: var(--font-display); font-weight: 800; letter-spacing: -0.02em; font-size: 26px; margin: 0; }
.picks .pick p { margin: 0; color: var(--ink-soft); }
