/* =================================================================
   JUNIOR ADVENTURE SUPPLEMENTAL CSS v2
   Adds missing class definitions for section-based lesson templates
   (Y7 U3, Y7 U2 lessons 10-20, Y8 U1, Y8 U2, Y8 U3)
   
   CRITICAL: All content panels are VISIBLE by default.
   The companion JS (junior-adventure-supplement.js) handles
   tab switching and toggle behaviour for Type B lessons.
   ================================================================= */

/* ---- Base layout for section-based pages ---- */
.adv-section {
  max-width: 860px;
  margin: 0 auto 20px;
  padding: 0 16px;
}

/* ---- Think First section ---- */
.adv-think-first {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  border-radius: 16px;
  padding: 24px 28px;
  margin-bottom: 24px;
  border-left: 5px solid #f59e0b;
  box-shadow: 0 4px 16px rgba(245, 158, 11, 0.12);
}

.adv-section-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: #2d3142;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.adv-section-title .adv-icon {
  width: 28px;
  height: 28px;
  color: #f59e0b;
}

.adv-intro {
  font-size: 1.05rem;
  line-height: 1.7;
  color: #4a4d6b;
  margin-bottom: 14px;
}

.adv-brain-warmup {
  background: rgba(255,255,255,0.6);
  border-radius: 12px;
  padding: 16px 20px;
  margin: 14px 0;
  font-size: 1rem;
  line-height: 1.65;
}

.adv-brain-warmup p {
  margin-bottom: 10px;
}

/* ---- Think-first label (Y8 variant) ---- */
.adv-think-label {
  font-family: 'Outfit', sans-serif;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 1.2px;
  color: #f59e0b;
  margin-bottom: 10px;
  text-transform: uppercase;
}

.adv-think-content {
  font-size: 1rem;
  line-height: 1.65;
}

/* ---- Collapsible toggle ---- */
.adv-collapsible {
  margin-top: 14px;
}

.adv-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: linear-gradient(135deg, #c47b8a 0%, #9c5c6e 100%);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 3px 10px rgba(156, 92, 110, 0.25);
}

.adv-toggle-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 5px 14px rgba(156, 92, 110, 0.35);
}

.adv-toggle-content {
  /* VISIBLE BY DEFAULT — JS handles hiding for interactive toggles */
  display: block;
  margin-top: 14px;
  padding: 18px 22px;
  background: rgba(255,255,255,0.8);
  border-radius: 12px;
  font-size: 1rem;
  line-height: 1.65;
  border: 1px solid rgba(196, 123, 138, 0.2);
}

/* When JS hides toggle content, it adds this class */
.adv-toggle-content.adv-hidden {
  display: none;
}

.adv-toggle-content p {
  margin-bottom: 10px;
}

/* ---- Anchor/Card overrides for section template ---- */
.adv-anchor-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: #2d3142;
  margin-bottom: 6px;
}

.adv-anchor-subtitle {
  font-family: 'DM Sans', sans-serif;
  font-size: 1rem;
  color: #8a8aa3;
  margin-bottom: 16px;
  font-weight: 500;
}

.adv-anchor-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: start;
}

@media (max-width: 768px) {
  .adv-anchor-grid-2 {
    grid-template-columns: 1fr;
  }
}

/* ---- Tip row badge overrides ---- */
.adv-tip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 16px 0;
}

.adv-tip-row > span.adv-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: linear-gradient(135deg, #e3dbef 0%, #f4d8de 100%);
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #4e4068;
  white-space: nowrap;
}

/* ---- Body padding for section-based pages (no topbar) ---- */
body > .adv-section:first-child {
  margin-top: 24px;
}

/* ---- Ensure anchor cards in section template look right ---- */
.adv-anchor {
  background: #fff;
  border-radius: 16px;
  padding: 28px 30px;
  margin-bottom: 22px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}

/* ---- Tab content: VISIBLE BY DEFAULT ---- */
.adv-tab-content {
  /* Default visible — JS manages hiding for non-active tabs */
  display: block;
  background: #fff;
  border-radius: 0 16px 16px 16px;
  padding: 24px 26px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
  margin-bottom: 22px;
}

/* When JS manages tabs, it hides non-active panels via inline style */
/* The .active class ensures the active panel is visible */
.adv-tab-content.active {
  display: block;
}

/* ---- Intentions grid for section template ---- */
.adv-intent-section {
  margin-bottom: 22px;
}

.adv-intentions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 18px;
}

@media (max-width: 768px) {
  .adv-intentions {
    grid-template-columns: 1fr;
  }
}

/* ---- Terms grid ---- */
.adv-terms-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 22px;
}

.adv-term-card {
  background: #f8fafc;
  border-radius: 10px;
  padding: 14px 16px;
  font-size: 0.93rem;
  border: 1px solid #e2e8f0;
}

/* ---- Content card ---- */
.adv-content-card {
  background: #fff;
  border-radius: 16px;
  padding: 22px 26px;
  margin-bottom: 22px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}

.adv-card-label {
  font-family: 'Outfit', sans-serif;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 1.2px;
  color: #c47b8a;
  margin-bottom: 12px;
  text-transform: uppercase;
}

/* ---- MC grid styles ---- */
.adv-mc-grid {
  border: 2px solid #e8e8f0;
  border-radius: 16px;
  padding: 18px 20px;
  margin-bottom: 16px;
}

.adv-mc-options {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.adv-mc-btn {
  padding: 12px 16px;
  border: 2px solid #e8e8f0;
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.95rem;
  transition: all 0.2s ease;
  text-align: left;
}

.adv-mc-btn:hover {
  border-color: #c47b8a;
  background: #fdf6f7;
}

.adv-mc-btn.adv-correct,
.adv-mc-btn.adv-selected.adv-correct {
  background: #d1fae5;
  border-color: #10b981;
  color: #065f46;
}

.adv-mc-btn.adv-wrong,
.adv-mc-btn.adv-selected.adv-wrong {
  background: #fee2e2;
  border-color: #ef4444;
  color: #991b1b;
}

.adv-mc-btn.adv-selected {
  font-weight: 600;
}

.adv-mc-feedback {
  margin-top: 10px;
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 0.95rem;
  display: none;
}

.adv-mc-feedback.adv-correct-msg {
  display: block;
  background: #d1fae5;
  color: #065f46;
}

.adv-mc-feedback.adv-wrong-msg {
  display: block;
  background: #fee2e2;
  color: #991b1b;
}

/* ---- SAQ styles ---- */
.adv-saq {
  border: 2px solid #e8e8f0;
  border-radius: 16px;
  padding: 18px 20px;
  margin-bottom: 16px;
}

.adv-saq-label {
  display: inline-block;
  background: linear-gradient(135deg, #d6a85f 0%, #c99850 100%);
  color: #fff;
  padding: 5px 14px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.8rem;
  margin-bottom: 10px;
}

/* ---- Solution steps: VISIBLE BY DEFAULT ---- */
.adv-solution-steps {
  margin-top: 14px;
}

.adv-step {
  display: block;
  padding: 16px;
  background: #f8fafc;
  border-radius: 12px;
  margin-bottom: 10px;
}

.adv-step-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 14px;
  gap: 12px;
}

.adv-step-nav button {
  padding: 10px 22px;
  border: none;
  border-radius: 10px;
  background: linear-gradient(135deg, #c47b8a 0%, #9c5c6e 100%);
  color: #fff;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.2s ease;
}

.adv-step-nav button:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(156, 92, 110, 0.3);
}

.adv-step-nav button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
}

.adv-step-dots {
  display: flex;
  gap: 6px;
}

.adv-step-dots .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #e8e8f0;
  transition: background 0.2s;
}

.adv-step-dots .dot.active {
  background: #c47b8a;
}

/* ---- Example block ---- */
.adv-example {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  border-radius: 16px;
  padding: 20px 24px;
  margin-bottom: 18px;
  border-left: 4px solid #f59e0b;
}

.adv-example-label {
  font-family: 'Outfit', sans-serif;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 1.2px;
  color: #d97706;
  margin-bottom: 10px;
  text-transform: uppercase;
}

/* ---- Phase: VISIBLE BY DEFAULT ---- */
.adv-phase {
  display: block;
}

.adv-phase.active {
  animation: fadeSlideUp 0.4s ease;
}

@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---- Intent icon circles ---- */
.adv-intent-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #c47b8a 0%, #9c5c6e 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.1rem;
  flex-shrink: 0;
}

/* ---- Intent grid ---- */
.adv-intent-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 18px;
}

@media (max-width: 768px) {
  .adv-intent-grid {
    grid-template-columns: 1fr;
  }
}

.adv-intent-card {
  background: #fff;
  border-radius: 16px;
  padding: 18px 20px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

/* ---- Nav button styles for section template ---- */
.adv-nav-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  max-width: 860px;
  margin: 24px auto 40px;
  padding: 0 16px;
}

