/* ==========================================================================
   Encuesta · páginas del flujo (sucursal, gracias, ya contestada, sin encuesta)
   Layout: una sola columna centrada de 34rem, como un asistente de configuración:
   un ícono, un titular, una frase y una sola acción. Nada compite con la tarea.
   Tokens, controles y barra superior: publico.css.
   ========================================================================== */

:root {
    --field-bg: color-mix(in srgb, var(--th-roasted-espresso) 86%, var(--th-fresh-white));
    --field-border: color-mix(in srgb, var(--th-donut-cream) 24%, transparent);
    --field-border-hover: color-mix(in srgb, var(--th-donut-cream) 40%, transparent);
    --raised: color-mix(in srgb, var(--th-roasted-espresso) 88%, var(--th-fresh-white));
    --raised-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
    --wash: color-mix(in srgb, var(--th-donut-cream) 10%, transparent);
    --icon-tint: var(--th-rich-red);
    --error-tint: var(--th-rich-red);
    --error-ink: var(--th-fresh-white);
    --error-text: #FCCFD8; /* errores como texto sobre café */
}

/* En el flujo de la encuesta el nombre del producto siempre acompaña al logo */
.lp-encuesta .lp-nav__title {
    display: inline-block;
}

/* --- Escenario: una columna centrada ------------------------------------ */

.en-main {
    padding-block: clamp(2.5rem, 1rem + 7vh, 6.5rem) clamp(3rem, 2rem + 5vh, 6rem);
}

.en-stage {
    display: grid;
    justify-items: center;
    gap: 0;
    width: 100%;
    max-width: calc(34rem + 2 * max(16px, env(safe-area-inset-left, 0px)));
    margin-inline: auto;
    padding-left: max(16px, env(safe-area-inset-left, 0px));
    padding-right: max(16px, env(safe-area-inset-right, 0px));
    text-align: center;
}

.en-icon {
    display: grid;
    place-items: center;
    width: 4.5rem;
    height: 4.5rem;
    margin-bottom: 1.75rem;
    border-radius: 50%;
    background: var(--icon-tint);
    color: var(--accent-ink);
}

.en-icon svg {
    width: 2rem;
    height: 2rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.75;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.en-title {
    margin: 0 0 1rem;
    font-size: clamp(2.25rem, 1.5rem + 3vw, 3.5rem);
    font-weight: 900;
    line-height: 1.02;
    letter-spacing: -0.02em;
    text-wrap: balance;
}

.en-title__line {
    display: block;
}

.en-lead {
    max-width: 32ch;
    margin: 0;
    font-size: var(--fs-lead);
    line-height: 1.38;
    color: var(--ink-2);
    text-wrap: pretty;
}

.en-actions {
    display: grid;
    gap: 0.75rem;
    width: 100%;
    margin-top: 2.5rem;
}

@media (min-width: 640px) {
    .en-actions--inline {
        display: flex;
        justify-content: center;
        width: auto;
    }
}

.en-note {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin: 1.5rem 0 0;
    font-size: var(--fs-small);
    color: var(--ink-2);
}

.en-note svg {
    flex: none;
    width: 1.125rem;
    height: 1.125rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.75;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.en-note a {
    color: var(--ink);
    font-weight: 700;
    text-underline-offset: 0.2em;
}

/* --- Formulario: elegir sucursal ---------------------------------------- */

.en-form {
    display: grid;
    gap: 0;
    width: 100%;
    margin-top: 2.5rem;
    text-align: left;
}

.en-pin { margin-top: 1.5rem; }
.en-pin .en-label { display: block; }
.en-pin__help { margin: 0.625rem 0 0; font-size: var(--fs-small); color: var(--ink); line-height: 1.5; }

.en-label {
    margin-bottom: 0.625rem;
    font-size: var(--fs-small);
    font-weight: 700;
    color: var(--ink);
}

.en-combobox {
    position: relative;
}

.en-combobox__icon {
    position: absolute;
    top: 50%;
    left: 1.125rem;
    width: 1.25rem;
    height: 1.25rem;
    transform: translateY(-50%);
    fill: none;
    stroke: var(--ink-2);
    stroke-width: 2;
    stroke-linecap: round;
    pointer-events: none;
}

.en-input {
    width: 100%;
    height: 3.5rem;
    padding: 0 1.125rem 0 3.125rem;
    border: 1px solid var(--field-border);
    border-radius: 14px;
    background: var(--field-bg);
    color: var(--ink);
    font-family: inherit;
    font-size: 1.125rem;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    -webkit-appearance: none;
    appearance: none;
}

.en-input::placeholder {
    color: color-mix(in srgb, var(--ink-2) 80%, transparent);
}

.en-input:hover {
    border-color: var(--field-border-hover);
}

.en-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--th-always-red) 18%, transparent);
}

