/* ============================================================
   Curso Copilot Chat Básico — Paleta cálida académica
   ============================================================ */

:root {
  --burgundy: #7C2D3A;
  --burgundy-dark: #5E1F2A;
  --burgundy-soft: #F4E6E8;
  --marine: #1C3D5A;
  --marine-soft: #E4ECF3;
  --cream: #F5EFE3;
  --cream-deep: #EBE2CF;
  --paper: #FAF6EC;
  --gold: #C08A3E;
  --gold-soft: #F3E6CC;
  --olive: #5C7A3B;
  --olive-soft: #E4EAD6;
  --terracotta: #B5462C;
  --terracotta-soft: #F3DFD5;
  --ink: #1A1410;
  --ink-2: #4A3F35;
  --ink-3: #7A6E62;
  --line: #D9CFBB;
  --line-soft: #E8DFCB;

  /* CORE chips */
  --c-contexto: #1C3D5A;     /* marine */
  --c-objetivo: #5C7A3B;     /* olive */
  --c-restric: #B5462C;      /* terracotta */
  --c-expect: #7C2D3A;       /* burgundy */
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-feature-settings: 'ss01', 'cv11', 'tnum';
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.num, .tnum { font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }

/* ---- Scrollbar ---- */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--line); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--ink-3); }

/* ---- App shell ---- */
.app {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
}

.app.projector {
  grid-template-columns: minmax(0, 1fr);
}

/* ===== Header ===== */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  grid-column: 1 / -1;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  padding: 14px 28px;
  display: flex;
  align-items: center;
  gap: 24px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 240px;
}
.brand-mark {
  width: 34px; height: 34px;
  border-radius: 4px;
  background: var(--burgundy);
  color: var(--cream);
  display: grid; place-items: center;
  font-weight: 700;
  font-size: 14px;

}
.brand-text { line-height: 1.15; }
.brand-title {
  font-size: 13px; font-weight: 600; letter-spacing: -0.01em;
  color: var(--ink);
}
.brand-sub {
  font-size: 11.5px; color: var(--ink-3);
}

.header-progress { flex: 1; display: flex; align-items: center; gap: 16px; }
.header-progress-label {
  font-size: 12px; color: var(--ink-3);
  font-weight: 600;
  white-space: nowrap;
}
.progressbar-wrap {
  flex: 1;
  height: 6px;
  background: var(--cream-deep);
  border-radius: 2px;
  overflow: hidden;
}
.progressbar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--burgundy) 0%, var(--gold) 100%);
  border-radius: 2px;
  transition: width 0.4s cubic-bezier(.2,.8,.2,1);
}
.progress-pct {
  font-variant-numeric: tabular-nums;
  font-size: 13px; font-weight: 600; color: var(--ink);
  min-width: 44px; text-align: right;
}

.header-actions { display: flex; align-items: center; gap: 8px; }
.icon-btn {
  display: inline-flex; align-items: center; gap: 6px;
  height: 36px; padding: 0 12px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 4px;
  font: inherit;
  font-size: 12.5px; font-weight: 500;
  color: var(--ink-2);
  cursor: pointer;
  transition: all 0.15s;
}
.icon-btn:hover { background: var(--cream); border-color: var(--ink-3); color: var(--ink); }
.icon-btn.active {
  background: var(--burgundy);
  color: var(--cream);
  border-color: var(--burgundy);
}

/* ===== Sidebar ===== */
.sidebar {
  background: var(--cream);
  border-right: 1px solid var(--line);
  padding: 24px 16px 64px;
  overflow-y: auto;
  position: sticky;
  top: 65px;
  height: calc(100vh - 65px);
}
.app.projector .sidebar { display: none; }

.sidebar-title {
  font-size: 12.5px;


  color: var(--ink-3);
  font-weight: 600;
  padding: 0 8px 12px;
}

.block-item { margin-bottom: 6px; }
.block-head {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 10px;
  border-radius: 4px;
  cursor: pointer;
  border: none;
  background: transparent;
  width: 100%; text-align: left;
  font: inherit;
  transition: background 0.12s;
}
.block-head:hover { background: var(--cream-deep); }
.block-head.active { background: var(--burgundy-soft); }

.block-num {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--cream-deep);
  color: var(--ink-2);
  display: grid; place-items: center;
  font-weight: 600; font-size: 13px;
  flex-shrink: 0;
  border: 1.5px solid transparent;
  transition: all 0.2s;
}
.block-num.in-progress {
  background: var(--gold-soft);
  color: var(--burgundy);
  border-color: var(--gold);
}
.block-num.complete {
  background: var(--olive);
  color: white;
}
.block-head-text { flex: 1; min-width: 0; }
.block-head-title {
  font-size: 13px; font-weight: 600; color: var(--ink);
  line-height: 1.25;
}
.block-head-meta {
  font-size: 11px; color: var(--ink-3);
  margin-top: 2px;
  font-variant-numeric: tabular-nums;
}

