:root {
  color-scheme: light;
  /* Brand palette derived from the IXA logo: navy → vivid purple */
  --bg: #f7f6fc;
  --bg-tint: #f5f3ff;
  --panel: #ffffff;
  --ink: #1e1b4b;          /* deep navy from logo */
  --ink-soft: #312e81;
  --muted: #64748b;
  --accent: #7c3aed;       /* vivid purple from logo */
  --accent-dark: #5b21b6;
  --accent-light: #a855f7;
  --accent-bright: #8b5cf6;
  --border: #e5e7eb;
  --border-soft: #ede9fe;
  --shadow: 0 20px 50px rgba(30, 27, 75, 0.14);
  --shadow-soft: 0 4px 12px rgba(30, 27, 75, 0.06);
  --danger: #b91c1c;
  --success: #15803d;
  --gradient: linear-gradient(135deg, #1e1b4b 0%, #7c3aed 100%);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(124, 58, 237, 0.10), transparent 32rem),
    radial-gradient(circle at bottom right, rgba(30, 27, 75, 0.06), transparent 28rem),
    var(--bg);
  color: var(--ink);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

/* ---------- Header ---------- */
.site-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 32px;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(10px);
  position: sticky; top: 0; z-index: 10;
}
.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; color: var(--ink); }
.brand-logo { width: 44px; height: 44px; object-fit: contain; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font-weight: 800; font-size: 0.98rem; letter-spacing: -0.01em; }
.brand-name .x { color: var(--accent); }
.brand-tagline { font-size: 0.7rem; color: var(--accent); text-transform: uppercase; letter-spacing: 0.18em; font-weight: 700; }

.site-nav { display: flex; align-items: center; gap: 16px; }
.site-nav a { color: var(--ink); text-decoration: none; font-weight: 600; font-size: 0.92rem; }
.site-nav a:hover { color: var(--accent); }
.site-nav a.cta { background: var(--accent); color: white; padding: 10px 16px; border-radius: 10px; box-shadow: var(--shadow-soft); }
.site-nav a.cta:hover { background: var(--accent-dark); color: white; }
.user-pill { padding: 5px 10px; border: 1px solid var(--border-soft); border-radius: 999px; color: var(--muted); font-size: 0.82rem; }

.inline-form { display: inline; }
.link-button { background: transparent; border: 0; padding: 0; color: var(--accent); font-weight: 700; cursor: pointer; font: inherit; }
.link-button:hover { color: var(--accent-dark); text-decoration: underline; }

.site-main { flex: 1; width: min(1120px, calc(100% - 32px)); margin: 0 auto; padding: 40px 0; }
.site-footer { border-top: 1px solid var(--border); padding: 18px 32px; color: var(--muted); font-size: 0.82rem; text-align: center; }

/* ---------- Hero ---------- */
.hero { max-width: 720px; }
.hero.compact h1 { font-size: clamp(1.6rem, 4vw, 2.4rem); }
.eyebrow { margin: 0 0 8px; text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.74rem; font-weight: 800; color: var(--accent); }
.hero h1 { margin: 0 0 16px; font-size: clamp(2rem, 5vw, 3.4rem); line-height: 1.05; letter-spacing: -0.015em; color: var(--ink); }
.subtitle { color: var(--muted); font-size: 1.04rem; line-height: 1.6; max-width: 760px; }
.hero-actions { display: flex; gap: 12px; margin-top: 24px; flex-wrap: wrap; }

/* ---------- Buttons ---------- */
.btn-primary, .btn-secondary {
  display: inline-block; padding: 12px 22px; border-radius: 12px;
  font-weight: 700; text-decoration: none; border: 0; cursor: pointer; font: inherit;
  transition: transform 100ms ease, box-shadow 100ms ease, background-color 100ms ease;
}
.btn-primary { background: var(--accent); color: white; box-shadow: 0 10px 24px rgba(124, 58, 237, 0.28); }
.btn-primary:hover { background: var(--accent-dark); transform: translateY(-1px); }
.btn-primary.disabled { opacity: 0.5; pointer-events: none; }
.btn-secondary { background: var(--bg-tint); color: var(--ink); border: 1px solid var(--border-soft); }
.btn-secondary:hover { background: var(--border-soft); }
.btn-danger { background: var(--danger); color: white; border: 0; padding: 8px 14px; border-radius: 10px; font-weight: 700; cursor: pointer; font: inherit; }
.btn-small { padding: 8px 14px; border-radius: 10px; border: 0; font-weight: 700; cursor: pointer; font: inherit; text-decoration: none; display: inline-block; }
.btn-approve { background: var(--accent); color: white; }
.btn-approve:hover { background: var(--accent-dark); color: white; }
.btn-reject { background: var(--bg-tint); color: var(--ink); }

/* ---------- Auth cards ---------- */
.auth-card {
  max-width: 440px; margin: 0 auto;
  background: var(--panel); border: 1px solid var(--border-soft);
  border-radius: 20px; box-shadow: var(--shadow); padding: 32px;
}
.auth-card h1 { margin-top: 0; }
.stack { display: flex; flex-direction: column; gap: 14px; margin-top: 12px; }
.stack label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: 0.92rem; }
.stack input { width: 100%; padding: 12px 14px; border: 1px solid var(--border); border-radius: 10px; font: inherit; background: #fff; outline: none; transition: border-color 100ms; }
.stack input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.14); }
.stack button { margin-top: 8px; }

.muted { color: var(--muted); }
.small { font-size: 0.86rem; }
.center { text-align: center; }

.alert { padding: 12px 14px; border-radius: 10px; margin-bottom: 12px; font-size: 0.95rem; }
.alert.error { background: #fee2e2; color: var(--danger); border: 1px solid #fecaca; }
.alert.info { background: var(--bg-tint); color: var(--accent-dark); border: 1px solid var(--border-soft); }
.alert.success { background: #dcfce7; color: var(--success); border: 1px solid #bbf7d0; }

/* ---------- Admin tables ---------- */
.admin-wrap { display: flex; flex-direction: column; gap: 32px; }
.admin-header h1 { margin: 0; }
.count { background: var(--accent); color: white; padding: 2px 10px; border-radius: 999px; font-size: 0.82rem; margin-left: 8px; font-weight: 700; }

.table { width: 100%; border-collapse: collapse; background: var(--panel); border: 1px solid var(--border-soft); border-radius: 14px; overflow: hidden; }
.table th, .table td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--border-soft); }
.table th { background: var(--bg-tint); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.table tr:last-child td { border-bottom: 0; }
.row-actions { display: flex; gap: 8px; }

/* ---------- Diagnostic ---------- */
.diagnostic-wrap { display: flex; flex-direction: column; gap: 24px; }
.diagnostic { display: flex; flex-direction: column; gap: 14px; }
.q-card { background: var(--panel); border: 1px solid var(--border-soft); border-radius: 16px; padding: 18px 22px; margin: 0; }
.q-card legend { font-weight: 800; font-size: 1rem; padding: 0 6px; color: var(--ink); }
.q-card .optional { background: var(--border-soft); color: var(--muted); font-size: 0.66rem; padding: 2px 8px; border-radius: 999px; margin-left: 6px; text-transform: uppercase; letter-spacing: 0.06em; font-weight: 700; }
.q-card .helper { color: var(--muted); margin: 4px 0 12px; font-size: 0.9rem; }
.options { display: flex; flex-wrap: wrap; gap: 8px; }
.options .opt {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 14px; border: 1px solid var(--border);
  border-radius: 10px; background: #fff; cursor: pointer;
  font-size: 0.92rem; font-weight: 500;
  transition: border-color 100ms, background-color 100ms;
}
.options .opt:hover { border-color: var(--accent); }
.options .opt input { margin: 0; accent-color: var(--accent); }
.options .opt:has(input:checked) { border-color: var(--accent); background: var(--bg-tint); font-weight: 700; }
.q-card textarea { width: 100%; padding: 12px 14px; border: 1px solid var(--border); border-radius: 10px; font: inherit; background: #fff; resize: vertical; min-height: 80px; }
.q-card textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.14); }
.range-row { display: flex; align-items: center; gap: 16px; }
.range-row input[type=range] { flex: 1; accent-color: var(--accent); }
.range-row output { min-width: 36px; text-align: center; background: var(--accent); color: white; padding: 4px 10px; border-radius: 999px; font-weight: 800; }
.submit-row { display: flex; justify-content: flex-end; padding-top: 8px; }

/* ---------- Dashboard ---------- */
.dashboard { display: flex; flex-direction: column; gap: 32px; }
.section-title { margin: 0 0 14px; font-size: 1.05rem; letter-spacing: -0.01em; }

.track-strip { display: flex; flex-direction: column; gap: 10px; }
.track-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.track-card { background: var(--panel); border: 1px solid var(--border-soft); border-radius: 14px; padding: 16px 18px; box-shadow: var(--shadow-soft); }
.track-card h3 { margin: 0 0 6px; color: var(--accent); font-size: 1rem; }
.track-card p { margin: 0; color: var(--muted); font-size: 0.9rem; line-height: 1.5; }

.module-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; }
.module-card {
  background: var(--panel); border: 1px solid var(--border-soft); border-radius: 16px;
  padding: 18px 20px; display: flex; flex-direction: column; gap: 8px;
  transition: transform 120ms, box-shadow 120ms; box-shadow: var(--shadow-soft);
}
.module-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.module-card.status-done { border-color: rgba(21, 128, 61, 0.4); }
.module-card.status-in_progress { border-color: var(--accent); }
.module-card h3 { margin: 0; font-size: 1.02rem; color: var(--ink); }
.module-card p { margin: 0; color: var(--muted); font-size: 0.9rem; line-height: 1.5; }
.module-meta { display: flex; justify-content: space-between; align-items: center; font-size: 0.74rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; font-weight: 700; }
.module-cta { margin-top: 6px; display: flex; align-items: center; gap: 10px; }

.badge { display: inline-block; padding: 4px 10px; border-radius: 999px; font-size: 0.74rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; }
.badge.muted { background: var(--border-soft); color: var(--ink-soft); }
.badge.success { background: #dcfce7; color: var(--success); }
.badge.in-progress { background: rgba(124, 58, 237, 0.12); color: var(--accent); }

/* ---------- Breadcrumb ---------- */
.breadcrumb { display: flex; align-items: center; gap: 8px; font-size: 0.86rem; color: var(--muted); margin-bottom: 24px; }
.breadcrumb a { color: var(--accent); text-decoration: none; font-weight: 600; }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb .sep { color: var(--muted); }
.breadcrumb .current { color: var(--ink); font-weight: 600; }

/* ---------- Module page ---------- */
.lesson-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.lesson-row {
  background: var(--panel); border: 1px solid var(--border-soft); border-radius: 12px;
  padding: 14px 18px; display: flex; justify-content: space-between; align-items: center; gap: 16px;
  transition: border-color 100ms;
}
.lesson-row:hover { border-color: var(--accent); }
.lesson-left { display: flex; align-items: flex-start; gap: 14px; flex: 1; }
.lesson-num { background: var(--gradient); color: white; padding: 4px 10px; border-radius: 8px; font-weight: 800; font-size: 0.82rem; min-width: 44px; text-align: center; }
.lesson-left h3 { margin: 0 0 4px; font-size: 0.98rem; }
.lesson-right { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }

/* ---------- Generating page ---------- */
.generating { display: flex; justify-content: center; padding: 40px 0; }
.generating-card { max-width: 520px; text-align: center; background: var(--panel); border: 1px solid var(--border-soft); border-radius: 24px; box-shadow: var(--shadow); padding: 40px 32px; }
.spinner-wrap { margin: 28px 0; display: flex; flex-direction: column; align-items: center; gap: 16px; }
.spinner { width: 48px; height: 48px; border: 4px solid var(--border-soft); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.status { color: var(--muted); font-weight: 600; min-height: 1.4em; }
.error-wrap { display: flex; flex-direction: column; align-items: center; gap: 16px; margin-top: 20px; }

/* ---------- Lesson ---------- */
.lesson { max-width: 760px; margin: 0 auto; }
.lesson-header { margin-bottom: 32px; }
.lesson-header h1 { margin: 0 0 12px; font-size: clamp(1.6rem, 4vw, 2.4rem); line-height: 1.15; letter-spacing: -0.015em; }
.lesson-meta { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.lesson-meta .badge { background: var(--accent); color: white; }

.lesson-section { margin-bottom: 32px; }
.lesson-section h2 { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--accent); margin: 0 0 12px; }
.lesson-section h3 { margin: 16px 0 8px; font-size: 1rem; }
.lesson-section.callout { background: var(--bg-tint); border-left: 3px solid var(--accent); padding: 18px 22px; border-radius: 0 14px 14px 0; }
.lesson-section.callout h2 { color: var(--accent-dark); }

.prose { line-height: 1.65; font-size: 1rem; white-space: pre-wrap; }
.prose strong { color: var(--ink); }

.key-concepts { display: grid; grid-template-columns: 1fr; gap: 10px; }
.key-concepts dt { font-weight: 800; color: var(--accent-dark); }
.key-concepts dd { margin: 4px 0 0; color: var(--muted); line-height: 1.55; }

.resource-card { display: flex; justify-content: space-between; align-items: center; gap: 16px; background: var(--panel); border: 1px solid var(--border-soft); border-radius: 12px; padding: 16px 20px; text-decoration: none; color: inherit; transition: border-color 100ms, transform 100ms; }
.resource-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.resource-card h3 { margin: 0 0 6px; }
.resource-meta { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 6px; }
.resource-arrow { font-size: 1.6rem; color: var(--accent); }

.slide-list { padding-left: 20px; display: flex; flex-direction: column; gap: 12px; }
.slide-list li { line-height: 1.55; }
.slide-list strong { display: block; color: var(--ink); }
.slide-list p { margin: 4px 0 0; color: var(--muted); }

pre.mermaid { background: var(--panel); border: 1px solid var(--border-soft); border-radius: 12px; padding: 16px; overflow: auto; font-family: ui-monospace, monospace; font-size: 0.9rem; }

.quiz { display: flex; flex-direction: column; gap: 10px; }
.quiz-item { background: var(--panel); border: 1px solid var(--border-soft); border-radius: 12px; padding: 14px 18px; }
.quiz-item summary { cursor: pointer; font-weight: 700; display: flex; align-items: flex-start; gap: 10px; list-style: none; }
.quiz-item summary::-webkit-details-marker { display: none; }
.q-num { color: var(--accent); font-weight: 800; }
.quiz-options { margin: 12px 0; padding-left: 22px; }
.quiz-answer { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--border-soft); }

.checklist { padding-left: 22px; }
.checklist li { margin-bottom: 4px; }

.lesson-footer { margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--border-soft); display: flex; flex-direction: column; gap: 14px; }
.nav-row { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.footer-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* ---------- Admin pages ---------- */
.admin-grid { display: grid; grid-template-columns: 1fr; gap: 24px; }
.config-card { background: var(--panel); border: 1px solid var(--border-soft); border-radius: 16px; padding: 22px; box-shadow: var(--shadow-soft); }
.config-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.config-status { display: flex; align-items: center; gap: 8px; font-weight: 700; }
.config-status.ok { color: var(--success); }
.config-status.missing { color: var(--danger); }
.config-form { display: flex; gap: 8px; flex-wrap: wrap; }
.config-form input { flex: 1; min-width: 280px; padding: 10px 14px; border: 1px solid var(--border); border-radius: 10px; font: inherit; }
.config-form input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.14); }
.config-help { font-size: 0.86rem; color: var(--muted); margin-top: 8px; line-height: 1.5; }

