/* ============================================================
   SCIENCE LEARNING PLATFORM — PH K-12
   styles.css
   Design: Clean editorial, warm academic, student-friendly
   Fonts: Fraunces (display) + DM Sans (body)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,400;0,9..144,600;0,9..144,700;1,9..144,400&family=DM+Sans:wght@400;500;600&display=swap');

/* --- VARIABLES --- */
:root {
  --clr-bg:         #f7f4ef;
  --clr-surface:    #ffffff;
  --clr-border:     #e2ddd6;

  --clr-phenomenon:    #1d4e89;
  --clr-models:        #1d4e89;
  --clr-core-concepts: #6b3fa0;
  --clr-application:   #b5531a;
  --clr-assessment:    #9b2226;

  --clr-accent:     #e07a34;
  --clr-text:       #1a1a1a;
  --clr-muted:      #6b6560;
  --clr-light:      #f0ece5;

  --radius:         10px;
  --radius-lg:      16px;
  --shadow:         0 2px 12px rgba(0,0,0,0.07);
  --shadow-md:      0 4px 24px rgba(0,0,0,0.10);

  --font-display:   'Fraunces', Georgia, serif;
  --font-body:      'DM Sans', system-ui, sans-serif;

  --tab-h:          56px;
  --max-w:          820px;
}

/* --- RESET --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--clr-bg);
  color: var(--clr-text);
  font-size: 16px;
  line-height: 1.7;
  min-height: 100vh;
}

/* --- HEADER --- */
.site-header {
  background: var(--clr-surface);
  border-bottom: 1px solid var(--clr-border);
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}
.site-header .logo {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  color: var(--clr-text);
  text-decoration: none;
  letter-spacing: -0.01em;
}
.site-header .logo span {
  color: var(--clr-accent);
}
.header-meta {
  font-size: 0.78rem;
  color: var(--clr-muted);
  font-weight: 500;
}

/* --- LESSON HERO --- */
.lesson-hero {
  background: var(--clr-surface);
  border-bottom: 1px solid var(--clr-border);
  padding: 14px 24px 10px;
  text-align: center;
}
.lesson-eyebrow {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--clr-muted);
  margin-bottom: 10px;
}
.lesson-eyebrow span {
  color: var(--clr-accent);
}
.lesson-title {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 4vw, 2.4rem);
  font-weight: 700;
  line-height: 1.2;
  color: var(--clr-text);
  margin-bottom: 10px;
}
.lesson-competency {
  font-size: 0.88rem;
  color: var(--clr-muted);
  max-width: 600px;
  margin: 0 auto 18px;
  font-style: italic;
}
.driving-question-pill {
  display: inline-block;
  background: var(--clr-light);
  border: 1px solid var(--clr-border);
  border-radius: 999px;
  padding: 8px 20px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--clr-text);
}
.driving-question-pill::before {
  content: "🔍 ";
}

/* --- TAB NAV --- */
.tab-nav {
  background: var(--clr-surface);
  border-bottom: 2px solid var(--clr-border);
  display: flex;
  overflow-x: auto;
  scrollbar-width: none;
  position: sticky;
  top: 56px;
  z-index: 90;
}
.tab-nav::-webkit-scrollbar { display: none; }

.tab-btn {
  flex: 1;
  min-width: 110px;
  height: var(--tab-h);
  border: none;
  background: transparent;
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--clr-muted);
  cursor: pointer;
  border-bottom: 3px solid transparent;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding-bottom: 3px;
}
.tab-btn .tab-icon { font-size: 1.1rem; }
.tab-btn:hover { background: var(--clr-light); }

.tab-btn[data-phase="phenomenon"].active    { color: var(--clr-phenomenon);    border-color: var(--clr-phenomenon); }
.tab-btn[data-phase="models"].active   { color: var(--clr-models);   border-color: var(--clr-models); }
.tab-btn[data-phase="core-concepts"].active   { color: var(--clr-core-concepts);   border-color: var(--clr-core-concepts); }
.tab-btn[data-phase="application"].active { color: var(--clr-application); border-color: var(--clr-application); }
.tab-btn[data-phase="assessment"].active  { color: var(--clr-assessment);  border-color: var(--clr-assessment); }

.tab-btn .tab-step {
  font-size: 0.65rem;
  font-weight: 400;
  opacity: 0.6;
  text-transform: none;
  letter-spacing: 0;
}

/* --- PHASE PANELS --- */
.phase-panel { display: none; }
.phase-panel.active { display: block; animation: fadeIn 0.3s ease; }

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

/* --- CONTENT WRAPPER --- */
.content-wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 16px 24px 24px;
}

/* --- PHASE HEADER --- */
.phase-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--clr-border);
}
.phase-badge {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}
.phase-badge.phenomenon    { background: #d8f3dc; }
.phase-badge.models       { background: #dbeafe; }
.phase-badge.core-concepts { background: #ede9fe; }
.phase-badge.application  { background: #ffe8d6; }
.phase-badge.assessment   { background: #fde8e8; }

.phase-header-text h2 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  line-height: 1.2;
}
.phase-header-text p {
  font-size: 0.83rem;
  color: var(--clr-muted);
  margin-top: 2px;
}

/* --- PHENOMENON BOX --- */
.phenomenon-box {
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-left: 5px solid var(--clr-phenomenon);
  border-radius: var(--radius-lg);
  padding: 28px 28px 24px;
  margin-bottom: 28px;
  box-shadow: var(--shadow);
}
.phenomenon-box h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 14px;
  color: var(--clr-phenomenon);
}
.phenomenon-box p, .phenomenon-box .story {
  font-size: 0.95rem;
  color: var(--clr-text);
  line-height: 1.75;
}
.phenomenon-image {
  width: 100%;
  border-radius: var(--radius);
  margin: 16px 0;
  object-fit: cover;
  max-height: 280px;
  background: var(--clr-light);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 160px;
  color: var(--clr-muted);
  font-size: 0.85rem;
  border: 1px dashed var(--clr-border);
}
.phenomenon-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius);
}

/* --- WONDER SECTION --- */
.wonder-section {
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  margin-bottom: 28px;
  box-shadow: var(--shadow);
}
.wonder-section h3 {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--clr-phenomenon);
  margin-bottom: 16px;
}
.wonder-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 14px;
}
.wonder-label {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--clr-muted);
  white-space: nowrap;
  padding-top: 10px;
  min-width: 120px;
}

/* --- INPUTS --- */
textarea, input[type="text"] {
  width: 100%;
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--clr-text);
  background: var(--clr-bg);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius);
  padding: 10px 14px;
  resize: vertical;
  transition: border-color 0.2s, box-shadow 0.2s;
  line-height: 1.6;
}
textarea:focus, input[type="text"]:focus {
  outline: none;
  border-color: var(--clr-accent);
  box-shadow: 0 0 0 3px rgba(224, 122, 52, 0.12);
}
textarea { min-height: 80px; }