.en-input::-webkit-search-cancel-button {
    display: none;
}

/* Lista de resultados: una superficie que se materializa bajo el campo */
.en-options {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 0;
    right: 0;
    z-index: 10;
    max-height: min(20rem, 50vh);
    margin: 0;
    padding: 0.375rem;
    overflow-y: auto;
    overscroll-behavior: contain;
    list-style: none;
    border-radius: 14px;
    background: var(--raised);
    box-shadow: var(--raised-shadow), 0 0 0 1px var(--hairline);
    transform-origin: top center;
    animation: en-materialize 0.18s var(--ease-out) both;
}

@keyframes en-materialize {
    from {
        opacity: 0;
        transform: translateY(-4px) scale(0.98);
    }
}

.en-option {
    display: grid;
    gap: 0.125rem;
    padding: 0.75rem 0.875rem;
    border-radius: 10px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.en-option[aria-selected="true"],
.en-option:hover {
    background: var(--wash);
}

.en-option__name {
    font-size: 1.0625rem;
    font-weight: 700;
    color: var(--ink);
}

.en-option__name mark {
    background: none;
    color: var(--accent-ink);
}

.en-option__meta {
    font-size: 0.9375rem;
    color: var(--ink-2);
}

.en-options__empty {
    padding: 1rem 0.875rem;
    font-size: var(--fs-small);
    color: var(--ink-2);
}

/* Confirmación de lo elegido, justo bajo el campo */
.en-selected {
    display: flex;
    align-items: flex-start;
    gap: 0.625rem;
    margin-top: 0.875rem;
    font-size: var(--fs-small);
    color: var(--ink-2);
}

.en-selected svg {
    flex: none;
    width: 1.25rem;
    height: 1.25rem;
    margin-top: 0.0625rem;
    fill: none;
    stroke: var(--accent-ink);
    stroke-width: 2.25;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.en-error {
    margin-top: 1rem;
    padding: 0.875rem 1rem;
    border-radius: 12px;
    background: var(--error-tint);
    color: var(--error-ink);
    font-size: var(--fs-small);
    font-weight: 700;
}

.en-form .en-actions {
    margin-top: 2rem;
}

/* --- Gracias: una palomita que se dibuja, una sola vez ------------------ */

.en-check {
    display: grid;
    place-items: center;
    width: 5.5rem;
    height: 5.5rem;
    margin-bottom: 2rem;
    border-radius: 50%;
    background: var(--accent);
    color: var(--on-accent);
}

.en-check svg {
    width: 2.75rem;
    height: 2.75rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

@media (prefers-reduced-motion: no-preference) {
    .en-check {
        animation: en-pop 0.5s var(--ease-out) both;
    }

    .en-check path {
        stroke-dasharray: 30;
        stroke-dashoffset: 30;
        animation: en-draw 0.42s var(--ease-out) 0.28s forwards;
    }

    .en-stage--gracias > :not(.en-check) {
        animation: en-rise 0.6s var(--ease-out) both;
        animation-delay: 0.35s;
    }
}

@keyframes en-pop {
    from { transform: scale(0.6); }
}

@keyframes en-draw {
    to { stroke-dashoffset: 0; }
}

@keyframes en-rise {
    from { transform: translateY(12px); }
}

/* Resumen de lo que se registró */
.en-summary {
    display: grid;
    width: 100%;
    margin: 2.5rem 0 0;
    padding: 0.5rem 1.5rem;
    border-radius: 18px;
    background: var(--tile);
    color: var(--tile-ink);
    text-align: left;
}

.en-summary div {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.25rem 1rem;
    padding: 0.875rem 0;
}

.en-summary div + div {
    border-top: 1px solid color-mix(in srgb, var(--tile-ink) 14%, transparent);
}

.en-summary dt {
    font-size: var(--fs-small);
    color: color-mix(in srgb, var(--tile-ink) 78%, transparent);
}

.en-summary dd {
    margin: 0;
    font-weight: 700;
    text-align: right;
    min-width: 0;
    overflow-wrap: anywhere;
}

.en-chip {
    display: inline-flex;
    align-items: center;
    margin-top: 1.5rem;
    padding: 0.5rem 1rem;
    border-radius: 999px;
    background: var(--tile);
    color: var(--tile-ink);
    font-size: var(--fs-small);
    font-weight: 700;
}

/* --- Accesibilidad ------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
    .en-options {
        animation: none;
    }

    .en-input {
        transition: none;
    }
}

@media (prefers-contrast: more) {
    .en-input {
        border-color: var(--ink);
    }
}

/* ==========================================================================
   Encuesta · contestar una sección
   Layout: columna de lectura de 44rem alineada a la izquierda; las preguntas
   respiran con espacio, no con líneas. Una barra inferior translúcida sostiene
   la navegación y dice cuánto falta.
   ========================================================================== */

:root {
    --track: color-mix(in srgb, var(--th-donut-cream) 22%, transparent);
}

/* --- Progreso: una línea bajo la barra superior --------------------------- */

.en-progress {
    height: 3px;
    background: var(--track);
    overflow: hidden;
}

.en-progress__fill {
    height: 100%;
    background: var(--accent);
    transform-origin: left center;
    transform: scaleX(var(--progress, 0));
    transition: transform 0.6s var(--ease-out);
}

.en-step {
    font-size: var(--fs-small);
    font-variant-numeric: tabular-nums;
    color: var(--ink-2);
}

/* --- Columna de la sección ----------------------------------------------- */

.en-survey {
    width: 100%;
    max-width: calc(44rem + 2 * max(16px, env(safe-area-inset-left, 0px)));
    margin-inline: auto;
    padding-left: max(16px, env(safe-area-inset-left, 0px));
    padding-right: max(16px, env(safe-area-inset-right, 0px));
}

.en-section-head {
    margin-bottom: clamp(2.5rem, 2rem + 2vw, 3.5rem);
}

.en-eyebrow {
    margin: 0 0 0.875rem;
    font-size: var(--fs-small);
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: var(--accent-ink);
}

.en-section-head .en-title {
    text-align: left;
}

.en-section-head .en-lead {
    max-width: 38ch;
    text-align: left;
}

.en-section-head .en-lead b,
.en-section-head .en-lead strong {
    color: var(--ink);
}

/* Al entrar a una sección el contenido sube, sin desaparecer nunca */
@media (prefers-reduced-motion: no-preference) {
    .en-enter > * {
        animation: en-rise 0.55s var(--ease-out) both;
    }
    .en-enter > :nth-child(2) { animation-delay: 0.05s; }
    .en-enter > :nth-child(3) { animation-delay: 0.1s; }
}

/* --- Preguntas ------------------------------------------------------------ */

.en-questions {
    display: grid;
    gap: clamp(3rem, 2.5rem + 2vw, 4rem);
    margin: 0;
    padding: 0;
    list-style: none;
    counter-reset: pregunta;
}

.en-q {
    display: grid;
    gap: 1.25rem;
    min-width: 0;
    scroll-margin-top: 6rem;
}

.en-q__head {
    display: grid;
    grid-template-columns: 2rem minmax(0, 1fr);
    column-gap: 0.75rem;
    row-gap: 0.375rem;
}

.en-q__num {
    padding-top: 0.25rem;
    font-size: var(--fs-small);
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: var(--ink-2);
    transition: color 0.2s ease;
}

/* Una pregunta respondida lo dice con su número */
.en-q.is-answered .en-q__num {
    color: var(--accent-ink);
}

.en-q__text {
    margin: 0;
    font-size: clamp(1.25rem, 1.1rem + 0.5vw, 1.5rem);
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -0.01em;
    text-wrap: pretty;
}

.en-q__desc {
    grid-column: 2;
    margin: 0;
    color: var(--ink-2);
}

.en-q__body {
    padding-left: 2.75rem;
}

@media (max-width: 639px) {
    .en-q__body {
        padding-left: 0;
    }
}

/* --- Escala de 5 puntos -------------------------------------------------- */

.en-scale {
    position: relative;
    display: grid;
    grid-template-columns: repeat(var(--n, 5), minmax(0, 1fr));
    margin: 0;
    padding: 0;
    border: 0;
}

/* La línea que une los puntos: dice que es una escala, no opciones sueltas */
.en-scale::before {
    content: "";
    position: absolute;
    top: 1.375rem;
    left: calc(50% / var(--n, 5));
    right: calc(50% / var(--n, 5));
    height: 2px;
    border-radius: 1px;
    background: var(--track);
}

.en-scale__opt {
    position: relative;
    display: grid;
    justify-items: center;
    align-content: start;
    gap: 0.75rem;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.en-scale__opt input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
    pointer-events: none;
}

.en-scale__dot {
    position: relative;
    display: grid;
    place-items: center;
    width: 2.75rem;
    height: 2.75rem;
    border: 2px solid var(--field-border);
    border-radius: 50%;
    background: var(--bg);
    transition: border-color 0.15s ease, background-color 0.15s ease, transform 0.1s ease-out;
}

.en-scale__dot::after {
    content: "";
    width: 0.875rem;
    height: 0.875rem;
    border-radius: 50%;
    background: var(--on-accent);
    transform: scale(0);
    transition: transform 0.25s var(--ease-out);
}

.en-scale__opt:hover .en-scale__dot {
    border-color: var(--field-border-hover);
}

/* Respuesta en el instante del toque */
.en-scale__opt:active .en-scale__dot {
    transform: scale(0.9);
}

.en-scale__opt input:checked + .en-scale__dot {
    border-color: var(--accent);
    background: var(--accent);
}

.en-scale__opt input:checked + .en-scale__dot::after {
    transform: scale(1);
}

.en-scale__opt input:focus-visible + .en-scale__dot {
    outline: 3px solid var(--accent);
    outline-offset: 3px;
}

.en-scale__label {
    max-width: 9rem;
    font-size: 0.9375rem;
    line-height: 1.25;
    text-align: center;
    color: var(--ink-2);
    transition: color 0.15s ease;
}

.en-scale__opt input:checked ~ .en-scale__label {
    font-weight: 700;
    color: var(--ink);
}

/* En pantallas angostas: solo los extremos y la opción elegida */
.en-scale__ends,
.en-scale__value {
    display: none;
}

@media (max-width: 639px) {
    .en-scale__label {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
        white-space: nowrap;
    }

    .en-scale__ends {
        display: flex;
        justify-content: space-between;
        gap: 1rem;
        margin-top: 0.75rem;
        font-size: 0.9375rem;
        line-height: 1.25;
        color: var(--ink-2);
    }

    .en-scale__ends span {
        max-width: 45%;
    }

    .en-scale__ends span:last-child {
        text-align: right;
    }

    .en-scale__value {
        display: block;
        min-height: 1.5rem;
        margin-top: 0.75rem;
        font-weight: 700;
        text-align: center;
        color: var(--accent-ink);
    }
}

/* --- Respuesta abierta ---------------------------------------------------- */

.en-textarea {
    width: 100%;
    min-height: 9rem;
    padding: 1rem 1.125rem;
    border: 1px solid var(--field-border);
    border-radius: 14px;
    background: var(--field-bg);
    color: var(--ink);
    font-family: inherit;
    font-size: 1.0625rem;
    line-height: 1.5;
    resize: vertical;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.en-textarea::placeholder {
    color: color-mix(in srgb, var(--ink-2) 80%, transparent);
}

.en-textarea:hover {
    border-color: var(--field-border-hover);
}

.en-textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--th-always-red) 18%, transparent);
}

.en-counter {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 0.625rem;
    font-size: 0.9375rem;
    font-variant-numeric: tabular-nums;
    color: var(--ink-2);
}

.en-counter__hint {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
}

.en-counter__hint svg {
    display: none;
    width: 1rem;
    height: 1rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.en-q.is-answered .en-counter__hint {
    color: var(--accent-ink);
    font-weight: 700;
}

.en-q.is-answered .en-counter__hint svg {
    display: block;
}

/* --- Opciones (datos demográficos) --------------------------------------- */

.en-choices {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 12rem), 1fr));
    gap: 0.625rem;
}

