@font-face {
  font-family: "Baloo 2";
  src: url("./baloo-2-800.woff2") format("woff2");
  font-weight: 800;
  font-display: swap;
}

@font-face {
  font-family: Nunito;
  src: url("./nunito-700.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

@font-face {
  font-family: Nunito;
  src: url("./nunito-800.woff2") format("woff2");
  font-weight: 800;
  font-display: swap;
}

:root {
  color-scheme: light;
  --ink: #2a1b3d;
  --muted: #5b4a70;
  --cream: #fff4e6;
  --well: #f7e6d2;
  --edge: #e8d6c2;
  --coral: #ff6f59;
  --hint: #a03223;
  --yellow: #ffc93c;
  --yellow-edge: #e0a21a;
  --mint: #19b394;
  --mint-edge: #0e8a71;
  --white: #fff;
  --display: "Baloo 2", "Arial Rounded MT Bold", sans-serif;
  --body: Nunito, system-ui, sans-serif;
  --page-width: 70rem;
  --gutter: clamp(1.25rem, 5vw, 4rem);
  --section-space: clamp(3rem, 7.2vw, 6rem);
  --card-radius: 1.75rem;
  --button-radius: 1.125rem;
}

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font: 700 1rem/1.5 var(--body);
}

[hidden] { display: none !important; }
figure, p, dl, dd, ol, ul { margin: 0; }
h1, h2, h3, .footer-brand { margin: 0; font-family: var(--display); font-weight: 800; line-height: 1.06; }
h1 { font-size: clamp(2.5rem, 6.1vw, 4.5rem); letter-spacing: -.025em; text-wrap: balance; }
h2 { font-size: clamp(2rem, 4vw, 3rem); text-wrap: balance; }
h3 { font-size: clamp(1.375rem, 2.5vw, 1.75rem); }
a { color: inherit; text-underline-offset: .2em; }
button, summary { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
#demo, #how { scroll-margin-top: 1.5rem; }
#demo-title, #main { outline: none; }
.wrap { width: min(var(--page-width), 100% - 2 * var(--gutter)); margin-inline: auto; }

.skip-link {
  position: absolute;
  z-index: 3;
  inset: .75rem auto auto .75rem;
  padding: .75rem 1rem;
  background: var(--ink);
  color: var(--white);
  transform: translateY(calc(-100% - 1rem));
}
.skip-link:focus { transform: none; }

.site-header { border-bottom: 2px solid var(--well); }
.header-content, .footer-content, .availability-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem 2rem;
}
.header-content { padding-block: .75rem; }
.brand { display: inline-flex; align-items: center; min-height: 2.75rem; }
.logo { display: block; width: 10rem; height: auto; }
.site-header nav, .site-footer nav, .hero-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .75rem 1.25rem;
}
.text-link { display: inline-flex; align-items: center; min-height: 2.75rem; font-weight: 800; }
.language { position: relative; z-index: 1; }
.language summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  min-height: 2.75rem;
  padding: .375rem .75rem;
  border: 2px solid var(--ink);
  border-radius: .75rem;
  list-style: none;
  background: var(--white);
  font-weight: 800;
}
.language summary::-webkit-details-marker { display: none; }
.chevron { width: .5rem; height: .5rem; border: solid var(--ink); border-width: 0 2px 2px 0; transform: rotate(45deg); }
.language[open] .chevron { transform: rotate(225deg); }
.language ul {
  position: absolute;
  inset: calc(100% + .5rem) 0 auto auto;
  min-width: 9rem;
  padding: .375rem;
  list-style: none;
  border: 2px solid var(--ink);
  border-radius: .75rem;
  background: var(--white);
  box-shadow: 0 4px var(--edge);
}
.language a { display: flex; align-items: center; min-height: 2.75rem; padding-inline: .5rem; border-radius: .375rem; }
.language a:hover, .language a[aria-current] { background: var(--well); }

.hero, .how-grid {
  display: grid;
  align-items: center;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(2rem, 5.5vw, 4rem);
  padding-block: var(--section-space);
}
.hero-copy > p {
  max-width: 42ch;
  margin-block: 1rem 1.75rem;
  font-size: clamp(1.0625rem, 1.7vw, 1.25rem);
  color: var(--muted);
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .75rem;
  min-height: 3.5rem;
  padding: .625rem 1.125rem;
  border: 2px solid var(--ink);
  border-radius: var(--button-radius);
  background: var(--ink);
  color: var(--white);
  text-decoration: none;
  font: 800 1.1875rem/1.15 var(--display);
}
.button:hover { background: var(--muted); }
.button:active { box-shadow: inset 0 3px var(--ink); }
.platforms { display: inline-flex; align-items: center; gap: .5rem; font-weight: 800; }
.phone-icon {
  position: relative;
  width: .67rem;
  height: 1rem;
  border: 2px solid currentColor;
  border-radius: 3px;
}
.phone-icon::after { content: ""; position: absolute; inset: auto 0 2px; border-bottom: 1px solid currentColor; }