.lesson-admin-list { display: flex; flex-direction: column; gap: 24px; }
.lesson-admin-group h2 { margin: 0 0 8px; font-size: 1.04rem; }
.lesson-admin-row { display: grid; grid-template-columns: 60px 1fr auto auto auto; gap: 14px; align-items: center; padding: 12px 16px; background: var(--panel); border: 1px solid var(--border-soft); border-radius: 10px; }
.lesson-admin-row .num { font-weight: 800; color: var(--accent); }
.lesson-admin-row h4 { margin: 0; font-size: 0.95rem; }
.lesson-admin-row .meta { color: var(--muted); font-size: 0.8rem; }
.platform-pill { font-size: 0.7rem; padding: 3px 8px; border-radius: 999px; font-weight: 700; }
.platform-pill.has { background: var(--success); color: white; }
.platform-pill.missing { background: var(--border-soft); color: var(--muted); }

.carousel-block { background: var(--panel); border: 1px solid var(--border-soft); border-radius: 14px; padding: 20px; }
.carousel-block h3 { margin: 0 0 6px; }
.image-prompt-card { background: var(--bg-tint); border: 1px solid var(--border-soft); border-radius: 10px; padding: 12px 14px; margin-bottom: 8px; }
.image-prompt-card pre { white-space: pre-wrap; font-family: ui-monospace, monospace; font-size: 0.84rem; margin: 4px 0; color: var(--ink); }
.image-prompt-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; }

/* ---------- Cheat sheet (print-optimised) ---------- */
.cheat-sheet { max-width: 720px; margin: 0 auto; background: white; padding: 32px; border-radius: 12px; box-shadow: var(--shadow-soft); }
.cheat-sheet h1 { color: var(--ink); margin: 0 0 4px; }
.cheat-sheet .cs-meta { color: var(--muted); font-size: 0.88rem; margin-bottom: 24px; }
.cheat-sheet h2 { color: var(--accent); font-size: 0.92rem; text-transform: uppercase; letter-spacing: 0.1em; margin: 22px 0 8px; }
.cheat-sheet ul, .cheat-sheet ol { margin: 6px 0 12px; padding-left: 22px; }
.cheat-sheet dt { font-weight: 800; color: var(--ink); margin-top: 6px; }
.cheat-sheet dd { margin: 2px 0 0; color: var(--ink-soft); }
.print-bar { display: flex; gap: 8px; max-width: 720px; margin: 0 auto 16px; }

@media print {
  .site-header, .site-footer, .print-bar { display: none !important; }
  body { background: white; }
  .cheat-sheet { box-shadow: none; padding: 0; max-width: 100%; }
  a { color: var(--ink); text-decoration: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 720px) {
  .site-header { padding: 12px 16px; flex-wrap: wrap; gap: 8px; }
  .site-nav { gap: 10px; font-size: 0.85rem; }
  .brand-logo { width: 36px; height: 36px; }
  .site-main { padding: 24px 0; }
  .options { flex-direction: column; }
  .options .opt { width: 100%; }
  .lesson-row, .lesson-admin-row { flex-direction: column; align-items: flex-start; }
  .lesson-right { width: 100%; justify-content: space-between; }
  .table thead { display: none; }
  .table tr { display: block; padding: 12px; border-bottom: 1px solid var(--border-soft); }
  .table td { display: block; border: 0; padding: 4px 0; }
}

/* ===== Wave 1: rich lesson presentation ===== */

/* Section head with action button on the right */
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.section-head h2 { margin: 0; }
.btn-small { padding: 6px 12px !important; font-size: 0.85rem; }

/* Prose markdown content from the lesson generator */
.prose { color: var(--ink); line-height: 1.65; font-size: 1.0rem; }
.prose h1, .prose h2, .prose h3, .prose h4 {
  color: var(--ink); margin: 18px 0 8px;
}
.prose h3 { font-size: 1.05rem; }
.prose h4 { font-size: 0.98rem; }
.prose p { margin: 0 0 10px; }
.prose strong { color: var(--ink); }
.prose em { color: var(--ink-soft); }
.prose ul, .prose ol { margin: 6px 0 14px; padding-left: 22px; }
.prose li { margin: 4px 0; }
.prose a { color: var(--accent); text-decoration: underline; text-decoration-thickness: 1px; }
.prose a:hover { color: var(--accent-dark); }
.prose code {
  background: var(--bg-tint); padding: 2px 6px; border-radius: 4px;
  font-size: 0.9em; color: var(--accent-dark);
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}
.prose pre {
  background: var(--ink); color: #ede9fe; padding: 14px 16px;
  border-radius: 10px; overflow-x: auto; margin: 12px 0;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}
.prose pre code { background: transparent; color: inherit; padding: 0; }
.prose blockquote {
  margin: 12px 0; padding: 8px 14px;
  border-left: 3px solid var(--accent);
  background: var(--bg-tint);
  color: var(--ink-soft); border-radius: 0 6px 6px 0;
}
.prose hr { border: 0; border-top: 1px solid var(--border-soft); margin: 18px 0; }

/* Branded comparison tables (from markdown tables in lesson body) */
.prose table {
  width: 100%; border-collapse: separate; border-spacing: 0;
  margin: 14px 0; border-radius: 12px; overflow: hidden;
  box-shadow: var(--shadow-soft);
  font-size: 0.95rem;
}
.prose thead th {
  background: var(--gradient); color: white !important;
  text-align: left; padding: 10px 14px; font-weight: 700;
  letter-spacing: 0.02em;
}
.prose tbody td {
  padding: 10px 14px; border-top: 1px solid var(--border-soft);
  background: var(--panel); vertical-align: top;
}
.prose tbody tr:nth-child(even) td { background: var(--bg-tint); }
.prose tbody tr:hover td { background: rgba(124, 58, 237, 0.06); }

/* Interactive quiz */
.quiz { list-style: none; padding: 0; counter-reset: q; }
.quiz-item {
  padding: 14px 18px; margin: 0 0 12px; border-radius: 12px;
  background: var(--panel); border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-soft); transition: border-color .2s;
}
.quiz-item.answered-ok { border-color: var(--success); }
.quiz-item.answered-miss { border-color: var(--danger); }
.quiz-item .q-text { margin: 0 0 10px; font-size: 1rem; }
.quiz-options { display: flex; flex-direction: column; gap: 6px; margin: 6px 0 10px; }
.quiz-options .opt {
  display: flex; gap: 10px; align-items: center; padding: 8px 12px;
  border: 1px solid var(--border-soft); border-radius: 8px; cursor: pointer;
  transition: background .15s, border-color .15s;
}
.quiz-options .opt:hover { background: var(--bg-tint); border-color: var(--accent-light); }
.quiz-options input[type=radio] { accent-color: var(--accent); }
.quiz-short {
  width: 100%; padding: 10px 12px;
  border: 1px solid var(--border-soft); border-radius: 8px;
  font: inherit; resize: vertical;
}
.quiz-short:focus { outline: 2px solid var(--accent-light); border-color: var(--accent); }
.quiz-actions { display: flex; align-items: center; gap: 12px; margin-top: 8px; }
.quiz-feedback {
  margin-top: 12px; padding: 12px 14px; border-radius: 8px;
  background: var(--bg-tint);
}
.quiz-feedback .result { margin: 0 0 4px; font-weight: 700; }
.quiz-feedback .result.ok { color: var(--success); }
.quiz-feedback .result.miss { color: var(--danger); }
.quiz-feedback .correct { margin: 4px 0; }

