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

/* ============ SISTEMA VISUAL — basado en la referencia naranja/crema ============ */
:root {
  --bg: #f6f3ee; /* lienzo cálido */
  --bg-soft: #fbf8f3; /* superficie secundaria */
  --paper: #ffffff; /* tarjetas */
  --ink: #17151a; /* texto principal / casi negro */
  --char: #26221e; /* carbón: píldoras oscuras, curso Inversión */
  --muted: #85807a; /* texto secundario */
  --line: #e8e2d8; /* bordes hairline */
  --orange: #f2a129; /* acento principal */
  --orange-deep: #dd8710; /* hover / énfasis */
  --orange-soft: #fdf1de; /* fondo suave naranja */
  --orange-text: #a05a02; /* naranja legible para texto pequeño */
  --red: #e0422f; /* alertas / badges */
  --red-soft: #fbe5e0;
  --green: #4e9a6a; /* semántico: correcto */
  --green-soft: #e4f1e9;
  --radius: 18px;
  --glass: rgba(255, 255, 255, 0.56);
  --glass-2: rgba(255, 255, 255, 0.72);
  --glass-line: rgba(255, 255, 255, 0.78);
  --glass-sh: 0 16px 40px -20px rgba(70, 48, 12, 0.3);
  --glass-in: inset 0 1px 0 rgba(255, 255, 255, 0.92), inset 0 -1px 0 rgba(255, 255, 255, 0.28);
  --blur: blur(20px) saturate(175%);
  --shadow: 0 10px 30px -18px rgba(23, 21, 26, 0.35);

  /* colores por curso (dentro de la misma paleta) */
  --accent-fin: #f2a129;
  --accent-inv: #26221e;

  /* compatibilidad */
  --surface: var(--paper);
  --surface-strong: var(--char);
  --text: var(--ink);
  --text-on-strong: #fbf8f3;
  --text-muted: var(--muted);
  --border: var(--line);
  --accent-warm: #ffffff;
  --danger: var(--red);
  --danger-soft: var(--red-soft);
  --accent-fin-soft: #fdf1de;
  --accent-inv-soft: #efebe5;
}

* {
  box-sizing: border-box;
}
html {
  color-scheme: light;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family:
    'Inter',
    'Noto Sans SC',
    system-ui,
    -apple-system,
    sans-serif;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
h1,
h2,
h3,
h4 {
  font-family: 'Archivo', 'Noto Sans SC', 'Inter', sans-serif;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-wrap: balance;
  margin: 0;
  color: var(--ink);
}
h1 {
  letter-spacing: -0.035em;
}
.logo {
  font-family: 'Fraunces', Georgia, serif;
  font-style: italic;
  font-weight: 700;
  letter-spacing: 0.2px;
}
p {
  margin: 0;
}
a {
  color: inherit;
  text-decoration: none;
}
button {
  font-family: inherit;
  cursor: pointer;
}
::selection {
  background: var(--orange-soft);
}
:focus-visible {
  outline: 2.5px solid var(--orange);
  outline-offset: 2px;
}
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
.wrap {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 36px);
}
.scrollx {
  overflow-x: auto;
}
[hidden] {
  display: none !important;
}
.num {
  font-variant-numeric: tabular-nums;
}
.text-muted {
  color: var(--muted);
}
.eyebrow {
  font-family: 'Archivo', sans-serif;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------------- barra superior ---------------- */
.topbar {
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 30;
  padding: 12px 0;
}
.topbar .row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 clamp(16px, 4vw, 36px);
  max-width: 1160px;
  margin: 0 auto;
}
.topbar .brand {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-right: auto;
  color: var(--ink);
}
.mark {
  width: 24px;
  height: 24px;
  flex: none;
  color: var(--orange);
}
.brand .logo {
  font-size: 23px;
}
.tabs {
  display: flex;
  gap: 3px;
  flex-wrap: wrap;
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 4px;
  border-radius: 999px;
}
.tab {
  padding: 8px 15px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 13.5px;
  color: var(--muted);
  white-space: nowrap;
  transition:
    background 0.15s,
    color 0.15s;
}
.tabs-public .tab {
  padding: 7px 12px;
  font-size: 13px;
  background: var(--orange);
  color: var(--char);
  border: none;
  font-family: inherit;
  cursor: pointer;
}
@media (max-width: 1120px) {
  .tabs-public {
    display: none;
  }
}
.tab.active {
  background: var(--char);
  color: #fff;
}
.tab:hover:not(.active) {
  background: var(--bg-soft);
  color: var(--ink);
}
.tabs-public .tab:hover {
  background: var(--orange-deep);
  color: #fff;
}
.lang {
  display: flex;
  gap: 2px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px;
}
.lang button {
  border: none;
  background: transparent;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}
.lang button.active {
  background: var(--orange);
  color: #fff;
}
.userchip {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 13.5px;
}
.avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--orange);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Archivo', sans-serif;
  font-weight: 800;
  font-size: 13px;
  flex: none;
}
.avatar.sm {
  width: 24px;
  height: 24px;
  font-size: 10.5px;
}
.avatar svg {
  width: 14px;
  height: 14px;
}
.demo-flag {
  font-family: 'Archivo', sans-serif;
  font-size: 10.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--orange-text);
  background: var(--orange-soft);
  padding: 4px 9px;
  border-radius: 999px;
}

