/* ==========================================================================
   Biology Made Fun — Go Further companion pages (go/bio/*)
   Made Fun series, Book 1 · loaded AFTER site.css on bio pages only.
   Palette from the book cover: deep green, cream, copper.
   No JavaScript. Mobile-first.
   ========================================================================== */

.bio {
  --bio-green: #1A4726;
  --bio-green-900: #10301A;
  --bio-green-700: #24603A;
  --bio-green-100: #E3ECDF;
  --bio-cream: #FBF7EC;
  --bio-paper: #FFFDF6;
  --bio-copper: #B87333;        /* decorative: rules, borders, markers */
  --bio-copper-ink: #8A4B1C;    /* copper as text on cream (6.6:1) */
  --bio-copper-lite: #E8AE76;   /* copper as text on green (5.4:1) */
  --bio-ink: #1C2A20;           /* body text on cream (14.0:1) */
  --bio-ink-soft: #435246;      /* secondary text on cream (8.1:1) */
  --bio-line: #E2D7BD;
  --bio-radius: 14px;
  --bio-shadow: 0 1px 2px rgba(16, 48, 26, .06), 0 10px 28px rgba(16, 48, 26, .09);

  background: var(--bio-cream);
  color: var(--bio-ink);
}
.bio a { color: var(--bio-green-700); }
.bio a:hover { color: var(--bio-copper-ink); }
.bio :focus-visible { outline: 3px solid var(--bio-copper); outline-offset: 3px; }
.bio h1, .bio h2, .bio h3 { color: var(--bio-green); }
.bio .skip-link { background: var(--bio-copper-lite); color: var(--bio-green-900); }