/* Practical task with checkable steps + notes */
.practical-task .practical-steps,
.practical-task .checklist { list-style: none; padding: 0; }
.practical-task .practical-steps li,
.practical-task .checklist li { margin: 6px 0; }
.practical-task label { display: inline-flex; gap: 10px; align-items: flex-start; cursor: pointer; }
.practical-task input[type=checkbox] { margin-top: 4px; accent-color: var(--accent); }
.practical-notes-wrap { margin-top: 12px; }
.practical-notes-wrap label { display: block; margin-bottom: 6px; }
.practical-notes {
  width: 100%; min-height: 100px; padding: 10px 12px;
  border: 1px solid var(--border-soft); border-radius: 8px;
  font: inherit; resize: vertical; background: var(--panel);
}
.practical-notes:focus { outline: 2px solid var(--accent-light); border-color: var(--accent); }
.practical-actions { display: flex; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
.practical-status.ok { color: var(--success); }
.practical-status.miss { color: var(--danger); }

/* Polished loading spinner: logo pulse + outer progress ring */
.generating { display: flex; justify-content: center; padding: 40px 0; }
.generating-card {
  background: var(--panel); padding: 40px 48px; border-radius: 20px;
  box-shadow: var(--shadow); max-width: 560px; width: 100%;
  text-align: center;
}
.gen-ring-wrap { position: relative; width: 180px; height: 180px; margin: 24px auto; }
.gen-ring {
  width: 100%; height: 100%;
  transform: rotate(-90deg);
}
.gen-ring .track {
  stroke: var(--border-soft); fill: none; stroke-width: 6;
}
.gen-ring .arc {
  stroke: url(#ixa-gradient); fill: none; stroke-width: 6;
  stroke-linecap: round;
  transition: stroke-dashoffset .35s ease;
}
.gen-logo {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 96px; height: 96px;
  animation: pulse 1.6s ease-in-out infinite;
  filter: drop-shadow(0 6px 18px rgba(124, 58, 237, 0.35));
}
.gen-pct {
  position: absolute; bottom: -8px; left: 50%;
  transform: translateX(-50%);
  font-size: 0.85rem; font-weight: 800; color: var(--accent-dark);
  background: var(--panel); padding: 2px 10px; border-radius: 999px;
  border: 1px solid var(--border-soft);
}
@keyframes pulse {
  0%   { transform: translate(-50%, -50%) scale(1);   opacity: 1;   }
  50%  { transform: translate(-50%, -50%) scale(1.08); opacity: 0.85; }
  100% { transform: translate(-50%, -50%) scale(1);   opacity: 1;   }
}
.status { color: var(--ink-soft); margin: 8px 0 4px; font-weight: 600; }

/* Slide deck (present mode) */
.deck { min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: var(--gradient); padding: 32px; }
.deck-slide {
  background: var(--panel); width: min(1000px, 100%); padding: 56px 64px;
  border-radius: 18px; box-shadow: var(--shadow);
  min-height: 520px; display: flex; flex-direction: column;
}
.deck-slide[hidden] { display: none !important; }
.deck-num { color: var(--muted); font-size: 0.85rem; letter-spacing: 0.12em; text-transform: uppercase; }
.deck-title { color: var(--ink); font-size: clamp(1.6rem, 3.2vw, 2.4rem); margin: 6px 0 14px; }
.deck-body { color: var(--ink); font-size: 1.15rem; line-height: 1.6; }
.deck-visual { margin-top: auto; padding-top: 24px; color: var(--muted); font-style: italic; font-size: 0.9rem; }
.deck-controls {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  display: flex; gap: 12px; align-items: center;
  background: rgba(255,255,255,.92); padding: 10px 18px; border-radius: 999px;
  box-shadow: var(--shadow-soft);
}
.deck-controls button {
  background: transparent; border: 0; cursor: pointer; padding: 6px 12px;
  border-radius: 8px; font: inherit; font-weight: 700; color: var(--ink);
}
.deck-controls button:hover { background: var(--bg-tint); color: var(--accent-dark); }
.deck-counter { color: var(--ink-soft); font-weight: 700; font-size: 0.92rem; }
.deck-exit { color: var(--accent); text-decoration: none; font-weight: 700; font-size: 0.9rem; padding: 6px 12px; border-radius: 8px; }
.deck-exit:hover { background: var(--bg-tint); }

/* Dashboard readiness widget */
.readiness {
  background: var(--panel); padding: 22px 26px; border-radius: 16px;
  border: 1px solid var(--border-soft); box-shadow: var(--shadow-soft);
  margin: 16px 0 24px;
}
.readiness-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 14px; }
.readiness h3 { margin: 0; }
.readiness .stars { font-size: 1.5rem; letter-spacing: 0.05em; color: var(--accent); }
.readiness .stars .star { filter: grayscale(.85) opacity(.4); }
.readiness .stars .star.on { filter: none; }
.readiness-bar { margin-top: 14px; height: 10px; background: var(--bg-tint); border-radius: 999px; overflow: hidden; }
.readiness-bar .fill {
  height: 100%; background: var(--gradient); width: 0%;
  border-radius: 999px; transition: width .6s ease;
}
.readiness-stats { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 12px; color: var(--muted); font-size: 0.9rem; }
.readiness-stats strong { color: var(--ink); }
.readiness-cert { margin-top: 10px; color: var(--ink-soft); }
.readiness-cert.ready { color: var(--success); font-weight: 700; }

/* Cheat sheet — branded, printable */
.cheatsheet {
  background: var(--panel); padding: 36px 42px;
  border-radius: 14px; box-shadow: var(--shadow);
  max-width: 880px; margin: 24px auto;
}
.cheatsheet .cs-head { display: flex; justify-content: space-between; align-items: baseline; }
.cheatsheet h1 { margin: 6px 0 18px; }
.cheatsheet .cs-section { margin-bottom: 18px; }
.cheatsheet .cs-section h2 {
  margin: 0 0 6px; font-size: 1rem; text-transform: uppercase;
  letter-spacing: 0.1em; color: var(--accent);
}
.cheatsheet .cs-actions { margin: 14px 0; display: flex; gap: 10px; }
@media print {
  .site-header, .site-footer, .cs-actions, .breadcrumb { display: none !important; }
  body { background: white; }
  .cheatsheet { box-shadow: none; padding: 0; max-width: 100%; }
  .prose table { box-shadow: none; }
  .prose thead th { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  a { color: var(--ink); text-decoration: none; }
}

/* =================================================================
   Landing page — editorial-futurist
   Fraunces serif + JetBrains Mono accents, dark hero, asymmetric
   layout, animated SVG mesh, grain overlay, mosaic curriculum.
   ================================================================= */

:root {
  --serif: "Fraunces", "Iowan Old Style", "Apple Garamond", Georgia, serif;
  --mono:  "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --cream: #f4f1ea;
  --paper: #ecead2;
  --ink-deep: #0e0c2a;
  --line: #1e1b4b;
  --hl-warm: #f5b945;
  --hl-pink: #ff7da3;
}

/* Grain overlay covers whole page on the landing */
.lp-grain {
  position: fixed; inset: 0; pointer-events: none; z-index: 1;
  opacity: .08; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.55 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

/* Mono utility — paired with the serif throughout */
.mono { font-family: var(--mono); font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; font-size: 0.74rem; }

.lp-kicker {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--ink); margin: 0 0 18px;
}
.lp-kicker .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px rgba(124,58,237,.15); animation: ringPulse 2.4s ease-in-out infinite; }
.lp-kicker .dot.light { background: var(--hl-warm); box-shadow: 0 0 0 4px rgba(245,185,69,.25); }
@keyframes ringPulse { 0%,100% { box-shadow: 0 0 0 4px rgba(124,58,237,.15); } 50% { box-shadow: 0 0 0 10px rgba(124,58,237,0); } }

.lp-h1, .lp-h2 {
  font-family: var(--serif); font-weight: 400;
  letter-spacing: -0.02em; color: var(--ink-deep);
  font-variation-settings: "opsz" 144, "SOFT" 60;
}
.lp-h1 { font-size: clamp(2.4rem, 5.8vw, 4.4rem); line-height: 0.98; margin: 0 0 22px; }
.lp-h1 em { font-style: italic; color: var(--accent); font-variation-settings: "opsz" 144, "SOFT" 100, "WONK" 1; }
.lp-h2 { font-size: clamp(1.9rem, 4.2vw, 3rem); line-height: 1.04; margin: 0 0 14px; }
.lp-h2 em { font-style: italic; color: var(--accent); font-variation-settings: "opsz" 144, "SOFT" 100, "WONK" 1; }
.lp-h2.invert { color: white; }

.lp-lede {
  font-size: clamp(1.05rem, 1.4vw, 1.2rem); line-height: 1.6;
  color: var(--ink-soft); max-width: 56ch; margin: 0 0 26px;
}
.lp-lede .hl {
  background-image: linear-gradient(180deg, transparent 60%, rgba(245,185,69,.45) 60%);
  padding: 0 .15em;
}

.lp-section { padding: 88px 0; position: relative; z-index: 2; }
.lp-band { max-width: 920px; margin: 0 0 36px; }
.lp-section-sub { color: var(--ink-soft); font-size: 1.02rem; line-height: 1.6; max-width: 60ch; margin: 0 0 28px; }

/* ---------- Buttons ---------- */
.lp-btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 22px; border-radius: 999px;
  font-weight: 700; font-size: 0.98rem; text-decoration: none; border: 1.5px solid transparent;
  transition: transform .25s cubic-bezier(.2,.8,.2,1), background .15s, color .15s, border-color .15s;
  cursor: pointer;
}
.lp-btn-ink     { background: var(--ink-deep); color: white; border-color: var(--ink-deep); }
.lp-btn-ink:hover { background: var(--accent); border-color: var(--accent); }
.lp-btn-ghost   { background: transparent; color: var(--ink-deep); border-color: rgba(14,12,42,.18); }
.lp-btn-ghost:hover { background: var(--ink-deep); color: white; border-color: var(--ink-deep); }
.lp-btn-light   { background: white; color: var(--ink-deep); border-color: white; }
.lp-btn-light:hover { background: var(--hl-warm); border-color: var(--hl-warm); }
.lp-btn-outline { background: transparent; color: white; border-color: rgba(255,255,255,.35); }
.lp-btn-outline:hover { background: white; color: var(--ink-deep); border-color: white; }

.lp-cta-cluster { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.lp-cta-row { display: flex; justify-content: center; margin-top: 32px; }
.lp-fineprint {
  display: flex; gap: 8px; flex-wrap: wrap; align-items: center;
  margin: 16px 0 0; color: var(--ink-soft);
}
.lp-fineprint .sep { color: rgba(14,12,42,.25); }
.lp-fineprint.invert { color: rgba(255,255,255,.7); }

/* ---------- Hero ---------- */
.lp-hero {
  position: relative; z-index: 2;
  background: var(--cream);
  margin: -40px calc(50% - 50vw) 0; /* break out of the .site-main container */
  padding: 56px max(28px, calc(50vw - 560px)) 0;
  overflow: hidden;
}
.lp-hero-inner {
  display: grid; gap: 40px;
  grid-template-columns: 1fr;
  align-items: end;
  padding-bottom: 48px;
}
@media (min-width: 980px) {
  .lp-hero-inner { grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.9fr); gap: 64px; }
}
.lp-hero-copy { padding-top: 24px; }
.lp-hero-art {
  margin: 0; position: relative;
  display: flex; align-items: center; justify-content: center;
  min-height: 480px;
}
.lp-hero-art .lp-mesh-backdrop {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: contain; opacity: 0.10;
  filter: drop-shadow(0 12px 36px rgba(124,58,237,.18));
  pointer-events: none;
  z-index: 0;
  animation: backdropBreath 9s ease-in-out infinite;
}
@keyframes backdropBreath {
  0%, 100% { opacity: 0.10; transform: scale(1); }
  50%      { opacity: 0.18; transform: scale(1.02); }
}
.lp-hero-art .lp-mesh {
  position: relative; z-index: 1;
  width: 100%; height: auto; max-width: 480px;
  display: block; margin: 0 auto;
}

/* Mesh animations */
.lp-mesh .ln {
  stroke-dasharray: 4 6; stroke-dashoffset: 0;
  animation: lineFlow 4.2s linear infinite;
}
.lp-mesh .ln:nth-child(even) { animation-direction: reverse; animation-duration: 5.6s; }
@keyframes lineFlow { to { stroke-dashoffset: -120; } }
.lp-mesh .node { animation: nodePulse 3.2s ease-in-out infinite; transform-origin: center; transform-box: fill-box; }
.lp-mesh .node.n2 { animation-delay: .4s; }
.lp-mesh .node.n3 { animation-delay: .8s; }
.lp-mesh .node.n4 { animation-delay: 1.2s; }
.lp-mesh .node.n5 { animation-delay: 1.6s; }
.lp-mesh .node.nC { animation-delay: 2s; }
@keyframes nodePulse { 0%,100% { opacity: 1; } 50% { opacity: 0.55; } }
.lp-mesh .node text {
  font-family: var(--mono); font-size: 9px; fill: var(--ink-deep); letter-spacing: 0.04em; text-transform: uppercase; font-weight: 600;
}
.lp-mesh .centerlabel { font-family: var(--serif) !important; font-size: 11px !important; font-style: italic; font-weight: 500; fill: var(--accent) !important; text-transform: none !important; letter-spacing: 0; }

/* Marquee ticker — pure CSS scroll */
.lp-ticker {
  border-top: 1px solid rgba(14,12,42,.12);
  border-bottom: 1px solid rgba(14,12,42,.12);
  margin: 8px 0 0;
  overflow: hidden; background: var(--paper);
}
.lp-ticker-track {
  display: flex; gap: 32px; align-items: center; white-space: nowrap;
  padding: 14px 0;
  animation: tickerScroll 60s linear infinite;
  font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.06em;
  color: var(--ink-deep); text-transform: uppercase;
}
.lp-ticker-track span { flex-shrink: 0; }
.lp-ticker:hover .lp-ticker-track { animation-play-state: paused; }
@keyframes tickerScroll { to { transform: translateX(-50%); } }

/* ---------- Diagnostic preview ---------- */
.lp-diag-card {
  background: var(--panel); border: 1px solid rgba(14,12,42,.08);
  border-radius: 20px; padding: 36px 32px;
  box-shadow: 0 20px 50px rgba(30,27,75,.10);
  max-width: 760px; margin-top: 8px;
  position: relative; overflow: hidden;
}
.lp-diag-card::before {
  content: ""; position: absolute; top: 0; right: 0; width: 240px; height: 240px;
  background: radial-gradient(circle at top right, rgba(124,58,237,.10), transparent 70%);
  pointer-events: none;
}
.diag-progress { display: flex; gap: 8px; margin-bottom: 26px; }
.diag-progress .step { height: 4px; flex: 1; background: rgba(14,12,42,.08); border-radius: 4px; transition: background .3s; }
.diag-progress .step.active { background: var(--accent); }
.diag-progress .step.done { background: var(--ink-deep); }
.diag-eyebrow { color: var(--accent); margin: 0 0 12px; }
.diag-q { font-family: var(--serif); font-size: clamp(1.3rem, 2.3vw, 1.65rem); line-height: 1.2; color: var(--ink-deep); margin: 0 0 22px; font-weight: 500; }
.diag-opts { display: grid; gap: 10px; }
.diag-opt {
  display: flex; justify-content: space-between; align-items: center;
  background: transparent; border: 1.5px solid rgba(14,12,42,.12);
  padding: 16px 20px; border-radius: 12px; font: inherit; cursor: pointer;
  color: var(--ink-deep); font-weight: 600; text-align: left;
  transition: all .2s cubic-bezier(.2,.8,.2,1);
}
.diag-opt .arrow { opacity: 0; transform: translateX(-6px); transition: all .2s; color: var(--accent); }
.diag-opt:hover { border-color: var(--accent); background: rgba(124,58,237,.05); transform: translateX(4px); }
.diag-opt:hover .arrow { opacity: 1; transform: translateX(0); }
.diag-opt.picked { background: var(--accent); color: white; border-color: var(--accent); }
.diag-summary { list-style: none; padding: 0; margin: 18px 0 26px; display: grid; gap: 14px; }
.diag-summary li { display: grid; grid-template-columns: 24px 1fr; gap: 10px 14px; font-family: var(--serif); color: var(--ink-deep); }
.diag-summary li .bullet { color: var(--accent); font-weight: 700; }
.diag-summary li strong { font-weight: 500; font-size: 1rem; line-height: 1.4; grid-column: 2; }
.diag-summary li .sig { grid-column: 2; color: var(--ink-soft); font-family: var(--mono); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.06em; }
.diag-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 10px; }
.lp-diag-footer { margin: 18px 0 0; color: var(--muted); }