/* --- CER BOX --- */
.cer-box {
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 28px;
  box-shadow: var(--shadow);
}
.cer-box-header {
  padding: 16px 24px;
  background: var(--clr-light);
  border-bottom: 1px solid var(--clr-border);
}
.cer-box-header h3 {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--clr-muted);
}
.cer-box-header p {
  font-size: 0.83rem;
  color: var(--clr-muted);
  margin-top: 3px;
}
.cer-field {
  padding: 18px 24px;
  border-bottom: 1px solid var(--clr-border);
}
.cer-field:last-child { border-bottom: none; }
.cer-field label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}
.cer-field.claim    label { color: var(--clr-models); }
.cer-field.evidence label { color: var(--clr-application); }
.cer-field.reasoning label { color: var(--clr-assessment); }
.cer-prompt {
  font-size: 0.85rem;
  color: var(--clr-muted);
  margin-bottom: 8px;
  font-style: italic;
}

/* --- MODEL CARDS (EXPLORE) --- */
.model-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
  margin-bottom: 28px;
}
.model-card {
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.model-card-img {
  width: 100%;
  height: 160px;
  background: var(--clr-light);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--clr-muted);
  font-size: 0.8rem;
  border-bottom: 1px solid var(--clr-border);
  position: relative;
}
.model-card-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 8px;
  background: white;
}
.img-credit {
  font-size: 0.67rem;
  color: var(--clr-muted);
  padding: 4px 10px;
  border-top: 1px solid var(--clr-border);
  background: var(--clr-bg);
  text-align: right;
  font-style: italic;
}
.model-card-img .img-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 16px;
  text-align: center;
}
.model-label-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--clr-models);
  color: white;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 999px;
  letter-spacing: 0.05em;
}
.model-card-body { padding: 16px; }
.model-card-caption {
  font-size: 0.82rem;
  color: var(--clr-muted);
  margin-bottom: 10px;
  font-style: italic;
}

/* --- INSTRUCTION BOX --- */
.instruction-box {
  background: #eef4fb;
  border: 1px solid #bcd4f0;
  border-radius: var(--radius);
  padding: 14px 18px;
  font-size: 0.88rem;
  color: #1d4e89;
  margin-bottom: 24px;
  line-height: 1.6;
}
.instruction-box strong { font-weight: 600; }

/* --- CONCEPT BLOCKS --- */
.concept-block {
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-lg);
  padding: 22px 26px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}
.concept-block h3 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  color: var(--clr-core-concepts);
  margin-bottom: 10px;
}
.concept-block p, .concept-block ul {
  font-size: 0.92rem;
  color: var(--clr-text);
  line-height: 1.75;
}
.concept-block ul {
  padding-left: 20px;
}
.concept-block ul li { margin-bottom: 6px; }

/* --- VOCABULARY --- */
.vocab-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin-bottom: 28px;
}
.vocab-card {
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-top: 3px solid var(--clr-core-concepts);
  border-radius: var(--radius);
  padding: 16px 18px;
  box-shadow: var(--shadow);
}
.vocab-term {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--clr-core-concepts);
  margin-bottom: 6px;
}
.vocab-def {
  font-size: 0.83rem;
  color: var(--clr-muted);
  line-height: 1.6;
}

/* --- SECTION LABEL --- */
.section-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--clr-muted);
  margin-bottom: 14px;
  margin-top: 32px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.section-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--clr-border);
}

/* --- ELABORATE ACTIVITY --- */
.elab-item {
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}
.elab-phenomenon {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--clr-text);
  margin-bottom: 6px;
}
.elab-hint {
  font-size: 0.8rem;
  color: var(--clr-muted);
  font-style: italic;
  margin-bottom: 14px;
}
.elab-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.elab-row label {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--clr-muted);
  display: block;
  margin-bottom: 6px;
}
.elab-select {
  width: 100%;
  font-family: var(--font-body);
  font-size: 0.88rem;
  padding: 9px 12px;
  border: 1px solid var(--clr-border);
  border-radius: var(--radius);
  background: var(--clr-bg);
  color: var(--clr-text);
  cursor: pointer;
}
.elab-select:focus {
  outline: none;
  border-color: var(--clr-accent);
}

/* --- EVALUATE --- */
.eval-question {
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-lg);
  padding: 22px 26px;
  margin-bottom: 18px;
  box-shadow: var(--shadow);
}
.eval-question .q-number {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--clr-assessment);
  margin-bottom: 8px;
}
.eval-question .q-text {
  font-size: 0.93rem;
  line-height: 1.7;
  margin-bottom: 14px;
}

/* MC options */
.mc-options { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.mc-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border: 1px solid var(--clr-border);
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 0.88rem;
  transition: background 0.15s, border-color 0.15s;
  user-select: none;
}
.mc-option:hover { background: var(--clr-light); }
.mc-option input[type="radio"] { accent-color: var(--clr-assessment); }
.mc-option.correct { background: #d8f3dc; border-color: var(--clr-phenomenon); }
.mc-option.incorrect { background: #fde8e8; border-color: var(--clr-assessment); }

/* Vocab fill blank */
.vocab-check-item {
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-lg);
  padding: 18px 22px;
  margin-bottom: 14px;
  box-shadow: var(--shadow);
}
.vocab-check-sentence {
  font-size: 0.9rem;
  line-height: 1.7;
  margin-bottom: 10px;
}
.vocab-check-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.vocab-option-btn {
  padding: 6px 16px;
  border: 1px solid var(--clr-border);
  border-radius: 999px;
  background: var(--clr-light);
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  color: var(--clr-text);
}
.vocab-option-btn:hover { background: var(--clr-border); }
.vocab-option-btn.selected { background: var(--clr-core-concepts); color: white; border-color: var(--clr-core-concepts); }
.vocab-option-btn.correct  { background: var(--clr-phenomenon); color: white; border-color: var(--clr-phenomenon); }
.vocab-option-btn.wrong    { background: var(--clr-assessment); color: white; border-color: var(--clr-assessment); }

/* --- CER REVISION --- */
.cer-revision-wrap {
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 28px;
  box-shadow: var(--shadow);
}
.cer-revision-header {
  background: #fff8f0;
  border-bottom: 1px solid var(--clr-border);
  padding: 16px 24px;
}
.cer-revision-header h3 {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--clr-application);
  margin-bottom: 4px;
}
.cer-revision-header p {
  font-size: 0.82rem;
  color: var(--clr-muted);
}
.cer-compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}
.cer-compare-col {
  padding: 18px 22px;
}
.cer-compare-col:first-child {
  border-right: 1px solid var(--clr-border);
  background: var(--clr-bg);
}
.cer-col-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--clr-muted);
  margin-bottom: 10px;
}
.cer-original-display {
  font-size: 0.83rem;
  color: var(--clr-muted);
  font-style: italic;
  background: var(--clr-border);
  border-radius: var(--radius);
  padding: 10px 14px;
  min-height: 60px;
  line-height: 1.6;
}
.cer-original-display.empty::before {
  content: "Nothing written yet in Explore.";
  color: var(--clr-muted);
  opacity: 0.6;
}

