/* =========================================================
   Dirección Financiera · UPO — Laboratorio de financiación a c/p
   ========================================================= */

:root {
  color-scheme: light;
  --bg: #f6f5f1;
  --surface: #ffffff;
  --surface-2: #f0eee8;
  --surface-3: #e8e5dc;
  --ink: #1b1b1a;
  --ink-2: #52514e;
  --muted: #7a7873;
  --line: #e1ded5;
  --accent: #2a78d6;
  --accent-ink: #1d5fae;
  --accent-soft: #e6f0fb;
  --orange: #eb6834;
  --yellow: #eda100;
  --aqua: #1baf7a;
  --good: #1d7f46;
  --good-soft: #e3f4ea;
  --bad: #c03636;
  --bad-soft: #fbe7e7;
  --warn: #9a6400;
  --warn-soft: #fdf2dc;
  --shadow: 0 1px 2px rgba(20, 20, 18, .06), 0 4px 16px rgba(20, 20, 18, .05);
  --radius: 14px;
  --radius-s: 8px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-title: "Fraunces", Georgia, "Times New Roman", serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #121211;
    --surface: #1a1a19;
    --surface-2: #232321;
    --surface-3: #2c2c29;
    --ink: #f5f5f2;
    --ink-2: #c3c2b7;
    --muted: #9a998f;
    --line: #34332f;
    --accent: #3987e5;
    --accent-ink: #8dbaf3;
    --accent-soft: #1b2a3d;
    --orange: #d95926;
    --yellow: #c98500;
    --aqua: #199e70;
    --good: #4cc27d;
    --good-soft: #16301f;
    --bad: #ef7a7a;
    --bad-soft: #3a1c1c;
    --warn: #e0a83a;
    --warn-soft: #362a12;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 4px 16px rgba(0, 0, 0, .25);
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #121211;
  --surface: #1a1a19;
  --surface-2: #232321;
  --surface-3: #2c2c29;
  --ink: #f5f5f2;
  --ink-2: #c3c2b7;
  --muted: #9a998f;
  --line: #34332f;
  --accent: #3987e5;
  --accent-ink: #8dbaf3;
  --accent-soft: #1b2a3d;
  --orange: #d95926;
  --yellow: #c98500;
  --aqua: #199e70;
  --good: #4cc27d;
  --good-soft: #16301f;
  --bad: #ef7a7a;
  --bad-soft: #3a1c1c;
  --warn: #e0a83a;
  --warn-soft: #362a12;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 4px 16px rgba(0, 0, 0, .25);
}

/* Modo proyector: todo más grande para el aula */
:root.proyector { font-size: 20px; }

