/**
 * Empowering Differences — Survey & Teaser Styles
 *
 * Mobile-first, full-screen question flow with emotional slider UX.
 */

/* ─── Reset & Base ───────────────────────────────────────────────── */

.ed-survey,
.ed-teaser,
.ed-resend {
    --ed-purple: #6B2FA0;
    --ed-purple-light: #9B59B6;
    --ed-purple-dark: #4A1A6B;
    --ed-gold: #F2A900;
    --ed-green: #27AE60;
    --ed-red: #E74C3C;
    --ed-gray-100: #F7F8FA;
    --ed-gray-200: #E9ECF0;
    --ed-gray-400: #A0AEC0;
    --ed-gray-700: #4A5568;
    --ed-gray-900: #1A202C;
    --ed-radius: 12px;
    --ed-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);

    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    color: var(--ed-gray-900);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

/* ─── Category Color System ──────────────────────────────────────── */

.ed-survey {
    --ed-cat-bg: #0d0d1a;
    --ed-cat-accent: #3D4063;
    transition: background-color 0.6s ease;
}

.ed-survey[data-category="ability"]   { --ed-cat-bg: #2B2D42; --ed-cat-accent: #3D4063; }
.ed-survey[data-category="age"]       { --ed-cat-bg: #D4942A; --ed-cat-accent: #B87D1F; }
.ed-survey[data-category="class"]     { --ed-cat-bg: #507B7D; --ed-cat-accent: #3D5F61; }
.ed-survey[data-category="education"] { --ed-cat-bg: #C93545; --ed-cat-accent: #A52B3A; }
.ed-survey[data-category="ethnicity"] { --ed-cat-bg: #D4942A; --ed-cat-accent: #B87D1F; }
.ed-survey[data-category="gender"]    { --ed-cat-bg: #C93545; --ed-cat-accent: #A52B3A; }
.ed-survey[data-category="language"]  { --ed-cat-bg: #4A2066; --ed-cat-accent: #5E2D80; }
.ed-survey[data-category="race"]      { --ed-cat-bg: #3D2352; --ed-cat-accent: #4E2E68; }
.ed-survey[data-category="religion"]  { --ed-cat-bg: #2A2640; --ed-cat-accent: #383455; }
.ed-survey[data-category="sexuality"] { --ed-cat-bg: #507B7D; --ed-cat-accent: #3D5F61; }

/* ─── Survey Container — Dark Immersive Mode ────────────────────── */

.ed-survey {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw !important;
    max-width: 100vw !important;
    height: 100vh !important;
    height: 100dvh !important;
    overflow: hidden;
    overflow-x: hidden;
    background: var(--ed-cat-bg);
    touch-action: pan-y;
    -webkit-overflow-scrolling: touch;
    z-index: 99999;
    padding: env(safe-area-inset-top) env(safe-area-inset-right) 0 env(safe-area-inset-left);
}

/* Lock the html/body when survey is active — hide WP chrome */
html:has(.ed-survey),
body:has(.ed-survey) {
    overflow: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background: var(--ed-cat-bg, #0d0d1a) !important;
}
body:has(.ed-survey)::before,
body:has(.ed-survey)::after {
    display: none !important;
}
/* Hide all WP theme chrome when survey is active */
body:has(.ed-survey) #wpadminbar,
body:has(.ed-survey) header,
body:has(.ed-survey) footer,
body:has(.ed-survey) .wp-site-blocks > header,
body:has(.ed-survey) .wp-site-blocks > footer,
body:has(.ed-survey) .site-header,
body:has(.ed-survey) .site-footer,
body:has(.ed-survey) .entry-header,
body:has(.ed-survey) .wp-block-post-title,
body:has(.ed-survey) h1.wp-block-post-title {
    display: none !important;
}
/* Reset all WP content wrappers — no max-width, no padding, no margin */
body:has(.ed-survey) .wp-site-blocks,
body:has(.ed-survey) .entry-content,
body:has(.ed-survey) .wp-block-post-content,
body:has(.ed-survey) main,
body:has(.ed-survey) .wp-block-group,
body:has(.ed-survey) article {
    max-width: none !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
}

/* Animated radial gradient layer — uses category accent when set, JS glows otherwise */
.ed-survey::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
    transition: background 0.8s ease;
    background:
        radial-gradient(ellipse at 20% 50%, var(--ed-glow-1, rgba(107, 47, 160, 0.25)) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, var(--ed-glow-2, rgba(242, 169, 0, 0.15)) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 80%, var(--ed-glow-3, rgba(107, 47, 160, 0.12)) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 45%, color-mix(in srgb, var(--ed-cat-accent) 22%, transparent) 0%, transparent 55%);
}

/* ─── Floating Orbs (blurred color blobs behind the card) ────────── */

.ed-survey__orb {
    position: fixed;
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
    filter: blur(60px);
    opacity: 0.18;
    transition: background 0.8s ease, opacity 0.8s ease;
    will-change: transform, background;
}

.ed-survey__orb--1 {
    width: clamp(150px, 40vw, 400px);
    height: clamp(150px, 40vw, 400px);
    top: 10%;
    right: -5%;
    background: var(--ed-purple);
    animation: edOrbFloat1 8s ease-in-out infinite;
}

.ed-survey__orb--2 {
    width: clamp(120px, 30vw, 300px);
    height: clamp(120px, 30vw, 300px);
    bottom: 15%;
    left: -5%;
    background: var(--ed-gold);
    animation: edOrbFloat2 10s ease-in-out infinite;
}

.ed-survey__orb--3 {
    width: clamp(100px, 25vw, 250px);
    height: clamp(100px, 25vw, 250px);
    top: 55%;
    left: 45%;
    background: var(--ed-purple-light);
    animation: edOrbFloat3 12s ease-in-out infinite;
}

@keyframes edOrbFloat1 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(40px, -50px) scale(1.1); }
    66% { transform: translate(-20px, 30px) scale(0.9); }
}

@keyframes edOrbFloat2 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(-30px, 40px) scale(1.15); }
    66% { transform: translate(25px, -35px) scale(0.95); }
}

@keyframes edOrbFloat3 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(35px, -25px) scale(1.08); }
}

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


/* ─── Category Logo — centered at top of question screen ─────────── */

.ed-survey__cat-logo {
    display: block;
    height: 60px;
    width: auto;
    max-width: 70%;
    margin: 0 auto 16px;
    object-fit: contain;
    opacity: 0.85;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.3));
}

/* ─── Question card — full-height column layout ──────────────────── */

.ed-survey__card--question {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 24px 32px 12px;
    overflow: hidden;
    max-width: 600px;
    width: 100%;
    margin: 0 auto;
}

/* Tablet+: glass card wider than tall, generous spacing */
@media (min-width: 768px) {
    .ed-survey__card--question {
        max-width: 90vw;
        max-height: 80vh;
        padding: 40px 64px 28px;
        justify-content: space-between;
    }
    .ed-survey__card--question .ed-survey__question {
        font-size: 1.25rem;
        margin-bottom: 0;
    }
    .ed-survey__card--question .ed-survey__divider {
        margin: 8px auto 20px;
    }
    .ed-survey__card--question .ed-survey__value {
        font-size: 3.5rem;
        margin: 12px 0 16px;
    }
    .ed-survey__card--question .ed-survey__slider-container {
        margin: 0 0 24px;
    }
    .ed-survey__card--question .ed-survey__nav {
        margin-top: 20px;
        margin-bottom: 20px;
    }
    .ed-survey__cat-logo {
        height: 80px;
        margin-bottom: 12px;
    }
    .ed-survey__footer {
        position: absolute;
        bottom: 24px;
        left: 0;
        right: 0;
        width: 100%;
        padding: 0 40px;
        box-sizing: border-box;
    }
    .ed-survey__footer-logo {
        height: 56px;
    }
    .ed-survey__footer-credit {
        font-size: 0.6rem;
        color: rgba(255, 255, 255, 0.35);
    }
    .ed-survey__footer-credit a {
        color: rgba(255, 255, 255, 0.45);
    }
}

/* Large desktop: even wider */
@media (min-width: 1200px) {
    .ed-survey__card--question {
        max-width: 1100px;
        padding: 48px 100px 32px;
    }
    .ed-survey__card--question .ed-survey__value {
        font-size: 4.5rem;
        margin: 16px 0 20px;
    }
    .ed-survey__card--question .ed-survey__slider-container {
        margin: 0 0 32px;
    }
    .ed-survey__card--question .ed-survey__nav {
        margin-top: 24px;
        margin-bottom: 24px;
    }
    .ed-survey__cat-logo {
        height: 100px;
        margin-bottom: 16px;
    }
}

.ed-survey__card--question .ed-survey__slider-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin: 0;
    min-height: 0;
}

.ed-survey__card--question .ed-survey__value {
    margin: 4px 0;
    font-size: 2.5rem;
}

/* ─── Divider ────────────────────────────────────────────────────── */

.ed-survey__divider {
    width: 80%;
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    margin: 8px auto;
}

.ed-survey__card--question .ed-survey__question {
    margin: 0 0 8px;
    font-size: 1rem;
}

.ed-survey__card--question .ed-survey__nav {
    position: static;
    width: 100%;
    margin-bottom: 8px;
}

/* ─── Footer: ED logo + credit line ──────────────────────────────── */

.ed-survey__footer {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    width: 100%;
    margin-top: auto;
    padding-top: 4px;
    padding-bottom: env(safe-area-inset-bottom);
    z-index: 100000;
}

.ed-survey__footer-logo {
    height: 44px;
    width: auto;
    opacity: 0.75;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.4));
    flex-shrink: 0;
}

