/* ==========================================================================
   ScienceHutch: Speed & Reaction Lab (motion.html only).
   Colors, buttons and type come from main.css. Same playful layout as
   Push & Pull and Energy Detective (this file was started from energy.css).
   Colors: teal = motion graphs, yellow = speed-time graph, amber = reaction
   distance, red = braking distance, green = safe stops.
   Everything that moves stops for people who ask for reduced motion (bottom).
   ========================================================================== */

.mo-page {
  --push: #FF8A2B;   /* motion */
  --fric: #FF5A6E;   /* heat */
  --net: #FFE14D;    /* total, electrical */
  --grav: #4FA8FF;   /* height */
  --zap: #7CFF9E;    /* useful energy */
  --good: #7CFF9E;
  --bad: #FF9B8A;
  --glass: rgba(30, 22, 20, 0.72);
  --glass-border: rgba(255, 255, 255, 0.09);
}
.mo-wrap { width: min(100% - 2rem, 72rem); margin-inline: auto; }
.mo-page [hidden] { display: none !important; }
.mo-page h1, .mo-page h2 { font-family: var(--font-display); font-weight: 400; line-height: 1.08; }
.mo-page button { font: inherit; }
.mo-page button:focus-visible, .mo-page input:focus-visible, .mo-page summary:focus-visible, .mo-page a:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }

