/* ==========================================================================
   pages.css: components for the marketing pages (home, how it works,
   educators) plus the dashboard console shell further down.
   Load after site.css.
   ========================================================================== */

/* ---------- two-column split, used by most sections -------------------- */
.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(40px, 6vw, 96px);
  align-items: center;
}
.split-text > * + * { margin-top: 20px; }
.split-text h2 + .lede { margin-top: 20px; }
.split-text .btns, .btns { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; margin-top: 34px; }
@media (max-width: 900px) {
  .split { grid-template-columns: 1fr; gap: 48px; }
}

/* ==========================================================================
   HERO (home) and PAGE HEAD (interior pages)
   ========================================================================== */
.hero {
  position: relative;
  padding: clamp(48px, 7vw, 96px) 0 clamp(64px, 8vw, 120px);
  background: var(--paper);
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.98fr);
  gap: clamp(40px, 5vw, 80px);
  align-items: center;
}
.hero h1 { max-width: 9.5ch; }
.hero .lede { margin-top: 26px; max-width: 30em; }
.hero .btns { margin-top: 38px; }
.hero-note {
  margin-top: 22px;
  font-size: 15.5px;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 6px 20px;
}
.hero-note span { display: inline-flex; align-items: center; gap: 7px; }
.hero-note svg { width: 17px; height: 17px; color: var(--green-deep); flex: none; }
/* live account count under the hero; real accounts only, hidden until loaded */
.live-count { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; margin-top: 16px; font-size: 15.5px; font-weight: 700; color: var(--muted); }
.live-count[hidden] { display: none; }
.live-count b { color: var(--ink); font-weight: 800; font-variant-numeric: tabular-nums; }
.live-count a { color: var(--ocean-dark); font-weight: 800; text-underline-offset: 3px; }
.live-dot { position: relative; width: 9px; height: 9px; border-radius: 50%; background: var(--green); flex: none; }
.live-dot::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid var(--green); opacity: 0; animation: livePulse 2.4s ease-out infinite; }
@keyframes livePulse { 0% { transform: scale(.5); opacity: .6; } 100% { transform: scale(1.3); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .live-dot::after { animation: none; } }

/* one staged entrance for the hero copy, on load */
@media (prefers-reduced-motion: no-preference) {
  .hero-copy > * { animation: riseIn 0.9s var(--ease) backwards; }
  .hero-copy > :nth-child(2) { animation-delay: 0.06s; }
  .hero-copy > :nth-child(3) { animation-delay: 0.12s; }
  .hero-copy > :nth-child(4) { animation-delay: 0.18s; }
  .window { animation: windowIn 1.1s var(--ease) 0.1s backwards; }
}
@keyframes riseIn { from { opacity: 0; transform: translateY(16px); } }
@keyframes windowIn { from { opacity: 0; transform: translateY(24px) scale(0.985); } }

@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero h1 { max-width: 12ch; }
}

/* the aquarium window: the real biome art, flowing like the app's river,
   with the real app floating in it */
.window {
  position: relative;
  height: clamp(520px, 50vw, 640px);
  border-radius: var(--r-big);
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(13, 43, 62, 0.06), 0 30px 60px -36px rgba(13, 43, 62, 0.45);
  isolation: isolate;
}
.window .riverbed { position: absolute; inset: 0; z-index: -1; --tile: 700px; background-size: 700px auto; }
.window .phone {
  position: absolute;
  left: 50%;
  top: 44px;
  width: min(300px, 62%);
  transform: translateX(-50%) rotate(-2.5deg);
}
.window-fish {
  position: absolute;
  width: 92px;
  right: 8%;
  bottom: 9%;
  filter: drop-shadow(0 10px 8px rgba(13, 43, 62, 0.18));
}
.window-fish svg { width: 100%; height: auto; overflow: visible; }
@media (prefers-reduced-motion: no-preference) {
  .window-fish { animation: swim 9s ease-in-out infinite; }
}
@keyframes swim {
  0%, 100% { transform: translate(0, 0) rotate(-3deg); }
  50% { transform: translate(-26px, -18px) rotate(3deg); }
}
/* a lesson node bubble, the same shape the app uses */
.window-chip {
  position: absolute;
  left: 5%;
  bottom: 17%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px 10px 10px;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 4px 0 rgba(13, 43, 62, 0.08), 0 18px 30px -16px rgba(13, 43, 62, 0.4);
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.25;
  transform: rotate(-3deg);
}
.window-chip small { display: block; font-size: 13px; font-weight: 500; color: var(--muted); }
.window-chip .flame {
  width: 38px; height: 38px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--gold-tint);
}
.window-chip .flame svg { width: 22px; height: 22px; }
.window-chip.coins { left: auto; right: 5%; top: 40%; bottom: auto; transform: rotate(3deg); }
.window-chip.coins .flame { background: var(--green-tint); }
@media (max-width: 960px) {
  .window { height: 560px; }
}
@media (max-width: 520px) {
  .window { height: 500px; border-radius: 28px; }
  .window .phone { width: 64%; top: 34px; }
  .window-chip { font-size: 13.5px; left: 4%; bottom: 8%; }
  .window-chip.coins { right: 4%; top: 52%; }
  .window-fish { width: 70px; right: 6%; bottom: 22%; }
}

/* interior page head */
.page-head {
  padding: clamp(56px, 7vw, 100px) 0 clamp(64px, 7vw, 104px);
  background: var(--paper);
}
.page-head h1 { font-size: clamp(42px, 5.4vw, 72px); max-width: 12ch; }
.page-head .lede { margin-top: 24px; }
.page-head .btns { margin-top: 34px; }

