/* Brainlag Learn kit: styles for learn-kit.js. Theme it by setting the --blk-* tokens on :root or any container
 * (each site maps them to its own palette; defaults are Brainlag's). Transform and opacity only for motion. */
:root {
  --blk-ink: #0e1c2c; --blk-ink-2: #33475b; --blk-face: #ffffff; --blk-edge: #cfc3ab;
  --blk-accent: #0d9aa7; --blk-accent-edge: #07646d; --blk-accent-ink: #04161c; --blk-accent-tint: #d7efef;
  --blk-ok: #0e6b3f; --blk-ok-fill: #20a067; --blk-ok-edge: #0b6a3f; --blk-ok-ink: #04210f; --blk-ok-bg: #dff2e7;
  --blk-bad: #c0332c; --blk-bad-fill: #ff8f86; --blk-bad-ink: #3a0d10; --blk-bad-bg: #fbe7e4;
  --blk-track: #e4d9c3; --blk-fill: #0d9aa7; --blk-combo: #b8640a;
  --blk-radius: 12px; --blk-lip: 4px;
}
:root[data-theme="dark"] {
  --blk-ink: #f2f6fb; --blk-ink-2: #c0cfdf; --blk-face: #1a3050; --blk-edge: #0a1626;
  --blk-accent-tint: #0b3943; --blk-ok: #45d69c; --blk-ok-bg: #0d3330; --blk-bad: #ff8f86; --blk-bad-bg: #3a1620;
  --blk-track: #1a3050; --blk-combo: #ffb44d;
}
.blk-vh { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* keycap: a lip in the button's own darker shade; the face drops onto it when pressed, springs back on release */
.blk-key { --edge: var(--blk-edge); display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 0 22px var(--blk-lip); border: 0; border-radius: var(--blk-radius); background: var(--blk-face); color: var(--blk-ink); box-shadow: inset 0 0 0 1.5px var(--edge), inset 0 calc(-1 * var(--blk-lip)) 0 var(--edge); font-family: inherit; font-weight: 650; font-size: 17px; line-height: 1; cursor: pointer; transition: transform .09s cubic-bezier(.34,1.56,.64,1), box-shadow .09s cubic-bezier(.34,1.56,.64,1); -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.blk-key:active { transform: translateY(calc(var(--blk-lip) - 1px)); box-shadow: inset 0 0 0 1.5px var(--edge), inset 0 -1px 0 var(--edge); transition-duration: 0s; }
.blk-key.is-ok { --edge: var(--blk-ok-edge); background: var(--blk-ok-fill); color: var(--blk-ok-ink); box-shadow: inset 0 calc(-1 * var(--blk-lip)) 0 var(--edge); }
.blk-key.is-ok:active { box-shadow: inset 0 -1px 0 var(--edge); }

/* answer tiles */
.blk-tile { --edge: var(--blk-edge); display: flex; align-items: center; gap: 12px; width: 100%; min-height: 56px; padding: 12px 16px calc(12px + var(--blk-lip)); border: 0; border-radius: var(--blk-radius); background: var(--blk-face); color: var(--blk-ink); box-shadow: inset 0 0 0 2px var(--edge), inset 0 calc(-1 * var(--blk-lip)) 0 var(--edge); font-family: inherit; font-weight: 600; font-size: 17px; line-height: 1.35; text-align: left; cursor: pointer; transition: transform .09s cubic-bezier(.34,1.56,.64,1), box-shadow .12s ease, background-color .12s ease; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.blk-tile:active { transform: translateY(calc(var(--blk-lip) - 1px)); box-shadow: inset 0 0 0 2px var(--edge), inset 0 -1px 0 var(--edge); transition-duration: 0s; }
.blk-tile[aria-pressed="true"] { --edge: var(--blk-accent); background: var(--blk-accent-tint); }
.blk-tile.is-right { --edge: var(--blk-ok-fill); background: var(--blk-ok-bg); }
.blk-tile.is-wrong { --edge: var(--blk-bad); background: var(--blk-bad-bg); }
.blk-tile:disabled { cursor: default; }

/* the feedback sheet */
.blk-sheet { position: relative; z-index: 8; }
.blk-sheet-in { display: flex; align-items: center; gap: 14px; padding: 16px 20px; }
.blk-sheet-mark { display: grid; place-items: center; flex: none; width: 42px; height: 42px; border-radius: 50%; }
.blk-sheet-mark svg { width: 24px; height: 24px; }
.blk-sheet-text { flex: 1 1 auto; min-width: 0; }
.blk-sheet-h { margin: 0; font-size: 21px; line-height: 1.2; font-weight: 700; }
.blk-sheet-d { margin: 3px 0 0; font-size: 15px; line-height: 1.4; }
.blk-sheet-act { flex: none; }
.blk-sheet-go { min-width: 150px; }
.blk-sheet.is-ok { background: var(--blk-ok-bg); color: var(--blk-ok); }
.blk-sheet.is-no { background: var(--blk-bad-bg); color: var(--blk-bad); }
.blk-sheet.is-ok .blk-sheet-mark { background: var(--blk-ok-fill); color: var(--blk-ok-ink); }
.blk-sheet.is-no .blk-sheet-mark { background: var(--blk-bad-fill); color: var(--blk-bad-ink); }

/* progress bar: fill by transform, a bump, a sheen */
.blk-bar { position: relative; display: block; height: 14px; overflow: hidden; border-radius: 7px; background: var(--blk-track); }
.blk-bar-fill { position: absolute; inset: 0; border-radius: inherit; background: var(--blk-fill); transform-origin: 0 50%; transform: scaleX(0); }
.blk-bar-fill::after { content: ""; position: absolute; left: 8px; right: 8px; top: 3px; height: 3px; border-radius: 2px; background: rgba(255, 255, 255, .35); }
.blk-bar-sheen { position: absolute; top: 0; bottom: 0; left: 0; width: 26px; background: rgba(255, 255, 255, .55); opacity: 0; pointer-events: none; }

/* combo counter: a drawn spark and "n in a row" */
.blk-combo { display: inline-flex; align-items: center; gap: 5px; color: var(--blk-combo); font-family: inherit; font-weight: 700; font-size: 15px; line-height: 1; font-variant-numeric: tabular-nums; white-space: nowrap; transform-origin: 50% 60%; }
.blk-combo svg { width: 18px; height: 18px; flex: none; }

/* confetti */
.blk-confetti { position: fixed; inset: 0; z-index: 400; overflow: hidden; pointer-events: none; contain: strict; }
.blk-cf { position: absolute; display: block; opacity: 0; will-change: transform, opacity; }
.blk-cf-r { width: 11px; height: 6px; border-radius: 2px; }
.blk-cf-d { width: 8px; height: 8px; border-radius: 50%; }
.blk-cf-s { width: 18px; height: 10px; }
.blk-cf-k { width: 12px; height: 12px; }
.blk-cf svg { display: block; width: 100%; height: 100%; overflow: visible; }

/* the sound switch */
.blk-sound { display: grid; place-items: center; flex: none; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 10px; background: none; color: var(--blk-ink-2); cursor: pointer; }
.blk-sound svg { width: 22px; height: 22px; }
.blk-sound .blk-snd-on, .blk-sound.is-on .blk-snd-off { display: none; }
.blk-sound.is-on .blk-snd-on { display: inline; }
.blk-sound.is-on { color: var(--blk-accent); }

@media (prefers-reduced-motion: reduce) {
  .blk-confetti { display: none; }
  .blk-key, .blk-tile { transition: none; }
}

/* controls are for tapping, not selecting: no text selection, no long-press callout, no grey tap flash */
.blk-key, .blk-tile, .blk-sheet, .blk-combo, .blk-sound, .blk-bar { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent; }
