/* =========================================================================
   Academia Claude Code — Estilos
   Estética de marca: Automatizaciones Digitales (suizo / brutalista tipográfico).
   Papel hueso + tinta. Azul = estructura/identidad/enlaces.
   Naranja = SOLO resultados / métricas / estado en vivo (regla de disciplina).
   ========================================================================= */

:root {
  /* Superficies — papel hueso cálido */
  --paper:     #ECE7DA;
  --paper-2:   #E3DDCC;   /* chrome (topbar / sidebar / panel profundo) */
  --paper-3:   #D9D2BF;   /* inset / tracks */
  --card:      #F4F0E6;   /* tarjetas: papel más claro para levantar sobre el fondo */

  /* Tinta / texto */
  --ink:       #16150F;
  --ink-2:     #4C4636;
  --ink-3:     #6B6552;   /* subido para pasar contraste AA en textos pequeños sobre papel */

  /* Acentos (con roles) */
  --blue:      #1F38FF;   /* AZUL — estructura / identidad / enlaces / posición actual */
  --blue-deep: #0E1FCB;
  --orange:    #FF5A1F;   /* NARANJA — resultados / métricas / estado "en vivo" */

  /* Líneas */
  --rule:      rgba(22,21,15,.16);
  --rule-2:    rgba(22,21,15,.30);
  --rule-3:    rgba(22,21,15,.52);

  /* Tintes suaves de acento */
  --blue-tint:   rgba(31,56,255,.08);
  --orange-tint: rgba(255,90,31,.12);

  /* Rail oscuro (sidebar) */
  --rail:      #1C1912;   /* fondo del menú izquierdo, café muy oscuro */
  --rail-txt:  #F1EBDC;   /* texto principal sobre el rail */
  --rail-dim:  #A39A85;   /* texto tenue sobre el rail */
  --rail-icon: #E8E2D3;   /* iconos de módulo sobre el rail */

  --radius:    8px;
  --radius-sm: 5px;
  --shadow-hard:      4px 4px 0 var(--ink);
  --shadow-hard-blue: 4px 4px 0 var(--blue);
  --shadow-soft:      0 10px 30px rgba(22,21,15,.12);

  --maxw-home:  1240px;
  --maxw-topic: 1180px;
  --measure:    780px;   /* medida de lectura cómoda */

  --font-disp: "Bricolage Grotesque", "Space Grotesk", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, sans-serif;
  --font-mono: "Space Mono", ui-monospace, "Courier New", monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Iconos de línea — heredan tamaño (1em) y color (currentColor) del contexto */
.ico { display: inline-flex; align-items: center; justify-content: center; line-height: 0; vertical-align: -.06em; }
.ico svg { width: 1em; height: 1em; display: block; }

/* Etiqueta mono reutilizable (eyebrow suizo) */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--blue);
}

/* ---------------- Layout ---------------- */
.app { display: flex; flex-direction: column; height: 100vh; overflow: hidden; }

/* Topbar */
.topbar {
  display: flex; align-items: center; gap: 22px;
  padding: 12px 26px;
  background: var(--paper-2);
  border-bottom: 1.5px solid var(--ink);
  z-index: 30;
}
.brand { display: flex; align-items: center; gap: 11px; cursor: pointer; flex-shrink: 0; }
.brand .logo {
  width: 36px; height: 36px; border-radius: 7px;
  background: var(--blue); color: #fff;
  border: 1.5px solid var(--ink);
  display: grid; place-items: center; font-size: 21px;
  box-shadow: 2px 2px 0 var(--ink);
}
/* Iconos pintados en placeholders del chrome (no usan .ico) */
[data-ico] { display: inline-flex; align-items: center; justify-content: center; }
[data-ico] svg { width: 1em; height: 1em; display: block; }
.brand .b-name { font-family: var(--font-disp); font-weight: 800; font-size: 16px; letter-spacing: -.3px; color: var(--ink); }
.brand .b-sub {
  font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .12em;
  text-transform: uppercase; color: var(--ink-3); margin-top: 1px;
}

.progress-wrap { flex: 1; min-width: 120px; max-width: 520px; }
.progress-top { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 5px; }
.progress-top .lbl { font-family: var(--font-mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); font-weight: 700; }
.progress-top .pct { font-family: var(--font-disp); font-weight: 800; font-size: 15px; color: var(--orange); }
.progress-bar { height: 10px; background: var(--paper-3); border-radius: 99px; overflow: hidden; border: 1.5px solid var(--ink); }
.progress-fill {
  height: 100%; width: 0%;
  background: var(--orange);
  transition: width .6s cubic-bezier(.4,0,.2,1);
}
.progress-meta { font-family: var(--font-mono); font-size: 10px; color: var(--ink-3); margin-top: 4px; letter-spacing: .02em; }

.stats-mini { display: flex; gap: 9px; flex-shrink: 0; }
.chip {
  display: flex; align-items: center; gap: 6px;
  background: var(--card); border: 1.5px solid var(--ink);
  padding: 6px 12px; border-radius: 99px; font-size: 13px; font-weight: 600;
  white-space: nowrap; color: var(--ink-2);
}
.chip .c-ico { font-size: 14px; }
.chip b { color: var(--orange); font-family: var(--font-disp); font-size: 14px; }

.topbar-actions { display: flex; gap: 8px; flex-shrink: 0; }
.icon-btn {
  background: var(--card); border: 1.5px solid var(--ink); color: var(--ink);
  width: 38px; height: 38px; border-radius: 8px; cursor: pointer; font-size: 16px;
  transition: transform .12s, box-shadow .12s, background .12s;
}
.icon-btn:hover { background: var(--paper); box-shadow: 2px 2px 0 var(--blue); transform: translate(-1px,-1px); }
.icon-btn:active { transform: translate(0,0); box-shadow: 0 0 0 var(--blue); }

/* Body split */
.body { display: flex; flex: 1; overflow: hidden; }

/* Sidebar — rail oscuro (separado visualmente de la sección de contenido) */
.sidebar {
  width: 304px; flex-shrink: 0; overflow-y: auto;
  background: var(--rail); border-right: 1.5px solid var(--ink);
  padding: 18px 12px 60px;
  --rail-soft: rgba(244,240,230,.06);
}
.mod-block { margin-bottom: 20px; }
.mod-head { display: flex; align-items: center; gap: 9px; padding: 4px 8px; }
.mod-emoji { font-size: 18px; color: var(--rail-icon); }
.mod-title { font-family: var(--font-disp); font-weight: 700; font-size: 14px; flex: 1; display: flex; align-items: center; gap: 6px; color: var(--rail-txt); }
.mod-badge { font-size: 14px; color: var(--orange); display: inline-flex; }
.mod-count { font-family: var(--font-mono); font-size: 10px; color: var(--rail-dim); font-weight: 700; }
.mod-bar { height: 5px; background: rgba(244,240,230,.10); border-radius: 99px; margin: 6px 8px 8px; overflow: hidden; border: 1px solid rgba(244,240,230,.12); }
.mod-bar-fill { height: 100%; background: var(--orange); border-radius: 99px; transition: width .5s; }

