/* ══════════════════════════════════════════════
   KIDSLEARN DEMO — STYLE.CSS
   Tablet-first design matching the real app
   ══════════════════════════════════════════════ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --ocean-50: #e6f4fa; --ocean-100: #b3dff0; --ocean-200: #80cae6;
  --ocean-300: #4db5dc; --ocean-400: #26a5d4; --ocean-500: #0891b2;
  --ocean-600: #067a97; --ocean-700: #05637b; --ocean-800: #034c60;
  --ocean-900: #023544;
  --coral-50: #fff1ee; --coral-100: #ffd6cc; --coral-200: #ffb8a8;
  --coral-300: #ff9a84; --coral-400: #ff7f66; --coral-500: #f56550;
  --coral-600: #d94d3a; --coral-700: #b53828; --coral-800: #8f2518;
  --coral-900: #6b150c;
  --forest-50: #e8f5e9; --forest-100: #c8e6c9; --forest-300: #81c784;
  --forest-500: #4caf50; --forest-700: #388e3c; --forest-900: #1b5e20;
  --sand-50: #fdf8f0; --sand-100: #f9ecda; --sand-200: #f3ddbf;
  --sand-300: #ecc99e; --sand-400: #e5b87e; --sand-500: #d4a05a;
  --sand-600: #b8883f; --sand-700: #956d2f; --sand-800: #725320;
  --sunshine-50: #fff9e6; --sunshine-100: #fff0b3; --sunshine-500: #ffc107;
  --sunshine-700: #b78500; --sunshine-900: #704f00;

  --radius: 1rem;
  --radius-lg: 1.5rem;
  --sidebar-w: 240px;
  --font: 'Nunito', system-ui, sans-serif;

  /* Light mode */
  --bg: var(--sand-50);
  --bg-card: #fff;
  --bg-sidebar: #fff;
  --text: #1a1a2e;
  --text-secondary: var(--sand-600);
  --border: var(--sand-200);
  --border-subtle: var(--sand-100);
}

body {
  font-family: var(--font);
  background: #e8e0d4;
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ─── Dark mode (scoped to app viewport) ─── */
.demo-app.dark {
  --bg: #1a1a2e;
  --bg-card: rgba(255,255,255,0.05);
  --bg-sidebar: #1f1f38;
  --text: #e8e8f0;
  --text-secondary: var(--sand-400);
  --border: rgba(255,255,255,0.15);
  --border-subtle: rgba(255,255,255,0.1);
}


/* ══════════════════════════════════════════════
   PITCH SECTION
   ══════════════════════════════════════════════ */
.pitch {
  padding: 3rem 2rem 2.5rem;
  text-align: center;
  max-width: 960px;
  margin: 0 auto;
}
.pitch-title {
  font-size: 2.75rem;
  font-weight: 800;
  color: var(--ocean-600);
  margin-bottom: 0.15rem;
}
.pitch-tagline {
  font-size: 1.15rem;
  color: var(--sand-600);
  font-weight: 600;
  margin-bottom: 2rem;
}
.pitch-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
  text-align: left;
}
.pitch-card {
  background: #fff;
  border: 1px solid var(--sand-100);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.pitch-card h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--ocean-700);
  margin-bottom: 0.4rem;
}
.pitch-card p {
  font-size: 0.85rem;
  color: var(--sand-700);
  line-height: 1.55;
}


/* ══════════════════════════════════════════════
   TABLET FRAME (iPad-style device mockup)
   ══════════════════════════════════════════════ */
.demo-section {
  padding: 0 1rem 2.5rem;
  display: flex;
  justify-content: center;
}

.tablet-frame {
  position: relative;
  width: 100%;
  max-width: 1140px;
  /* iPad landscape aspect approx 4:3 — use fixed height for consistency */
  height: min(75vh, 680px);
  background: #1a1a1a;
  border-radius: 24px;
  padding: 12px;
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.08),
    0 20px 60px rgba(0,0,0,0.35),
    0 4px 12px rgba(0,0,0,0.15),
    inset 0 1px 0 rgba(255,255,255,0.06);
}

.tablet-camera {
  position: absolute;
  top: 50%;
  left: 6px;
  transform: translateY(-50%);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #2a2a2e;
  box-shadow: inset 0 0 2px rgba(255,255,255,0.1);
  z-index: 10;
}

.tablet-home-indicator {
  position: absolute;
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 4px;
  border-radius: 2px;
  background: rgba(255,255,255,0.2);
}

/* ─── App viewport (inside the tablet bezel) ─── */
.demo-app {
  width: 100%;
  height: 100%;
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  background: var(--bg);
  transition: background 0.3s;
  position: relative;
}


/* ══════════════════════════════════════════════
   SIDEBAR
   ══════════════════════════════════════════════ */
