:root {
    --q4-navy-1: #182241;
    --q4-navy-2: #223157;
    --q4-gold-1: #f1c743;
    --q4-gold-2: #dfb834;
    --q4-white: #ffffff;
    --q4-ink: #121a2f;
    --q4-ink-soft: #778099;
    --q4-panel-border: #e3e8f0;
    --q4-panel-border-2: #e6ebf3;
    --q4-shadow: 0 16px 36px rgba(9, 14, 27, 0.16), 0 30px 72px rgba(9, 14, 27, 0.14);
    --q4-ease: cubic-bezier(.2, .7, .2, 1);
}

.es-q4-main {
    min-height: calc(100vh - 180px);
}

.es-q4-hero {
    position: relative;
    overflow: hidden;
    padding: 28px 0 42px;
    background:
        radial-gradient(circle at 82% 16%, rgba(223, 184, 52, 0.16), transparent 18%),
        radial-gradient(circle at 86% 22%, rgba(223, 184, 52, 0.08), transparent 28%),
        linear-gradient(180deg, rgba(24, 34, 65, 0.98) 0%, rgba(38, 49, 83, 0.98) 100%);
}

.es-q4-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
    background-size: 64px 64px;
    mask-image: linear-gradient(180deg, rgba(0, 0, 0, .8), rgba(0, 0, 0, .35), transparent);
    pointer-events: none;
}

.es-q4-meta {
    position: relative;
    z-index: 1;
    margin: 0 0 10px;
    color: rgba(255, 255, 255, 0.78);
    font-size: 13px;
}

.es-q4-stage {
    position: relative;
    z-index: 1;
    margin-bottom: 18px;
}

.es-q4-stage-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    color: rgba(255, 255, 255, 0.82);
    font-size: 13px;
    margin-bottom: 10px;
}

.es-q4-stage-track,
.es-q4-big-progress-track {
    height: 8px;
    border-radius: 999px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.12);
}

.es-q4-stage-track>span,
.es-q4-big-progress-track>span {
    display: block;
    height: 100%;
    width: 0%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--q4-gold-1) 0%, var(--q4-gold-2) 100%);
    box-shadow: 0 0 18px rgba(223, 184, 52, 0.45);
    transition: width .55s var(--q4-ease);
}

.es-q4-intro {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(320px, 1fr) minmax(420px, 540px);
    gap: 40px;
    align-items: center;
}

.es-q4-copy {
    color: #fff;
    padding-top: 8px;
}

.es-q4-copy h1 {
    margin: 18px 0 14px;
    max-width: 10ch;
    font-size: clamp(42px, 6vw, 68px);
    line-height: .96;
    letter-spacing: -.06em;
}

.es-q4-copy h1 span {
    color: #f4d06a;
}

.es-q4-copy p {
    margin: 0;
    max-width: 52ch;
    color: rgba(255, 255, 255, 0.88);
    font-size: 17px;
    line-height: 1.7;
}

.es-q4-points {
    display: grid;
    gap: 12px;
    margin-top: 28px;
    max-width: 520px;
}

.es-q4-point {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 56px;
    padding: 12px 14px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(12px);
}

.es-q4-point strong {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 999px;
    background: rgba(223, 184, 52, 0.14);
    border: 1px solid rgba(223, 184, 52, 0.24);
    color: #f4d06a;
    font-size: 12px;
    font-weight: 900;
    flex: 0 0 auto;
}

.es-q4-point span {
    color: #f3f6fc;
    font-size: 14px;
    font-weight: 600;
}

.es-q4-form-card,
.es-q4-question-shell,
.es-q4-bottom-bar {
    border-radius: 22px;
    box-shadow: var(--q4-shadow);
}

.es-q4-form-card {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.14) 0%, rgba(255, 255, 255, 0.08) 100%);
    border: 1px solid rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(16px);
    padding: 20px;
}

.es-q4-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.es-q4-field {
    display: grid;
    gap: 8px;
    margin-bottom: 14px;
    color: #eef2fb;
    font-size: 13px;
    font-weight: 700;
}

.es-q4-field span em {
    color: #f1c743;
    font-style: normal;
}

.es-q4-field input,
.es-q4-field select {
    width: 100%;
    min-height: 56px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.10);
    background: linear-gradient(180deg, #223054 0%, #1b2542 100%);
    color: #eef3ff;
    padding: 14px 16px;
    outline: none;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: -0.01em;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.04),
        0 10px 22px rgba(7, 11, 24, 0.14);
    transition:
        border-color .22s ease,
        box-shadow .22s ease,
        background .22s ease,
        transform .18s ease;
}

