/* =================================================================
   Robot Explains — friendly tech explainers for curious humans.
   Storybook + science-museum-placard + cyber-poster.
   Light, card-based content; starry navy hero. Brand colors sampled
   from the robot mascot reference sheet.
   ================================================================= */

:root {
  /* Brand (from the mascot palette) */
  --blue:        #0d89fc;
  --blue-bright: #2bb2fc;
  --blue-deep:   #0045a1;
  --cyan:        #00c8ec;
  --purple:      #7c45f8;
  --green:       #3fa64b;
  --yellow:      #ffc23d;

  /* Surfaces & ink */
  --navy:        #101b33;   /* starry hero */
  --navy-2:      #16213d;
  --ink:         #1b2838;   /* body text on light */
  --ink-soft:    #51607a;
  --ink-faint:   #8893a7;
  --bg:          #f3f7fc;   /* page background */
  --surface:     #ffffff;   /* cards */
  --border:      #e4eaf3;
  --line-on-navy: rgba(255,255,255,0.14);

  --radius:      18px;
  --radius-lg:   26px;
  --shadow:      0 10px 30px -12px rgba(16,27,51,0.18);
  --shadow-hover:0 18px 40px -14px rgba(13,137,252,0.30);
  --transition:  0.28s cubic-bezier(0.22, 1, 0.36, 1);

  --font-head: "Baloo 2", system-ui, sans-serif;
  --font-body: "Nunito", system-ui, -apple-system, sans-serif;

  --maxw: 1120px;
  --gutter: clamp(1.1rem, 4vw, 2.5rem);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
img { max-width: 100%; display: block; }
a { color: var(--blue-deep); text-decoration: none; }

.container { max-width: var(--maxw); margin: 0 auto; padding-inline: var(--gutter); }

h1, h2, h3 { font-family: var(--font-head); font-weight: 700; line-height: 1.1; color: var(--ink); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-family: var(--font-head); font-weight: 600; font-size: 1.02rem;
  padding: 0.8rem 1.5rem; border-radius: 999px; border: 2px solid transparent;
  cursor: pointer; transition: transform var(--transition), box-shadow var(--transition), background var(--transition), color var(--transition);
}
.btn--primary { background: var(--blue); color: #fff; box-shadow: 0 8px 20px -8px rgba(13,137,252,0.7); }
.btn--primary:hover { background: var(--blue-bright); transform: translateY(-2px); }
.btn--ghost { background: rgba(255,255,255,0.08); color: #fff; border-color: rgba(255,255,255,0.45); }
.btn--ghost:hover { background: rgba(255,255,255,0.16); transform: translateY(-2px); }
.btn--light { background: #fff; color: var(--blue-deep); box-shadow: var(--shadow); }
.btn--light:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); }
.btn:focus-visible { outline: 3px solid var(--cyan); outline-offset: 3px; }

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,0.92);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--border);
}
.nav { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: 0.6rem; }
.nav__brand { display: flex; align-items: center; gap: 0.55rem; font-family: var(--font-head); font-weight: 700; font-size: 1.2rem; color: var(--ink); }
.nav__brand img { width: 38px; height: 38px; }
.nav__menu { list-style: none; display: flex; align-items: center; gap: 0.4rem; }
.nav__menu a {
  font-family: var(--font-head); font-weight: 600; font-size: 0.98rem; color: var(--ink-soft);
  padding: 0.45rem 0.85rem; border-radius: 999px; transition: color var(--transition), background var(--transition);
}
.nav__menu a:hover { color: var(--blue-deep); background: #eef4ff; }
.nav__menu a[aria-current="page"] { color: var(--blue-deep); background: #e7f1ff; }
.nav__toggle { display: none; background: none; border: 0; cursor: pointer; padding: 0.5rem; }
.nav__toggle span { display: block; width: 24px; height: 2.5px; background: var(--ink); border-radius: 2px; margin: 5px 0; transition: var(--transition); }

@media (max-width: 760px) {
  .nav__toggle { display: block; }
  .nav__menu {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0.2rem;
    background: #fff; border-bottom: 1px solid var(--border);
    padding: 0.6rem var(--gutter) 1rem; box-shadow: var(--shadow);
    display: none;
  }
  .nav__menu.open { display: flex; }
  .nav__menu a { padding: 0.7rem 0.85rem; }
}

/* ---------- Starry hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(60rem 30rem at 80% -10%, rgba(123,69,248,0.35), transparent 60%),
    radial-gradient(50rem 28rem at 8% 110%, rgba(0,200,236,0.25), transparent 60%),
    linear-gradient(160deg, var(--navy), var(--navy-2));
  color: #fff;
}
.hero::before, .pagehead::before { /* starfield */
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0.9;
  background-repeat: no-repeat;
  background-image:
    radial-gradient(2px 2px at 12% 20%, rgba(255,255,255,0.9), transparent),
    radial-gradient(1.5px 1.5px at 28% 60%, rgba(0,225,253,0.8), transparent),
    radial-gradient(1.6px 1.6px at 42% 28%, rgba(255,255,255,0.7), transparent),
    radial-gradient(2px 2px at 58% 72%, rgba(255,255,255,0.85), transparent),
    radial-gradient(1.5px 1.5px at 70% 30%, rgba(123,69,248,0.9), transparent),
    radial-gradient(1.8px 1.8px at 82% 60%, rgba(255,255,255,0.8), transparent),
    radial-gradient(1.5px 1.5px at 90% 22%, rgba(0,225,253,0.8), transparent),
    radial-gradient(1.5px 1.5px at 20% 84%, rgba(255,255,255,0.6), transparent),
    radial-gradient(1.4px 1.4px at 50% 48%, rgba(255,255,255,0.5), transparent);
}
.hero__inner {
  position: relative; z-index: 1;
  display: flex; flex-direction: column; gap: 2.4rem;
  padding-block: clamp(2.2rem, 6vh, 4rem) clamp(2.5rem, 7vh, 4.5rem);
}
.hero__split { display: grid; gap: 1.4rem; align-items: center; text-align: center; }
@media (min-width: 860px) { .hero__split { grid-template-columns: 1.1fr 0.9fr; text-align: left; gap: 2.5rem; } }
.hero__title { font-size: clamp(2.6rem, 7vw, 4.4rem); color: #fff; line-height: 1.0; }
.hero__title .pop { color: var(--yellow); }
.hero__tag { font-family: var(--font-head); font-weight: 600; color: var(--cyan); font-size: clamp(1.1rem, 2.2vw, 1.5rem); margin: 0.6rem 0 0; }
.hero__lede { color: rgba(255,255,255,0.82); font-size: 1.05rem; margin: 0.6rem auto 0; max-width: 52ch; }
@media (min-width: 860px) { .hero__lede { margin-inline: 0; } }
.hero__actions { display: flex; flex-wrap: wrap; gap: 0.8rem; justify-content: center; margin-top: 1.3rem; }
@media (min-width: 860px) { .hero__actions { justify-content: flex-start; } }
.hero__robot { justify-self: center; }
.hero__robot img { width: min(290px, 66vw); height: auto; filter: drop-shadow(0 22px 32px rgba(0,0,0,0.45)); }
@media (prefers-reduced-motion: no-preference) { .hero__robot img { animation: float 5s ease-in-out infinite; } }
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
.hero__banner { display: block; width: 100%; max-width: 940px; margin: 0 auto; border-radius: var(--radius-lg); overflow: hidden; border: 1px solid rgba(255,255,255,0.16); box-shadow: 0 30px 60px -22px rgba(0,0,0,0.6); transition: transform var(--transition), box-shadow var(--transition); }
.hero__banner:hover { transform: translateY(-4px); box-shadow: 0 40px 72px -22px rgba(0,0,0,0.72); }
.hero__banner:focus-visible { outline: 3px solid var(--cyan); outline-offset: 4px; }
.hero__banner img { width: 100%; height: auto; display: block; }

/* ---------- "How this works" strip ---------- */
.strip { background: var(--navy-2); color: #fff; }
.strip__inner { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.6rem 2.2rem; padding-block: 1rem; text-align: center; font-family: var(--font-head); font-weight: 600; }
.strip__item { display: inline-flex; align-items: center; gap: 0.5rem; }
.strip__dot { width: 0.6rem; height: 0.6rem; border-radius: 50%; }

/* ---------- Sections ---------- */
.section { padding-block: clamp(2.8rem, 7vh, 4.5rem); }
.section--tint { background: linear-gradient(180deg, #fff, var(--bg)); }
.section__head { max-width: 56ch; margin-bottom: 1.8rem; }
.section__kicker { font-family: var(--font-head); font-weight: 700; font-size: 0.85rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--blue); }
.section__title { font-size: clamp(1.7rem, 3.5vw, 2.4rem); margin: 0.3rem 0 0.5rem; }
.section__lede { color: var(--ink-soft); }
.section__more { margin-top: 1.6rem; }

/* ---------- Card grid ---------- */
.grid { display: grid; grid-template-columns: 1fr; gap: 1.4rem; }
@media (min-width: 560px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .grid--3 { grid-template-columns: repeat(3, 1fr); } }

.card {
  display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); transition: transform var(--transition), box-shadow var(--transition);
  color: var(--ink);
}
a.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-hover); }
a.card:focus-visible { outline: 3px solid var(--cyan); outline-offset: 3px; }
.card__thumb { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: #eef3fb; }
.card__thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.card__accent { height: 6px; }
.card__accent--blue { background: var(--blue); }
.card__accent--purple { background: var(--purple); }
.card__accent--green { background: var(--green); }
.card__accent--yellow { background: var(--yellow); }
.card__body { padding: 1.05rem 1.2rem 1.25rem; display: flex; flex-direction: column; gap: 0.4rem; flex: 1; }
.card__num {
  font-family: var(--font-head); font-weight: 700; font-size: 0.82rem;
  color: #fff; background: var(--blue); align-self: flex-start;
  padding: 0.1rem 0.6rem; border-radius: 999px; letter-spacing: 0.02em;
}
.card__num--purple { background: var(--purple); }
.card__num--green { background: var(--green); }
.card__num--yellow { background: var(--yellow); color: var(--ink); }
.card__title { font-size: 1.2rem; }
.card__desc { color: var(--ink-soft); font-size: 0.98rem; flex: 1; }
.card__cta { font-family: var(--font-head); font-weight: 700; color: var(--blue); font-size: 0.95rem; margin-top: 0.3rem; }

/* coming-soon variant */
.card--soon { opacity: 0.92; }
.card--soon .card__thumb {
  display: grid; place-items: center;
  background: linear-gradient(150deg, #eef3fb, #e7edf8);
}
.card--soon .card__thumb img { width: 64px; height: auto; object-fit: contain; opacity: 0.85; }
.card__badge {
  position: absolute; top: 0.7rem; right: 0.7rem;
  font-family: var(--font-head); font-weight: 700; font-size: 0.72rem;
  background: var(--ink); color: #fff; padding: 0.2rem 0.6rem; border-radius: 999px;
}
.card__level { display: inline-block; align-self: flex-start; font-family: var(--font-head); font-weight: 700; font-size: 0.66rem; letter-spacing: 0.04em; text-transform: uppercase; padding: 0.16rem 0.55rem; border-radius: 999px; margin-bottom: 0.55rem; }
.card__level--beginner { background: #e3f6e8; color: #257a39; }
.card__level--intermediate { background: #fff0d6; color: #9a6800; }

/* ---------- About / prose ---------- */
.prose { max-width: 70ch; }
.prose p { margin-bottom: 1.1rem; color: var(--ink); }
.prose h2 { font-size: 1.5rem; margin: 2rem 0 0.7rem; }
.prose ol, .prose ul { margin: 0 0 1.1rem 1.3rem; }
.prose li { margin-bottom: 0.45rem; }
.prose strong { color: var(--ink); }
.callout {
  background: #eef4ff; border: 1px solid #d6e6ff; border-left: 4px solid var(--blue);
  border-radius: var(--radius); padding: 1.2rem 1.4rem; margin: 1.5rem 0;
}
.callout h3 { font-size: 1.05rem; margin-bottom: 0.4rem; color: var(--blue-deep); }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy); color: rgba(255,255,255,0.8); margin-top: 2rem; }
.site-footer__inner { padding-block: 2.4rem; display: flex; flex-wrap: wrap; gap: 1rem 2rem; align-items: center; justify-content: space-between; }
.site-footer a { color: var(--cyan); }
.site-footer__brand { display: flex; align-items: center; gap: 0.5rem; font-family: var(--font-head); font-weight: 700; color: #fff; }
.site-footer__brand img { width: 34px; height: 34px; }
.site-footer small { color: rgba(255,255,255,0.55); }

/* ---------- For parents & teachers teaser ---------- */
.teaser {
  display: flex; align-items: center; gap: 1.6rem;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); box-shadow: var(--shadow);
  padding: 1.5rem 1.9rem;
}
.teaser__art { width: 120px; flex: none; }
.teaser__art img { width: 100%; height: auto; }
.teaser__body h2 { font-size: 1.4rem; margin-bottom: 0.3rem; }
.teaser__body p { color: var(--ink-soft); margin: 0; }
.teaser__body .teaser__cta { margin-top: 0.9rem; }
.grid + .teaser { margin-top: 2.5rem; }
.teaser + .grid { margin-top: 2.5rem; }
.track-note { margin-top: 1.8rem; text-align: center; color: var(--ink-faint); }

/* ---------- Gallery v1: eyebrow, meta, index cards ---------- */
.pagehead__eyebrow { font-family: var(--font-head); font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; font-size: 0.72rem; color: var(--cyan); margin-bottom: 0.6rem; }
.gallery-meta { display: flex; flex-wrap: wrap; gap: 0.5rem 1.4rem; color: var(--ink-soft); font-size: 0.9rem; margin: 0 0 1.6rem; }
.gallery-meta span { font-family: var(--font-head); font-weight: 600; }
.gallery-index { display: grid; grid-template-columns: 1fr; gap: 1.3rem; }
@media (min-width: 620px) { .gallery-index { grid-template-columns: 1fr 1fr; } }
@media (min-width: 980px) { .gallery-index { grid-template-columns: 1fr 1fr 1fr; } }
.gallery-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; display: flex; flex-direction: column; box-shadow: 0 10px 30px -16px rgba(16,27,51,0.25); transition: transform var(--transition), box-shadow var(--transition); }
.gallery-card:hover { transform: translateY(-4px); box-shadow: 0 18px 40px -18px rgba(16,27,51,0.35); }
.gallery-card__accent { height: 6px; }
.gallery-card__accent--blue { background: var(--blue); }
.gallery-card__accent--purple { background: var(--purple); }
.gallery-card__accent--green { background: var(--green); }
.gallery-card__accent--yellow { background: var(--yellow); }
.gallery-card__body { padding: 1.3rem 1.4rem 1.5rem; display: flex; flex-direction: column; flex: 1; }
.gallery-card__title { font-size: 1.3rem; margin: 0; }
.gallery-card__meta { font-family: var(--font-head); font-weight: 700; font-size: 0.78rem; color: var(--ink-faint); margin: 0.3rem 0 0.7rem; }
.gallery-card__desc { color: var(--ink-soft); margin: 0 0 0.9rem; }
.gallery-card__samples { list-style: none; margin: 0 0 1.1rem; padding: 0; color: var(--ink-soft); font-size: 0.92rem; }
.gallery-card__samples li { padding-left: 1rem; position: relative; margin-bottom: 0.25rem; }
.gallery-card__samples li::before { content: "\2022"; position: absolute; left: 0; color: var(--blue); }
.gallery-card__cta { margin-top: auto; font-family: var(--font-head); font-weight: 700; color: var(--blue); }

/* ---------- Search ---------- */
.search { max-width: 640px; margin: 0 auto 1.4rem; }
.search__input { width: 100%; font-family: var(--font-body); font-size: 1.1rem; padding: 0.9rem 1.3rem; border: 2px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--ink); }
.search__input::placeholder { color: var(--ink-faint); }
.search__input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 4px rgba(13,137,252,0.15); }
.search__status { text-align: center; color: var(--ink-soft); margin: 0 0 1.5rem; font-family: var(--font-head); font-weight: 600; }
.search__status a { color: var(--blue); }