.lesson-list {
  padding: 4px 0 8px 46px;
  display: flex; flex-direction: column; gap: 1px;
}
.lesson-item {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 10px;
  border-radius: 3px;
  background: none;
  border: none;
  font: inherit;
  cursor: pointer;
  text-align: left;
  color: var(--ink-2);
  font-size: 12.5px;
  line-height: 1.3;
  transition: all 0.1s;
}
.lesson-item:hover { background: var(--cream-deep); color: var(--ink); }
.lesson-item.active { background: var(--burgundy); color: var(--cream); font-weight: 500; }
.lesson-item.active .lesson-dot { border-color: var(--cream); }
.lesson-dot {
  width: 12px; height: 12px;
  border-radius: 50%;
  border: 1.5px solid var(--ink-3);
  flex-shrink: 0;
  display: grid; place-items: center;
}
.lesson-item.done .lesson-dot {
  background: var(--olive); border-color: var(--olive);
}
.lesson-item.done .lesson-dot::after {
  content: ""; width: 5px; height: 5px;
  background: white; border-radius: 50%;
}
.lesson-label { flex: 1; }
.lesson-code {
  font-variant-numeric: tabular-nums;
  font-size: 10.5px;
  color: var(--ink-3);
}
.lesson-item.active .lesson-code { color: var(--cream-deep); }

/* ===== Main ===== */
.main {
  padding: 48px 56px 120px;
  max-width: 980px;
  width: 100%;
  margin: 0 auto;
}
.app.projector .main { max-width: 1200px; padding: 64px 80px 160px; }
.app.projector .main { font-size: 18px; }
.app.projector h1 { font-size: 72px !important; }
.app.projector h2 { font-size: 40px !important; }
.app.projector h3 { font-size: 28px !important; }
.app.projector .big-number { font-size: calc(var(--bn-fs, 92px) * 1.4); }
.app.bignums-off .big-number { font-size: calc(var(--bn-fs, 92px) * 0.5); }

/* Block header */
.block-header {
  border-bottom: 1px solid var(--line);
  padding-bottom: 28px;
  margin-bottom: 36px;
  display: flex; align-items: flex-end; justify-content: space-between; gap: 32px;
}
.block-eyebrow {
  font-size: 13.5px;


  color: var(--burgundy);
  font-weight: 600;
  margin-bottom: 10px;
}
.block-title {
  font-size: 48px;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.02;
  color: var(--ink);
  margin: 0;
}
.block-lede {
  margin-top: 14px;
  font-size: 17px;
  color: var(--ink-2);
  max-width: 62ch;
  line-height: 1.5;
}
.block-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: 4px;
  font-size: 12px; font-weight: 500;
  color: var(--ink-2);
  white-space: nowrap;
  flex-shrink: 0;
}

/* ===== Lesson cards ===== */
.lesson {
  background: white;
  border: 1px solid var(--line-soft);
  border-radius: 4px;
  padding: 28px 32px;
  margin-bottom: 20px;
  transition: all 0.2s;
  position: relative;
}
.lesson.done {
  background: linear-gradient(180deg, #FCFAF4 0%, #F6F1E3 100%);
  border-color: var(--olive-soft);
}
.lesson-head {
  display: flex; align-items: flex-start; gap: 16px;
  margin-bottom: 18px;
}
.lesson-index {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--burgundy);
  color: var(--cream);
  display: grid; place-items: center;
  font-weight: 700;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
  letter-spacing: -0.02em;
}
.lesson.done .lesson-index { background: var(--olive); }
.lesson-titles { flex: 1; min-width: 0; }
.lesson-eyebrow {
  font-size: 12.5px;


  color: var(--ink-3);
  font-weight: 600;
  display: flex; align-items: center; gap: 10px;
}
.lesson-eyebrow .dur {
  color: var(--burgundy);
}
.lesson-eyebrow .sep { color: var(--line); }
.lesson-title {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 4px 0 0;
  line-height: 1.15;
}
.done-check {
  display: inline-flex; align-items: center; gap: 6px;
  height: 32px; padding: 0 12px;
  border-radius: 4px;
  background: var(--cream);
  border: 1px solid var(--line);
  font-size: 12px; font-weight: 500;
  color: var(--ink-2);
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
  flex-shrink: 0;
}
.done-check:hover { background: var(--cream-deep); }
.done-check.checked {
  background: var(--olive);
  border-color: var(--olive);
  color: white;
}