/* ---------------- botones ---------------- */
.btn {
  border: none;
  border-radius: 999px;
  padding: 11px 20px;
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition:
    transform 0.12s ease,
    background 0.15s ease;
  line-height: 1;
}
.btn svg {
  width: 16px;
  height: 16px;
}
.btn:active {
  transform: scale(0.97);
}
.btn-primary {
  background: var(--char);
  color: #fff;
}
.btn-primary:hover {
  background: #3a342e;
}
.btn-inv {
  background: var(--orange);
  color: var(--char);
}
.btn-inv:hover {
  background: var(--orange-deep);
  color: #fff;
}
.btn-fin {
  background: var(--orange-soft);
  color: var(--orange-text);
}
.btn-ghost {
  background: var(--paper);
  border: 1.5px solid var(--line);
  color: var(--ink);
}
.btn-ghost:hover {
  border-color: var(--ink);
}
.btn-danger {
  background: var(--red-soft);
  color: var(--red);
}
.btn-sm {
  padding: 8px 14px;
  font-size: 13px;
}
.btn[disabled] {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ---------------- superficies ---------------- */
main {
  min-height: 70vh;
}
.section {
  padding: 40px clamp(16px, 4vw, 36px);
  scroll-margin-top: 86px;
}
.section-tight {
  padding: 24px clamp(16px, 4vw, 36px);
}
.grid {
  display: grid;
  gap: 16px;
}
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.card-strong {
  background: var(--char);
  color: #fbf8f3;
  border-radius: var(--radius);
}
.card-strong h1,
.card-strong h2,
.card-strong h3 {
  color: #fbf8f3;
}
.card-strong .text-muted,
.card-strong .eyebrow {
  color: rgba(251, 248, 243, 0.62);
}
.pad {
  padding: 22px;
}
.bignum {
  font-family: 'Archivo', 'Noto Sans SC', sans-serif;
  font-weight: 900;
  font-size: clamp(26px, 3vw, 34px);
  letter-spacing: -0.03em;
  line-height: 1.05;
}
footer {
  padding: 38px clamp(16px, 4vw, 36px);
  border-top: 1px solid var(--line);
  background: var(--paper);
}
.foot-grid {
  max-width: 1160px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 26px;
}
@media (max-width: 720px) {
  .foot-grid {
    grid-template-columns: 1fr;
  }
}
.foot-links {
  display: grid;
  gap: 7px;
  font-size: 13.5px;
  color: var(--muted);
}

/* ---------------- landing ---------------- */
.hero {
  padding: 44px clamp(16px, 4vw, 36px) 20px;
  text-align: center;
}
.hero-badge svg {
  width: 14px;
  height: 14px;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--orange-soft);
  color: var(--orange-text);
  font-weight: 700;
  font-size: 12.5px;
  padding: 7px 14px;
  border-radius: 999px;
  margin-bottom: 20px;
}
.hero h1 {
  font-size: clamp(34px, 6vw, 60px);
  line-height: 1.03;
  font-weight: 900;
  max-width: 19ch;
  margin: 0 auto 18px;
}
.hero h1 em {
  font-style: normal;
  color: var(--orange);
}
.hero .sub {
  max-width: 58ch;
  margin: 0 auto 26px;
  font-size: 17px;
  color: var(--muted);
}
.hero-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}
.stats-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px;
  margin-top: 44px;
}
.stat-box {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
}
.stat-box .bignum {
  color: var(--orange-deep);
}
.stat-box .label {
  font-size: 12.5px;
  color: var(--muted);
  font-weight: 600;
  margin-top: 4px;
}
.sec-head {
  display: flex;
  align-items: flex-end;
  gap: 14px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}
.sec-head h2 {
  font-size: clamp(23px, 3.4vw, 34px);
  font-weight: 900;
}
.sec-head .more {
  margin-left: auto;
  font-weight: 700;
  font-size: 13.5px;
  color: var(--orange-text);
}
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
}
.feature {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
}
.feature .ficon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--orange-soft);
  color: var(--orange-text);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}
.feature .ficon svg {
  width: 22px;
  height: 22px;
}
.feature h3 {
  font-size: 17px;
  margin-bottom: 6px;
}
.feature p {
  font-size: 14px;
  color: var(--muted);
}
.step {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  position: relative;
}
.step .n {
  font-family: 'Archivo', sans-serif;
  font-weight: 900;
  font-size: 34px;
  color: var(--orange-deep);
  line-height: 1;
  margin-bottom: 10px;
}
.empty-state {
  background: var(--bg-soft);
  border: 1.5px dashed var(--line);
  border-radius: var(--radius);
  padding: 34px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}
.founder {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 26px;
  align-items: flex-start;
}
.founder-badge {
  width: 84px;
  height: 84px;
  border-radius: 22px;
  background: var(--orange);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Archivo', sans-serif;
  font-weight: 900;
  font-size: 30px;
  flex: none;
}
@media (max-width: 720px) {
  .founder {
    grid-template-columns: 1fr;
  }
}
.roadmap-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}
.roadmap-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 12px;
  font-size: 14px;
  background: var(--paper);
}
.roadmap-item svg {
  width: 18px;
  height: 18px;
  color: var(--orange-text);
  flex: none;
  margin-top: 1px;
}
.two-col {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 20px;
}
@media (max-width: 860px) {
  .two-col {
    grid-template-columns: 1fr;
  }
}

/* ---------------- auth ---------------- */
.auth-shell {
  max-width: 420px;
  margin: 0 auto;
  padding: 40px 20px 60px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}