/* ---------- Pathway rail ---------- */
.lp-rail { list-style: none; padding: 0; display: grid; gap: 18px; counter-reset: rail; }
@media (min-width: 760px) { .lp-rail { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .lp-rail { grid-template-columns: repeat(4, 1fr); } }
.lp-rail li {
  background: var(--panel); border: 1px solid rgba(14,12,42,.08); border-radius: 18px;
  padding: 26px 24px 22px; position: relative; transition: transform .3s, box-shadow .3s;
  overflow: hidden;
}
.lp-rail li:hover { transform: translateY(-4px); box-shadow: 0 14px 40px rgba(30,27,75,.10); }
.lp-rail-num {
  display: inline-block; font-family: var(--mono); font-weight: 800; font-size: 0.78rem;
  color: var(--accent); letter-spacing: 0.1em; margin-bottom: 10px;
}
.lp-rail li h3 { font-family: var(--serif); font-weight: 500; font-size: 1.18rem; color: var(--ink-deep); margin: 6px 0 8px; }
.lp-rail li p { color: var(--ink-soft); font-size: 0.92rem; line-height: 1.55; margin: 0; }
.lp-rail-glyph { position: absolute; bottom: -8px; right: -8px; width: 90px; height: 90px; color: rgba(124,58,237,.15); }

/* ---------- Tracks mosaic ---------- */
.lp-track-mosaic {
  display: grid; gap: 14px;
  grid-template-columns: 1fr;
}
@media (min-width: 800px) {
  .lp-track-mosaic { grid-template-columns: repeat(6, 1fr); }
  .lp-track-mosaic .t1 { grid-column: span 3; }
  .lp-track-mosaic .t2 { grid-column: span 3; }
  .lp-track-mosaic .t3 { grid-column: span 2; }
  .lp-track-mosaic .t4 { grid-column: span 2; }
  .lp-track-mosaic .t5 { grid-column: span 2; }
}
.lp-track-mosaic .track {
  background: var(--panel); border: 1px solid rgba(14,12,42,.08);
  border-radius: 18px; padding: 26px 26px 22px; position: relative; overflow: hidden;
  transition: transform .3s, box-shadow .3s, background .3s;
}
.lp-track-mosaic .track:hover { transform: translateY(-3px); box-shadow: 0 16px 40px rgba(30,27,75,.10); }
.lp-track-mosaic .track:nth-child(2) { background: var(--ink-deep); color: var(--cream); border-color: var(--ink-deep); }
.lp-track-mosaic .track:nth-child(2) h3, .lp-track-mosaic .track:nth-child(2) p { color: white; }
.lp-track-mosaic .track:nth-child(4) { background: var(--paper); }
.lp-track-mosaic .track .track-tag { color: var(--accent); margin: 0 0 8px; display: inline-block; }
.lp-track-mosaic .track:nth-child(2) .track-tag { color: var(--hl-warm); }
.lp-track-mosaic .track h3 { font-family: var(--serif); font-weight: 500; font-size: 1.3rem; color: var(--ink-deep); margin: 0 0 8px; }
.lp-track-mosaic .track p { color: var(--ink-soft); font-size: 0.95rem; line-height: 1.5; margin: 0; }
.lp-track-mosaic .track .track-art { position: absolute; bottom: -10px; right: -10px; width: 80px; height: 80px; color: rgba(124,58,237,.2); }
.lp-track-mosaic .track:nth-child(2) .track-art { color: rgba(255,255,255,.15); }

/* ---------- Curriculum (typographic list) ---------- */
.lp-curriculum { list-style: none; padding: 0; margin: 0; border-top: 1px solid rgba(14,12,42,.12); }
.lp-curr-row {
  display: grid; grid-template-columns: 70px 1fr 30px;
  gap: 24px; align-items: center;
  padding: 22px 4px; border-bottom: 1px solid rgba(14,12,42,.12);
  transition: padding .25s ease, background .25s ease;
  cursor: default;
}
.lp-curr-row:hover { padding-left: 14px; padding-right: 14px; background: var(--paper); }
.lp-curr-num { color: var(--accent); font-weight: 800; font-size: 0.9rem; }
.lp-curr-meta h3 { font-family: var(--serif); font-weight: 500; font-size: clamp(1.15rem, 2vw, 1.45rem); color: var(--ink-deep); margin: 0 0 4px; line-height: 1.2; }
.lp-curr-meta p { color: var(--ink-soft); font-size: 0.95rem; line-height: 1.5; margin: 0; max-width: 75ch; }
.lp-curr-arrow { font-size: 1.3rem; color: rgba(14,12,42,.25); transition: transform .25s, color .25s; text-align: right; }
.lp-curr-row:hover .lp-curr-arrow { color: var(--accent); transform: translateX(6px); }

/* ---------- Feature grid (practical + responsible) ---------- */
.lp-feat-grid { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 700px) { .lp-feat-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .lp-feat-grid { grid-template-columns: repeat(4, 1fr); } }
.lp-feat-grid .feat {
  background: var(--panel); border: 1px solid rgba(14,12,42,.08);
  border-radius: 14px; padding: 24px 22px;
  transition: transform .25s, box-shadow .25s;
}
.lp-feat-grid .feat:hover { transform: translateY(-3px); box-shadow: 0 12px 32px rgba(30,27,75,.10); }
.lp-feat-grid .feat .feat-num { color: var(--accent); margin: 0 0 12px; display: block; }
.lp-feat-grid .feat h3 { font-family: var(--serif); font-weight: 500; font-size: 1.15rem; color: var(--ink-deep); margin: 0 0 8px; }
.lp-feat-grid .feat p { color: var(--ink-soft); font-size: 0.93rem; line-height: 1.5; margin: 0; }

/* ---------- Capstone ---------- */
.lp-capstone-grid { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 900px) { .lp-capstone-grid { grid-template-columns: repeat(3, 1fr); } }
.lp-capstone-grid article {
  background: var(--paper); border-radius: 18px; padding: 28px 26px;
  border: 1px solid rgba(14,12,42,.08);
}
.lp-capstone-grid article h3 { font-family: var(--serif); font-weight: 500; color: var(--ink-deep); margin: 0 0 10px; font-size: 1.2rem; }
.lp-capstone-grid article p { color: var(--ink-soft); margin: 0; line-height: 1.55; font-size: 0.95rem; }

/* ---------- Certification ---------- */
.lp-cert-grid { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 900px) { .lp-cert-grid { grid-template-columns: repeat(3, 1fr); } }
.lp-cert-grid article {
  background: var(--panel); border-radius: 18px; padding: 26px 24px;
  border: 1px solid rgba(14,12,42,.08); position: relative;
}
.lp-cert-grid article.cert-disclaimer { background: var(--ink-deep); color: var(--cream); border-color: var(--ink-deep); }
.lp-cert-grid article.cert-disclaimer h3, .lp-cert-grid article.cert-disclaimer p { color: white; }
.lp-cert-grid article.cert-disclaimer .cert-tag { color: var(--hl-warm); }
.lp-cert-grid .cert-tag { color: var(--accent); display: inline-block; margin: 0 0 12px; }
.lp-cert-grid h3 { font-family: var(--serif); font-weight: 500; font-size: 1.25rem; color: var(--ink-deep); margin: 0 0 10px; }
.lp-cert-grid p { color: var(--ink-soft); line-height: 1.55; margin: 0; font-size: 0.95rem; }

/* ---------- FAQ ---------- */
.lp-faq-list { display: grid; gap: 8px; max-width: 880px; }
.lp-faq-list details {
  background: var(--panel); border: 1px solid rgba(14,12,42,.08);
  border-radius: 12px; padding: 18px 22px;
  transition: border-color .2s, box-shadow .2s;
}
.lp-faq-list details[open] { border-color: var(--accent); box-shadow: 0 8px 24px rgba(30,27,75,.08); }
.lp-faq-list summary {
  font-family: var(--serif); font-weight: 500; font-size: 1.1rem;
  color: var(--ink-deep); cursor: pointer;
  list-style: none; padding-right: 28px; position: relative;
  line-height: 1.3;
}
.lp-faq-list summary::-webkit-details-marker { display: none; }
.lp-faq-list summary::after {
  content: "+"; position: absolute; right: 0; top: -2px;
  color: var(--accent); font-weight: 800; font-size: 1.5rem;
  transition: transform .2s;
}
.lp-faq-list details[open] summary::after { content: "−"; }
.lp-faq-list p { margin: 12px 0 0; color: var(--ink-soft); line-height: 1.6; }

/* ---------- Final CTA ---------- */
.lp-final {
  background: linear-gradient(135deg, #0e0c2a 0%, #1e1b4b 50%, #4c1d95 100%);
  color: white; border-radius: 28px;
  margin: 24px 0 0; padding: 60px 36px;
  position: relative; overflow: hidden;
}
.lp-final::before {
  content: ""; position: absolute; inset: 0;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/><feColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.3 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  opacity: 0.12; pointer-events: none;
}
.lp-final-grid {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: 1fr; gap: 36px; align-items: center;
}
@media (min-width: 880px) { .lp-final-grid { grid-template-columns: 1.4fr 1fr; gap: 56px; } }
.lp-final-art { width: 100%; max-width: 320px; height: auto; justify-self: end; }

/* ---------- Scroll reveal ---------- */
.lp-section, .lp-hero, .lp-final {
  opacity: 0; transform: translateY(24px);
  transition: opacity .8s cubic-bezier(.2,.8,.2,1), transform .8s cubic-bezier(.2,.8,.2,1);
}
.lp-section.in-view, .lp-hero.in-view, .lp-final.in-view { opacity: 1; transform: none; }

/* Reduced motion respect */
@media (prefers-reduced-motion: reduce) {
  .lp-mesh .ln, .lp-mesh .node, .lp-ticker-track, .lp-kicker .dot { animation: none !important; }
  .lp-section, .lp-hero, .lp-final { opacity: 1; transform: none; transition: none; }
}

/* Header tweak — make brand-name use the serif on landing only */
body.has-lp .brand-name { font-family: var(--serif); font-weight: 500; letter-spacing: 0; font-size: 1.08rem; }
body.has-lp .brand-tagline { font-family: var(--mono); }

/* ============ Landing additions: hover-expand tracks + flip feature cards ============ */

/* Adaptive tracks: clickable, expand on hover/focus to reveal detail block */
.lp-track-mosaic .track {
  cursor: pointer;
  display: flex; flex-direction: column;
}
.lp-track-mosaic .track .track-expand {
  margin-top: 14px;
  max-height: 0; opacity: 0;
  overflow: hidden;
  transform: translateY(8px);
  transition: max-height .55s cubic-bezier(.2,.8,.2,1),
              opacity .35s ease, transform .55s cubic-bezier(.2,.8,.2,1),
              margin-top .35s ease;
}
.lp-track-mosaic .track:hover .track-expand,
.lp-track-mosaic .track:focus .track-expand,
.lp-track-mosaic .track:focus-within .track-expand {
  max-height: 320px; opacity: 1; transform: translateY(0);
}
.lp-track-mosaic .track .track-expand h4 {
  font-family: var(--mono); font-size: 0.72rem;
  text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--accent); margin: 0 0 8px;
}
.lp-track-mosaic .track:nth-child(2) .track-expand h4 { color: var(--hl-warm); }
.lp-track-mosaic .track .track-expand ul {
  list-style: none; padding: 0; margin: 0;
  display: grid; gap: 6px;
  color: var(--ink-soft); font-size: 0.9rem; line-height: 1.45;
}
.lp-track-mosaic .track:nth-child(2) .track-expand ul { color: rgba(255,255,255,.85); }
.lp-track-mosaic .track .track-expand li {
  padding-left: 14px; position: relative;
}
.lp-track-mosaic .track .track-expand li::before {
  content: "→"; position: absolute; left: 0; top: 0;
  color: var(--accent); font-weight: 700;
}
.lp-track-mosaic .track:nth-child(2) .track-expand li::before { color: var(--hl-warm); }
.lp-track-mosaic .track:hover { transform: translateY(-6px) scale(1.005); }

/* Module rows are anchors — reset link styling */
.lp-curriculum li a.lp-curr-row {
  text-decoration: none; color: inherit;
  display: grid; grid-template-columns: 70px 1fr 30px;
  gap: 24px; align-items: center;
}
.lp-curriculum li a.lp-curr-row:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 8px;
}

/* Practical resources: 3D flip card to reveal sample on hover/focus */
.feat-flip {
  perspective: 1200px; position: relative;
  min-height: 280px;
}
.feat-flip .feat-face, .feat-flip .feat-back {
  position: absolute; inset: 0;
  padding: 24px 22px;
  background: var(--panel); border: 1px solid rgba(14,12,42,.08);
  border-radius: 14px;
  backface-visibility: hidden;
  transition: transform .55s cubic-bezier(.2,.8,.2,1), box-shadow .25s;
}
.feat-flip .feat-back {
  background: var(--ink-deep);
  color: var(--cream);
  transform: rotateY(180deg);
  overflow: hidden; display: flex; flex-direction: column; gap: 10px;
}
.feat-flip:hover .feat-face,
.feat-flip:focus-within .feat-face { transform: rotateY(-180deg); }
.feat-flip:hover .feat-back,
.feat-flip:focus-within .feat-back { transform: rotateY(0); }
.feat-flip:hover { box-shadow: 0 22px 50px rgba(30,27,75,.18); }

.feat-flip .feat-face h3,
.feat-flip .feat-face p { margin: 0 0 8px; }
.feat-flip .feat-hint {
  position: absolute; bottom: 14px; left: 22px; right: 22px;
  color: var(--accent); display: flex; justify-content: space-between;
  opacity: .9;
}
.feat-flip .feat-back .feat-num { color: var(--hl-warm); }
.feat-pre {
  font-family: var(--mono); font-size: 0.74rem; line-height: 1.5;
  color: rgba(244, 241, 234, 0.92);
  background: transparent;
  margin: 0; padding: 0;
  white-space: pre-wrap; word-break: normal; flex: 1;
  overflow-y: auto;
}
.feat-slide {
  background: rgba(255,255,255,.06); border-radius: 8px; padding: 14px 16px;
  flex: 1; display: flex; flex-direction: column; gap: 10px;
}
.feat-slide-num { font-family: var(--mono); font-size: 0.66rem; color: var(--hl-warm); letter-spacing: 0.12em; }
.feat-slide-h { font-family: var(--serif); font-size: 1.25rem; line-height: 1.15; color: white; }
.feat-slide-b { font-size: 0.85rem; color: rgba(255,255,255,.85); line-height: 1.5; }