.lesson-body { color: var(--ink-2); font-size: 15px; line-height: 1.55; }
.lesson-body p { margin: 0 0 14px; }
.lesson-body p:last-child { margin-bottom: 0; }
.lesson-body strong { color: var(--ink); font-weight: 600; }
.lesson-body ul { margin: 0 0 14px; padding-left: 22px; }
.lesson-body a { color: var(--marine); text-decoration: underline; text-underline-offset: 2px; }
.lesson-body p.src {
  font-size: 12.5px; line-height: 1.45;
  color: var(--ink-3);
  margin: 6px 0 14px;
  padding-left: 10px;
  border-left: 2px solid var(--line);
}
.lesson-body p.src a { color: var(--ink-2); }
.lesson-body li { margin-bottom: 6px; }

/* ===== Big number ===== */
.big-number {
  font-size: var(--bn-fs, 92px);
  font-weight: 700;
  letter-spacing: -0.05em;
  line-height: 0.95;
  color: var(--burgundy);
  font-variant-numeric: tabular-nums;
}
.big-number.marine { color: var(--marine); }
.big-number.olive { color: var(--olive); }
.big-number.gold { color: var(--gold); }
.big-number-label {
  font-size: 13px;


  color: var(--ink-3);
  font-weight: 600;
  margin-top: 8px;
}
.big-number-sub {
  font-size: 15px;
  color: var(--ink-2);
  margin-top: 4px;
  line-height: 1.4;
}

/* ===== LLM Simulation (editorial, coherente con el resto del curso) ===== */
.llm-sim {
  margin: 24px 0;
  border: 2px solid var(--ink);
  background: var(--paper);
  border-radius: 4px;
  overflow: hidden;
}
.llm-sim-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 20px;
  background: var(--ink);
  color: var(--cream);
  border-bottom: 2px solid var(--ink);
}
.llm-sim-head-left {
  display: flex; align-items: center; gap: 12px;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 12px;


  font-weight: 600;
}
.llm-sim-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--gold);
  animation: llmPulse 1.8s ease-in-out infinite;
}
@keyframes llmPulse { 0%,100% { opacity: 1; } 50% { opacity: 0.4; } }
.llm-sim-meta {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11.5px;

  opacity: 0.6;

}

.llm-sim-chat {
  padding: 0;
}
.llm-row {
  display: grid;
  grid-template-columns: 110px 1fr;
  align-items: stretch;
  border-bottom: 1px solid var(--cream-deep);
}
.llm-row:last-child { border-bottom: none; }
.llm-label {
  background: var(--cream);
  padding: 18px 16px;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 12px;


  font-weight: 700;
  color: var(--ink-2);
  border-right: 1px solid var(--cream-deep);
  display: flex; align-items: flex-start; gap: 6px;
}
.llm-row.bot .llm-label { color: var(--burgundy); }
.llm-row.bot { background: #FBF7EC; }
.llm-content {
  padding: 18px 22px;
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
  min-height: 24px;
  display: flex; align-items: center;
}
.llm-row.bot .llm-content {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 15px;
  font-weight: 600;
  color: var(--burgundy-dark);
}
.llm-cursor {
  display: inline-block;
  margin-left: 1px;
  color: var(--burgundy);
  font-weight: 400;
  animation: llmBlink 0.9s steps(2) infinite;
}
@keyframes llmBlink { 0%,100% { opacity: 1; } 50% { opacity: 0; } }
.llm-typing { display: inline-flex; gap: 5px; align-items: center; }
.llm-typing span {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--burgundy);
  animation: llmDots 1.2s ease-in-out infinite;
}
.llm-typing span:nth-child(2) { animation-delay: 0.15s; }
.llm-typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes llmDots {
  0%,60%,100% { transform: translateY(0); opacity: 0.3; }
  30% { transform: translateY(-3px); opacity: 1; }
}

.llm-sim-controls {
  display: flex; gap: 12px; flex-wrap: wrap;
  padding: 16px 20px;
  background: var(--cream);
  border-top: 1px solid var(--cream-deep);
}
.llm-sim-btn {
  background: var(--burgundy);
  color: var(--cream);
  border: 2px solid var(--burgundy);
  padding: 10px 18px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;


  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
}
.llm-sim-btn:hover { background: var(--burgundy-dark); border-color: var(--burgundy-dark); }
.llm-sim-btn-ghost {
  background: transparent;
  color: var(--ink-2);
  border: 1px solid var(--ink-3);
  padding: 10px 14px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;


  cursor: pointer;
  font-family: inherit;
}
.llm-sim-btn-ghost:hover { color: var(--ink); border-color: var(--ink); }

