/* ==========================================================================
   MYCRED — Check Eligibility page  (check-eligibility.html)
   Loaded after styles.css and application.css. Everything is scoped to
   .ec-page so nothing leaks into the other pages that share application.css.

   Layout follows the eligibility-check structure: hero with key facts →
   how it works + banks → eligibility rules beside a single-step form →
   reviews → courier records. The look is MYCRED's own: monochrome dark
   surfaces, hairline borders, sharp corners, hard zero-blur offset shadows,
   serif display headings and mono kickers — all from the shared tokens.
   ========================================================================== */

.ec-page { --ec-section-y: 104px; }

.ec-page .ec-section { padding: var(--ec-section-y) 0; }

/* ==========================================================================
   HERO
   ========================================================================== */
.ec-page .ec-hero .apply-hero-content { max-width: 620px; }

.ec-page .ec-hero .apply-hero-subtitle { margin-bottom: 36px; }

.ec-page .ec-hero-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px 30px;
    margin-bottom: 56px;
}

.ec-page .ec-hero-actions .btn i { font-size: .85em; transition: transform .2s ease; }
.ec-page .ec-hero-actions .btn:hover i { transform: translateX(3px); }

.ec-page .ec-hero-link {
    font-family: var(--font-mono);
    font-size: .74rem;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .78);
    border-bottom: 1px solid rgba(255, 255, 255, .3);
    padding-bottom: 3px;
    transition: color .2s ease, border-color .2s ease;
}

.ec-page .ec-hero-link:hover { color: #fff; border-color: #fff; }

.ec-page .ec-hero-facts {
    display: grid;
    grid-template-columns: repeat(4, auto);
    justify-content: start;
    padding-top: 28px;
    border-top: 1px solid rgba(255, 255, 255, .14);
}

.ec-page .ec-hero-facts li {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 0 28px;
    border-left: 1px solid rgba(255, 255, 255, .14);
}

.ec-page .ec-hero-facts li:first-child { padding-left: 0; border-left: 0; }

.ec-page .ec-hero-facts strong {
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 400;
    line-height: 1.1;
    color: #fff;
    white-space: nowrap;
}

.ec-page .ec-hero-facts span {
    font-family: var(--font-mono);
    font-size: .64rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .58);
    white-space: nowrap;
}

/* ==========================================================================
   HOW IT WORKS
   ========================================================================== */
.ec-page .ec-steps-section { background: var(--bg); }

.ec-page .ec-steps {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    border-top: 1px solid var(--line-2);
}

.ec-page .ec-steps li { padding: 32px 28px 8px 0; }

.ec-page .ec-steps li + li { padding-left: 28px; border-left: 1px solid var(--line); }

.ec-page .ec-step-num {
    display: inline-grid;
    place-items: center;
    width: 42px;
    height: 42px;
    margin-bottom: 22px;
    font-family: var(--font-mono);
    font-size: .8rem;
    font-weight: 700;
    letter-spacing: .04em;
    background: var(--chip);
    color: var(--on-chip);
    box-shadow: var(--shadow-blue);
}

.ec-page .ec-steps h3 { font-size: 1.08rem; margin-bottom: 8px; }

.ec-page .ec-steps p { font-size: .92rem; line-height: 1.6; color: var(--body); }

.ec-page .ec-banks { margin-top: 88px; }

.ec-page .ec-banks-title {
    text-align: center;
    font-family: var(--font-mono);
    font-size: .7rem;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 28px;
}

/* ==========================================================================
   ELIGIBILITY + FORM
   ========================================================================== */
.ec-page .ec-apply { background: var(--bg-soft); }

.ec-page .ec-apply-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 540px);
    grid-template-areas:
        "intro form"
        "note  form";
    grid-template-rows: auto 1fr;
    column-gap: 80px;
    row-gap: 48px;
    align-items: start;
}

