:root {
    --phi-es-navy: #001F32;
    --phi-es-navy-2: #183A4E;
    --phi-es-panel: #355568;
    --phi-es-panel-soft: #466575;
    --phi-es-green: #A4BB00;
    --phi-es-light: #F2F2F2;
    --phi-es-muted: #9FB0BA;
    --phi-es-white: #fff;
    --phi-es-danger: #ffd5d5;
}

html.phi-es-lock,
body.phi-es-lock { overflow: hidden !important; }

.phi-es-open { cursor: pointer; }

.phi-es-modal,
.phi-es-modal * { box-sizing: border-box; }

.phi-es-modal {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 28px;
    font-family: inherit;
}

.phi-es-modal.is-open { display: flex; }

.phi-es-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 31, 50, .62);
    backdrop-filter: blur(3px);
}

.phi-es-dialog {
    position: relative;
    width: min(1180px, 100%);
    max-height: calc(100vh - 56px);

    /* Important: the dialog itself no longer scrolls */
    overflow: hidden;

    border-radius: 18px;
    background: linear-gradient(145deg, #15394d 0%, #0d3044 100%);
    box-shadow: 0 30px 85px rgba(0, 0, 0, .32);

    /* Padding moves to scroll container */
    padding: 0;

    color: var(--phi-es-white);
}

.phi-es-dialog-scroll {
    max-height: calc(100vh - 56px);
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 40px 54px 46px;
    -webkit-overflow-scrolling: touch;
}

.phi-es-dialog-scroll::-webkit-scrollbar {
    width: 10px;
}

.phi-es-dialog-scroll::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,.2);
    border-radius: 10px;
}

.phi-es-dialog h2,
.phi-es-dialog h3,
.phi-es-dialog h4,
.phi-es-dialog p,
.phi-es-dialog span,
.phi-es-dialog strong,
.phi-es-dialog label,
.phi-es-dialog div { color: inherit; }