.topic-list { list-style: none; margin: 0; padding: 0; }
.topic-item {
  display: flex; align-items: center; gap: 9px;
  padding: 9px 10px; border-radius: var(--radius-sm); cursor: pointer;
  font-size: 13.5px; color: var(--rail-dim); transition: background .14s, color .14s; margin-bottom: 1px;
  border: 1px solid transparent;
}
.topic-item:hover { background: var(--rail-soft); color: var(--rail-txt); border-color: rgba(244,240,230,.10); }
.topic-item.active {
  background: rgba(31,56,255,.24); color: #fff; font-weight: 600;
  border-color: rgba(130,150,255,.5); box-shadow: inset 3px 0 0 var(--blue);
}
.topic-item .check { width: 16px; text-align: center; color: var(--rail-dim); font-weight: 700; font-family: var(--font-mono); display: inline-flex; justify-content: center; }
.topic-item.done .check { color: var(--orange); }
.topic-item.done .t-name { color: var(--rail-dim); }
.topic-item .t-name { flex: 1; line-height: 1.3; }
.topic-item .t-min { font-family: var(--font-mono); font-size: 10px; color: var(--rail-dim); }
.sidebar::-webkit-scrollbar-track { background: transparent; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(244,240,230,.18); border-color: var(--rail); }

/* Main */
.main { flex: 1; overflow-y: auto; padding: 44px 40px 96px; scroll-behavior: smooth; }

/* ---------------- Botones ---------------- */
.btn-primary {
  background: var(--blue); color: #fff; border: 1.5px solid var(--ink);
  border-radius: 9px; padding: 12px 24px;
  font-family: var(--font-disp); font-weight: 700; font-size: 15px; cursor: pointer;
  box-shadow: var(--shadow-hard); transition: transform .12s, box-shadow .12s;
}
.btn-primary:hover { transform: translate(-2px,-2px); box-shadow: 6px 6px 0 var(--ink); }
.btn-primary:active { transform: translate(0,0); box-shadow: 1px 1px 0 var(--ink); }
.btn-primary.big { padding: 15px 32px; font-size: 17px; }

.btn-ghost {
  background: var(--card); color: var(--ink); border: 1.5px solid var(--ink);
  border-radius: 9px; padding: 11px 20px; font-family: var(--font-disp); font-weight: 600;
  font-size: 14px; cursor: pointer; transition: transform .12s, box-shadow .12s, background .12s;
}
.btn-ghost:hover { transform: translate(-2px,-2px); box-shadow: var(--shadow-hard-blue); background: var(--paper); }
.btn-ghost:active { transform: translate(0,0); box-shadow: 1px 1px 0 var(--blue); }

/* ---------------- Home ---------------- */
.home { max-width: var(--maxw-home); margin: 0 auto; }
.hero {
  border: 1.5px solid var(--ink); border-radius: 14px; background: var(--card);
  padding: 32px 40px 26px; box-shadow: var(--shadow-hard);
}
.hero-main { min-width: 0; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 7px; width: fit-content;
  font-family: var(--font-mono); font-size: 10.5px; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--blue);
  background: var(--blue-tint); border: 1.5px solid rgba(31,56,255,.4);
  padding: 5px 12px; border-radius: 99px; margin-bottom: 14px;
}
.hero-badge .ico { font-size: 13px; color: var(--orange); }
.hero h1 { font-family: var(--font-disp); font-size: clamp(30px, 4.6vw, 50px); font-weight: 800; margin: 0 0 8px; letter-spacing: -1.2px; line-height: 1.02; color: var(--ink); max-width: 22ch; }
.hero .tagline { font-family: var(--font-disp); font-size: 18px; color: var(--blue); font-weight: 700; margin: 0 0 12px; }
.hero .lead { color: var(--ink-2); font-size: 16px; line-height: 1.55; max-width: 76ch; margin: 0 0 22px; }
.hero .btn-primary { width: fit-content; }

/* Tira de stats a todo el ancho del hero, con números grandes */
.hero-stats {
  display: grid; grid-template-columns: repeat(4, 1fr);
  margin-top: 24px; border-top: 1.5px solid var(--rule);
}
.hero-stat { padding: 18px 26px; border-left: 1.5px solid var(--rule); }
.hero-stat:first-child { border-left: none; padding-left: 0; }
.hero-stat b { font-family: var(--font-disp); font-weight: 800; font-size: clamp(34px, 4vw, 48px); color: var(--orange); line-height: 1; display: block; }
.hero-stat span { font-family: var(--font-mono); font-size: 11px; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-3); margin-top: 9px; display: block; }

.section-h {
  font-family: var(--font-disp); font-size: 24px; margin: 34px 0 14px; letter-spacing: -.6px; color: var(--ink);
  display: flex; align-items: baseline; gap: 12px;
}
.section-h::before {
  content: "//"; font-family: var(--font-mono); font-size: 16px; color: var(--blue); font-weight: 700; letter-spacing: 0;
}

/* ---------------- Cinta (ticker) de fichas con flip ---------------- */
.features { margin: 16px 0 6px; }
.ticker {
  position: relative; overflow: hidden; padding: 16px 0;
  border-top: 1.5px solid var(--rule); border-bottom: 1.5px solid var(--rule);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent);
}
.ticker-track { display: flex; width: max-content; animation: ticker 34s linear infinite; transform-style: preserve-3d; }
.ticker:hover .ticker-track,
.ticker-track.locked { animation-play-state: paused; }
@keyframes ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }

.flip-card { flex: 0 0 280px; height: 190px; margin-right: 16px; perspective: 1200px; cursor: pointer; }
.flip-inner {
  position: relative; width: 100%; height: 100%;
  transition: transform .55s cubic-bezier(.4,0,.2,1); transform-style: preserve-3d;
}
.flip-card.flipped .flip-inner { transform: rotateY(180deg); }
.flip-front, .flip-back {
  position: absolute; inset: 0; -webkit-backface-visibility: hidden; backface-visibility: hidden;
  border: 1.5px solid var(--ink); border-radius: 12px; overflow: hidden;
  display: flex; flex-direction: column;
}
.flip-front { background: var(--card); box-shadow: var(--shadow-hard); }
.flip-card:hover .flip-front { box-shadow: var(--shadow-hard-blue); }
.flip-back { background: var(--ink); transform: rotateY(180deg); box-shadow: var(--shadow-hard-blue); justify-content: center; padding: 18px; }