.ec-page .ec-apply-intro { grid-area: intro; }
.ec-page .ec-apply-form { grid-area: form; }
.ec-page .ec-apply-note { grid-area: note; }

.ec-page .ec-apply-intro .section-title { margin-bottom: 14px; }
.ec-page .ec-apply-intro .section-subtitle { max-width: 460px; }

/* eligibility list */
.ec-page .ec-elig { margin-top: 40px; }

.ec-page .ec-elig h3,
.ec-page .ec-apply-note h3 {
    font-size: 1rem;
    margin-bottom: 14px;
}

.ec-page .ec-elig-list { border-top: 1px solid var(--line-2); }

.ec-page .ec-elig-list li {
    display: grid;
    grid-template-columns: 116px 1fr;
    gap: 16px;
    align-items: baseline;
    padding: 16px 0;
    border-bottom: 1px solid var(--line-2);
}

.ec-page .ec-elig-range {
    font-family: var(--font-display);
    font-size: 1.15rem;
    color: var(--ink);
    white-space: nowrap;
}

.ec-page .ec-elig-text { font-size: .92rem; line-height: 1.55; color: var(--body); }
.ec-page .ec-elig-text i { font-size: .8rem; margin-right: 4px; }
.ec-page .ec-elig-list .is-yes i { color: var(--ink); }
.ec-page .ec-elig-list .is-no i { color: var(--red); }
.ec-page .ec-elig-list .is-yes .ec-elig-text { color: var(--ink-2); }

.ec-page .ec-elig-text a {
    color: var(--ink);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-color: var(--line-2);
}

.ec-page .ec-elig-text a:hover { text-decoration-color: var(--ink); }

/* bank note */
.ec-page .ec-apply-note {
    padding-top: 28px;
    border-top: 1px solid var(--line-2);
}

.ec-page .ec-apply-note p { font-size: .92rem; line-height: 1.65; color: var(--body); margin-bottom: 16px; }

.ec-page .ec-checks { display: grid; gap: 8px; }
.ec-page .ec-checks li { font-size: .88rem; font-weight: 500; color: var(--ink-2); }
.ec-page .ec-checks i { color: var(--muted); font-size: .78rem; margin-right: 8px; }

/* form card */
.ec-page .ec-form-card {
    max-width: none;
    margin: 0;
    padding: 40px;
}

.ec-page .ec-form-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 28px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--line);
}

.ec-page .ec-form-head h3 { font-size: 1.2rem; }

.ec-page .ec-form-head span {
    font-family: var(--font-mono);
    font-size: .66rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--muted);
}

.ec-page .ec-form-card .form-group { margin-bottom: 16px; }

/* hide number spinners */
.ec-page .ec-form-card input[type="number"] { -moz-appearance: textfield; appearance: textfield; }
.ec-page .ec-form-card input[type="number"]::-webkit-inner-spin-button,
.ec-page .ec-form-card input[type="number"]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }

.ec-page .ec-form-card #submitBtn { margin-top: 10px; }
.ec-page .ec-form-card #submitBtn i { font-size: .85em; }

.ec-page .ec-form-card .form-note a { color: var(--ink-2); font-weight: 600; }

.ec-page .ec-form-trust {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px 22px;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--line);
}

.ec-page .ec-form-trust li { font-size: .76rem; color: var(--muted); }
.ec-page .ec-form-trust i { margin-right: 6px; color: var(--ink-2); font-size: .72rem; }

.ec-page .ec-apply-form .ineligible-message { max-width: none; margin: 0; }

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 1024px) {
    .ec-page { --ec-section-y: 88px; }

    .ec-page .ec-hero-facts li { padding: 0 20px; }

    .ec-page .ec-steps { grid-template-columns: repeat(2, 1fr); }
    .ec-page .ec-steps li:nth-child(3) { padding-left: 0; border-left: 0; }
    .ec-page .ec-steps li:nth-child(n+3) { border-top: 1px solid var(--line); margin-top: 24px; }

    .ec-page .ec-apply-grid {
        grid-template-columns: 1fr;
        grid-template-areas: "intro" "form" "note";
        grid-template-rows: auto;
        row-gap: 40px;
        max-width: 620px;
        margin: 0 auto;
    }
}