.adv-nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: linear-gradient(135deg, #6d5b8a 0%, #4e4068 100%);
  color: #fff;
  border-radius: 12px;
  font-family: 'DM Sans', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: all 0.2s ease;
  box-shadow: 0 3px 10px rgba(78, 64, 104, 0.25);
}

.adv-nav-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 5px 14px rgba(78, 64, 104, 0.35);
}

.adv-nav-prev {
  background: linear-gradient(135deg, #8a8aa3 0%, #6b6d85 100%);
  box-shadow: 0 3px 10px rgba(107, 109, 133, 0.25);
}

/* ---- Tab buttons ---- */
.adv-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 0;
}

.adv-tab {
  padding: 10px 24px;
  background: #e5e7eb;
  border-radius: 10px 10px 0 0;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--c-text-light, #6b7280);
  transition: 0.2s;
  border: none;
  font-family: 'DM Sans', sans-serif;
}

.adv-tab.active {
  background: #fff;
  color: var(--c-primary, #3b6ecc);
}

.adv-tab:hover {
  background: #f3f4f6;
}

/* ---- Wrapper for lesson content ---- */
#lesson-content {
  max-width: 860px;
  margin: 0 auto;
  padding: 24px 16px 40px;
}

/* ---- Responsive base ---- */
@media (max-width: 640px) {
  .adv-section {
    padding: 0 10px;
  }
  
  .adv-think-first {
    padding: 18px 16px;
  }
  
  .adv-anchor {
    padding: 18px 16px;
  }
  
  .adv-section-title {
    font-size: 1.2rem;
  }
  
  .adv-nav-row {
    flex-direction: column;
  }
  
  .adv-nav-btn {
    width: 100%;
    justify-content: center;
  }

  .adv-intentions {
    grid-template-columns: 1fr;
  }
}

/* =================================================================
   v3 — Compatibility rules for the Y7 U2/U3 + Y8 U1/U2/U3 lessons
   These units use a 3rd dialect of adv-* class names that neither
   junior-adventure.css nor the v1/v2 supplement covered. Without
   these rules, ~100 lessons render as unstyled stacked divs.

   All rules use the --adv-* tokens defined in junior-adventure.css
   so the visual language matches Y7 U1 (hard-shadow, cream, dusty
   rose). Coverage prioritises classes used in 3+ lessons.

   Loaded only by the broken units (Y7 U1 doesn't link this file),
   so Y7 U1's existing markup is untouched.
================================================================= */

/* ---- Card layouts ---- */
.adv-card-header, .adv-section-header {
  padding: 14px 20px;
  background: var(--adv-cream);
  border-bottom: 1px solid var(--adv-rule);
  border-radius: var(--adv-r) var(--adv-r) 0 0;
  font-family: var(--adv-display);
  font-weight: 700;
  color: var(--adv-ink);
  font-size: 1.05rem;
  display: flex;
  align-items: center;
  gap: 10px;
}
.adv-card-body, .adv-section-body {
  padding: 18px 20px 20px;
  background: var(--adv-panel);
  border-radius: 0 0 var(--adv-r) var(--adv-r);
}
.adv-card-header + .adv-card-body,
.adv-section-header + .adv-section-body {
  border: 1px solid var(--adv-rule);
  border-top: 0;
  box-shadow: var(--adv-shadow);
}

/* ---- Title / subtitle ---- */
.adv-title {
  font-family: var(--adv-display);
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--adv-ink);
  margin: 0 0 10px;
  letter-spacing: -0.01em;
}
.adv-subtitle, .adv-section-subtitle {
  font-size: 0.95rem;
  color: var(--adv-ink-soft);
  margin: 0 0 14px;
  line-height: 1.55;
}

/* ---- Lists ---- */
.adv-list {
  padding-left: 22px;
  margin: 0 0 14px;
  color: var(--adv-ink-soft);
  line-height: 1.7;
}
.adv-list li { margin: 0 0 6px; }

/* ---- Tables ---- */
.adv-table, .adv-data-table, .adv-mini-table, .adv-summary-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 12px 0 16px;
  background: var(--adv-panel);
  border: 1px solid var(--adv-rule);
  border-radius: var(--adv-r);
  overflow: hidden;
  font-size: 0.95rem;
}
.adv-table th, .adv-data-table th, .adv-mini-table th, .adv-summary-table th {
  background: var(--adv-cream);
  color: var(--adv-ink);
  font-family: var(--adv-display);
  font-weight: 700;
  text-align: left;
  padding: 10px 14px;
  border-bottom: 1px solid var(--adv-rule);
}
.adv-table td, .adv-data-table td, .adv-mini-table td, .adv-summary-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--adv-rule-soft);
  color: var(--adv-ink-soft);
}
.adv-table tr:last-child td, .adv-data-table tr:last-child td,
.adv-mini-table tr:last-child td, .adv-summary-table tr:last-child td { border-bottom: 0; }

/* ---- Captions ---- */
.adv-caption {
  font-size: 0.85rem;
  color: var(--adv-muted);
  font-style: italic;
  text-align: center;
  margin-top: 6px;
}

/* ---- Multiple-choice (Type-B markup) ---- */
.adv-mc, .adv-mcq { display: flex; flex-direction: column; gap: 18px; margin: 14px 0; }
.adv-mc-header {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px;
  background: var(--adv-cream);
  border: 1px solid var(--adv-rule);
  border-radius: var(--adv-r-sm);
  font-family: var(--adv-display);
  font-weight: 700;
  color: var(--adv-ink);
}
.adv-mc-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px;
  background: var(--adv-plum); color: #fff; border-radius: 50%;
  font-family: var(--adv-display); font-weight: 700; font-size: 0.95rem;
  flex-shrink: 0;
}
.adv-mc-q, .adv-mc-question, .adv-mc-stem, .adv-mcq-stem, .adv-mcq-q, .adv-question, .adv-question-text {
  font-size: 1rem; color: var(--adv-ink); margin: 0 0 12px;
  line-height: 1.55; font-weight: 500;
}
.adv-mc-option, .adv-mcq-option, .adv-option, .adv-opt-label, .adv-choice {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 10px 14px;
  background: var(--adv-panel);
  border: 1.5px solid var(--adv-rule);
  border-radius: var(--adv-r-sm);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  margin-bottom: 8px;
  color: var(--adv-ink);
}
.adv-mc-option:hover, .adv-mcq-option:hover, .adv-option:hover, .adv-choice:hover {
  background: var(--adv-cream); border-color: var(--adv-gold);
}
.adv-mc-options, .adv-mcq-options, .adv-options, .adv-choices { display: flex; flex-direction: column; }
.adv-mc-explanation, .adv-mcq-feedback, .adv-feedback, .adv-feedback-correct, .adv-feedback-wrong {
  margin-top: 10px; padding: 12px 14px;
  border-radius: var(--adv-r-sm);
  font-size: 0.92rem; line-height: 1.55;
}
.adv-mc-explanation, .adv-mcq-feedback {
  background: var(--adv-plum-soft);
  border-left: 3px solid var(--adv-plum);
  color: var(--adv-ink);
}
.adv-feedback-correct, .adv-fb-correct {
  background: var(--adv-green-soft);
  border-left: 3px solid var(--adv-green);
  color: var(--adv-ink);
}
.adv-feedback-wrong, .adv-fb-incorrect {
  background: var(--adv-red-soft);
  border-left: 3px solid var(--adv-red);
  color: var(--adv-ink);
}

/* ---- Copy-to-book panel ---- */
.adv-copy-box, .adv-copy {
  background: var(--adv-cream);
  border: 1.5px dashed var(--adv-gold);
  border-radius: var(--adv-r);
  padding: 16px 18px;
  margin: 16px 0;
}
.adv-copy-header { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.adv-copy-label, .adv-copy-title, .adv-copy-heading {
  font-family: var(--adv-display);
  font-size: 0.78rem; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--adv-gold-deep);
}
.adv-copy-icon { color: var(--adv-gold-deep); flex-shrink: 0; }
.adv-copy-content, .adv-copy-body { color: var(--adv-ink); line-height: 1.65; }
.adv-copy-list { padding-left: 22px; margin: 0; }
.adv-copy-list li { margin: 0 0 6px; }
.adv-copy-highlight, .adv-copy-example {
  background: var(--adv-panel);
  border-radius: var(--adv-r-sm);
  padding: 10px 14px;
  margin: 8px 0;
}