.demo-sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: background 0.3s;
}

.sidebar-top {
  padding: 1rem 0.75rem 0.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.sidebar-logo {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--ocean-600);
  padding: 0 0.25rem 0.6rem;
}
.demo-app.dark .sidebar-logo { color: var(--ocean-400); }

.sidebar-search {
  position: relative;
  margin-bottom: 0.6rem;
}
.sidebar-search input {
  width: 100%;
  padding: 0.5rem 0.65rem 0.5rem 2rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 0.8rem;
  outline: none;
  cursor: default;
}
.search-icon {
  position: absolute;
  left: 0.55rem;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 14px;
  color: var(--text-secondary);
}

.sidebar-nav { display: flex; flex-direction: column; gap: 2px; margin-bottom: 0.35rem; }

.nav-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.55rem 0.65rem;
  border: none;
  border-radius: var(--radius);
  background: transparent;
  color: var(--sand-700);
  font-family: var(--font);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  text-align: left;
  transition: background 0.15s;
}
.demo-app.dark .nav-btn { color: var(--sand-300); }
.nav-btn:hover { background: var(--sand-100); }
.demo-app.dark .nav-btn:hover { background: rgba(255,255,255,0.08); }
.nav-btn.active { background: var(--ocean-100); color: var(--ocean-700); }
.demo-app.dark .nav-btn.active { background: rgba(8,145,178,0.2); color: var(--ocean-300); }
.nav-btn svg { width: 18px; height: 18px; flex-shrink: 0; }

.sidebar-divider {
  padding: 0.6rem 0.65rem 0.25rem;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  border-top: 1px solid var(--border-subtle);
  margin-top: 0.15rem;
}

.sidebar-topics {
  display: flex;
  flex-direction: column;
  gap: 1px;
  flex: 1;
  overflow-y: auto;
}
.topic-btn {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.4rem 0.65rem;
  border: none;
  border-radius: var(--radius);
  background: transparent;
  color: var(--sand-700);
  font-family: var(--font);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}
.demo-app.dark .topic-btn { color: var(--sand-300); }
.topic-btn:hover { background: var(--sand-100); }
.demo-app.dark .topic-btn:hover { background: rgba(255,255,255,0.08); }
.topic-btn.active { background: var(--coral-100); color: var(--coral-700); }
.demo-app.dark .topic-btn.active { background: rgba(245,101,80,0.2); color: var(--coral-300); }

.sidebar-bottom { padding: 0 0.75rem 0.6rem; }
.sidebar-footer {
  border-top: 1px solid var(--border-subtle);
  padding-top: 0.5rem;
  margin-top: 0.35rem;
}
.icon-moon { display: none; }
.demo-app.dark .icon-sun { display: none; }
.demo-app.dark .icon-moon { display: block; }


/* ══════════════════════════════════════════════
   MAIN CONTENT AREA + SCREENS
   ══════════════════════════════════════════════ */
.demo-main {
  flex: 1;
  position: relative;
  overflow: hidden;
  background: var(--bg);
  transition: background 0.3s;
}

.demo-screen {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  overflow-y: auto;
  overflow-x: hidden;
}
.demo-screen.active {
  opacity: 1;
  pointer-events: auto;
}

.screen-pad {
  padding: 1.25rem 1.5rem 2rem;
}


/* ══════════════════════════════════════════════
   CONTENT CARDS (used in home + explore)
   ══════════════════════════════════════════════ */
.content-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  border: 1px solid var(--border-subtle);
  cursor: pointer;
  transition: box-shadow 0.2s, transform 0.15s;
}
.content-card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  transform: translateY(-2px);
}
.content-card:active {
  transform: scale(0.98);
}

.card-hero {
  height: 130px;
  position: relative;
  overflow: hidden;
  background: var(--sand-100);
}
.card-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.age-badge {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-size: 0.65rem;
  font-weight: 700;
  z-index: 2;
}
.age-6-8 { background: var(--forest-100); color: var(--forest-700); }
.age-9-10 { background: var(--ocean-100); color: var(--ocean-700); }
.age-11-12 { background: var(--coral-100); color: var(--coral-700); }
.age-all { background: var(--sunshine-100); color: var(--sunshine-700); }
.demo-app.dark .age-6-8 { background: rgba(76,175,80,0.25); color: var(--forest-300); }
.demo-app.dark .age-9-10 { background: rgba(8,145,178,0.25); color: var(--ocean-300); }
.demo-app.dark .age-11-12 { background: rgba(245,101,80,0.25); color: var(--coral-300); }
.demo-app.dark .age-all { background: rgba(255,193,7,0.25); color: var(--sunshine-100); }

.card-body { padding: 0.7rem 0.85rem; }
.card-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--ocean-900);
  margin-bottom: 0.2rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.demo-app.dark .card-title { color: var(--ocean-200); }
