/*! © 2026 ÁRBOLA® Consultoría de Gestión. Todos los derechos reservados.
   Semáforo de proyecto, herramienta de arbola.com.ar. Prohibida su copia, reproducción
   o uso total o parcial sin autorización escrita de ÁRBOLA. */

/* ─── SEMÁFORO DE OBRA ───
   Se carga después de styles.css y paginas.css, y solo usa las variables de
   color de :root. La paleta no tiene amarillo ni rojo: el amarillo es naranja
   aclarado con crema y el rojo es naranja oscurecido, y cada estado se lee
   además por la luz encendida (arriba, medio o abajo) y por su texto. */

.semaforo {
  --sem-verde: var(--jade);
  /* La paleta de ÁRBOLA no tiene amarillo: el semáforo usa uno propio para que se reconozca como tal */
  --sem-amarillo: #f2b705;
  --sem-rojo: var(--naranja);
  --sem-rojo: color-mix(in srgb, var(--naranja) 78%, var(--negro));
  --sem-apagada: rgba(80, 77, 73, .14);
}

/* Portada sin captura de pantalla debajo */
/* El degradado entra completo (crema, celeste y naranja) y se funde con el crema solo al final */
.sem-hero { padding-bottom: 13rem; }
.p-hero.claro.sem-hero, .p-hero.claro.sem-hero::before { background-size: 100% 100%; }
.sem-hero::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 38%;
  /* Curva suave en varios pasos para que no se marque una línea donde empieza el fundido */
  background: linear-gradient(to bottom,
    rgba(246, 244, 238, 0) 0%, rgba(246, 244, 238, .03) 15%, rgba(246, 244, 238, .1) 30%,
    rgba(246, 244, 238, .25) 45%, rgba(246, 244, 238, .45) 60%, rgba(246, 244, 238, .7) 75%,
    rgba(246, 244, 238, .9) 88%, var(--crema) 100%);
  pointer-events: none;
}
.sem-hero .p-hero-inner { z-index: 1; }
.sem-hero .p-hero-sub { text-wrap: balance; }
.sem-calc { position: relative; margin-top: -1px; }

/* Foco visible en los controles de la herramienta */
.semaforo .btn:focus-visible,
.sem-ejemplo:focus-visible,
.sem-opcional summary:focus-visible,
.semaforo .link-underline:focus-visible,
.sem-res-head h2:focus-visible { outline: 3px solid var(--naranja); outline-offset: 3px; }
.sem-form .field input:focus-visible,
.sem-form .field select:focus-visible { outline: 2px solid var(--azul); outline-offset: 1px; }

/* ─── FORMULARIO ─── */
.sem-calc { padding-top: 1.5rem; }
.sem-form {
  background: var(--blanco);
  border-radius: 24px;
  padding: 2.4rem;
  box-shadow: 0 24px 60px rgba(38, 92, 103, .1);
}
.sem-form-head { display: flex; justify-content: space-between; align-items: baseline; gap: .6rem 1.5rem; flex-wrap: wrap; margin-bottom: 1.6rem; }
.sem-form-tit { font-size: clamp(1.4rem, 2.4vw, 1.8rem); }
.sem-ejemplo {
  font-family: inherit; font-size: .95rem; font-weight: 700; color: var(--azul);
  background: none; border: 0; border-bottom: 2px solid var(--naranja); padding: 0 0 .2rem; cursor: pointer;
}
.sem-ejemplo:hover { color: var(--naranja); }

.sem-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 1.2rem; }
.sem-span2 { grid-column: span 2; }
.sem-form .field { min-width: 0; margin-bottom: 1.1rem; }
.sem-form .field input { width: 100%; min-width: 0; }
.sem-form .field select {
  width: 100%;
  font-family: 'DM Sans', sans-serif; font-size: 1rem; color: var(--azul); background: var(--blanco);
  border: 1px solid rgba(38, 92, 103, .35); border-radius: 12px; padding: .85rem 1rem;
  transition: border-color .2s, box-shadow .2s;
}
.sem-form .field select:focus { border-color: var(--azul); box-shadow: 0 0 0 3px rgba(38,92,103,.18); }
.sem-form .field input[type="date"] { min-height: 3.1rem; }
.sem-form .field input[aria-invalid="true"] { border-color: var(--sem-rojo); box-shadow: 0 0 0 3px rgba(237,113,53,.18); }
.sem-otra { display: flex; flex-direction: column; margin-top: .8rem; }
.sem-otra[hidden] { display: none; }

