/* Top page readability and visual consistency pass */

.tfc-main.tfc-home {
    --tfc-home-gap-y: clamp(56px, 8vw, 92px);
}

/* Reduce heavy separators and make section rhythm explicit */
.tfc-main.tfc-home .tfc-section {
    border-top: 0;
    padding-top: var(--tfc-home-gap-y);
    padding-bottom: var(--tfc-home-gap-y);
}

.tfc-main.tfc-home .tfc-section + .tfc-section {
    border-top: 0;
}

.tfc-main.tfc-home .tfc-section > .tfc-container > h2 {
    margin-top: 0;
    margin-bottom: 0.38em;
    max-width: 32ch;
    font-size: clamp(1.95rem, 4.2vw, 2.62rem);
    line-height: 1.25;
}

.tfc-main.tfc-home .tfc-section > .tfc-container > .tfc-section-kicker {
    margin-bottom: 10px;
}

.tfc-main.tfc-home .tfc-section > .tfc-container > .tfc-section-caption {
    margin-top: 0;
    margin-bottom: 26px;
    max-width: 820px;
    line-height: 1.8;
    color: var(--tfc-muted);
}

.tfc-main.tfc-home #tfc-supporters > .tfc-container > .tfc-section-caption,
.tfc-main.tfc-home #tfc-life > .tfc-container > .tfc-section-caption {
    max-width: 820px;
}

/* Section introductions are editorial signposts; keep them centered.
   Cards remain left-aligned for scanning. */
.tfc-main.tfc-home .tfc-section > .tfc-container > h2,
.tfc-main.tfc-home .tfc-section > .tfc-container > .tfc-section-caption,
.tfc-main.tfc-home .tfc-section > .tfc-container > .tfc-section-kicker {
    margin-right: auto;
    margin-left: auto;
    text-align: center;
}

/* Card blocks: compact but readable */
.tfc-main.tfc-home .tfc-type-card,
.tfc-main.tfc-home .tfc-project-card,
.tfc-main.tfc-home .tfc-story-card,
.tfc-main.tfc-home .tfc-supporter-card,
.tfc-main.tfc-home .tfc-life-data-card,
.tfc-main.tfc-home .tfc-unfinished-grid article,
.tfc-main.tfc-home .tfc-roadmap-type {
    min-height: 0;
    border-radius: 14px;
    border: 1px solid rgba(17, 34, 64, 0.12);
    box-shadow: none;
    background: #ffffff;
}

.tfc-main.tfc-home .tfc-type-card-grid,
.tfc-main.tfc-home .tfc-project-card-grid,
.tfc-main.tfc-home .tfc-story-grid,
.tfc-main.tfc-home .tfc-supporter-grid,
.tfc-main.tfc-home .tfc-life-data-grid,
.tfc-main.tfc-home .tfc-unfinished-grid {
    row-gap: 16px;
    column-gap: 16px;
}

.tfc-main.tfc-home #tfc-unfinished .tfc-unfinished-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.tfc-main.tfc-home .tfc-type-card__copy,
.tfc-main.tfc-home .tfc-type-card__suitable,
.tfc-main.tfc-home .tfc-type-card__keywords {
    line-height: 1.72;
}

.tfc-main.tfc-home .tfc-type-card__copy {
    margin-top: 10px;
    margin-bottom: 14px;
}

.tfc-main.tfc-home .tfc-type-card__suitable,
.tfc-main.tfc-home .tfc-type-card__keywords {
    margin-top: 13px;
}