.field label {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--muted);
}
.field input {
  padding: 12px 14px;
  border-radius: 12px;
  border: 1.5px solid var(--line);
  background: var(--bg-soft);
  color: var(--ink);
  font-family: inherit;
  font-size: 14.5px;
}
.field input:focus {
  border-color: var(--orange);
  background: var(--paper);
}
.demo-box {
  margin-top: 20px;
  padding: 18px;
  border-radius: var(--radius);
  background: var(--orange-soft);
  border: 1px solid #f5e2c4;
}
.demo-box .row2 {
  display: flex;
  gap: 10px;
  margin-top: 12px;
  flex-wrap: wrap;
}
.switch-link {
  text-align: center;
  margin-top: 16px;
  font-size: 14px;
  color: var(--muted);
}
.center-note {
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  margin-top: 10px;
}

/* ---------------- tarjetas de curso ---------------- */
.course-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 18px;
}
.course-card {
  border-radius: 20px;
  padding: 24px;
  position: relative;
  overflow: hidden;
  min-height: 200px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid var(--line);
  transition: transform 0.15s ease;
}
.course-card:hover {
  transform: translateY(-3px);
}
.course-card.fin {
  background: var(--orange);
  color: var(--char);
  border-color: var(--orange);
}
.course-card.fin .meta span {
  background: rgba(38, 34, 30, 0.13);
}
.course-card.fin .progress-track {
  background: rgba(38, 34, 30, 0.18);
}
.course-card.fin .progress-fill {
  background: var(--char);
}
.course-card.inv {
  background: var(--char);
  color: #fbf8f3;
  border-color: var(--char);
}
.course-card h3 {
  color: inherit;
  font-size: 22px;
}
.course-card .glyph {
  width: 38px;
  height: 38px;
  opacity: 0.95;
}
.course-card .glyph svg {
  width: 100%;
  height: 100%;
}
.course-card .meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 12px;
  font-weight: 700;
}
.course-card .meta span {
  background: rgba(255, 255, 255, 0.22);
  padding: 5px 11px;
  border-radius: 999px;
}
.course-card .progress-track {
  height: 6px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.28);
  margin-top: 12px;
}
.course-card .progress-fill {
  height: 100%;
  border-radius: 99px;
  background: #fff;
}
.course-card-empty {
  border-radius: 20px;
  border: 1.5px dashed var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 10px;
  color: var(--muted);
  min-height: 200px;
  font-weight: 600;
  text-align: center;
  padding: 22px;
  background: var(--bg-soft);
  font-size: 13.5px;
}
.course-card-empty svg {
  width: 22px;
  height: 22px;
}

/* ---------------- detalle de curso ---------------- */
.course-progress-hero {
  border-radius: 20px;
  padding: 28px;
}
.week-block {
  margin-bottom: 12px;
}
.week-head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 15px 18px;
  border-radius: 14px;
  cursor: pointer;
  background: var(--paper);
  border: 1px solid var(--line);
}
.week-head .wk-num {
  font-family: 'Archivo', sans-serif;
  font-weight: 900;
  font-size: 15px;
  color: var(--course-accent);
  background: var(--bg-soft);
  border-radius: 10px;
  padding: 8px 10px;
  line-height: 1;
}
.week-head .chev {
  margin-left: auto;
  transition: transform 0.15s ease;
  color: var(--muted);
}
.week-head[aria-expanded='true'] .chev {
  transform: rotate(90deg);
}
.week-head svg {
  width: 18px;
  height: 18px;
}
.week-body {
  display: grid;
  gap: 8px;
  padding: 10px 0 6px;
}
.day-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 16px;
  border-radius: 12px;
  background: var(--paper);
  border: 1px solid var(--line);
  transition: border-color 0.15s;
}
.day-row:hover {
  border-color: var(--course-accent);
}
.day-badge {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  font-family: 'Archivo', sans-serif;
  font-weight: 800;
  font-size: 13px;
  background: var(--bg-soft);
  color: var(--muted);
}
.day-badge svg {
  width: 16px;
  height: 16px;
}
.day-badge.done {
  background: var(--green-soft);
  color: var(--green);
}
.day-badge.repaso {
  background: var(--orange-soft);
  color: var(--orange-text);
}
.day-title {
  font-weight: 600;
  font-size: 14.5px;
}
.day-tag {
  font-size: 11.5px;
  color: var(--muted);
}
.day-go {
  margin-left: auto;
  color: var(--muted);
}
.day-go svg {
  width: 16px;
  height: 16px;
}

/* ---------------- lección ---------------- */
.lesson-wrap {
  max-width: 760px;
  margin: 0 auto;
}
.figure-card {
  display: flex;
  gap: 20px;
  align-items: center;
  padding: 22px;
  border-radius: 20px;
  margin-bottom: 24px;
  border: 1px solid var(--line);
}
.figure-portrait {
  width: 92px;
  height: 92px;
  border-radius: 50%;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.28);
  border: 2px solid rgba(255, 255, 255, 0.5);
  color: inherit;
}
.figure-portrait svg {
  width: 52px;
  height: 52px;
}
.figure-name {
  font-family: 'Archivo', sans-serif;
  font-size: 19px;
  font-weight: 800;
  color: inherit;
}
.figure-role {
  font-size: 12.5px;
  color: inherit;
  opacity: 0.78;
  margin-bottom: 6px;
}
.figure-idea {
  font-size: 13.5px;
  font-style: italic;
  color: inherit;
  opacity: 0.95;
}
.lesson-body {
  font-size: 16px;
  line-height: 1.7;
}
.lesson-body p + p {
  margin-top: 12px;
}
.example-box {
  margin-top: 18px;
  padding: 16px 18px;
  border-radius: 14px;
  background: var(--orange-soft);
  border-left: 4px solid var(--course-accent);
  font-size: 14.5px;
}
.test-cta {
  margin-top: 30px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}