.ed-survey__footer-credit {
    font-size: 0.5rem;
    color: rgba(255, 255, 255, 0.2);
    text-align: right;
    line-height: 1.5;
    flex-shrink: 0;
}

.ed-survey__footer-credit a {
    color: rgba(255, 255, 255, 0.3);
    text-decoration: none;
}

.ed-survey__footer-credit a:hover {
    color: rgba(255, 255, 255, 0.5);
    text-decoration: underline;
}

/* ─── Category Artwork — illustration on question screens ────────── */

.ed-survey__category-artwork {
    position: fixed;
    bottom: 0;
    right: 0;
    height: 80%;
    width: auto;
    object-fit: contain;
    opacity: 0.25;
    z-index: 0;
    pointer-events: none;
}

/* Ensure screens sit above the background layers */
.ed-survey__screen {
    z-index: 1;
}

/* ─── Screen Management ──────────────────────────────────────────── */

.ed-survey__screen {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
    animation: edFadeIn 0.3s ease;
    z-index: 99999;
}

.ed-survey__screen--active {
    display: flex;
}

/* Results screen needs to scroll — content is taller than viewport */
.ed-survey__screen--results {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    justify-content: flex-start;
    align-items: center;
    padding-top: 16px;
    padding-bottom: 60px;
}

