:root {
  --blue: #075ed1;
  --blue-2: #0b7df0;
  --orange: #ff6b00;
  --green: #58ad19;
  --purple: #7a39c2;
  --yellow: #ffc800;
  --ink: #111827;
  --soft-ink: #4b5565;
  --line: #dbe4f0;
  --paper: #ffffff;
  --wash: #f4f8ff;
  --shadow: 0 14px 0 rgba(17, 24, 39, 0.08);
  --soft-shadow: 0 18px 38px rgba(17, 24, 39, 0.11);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(7, 94, 209, 0.05) 0 25%, transparent 25% 50%, rgba(88, 173, 25, 0.05) 50% 75%, transparent 75%),
    var(--wash);
  background-size: 42px 42px;
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.5;
}

button,
input {
  font: inherit;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 3px solid rgba(7, 94, 209, 0.35);
  outline-offset: 3px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 78px;
  padding: 10px clamp(14px, 3vw, 34px);
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 3px solid #e4ecf7;
}

.brand {
  min-height: 50px;
  display: inline-flex;
  align-items: center;
}

.brand img {
  width: clamp(210px, 28vw, 360px);
  height: auto;
  display: block;
}

.top-nav {
  display: flex;
  gap: 8px;
  align-items: center;
}

.top-nav a,
.plain-link {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  border-radius: 8px;
  color: var(--blue);
  font-weight: 800;
  text-decoration: none;
}

.top-nav a:hover,
.plain-link:hover {
  background: #eaf3ff;
}

main {
  width: min(1440px, 100%);
  margin: 0 auto;
  padding: clamp(14px, 3vw, 34px);
}

.hero-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(310px, 0.8fr);
  gap: clamp(18px, 3vw, 34px);
  align-items: stretch;
  padding: clamp(20px, 4vw, 42px);
  background: var(--paper);
  border: 3px solid #e1eaf6;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--orange);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(38px, 6vw, 76px);
  line-height: 0.96;
  letter-spacing: 0;
}

h2 {
  margin: 0;
  font-size: clamp(24px, 3vw, 36px);
  line-height: 1.08;
  letter-spacing: 0;
}

h3 {
  letter-spacing: 0;
}

.hero-text {
  max-width: 700px;
  margin: 18px 0 0;
  color: var(--soft-ink);
  font-size: clamp(16px, 2vw, 20px);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.primary-action,
.secondary-action {
  min-height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  padding: 0 18px;
  font-weight: 900;
  text-decoration: none;
}

.primary-action {
  background: var(--blue);
  color: #fff;
  box-shadow: 0 8px 0 var(--blue-2);
}

.secondary-action {
  background: #fff4e9;
  color: #9a3c00;
  border: 2px solid #ffd0a8;
}

.hero-board {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.board-card {
  min-height: 142px;
  display: grid;
  align-content: space-between;
  padding: 18px;
  border-radius: 8px;
  color: #fff;
  box-shadow: inset 0 -8px 0 rgba(0, 0, 0, 0.12);
}

.board-card span {
  font-weight: 900;
}

.board-card strong {
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1;
}

.blue-card { background: var(--blue); }
.orange-card { background: var(--orange); }
.green-card { background: var(--green); }
.purple-card { background: var(--purple); }

.finder-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, auto);
  gap: 18px;
  align-items: end;
  margin: 24px 0;
  padding: 18px;
  background: #111827;
  border-radius: 8px;
  box-shadow: var(--soft-shadow);
}

.search-wrap {
  display: grid;
  gap: 8px;
}

.search-wrap label,
.filter-block h2 {
  color: #fff;
  font-size: 14px;
  font-weight: 900;
}

.search-wrap input {
  width: 100%;
  min-height: 58px;
  padding: 0 16px;
  border: 0;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-size: 18px;
}

.filter-strip,
.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  min-height: 44px;
  border: 2px solid #d7e2f0;
  border-radius: 8px;
  padding: 0 12px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  font-weight: 900;
}

.chip:hover {
  border-color: var(--blue);
}

.chip.is-active {
  border-color: var(--blue);
  background: var(--blue);
  color: #fff;
}

.learning-lanes,
.showcase,
.game-library,
.side-filters {
  background: var(--paper);
  border: 3px solid #e1eaf6;
  border-radius: 8px;
}