.gallery-actions { text-align: center; margin: 0 0 1.8rem; }

/* ---------- Home v1: eyebrow, paths, chips ---------- */
.hero__eyebrow { font-family: var(--font-head); font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; font-size: 0.74rem; color: var(--cyan); margin: 0 0 0.7rem; }
.intro { max-width: 70ch; }
.path-grid { display: grid; grid-template-columns: 1fr; gap: 1.1rem; }
@media (min-width: 620px) { .path-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 980px) { .path-grid { grid-template-columns: repeat(4, 1fr); } }
.path-card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-top: 5px solid var(--blue); border-radius: var(--radius-lg); padding: 1.4rem 1.4rem 1.5rem; box-shadow: 0 10px 30px -18px rgba(16,27,51,0.25); transition: transform var(--transition), box-shadow var(--transition); }
.path-card:hover { transform: translateY(-4px); box-shadow: 0 18px 40px -18px rgba(16,27,51,0.35); }
.path-card--blue { border-top-color: var(--blue); }
.path-card--green { border-top-color: var(--green); }
.path-card--purple { border-top-color: var(--purple); }
.path-card--yellow { border-top-color: var(--yellow); }
.path-card h3 { font-size: 1.15rem; margin: 0 0 0.5rem; }
.path-card p { color: var(--ink-soft); margin: 0 0 0.9rem; font-size: 0.96rem; flex: 1; }
.path-card__cta { font-family: var(--font-head); font-weight: 700; color: var(--blue); }
.track-chips { display: flex; flex-wrap: wrap; gap: 0.7rem; }
.track-chip { display: inline-block; font-family: var(--font-head); font-weight: 600; font-size: 0.95rem; background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: 0.5rem 1.1rem; color: var(--ink); transition: border-color var(--transition), color var(--transition), transform var(--transition); }
.track-chip:hover { border-color: var(--blue); color: var(--blue); transform: translateY(-2px); }
.about-preview { max-width: 70ch; }
.about-preview__link { font-family: var(--font-head); font-weight: 700; color: var(--blue); }
.track-group { margin: 2.6rem 0 1.2rem; }
.track-group:first-of-type { margin-top: 0.4rem; }
.track-group__title { font-family: var(--font-head); font-size: clamp(1.4rem, 2.6vw, 1.9rem); }
.track-group__title::before { content: ""; display: inline-block; width: 0.55rem; height: 1.1rem; background: var(--blue); border-radius: 3px; margin-right: 0.6rem; vertical-align: -2px; }
.track-group__blurb { color: var(--ink-soft); margin-top: 0.2rem; }

