/* ==========================================================================================================
   CardioTeca · ESPACIO Salud Cardiovascular · herramienta «Mi peso y mi cintura» (encargo E3, 20-21/10/2026)
   ----------------------------------------------------------------------------------------------------------
   · Va en /templates/ja_blockk/local/css/salud-peso-cintura.css (como la hoja de cada ESPACIO) y la enlaza el
     artículo con <link rel="stylesheet" href=".../salud-peso-cintura.css?v=N">.
   · Todo cuelga de .sc-herr, el recuadro de la herramienta dentro de .pildora-wrap. Sin paleta propia: los
     valores con nombre de la web (--ct-…) con su valor de reserva detrás de la coma.
   · Reglas de los ESPACIOS que se aplican: cifras a escala con su rejilla; cajas con las esquinas redondeadas,
     nunca píldoras; el color es señal (verde, ámbar, granate); todo cabe en 360 px; se imprime solo la hoja.
   ========================================================================================================== */
.sc-herr {
  --sc-tinta: var(--ct-tinta, #13233b);
  --sc-texto-2: var(--ct-gris-azulado, #44505f);
  --sc-gris: var(--ct-gris, #5f6b7a);
  --sc-linea: var(--ct-linea, #dbe3ec);
  --sc-linea-fuerte: var(--ct-linea-fuerte, #b5c7da);
  --sc-suave: var(--ct-suave, #f2f5f9);
  --sc-suave-2: var(--ct-suave-2, #e6edf5);
  --sc-marino: var(--ct-azul, #163a63);
  --sc-azul: var(--ct-enlace, #1d5a9e);
  --sc-granate: var(--ct-acento, #97112a);
  --sc-granate-suave: var(--ct-error-suave, #faecee);
  --sc-verde: var(--ct-acierto, #2e7d32);
  --sc-verde-suave: var(--ct-acierto-suave, #f0f7f1);
  --sc-ambar: var(--ct-aviso, #c2630a);
  --sc-ambar-suave: var(--ct-aviso-suave, #fdf3e7);
  --sc-bajo: #5b7fa6;              /* bajo peso: azul apagado, no es un semáforo */
  --sc-sombra: var(--ct-sombra-1, 0 1px 2px rgba(19, 35, 59, .05), 0 6px 18px rgba(19, 35, 59, .07));
  --sc-radio: 12px;
  font-family: var(--ct-letra, "Barlow", -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif);
  font-variant-numeric: lining-nums tabular-nums;
  color: var(--sc-tinta);
  background: #fff;
  border: 1px solid var(--sc-linea);
  border-radius: var(--sc-radio);
  box-shadow: var(--sc-sombra);
  padding: 22px 22px 18px;
  margin: 28px 0 32px;
  font-size: 17px;
  line-height: 1.45;
  box-sizing: border-box;
}
.sc-herr *, .sc-herr *::before, .sc-herr *::after { box-sizing: border-box; }
.sc-herr p { margin: 0 0 10px; }
.sc-herr p:last-child { margin-bottom: 0; }
.sc-herr [hidden] { display: none !important; }

/* ---- cabecera ---- */
.sc-herr .sc-eti {
  display: inline-block; font-size: 12.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--sc-granate); background: var(--sc-granate-suave); border-radius: 6px; padding: 4px 9px; margin-bottom: 8px;
}
.sc-herr .sc-tit { font-size: 26px; font-weight: 800; line-height: 1.15; color: var(--sc-marino); margin: 0 0 6px; }
.sc-herr .sc-sub { color: var(--sc-texto-2); font-size: 16px; margin: 0 0 16px; }

/* ---- formulario ---- */
.sc-herr .sc-fila { display: flex; flex-wrap: wrap; gap: 12px 16px; margin-bottom: 12px; }
.sc-herr .sc-campo { display: flex; flex-direction: column; gap: 4px; flex: 1 1 140px; min-width: 0; }
.sc-herr .sc-campo > span { font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--sc-gris); }
.sc-herr .sc-con-unidad { position: relative; display: flex; align-items: center; }
.sc-herr input[type="number"], .sc-herr input[type="text"], .sc-herr select {
  width: 100%; font: inherit; font-size: 20px; font-weight: 600; color: var(--sc-tinta); background: #fff;
  border: 2px solid var(--sc-linea-fuerte); border-radius: 8px; padding: 9px 12px; min-height: 48px; margin: 0;
}
.sc-herr .sc-con-unidad input { padding-right: 46px; }
.sc-herr .sc-unidad { position: absolute; right: 12px; font-size: 14px; font-weight: 700; color: var(--sc-gris); pointer-events: none; }
.sc-herr input:focus, .sc-herr select:focus, .sc-herr button:focus-visible { outline: none; box-shadow: var(--ct-aro-foco, 0 0 0 3px rgba(29, 90, 158, .14)); border-color: var(--sc-azul); }
.sc-herr input.sc-mal { border-color: var(--sc-granate); background: var(--sc-granate-suave); }
.sc-herr .sc-error { color: var(--sc-granate); font-size: 14.5px; font-weight: 600; margin: 0 0 10px; }

.sc-herr .sc-enlace-btn {
  background: none; border: 0; padding: 0; font: inherit; font-size: 14.5px; font-weight: 600; color: var(--sc-azul);
  text-decoration: none; cursor: pointer; text-align: left;   /* sin subrayado (Ramón, 09/11/2026): lo distingue el color */
}
.sc-herr .sc-ayuda { background: var(--sc-suave); border-radius: 10px; padding: 12px 14px; margin: 0 0 14px; font-size: 15.5px; }
.sc-herr .sc-ayuda ol { margin: 6px 0 0; padding-left: 22px; }
.sc-herr .sc-ayuda li { margin-bottom: 4px; }

/* botones de elección (la cara y la situación): cajas, no píldoras */
.sc-herr .sc-grupo { margin: 4px 0 12px; }
.sc-herr .sc-grupo > span { display: block; font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--sc-gris); margin-bottom: 6px; }
.sc-herr .sc-opc { display: flex; flex-wrap: wrap; gap: 8px; }
.sc-herr .sc-opc button {
  flex: 1 1 150px; font: inherit; font-size: 15.5px; font-weight: 700; color: var(--sc-marino); background: #fff;
  border: 2px solid var(--sc-linea-fuerte); border-radius: 8px; padding: 10px 12px; min-height: 46px; cursor: pointer;
  transition: background .18s, border-color .18s, color .18s;
}
.sc-herr .sc-opc button:hover { background: var(--sc-suave); }
.sc-herr .sc-opc button[aria-pressed="true"] { background: var(--sc-marino); border-color: var(--sc-marino); color: #fff; }
.sc-herr .sc-opc button small { display: block; font-size: 13px; font-weight: 500; opacity: .85; }

.sc-herr .sc-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: inherit; font-size: 17px; font-weight: 700;
  color: #fff; background: var(--sc-granate); border: 0; border-radius: 8px; padding: 13px 22px; min-height: 50px; cursor: pointer;
  transition: background .18s, transform .18s; width: 100%;
}
.sc-herr .sc-btn:hover { background: #7d0e23; }
.sc-herr .sc-btn-2 { background: #fff; color: var(--sc-marino); border: 2px solid var(--sc-marino); }
.sc-herr .sc-btn-2:hover { background: var(--sc-suave); }
@media (min-width: 600px) { .sc-herr .sc-btn { width: auto; } }

/* ---- resultado ---- */
.sc-herr .sc-res { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--sc-linea); }
.sc-herr .sc-cifras { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 18px; }
.sc-herr .sc-cifra { border: 1px solid var(--sc-linea); border-radius: 10px; padding: 12px 14px; background: #fff; border-top: 5px solid var(--sc-gris); }
.sc-herr .sc-cifra.verde { border-top-color: var(--sc-verde); }
.sc-herr .sc-cifra.ambar { border-top-color: var(--sc-ambar); }
.sc-herr .sc-cifra.rojo { border-top-color: var(--sc-granate); }
.sc-herr .sc-cifra.bajo { border-top-color: var(--sc-bajo); }
.sc-herr .sc-cifra > span { display: block; font-size: 12.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--sc-gris); }
.sc-herr .sc-cifra > b { display: block; font-size: 34px; font-weight: 800; line-height: 1.1; color: var(--sc-marino); margin: 4px 0 2px; }
.sc-herr .sc-cifra > b small { font-size: 15px; font-weight: 600; color: var(--sc-gris); margin-left: 3px; }
.sc-herr .sc-cifra > i { display: block; font-style: normal; font-size: 14.5px; font-weight: 700; }
.sc-herr .sc-cifra.verde > i { color: var(--sc-verde); }
.sc-herr .sc-cifra.ambar > i { color: var(--sc-ambar); }
.sc-herr .sc-cifra.rojo > i { color: var(--sc-granate); }
.sc-herr .sc-cifra.bajo > i { color: var(--sc-bajo); }

/* la escala: tramos a escala, rejilla debajo y la aguja del lector */
.sc-herr .sc-escala { margin: 0 0 22px; }
.sc-herr .sc-escala > p { font-size: 15.5px; font-weight: 700; color: var(--sc-marino); margin: 0 0 22px; }
.sc-herr .sc-escala > p span { font-weight: 500; color: var(--sc-gris); }
.sc-herr .sc-barra { position: relative; display: flex; height: 30px; border-radius: 8px; overflow: visible; }
.sc-herr .sc-tramo { height: 100%; flex: 0 0 auto; min-width: 0; display: flex; align-items: center; justify-content: center; font-size: 12.5px; font-weight: 700; color: #fff; overflow: hidden; white-space: nowrap; }
.sc-herr .sc-tramo:first-child { border-radius: 8px 0 0 8px; }
.sc-herr .sc-tramo:last-child { border-radius: 0 8px 8px 0; }
.sc-herr .sc-tramo.bajo { background: var(--sc-bajo); }
.sc-herr .sc-tramo.verde { background: var(--sc-verde); }
.sc-herr .sc-tramo.ambar { background: var(--sc-ambar); }
.sc-herr .sc-tramo.rojo { background: var(--sc-granate); }
.sc-herr .sc-tramo.rojo2 { background: #7d0e23; }
.sc-herr .sc-tramo.rojo3 { background: #5c0a19; }
.sc-herr .sc-rej { position: relative; height: 22px; margin-top: 4px; font-size: 12.5px; font-weight: 600; color: var(--sc-gris); }
.sc-herr .sc-rej span { position: absolute; top: 0; transform: translateX(-50%); white-space: nowrap; padding-top: 6px; }
.sc-herr .sc-rej span::before { content: ""; position: absolute; left: 50%; top: -4px; height: 8px; border-left: 1px solid var(--sc-linea-fuerte); }
.sc-herr .sc-rej span.ini { transform: none; }
.sc-herr .sc-rej span.ini::before { left: 0; }
.sc-herr .sc-rej span.fin { transform: translateX(-100%); }
.sc-herr .sc-rej span.fin::before { left: auto; right: 0; }
.sc-herr .sc-aguja { position: absolute; top: -20px; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; pointer-events: none; }
.sc-herr .sc-aguja b { font-size: 15px; font-weight: 800; color: var(--sc-tinta); background: #fff; border: 2px solid var(--sc-tinta); border-radius: 6px; padding: 1px 7px; line-height: 1.25; white-space: nowrap; }
.sc-herr .sc-aguja i { width: 0; height: 0; border-left: 8px solid transparent; border-right: 8px solid transparent; border-top: 10px solid var(--sc-tinta); margin-top: 1px; }
.sc-herr .sc-escala.sin-aguja .sc-aguja { display: none; }

/* ---- el plan ---- */
.sc-herr .sc-plan h3, .sc-herr .sc-plan h4 { font-family: inherit; }
.sc-herr .sc-plan .sc-h { font-size: 20px; font-weight: 800; color: var(--sc-marino); margin: 22px 0 10px; line-height: 1.2; }
.sc-herr .sc-plan .sc-h span { display: inline-block; font-size: 12.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #fff; background: var(--sc-marino); border-radius: 6px; padding: 3px 8px; vertical-align: 3px; margin-right: 8px; }
.sc-herr .sc-pasos { display: grid; gap: 8px; margin: 0 0 14px; }
.sc-herr .sc-paso { display: grid; grid-template-columns: 36px 1fr; gap: 10px; align-items: start; border: 1px solid var(--sc-linea); border-radius: 10px; padding: 10px 12px; }
.sc-herr .sc-paso .n { width: 36px; height: 36px; border-radius: 50%; background: var(--sc-marino); color: #fff; font-weight: 800; font-size: 16px; display: flex; align-items: center; justify-content: center; }
.sc-herr .sc-paso b { display: block; font-size: 16.5px; margin-bottom: 2px; }
.sc-herr .sc-paso span { font-size: 15.5px; color: var(--sc-texto-2); }
.sc-herr .sc-paso.rojo { border-color: #efc5c0; background: var(--sc-granate-suave); }
.sc-herr .sc-paso.rojo .n { background: var(--sc-granate); }
.sc-herr .sc-paso.verde .n { background: var(--sc-verde); }
.sc-herr .sc-objetivo { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin: 0 0 14px; }
.sc-herr .sc-obj { background: var(--sc-suave); border-radius: 10px; padding: 12px 14px; }
.sc-herr .sc-obj span { display: block; font-size: 12.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--sc-gris); }
.sc-herr .sc-obj b { display: block; font-size: 26px; font-weight: 800; color: var(--sc-marino); line-height: 1.15; margin: 3px 0; }
.sc-herr .sc-obj i { display: block; font-style: normal; font-size: 14px; color: var(--sc-texto-2); }
.sc-herr .sc-obj.alerta { background: var(--sc-granate-suave); }
.sc-herr .sc-obj.alerta b { color: var(--sc-granate); }
.sc-herr .sc-nota { font-size: 14.5px; color: var(--sc-gris); }
.sc-herr .sc-fuente { font-size: 13.5px; color: var(--sc-gris); }

/* señales que no esperan, dentro de la herramienta */
.sc-herr .sc-alarma { border: 1px solid #efc5c0; border-left: 6px solid var(--sc-granate); background: var(--sc-granate-suave); border-radius: 10px; padding: 12px 14px 12px 16px; margin: 14px 0; }
.sc-herr .sc-alarma b.t { display: block; color: var(--sc-granate); font-size: 16px; margin-bottom: 6px; }
.sc-herr .sc-alarma ul { margin: 0; padding-left: 18px; font-size: 15.5px; }
.sc-herr .sc-alarma li { margin-bottom: 4px; }

/* pie: imprimir y aviso */
.sc-herr .sc-pie { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--sc-linea); }
.sc-herr .sc-aviso { font-size: 14px; color: var(--sc-gris); margin-top: 12px; }

@media (max-width: 480px) {
  .sc-herr { padding: 16px 14px 14px; font-size: 16px; }
  .sc-herr .sc-tit { font-size: 23px; }
  .sc-herr .sc-cifra > b { font-size: 30px; }
  .sc-herr .sc-tramo { font-size: 0; }   /* en el móvil los rótulos de los tramos no caben: queda el color y la rejilla */
  .sc-herr .sc-rej { font-size: 12px; }
  .sc-herr .sc-opc button { flex-basis: 100%; }
  .sc-herr .sc-campo { flex-basis: calc(50% - 8px); }
  .sc-herr .sc-campo.ancho { flex-basis: 100%; }
}

/* en papel la herramienta no se imprime: lo que se imprime es el diario, en su ventana */
@media print { .sc-herr { display: none; } }