.fc-media { position: relative; height: 98px; flex-shrink: 0; border-bottom: 1.5px solid var(--ink); }
.fc-art { width: 100%; height: 100%; display: block; }
.fc-num { font-family: var(--font-mono); font-size: 10px; font-weight: 700; color: #fff; position: absolute; top: 8px; right: 11px; letter-spacing: .05em; text-shadow: 0 1px 3px rgba(0,0,0,.55); }
.fc-body { display: flex; flex-direction: column; flex: 1; padding: 13px 16px 14px; }
.fc-body h4 { font-family: var(--font-disp); font-size: 17px; margin: 0; color: var(--ink); line-height: 1.12; }
.fc-hint { margin-top: auto; font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--blue); display: inline-flex; align-items: center; gap: 6px; }
.flip-back .fc-tag { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--orange); margin-bottom: 8px; }
.flip-back p { margin: 0; font-size: 12.8px; line-height: 1.45; color: rgba(244,240,230,.92); }
.ticker-hint { font-family: var(--font-mono); font-size: 10px; letter-spacing: .03em; color: var(--ink-3); margin: 12px 0 0; text-align: center; }

.net-box {
  display: flex; gap: 18px; align-items: flex-start;
  background: var(--blue); color: #fff;
  border: 1.5px solid var(--ink); border-radius: 12px; padding: 24px 26px; margin: 30px 0;
  box-shadow: var(--shadow-hard);
}
.net-box .net-ico { font-size: 30px; color: #fff; flex-shrink: 0; }
.net-box strong { font-family: var(--font-disp); font-size: 17px; color: #fff; }
.net-box p { margin: 6px 0 0; color: rgba(255,255,255,.88); font-size: 14.5px; }

.route-intro { color: var(--ink-2); font-size: 15.5px; margin: -4px 0 20px; max-width: 72ch; }
.module-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(335px, 1fr)); gap: 18px; }
.module-card {
  background: var(--card); border: 1.5px solid var(--ink); border-radius: 14px;
  padding: 26px 24px 20px; cursor: pointer; transition: transform .16s, box-shadow .16s;
  position: relative; overflow: hidden; display: flex; flex-direction: column;
}
.module-card::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 6px; background: var(--blue);
}
.module-card.complete::before { background: var(--orange); }
.module-card:hover { transform: translate(-4px,-4px); box-shadow: 7px 7px 0 var(--blue); }
.module-card.complete:hover { box-shadow: 7px 7px 0 var(--orange); }
.mc-top { display: flex; align-items: center; gap: 12px; margin-bottom: 15px; }
.mc-index { font-family: var(--font-mono); font-weight: 700; font-size: 16px; color: var(--ink-3); letter-spacing: .02em; }
.mc-emoji {
  font-size: 25px; color: var(--blue); width: 46px; height: 46px; flex-shrink: 0;
  border: 1.5px solid var(--ink); border-radius: 11px; display: grid; place-items: center; background: var(--blue-tint);
}
.mc-prog { margin-left: auto; font-family: var(--font-mono); font-size: 11px; color: var(--ink-2); font-weight: 700; background: var(--paper-2); border: 1.5px solid var(--ink); padding: 4px 11px; border-radius: 99px; }
.mc-done { margin-left: auto; font-family: var(--font-mono); font-size: 11px; color: var(--orange); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; display: inline-flex; align-items: center; gap: 5px; }
.module-card h3 { font-family: var(--font-disp); margin: 0 0 6px; font-size: 21px; color: var(--ink); letter-spacing: -.4px; }
.module-card p { margin: 0 0 16px; color: var(--ink-2); font-size: 14px; line-height: 1.5; flex: 1; }
.mc-bar { height: 6px; background: var(--paper-3); border: 1px solid var(--rule-2); border-radius: 99px; overflow: hidden; margin-bottom: 14px; }
.mc-bar-fill { height: 100%; background: var(--orange); border-radius: 99px; transition: width .5s; }
.mc-foot { display: flex; justify-content: space-between; align-items: center; font-family: var(--font-mono); font-size: 11px; color: var(--ink-3); letter-spacing: .03em; border-top: 1.5px solid var(--rule); padding-top: 13px; }
.mc-go { color: var(--blue); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; display: inline-flex; align-items: center; gap: 5px; }
.module-card.complete .mc-go { color: var(--orange); }
.mc-go .ico { font-size: 14px; transition: transform .16s; }
.module-card:hover .mc-go .ico { transform: translateX(3px); }

/* ---------------- ¿Para quién es? + requisitos ---------------- */
.audience-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(215px, 1fr)); gap: 14px; }
.aud-card { background: var(--card); border: 1.5px solid var(--ink); border-radius: 12px; padding: 22px; transition: transform .14s, box-shadow .14s; }
.aud-card:hover { transform: translate(-2px,-2px); box-shadow: var(--shadow-hard); }
.aud-ico { width: 44px; height: 44px; border: 1.5px solid var(--ink); border-radius: 10px; display: grid; place-items: center; font-size: 22px; color: var(--blue); background: var(--blue-tint); margin-bottom: 14px; }
.aud-card h4 { font-family: var(--font-disp); font-size: 17px; margin: 0 0 7px; color: var(--ink); }
.aud-card p { margin: 0; color: var(--ink-2); font-size: 14px; line-height: 1.55; }

.prereq {
  margin-top: 16px; display: grid; grid-template-columns: 250px 1fr; gap: 30px;
  background: var(--card); border: 1.5px solid var(--ink); border-radius: 12px;
  padding: 26px 28px; box-shadow: var(--shadow-hard);
}
.prereq-aside .eyebrow { display: block; margin-bottom: 8px; }
.prereq-aside h3 { font-family: var(--font-disp); font-size: 20px; margin: 0 0 8px; color: var(--ink); letter-spacing: -.4px; }
.prereq-aside p { margin: 0; color: var(--ink-2); font-size: 14px; }
.prereq-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(258px, 1fr)); gap: 13px 26px; align-content: start; }
.prereq-list li { display: flex; gap: 11px; align-items: flex-start; font-size: 14.5px; color: var(--ink-2); line-height: 1.5; }
.prereq-list li .ico { color: var(--orange); flex-shrink: 0; font-size: 18px; margin-top: 2px; }

/* ---------------- Tema (layout 2 columnas: lectura + rail) ---------------- */
.topic-view {
  display: grid; grid-template-columns: minmax(0, 1fr) 296px; gap: 48px;
  max-width: var(--maxw-topic); margin: 0 auto; align-items: start;
}
.topic-doc { min-width: 0; max-width: var(--measure); }

