:root {
  --bg: #FFFFFF;
  --surface: #FAFAFA;
  --border: #E8E8EC;
  --text: #111111;        /* black: text, buttons, outlines */
  --text-muted: #5F6368;

  --pink: #FF3E8E;        /* the one pink */
  --pink-soft: #FFF0F6;   /* tint for backgrounds only */

  --correct: #16A34A;     /* game colors (match statetap.css) */
  --wrong: #DC2626;

  --font-display: 'Fredoka', sans-serif;
  --font-body: 'Karla', sans-serif;
}

* { box-sizing: border-box; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  margin: 0;
  -webkit-font-smoothing: antialiased;
}

main {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 24px;
}

a {
  color: inherit;
}

/* Game pages: smaller header so the game's own logo leads */
.header.header-compact {
  padding: 10px 24px;
  border-bottom: 1px solid var(--border);
}

.header.header-compact .logo { height: 34px; }

@media (max-width: 640px) {
  .header.header-compact { padding: 8px 16px; }
  .header.header-compact .logo { height: 30px; }
  .header.header-compact .menu { top: 52px; }
}

/* Shared button */

.sp-btn {
  display: inline-block;
  background: var(--text);
  color: #FFFFFF;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1.05rem;
  padding: 15px 28px;
  border-radius: 999px;
  text-decoration: none;
  transition: background 0.15s ease, transform 0.15s ease;
}

.sp-btn:hover {
  background: var(--pink);
  transform: translateY(-1px);
}

.sp-btn:focus-visible {
  outline: 3px solid var(--pink);
  outline-offset: 3px;
}

/* Home: hero */

.sp-hero {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 40px;
  align-items: center;
  padding: 64px 0 80px;
}

.sp-hero h1 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2.6rem, 5.4vw, 3.6rem);
  line-height: 1.04;
  letter-spacing: -0.02em;
  margin: 0 0 20px;
}

.sp-hero h1 .sp-hl {
  color: var(--pink);
}

.sp-hero-sub {
  font-size: 1.2rem;
  line-height: 1.5;
  color: var(--text-muted);
  max-width: 30ch;
  margin: 0 0 32px;
}

/* Home: hero game boards */

.sp-hero-art {
  position: relative;
  margin-bottom: -50px;
}

.sp-board {
  background: #FFFFFF;
  border: 2px solid var(--text);
  border-radius: 20px;
  box-shadow: 8px 8px 0 var(--text);
  padding: 18px;
}

.sp-board-st {
  position: relative;
  z-index: 1;
  margin-left: 40px;
  transform: rotate(1.5deg);
}

.sp-board-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.sp-board-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
}

.sp-board-name span {
  color: var(--pink);
}

.sp-board-x {
  display: flex;
  gap: 4px;
}

.sp-board-x i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--border);
}

.sp-board-x i.used {
  background: var(--wrong);
}

.sp-board-q {
  font-weight: 700;
  font-size: 15px;
  line-height: 1.3;
  margin: 0 0 10px;
}

/* The real StateTap map, included from /statetap/statetap-map.svg */
.sp-board-st svg {
  display: block;
  width: 100%;
  height: auto;
}

.sp-board-st svg text { display: none; }
.sp-board-st svg .st-hit { fill: none; stroke: none; }
.sp-board-st svg .st-state path { fill: #E6E7EB; stroke: #FFFFFF; stroke-width: 1; }
.sp-board-st svg [data-abbrev="OH"] path,
.sp-board-st svg [data-abbrev="MI"] path { fill: var(--correct); }
.sp-board-st svg [data-abbrev="IN"] path { fill: var(--wrong); }

.sp-board-slots {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-top: 10px;
}

.sp-board-slots div {
  height: 30px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  border: 2px dashed var(--border);
  color: var(--text-muted);
}

.sp-board-slots div.ok {
  background: var(--correct);
  border: 2px solid var(--correct);
  color: #FFFFFF;
}

.sp-board-gu {
  position: absolute;
  z-index: 2;
  left: -30px;
  bottom: 74px;
  width: 220px;
  padding: 14px 14px 12px;
  text-align: center;
  transform: rotate(-4deg);
  box-shadow: 6px 6px 0 var(--pink);
}

/* Mini Guesso board (uses Guesso's own blue, like StateTap's green/red) */
.sp-gu-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 18px;
  letter-spacing: 0.5px;
  color: #1E3A8A;
  margin-bottom: 2px;
}

.sp-gu-count {
  font-size: 10px;
  font-weight: 700;
  color: #9CA3AF;
}