.card-desc {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-bottom: 0.4rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-meta {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}
.subject-tag {
  padding: 0.1rem 0.45rem;
  background: var(--sand-100);
  color: var(--sand-700);
  font-size: 0.65rem;
  font-weight: 600;
  border-radius: 999px;
}
.demo-app.dark .subject-tag { background: rgba(255,255,255,0.1); color: var(--sand-300); }
.type-tag { font-size: 0.65rem; color: var(--text-secondary); text-transform: capitalize; }
.inst-tag { font-size: 0.65rem; color: var(--ocean-600); margin-left: auto; }
.demo-app.dark .inst-tag { color: var(--ocean-400); }


/* ══════════════════════════════════════════════
   HOME — Horizontal scroll rows
   ══════════════════════════════════════════════ */
.row-section { margin-bottom: 1.5rem; }
.row-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.6rem;
}
.row-header h2 { font-size: 1.05rem; font-weight: 700; color: var(--ocean-800); }
.demo-app.dark .row-header h2 { color: var(--ocean-300); }
.inst-emoji { font-size: 1.25rem; }

.scroll-row {
  display: flex;
  gap: 0.85rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  scroll-snap-type: x mandatory;
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.scroll-row::-webkit-scrollbar { display: none; }
.scroll-row .content-card {
  min-width: 220px;
  max-width: 260px;
  flex-shrink: 0;
  scroll-snap-align: start;
}


/* ══════════════════════════════════════════════
   EXPLORE PAGE
   ══════════════════════════════════════════════ */
.explore-tabs {
  display: flex;
  gap: 0.4rem;
  margin-bottom: 1rem;
}
.explore-tab {
  padding: 0.45rem 1.1rem;
  border-radius: var(--radius-lg);
  font-family: var(--font);
  font-weight: 700;
  font-size: 0.85rem;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--sand-700);
  cursor: pointer;
  transition: all 0.15s;
}
.demo-app.dark .explore-tab { background: rgba(255,255,255,0.08); color: var(--sand-300); border-color: var(--border); }
.explore-tab.active { background: var(--ocean-500); color: #fff; border-color: var(--ocean-500); }

.subject-bubbles { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.25rem; }
.subject-bubble {
  padding: 0.5rem 1.1rem;
  border-radius: var(--radius-lg);
  font-family: var(--font);
  font-weight: 700;
  font-size: 0.85rem;
  border: 2px solid var(--border);
  background: var(--bg-card);
  color: var(--sand-800);
  cursor: pointer;
  transition: all 0.15s;
}
.demo-app.dark .subject-bubble { background: rgba(255,255,255,0.08); color: var(--sand-200); border-color: var(--border); }
.subject-bubble:hover { border-color: var(--coral-300); }
.subject-bubble.active { background: var(--coral-500); color: #fff; border-color: var(--coral-500); transform: scale(1.05); }

.explore-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.85rem;
}
.explore-inst-section { margin-bottom: 1.5rem; }


/* ══════════════════════════════════════════════
   CONTENT VIEWER
   ══════════════════════════════════════════════ */
.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: none;
  border: none;
  font-family: var(--font);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--ocean-600);
  cursor: pointer;
  margin-bottom: 0.85rem;
  padding: 0.2rem 0;
}
.demo-app.dark .back-btn { color: var(--ocean-400); }
.back-btn svg { width: 16px; height: 16px; }

.viewer-hero {
  height: 180px;
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 1rem;
  position: relative;
  background: var(--sand-100);
}
.viewer-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.viewer-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--ocean-900);
  margin-bottom: 0.2rem;
}
.demo-app.dark .viewer-title { color: var(--ocean-200); }
.viewer-desc { font-size: 0.9rem; color: var(--text-secondary); margin-bottom: 0.4rem; }
.viewer-meta { display: flex; gap: 0.5rem; align-items: center; margin-bottom: 1.25rem; flex-wrap: wrap; }

.viewer-body h2 { font-size: 1.15rem; font-weight: 700; color: var(--ocean-800); margin: 1.25rem 0 0.4rem; }
.demo-app.dark .viewer-body h2 { color: var(--ocean-300); }
.viewer-body p { margin-bottom: 0.65rem; line-height: 1.7; font-size: 0.9rem; }
.viewer-body ul, .viewer-body ol { margin: 0 0 0.65rem 1.5rem; font-size: 0.9rem; }
.viewer-body li { margin-bottom: 0.3rem; line-height: 1.6; }
.viewer-body strong { font-weight: 700; }
.viewer-body em { font-style: italic; }

.viewer-inline-img {
  border-radius: var(--radius);
  overflow: hidden;
  margin: 0.75rem 0;
  max-height: 160px;
}
.viewer-inline-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}