.en-choice {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-height: 3.25rem;
    padding: 0.75rem 1rem;
    border: 1px solid var(--field-border);
    border-radius: 12px;
    background: var(--field-bg);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease-out;
}

.en-choice:hover {
    border-color: var(--field-border-hover);
}

.en-choice:active {
    transform: scale(0.98);
}

.en-choice input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.en-choice__mark {
    flex: none;
    display: grid;
    place-items: center;
    width: 1.375rem;
    height: 1.375rem;
    border: 2px solid var(--field-border);
    border-radius: 50%;
    transition: border-color 0.15s ease, background-color 0.15s ease;
}

.en-choice__mark::after {
    content: "";
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    background: var(--on-accent);
    transform: scale(0);
    transition: transform 0.2s var(--ease-out);
}

.en-choice__text {
    font-size: 1.0625rem;
    line-height: 1.3;
}

.en-choice:has(input:checked) {
    border-color: var(--accent);
    box-shadow: inset 0 0 0 1px var(--accent);
}

.en-choice input:checked + .en-choice__mark {
    border-color: var(--accent);
    background: var(--accent);
}

.en-choice input:checked + .en-choice__mark::after {
    transform: scale(1);
}

.en-choice:has(input:focus-visible) {
    outline: 3px solid var(--accent);
    outline-offset: 2px;
}

