/* ScoreCraft App Styles
   Design tokens from the landing page CSS — dark theme, accent #2dd4a8 */

/* Design tokens */
:root {
  --ink: #0d1117;
  --chalk: #f8f9fa;
  --accent: #2dd4a8;
  --accent-dim: #1a9e7a;
  --muted: #8b949e;
  --surface: #161b22;
  --card: #1c2128;
  --border: #30363d;
  --score-orange: #ff6b35;
  --score-blue: #4da6ff;
  --danger: #f85149;
  --success: #3fb950;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--ink);
  color: var(--chalk);
  line-height: 1.6;
  overflow-x: hidden;
}

/* Nav */
.nav {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 100;
  padding: 1.25rem 2rem;
  background: rgba(13, 17, 23, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 1.5rem;
  letter-spacing: -0.5px;
  color: var(--chalk);
  text-decoration: none;
}
.logo span { color: var(--accent); }
.nav-links {
  display: flex;
  gap: 2rem;
  align-items: center;
}
.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--chalk); }
.nav-links a.active { color: var(--accent); }

/* Main layout */
.main-content {
  padding-top: 80px;
  min-height: 100vh;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.4rem;
  border-radius: 8px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: all 0.2s;
  line-height: 1;
}
.btn-primary {
  background: var(--accent);
  color: var(--ink);
}
.btn-primary:hover { background: var(--accent-dim); }
.btn-secondary {
  background: var(--card);
  color: var(--chalk);
  border: 1px solid var(--border);
}
.btn-secondary:hover { border-color: var(--accent); }
.btn-ghost {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border);
}
.btn-ghost:hover { color: var(--chalk); border-color: var(--muted); }

/* Cards */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
}
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}
.card-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
}

/* Score display */
.score-display {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}
.score-big {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 3.5rem;
  font-weight: 700;
  color: var(--accent);
}
.score-arrow {
  font-size: 1.5rem;
  color: var(--muted);
}
.score-target {
  font-size: 1.5rem;
  color: var(--score-orange);
  font-weight: 600;
}

/* Section badges */
.section-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.section-math { background: rgba(77, 166, 255, 0.15); color: var(--score-blue); }
.section-reading { background: rgba(255, 107, 53, 0.15); color: var(--score-orange); }
.section-writing { background: rgba(45, 212, 168, 0.15); color: var(--accent); }

/* Lesson cards */
.lesson-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 0.75rem;
  cursor: pointer;
  transition: border-color 0.2s, transform 0.15s;
}
.lesson-card:hover { border-color: var(--accent); transform: translateY(-1px); }
.lesson-card.completed { border-color: var(--success); opacity: 0.7; }
.lesson-type-icon {
  font-size: 1.25rem;
  margin-right: 0.5rem;
}

/* Progress bar */
.progress-bar {
  width: 100%;
  height: 6px;
  background: var(--surface);
  border-radius: 3px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 3px;
  transition: width 0.3s ease;
}

/* Quiz */
.quiz-container { max-width: 700px; margin: 0 auto; }
.quiz-question {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  line-height: 1.4;
}
.quiz-options { display: flex; flex-direction: column; gap: 0.75rem; }
.quiz-option {
  background: var(--card);
  border: 2px solid var(--border);
  border-radius: 10px;
  padding: 1rem 1.25rem;
  cursor: pointer;
  font-size: 0.95rem;
  transition: all 0.2s;
  text-align: left;
  color: var(--chalk);
  font-family: 'DM Sans', sans-serif;
  width: 100%;
}
.quiz-option:hover { border-color: var(--accent); background: var(--surface); }
.quiz-option.selected { border-color: var(--accent); background: rgba(45, 212, 168, 0.1); }
.quiz-option.correct { border-color: var(--success); background: rgba(63, 185, 80, 0.1); }
.quiz-option.incorrect { border-color: var(--danger); background: rgba(248, 81, 73, 0.1); }

/* Feedback */
.feedback-box {
  border-radius: 10px;
  padding: 1rem 1.25rem;
  margin-top: 1rem;
  font-size: 0.9rem;
}
.feedback-correct { background: rgba(63, 185, 80, 0.1); border: 1px solid var(--success); color: var(--success); }
.feedback-incorrect { background: rgba(248, 81, 73, 0.1); border: 1px solid var(--danger); color: var(--danger); }

/* Stats */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}
.stat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem;
  text-align: center;
}
.stat-value {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--accent);
}
.stat-label { font-size: 0.85rem; color: var(--muted); margin-top: 0.25rem; }

