/* CogniBump Arcade — the shared look for the classic games (Daily 5 family, flags, capitals,
   TagTeam, WordRush and friends), matching the redesigned games: warm paper, ink, Fraunces
   headlines over Nunito, Bumpy the block buddy, and answers told apart by colour AND shape.

   Use: <body class="cbx" style="--cbx-accent:#2f6bff"> and the .cbx-* components below.
   Every rule is scoped under .cbx so nothing leaks into pages that don't opt in. */

:root {
  --cbx-paper: #fbf4ea; --cbx-card: #ffffff; --cbx-ink: #2a1d17; --cbx-ink-2: #4a3a30;
  --cbx-muted: #7d685c; --cbx-line: #eadccb; --cbx-soft: #f3e8da;
  --cbx-good: #1f9d57; --cbx-good-soft: #dff5e8; --cbx-bad: #d8433b; --cbx-bad-soft: #fde3df;
  --cbx-a0: #e8364f; --cbx-a1: #2563eb; --cbx-a2: #f2b21b; --cbx-a3: #0f8a5f;
  --cbx-display: 'Fraunces', Georgia, serif; --cbx-body: 'Nunito', system-ui, sans-serif;
  --cbx-accent: #2f6bff;
}
body.cbx {
  margin: 0; min-height: 100vh; color: var(--cbx-ink); font-family: var(--cbx-body);
  /* one glow at the top, not repeated: site.css sets html/body height:100%, which would tile it */
  background:
    radial-gradient(900px 340px at 50% -80px, color-mix(in srgb, var(--cbx-accent) 16%, transparent), transparent 70%) top center / 100% 700px no-repeat,
    var(--cbx-paper);
  -webkit-tap-highlight-color: transparent;
}
.cbx *, .cbx *::before, .cbx *::after { box-sizing: border-box; }
.cbx [hidden] { display: none; }   /* not !important: legacy scripts reveal hidden elements with an inline display */
.cbx a { color: color-mix(in srgb, var(--cbx-accent) 80%, #000); text-underline-offset: 2px; }
.cbx button { font-family: var(--cbx-body); }
.cbx :focus-visible { outline: 3px solid var(--cbx-accent); outline-offset: 2px; }
/* the site header stays as it is everywhere: white on black, not the page's ink or accent */
.cbx .cb-header, .cbx .cb-menu-trigger, .cbx .cb-nav a, .cbx .cb-menu-panel a { color: #fff; }

/* ---------- layout ---------- */
.cbx-wrap { max-width: 720px; margin: 0 auto; padding: 14px 16px 28px; }
.cbx-hero { display: flex; align-items: center; gap: 14px; margin: 6px 0 14px; }
.cbx-hero .txt { flex: 1; min-width: 0; }
.cbx-kicker { margin: 0; font-weight: 900; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: color-mix(in srgb, var(--cbx-accent) 80%, #000); }
.cbx-title { margin: 2px 0 4px; font: 900 clamp(30px, 7vw, 44px)/1 var(--cbx-display); letter-spacing: -.02em; color: var(--cbx-ink); }
.cbx-title em { font-style: normal; color: var(--cbx-accent); }
.cbx-sub { margin: 0; font-weight: 800; font-size: 15px; line-height: 1.45; color: var(--cbx-muted); }
.cbx-mascot { width: 104px; height: 104px; flex: none; position: relative; }
.cbx-mascot canvas { position: absolute; inset: -20px -16px -6px; width: calc(100% + 32px) !important; height: calc(100% + 26px) !important; }
.cbx-mascot .bud2d { position: absolute; inset: 14px; }

/* the 2D Bumpy (shown until/unless the 3D one loads) */
.bud2d { border-radius: 30%; background: #ffc93c; box-shadow: inset 0 -8px 0 rgba(0,0,0,.18), 0 8px 18px rgba(42,29,23,.22); }
.bud2d::before, .bud2d::after { content: ''; position: absolute; top: 28%; width: 24%; height: 28%; border-radius: 50%; background: radial-gradient(circle at 50% 62%, #151a3d 0 30%, #fff 31%); }
.bud2d::before { left: 18%; } .bud2d::after { right: 18%; }

/* ---------- cards ---------- */
.cbx-card { background: var(--cbx-card); border-radius: 22px; padding: 18px; box-shadow: 0 1px 0 var(--cbx-line), 0 14px 34px rgba(42,29,23,.08); position: relative; }
.cbx-card + .cbx-card { margin-top: 14px; }
.cbx-card.accent { border-top: 5px solid var(--cbx-accent); }
.cbx-card h2 { margin: 0 0 6px; font: 900 22px/1.15 var(--cbx-display); }
.cbx-card h3 { margin: 14px 0 4px; font: 900 17px var(--cbx-body); }
.cbx-card p, .cbx-card li { line-height: 1.55; color: var(--cbx-ink-2); }
.cbx-card ul, .cbx-card ol { padding-left: 20px; margin: 6px 0; }
.cbx-card details { border-top: 2px solid var(--cbx-soft); padding: 10px 0; }
.cbx-card details:first-of-type { border-top: 0; }
.cbx-card summary { font-weight: 900; cursor: pointer; }
.cbx-card details p { margin: 6px 0 0; }
.cbx-read { margin-top: 18px; }   /* the how-to / FAQ cards under a game */

/* ---------- bits ---------- */
.cbx-pills { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.cbx-pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px; font-weight: 900; font-size: 12.5px; background: var(--cbx-soft); color: var(--cbx-ink-2); white-space: nowrap; }
.cbx-pill.accent { background: color-mix(in srgb, var(--cbx-accent) 14%, #fff); color: color-mix(in srgb, var(--cbx-accent) 75%, #000); }
.cbx-pill.easy { background: var(--cbx-good-soft); color: #136b3b; }
.cbx-pill.medium { background: #fff1cc; color: #7a5600; }
.cbx-pill.hard { background: var(--cbx-bad-soft); color: #a32b22; }
.cbx-topline { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.cbx-progress { display: flex; gap: 6px; }
.cbx-progress i { width: 12px; height: 12px; border-radius: 50%; background: var(--cbx-soft); box-shadow: inset 0 0 0 2px var(--cbx-line); }
.cbx-progress i.now { background: var(--cbx-accent); box-shadow: none; transform: scale(1.15); }
.cbx-progress i.ok { background: var(--cbx-good); box-shadow: none; }
.cbx-progress i.no { background: var(--cbx-bad); box-shadow: none; }
.cbx-timer { height: 8px; border-radius: 99px; background: var(--cbx-soft); overflow: hidden; margin: 8px 0 14px; }
.cbx-timer > * { display: block; height: 100%; border-radius: 99px; background: var(--cbx-accent); }
.cbx-question { font: 800 clamp(21px, 5vw, 26px)/1.25 var(--cbx-display); margin: 6px 0 16px; color: var(--cbx-ink); }

/* ---------- answers: white cards with a coloured shape badge ---------- */
.cbx-answers { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.cbx-answer, .cbx-answers > li > button {
  width: 100%; min-height: 58px; display: flex; align-items: center; gap: 12px; text-align: left;
  padding: 10px 16px 10px 12px; border-radius: 16px; border: 2px solid var(--cbx-line); background: #fff;
  font: 800 17px/1.25 var(--cbx-body); color: var(--cbx-ink); cursor: pointer;
  box-shadow: 0 3px 0 var(--cbx-line); transition: transform .12s, border-color .15s, background .15s, box-shadow .15s;
}
.cbx-answer::before, .cbx-answers > li > button::before {
  content: ''; flex: none; width: 34px; height: 34px; border-radius: 10px; background: var(--b, var(--cbx-a0));
  -webkit-mask: var(--m) center / 20px 20px no-repeat, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
}
.cbx-answers > li:nth-child(4n+1) > button, .cbx-answer.a0 { --b: var(--cbx-a0); --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M10 2l8.5 15h-17z'/%3E%3C/svg%3E"); }
.cbx-answers > li:nth-child(4n+2) > button, .cbx-answer.a1 { --b: var(--cbx-a1); --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Ccircle cx='10' cy='10' r='8'/%3E%3C/svg%3E"); }
.cbx-answers > li:nth-child(4n+3) > button, .cbx-answer.a2 { --b: var(--cbx-a2); --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Crect x='3' y='3' width='14' height='14' rx='1'/%3E%3C/svg%3E"); }
.cbx-answers > li:nth-child(4n+4) > button, .cbx-answer.a3 { --b: var(--cbx-a3); --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M10 1l9 9-9 9-9-9z'/%3E%3C/svg%3E"); }
.cbx-answers > li { opacity: 0; transform: translateY(8px); animation: cbx-rise .35s ease forwards; }
.cbx-answers > li:nth-child(2) { animation-delay: .06s; } .cbx-answers > li:nth-child(3) { animation-delay: .12s; } .cbx-answers > li:nth-child(4) { animation-delay: .18s; }
@media (hover: hover) {
  .cbx-answer:hover:not(:disabled), .cbx-answers > li > button:hover:not(:disabled) { transform: translateY(-2px); border-color: var(--cbx-accent); box-shadow: 0 5px 0 color-mix(in srgb, var(--cbx-accent) 35%, var(--cbx-line)); }
}
.cbx-answer:active:not(:disabled), .cbx-answers > li > button:active:not(:disabled) { transform: translateY(2px); box-shadow: 0 1px 0 var(--cbx-line); }
.cbx-answer:disabled, .cbx-answers > li > button:disabled { cursor: default; }
.cbx-answers > li > button:disabled:not(.correct):not(.wrong), .cbx-answer:disabled:not(.correct):not(.wrong) { opacity: .55; }
.cbx-answer.correct, .cbx-answers > li > button.correct { background: var(--cbx-good); border-color: var(--cbx-good); color: #fff; box-shadow: 0 3px 0 #136b3b; animation: cbx-pop .32s ease; }
.cbx-answer.wrong, .cbx-answers > li > button.wrong { background: var(--cbx-bad); border-color: var(--cbx-bad); color: #fff; box-shadow: 0 3px 0 #8f241d; animation: cbx-shake .4s ease; }
.cbx-answer.correct::before, .cbx-answers > li > button.correct::before { background: #fff; --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M4 10.5l4 4 8-9' fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.cbx-answer.wrong::before, .cbx-answers > li > button.wrong::before { background: #fff; --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 5l10 10M15 5L5 15' stroke='%23000' stroke-width='3' stroke-linecap='round'/%3E%3C/svg%3E"); }
.cbx-answer.correct.reveal, .cbx-answers > li > button.correct.reveal { animation: cbx-glow 1s ease 2; }

/* ---------- buttons ---------- */
.cbx-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 12px 22px; border: 0; border-radius: 16px; cursor: pointer; font: 900 17px var(--cbx-body); color: #fff; background: var(--cbx-accent); box-shadow: 0 4px 0 color-mix(in srgb, var(--cbx-accent) 60%, #000); text-decoration: none; }
.cbx-btn:active { transform: translateY(2px); box-shadow: 0 2px 0 color-mix(in srgb, var(--cbx-accent) 60%, #000); }
.cbx-btn.block { display: flex; width: 100%; }
.cbx-btn.ink { background: var(--cbx-ink); box-shadow: 0 4px 0 #000; }
.cbx-btn.gold { background: linear-gradient(180deg, #ffd84d, #ffb020); color: #241500; box-shadow: 0 4px 0 #b86f00; }
.cbx-btn.alt { background: #fff; color: var(--cbx-ink); box-shadow: 0 3px 0 var(--cbx-line), inset 0 0 0 2px var(--cbx-line); }
.cbx-btn:disabled { opacity: .45; cursor: default; transform: none; }
.cbx-row { display: flex; gap: 10px; flex-wrap: wrap; }
.cbx-row > * { flex: 1; }

/* ---------- results ---------- */
.cbx-result { text-align: center; }
.cbx-fx { position: relative; margin: -6px -6px 4px; min-height: 0; }
.cbx-big { font: 900 clamp(46px, 13vw, 64px)/1 var(--cbx-body); font-variant-numeric: tabular-nums; letter-spacing: -.02em; color: var(--cbx-ink); margin: 2px 0; }
.cbx-big small { font: 900 .45em var(--cbx-body); color: var(--cbx-muted); }
.cbx-verdict { font: 900 18px var(--cbx-body); color: color-mix(in srgb, var(--cbx-accent) 80%, #000); margin: 4px 0 12px; }
.cbx-chips { display: grid; grid-template-columns: repeat(auto-fit, minmax(92px, 1fr)); gap: 8px; margin: 12px 0; }
.cbx-chips > * { background: var(--cbx-paper); border-radius: 14px; padding: 10px 6px; font-weight: 800; font-size: 12px; color: var(--cbx-muted); text-align: center; }
.cbx-chips b { display: block; font: 900 20px var(--cbx-body); color: var(--cbx-ink); font-variant-numeric: tabular-nums; }
.cbx-grid { font-size: 26px; letter-spacing: .1em; margin: 6px 0; }
.cbx-note { font-weight: 800; font-size: 14px; color: var(--cbx-muted); margin: 8px 0 0; }

.cbx-toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 30px); opacity: 0; background: var(--cbx-ink); color: #fff; font: 800 15px var(--cbx-body); padding: 11px 16px; border-radius: 12px; transition: .25s; pointer-events: none; z-index: 1000; }
.cbx-toast.on { transform: translate(-50%, 0); opacity: 1; }

/* ---------- shared site pieces on the light pages ---------- */
.cbx .cb-post-game-bar { margin-top: 14px; padding: 14px; border: 0; border-radius: 18px; background: var(--cbx-paper); }
.cbx .cb-post-game-inner .cb-post-game-label { color: var(--cbx-muted) !important; text-align: center; }
.cbx .cb-post-game-btn { background: #fff !important; color: var(--cbx-ink) !important; border: 2px solid var(--cbx-line) !important; border-radius: 14px; font-weight: 900; box-shadow: 0 3px 0 var(--cbx-line); text-decoration: none !important; }
.cbx .cb-post-game-btn:first-child { background: var(--cbx-ink) !important; color: #fff !important; border-color: var(--cbx-ink) !important; box-shadow: 0 3px 0 #000; }
.cbx .cb-post-game-btn.cb-post-game-quiet { background: transparent !important; color: var(--cbx-muted) !important; box-shadow: none; }
.cbx .cb-more-games { max-width: 720px; }
.cbx .cb-more-games h3 { color: var(--cbx-ink); font: 900 24px var(--cbx-display); }
.cbx .cb-more-games .cb-more-lead { color: var(--cbx-muted) !important; text-align: center; }
.cbx .cb-more-games .cb-policy-line { text-align: center; color: var(--cbx-muted) !important; }
.cbx .cb-more-games .cb-policy-line a { color: var(--cbx-muted) !important; text-decoration: underline !important; }
.cbx .cb-more-card { background: #fff; color: var(--cbx-ink); box-shadow: 0 1px 0 var(--cbx-line), 0 8px 20px rgba(42,29,23,.08); border-radius: 16px; font-weight: 800; }
.cbx .cb-more-card img { border-radius: 10px; }

@keyframes cbx-rise { to { opacity: 1; transform: none; } }
@keyframes cbx-pop { 0% { transform: scale(1); } 40% { transform: scale(1.03); } 100% { transform: scale(1); } }
@keyframes cbx-shake { 0%, 100% { transform: translateX(0); } 20% { transform: translateX(-6px); } 40% { transform: translateX(6px); } 60% { transform: translateX(-4px); } 80% { transform: translateX(4px); } }
@keyframes cbx-glow { 50% { box-shadow: 0 0 0 5px color-mix(in srgb, var(--cbx-good) 35%, transparent), 0 3px 0 #136b3b; } }
@media (prefers-reduced-motion: reduce) {
  .cbx *, .cbx *::before, .cbx *::after { animation: none !important; transition: none !important; }
  .cbx-answers > li { opacity: 1; transform: none; }
}
