:root {
  --bg: #f3f0e8;
  --panel: #fffdf7;
  --panel-soft: #f8f6ef;
  --ink: #181818;
  --muted: #2f2f2f;
  --line: #1a1a1a;
  --primary: #df3c22;
  --accent: #0f6dcf;
  --accent-2: #f6b815;
  --grid: rgba(24, 24, 24, 0.08);
  --shadow: 4px 4px 0 rgba(26, 26, 26, 0.16);
  --shadow-strong: 6px 6px 0 rgba(26, 26, 26, 0.24);
}

* {
  box-sizing: border-box;
  border-radius: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background-color: var(--bg);
  background-image:
    radial-gradient(circle at 8% -6%, rgba(246, 184, 21, 0.2), transparent 26%),
    radial-gradient(circle at 100% 0%, rgba(15, 109, 207, 0.12), transparent 24%),
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 20px 20px;
  font-family: "Space Grotesk", "Avenir Next", "Segoe UI", sans-serif;
  line-height: 1.55;
}

::selection {
  background: var(--accent-2);
  color: var(--ink);
}

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

.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 1100;
  padding: 10px 14px;
  border: 3px solid var(--line);
  background: var(--accent-2);
  font-weight: 700;
}

.skip-link:focus {
  top: 16px;
}

.hackclub-flag {
  position: fixed;
  top: 0;
  left: 10px;
  z-index: 999;
  width: min(256px, calc(100vw - 20px));
  line-height: 0;
}

.hackclub-flag img {
  display: block;
  width: 100%;
  height: auto;
  border: 0;
}

.page {
  width: min(1160px, 100% - 28px);
  margin: 0 auto;
  padding: 88px 0 56px;
}

.hero-copy {
  display: grid;
  align-content: start;
  gap: 12px;
  max-width: 980px;
  justify-items: start;
}