.crumb { font-family: var(--font-mono); font-size: 11px; color: var(--ink-3); margin-bottom: 14px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.crumb .sep { margin: 0 6px; color: var(--blue); }
.topic-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 26px; padding-bottom: 22px; border-bottom: 1.5px solid var(--ink); }
.topic-head h1 { font-family: var(--font-disp); font-size: clamp(28px, 4vw, 38px); font-weight: 800; margin: 0; letter-spacing: -1px; line-height: 1.08; color: var(--ink); }
.topic-meta { display: flex; gap: 8px; flex-shrink: 0; flex-wrap: wrap; }
.pill { font-family: var(--font-mono); font-size: 11px; font-weight: 700; padding: 6px 11px; border-radius: 99px; background: var(--card); border: 1.5px solid var(--ink); color: var(--ink-2); white-space: nowrap; letter-spacing: .03em; }
.pill.ok { color: var(--orange); border-color: var(--orange); background: var(--orange-tint); }
.pill.todo { color: var(--blue); border-color: var(--blue); background: var(--blue-tint); }

/* Lección */
.lesson { font-size: 16.5px; color: var(--ink); line-height: 1.7; }
.lesson p { margin: 0 0 18px; color: var(--ink-2); }
.lesson ul { margin: 0 0 18px; padding-left: 22px; }
.lesson li { margin-bottom: 8px; color: var(--ink-2); }
.lesson strong { color: var(--ink); font-weight: 700; }
.lesson em { color: var(--ink); font-style: normal; font-weight: 600; }
.lesson h2, .lesson h3 { font-family: var(--font-disp); color: var(--ink); letter-spacing: -.4px; margin: 28px 0 12px; }
.lesson code {
  background: var(--paper-2); border: 1px solid var(--rule-2); border-radius: 5px;
  padding: 1px 7px; font-family: var(--font-mono); font-size: 13px; color: var(--blue-deep);
}
.callout {
  display: flex; gap: 14px; align-items: flex-start;
  border-radius: 10px; padding: 17px 19px; margin: 0 0 18px;
  border: 1.5px solid var(--ink); background: var(--card);
}
.callout .ico { font-size: 22px; flex-shrink: 0; line-height: 1.3; }
.callout div { font-size: 14.5px; color: var(--ink-2); }
.callout strong { color: var(--ink); }
.callout.metaphor { border-left: 5px solid var(--blue); }
.callout.case { border-left: 5px solid var(--ink); }
.callout.tip { border-left: 5px solid var(--orange); }

/* Quiz */
.quiz { margin-top: 36px; border-top: 1.5px dashed var(--rule-3); padding-top: 30px; }
.quiz-head { display: flex; gap: 13px; align-items: flex-start; margin-bottom: 22px; }
.quiz-head .q-ico { font-size: 24px; }
.quiz-head strong { font-family: var(--font-disp); font-size: 19px; color: var(--ink); }
.q-sub { margin: 5px 0 0; font-size: 13.5px; color: var(--ink-3); }
.q-block { margin-bottom: 26px; }
.q-text { font-weight: 600; font-size: 15.5px; margin-bottom: 13px; color: var(--ink); }
.q-num { color: var(--blue); font-family: var(--font-mono); font-weight: 700; margin-right: 6px; }
.q-opts { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 10px; }
.q-opt {
  text-align: left; background: var(--card); border: 1.5px solid var(--ink);
  color: var(--ink); border-radius: 8px; padding: 13px 16px;
  font-size: 14.5px; cursor: pointer; transition: transform .12s, box-shadow .12s, background .12s; font-family: var(--font-body);
}
.q-opt:hover { transform: translate(-2px,-2px); box-shadow: var(--shadow-hard-blue); background: var(--paper); }
.q-opt.correct { border-color: var(--orange); background: var(--orange-tint); color: var(--ink); box-shadow: 2px 2px 0 var(--orange); transform: none; }
.q-opt.wrong { border-color: var(--rule-2); background: var(--paper-2); color: var(--ink-3); text-decoration: line-through; opacity: .8; box-shadow: none; transform: none; }
.q-feedback { display: none; margin-top: 11px; font-size: 13.5px; padding: 13px 15px; border-radius: 8px; line-height: 1.55; }
.q-feedback.show { display: block; }
.q-feedback.good { background: var(--orange-tint); border: 1.5px solid var(--orange); color: var(--ink-2); }
.q-feedback.bad { background: var(--card); border: 1.5px solid var(--rule-2); color: var(--ink-2); }
.q-feedback strong { color: var(--ink); }
.q-feedback.good .ico { color: var(--orange); margin-right: 4px; }
.q-feedback.bad .ico { color: var(--ink-2); margin-right: 4px; }
.quiz-result.ok .ico { color: var(--orange); margin-right: 4px; }
.quiz-result.retry .ico { color: var(--blue); margin-right: 4px; }

.quiz-result { border-radius: 10px; padding: 18px 20px; font-size: 15px; margin-top: 10px; border: 1.5px solid var(--ink); }
.quiz-result.ok { background: var(--orange-tint); box-shadow: var(--shadow-hard); }
.quiz-result.ok strong { color: var(--ink); }
.quiz-result.retry { background: var(--blue-tint); color: var(--ink-2); border-color: var(--blue); }
.qr-actions { margin-top: 14px; }

/* Laboratorio práctico */
.lab-box {
  margin-top: 30px; background: var(--card);
  border: 1.5px solid var(--ink); border-left: 6px solid var(--orange);
  border-radius: 10px; padding: 22px 24px;
}
.lab-head { font-family: var(--font-disp); font-weight: 700; font-size: 17px; margin-bottom: 9px; color: var(--ink); }
.lab-body { color: var(--ink-2); font-size: 14.5px; }
.lab-body ol { margin: 8px 0 0; padding-left: 22px; }
.lab-body li { margin-bottom: 8px; }
.lab-body strong { color: var(--ink); }
.lab-body code { background: var(--paper-2); border: 1px solid var(--rule-2); border-radius: 5px; padding: 1px 7px; font-family: var(--font-mono); font-size: 12.5px; color: var(--blue-deep); }
.lab-body em { color: var(--ink); font-style: normal; font-weight: 600; }

/* Reto colaborativo */
.reto-colab {
  margin-top: 22px; background: var(--blue); color: #fff;
  border: 1.5px solid var(--ink); border-radius: 10px; padding: 22px 24px;
  box-shadow: var(--shadow-hard);
}
.rc-head { font-family: var(--font-disp); font-weight: 700; font-size: 17px; margin-bottom: 7px; color: #fff; }
.reto-colab p { margin: 0; color: rgba(255,255,255,.9); font-size: 14.5px; }

.topic-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 40px; padding-top: 24px; border-top: 1.5px solid var(--rule); }

