* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* When embedded in an iframe, prevent internal scrolling and let parent page scroll */
html, body {
    overflow: visible;
    height: auto;
}

@font-face {
    font-family: "Proxima Nova";
    src: url("font/Proxima Nova Reg.otf") format("opentype");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Proxima Nova";
    src: url("font/Proxima Nova Sbold.otf") format("opentype");
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Proxima Nova";
    src: url("font/Proxima Nova Bold.otf") format("opentype");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

:root {
    --brand-50: #E3F0F6;
    --brand-100: #BFDBE9;
    --brand-200: #BDDED8;
    --brand-300: #5DB3D5;
    --brand-400: #0090A8;
    --brand-500: #0181BE;
    --brand-600: #0071A8;
    --brand-700: #00557F;
    --brand-800: #004466;
    --brand-900: #00334D;

    --slate-50: #F3F3F2;
    --slate-100: #EDEDEF;
    --slate-200: #DCDCE0;
    --slate-300: #D0D0D0;
    --slate-400: #D9DAD4;
    --slate-500: #9597A1;
    --slate-600: #727582;
    --slate-700: #4F5263;
    --slate-800: #3E414E;
    --slate-900: #1F2128;
    --slate-950: #000000;

    --gray-50: #F3F3F2;
    --gray-100: #EDEDEF;
    --gray-200: #DCDCE0;
    --gray-300: #D0D0D0;
    --gray-400: #D9DAD4;
    --gray-500: #9597A1;
    --gray-600: #727582;
    --gray-700: #4F5263;
    --gray-800: #3E414E;
    --gray-900: #1F2128;
    --gray-950: #000000;

    --ppl-orange: #D5761C;
    --ppl-forest-green: #55755B;
    --ppl-olive-green: #88927B;
    --ppl-electric-orange: #F0851C;
    --ppl-dark-red: #E52207;
    --ppl-dark-green: #008817;
    --ppl-light-red: #F6CFC8;
    --ppl-light-orange: #EDD6C7;
    --ppl-pale-green: #D9EDDC;
    --ppl-pale-teal: #BDDED8;

    --primary: var(--brand-500);
    --primary-strong: var(--brand-600);
    --primary-dark: var(--brand-700);
    --surface: #ffffff;
    --surface-muted: var(--slate-50);
    --border: var(--slate-200);
    --text: var(--slate-900);
    --text-muted: var(--slate-600);

    /* Controls the uniform height of the option headers */
    --option-text-height: 80px;
}

body {
    font-family: "Raleway", "Inter", system-ui, sans-serif;
    background-color: var(--surface-muted);
    color: var(--text);
    padding: 20px;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.numeric {
    font-family: "Proxima Nova", "Raleway", system-ui, sans-serif;
}

.container {
    max-width: 960px;
    width: 100%;
    margin: 0 auto;
}

.step {
    display: none;
}

.step.active {
    display: block;
}

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

/* Question Page Styles */
.question-container {
    background: var(--surface);
    border-radius: 14px;
    padding: 30px;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    /* Removed min-height to allow natural content height in iframe */
}

.question-title {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 30px;
    color: var(--primary-dark);
    text-align: center;
}

.options-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 30px;
    animation: fadeInUp 240ms ease;
}

.option {
    cursor: pointer;
    border: 2px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    background: white;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.06);
    display: flex;
    flex-direction: column;
}

.option:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(0, 81, 127, 0.16);
}

.option:hover img {
    transform: scale(1.05);
}

.option.selected {
    border-color: var(--primary);
    border-width: 3px;
    box-shadow: 0 6px 16px rgba(1, 129, 190, 0.3);
}

.option img {
    order: 1;
    width: 100%;
    height: 240px;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.option-text {
    order: 0;
    padding: 14px 12px;
    min-height: var(--option-text-height);
    height: var(--option-text-height);
    font-size: 1rem;
    font-weight: 700;
    color: white;
    line-height: 1.3;
    text-align: center;
    background: var(--primary-strong);
    display: flex;
    align-items: center;
    justify-content: center;
}

.question-footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    margin-top: 20px;
    position: sticky;
    bottom: 0;
    width: calc(100% + 60px);
    margin-left: -30px;
    margin-right: -30px;
    padding: 14px 30px 12px;
    background: var(--surface);
    border-top: 1px solid var(--border);
    z-index: 2;
}

.next-button {
    background-color: var(--primary);
    color: white;
    border: none;
    padding: 14px 40px;
    font-size: 1rem;
    font-weight: 700;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 140px;
    box-shadow: 0 6px 14px rgba(0, 81, 127, 0.22);
}

.next-button:hover:not(:disabled) {
    background-color: var(--primary-strong);
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0, 81, 127, 0.3);
}

.next-button:disabled {
    background-color: var(--slate-300);
    cursor: not-allowed;
    opacity: 0.7;
    box-shadow: none;
}