@keyframes edFadeIn {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ─── Card — Frosted Glass Over Dark Background ─────────────────── */

.ed-survey__card {
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    padding: 24px 24px;
    width: 100%;
    max-width: 520px;
    text-align: center;
    color: #fff;
    transition: background 0.6s ease, box-shadow 0.6s ease, border-color 0.6s ease;
}

/* Opposing subtle tint on the card — the card glows opposite to the page */
.ed-survey__screen--question .ed-survey__card[data-intensity="low"] {
    background: rgba(39, 174, 96, 0.08);
    border-color: rgba(39, 174, 96, 0.15);
    box-shadow: 0 8px 32px rgba(39, 174, 96, 0.12);
}

.ed-survey__screen--question .ed-survey__card[data-intensity="mid"] {
    background: rgba(107, 47, 160, 0.1);
    border-color: rgba(107, 47, 160, 0.18);
    box-shadow: 0 8px 32px rgba(107, 47, 160, 0.15);
}

.ed-survey__screen--question .ed-survey__card[data-intensity="high"] {
    background: rgba(231, 76, 60, 0.06);
    border-color: rgba(242, 169, 0, 0.15);
    box-shadow: 0 8px 32px rgba(242, 169, 0, 0.12);
}

.ed-survey__card--centered {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

/* ─── Intro ──────────────────────────────────────────────────────── */

/* ─── Intro Screen — stage bg + column layout ────────────────────── */

.ed-survey__screen--intro {
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    gap: 0;
    padding: 12vh 20px 0;
}

.ed-survey__screen--intro::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: url('../images/ed-stage-bg.jpg') center / cover no-repeat;
    opacity: 0.4;
    z-index: -1;
}

.ed-survey__intro-logo {
    display: block;
    width: 320px;
    max-width: 75%;
    height: auto;
    filter: drop-shadow(0 4px 24px rgba(155, 89, 182, 0.4));
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}
.ed-survey__intro-footer {
    position: absolute;
    bottom: 12px;
    left: 20px;
    right: 20px;
    justify-content: center;
}
.ed-survey__intro-logo {
    margin-bottom: 100px;
}

.ed-survey__session-name {
    font-size: 1.4rem;
    font-weight: 700;
    color: #fff;
    text-align: center;
    margin: 0 0 24px;
    text-shadow: 0 0 20px rgba(155, 89, 182, 0.3);
}

@media (min-width: 768px) {
    .ed-survey__session-name {
        font-size: 1.8rem;
        margin-bottom: 32px;
    }
}
.ed-survey__intro-footer .ed-survey__footer-logo {
    display: none;
}
.ed-survey__intro-footer .ed-survey__footer-credit {
    text-align: center;
    margin-left: 0;
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.4);
}
.ed-survey__intro-footer .ed-survey__footer-credit a {
    color: rgba(255, 255, 255, 0.55);
}

@media (min-width: 768px) {
    .ed-survey__intro-footer .ed-survey__footer-credit {
        font-size: 0.8rem;
        color: rgba(255, 255, 255, 0.5);
    }
    .ed-survey__intro-footer .ed-survey__footer-credit a {
        color: rgba(255, 255, 255, 0.65);
    }
}

.ed-survey__intro-logo.ed-logo-shrink {
    position: fixed;
    bottom: 20px;
    left: 20px;
    width: 140px;
    opacity: 0.7;
    z-index: 100000;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.4));
}

/* Hide persistent logo until survey starts (JS removes this class) */

.ed-survey__title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--ed-gold);
    margin: 0 0 8px;
}

.ed-survey__subtitle {
    font-size: 1.05rem;
    color: rgba(255, 255, 255, 0.75);
    margin: 0 0 16px;
}

.ed-survey__hint {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.45);
    margin: 0 0 24px;
}

.ed-survey__group-name {
    display: inline-block;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 6px;
    padding: 4px 12px;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.65);
    margin-bottom: 16px;
}