/* ---- Example boxes (worked examples) ---- */
.adv-example-box, .adv-we-box, .adv-worked, .adv-worked-example, .adv-problem-box {
  background: var(--adv-panel);
  border: 1px solid var(--adv-rule);
  border-left: 4px solid var(--adv-plum);
  border-radius: var(--adv-r);
  padding: 16px 20px;
  margin: 16px 0;
  box-shadow: var(--adv-shadow-soft);
}
.adv-example-title, .adv-we-title, .adv-we-header, .adv-we-question, .adv-example-q {
  font-family: var(--adv-display);
  font-weight: 700;
  color: var(--adv-plum-deep);
  font-size: 1rem;
  margin: 0 0 12px;
  display: flex; align-items: center; gap: 8px;
}
.adv-we-label, .adv-we-icon { color: var(--adv-plum); }
.adv-we-steps, .adv-step-list {
  display: flex; flex-direction: column; gap: 10px;
  padding: 0; margin: 0; list-style: none;
}
.adv-step-item, .adv-step-body {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 12px;
  align-items: start;
  padding: 8px 0;
}
.adv-step-circle, .adv-step-num, .adv-step-number, .adv-step-badge {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px;
  background: var(--adv-plum); color: #fff; border-radius: 50%;
  font-family: var(--adv-display); font-weight: 700; font-size: 0.9rem;
}
.adv-step-action, .adv-step-title, .adv-step-header {
  font-family: var(--adv-display); font-weight: 600; color: var(--adv-ink);
}
.adv-step-note, .adv-step-content { color: var(--adv-ink-soft); font-size: 0.92rem; line-height: 1.55; }
.adv-step-reveal { transition: opacity 0.2s; }
.adv-step-reveal[hidden] { display: none; }
.adv-step-prev, .adv-step-next, .adv-step-btn,
.adv-prev-btn, .adv-next, .adv-prev {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px;
  background: var(--adv-panel); color: var(--adv-ink);
  border: 1.5px solid var(--adv-rule);
  border-radius: var(--adv-r-sm);
  font-family: var(--adv-display); font-weight: 600; font-size: 0.92rem;
  cursor: pointer; text-decoration: none;
  transition: background 0.15s, border-color 0.15s;
}
.adv-step-prev:hover, .adv-step-next:hover, .adv-step-btn:hover,
.adv-prev-btn:hover, .adv-next:hover, .adv-prev:hover {
  background: var(--adv-cream); border-color: var(--adv-gold);
}
.adv-step-prev:disabled, .adv-step-next:disabled, .adv-step-btn:disabled {
  opacity: 0.45; cursor: not-allowed;
}
.adv-step-counter, .adv-step-current { color: var(--adv-muted); font-size: 0.85rem; }

/* ---- Pitfalls / common errors ---- */
.adv-pitfalls, .adv-pitfalls-list, .adv-pitfalls-grid, .adv-pitfall-grid, .adv-pitfall-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
  margin: 14px 0 18px;
}
.adv-pitfall-card, .adv-pitfall, .adv-pitfall-item {
  background: var(--adv-panel);
  border: 1px solid var(--adv-rule);
  border-left: 4px solid var(--adv-red);
  border-radius: var(--adv-r);
  padding: 14px 16px;
  box-shadow: var(--adv-shadow-soft);
}
.adv-pitfall-header { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.adv-pitfall-icon {
  width: 28px; height: 28px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%; background: var(--adv-red-soft); color: var(--adv-red);
  flex-shrink: 0;
}
.adv-pitfall-title, .adv-pitfall-label {
  font-family: var(--adv-display); font-weight: 700;
  color: var(--adv-red); font-size: 0.95rem;
}
.adv-pitfall-content, .adv-pitfall-body, .adv-pitfall-text, .adv-pitfall-desc {
  color: var(--adv-ink-soft); font-size: 0.92rem; line-height: 1.6;
}
.adv-pitfall-fix, .adv-pitfall-tip, .adv-pitfall-right, .adv-fix {
  margin-top: 8px; padding: 8px 12px;
  background: var(--adv-green-soft);
  border-radius: var(--adv-r-sm);
  font-size: 0.88rem; color: var(--adv-ink);
}

/* ---- Big-idea panel ---- */
.adv-big-idea {
  background: linear-gradient(135deg, var(--adv-plum-soft) 0%, var(--adv-cream) 100%);
  border: 1.5px solid var(--adv-plum);
  border-radius: var(--adv-r-lg);
  padding: 20px 24px;
  margin: 20px 0;
  box-shadow: var(--adv-shadow);
}
.adv-big-idea-label, .adv-big-idea-header {
  font-family: var(--adv-display);
  font-size: 0.78rem; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--adv-plum-deep); margin: 0 0 8px;
}
.adv-big-idea-title {
  font-family: var(--adv-display); font-weight: 700;
  font-size: 1.25rem; color: var(--adv-ink); margin: 0 0 10px;
}
.adv-big-idea-subtitle {
  font-size: 0.95rem; color: var(--adv-ink-soft); margin: 0 0 12px;
}
.adv-big-idea-content, .adv-big-idea-body, .adv-big-idea-text {
  color: var(--adv-ink); line-height: 1.65;
}
.adv-big-idea-layout, .adv-bigidea-layout, .adv-big-idea-row {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 18px; align-items: center;
}
.adv-big-idea-left, .adv-big-idea-col, .adv-bigidea-text { min-width: 0; }
.adv-big-idea-right, .adv-big-idea-visual, .adv-bigidea-visual {
  display: flex; align-items: center; justify-content: center;
}
.adv-big-idea-list { margin: 0; padding-left: 22px; }
.adv-big-idea-number {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px;
  background: var(--adv-plum); color: #fff; border-radius: 50%;
  font-family: var(--adv-display); font-weight: 700;
}
.adv-big-subtitle, .adv-big-text { color: var(--adv-ink-soft); }

/* ---- Badge showcase / list ---- */
.adv-badge-showcase {
  background: linear-gradient(135deg, var(--adv-gold-soft) 0%, var(--adv-cream) 100%);
  border: 1.5px solid var(--adv-gold);
  border-radius: var(--adv-r-lg);
  padding: 18px 22px;
  margin: 18px 0;
  box-shadow: var(--adv-shadow);
}
.adv-badges, .adv-badges-row {
  display: flex; gap: 10px; flex-wrap: wrap; align-items: center;
}
.adv-badge-list, .adv-badge-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px; margin: 10px 0;
}
.adv-badge-item, .adv-badge-card {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px;
  background: var(--adv-panel);
  border: 1px solid var(--adv-rule);
  border-radius: var(--adv-r);
}
.adv-badge-title {
  font-family: var(--adv-display); font-weight: 700;
  color: var(--adv-gold-deep); font-size: 0.95rem;
}
.adv-badge-desc { font-size: 0.85rem; color: var(--adv-ink-soft); line-height: 1.5; }
.adv-badge-earn { font-size: 0.8rem; color: var(--adv-green); font-weight: 600; }
.adv-badge-intention { background: var(--adv-plum-soft); color: var(--adv-plum-deep); }
.adv-badges-header { margin-bottom: 12px; }

/* ---- Footer / lesson navigation ---- */
.adv-footer, .adv-footer-row {
  margin-top: 32px;
  padding: 18px 0 0;
  border-top: 1px solid var(--adv-rule);
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap;
}
.adv-lesson-nav {
  display: flex; gap: 10px; align-items: center;
  flex-wrap: wrap; margin: 16px 0;
}
.adv-lesson-nav a, .adv-prev-btn, .adv-prev, .adv-next, .adv-nav-home { text-decoration: none; }
.adv-lesson-indicator {
  font-family: var(--adv-display); font-weight: 600;
  font-size: 0.85rem; color: var(--adv-muted); letter-spacing: 0.06em;
}