/* Vocab cards */
.vocab-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}
.vocab-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem;
}
.vocab-word { font-family: 'Space Grotesk', sans-serif; font-size: 1.2rem; font-weight: 600; color: var(--accent); margin-bottom: 0.5rem; }
.vocab-def { font-size: 0.9rem; color: var(--chalk); margin-bottom: 0.5rem; }
.vocab-example { font-size: 0.85rem; color: var(--muted); font-style: italic; }

/* Forms */
.form-group { margin-bottom: 1.25rem; }
.form-label { display: block; font-size: 0.85rem; color: var(--muted); margin-bottom: 0.4rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }
.form-input {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--chalk);
  font-family: 'DM Sans', sans-serif;
  font-size: 1rem;
  transition: border-color 0.2s;
}
.form-input:focus { outline: none; border-color: var(--accent); }
.form-input::placeholder { color: var(--muted); }
.form-hint { font-size: 0.8rem; color: var(--muted); margin-top: 0.3rem; }
.form-error { color: var(--danger); font-size: 0.85rem; margin-top: 0.4rem; }

/* Section tabs */
.section-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0;
}
.section-tab {
  padding: 0.75rem 1.25rem;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
  cursor: pointer;
  border: none;
  background: transparent;
  font-family: 'DM Sans', sans-serif;
}
.section-tab:hover { color: var(--chalk); }
.section-tab.active { color: var(--accent); border-bottom-color: var(--accent); }

/* Score gap analysis */
.gap-analysis {
  background: linear-gradient(135deg, rgba(45,212,168,0.08), rgba(77,166,255,0.08));
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2rem;
  margin: 2rem 0;
  text-align: center;
}
.gap-number {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 4rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
}
.gap-label { font-size: 1.1rem; color: var(--muted); margin-top: 0.5rem; }

/* Goals list */
.goals-list { display: flex; flex-direction: column; gap: 0.75rem; }
.goal-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1rem 1.25rem;
}
.goal-priority {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
}
.priority-1 { background: var(--accent); color: var(--ink); }
.priority-2 { background: var(--score-blue); color: var(--ink); }
.priority-3 { background: var(--surface); color: var(--muted); border: 1px solid var(--border); }
.goal-info { flex: 1; }
.goal-section { font-weight: 600; font-size: 0.95rem; text-transform: capitalize; }
.goal-points { font-size: 0.8rem; color: var(--muted); margin-top: 0.2rem; }

/* Animations */
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.fade-in { animation: fadeIn 0.3s ease forwards; }
.fade-in-delay-1 { animation-delay: 0.1s; opacity: 0; }
.fade-in-delay-2 { animation-delay: 0.2s; opacity: 0; }
.fade-in-delay-3 { animation-delay: 0.3s; opacity: 0; }

/* Loading */
.loading { text-align: center; padding: 2rem; color: var(--muted); }

/* Empty state */
.empty-state { text-align: center; padding: 3rem; color: var(--muted); }
.empty-state h3 { font-family: 'Space Grotesk', sans-serif; font-size: 1.1rem; color: var(--chalk); margin-bottom: 0.5rem; }

/* Video embed */
.video-wrapper {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: 10px;
  margin: 1rem 0;
}
.video-wrapper iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: none; }

/* Tabs for sections */
.section-panel { display: none; }
.section-panel.active { display: block; }

/* Responsive */
@media (max-width: 768px) {
  .container { padding: 1rem; }
  .score-big { font-size: 2.5rem; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .nav-links { display: none; }
}

/* ── Zones Panel (Power Zones + Opportunity Index) ────────────────────────── */
.zones-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.zones-column {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem;
}

.zones-column-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.zones-column-icon {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

.zones-column-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.2px;
}

.zones-column.power-zones { border-top: 3px solid var(--accent); }
.zones-column.opportunities { border-top: 3px solid var(--score-orange); }

.zones-locked-state {
  text-align: center;
  padding: 1.25rem 1rem;
}

.zones-locked-state p {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 0.75rem;
}

.zones-progress-bar {
  background: var(--border);
  border-radius: 4px;
  height: 6px;
  overflow: hidden;
  margin-bottom: 0.75rem;
}

.zones-progress-fill {
  height: 100%;
  border-radius: 4px;
  background: var(--accent);
  transition: width 0.4s ease;
}

.zones-progress-label {
  font-size: 0.75rem;
  color: var(--muted);
}

.zone-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.875rem 1rem;
  margin-bottom: 0.6rem;
  transition: border-color 0.2s, transform 0.15s;
}

.zone-card:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}

.zone-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.zone-rank-badge {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  background: var(--accent);
  color: var(--ink);
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
}

.opp-rank-badge {
  background: var(--score-orange);
}