/* --- CONFIDENCE RATING --- */
.confidence-section {
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  margin-bottom: 28px;
  box-shadow: var(--shadow);
}
.confidence-section h3 {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--clr-muted);
  margin-bottom: 18px;
}
.confidence-item {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.confidence-item-label {
  font-size: 0.88rem;
  flex: 1;
  min-width: 180px;
}
.confidence-stars {
  display: flex;
  gap: 6px;
}
.star-btn {
  width: 32px;
  height: 32px;
  border: 1px solid var(--clr-border);
  border-radius: 50%;
  background: var(--clr-light);
  cursor: pointer;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, border-color 0.15s;
}
.star-btn:hover, .star-btn.active { background: #fff3cd; border-color: #f0a500; }

/* --- BUTTONS --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: var(--radius);
  border: none;
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}
.btn-primary {
  background: var(--clr-accent);
  color: white;
}
.btn-primary:hover { background: #c96820; transform: translateY(-1px); box-shadow: var(--shadow-md); }

.btn-secondary {
  background: var(--clr-surface);
  color: var(--clr-text);
  border: 1px solid var(--clr-border);
}

.btn-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius);
  border: none;
  background: transparent;
  color: var(--clr-text);
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}
.btn-back:hover {
  background: var(--clr-light);
  transform: translateX(-2px);
}

/* --- BACK BUTTON BAR --- */
.back-button-bar {
  background: var(--clr-surface);
  border-bottom: 1px solid var(--clr-border);
  padding: 12px 24px;
}
.back-button-bar .content-wrap {
  display: flex;
  align-items: center;
}

/* --- PERFORMANCE TASK (PT) STYLES --- */
body.pt-mode .tab-nav,
body.pt-mode .phase-panel,
body.pt-mode .progress-bar-wrap {
  display: none !important;
}

.pt-wrap .pt-hero h2 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  margin-bottom: 6px;
}
.pt-wrap .pt-meta {
  font-size: 0.88rem;
  color: var(--clr-muted);
  margin-bottom: 18px;
}
.pt-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 24px;
}
.pt-nav-btn {
  border: 1px solid var(--clr-border);
  background: var(--clr-surface);
  color: var(--clr-text);
  padding: 10px 16px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
  font-size: 0.88rem;
}
.pt-nav-btn:hover,
.pt-nav-btn.active {
  background: var(--clr-light);
  border-color: var(--clr-accent);
}
.pt-pages {
  margin-top: 24px;
}
.pt-page {
  display: none;
}
.pt-page.active {
  display: block;
}
.pt-page-title {
  font-size: 1.2rem;
  margin-bottom: 18px;
}
.pt-grid {
  display: grid;
  grid-template-columns: 1fr; /* stack vertically */
  gap: 14px;
  margin-bottom: 18px;
  max-width: var(--max-w);
  margin-left: auto;
  margin-right: auto;
}
.pt-card {
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--shadow);
  width: 100%;
}
.pt-card h3 { margin-bottom: 8px; color: var(--clr-accent); }
.pt-card-body { color: var(--clr-text); font-size: 0.95rem; line-height:1.6; }
.pt-details h3 { margin-top: 18px; color: var(--clr-text); font-size:1rem; }
.pt-section-body { background: var(--clr-surface); border:1px solid var(--clr-border); padding:12px; border-radius:var(--radius); margin-top:8px; box-shadow:var(--shadow); }

.pt-hero { text-align: center; margin-bottom: 32px; }
.pt-hero h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); margin: 12px 0 10px; }
.pt-intro { margin: 0 auto 20px; max-width: 760px; color: var(--clr-text); line-height: 1.8; font-size: 1rem; }
.pt-keyfacts { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; justify-items: center; margin-top: 18px; }
.pt-keyfacts span { display: inline-flex; align-items: center; justify-content: center; padding: 10px 14px; border-radius: 999px; background: var(--clr-light); border: 1px solid var(--clr-border); font-size: 0.88rem; color: var(--clr-text); }

.pt-section { margin-bottom: 28px; }
.pt-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin: 22px auto 26px;
  max-width: var(--max-w);
}
.pt-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  color: var(--clr-text);
  font-size: 0.85rem;
  text-decoration: none;
  transition: background 0.2s, border-color 0.2s;
}
.pt-nav a:hover {
  background: var(--clr-light);
  border-color: var(--clr-accent);
}
.pt-section-title { font-size: 1.15rem; margin-bottom: 14px; color: var(--clr-text); }
.timeline-list { display: grid; gap: 14px; margin-top: 10px; }
.timeline-item { background: var(--clr-surface); border: 1px solid var(--clr-border); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.timeline-item h4 { margin-bottom: 8px; font-size: 1rem; color: var(--clr-accent); }
.timeline-item p { margin-bottom: 10px; color: var(--clr-muted); }
.timeline-item ul { list-style: disc; margin-left: 18px; color: var(--clr-text); line-height: 1.7; }

.pt-subsection { margin-top: 18px; }
.pt-subsection strong { display: block; margin-bottom: 8px; }
.pt-subsection ol,
.pt-subsection ul { margin-left: 18px; line-height: 1.7; }

.rubric-block { margin-bottom: 22px; }
.rubric-block h4 { margin-bottom: 10px; font-size: 1rem; }
.rubric-criterion { margin-bottom: 16px; padding: 14px 16px; background: var(--clr-light); border-radius: var(--radius); }
.criterion-header { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.criterion-level { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 999px; background: var(--clr-accent); color: white; font-weight: 700; }
.rubric-criterion strong { font-size: 0.95rem; }
.rubric-criterion ul { margin-left: 18px; line-height: 1.7; }
.rubric-guide { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--clr-border); color: var(--clr-muted); font-size: 0.95rem; }

.sample-scenario { margin-top: 16px; }
.sample-scenario h4 { margin-bottom: 10px; }
.sample-site { background: var(--clr-surface); border: 1px solid var(--clr-border); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 12px; }
.sample-site h5 { margin-bottom: 10px; font-size: 0.98rem; }
.sample-site ul { margin-left: 18px; line-height: 1.7; }

.teacher-notes { white-space: pre-wrap; margin-top: 10px; }

/* Make the performance standard card span full width in PT mode */
body.pt-mode .lesson-info-hero-wrap { max-width: var(--max-w); margin: 0 auto; padding-top: 12px; }
body.pt-mode .lesson-info-grid { grid-template-columns: 1fr; }
body.pt-mode .lesson-info-card { width: 100%; }

/* Hide lesson-info-hero by default; JS shows it only on Engage tab */
#lesson-info-hero { display: none; }

.btn-secondary:hover { background: var(--clr-light); }

.btn-check {
  background: var(--clr-assessment);
  color: white;
  font-size: 0.82rem;
  padding: 8px 16px;
}
.btn-check:hover { background: #7a1a1d; }

.nav-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 36px;
  padding-top: 24px;
  border-top: 1px solid var(--clr-border);
  flex-wrap: wrap;
  gap: 12px;
}

/* --- DOWNLOAD CARD --- */
.download-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-lg);
  padding: 18px 22px;
  margin-bottom: 14px;
  box-shadow: var(--shadow);
  text-decoration: none;
  color: var(--clr-text);
  transition: box-shadow 0.2s, transform 0.2s;
}
.download-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.download-icon { font-size: 2rem; flex-shrink: 0; }
.download-info strong { display: block; font-size: 0.9rem; font-weight: 600; }
.download-info span { font-size: 0.78rem; color: var(--clr-muted); }

