/*
  Estilos del configurador (/configurador/).
  Sólo los carga esa página, con su propio <link>; el resto de la web usa _plantillas/estilos.css.
  Incluye la finca de arriba, las pestañas, la barra de abajo, las tarjetas de opción, el esquema dibujado, las zonas y la
  hoja de impresión (Descargar en PDF).
*/
.cfg { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2rem; }   /* minmax: una tabla ancha (la del mapa) se desplaza por dentro, no ensancha la página */
@media (min-width: 64rem) {
  .cfg { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); align-items: start; gap: 2.5rem; }
  /* Si el esquema crece más que la ventana, el panel se desplaza por dentro para que se vean los totales */
  .cfg__panel { position: sticky; top: 5.5rem; max-height: calc(100vh - 6.5rem); overflow-y: auto; overscroll-behavior: contain; }
}
/* Arriba (01 a 03): la finca y «+ Otra finca», desactivado (una sola finca, spec 005) */
.cfg-fincas { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin: 0 0 1.1rem; }
.cfg-fincas__una {
  display: inline-flex; align-items: center; gap: .5rem; max-width: 100%; min-height: 2.5rem; padding: .3rem .95rem;
  border: 2px solid var(--acento); border-radius: 999px; background: var(--acento-suave); color: var(--texto);
  font-weight: 650; font-size: .95rem; line-height: 1.25; overflow-wrap: anywhere;
}
.cfg-fincas__una::before { content: ""; flex: none; width: .5rem; height: .5rem; border-radius: 50%; background: var(--acento); }
.cfg-fincas__mas {
  display: inline-flex; align-items: center; gap: .5rem; min-height: 2.5rem; padding: .3rem .95rem; border: 1px dashed var(--texto-suave);
  border-radius: 999px; background: none; color: var(--texto-suave); font: inherit; font-size: .9rem; font-weight: 600; cursor: not-allowed;
}
.cfg-fincas__mas small { font-family: var(--mono); font-size: .66rem; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; }
/* Pestañas: 01 Entorno … 05 Presupuesto (configurador-pestanas.js) */
.cfg__pasos { list-style: none; margin: 0 0 1.5rem; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .35rem; }
.cfg__pasos button {
  width: 100%; min-height: 2.75rem; display: grid; gap: .25rem; align-content: start; justify-items: start; padding: .5rem 0 0; border: 0;
  border-top: 3px solid var(--borde); background: none; color: var(--texto-suave); font: inherit; font-size: .8rem; font-weight: 600;
  line-height: 1.25; text-align: left; cursor: pointer;
}
.cfg__pasos button:hover { color: var(--texto); }
.cfg__pasos button span { font-family: var(--mono); font-size: .7rem; letter-spacing: .06em; }
.cfg__pasos button[aria-current="step"] { border-top-color: var(--acento); color: var(--texto); }
.cfg__pasos button.hecho { border-top-color: var(--acento); border-top-color: color-mix(in srgb, var(--acento) 45%, var(--borde)); }
/* En el móvil no caben los cinco nombres: se ve el de la pestaña actual y, de las demás, el número */
@media (max-width: 40rem) {
  .cfg__pasos { display: flex; }
  .cfg__pasos li { flex: 1 1 0; min-width: 0; }
  .cfg__pasos li.actual { flex: 3.5 1 auto; }
  .cfg__pasos li:not(.actual) b { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
.cfg__paso { margin: 0; padding: 0; border: 0; min-width: 0; }
.cfg__paso:focus { outline: none; }
.cfg__paso > legend:not(.visualmente-oculto), .cfg__titulo-paso { float: left; width: 100%; padding: 0; margin: 0 0 .35rem; font-size: clamp(1.35rem, 1.15rem + .6vw, 1.7rem); font-weight: 700; letter-spacing: -.02em; line-height: 1.2; }
.cfg__intro { clear: both; margin: 0 0 1.25rem; color: var(--texto-suave); }
.cfg__pregunta { margin: 0 0 1.5rem; padding: 0; border: 0; min-width: 0; }
.cfg__pregunta > legend { padding: 0; margin-bottom: .6rem; font-weight: 650; }
.cfg__ayuda { margin: -.3rem 0 .7rem; font-size: .88rem; color: var(--texto-suave); }
/* Tarjetas de opción (radio y casilla) */
.cfg__opciones { display: grid; gap: .6rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 12.5rem), 1fr)); }
.cfg__opcion {
  position: relative; display: grid; grid-template-columns: auto 1fr; gap: .1rem .65rem; align-items: start;
  padding: .8rem .9rem; border: 1px solid var(--borde); border-radius: var(--radio); background: var(--superficie); cursor: pointer;
  transition: border-color .15s, box-shadow .15s, background-color .15s;
}
.cfg__opcion:hover { border-color: color-mix(in srgb, var(--primario) 50%, var(--borde)); }
.cfg__opcion input { grid-row: 1 / span 2; width: 1.1rem; height: 1.1rem; margin: .2rem 0 0; accent-color: var(--primario); }
.cfg__opcion strong { font-size: .97rem; line-height: 1.3; }
.cfg__opcion small { grid-column: 2; font-size: .85rem; line-height: 1.4; color: var(--texto-suave); }
/* La clase «elegida» la pone configurador.js: así se marca también en navegadores sin :has() (iPhone con iOS anterior al 15.4) */
.cfg__opcion.elegida { border-color: var(--primario); background: var(--primario-suave); box-shadow: inset 0 0 0 1px var(--primario); }
@supports selector(:has(*)) {
  .cfg__opcion:has(input:focus-visible), .cfg-op:has(input:focus-visible) { outline: 3px solid var(--foco); outline-offset: 2px; }
  .cfg__opcion input:focus-visible, .cfg-op input:focus-visible { outline: none; }
}
/* Elementos con contador */
.cfg__elementos { display: grid; gap: .6rem; }
.cfg__elemento {
  display: grid; grid-template-columns: auto 1fr auto; gap: .9rem; align-items: center;
  padding: .8rem .9rem; border: 1px solid var(--borde); border-radius: var(--radio); background: var(--superficie); transition: border-color .15s, background-color .15s;
}
.cfg__elemento.activo { border-color: var(--acento); background: var(--acento-suave); }
.cfg__elemento .icono { width: 2.6rem; height: 2.6rem; }
.cfg__elemento small { display: block; font-size: .85rem; line-height: 1.4; color: var(--texto-suave); }
.cfg__contador { display: flex; align-items: center; border: 1px solid var(--borde); border-radius: var(--radio-s); background: var(--superficie); }
.cfg__contador button { width: 2.3rem; height: 2.3rem; border: 0; background: none; color: var(--primario); font: 600 1.2rem/1 var(--fuente); cursor: pointer; }
.cfg__contador button:hover { background: var(--primario-suave); }
.cfg__contador button:disabled { color: var(--borde); cursor: default; background: none; }
.cfg__botones .boton { cursor: pointer; font: inherit; font-weight: 600; }
/* Panel: esquema y totales */
.cfg__panel { padding: 1.25rem 1.25rem 1.4rem; background: var(--superficie); border: 1px solid var(--borde); border-radius: var(--radio); box-shadow: var(--sombra); }
.cfg__panel h2 { font-size: 1.2rem; margin-bottom: .4rem; }
.cfg__dibujo { margin: 0 -.25rem; border-radius: var(--radio-s); background:
  linear-gradient(var(--rejilla) 1px, transparent 1px) 0 0 / 24px 24px, linear-gradient(90deg, var(--rejilla) 1px, transparent 1px) 0 0 / 24px 24px, var(--fondo); }