.zone-topic {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--chalk);
  text-transform: capitalize;
}

.zone-metrics {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.75rem;
  font-size: 0.8rem;
}

.zone-metric {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  color: var(--muted);
}

.zone-metric-value {
  font-weight: 700;
  color: var(--chalk);
}

.zone-flame {
  font-size: 0.9rem;
  margin-left: auto;
}

.zone-cta-btn {
  width: 100%;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  border: none;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
}

.zone-cta-btn:active { transform: scale(0.97); }

.zone-drill-btn {
  background: rgba(45, 212, 168, 0.15);
  color: var(--accent);
  border: 1px solid rgba(45, 212, 168, 0.3);
}

.zone-drill-btn:hover { background: rgba(45, 212, 168, 0.25); }

.zone-focus-btn {
  background: rgba(255, 107, 53, 0.15);
  color: var(--score-orange);
  border: 1px solid rgba(255, 107, 53, 0.3);
}

.zone-focus-btn:hover { background: rgba(255, 107, 53, 0.25); }

/* Unlock animation */
@keyframes zoneUnlock {
  0% { opacity: 0; transform: translateY(8px) scale(0.97); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

.zone-card.unlocking {
  animation: zoneUnlock 0.5s ease-out forwards;
}

.zone-card:nth-child(1).unlocking { animation-delay: 0ms; }
.zone-card:nth-child(2).unlocking { animation-delay: 100ms; }
.zone-card:nth-child(3).unlocking { animation-delay: 200ms; }

@keyframes glowPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(45, 212, 168, 0); }
  50% { box-shadow: 0 0 16px 2px rgba(45, 212, 168, 0.3); }
}

.zones-column.just-unlocked {
  animation: glowPulse 1s ease 2;
}

/* ── Drill Balance + Earn Progress ─────────────────────────────────────────── */
.drill-balance-bar {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.drill-balance-info { display: flex; align-items: center; gap: 0.75rem; }
.drill-balance-icon { font-size: 1.5rem; }
.drill-balance-count {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent);
}
.drill-balance-label { font-size: 0.8rem; color: var(--muted); }
.drill-earned-bar { flex: 1; max-width: 280px; }
.drill-earned-label {
  font-size: 0.75rem;
  color: var(--muted);
  margin-bottom: 0.35rem;
  display: flex;
  justify-content: space-between;
}
.drill-earned-track {
  background: var(--border);
  border-radius: 6px;
  height: 8px;
  overflow: hidden;
}
.drill-earned-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--score-orange));
  border-radius: 6px;
  transition: width 0.5s ease;
}
.paid-tier-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.75rem;
  background: rgba(45,212,168,0.1);
  border: 1px solid rgba(45,212,168,0.3);
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent);
}
.paid-tier-badge.annual { background: rgba(255,107,53,0.1); border-color: rgba(255,107,53,0.3); color: var(--score-orange); }

/* ── Drill Exhausted Upgrade Modal ────────────────────────────────────────── */
.upgrade-modal-overlay {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(0,0,0,0.75);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.upgrade-modal-overlay.show { display: flex; }
.upgrade-modal {
  background: var(--card);
  border: 1px solid var(--accent);
  border-radius: 20px;
  padding: 2.5rem;
  max-width: 460px;
  width: 100%;
  text-align: center;
  box-shadow: 0 0 40px rgba(45,212,168,0.15);
}
.upgrade-modal-icon { font-size: 3rem; margin-bottom: 1rem; }
.upgrade-modal-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}
.upgrade-modal-sub {
  font-size: 0.95rem;
  color: var(--muted);
  margin-bottom: 1.5rem;
  line-height: 1.6;
}
.upgrade-modal-reason {
  background: rgba(45,212,168,0.08);
  border: 1px solid rgba(45,212,168,0.2);
  border-radius: 10px;
  padding: 0.85rem 1.25rem;
  margin-bottom: 1.5rem;
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.5;
}
.upgrade-modal-reason strong { color: var(--accent); }
.upgrade-cta-row { display: flex; flex-direction: column; gap: 0.75rem; }
.btn-upgrade-monthly {
  display: block; width: 100%;
  padding: 0.85rem;
  background: var(--accent); color: var(--ink);
  border-radius: 10px;
  font-family: 'DM Sans', sans-serif;
  font-size: 1rem; font-weight: 600;
  text-decoration: none;
  transition: background 0.2s;
}
.btn-upgrade-monthly:hover { background: var(--accent-dim); }
.btn-upgrade-annual {
  display: block; width: 100%;
  padding: 0.85rem;
  background: var(--card); color: var(--chalk);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-family: 'DM Sans', sans-serif;
  font-size: 1rem; font-weight: 600;
  text-decoration: none;
  transition: border-color 0.2s;
}
.btn-upgrade-annual:hover { border-color: var(--accent); }
.upgrade-modal-close {
  margin-top: 1rem;
  font-size: 0.82rem;
  color: var(--muted);
  cursor: pointer;
  background: none; border: none;
  font-family: 'DM Sans', sans-serif;
}
.upgrade-modal-close:hover { color: var(--chalk); }