/* --- PROGRESS BAR --- */
.progress-bar-wrap {
  background: var(--clr-surface);
  border-bottom: 1px solid var(--clr-border);
  padding: 10px 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  position: sticky;
  top: 112px;
  z-index: 80;
}
.progress-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--clr-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  white-space: nowrap;
}
.progress-track {
  flex: 1;
  height: 5px;
  background: var(--clr-border);
  border-radius: 999px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: var(--clr-accent);
  border-radius: 999px;
  transition: width 0.4s ease;
  width: 0%;
}
.progress-steps {
  display: flex;
  gap: 6px;
}
.progress-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--clr-border);
  transition: background 0.3s;
}
.progress-dot.done { background: var(--clr-accent); }

/* --- COMPLETION CARD --- */
.completion-card {
  text-align: center;
  padding: 40px 28px;
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-lg);
  margin-bottom: 28px;
  box-shadow: var(--shadow);
}
.completion-card .icon { font-size: 3rem; margin-bottom: 14px; }
.completion-card h2 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  margin-bottom: 10px;
}
.completion-card p { font-size: 0.9rem; color: var(--clr-muted); max-width: 420px; margin: 0 auto; }

/* --- FOOTER --- */
.site-footer {
  background: var(--clr-surface);
  border-top: 1px solid var(--clr-border);
  padding: 20px 24px;
  text-align: center;
  font-size: 0.78rem;
  color: var(--clr-muted);
  margin-top: 60px;
}

/* --- RESPONSIVE --- */
@media (max-width: 600px) {
  .cer-compare { grid-template-columns: 1fr; }
  .cer-compare-col:first-child { border-right: none; border-bottom: 1px solid var(--clr-border); }
  .elab-row { grid-template-columns: 1fr; }
  .lesson-hero { padding: 24px 16px 20px; }
  .content-wrap { padding: 28px 16px 48px; }
  .tab-btn { min-width: 90px; font-size: 0.7rem; }
}

/* ============================================================
   ADDITIONS — Retrofit + Structural update
   Lesson info block, phenomenon reinforce, wonder prompts,
   bilingual vocab analogy, SVG wrappers, Gumroad block
   ============================================================ */

/* --- LESSON INFO BLOCK (inside Engage only) --- */
.lesson-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 28px;
}
.lesson-info-card {
  background: var(--clr-bg);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius);
  padding: 14px 18px;
}
.lesson-info-card--full { grid-column: 1 / -1; }
.lesson-info-card--objectives { border-left: 4px solid var(--clr-phenomenon); }
.lesson-info-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--clr-muted);
  margin-bottom: 6px;
}
.lesson-info-body {
  font-size: 0.85rem;
  color: var(--clr-text);
  line-height: 1.65;
}
.lesson-objectives-list {
  margin: 8px 0 0 18px;
  padding: 0;
}
.lesson-objectives-list li {
  font-size: 0.85rem;
  color: var(--clr-text);
  line-height: 1.65;
  margin-bottom: 4px;
}

/* --- PHENOMENON SVG WRAP --- */
.phenomenon-svg-wrap {
  width: 100%;
  margin: 16px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--clr-light);
  border: 1px dashed var(--clr-border);
  border-radius: var(--radius);
  overflow: visible;
  min-height: 360px;
}
.phenomenon-svg-wrap svg {
  width: 100%;
  max-height: 400px;
  display: block;
}

/* --- WONDER PROMPTS — I Observe · I Wonder · I Query --- */
.wonder-item {
  display: grid;
  grid-template-columns: 160px 1fr;
  grid-template-rows: auto auto;
  gap: 0 10px;
  margin-bottom: 18px;
  align-items: start;
}
.wonder-label {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--clr-phenomenon);
  padding-top: 10px;
  grid-row: 1;
  grid-column: 1;
}
.wonder-sublabel {
  font-size: 0.75rem;
  color: var(--clr-muted);
  font-style: italic;
  grid-row: 2;
  grid-column: 1;
  padding-bottom: 4px;
}
.wonder-item textarea {
  grid-row: 1 / span 2;
  grid-column: 2;
}

/* --- PHENOMENON REINFORCE BLOCK (top of Explore) --- */
.phenomenon-reinforce-box {
  background: #f0faf4;
  border: 1px solid #b7dfca;
  border-left: 5px solid var(--clr-phenomenon);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  margin-bottom: 24px;
}
.phenomenon-reinforce-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--clr-phenomenon);
  margin-bottom: 8px;
}
.phenomenon-reinforce-text {
  font-size: 0.88rem;
  color: var(--clr-text);
  line-height: 1.65;
  margin-bottom: 12px;
}
.phenomenon-reinforce-svg {
  margin: 12px 0;
}
.phenomenon-reinforce-svg svg {
  width: 100%;
  max-height: 350px;
  display: block;
  border-radius: var(--radius);
}
.phenomenon-reinforce-question {
  font-size: 0.85rem;
  color: var(--clr-phenomenon);
  font-style: italic;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed #b7dfca;
}

/* --- MODEL SVG WRAP --- */
.model-svg-wrap {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  background: white;
}
.model-svg-wrap svg {
  width: 100%;
  height: 100%;
  max-height: 150px;
  display: block;
}

/* --- OBS LABEL (inside model card) --- */
.obs-label {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--clr-muted);
  display: block;
  margin-bottom: 6px;
}

/* --- FIELD LABEL (inside design prompt) --- */
.field-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--clr-muted);
  display: block;
  margin-bottom: 6px;
}

/* --- VOCAB ANALOGY (no termFil) --- */
.vocab-analogy {
  font-size: 0.78rem;
  color: var(--clr-muted);
  font-style: italic;
  line-height: 1.55;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed var(--clr-border);
}