/* ─── Progress Bar ───────────────────────────────────────────────── */

.ed-survey__progress {
    position: relative;
    height: 6px;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 3px;
    margin-bottom: 32px;
    overflow: hidden;
}

.ed-survey__progress-bar {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: linear-gradient(90deg, var(--ed-purple), var(--ed-purple-light));
    border-radius: 3px;
    transition: width 0.4s ease;
}

.ed-survey__progress-text {
    position: absolute;
    top: 12px;
    right: 0;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.45);
}

/* ─── Question ───────────────────────────────────────────────────── */

.ed-survey__question {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0 0 32px;
    color: #fff;
}

.ed-survey__question strong {
    color: var(--ed-gold);
}

/* ─── Slider ─────────────────────────────────────────────────────── */

.ed-survey__slider-container {
    margin-bottom: 32px;
}

.ed-survey__slider-labels {
    display: flex;
    justify-content: space-between;
    width: 100%;
    margin-bottom: 8px;
    font-size: 0.9rem;
    font-weight: 800;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ed-survey__slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 12px;
    border-radius: 6px;
    background: linear-gradient(90deg, var(--ed-red) 0%, var(--ed-gold) 50%, var(--ed-green) 100%);
    outline: none;
    cursor: pointer;
    margin: 0;
}

.ed-survey__slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #fff;
    border: 3px solid var(--ed-purple);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    transform: scale(var(--thumb-scale, 1));
}

.ed-survey__slider::-webkit-slider-thumb:hover {
    box-shadow: 0 4px 16px rgba(107, 47, 160, 0.25);
}

.ed-survey__slider::-moz-range-thumb {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #fff;
    border: 3px solid var(--ed-purple);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    transform: scale(var(--thumb-scale, 1));
}

.ed-survey__value {
    font-size: 2rem;
    font-weight: 700;
    color: #fff;
    margin-top: 16px;
    transition: color 0.3s ease;
    text-shadow: 0 0 20px currentColor;
}

/* ─── Navigation ─────────────────────────────────────────────────── */

.ed-survey__nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    width: 100%;
}

/* ─── Buttons ────────────────────────────────────────────────────── */

.ed-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 28px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: background 0.2s, transform 0.1s;
    text-decoration: none;
    line-height: 1;
}

.ed-btn:active {
    transform: scale(0.97);
}

.ed-btn--primary {
    background: var(--ed-purple);
    color: #fff;
    flex: 1;
}

.ed-btn--primary:hover {
    background: var(--ed-purple-dark);
}

.ed-btn--secondary {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.ed-btn--secondary:hover {
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
}

/* ─── Spinner ────────────────────────────────────────────────────── */

.ed-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid rgba(255, 255, 255, 0.15);
    border-top-color: var(--ed-gold);
    border-radius: 50%;
    animation: edSpin 0.8s linear infinite;
}

@keyframes edSpin {
    to { transform: rotate(360deg); }
}

/* ─── Notices ────────────────────────────────────────────────────── */

.ed-notice {
    padding: 16px 20px;
    border-radius: var(--ed-radius);
    background: var(--ed-gray-100);
    color: var(--ed-gray-700);
    text-align: center;
}

.ed-notice--error {
    background: #FEF2F2;
    color: var(--ed-red);
}

/* ─── Teaser Results ─────────────────────────────────────────────── */

.ed-teaser {
    max-width: 640px;
    margin: 0 auto;
    padding: 40px 20px;
}

.ed-teaser__heading {
    font-size: 1.5rem;
    font-weight: 700;
    text-align: center;
    color: var(--ed-purple);
    margin: 0 0 24px;
}

.ed-teaser__subheading {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--ed-gray-900);
    margin: 32px 0 16px;
}

/* Score circle */
.ed-teaser__score-section {
    text-align: center;
    margin-bottom: 32px;
}

.ed-teaser__score-circle {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 160px;
    height: 160px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--ed-purple), var(--ed-purple-light));
    color: #fff;
    box-shadow: 0 8px 32px rgba(107, 47, 160, 0.3);
}

/* ─── Teaser Meter Ring (radial score display) ───────────────────── */

.ed-teaser__radial {
    width: 140px;
    height: 140px;
    margin: 8px auto;
}
.ed-teaser__radial-svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 0 8px rgba(155, 89, 182, 0.2));
}

/* ─── Results screen — fit in viewport ───────────────────────────── */

.ed-survey__screen--results {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    justify-content: flex-start;
    align-items: center;
    padding: 16px 12px;
}

.ed-survey__screen--results .ed-survey__card {
    max-width: 100%;
    width: 100%;
    padding: 16px;
}

.ed-teaser__score-section {
    margin-bottom: 8px;
}
.ed-teaser__heading {
    font-size: 1.1rem;
    margin-bottom: 4px;
}
.ed-teaser__ranking {
    margin-bottom: 12px;
}
.ed-teaser__subheading {
    font-size: 0.9rem;
    margin-bottom: 8px;
}
.ed-teaser__bars {
    gap: 4px;
}
.ed-teaser__bar-track {
    height: 24px;
}
.ed-teaser__cta {
    padding-top: 12px;
}

