/* =========================================================================
   gymlog — hoja de estilos
   Se usa con el pulgar, en un gimnasio, con sudor y mala luz.

   Tres reglas que gobiernan todo lo de abajo:
     1. La jerarquia la hacen el tamano, el peso y el color. No las cajas.
        Una linea fina separa mejor que un borde redondeado alrededor de todo.
     2. Nada por debajo de 56 px se toca bien de pie y con prisa.
     3. Un solo color de acento. Si todo destaca, no destaca nada.
   ========================================================================= */

/* --- tipografia -------------------------------------------------------- */
/* Inter auto-alojada: la CSP es default-src 'self' y no deja traer fuentes de
   fuera. Solo latin y latin-ext, que es lo que necesita el espanol. */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("/static/fonts/inter-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
                 U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF,
                 U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("/static/fonts/inter-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
                 U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122,
                 U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* --- fichas ------------------------------------------------------------ */
:root {
  color-scheme: dark light;

  /* Negro casi puro: menos deslumbre en el gimnasio y menos bateria en OLED.
     Las superficies apenas se separan del fondo; lo que separa son las lineas. */
  --bg:        #0c0e11;
  --surface:   #14171c;
  --surface-2: #1c2027;
  --line:      #262b33;
  --line-soft: #1b1f26;

  --text:   #f2f5f8;
  --dim:    #aab4c0;
  --muted:  #6e7987;

  /* Un solo acento. Rojo: es esfuerzo, no notificacion. */
  --accent:     #e5484d;
  --accent-ink: #ffffff;
  --accent-dim: #7d1d21;

  --ok:     #35c46a;
  --ok-ink: #04160a;
  --warn:   #e0a23a;
  --danger: #e5484d;

  /* Escala de espaciado: multiplos de 4. Sin valores sueltos. */
  --s1: 4px;  --s2: 8px;  --s3: 12px; --s4: 16px;
  --s5: 24px; --s6: 32px; --s7: 48px;

  --tap: 56px;
  --radius: 10px;
  --radius-sm: 6px;
  --wrap: 640px;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg:        #f7f8fa;
    --surface:   #ffffff;
    --surface-2: #eef1f5;
    --line:      #dde2e9;
    --line-soft: #e8ecf1;
    --text:   #10151b;
    --dim:    #4a5563;
    --muted:  #7b8694;
    --accent-ink: #ffffff;
  }
}

/* --- base -------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  font-feature-settings: "cv05" 1, "ss03" 1;   /* l con cola, comillas rectas */
  -webkit-font-smoothing: antialiased;
  padding-bottom: env(safe-area-inset-bottom);
}

.wrap { max-width: var(--wrap); margin: 0 auto; padding: var(--s4) var(--s4) 96px; }

h1, h2, h3 { line-height: 1.25; letter-spacing: -0.015em; margin: 0; }
h1 { font-size: 1.5rem; font-weight: 700; margin-bottom: var(--s3); }
h2 { font-size: 1.125rem; font-weight: 650; margin: var(--s5) 0 var(--s2); }
h3 { font-size: 1rem; font-weight: 650; }

p { margin: 0 0 var(--s3); }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 2px; }

.muted { color: var(--muted); }
.dim   { color: var(--dim); }
.center { text-align: center; }
.mt { margin-top: var(--s4); }
.nowrap { white-space: nowrap; }
.inline { display: inline; }

/* Cifras alineadas en columna: sin esto las tablas de cargas bailan. */
.tabular { font-variant-numeric: tabular-nums; }

/* --- barra superior ---------------------------------------------------- */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--s3);
  padding: var(--s3) var(--s4);
  padding-top: calc(var(--s3) + env(safe-area-inset-top));
  border-bottom: 1px solid var(--line-soft);
}
.topbar__brand {
  font-weight: 750; font-size: 1.05rem; letter-spacing: -0.02em;
  color: var(--text); text-decoration: none;
}
.topbar__nav { display: flex; align-items: center; gap: var(--s3); }
.linkish {
  background: none; border: 0; color: var(--dim);
  font: inherit; font-size: .9rem; cursor: pointer; padding: var(--s2);
}
.linkish:hover { color: var(--text); }