/* ---------- Site header & footer, re-skinned for the book ---------- */
.bio .site-header { background: var(--bio-green); border-bottom: 3px solid var(--bio-copper); }
.bio .brand, .bio .brand:hover { color: var(--bio-cream); }
.bio .brand-mark { border-color: var(--bio-copper-lite); color: var(--bio-copper-lite); }
.bio .brand-name span { color: #C9D6C6; }
.bio .nav-toggle-label { min-height: 44px; }
.bio .site-nav a { color: #E9EFE4; min-height: 44px; display: flex; align-items: center; }
.bio .site-nav a:hover, .bio .site-nav a[aria-current="page"] { color: var(--bio-copper-lite); }
.bio .site-nav .nav-cta { background: var(--bio-copper-lite); color: var(--bio-green-900); justify-content: center; }
.bio .site-nav .nav-cta:hover { background: #F2C397; color: var(--bio-green-900); }
.bio .site-footer { background: var(--bio-green-900); color: #C4D1C1; border-top-color: var(--bio-copper); }
.bio .site-footer h2 { color: var(--bio-copper-lite); }
.bio .site-footer a { color: #EEF3EA; }
.bio .site-footer a:hover { color: var(--bio-copper-lite); }

/* ---------- Layout ---------- */
.bio-wrap { max-width: 46rem; margin: 0 auto; padding: 0 1.1rem; }
.bio-main { padding: 0 0 2.5rem; }

/* ---------- Hero ---------- */
.bio-hero {
  position: relative; overflow: hidden;
  background: var(--bio-green);
  color: #E6EEE2;
  padding: 1.6rem 0 3.6rem;          /* bottom space: video card overlaps */
}
.bio-hero::after {                     /* sketch-style cell doodle, decorative */
  content: ""; position: absolute; right: -46px; top: -30px;
  width: 210px; height: 210px; opacity: .16; pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200' fill='none' stroke='%23FBF7EC' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='M100 14c44 2 82 34 84 82s-32 88-84 90-86-36-86-86 40-88 86-86z'/%3E%3Cpath d='M104 24c38 3 70 30 71 72' stroke-dasharray='2 9'/%3E%3Cellipse cx='96' cy='102' rx='30' ry='26'/%3E%3Ccircle cx='102' cy='98' r='9'/%3E%3Cpath d='M44 60c10-6 20 4 30-2M136 150c8 4 18-4 26 2M40 138c6 8 16 6 22 12M140 52c10 0 14 10 24 8'/%3E%3C/svg%3E") no-repeat center / contain;
}
.bio-hero .go-book {
  display: inline-flex; align-items: center; gap: .5rem;
  font-size: .76rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase;
  color: var(--bio-copper-lite);
}
.bio-hero .go-book::before {
  content: ""; width: 1.6rem; height: 3px; border-radius: 2px; background: var(--bio-copper-lite);
}
.bio-hero h1 {
  color: var(--bio-cream);
  font-size: clamp(1.75rem, 6.4vw, 2.6rem);
  line-height: 1.12; margin: .55rem 0 .7rem; max-width: 22ch;
}
.bio-hero .go-from { margin: 0; color: #D4E0D0; font-size: 1rem; line-height: 1.6; max-width: 60ch; }
.bio-hero .go-from em { color: var(--bio-cream); font-style: italic; }
.bio-hero a { color: var(--bio-copper-lite); }

/* ---------- Videos ---------- */
.bio-watch { margin-top: -2.4rem; position: relative; z-index: 1; display: grid; gap: 1.25rem; }
.bio-video {
  margin: 0; background: var(--bio-paper);
  border-radius: var(--bio-radius); box-shadow: var(--bio-shadow);
  border-top: 4px solid var(--bio-copper);
  padding: .55rem .55rem 0;
}
.bio-video .video-frame { border-radius: 9px; background: #0E2416; box-shadow: none; }
.bio-video figcaption {
  padding: .7rem .45rem .85rem; font-size: .95rem; line-height: 1.45; color: var(--bio-ink-soft);
}
.bio-video figcaption .t { color: var(--bio-ink); font-weight: 700; }

/* ---------- Content blocks ---------- */
.bio-block { margin-top: 2rem; }
.bio-block h2 {
  font-size: clamp(1.3rem, 4.6vw, 1.6rem); margin: 0 0 .8rem;
  display: flex; align-items: center; gap: .6rem;
}
.bio-block h2::before {
  content: ""; flex: none; width: .7rem; height: .7rem; border-radius: 50%;
  background: var(--bio-copper); box-shadow: 0 0 0 4px rgba(184, 115, 51, .18);
}
.bio-block p { font-size: 1.0625rem; line-height: 1.7; }
.bio-block p:last-child { margin-bottom: 0; }

/* Key ideas: numbered study card */
.bio-ideas {
  background: var(--bio-paper); border: 1px solid var(--bio-line);
  border-radius: var(--bio-radius); padding: 1.3rem 1.1rem 1.1rem; box-shadow: var(--bio-shadow);
}
.bio-list { list-style: none; padding: 0; margin: 0; counter-reset: idea; }
.bio-list li {
  counter-increment: idea; position: relative;
  padding: .85rem 0 .85rem 2.6rem; margin: 0;
  font-size: 1.0625rem; line-height: 1.65;
  border-top: 1px dashed var(--bio-line);
}
.bio-list li:first-child { border-top: 0; padding-top: .2rem; }
.bio-list li::before {
  content: counter(idea);
  position: absolute; left: 0; top: .85rem;
  width: 1.85rem; height: 1.85rem; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--bio-green); color: var(--bio-cream);
  font-family: var(--font-display); font-weight: 700; font-size: .95rem; line-height: 1;
}
.bio-list li:first-child::before { top: .2rem; }
.bio-list strong { color: var(--bio-green); font-weight: 700; }

/* Why this helps: margin-note style */
.bio-why { border-left: 4px solid var(--bio-copper); padding: .2rem 0 .2rem 1rem; }

/* Try this: notebook card */
.bio-try {
  background:
    repeating-linear-gradient(to bottom, transparent 0 1.8rem, rgba(26, 71, 38, .07) 1.8rem calc(1.8rem + 1px)),
    var(--bio-green-100);
  border: 2px dashed var(--bio-green-700);
  border-radius: var(--bio-radius);
  padding: 1.25rem 1.15rem;
}
.bio-try h2::before { background: var(--bio-green); box-shadow: 0 0 0 4px rgba(26, 71, 38, .18); }

/* ---------- Lesson navigation: big tap cards ---------- */
.bio-pager { display: grid; gap: .75rem; margin: 2.25rem 0 0; }
.bio-pager a {
  display: flex; flex-direction: column; justify-content: center; gap: .2rem;
  min-height: 4.25rem; padding: .85rem 1.1rem;
  background: var(--bio-paper); border: 1.5px solid var(--bio-line); border-radius: 12px;
  color: var(--bio-green); font-weight: 700; line-height: 1.3; text-decoration: none;
  transition: border-color .15s, box-shadow .15s;
}
.bio-pager a:hover { border-color: var(--bio-copper); box-shadow: var(--bio-shadow); color: var(--bio-green); }
.bio-pager a span {
  font-size: .74rem; letter-spacing: .12em; text-transform: uppercase; color: var(--bio-copper-ink);
}
.bio-pager .next { text-align: right; }
@media (min-width: 600px) {
  .bio-pager { grid-template-columns: 1fr 1fr; }
  .bio-pager .next { grid-column: 2; }
}

/* ---------- Classroom call-to-action ---------- */
.bio-cta {
  margin-top: 2.25rem; border-radius: var(--bio-radius);
  background: var(--bio-green); color: #D4E0D0;
  padding: 1.5rem 1.25rem; display: grid; gap: 1.1rem;
  border-bottom: 4px solid var(--bio-copper);
}
.bio-cta h2 { color: var(--bio-cream); font-size: 1.35rem; margin: 0 0 .35rem; }
.bio-cta p { margin: 0; }
.bio-cta .bio-btns { display: flex; flex-wrap: wrap; gap: .7rem; }
.bio-cta .btn {
  flex: 1 1 11rem; min-height: 48px; border-radius: 10px; font-weight: 700;
}
.bio-cta .btn-primary { background: var(--bio-copper-lite); border-color: var(--bio-copper-lite); color: var(--bio-green-900); }
.bio-cta .btn-primary:hover { background: #F2C397; border-color: #F2C397; color: var(--bio-green-900); }
.bio-cta .btn-outline { background: transparent; color: var(--bio-cream); border-color: rgba(251, 247, 236, .7); }
.bio-cta .btn-outline:hover { background: var(--bio-cream); color: var(--bio-green); border-color: var(--bio-cream); }
@media (min-width: 720px) {
  .bio-cta { grid-template-columns: 1fr auto; align-items: center; padding: 1.6rem 1.75rem; }
  .bio-cta .btn { flex: 0 0 auto; }
}

/* ---------- Larger screens ---------- */
@media (min-width: 720px) {
  .bio-hero { padding: 2.4rem 0 4.4rem; }
  .bio-hero::after { width: 280px; height: 280px; right: -30px; top: -40px; }
  .bio-watch { margin-top: -3rem; }
  .bio-video { padding: .7rem .7rem 0; }
  .bio-ideas { padding: 1.6rem 1.6rem 1.3rem; }
  .bio-try { padding: 1.5rem 1.6rem; }
}

@media (prefers-reduced-motion: reduce) {
  .bio-pager a { transition: none; }
}

/* ---------- Print: worksheet-friendly ---------- */
@media print {
  .bio, .bio-hero { background: #fff !important; color: #000 !important; }
  .bio-hero { padding: 0 0 1rem; }
  .bio-hero::after, .bio-watch, .bio-pager, .bio-cta { display: none !important; }
  .bio-hero h1, .bio-hero .go-from, .bio-hero .go-from em, .bio-hero .go-book { color: #000 !important; }
  .bio-ideas, .bio-try { box-shadow: none; background: #fff; break-inside: avoid; }
}