/* ---- SAQ (short answer question) ---- */
.adv-saq-box, .adv-saq-section, .adv-saq-item {
  background: var(--adv-panel);
  border: 1px solid var(--adv-rule);
  border-radius: var(--adv-r);
  padding: 16px 20px; margin: 14px 0;
  box-shadow: var(--adv-shadow-soft);
}
.adv-saq-header, .adv-saq-heading {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 10px;
  font-family: var(--adv-display); font-weight: 700; color: var(--adv-ink);
}
.adv-saq-letter, .adv-saq-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px;
  background: var(--adv-rose); color: #fff; border-radius: 50%;
  font-family: var(--adv-display); font-weight: 700; font-size: 0.9rem;
  flex-shrink: 0;
}
.adv-saq-q, .adv-saq-stem, .adv-saq-prompt, .adv-saq-title {
  font-size: 1rem; color: var(--adv-ink); margin: 0 0 10px; line-height: 1.55;
}
.adv-saq-input, .adv-saq-textarea, .adv-saq-workspace, .adv-saq-work,
.adv-saq-attempt, .adv-saq-line, .adv-saq-lines {
  width: 100%; min-height: 90px;
  padding: 10px 12px;
  background: var(--adv-cream);
  border: 1.5px solid var(--adv-rule);
  border-radius: var(--adv-r-sm);
  font-family: var(--adv-body); font-size: 0.95rem; color: var(--adv-ink);
  resize: vertical;
}
.adv-saq-input:focus, .adv-saq-textarea:focus, .adv-saq-workspace:focus, .adv-saq-line:focus {
  outline: none; border-color: var(--adv-plum);
}
.adv-saq-submit, .adv-check-btn, .adv-drill-check-btn, .adv-drill-check {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px;
  background: var(--adv-plum); color: #fff;
  border: 0; border-radius: var(--adv-r-sm);
  font-family: var(--adv-display); font-weight: 600; font-size: 0.92rem;
  cursor: pointer; margin-top: 10px;
}
.adv-saq-submit:hover, .adv-check-btn:hover { background: var(--adv-plum-deep); }
.adv-saq-feedback, .adv-saq-model, .adv-saq-solution, .adv-saq-sample,
.adv-saq-summary, .adv-saq-answer {
  margin-top: 10px; padding: 12px 14px;
  background: var(--adv-cream);
  border-left: 3px solid var(--adv-plum);
  border-radius: var(--adv-r-sm);
  font-size: 0.92rem; color: var(--adv-ink); line-height: 1.6;
}

/* ---- Hint ---- */
.adv-hint-btn, .adv-hint-toggle {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px;
  background: var(--adv-gold-soft); color: var(--adv-gold-deep);
  border: 1px solid var(--adv-gold);
  border-radius: var(--adv-r-sm);
  font-family: var(--adv-display); font-weight: 600; font-size: 0.85rem;
  cursor: pointer; transition: background 0.15s;
}
.adv-hint-btn:hover, .adv-hint-toggle:hover { background: var(--adv-gold); color: #fff; }
.adv-hint, .adv-hint-text, .adv-hint-box, .adv-hint-content {
  margin-top: 10px; padding: 10px 14px;
  background: var(--adv-gold-soft);
  border-left: 3px solid var(--adv-gold);
  border-radius: var(--adv-r-sm);
  font-size: 0.92rem; color: var(--adv-ink); line-height: 1.55;
}
.adv-hint-title { font-weight: 700; color: var(--adv-gold-deep); margin-bottom: 4px; }

/* ---- Drill (quick-fire practice) ---- */
.adv-drill-grid, .adv-drill-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px; margin: 14px 0;
}
.adv-drill-card {
  background: var(--adv-panel);
  border: 1px solid var(--adv-rule);
  border-radius: var(--adv-r);
  padding: 14px 16px;
}
.adv-drill-intro, .adv-drill-instruct, .adv-drill-instruction, .adv-drill-instructions {
  color: var(--adv-ink-soft); font-size: 0.95rem; margin: 0 0 12px;
}
.adv-drill-answer, .adv-drill-reveal, .adv-drill-peek {
  margin-top: 8px; padding: 8px 12px;
  background: var(--adv-green-soft);
  border-radius: var(--adv-r-sm);
  font-family: var(--adv-mono); font-size: 0.9rem; color: var(--adv-ink);
}
.adv-drill-answers { display: flex; flex-direction: column; gap: 8px; }

/* ---- Term / definition ---- */
.adv-term, .adv-keyterm, .adv-term-name {
  display: inline-block;
  font-family: var(--adv-display); font-weight: 700;
  color: var(--adv-plum-deep);
  background: var(--adv-plum-soft);
  padding: 2px 8px; border-radius: 6px;
  font-size: 0.95em;
}
.adv-definition, .adv-term-def, .adv-defn {
  display: block; color: var(--adv-ink-soft);
  font-size: 0.95rem; line-height: 1.6;
  margin: 4px 0 12px;
  padding-left: 12px;
  border-left: 2px solid var(--adv-rule);
}
.adv-term-grid, .adv-keyterms-grid, .adv-key-terms {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px; margin: 14px 0;
}
.adv-term-title { font-family: var(--adv-display); font-weight: 700; color: var(--adv-ink); }
.adv-term-word { font-family: var(--adv-display); font-weight: 700; color: var(--adv-plum-deep); }
.adv-terms-header { margin-bottom: 12px; }

/* ---- Stretch / extension ---- */
.adv-stretch-box, .adv-stretch-card {
  background: var(--adv-rose-soft);
  border: 1.5px solid var(--adv-rose);
  border-radius: var(--adv-r);
  padding: 14px 18px; margin: 14px 0;
}
.adv-stretch-header { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.adv-stretch-label, .adv-stretch-title {
  font-family: var(--adv-display);
  font-size: 0.78rem; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--adv-rose-deep);
}
.adv-stretch-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px;
  background: var(--adv-rose); color: #fff; border-radius: 50%;
  flex-shrink: 0;
}
.adv-stretch-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px;
  background: var(--adv-rose); color: #fff; border-radius: 50%;
  font-family: var(--adv-display); font-weight: 700; font-size: 0.85rem;
}
.adv-stretch-item, .adv-stretch-row, .adv-stretch-body, .adv-stretch-content {
  display: grid; grid-template-columns: 28px 1fr;
  gap: 10px; align-items: start;
  margin-bottom: 8px;
}
.adv-stretch-q { color: var(--adv-ink); font-weight: 500; }
.adv-stretch-answer, .adv-stretch-solution {
  margin-top: 6px; padding: 8px 12px;
  background: var(--adv-panel); border-radius: var(--adv-r-sm);
  font-size: 0.9rem; color: var(--adv-ink-soft);
}

/* ---- Tabs ---- */
.adv-tab-bar, .adv-tab-buttons, .adv-tab-list {
  display: flex; gap: 4px; padding: 4px;
  background: var(--adv-cream);
  border: 1px solid var(--adv-rule);
  border-radius: var(--adv-r); margin-bottom: 14px;
  flex-wrap: wrap;
}
.adv-tab-btn {
  flex: 1; min-width: 120px;
  padding: 9px 14px; background: transparent; border: 0;
  border-radius: var(--adv-r-sm);
  font-family: var(--adv-display); font-weight: 600; font-size: 0.92rem;
  color: var(--adv-ink-soft); cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.adv-tab-btn:hover { background: var(--adv-panel); color: var(--adv-ink); }
.adv-tab-btn.adv-active, .adv-tab-btn.adv-tab-active, .adv-tab-btn.active {
  background: var(--adv-plum); color: #fff;
}
.adv-tab-panel { padding: 4px 0; }
.adv-tab-panel[hidden] { display: none; }

/* ---- Two-column / grid layouts ---- */
.adv-two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin: 14px 0; }
.adv-col-left, .adv-col-right, .adv-col { min-width: 0; }
.adv-grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.adv-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }

/* ---- Formula box ---- */
.adv-formula-box, .adv-equation, .adv-equation-final, .adv-formula, .adv-notation-box {
  background: var(--adv-cream);
  border: 1.5px solid var(--adv-gold);
  border-radius: var(--adv-r);
  padding: 14px 18px; margin: 14px 0;
  font-family: var(--adv-mono);
  color: var(--adv-ink); text-align: center;
  font-size: 1.1rem;
}
.adv-formula-title {
  font-family: var(--adv-display);
  font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--adv-gold-deep); margin-bottom: 6px; font-weight: 700;
}
.adv-formula-highlight { background: var(--adv-gold-soft); padding: 0 4px; border-radius: 4px; }
.adv-formula-breakdown { font-family: var(--adv-body); font-size: 0.9rem; color: var(--adv-ink-soft); margin-top: 10px; }
.adv-formula-legend { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; font-family: var(--adv-body); font-size: 0.9rem; text-align: left; }
.adv-formula-legend-item { display: flex; align-items: center; gap: 8px; }
.adv-formula-swatch { display: inline-block; width: 14px; height: 14px; border-radius: 3px; }