.phi-es-close {
    position: absolute;
    top: 24px;
    right: 28px;
    width: 34px;
    height: 34px;
    border: 1px solid rgba(255,255,255,.78);
    border-radius: 50%;
    background: linear-gradient(145deg, #15394d 0%, #0d3044 100%);
    color: #fff;
    display: grid;
    place-items: center;
    padding: 0;
    cursor: pointer;
    transition: .2s ease;
    z-index: 4;
}

.phi-es-close span { font-size: 27px; line-height: 1; font-weight: 300; transform: translateY(-1px); }
.phi-es-close:hover,
.phi-es-close:focus-visible { background: var(--phi-es-green); border-color: var(--phi-es-green); color: var(--phi-es-navy); outline: none; }

.phi-es-header { padding-right: 46px; margin-bottom: 26px; }
.phi-es-header h2 {
    margin: 0 0 2px !important;
    color: #fff !important;
    font-size: clamp(30px, 3vw, 43px) !important;
    line-height: 1.1 !important;
    text-transform: none !important;
    font-weight: 800 !important;
    width: auto !important;
}
.phi-es-header h2::before,
.phi-es-header h2::after { display: none !important; }
.phi-es-meta { margin: 0 0 9px; font-size: 21px; font-weight: 500; color: #fff !important; }
.phi-es-intro { margin: 0; max-width: 980px; font-size: 16px; line-height: 1.65; color: #fff !important; font-weight: 500; }

.phi-es-stage {
    background: rgba(92, 120, 137, .44);
    border-radius: 10px;
    padding: 28px 34px 30px;
    min-height: 520px;
}

.phi-es-screen { display: none; }
.phi-es-screen.is-active { display: block; animation: phiEsFade .25s ease; }
@keyframes phiEsFade { from { opacity: .2; transform: translateY(4px); } to { opacity: 1; transform: none; } }

.phi-es-assistant {
    display: grid;
    grid-template-columns: 92px 1fr;
    align-items: center;
    gap: 24px;
    margin: 0 0 28px;
}
.phi-es-avatar {
    width: 86px;
    height: 86px;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 8px 18px rgba(0,0,0,.25);
}
.phi-es-avatar svg { width: 100%; height: 100%; display: block; }
.phi-es-bubble {
    position: relative;
    background: linear-gradient(#fff, #f2f2f2);
    color: var(--phi-es-navy) !important;
    border-radius: 20px;
    padding: 20px 32px;
    min-height: 102px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    box-shadow: 0 3px 5px rgba(0,0,0,.12);
    border-bottom-left-radius: 0;
}
.phi-es-bubble::before {
    content: '';
    position: absolute;
    left: -18px;
    bottom: 0;
    width: 0;
    height: 0;
    border-bottom: 20px solid #f2f2f2;
    border-left: 20px solid transparent;
}
.phi-es-bubble::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    right: -7px;
    top: -7px;
    background: var(--phi-es-green);
    box-shadow: 0 0 0 7px #315164;
}
.phi-es-bubble-label { display: block; color: #75838c !important; font-size: 16px; font-weight: 800; margin-bottom: 3px; }
.phi-es-bubble strong { color: var(--phi-es-navy) !important; font-size: 21px; line-height: 1.4; font-weight: 800; }

.phi-es-test-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 36px;
    max-width: 930px;
    margin: 0 auto 28px;
}
.phi-es-test-card {
    position: relative;
    min-height: 300px;
    border: 1px solid rgba(255,255,255,.7);
    border-radius: 10px;
    background: rgba(26, 59, 77, .25);
    color: rgba(255,255,255,.6);
    padding: 34px 28px 26px;
    text-align: center;
    cursor: pointer;
    transition: .22s ease;
    font-family: inherit;
}
.phi-es-test-card:hover { transform: translateY(-2px); border-color: #fff; color: #fff; }
.phi-es-test-card.is-selected {
    border: 3px solid var(--phi-es-green);
    background: rgba(164, 187, 0, .09);
    color: #fff;
    box-shadow: inset 0 0 0 1px rgba(164,187,0,.18);
}
.phi-es-radio-dot {
    position: absolute;
    right: 24px;
    top: 24px;
    width: 23px;
    height: 23px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,.5);
}
.phi-es-test-card.is-selected .phi-es-radio-dot { border: 7px solid var(--phi-es-green); background: #fff; }
.phi-es-card-icon {
    width: 120px;
    height: 120px;
    display: block;
    margin: 0 auto 22px;
    padding: 18px;
    border-radius: 50%;
    background: var(--phi-es-card-icon-bg, #758B98);
    opacity: 1;
    transition: background-color .22s ease, transform .22s ease;
}
.phi-es-test-card.is-selected .phi-es-card-icon {
    background: var(--phi-es-card-icon-bg-selected, var(--phi-es-green));
}
.phi-es-card-icon svg { display: block; width: 100%; height: 100%; }
.phi-es-card-title { display: block; font-size: 22px; font-weight: 800; line-height: 1.25; margin-bottom: 6px; }
.phi-es-card-copy { display: block; max-width: 300px; margin: auto; font-size: 16px; line-height: 1.55; font-weight: 500; }

.phi-es-center { display: flex; justify-content: center; }
.phi-es-primary,
.phi-es-secondary {
    appearance: none;
    border-radius: 8px;
    padding: 14px 26px;
    min-width: 190px;
    border: 2px solid var(--phi-es-green);
    font: 800 16px/1.15 inherit;
    cursor: pointer;
    transition: .2s ease;
}
.phi-es-primary { background: var(--phi-es-green); color: #fff !important; }
.phi-es-primary:hover,
.phi-es-primary:focus-visible { background: #b9d100; border-color: #b9d100; color: var(--phi-es-navy) !important; outline: none; }
.phi-es-primary:disabled { opacity: .4; cursor: not-allowed; transform: none; }
.phi-es-secondary { background: transparent; color: #fff !important; border-color: rgba(255,255,255,.55); }
.phi-es-secondary:hover,
.phi-es-secondary:focus-visible { border-color: #fff; background: rgba(255,255,255,.08); outline: none; }
.phi-es-secondary:disabled { opacity: .25; cursor: default; }

.phi-es-progress-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 10px; }
.phi-es-progress-head span { color: #c8d2d8 !important; font-size: 14px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.phi-es-progress-head strong { font-size: 15px; font-weight: 700; color: #fff !important; }
.phi-es-progress { height: 8px; border-radius: 99px; background: rgba(255,255,255,.12); overflow: hidden; margin-bottom: 30px; }
.phi-es-progress span { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--phi-es-green); transition: width .25s ease; }

.phi-es-question { max-width: 880px; margin: 0 auto; }
.phi-es-question-eyebrow { color: var(--phi-es-green) !important; font-size: 14px; text-transform: uppercase; letter-spacing: .05em; font-weight: 800; margin-bottom: 8px; }
.phi-es-question-title { margin: 0 0 14px !important; color: #fff !important; font-size: clamp(24px, 2.5vw, 31px) !important; line-height: 1.25 !important; text-transform: none !important; font-weight: 800 !important; }
.phi-es-question-title::after { display: none !important; }
.phi-es-question-help { margin: 0 0 20px; background: rgba(255,255,255,.08); padding: 12px 15px; border-radius: 8px; color: #dbe3e7 !important; font-size: 14px; line-height: 1.55; }
.phi-es-question-field { margin: 18px 0 0; transition: .15s ease; }
.phi-es-question-field--secondary { border-top: 1px solid rgba(255,255,255,.15); padding-top: 18px; margin-top: 24px; }
.phi-es-question-field.is-hidden { display: none; }
.phi-es-field-label { font-weight: 750; margin-bottom: 10px; color: #fff !important; font-size: 17px; }
.phi-es-required { color: var(--phi-es-green) !important; }

.phi-es-options { display: grid; gap: 9px; }
.phi-es-options--multi { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.phi-es-option {
    position: relative;
    display: flex;
    gap: 12px;
    align-items: flex-start;
    margin: 0;
    padding: 12px 14px;
    border: 1px solid rgba(255,255,255,.32);
    border-radius: 8px;
    background: rgba(10, 39, 55, .26);
    cursor: pointer;
    min-height: 52px;
    transition: .18s ease;
}
.phi-es-option:hover { border-color: rgba(255,255,255,.76); background: rgba(255,255,255,.05); }
.phi-es-option:has(input:checked) { border-color: var(--phi-es-green); background: rgba(164,187,0,.11); box-shadow: inset 0 0 0 1px var(--phi-es-green); }
.phi-es-option input { position: absolute; opacity: 0; pointer-events: none; }
.phi-es-option-marker { flex: 0 0 19px; width: 19px; height: 19px; border-radius: 50%; border: 1.5px solid rgba(255,255,255,.7); margin-top: 2px; position: relative; }
.phi-es-options--multi .phi-es-option-marker { border-radius: 4px; }
.phi-es-option input:checked + .phi-es-option-marker { border-color: var(--phi-es-green); background: var(--phi-es-green); }
.phi-es-option input:checked + .phi-es-option-marker::after { content: ''; position: absolute; left: 5px; top: 2px; width: 5px; height: 9px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.phi-es-option-text { color: #fff !important; font-size: 15px; line-height: 1.45; font-weight: 550; }

.phi-es-number-wrap { display: flex; align-items: stretch; max-width: 260px; }
.phi-es-number-wrap input,
.phi-es-question-field textarea,
.phi-es-field input,
.phi-es-field select,
.phi-es-input-unit select {
    width: 100%;
    min-height: 48px;
    border-radius: 7px;
    border: 1px solid rgba(255,255,255,.36);
    background: rgba(255,255,255,.96);
    color: var(--phi-es-navy) !important;
    padding: 10px 12px;
    font: 500 15px/1.4 inherit;
    outline: none;
}
.phi-es-number-wrap input:focus,
.phi-es-question-field textarea:focus,
.phi-es-field input:focus,
.phi-es-field select:focus,
.phi-es-input-unit select:focus { border-color: var(--phi-es-green); box-shadow: 0 0 0 2px rgba(164,187,0,.24); }
.phi-es-question-field textarea { resize: vertical; min-height: 92px; }
.phi-es-number-wrap input { border-radius: 7px 0 0 7px; }
.phi-es-number-suffix { display: grid; place-items: center; min-width: 52px; background: var(--phi-es-green); color: #fff !important; font-weight: 800; border-radius: 0 7px 7px 0; }

.phi-es-validation { min-height: 24px; margin: 14px auto 0; max-width: 880px; color: #ffe0e0 !important; font-weight: 700; font-size: 22px; }
.phi-es-nav { display: flex; justify-content: space-between; gap: 16px; max-width: 880px; margin: 12px auto 0; }

.phi-es-contact-intro { max-width: 880px; margin: 0 auto 20px; color: #e0e7ea !important; }
.phi-es-contact-form { max-width: 880px; margin: 0 auto; }
.phi-es-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.phi-es-field { font-size: 14px; font-weight: 700; color: #fff !important; }
.phi-es-field > span { color: var(--phi-es-green) !important; font-size: 100%;}
.phi-es-span-2 { grid-column: span 2; }
.phi-es-input-unit { display: grid; grid-template-columns: 1fr 92px; }
.phi-es-input-unit input { border-radius: 7px 0 0 7px; }
.phi-es-input-unit select { border-left: 0; border-radius: 0 7px 7px 0; background: #e9eef0; }
.phi-es-energy-field > label { font-size: 14px; font-weight: 700; }
.phi-es-consent { display: grid; grid-template-columns: 22px 1fr; align-items: start; gap: 10px; margin: 22px 0 8px; cursor: pointer; font-size: 13px; line-height: 1.5; color: #e7edef !important; }
.phi-es-consent input { width: 19px; height: 19px; accent-color: var(--phi-es-green); margin-top: 2px; }
.phi-es-consent a { color: var(--phi-es-green) !important; text-decoration: underline; }
.phi-es-honeypot { position: absolute !important; left: -99999px !important; width: 1px !important; height: 1px !important; opacity: 0 !important; }

.phi-es-result { max-width: 920px; margin: 0 auto; }
.phi-es-result-head { text-align: center; margin-bottom: 22px; }
.phi-es-result-kicker { color: var(--phi-es-green) !important; text-transform: uppercase; letter-spacing: .05em; font-size: 13px; font-weight: 800; margin-bottom: 6px; }
.phi-es-result-title { margin: 0 0 8px !important; color: #fff !important; text-transform: none !important; font-size: 30px !important; line-height: 1.2 !important; font-weight: 800 !important; }
.phi-es-result-title::after { display: none !important; }
.phi-es-result-copy { margin: 0; color: #e2e8eb !important; font-size: 15px; line-height: 1.6; }
.phi-es-score-card,
.phi-es-benchmark-card,
.phi-es-sections-card { background: rgba(7, 36, 51, .48); border: 1px solid rgba(255,255,255,.12); border-radius: 12px; padding: 22px; margin-bottom: 16px; }
.phi-es-score-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.phi-es-score-number strong { font-size: 48px; line-height: 1; font-weight: 850; color: #fff !important; }
.phi-es-score-number span { font-size: 18px; color: #d6e0e5 !important; }
.phi-es-maturity { text-align: right; }
.phi-es-maturity span { display: block; color: #a9b8c0 !important; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; font-weight: 700; }
.phi-es-maturity strong { display: block; color: var(--phi-es-green) !important; font-size: 18px; font-weight: 800; }
.phi-es-gauge-track { position: relative; display: grid; grid-template-columns: 40fr 20fr 20fr 20fr; height: 44px; border-radius: 8px; overflow: visible; background: linear-gradient(90deg, rgba(255,255,255,.18) 0 39%, rgba(255,255,255,.24) 39% 59%, rgba(164,187,0,.35) 59% 79%, rgba(164,187,0,.72) 79% 100%); }
.phi-es-gauge-track > span { display: grid; place-items: center; font-size: 11px; font-weight: 700; color: #fff !important; border-right: 1px solid rgba(255,255,255,.24); }
.phi-es-gauge-marker { position: absolute; top: -7px; width: 4px; height: 58px; background: #fff; border-radius: 4px; transform: translateX(-2px); box-shadow: 0 0 0 3px var(--phi-es-green); }
.phi-es-maturity-copy { margin: 14px 0 0; color: #dfe7ea !important; font-size: 14px; line-height: 1.55; }
.phi-es-benchmark-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 12px; }
.phi-es-benchmark-stat { background: rgba(255,255,255,.07); border-radius: 9px; padding: 14px; text-align: center; }
.phi-es-benchmark-stat strong { display: block; font-size: 24px; color: #fff !important; font-weight: 850; }
.phi-es-benchmark-stat span { display: block; font-size: 12px; color: #b9c7ce !important; }
.phi-es-sections-card h4 { margin: 0 0 16px; color: #fff !important; font-size: 20px; text-transform: none; }
.phi-es-section-row + .phi-es-section-row { margin-top: 14px; }
.phi-es-section-head { display: flex; justify-content: space-between; gap: 16px; font-size: 14px; margin-bottom: 6px; }
.phi-es-section-head span { color: #e8eef1 !important; font-weight: 600; }
.phi-es-section-head strong { color: #fff !important; font-weight: 800; }
.phi-es-section-bar { height: 9px; background: rgba(255,255,255,.11); border-radius: 99px; overflow: hidden; }
.phi-es-section-bar span { display: block; height: 100%; background: var(--phi-es-green); border-radius: inherit; }
.phi-es-result-close { margin-top: 22px; }

@media (max-width: 920px) {
    .phi-es-modal {
        padding: 12px;
    }

    .phi-es-dialog {
        max-height: calc(100vh - 24px);
        padding: 0;
        border-radius: 14px;
    }

    .phi-es-dialog-scroll {
        max-height: calc(100vh - 24px);
        padding: 34px 24px 30px;
    }

    .phi-es-stage { padding: 22px 18px 24px; }
    .phi-es-test-grid { gap: 16px; }
    .phi-es-test-card { min-height: 270px; }
    .phi-es-options--multi { grid-template-columns: 1fr; }
}

@media (max-width: 680px) {
    .phi-es-header { padding-right: 30px; }
    .phi-es-header h2 { font-size: 28px !important; }
    .phi-es-meta { font-size: 17px; }
    .phi-es-intro { font-size: 14px; }
    .phi-es-assistant { grid-template-columns: 54px 1fr; gap: 12px; }
    .phi-es-avatar { width: 54px; height: 54px; }
    .phi-es-bubble { padding: 15px 17px; min-height: 84px; border-radius: 14px; }
    .phi-es-bubble strong { font-size: 16px; }
    .phi-es-bubble-label { font-size: 12px; }
    .phi-es-test-grid { grid-template-columns: 1fr; }
    .phi-es-test-card { min-height: 0; display: grid; grid-template-columns: 82px 1fr; grid-template-rows: auto auto; text-align: left; gap: 2px 16px; align-items: center; padding: 18px 42px 18px 18px; }
    .phi-es-card-icon { width: 76px; height: 76px; padding: 11px; grid-row: span 2; margin: 0; }
    .phi-es-card-title { font-size: 18px; margin: 0; align-self: end; }
    .phi-es-card-copy { font-size: 14px; margin: 0; align-self: start; }
    .phi-es-radio-dot { right: 14px; top: 14px; }
    .phi-es-progress-head { align-items: flex-start; flex-direction: column; gap: 2px; }
    .phi-es-question-title { font-size: 22px !important; }
    .phi-es-nav { flex-direction: column-reverse; }
    .phi-es-primary, .phi-es-secondary { width: 100%; }
    .phi-es-form-grid { grid-template-columns: 1fr; }
    .phi-es-span-2 { grid-column: span 1; }
    .phi-es-score-top { flex-direction: column; align-items: flex-start; }
    .phi-es-maturity { text-align: left; }
    .phi-es-benchmark-grid { grid-template-columns: 1fr; }
    .phi-es-gauge-track > span { font-size: 9px; }
}

@media (prefers-reduced-motion: reduce) {
    .phi-es-screen.is-active { animation: none; }
    .phi-es-test-card,
    .phi-es-primary,
    .phi-es-secondary { transition: none; }
}

/* v1.1 – screenshot-oriented question flow, uploads and score preview */
.phi-es-avatar img,
.phi-es-avatar-fallback,
.phi-es-avatar-fallback svg,
.phi-es-card-icon img { width: 100%; height: 100%; display: block; object-fit: contain; }
.phi-es-avatar img { object-fit: cover; }
.phi-es-card-icon img { border-radius: 0; }

.phi-es-question { max-width: 100%; }
.phi-es-question-assistant { max-width: 980px; margin: 0 auto 28px; grid-template-columns: 92px 1fr; }
.phi-es-question-assistant .phi-es-bubble { min-height: 118px; }
.phi-es-question-help { max-width: 940px; margin: -10px auto 20px; }
.phi-es-question-field { max-width: 940px; margin-left: auto; margin-right: auto; }
.phi-es-question-field--secondary { margin-top: 28px; padding-top: 22px; }
.phi-es-additional-kicker { margin-bottom: 5px; color: var(--phi-es-green) !important; font-size: 12px; font-weight: 850; letter-spacing: .07em; text-transform: uppercase; }
.phi-es-options--two { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 30px; }
.phi-es-options--three { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; column-gap: 24px; }
.phi-es-options--single .phi-es-option { border-color: transparent; background: transparent; min-height: 46px; padding: 9px 14px; }
.phi-es-options--single .phi-es-option:hover { border-color: rgba(255,255,255,.3); }
.phi-es-options--single .phi-es-option:has(input:checked) { border-color: var(--phi-es-green); background: rgba(164,187,0,.11); }
.phi-es-options--single .phi-es-option-marker { width: 22px; height: 22px; flex-basis: 22px; }
.phi-es-options--single .phi-es-option input:checked + .phi-es-option-marker { background: #fff; border: 7px solid var(--phi-es-green); }
.phi-es-options--single .phi-es-option input:checked + .phi-es-option-marker::after { display: none; }
.phi-es-options--single .phi-es-option-text { font-size: 17px; }

.phi-es-question-footer { display: grid; grid-template-columns: minmax(160px, 250px) auto 1fr; gap: 20px; align-items: center; max-width: 940px; margin: 32px auto 0; }
.phi-es-progress-inline { height: 12px; border-radius: 99px; background: rgba(255,255,255,.14); overflow: hidden; }
.phi-es-progress-inline span { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--phi-es-green); transition: width .25s ease; }
.phi-es-progress-label { color: #e5eaed !important; font-size: 13px; white-space: nowrap; }
.phi-es-nav--question { max-width: none; margin: 0; justify-content: flex-end; }
.phi-es-nav--question .phi-es-secondary { min-width: 120px; }

.phi-es-preview { max-width: 980px; margin: 0 auto; text-align: center; }
.phi-es-preview-title { margin: 18px 0 8px !important; color: #fff !important; font-size: clamp(28px, 3vw, 38px) !important; line-height: 1.15 !important; text-transform: none !important; font-weight: 850 !important; }
.phi-es-preview-title::after { display: none !important; }
.phi-es-preview-intro { max-width: 760px; margin: 0 auto 10px; color: #e7ecef !important; }
.phi-es-preview-layout { display: grid; grid-template-columns: 180px 360px 220px; justify-content: center; align-items: center; gap: 36px; margin: 42px auto 28px; }
.phi-es-score-legend { text-align: left; }
.phi-es-score-legend-item { display: flex; align-items: center; gap: 9px; font-size: 14px; font-weight: 750; }
.phi-es-score-legend-item i { width: 16px; height: 16px; border-radius: 50%; flex: 0 0 16px; }
.phi-es-meter-wrap { display: flex; justify-content: center; }
.phi-es-score-meter {
    --phi-score: 0%;
    --phi-score-angle: 0deg;
    --phi-ring-width: 38px;
    --phi-low: #E62B13;
    --phi-medium: #F39A00;
    --phi-good: #F2D900;
    --phi-high: #A4BB00;
    --phi-track: #14364A;
    --phi-end-color: var(--phi-low);
    --phi-b1: 39%;
    --phi-b2: 59%;
    --phi-b3: 79%;
    --phi-c1: 19.5%;
    --phi-c2: 49.5%;
    --phi-c3: 69.5%;
    --phi-c4: 90%;
    position: relative;
    width: min(330px, 31vw);
    aspect-ratio: 1;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background:
        conic-gradient(from -90deg, transparent 0 var(--phi-score), var(--phi-track) var(--phi-score) 100%),
        conic-gradient(
            from -90deg,
            var(--phi-low) 0%,
            var(--phi-low) var(--phi-c1),
            var(--phi-medium) var(--phi-c2),
            var(--phi-good) var(--phi-c3),
            var(--phi-high) var(--phi-c4),
            var(--phi-high) 100%
        );
    box-shadow: 0 4px 7px rgba(0,0,0,.24);
}
.phi-es-score-meter::before {
    content: '';
    position: absolute;
    inset: var(--phi-ring-width);
    z-index: 2;
    border-radius: 50%;
    background: var(--phi-es-panel);
    box-shadow: 0 3px 8px rgba(0,0,0,.25);
}
.phi-es-score-cap {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    transform-origin: 50% 50%;
}
.phi-es-score-cap::before {
    content: '';
    position: absolute;
    width: var(--phi-ring-width);
    height: var(--phi-ring-width);
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    border-radius: 50%;
}
.phi-es-score-cap--start::before { background: var(--phi-low); }
.phi-es-score-cap--end { transform: rotate(var(--phi-score-angle)); }
.phi-es-score-cap--end::before { background: var(--phi-end-color); }
.phi-es-score-meter-inner { position: relative; z-index: 3; display: grid; place-items: center; }
.phi-es-score-meter-inner strong { color: #fff !important; font-size: clamp(58px, 7vw, 80px); line-height: 1; font-weight: 850; }
.phi-es-potential { text-align: left; display: flex; flex-direction: column; gap: 2px; }
.phi-es-potential strong { color: #fff !important; font-size: 20px; font-weight: 850; }
.phi-es-potential span { color: #fff !important; font-size: 18px; font-weight: 750; line-height: 1.3; }
.phi-es-potential small { margin-top: 8px; color: var(--phi-es-green) !important; font-size: 13px; font-weight: 800; }
.phi-es-potential-description { margin: 6px 0 0; color: #dbe3e7 !important; font-size: 13px; line-height: 1.5; font-weight: 500; }
.phi-es-score-maximum { margin-top: 6px; color: #c9d4d9 !important; font-size: 12px; font-style: normal; font-weight: 650; }


/* TEMPORARY */
.phi-es-potential .phi-es-score-maximum,
.phi-es-potential > small,
.phi-es-potential .phi-es-potential-description {
    display: none;
}
.phi-es-gauge-track--dynamic { background: rgba(255,255,255,.08); overflow: hidden; }
.phi-es-gauge-track--dynamic > span { color: #fff !important; }
.phi-es-gauge-track--dynamic .phi-es-gauge-marker { z-index: 2; }
.phi-es-preview-benchmark { max-width: 900px; margin: 4px auto 0; text-align: left; color: #e9eef0 !important; font-size: 14px; line-height: 1.55; }
.phi-es-preview-nav { max-width: 940px; margin-top: 24px; }
.phi-es-preview-nav .phi-es-primary { margin-left: auto; }
.phi-es-preview-loading { min-height: 380px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; }
.phi-es-preview-loading span { width: 42px; height: 42px; border: 4px solid rgba(255,255,255,.2); border-top-color: var(--phi-es-green); border-radius: 50%; animation: phiEsSpin .7s linear infinite; }
.phi-es-preview-loading strong { font-size: 17px; }
@keyframes phiEsSpin { to { transform: rotate(360deg); } }

.phi-es-contact-intro { max-width: 940px; font-size: 14px; line-height: 1.55; }
.phi-es-contact-intro strong { color: #fff !important; font-size: 22px; }
.phi-es-contact-form { max-width: 940px; }
.phi-es-form-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.phi-es-contact-nav { max-width: 940px; }

@media (max-width: 920px) {
    .phi-es-options--two, .phi-es-options--three { grid-template-columns: 1fr !important; }
    .phi-es-question-footer { grid-template-columns: 1fr auto; }
    .phi-es-nav--question { grid-column: span 2; }
    .phi-es-preview-layout { grid-template-columns: 1fr 1.4fr; gap: 24px; }
    .phi-es-potential { grid-column: span 2; text-align: center; align-items: center; }
    .phi-es-score-meter { width: min(300px, 50vw); }
    .phi-es-form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 680px) {
    .phi-es-question-assistant { grid-template-columns: 54px 1fr; gap: 12px; }
    .phi-es-question-footer { grid-template-columns: 1fr; gap: 10px; }
    .phi-es-nav--question { grid-column: auto; }
    .phi-es-preview-layout { grid-template-columns: 1fr; margin-top: 24px; }
    .phi-es-potential { grid-column: auto; }
    .phi-es-score-legend { order: 2; justify-self: center; }
    .phi-es-meter-wrap { order: 1; }
    .phi-es-potential { order: 3; }
    .phi-es-score-meter { width: min(280px, 78vw); --phi-ring-width: 31px; }
    .phi-es-form-grid { grid-template-columns: 1fr; }
    .phi-es-preview-nav { flex-direction: column-reverse; }
}

/* Fixed footer Energy-Score CTA */
.phi-es-floating-cta-wrap {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 999990;
    transition: opacity .2s ease, transform .2s ease;
}

body.phi-es-lock .phi-es-floating-cta-wrap {
    opacity: 0;
    pointer-events: none;
    transform: translateY(12px);
}

.phi-es-floating-cta {
    --phi-es-floating-score: 67%;
    appearance: none;
    width: min(430px, calc(100vw - 32px));
    min-height: 104px;
    display: grid;
    grid-template-columns: 82px minmax(0, 1fr) 82px;
    align-items: center;
    gap: 14px;
    padding: 9px 10px 9px 12px;
    border: 0;
    border-radius: 58px;
    background: linear-gradient(180deg, #28566d 0%, #173d52 100%);
    box-shadow: 0 5px 10px rgba(0, 0, 0, .34), inset 0 1px 0 rgba(255, 255, 255, .16);
    color: #fff;
    font-family: inherit;
    text-align: left;
    cursor: pointer;
    position: relative;
    overflow: visible;
    transition: transform .2s ease, box-shadow .2s ease;
    border-top-right-radius: 20px;
}

.phi-es-floating-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, .38), inset 0 1px 0 rgba(255, 255, 255, .16);
}

.phi-es-floating-cta:focus-visible {
    outline: 3px solid #A4BB00;
    outline-offset: 4px;
}

.phi-es-floating-score {
    width: 76px;
    height: 76px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    position: relative;
    isolation: isolate;
    background:
        conic-gradient(from -32deg, transparent 0 var(--phi-es-floating-score), #15384c var(--phi-es-floating-score) 100%),
        conic-gradient(from -32deg, #E62B13 0%, #F39A00 35%, #F2D900 62%, #A4BB00 100%);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08), 0 2px 5px rgba(0, 0, 0, .28);
}

.phi-es-floating-score::before {
    content: '';
    position: absolute;
    inset: 8px;
    border-radius: inherit;
    background: #173d52;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, .38);
    z-index: -1;
}

.phi-es-floating-score strong {
    color: #fff !important;
    font-size: 28px;
    line-height: 1;
    font-weight: 850;
    letter-spacing: -.03em;
}

.phi-es-floating-copy {
    min-width: 0;
    height: 58px;
    perspective: 460px;
    overflow: hidden;
    display: block;
}

.phi-es-floating-cube {
    position: relative;
    display: block;
    width: 100%;
    height: 58px;
    transform-style: preserve-3d;
    transform: translateZ(-29px) rotateX(0deg);
    animation: phiEsFloatingCube 22.4s infinite cubic-bezier(.65, 0, .35, 1);
}

.phi-es-floating-face {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    color: #fff !important;
    font-size: 19px;
    line-height: 1.18;
    font-weight: 800;
    letter-spacing: .005em;
    backface-visibility: hidden;
    overflow-wrap: anywhere;
}

.phi-es-floating-face--front { transform: rotateX(0deg) translateZ(29px); }
.phi-es-floating-face--top { transform: rotateX(90deg) translateZ(29px); }
.phi-es-floating-face--back { transform: rotateX(180deg) translateZ(29px); }
.phi-es-floating-face--bottom { transform: rotateX(270deg) translateZ(29px); }

@keyframes phiEsFloatingCube {
    0%, 22.32% { transform: translateZ(-29px) rotateX(0deg); }
    25%, 47.32% { transform: translateZ(-29px) rotateX(-90deg); }
    50%, 72.32% { transform: translateZ(-29px) rotateX(-180deg); }
    75%, 97.32% { transform: translateZ(-29px) rotateX(-270deg); }
    100% { transform: translateZ(-29px) rotateX(-360deg); }
}

.phi-es-floating-avatar {
    width: 78px;
    height: 78px;
    border-radius: 50%;
    overflow: hidden;
    display: grid;
    place-items: center;
    background: #06131b;
    box-shadow: 0 3px 8px rgba(0, 0, 0, .38);
}

.phi-es-floating-avatar img,
.phi-es-floating-avatar svg {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
}

.phi-es-floating-status-dot {
    position: absolute;
    right: 12px;
    top: 4px;
    width: 19px;
    height: 19px;
    border-radius: 50%;
    background: #A4D900;
    box-shadow: 0 0 0 4px #28566d;
}

@media (max-width: 600px) {
    .phi-es-floating-cta-wrap {
        right: 12px;
        bottom: 12px;
    }

    .phi-es-floating-cta {
        width: calc(100vw - 24px);
        min-height: 86px;
        grid-template-columns: 62px minmax(0, 1fr) 62px;
        gap: 9px;
        padding: 8px 9px 8px 10px;
    }

    .phi-es-floating-score {
        width: 60px;
        height: 60px;
    }

    .phi-es-floating-score::before { inset: 7px; }
    .phi-es-floating-score strong { font-size: 22px; }

    .phi-es-floating-copy,
    .phi-es-floating-cube { height: 50px; }

    .phi-es-floating-cube { transform: translateZ(-25px) rotateX(0deg); }
    .phi-es-floating-face { font-size: 15px; line-height: 1.18; }
    .phi-es-floating-face--front { transform: rotateX(0deg) translateZ(25px); }
    .phi-es-floating-face--top { transform: rotateX(90deg) translateZ(25px); }
    .phi-es-floating-face--back { transform: rotateX(180deg) translateZ(25px); }
    .phi-es-floating-face--bottom { transform: rotateX(270deg) translateZ(25px); }

    @keyframes phiEsFloatingCube {
        0%, 22.32% { transform: translateZ(-25px) rotateX(0deg); }
        25%, 47.32% { transform: translateZ(-25px) rotateX(-90deg); }
        50%, 72.32% { transform: translateZ(-25px) rotateX(-180deg); }
        75%, 97.32% { transform: translateZ(-25px) rotateX(-270deg); }
        100% { transform: translateZ(-25px) rotateX(-360deg); }
    }

    .phi-es-floating-avatar {
        width: 60px;
        height: 60px;
    }

    .phi-es-floating-status-dot {
        right: 9px;
        top: 5px;
        width: 15px;
        height: 15px;
        box-shadow: 0 0 0 3px #28566d;
    }
}

@media (prefers-reduced-motion: reduce) {
    .phi-es-floating-cube { animation: none; }
}

.phi-es-floating-face--top,
.phi-es-floating-face--bottom {
    font-size: 15.5px;
    line-height: 1.18;
}

@media (max-width: 600px) {
    .phi-es-floating-face--top,
    .phi-es-floating-face--bottom {
        font-size: 13px;
        line-height: 1.15;
    }
}