/* ─── Discovery spots ─── */
.discovery-spot {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.65rem;
  border: 3px solid var(--coral-300);
  border-radius: var(--radius);
  background: var(--coral-50);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--coral-700);
  cursor: pointer;
  animation: jiggle 2s ease-in-out infinite;
  margin: 0.4rem 0;
  max-width: 190px;
}
.demo-app.dark .discovery-spot { background: rgba(245,101,80,0.15); border-color: var(--coral-500); color: var(--coral-300); }
.spot-q {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--coral-500);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 800;
  flex-shrink: 0;
}
.spot-float-left { float: left; margin-right: 0.85rem; clear: left; }
.spot-float-right { float: right; margin-left: 0.85rem; clear: right; }

/* Reveal overlay */
.reveal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 200;
  align-items: flex-end;
  justify-content: center;
}
.reveal-overlay.open { display: flex; }
.reveal-panel {
  background: #fff;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  padding: 1.75rem;
  max-width: 560px;
  width: 100%;
  max-height: 55vh;
  overflow-y: auto;
  animation: slideUp 0.3s ease;
  position: relative;
}
.reveal-close {
  position: absolute;
  top: 0.6rem;
  right: 0.85rem;
  background: none;
  border: none;
  font-size: 1.4rem;
  cursor: pointer;
  color: var(--sand-500);
  line-height: 1;
}
.reveal-panel h3 { font-size: 1.15rem; font-weight: 700; color: var(--ocean-700); margin-bottom: 0.6rem; }
.reveal-panel p { font-size: 0.9rem; line-height: 1.7; color: var(--sand-700); }


/* ══════════════════════════════════════════════
   QUIZ
   ══════════════════════════════════════════════ */
.quiz-section { margin-top: 1.5rem; border-top: 2px solid var(--border); padding-top: 1.25rem; }
.quiz-banner { text-align: center; padding: 1.5rem; }
.quiz-banner h3 { font-size: 1.3rem; font-weight: 800; color: var(--ocean-700); margin-bottom: 0.6rem; }
.demo-app.dark .quiz-banner h3 { color: var(--ocean-300); }

.btn-primary {
  padding: 0.55rem 1.5rem;
  border-radius: var(--radius-lg);
  background: var(--ocean-500);
  color: #fff;
  font-family: var(--font);
  font-weight: 700;
  font-size: 0.9rem;
  border: none;
  cursor: pointer;
  transition: background 0.15s;
}
.btn-primary:hover { background: var(--ocean-600); }
.btn-primary:disabled { opacity: 0.5; cursor: default; }

.quiz-progress { height: 5px; background: var(--sand-200); border-radius: 3px; margin-bottom: 1rem; overflow: hidden; }
.demo-app.dark .quiz-progress { background: rgba(255,255,255,0.1); }
.quiz-progress-fill { height: 100%; background: var(--ocean-500); border-radius: 3px; transition: width 0.3s; }

.quiz-question-text { font-size: 1.05rem; font-weight: 700; margin-bottom: 0.85rem; }
.quiz-options { display: flex; flex-direction: column; gap: 0.45rem; }
.quiz-option {
  padding: 0.75rem 0.85rem;
  border-radius: var(--radius);
  border: 2px solid var(--border);
  background: var(--bg-card);
  font-family: var(--font);
  font-size: 0.9rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: all 0.15s;
  color: var(--text);
}
.quiz-option:hover { border-color: var(--ocean-400); }
.quiz-option.correct { background: var(--forest-50); border-color: var(--forest-500); color: var(--forest-700); animation: bounce-correct 0.4s; }
.quiz-option.incorrect { background: var(--coral-50); border-color: var(--coral-500); color: var(--coral-700); animation: shake-incorrect 0.5s; }
.demo-app.dark .quiz-option.correct { background: rgba(76,175,80,0.15); color: var(--forest-300); }
.demo-app.dark .quiz-option.incorrect { background: rgba(245,101,80,0.15); color: var(--coral-300); }
.quiz-option.disabled { pointer-events: none; opacity: 0.6; }

.quiz-feedback { margin-top: 0.6rem; padding: 0.65rem 0.85rem; border-radius: var(--radius); font-size: 0.85rem; font-weight: 600; }
.quiz-feedback.correct { background: var(--forest-50); color: var(--forest-700); }
.quiz-feedback.incorrect { background: var(--coral-50); color: var(--coral-700); }
.demo-app.dark .quiz-feedback.correct { background: rgba(76,175,80,0.15); color: var(--forest-300); }
.demo-app.dark .quiz-feedback.incorrect { background: rgba(245,101,80,0.15); color: var(--coral-300); }