/* ---- Callouts ---- */
.adv-callout, .adv-callout-tip, .adv-callout-remember,
.adv-callout-blue, .adv-callout-green, .adv-callout-purple, .adv-callout-red,
.adv-insight-box, .adv-note, .adv-note-box, .adv-tip-callout, .adv-tip-box {
  padding: 12px 16px;
  border-radius: var(--adv-r-sm);
  margin: 12px 0;
  background: var(--adv-cream);
  border-left: 4px solid var(--adv-gold);
  color: var(--adv-ink);
  font-size: 0.95rem; line-height: 1.6;
}
.adv-callout-blue { background: #e0eaf7; border-left-color: #5b7fbd; }
.adv-callout-green { background: var(--adv-green-soft); border-left-color: var(--adv-green); }
.adv-callout-purple { background: var(--adv-plum-soft); border-left-color: var(--adv-plum); }
.adv-callout-red { background: var(--adv-red-soft); border-left-color: var(--adv-red); }
.adv-tip-text, .adv-tip-item { color: var(--adv-ink-soft); font-size: 0.92rem; }
.adv-tip-badge {
  display: inline-block; padding: 2px 8px; border-radius: 6px;
  background: var(--adv-gold-soft); color: var(--adv-gold-deep);
  font-family: var(--adv-display); font-weight: 700; font-size: 0.78rem;
}

/* ---- Learning intentions ---- */
.adv-learning-intentions, .adv-intentions-list, .adv-intentions-grid, .adv-intention-cards, .adv-li-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px; margin: 14px 0;
}
.adv-intention-card, .adv-intention-item, .adv-intention, .adv-li-card {
  background: var(--adv-panel);
  border: 1px solid var(--adv-rule);
  border-radius: var(--adv-r);
  padding: 12px 16px;
  display: flex; gap: 10px; align-items: flex-start;
}
.adv-intention-icon, .adv-know-icon, .adv-understand-icon, .adv-do-icon {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--adv-plum-soft); color: var(--adv-plum-deep);
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.adv-intention-label, .adv-intention-title, .adv-li-header,
.adv-know, .adv-understand, .adv-do {
  font-family: var(--adv-display); font-weight: 700;
  color: var(--adv-ink); font-size: 0.85rem;
  letter-spacing: 0.06em; text-transform: uppercase; margin: 0 0 4px;
}
.adv-intention-badge, .adv-li-badge,
.adv-badge-intention, .adv-intention-badge-do, .adv-intention-badge-understand {
  display: inline-block; padding: 2px 8px; border-radius: 6px;
  background: var(--adv-plum-soft); color: var(--adv-plum-deep);
  font-family: var(--adv-display); font-weight: 700; font-size: 0.72rem;
  letter-spacing: 0.08em; text-transform: uppercase;
}
.adv-intention-badge-do { background: var(--adv-gold-soft); color: var(--adv-gold-deep); }
.adv-intentions-header { margin-bottom: 12px; }
.adv-intention-list, .adv-intent-list { margin: 0; padding-left: 22px; }

/* ---- Practice/Review intro ---- */
.adv-practice-intro, .adv-review-intro {
  color: var(--adv-ink-soft); font-size: 0.95rem; margin: 0 0 16px;
}
.adv-practice-title, .adv-review-title {
  font-family: var(--adv-display); font-weight: 700; color: var(--adv-ink);
  font-size: 1.2rem; margin-bottom: 8px;
}
.adv-practice-container, .adv-review-container, .adv-learn-container { margin-bottom: 18px; }
.adv-practice-section, .adv-review-section { margin: 18px 0; }
.adv-learn-section, .adv-learn-grid, .adv-learn-col { margin-bottom: 18px; }
.adv-learn-card-header { padding: 12px 16px; background: var(--adv-cream); border-bottom: 1px solid var(--adv-rule); }
.adv-learn-card-body { padding: 14px 16px; }
.adv-learn-card-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; background: var(--adv-plum); color: #fff;
  border-radius: 50%; font-family: var(--adv-display); font-weight: 700;
}
.adv-learn-card-title { font-family: var(--adv-display); font-weight: 700; color: var(--adv-ink); }

/* ---- Solution block ---- */
.adv-solution, .adv-solution-body, .adv-solution-content, .adv-explanation, .adv-reasoning, .adv-answer-block, .adv-answer-box {
  margin-top: 10px; padding: 12px 14px;
  background: var(--adv-green-soft);
  border-left: 3px solid var(--adv-green);
  border-radius: var(--adv-r-sm);
  color: var(--adv-ink); line-height: 1.6; font-size: 0.95rem;
}

/* ---- SVG diagram wrapper ---- */
.adv-svg-diagram, .adv-svg-container, .adv-svg-content, .adv-diagram, .adv-table-wrapper {
  background: var(--adv-panel);
  border: 1px solid var(--adv-rule);
  border-radius: var(--adv-r);
  padding: 14px; margin: 12px 0;
}
.adv-svg-diagram svg, .adv-svg-container svg, .adv-svg-content svg, .adv-diagram svg {
  display: block; max-width: 100%; margin: 0 auto;
}
.adv-svg, .adv-svg-mini, .adv-svg-small { display: block; max-width: 100%; }
.adv-svg-caption { text-align: center; font-size: 0.85rem; color: var(--adv-muted); margin-top: 6px; font-style: italic; }

/* ---- Ring progress / misc ---- */
.adv-ring-prog {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--adv-display); font-weight: 700; color: var(--adv-plum-deep);
}
.adv-cb-area {
  background: var(--adv-cream);
  border: 1.5px dashed var(--adv-gold);
  border-radius: var(--adv-r);
  padding: 14px 16px; margin: 12px 0;
}

/* ---- Think-first prompts (extra variants) ---- */
.adv-think-first-q, .adv-think-first-question, .adv-think-question, .adv-think-prompt {
  font-size: 1rem; color: var(--adv-ink);
  margin: 0 0 10px; line-height: 1.55;
}
.adv-think-first-header, .adv-think-first-title, .adv-think-title {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--adv-display); font-weight: 700; font-size: 1.05rem;
  color: var(--adv-ink); margin: 0 0 10px;
}
.adv-think-icon, .adv-think-first-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px;
  background: var(--adv-gold-soft); color: var(--adv-gold-deep);
  border-radius: 50%; flex-shrink: 0;
}
.adv-think-answer, .adv-think-first-content, .adv-think-box {
  background: var(--adv-cream); border-radius: var(--adv-r-sm); padding: 10px 14px;
}

/* ---- Brain trainer / pattern puzzle / app card ---- */
.adv-brain-trainer, .adv-pattern-puzzle, .adv-puzzle-box, .adv-app-card {
  background: var(--adv-panel);
  border: 1px solid var(--adv-rule);
  border-left: 4px solid var(--adv-rose);
  border-radius: var(--adv-r);
  padding: 14px 18px; margin: 14px 0;
}
.adv-brain-card, .adv-brain-grid, .adv-brain-trainer-items {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px; margin: 10px 0;
}
.adv-brain-header { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.adv-brain-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; background: var(--adv-rose); color: #fff;
  border-radius: 50%; font-family: var(--adv-display); font-weight: 700; font-size: 0.85rem;
}
.adv-brain-trainer-desc { color: var(--adv-ink-soft); }
.adv-brain-icon { color: var(--adv-rose-deep); }
.adv-bt-q { font-weight: 500; color: var(--adv-ink); }
.adv-bt-ans, .adv-bt-reveal { margin-top: 8px; padding: 8px 12px; background: var(--adv-green-soft); border-radius: var(--adv-r-sm); }
.adv-bt-item, .adv-bt-items { margin: 6px 0; }
.adv-bt-intro { color: var(--adv-ink-soft); margin-bottom: 8px; }

/* ---- Section labels / dividers ---- */
.adv-section-icon { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; }
.adv-divider { border: 0; border-top: 1px solid var(--adv-rule); margin: 18px 0; }

/* ---- Misc state classes ---- */
.adv-hidden { display: none; }

/* ---- Headers / lead text ---- */
.adv-header, .adv-header-content { padding: 12px 0; }
.adv-header-subtitle, .adv-subtitle-bar { font-size: 0.92rem; color: var(--adv-muted); }
.adv-header-illustration { text-align: center; margin: 12px 0; }
.adv-lead, .adv-overline, .adv-stage-label, .adv-starter {
  font-size: 0.85rem; color: var(--adv-muted);
  font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase;
}
.adv-h2 {
  font-family: var(--adv-display); font-size: 1.3rem; font-weight: 700;
  color: var(--adv-ink); margin: 16px 0 10px;
}
.adv-panel-title {
  font-family: var(--adv-display); font-weight: 700; color: var(--adv-ink);
  font-size: 1.1rem; margin: 0 0 10px;
}
.adv-hero-content { padding: 18px 0; }

/* ---- XP badge ---- */
.adv-xp-badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: 999px;
  background: var(--adv-gold); color: #fff;
  font-family: var(--adv-display); font-weight: 700; font-size: 0.78rem;
}

/* ---- Checklist ---- */
.adv-checklist { list-style: none; padding: 0; margin: 0; }
.adv-checklist-item {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 0; color: var(--adv-ink);
}

/* ---- Method / model ---- */
.adv-method-box, .adv-model-content {
  background: var(--adv-panel);
  border: 1px solid var(--adv-rule);
  border-radius: var(--adv-r);
  padding: 14px 16px;
  margin: 12px 0;
}
.adv-method-title, .adv-method-step, .adv-method-text,
.adv-model-header, .adv-model-label, .adv-model-icon {
  font-family: var(--adv-display); font-weight: 700; color: var(--adv-ink);
}
.adv-method-steps { display: flex; flex-direction: column; gap: 8px; }
.adv-method-step { padding: 8px 12px; background: var(--adv-cream); border-radius: var(--adv-r-sm); }