.hero-logo {
  display: block;
  width: clamp(260px, 44vw, 520px);
  max-width: 100%;
  height: auto;
  margin: 0;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.section {
  margin-top: 22px;
  border: 3px solid var(--line);
  background: linear-gradient(180deg, #fffef9 0%, var(--panel) 100%);
  padding: 22px;
  box-shadow: var(--shadow);
}

.section h2 {
  margin: 0 0 14px;
  font-family: "Silkscreen", "Space Grotesk", sans-serif;
  font-size: clamp(1.1rem, 1rem + 1vw, 1.6rem);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.section p {
  margin: 0;
  font-weight: 500;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.9fr);
  gap: 24px;
  align-items: start;
}

.eyebrow {
  display: inline-block;
  margin-bottom: 0;
  border: 2px solid var(--line);
  background: var(--accent-2);
  padding: 4px 8px;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0;
  font-family: "Silkscreen", "Space Grotesk", sans-serif;
  font-size: clamp(1.45rem, 1rem + 2.4vw, 2.55rem);
  line-height: 1.15;
  max-width: 20ch;
}

.hero .subtext {
  margin-top: 0;
  max-width: 44ch;
  font-size: 1.02rem;
  color: var(--muted);
}

.event-meta {
  margin-top: 2px;
  display: inline-block;
  border-top: 3px solid var(--line);
  border-bottom: 3px solid var(--line);
  background: var(--panel-soft);
  padding: 8px 8px;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  justify-self: start;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 6px;
  justify-self: start;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 3px solid var(--line);
  min-height: 44px;
  padding: 8px 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  box-shadow: 3px 3px 0 var(--line);
  transition: transform 120ms steps(2, end), background-color 120ms steps(2, end),
    color 120ms steps(2, end), box-shadow 120ms steps(2, end);
}

.btn:focus-visible,
.btn:hover {
  transform: translate(-2px, -2px);
  box-shadow: 5px 5px 0 var(--line);
}

.btn:active {
  transform: translate(0, 0);
  box-shadow: 2px 2px 0 var(--line);
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-primary:focus-visible,
.btn-primary:hover {
  background: #fff;
  color: var(--line);
}

.btn-ghost {
  background: #fff;
}

.btn-ghost:focus-visible,
.btn-ghost:hover {
  background: var(--line);
  color: #fff;
}

.status-line {
  margin-top: 6px;
  font-family: "Silkscreen", "Space Grotesk", sans-serif;
  font-size: 0.84rem;
  text-transform: uppercase;
}

.cursor {
  display: inline-block;
  margin-left: 2px;
  animation: blink 1s steps(1, end) infinite;
}

@keyframes blink {
  0%,
  49% {
    opacity: 1;
  }
  50%,
  100% {
    opacity: 0;
  }
}

.track {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
}

.hero-track {
  grid-column: 1 / -1;
  grid-template-columns: repeat(16, minmax(0, 1fr));
  width: 100%;
  margin-top: 0;
}

.mini-game {
  border: 3px solid var(--line);
  background: linear-gradient(180deg, #ffffff 0%, #f8f8f8 100%);
  padding: 12px;
  display: grid;
  gap: 10px;
  align-content: start;
  align-self: center;
  box-shadow: var(--shadow-strong);
}

.mini-game-head h2 {
  margin: 0;
  font-family: "Silkscreen", "Space Grotesk", sans-serif;
  font-size: 1rem;
}

.mini-game-hook {
  margin: 6px 0 0;
  font-weight: 700;
  font-size: 0.9rem;
}

.mini-game-head p {
  margin: 4px 0 0;
  font-size: 0.9rem;
  font-weight: 600;
}

.mini-game-canvas {
  display: block;
  width: 100%;
  max-width: 426px;
  aspect-ratio: 213 / 130;
  border: 0;
  outline: 3px solid var(--line);
  outline-offset: 0;
  background: #f8f8f8;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.mini-game-bar {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  border: 2px solid var(--line);
  background: #ffffff;
  padding: 7px 8px;
  font-family: "Silkscreen", "Space Grotesk", sans-serif;
  font-size: 0.72rem;
  text-transform: uppercase;
}

.mini-game-controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.game-btn {
  min-height: 40px;
  padding: 6px 8px;
  font-size: 0.82rem;
}

.share-score-btn {
  width: 100%;
  min-height: 40px;
  background: #fff;
}

.share-score-btn:focus-visible,
.share-score-btn:hover {
  background: var(--accent-2);
  color: var(--line);
}

.mini-game-help {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 600;
  color: #343434;
}

.track span {
  height: 14px;
  border: 2px solid var(--line);
  background: var(--accent);
}

.track span:nth-child(2n) {
  background: var(--accent-2);
}

.how-intro {
  max-width: 70ch;
  font-weight: 600;
}

.how-map {
  margin-top: 12px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 10px;
  align-items: stretch;
}

.how-stop {
  border: 3px solid var(--line);
  background: #fff;
  padding: 12px;
  display: grid;
  gap: 7px;
  align-content: start;
  box-shadow: 2px 2px 0 rgba(26, 26, 26, 0.13);
}

.how-stop .tag {
  display: inline-block;
  width: fit-content;
  border: 2px solid var(--line);
  background: var(--accent);
  color: #fff;
  padding: 2px 6px;
  font-family: "Silkscreen", "Space Grotesk", sans-serif;
  font-size: 0.72rem;
}

.how-stop h3 {
  margin: 0;
  font-size: 0.98rem;
}

.how-stop p {
  margin: 0;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--muted);
}

.how-arrow {
  align-self: center;
  justify-self: center;
  font-family: "Silkscreen", "Space Grotesk", sans-serif;
  font-size: 1rem;
  color: var(--accent);
}

.how-loop {
  margin-top: 10px;
  border: 2px dashed var(--accent);
  background: #fffdf3;
  padding: 10px 12px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  align-items: start;
}

.how-loop-icon {
  font-family: "Silkscreen", "Space Grotesk", sans-serif;
  font-size: 1rem;
  color: var(--accent);
  line-height: 1.2;
}

.how-loop p {
  margin: 0;
  font-size: 0.86rem;
  font-weight: 700;
  color: #2f2f2f;
}

#how {
  position: relative;
  overflow: hidden;
  border-color: #7a2f14;
  background:
    radial-gradient(circle at 92% 8%, rgba(246, 184, 21, 0.24), transparent 34%),
    linear-gradient(180deg, #fff8ef 0%, #fff1db 100%);
}

#how::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.42;
  background-image: repeating-linear-gradient(
    90deg,
    rgba(122, 47, 20, 0.08) 0 1px,
    transparent 1px 18px
  );
}

#how > * {
  position: relative;
  z-index: 1;
}

#how-title {
  color: #7a2f14;
  text-shadow: 2px 2px 0 rgba(255, 255, 255, 0.72);
}