/* ---------------- Rail contextual del tema ---------------- */
.topic-rail { position: sticky; top: 8px; display: flex; flex-direction: column; gap: 16px; }
.rail-card { background: var(--card); border: 1.5px solid var(--ink); border-radius: 12px; padding: 16px 17px; }
.rail-card .eyebrow { display: block; margin-bottom: 12px; }
.rail-modbar { height: 6px; background: var(--paper-3); border: 1px solid var(--rule-2); border-radius: 99px; overflow: hidden; margin: 0 0 4px; }
.rail-modbar-fill { height: 100%; background: var(--orange); border-radius: 99px; transition: width .5s; }
.rail-modmeta { font-family: var(--font-mono); font-size: 10px; color: var(--ink-3); letter-spacing: .04em; margin-bottom: 14px; }
.rail-steps { display: flex; flex-direction: column; gap: 2px; }
.rail-step {
  display: flex; align-items: center; gap: 9px; padding: 8px 9px; border-radius: 6px;
  cursor: pointer; font-size: 13px; color: var(--ink-2); border: 1px solid transparent; transition: background .14s;
}
.rail-step:hover { background: var(--paper); border-color: var(--rule); color: var(--ink); }
.rail-step.active { background: var(--blue-tint); border-color: rgba(31,56,255,.3); color: var(--ink); font-weight: 600; box-shadow: inset 3px 0 0 var(--blue); }
.rail-step .rs-check { width: 15px; text-align: center; font-family: var(--font-mono); font-weight: 700; color: var(--ink-3); }
.rail-step.done .rs-check { color: var(--orange); }
.rail-step .rs-name { flex: 1; line-height: 1.25; }
.rail-next { font-size: 13px; color: var(--ink-2); }
.rail-next b { display: block; font-family: var(--font-disp); font-size: 14.5px; color: var(--ink); margin-top: 4px; }
.rail-card.accent { background: var(--blue); color: #fff; }
.rail-card.accent .eyebrow { color: rgba(255,255,255,.7); }
.rail-card.accent p { margin: 0 0 14px; font-size: 13px; color: rgba(255,255,255,.9); }
.rail-share {
  width: 100%; background: #fff; color: var(--blue); border: 1.5px solid var(--ink);
  border-radius: 8px; padding: 10px 14px; font-family: var(--font-disp); font-weight: 700; font-size: 13.5px;
  cursor: pointer; box-shadow: 3px 3px 0 var(--ink); transition: transform .12s, box-shadow .12s;
}
.rail-share:hover { transform: translate(-2px,-2px); box-shadow: 5px 5px 0 var(--ink); }
.rail-share:active { transform: translate(0,0); box-shadow: 1px 1px 0 var(--ink); }

/* ---------------- Finish ---------------- */
.finish { max-width: 680px; margin: 30px auto 0; text-align: center; }
.grad { font-size: 66px; margin-bottom: 8px; }
.finish h1 { font-family: var(--font-disp); font-size: 38px; font-weight: 800; margin: 0 0 12px; letter-spacing: -1px; color: var(--ink); }
.finish .lead { color: var(--ink-2); font-size: 16px; margin-bottom: 24px; }
.grad-stats { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-bottom: 26px; }
.grad-stats span { background: var(--card); border: 1.5px solid var(--ink); padding: 10px 18px; border-radius: 99px; font-family: var(--font-mono); font-weight: 700; font-size: 13px; color: var(--orange); }
.share-box { background: var(--card); border: 1.5px solid var(--ink); border-radius: 12px; padding: 28px; margin-top: 30px; box-shadow: var(--shadow-hard); }
.share-box h3 { font-family: var(--font-disp); margin: 0 0 8px; color: var(--ink); }
.share-box p { color: var(--ink-2); font-size: 14.5px; margin: 0 0 16px; }

/* ---------------- Autenticación ---------------- */
.topbar-auth { flex-shrink: 0; }
.auth-btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--ink); color: var(--paper); border: 1.5px solid var(--ink);
  border-radius: 9px; padding: 8px 14px; font-family: var(--font-disp); font-weight: 700;
  font-size: 13.5px; cursor: pointer; box-shadow: 2px 2px 0 var(--blue);
  transition: transform .12s, box-shadow .12s;
}
.auth-btn:hover { transform: translate(-1px,-1px); box-shadow: 3px 3px 0 var(--blue); }
.auth-btn:active { transform: translate(0,0); box-shadow: 1px 1px 0 var(--blue); }
.auth-btn .ai-ico { font-size: 16px; display: inline-flex; }
.auth-avatar {
  width: 38px; height: 38px; border-radius: 99px; border: 1.5px solid var(--ink);
  background: var(--blue); color: #fff; display: grid; place-items: center;
  font-family: var(--font-disp); font-weight: 800; font-size: 15px; cursor: pointer; overflow: hidden;
  box-shadow: 2px 2px 0 var(--ink); transition: transform .12s, box-shadow .12s;
}
.auth-avatar:hover { transform: translate(-1px,-1px); box-shadow: 3px 3px 0 var(--ink); }
.auth-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Gate (pantalla de acceso a las lecciones) */
.gate { max-width: 540px; margin: 36px auto 0; text-align: center; }
.gate-card { background: var(--card); border: 1.5px solid var(--ink); border-radius: 16px; padding: 40px 36px; box-shadow: var(--shadow-hard); }
.gate-ico { width: 62px; height: 62px; margin: 0 auto 18px; border: 1.5px solid var(--ink); border-radius: 15px; display: grid; place-items: center; font-size: 30px; color: var(--blue); background: var(--blue-tint); }
.gate.denied .gate-ico { color: var(--orange); background: var(--orange-tint); border-color: var(--orange); }
.gate h1 { font-family: var(--font-disp); font-size: 27px; margin: 0 0 10px; color: var(--ink); letter-spacing: -.6px; line-height: 1.1; }
.gate p { color: var(--ink-2); font-size: 15px; margin: 0 0 24px; line-height: 1.55; }
.gate-email { font-family: var(--font-mono); color: var(--ink); font-weight: 700; }
.gbtn {
  display: inline-flex; align-items: center; gap: 10px; background: #fff; color: #3c4043;
  border: 1.5px solid var(--ink); border-radius: 10px; padding: 12px 22px;
  font-family: var(--font-disp); font-weight: 700; font-size: 15px; cursor: pointer;
  box-shadow: var(--shadow-hard); transition: transform .12s, box-shadow .12s;
}
.gbtn:hover { transform: translate(-2px,-2px); box-shadow: 6px 6px 0 var(--ink); }
.gbtn:active { transform: translate(0,0); box-shadow: 1px 1px 0 var(--ink); }
.gbtn svg { width: 20px; height: 20px; flex-shrink: 0; }
.gate-alt { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; align-items: center; }
.gate-back { margin-top: 18px; }
.gate-back button { background: none; border: none; color: var(--blue); font-family: var(--font-mono); font-size: 12px; cursor: pointer; text-transform: uppercase; letter-spacing: .06em; }

/* ---------------- Toast + confeti ---------------- */
.toast {
  position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--ink); border: 1.5px solid var(--ink); color: var(--paper);
  padding: 13px 22px; border-radius: 10px; font-weight: 600; font-size: 14px;
  box-shadow: var(--shadow-hard-blue); opacity: 0; pointer-events: none; transition: all .3s; z-index: 100;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast .ico { color: var(--orange); margin-right: 5px; vertical-align: -.12em; }