.sem-sufijo { position: relative; }
.sem-sufijo input { padding-right: 2.4rem; }
.sem-sufijo span { position: absolute; right: 1rem; top: 50%; transform: translateY(-50%); color: var(--gris); font-weight: 500; pointer-events: none; }

.sem-ayuda { margin: .4rem 0 0; font-size: .85rem; line-height: 1.45; color: var(--gris); }
.sem-error { margin: 0; font-size: .88rem; line-height: 1.4; font-weight: 700; color: var(--sem-rojo); }
.sem-error:not(:empty) { margin-top: .4rem; }
.sem-error:not(:empty)::before { content: "✕ "; }

.sem-opcional { margin: .3rem 0 1.2rem; border-top: 1px solid var(--borde); border-bottom: 1px solid var(--borde); }
.sem-opcional summary {
  cursor: pointer; list-style: none; display: flex; align-items: center; gap: .7rem;
  padding: 1rem 0; font-weight: 500; color: var(--azul);
}
.sem-opcional summary::-webkit-details-marker { display: none; }
.sem-opcional summary::before { content: "+"; width: 1.6rem; height: 1.6rem; flex-shrink: 0; border-radius: 50%; display: grid; place-items: center; background: var(--naranja); color: var(--blanco); transition: transform .25s ease; }
.sem-opcional[open] summary::before { transform: rotate(45deg); }
.sem-opcional summary .opt { color: var(--gris); font-weight: 400; }
.sem-opcional .field { max-width: 420px; }

.sem-acciones { display: flex; gap: 1rem; flex-wrap: wrap; }
.sem-calcular { font-size: 1.05rem; padding-inline: 2.6rem; }
.sem-privacidad { margin: 1.2rem 0 0; font-size: .9rem; line-height: 1.55; color: var(--gris); }
.sem-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; margin: 0; }

/* ─── RESULTADO ─── */
.sem-resultado { margin-top: 2.5rem; scroll-margin-top: 110px; }
.sem-resultado[hidden] { display: none; }
.sem-res-head { margin-bottom: 1.4rem; scroll-margin-top: 120px; }
.sem-res-head h2 { scroll-margin-top: 120px; }
.sem-res-head h2:focus { outline: none; }
.sem-res-head h2:focus-visible { border-radius: 6px; }

.sem-avisos { background: var(--blanco); border-left: 5px solid var(--naranja); border-radius: 14px; padding: 1.1rem 1.4rem; margin-bottom: 1.4rem; }
.sem-avisos[hidden] { display: none; }
.sem-avisos p { margin: 0; color: var(--negro); line-height: 1.55; }
.sem-avisos p + p { margin-top: .6rem; }