/* Mobile stack */
@media (max-width: 640px) {
  .zones-grid { grid-template-columns: 1fr; }
  .drill-balance-bar { flex-wrap: wrap; }
  .drill-earned-bar { max-width: 100%; width: 100%; }
}

/* ── Tooltips ──────────────────────────────────────────────────────────────── */
.tooltip-trigger {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  cursor: help;
}

.tooltip-trigger .tooltip-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--border);
  color: var(--muted);
  font-size: 0.65rem;
  font-weight: 700;
  line-height: 1;
  transition: background 0.2s, color 0.2s;
}

.tooltip-trigger:hover .tooltip-icon,
.tooltip-trigger:focus .tooltip-icon,
.tooltip-trigger.tooltip-active .tooltip-icon {
  background: var(--accent);
  color: var(--ink);
}

[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  top: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.5rem 0.75rem;
  font-size: 0.8rem;
  color: var(--chalk);
  white-space: normal;
  max-width: 240px;
  width: max-content;
  z-index: 100;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s;
  line-height: 1.4;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

[data-tooltip]:hover::after,
[data-tooltip]:focus::after,
[data-tooltip].tooltip-active::after {
  opacity: 1;
}

.tooltip-trigger .tooltip-text {
  display: none;
}

/* Mobile tap support via .tooltip-active class */
@media (max-width: 768px) {
  [data-tooltip].tooltip-active::after {
    opacity: 1;
  }
}

/* ── Desmos Toolbox ─────────────────────────────────────────────────────── */
.desmos-toolbox-hero {
  background: linear-gradient(135deg, rgba(45,212,168,0.08), rgba(77,166,255,0.06));
  border: 1px solid rgba(45,212,168,0.3);
  border-radius: 16px;
  padding: 1.5rem 1.75rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  flex-wrap: wrap;
}
.desmos-toolbox-icon { font-size: 2.5rem; line-height: 1; }
.desmos-toolbox-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 0.3rem;
}
.desmos-toolbox-sub { font-size: 0.9rem; color: var(--muted); }
.desmos-toolbox-links { display: flex; gap: 0.75rem; flex-wrap: wrap; align-items: center; margin-left: auto; }

/* Desmos tip callout (used in lesson modal + cheat sheet) */
.desmos-tip {
  background: rgba(45,212,168,0.08);
  border: 1px solid rgba(45,212,168,0.3);
  border-left: 4px solid var(--accent);
  border-radius: 8px;
  padding: 1rem 1.25rem;
  font-size: 0.9rem;
  color: var(--chalk);
  line-height: 1.6;
}
.desmos-tip-label {
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 0.4rem;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Desmos tip badge on lesson cards */
.desmos-tip-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--accent);
  background: rgba(45,212,168,0.1);
  border: 1px solid rgba(45,212,168,0.2);
  border-radius: 4px;
  padding: 0.15rem 0.5rem;
  margin-top: 0.5rem;
}

/* Cheat sheet page sections */
.cheatsheet-section {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1rem;
}
.cheatsheet-section-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--chalk);
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.cheatsheet-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.cheatsheet-list li {
  font-size: 0.9rem;
  color: var(--muted);
  padding-left: 1.25rem;
  position: relative;
}
.cheatsheet-list li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}
.cheatsheet-code {
  font-family: monospace;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.1rem 0.4rem;
  font-size: 0.85em;
  color: var(--accent);
}

@media (max-width: 768px) {
  .desmos-toolbox-hero { flex-direction: column; }
  .desmos-toolbox-links { margin-left: 0; }
}

.feedback-explain {
  margin-top: 0.75rem;
  padding: 0.85rem 1rem;
  border-left: 3px solid var(--accent);
  background: var(--surface);
  border-radius: 8px;
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--muted);
}
.feedback-explain-label {
  display: block;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.35rem;
}
.followup-form {
  margin-top: 0.75rem;
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
}
.followup-input {
  flex: 1;
  resize: vertical;
  min-height: 2.25rem;
  font: inherit;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: inherit;
  font-size: 0.9rem;
}
.followup-input:focus {
  outline: none;
  border-color: var(--accent);
}
.followup-thread {
  margin-top: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}