/* Steppy Steppy — stylesheet for the scrollable content pages.
   The game page (play.html) uses style.css instead, which scroll-locks the
   whole document; the two must never be loaded together. */

:root {
  --sky-top: #63b8ee;
  --sky-mid: #8ed4f6;
  --sky-low: #c2ebfb;
  --page: #8ecdf3;
  --ink: #24203a;
  --ink-soft: #4a4560;
  --panel: #ffffff;
  --panel-edge: rgba(36, 32, 58, 0.12);
  --grass: #7ec850;
  --grass-dark: #5faa38;
  --stone: #7a7189;
  --accent: #3f7fe3;
  --accent-dark: #2f63b8;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --wrap: 70ch;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--page);
  background-image: linear-gradient(var(--sky-top) 0, var(--sky-mid) 40vh, var(--sky-low) 85vh);
  background-repeat: no-repeat;
  background-attachment: fixed;
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  -webkit-text-size-adjust: 100%;
}

img { max-width: 100%; height: auto; }

a { color: var(--accent-dark); }
a:focus-visible,
button:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.skip {
  position: absolute;
  left: -9999px;
  background: var(--panel);
  padding: 0.6em 1em;
  border-radius: 8px;
  z-index: 200;
}
.skip:focus { left: 12px; top: 12px; }

/* ---------------------------------------------------------------- header */
.site-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem 1.4rem;
  max-width: 1100px;
  margin: 0 auto;
  padding: 1rem 1.25rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 900;
  font-size: 1.16rem;
  letter-spacing: 0.01em;
  color: var(--ink);
  text-decoration: none;
  margin-right: auto;
}
.brand img { width: 34px; height: 34px; border-radius: 9px; }

.site-nav { display: flex; flex-wrap: wrap; gap: 0.35rem 0.9rem; }
.site-nav a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.25em 0.1em;
  border-bottom: 2px solid transparent;
}
.site-nav a:hover { border-bottom-color: var(--ink); }
.site-nav a[aria-current="page"] { border-bottom-color: var(--grass-dark); }

/* ----------------------------------------------------------------- main */
main { max-width: var(--wrap); margin: 0 auto; padding: 1rem 1.25rem 3rem; }
main.wide { max-width: 1100px; }

h1, h2, h3 { line-height: 1.2; letter-spacing: -0.01em; }
h1 { font-size: clamp(1.9rem, 5vw, 2.7rem); font-weight: 900; margin: 0.6em 0 0.35em; }
h2 { font-size: clamp(1.3rem, 3.4vw, 1.7rem); font-weight: 800; margin: 2em 0 0.5em; }
h3 { font-size: 1.1rem; font-weight: 800; margin: 1.6em 0 0.4em; }

.lede { font-size: 1.12rem; color: var(--ink-soft); }

.card {
  background: var(--panel);
  border: 1px solid var(--panel-edge);
  border-radius: 16px;
  padding: 1.25rem 1.4rem;
  margin: 1.5rem 0;
  box-shadow: 0 2px 10px rgba(36, 32, 58, 0.08);
}
.card > :first-child { margin-top: 0; }
.card > :last-child { margin-bottom: 0; }

.btn {
  display: inline-block;
  background: var(--grass);
  color: var(--ink);
  font-weight: 900;
  font-size: 1.1rem;
  text-decoration: none;
  padding: 0.7em 1.6em;
  border-radius: 999px;
  border-bottom: 4px solid var(--grass-dark);
}
.btn:hover { background: #8ed85e; }
.btn.big { font-size: 1.3rem; padding: 0.8em 2em; }

table { width: 100%; border-collapse: collapse; margin: 1.2rem 0; }
th, td { text-align: left; padding: 0.55rem 0.7rem; border-bottom: 1px solid var(--panel-edge); }
th { font-weight: 800; }

code { background: rgba(255,255,255,0.6); padding: 0.15em 0.4em; border-radius: 5px; font-size: 0.93em; }

.roster {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(258px, 1fr));
  gap: 1.2rem;
  padding: 0;
  margin: 1.6rem 0;
  list-style: none;
}
.roster li {
  display: flex;
  flex-direction: column;
  background: var(--panel);
  border: 1px solid var(--panel-edge);
  border-radius: 18px;
  padding: 1.2rem 1.2rem 1.3rem;
  text-align: center;
  box-shadow: 0 2px 10px rgba(36, 32, 58, 0.08);
}
.roster img { width: 128px; height: 128px; object-fit: contain; margin: 0 auto; }
.roster h3 { margin: 0.5em 0 0.35em; font-size: 1.18rem; }
.roster .story {
  margin: 0 0 0.95rem;
  font-size: 0.94rem;
  color: var(--ink-soft);
  flex: 1;              /* pushes the loves/hates strips to a common baseline */
}
.roster .likes,
.roster .hates {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.4;
  text-align: left;
  padding: 0.5em 0.75em;
  border-radius: 11px;
}
.roster .likes { background: rgba(126, 200, 80, 0.20); margin-bottom: 0.45rem; }
.roster .hates { background: rgba(232, 132, 132, 0.20); }
.roster .likes strong,
.roster .hates strong {
  display: block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  opacity: 0.72;
}

/* ------------------------------------------------------------------- ads */
/* Ad units sit inside the text flow, never beside a control or the Play
   button. Reserved height keeps the page from shifting as they fill. */
.ad-slot {
  margin: 2.5rem 0;
  min-height: 100px;
  text-align: center;
}
.ad-slot .ad-label {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 0.35rem;
}

/* ---------------------------------------------------------------- footer */
.site-foot {
  border-top: 1px solid var(--panel-edge);
  background: rgba(255, 255, 255, 0.45);
  padding: 1.6rem 1.25rem 2.4rem;
  font-size: 0.92rem;
}
.site-foot .inner { max-width: 1100px; margin: 0 auto; }
.foot-nav { display: flex; flex-wrap: wrap; gap: 0.4rem 1.1rem; margin-bottom: 0.8rem; padding: 0; list-style: none; }
.foot-nav a { color: var(--ink); font-weight: 600; }
.site-foot p { margin: 0.4rem 0; color: var(--ink-soft); }

.linkbtn {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  font-weight: 600;
  color: var(--ink);
  text-decoration: underline;
  cursor: pointer;
}

@media (max-width: 560px) {
  body { font-size: 16px; }
  .brand { font-size: 1.05rem; margin-right: 0; width: 100%; }
  .site-nav { gap: 0.3rem 0.75rem; }
}