/* ---- Context cards ---- */
.adv-context-card, .adv-context-grid {
  background: var(--adv-panel);
  border: 1px solid var(--adv-rule);
  border-radius: var(--adv-r);
  padding: 12px 14px;
  margin: 10px 0;
}
.adv-context-title { font-family: var(--adv-display); font-weight: 700; color: var(--adv-ink); }
.adv-context-ans { color: var(--adv-ink-soft); }

/* ---- Collapsible variants ---- */
.adv-collapsible-content, .adv-collapsible-body, .adv-details-content {
  padding: 12px 14px; background: var(--adv-cream);
  border-radius: var(--adv-r-sm); margin-top: 8px;
}
.adv-collapsible-btn, .adv-collapsible-toggle, .adv-collapsible-toggle-compact {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px;
  background: var(--adv-cream); color: var(--adv-ink);
  border: 1px solid var(--adv-rule);
  border-radius: var(--adv-r-sm);
  font-family: var(--adv-display); font-weight: 600; font-size: 0.9rem;
  cursor: pointer;
}
.adv-collapsible-arrow { transition: transform 0.2s; }

/* ---- Misc commonly-used containers ---- */
.adv-container, .adv-content, .adv-body, .adv-summary, .adv-summary-box { margin: 12px 0; }
.adv-keypoint, .adv-keypoints {
  background: var(--adv-cream);
  border-left: 4px solid var(--adv-gold);
  padding: 10px 14px; border-radius: var(--adv-r-sm);
  margin: 10px 0;
}

/* ---- Icon-helper colour variants ---- */
.adv-icon-warning { color: var(--adv-red); }
.adv-icon-book, .adv-icon-pencil { color: var(--adv-plum-deep); }
.adv-icon-lightbulb { color: var(--adv-gold-deep); }
.adv-icon-brain { color: var(--adv-rose-deep); }
.adv-icon-rocket, .adv-icon-target { color: var(--adv-coral-deep); }
.adv-icon-stopwatch { color: var(--adv-teal, var(--adv-plum)); }
.adv-note-icon { color: var(--adv-gold-deep); }

/* ---- Learn-card container ---- */
.adv-learn-card {
  background: var(--adv-panel);
  border: 1px solid var(--adv-rule);
  border-radius: var(--adv-r);
  padding: 16px 18px;
  margin: 14px 0;
  box-shadow: var(--adv-shadow);
}

/* ---- Tab system wrapper / Pitfalls header ---- */
.adv-tab-system { margin: 14px 0; }
.adv-pitfalls-header {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 12px;
  font-family: var(--adv-display); font-weight: 700;
  color: var(--adv-red); font-size: 1.05rem;
}

/* =================================================================
   v3.1 — Body-card upgrade to match Y7 U1 quality
   The section-based markup has plain .adv-section / .adv-intent-card
   / .adv-term-card panels that look bland compared to Y7's tinted
   .adv-card components. Add hard-shadow card depth, coloured
   accents, and per-position tinting for Know/Understand/Do.
================================================================= */

/* Section heading: bigger, with coloured icon + bottom accent rule */
.adv-section-title {
  font-family: var(--adv-display);
  font-size: 1.6rem !important;
  font-weight: 800;
  color: var(--adv-ink);
  margin: 0 0 18px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--adv-rule);
  display: flex; align-items: center; gap: 12px;
  letter-spacing: -0.01em;
}
.adv-section-title .adv-icon {
  width: 32px; height: 32px;
  color: var(--adv-plum);
}

/* "Big Idea" anchor section gets a stronger card look + accent stripe */
section.adv-anchor {
  background: var(--adv-panel);
  border: 1px solid var(--adv-rule);
  border-left: 5px solid var(--adv-plum);
  border-radius: var(--adv-r-lg);
  padding: 26px 30px !important;
  margin: 0 auto 24px;
  max-width: 860px;
  box-shadow: var(--adv-shadow);
}
.adv-anchor-title {
  font-family: var(--adv-display) !important;
  font-size: 1.8rem !important;
  font-weight: 800 !important;
  color: var(--adv-plum-deep) !important;
  margin: 0 0 4px !important;
  letter-spacing: -0.015em;
}
.adv-anchor-subtitle {
  font-family: var(--adv-display) !important;
  font-size: 0.78rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.14em !important;
  text-transform: uppercase !important;
  color: var(--adv-muted) !important;
  margin: 0 0 18px !important;
}

/* The tip-row Key Concept / Remember pills look stronger */
section.adv-anchor .adv-tip-row {
  margin: 14px 0 0;
  padding: 12px 16px;
  background: var(--adv-cream);
  border-radius: var(--adv-r);
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 14px;
}
section.adv-anchor .adv-tip-row > span.adv-badge {
  background: var(--adv-panel);
  border: 1.5px solid var(--adv-gold);
  color: var(--adv-gold-deep);
  font-weight: 700;
  padding: 5px 12px;
}

/* Learning Intentions: KNOW / UNDERSTAND / DO get distinct colour codes */
.adv-intent-grid, .adv-intentions {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 14px !important;
  margin: 0 auto 24px !important;
  max-width: 860px;
}
.adv-intent-card {
  background: var(--adv-panel) !important;
  border: 1px solid var(--adv-rule) !important;
  border-top: 4px solid var(--adv-plum) !important;
  border-radius: var(--adv-r) !important;
  padding: 16px 18px !important;
  display: block !important;
  box-shadow: var(--adv-shadow) !important;
  position: relative;
}
.adv-intent-card h4 {
  font-family: var(--adv-display);
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin: 0 0 10px;
  color: var(--adv-plum-deep);
}
.adv-intent-card .adv-list {
  margin: 0;
  padding-left: 18px;
  font-size: 0.92rem;
  line-height: 1.65;
  color: var(--adv-ink-soft);
}
.adv-intent-card .adv-list li { margin: 0 0 6px; }

/* Per-position tinting (KNOW=plum, UNDERSTAND=rose, DO=gold) */
.adv-intent-grid > .adv-intent-card:nth-child(1) {
  background: linear-gradient(180deg, var(--adv-plum-soft) 0%, var(--adv-panel) 60%) !important;
  border-top-color: var(--adv-plum) !important;
}
.adv-intent-grid > .adv-intent-card:nth-child(1) h4 { color: var(--adv-plum-deep); }
.adv-intent-grid > .adv-intent-card:nth-child(2) {
  background: linear-gradient(180deg, var(--adv-rose-soft) 0%, var(--adv-panel) 60%) !important;
  border-top-color: var(--adv-rose) !important;
}
.adv-intent-grid > .adv-intent-card:nth-child(2) h4 { color: var(--adv-rose-deep); }
.adv-intent-grid > .adv-intent-card:nth-child(3) {
  background: linear-gradient(180deg, var(--adv-gold-soft) 0%, var(--adv-panel) 60%) !important;
  border-top-color: var(--adv-gold) !important;
}
.adv-intent-grid > .adv-intent-card:nth-child(3) h4 { color: var(--adv-gold-deep); }

/* Key Terms: stronger card depth, term pill that doesn't fight the card */
.adv-terms-grid {
  display: grid !important;
  grid-template-columns: repeat(2, 1fr) !important;
  gap: 12px !important;
  margin: 0 auto 24px !important;
  max-width: 860px;
}
.adv-term-card {
  background: var(--adv-panel) !important;
  border: 1px solid var(--adv-rule) !important;
  border-left: 4px solid var(--adv-teal, var(--adv-plum)) !important;
  border-radius: var(--adv-r) !important;
  padding: 14px 18px !important;
  box-shadow: var(--adv-shadow-soft);
}
.adv-term-card h4.adv-term,
.adv-term-card .adv-term {
  background: transparent !important;
  color: var(--adv-plum-deep) !important;
  padding: 0 !important;
  margin: 0 0 6px !important;
  font-family: var(--adv-display);
  font-size: 1rem;
  font-weight: 700;
  display: block !important;
}
.adv-term-card .adv-definition {
  border-left: 0 !important;
  padding-left: 0 !important;
  margin: 0 !important;
  font-size: 0.92rem;
  color: var(--adv-ink-soft);
  line-height: 1.6;
}

/* Section-wrapper width + spacing for the section template (legacy) */
.adv-section { max-width: 860px; margin: 0 auto 20px; padding: 0 16px; }
.adv-section + .adv-section { margin-top: 4px; }