.en-otro {
    margin-top: 0.75rem;
}

.en-otro .en-input {
    padding-left: 1.125rem;
}


.en-optional {
    margin-left: 0.5rem;
    font-size: var(--fs-small);
    font-weight: 400;
    color: var(--ink-2);
}

/* --- Bienvenida e intermedia --------------------------------------------- */

.en-facts {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 2rem 0 0;
    padding: 0;
    list-style: none;
}

.en-facts li {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.875rem;
    border-radius: 999px;
    background: var(--tile);
    color: var(--tile-ink);
    font-size: var(--fs-small);
    font-weight: 700;
}

.en-facts svg {
    width: 1.125rem;
    height: 1.125rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Anillo de avance en la sección intermedia */
.en-ring {
    position: relative;
    width: 8rem;
    height: 8rem;
    margin-bottom: 2rem;
}

.en-ring svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.en-ring circle {
    fill: none;
    stroke-width: 8;
}

.en-ring__track {
    stroke: var(--track);
}

.en-ring__fill {
    stroke: var(--accent);
    stroke-linecap: round;
    stroke-dasharray: 100;
    stroke-dashoffset: calc(100 - var(--progress, 0) * 100);
}

@media (prefers-reduced-motion: no-preference) {
    .en-ring__fill {
        animation: en-ring-fill 0.9s var(--ease-out) 0.15s both;
    }
}

@keyframes en-ring-fill {
    from { stroke-dashoffset: 100; }
}

.en-ring__value {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    font-size: 1.75rem;
    font-weight: 900;
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
}

/* --- Barra inferior: material translúcido -------------------------------- */

.en-bar {
    position: sticky;
    bottom: 0;
    z-index: 15;
    margin-top: clamp(4rem, 3rem + 4vw, 6rem);
    padding-bottom: env(safe-area-inset-bottom, 0px);
    background: var(--nav-bg);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    backdrop-filter: saturate(180%) blur(20px);
    border-top: 1px solid var(--hairline);
}

.en-bar__inner {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 1rem;
    min-height: 4.5rem;
    padding-block: 0.75rem;
}

.en-bar__status {
    min-width: 0;
    font-size: var(--fs-small);
    font-variant-numeric: tabular-nums;
    text-align: center;
    color: var(--ink-2);
}

.en-bar__status.is-done {
    font-weight: 700;
    color: var(--accent-ink);
}

.en-back {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    min-height: 2.75rem;
    padding: 0 0.75rem 0 0.375rem;
    border: 0;
    border-radius: 999px;
    background: none;
    color: var(--ink);
    font-family: inherit;
    font-size: var(--fs-small);
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.15s ease, transform 0.1s ease-out;
}

.en-back:hover {
    background: var(--wash);
}

.en-back:active {
    transform: scale(0.97);
}

.en-back svg {
    width: 1.25rem;
    height: 1.25rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.en-next {
    gap: 0.5rem;
    min-width: 8.5rem;
}

.en-spinner {
    width: 1.125rem;
    height: 1.125rem;
    border: 2px solid color-mix(in srgb, var(--on-accent) 35%, transparent);
    border-top-color: var(--on-accent);
    border-radius: 50%;
    animation: en-spin 0.8s linear infinite;
}

@keyframes en-spin {
    to { transform: rotate(360deg); }
}

@media (max-width: 479px) {
    .en-bar__status {
        display: none;
    }

    .en-bar__inner {
        grid-template-columns: auto 1fr;
    }

    .en-next {
        justify-self: end;
    }
}

@media (prefers-reduced-transparency: reduce) {
    .en-bar {
        -webkit-backdrop-filter: none;
        backdrop-filter: none;
        background: var(--bg);
    }
}

@media (prefers-reduced-motion: reduce) {
    .en-progress__fill,
    .en-scale__dot,
    .en-scale__dot::after,
    .en-choice,
    .en-choice__mark::after {
        transition: none;
    }
}

/* La pausa intermedia se centra alrededor del anillo */
.en-survey--center {
    display: grid;
    justify-items: center;
    text-align: center;
}

.en-survey--center .en-section-head {
    display: grid;
    justify-items: center;
}

.en-survey--center .en-section-head .en-title,
.en-survey--center .en-section-head .en-lead {
    text-align: center;
}

/* --- Aviso dentro de la barra: reemplaza a alert() ------------------------ */

.en-alert {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.75rem 1rem;
    margin-top: 0.75rem;
    padding: 0.875rem 1rem;
    border-radius: 14px;
    background: var(--error-tint);
    color: var(--error-ink);
    transform-origin: bottom center;
}

.en-alert[hidden] {
    display: none;
}

@media (prefers-reduced-motion: no-preference) {
    .en-alert:not([hidden]) {
        animation: en-alert-in 0.28s var(--ease-out) both;
    }
}

@keyframes en-alert-in {
    from {
        opacity: 0;
        transform: translateY(8px) scale(0.98);
    }
}

.en-alert > svg {
    width: 1.375rem;
    height: 1.375rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.en-alert__text {
    margin: 0;
    font-size: var(--fs-small);
    line-height: 1.35;
}

.en-alert__text strong {
    display: block;
    font-weight: 700;
}

.en-alert__action {
    min-height: 2.5rem;
    padding: 0 1rem;
    border: 0;
    border-radius: 999px;
    background: var(--error-ink);
    color: var(--error-tint);
    font-family: inherit;
    font-size: var(--fs-small);
    font-weight: 700;
    white-space: nowrap;
    cursor: pointer;
    transition: transform 0.1s ease-out;
}

.en-alert__action:active {
    transform: scale(0.97);
}

@media (max-width: 479px) {
    .en-alert {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .en-alert__action {
        grid-column: 1 / -1;
        width: 100%;
    }
}

/* --- Validación en línea (la marca el JS de la encuesta) ------------------ */

.en-q.error .en-textarea {
    border-color: var(--error-text);
}

.en-q .error-message {
    margin-top: 0.5rem;
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--error-text);
}

.en-q.error .en-counter__hint {
    display: none;
}

.en-section-note {
    max-width: 44ch;
    margin: 1rem 0 0;
    color: var(--ink-2);
}

/* El campo "Otro" lo muestra el JS con display; al aparecer se materializa */
@media (prefers-reduced-motion: no-preference) {
    .en-otro {
        animation: en-materialize 0.2s var(--ease-out) both;
    }
}
