:root {
  color-scheme: dark;
  --bg: #020711;
  --bg-deep: #00040c;
  --panel: #07162c;
  --panel-soft: rgba(7, 22, 44, .9);
  --line: rgba(75, 178, 255, .33);
  --line-bright: rgba(61, 225, 255, .74);
  --white: #f6fbff;
  --muted: #a9bdd7;
  --cyan: #27e4ff;
  --blue: #348cff;
  --purple: #b16cff;
  --pink: #ff4f9a;
  --yellow: #ffd34d;
  --green: #53efae;
  --red: #ff526f;
  --max: 1220px;
  --radius: 24px;
  --shadow: 0 28px 90px rgba(0, 0, 0, .48);
  --pixel: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  color: var(--white);
  background:
    radial-gradient(circle at 85% 8%, rgba(87, 57, 215, .22), transparent 32rem),
    radial-gradient(circle at 10% 27%, rgba(0, 198, 255, .14), transparent 28rem),
    linear-gradient(180deg, #020610 0%, #06132a 48%, #020610 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(45, 143, 239, .08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(45, 143, 239, .08) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(#000 0 80%, transparent 100%);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: .14;
  background-image: radial-gradient(circle, #fff 0 1px, transparent 1.3px);
  background-size: 82px 82px;
}

img { display: block; max-width: 100%; }
a, button { -webkit-tap-highlight-color: transparent; }
button { font: inherit; }

.site-width { width: min(calc(100% - 2rem), var(--max)); margin-inline: auto; }

.skip-link {
  position: fixed;
  top: -5rem;
  left: 1rem;
  z-index: 200;
  padding: .75rem 1rem;
  border-radius: .6rem;
  color: #001018;
  background: #fff;
  font-weight: 900;
}
.skip-link:focus { top: 1rem; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  padding: .62rem 0;
  border-bottom: 1px solid rgba(75, 178, 255, .18);
  background: rgba(1, 6, 16, .86);
  backdrop-filter: blur(18px);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand {
  width: min(560px, 66vw);
  padding: .28rem .46rem;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 0 28px rgba(39, 228, 255, .13);
}
.brand img { width: 100%; height: auto; }
.header-actions { display: flex; align-items: center; gap: .55rem; }
.icon-button, .mini-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  min-height: 42px;
  padding: .55rem .82rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--white);
  background: rgba(7, 24, 50, .92);
  text-decoration: none;
  font-weight: 900;
  cursor: pointer;
}
.icon-button[aria-pressed="true"] { border-color: var(--green); color: var(--green); box-shadow: 0 0 18px rgba(83, 239, 174, .18); }
.mini-button { border-color: rgba(39, 228, 255, .58); color: #06111a; background: var(--cyan); }

.kicker, .pixel-label, .hud-small {
  font-family: var(--pixel);
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.kicker {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  margin: 0 0 .85rem;
  color: var(--cyan);
  font-size: .8rem;
}
.kicker::before { content: ""; width: 2.1rem; height: 2px; background: currentColor; box-shadow: 0 0 12px currentColor; }

h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { line-height: 1.03; text-wrap: balance; }

.primary-button, .ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  padding: .9rem 1.3rem;
  border: 1px solid rgba(39, 228, 255, .72);
  border-radius: 999px;
  color: #00131d;
  background: linear-gradient(135deg, #55efff, #6aa6ff 56%, #ba76ff);
  box-shadow: 0 12px 34px rgba(39, 151, 255, .22), inset 0 1px rgba(255,255,255,.5);
  text-decoration: none;
  font-weight: 950;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}
.primary-button:hover, .primary-button:focus-visible,
.ghost-button:hover, .ghost-button:focus-visible {
  transform: translateY(-2px);
  filter: brightness(1.08);
  outline: none;
}
.primary-button:active, .ghost-button:active { transform: translateY(0) scale(.985); }
.ghost-button {
  color: #eaf6ff;
  border-color: var(--line);
  background: rgba(7, 24, 50, .88);
  box-shadow: none;
}

.hero { padding: clamp(2.3rem, 7vw, 6rem) 0 clamp(3rem, 8vw, 6.5rem); }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, .78fr) minmax(500px, 1.22fr);
  align-items: center;
  gap: clamp(2rem, 5vw, 5rem);
}
.hero h1 {
  margin-bottom: 1rem;
  font-size: clamp(3.2rem, 7.3vw, 6.7rem);
  letter-spacing: -.068em;
}
.hero h1 span {
  display: block;
  color: transparent;
  background: linear-gradient(100deg, #fff 0%, #55edff 48%, #b476ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  filter: drop-shadow(0 0 30px rgba(39, 228, 255, .17));
}
.hero-lead { max-width: 38rem; color: var(--muted); font-size: clamp(1.08rem, 2vw, 1.3rem); }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.4rem; }
.hero-badges { display: flex; flex-wrap: wrap; gap: .55rem; margin-top: 1.2rem; }
.hero-badges span {
  padding: .42rem .7rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #c5d8ef;
  background: rgba(7, 24, 50, .7);
  font-family: var(--pixel);
  font-size: .73rem;
  font-weight: 900;
}

.hero-machine {
  position: relative;
  padding: .8rem .8rem 1.45rem;
  border: 1px solid rgba(72, 182, 255, .55);
  border-radius: 32px 32px 58px 58px;
  background: linear-gradient(145deg, rgba(10, 36, 72, .95), rgba(2, 9, 22, .98));
  box-shadow: var(--shadow), 0 0 70px rgba(74, 93, 255, .16), inset 0 1px rgba(255,255,255,.06);
  transform: perspective(1100px) rotateY(-3deg) rotateX(1deg);
}
.hero-machine::before {
  content: "";
  position: absolute;
  inset: 10% -8% -8% 8%;
  z-index: -1;
  background: radial-gradient(circle, rgba(39, 228, 255, .23), transparent 68%);
  filter: blur(42px);
}
.cabinet-top {
  margin: 0 .7rem .65rem;
  padding: .52rem .8rem;
  border: 1px solid rgba(177, 108, 255, .48);
  border-radius: 12px;
  color: #ecdcff;
  background: rgba(81, 44, 138, .22);
  font-family: var(--pixel);
  font-weight: 950;
  letter-spacing: .12em;
  text-align: center;
  text-shadow: 0 0 12px rgba(177, 108, 255, .7);
}
.cabinet-top span { color: var(--cyan); }
.cabinet-screen {
  position: relative;
  overflow: hidden;
  border: 5px solid #020713;
  border-radius: 22px;
  background: #020713;
  box-shadow: inset 0 0 0 1px rgba(71, 180, 255, .72), 0 0 28px rgba(39, 228, 255, .16);
}
.cabinet-screen img { width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.scanlines, .crt-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(to bottom, transparent 0 3px, rgba(0,0,0,.18) 3px 5px);
  mix-blend-mode: multiply;
  opacity: .42;
}
.screen-label {
  position: absolute;
  left: 1rem;
  bottom: 1rem;
  padding: .42rem .66rem;
  border: 1px solid rgba(39, 228, 255, .55);
  border-radius: 7px;
  color: var(--cyan);
  background: rgba(0, 8, 18, .85);
  font-family: var(--pixel);
  font-size: .72rem;
  font-weight: 950;
  letter-spacing: .12em;
}
.cabinet-controls { display: flex; align-items: flex-end; justify-content: flex-end; gap: 1rem; height: 62px; padding: .75rem 1.3rem 0; }
.joystick { position: relative; width: 45px; height: 15px; border-radius: 50%; background: #162c4b; box-shadow: inset 0 2px #2a4e78; }
.joystick::before { content: ""; position: absolute; left: 18px; bottom: 8px; width: 9px; height: 34px; border-radius: 8px; background: #aebfd2; transform: rotate(-10deg); }
.joystick::after { content: ""; position: absolute; left: 10px; bottom: 35px; width: 28px; height: 28px; border-radius: 50%; background: var(--pink); box-shadow: 0 0 14px rgba(255,79,154,.55); }
.cabinet-button { width: 31px; height: 14px; border-radius: 50%; box-shadow: 0 0 14px currentColor; }
.cabinet-button.one { color: var(--cyan); background: var(--cyan); }
.cabinet-button.two { color: var(--purple); background: var(--purple); }

.experience-intro { padding: 0 0 clamp(3rem, 7vw, 6rem); }
.intro-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.intro-grid article {
  min-height: 235px;
  padding: 1.35rem;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: linear-gradient(145deg, rgba(8, 29, 60, .85), rgba(3, 13, 30, .9));
  box-shadow: inset 0 1px rgba(255,255,255,.035);
}
.step-number { display: block; margin-bottom: 1.5rem; color: var(--cyan); font-family: var(--pixel); font-size: 1.2rem; font-weight: 950; }
.intro-grid h2 { margin-bottom: .65rem; font-size: clamp(1.5rem, 2.4vw, 2.1rem); }
.intro-grid p { margin-bottom: 0; color: var(--muted); }

.arcade-section { padding: clamp(3.5rem, 8vw, 7rem) 0; scroll-margin-top: 90px; }
.section-heading { max-width: 760px; margin-bottom: 1.5rem; }
.section-heading h2, .capability-copy h2, .final-cta h2 { margin-bottom: .85rem; font-size: clamp(2.2rem, 5vw, 4.6rem); letter-spacing: -.052em; }
.section-heading > p:last-child, .capability-copy > p:last-child { color: var(--muted); font-size: 1.08rem; }

.arcade-shell {
  overflow: hidden;
  border: 1px solid rgba(76, 180, 255, .55);
  border-radius: 30px;
  background: #030b1a;
  box-shadow: var(--shadow), 0 0 75px rgba(54, 115, 255, .13), inset 0 0 0 4px rgba(0, 0, 0, .4);
}
.arcade-hud {
  display: grid;
  grid-template-columns: minmax(120px, .75fr) minmax(220px, 1.5fr) minmax(120px, .75fr);
  align-items: center;
  gap: 1rem;
  min-height: 74px;
  padding: .75rem 1.15rem;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(10, 35, 69, .97), rgba(5, 20, 43, .97));
}
.hud-small { display: block; color: #7fa4c8; font-size: .64rem; }
.arcade-hud strong { color: var(--cyan); font-family: var(--pixel); font-size: .92rem; }
.hud-score { text-align: right; }
.hud-score strong { color: var(--yellow); }
.hud-progress { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: .65rem; color: var(--muted); font-family: var(--pixel); font-size: .72rem; font-weight: 900; }
.hud-progress-track { height: 12px; overflow: hidden; border: 1px solid rgba(103, 188, 255, .36); border-radius: 999px; background: #010713; }
.hud-progress-track span { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--cyan), var(--purple)); box-shadow: 0 0 18px rgba(39, 228, 255, .45); transition: width .4s ease; }

.arcade-stage { position: relative; overflow: hidden; width: 100%; aspect-ratio: 16 / 9; min-height: 360px; background: #020813; isolation: isolate; }
#gameCanvas { display: block; width: 100%; height: 100%; object-fit: contain; background: #020813; image-rendering: pixelated; touch-action: pan-y; }
.crt-overlay { z-index: 4; opacity: .26; }
.arcade-stage::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  border-radius: 0;
  box-shadow: inset 0 0 60px rgba(0,0,0,.55), inset 0 0 0 2px rgba(72,180,255,.12);
}

.stage-overlay {
  position: absolute;
  inset: 0;
  z-index: 12;
  display: none;
  place-items: center;
  padding: clamp(.8rem, 3vw, 2rem);
  background:
    radial-gradient(circle at 70% 25%, rgba(110, 75, 255, .2), transparent 28rem),
    linear-gradient(135deg, rgba(1, 6, 15, .96), rgba(4, 19, 41, .95));
}
.stage-overlay.active { display: grid; animation: overlayIn .35s ease both; }
@keyframes overlayIn { from { opacity: 0; transform: scale(1.012); } to { opacity: 1; transform: scale(1); } }
.overlay-card { width: min(100%, 950px); }
.welcome-card { max-width: 760px; text-align: center; }
.pixel-label { margin-bottom: .7rem; color: var(--cyan); font-size: .72rem; text-shadow: 0 0 14px rgba(39,228,255,.56); }
.overlay-card h3 { margin-bottom: .8rem; font-size: clamp(2.3rem, 5.5vw, 5.1rem); letter-spacing: -.055em; }
.overlay-card > p { color: var(--muted); font-size: clamp(1rem, 2vw, 1.2rem); }
.level-strip { display: flex; flex-wrap: wrap; justify-content: center; gap: .55rem; margin: 1.3rem 0 1.55rem; }
.level-strip span, .level-goals span, .result-facts span {
  padding: .45rem .7rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #d7e7fa;
  background: rgba(7, 29, 60, .78);
  font-family: var(--pixel);
  font-size: .7rem;
  font-weight: 900;
}
.level-card { display: grid; grid-template-columns: minmax(0, .92fr) minmax(380px, 1.08fr); align-items: center; gap: clamp(1.2rem, 4vw, 3rem); }
.level-card-copy > p:not(.pixel-label) { color: var(--muted); font-size: 1.05rem; }
.level-goals { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1.1rem 0 1.4rem; }
.level-preview { margin: 0; overflow: hidden; border: 1px solid var(--line-bright); border-radius: 22px; background: #06142c; box-shadow: 0 22px 55px rgba(0,0,0,.36), 0 0 30px rgba(39,228,255,.1); transform: rotate(1.5deg); }
.level-preview img { width: 100%; aspect-ratio: 16 / 8; object-fit: cover; }
.level-preview figcaption { padding: .58rem .75rem; color: var(--cyan); background: #061124; font-family: var(--pixel); font-size: .68rem; font-weight: 900; text-transform: uppercase; }
.result-card { max-width: 760px; text-align: center; }
.result-card h3 { font-size: clamp(2.1rem, 5vw, 4.6rem); }
.result-facts { display: flex; flex-wrap: wrap; justify-content: center; gap: .55rem; margin: 1.15rem 0 1.5rem; }
.finish-card { max-width: 1000px; text-align: center; }
.finish-card h3 { font-size: clamp(2.4rem, 5.6vw, 5.3rem); }
.finish-lead { color: #e6f7ff !important; font-size: clamp(1.15rem, 2.4vw, 1.55rem) !important; }
.finish-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: .75rem; margin: 1.3rem 0 1.5rem; text-align: left; }
.finish-grid article { padding: .9rem; border: 1px solid var(--line); border-radius: 16px; background: rgba(7, 28, 58, .76); }
.finish-grid strong { display: block; margin-bottom: .3rem; color: var(--cyan); font-family: var(--pixel); font-size: .78rem; text-transform: uppercase; }
.finish-grid span { color: var(--muted); font-size: .85rem; }
.finish-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: .7rem; }

.game-toast {
  position: absolute;
  top: 1rem;
  left: 50%;
  z-index: 11;
  max-width: min(90%, 640px);
  padding: .6rem .9rem;
  border: 1px solid var(--line-bright);
  border-radius: 999px;
  color: #f2fbff;
  background: rgba(1, 11, 27, .91);
  box-shadow: 0 0 28px rgba(39,228,255,.2);
  font-family: var(--pixel);
  font-size: .72rem;
  font-weight: 900;
  text-align: center;
  transform: translate(-50%, -150%);
  opacity: 0;
  transition: transform .22s ease, opacity .22s ease;
}
.game-toast.show { transform: translate(-50%, 0); opacity: 1; }
.game-toast.good { border-color: var(--green); color: var(--green); }
.game-toast.warn { border-color: var(--yellow); color: var(--yellow); }
.game-toast.bad { border-color: var(--red); color: #ffb8c4; }

.lesson-console {
  position: absolute;
  left: 50%;
  bottom: .85rem;
  z-index: 10;
  display: grid;
  grid-template-columns: minmax(145px, auto) minmax(0, 1fr);
  align-items: center;
  gap: .9rem;
  width: min(calc(100% - 1.5rem), 820px);
  min-height: 78px;
  padding: .72rem .95rem;
  border: 1px solid rgba(39, 228, 255, .58);
  border-radius: 14px;
  background: linear-gradient(90deg, rgba(4, 25, 48, .94), rgba(5, 13, 31, .95));
  box-shadow: 0 10px 30px rgba(0,0,0,.42), 0 0 24px rgba(39,228,255,.12);
  transform: translateX(-50%);
  pointer-events: none;
}
.lesson-console.good { border-top-color: var(--green); }
.lesson-console.warn { border-top-color: var(--yellow); }
.lesson-console.bad { border-top-color: var(--red); }
.lesson-console-label {
  color: var(--cyan);
  font-family: var(--pixel);
  font-size: .62rem;
  font-weight: 950;
  letter-spacing: .08em;
}
.lesson-console strong {
  display: block;
  color: #fff;
  font-size: .98rem;
}
.lesson-console p {
  margin: .18rem 0 0;
  color: var(--muted);
  font-size: .83rem;
  line-height: 1.35;
}

.game-info-bar {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 1rem;
  min-height: 66px;
  padding: .72rem 1.1rem;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(7, 26, 54, .98), rgba(3, 12, 28, .98));
}
.game-objective strong { display: block; color: #e9f5ff; font-size: .9rem; }
.game-stat { color: var(--yellow); font-family: var(--pixel); font-size: .76rem; font-weight: 950; text-align: right; }
.game-info-actions { display: flex; align-items: center; justify-content: flex-end; gap: .75rem; }
.skip-level-button {
  min-height: 38px;
  padding: .5rem .78rem;
  border: 1px solid rgba(255, 211, 77, .68);
  border-radius: 999px;
  color: #fff3b7;
  background: rgba(83, 55, 0, .72);
  font-family: var(--pixel);
  font-size: .65rem;
  font-weight: 950;
  cursor: pointer;
}
.skip-level-button:hover, .skip-level-button:focus-visible { background: rgba(123, 82, 0, .88); border-color: var(--yellow); }

.mobile-controls {
  display: none;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 1rem;
  padding: .85rem;
  border-top: 1px solid var(--line);
  background: #020918;
  touch-action: pan-y;
}
.control-cluster { display: grid; gap: .45rem; }
.movement-controls { grid-template-columns: repeat(4, minmax(52px, 72px)); }
.action-controls { grid-template-columns: minmax(88px, 118px); }
.control-button {
  min-height: 56px;
  border: 1px solid rgba(77, 185, 255, .55);
  border-radius: 15px;
  color: var(--cyan);
  background: linear-gradient(180deg, rgba(14, 47, 91, .98), rgba(5, 20, 44, .98));
  box-shadow: inset 0 1px rgba(255,255,255,.06), 0 5px 0 #01040a;
  font-family: var(--pixel);
  font-size: 1rem;
  font-weight: 950;
  user-select: none;
  touch-action: none;
}
.control-button.action { color: #17051f; border-color: rgba(177,108,255,.7); background: linear-gradient(180deg, #d48bff, #994fff); }
.control-button.active, .control-button:active { transform: translateY(4px); box-shadow: inset 0 1px rgba(255,255,255,.08), 0 1px 0 #01040a; filter: brightness(1.15); }
.control-button[hidden] { display: none; }
.desktop-controls { padding: .58rem 1rem; border-top: 1px solid rgba(75,178,255,.13); color: #7896b8; background: #010610; font-family: var(--pixel); font-size: .66rem; text-align: center; }

.capability-section { padding: clamp(4rem, 9vw, 8rem) 0; }
.capability-grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(520px, 1.1fr); gap: clamp(2rem, 5vw, 5rem); align-items: center; }
.capability-panels { display: grid; grid-template-columns: repeat(2, 1fr); gap: .8rem; }
.capability-panels article { min-height: 190px; padding: 1.1rem; border: 1px solid var(--line); border-radius: 20px; background: linear-gradient(145deg, rgba(8, 30, 61, .87), rgba(3, 13, 30, .93)); }
.capability-panels article:nth-child(2), .capability-panels article:nth-child(3) { border-color: rgba(177,108,255,.35); }
.capability-panels span { display: block; margin-bottom: 1.25rem; color: var(--cyan); font-family: var(--pixel); font-weight: 950; }
.capability-panels strong { display: block; margin-bottom: .4rem; font-size: 1.1rem; }
.capability-panels p { margin: 0; color: var(--muted); font-size: .92rem; }

.final-cta { padding: 0 0 clamp(4rem, 8vw, 7rem); }
.cta-card { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 1.5rem; padding: clamp(1.4rem, 4vw, 2.8rem); border: 1px solid rgba(39,228,255,.48); border-radius: 28px; background: radial-gradient(circle at 85% 20%, rgba(177,108,255,.2), transparent 18rem), linear-gradient(145deg, rgba(9, 35, 69, .94), rgba(3, 12, 28, .97)); box-shadow: 0 24px 70px rgba(0,0,0,.34); }
.cta-card h2 { margin-bottom: 0; font-size: clamp(2rem, 4.5vw, 4rem); }

.site-footer { padding: 1.5rem 0 2.2rem; border-top: 1px solid rgba(75,178,255,.17); color: #819dbc; font-size: .82rem; }
.footer-inner { display: flex; justify-content: space-between; gap: 1rem; }
.footer-inner p { margin: 0; }
.noscript { margin: 1rem auto; width: min(calc(100% - 2rem), var(--max)); padding: 1rem; border: 1px solid var(--yellow); border-radius: 14px; color: #fff0b2; background: rgba(85,58,0,.52); }

@media (pointer: coarse), (max-width: 860px) {
  .mobile-controls { display: grid; }
  .desktop-controls { display: none; }
}

@media (max-width: 1020px) {
  .hero-grid, .capability-grid { grid-template-columns: 1fr; }
  .hero-copy { text-align: center; }
  .hero-lead { margin-inline: auto; }
  .hero-actions, .hero-badges { justify-content: center; }
  .hero-machine { width: min(100%, 760px); margin-inline: auto; transform: none; }
  .intro-grid { grid-template-columns: 1fr; }
  .intro-grid article { min-height: 0; }
  .level-card { grid-template-columns: 1fr; }
  .level-preview { display: none; }
  .finish-grid { grid-template-columns: repeat(2, 1fr); }
  .capability-copy { max-width: 760px; }
}

@media (max-width: 720px) {
  .site-width { width: min(calc(100% - 1rem), var(--max)); }
  .site-header { padding: .38rem 0; }
  .brand { width: min(76vw, 420px); padding: .2rem .3rem; border-radius: 7px; }
  .desktop-label { display: none; }
  .icon-button, .mini-button { min-height: 38px; padding: .45rem .65rem; }
  .hero { padding-top: 1.4rem; }
  .hero h1 { font-size: clamp(3rem, 16vw, 5rem); }
  .hero-actions { display: grid; }
  .hero-actions a { width: 100%; }
  .hero-machine { padding: .5rem .5rem 1rem; border-radius: 18px 18px 34px 34px; }
  .cabinet-top { margin-inline: .25rem; font-size: .72rem; }
  .cabinet-screen { border-width: 3px; border-radius: 14px; }
  .cabinet-controls { height: 46px; }
  .arcade-shell { border-radius: 18px; }
  .arcade-hud { grid-template-columns: 1fr auto; gap: .55rem; min-height: 72px; padding: .65rem .75rem; }
  .hud-progress { grid-column: 1 / -1; grid-row: 2; }
  .hud-score { text-align: right; }
  .arcade-stage { aspect-ratio: 16 / 10; min-height: 340px; }
  .stage-overlay { padding: .75rem; }
  .overlay-card h3 { font-size: clamp(2rem, 10vw, 3.2rem); }
  .overlay-card > p { font-size: .95rem; }
  .level-strip { display: grid; grid-template-columns: repeat(2, 1fr); }
  .level-strip span { text-align: center; }
  .finish-grid { grid-template-columns: 1fr; max-height: 46vh; overflow-y: auto; padding-right: .2rem; }
  .game-info-bar { grid-template-columns: 1fr; gap: .45rem; padding: .62rem .75rem; }
  .game-info-actions { justify-content: space-between; width: 100%; }
  .game-stat { text-align: left; }
  .skip-level-button { min-height: 40px; }
  .mobile-controls { gap: .65rem; padding: .65rem; }
  .movement-controls { grid-template-columns: repeat(4, minmax(45px, 1fr)); }
  .action-controls { grid-template-columns: minmax(74px, 94px); }
  .control-button { min-height: 52px; border-radius: 12px; font-size: .9rem; }
  .capability-panels { grid-template-columns: 1fr; }
  .capability-panels article { min-height: 0; }
  .cta-card { grid-template-columns: 1fr; }
  .cta-card .primary-button { width: 100%; }
  .footer-inner { display: grid; text-align: center; }
}

@media (max-width: 430px) {
  .arcade-stage { min-height: 315px; }
  .movement-controls { gap: .3rem; }
  .control-button { min-height: 48px; padding-inline: .25rem; }
  .action-controls { grid-template-columns: 72px; }
  .control-button.action { font-size: .7rem; }
  .finish-card .primary-button, .finish-card .ghost-button { width: 100%; }
}

@media (orientation: landscape) and (max-height: 560px) and (pointer: coarse) {
  .site-header { position: static; }
  .arcade-section { padding-top: 1rem; }
  .arcade-stage { min-height: 0; aspect-ratio: 16 / 8.2; }
  .mobile-controls { padding: .45rem .65rem; }
  .control-button { min-height: 44px; }
  .game-info-bar { min-height: 54px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
}

/* v1.1: playable arcade embedded at the top with clearer learning guidance */
.hero {
  padding: clamp(1.6rem, 4vw, 3.4rem) 0 clamp(3rem, 6vw, 5rem);
}
.hero-intro {
  max-width: 980px;
  margin: 0 auto;
  text-align: center;
}
.hero-intro .kicker,
.hero-intro .hero-badges {
  justify-content: center;
}
.hero-intro .hero-lead {
  max-width: 760px;
  margin-inline: auto;
}
.hero h1 {
  margin-bottom: .9rem;
  font-size: clamp(3.2rem, 8vw, 7.4rem);
}
.arcade-section--hero {
  padding: clamp(1.5rem, 4vw, 3rem) 0 0;
  scroll-margin-top: 84px;
}
.arcade-section--hero .site-width {
  width: min(calc(100% - 1rem), 1320px);
}
.arcade-shell {
  position: relative;
  overflow: hidden;
  border-width: 3px;
  border-color: rgba(60, 198, 255, .76);
  border-radius: 32px 32px 58px 58px;
  background: linear-gradient(145deg, #102e57, #030914 32%, #02050c 100%);
  box-shadow:
    0 30px 100px rgba(0, 0, 0, .58),
    0 0 80px rgba(39, 228, 255, .15),
    inset 0 0 0 7px rgba(0, 0, 0, .46),
    inset 0 1px rgba(255,255,255,.09);
}
.arcade-shell::before,
.arcade-shell::after {
  content: "";
  position: absolute;
  z-index: 30;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #7e9bbd;
  box-shadow: inset 0 1px 1px rgba(255,255,255,.6), 0 1px 2px #000;
  pointer-events: none;
}
.arcade-shell::before { top: 13px; left: 14px; }
.arcade-shell::after { top: 13px; right: 14px; }
.arcade-marquee {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1rem;
  min-height: 74px;
  padding: .8rem 2rem;
  border-bottom: 3px solid rgba(0,0,0,.68);
  background:
    radial-gradient(circle at 20% 20%, rgba(39,228,255,.2), transparent 17rem),
    radial-gradient(circle at 80% 30%, rgba(177,108,255,.22), transparent 18rem),
    linear-gradient(180deg, #173c70, #08152e);
  font-family: var(--pixel);
  letter-spacing: .1em;
  text-shadow: 0 0 14px rgba(39,228,255,.42);
}
.marquee-ie {
  display: block;
  width: 58px;
  height: 42px;
  object-fit: contain;
  filter: drop-shadow(0 0 10px rgba(39,228,255,.62)) drop-shadow(0 0 24px rgba(39,228,255,.26));
}
.marquee-title {
  color: #fff;
  font-size: clamp(.98rem, 2vw, 1.35rem);
  font-weight: 950;
}
.marquee-tagline {
  color: var(--purple);
  font-size: .72rem;
  font-weight: 950;
  text-align: right;
}
.learning-ribbon {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  border-bottom: 1px solid var(--line);
  background: rgba(64, 173, 255, .22);
}
.learning-ribbon-item {
  min-height: 88px;
  padding: .82rem 1.1rem;
  background: linear-gradient(180deg, rgba(5,23,49,.98), rgba(3,13,29,.98));
}
.learning-ribbon-item:first-child {
  border-left: 5px solid var(--cyan);
}
.learning-ribbon-item:last-child {
  border-left: 5px solid var(--purple);
}
.learning-ribbon-item strong {
  display: block;
  margin-top: .25rem;
  color: #f4fbff;
  font-size: .95rem;
  line-height: 1.35;
}
.arcade-stage {
  border-inline: 7px solid #01040b;
  box-shadow: inset 0 0 0 1px rgba(73,184,255,.28);
}
.stage-overlay {
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
}
.overlay-card {
  margin-block: auto;
}
.briefing-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .62rem;
  margin: 1rem 0 1.2rem;
}
.briefing-grid article {
  padding: .75rem .82rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(5, 23, 49, .82);
}
.briefing-grid article:nth-child(2) {
  border-color: rgba(177,108,255,.48);
}
.briefing-grid .briefing-how {
  grid-column: 1 / -1;
  border-color: rgba(255,211,77,.52);
}
.briefing-grid--simple {
  grid-template-columns: 1fr;
}
.briefing-grid--simple .briefing-how {
  grid-column: auto;
}
.briefing-grid span {
  display: block;
  margin-bottom: .3rem;
  color: var(--cyan);
  font-family: var(--pixel);
  font-size: .61rem;
  font-weight: 950;
  letter-spacing: .08em;
}
.briefing-grid article:nth-child(2) span { color: var(--purple); }
.briefing-grid .briefing-how span { color: var(--yellow); }
.briefing-grid strong {
  display: block;
  color: #edf7ff;
  font-size: .84rem;
  line-height: 1.36;
}
.game-info-bar {
  border-inline: 7px solid #01040b;
}
.arcade-control-deck {
  position: relative;
  border-top: 4px solid #01040b;
  background:
    radial-gradient(circle at 20% 20%, rgba(39,228,255,.11), transparent 18rem),
    radial-gradient(circle at 80% 30%, rgba(177,108,255,.12), transparent 18rem),
    linear-gradient(180deg, #15375f, #07162c 45%, #030914 100%);
  box-shadow: inset 0 2px rgba(255,255,255,.06);
}
.control-deck-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .68rem 1.1rem .2rem;
  color: #cde7ff;
  font-family: var(--pixel);
  font-size: .7rem;
}
.control-deck-header > div {
  display: flex;
  align-items: center;
  gap: .5rem;
}
.control-deck-header > span {
  color: #92afd0;
  text-align: right;
}
.deck-light {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 12px var(--green);
}
.mobile-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 1rem;
  padding: .65rem 1rem .95rem;
  border-top: 0;
  background: transparent;
}
.control-cluster {
  position: relative;
  align-items: center;
}
.control-caption {
  grid-column: 1 / -1;
  margin-bottom: .1rem;
  color: #9db9d8;
  font-family: var(--pixel);
  font-size: .59rem;
  font-weight: 950;
  letter-spacing: .08em;
  text-align: center;
}
.movement-controls {
  grid-template-columns: repeat(4, minmax(56px, 76px));
  justify-content: start;
  width: fit-content;
  padding: .55rem .65rem .7rem;
  border: 1px solid rgba(73,184,255,.24);
  border-radius: 999px;
  background: radial-gradient(circle at center, #17375f, #061329 72%);
  box-shadow: inset 0 2px 10px rgba(0,0,0,.45), 0 7px 0 #01040a;
}
.action-controls {
  grid-template-columns: minmax(96px, 120px);
  justify-items: center;
  padding: .45rem .65rem .72rem;
  border: 1px solid rgba(177,108,255,.28);
  border-radius: 999px;
  background: radial-gradient(circle at center, #39215b, #0b1026 75%);
  box-shadow: inset 0 2px 10px rgba(0,0,0,.45), 0 7px 0 #01040a;
}
.control-button {
  min-width: 58px;
  min-height: 58px;
  border-width: 2px;
  border-radius: 50%;
  box-shadow:
    inset 0 3px rgba(255,255,255,.12),
    inset 0 -5px rgba(0,0,0,.26),
    0 7px 0 #01040a,
    0 0 15px rgba(39,228,255,.12);
}
.control-button.action {
  width: 92px;
  min-height: 72px;
  padding: .35rem;
  border-radius: 50%;
  font-size: .72rem;
  line-height: 1.05;
  box-shadow:
    inset 0 3px rgba(255,255,255,.22),
    inset 0 -7px rgba(0,0,0,.2),
    0 8px 0 #15051d,
    0 0 22px rgba(177,108,255,.26);
}
.desktop-controls {
  padding: .35rem 1rem .65rem;
  border-top: 0;
  color: #8ba8c9;
  background: transparent;
}
.cabinet-lower-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.4rem;
  min-height: 44px;
  padding: .55rem 1rem .8rem;
  border-top: 1px solid rgba(73,184,255,.13);
  color: #6f8bab;
  font-family: var(--pixel);
  font-size: .62rem;
  letter-spacing: .12em;
}
.coin-slot {
  width: 34px;
  height: 8px;
  border: 1px solid #8295ac;
  border-radius: 999px;
  background: #01040a;
  box-shadow: inset 0 1px 3px #000, 0 0 7px rgba(255,255,255,.08);
}
.footer-inner {
  flex-wrap: wrap;
}

.arcade-shell { scroll-margin-top: 78px; }

@media (min-width: 901px) {
  body.arcade-engaged .hero-intro { display: none; }
  body.arcade-engaged .hero { padding: .35rem 0 .75rem; }
  body.arcade-engaged .arcade-section--hero { padding: 0; }
  body.arcade-engaged .arcade-shell {
    display: grid;
    grid-template-rows: auto auto minmax(220px, 1fr) auto auto;
    width: min(100%, 840px);
    height: calc(100svh - 86px);
    max-height: 900px;
    min-height: 520px;
    margin-inline: auto;
  }
  body.arcade-engaged .arcade-marquee { min-height: 44px; padding: .32rem 1rem; }
  body.arcade-engaged .marquee-ie { width: 42px; height: 30px; }
  body.arcade-engaged .marquee-title { font-size: .92rem; }
  body.arcade-engaged .marquee-tagline { font-size: .6rem; }
  body.arcade-engaged .arcade-hud { min-height: 48px; padding: .32rem .8rem; }
  body.arcade-engaged .learning-ribbon { display: none; }
  body.arcade-engaged .arcade-stage {
    align-self: center;
    justify-self: center;
    width: auto;
    min-height: 0;
    height: 100%;
    max-width: 100%;
    aspect-ratio: 16 / 9;
  }
  body.arcade-engaged .game-info-bar { min-height: 48px; padding: .4rem .8rem; }
  body.arcade-engaged .game-objective strong { font-size: .78rem; }
  body.arcade-engaged .arcade-control-deck { min-height: 70px; }
  body.arcade-engaged .control-deck-header { padding: .35rem .8rem .05rem; }
  body.arcade-engaged .mobile-controls {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: .55rem;
    padding: .35rem .7rem .6rem;
  }
  body.arcade-engaged .movement-controls {
    grid-template-columns: repeat(4, 46px);
    padding: .35rem .5rem .48rem;
  }
  body.arcade-engaged .action-controls { grid-template-columns: 68px; padding: .32rem .45rem .48rem; }
  body.arcade-engaged .control-button { min-width: 42px; min-height: 42px; font-size: .78rem; }
  body.arcade-engaged .control-button.action { width: 62px; min-height: 52px; font-size: .54rem; }
  body.arcade-engaged .desktop-controls,
  body.arcade-engaged .cabinet-lower-panel { display: none; }
}

@media (min-width: 1100px) {
  body.arcade-engaged .arcade-shell {
    grid-template-columns: minmax(0, 1fr) 300px;
    grid-template-rows: auto auto minmax(0, 1fr) auto;
    width: 100%;
  }
  body.arcade-engaged .arcade-marquee,
  body.arcade-engaged .arcade-hud { grid-column: 1 / -1; }
  body.arcade-engaged .arcade-stage {
    grid-column: 1;
    grid-row: 3 / 5;
    align-self: center;
    justify-self: center;
    width: auto;
    height: 100%;
    max-width: 100%;
    aspect-ratio: 16 / 9;
    border-right: 4px solid #01040b;
  }
  body.arcade-engaged .game-info-bar {
    grid-column: 2;
    grid-row: 3;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    min-height: 0;
    padding: 1rem;
    border-top: 0;
    border-inline: 0;
    background: linear-gradient(180deg, rgba(7, 26, 54, .99), rgba(3, 12, 28, .99));
  }
  body.arcade-engaged .game-info-actions {
    flex-direction: column;
    align-items: stretch;
    margin-top: auto;
  }
  body.arcade-engaged .game-stat { text-align: left; }
  body.arcade-engaged .skip-level-button { width: 100%; }
  body.arcade-engaged .arcade-control-deck {
    grid-column: 2;
    grid-row: 4;
    min-height: 0;
    border-top: 2px solid #01040b;
    border-left: 0;
  }
  body.arcade-engaged .control-deck-header { align-items: flex-start; }
  body.arcade-engaged .control-deck-header > span { max-width: 55%; font-size: .55rem; }
  body.arcade-engaged .mobile-controls {
    grid-template-columns: 1fr auto;
    align-items: center;
    padding: .45rem .55rem .7rem;
  }
  body.arcade-engaged .movement-controls {
    grid-template-columns: repeat(2, 48px);
    width: fit-content;
    border-radius: 22px;
  }
  body.arcade-engaged .action-controls { grid-template-columns: 70px; border-radius: 22px; }
}

@media (max-width: 900px) {
  .learning-ribbon { grid-template-columns: 1fr; }
  .learning-ribbon-item { min-height: 0; }
  .marquee-tagline { display: none; }
  .arcade-marquee { grid-template-columns: auto 1fr; }
  .briefing-grid { grid-template-columns: 1fr; }
  .briefing-grid .briefing-how { grid-column: auto; }
  .mobile-controls { display: grid; }
  .desktop-controls { display: block; }
}

@media (max-width: 720px) {
  .hero { padding-top: 1rem; }
  .hero h1 { font-size: clamp(3rem, 15vw, 5.2rem); }
  .arcade-section--hero .site-width { width: min(calc(100% - .5rem), 1320px); }
  .arcade-shell { border-radius: 22px 22px 38px 38px; }
  .arcade-marquee { min-height: 58px; padding: .55rem 1rem; }
  .marquee-ie { width: 46px; height: 32px; }
  .marquee-title { font-size: .82rem; }
  .learning-ribbon-item { padding: .65rem .75rem; }
  .learning-ribbon-item strong { font-size: .82rem; }
  .arcade-stage { min-height: 360px; border-inline-width: 4px; }
  .stage-overlay { padding: .7rem; }
  .level-card-copy > p:not(.pixel-label) { font-size: .9rem; }
  .briefing-grid { gap: .45rem; margin: .65rem 0 .8rem; }
  .briefing-grid article { padding: .55rem .62rem; }
  .briefing-grid strong { font-size: .75rem; }
  .level-goals { margin: .65rem 0; }
  .control-deck-header { align-items: flex-start; padding-inline: .75rem; }
  .control-deck-header > span { max-width: 56%; font-size: .58rem; }
  .mobile-controls {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: .55rem;
    padding: .55rem .55rem .8rem;
  }
  .movement-controls {
    grid-template-columns: repeat(4, minmax(42px, 1fr));
    width: 100%;
    gap: .3rem;
    padding: .45rem .45rem .58rem;
  }
  .action-controls {
    grid-template-columns: 72px;
    padding: .4rem .42rem .58rem;
  }
  .control-button { min-width: 42px; min-height: 48px; font-size: .82rem; }
  .control-button.action { width: 68px; min-height: 58px; font-size: .58rem; }
  .desktop-controls { font-size: .58rem; }
}

@media (max-width: 430px) {
  .arcade-stage { min-height: 340px; }
  .hero-badges span { font-size: .62rem; }
  .learning-ribbon-item strong { font-size: .76rem; }
  .mobile-controls { grid-template-columns: 1fr 68px; }
  .movement-controls { grid-template-columns: repeat(4, minmax(38px, 1fr)); }
  .control-button { min-width: 38px; min-height: 44px; }
  .control-caption { font-size: .52rem; }
  .cabinet-lower-panel { gap: .75rem; font-size: .53rem; }
}
.control-button:disabled {
  cursor: not-allowed;
  opacity: .28;
  filter: grayscale(.45);
  box-shadow: inset 0 2px rgba(255,255,255,.05), 0 4px 0 #01040a;
}
.control-button:disabled:active {
  transform: none;
}
@media (max-width: 720px) {
  .welcome-card .pixel-label { margin-bottom: .25rem; }
  .welcome-card h3 { margin-bottom: .35rem; font-size: clamp(1.85rem, 8vw, 2.4rem); }
  .welcome-card > p { margin-bottom: .35rem; font-size: .78rem; line-height: 1.35; }
  .welcome-card .level-strip { gap: .3rem; margin: .5rem 0 .65rem; }
  .welcome-card .level-strip span { padding: .3rem .38rem; font-size: .54rem; }
  .welcome-card .primary-button { min-height: 44px; padding: .6rem 1rem; }
}
@media (max-width: 720px) {
  .arcade-stage.overlay-open { min-height: 620px; }
}
@media (max-width: 430px) {
  .arcade-stage.overlay-open { min-height: 640px; }
}

@media (max-width: 720px) {
  .stage-overlay { place-items: start center; }
  .stage-overlay .overlay-card { margin-block: 0; }
  .level-preview { display: none; }
  .level-card { display: block; }
  .level-card .primary-button { width: 100%; }
  .lesson-console {
    grid-template-columns: 1fr;
    gap: .2rem;
    bottom: .5rem;
    width: calc(100% - 1rem);
    min-height: 0;
    padding: .58rem .68rem;
  }
  .lesson-console strong { font-size: .88rem; }
  .lesson-console p { font-size: .76rem; }
}

/* v1.4: collected benefits briefly take over the game screen */
.benefit-splash {
  position: absolute;
  inset: 0;
  z-index: 26;
  display: grid;
  place-items: center;
  padding: clamp(.75rem, 3vw, 1.7rem);
  color: #fff;
  background:
    radial-gradient(circle at 50% 42%, rgba(39, 228, 255, .28), transparent 34%),
    linear-gradient(135deg, rgba(1, 8, 20, .97), rgba(12, 19, 54, .97));
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.benefit-splash::before {
  content: "";
  position: absolute;
  inset: 0;
  background: #fff;
  opacity: 0;
  pointer-events: none;
}
.benefit-splash.show {
  visibility: visible;
  opacity: 1;
  animation: benefitTakeover 1.45s ease both;
}
.benefit-splash.show::before {
  animation: benefitFlash .34s ease-out both;
}
.benefit-card {
  position: relative;
  width: min(92%, 760px);
  padding: clamp(1.15rem, 4vw, 2.1rem);
  border: 2px solid var(--cyan);
  border-radius: 22px;
  background: rgba(3, 14, 34, .92);
  box-shadow:
    inset 0 0 0 3px rgba(1, 5, 14, .85),
    0 0 0 7px rgba(39, 228, 255, .12),
    0 0 50px rgba(39, 228, 255, .3);
  text-align: center;
  transform: scale(.84);
}
.benefit-splash.show .benefit-card {
  animation: benefitCardIn 1.45s cubic-bezier(.2,.78,.2,1) both;
}
.benefit-kicker {
  display: block;
  margin-bottom: .55rem;
  color: var(--yellow);
  font-family: var(--pixel);
  font-size: clamp(.64rem, 2vw, .82rem);
  font-weight: 950;
  letter-spacing: .11em;
  text-transform: uppercase;
}
.benefit-card strong {
  display: block;
  color: #fff;
  font-size: clamp(1.75rem, 5vw, 3.8rem);
  line-height: 1.02;
  letter-spacing: -.045em;
  text-wrap: balance;
}
.benefit-card p {
  max-width: 620px;
  margin: .75rem auto 0;
  color: #d4e9ff;
  font-size: clamp(.88rem, 2.2vw, 1.1rem);
  line-height: 1.42;
  text-wrap: balance;
}
.benefit-progress {
  display: block;
  width: 100%;
  height: 7px;
  margin-top: 1rem;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255,255,255,.12);
}
.benefit-progress::after {
  content: "";
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--cyan), var(--purple), var(--yellow));
  transform-origin: left;
}
.benefit-splash.show .benefit-progress::after {
  animation: benefitCountdown 1.28s .12s linear both;
}
@keyframes benefitFlash {
  0% { opacity: .95; }
  100% { opacity: 0; }
}
@keyframes benefitTakeover {
  0% { opacity: 0; }
  10%, 84% { opacity: 1; }
  100% { opacity: 0; }
}
@keyframes benefitCardIn {
  0% { transform: scale(.82); opacity: 0; }
  15%, 84% { transform: scale(1); opacity: 1; }
  100% { transform: scale(1.025); opacity: 0; }
}
@keyframes benefitCountdown {
  from { transform: scaleX(1); }
  to { transform: scaleX(0); }
}

/* Keep the active mobile experience focused on the game and its controls. */
@media (max-width: 900px) {
  body.arcade-engaged .site-header,
  body.arcade-engaged .hero-intro {
    display: none;
  }
  body.arcade-engaged .hero {
    padding: 0 0 .35rem;
  }
  body.arcade-engaged .arcade-section--hero {
    padding: 0;
  }
  body.arcade-engaged .arcade-section--hero .site-width {
    width: 100%;
  }
  body.arcade-engaged .arcade-shell {
    border-inline: 0;
    border-radius: 0 0 22px 22px;
  }
  body.arcade-engaged .arcade-marquee {
    grid-template-columns: auto 1fr;
    gap: .55rem;
    min-height: 38px;
    padding: .24rem .55rem;
  }
  body.arcade-engaged .marquee-ie {
    width: 34px;
    height: 24px;
  }
  body.arcade-engaged .marquee-title {
    font-size: .72rem;
  }
  body.arcade-engaged .marquee-tagline,
  body.arcade-engaged .learning-ribbon {
    display: none;
  }
  body.arcade-engaged .arcade-hud {
    grid-template-columns: 1fr auto;
    gap: .3rem .55rem;
    min-height: 48px;
    padding: .28rem .55rem;
  }
  body.arcade-engaged .arcade-hud strong {
    font-size: .74rem;
  }
  body.arcade-engaged .hud-small {
    font-size: .5rem;
  }
  body.arcade-engaged .hud-progress {
    grid-column: 1 / -1;
    gap: .45rem;
    font-size: .56rem;
  }
  body.arcade-engaged .hud-progress-track {
    height: 7px;
  }
  body.arcade-engaged .arcade-stage {
    min-height: 0;
    aspect-ratio: 16 / 9;
    border-inline-width: 2px;
  }
  body.arcade-engaged .game-info-bar {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: .45rem;
    min-height: 46px;
    padding: .35rem .5rem;
    border-inline-width: 2px;
  }
  body.arcade-engaged .game-objective .hud-small {
    display: none;
  }
  body.arcade-engaged .game-objective strong {
    font-size: .66rem;
    line-height: 1.25;
  }
  body.arcade-engaged .game-info-actions {
    width: auto;
    gap: .35rem;
  }
  body.arcade-engaged .game-stat {
    display: none;
  }
  body.arcade-engaged .skip-level-button {
    min-height: 34px;
    padding: .38rem .52rem;
    font-size: .53rem;
    white-space: nowrap;
  }
  body.arcade-engaged .arcade-control-deck {
    border-top-width: 2px;
  }
  body.arcade-engaged .control-deck-header {
    min-height: 24px;
    padding: .25rem .5rem .05rem;
    font-size: .56rem;
  }
  body.arcade-engaged .control-deck-header > span {
    max-width: 54%;
    font-size: .5rem;
    line-height: 1.15;
  }
  body.arcade-engaged .deck-light {
    width: 7px;
    height: 7px;
  }
  body.arcade-engaged .mobile-controls {
    grid-template-columns: minmax(0, 1fr) 66px;
    gap: .4rem;
    padding: .35rem .42rem .58rem;
  }
  body.arcade-engaged .movement-controls {
    grid-template-columns: repeat(4, minmax(40px, 1fr));
    gap: .25rem;
    width: 100%;
    padding: .32rem .36rem .45rem;
  }
  body.arcade-engaged .action-controls {
    grid-template-columns: 58px;
    padding: .3rem .3rem .45rem;
  }
  body.arcade-engaged .control-caption {
    margin-bottom: 0;
    font-size: .46rem;
  }
  body.arcade-engaged .control-button {
    min-width: 40px;
    min-height: 44px;
    font-size: .72rem;
  }
  body.arcade-engaged .control-button.action {
    width: 56px;
    min-height: 50px;
    font-size: .48rem;
  }
  body.arcade-engaged .desktop-controls,
  body.arcade-engaged .cabinet-lower-panel {
    display: none;
  }
  body.arcade-engaged .lesson-console {
    bottom: .35rem;
    width: calc(100% - .7rem);
    padding: .42rem .5rem;
  }
  body.arcade-engaged .lesson-console-label {
    font-size: .48rem;
  }
  body.arcade-engaged .lesson-console strong {
    font-size: .74rem;
  }
  body.arcade-engaged .lesson-console p {
    font-size: .64rem;
    line-height: 1.25;
  }
  body.arcade-engaged .benefit-card {
    width: min(94%, 620px);
    padding: .9rem .8rem;
    border-radius: 16px;
  }
  body.arcade-engaged .benefit-card strong {
    font-size: clamp(1.45rem, 7vw, 2.35rem);
  }
  body.arcade-engaged .benefit-card p {
    margin-top: .5rem;
    font-size: .78rem;
  }
  body.arcade-engaged .benefit-progress {
    height: 5px;
    margin-top: .7rem;
  }
}

@media (max-width: 430px) {
  body.arcade-engaged .marquee-title { font-size: .65rem; }
  body.arcade-engaged .mobile-controls { grid-template-columns: minmax(0, 1fr) 60px; }
  body.arcade-engaged .movement-controls { grid-template-columns: repeat(4, minmax(36px, 1fr)); }
  body.arcade-engaged .control-button { min-width: 36px; min-height: 42px; }
  body.arcade-engaged .control-button.action { width: 52px; min-height: 48px; }
}
.benefit-splash.show { pointer-events: auto; }

@media (max-width: 900px) {
  body.arcade-engaged .arcade-stage.overlay-open {
    min-height: min(440px, calc(100svh - 150px));
    aspect-ratio: auto;
  }
}


/* v1.5: clearer player, compact briefings and mobile-readable pickups */
.lesson-console { display: none !important; }

.compact-briefing {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .7rem;
  margin: 1rem 0 1.15rem;
}
.compact-briefing article {
  padding: .8rem .9rem;
  border: 1px solid var(--line-bright);
  border-radius: 14px;
  background: rgba(5, 23, 49, .84);
}
.compact-briefing article:last-child { border-color: rgba(255,211,77,.55); }
.compact-briefing span {
  display: block;
  margin-bottom: .3rem;
  color: var(--cyan);
  font-family: var(--pixel);
  font-size: .62rem;
  font-weight: 950;
  letter-spacing: .09em;
}
.compact-briefing article:last-child span { color: var(--yellow); }
.compact-briefing strong {
  display: block;
  color: #fff;
  font-size: .9rem;
  line-height: 1.28;
}

.benefit-card {
  width: min(94%, 700px);
  padding: clamp(1rem, 4vw, 1.7rem);
}
.benefit-kicker { margin-bottom: .35rem; }
.benefit-card strong {
  font-family: var(--pixel);
  font-size: clamp(2.4rem, 8vw, 5.4rem);
  letter-spacing: -.035em;
  text-transform: uppercase;
}
.benefit-card p {
  max-width: 560px;
  margin-top: .55rem;
  font-size: clamp(.95rem, 2.4vw, 1.3rem);
  font-weight: 800;
  line-height: 1.2;
}

@media (max-width: 720px) {
  .welcome-card > p { font-size: .88rem; }
  .compact-briefing {
    grid-template-columns: 1fr;
    gap: .45rem;
    margin: .55rem 0 .7rem;
  }
  .compact-briefing article { padding: .58rem .68rem; }
  .compact-briefing strong { font-size: .78rem; }
  .level-card-copy > p:not(.pixel-label) { margin-bottom: .3rem; }
  body.arcade-engaged .benefit-card {
    width: calc(100% - 1rem);
    padding: .85rem .55rem;
  }
  body.arcade-engaged .benefit-card strong {
    font-size: clamp(2.35rem, 13vw, 4.2rem);
    line-height: .98;
  }
  body.arcade-engaged .benefit-card p {
    margin-top: .45rem;
    font-size: clamp(.9rem, 4.5vw, 1.08rem);
    line-height: 1.12;
  }
  body.arcade-engaged .benefit-progress { margin-top: .55rem; }
}

/* v1.6: secure contact form */
.contact-section {
  padding: clamp(4rem, 9vw, 7rem) 0;
  border-top: 1px solid rgba(75, 178, 255, .14);
  background:
    radial-gradient(circle at 12% 20%, rgba(39, 228, 255, .12), transparent 24rem),
    radial-gradient(circle at 88% 70%, rgba(177, 108, 255, .13), transparent 26rem);
}
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, .78fr) minmax(520px, 1.22fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: start;
}
.contact-copy {
  position: sticky;
  top: 7.2rem;
}
.contact-copy h2 {
  margin-bottom: 1rem;
  font-size: clamp(2.4rem, 5vw, 4.7rem);
  letter-spacing: -.045em;
}
.contact-copy > p:not(.kicker) {
  max-width: 640px;
  color: var(--muted);
  font-size: 1.08rem;
}
.contact-security {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: .85rem;
  align-items: start;
  margin-top: 1.5rem;
  padding: 1rem;
  border: 1px solid rgba(83, 239, 174, .34);
  border-radius: 18px;
  background: rgba(4, 26, 37, .72);
}
.security-icon {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border: 1px solid rgba(83, 239, 174, .62);
  border-radius: 14px;
  color: var(--green);
  background: rgba(83, 239, 174, .08);
  font-family: var(--pixel);
  font-size: 1.25rem;
}
.contact-security strong { display: block; margin-bottom: .25rem; color: var(--green); }
.contact-security p { margin: 0; color: #b9ccdc; font-size: .9rem; }

.contact-form {
  position: relative;
  padding: clamp(1.15rem, 3vw, 2rem);
  border: 1px solid rgba(39, 228, 255, .42);
  border-radius: 28px;
  background: linear-gradient(145deg, rgba(8, 31, 62, .96), rgba(2, 10, 24, .98));
  box-shadow: 0 26px 80px rgba(0, 0, 0, .34);
}
.contact-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}
.contact-form label > span:first-child,
.message-field > span:first-child {
  display: block;
  margin-bottom: .42rem;
  color: #e8f7ff;
  font-weight: 850;
}
.contact-form label small { color: var(--muted); font-weight: 600; }
.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form select,
.contact-form textarea {
  width: 100%;
  min-height: 52px;
  padding: .78rem .88rem;
  border: 1px solid rgba(92, 175, 255, .42);
  border-radius: 14px;
  color: var(--white);
  background: rgba(1, 9, 22, .82);
  font: inherit;
  outline: none;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
.contact-form textarea {
  min-height: 150px;
  resize: vertical;
  line-height: 1.45;
}
.contact-form select { appearance: auto; }
.contact-form option { color: #f6fbff; background: #07162c; }
.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  border-color: var(--cyan);
  background: rgba(2, 15, 35, .96);
  box-shadow: 0 0 0 4px rgba(39, 228, 255, .1);
}
.contact-form input:invalid:not(:placeholder-shown),
.contact-form textarea:invalid:not(:placeholder-shown) { border-color: rgba(255, 82, 111, .72); }
.message-field { display: block; margin-top: 1rem; }
.consent-field {
  display: flex;
  align-items: flex-start;
  gap: .7rem;
  margin-top: 1rem;
  color: #d8e9f7;
  cursor: pointer;
}
.consent-field input {
  flex: 0 0 auto;
  width: 21px;
  height: 21px;
  margin: .1rem 0 0;
  accent-color: var(--cyan);
}
.consent-field span { margin: 0 !important; font-size: .92rem; font-weight: 700 !important; }
.contact-form-footer {
  display: grid;
  grid-template-columns: minmax(220px, auto) minmax(0, 1fr);
  gap: 1rem;
  align-items: center;
  margin-top: 1.15rem;
}
.contact-form .primary-button:disabled {
  cursor: wait;
  filter: grayscale(.35) brightness(.62);
  transform: none;
}
.form-status {
  margin: 0;
  color: var(--muted);
  font-size: .88rem;
  line-height: 1.35;
}
.form-status--ready { color: #bfefff; }
.form-status--success { color: var(--green); font-weight: 850; }
.form-status--error { color: #ff9fb1; font-weight: 800; }
.form-trap {
  position: absolute !important;
  left: -10000px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}

@media (max-width: 1020px) {
  .contact-grid { grid-template-columns: 1fr; }
  .contact-copy { position: static; }
  .contact-copy > p:not(.kicker) { max-width: 760px; }
}

@media (max-width: 720px) {
  .contact-section { padding: 3.5rem 0; }
  .contact-form { padding: 1rem; border-radius: 20px; }
  .contact-form-grid { grid-template-columns: 1fr; gap: .8rem; }
  .contact-form input[type="text"],
  .contact-form input[type="email"],
  .contact-form select,
  .contact-form textarea { font-size: 16px; }
  .contact-form-footer { grid-template-columns: 1fr; }
  .contact-form-footer .primary-button { width: 100%; }
  .contact-security { grid-template-columns: 40px 1fr; }
  .security-icon { width: 40px; height: 40px; border-radius: 12px; }
}

/* v1.7: site menu, Cybernews and analytics-aware article pages */
.site-menu { position: relative; }
.site-menu > summary { list-style: none; }
.site-menu > summary::-webkit-details-marker { display: none; }
.site-menu[open] > summary { border-color: var(--cyan); color: var(--cyan); }
.site-menu-panel {
  position: absolute;
  top: calc(100% + .7rem);
  right: 0;
  z-index: 120;
  width: min(360px, calc(100vw - 1rem));
  padding: .8rem;
  border: 1px solid var(--line-bright);
  border-radius: 18px;
  background: rgba(2, 10, 25, .98);
  box-shadow: 0 24px 70px rgba(0, 0, 0, .56);
}
.site-menu-panel > a {
  display: block;
  padding: .65rem .75rem;
  border-radius: 10px;
  color: var(--white);
  text-decoration: none;
  font-weight: 850;
}
.site-menu-panel > a:hover,
.site-menu-panel > a:focus-visible { color: var(--cyan); background: rgba(39, 228, 255, .09); }
.site-menu-heading {
  margin: .6rem .3rem .35rem;
  color: var(--cyan);
  font-family: var(--pixel);
  font-size: .68rem;
  font-weight: 900;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.recent-post-list { display: grid; gap: .35rem; }
.recent-post-list a {
  display: grid;
  gap: .14rem;
  padding: .65rem .72rem;
  border: 1px solid rgba(75, 178, 255, .2);
  border-radius: 12px;
  color: var(--white);
  background: rgba(7, 24, 50, .7);
  text-decoration: none;
}
.recent-post-list a:hover,
.recent-post-list a:focus-visible { border-color: var(--cyan); }
.recent-post-list strong { font-size: .88rem; line-height: 1.2; }
.recent-post-list span { color: var(--muted); font-size: .72rem; }
.recent-empty { display: block; padding: .6rem .7rem; color: var(--muted); font-size: .82rem; }

.news-hero { padding: clamp(4rem, 10vw, 8rem) 0 clamp(3rem, 7vw, 5rem); }
.news-hero h1,
.news-article-header h1,
.news-empty h1 { margin-bottom: 1rem; font-size: clamp(3rem, 7vw, 6.5rem); letter-spacing: -.06em; }
.news-hero > .site-width > p:last-child { max-width: 720px; color: var(--muted); font-size: 1.18rem; }
.news-list-section { padding: 0 0 clamp(5rem, 10vw, 8rem); }
.news-list { display: grid; gap: 1rem; }
.news-card,
.news-empty-card {
  padding: clamp(1.2rem, 3vw, 2rem);
  border: 1px solid rgba(75, 178, 255, .3);
  border-radius: 24px;
  background: linear-gradient(145deg, rgba(8, 31, 62, .9), rgba(2, 10, 24, .95));
}
.news-card h2 { margin: .65rem 0 .7rem; font-size: clamp(1.7rem, 4vw, 2.7rem); }
.news-card h2 a { color: var(--white); text-decoration: none; }
.news-card h2 a:hover,
.news-card h2 a:focus-visible { color: var(--cyan); }
.news-card p { max-width: 850px; color: var(--muted); }
.news-card-meta,
.news-meta { display: flex; flex-wrap: wrap; gap: .65rem; color: var(--cyan); font-family: var(--pixel); font-size: .72rem; font-weight: 900; text-transform: uppercase; }
.news-card-meta span + span::before,
.news-meta span + span::before { content: "•"; margin-right: .65rem; color: var(--purple); }
.news-read-link,
.news-back { color: var(--cyan); font-weight: 900; text-decoration: none; }
.news-read-link:hover,
.news-back:hover { text-decoration: underline; }
.news-article { padding-bottom: clamp(5rem, 10vw, 8rem); }
.news-article-header { padding-top: clamp(3rem, 8vw, 6rem); padding-bottom: clamp(2rem, 5vw, 3.5rem); }
.news-back { display: inline-block; margin-bottom: 2rem; }
.news-summary { max-width: 820px; color: #c4d6e8; font-size: clamp(1.15rem, 2.5vw, 1.45rem); }
.news-body {
  max-width: 840px;
  padding-top: clamp(1.5rem, 4vw, 3rem);
  padding-bottom: clamp(2rem, 6vw, 4rem);
  border-top: 1px solid rgba(75, 178, 255, .25);
  font-size: 1.08rem;
}
.news-body p { margin-bottom: 1.35rem; color: #d9e8f4; }
.news-body h2 { margin: 2.3rem 0 .85rem; font-size: clamp(1.8rem, 4vw, 2.8rem); }
.news-body h3 { margin: 1.8rem 0 .7rem; font-size: clamp(1.35rem, 3vw, 2rem); color: var(--cyan); }
.news-body ul { margin: 0 0 1.5rem; padding-left: 1.25rem; }
.news-body li { margin-bottom: .5rem; color: #d9e8f4; }
.news-article-footer {
  max-width: 840px;
  padding: 1.2rem;
  border: 1px solid rgba(83, 239, 174, .32);
  border-radius: 20px;
  background: rgba(4, 26, 37, .72);
}
.news-article-footer p { color: var(--muted); }
.news-empty { padding-top: clamp(4rem, 10vw, 8rem); padding-bottom: clamp(5rem, 12vw, 10rem); }
.mail-result { max-width: 720px; margin: 10vh auto; padding: 2rem; }

@media (max-width: 720px) {
  .site-menu-panel { position: fixed; top: 4.8rem; right: .5rem; left: .5rem; width: auto; max-height: calc(100vh - 5.5rem); overflow: auto; }
  .news-card-meta span + span::before,
  .news-meta span + span::before { display: none; }
  .news-card-meta,
  .news-meta { display: grid; gap: .25rem; }
  .news-body { font-size: 1rem; }
}
@media (max-width: 720px) {
  .header-inner { gap: .4rem; }
  .brand { width: min(50vw, 250px); }
  .header-actions { gap: .3rem; }
  .header-actions .icon-button,
  .header-actions .mini-button { padding-inline: .55rem; }
}


/* v1.9: hero intro moves into the game window, glowing logo and typed prompt */
.brand {
  background: linear-gradient(180deg, rgba(4, 17, 34, .62), rgba(3, 10, 22, .42));
  border: 1px solid rgba(71, 185, 255, .26);
  box-shadow: 0 0 26px rgba(39, 228, 255, .12), inset 0 1px rgba(255,255,255,.06);
}
.brand img {
  filter: drop-shadow(0 0 12px rgba(39, 228, 255, .55)) drop-shadow(0 0 28px rgba(39, 228, 255, .24));
}
.hero {
  padding: .55rem 0 clamp(2rem, 5vw, 4rem);
}
.hero-intro {
  display: none;
}
.arcade-section--hero {
  padding-top: .35rem;
}
.welcome-card {
  max-width: 860px;
  text-align: center;
}
.welcome-logo {
  width: min(82%, 520px);
  margin: 0 auto .9rem;
  filter: drop-shadow(0 0 18px rgba(39, 228, 255, .56)) drop-shadow(0 0 44px rgba(39, 228, 255, .18));
}
.welcome-card h3 {
  margin-bottom: .65rem;
  text-shadow: 0 0 22px rgba(39, 228, 255, .14);
}
.welcome-card h3 span {
  display: block;
  color: transparent;
  background: linear-gradient(90deg, #ffffff 0%, #6af0ff 46%, #8dffb1 100%);
  -webkit-background-clip: text;
  background-clip: text;
}
.welcome-copy {
  max-width: 680px;
  margin: 0 auto 1rem;
  color: #d9ebff;
}
.terminal-prompt {
  width: min(100%, 640px);
  margin: 0 auto 1rem;
  padding: .85rem 1rem;
  border: 1px solid rgba(83, 239, 174, .42);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(1, 10, 6, .92), rgba(4, 18, 11, .88));
  box-shadow: inset 0 0 0 1px rgba(83,239,174,.12), 0 0 32px rgba(83,239,174,.08);
  text-align: left;
}
.terminal-prompt-label {
  display: block;
  margin-bottom: .38rem;
  color: #aaffc4;
  font-family: var(--pixel);
  font-size: .6rem;
  font-weight: 950;
  letter-spacing: .14em;
}
.terminal-line,
.terminal-cursor {
  color: #73ff9f;
  font-family: var(--pixel);
  font-size: clamp(.8rem, 2vw, 1rem);
  font-weight: 950;
  letter-spacing: .06em;
  text-shadow: 0 0 14px rgba(83, 239, 174, .35);
}
.terminal-line {
  min-height: 1.4em;
}
.terminal-cursor {
  margin-left: .1rem;
  animation: terminalBlink 1s steps(1, end) infinite;
}
@keyframes terminalBlink {
  50% { opacity: 0; }
}
@media (max-width: 720px) {
  .brand {
    background: transparent;
    border-color: rgba(71, 185, 255, .18);
  }
  .welcome-logo {
    width: min(88%, 420px);
    margin-bottom: .7rem;
  }
  .welcome-copy {
    margin-bottom: .8rem;
    font-size: .84rem;
    line-height: 1.38;
  }
  .terminal-prompt {
    margin-bottom: .8rem;
    padding: .65rem .72rem;
    border-radius: 12px;
  }
  .terminal-prompt-label {
    font-size: .52rem;
  }
  .terminal-line,
  .terminal-cursor {
    font-size: .7rem;
    line-height: 1.35;
  }
  .welcome-card .level-strip {
    margin-top: .3rem;
  }
}

/* v1.11 playable Cybernews */
.news-card--playable { border-color: rgba(83,239,174,.4); background: radial-gradient(circle at 85% 10%,rgba(83,239,174,.1),transparent 15rem),linear-gradient(145deg,rgba(7,29,48,.95),rgba(3,14,31,.95)); }
.news-playable-badge { display: inline-flex; margin: .7rem 0 .15rem; padding: .28rem .52rem; border: 1px solid rgba(83,239,174,.5); border-radius: 999px; color: #aaffd3; background: rgba(4,50,36,.55); font-family: var(--pixel); font-size: .62rem; font-weight: 950; letter-spacing: .08em; }
.interactive-news { margin-bottom: clamp(2rem,5vw,4rem); }
.interactive-shell { position: relative; overflow: hidden; border: 2px solid rgba(39,228,255,.58); border-radius: 26px; background: #020914; box-shadow: 0 28px 80px rgba(0,0,0,.5),inset 0 0 0 5px rgba(0,0,0,.36); }
.interactive-head { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 1rem; padding: .9rem 1rem; border-bottom: 1px solid rgba(39,228,255,.28); background: radial-gradient(circle at 80% 10%,rgba(177,108,255,.18),transparent 16rem),linear-gradient(180deg,#143966,#06152d); }
.interactive-head > div:first-child { display: grid; gap: .2rem; }
.interactive-mode { color: var(--cyan); font-family: var(--pixel); font-size: .65rem; font-weight: 950; letter-spacing: .1em; }
.interactive-head strong { color: #f0f8ff; font-size: .95rem; }
.interactive-xp { min-width: 70px; padding: .5rem .65rem; border: 1px solid rgba(255,211,77,.42); border-radius: 12px; text-align: center; background: rgba(44,31,0,.55); }
.interactive-xp span { display: block; color: var(--yellow); font-family: var(--pixel); font-size: .55rem; }
.interactive-xp strong { color: #fff3b1; font-family: var(--pixel); font-size: 1.2rem; }
.interactive-progress { height: 10px; background: #00050d; }
.interactive-progress span { display: block; width: 4%; height: 100%; background: linear-gradient(90deg,var(--cyan),var(--purple),var(--green)); box-shadow: 0 0 20px rgba(39,228,255,.35); transition: width .35s ease; }
.interactive-screen { position: relative; min-height: 360px; padding: clamp(1rem,4vw,2.3rem); background: radial-gradient(circle at 82% 18%,rgba(177,108,255,.14),transparent 20rem),linear-gradient(145deg,#031023,#081d3a); }
.interactive-screen h2 { max-width: 850px; margin: .45rem 0 .9rem; font-size: clamp(2rem,5vw,4.2rem); letter-spacing: -.045em; }
.interactive-screen > p,.interactive-screen > div > p { max-width: 880px; color: #d9e9f7; font-size: clamp(1rem,2vw,1.14rem); line-height: 1.55; }
.interactive-controls { display: flex; flex-wrap: wrap; align-items: center; gap: .7rem; min-height: 82px; padding: .8rem 1rem; border-top: 1px solid rgba(39,228,255,.18); background: linear-gradient(180deg,#0a2548,#031126); }
.interactive-controls .primary-button,.interactive-controls .ghost-button { min-height: 46px; }
.interactive-status { padding: .45rem .75rem; border-top: 1px solid rgba(39,228,255,.12); color: #87a7c8; background: #010712; font-family: var(--pixel); font-size: .62rem; text-align: center; letter-spacing: .08em; }
.interactive-question { width: 100%; color: #fff; }
.interactive-options,.feedback-options { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: .6rem; width: 100%; }
.interactive-options button,.feedback-options button,.feedback-scale button { min-height: 54px; padding: .7rem; border: 1px solid rgba(92,175,255,.48); border-radius: 13px; color: #e9f6ff; background: rgba(4,20,43,.9); font: inherit; font-weight: 850; cursor: pointer; }
.interactive-options button:hover,.interactive-options button:focus-visible,.feedback-options button:hover,.feedback-options button:focus-visible,.feedback-scale button:hover,.feedback-scale button:focus-visible { border-color: var(--cyan); background: rgba(8,40,76,.96); }
.interactive-options button.correct { border-color: var(--green); color: #baffdd; background: rgba(3,62,42,.82); }
.interactive-options button.incorrect { border-color: var(--red); color: #ffd1d8; background: rgba(72,7,21,.78); }
.interactive-benefit { position: absolute; inset: 0; z-index: 8; display: grid; place-content: center; padding: 1rem; text-align: center; background: radial-gradient(circle,rgba(39,228,255,.24),transparent 35%),linear-gradient(135deg,rgba(1,9,22,.97),rgba(12,18,49,.97)); opacity: 0; transform: scale(.96); transition: opacity .18s ease,transform .18s ease; }
.interactive-benefit.show { opacity: 1; transform: scale(1); }
.interactive-benefit span { color: var(--yellow); font-family: var(--pixel); font-size: .65rem; font-weight: 950; letter-spacing: .12em; }
.interactive-benefit strong { margin-top: .4rem; color: #fff; font-family: var(--pixel); font-size: clamp(2rem,7vw,5rem); text-transform: uppercase; }
.interactive-benefit p { max-width: 620px; margin: .65rem auto 0; color: #d8edff; font-weight: 800; }
.terminal-window { min-height: 290px; padding: 1rem; border: 1px solid rgba(83,239,174,.34); border-radius: 15px; background: linear-gradient(180deg,rgba(0,12,7,.9),rgba(3,27,16,.82)); box-shadow: inset 0 0 25px rgba(83,239,174,.06); }
.terminal-path { color: #6dff99; font-family: var(--pixel); font-size: .62rem; }
.terminal-window h2,.terminal-window p,.terminal-cursor-public { color: #7dffa6; font-family: var(--pixel); text-shadow: 0 0 12px rgba(83,239,174,.25); }
.terminal-cursor-public { animation: terminalBlink 1s steps(1,end) infinite; }
.interactive-screen--timeline { display: grid; grid-template-columns: auto minmax(0,1fr); gap: 1rem; align-items: start; }
.timeline-marker { display: grid; place-items: center; width: 70px; height: 70px; border: 2px solid var(--purple); border-radius: 50%; color: #fff; background: rgba(74,32,118,.65); box-shadow: 0 0 25px rgba(177,108,255,.22); font-family: var(--pixel); font-size: 1.2rem; font-weight: 950; }
.interactive-card-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .8rem; }
.interactive-flip-card { min-height: 235px; padding: 1rem; border: 1px solid rgba(39,228,255,.4); border-radius: 18px; color: #fff; background: linear-gradient(145deg,rgba(7,31,62,.94),rgba(4,13,31,.96)); text-align: left; cursor: pointer; transition: transform .18s ease,border-color .18s ease; }
.interactive-flip-card:hover,.interactive-flip-card:focus-visible { transform: translateY(-3px); border-color: var(--cyan); }
.interactive-flip-card.revealed { border-color: var(--green); background: linear-gradient(145deg,rgba(4,48,36,.9),rgba(3,20,27,.96)); }
.interactive-flip-card .card-number { display: block; margin-bottom: 1rem; color: var(--cyan); font-family: var(--pixel); font-size: .75rem; font-weight: 950; }
.interactive-flip-card strong { display: block; font-size: 1.3rem; }
.interactive-flip-card .card-prompt { display: block; margin-top: 1.2rem; color: var(--muted); }
.interactive-flip-card p { margin: .7rem 0 0; color: #dbeaf6; }
.finish-unlocks { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1rem; }
.finish-unlocks span { padding: .4rem .65rem; border: 1px solid rgba(83,239,174,.42); border-radius: 999px; color: #aaffd2; background: rgba(4,50,36,.5); font-family: var(--pixel); font-size: .65rem; }
.interactive-feedback { display: grid; gap: .8rem; max-width: 850px; margin-top: 1rem; }
.feedback-scale { display: grid; grid-template-columns: repeat(5,1fr); gap: .55rem; }
.feedback-scale button { font-family: var(--pixel); font-size: 1.2rem; }
.interactive-feedback input { width: 100%; padding: .85rem; border: 1px solid rgba(92,175,255,.48); border-radius: 13px; color: #fff; background: rgba(1,9,22,.88); font: inherit; }
.feedback-thanks { padding: 1rem; border: 1px solid rgba(83,239,174,.4); border-radius: 14px; background: rgba(4,50,36,.45); }
.feedback-thanks > strong { color: var(--green); font-family: var(--pixel); }
.feedback-bars { display: grid; gap: .65rem; margin-top: .8rem; }
.feedback-bars > div { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: .4rem .7rem; }
.feedback-bars span { color: #e6f6ed; }
.feedback-bars b { color: var(--yellow); }
.feedback-bars i { grid-column: 1 / -1; display: block; height: 10px; overflow: hidden; border-radius: 999px; background: rgba(255,255,255,.12); }
.feedback-bars em { display: block; height: 100%; background: linear-gradient(90deg,var(--green),var(--cyan)); }
.feedback-error { color: #ffbcc7 !important; }
.news-full-text { margin-bottom: 2rem; padding: 1rem; border: 1px solid rgba(75,178,255,.22); border-radius: 16px; background: rgba(4,16,35,.65); }
.news-full-text summary { cursor: pointer; color: var(--cyan); font-weight: 850; }
.news-full-text .news-body { width: 100%; margin-top: 1rem; }
@media (max-width: 720px) {
  .interactive-news { width: min(calc(100% - .5rem),var(--max)); }
  .interactive-shell { border-radius: 18px; }
  .interactive-head { padding: .65rem .7rem; }
  .interactive-head strong { font-size: .78rem; }
  .interactive-xp { min-width: 58px; padding: .38rem .45rem; }
  .interactive-screen { min-height: 330px; padding: .9rem; }
  .interactive-screen h2 { font-size: clamp(1.8rem,10vw,3rem); }
  .interactive-screen > p,.interactive-screen > div > p { font-size: .93rem; }
  .interactive-options,.feedback-options { grid-template-columns: 1fr; }
  .interactive-controls { min-height: 70px; padding: .6rem; }
  .interactive-controls .primary-button,.interactive-controls .ghost-button { flex: 1 1 145px; }
  .interactive-card-grid { grid-template-columns: 1fr; }
  .interactive-flip-card { min-height: 190px; }
  .interactive-screen--timeline { grid-template-columns: 48px minmax(0,1fr); gap: .65rem; }
  .timeline-marker { width: 48px; height: 48px; font-size: .85rem; }
  .feedback-scale { gap: .3rem; }
  .feedback-scale button { min-height: 48px; padding: .4rem; }
  .interactive-benefit strong { font-size: clamp(1.7rem,11vw,3.3rem); }
  .interactive-benefit p { font-size: .82rem; }
}


/* v1.11.2: custom transparent arcade mark */
.arcade-marquee { align-items: center; }


/* v1.12: simple guided project brief form */
.project-form-section {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}
.project-form-section + .project-form-section {
  margin-top: 1.35rem;
  padding-top: 1.35rem;
  border-top: 1px solid rgba(75, 178, 255, .18);
}
.project-form-section legend {
  display: flex;
  align-items: center;
  gap: .65rem;
  margin: 0 0 .35rem;
  padding: 0;
  color: #f4fbff;
  font-size: 1.08rem;
  font-weight: 900;
}
.project-form-section legend span {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid rgba(39, 228, 255, .6);
  border-radius: 9px;
  color: var(--cyan);
  background: rgba(39, 228, 255, .08);
  font-family: var(--pixel);
  font-size: .75rem;
  box-shadow: 0 0 14px rgba(39, 228, 255, .1);
}
.form-section-help {
  margin: 0 0 .9rem;
  color: var(--muted);
  font-size: .86rem;
}
.form-field-wide {
  grid-column: 1 / -1;
}
.field-help {
  display: block;
  margin-top: .38rem;
  color: #91acc8 !important;
  font-size: .78rem;
  font-weight: 600 !important;
  line-height: 1.35;
}
.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: #718aa6;
  opacity: 1;
}
.contact-form optgroup {
  color: var(--cyan);
  background: #07162c;
  font-weight: 850;
}
.contact-form optgroup option {
  color: #f6fbff;
  font-weight: 500;
}
@media (max-width: 720px) {
  .form-field-wide { grid-column: auto; }
  .project-form-section + .project-form-section {
    margin-top: 1.1rem;
    padding-top: 1.1rem;
  }
  .field-help { font-size: .76rem; }
}


/* v1.13: separate quick contact and detailed project brief */
.contact-route-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .7rem;
  margin-top: 1.25rem;
}
.contact-route-actions .ghost-button {
  min-height: 48px;
}
.project-brief-page .contact-section {
  padding-top: clamp(2.5rem, 6vw, 5rem);
}
.project-brief-layout {
  display: grid;
  grid-template-columns: minmax(0, .72fr) minmax(560px, 1.28fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: start;
}
.project-brief-intro {
  position: sticky;
  top: 7.2rem;
}
.project-brief-intro h1 {
  margin-bottom: 1rem;
  font-size: clamp(2.5rem, 5.4vw, 5rem);
  letter-spacing: -.05em;
}
.project-brief-intro > p:not(.kicker) {
  color: var(--muted);
  font-size: 1.06rem;
}
.project-brief-options {
  display: grid;
  gap: .55rem;
  margin-top: 1.25rem;
}
.project-brief-options .ghost-button {
  width: fit-content;
  min-height: 48px;
}
.project-brief-options span {
  color: #91acc8;
  font-size: .84rem;
}
.project-brief-form {
  min-width: 0;
}
@media (max-width: 1020px) {
  .project-brief-layout { grid-template-columns: 1fr; }
  .project-brief-intro { position: static; }
  .project-brief-intro > p:not(.kicker) { max-width: 780px; }
}
@media (max-width: 720px) {
  .contact-route-actions .ghost-button,
  .project-brief-options .ghost-button { width: 100%; }
}