/* Tab-content panels (Learn / Practice / Review wrappers) */
.adv-tab-content {
  background: var(--adv-panel);
  border: 1px solid var(--adv-rule);
  border-radius: var(--adv-r-lg);
  padding: 24px 26px;
  margin: 0 auto 24px;
  max-width: 860px;
  box-shadow: var(--adv-shadow);
}

/* ---- Inside .adv-shell (post-migration pages), use full shell width ----
   The shell is 1180px (junior-adventure.css). Override the legacy 860px
   constraints from section/anchor/intent-grid/terms-grid/tab-content so
   the body matches the hero width and Y7 U1 sizing. */
.adv-shell .adv-section,
.adv-shell section.adv-anchor,
.adv-shell .adv-intent-grid,
.adv-shell .adv-intentions,
.adv-shell .adv-terms-grid,
.adv-shell .adv-tab-content {
  max-width: none !important;
  margin-left: 20px !important;
  margin-right: 20px !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}
.adv-shell section.adv-anchor,
.adv-shell .adv-tab-content {
  padding: 24px 28px !important;
  margin: 14px 20px !important;
}
.adv-shell .adv-section {
  padding: 0 20px !important;
  margin: 0 0 20px !important;
}
.adv-shell .adv-think-first,
.adv-shell .adv-intent-grid,
.adv-shell .adv-intentions,
.adv-shell .adv-terms-grid {
  max-width: none !important;
  margin: 14px 0 !important;
}

/* ---- Tab switching: in post-migration shell pages, hide inactive phases ---- */
.adv-shell .adv-phase { display: none !important; }
.adv-shell .adv-phase.active { display: block !important; }

/* ---- Numbered card-head circles (CSS counters, no HTML changes) ----
   Auto-numbers the major section headings in the Learn phase to match
   Y7 U1's .adv-card-num pattern (rose square with white digit).
   Counters reset per-phase. Practice/Review tabs reset their own
   counter so each phase starts at 1. */

.adv-shell #adv-phase-learn { counter-reset: adv-step 0; }
.adv-shell #adv-phase-practice { counter-reset: adv-step-p 0; }
.adv-shell #adv-phase-review { counter-reset: adv-step-r 0; }

/* Number the headings of section / anchor / tab-content blocks */
.adv-shell #adv-phase-learn > section.adv-anchor .adv-anchor-title,
.adv-shell #adv-phase-learn > section.adv-section .adv-section-title,
.adv-shell #adv-phase-learn > section.adv-tab-content .adv-section-title {
  counter-increment: adv-step;
}
.adv-shell #adv-phase-learn > section.adv-anchor .adv-anchor-title::before,
.adv-shell #adv-phase-learn > section.adv-section .adv-section-title::before,
.adv-shell #adv-phase-learn > section.adv-tab-content .adv-section-title::before {
  content: counter(adv-step);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px; height: 34px;
  background: var(--adv-rose);
  color: #fff;
  border-radius: 10px;
  font-family: var(--adv-display);
  font-size: 16px;
  font-weight: 800;
  margin-right: 14px;
  flex-shrink: 0;
  vertical-align: middle;
}

/* Practice phase numbers in plum, Review phase in gold */
.adv-shell #adv-phase-practice > section.adv-section .adv-section-title,
.adv-shell #adv-phase-practice > section.adv-tab-content .adv-section-title {
  counter-increment: adv-step-p;
}
.adv-shell #adv-phase-practice > section.adv-section .adv-section-title::before,
.adv-shell #adv-phase-practice > section.adv-tab-content .adv-section-title::before {
  content: counter(adv-step-p);
  display: inline-flex;
  align-items: center; justify-content: center;
  width: 34px; height: 34px;
  background: var(--adv-plum);
  color: #fff;
  border-radius: 10px;
  font-family: var(--adv-display);
  font-size: 16px; font-weight: 800;
  margin-right: 14px;
  flex-shrink: 0;
}
.adv-shell #adv-phase-review > section.adv-section .adv-section-title,
.adv-shell #adv-phase-review > section.adv-tab-content .adv-section-title {
  counter-increment: adv-step-r;
}
.adv-shell #adv-phase-review > section.adv-section .adv-section-title::before,
.adv-shell #adv-phase-review > section.adv-tab-content .adv-section-title::before {
  content: counter(adv-step-r);
  display: inline-flex;
  align-items: center; justify-content: center;
  width: 34px; height: 34px;
  background: var(--adv-gold);
  color: #fff;
  border-radius: 10px;
  font-family: var(--adv-display);
  font-size: 16px; font-weight: 800;
  margin-right: 14px;
  flex-shrink: 0;
}

/* Hide the in-title decorative SVG icon when a numbered counter takes its place */
.adv-shell #adv-phase-learn .adv-section-title > svg.adv-icon,
.adv-shell #adv-phase-practice .adv-section-title > svg.adv-icon,
.adv-shell #adv-phase-review .adv-section-title > svg.adv-icon {
  display: none;
}

/* ---- v3.2: Warm-tinted body cards to match Y7 U1 editorial feel ----
   Y7 U1's .adv-card panels look warm because the body bg (#f9efe1) is
   peach-cream and the cards have hard rule borders. The Y8 markup uses
   .adv-content-card / .adv-anchor (when nested) which had pure-white bg.
   Switch them to the soft/cream tokens so they read as the same warm
   "editorial card" instead of clinical white panels. */

.adv-shell .adv-content-card {
  background: var(--adv-soft) !important;
  border: 1.5px solid var(--adv-rule) !important;
  border-radius: var(--adv-r-lg) !important;
  padding: 24px 28px !important;
  margin: 0 0 18px !important;
  box-shadow: var(--adv-shadow) !important;
}

/* Nested anchor block inside content cards (text + diagram + formula) */
.adv-shell .adv-content-card .adv-anchor,
.adv-shell .adv-content-card .adv-anchor-grid-2 {
  background: var(--adv-panel) !important;
  border: 1.5px solid var(--adv-rule-soft) !important;
  border-radius: var(--adv-r) !important;
  padding: 18px 22px !important;
  margin: 12px 0 14px !important;
  box-shadow: none !important;
  display: grid;
  gap: 18px;
}
.adv-shell .adv-content-card .adv-anchor-grid-2 {
  grid-template-columns: 1.25fr 1fr;
}
@media (max-width: 768px) {
  .adv-shell .adv-content-card .adv-anchor-grid-2 { grid-template-columns: 1fr; }
}

/* The card-label pill above content (e.g. "Tip", "Example", "Warm-up") */
.adv-shell .adv-content-card .adv-card-label {
  display: inline-block;
  padding: 4px 11px;
  background: var(--adv-panel);
  border: 1px solid var(--adv-rule);
  border-radius: 999px;
  color: var(--adv-plum-deep);
  font-family: var(--adv-display);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  margin-bottom: 12px;
  text-transform: uppercase;
}

/* Top-level Big Idea / anchor section: warm peach instead of white */
.adv-shell section.adv-anchor {
  background: var(--adv-soft) !important;
  border-color: var(--adv-rule) !important;
}

/* Tab-content panels (Learn / Practice / Review wrappers) get the warm bg */
.adv-shell .adv-tab-content {
  background: var(--adv-soft) !important;
  border: 1.5px solid var(--adv-rule) !important;
}

/* Think First box: ensure consistent warm tone (currently amber gradient) */
.adv-shell .adv-think-first {
  background: linear-gradient(135deg, var(--adv-gold-soft) 0%, var(--adv-cream) 100%) !important;
  border-left: 5px solid var(--adv-gold) !important;
  box-shadow: var(--adv-shadow) !important;
  border-radius: var(--adv-r-lg) !important;
  padding: 22px 26px !important;
}

/* Inner brain-warmup panel inside think-first */
.adv-shell .adv-think-first .adv-brain-warmup {
  background: rgba(255,255,255,0.7) !important;
  border: 1px solid var(--adv-rule-soft) !important;
  border-radius: var(--adv-r) !important;
}

/* Inner toggle-content (the "Show My Thinking" reveal) */
.adv-shell .adv-think-first .adv-toggle-content {
  background: rgba(255,255,255,0.85) !important;
  border: 1px solid var(--adv-rule-soft) !important;
}

/* The padding on .adv-section already has 0 20px from the shell override;
   ensure the section heading also gets that bleed so the counter pill lines
   up with the card content below it. */
.adv-shell .adv-section .adv-section-title {
  margin-left: 0;
  margin-right: 0;
}

/* =================================================================
   v3.3 — Variety + bug fixes
   1. junior-adventure.css forces .adv-anchor to display:grid with
      3 columns. When .adv-anchor is used as a SECTION wrapper in Y8
      (not as Y7's inner block), the section's own h2 + p + grid-div
      children get placed in 3 grid columns. Reset to block.
   2. Each Learn section gets a different counter pill colour
      (rose / plum / gold / coral cycle) so numbered cards feel varied.
   3. Worked example boxes (.adv-example-box) get proper chrome:
      pill-style title, 4px coral left border, hard shadow, step-nav
      footer with coloured prev/next buttons + status dots.
   4. Tip-row badges cycle colour by nth-child so they're not all rose.
   5. .adv-card-header inner cards get strong number pill + cream head.
================================================================= */

