

:root {
    --c-wine-deep:   #3A0E1A;
    --c-wine:        #6B1A2F;
    --c-wine-mid:    #8E2340;
    --c-wine-soft:   rgba(107, 26, 47, 0.07);
    --c-gold:        #C9A84C;
    --c-gold-light:  #D4BA6A;
    --c-gold-pale:   #E8D9A0;
    --c-white:       #FFFFFF;
    --c-off-white:   #FAF8F5;
    --c-ink:         #1A1A1A;
    --c-ink-2:       #3D3D3D;
    --c-ink-3:       #6B6B6B;
    --c-ink-4:       #9A9A9A;
    --c-rule:        #E8E0D8;
    --font:          'Poppins', sans-serif;
    --font-display:  'Poppins', serif;
    --sidebar-w:     380px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
    font-family: var(--font);
    color: var(--c-ink);
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    overflow-x: hidden;
    background: #111;
}

.survey-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
}

.survey-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

.survey-bg-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        170deg,
        rgba(8, 34, 18, 0.9) 0%,
        rgba(12, 50, 26, 0.7) 50%,
        rgba(255, 255, 255, 0.15) 100%
    );
}


.survey-bg-overlay::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 20% 10%, rgba(0,0,0,0.1) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 90%, rgba(0,0,0,0.12) 0%, transparent 50%);
    pointer-events: none;
}


.survey-layout {
    position: relative;
    z-index: 1;
    display: flex;
    min-height: 100vh;
    padding-top: 4px;
}


.survey-sidebar {
    width: var(--sidebar-w);
    flex-shrink: 0;
    position: fixed;
    top: 4px;
    left: 0;
    height: calc(100vh - 4px);
    z-index: 100;
    display: flex;
    flex-direction: column;
    background: rgba(20, 20, 20, 0.35);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    border-right: 1px solid rgba(255,255,255,0.06);
}

.sidebar-inner {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 2.25rem 2rem 1.75rem;
}

.sidebar-logos {
    display: flex;
    align-items: center;
    justify-content: center; 
    gap: 0.875rem;
    margin-bottom: 2.25rem;
}

.sidebar-logos img:first-child {
    margin-right: auto; 
}

.sidebar-logos img:last-child {
    margin-left: auto; 
}

.sidebar-logos img {
    height: 46px;
    width: auto;
    object-fit: contain;
    filter: brightness(0) invert(1);
    opacity: 0.9;
}

.sidebar-title-area {
    margin-bottom: 1.75rem;
}

.sidebar-label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.55rem;
    font-weight: 500;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.4);
    margin-bottom: 0.75rem;
}


.sidebar-title {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
    color: var(--c-white);
    line-height: 1.1;
}

.sidebar-title em {
    font-style: italic;
    color: rgba(255,255,255,0.35);
    font-weight: 500;
    display: block;
}

.sidebar-title strong {
    color: var(--c-gold);
    font-weight: 700;
    display: block;
    font-size: 2.1rem;
}

.sidebar-desc {
    margin-top: 0.875rem;
    font-size: 0.7rem;
    font-weight: 400;
    color: rgba(255,255,255,0.4);
    line-height: 1.6;
}

.sidebar-desc b {
    color: var(--c-gold-light);
    font-weight: 600;
}

.sidebar-progress {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    margin-bottom: 1.5rem;
    padding: 1rem 1.125rem;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 14px;
}

.progress-ring-wrap {
    position: relative;
    width: 60px;
    height: 60px;
    flex-shrink: 0;
}

.progress-ring-wrap svg {
    transform: rotate(-90deg);
    width: 60px;
    height: 60px;
}

.progress-ring-bg {
    fill: none;
    stroke: rgba(255,255,255,0.08);
    stroke-width: 4;
}

.progress-ring-fill {
    fill: none;
    stroke: var(--c-gold);
    stroke-width: 4;
    stroke-linecap: round;
    stroke-dasharray: 163.36;
    stroke-dashoffset: 163.36;
    transition: stroke-dashoffset 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.progress-ring-text {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--c-white);
}

.progress-info { flex: 1; }

.progress-info-label {
    font-size: 0.6rem;
    font-weight: 500;
    color: rgba(255,255,255,0.3);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 0.2rem;
}

.progress-info-detail {
    font-size: 0.75rem;
    font-weight: 500;
    color: rgba(255,255,255,0.7);
}

.progress-info-detail span {
    color: var(--c-gold);
    font-weight: 700;
}

/* Section tracker */
.sidebar-sections {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
    margin-bottom: 1.25rem;
}

.sec-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.55rem 0.75rem;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.sec-item.active { background: rgba(255,255,255,0.06); }

.sec-item-icon {
    width: 26px;
    height: 26px;
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    flex-shrink: 0;
    transition: all 0.3s;
    background: rgba(255,255,255,0.05);
    color: rgba(255,255,255,0.2);
    border: 1px solid rgba(255,255,255,0.05);
}

.sec-item.active .sec-item-icon { background: var(--c-gold); color: var(--c-wine-deep); border-color: var(--c-gold); }
.sec-item.done .sec-item-icon { background: rgba(201,168,76,0.15); color: var(--c-gold); border-color: rgba(201,168,76,0.2); }

.sec-item-text {
    font-size: 0.68rem;
    font-weight: 500;
    color: rgba(255,255,255,0.2);
    transition: color 0.3s;
}