.quiz-results { text-align: center; padding: 1.5rem; }
.quiz-score { font-size: 2.25rem; font-weight: 800; color: var(--ocean-600); margin-bottom: 0.4rem; }
.demo-app.dark .quiz-score { color: var(--ocean-400); }
.quiz-results p { font-size: 0.9rem; color: var(--text-secondary); margin-bottom: 0.85rem; }


/* ══════════════════════════════════════════════
   CMS
   ══════════════════════════════════════════════ */
.cms-header h1 { font-size: 1.3rem; font-weight: 800; color: var(--ocean-900); margin-bottom: 0.2rem; }
.demo-app.dark .cms-header h1 { color: var(--ocean-200); }
.cms-subtitle { font-size: 0.85rem; color: var(--text-secondary); margin-bottom: 0.85rem; }

.cms-tabs { display: flex; gap: 0.3rem; margin-bottom: 0.85rem; flex-wrap: wrap; }
.cms-tab {
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-card);
  font-family: var(--font);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: default;
}
.cms-tab.active { background: var(--ocean-500); color: #fff; border-color: var(--ocean-500); }

.cms-table { width: 100%; border-collapse: collapse; font-size: 0.8rem; }
.cms-table th {
  text-align: left;
  padding: 0.5rem 0.65rem;
  border-bottom: 2px solid var(--border);
  font-weight: 700;
  color: var(--text-secondary);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.cms-table td { padding: 0.6rem 0.65rem; border-bottom: 1px solid var(--border-subtle); }
.cms-table tbody tr { cursor: pointer; transition: background 0.1s; }
.cms-table tbody tr:hover { background: var(--ocean-50); }
.demo-app.dark .cms-table tbody tr:hover { background: rgba(8,145,178,0.1); }
.cms-title-cell { font-weight: 600; color: var(--ocean-700); }
.demo-app.dark .cms-title-cell { color: var(--ocean-300); }

.type-badge { padding: 0.1rem 0.45rem; border-radius: var(--radius); background: var(--sand-100); font-size: 0.7rem; font-weight: 600; text-transform: capitalize; }
.demo-app.dark .type-badge { background: rgba(255,255,255,0.1); }
.status-badge { padding: 0.1rem 0.5rem; border-radius: 999px; font-size: 0.65rem; font-weight: 700; }
.status-approved { background: var(--forest-100); color: var(--forest-700); }
.status-draft { background: var(--sand-100); color: var(--sand-600); }
.status-submitted { background: var(--sunshine-100); color: var(--sunshine-700); }
.demo-app.dark .status-approved { background: rgba(76,175,80,0.2); color: var(--forest-300); }
.demo-app.dark .status-draft { background: rgba(255,255,255,0.1); color: var(--sand-400); }
.demo-app.dark .status-submitted { background: rgba(255,193,7,0.2); color: var(--sunshine-100); }

/* CMS Editor */
.cms-editor-form { max-width: 640px; }
.form-row { margin-bottom: 0.85rem; }
.form-row label { display: block; font-size: 0.7rem; font-weight: 700; color: var(--text-secondary); margin-bottom: 0.2rem; text-transform: uppercase; letter-spacing: 0.03em; }
.form-row input, .form-row select { width: 100%; padding: 0.5rem 0.65rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-card); color: var(--text); font-family: var(--font); font-size: 0.85rem; }
.form-row-group { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.85rem; }
.md-editor-mock { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.md-toolbar { display: flex; gap: 0.1rem; padding: 0.3rem 0.4rem; background: var(--sand-100); border-bottom: 1px solid var(--border); }
.demo-app.dark .md-toolbar { background: rgba(255,255,255,0.05); }
.md-toolbar span { padding: 0.15rem 0.4rem; font-size: 0.7rem; font-weight: 700; color: var(--text-secondary); border-radius: 4px; }
.md-body { padding: 0.6rem; min-height: 100px; font-size: 0.8rem; color: var(--text); white-space: pre-wrap; line-height: 1.6; font-family: 'Courier New', monospace; }
.spot-item { padding: 0.5rem 0.65rem; background: var(--bg-card); border: 1px solid var(--border-subtle); border-radius: var(--radius); font-size: 0.8rem; display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.35rem; }
.spot-label { font-weight: 600; color: var(--coral-600); }
.demo-app.dark .spot-label { color: var(--coral-400); }
.spot-position { font-size: 0.7rem; color: var(--text-secondary); }
.form-actions { display: flex; gap: 0.65rem; margin-top: 1.25rem; }
.btn-secondary { padding: 0.55rem 1.5rem; border-radius: var(--radius-lg); background: var(--bg-card); color: var(--text); font-family: var(--font); font-weight: 700; font-size: 0.9rem; border: 1px solid var(--border); cursor: pointer; }
.btn-secondary:disabled { opacity: 0.5; cursor: default; }


/* ══════════════════════════════════════════════
   PARENTAL GATE & PARENT PORTAL
   ══════════════════════════════════════════════ */
.gate-screen { display: flex; align-items: center; justify-content: center; min-height: 100%; }
.gate-card { background: var(--bg-card); border: 1px solid var(--border-subtle); border-radius: var(--radius-lg); padding: 2rem; text-align: center; max-width: 340px; width: 100%; box-shadow: 0 2px 12px rgba(0,0,0,0.06); }
.gate-icon { width: 44px; height: 44px; margin: 0 auto 0.85rem; color: var(--ocean-500); }
.gate-icon svg { width: 44px; height: 44px; }
.gate-card h2 { font-size: 1.3rem; font-weight: 800; margin-bottom: 0.4rem; }
.gate-card > p { font-size: 0.85rem; color: var(--text-secondary); margin-bottom: 1rem; }
.gate-problem { font-size: 1.75rem; font-weight: 800; color: var(--ocean-700); margin-bottom: 0.85rem; }
.demo-app.dark .gate-problem { color: var(--ocean-300); }
.gate-input { width: 100%; padding: 0.65rem; border: 2px solid var(--border); border-radius: var(--radius); text-align: center; font-family: var(--font); font-size: 1.15rem; font-weight: 700; margin-bottom: 0.4rem; background: var(--bg); color: var(--text); outline: none; }
.gate-input:focus { border-color: var(--ocean-400); }
.gate-error { display: none; color: var(--coral-500); font-size: 0.8rem; font-weight: 600; margin-bottom: 0.4rem; }
.gate-error.show { display: block; }
.gate-btn { width: 100%; margin-top: 0.4rem; }

.parent-header { margin-bottom: 1.25rem; }
.parent-header h1 { font-size: 1.3rem; font-weight: 800; color: var(--ocean-900); }
.demo-app.dark .parent-header h1 { color: var(--ocean-200); }
.parent-header p { color: var(--text-secondary); font-size: 0.9rem; }
.parent-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 0.85rem; }
.parent-card { background: var(--bg-card); border: 1px solid var(--border-subtle); border-radius: var(--radius); padding: 1rem; }
.parent-card h3 { font-size: 0.95rem; font-weight: 700; color: var(--ocean-700); margin-bottom: 0.6rem; }
.demo-app.dark .parent-card h3 { color: var(--ocean-300); }
.child-list { display: flex; flex-direction: column; gap: 0.6rem; }
.child-item { display: flex; align-items: center; gap: 0.6rem; }
.child-avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--ocean-100); color: var(--ocean-700); display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 0.9rem; }
.demo-app.dark .child-avatar { background: rgba(8,145,178,0.2); color: var(--ocean-300); }
.child-name { font-weight: 700; display: block; font-size: 0.85rem; }
.child-age { font-size: 0.75rem; color: var(--text-secondary); }
.account-info { display: flex; flex-direction: column; gap: 0.5rem; }
.account-row { display: flex; justify-content: space-between; font-size: 0.8rem; }
.account-label { font-weight: 600; color: var(--text-secondary); }
.sub-badge { padding: 0.05rem 0.45rem; background: var(--sand-100); border-radius: 999px; font-size: 0.7rem; font-weight: 700; }
.demo-app.dark .sub-badge { background: rgba(255,255,255,0.1); }
.quick-links-list { display: flex; flex-direction: column; gap: 0.35rem; }
.quick-link { display: block; width: 100%; text-align: left; padding: 0.45rem 0.65rem; border: 1px solid var(--border-subtle); border-radius: var(--radius); background: transparent; font-family: var(--font); font-size: 0.8rem; font-weight: 600; color: var(--ocean-600); cursor: pointer; }
.quick-link:disabled { opacity: 0.5; cursor: default; }
.demo-app.dark .quick-link { color: var(--ocean-400); }