.sem-luces { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.sem-luz { display: flex; gap: 1.6rem; align-items: center; background: var(--blanco); border-radius: 22px; padding: 1.8rem; border-top: 6px solid var(--sem-apagada); }
.sem-poste { flex-shrink: 0; display: flex; flex-direction: column; gap: .55rem; padding: .7rem; border-radius: 40px; background: var(--azul); }
.sem-l { width: 46px; height: 46px; border-radius: 50%; background: rgba(246, 244, 238, .16); transition: background .3s ease, box-shadow .3s ease; }
/* Cada luz apagada muestra su color atenuado, como un semáforo real */
.sem-l-rojo { background: color-mix(in srgb, var(--sem-rojo) 28%, var(--azul)); }
.sem-l-amarillo { background: color-mix(in srgb, var(--sem-amarillo) 28%, var(--azul)); }
.sem-l-verde { background: color-mix(in srgb, var(--sem-verde) 28%, var(--azul)); }
.sem-luz[data-estado="rojo"] { border-top-color: var(--sem-rojo); }
.sem-luz[data-estado="amarillo"] { border-top-color: var(--sem-amarillo); }
.sem-luz[data-estado="verde"] { border-top-color: var(--sem-verde); }
.sem-luz[data-estado="rojo"] .sem-l-rojo { background: var(--sem-rojo); box-shadow: 0 0 18px var(--sem-rojo); }
.sem-luz[data-estado="amarillo"] .sem-l-amarillo { background: var(--sem-amarillo); box-shadow: 0 0 18px var(--sem-amarillo); }
.sem-luz[data-estado="verde"] .sem-l-verde { background: var(--sem-verde); box-shadow: 0 0 18px var(--sem-verde); }
.sem-luz-txt { min-width: 0; }
.sem-luz h3 { font-size: 1rem; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; color: var(--gris); margin-bottom: .2rem; }
.sem-estado { display: flex; align-items: center; gap: .55rem; margin: 0; font-size: 2rem; font-weight: 700; line-height: 1.15; color: var(--azul); }
.sem-icono { width: 1.9rem; height: 1.9rem; flex-shrink: 0; border-radius: 50%; display: grid; place-items: center; font-size: 1rem; background: var(--sem-apagada); color: var(--negro); }
.sem-luz[data-estado="rojo"] .sem-icono { background: var(--sem-rojo); color: var(--blanco); }
.sem-luz[data-estado="amarillo"] .sem-icono { background: var(--sem-amarillo); }
.sem-luz[data-estado="verde"] .sem-icono { background: var(--sem-verde); }
.sem-indice { margin: .35rem 0 .5rem; font-size: 1.1rem; font-weight: 700; color: var(--negro); }
.sem-frase { margin: 0; line-height: 1.5; }

.sem-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; margin-top: 1.25rem; }
.sem-kpi { background: var(--blanco); border-radius: 18px; padding: 1.4rem 1.6rem; display: flex; flex-direction: column; gap: .3rem; min-width: 0; }
.sem-kpi-tit { font-size: .8rem; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; color: var(--gris); }
.sem-kpi strong { font-size: clamp(1.4rem, 2.4vw, 1.9rem); font-weight: 700; line-height: 1.2; color: var(--azul); overflow-wrap: anywhere; }
.sem-kpi-sub { font-size: .92rem; color: var(--gris); }

.sem-detalle { background: var(--blanco); border-radius: 22px; padding: 1.8rem; margin-top: 1.25rem; }
.sem-detalle h3 { font-size: 1.3rem; font-weight: 700; color: var(--azul); margin-bottom: 1rem; }
/* Cinco indicadores en dos filas parejas, tres arriba y dos abajo */
.sem-det-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 1.4rem 1.6rem; }
.sem-det { grid-column: span 2; }
.sem-det:nth-child(n+4) { grid-column: span 3; }
@media (max-width: 760px) {
  .sem-det-grid { grid-template-columns: 1fr; }
  .sem-det, .sem-det:nth-child(n+4) { grid-column: auto; }
}
.sem-det { display: flex; flex-direction: column; gap: .25rem; padding-top: .9rem; border-top: 3px solid var(--crema); min-width: 0; }
.sem-det strong { font-size: 1.25rem; font-weight: 700; color: var(--azul); line-height: 1.25; overflow-wrap: anywhere; }
.sem-det p { margin: 0; font-size: .92rem; line-height: 1.5; }
.sem-curva-svg .es { stroke: var(--naranja); stroke-width: 2; stroke-dasharray: 5 4; }
.sem-curva-svg .esp { fill: var(--naranja); }
.sem-ley-l.es { background: repeating-linear-gradient(to right, var(--naranja) 0 5px, transparent 5px 9px); }