.confetti-layer { position: fixed; inset: 0; pointer-events: none; z-index: 90; overflow: hidden; }
.confetti {
  position: absolute; top: -16px; width: 10px; height: 14px; border-radius: 2px;
  animation: fall 1.8s ease-in forwards;
}
@keyframes fall {
  0% { transform: translateY(0) rotate(0); opacity: 1; }
  100% { transform: translateY(105vh) rotate(540deg); opacity: 0; }
}

/* ---------------- Responsive ---------------- */
@media (max-width: 1080px) {
  .topic-view { grid-template-columns: 1fr; gap: 0; }
  .topic-doc { max-width: var(--measure); margin: 0 auto; }
  .topic-rail { display: none; }
}
@media (max-width: 860px) {
  .main { padding: 28px 18px 90px; }
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; z-index: 25; transform: translateX(-100%); transition: transform .25s; padding-top: 80px; box-shadow: var(--shadow-soft); }
  .sidebar.open { transform: translateX(0); }
  .hero { padding: 26px 22px 18px; }
  .hero-stat { padding: 16px 18px; }
  .prereq { grid-template-columns: 1fr; gap: 18px; padding: 22px 20px; }
  .topic-head { flex-direction: column; }
  .stats-mini { display: none; }
  .progress-wrap { max-width: none; }
  .menu-btn { display: grid !important; }
}
@media (max-width: 560px) {
  .hero-stats { grid-template-columns: repeat(2, 1fr); }
  .hero-stat { padding: 16px 14px; }
  .hero-stat:nth-child(odd) { border-left: none; padding-left: 0; }
  .hero-stat:nth-child(2) { border-left: 1.5px solid var(--rule); }
  .hero-stat:nth-child(n+3) { border-top: 1.5px solid var(--rule); }
  .hero-stat b { font-size: 38px; }
  /* Topbar compacto: el progreso vive en el hero, aquí dejamos marca + acciones */
  .topbar { gap: 10px; padding: 10px 14px; }
  .brand { flex: 1; min-width: 0; }
  .brand .b-sub { display: none; }
  .brand .b-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .progress-wrap { display: none; }
  .topbar-auth .ai-txt { display: none; }
  .topbar-auth .auth-btn { padding: 8px 10px; }
}
.menu-btn { display: none; }

/* Scrollbar */
::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-track { background: var(--paper-2); }
::-webkit-scrollbar-thumb { background: var(--rule-2); border-radius: 99px; border: 2px solid var(--paper-2); }
::-webkit-scrollbar-thumb:hover { background: var(--rule-3); }