.test-cta .tc-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--orange-soft);
  color: var(--orange-text);
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
}
.test-cta .tc-icon svg {
  width: 24px;
  height: 24px;
}
.test-cta h3 {
  font-size: 17px;
}
.test-cta p {
  font-size: 13.5px;
  color: var(--muted);
}
.test-cta .btn {
  margin-left: auto;
}
.repaso-list {
  display: grid;
  gap: 9px;
  margin: 14px 0 4px;
  padding-left: 20px;
}
.repaso-list li {
  font-size: 15px;
}
.lesson-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 26px;
  gap: 12px;
  flex-wrap: wrap;
}

/* ---------------- pantalla de TEST (estilo lección interactiva) ---------------- */
.test-page {
  background: var(--bg);
  min-height: 100vh;
  padding: 14px clamp(10px, 3vw, 26px) 30px;
}
.test-top {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 16px;
  max-width: 1160px;
  margin: 0 auto 16px;
  flex-wrap: wrap;
}
.test-crumb {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}
.test-crumb b {
  color: var(--ink);
}
.test-progress-dots {
  display: flex;
  gap: 4px;
  margin-left: auto;
  align-items: center;
}
.test-progress-dots i {
  width: 7px;
  height: 16px;
  border-radius: 3px;
  background: var(--line);
  display: inline-block;
}
.test-progress-dots i.on {
  background: var(--orange);
}
.test-stage {
  max-width: 1160px;
  margin: 0 auto;
  background: var(--orange-soft);
  border: 1px solid #f3e3c9;
  border-radius: 26px;
  padding: clamp(20px, 3.5vw, 40px);
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: clamp(18px, 3vw, 40px);
  align-items: center;
  min-height: 520px;
}
@media (max-width: 840px) {
  .test-stage {
    grid-template-columns: 1fr;
    min-height: 0;
  }
}
.mascot {
  width: 100%;
  max-width: 330px;
  margin: 0 auto;
  display: block;
}
.test-q h2 {
  font-family: 'Archivo', 'Noto Sans SC', sans-serif;
  font-size: clamp(30px, 4.6vw, 52px);
  font-weight: 900;
  line-height: 1.02;
  letter-spacing: -0.03em;
  margin-bottom: 22px;
}
.sentence-card {
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid #f0e0c4;
  border-radius: 18px;
  padding: 22px;
  margin-bottom: 20px;
}
.sentence {
  font-size: clamp(16px, 2vw, 20px);
  font-weight: 600;
  line-height: 1.65;
}
.chips {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 10px;
}
.chip {
  background: var(--paper);
  border: 1.5px solid #efe3ce;
  border-radius: 14px;
  padding: 14px 16px;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 14.5px;
  text-align: left;
  color: var(--ink);
  transition:
    transform 0.1s ease,
    border-color 0.15s;
}
.chip:hover {
  border-color: var(--orange);
  transform: translateY(-1px);
}
.chip.correct {
  background: var(--green-soft);
  border-color: var(--green);
  color: #2f6b47;
}
.chip.wrong {
  background: var(--red-soft);
  border-color: var(--red);
  color: #9e2a1d;
}
.chip.dim {
  opacity: 0.55;
}
.test-feedback {
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 600;
}
.test-feedback.ok {
  background: var(--green-soft);
  color: #2f6b47;
}
.test-feedback.bad {
  background: var(--red-soft);
  color: #9e2a1d;
}
.test-foot {
  max-width: 1160px;
  margin: 16px auto 0;
  display: flex;
  align-items: center;
  gap: 16px;
}
.test-foot .counter {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--muted);
  white-space: nowrap;
}
.test-bar {
  flex: 1;
  height: 9px;
  border-radius: 99px;
  background: var(--line);
  overflow: hidden;
}
.test-bar .fillbar {
  height: 100%;
  background: var(--char);
  border-radius: 99px;
  transition: width 0.3s ease;
}
.round-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1.5px solid var(--line);
  background: var(--paper);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
  flex: none;
}
.round-btn svg {
  width: 18px;
  height: 18px;
}
.round-btn[disabled] {
  opacity: 0.35;
  cursor: not-allowed;
}
.result-card {
  text-align: center;
  max-width: 520px;
  margin: 0 auto;
}
.result-card .mascot {
  max-width: 170px;
  margin-bottom: 6px;
}
.result-score {
  font-family: 'Archivo', sans-serif;
  font-weight: 900;
  font-size: 64px;
  line-height: 1;
  color: var(--orange-deep);
  letter-spacing: -0.04em;
}