#how .how-map {
  margin-top: 12px;
  padding: 10px;
  border: 2px solid #7a2f14;
  background: rgba(255, 255, 255, 0.7);
  box-shadow: inset 0 0 0 2px rgba(246, 184, 21, 0.35);
}

#how .how-stop {
  border-color: #7a2f14;
  background: linear-gradient(180deg, #fffdf7 0%, #fff6ea 100%);
  box-shadow: 2px 2px 0 rgba(122, 47, 20, 0.18);
}

#how .how-stop:nth-of-type(2) {
  background: linear-gradient(180deg, #fffef9 0%, #fff2d8 100%);
}

#how .how-stop:nth-of-type(3) {
  background: linear-gradient(180deg, #fffdf5 0%, #ffeccc 100%);
}

#how .how-stop:nth-of-type(4) {
  background: linear-gradient(180deg, #fff7f0 0%, #ffe2d6 100%);
}

#how .how-stop .tag {
  border-color: #7a2f14;
  background: #7a2f14;
}

#how .how-stop h3 {
  color: #5a2410;
}

#how .how-stop p {
  color: #4a3126;
}

#how .how-arrow {
  min-width: 34px;
  min-height: 34px;
  border: 2px solid #7a2f14;
  background: #fff;
  color: #7a2f14;
  display: grid;
  place-items: center;
  box-shadow: 2px 2px 0 rgba(122, 47, 20, 0.18);
}

#how .how-loop {
  margin-top: 12px;
  border: 2px dashed #7a2f14;
  background: linear-gradient(90deg, rgba(246, 184, 21, 0.32) 0%, #fff9ed 42%, #fffdf8 100%);
}

#how .how-loop-icon {
  color: #7a2f14;
}

#how .how-loop p {
  color: #442b20;
}

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

.card {
  border: 3px solid var(--line);
  background: #fff;
  padding: 14px;
  min-height: 156px;
  display: flex;
  flex-direction: column;
  box-shadow: 2px 2px 0 rgba(26, 26, 26, 0.13);
  transition: transform 110ms steps(2, end), background-color 110ms steps(2, end);
}

.card:hover,
.card:focus-within {
  transform: translate(-3px, -3px);
  background: #fffaf0;
}

.card .tag {
  display: inline-block;
  border: 2px solid var(--line);
  background: var(--accent);
  color: #fff;
  font-size: 0.75rem;
  text-transform: uppercase;
  padding: 2px 6px;
  margin-bottom: 8px;
  font-family: "Silkscreen", "Space Grotesk", sans-serif;
}

.card h3 {
  margin: 0;
  font-size: 1rem;
}

.card p {
  margin-top: 8px;
  font-size: 0.93rem;
  color: #2f2f2f;
}

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

#build .build-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

#build {
  position: relative;
  overflow: hidden;
  border-color: #0c5f5a;
  background:
    radial-gradient(circle at 8% 12%, rgba(29, 168, 157, 0.2), transparent 34%),
    radial-gradient(circle at 92% 84%, rgba(246, 184, 21, 0.18), transparent 30%),
    linear-gradient(180deg, #f3fffd 0%, #e8faf7 100%);
}

#build::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.45;
  background-image: repeating-linear-gradient(
    90deg,
    rgba(12, 95, 90, 0.08) 0,
    rgba(12, 95, 90, 0.08) 1px,
    transparent 1px,
    transparent 20px
  );
}

#build > * {
  position: relative;
  z-index: 1;
}

#build-title {
  color: #0c5f5a;
  text-shadow: 2px 2px 0 rgba(255, 255, 255, 0.9);
}

.build-header {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
}

.build-intro {
  max-width: 80ch;
  border-left: 4px solid #0c5f5a;
  background: rgba(255, 255, 255, 0.72);
  padding: 8px 10px;
  font-weight: 700;
}