/* --- avisos ------------------------------------------------------------ */
.flashes { display: grid; gap: var(--s2); margin-bottom: var(--s4); }
.flash {
  padding: var(--s3); border-radius: var(--radius);
  border: 1px solid var(--line); border-left-width: 3px;
  background: var(--surface); font-size: .95rem;
}
.flash--error, .flash--danger { border-left-color: var(--danger); }
.flash--success { border-left-color: var(--ok); }
.flash--info { border-left-color: var(--dim); }

/* --- botones ----------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s2);
  min-height: var(--tap); padding: 0 var(--s5);
  background: var(--accent); color: var(--accent-ink);
  border: 1px solid transparent; border-radius: var(--radius);
  font: inherit; font-weight: 650; text-decoration: none; cursor: pointer;
  touch-action: manipulation;    /* mata el retardo de 300 ms y el doble-tap-zoom */
  user-select: none;
  transition: filter .12s ease, background .12s ease;
}
.btn:active { filter: brightness(.88); }
.btn--ghost {
  background: transparent; color: var(--text); border-color: var(--line);
}
.btn--ghost:active { background: var(--surface-2); }
.btn--ok { background: var(--ok); color: var(--ok-ink); }
.btn--danger { background: transparent; color: var(--danger); border-color: var(--accent-dim); }
.btn--block { width: 100%; }
.btn--sm { min-height: 40px; padding: 0 var(--s3); font-size: .875rem; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn__side { margin-left: auto; font-weight: 400; opacity: .7; font-size: .85rem; }

/* --- formularios ------------------------------------------------------- */
label { display: block; margin-bottom: var(--s2); font-weight: 600; font-size: .95rem; }
input, select, textarea {
  width: 100%; min-height: var(--tap); padding: var(--s3);
  background: var(--surface); color: var(--text);
  border: 1px solid var(--line); border-radius: var(--radius);
  font-family: inherit;
  font-size: 16px;   /* 16 px o mas: por debajo, iOS Safari hace zoom al enfocar */
}
textarea { min-height: 110px; resize: vertical; line-height: 1.55; }
input::placeholder, textarea::placeholder { color: var(--muted); }
input:focus, select:focus, textarea:focus {
  outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent;
}
.field { margin-bottom: var(--s4); }
.field__error { color: var(--danger); font-size: .875rem; margin: var(--s1) 0 0; }
.help { color: var(--muted); font-size: .875rem; margin: var(--s1) 0 0; line-height: 1.45; }
.grid { display: grid; gap: 0 var(--s3); grid-template-columns: 1fr; }
@media (min-width: 520px) {
  .grid { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
}
.check { display: flex; align-items: center; gap: var(--s3); font-weight: 400; }
.check input[type="checkbox"] {
  width: 22px; height: 22px; min-height: 0; flex: 0 0 auto; accent-color: var(--accent);
}
.check--sm { font-size: .9rem; }

/* Guardar siempre al alcance del pulgar. */
.sticky-save {
  position: sticky; bottom: 0; z-index: 5;
  padding: var(--s4) 0 calc(var(--s4) + env(safe-area-inset-bottom));
  background: linear-gradient(to top, var(--bg) 72%, transparent);
}

/* --- tarjetas ---------------------------------------------------------- */
.card {
  background: var(--surface); border: 1px solid var(--line-soft);
  border-radius: var(--radius); padding: var(--s4); margin-bottom: var(--s3);
}
.card--link { display: block; text-decoration: none; color: inherit; }
.card--link:active { border-color: var(--accent); }
.card--active { border-color: var(--ok); }
.card--warn  { border-left: 3px solid var(--warn); }
.card--done  { opacity: .55; }
.card--rest  { text-align: center; }
.card__title {
  font-size: 1rem; font-weight: 650; margin: 0 0 var(--s2);
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2);
}
.card__edit { margin-left: auto; font-size: .85rem; font-weight: 400; }

/* --- etiquetas --------------------------------------------------------- */
.tag {
  display: inline-block; padding: 1px var(--s2); border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--line);
  color: var(--muted); font-size: .7rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .06em;
}
.tag--ok   { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 40%, transparent); }
.tag--warn { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 40%, transparent); }
.tag--prep { text-transform: none; letter-spacing: 0; font-weight: 500; }

/* --- "no medido" -------------------------------------------------------
   NULL significa "no medido" en todo el sistema. Nunca se pinta como vacio ni
   como cero: el hueco tiene que verse. */
.nd {
  color: var(--muted); font-style: italic;
  background: var(--surface-2); border-radius: var(--radius-sm);
  padding: 1px var(--s2); font-size: .875em; white-space: nowrap;
}