.sem-curva, .sem-lectura { background: var(--blanco); border-radius: 22px; padding: 1.8rem; margin-top: 1.25rem; }
.sem-curva h3, .sem-lectura h3 { font-size: 1.3rem; font-weight: 700; color: var(--azul); margin-bottom: 1rem; }
.sem-curva-svg { width: 100%; }
.sem-curva-svg svg { display: block; width: 100%; height: auto; font-family: 'DM Sans', sans-serif; }
.sem-curva-svg .g { stroke: var(--borde); stroke-width: 1; }
.sem-curva-svg .ax { stroke: var(--gris); stroke-width: 1; }
.sem-curva-svg .ty, .sem-curva-svg .tx { fill: var(--gris); font-size: 12px; }
.sem-curva-svg .ty { text-anchor: end; }
.sem-curva-svg .tc { fill: var(--azul); font-size: 12px; font-weight: 700; }
.sem-curva-svg .plan { fill: none; stroke: var(--azul); stroke-width: 3; stroke-linejoin: round; stroke-linecap: round; }
.sem-curva-svg .ctrl { stroke: var(--azul); stroke-width: 1.2; stroke-dasharray: 4 4; opacity: .6; }
.sem-curva-svg .pp { fill: var(--blanco); stroke: var(--azul); stroke-width: 3; }
.sem-curva-svg .pr { fill: var(--naranja); stroke: var(--blanco); stroke-width: 2.5; }
.sem-leyenda { list-style: none; padding: 0; margin: 1rem 0 0; display: flex; flex-wrap: wrap; gap: .6rem 1.6rem; }
.sem-leyenda li { display: flex; align-items: center; gap: .55rem; font-size: .95rem; color: var(--negro); }
.sem-ley-l { width: 26px; height: 3px; border-radius: 2px; background: var(--azul); }
.sem-ley-p { width: 14px; height: 14px; flex-shrink: 0; }
.sem-ley-p.pr { border-radius: 50%; background: var(--naranja); }
.sem-ley-p.pp { background: var(--blanco); border: 3px solid var(--azul); transform: rotate(45deg) scale(.85); }
.sem-supuesto { margin: 1rem 0 0; font-size: .9rem; line-height: 1.55; font-style: italic; color: var(--gris); }
.sem-lectura p { margin: 0; font-size: 1.08rem; line-height: 1.7; color: var(--negro); }

.sem-cta { display: grid; grid-template-columns: 1fr; gap: 1.25rem; margin-top: 1.25rem; }
.sem-cta.doble { grid-template-columns: 1fr 1fr; }
.sem-cta-item { background: var(--azul); border-radius: 22px; padding: 1.8rem; display: flex; flex-direction: column; align-items: flex-start; gap: 1rem; }
.sem-cta-item p { margin: 0; color: var(--crema); line-height: 1.55; }
.sem-cta-item .btn { font-size: 1rem; white-space: normal; text-align: center; }
.sem-cta-rojo { background: var(--blanco); border: 2px solid var(--naranja); }
.sem-cta-rojo p { color: var(--negro); }

.sem-res-acciones { display: flex; justify-content: flex-end; margin-top: 1.5rem; }
.sem-res-acciones .btn { display: inline-flex; }

/* Solo para el informe impreso */
.sem-print-head, .sem-print-datos, .sem-print-pie, .sem-portada, .sem-print-legal, .sem-solo-print { display: none; }

/* Datos opcionales para el informe */
.sem-informe { border: 0; margin: 0 0 1.4rem; padding: 1.2rem 0 0; border-top: 1px solid var(--borde); min-width: 0; }
.sem-informe legend { padding: 0; font-weight: 700; color: var(--azul); }
.sem-informe legend .opt { color: var(--gris); font-weight: 400; }
.sem-informe > .sem-ayuda { margin: .3rem 0 1rem; }
.sem-logo-fila { display: flex; flex-wrap: wrap; align-items: center; gap: .8rem 1.4rem; }
.sem-logo-fila input[type="file"] { flex: 1 1 240px; padding: .7rem 1rem; font-size: .92rem; cursor: pointer; }
.sem-logo-prev { display: flex; align-items: center; gap: 1rem; }
.sem-logo-prev[hidden] { display: none; }
.sem-logo-prev img { max-height: 52px; max-width: 160px; object-fit: contain; padding: .35rem .6rem; border: 1px solid var(--borde); border-radius: 10px; background: var(--blanco); }