/* Color de iconos según contexto */
.crumb .ico { font-size: 13px; color: var(--blue); vertical-align: -.12em; margin-right: 2px; }
.quiz-head .q-ico { color: var(--blue); }
.lab-head .ico { color: var(--orange); margin-right: 6px; }
.rc-head .ico { color: #fff; margin-right: 6px; }
.share-box h3 .ico { color: var(--blue); margin-right: 6px; }
.grad { color: var(--blue); }
.grad .ico { font-size: 64px; }
.pill .ico, .mc-done .ico, .hero-badge .ico, .fc-hint .ico, .rail-next .ico { vertical-align: -.12em; }

/* ---------------- Ilustración de lección (diagrama duotono) ---------------- */
.lesson-fig {
  margin: 6px 0 22px; border: 1.5px solid var(--ink); border-radius: 10px;
  background: var(--card); overflow: hidden;
}
.lesson-fig .lf-art { width: 100%; height: auto; display: block; }

/* Lead + frase-tesis dentro de la lección (ritmo de lectura) */
.lesson > p:first-of-type { font-size: 17.5px; color: var(--ink); }
.lesson .pull {
  margin: 0 0 18px; padding: 2px 0 2px 18px; border-left: 5px solid var(--blue);
  font-family: var(--font-disp); font-weight: 600; font-size: 19px; line-height: 1.35; color: var(--ink);
}

/* ---------------- Mapa de ruta (home) ---------------- */
.roadmap { display: flex; align-items: center; gap: 0; margin: 2px 0 26px; flex-wrap: wrap; }
.rm-node { display: flex; flex-direction: column; align-items: center; gap: 6px; flex-shrink: 0; }
.rm-dot {
  width: 42px; height: 42px; border: 1.5px solid var(--ink); border-radius: 11px;
  display: grid; place-items: center; background: var(--card); color: var(--ink-3); font-size: 19px;
}
.rm-node.current .rm-dot { background: var(--blue); border-color: var(--blue); color: #fff; }
.rm-node.done .rm-dot { background: var(--orange); border-color: var(--orange); color: #fff; }
.rm-lbl { font-family: var(--font-mono); font-size: 10px; color: var(--ink-3); font-weight: 700; }
.rm-link { flex: 1 1 18px; min-width: 16px; height: 2.5px; background: var(--rule-2); border-radius: 99px; margin: 0 5px 18px; }
.rm-link.done { background: var(--orange); }

/* ---------------- Diploma de graduación ---------------- */
.diploma-wrap {
  max-width: 720px; margin: 8px auto 18px; border: 1.5px solid var(--ink);
  border-radius: 10px; overflow: hidden; box-shadow: var(--shadow-hard);
}
.diploma-wrap svg { width: 100%; height: auto; display: block; }
.diploma-actions { margin: 0 0 10px; }

/* ---------------- Micro-interacciones / estados ---------------- */
.btn-primary.pulse { animation: btnpulse 2.2s ease-in-out infinite; }
@keyframes btnpulse {
  0%, 100% { box-shadow: var(--shadow-hard); }
  50% { box-shadow: 4px 4px 0 var(--ink), 0 0 0 6px rgba(31,56,255,.16); }
}
.gate-ico.pulsing { animation: gatepulse 1.6s ease-in-out infinite; }
@keyframes gatepulse { 0%,100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.06); opacity: .78; } }
.q-feedback.show { animation: fbIn .24s ease; }
@keyframes fbIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* ---------------- Movimiento reducido (accesibilidad) ---------------- */
@media (prefers-reduced-motion: reduce) {
  .ticker-track { animation: none !important; }
  .btn-primary.pulse, .gate-ico.pulsing, .q-feedback.show, .confetti { animation: none !important; }
  html, .main { scroll-behavior: auto !important; }
}

/* Foco accesible */
:focus-visible { outline: 2.5px solid var(--blue); outline-offset: 2px; }

/* ---------------- Venta: precios (home) ---------------- */
.pricing {
  margin: 40px 0 8px; display: grid; grid-template-columns: minmax(0, 1fr) 440px; gap: 36px;
  align-items: start; scroll-margin-top: 90px;
}
.pricing-aside .eyebrow { display: block; margin-bottom: 10px; }
.pricing-aside h2 {
  font-family: var(--font-disp); font-size: 30px; letter-spacing: -.8px;
  margin: 0 0 8px; color: var(--ink); line-height: 1.08;
}
.pricing-aside .lead { color: var(--ink-2); font-size: 16px; line-height: 1.55; margin: 0 0 18px; max-width: 56ch; }
.price-includes { list-style: none; margin: 0; padding: 0; display: grid; gap: 11px; }
.price-includes li { display: flex; gap: 11px; align-items: flex-start; font-size: 15px; color: var(--ink); line-height: 1.4; }
.price-includes .ico { color: var(--orange); flex-shrink: 0; margin-top: 1px; }

.price-card {
  background: var(--card); border: 1.5px solid var(--ink); border-radius: 16px;
  padding: 34px 34px 30px; box-shadow: var(--shadow-hard); position: sticky; top: 24px;
}
.pc-badge {
  display: inline-flex; align-items: center; gap: 6px; background: var(--orange-tint);
  color: var(--orange); border: 1.5px solid var(--orange); border-radius: 99px;
  padding: 5px 12px; font-family: var(--font-mono); font-size: 11px; font-weight: 700;
  letter-spacing: .04em; text-transform: uppercase; margin-bottom: 16px;
}
.pc-badge .ico { width: 13px; height: 13px; }
.pc-price { margin: 2px 0 7px; }
.pc-now { font-family: var(--font-disp); font-weight: 800; font-size: 80px; letter-spacing: -2.5px; color: var(--orange); line-height: .9; display: inline-flex; align-items: flex-start; }
.pc-cur { font-size: .4em; font-weight: 700; letter-spacing: 0; margin: .12em 5px 0 0; }
.pc-sub { font-family: var(--font-mono); font-size: 12px; font-weight: 600; letter-spacing: .02em; color: var(--ink-2); margin: 0 0 20px; }
.pc-sub s { color: var(--ink-3); text-decoration-thickness: 1.5px; }
.price-card .btn-primary.big { width: 100%; justify-content: center; }
.pc-note { display: flex; gap: 9px; align-items: flex-start; font-size: 13px; line-height: 1.45; margin: 14px 0 0; color: var(--ink-2); }
.pc-note .ico { flex-shrink: 0; margin-top: 1px; width: 15px; height: 15px; }
.pc-urgency { color: var(--ink-2); }
.pc-urgency .ico { color: var(--orange); }
.pc-guarantee .ico { color: var(--blue); }
.pc-pay {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  margin-top: 18px; padding-top: 16px; border-top: 1.5px solid var(--rule);
  font-family: var(--font-mono); font-size: 11px; color: var(--ink-3); letter-spacing: .02em;
}
.pc-pay .ico { width: 13px; height: 13px; }

/* ---------------- FAQ (home) ---------------- */
.faq { display: grid; gap: 0; border: 1.5px solid var(--ink); border-radius: 12px; overflow: hidden; background: var(--card); box-shadow: var(--shadow-hard); }
.faq-item { border-bottom: 1.5px solid var(--rule); }
.faq-item:last-child { border-bottom: none; }
.faq-item summary {
  list-style: none; cursor: pointer; padding: 17px 22px; display: flex; align-items: center;
  justify-content: space-between; gap: 16px; font-family: var(--font-disp); font-weight: 700;
  font-size: 16px; color: var(--ink); letter-spacing: -.2px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:hover { background: var(--paper); }
.faq-chev { display: inline-flex; color: var(--blue); transition: transform .2s ease; flex-shrink: 0; }
.faq-chev .ico { transform: rotate(90deg); }
.faq-item[open] .faq-chev { transform: rotate(-90deg); }
.faq-a { padding: 0 22px 18px; }
.faq-a p { margin: 0; color: var(--ink-2); font-size: 15px; line-height: 1.6; max-width: 72ch; }

@media (max-width: 860px) {
  .pricing { grid-template-columns: 1fr; gap: 22px; }
  .price-card { position: static; }
  .pricing-aside h2 { font-size: 25px; }
  .pc-now { font-size: 60px; }
}
@media (prefers-reduced-motion: reduce) {
  .faq-chev { transition: none; }
}

/* ---------------- Admin: gestor de invitaciones ---------------- */
.admin { max-width: 760px; margin: 0 auto; }
.admin-head { margin-bottom: 22px; }
.admin-head .eyebrow { display: block; margin-bottom: 10px; }
.admin-head h1 { font-family: var(--font-disp); font-size: 34px; letter-spacing: -1px; margin: 0 0 8px; color: var(--ink); }
.admin-head .lead { color: var(--ink-2); font-size: 16px; line-height: 1.55; margin: 0; max-width: 64ch; }

.admin-add { display: flex; gap: 10px; flex-wrap: wrap; align-items: stretch; }
.admin-input {
  flex: 1 1 220px; min-width: 0; font-family: var(--font-body); font-size: 15px; color: var(--ink);
  background: var(--card); border: 1.5px solid var(--ink); border-radius: 10px; padding: 12px 14px;
}
.admin-input::placeholder { color: var(--ink-3); }
.admin-input:focus { outline: none; box-shadow: var(--shadow-hard-blue); transform: translate(-1px,-1px); }
.admin-note { flex: 1 1 180px; }
.admin-add .btn-primary { flex: 0 0 auto; }

.admin-msg { min-height: 20px; margin: 12px 0 0; font-size: 14px; font-family: var(--font-mono); }
.admin-msg.ok { color: var(--blue); }
.admin-msg.err { color: var(--orange); }

.admin-list-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.admin-count { font-family: var(--font-mono); font-size: 12px; font-weight: 700; color: var(--ink-3); letter-spacing: .03em; }
.admin-list { display: grid; gap: 0; border: 1.5px solid var(--ink); border-radius: 12px; overflow: hidden; background: var(--card); box-shadow: var(--shadow-hard); }
.admin-loading { padding: 22px; font-family: var(--font-mono); font-size: 13px; color: var(--ink-3); }
.admin-empty { padding: 34px 24px; text-align: center; color: var(--ink-3); display: grid; justify-items: center; gap: 10px; }
.admin-empty .ico { width: 30px; height: 30px; color: var(--ink-3); }
.admin-empty p { margin: 0; font-size: 14px; }

.inv-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 18px; border-bottom: 1.5px solid var(--rule); }
.inv-row:last-child { border-bottom: none; }
.inv-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.inv-mail { font-family: var(--font-mono); font-size: 14px; color: var(--ink); font-weight: 600; word-break: break-all; }
.inv-note { font-size: 12.5px; color: var(--ink-3); }
.inv-del { flex: 0 0 auto; background: transparent; border: 1.5px solid transparent; border-radius: 8px; color: var(--ink-3); width: 34px; height: 34px; display: grid; place-items: center; cursor: pointer; transition: color .14s, border-color .14s, background .14s; }
.inv-del:hover { color: var(--orange); border-color: var(--orange); background: var(--orange-tint); }
.inv-del .ico { width: 18px; height: 18px; }

.admin-back { margin-top: 22px; }
.admin-back button { background: none; border: none; color: var(--blue); font-family: var(--font-body); font-size: 14px; font-weight: 600; cursor: pointer; padding: 6px 0; }
.admin-back button:hover { text-decoration: underline; }

/* Admin: el reporte es más ancho que el gestor de invitaciones */
.admin:has(.admin-panel) { max-width: 1040px; }

/* ---- Admin: pestañas ---- */
.admin-tabs { display: flex; gap: 8px; margin: 4px 0 22px; border-bottom: 1.5px solid var(--rule); }
.admin-tab {
  display: inline-flex; align-items: center; gap: 7px;
  background: none; border: none; cursor: pointer;
  font-family: var(--font-body); font-size: 14px; font-weight: 600; color: var(--ink-3);
  padding: 10px 14px; margin-bottom: -1.5px; border-bottom: 2.5px solid transparent;
  transition: color .14s, border-color .14s;
}
.admin-tab:hover { color: var(--ink); }
.admin-tab.active { color: var(--blue); border-bottom-color: var(--blue); }
.admin-tab .ico { width: 17px; height: 17px; }

/* ---- Reporte: tarjetas de resumen ---- */
.rep-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 26px; }
.rep-card {
  display: flex; align-items: center; gap: 12px;
  background: var(--card); border: 1.5px solid var(--ink); border-radius: 12px;
  padding: 14px 16px; box-shadow: var(--shadow-hard);
}
.rep-card .rc-ic { flex: 0 0 auto; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; background: var(--blue-tint); color: var(--blue); }
.rep-card .rc-ic .ico { width: 19px; height: 19px; }
.rc-body { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.rc-big { font-family: var(--font-disp); font-weight: 800; font-size: 26px; letter-spacing: -.5px; color: var(--ink); }
.rc-unit { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.rc-sub { font-family: var(--font-mono); font-size: 10px; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-3); margin-top: 2px; }

/* ---- Reporte: tabla de estudiantes ---- */
.rep-tablewrap { border: 1.5px solid var(--ink); border-radius: 12px; overflow: auto; background: var(--card); box-shadow: var(--shadow-hard); margin-bottom: 30px; }
.rep-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.rep-table th {
  text-align: left; font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .05em;
  text-transform: uppercase; color: var(--ink-3); font-weight: 700;
  padding: 11px 14px; border-bottom: 1.5px solid var(--ink); background: var(--paper-2); white-space: nowrap;
}
.rep-table td { padding: 11px 14px; border-bottom: 1.5px solid var(--rule); vertical-align: middle; color: var(--ink); }
.rep-table tbody tr:last-child td { border-bottom: none; }
.rep-table tbody tr:hover td { background: var(--blue-tint); }
.rep-who { display: flex; align-items: center; gap: 10px; }
.rep-av { width: 30px; height: 30px; border-radius: 50%; flex: 0 0 auto; border: 1.5px solid var(--ink); object-fit: cover; }
.rep-av-i { display: grid; place-items: center; background: var(--blue); color: #fff; font-weight: 700; font-size: 13px; }
.rep-id { display: flex; flex-direction: column; min-width: 0; }
.rep-name { font-weight: 600; color: var(--ink); white-space: nowrap; }
.rep-mail { font-family: var(--font-mono); font-size: 11px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 180px; }
.rep-last { color: var(--ink-2); max-width: 180px; }

.rep-pay {
  display: inline-flex; align-items: center; gap: 5px; cursor: pointer;
  font-family: var(--font-mono); font-size: 11.5px; font-weight: 700; white-space: nowrap;
  padding: 5px 10px; border-radius: 99px; border: 1.5px solid var(--rule-2);
  background: transparent; color: var(--ink-3); transition: border-color .14s, color .14s, background .14s;
}
.rep-pay:hover { border-color: var(--ink); color: var(--ink); }
.rep-pay.paid { background: var(--blue); border-color: var(--ink); color: #fff; }
.rep-pay .ico { width: 14px; height: 14px; }

.rep-prog { min-width: 130px; }
.rep-bar { height: 7px; background: var(--paper-3); border: 1.5px solid var(--ink); border-radius: 99px; overflow: hidden; }
.rep-bar span { display: block; height: 100%; background: var(--orange); }
.rep-progtxt { display: block; font-family: var(--font-mono); font-size: 10.5px; color: var(--ink-3); margin-top: 4px; }

/* ---- Reporte: editor de pago inline ---- */
.rep-pay-row td { background: var(--paper-2) !important; }
.pay-edit { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 4px 0; }
.pay-edit .admin-input { flex: 0 1 150px; padding: 8px 11px; }
.pe-check { display: inline-flex; align-items: center; gap: 7px; font-weight: 600; font-size: 13.5px; white-space: nowrap; }
.pe-check input { width: 17px; height: 17px; accent-color: var(--blue); }
.pe-msg { font-family: var(--font-mono); font-size: 12px; color: var(--ink-3); }

/* ---- Reporte: embudo de abandono ---- */
.rep-hint { font-size: 14px; color: var(--ink-2); line-height: 1.5; margin: 0 0 14px; display: flex; gap: 8px; align-items: flex-start; }
.rep-hint .ico { width: 17px; height: 17px; color: var(--orange); flex: 0 0 auto; margin-top: 2px; }
.rep-funnel { display: grid; gap: 5px; }
.fn-row { display: grid; grid-template-columns: minmax(120px, 220px) 1fr auto; align-items: center; gap: 12px; padding: 4px 8px; border-radius: 8px; }
.fn-row.drop { background: var(--orange-tint); }
.fn-name { font-size: 13px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fn-track { position: relative; height: 14px; background: var(--paper-3); border: 1.5px solid var(--ink); border-radius: 99px; overflow: hidden; }
.fn-open { position: absolute; left: 0; top: 0; height: 100%; background: var(--blue-tint); border-right: 1px solid rgba(31,56,255,.35); }
.fn-done { position: absolute; left: 0; top: 0; height: 100%; background: var(--orange); }
.fn-num { font-family: var(--font-mono); font-size: 11px; font-weight: 700; color: var(--ink-3); white-space: nowrap; }
.rep-legend { font-family: var(--font-mono); font-size: 11px; color: var(--ink-3); margin-top: 12px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.rep-legend .lg { display: inline-block; width: 14px; height: 10px; border: 1.5px solid var(--ink); border-radius: 3px; vertical-align: middle; }
.rep-legend .lg-open { background: var(--blue-tint); }
.rep-legend .lg-done { background: var(--orange); }

@media (max-width: 860px) {
  .rep-cards { grid-template-columns: repeat(2, 1fr); }
  .fn-row { grid-template-columns: 110px 1fr auto; gap: 8px; }
  .fn-name { font-size: 12px; }
}