* { box-sizing: border-box; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; }
a { color: var(--accent-ink); }
h1, h2, h3 { font-family: var(--font-title); font-weight: 600; line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(1.9rem, 4.5vw, 2.9rem); }
h2 { font-size: clamp(1.4rem, 3vw, 1.85rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
small, .peq { font-size: .85rem; color: var(--ink-2); }
code, .mono { font-family: var(--mono); font-size: .92em; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2rem 0; }

/* ---------- Cabecera ---------- */
.cabecera {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.cabecera-in {
  max-width: 1180px; margin: 0 auto; padding: .6rem 16px;
  display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
}
.marca { display: flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--ink); }
.marca-logo {
  width: 34px; height: 34px; border-radius: 9px; background: var(--accent); color: #fff;
  display: grid; place-items: center; font-family: var(--font-title); font-weight: 700; font-size: 1.05rem;
}
.marca-txt { line-height: 1.1; }
.marca-txt b { display: block; font-size: .98rem; }
.marca-txt span { font-size: .75rem; color: var(--muted); }
.nav { display: flex; gap: .25rem; flex-wrap: wrap; margin-left: auto; }
.nav a {
  text-decoration: none; color: var(--ink-2); padding: .4rem .7rem; border-radius: 999px; font-size: .92rem; font-weight: 500;
}
.nav a:hover { background: var(--surface-2); color: var(--ink); }
.nav a.activo { background: var(--ink); color: var(--bg); }
.herramientas { display: flex; gap: .35rem; align-items: center; }
.marcador {
  font-size: .82rem; color: var(--ink-2); background: var(--surface); border: 1px solid var(--line);
  border-radius: 999px; padding: .25rem .65rem; white-space: nowrap;
}
.marcador b { color: var(--good); }
.icono-btn {
  border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 999px;
  height: 34px; min-width: 34px; padding: 0 .55rem; cursor: pointer; font-size: .85rem; font-family: inherit;
}
.icono-btn:hover { background: var(--surface-2); }
.icono-btn[aria-pressed="true"] { background: var(--ink); color: var(--bg); }

/* ---------- Layout ---------- */
main { max-width: 1180px; margin: 0 auto; padding: 1.5rem 16px 4rem; }
.vista { display: none; }
.vista.visible { display: block; animation: aparecer .25s ease; }
@keyframes aparecer { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

.titulo-vista { margin: .5rem 0 1.25rem; }
.titulo-vista .antetitulo { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--accent-ink); font-weight: 600; }
.titulo-vista p { color: var(--ink-2); max-width: 70ch; }

.pestanas {
  display: flex; gap: .3rem; overflow-x: auto; padding: .3rem; background: var(--surface-2);
  border-radius: 999px; margin-bottom: 1.5rem; scrollbar-width: none; width: fit-content; max-width: 100%;
}
.pestanas::-webkit-scrollbar { display: none; }
.pestanas button {
  border: 0; background: transparent; color: var(--ink-2); font: inherit; font-weight: 500; font-size: .92rem;
  padding: .45rem .95rem; border-radius: 999px; cursor: pointer; white-space: nowrap;
}
.pestanas button:hover { color: var(--ink); }
.pestanas button.activo { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.panel { display: none; }
.panel.visible { display: block; animation: aparecer .2s ease; }

.rejilla { display: grid; gap: 1.25rem; }
.rejilla.dos { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.rejilla.tres { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.rejilla.lateral { grid-template-columns: minmax(280px, 360px) 1fr; align-items: start; }
@media (max-width: 860px) { .rejilla.lateral { grid-template-columns: 1fr; } }

.tarjeta {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.25rem 1.35rem; box-shadow: var(--shadow); min-width: 0;
}
.tarjeta > h3:first-child, .tarjeta > h2:first-child { margin-top: 0; }
.tarjeta.plana { box-shadow: none; background: var(--surface-2); border-color: transparent; }
.tarjeta + .tarjeta { margin-top: 1.25rem; }
.rejilla > .tarjeta + .tarjeta { margin-top: 0; }

.lectura { max-width: 74ch; }
.lectura ul, .lectura ol { padding-left: 1.2rem; }
.lectura li { margin-bottom: .35rem; }

/* Avisos */
.nota, .clave, .error-tipico, .exito {
  border-radius: var(--radius-s); padding: .85rem 1rem; margin: 1rem 0; border-left: 4px solid;
}
.nota { background: var(--accent-soft); border-color: var(--accent); }
.clave { background: var(--warn-soft); border-color: var(--warn); }
.error-tipico { background: var(--bad-soft); border-color: var(--bad); }
.exito { background: var(--good-soft); border-color: var(--good); }
.nota > :last-child, .clave > :last-child, .error-tipico > :last-child, .exito > :last-child { margin-bottom: 0; }
.etiqueta-aviso { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; display: block; margin-bottom: .25rem; }

/* Héroe */
.heroe {
  display: grid; grid-template-columns: 1.3fr 1fr; gap: 2rem; align-items: center;
  padding: 1.5rem 0 2rem;
}
@media (max-width: 860px) { .heroe { grid-template-columns: 1fr; } }
.heroe p.entrada { font-size: 1.12rem; color: var(--ink-2); max-width: 58ch; }
.chips { display: flex; flex-wrap: wrap; gap: .4rem; margin: 1rem 0; }
.chip { font-size: .8rem; padding: .25rem .65rem; border-radius: 999px; background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--line); }

.modulo {
  display: block; text-decoration: none; color: inherit; transition: transform .15s ease, border-color .15s ease;
}
.modulo:hover { transform: translateY(-2px); border-color: var(--accent); }
.modulo .num-modulo { font-family: var(--font-title); font-size: 2.2rem; color: var(--accent); line-height: 1; }
.modulo ul { padding-left: 1.1rem; color: var(--ink-2); font-size: .95rem; margin: .5rem 0 0; }

/* ---------- Formularios ---------- */
.campos { display: grid; gap: .75rem; }
.campos.dos { grid-template-columns: 1fr 1fr; }
.campo { display: flex; flex-direction: column; gap: .25rem; min-width: 0; }
.campo label, .campo .lbl { font-size: .82rem; font-weight: 600; color: var(--ink-2); }
.campo .ayuda { font-size: .75rem; color: var(--muted); }
input[type="text"], input[type="number"], input[type="password"], select {
  font: inherit; font-size: .98rem; color: var(--ink); background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius-s); padding: .5rem .65rem; width: 100%; min-width: 0;
}
input:focus, select:focus, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
input[type="range"] { width: 100%; accent-color: var(--accent); }
.con-unidad { position: relative; }
.con-unidad input { padding-right: 2.2rem; }
.con-unidad .unidad { position: absolute; right: .65rem; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: .85rem; pointer-events: none; }
.deslizador-fila { display: flex; justify-content: space-between; align-items: baseline; gap: .5rem; }
.deslizador-fila output { font-weight: 700; font-variant-numeric: tabular-nums; }

.btn {
  font: inherit; font-weight: 600; font-size: .9rem; cursor: pointer; border-radius: 999px;
  padding: .5rem 1rem; border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  display: inline-flex; align-items: center; gap: .35rem; text-decoration: none;
}
.btn:hover { background: var(--surface-2); }
.btn.primario { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primario:hover { filter: brightness(1.07); }
.btn.fantasma { background: transparent; border-color: transparent; color: var(--accent-ink); padding-left: .5rem; padding-right: .5rem; }
.btn.fantasma:hover { background: var(--accent-soft); }
.btn.peq { padding: .3rem .7rem; font-size: .82rem; }
.botonera { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }

.interruptor { display: inline-flex; background: var(--surface-2); border-radius: 999px; padding: 3px; gap: 2px; }
.interruptor button { border: 0; background: transparent; font: inherit; font-size: .85rem; font-weight: 600; padding: .35rem .8rem; border-radius: 999px; color: var(--ink-2); cursor: pointer; }
.interruptor button.activo { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }

/* ---------- Resultados ---------- */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .75rem; }
.kpi { background: var(--surface-2); border-radius: var(--radius-s); padding: .75rem .9rem; min-width: 0; }
.kpi .k-lbl { font-size: .75rem; color: var(--ink-2); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.kpi .k-val { font-size: 1.3rem; white-space: nowrap; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.25; overflow-wrap: anywhere; }
.kpi .k-sub { font-size: .78rem; color: var(--muted); }
.kpi.destacado { background: var(--accent); color: #fff; }
.kpi.destacado .k-lbl, .kpi.destacado .k-sub { color: rgba(255, 255, 255, .85); }

.pasos-calculo { counter-reset: paso; list-style: none; padding: 0; margin: 1rem 0 0; }
.pasos-calculo li {
  counter-increment: paso; position: relative; padding: .6rem .6rem .6rem 2.6rem; border-bottom: 1px dashed var(--line);
  overflow-x: auto;
}
.pasos-calculo li:last-child { border-bottom: 0; }
.pasos-calculo li::before {
  content: counter(paso); position: absolute; left: .4rem; top: .65rem; width: 1.5rem; height: 1.5rem; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent-ink); font-weight: 700; font-size: .8rem; display: grid; place-items: center;
}

.veredicto { border-radius: var(--radius); padding: 1rem 1.15rem; margin-top: 1rem; }
.veredicto.si { background: var(--good-soft); border: 1px solid color-mix(in srgb, var(--good) 40%, transparent); }
.veredicto.no { background: var(--warn-soft); border: 1px solid color-mix(in srgb, var(--warn) 40%, transparent); }
.veredicto h4 { margin: 0 0 .35rem; font-size: 1.05rem; }
.veredicto p:last-child { margin-bottom: 0; }

/* ---------- Tablas ---------- */
.tabla-envoltorio { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--surface); }
table { border-collapse: collapse; width: 100%; font-size: .9rem; font-variant-numeric: tabular-nums; }
th, td { padding: .5rem .6rem; text-align: right; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { background: var(--surface-2); font-size: .74rem; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-2); font-weight: 700; position: sticky; top: 0; }
th.izq, td.izq { text-align: left; }
tbody tr:hover td { background: color-mix(in srgb, var(--accent-soft) 50%, transparent); }
tfoot td { font-weight: 700; background: var(--surface-2); border-bottom: 0; }
td.calc { color: var(--ink); }
td input { width: 7rem; padding: .3rem .45rem; font-size: .88rem; text-align: right; }
td input.ancho { width: 7.5rem; }
td select { width: auto; padding: .3rem .4rem; font-size: .85rem; }
td input.ok, input.ok { border-color: var(--good); background: var(--good-soft); }
td input.mal, input.mal { border-color: var(--bad); background: var(--bad-soft); }
.sub-cabecera th { font-size: .68rem; }
.fila-destacada td { background: var(--warn-soft); }
.quitar { border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 1rem; padding: 0 .3rem; }
.quitar:hover { color: var(--bad); }
.toggle-celda {
  border: 1px solid var(--line); background: var(--surface-2); border-radius: 6px; font: inherit; font-size: .8rem; font-weight: 700;
  padding: .2rem .45rem; cursor: pointer; min-width: 2.6rem; color: var(--ink);
}
.toggle-celda.neg { background: var(--warn-soft); border-color: color-mix(in srgb, var(--warn) 50%, transparent); color: var(--warn); }

/* ---------- Ejercicios ---------- */
.ejercicio { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); overflow: hidden; }
.ejercicio + .ejercicio { margin-top: 1.25rem; }
.ej-cabecera { padding: 1rem 1.25rem; background: var(--surface-2); display: flex; gap: .75rem; align-items: baseline; flex-wrap: wrap; }
.ej-cabecera h3 { margin: 0; font-size: 1.1rem; }
.ej-etiqueta { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--accent-ink); background: var(--accent-soft); padding: .15rem .5rem; border-radius: 999px; }
.ej-enunciado { padding: 1rem 1.25rem .25rem; }
.ej-enunciado .datos { display: flex; flex-wrap: wrap; gap: .4rem; margin: .5rem 0; }
.ej-enunciado .dato { background: var(--surface-2); border-radius: 6px; padding: .2rem .55rem; font-size: .88rem; font-variant-numeric: tabular-nums; }
.ej-pasos { padding: .25rem 1.25rem 1.25rem; }
.ej-paso { padding: .85rem 0; border-top: 1px dashed var(--line); }
.ej-paso:first-child { border-top: 0; }
.ej-pregunta { font-weight: 600; margin-bottom: .45rem; display: flex; gap: .5rem; }
.ej-pregunta .n { color: var(--accent-ink); }
.ej-respuesta { display: flex; gap: .45rem; flex-wrap: wrap; align-items: center; }
.ej-respuesta .con-unidad { width: 15rem; max-width: 100%; }
.ej-respuesta .opciones { display: flex; flex-direction: column; gap: .35rem; width: 100%; }
.ej-respuesta .opciones label { display: flex; gap: .5rem; align-items: flex-start; padding: .45rem .65rem; border: 1px solid var(--line); border-radius: var(--radius-s); cursor: pointer; font-weight: 400; }
.ej-respuesta .opciones label:hover { background: var(--surface-2); }
.ej-respuesta .opciones input { margin-top: .3rem; accent-color: var(--accent); }
.ej-feedback { margin-top: .5rem; font-size: .92rem; }
.ej-feedback:empty { display: none; }
.ej-feedback .bien { color: var(--good); font-weight: 600; }
.ej-feedback .mal { color: var(--bad); font-weight: 600; }
.ej-solucion { margin-top: .5rem; background: var(--surface-2); border-radius: var(--radius-s); padding: .65rem .85rem; font-size: .93rem; overflow-x: auto; }
.ej-pista { margin-top: .5rem; background: var(--warn-soft); border-radius: var(--radius-s); padding: .55rem .8rem; font-size: .9rem; }
.ej-paso.resuelto .ej-pregunta::after { content: "✓"; color: var(--good); margin-left: auto; font-weight: 800; }

/* ---------- Gráficos ---------- */
.grafico { position: relative; width: 100%; }
.grafico svg { display: block; width: 100%; height: auto; overflow: visible; }
.grafico .eje text, .grafico text { fill: var(--ink-2); font-size: 11px; font-family: var(--font); }
.grafico .rejilla-g line { stroke: var(--line); stroke-width: 1; }
.grafico .eje-base { stroke: var(--muted); stroke-width: 1; }
.grafico .serie { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.grafico .area { fill: var(--accent); opacity: .08; }
.grafico .marca-v { stroke: var(--ink); stroke-width: 1; stroke-dasharray: 3 3; }
.grafico .punto { fill: var(--accent); stroke: var(--surface); stroke-width: 2; }
.grafico .ref { stroke: var(--orange); stroke-width: 2; stroke-dasharray: 6 4; }
.grafico .ref-txt { fill: var(--ink); font-weight: 600; }
.grafico .cruz { stroke: var(--muted); stroke-width: 1; }
.grafico .barra { fill: var(--accent); }
.grafico .valor-txt { fill: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.tooltip {
  position: absolute; pointer-events: none; background: var(--ink); color: var(--bg); font-size: .8rem; padding: .4rem .6rem;
  border-radius: 6px; white-space: nowrap; transform: translate(-50%, calc(-100% - 10px)); opacity: 0; transition: opacity .1s;
  font-variant-numeric: tabular-nums; z-index: 5;
}
.tooltip.on { opacity: 1; }
.titulo-grafico { font-weight: 700; font-size: .95rem; margin-bottom: .1rem; }
.sub-grafico { font-size: .8rem; color: var(--muted); margin-bottom: .5rem; }

/* Línea temporal */
.linea-tiempo text { font-family: var(--font); font-size: 12px; fill: var(--ink-2); }
.linea-tiempo .t-fuerte { fill: var(--ink); font-weight: 700; }
.linea-tiempo .zona-pp { fill: var(--aqua); opacity: .22; }
.linea-tiempo .zona-cr { fill: var(--yellow); opacity: .22; }
.linea-tiempo .zona-financiada { fill: var(--orange); opacity: .55; }
.linea-tiempo .eje-t { stroke: var(--ink-2); stroke-width: 1.5; }
.linea-tiempo .marca-pago { fill: var(--accent); stroke: var(--surface); stroke-width: 2; }
.linea-tiempo .linea-pago { stroke: var(--accent); stroke-width: 2; }
.linea-tiempo .flecha { stroke: var(--ink); stroke-width: 1.5; fill: none; }

/* Barra apilada (descomposición del nominal) */
.apilada { display: flex; height: 44px; border-radius: 6px; overflow: hidden; gap: 2px; background: var(--surface); }
.apilada > div { height: 100%; min-width: 3px; position: relative; }
.leyenda { display: flex; flex-wrap: wrap; gap: .4rem 1rem; margin-top: .6rem; font-size: .85rem; }
.leyenda span { display: inline-flex; align-items: center; gap: .4rem; }
.leyenda i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }

/* Fórmulas */
.formula { background: var(--surface-2); border-radius: var(--radius-s); padding: .8rem 1rem; margin: .75rem 0; overflow-x: auto; }
.formula-grande { font-size: 1.15rem; }
.katex { font-size: 1.06em; }
.katex-display { margin: .4em 0 !important; overflow-x: auto; overflow-y: hidden; padding: .2em 0; }

/* Formulario (chuleta) */
.chuleta h3 { color: var(--accent-ink); }
.chuleta .formula { background: var(--surface); border: 1px solid var(--line); }

/* Quiz */
.quiz-preg { padding: 1rem 0; border-top: 1px solid var(--line); }
.quiz-preg:first-child { border-top: 0; }

/* Pie */
.pie { border-top: 1px solid var(--line); padding: 1.5rem 16px 2.5rem; max-width: 1180px; margin: 0 auto; color: var(--muted); font-size: .82rem; }

/* Utilidades */
.oculto { display: none !important; }
.centro { text-align: center; }
.mt { margin-top: 1rem; }
.mt2 { margin-top: 2rem; }
.mb0 { margin-bottom: 0; }
.flex-entre { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.num { font-variant-numeric: tabular-nums; }
.verde { color: var(--good); }
.rojo { color: var(--bad); }
details.desplegable { border: 1px solid var(--line); border-radius: var(--radius-s); padding: .6rem .9rem; background: var(--surface); margin: .75rem 0; }
details.desplegable summary { cursor: pointer; font-weight: 600; }
details.desplegable[open] summary { margin-bottom: .5rem; }

/* ---------- Impresión ---------- */
#hoja-impresion { display: none; }
@media print {
  .imprimir-hoja .cabecera, .imprimir-hoja .pie, .imprimir-hoja main > *:not(#hoja-impresion) { display: none !important; }
  .imprimir-hoja #hoja-impresion { display: block !important; color: #000; font-size: 11pt; }
  #hoja-impresion h1 { font-size: 18pt; }
  #hoja-impresion .ej-imp { break-inside: avoid; border: 1px solid #999; border-radius: 6px; padding: 8pt 10pt; margin-bottom: 10pt; }
  #hoja-impresion .hueco { border-bottom: 1px solid #999; display: inline-block; min-width: 90pt; height: 14pt; }
  body { background: #fff; }
}

@media (max-width: 640px) {
  .campos.dos { grid-template-columns: 1fr; }
  .tarjeta { padding: 1rem; }
  .nav { width: 100%; margin-left: 0; order: 3; overflow-x: auto; flex-wrap: nowrap; }
  .herramientas { margin-left: auto; }
  .marcador { display: none; }
}

/* =========================================================
   v2 · Lecciones guiadas, portada general y ejercicios plegables
   ========================================================= */

/* Portada */
.como-funciona { list-style: none; padding: 0; margin: 0; display: grid; gap: .9rem; }
.como-funciona li { display: flex; gap: .75rem; align-items: flex-start; }
.como-funciona li > span {
  flex: 0 0 2rem; height: 2rem; border-radius: 50%; background: var(--accent); color: #fff;
  display: grid; place-items: center; font-weight: 700;
}
.modulo-cab { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; margin-bottom: .6rem; }
.chip-activo { background: var(--good-soft); color: var(--good); border-color: transparent; font-weight: 600; }
.modulo-ir { font-weight: 700; color: var(--accent-ink); }

/* Guía al inicio de un panel */
.guia-ejercicios { background: var(--accent-soft); border-radius: var(--radius-s); padding: .8rem 1rem; margin-bottom: 1.25rem; font-size: .95rem; }

/* Ejercicios plegables */
.ejercicio.plegado .ej-cuerpo { display: none; }
.ejercicio .ej-cabecera[role="button"] { cursor: pointer; user-select: none; }
.ejercicio .ej-cabecera[role="button"]:hover { background: var(--surface-3); }
.ej-progreso { margin-left: auto; font-size: .8rem; color: var(--muted); font-weight: 600; }
.ej-progreso.hecho { color: var(--good); }
.ej-flecha { transition: transform .2s; color: var(--muted); }
.ejercicio.plegado .ej-flecha { transform: rotate(-90deg); }
.ejercicio + .ejercicio { margin-top: .75rem; }

/* Lección: estructura */
.lec { max-width: 860px; margin: 0 auto; }
.lec-cabecera { display: flex; flex-direction: column; gap: .6rem; margin-bottom: 1rem; }
.lec-progreso { display: flex; align-items: center; gap: .75rem; }
.lec-barra { flex: 1; height: 8px; background: var(--surface-3); border-radius: 999px; overflow: hidden; }
.lec-barra span { display: block; height: 100%; background: var(--accent); border-radius: 999px; transition: width .3s ease; }
.lec-cuenta { font-size: .85rem; font-weight: 600; color: var(--ink-2); white-space: nowrap; }
.lec-puntos { list-style: none; display: flex; gap: .35rem; padding: 0; margin: 0; flex-wrap: wrap; }
.lec-puntos button {
  width: 2rem; height: 2rem; border-radius: 50%; border: 1px solid var(--line); background: var(--surface);
  color: var(--ink-2); font: inherit; font-size: .8rem; font-weight: 700; cursor: pointer;
}
.lec-puntos button.hecho { background: var(--good-soft); color: var(--good); border-color: transparent; }
.lec-puntos button.actual { background: var(--accent); color: #fff; border-color: var(--accent); }
.lec-puntos button:disabled { opacity: .45; cursor: not-allowed; }
.lec-paso {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 1.5rem 1.6rem; animation: aparecer .25s ease;
}
.lec-num { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--accent-ink); margin-bottom: .25rem; }
.lec-contenido { font-size: 1.05rem; }
.lec-contenido p { max-width: 68ch; }
.lec-preguntas { margin-top: 1.25rem; border-top: 2px dashed var(--line); padding-top: .75rem; }
.lec-tu-turno { font-weight: 800; color: var(--accent-ink); margin-bottom: .25rem; }
.lec-despues { margin-top: 1rem; animation: aparecer .3s ease; }
.lec-nav { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-top: 1rem; flex-wrap: wrap; }
.lec-aviso { font-size: .85rem; color: var(--muted); text-align: center; flex: 1; }
.btn:disabled { opacity: .45; cursor: not-allowed; filter: none; }
@media (max-width: 640px) { .lec-paso { padding: 1.1rem; } .lec-puntos button { width: 1.7rem; height: 1.7rem; } }

/* Términos explorables */
.term {
  font: inherit; font-weight: 800; color: var(--accent-ink); background: var(--accent-soft); border: 1px dashed var(--accent);
  border-radius: 6px; padding: .05rem .45rem; cursor: pointer;
}
.term:hover, .term.activo { background: var(--accent); color: #fff; border-style: solid; }
.explica { display: none; background: var(--surface-2); border-radius: var(--radius-s); padding: .8rem 1rem; margin-top: .6rem; border-left: 4px solid var(--accent); }
.explica.visible { display: block; animation: aparecer .2s ease; }

/* Factura */
.factura {
  max-width: 460px; margin: 1rem auto; background: #fffdf7; color: #222; border-radius: 6px; padding: 1.1rem 1.25rem;
  box-shadow: 0 2px 0 rgba(0,0,0,.04), 0 10px 30px rgba(0,0,0,.12); border-top: 6px solid var(--accent); font-size: .95rem;
}
.factura .peq { color: #666; }
.fac-cab { display: flex; justify-content: space-between; gap: 1rem; padding-bottom: .7rem; border-bottom: 1px solid #e5e1d6; }
.fac-num { text-align: right; font-size: .8rem; color: #666; }
.fac-num b { color: #222; font-size: .95rem; }
.fac-linea, .fac-total { display: flex; justify-content: space-between; padding: .6rem 0; }
.fac-linea { border-bottom: 1px dashed #e5e1d6; }
.fac-total { font-weight: 800; font-size: 1.05rem; }
.fac-pie { background: #f3efe3; border-radius: 6px; padding: .6rem .75rem; text-align: center; font-size: 1rem; }
.factura .term { color: #1d5fae; background: #e6f0fb; border-color: #2a78d6; }
.factura .term:hover, .factura .term.activo { background: #2a78d6; color: #fff; }

/* Letra de cambio */
.letra {
  max-width: 520px; margin: 1rem auto; background: #f7f3e6; color: #2b2615; border-radius: 6px; overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,.12); border: 1px solid #d9cfb0;
  background-image: repeating-linear-gradient(45deg, rgba(160,140,80,.05) 0 2px, transparent 2px 8px);
}
.letra-cab { display: flex; justify-content: space-between; align-items: center; padding: .7rem 1rem; background: #2b2615; color: #f7f3e6; font-family: var(--font-title); letter-spacing: .08em; }
.letra-imp { font-family: var(--mono); letter-spacing: 0; }
.letra-cuerpo { padding: .6rem 1rem .9rem; display: grid; gap: .35rem; }
.letra-cuerpo > div { display: flex; justify-content: space-between; align-items: center; gap: 1rem; border-bottom: 1px dotted #c9bd96; padding: .3rem 0; flex-wrap: wrap; }
.letra .term { color: #5a4300; background: #efe3bb; border-color: #a88a2c; }
.letra .term:hover, .letra .term.activo { background: #5a4300; color: #fff; }

/* Día de pago (lección crédito) */
.dia-pago { max-width: 560px; margin: 1rem auto; }
.dp-barra { position: relative; display: flex; height: 38px; border-radius: 8px; overflow: visible; font-size: .8rem; font-weight: 700; }
.dp-pp { background: color-mix(in srgb, var(--aqua) 30%, var(--surface)); display: grid; place-items: center; border-radius: 8px 0 0 8px; color: var(--ink); }
.dp-cr { background: color-mix(in srgb, var(--yellow) 30%, var(--surface)); display: grid; place-items: center; border-radius: 0 8px 8px 0; color: var(--ink); }
.dp-marca { position: absolute; top: -6px; bottom: -6px; width: 4px; margin-left: -2px; background: var(--accent); border-radius: 2px; transition: left .1s; }
.dp-eje { position: relative; height: 1.4rem; font-size: .78rem; color: var(--muted); }
.dp-eje span { position: absolute; transform: translateX(-50%); top: .2rem; }
.dp-eje span:first-child { transform: none; left: 0; }
.dp-eje span:last-child { transform: translateX(-100%); }
.dp-rango { margin-top: .4rem; }
.dp-resultado { text-align: center; margin-top: .5rem; font-size: 1.1rem; }
.dp-importe { font-size: 1.6rem; font-weight: 800; font-variant-numeric: tabular-nums; }

/* Préstamo escondido */
.prestamo { display: flex; align-items: center; gap: .5rem; margin: 1.25rem auto; max-width: 560px; }
.pr-punto { display: flex; flex-direction: column; align-items: center; gap: .35rem; text-align: center; }
.pr-dia { background: var(--ink); color: var(--bg); border-radius: 999px; padding: .2rem .7rem; font-weight: 700; font-size: .85rem; }
.pr-flecha { font-size: .9rem; padding: .5rem .7rem; border-radius: 8px; }
.pr-flecha.entra { background: var(--good-soft); }
.pr-flecha.sale { background: var(--bad-soft); }
.pr-tramo { flex: 1; height: 10px; border-radius: 999px; background: var(--orange); position: relative; min-width: 60px; }
.pr-tramo span { position: absolute; top: -1.5rem; left: 50%; transform: translateX(-50%); font-size: .8rem; font-weight: 700; color: var(--ink-2); white-space: nowrap; }

.opciones-ab { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; margin-top: .5rem; }
.opciones-ab > div { background: var(--surface); border-radius: 8px; padding: .6rem .8rem; text-align: center; }
.regla { background: var(--surface-2); border-left: 4px solid var(--accent); border-radius: var(--radius-s); padding: .8rem 1rem; font-size: 1rem; }

.receta { padding-left: 1.3rem; display: grid; gap: .6rem; }
.receta li { padding-left: .3rem; }
.receta .formula { margin: .35rem 0; }

.cuenta-atras { max-width: 380px; margin: 1rem auto; background: var(--surface-2); border-radius: var(--radius-s); padding: .6rem 1rem; font-variant-numeric: tabular-nums; }
.cuenta-atras > div { display: flex; justify-content: space-between; padding: .35rem 0; }
.cuenta-atras .resta { color: var(--bad); }
.cuenta-atras .total { border-top: 2px solid var(--ink); font-weight: 800; font-size: 1.1rem; }

.fraccion-anio { max-width: 420px; margin: .5rem auto; text-align: center; }
.fa-barra { height: 14px; background: var(--surface-3); border-radius: 999px; overflow: hidden; margin-bottom: .3rem; }
.fa-barra span { display: block; height: 100%; background: var(--orange); }

/* =========================================================
   v3 · Teoría + ejemplos resueltos
   ========================================================= */
.titulo-alt { font-size: .55em; color: var(--muted); font-weight: 500; }
.teoria { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 2rem; align-items: start; }
.indice-tema { position: sticky; top: 84px; display: flex; flex-direction: column; gap: .1rem; font-size: .88rem; }
.indice-tema > b { font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: .3rem; }
.indice-tema a { text-decoration: none; color: var(--ink-2); padding: .3rem .55rem; border-radius: 6px; }
.indice-tema a:hover { background: var(--surface-2); color: var(--ink); }
@media (max-width: 900px) {
  .teoria { grid-template-columns: 1fr; }
  .indice-tema { position: static; background: var(--surface-2); border-radius: var(--radius-s); padding: .75rem; }
}
.teoria-cuerpo { min-width: 0; }
.seccion-teoria {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.4rem 1.6rem;
  margin-bottom: 1.25rem; scroll-margin-top: 84px; font-size: 1.02rem;
}
.seccion-teoria h2 { font-size: 1.45rem; }
.seccion-teoria p, .seccion-teoria li { max-width: 72ch; }
.seccion-teoria .factura, .seccion-teoria .letra { margin: 0 auto; }
.definiciones { padding-left: 1.1rem; }
.definiciones li { margin-bottom: .45rem; }
.opciones-ab.grande > div { padding: .9rem; background: var(--surface-2); line-height: 1.5; }
.ejemplo {
  background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--good); border-radius: var(--radius);
  padding: 1.25rem 1.5rem; margin-bottom: 1.25rem; box-shadow: var(--shadow);
}
.ejemplo header { display: flex; gap: .6rem; align-items: baseline; flex-wrap: wrap; margin-bottom: .5rem; }
.ejemplo header h3 { margin: 0; }
.ejemplo .ej-etiqueta { background: var(--good-soft); color: var(--good); }
.ejemplo .enunciado { background: var(--surface-2); border-radius: var(--radius-s); padding: .8rem 1rem; }
.siguiente-paso { text-align: center; padding: 1.5rem; background: var(--accent-soft); border-radius: var(--radius); margin-top: 1.5rem; }
.siguiente-paso p { font-weight: 600; }
.generador { display: flex; gap: .75rem; align-items: flex-end; flex-wrap: wrap; }
.generador .campo { min-width: 150px; }
@media (max-width: 640px) { .seccion-teoria, .ejemplo { padding: 1rem; } .opciones-ab { grid-template-columns: 1fr; } }

/* =========================================================
   v4 · Diagramas de flujos (cliente · proveedor · banco)
   ========================================================= */
.flujo { display: grid; grid-template-columns: 1fr 2fr 1fr; gap: .75rem; align-items: center; margin: 1rem 0; }
.flujo-caja, .dd-caja {
  border-radius: var(--radius-s); padding: .9rem .6rem; text-align: center; display: flex; flex-direction: column; gap: .2rem;
  border: 2px solid; font-size: .95rem;
}
.flujo-caja span, .dd-caja span { font-size: .78rem; color: var(--ink-2); }
.proveedor { border-color: var(--accent); background: var(--accent-soft); }
.cliente { border-color: var(--aqua); background: color-mix(in srgb, var(--aqua) 14%, var(--surface)); }
.banco { border-color: var(--yellow); background: var(--warn-soft); }
.flujo-flechas { display: flex; flex-direction: column; gap: .9rem; }
.flecha { position: relative; height: 2px; background: var(--ink-2); margin: 1.1rem 0 0; }
.flecha span { position: absolute; left: 50%; transform: translateX(-50%); bottom: 6px; font-size: .78rem; white-space: nowrap; color: var(--ink); background: var(--surface); padding: 0 .3rem; }
.flecha.der::after, .flecha.izq::before { content: ""; position: absolute; top: -5px; border: 6px solid transparent; }
.flecha.der::after { right: -2px; border-left-color: var(--ink-2); border-right: 0; }
.flecha.izq::before { left: -2px; border-right-color: var(--ink-2); border-left: 0; }
@media (max-width: 640px) {
  .flujo { grid-template-columns: 1fr; }
  .flecha span { white-space: normal; position: static; transform: none; display: block; text-align: center; background: none; }
  .flecha { height: auto; background: none; margin: 0; }
  .flecha::before, .flecha::after { display: none; }
}
.diagrama-descuento { margin: 1rem 0; }
.dd-fila { display: grid; grid-template-columns: repeat(3, 1fr); gap: .75rem; }
.dd-pasos { list-style: none; padding: 0; margin: 1rem 0 .5rem; display: grid; gap: .5rem; }
.dd-pasos li { display: flex; gap: .6rem; align-items: flex-start; background: var(--surface-2); border-radius: var(--radius-s); padding: .6rem .8rem; }
.dd-num { flex: 0 0 1.6rem; height: 1.6rem; border-radius: 50%; background: var(--ink); color: var(--bg); display: grid; place-items: center; font-weight: 700; font-size: .85rem; }
@media (max-width: 640px) { .dd-fila { grid-template-columns: 1fr; } }
.linea-simple { display: flex; align-items: center; gap: .5rem; max-width: 560px; margin: 1rem auto; }
.linea-simple > div:not(.ls-tramo) { display: flex; flex-direction: column; align-items: center; text-align: center; gap: .25rem; min-width: 110px; }
.linea-simple b { font-size: 1.4rem; }
.ls-tramo { flex: 1; height: 8px; border-radius: 999px; background: var(--orange); position: relative; }
.ls-tramo span { position: absolute; top: -1.5rem; left: 50%; transform: translateX(-50%); font-size: .8rem; font-weight: 700; white-space: nowrap; color: var(--ink-2); }
.letra-cab { gap: 1rem; }
.seccion-teoria .letra, .seccion-teoria .factura { align-self: start; }

/* =========================================================
   v5 · Leyendas de variables
   ========================================================= */
.vars { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-s); padding: .7rem .9rem; margin: .6rem 0 1rem; font-size: .9rem; }
.vars-tit { display: block; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--accent-ink); margin-bottom: .35rem; }
.vars dl { display: grid; grid-template-columns: max-content 1fr; gap: .3rem .9rem; margin: 0; }
.vars dt { font-weight: 700; white-space: nowrap; }
.vars dd { margin: 0; color: var(--ink-2); }
.datos-ejemplo { background: var(--accent-soft); border-radius: var(--radius-s); padding: .6rem .9rem; margin: .5rem 0 .75rem; font-size: .92rem; }
.ej-enunciado .vars { margin-top: .75rem; }
@media (max-width: 640px) { .vars dl { grid-template-columns: 1fr; gap: .1rem; } .vars dd { margin-bottom: .35rem; } }
/* Listado de fórmulas: una tarjeta por fila, para que fórmulas y leyendas tengan todo el ancho */
.rejilla.chuleta { grid-template-columns: 1fr; max-width: 900px; }
.chuleta .formula { font-size: 1.08rem; }

/* =========================================================
   v6 · Hoja de cálculo (vista tipo Excel) y descargas
   ========================================================= */
:root { --hoja-bajo: #cdebd8; --hoja-medio: #fbefcf; --hoja-alto: #f3b3b3; }
:root[data-theme="dark"] { --hoja-bajo: #1f4a31; --hoja-medio: #4a3d17; --hoja-alto: #5c2626; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --hoja-bajo: #1f4a31; --hoja-medio: #4a3d17; --hoja-alto: #5c2626; } }
.hoja { overflow-x: auto; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); }
.hoja table { font-family: "Calibri", "Carlito", var(--font); font-size: .9rem; border-collapse: collapse; width: auto; min-width: 100%; }
.hoja th { background: var(--surface-3); color: var(--ink-2); font-weight: 500; font-size: .78rem; text-align: center; padding: .25rem .5rem; border: 1px solid var(--line); position: static; text-transform: none; letter-spacing: 0; }
.hoja thead th { min-width: 64px; }
.hoja td { border: 1px solid var(--line); padding: .3rem .55rem; text-align: center; white-space: nowrap; }
.hoja .hoja-tit { text-align: left; font-weight: 700; font-size: 1rem; }
.hoja .hoja-nota { text-align: left; font-style: italic; color: var(--ink-2); white-space: normal; }
.hoja .hoja-cab { font-weight: 700; background: var(--surface-2); }
.hoja .hoja-val { cursor: pointer; color: var(--ink); font-variant-numeric: tabular-nums; }
.hoja .hoja-val:hover { outline: 2px solid var(--accent); outline-offset: -2px; }
.hoja .hoja-val.sel { outline: 2px solid var(--good); outline-offset: -2px; font-weight: 700; }
.hoja tbody tr:hover td { background-image: none; }
.hoja-det { margin-top: .6rem; }
.excel-card { border-color: color-mix(in srgb, var(--good) 45%, var(--line)); }
.excel-hojas { margin: .75rem 0 0; padding-left: 1.2rem; font-size: .92rem; }
.excel-hojas li { margin-bottom: .25rem; }
.marca-amarilla { background: #fff59d; color: #222; padding: 0 .3rem; border-radius: 3px; }

/* v7 · Explicaciones sencillas con ejemplos cotidianos */
.facil { background: var(--good-soft); border: 1px solid color-mix(in srgb, var(--good) 35%, transparent); border-radius: var(--radius); padding: 1rem 1.2rem; margin: 0 0 1.25rem; }
.facil-tit { display: block; font-weight: 800; color: var(--good); margin-bottom: .4rem; font-size: 1rem; }
.facil p, .facil li { max-width: 72ch; }
.facil > :last-child { margin-bottom: 0; }
.seccion-teoria .facil { margin: 1rem 0; }

/* v8 · Frases clave (siempre el mismo texto) */
.frase-clave { background: var(--warn-soft); border: 2px solid color-mix(in srgb, var(--warn) 55%, transparent); border-radius: var(--radius-s); padding: .65rem .9rem; margin: .8rem 0; font-weight: 700; color: var(--ink); }
.frase-clave .fc-tut { font-weight: 500; color: var(--ink-2); font-size: .88rem; }
.frases-lista { background: var(--warn-soft); border: 2px solid color-mix(in srgb, var(--warn) 55%, transparent); border-radius: var(--radius); padding: 1rem 1.2rem; margin: 0 0 1.25rem; }
.frases-lista .facil-tit { color: var(--warn); }
.frases-lista ol { margin: .3rem 0 0; padding-left: 1.3rem; font-weight: 700; }
.frases-lista li { margin-bottom: .35rem; }
.ej-solucion .frase-clave { margin: .6rem 0 0; }

/* v9 · Modo PDF (?pdf) */
.modo-pdf .cabecera, .modo-pdf .pestanas, .modo-pdf .indice-tema, .modo-pdf .ej-respuesta, .modo-pdf .generador,
.modo-pdf .icono-btn, .modo-pdf .siguiente-paso .btn, .modo-pdf [data-rein], .modo-pdf .hoja-det, .modo-pdf .ej-progreso, .modo-pdf .ej-flecha { display: none !important; }
.modo-pdf .vista, .modo-pdf .panel { display: block !important; animation: none !important; }
.modo-pdf .vista + .vista { break-before: page; }
.modo-pdf .panel { margin-bottom: 2rem; }
.modo-pdf .panel + .panel { break-before: page; }
.modo-pdf .teoria { grid-template-columns: 1fr; }
.modo-pdf .titulo-pdf { border-bottom: 3px solid var(--accent); padding-bottom: .3rem; margin: 1.5rem 0 1rem; }
.modo-pdf .ejercicio .ej-cuerpo { display: block !important; }
.modo-pdf .seccion-teoria, .modo-pdf .ejemplo, .modo-pdf .ejercicio, .modo-pdf .tarjeta { box-shadow: none; }
.modo-pdf .ej-paso, .modo-pdf .frase-clave, .modo-pdf .vars, .modo-pdf .formula, .modo-pdf .quiz-preg { break-inside: avoid; }
.modo-pdf main { max-width: none; padding-top: 0; }
@media print { .modo-pdf body { background: #fff; } }
@media print {
  @page { size: A4; margin: 12mm; }
  .modo-pdf .hoja, .modo-pdf .tabla-envoltorio { overflow: visible; }
  .modo-pdf .hoja table { font-size: 7.5pt; min-width: 0; width: 100%; }
  .modo-pdf .hoja td, .modo-pdf .hoja th { padding: 2px 3px; }
  .modo-pdf .hoja thead th { min-width: 0; }
  .modo-pdf table { font-size: 8pt; }
  .modo-pdf th, .modo-pdf td { white-space: normal; }
}

/* v10 · Mi cuenta */
.btn-cuenta { text-decoration: none; display: inline-flex; align-items: center; white-space: nowrap; }
.cuenta-msg { margin-top: .5rem; font-size: .92rem; }
.cuenta-msg .mal { color: var(--bad); font-weight: 600; }
.consentimiento { display: flex; gap: .5rem; align-items: flex-start; font-size: .9rem; margin: .5rem 0; }
.consentimiento input { margin-top: .25rem; accent-color: var(--accent); }
.asistencia-card { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.prog-tema { background: var(--surface-2); border-radius: var(--radius-s); padding: .7rem .9rem; }
.prog-barra { height: 10px; background: var(--surface-3); border-radius: 999px; overflow: hidden; margin: .35rem 0; }
.prog-barra span { display: block; height: 100%; background: var(--good); border-radius: 999px; }
.modo-pdf #v-cuenta, .modo-pdf .btn-cuenta { display: none !important; }
@media (max-width: 640px) { .btn-cuenta { font-size: .78rem; } }