/* --- tablas ------------------------------------------------------------ */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 calc(var(--s4) * -1); padding: 0 var(--s4); }
table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
th, td { padding: var(--s3) var(--s2); text-align: left; border-bottom: 1px solid var(--line-soft); }
th {
  color: var(--muted); font-size: .7rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .06em;
}
tfoot th { color: var(--text); border-top: 1px solid var(--line); }

/* --- prosa (markdown del admin) ---------------------------------------- */
.prose { line-height: 1.65; color: var(--dim); }
.prose h2, .prose h3 { color: var(--text); }
.prose strong { color: var(--text); }
.prose table { margin: var(--s3) 0; display: block; overflow-x: auto; }
.prose code {
  background: var(--surface-2); padding: 1px var(--s1);
  border-radius: var(--radius-sm); font-size: .9em;
}
.prose blockquote {
  margin: var(--s3) 0; padding: var(--s2) var(--s3);
  border-left: 3px solid var(--accent); background: var(--surface);
}

/* --- estados vacios y errores ------------------------------------------ */
.empty { text-align: center; padding: var(--s7) var(--s4); }
.empty__code {
  font-size: 3rem; font-weight: 800; color: var(--muted);
  margin: 0 0 var(--s2); letter-spacing: -0.03em;
}
.actions { display: flex; flex-wrap: wrap; gap: var(--s2); margin-top: var(--s3); }
.actions--center { justify-content: center; }

/* =========================================================================
   Pantalla de inicio
   ========================================================================= */
.today__title { font-size: 1.6rem; margin-bottom: 0; }
.today__date { margin-top: 0; color: var(--muted); text-transform: none; }
.today__date::first-letter { text-transform: uppercase; }

.btn--hero {
  width: 100%; min-height: 104px; flex-direction: column; gap: 2px;
  font-size: 1.4rem; letter-spacing: -0.02em; margin-bottom: var(--s4);
}
.btn--resume { background: var(--warn); color: #1a1204; }
.btn__kicker {
  font-size: .7rem; font-weight: 750; letter-spacing: .14em;
  text-transform: uppercase; opacity: .75;
}

.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s3); margin-top: var(--s5); }
.tile {
  display: flex; flex-direction: column; justify-content: center;
  min-height: 84px; padding: var(--s4); text-decoration: none;
  background: var(--surface); border: 1px solid var(--line-soft);
  border-radius: var(--radius); color: var(--text);
}
.tile__label { font-weight: 650; }
.tile__sub { color: var(--muted); font-size: .85rem; margin-top: 2px; }

.pesoform { display: flex; gap: var(--s2); align-items: stretch; }
.pesoform input { flex: 1 1 auto; font-size: 1.4rem; text-align: center; font-weight: 700; }
.pesoform .btn { flex: 0 0 auto; }
.mealist { list-style: none; padding: 0; margin: 0 0 var(--s2); }
.mealist li { padding: var(--s2) 0; border-bottom: 1px solid var(--line-soft); }
.mealist li:last-child { border-bottom: 0; }
.mealist strong { text-transform: capitalize; }
.bignum { font-size: 2.2rem; font-weight: 800; margin: 0 0 var(--s2);
          line-height: 1; letter-spacing: -0.03em; }
.bignum span { font-size: 1rem; font-weight: 400; color: var(--muted); }

/* =========================================================================
   Rutina — el dia, la sesion y sus ejercicios
   ========================================================================= */

/* Selector de dia: se desliza en horizontal, como las pestanas de una libreta. */
.daytabs {
  display: flex; gap: var(--s5);
  overflow-x: auto; -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  margin: 0 calc(var(--s4) * -1) var(--s5);
  padding: 0 var(--s4);
  border-bottom: 1px solid var(--line-soft);
}
.daytabs::-webkit-scrollbar { display: none; }
.daytab {
  flex: 0 0 auto; padding: var(--s2) 0 var(--s3);
  text-decoration: none; text-align: center;
  border-bottom: 2px solid transparent;
  color: var(--muted); min-width: 56px;
}
.daytab__dia {
  display: block; font-size: 1.05rem; font-weight: 650; letter-spacing: -0.01em;
}
.daytab__ses {
  display: block; font-size: .7rem; margin-top: 1px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 84px;
}
.daytab.is-active { color: var(--text); border-bottom-color: var(--accent); }
.daytab.is-active .daytab__ses { color: var(--dim); }
.daytab.is-rest .daytab__dia { font-weight: 400; opacity: .55; }