.llm-sim-reveals {
  padding: 0;
  border-top: 2px solid var(--ink);
  background: var(--paper);
}
.llm-reveal {
  display: grid;
  grid-template-columns: 110px 1fr;
  border-bottom: 1px solid var(--cream-deep);
  opacity: 0;
  transform: translateY(4px);
  animation: llmRevealIn 0.4s cubic-bezier(.2,.8,.2,1) forwards;
}
.llm-reveal:last-child { border-bottom: none; }
@keyframes llmRevealIn {
  to { opacity: 1; transform: translateY(0); }
}
.llm-reveal-num {
  background: var(--burgundy-soft);
  padding: 18px 16px;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11px;
  font-weight: 700;
  color: var(--burgundy);

  border-right: 1px solid var(--cream-deep);
  display: flex; align-items: flex-start;
}
.llm-reveal-body {
  padding: 18px 22px;
}
.llm-reveal-head {
  font-size: 13px;


  font-weight: 700;
  color: var(--burgundy);
  margin-bottom: 6px;
}
.llm-reveal-body p {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--ink);
}

/* ===== Callouts ===== */
.callout {
  border-left: 5px solid;
  padding: 18px 22px;
  border-radius: 0 4px 4px 0;
  margin: 16px 0;
}
.callout-tip { border-color: var(--gold); background: var(--gold-soft); }
.callout-alert { border-color: var(--terracotta); background: var(--terracotta-soft); }
.callout-ok { border-color: var(--olive); background: var(--olive-soft); }
.callout-nota { border-color: var(--marine); background: var(--marine-soft); }
.callout-head {
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 6px;
  display: flex; align-items: center; gap: 8px;
}
.callout-tip .callout-head { color: var(--burgundy-dark); }
.callout-alert .callout-head { color: #7A2F1A; }
.callout-ok .callout-head { color: #3E5328; }
.callout-nota .callout-head { color: var(--marine); }
.callout p { margin: 0; font-size: 14.5px; line-height: 1.5; color: var(--ink); }
.callout p + p { margin-top: 8px; }

/* ===== Prompt block ===== */
.prompt {
  background: #1A1410;
  color: #F5EFE3;
  border-radius: 4px;
  padding: 0;
  margin: 14px 0 4px;
  overflow: hidden;
  border: 1px solid #2A211A;
}
.prompt-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid #2A211A;
  background: #231A14;
}
.prompt-meta {
  font-size: 12px; color: #B8A58E;
  font-weight: 600;
  display: flex; align-items: center; gap: 8px;
}
.copy-btn {
  background: transparent;
  border: 1px solid #3A2E22;
  color: #E6D8BC;
  padding: 5px 10px;
  border-radius: 3px;
  font: inherit;
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex; align-items: center; gap: 5px;
  transition: all 0.12s;
}
.copy-btn:hover { background: #2A211A; }
.copy-btn.copied { background: var(--olive); color: white; border-color: var(--olive); }
.prompt-body {
  padding: 18px 20px;
  font-family: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  font-size: 13.5px;
  line-height: 1.62;
  white-space: pre-wrap;
  word-break: break-word;
}
.prompt-body .core-tag {
  display: inline-block;
  padding: 1px 7px;
  border-radius: 4px;
  font-size: 10.5px;
  font-weight: 700;

  margin-right: 8px;
  vertical-align: baseline;
  color: white;
  font-family: 'Inter', sans-serif;
}
.core-c { background: var(--c-contexto); }
.core-o { background: var(--c-objetivo); }
.core-r { background: var(--c-restric); }
.core-e { background: var(--c-expect); }

/* CORE chips inline (in prose) */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 10px;
  border-radius: 4px;
  font-size: 11.5px; font-weight: 600;

  color: white;
}
.chip-c { background: var(--c-contexto); }
.chip-o { background: var(--c-objetivo); }
.chip-r { background: var(--c-restric); }
.chip-e { background: var(--c-expect); }
.chip-dot {
  width: 7px; height: 7px; border-radius: 50%; background: white; opacity: 0.9;
}

/* ===== Grid utilities ===== */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
@media (max-width: 820px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

/* Card mini */
.card {
  background: var(--paper);
  border: 1px solid var(--line-soft);
  border-radius: 4px;
  padding: 18px;
}
.card-title {
  font-size: 13px; font-weight: 600;
  color: var(--ink);
  margin-bottom: 8px;
  display: flex; align-items: center; gap: 8px;
}
.card p { margin: 0; font-size: 13.5px; color: var(--ink-2); line-height: 1.5; }

/* ===== Schematic UI placeholder (for Copilot UI illustrations) ===== */
.schema {
  background: var(--paper);
  border: 1px dashed var(--line);
  border-radius: 4px;
  padding: 24px;
  position: relative;
  margin: 14px 0;
}
.schema-label {
  position: absolute;
  top: -9px;
  left: 16px;
  background: var(--paper);
  padding: 0 10px;
  font-size: 12px;


  color: var(--ink-3);
  font-weight: 600;
}
.schema-window {
  background: white;
  border: 1.5px solid var(--ink-2);
  border-radius: 4px;
  min-height: 180px;
  position: relative;
  overflow: hidden;
}
.schema-topbar {
  height: 36px; border-bottom: 1.5px solid var(--line);
  display: flex; align-items: center; gap: 8px;
  padding: 0 12px;
  background: var(--cream);
}
.schema-dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--line);
}
.schema-box {
  border: 1.5px dashed var(--line);
  border-radius: 3px;
  padding: 10px 12px;
  background: var(--cream);
  font-size: 12px;
  color: var(--ink-3);
  font-family: 'JetBrains Mono', ui-monospace, monospace;
}
.schema-highlight {
  border: 2px solid var(--burgundy);
  background: var(--burgundy-soft);
  color: var(--burgundy);
  font-weight: 600;
}
.schema-arrow {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  color: var(--burgundy);
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 4px;
  background: var(--burgundy-soft);
}