/* 1. Defeat the .adv-anchor display:grid inheritance from junior-adventure.css */
.adv-shell section.adv-anchor {
  display: block !important;
  grid-template-columns: none !important;
  background: var(--adv-soft) !important;
  border: 1.5px solid var(--adv-rule) !important;
  border-left: 5px solid var(--adv-plum) !important;
  padding: 28px 32px !important;
}
.adv-shell section.adv-anchor > .adv-anchor-grid-2 {
  display: grid !important;
  grid-template-columns: 1.4fr 1fr !important;
  gap: 24px !important;
  align-items: center;
  margin-top: 16px;
}
@media (max-width: 820px) {
  .adv-shell section.adv-anchor > .adv-anchor-grid-2 { grid-template-columns: 1fr !important; }
}

/* 2. Numbered counter pill: rotate colour per Learn section */
.adv-shell #adv-phase-learn > section.adv-section:nth-of-type(4n+1) .adv-section-title::before { background: var(--adv-rose) !important; }
.adv-shell #adv-phase-learn > section.adv-section:nth-of-type(4n+2) .adv-section-title::before { background: var(--adv-plum) !important; }
.adv-shell #adv-phase-learn > section.adv-section:nth-of-type(4n+3) .adv-section-title::before { background: var(--adv-gold) !important; }
.adv-shell #adv-phase-learn > section.adv-section:nth-of-type(4n+4) .adv-section-title::before { background: var(--adv-coral) !important; }

/* 3. Worked-example chrome (.adv-example-box + .adv-step + .adv-step-nav) */
.adv-shell .adv-example-box {
  background: var(--adv-rose-soft);
  border: 1.5px solid var(--adv-rule);
  border-left: 4px solid var(--adv-rose) !important;
  border-radius: var(--adv-r-lg);
  padding: 22px 26px;
  margin: 18px 0;
  box-shadow: var(--adv-shadow);
}
.adv-shell .adv-example-box .adv-example-title {
  display: inline-block;
  font-family: var(--adv-display);
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--adv-rose-deep);
  background: var(--adv-panel);
  border: 1.5px solid var(--adv-rose);
  border-radius: 999px;
  padding: 6px 16px;
  margin: 0 0 14px;
}
.adv-shell .adv-example-box .adv-solution-steps {
  background: var(--adv-panel);
  border-radius: var(--adv-r);
  padding: 16px 20px;
  border: 1px solid var(--adv-rule-soft);
}
.adv-shell .adv-example-box .adv-step {
  padding: 8px 0;
  border-bottom: 1px dashed var(--adv-rule-soft);
}
.adv-shell .adv-example-box .adv-step:last-child { border-bottom: 0; }
.adv-shell .adv-example-box .adv-step p {
  font-size: 0.95rem;
  margin: 0 0 6px;
  color: var(--adv-ink);
  line-height: 1.6;
}
.adv-shell .adv-example-box .adv-step strong { color: var(--adv-rose-deep); }

/* Step nav footer (Prev / Dots / Next) */
.adv-shell .adv-step-nav {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  padding: 12px 16px;
  background: var(--adv-panel);
  border: 1px solid var(--adv-rule-soft);
  border-radius: var(--adv-r);
}
.adv-shell .adv-step-nav button,
.adv-shell .adv-prev-btn,
.adv-shell .adv-next-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px;
  background: var(--adv-rose);
  color: #fff;
  border: 0;
  border-radius: var(--adv-r-sm);
  font-family: var(--adv-display);
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.15s;
}
.adv-shell .adv-step-nav button:hover,
.adv-shell .adv-prev-btn:hover,
.adv-shell .adv-next-btn:hover { background: var(--adv-rose-deep); }
.adv-shell .adv-step-nav button:disabled,
.adv-shell .adv-prev-btn:disabled,
.adv-shell .adv-next-btn:disabled {
  background: var(--adv-rule);
  color: var(--adv-muted);
  cursor: not-allowed;
}
.adv-shell .adv-step-dots {
  display: flex; gap: 8px; align-items: center;
}
.adv-shell .adv-step-dots .dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--adv-rule);
  transition: background 0.15s, transform 0.15s;
}
.adv-shell .adv-step-dots .dot.active {
  background: var(--adv-rose);
  transform: scale(1.3);
}

/* 4. Tip-row varied colours per badge position */
.adv-shell .adv-tip-row {
  display: flex !important;
  flex-wrap: wrap;
  gap: 12px;
  margin: 14px 0;
  padding: 12px 14px;
  background: var(--adv-panel);
  border: 1px solid var(--adv-rule-soft);
  border-radius: var(--adv-r);
  align-items: flex-start;
}
.adv-shell .adv-tip-row > span.adv-badge {
  display: inline-flex; align-items: center;
  padding: 5px 12px;
  border-radius: 999px;
  font-family: var(--adv-display);
  font-weight: 700;
  font-size: 0.82rem;
  white-space: nowrap;
  flex-shrink: 0;
  background: var(--adv-gold-soft);
  color: var(--adv-gold-deep);
  border: 1px solid var(--adv-gold);
}
/* Cycle the badge colour by nth-of-type within parent */
.adv-shell .adv-tip-row:nth-of-type(2n) > span.adv-badge {
  background: var(--adv-plum-soft);
  color: var(--adv-plum-deep);
  border-color: var(--adv-plum);
}
.adv-shell .adv-tip-row:nth-of-type(3n) > span.adv-badge {
  background: var(--adv-rose-soft);
  color: var(--adv-rose-deep);
  border-color: var(--adv-rose);
}
.adv-shell .adv-tip-row > span:not(.adv-badge) {
  flex: 1; min-width: 200px;
  color: var(--adv-ink-soft);
  line-height: 1.55;
  font-size: 0.95rem;
}

/* 5. Inner content card head (.adv-card-header) — Y8 markup uses this, NOT
   .adv-card-head (Y7's). Make it look like Y7's: warm cream head bar with
   rose number square, then white body. */
.adv-shell .adv-content-card .adv-card,
.adv-shell .adv-tab-content > .adv-card {
  background: var(--adv-panel) !important;
  border: 1.5px solid var(--adv-rule) !important;
  border-radius: var(--adv-r-lg) !important;
  margin: 0 0 18px !important;
  padding: 0 !important;
  overflow: hidden;
  box-shadow: var(--adv-shadow) !important;
}
.adv-shell .adv-card-header {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 22px;
  background: var(--adv-soft) !important;
  border-bottom: 1px solid var(--adv-rule);
  margin: 0;
}
.adv-shell .adv-card-header > .adv-card-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px;
  background: var(--adv-rose);
  color: #fff;
  border-radius: 10px;
  font-family: var(--adv-display);
  font-weight: 800;
  font-size: 16px;
  flex-shrink: 0;
}
.adv-shell .adv-card-header > .adv-card-title,
.adv-shell .adv-card-header > h3 {
  font-family: var(--adv-display);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--adv-ink);
  margin: 0;
  letter-spacing: -0.01em;
}
.adv-shell .adv-card-body { padding: 18px 22px 22px; background: var(--adv-panel); }

/* Cycle inner card number colour by position so 6 cards aren't all-rose */
.adv-shell .adv-tab-content > .adv-card:nth-of-type(4n+1) .adv-card-header > .adv-card-num { background: var(--adv-rose); }
.adv-shell .adv-tab-content > .adv-card:nth-of-type(4n+2) .adv-card-header > .adv-card-num { background: var(--adv-plum); }
.adv-shell .adv-tab-content > .adv-card:nth-of-type(4n+3) .adv-card-header > .adv-card-num { background: var(--adv-gold); }
.adv-shell .adv-tab-content > .adv-card:nth-of-type(4n+4) .adv-card-header > .adv-card-num { background: var(--adv-coral); }

/* Responsive: stack intent cards on mobile */
@media (max-width: 768px) {
  .adv-intent-grid, .adv-intentions { grid-template-columns: 1fr !important; }
  .adv-terms-grid { grid-template-columns: 1fr !important; }
}

/* ---- Responsive overrides ---- */
@media (max-width: 720px) {
  .adv-two-col, .adv-big-idea-layout, .adv-bigidea-layout, .adv-big-idea-row,
  .adv-grid-2, .adv-grid-3 { grid-template-columns: 1fr; }
  .adv-footer, .adv-footer-row { flex-direction: column; align-items: stretch; }
  .adv-tab-bar { overflow-x: auto; }
}