/* Cabecera de la sesion: el nombre pesa, el enfasis acompana. */
.sessionhead {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: var(--s3); margin-bottom: var(--s4);
}
.sessionhead h1 {
  font-size: 1.75rem; font-weight: 750; letter-spacing: -0.025em;
  color: var(--accent); margin: 0;
}
.sessionhead__nota {
  color: var(--muted); font-size: .8rem; text-align: right; flex: 0 0 auto;
}

/* Lista de ejercicios. Sin cajas: solo lineas finas y una columna de numeros.
   Es lo que hace que se lea como una hoja de entrenamiento y no como un
   formulario. */
.exlist { list-style: none; margin: 0; padding: 0; }
.exrow {
  display: grid;
  grid-template-columns: 22px 1fr auto;
  gap: 0 var(--s3);
  align-items: baseline;
  padding: var(--s4) 0;
  border-bottom: 1px solid var(--line-soft);
}
.exrow:first-child { padding-top: var(--s2); }
.exrow__n {
  color: var(--muted); font-size: .95rem; font-variant-numeric: tabular-nums;
  text-align: right;
}
.exrow__nombre { font-size: 1.05rem; font-weight: 650; letter-spacing: -0.01em; margin: 0; }
.exrow__musculo { color: var(--dim); font-size: .85rem; margin: 2px 0 0; }
.exrow__presc {
  color: var(--dim); font-size: .95rem; font-weight: 550;
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
.exrow__meta {
  grid-column: 2 / -1; margin: var(--s2) 0 0;
  color: var(--muted); font-size: .85rem;
}
.exrow__meta strong { color: var(--dim); font-weight: 600; }
.exrow__nota { grid-column: 2 / -1; margin: var(--s1) 0 0;
               color: var(--muted); font-size: .85rem; }
.exrow--link { text-decoration: none; color: inherit; }

/* Barra de estado al pie: dice de un vistazo si vas al dia. */
.statusbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--s3);
  padding: var(--s2) var(--s4);
  padding-bottom: calc(var(--s2) + env(safe-area-inset-bottom));
  background: var(--surface); border-top: 1px solid var(--line);
  font-size: .8rem; color: var(--muted);
}
.statusbar__estado { display: flex; align-items: center; gap: var(--s2); }
.statusbar__punto {
  width: 7px; height: 7px; border-radius: 50%; background: var(--ok);
  flex: 0 0 auto;
}
.statusbar__punto--warn { background: var(--warn); }
.statusbar__punto--off { background: var(--muted); }

/* =========================================================================
   Registrar en el gimnasio
   ========================================================================= */
.exhead {
  position: sticky; top: 0; z-index: 10;
  margin: calc(var(--s4) * -1) calc(var(--s4) * -1) var(--s4);
  padding: calc(var(--s2) + env(safe-area-inset-top)) var(--s4) var(--s3);
  background: var(--bg); border-bottom: 1px solid var(--line);
}
.exhead__top { display: flex; justify-content: space-between; align-items: center; }
.exhead__back { font-size: 1.4rem; text-decoration: none; padding: var(--s1) var(--s2) var(--s1) 0;
                color: var(--dim); }
.exhead__count { color: var(--muted); font-size: .8rem; font-variant-numeric: tabular-nums; }
.exhead__name { font-size: 1.2rem; font-weight: 700; letter-spacing: -0.02em; margin: 2px 0 var(--s1); }
.exhead__presc { margin: 0; font-size: .95rem; color: var(--dim); }
.exhead__presc strong { color: var(--text); }
.exhead__last { margin: var(--s1) 0 0; color: var(--muted); font-size: .85rem; }
.technote { color: var(--muted); font-size: .875rem; margin: 0 0 var(--s4); }

.setrow {
  background: var(--surface); border: 1px solid var(--line-soft);
  border-left: 3px solid var(--line);
  border-radius: var(--radius); padding: var(--s4); margin-bottom: var(--s3);
}
.setrow--saved, .setrow.is-saved { border-left-color: var(--ok); }
.setrow.is-pending { border-left-color: var(--warn); }
.setrow.is-error   { border-left-color: var(--danger); }
.setrow--skipped   { opacity: .5; }
.setrow__head { display: flex; justify-content: space-between; align-items: baseline;
                margin-bottom: var(--s3); }
