/* Do-Along STEM website. Colours are the book's theme colours. */
:root {
  color-scheme: light;
  --teal: #0B6E7F; --teal-dark: #08525F; --yellow: #FFC83D; --red: #D7263D; --grape: #5B4BB7;
  --ink: #1D2B45; --muted: #5A6B85; --pale: #E4F3F5; --green: #1E8449; --line: #CFE3E7; --white: #FFFFFF;
  --font: "Century Gothic", "Avenir Next", "Avenir", "Nunito", "Segoe UI", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
section[id] { scroll-margin-top: 72px; }   /* so the sticky header does not cover a heading reached by a link like /#games */
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--white); line-height: 1.55; font-size: 1.05rem; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--teal-dark); }
h1, h2, h3 { line-height: 1.15; margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 4.8vw, 3.4rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); color: var(--teal); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--grape); outline-offset: 3px; }
.wrap { width: min(1120px, 100% - 32px); margin: 0 auto; }
section.wrap, .band { padding: 56px 0; }
.band { background: var(--pale); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--white); padding: 8px 12px; border-radius: 8px; z-index: 10; }
.skip:focus { left: 8px; }

/* header and footer */
.site-head { background: var(--white); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.head-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 24px; padding: 12px 0; }
.logo { text-decoration: none; }
.logo-badge { display: inline-block; background: var(--yellow); color: var(--ink); font-weight: 800; letter-spacing: .14em; padding: 8px 16px; border-radius: 999px; font-size: .95rem; }
.site-head nav { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.site-head nav a { color: var(--ink); text-decoration: none; font-weight: 700; padding: 6px 0; border-bottom: 3px solid transparent; }
.site-head nav a:hover { border-color: var(--yellow); }
.site-foot { background: var(--ink); color: #DCE6F2; padding: 32px 0; font-size: .95rem; }
.site-foot a { color: var(--white); }
.foot-row p { margin: 0 0 .5em; }

/* buttons */
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 1.2em; }
.btn { display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 10px 22px; border-radius: 999px; font-weight: 800; text-decoration: none; border: 3px solid transparent; }
.btn-yellow { background: var(--yellow); color: var(--ink); }
.btn-yellow:hover { background: #F5B91F; }
.btn-white { background: var(--white); color: var(--teal-dark); }
.btn-teal { background: var(--teal); color: var(--white); }
.btn-teal:hover { background: var(--teal-dark); }
.btn-outline { border-color: var(--teal); color: var(--teal-dark); background: var(--white); }
.btn-outline:hover { background: var(--pale); }
.dl-meta { font-weight: 400; opacity: .85; font-size: .9em; }
.btn-soon { background: var(--white); border: 3px dashed var(--teal); color: var(--teal-dark); cursor: default; }

/* hero */
.hero { background: var(--teal); color: var(--white); padding: 56px 0; }
.hero-row { display: grid; grid-template-columns: 1.05fr 1fr; gap: 40px; align-items: center; }
.hero h1 { color: var(--white); }
.eyebrow { font-weight: 800; letter-spacing: .08em; text-transform: uppercase; font-size: .85rem; color: var(--teal); margin-bottom: .6em; }
.hero .eyebrow { color: var(--yellow); }
.lede { font-size: 1.2rem; max-width: 34em; }
.lede-dark { font-size: 1.1rem; color: var(--muted); }
.hero-cover img, .feature-cover img, .book-cover { border-radius: 18px; box-shadow: 0 14px 34px rgba(0, 0, 0, .22); }

.hero-solo { padding: 48px 0 44px; }
.hero-solo .lede { max-width: 40em; }

/* pick a book (home page, right under the hero) */
.pick { padding-top: 40px !important; }
.pick-books { list-style: none; padding: 0; margin: 18px 0 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.pick-card { display: flex; flex-direction: column; border: 3px solid var(--line); border-radius: 20px; padding: 16px; background: var(--white); }
.pick-cover img { border-radius: 14px; width: 100%; box-shadow: 0 8px 20px rgba(0, 0, 0, .14); }
.pick-cover:hover img { box-shadow: 0 12px 26px rgba(0, 0, 0, .2); }
.pick-card .eyebrow { margin: 16px 0 .3em; }
.pick-card h3 { font-size: 1.3rem; margin-bottom: .3em; }
.pick-card h3 a { color: var(--ink); text-decoration: none; }
.pick-card h3 a:hover { text-decoration: underline; }
.pick-idea { color: var(--muted); flex: 1; margin-bottom: 0; }
.pick-card .btn-row { margin-top: 14px; }
.pick-more { margin: 18px 0 0; font-weight: 700; }

/* how it works */
.steps3 { list-style: none; padding: 0; margin: 24px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.steps3 li { background: var(--white); border-radius: 18px; padding: 24px; }
.step-num { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--yellow); font-weight: 800; font-size: 1.2rem; margin-bottom: 12px; }

/* book feature */
.feature { display: grid; grid-template-columns: 1fr 1.2fr; gap: 40px; align-items: center; }
.feature-flip { grid-template-columns: 1.2fr 1fr; }
.feature-flip .feature-cover { order: 2; }

/* games */
.games { list-style: none; padding: 0; margin: 20px 0 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.game-card { display: grid; grid-template-columns: 90px 1fr; gap: 16px; align-items: center; background: var(--pale); border-radius: 18px; padding: 22px; }
.game-card img { max-height: 210px; width: auto; margin: 0 auto; }
.game-card .eyebrow { margin-bottom: .2em; }
.band .info-card { background: var(--white); }
.sub { font-size: 1.2rem; font-weight: 700; color: var(--ink); }

/* series */
.series { list-style: none; padding: 0; margin: 24px 0 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.series li { background: var(--white); border-radius: 16px; padding: 18px; display: flex; flex-direction: column; gap: 6px; border: 3px solid transparent; }
.series li.is-out { border-color: var(--yellow); }
.series-num { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--teal); color: var(--white); font-weight: 800; }
.series-job { font-weight: 800; font-size: 1.1rem; }
.series-idea { color: var(--muted); flex: 1; }
.series-soon { font-size: .85rem; font-weight: 700; color: var(--muted); }
.series-link { font-weight: 800; }

/* grown-ups */
.cards3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 20px; }
.info-card { background: var(--pale); border-radius: 18px; padding: 24px; }

/* book page */
.book-hero { background: var(--pale); padding: 48px 0; }
.book-row { display: grid; grid-template-columns: 1fr 1.15fr; gap: 40px; align-items: center; }
.byline { font-weight: 700; color: var(--muted); }
.job-pill { display: inline-flex; gap: 10px; align-items: center; background: var(--white); border-radius: 999px; padding: 8px 18px; font-weight: 800; }
.job-pill span { color: var(--red); letter-spacing: .12em; font-size: .78rem; }
.downloads { list-style: none; padding: 0; margin: 20px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.downloads li { border: 3px solid var(--line); border-radius: 18px; padding: 22px; display: flex; flex-direction: column; }
.downloads li p { flex: 1; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.checks, .rules, .standards { padding-left: 0; list-style: none; }
.checks li { position: relative; padding-left: 34px; margin-bottom: 10px; }
.checks li::before { content: ""; position: absolute; left: 0; top: 4px; width: 20px; height: 20px; border: 3px solid var(--teal); border-radius: 5px; background: var(--white); }
.rules { counter-reset: r; }
.rules li { counter-increment: r; position: relative; padding-left: 44px; margin-bottom: 12px; min-height: 32px; }
.rules li::before { content: counter(r); position: absolute; left: 0; top: 0; width: 32px; height: 32px; border-radius: 50%; background: var(--teal); color: var(--white); display: grid; place-items: center; font-weight: 800; }
.facts { display: flex; flex-wrap: wrap; gap: 8px; }
.facts span { background: var(--white); border-radius: 999px; padding: 6px 14px; font-weight: 700; font-size: .95rem; }
.note { background: var(--white); border-radius: 14px; padding: 14px 16px; }
.fact-source { display: block; margin-top: 8px; font-size: .85rem; color: var(--muted, #555); }
.fact-source a { color: inherit; text-decoration: underline; overflow-wrap: anywhere; }
.two-col .note { background: var(--pale); }
.band .two-col .note { background: var(--white); }
.peek { list-style: none; padding: 0; margin: 20px 0 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.peek img { border-radius: 14px; aspect-ratio: 1 / 1; object-fit: cover; width: 100%; }
.peek p { font-size: .95rem; color: var(--muted); margin-top: 8px; }
.play-band { overflow: hidden; }
.play-row { display: grid; grid-template-columns: 180px 1fr; gap: 32px; align-items: center; }
.play-bot { max-height: 300px; width: auto; margin: 0 auto; }
.small { font-size: .92rem; color: var(--muted); }
.standards li { margin-bottom: 10px; }
.standards span { display: inline-block; background: var(--teal); color: var(--white); border-radius: 999px; padding: 2px 12px; font-weight: 800; font-size: .85rem; margin-right: 6px; }
.prose { max-width: 760px; }
.prose li { margin-bottom: 10px; }
.center { text-align: center; }
.center .btn-row { justify-content: center; }
.lost-bot { max-height: 260px; width: auto; margin: 0 auto 16px; }

@media (max-width: 1100px) {
  .pick-books { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  .hero-row, .feature, .feature-flip, .book-row, .two-col { grid-template-columns: 1fr; }
  .hero-cover { order: -1; }
  .feature-flip .feature-cover { order: 0; }
  .steps3, .cards3, .downloads, .games, .pick-books { grid-template-columns: 1fr; }
  .series { grid-template-columns: repeat(2, 1fr); }
  .peek { grid-template-columns: repeat(2, 1fr); }
  .play-row { grid-template-columns: 110px 1fr; gap: 18px; }
}
@media (max-width: 480px) {
  .series, .peek { grid-template-columns: 1fr; }
  .play-row { grid-template-columns: 1fr; }
  .play-bot { max-height: 200px; }
  .game-card { grid-template-columns: 80px 1fr; gap: 14px; padding: 16px; }
  section.wrap, .band, .hero { padding: 40px 0; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