.progress-bar {
    width: 100%;
    height: 25px;
    background-color: #e1e3e5;
    border-radius: 999px;
    overflow: hidden;
    position: relative;
    margin: 0 auto;
}

.progress-fill {
    height: 100%;
    background-color: var(--primary);
    transition: width 0.3s ease;
    border-radius: 999px;
    min-width: 48px;
}

.progress-text {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.95rem;
    color: white;
    font-weight: 700;
    pointer-events: none;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
    font-family: "Proxima Nova", "Raleway", system-ui, sans-serif;
}

.progress-section {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: min(420px, 100%);
    align-items: center;
    position: relative;
    margin-left: auto;
    margin-right: auto;
}

.hidden {
    display: none !important;
}

/* Result Page Styles */
.result-container {
    position: relative;
    width: 100%;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.1);
}

.result-image {
    width: 100%;
    height: auto;
    display: block;
}

.result-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    gap: 14px;
    padding: 54px 52px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.42) 0%, rgba(255, 255, 255, 0.16) 55%, rgba(255, 255, 255, 0) 85%);
}

.result-overlay.right-align {
    align-items: flex-end;
    text-align: right;
}

.result-title {
    color: var(--primary-dark);
    font-size: 2.8rem;
    font-weight: 700;
    line-height: 1.15;
    margin: 0;
    white-space: pre-line;
    text-shadow: 0 3px 10px rgba(255, 255, 255, 0.55);
}

.result-description {
    color: var(--primary-dark);
    font-size: 1.3rem;
    margin: 0 0 22px;
    text-shadow: 0 3px 10px rgba(255, 255, 255, 0.55);
    line-height: 1.45;
    max-width: 520px;
    white-space: pre-line;
}

.restart-button {
    background-color: var(--primary);
    color: white;
    border: none;
    padding: 14px 40px;
    font-size: 1rem;
    font-weight: 700;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: auto;
    box-shadow: 0 6px 14px rgba(0, 81, 127, 0.22);
}

.restart-button:hover {
    background-color: var(--primary-strong);
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0, 81, 127, 0.3);
}

/* Responsive Design */
@media (max-width: 600px) {
    .options-grid {
        grid-template-columns: 1fr;
    }

    .result-title {
        font-size: 1.8rem;
        margin-top: 2rem;
    }

    .result-description {
        font-size: 1rem;
    }

    .question-title {
        font-size: 1.2rem;
    }

    .result-overlay {
        padding: 20px;
    }

    /* Give cards a comfortable minimum height without forcing full screen */
    .result-container {
        min-height: 520px;
        position: relative;
    }

    /* Make the picture and image cover the entire container */
    .result-container picture,
    .result-container .result-image {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
        z-index: 1;
    }

    .result-overlay {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 2;
        justify-content: flex-start !important; /* Reset to top-down */
        align-items: center !important;
        text-align: center !important;
        gap: 12px;
        padding: 30px 24px;
        background: linear-gradient(180deg, rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0.4) 40%, rgba(255, 255, 255, 0) 100%);
    }

    .result-title {
        font-size: 2rem;
        margin-top: 0; /* Reset margin */
        text-shadow: 0 2px 4px rgba(255, 255, 255, 0.8);
    }

    .result-description {
        font-size: 1.1rem;
        max-width: 280px;
        text-shadow: 0 2px 4px rgba(255, 255, 255, 0.8);
    }

    .restart-button {
        margin-top: auto; /* Push to bottom of overlay */
        margin-bottom: 20px;
    }

    /* Let text bars grow naturally on small screens to avoid clipping */
    .option-text {
        height: auto;
        min-height: 88px;
    }

    /* Fixed-height container with scrollable options and sticky footer */
    .question-container {
        padding: 0;
        max-height: 600px;
        height: 600px;
        display: flex;
        flex-direction: column;
        overflow: hidden;
    }

    .question-title {
        padding: 16px 20px 12px;
        margin-bottom: 0;
        flex-shrink: 0;
        background: var(--surface);
    }

    .options-grid {
        display: flex;
        flex-direction: column;
        flex: 1;
        min-height: 0; /* Allow flex item to shrink below content size for scrolling */
        overflow-y: auto;
        padding: 0 20px 20px;
        margin-bottom: 0;
        -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
        gap: 16px;
    }

    /* Ensure option cards keep their full size with images */
    .option {
        flex-shrink: 0;
        display: flex;
        flex-direction: column;
    }

    /* Keep images visible at reasonable size for mobile scrollable area */
    .option img {
        display: block !important;
        height: 180px;
        width: 100%;
        object-fit: cover;
    }

    .question-footer {
        position: static;
        flex-shrink: 0;
        width: 100%;
        margin: 0;
        padding: 12px 20px 10px;
        box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.08);
        border-top: 1px solid var(--border);
        background: var(--surface);
    }
}


.card-link{
    color: var(--ppl-electric-orange);
    text-decoration: none;
}