@media (max-width: 768px) {
    .ec-page { --ec-section-y: 64px; }

    /* hero: content-height on phones, stacked CTA, facts in a 2×2 grid */
    .ec-page .apply-hero.fullscreen.ec-hero {
        min-height: auto;
        padding: calc(var(--nav-h) + 36px) 0 44px;
    }
    .ec-page .ec-hero .apply-hero-subtitle { font-size: .98rem; margin-bottom: 28px; }
    .ec-page .ec-hero-actions { flex-direction: column; align-items: stretch; gap: 18px; margin-bottom: 36px; }
    .ec-page .ec-hero-actions .btn { width: 100%; }
    .ec-page .ec-hero-link { align-self: center; }
    .ec-page .ec-hero-facts { grid-template-columns: 1fr 1fr; row-gap: 20px; padding-top: 24px; }
    .ec-page .ec-hero-facts li,
    .ec-page .ec-hero-facts li:first-child { padding: 0 0 0 14px; border-left: 1px solid rgba(255, 255, 255, .18); }
    .ec-page .ec-hero-facts strong { font-size: 1.15rem; }
    .ec-page .ec-hero-facts span { white-space: normal; }

    /* steps: vertical timeline */
    .ec-page .ec-steps { grid-template-columns: 1fr; border-top: 0; }
    .ec-page .ec-steps li,
    .ec-page .ec-steps li + li,
    .ec-page .ec-steps li:nth-child(n+3) {
        display: grid;
        grid-template-columns: 54px 1fr;
        column-gap: 4px;
        padding: 20px 0;
        margin: 0;
        border-left: 0;
        border-top: 1px solid var(--line);
    }
    .ec-page .ec-steps li:last-child { border-bottom: 1px solid var(--line); }
    .ec-page .ec-step-num { grid-row: span 2; width: 38px; height: 38px; margin: 0; }
    .ec-page .ec-steps h3 { font-size: 1rem; margin-bottom: 4px; }
    .ec-page .ec-steps p { font-size: .88rem; }

    .ec-page .ec-banks { margin-top: 52px; }
    .ec-page .ec-banks-title { font-size: .62rem; margin-bottom: 20px; }

    /* eligibility + form */
    .ec-page .ec-apply-grid { row-gap: 32px; }
    .ec-page .ec-elig { margin-top: 28px; }
    .ec-page .ec-elig-list li { grid-template-columns: 100px 1fr; gap: 12px; padding: 14px 0; }
    .ec-page .ec-elig-range { font-size: 1.05rem; }
    .ec-page .ec-elig-text { font-size: .86rem; }

    .ec-page .ec-form-card { padding: 28px 20px 22px; }
    .ec-page .ec-form-head { margin-bottom: 22px; }
    .ec-page .ec-form-head h3 { font-size: 1.1rem; }
    /* 16px stops iOS Safari zooming into the field on tap */
    .ec-page .ec-form-card .form-group input { font-size: 16px; }
    .ec-page .ec-form-card .form-group > label {
        max-width: calc(100% - 22px);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .ec-page .ec-form-trust { gap: 6px 16px; }
    .ec-page .ec-form-trust li { font-size: .72rem; }

    .ec-page .ec-apply-note h3 { font-size: .98rem; }
    .ec-page .ec-apply-note p { font-size: .88rem; }
}

@media (max-width: 380px) {
    .ec-page .container { padding: 0 16px; }
    .ec-page .ec-elig-list li { grid-template-columns: 1fr; gap: 2px; }
    .ec-page .ec-form-card { padding: 22px 16px 20px; }
}