/* --- GUMROAD TEACHER BLOCK --- */
.gumroad-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: #fff8f0;
  border: 1px solid #f5d9b8;
  border-left: 5px solid var(--clr-accent);
  border-radius: var(--radius-lg);
  padding: 18px 22px;
  margin-bottom: 14px;
  box-shadow: var(--shadow);
  flex-wrap: wrap;
}
.gumroad-icon { font-size: 2rem; flex-shrink: 0; }
.gumroad-info { flex: 1; min-width: 160px; }
.gumroad-info strong {
  display: block;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--clr-text);
  margin-bottom: 2px;
}
.gumroad-info span { font-size: 0.78rem; color: var(--clr-muted); }
.btn-teacher {
  background: var(--clr-accent);
  color: white;
  font-size: 0.82rem;
  padding: 9px 18px;
  border-radius: var(--radius);
  border: none;
  font-family: var(--font-body);
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  transition: background 0.2s, transform 0.2s;
  white-space: nowrap;
}
.btn-teacher:hover { background: #c96820; transform: translateY(-1px); }

/* --- RESPONSIVE --- */
@media (max-width: 600px) {
  .lesson-info-grid { grid-template-columns: 1fr; }
  .lesson-info-card--full { grid-column: 1; }
  .wonder-item { grid-template-columns: 1fr; }
  .wonder-label { padding-top: 0; }
  .wonder-item textarea { grid-column: 1; grid-row: 3; }
  .gumroad-card { flex-direction: column; align-items: flex-start; }
}

/* ============================================================
   NAVIGATION PAGES — index.html, grade.html, term.html
   ============================================================ */

/* --- BREADCRUMB BAR --- */
.breadcrumb-bar {
  background: var(--clr-surface);
  border-bottom: 1px solid var(--clr-border);
  padding: 10px 24px;
  font-size: 0.82rem;
  color: var(--clr-muted);
}
.breadcrumb-bar a {
  color: var(--clr-accent);
  text-decoration: none;
}
.breadcrumb-bar a:hover { text-decoration: underline; }
.breadcrumb-sep {
  margin: 0 6px;
  opacity: 0.5;
}

/* --- HOME HERO --- */
.home-hero {
  background: var(--clr-surface);
  border-bottom: 1px solid var(--clr-border);
  padding: 56px 24px 48px;
  text-align: center;
}
.home-hero-eyebrow {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--clr-accent);
  margin-bottom: 14px;
}
.home-hero-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  color: var(--clr-text);
  line-height: 1.2;
  margin-bottom: 16px;
}
.home-hero-title em {
  font-style: italic;
  color: var(--clr-phenomenon);
}
.home-hero-sub {
  font-size: 1rem;
  color: var(--clr-muted);
  max-width: 520px;
  margin: 0 auto;
  line-height: 1.65;
}

/* --- PAGE HERO (grade.html, term.html) --- */
.page-hero {
  background: var(--clr-surface);
  border-bottom: 1px solid var(--clr-border);
  padding: 40px 24px 36px;
}
.page-hero-eyebrow {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--clr-accent);
  margin-bottom: 8px;
}
.page-hero-title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 4vw, 2.2rem);
  font-weight: 700;
  color: var(--clr-text);
  margin-bottom: 8px;
}
.page-hero-desc {
  color: var(--clr-muted);
  font-size: 0.95rem;
}

/* --- GRADE GRID --- */
.grade-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
  margin-bottom: 48px;
}
.grade-card {
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  cursor: pointer;
  transition: box-shadow 0.2s, transform 0.2s;
  text-decoration: none;
  color: inherit;
}
.grade-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.grade-card--soon {
  opacity: 0.55;
  cursor: default;
}
.grade-card--soon:hover {
  box-shadow: none;
  transform: none;
}
.grade-card-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}
.grade-card-body { flex: 1; min-width: 0; }
.grade-card-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 4px;
}
.grade-card-desc {
  font-size: 0.88rem;
  color: var(--clr-muted);
  line-height: 1.5;
  margin-bottom: 10px;
}
.grade-card-meta { display: flex; gap: 8px; flex-wrap: wrap; }
.grade-card-arrow {
  font-size: 1.4rem;
  font-weight: 700;
  align-self: center;
  flex-shrink: 0;
}

/* --- BADGES --- */
.badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 99px;
  font-size: 0.72rem;
  font-weight: 600;
}
.badge-available {
  background: #e8f5e9;
  color: #2d6a4f;
}
.badge-soon {
  background: var(--clr-light);
  color: var(--clr-muted);
}

/* --- TERM GRID (grade.html) --- */
.term-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
  margin-bottom: 20px;
}
.term-card {
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-lg);
  padding: 16px 16px;
  cursor: pointer;
  transition: box-shadow 0.2s, transform 0.2s;
}
.term-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.term-card--soon {
  opacity: 0.55;
  cursor: default;
}
.term-card--soon:hover {
  box-shadow: none;
  transform: none;
}
.term-card-number {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 6px;
}
.term-card-titles {
  margin-bottom: 12px;
}
.term-card-maintitle {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 3px;
  color: var(--clr-text);
}
.term-card-subtitle {
  font-size: 0.82rem;
  line-height: 1.3;
  color: var(--clr-muted);
  font-weight: 400;
}
.term-card-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.35;
  margin-bottom: 12px;
  color: var(--clr-text);
}
.term-card-meta { margin-bottom: 14px; }
.term-card-cta {
  font-size: 0.82rem;
  font-weight: 600;
}

/* --- LESSON LIST (term.html) --- */
.lesson-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 48px;
}
.lesson-row {
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.2s, transform 0.2s;
}
.lesson-row:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.lesson-row-number {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 700;
  flex-shrink: 0;
}
.lesson-row-body { flex: 1; min-width: 0; }
.lesson-row-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 2px;
}
.lesson-row-topic {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 4px;
}
.lesson-row-dq {
  font-size: 0.82rem;
  color: var(--clr-muted);
  font-style: italic;
}
.lesson-row-arrow {
  font-size: 1.6rem;
  font-weight: 700;
  flex-shrink: 0;
}

/* --- 5E EXPLAINER (index.html) --- */
.home-explainer {
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  margin-top: 48px;
}
.home-explainer h2 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 24px;
  color: var(--clr-text);
}
.five-e-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 16px;
}
.five-e-step {
  background: var(--clr-bg);
  border-radius: var(--radius);
  padding: 16px 14px;
}
.five-e-icon { font-size: 1.4rem; margin-bottom: 6px; }
.five-e-label {
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 6px;
}
.five-e-desc {
  font-size: 0.78rem;
  color: var(--clr-muted);
  line-height: 1.5;
}

/* --- COMING SOON MSG --- */
.coming-soon-msg {
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  text-align: center;
  color: var(--clr-muted);
  font-size: 0.95rem;
}

/* --- NAV RESPONSIVE --- */
@media (max-width: 600px) {
  .grade-grid { grid-template-columns: 1fr; }
  .term-grid { grid-template-columns: 1fr; }
  .five-e-row { grid-template-columns: repeat(2, 1fr); }
  .lesson-row-dq { display: none; }
}

/* ============================================================
   RAG REVISION v2 — New / Updated styles
   Added: lesson-info-hero, obs-summary-box, reflection-box,
          model-card enlarged SVG support
   ============================================================ */

/* --- LESSON INFO IN HERO (below driving question) --- */
.lesson-info-hero-wrap {
  max-width: 820px;
  margin: 24px auto 0;
  padding: 0 24px;
  text-align: left;
}