.build-item {
  border: 3px solid #0c5f5a;
  background: linear-gradient(180deg, #ffffff 0%, #f1fffc 100%);
  padding: 14px;
  min-height: 180px;
  display: grid;
  gap: 9px;
  align-content: start;
  box-shadow: 2px 2px 0 rgba(12, 95, 90, 0.18);
}

.build-item-head {
  display: grid;
  gap: 8px;
}

.build-item .tag {
  display: inline-block;
  width: fit-content;
  border: 2px solid #0c5f5a;
  background: #0c5f5a;
  color: #fff;
  padding: 2px 6px;
  font-family: "Silkscreen", "Space Grotesk", sans-serif;
  font-size: 0.72rem;
  text-transform: uppercase;
}

.build-item h3 {
  margin: 0;
  font-size: 0.98rem;
  text-transform: uppercase;
  color: #0b4743;
}

.build-item p {
  margin: 0;
  font-size: 0.9rem;
  color: #244745;
}

.build-item strong {
  color: #163c39;
}

.build-checklist {
  margin-top: 12px;
  border: 2px dashed #0c5f5a;
  background: linear-gradient(90deg, rgba(29, 168, 157, 0.22) 0%, #f2fffc 46%, #ffffff 100%);
  padding: 10px 12px;
}

.build-checklist p {
  margin: 0;
  font-weight: 700;
  color: #174542;
}

.build-note {
  margin-top: 12px;
  border: 2px dashed #0c5f5a;
  background: #fffef2;
  padding: 10px;
  font-weight: 700;
  color: #204341;
}

.specs-intro {
  margin: 0;
  font-weight: 600;
}

.specs-header {
  display: grid;
  gap: 8px;
  align-items: start;
  margin-bottom: 12px;
}

.specs-header h2 {
  margin: 0;
}

.budget-bottom {
  margin-top: 18px;
  border-color: var(--primary);
}

.budget-bottom-icon {
  color: var(--primary);
}

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

.spec-card {
  border: 3px solid var(--line);
  background: #fff;
  padding: 12px;
  display: grid;
  gap: 10px;
  align-content: start;
  box-shadow: 2px 2px 0 rgba(26, 26, 26, 0.13);
}

.spec-head {
  display: grid;
  gap: 8px;
}

.spec-head .tag {
  display: inline-block;
  width: fit-content;
  border: 2px solid var(--line);
  background: var(--accent);
  color: #fff;
  padding: 2px 6px;
  font-family: "Silkscreen", "Space Grotesk", sans-serif;
  font-size: 0.72rem;
  text-transform: uppercase;
}

.spec-head h3 {
  margin: 0;
  font-size: 1rem;
  text-transform: uppercase;
  color: #5f2500;
}

.spec-card p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
}

.spec-card strong {
  color: var(--ink);
}

.spec-card.race-unlocked {
  background: linear-gradient(180deg, #fffdf1 0%, #fff7d4 100%);
}

.spec-card.tier-final {
  background: linear-gradient(180deg, #fff9df 0%, #ffe08a 56%, #ffc85c 100%);
  box-shadow: 3px 3px 0 rgba(26, 26, 26, 0.2);
}

.spec-card.tier-final .spec-head .tag {
  background: var(--primary);
}

.spec-card.tier-final .spec-head h3 {
  color: #5f2500;
}

#specs {
  position: relative;
  overflow: hidden;
  border-color: #8c1303;
  background:
    radial-gradient(circle at 10% 20%, rgba(223, 60, 34, 0.15), transparent 45%),
    radial-gradient(circle at 90% 80%, rgba(246, 184, 21, 0.12), transparent 45%),
    linear-gradient(135deg, #fffcfb 0%, #fff4f2 100%);
}

#specs::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.6;
  background-image: repeating-linear-gradient(
    -45deg,
    rgba(223, 60, 34, 0.08) 0,
    rgba(223, 60, 34, 0.08) 1px,
    transparent 1px,
    transparent 14px
  );
}

#specs > * {
  position: relative;
  z-index: 1;
}

#specs-title {
  color: #8c1303;
  text-shadow: 2px 2px 0 rgba(255, 255, 255, 0.9);
}

#specs .spec-card,
#specs .spec-head .tag,
#specs .budget-bottom {
  border-color: #8c1303;
}

#specs .spec-card {
  box-shadow: 2px 2px 0 rgba(140, 19, 3, 0.16);
}