@media (prefers-reduced-motion: reduce) {
  .feat-flip .feat-face, .feat-flip .feat-back { transition: none; }
  .feat-flip .feat-face { transform: rotateY(0); }
  .feat-flip .feat-back { display: none; }
  .lp-track-mosaic .track .track-expand { transition: none; }
}

/* ============ Loading games panel (rotates on each reload) ============ */
.lg-wrap {
  max-width: 520px; margin: 28px auto 0;
  background: var(--panel); border: 1px solid var(--border-soft);
  border-radius: 14px; padding: 14px 14px 16px;
  box-shadow: var(--shadow-soft);
}
.lg-eyebrow {
  display: flex; align-items: center; gap: 8px;
  margin: 0 0 8px; color: var(--accent-dark);
  font-size: 0.72rem; letter-spacing: 0.1em;
}
.lg-eyebrow .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent); animation: ringPulse 2s ease-in-out infinite;
}
.lg-bar {
  display: grid; grid-template-columns: auto 1fr auto; gap: 10px;
  align-items: center; margin-bottom: 10px;
}
.lg-name { color: var(--accent); font-size: 0.74rem; }
.lg-help { color: var(--muted); font-size: 0.78rem; line-height: 1.35; }
.lg-cycle {
  border: 1px solid var(--border-soft); background: transparent;
  border-radius: 8px; padding: 6px 10px; cursor: pointer;
  font: inherit; font-size: 0.78rem; color: var(--ink);
  transition: all .15s;
}
.lg-cycle:hover { background: var(--bg-tint); color: var(--accent-dark); border-color: var(--accent-light); }
.lg-canvas {
  display: block; width: 100%; height: auto;
  max-width: 460px; aspect-ratio: 460 / 260;
  margin: 0 auto;
  background: #0e0c2a; border-radius: 10px;
  cursor: pointer; outline: none;
  image-rendering: pixelated;
}
.lg-canvas:focus { box-shadow: 0 0 0 3px rgba(124, 58, 237, .4); }

/* ============ Games panel: in-card sizing for spinner placement ============ */
.generating-card .lg-wrap {
  margin: 24px 0 8px;
  padding: 12px;
  max-width: 100%;
  background: var(--bg-tint);
  border: 1px solid var(--border-soft);
}
.generating-card .lg-canvas { max-width: 100%; }
.lg-skipped { margin-top: 16px; }

/* ============ Responsive polish across the platform ============ */

/* Header collapses on narrow screens */
@media (max-width: 720px) {
  .site-header { padding: 10px 16px; flex-wrap: wrap; gap: 8px; }
  .site-nav { gap: 10px; flex-wrap: wrap; }
  .site-nav a { font-size: 0.86rem; }
  .site-nav .user-pill { display: none; }   /* keep header tight */
  .brand-logo { width: 36px; height: 36px; }
  .brand-name { font-size: 0.92rem; }
  .brand-tagline { font-size: 0.62rem; }
  .site-main { padding: 24px 0; }
}

/* Hero shrinks on tablets / phones */
@media (max-width: 720px) {
  .lp-hero { padding-top: 32px; }
  .lp-hero-inner { gap: 24px; padding-bottom: 28px; }
  .lp-h1 { font-size: clamp(1.85rem, 8vw, 2.6rem); }
  .lp-h2 { font-size: clamp(1.5rem, 6.5vw, 2rem); }
  .lp-lede { font-size: 1rem; }
  .lp-cta-cluster { gap: 10px; }
  .lp-btn { padding: 12px 18px; font-size: 0.9rem; width: 100%; justify-content: center; }
  .lp-cta-cluster .lp-btn { width: auto; flex: 1 1 0; min-width: 180px; }
  .lp-section { padding: 56px 0; }
  .lp-section-tinted { padding: 40px 18px; }
  .lp-ticker-track { font-size: 0.7rem; gap: 18px; }
}

/* Module curriculum list: stack number/meta on tiny screens */
@media (max-width: 540px) {
  .lp-curriculum li a.lp-curr-row {
    grid-template-columns: 1fr 24px;
    gap: 6px 12px;
  }
  .lp-curr-num { grid-column: 1; }
  .lp-curr-meta { grid-column: 1 / span 2; }
  .lp-curr-arrow { grid-row: 1; grid-column: 2; }
}

/* Track mosaic: stack on narrow, override the desktop 2-3 / 2-2-2 grid */
@media (max-width: 799px) {
  .lp-track-mosaic { grid-template-columns: 1fr !important; }
  .lp-track-mosaic .track { grid-column: span 1 !important; }
  .feat-flip { min-height: 240px; }
}

/* Lesson page polish on mobile */
@media (max-width: 720px) {
  .lesson-header h1 { font-size: clamp(1.6rem, 6vw, 2.2rem); line-height: 1.1; }
  .lesson-section { padding: 4px 0; }
  .lesson-section h2 { font-size: 1.15rem; }
  .prose { font-size: 0.96rem; }
  .quiz-item { padding: 12px 14px; }
  .quiz-options .opt { padding: 10px 12px; }
  .footer-actions { flex-wrap: wrap; gap: 8px; }
  .footer-actions .btn-primary, .footer-actions .btn-secondary { width: 100%; text-align: center; }
  .nav-row { flex-direction: column; gap: 8px; }
  .nav-row a { width: 100%; text-align: center; }
}

/* Dashboard readiness + module list */
@media (max-width: 720px) {
  .readiness { padding: 16px 18px; }
  .readiness-head { flex-direction: column; align-items: flex-start; gap: 10px; }
  .readiness .stars { font-size: 1.3rem; }
  .readiness-stats { gap: 10px; font-size: 0.85rem; }
  .module-list .module-card,
  .lesson-list .lesson-row { padding: 14px 16px; }
  .lesson-row { flex-direction: column; align-items: flex-start; gap: 10px; }
  .lesson-left { width: 100%; }
  .lesson-right { width: 100%; display: flex; justify-content: space-between; }
}

/* Slide deck — fit narrow screens */
@media (max-width: 720px) {
  .deck { padding: 16px; }
  .deck-slide { padding: 32px 24px; min-height: 380px; }
  .deck-title { font-size: clamp(1.4rem, 6vw, 2rem); }
  .deck-body { font-size: 1rem; }
  .deck-controls { padding: 8px 14px; gap: 8px; bottom: 12px; }
  .deck-controls button { padding: 5px 10px; font-size: 0.85rem; }
}

/* Admin lesson detail polish on mobile */
@media (max-width: 720px) {
  .admin-grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
  .carousel-block { padding: 16px; }
  .image-prompt-card pre { font-size: 0.78rem; }
}

/* Diagnostic card on narrow screens */
@media (max-width: 540px) {
  .lp-diag-card { padding: 24px 18px; }
  .diag-q { font-size: 1.15rem; }
  .diag-opt { padding: 13px 14px; font-size: 0.95rem; }
}

/* Final CTA stacks the art block under on narrow */
@media (max-width: 720px) {
  .lp-final { padding: 40px 22px; border-radius: 18px; }
  .lp-final-art { max-width: 200px; }
}

/* Body font tiny screens: prevent iOS zoom on form inputs */
@media (max-width: 720px) {
  input, select, textarea, button { font-size: 16px; }
  .quiz-short, .practical-notes { font-size: 16px; }
}

/* ============ Breakout room — games lounge layout ============ */
.br-wrap {
  display: grid; gap: 22px; margin-top: 24px;
  grid-template-columns: 1fr;
}
@media (min-width: 880px) {
  .br-wrap { grid-template-columns: 300px 1fr; align-items: start; }
}
.br-picker {
  background: var(--panel); border: 1px solid var(--border-soft);
  border-radius: 14px; padding: 18px 18px 14px;
  box-shadow: var(--shadow-soft);
  position: sticky; top: 80px;
}
.br-list { list-style: none; padding: 0; margin: 8px 0 14px; display: grid; gap: 6px; }
.br-pick {
  width: 100%; display: grid; grid-template-columns: 32px 1fr 18px;
  align-items: center; gap: 10px;
  padding: 10px 12px; border: 1px solid var(--border-soft); border-radius: 10px;
  background: transparent; font: inherit; cursor: pointer;
  color: var(--ink); text-align: left;
  transition: all .15s;
}
.br-pick:hover { background: var(--bg-tint); border-color: var(--accent-light); }
.br-pick.active { background: var(--ink-deep); color: white; border-color: var(--ink-deep); }
.br-pick.active .br-num { color: var(--hl-warm); }
.br-pick.is-loading { opacity: .6; }
.br-num { font-family: var(--mono); font-size: 0.74rem; color: var(--accent); letter-spacing: 0.06em; }
.br-name { font-weight: 600; }
.br-arrow { color: var(--accent); opacity: 0; transform: translateX(-4px); transition: all .15s; }
.br-pick:hover .br-arrow, .br-pick.active .br-arrow { opacity: 1; transform: translateX(0); }
.br-pick.active .br-arrow { color: var(--hl-warm); }
.br-tip { margin: 0; padding-top: 8px; border-top: 1px solid var(--border-soft); }

.br-stage .lg-wrap {
  max-width: none; margin: 0;
  background: var(--panel); padding: 18px;
}
.br-stage .lg-canvas { max-width: 100%; }

/* Games panel — shared bar layout */
.lg-bar { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; margin-bottom: 10px; }
.lg-actions { display: flex; gap: 8px; }
.lg-actions .lg-restart, .lg-actions .lg-cycle {
  border: 1px solid var(--border-soft); background: transparent;
  border-radius: 8px; padding: 6px 10px; cursor: pointer;
  font: inherit; font-size: 0.78rem; color: var(--ink);
  transition: all .15s; white-space: nowrap;
}
.lg-actions .lg-restart:hover { background: var(--bg-tint); color: var(--accent-dark); border-color: var(--accent); }
.lg-actions .lg-cycle:hover   { background: var(--bg-tint); color: var(--accent-dark); border-color: var(--accent-light); }

@media (max-width: 720px) {
  .lg-bar { grid-template-columns: 1fr; }
  .lg-actions { justify-content: flex-end; }
  .br-picker { position: static; }
}

/* ============================================================
   Pace-aware lesson rendering: short = notepad, deep = full
   ============================================================ */

.lesson-pace-short .lesson-header { margin-bottom: 18px; }
.pace-pill {
  display: inline-block; margin-left: 10px;
  padding: 2px 8px; border-radius: 999px;
  background: var(--bg-tint); color: var(--accent-dark);
  font-size: 0.62rem; letter-spacing: 0.1em; text-transform: uppercase;
}

