:root {
  color-scheme: light;
  --bg: #f6f7fb;
  --surface: #ffffff;
  --ink: #17202a;
  --muted: #5d6675;
  --line: #dde3ed;
  --teal: #087f8c;
  --teal-dark: #045b66;
  --coral: #ef6f5e;
  --yellow: #f4c95d;
  --green: #2fbf71;
  --shadow: 0 24px 70px rgba(23, 32, 42, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  min-height: 100%;
  margin: 0;
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  line-height: 1.5;
}

a {
  color: inherit;
  text-decoration: none;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 22px 0;
}

.brand,
.main-nav,
.actions,
.score-row,
.stat-strip {
  display: flex;
  align-items: center;
}

.brand {
  gap: 10px;
  font-weight: 800;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 8px;
  background: var(--ink);
  color: #ffffff;
  font-size: 0.78rem;
  letter-spacing: 0;
}

.main-nav {
  gap: 8px;
}

.main-nav a {
  border-radius: 8px;
  padding: 10px 14px;
  color: var(--muted);
  font-weight: 700;
}

.main-nav a:hover,
.main-nav a[aria-current="page"] {
  background: var(--surface);
  color: var(--ink);
}

main {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(320px, 0.98fr);
  align-items: center;
  gap: 56px;
  min-height: calc(100svh - 180px);
  padding: 46px 0 78px;
}

.hero-copy {
  max-width: 650px;
}

.profile-header {
  justify-content: flex-start;
}

.profile-hero {
  grid-template-columns: 1fr;
}

.profile-hero .hero-copy {
  max-width: 800px;
}

.profile-hero p:not(.eyebrow) {
  max-width: 620px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--teal-dark);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 760px;
  margin-bottom: 20px;
  font-size: 5.25rem;
  line-height: 0.95;
}

h2 {
  margin-bottom: 0;
  font-size: 3.25rem;
  line-height: 1;
}

h3 {
  margin-bottom: 8px;
  font-size: 1.08rem;
}

.hero-copy p:not(.eyebrow),
.page-heading p,
.overview p,
.game-content span:last-child {
  color: var(--muted);
  font-size: 1.06rem;
}

.actions {
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 18px;
  font-weight: 800;
}

.button.primary {
  border-color: var(--teal);
  background: var(--teal);
  color: #ffffff;
}

.button.secondary {
  background: var(--surface);
}

.hero-panel {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(8, 127, 140, 0.14), transparent 38%),
    linear-gradient(315deg, rgba(239, 111, 94, 0.18), transparent 40%),
    var(--surface);
  box-shadow: var(--shadow);
  padding: 22px;
}

.score-row {
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  font-weight: 900;
}

.score-row strong {
  border-radius: 8px;
  background: var(--yellow);
  padding: 8px 12px;
}

.question-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.84);
  padding: 28px;
}

.question-label,
.tag {
  display: inline-flex;
  border-radius: 999px;
  background: rgba(8, 127, 140, 0.1);
  color: var(--teal-dark);
  font-size: 0.76rem;
  font-weight: 900;
  padding: 6px 10px;
}

.question-card > strong {
  display: block;
  margin: 18px 0;
  font-size: 3.5rem;
  line-height: 1;
}

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

.answer-grid span,
.game-art span {
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  font-weight: 900;
}

.answer-grid span {
  min-height: 52px;
}

.answer-grid .is-correct {
  border-color: rgba(47, 191, 113, 0.3);
  background: rgba(47, 191, 113, 0.12);
  color: #167548;
}

.stat-strip {
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.stat-strip span {
  border-radius: 8px;
  background: var(--ink);
  color: #ffffff;
  font-size: 0.82rem;
  font-weight: 800;
  padding: 9px 12px;
}

.overview {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 36px;
  border-top: 1px solid var(--line);
  padding: 56px 0 72px;
}

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

.route-grid article,
.game-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.route-grid article {
  padding: 18px;
}

.route-grid article > span {
  display: inline-block;
  margin-bottom: 16px;
  color: var(--coral);
  font-weight: 900;
}

.page-heading {
  padding: 54px 0 26px;
}

.page-heading h1 {
  margin-bottom: 14px;
}

.game-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
  gap: 18px;
  padding: 18px 0 72px;
}

.game-card {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr) auto;
  align-items: center;
  gap: 20px;
  min-height: 178px;
  padding: 18px;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    border-color 180ms ease;
}

.game-card:hover {
  border-color: rgba(8, 127, 140, 0.36);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.game-art {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  height: 132px;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(8, 127, 140, 0.2), transparent),
    rgba(239, 111, 94, 0.14);
  padding: 10px;
}

.game-art span {
  min-width: 0;
  font-size: 1.45rem;
}

.game-art span:last-child {
  grid-column: 1 / -1;
  background: var(--ink);
  color: #ffffff;
}

.game-content {
  display: grid;
  min-width: 0;
  gap: 8px;
}

.game-content strong {
  font-size: 1.75rem;
  line-height: 1.05;
}

.game-cta {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: var(--teal);
  color: #ffffff;
  font-weight: 900;
  padding: 0 16px;
  white-space: nowrap;
}

@media (max-width: 860px) {
  h1 {
    font-size: 4rem;
  }

  h2 {
    font-size: 2.75rem;
  }

  .question-card > strong {
    font-size: 3rem;
  }

  .hero,
  .overview {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    padding-top: 28px;
  }

  .route-grid {
    grid-template-columns: 1fr;
  }

  .game-card {
    grid-template-columns: 112px minmax(0, 1fr);
  }

  .game-cta {
    grid-column: 1 / -1;
  }
}

@media (max-width: 560px) {
  h1 {
    font-size: 2.85rem;
  }

  h2 {
    font-size: 2.25rem;
  }

  .question-card > strong {
    font-size: 2.25rem;
  }

  .site-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .main-nav {
    width: 100%;
  }

  .main-nav a {
    flex: 1;
    text-align: center;
  }

  .game-card {
    grid-template-columns: 1fr;
  }

  .game-art {
    width: 100%;
  }
}