/* ══════════════════════════════════════════════
   GUIDE CALLOUT (floating annotation)
   ══════════════════════════════════════════════ */
.guide-callout {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  max-width: 460px;
  width: calc(100% - 80px);
  background: rgba(2, 53, 68, 0.96);
  backdrop-filter: blur(12px);
  color: #fff;
  border-radius: 16px;
  padding: 1rem 1.25rem 0.75rem;
  z-index: 50;
  box-shadow: 0 8px 32px rgba(0,0,0,0.3), 0 2px 8px rgba(0,0,0,0.15);
  animation: callout-enter 0.3s ease;
}
.guide-callout::after {
  content: '';
  position: absolute;
  bottom: -7px;
  left: 50%;
  transform: translateX(-50%) rotate(45deg);
  width: 14px;
  height: 14px;
  background: rgba(2, 53, 68, 0.96);
}
.guide-callout-text {
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.45;
  margin-bottom: 0.65rem;
}
.guide-callout-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  border-top: 1px solid rgba(255,255,255,0.15);
  padding-top: 0.6rem;
}
.guide-nav {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.25);
  background: transparent;
  color: #fff;
  font-family: var(--font);
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s;
}
.guide-nav:hover { background: rgba(255,255,255,0.12); }
.guide-nav:disabled { opacity: 0.25; cursor: default; }
.guide-nav:disabled:hover { background: transparent; }
.guide-nav svg { width: 13px; height: 13px; }
.guide-nav-next { background: rgba(255,255,255,0.12); }
.guide-nav-next:hover { background: rgba(255,255,255,0.22); }
.guide-step { font-size: 0.7rem; font-weight: 700; white-space: nowrap; opacity: 0.5; }