/* ---------- Explainer lesson page ---------- */
.lesson { max-width: 760px; margin: 0 auto; }
.lesson__eyebrow { font-family: var(--font-head); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; font-size: 0.8rem; color: var(--cyan); margin-bottom: 0.5rem; }
.lesson__level { display: inline-block; font-weight: 700; font-size: 0.62rem; letter-spacing: 0.05em; padding: 0.1rem 0.5rem; border-radius: 999px; margin-left: 0.5rem; vertical-align: 1px; }
.lesson__level--beginner { background: rgba(63,166,75,0.28); color: #bdf6c8; }
.lesson__level--intermediate { background: rgba(255,194,61,0.22); color: #ffdd95; }
.lesson__poster { margin: 0 auto 2.2rem; text-align: center; max-width: 520px; }
.lesson__poster img { width: 100%; height: auto; border-radius: var(--radius); border: 1px solid var(--border); box-shadow: var(--shadow); }
.lesson__download { margin-top: 1.1rem; }
.lesson__body > p:first-child { font-size: 1.14rem; color: var(--ink); }
.lesson__h2 { font-family: var(--font-head); font-size: clamp(1.4rem, 2.6vw, 1.9rem); margin: 2.4rem 0 1rem; }
.lesson__keepgoing { text-align: center; }
.vocab { margin: 0; }
.vocab dt { font-family: var(--font-head); font-weight: 700; color: var(--ink); margin-top: 0.7rem; }
.vocab dd { color: var(--ink-soft); margin: 0.1rem 0 0; }
.callout--grownup { background: #f3f0fb; border-color: #e2d9f6; border-left-color: var(--purple); }
.callout--grownup h3 { color: var(--purple); }
.learn-more__intro { margin-top: 0.9rem; font-family: var(--font-head); font-weight: 700; color: var(--purple); }
.learn-more { list-style: none; margin: 0.4rem 0 0; padding: 0; }
.learn-more a { color: var(--purple); }
.learn-more li { margin-bottom: 0.5rem; }
.learn-more a { font-family: var(--font-head); font-weight: 600; }
.lesson__actions { display: flex; flex-wrap: wrap; gap: 0.6rem; justify-content: center; margin-top: 1.1rem; }
.btn--line { background: transparent; color: var(--ink); border: 2px solid var(--border); }
.btn--line:hover { border-color: var(--blue); color: var(--blue); }
.dir-group { font-family: var(--font-head); margin: 1.6rem 0 0.6rem; }
.dir { list-style: none; padding: 0; margin: 0; }
@media (min-width: 680px) { .dir { columns: 2; column-gap: 2.5rem; } }
.dir li { margin-bottom: 0.45rem; break-inside: avoid; }
.dir__poster { font-size: 0.85rem; color: var(--ink-faint); }

/* ---------- Print: clean printable lessons ---------- */
@media print {
  .site-header, .site-footer, .nav__toggle, .lesson__actions, .lesson__related { display: none !important; }
  .reveal { opacity: 1 !important; transform: none !important; }
  body { background: #fff !important; color: #000 !important; }
  .pagehead { background: #fff !important; padding: 0 0 0.5rem !important; }
  .pagehead::before, .pagehead::after { display: none !important; }
  .pagehead h1, .pagehead p, .lesson__eyebrow, .lesson__h2, .vocab dt, .callout h3, .callout--grownup h3 { color: #000 !important; }
  .section { padding: 0 !important; }
  .lesson { max-width: 100% !important; }
  .lesson__poster { max-width: 340px !important; margin: 0 auto 1rem !important; }
  .lesson__poster img { border: 1px solid #999 !important; box-shadow: none !important; }
  .callout, .callout--grownup { background: #fff !important; border: 1px solid #999 !important; }
  .callout, .vocab, .lesson__poster, .lesson__h2 { page-break-inside: avoid; }
  .lesson__h2 { page-break-after: avoid; }
  a { color: #000 !important; }
  .learn-more a::after { content: " (" attr(href) ")"; font-weight: 400; font-size: 0.85em; }
}
.teaser__badge { display: inline-block; font-family: var(--font-head); font-weight: 700; font-size: 0.72rem; background: var(--yellow); color: var(--ink); padding: 0.18rem 0.65rem; border-radius: 999px; margin-top: 0.7rem; }
@media (max-width: 560px) { .teaser { flex-direction: column; text-align: center; } }

.site-footer__tag { font-family: var(--font-head); font-weight: 700; color: var(--cyan); margin-top: 0.2rem; }
.site-footer__links { margin-top: 0.5rem; font-size: 0.92rem; line-height: 1.9; }
.site-footer__domains { margin-top: 0.6rem; font-family: var(--font-head); font-weight: 600; color: var(--cyan); font-size: 0.9rem; }
.site-footer__note { margin-top: 0.4rem; font-size: 0.82rem; color: var(--ink-faint); max-width: 60ch; }

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.22,1,0.36,1); }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; } }

/* ---------- Page header (sub-pages) ---------- */
.pagehead {
  position: relative; overflow: hidden; color: #fff; text-align: center;
  background:
    radial-gradient(50rem 24rem at 80% -20%, rgba(123,69,248,0.35), transparent 60%),
    radial-gradient(40rem 24rem at 5% 120%, rgba(0,200,236,0.22), transparent 60%),
    linear-gradient(160deg, var(--navy), var(--navy-2));
}
.pagehead__inner { position: relative; z-index: 1; padding-block: clamp(2.2rem, 6vh, 3.6rem); }
.pagehead h1 { color: #fff; font-size: clamp(2rem, 5vw, 3.1rem); }
.pagehead .pop { color: var(--yellow); }
.pagehead p { color: rgba(255,255,255,0.86); max-width: 62ch; margin: 0.7rem auto 0; }