/* ---------------- perfil ---------------- */
.profile-head {
  display: flex;
  gap: 18px;
  align-items: center;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.profile-avatar {
  width: 62px;
  height: 62px;
  border-radius: 20px;
  background: var(--orange);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Archivo', sans-serif;
  font-weight: 900;
  font-size: 23px;
  flex: none;
}
.level-card {
  border-radius: var(--radius);
  padding: 26px;
  text-align: center;
}
.ring-wrap {
  position: relative;
  width: 150px;
  height: 150px;
  margin: 0 auto 14px;
}
.ring-figure {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
}
.ring-figure svg {
  width: 42px;
  height: 42px;
}
.level-name {
  font-family: 'Archivo', sans-serif;
  font-weight: 800;
  font-size: 17px;
  margin-top: 4px;
}
.course-exp {
  overflow: hidden;
}
.exp-head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
  cursor: pointer;
}
.exp-head .chev {
  margin-left: auto;
  transition: transform 0.15s;
  color: var(--muted);
}
.exp-head[aria-expanded='true'] .chev {
  transform: rotate(90deg);
}
.exp-head svg {
  width: 18px;
  height: 18px;
}
.exp-body {
  padding: 0 20px 20px;
  display: grid;
  gap: 4px;
  max-height: 340px;
  overflow: auto;
}
.exp-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13.5px;
  padding: 7px 0;
  border-bottom: 1px solid var(--line);
}
.exp-row:last-child {
  border: none;
}
.exp-row svg {
  width: 15px;
  height: 15px;
  flex: none;
}
.stat-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px;
  margin-bottom: 26px;
}
.stat-tile {
  padding: 20px;
  border-radius: var(--radius);
}
.stat-tile .label {
  font-size: 11.5px;
  color: var(--muted);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

/* ---------------- admin ---------------- */
.admin-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 16px;
}
.admin-grid2 {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 16px;
}
@media (max-width: 900px) {
  .admin-grid,
  .admin-grid2 {
    grid-template-columns: 1fr;
  }
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
th {
  text-align: left;
  padding: 10px 12px;
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-weight: 800;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
td {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
tr:last-child td {
  border-bottom: none;
}
.user-cell {
  display: flex;
  align-items: center;
  gap: 10px;
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
  text-align: left;
}
.user-cell:hover b {
  text-decoration: underline;
}
.badge {
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  display: inline-block;
  margin: 2px 3px 2px 0;
}
.badge.role-admin {
  background: var(--orange-soft);
  color: var(--orange-text);
}
.badge.role-alumno {
  background: var(--bg-soft);
  color: var(--muted);
}
.course-tag {
  font-size: 11px;
  font-weight: 700;
  padding: 4px 9px;
  border-radius: 999px;
  white-space: nowrap;
}
.course-tag.fin {
  background: var(--orange-soft);
  color: var(--orange-text);
}
.course-tag.inv {
  background: #ede9e3;
  color: var(--char);
}
.goal-row {
  margin-bottom: 16px;
}
.goal-row .top {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  margin-bottom: 6px;
  font-weight: 600;
}
.track {
  height: 8px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.22);
  overflow: hidden;
}
.track.lightbg {
  background: var(--bg-soft);
  border: 1px solid var(--line);
}
.fill {
  height: 100%;
  border-radius: 99px;
}
.legend {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 12px;
  font-size: 12.5px;
  font-weight: 600;
}
.legend span {
  display: flex;
  align-items: center;
  gap: 6px;
}
.legend i {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  display: inline-block;
}
.mini-bars {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 74px;
  margin-top: 14px;
}

/* ---------------- varios ---------------- */
.toast {
  position: fixed;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--char);
  color: #fff;
  padding: 13px 22px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 13.5px;
  box-shadow: var(--shadow);
  z-index: 50;
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.2s ease,
    transform 0.2s ease;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(-6px);
}
.pill {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.pillrow {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 26px;
}
.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

/* ---------------- aparición al hacer scroll (estilo Apple) ---------------- */
html {
  scroll-behavior: smooth;
}
.js-reveal .reveal {
  opacity: 0;
  transform: translateY(34px);
}
.js-reveal .reveal.in {
  opacity: 1;
  transform: none;
  transition:
    opacity 0.9s cubic-bezier(0.16, 0.84, 0.28, 1),
    transform 0.9s cubic-bezier(0.16, 0.84, 0.28, 1);
}
.js-reveal .reveal[data-d='1'].in {
  transition-delay: 0.06s;
}
.js-reveal .reveal[data-d='2'].in {
  transition-delay: 0.15s;
}
.js-reveal .reveal[data-d='3'].in {
  transition-delay: 0.24s;
}
.js-reveal .reveal[data-d='4'].in {
  transition-delay: 0.33s;
}
@media (prefers-reduced-motion: reduce) {
  .js-reveal .reveal {
    opacity: 1 !important;
    transform: none !important;
  }
}
.topbar {
  transition:
    background 0.25s ease,
    border-color 0.25s ease;
}
.topbar.scrolled {
  background: rgba(246, 243, 238, 0.82);
  backdrop-filter: saturate(150%) blur(14px);
  -webkit-backdrop-filter: saturate(150%) blur(14px);
  border-bottom: 1px solid var(--line);
}

/* ---------------- personajes ilustrados ---------------- */
.figure-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(102px, 1fr));
  gap: 16px;
}
.figure-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
  text-align: center;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--muted);
  line-height: 1.3;
}
.figure-chip svg {
  border-radius: 50%;
  transition: transform 0.2s ease;
}
.figure-chip:hover svg {
  transform: translateY(-4px) scale(1.04);
}
.day-thumb {
  position: relative;
  width: 38px;
  height: 38px;
  flex: none;
}
.day-thumb svg {
  display: block;
  border-radius: 50%;
}
.thumb-check {
  position: absolute;
  right: -5px;
  bottom: -5px;
  width: 19px;
  height: 19px;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--paper);
}
.thumb-check svg {
  width: 11px;
  height: 11px;
}
.figure-portrait-art {
  flex: none;
  line-height: 0;
}
.figure-portrait-art svg {
  border-radius: 50%;
  box-shadow: 0 10px 22px -14px rgba(0, 0, 0, 0.55);
}
.pending-badge {
  display: inline-block;
  background: var(--bg-soft);
  border: 1px dashed var(--line);
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  padding: 7px 13px;
  border-radius: 999px;
  margin-bottom: 16px;
}
.ring-figure > svg {
  width: 96px;
  height: 96px;
}
.level-card .ring-wrap {
  margin-bottom: 10px;
}