.tfc-main.tfc-home .tfc-type-card__suitable > strong,
.tfc-main.tfc-home .tfc-type-card__keywords > strong {
    margin-bottom: 4px;
    display: block;
    font-size: .78rem;
    color: var(--tfc-ink-2, #485b70);
}

.tfc-main.tfc-home .tfc-type-card__foot {
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px solid var(--tfc-line);
}

.tfc-main.tfc-home .tfc-section-list-link {
    margin-top: 22px;
}

.tfc-main.tfc-home .tfc-section-list-link .tfc-circle-link,
.tfc-main.tfc-home .tfc-text-link,
.tfc-main.tfc-home .tfc-button {
    min-height: 44px;
}

.tfc-main.tfc-home .tfc-section-list-link .tfc-circle-link {
    width: fit-content;
}

.tfc-main.tfc-home .tfc-home-empty {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 24px;
    align-items: center;
    margin-top: 30px;
    padding: 28px;
    border: 1px solid rgba(17, 34, 64, .12);
    border-radius: 14px;
    background: #fff;
}

.tfc-main.tfc-home .tfc-home-empty--quiet {
    grid-template-columns: 1fr;
    max-width: 820px;
    margin-right: auto;
    margin-left: auto;
    background: #f8fafc;
}

.tfc-main.tfc-home .tfc-home-empty--projects {
    border-color: rgba(0, 35, 135, .16);
    background: linear-gradient(135deg, #fff 0%, #f7f9ff 100%);
}

.tfc-main.tfc-home .tfc-home-empty--support {
    max-width: 920px;
    margin-right: auto;
    margin-left: auto;
}

.tfc-main.tfc-home .tfc-home-empty__label {
    display: inline-flex;
    margin: 0 0 10px;
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(0, 35, 135, .08);
    color: var(--tfc-color-heading);
    font-size: .76rem;
    font-weight: 800;
    line-height: 1.35;
}

.tfc-main.tfc-home .tfc-home-empty h3 {
    margin: 0 0 10px;
    color: var(--tfc-color-heading);
    font-size: clamp(1.25rem, 2.1vw, 1.65rem);
    line-height: 1.45;
}

.tfc-main.tfc-home .tfc-home-empty p:not(.tfc-home-empty__label) {
    max-width: 72ch;
    margin: 0;
    color: var(--tfc-color-text-secondary);
    font-size: .95rem;
    line-height: 1.85;
}

.tfc-main.tfc-home .tfc-home-empty__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: center;
    justify-content: flex-end;
}

.tfc-main.tfc-home .tfc-home-empty__actions .tfc-button {
    min-width: 164px;
    justify-content: center;
}

.tfc-main.tfc-home .tfc-life-data-grid--guide {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.tfc-main.tfc-home #tfc-roadmap .tfc-roadmap-type-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    margin-top: clamp(30px, 4vw, 44px);
}

.tfc-main.tfc-home #tfc-roadmap .tfc-roadmap-type {
    --tfc-route-color: var(--tfc-color-heading);
    display: grid;
    grid-template-columns: minmax(180px, .78fr) minmax(0, 2.2fr) auto;
    gap: clamp(22px, 3.2vw, 42px);
    align-items: center;
    padding: clamp(24px, 3vw, 32px);
    border: 1px solid rgba(17, 34, 64, .12);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 14px 36px rgba(20, 43, 76, .06);
}

.tfc-main.tfc-home #tfc-roadmap .tfc-roadmap-type:last-child {
    border-bottom: 1px solid rgba(17, 34, 64, .12);
}

.tfc-main.tfc-home #tfc-roadmap .tfc-roadmap-type__intro {
    min-width: 0;
}

.tfc-main.tfc-home #tfc-roadmap .tfc-roadmap-type__intro h3 {
    margin: 0 0 8px;
    color: var(--tfc-route-color);
    font-size: clamp(1.45rem, 2.2vw, 1.9rem);
    line-height: 1.25;
}

.tfc-main.tfc-home #tfc-roadmap .tfc-roadmap-type__intro p {
    margin: 0;
    color: var(--tfc-color-text-secondary);
    font-size: .88rem;
    line-height: 1.75;
}

.tfc-main.tfc-home #tfc-roadmap .tfc-roadmap-type__steps {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    margin: 0;
    padding: 0;
    counter-reset: tfc-route-step;
    list-style: none;
}

.tfc-main.tfc-home #tfc-roadmap .tfc-roadmap-type__steps li {
    position: relative;
    display: grid;
    min-height: 92px;
    align-content: start;
    gap: 10px;
    margin: 0;
    padding: 18px 14px 16px;
    border: 1px solid color-mix(in srgb, var(--tfc-route-color) 18%, #dfe5ef);
    border-radius: 10px;
    color: var(--tfc-color-text);
    background: color-mix(in srgb, var(--tfc-route-color) 4%, #fff);
    font-size: .86rem;
    font-weight: 800;
    line-height: 1.55;
    text-align: left;
    counter-increment: tfc-route-step;
}

.tfc-main.tfc-home #tfc-roadmap .tfc-roadmap-type__steps li::before {
    position: static;
    display: inline-grid;
    width: auto;
    height: auto;
    place-items: initial;
    border: 0;
    border-radius: 0;
    color: var(--tfc-route-color);
    background: transparent;
    content: "STEP " counter(tfc-route-step, decimal-leading-zero);
    font-size: .66rem;
    font-weight: 800;
    letter-spacing: .04em;
    line-height: 1.2;
    transform: none;
}