@media (min-width: 768px) {
    .ed-teaser__radial {
        width: 200px;
        height: 200px;
    }
    .ed-survey__screen--results {
        align-items: center;
        padding: 20px;
    }
    .ed-survey__screen--results {
        align-items: center;
    }
    .ed-survey__screen--results .ed-survey__card {
        max-width: 960px;
        margin: 0 auto;
        padding: 24px 48px;
    }
    .ed-teaser__heading {
        font-size: 1.3rem;
    }
    .ed-teaser__bar-track {
        height: 28px;
    }
    .ed-teaser__bar-label {
        flex: 0 0 160px;
    }

    /* Two columns: results left, CTA right */
    .ed-survey .ed-teaser,
    #ed-teaser-content {
        display: grid;
        grid-template-columns: 1fr 1fr;
        grid-template-rows: auto 1fr;
        gap: 16px 40px;
        align-items: start;
    }
    .ed-teaser__score-section {
        grid-column: 1;
        grid-row: 1;
        text-align: center;
    }
    .ed-teaser__ranking {
        grid-column: 1;
        grid-row: 2;
    }
    .ed-teaser__cta {
        grid-column: 2;
        grid-row: 1 / 3;
        border-top: none;
        border-left: 1px solid rgba(255, 255, 255, 0.1);
        padding-top: 0;
        padding-left: 40px;
    }
}

.ed-teaser__score-value {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1;
}

.ed-teaser__score-label {
    font-size: 0.75rem;
    opacity: 0.8;
    margin-top: 4px;
}

/* Bar chart */
.ed-teaser__bars {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ed-teaser__bar-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ed-teaser__bar-label {
    flex: 0 0 140px;
    font-size: 0.85rem;
    font-weight: 500;
    text-align: right;
    color: var(--ed-gray-700);
    white-space: nowrap;
}

.ed-teaser__bar-track {
    flex: 1;
    height: 28px;
    background: var(--ed-gray-200);
    border-radius: 6px;
    overflow: hidden;
}

.ed-teaser__bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--ed-purple-light), var(--ed-purple));
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 8px;
    min-width: 40px;
    transition: width 0.6s ease;
}

.ed-teaser__bar-value {
    font-size: 0.75rem;
    font-weight: 700;
    color: #fff;
}

/* CTA section */
.ed-teaser__cta {
    margin-top: 40px;
    padding-top: 32px;
    border-top: 1px solid var(--ed-gray-200);
}

.ed-teaser__access-form {
    margin-top: 20px;
}

.ed-teaser__option {
    margin-bottom: 16px;
}

.ed-teaser__option h4 {
    font-size: 0.95rem;
    margin: 0 0 8px;
    color: var(--ed-gray-700);
}

.ed-teaser__field-group {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.ed-input {
    padding: 10px 14px;
    border: 1px solid var(--ed-gray-200);
    border-radius: 8px;
    font-size: 0.95rem;
    flex: 1;
    min-width: 200px;
    outline: none;
    transition: border-color 0.2s;
}

.ed-input:focus {
    border-color: var(--ed-purple);
}

.ed-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--ed-gray-700);
    margin: 8px 0;
    cursor: pointer;
}

.ed-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--ed-purple);
}

.ed-teaser__divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 20px 0;
    color: var(--ed-gray-400);
    font-size: 0.85rem;
}

.ed-teaser__divider::before,
.ed-teaser__divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--ed-gray-200);
}

.ed-teaser__message {
    margin-top: 16px;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 0.9rem;
    text-align: center;
}

.ed-teaser__message--success {
    background: #F0FFF4;
    color: var(--ed-green);
}

.ed-teaser__message--error {
    background: #FEF2F2;
    color: var(--ed-red);
}

/* ─── Teaser Inside Dark Survey (inline results after submit) ────── */

.ed-survey .ed-teaser {
    max-width: 520px;
    padding: 0;
    color: #fff;
}

.ed-survey .ed-teaser__heading {
    color: var(--ed-gold);
}

.ed-survey .ed-teaser__subheading {
    color: rgba(255, 255, 255, 0.9);
}


.ed-survey .ed-teaser__bar-label {
    color: rgba(255, 255, 255, 0.75);
}

.ed-survey .ed-teaser__bar-track {
    background: rgba(255, 255, 255, 0.1);
}

.ed-survey .ed-teaser__cta {
    border-top-color: rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.85);
}

.ed-survey .ed-teaser__cta p {
    color: rgba(255, 255, 255, 0.7);
}

.ed-survey .ed-teaser__option h4 {
    color: rgba(255, 255, 255, 0.65);
}

/* ─── Bookend Logo — top center on identity + results ────────────── */

.ed-survey__bookend-logo {
    display: block;
    width: 240px;
    max-width: 60%;
    height: auto;
    margin: 0 auto 36px;
    filter: drop-shadow(0 2px 16px rgba(155, 89, 182, 0.4));
    flex-shrink: 0;
}