/* ===== Quiz ===== */
.quiz {
  background: linear-gradient(180deg, var(--marine-soft) 0%, #F0F5FA 100%);
  border: 1px solid var(--marine);
  border-radius: 4px;
  padding: 32px 36px;
  margin-top: 28px;
  margin-bottom: 20px;
}
.quiz-head {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 24px;
}
.quiz-mark {
  width: 44px; height: 44px;
  border-radius: 4px;
  background: var(--marine);
  color: white;
  display: grid; place-items: center;
  font-weight: 700;
  font-size: 20px;
}
.quiz-title { font-size: 22px; font-weight: 700; letter-spacing: -0.015em; }
.quiz-sub { font-size: 13px; color: var(--ink-3); margin-top: 2px; }
.quiz-score { margin-left: auto; display: flex; align-items: center; gap: 16px; }
.quiz-score-n { font-size: 28px; font-weight: 700; color: var(--marine); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.quiz-score-l { font-size: 12px; color: var(--ink-3); font-weight: 600; }
.quiz-retry {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 8px 14px;
  font: inherit; font-size: 12.5px; font-weight: 600;
  color: var(--ink-2);
  cursor: pointer;
}
.quiz-retry:hover { border-color: var(--ink-3); color: var(--ink); }

/* ===== Navegación entre bloques ===== */
.block-nav {
  display: flex; gap: 14px;
  margin-top: 32px; padding-top: 28px;
  border-top: 1px solid var(--line);
}
.block-nav-btn {
  flex: 1;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 18px 22px;
  cursor: pointer;
  font: inherit;
  color: var(--ink);
  text-align: left;
}
.block-nav-btn.next {
  text-align: right;
  background: var(--burgundy);
  border-color: var(--burgundy);
  color: var(--cream);
}
.block-nav-label { font-size: 12px; color: var(--ink-3); font-weight: 600; margin-bottom: 4px; }
.block-nav-btn.next .block-nav-label { color: var(--gold-soft); }
.block-nav-title { font-size: 15px; font-weight: 600; }

.question + .question { margin-top: 22px; padding-top: 22px; border-top: 1px solid var(--line-soft); }
.q-stem {
  font-size: 16px; font-weight: 600;
  line-height: 1.4;
  color: var(--ink);
  margin-bottom: 14px;
}
.q-stem-num {
  font-variant-numeric: tabular-nums;
  color: var(--marine);
  margin-right: 8px;
  font-weight: 700;
}
.q-options { display: flex; flex-direction: column; gap: 8px; }
.q-option {
  text-align: left;
  background: white;
  border: 1.5px solid var(--line);
  padding: 12px 16px;
  border-radius: 4px;
  font: inherit;
  font-size: 14.5px;
  color: var(--ink);
  cursor: pointer;
  transition: all 0.12s;
  display: flex; align-items: center; gap: 10px;
}
.q-option:hover { border-color: var(--marine); background: #F9FBFD; }
.q-option .q-letter {
  width: 24px; height: 24px;
  border-radius: 3px;
  background: var(--cream);
  color: var(--ink-2);
  display: grid; place-items: center;
  font-size: 12px; font-weight: 700;
  flex-shrink: 0;
}
.q-option.correct { border-color: var(--olive); background: var(--olive-soft); color: var(--ink); }
.q-option.correct .q-letter { background: var(--olive); color: white; }
.q-option.incorrect { border-color: var(--terracotta); background: var(--terracotta-soft); }
.q-option.incorrect .q-letter { background: var(--terracotta); color: white; }
.q-option.muted { opacity: 0.55; cursor: default; }
.q-option.muted:hover { border-color: var(--line); background: white; }
.q-option:disabled { cursor: default; }

.q-feedback {
  margin-top: 10px;
  padding: 12px 14px;
  border-radius: 4px;
  font-size: 13.5px;
  line-height: 1.5;
  border-left: 3px solid;
}
.q-feedback.ok { background: var(--olive-soft); border-color: var(--olive); color: #354520; }
.q-feedback.bad { background: var(--terracotta-soft); border-color: var(--terracotta); color: #5A2210; }
.q-feedback b { font-weight: 700; }

/* ===== Para llevar / Cliffhanger / Aforismo ===== */
.wrap-up {
  margin-top: 36px;
  padding-top: 28px;
  border-top: 2px solid var(--burgundy);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
@media (max-width: 820px) { .wrap-up { grid-template-columns: 1fr; } }

.para-llevar {
  background: var(--cream);
  border-radius: 4px;
  padding: 24px 26px;
}
.wrap-eyebrow {
  font-size: 13px;


  color: var(--burgundy);
  font-weight: 700;
  margin-bottom: 12px;
}
.para-llevar ol {
  margin: 0; padding-left: 0; list-style: none;
  counter-reset: pl;
}
.para-llevar li {
  counter-increment: pl;
  padding: 10px 0 10px 38px;
  position: relative;
  font-size: 14.5px;
  color: var(--ink);
  font-weight: 500;
  line-height: 1.35;
  border-top: 1px solid var(--line-soft);
}
.para-llevar li:first-child { border-top: none; }
.para-llevar li::before {
  content: counter(pl, decimal-leading-zero);
  position: absolute;
  left: 0; top: 10px;
  font-size: 13px;
  font-weight: 700;
  color: var(--burgundy);
  font-variant-numeric: tabular-nums;
}

.cliffhanger {
  background: var(--marine);
  color: var(--cream);
  border-radius: 4px;
  padding: 24px 26px;
  display: flex; flex-direction: column; justify-content: center;
}
.cliffhanger .wrap-eyebrow { color: var(--gold-soft); }
.cliffhanger p {
  margin: 0;
  font-size: 17px;
  line-height: 1.45;
  font-weight: 500;
  font-style: italic;
}

.aforismo {
  grid-column: 1 / -1;
  padding: 36px 40px;
  background: var(--burgundy);
  color: var(--cream);
  border-radius: 4px;
  font-size: 30px;
  font-style: italic;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.015em;
  position: relative;
}
.aforismo::before {
  content: "”";
  position: absolute;
  top: -8px; left: 22px;
  font-size: 120px;
  line-height: 1;
  color: var(--gold);
  font-family: Georgia, serif;
  font-style: normal;
  opacity: 0.6;
}
.aforismo-attr {
  display: block;
  margin-top: 14px;
  font-size: 12.5px;
  font-style: normal;
  font-weight: 600;


  color: var(--gold-soft);
}

/* ===== Role-play exercise ===== */
.exercise {
  background: var(--paper);
  border: 2px solid var(--burgundy);
  border-radius: 4px;
  padding: 24px 28px;
  margin: 18px 0;
}
.exercise-head {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 14px;
}
.exercise-tag {
  font-size: 12px; font-weight: 700;

  background: var(--burgundy); color: var(--cream);
  padding: 3px 9px; border-radius: 4px;
}
.exercise-title { font-size: 18px; font-weight: 700; letter-spacing: -0.015em; }
.exercise textarea, .lesson-body textarea {
  width: 100%;
  min-height: 120px;
  border: 1.5px solid var(--line);
  border-radius: 4px;
  padding: 12px 14px;
  font: inherit;
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink);
  background: white;
  resize: vertical;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 13px;
}
.exercise textarea:focus, .lesson-body textarea:focus {
  outline: none;
  border-color: var(--burgundy);
  box-shadow: 0 0 0 3px var(--burgundy-soft);
}

.rubric {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 14px;
}
@media (max-width: 720px) { .rubric { grid-template-columns: 1fr 1fr; } }
.rubric-item {
  text-align: left;
  font-family: inherit;
  color: var(--ink);
  background: white;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 10px 12px;
  cursor: pointer;
  font-size: 12.5px;
  transition: all 0.12s;
  display: flex; align-items: center; gap: 8px;
}
.rubric-item:hover { border-color: var(--ink-2); }
.rubric-item.checked {
  background: var(--olive-soft);
  border-color: var(--olive);
}
.rubric-check {
  width: 16px; height: 16px;
  border-radius: 4px;
  border: 1.5px solid var(--ink-3);
  display: grid; place-items: center;
  flex-shrink: 0;
}
.rubric-item.checked .rubric-check {
  background: var(--olive);
  border-color: var(--olive);
  color: white;
}
.rubric-label { font-weight: 500; color: var(--ink); }
.rubric-sub { font-size: 11px; color: var(--ink-3); }

/* ===== Compare 2-col (zero-shot vs CORE) ===== */
.compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 14px 0;
}
@media (max-width: 820px) { .compare { grid-template-columns: 1fr; } }
.compare-col {
  border: 1px solid var(--line);
  border-radius: 4px;
  overflow: hidden;
}
.compare-col-head {
  padding: 12px 16px;
  font-size: 13.5px; font-weight: 700;
  display: flex; align-items: center; justify-content: space-between;
}
.compare-col.bad .compare-col-head { background: var(--terracotta-soft); color: #6E2614; }
.compare-col.good .compare-col-head { background: var(--olive-soft); color: #3E5328; }
.compare-col-body { padding: 16px; background: white; }
.compare-col-body p { margin: 0 0 10px; font-size: 14px; line-height: 1.5; color: var(--ink-2); }
.compare-col-body p:last-child { margin-bottom: 0; }
.compare-col-body strong { color: var(--ink); }

/* ===== Timeline (plan 90 días) ===== */
.timeline {
  position: relative;
  padding-left: 32px;
  margin: 16px 0;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 11px; top: 8px; bottom: 8px;
  width: 2px; background: var(--line);
}
.tl-item { position: relative; margin-bottom: 18px; }
.tl-item:last-child { margin-bottom: 0; }
.tl-item::before {
  content: "";
  position: absolute;
  left: -28px; top: 6px;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--burgundy);
  border: 3px solid var(--paper);
  box-shadow: 0 0 0 2px var(--burgundy);
}
.tl-when {
  font-size: 12.5px; font-weight: 700; color: var(--burgundy);
  margin-bottom: 4px;
}
.tl-what { font-size: 15px; font-weight: 600; color: var(--ink); line-height: 1.3; }
.tl-why { font-size: 13.5px; color: var(--ink-2); line-height: 1.4; margin-top: 4px; }

/* ===== Final celebration ===== */
.celebration {
  text-align: center;
  padding: 56px 40px;
  background: linear-gradient(180deg, var(--burgundy) 0%, var(--burgundy-dark) 100%);
  color: var(--cream);
  border-radius: 4px;
  margin: 40px 0;
  position: relative;
  overflow: hidden;
}
.celebration-eyebrow {
  font-size: 13px; font-weight: 700;
  color: var(--gold);
  margin-bottom: 14px;
}
.celebration h2 {
  font-size: 54px; font-weight: 700; letter-spacing: -0.03em;
  line-height: 1.02; margin: 0 0 16px;
  color: var(--cream);
}
.celebration p {
  font-size: 17px; line-height: 1.5;
  max-width: 48ch; margin: 0 auto 24px;
  color: var(--cream-deep);
}
.celebration-stats {
  display: inline-flex; gap: 48px;
  margin: 20px 0 28px;
  font-variant-numeric: tabular-nums;
}
.celebration-stat { text-align: center; }
.celebration-stat .n {
  font-size: 48px; font-weight: 700; letter-spacing: -0.03em;
  color: var(--gold);
  line-height: 1;
}
.celebration-stat .l {
  font-size: 12.5px; color: var(--cream-deep);
  font-weight: 600; margin-top: 4px;
}
.celebration-quote {
  font-style: italic; font-size: 22px; line-height: 1.3;
  color: var(--cream); font-weight: 500;
  max-width: 32ch; margin: 28px auto 0;
  letter-spacing: -0.01em;
}

/* ===== Tweaks panel ===== */
.tweaks {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 300px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 4px;
  box-shadow: 0 12px 36px rgba(26, 20, 16, 0.15);
  padding: 18px 20px;
  z-index: 100;
  font-size: 13px;
}
.tweaks-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px;
}
.tweaks-title {
  font-size: 13px; font-weight: 700;

  color: var(--burgundy);
}
.tweaks-close {
  background: none; border: none; color: var(--ink-3);
  cursor: pointer; padding: 2px; line-height: 0;
}
.tweak-row { margin-bottom: 14px; }
.tweak-label {
  font-size: 11.5px; font-weight: 600; color: var(--ink-2);
  margin-bottom: 6px;
  display: block;
}
.tweak-pills { display: flex; gap: 6px; flex-wrap: wrap; }
.tweak-pill {
  padding: 5px 10px;
  border: 1px solid var(--line);
  background: white;
  border-radius: 4px;
  font: inherit;
  font-size: 11.5px;
  color: var(--ink-2);
  cursor: pointer;
  transition: all 0.12s;
}
.tweak-pill.active {
  background: var(--burgundy);
  border-color: var(--burgundy);
  color: var(--cream);
  font-weight: 500;
}
.tweak-pill:hover:not(.active) {
  background: var(--cream);
}

/* ===== Palette variants ===== */
.app.palette-marine {
  --burgundy: #1C3D5A;
  --burgundy-dark: #112839;
  --burgundy-soft: #DDE5EE;
  --gold: #D4AF5F;
  --gold-soft: #F3E6CC;
}
.app.palette-olive {
  --burgundy: #3E5328;
  --burgundy-dark: #2A391B;
  --burgundy-soft: #DFE6D3;
  --marine: #7C2D3A;
  --marine-soft: #F4E6E8;
  --gold: #B8823A;
}

/* ===== Density variants ===== */
.app.density-compact .lesson { padding: 18px 22px; margin-bottom: 14px; }
.app.density-compact .lesson-head { margin-bottom: 12px; }
.app.density-compact .lesson-title { font-size: 20px; }
.app.density-compact .main { padding: 36px 40px 100px; }

.app.density-spacious .lesson { padding: 36px 40px; margin-bottom: 28px; }
.app.density-spacious .main { padding: 64px 64px 160px; }
.app.density-spacious .lesson-title { font-size: 28px; }

/* ===== Print ===== */
@media print {
  body { background: white; }
  .header, .sidebar, .tweaks, .quiz, .exercise, .done-check, .copy-btn, .q-option, .block-nav, .llm-sim-controls { display: none !important; }
  .lesson-body a { color: inherit; }
  .app { display: block; }
  .main { padding: 0; max-width: 100%; }
  .lesson { break-inside: auto; border: 1px solid #ccc; }
  .lesson-head, .card, .callout, .compare-col, .prompt, .big-number, .llm-reveal, .agent-step, .wrap-up > * { break-inside: avoid; }
  .lesson-head { break-after: avoid; }
  .celebration { background: white !important; color: var(--ink) !important; border: 2px solid var(--burgundy); }
  .celebration h2, .celebration p, .celebration-quote { color: var(--ink) !important; }
}

/* ===== Mobile ===== */
@media (max-width: 920px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  /* La barra lateral pasa a ser una fila de bloques desplazable */
  .sidebar {
    position: static; height: auto; top: auto;
    display: flex; gap: 6px;
    overflow-x: auto; overflow-y: hidden;
    padding: 10px 12px;
    border-right: none; border-bottom: 1px solid var(--line);
  }
  .sidebar-title, .lesson-list, .block-head-meta { display: none; }
  .block-item { flex: 0 0 auto; margin: 0; }
  .block-head { width: auto; padding: 8px 10px; }
  .block-head-title { white-space: nowrap; }
  .main { padding: 32px 24px 100px; }
  .block-title { font-size: 34px; }
  .big-number { font-size: calc(var(--bn-fs, 92px) * 0.75); }
}
@media (max-width: 720px) {
  .header { flex-wrap: wrap; gap: 10px 12px; padding: 10px 16px; position: static; }
  .brand { min-width: 0; flex: 1 1 auto; }
  .header-progress { order: 3; flex-basis: 100%; }
  .header-progress-label { display: none; }
  .header-actions { flex-wrap: wrap; }
  .header-actions .btn-projector { display: none; }
  .icon-btn { height: 32px; padding: 0 9px; font-size: 12px; }
  .main { padding: 24px 14px 80px; }
  .block-header { flex-direction: column; align-items: flex-start; gap: 14px; }
  .block-title { font-size: 28px; }
  .block-lede { font-size: 15.5px; }
  .lesson { padding: 20px 16px; }
  .lesson-head { flex-wrap: wrap; gap: 12px; }
  .lesson-index { width: 32px; height: 32px; font-size: 12.5px; }
  .lesson-title { font-size: 20px; }
  .lesson-eyebrow { flex-wrap: wrap; gap: 6px; }
  .big-number { font-size: calc(var(--bn-fs, 92px) * 0.6); }
  .llm-row, .llm-reveal { grid-template-columns: minmax(0, 1fr); }
  .llm-label, .llm-reveal-num { padding: 8px 16px; border-right: none; border-bottom: 1px solid var(--cream-deep); }
  .llm-content, .llm-reveal-body { padding: 14px 16px; }
  .quiz { padding: 22px 16px; }
  .quiz-head { flex-wrap: wrap; }
  .quiz-score { margin-left: 0; }
  .wrap-up .aforismo { font-size: 22px; padding: 28px 22px; }
  .celebration { padding: 40px 18px; }
  .celebration h2 { font-size: 38px; }
  .celebration-stats { gap: 22px; flex-wrap: wrap; justify-content: center; }
  .block-nav { flex-direction: column; }
  .schema { padding: 18px 12px; }
  .schema-window .schema-box { font-size: 11px; padding: 8px; }
  .tweaks { right: 10px; left: 10px; width: auto; bottom: 10px; }
  .prompt-body { padding: 14px; font-size: 12.5px; }
}

/* ===== Pie del sitio ===== */
.site-footer {
  margin-top: 28px;
  padding-top: 16px;
  border-top: 1px solid var(--line-soft);
  display: flex; flex-wrap: wrap; gap: 8px 18px;
  align-items: center; justify-content: space-between;
  font-size: 12.5px; color: var(--ink-3);
}
.link-btn {
  background: none; border: none; padding: 0;
  font: inherit; font-size: 12.5px;
  color: var(--ink-3);
  text-decoration: underline; text-underline-offset: 2px;
  cursor: pointer;
}
.link-btn:hover { color: var(--burgundy); }
@media print { .site-footer .link-btn { display: none; } }
