.epik-calculator {
    box-sizing: border-box;
    width: 100%;
    margin: 32px 0;
    padding: clamp(24px, 3vw, 36px);
    border: 1px solid #d8d3c6;
    border-radius: 8px;
    background: #fff;
    color: #17211f;
    box-shadow: 0 12px 32px rgba(23, 33, 31, 0.08);
}

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

.epik-calc-kicker {
    margin: 0 0 8px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: uppercase;
}

.epik-calc-header {
    max-width: 820px;
    margin-bottom: 28px;
}

.epik-calc-header h2 {
    margin: 0;
    font-size: clamp(2rem, 3vw, 3rem);
    line-height: 1.06;
}

.epik-calc-intro {
    max-width: 760px;
    margin: -16px 0 32px;
    color: #52605c;
    font-size: 1rem;
    line-height: 1.55;
}

.epik-calc-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.92fr);
    gap: clamp(24px, 3vw, 36px);
    align-items: start;
}

.epik-calc-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.epik-calc-form fieldset {
    min-width: 0;
    margin: 0;
    padding: 22px 20px;
    border: 1px solid #e3ded4;
    border-radius: 8px;
}

.epik-calc-form legend {
    padding: 0 6px;
    font-weight: 800;
}

.epik-calc-field {
    display: grid;
    gap: 7px;
    margin: 0 0 16px;
    font-size: 0.94rem;
    font-weight: 700;
    color: #34423f;
}

.epik-label-text,
.epik-result-feature span,
.epik-result-card span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.epik-help {
    position: relative;
    display: inline-grid;
    place-items: center;
    width: 18px;
    height: 18px;
    border-radius: 999px;
    background: #e8f2ef;
    color: #0f554b;
    font-size: 0.72rem;
    font-weight: 900;
    line-height: 1;
    cursor: help;
}

.epik-help::after {
    content: attr(aria-label);
    position: absolute;
    z-index: 20;
    left: 50%;
    bottom: calc(100% + 8px);
    width: min(260px, 72vw);
    padding: 9px 10px;
    border-radius: 6px;
    background: #17211f;
    color: #fff;
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1.35;
    text-transform: none;
    transform: translateX(-50%);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.16s ease;
}

.epik-help:hover::after,
.epik-help:focus::after {
    opacity: 1;
}

.epik-help:focus {
    outline: 2px solid #146b5f;
    outline-offset: 2px;
}

.epik-input-shell {
    display: flex;
    align-items: center;
    min-height: 44px;
    border: 1px solid #cbc5b8;
    border-radius: 6px;
    overflow: hidden;
    background: #fff;
}

.epik-input-shell span {
    flex: 0 0 auto;
    padding: 0 10px;
    color: #65716e;
    font-weight: 800;
}

.epik-input-shell input {
    width: 100%;
    min-width: 0;
    border: 0;
    padding: 11px 10px;
    background: transparent;
    color: #17211f;
    font: inherit;
    outline: 0;
}

.epik-input-shell select {
    width: 100%;
    min-width: 0;
    border: 0;
    padding: 11px 10px;
    background: transparent;
    color: #17211f;
    font: inherit;
    outline: 0;
    appearance: none;
}

.epik-input-shell:focus-within {
    border-color: #146b5f;
    box-shadow: 0 0 0 3px rgba(20, 107, 95, 0.16);
}

.epik-calc-results {
    position: sticky;
    top: 24px;
    display: grid;
    gap: 18px;
}

.epik-result-section {
    display: grid;
    gap: 12px;
}

.epik-result-section-header {
    display: grid;
    gap: 4px;
}

.epik-result-section-header h3 {
    margin: 0;
    color: #17211f;
    font-size: 1.05rem;
    line-height: 1.2;
}

.epik-result-section-header p {
    margin: 0;
    color: #65716e;
    font-size: 0.88rem;
    line-height: 1.4;
}

.epik-result-feature,
.epik-result-card {
    border: 1px solid #e1dccf;
    border-radius: 8px;
    background: #fbfaf6;
}

.epik-result-feature {
    padding: 26px 24px;
    border-color: #d8d3c6;
    background: #fbfaf6;
}

.epik-result-feature span,
.epik-result-card span {
    display: block;
    margin-bottom: 6px;
    color: #52605c;
    font-size: 0.86rem;
    font-weight: 800;
}

.epik-result-feature strong {
    display: block;
    color: #17211f;
    font-size: clamp(2.6rem, 5vw, 4.4rem);
    line-height: 1;
    letter-spacing: 0;
}