.board {
  min-width: 0;
  padding: clamp(.875rem, 2.4vw, 1.75rem);
  border-radius: clamp(1.5rem, 3vw, 2rem);
  background: var(--coral);
}
.board-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .5rem .75rem;
  margin-bottom: .875rem;
}
.board-header h3 { font-size: clamp(1.25rem, 2.2vw, 1.625rem); }
.eyebrow { font-size: .8125rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.counter {
  display: inline-flex;
  align-items: center;
  gap: .375rem;
  padding: .375rem .875rem;
  border-radius: 2rem;
  background: var(--ink);
  color: var(--white);
  font-weight: 800;
  font-size: .875rem;
}
.counter > [aria-hidden] { color: var(--yellow); font-size: 1rem; line-height: 1; }
.board-surface {
  display: grid;
  justify-items: center;
  gap: .75rem;
  padding: clamp(1rem, 3vw, 2rem) .75rem;
  border-radius: clamp(1rem, 2vw, 1.5rem);
  background: var(--cream);
  text-align: center;
}
.goal { color: var(--muted); }
.word-separator { width: 3.5rem; margin-block: .25rem; border-bottom: 2px solid var(--edge); }
.word-row { display: flex; justify-content: center; gap: clamp(.25rem, 1vw, .75rem); }
.tile {
  display: grid;
  position: relative;
  place-items: center;
  aspect-ratio: 1;
  padding: 0;
  border: 2px solid transparent;
  background: var(--white);
  box-shadow: 0 4px var(--edge);
  font: 800 1.375rem/1 var(--display);
}
.history .tile, .target .tile { width: clamp(1.625rem, 3.2vw, 2.75rem); border-radius: 50%; }
.target .tile { border: 2px dashed var(--muted); background: transparent; box-shadow: none; }
.large .tile, .play .tile {
  width: clamp(2.75rem, 6.8vw, 5.25rem);
  border-radius: clamp(.875rem, 1.8vw, 1.375rem);
  box-shadow: 0 5px var(--edge);
  font-size: clamp(1.875rem, 3.8vw, 3rem);
}
.large { margin-top: .25rem; }
.tile.changed { background: var(--yellow); box-shadow: 0 4px var(--yellow-edge); }
.tile.changed::after {
  content: "";
  position: absolute;
  bottom: 12%;
  width: 36%;
  border-bottom: 3px solid var(--ink);
  border-radius: 3px;
}
.tile.hint { border: 2px dashed var(--hint); }
.tile.hint::before {
  content: "↓";
  position: absolute;
  inset: -.5rem -.25rem auto auto;
  display: grid;
  place-items: center;
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 50%;
  background: var(--ink);
  color: var(--white);
  font: 800 .875rem/1 var(--body);
}
.tile.selected { border-color: var(--ink); }
.tile.found { background: var(--mint); box-shadow: 0 4px var(--mint-edge); }
.tile.found::after {
  content: "✓";
  position: absolute;
  inset: -.4rem -.15rem auto auto;
  display: grid;
  place-items: center;
  width: 1.125rem;
  height: 1.125rem;
  border: 1px solid var(--cream);
  border-radius: 50%;
  background: var(--ink);
  color: var(--white);
  font: 800 .75rem/1 var(--body);
}
button.tile:hover, button.tile:active { border-color: var(--ink); }

.how-section { background: var(--well); }
.how-grid { align-items: start; }
.rules, .chapters { list-style: none; padding: 0; }
.rules { display: grid; gap: 1.5rem; margin-top: 1.5rem; }
.rules li { display: flex; align-items: flex-start; gap: 1rem; }
.rule-number, .chapter-number {
  display: grid;
  flex: 0 0 2.75rem;
  place-items: center;
  height: 2.75rem;
  border-radius: .875rem;
  background: var(--yellow);
  box-shadow: 0 3px var(--yellow-edge);
  font: 800 1.25rem/1 var(--display);
}
.rules p, .mode-card > p, .benefits dd { color: var(--muted); }
.rules p { margin-top: .25rem; }
[data-game] { display: grid; justify-items: center; gap: 1rem; width: 100%; }
.history-stack { display: grid; gap: .5rem; }
.history-stack:empty, .demo-controls:empty, .changes:empty { display: none; }
.demo-status { min-height: 2.5rem; margin-top: .25rem; font-weight: 800; }
.replace-button {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  min-height: 3rem;
  padding: .375rem .625rem .375rem 1rem;
  border: 2px solid var(--edge);
  border-radius: var(--button-radius);
  background: var(--white);
  font-weight: 800;
}
.replace-button:hover { border-color: var(--ink); }
.key {
  padding: .25rem .625rem;
  border-radius: .5rem;
  background: var(--ink);
  color: var(--white);
  font-weight: 800;
}
.changes {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: .5rem;
  padding: 0;
  list-style: none;
}
.change {
  padding: .25rem .625rem;
  border-radius: 1rem;
  background: var(--white);
  box-shadow: 0 2px var(--edge);
  font-size: .875rem;
}

.modes { padding-block: var(--section-space); }
.mode-grid, .benefits {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 1.5rem;
  margin-top: 1.5rem;
}
.mode-card {
  padding: clamp(1rem, 3vw, 2rem);
  border: 2px solid var(--edge);
  border-radius: var(--card-radius);
  background: var(--white);
  box-shadow: 0 4px var(--edge);
}
.mode-card > p { margin-block: .375rem 1.25rem; }
.chapters { display: grid; gap: .5rem; }
.chapters li {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .625rem;
  border: 2px solid transparent;
  border-radius: 1.125rem;
  background: var(--cream);
}
.chapters li:nth-child(2) { border-color: var(--ink); }
.chapter-number { flex-basis: 2.25rem; height: 2.25rem; border-radius: .625rem; }
.chapters li:first-child .chapter-number { background: var(--ink); color: var(--white); box-shadow: none; }
.chapters li:last-child .chapter-number { background: var(--white); box-shadow: 0 3px var(--edge); }
.chapter-title { flex: 1; min-width: 0; line-height: 1.2; }
.chapter-title small { display: block; margin-top: .25rem; color: var(--muted); font-size: .875rem; }
.progress { font-size: .8125rem; font-weight: 800; }
.daily-example {
  display: grid;
  justify-items: center;
  gap: 1rem;
  padding: 1.75rem .5rem;
  border-radius: 1.125rem;
  background: var(--well);
}
.daily-words { display: flex; align-items: center; gap: clamp(.25rem, 1.25vw, 1rem); }
.daily-words .word-row { gap: .25rem; }
.benefits > div { border-top: 2px solid var(--edge); padding-top: 1rem; }
.benefits dt { font: 800 1.5rem/1.2 var(--display); }
.benefits dd { margin-top: .25rem; }

.availability { background: var(--coral); }
.availability-content { padding-block: clamp(2.5rem, 5vw, 4rem); }
.availability .platforms { margin-top: .5rem; }
.site-footer { background: var(--ink); color: var(--cream); }
.site-footer :focus-visible { outline-color: var(--cream); }
.footer-content { padding-block: 1.25rem; }
.footer-content nav { flex-wrap: wrap; }
.footer-brand { font-size: 1.625rem; }
.site-footer a { display: inline-flex; align-items: center; min-height: 2.75rem; }
.not-found { display: grid; justify-items: start; gap: 1.5rem; padding-block: var(--section-space); }
.information { max-width: 44rem; padding-block: var(--section-space); }
.information h1 { font-size: clamp(2.25rem, 6vw, 4rem); margin-bottom: 2rem; }
.information h2 { font-size: 1.5rem; margin-bottom: .5rem; }
.information section + section { margin-top: 1.5rem; }
.information a { text-decoration: underline; overflow-wrap: anywhere; }

@media (max-width: 54rem) {
  .hero, .how-grid, .mode-grid { grid-template-columns: minmax(0, 1fr); }
  .hero h1 { max-width: 16ch; }
  .hero-board, .demo-board { width: min(100%, 34rem); }
  .large .tile, .play .tile { width: clamp(2.75rem, 15vw, 5.25rem); }
  .history .tile, .target .tile { width: clamp(1.625rem, 8vw, 2.75rem); }
}

@media (max-width: 30rem) {
  .header-content { gap: .125rem 1rem; }
  .logo { width: 9rem; }
  .hero h1 { text-wrap: initial; }
  .benefits { grid-template-columns: minmax(0, 1fr); }
  .daily-words .tile { width: clamp(1.5rem, 7.5vw, 2rem); }
}

@media (max-width: 22rem) {
  .play .tile, .large .tile { width: 2.75rem; }
  .progress { max-width: 8ch; }
}