.es-q4-field input::placeholder {
    color: rgba(238, 243, 255, 0.48);
}

.es-q4-field input:focus,
.es-q4-field select:focus {
    border-color: rgba(241, 199, 67, 0.82);
    box-shadow:
        0 0 0 4px rgba(241, 199, 67, 0.11),
        0 14px 28px rgba(7, 11, 24, 0.20);
    background: linear-gradient(180deg, #28365c 0%, #202a49 100%);
    transform: translateY(-1px);
}

.es-q4-select-wrap {
    position: relative;
}

.es-q4-select-wrap::after {
    content: "";
    position: absolute;
    right: 18px;
    top: 50%;
    width: 10px;
    height: 10px;
    margin-top: -7px;
    border-right: 2px solid rgba(241, 199, 67, 0.92);
    border-bottom: 2px solid rgba(241, 199, 67, 0.92);
    transform: rotate(45deg);
    pointer-events: none;
}

.es-q4-field select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    padding-right: 48px;
    cursor: pointer;
}

.es-q4-field select option {
    background: #1b2542;
    color: #eef3ff;
}

.es-q4-label-with-help {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    position: relative;
    flex-wrap: wrap;
}

.es-q4-help-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    cursor: help;
}

.es-q4-tooltip {
    position: absolute;
    top: 26px;
    left: 0;
    width: 280px;
    padding: 10px 12px;
    border-radius: 10px;
    background: #1b2542;
    color: #eef3ff;
    font-size: 13px;
    line-height: 1.4;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.25);
    opacity: 0;
    pointer-events: none;
    transform: translateY(6px);
    transition: all .18s ease;
    z-index: 4;
}

.es-q4-help-icon:hover+.es-q4-tooltip,
.es-q4-help-icon:focus+.es-q4-tooltip {
    opacity: 1;
    transform: translateY(0);
}

.es-q4-field-help {
    margin-top: 2px;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.45;
    color: rgba(238, 243, 255, 0.75);
}

.es-q4-field-error {
    font-size: 12px;
    font-weight: 500;
    line-height: 1.45;
    color: #ff7070;
    min-height: 0;
    display: block;
}

.es-q4-field-error:empty {
    display: none;
}

.es-q4-option-description {
    margin-top: 6px;
    font-size: 13px;
    line-height: 1.5;
    color: rgba(238, 243, 255, 0.82);
    min-height: 38px;
}

.es-q4-consents {
    display: grid;
    gap: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    margin-top: 8px;
    padding-top: 16px;
}

.es-love-check--dark {
    color: #e8edf8;
}

.es-love-check--dark input {
    accent-color: #f1c743;
}

.es-q4-actions {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 18px;
}

.es-q4-assessment-wrap {
    background: #f4f5f8;
    padding: 28px 0 54px;
}

.es-q4-assessment {
    display: grid;
    gap: 16px;
}

.es-q4-question-shell {
    background: #fff;
    border: 1px solid var(--q4-panel-border);
    padding: 20px;
}

.es-q4-progress-card {
    margin-bottom: 14px;
}

.es-q4-progress-head {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
    margin-bottom: 14px;
}

.es-q4-progress-head h2 {
    margin: 10px 0 0;
    color: var(--q4-ink);
    font-size: 36px;
    line-height: 1;
    letter-spacing: -.045em;
}

.es-q4-progress-stats {
    text-align: right;
}

.es-q4-progress-stats strong {
    display: block;
    color: var(--q4-ink);
    font-size: 16px;
}

.es-q4-progress-stats span {
    color: var(--q4-ink-soft);
    font-size: 13px;
}

.es-q4-big-progress-track {
    background: #e6ebf3;
}

.es-q4-question-stack {
    display: grid;
    gap: 14px;
}

.es-q4-q-card {
    opacity: 0;
    transform: translateY(18px);
    animation: q4CardIn .45s var(--q4-ease) forwards;
    padding: 16px;
    border-radius: 18px;
    background: #fff;
    border: 1px solid var(--q4-panel-border-2);
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.04);
    transition:
        border-color .2s ease,
        box-shadow .2s ease,
        transform .2s ease,
        background .2s ease;
}

.es-q4-q-card:hover {
    transform: translateY(-1px);
    border-color: #d8dfeb;
}