.sp-gu-cat {
  display: inline-block;
  margin: 4px 0 6px;
  padding: 2px 9px;
  border-radius: 999px;
  background: #E0F2FE;
  color: #0369A1;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.sp-gu-dots {
  display: flex;
  justify-content: center;
  gap: 4px;
  margin-bottom: 8px;
}

.sp-gu-dots i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #D1D5DB;
}

.sp-gu-dots i.on { background: #0EA5E9; }

.sp-gu-q {
  font-weight: 700;
  font-size: 12px;
  line-height: 1.3;
  margin: 0 0 8px;
}

.sp-gu-digits {
  display: flex;
  justify-content: center;
  gap: 5px;
  margin-bottom: 8px;
}

.sp-gu-digits span {
  width: 28px;
  height: 34px;
  border: 2px solid #D1D5DB;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 18px;
}

.sp-gu-digits span.cur { border-color: #0EA5E9; }

.sp-gu-keys {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 3px;
}

.sp-gu-keys span {
  height: 20px;
  border-radius: 4px;
  background: #E5E7EB;
  font-size: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sp-gu-keys span.enter {
  font-size: 7px;
  background: #D1D5DB;
  color: #6B7280;
}

/* Game cards (reusable on any page) */

.games {
  padding: 0 0 80px;
}

.games h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 2rem;
  letter-spacing: -0.01em;
  margin: 0 0 20px;
}

.sp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}

.sp-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  text-decoration: none;
  background: #FFFFFF;
  border: 2px solid var(--text);
  border-radius: 18px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.sp-card:hover {
  transform: translate(-3px, -3px);
  box-shadow: 6px 6px 0 var(--pink);
}

.sp-card:focus-visible {
  outline: 3px solid var(--pink);
  outline-offset: 3px;
}

.sp-card-logo {
  height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #F4F5F7;
  border-bottom: 2px solid var(--text);
}

.sp-card-logo img {
  max-width: 70%;
  max-height: 96px;
}

/* Text stand-in until a real logo exists */
.sp-logo-ph {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 34px;
  letter-spacing: -0.01em;
}

.sp-logo-ph span { color: var(--pink); }

.sp-card-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 20px 22px 22px;
}

.sp-card-body p {
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0 0 18px;
}

.sp-card-meta {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sp-tag {
  font-size: 13px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
}

.sp-play {
  font-weight: 700;
}

.sp-card:hover .sp-play {
  color: var(--pink);
}

/* Motion */

@media (prefers-reduced-motion: reduce) {
  .sp-btn, .sp-card { transition: none; }
}

/* Home: mobile */

@media (max-width: 800px) {
  .sp-hero {
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 40px 0 48px;
  }

  .sp-board-st {
    margin-left: 0;
    transform: none;
  }

  .sp-board-gu {
    position: relative;
    left: -150px;
    bottom: 110px;
    margin: -12px 8px 0 auto;
    width: 220px;
  }
  .sp-board-gu {
    margin: -140px 4px 0 auto;   /* was -12px 8px 0 auto: pulls Guesso up over StateTap */
    width: 205px;
  }
}

/* More Games (compact cards linking to other sites) */

.sp-more {
  padding: 0 0 80px;
}

.sp-more h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.6rem;
  letter-spacing: -0.01em;
  margin: 0 0 4px;
}

.sp-more-sub {
  color: var(--text-muted);
  margin: 0 0 18px;
}

.sp-more-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}

.sp-mini {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  text-decoration: none;
  background: #FFFFFF;
  border: 1.5px solid var(--text);
  border-radius: 14px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.sp-mini:hover {
  transform: translate(-2px, -2px);
  box-shadow: 4px 4px 0 var(--pink);
}

.sp-mini:focus-visible {
  outline: 3px solid var(--pink);
  outline-offset: 3px;
}

.sp-mini-logo {
  height: 84px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #F4F5F7;
  border-bottom: 1.5px solid var(--text);
}

.sp-mini-logo img {
  max-width: 75%;
  max-height: 56px;
}

.sp-mini-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 12px 14px 14px;
}

.sp-mini-body h3 {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1rem;
  margin: 0 0 4px;
}

.sp-mini-body p {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.45;
  margin: 0 0 10px;
}

.sp-mini-site {
  margin-top: auto;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
}

.sp-mini:hover .sp-mini-site {
  color: var(--pink);
}

@media (max-width: 480px) {
  .sp-more-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .sp-mini-logo { height: 70px; }
}

@media (prefers-reduced-motion: reduce) {
  .sp-mini { transition: none; }
}

/* Header */

.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 960px;
  margin: 0 auto;
  padding: 24px;
}

.header .logo {
  height: 64px;
  width: auto;
  display: block;
}