.learning-lanes,
.showcase,
.game-library {
  padding: clamp(16px, 3vw, 24px);
}

.section-head {
  margin-bottom: 16px;
}

.split-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
}

.lane-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.lane-card {
  min-height: 142px;
  display: grid;
  align-content: space-between;
  gap: 12px;
  padding: 16px;
  border: 3px solid transparent;
  border-radius: 8px;
  background: #fff;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 10px 0 rgba(17, 24, 39, 0.08);
}

.lane-card:hover {
  transform: translateY(-2px);
}

.lane-card strong {
  display: block;
  font-size: 20px;
}

.lane-card span {
  color: var(--soft-ink);
  font-weight: 800;
}

.lane-icon {
  width: 46px;
  height: 46px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 900;
}

.showcase {
  margin: 24px 0;
}

.featured-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.library-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.side-filters {
  position: sticky;
  top: 104px;
  display: grid;
  gap: 22px;
  padding: 18px;
  background: #182235;
}

.filter-block {
  display: grid;
  gap: 12px;
}

.filter-block h2 {
  margin: 0;
}

.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 14px;
}

.game-card {
  min-height: 184px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 12px;
  padding: 14px;
  border: 3px solid #e6edf8;
  border-radius: 8px;
  background: #fff;
  color: inherit;
  text-decoration: none;
  box-shadow: 0 8px 0 rgba(17, 24, 39, 0.06);
}

.game-card:hover {
  border-color: var(--blue);
  transform: translateY(-2px);
}

.game-thumb {
  min-height: 82px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #fff;
  font-size: 30px;
  font-weight: 900;
  box-shadow: inset 0 -8px 0 rgba(0, 0, 0, 0.12);
}

.game-card h3 {
  margin: 0;
  font-size: 17px;
  line-height: 1.2;
}

.game-meta {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  color: var(--soft-ink);
  font-size: 13px;
  font-weight: 900;
}

.result-count,
.empty-state,
.site-footer p {
  color: var(--soft-ink);
  font-weight: 700;
}

.load-row {
  display: flex;
  justify-content: center;
  margin-top: 20px;
}

.load-more {
  min-height: 50px;
  border: 0;
  border-radius: 8px;
  padding: 0 20px;
  background: var(--green);
  color: #fff;
  cursor: pointer;
  font-weight: 900;
  box-shadow: 0 8px 0 #3d8111;
}

.load-more:hover {
  background: #4d9c17;
}

.load-more[hidden],
.empty-state[hidden] {
  display: none;
}

.site-footer {
  display: grid;
  justify-items: center;
  gap: 12px;
  margin-top: 24px;
  padding: 30px 18px 42px;
  background: #fff;
  border-top: 3px solid #e1eaf6;
  text-align: center;
}

.site-footer img {
  width: min(320px, 82vw);
  height: auto;
}

.site-footer p {
  max-width: 760px;
  margin: 0;
}

[data-color="blue"] { background: var(--blue); }
[data-color="orange"] { background: var(--orange); }
[data-color="green"] { background: var(--green); }
[data-color="purple"] { background: var(--purple); }
[data-color="yellow"] { background: #d69b00; color: #1f1700; }

@media (max-width: 1040px) {
  .hero-shell,
  .finder-panel,
  .library-layout {
    grid-template-columns: 1fr;
  }

  .side-filters {
    position: static;
  }

  .lane-grid,
  .featured-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .site-header {
    position: static;
    flex-direction: column;
    align-items: stretch;
  }

  .brand img {
    width: min(300px, 100%);
  }

  .top-nav {
    overflow-x: auto;
    padding-bottom: 4px;
  }

  main {
    padding: 12px;
  }

  .hero-shell,
  .finder-panel,
  .learning-lanes,
  .showcase,
  .game-library,
  .side-filters {
    padding: 14px;
  }

  .hero-board,
  .lane-grid,
  .featured-row,
  .game-grid {
    grid-template-columns: 1fr;
  }

  .board-card {
    min-height: 110px;
  }

  .split-head {
    align-items: start;
    flex-direction: column;
  }

  .filter-strip,
  .chip-list {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .chip {
    flex: 0 0 auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .lane-card,
  .game-card {
    transition: none;
  }
}
