.home-pricing-block {
    margin-top: 34px;
    padding-top: 30px;
    border-top: 1px solid var(--border-secondary);
}

.home-pricing-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    flex-wrap: wrap;
    margin: 30px 0 16px;
}

.home-pricing-mode-switch {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px;
    border: 1px solid var(--border-primary);
    border-radius: 999px;
    background: var(--bg-secondary);
    box-shadow: 0 8px 18px var(--shadow-sm);
    position: relative;
    isolation: isolate;
    overflow: visible;
}

body.dark-mode .home-pricing-mode-switch {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.04));
    border-color: rgba(255, 255, 255, 0.18);
    box-shadow: 0 12px 26px rgba(255, 255, 255, 0.08);
}

.home-switch-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 0 16px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--text-tertiary);
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
    cursor: pointer;
    position: relative;
    z-index: 0;
    transition: background-color 0.18s ease, color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.home-switch-btn:hover {
    color: var(--text-primary);
    background: rgba(15, 23, 42, 0.05);
    transform: translateY(-1px);
}

.home-switch-btn.active {
    background: #111;
    color: #fff;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.16);
    z-index: 2;
}

.home-switch-btn.has-floating-badge {
    overflow: visible;
}

.home-switch-badge {
    position: absolute;
    left: 50%;
    top: -30px;
    transform: translateX(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    background: rgba(245, 158, 11, 0.16);
    border: 1px solid rgba(245, 158, 11, 0.24);
    color: #b45309;
    font-size: 11px;
    font-weight: 800;
    line-height: 1;
    white-space: nowrap;
    box-shadow: 0 0 18px rgba(245, 158, 11, 0.18);
    pointer-events: none;
    z-index: 3;
}

body.dark-mode .home-switch-badge {
    color: #fcd34d;
    background: rgba(245, 158, 11, 0.14);
    border-color: rgba(245, 158, 11, 0.28);
    box-shadow: 0 0 22px rgba(245, 158, 11, 0.18);
}

body.dark-mode .home-switch-btn.active {
    background: var(--accent-green);
    color: #06240f;
    box-shadow: 0 10px 20px rgba(34, 197, 94, 0.2);
}

body.dark-mode .home-switch-btn.active:hover {
    background: var(--accent-green);
    color: #06240f;
    box-shadow: 0 12px 22px rgba(34, 197, 94, 0.24);
}

.home-pricing-panel[hidden] {
    display: none !important;
}

.home-plan-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.home-credit-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.home-plan-card,
.home-credit-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100%;
    padding: 22px;
    text-align: center;
    border: 1px solid var(--border-primary);
    border-radius: 22px;
    background: var(--bg-secondary);
    box-shadow: 0 10px 28px var(--shadow-sm);
    overflow: hidden;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.home-plan-card.featured,
.home-credit-card.featured {
    border-color: rgba(34, 197, 94, 0.3);
    box-shadow: 0 14px 32px rgba(34, 197, 94, 0.12), 0 10px 24px var(--shadow-sm);
}

.home-plan-card:hover,
.home-credit-card:hover {
    transform: translateY(-4px);
    border-color: rgba(245, 158, 11, 0.24);
    box-shadow: 0 18px 38px rgba(15, 23, 42, 0.16);
}

.home-plan-card.featured:hover,
.home-credit-card.featured:hover {
    border-color: rgba(34, 197, 94, 0.42);
    box-shadow: 0 18px 42px rgba(34, 197, 94, 0.16), 0 14px 30px rgba(15, 23, 42, 0.14);
}

.home-plan-badge {
    position: absolute;
    top: 18px;
    right: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    border: 1px solid rgba(34, 197, 94, 0.18);
    background: rgba(34, 197, 94, 0.1);
    color: #166534;
    font-size: 11px;
    font-weight: 800;
    line-height: 1;
}

body.dark-mode .home-plan-badge {
    color: #86efac;
}

.home-plan-name,
.home-credit-name {
    color: var(--text-primary);
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.06;
    text-align: center;
}

.home-plan-subtitle,
.home-credit-subtitle {
    margin-top: 10px;
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.65;
    text-align: center;
}

.home-plan-rate,
.home-credit-rate {
    margin-top: 14px;
    color: var(--text-tertiary);
    font-size: 12px;
    font-weight: 700;
    text-align: center;
}

.home-plan-credit-cost {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    margin-top: 18px;
    padding: 16px;
    border: 1px solid var(--border-primary);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.02);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
    transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.home-plan-card:hover .home-plan-credit-cost,
.home-credit-card:hover .home-plan-credit-cost {
    border-color: rgba(245, 158, 11, 0.18);
    background: rgba(245, 158, 11, 0.04);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.home-plan-credit-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: nowrap;
}

.home-plan-credit-cycle {
    color: var(--text-secondary);
    font-size: 11px;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
}

.home-plan-credit-saving {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    padding: 0 12px;
    border-radius: 999px;
    background: rgba(245, 158, 11, 0.14);
    border: 1px solid rgba(245, 158, 11, 0.22);
    color: #f59e0b;
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
    white-space: nowrap;
}

.home-plan-credit-bottom {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
}

.home-plan-credit-label {
    color: #f59e0b;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.4;
}

.home-plan-credit-value {
    color: #f59e0b;
    font-size: 24px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.03em;
}

.home-plan-price-row,
.home-credit-price-row {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
    flex-wrap: wrap;
}

.home-plan-amount,
.home-credit-amount {
    color: var(--text-primary);
    font-size: 44px;
    font-weight: 800;
    letter-spacing: -0.05em;
    line-height: 0.94;
}

.home-plan-cycle,
.home-credit-cycle {
    color: var(--text-tertiary);
    font-size: 14px;
    font-weight: 700;
    line-height: 1.3;
    padding-bottom: 6px;
}

.home-plan-credit-pill,
.home-credit-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    align-self: flex-start;
    min-height: 32px;
    margin-top: 18px;
    padding: 0 12px;
    border-radius: 999px;
    border: 1px solid rgba(34, 197, 94, 0.16);
    background: rgba(34, 197, 94, 0.09);
    color: var(--accent-green);
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
}