.epik-result-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.epik-result-card {
    min-height: 112px;
    padding: 18px;
}

.epik-result-card strong {
    display: block;
    color: #17211f;
    font-size: 1.38rem;
    line-height: 1.15;
    overflow-wrap: anywhere;
}

.epik-calc-disclaimer {
    margin: 0;
    padding: 14px 16px;
    border-radius: 8px;
    background: #f7f5ef;
    color: #4c5855;
    font-size: 0.92rem;
    line-height: 1.45;
}

.epik-calc-note {
    margin: 0;
    padding: 20px 22px;
    border: 1px solid #d8d3c6;
    border-left: 6px solid #d8d3c6;
    border-radius: 8px;
    background: #fbfaf6;
    color: #34423f;
    font-size: 1.05rem;
    font-weight: 800;
    line-height: 1.45;
}

.epik-calc-disclaimer {
    margin-top: 22px;
    border-left: 4px solid #d4a72c;
}

.epik-calc-context {
    margin: 0 0 24px;
    padding: 22px;
    border: 1px solid #d8d3c6;
    border-radius: 8px;
    background: #fbfaf6;
    box-shadow: 0 12px 32px rgba(23, 33, 31, 0.05);
}

.epik-calc-context-header {
    display: grid;
    gap: 6px;
    margin-bottom: 14px;
}

.epik-calc-context-header h2 {
    margin: 0;
    font-size: 1.6rem;
    line-height: 1.15;
}

.epik-calc-context-summary {
    margin: 0 0 16px;
    color: #34423f;
    font-size: 1rem;
    line-height: 1.55;
}

.epik-calc-context-block + .epik-calc-context-block {
    margin-top: 16px;
}

.epik-calc-context-block h3 {
    margin: 0 0 8px;
    color: #17211f;
    font-size: 1.02rem;
    line-height: 1.25;
}

.epik-calc-context-block p {
    margin: 0;
    color: #52605c;
    font-size: 0.94rem;
    line-height: 1.55;
}

.epik-calc-context-list {
    margin: 0;
    padding-left: 20px;
    color: #52605c;
    font-size: 0.94rem;
    line-height: 1.55;
}

.epik-calc-context-list li + li {
    margin-top: 8px;
}

.epik-calc-context-example {
    padding: 14px 16px;
    border: 1px solid #e3ded4;
    border-radius: 8px;
    background: #fff;
}

.epik-calc-context-example + .epik-calc-context-example {
    margin-top: 10px;
}

.epik-calc-context-example h4 {
    margin: 0 0 6px;
    color: #17211f;
    font-size: 0.98rem;
    line-height: 1.3;
}

.epik-calc-context-example p {
    margin: 0;
    color: #52605c;
}

.epik-calc-faq {
    margin-top: 28px;
    padding-top: 24px;
    border-top: 1px solid #e3ded4;
}

.epik-calc-faq h3 {
    margin: 0 0 12px;
    font-size: 1.2rem;
}

.epik-calc-faq details {
    border: 1px solid #e3ded4;
    border-radius: 8px;
    background: #fbfaf6;
}

.epik-calc-faq details + details {
    margin-top: 8px;
}

.epik-calc-faq summary {
    padding: 12px 14px;
    color: #17211f;
    font-weight: 800;
    cursor: pointer;
}

.epik-calc-faq p {
    margin: 0;
    padding: 0 14px 14px;
    color: #52605c;
    font-size: 0.94rem;
    line-height: 1.45;
}

.epik-calculator-frame-compact .epik-calculator {
    margin: 0;
    padding: 20px;
    border: 0;
    box-shadow: none;
}

.epik-calculator-frame-compact .epik-calc-layout,
.epik-calculator-frame-compact .epik-calc-form,
.epik-calculator-frame-compact .epik-result-grid {
    grid-template-columns: 1fr;
}

.epik-calculator-frame-compact .epik-calc-results {
    position: static;
}

@media (max-width: 900px) {
    .epik-calc-layout,
    .epik-calc-form {
        grid-template-columns: 1fr;
    }

    .epik-calc-results {
        position: static;
    }
}

@media (max-width: 620px) {
    .epik-calculator {
        padding: 18px;
    }

    .epik-calc-header {
        margin-bottom: 22px;
    }

    .epik-calc-intro {
        margin: -10px 0 24px;
    }

    .epik-calc-form fieldset {
        padding: 16px;
    }

    .epik-result-grid {
        grid-template-columns: 1fr;
    }

    .epik-calc-context {
        padding: 18px;
    }
}