.es-q4-q-card.is-answered {
    background: linear-gradient(180deg, rgba(241, 199, 67, 0.10) 0%, rgba(255, 255, 255, 1) 100%);
    border-color: rgba(223, 184, 52, 0.36);
    box-shadow: 0 14px 28px rgba(223, 184, 52, 0.10);
}

.es-q4-q-index {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 30px;
    height: 30px;
    border-radius: 999px;
    background: #edf1f7;
    color: #182241;
    font-size: 12px;
    font-weight: 900;
    margin-bottom: 10px;
}

.es-q4-q-text {
    margin: 0 0 12px;
    color: var(--q4-ink);
    font-size: 17px;
    line-height: 1.45;
    max-width: 62ch;
}

.es-q4-scale,
.es-q4-anchors {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
}

.es-q4-choice-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.es-q4-choice-number {
    display: block;
    font-size: 16px;
    font-weight: 900;
}

.es-q4-choice-anchor-inline {
    display: none;
    min-height: 14px;
}

.es-q4-choice-btn {
    min-height: 56px;
    border-radius: 14px;
    border: 1px solid #dbe2ec;
    background: #fff;
    color: #182241;
    font-size: 16px;
    font-weight: 800;
    cursor: pointer;
    transition:
        background .18s ease,
        border-color .18s ease,
        transform .18s ease,
        box-shadow .18s ease,
        color .18s ease;
}

.es-q4-choice-btn:hover {
    transform: translateY(-1px);
    border-color: #cfd8e6;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
}

.es-q4-choice-btn.is-selected {
    background: linear-gradient(180deg, var(--q4-gold-1) 0%, var(--q4-gold-2) 100%);
    border-color: transparent;
    color: #1a233e;
    box-shadow: 0 14px 28px rgba(223, 184, 52, 0.22);
}

.es-q4-anchors {
    margin-top: 8px;
}

.es-q4-anchor {
    min-height: 2.8em;
    color: #8a93a8;
    font-size: 12px;
    text-align: center;
    line-height: 1.35;
}

.es-q4-bottom-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    background: #fff;
    border: 1px solid var(--q4-panel-border);
    position: sticky;
    bottom: 12px;
}

.es-q4-bottom-meta {
    color: var(--q4-ink);
    font-size: 14px;
    font-weight: 800;
}

.es-q4-cooldown {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    margin-bottom: 14px;
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(244, 214, 217, 0.18);
    border: 1px solid rgba(244, 214, 217, 0.36);
    color: #fff;
}

.es-q4-cooldown strong {
    display: block;
    margin-bottom: 4px;
}

#btnNextGroup {
    transition: opacity 0.2s ease, transform 0.1s ease;
}

#btnNextGroup:disabled {
    opacity: 0.5;
    transform: scale(0.98);
}

@keyframes q4CardIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 1100px) {
    .es-q4-intro {
        grid-template-columns: 1fr;
        gap: 26px;
    }

    .es-q4-copy {
        padding-top: 6px;
    }

    .es-q4-copy h1 {
        max-width: none;
    }

    .es-q4-form-card {
        max-width: 700px;
    }
}

@media (max-width: 760px) {

    .es-q4-grid-2 {
        grid-template-columns: 1fr;
    }

    .es-q4-scale {
        grid-template-columns: 1fr;
    }

    .es-q4-anchors {
        display: none;
    }

    .es-q4-progress-head,
    .es-q4-actions,
    .es-q4-bottom-bar,
    .es-q4-stage-row {
        flex-direction: column;
        align-items: stretch;
    }

    .es-q4-progress-stats {
        text-align: left;
    }

    .es-q4-anchor {
        display: block;
        min-height: 0;
        font-size: 11px;
        line-height: 1.3;
        text-align: left;
        color: #6f7890;
        padding: 2px 0 0;
    }

    .es-q4-bottom-bar {
        position: static;
    }

    .es-q4-tooltip {
        width: min(280px, calc(100vw - 56px));
    }

    .es-q4-choice-btn {
        min-height: 58px;
        padding: 6px 10px;
        text-align: left;
    }

    .es-q4-choice-btn.has-inline-anchor {
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .es-q4-choice-number {
        min-width: 18px;
        font-size: 16px;
        font-weight: 900;
    }

    .es-q4-choice-anchor-inline {
        display: block;
        font-size: 11px;
        line-height: 1.25;
        text-align: center;
        color: #6f7890;
    }
}