.home-plan-features,
.home-credit-features {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    margin: 18px 0 0;
    padding: 0;
}

.home-plan-feature,
.home-credit-feature {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.6;
    text-align: left;
}

.home-plan-feature strong,
.home-credit-pill strong,
.home-plan-credit-pill strong {
    color: var(--text-primary);
}

.home-plan-check {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
    margin-top: 1px;
    border-radius: 999px;
    background: rgba(34, 197, 94, 0.12);
    color: var(--accent-green);
    font-size: 11px;
    font-weight: 900;
    line-height: 1;
}

.home-plan-btn,
.home-credit-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 44px;
    margin-top: 18px;
    padding: 0 16px;
    border: 0;
    border-radius: 12px;
    background: #111;
    color: #fff;
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
    transition: transform 0.18s ease, background-color 0.18s ease, box-shadow 0.18s ease;
    cursor: pointer;
}

.home-plan-card.featured .home-plan-btn,
.home-credit-card.featured .home-credit-btn {
    background: var(--accent-green);
    color: #06240f;
    box-shadow: 0 10px 24px rgba(34, 197, 94, 0.18);
}

.home-plan-btn:hover,
.home-credit-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 22px rgba(15, 23, 42, 0.18);
}

.home-plan-card.featured .home-plan-btn:hover,
.home-credit-card.featured .home-credit-btn:hover {
    background: #34d399;
    box-shadow: 0 14px 28px rgba(34, 197, 94, 0.24);
}

body.dark-mode .home-switch-btn:hover {
    background: rgba(255, 255, 255, 0.08);
}

body.dark-mode .home-switch-btn.active:hover {
    background: var(--accent-green);
}

body.dark-mode .home-plan-card:hover,
body.dark-mode .home-credit-card:hover {
    border-color: rgba(245, 158, 11, 0.22);
    box-shadow: 0 18px 38px rgba(0, 0, 0, 0.34);
}

body.dark-mode .home-plan-card:hover .home-plan-credit-cost,
body.dark-mode .home-credit-card:hover .home-plan-credit-cost {
    border-color: rgba(245, 158, 11, 0.2);
    background: rgba(245, 158, 11, 0.06);
}

body.dark-mode .home-plan-btn:hover,
body.dark-mode .home-credit-btn:hover {
    background: #18181b;
}

.home-billing-footnote {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--border-secondary);
}

.home-billing-footnote-text {
    color: var(--text-tertiary);
    font-size: 12px;
    font-weight: 700;
    line-height: 1.7;
    letter-spacing: 0;
}

@media (max-width: 1180px) {
    .home-plan-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

@media (max-width: 820px) {
    .home-pricing-controls {
        justify-content: center;
    }

    .home-switch-btn {
        flex: 1;
        min-width: 0;
    }

    .home-plan-grid,
    .home-credit-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .home-plan-card,
    .home-credit-card {
        padding: 18px;
        border-radius: 18px;
    }

    .home-plan-amount,
    .home-credit-amount {
        font-size: 38px;
    }

    .home-plan-credit-bottom {
        align-items: flex-start;
        flex-direction: column;
    }

    .home-plan-credit-value {
        font-size: 22px;
    }
}