.cfg__dibujo svg { display: block; width: 100%; max-width: 30rem; height: auto; margin-inline: auto; }
.cfg__leyenda { display: flex; flex-wrap: wrap; gap: .25rem 1rem; margin: .6rem 0 0; padding: 0; list-style: none; font-size: .78rem; color: var(--texto-suave); }
.cfg__leyenda i { display: inline-block; width: 1.4rem; margin-right: .35rem; vertical-align: middle; border-top: 2px solid var(--primario); }
.cfg__leyenda .l-radio { border-top: 2px dashed var(--acento); }
.cfg__leyenda .l-red { border-top: 2px dotted var(--texto-suave); }
.cfg__leyenda .l-cable { border-top: 2px solid var(--texto-suave); }
.cfg__totales { display: grid; grid-template-columns: 1fr auto; gap: .35rem 1rem; margin: 1.1rem 0 0; padding-top: 1rem; border-top: 1px solid var(--borde); font-size: .95rem; }
.cfg__totales dt { color: var(--texto-suave); }
.cfg__totales dd { margin: 0; text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cfg__totales .total { font-size: 1.1rem; font-weight: 700; color: var(--texto); }
.cfg__aviso-precio { margin: .75rem 0 0; font-size: .8rem; color: var(--texto-suave); }
/* Esquema SVG */
.cfg-svg text { font: 600 11px var(--fuente); fill: var(--texto); }
.cfg-svg .t-suave { font-weight: 500; fill: var(--texto-suave); }
.cfg-svg .t-mono { font: 600 9.5px var(--mono); letter-spacing: .05em; fill: var(--texto-suave); }
.cfg-svg .caja { fill: var(--superficie); stroke: var(--borde); stroke-width: 1.5; }
.cfg-svg .caja-central { fill: var(--superficie); stroke: var(--primario); stroke-width: 1.8; }
.cfg-svg .ico { fill: none; stroke: var(--primario); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.cfg-svg .insignia { fill: var(--acento); }
.cfg-svg .insignia-t { font: 700 9px var(--fuente); fill: var(--sobre-primario); }
.cfg-svg .enl { fill: none; stroke-width: 2; stroke-linecap: round; }
.cfg-svg .enl-radio { stroke: var(--acento); stroke-dasharray: 3 7; animation: flujo 1.6s linear infinite; }
.cfg-svg .enl-movil { stroke: var(--primario); }
.cfg-svg .enl-red { stroke: var(--texto-suave); stroke-dasharray: 1 5; }
.cfg-svg .enl-cable { stroke: var(--texto-suave); }
.cfg-svg .zona { fill: none; stroke: var(--texto-suave); stroke-dasharray: 4 5; stroke-width: 1.2; }
.cfg-svg .nuevo { animation: cfg-aparece .45s ease-out both; transform-box: fill-box; transform-origin: center; }
.cfg-svg .enl.nuevo { animation: cfg-aparece .45s ease-out both; }
.cfg-svg .enl-radio.nuevo { animation: cfg-aparece .45s ease-out both, flujo 1.6s linear infinite; }
@keyframes cfg-aparece { from { opacity: 0; transform: scale(.85); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .cfg-svg .nuevo, .cfg-svg .enl-radio { animation: none; } }
/* Resumen (paso 3) */
.cfg__grupo { margin: 1.5rem 0 .4rem; font-family: var(--mono); font-size: .75rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--acento); }
.cfg__lista { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--borde); }
.cfg__lista li { display: flex; justify-content: space-between; gap: 1rem; padding: .65rem 0; border-bottom: 1px solid var(--borde); font-size: .95rem; line-height: 1.4; }
.cfg__lista small { display: block; margin-top: .15rem; font-size: .82rem; color: var(--texto-suave); }
.cfg__lista em { font-style: normal; font-size: .75rem; color: var(--texto-suave); }
.cfg__importe { white-space: nowrap; font-variant-numeric: tabular-nums; font-weight: 600; }
.cfg__subtotal { display: flex; justify-content: space-between; gap: 1rem; margin: 0; padding: .6rem 0 0; font-weight: 700; }
.cfg__fijo { margin: 1.5rem 0 0; padding: .9rem 1rem; background: var(--superficie-2); border-radius: var(--radio-s); font-size: .9rem; }
.cfg__fijo p { margin: 0; }
.cfg__fijo p + p { margin-top: .25rem; }
.cfg__botones { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.25rem; }
.cfg__sin-email { margin-top: 1rem; }
.cfg__sin-email textarea { width: 100%; min-height: 12rem; margin-top: .5rem; padding: .7rem; font: .85rem/1.5 var(--mono); color: var(--texto); background: var(--superficie); border: 1px solid var(--borde); border-radius: var(--radio-s); }
/* ---- Zonas y equipos ---- */
.cfg__subtitulo { clear: both; margin: 2rem 0 .9rem; font-size: 1.2rem; }
.cfg-tipo__titulo { display: block; font-weight: 650; line-height: 1.3; }
.cfg-eq__n { min-width: 2.4rem; text-align: center; font-weight: 600; font-variant-numeric: tabular-nums; }
/* Botón con aspecto de enlace */
.cfg-enlace { padding: .2rem 0; border: 0; background: none; color: var(--primario); font: inherit; font-size: .92rem; font-weight: 600; cursor: pointer; text-decoration: underline; text-underline-offset: .15em; }
.cfg-enlace:hover { color: var(--primario-hover); }
.cfg-enlace:disabled { color: var(--texto-suave); cursor: default; text-decoration: none; }
/* Zonas */
.cfg-zona { margin: 0 0 1rem; padding: .9rem 1rem 1rem; border: 1px solid var(--borde); border-radius: var(--radio); background: var(--superficie); }
.cfg-zona--comun { background: var(--fondo); }
.cfg-zona__cabeza { display: flex; align-items: center; gap: .7rem; margin-bottom: .6rem; }
.cfg-zona__cabeza .icono { width: 2.2rem; height: 2.2rem; }
.cfg-zona__cabeza .icono svg { width: 1.25rem; height: 1.25rem; }
.cfg-zona__cabeza h3 { flex: 1; min-width: 0; margin: 0; font-size: 1.05rem; }
.cfg-zona__vacia { margin: 0 0 .4rem; font-size: .92rem; color: var(--texto-suave); }
.cfg-zona__anadir { display: flex; flex-wrap: wrap; gap: .1rem 1rem; margin: .6rem 0 0; }
/* Tarjeta de equipo */
.cfg-eq { display: grid; grid-template-columns: 6.5rem minmax(0, 1fr) auto; gap: .9rem; align-items: start; padding: .8rem 0; border-top: 1px solid var(--borde); }
.cfg-eq__dibujo { display: block; padding: .3rem; border-radius: var(--radio-s); background: var(--superficie-2); color: var(--primario); line-height: 0; }
.cfg-zona--comun .cfg-eq__dibujo { background: var(--superficie); }
.cfg-eq__dibujo svg { display: block; width: 100%; height: auto; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.cfg-eq__dibujo .acento { stroke: var(--acento); }
.cfg-eq__dibujo .relleno-acento { fill: var(--acento); stroke: none; }
.cfg-eq__info p { margin: 0; }
.cfg-eq__titulo { font-weight: 650; line-height: 1.3; }
.cfg-eq__modelo { font-size: .85rem; line-height: 1.4; color: var(--texto-suave); }
.cfg-eq__info .cfg-eq__detalle { margin-top: .2rem; font-size: .9rem; line-height: 1.45; }
.cfg-eq__info .cfg-eq__precio { margin-top: .2rem; font-size: .9rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.cfg-eq__info .cfg-eq__aviso { margin: .4rem 0; padding: .4rem .6rem; border-left: 3px solid var(--error); font-size: .86rem; line-height: 1.4; }
.cfg-eq__datos { margin: .3rem 0 .4rem; font-size: .86rem; line-height: 1.4; }
.cfg-eq__datos div { display: grid; grid-template-columns: 7.5rem minmax(0, 1fr); gap: .6rem; padding: .25rem 0; border-top: 1px solid var(--borde); }
.cfg-eq__datos dt { color: var(--texto-suave); }
.cfg-eq__datos dd { margin: 0; }
/* Ecosistema: el logo de la marca si hay permiso; si no, su nombre */
.cfg-eco { display: inline-flex; align-items: center; justify-self: start; width: fit-content; min-height: 1.45rem; padding: .05rem .5rem; border: 1px solid var(--primario); border-radius: var(--radio-s); background: var(--superficie); color: var(--primario); font: 700 .74rem/1.3 var(--mono); letter-spacing: .03em; }
.cfg-etiquetas { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem; }
.cfg-eco img { display: block; height: 1rem; width: auto; }
.cfg-eco--logo { padding: .1rem .4rem; border-color: var(--borde); background: #FFF; }
.cfg-eco--comun { border-color: var(--borde); color: var(--texto-suave); font-weight: 600; }
.cfg-op--gris .cfg-eco { border-color: var(--borde); color: var(--texto-suave); }
.cfg-ecos { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .8rem; margin: 0 0 1rem; font-size: .85rem; color: var(--texto-suave); }
.cfg-ecos ul { display: flex; flex-wrap: wrap; gap: .35rem .8rem; margin: 0; padding: 0; list-style: none; }
.cfg-ecos li { display: flex; align-items: center; gap: .35rem; }
/* Las opciones de un hueco, siempre a la vista */
.cfg-hueco { padding: .8rem 0; border-top: 1px solid var(--borde); }
.cfg-hueco__cabeza { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: .5rem; }
.cfg-hueco__cabeza p { margin: 0; }
.cfg-ops { min-width: 0; margin: 0; padding: 0; border: 0; display: grid; gap: .5rem; }
.cfg-op__ficha { margin: .15rem 0 0 .6rem; }
.cfg-op__ficha summary { padding: .2rem 0; color: var(--primario); font-size: .92rem; font-weight: 600; cursor: pointer; }
.cfg-op { display: grid; grid-template-columns: auto 5rem minmax(0, 1fr); gap: .7rem; align-items: start; padding: .6rem; border: 1px solid var(--borde); border-radius: var(--radio-s); background: var(--superficie); cursor: pointer; }
.cfg-op input { width: 1.1rem; height: 1.1rem; margin: .15rem 0 0; accent-color: var(--primario); }
.cfg-op.elegida { border-color: var(--primario); box-shadow: inset 0 0 0 1px var(--primario); }
.cfg-op__texto { display: grid; gap: .1rem; min-width: 0; }
.cfg-op strong { font-size: .95rem; line-height: 1.3; }
.cfg-op small { font-size: .84rem; line-height: 1.4; color: var(--texto-suave); }
.cfg-op .cfg-op__precio { color: var(--texto); font-weight: 600; font-variant-numeric: tabular-nums; }
.cfg-op__motivos { font-size: .85rem; line-height: 1.4; font-weight: 600; color: var(--texto); }
/* En gris lo que no encaja. Su motivo se lee con el contraste normal */
.cfg-op--gris { background: var(--superficie-2); cursor: not-allowed; }
.cfg-op--gris .cfg-eq__dibujo { color: var(--texto-suave); opacity: .55; }
.cfg-op--gris .cfg-eq__dibujo .acento { stroke: var(--texto-suave); }
.cfg-op--gris .cfg-eq__dibujo .relleno-acento { fill: var(--texto-suave); }
.cfg-op--gris strong, .cfg-op--gris .cfg-op__precio { color: var(--texto-suave); }
@media (max-width: 30rem) {
  .cfg__elemento { grid-template-columns: auto 1fr; } .cfg__contador { grid-column: 2; justify-self: start; }
  .cfg-eq { grid-template-columns: 4.5rem minmax(0, 1fr); gap: .7rem; }
  .cfg-eq__datos div { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .cfg-op { grid-template-columns: auto minmax(0, 1fr); } .cfg-op .cfg-eq__dibujo { display: none; }
}
/* Panel del modo normal: los totales van primero y siempre se ven */
@media (min-width: 64rem) { .cfg--normal { grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: 2rem; } }
.cfg__panel-cabeza { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
.cfg__panel-cabeza h2:focus { outline: none; }
.cfg__cerrar { display: none; }
.cfg--normal .cfg__totales { margin-top: .7rem; padding-top: .7rem; }
.cfg--normal .cfg__aviso-precio { margin-bottom: .9rem; }
.cfg__problemas { margin: 0 0 .9rem; padding: .7rem .9rem; border-left: 3px solid var(--error); border-radius: 0 var(--radio-s) var(--radio-s) 0; background: var(--superficie-2); font-size: .9rem; line-height: 1.45; }
.cfg__problemas p { margin: 0 0 .3rem; }
.cfg__problemas ul { margin: 0 0 .4rem; padding-left: 1.1rem; }
/* En la 01 a 03 no hay panel lateral: el mapa necesita el ancho (la clase la pone configurador.js) */
.cfg--sin-panel .cfg__panel { display: none !important; }
@media (min-width: 64rem) { .cfg--normal.cfg--sin-panel { grid-template-columns: minmax(0, 1fr); } }
/* En móvil el panel se abre encima, con la barra de abajo siempre debajo (--cfg-barra-alto: lo mide configurador.js) */
@media (max-width: 63.99rem) {
  .cfg--normal .cfg__panel { display: none; }
  .cfg--normal .cfg__panel.abierto { display: block; position: fixed; z-index: 25; inset: 0 0 var(--cfg-barra-alto, 3.6rem); overflow-y: auto; overscroll-behavior: contain; border: 0; border-radius: 0; }
  .cfg--normal .cfg__cerrar { display: inline; }
  .cfg-panel-abierto { overflow: hidden; }
  .cfg-panel-abierto .cfg__barra { z-index: 26; }
  .con-barra .wa-flotante { bottom: calc(var(--cfg-barra-alto, 4.4rem) + .75rem); }
}
/* Nombre de la finca (01): campo de texto */
.cfg-campo { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .75rem; margin: 0 0 1.25rem; font-size: .95rem; }
.cfg-campo label { font-weight: 600; }
.cfg-campo small { font-weight: 400; color: var(--texto-suave); }
.cfg-campo input { min-height: 2.75rem; padding: .5rem .7rem; font: inherit; color: var(--texto); background: var(--superficie); border: 1px solid var(--texto-suave); border-radius: var(--radio-s); }
.cfg-campo input[type="text"] { flex: 1 1 14rem; max-width: 22rem; }
.cfg-campo input:focus-visible { outline: 3px solid var(--foco); outline-offset: 1px; }
/* 01: los entornos, botones grandes (configurador-pestanas.js). El radio no se ve: la tarjeta entera es el botón.
   La clase «elegida» la pone el HTML, como en .cfg__opcion (navegadores sin :has) */
.cfg-entornos, .cfg-preg { min-width: 0; margin: 0; padding: 0; border: 0; }
.cfg-entornos { margin-bottom: 1.75rem; }
.cfg-entornos > legend { padding: 0; margin-bottom: .6rem; font-size: 1.05rem; font-weight: 700; }
.cfg-entornos__lista { display: grid; gap: .5rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 9.5rem), 1fr)); }
@media (max-width: 40rem) { .cfg-entornos__lista { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.cfg-entorno, .cfg-sino__op { position: relative; cursor: pointer; transition: border-color .15s, background-color .15s, box-shadow .15s; }
.cfg-entorno input, .cfg-sino__op input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: inherit; }
.cfg-entorno {
  display: flex; flex-direction: column; justify-content: center; gap: .1rem; min-height: 4.25rem; padding: .7rem .85rem;
  border: 1px solid var(--borde); border-radius: var(--radio); background: var(--superficie); line-height: 1.25;
}
.cfg-entorno strong { font-size: .97rem; }
.cfg-entorno small { font-size: .82rem; color: var(--texto-suave); }
.cfg-entorno em { align-self: flex-start; margin-top: .3rem; font-family: var(--mono); font-style: normal; font-size: .64rem; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--texto-suave); }
.cfg-entorno:hover { border-color: color-mix(in srgb, var(--primario) 50%, var(--borde)); }
.cfg-entorno.elegida { border-color: var(--primario); background: var(--primario-suave); box-shadow: inset 0 0 0 1px var(--primario); }
.cfg-entorno--no { border-style: dashed; background: none; color: var(--texto-suave); cursor: not-allowed; }
.cfg-entorno--no:hover { border-color: var(--borde); }
/* 01: las preguntas del entorno, de sí o no */
.cfg-preguntas__titulo { margin: 0 0 .75rem; font-size: 1.2rem; }
.cfg-preg { margin-bottom: .75rem; padding: .9rem 1rem 1rem; border: 1px solid var(--borde); border-radius: var(--radio); background: var(--superficie); transition: border-color .15s, box-shadow .15s; }
.cfg-preg > legend { float: left; width: 100%; padding: 0; margin: 0 0 .25rem; font-weight: 650; line-height: 1.35; }
.cfg-preg > legend + * { clear: both; }
.cfg-preg__nota { margin: 0 0 .1rem; font-size: .88rem; color: var(--texto-suave); }
/* RF-15c: la primera sin contestar, al no dejar pasar */
.cfg-preg--falta { border-color: var(--error); box-shadow: inset 0 0 0 1px var(--error); }
.cfg-sino { display: flex; gap: .5rem; margin-top: .65rem; }
.cfg-sino__op {
  display: flex; flex: 1 1 0; max-width: 9rem; align-items: center; justify-content: center; min-height: 2.9rem; padding: .4rem .8rem;
  border: 1px solid var(--texto-suave); border-radius: var(--radio-s); background: var(--fondo); font-weight: 650;
}
.cfg-sino__op:hover { border-color: var(--primario); }
.cfg-sino__op.elegida { border-color: var(--primario); background: var(--primario); color: var(--sobre-primario); }
@supports selector(:has(*)) {
  .cfg-entorno:has(input:focus-visible), .cfg-sino__op:has(input:focus-visible) { outline: 3px solid var(--foco); outline-offset: 2px; }
}
@supports not selector(:has(*)) {
  .cfg-entorno:focus-within, .cfg-sino__op:focus-within { outline: 3px solid var(--foco); outline-offset: 2px; }
}
/* RF-14: no impide seguir */
.cfg-preg__aviso { margin: .75rem 0 0; padding: .55rem .8rem; border-left: 3px solid var(--error); border-radius: 0 var(--radio-s) var(--radio-s) 0; background: var(--superficie-2); font-size: .9rem; line-height: 1.45; }
/* 02: los bloques del entorno y un contador por cosa (configurador-pestanas.js, protegerHtml) */
.cfg-bloque { margin: 0 0 1.75rem; }
.cfg-bloque__titulo { margin: 0 0 .2rem; font-size: 1.2rem; }
.cfg-bloque__nota { margin: 0 0 .75rem; font-size: .88rem; color: var(--texto-suave); }
.cfg-cosas { display: grid; gap: .5rem; }
.cfg-cosa {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: .8rem; align-items: center; padding: .7rem .8rem;
  border: 1px solid var(--borde); border-radius: var(--radio); background: var(--superficie); transition: border-color .15s, background-color .15s;
}
.cfg-cosa.elegida { border-color: var(--acento); background: var(--acento-suave); }
.cfg-cosa .icono { width: 2.4rem; height: 2.4rem; }
.cfg-cosa .icono svg { width: 1.35rem; height: 1.35rem; }
.cfg-cosa__texto strong { display: block; font-weight: 600; line-height: 1.3; }
.cfg-cosa__texto small { display: block; margin-top: .1rem; font-size: .85rem; line-height: 1.4; color: var(--texto-suave); }
/* El dedo necesita unos 44 px por botón */
.cfg-cosa .cfg__contador button { width: 2.75rem; height: 2.75rem; }
.cfg-cosa .cfg-eq__n { min-width: 1.8rem; }
@media (max-width: 24rem) { .cfg-cosa .icono { display: none; } .cfg-cosa { grid-template-columns: minmax(0, 1fr) auto; } }
/* 04: mezclar modelos en un punto y volver a lo recomendado */
.cfg-op__mezcla { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .3rem .8rem; margin: .35rem 0 0 .6rem; font-size: .88rem; color: var(--texto-suave); }
.cfg-op__mezcla .cfg__contador button { width: 2rem; height: 2rem; }
.cfg-op__volver { margin: .5rem 0 0; }
/* Ventajas y desventajas de cada opción, y las opciones que sobran, plegadas */
.cfg-op__balance { display: block; margin-top: .35rem; font-size: .84rem; line-height: 1.35; }
.cfg-op__balance > span { display: block; padding-left: 1.1rem; text-indent: -1.1rem; }
.cfg-pro::before, .cfg-contra::before { content: "+"; display: inline-block; width: 1.1rem; text-indent: 0; font-weight: 700; color: var(--acento); }
.cfg-contra::before { content: "−"; color: var(--texto-suave); }
.cfg-op__otras { margin-top: .6rem; }
.cfg-op__otras > summary { cursor: pointer; font-size: .9rem; color: var(--texto-suave); }
.cfg-op__otras[open] > summary { margin-bottom: .5rem; }
.cfg-comun__programas { margin: .6rem 0 0; }
/* Mientras calcula, lo anterior se atenúa (con retraso: casi siempre tarda menos) */
.cfg__totales, .cfg__dibujo, #cfg-detalle, .cfg-ops { transition: opacity .2s; }
.cfg--calculando .cfg__totales, .cfg--calculando .cfg__dibujo, .cfg--calculando #cfg-detalle, .cfg--calculando .cfg-ops { opacity: .55; transition-delay: .3s; }
.cfg-enlace-aviso { margin-bottom: 1rem; }
.cfg__enlace-estado { margin: .6rem 0 0; font-size: .92rem; font-weight: 600; color: var(--acento); }
.cfg__enlace-estado:empty { display: none; }
.cfg__enlace-copia { margin-top: .75rem; font-size: .92rem; }
.cfg__enlace-copia input { width: 100%; margin-top: .3rem; padding: .55rem .7rem; font: .85rem var(--mono); color: var(--texto); background: var(--superficie); border: 1px solid var(--texto-suave); border-radius: var(--radio-s); }
.cfg-contras ul { margin: 0; font-size: .88rem; line-height: 1.4; }
.cfg-contras .cfg__grupo { margin-top: 1rem; }
.cfg__zonas-resumen { margin: 0; padding-left: 1.1rem; font-size: .95rem; }
/* Barra de abajo, fija en todas las pestañas: el aviso de por qué no se puede pasar, volver y seguir (spec 005, RF-4b).
   En la 02 y la 03, además el total (RF-4). En la 04 y la 05, en el móvil, el total y «Ver esquema» (en el escritorio
   están en el panel). En la 01 a 03 no hay panel: sin «Ver esquema» */
.cfg__barra {
  position: fixed; z-index: 15; left: 0; right: 0; bottom: 0; padding: .55rem 0 calc(.55rem + env(safe-area-inset-bottom, 0px));
  background: var(--superficie); border-top: 1px solid var(--borde); box-shadow: 0 -4px 16px rgba(0, 0, 0, .08); font-size: .85rem;
}
.cfg__barra-interior { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .75rem; }
.cfg__barra p { margin: 0; line-height: 1.3; }
.cfg__barra strong { font-variant-numeric: tabular-nums; }
.cfg__error { flex: 1 1 100%; margin: 0; color: var(--error); font-weight: 650; font-size: .93rem; }
.cfg__error:empty { display: none; }
.cfg__barra-total { display: none; flex: 1 1 100%; align-items: center; gap: .75rem; }
.cfg__barra[data-paso="2"] .cfg__barra-total, .cfg__barra[data-paso="3"] .cfg__barra-total,
.cfg__barra[data-paso="4"] .cfg__barra-total, .cfg__barra[data-paso="5"] .cfg__barra-total { display: flex; }
.cfg__barra[data-paso="2"] .cfg__ver-panel, .cfg__barra[data-paso="3"] .cfg__ver-panel { display: none; }
.cfg__barra-total strong { transition: opacity .2s; }
.cfg__barra.cfg--calculando .cfg__barra-total strong { opacity: .55; transition-delay: .3s; }
.cfg__ver-panel { margin-left: auto; padding: .45rem .8rem; border: 2px solid var(--primario); border-radius: var(--radio-s); background: none; color: var(--primario); font: inherit; font-weight: 600; white-space: nowrap; cursor: pointer; }
.cfg__barra-botones { display: flex; flex: 1 1 100%; gap: .5rem; }
.cfg__barra-botones .boton { flex: 1 1 0; justify-content: center; min-height: 2.75rem; padding: .55rem .8rem; font: inherit; font-size: .95rem; font-weight: 600; text-align: center; cursor: pointer; }
@media (min-width: 48rem) {
  .cfg__barra-botones .boton { flex: 0 0 auto; padding-inline: 1.2rem; }
  .cfg__barra-botones .cfg__siguiente { margin-left: auto; }
  /* 02 y 03: el total a la izquierda y los dos botones juntos a la derecha, en una fila */
  .cfg__barra[data-paso="2"] .cfg__barra-total, .cfg__barra[data-paso="3"] .cfg__barra-total { flex: 1 1 auto; width: auto; }
  .cfg__barra[data-paso="2"] .cfg__barra-botones, .cfg__barra[data-paso="3"] .cfg__barra-botones { flex: 0 0 auto; }
  .cfg__barra[data-paso="2"] .cfg__siguiente, .cfg__barra[data-paso="3"] .cfg__siguiente { margin-left: 0; }
}
@media (min-width: 64rem) { .cfg__barra[data-paso="4"] .cfg__barra-total, .cfg__barra[data-paso="5"] .cfg__barra-total { display: none; } }
/* La clase «con-barra» la pone configurador.js al mostrar la barra */
.con-barra .pie__base { padding-bottom: calc(var(--cfg-barra-alto, 5rem) + 1rem); }
.cfg__imprimir { display: none; }
@media print {
  @page { margin: 14mm; }
  body { background: #fff; color: #000; font-size: 10pt; }
  .saltar, .cabecera, .pie, .hero, .cfg-finca-arriba, .cfg__pasos, .cfg__paso, .cfg__botones, .cfg__sin-email, .cfg__barra, .cfg-contras, .cfg-enlace-aviso, .cfg__enlace-estado, .cfg__enlace-copia, .cfg-explica, .banda, .actualizado, .wa-flotante, .cfg__no-imprimir, .cfg__cerrar, noscript { display: none !important; }
  .cfg__paso--final { display: block !important; }
  .cfg--normal .cfg__panel { display: block !important; }
  .cfg__paso--final > .cfg__titulo-paso, .cfg__paso--final > .cfg__intro { display: none; }
  .cfg__grupo { break-after: avoid; }
  .seccion { padding: 0; border: 0; }
  .cfg { display: flex; flex-direction: column; gap: 1rem; }
  .cfg__principal { order: 2; }
  .cfg__panel { order: 1; position: static; max-height: none; overflow: visible; padding: 0; border: 0; box-shadow: none; break-inside: avoid; }
  .cfg__panel, .cfg__panel *, .cfg__paso--final, .cfg__paso--final * { color: #000 !important; border-color: #BBB !important; }
  .cfg__dibujo { background: none; border: 1px solid #DDD; }
  .cfg__imprimir { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; padding-bottom: 10px; border-bottom: 2px solid #0A7C73; }
  .cfg__imprimir svg { width: 38px; height: 38px; }
  .cfg__imprimir p { margin: 0; line-height: 1.3; }
  .cfg__lista li { break-inside: avoid; }
}