/* ---------------- rangos (perfil) ---------------- */
.rank-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.rank-hero {
  display: flex;
  align-items: center;
  gap: 18px;
}
.rank-kicker {
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
}
.rank-title {
  font-family: 'Archivo', 'Noto Sans SC', sans-serif;
  font-weight: 800;
  font-size: 19px;
  line-height: 1.15;
  margin-top: 3px;
}
.rank-desc {
  font-size: 13px;
  color: var(--muted);
  margin-top: 3px;
}
.rank-pos {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--orange-text);
  background: var(--orange-soft);
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  margin-top: 8px;
}
.hex {
  width: 104px;
  height: 112px;
  display: flex;
  align-items: center;
  justify-content: center;
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  background: var(--line);
}
.hex.sm {
  width: 62px;
  height: 66px;
}
.hex-in {
  width: calc(100% - 8px);
  height: calc(100% - 8px);
  display: flex;
  align-items: center;
  justify-content: center;
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  background: var(--paper);
  overflow: hidden;
}
.hex-in svg {
  display: block;
}
.hex-in.placeholder {
  color: var(--muted);
}
.hex-in.placeholder svg {
  width: 38px;
  height: 38px;
}
.rank-badge {
  position: relative;
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.rank-badge.tier-0 .hex {
  background: var(--line);
}
.rank-badge.tier-1 .hex,
.rank-step.tier-1 .hex {
  background: #d9cfbc;
}
.rank-badge.tier-2 .hex,
.rank-step.tier-2 .hex {
  background: #f0ce95;
}
.rank-badge.tier-3 .hex,
.rank-step.tier-3 .hex {
  background: var(--orange);
}
.rank-badge.tier-4 .hex,
.rank-step.tier-4 .hex {
  background: var(--orange-deep);
}
.rank-badge.tier-5 .hex,
.rank-step.tier-5 .hex {
  background: var(--char);
}
.gems {
  display: flex;
  gap: 3px;
}
.gems i {
  width: 9px;
  height: 9px;
  background: var(--orange);
  transform: rotate(45deg);
  border-radius: 2px;
  display: inline-block;
}
.rank-badge.tier-5 .gems i {
  background: var(--char);
}
.rank-ladder {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  border-top: 1px solid var(--line);
  padding-top: 16px;
}
.rank-step {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
}
.rank-step .hex {
  background: var(--line);
}
.rank-step.off .hex-in {
  filter: grayscale(1);
  opacity: 0.35;
}
.rank-step.off .rank-step-name {
  opacity: 0.5;
}
.rank-step .lock {
  position: absolute;
  top: 20px;
  color: var(--muted);
}
.rank-step .lock svg {
  width: 16px;
  height: 16px;
}
.rank-step-name {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--muted);
  line-height: 1.2;
}

/* ---------------- personaje en la pantalla de test ---------------- */
.test-figure {
  text-align: center;
}
.test-figure svg.fig-art {
  width: min(270px, 58vw);
  height: auto;
  border-radius: 50%;
  box-shadow: 0 18px 40px -26px rgba(38, 34, 30, 0.8);
}
.test-figure .mascot {
  max-width: 270px;
}
.tf-name {
  font-family: 'Archivo', 'Noto Sans SC', sans-serif;
  font-weight: 800;
  font-size: 20px;
  margin-top: 16px;
  color: var(--char);
}
.tf-role {
  font-size: 12.5px;
  color: var(--muted);
  margin-top: 2px;
  max-width: 30ch;
  margin-left: auto;
  margin-right: auto;
}

/* ================= LIQUID GLASS ================= */
body::before {
  content: '';
  position: fixed;
  inset: -12%;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(38% 30% at 10% 6%, rgba(242, 161, 41, 0.34), transparent 70%),
    radial-gradient(32% 28% at 90% 2%, rgba(221, 135, 16, 0.22), transparent 72%),
    radial-gradient(42% 34% at 82% 55%, rgba(242, 161, 41, 0.2), transparent 70%),
    radial-gradient(38% 32% at 6% 72%, rgba(38, 34, 30, 0.12), transparent 72%),
    radial-gradient(30% 26% at 50% 100%, rgba(221, 135, 16, 0.16), transparent 74%);
  filter: blur(26px);
}

.card,
.feature,
.step,
.stat-box,
.empty-state,
.roadmap-item,
.course-exp,
.demo-box {
  background: var(--glass);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  border: 1px solid var(--glass-line);
  box-shadow: var(--glass-sh), var(--glass-in);
}
.card-strong {
  background: rgba(35, 31, 27, 0.8);
  -webkit-backdrop-filter: blur(22px) saturate(150%);
  backdrop-filter: blur(22px) saturate(150%);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow:
    0 20px 44px -22px rgba(20, 14, 4, 0.6),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}
