/* ============================================
   TOOTIE'S BACKYARD — MASTER THEME
   ============================================ */

/* Google Fonts loaded via wp_enqueue_style in functions.php (with font-display:swap) */

:root {
  /* Core Palette */
  --navy:      #3D6B2C;
  --orange:    #FFDE00;
  --sky:       #97CCE8;
  --sky-light: #D6F0FB;
  --green:     #3D6B2C;
  --green-lt:  #8FC279;
  --yellow:    #FFDE00;
  --red:       #D32F2F;
  --tan:       #FFFDF7;
  --white:     #FFFFFF;
  --bg:        #D6F0FB;

  /* Kids accent colors (no purple) */
  --coral:     #D32F2F;
  --teal:      #97CCE8;
  --lime:      #3D6B2C;
  --amber:     #2E7D32;

  /* Typography */
  --font-display: 'Fredoka One', 'Mali', system-ui, sans-serif;
  --font-body:    'Mali', system-ui, -apple-system, sans-serif;
  --font-hand:    'Mali', system-ui, -apple-system, sans-serif;

  /* Radius & Shadow */
  --radius-sm:  12px;
  --radius-md:  24px;
  --radius-lg:  40px;
  --radius-xl:  60px;
  --shadow:     6px 6px 0px rgba(45,74,30,0.18);
  --shadow-lg:  10px 10px 0px rgba(45,74,30,0.2);
}

/* ── Reset & Base ─────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

/* ── Global image responsiveness ───────────────────────────────────────── */
img,
video,
svg:not([class]) {
  max-width: 100%;
  height: auto;
  display: block;
}

body {
  overflow-x: hidden;
  font-family: var(--font-body);
  background: linear-gradient(180deg, var(--sky) 0%, var(--bg) 100%);
  min-height: 100vh;
  margin: 0;
  color: var(--navy);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
}

#main-content {
  flex: 1 0 auto;
}