.setrow__n { font-weight: 750; font-size: 1.05rem; letter-spacing: .02em; }
.setrow__state { color: var(--muted); font-size: .78rem; }
.setrow__foot { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3); }

.stepper { display: flex; align-items: stretch; gap: var(--s2); margin-bottom: var(--s2); }
.stepper__btn {
  flex: 0 0 var(--tap); min-height: var(--tap);
  background: var(--surface-2); color: var(--text);
  border: 1px solid var(--line); border-radius: var(--radius);
  font-size: 1.5rem; line-height: 1; cursor: pointer;
  touch-action: manipulation; user-select: none;
}
.stepper__btn:active { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.stepper__slot { flex: 1 1 auto; position: relative; margin: 0; }
.stepper__slot input {
  text-align: center; font-size: 1.7rem; font-weight: 700;
  min-height: var(--tap); padding-right: 46px;
  font-variant-numeric: tabular-nums; letter-spacing: -0.02em;
}
.stepper__slot input.is-suggested { color: var(--muted); font-weight: 400; }
.stepper__unit {
  position: absolute; right: var(--s3); top: 50%; transform: translateY(-50%);
  color: var(--muted); font-size: .8rem; pointer-events: none;
}

.chips { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s1); margin-bottom: var(--s3); }
.chips__label {
  color: var(--muted); font-size: .7rem; margin-right: var(--s1);
  text-transform: uppercase; letter-spacing: .06em; font-weight: 700;
}
.chip {
  min-width: 44px; min-height: 46px; padding: 0 var(--s1);
  background: var(--surface-2); color: var(--text);
  border: 1px solid var(--line); border-radius: var(--radius);
  font: inherit; font-size: 1rem; font-weight: 650; cursor: pointer;
  touch-action: manipulation; user-select: none;
}
.chip.is-on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.chips[data-field="rir"] { flex-wrap: nowrap; }
.chips[data-field="rir"] .chip { flex: 1 1 0; min-width: 0; }
.chips--score .chip { flex: 1 1 auto; }

.resttimer {
  position: sticky; top: 128px; z-index: 9;
  display: flex; align-items: center; gap: var(--s3);
  padding: var(--s2) var(--s3); margin-bottom: var(--s3);
  background: var(--surface-2); border: 1px solid var(--warn);
  border-radius: var(--radius);
}
.resttimer__label { color: var(--muted); font-size: .7rem;
                    text-transform: uppercase; letter-spacing: .06em; font-weight: 700; }
.resttimer__clock { font-size: 1.5rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.resttimer .btn { margin-left: auto; }

.bottombar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: flex; gap: 1px; background: var(--line);
  padding-bottom: env(safe-area-inset-bottom);
}
.bottombar__btn {
  flex: 1 1 0; min-height: 60px;
  display: flex; align-items: center; justify-content: center;
  background: var(--surface); color: var(--text);
  text-decoration: none; font-weight: 650; font-size: .95rem;
  touch-action: manipulation;
}
.bottombar__btn--main { background: var(--accent); color: var(--accent-ink); }
.bottombar__btn.is-off { color: var(--muted); opacity: .4; }

.progress { color: var(--muted); font-size: .85rem; margin: var(--s1) 0 0;
            font-variant-numeric: tabular-nums; }
.presc { font-size: 1rem; margin: var(--s1) 0; color: var(--dim); }
.presc strong { color: var(--text); }
.daybadge {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; border-radius: var(--radius-sm);
  background: var(--surface-2); color: var(--muted); font-size: .8rem;
}

/* =========================================================================
   Entrada de sesion / login / asistente de entrevista
   ========================================================================= */
.auth { max-width: 380px; margin: 12vh auto 0; padding: 0 var(--s1); }
.auth__title {
  text-align: center; font-size: 2rem; font-weight: 800;
  letter-spacing: -0.03em; margin-bottom: var(--s5);
}

.wiz { max-width: 560px; margin: 0 auto; }
.wiz__head { margin-bottom: var(--s4); }
.wiz__meta { display: flex; justify-content: space-between; align-items: center;
             margin-bottom: var(--s2); }
.wiz__paso { color: var(--muted); font-size: .7rem; text-transform: uppercase;
             letter-spacing: .1em; font-weight: 750; }
.wiz__atras { text-decoration: none; font-size: .9rem; color: var(--dim); }
.wiz__barra { height: 3px; background: var(--surface-2); border-radius: 999px;
              overflow: hidden; margin-bottom: var(--s5); }