@media (max-width: 640px) {
  .header .logo { height: 48px; }
}

.header .menu {
  list-style: none;
  display: flex;
  gap: 32px;
  margin: 0;
  padding: 0;
}

.header .menu li {
  margin: 0;
}

.header .menu a {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  padding-bottom: 2px;
}

.header .menu a:hover {
  border-bottom-color: var(--pink);
}

.header .menu a:focus-visible {
  outline: 3px solid var(--pink);
  outline-offset: 2px;
}

/* Mobile hamburger */

.menu-btn {
  display: none;
}

.menu-icon {
  display: none;
  cursor: pointer;
  padding: 8px;
}

.menu-icon .navicon {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  position: relative;
  transition: background 0.2s ease;
}

.menu-icon .navicon:before,
.menu-icon .navicon:after {
  content: '';
  position: absolute;
  width: 22px;
  height: 2px;
  background: var(--text);
  left: 0;
  transition: transform 0.2s ease;
}

.menu-icon .navicon:before { top: -7px; }
.menu-icon .navicon:after { top: 7px; }

@media (max-width: 640px) {
  .header .menu {
    display: none;
    position: absolute;
    top: 72px;
    right: 24px;
    left: 24px;
    flex-direction: column;
    gap: 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 8px;
  }

  .header .menu li {
    padding: 12px;
  }

  .menu-icon {
    display: block;
  }

  .menu-btn:checked ~ .menu {
    display: flex;
  }
}

/* Footer */

#footer {
  border-top: 1px solid var(--border);
  margin-top: 64px;
}

#footer-inset {
  max-width: 960px;
  margin: 0 auto;
  padding: 48px 24px;
  text-align: center;
}

.footer-logo {
  height: 100px;
  display: inline-block;
  margin-bottom: 24px;
  opacity: 0.9;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 24px;
  margin-bottom: 24px;
}

.footer-links a {
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--text-muted);
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--pink);
}

.footer-links a:focus-visible {
  outline: 3px solid var(--pink);
  outline-offset: 2px;
}

.footer-social {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 24px;
}

.footer-social a {
  color: var(--text-muted);
  transition: color 0.2s ease;
}

.footer-social a:hover {
  color: var(--pink);
}

.footer-social a:focus-visible {
  outline: 3px solid var(--pink);
  outline-offset: 2px;
  border-radius: 4px;
}

.copyright {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
}

@media (max-width: 480px) {
  .footer-links {
    flex-direction: column;
    gap: 12px;
  }
}

/* Mini Pig board (home hero) */
.sp-board-pig {
  position: absolute;
  z-index: 3;
  top: 150px;
  right: -36px;
  width: 140px;
  padding: 12px 12px 12px;
  text-align: center;
  transform: rotate(5deg);
  box-shadow: 6px 6px 0 var(--pink);
}

.sp-pig-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 18px;
  margin-bottom: 6px;
}

.sp-pig-die {
  width: 54px;
  height: 54px;
  margin: 0 auto 8px;
  padding: 8px;
  border: 2px solid var(--text);
  border-radius: 12px;
  box-shadow: 3px 3px 0 var(--text);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  place-items: center;
}

.sp-pig-die i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.sp-pig-die i.on { background: var(--text); }

.sp-pig-turns {
  display: flex;
  justify-content: center;
  gap: 3px;
  margin-bottom: 8px;
}

.sp-pig-turns span {
  width: 20px;
  height: 20px;
  border-radius: 5px;
  background: #F1F2F4;
  color: #FFFFFF;
  font-size: 10px;
  font-weight: 700;
  line-height: 20px;
}

.sp-pig-turns span.ok { background: var(--correct); }
.sp-pig-turns span.bust { background: var(--wrong); font-size: 11px; }
.sp-pig-turns span.cur { background: #FFFFFF; box-shadow: inset 0 0 0 1.5px var(--text); }

.sp-pig-btns {
  display: flex;
  gap: 4px;
}

.sp-pig-btns span {
  flex: 1;
  padding: 5px 0;
  border-radius: 999px;
  color: #FFFFFF;
  font-size: 11px;
  font-weight: 700;
}

.sp-pig-btns .roll { background: var(--pink); }
.sp-pig-btns .bank { background: var(--text); }


/* Mini Pig board -- mobile (must stay below the main .sp-board-pig rule) */
@media (max-width: 800px) {
  .sp-board-pig {
    top: 180px;        /* cancel the desktop top: 150px */
    right: auto;      /* cancel the desktop right: -36px */
    bottom: 70px;     /* about 50px higher than before; bigger = higher */
    left: 220px;
    width: 116px;
    padding: 10px;
    transform: rotate(5deg);
  }
}