@media (min-width: 768px) {
    .ed-survey__bookend-logo {
        width: 280px;
        margin-bottom: 40px;
    }
}

/* ─── Bookend Screens — stage bg on identity, loading, results ────── */

.ed-survey__screen--bookend::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: url('../images/ed-stage-bg.jpg') center / cover no-repeat;
    opacity: 0.35;
    z-index: -1;
}

/* ─── Identity Card — sleek form ─────────────────────────────────── */

.ed-survey__card--identity {
    padding: 32px 28px 24px;
    max-width: 440px;
}

.ed-survey__identity-logo {
    display: block;
    width: 200px;
    max-width: 60%;
    height: auto;
    margin: 0 auto 20px;
    filter: drop-shadow(0 2px 12px rgba(155, 89, 182, 0.3));
}

.ed-survey__identity-heading {
    font-size: 1.5rem;
    font-weight: 800;
    color: #fff;
    margin: 0 0 8px;
    text-align: center;
}

.ed-survey__identity-sub {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.55);
    text-align: center;
    margin: 0 0 24px;
    line-height: 1.5;
}

.ed-survey__identity-fields {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
    width: 100%;
}

.ed-input--lg {
    padding: 14px 16px;
    font-size: 1rem;
    border-radius: 10px;
    width: 100%;
}

.ed-btn--full {
    width: 100%;
}

.ed-btn--ghost {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.85rem;
    padding: 8px;
    cursor: pointer;
}
.ed-btn--ghost:hover {
    color: rgba(255, 255, 255, 0.8);
}

.ed-survey__identity-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 16px 0;
    width: 100%;
}
.ed-survey__identity-divider::before,
.ed-survey__identity-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.12);
}
.ed-survey__identity-divider span {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.35);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.ed-survey__nav--minimal {
    margin-top: 12px;
    justify-content: center;
}

@media (min-width: 768px) {
    .ed-survey__card--identity {
        max-width: 520px;
        padding: 48px 48px 32px;
    }
    .ed-survey__identity-logo {
        width: 240px;
    }
    .ed-survey__identity-heading {
        font-size: 1.75rem;
    }
}