/* Notepad cards used in short-pace layout */
.notepad-card {
  position: relative;
  background: #fffdf6;
  border: 1px solid #ecead2;
  border-radius: 14px;
  padding: 22px 26px 18px;
  margin: 14px 0;
  box-shadow: 0 6px 20px rgba(30, 27, 75, 0.06);
}
.notepad-card::before {
  content: ""; position: absolute; top: 0; left: 28px; right: 28px; height: 3px;
  background: var(--gradient); border-radius: 0 0 6px 6px;
}
.notepad-card .np-tag {
  display: inline-block; margin: 0 0 8px;
  font-size: 0.7rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--accent); font-family: var(--mono); font-weight: 700;
}
.notepad-card p { margin: 0 0 6px; line-height: 1.55; color: var(--ink); }
.notepad-objective { background: linear-gradient(180deg, #fffdf6 0%, #f4f1ea 100%); }

.notepad-grid {
  display: grid; gap: 12px; margin: 18px 0;
  grid-template-columns: 1fr;
}
@media (min-width: 640px) { .notepad-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 980px) { .notepad-grid { grid-template-columns: repeat(3, 1fr); } }
.notepad-tile {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  padding: 18px 18px 16px;
  transition: transform .35s cubic-bezier(.2,.8,.2,1), box-shadow .25s;
  animation: tileIn .55s cubic-bezier(.2,.8,.2,1) backwards;
  animation-delay: calc(var(--i, 0) * 80ms);
}
@keyframes tileIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.notepad-tile:hover { transform: translateY(-3px) rotate(-0.4deg); box-shadow: 0 16px 36px rgba(30, 27, 75, 0.10); }
.notepad-tile .np-num {
  position: absolute; top: -10px; right: 14px;
  background: var(--ink-deep); color: var(--cream);
  font-size: 0.7rem; padding: 2px 8px; border-radius: 999px;
}
.notepad-tile h3 { margin: 0 0 6px; font-size: 1rem; color: var(--ink); }
.notepad-tile p { margin: 0; color: var(--ink-soft); font-size: 0.92rem; line-height: 1.5; }

/* Animation strip (deep pace) */
.anim-section .anim-strip {
  display: flex; gap: 12px; align-items: stretch;
  overflow-x: auto; padding: 10px 4px 14px;
  scroll-snap-type: x mandatory;
  border-radius: 14px;
}
.anim-section .anim-strip:hover .anim-frame { animation-play-state: paused; }
.anim-frame {
  flex: 0 0 240px; scroll-snap-align: start;
  background: var(--panel); border: 1px solid var(--border-soft);
  border-radius: 12px; padding: 16px 16px 14px;
  position: relative;
  animation: framePulse 6s ease-in-out infinite;
  transform-origin: center;
}
.anim-frame .anim-num {
  display: inline-block; padding: 2px 8px; border-radius: 999px;
  background: var(--accent); color: white;
  font-size: 0.66rem; letter-spacing: 0.1em;
}
.anim-frame h3 { margin: 8px 0 4px; font-size: 0.98rem; color: var(--ink); }
.anim-frame p { margin: 0; color: var(--ink-soft); font-size: 0.88rem; line-height: 1.5; }
@keyframes framePulse {
  0%, 100% { transform: scale(1);   box-shadow: 0 6px 18px rgba(30,27,75,.05); }
  50%      { transform: scale(1.02); box-shadow: 0 14px 32px rgba(124,58,237,.18); }
}
.anim-arrow {
  align-self: center; font-size: 1.4rem; color: var(--accent);
  flex-shrink: 0;
  animation: arrowFlow 1.8s ease-in-out infinite;
}
@keyframes arrowFlow { 0%, 100% { transform: translateX(0); opacity: .7; } 50% { transform: translateX(4px); opacity: 1; } }

/* Video grid */
.video-grid {
  display: grid; gap: 14px;
  grid-template-columns: 1fr;
}
@media (min-width: 800px) { .video-grid { grid-template-columns: repeat(2, 1fr); } }
.video-card { background: var(--panel); border: 1px solid var(--border-soft); border-radius: 12px; overflow: hidden; box-shadow: var(--shadow-soft); }
.video-frame { position: relative; aspect-ratio: 16 / 9; background: var(--ink-deep); }
.video-frame iframe { width: 100%; height: 100%; border: 0; display: block; }
.video-fallback {
  display: flex; align-items: center; justify-content: center;
  height: 100%; color: white; text-decoration: none; font-weight: 700;
  background: var(--gradient);
}
.video-meta { padding: 14px 16px; }
.video-meta h3 { margin: 0 0 4px; font-size: 1rem; color: var(--ink); }
.video-meta p { margin: 6px 0 0; color: var(--ink-soft); font-size: 0.92rem; line-height: 1.5; }

/* Practical workspace — code/writing editor */
.practical-workspace {
  margin-top: 12px;
  background: var(--ink-deep); border-radius: 12px; overflow: hidden;
  border: 1px solid rgba(255,255,255,.08);
}
.practical-workspace .workspace-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 12px; background: rgba(255,255,255,.04);
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.practical-workspace .ws-tag {
  font-size: 0.72rem; color: var(--hl-warm, #f5b945); letter-spacing: 0.1em;
}
.practical-workspace .ws-actions { display: flex; gap: 6px; }
.practical-workspace .ws-actions .btn-secondary {
  background: rgba(255,255,255,.06); color: white; border: 0;
  padding: 4px 10px; font-size: 0.78rem;
}
.practical-workspace .ws-actions .btn-secondary:hover { background: rgba(255,255,255,.14); }
.ws-editor {
  width: 100%; min-height: 280px; padding: 16px 18px;
  background: transparent; border: 0; outline: none;
  color: #ede9fe; font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 14px; line-height: 1.55; resize: vertical;
  tab-size: 2;
}
.ws-editor.ws-writing { font-family: Inter, system-ui, sans-serif; line-height: 1.7; color: #f5f3ff; font-size: 15px; }
.ws-editor.ws-analysis { font-family: Inter, system-ui, sans-serif; line-height: 1.65; color: #f5f3ff; font-size: 15px; }
.ws-editor:focus { box-shadow: inset 0 0 0 2px rgba(124,58,237,.45); }

.practical-expect {
  margin-top: 12px; padding: 14px 16px;
  background: var(--bg-tint); border-radius: 10px;
  border-left: 3px solid var(--accent);
}
.practical-expect p { margin: 0; color: var(--ink); }
.practical-expect details { margin-top: 8px; }
.practical-expect .ws-sample {
  margin: 8px 0 0; padding: 12px 14px;
  background: var(--ink-deep); color: #ede9fe;
  border-radius: 8px; font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.82rem; line-height: 1.5; overflow-x: auto;
  white-space: pre-wrap;
}
.practical-steps-wrap { margin: 14px 0 6px; }
.practical-steps-wrap summary { cursor: pointer; color: var(--accent-dark); }

/* Practical sessions list — show artefact outputs */
.practical-list { list-style: none; padding: 0; display: grid; gap: 14px; }
.practical-item {
  background: var(--panel); border: 1px solid var(--border-soft);
  border-radius: 14px; padding: 18px 20px;
  box-shadow: var(--shadow-soft);
}
.practical-item-head {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 14px; flex-wrap: wrap; margin-bottom: 12px;
}
.practical-item-head h3 { margin: 4px 0 4px; font-size: 1.1rem; color: var(--ink); }
.practical-status-wrap { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

.practical-output { margin-top: 8px; }
.po-bar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 6px 12px; background: rgba(124,58,237,.08);
  border-radius: 8px 8px 0 0; gap: 8px;
}
.po-tag { color: var(--accent); font-size: 0.7rem; letter-spacing: 0.1em; }
.po-actions { display: flex; gap: 6px; }
.po-actions .btn-small { background: transparent; border: 1px solid var(--border-soft); color: var(--ink); cursor: pointer; padding: 4px 10px; font-size: 0.78rem; }
.po-actions .btn-small:hover { background: var(--bg-tint); border-color: var(--accent-light); color: var(--accent-dark); }
.po-pre {
  margin: 0; padding: 14px 16px;
  background: var(--ink-deep); color: #ede9fe;
  border-radius: 0 0 8px 8px;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.82rem; line-height: 1.55;
  white-space: pre-wrap; word-break: normal;
  overflow: auto;
  transition: max-height .35s ease;
}
.po-pre.po-collapsed { max-height: 200px; }

@media (prefers-reduced-motion: reduce) {
  .notepad-tile, .anim-frame, .anim-arrow { animation: none !important; }
}

/* Tighten on mobile */
@media (max-width: 720px) {
  .notepad-card { padding: 16px 18px; }
  .notepad-tile { padding: 14px 16px; }
  .anim-frame { flex-basis: 80%; }
  .ws-editor { min-height: 220px; font-size: 14px; }
  .practical-item-head { flex-direction: column; }
  .practical-status-wrap { width: 100%; justify-content: space-between; }
}

/* ============ Avatar + profile ============ */
.user-pill-link {
  display: inline-flex; align-items: center; gap: 8px;
  text-decoration: none; padding: 4px 10px 4px 4px;
  background: var(--panel); border: 1px solid var(--border-soft);
  border-radius: 999px; color: var(--ink); font-size: 0.82rem;
  transition: border-color .15s, background .15s;
}
.user-pill-link:hover { background: var(--bg-tint); border-color: var(--accent-light); }
.user-avatar {
  width: 28px; height: 28px; border-radius: 50%; object-fit: cover;
  background: var(--gradient); color: white;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 0.78rem;
}
.user-avatar-letter { font-family: var(--mono); }
.user-pill-email { color: var(--muted); }
.user-pill-badge {
  background: var(--accent); color: white;
  padding: 1px 6px; border-radius: 999px;
  font-size: 0.62rem; font-weight: 700; letter-spacing: 0.06em;
  text-transform: uppercase;
}

.profile-card {
  background: var(--panel); border: 1px solid var(--border-soft);
  border-radius: 14px; padding: 26px; margin-top: 24px;
  box-shadow: var(--shadow-soft); max-width: 640px;
}
.profile-row { display: flex; gap: 18px; align-items: center; margin-bottom: 20px; }
.profile-avatar {
  width: 88px; height: 88px; border-radius: 50%; object-fit: cover;
  background: var(--gradient);
}
.profile-avatar-placeholder {
  display: flex; align-items: center; justify-content: center;
  color: white; font-family: var(--serif); font-size: 2.4rem;
}
.profile-meta h2 { margin: 0 0 4px; color: var(--ink); }
.profile-form { display: grid; gap: 14px; }
.profile-file {
  display: block; padding: 18px; border-radius: 10px;
  border: 1.5px dashed var(--border-soft); background: var(--bg-tint);
  cursor: pointer; transition: border-color .15s, background .15s;
}
.profile-file:hover { border-color: var(--accent); background: var(--panel); }
.profile-file input[type=file] { display: block; margin-bottom: 8px; }
.profile-file span { color: var(--muted); font-size: 0.88rem; }
.profile-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ============ Multi-source resource grid ============ */
.resource-grid {
  list-style: none; padding: 0; display: grid; gap: 12px;
  grid-template-columns: 1fr;
}
@media (min-width: 700px) { .resource-grid { grid-template-columns: repeat(2, 1fr); } }
.resource-card-multi {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--border-soft);
  border-radius: 12px; padding: 16px 18px;
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 14px; text-decoration: none; color: var(--ink);
  transition: transform .15s, border-color .15s, box-shadow .15s;
}
.resource-card-multi:hover { transform: translateY(-2px); border-color: var(--accent-light); box-shadow: 0 12px 28px rgba(30,27,75,.08); }
.resource-card-multi h3 { margin: 6px 0 6px; font-size: 1rem; color: var(--ink); }
.provider-tag {
  display: inline-block; padding: 2px 8px; border-radius: 999px;
  background: var(--ink-deep); color: white;
  font-size: 0.66rem; letter-spacing: 0.1em;
}
.provider-anthropic { background: #cc785c; }
.provider-openai    { background: #10a37f; }
.provider-google    { background: #4285f4; }
.provider-deeplearningai { background: #0080a9; }
.provider-stanford  { background: #8c1515; }
.provider-mit       { background: #750014; }
.provider-youtube   { background: #ff0000; }

/* ============ Downloadable files ============ */
.download-grid { list-style: none; padding: 0; display: grid; gap: 14px; }
.download-card {
  background: var(--panel); border: 1px solid var(--border-soft);
  border-radius: 12px; overflow: hidden;
}
.dl-head {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; background: var(--bg-tint);
  border-bottom: 1px solid var(--border-soft);
}
.dl-lang {
  background: var(--accent); color: white;
  padding: 2px 8px; border-radius: 999px; font-size: 0.66rem;
}
.dl-name { color: var(--ink); font-family: var(--mono); font-size: 0.9rem; }
.download-card .muted { padding: 10px 16px 4px; margin: 0; }
.dl-pre {
  margin: 0; padding: 14px 16px;
  background: var(--ink-deep); color: #ede9fe;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.82rem; line-height: 1.5;
  max-height: 240px; overflow: auto;
  white-space: pre-wrap;
}
.dl-actions { display: flex; gap: 8px; padding: 10px 14px; border-top: 1px solid var(--border-soft); }
.dl-actions .btn-small { padding: 6px 12px; font-size: 0.82rem; }

/* ============ Dashboard: "tailored away from you" panel ============ */
.tailor-panel {
  background: var(--panel); border: 1px solid var(--border-soft);
  border-radius: 14px; padding: 22px 24px;
  box-shadow: var(--shadow-soft); margin: 20px 0;
}
.tailor-panel h2 { margin: 0 0 6px; }
.tailor-list { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 10px; }
.tailor-list li {
  display: grid; grid-template-columns: auto 1fr auto;
  gap: 14px; align-items: center;
  padding: 12px 14px; background: var(--bg-tint); border-radius: 10px;
}
.tailor-skipped {
  background: var(--accent); color: white;
  padding: 4px 8px; border-radius: 999px; font-size: 0.66rem;
  font-weight: 800; letter-spacing: 0.1em;
}
.tailor-list li strong { display: block; color: var(--ink); margin-bottom: 2px; }
.tailor-list li p { margin: 0; }
@media (max-width: 720px) {
  .tailor-list li { grid-template-columns: 1fr; }
}

/* ============ Landing redo additions ============ */

/* Scroll progress bar pinned to top */
.lp-scroll-progress {
  position: fixed; top: 0; left: 0; right: 0; height: 3px;
  z-index: 1000; pointer-events: none;
  background: rgba(14,12,42,.05);
}
.lp-scroll-progress span {
  display: block; height: 100%;
  background: var(--gradient);
  width: 0; transition: width .12s linear;
  box-shadow: 0 0 8px rgba(124,58,237,.5);
}

/* Mesh node text labels — readable over the watermark logo + grain */
.lp-mesh .node text {
  font-family: var(--mono); font-size: 12px; fill: var(--ink-deep);
  letter-spacing: 0.06em; text-transform: uppercase; font-weight: 800;
  paint-order: stroke fill;
  stroke: var(--cream); stroke-width: 5px; stroke-linejoin: round;
}
.lp-mesh .centerlabel {
  font-family: var(--serif) !important; font-size: 13px !important;
  font-style: italic; font-weight: 600;
  fill: var(--accent) !important;
  text-transform: none !important; letter-spacing: 0;
  stroke: var(--cream) !important; stroke-width: 4px !important;
  paint-order: stroke fill;
}
.lp-mesh { transition: transform .25s cubic-bezier(.2,.8,.2,1); }
.lp-mesh .node { transform-origin: center; transform-box: fill-box; transition: transform .25s; }
.lp-mesh .node:hover circle { transform: scale(1.35); fill: var(--accent); }
.lp-mesh .node:hover text { fill: var(--accent-dark); }

/* Click ripple on hero CTAs */
.lp-btn { position: relative; overflow: hidden; }
.lp-ripple {
  position: absolute; width: 12px; height: 12px;
  border-radius: 50%; transform: translate(-50%, -50%) scale(0);
  background: rgba(255,255,255,.55);
  animation: ripple .65s cubic-bezier(.2,.8,.2,1) forwards;
  pointer-events: none;
}
@keyframes ripple { to { transform: translate(-50%, -50%) scale(28); opacity: 0; } }

/* Counters strip */
.lp-counters {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px;
  margin: 8px calc(-1 * (50vw - min(560px, 50%))) 8px;
  padding: 22px 28px;
  background: var(--ink-deep); color: var(--cream);
  border-radius: 14px;
}
@media (min-width: 700px) { .lp-counters { grid-template-columns: repeat(5, 1fr); } }
.lp-counter { text-align: center; padding: 6px 0; }
.lp-counter .num {
  display: block; font-family: var(--serif); font-weight: 500;
  font-size: clamp(2rem, 5vw, 3.4rem); line-height: 1; color: white;
  font-variation-settings: "opsz" 144, "SOFT" 100;
}
.lp-counter .label {
  display: block; margin-top: 6px; color: var(--hl-warm);
  font-size: 0.7rem; letter-spacing: 0.1em;
}

/* Tilt-on-hover hooks for card grids */
.feat-flip, .lp-track-mosaic .track, .lp-capstone-grid article {
  transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform .25s cubic-bezier(.2,.8,.2,1), box-shadow .25s;
}

@media (prefers-reduced-motion: reduce) {
  .lp-counter .num { animation: none !important; }
  .lp-scroll-progress span { transition: none; }
  .lp-mesh { transform: none !important; }
  .lp-ripple { animation: none !important; opacity: 0; }
}

/* ============ Landing — prominent brand mark above the hero copy ============ */
.lp-brandmark {
  display: inline-flex; align-items: center; gap: 14px;
  margin: 0 0 22px;
  padding: 8px 16px 8px 8px;
  background: var(--panel);
  border: 1px solid var(--border-soft);
  border-radius: 999px;
  box-shadow: 0 8px 24px rgba(30, 27, 75, 0.08);
  transition: transform .25s, box-shadow .25s;
}
.lp-brandmark:hover { transform: translateY(-2px); box-shadow: 0 14px 32px rgba(124, 58, 237, 0.18); }
.lp-brandmark-logo {
  width: 72px; height: 72px; object-fit: contain;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(168,85,247,.12), rgba(30,27,75,.04));
  padding: 4px;
  /* Subtle breath only — no spin per user direction. */
  animation: logoBreath 5.5s ease-in-out infinite;
}
@keyframes logoBreath {
  0%, 100% { transform: scale(1);    filter: drop-shadow(0 4px 12px rgba(124,58,237,.18)); }
  50%      { transform: scale(1.03); filter: drop-shadow(0 8px 20px rgba(124,58,237,.32)); }
}
@media (prefers-reduced-motion: reduce) { .lp-brandmark-logo { animation: none; } }
.lp-brandmark-text { display: flex; flex-direction: column; line-height: 1.05; }
.lp-brandmark-name { font-family: var(--serif); font-weight: 500; font-size: 1.4rem; color: var(--ink-deep); letter-spacing: -0.01em; }
.lp-brandmark-name .x { color: var(--accent); font-style: italic; }
.lp-brandmark-tag { color: var(--accent); margin-top: 4px; }

@media (max-width: 720px) {
  .lp-brandmark { padding: 6px 14px 6px 6px; }
  .lp-brandmark-logo { width: 44px; height: 44px; }
  .lp-brandmark-name { font-size: 1.15rem; }
}

/* ============ Admin usage tiles ============ */
.usage-totals {
  display: grid; gap: 14px; margin: 16px 0 28px;
  grid-template-columns: 1fr;
}
@media (min-width: 700px) { .usage-totals { grid-template-columns: repeat(4, 1fr); } }
.ut-tile {
  background: var(--panel); border: 1px solid var(--border-soft);
  border-radius: 14px; padding: 18px 20px;
  box-shadow: var(--shadow-soft);
}
.ut-tile-strong {
  background: var(--ink-deep); color: var(--cream);
  border-color: var(--ink-deep);
}
.ut-tile .ut-label { display: block; color: var(--accent-dark); font-size: 0.74rem; letter-spacing: 0.1em; }
.ut-tile-strong .ut-label { color: var(--hl-warm); }
.ut-tile .ut-value {
  display: block; margin-top: 6px;
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(1.6rem, 3.6vw, 2.4rem); color: var(--ink-deep);
  line-height: 1;
}
.ut-tile-strong .ut-value { color: white; }
.ut-tile .ut-sub { display: block; margin-top: 8px; color: var(--muted); font-size: 0.85rem; }
.ut-tile-strong .ut-sub { color: rgba(255,255,255,.72); }

/* ============ Feedback block on lesson page ============ */
.feedback-block { background: var(--bg-tint); }
.feedback-block label { display: block; margin-top: 10px; }
.feedback-block textarea {
  width: 100%; min-height: 60px; margin-top: 4px;
  padding: 10px 12px; border-radius: 8px;
  border: 1px solid var(--border-soft);
  font: inherit; background: var(--panel);
}
.feedback-block textarea:focus { outline: 2px solid var(--accent-light); border-color: var(--accent); }
.fb-rating { display: flex; gap: 10px; flex-wrap: wrap; margin: 10px 0 4px; }
.fb-rate {
  background: var(--panel); border: 1.5px solid var(--border-soft);
  padding: 8px 14px; border-radius: 999px; cursor: pointer;
  font: inherit; font-weight: 600; color: var(--ink);
  transition: all .15s;
}
.fb-rate:hover { background: var(--bg); border-color: var(--accent-light); color: var(--accent-dark); }
.fb-rate.picked { background: var(--accent); color: white; border-color: var(--accent); }
.fb-actions { display: flex; gap: 12px; align-items: center; margin-top: 14px; flex-wrap: wrap; }
.fb-status.ok { color: var(--success); }
.fb-status.miss { color: var(--danger); }

/* ============ Curriculum — tile grid, title-first, hover reveals body ============ */
.lp-curr-grid {
  display: grid; gap: 14px;
  grid-template-columns: 1fr;
  margin-top: 18px;
}
@media (min-width: 640px) { .lp-curr-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 980px) { .lp-curr-grid { grid-template-columns: repeat(3, 1fr); } }

.lp-curr-tile {
  position: relative;
  display: flex; flex-direction: column; gap: 8px;
  padding: 22px 22px 20px;
  background: var(--panel);
  border: 1px solid var(--border-soft);
  border-radius: 16px;
  color: var(--ink); text-decoration: none;
  box-shadow: var(--shadow-soft);
  overflow: hidden;
  opacity: 0; transform: translateY(12px);
  animation: tileRise .6s cubic-bezier(.2,.8,.2,1) forwards;
  animation-delay: calc(var(--i, 0) * 60ms);
  transition: transform .35s cubic-bezier(.2,.8,.2,1), box-shadow .25s, border-color .25s;
}
@keyframes tileRise { to { opacity: 1; transform: none; } }
.lp-curr-tile::before {
  content: ""; position: absolute; inset: -1px;
  border-radius: inherit; padding: 1.5px;
  background: linear-gradient(135deg, var(--accent), transparent 65%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: 0; transition: opacity .25s;
  pointer-events: none;
}
.lp-curr-tile:hover, .lp-curr-tile:focus-visible {
  transform: translateY(-6px) scale(1.01);
  box-shadow: 0 18px 40px rgba(30, 27, 75, .14);
  border-color: var(--accent-light);
}
.lp-curr-tile:hover::before, .lp-curr-tile:focus-visible::before { opacity: 1; }
.lp-curr-tile:focus-visible { outline: none; }
.lp-curr-num {
  display: inline-block;
  background: var(--ink-deep); color: var(--cream);
  padding: 4px 10px; border-radius: 999px;
  font-size: 0.72rem; letter-spacing: 0.08em;
  align-self: flex-start;
}
.lp-curr-tile h3 {
  font-family: var(--serif); font-weight: 500;
  font-size: 1.15rem; color: var(--ink-deep);
  margin: 4px 0 0; line-height: 1.2;
}
.lp-curr-body {
  max-height: 0; opacity: 0; overflow: hidden;
  transition: max-height .45s cubic-bezier(.2,.8,.2,1), opacity .25s ease, margin-top .25s ease;
}
.lp-curr-tile:hover .lp-curr-body,
.lp-curr-tile:focus-visible .lp-curr-body,
.lp-curr-tile:focus-within .lp-curr-body {
  max-height: 220px; opacity: 1; margin-top: 4px;
}
.lp-curr-body p { margin: 0 0 8px; color: var(--ink-soft); font-size: 0.92rem; line-height: 1.5; }
.lp-curr-go { color: var(--accent); font-weight: 700; font-size: 0.86rem; }

/* ============ Animate capstone + responsible AI tiles ============ */
.lp-capstone-grid article,
.lp-resp .feat {
  opacity: 0; transform: translateY(16px);
  animation: cardWake .65s cubic-bezier(.2,.8,.2,1) forwards;
}
.lp-capstone-grid article:nth-child(1) { animation-delay: .05s; }
.lp-capstone-grid article:nth-child(2) { animation-delay: .18s; }
.lp-capstone-grid article:nth-child(3) { animation-delay: .31s; }
.lp-resp .feat:nth-child(1) { animation-delay: .05s; }
.lp-resp .feat:nth-child(2) { animation-delay: .18s; }
.lp-resp .feat:nth-child(3) { animation-delay: .31s; }
.lp-resp .feat:nth-child(4) { animation-delay: .44s; }
@keyframes cardWake { to { opacity: 1; transform: none; } }

.lp-capstone-grid article {
  position: relative; overflow: hidden;
  transition: transform .35s, box-shadow .25s;
}
.lp-capstone-grid article::after {
  content: ""; position: absolute; inset: -40% -40% auto auto;
  width: 220px; height: 220px;
  background: radial-gradient(closest-side, rgba(168,85,247,.18), transparent 70%);
  transform: translate(40%, -40%) scale(0.4);
  transition: transform .55s cubic-bezier(.2,.8,.2,1);
  pointer-events: none;
}
.lp-capstone-grid article:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 44px rgba(30, 27, 75, .14);
}
.lp-capstone-grid article:hover::after { transform: translate(20%, -20%) scale(1); }

.lp-resp .feat {
  position: relative;
  transition: transform .25s, box-shadow .25s, border-color .25s;
}
.lp-resp .feat::before {
  content: ""; position: absolute; top: 14px; right: 14px;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent);
  opacity: .55;
  box-shadow: 0 0 0 0 rgba(124,58,237,.5);
  animation: respPulse 2.6s ease-in-out infinite;
}
@keyframes respPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(124,58,237,.5); }
  50%      { box-shadow: 0 0 0 9px rgba(124,58,237,0); }
}
.lp-resp .feat:hover {
  transform: translateY(-4px);
  border-color: var(--accent-light);
}

@media (prefers-reduced-motion: reduce) {
  .lp-curr-tile, .lp-capstone-grid article, .lp-resp .feat { animation: none !important; opacity: 1; transform: none; }
  .lp-resp .feat::before { animation: none; }
}

/* ============ Pathway tiles — thematic on-hover animations ============ */

/* Each rail card now hosts a self-contained anim canvas */
.lp-rail .rail-card { position: relative; overflow: hidden; }
.lp-rail .rail-card .rail-anim {
  position: relative; height: 64px; margin: 12px 0 4px;
}

/* Hide the old static glyph (in case any leftovers ride on .lp-rail li) */
.lp-rail-glyph { display: none !important; }

/* --- 01 — Sign-up envelope flight ---------------------------------- */
.rail-signup .rail-anim {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px;
}
.rail-signup .ra-word {
  justify-self: end;
  font-family: var(--mono); font-size: 0.74rem; letter-spacing: 0.1em;
  color: var(--ink-deep); text-transform: uppercase;
  padding: 6px 10px; background: var(--bg-tint); border-radius: 999px;
  border: 1px dashed rgba(14,12,42,.18);
  transition: transform .35s ease, opacity .25s ease;
}
.rail-signup .ra-envelope {
  width: 60px; height: 40px; display: inline-block;
  transform: translateX(-32px) scale(0.6); opacity: 0;
  transition: transform .9s cubic-bezier(.2,.8,.2,1) .2s, opacity .35s ease .25s;
}
.rail-signup .ra-envelope svg { width: 100%; height: 100%; }
.rail-signup .ra-tray {
  justify-self: start; width: 100%; max-width: 130px;
  color: var(--accent);
  transition: transform .25s ease;
}
.rail-signup .ra-tray svg { width: 100%; height: auto; }
.rail-signup .ra-tray-label {
  font-family: var(--mono); font-size: 6px; fill: var(--accent-dark);
  letter-spacing: 0.16em; text-transform: uppercase; font-weight: 800;
}
.rail-signup:hover .ra-word { opacity: 0; transform: translateX(-12px) scale(.85); }
.rail-signup:hover .ra-envelope { transform: translateX(0) scale(1); opacity: 1; }
.rail-signup:hover .ra-tray     { transform: scale(1.04); }

/* --- 02 — Diagnostic form ticks + gauge ---------------------------- */
.rail-diag .ra-form { width: 100%; height: 100%; color: var(--ink-deep); }
.rail-diag .ra-tick path {
  stroke-dasharray: 28; stroke-dashoffset: 28;
  transition: stroke-dashoffset .45s ease;
}
.rail-diag:hover .ra-tick .t1 { transition-delay: .05s; stroke-dashoffset: 0; }
.rail-diag:hover .ra-tick .t2 { transition-delay: .2s;  stroke-dashoffset: 0; }
.rail-diag:hover .ra-tick .t3 { transition-delay: .35s; stroke-dashoffset: 0; }
.rail-diag:hover .ra-tick .t4 { transition-delay: .5s;  stroke-dashoffset: 0; }
.rail-diag .ra-gauge {
  transition: stroke-dashoffset .9s cubic-bezier(.2,.8,.2,1) .55s;
}
.rail-diag:hover .ra-gauge { stroke-dashoffset: 22; }   /* ~75% filled */
.rail-diag .ra-gauge-num {
  font-family: var(--mono); font-size: 8px; fill: var(--accent-dark);
  font-weight: 800; opacity: 0; transition: opacity .25s ease 1.1s;
}
.rail-diag:hover .ra-gauge-num { opacity: 1; }

/* --- 03 — Approval clock + APPROVED stamp -------------------------- */
.rail-approval .rail-anim {
  display: flex; align-items: center; gap: 12px; color: var(--ink-deep);
}
.rail-approval .ra-clock { width: 80px; height: 60px; flex-shrink: 0; }
.rail-approval .ra-min { transform-origin: 40px 30px; transition: transform .9s cubic-bezier(.5,0,.2,1); }
.rail-approval .ra-hr  { transform-origin: 40px 30px; transition: transform 1.2s cubic-bezier(.5,0,.2,1); }
.rail-approval:hover .ra-min { transform: rotate(720deg); }
.rail-approval:hover .ra-hr  { transform: rotate(60deg);  }
.rail-approval .ra-stamp {
  font-family: var(--mono); font-weight: 900; font-size: 0.85rem;
  letter-spacing: 0.12em; color: white; background: var(--success);
  padding: 8px 12px; border-radius: 6px;
  transform: translateY(-12px) rotate(-12deg) scale(0.4);
  opacity: 0; transition: transform .35s cubic-bezier(.2,.8,.2,1) .9s, opacity .25s ease .95s;
  box-shadow: 0 8px 20px rgba(21,128,61,.35);
}
.rail-approval:hover .ra-stamp { transform: translateY(0) rotate(-6deg) scale(1); opacity: 1; }

/* --- 04 — Unlock + M1 badge --------------------------------------- */
.rail-unlock .rail-anim {
  display: flex; align-items: center; gap: 14px; color: var(--ink-deep);
}
.rail-unlock .ra-lock { width: 90px; height: 60px; flex-shrink: 0; }
.rail-unlock .ra-lock-shackle {
  transform-origin: 60px 22px;
  transition: transform .45s cubic-bezier(.2,.8,.2,1);
}
.rail-unlock:hover .ra-lock-shackle { transform: rotate(-22deg) translate(-6px, -2px); }
.rail-unlock .ra-badge {
  background: var(--gradient); color: white;
  padding: 8px 14px; border-radius: 10px;
  font-family: var(--serif); font-weight: 600; font-size: 1.2rem; line-height: 1;
  display: inline-flex; flex-direction: column; align-items: center; gap: 2px;
  opacity: 0; transform: translateX(-10px) scale(0.7);
  transition: transform .4s cubic-bezier(.2,.8,.2,1) .35s, opacity .25s ease .35s;
}
.rail-unlock .ra-badge small {
  font-family: var(--mono); font-size: 0.6rem; letter-spacing: 0.18em;
  text-transform: uppercase; font-weight: 700; opacity: .9;
}
.rail-unlock:hover .ra-badge { opacity: 1; transform: translateX(0) scale(1); }

/* Mobile: skip the wider grid, stack vertically */
@media (max-width: 720px) {
  .rail-signup .rail-anim { grid-template-columns: 1fr; gap: 6px; }
  .rail-signup .ra-word, .rail-signup .ra-tray { justify-self: start; }
}

@media (prefers-reduced-motion: reduce) {
  .rail-card .rail-anim * { transition: none !important; animation: none !important; }
  .rail-signup .ra-envelope { opacity: 1; transform: none; }
  .rail-signup .ra-word { opacity: 1; transform: none; }
  .rail-diag .ra-tick path { stroke-dashoffset: 0; }
  .rail-diag .ra-gauge { stroke-dashoffset: 22; }
  .rail-diag .ra-gauge-num { opacity: 1; }
  .rail-approval .ra-stamp { opacity: 1; transform: none; }
  .rail-unlock .ra-badge { opacity: 1; transform: none; }
}

/* =================================================================
   Landing tweaks — brandmark text-only, counters & ticker sizing,
   pathway slower full-tile expansion, capstone + responsible AI
   hover-reveal, final CTA logo backdrop
   ================================================================= */

/* Brandmark — text only, the logo lives behind the mesh now */
.lp-brandmark {
  padding: 10px 22px;
  align-items: center;
}
.lp-brandmark-text {
  flex-direction: row; gap: 16px; align-items: baseline;
}
.lp-brandmark-name {
  font-size: clamp(1.6rem, 3.4vw, 2.2rem);
  font-variation-settings: "opsz" 144, "SOFT" 60;
  letter-spacing: -0.012em;
}
.lp-brandmark-tag {
  font-size: 0.82rem; letter-spacing: 0.18em;
  border-left: 1px solid rgba(14,12,42,.2);
  padding-left: 16px;
  align-self: stretch; display: flex; align-items: center;
}
@media (max-width: 720px) {
  .lp-brandmark { padding: 8px 16px; }
  .lp-brandmark-text { gap: 10px; }
  .lp-brandmark-name { font-size: 1.4rem; }
  .lp-brandmark-tag  { font-size: 0.7rem; padding-left: 10px; }
}

/* Ticker — span the same width as the counters strip + larger text.
   Both bleed out of .site-main via negative margin. */
.lp-counters,
.lp-ticker {
  margin-left:  calc(-1 * (50vw - min(560px, 50%)));
  margin-right: calc(-1 * (50vw - min(560px, 50%)));
}
.lp-ticker { border-radius: 14px; }
.lp-ticker-track {
  font-size: 0.95rem; letter-spacing: 0.04em;
  padding: 18px 0; gap: 36px;
  text-transform: none;
}
.lp-ticker-track span:nth-child(even) { color: var(--accent); font-weight: 800; }

/* Counters: numbers are already big — make them count from 0 */
.lp-counter .num { display: block; }

/* ============ Pathway tile animations: slower + full-tile cover ============ */
.lp-rail .rail-card { position: relative; overflow: hidden; min-height: 260px; }
.lp-rail .rail-card .rail-anim {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(180deg, rgba(255,255,255,.0) 0%, rgba(244,241,234,.92) 30%, rgba(244,241,234,.98) 100%);
  opacity: 0; pointer-events: none;
  padding: 24px;
  transition: opacity .55s ease;
  height: auto; margin: 0;
}
.lp-rail .rail-card:hover .rail-anim,
.lp-rail .rail-card:focus-within .rail-anim {
  opacity: 1;
}

/* Sign-up tile — fill the tile on hover */
.rail-signup .rail-anim {
  /* Use grid so envelope sits between word and tray when shown */
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1.4fr);
  align-items: center;
  gap: 18px;
}
.rail-signup .ra-envelope {
  transition: transform 1.6s cubic-bezier(.2,.8,.2,1) .3s, opacity .5s ease .35s;
  width: 130px; height: auto;
  display: inline-flex; align-items: center; justify-content: center;
}
.rail-signup .ra-envelope svg { width: 100%; height: auto; }
.rail-signup .ra-tray { width: 70%; max-width: none; }
.rail-signup .ra-tray svg { width: 100%; height: auto; }
.rail-signup .ra-tray-label {
  font-size: 7.5px;        /* bumped from 6 so REQUEST ACCESS is readable */
}
.rail-signup .ra-word {
  font-size: 1.45rem;
  padding: 14px 22px;
  background: var(--panel);
  border: 1.5px dashed rgba(14,12,42,.22);
  transition: transform .6s ease, opacity .4s ease;
}

.rail-diag .ra-form { width: 80%; height: auto; max-height: 70%; }
.rail-diag .ra-tick path { transition: stroke-dashoffset .9s ease; }
.rail-diag:hover .ra-tick .t1 { transition-delay: .25s; }
.rail-diag:hover .ra-tick .t2 { transition-delay: .55s; }
.rail-diag:hover .ra-tick .t3 { transition-delay: .85s; }
.rail-diag:hover .ra-tick .t4 { transition-delay: 1.15s; }
.rail-diag .ra-gauge { transition: stroke-dashoffset 1.8s cubic-bezier(.2,.8,.2,1) 1.4s; }
.rail-diag .ra-gauge-num { transition: opacity .35s ease 2.4s; }

.rail-approval .ra-clock { width: 40%; height: auto; }
.rail-approval .ra-min { transition: transform 1.8s cubic-bezier(.5,0,.2,1); }
.rail-approval .ra-hr  { transition: transform 2.4s cubic-bezier(.5,0,.2,1); }
.rail-approval .ra-stamp {
  font-size: 1.2rem; padding: 12px 18px;
  transition: transform .55s cubic-bezier(.2,.8,.2,1) 1.8s, opacity .35s ease 1.85s;
}

.rail-unlock .ra-lock { width: 35%; height: auto; }
.rail-unlock .ra-lock-shackle { transition: transform .9s cubic-bezier(.2,.8,.2,1) .25s; }
.rail-unlock .ra-badge {
  font-size: 1.8rem; padding: 14px 22px;
  transition: transform .7s cubic-bezier(.2,.8,.2,1) 1.0s, opacity .35s ease 1.05s;
}

/* The card title/body shouldn't disappear behind the anim — keep them visible
   while the anim animates as a foreground layer instead of background fill. */
.lp-rail .rail-card .rail-anim {
  /* allow the underlying text to peek through softly */
  background: linear-gradient(180deg, rgba(255,255,255,.0) 0%, rgba(244,241,234,.85) 22%, rgba(244,241,234,.97) 100%);
}

@media (prefers-reduced-motion: reduce) {
  .lp-rail .rail-card .rail-anim { transition: none; }
}

/* ============ Capstone — title-first, hover reveals body at 75% ============ */
.lp-capstone-grid { gap: 18px; }
.lp-capstone-grid article {
  position: relative; overflow: hidden;
  min-height: 260px;
  padding: 28px 28px 24px;
  display: flex; flex-direction: column; justify-content: flex-start;
  cursor: default;
}
.lp-capstone-grid article h3 {
  font-size: clamp(1.2rem, 2.2vw, 1.6rem);
  margin: 0; transition: transform .35s cubic-bezier(.2,.8,.2,1);
}
.lp-capstone-grid article p {
  font-size: 1rem; line-height: 1.55; color: var(--ink-soft);
  max-height: 0; opacity: 0; margin: 0;
  transition: max-height .55s cubic-bezier(.2,.8,.2,1),
              opacity .35s ease,
              margin-top .35s ease,
              font-size .35s ease;
}
.lp-capstone-grid article:hover h3,
.lp-capstone-grid article:focus-within h3 {
  transform: translateY(-6px);
}
.lp-capstone-grid article:hover p,
.lp-capstone-grid article:focus-within p {
  /* fill ~75% of tile */
  max-height: 200px;
  opacity: 1;
  margin-top: 18px;
  font-size: 1.15rem;
  line-height: 1.55;
  color: var(--ink);
}

/* ============ Responsible AI — same hover reveal ============ */
.lp-resp .feat {
  min-height: 220px;
  padding: 26px 26px 22px;
  display: flex; flex-direction: column;
  position: relative;
}
.lp-resp .feat .feat-num { color: var(--accent); margin: 0; }
.lp-resp .feat h3 {
  font-size: clamp(1.05rem, 1.8vw, 1.25rem);
  margin: 8px 0 0;
  transition: transform .35s ease;
}
.lp-resp .feat p {
  font-size: 0.95rem;
  max-height: 0; opacity: 0; margin: 0;
  transition: max-height .55s cubic-bezier(.2,.8,.2,1),
              opacity .3s ease,
              margin-top .3s ease,
              font-size .35s ease;
}
.lp-resp .feat:hover h3,
.lp-resp .feat:focus-within h3 {
  transform: translateY(-4px);
}
.lp-resp .feat:hover p,
.lp-resp .feat:focus-within p {
  max-height: 200px;
  opacity: 1;
  margin-top: 14px;
  font-size: 1.05rem;
  line-height: 1.55;
  color: var(--ink);
}

/* ============ Final CTA — logo backdrop behind orbit SVG ============ */
.lp-final-art-wrap {
  position: relative;
  width: min(360px, 100%);
  height: min(360px, 90vw);
  justify-self: end;
}
.lp-final-backdrop {
  position: absolute; top: 50%; left: 50%;
  width: 76%; height: 76%;
  transform: translate(-50%, -50%);
  object-fit: contain;
  /* Keep brand colours but lift against the dark gradient via a glow.
     No brightness/invert filter — earlier version turned the navy
     logo invisible on the navy/purple final-CTA background. */
  opacity: 0.92;
  filter: drop-shadow(0 0 28px rgba(255, 255, 255, 0.45))
          drop-shadow(0 8px 22px rgba(168, 85, 247, 0.5));
  z-index: 0;
  animation: backdropBreath 7s ease-in-out infinite;
  pointer-events: none;
  background: radial-gradient(closest-side, rgba(255,255,255,.18), transparent 70%);
  border-radius: 50%;
}
.lp-final-art {
  position: relative; z-index: 1;
  width: 100%; height: 100%; display: block;
}
.lp-final-art .lf-orbit   { animation: orbitSpin 22s linear infinite; transform-origin: 120px 120px; }
.lp-final-art .lf-orbit-2 { animation: orbitSpin 14s linear infinite reverse; transform-origin: 120px 120px; }
.lp-final-art .lf-word {
  font-family: var(--serif); font-style: italic;
  font-size: 30px; font-weight: 600; fill: var(--hl-warm);
  paint-order: stroke fill;
  stroke: rgba(14,12,42,.55); stroke-width: 1.2px;
}
@keyframes orbitSpin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .lp-final-art .lf-orbit, .lp-final-art .lf-orbit-2, .lp-final-backdrop { animation: none; }
}