/* ─── FORMULARIO ANTES DE DESCARGAR ─── */
.sem-print-bloqueo { display: none; }
.sem-dialogo { width: min(520px, calc(100vw - 32px)); max-height: calc(100vh - 32px); padding: 0; border: 0; border-radius: 24px; box-shadow: 0 24px 60px rgba(0,0,0,.25); background: var(--blanco); }
.sem-dialogo::backdrop { background: rgba(38, 92, 103, .55); }
.sem-lead { position: relative; padding: 2.2rem 2rem 1.8rem; }
.sem-lead h2 { font-size: 1.6rem; margin-bottom: .4rem; padding-right: 2rem; }
.sem-dialogo-sub { margin: 0 0 1.3rem; font-size: .95rem; line-height: 1.5; }
.sem-dialogo-cerrar { position: absolute; top: 1rem; right: 1rem; width: 2.2rem; height: 2.2rem; border: 0; border-radius: 50%; background: var(--crema); color: var(--azul); font-size: 1.4rem; line-height: 1; cursor: pointer; }
.sem-dialogo-cerrar:hover { background: var(--azul); color: var(--crema); }
.sem-dialogo-cerrar:focus-visible, .sem-consent input:focus-visible { outline: 3px solid var(--naranja); outline-offset: 2px; }
.sem-lead .field { margin-bottom: .9rem; }
.sem-lead .field input { width: 100%; }
.sem-lead .field select { width: 100%; font-family: 'DM Sans', sans-serif; font-size: 1rem; color: var(--azul); background: var(--blanco); border: 1px solid rgba(38, 92, 103, .35); border-radius: 12px; padding: .85rem 1rem; }
.sem-lead .field select:focus { outline: none; border-color: var(--azul); box-shadow: 0 0 0 3px rgba(38,92,103,.18); }
.sem-lead .field input[aria-invalid="true"], .sem-lead .field select[aria-invalid="true"] { border-color: var(--sem-rojo); }
.sem-consent { display: flex; align-items: flex-start; gap: .6rem; margin-top: .3rem; }
.sem-consent input { width: 1.15rem; height: 1.15rem; margin-top: .2rem; flex-shrink: 0; accent-color: var(--azul); }
.sem-consent label { font-size: .88rem; line-height: 1.45; color: var(--gris); }
.sem-consent a { color: var(--azul); text-decoration: underline; }
.sem-lead-enviar { width: 100%; margin-top: 1rem; font-size: 1.05rem; }
.sem-lead-enviar:disabled { opacity: .6; cursor: default; }
.sem-lead-estado { margin: .8rem 0 0; font-size: .9rem; color: var(--sem-rojo); font-weight: 700; }
.sem-lead-estado:empty { display: none; }
.sem-lead-igual { margin-top: .6rem; }
.sem-lead-igual[hidden] { display: none; }
@media (max-width: 600px) { .sem-lead { padding: 1.8rem 1.3rem 1.4rem; } }

/* ─── EXPLICACIÓN ─── */
.sem-explica .sec-head { margin-bottom: 2.4rem; }
.sem-explica .tri-card { background: var(--crema); }

/* ─── EL MÉTODO ─── */
.sem-metodo-head { display: grid; grid-template-columns: 5fr 7fr; gap: 2rem 4rem; align-items: start; margin-bottom: 3rem; }
.sem-metodo-txt p { margin: 0; color: var(--crema); font-size: 1.05rem; line-height: 1.7; }
.sem-metodo-txt p + p { margin-top: 1rem; }
.sem-formulas { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; }
.sem-formula { position: relative; padding: 1.8rem; border-radius: 20px; background: rgba(246, 244, 238, .08); border: 1px solid rgba(246, 244, 238, .16); }
.sem-formula-sigla { position: absolute; top: 1.4rem; right: 1.6rem; font-size: 2.4rem; font-weight: 700; line-height: 1; color: var(--teal); opacity: .9; }
.sem-formula h3 { font-size: 1.3rem; font-weight: 700; color: var(--blanco); padding-right: 4rem; }
.sem-formula-calc { margin: .8rem 0 .9rem !important; padding: .6rem .9rem; border-radius: 10px; background: rgba(246, 244, 238, .1); font-weight: 700; color: var(--crema) !important; }
.sem-formula p { margin: 0; color: rgba(246, 244, 238, .8); line-height: 1.55; }
.sem-metodo .sem-marca-nota { margin: 2rem 0 0; font-size: .8rem; color: rgba(246, 244, 238, .6); }
@media (max-width: 900px) {
  .sem-metodo-head { grid-template-columns: 1fr; }
  .sem-formulas { grid-template-columns: 1fr; }
}