/* ==========================================================================
   THE TRAIL: the six units, drawn like the app's lesson path
   ========================================================================== */
.trail { list-style: none; margin: 0; padding: 0; position: relative; }
.trail::before {
  content: "";
  position: absolute;
  left: 23px; top: 26px; bottom: 26px;
  width: 6px;
  border-radius: 6px;
  background: #8fe3e8;
  opacity: 0.55;
}
.trail li {
  position: relative;
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 11px 0;
}
.trail .stone {
  width: 52px; height: 46px;
  border-radius: 50% / 54%;
  display: grid;
  place-items: center;
  background: #e7edf1;
  box-shadow: inset 0 -5px 0 rgba(13, 43, 62, 0.1);
  color: #8aa0ae;
  font-weight: 800;
  font-size: 17px;
  position: relative;
}
.trail .done .stone { background: var(--green); color: #fff; box-shadow: inset 0 -5px 0 var(--green-dark); }
.trail .now .stone { background: var(--gold); color: #5a3d00; box-shadow: inset 0 -5px 0 var(--gold-dark); }
.trail .stone svg { width: 22px; height: 22px; }
.trail b { display: block; font-size: 19px; font-weight: 700; color: var(--ink); letter-spacing: -0.01em; }
.trail small { display: block; font-size: 15px; color: var(--muted); margin-top: 1px; }
.trail .count { font-size: 15px; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }

/* stacked, centred stage for the live question */
.stage { text-align: center; }
.stage .sec-head { margin-inline: auto; margin-bottom: 48px; }
.stage .sec-head .lede { margin-inline: auto; }
.stage .quizcard { max-width: 620px; margin-inline: auto; text-align: left; }
.stage-note { margin-top: 26px; text-align: center; }

/* ==========================================================================
   THE LIVE QUESTION (cards filled by site.js / competition-prep page)
   ========================================================================== */
.quizcard, .drill {
  position: relative;
  background: var(--paper);
  border-radius: 28px;
  padding: 30px 30px 28px;
  box-shadow: 0 6px 0 rgba(13, 43, 62, 0.07), var(--lift);
  border: 1px solid var(--hair-2);
}
.q-kicker, .drill-kicker {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 600;
  color: var(--muted);
}
.qfish { width: 36px; flex: none; }
.qfish svg { width: 100%; height: auto; }
.free-meter { display: flex; align-items: center; gap: 10px; margin: 16px 0 6px; }
.free-pips { display: flex; gap: 5px; }
.free-pips i { width: 30px; height: 8px; border-radius: 8px; background: var(--hair-2); }
.free-pips i.used { background: var(--green); }
.free-label { font-size: 14px; color: var(--muted); white-space: nowrap; }
.q-prompt {
  margin: 18px 0 22px;
  font-size: clamp(21px, 2vw, 25px);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.015em;
  color: var(--ink);
  text-wrap: balance;
}
.q-opts { display: grid; gap: 11px; }
.q-opt {
  display: block;
  width: 100%;
  text-align: left;
  padding: 15px 18px 14px;
  font-family: inherit;
  font-size: 17px;
  font-weight: 600;
  color: var(--ink);
  background: var(--paper);
  border: 2px solid var(--hair);
  border-radius: 16px;
  box-shadow: 0 4px 0 var(--hair);
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease, transform 0.1s var(--ease-press), box-shadow 0.1s var(--ease-press);
}
.q-opt:hover:not(:disabled) { border-color: #b9d3e2; background: var(--paper-2); }
.q-opt:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 1px 0 var(--hair); }
.q-opt:disabled { cursor: default; }
.q-opt.correct { border-color: var(--green); background: #e8f8d6; color: var(--green-deep); box-shadow: 0 4px 0 var(--green); }
.q-opt.wrong { border-color: #f1a3a3; background: #fdecec; color: #a22c2c; box-shadow: 0 4px 0 #f1a3a3; }
.q-feedback {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 58px;
  margin-top: 16px;
  padding: 0 4px;
  font-size: 17px;
  font-weight: 700;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.q-feedback.show { opacity: 1; }
.q-feedback.good { color: var(--green-deep); }
.q-feedback.bad { color: #a22c2c; }
.fb-fish { width: 52px; flex: none; }
.fb-fish svg { width: 100%; height: auto; overflow: visible; }
.q-again, .q-next { margin-top: 8px; visibility: hidden; opacity: 0; transition: opacity 0.2s ease; }
.q-again.show, .q-next.show { visibility: visible; opacity: 1; }
.q-gate { text-align: center; padding: 10px 4px 4px; }
.q-gate h3 { margin-top: 10px; }
.q-gate p { margin: 12px auto 0; max-width: 40ch; color: var(--body); }
.gate-fish { width: 110px; margin: 0 auto; }
.gate-fish svg { width: 100%; height: auto; overflow: visible; }
.gate-ctas { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 24px; }

.confetti {
  position: fixed; width: 9px; height: 13px; border-radius: 2px;
  z-index: 999; pointer-events: none;
  animation: confettiFall 1.15s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}
@keyframes confettiFall {
  0%   { transform: translate(0, 0) rotate(0deg) scale(1); opacity: 1; }
  100% { transform: translate(var(--cx), var(--cy)) rotate(var(--cr)) scale(0.7); opacity: 0; }
}

/* ==========================================================================
   BIOMES: the nine worlds, as a scrollable shelf
   ========================================================================== */
.shelf {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: clamp(200px, 19vw, 250px);
  gap: 18px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 6px max(28px, calc((100vw - var(--wrap)) / 2)) 26px;
  scroll-padding-inline: max(28px, calc((100vw - var(--wrap)) / 2));
  scrollbar-width: thin;
  scrollbar-color: var(--hair) transparent;
}
.biome {
  scroll-snap-align: start;
  margin: 0;
}
.biome .art {
  display: block;
  aspect-ratio: 3 / 4;
  border-radius: 22px;
  background-size: 118% auto;
  background-repeat: repeat-y;
  background-position: center 20%;
  background-color: var(--paper-2);
  box-shadow: inset 0 0 0 1px rgba(13, 43, 62, 0.06);
  transition: background-size 0.6s var(--ease);
}
.biome:hover .art { background-size: 126% auto; }
.biome figcaption {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  margin-top: 12px;
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
}
.biome figcaption span { font-size: 14.5px; font-weight: 500; color: var(--muted); }
@media (max-width: 640px) {
  .shelf { padding-inline: 16px; scroll-padding-inline: 16px; grid-auto-columns: 62vw; }
}

/* ==========================================================================
   DEEP BAND: the one dark section on a page
   ========================================================================== */
.deep {
  background: var(--panel);
  color: #c0d8e6;
  position: relative;
  overflow: hidden;
}
.deep h2, .deep h3 { color: #fff; }
.deep .lede { color: #b4cfdf; }
.deep b { color: #fff; }
.deep .tlink { color: #9fdcff; text-decoration-color: rgba(159, 220, 255, 0.4); }
.deep .ticks li { color: #d3e6f1; }
.deep .ticks li::before { background-color: rgba(88, 204, 2, 0.18); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238ee14f' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.2 4.2L19 7'/%3E%3C/svg%3E"); }
.deep-figs { display: flex; flex-wrap: wrap; gap: 18px 48px; margin-top: 36px; }
.deep-figs div { font-size: 15.5px; color: #9dbccd; line-height: 1.35; }
.deep-figs b { display: block; font-size: 44px; font-weight: 800; letter-spacing: -0.01em; font-family: var(--f-display); line-height: 1; color: #fff; margin-bottom: 6px; font-variant-numeric: tabular-nums; }
.phone-stage { display: flex; justify-content: center; }
.phone-stage .phone { max-width: 300px; }
.deep .phone { box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.1), 0 50px 100px -30px rgba(0, 0, 0, 0.7); }

/* ==========================================================================
   CLASS CARD: a join code and a small roster
   ========================================================================== */
.classcard {
  background: var(--paper);
  border-radius: 28px;
  padding: 28px;
  box-shadow: 0 6px 0 rgba(13, 43, 62, 0.06), var(--lift);
  border: 1px solid var(--hair-2);
  max-width: 440px;
  margin-inline: auto;
  width: 100%;
}
.classcard-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.classcard-top b { font-size: 18px; color: var(--ink); }  /* was inheriting white from the dark section: invisible on the white card */
.classcard-top span { font-size: 14px; color: var(--muted); }
.class-code { display: flex; gap: 7px; margin: 20px 0 8px; }
.class-code b {
  flex: 1;
  display: grid;
  place-items: center;
  height: 58px;
  border-radius: 14px;
  background: var(--paper-2);
  border: 2px solid var(--hair);
  box-shadow: 0 3px 0 var(--hair);
  font-size: 26px;
  font-weight: 800;
  color: var(--ink);
}
.classcard .fine { text-align: center; }
.roster { margin-top: 18px; border-top: 1px solid var(--hair-2); }
.roster-row { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--hair-2); }
.roster-row:last-child { border-bottom: 0; }
.rr-fish { width: 32px; flex: none; }
.rr-fish svg { width: 100%; height: auto; }
.rr-name { flex: 0 0 96px; font-size: 16px; font-weight: 600; color: var(--ink); }
.rr-bar { flex: 1; height: 9px; border-radius: 9px; background: var(--hair-2); overflow: hidden; }
.rr-bar i { display: block; height: 100%; width: 100%; border-radius: 9px; background: var(--green); transform: scaleX(0); transform-origin: left; transition: transform 1s var(--ease); }
.rr-bar i.warn { background: #e5a600; }
.rr-bar i.crit { background: #e0604f; }
.rr-pct { width: 40px; text-align: right; font-size: 15px; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }
.rr-run { margin-left: auto; font-size: 14.5px; font-weight: 600; color: var(--muted); }

/* ==========================================================================
   CLOSING CTA
   ========================================================================== */
.cta-sec {
  position: relative;
  text-align: center;
  background: var(--paper-2);
  overflow: hidden;
}
.cta-sec .wrap-narrow { display: grid; justify-items: center; }
.cta-fish { width: 120px; margin-bottom: 26px; }
.cta-fish svg { width: 100%; height: auto; overflow: visible; }
@media (prefers-reduced-motion: no-preference) {
  .cta-fish { animation: fishBob 5s ease-in-out infinite; }
}
@keyframes fishBob { 0%, 100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-10px) rotate(2deg); } }
.cta-sec h2 { max-width: 16ch; }
.cta-sec p { margin-top: 18px; font-size: 19px; color: var(--body); max-width: 40ch; }
.cta-sec .btns { justify-content: center; }


@media (max-width: 900px) {
  .deep .split > .phone-stage { order: 2; }
  .phone-stage .phone { max-width: 270px; }
}
@media (max-width: 520px) {
  .trail .count { display: none; }
  .trail li { grid-template-columns: 52px minmax(0, 1fr); }
  .classcard { padding: 22px 18px; }
  .classcard-top { flex-direction: column; align-items: flex-start; gap: 2px; }
  .class-code { gap: 5px; }
  .class-code b { height: 50px; font-size: 22px; }
}


/* ---------- a lesson as three screens in order ---------- */
.sequence {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(24px, 4vw, 56px);
}
.sequence .phone { max-width: 270px; margin: 0 auto 30px; }
.sequence li:nth-child(2) .phone { transform: translateY(28px); }
.sequence li:nth-child(2) h3 { margin-top: 28px; }
.sequence h3 { display: flex; align-items: center; gap: 12px; font-size: 22px; }
.sequence h3 span {
  display: grid;
  place-items: center;
  width: 32px; height: 32px;
  flex: none;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  font-size: 16px;
  font-weight: 800;
  box-shadow: inset 0 -3px 0 var(--green-dark);
}
.sequence p { margin-top: 10px; font-size: 16.5px; max-width: 34ch; }
@media (max-width: 860px) {
  .sequence { grid-template-columns: 1fr; gap: 56px; max-width: 420px; margin-inline: auto; }
  .sequence li:nth-child(2) .phone { transform: none; }
  .sequence li:nth-child(2) h3 { margin-top: 0; }
}

/* ---------- shop counts ---------- */
.shop-counts { display: grid; grid-template-columns: repeat(5, auto); justify-content: start; gap: 8px 36px; margin: 36px 0 0; }
.shop-counts div { display: flex; flex-direction: column-reverse; }
.shop-counts dd { margin: 0; font-size: 40px; font-weight: 800; letter-spacing: -0.01em; font-family: var(--f-display); line-height: 1; color: var(--ink); font-variant-numeric: tabular-nums; }
.shop-counts dt { margin-top: 6px; font-size: 15px; color: var(--muted); }
@media (max-width: 520px) { .shop-counts { grid-template-columns: repeat(3, auto); row-gap: 22px; } }

/* ---------- FAQ beside its heading ---------- */
.faq-grid { display: grid; grid-template-columns: minmax(0, 0.7fr) minmax(0, 1.3fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
@media (max-width: 860px) { .faq-grid { grid-template-columns: 1fr; } }


/* ---------- competition prep ---------- */
.cp-hero { background: var(--paper); }
.cp-hero h1 { max-width: 14ch; }
.drill-stage { max-width: 560px; width: 100%; justify-self: end; }
.drill-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.drill-run {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px 6px 9px;
  border-radius: var(--r-pill);
  background: var(--gold-tint);
  font-size: 14px; font-weight: 700; color: var(--gold-deep);
  white-space: nowrap;
}
.q-why { display: block; margin-top: 4px; font-size: 15px; font-weight: 500; line-height: 1.45; color: var(--body); }
.drill .q-feedback { align-items: flex-start; }
.modes { margin: 36px 0 0; display: grid; gap: 0; border-top: 1px solid var(--hair); }
.modes div { padding: 18px 0; border-bottom: 1px solid var(--hair); display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 4px 24px; }
.modes dt { font-weight: 700; font-size: 18px; color: var(--ink); }
.modes dd { margin: 0; font-size: 16.5px; color: var(--body); }
@media (max-width: 600px) { .modes div { grid-template-columns: 1fr; } }
.bank-ledger { padding: 6px 28px 14px; }
.bank-cols { columns: 3; column-gap: 48px; }
.bank-cols .ledger-row { break-inside: avoid; border-bottom: 1px solid var(--hair-2); }
@media (max-width: 900px) { .bank-cols { columns: 2; } }
@media (max-width: 560px) { .bank-cols { columns: 1; } .bank-ledger { padding: 4px 18px 10px; } }
.deep .alink { color: #9fdcff; }
@media (max-width: 960px) { .drill-stage { justify-self: stretch; max-width: none; } }


/* ---------- teachers ---------- */
.teach-head { padding-bottom: 0; background: var(--paper); }
.teach-head h1 { max-width: 13ch; }
.browser {
  margin: clamp(48px, 6vw, 80px) auto 0;
  max-width: 1120px;
  border-radius: 22px;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--hair);
  box-shadow: 0 2px 4px rgba(13, 43, 62, 0.05), 0 50px 100px -40px rgba(13, 43, 62, 0.4);
}
.browser-bar {
  display: flex;
  justify-content: center;
  padding: 12px;
  background: var(--paper-2);
  border-bottom: 1px solid var(--hair);
}
.browser-bar span {
  font-size: 13.5px;
  color: var(--muted);
  background: #fff;
  border: 1px solid var(--hair);
  border-radius: 8px;
  padding: 4px 18px;
}
.browser img { width: 100%; height: auto; }
.steps-row { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px; counter-reset: s; }
.steps-row li { padding-top: 28px; border-top: 2px solid var(--hair-2); position: relative; }
.steps-row li::before {
  content: ""; position: absolute; top: -2px; left: 0; width: 56px; height: 2px; background: var(--green);
}
.step-n {
  display: grid; place-items: center;
  width: 40px; height: 40px; margin-bottom: 18px;
  border-radius: 50%;
  background: var(--green); color: #fff;
  font-weight: 800; font-size: 18px;
  box-shadow: inset 0 -3px 0 var(--green-dark);
}
.steps-row p { margin-top: 10px; font-size: 16.5px; max-width: 34ch; }
@media (max-width: 820px) { .steps-row { grid-template-columns: 1fr; gap: 28px; } }

/* ---------- the state map (/why) ---------- */
.map-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px 48px; flex-wrap: wrap; margin-bottom: 40px; }
.map-head .lede { margin-top: 16px; }
.map-legend { list-style: none; display: flex; gap: 22px; margin: 0; padding: 0; font-size: 16px; font-weight: 600; color: var(--ink); }
.map-legend li { display: flex; align-items: center; gap: 9px; }
.map-legend .sw { width: 18px; height: 18px; border-radius: 6px; }
.map-legend .sw.g { background: var(--green); }
.map-legend .sw.r { background: #c3d3dd; }
.map-frame { position: relative; max-width: 940px; margin: 0 auto; }
.usmap-svg { width: 100%; height: auto; display: block; overflow: visible; }
.st { stroke: #fff; stroke-width: 1.2; cursor: pointer; outline: none; transition: fill 0.15s ease; }
.st.yes { fill: var(--green); }
.st.not { fill: #c3d3dd; }
.st.yes:hover, .st.yes.active-st { fill: #4ab800; }
.st.not:hover, .st.not.active-st { fill: #a9bfcc; }
.st:focus-visible { stroke: var(--ink); stroke-width: 2.4; }
.st-label { font-family: var(--f-sans); font-weight: 700; fill: #fff; pointer-events: none; }
.st-label.dim { fill: #4f6878; }
.st-lead { stroke: #c3d3dd; stroke-width: 1.1; fill: none; }
.st-tag { cursor: pointer; }
.st-tag rect { rx: 6; }
.st-tag.yes rect { fill: var(--green); }
.st-tag.not rect { fill: #c3d3dd; }
.st-tag text { font-family: var(--f-sans); font-weight: 700; fill: #fff; pointer-events: none; }
.st-tag.not text { fill: var(--ink-2); }
.st-tag:focus-visible rect { stroke: var(--ink); stroke-width: 2.2; }
.usmap-svg.animate .st, .usmap-svg.animate .st-tag, .usmap-svg.animate .st-lead { opacity: 0; animation: stFade 0.5s ease forwards; animation-delay: var(--d); }
@keyframes stFade { from { opacity: 0; } to { opacity: 1; } }
.map-tip {
  position: absolute; z-index: 10; pointer-events: none;
  background: var(--ink); color: #fff; border-radius: 14px; padding: 12px 15px;
  font-size: 14.5px; line-height: 1.45; max-width: 260px;
  box-shadow: 0 14px 30px -10px rgba(13, 43, 62, 0.5);
  opacity: 0; transform: translate(-50%, -100%) translateY(-6px);
  transition: opacity 0.15s ease, transform 0.15s ease;
}
.map-tip.show { opacity: 1; transform: translate(-50%, -100%) translateY(-10px); }
.map-tip b { display: block; font-size: 16px; color: #fff; }
.map-tip .tip-status { display: inline-block; margin: 2px 0; font-size: 13.5px; font-weight: 700; }
.map-tip.tip-yes .tip-status { color: #a6e878; }
.map-tip.tip-not .tip-status { color: #b9d3e2; }
.map-src { margin-top: 28px; text-align: center; font-size: 14.5px; color: var(--muted); }
.map-list { max-width: 760px; margin: 22px auto 0; }
.map-list summary { cursor: pointer; text-align: center; font-weight: 700; font-size: 16px; color: var(--ocean-deep); padding: 10px; border-radius: 12px; }
.map-list summary:hover { background: var(--paper-2); }
.map-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; margin-top: 18px; }
.map-cols h3, .map-cols .map-col-h { font-family: var(--f-sans); font-size: 17px; font-weight: 800; letter-spacing: 0; line-height: 1.2; margin: 0 0 10px; }
.map-cols ul { margin: 0; padding: 0; list-style: none; columns: 2; font-size: 15.5px; line-height: 2; }
.map-cols a { color: var(--body); text-decoration: none; }
.map-cols a:hover { color: var(--ocean-deep); text-decoration: underline; }
@media (max-width: 620px) { .map-cols { grid-template-columns: 1fr; } }

.facts { margin: 0; display: grid; border-top: 1px solid var(--hair); }
.facts div { display: grid; grid-template-columns: minmax(150px, 0.4fr) minmax(0, 1fr); gap: 8px 48px; padding: 30px 0; border-bottom: 1px solid var(--hair); align-items: baseline; }
.facts dt { font-size: clamp(40px, 5vw, 60px); font-weight: 800; letter-spacing: -0.01em; font-family: var(--f-display); line-height: 1; color: var(--ink); font-variant-numeric: tabular-nums; }
.facts dd { margin: 0; font-size: 18px; max-width: 58ch; }
.facts dd b { display: block; font-size: 20px; color: var(--ink); margin-bottom: 4px; }
@media (max-width: 640px) { .facts div { grid-template-columns: 1fr; } }

/* ---------- long-form text (privacy) and the 404 ---------- */
.legal-head { padding-bottom: 48px; }
.prose { font-size: 17px; }
.prose h2 { font-size: 26px; margin: 48px 0 12px; }
.prose h3 { font-size: 19px; margin: 28px 0 8px; }
.prose p { margin: 12px 0; max-width: 68ch; }
.prose ul { margin: 12px 0; padding-left: 22px; max-width: 66ch; }
.prose li { margin: 6px 0; }
.prose code { font-size: 0.92em; background: var(--paper-2); padding: 1px 6px; border-radius: 6px; }
.lost { text-align: center; min-height: calc(100dvh - var(--nav-h) - 300px); }
.lost .wrap-narrow { display: grid; justify-items: center; }
.lost .lede { margin: 20px auto 0; }
.lost .btns { justify-content: center; }
.lost .cta-fish { width: 150px; }

/* ==========================================================================
   SMALL PIECES
   ========================================================================== */
.feature-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px 48px; margin-top: 64px; }
.feature-list > div { padding-top: 22px; border-top: 2px solid var(--hair-2); }
.feature-list h3 { font-size: 21px; }
.feature-list p { margin-top: 10px; font-size: 16.5px; color: var(--body); max-width: 40ch; }
@media (max-width: 720px) { .feature-list { grid-template-columns: 1fr; gap: 28px; } }

/* ==========================================================================
   ONE SECTION, ONE SCREEN
   On laptops and desktops every section fills the space under the nav and
   its content is sized to fit inside it, so a section is always seen whole.
   Phones and short windows fall back to normal flowing sections.
   ========================================================================== */
:root {
  --screen-h: calc(100svh - var(--nav-h));
  --phone-h: min(560px, calc(var(--screen-h) - 104px));
}

/* the answer grid: four options in two columns, like the app */
.quizcard .q-opts, .drill .q-opts { grid-template-columns: 1fr 1fr; gap: 10px; }
.quizcard .q-opt, .drill .q-opt { min-height: 64px; display: flex; align-items: center; }
.q-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 14px; min-height: 56px; }
.q-foot .q-feedback { margin-top: 0; min-height: 0; }
.q-foot .q-again, .q-foot .q-next { margin-top: 0; flex: none; }
@media (max-width: 520px) {
  .quizcard .q-opts, .drill .q-opts { grid-template-columns: 1fr; }
  .q-foot { flex-direction: column; align-items: stretch; }
}

/* the trail, compact */
.trail li { padding: 6px 0; gap: 16px; grid-template-columns: 44px minmax(0, 1fr) auto; }
.trail .stone { width: 44px; height: 38px; font-size: 15px; }
.trail .stone svg { width: 19px; height: 19px; }
.trail::before { left: 19px; }
.trail b { font-size: 17.5px; }
.trail small { font-size: 14.5px; }

/* biome tiles take their height from the screen */
.biome .art { aspect-ratio: auto; height: clamp(220px, calc(var(--screen-h) - 380px), 340px); }

/* two-column heads: headline left, the one supporting line right */
.head-row { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px 64px; flex-wrap: wrap; margin-bottom: 36px; }
.head-row .lede { max-width: 46ch; }

/* phones size to the screen */
@media (min-width: 901px) {
  .phone-stage .phone, .sequence .phone { height: var(--phone-h); width: auto; max-width: none; }
  .sequence .phone { height: min(440px, calc(var(--screen-h) - 330px)); margin-bottom: 18px; }
  .sequence li:nth-child(2) .phone { transform: none; }
  .sequence li:nth-child(2) h3 { margin-top: 0; }
}

/* how-it-works features in three columns */
.feature-list.three { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px 40px; margin-top: 44px; }
@media (max-width: 900px) { .feature-list.three { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .feature-list.three { grid-template-columns: 1fr; } }

/* competition bank in four columns */
.bank-cols { columns: 4; column-gap: 36px; }
.bank-cols .ledger-row { padding: 8px 0; }
.bank-cols .ledger-row > span:first-child, .bank-cols .ledger-row .fig { font-size: 15px; }
@media (max-width: 1100px) { .bank-cols { columns: 3; } }
@media (max-width: 800px) { .bank-cols { columns: 2; } }
@media (max-width: 520px) { .bank-cols { columns: 1; } }

/* teachers: hero text beside the dashboard */
.teach-head { padding-bottom: clamp(48px, 7vw, 100px); background: var(--paper); }
.teach-grid { display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); gap: clamp(32px, 4vw, 64px); align-items: center; }
.teach-grid .browser { margin: 0; max-width: none; }
.teach-grid h1 { font-size: clamp(40px, 4.6vw, 64px); }
@media (max-width: 960px) { .teach-grid { grid-template-columns: 1fr; } }

/* why: the map beside its heading, the facts beside theirs */
.map-split h1 { font-size: clamp(36px, min(3.6vw, 7vh), 54px); max-width: 12ch; }
.map-sec.hero { background: var(--paper); }
.map-split { display: grid; grid-template-columns: minmax(260px, 0.42fr) minmax(0, 1fr); gap: clamp(32px, 4vw, 64px); align-items: center; }
.map-split .map-head { display: block; margin: 0; }
.map-split .map-legend { margin-top: 26px; }
.map-split .map-src { text-align: left; margin-top: 22px; }
.map-split .map-list { margin: 10px 0 0; }
.map-split .map-list summary { text-align: left; padding: 8px 0; }
.map-split .map-frame { max-width: min(860px, calc((var(--screen-h) - 80px) * 1.55)); width: 100%; margin-left: auto; }
.facts-split { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(32px, 5vw, 80px); align-items: center; }
.facts-split .sec-head { margin: 0; }
.facts div { padding: 22px 0; grid-template-columns: minmax(170px, 0.36fr) minmax(0, 1fr); }
.facts dt { white-space: nowrap; }
.facts dt { font-size: clamp(36px, 4vw, 52px); }
.facts dd { font-size: 16.5px; }
.facts dd b { font-size: 18px; }
@media (max-width: 960px) { .map-split, .facts-split { grid-template-columns: 1fr; } .map-split .map-frame { max-width: none; } }
.map-list[open] { position: relative; }

@media (min-width: 961px) and (min-height: 560px) {
  main > .section, main > .section-tight, main > .section-roomy, main > .hero, main > .page-head {
    min-height: var(--screen-h);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-top: clamp(28px, 5vh, 56px);
    padding-bottom: clamp(28px, 5vh, 56px);
  }

  h1 { font-size: clamp(40px, min(4.6vw, 8.4vh), 64px); }
  h2 { font-size: clamp(30px, min(3.1vw, 6vh), 44px); }
  .lede { font-size: clamp(17px, min(1.4vw, 2.6vh), 19.5px); }
  .sec-head { margin-bottom: clamp(24px, 4.5vh, 48px); }
  .split-text .btns, .btns { margin-top: clamp(20px, 4vh, 34px); }

  .hero .lede { margin-top: clamp(16px, 3vh, 26px); }
  .window { height: min(600px, calc(var(--screen-h) - 90px)); }
  .window .phone { top: 36px; width: min(290px, 56%); }

  .ticks { gap: 10px; }
  .trail { margin-top: clamp(20px, 3.5vh, 36px) !important; }
  .deep-figs { margin-top: clamp(20px, 3.5vh, 36px); }
  .modes { margin-top: clamp(20px, 3.5vh, 36px); }
  .modes div { padding: 13px 0; }
  .classcard { padding: 24px; }
  .class-code b { height: 50px; font-size: 23px; }
  .roster-row { padding: 9px 0; }
  .faq-item summary { padding: 18px 4px; font-size: 19px; }
  .steps-row li { padding-top: 22px; }
  .step-n { margin-bottom: 14px; }
  .cta-fish { width: 104px; margin-bottom: 18px; }
  .quizcard, .drill { padding: 24px 26px 20px; }
  .q-prompt { margin: 12px 0 16px; }
  .free-meter { margin: 12px 0 4px; }
}

/* very short laptop screens: trim further */
@media (min-width: 961px) and (min-height: 560px) and (max-height: 720px) {
  .trail small { display: none; }
  .trail li { padding: 4px 0; }
  .feature-list.three p { font-size: 15.5px; }
  .shelf { padding-bottom: 16px; }
  .stage .sec-head { margin-bottom: 18px; }
  .quizcard .q-opt, .drill .q-opt { min-height: 52px; padding: 11px 16px 10px; font-size: 16px; }
  .q-prompt { font-size: 20px; margin: 10px 0 12px; }
  .q-foot { min-height: 48px; margin-top: 10px; }
  .free-meter { margin: 8px 0 2px; }
  .bank-cols .ledger-row { padding: 5px 0; }
  .bank-ledger .ledger-head { padding: 10px 0 8px; }
}

/* ==========================================================================
   THE CONSOLE (2026-07-30)
   Shared three-zone dashboard shell for the advisor and school/centre pages,
   modelled on the Klassboard layout the brief pointed at: an identity sidebar
   on the left, the working surface in the middle, and a rail of things that
   need attention on the right.

   What is borrowed is the STRUCTURE, not the styling. Klassboard is built from
   violet-to-teal gradients and drop-shadowed cards; this uses DESIGN.md's own
   material — flat surfaces, hairline borders, one accent per zone, and every
   figure in mono with tabular numerals. No gradients anywhere in this block.
   ========================================================================== */
.console {
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr) 304px;
  gap: 24px;
  align-items: start;
}
@media (max-width: 1180px) {
  /* the rail's contents are alerts; they fold under the main column rather than
     being dropped, because "who needs help" is the page's whole point */
  .console { grid-template-columns: 232px minmax(0, 1fr); }
  .console .rail { grid-column: 2; }
}
@media (max-width: 860px) {
  .console { grid-template-columns: minmax(0, 1fr); }
  .console .rail, .console .side { grid-column: 1; }
}

/* ---------- shared card ---------- */
.ccard {
  background: var(--paper);
  border: 1px solid var(--hair);
  border-radius: var(--r-card);
  padding: 18px 20px;
}
.ccard + .ccard { margin-top: 16px; }
.ccard-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-bottom: 14px;
}
.ccard-head h3 { font-size: 16px; letter-spacing: -0.01em; }
.ccard-head .microlabel { color: var(--muted); }

/* ---------- left: identity + counted nav ---------- */
.side .ident { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.side .crest {
  width: 46px; height: 46px; flex: none;
  border-radius: 13px;
  display: grid; place-items: center;
  background: var(--ocean-dark); color: #fff;
  font-family: var(--f-mono); font-size: 15px; font-weight: 500;
}
.side .crest.center { background: var(--purple-deep); }
.side .ident b { display: block; font-size: 15.5px; font-weight: 600; color: var(--ink); line-height: 1.3; }
.side .ident span { display: block; margin-top: 2px; font-size: 12.5px; color: var(--muted); }

/* the join code is the artefact this whole page hangs off, so it gets the
   ledger treatment rather than being a line of body copy */
.side .code {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 12px; margin-bottom: 14px;
  background: var(--ledger);
  border: 1px dashed var(--ledger-line);
  border-radius: var(--r-data);
}
.side .code b {
  font-family: var(--f-mono); font-variant-numeric: tabular-nums slashed-zero;
  font-size: 15px; font-weight: 500; letter-spacing: 0.08em; color: var(--ink);
}
.side .btn { width: 100%; justify-content: center; }

.cnav { margin-top: 16px; display: grid; gap: 2px; }
.cnav a {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 11px;
  border-radius: 10px;
  border-left: 2px solid transparent;
  text-decoration: none;
  font-size: 14.5px; color: var(--body);
}
.cnav a svg { width: 17px; height: 17px; flex: none; color: var(--muted); }
.cnav a:hover { background: var(--paper-2); color: var(--ink); }
.cnav a[aria-current="page"] {
  background: var(--ocean-tint); border-left-color: var(--ocean); color: var(--ocean-deep);
}
.cnav a[aria-current="page"] svg { color: var(--ocean); }
/* counts sit at the far end, mono, so the column reads as a tally */
.cnav .n {
  margin-left: auto;
  font-family: var(--f-mono); font-variant-numeric: tabular-nums;
  font-size: 12.5px; color: var(--muted);
}

/* ---------- middle: the stat row ---------- */
.cstats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 720px) { .cstats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.cstat {
  background: var(--paper);
  border: 1px solid var(--hair);
  border-radius: var(--r-card);
  padding: 16px 18px;
}
.cstat .k { font-size: 13px; color: var(--muted); }
.cstat .v {
  margin-top: 6px;
  font-family: var(--f-mono); font-variant-numeric: tabular-nums slashed-zero;
  font-size: 30px; font-weight: 500; line-height: 1; color: var(--ink);
}
.cstat .v small { font-size: 15px; color: var(--muted); }
.cstat .d { margin-top: 7px; font-size: 12.5px; color: var(--muted); }
.cstat.warn { border-color: #f0cccc; background: #fff8f8; }
.cstat.warn .v { color: var(--red); }

/* ---------- middle: a bar row that is read, not decorative ---------- */
.bars { display: grid; gap: 11px; }
.bar-row { display: grid; grid-template-columns: 1fr 46px; gap: 12px; align-items: center; }
.bar-row .lab { font-size: 14px; color: var(--body); }
.bar-row .bar-track { grid-column: 1 / -1; height: 8px; border-radius: 4px; background: var(--hair-2); overflow: hidden; }
.bar-fill { height: 100%; border-radius: 4px; background: var(--ocean); }
.bar-fill.low { background: var(--red); }
.bar-fill.mid { background: var(--gold-dark); }
.bar-row .pct {
  text-align: right;
  font-family: var(--f-mono); font-variant-numeric: tabular-nums;
  font-size: 13.5px; color: var(--ink);
}

/* ---------- right: the attention rail ---------- */
.rail .alert {
  display: flex; gap: 11px; align-items: flex-start;
  padding: 12px 0;
  border-bottom: 1px solid var(--hair-2);
}
.rail .alert:last-child { border-bottom: 0; padding-bottom: 0; }
.rail .alert .dot {
  width: 26px; height: 26px; flex: none; margin-top: 1px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: var(--ocean-tint); color: var(--ocean-deep);
}
.rail .alert .dot svg { width: 14px; height: 14px; }
.rail .alert.warn .dot { background: var(--red-tint); color: var(--red); }
.rail .alert.good .dot { background: var(--green-tint); color: var(--green-deep); }
.rail .alert b { display: block; font-size: 14px; font-weight: 600; color: var(--ink); line-height: 1.35; }
.rail .alert span { display: block; margin-top: 2px; font-size: 13px; color: var(--muted); line-height: 1.45; }
.rail .alert p b, .rail .alert p span { display: inline; margin: 0; font-size: inherit; color: inherit; }
.rail .group-label {
  margin: 16px 0 2px;
  font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--muted);
}
.rail .group-label:first-child { margin-top: 0; }

/* console: page-level placement for the advisor/school pages. The .dash wrap
   becomes the grid, so the three zones sit side by side without the marketing
   sections above them changing. */
.dash .wrap.console { padding-top: 26px; padding-bottom: 46px; }
.console .side-actions { display: grid; gap: 8px; margin-top: 12px; }
.console .side-actions .btn { width: 100%; justify-content: center; }
.console .main-col { display: grid; gap: 16px; min-width: 0; }
.console .main-col > * { min-width: 0; }
/* the code chip already has its own look from the page; inside the sidebar it
   just needs to fill the column */
.console .side .code-chip { width: 100%; box-sizing: border-box; }
/* the two alert cards were a two-column strip; in the rail they stack */
.console .rail .glance { display: grid; gap: 12px; }
.console .rail .glance .alert { margin: 0; }

/* ---------- console: sizing the zones -------------------------------------
   A dashboard is not prose, so it opts out of the 1120px --wrap measure that
   the marketing pages use and runs to 1440px. At 1120 the middle column was
   ~520px, which squeezed the four stat cards and the roster table into an
   unreadable width. */
.dash .wrap.console { width: min(1440px, 100% - 48px); }

/* These three grids were authored for a full-width single column. Inside the
   console they live in the middle or the rail, so they re-flow to fit rather
   than keeping their original column counts. */
.console .main-col .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 1320px) {
  .console .main-col .stat-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.console .main-col .ws-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 1320px) {
  .console .main-col .ws-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
/* the two alerts were a side-by-side strip; a 304px rail takes them stacked */
.console .rail .glance { grid-template-columns: minmax(0, 1fr); margin-bottom: 0; }
.console .main-col > *:last-child { margin-bottom: 0; }

/* arrows for the worlds shelf: a visible cue that it scrolls, and a way to do it with a mouse */
.shelf-nav { display: flex; justify-content: flex-end; gap: 10px; margin: -18px 0 14px; }
.shelf-btn { width: 44px; height: 44px; border-radius: 50%; border: 2px solid var(--hair); background: #fff; color: var(--ink); display: grid; place-items: center; cursor: pointer; box-shadow: 0 3px 0 var(--hair); transition: transform .1s ease, opacity .15s ease; }
.shelf-btn:hover:not(:disabled) { border-color: #c4d7e2; }
.shelf-btn:active:not(:disabled) { transform: translateY(2px); box-shadow: 0 1px 0 var(--hair); }
.shelf-btn:disabled { opacity: .35; cursor: default; }
.shelf-btn:focus-visible { outline: 3px solid var(--ocean); outline-offset: 2px; }

/* phones: comfortable tap targets for footer and state-list links */
@media (max-width: 760px) {
  .foot-col a { display: block; padding: 8px 0; }
  .map-cols li a { display: inline-block; padding: 7px 0; }
}

.facts-split .map-src { color: var(--body); }