.tfc-main.tfc-home #tfc-roadmap .tfc-roadmap-type__steps li:not(:last-child)::after {
    top: 50%;
    right: -13px;
    left: auto;
    z-index: 2;
    width: 18px;
    height: 1px;
    background: color-mix(in srgb, var(--tfc-route-color) 28%, #cfd8e7);
    transform: translateY(-50%);
}

.tfc-main.tfc-home #tfc-roadmap .tfc-roadmap-type > .tfc-circle-link {
    justify-self: end;
    min-height: 44px;
    color: var(--tfc-route-color);
    font-size: .86rem;
    white-space: nowrap;
}

.tfc-main.tfc-home #tfc-roadmap .tfc-roadmap-type > .tfc-circle-link .tfc-circle-link__icon {
    background: color-mix(in srgb, var(--tfc-route-color) 10%, #fff);
}

@media (max-width: 1023px) {
    .tfc-main.tfc-home #tfc-unfinished .tfc-unfinished-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .tfc-main.tfc-home .tfc-home-empty {
        grid-template-columns: 1fr;
    }

    .tfc-main.tfc-home .tfc-home-empty__actions {
        justify-content: flex-start;
    }

    .tfc-main.tfc-home .tfc-life-data-grid--guide {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .tfc-main.tfc-home #tfc-roadmap .tfc-roadmap-type {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .tfc-main.tfc-home #tfc-roadmap .tfc-roadmap-type > .tfc-circle-link {
        justify-self: start;
    }
}

/* Make FAQ feel tighter and clearer */
.tfc-main.tfc-home #tfc-faq > .tfc-container > .tfc-section-kicker,
.tfc-main.tfc-home #tfc-faq > .tfc-container > h2 {
    display: block;
    width: 100%;
    margin-right: auto;
    margin-left: auto;
    text-align: center;
}

.tfc-main.tfc-home #tfc-faq > .tfc-container > .tfc-section-kicker {
    margin-bottom: 8px;
    color: var(--tfc-color-text-secondary);
    font-size: .82rem;
    font-weight: 800;
    letter-spacing: .12em;
    line-height: 1.35;
}

.tfc-main.tfc-home .tfc-faq {
    border-color: rgba(16, 34, 64, 0.12);
}

.tfc-main.tfc-home .tfc-faq summary {
    min-height: 56px;
    padding-top: 14px;
    padding-right: 52px;
    padding-bottom: 14px;
    font-size: 1rem;
    font-weight: 700;
}

.tfc-main.tfc-home #tfc-faq .tfc-faq summary {
    padding: 14px 48px 14px 0 !important;
}

.tfc-main.tfc-home .tfc-faq summary::before,
.tfc-main.tfc-home .tfc-faq summary::after {
    color: var(--tfc-ink);
}

.tfc-main.tfc-home .tfc-faq .tfc-faq__panel {
    padding-top: 0;
    padding-right: 0;
    padding-bottom: 20px;
    padding-left: 0;
}

.tfc-main.tfc-home .tfc-faq .tfc-faq__answer {
    margin-top: -4px;
    padding-left: 0;
    line-height: 1.78;
}

/* Hero CTA spacing for top page */
.tfc-main.tfc-home .tfc-home-hero__actions {
    margin-top: 20px;
    gap: 10px;
}

.tfc-main.tfc-home .tfc-home-hero__actions .tfc-button {
    min-height: 52px;
    padding-inline: 20px;
}

/* Sticky consult keep tappable area */
.tfc-main.tfc-home .tfc-sticky-consult {
    padding: 12px 14px;
    gap: 12px;
}

.tfc-main.tfc-home .tfc-sticky-consult a {
    min-height: 40px;
    padding-inline: 18px;
}