/* Collapsible toggle for lesson info in hero */
.lesson-info-hero-wrap .lesson-info-grid {
  margin-top: 0;
}

/* Override lesson-info-card styling when inside hero */
.lesson-info-hero-wrap .lesson-info-card {
  background: var(--clr-bg);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius);
  padding: 14px 18px;
}

/* --- MODEL CARD — enlarged SVG support --- */
/* The model-card-img was 160px; enlarge to fit 2x SVGs properly */
.model-card-img {
  width: 100%;
  height: 280px;  /* was 160px — doubled for enlarged SVGs */
  background: var(--clr-light);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--clr-muted);
  font-size: 0.8rem;
  border-bottom: 1px solid var(--clr-border);
  position: relative;
  overflow: hidden;
}

.model-svg-wrap {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  background: white;
}

.model-svg-wrap svg {
  width: 100%;
  height: 100%;
  max-height: 256px;
  display: block;
}

/* --- EXPLORE OBSERVATION SUMMARY BOX --- */
/* Replaces the CER box in the Explore phase */
.obs-summary-box {
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-left: 5px solid var(--clr-models);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  margin-bottom: 28px;
  box-shadow: var(--shadow);
}

.obs-summary-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.obs-summary-icon {
  font-size: 1.3rem;
}

.obs-summary-heading strong {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  color: var(--clr-models);
}

.obs-summary-instruction {
  font-size: 0.88rem;
  color: var(--clr-muted);
  font-style: italic;
  margin-bottom: 10px;
  line-height: 1.65;
}

.obs-summary-question {
  font-size: 0.93rem;
  color: var(--clr-text);
  line-height: 1.72;
  margin-bottom: 14px;
  font-weight: 500;
}

/* --- REFLECTION / JOURNAL BOX (Evaluate — Section E) --- */
/* Replaces the CER Revision block */
.reflection-box {
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 28px;
  box-shadow: var(--shadow);
}

.reflection-intro {
  background: #fff8f0;
  border-bottom: 1px solid var(--clr-border);
  padding: 16px 24px;
  font-size: 0.88rem;
  color: var(--clr-muted);
  font-style: italic;
  line-height: 1.65;
}

.reflection-prompt-block {
  padding: 20px 24px;
  border-bottom: 1px solid var(--clr-border);
}

.reflection-prompt-block:last-child {
  border-bottom: none;
}

.reflection-prompt-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.reflection-icon {
  font-size: 1.3rem;
  flex-shrink: 0;
}

.reflection-heading {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  color: var(--clr-application);
}

/* --- RESPONSIVE additions --- */
@media (max-width: 600px) {
  .lesson-info-hero-wrap {
    padding: 0 16px;
  }
  .model-card-img {
    height: 220px;
  }
  .model-svg-wrap svg {
    max-height: 200px;
  }
}

/* ── Elaborate data table SVG wrap (L6) ── */
.elab-data-table-wrap {
  width: 100%;
  overflow-x: auto;
  margin: 14px 0;
  border-radius: var(--radius);
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  padding: 12px;
}
.elab-data-table-wrap svg {
  min-width: 560px;
  width: 100%;
  display: block;
}


/* ============================================================
   EXPLORE ACTIVITY MENU
   ============================================================ */

.activity-menu {
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-top: 8px;
}

/* Menu header */
.act-menu-header {
  padding: 14px 18px 12px;
  background: var(--clr-light);
  border-bottom: 1px solid var(--clr-border);
}
.act-menu-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--clr-text);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 4px;
}
.act-menu-note {
  font-size: 0.78rem;
  color: var(--clr-muted);
  margin: 0;
}

/* Category sections */
.act-cat-section {
  border-bottom: 1px solid var(--clr-border);
}
.act-cat-section:last-of-type { border-bottom: none; }
.act-cat-heading {
  padding: 10px 18px 6px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--clr-muted);
  display: flex;
  align-items: center;
  gap: 10px;
}
.act-cat-heading::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--clr-border);
}
.act-item-list {
  padding: 4px 12px 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* Activity list items */
.act-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--clr-border);
  border-radius: var(--radius);
  background: var(--clr-surface);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.act-item:hover { background: var(--clr-light); }
.act-item.sel { border-color: var(--clr-primary); background: var(--clr-light); }
.act-item-ico { font-size: 1.25rem; flex-shrink: 0; width: 26px; text-align: center; margin-top: 2px; }
.act-item-text { flex: 1; min-width: 0; }
.act-item-name { font-size: 0.83rem; font-weight: 600; color: var(--clr-text); margin-bottom: 3px; }
.act-item.sel .act-item-name { color: var(--clr-primary); }
.act-item-desc { font-size: 0.77rem; color: var(--clr-muted); line-height: 1.5; }
.act-item-arrow { font-size: 0.85rem; color: var(--clr-muted); flex-shrink: 0; align-self: center; transition: transform 0.15s; }
.act-item.sel .act-item-arrow { color: var(--clr-primary); }

/* Expanded template */
.activity-template-container { border-top: 1px solid var(--clr-border); }
.act-template { border-top: 2px solid var(--clr-primary); }
.act-template-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding: 16px 20px;
  background: var(--clr-light);
  border-bottom: 1px solid var(--clr-border);
}
.act-template-title-row { display: flex; align-items: flex-start; gap: 12px; }
.act-template-icon { font-size: 1.8rem; }
.act-template-name { font-size: 1rem; font-weight: 700; color: var(--clr-text); margin-bottom: 4px; }
.act-template-desc { font-size: 0.8rem; color: var(--clr-muted); line-height: 1.5; }
.act-print-btn {
  padding: 7px 14px;
  border-radius: var(--radius);
  border: 1px solid var(--clr-border);
  background: white;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--clr-muted);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s;
  flex-shrink: 0;
}
.act-print-btn:hover { border-color: var(--clr-primary); color: var(--clr-primary); }

/* Shared field styles */
.act-section { padding: 20px; display: flex; flex-direction: column; gap: 18px; }
.act-field { display: flex; flex-direction: column; gap: 6px; }
.act-field-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--clr-primary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.act-field-tag {
  font-size: 0.72rem;
  font-weight: 600;
  background: #fff3cd;
  color: #856404;
  padding: 2px 8px;
  border-radius: 99px;
  margin-left: 8px;
  text-transform: none;
  letter-spacing: 0;
}
.act-field-prompt { font-size: 0.83rem; color: var(--clr-muted); margin: 0; line-height: 1.5; }
.act-field textarea, .act-section textarea {
  width: 100%;
  border: 1px solid var(--clr-border);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 0.85rem;
  font-family: inherit;
  color: var(--clr-text);
  background: var(--clr-surface);
  resize: vertical;
  transition: border-color 0.15s;
  box-sizing: border-box;
}
.act-field textarea:focus, .act-section textarea:focus { outline: none; border-color: var(--clr-primary); }
.act-col-label-input, .act-cm-link {
  width: 100%;
  border: 1px solid var(--clr-border);
  border-radius: 6px;
  padding: 7px 10px;
  font-size: 0.8rem;
  font-family: inherit;
  color: var(--clr-text);
  background: var(--clr-light);
  box-sizing: border-box;
  margin-bottom: 6px;
}
.act-col-label-input:focus, .act-cm-link:focus { outline: none; border-color: var(--clr-primary); }
.act-intro-note {
  font-size: 0.8rem;
  color: var(--clr-muted);
  background: var(--clr-light);
  border-left: 3px solid var(--clr-primary);
  padding: 8px 12px;
  border-radius: 0 6px 6px 0;
  margin-bottom: 4px;
}