.wiz__barra span { display: block; height: 100%; background: var(--accent);
                   border-radius: 999px; transition: width .25s ease; }
.wiz__titulo { font-size: 1.6rem; font-weight: 750; letter-spacing: -0.025em; margin: 0 0 var(--s2); }
.wiz__intro { color: var(--dim); margin: 0 0 var(--s4); }
.wiz__nota { color: var(--muted); font-size: .85rem; text-align: center; margin: 0 0 var(--s3); }

.wizlist { list-style: none; padding: 0; margin: var(--s5) 0 0; }
.wizlist__item a {
  display: flex; align-items: center; gap: var(--s3);
  min-height: var(--tap); padding: var(--s2) var(--s3); margin-bottom: var(--s2);
  background: var(--surface); border: 1px solid var(--line-soft);
  border-radius: var(--radius); text-decoration: none; color: var(--text);
}
.wizlist__n {
  flex: 0 0 auto; width: 26px; height: 26px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--surface-2); color: var(--muted); font-size: .8rem; font-weight: 650;
}
.wizlist__txt { flex: 1 1 auto; }
.wizlist__ok { color: var(--ok); font-weight: 700; }
.wizlist__item.is-done .wizlist__n { background: var(--ok); color: var(--ok-ink); }

.resumen { margin: 0; }
.resumen dt { color: var(--muted); font-size: .7rem; margin-top: var(--s3);
              text-transform: uppercase; letter-spacing: .06em; font-weight: 700; }
.resumen dd { margin: 2px 0 0; white-space: pre-wrap; }

/* =========================================================================
   Panel de administracion
   ========================================================================= */
.block {
  background: var(--surface); border: 1px solid var(--line-soft);
  border-radius: var(--radius); margin-bottom: var(--s3);
}
.block__head {
  padding: var(--s3) var(--s4); cursor: pointer; font-weight: 650;
  display: flex; align-items: center; gap: var(--s3); min-height: var(--tap);
  list-style: none;
}
.block__head::-webkit-details-marker { display: none; }
.block__head::after { content: "▾"; margin-left: auto; color: var(--muted); }
.block[open] .block__head::after { content: "▴"; }
.block__n {
  display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--surface-2); color: var(--muted); font-size: .78rem; font-weight: 650;
}
.block__body { padding: var(--s4); border-top: 1px solid var(--line-soft); }

.statgrid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s4); margin: var(--s3) 0; }
.stat__label { display: block; color: var(--muted); font-size: .7rem;
               text-transform: uppercase; letter-spacing: .06em; font-weight: 700; }
.stat__value { display: block; font-size: 1.3rem; font-weight: 700;
               letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.delta { display: block; font-size: .82rem; font-weight: 600; }
.delta--down { color: var(--ok); }
.delta--up { color: var(--warn); }

.checklist { list-style: none; padding: 0; margin: var(--s3) 0 0; }
.checklist li { padding: var(--s1) 0 var(--s1) var(--s5); position: relative; }
.checklist li::before { position: absolute; left: 0; font-weight: 700; }
.checklist .done::before { content: "✓"; color: var(--ok); }
.checklist .todo::before { content: "•"; color: var(--warn); }

.row--fail td { color: var(--muted); }
.mono {
  width: 100%; font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  font-size: 13px; line-height: 1.5; white-space: pre;
  overflow-wrap: normal; overflow-x: auto;
}

/* [hidden] pone display:none, pero lo pisa cualquier clase con display. */
[hidden] { display: none !important; }

/* La nota de tecnica, plegada: la hoja se lee de un vistazo y el detalle
   queda a un toque. */
.exnota { grid-column: 2 / -1; margin-top: var(--s2); }
.exnota > summary {
  list-style: none; cursor: pointer; display: inline-block;
  color: var(--muted); font-size: .8rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .06em;
  padding: var(--s1) 0; min-height: 28px;
}
.exnota > summary::-webkit-details-marker { display: none; }
.exnota > summary::after { content: " ▾"; }
.exnota[open] > summary::after { content: " ▴"; }
.exnota > p {
  margin: var(--s1) 0 0; color: var(--dim); font-size: .875rem;
  line-height: 1.55; border-left: 2px solid var(--line);
  padding-left: var(--s3);
}
.exrow__musculo::first-letter { text-transform: uppercase; }