.ed-survey .ed-input {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.ed-survey .ed-input::placeholder {
    color: rgba(255, 255, 255, 0.35);
}

.ed-survey .ed-input:focus {
    border-color: var(--ed-purple-light);
}

.ed-survey .ed-checkbox {
    color: rgba(255, 255, 255, 0.65);
}

.ed-survey .ed-teaser__divider {
    color: rgba(255, 255, 255, 0.35);
}

.ed-survey .ed-teaser__divider::before,
.ed-survey .ed-teaser__divider::after {
    background: rgba(255, 255, 255, 0.15);
}

/* ─── Responsive ─────────────────────────────────────────────────── */

@media (max-width: 480px) {

    .ed-survey__category-artwork {
        height: 40%;
        right: -10%;
        opacity: 0.15;
    }

    /* Question card — full height, immersive on mobile */
    .ed-survey__card--question {
        padding: 12px 20px;
        max-width: 100%;
        width: 100%;
        height: 100%;
        margin: 0 auto;
        text-align: center;
        align-items: center;
        justify-content: space-between;
        border: none;
        background: none;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        box-shadow: none;
        border-radius: 0;
    }

    /* Same order as desktop: logo, question, hr, number, slider, nav */
    .ed-survey__cat-logo {
        height: 90px;
        margin: 0 auto 30px;
    }
    .ed-survey__card--question .ed-survey__question {
        font-size: 1.6rem;
        margin: 0 0 12px;
    }
    .ed-survey__card--question .ed-survey__divider {
        margin: 0 auto 12px;
    }
    .ed-survey__card--question .ed-survey__value {
        font-size: 2.5rem;
        margin: 0 0 4px;
    }
    .ed-survey__card--question .ed-survey__slider-container {
        flex: 1;
        margin: 0;
    }
    .ed-survey__card--question .ed-survey__nav {
        margin: 8px 0 16px;
    }

    .ed-survey__question {
        font-size: 0.95rem;
        text-align: center;
        width: 100%;
    }

    .ed-survey__card--question .ed-survey__value {
        font-size: 2.2rem;
        margin: 4px 0;
    }

    .ed-survey__card--question .ed-survey__divider {
        margin: 4px auto 8px;
        width: 60%;
    }

    .ed-survey__card--question .ed-survey__nav {
        width: 100%;
    }

    .ed-survey__card--question .ed-survey__slider-container {
        width: 100%;
        align-items: center;
    }

    /* Footer on mobile — compact, bottom of screen */
    .ed-survey__footer {
        position: static;
        width: 100%;
        padding: 4px 16px 0;
        box-sizing: border-box;
        flex-shrink: 0;
    }
    .ed-survey__footer-logo {
        height: 28px;
    }
    .ed-survey__footer-credit {
        font-size: 0.45rem;
        color: rgba(255, 255, 255, 0.3);
    }

    /* Identity card mobile */
    .ed-survey__card--identity {
        max-width: 100%;
        padding: 24px 20px 16px;
        margin: 0 auto;
    }
    .ed-survey__identity-logo {
        width: 160px;
        margin: 0 auto 16px;
    }
    .ed-survey__identity-heading {
        font-size: 1.25rem;
        text-align: center;
    }
    .ed-survey__identity-sub {
        text-align: center;
    }

    /* ── Vertical Slider on Mobile ────────────────────────────────── */
    .ed-survey__slider-container {
        display: flex;
        flex-direction: column;
        align-items: center;
        margin-bottom: 24px;
    }

    .ed-survey__slider-labels {
        display: none; /* Hide static labels — we show them around the V-track instead */
    }

    /* Labels positioned above and below the V-track */
    .ed-survey__slider-wrapper::before {
        content: 'EMPOWERED';
        position: absolute;
        top: -28px;
        left: 50%;
        transform: translateX(-50%);
        font-size: 1rem;
        font-weight: 800;
        color: #fff;
        text-transform: uppercase;
        letter-spacing: 3px;
        white-space: nowrap;
        z-index: 4;
        text-shadow: 0 0 12px rgba(39, 174, 96, 0.5);
    }

    .ed-survey__slider-wrapper::after {
        content: 'DISEMPOWERED';
        position: absolute;
        bottom: -32px;
        left: 50%;
        transform: translateX(-50%);
        font-size: 1rem;
        font-weight: 800;
        color: #fff;
        text-transform: uppercase;
        letter-spacing: 3px;
        white-space: nowrap;
        z-index: 4;
        text-shadow: 0 0 12px rgba(231, 76, 60, 0.5);
    }

    /* Hide native slider — custom touch handler drives the value */
    .ed-survey__slider-wrapper {
        position: relative;
        height: clamp(120px, 32dvh, 280px);
        width: 130px;
        margin: 32px auto 32px;
        touch-action: none;
    }

    .ed-survey__slider-track-v {
        position: absolute;
        inset: 0;
        background: linear-gradient(to bottom, var(--ed-green) 0%, var(--ed-gold) 50%, var(--ed-red) 100%);
        clip-path: polygon(50% 100%, 0% 0%, 100% 0%);
        border-radius: 8px 8px 4px 4px;
        opacity: 0.85;
    }

    /* The bar thumb indicator — positioned by JS */
    .ed-survey__slider-bar {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        width: 100px;
        height: 30px;
        background: #fff;
        border: 2px solid var(--ed-purple);
        border-radius: 8px;
        box-shadow: 0 0 20px rgba(107, 47, 160, 0.5), 0 0 8px rgba(255, 255, 255, 0.4);
        z-index: 3;
        pointer-events: none;
        transition: width 0.15s ease;
    }

    .ed-survey__slider {
        position: absolute;
        writing-mode: vertical-lr;
        direction: rtl;
        height: 100%;
        width: 100%;
        margin: 0;
        background: transparent;
        z-index: 2;
        cursor: pointer;
        opacity: 0; /* Hide native input, keep for accessibility */
    }

    .ed-survey__slider::-webkit-slider-thumb {
        width: 64px;
        height: 10px;
        border-radius: 5px;
        border-width: 2px;
        box-shadow: 0 0 24px rgba(107, 47, 160, 0.5), 0 0 8px rgba(255, 255, 255, 0.4);
    }

    .ed-survey__slider::-moz-range-thumb {
        width: 64px;
        height: 10px;
        border-radius: 5px;
        border-width: 2px;
        box-shadow: 0 0 24px rgba(107, 47, 160, 0.5), 0 0 8px rgba(255, 255, 255, 0.4);
    }

    .ed-survey__value {
        font-size: 3rem;
    }

    .ed-teaser__bar-label {
        flex: 0 0 100px;
        font-size: 0.75rem;
    }

    .ed-teaser__field-group {
        flex-direction: column;
    }
}

/* ─── Very Narrow Screens (iPhone SE 1st gen, 320px) ────────────── */

@media (max-width: 360px) {
    .ed-survey__slider-wrapper::before,
    .ed-survey__slider-wrapper::after {
        letter-spacing: 1px;
        font-size: 0.75rem;
    }

    .ed-survey__card--question {
        padding: 8px 12px;
    }

    .ed-survey__cat-logo {
        height: 60px;
        margin-bottom: 16px;
    }

    .ed-survey__card--question .ed-survey__question {
        font-size: 1.3rem;
    }

    .ed-survey__card--question .ed-survey__value {
        font-size: 1.8rem;
    }
}

/* ─── Short Viewports (landscape phones + small phones) ─────────── */

@media (max-height: 500px) {
    .ed-survey__cat-logo {
        height: 50px;
        margin-bottom: 8px;
    }

    .ed-survey__card--question .ed-survey__question {
        font-size: 0.9rem;
        margin-bottom: 4px;
    }

    .ed-survey__card--question .ed-survey__value {
        font-size: 1.6rem;
        margin: 2px 0;
    }

    .ed-survey__card--question .ed-survey__divider {
        margin: 2px auto 4px;
    }

    .ed-survey__card--question .ed-survey__nav {
        margin: 4px 0 8px;
    }

    .ed-survey__slider-wrapper {
        height: clamp(80px, 25dvh, 160px);
        margin: 16px auto 16px;
    }

    .ed-survey__slider-wrapper::before {
        top: -20px;
        font-size: 0.7rem;
    }

    .ed-survey__slider-wrapper::after {
        bottom: -24px;
        font-size: 0.7rem;
    }

    .ed-survey__footer-logo {
        height: 22px;
    }

    .ed-survey__screen--intro {
        padding-top: 4vh;
    }

    .ed-survey__intro-logo {
        margin-bottom: 40px;
    }

    .ed-btn {
        padding: 8px 20px;
        font-size: 0.9rem;
    }

    /* Identity card compact */
    .ed-survey__card--identity {
        padding: 16px 16px 12px;
    }

    .ed-survey__identity-logo {
        width: 120px;
        margin-bottom: 8px;
    }

    .ed-survey__identity-heading {
        font-size: 1.1rem;
        margin-bottom: 4px;
    }

    .ed-survey__identity-sub {
        font-size: 0.75rem;
        margin-bottom: 12px;
    }

    .ed-survey__identity-fields {
        gap: 8px;
        margin-bottom: 12px;
    }

    .ed-input--lg {
        padding: 10px 12px;
        font-size: 0.9rem;
    }
}

/* ─── Landscape Phones — fall back to horizontal slider ─────────── */

@media (orientation: landscape) and (max-height: 500px) {
    .ed-survey__slider-wrapper {
        height: auto;
        width: 100%;
        margin: 8px auto;
    }

    .ed-survey__slider-track-v {
        display: none;
    }

    .ed-survey__slider-bar {
        display: none;
    }

    .ed-survey__slider-wrapper::before,
    .ed-survey__slider-wrapper::after {
        display: none;
    }

    .ed-survey__slider-labels {
        display: flex;
        font-size: 0.7rem;
        letter-spacing: 1px;
        margin-bottom: 4px;
    }

    .ed-survey__slider {
        position: static;
        writing-mode: horizontal-tb;
        direction: ltr;
        height: 12px;
        width: 100%;
        opacity: 1;
        background: linear-gradient(90deg, var(--ed-red) 0%, var(--ed-gold) 50%, var(--ed-green) 100%);
    }

    .ed-survey__slider::-webkit-slider-thumb {
        width: 28px;
        height: 28px;
        border-radius: 50%;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    }

    .ed-survey__slider::-moz-range-thumb {
        width: 28px;
        height: 28px;
        border-radius: 50%;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    }

    .ed-survey__card--question {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        align-items: center;
        gap: 8px;
        padding: 8px 16px;
    }

    .ed-survey__cat-logo {
        height: 40px;
        margin: 0 8px 0 0;
    }

    .ed-survey__card--question .ed-survey__question {
        flex: 1;
        text-align: left;
        margin: 0;
        font-size: 0.85rem;
    }

    .ed-survey__card--question .ed-survey__divider {
        display: none;
    }

    .ed-survey__card--question .ed-survey__slider-container {
        width: 100%;
        flex: none;
    }

    .ed-survey__card--question .ed-survey__value {
        font-size: 1.4rem;
        margin: 0;
    }

    .ed-survey__card--question .ed-survey__nav {
        margin: 4px 0;
    }

    .ed-survey__footer {
        padding: 2px 8px 0;
    }

    .ed-survey__footer-logo {
        height: 18px;
    }

    .ed-survey__footer-credit {
        font-size: 0.4rem;
    }
}

/* ─── Resend My Report Link ([ed_resend]) ───────────────────────── */

.ed-resend {
    max-width: 560px;
    margin: 0 auto;
    padding: 24px;
}

.ed-resend__heading {
    font-size: 1.4rem;
    margin: 0 0 8px;
    color: var(--ed-purple);
}

.ed-resend__intro {
    margin: 0 0 20px;
    color: var(--ed-gray-700);
    font-size: 0.95rem;
    line-height: 1.5;
}

.ed-resend__label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--ed-gray-700);
    margin-bottom: 6px;
}

.ed-resend__note {
    margin: 20px 0 0;
    font-size: 0.85rem;
    color: var(--ed-gray-400);
    line-height: 1.5;
}

/* ─── Answer gate ────────────────────────────────────────────────── */
/* Forward is disabled until the slider moves. The hint below it carries
   the reason in text — the dimmed button must not be the only signal. */

.ed-survey__answer-hint {
    margin: 0 0 8px;
    text-align: center;
    font-size: 0.85rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.75);
}

.ed-btn[disabled],
.ed-btn[aria-disabled="true"] {
    opacity: 0.45;
    cursor: not-allowed;
    filter: grayscale(60%);
}