/* ======= INTRO ======= */
.mo-hero {
  position: relative;
  overflow: hidden;
  padding-bottom: clamp(2rem, 5vw, 3.5rem);
  background:
    radial-gradient(ellipse 55% 50% at 80% 35%, rgba(63, 224, 208, 0.18), transparent 70%),
    radial-gradient(ellipse 45% 45% at 15% 80%, rgba(79, 168, 255, 0.10), transparent 70%),
    radial-gradient(ellipse 60% 40% at 60% 100%, rgba(255, 138, 43, 0.12), transparent 70%),
    var(--bg);
  border-bottom: 1px solid var(--border);
}
.mo-sky, .mo-sky::after {
  position: absolute; inset: 0; pointer-events: none;
  background-image:
    radial-gradient(1.2px 1.2px at 12% 18%, #fff, transparent), radial-gradient(1px 1px at 30% 60%, #ffe9c7, transparent),
    radial-gradient(1.3px 1.3px at 48% 12%, #fff, transparent), radial-gradient(1px 1px at 66% 42%, #cfeaff, transparent),
    radial-gradient(1.2px 1.2px at 88% 20%, #fff, transparent), radial-gradient(1px 1px at 8% 70%, #fff, transparent);
  background-size: 380px 380px; opacity: 0.55;
}
.mo-sky::after { content: ""; background-size: 280px 280px; background-position: 90px 40px; animation: mo-twinkle 5s ease-in-out infinite alternate; }
@keyframes mo-twinkle { from { opacity: 0.1; } to { opacity: 0.8; } }
.mo-hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(1.5rem, 4vw, 3rem);
  padding-block: clamp(2.5rem, 7vw, 5rem) clamp(1.5rem, 4vw, 2.5rem);
}
.mo-hero h1 { margin: 0; font-size: clamp(2.8rem, 8.5vw, 5.4rem); }
.mo-hero h1 span {
  background: linear-gradient(90deg, #3FE0D0, #7CFF9E 30%, #FFE14D 60%, #FF8A2B);
  background-size: 200% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: mo-shimmer 7s ease-in-out infinite alternate;
}
@keyframes mo-shimmer { from { background-position: 0% 0; } to { background-position: 100% 0; } }
.mo-lead { max-width: 36em; margin: 18px 0 12px; font-size: clamp(1.08rem, 2.2vw, 1.25rem); }
.mo-promise { max-width: 40em; margin: 0 0 26px; color: var(--muted); }
.mo-hero-ctas { justify-content: flex-start; }
.mo-hero-art { width: 100%; max-width: 520px; justify-self: center; }
.mo-hero-art { margin: 0; }
.mo-hero-art svg { display: block; width: 100%; height: auto; overflow: visible; }
.mo-hero-label { fill: var(--muted); font: 700 12px var(--font); }

/* How to play */
.mo-how {
  position: relative;
  padding: clamp(1.25rem, 3vw, 2rem);
  border: 1px solid var(--glass-border);
  border-radius: 22px;
  background: var(--glass);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  scroll-margin-top: 80px;
}
.mo-how::before { content: ""; position: absolute; inset: 0 0 auto; height: 4px; border-radius: 22px 22px 0 0; background: linear-gradient(90deg, #3FE0D0, var(--zap), var(--net), var(--push)); }
.mo-how h2 { margin: 0 0 16px; font-size: clamp(1.5rem, 3.5vw, 2rem); }
.mo-how-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 0; padding: 0; list-style: none; }
.mo-how-step { padding: 18px 18px 16px; border-radius: 16px; background: rgba(255, 255, 255, 0.04); }
.mo-how-step h3 { margin: 4px 0 6px; font-size: 1.2rem; }
.mo-how-step p { margin: 0; color: var(--muted); }
.mo-how-num { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--orange); color: var(--on-accent); font-weight: 800; box-shadow: 0 0 18px rgba(255, 138, 43, 0.6); }
.mo-how-tip { margin: 18px 0 0; }

/* ======= STICKY PROGRESS BAR ======= */
.mo-questbar {
  position: sticky; top: 0; z-index: 20;
  border-bottom: 1px solid var(--glass-border);
  background: rgba(10, 9, 8, 0.84);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}
.mo-questbar-inner { display: flex; align-items: center; gap: 8px 12px; min-height: 52px; padding-block: 6px; }
.mo-gauge { display: flex; align-items: center; gap: 8px; margin-right: auto; }
.mo-gauge svg { width: 58px; height: 33px; overflow: visible; }
#mo-needle { transition: x2 0.8s cubic-bezier(.2, 1.4, .4, 1), y2 0.8s cubic-bezier(.2, 1.4, .4, 1); }
#mo-gauge-arc { transition: stroke-dasharray 0.8s ease; }
.mo-gauge-num { color: var(--muted); font-weight: 800; font-size: 0.9rem; }
.mo-gauge.full svg { filter: drop-shadow(0 0 8px rgba(124, 255, 158, 0.7)); }
.mo-streak { color: #FFB86B; font-weight: 800; white-space: nowrap; }
.mo-bar-pill {
  display: inline-flex; align-items: center;
  min-height: 40px; padding: 6px 12px;
  border: 1px solid #9A6A58; border-radius: 999px;
  background: transparent; color: var(--ink); font-weight: 700; text-decoration: none; white-space: nowrap;
}
a.mo-bar-pill:hover, .mo-sound:hover { border-color: var(--orange); }
.mo-sound { gap: 6px; cursor: pointer; font-weight: 600; }
.mo-sound[aria-pressed="true"] { border-color: var(--orange); background: rgba(255, 138, 43, 0.12); }
@media (max-width: 599px) {
  .mo-sound-label { display: none; }
  .mo-questbar-inner { gap: 6px; flex-wrap: wrap; }
  .mo-bar-pill { padding: 6px 9px; }
  .mo-streak { order: 5; flex-basis: 100%; text-align: right; font-size: 0.85rem; }
  .mo-streak:empty { display: none; }
}

/* ======= LEVELS ======= */
.mo-level { padding-block: clamp(2.5rem, 6vw, 4.5rem); scroll-margin-top: 60px; }
.mo-level-alt {
  background: radial-gradient(ellipse 60% 40% at 10% 0%, rgba(255, 138, 43, 0.08), transparent 70%), radial-gradient(ellipse 50% 40% at 100% 100%, rgba(127, 208, 255, 0.07), transparent 70%), #0E0B0B;
  border-block: 1px solid var(--border);
}
.mo-level-head { margin-bottom: 28px; }
.mo-level-tag {
  display: inline-block; margin: 0 0 10px; padding: 4px 12px;
  border-radius: 999px; background: linear-gradient(90deg, #3FE0D0, var(--zap));
  color: #120A06; font-size: 0.8rem; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase;
}
.mo-level h2 { margin: 0 0 12px; font-size: clamp(1.9rem, 4.6vw, 2.9rem); }
.mo-intro { max-width: 46em; margin: 0; color: var(--muted); font-size: 1.1rem; }
.mo-intro strong { color: var(--ink); }

/* ======= GAME CARDS ======= */
.mo-game {
  position: relative;
  margin-top: 28px;
  padding: clamp(1.1rem, 3vw, 2rem);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  background: linear-gradient(160deg, rgba(40, 28, 24, 0.75), rgba(18, 14, 14, 0.88));
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
  scroll-margin-top: 64px;
}
.mo-game-head { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 20px; }
.mo-game-head h3 { margin: 0 0 4px; font-size: clamp(1.3rem, 3vw, 1.6rem); }
.mo-game-head p { max-width: 52em; margin: 0; color: var(--muted); }
.mo-game-icon { flex: none; display: grid; place-items: center; width: 52px; height: 52px; border-radius: 16px; background: rgba(255, 255, 255, 0.06); font-size: 1.6rem; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08); }
.mo-law-icon { background: radial-gradient(circle at 35% 30%, #FFF3C4, #FFB000 55%, #B87400); color: #3A2400; font-family: Georgia, "Times New Roman", serif; font-weight: 700; font-size: 1.2rem; border-radius: 50%; box-shadow: 0 0 18px rgba(255, 190, 60, 0.45); }
.mo-bigidea { margin-top: 22px; padding: 16px 18px; border-left: 4px solid var(--orange); border-radius: 0 14px 14px 0; background: rgba(255, 138, 43, 0.07); }
.mo-bigidea p { margin: 0; }

/* Lab layout: picture on the left, controls on the right */
.mo-lab { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: clamp(1rem, 3vw, 1.75rem); align-items: start; }
.mo-stage svg { display: block; width: 100%; height: auto; border-radius: 18px; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.07); }
.mo-svg-text { fill: var(--ink); font: 700 15px var(--font); }
.mo-arrow-label { font: 800 14px var(--font); paint-order: stroke; stroke: #0B0A10; stroke-width: 4px; }
.mo-crate-label { fill: #3A2010; font: 800 16px var(--font); }
.mo-tick { fill: #5A4E48; font: 600 12px var(--font); }
.mo-bonk { fill: #FFE14D; font: 900 28px var(--font-display); }
.mo-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 10px 0 0; padding: 0; list-style: none; color: var(--muted); font-size: 0.88rem; }
.mo-legend li::before { content: ""; display: inline-block; width: 18px; height: 5px; margin-right: 6px; border-radius: 3px; vertical-align: middle; }
.mo-key-push::before { background: var(--push); } .mo-key-fric::before { background: var(--fric); } .mo-key-net::before { background: var(--net); } .mo-key-grav::before { background: var(--grav); }
.mo-controls { display: flex; flex-direction: column; gap: 12px; }
.mo-slider { display: grid; grid-template-columns: 1fr 4em; gap: 4px 10px; align-items: center; }
.mo-slider label { grid-column: 1 / -1; font-weight: 700; }
.mo-slider output { text-align: right; font-variant-numeric: tabular-nums; color: var(--muted); font-weight: 700; }
.mo-slider input[type="range"] { width: 100%; height: 32px; margin: 0; background: transparent; cursor: pointer; -webkit-appearance: none; appearance: none; }
.mo-slider input::-webkit-slider-runnable-track { height: 10px; border-radius: 999px; background: linear-gradient(90deg, rgba(255, 255, 255, 0.12), var(--track, var(--push))); }
.mo-slider input::-moz-range-track { height: 10px; border-radius: 999px; background: linear-gradient(90deg, rgba(255, 255, 255, 0.12), var(--track, var(--push))); }
.mo-slider input::-webkit-slider-thumb { -webkit-appearance: none; width: 26px; height: 26px; margin-top: -8px; border: 3px solid #fff; border-radius: 50%; background: var(--track, var(--push)); box-shadow: 0 0 12px var(--track, var(--push)); }
.mo-slider input::-moz-range-thumb { width: 22px; height: 22px; border: 3px solid #fff; border-radius: 50%; background: var(--track, var(--push)); }
.mo-slider-b { --track: #4FA8FF; }
.mo-seg { display: flex; flex-wrap: wrap; gap: 6px; }
.mo-seg-btn, .mo-small-btn {
  min-height: 42px; padding: 6px 12px;
  border: 1px solid #6B5A54; border-radius: 999px;
  background: rgba(255, 255, 255, 0.03); color: var(--ink);
  font-size: 0.9rem; font-weight: 700; cursor: pointer;
  transition: border-color 0.2s, background-color 0.2s, transform 0.15s;
}
.mo-seg-btn:hover, .mo-small-btn:hover { border-color: var(--orange); }
.mo-seg-btn[aria-pressed="true"] { border-color: var(--orange); background: rgba(255, 138, 43, 0.16); }
.mo-row-btns { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.mo-check { display: inline-flex; align-items: center; gap: 8px; min-height: 42px; font-weight: 600; color: var(--muted); cursor: pointer; }
.mo-check input { width: 20px; height: 20px; accent-color: var(--orange); }
.mo-status { min-height: 3em; margin: 0; padding: 10px 12px; border-radius: 12px; background: rgba(255, 255, 255, 0.04); }
.mo-lane { margin: 0; padding: 10px 12px 12px; border: 1px solid var(--border); border-radius: 14px; display: grid; gap: 8px; }
.mo-lane legend { padding: 0 6px; font-weight: 800; }
.mo-race-controls .mo-seg-btn { font-size: 0.82rem; padding: 6px 10px; }
.mo-toggle {
  display: inline-flex; align-items: center; gap: 12px; align-self: flex-start;
  min-height: 48px; padding: 8px 18px 8px 10px;
  border: 1px solid #9A6A58; border-radius: 999px;
  background: rgba(124, 255, 158, 0.06); color: var(--ink); font-weight: 600; cursor: pointer;
}
.mo-toggle-track { position: relative; width: 46px; height: 26px; border-radius: 999px; background: #3A2622; transition: background-color 0.3s; }
.mo-toggle-knob { position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform 0.3s cubic-bezier(.2, 1.4, .4, 1); }
.mo-toggle[aria-pressed="true"] .mo-toggle-track { background: #2E9C52; box-shadow: 0 0 12px rgba(124, 255, 158, 0.5); }
.mo-toggle[aria-pressed="true"] .mo-toggle-knob { transform: translateX(20px); }

/* Discovery checklists */
.mo-finds { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.mo-finds li { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 12px; background: rgba(255, 255, 255, 0.04); transition: background-color 0.3s; }
.mo-check-dot { flex: none; display: grid; place-items: center; width: 24px; height: 24px; border: 2px solid #6B5A54; border-radius: 50%; font-size: 0.85rem; font-weight: 900; }
.mo-finds li.done { background: rgba(124, 255, 158, 0.10); }
.mo-finds li.done .mo-check-dot { border-color: var(--good); background: var(--good); color: #062010; }
.mo-finds li.done .mo-check-dot::before { content: "✓"; }

/* ======= QUIZ GAMES ======= */
.mo-scorebar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px; margin-bottom: 14px; color: var(--muted); }
.mo-scorebar strong { color: var(--ink); font-variant-numeric: tabular-nums; }
.mo-hearts { margin-left: auto; letter-spacing: 2px; }
.mo-card-stage { display: grid; place-items: center; min-height: 160px; margin-bottom: 16px; }
.mo-card {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  width: min(100%, 460px); padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.14); border-radius: 22px;
  background: linear-gradient(160deg, #2C211C, #171211);
  text-align: center; box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
}
.mo-card-emoji { font-size: 3rem; line-height: 1; }
.mo-card-text { margin: 0; font-size: 1.2rem; font-weight: 700; }
.mo-law-btns { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.mo-law-btn {
  display: flex; align-items: center; gap: 12px;
  min-height: 72px; padding: 10px 14px;
  border: 1px solid #6B5A54; border-radius: 16px;
  background: rgba(255, 255, 255, 0.03); color: var(--ink); text-align: left; cursor: pointer;
  transition: transform 0.15s, border-color 0.2s, box-shadow 0.2s;
}
.mo-law-btn:hover:not(:disabled) { transform: translateY(-2px); border-color: var(--orange); box-shadow: 0 0 18px rgba(255, 138, 43, 0.25); }
.mo-law-btn small { display: block; color: var(--muted); font-size: 0.82rem; font-weight: 500; }
.mo-law-btn:disabled, .mo-choice:disabled { cursor: default; opacity: 0.55; }
.mo-law-btn.right, .mo-choice.right { opacity: 1; border: 2px solid var(--good); box-shadow: 0 0 22px rgba(124, 255, 158, 0.35); }
.mo-law-btn.wrong, .mo-choice.wrong { opacity: 1; border: 2px dashed var(--bad); }
.mo-choices { display: grid; gap: 10px; }
.mo-choice {
  min-height: 52px; padding: 12px 16px;
  border: 1px solid #6B5A54; border-radius: 14px;
  background: rgba(255, 255, 255, 0.03); color: var(--ink); text-align: left; font-weight: 600; cursor: pointer;
  transition: transform 0.15s, border-color 0.2s;
}
.mo-choice:hover:not(:disabled) { transform: translateX(3px); border-color: var(--orange); }
.mo-net-stage svg { display: block; width: 100%; height: auto; margin-bottom: 14px; border-radius: 18px; }
.mo-feedback { min-height: 1.5em; margin: 12px 0 0; }
.mo-feedback.good { color: var(--good); }
.mo-feedback.bad { color: var(--bad); }
.mo-next-row { display: flex; justify-content: flex-end; margin-top: 10px; }
.mo-result { margin-top: 18px; padding: 22px; border-radius: 18px; background: rgba(255, 255, 255, 0.05); text-align: center; }
.mo-result p { margin: 0 0 10px; }
.mo-result-stars { font-size: 2.4rem; color: #FFD45A; letter-spacing: 6px; text-shadow: 0 0 18px rgba(255, 212, 90, 0.6); }
.mo-result-title { font-weight: 800; font-size: 1.2rem; }
.finished .mo-card-stage, .finished .mo-law-btns, .finished .mo-net-stage, .finished .mo-choices, .finished .mo-case, .finished > .mo-feedback { display: none; }
.mo-case {
  display: flex; align-items: flex-start; gap: 16px;
  margin-bottom: 16px; padding: 18px 20px;
  border: 1px solid rgba(255, 225, 77, 0.25); border-radius: 18px;
  background: linear-gradient(135deg, rgba(255, 225, 77, 0.08), rgba(255, 255, 255, 0.03));
  transition: border-color 0.4s, box-shadow 0.4s;
}

.mo-case-emoji { font-size: 2.6rem; line-height: 1; }
.mo-case-title { margin: 0 0 4px; color: #FFE38A; font-weight: 800; }
.mo-case-text { margin: 0; font-size: 1.1rem; }
.mo-hint { margin-top: 18px; }
.mo-hint summary, .mo-teacher summary { cursor: pointer; font-weight: 700; }
.mo-hint p { color: var(--muted); }

/* ======= FINISH ======= */
.mo-bigideas { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; counter-reset: idea; }
.mo-bigideas li { position: relative; padding: 16px 18px 16px 58px; border-radius: 16px; background: rgba(255, 255, 255, 0.04); counter-increment: idea; }
.mo-bigideas li::before { content: counter(idea); position: absolute; left: 16px; top: 14px; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--orange); color: var(--on-accent); font-weight: 900; box-shadow: 0 0 14px rgba(255, 138, 43, 0.5); }
.mo-badges-title { margin: 40px 0 14px; font-size: 1.4rem; }
.mo-badges { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; margin: 0; padding: 0; list-style: none; }
.mo-badge a { display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; padding: 16px 8px; border: 1px dashed #6B5A54; border-radius: 18px; color: var(--muted); text-align: center; text-decoration: none; transition: border-color 0.2s, transform 0.2s; }
.mo-badge a:hover { border-color: var(--orange); transform: translateY(-2px); }
.mo-badge-icon { display: grid; place-items: center; width: 58px; height: 58px; border-radius: 50%; background: rgba(255, 255, 255, 0.05); font-size: 1.7rem; font-weight: 800; }
.mo-badge-name { color: var(--ink); font-weight: 800; font-size: 0.95rem; }
.mo-badge-desc { font-size: 0.8rem; }
.mo-badge.is-earned a { border: 1px solid rgba(255, 212, 90, 0.55); background: radial-gradient(ellipse at 50% 0%, rgba(255, 212, 90, 0.14), transparent 70%); }
.mo-badge.is-earned .mo-badge-icon { background: radial-gradient(circle, #FFE9A8, #FF9F43); box-shadow: 0 0 22px rgba(255, 180, 70, 0.55); }
.mo-cert-wrap { margin-top: 28px; }
.mo-cert-locked { padding: 18px 20px; border-radius: 16px; background: rgba(255, 255, 255, 0.04); text-align: center; }
.mo-cert-locked p { margin: 0; }
.mo-cert { max-width: 720px; margin: 0 auto; padding: clamp(1.5rem, 5vw, 3rem); border-radius: 22px; background: #FFFBF3; color: #2A1A12; text-align: center; box-shadow: 0 0 0 6px #120A06, 0 0 0 10px #FF8A2B, 0 30px 60px rgba(0, 0, 0, 0.5); }
.mo-cert p { margin: 0 0 10px; }
.mo-cert-eyebrow { color: #8A3A10; font-size: 0.8rem; font-weight: 800; letter-spacing: 0.18em; text-transform: uppercase; }
.mo-cert-title { font-family: var(--font-display); font-size: clamp(2rem, 6vw, 3.2rem); line-height: 1.05; background: linear-gradient(90deg, #D9480F, #E2412F, #B87400); -webkit-background-clip: text; background-clip: text; color: transparent; }
.mo-cert-name { display: inline-block; padding: 0 18px 4px; border-bottom: 2px solid #D9C7B5; font-family: Georgia, "Times New Roman", serif; font-size: clamp(1.6rem, 5vw, 2.4rem); font-style: italic; }
.mo-cert-text, .mo-cert-date { color: #5A4436; }
.mo-cert-date { font-size: 0.9rem; }
.mo-cert-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px; margin-top: 20px; }
.mo-cert-actions label { font-weight: 700; }
.mo-cert-actions input { min-height: 48px; padding: 8px 14px; border: 1px solid #9A6A58; border-radius: 12px; background: var(--surface-2); color: var(--ink); font: inherit; }
.mo-reset-row { margin: 28px 0 0; color: var(--muted); font-size: 0.92rem; text-align: center; }
.mo-link-btn { min-height: 40px; padding: 4px 2px; border: 0; background: none; color: var(--orange); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.mo-teacher { margin-top: 32px; padding: 16px 20px; border: 1px solid var(--border); border-radius: 16px; background: rgba(255, 255, 255, 0.02); }
.mo-teacher h4 { margin: 18px 0 6px; }
.mo-teacher ul { margin: 0; padding-left: 1.2em; color: var(--muted); }
.mo-teacher li { margin-bottom: 6px; }
.mo-teacher strong { color: var(--ink); }
.mo-more { text-align: center; }
.mo-more h2 { margin: 0 0 20px; font-size: clamp(1.6rem, 4vw, 2.2rem); }

/* ======= LITTLE REACTIONS ======= */
.mo-pop { animation: mo-pop 0.45s cubic-bezier(.2, 1.6, .4, 1); }
@keyframes mo-pop { 0% { transform: scale(0.92); } 60% { transform: scale(1.06); } 100% { transform: scale(1); } }
.mo-shake { animation: mo-shake 0.35s; }
@keyframes mo-shake { 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }
.mo-feedback.good, .mo-feedback.bad { animation: mo-in 0.35s ease-out; }
@keyframes mo-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.mo-reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.7s ease, transform 0.7s ease; }
.mo-reveal.in { opacity: 1; transform: none; }

/* ======= ENERGY LAB PIECES ======= */
.mo-svg-small { fill: var(--ink); font: 700 12px var(--font); }
.mo-svg-mid { fill: var(--ink); font: 800 16px var(--font); }
.mo-svg-big { font: 900 26px var(--font-display); }
.mo-readout { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.mo-stat { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 12px; background: rgba(255, 255, 255, 0.045); }
.mo-stat-label { color: var(--muted); font-size: 0.78rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; }
.mo-stat-value { font-weight: 800; font-size: 1.05rem; }
.mo-stat-value.over { color: var(--bad); }
.mo-suspects { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.mo-suspect {
  min-height: 48px; padding: 8px 12px;
  border: 1px solid #6B5A54; border-radius: 14px;
  background: rgba(255, 255, 255, 0.03); color: var(--ink); font-weight: 700; text-align: left; cursor: pointer;
  transition: border-color 0.2s, transform 0.15s;
}
.mo-suspect:hover { border-color: var(--net); transform: translateY(-2px); }
.mo-suspect[aria-pressed="true"] { border-color: var(--net); background: rgba(255, 225, 77, 0.10); }
.mo-suspect.seen::after { content: " ✓"; color: var(--good); }
.mo-card-info { min-height: 6em; padding: 12px 14px; border-radius: 14px; background: rgba(255, 255, 255, 0.04); }
.mo-card-info p { margin: 0 0 6px; }
.mo-eff { color: var(--net); }
.mo-progress-line { margin: 0; color: var(--muted); font-weight: 700; }
.mo-flow-sparks { animation: mo-flow 1.2s linear infinite; }
@keyframes mo-flow { to { stroke-dashoffset: -50; } }
.mo-flow-band { transition: d 0.5s; }
.mo-bulb { transform-box: fill-box; transform-origin: center; filter: drop-shadow(0 0 4px #FFE14D); animation: mo-bulb 0.4s ease-out both; }
@keyframes mo-bulb { from { opacity: 0; transform: scale(0); } to { opacity: 1; transform: none; } }
.mo-lab-food { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.mo-pick-label { margin: 0; font-weight: 800; }
.mo-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.mo-tile {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  min-height: 72px; padding: 8px 6px;
  border: 1px solid #6B5A54; border-radius: 14px;
  background: rgba(255, 255, 255, 0.03); color: var(--ink); font-weight: 700; font-size: 0.88rem; cursor: pointer;
  transition: transform 0.15s, border-color 0.2s;
}
.mo-tile > span { font-size: 1.6rem; line-height: 1; }
.mo-tiles-sm .mo-tile { min-height: 60px; }
.mo-tiles-sm .mo-tile > span { font-size: 1.3rem; }
.mo-tile:hover { transform: translateY(-2px); border-color: var(--zap); }
.mo-tile[aria-pressed="true"] { border-color: var(--zap); background: rgba(124, 255, 158, 0.10); }
.mo-fuel-panel { align-self: stretch; padding: 18px 20px; border: 1px solid rgba(124, 255, 158, 0.3); border-radius: 18px; background: linear-gradient(160deg, rgba(124, 255, 158, 0.08), rgba(255, 255, 255, 0.02)); }
.mo-fuel-panel p { margin: 0 0 10px; }
.mo-fuel-empty { color: var(--muted); }
.mo-fuel-top { display: flex; align-items: center; gap: 14px; margin-bottom: 10px; }
.mo-fuel-emoji { font-size: 3rem; line-height: 1; }
.mo-fuel-name { font-family: var(--font-display); font-size: 1.3rem; margin: 0 0 4px !important; }
.mo-fuel-name small { font-family: var(--font); font-size: 0.85rem; color: var(--muted); }
.mo-fuel-num strong { color: var(--zap); }
.mo-fuel-power { font-size: 1.15rem; }
.mo-fuel-power strong { color: var(--net); }
.mo-gauge { height: 14px; margin: 4px 0 14px; border-radius: 999px; background: rgba(255, 255, 255, 0.08); overflow: hidden; }
.mo-gauge span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #3CCB5A, #7CFF9E, #FFE14D); box-shadow: 0 0 12px rgba(124, 255, 158, 0.6); transition: width 0.6s cubic-bezier(.2, 1.2, .4, 1); }
.mo-fuel-fact { color: var(--muted); }
.mo-fuel-fact strong { color: var(--ink); }
.mo-finds-row { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 14px; }
/* Form Finder */
.mo-form-btns { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.mo-form-btn {
  --c: #fff;
  display: flex; align-items: center; gap: 10px;
  min-height: 60px; padding: 8px 10px;
  border: 1px solid color-mix(in srgb, var(--c) 45%, transparent); border-radius: 14px;
  background: color-mix(in srgb, var(--c) 9%, #120E14); color: var(--ink); text-align: left; cursor: pointer;
  transition: transform 0.15s, box-shadow 0.2s;
}
.mo-form-btn:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 0 18px color-mix(in srgb, var(--c) 35%, transparent); }
.mo-form-btn small { display: block; color: var(--muted); font-size: 0.75rem; }
.mo-form-icon { flex: none; font-size: 1.4rem; }
.mo-form-btn:disabled { cursor: default; opacity: 0.55; }
.mo-form-btn.right { opacity: 1; border: 2px solid var(--good); box-shadow: 0 0 22px rgba(124, 255, 158, 0.35); }
.mo-form-btn.wrong { opacity: 1; border: 2px dashed var(--bad); }
/* Chain Reaction */
.mo-chain-title { margin: 0 0 12px; font-family: var(--font-display); font-size: 1.3rem; }
.mo-chain-slots { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 22px; margin: 0 0 16px; padding: 0; list-style: none; }
.mo-slot {
  position: relative;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  min-height: 108px; padding: 10px 8px;
  border: 2px dashed #6B5A54; border-radius: 16px;
  color: var(--muted); text-align: center; font-weight: 800;
}
.mo-slot + .mo-slot::before { content: "→"; position: absolute; left: -19px; top: 50%; transform: translateY(-50%); color: var(--net); font-weight: 900; }
.mo-slot.filled { border: 2px solid var(--zap); background: rgba(124, 255, 158, 0.08); color: var(--ink); }
.mo-slot-icon { font-size: 1.8rem; }
.mo-slot-text { font-size: 0.9rem; }
.mo-slot-form { color: var(--net); font-size: 0.78rem; font-weight: 700; }
.mo-chain-pool { display: flex; flex-wrap: wrap; gap: 8px; }
.mo-step {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 48px; padding: 8px 14px;
  border: 1px solid #6B5A54; border-radius: 999px;
  background: rgba(255, 255, 255, 0.04); color: var(--ink); font-weight: 700; cursor: pointer;
  transition: transform 0.15s, border-color 0.2s;
}
.mo-step:hover { transform: translateY(-2px); border-color: var(--net); }
.mo-case.solved { border-color: var(--good); box-shadow: 0 0 30px rgba(124, 255, 158, 0.18); }
.mo-cert-battery { display: flex; justify-content: center; gap: 6px; margin: 16px 0 12px !important; }
.mo-cert-battery span { width: 30px; height: 40px; border-radius: 5px; background: linear-gradient(180deg, #8CF0A8, #2E9C52); box-shadow: 0 0 0 2px #2A1A12; }
@media (max-width: 899px) { .mo-lab-food { grid-template-columns: 1fr; } .mo-form-btns { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) {
  .mo-chain-slots { grid-auto-flow: row; grid-auto-columns: auto; gap: 18px; }
  .mo-slot + .mo-slot::before { content: "↓"; left: 50%; top: -17px; transform: translateX(-50%); }
  .mo-slot { min-height: 64px; flex-direction: row; }
  .mo-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mo-suspects, .mo-readout, .mo-finds-row { grid-template-columns: 1fr; }
  .mo-svg-small { font-size: 18px; } .mo-svg-mid { font-size: 22px; }
}

.mo-key-ke::before { background: var(--push); } .mo-key-pe::before { background: var(--grav); } .mo-key-heat::before { background: var(--fric); } .mo-key-total::before { background: var(--net); }
@media (max-width: 640px) { .mo-bar-label { display: none; } }

/* ======= SPEED & REACTION PIECES ======= */
.mo-hero-label { fill: var(--muted); font: 700 12px var(--font); }
.mo-hero-speed { fill: #3FE0D0; font: 900 18px var(--font-display); }
.mo-lab-wide { grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); }
.mo-react-col { display: flex; flex-direction: column; gap: 12px; }
.mo-pad {
  display: grid; place-items: center;
  width: 100%; min-height: 260px;
  border: 0; border-radius: 22px;
  color: #120A06; font-family: var(--font-display); font-size: clamp(1.3rem, 3.5vw, 2rem);
  cursor: pointer; user-select: none; -webkit-user-select: none; touch-action: manipulation;
  transition: background-color 0.08s, box-shadow 0.2s, transform 0.08s;
}
.mo-pad:active { transform: scale(0.99); }
.mo-pad-idle, .mo-pad-result { background: #2A2230; color: var(--ink); box-shadow: inset 0 0 0 2px #6B5A54; }
.mo-pad-result { box-shadow: inset 0 0 0 2px #3FE0D0, 0 0 30px rgba(63, 224, 208, 0.25); }
.mo-pad-wait { background: #C0392B; color: #fff; }
.mo-pad-go { background: #2ECC71; box-shadow: 0 0 40px rgba(46, 204, 113, 0.6); }
.mo-pad-early { background: #3A2622; color: var(--ink); box-shadow: inset 0 0 0 2px var(--bad); }
.mo-pad-decoy-y { background: #F1C40F; } .mo-pad-decoy-b { background: #3498DB; color: #fff; } .mo-pad-decoy-p { background: #9B59B6; color: #fff; }
.mo-tries { display: flex; flex-wrap: wrap; gap: 6px; min-height: 36px; margin: 0; padding: 0; list-style: none; }
.mo-try { padding: 6px 10px; border-radius: 999px; background: rgba(255, 255, 255, 0.06); font-weight: 800; font-variant-numeric: tabular-nums; font-size: 0.9rem; }
.mo-try.fast { color: #7CFF9E; } .mo-try.ok { color: #FFE14D; } .mo-try.slow { color: #FFB86B; }
.mo-speed-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.mo-speed-btn, .mo-pedal {
  min-height: 52px; padding: 8px 12px;
  border: 1px solid #6B5A54; border-radius: 14px;
  background: rgba(255, 255, 255, 0.03); color: var(--ink); font-weight: 800; cursor: pointer;
  transition: border-color 0.2s, transform 0.1s, background-color 0.2s;
}
.mo-speed-btn[aria-pressed="true"] { border-color: #3FE0D0; background: rgba(63, 224, 208, 0.12); }
.mo-pedals { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mo-pedal { min-height: 80px; font-size: 1.1rem; user-select: none; -webkit-user-select: none; touch-action: none; }
.mo-pedal small { display: block; color: var(--muted); font-weight: 600; font-size: 0.75rem; }
.mo-pedal-gas { border-color: rgba(124, 255, 158, 0.5); }
.mo-pedal-brake { border-color: rgba(255, 90, 110, 0.5); }
.mo-pedal.down { transform: translateY(3px) scale(0.98); }
.mo-pedal-gas.down { background: rgba(124, 255, 158, 0.18); box-shadow: 0 0 20px rgba(124, 255, 158, 0.35); }
.mo-pedal-brake.down { background: rgba(255, 90, 110, 0.18); box-shadow: 0 0 20px rgba(255, 90, 110, 0.35); }
.mo-seg-btn small { display: block; color: var(--muted); font-size: 0.72rem; font-weight: 600; }
.mo-key-react::before { background: #FFB86B; } .mo-key-brake::before { background: #FF5A6E; }
.mo-brake-btn {
  min-height: 56px; min-width: 140px; padding: 8px 22px;
  border: 0; border-radius: 999px;
  background: #E2412F; color: #fff; font-family: var(--font-display); font-size: 1.3rem; letter-spacing: 0.04em; cursor: pointer;
  box-shadow: 0 6px 0 #8A2016, 0 0 24px rgba(226, 65, 47, 0.45);
  touch-action: manipulation;
}
.mo-brake-btn:active:not(:disabled) { transform: translateY(4px); box-shadow: 0 2px 0 #8A2016; }
.mo-brake-btn:disabled { opacity: 0.4; cursor: default; box-shadow: none; }
#mo-cw-ball.rolling { animation: mo-roll 0.5s linear infinite; transform-box: fill-box; transform-origin: center; }
@keyframes mo-roll { to { rotate: 360deg; } }
.mo-reader-stage svg { display: block; width: 100%; height: auto; margin-bottom: 14px; border-radius: 18px; }
.mo-draw { stroke-dasharray: 1400; stroke-dashoffset: 1400; animation: mo-draw 1.1s ease-out forwards; }
@keyframes mo-draw { to { stroke-dashoffset: 0; } }
.mo-line-slots { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 22px; margin: 0 0 16px; padding: 0; list-style: none; }
.mo-line-pool { display: flex; flex-wrap: wrap; gap: 8px; }
.mo-slot-speed { color: #3FE0D0; font-size: 0.78rem; font-weight: 700; }
.mo-case.solved { border-color: var(--good); box-shadow: 0 0 30px rgba(124, 255, 158, 0.18); }
.mo-cert-react { color: #0E8C82; font-weight: 800; }
@media (max-width: 899px) { .mo-lab-wide { grid-template-columns: 1fr; } }
@media (max-width: 640px) {
  .mo-line-slots { grid-auto-flow: row; grid-auto-columns: auto; gap: 18px; }
  .mo-pad { min-height: 200px; }
  .mo-hero-label { font-size: 16px; }
}

/* ======= POP-UP + CONFETTI LAYER ======= */
.mo-toast {
  position: fixed; left: 50%; top: 14px; z-index: 60;
  display: flex; align-items: center; gap: 12px;
  max-width: min(92vw, 460px); padding: 12px 18px 12px 12px;
  border: 1px solid rgba(255, 212, 90, 0.6); border-radius: 18px;
  background: rgba(24, 18, 16, 0.96);
  box-shadow: 0 0 30px rgba(255, 180, 70, 0.35), 0 18px 40px rgba(0, 0, 0, 0.5);
  color: var(--ink);
  transform: translate(-50%, -140%); opacity: 0; pointer-events: none;
  transition: transform 0.5s cubic-bezier(.2, 1.4, .4, 1), opacity 0.3s;
}
.mo-toast.show { transform: translate(-50%, 0); opacity: 1; }
.mo-toast:empty { display: none; }
.mo-toast-icon { display: grid; place-items: center; flex: none; width: 46px; height: 46px; border-radius: 50%; background: radial-gradient(circle, #FFE9A8, #FF9F43); color: #3A2400; font-family: Georgia, serif; font-weight: 700; font-size: 1.4rem; }
.mo-toast-body { display: flex; flex-direction: column; }
.mo-toast-body span { color: var(--muted); font-size: 0.9rem; }
.mo-fx { position: fixed; inset: 0; z-index: 55; width: 100vw; height: 100vh; pointer-events: none; }

/* ======= TABLETS ======= */
@media (max-width: 899px) {
  .mo-hero-inner { grid-template-columns: 1fr; }
  .mo-hero-art { max-width: 460px; }
  .mo-lab { grid-template-columns: 1fr; }
  .mo-badges { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
/* ======= PHONES ======= */
@media (max-width: 640px) {
  .mo-how-steps, .mo-bigideas, .mo-law-btns { grid-template-columns: 1fr; }
  .mo-badges { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mo-game-head { flex-direction: column; gap: 10px; }
  .mo-game-icon { width: 44px; height: 44px; font-size: 1.35rem; }
  .mo-hero-ctas { flex-direction: column; align-items: stretch; }
  .mo-law-btn { min-height: 60px; }
  /* The pictures shrink on phones, so their labels get bigger to stay readable. */
  .mo-arrow-label { font-size: 21px; }
  .mo-svg-text { font-size: 22px; }
  .mo-tick { font-size: 18px; }
}
@media (max-width: 379px) {
  .mo-bar-pill { padding: 5px 8px; font-size: 0.85rem; min-height: 38px; }
}

/* ======= REDUCED MOTION: everything holds still ======= */
@media (prefers-reduced-motion: reduce) {
  .mo-page *, .mo-page *::before, .mo-page *::after, .mo-toast { animation: none !important; transition: none !important; }
}

/* ======= PRINT: only the certificate when "Print certificate" is pressed ======= */
@media print {
  body.mo-print-cert * { visibility: hidden; }
  body.mo-print-cert .mo-cert, body.mo-print-cert .mo-cert * { visibility: visible; }
  body.mo-print-cert .mo-cert { position: absolute; left: 0; top: 0; width: 100%; box-shadow: none; border: 6px double #FF8A2B; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