@media (max-width: 767px) {
    .tfc-main.tfc-home .tfc-section {
        padding-top: 56px;
        padding-bottom: 56px;
    }

    .tfc-main.tfc-home .tfc-section > .tfc-container > h2 {
        font-size: clamp(1.75rem, 9vw, 2.1rem);
    }

    .tfc-main.tfc-home .tfc-type-card,
    .tfc-main.tfc-home .tfc-project-card,
    .tfc-main.tfc-home .tfc-story-card,
    .tfc-main.tfc-home .tfc-supporter-card,
    .tfc-main.tfc-home .tfc-life-data-card,
    .tfc-main.tfc-home .tfc-unfinished-grid article,
    .tfc-main.tfc-home .tfc-roadmap-type {
        padding: 18px 16px;
    }

    .tfc-main.tfc-home .tfc-type-card-grid,
    .tfc-main.tfc-home .tfc-project-card-grid,
    .tfc-main.tfc-home .tfc-story-grid,
    .tfc-main.tfc-home .tfc-supporter-grid,
    .tfc-main.tfc-home .tfc-life-data-grid,
    .tfc-main.tfc-home .tfc-unfinished-grid {
        row-gap: 12px;
        column-gap: 0;
    }

    .tfc-main.tfc-home .tfc-section-list-link {
        margin-top: 18px;
    }

    .tfc-main.tfc-home .tfc-home-empty {
        margin-top: 24px;
        padding: 20px;
    }

    .tfc-main.tfc-home .tfc-home-empty__actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .tfc-main.tfc-home .tfc-home-empty__actions .tfc-button,
    .tfc-main.tfc-home .tfc-home-empty__actions .tfc-circle-link {
        width: 100%;
    }

    .tfc-main.tfc-home .tfc-life-data-grid--guide {
        grid-template-columns: 1fr;
    }

    .tfc-main.tfc-home #tfc-roadmap .tfc-roadmap-type-grid {
        gap: 12px;
        margin-top: 28px;
    }

    .tfc-main.tfc-home #tfc-roadmap .tfc-roadmap-type {
        display: grid;
        grid-template-columns: 1fr !important;
        padding: 20px;
        border-radius: 12px;
    }

    .tfc-main.tfc-home #tfc-roadmap .tfc-roadmap-type__intro,
    .tfc-main.tfc-home #tfc-roadmap .tfc-roadmap-type__steps,
    .tfc-main.tfc-home #tfc-roadmap .tfc-roadmap-type > .tfc-circle-link {
        grid-column: 1 / -1 !important;
    }

    .tfc-main.tfc-home #tfc-roadmap .tfc-roadmap-type__intro h3 {
        font-size: 1.45rem;
    }

    .tfc-main.tfc-home #tfc-roadmap .tfc-roadmap-type__intro p {
        font-size: .84rem;
    }

    .tfc-main.tfc-home #tfc-roadmap .tfc-roadmap-type__steps {
        grid-template-columns: 1fr;
        gap: 10px;
        margin-top: 0;
    }

    .tfc-main.tfc-home #tfc-roadmap .tfc-roadmap-type__steps li {
        grid-template-columns: 74px minmax(0, 1fr);
        min-height: 0;
        gap: 14px;
        align-items: center;
        padding: 14px;
        font-size: .95rem;
    }

    .tfc-main.tfc-home #tfc-roadmap .tfc-roadmap-type__steps li::before {
        width: 62px;
        color: var(--tfc-route-color);
        font-size: .7rem;
        line-height: 1.3;
    }

    .tfc-main.tfc-home #tfc-roadmap .tfc-roadmap-type__steps li:not(:last-child)::after {
        top: auto;
        bottom: -11px;
        left: 44px;
        width: 1px;
        height: 12px;
        transform: none;
    }

    .tfc-main.tfc-home #tfc-roadmap .tfc-roadmap-type > .tfc-circle-link {
        margin-top: 0;
        font-size: .9rem;
    }

    .tfc-main.tfc-home #tfc-unfinished .tfc-unfinished-grid {
        grid-template-columns: 1fr;
    }

    .tfc-main.tfc-home .tfc-faq summary {
        min-height: 52px;
        padding-right: 44px;
        font-size: .98rem;
    }
}