#specs .spec-card.tier-final {
  box-shadow: 3px 3px 0 rgba(140, 19, 3, 0.24);
}

#tires {
  position: relative;
  overflow: hidden;
  border-color: #0b579f;
  background:
    radial-gradient(circle at 85% 8%, rgba(15, 109, 207, 0.18), transparent 36%),
    radial-gradient(circle at 6% 100%, rgba(246, 184, 21, 0.2), transparent 28%),
    linear-gradient(180deg, #f9fdff 0%, #f1f8ff 58%, #fffef9 100%);
}

#tires::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.35;
  background-image: repeating-linear-gradient(
    -45deg,
    rgba(15, 109, 207, 0.08) 0 10px,
    transparent 10px 20px
  );
}

#tires > * {
  position: relative;
  z-index: 1;
}

#tires-title {
  color: #0b579f;
  text-shadow: 2px 2px 0 rgba(255, 255, 255, 0.75);
}

.tires-intro {
  max-width: 74ch;
  font-weight: 700;
  border-left: 4px solid var(--accent);
  background: rgba(255, 255, 255, 0.75);
  padding: 8px 10px;
}

.tires-flow {
  margin-top: 12px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 10px;
  align-items: stretch;
}

.tires-flow-step {
  border: 3px solid var(--line);
  background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
  padding: 12px;
  display: grid;
  gap: 7px;
  align-content: start;
  box-shadow: 2px 2px 0 rgba(26, 26, 26, 0.13);
}

.tires-flow-step:nth-of-type(1) {
  border-color: #0f6dcf;
}

.tires-flow-step:nth-of-type(2) {
  border-color: #1a1a1a;
}

.tires-flow-step:nth-of-type(3) {
  border-color: #df3c22;
}

.tires-flow-step .tag {
  display: inline-block;
  width: fit-content;
  border: 2px solid var(--line);
  background: var(--accent);
  color: #fff;
  padding: 2px 6px;
  font-family: "Silkscreen", "Space Grotesk", sans-serif;
  font-size: 0.72rem;
  text-transform: uppercase;
}

.tires-flow-step:nth-of-type(1) .tag {
  background: #0f6dcf;
}

.tires-flow-step:nth-of-type(2) .tag {
  background: #f6b815;
  color: #1a1a1a;
}

.tires-flow-step:nth-of-type(3) .tag {
  background: #df3c22;
}

.tires-flow-step h3 {
  margin: 0;
  font-size: 0.98rem;
  text-transform: uppercase;
}

.tires-flow-step p {
  margin: 0;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--muted);
}

.tires-flow-arrow {
  align-self: center;
  justify-self: center;
  min-width: 34px;
  min-height: 34px;
  border: 2px solid var(--accent);
  background: #fff;
  display: grid;
  place-items: center;
  font-family: "Silkscreen", "Space Grotesk", sans-serif;
  font-size: 0.9rem;
  color: var(--accent);
  box-shadow: 2px 2px 0 rgba(26, 26, 26, 0.12);
}

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

.tires-panel {
  border: 3px solid var(--line);
  background: linear-gradient(180deg, #fff 0%, #f6fbff 100%);
  padding: 12px;
  display: grid;
  gap: 10px;
  align-content: start;
  box-shadow: 2px 2px 0 rgba(26, 26, 26, 0.13);
}

.tires-panel h3 {
  margin: 0;
  width: fit-content;
  border-bottom: 2px solid var(--line);
  padding-bottom: 4px;
  font-family: "Silkscreen", "Space Grotesk", sans-serif;
  font-size: 0.9rem;
  text-transform: uppercase;
}

.tire-types {
  display: grid;
  gap: 10px;
}

.tire-type {
  border: 2px solid var(--line);
  background: #fffdf6;
  padding: 10px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-areas:
    "icon title"
    "icon body";
  column-gap: 10px;
  row-gap: 4px;
  align-items: center;
}

.tire-type img {
  display: block;
  grid-area: icon;
  justify-self: center;
  align-self: center;
  height: auto;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.tire-icon-popped {
  width: 56px;
}

.tire-icon-normal {
  width: 48px;
}

.tire-type h4 {
  grid-area: title;
  margin: 0;
  font-family: "Silkscreen", "Space Grotesk", sans-serif;
  font-size: 0.82rem;
  text-transform: uppercase;
}

.tire-type p {
  grid-area: body;
  margin: 0;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--muted);
}

.tires-examples {
  border: 2px dashed var(--accent);
  background: #fffdf3;
  padding: 10px;
  display: grid;
  gap: 8px;
}

.tires-examples p {
  margin: 0;
  padding-top: 6px;
  border-top: 1px dashed rgba(15, 109, 207, 0.25);
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--muted);
}

