@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Poppins:wght@600;700;800&display=swap");

:root {
  color-scheme: light;
  --ink: #18324b;
  --muted: #5e7185;
  --brand: #285fce;
  --brand-dark: #163f99;
  --accent: #15a58a;
  --paper: #f4f7fb;
  --line: #dce5ef;
  --card: #fff;
  font-family: Inter, system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}
body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.55;
}
a {
  color: var(--brand-dark);
}
.site-header {
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.nav-wrap {
  width: min(1100px, calc(100% - 2rem));
  min-height: 66px;
  margin: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--ink);
  text-decoration: none;
  font-weight: 800;
}
.brand-mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: white;
  background: linear-gradient(135deg, var(--brand), #17a890);
  font-weight: 800;
}
.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}
.site-nav a {
  text-decoration: none;
  font-weight: 600;
}
.page {
  width: min(1000px, calc(100% - 2rem));
  margin: 2rem auto 4rem;
}
.breadcrumb {
  margin: 0 0 0.65rem;
  color: var(--muted);
  font-size: 0.9rem;
}
.hero {
  padding: clamp(1.4rem, 4vw, 2.6rem);
  border-radius: 24px;
  color: white;
  background:
    radial-gradient(circle at 88% 8%, #74a7ff 0, transparent 30%),
    linear-gradient(130deg, #193b80, #2875d3 65%, #16a78f);
  box-shadow: 0 16px 40px #1d4f9822;
}
.eyebrow {
  margin: 0 0 0.55rem;
  color: #dcf5ff;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
h1,
h2,
h3 {
  font-family: Poppins, Inter, sans-serif;
  line-height: 1.18;
}
h1 {
  margin: 0;
  font-size: clamp(2rem, 6vw, 3.35rem);
  letter-spacing: -0.035em;
}
.hero p:last-child {
  max-width: 66ch;
  margin: 0.8rem 0 0;
  color: #eff6ff;
  font-size: 1.05rem;
}
.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(230px, 0.8fr);
  gap: 1.2rem;
  margin-top: 1.2rem;
  align-items: start;
}
.panel {
  padding: clamp(1rem, 3vw, 1.5rem);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 8px 24px #1734510a;
}
.panel h2 {
  margin: 0 0 0.4rem;
  font-size: 1.25rem;
}
.instructions {
  margin: 0;
  padding-left: 1.2rem;
  color: var(--muted);
}
.instructions li + li {
  margin-top: 0.45rem;
}
.game-panel {
  min-height: 340px;
}
.game-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.score {
  color: var(--muted);
  font-weight: 700;
}
.game-content {
  min-height: 180px;
}
button,
input,
select,
textarea {
  font: inherit;
}
button {
  touch-action: manipulation;
}
.btn {
  min-height: 44px;
  padding: 0.65rem 1rem;
  border: 0;
  border-radius: 11px;
  color: white;
  background: var(--brand);
  font-weight: 700;
  cursor: pointer;
}
.btn:hover {
  background: var(--brand-dark);
}
.btn.secondary {
  color: var(--ink);
  background: #eaf0f7;
}
.btn.secondary:hover {
  background: #dfe8f2;
}
.controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
  margin-top: 1rem;
}
.answer-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 1rem;
}
input[type="text"],
input[type="number"],
textarea,
select {
  width: 100%;
  min-height: 46px;
  padding: 0.7rem 0.8rem;
  border: 1px solid #c9d6e4;
  border-radius: 10px;
  color: var(--ink);
  background: #fff;
}
textarea {
  min-height: 130px;
  resize: vertical;
}
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
button:focus-visible,
a:focus-visible {
  outline: 3px solid #ffbf47;
  outline-offset: 3px;
}
.prompt {
  margin: 0.4rem 0 1rem;
  font-size: 1.2rem;
  font-weight: 750;
}
.hint {
  margin: 0.35rem 0;
  color: var(--muted);
}
.feedback {
  min-height: 1.6em;
  margin: 0.75rem 0 0;
  color: var(--brand-dark);
  font-weight: 700;
}
.feedback[data-kind="success"] {
  color: #087b5d;
}
.feedback[data-kind="error"] {
  color: #b42318;
}
.letter-grid {
  display: grid;
  grid-template-columns: repeat(8, minmax(30px, 1fr));
  gap: 4px;
  max-width: 440px;
  margin: 1rem auto;
}
.letter-cell {
  aspect-ratio: 1;
  min-width: 0;
  padding: 0;
  border: 1px solid #d7e1ee;
  border-radius: 7px;
  color: var(--ink);
  background: #f6f9fd;
  font-weight: 800;
}
.letter-cell.selected {
  color: white;
  background: var(--brand);
}
.choice-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
  gap: 0.65rem;
}
.choice {
  min-height: 48px;
  padding: 0.7rem;
  border: 1px solid var(--line);
  border-radius: 11px;
  color: var(--ink);
  background: white;
  text-align: left;
  cursor: pointer;
}
.choice:hover,
.choice.selected {
  border-color: var(--brand);
  background: #eef4ff;
}
.pair-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
}
.pair-column {
  display: grid;
  gap: 0.55rem;
}
.word-tile {
  min-height: 46px;
  padding: 0.6rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f8fafc;
  cursor: pointer;
  text-align: center;
}
.word-tile.selected {
  border-color: var(--brand);
  background: #eaf1ff;
}
.word-tile.matched {
  color: #087b5d;
  border-color: #9dd9c5;
  background: #ecfbf5;
}
.bingo-grid,
.battle-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(42px, 1fr));
  gap: 5px;
  max-width: 440px;
  margin: 1rem auto;
}
.bingo-cell,
.battle-cell {
  min-height: 52px;
  padding: 0.35rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: #f8fafc;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
}
.bingo-cell.marked {
  color: white;
  background: var(--accent);
}
.battle-cell.hit {
  color: white;
  background: #d34d52;
}
.battle-cell.miss {
  color: var(--muted);
  background: #e9eef4;
}
.jep-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(70px, 1fr));
  gap: 0.45rem;
}
.jep-tile {
  min-height: 58px;
  color: white;
  background: #174b9d;
  font-weight: 800;
}
.site-footer {
  padding: 1.5rem 1rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  background: white;
  text-align: center;
}
.site-footer p {
  margin: 0.2rem;
}
.prototype-section {
  margin-top: 2.2rem;
}
.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 1rem;
  margin-bottom: 1rem;
}
.section-heading h2 {
  margin: 0;
  font-size: clamp(1.5rem, 4vw, 2rem);
}
.section-heading .eyebrow {
  margin-bottom: 0.35rem;
  color: var(--brand);
}
.prototype-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.9rem;
}
.prototype-card {
  min-height: 150px;
  padding: 1.1rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  color: var(--ink);
  background: white;
  box-shadow: 0 8px 24px #1734510a;
  text-decoration: none;
  transition:
    transform 0.16s ease,
    border-color 0.16s ease,
    box-shadow 0.16s ease;
}
.prototype-card:hover {
  transform: translateY(-3px);
  border-color: #9bb7e9;
  box-shadow: 0 12px 28px #17345116;
}
.prototype-icon {
  font-size: 1.55rem;
  line-height: 1.2;
}
.prototype-title {
  font-family: Poppins, Inter, sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
}
.prototype-desc {
  color: var(--muted);
  font-size: 0.93rem;
}
.prototype-note {
  margin: 1.25rem 0 0;
  padding: 1rem 1.2rem;
  border-left: 4px solid var(--accent);
  border-radius: 8px;
  color: var(--muted);
  background: #e9f7f3;
}
[hidden] {
  display: none !important;
}
@media (max-width: 720px) {
  .page {
    margin-top: 1rem;
  }
  .content-grid {
    grid-template-columns: 1fr;
  }
  .nav-wrap {
    align-items: flex-start;
    padding: 0.8rem 0;
    flex-direction: column;
  }
  .site-nav {
    gap: 0.8rem;
  }
  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }
  .prototype-grid {
    grid-template-columns: repeat(auto-fit, minmax(175px, 1fr));
  }
}
@media (max-width: 390px) {
  .letter-grid {
    gap: 2px;
  }
  .letter-cell {
    font-size: 0.8rem;
  }
  .bingo-cell,
  .battle-cell {
    min-height: 44px;
    font-size: 0.72rem;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