/* ── HEADER ───────────────────────────────── */
.site-header {
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(12px);
  padding: 12px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 3px solid #FFDE00;
  position: sticky;
  top: 0;
  z-index: 200;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.site-logo {
  font-family: var(--font-display);
  font-size: 1.8rem;
  color: var(--navy);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
}
.site-logo span { color: inherit; }

.site-nav {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.nav-pill {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.9rem;
  padding: 7px 18px;
  border-radius: 50px;
  border: 3px solid var(--navy);
  background: white;
  color: var(--navy);
  text-decoration: none;
  transition: all 0.2s;
  cursor: pointer;
}
.nav-pill:hover,
.nav-pill.active {
  background: var(--navy);
  color: white;
  font-weight: 700;
  box-shadow: inset 0 -3px 0 rgba(255,255,255,0.4);
}
.nav-pill.cta {
  background: var(--tb-white, #FFFFFF);
  border-color: var(--tb-yellow-border);
  color: var(--tb-green, #3D6B2C);
}
.nav-pill.cta:hover {
  background: var(--tb-yellow, #FFDE00);
  border-color: var(--tb-yellow, #FFDE00);
}

/* ── PAGE HERO BANNERS ────────────────────── */
.page-hero {
  background: var(--navy);
  color: white;
  text-align: center;
  padding: 60px 20px 50px;
  border-radius: 0 0 var(--radius-xl) var(--radius-xl);
  border: 5px solid var(--orange);
  border-top: none;
  margin-bottom: 40px;
  position: relative;
  overflow: hidden;
}
.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: none;
}
.page-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.5rem);
  margin: 0 0 10px;
  position: relative;
}
.page-hero p {
  font-size: 1.15rem;
  color: var(--tan);
  margin: 0;
  font-family: 'Mali', Arial, sans-serif;
  font-weight: 700;
  position: relative;
}

/* ── CONTAINER ────────────────────────────── */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px 80px;
}

/* ── SECTION TITLES ───────────────────────── */
.section-title {
  font-family: var(--font-display);
  font-size: 1.8rem;
  color: var(--navy);
  margin: 40px 0 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ── CARDS ────────────────────────────────── */
.card {
  background: white;
  border: 4px solid var(--navy);
  border-radius: var(--radius-md);
  padding: 25px;
  box-shadow: var(--shadow);
  transition: transform 0.2s, box-shadow 0.2s;
}
.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

/* ── GRID ─────────────────────────────────── */
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; }

/* ── BUTTONS ──────────────────────────────── */
.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 0.95rem;
  padding: 11px 24px;
  border-radius: 50px;
  border: 3px solid currentColor;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.15s;
  text-align: center;
}
.btn-orange { background: white; color: #3D6B2C; border-color: var(--tb-yellow-border); box-shadow: var(--tb-btn-ring); }
.btn-orange:hover { background: #FFDE00; color: #3D6B2C; }
.btn-navy   { background: white; color: #3D6B2C; border-color: var(--tb-yellow-border); box-shadow: var(--tb-btn-ring); }
.btn-navy:hover { background: #FFDE00; color: #3D6B2C; }
.btn-green  { background: white; color: #3D6B2C; border-color: var(--tb-yellow-border); box-shadow: var(--tb-btn-ring); }
.btn-green:hover { background: #FFDE00; color: #3D6B2C; }
.btn-coral  { background: white; color: #3D6B2C; border-color: var(--tb-yellow-border); box-shadow: var(--tb-btn-ring); }
.btn-coral:hover { background: #FFDE00; color: #3D6B2C; }
.btn-teal   { background: white; color: #3D6B2C; border-color: var(--tb-yellow-border); box-shadow: var(--tb-btn-ring); }
.btn-teal:hover { background: #FFDE00; color: #3D6B2C; }
.btn-lime   { background: white; color: #3D6B2C; border-color: var(--tb-yellow-border); box-shadow: var(--tb-btn-ring); }
.btn-lime:hover { background: #FFDE00; color: #3D6B2C; }
.btn-outline { background: white; color: #3D6B2C; border-color: var(--tb-yellow-border); }
.btn-outline:hover { background: #FFDE00; color: #3D6B2C; }

.btn:active { transform: translate(2px, 2px); }

/* ── FILTER PILLS ─────────────────────────── */
.f-pill {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.85rem;
  padding: 6px 16px;
  border-radius: 50px;
  border: 2px solid var(--navy);
  background: white;
  color: var(--navy);
  cursor: pointer;
  transition: all 0.15s;
}
.f-pill.active,
.f-pill:hover {
  background: var(--navy);
  color: white;
  font-weight: 700;
  box-shadow: inset 0 -3px 0 rgba(255,255,255,0.4);
}

/* ── FILTER BUTTON (f-btn — used in Teacher Portal, Field Guide, archives) ── */
.f-btn.active,
.f-btn:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 2px;
}

/* ── SAFETY ZONE ──────────────────────────── */
.safety-zone {
  background: #FFFFFF;
  border: 5px solid var(--red);
  border-radius: var(--radius-lg);
  padding: 40px;
  margin-bottom: 40px;
  position: relative;
}
.safety-label {
  background: var(--red);
  color: white;
  font-family: var(--font-display);
  font-size: 0.9rem;
  padding: 8px 20px;
  border-radius: 50px;
  position: absolute;
  top: -20px;
  left: 40px;
}
.grandma-quote {
  background: white;
  border-left: 8px solid var(--red);
  padding: 20px 25px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-family: 'Mali', Arial, sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  color: #D32F2F;
  margin: 20px 0;
}

/* ── BADGE ────────────────────────────────── */
.badge-ring {
  width: 80px; height: 80px;
  border-radius: 50%;
  border: 4px solid var(--amber);
  background: rgba(255,255,255,0.15);
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem;
  filter: grayscale(1);
  opacity: 0.45;
  transition: all 0.4s;
  cursor: pointer;
}
.badge-ring.earned {
  filter: none;
  opacity: 1;
  background: var(--amber);
  box-shadow: 0 4px 10px rgba(0,0,0,0.12);
}

/* ── FOOTER ───────────────────────────────── */
.site-footer {
  background: var(--navy);
  color: white;
  text-align: center;
  padding: 40px 20px;
  font-family: 'Mali', Arial, sans-serif;
  font-weight: 700;
  font-size: 1rem;
  border-top: 6px solid var(--orange);
}

/* ── 360px HARD FLOOR — absolute minimum (e.g. Galaxy Fold outer) ─────── */
@media (max-width: 360px) {
  .tb-container,
  .container {
    padding-left: 12px;
    padding-right: 12px;
  }
  .tb-page-hero,
  .mh-page-hero {
    padding: 20px 12px !important;
    margin: 6px !important;
  }
  .tb-btn,
  .tb-nav-pill {
    font-size: 0.8rem;
    padding: 10px 10px;
  }
}

/* ── PRINT UTILITY ────────────────────────── */

/* ── 360px SMALL PHONE (minimum supported viewport) ─────────────────────
   Covers 360px–400px: Galaxy A series, Moto G, budget Android devices.
   Uses max-width:400px to catch 360px and up to 400px cleanly.
   Explicit 360px sub-rules below override where layout needs extra care.
──────────────────────────────────────────────────────────────────────── */
@media (max-width: 400px) {

  /* Ensure site never forces horizontal scroll */
  body,
  .site-wrapper,
  .site-header,
  .site-footer {
    min-width: 0;
    overflow-x: hidden;
  }

  /* Game canvases — scale down to fit narrow viewports */
  #tb-maze-canvas,
  #tb-cw-grid,
  #tb-col-canvas,
  #tb-ws-grid {
    max-width: 100%;
    width: 100% !important;
    height: auto !important;
  }

  /* Hero banner margin tighter on very small phones */
  .tb-page-hero,
  .mh-page-hero {
    margin: 8px !important;
    border-radius: 24px !important;
    padding: 24px 16px !important;
  }

  /* Nav pills wrap cleanly */
  .tb-site-nav {
    gap: 6px;
  }

  .tb-nav-pill {
    font-size: 0.82rem;
    padding: 10px 12px;
  }

  /* Story spreads: stack at very narrow */
  .tb-story-spread > div {
    grid-template-columns: 1fr !important;
  }

  /* Crossword / wordsearch sidebars stack */
  .tb-cw-wrap,
  .tb-ws-wrap {
    flex-direction: column !important;
  }

}
@media print {
  .site-header, .site-footer,
  .no-print { display: none !important; }
}

/* ── ANIMATIONS ───────────────────────────── */
@keyframes pop-in {
  from { transform: scale(0.8); opacity: 0; }
  to   { transform: scale(1);   opacity: 1; }
}
.pop-in { animation: pop-in 0.4s cubic-bezier(0.34,1.56,0.64,1) both; }

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-8px); }
}
.float { animation: float 3s ease-in-out infinite; }

/* ── SIGHTED BOX ──────────────────────────── */
.sighted-box {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #D6F0FB;
  border: 3px solid var(--teal);
  padding: 8px 22px;
  border-radius: 50px;
  font-weight: 800;
  color: #3D6B2C;
  cursor: pointer;
  transition: all 0.2s;
}
.sighted-box:has(input:checked) {
  background: #3D6B2C;  /* 6.38:1 with white — WCAG AA */
  color: white;
}

/* ── COLORFUL CARD VARIANTS ───────────────── */
.card-coral  { background: #FFFDF7; border-color: var(--coral); }
.card-teal   { background: #D6F0FB; border-color: var(--teal); }
.card-lime   { background: #FFFDF7; border-color: var(--lime); }
.card-amber  { background: #FFDE00; border-color: var(--amber); }
.card-orange { background: #FFDE00; border-color: var(--orange); }
.card-green  { background: var(--green-lt); border-color: var(--green); }
.card-sky    { background: var(--sky-light); border-color: var(--sky); }

/* ── ACCESSIBILITY: Focus Visible (WCAG 2.1 AA) ─────────────────────────── */
:focus-visible {
  outline: 3px solid #3D6B2C;
  outline-offset: 3px;
  border-radius: 4px;
}
:focus:not(:focus-visible) {
  outline: none;
}


/* ── TOUCH & INTERACTION OPTIMISATION ────────────────────────────────────
   touch-action:manipulation eliminates the 300ms tap delay on mobile
   for users with motor impairments. Applied to all interactive elements.
──────────────────────────────────────────────────────────────────────── */
a,
button,
[role="button"],
input[type="submit"],
input[type="button"],
input[type="reset"],
input[type="checkbox"],
input[type="radio"],
select,
label,
.tb-btn,
.tb-nav-pill,
.tb-nav-card,
.tb-friend-card,
.mh-neighbor-tag,
.tb-id-choice,
.tb-season-card,
[data-hab],
[data-tf],
[data-dir] {
  touch-action: manipulation;
}

/* Footer links — ensure 44px touch target height */
.site-footer a {
  color: var(--tan);
  display: inline-block;
  padding: 8px 4px;
  min-height: 44px;
  line-height: 28px;
}

/* ── SR-ONLY (screen reader only) ───────────────────────────────────────── */

/* ── SKIP LINK ───────────────────────────────────────────────────────────── */

/* ── REDUCED MOTION ─────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ── HIGH CONTRAST (forced-colors) ─────────────────────────────────────── */
@media (forced-colors: active) {
  .btn, .nav-pill, .tb-nav-pill, .f-pill, .f-btn {
    border: 2px solid ButtonText;
  }
  .card, .tb-friend-card {
    border: 1px solid CanvasText;
  }
}

/* ── LIVE SEARCH INPUT (archive-tb_friend) ──────────────────────────────── */
.tb-live-search-input:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 2px;
}
.tb-live-search-input::placeholder {
  color: #555555;
  opacity: 1;
}

/* ── AFFILIATE DISCLOSURE ───────────────────────────────────────────────── */
.tb-affiliate-disclosure {
  background: #FFDE00;
  border-left: 6px solid var(--amber);
  padding: 16px 20px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-family: 'Mali', Arial, sans-serif;
  font-weight: 700;
  font-size: .9rem;
  margin: 32px 0;
}

/* ── QUIZ BLOCK ─────────────────────────────────────────────────────────── */
.tb-quiz-answer:hover  { background: var(--sky-light); }
.tb-quiz-answer[data-correct="true"][aria-pressed="true"]  { background: var(--green-lt); border-color: var(--green); color: #3D6B2C; }
.tb-quiz-answer[data-correct="false"][aria-pressed="true"] { background: #FFFDF7; border-color: var(--red); }

/* ── DOSSIER BLOCK ──────────────────────────────────────────────────────── */

/* ── MEET OUR HEROES PAGE ────────────────────────────────────── */
.tb-hero-profile-inner {
  display: flex;
  gap: 32px;
  align-items: flex-start;
  flex-wrap: wrap;
}
.tb-hero-profile-reverse {
  flex-direction: row-reverse;
}
.tb-hero-bio { flex: 1; min-width: 240px; }
.tb-hero-stats { margin-top: 12px; }
.tb-backyard-map { margin-top: 8px; }
.tb-map-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(180px,100%), 1fr));
  gap: 16px;
}
.tb-map-zone {
  text-align: center;
  padding: 20px 16px;
  cursor: default;
}
/* ════════════════════════════════════════════════════════
   RESPONSIVE BREAKPOINTS — covers all templates using shared classes
   ════════════════════════════════════════════════════════ */

@media (max-width: 1024px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  /* Layout */
  .tb-container,
  .container { padding-left: 16px; padding-right: 16px; }

  /* Hero */
  .page-hero { padding: 40px 20px 60px; }
  .page-hero h1 { font-size: clamp(1.8rem, 7vw, 3rem); }

  /* Grids */
  .grid-2 { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }

  /* Two-column layouts */
  .tb-two-col,
  .tb-hero-profile-inner,
  .tb-hero-profile-reverse { flex-direction: column; gap: 24px; }

  /* Cards */
  .card { padding: 20px 16px; }

  /* Filter bar */
  .filter-bar { flex-wrap: wrap; gap: 8px; }
  .f-pill,
  .f-btn { font-size: 0.8rem; padding: 6px 12px; }

  /* Story reader */
  .tb-story-reader { gap: 12px; }

  /* Friend / activity cards */
  .tb-friend-card { flex-direction: column; }
  .tb-hero-avatar { min-width: unset !important; width: 100%; max-width: 220px; }

  /* Teacher portal / field guide filter rows */
  .filter-row { flex-direction: column; align-items: flex-start; gap: 8px; }
  .filter-label { margin-bottom: 4px; }

  /* Safety zone */
  .safety-zone { padding: 24px 16px; }
  .grandma-quote { font-size: 1.1rem; padding: 20px 16px; }
}

@media (max-width: 600px) {
  .tb-hero-profile-inner,
  .tb-hero-profile-reverse { flex-direction: column; }
  .tb-hero-avatar { min-width: unset !important; width: 100%; }

  /* Site header */
  .site-logo span { font-size: 1.1rem; }

  /* Grids */
  .grid-4 { grid-template-columns: 1fr; }

  /* Buttons */
  .btn { font-size: 0.9rem; padding: 10px 18px; }

  /* Footer */
  .site-footer { text-align: center; }
}

/* ── MEMORY MATCH ────────────────────────────────────────────── */
.tb-memory-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  margin-bottom: 16px;
  font-family: var(--font-display);
  font-size: .95rem;
}
.tb-mem-card:hover:not(:disabled) {
  transform: scale(1.06);
}
.tb-mem-card:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 3px;
}

/* ── WORD SEARCH ──────────────────────────────────────────────── */
.tb-ws-table td:hover { background: #FFDE00 !important; }
.tb-ws-sidebar { min-width: 180px; }

/* ── CROSSWORD ────────────────────────────────────────────────── */
.tb-cw-table input:focus {
  background: #D6F0FB;
  outline: 2px solid var(--orange);
  outline-offset: -2px;
}
.tb-cw-clues li:hover { background: #FFFDF7; border-radius: 4px; }

/* ── MAZE ─────────────────────────────────────────────────────── */
.tb-maze-btns button {
  width: 48px;
  height: 48px;
  font-size: 1.2rem;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ── COLORING BOOK ────────────────────────────────────────────── */
#tb-col-palette button:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 3px;
}

/* ══════════════════════════════════════════════════════════════════════════
   TB- COMPONENT SYSTEM
   All tb- prefixed classes used by header, footer, front-page, and partials
   ══════════════════════════════════════════════════════════════════════════ */

/* ── SITE HEADER ──────────────────────────────────────────────────────── */

/* ── PRIMARY NAV ──────────────────────────────────────────────────────── */

.tb-nav-pill:hover,
.tb-nav-pill.tb-cta,
.tb-nav-pill.cta {
  background: white;
  border-color: var(--tb-yellow-border);
  color: var(--tb-green, #3D6B2C);
}
.tb-nav-pill.tb-cta:hover,
.tb-nav-pill.cta:hover {
  background: var(--tb-yellow, #FFDE00);
  border-color: var(--tb-yellow, #FFDE00);
}

/* ── MOBILE MENU TOGGLE ───────────────────────────────────────────────── */
.tb-menu-toggle:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 2px;
}

/* ── CONTAINER ────────────────────────────────────────────────────────── */

/* ── SECTION TITLE ────────────────────────────────────────────────────── */

/* ── HOMEPAGE BIG HERO ────────────────────────────────────────────────── */
.tb-big-hero {
  background: var(--navy);
  color: white;
  text-align: center;
  padding: 70px 24px 60px;
  border-radius: 0 0 var(--radius-xl) var(--radius-xl);
  border: 5px solid var(--orange);
  border-top: none;
  margin-bottom: 0;
  position: relative;
  overflow: hidden;
}
.tb-big-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: none;
  pointer-events: none;
}
.tb-big-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 6vw, 4rem);
  margin: 0 0 12px;
  position: relative;
  line-height: 1.15;
}
.tb-highlight { color: var(--amber); }

.tb-hero-animals {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  letter-spacing: 8px;
  margin-bottom: 16px;
  position: relative;
}
.tb-hero-sub {
  font-family: 'Mali', Arial, sans-serif;
  font-weight: 700;
  font-size: clamp(1rem, 2.5vw, 1.3rem);
  color: var(--tan);
  margin: 0 0 32px;
  position: relative;
}

/* ── HERO BUTTONS ─────────────────────────────────────────────────────── */
.tb-hero-btn {
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 1.05rem;
  padding: 14px 32px;
  border-radius: 50px;
  text-decoration: none;
  transition: all 0.15s;
  display: inline-block;
  min-height: 44px;
}
.tb-hero-btn.tb-primary {
  background: white;
  color: #3D6B2C;
  border: 3px solid var(--tb-yellow-border);
  box-shadow: none;
}
.tb-hero-btn.tb-primary:hover {
  background: #FFDE00;
  color: #3D6B2C;
  border-color: var(--tb-yellow, #FFDE00);
  transform: translateY(-2px);
  box-shadow: none;
}
.tb-hero-btn.tb-secondary {
  background: white;
  color: var(--navy);
  border: 3px solid white;
  box-shadow: 0 4px 0 rgba(0,0,0,0.2);
}
.tb-hero-btn.tb-secondary:hover {
  background: var(--sky-light);
  transform: translateY(-2px);
}

/* ── TOOTIE CALLOUT (hero intro box) ─────────────────────────────────── */
.tb-tootie-callout {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  background: rgba(255,255,255,0.12);
  border: 3px solid rgba(255,255,255,0.3);
  border-radius: var(--radius-md);
  padding: 24px 28px;
  max-width: 680px;
  margin: 0 auto;
  text-align: left;
  position: relative;
}
.tb-tootie-callout h2 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  margin: 0 0 8px;
  color: var(--amber);
}
.tb-tootie-callout p {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  margin: 0;
  color: rgba(255,255,255,0.92);
}
.tb-paw {
  font-size: 2.5rem;
  flex-shrink: 0;
  margin-top: 2px;
}

/* ── NAV CARDS (homepage grid) ────────────────────────────────────────── */
.tb-nav-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr));
  gap: 22px;
  margin-bottom: 8px;
}
.tb-nav-card {
  background: white;
  border: 4px solid var(--navy);
  border-radius: var(--radius-md);
  padding: 28px 24px;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: var(--shadow);
  transition: transform 0.2s, box-shadow 0.2s;
}
.tb-nav-card:hover {
  transform: translate(-3px, -4px);
  box-shadow: var(--shadow-lg);
}
.tb-nav-card.friends  { border-color: var(--teal);   background: #D6F0FB; }
.tb-nav-card.guides   { border-color: var(--orange);  background: #FFDE00; }
.tb-nav-card.activities { border-color: var(--green); background: #FFFDF7; }
.tb-nav-card.about    { border-color: var(--coral);   background: #FFFDF7; }
.tb-nav-card.parents  { border-color: var(--amber);   background: #FFDE00; }
.tb-nav-card.print    { border-color: #3D6B2C;        background: #FFFDF7; }

.tb-nav-card-icon {
  font-size: 2.8rem;
  line-height: 1;
}
.tb-nav-card h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--navy);
  margin: 0;
}
.tb-nav-card p {
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: #555555;
  line-height: 1.5;
  margin: 0;
  flex: 1;
}
.tb-nav-card .go-btn {
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 0.88rem;
  color: var(--orange);
  margin-top: auto;
}

/* ── FRIENDS STRIP (horizontal scrolling chips) ───────────────────────── */
.tb-friends-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 8px;
}
.tb-friend-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: white;
  border: 3px solid var(--navy);
  border-radius: 50px;
  padding: 8px 18px;
  text-decoration: none;
  color: var(--navy);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.9rem;
  transition: all 0.15s;
  box-shadow: 3px 3px 0 rgba(45,74,30,0.12);
}
.tb-friend-chip:hover {
  background: var(--navy);
  color: white;
  transform: translateY(-2px);
}
.tb-friend-chip .icon { font-size: 1.3rem; }
.tb-friend-chip small {
  font-family: 'Mali', Arial, sans-serif;
  font-weight: 400;
  font-size: 0.78rem;
  opacity: 0.75;
  font-style: italic;
}

/* ── SEASON ROW ───────────────────────────────────────────────────────── */
.tb-season-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-bottom: 8px;
}
.tb-season-card {
  background: white;
  border: 4px solid var(--navy);
  border-radius: var(--radius-md);
  padding: 24px 18px;
  text-align: center;
  box-shadow: var(--shadow);
}
.tb-season-card h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--navy);
  margin: 10px 0 8px;
}
.tb-season-card p {
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: #555555;
  line-height: 1.5;
  margin: 0;
}
.tb-season-card.spring { border-color: #D32F2F; background: #FFFDF7; }
.tb-season-card.summer { border-color: var(--orange); background: #FFDE00; }
.tb-season-card.fall   { border-color: #D32F2F; background: #FFFDF7; }
.tb-season-card.winter { border-color: var(--teal); background: #D6F0FB; }

/* ── SAFETY CALLOUT ───────────────────────────────────────────────────── */
.tb-safety-callout h2 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--red);
  margin: 0 0 8px;
}
.tb-safety-callout p {
  font-family: 'Mali', Arial, sans-serif;
  font-weight: 700;
  font-size: .9rem;
  color: #D32F2F;
  line-height: 1.6;
  margin: 0;
}

/* ── RESPONSIVE: HEADER / NAV ─────────────────────────────────────────── */
@media (max-width: 768px) {
  .tb-site-header {
    padding: 12px 20px;
    flex-wrap: wrap;
    gap: 10px;
  }
  .tb-menu-toggle { display: flex; align-items: center; justify-content: center; }
  .tb-site-nav {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding: 12px 0 4px;
    border-top: 2px solid var(--sky-light);
    margin-top: 4px;
  }
  .tb-site-nav.is-open { display: flex; }
  .tb-nav-pill {
    text-align: center;
    padding: 12px 20px;
    font-size: 1rem;
  }

  /* Hero */
  .tb-big-hero { padding: 48px 20px 44px; border-radius: 0 0 var(--radius-lg) var(--radius-lg); }
  .tb-tootie-callout { flex-direction: column; text-align: center; }
  .tb-hero-btns { flex-direction: column; align-items: center; }
  .tb-hero-btn { width: 100%; max-width: 320px; text-align: center; }

  /* Season row */
  .tb-season-row { grid-template-columns: repeat(2, 1fr); }

  /* Safety callout */
  .tb-safety-callout { flex-direction: column; padding: 28px 24px; }

  /* Container */
  .tb-container { padding: 0 16px 60px; }

  /* Section title */
  .tb-section-title { font-size: 1.5rem; margin: 36px 0 16px; }
}

@media (max-width: 480px) {
  .tb-site-logo { font-size: 1.4rem; }
  .tb-season-row { grid-template-columns: 1fr; }
  .tb-nav-cards { grid-template-columns: 1fr; }
  .tb-friends-strip { gap: 8px; }
  .tb-friend-chip { font-size: 0.85rem; padding: 7px 14px; }
  .tb-safety-callout { padding: 20px 16px; }
  .tb-safety-callout p { font-size: 1rem; }
}

/* ── PRINT: hide non-content ──────────────────────────────────────────── */

/* ── 360px SMALL PHONE (minimum supported viewport) ─────────────────────
   Covers 360px–400px: Galaxy A series, Moto G, budget Android devices.
   Uses max-width:400px to catch 360px and up to 400px cleanly.
   Explicit 360px sub-rules below override where layout needs extra care.
──────────────────────────────────────────────────────────────────────── */
@media (max-width: 400px) {

  /* Ensure site never forces horizontal scroll */
  body,
  .site-wrapper,
  .site-header,
  .site-footer {
    min-width: 0;
    overflow-x: hidden;
  }

  /* Game canvases — scale down to fit narrow viewports */
  #tb-maze-canvas,
  #tb-cw-grid,
  #tb-col-canvas,
  #tb-ws-grid {
    max-width: 100%;
    width: 100% !important;
    height: auto !important;
  }

  /* Hero banner margin tighter on very small phones */
  .tb-page-hero,
  .mh-page-hero {
    margin: 8px !important;
    border-radius: 24px !important;
    padding: 24px 16px !important;
  }

  /* Nav pills wrap cleanly */
  .tb-site-nav {
    gap: 6px;
  }

  .tb-nav-pill {
    font-size: 0.82rem;
    padding: 10px 12px;
  }

  /* Story spreads: stack at very narrow */
  .tb-story-spread > div {
    grid-template-columns: 1fr !important;
  }

  /* Crossword / wordsearch sidebars stack */
  .tb-cw-wrap,
  .tb-ws-wrap {
    flex-direction: column !important;
  }

}
@media print {
  .tb-site-header, .tb-site-footer,
  .tb-hero-btns, .tb-menu-toggle { display: none !important; }
  .tb-big-hero { background: white !important; color: black !important; border: 1px solid #CCCCCC; }
}

/* ── HIGH CONTRAST ────────────────────────────────────────────────────── */
@media (forced-colors: active) {
  .tb-nav-pill, .tb-hero-btn, .tb-nav-card, .tb-friend-chip,
  .tb-season-card, .tb-safety-callout {
    border: 2px solid ButtonText !important;
  }
}

/* ══════════════════════════════════════════════════════════════════════════
   TB- COMPLETE COMPONENT LIBRARY — Part 2
   All remaining tb- classes used across archives, singles, and page templates
   ══════════════════════════════════════════════════════════════════════════ */

/* ── TB BUTTONS (tb-btn-*) ────────────────────────────────────────────── */
.tb-btn-navy   { background: var(--tb-yellow, #FFDE00);   color: #3D6B2C; border-color: var(--tb-yellow, #FFDE00); }
.tb-btn-green:hover { background: #FFDE00; }
.tb-btn-teal:hover { background: #FFDE00; border-color: #FFDE00; }
.tb-btn:hover { opacity: 1; transform: translateY(-1px); box-shadow: 0 4px 8px rgba(0,0,0,0.10); }
.tb-btn:focus-visible { outline: 3px solid #3D6B2C; outline-offset: 3px; box-shadow: 0 0 0 6px rgba(255,222,0,0.5); }

/* ── READ BUTTON ──────────────────────────────────────────────────────── */
.tb-read-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.9rem;
  padding: 8px 20px;
  border-radius: 50px;
  background: var(--tb-white, #FFFFFF);
  color: var(--tb-green, #3D6B2C);
  text-decoration: none;
  border: 3px solid var(--tb-yellow-border);
  box-shadow: var(--tb-btn-ring);
  transition: all 0.15s;
  min-height: 44px;
}
.tb-read-btn:hover { background: var(--tb-yellow, #FFDE00); border-color: var(--tb-yellow, #FFDE00); color: var(--tb-green); }

/* ── PAGE HERO (tb-page-hero — used on archive & page templates) ──────── */
.tb-page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: none;
  pointer-events: none;
}

/* ── SHARE HERO (story/activity single top) ───────────────────────────── */
.tb-share-hero {
  background: var(--navy);
  color: white;
  padding: 52px 24px 44px;
  border-radius: 48px;
  border: 5px solid var(--orange);
  margin: 32px 24px 40px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.tb-share-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: none;
  pointer-events: none;
}
.tb-share-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 3rem);
  margin: 0 0 10px;
  position: relative;
}
.tb-share-hero p {
  font-family: 'Mali', Arial, sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--tan);
  margin: 0;
  position: relative;
  opacity: .9;
}

/* ── FRIEND SINGLE — HERO LAYOUT ──────────────────────────────────────── */
.tb-friend-hero-image img {
  width: 100%;
  border-radius: var(--radius-md);
  border: 4px solid var(--navy);
  box-shadow: var(--shadow);
}

/* ── FRIEND STATS / QUICK FACTS ───────────────────────────────────────── */
.tb-friend-stats,
.tb-quick-facts {
  background: var(--sky-light);
  border: 3px solid var(--teal);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  margin-bottom: 28px;
}
.tb-stat-item {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 6px 0;
  border-bottom: 1px solid rgba(0,0,0,0.06);
  font-family: var(--font-body);
  font-size: 0.9rem;
}
.tb-stat-item:last-child { border-bottom: none; }
.tb-stat-label {
  font-weight: 700;
  color: var(--navy);
  min-width: 100px;
  flex-shrink: 0;
}
.tb-stat-val { color: #000000; }

/* ── TYPE TAG ─────────────────────────────────────────────────────────── */

/* ── FACT CHIP ────────────────────────────────────────────────────────── */

/* ── FUN FACT BOX ─────────────────────────────────────────────────────── */
.tb-fun-fact-box::before {
  content: '💡';
  position: absolute;
  top: -16px;
  left: 20px;
  font-size: 1.6rem;
}





/* ── BUTTON SIZE MODIFIER ─────────────────────────────────────────────────
   Replace ad-hoc inline style="padding:6px 16px;font-size:.85rem;" overrides.
──────────────────────────────────────────────────────────────────────── */
.tb-btn-sm {
  padding: 6px 16px;
  font-size: .85rem;
  min-height: 36px;
}

/* ── VISUAL BREADCRUMB ────────────────────────────────────────────────────
   Lightweight trail: Home › Archive › Current Page
──────────────────────────────────────────────────────────────────────── */
.tb-breadcrumb-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
  font-size: .85rem;
  font-family: var(--font-body);
}
.tb-breadcrumb-item { display: flex; align-items: center; gap: 4px; }
.tb-breadcrumb-item a {
  color: var(--orange);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.tb-breadcrumb-item a:hover { color: #FFDE00; }
.tb-breadcrumb-current span { color: var(--navy); font-weight: 600; }

/* ── CUSTOM SEARCH FORM ──────────────────────────────────────────────────
   Replaces WP default unstyled form. Used on search.php, 404.php, index.php.
──────────────────────────────────────────────────────────────────────── */
.tb-search-form { width: 100%; max-width: 560px; margin: 0 auto; }
.tb-search-wrap {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}
.tb-search-input:focus-visible {
  border-color: #3D6B2C;
  box-shadow: 0 0 0 3px rgba(45,74,30,0.18);
}
.tb-search-input::placeholder { color: #555555; opacity: 1; }
.tb-search-btn { flex-shrink: 0; white-space: nowrap; }
@media (max-width: 480px) {
  .tb-search-wrap { flex-direction: column; }
  .tb-search-input, .tb-search-btn { width: 100%; }
}

/* ── LOADING ANIMATION (REST field guide tool) ────────────────────────── */
.tb-loading-text {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'Mali', Arial, sans-serif;
  font-weight: 700;
  font-size: 1rem;
  color: var(--navy);
}
.tb-loading-dots::after {
  content: '…';
  display: inline-block;
  animation: tb-dots 1.2s steps(3, end) infinite;
  letter-spacing: 2px;
}
@keyframes tb-dots {
  0%   { content: '.'; }
  33%  { content: '..'; }
  66%  { content: '...'; }
  100% { content: '.'; }
}
.tb-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(45,74,30,0.2);
  border-top-color: var(--navy);
  border-radius: 50%;
  animation: tb-spin 0.75s linear infinite;
  vertical-align: middle;
}
@keyframes tb-spin { to { transform: rotate(360deg); } }

/* ── NO-RESULTS (search + animal tool) ────────────────────────────────── */
.tb-no-results-wrap p { font-size: 1.1rem; color: var(--navy); margin-bottom: 20px; }

/* ── BROKEN IMAGE GRACEFUL DEGRADATION ──────────────────────────────────
   If an img src 404s, the container holds its shape (no layout collapse).
   The emoji character in .tb-card-avatar acts as primary text fallback.
   These rules preserve card grid integrity regardless of image load state.
──────────────────────────────────────────────────────────────────────── */
.tb-card-avatar img,
.tb-friend-hero-image img,
.tb-story-cover img,
.tb-post-thumbnail img {
  /* Neutral fallback background if image fails to load */
  background-color: var(--light, #FFFFFF);
  /* Prevent layout collapse: maintain minimum space */
  min-height: 40px;
}
/* Ensure containers don't collapse to zero height on broken images */

/* ── GAME SPLASH SCREEN ───────────────────────────────────────────────── */
/* Shown before game assets load — defers all game DOM until user taps Play */
.tb-game-splash {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 48px 24px;
  text-align: center;
  background: #FFFFFF;
  border: 4px solid var(--navy);
  border-radius: var(--radius-lg);
  min-height: 280px;
}
.tb-game-splash-emoji {
  font-size: 4rem;
  line-height: 1;
}
.tb-game-splash-title {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 4vw, 2rem);
  color: var(--navy);
  margin: 0;
}
.tb-game-splash-desc {
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--navy);
  max-width: 340px;
  margin: 0;
}
.tb-game-start-btn {
  margin-top: 8px;
  min-height: 48px;
  min-width: 160px;
  font-size: 1.1rem;
  touch-action: manipulation;
}

/* ── CARDS GRID / FRIEND CARDS ────────────────────────────────────────── */
.tb-card-top {
  background: var(--sky-light);
  padding: 20px;
  text-align: center;
  border-bottom: 3px solid var(--navy);
}
.tb-card-avatar {
  font-size: 3.5rem;
  line-height: 1;
  display: block;
  margin-bottom: 8px;
}
.tb-card-body {
  overflow-x: hidden;
  padding: 16px 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.tb-card-body h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--navy);
  margin: 0;
}
.tb-card-sci {
  font-family: 'Mali', Arial, sans-serif;
  font-weight: 700;
  font-style: italic;
  font-size: 0.82rem;
  color: #555555;
  margin: 0;
}
.tb-card-info {
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: #555555;
  line-height: 1.5;
  margin: 4px 0 0;
}
.tb-card-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.tb-card-footer {
  padding: 12px 20px;
  border-top: 2px solid var(--sky-light);
  text-align: right;
}

/* ── ACTIVITY CARDS ───────────────────────────────────────────────────── */
.tb-activity-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.tb-activity-icon {
  font-size: 3rem;
  text-align: center;
  padding: 20px 20px 8px;
  background: var(--green-lt);
  display: block;
}
.tb-activity-row {
  padding: 16px 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.tb-activity-row h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--navy);
  margin: 0;
}

/* ── DOSSIER (friend single — detailed profile section) ───────────────── */
.tb-dossier {
  margin-top: 48px;
  background: white;
  border: 4px solid var(--navy);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.tb-dossier-image {
  width: 100%;
  max-height: 320px;
  object-fit: cover;
  display: block;
}

/* ── FIELD NOTES ──────────────────────────────────────────────────────── */
.tb-field-notes {
  margin-top: 48px;
  background: #FFDE00;
  border: 4px solid var(--amber);
  border-radius: var(--radius-md);
  padding: 28px 32px;
  font-family: 'Mali', Arial, sans-serif;
  font-weight: 700;
  font-size: 1.05rem;
  line-height: 1.8;
}

/* ── FLORA / FAUNA ROWS ───────────────────────────────────────────────── */
.tb-flora-row,
.tb-fauna-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 12px 0 20px;
}
.tb-fauna-row .tb-ff-icon {
  background: var(--sky-light);
  border-color: var(--teal);
  color: #3D6B2C;
}

/* ── STORY READER ─────────────────────────────────────────────────────── */

/* ── OWL EYES STEPS ───────────────────────────────────────────────────── */
.tb-owl-eyes-steps {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(220px, 100%), 1fr));
  gap: 18px;
  margin: 24px 0;
}

/* ── SAFETY ZONE / LABEL ──────────────────────────────────────────────── */
.tb-safety-zone {
  background: #FFFFFF;
  border: 5px solid var(--red);
  border-radius: var(--radius-lg);
  padding: 40px;
  margin-bottom: 40px;
  position: relative;
}
.tb-safety-label {
  background: var(--red);
  color: white;
  font-family: var(--font-display);
  font-size: 0.9rem;
  padding: 8px 20px;
  border-radius: 50px;
  position: absolute;
  top: -20px;
  left: 40px;
}

/* ── SOUND PLAYER ─────────────────────────────────────────────────────── */
.tb-sound-player:hover { background: #3D6B2C; color: white; }

/* ── ID TOOL ──────────────────────────────────────────────────────────── */
.tb-id-tool {
  background: white;
  border: 4px solid var(--orange);
  border-radius: var(--radius-md);
  padding: 28px 32px;
  margin: 28px 0;
}
.tb-id-choice {
  display: block;
  width: 100%;
  text-align: left;
  background: var(--sky-light);
  border: 3px solid var(--teal);
  border-radius: var(--radius-sm);
  padding: 12px 18px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  margin-bottom: 10px;
  transition: all 0.15s;
  min-height: 44px;
}
.tb-id-choice:hover { background: #3D6B2C; color: white; border-color: #3D6B2C; }

/* ── QUIZ BLOCK ───────────────────────────────────────────────────────── */
.tb-quiz-block {
  background: white;
  border: 4px solid var(--navy);
  border-radius: var(--radius-md);
  padding: 28px 32px;
  margin: 28px 0;
  box-shadow: var(--shadow);
}
.tb-quiz-result {
  font-family: var(--font-display);
  font-size: 1.2rem;
  text-align: center;
  margin-top: 16px;
  min-height: 32px;
}

/* ── BADGE LABELS ─────────────────────────────────────────────────────── */
.tb-badge-icon {
  font-size: 2.5rem;
  display: block;
  line-height: 1;
}
.tb-badge-label {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 700;
  text-align: center;
  margin-top: 4px;
  color: var(--navy);
}

/* ── FILTER SECTION ───────────────────────────────────────────────────── */
.tb-filter-section {
  background: rgba(255,255,255,0.92);
  border: 3px solid var(--navy);
  border-radius: var(--radius-md);
  padding: 18px 24px;
  margin-bottom: 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

/* ── LIVE SEARCH ──────────────────────────────────────────────────────── */
.tb-live-search-wrap {
  position: relative;
  flex: 1;
  min-width: 200px;
}
.tb-live-search-wrap input {
  width: 100%;
  padding: 9px 16px 9px 40px;
  border: 2px solid var(--navy);
  border-radius: 50px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  min-height: 44px;
}

/* ── COMPARISON GRID ──────────────────────────────────────────────────── */
.tb-comparison-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr));
  gap: 20px;
  margin: 24px 0;
}

/* ── LESSON GRID / CARD ───────────────────────────────────────────────── */
.tb-lesson-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr));
  gap: 22px;
  margin: 24px 0;
}
.tb-lesson-card {
  background: white;
  border: 4px solid var(--navy);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ── NGSS GRID ────────────────────────────────────────────────────────── */
.tb-ngss-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr));
  gap: 16px;
  margin: 20px 0;
}

/* ── REP ROWS (repeatable meta rows in admin) ─────────────────────────── */
.tb-rep-row {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

/* ── SIDEBAR ──────────────────────────────────────────────────────────── */

/* ── TWO COL LAYOUT ───────────────────────────────────────────────────── */

/* ── POST NAV / RELATED LINKS ─────────────────────────────────────────── */
.tb-related-link {
  font-family: var(--font-body);
  font-weight: 700;
  color: var(--orange);
  text-decoration: none;
  font-size: 0.9rem;
}
.tb-related-link:hover { text-decoration: underline; }

/* ── ENTRY CONTENT (story/activity body text) ─────────────────────────── */
.tb-entry-content {
  font-family: var(--tb-font-body);
  font-size: 1.05rem;
  line-height: 1.85;
  color: #222222;
  max-width: 100%;
}
.tb-entry-content h2,
.tb-entry-content h3,
.tb-entry-content h4 {
  font-family: var(--tb-font-head);
  color: #3D6B2C;
  margin: 44px 0 16px;
  padding-bottom: 6px;
  border-bottom: none;
  line-height: 1.25;
  font-size: 1.4rem;
}
.tb-entry-content ul,
.tb-entry-content ol { padding-left: 24px; margin-bottom: 16px; }
.tb-entry-content li { margin-bottom: 12px; line-height: 1.85; font-size: 1.05rem; }
.tb-entry-content strong { color: #3D6B2C; font-weight: 700; }
.tb-entry-content a {
  color: #3D6B2C;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.tb-entry-content a:hover {
  color: #FFDE00;
  text-decoration-thickness: 2px;
}

/* ── POST THUMBNAIL ───────────────────────────────────────────────────── */
.tb-post-thumbnail {
  width: 100%;
  border-radius: var(--radius-md);
  border: 4px solid var(--navy);
  box-shadow: var(--shadow);
  display: block;
  object-fit: cover;
}

/* ── PAGINATION ───────────────────────────────────────────────────────── */
.tb-pagination a,
.tb-pagination a:hover,
.tb-pagination .current {
  background: var(--navy);
  color: white;
}

/* ── NO RESULTS ───────────────────────────────────────────────────────── */
.tb-no-results {
  text-align: center;
  padding: 60px 24px;
  font-family: 'Mali', Arial, sans-serif;
  font-weight: 700;
  font-size: 1.2rem;
  color: #555555;
}
.tb-no-results p { margin: 8px 0; }

/* ── COMMENTS ─────────────────────────────────────────────────────────── */
.tb-comments-area {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 3px solid var(--sky-light);
}
.tb-comment-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.tb-comment-list li {
  background: white;
  border: 3px solid var(--sky-light);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  margin-bottom: 12px;
}

/* ── GAME WRAP ────────────────────────────────────────────────────────── */
.tb-game-wrap {
  background: white;
  border: 4px solid var(--navy);
  border-radius: var(--radius-md);
  padding: 28px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

/* ── FONT UTILITY ─────────────────────────────────────────────────────── */

/* ── RESPONSIVE PART 2 ────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .tb-friend-hero { flex-direction: column; }
  .tb-friend-hero-image { width: 100%; max-width: 240px; }
  .tb-two-col { flex-direction: column; }
  .tb-sidebar { width: 100%; }
  .tb-story-spread { padding: 24px 20px; font-size: 1.05rem; }
  .tb-dossier, .tb-field-notes { margin-top: 32px; }
  .tb-safety-zone { padding: 28px 20px; }
  .tb-safety-label { left: 20px; }
  .tb-page-hero { margin: 16px; padding: 40px 20px; border-radius: 32px; }
  .tb-page-hero h1 { font-size: clamp(1.8rem, 6vw, 2.8rem); }
  .tb-game-wrap { padding: 18px 14px; }
}

@media (max-width: 480px) {
  .tb-story-spread { padding: 18px 16px; }
  .tb-quiz-block { padding: 20px 16px; }
  .tb-stat-label { min-width: 80px; }
}

/* ── FOOTER — Contact + Legal + Copyright ─────────────────────────────── */
.tb-footer-contact {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: 'Mali', Arial, sans-serif;
  font-weight: 700;
  font-size: 1rem;
  margin: 8px 0 16px;
}
.tb-footer-owl { font-size: 1.3rem; }
.tb-footer-grandma-link {
  color: var(--amber);
  font-weight: 700;
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: border-color 0.15s;
}
.tb-footer-grandma-link:hover {
  border-bottom-color: #3D6B2C;
}

.tb-footer-legal li a {
  color: rgba(45,74,30,1.0);
  text-decoration: none;
  font-family: var(--font-body);
  font-size: 0.8rem;
  transition: color 0.15s;
}
.tb-footer-legal li a:hover { color: #3D6B2C; text-decoration: underline; }

/* Separator dots between legal items */
.tb-footer-legal li + li::before {
  content: '·';
  margin-right: 20px;
  color: rgba(45,74,30,0.3);
  pointer-events: none;
}


@media (max-width: 480px) {
  .tb-footer-contact { flex-wrap: wrap; justify-content: center; }
  .tb-footer-legal { gap: 6px 14px; }
  .tb-footer-legal li + li::before { display: none; }
  .tb-footer-copy { font-size: 0.78rem; }
}

/* ── FOOTER WORDMARK ──────────────────────────────────────────────────── */

@media (max-width: 480px) {
  .tb-footer-wordmark { padding: 36px 20px 24px; }
  .tb-footer-wm-text  { font-size: clamp(2.2rem, 10vw, 3.5rem); }
}

/* ── FOOTER NAV GROUPS (Progressive layout) ───────────────────────────── */
.tb-footer-col ul li a {
  font-family: var(--font-body);
  font-size: 0.88rem;
  color: rgba(45,74,30,0.85);
  text-decoration: none;
  transition: color 0.15s;
  display: flex;
  align-items: center;
  min-height: 44px; /* WCAG 2.5.5 touch target */
}
.tb-footer-col ul li a:hover { color: var(--tb-green, #3D6B2C); }
.tb-footer-grandma-link {
  color: var(--tb-green, #3D6B2C) !important;
  font-weight: 700;
}
.tb-footer-grandma-link:hover { color: var(--tb-green, #3D6B2C) !important; text-decoration: underline; }

/* Collapse to 2 columns on tablet */
@media (max-width: 768px) {
  .tb-footer-nav-groups {
    grid-template-columns: repeat(2, 1fr);
    gap: 28px 20px;
  }
}

/* Stack to single column on mobile */
@media (max-width: 480px) {
  .tb-footer-nav-groups {
    grid-template-columns: 1fr;
    gap: 20px;
    text-align: center;
  }
  .tb-footer-col-heading {
    border-bottom: none;
    margin-bottom: 8px;
  }
  .tb-footer-col ul {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px 16px;
  }
}


/* ══════════════════════════════════════════════════════════════════
   RELOCATED FROM INLINE STYLE BLOCKS — clean code audit pass
══════════════════════════════════════════════════════════════════ */

/* ═══════════════════════════════════════════════════════════
   ZONE LOCATION (single-tb_location.php) — moved from inline
   ═══════════════════════════════════════════════════════════ */


/* ── MAP SECTION ── */
@keyframes yah-pulse { 0%,100%{transform:scale(1);opacity:1} 50%{transform:scale(1.5);opacity:.6} }
.loc-zone-tab:focus-visible { outline:3px solid var(--zone-color); outline-offset:2px; }
.loc-fauna-card:focus-visible,.loc-flora-card:focus-visible,.loc-act-card:focus-visible { outline:3px solid var(--navy,#3D6B2C); outline-offset:3px; }
.loc-cta-btn:focus-visible,.loc-act-btn:focus-visible { outline:3px solid var(--orange,#FFDE00); outline-offset:2px; }
@keyframes pin-bob { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-7px)} }
.loc-zone-tabs::-webkit-scrollbar{display:none}

/* ── HERO BANNER ── */
.loc-floaty:nth-child(1){top:12%;left:7%;animation-delay:0s;font-size:2.6rem}
.loc-floaty:nth-child(2){top:58%;left:14%;animation-delay:1.3s;font-size:1.6rem}
.loc-floaty:nth-child(3){top:18%;right:9%;animation-delay:2.1s}
.loc-floaty:nth-child(4){top:68%;right:7%;animation-delay:.8s;font-size:1.9rem}
.loc-floaty:nth-child(5){top:38%;left:42%;animation-delay:3.2s;font-size:1.3rem}
@keyframes floaty-drift{0%,100%{transform:translateY(0) rotate(0deg)}33%{transform:translateY(-14px) rotate(6deg)}66%{transform:translateY(7px) rotate(-4deg)}}

/* ── CONTENT ── */


/* Fauna cards */

/* Flora cards */

/* Story Corner */
.loc-story::before{content:'"';position:absolute;top:-24px;left:20px;font-family:'Fredoka One',cursive;font-size:14rem;color:rgba(255,255,255,0.05);line-height:1;pointer-events:none}
.loc-story-body .highlight{color:var(--tb-green,#3D6B2C);font-weight:700}

/* Activities */
.loc-act-card:hover{transform:translate(-3px,-3px);box-shadow:0 8px 18px rgba(0,0,0,.12)}

/* CTA */
.loc-cta-btn:hover{transform:scale(1.04)}

/* Breadcrumb */
.loc-breadcrumb a:hover{text-decoration:underline}

/* Wave */

@media(max-width:768px){
  .loc-map-inner{flex-direction:column;align-items:stretch}
  .loc-backyard-map{width:100%;height:auto;min-width:0;}
  .loc-story{padding:30px 22px}
  .loc-story::before{font-size:7rem}
  .loc-hero{padding:42px 20px 60px}
  .loc-fauna-grid{grid-template-columns:repeat(auto-fill,minmax(160px,1fr))}
  .loc-flora-grid{grid-template-columns:repeat(auto-fill,minmax(130px,1fr))}
  .loc-act-grid{grid-template-columns:1fr}
  .loc-cta{padding:32px 20px;border-radius:28px}
  .loc-zone-tabs{padding:10px 16px 0}
  .loc-content{padding:36px 16px 60px;gap:40px}
}
@media(max-width:480px){
  .loc-map-section{top:56px}
  .loc-hero-emoji{font-size:3.5rem}
  .loc-sec-header h2{font-size:1.5rem}
  .loc-story-body{font-size:1.05rem}
  .loc-zone-name{font-size:1.1rem}
  .loc-zone-tab{font-size:.76rem;padding:6px 11px}
}
@media print{
  .loc-map-section,.loc-hero-floaties,.loc-zone-tabs,.loc-cta,.site-footer,.site-header,.loc-breadcrumb{display:none!important}
  .loc-story{background:white!important;color:black!important;border:2px solid #CCCCCC;border-radius:8px}
  .loc-story-body,.loc-story-quote{color:black!important}
  .loc-fauna-card,.loc-flora-card,.loc-act-card{box-shadow:none!important;border-width:1px!important}
  .loc-hero{background:white!important;color:black!important;padding:16px}
  .loc-hero h1{text-shadow:none!important}
}
@media(forced-colors:active){
  .loc-fauna-card,.loc-flora-card,.loc-act-card{border:2px solid ButtonText}
  .loc-fauna-badge,.loc-act-tag{border:1px solid ButtonText;background:transparent;color:ButtonText}
  .loc-zone-tab.current{border:2px solid Highlight;color:Highlight}
  .loc-yah{background:Highlight;color:HighlightText}
  .loc-cta-btn,.loc-act-btn{border:2px solid ButtonText}
}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important}}


/* ═══════════════════════════════════════════════════════════
   BACKYARD ZONES ARCHIVE (archive-tb_location.php) — moved from inline
   ═══════════════════════════════════════════════════════════ */

.bya-hero{background:var(--navy,#3D6B2C);color:white;text-align:center;padding:56px 24px;border-radius:48px;border:5px solid var(--orange,var(--tb-yellow-border));margin:28px 24px}
.bya-hero h1{font-family:'Fredoka One',cursive;font-size:clamp(2rem,5vw,3.2rem);margin:0 0 10px}
.bya-hero p{font-family:'Mali',sans-serif;font-size:1.1rem;opacity:.9;margin:0}
.bya-container{max-width:1100px;margin:0 auto;padding:0 24px 60px}
.bya-map-wrap{background:#FFFFFF;border:4px solid var(--orange,var(--tb-yellow-border));border-radius:32px;padding:28px;margin:36px 0;box-shadow:0 8px 24px rgba(0,0,0,0.08)}
.bya-map-wrap h2{font-family:'Fredoka One',cursive;color:var(--navy,#3D6B2C);font-size:1.6rem;text-align:center;margin:0 0 18px}
.bya-map-svg{width:100%;max-width:800px;height:220px;display:block;margin:0 auto}
.bya-map-zone-group{cursor:pointer;transition:opacity .2s}
.bya-map-zone-group:hover{opacity:.82}
.bya-zones-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:22px;margin-top:36px}
.bya-zone-card{background:white;border-width:4px;border-style:solid;border-radius:32px;padding:28px;text-decoration:none;display:block;color:inherit;box-shadow:4px 4px 0 rgba(0,0,0,0.08);transition:transform .2s,box-shadow .2s}
.bya-zone-card:hover{transform:translate(-2px,-3px);box-shadow:6px 7px 0 rgba(0,0,0,0.12)}
.bya-zone-emoji{font-size:2.8rem;display:block;margin-bottom:10px}
.bya-zone-card h3{font-family:'Fredoka One',cursive;font-size:1.3rem;margin:0 0 8px}
.bya-zone-card p{font-family:'Mali',sans-serif;font-size:.88rem;line-height:1.5;color:#555555;margin:0 0 14px}
.bya-zone-cta{font-family:'Fredoka One',cursive;font-size:.9rem;color:var(--orange,#FFDE00)}
@media(max-width:768px){
  .bya-zones-grid{grid-template-columns:1fr 1fr}
  .bya-map-svg{height:175px}
}
@media(max-width:600px){
  .bya-hero{margin:16px;padding:36px 18px}
  .bya-map-svg{height:150px}
  .bya-zones-grid{grid-template-columns:1fr}
}
@media(forced-colors:active){
  .bya-zone-card{border:2px solid ButtonText!important}
  .bya-zone-cta{color:Highlight}
}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important}}
@media print{
  .bya-hero{background:white!important;color:black!important;border:1px solid #CCCCCC}
  .bya-zone-card{box-shadow:none!important;break-inside:avoid}
}


/* ═══════════════════════════════════════════════════════════
   MEET OUR HEROES (page-meet-heroes.php) — moved from inline
   ═══════════════════════════════════════════════════════════ */

.mh-bio-avatar--photo img{width:100%;height:100%;object-fit:cover;border-radius:50%}
.mh-bio-avatar--empty{background:#FFFDF7}
.mh-map-zone-link{text-decoration:none;color:inherit;display:block}
.mh-map-zone-link:hover{transform:translateY(-4px);box-shadow:0 12px 30px rgba(0,0,0,0.12)}
.mh-map-zone-link:hover .mh-zone-explore{opacity:1}
.mh-explorer-intro em{display:block;color:#3D6B2C;font-size:.9rem;margin-top:6px}
.mh-checklist-card{background:#FFFDF7;border:2px solid #97CCE8;border-radius:24px;padding:24px}
.mh-checklist-card h3{font-family:'Fredoka One',cursive;color:#3D6B2C;margin:0 0 6px}
.mh-checklist-items input[type="checkbox"]{width:20px;height:20px;accent-color:#3D6B2C;cursor:pointer;flex-shrink:0}
.mh-reset-btn:focus-visible{outline:3px solid #FFDE00;outline-offset:2px}
.mh-print-card{background:#FFDE00;border:2px dashed var(--tb-yellow-border);border-radius:24px;padding:24px;text-align:center;display:flex;flex-direction:column;align-items:center}
.mh-print-card h3{font-family:'Fredoka One',cursive;color:#3D6B2C;margin:0 0 8px}
.mh-print-sketch,.mh-print-signature{display:none}
@media(max-width:768px){
  .mh-bio-card{flex-direction:column;text-align:center}
  .mh-bio-avatar{width:120px;height:120px;font-size:3.5rem}
  .mh-traits{justify-content:center}
  .mh-page-hero{margin:16px;padding:40px 20px}
}
@media print{
  body *{visibility:hidden}
  #explorer-station,#explorer-station *{visibility:visible}
  #explorer-station{position:absolute;left:0;top:0;width:100%;border:none;box-shadow:none}
  .mh-print-sketch{display:block!important;border:2px solid #000000;height:160px;margin:20px 0}
  .mh-print-signature{display:block!important;margin-top:30px;border-top:2px solid #000000;padding-top:10px}
  .mh-print-btn,.mh-reset-btn{display:none!important}
}
@media(prefers-reduced-motion:reduce){*{transition:none!important;animation:none!important}}


/* ══════════════════════════════════════════════════════════════════
   COOKIE CONSENT BANNER
══════════════════════════════════════════════════════════════════ */

.tb-cookie-banner[hidden] {
  display: none;
}

@keyframes tb-cookie-slide-in {
  to { transform: translateY(0); }
}





.tb-cookie-link:hover {
  color: #FFDE00;
}

.tb-cookie-accept {
  flex-shrink: 0;
  white-space: nowrap;
}

@media (max-width: 480px) {
  .tb-cookie-inner {
    flex-direction: column;
    text-align: center;
  }
  .tb-cookie-accept {
    width: 100%;
  }
}

/* ══════════════════════════════════════════════════════════════════
   BACK TO TOP BUTTON
══════════════════════════════════════════════════════════════════ */

.tb-back-to-top[hidden] {
  display: none;
}

.tb-back-to-top:hover,
.tb-back-to-top:focus-visible {
  background: #FFDE00;
  transform: translateY(-3px);
  outline: 3px solid var(--tb-green, #3D6B2C);
  outline-offset: 3px;
}

@media (max-width: 480px) {
  .tb-back-to-top {
    bottom: 80px; /* above cookie banner on mobile */
    right: 16px;
  }
}

/* ══════════════════════════════════════════════════════════════════════
   AUDIT-FIX ADDITIONS (merged from audit-fixes.css)
══════════════════════════════════════════════════════════════════════ */
/**
 * Tootie's Backyard — Audit Fix Stylesheet
 * Addresses every FAIL and WARN from the ADA/SEO/Responsive audit.
 * Import this at the end of assets/css/theme.css:
 *
 * WCAG 2.1 AA fixes applied:
 *  R2  — 360px breakpoint (Category Home + Interior overflow)
 *  R3  — 44px minimum touch targets on nav-pill, f-pill, btn, filter buttons
 *  R4  — overflow-x: hidden on html + body
 *  R5  — clamp() padding on .container
 *  Contrast — Forest green #3D6B2C and Gold #FFDE00 usage notes
 */

/* ── R4: Prevent horizontal scroll on all screen sizes ─────────────────── */
html, body {
  overflow-x: hidden;
}

/* ── R3: 44×44px minimum touch targets (WCAG 2.5.5) ────────────────────── */
.nav-pill,
.tb-nav-pill,
.f-pill,
.f-btn,
.btn,
.tb-btn,
.tb-read-btn,
.sighted-btn,
.tb-sighted-btn {
  min-height: 44px;
  min-width: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Pagination links */
.tb-pagination a,
.tb-pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 0 14px;
  border-radius: 50px;
  border: 3px solid var(--navy);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--navy);
  text-decoration: none;
  background: white;
  transition: all 0.15s;
}

/* Menu toggle */

/* ── R2: Sub-360px breakpoint — Category Home + Interior fixes ──────────── */
@media (max-width: 360px) {

  /* Prevent card grid overflow */
  .tb-cards-grid,
  .cards-grid,
  .grid-2, .grid-3, .grid-4 {
    grid-template-columns: 1fr !important;
    gap: 16px;
  }

  /* Container: use full width with minimal padding */
  .container,
  .tb-container {
    padding: 0 clamp(10px, 3vw, 16px) 60px;
  }

  /* Hero text: prevent overflow */
  .page-hero h1,
  .tb-page-hero h1,
  .big-hero h1 {
    font-size: clamp(1.4rem, 8vw, 2rem) !important;
    word-break: break-word;
  }

  /* Nav pills: wrap gracefully */
  .site-nav,
  .tb-site-nav {
    flex-direction: column;
    gap: 4px;
    width: 100%;
  }
  .nav-pill,
  .tb-nav-pill {
    width: 100%;
    text-align: center;
    font-size: 0.85rem;
    padding: 10px 12px;
  }

  /* Friend cards: stack avatar above text */
  .tb-card-top,
  .card-top {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  /* Season row: 1 column */
  .tb-season-row,
  .season-row {
    grid-template-columns: 1fr !important;
  }

  /* Activities grid: 1 column */
  .tb-activities-grid {
    grid-template-columns: 1fr !important;
  }

  /* Prevent canvas overflow */
  canvas {
    max-width: 100% !important;
    width: 100% !important;
  }

  /* Safety callout: stack */
  .tb-safety-callout,
  .safety-callout,
  .safety-zone {
    flex-direction: column;
    padding: 20px 16px;
  }

  /* Hide decorative emoji strip on very small screens */
  .hero-animals {
    font-size: 1.5rem;
    letter-spacing: 2px;
  }

  /* Footer: single column */
  .tb-footer-links,
  .footer-links {
    flex-direction: column;
    gap: 10px;
    align-items: center;
  }
}

/* ── R5: Fluid container padding using clamp() ──────────────────────────── */
.container,

/* ── ADA: Improved grid for sub-360 (minmax safe value) ─────────────────── */

/* ── ADA: Color usage guidance (Forest + Gold) ──────────────────────────── */
/*
   COLOR CONTRAST AUDIT RESULTS:
   ─────────────────────────────────────────────────────────────
   Forest #3D6B2C on white #FFFFFF : ratio 9.5:1  ✅ AAA (all text)
   Forest #3D6B2C on sky   #97CCE8 : ratio 4.8:1  ✅ AA (small text)
   Gold   #FFDE00 on white #FFFFFF : ratio 1.28:1 ❌ FAIL (any text size)
   Gold   #FFDE00 on navy  #3D6B2C : ratio 8.3:1  ✅ AAA (all text)
   Gold   #FFDE00 on black #000000 : ratio 16.4:1 ✅ AAA (all text)
   ─────────────────────────────────────────────────────────────
   RULE: NEVER use Gold #FFDE00 as TEXT COLOR on white or light backgrounds.
         Gold #FFDE00 is ONLY safe as a BACKGROUND with dark text on top.
         Forest #3D6B2C is safe on white in all sizes.
*/

/* Force-safe Gold usage — only as background with navy text */
.tb-gold-badge,
.gold-highlight,
[data-color="gold"] {
  background-color: #FFDE00;
  color: #3D6B2C;   /* navy — 8.3:1 contrast ✅ */
  padding: 2px 8px;
}
/* Ensure Gold is never used as foreground text color */
.tb-gold-text {
  color: #3D6B2C !important; /* Override any accidental gold text */
}

/* Forest green — safe everywhere */
.tb-forest {
  color: #3D6B2C;
}
.tb-forest-bg {
  background: #3D6B2C;
  color: white; /* 9.5:1 ✅ */
}

/* ── ADA: SVG inline defaults ───────────────────────────────────────────── */
svg:not([aria-label]):not([aria-hidden]) {
  /* Force hidden on decorative SVGs that have no accessibility attr */
  /* In practice: always add aria-hidden="true" or aria-label="..." explicitly */
}

/* ── Print additions ────────────────────────────────────────────────────── */
@media print {
  .tb-menu-toggle,
  
  
  .tb-site-nav,
  .site-nav,
  .tb-site-footer,
  .site-footer,
  .tb-filter-section,
  .filter-bar,
  .filter-section,
  .tb-sighted-btn,
  .sighted-btn,
  .tb-pagination,
  .no-print { display: none !important; }
  body { background: white; font-size: 12pt; }
  .tb-friend-card, .card { break-inside: avoid; border: 1px solid #CCCCCC; box-shadow: none; }
  h1, h2, h3 { page-break-after: avoid; }
  img { max-width: 100%; }
}

/* ── Story reader page spread ─────────────────────────────────────────── */
@media (max-width: 600px) {
  .tb-story-pages-grid {
    grid-template-columns: 1fr;
  }
  .tb-story-pages-grid > div + div {
    border-left: none;
    border-top: 3px solid #FFFDF7;
  }
}

/* ── Utility classes (replacing repeated inline styles) ───────────────── */
.tb-section-gap    { margin-bottom: 48px; }
.tb-section-gap-lg { margin-top: 56px; }
.tb-mt-32          { margin-top: 32px; }
.tb-mt-24          { margin-top: 24px; }
.tb-emoji-lg       { font-size: 1.5rem; }
.tb-font-display   { font-family: var(--font-display); }
.tb-two-col-main > * {
  min-width: 0;
  overflow-wrap: break-word;
}
@media (max-width: 700px) {
  .tb-two-col-main { grid-template-columns: 1fr; }
}
.tb-hand-intro {
  font-family: 'Mali', Arial, sans-serif;
  font-weight: 700;
  font-size: 1.05rem;
  max-width: 700px;
  margin-bottom: 24px;
}
.tb-hand-small {
  font-family: 'Mali', Arial, sans-serif;
  font-weight: 700;
  font-size: .88rem;
  margin: 0;
  color: #3D6B2C;
}


/* ═══════════════════════════════════════════════════════════════════════
   INDOORS HUB
═══════════════════════════════════════════════════════════════════════ */

/* Hero */
.tb-indoors-hero {
  background: #D6F0FB;
  border-bottom: 4px solid var(--tb-green, #3D6B2C);
  text-align: center;
}
.tb-indoors-hero__desc {
  font-size: 1.05rem;
  opacity: 1;
  max-width: 620px;
  margin: 0 auto .75rem;
  line-height: 1.7;
  color: #3D6B2C;
}
.tb-indoors-hero__tags {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  justify-content: center;
  margin-top: .75rem;
}
.tb-ih-tag {
  background: rgba(45,74,30,0.1);
  border: 1.5px solid rgba(45,74,30,0.25);
  color: #3D6B2C;
  border-radius: 20px;
  padding: .3rem .85rem;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .4px;
}

/* Wrap */
.tb-indoors-wrap {
  padding-top: 2rem;
  padding-bottom: 3rem;
}

/* Section header */
.tb-ih-section {
  margin-bottom: 2.5rem;
}
.tb-ih-section__header {
  display: flex;
  align-items: center;
  gap: .6rem;
  margin-bottom: 1rem;
  padding-bottom: .5rem;
  border-bottom: 2px solid #FFFDF7;
}
.tb-ih-section__emoji {
  font-size: 1.5rem;
}
.tb-ih-section__title {
  font-family: var(--font-head);
  font-size: 1.3rem;
  color: var(--navy);
  margin: 0;
}
.tb-ih-section__count {
  margin-left: auto;
  background: var(--navy);
  color: #FFFFFF;
  border-radius: 12px;
  padding: .15rem .6rem;
  font-size: .72rem;
  font-weight: 800;
}

/* Card grid */
.tb-ih-grid--featured {
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

/* Card */
.tb-ih-card--featured {
  border-color: rgba(var(--card-rgb), .45);
  background: linear-gradient(135deg, rgba(var(--card-rgb), .04), #FFFFFF 60%);
}
.tb-ih-card__type-badge {
  position: absolute;
  top: .75rem;
  right: .75rem;
  background: rgba(var(--card-rgb), .12);
  color: rgb(var(--card-rgb));
  border-radius: 10px;
  padding: .2rem .55rem;
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .4px;
}
.tb-ih-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  margin-top: .25rem;
}
.tb-ih-card__fact {
  font-size: .78rem;
  color: #3D6B2C;
  background: #FFFFFF;
  border-left: 3px solid rgba(var(--card-rgb), .4);
  border-radius: 0 8px 8px 0;
  padding: .45rem .65rem;
  line-height: 1.5;
}
.tb-ih-card__fact-label {
  font-weight: 800;
  margin-right: .25rem;
}
.tb-ih-card__grandma {
  font-size: .78rem;
  color: #2D5A1E;
  background: #FFDE00;
  border: 1px solid #3D6B2C;
  border-radius: 8px;
  padding: .4rem .65rem;
  line-height: 1.5;
}

/* Empty state */
.tb-empty-hub {
  text-align: center;
  padding: 4rem 1rem;
  color: #3D6B2C;
}
.tb-empty-hub__emoji { font-size: 3.5rem; margin-bottom: 1rem; }
.tb-empty-hub h2 { font-family: var(--font-head); color: var(--navy); margin-bottom: .5rem; }


/* ═══════════════════════════════════════════════════════════════════════
   OUTDOORS HUB
═══════════════════════════════════════════════════════════════════════ */

/* Hero */
.tb-outdoors-hero {
  background: #8FC279;
  border-bottom: 4px solid var(--tb-green, #3D6B2C);
  text-align: center;
}
.tb-outdoors-hero__badge {
  font-size: clamp(2.5rem, 8vw, 4rem);
  margin-bottom: .5rem;
}
.tb-outdoors-hero__tags {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  justify-content: center;
  margin-top: .75rem;
}
.tb-oh-tag {
  background: rgba(45,74,30,0.1);
  border: 1.5px solid rgba(45,74,30,0.25);
  color: #3D6B2C;
  border-radius: 20px;
  padding: .3rem .85rem;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .4px;
}

/* Wrap */
.tb-outdoors-wrap {
  padding-top: 2rem;
  padding-bottom: 3rem;
}

/* Section header */
.tb-oh-section {
  margin-bottom: 2.5rem;
}
.tb-oh-section__header {
  display: flex;
  align-items: center;
  gap: .6rem;
  margin-bottom: 1rem;
  padding-bottom: .5rem;
  border-bottom: 2px solid #FFFDF7;
}
.tb-oh-section__emoji { font-size: 1.5rem; }
.tb-oh-section__title {
  font-family: var(--font-head);
  font-size: 1.3rem;
  color: #3D6B2C;
  margin: 0;
}
.tb-oh-section__count {
  margin-left: auto;
  background: #3D6B2C;
  color: #FFFFFF;
  border-radius: 12px;
  padding: .15rem .6rem;
  font-size: .72rem;
  font-weight: 800;
}

/* Featured grid */
.tb-oh-featured-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.25rem;
  margin-bottom: 1rem;
}

/* Collapsible activity card */
.tb-oh-card {
  background: #8FC279;
  border-radius: 16px;
  border: 2px solid rgba(var(--oa-rgb), .25);
  box-shadow: 0 2px 12px rgba(var(--oa-rgb), .07);
  overflow: hidden;
  margin-bottom: .75rem;
  transition: box-shadow .18s;
}
.tb-oh-card:hover {
  box-shadow: 0 5px 20px rgba(var(--oa-rgb), .14);
}
.tb-oh-card--expanded {
  border-color: rgba(var(--oa-rgb), .4);
}

/* Card header (collapsed) */
.tb-oh-card__header {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .9rem 1rem;
  min-height: 44px;            /* ADA touch target */
  cursor: pointer;
  user-select: none;
  touch-action: manipulation;   /* remove 300ms mobile tap delay */
  background: linear-gradient(135deg, rgba(var(--oa-rgb), .05), transparent);
}
.tb-oh-card__header:hover {
  background: rgba(var(--oa-rgb), .08);
}
.tb-oh-card__header-emoji {
  font-size: 1.8rem;
  flex-shrink: 0;
  line-height: 1;
}
.tb-oh-card__header-text {
  flex: 1;
  min-width: 0;
}
.tb-oh-card__header-title {
  display: block;
  font-family: var(--font-head);
  font-size: .98rem;
  color: #3D6B2C;
  font-weight: 700;
  line-height: 1.25;
}
.tb-oh-card__header-sub {
  display: block;
  font-size: .75rem;
  color: #3D6B2C;
  margin-top: .15rem;
}
.tb-oh-card__chevron {
  font-size: 1.4rem;
  color: rgba(var(--oa-rgb), .6);
  flex-shrink: 0;
  transition: transform .2s;
  line-height: 1;
}

/* Expanded body */
.tb-oh-card__body {
  padding: 1.25rem;
  border-top: 1.5px solid rgba(var(--oa-rgb), .15);
}

/* Body internals */
.tb-oh-body__hero {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 1rem;
}
.tb-oh-body__emoji {
  font-size: 2.8rem;
  flex-shrink: 0;
  line-height: 1;
}
.tb-oh-body__title {
  font-family: var(--font-head);
  font-size: 1.15rem;
  color: #3D6B2C;
  margin: 0 0 .4rem;
  line-height: 1.25;
}
.tb-oh-body__chips {
  display: flex;
  flex-wrap: wrap;
  gap: .3rem;
  margin-bottom: .4rem;
}
.tb-oh-chip {
  background: rgba(var(--oa-rgb), .12);
  color: rgb(var(--oa-rgb));
  border-radius: 10px;
  padding: .18rem .55rem;
  font-size: .72rem;
  font-weight: 700;
}
.tb-oh-body__excerpt {
  font-size: .85rem;
  color: #3D6B2C;
  line-height: 1.6;
  margin: 0;
}

/* Two-column layout for materials + steps */
.tb-oh-body__cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}
@media (max-width: 560px) {
  .tb-oh-body__cols { grid-template-columns: 1fr; }
  .tb-oh-body__hero { flex-direction: column; gap: .5rem; }
}

/* Panels */
.tb-oh-body__panel {
  background: #FFFFFF;
  border: 1.5px solid rgba(var(--oa-rgb), .2);
  border-radius: 12px;
  padding: .9rem 1rem;
}
.tb-oh-panel__title {
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .8px;
  text-transform: uppercase;
  color: rgb(var(--oa-rgb));
  margin-bottom: .65rem;
}

/* Materials checklist */
.tb-oh-mat-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.tb-oh-mat-list li {
  display: flex;
  align-items: flex-start;
  gap: .5rem;
  font-size: .83rem;
  color: #3D6B2C;
  line-height: 1.5;
  padding: .25rem 0;
  border-bottom: 1px solid rgba(var(--oa-rgb), .1);
}
.tb-oh-mat-list li:last-child { border-bottom: none; }
.tb-oh-mat-check {
  display: inline-block;
  width: 15px;
  height: 15px;
  border: 2px solid rgba(var(--oa-rgb), .45);
  border-radius: 3px;
  flex-shrink: 0;
  margin-top: 2px;
}

/* Steps list */
.tb-oh-steps-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.tb-oh-step {
  display: flex;
  gap: .65rem;
  align-items: flex-start;
  font-size: .83rem;
  color: #3D6B2C;
  line-height: 1.55;
  margin-bottom: .6rem;
}
.tb-oh-step:last-child { margin-bottom: 0; }
.tb-oh-step__num {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgb(var(--oa-rgb));
  color: #FFFFFF;
  font-size: .7rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}
.tb-oh-step__body { color: #3D6B2C; }

/* Safety box */
.tb-oh-safety-box {
  background: #FFDE00;
  border: 2px solid #3D6B2C;
  border-radius: 12px;
  padding: .85rem 1rem;
  margin-bottom: .85rem;
  font-size: .83rem;
  color: #2D5A1E;
  line-height: 1.6;
}
.tb-oh-safety-box__title {
  font-weight: 800;
  font-size: .78rem;
  letter-spacing: .6px;
  text-transform: uppercase;
  color: #3D6B2C;
  margin-bottom: .45rem;
}

/* What to watch */
.tb-oh-body__watch {
  margin-bottom: .85rem;
  background: #FFFFFF;
}
.tb-oh-watch-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.tb-oh-watch-list li {
  font-size: .83rem;
  color: #3D6B2C;
  padding: .22rem 0 .22rem .9rem;
  position: relative;
  line-height: 1.5;
  border-bottom: 1px solid rgba(var(--oa-rgb), .08);
}
.tb-oh-watch-list li:last-child { border-bottom: none; }
.tb-oh-watch-list li::before {
  content: '›';
  position: absolute;
  left: 0;
  color: rgb(var(--oa-rgb));
  font-weight: 800;
}

/* Grandma tip */
.tb-oh-grandma-tip {
  display: flex;
  gap: .65rem;
  align-items: flex-start;
  background: #FFDE00;
  border: 1.5px solid #3D6B2C;
  border-radius: 10px;
  padding: .7rem .9rem;
  font-size: .83rem;
  color: #2D5A1E;
  line-height: 1.55;
}
.tb-oh-grandma-tip__owl {
  font-size: 1.3rem;
  flex-shrink: 0;
  margin-top: .05rem;
}

/* Featured outdoors section heading */
.tb-oh-featured-section .tb-oh-section__header {
  border-bottom-color: #8FC279;
}
.tb-oh-featured-section .tb-oh-section__title { color: #3D6B2C; }


/* ═══════════════════════════════════════════════════════════════════════
   SINGLE INDOORS ACTIVITY
═══════════════════════════════════════════════════════════════════════ */
.tb-single-ia__badge {
  display: inline-block;
  background: rgba(255,255,255,0.18);
  border: 1.5px solid rgba(255,255,255,0.3);
  color: #FFFFFF;
  border-radius: 20px;
  padding: .3rem 1rem;
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .5px;
  margin-bottom: .5rem;
}
.tb-single-ia__emoji {
  font-size: clamp(3rem,10vw,5rem);
  line-height: 1;
  margin-bottom: .5rem;
}
.tb-single-ia__excerpt {
  font-size: 1.05rem;
  opacity: .92;
  max-width: 600px;
  margin: .5rem auto 0;
  line-height: 1.7;
}
.tb-single-ia__chips {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  justify-content: center;
  margin-top: .75rem;
}
.tb-single-ia__chip {
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.25);
  color: #FFFFFF;
  border-radius: 16px;
  padding: .25rem .75rem;
  font-size: .75rem;
  font-weight: 700;
}
.tb-single-ia__cta {
  margin-top: 1.25rem;
  font-size: 1rem;
  padding: .75rem 2rem;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  touch-action: manipulation;
}
.tb-single-ia__wrap { padding-top: 2rem; padding-bottom: 3rem; }
.tb-single-ia__body { margin-bottom: 1.5rem; }
.tb-single-ia__funfact {
  background: #FFFFFF;
  border-left: 4px solid #3D6B2C;
  border-radius: 0 12px 12px 0;
  padding: 1rem 1.25rem;
  margin-bottom: 1.25rem;
}
.tb-single-ia__funfact-label {
  font-weight: 800;
  color: #3D6B2C;
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .6px;
  margin-bottom: .4rem;
}
.tb-single-ia__funfact p { margin: 0; color: #3D6B2C; font-size: .9rem; line-height: 1.65; }
.tb-single-ia__grandma {
  display: flex;
  gap: .65rem;
  align-items: flex-start;
  background: #FFDE00;
  border: 1.5px solid #3D6B2C;
  border-radius: 10px;
  padding: .85rem 1rem;
  font-size: .88rem;
  color: #2D5A1E;
  line-height: 1.6;
  margin-bottom: 1.25rem;
}
.tb-single-ia__grandma-owl { font-size: 1.4rem; flex-shrink: 0; }
.tb-single-ia__bottom-cta { margin: 1.5rem 0; text-align: center; }

/* ═══════════════════════════════════════════════════════════════════════
   SINGLE OUTDOORS ACTIVITY
═══════════════════════════════════════════════════════════════════════ */
.tb-single-oa__badge {
  display: inline-block;
  background: rgba(255,255,255,0.18);
  border: 1.5px solid rgba(255,255,255,0.3);
  color: #FFFFFF;
  border-radius: 20px;
  padding: .3rem 1rem;
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .5px;
  margin-bottom: .5rem;
}
.tb-single-oa__emoji {
  font-size: clamp(3rem,10vw,5rem);
  line-height: 1;
  margin-bottom: .5rem;
}
.tb-single-oa__excerpt {
  font-size: 1.05rem;
  opacity: .92;
  max-width: 620px;
  margin: .5rem auto 0;
  line-height: 1.7;
}
.tb-single-oa__chips {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  justify-content: center;
  margin-top: .75rem;
}
.tb-single-oa__chip {
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.25);
  color: #FFFFFF;
  border-radius: 16px;
  padding: .25rem .75rem;
  font-size: .75rem;
  font-weight: 700;
}
.tb-single-oa__wrap { padding-top: 2rem; padding-bottom: 3rem; }
.tb-single-oa__panel {
  background: #FFFFFF;
  border: 1.5px solid rgba(45,74,30,0.2);
  border-radius: 14px;
  padding: 1.1rem 1.25rem;
  margin-bottom: 1.25rem;
}
.tb-single-oa__panel-title {
  font-family: var(--font-head);
  font-size: 1rem;
  color: #3D6B2C;
  margin: 0 0 .85rem;
}
.tb-oa-mat-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.tb-oa-mat-list li {
  display: flex;
  align-items: flex-start;
  gap: .6rem;
  font-size: .88rem;
  color: #3D6B2C;
  line-height: 1.55;
  padding: .3rem 0;
  border-bottom: 1px solid rgba(45,74,30,0.1);
}
.tb-oa-mat-list li:last-child { border-bottom: none; }
.tb-oa-mat-check {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(45,74,30,0.4);
  border-radius: 3px;
  flex-shrink: 0;
  margin-top: 2px;
}
.tb-oa-steps-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.tb-oa-step {
  display: flex;
  gap: .75rem;
  align-items: flex-start;
  font-size: .88rem;
  color: #3D6B2C;
  line-height: 1.6;
  margin-bottom: .85rem;
}
.tb-oa-step:last-child { margin-bottom: 0; }
.tb-oa-step__num {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #3D6B2C;
  color: #FFFFFF;
  font-size: .72rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}
.tb-oa-step__body { color: #3D6B2C; }
.tb-single-oa__safety {
  background: #FFDE00;
  border: 2px solid #3D6B2C;
  border-radius: 14px;
  padding: 1rem 1.25rem;
  margin-bottom: 1.25rem;
  font-size: .88rem;
  color: #2D5A1E;
  line-height: 1.65;
}
.tb-single-oa__safety-title {
  font-weight: 800;
  font-size: .8rem;
  letter-spacing: .6px;
  text-transform: uppercase;
  color: #3D6B2C;
  margin-bottom: .5rem;
}
.tb-oa-watch-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.tb-oa-watch-list li {
  font-size: .88rem;
  color: #3D6B2C;
  padding: .28rem 0 .28rem 1rem;
  position: relative;
  line-height: 1.55;
  border-bottom: 1px solid rgba(45,74,30,0.08);
}
.tb-oa-watch-list li:last-child { border-bottom: none; }
.tb-oa-watch-list li::before {
  content: '›';
  position: absolute;
  left: 0;
  color: #3D6B2C;
  font-weight: 800;
}
.tb-single-oa__grandma {
  display: flex;
  gap: .65rem;
  align-items: flex-start;
  background: #FFDE00;
  border: 1.5px solid #3D6B2C;
  border-radius: 10px;
  padding: .85rem 1rem;
  font-size: .88rem;
  color: #2D5A1E;
  line-height: 1.6;
  margin-bottom: 1.25rem;
}
.tb-single-oa__grandma-owl { font-size: 1.4rem; flex-shrink: 0; }
.tb-single-oa__body { margin: 1.25rem 0; }
.tb-single-oa__back { margin-top: 2rem; padding-top: 1.5rem; border-top: 2px solid #FFFDF7; }

/* Outdoors hub card header title as link */
a.tb-oh-card__header-title {
  color: inherit;
  text-decoration: none;
}
a.tb-oh-card__header-title:hover,
a.tb-oh-card__header-title:focus-visible {
  text-decoration: underline;
  text-decoration-color: rgba(255,255,255,0.5);
  outline: none;
}

/* ═══════════════════════════════════════════════════════════════════════
   ACTIVITIES PAGE — TWO-SECTION LAYOUT
═══════════════════════════════════════════════════════════════════════ */
.tb-acts-wrap {
  padding-top: 2rem;
  padding-bottom: 3rem;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.tb-acts-section {
  padding: 2.5rem 0;
}
.tb-acts-section--indoors {
  border-bottom: 3px solid var(--sky-light);
  padding-bottom: 3rem;
  margin-bottom: 1rem;
}
.tb-acts-section--outdoors {
  padding-top: 2.5rem;
}
.tb-acts-section__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}
.tb-acts-section__title-group {
  display: flex;
  flex-direction: column;
  gap: .25rem;
}
.tb-acts-section__icon {
  font-size: 2rem;
  line-height: 1;
  margin-bottom: .25rem;
}
.tb-acts-section__title-group h2 {
  font-family: var(--font-head);
  font-size: clamp(1.4rem, 4vw, 1.9rem);
  color: var(--navy);
  margin: 0;
}
.tb-acts-section__title-group p {
  font-size: .9rem;
  color: #555555;
  margin: 0;
}
.tb-acts-section__more {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: .85rem;
  color: var(--tb-green, #3D6B2C);
  text-decoration: none;
  border: 2px solid var(--tb-yellow-border);
  box-shadow: var(--tb-btn-ring);
  border-radius: 50px;
  padding: .4rem 1rem;
  white-space: nowrap;
  align-self: center;
  min-height: 44px;
  display: flex;
  align-items: center;
  touch-action: manipulation;
  transition: background .15s, color .15s;
}
.tb-acts-section__more:hover,
.tb-acts-section__more:focus-visible {
  background: var(--tb-yellow, #FFDE00);
  color: var(--tb-green, #3D6B2C);
}
.tb-acts-section--outdoors .tb-acts-section__more {
  border-color: var(--tb-yellow-border);
  box-shadow: var(--tb-btn-ring);
  color: var(--tb-green, #3D6B2C);
}
.tb-acts-section--outdoors .tb-acts-section__more:hover,
.tb-acts-section--outdoors .tb-acts-section__more:focus-visible {
  background: var(--tb-yellow, #FFDE00);
  color: var(--tb-green, #3D6B2C);
}
.tb-acts-section__footer {
  margin-top: 1.75rem;
  text-align: center;
}
.tb-btn-green:hover,
.tb-btn-green:focus-visible {
  background: #FFDE00;
  border-color: #FFDE00;
}

/* ═══════════════════════════════════════════════════════════════════════
   ACTIVITIES PAGE — INDOORS / OUTDOORS BANDS
═══════════════════════════════════════════════════════════════════════ */
.tb-acts-band__all-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: .4rem 1.1rem;
  border-radius: 50px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: .83rem;
  text-decoration: none;
  white-space: nowrap;
  align-self: center;
  touch-action: manipulation;
  border: 2px solid var(--tb-yellow-border);
  box-shadow: var(--tb-btn-ring);
  color: var(--tb-green, #3D6B2C);
  background: white;
  transition: background .15s, color .15s;
}
.tb-acts-band__all-link:hover,
.tb-acts-band__all-link:focus-visible {
  background: var(--tb-yellow, #FFDE00);
  color: var(--tb-green, #3D6B2C);
}
.tb-acts-band__all-link--green {
  border-color: var(--tb-yellow-border);
  box-shadow: var(--tb-btn-ring);
  color: var(--tb-green, #3D6B2C);
}
.tb-acts-band__all-link--green:hover,
.tb-acts-band__all-link--green:focus-visible {
  background: var(--tb-yellow, #FFDE00);
  color: var(--tb-green, #3D6B2C);
}

/* ═══════════════════════════════════════════════════════════════════════
   FEATURED GAMES STRIP — homepage
═══════════════════════════════════════════════════════════════════════ */
.tb-featured-games {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(200px, 100%), 1fr));
  gap: 18px;
  margin-bottom: .5rem;
}
.tb-fg-card {
  display: flex;
  flex-direction: column;
  background: white;
  border: 3.5px solid var(--navy);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow);
  text-decoration: none;
  color: inherit;
  transition: transform .2s, box-shadow .2s;
  min-width: 0;
}
.tb-fg-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.tb-fg-card__top {
  padding: 1.25rem 1rem .75rem;
  text-align: center;
  border-bottom: 2.5px solid var(--navy);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .5rem;
}
.tb-fg-card__icon {
  font-size: 2.5rem;
  line-height: 1;
  display: block;
}
.tb-fg-card__badge {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 800;
  font-size: .68rem;
  text-transform: uppercase;
  letter-spacing: .6px;
  padding: .2rem .7rem;
  border-radius: 50px;
  color: #FFFFFF;
}
.tb-fg-card__body {
  padding: .75rem 1rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: .35rem;
}
.tb-fg-card__title {
  font-family: var(--font-head);
  font-size: 1rem;
  color: var(--navy);
  margin: 0;
  line-height: 1.25;
  overflow-wrap: break-word;
  word-break: normal;
}
.tb-fg-card__desc {
  font-size: .78rem;
  color: #555555;
  line-height: 1.5;
  margin: 0;
}
.tb-fg-card__footer {
  padding: .6rem 1rem .85rem;
  text-align: center;
}
.tb-fg-card__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: .5rem 1rem;
  border-radius: 50px;
  background: white;
  color: #3D6B2C;
  border: 2px solid var(--orange);
  font-family: var(--font-body);
  font-weight: 800;
  font-size: .82rem;
  min-height: 38px;
}
.tb-fg-card:hover .tb-fg-card__btn {
  background: var(--orange);
  border-color: var(--tb-yellow, #FFDE00);
  color: #3D6B2C;
}

/* ── Hub hero inner wrapper ───────────────────────────────────────────── */
.tb-page-hero__inner {
  text-align: center;
  position: relative;
  z-index: 1;
  width: 100%;
}
.tb-page-hero__inner h1,
.tb-page-hero__inner p,
.tb-page-hero__inner div {
  text-align: center;
}
.tb-outdoors-hero__badge,
.tb-indoors-hero__badge {
  font-size: clamp(2.5rem, 8vw, 4rem);
  margin-bottom: .5rem;
  display: block;
}
.tb-outdoors-hero__desc {
  font-size: 1.05rem;
  opacity: 1;
  max-width: 620px;
  margin: 0 auto .75rem;
  line-height: 1.7;
  color: #3D6B2C;
  text-align: center;
}

/* ── Plugin not installed notice ──────────────────────────────────────── */
.tb-plugin-notice {
  text-align: center;
  padding: 4rem 2rem;
  max-width: 500px;
  margin: 0 auto;
}
.tb-plugin-notice__emoji { font-size: 4rem; display: block; margin-bottom: 1rem; }
.tb-plugin-notice h2 { font-family: var(--font-head); color: var(--navy); margin-bottom: .5rem; }
.tb-plugin-notice p { color: #555555; font-size: .95rem; line-height: 1.6; }

/* ── Game Page Layout ─────────────────────────────────────────── */
.tb-game-page { background: var(--sky-light, #D6F0FB); }

.tb-game-hero {
    background: var(--navy);
    color: white;
    text-align: center;
    padding: 20px 32px 18px;
    margin: 20px 20px 0;
    border-radius: 28px;
    border: 4px solid var(--orange);
}
.tb-game-hero h1 {
    font-family: var(--font-head);
    font-size: 1.8rem;
    margin: 0;
}
.tb-game-back {
    display: inline-block;
    font-size: .8rem;
    font-weight: 700;
    color: rgba(255,255,255,0.6);
    text-decoration: none;
    margin-bottom: 6px;
}
.tb-game-back:hover { color: var(--orange); }

.tb-game-container {
    margin: 16px 20px 24px;
    border-radius: 24px;
    overflow: visible;
    box-shadow: 0 8px 40px rgba(0,0,0,0.2);
}

/* Ensure game wrap fills container and doesn't burst out */
.tby-game-wrap {
    width: 100%;
    display: block;
    position: relative;
}
.tby-game-iframe {
    display: block;
    width: 100%;
    min-height: 700px;
    height: auto;
    border: none;
    border-radius: 24px;
}
@media (max-width: 768px) {
    .tby-game-iframe { min-height: 560px; }
}
@media (max-width: 480px) {
    .tby-game-iframe { min-height: 480px; }
}


/* ═══════════════════════════════════════════════════════════════
   TBY v2 AESTHETIC OVERRIDES — muddy paw print redesign
   All rules below override the base theme above.
   ═══════════════════════════════════════════════════════════════ */

/* =============================================================================
   Tootie's Backyard — theme.css
   Muddy paw print aesthetic. Rambunctious. Adventured-in. Not a classroom poster.
   ============================================================================= */

/* ── TOKENS ─────────────────────────────────────────────────────────────────── */
:root {
  --tb-sky:        #97CCE8;
  --tb-green:      #3D6B2C;
  --tb-green-mid:  #3D6B2C;
  --tb-orange:     #8B5A2B;
  --tb-yellow:     #FFDE00;
  --tb-yellow-dk:  #FFDE00;
  --tb-yellow-border: #FFDE00;
  --tb-btn-ring: none;
  --tb-white:      #FFFFFF;
  --tb-off-white:  #FFFDF7;
  --tb-mud:        #8B5A2B;
  --tb-teal:       #3FAFA8;
  --tb-green-light: #8FC279;
  --tb-font-head:  'Fredoka One', cursive;
  --tb-font-hand:  'Mali', sans-serif;
  --tb-font-body:  'Mali', sans-serif;
  --tb-radius:     16px;
  --tb-radius-pill:50px;
}

/* ── RESET / BASE ────────────────────────────────────────────────────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

/* body rule consolidated above — duplicate removed */

img { max-width: 100%; height: auto; display: block; }
a { color: var(--tb-green); }
a:focus-visible { outline: 3px solid var(--tb-green, #3D6B2C); outline-offset: 3px; border-radius: 4px; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  z-index: 9999;
  background: var(--tb-green);
  padding: 0.5rem 1rem;
  min-height: 44px;
  border-radius: var(--tb-radius);
  font-weight: 800;
  font-size: 1rem;
  transition: top 0.2s;
  text-decoration: none;
  border: 3px solid var(--orange);
  touch-action: manipulation;
  color: var(--tb-white);
  font-family: 'Mali', Arial, sans-serif;
}
.skip-link:focus {
  top: 1rem;
  outline: 3px solid var(--orange);
  outline-offset: 3px;
}

/* ── SITE HEADER ─────────────────────────────────────────────────────────────── */
.tb-site-header {
  background: var(--tb-white);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 12px 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 3px solid var(--tb-orange);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
  gap: 16px;
}

/* LOGO — off-kilter, two lines */
.tb-site-logo {
  font-family: var(--tb-font-head);
  font-size: 22px;
  color: var(--tb-orange);
  text-decoration: none;
  display: inline-block;
  align-items: center;
  gap: 8px;
  line-height: 1.0;
  transform: rotate(-6deg);
  flex-shrink: 0;
}
.tb-site-logo .tb-logo-line2 {
  display: block;
  color: var(--tb-green);
  font-size: 26px;
  transform: rotate(4deg) translateX(10px);
}

/* NAV PILLS */
.tb-site-nav {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.tb-nav-pill {
  font-family: var(--tb-font-head);
  font-weight: 700;
  font-size: 14px;
  padding: 5px 14px;
  min-height: 44px;
  border-radius: var(--tb-radius-pill);
  border: 2.5px solid var(--tb-yellow-border);
  box-shadow: var(--tb-btn-ring);
  background: var(--tb-white);
  color: var(--tb-green);
  text-decoration: none;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  cursor: pointer;
  display: inline-block;
  line-height: 34px;
}
.tb-nav-pill:hover,
.tb-nav-pill:focus-visible,
.tb-nav-pill.active {
  background: var(--tb-yellow, #FFDE00);
  color: var(--tb-green);
  border-color: var(--tb-yellow, #FFDE00);
  box-shadow: none;
  font-weight: 700;
}
.tb-nav-pill.tb-cta { background: var(--tb-white); color: var(--tb-green, #3D6B2C); border-color: var(--tb-yellow-border); box-shadow: var(--tb-btn-ring); }
.tb-nav-pill.tb-cta:hover,
.tb-nav-pill.tb-cta:focus-visible { background: var(--tb-yellow, #FFDE00); color: var(--tb-green); border-color: var(--tb-yellow, #FFDE00); box-shadow: none; }

/* Nav stagger tilts */
.tb-site-nav .tb-nav-pill:nth-child(1) { transform: rotate(-1.5deg); }
.tb-site-nav .tb-nav-pill:nth-child(2) { transform: rotate(1deg); }
.tb-site-nav .tb-nav-pill:nth-child(3) { transform: rotate(-0.8deg); }
.tb-site-nav .tb-nav-pill:nth-child(4) { transform: rotate(1.2deg); }
.tb-site-nav .tb-nav-pill:nth-child(5) { transform: rotate(-1deg); }
.tb-site-nav .tb-nav-pill:nth-child(6) { transform: rotate(0.7deg); }
.tb-site-nav .tb-nav-pill:nth-child(7) { transform: rotate(-1.5deg); }

/* Mobile hamburger */
.tb-menu-toggle {
  display: none;
  background: none;
  border: 2.5px solid var(--tb-green);
  border-radius: 8px;
  color: var(--tb-green);
  font-size: 22px;
  padding: 6px 12px;
  cursor: pointer;
  font-weight: bold;
  min-height: 44px;
  min-width: 44px;
}

/* ── HERO ────────────────────────────────────────────────────────────────────── */
.tb-hero {
  background: var(--tb-sky);
  padding: 55px 40px 80px;
  position: relative;
  min-height: 460px;
  overflow: hidden;
  text-align: center;
}
.tb-hero::after {
  content: '';
  position: absolute;
  bottom: -2px; left: -10px; right: -10px;
  height: 36px;
  background: var(--tb-green-mid);
  clip-path: polygon(0% 50%, 5% 35%, 10% 25%, 15% 20%, 20% 22%, 25% 30%, 30% 42%, 35% 50%, 40% 45%, 45% 32%, 50% 20%, 55% 15%, 60% 18%, 65% 28%, 70% 40%, 75% 48%, 80% 42%, 85% 28%, 90% 18%, 95% 22%, 100% 32%, 100% 100%, 0% 100%);
  z-index: 5;
}


/* Paw print overlay */
.tb-paw-overlay {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  z-index: 3;
  pointer-events: none;
}

/* Hero content sits above paw prints */
.tb-hero-content { position: relative; z-index: 6; }

/* Homepage welcome box: intentionally lighter than the outer sky background. */
.tb-hero-panel {
  display: inline-block;
  background: #D6F0FB;
  border-radius: 20px;
  padding: 28px 44px 28px;
  transform: rotate(-0.8deg);
  margin-bottom: 28px;
  border: 3px solid #FFFFFF;
  max-width: 680px;
  width: 100%;
}

/* Three-line headline */
.tb-hero-headline { margin-bottom: 14px; }

/* Homepage hero H1 — visual appearance comes from child spans, not the h1 itself */
h1.tb-hero-headline {
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
  margin: 0;
  padding: 0;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: inherit;
}

.tb-hero-line1 {
  font-family: var(--tb-font-head);
  font-size: 38px;
  color: var(--tb-white);
  display: block;
  transform: rotate(-2deg) translateX(-8px);
  text-shadow: 2px 2px 0 rgba(0,0,0,0.15);
  margin-bottom: 2px;
}
.tb-hero-line2 {
  font-family: var(--tb-font-head);
  font-size: 60px;
  color: var(--tb-yellow);
  display: block;
  transform: rotate(1.5deg) translateX(4px);
  text-shadow: 2px 2px 0 rgba(0,0,0,0.12);
  line-height: 1.05;
}
.tb-hero-line3 {
  font-family: var(--tb-font-head);
  font-size: 66px;
  color: var(--tb-green);
  display: block;
  transform: rotate(-1deg) translateX(-4px);
  text-shadow: 2px 2px 0 rgba(0,0,0,0.1);
  line-height: 1.05;
}

.tb-hero-tagline {
  font-family: 'Mali', Arial, sans-serif;
  font-weight: 700;
  font-size: 19px;
  color: var(--tb-white);
  margin-bottom: 24px;
  display: block;
}

.tb-hero-btns {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  position: relative;
  margin-bottom: 40px;
}

/* Buttons */
.tb-btn {
  display: inline-block;
  font-family: var(--tb-font-head);
  font-weight: 800;
  font-size: 20px;
  padding: 12px 32px;
  border-radius: var(--tb-radius-pill);
  border: none;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.1s, box-shadow 0.1s;
  text-align: center;
  min-height: 44px;
  line-height: 1.3;
}
.tb-btn:hover,
.tb-btn:active {
  background: var(--tb-yellow) !important;
  color: var(--tb-green) !important;
  border-color: var(--tb-yellow-border) !important;
  box-shadow: none;
}
.tb-btn-primary {
  background: var(--tb-white);
  color: var(--tb-green);
  border: 3px solid var(--tb-yellow-border);
  transform: rotate(-1.5deg);
}
.tb-btn-secondary {
  background: var(--tb-white);
  color: var(--tb-green);
  border: 3px solid var(--tb-yellow-border);
  box-shadow: var(--tb-btn-ring);
  transform: rotate(1deg);
}

/* Tootie intro card */
.tb-tootie-card {
  background: rgba(139,90,43,0.92);
  border: 2.5px solid rgba(255,255,255,0.3);
  border-radius: var(--tb-radius);
  padding: 20px 28px;
  max-width: 600px;
  margin: 0 auto;
  transform: rotate(-1.2deg);
  text-align: left;
}
.tb-tootie-card h2 {
  font-family: var(--tb-font-head);
  font-size: 22px;
  color: var(--tb-yellow);
  margin-bottom: 8px;
}
.tb-tootie-card p {
  font-family: var(--tb-font-body);
  font-size: 17px;
  color: var(--tb-white);
  line-height: 1.6; font-weight: 600;}

/* ── CONTENT SECTIONS ────────────────────────────────────────────────────────── */
.tb-content-section {
  background: var(--tb-white);
  padding: 48px 40px 56px;
  position: relative;
}
.tb-section-eyebrow {
  font-family: 'Mali', Arial, sans-serif;
  font-weight: 700;
  font-size: 13px;
  color: var(--tb-orange);
  text-transform: uppercase;
  letter-spacing: 2px;
  transform: rotate(-1deg);
  display: inline-block;
  margin-bottom: 4px;
}
.tb-section-title {
  font-family: var(--tb-font-head);
  font-size: 34px;
  color: var(--tb-green);
  margin: 48px 0 20px;
  display: inline-block;
  align-items: center;
  gap: 10px;
  margin-bottom: 28px;
  transform: rotate(0.5deg);
}

/* ── CARDS GRID ──────────────────────────────────────────────────────────────── */
.tb-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.tb-card {
  background: var(--tb-white);
  border-radius: var(--tb-radius);
  border: 3px solid var(--tb-green);
  padding: 18px;
  text-decoration: none;
  color: inherit;
  display: block;
  transition: transform 0.15s, box-shadow 0.15s;
}
.tb-card:hover {
  box-shadow: 4px 4px 0 var(--tb-green);
}
.tb-cards-grid .tb-card:nth-child(1) { transform: rotate(-1.2deg); }
.tb-cards-grid .tb-card:nth-child(2) { transform: rotate(0.8deg); margin-top: 10px; }
.tb-cards-grid .tb-card:nth-child(3) { transform: rotate(-0.5deg); margin-top: -5px; }
.tb-cards-grid .tb-card:nth-child(4) { transform: rotate(1deg); }
.tb-cards-grid .tb-card:nth-child(5) { transform: rotate(-0.7deg); margin-top: 8px; }
.tb-cards-grid .tb-card:nth-child(6) { transform: rotate(0.5deg); margin-top: -3px; }

.tb-card-img {
  background: var(--tb-sky);
  border-radius: 10px;
  height: 160px;
  margin-bottom: 12px;
  overflow: hidden;
}
.tb-card-img img { width: 100%; height: 100%; object-fit: cover; }
.tb-card h3 {
  font-family: var(--tb-font-head);
  font-size: 18px;
  color: var(--tb-green);
  margin-bottom: 5px;
}
.tb-card p {
  font-family: var(--tb-font-body);
  font-size: 14px;
  color: #555555;
  line-height: 1.5; font-weight: 600;}

/* ── FRIEND CARDS (CPT archive) ──────────────────────────────────────────────── */
.tb-friend-emoji { font-size: 48px; text-align: center; margin-bottom: 8px; }
.tb-friend-card h2 {
  font-family: var(--tb-font-head);
  font-size: 20px;
  color: var(--tb-green);
  margin-bottom: 4px;
}
.tb-tag {
  display: inline-block;
  font-family: 'Mali', Arial, sans-serif;
  font-weight: 700;
  font-size: 12px;
  background: var(--tb-sky);
  color: var(--tb-green);
  border-radius: 20px;
  padding: 2px 10px;
  margin: 2px 2px 0 0;
}

/* ── SINGLE FRIEND PAGE ──────────────────────────────────────────────────────── */
.tb-friend-hero h1 {
  font-family: var(--tb-font-head);
  font-size: 52px;
  color: var(--tb-green);
  margin-bottom: 8px;
}
.tb-friend-scientific {
  font-family: 'Mali', Arial, sans-serif;
  font-weight: 700;
  font-size: 18px;
  color: var(--tb-green);
  font-style: italic;
  opacity: 0.7;
}
.tb-fact-chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 16px; }
.tb-fact-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.6);
  border: 1.5px solid rgba(45,74,30,0.3);
  border-radius: 20px;
  padding: 4px 14px;
  font-family: 'Mali', Arial, sans-serif;
  font-weight: 700;
  font-size: 14px;
  color: var(--tb-green);
  font-weight: 600;
}
.tb-friend-body { padding: 48px 40px; max-width: 800px; margin: 0 auto; }
.tb-friend-body h2 {
  font-family: var(--tb-font-head);
  font-size: 28px;
  color: var(--tb-green);
  margin: 32px 0 12px;
}
.tb-friend-body p {
  font-size: 16px;
  line-height: 1.7;
  margin-bottom: 16px;
}
.tb-grandma-tip {
  background: rgba(45,74,30,0.08);
  border-left: 4px solid var(--tb-green);
  border-radius: 0 var(--tb-radius) var(--tb-radius) 0;
  padding: 16px 20px;
  font-family: 'Mali', Arial, sans-serif;
  font-weight: 700;
  font-size: 17px;
  margin: 24px 0;
}
.tb-fun-fact {
  background: var(--tb-sky);
  border-radius: var(--tb-radius);
  padding: 16px 20px;
  font-family: 'Mali', Arial, sans-serif;
  font-weight: 700;
  font-size: 17px;
  margin: 24px 0;
}

/* ── SOUND BUTTON ────────────────────────────────────────────────────────────── */
.tb-sound-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--tb-font-head);
  font-size: 16px;
  background: var(--tb-green);
  color: var(--tb-white);
  border: none;
  border-radius: var(--tb-radius-pill);
  padding: 10px 22px;
  cursor: pointer;
  margin-top: 12px;
  min-height: 44px;
}
.tb-sound-btn:hover { background: #3D6B2C; }

/* ── SEARCH & ARCHIVE ────────────────────────────────────────────────────────── */
.tb-archive-header {
  background: var(--tb-sky);
  padding: 40px 40px 32px;
  text-align: center;
}
.tb-archive-header h1 {
  font-family: var(--tb-font-head);
  font-size: 48px;
  color: var(--tb-green);
  margin-bottom: 16px;
}
.tb-search-bar {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.tb-search-input {
  flex: 1;
  min-width: 280px;
  padding: 10px 20px;
  font-family: 'Mali', Arial, sans-serif;
  font-weight: 700;
  font-size: 16px;
  border: 2.5px solid var(--tb-yellow-border);
  box-shadow: var(--tb-btn-ring);
  border-radius: var(--tb-radius-pill);
  outline: none;
  min-height: 44px;
  background: white;
  color: var(--navy);
  touch-action: manipulation;
}
.tb-search-input:focus { border-color: var(--tb-orange); }
.tb-filter-pills { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.tb-filter-pill {
  font-family: 'Mali', Arial, sans-serif;
  font-weight: 700;
  font-size: 14px;
  border: 2px solid var(--tb-green);
  border-radius: var(--tb-radius-pill);
  padding: 5px 14px;
  background: var(--tb-white);
  cursor: pointer;
  transition: background 0.15s;
  min-height: 44px;
}
.tb-filter-pill.active,
.tb-filter-pill:hover { background: var(--tb-green); color: var(--tb-white); }

/* ── PAGINATION ──────────────────────────────────────────────────────────────── */
.tb-pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 48px;
  padding-top: 24px;
  border-top: 3px solid var(--sky-light);
  text-align: center;
  padding: 32px;
}
.tb-pagination ul { list-style: none; display: inline-flex; gap: 8px; }
.tb-pagination a, .tb-pagination span {
  font-family: var(--tb-font-head);
  font-size: 16px;
  border: 2.5px solid var(--tb-green);
  border-radius: var(--tb-radius-pill);
  padding: 6px 16px;
  text-decoration: none;
  color: var(--tb-green);
  display: inline-block;
  min-height: 44px;
  line-height: 28px;
}
.tb-pagination .current, .tb-pagination a:hover { background: var(--tb-green); color: var(--tb-white); }

/* ── STORY CARDS ─────────────────────────────────────────────────────────────── */
.tb-story-card h3 { font-family: var(--tb-font-head); font-size: 20px; color: var(--tb-green); margin-bottom: 6px; }
.tb-story-card p { font-family: var(--tb-font-body); font-size: 14px; color: #555555; font-weight: 600;}

/* ── ACTIVITY CARDS ──────────────────────────────────────────────────────────── */
.tb-activity-card {
  background: var(--tb-white);
  border: 3px solid var(--tb-green);
  border-radius: var(--tb-radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.2s, box-shadow 0.2s;
  display: block;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  padding: 20px;
}
.tb-activity-card h3 { font-family: var(--tb-font-head); font-size: 20px; color: var(--tb-green); margin-bottom: 8px; }
.tb-activity-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }

/* ── 404 ─────────────────────────────────────────────────────────────────────── */
.tb-404-wrap {
  text-align: center;
  padding: 80px 40px;
}
.tb-404-emoji { font-size: 80px; margin-bottom: 20px; }
.tb-404-wrap h2 { font-family: var(--tb-font-head); font-size: 40px; color: var(--tb-green); margin-bottom: 12px; }

/* ── SAFETY CALLOUT ──────────────────────────────────────────────────────────── */
.tb-safety-callout {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  background: var(--tb-green);
  border: 5px solid var(--red);
  border-radius: var(--radius-lg);
  padding: 40px;
  margin: 0 0 20px;
  min-width: 0;
  overflow-wrap: break-word;
  word-break: break-word;
  color: var(--tb-white);
  text-align: center;
}
.tb-safety-callout blockquote {
  font-family: 'Mali', Arial, sans-serif;
  font-weight: 700;
  font-size: 20px;
  line-height: 1.6;
  max-width: 700px;
  margin: 0 auto;
  font-style: italic;
}
.tb-safety-callout cite {
  display: block;
  font-family: var(--tb-font-head);
  font-size: 16px;
  margin-top: 12px;
  font-style: normal;
  color: var(--tb-yellow);
}

/* Golden Rule: accessible sunny-yellow treatment.
   Dark green on #FFDE00 = 6.06:1 contrast, clearing WCAG AA for normal text. */
.tb-safety-callout {
  background: #FFDE00;
  border-color: #3D6B2C;
  color: #3D6B2C;
}
.tb-safety-callout h2,
.tb-safety-callout p,
.tb-safety-callout blockquote,
.tb-safety-callout cite {
  color: #3D6B2C;
}

/* ── GRANDMA QUOTE ───────────────────────────────────────────────────────────── */
.tb-grandma-quote {
  background: var(--tb-off-white);
  border-left: 6px solid var(--tb-orange);
  padding: 24px 28px;
  border-radius: 0 var(--tb-radius) var(--tb-radius) 0;
  margin: 32px 0;
}
.tb-grandma-quote p {
  font-family: var(--tb-font-body);
  font-size: 18px;
  line-height: 1.6;
  font-style: italic;
  color: var(--tb-green); font-weight: 600;}

/* ── RESPONSIVE ──────────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .tb-site-header { flex-wrap: wrap; padding: 12px 16px; }
  .tb-menu-toggle { display: block; }
  .tb-site-nav {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    padding-top: 12px;
  }
  .tb-site-nav.open { display: flex; }
  .tb-nav-pill { text-align: center; transform: none !important; }

  .tb-hero { padding: 36px 20px 60px; min-height: auto; }
  .tb-hero-panel { padding: 20px 20px 20px; }
  .tb-hero-line1 { font-size: 28px; }
  .tb-hero-line2 { font-size: 44px; }
  .tb-hero-line3 { font-size: 48px; }
  .tb-hero-btns { flex-direction: column; align-items: center; }

  .tb-tootie-card { transform: none; }

  .tb-content-section { padding: 32px 20px 40px; }
  .tb-cards-grid { grid-template-columns: 1fr; }
  .tb-cards-grid .tb-card { transform: none !important; margin-top: 0 !important; }

  .tb-footer-inner { grid-template-columns: 1fr; gap: 20px; }
  .tb-site-footer { padding: 32px 20px 20px; }

  .tb-archive-header { padding: 28px 20px; }
  .tb-friend-body { padding: 32px 20px; }
}

@media (max-width: 360px) {
  .tb-hero-line2 { font-size: 36px; }
  .tb-hero-line3 { font-size: 40px; }
}

/* ── COMPATIBILITY ALIASES (existing template class names → new tokens) ─────── */

/* Layout */
.tb-container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
  padding-left: clamp(12px, 4vw, 40px);
  padding-right: clamp(12px, 4vw, 40px);
}
.tb-two-col {
  display: grid;
  gap: 40px;
  align-items: flex-start;
  grid-template-columns: 1fr 320px;
  padding: 48px 0;
}
.tb-two-col-main {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 32px;
  align-items: start;
}

@media (max-width: 768px) {
  .tb-two-col { grid-template-columns: 1fr; }
}

/* Page hero (used on archives and inner pages) */
.tb-page-hero {
  background: var(--tb-sky);
  color: white;
  text-align: center;
  padding: 48px 40px 56px;
  border-radius: 48px;
  border: 5px solid var(--orange);
  margin: 32px 24px 40px;
  position: relative;
  overflow: hidden;
}
.tb-page-hero h1 {
  font-family: var(--tb-font-head);
  font-size: 48px;
  margin: 0 0 12px;
  position: relative;
  color: var(--tb-green);
  margin-bottom: 12px;
}
.tb-page-hero p {
  font-size: 18px;
  color: var(--tb-green);
  margin: 0 auto;
  font-family: var(--tb-font-body);
  position: relative;
  opacity: .9;
  font-weight: 600;
  max-width: 600px;
}
.tb-emoji-hero {
  font-size: 80px;
  margin-bottom: 12px;
}

/* Buttons — old names */
.tb-btn-navy, .tb-btn-primary-alt {
  background: var(--tb-yellow, #FFDE00);
  color: var(--tb-green);
  border: none;
  border-bottom: 4px solid #3D6B2C;
}
.tb-btn-navy:hover {
  background: #FFDE00;
  color: var(--tb-green);
}
.tb-btn-orange {
  background: var(--tb-white);
  color: var(--tb-green);
  border: 3px solid var(--tb-yellow-border);
  box-shadow: var(--tb-btn-ring);
}
.tb-btn-orange:hover {
  background: var(--tb-yellow);
  border-color: var(--tb-yellow, #FFDE00);
  color: var(--tb-green);
}
.tb-btn-outline {
  background: var(--tb-white);
  color: var(--tb-green);
  border: 2.5px solid var(--tb-yellow-border);
  box-shadow: var(--tb-btn-ring);
}
.tb-btn-outline:hover {
  background: var(--tb-yellow, #FFDE00);
  border-color: var(--tb-yellow, #FFDE00);
  color: var(--tb-green);
}
.tb-btn-teal {
  background: var(--tb-white);
  color: var(--tb-green);
  border: 3px solid var(--tb-yellow-border);
}
.tb-btn-teal:hover {
  background: var(--tb-yellow);
  border-color: var(--tb-yellow, #FFDE00);
  color: var(--tb-green);
}
.tb-btn-green {
  background: var(--tb-white);
  color: var(--tb-green);
  border: 3px solid var(--tb-yellow-border);
  box-shadow: var(--tb-btn-ring);
}
.tb-btn-green:hover {
  background: var(--tb-yellow, #FFDE00);
  border-color: var(--tb-yellow, #FFDE00);
  color: var(--tb-green);
}

/* Type tags */
.tb-type-tag {
  display: inline-block;
  font-family: 'Mali', Arial, sans-serif;
  font-weight: 700;
  font-size: 13px;
  padding: 3px 12px;
  border-radius: 20px;
  background: var(--navy);
  color: white;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}
.tb-tag-bird {
  background: var(--tb-sky);
  color: var(--tb-green);
}
.tb-tag-mammal  { background: #CCCCCC;            color: #D32F2F; }
.tb-tag-bug     { background: #FFDE00;            color: #3D6B2C; }
.tb-tag-frog-reptile { background: #8FC279;       color: #3D6B2C; }

/* Friend hero */
@media (max-width: 768px) {
  .tb-friend-hero { grid-template-columns: 1fr; text-align: center; }
}
.tb-friend-hero-image {
  flex-shrink: 0;
  width: 220px;
  min-height: 80px;
  font-size: 120px;
  line-height: 1;
  text-align: center;
}
.tb-sci-name {
  font-family: 'Mali', Arial, sans-serif;
  font-weight: 700;
  font-style: italic;
  color: var(--tb-green);
  font-size: 17px;
  margin: 0 0 12px;
  opacity: 0.7;
  margin-bottom: 12px;
}
.tb-friend-stats p { font-family: var(--tb-font-body); font-size: 15px; margin-bottom: 5px; font-weight: 600;}

/* Fun fact box */
.tb-fun-fact-box {
  background: var(--tb-sky);
  color: var(--navy);
  border: 4px solid var(--tb-green);
  border-radius: var(--tb-radius);
  padding: 20px 24px;
  margin: 24px 0;
  position: relative;
  display: flex;
  gap: 16px;
  align-items: flex-start;
}
.tb-ff-icon {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--green-lt);
  border: 2px solid var(--green);
  border-radius: 50px;
  padding: 6px 14px;
  font-family: var(--font-body);
  font-size: 32px;
  font-weight: 600;
  color: #3D6B2C;
  flex-shrink: 0;
}
.tb-fun-fact-box h2 { font-family: var(--tb-font-head); font-size: 20px; color: var(--tb-green); margin-bottom: 6px; }
.tb-fun-fact-box p { font-family: var(--tb-font-body); font-size: 16px; font-weight: 600;}

/* Safety callout (sidebar widget version) */
.tb-safety-callout.widget-style {
  background: var(--tb-green);
  color: var(--tb-white);
  padding: 20px;
  border-radius: var(--tb-radius);
  display: flex;
  gap: 12px;
}
.tb-sc-icon {
  font-size: 28px;
  flex-shrink: 0;
  line-height: 1;
}
.tb-safety-callout.widget-style h3 { font-family: var(--tb-font-head); font-size: 16px; color: var(--tb-yellow); margin-bottom: 6px; }
.tb-safety-callout.widget-style p { font-family: var(--tb-font-body); font-size: 14px; color: rgba(255,255,255,0.9); font-weight: 600;}

/* Sidebar widgets */
.tb-sidebar {
  width: clamp(220px, 28%, 300px);
  flex-shrink: 0;
  min-width: 0;
  padding-top: 8px;
}
.tb-widget {
  background: var(--tb-off-white);
  border: 3px solid var(--navy);
  border-radius: var(--tb-radius);
  padding: 20px;
  margin-bottom: 24px;
  box-shadow: var(--shadow);
}
.tb-widget-title {
  font-family: var(--tb-font-head);
  font-size: 18px;
  color: var(--tb-green);
  margin: 0 0 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--sky-light);
  margin-bottom: 12px;
}

/* Entry content */
.tb-entry-content h2 {
  font-size: 26px;
  font-family: var(--tb-font-head);
  color: var(--tb-green);
  margin: 28px 0 10px;
}
.tb-entry-content h3 {
  font-size: 20px;
  font-family: var(--tb-font-head);
  color: var(--tb-green);
  margin: 22px 0 8px;
}
.tb-entry-content p {
  margin-bottom: 14px;
  font-size: 16px;
  line-height: 1.7;
}

/* Sound player */
.tb-sound-player {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: white;
  border: 3px solid var(--teal);
  border-radius: 50px;
  padding: 10px 20px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.9rem;
  color: #3D6B2C;
  transition: all 0.15s;
  min-height: 44px;
  margin-top: 16px;
  cursor: pointer;
}
.tb-sound-player p { font-family: var(--tb-font-body); font-size: 15px; margin-bottom: 6px; font-weight: 600;}

/* Story spread */
@media (max-width: 600px) { .tb-story-pages-grid { grid-template-columns: 1fr; } }

/* Activities grid (archive) */
.tb-activities-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
  padding: 24px 0;
}
.tb-acts-band {
  border-radius: 20px;
  padding: 40px;
  margin: 2rem 0;
}
.tb-acts-band--indoors {
  background: #FFFDF7;
  border: 3px solid #97CCE8;
}
.tb-acts-band--outdoors {
  background: #FFFDF7;
  border: 3px solid #8FC279;
}
.tb-acts-band__hd {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.tb-acts-band__eyebrow {
  font-family: 'Mali', Arial, sans-serif;
  font-weight: 800;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--tb-green);
  margin-bottom: 4px;
}
.tb-acts-band--indoors .tb-acts-band__eyebrow {
  color: #3D6B2C;
}
.tb-acts-band--outdoors .tb-acts-band__eyebrow {
  color: #3D6B2C;
}
.tb-acts-band__title {
  font-family: var(--tb-font-head);
  font-size: 28px;
  color: var(--tb-green);
  margin: 0 0 .25rem;
  margin-bottom: 4px;
}
.tb-acts-band__sub {
  font-size: 15px;
  color: var(--tb-green);
  margin: 0;
  font-family: 'Mali', Arial, sans-serif;
  font-weight: 700;
}
.tb-acts-band__footer {
  margin-top: 1.75rem;
  text-align: center;
  padding-top: 24px;
}

/* Location page */
.loc-breadcrumb a {
  color: var(--tb-green);
  font-weight: 700;
  text-decoration: none;
}
.loc-map-section {
  background: transparent;
  border-bottom: none;
  padding: 0;
  position: sticky;
  top: 65px;
  z-index: 100;
  box-shadow: none;
}
.loc-map-inner {
  width: 100%;
  margin: 0;
  padding: 0;
  display: block;
  position: relative;
}
.loc-map-label {
  position: absolute;
  top: 14px;
  left: 20px;
  z-index: 10;
  font-family: 'Mali', Arial, sans-serif;
  font-weight: 700;
}
.loc-yah {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--zone-color);
  color: var(--zone-text, #fff);
  padding: 9px 18px;
  border-radius: 30px;
  font-family: 'Fredoka One',cursive;
  font-size: 14px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.22);
  font-weight: 700;
  white-space: nowrap;
}
.loc-yah-dot {
  width: 10px;
  height: 10px;
  background: white;
  border-radius: 50%;
  animation: yah-pulse 1.5s ease-in-out infinite;
  flex-shrink: 0;
}
.loc-zone-name {
  font-family: var(--tb-font-head);
  font-size: 18px;
  color: var(--tb-green);
  line-height: 1.2;
}
.loc-zone-name small {
  display: block;
  font-family: 'Mali', Arial, sans-serif;
  font-size: 12px;
  font-weight: 400;
  opacity: .55;
  margin-top: 2px;
  color: #555555;
}
.loc-map-svg-wrap {
  width: 100%;
  overflow-x: auto;
  overflow-y: visible;
}
.loc-backyard-map {
  width: 100%;
  max-width: 100%;
  height: auto;
  display: block;
  min-width: 480px;
  overflow: visible;
}
.loc-map-zone-group {
  cursor: pointer;
  transition: opacity 0.15s;
}
.loc-map-zone-group:hover {
  opacity: 0.85;
}
.loc-zone-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 12px 0 0;
  scrollbar-width: none;
  max-width: 1100px;
  margin: 0 auto;
  flex-wrap: wrap;
}
.loc-zone-tab {
  flex-shrink: 0;
  padding: 6px 16px;
  min-height: 44px;
  border-radius: 20px 20px 0 0;
  border: 2px solid transparent;
  border-bottom: none;
  font-family: 'Mali', Arial, sans-serif;
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  color: var(--tb-green);
  background: var(--tb-off-white);
  transition: background 0.15s;
  white-space: nowrap;
}
.loc-zone-tab:hover {
  background: var(--tb-sky);
}
.loc-zone-tab.current {
  background: var(--tb-white);
  border-color: currentColor;
  color: var(--zone-color);
  border-bottom: 2px solid var(--tb-white);
}
.loc-hero {
  background: var(--zone-color, var(--tb-sky));
  color: var(--zone-text, var(--tb-green));
  padding: 56px 40px 64px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.loc-hero h1 {
  font-family: var(--tb-font-head);
  font-size: 52px;
  text-shadow: 3px 3px 0 rgba(0,0,0,0.12);
  margin-bottom: 10px;
}
.loc-hero-tagline {
  font-size: 20px;
  opacity: .93;
  max-width: 560px;
  margin: 0 auto;
  font-weight: 700;
  font-family: 'Mali', Arial, sans-serif;
  font-weight: 700;
  margin-bottom: 8px;
}
.loc-hero-desc {
  font-size: 16px;
  opacity: 0.9;
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
  font-family: var(--tb-font-body);
  font-weight: 600;
}
.loc-hero-emoji {
  font-size: 72px;
  display: block;
  margin-bottom: 12px;
  filter: drop-shadow(0 4px 10px rgba(0,0,0,0.2));
}
.loc-hero-floaties {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
}
.loc-floaty {
  position: absolute;
  font-size: 28px;
  opacity: .22;
  animation: loc-float 6s ease-in-out infinite;
}
.loc-floaty:nth-child(1) { top: 15%; left: 8%;  animation-delay: 0s; }
.loc-floaty:nth-child(2) { top: 25%; right: 10%; animation-delay: 1.2s; }
.loc-floaty:nth-child(3) { top: 60%; left: 5%;  animation-delay: 0.6s; }
.loc-floaty:nth-child(4) { top: 55%; right: 8%; animation-delay: 1.8s; }
.loc-floaty:nth-child(5) { top: 80%; left: 20%; animation-delay: 2.4s; }
@keyframes loc-float { 0%,100% { transform: translateY(0) rotate(0deg); } 50% { transform: translateY(-12px) rotate(4deg); } }
@media (prefers-reduced-motion: reduce) { .loc-floaty { animation: none; } }
.loc-wave {
  display: block;
  margin-top: -2px;
  width: 100%;
}
.loc-content {
  max-width: 1000px;
  margin: 0 auto;
  padding: 40px 40px 80px;
  display: flex;
  flex-direction: column;
  gap: 56px;
}
.loc-sec-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}
.loc-sec-header h2 {
  font-family: var(--tb-font-head);
  font-size: 28px;
  color: var(--tb-green);
  white-space: nowrap;
}
.loc-sec-line {
  flex: 1;
  height: 3px;
  background: linear-gradient(90deg, var(--tb-sky), transparent);
  border-radius: 2px;
}
.loc-fauna-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
}
.loc-fauna-card {
  background: var(--tb-off-white);
  border: 2px solid transparent;
  border-radius: var(--tb-radius);
  padding: 16px;
  text-align: center;
  box-shadow: 4px 4px 0 var(--navy,#3D6B2C);
  transition: border-color 0.15s;
}
.loc-fauna-card:hover {
  transform: translate(-2px,-2px);
  box-shadow: 6px 6px 0 var(--navy,#3D6B2C);
  border-color: var(--tb-green);
}
.loc-fauna-emoji {
  font-size: 44px;
  display: block;
  margin-bottom: 8px;
}
.loc-fauna-emoji--empty { display: block; height: 32px; margin-bottom: 8px; }
.loc-fauna-card h3 {
  font-family: var(--tb-font-head);
  font-size: 16px;
  color: var(--tb-green);
  margin-bottom: 5px;
}
.loc-fauna-card p {
  font-size: 13px;
  line-height: 1.5;
  color: #555555;
  margin-bottom: 8px;
  font-family: var(--tb-font-body);
  font-weight: 600;
}
.loc-fauna-badge {
  display: inline-block;
  background: var(--tb-green);
  color: var(--tb-white);
  font-size: 12px;
  font-weight: 800;
  padding: 2px 10px;
  border-radius: 20px;
  font-family: 'Mali', Arial, sans-serif;
}
.loc-flora-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
}
.loc-flora-card {
  background: var(--tb-off-white);
  border: 3px solid #3D6B2C;
  border-radius: var(--tb-radius);
  padding: 14px;
  text-align: center;
  box-shadow: 3px 3px 0 #3D6B2C;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.loc-flora-emoji {
  font-size: 32px;
  display: block;
  margin-bottom: 4px;
  flex-shrink: 0;
}
.loc-flora-card h3 {
  font-family: var(--tb-font-head);
  font-size: 15px;
  color: var(--tb-green);
  margin-bottom: 3px;
  width: 100%;
}
.loc-flora-card p {
  font-size: 13px;
  line-height: 1.45;
  color: #555555;
  font-family: var(--tb-font-body);
  font-weight: 600;
  word-break: normal;
  overflow-wrap: break-word;
  width: 100%;
  margin: 0;
}
.loc-story {
  background: var(--tb-off-white);
  border-radius: var(--tb-radius);
  padding: 28px;
  color: white;
  position: relative;
  overflow: hidden;
}
.loc-story-header {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 16px;
}
.loc-grandma-avatar {
  width: 62px;
  height: 62px;
  background: var(--sand,#FFDE00);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  border: 4px solid var(--orange,var(--tb-yellow-border));
  box-shadow: var(--tb-btn-ring);
  flex-shrink: 0;
}
.loc-grandma-avatar--empty { background:#FFFDF7; border: 3px solid var(--tb-green, #3D6B2C); }
.loc-story-header h2 {
  font-family: var(--tb-font-head);
  font-size: 24px;
  color: var(--tb-green);
  margin-bottom: 4px;
}
.loc-story-header p {
  font-size: 14px;
  opacity: .65;
  margin-top: 2px;
  font-family: var(--tb-font-body);
  font-weight: 600;
  color: #555555;
}
.loc-story-body {
  font-family: var(--tb-font-body);
  font-size: 16px;
  line-height: 1.7;
  color: #555555;
  max-width: 720px;
  font-weight: 600;
  margin-bottom: 16px;
}
.loc-story-body p { margin-bottom: 12px; }
.loc-story-quote {
  margin: 16px 0 0;
  padding: 18px 26px;
  border-left: 4px solid var(--tb-orange);
  background: rgba(255,255,255,0.07);
  border-radius: 0 18px 18px 0;
  font-family: 'Mali', Arial, sans-serif;
  font-weight: 700;
  font-size: 17px;
  color: var(--tb-green);
  font-style: italic;
  padding-left: 16px;
}
.loc-act-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 18px;
}
.loc-act-card {
  background: var(--tb-white);
  border: 2.5px solid var(--tb-green);
  border-radius: var(--tb-radius);
  padding: 20px;
  box-shadow: 0 6px 14px rgba(0,0,0,.10);
  transition: transform .2s,box-shadow .2s;
}
.loc-act-num {
  background: var(--navy,#3D6B2C);
  color: var(--tb-orange);
  font-family: var(--tb-font-head);
  font-size: 32px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
  line-height: 1;
}
.loc-act-tag {
  display: inline-block;
  background: var(--tb-sky);
  color: var(--tb-green);
  font-size: 12px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 20px;
  margin-right: 4px;
  font-family: 'Mali', Arial, sans-serif;
  font-weight: 700;
  margin-bottom: 8px;
}
.loc-act-card h3 {
  font-family: var(--tb-font-head);
  font-size: 17px;
  color: var(--tb-green);
  margin-bottom: 6px;
}
.loc-act-card p {
  font-size: 14px;
  line-height: 1.6;
  color: #555555;
  margin-bottom: 14px;
  font-family: var(--tb-font-body);
  font-weight: 600;
}
.loc-act-btn {
  display: inline-block;
  margin-top: 12px;
  background: var(--tb-white);
  color: var(--tb-green);
  border: 2.5px solid var(--tb-yellow-border);
  box-shadow: var(--tb-btn-ring);
  padding: 9px 20px;
  border-radius: 50px;
  font-family: var(--tb-font-head);
  font-size: 14px;
  text-decoration: none;
  transition: background 0.15s;
  font-weight: 700;
}
.loc-act-btn:hover {
  background: var(--tb-yellow, #FFDE00);
  border-color: var(--tb-yellow, #FFDE00);
  text-decoration: none;
}
.loc-cta {
  background: var(--tb-green);
  border-radius: var(--tb-radius);
  padding: 36px 32px;
  text-align: center;
  color: var(--tb-white);
  border: 5px solid var(--navy,#3D6B2C);
  margin-top: 40px;
}
.loc-cta h2 {
  font-family: var(--tb-font-head);
  font-size: 28px;
  margin-bottom: 10px;
  text-shadow: 2px 2px 0 rgba(0,0,0,0.12);
  color: var(--tb-white);
}
.loc-cta p {
  font-size: 16px;
  max-width: 480px;
  margin: 0 auto 22px;
  opacity: .95;
  font-family: var(--tb-font-body);
  font-weight: 600;
  color: rgba(255,255,255,0.85);
  margin-bottom: 20px;
}
.loc-cta-btns {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}
.loc-cta-btn {
  background: white;
  color: var(--tb-green);
  padding: 10px 24px;
  border-radius: var(--tb-radius-pill);
  font-family: var(--tb-font-head);
  font-size: 16px;
  text-decoration: none;
  border: 3px solid var(--tb-yellow-border);
  box-shadow: var(--tb-btn-ring);
  transition: transform .15s, background .15s;
}
.loc-cta-btn:hover {
  background: var(--tb-yellow);
  border-color: var(--tb-yellow, #FFDE00);
}
.loc-cta-btn.sec {
  background: rgba(255,255,255,0.15);
  color: var(--tb-white);
  border: 2px solid rgba(255,255,255,0.4);
  border-bottom: none;
}
.loc-map-pin {
  /* No CSS animation — SVG transform handles positioning */
}
@keyframes loc-pin-bounce { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
@media (prefers-reduced-motion: reduce) { .loc-map-pin { animation: none; } }

/* Breadcrumb */
.loc-breadcrumb {
  width: 100%;
  box-sizing: border-box;
  margin: 0;
  padding: 10px 40px;
  font-size: 14px;
  opacity: .7;
  font-family: 'Mali', Arial, sans-serif;
  font-weight: 700;
  background: var(--tb-off-white);
  color: #555555;
}

/* Search form */
.search-form { display: flex; gap: 10px; flex-wrap: wrap; margin: 16px 0; }
.search-field { font-family: 'Mali', Arial, sans-serif; font-weight: 700; font-size: 16px; border: 2.5px solid var(--tb-green); border-radius: var(--tb-radius-pill); padding: 10px 20px; flex: 1; min-width: 200px; }
.search-submit { font-family: var(--tb-font-head); font-size: 16px; background: var(--tb-yellow, #FFDE00); color: var(--tb-green); border: none; border-radius: var(--tb-radius-pill); padding: 10px 24px; cursor: pointer; min-height: 44px; }

/* No results */
.tb-no-results-wrap {
  text-align: center;
  padding: 60px 40px;
}
.tb-no-results-emoji {
  font-size: 72px;
  display: block;
  margin-bottom: 16px;
}
.tb-no-results-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 20px;
}

/* Post nav */
.tb-post-nav {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 40px;
  flex-wrap: wrap;
  border-top: 3px solid var(--sky-light);
  padding-top: 24px;
}

/* Font hand utility */
.tb-font-hand { font-family: 'Mali', Arial, sans-serif; font-weight: 700; }

/* ── FRIEND HERO (updated) ───────────────────────────────────────────────────── */
.tb-friend-hero {
  display: flex;
  gap: 40px;
  align-items: flex-start;
  margin-bottom: 40px;
  flex-wrap: wrap;
  background: var(--tb-sky);
  padding: 48px 40px 56px;
  text-align: center;
  position: relative;
  grid-template-columns: 180px 1fr;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}
.tb-friend-hero-img {
  flex-shrink: 0;
  width: 320px;
  border-radius: var(--tb-radius);
  overflow: hidden;
  border: 3px solid var(--tb-green);
}
.tb-friend-hero-img img { width: 100%; height: auto; display: block; }
.tb-friend-hero-emoji {
  font-size: 120px;
  margin-bottom: 12px;
  text-align: center;
  line-height: 1;
  padding: 24px;
}
.tb-friend-hero-text {
  flex: 1;
  min-width: 240px;
}
.tb-friend-hero-text h1 {
  font-family: var(--tb-font-head);
  font-size: 48px;
  color: var(--tb-green);
  margin-bottom: 6px;
}

@media (max-width: 768px) {
  .tb-friend-hero { grid-template-columns: 1fr; text-align: center; }
  .tb-friend-hero-img { max-width: 280px; margin: 0 auto; }
}

/* ── FLIPBOOK ────────────────────────────────────────────────────────────────── */


/* Tab spine — scrollable row of page tabs */


/* The book itself */

/* Individual page */
.tb-flipbook-page.active, .tb-flipbook-page:not([hidden]) { display: block; }



.tb-flipbook-page h2 {
  font-family: var(--tb-font-head);
  font-size: 32px;
  color: var(--tb-green);
  margin-bottom: 16px;
}



/* Page color accents */
.tb-flipbook-page--funfact .tb-flipbook-page-icon { color: var(--tb-yellow); }
.tb-flipbook-page--funfact { background: #FFDE00; }
.tb-flipbook-page--grandma { background: linear-gradient(135deg, rgba(45,74,30,0.06) 0%, transparent 60%); }
.tb-flipbook-page--ngss    { background: linear-gradient(135deg, rgba(151,204,232,0.12) 0%, transparent 60%); }

/* Navigation */

/* Page turn animation */
@keyframes tb-page-in {
  from { opacity: 0; transform: translateX(12px); }
  to   { opacity: 1; transform: translateX(0); }
}
@media (prefers-reduced-motion: reduce) {
  .tb-flipbook-page.active { animation: none; }
}

@media (max-width: 600px) {
  .tb-flipbook { padding: 24px 16px; }
  .tb-flipbook-book { padding: 24px 20px 20px; }
  .tb-flipbook-page h2 { font-size: 26px; }
  .tb-flipbook-page-content { font-size: 16px; }
  .tb-flipbook-tab { font-size: 12px; padding: 6px 10px; }
  .tb-flipbook-tab-label { display: none; }
  .tb-flipbook-tab-icon { font-size: 18px; }
}

/* ── CSS VARIABLE ALIASES (old template names → new tokens) ─────────────────── */
:root {
  --font-hand:    'Mali', Arial, sans-serif;
  font-weight: 700;
  --font-display: var(--tb-font-head);
  --font-body:    var(--tb-font-body);
  --color-green:  var(--tb-green);
  --color-orange: var(--tb-orange);
  --color-sky:    var(--tb-sky);
  --color-yellow: var(--tb-yellow);
  --color-white:  var(--tb-white);
}

/* ── STORY READER ────────────────────────────────────────────────────────────── */
.tb-story-reader {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 760px;
  margin: 0 auto;
  padding: 8px 0;
}

.tb-story-spread {
  background: var(--tb-white);
  border: 3px solid var(--tb-green);
  border-radius: var(--tb-radius);
  padding: 32px 36px;
  box-shadow: var(--shadow);
  font-family: 'Mali', Arial, sans-serif;
  font-weight: 700;
  font-size: 1.15rem;
  line-height: 1.85;
  overflow: hidden;
  margin-bottom: 8px;
}
.tb-story-pages-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  border: 4px solid var(--navy);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: white;
  min-height: 300px;
}
.tb-story-pages-grid > div {
  padding: 28px 24px;
  font-family: 'Mali', Arial, sans-serif;
  font-weight: 700;
  font-size: 18px;
  line-height: 1.75;
  color: var(--tb-green);
}
.tb-story-pages-grid > div + div {
  border-left: 3px solid #FFDE00;
}
@media (max-width: 600px) {
  .tb-story-pages-grid { grid-template-columns: 1fr; }
  .tb-story-pages-grid > div + div { border-left: none; border-top: 3px solid #FFDE00; }
}

.tb-story-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 20px;
  flex-wrap: wrap;
}
.tb-story-nav .tb-btn-navy {
  background: var(--tb-white, #FFFFFF);
  color: var(--tb-green);
  border: 3px solid var(--tb-yellow-border);
  transition: background 0.15s, border-color 0.15s;
}
.tb-story-nav .tb-btn-navy:hover {
  background: var(--tb-yellow, #FFDE00);
  border-color: var(--tb-yellow, #FFDE00);
}

/* ── INDOOR/OUTDOOR HUB CARDS ────────────────────────────────────────────────── */
.tb-ih-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
  padding: 24px 0;
}
.tb-ih-card {
  background: #FFFDF7;
  border-radius: var(--tb-radius);
  border: 3px solid var(--tb-green);
  box-shadow: 0 3px 16px rgba(var(--card-rgb), .08);
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: transform 0.15s, box-shadow 0.15s;
  position: relative;
}
.tb-ih-card:hover {
  transform: rotate(-0.5deg) translateY(-2px);
  box-shadow: 4px 4px 0 var(--tb-green);
}
.tb-ih-card__emoji {
  font-size: 44px;
  line-height: 1;
}
.tb-ih-card__title {
  font-family: var(--tb-font-head);
  font-size: 18px;
  color: var(--tb-green);
  margin: 0;
  line-height: 1.25;
}
.tb-ih-card__desc {
  font-size: 14px;
  color: #555555;
  line-height: 1.6;
  margin: 0;
  flex: 1;
  font-family: 'Mali', Arial, sans-serif;
  font-weight: 700;
}
.tb-ih-meta-chip {
  background: var(--tb-sky);
  color: var(--tb-green);
  border-radius: 20px;
  padding: 2px 10px;
  font-size: 12px;
  font-weight: 700;
  font-family: 'Mali', Arial, sans-serif;
  font-weight: 700;
}
.tb-ih-card__btn {
  display: inline-block;
  align-items: center;
  justify-content: center;
  margin-top: 4px;
  padding: 8px 16px;
  min-height: 44px;
  color: var(--tb-green);
  border-radius: var(--tb-radius-pill);
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
  text-align: center;
  letter-spacing: .3px;
  touch-action: manipulation;
  font-family: var(--tb-font-head);
  background: var(--tb-white);
  border: 3px solid var(--tb-yellow-border);
  box-shadow: var(--tb-btn-ring);
  width: fit-content;
  transition: opacity 0.15s, transform 0.15s, background 0.15s, color 0.15s;
}
.tb-ih-card__btn:hover {
  background: var(--tb-yellow);
  border-color: var(--tb-yellow, #FFDE00);
  opacity: .88;
  transform: translateY(-1px);
  color: var(--tb-green);
  background: #FFDE00;
}

/* ── FRIENDS ARCHIVE ─────────────────────────────────────────────────────────── */
.tb-friends-archive-header {
  background: var(--tb-sky);
  padding: 48px 40px 40px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.tb-friends-archive-header::after {
  content: '';
  position: absolute;
  bottom: -2px; left: -10px; right: -10px;
  height: 28px;
  background: var(--tb-green-mid);
  clip-path: polygon(0% 50%, 5% 35%, 10% 25%, 15% 20%, 20% 22%, 25% 30%, 30% 42%, 35% 50%, 40% 45%, 45% 32%, 50% 20%, 55% 15%, 60% 18%, 65% 28%, 70% 40%, 75% 48%, 80% 42%, 85% 28%, 90% 18%, 95% 22%, 100% 32%, 100% 100%, 0% 100%);
  z-index: 5;
}
.tb-friends-archive-header h1 {
  font-family: var(--tb-font-head);
  font-size: 52px;
  color: var(--tb-green);
  margin-bottom: 8px;
  transform: rotate(-1deg);
  display: inline-block;
}
.tb-friends-archive-header p {
  font-family: var(--tb-font-body);
  font-size: 18px;
  color: var(--tb-green); font-weight: 600;}

.tb-friends-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
  padding: 40px;
}
.tb-friend-card {
  background: var(--tb-white);
  border: 3px solid var(--tb-green);
  border-radius: var(--tb-radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.15s, box-shadow 0.15s;
  display: block;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  padding: 18px;
}
.tb-friend-card:hover {
  transform: rotate(-1deg) translateY(-3px);
  box-shadow: 4px 4px 0 var(--tb-green);
}
.tb-friend-card-thumb {
  background: var(--tb-sky);
  height: 180px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.tb-friend-card-thumb img { width: 100%; height: 100%; object-fit: cover; }
.tb-friend-card-thumb-emoji { font-size: 72px; }
.tb-friend-card-body { padding: 16px; }
.tb-friend-card-body h2 { font-family: var(--tb-font-head); font-size: 20px; color: var(--tb-green); margin-bottom: 4px; }
.tb-friend-card-body p { font-family: var(--tb-font-body); font-size: 13px; color: #555555; font-weight: 600;}

/* ── STORIES ARCHIVE ─────────────────────────────────────────────────────────── */
.tb-stories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
  padding: 40px;
}
.tb-story-card {
  background: var(--tb-white);
  border-radius: var(--tb-radius);
  border: 3px solid var(--tb-green);
  padding: 0;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  display: block;
  transition: transform 0.15s, box-shadow 0.15s;
}
.tb-story-card:hover { transform: rotate(0.8deg) translateY(-3px); box-shadow: 4px 4px 0 var(--tb-green); }
.tb-story-cover {
  background: var(--tb-sky);
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 72px;
}
.tb-story-card-body {
  padding: 16px;
}
.tb-story-card-body h2 { font-family: var(--tb-font-head); font-size: 20px; color: var(--tb-green); margin-bottom: 6px; }
.tb-story-card-body p { font-family: var(--tb-font-body); font-size: 13px; color: #555555; font-weight: 600;}
.tb-story-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }

/* ── BREADCRUMB ──────────────────────────────────────────────────────────────── */
.tb-breadcrumb {
  background: var(--tb-off-white);
  border-bottom: 1px solid #3D6B2C;
  padding: 10px 40px;
  font-family: 'Mali', Arial, sans-serif;
  font-weight: 700;
  font-size: 14px;
  color: #555555;
}
.tb-breadcrumb a { color: var(--tb-green); text-decoration: none; }
.tb-breadcrumb a:hover { text-decoration: underline; }
.tb-breadcrumb-sep {
  color: #CCCCCC;
  font-size: .8rem;
  margin: 0 6px;
}

@media (max-width: 768px) {
  .tb-friends-grid,
  .tb-stories-grid { grid-template-columns: repeat(2, 1fr); padding: 20px; gap: 14px; }
  .tb-friends-archive-header { padding: 32px 20px 40px; }
  .tb-friends-archive-header h1 { font-size: 36px; }
}
@media (max-width: 480px) {
  .tb-friends-grid,
  .tb-stories-grid { grid-template-columns: 1fr; }
}

/* ── OUR HEROES PAGE (mh- classes) ──────────────────────────────────────────── */
.mh-page-hero {
  background: var(--tb-sky);
  color: #FFFFFF;
  text-align: center;
  padding: 56px 40px 64px;
  border-radius: 48px;
  border: 5px solid var(--tb-yellow-border);
  box-shadow: var(--tb-btn-ring);
  margin: 32px 24px;
  position: relative;
  overflow: hidden;
}
.mh-page-hero::after {
  content: '';
  position: absolute;
  bottom: -2px; left: -10px; right: -10px;
  height: 30px;
  background: var(--tb-green-mid);
  clip-path: polygon(0% 50%, 5% 35%, 10% 25%, 15% 20%, 20% 22%, 25% 30%, 30% 42%, 35% 50%, 40% 45%, 45% 32%, 50% 20%, 55% 15%, 60% 18%, 65% 28%, 70% 40%, 75% 48%, 80% 42%, 85% 28%, 90% 18%, 95% 22%, 100% 32%, 100% 100%, 0% 100%);
  z-index: 5;
}
.mh-page-hero h1 {
  font-family: var(--tb-font-head);
  font-size: 52px;
  margin: 0 0 12px;
  color: var(--tb-green);
  margin-bottom: 10px;
  transform: rotate(-1deg);
  display: inline-block;
}
.mh-page-hero p {
  font-family: var(--tb-font-body);
  font-size: 18px;
  margin: 0 auto;
  opacity: .9;
  font-weight: 600;
  color: var(--tb-green);
  max-width: 600px;
}

.mh-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 48px 40px 64px;
}

.mh-section {
  margin-bottom: 56px;
}

.mh-section-title {
  font-family: var(--tb-font-head);
  font-size: 32px;
  color: var(--tb-green);
  text-align: center;
  margin-bottom: 24px;
  transform: rotate(-0.5deg);
  display: inline-block;
}

/* Bio cards */
.mh-bio-card {
  display: grid;
  gap: 24px;
  align-items: start;
  background: var(--tb-white);
  border: 3px solid var(--tb-green);
  border-radius: var(--tb-radius);
  padding: 24px;
  margin-bottom: 20px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.07);
  grid-template-columns: 160px 1fr;
}
.mh-bio-card:nth-child(1) { transform: rotate(-0.8deg); }
.mh-bio-card:nth-child(2) { transform: rotate(0.6deg); }
.mh-bio-card:nth-child(3) { transform: rotate(-0.4deg); }
.mh-bio-avatar {
  width: 160px;
  height: 160px;
  flex-shrink: 0;
  background: #FFDE00;
  border-radius: 50%;
  border: 5px solid #3D6B2C;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 64px;
  overflow: hidden;
  text-align: center;
  line-height: 1;
}
.mh-role-tag {
  display: inline-block;
  background: var(--tb-sky);
  color: var(--tb-green);
  font-family: 'Mali', Arial, sans-serif;
  font-weight: 800;
  font-size: 12px;
  padding: 2px 12px;
  border-radius: 20px;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.mh-bio-body h2 {
  font-family: var(--tb-font-head);
  font-size: 28px;
  color: var(--tb-green);
  margin: 0 0 8px;
}
.mh-bio-body p {
  font-family: var(--tb-font-body);
  line-height: 1.6;
  margin: 0 0 12px;
  font-weight: 600;
  font-size: 16px;
  color: #000000;
  margin-bottom: 10px;
}
.mh-traits {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.mh-trait {
  background: var(--tb-off-white);
  border: 1.5px solid var(--tb-yellow-border);
  box-shadow: var(--tb-btn-ring);
  border-radius: 20px;
  padding: 3px 12px;
  font-family: 'Mali', Arial, sans-serif;
  font-weight: 700;
  font-size: 13px;
  color: var(--tb-green);
}

/* Owl Eyes Challenge box */
.mh-challenge-box {
  background: var(--tb-yellow);
  color: #FFFFFF;
  text-align: center;
  padding: 24px 28px;
  border-radius: var(--tb-radius);
  border: 4px solid var(--tb-yellow-border);
  box-shadow: var(--tb-btn-ring);
  margin: 40px 0;
  margin-bottom: 48px;
  transform: rotate(-0.5deg);
  border-bottom: 0;
}
.mh-challenge-box h2 {
  font-family: var(--tb-font-head);
  font-size: 24px;
  color: var(--tb-green);
  margin: 0 0 12px;
  margin-bottom: 8px;
}
.mh-challenge-box p {
  font-family: var(--tb-font-body);
  font-size: 17px;
  margin: 0;
  font-weight: 600;
  color: var(--tb-green);
  line-height: 1.6;
}

/* Map grid */
.mh-map-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.mh-map-zone {
  background: var(--tb-white);
  border-width: 4px;
  border-style: solid;
  border-radius: var(--tb-radius);
  padding: 20px;
  transition: transform 0.15s, box-shadow 0.15s;
  border: 3px solid var(--tb-green);
  text-decoration: none;
  color: inherit;
  display: block;
}
.mh-map-zone:hover { transform: rotate(-1deg) translateY(-3px); box-shadow: 4px 4px 0 var(--tb-green); }
.mh-map-zone h3 {
  font-family: var(--tb-font-head);
  font-size: 18px;
  margin: 0 0 8px;
  margin-bottom: 8px;
}
.mh-map-zone p {
  font-family: var(--tb-font-body);
  font-size: 14px;
  line-height: 1.5;
  margin: 0 0 10px;
  font-weight: 600;
  color: #000000;
  margin-bottom: 10px;
}
.mh-zone-explore {
  font-family: 'Mali', Arial, sans-serif;
  font-weight: 700;
  font-size: 13px;
  opacity: .7;
  font-weight: 700;
  color: var(--tb-green);
}

/* Neighbors grid */
.mh-neighbors-block {
  background: #FFFDF7;
  border: 3px solid #FFDE00;
  border-radius: 40px;
  padding: 36px;
  margin: 40px 0;
  text-align: center;
  margin-bottom: 48px;
}
.mh-neighbors-block h2 {
  font-family: var(--tb-font-head);
  font-size: 28px;
  color: var(--tb-green);
  margin: 0 0 20px;
  margin-bottom: 20px;
}
.mh-neighbor-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.mh-neighbor-tag {
  background: var(--tb-white);
  color: var(--tb-green);
  padding: 14px 16px;
  border-radius: var(--tb-radius);
  font-family: var(--tb-font-head);
  font-weight: 700;
  font-size: 16px;
  text-align: center;
  line-height: 1.4;
  display: flex;
  flex-direction: column;
  gap: 2px;
  border: 2.5px solid var(--tb-green);
}
.mh-neighbor-tag small {
  font-weight: 400;
  font-size: 12px;
  opacity: .85;
  font-family: 'Mali', Arial, sans-serif;
  color: #555555;
}

/* Seasonal */
.mh-seasonal {
  background: #FFFFFF;
  border: 4px solid #3D6B2C;
  border-radius: 40px;
  padding: 36px;
  margin: 40px 0;
  margin-bottom: 48px;
}
.mh-seasonal h2 {
  font-family: var(--tb-font-head);
  color: var(--tb-green);
  text-align: center;
  margin: 0 0 24px;
  font-size: 28px;
  margin-bottom: 20px;
}
.mh-seasons-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.mh-seasons-grid > div {
  background: var(--tb-off-white);
  border-radius: var(--tb-radius);
  padding: 20px 24px;
  border: 2.5px solid #CCCCCC;
}
.mh-seasons-grid h4 {
  font-family: var(--tb-font-head);
  font-size: 18px;
  margin: 0 0 8px;
  color: var(--tb-green);
  margin-bottom: 8px;
}
.mh-seasons-grid p {
  font-family: var(--tb-font-body);
  line-height: 1.6;
  margin: 0;
  font-weight: 600;
  font-size: 15px;
  color: #000000;
}

/* Safety rules */
.mh-safety-rules {
  background: var(--tb-green);
  border: 3px dashed var(--tb-yellow-border);
  box-shadow: var(--tb-btn-ring);
  border-radius: var(--tb-radius);
  padding: 32px;
  margin: 40px 0;
  text-align: center;
  color: var(--tb-white);
  margin-bottom: 48px;
  position: relative;
}
.mh-safety-rules h2 {
  font-family: var(--tb-font-head);
  color: var(--tb-yellow);
  font-size: 28px;
  margin: 0 0 20px;
  margin-bottom: 18px;
  transform: rotate(-1deg);
}
.mh-safety-rules ul {
  list-style: none;
  padding: 0;
  text-align: left;
  max-width: 600px;
  margin: 0 auto 24px;
}
.mh-safety-rules li {
  font-family: 'Mali', Arial, sans-serif;
  font-size: 17px;
  padding: 10px 0 10px 32px;
  border-bottom: 1px dashed rgba(255,255,255,0.25);
  color: #FFFFFF;
  -webkit-text-fill-color: #FFFFFF;
  opacity: 1;
  visibility: visible;
  font-weight: 700;
  position: relative;
  z-index: 1;
  line-height: 1.5;
  display: block;
  text-align: left;
  text-shadow: none;
  -webkit-text-stroke: 0;
}
.mh-safety-rules li::before {
  content: '✓';
  position: absolute;
  left: 0;
  top: 10px;
  color: var(--tb-yellow);
  font-weight: 700;
  font-size: 20px;
}
.mh-safety-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--tb-yellow);
  border: 3px solid var(--tb-white);
  border-radius: 50%;
  width: 80px;
  height: 80px;
  font-family: var(--tb-font-head);
  font-weight: 700;
  font-size: 12px;
  color: var(--tb-green);
  line-height: 1.3;
  box-shadow: 0 8px 20px rgba(0,0,0,0.1);
  margin-top: 12px;
  position: absolute;
  top: 24px;
  right: 32px;
  text-align: center;
}
.mh-safety-badge-label {
  font-family: 'Mali', Arial, sans-serif;
  font-weight: 700;
  color: rgba(255,255,255,0.6);
  margin-top: 8px;
  font-size: 12px;
  text-align: right;
}

/* Explorer station */
.mh-explorer-station {
  background: var(--tb-off-white);
  border: 3px solid var(--tb-green);
  border-radius: var(--tb-radius);
  padding: 32px;
  margin: 40px 0;
  box-shadow: 0 10px 30px rgba(0,0,0,0.08);
  margin-bottom: 48px;
}
.mh-explorer-station h2 {
  font-family: var(--tb-font-head);
  color: var(--tb-green);
  font-size: 28px;
  text-align: center;
  margin: 0 0 8px;
  margin-bottom: 8px;
}
.mh-explorer-intro {
  font-family: 'Mali', Arial, sans-serif;
  font-weight: 700;
  text-align: center;
  margin-bottom: 24px;
  font-size: 15px;
  color: #555555;
}
.mh-station-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.mh-checklist-card, .mh-print-card {
  background: var(--tb-white);
  border-radius: var(--tb-radius);
  border: 2.5px solid var(--tb-green);
  padding: 20px;
}
.mh-checklist-card h3, .mh-print-card h3 {
  font-family: var(--tb-font-head);
  font-size: 20px;
  color: var(--tb-green);
  margin-bottom: 6px;
}
.mh-checklist-note {
  font-family: 'Mali', Arial, sans-serif;
  font-weight: 700;
  font-size: 13px;
  margin-bottom: 14px;
  color: #555555;
}
.mh-checklist-items {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}
.mh-checklist-items label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Mali', Arial, sans-serif;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  color: var(--tb-green);
}
.mh-checklist-items input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--tb-green);
  flex-shrink: 0;
}
.mh-status-badge {
  margin-top: 18px;
  font-family: 'Mali', Arial, sans-serif;
  font-weight: 700;
  font-size: 14px;
  color: var(--tb-green);
  text-align: center;
  background: var(--tb-sky);
  border-radius: 20px;
  padding: 6px 16px;
  margin-bottom: 12px;
  display: inline-block;
}
.mh-reset-btn {
  display: block;
  width: 100%;
  margin-top: 12px;
  background: none;
  border: 2px solid #CCCCCC;
  border-radius: 20px;
  padding: 5px 14px;
  font-family: 'Mali', Arial, sans-serif;
  font-weight: 700;
  color: #555555;
  cursor: pointer;
  font-size: 14px;
  transition: background .2s;
}
.mh-reset-btn:hover {
  background: #3D6B2C;
  color: var(--tb-green);
  border-color: var(--tb-green);
}
.mh-print-card p {
  font-family: var(--tb-font-body);
  font-size: 14px;
  margin-bottom: 14px;
  font-weight: 600;
  color: #000000;
}
.mh-print-btn {
  background: var(--tb-white);
  color: var(--tb-green);
  border: 3px solid var(--tb-yellow-border);
  box-shadow: var(--tb-btn-ring);
  border-radius: var(--tb-radius-pill);
  padding: 10px 20px;
  font-family: var(--tb-font-head);
  font-size: 15px;
  cursor: pointer;
  font-weight: 700;
  margin-bottom: 16px;
  min-height: 44px;
  transition: background 0.15s, border-color 0.15s;
}
.mh-print-btn:hover {
  background: var(--tb-yellow);
  border-color: var(--tb-yellow, #FFDE00);
}
.mh-print-sketch {
  background: #FFFDF7;
  border: 2px dashed #CCCCCC;
  border-radius: 8px;
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}
.mh-print-sketch p {
  font-family: var(--tb-font-body);
  font-size: 13px;
  color: #CCCCCC;
  margin: 0; font-weight: 600;}
.mh-print-signature {
  font-family: 'Mali', Arial, sans-serif;
  font-weight: 700;
  font-size: 13px;
  color: #555555;
  border-top: 1px solid #FFFDF7;
  padding-top: 10px;
}

/* Mission footer */
.mh-mission-footer {
  background: var(--tb-green);
  color: var(--tb-white);
  text-align: center;
  padding: 36px 40px;
  border-radius: var(--tb-radius);
  margin-top: 60px;
}
.mh-mission-footer h2 {
  font-family: var(--tb-font-head);
  font-size: 30px;
  margin: 0 0 14px;
  color: var(--tb-yellow);
  margin-bottom: 12px;
}
.mh-mission-footer p {
  font-family: var(--tb-font-body);
  font-size: 18px;
  max-width: 600px;
  margin: 0 auto;
  font-weight: 600;
  color: rgba(255,255,255,0.95);
  line-height: 1.6;
}

/* Responsive */
@media (max-width: 768px) {
  .mh-container { padding: 32px 20px 48px; }
  .mh-bio-card { grid-template-columns: 1fr; text-align: center; }
  .mh-bio-avatar { font-size: 48px; }
  .mh-map-grid { grid-template-columns: 1fr; }
  .mh-neighbor-grid { grid-template-columns: repeat(2, 1fr); }
  .mh-seasons-grid { grid-template-columns: 1fr; }
  .mh-station-grid { grid-template-columns: 1fr; }
  .mh-safety-badge { position: static; margin: 16px auto 0; }
  .mh-bio-card { transform: none !important; }
}

/* ── TEACHER PORTAL FILTER BUTTONS (f-btn, filter-label) ────────────────────── */
.filter-bar {
  background: rgba(255,255,255,0.25);
  border: 3px solid var(--navy);
  border-radius: var(--tb-radius);
  padding: 16px 20px;
  margin-bottom: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
.f-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  width: 100%;
}
.filter-label {
  font-family: 'Mali', Arial, sans-serif;
  font-weight: 700;
  font-size: 14px;
  font-weight: 700;
  color: var(--tb-green);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-right: 4px;
  white-space: nowrap;
}
.f-btn {
  font-family: 'Mali', Arial, sans-serif;
  font-weight: 700;
  font-weight: 600;
  font-size: 14px;
  padding: 5px 14px;
  border-radius: var(--tb-radius-pill);
  border: 2.5px solid var(--tb-green);
  background: var(--tb-white);
  color: var(--tb-green);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  min-height: 36px;
  white-space: nowrap;
}
.f-btn:hover {
  background: var(--tb-green);
  color: var(--tb-white);
  font-weight: 700;
  box-shadow: inset 0 -3px 0 rgba(255,255,255,0.4);
}
.f-btn.active { background: var(--tb-green); color: var(--tb-yellow); border-color: var(--tb-green); }

/* ── FOOTER ──────────────────────────────────────────────────────────────────── */
.tb-site-footer {
  flex-shrink: 0;
  background: var(--tb-yellow, #FFDE00);
  color: var(--tb-green);
  padding: 30px 0 0;
  position: relative;
  overflow: hidden;
  margin-top: 12px;
  border-radius: 32px 32px 0 0;
}
.tb-site-footer::before {
  content: '';
  position: absolute;
  top: 0; left: -10px; right: -10px;
  height: 26px;
  background: var(--tb-off-white, #FFFDF7);
  clip-path: polygon(0% 50%, 5% 65%, 10% 75%, 15% 80%, 20% 78%, 25% 70%, 30% 58%, 35% 50%, 40% 55%, 45% 68%, 50% 80%, 55% 85%, 60% 82%, 65% 72%, 70% 60%, 75% 52%, 80% 58%, 85% 72%, 90% 82%, 95% 78%, 100% 68%, 100% 0%, 0% 0%);
}

/* Wordmark */
.tb-footer-wordmark {
  padding: 36px 40px 0;
  text-align: left;
  border-bottom: 2px solid rgba(45,74,30,0.15);
  margin-bottom: 28px;
  position: relative;
}
.tb-footer-wordmark::before {
  content: '🐾';
  display: block;
  font-size: 28px;
  transform: rotate(-12deg);
  margin-bottom: 4px;
  opacity: .85;
}
.tb-footer-wm-text {
  font-family: var(--tb-font-head);
  font-size: 40px;
  line-height: 1;
  margin: 0 0 12px;
  letter-spacing: -0.5px;
  margin-bottom: 10px;
  display: inline-block;
  transform: rotate(-2deg);
}
.tb-wm-tooties {
  color: var(--tb-green);
}
.tb-wm-backyard {
  color: var(--tb-white, #FFFFFF);
  margin-left: 0.18em;
  -webkit-text-stroke: 1.5px var(--tb-green);
  text-shadow: -1.5px -1.5px 0 var(--tb-green), 1.5px -1.5px 0 var(--tb-green), -1.5px 1.5px 0 var(--tb-green), 1.5px 1.5px 0 var(--tb-green);
}
.tb-footer-wm-tag {
  font-family: 'Mali', Arial, sans-serif;
  font-weight: 700;
  font-size: 17px;
  color: var(--tb-green);
  margin: 0;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
  opacity: .8;
  margin-bottom: 0;
}

/* Widget areas */
.tb-footer-widgets {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  padding: 32px 0;
}
.tb-footer-widget-area { color: rgba(45,74,30,0.9); }

/* Nav groups — rounded paper "cards" instead of flat columns */
.tb-footer-nav-groups {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  max-width: 1100px;
  margin: 32px auto 0;
  padding: 36px 40px 32px;
  text-align: left;
}
.tb-footer-col {
  background-color: #FFFFFF;
  opacity: 1;
  border: 2.5px solid var(--tb-green);
  border-radius: 22px;
  padding: 18px 20px;
}
.tb-footer-col:nth-child(1) { transform: rotate(-1deg); }
.tb-footer-col:nth-child(2) { transform: rotate(0.8deg); }
.tb-footer-col:nth-child(3) { transform: rotate(-0.6deg); }
.tb-footer-col:nth-child(4) { transform: rotate(1deg); }
.tb-footer-col-heading {
  font-family: var(--tb-font-head);
  font-size: 17px;
  color: var(--tb-green);
  margin: 0 0 14px;
  margin-bottom: 12px;
}
.tb-footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.tb-footer-col li { margin-bottom: 9px; padding-left: 22px; position: relative; }
.tb-footer-col li::before {
  content: '🐾';
  position: absolute;
  left: 0;
  top: -1px;
  font-size: 12px;
  opacity: .85;
}
.tb-footer-col a {
  font-family: 'Mali', Arial, sans-serif;
  font-weight: 800;
  font-size: 16px;
  color: #3D6B2C;
  text-decoration: none;
  transition: color 0.15s;
}
.tb-footer-col a:hover { color: #3D6B2C; text-decoration: underline; }
.tb-footer-grandma-link { color: #3D6B2C !important; font-weight: 800; }

/* Legal nav */
.tb-footer-legal-nav {
  margin: 0 auto;
  border-top: 2px dashed rgba(45,74,30,0.3);
  padding: 18px 40px;
  max-width: 1100px;
}
.tb-footer-legal {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  list-style: none;
  padding: 0;
  margin: 0;
}
.tb-footer-legal a {
  font-family: 'Mali', Arial, sans-serif;
  font-weight: 700;
  font-size: 13px;
  color: rgba(45,74,30,1.0);
  text-decoration: none;
}
.tb-footer-legal a:hover { color: var(--tb-green); }

/* Copyright */
.tb-footer-copy {
  font-family: 'Mali', Arial, sans-serif;
  font-weight: 700;
  font-size: 13px;
  color: rgba(45,74,30,0.7);
  margin: 0;
  line-height: 1.8;
  text-align: center;
  padding: 14px 40px 28px;
}

/* Back to top */
.tb-back-to-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 999;
  width: 48px;
  height: 48px;
  min-height: 44px;
  background: var(--tb-yellow, #FFDE00);
  color: var(--tb-green);
  border: none;
  border-bottom: 4px solid #3D6B2C;
  border-radius: 50%;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(0,0,0,0.25);
  transition: background 0.15s, transform 0.15s;
  touch-action: manipulation;
}
.tb-back-to-top:hover { background: #FFDE00; color: var(--tb-green); transform: translateY(-3px); }
.tb-btt--on-footer {
  background: #97CCE8 !important;
  border-bottom-color: #3D6B2C;
  color: #3D6B2C;
}
.tb-btt--on-footer:hover { background: #7BBAD8 !important; }

@media (max-width: 768px) {
  .tb-footer-nav-groups { grid-template-columns: repeat(2, 1fr); padding: 32px 20px; }
  .tb-footer-wordmark { padding: 32px 20px 0; }
  .tb-footer-legal-nav { padding: 16px 20px; }
  .tb-footer-copy { padding: 12px 20px 20px; }
  .tb-footer-col { transform: none !important; }
}
@media (max-width: 480px) {
  .tb-footer-nav-groups { grid-template-columns: 1fr; }
}

/* ── FLIPBOOK — BOOK REDESIGN ────────────────────────────────────────────────── */

.tb-flipbook {
  background: #FFDE00;
  padding: 48px 40px 56px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  position: relative;
}

.tb-flipbook-inner {
  max-width: 100%;
  margin: 0 auto;
}

/* Tab spine — sits above the book like sticky tabs on a notebook */
.tb-flipbook-tabs {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  padding-bottom: 0;
  margin-bottom: -4px;
  position: relative;
  z-index: 2;
  scrollbar-width: none;
}
.tb-flipbook-tabs::-webkit-scrollbar {
  display: none;
}

.tb-flipbook-tab {
  font-family: 'Mali', Arial, sans-serif;
  font-weight: 700;
  font-size: 13px;
  color: var(--tb-green);
  background: #FFDE00;
  border: 3px solid #FFDE00;
  border-bottom: none;
  border-radius: 10px 10px 0 0;
  padding: 8px 16px;
  cursor: pointer;
  white-space: nowrap;
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: background 0.15s;
  flex-shrink: 0;
  position: relative;
  top: 3px;
}
.tb-flipbook-tab:hover {
  background: #FFDE00;
}
.tb-flipbook-tab.active {
  background: #FFFFFF;
  border-color: #FFDE00;
  color: var(--tb-green);
  font-weight: 700;
  top: 0;
  padding-bottom: 11px;
}
.tb-flipbook-tab-icon {
  font-size: 16px;
}

/* The book itself — open book with two pages and a spine */
.tb-flipbook-book {
  background: #FFFFFF;
  border: 3px solid #FFDE00;
  border-radius: 0 4px 4px 4px;
  padding: 36px 40px 32px;
  min-height: 360px;
  position: relative;
  display: grid;
  grid-template-columns: 1fr 6px 1fr;
  box-shadow: 0 8px 20px rgba(0,0,0,0.12),
    inset 0 0 40px rgba(0,0,0,0.04);
  overflow: hidden;
  background-image: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 27px,
    rgba(45,74,30,0.04) 28px
  );
}

/* Book spine */
.tb-flipbook-book::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 6px;
  background: #FFDE00;
  box-shadow: 0 0 8px rgba(0,0,0,0.15);
  z-index: 10;
  transform: translateX(-50%);
}

/* Left and right page */
.tb-flipbook-page {
  display: none;
  grid-column: 1 / -1;
  padding: 0;
}

.tb-flipbook-left-page,

/* Left page — slightly warmer tint */
.tb-flipbook-left-page {
  background: #FFDE00;
  border-right: 6px solid transparent;
}

/* Right page */
.tb-flipbook-right-page {
  padding: 32px 36px;
  position: relative;
  background: #FFFFFF;
}

/* Page number corners */
.tb-flipbook-page-number {
  font-family: 'Mali', Arial, sans-serif;
  font-weight: 700;
  font-size: 11px;
  color: #CCCCCC;
  text-align: right;
  margin-bottom: 8px;
  position: absolute;
  bottom: 12px;
}
.tb-flipbook-left-page .tb-flipbook-page-number  { left: 20px; }
.tb-flipbook-right-page .tb-flipbook-page-number { right: 20px; }

/* Page icon — big, decorative, top of left page */
.tb-flipbook-page-icon {
  font-size: 56px;
  margin-bottom: 12px;
  display: block;
  line-height: 1;
}

/* Headlines */
.tb-flipbook-left-page h2 {
  font-family: var(--tb-font-head);
  font-size: 28px;
  color: var(--tb-green);
  margin-bottom: 16px;
  line-height: 1.2;
}
.tb-flipbook-right-page h2 {
  font-family: var(--tb-font-head);
  font-size: 22px;
  color: var(--tb-green);
  margin-bottom: 12px;
}

/* Body text */
.tb-flipbook-page-content {
  font-family: 'Mali', Arial, sans-serif;
  font-weight: 700;
  font-size: 17px;
  line-height: 1.75;
  color: #000000;
}
.tb-flipbook-page-content p {
  margin-bottom: 12px;
}
.tb-flipbook-scientific {
  font-family: 'Mali', Arial, sans-serif;
  font-weight: 700;
  font-size: 15px;
  font-style: italic;
  color: #555555;
  margin-bottom: 12px;
  display: block;
}

/* Page variants */
.tb-flipbook-page--funfact .tb-flipbook-left-page { background: #FFDE00; }
.tb-flipbook-page--grandma .tb-flipbook-left-page { background: linear-gradient(135deg, #FFFFFF, #FFFDF7); }
.tb-flipbook-page--ngss    .tb-flipbook-left-page { background: linear-gradient(135deg, #FFFFFF, #FFFDF7); }

/* Nav */
.tb-flipbook-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 24px;
  gap: 12px;
}
.tb-flipbook-progress {
  font-family: 'Mali', Arial, sans-serif;
  font-weight: 700;
  font-size: 15px;
  color: #555555;
}
.tb-flipbook-nav .tb-btn-outline {
  background: #FFFFFF;
  color: var(--tb-green);
  border: 2.5px solid var(--tb-yellow-border);
  box-shadow: var(--tb-btn-ring);
  border-radius: var(--tb-radius-pill);
  font-family: var(--tb-font-head);
  font-size: 16px;
  padding: 10px 24px;
  cursor: pointer;
  min-height: 44px;
}
.tb-flipbook-nav .tb-btn-primary {
  background: var(--tb-white);
  color: var(--tb-green);
  border: 3px solid var(--tb-yellow-border);
  box-shadow: var(--tb-btn-ring);
  transform: none;
  border-radius: var(--tb-radius-pill);
  font-family: var(--tb-font-head);
  font-size: 16px;
  padding: 10px 24px;
  cursor: pointer;
  min-height: 44px;
  transition: background 0.15s, border-color 0.15s;
}
.tb-flipbook-nav .tb-btn-primary:hover {
  background: var(--tb-yellow);
  border-color: var(--tb-yellow, #FFDE00);
}

/* Page turn animation */
.tb-flipbook-page.active {
  animation: tb-page-in 0.25s ease-out;
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 360px;
}
@keyframes tb-page-in {
  from { opacity: 0; transform: translateX(16px); }
  to   { opacity: 1; transform: translateX(0); }
}
@media (prefers-reduced-motion: reduce) {
  .tb-flipbook-page.active { animation: none; }
}

/* Mobile — stack pages vertically */
@media (max-width: 700px) {
  .tb-flipbook-book { grid-template-columns: 1fr; }
  .tb-flipbook-book::before { display: none; }
  .tb-flipbook-page.active { grid-template-columns: 1fr; }
  .tb-flipbook-right-page { border-top: 3px solid #FFDE00; }
  .tb-flipbook-tab-label { display: none; }
  .tb-flipbook-tab-icon { font-size: 20px; }
  .tb-flipbook { padding: 24px 16px 32px; }
  .tb-flipbook-left-page,
  .tb-flipbook-right-page { padding: 24px 20px; }
}

/* ── COOKIE BANNER v2 ────────────────────────────────────────────────────────── */
.tb-cookie-banner {
  position: fixed;
  bottom: 24px;
  left: 50%;
  right: 0;
  z-index: 9999;
  background: var(--tb-green);
  color: var(--tb-white);
  padding: 20px 24px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.25);
  transform: translateX(-50%);
  animation: tb-cookie-slide-in 0.4s ease forwards;
  width: min(680px, calc(100vw - 32px));
  border-radius: 16px;
}
.tb-cookie-banner[hidden] { display: none; }
@keyframes tb-cookie-slide-in {
  from { opacity: 0; transform: translateX(-50%) translateY(20px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}
.tb-cookie-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
}
.tb-cookie-icon {
  font-size: 28px;
  flex-shrink: 0;
  margin-top: 2px;
}
.tb-cookie-text { flex: 1; min-width: 200px; }
.tb-cookie-msg {
  flex: 1;
  font-family: 'Mali', Arial, sans-serif;
  font-weight: 700;
  font-size: 14px;
  line-height: 1.6;
  margin: 0 0 4px;
  color: rgba(255,255,255,0.92);
  min-width: 200px;
}
.tb-cookie-link {
  color: var(--tb-yellow);
  text-decoration: underline;
  margin-left: 6px;
  white-space: nowrap;
  font-size: 13px;
}
.tb-cookie-btns {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 12px;
  width: 100%;
}
.tb-cookie-accept-all {
  font-family: var(--tb-font-head);
  font-size: 15px;
  background: var(--tb-yellow);
  color: var(--tb-green);
  border: none;
  border-radius: var(--tb-radius-pill);
  padding: 10px 22px;
  border-bottom: 0;
  cursor: pointer;
  min-height: 44px;
}
.tb-cookie-accept-all:hover { background: #FFDE00; }
.tb-cookie-necessary {
  font-family: 'Mali', Arial, sans-serif;
  font-weight: 700;
  font-size: 14px;
  background: transparent;
  color: rgba(255,255,255,0.8);
  border: 2px solid rgba(255,255,255,0.4);
  border-radius: var(--tb-radius-pill);
  padding: 10px 18px;
  cursor: pointer;
  min-height: 44px;
}
.tb-cookie-necessary:hover { border-color: rgba(255,255,255,0.8); color: var(--tb-white); }

@media (max-width: 480px) {
  .tb-cookie-banner { bottom: 0; border-radius: 16px 16px 0 0; width: 100%; left: 0; transform: none; }
  .tb-cookie-btns { flex-direction: column; }
  .tb-cookie-accept-all, .tb-cookie-necessary { width: 100%; text-align: center; }
}

/* ── BACKYARD GEAR SECTION ───────────────────────────────────────────────────── */
.tb-gear-section {
  background: var(--tb-off-white);
  padding: 48px 40px 56px;
  border-top: 3px solid var(--tb-green);
}
.tb-gear-disclosure {
  font-family: 'Mali', Arial, sans-serif;
  font-weight: 700;
  font-size: 12px;
  color: #555555;
  margin-bottom: 20px;
  line-height: 1.6;
  max-width: 700px;
}
.tb-gear-eyebrow {
  font-family: 'Mali', Arial, sans-serif;
  font-weight: 700;
  font-size: 13px;
  color: var(--tb-orange);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 4px;
  transform: rotate(-1deg);
  display: inline-block;
}
.tb-gear-heading {
  font-family: var(--tb-font-head);
  font-size: 32px;
  color: var(--tb-green);
  margin-bottom: 28px;
  transform: rotate(0.5deg);
  display: inline-block;
}
.tb-gear-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}
.tb-gear-card {
  background: var(--tb-white);
  border-radius: var(--tb-radius);
  border: 3px solid var(--tb-green);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.15s, box-shadow 0.15s;
}
.tb-gear-card:hover { transform: rotate(-0.8deg) translateY(-3px); box-shadow: 4px 4px 0 var(--tb-green); }
.tb-gear-img { height: 160px; overflow: hidden; background: var(--tb-sky); }
.tb-gear-img img { width: 100%; height: 100%; object-fit: cover; }
.tb-gear-body { padding: 16px; flex: 1; display: flex; flex-direction: column; gap: 8px; }
.tb-gear-title { font-family: var(--tb-font-head); font-size: 17px; color: var(--tb-green); margin: 0; }
.tb-gear-desc { font-family: var(--tb-font-body); font-size: 14px; color: #555555; flex: 1; line-height: 1.5; font-weight: 600;}
.tb-gear-catch-release {
  font-family: 'Mali', Arial, sans-serif;
  font-weight: 700;
  font-size: 13px;
  color: var(--tb-green);
  background: rgba(151,204,232,0.2);
  border-radius: 8px;
  padding: 8px 12px;
  line-height: 1.5;
}
.tb-gear-meta { display: flex; gap: 8px; flex-wrap: wrap; }
.tb-gear-price, .tb-gear-age {
  font-family: 'Mali', Arial, sans-serif;
  font-weight: 700;
  font-size: 12px;
  background: var(--tb-sky);
  color: var(--tb-green);
  border-radius: 20px;
  padding: 2px 10px;
}
.tb-gear-btn {
  font-family: var(--tb-font-head);
  font-size: 14px;
  background: var(--tb-white);
  color: var(--tb-green);
  border: 3px solid var(--tb-yellow-border);
  border-radius: var(--tb-radius-pill);
  padding: 9px 18px;
  text-decoration: none;
  display: inline-block;
  text-align: center;
  margin-top: 4px;
  transition: background 0.15s, border-color 0.15s;
}
.tb-gear-btn:hover { background: var(--tb-yellow, #FFDE00); border-color: var(--tb-yellow, #FFDE00); color: var(--tb-green); }

@media (max-width: 768px) {
  .tb-gear-section { padding: 32px 20px 40px; }
  .tb-gear-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
}
@media (max-width: 480px) {
  .tb-gear-grid { grid-template-columns: 1fr; }
}

/* ── FOOTER DISCLOSURE ───────────────────────────────────────────────────────── */
.tb-footer-affiliate-disclosure {
  font-family: 'Mali', Arial, sans-serif;
  font-weight: 700;
  font-size: 12px;
  color: rgba(45,74,30,0.72);
  text-align: center;
  background: var(--sky-light, #D6F0FB);
  margin: 0;
  padding: 12px 40px 16px;
  line-height: 1.6;
  border-top: 2px solid rgba(45,74,30,0.18);
}


/* Friends page decorative trail replaces the old rainbow */
.tb-friends-page-hero {
  padding-bottom: 68px;
}
.tb-friends-trail {
  position: relative;
  z-index: 2;
  margin-top: 22px;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 14px;
  flex-wrap: wrap;
}
.tb-friends-trail-item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 999px;
  border: 3px solid var(--tb-yellow-border);
  box-shadow: 0 4px 0 rgba(45,74,30,0.14);
  font-size: 30px;
  line-height: 1;
  background: rgba(255,255,255,0.92);
  color: var(--tb-green);
}
.tb-friends-trail-item--feather {
  transform: translateY(-8px) rotate(-12deg);
}
.tb-friends-trail-item--paw {
  background: #FFDE00;
  border-color: #FFDE00;
  box-shadow: none;
  transform: translateY(8px) rotate(8deg);
}
.tb-friends-trail-item--leaf {
  background: #FFDE00;
  border-color: #FFDE00;
  box-shadow: none;
  transform: translateY(-14px) rotate(-6deg);
}
@media (max-width: 768px) {
  .tb-friends-page-hero {
    padding-bottom: 52px;
  }
  .tb-friends-trail {
    gap: 10px;
    margin-top: 18px;
  }
  .tb-friends-trail-item {
    width: 54px;
    height: 54px;
    font-size: 24px;
  }
}


/* ── BRAND YELLOW: CLEAN RENDER LAYER ────────────────────────────────────
   One bright yellow. No opacity dimming, no yellow-on-yellow lower edge,
   no yellow shadows, gradients, filters, or blended overlays. */
:root {
  --tb-yellow: #FFDE00;
  --tb-yellow-border: #FFDE00;
  --tb-yellow-dk: #FFDE00;
  --orange: #8B5A2B;
  --yellow: #FFDE00;
  --amber: #FFDE00;
  --tan: #FFFDF7;
}

/* Header wordmark remains explicit, not a generic logo-span color. */
.tb-site-header .tb-site-logo .tb-logo-line1 { color: #FFDE00 !important; }
.tb-site-header .tb-site-logo .tb-logo-line2 { color: #3D6B2C !important; }

/* Bright yellow interaction states: solid fill, green text, neutral shadow only. */
.tb-btn:hover,
.tb-btn:focus-visible,
.tb-read-btn:hover,
.btn-orange:hover,
.btn-navy:hover,
.btn-green:hover,
.btn-coral:hover,
.btn-teal:hover,
.btn-lime:hover,
.btn-outline:hover,
.tb-site-header .tb-nav-pill:hover,
.tb-site-header .tb-nav-pill:focus-visible,
.tb-site-header .tb-nav-pill.active,
.tb-site-header .tb-nav-pill.tb-cta:hover,
.tb-site-header .tb-nav-pill.tb-cta:focus-visible,
.tb-flipbook-nav .tb-btn-primary:hover,
.tb-flipbook-nav .tb-btn-outline:hover,
.tb-cookie-accept-all,
.tb-gear-btn:hover,
.tb-back-to-top:hover {
  background-color: #FFDE00 !important;
  background-image: none !important;
  color: #3D6B2C !important;
  border-color: #FFDE00 !important;
  border-bottom-color: #FFDE00 !important;
  opacity: 1 !important;
  filter: none !important;
  box-shadow: none !important;
}

/* Flat yellow components: eliminate hard yellow lower edges and yellow offset shadows. */
.tb-btn,
.tb-read-btn,
.tb-nav-pill,
.tb-flipbook-tab,
.tb-flipbook-nav .tb-btn-primary,
.tb-flipbook-nav .tb-btn-outline,
.tb-cookie-accept-all,
.tb-gear-btn,
.tb-back-to-top,
.mh-challenge-box,
.tb-flipbook-book,
.tb-flipbook-book::before,
.tb-friends-trail-item--paw,
.tb-friends-trail-item--leaf {
  filter: none !important;
}
.tb-flipbook-book {
  box-shadow: 0 8px 20px rgba(0,0,0,0.12) !important;
}
.tb-flipbook-book::before {
  background: #FFDE00 !important;
  background-image: none !important;
}
.mh-challenge-box,
.tb-cookie-accept-all {
  border-bottom: 0 !important;
}

/* Preserve hierarchy that was accidentally flattened in prior passes. */
body { background: #97CCE8 !important; background-image: none !important; }
.tb-flipbook { background: #D6F0FB !important; background-image: none !important; }
.tb-flipbook-book,
.tb-flipbook-left-page,
.tb-flipbook-right-page,
.tb-flipbook-page--funfact .tb-flipbook-left-page,
.tb-flipbook-page--grandma .tb-flipbook-left-page,
.tb-flipbook-page--ngss .tb-flipbook-left-page {
  background-color: #FFFDF7 !important;
  background-image: none !important;
}
.tb-activity-card .tb-card-top { background: #8FC279 !important; }
.tb-activity-card .tb-type-tag,
.tb-activity-card .tb-type-tag[style] { background: #2E7D32 !important; color: #FFFFFF !important; }
.tb-activity-card .tb-card-avatar,
.tb-activity-icon { background: #8FC279 !important; }
.tb-activity-card .tb-read-btn:hover { background-color: #2E7D32 !important; color: #FFDE00 !important; border-color: #2E7D32 !important; }

/* Footer roles stay exact and flat. */
.tb-site-footer { background: #FFDE00 !important; background-image: none !important; color: #3D6B2C !important; }
.tb-site-footer::before { content: none !important; display: none !important; }
.tb-footer-affiliate-disclosure {
  display: block !important;
  width: 100% !important;
  box-sizing: border-box !important;
  background: #D6F0FB !important;
  background-image: none !important;
  color: #3D6B2C !important;
  opacity: 1 !important;
  filter: none !important;
  margin: 0 !important;
}

.tb-site-footer .tb-wm-tooties { color: #3D6B2C !important; -webkit-text-stroke: 0; text-shadow: none !important; }
.tb-site-footer .tb-wm-backyard { color: #FFFFFF !important; -webkit-text-stroke: 1.5px #3D6B2C; text-shadow: none !important; }

/* Footer logo — same structure as header, scaled up */
.tb-footer-logo {
  font-family: 'Fredoka One', cursive;
  font-size: 42px; /* single control — change only this to resize */
  text-decoration: none;
  display: inline-block;
  line-height: 1.0;
  transform: rotate(-6deg);
  margin-bottom: 16px;
}
.tb-footer-logo-line1 {
  display: block;
  font-family: 'Fredoka One', cursive;
  color: #FFFFFF;
  font-size: 1em; /* same ratio as header line1 (22px) */
}
.tb-footer-logo-line2 {
  display: block;
  font-family: 'Fredoka One', cursive;
  color: #3D6B2C;
  font-size: 1.182em; /* 26/22 — exact header ratio, always proportional */
  transform: rotate(4deg) translateX(0.385em); /* 10/26 — exact header ratio in em */
}

/* ── FIELD GUIDE FOLLOW-UP QUESTIONS + SEASONAL SPOTTER TABS ─────────── */
.tb-id-type-choices,
.tb-id-answer-choices {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 12px;
}
.tb-id-followups { margin-top: 20px; }
.tb-id-progress {
  margin: 0 0 8px;
  color: var(--navy);
  font-family: var(--font-body);
  font-weight: 700;
}
.tb-id-followup-question {
  margin: 0;
  color: var(--navy);
  font-family: var(--font-display);
}
.tb-id-choice[aria-pressed="true"] { background: var(--navy); color: #FFFFFF; }
.tb-season-spotter {
  border: 4px solid var(--navy);
  border-radius: var(--radius-md);
  background: #FFFFFF;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.tb-season-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-bottom: 3px solid var(--navy);
}
.tb-season-tab {
  appearance: none;
  border: 0;
  border-right: 2px solid var(--navy);
  background: #FFFFFF;
  color: var(--navy);
  cursor: pointer;
  font-family: var(--font-display);
  font-size: 1rem;
  padding: 14px 10px;
}
.tb-season-tab:last-child { border-right: 0; }
.tb-season-tab:hover,
.tb-season-tab:focus-visible,
.tb-season-tab.is-active { background: var(--teal); color: var(--navy); outline: 0; }
.tb-season-panel { padding: 22px; }
.tb-season-panel-heading { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; }
.tb-season-panel-heading span { font-size: 1.8rem; }
.tb-season-panel-heading h3 { margin: 0; color: var(--navy); font-family: var(--font-display); }
.tb-season-friend-frames {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.tb-season-friend-frame {
  display: block;
  min-width: 0;
  color: var(--navy);
  text-align: center;
  text-decoration: none;
  font-family: var(--font-body);
}
.tb-season-friend-frame strong { display: block; margin-top: 8px; font-size: .92rem; }
.tb-season-frame-image {
  display: flex;
  aspect-ratio: 4 / 3;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 3px dashed var(--navy);
  border-radius: var(--radius-sm);
  background: var(--sky-light);
}
.tb-season-frame-image img { width: 100%; height: 100%; object-fit: cover; }
.tb-season-frame-placeholder { font-size: 2.25rem; }
.tb-season-friend-frame.is-placeholder { opacity: .75; }
@media (max-width: 680px) {
  .tb-season-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tb-season-tab:nth-child(2) { border-right: 0; }
  .tb-season-tab:nth-child(-n+2) { border-bottom: 2px solid var(--navy); }
  .tb-season-friend-frames { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ── Auto-populated Friend Activity Hubs ───────────────────── */
.tb-friend-activity-hub {
  margin: 2.5rem 0;
}
.tb-friend-activity-hub__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
}
.tb-friend-activity-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 2px solid #CCCCCC;
  border-radius: 16px;
  background: #FFFFFF;
  box-shadow: 0 3px 0 #CCCCCC;
}
.tb-friend-activity-card__image {
  display: flex;
  aspect-ratio: 4 / 3;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #D6F0FB;
}
.tb-friend-activity-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.tb-friend-activity-card__placeholder {
  font-size: 4rem;
}
.tb-friend-activity-card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: flex-start;
  padding: 1rem;
}
.tb-friend-activity-card__eyebrow,
.tb-friend-activity-card__friend {
  margin: 0 0 .45rem;
  color: #555555;
  font-size: .85rem;
  font-weight: 700;
}
.tb-friend-activity-card h3 {
  margin: 0 0 .45rem;
  font-size: 1.15rem;
  line-height: 1.2;
}
.tb-friend-activity-card h3 a {
  color: #000000;
  text-decoration: none;
}
.tb-friend-activity-card h3 a:hover,
.tb-friend-activity-card h3 a:focus-visible {
  color: #3D6B2C;
  text-decoration: underline;
}
.tb-friend-activity-card__button {
  display: inline-block;
  margin-top: auto;
  padding: .6rem .85rem;
  border: 2px solid #000000;
  border-radius: 999px;
  background: #F5C400;
  color: #000000;
  font-weight: 800;
  text-decoration: none;
}
.tb-friend-activity-card__button:hover,
.tb-friend-activity-card__button:focus-visible {
  background: #FFFFFF;
}
.tb-friend-activity-hub__empty {
  margin: 1rem 0 0;
  padding: 1.25rem;
  border: 2px dashed #CCCCCC;
  border-radius: 12px;
  background: #FFFDF7;
  color: #555555;
  text-align: center;
}
@media (max-width: 600px) {
  .tb-friend-activity-hub__grid { grid-template-columns: 1fr; }
}

/* ── MUDDY PAW TRAILS: DESKTOP PAGE MARGINS ─────────────────────────────
   Decorative only. The trail stays outside the content lane and is hidden
   where narrow screens do not have reliable side margins. */
@media (min-width: 1440px) {
  body::before,
  body::after {
    content: '';
    position: fixed;
    z-index: 0;
    top: 142px;
    bottom: 36px;
    width: min(11vw, 152px);
    pointer-events: none;
    background-image: url('../images/muddy-paw-trail.svg');
    background-repeat: repeat-y;
    background-position: center top;
    background-size: min(10vw, 142px) auto;
  }

  body::before { left: max(14px, calc((100vw - 1460px) / 2)); }
  body::after {
    right: max(14px, calc((100vw - 1460px) / 2));
    transform: scaleX(-1);
  }

  body > *:not(.tb-back-to-top) { position: relative; z-index: 1; }
}

@media (max-width: 1439px) {
  body::before,
  body::after { content: none; }
}
/* Digital Friend maze: keyboard, pointer, and touch-friendly game board. */
.fb-digital-maze { margin: 1.25rem auto; max-width: 680px; text-align: center; }
.fb-digital-maze__help { margin: 0 0 .85rem; }
.fb-digital-maze__stage { display: grid; grid-template-columns: repeat(var(--maze-size), 1fr); width: min(100%, 620px); aspect-ratio: 1; margin: 0 auto 1rem; color: #3D6B2C; background: #FFFFFF; touch-action: manipulation; outline-offset: 5px; }
.fb-digital-maze__cell { display: flex; align-items: center; justify-content: center; min-width: 0; min-height: 0; font-size: clamp(.55rem, 2vw, 1.15rem); line-height: 1; box-sizing: border-box; }
.fb-digital-maze__status { min-height: 1.5em; font-weight: 700; margin-bottom: .75rem; }
.fb-digital-maze__controls { display: grid; grid-template-columns: repeat(3, 48px); grid-template-areas: '. up .' 'left down right'; justify-content: center; gap: .4rem; margin: 0 auto 1rem; }
.fb-digital-maze__controls button { min-height: 44px; border: 2px solid #3D6B2C; border-radius: 7px; background: #FFFFFF; color: #3D6B2C; font-size: 1.25rem; cursor: pointer; }
.fb-digital-maze__controls [data-maze-move="up"] { grid-area: up; }.fb-digital-maze__controls [data-maze-move="left"] { grid-area:left; }.fb-digital-maze__controls [data-maze-move="down"] { grid-area:down; }.fb-digital-maze__controls [data-maze-move="right"] { grid-area:right; }
.fb-digital-maze__controls button:hover,.fb-digital-maze__controls button:focus-visible { background:#F5C400; }
@media print { .fb-digital-maze { display:none !important; } }

/* ── ACTIVITY PAGE — STACKED FULL-WIDTH LAYOUT ───────────────────────── */
.tb-activity-hero {
  background: #97CCE8;
  border: 4px solid #8B5A2B;
  border-radius: 32px;
  margin: 32px 40px;
  padding: 64px 80px;
  text-align: center;
}
.tb-activity-hero h1 {
  font-family: var(--tb-font-head);
  color: #3D6B2C;
  font-size: clamp(2rem, 4vw, 3.2rem);
  margin-bottom: 16px;
  line-height: 1.15;
}
.tb-activity-type-chip {
  display: inline-block;
  margin-bottom: 20px;
  font-family: var(--tb-font-body);
  font-size: 14px;
}
.tb-activity-hero-excerpt {
  font-family: var(--tb-font-body);
  color: #3D6B2C;
  font-size: 1.1rem;
  max-width: 640px;
  margin: 0 auto;
  line-height: 1.85;
}

/* Golden Rule band */
.tb-activity-golden-rule {
  margin: 0 40px 32px;
}
.tb-activity-golden-rule .tb-safety-callout {
  border-radius: 32px;
  flex-direction: row;
  align-items: flex-start;
  text-align: left;
  padding: 44px 56px;
  gap: 28px;
}
.tb-activity-golden-rule .tb-sc-icon {
  font-size: 48px;
  flex-shrink: 0;
  margin-top: 4px;
}
.tb-activity-golden-rule .tb-safety-callout h2 {
  text-align: left;
  font-size: 1.4rem;
  margin-bottom: 12px;
}
.tb-activity-golden-rule .tb-safety-callout p {
  text-align: left;
  font-size: 1.1rem;
  line-height: 1.9;
}

/* Content sections */
.tb-activity-content-section {
  margin: 0 40px 32px;
  border-radius: 32px;
  padding: 52px 64px;
}
.tb-activity-section-sky   { background: #B8DFF0; }
.tb-activity-section-white { background: white; border: 2.5px solid #3D6B2C; }
.tb-activity-section-green { background: #3D6B2C; }
.tb-activity-section-green .tb-section-title { color: #FFDE00; }

/* Entry content inside activity sections */
.tb-activity-entry { max-width: 100%; }
.tb-activity-entry h2 {
  font-family: var(--tb-font-head);
  font-size: 1.5rem;
  margin-top: 44px;
  color: #3D6B2C;
}
.tb-activity-entry h2:first-child { margin-top: 0; }
.tb-activity-entry li {
  font-family: var(--tb-font-body);
  margin-bottom: 14px;
  line-height: 1.85;
  font-size: 1.05rem;
}
.tb-activity-entry p {
  font-family: var(--tb-font-body);
  font-size: 1.05rem;
  line-height: 1.85;
}

/* Nav buttons */
.tb-activity-post-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 0 40px 32px;
  padding: 32px 0;
  border-top: 2px solid rgba(61,107,44,0.2);
  gap: 16px;
}
.tb-activity-post-nav-arrows { display: flex; gap: 16px; }

@media (max-width: 768px) {
  .tb-activity-hero { margin: 16px; padding: 40px 24px; border-radius: 20px; }
  .tb-activity-golden-rule { margin: 0 16px 20px; }
  .tb-activity-golden-rule .tb-safety-callout { flex-direction: column; padding: 28px 24px; }
  .tb-activity-content-section { margin: 0 16px 20px; padding: 32px 24px; border-radius: 20px; }
  .tb-activity-post-nav { margin: 0 16px 20px; flex-direction: column; align-items: flex-start; }
}

/* ── OUTDOOR ACTIVITY — FULL-WIDTH STEPS + INTERACTIVE CHECKLIST ─────── */
.tb-single-oa__steps-fullwidth {
  background: white;
  border-top: 2.5px solid #3D6B2C;
  border-bottom: 2.5px solid #3D6B2C;
  padding: 40px 0;
  margin: 32px 0;
}
.tb-single-oa__steps-fullwidth .tb-oa-steps-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px 32px;
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
}
@media (max-width: 768px) {
  .tb-single-oa__steps-fullwidth .tb-oa-steps-list {
    grid-template-columns: 1fr;
  }
}

/* Interactive checklist */
.tb-oa-mat-list { list-style: none; padding: 0; margin: 0; }
.tb-oa-mat-list li { padding: 0; border-bottom: 1px solid rgba(61,107,44,.1); }
.tb-oa-mat-list li:last-child { border-bottom: none; }
.tb-oa-mat-label {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 4px;
  cursor: pointer;
  font-family: var(--tb-font-body);
  font-size: .95rem;
  color: #3D6B2C;
  line-height: 1.5;
  transition: color .2s;
}
.tb-oa-mat-label:hover { color: #2D5A1E; }
.tb-oa-mat-label input[type="checkbox"] {
  width: 20px;
  height: 20px;
  accent-color: #3D6B2C;
  cursor: pointer;
  flex-shrink: 0;
  margin-top: 2px;
  border-radius: 4px;
}
.tb-oa-mat-label input:checked + span {
  text-decoration: line-through;
  color: #8BAA78;
}

/* ── PRINTABLES PAGE ─────────────────────────────────────────────────── */
.tb-printables-filter {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  background: white;
  border-radius: 20px;
  border: 2px solid #3D6B2C;
  padding: 18px 28px;
  margin: 0 40px 28px;
}
.tb-printables-filter-label {
  font-family: var(--tb-font-head);
  color: #3D6B2C;
  font-size: 14px;
}
.tb-filter-chip {
  background: #F0F9E8;
  color: #3D6B2C;
  font-family: var(--tb-font-head);
  font-size: 13px;
  padding: 6px 16px;
  border-radius: 50px;
  border: 2px solid #C8E6C9;
  text-decoration: none;
  transition: background .15s, color .15s;
}
.tb-filter-chip:hover,
.tb-filter-chip.active {
  background: #3D6B2C;
  color: #FFDE00;
  border-color: #3D6B2C;
}
.tb-printables-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.tb-printable-card {
  background: white;
  border-radius: 16px;
  border: 2px solid #3D6B2C;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.tb-printable-card__preview {
  background: #F0F9E8;
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  border-bottom: 2px solid #C8E6C9;
}
.tb-printable-card__emoji { font-size: 56px; }
.tb-printable-card__badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: #FFDE00;
  color: #3D6B2C;
  font-family: var(--tb-font-head);
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 50px;
  border: 1.5px solid #3D6B2C;
}
.tb-printable-card__body {
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.tb-printable-card__body h3 {
  font-family: var(--tb-font-head);
  color: #3D6B2C;
  font-size: 1rem;
  margin-bottom: 8px;
}
.tb-printable-card__body p {
  font-family: var(--tb-font-body);
  font-size: .9rem;
  color: #555;
  line-height: 1.55;
  margin-bottom: 12px;
  flex: 1;
}
.tb-printable-card__meta {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
  font-family: var(--tb-font-body);
  font-size: 12px;
  color: #3D6B2C;
  flex-wrap: wrap;
}
.tb-printable-card__btn {
  display: inline-block;
  background: #FFDE00;
  color: #3D6B2C;
  font-family: var(--tb-font-head);
  font-size: 13px;
  padding: 8px 18px;
  border-radius: 50px;
  border: 2px solid #3D6B2C;
  text-decoration: none;
  text-align: center;
}
.tb-printable-card__btn--soon {
  color: #999;
  font-family: var(--tb-font-body);
  font-size: 13px;
  font-style: italic;
}
@media (max-width: 900px) { .tb-printables-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .tb-printables-grid { grid-template-columns: 1fr; } }

/* ── 404 PAGE ────────────────────────────────────────────────────────── */
.tb-404-wrap {
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}
.tb-404-card {
  background: #97CCE8;
  border: 4px solid #8B5A2B;
  border-radius: 32px;
  padding: 56px 60px;
  text-align: center;
  max-width: 700px;
  width: 100%;
}
.tb-404-number {
  display: block;
  font-family: var(--tb-font-head);
  font-size: 7rem;
  color: #FFDE00;
  -webkit-text-stroke: 3px #3D6B2C;
  line-height: 1;
  margin-bottom: 8px;
}
.tb-404-emoji { font-size: 64px; display: block; margin-bottom: 16px; }
.tb-404-card h1 {
  font-family: var(--tb-font-head);
  color: #3D6B2C;
  font-size: clamp(1.4rem, 3vw, 2rem);
  margin-bottom: 16px;
  line-height: 1.2;
}
.tb-404-card > p {
  font-family: var(--tb-font-body);
  color: #3D6B2C;
  font-size: 1.05rem;
  max-width: 480px;
  margin: 0 auto 24px;
  line-height: 1.8;
}
.tb-404-search {
  display: flex;
  gap: 8px;
  max-width: 420px;
  margin: 0 auto 24px;
}
.tb-404-search input {
  flex: 1;
  padding: 12px 18px;
  border-radius: 50px;
  border: 2px solid #3D6B2C;
  font-family: var(--tb-font-body);
  font-size: 1rem;
  color: #3D6B2C;
  outline: none;
  background: white;
}
.tb-404-search button {
  background: #3D6B2C;
  color: #FFDE00;
  font-family: var(--tb-font-head);
  font-size: 1rem;
  padding: 12px 22px;
  border-radius: 50px;
  border: none;
  cursor: pointer;
  white-space: nowrap;
}
.tb-404-links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}
.tb-404-link {
  background: white;
  color: #3D6B2C;
  font-family: var(--tb-font-head);
  font-size: 14px;
  padding: 10px 18px;
  border-radius: 50px;
  border: 2px solid #3D6B2C;
  text-decoration: none;
  transition: background .15s;
}
.tb-404-link:hover { background: #FFDE00; }

/* ── SEARCH RESULTS PAGE ─────────────────────────────────────────────── */
.tb-search-hero {
  background: #3D6B2C;
  border-radius: 32px;
  padding: 40px 48px;
  margin: 32px 40px 24px;
  text-align: center;
}
.tb-search-hero .tb-section-title { color: #FFDE00; margin-bottom: 20px; }
.tb-search-form {
  display: flex;
  gap: 8px;
  max-width: 560px;
  margin: 0 auto;
}
.tb-search-form input {
  flex: 1;
  padding: 14px 22px;
  border-radius: 50px;
  border: 3px solid #FFDE00;
  font-family: var(--tb-font-body);
  font-size: 1rem;
  color: #3D6B2C;
  outline: none;
  background: white;
}
.tb-search-form input::placeholder { color: #9CC87A; }
.tb-search-form button {
  background: #FFDE00;
  color: #3D6B2C;
  font-family: var(--tb-font-head);
  font-size: 1rem;
  padding: 14px 28px;
  border-radius: 50px;
  border: none;
  cursor: pointer;
  white-space: nowrap;
}
.tb-search-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 16px;
}
.tb-search-chip {
  background: rgba(255,255,255,.18);
  color: #C8E6C9;
  font-family: var(--tb-font-body);
  font-size: 13px;
  padding: 5px 14px;
  border-radius: 50px;
  border: 1.5px solid rgba(255,255,255,.3);
  text-decoration: none;
  transition: background .15s;
}
.tb-search-chip:hover { background: rgba(255,255,255,.3); color: white; }
.tb-search-count {
  font-family: var(--tb-font-body);
  font-size: .9rem;
  color: #666;
  margin-bottom: 20px;
}
.tb-search-results { display: flex; flex-direction: column; gap: 4px; }
.tb-search-result-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 12px;
  border-radius: 12px;
  text-decoration: none;
  transition: background .15s;
  border-bottom: 1px solid #F0F0F0;
}
.tb-search-result-row:last-child { border-bottom: none; }
.tb-search-result-row:hover { background: #F0F9E8; }
.tb-search-result-icon { font-size: 32px; width: 48px; text-align: center; flex-shrink: 0; }
.tb-search-result-body { flex: 1; min-width: 0; }
.tb-search-result-type {
  background: #3D6B2C;
  color: white;
  font-family: var(--tb-font-head);
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 50px;
  display: inline-block;
  margin-bottom: 3px;
}
.tb-search-result-title {
  font-family: var(--tb-font-head);
  color: #3D6B2C;
  font-size: .95rem;
  display: block;
}
.tb-search-result-excerpt {
  font-family: var(--tb-font-body);
  font-size: .85rem;
  color: #666;
  display: block;
}
.tb-search-result-arrow {
  font-family: var(--tb-font-head);
  color: #3D6B2C;
  font-size: 1.2rem;
  flex-shrink: 0;
}

/* ── HEADER SEARCH ───────────────────────────────────────────────────── */
.tb-search-toggle {
  background: none;
  border: none;
  color: #3D6B2C;
  cursor: pointer;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background .15s;
  flex-shrink: 0;
}
.tb-search-toggle:hover { background: rgba(61,107,44,.1); }
.tb-header-search {
  position: relative;
  left: auto;
  right: auto;
  background: #3D6B2C;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 200;
  box-shadow: 0 4px 16px rgba(0,0,0,.2);
}
.tb-header-search-form {
  display: flex;
  flex: 1;
  gap: 8px;
  max-width: 640px;
  margin: 0 auto;
}
.tb-header-search-form input {
  flex: 1;
  padding: 10px 18px;
  border-radius: 50px;
  border: 2px solid #FFDE00;
  font-family: var(--tb-font-body);
  font-size: .95rem;
  color: #3D6B2C;
  outline: none;
  background: white;
}
.tb-header-search-form button {
  background: #FFDE00;
  color: #3D6B2C;
  font-family: var(--tb-font-head);
  font-size: .95rem;
  padding: 10px 22px;
  border-radius: 50px;
  border: none;
  cursor: pointer;
}
.tb-search-close {
  background: none;
  border: none;
  color: #C8E6C9;
  font-size: 1.2rem;
  cursor: pointer;
  padding: 8px;
  flex-shrink: 0;
}
.tb-search-close:hover { color: white; }

@media (max-width: 768px) {
  .tb-search-hero { margin: 16px; padding: 28px 20px; border-radius: 20px; }
  .tb-404-card { padding: 36px 24px; border-radius: 20px; }
  .tb-404-number { font-size: 5rem; }
  .tb-printables-filter { margin: 0 16px 20px; }
}

/* ── NAV DROPDOWN (Activities → Indoors / Outdoors) ─────────────────── */
.tb-nav-dropdown {
  position: relative;
  display: inline-flex;
}
.tb-nav-dropdown__toggle {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  /* Inherit pill appearance — don't reset browser button defaults here */
  background: transparent;
  border: 2.5px solid #3D6B2C;
  font-family: var(--tb-font-head);
  font-size: inherit;
  color: #3D6B2C;
  padding: 10px 16px;
  border-radius: 50px;
  line-height: 1.2;
  white-space: nowrap;
  transition: background .15s, border-color .15s;
}
.tb-nav-dropdown__toggle:hover,
.tb-nav-dropdown.is-open .tb-nav-dropdown__toggle {
  background: white;
  border-color: #FFDE00;
}
.tb-nav-dropdown__toggle.tb-cta {
  background: #FFDE00;
  border-color: #FFDE00;
}
.tb-nav-dropdown__toggle.tb-cta:hover {
  background: #FFDE00;
}
.tb-nav-dropdown__arrow {
  font-size: .85em;
  transition: transform .2s;
  display: inline-block;
  opacity: .8;
}
.tb-nav-dropdown.is-open .tb-nav-dropdown__arrow {
  transform: rotate(180deg);
}
.tb-nav-dropdown__menu {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: white;
  border: 2.5px solid #3D6B2C;
  border-radius: 16px;
  padding: 8px;
  min-width: 180px;
  z-index: 300;
  box-shadow: 0 8px 24px rgba(0,0,0,.15);
  flex-direction: column;
  gap: 4px;
}
.tb-nav-dropdown.is-open .tb-nav-dropdown__menu {
  display: flex;
}
.tb-nav-dropdown__item {
  font-family: var(--tb-font-head);
  font-size: .9rem;
  color: #3D6B2C;
  text-decoration: none;
  padding: 10px 14px;
  border-radius: 10px;
  display: block;
  white-space: nowrap;
  transition: background .15s;
}
.tb-nav-dropdown__item:hover {
  background: #F0F9E8;
  color: #2D5A1E;
}
@media (max-width: 768px) {
  .tb-nav-dropdown { display: flex; flex-direction: column; width: 100%; }
  .tb-nav-dropdown__menu {
    position: static;
    transform: none;
    box-shadow: none;
    border: none;
    border-left: 3px solid #FFDE00;
    border-radius: 0;
    padding: 4px 0 4px 12px;
    background: transparent;
  }
  .tb-nav-dropdown__menu { display: flex; } /* always visible on mobile */
  .tb-nav-dropdown__arrow { display: none; }
}


/* ── ADVENTURE STORY ARTICLE LAYOUT ─────────────────────────────────── */
.tb-story-hero-facts {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
}
.tb-adventure-story-container {
  max-width: 980px;
  padding-top: 8px;
  padding-bottom: 56px;
}
.tb-adventure-story {
  background: var(--tb-white, #FFFDF7);
  border: 4px solid var(--tb-green, #3D6B2C);
  border-radius: 32px;
  box-shadow: var(--shadow);
  padding: clamp(24px, 5vw, 52px);
}
.tb-adventure-story-kicker {
  background: rgba(151, 204, 232, .22);
  border: 3px solid var(--tb-green, #3D6B2C);
  border-radius: 20px;
  padding: 18px;
  margin-bottom: 30px;
}
.tb-adventure-story-kicker > p {
  margin: 0 0 12px;
  color: var(--tb-green, #3D6B2C);
  font-family: var(--tb-font-head);
  font-size: clamp(1.1rem, 2.6vw, 1.45rem);
}
.tb-adventure-story-facts {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.tb-adventure-story-copy {
  color: #222;
  font-family: var(--tb-font-body);
  font-size: clamp(1rem, 1.6vw, 1.1rem);
  line-height: 1.85;
}
.tb-adventure-story-copy > :first-child { margin-top: 0; }
.tb-adventure-story-copy h2,
.tb-adventure-story-copy h3 {
  color: var(--tb-green, #3D6B2C);
  font-family: var(--tb-font-head);
  line-height: 1.25;
  margin: 42px 0 14px;
}
.tb-adventure-story-copy h2 { font-size: clamp(1.45rem, 3vw, 2rem); }
.tb-adventure-story-copy h3 { font-size: clamp(1.2rem, 2.4vw, 1.5rem); }
.tb-adventure-story-copy ul,
.tb-adventure-story-copy ol { padding-left: 1.4rem; }
.tb-adventure-story-copy li { margin: 8px 0; }
.tb-adventure-story-message,
.tb-adventure-story-learning {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  background: rgba(245, 196, 0, .18);
  border: 3px solid var(--tb-green, #3D6B2C);
  border-radius: 20px;
  margin-top: 32px;
  padding: 20px;
}
.tb-adventure-story-message > span { font-size: 2rem; }
.tb-adventure-story-message h2,
.tb-adventure-story-learning h2 {
  color: var(--tb-green, #3D6B2C);
  font-family: var(--tb-font-head);
  margin: 0 0 6px;
  font-size: 1.35rem;
}
.tb-adventure-story-message p,
.tb-adventure-story-learning p { margin: 0; line-height: 1.7; }
.tb-adventure-story-learning { display: block; background: rgba(151, 204, 232, .22); }
.tb-adventure-story-back { margin: 34px 0 0; text-align: center; }
.tb-story-sound { margin-top: 12px; text-align: center; }
.tb-story-sound audio { width: min(100%, 400px); }
@media (max-width: 640px) {
  .tb-adventure-story { border-radius: 22px; }
  .tb-adventure-story-message { display: block; }
  .tb-adventure-story-message > span { display: block; margin-bottom: 8px; }
}

.tb-adventure-profile-image { margin: 0 0 28px; text-align:center; }
.tb-adventure-profile-image img { max-width: 680px; width:100%; height:auto; border:3px solid var(--tb-green, #3D6B2C); border-radius:22px; }

/* Adventure stories: keep each pasted paragraph visibly separate. */
.tb-adventure-story-copy p {
  margin: 0 0 1.35rem;
}
.tb-adventure-story-copy p:last-child {
  margin-bottom: 0;
}

/* Code-only repair: preserve true two-page story spreads. */
.tb-story-pages-grid > div:empty::after { content: ''; display: block; min-height: 260px; }
.tb-story-pages-grid h2 { font-family: var(--tb-font-head); font-size: 1.35rem; line-height: 1.25; margin: 0 0 14px; color: var(--tb-green); }
.tb-story-pages-grid p { margin: 0 0 1rem; }


/* Story pages use the whole content lane. Stories are books, not blog posts. */
.single-tb_story .tb-story-container {
  max-width: 1520px;
  padding-top: 20px;
  padding-bottom: 72px;
}
.single-tb_story .tb-story-reader-full {
  width: 100%;
  max-width: none;
  margin: 0;
}
.single-tb_story .tb-story-spread {
  width: 100%;
  padding: 34px 38px;
}
.single-tb_story .tb-story-pages-grid {
  width: 100%;
  min-height: 560px;
}
.single-tb_story .tb-story-pages-grid > div {
  min-width: 0;
  padding: 34px 36px;
}
@media (max-width: 900px) {
  .single-tb_story .tb-story-container { padding-left: 18px; padding-right: 18px; }
  .single-tb_story .tb-story-spread { padding: 22px; }
  .single-tb_story .tb-story-pages-grid { min-height: 0; }
  .single-tb_story .tb-story-pages-grid > div { padding: 26px 22px; }
}

/* ── Story pacing system: calm 5–10-year-old reading pages ─────────────── */
.single-tb_story .tb-story-page {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}
.single-tb_story .tb-story-page-story {
  font-size: 1.02rem;
  line-height: 1.7;
}
.single-tb_story .tb-story-page-story p {
  max-width: 32ch;
  margin: 0 0 1.1rem;
}
.single-tb_story .tb-story-page-story h2 {
  max-width: 24ch;
  font-size: clamp(1.25rem, 1.9vw, 1.65rem);
  margin-bottom: 1rem;
}
.single-tb_story .tb-story-book-cover,
.single-tb_story .tb-story-book-end,
.single-tb_story .tb-story-learning-page {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 12px;
}
.single-tb_story .tb-story-book-cover {
  background: rgba(151, 204, 232, .16);
}
.single-tb_story .tb-story-book-emoji {
  font-size: clamp(3rem, 6vw, 5.25rem);
  line-height: 1;
  margin-bottom: .75rem;
}
.single-tb_story .tb-story-book-kicker {
  max-width: none;
  margin: 0 0 .65rem;
  font-family: var(--tb-font-head);
  font-size: .92rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--tb-green);
}
.single-tb_story .tb-story-book-cover h2,
.single-tb_story .tb-story-book-end h2,
.single-tb_story .tb-story-learning-page h2 {
  max-width: 18ch;
  font-size: clamp(1.75rem, 3vw, 2.8rem);
  line-height: 1.12;
  margin: 0 0 1rem;
}
.single-tb_story .tb-story-book-chip {
  display: inline-block;
  padding: .45rem .8rem;
  border: 2px solid var(--tb-green);
  border-radius: 999px;
  background: #fff;
  font-family: var(--tb-font-head);
  color: var(--tb-green);
}
.single-tb_story .tb-story-learning-page {
  align-items: flex-start;
  text-align: left;
  background: rgba(245, 196, 0, .12);
}
.single-tb_story .tb-story-learning-page p {
  max-width: 30ch;
  margin: 0 0 1rem;
}
.single-tb_story .tb-story-learning-note {
  font-size: .94rem;
  font-style: italic;
}
.single-tb_story .tb-story-book-end p {
  max-width: 24ch;
  margin: 0 0 1.2rem;
}
.single-tb_story .tb-story-next-line {
  font-family: var(--tb-font-head);
  color: var(--tb-green);
}
@media (max-width: 900px) {
  .single-tb_story .tb-story-page-story { font-size: 1rem; }
  .single-tb_story .tb-story-page-story p { max-width: none; }
}


/* ── Story page styling: calm, varied picture-book pages ─────────────── */
.single-tb_story .tb-story-page {
  position: relative;
  overflow: hidden;
}
.single-tb_story .tb-story-page-content {
  position: relative;
  z-index: 1;
  width: 100%;
}
.single-tb_story .tb-story-page-story {
  --tb-story-accent: #3D6B2C;
  --tb-story-tint: #EAF7FF;
  background: #FFFDF7;
  border: 2px solid var(--tb-story-accent);
  box-shadow: inset 0 0 0 8px var(--tb-story-tint);
}
.single-tb_story .tb-story-page-story::before {
  content: '';
  position: absolute;
  top: 16px;
  left: 18px;
  right: 18px;
  height: 7px;
  border-top: 3px solid var(--tb-story-accent);
  border-bottom: 1px dashed var(--tb-story-accent);
  opacity: .72;
}
.single-tb_story .tb-story-page-story .tb-story-page-content {
  padding-top: 28px;
}
.single-tb_story .tb-story-page-story h2 {
  display: inline-block;
  max-width: calc(100% - 24px);
  padding: .45rem .78rem;
  border: 2px solid var(--tb-story-accent);
  border-radius: 12px 12px 12px 4px;
  background: #F5C400;
  color: #24461A;
  box-shadow: 3px 3px 0 rgba(61, 107, 44, .22);
}
.single-tb_story .tb-story-page-story p {
  padding-left: .75rem;
  border-left: 4px solid var(--tb-story-accent);
}
.single-tb_story .tb-story-page-tab {
  position: absolute;
  top: 0;
  right: 30px;
  width: 62px;
  height: 13px;
  background: var(--tb-story-accent);
  border-radius: 0 0 9px 9px;
  z-index: 2;
}
.single-tb_story .tb-story-page-number {
  position: absolute;
  right: 18px;
  bottom: 12px;
  min-width: 29px;
  height: 29px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--tb-story-accent);
  border-radius: 999px;
  background: #FFFDF7;
  color: var(--tb-story-accent);
  font-family: var(--tb-font-head);
  font-size: .8rem;
  line-height: 1;
}
.single-tb_story .tb-story-tone-1 { --tb-story-accent: #3D6B2C; --tb-story-tint: #EAF7FF; }
.single-tb_story .tb-story-tone-2 { --tb-story-accent: #3D6B2C; --tb-story-tint: #FFF4C7; }
.single-tb_story .tb-story-tone-3 { --tb-story-accent: #3D6B2C; --tb-story-tint: #EAF2DE; }
.single-tb_story .tb-story-tone-4 { --tb-story-accent: #3D6B2C; --tb-story-tint: #F5EDED; }
.single-tb_story .tb-story-page-learning {
  background: #FFF9E7;
  border: 3px solid #3D6B2C;
  box-shadow: inset 0 0 0 8px #F5C400;
}
.single-tb_story .tb-story-page-end {
  background: #EAF7FF;
  border: 3px solid #3D6B2C;
  box-shadow: inset 0 0 0 8px #D5ECD0;
}
.single-tb_story .tb-story-page-cover {
  background: #EAF7FF;
  border: 3px solid #3D6B2C;
  box-shadow: inset 0 0 0 8px #F5C400;
}
.single-tb_story .tb-story-page-cover .tb-story-book-cover,
.single-tb_story .tb-story-page-learning .tb-story-learning-page,
.single-tb_story .tb-story-page-end .tb-story-book-end {
  background: transparent;
}
.single-tb_story .tb-story-page-learning .tb-story-learning-page {
  position: relative;
}
.single-tb_story .tb-story-page-learning .tb-story-learning-page::after {
  content: 'Field Notes';
  display: inline-block;
  margin-top: auto;
  padding: .35rem .65rem;
  border: 2px solid #3D6B2C;
  border-radius: 999px;
  background: #FFFDF7;
  color: #3D6B2C;
  font-family: var(--tb-font-head);
  font-size: .8rem;
}
@media (max-width: 900px) {
  .single-tb_story .tb-story-page-story { box-shadow: inset 0 0 0 6px var(--tb-story-tint); }
  .single-tb_story .tb-story-page-story::before { left: 14px; right: 14px; }
  .single-tb_story .tb-story-page-tab { right: 22px; }
}

/* ── SECONDARY NAV — Teacher's Hub & Parent Base ─────────────────────── */
.tb-secondary-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 24px 6px;
  justify-content: flex-end;
  background: white;
  border-top: 1px solid rgba(61,107,44,.1);
}
.tb-secondary-pill {
  font-family: var(--tb-font-body);
  font-size: .78rem;
  color: #3D6B2C;
  text-decoration: none;
  padding: 4px 12px;
  border-radius: 50px;
  border: 1.5px solid transparent;
  transition: border-color .15s, background .15s;
  white-space: nowrap;
  opacity: .75;
}
.tb-secondary-pill:hover {
  border-color: #3D6B2C;
  opacity: 1;
  background: #F0F9E8;
}
@media (max-width: 768px) {
  .tb-secondary-nav { justify-content: center; padding: 6px 16px 8px; }
}

/* Footer wording update */
.tb-footer-affiliate-disclosure {
  text-align: center;
}
.tb-footer-affiliate-disclosure p {
  margin: 0 auto 0.45rem;
}
.tb-footer-affiliate-disclosure .tb-footer-wildlife-promise {
  font-weight: 800;
  color: #3D6B2C;
}

/* Field Guide decision tree: clear, calm clue steps and honest likely matches. */
.tb-id-help{margin:.25rem 0 1rem;color:#4e6a43;font-size:.95rem}
.tb-id-match-reason{display:block;margin-top:.4rem;color:#4e6a43;line-height:1.35;font-style:normal}
.tb-id-answer-choices{display:grid;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:.7rem}
.tb-id-answer{min-height:3.15rem;text-align:left;justify-content:flex-start}
.tb-id-progress{font-weight:700;color:#3d6b2c;letter-spacing:.02em}
@media (max-width:640px){.tb-id-answer-choices{grid-template-columns:1fr}.tb-id-answer{font-size:1rem}}


/* Field Guide likely-match cards: optional editor-selected image with a calm fallback. */
.tb-id-matches .tb-friend-chip{display:grid;grid-template-columns:78px minmax(0,1fr);grid-template-rows:auto auto auto;column-gap:.8rem;align-items:start}
.tb-id-match-visual{grid-row:1 / span 3;display:flex;width:78px;height:78px;overflow:hidden;align-items:center;justify-content:center;border:2px solid #8CCFEA;border-radius:14px;background:#EAF7FC}
.tb-id-match-visual img{display:block;width:100%;height:100%;object-fit:cover}
.tb-id-match-visual--placeholder{font-size:2.1rem;line-height:1}
.tb-id-matches .tb-friend-chip > strong{margin-top:.1rem}
.tb-id-matches .tb-friend-chip > small{min-width:0}
@media (max-width:640px){.tb-id-matches .tb-friend-chip{grid-template-columns:64px minmax(0,1fr)}.tb-id-match-visual{width:64px;height:64px}}

/* Shared Media Library image resolver: make resolved art sit cleanly in existing openings. */
.tb-story-book-cover-image { width: 100%; max-width: 230px; margin: 0 auto 12px; }
.tb-story-book-cover-image img { display:block; width:100%; aspect-ratio:4/3; object-fit:cover; border-radius:12px; border:3px solid #3D6B2C; }
.tb-activity-hero-media { width:96px; height:96px; margin:0 auto 12px; overflow:hidden; border:3px solid #3D6B2C; border-radius:50%; background:#FFFDF7; }
.tb-activity-hero-media img { width:100%; height:100%; object-fit:cover; display:block; }

/* Friend card images are wide, consistent openings — not raw square thumbnails. */
.tb-friend-card .tb-card-avatar {
  width: 100%;
  max-width: 100%;
  aspect-ratio: 4 / 3;
  min-height: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 14px;
  border: 3px solid #3D6B2C;
  border-radius: 12px;
  background: #D6F0FB;
}
.tb-friend-card .tb-card-avatar img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: cover;
  object-position: center;
}
.tb-friend-card .tb-card-avatar:not(:has(img)) {
  aspect-ratio: auto;
  min-height: 94px;
  border-style: dashed;
}
/* Image area stays separate from badge/name so a busy wildlife photo cannot eat the card hierarchy. */
.tb-friend-card .tb-card-top { padding: 18px; }


/* Friend flipbook: do not leave a giant empty photo frame when a later
   section has no hand-picked or species-matched image yet. */
.fb-page--text-only .fb-page-body { max-width: 58rem; margin: 0 auto; }
.fb-page--text-only .fb-think-box { max-width: 58rem; margin-left: auto; margin-right: auto; }

/* Related Friend cards restored beneath the profile activity row. */
.fb-related-friends { margin-top: 34px; padding-top: 26px; border-top: 3px dashed rgba(62,114,49,.38); }
.fb-related-friends > h2 { margin: 0 0 6px; color: var(--tb-green, #3e7231); font-family: var(--tb-font-head); font-size: clamp(1.45rem, 3vw, 2rem); }
.fb-related-friends > p { margin: 0 0 18px; max-width: 48rem; }
.fb-related-friends .tb-cards-grid { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }

/* ── HEADER LAYOUT REPAIR: keep desktop navigation on one clean row ───────── */
@media (min-width: 769px) {
  .tb-site-header {
    display: grid;
    grid-template-columns: 188px minmax(0, 1fr) max-content 46px;
    grid-template-areas: "logo primary secondary search";
    justify-content: initial;
    align-items: center;
    gap: 14px;
    padding: 14px 24px;
    flex-wrap: nowrap;
  }

  .tb-site-logo { grid-area: logo; }

  .tb-site-nav {
    grid-area: primary;
    display: flex;
    flex-wrap: nowrap;
    min-width: 0;
    gap: 8px;
    align-items: center;
    justify-content: center;
    overflow-x: auto;
    overflow-y: visible;
    scrollbar-width: none;
    padding: 6px 4px;
  }
  .tb-site-nav::-webkit-scrollbar { display: none; }
  .tb-site-nav > * { flex: 0 0 auto; }

  .tb-nav-pill,
  .tb-nav-dropdown__toggle {
    min-height: 46px;
    line-height: 1.15;
    padding: 8px 14px;
    white-space: nowrap;
  }

  .tb-secondary-nav {
    grid-area: secondary;
    display: flex;
    align-items: center;
    gap: 2px;
    justify-content: flex-end;
    padding: 0;
    background: transparent;
    border-top: 0;
    white-space: nowrap;
  }

  .tb-search-toggle {
    grid-area: search;
    justify-self: end;
  }

  /* Search opens as an overlay below the header, never as a sixth layout column. */
  .tb-header-search {
    position: absolute;
    top: calc(100% + 8px);
    right: 24px;
    left: auto;
    width: min(620px, calc(100vw - 48px));
    border: 3px solid #3D6B2C;
    border-radius: 18px;
  }
}

@media (max-width: 768px) {
  .tb-site-header {
    display: flex;
    grid-template-columns: none;
    grid-template-areas: none;
  }
  .tb-secondary-nav {
    width: 100%;
    order: 5;
    background: transparent;
    border-top: 0;
  }
  .tb-header-search {
    width: 100%;
  }
}


/* Header route repair: Activities is a real destination plus a separate menu arrow.
   Keep the dropdown visible above the header instead of clipping it inside a scrolling nav. */
@media (min-width: 769px) {
  .tb-site-nav { overflow: visible; }
  .tb-nav-dropdown { align-items: center; gap: 0; flex: 0 0 auto; }
  .tb-nav-dropdown__link {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    border-right-width: 0;
    box-shadow: none;
  }
  .tb-nav-dropdown__toggle {
    min-height: 46px;
    width: 38px;
    padding: 0 9px;
    border: 2.5px solid #3D6B2C;
    border-left: 2px solid #3D6B2C;
    border-radius: 0 50px 50px 0;
    background: #FFFDF7;
    color: #3D6B2C;
    font-family: var(--tb-font-head);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  .tb-nav-dropdown__toggle:hover,
  .tb-nav-dropdown.is-open .tb-nav-dropdown__toggle {
    background: #F5C400;
    border-color: #F5C400;
  }
  .tb-nav-dropdown__menu { z-index: 999; }
}
@media (max-width: 768px) {
  .tb-nav-dropdown { position: relative; }
  .tb-nav-dropdown__link { width: calc(100% - 52px); }
  .tb-nav-dropdown__toggle {
    position: absolute;
    top: 0;
    right: 0;
    min-height: 44px;
    width: 48px;
    border: 2.5px solid #3D6B2C;
    border-radius: 0 12px 12px 0;
    background: #FFFDF7;
    color: #3D6B2C;
  }
}


/* ── HEADER STABILITY REPAIR ───────────────────────────────────────────── */
/* Keep the accessibility skip link hidden until keyboard focus. */
.skip-link {
  top: 0 !important;
  left: 16px !important;
  transform: translateY(-160%) !important;
  width: auto !important;
  max-width: calc(100vw - 32px) !important;
  z-index: 10000 !important;
}
.skip-link:focus,
.skip-link:focus-visible {
  transform: translateY(12px) !important;
}

@media (min-width: 769px) {
  .tb-site-header {
    grid-template-columns: 190px minmax(520px, 1fr) max-content 50px !important;
    min-height: 104px;
    overflow: visible !important;
  }
  .tb-site-nav {
    overflow: visible !important;
    justify-content: center;
    min-width: 0;
  }
  .tb-site-nav > a,
  .tb-site-nav > .tb-nav-dropdown {
    position: relative;
    z-index: 2;
  }
  .tb-nav-dropdown {
    display: inline-flex !important;
    position: relative !important;
    align-items: stretch !important;
  }
  .tb-nav-dropdown__link {
    display: inline-flex !important;
    align-items: center !important;
    pointer-events: auto !important;
    position: relative !important;
    z-index: 3 !important;
  }
  .tb-nav-dropdown__toggle {
    position: relative !important;
    z-index: 4 !important;
    pointer-events: auto !important;
  }
  .tb-nav-dropdown__menu {
    z-index: 10001 !important;
  }
}

@media (max-width: 1160px) and (min-width: 769px) {
  .tb-site-header {
    grid-template-columns: 170px minmax(0, 1fr) 42px !important;
    grid-template-areas:
      "logo primary search"
      "logo secondary search" !important;
    row-gap: 4px;
  }
  .tb-secondary-nav {
    justify-content: center !important;
  }
}


/* ── HEADER FINAL STACKING REPAIR ─────────────────────────────────────── */
/* The Activities panel must sit above page heroes and never be covered by
   the first content section. Header-only correction. */
@media (min-width: 769px) {
  .tb-site-header {
    position: sticky !important;
    z-index: 5000 !important;
    isolation: isolate;
    overflow: visible !important;
  }

  .tb-site-nav,
  .tb-nav-dropdown {
    overflow: visible !important;
  }

  .tb-nav-dropdown.is-open {
    z-index: 5002 !important;
  }

  .tb-nav-dropdown__menu {
    z-index: 5003 !important;
    pointer-events: auto !important;
  }

  /* Keep normal page content beneath the opened menu. */
  #main-content,
  main,
  .tb-page-hero,
  .page-hero,
  .tb-main,
  .site-main {
    position: relative;
    z-index: 1;
  }

  .tb-nav-dropdown__toggle:focus-visible {
    outline: 3px solid #F5C400;
    outline-offset: 3px;
  }
}


/* ── HEADER CONTROL FINAL FIX: functional menus + reliable search close ── */
.tb-header-search[hidden] { display: none !important; }

@media (min-width: 769px) {
  .tb-site-header { overflow: visible !important; z-index: 6000 !important; }
  .tb-site-nav { overflow: visible !important; }
  .tb-nav-dropdown { position: relative !important; display: inline-flex !important; align-items: stretch !important; }
  .tb-nav-dropdown__menu {
    display: none;
    top: calc(100% + 8px) !important;
    left: 0 !important;
    right: auto !important;
    transform: none !important;
    z-index: 6100 !important;
    min-width: 220px;
  }
  .tb-nav-dropdown.is-open .tb-nav-dropdown__menu { display: flex !important; }
  .tb-nav-dropdown--about .tb-nav-dropdown__menu { min-width: 230px; }
  .tb-header-search {
    z-index: 6200 !important;
    padding-right: 64px !important;
  }
  .tb-search-close {
    position: absolute !important;
    top: 50% !important;
    right: 16px !important;
    transform: translateY(-50%) !important;
    width: 40px !important;
    height: 40px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 50% !important;
    color: #FFFFFF !important;
    background: transparent !important;
    font-size: 1.7rem !important;
    z-index: 1 !important;
  }
  .tb-search-close:hover,
  .tb-search-close:focus-visible { background: rgba(255,255,255,.16) !important; }
}

@media (max-width: 768px) {
  .tb-header-search[hidden] { display: none !important; }
  .tb-search-close { display: inline-flex !important; }
}


/* Gentle flipbook page-sound control */
.tb-page-sound-toggle {
  align-items: center;
  background: #ffffff;
  border: 2px solid #3D6B2C;
  border-radius: 999px;
  color: #3D6B2C;
  cursor: pointer;
  display: inline-flex;
  font-family: var(--tb-font-body);
  font-size: 0.88rem;
  font-weight: 800;
  gap: 0.35rem;
  line-height: 1;
  padding: 0.55rem 0.8rem;
  white-space: nowrap;
}
.tb-page-sound-toggle:hover,
.tb-page-sound-toggle:focus-visible {
  background: #EAF6FC;
  outline: 3px solid #F5C400;
  outline-offset: 2px;
}
.tb-story-nav .tb-page-sound-toggle,
.tb-flipbook-nav .tb-page-sound-toggle { margin-left: 0.35rem; }
@media (max-width: 640px) {
  .tb-page-sound-toggle span:last-child { display: none; }
  .tb-page-sound-toggle { padding: 0.62rem; }
}

/* Optional affiliate shelves: rendered only on Parent Base and Teacher Hub when complete items exist. */
.tb-affiliate-shelf {
  margin-top: 52px;
  padding: 32px;
  border: 2px solid #97CCE8;
  border-radius: 24px;
  background: #FFFDF7;
}
.tb-affiliate-shelf__heading { max-width: 760px; }
.tb-affiliate-shelf__eyebrow,
.tb-affiliate-card__eyebrow {
  margin: 0 0 5px;
  font-family: var(--tb-font-body);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #3D6B2C;
}
.tb-affiliate-shelf__intro {
  margin: 0;
  font-family: var(--tb-font-body);
  font-size: 1rem;
  line-height: 1.65;
  color: #243C55;
}
.tb-affiliate-shelf__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 18px;
  margin-top: 24px;
}
.tb-affiliate-card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding: 22px;
  border: 2px solid #C8E6C9;
  border-radius: 18px;
  background: #FFFFFF;
}
.tb-affiliate-card h3 {
  margin: 0 0 8px;
  font-family: var(--tb-font-head);
  font-size: 1.15rem;
  line-height: 1.25;
  color: #3D6B2C;
}
.tb-affiliate-card p:not(.tb-affiliate-card__eyebrow) {
  margin: 0 0 18px;
  font-family: var(--tb-font-body);
  font-size: .95rem;
  line-height: 1.55;
  color: #243C55;
}
.tb-affiliate-card__button { margin-top: auto; align-self: flex-start; }
.tb-affiliate-shelf__disclosure {
  margin: 22px 0 0;
  padding-top: 16px;
  border-top: 1px solid #C8E6C9;
  font-family: var(--tb-font-body);
  font-size: .82rem;
  line-height: 1.5;
  color: #52667A;
}
@media (max-width: 640px) {
  .tb-affiliate-shelf { padding: 24px 18px; }
}

/* ── SINGLE PRINTABLE — DEDICATED DOWNLOAD PAGE ─────────────────────── */
.tb-single-printable__hero .tb-emoji-hero { font-size: 4.5rem; line-height: 1; margin-bottom: 12px; }
.tb-single-printable__chip { background: #FFFFFF; border: 2px solid #3D6B2C; border-radius: 999px; color: #3D6B2C; padding: 6px 14px; }
.tb-single-printable__download { display: flex; align-items: center; gap: 28px; max-width: 1120px; }
.tb-single-printable__download-icon { flex: 0 0 auto; width: 96px; height: 96px; display: flex; align-items: center; justify-content: center; border: 3px solid #3D6B2C; border-radius: 24px; background: #F5C400; font-size: 3.5rem; }
.tb-single-printable__download-copy { min-width: 0; }
.tb-single-printable__download-copy h2 { font-family: var(--tb-font-head); color: #3D6B2C; font-size: 1.7rem; margin: 0 0 8px; }
.tb-single-printable__download-copy p { font-family: var(--tb-font-body); font-size: 1.05rem; line-height: 1.7; margin: 0; color: #2E2E2E; }
.tb-single-printable__meta { display: flex; flex-wrap: wrap; gap: 12px; margin: 16px 0; font-family: var(--tb-font-body); font-weight: 700; color: #3D6B2C; }
.tb-single-printable__meta span { padding: 7px 12px; border: 2px solid #3D6B2C; border-radius: 999px; background: #EEF8FC; }
.tb-single-printable__download-button { margin-top: 4px; }
.tb-single-printable__pending { color: #6A4A2C !important; font-weight: 700; }
.tb-single-printable__content { max-width: 1120px; }
.tb-single-printable__rights { max-width: 1120px; }
@media (max-width: 768px) {
  .tb-single-printable__download { flex-direction: column; align-items: flex-start; }
  .tb-single-printable__download-icon { width: 76px; height: 76px; font-size: 2.6rem; border-radius: 20px; }
}

/* ═══════════════════════════════════════════════════════════════
   EXPLORER BADGE SYSTEM
   Badge bar, individual badge items, toast notification.
═══════════════════════════════════════════════════════════════ */

.tb-badge-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  padding: 16px 0;
}

.tb-badge-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 12px 10px 8px;
  border-radius: 12px;
  min-width: 72px;
  text-align: center;
  transition: transform .15s ease, box-shadow .15s ease;
  cursor: default;
}

.tb-badge-item--earned {
  background: var(--tb-yellow, #FFDE00);
  border: 2px solid var(--tb-green, #3D6B2C);
  box-shadow: 0 2px 8px rgba(61,107,44,.18);
}

.tb-badge-item--locked {
  background: #f0f0f0;
  border: 2px dashed #ccc;
  opacity: .55;
  filter: grayscale(1);
}

.tb-badge-item--earned:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(61,107,44,.22);
}

.tb-badge-icon {
  font-size: 1.8rem;
  line-height: 1;
  display: block;
}

.tb-badge-label {
  font-family: var(--tb-font-hand, 'Nunito', sans-serif);
  font-size: .72rem;
  font-weight: 700;
  color: var(--tb-navy, #1a2e1a);
  line-height: 1.2;
  max-width: 72px;
}

.tb-badge-bar-summary {
  font-family: var(--tb-font-hand, 'Nunito', sans-serif);
  font-size: .9rem;
  color: var(--tb-green, #3D6B2C);
  text-align: center;
  margin: 4px 0 0;
}

/* Toast notification */
.tb-badge-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(120px);
  background: var(--tb-green, #3D6B2C);
  color: #fff;
  padding: 14px 24px;
  border-radius: 40px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--tb-font-display, 'Fredoka One', cursive);
  font-size: 1rem;
  z-index: 9999;
  box-shadow: 0 6px 24px rgba(0,0,0,.22);
  transition: transform .35s cubic-bezier(.34,1.56,.64,1), opacity .35s ease;
  opacity: 0;
  pointer-events: none;
}

.tb-badge-toast--show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.tb-badge-toast-icon {
  font-size: 1.5rem;
  line-height: 1;
}

/* ═══════════════════════════════════════════════════════════════
   CONNECTED CONTENT (friend → stories/activities/printables)
═══════════════════════════════════════════════════════════════ */

.tb-connected-content {
  background: var(--tb-sky, #97CCE8)18;
  border-top: 3px solid var(--tb-sky, #97CCE8);
  padding: 48px 0;
  margin-top: 48px;
}

.tb-connected-col-heading {
  font-family: var(--tb-font-display, 'Fredoka One', cursive);
  font-size: 1.1rem;
  color: var(--tb-green, #3D6B2C);
  margin: 0 0 14px;
}

.tb-connected-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 10px;
  border: 2px solid transparent;
  text-decoration: none;
  color: var(--tb-navy, #1a2e1a);
  font-family: var(--tb-font-hand, 'Nunito', sans-serif);
  font-size: .95rem;
  margin-bottom: 8px;
  transition: background .15s ease, border-color .15s ease, transform .12s ease;
  min-height: 44px;
  touch-action: manipulation;
}

.tb-connected-item:hover,
.tb-connected-item:focus-visible {
  background: var(--tb-yellow, #FFDE00)44;
  border-color: var(--tb-yellow, #FFDE00);
  transform: translateX(3px);
  outline: none;
}

.tb-connected-item:focus-visible {
  outline: 3px solid var(--tb-green, #3D6B2C);
  outline-offset: 2px;
}

.tb-connected-item-icon {
  font-size: 1.4rem;
  flex-shrink: 0;
}

/* ═══════════════════════════════════════════════════════════════
   HOMEPAGE SEASONAL SECTION
═══════════════════════════════════════════════════════════════ */

.tb-seasonal-section {
  background: linear-gradient(135deg, #f9fdf4 0%, #e8f5e1 100%);
  border-top: 3px solid var(--tb-green, #3D6B2C);
  border-bottom: 3px solid var(--tb-green, #3D6B2C);
}

.tb-seasonal-tip {
  font-style: italic;
}

/* ═══════════════════════════════════════════════════════════════
   HOMEPAGE STORIES SECTION
═══════════════════════════════════════════════════════════════ */

.tb-stories-home-section {
  background: #f0f8ff;
  border-top: 3px solid var(--tb-sky, #97CCE8);
  border-bottom: 3px solid var(--tb-sky, #97CCE8);
}

/* ═══════════════════════════════════════════════════════════════
   FRIENDS ARCHIVE FILTER BAR
═══════════════════════════════════════════════════════════════ */

.tb-friends-filter-bar {
  padding: 20px 24px 4px;
  background: #fafafa;
  border-bottom: 2px solid #eee;
}

.tb-filter-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.tb-filter-row-label {
  font-family: var(--tb-font-hand, 'Nunito', sans-serif);
  font-size: .85rem;
  font-weight: 700;
  color: var(--tb-green, #3D6B2C);
  min-width: 90px;
}

.tb-filter-row--clear {
  justify-content: space-between;
  padding-top: 4px;
  border-top: 1px solid #eee;
  margin-top: 4px;
}

.tb-filter-clear-link {
  font-family: var(--tb-font-hand, 'Nunito', sans-serif);
  font-size: .85rem;
  color: #888;
  text-decoration: none;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 0 8px;
  touch-action: manipulation;
}

.tb-filter-clear-link:hover { color: var(--tb-green, #3D6B2C); }

.tb-filter-count {
  font-family: var(--tb-font-hand, 'Nunito', sans-serif);
  font-size: .85rem;
  color: #666;
}

/* ═══════════════════════════════════════════════════════════════
   ACCESSIBILITY STATEMENT PROSE
═══════════════════════════════════════════════════════════════ */

.tb-prose h2 {
  font-family: var(--tb-font-display, 'Fredoka One', cursive);
  color: var(--tb-green, #3D6B2C);
  font-size: 1.35rem;
  margin: 36px 0 12px;
}

.tb-prose p {
  margin: 0 0 18px;
}

.tb-prose a {
  color: var(--tb-green, #3D6B2C);
}

/* ═══════════════════════════════════════════════════════════════
   COLORING PAGE INTRO BOX
═══════════════════════════════════════════════════════════════ */

.tb-coloring-intro {
  background: var(--tb-yellow, #FFDE00)22;
  border: 2px dashed var(--tb-yellow, #FFDE00);
  border-radius: 16px;
  padding: 24px 28px;
  margin-bottom: 32px;
}

@media (prefers-reduced-motion: reduce) {
  .tb-badge-toast {
    transition: opacity .15s ease;
    transform: translateX(-50%) translateY(0);
  }
  .tb-badge-toast--show { opacity: 1; }
  .tb-badge-item { transition: none; }
  .tb-connected-item { transition: none; }
}

.tb-filter-pill:focus-visible {
  outline: 3px solid var(--tb-green, #3D6B2C);
  outline-offset: 3px;
  border-radius: 20px;
}
.tb-filter-pill.active:focus-visible {
  outline: 3px solid var(--tb-green, #3D6B2C);
  outline-offset: 3px;
}
.tb-filter-clear-link:focus-visible {
  outline: 3px solid var(--tb-green, #3D6B2C);
  outline-offset: 2px;
  border-radius: 4px;
}
.tb-social-pill:focus-visible {
  outline: 3px solid #FFDE00;
  outline-offset: 3px;
  border-radius: 40px;
}

/* Filter pill aria-current — archive-tb_friend.php uses aria-current on <a> tags */
.tb-filter-pill[aria-current="true"] {
  background: var(--tb-green, #3D6B2C);
  color: #fff;
  border-color: var(--tb-green, #3D6B2C);
  font-weight: 700;
}
.tb-filter-pill[aria-current="true"]:focus-visible {
  outline: 3px solid var(--tb-yellow, #FFDE00);
  outline-offset: 3px;
}

/* ═══════════════════════════════════════════════════════════════
   NAV aria-current STYLES
   Active section indicators for main nav and secondary nav.
   aria-current="page" = exact match (you are here)
   aria-current="true" = parent of current section
═══════════════════════════════════════════════════════════════ */

/* Top-level pills — exact current page */
.tb-nav-pill[aria-current="page"] {
  background: var(--tb-yellow, #FFDE00);
  color: var(--tb-green, #3D6B2C);
  border-color: var(--tb-yellow, #FFDE00);
  font-weight: 700;
}

/* Top-level pills — parent of current section */
.tb-nav-pill[aria-current="true"] {
  border-color: var(--tb-yellow, #FFDE00);
  color: var(--tb-yellow, #FFDE00);
  font-weight: 700;
}

/* Dropdown items — exact current page */
.tb-nav-dropdown__item[aria-current="page"] {
  background: var(--tb-yellow, #FFDE00);
  color: var(--tb-green, #3D6B2C);
  font-weight: 700;
  border-radius: 8px;
}

/* Secondary nav pills (Teacher's Hub, Parent Base) */
.tb-secondary-pill[aria-current="page"] {
  background: var(--tb-yellow, #FFDE00);
  color: var(--tb-green, #3D6B2C);
  font-weight: 700;
}

/* Dropdown — stay open indicator when a child is active.
   The --active modifier class is set by PHP when tb_nav_activities or
   tb_nav_about is true. This keeps the arrow rotated so the parent
   section is visually distinct even without hover. */
.tb-nav-dropdown--active > .tb-nav-dropdown__toggle .tb-nav-dropdown__arrow {
  transform: rotate(180deg);
}

/* Focus styles for current items — ensure ring is still visible */
.tb-nav-pill[aria-current]:focus-visible {
  outline: 3px solid var(--tb-green, #3D6B2C);
  outline-offset: 3px;
}
.tb-nav-pill[aria-current="page"]:focus-visible {
  outline: 3px solid var(--tb-green, #3D6B2C);
  outline-offset: 3px;
}
.tb-secondary-pill[aria-current="page"]:focus-visible {
  outline: 3px solid var(--tb-green, #3D6B2C);
  outline-offset: 3px;
}
.tb-nav-dropdown__item[aria-current="page"]:focus-visible {
  outline: 3px solid var(--tb-green, #3D6B2C);
  outline-offset: 2px;
}

/* Pin overflow safety — ensures pin body never clips at SVG edges */
.loc-map-svg-wrap {
  padding-top: 20px;
  margin-top: -20px;
}
.loc-backyard-map {
  overflow: visible;
}

/* Pin overflow safety at all breakpoints */
@media (max-width: 768px) {
  .loc-map-svg-wrap {
    overflow-x: auto;
    overflow-y: visible;
    padding-top: 24px;
    margin-top: -24px;
  }
  .loc-backyard-map {
    overflow: visible;
    min-width: 320px;
  }
}
@media (max-width: 480px) {
  .loc-backyard-map {
    min-width: 280px;
  }
}

/* SMIL pin animation respects reduced motion */
@media (prefers-reduced-motion: reduce) {
  .loc-map-pin animateTransform,
  g animateTransform {
    display: none;
  }
}