.guide-highlight { animation: pulse-highlight 1.5s ease-in-out infinite !important; position: relative; z-index: 5; }

@keyframes callout-enter {
  from { opacity: 0; transform: translateX(-50%) translateY(10px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}


/* ══════════════════════════════════════════════
   DETAILS SECTION
   ══════════════════════════════════════════════ */
.details { padding: 2.5rem 2rem 3.5rem; max-width: 960px; margin: 0 auto; }
.details-inner h2 { font-size: 1.5rem; font-weight: 800; color: var(--ocean-700); margin-bottom: 1.25rem; text-align: center; }
.details-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.25rem; }
.detail-block { background: #fff; border: 1px solid var(--sand-100); border-radius: var(--radius); padding: 1.25rem; box-shadow: 0 1px 3px rgba(0,0,0,0.06); }
.detail-block h3 { font-size: 1rem; font-weight: 700; color: var(--ocean-700); margin-bottom: 0.4rem; }
.detail-block p, .detail-block li { font-size: 0.85rem; color: var(--sand-700); line-height: 1.55; }
.detail-block ul { margin-left: 1.25rem; }
.detail-block li { margin-bottom: 0.2rem; }
.details-footer { text-align: center; margin-top: 2rem; }
.details-footer a { color: var(--ocean-600); text-decoration: none; font-weight: 700; font-size: 0.85rem; }
.details-footer a:hover { text-decoration: underline; }


/* ══════════════════════════════════════════════
   CONFETTI
   ══════════════════════════════════════════════ */
.confetti-container { position: fixed; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; z-index: 300; }
.confetti-piece { position: absolute; width: 8px; height: 8px; border-radius: 50%; animation: confetti-fall 1s ease forwards; }


/* ══════════════════════════════════════════════
   ANIMATIONS
   ══════════════════════════════════════════════ */
@keyframes jiggle {
  0%, 100% { transform: rotate(0deg) scale(1); }
  15% { transform: rotate(-3deg) scale(1.03); }
  30% { transform: rotate(3deg) scale(1.05); }
  45% { transform: rotate(-2deg) scale(1.03); }
  60% { transform: rotate(2deg) scale(1.02); }
  75% { transform: rotate(0deg) scale(1); }
}
@keyframes bounce-correct {
  0% { transform: scale(1); } 25% { transform: scale(1.06); }
  50% { transform: scale(0.96); } 75% { transform: scale(1.02); } 100% { transform: scale(1); }
}
@keyframes shake-incorrect {
  0%, 100% { transform: translateX(0); } 15% { transform: translateX(-5px); }
  30% { transform: translateX(5px); } 45% { transform: translateX(-3px); }
  60% { transform: translateX(3px); } 75% { transform: translateX(-2px); }
}
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
@keyframes confetti-fall {
  0% { transform: translateY(-20px) rotate(0deg); opacity: 1; }
  100% { transform: translateY(60vh) rotate(720deg); opacity: 0; }
}
@keyframes pulse-highlight {
  0%, 100% { box-shadow: 0 0 0 0 rgba(8,145,178,0.4); }
  50% { box-shadow: 0 0 0 6px rgba(8,145,178,0); }
}


/* ══════════════════════════════════════════════
   PAGE DARK MODE TOGGLE
   ══════════════════════════════════════════════ */
.page-dark-toggle {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 100;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--sand-200);
  background: #fff;
  color: var(--sand-700);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.page-dark-toggle:hover { background: var(--sand-100); }
.page-dark-toggle svg { width: 18px; height: 18px; }
.pdt-moon { display: none; }

body.page-dark .page-dark-toggle {
  background: #2a2a40;
  border-color: rgba(255,255,255,0.15);
  color: var(--sand-300);
}
body.page-dark .page-dark-toggle:hover { background: #3a3a54; }
body.page-dark .pdt-sun { display: none; }
body.page-dark .pdt-moon { display: block; }

/* ── Page dark mode overrides ── */
body.page-dark {
  background: #1a1a2e;
  color: #e0ddd8;
}
body.page-dark .pitch { color: #e0ddd8; }
body.page-dark .pitch-title { color: var(--ocean-400); }
body.page-dark .pitch-tagline { color: var(--sand-400); }
body.page-dark .pitch-card {
  background: rgba(255,255,255,0.05);
  border-color: rgba(255,255,255,0.1);
}
body.page-dark .pitch-card h3 { color: var(--ocean-400); }
body.page-dark .pitch-card p { color: var(--sand-300); }

body.page-dark .stats-strip { background: #22223a; border-color: rgba(255,255,255,0.08); }
body.page-dark .stat-pill { background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.1); }
body.page-dark .stat-num { color: var(--ocean-300); }
body.page-dark .stat-desc { color: var(--sand-400); }

body.page-dark .info-section { color: #e0ddd8; }
body.page-dark .info-inner h2 { color: var(--ocean-400); }
body.page-dark .info-box {
  background: rgba(255,255,255,0.04);
  border-color: rgba(255,255,255,0.08);
}
body.page-dark .info-box h3 { color: #e0ddd8; }
body.page-dark .info-box p { color: var(--sand-300); }
body.page-dark .info-box.accent-ocean { border-left-color: var(--ocean-500); }
body.page-dark .info-box.accent-coral { border-left-color: var(--coral-500); }
body.page-dark .info-box.accent-forest { border-left-color: var(--forest-500); }
body.page-dark .info-box.accent-sand { border-left-color: var(--sand-500); }

body.page-dark .details { color: #e0ddd8; }
body.page-dark .details-footer a { color: var(--ocean-400); }

body.page-dark .reveal-panel { background: #2a2a40; }
body.page-dark .reveal-panel h3 { color: var(--ocean-300); }
body.page-dark .reveal-panel p { color: var(--sand-300); }
body.page-dark .reveal-close { color: var(--sand-400); }


/* ══════════════════════════════════════════════
   STATS STRIP
   ══════════════════════════════════════════════ */
.stats-strip {
  background: #fff;
  border-top: 1px solid var(--sand-100);
  border-bottom: 1px solid var(--sand-100);
  padding: 1.25rem 2rem;
  margin-bottom: 0;
}
.stats-strip-inner {
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  justify-content: center;
  gap: 0.85rem;
  flex-wrap: wrap;
}
.stat-pill {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.6rem 1.1rem;
  background: var(--sand-50);
  border: 1px solid var(--sand-100);
  border-radius: var(--radius);
  min-width: 120px;
}
.stat-num {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--ocean-700);
  line-height: 1.2;
}
.stat-desc {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--sand-600);
  text-align: center;
  line-height: 1.3;
  margin-top: 0.15rem;
}


/* ══════════════════════════════════════════════
   INFO SECTIONS & BOXES
   ══════════════════════════════════════════════ */
.info-section {
  padding: 2rem 2rem 0.5rem;
  max-width: 960px;
  margin: 0 auto;
}
.info-inner h2 {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--ocean-700);
  margin-bottom: 1rem;
}
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 0.85rem;
  margin-bottom: 1.25rem;
}
.info-box {
  background: #fff;
  border: 1px solid var(--sand-100);
  border-left: 4px solid var(--sand-300);
  border-radius: var(--radius);
  padding: 1rem 1.15rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.info-box h3 {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--ocean-800);
  margin-bottom: 0.35rem;
}
.info-box p {
  font-size: 0.8rem;
  color: var(--sand-700);
  line-height: 1.55;
}
.info-box.accent-ocean { border-left-color: var(--ocean-500); }
.info-box.accent-coral { border-left-color: var(--coral-400); }
.info-box.accent-forest { border-left-color: var(--forest-500); }
.info-box.accent-sand { border-left-color: var(--sand-500); }


/* ══════════════════════════════════════════════
   RESPONSIVE — smaller viewports
   ══════════════════════════════════════════════ */
@media (max-width: 800px) {
  .tablet-frame { height: min(70vh, 560px); border-radius: 18px; padding: 8px; }
  .demo-app { border-radius: 10px; }
  .demo-sidebar { width: 200px; }
  .pitch-title { font-size: 2rem; }
  .guide-callout { max-width: 380px; width: calc(100% - 40px); padding: 0.85rem 1rem 0.65rem; }
  .guide-callout-text { font-size: 0.78rem; }
  .stat-pill { min-width: 100px; padding: 0.5rem 0.75rem; }
  .stat-num { font-size: 1.05rem; }
}
@media (max-width: 600px) {
  .demo-sidebar { display: none; }
  .tablet-frame { height: min(80vh, 500px); }
  .guide-callout { max-width: 320px; width: calc(100% - 24px); }
  .info-grid { grid-template-columns: 1fr; }
  .stats-strip-inner { gap: 0.5rem; }
  .stat-pill { min-width: 80px; }
}