.topbar {
  background: rgba(246, 243, 238, 0.55);
  -webkit-backdrop-filter: blur(18px) saturate(180%);
  backdrop-filter: blur(18px) saturate(180%);
}
.topbar.scrolled {
  background: rgba(246, 243, 238, 0.72);
  box-shadow: 0 10px 30px -24px rgba(70, 48, 12, 0.6);
  border-bottom: 1px solid rgba(255, 255, 255, 0.6);
}
.tabs,
.lang,
.test-top {
  background: var(--glass-2);
  border: 1px solid var(--glass-line);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  box-shadow:
    var(--glass-in),
    0 8px 20px -16px rgba(70, 48, 12, 0.5);
}
.btn-ghost {
  background: var(--glass-2);
  border: 1px solid var(--glass-line);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  backdrop-filter: blur(14px) saturate(160%);
  box-shadow: var(--glass-in);
}
.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(255, 255, 255, 0.95);
}
.btn-inv,
.tabs-public .tab {
  box-shadow:
    0 10px 22px -12px rgba(221, 135, 16, 0.75),
    inset 0 1px 0 rgba(255, 255, 255, 0.5);
}
.btn-primary {
  box-shadow:
    0 10px 22px -14px rgba(20, 14, 4, 0.8),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
}
.day-row,
.week-head {
  background: rgba(255, 255, 255, 0.52);
  border: 1px solid rgba(255, 255, 255, 0.68);
  box-shadow:
    0 6px 18px -14px rgba(70, 48, 12, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
}
.day-row:hover {
  background: rgba(255, 255, 255, 0.78);
}
.course-card,
.figure-card,
.course-progress-hero {
  background-image: linear-gradient(155deg, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0) 48%);
  box-shadow:
    0 18px 44px -24px rgba(70, 48, 12, 0.6),
    inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
.course-card-empty {
  background: rgba(255, 255, 255, 0.35);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}
.test-stage {
  background: rgba(253, 241, 222, 0.55);
  -webkit-backdrop-filter: blur(26px) saturate(170%);
  backdrop-filter: blur(26px) saturate(170%);
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow:
    0 26px 60px -34px rgba(70, 48, 12, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.85);
}
.sentence-card,
.chip {
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid rgba(255, 255, 255, 0.8);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}
.chip:hover {
  background: rgba(255, 255, 255, 0.92);
  border-color: var(--orange);
}
.chip.correct {
  background: rgba(220, 241, 229, 0.85);
}
.chip.wrong {
  background: rgba(251, 229, 224, 0.85);
}
.field input {
  background: rgba(255, 255, 255, 0.6);
  border-color: rgba(255, 255, 255, 0.85);
}
.field input:focus {
  background: rgba(255, 255, 255, 0.95);
}
.toast {
  background: rgba(35, 31, 27, 0.86);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.18);
}
.hex {
  box-shadow:
    0 10px 24px -14px rgba(70, 48, 12, 0.7),
    inset 0 1px 0 rgba(255, 255, 255, 0.5);
}
.hex-in {
  background: rgba(255, 255, 255, 0.62);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.rank-pos {
  background: rgba(253, 241, 222, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.7);
}
.figure-portrait-art,
.fig-photo {
  filter: saturate(105%);
}
.test-figure .fig-photo {
  box-shadow:
    0 22px 46px -26px rgba(70, 48, 12, 0.85),
    0 0 0 6px rgba(255, 255, 255, 0.55);
}
th {
  color: var(--muted);
}
td,
th {
  border-color: rgba(38, 34, 30, 0.1);
}

/* fotos duotono */
.fig-photo {
  display: block;
  object-fit: cover;
  border-radius: 50%;
}
.hex-in .fig-photo {
  width: 100%;
  height: 100%;
  border-radius: 0;
}
.day-thumb .fig-photo {
  width: 38px;
  height: 38px;
}
.figure-portrait-art .fig-photo {
  box-shadow: 0 10px 22px -14px rgba(0, 0, 0, 0.55);
}
@media (max-width: 640px) {
  .card,
  .feature,
  .step,
  .stat-box {
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
  }
}

/* ---------------- siluetas que sobresalen del marco ---------------- */
.hex-wrap {
  position: relative;
  width: 104px;
  height: 112px;
  flex: none;
}
.hex-wrap.sm {
  width: 62px;
  height: 66px;
}
.hex-wrap .hex {
  width: 100%;
  height: 100%;
}
.hex-scene {
  width: 100%;
  height: 100%;
  display: block;
}
.hex-in {
  padding: 0;
  overflow: hidden;
}
.cutout {
  position: absolute;
  left: 50%;
  bottom: -10px;
  transform: translateX(-50%);
  width: 106%;
  height: auto;
  pointer-events: none;
  filter: drop-shadow(0 10px 12px rgba(60, 35, 5, 0.45));
}
.hex-wrap.sm .cutout {
  width: 102%;
  bottom: -7px;
  filter: drop-shadow(0 6px 8px rgba(60, 35, 5, 0.45));
}
.hex-fallback {
  position: absolute;
  inset: 8%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.rank-hero {
  padding-top: 34px;
  align-items: flex-end;
}
.rank-hero .rank-badge {
  align-self: flex-end;
}
.rank-ladder {
  padding-top: 26px;
  overflow: visible;
}
.rank-card {
  overflow: visible;
}
.rank-step {
  overflow: visible;
}
.rank-step .lock {
  top: 26px;
  z-index: 3;
  color: #fff;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.5));
}
.rank-step.off .cutout {
  filter: grayscale(1) brightness(1.05);
  opacity: 0.45;
}
.rank-step.off .hex {
  filter: grayscale(1);
  opacity: 0.75;
}
.rank-badge.tier-0 .hex-in.placeholder {
  background: var(--bg-soft);
}

/* ---------------- fondo Wall Street (portada) ---------------- */
body.home::after {
  content: '';
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: 68vh;
  z-index: -1;
  pointer-events: none;
  background-image: url('/img/bg-1.webp');
  background-position: center bottom;
  background-size: cover;
  background-repeat: no-repeat;
  opacity: 0.46;
  -webkit-mask-image: linear-gradient(
    to top,
    #000 0%,
    #000 30%,
    rgba(0, 0, 0, 0.42) 62%,
    transparent 86%
  );
  mask-image: linear-gradient(to top, #000 0%, #000 30%, rgba(0, 0, 0, 0.42) 62%, transparent 86%);
}
@media (max-width: 640px) {
  body.home::after {
    height: 60vh;
    opacity: 0.24;
  }
}

/* ---------------- contenido estructurado de la lección ---------------- */
.lesson-h {
  font-family: 'Archivo', 'Noto Sans SC', sans-serif;
  font-weight: 800;
  font-size: 17px;
  letter-spacing: -0.01em;
  margin: 26px 0 10px;
  color: var(--ink);
}
.lesson-h:first-child {
  margin-top: 4px;
}
.lesson-list {
  margin: 10px 0 0;
  padding-left: 22px;
  display: grid;
  gap: 9px;
}
.lesson-list li {
  font-size: 15.5px;
  line-height: 1.65;
}
.lesson-list li::marker {
  color: var(--orange);
}
.key-box {
  margin-top: 28px;
  padding: 20px 22px;
  border-radius: 16px;
  background: var(--orange-soft);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-left: 4px solid var(--course-accent);
  font-size: 15.5px;
  line-height: 1.65;
}
.key-label {
  display: block;
  font-family: 'Archivo', 'Noto Sans SC', sans-serif;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--orange-text);
  margin-bottom: 8px;
}

/* ---------------- días bloqueados ---------------- */
.day-row.locked {
  opacity: 0.55;
  cursor: not-allowed;
  background: rgba(255, 255, 255, 0.32);
}
.day-row.locked:hover {
  border-color: var(--line);
}
.day-row.locked .day-title {
  color: var(--muted);
}
.day-badge.locked {
  background: var(--bg-soft);
  color: var(--muted);
}
.day-badge.locked svg {
  width: 15px;
  height: 15px;
}
.locked-btn {
  opacity: 0.6;
}
.locked-btn svg {
  width: 14px;
  height: 14px;
}

/* ============================================================
   EDITOR DE TEMARIO (panel de admin)
   ============================================================ */
.ed-bar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px 16px;
  margin-bottom: 18px;
}
.ed-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 620px) {
  .ed-row {
    grid-template-columns: 1fr;
  }
}
.ed-sec {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 12px;
  background: #fff;
}
.ed-num {
  flex: none;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: var(--orange);
  color: var(--char);
  font-weight: 800;
  font-size: 12.5px;
  display: grid;
  place-items: center;
}
.ed-opt {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
}
.ed-opt input[type='text'],
.ed-opt input:not([type]) {
  flex: 1;
}
.ed-radio {
  flex: none;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  cursor: pointer;
}
.ed-radio input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.ed-radio span {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid var(--line);
  display: block;
  transition: 0.15s;
}
.ed-radio input:checked + span {
  border-color: var(--orange);
  background: radial-gradient(circle, var(--orange) 0 45%, transparent 46%);
}
.ed-radio input:disabled + span {
  opacity: 0.45;
}
.lang-switch {
  display: inline-flex;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px;
}
.lang-switch button {
  border: 0;
  background: none;
  font: inherit;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--muted);
  padding: 5px 13px;
  border-radius: 999px;
  cursor: pointer;
}
.lang-switch button.on {
  background: var(--orange);
  color: var(--char);
}
.form-error {
  margin-top: 12px;
  font-size: 13px;
  font-weight: 600;
  color: #a12f1f;
  background: #fbeae6;
  border: 1px solid #f0cfc8;
  border-radius: 10px;
  padding: 9px 12px;
}
textarea {
  width: 100%;
  font: inherit;
  font-size: 14px;
  line-height: 1.55;
  color: var(--char);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 11px 13px;
  resize: vertical;
}
textarea:focus {
  outline: 2px solid var(--orange);
  outline-offset: 1px;
  border-color: transparent;
}
.ed-sec > div > input[data-ed] {
  flex: 1;
  min-width: 0;
}
.ed-sec input[data-ed],
.ed-sec textarea {
  width: 100%;
  font: inherit;
  font-size: 14px;
  color: var(--char);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 9px 12px;
}
.ed-sec input[data-ed]:focus,
.ed-sec textarea:focus {
  outline: 2px solid var(--orange);
  outline-offset: 1px;
  border-color: transparent;
}
.ed-sec .field {
  margin-top: 10px;
}
.ed-sec .field label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 5px;
}