.tires-examples p:first-child {
  padding-top: 0;
  border-top: 0;
}

.tires-examples strong {
  color: var(--ink);
}

.tires-clarity {
  margin-top: 12px;
  border: 2px dashed var(--accent);
  background: #fffdf3;
  padding: 10px 12px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  align-items: start;
}

.tires-clarity .how-loop-icon {
  color: var(--primary);
}

.tires-clarity p {
  margin: 0;
  font-size: 0.86rem;
  font-weight: 700;
  color: #2f2f2f;
}

.rewards-intro {
  margin-bottom: 12px;
  max-width: 78ch;
  border-left: 4px solid var(--primary);
  background: rgba(255, 255, 255, 0.78);
  padding: 8px 10px;
  font-weight: 700;
}

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

.inventory-item {
  border: 3px solid var(--line);
  background: #fff;
  min-height: 120px;
  padding: 12px;
  display: grid;
  align-content: space-between;
  gap: 8px;
  box-shadow: 2px 2px 0 rgba(26, 26, 26, 0.13);
  transition: transform 110ms steps(2, end);
}

.inventory-item:hover,
.inventory-item:focus-within {
  transform: translate(-3px, -3px);
}

.inventory-item strong {
  font-family: "Silkscreen", "Space Grotesk", sans-serif;
  font-size: 0.85rem;
}

.inventory-item span {
  border-top: 2px solid var(--line);
  padding-top: 8px;
  font-size: 0.84rem;
}

.event-banner {
  border: 3px solid var(--line);
  background: var(--primary);
  color: #fff;
  padding: 16px;
  box-shadow: var(--shadow);
}

.event-banner h3 {
  margin: 0;
  font-family: "Silkscreen", "Space Grotesk", sans-serif;
  font-size: clamp(1.05rem, 0.85rem + 0.9vw, 1.45rem);
}

.event-banner p {
  margin-top: 8px;
  font-size: 1rem;
  font-weight: 600;
}

.rsvp {
  border: 4px solid var(--line);
  background: var(--line);
  color: #fff;
  box-shadow: var(--shadow-strong);
}

.rsvp .btn-primary {
  border-color: #fff;
  background: var(--accent-2);
  color: var(--line);
}

.rsvp .btn-primary:hover,
.rsvp .btn-primary:focus-visible {
  background: #fff;
}

footer {
  margin-top: 18px;
  border: 3px solid var(--line);
  background: var(--panel);
  padding: 12px 14px;
  font-weight: 600;
  box-shadow: var(--shadow);
}

@media (max-width: 920px) {
  .hero {
    grid-template-columns: 1fr;
  }

  #build .build-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mini-game {
    max-width: 420px;
    align-self: start;
    justify-self: start;
  }

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

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

  .tires-flow {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .tires-flow-arrow {
    justify-self: start;
    margin-left: 6px;
    transform: rotate(90deg);
    transform-origin: left center;
  }

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

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

  .how-map {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .how-arrow {
    justify-self: start;
    margin-left: 6px;
    transform: rotate(90deg);
    transform-origin: left center;
  }
}

@media (max-width: 650px) {
  .hackclub-flag {
    left: 6px;
    width: min(180px, calc(100vw - 12px));
  }

  .page {
    padding-top: 94px;
  }

  .hero-logo {
    width: min(100%, 400px);
  }

  .hero,
  .grid,
  .inventory,
  .tire-types {
    grid-template-columns: 1fr;
  }

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

  .tire-icon-popped {
    width: 50px;
  }

  .tire-icon-normal {
    width: 44px;
  }

  .section {
    padding: 16px;
    box-shadow: 2px 2px 0 rgba(26, 26, 26, 0.14);
  }

  .hero-actions {
    align-items: stretch;
  }

  .btn {
    width: 100%;
  }
}
