.epcc,
.epcc * {
    box-sizing: border-box;
}

.epcc {
    container-type: inline-size;
    --epcc-bg: #0e1117;
    --epcc-surface: #151922;
    --epcc-surface-2: #1b202b;
    --epcc-border: rgba(255, 255, 255, 0.11);
    --epcc-text: #f5f2ea;
    --epcc-muted: #aab1bf;
    --epcc-accent: #d8b879;
    --epcc-accent-2: #f0d9aa;
    --epcc-danger: #ffaaa4;
    margin: 32px 0;
    padding: clamp(22px, 4vw, 46px);
    overflow: hidden;
    color: var(--epcc-text);
    background:
        radial-gradient(circle at 90% 0%, rgba(216, 184, 121, 0.12), transparent 32%),
        linear-gradient(145deg, #10141b, var(--epcc-bg));
    border: 1px solid var(--epcc-border);
    border-radius: 22px;
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.28);
    font-family: inherit;
}

.epcc__header {
    max-width: 760px;
    margin-bottom: 30px;
}

.epcc__header h2,
.epcc__comparison h3 {
    margin: 5px 0 8px;
    color: var(--epcc-text);
    font-size: clamp(28px, 4vw, 46px);
    line-height: 1.08;
    letter-spacing: -0.035em;
}

.epcc__header p,
.epcc__disclaimer {
    color: var(--epcc-muted);
}

.epcc__header p {
    max-width: 700px;
    margin: 0;
    font-size: 16px;
    line-height: 1.65;
}

.epcc__eyebrow {
    color: var(--epcc-accent);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.18em;
}

.epcc__layout {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(290px, 0.75fr);
    gap: 24px;
    align-items: start;
}

.epcc__form,
.epcc__results,
.epcc__comparison {
    background: rgba(21, 25, 34, 0.86);
    border: 1px solid var(--epcc-border);
    border-radius: 16px;
}

.epcc__form,
.epcc__results {
    padding: clamp(18px, 3vw, 28px);
}

.epcc__results {
    position: sticky;
    top: 24px;
}

.epcc__section-title {
    margin: 24px 0 12px;
    color: var(--epcc-accent-2);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.epcc__section-title:first-child {
    margin-top: 0;
}

.epcc__grid {
    display: grid;
    gap: 14px;
}

.epcc__grid--2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.epcc__grid--3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.epcc label {
    display: block;
}

.epcc label > span {
    display: block;
    margin-bottom: 7px;
    color: #d8dde6;
    font-size: 13px;
    font-weight: 650;
}

.epcc input,
.epcc select {
    width: 100%;
    min-height: 46px;
    margin: 0;
    padding: 10px 12px;
    color: var(--epcc-text);
    background: var(--epcc-surface-2);
    border: 1px solid var(--epcc-border);
    border-radius: 9px;
    box-shadow: none;
    font: inherit;
}

.epcc input:focus,
.epcc select:focus {
    border-color: var(--epcc-accent);
    outline: 2px solid rgba(216, 184, 121, 0.18);
    outline-offset: 1px;
}

.epcc select option {
    color: #111;
}

.epcc__plan-note {
    margin-top: 14px;
    padding: 11px 13px;
    color: var(--epcc-muted);
    background: rgba(216, 184, 121, 0.06);
    border-left: 3px solid var(--epcc-accent);
    border-radius: 6px;
    font-size: 13px;
    line-height: 1.55;
}

.epcc__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 24px;
}

.epcc .epcc__button {
    min-height: 46px;
    padding: 11px 18px;
    color: #16130d;
    background: var(--epcc-accent);
    border: 1px solid var(--epcc-accent);
    border-radius: 9px;
    cursor: pointer;
    font: inherit;
    font-weight: 800;
    transition: transform 0.15s ease, filter 0.15s ease;
}

.epcc .epcc__button:hover {
    filter: brightness(1.06);
    transform: translateY(-1px);
}

.epcc .epcc__button--secondary {
    color: var(--epcc-text);
    background: transparent;
    border-color: var(--epcc-border);
}

.epcc__result-label {
    color: var(--epcc-muted);
    font-size: 13px;
}

.epcc__total {
    margin: 5px 0 18px;
    color: var(--epcc-accent-2);
    font-size: clamp(36px, 5vw, 58px);
    font-weight: 800;
    letter-spacing: -0.05em;
    line-height: 1;
}

.epcc__metric-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 18px;
}

.epcc__metric-row > div {
    padding: 12px;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid var(--epcc-border);
    border-radius: 10px;
}

.epcc__metric-row span,
.epcc__metric-row strong {
    display: block;
}

.epcc__metric-row span {
    margin-bottom: 5px;
    color: var(--epcc-muted);
    font-size: 11px;
}

.epcc__metric-row strong {
    color: var(--epcc-text);
    font-size: 17px;
}

.epcc__breakdown {
    border-top: 1px solid var(--epcc-border);
}