/* ─── RESPONSIVE ─── */
@media (max-width: 900px) {
  .sem-luces, .sem-cta.doble { grid-template-columns: 1fr; }
  .sem-kpis { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .sem-grid { grid-template-columns: 1fr; }
  .sem-span2 { grid-column: auto; }
}
@media (max-width: 600px) {
  .sem-hero { padding-bottom: 9rem; }
  .sem-calc { padding: 3rem 1rem; }
  .sem-form { padding: 1.5rem 1.2rem; border-radius: 18px; }
  .sem-luz { padding: 1.3rem; gap: 1.1rem; }
  .sem-l { width: 34px; height: 34px; }
  .sem-poste { gap: .4rem; padding: .5rem; }
  .sem-estado { font-size: 1.6rem; }
  .sem-curva, .sem-lectura, .sem-cta-item { padding: 1.3rem; }
  .sem-res-acciones .btn { width: 100%; justify-content: center; }
}

/* ─── INFORME EN PDF (window.print) ─── */
@media print {
  @page {
    size: A4 portrait;
    margin: 10mm 12mm 20mm;
    /* Pie de resguardo y numeración en el margen de cada hoja, sin tapar el contenido */
    @bottom-left {
      content: "Informe orientativo elaborado con el Semáforo de obra, una herramienta de ÁRBOLA, a partir de datos cargados por el usuario. ÁRBOLA no los verifica ni los conserva. No constituye asesoramiento profesional, auditoría, certificación de avance ni dictamen técnico o contable, y las decisiones que se tomen con base en él son responsabilidad de quien lo usa. ÁRBOLA no emite, revisa ni avala este informe. ÁRBOLA® Consultoría de Gestión.";
      width: 160mm; vertical-align: top; padding-top: 3mm; border-top: .5pt solid #504d49;
      font-family: 'DM Sans', sans-serif; font-size: 6.5pt; line-height: 1.35; color: #504d49;
    }
    @bottom-right {
      content: "Página " counter(page) " de " counter(pages);
      vertical-align: top; padding-top: 3mm; border-top: .5pt solid #504d49;
      font-family: 'DM Sans', sans-serif; font-size: 7pt; color: #504d49;
    }
  }
  /* La portada va a sangre, sin márgenes ni pie */
  @page :first { margin: 0; }
  .sem-solo-pantalla { display: none !important; }
  .sem-solo-print { display: inline; }
  .sem-det, .sem-det:nth-child(n+4) { grid-column: auto; }

  /* Portada neutra para que la constructora la presente a su cliente. ÁRBOLA queda como firma al pie */
  .sem-portada {
    display: flex; flex-direction: column; justify-content: space-between;
    height: 296mm; break-after: page; overflow: hidden;
    margin: 0; padding: 18mm 18mm 14mm; background: var(--blanco);
  }
  .sem-portada-top { display: flex; justify-content: space-between; align-items: center; gap: 8mm; min-height: 26mm; padding-bottom: 6mm; border-bottom: 1px solid var(--gris); }
  .sem-portada-marca { display: flex; align-items: center; min-width: 0; }
  .sem-portada-logo { display: block; max-height: 26mm; max-width: 85mm; object-fit: contain; }
  .sem-portada-logo[hidden] { display: none; }
  .sem-portada-empresa { margin: 0; font-size: 1.3rem; font-weight: 700; color: var(--negro); }
  .sem-portada-tag { flex-shrink: 0; font-size: .72rem; font-weight: 700; letter-spacing: 2.5px; text-transform: uppercase; color: var(--gris); }
  .sem-portada-centro { flex: 1; display: flex; flex-direction: column; justify-content: center; padding: 10mm 0; }
  .sem-portada-sobre { margin: 0 0 4mm; font-size: .78rem; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; color: var(--gris); }
  .sem-portada-tit { margin: 0; font-family: var(--serif); font-size: 2.6rem; line-height: 1.1; color: var(--negro); overflow-wrap: anywhere; }
  .sem-portada-linea { width: 30mm; height: 2px; background: var(--gris); margin: 7mm 0; }
  .sem-portada-datos { margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 5mm 10mm; max-width: 150mm; }
  .sem-portada-datos dt { font-size: .66rem; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; color: var(--gris); }
  .sem-portada-datos dd { margin: .1rem 0 0; font-size: 1.05rem; font-weight: 700; color: var(--negro); overflow-wrap: anywhere; }
  .sem-portada-base { padding-top: 4mm; border-top: 1px solid var(--borde); }
  .sem-portada-firma { display: flex; align-items: center; gap: 3.5mm; }
  .sem-portada-firma img { height: 11mm; width: auto; flex-shrink: 0; }
  .sem-portada-firma p { margin: 0; font-size: .66rem; line-height: 1.45; color: var(--gris); }
  .sem-portada-firma p:first-child { font-weight: 700; color: var(--negro); }
  .sem-portada-legal { margin: 2.5mm 0 0; font-size: .54rem; line-height: 1.4; color: var(--gris); }
  .sem-resultado .sem-lectura .sem-print-pie { display: none !important; }

  html, body { background: var(--blanco) !important; }
  body.subpage { padding-top: 0; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .navbar, .mobile-menu, .mobile-overlay, .p-hero, .sem-form, .sem-explica, .sem-metodo, #preguntas,
  .footer, .wa, .cookie-banner, .sem-res-acciones, .sem-cta, .sem-res-head .sec-label { display: none !important; }
  .reveal { opacity: 1 !important; transform: none !important; }
  .sem-dialogo { display: none !important; }
  /* Sin completar los datos, la impresión muestra solo el aviso */
  body:not(.sem-pdf-ok) .sem-resultado > :not(.sem-print-bloqueo) { display: none !important; }
  body:not(.sem-pdf-ok) .sem-print-bloqueo { display: block; margin: 20mm 18mm; font-size: 1.1rem; color: var(--negro); }
  .sec { padding: 0 !important; background: var(--blanco) !important; }
  .sem-resultado { margin: 0; }
  .sem-print-head { display: flex; align-items: center; gap: 1rem; padding-bottom: .8rem; margin-bottom: 1rem; border-bottom: 1px solid var(--gris); }
  .sem-print-head img { height: 42px; width: auto; }
  .sem-print-head-txt { flex: 1; min-width: 0; }
  .sem-print-head .sem-print-logo-cli { height: auto; max-height: 13mm; max-width: 42mm; object-fit: contain; }
  .sem-print-head .sem-print-logo-cli[hidden] { display: none; }
  .sem-print-tit { margin: 0; font-family: var(--serif); font-size: 1.6rem; line-height: 1.1; color: var(--negro); }
  .sem-print-sub { margin: 0; font-size: .8rem; color: var(--gris); }
  .sem-print-datos { display: block; margin-bottom: 1rem; break-inside: avoid; }
  .sem-print-datos h3 { font-size: .95rem; color: var(--azul); margin-bottom: .4rem; }
  .sem-print-datos dl { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 1.2rem; margin: 0; }
  .sem-print-datos dl div { display: flex; flex-direction: column; padding: .2rem 0; border-bottom: 1px solid var(--borde); font-size: .72rem; line-height: 1.35; }
  .sem-print-datos dt { color: var(--gris); }
  .sem-print-datos dd { margin: 0; font-weight: 700; }
  .sem-res-head { margin-bottom: .4rem; }
  .sem-res-head h2 { font-size: 1.3rem; }
  .sem-avisos { padding: .6rem .9rem; margin-bottom: .7rem; border: 1px solid var(--borde); border-left-width: 4px; }
  .sem-avisos p { font-size: .8rem; }
  .sem-luces { grid-template-columns: 1fr 1fr; gap: .7rem; }
  .sem-luz, .sem-kpi, .sem-curva, .sem-lectura, .sem-avisos { border: 1px solid var(--borde); box-shadow: none; break-inside: avoid; }
  .sem-resultado .sem-lectura h3 { margin-bottom: .25rem; }
  .sem-luz { padding: .7rem .9rem; gap: .9rem; border-top-width: 5px; }
  .sem-l { width: 20px; height: 20px; box-shadow: none !important; }
  .sem-poste { gap: .3rem; padding: .4rem; }
  .sem-estado { font-size: 1.15rem; }
  .sem-icono { width: 1.4rem; height: 1.4rem; font-size: .8rem; }
  .sem-indice { font-size: .9rem; margin: .2rem 0 .3rem; }
  .sem-frase { font-size: .8rem; }
  .sem-kpis { grid-template-columns: repeat(3, 1fr); gap: .7rem; margin-top: .7rem; }
  .sem-kpi { padding: .7rem .9rem; }
  .sem-kpi strong { font-size: 1.05rem; }
  .sem-kpi-sub, .sem-kpi-tit { font-size: .7rem; }
  .sem-curva, .sem-lectura { padding: .9rem; margin-top: .7rem; }
  .sem-curva h3, .sem-lectura h3 { font-size: .95rem; margin-bottom: .4rem; }
  .sem-curva-svg svg { max-height: 38mm; }
  .sem-luz h3 { font-size: .75rem; margin-bottom: 0; }
  .sem-print-head { margin-bottom: .7rem; }
  .sem-supuesto { margin-top: .4rem; }
  .sem-leyenda { margin-top: .4rem; }
  .sem-leyenda li, .sem-supuesto { font-size: .75rem; }
  .sem-resultado .sem-lectura p { font-size: .8rem; line-height: 1.45; }
  .sem-detalle { padding: .7rem .9rem; margin-top: .7rem; border: 1px solid var(--borde); break-inside: avoid; }
  .sem-detalle h3 { font-size: .95rem; margin-bottom: .4rem; }
  .sem-det-grid { grid-template-columns: repeat(5, 1fr); gap: .6rem; }
  .sem-det { padding-top: .4rem; border-top-width: 2px; }
  .sem-det .sem-kpi-tit { font-size: .6rem; letter-spacing: .8px; }
  .sem-det strong { font-size: .85rem; }
  .sem-det p { font-size: .62rem; line-height: 1.35; }
  .sem-resultado .sem-lectura .sem-print-pie { display: block; margin: .5rem 0 0; padding-top: .4rem; border-top: 1px solid var(--borde); font-size: .68rem; line-height: 1.4; color: var(--gris); }
}

/* ─── COMPARTIR LA HERRAMIENTA ─── */
.sem-compartir { display: flex; flex-direction: column; align-items: center; gap: .6rem; margin-top: 1.4rem; }
.sem-compartir-tit { font-size: .82rem; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; color: var(--azul); text-align: center; }
.sem-compartir-btns { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; }
.sem-comp-btn { display: inline-flex; align-items: center; gap: .45rem; padding: .55rem 1rem; border-radius: 100px; border: 1px solid rgba(38,92,103,.3); background: var(--blanco); color: var(--azul); font: inherit; font-size: .92rem; font-weight: 600; text-decoration: none; cursor: pointer; transition: background .2s ease, color .2s ease, border-color .2s ease; }
.sem-comp-btn:hover { background: var(--azul); color: var(--crema); border-color: var(--azul); }
.sem-comp-btn:focus-visible { outline: 2px solid var(--naranja); outline-offset: 2px; }
.sem-comp-btn[hidden] { display: none; }
.sem-comp-btn svg { width: 16px; height: 16px; fill: currentColor; flex-shrink: 0; }
.sem-comp-estado { margin: 0; min-height: 1.3em; font-size: .9rem; color: var(--azul); text-align: center; }
.sem-calc form .sem-compartir { margin-top: 1.6rem; padding-top: 1.4rem; border-top: 1px solid var(--borde); }
.sem-resultado .sem-compartir { margin-top: 2.2rem; padding-top: 1.8rem; border-top: 1px solid var(--borde); }
@media print { .sem-compartir { display: none !important; } }