.sec-item.active .sec-item-text { color: rgba(255,255,255,0.85); }
.sec-item.done .sec-item-text   { color: rgba(255,255,255,0.45); }

.sec-item-dots { display: flex; gap: 4px; margin-left: auto; }

.sec-item-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255,255,255,0.06);
    transition: background 0.3s;
}

.sec-item-dot.filled  { background: var(--c-gold); }
.sec-item-dot.current { background: rgba(255,255,255,0.2); }


.sidebar-student {
    margin-top: auto;
    padding: 1rem 1.125rem;
    background: rgba(255,255,255,0.04);
    border-radius: 12px;
}

.sidebar-student-header {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    margin-bottom: 0.75rem;
    padding-bottom: 0.625rem;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.student-avatar {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(201,168,76,0.15);
    color: var(--c-gold);
    font-size: 0.6rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}

.student-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

.student-header-text {
    font-size: 0.6rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: white;
}

.sidebar-student-list {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.student-row {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
}

.student-row-label {
    font-size: 0.575rem;
    font-weight: 500;
    color: rgba(255,255,255,0.8);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    min-width: 62px;
    flex-shrink: 0;
}

.student-row-value {
    font-size: 0.7rem;
    font-weight: 500;
    color: white;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}


.survey-main {
    flex: 1;
    margin-left: var(--sidebar-w);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.survey-main-inner {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2.5rem 3rem;
}

.question-stage {
    width: 100%;
    max-width: 560px;
}



.mobile-header {
    display: none;
}

@media (max-width: 991.98px) {
    .survey-bg         { position: absolute; height: 220px; }
    .survey-wine-bar   { position: absolute; }
    .survey-sidebar    { display: none; }
    .survey-main       { margin-left: 0; }

    body { background: var(--c-off-white); }

    .survey-layout {
        flex-direction: column;
        padding-top: 0;
    }

    .mobile-header {
        display: block;
        position: relative;
        overflow: hidden;
        min-height: 180px;
    }

    .mobile-header-bg {
        position: absolute;
        inset: 0;
        z-index: 0;
    }

    .mobile-header-bg img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center;
    }

    .mobile-header-overlay {
        position: absolute;
        inset: 0;
        z-index: 1;
        background:
            linear-gradient(
                160deg,
                rgba(26, 46, 26, 0.9) 0%,
                rgba(45, 60, 35, 0.87) 40%,
                rgba(107, 26, 47, 0.85) 100%
            );
    }

    .mobile-wine-bar {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 3px;
        background: linear-gradient(90deg, var(--c-wine), var(--c-wine-mid), var(--c-gold));
        z-index: 3;
    }

    .mobile-header-content {
        position: relative;
        z-index: 2;
        padding: 1.5rem 1.25rem 1.5rem;
    }

    .mobile-top {
        display: flex;
        align-items: center;
        justify-content: space-between;
        margin-bottom: 1rem;
    }

    .mobile-logos {
        display: flex;
        align-items: center;
        gap: 0.625rem;
    }

    .mobile-logos img {
        height: 28px;
        filter: brightness(0) invert(1);
        opacity: 0.9;
    }

    .mobile-logos-sep {
        width: 1px;
        height: 18px;
        background: rgba(255,255,255,0.18);
    }

    .mobile-student-pill {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        padding: 0.3rem 0.65rem 0.3rem 0.3rem;
        background: rgba(255,255,255,0.08);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        border: 1px solid rgba(255,255,255,0.1);
        border-radius: 999px;
    }

    .mobile-student-av {
        width: 26px;
        height: 26px;
        border-radius: 50%;
        background: rgba(201,168,76,0.2);
        color: var(--c-gold);
        font-size: 0.55rem;
        font-weight: 700;
        display: flex;
        align-items: center;
        justify-content: center;
        overflow: hidden;
    }

    .mobile-student-av img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        border-radius: 50%;
    }

    .mobile-student-name {
        font-size: 0.68rem;
        font-weight: 600;
        color: rgba(255,255,255,0.8);
    }

    .mobile-title {
        font-family: var(--font-display);
        font-size: 1.35rem;
        font-weight: 700;
        color: var(--c-white);
        line-height: 1.15;
        margin-bottom: 1rem;
    }

    .mobile-title em {
        font-style: italic;
        color: rgba(255,255,255,0.35);
        font-weight: 500;
    }

    .mobile-title strong {
        color: var(--c-gold);
        font-weight: 700;
    }

    .mobile-progress {
        display: flex;
        align-items: center;
        gap: 0.75rem;
    }

    .mobile-progress-bar {
        flex: 1;
        height: 4px;
        background: rgba(255,255,255,0.1);
        border-radius: 4px;
        overflow: hidden;
    }

    .mobile-progress-fill {
        height: 100%;
        background: var(--c-gold);
        border-radius: 4px;
        width: 0%;
        transition: width 0.6s cubic-bezier(0.22, 1, 0.36, 1);
    }

    .mobile-progress-pct {
        font-size: 0.7rem;
        font-weight: 700;
        color: var(--c-gold-light);
        min-width: 32px;
        text-align: right;
    }

    .survey-main-inner {
        padding: 1.5rem 1.25rem 2.5rem;
        align-items: flex-start;
    }

    .keyboard-hint { display: none; }
}

@media (max-width: 575.98px) {
    .mobile-header { min-height: 160px; }
    .mobile-header-content { padding: 1.25rem 1rem 1.25rem; }
    .mobile-title { font-size: 1.15rem; }
}