.epcc__breakdown > div {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    padding: 10px 0;
    border-bottom: 1px solid var(--epcc-border);
}

.epcc__breakdown span {
    color: var(--epcc-muted);
    font-size: 13px;
}

.epcc__breakdown strong {
    color: var(--epcc-text);
    font-size: 13px;
    text-align: right;
}

.epcc__disclaimer {
    margin: 16px 0 0;
    font-size: 11px;
    line-height: 1.55;
}

.epcc__comparison {
    margin-top: 24px;
    padding: clamp(18px, 3vw, 28px);
}

.epcc__comparison[hidden] {
    display: none;
}

.epcc__comparison-head {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: flex-start;
    margin-bottom: 18px;
}

.epcc__comparison h3 {
    font-size: 27px;
}

.epcc__close {
    width: 38px;
    height: 38px;
    padding: 0;
    color: var(--epcc-text);
    background: transparent;
    border: 1px solid var(--epcc-border);
    border-radius: 50%;
    cursor: pointer;
    font-size: 24px;
    line-height: 1;
}

.epcc__table-wrap {
    overflow-x: auto;
}

.epcc table {
    width: 100%;
    min-width: 780px;
    margin: 0;
    border-collapse: collapse;
}

.epcc th,
.epcc td {
    padding: 13px 12px;
    color: var(--epcc-text);
    background: transparent;
    border: 0;
    border-bottom: 1px solid var(--epcc-border);
    text-align: left;
    font-size: 13px;
}

.epcc th {
    color: var(--epcc-muted);
    font-size: 11px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.epcc tr.is-lowest td {
    background: rgba(216, 184, 121, 0.075);
}

.epcc__best {
    display: block;
    margin-top: 3px;
    color: var(--epcc-accent);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

@media (max-width: 900px) {
    .epcc__layout {
        grid-template-columns: 1fr;
    }

    .epcc__results {
        position: static;
    }
}

@media (max-width: 640px) {
    .epcc {
        padding: 18px;
        border-radius: 15px;
    }

    .epcc__grid--2,
    .epcc__grid--3,
    .epcc__metric-row {
        grid-template-columns: 1fr;
    }

    .epcc__actions .epcc__button {
        width: 100%;
    }
}

/* v1.1: improve native dropdown contrast and currency-rate status. */
.epcc select {
    color-scheme: dark;
}

.epcc select option,
.epcc select optgroup {
    color: #121722 !important;
    background-color: #f7f4ed !important;
}

.epcc label > span {
    color: #f5f2ea !important;
    line-height: 1.35;
}

.epcc__fx-note {
    margin-top: 10px;
    color: #bfc6d2;
    font-size: 11px;
    line-height: 1.5;
}

.epcc__fx-note.is-warning {
    color: #f0d9aa;
}

@media (max-width: 760px) {
    .epcc select option,
    .epcc select optgroup {
        font-size: 16px;
    }
}

/* v1.2: force readable numeric values against Kadence/theme form overrides. */
.epcc input,
.epcc input[type="number"],
.epcc input[type="text"],
.epcc input[type="email"],
.epcc input[type="tel"] {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    background-color: #1b202b !important;
    opacity: 1 !important;
    caret-color: #f0d9aa;
    font-size: 16px !important;
    font-weight: 600 !important;
    line-height: 1.25 !important;
}

.epcc input:hover,
.epcc input:focus,
.epcc input:active {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    background-color: #1b202b !important;
    opacity: 1 !important;
}

.epcc input::placeholder {
    color: #9fa8b8 !important;
    -webkit-text-fill-color: #9fa8b8 !important;
    opacity: 1 !important;
}

.epcc input:-webkit-autofill,
.epcc input:-webkit-autofill:hover,
.epcc input:-webkit-autofill:focus,
.epcc input:-webkit-autofill:active {
    -webkit-text-fill-color: #ffffff !important;
    caret-color: #f0d9aa !important;
    -webkit-box-shadow: 0 0 0 1000px #1b202b inset !important;
    box-shadow: 0 0 0 1000px #1b202b inset !important;
    transition: background-color 9999s ease-out 0s;
}

/* Remove browser number spinners so they cannot cover values on narrow fields. */
.epcc input[type="number"] {
    -moz-appearance: textfield;
    appearance: textfield;
}

.epcc input[type="number"]::-webkit-outer-spin-button,
.epcc input[type="number"]::-webkit-inner-spin-button {
    margin: 0;
    -webkit-appearance: none;
}


/* v1.3: clearer monetary units and component-width responsive layout. */
.epcc [data-cost-label] {
    min-height: 36px;
}

@container (max-width: 620px) {
    .epcc .epcc__grid--2,
    .epcc .epcc__grid--3,
    .epcc .epcc__metric-row {
        grid-template-columns: 1fr;
    }

    .epcc .epcc__actions .epcc__button {
        width: 100%;
    }

    .epcc [data-cost-label] {
        min-height: 0;
    }
}