/* PMI color accents */
.act-field--plus .act-field-label { color: #2d6a4f; }
.act-field--plus textarea { border-color: #b7e4c7; }
.act-field--minus .act-field-label { color: #9b2226; }
.act-field--minus textarea { border-color: #f4a2a2; }
.act-field--interesting .act-field-label { color: #7b5ea7; }
.act-field--interesting textarea { border-color: #c9b8e8; }
.act-field--post textarea { background: #fffdf0; border-color: #ffe08a; }

/* T-Chart */
.act-tchart { border: 1px solid var(--clr-border); border-radius: var(--radius); overflow: hidden; }
.act-tchart-header { display: grid; grid-template-columns: 1fr 1fr; background: var(--clr-light); }
.act-tchart-col-header { padding: 10px 12px; border-right: 1px solid var(--clr-border); }
.act-tchart-col-header:last-child { border-right: none; }
.act-tchart-row { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--clr-border); }
.act-tchart-cell { padding: 8px; border-right: 1px solid var(--clr-border); }
.act-tchart-cell:last-child { border-right: none; }
.act-tchart-cell textarea { border: none; padding: 4px; background: transparent; }
.act-tchart-cell textarea:focus { background: var(--clr-light); border-radius: 4px; }

/* Venn Diagram */
.act-venn-labels { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.act-venn-labels .act-col-label-input { max-width: 200px; }
.act-venn-body { display: grid; grid-template-columns: 1fr 0.8fr 1fr; }
.act-venn-zone { padding: 14px; border: 1px solid var(--clr-border); display: flex; flex-direction: column; gap: 6px; }
.act-venn-left { border-radius: var(--radius) 0 0 var(--radius); background: #eef6ff; }
.act-venn-both { background: #f0f9ee; border-left: none; border-right: none; }
.act-venn-right { border-radius: 0 var(--radius) var(--radius) 0; background: #fff5ee; }
.act-venn-zone-label { font-size: 0.72rem; font-weight: 700; color: var(--clr-muted); text-transform: uppercase; letter-spacing: 0.05em; margin: 0; }
.act-venn-zone textarea { flex: 1; border-color: transparent; background: transparent; }
.act-venn-zone textarea:focus { background: white; border-color: var(--clr-border); border-radius: 6px; }

/* Cause-Effect Map */
.act-cause-effect { display: flex; align-items: flex-start; gap: 16px; }
.act-ce-cause { flex: 0 0 160px; border: 2px solid var(--clr-primary); border-radius: var(--radius); padding: 12px; background: var(--clr-light); }
.act-ce-label { font-size: 0.72rem; font-weight: 700; color: var(--clr-primary); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 8px; }
.act-ce-arrow { font-size: 1.8rem; color: var(--clr-primary); align-self: center; flex-shrink: 0; padding-top: 20px; }
.act-ce-effects { flex: 1; display: flex; flex-direction: column; gap: 8px; }
.act-ce-effect-row { display: flex; align-items: center; gap: 8px; }
.act-ce-dot { color: var(--clr-primary); font-size: 0.8rem; flex-shrink: 0; }
.act-ce-effect-row textarea { flex: 1; }
@media (max-width: 600px) { .act-cause-effect { flex-direction: column; } .act-ce-arrow { transform: rotate(90deg); align-self: center; } }

/* Fishbone */
.act-fishbone { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 16px; }
.act-fishbone-branch { border: 1px solid var(--clr-border); border-radius: var(--radius); padding: 12px; background: var(--clr-light); }
.act-fishbone-subs { display: flex; flex-direction: column; gap: 6px; margin-top: 4px; }

/* Concept Map */
.act-concept-map { display: flex; flex-direction: column; gap: 16px; }
.act-cm-center { border: 2px solid var(--clr-primary); border-radius: var(--radius); padding: 14px; background: var(--clr-light); max-width: 320px; margin: 0 auto; width: 100%; }
.act-cm-center-label { font-size: 0.72rem; font-weight: 700; color: var(--clr-primary); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 8px; }
.act-cm-nodes { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.act-cm-node { border: 1px solid var(--clr-border); border-radius: var(--radius); padding: 10px; background: var(--clr-surface); }

/* Sequence Chart */
.act-sequence { display: flex; flex-direction: column; align-items: center; }
.act-seq-step { display: flex; align-items: flex-start; gap: 12px; width: 100%; max-width: 480px; border: 1px solid var(--clr-border); border-radius: var(--radius); padding: 12px; background: var(--clr-surface); }
.act-seq-number { width: 28px; height: 28px; border-radius: 50%; background: var(--clr-primary); color: white; font-size: 0.82rem; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; margin-top: 2px; }
.act-seq-step textarea { flex: 1; border: none; background: transparent; padding: 4px; }
.act-seq-step textarea:focus { background: var(--clr-light); border-radius: 4px; }
.act-seq-arrow { font-size: 1.1rem; color: var(--clr-primary); padding: 4px 0; }

/* Four Corners */
.act-four-corners { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 4px 0; }
.act-corner { border: 1px solid var(--clr-border); border-radius: var(--radius); padding: 12px; background: var(--clr-light); }
.act-corner-label { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 6px; color: var(--clr-muted); }
.act-corner--sa { border-color: #2d6a4f; } .act-corner--sa .act-corner-label { color: #2d6a4f; }
.act-corner--a  { border-color: #4895ef; } .act-corner--a  .act-corner-label { color: #4895ef; }
.act-corner--d  { border-color: #e07a34; } .act-corner--d  .act-corner-label { color: #e07a34; }
.act-corner--sd { border-color: #9b2226; } .act-corner--sd .act-corner-label { color: #9b2226; }

/* Concept Cartoon */
.act-characters { display: flex; flex-direction: column; gap: 14px; margin: 8px 0; }
.act-character { border: 1px solid var(--clr-border); border-radius: var(--radius); padding: 14px; background: var(--clr-light); }
.act-character-name { font-size: 0.82rem; font-weight: 700; color: var(--clr-text); margin-bottom: 8px; }
.act-character-claim { background: white; border: 1px dashed var(--clr-border); }

/* Decision Tree */
.act-decision-tree { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.act-dt-node { border: 1px solid var(--clr-border); border-radius: var(--radius); padding: 12px; background: var(--clr-surface); width: 100%; max-width: 360px; }
.act-dt-start { border-color: var(--clr-primary); background: var(--clr-light); }
.act-dt-leaf { max-width: 200px; background: #f0f9ee; border-color: #b7e4c7; }
.act-dt-type-label { font-size: 0.72rem; font-weight: 700; color: var(--clr-muted); text-transform: uppercase; margin-bottom: 6px; }
.act-dt-level { display: flex; gap: 16px; justify-content: center; width: 100%; }
.act-dt-branch { display: flex; flex-direction: column; align-items: center; gap: 8px; flex: 1; }
.act-dt-branch-tag { font-size: 0.75rem; font-weight: 700; padding: 3px 12px; border-radius: 99px; }
.act-dt-yes { background: #d8f3dc; color: #2d6a4f; }
.act-dt-no  { background: #fde8e8; color: #9b2226; }

/* Process Flow */
.act-process-flow { display: flex; flex-direction: column; align-items: center; }
.act-pf-step { width: 100%; max-width: 400px; border: 1px solid var(--clr-border); border-radius: var(--radius); padding: 12px; background: var(--clr-surface); }
.act-pf-start { border-color: #2d6a4f; background: #d8f3dc; }
.act-pf-end   { border-color: #4895ef; background: #dbeafe; }
.act-pf-label { font-size: 0.72rem; font-weight: 700; color: var(--clr-muted); text-transform: uppercase; margin-bottom: 6px; }
.act-pf-arrow { font-size: 1.1rem; color: var(--clr-primary); padding: 4px 0; }

/* If-Then Chart */
.act-ifthen { border: 1px solid var(--clr-border); border-radius: var(--radius); overflow: hidden; }
.act-ifthen-header { display: flex; background: var(--clr-light); border-bottom: 1px solid var(--clr-border); }
.act-ifthen-col-header { flex: 1; padding: 10px 14px; font-size: 0.78rem; font-weight: 700; color: var(--clr-primary); text-transform: uppercase; letter-spacing: 0.05em; }
.act-ifthen-spacer { width: 44px; flex-shrink: 0; border-left: 1px solid var(--clr-border); border-right: 1px solid var(--clr-border); }
.act-ifthen-row { display: flex; align-items: center; border-top: 1px solid var(--clr-border); }
.act-ifthen-cell { flex: 1; padding: 8px; }
.act-ifthen-cell textarea { border: none; background: transparent; }
.act-ifthen-cell textarea:focus { background: var(--clr-light); border-radius: 4px; }
.act-ifthen-arrow { width: 44px; text-align: center; color: var(--clr-primary); font-size: 1.1rem; border-left: 1px solid var(--clr-border); border-right: 1px solid var(--clr-border); padding: 8px 0; flex-shrink: 0; }

@media print {
  .activity-menu-header,
  .activity-menu-categories,
  .activity-menu-grid,
  .act-template-header .act-print-btn { display: none !important; }
  .act-template { border: none; }
  .activity-template-container { display: block !important; }
}

/* ============================================================
   FREEMIUM TERM LOCKING — locked term cards + unlock.html
   ============================================================ */

/* Locked term card on grade.html: still full-opacity and clickable
   (unlike --soon), just visually marked so it reads as "premium"
   rather than "unavailable". */
.term-card--locked {
  border-color: var(--clr-accent);
  background: linear-gradient(180deg, #fff 0%, #fff8f2 100%);
}
.lock-icon { font-size: 0.85em; }
.term-card-cta--locked {
  color: var(--clr-accent);
}

/* --- UNLOCK PAGE (unlock.html) --- */
.unlock-preview-card {
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-lg);
  padding: 24px 24px 8px;
  margin-bottom: 32px;
}
.unlock-preview-header { margin-bottom: 16px; }
.unlock-preview-maintitle {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--clr-text);
  margin-bottom: 4px;
}
.unlock-preview-subtitle {
  font-size: 0.9rem;
  color: var(--clr-muted);
}
.unlock-lesson-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.unlock-lesson-item {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid var(--clr-border);
}
.unlock-lesson-item:first-child { border-top: none; }
.unlock-lesson-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--clr-accent);
  white-space: nowrap;
  flex-shrink: 0;
}
.unlock-lesson-topic {
  font-family: var(--font-display);
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--clr-text);
}

/* --- UNLOCK CTA PANEL --- */
.unlock-cta-panel {
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-left: 5px solid var(--clr-accent);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  text-align: center;
  margin-bottom: 48px;
}
.unlock-cta-icon { font-size: 1.8rem; margin-bottom: 10px; }
.unlock-cta-title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--clr-text);
  margin-bottom: 10px;
}
.unlock-cta-desc {
  font-size: 0.92rem;
  color: var(--clr-muted);
  max-width: 480px;
  margin: 0 auto 22px;
  line-height: 1.6;
}
.unlock-cta-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}
.unlock-cta-btn {
  display: inline-block;
  padding: 12px 24px;
  border-radius: var(--radius);
  font-size: 0.92rem;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.2s, transform 0.2s;
}
.unlock-cta-btn--primary {
  background: #1877f2;
  color: #fff;
}
.unlock-cta-btn--primary:hover { background: #0f5fcc; transform: translateY(-1px); }
.unlock-cta-btn--secondary {
  background: var(--clr-light);
  color: var(--clr-text);
  border: 1px solid var(--clr-border);
}
.unlock-cta-btn--secondary:hover { background: #e9e4db; transform: translateY(-1px); }

@media (max-width: 600px) {
  .unlock-cta-buttons { flex-direction: column; }
  .unlock-cta-btn { width: 100%; text-align: center; }
}

/* --- REQUEST / REDEEM CODE PANELS --- */
.unlock-form-panel {
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  margin-bottom: 24px;
}
.unlock-form-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--clr-text);
  margin-bottom: 8px;
}
.unlock-form-desc {
  font-size: 0.88rem;
  color: var(--clr-muted);
  line-height: 1.6;
  margin-bottom: 18px;
  max-width: 560px;
}
.unlock-form {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.unlock-form input {
  flex: 1;
  min-width: 180px;
  padding: 12px 14px;
  border: 1px solid var(--clr-border);
  border-radius: var(--radius);
  font-size: 0.92rem;
  font-family: inherit;
  background: var(--clr-bg);
  color: var(--clr-text);
}
.unlock-form input:focus {
  outline: none;
  border-color: var(--clr-accent);
}
.unlock-form button {
  border: none;
  cursor: pointer;
  flex-shrink: 0;
}
.unlock-form button:disabled { opacity: 0.6; cursor: default; }
.unlock-form--inline input { max-width: 220px; flex: 0 1 220px; }
.unlock-form-result {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: var(--radius);
  font-size: 0.88rem;
  line-height: 1.6;
}
.unlock-form-result--success {
  background: #e8f5e9;
  color: #2d6a4f;
}
.unlock-form-result--error {
  background: #ffebee;
  color: #9b2226;
}

@media (max-width: 600px) {
  .unlock-form input, .unlock-form button { width: 100%; }
}
