/* AnimalSake — printable workbook viewer. Themed to the site (cream/Baloo 2/orange),
   ports the prototype viewer layout. Buttons reuse the site .btn/.btn--primary/.btn--ghost. */
.wb-crumb { max-width: var(--maxw); margin: 0 auto; padding: 10px 20px 0; font-size: 14px; color: var(--ink-soft); }
.wb-crumb a { color: var(--ink-soft); } .wb-crumb a:hover { color: var(--orange-deep); } .wb-crumb b { color: var(--ink); font-weight: 700; }
.wb-main { max-width: var(--maxw); margin: 0 auto; padding: clamp(14px,3vw,30px) 20px 8px; }

.wb-shell {
  display: grid; grid-template-columns: minmax(0,1fr) minmax(300px,400px);
  gap: clamp(22px,4vw,46px); align-items: start;
}
.wb-viewer { min-width: 0; }

.wb-toolbar { display: grid; grid-template-columns: 48px minmax(0,1fr) 48px; align-items: center; gap: 12px; margin-bottom: 14px; }
.wb-iconbtn {
  width: 48px; height: 48px; border: 2px solid var(--line); border-radius: 50%;
  color: var(--ink); background: var(--cream-card); box-shadow: var(--shadow-sm);
  cursor: pointer; font-size: 26px; line-height: 1; font-family: var(--font);
}
.wb-iconbtn:hover, .wb-iconbtn:focus-visible { border-color: var(--orange); color: var(--orange-deep); outline: none; }

.wb-status { min-width: 0; text-align: center; }
.wb-status span { display: block; color: var(--ink-soft); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.wb-status strong { display: block; margin-top: 2px; font-size: clamp(18px,2vw,24px); font-weight: 800; }

.wb-frame {
  display: grid; place-items: center; width: min(100%,760px); margin-inline: auto;
  padding: clamp(12px,2vw,22px); background: var(--cream-card);
  border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
}
.wb-frame img {
  width: 100%; aspect-ratio: 8.5/11; object-fit: contain; background: #fff;
  border-radius: var(--radius-sm); box-shadow: 0 12px 26px rgba(74,53,38,.18);
}

.wb-panel { position: sticky; top: 90px; }
.wb-eyebrow { margin: 0 0 8px; color: var(--orange-deep); font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; }
.wb-panel h1 { margin: 0; font-size: clamp(28px,3.6vw,44px); line-height: 1.06; font-weight: 800; color: var(--ink); }
.wb-summary { margin: 14px 0 0; color: var(--ink-soft); font-size: 16px; line-height: 1.55; }

.wb-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }

.wb-meta {
  display: grid; grid-template-columns: repeat(3,1fr); gap: 1px; margin: 24px 0 0;
  overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--line);
}
.wb-meta div { padding: 13px 12px; background: var(--cream-card); text-align: center; }
.wb-meta dt { color: var(--ink-soft); font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.wb-meta dd { margin: 4px 0 0; font-weight: 800; }

.wb-thumbs { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; margin-top: 22px; }
.wb-thumb {
  min-width: 0; padding: 7px; border: 2px solid var(--line); border-radius: var(--radius-sm);
  background: var(--cream-card); box-shadow: var(--shadow-sm); cursor: pointer; font-family: var(--font);
}
.wb-thumb img { display: block; width: 100%; aspect-ratio: 8.5/11; object-fit: cover; object-position: top center; border-radius: 8px; }
.wb-thumb span { display: block; margin-top: 6px; overflow: hidden; color: var(--ink); font-size: 12px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; text-align: center; }
.wb-thumb.is-active { border-color: var(--orange); box-shadow: 0 0 0 3px rgba(244,123,32,.18), var(--shadow-sm); }

@media (max-width: 1020px) {
  .wb-shell { grid-template-columns: 1fr; }
  .wb-panel { position: static; max-width: 780px; margin: 0 auto; }
}
@media (max-width: 620px) {
  .wb-thumbs { grid-template-columns: repeat(2,1fr); }
  .wb-meta { grid-template-columns: 1fr; }
}

/* ---- crawlable about block (SEO text) ---- */
.wb-about { max-width: var(--maxw); margin: clamp(28px,5vw,52px) auto 0; padding: 0 20px; }
.wb-about h2 { font-size: clamp(22px,2.6vw,30px); font-weight: 800; color: var(--ink); margin: 0 0 10px; }
.wb-about h3 { font-size: 19px; font-weight: 800; color: var(--ink); margin: 22px 0 8px; }
.wb-about p { color: var(--ink-soft); margin: 0 0 12px; max-width: 70ch; }
.wb-inside { margin: 0; padding-left: 20px; max-width: 70ch; }
.wb-inside li { color: var(--ink-soft); margin: 5px 0; }
.wb-inside b { color: var(--ink); }
.wb-more { font-weight: 600; }

/* ---- /workbooks index ---- */
.wb-index { max-width: var(--maxw); margin: 0 auto; padding: clamp(14px,3vw,28px) 20px clamp(20px,4vw,36px); }
.wb-index__head { text-align: center; margin: 0 auto clamp(6px,2vw,14px); max-width: 62ch; }
.wb-index__head h1 { font-size: clamp(30px,4vw,46px); font-weight: 800; margin: 0 0 8px; }
.wb-index__head p { color: var(--ink-soft); margin: 0; }
.wb-section { display: flex; align-items: center; gap: 13px; margin: clamp(26px,4vw,42px) 0 16px; font-size: clamp(20px,2.4vw,27px); font-weight: 800; color: var(--ink); }
.wb-section::after { content: ""; flex: 1; height: 2px; background: var(--line); border-radius: 2px; }
.wb-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(225px,1fr)); gap: clamp(16px,2vw,22px); }
.wb-card { display: block; background: var(--cream-card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); transition: transform .12s ease, box-shadow .12s ease; }
.wb-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.wb-card__img { width: 100%; aspect-ratio: 8.5/11; object-fit: cover; object-position: top center; background: #fff; }
.wb-card__body { padding: 12px 14px 15px; }
.wb-chip { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .03em; color: #fff; }
.wb-chip.is-life { background: var(--green-deep); }
.wb-chip.is-adapt { background: var(--orange-deep); }
.wb-chip.is-facts { background: #8a63c4; }
.wb-chip.is-habitat { background: #2f8fb3; }
.wb-chip.is-color { background: #e0699f; }
.wb-card__title { display: block; margin-top: 8px; font-size: 15.5px; font-weight: 700; color: var(--ink); line-height: 1.25; }
.wb-card__meta { display: block; margin-top: 5px; font-size: 12.5px; font-weight: 600; color: var(--ink-soft); }

.wb-grid--row { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.wb-seeall { text-align: center; margin: 20px 0 0; font-weight: 700; }

/* ===== mobile: 2-up covers (override base auto-fill; must live here to win the cascade vs styles.css) (2026-06) ===== */
@media (max-width: 600px) {
  .wb-grid, .wb-grid--row { grid-template-columns: repeat(2, 1fr) !important; gap: 12px; }
  .wb-card__title { font-size: 14px; }
  .wb-card__meta { font-size: 11.5px; }
}
