/* K-6 Scholars Club: bright, friendly, readable. Colours match the thumbnails and the videos. */
:root {
  --ink: #1c1e34; --muted: #5d6175; --bg: #f7f9fc; --card: #ffffff; --line: #e3e7ef;
  --blue: #2e7be6; --blue-d: #1c5fc2; --sky: #e8f2ff; --yellow: #ffd23c; --teal: #1a8c8c; --orange: #f07a1e;
  --green-au: #00843d; --gold-au: #ffcd00; --radius: 18px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: Nunito, system-ui, -apple-system, Segoe UI, Arial, sans-serif; color: var(--ink);
  background: var(--bg); line-height: 1.55; font-size: 17px; }
img { max-width: 100%; height: auto; }
a { color: var(--blue-d); }
h1, h2, h3 { line-height: 1.2; font-weight: 900; }
h1 { font-size: clamp(1.8rem, 4.5vw, 2.8rem); margin: .2em 0 .4em; }
h2 { font-size: 1.35rem; margin: .2em 0 .5em; }
h3 { font-size: 1.05rem; margin: 1em 0 .4em; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 760px; }
.small { font-size: .88rem; color: var(--muted); }
.warn { color: #b05000; }

/* header and footer */
.top { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-weight: 900; font-size: 1.15rem; }
.top nav { display: flex; gap: 4px 16px; flex-wrap: wrap; }
.top nav a { text-decoration: none; font-weight: 800; color: var(--ink); padding: 6px 2px; }
.top nav a:hover { color: var(--blue); }
.foot { margin-top: 48px; padding: 28px 0; background: #fff; border-top: 1px solid var(--line); color: var(--muted); font-size: .95rem; }

/* hero */
.hero { background: radial-gradient(circle at 70% 40%, #7fb5ff 0, var(--blue) 55%, var(--blue-d) 100%); color: #fff; padding: 40px 0 36px; }
.hero.small { padding: 28px 0 22px; }
.hero a { color: #fff; }
.hero .lead { font-size: 1.15rem; max-width: 720px; }
.hero .small { color: #e4eeff; }
.hero-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 24px; align-items: center; }
.hero-art img { filter: drop-shadow(0 10px 18px rgba(0,0,0,.25)); }
@media (max-width: 760px) { .hero-grid { grid-template-columns: 1fr; } .hero-art { max-width: 340px; margin: 0 auto; } }

.btn { display: inline-block; background: var(--yellow); color: var(--ink) !important; font-weight: 900; text-decoration: none;
  padding: 12px 22px; border-radius: 999px; border: 3px solid var(--ink); box-shadow: 0 4px 0 var(--ink); margin: 4px 6px 4px 0; }
.btn:hover { transform: translateY(1px); box-shadow: 0 3px 0 var(--ink); }
.btn.alt { background: #fff; }

/* cards and grids */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; margin: 16px 0;
  box-shadow: 0 2px 8px rgba(30,40,80,.05); }
.three { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 24px; }
.grid2 { display: grid; grid-template-columns: 1.6fr 1fr; gap: 20px; align-items: start; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 900px) { .three, .grid2, .grid3 { grid-template-columns: 1fr; } }

/* lesson page */
.crumbs { font-size: .92rem; margin: 18px 0 0; }
.code { display: inline-block; font-size: .55em; background: var(--ink); color: #fff; border-radius: 10px; padding: 3px 10px;
  vertical-align: middle; margin-right: 6px; }
.lead { font-size: 1.12rem; }
.video { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: #000; margin: 16px 0; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video.soon img { width: 100%; height: 100%; object-fit: cover; opacity: .9; }
.soon-tag { position: absolute; left: 12px; bottom: 12px; background: var(--yellow); border: 2px solid var(--ink); font-weight: 900;
  border-radius: 999px; padding: 6px 14px; }
.learn { background: var(--sky); border-color: #cfe1ff; }
ul.ticks { list-style: none; padding: 0; }
ul.ticks li { padding-left: 30px; position: relative; margin: 6px 0; }
ul.ticks li::before { content: "★"; position: absolute; left: 0; color: var(--orange); font-size: 1.2em; line-height: 1.1; }
.chip { display: inline-block; background: #fff6d6; border: 1px solid #f0d77a; border-radius: 999px; padding: 2px 10px; margin: 3px 4px 3px 0; font-size: .92rem; }
.chapters { list-style: none; padding: 0; }
.chapters li span { display: inline-block; min-width: 3.2em; font-weight: 800; color: var(--teal); }
.worksheet { background: #fffbea; border-color: #f3df95; }
table.cur { width: 100%; border-collapse: collapse; font-size: .95rem; }
table.cur th, table.cur td { text-align: left; vertical-align: top; padding: 8px 6px; border-top: 1px solid var(--line); }
table.cur th { white-space: nowrap; }
code { font-family: ui-monospace, Consolas, monospace; font-size: .92em; }
@media (max-width: 600px) { table.cur, table.cur tr, table.cur td, table.cur th { display: block; } table.cur th { border-top: 2px solid var(--line); } }
.pnav { display: flex; justify-content: space-between; gap: 12px; margin: 20px 0; }
.pn { flex: 1; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 16px; text-decoration: none; color: var(--ink); }
.pn.next { text-align: right; }

/* year pages */
.unit { margin: 28px 0; }
.lgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
.lcard { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: 14px; overflow: hidden;
  text-decoration: none; color: var(--ink); position: relative; }
.lcard img { aspect-ratio: 16 / 9; object-fit: cover; }
.lcard .n { font-weight: 900; color: var(--blue-d); padding: 8px 12px 0; }
.lcard .t { font-weight: 800; padding: 0 12px 12px; }
.lcard.planned { opacity: .6; padding-top: 4px; }
.tag { display: inline-block; background: var(--yellow); border-radius: 999px; padding: 1px 9px; font-size: .78rem; font-weight: 800;
  margin: 0 12px 12px; align-self: flex-start; }
h3 .tag { margin: 0 0 0 8px; vertical-align: middle; }

/* how it works */
.steps { counter-reset: s; list-style: none; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.steps li { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; position: relative; }
.steps li::before { counter-increment: s; content: counter(s); display: inline-flex; width: 34px; height: 34px; border-radius: 50%;
  background: var(--blue); color: #fff; font-weight: 900; align-items: center; justify-content: center; margin-bottom: 8px; }
@media (max-width: 900px) { .steps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .steps { grid-template-columns: 1fr; } }

/* sign-up */
.signup { background: linear-gradient(135deg, var(--green-au), #00a14f); color: #fff; padding: 34px 0; margin-top: 36px; }
.signup a { color: #fff; }
.signup .small { color: #e2f5ea; }
.signup-form { display: flex; flex-wrap: wrap; gap: 10px; margin: 14px 0 8px; }
.signup-form input, .signup-form select { flex: 1 1 220px; padding: 12px 14px; border-radius: 12px; border: 2px solid var(--gold-au); font: inherit; }
.signup-form button { flex: 0 0 auto; background: var(--gold-au); color: var(--ink); font: inherit; font-weight: 900; border: 0;
  border-radius: 12px; padding: 12px 20px; cursor: pointer; }

/* finder */
.filters { display: flex; flex-wrap: wrap; gap: 12px; margin: 18px 0; }
.filters label { display: flex; flex-direction: column; font-weight: 800; font-size: .9rem; flex: 1 1 200px; }
.filters select, .filters input { font: inherit; padding: 10px; border-radius: 10px; border: 1px solid var(--line); margin-top: 4px; }
.card.codecard ul { margin: 6px 0 0; }
.prose { padding-top: 20px; }
.prose li { margin: 6px 0; }

.codecard { scroll-margin-top: 84px; }
.codecard h3 code { font-size: 1.1rem; }

