/* Shared Card Page Styles - Update this file to change all card pages */

/* CSS Variables for consistent theming */
:root {
    --warm-gray-300: #d6d3d1;
    --white: #ffffff;
    --primary-gold: #f59e0b;
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
}

/* Card page-specific styles */
.card-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 0 2rem 0;
    display: flex;
    flex-direction: column;
}

/* Button container styles */
.button-container {
    display: flex;
    flex-direction: row;
    justify-content: center;
    gap: 1rem;
    padding: 1rem;
    margin-bottom: 1rem;
}

@media (max-width: 768px) {
    .card-container {
        padding: 1rem 0 1rem 0;
    }
    
    .button-container {
        flex-direction: column-reverse;
        margin-bottom: 0.5rem;
        padding: 0.5rem;
    }
}

/* Header styles removed - now using dynamically loaded header from header.html */
.header-removed {
    display: none;
}

.cta-nav:hover {
    color: #047857 !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(254, 243, 199, 0.6);
    background: linear-gradient(135deg, #fde68a 0%, #fef3c7 100%);
}

.hero-section {
    padding: 3rem 2rem;
    background: linear-gradient(135deg, #047857 0%, #059669 100%);
    color: white;
    margin: -1rem -2rem 1.5rem -2rem;
    overflow: hidden;
    width: 100dvw; /* iOS 26 Safari fix: use dynamic viewport width */
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50dvw; /* iOS 26 Safari fix: use dynamic viewport width */
    margin-right: -50dvw; /* iOS 26 Safari fix: use dynamic viewport width */
    contain: layout style; /* Prevent layout overflow on iOS Safari */
}

/* TIP BOX STYLES */
.tip-box {
    background: #f8fafc !important;
    border-left: 3px solid #059669 !important;
    padding: 1rem !important;
    margin: 1.5rem 0 !important;
    border-radius: 0 8px 8px 0 !important;
    text-align: center !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-start !important;
    align-items: center !important;
}



.tip-box h3 {
    font-weight: 600 !important;
    color: #059669 !important;
    font-size: 0.75rem !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    margin: 0 0 0.5rem 0 !important;
}

.tip-box p {
    color: #475569 !important;
    font-size: 0.9rem !important;
    line-height: 1.4 !important;
    font-style: italic !important;
    text-align: center !important;
    max-width: 100% !important;
    margin: 0 !important;
}

/* FEATURES SECTION STYLES */
.features-section {
    margin: 1.5rem 0;
    padding: 0 1rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

.feature-card {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    border: 1px solid #f1f5f9;
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
    border-color: #e2e8f0;
}

.feature-header {
    margin-bottom: 1.5rem;
    text-align: center;
}

.feature-header h3 {
    font-size: 1.5rem;
    color: #1e293b;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.feature-subtitle {
    color: #64748b;
    font-size: 0.95rem;
    margin: 0;
}

/* EARNING RATES STYLES */
.earning-categories {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.earning-category {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.category-name {
    font-weight: 600;
    color: #334155;
    font-size: 0.95rem;
}

.earning-rate {
    background: linear-gradient(135deg, #059669 0%, #10b981 100%);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.9rem;
}

/* PERKS STYLES */
.perks-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.perk-item {
    display: flex;
    align-items: center;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    transition: all 0.2s ease;
}

.perk-item:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.perk-text {
    font-weight: 500;
    color: #334155;
    font-size: 1rem;
    line-height: 1.4;
}

/* PROTECTIONS STYLES */
.protections-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.protection-item {
    display: flex;
    align-items: center;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    transition: all 0.2s ease;
}

.protection-item:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.protection-text {
    font-weight: 500;
    color: #334155;
    font-size: 1rem;
    line-height: 1.4;
}

/* RESPONSIVE DESIGN FOR FEATURES */
@media (max-width: 768px) {
    .features-section {
        margin: 1rem 0;
        padding: 0 0.5rem;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .feature-card {
        padding: 1.5rem;
    }
    
    .feature-header h3 {
        font-size: 1.3rem;
        margin-bottom: 0.5rem;
    }
    
    .feature-subtitle {
        font-size: 0.9rem;
    }
    
    .perk-item,
    .protection-item {
        padding: 0.875rem;
    }
    
    .perk-text,
    .protection-text {
        font-size: 0.95rem;
    }
    
    .earning-category {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
    max-width: 1000px;
    margin: 0 auto;
}

/* NEW HERO LAYOUT STYLES */
.hero-text {
    text-align: left;
    color: white;
}

.hero-text h1 {
    font-size: 3rem;
    margin-bottom: 0.5rem;
    font-weight: 800;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    word-break: keep-all;
    hyphens: none;
    -webkit-hyphens: none;
    -moz-hyphens: none;
    -ms-hyphens: none;
    overflow-wrap: break-word;
}

.hero-text .hero-subtitle {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 2rem;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.hero-text .hero-card-container {
    display: flex;
    justify-content: flex-start;
    margin-top: 1rem;
}

.hero-text .hero-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.hero-card-image {
    width: 320px;
    height: 200px;
    object-fit: cover;
    border-radius: 16px;
    box-shadow: 0 25px 50px rgba(0,0,0,0.4);
    transform: rotate(-5deg);
    transition: transform 0.3s ease;
    filter: brightness(1.1) contrast(1.1);
}

.hero-card-image:hover {
    transform: rotate(0deg) scale(1.05);
    box-shadow: 0 30px 60px rgba(0,0,0,0.5);
}

.hero-card-fallback {
    width: 280px;
    height: 180px;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
    transform: rotate(-5deg);
    position: relative;
    overflow: hidden;
}

.card-preview {
    width: 100%;
    height: 100%;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    color: white;
}

.card-chip {
    width: 45px;
    height: 35px;
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    border-radius: 8px;
    align-self: flex-start;
}

.card-logo {
    font-size: 1.4rem;
    font-weight: 700;
    text-align: center;
}

.card-name {
    font-size: 1.1rem;
    font-weight: 600;
    text-align: center;
    letter-spacing: 1px;
}

.hero-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100%;
}

.info-section {
    background: rgba(255, 255, 255, 0.15);
    padding: 2rem;
    border-radius: 20px;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    position: relative;
    overflow: hidden;
}

.info-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 0px;
    background: transparent;
    border-radius: 20px 20px 0 0;
}

.info-row {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 1.5rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    align-items: center;
}



.info-row:last-child {
    border-bottom: none;
}

.info-label {
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.info-value {
    font-weight: 500;
    color: white;
    font-size: 0.85rem;
    line-height: 1.3;
}

/* RESPONSIVE DESIGN FOR NEW HERO LAYOUT */
@media (max-width: 768px) {
    .hero-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .hero-text .hero-card-container {
        justify-content: center;
        margin-top: 1.5rem;
        order: -1;
        margin-bottom: 2rem;
    }
    
    .hero-info {
        order: 1;
        margin-bottom: 0;
    }
    
    .info-section {
        padding: 1.5rem;
    }
    
    .info-row {
        grid-template-columns: 1fr;
        gap: 0.5rem;
        text-align: center;
        padding: 1rem 0;
    }
    
    .info-label {
        font-size: 0.85rem;
        margin-bottom: 0.25rem;
    }
    
    .info-value {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .info-section {
        padding: 1.25rem;
    }
    
    .info-row {
        padding: 0.75rem 0;
    }
}

.card-details {
    text-align: center;
    background: rgba(255, 255, 255, 0.1);
    padding: 1.5rem;
    border-radius: 12px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.annual-fee-badge {
    background: #dc2626;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 1rem;
    display: inline-block;
}

.card-highlights {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.highlight-item {
    font-size: 0.9rem;
    color: white;
    font-weight: 600;
    padding: 0.25rem 0;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.card-section {
    background: white;
    border-radius: 16px;
    padding: 3rem;
    box-shadow: none;
    margin: 2rem 0;
}

.card-section h2 {
    color: #1e293b;
    margin-bottom: 2rem;
    font-size: 2.2rem;
    text-align: center;
}

.credit-item {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 1rem;
    align-items: center;
    padding: 1.25rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    margin-bottom: 0.75rem;
    background: #fafbfc;
    transition: all 0.2s ease;
}

.credit-item:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.credit-item:last-child {
    margin-bottom: 0;
}

.credit-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.credit-name {
    font-weight: 600;
    color: #1e293b;
    font-size: 0.95rem;
}

.credit-description {
    color: #64748b;
    font-size: 0.85rem;
}

.credit-value {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    min-width: 80px;
    justify-content: center;
}

.credit-value .currency {
    color: #059669;
    font-weight: 600;
    font-size: 0.9rem;
}

.credit-value input {
    width: 60px;
    padding: 0.5rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #1e293b;
    text-align: center;
    background: white;
    transition: border-color 0.2s ease;
}

.credit-value input:focus {
    outline: none;
    border-color: #059669;
    box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.1);
}

.credit-value input::-webkit-inner-spin-button,
.credit-value input::-webkit-outer-spin-button {
    opacity: 1;
}

.credit-toggle {
    position: relative;
    width: 60px;
    height: 30px;
}

.credit-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #cbd5e1;
    transition: .4s;
    border-radius: 30px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .toggle-slider {
    background-color: #f59e0b;
}

input:checked + .toggle-slider:before {
    transform: translateX(30px);
}

.results-section {
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    border: 2px solid #667eea;
    border-radius: 16px;
    padding: 2rem;
    margin-top: 2rem;
    text-align: center;
}

.total-credits {
    font-size: 1.5rem;
    color: #10b981;
    margin-bottom: 1rem;
}

.effective-fee {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 1rem;
}

.effective-fee.positive {
    color: #dc2626;
}

.effective-fee.negative {
    color: #10b981;
}

.fee-interpretation {
    font-size: 1.1rem;
    color: #64748b;
    font-style: italic;
}

/* MODERN NAVIGATION BUTTONS */
.navigation-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin: 3rem 0;
    flex-wrap: wrap;
}

.nav-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.875rem 1.5rem;
    border-radius: 25px;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    transition: all 0.3s ease;
    min-width: 140px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.nav-btn.secondary {
    background: #f1f5f9;
    color: #64748b;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.nav-btn.secondary:hover {
    background: #e2e8f0;
    color: #475569;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.nav-btn.primary {
    background: linear-gradient(135deg, #059669 0%, #10b981 100%);
    color: white;
    border: none;
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.3);
    font-weight: 700;
}

.nav-btn.primary:hover {
    background: linear-gradient(135deg, #047857 0%, #059669 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(5, 150, 105, 0.4);
}

/* RESPONSIVE DESIGN FOR NAVIGATION */
@media (max-width: 768px) {
    .navigation-buttons {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }
    
    .nav-btn {
        min-width: 200px;
        padding: 1rem 1.5rem;
    }
}

.callout-box {
    background: linear-gradient(135deg, #fef3c7 0%, #fed7aa 100%);
    border-left: 4px solid #f59e0b;
    padding: 1.5rem;
    border-radius: 8px;
    margin: 2rem 0;
}

.callout-box h4 {
    color: #92400e;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.callout-box p {
    color: #92400e;
    margin: 0;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .hero-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }

    .hero-text {
        text-align: center;
    }

    .hero-card-image {
        width: 240px;
        height: 150px;
    }

    .hero-card-fallback {
        width: 240px;
        height: 150px;
    }

    .card-container {
        padding: 0 1rem 2rem 1rem;
    }

    .hero-section {
        margin: 0 -1rem 1.5rem -1rem;
        padding: 2rem 1rem;
        width: 100dvw; /* iOS 26 Safari fix: use dynamic viewport width */
        position: relative;
        left: 50%;
        right: 50%;
        margin-left: -50dvw; /* iOS 26 Safari fix: use dynamic viewport width */
        margin-right: -50dvw; /* iOS 26 Safari fix: use dynamic viewport width */
        contain: layout style; /* Prevent layout overflow on iOS Safari */
    }
    
    .credit-item {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }

    .hero-section h1 {
        font-size: 2rem;
    }
} 

/* CALCULATOR SECTION - Modern, clean design */
.calculator-section {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    margin: 2rem -2rem;
    overflow: hidden;
    border: 1px solid #f1f5f9;
}

/* Mobile spacing for calculator section */
@media (max-width: 768px) {
    .calculator-section {
        margin: 1rem -1rem;
        border-radius: 0;
    }
}

.calculator-header {
    background: transparent;
    padding: 1rem;
    border-radius: 12px;
    margin: 0;
    color: #1e293b;
}

.calculator-header h2 {
    margin: 0 0 0.5rem 0;
    font-size: 1.8rem;
    font-weight: 700;
    color: #1f2937;
}

.calculator-header p {
    margin: 0;
    color: #475569;
    font-size: 1rem;
    line-height: 1.5;
}

.calculator-toggle-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 1rem auto 0 auto;
    gap: 0.5rem;
}

.calculator-content {
    padding: 2rem;
}

/* MODERN TABLE LAYOUT */
.calculator-table {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    margin-bottom: 2rem;
}

.table-header {
    display: grid;
    grid-template-columns: 3fr 1fr 1fr;
    gap: 1.5rem;
    padding: 1.25rem 1.5rem;
    background: #f8fafc;
    border-bottom: none;
    font-weight: 600;
    color: #374151;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.header-credit {
    text-align: left;
}

.header-toggle,
.header-value {
    text-align: center;
}

.table-row {
    display: grid;
    grid-template-columns: 3fr 1fr 1fr;
    gap: 1.5rem;
    padding: 1.5rem;
    border-bottom: 1px solid #f1f5f9;
    align-items: center;
    transition: background-color 0.2s ease;
}

.table-row:hover {
    background: #fafbfc;
}

.table-row:last-child {
    border-bottom: 1px solid #f1f5f9;
}

.credit-info {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    text-align: left;
}

.credit-name {
    font-weight: 600;
    color: #1e293b;
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.practicality-meter {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
    position: relative;
    cursor: help;
    flex-shrink: 0;
}

.practicality-meter[data-level="easy"] {
    background: #10b981;
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
}

.practicality-meter[data-level="moderate"] {
    background: #f59e0b;
    box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.2);
}

.practicality-meter[data-level="hard"] {
    background: #ef4444;
    box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.2);
}

/* Modern Collapsible Section Design */
.collapsible-section {
    margin: 1rem 0;
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    border: 1px solid #e5e7eb;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.collapsible-section:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    transform: translateY(-1px);
}

.section-container {
    position: relative;
}

.calculator-header {
    position: relative;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
    border: none;
    width: 100%;
    text-align: left;
    padding: 1rem;
}

.calculator-header:focus {
    outline: none;
}

.section-header-content {
    padding-right: 0;
}

.section-header-content h2 {
    margin-bottom: 1rem;
}

.section-header-content p {
    margin: 0 0 1rem 0;
    line-height: 1.6;
    color: #4b5563;
    padding-right: 0;
}

.calculator-toggle-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 1rem auto 0 auto;
    gap: 0.5rem;
}

.section-toggle-icon {
    position: relative;
    color: #059669;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    width: 32px;
    height: 32px;
    background: #f0fdf4;
    border: 2px solid #059669;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(5, 150, 105, 0.2);
    flex-shrink: 0;
}

.toggle-tip {
    font-size: 0.8rem;
    color: #059669;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.section-toggle-icon svg {
    width: 20px;
    height: 20px;
    stroke-width: 2.5;
}

.calculator-header[aria-expanded="false"] .section-toggle-icon {
    transform: rotate(180deg);
}

.calculator-header[aria-expanded="true"] .section-toggle-icon {
    transform: rotate(0deg);
}

.calculator-content {
    overflow: visible; /* Changed from hidden to visible to ensure content shows */
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    max-height: none; /* Remove max-height constraint when expanded */
    height: auto; /* Allow natural height expansion */
    opacity: 1;
    padding-bottom: 2rem;
}

.calculator-content.collapsed {
    max-height: 0;
    overflow: hidden; /* Hide overflow when collapsed */
    opacity: 0;
    margin: 0;
    padding: 0;
}

/* Section separator for multiple sections */
.collapsible-section + .collapsible-section {
    margin-top: 1.5rem;
}

/* Responsive improvements */
@media (max-width: 768px) {
    .collapsible-section {
        margin: 1rem 0;
        border-radius: 12px;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    }
    
    .section-toggle-icon {
        top: auto; /* prevent offsetting on mobile */
        right: auto; /* prevent offsetting on mobile */
        margin: 0 auto; /* center horizontally */
        width: 32px;
        height: 32px;
    }
    
    .section-toggle-icon svg {
        width: 24px;
        height: 24px;
    }
    
    .calculator-header {
        padding: 1rem;
        border-radius: 12px;
        margin: 0;
    }
    
    .calculator-header:hover {
        transform: none;
        box-shadow: none;
        background: transparent;
    }
    
    .calculator-header:hover .section-toggle-icon {
        background: #f0fdf4;
        color: #059669;
        transform: none;
        box-shadow: 0 2px 8px rgba(5, 150, 105, 0.2);
    }
    
    .calculator-header[aria-expanded="false"]:hover .section-toggle-icon {
        /* Keep pointing up while collapsed, even on hover */
        transform: rotate(180deg);
    }
    
    .calculator-header[aria-expanded="true"]:hover .section-toggle-icon {
        transform: rotate(0deg);
    }
    
    .calculator-header:active {
        transform: none;
        transition: none;
    }
    
    .section-header-content br {
        display: none;
    }
    
    .section-header-content p {
        margin-bottom: 0.75rem;
    }
    
    .section-header-content p:last-child {
        margin-bottom: 0;
    }
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
    .collapsible-section,
    .calculator-header,
    .section-toggle-icon,
    .calculator-content {
        transition: none;
    }
}

/* Focus indicators for keyboard navigation */
.calculator-header:focus-visible {
    outline: none;
}

/* Enhanced clickability and visual feedback */
.calculator-header {
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

/* Practical Recommendation Section */
.recommendation-section {
    margin: 1rem 0;
    padding: 0;
}

/* Mobile spacing adjustments */
@media (max-width: 768px) {
    .recommendation-section {
        margin: 1rem 0;
        padding: 0;
    }
}

.recommendation-header { display: none; }

.recommendation-content {
    background: #ffffff;
    padding: 1.5rem;
    border-radius: 16px;
    border: 1px solid #e5e7eb;
    border-top: none;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.recommendation-list {
    margin: 1.5rem 0;
    padding-left: 0;
    list-style: none;
}

.recommendation-list li {
    padding: 0.75rem 0;
    padding-left: 2rem;
    position: relative;
    border-bottom: 1px solid #f1f5f9;
}

.recommendation-list li:last-child {
    border-bottom: none;
}

.recommendation-list li::before {
    content: "✓";
    position: absolute;
    left: 0;
    top: 0.75rem;
    color: #059669;
    font-weight: bold;
    font-size: 1.1rem;
}

.recommendation-highlight {
    background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%);
    border: 1px solid #bbf7d0;
    border-radius: 12px;
    padding: 1.5rem;
    margin-top: 2rem;
    color: #166534;
    font-size: 1.05rem;
    text-align: center;
}

/* PERKS AND PROTECTIONS SIDE-BY-SIDE LAYOUT */
/* This layout ensures both Perks and Protections containers are always the same height */
.perks-protections-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin: 1rem 0;
    align-items: stretch; /* Ensures equal height */
}

.perks-protections-wrapper .recommendation-section {
    margin: 0;
    height: 100%; /* Takes full height of grid cell */
    display: flex;
    flex-direction: column;
}

.perks-protections-wrapper .recommendation-content {
    flex: 1; /* Takes remaining space */
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Mobile responsiveness for recommendation section */
@media (max-width: 768px) {
    .perks-protections-wrapper {
        grid-template-columns: 1fr;
        gap: 0.5rem;
        margin: 0 0 0.5rem 0;
        align-items: stretch; /* Maintain equal height behavior */
    }
    .recommendation-section {
        margin: 0;
        padding: 0;
        height: auto; /* Allow natural height on mobile */
        display: block; /* Reset flex behavior on mobile */
    }
    
    .perks-protections-wrapper .recommendation-section {
        margin: 0;
        padding: 0;
    }
    
    .perks-protections-wrapper .recommendation-content {
        height: auto; /* Allow natural height on mobile */
        flex: none; /* Reset flex behavior on mobile */
    }
    
    .recommendation-header { display: none; }
    
    .recommendation-content {
        padding: 1rem !important;
        border-radius: 12px !important;
        margin: 0.5rem 0.35% 1rem 0.35% !important;
        width: 99.3% !important;
        max-width: 99.3% !important;
        box-sizing: border-box;
        position: static;
        left: auto; right: auto;
        box-shadow: none !important;
    }

    /* Match calculator mobile typography */
    .recommendation-content h2 { font-size: 1.4rem; margin-bottom: 0.75rem; }
    .recommendation-text { font-size: 0.85rem; }
    .recommendation-list li { font-size: 0.85rem; }
    .recommendation-highlight { font-size: 0.9rem; }
    
    .recommendation-list li {
        padding: 0.5rem 0;
        padding-left: 1.5rem;
        font-size: 0.9rem;
    }
    
    .recommendation-list li::before {
        top: 0.5rem;
        font-size: 1rem;
    }
    
    .recommendation-highlight {
        padding: 1rem;
        font-size: 0.95rem;
        margin-top: 1.5rem;
    }
}

/* Practicality Legend */

.practicality-legend {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.9);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.legend-dot.easy {
    background: #10b981;
}

.legend-dot.moderate {
    background: #f59e0b;
}

.legend-dot.hard {
    background: #ef4444;
}

.credit-description {
    color: #64748b;
    font-size: 0.9rem;
    line-height: 1.6;
    margin: 0;
}

.value-column {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    min-height: 60px;
}

.value-input {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    height: 0;
    overflow: hidden;
    background: transparent;
    position: relative;
}

.value-input.active {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
    height: auto;
    overflow: visible;
    background: transparent;
}

/* JavaScript-controlled visibility */
.value-input[style*="display: flex"] {
    /* Keep layout when JS sets display:flex, but let .active control animation */
    height: auto !important;
    overflow: visible !important;
    background: transparent !important;
}

.value-input[style*="display: none"] {
    opacity: 0 !important;
    transform: scale(0.8) !important;
    pointer-events: none !important;
    height: 0 !important;
    overflow: hidden !important;
}

.value-input input {
    width: 90px;
    padding: 0.875rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    color: #1e293b;
    text-align: center;
    background: white;
    box-shadow: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: inherit;
    outline: none;
}

.value-input input:hover {
    border-color: #cbd5e1;
    box-shadow: 
        0 4px 8px rgba(0,0,0,0.08),
        inset 0 1px 0 rgba(255,255,255,0.9);
    transform: translateY(-1px);
}

.value-input input:focus {
    outline: none;
    border-color: #059669;
    box-shadow: 
        0 0 0 4px rgba(5, 150, 105, 0.15),
        0 4px 12px rgba(5, 150, 105, 0.2),
        inset 0 1px 0 rgba(255,255,255,0.9);
    transform: translateY(-2px);
}

.value-input input::-webkit-inner-spin-button,
.value-input input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
    display: none;
}

.value-input input {
    -moz-appearance: textfield;
}

.value-input .currency {
    color: #059669;
    font-weight: 700;
    font-size: 1.1rem;
    opacity: 0;
    transition: opacity 0.3s ease;
    position: absolute;
    left: -1.2rem;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    pointer-events: none;
    background: transparent;
}

.value-input.active .currency {
    opacity: 1;
}

.value-placeholder {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 90px;
    padding: 0.875rem 1rem;
    color: #9ca3af;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    opacity: 1;
    transition: opacity 0.3s ease;
    pointer-events: none;
    background: transparent;
    border: none;
    box-shadow: none;
    z-index: 1;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.value-input.active + .value-placeholder {
    opacity: 0;
    background: transparent;
}

/* JavaScript-controlled placeholder visibility */
.value-placeholder[style*="display: block"] {
    opacity: 1 !important;
    visibility: visible !important;
}

.value-placeholder[style*="display: none"] {
    opacity: 0 !important;
    visibility: hidden !important;
}

.toggle-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
}

.credit-toggle {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 28px;
}

.credit-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #d1d5db;
    transition: 0.2s;
    border-radius: 28px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: 0.2s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

input:checked + .toggle-slider {
    background-color: #059669;
}

input:checked + .toggle-slider:before {
    transform: translateX(20px);
}

/* RESULTS SECTION */
.calculator-results {
    background: #f8fafc;
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid #e2e8f0;
}

.result-row {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: baseline;
    gap: 0.75rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid #e2e8f0;
}

.result-row:last-child {
    border-bottom: none;
}

.result-label {
    font-weight: 500;
    color: #475569;
    font-size: 0.95rem;
}

.result-value {
    font-weight: 600;
    color: #1e293b;
    font-size: 1.1rem;
}

.result-explanation {
    margin-top: 1rem;
    padding-top: 0.5rem;
}

.result-explanation p {
    color: #64748b;
    font-size: 0.9rem;
    line-height: 1.5;
    margin: 0;
    font-style: italic;
}

#effective-fee {
    color: #1e293b;
    font-weight: 700;
    font-size: 1.3rem;
    background: transparent;
    padding: 0;
    border-radius: 0;
    border: none;
    box-shadow: none;
    display: inline;
    min-width: 0;
    text-align: right;
    position: static;
    overflow: visible;
}

#effective-fee.positive {
    background: transparent !important;
    border: none !important;
    color: #059669 !important;
    box-shadow: none !important;
}

#effective-fee.negative {
    background: transparent !important;
    border: none !important;
    color: #f59e0b !important;
    box-shadow: none !important;
}

/* Additional selector to ensure green color is applied */
.result-value.positive,
span.positive {
    color: #059669 !important;
}

/* Hide mobile controls table on desktop */
.mobile-controls-table {
    display: none;
}

/* RESPONSIVE DESIGN */
@media (max-width: 767px) {
    /* Mobile calculator toggle styling */
    .calculator-toggle-container {
        margin: 1rem auto 0 auto;
        gap: 0.4rem;
    }
    
    .section-toggle-icon {
        width: 28px;
        height: 28px;
    }
    
    .section-toggle-icon svg {
        width: 18px;
        height: 18px;
    }
    
    .toggle-tip {
        font-size: 0.7rem;
        letter-spacing: 0.3px;
    }
    
    /* Show mobile controls table */
    .mobile-controls-table {
        display: grid !important;
    }
    
    /* Hide desktop toggle and value containers on mobile */
    .table-row > .toggle-container,
    .table-row > .value-column {
        display: none !important;
    }
    .calculator-content {
        padding: 0 1rem;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box;
    }
    
    .calculator-table {
        margin: 0 0 1.5rem 0;
        border-radius: 0;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box;
        border: none;
        box-shadow: none;
        background: transparent;
    }
    
    .table-header {
        grid-template-columns: 1fr;
        gap: 0.75rem;
        padding: 1rem;
        text-align: center;
        display: none;
    }
    
    /* COMPLETE MOBILE REDESIGN - Simple Two Column Layout */
    .table-row {
        display: block !important;
        padding: 1.5rem;
        text-align: left;
        border-bottom: none;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box;
        background: transparent;
        border-left: none;
        border-right: none;
        margin: 0 0 1rem 0;
        border-radius: 8px;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    }
    
    .credit-info {
        text-align: left;
        margin-bottom: 1rem;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box;
    }
    
    .credit-name {
        font-size: 1.1rem;
        margin-bottom: 0.75rem;
        justify-content: flex-start;
        flex-direction: row;
        gap: 0.75rem;
    }
    
    .credit-description {
        font-size: 0.9rem;
        line-height: 1.6;
        margin-bottom: 1rem;
        padding: 0;
    }
    
    /* NEW: Create a flexbox container for the calculator controls */
    .table-row::after {
        content: '';
        display: block;
        clear: both;
    }
    
    .toggle-container {
        float: left;
        width: 40%;
        text-align: left;
        margin-bottom: 1rem;
    }
    
    .toggle-container::before {
        content: 'Include:';
        font-weight: 600;
        color: #374151;
        font-size: 0.9rem;
        background: transparent !important;
        display: block;
        margin-bottom: 0.5rem;
    }
    
    .value-column {
        float: right;
        width: 40%;
        text-align: left;
        margin-bottom: 1rem;
    }
    
    .value-column::before {
        content: 'Your Value:';
        font-weight: 600;
        color: #374151;
        font-size: 0.9rem;
        background: transparent !important;
        padding: 0;
        margin: 0;
        text-transform: none;
        letter-spacing: 0;
        flex-shrink: 0;
        margin-bottom: 0.5rem;
        display: block;
    }
    
    /* Style the actual toggle and input elements */
    .toggle-container .credit-toggle {
        display: block;
        margin: 0;
        text-align: center;
    }
    
    .value-column .value-input {
        display: block;
        margin: 0;
        text-align: center;
    }
    
    /* Clear the floats */
    .table-row::after {
        content: '';
        display: table;
        clear: both;
    }
    
    .value-input {
        justify-content: center;
        margin-bottom: 0;
        position: relative;
    }
    
    /* Force mobile input centering */
    .table-row .value-input input[type="number"] {
        width: 120px !important;
        padding: 0.875rem 1rem !important;
        font-size: 1rem !important;
        text-align: center !important;
        margin: 0 auto !important;
        display: block !important;
    }
    
    /* Force mobile placeholder centering */
    .table-row .value-placeholder {
        width: 120px !important;
        padding: 0.875rem 1rem !important;
        font-size: 1rem !important;
        position: absolute !important;
        opacity: 1 !important;
        background: transparent !important;
        text-align: center !important;
        display: flex !important;
        margin: 0 auto !important;
        color: #9ca3af !important;
        top: 50% !important;
        left: 50% !important;
        transform: translate(-50%, -50%) !important;
    }
    
    .table-row .value-input.active + .value-placeholder {
        opacity: 0 !important;
    }
    
    .calculator-results {
        padding: 1.5rem 0;
        border-radius: 12px;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box;
        background: #f8fafc;
        border: 1px solid #e2e8f0;
        box-shadow: none;
        margin: 0;
    }
    
    .result-row {
        padding: 0.75rem 0;
    }
    
    .result-label {
        font-size: 0.95rem;
    }
    
    .result-value {
        font-size: 1.1rem;
    }
    
    #effective-fee {
        font-size: 1.2rem;
        padding: 0.75rem 1.25rem;
        min-width: 120px;
    }
}

@media (max-width: 480px) {
    .calculator-content {
        padding: 0 0.75rem;
    }
    
    .table-row {
        padding: 1.25rem 0;
        gap: 0.75rem;
    }
    
    .credit-name {
        font-size: 1rem;
        flex-direction: row;
        gap: 0.5rem;
        justify-content: center;
    }
    
    .credit-description {
        font-size: 0.85rem;
        line-height: 1.5;
        margin-bottom: 1rem;
        padding: 0 0.25rem;
    }
    
    .value-input input {
        width: 120px;
        padding: 0.625rem;
        font-size: 0.85rem;
    }
    
    .value-placeholder {
        width: 120px;
        padding: 0.625rem;
        font-size: 0.85rem;
        position: relative;
        opacity: 1;
        background: transparent;
        text-align: center;
        margin: 0 auto;
        display: block;
        color: #9ca3af;
        z-index: 1;
    }
    
    .calculator-results {
        padding: 1.25rem 0;
    }
    
    .result-row {
        padding: 0.5rem 0;
    }
    
    .result-label {
        font-size: 0.9rem;
    }
    
    .result-value {
        font-size: 1rem;
    }
    
    #effective-fee {
        font-size: 1.1rem;
        padding: 0.625rem 1rem;
        min-width: 100px;
    }
} 

/* RESPONSIVE DESIGN FOR CONTENT SECTIONS */
@media (max-width: 768px) {
    .section-header {
        padding: 1.25rem 1.5rem;
    }
    
    .section-header h2 {
        font-size: 1.3rem;
    }
    
    .section-content {
        padding: 1.5rem;
    }
} 

.section-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 0px;
    background: transparent;
    border-radius: 20px 20px 0 0;
} 

/* RESPONSIVE DESIGN - COMPLETE MOBILE REWRITE */
@media (max-width: 767px) {
    .calculator-section {
        margin: 1rem 0 !important;
        border-radius: 16px !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box;
        box-shadow: 0 4px 20px rgba(0,0,0,0.08);
        border: 1px solid #f1f5f9;
        background: #ffffff;
        position: static;
    }
    
    .calculator-header {
        margin: 0 !important;
        padding: 1rem 1rem !important;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box;
        border-radius: 0;
        background: transparent;
        position: static;
    }
    
    .calculator-header h2 {
        font-size: 1.4rem;
        margin-bottom: 0.75rem;
        font-weight: 700;
        line-height: 1.2;
    }
    
    .calculator-header p {
        font-size: 0.85rem;
        line-height: 1.4;
        margin-bottom: 1rem;
        opacity: 0.95;
    }
    
    .practicality-legend {
        gap: 1rem;
        margin-top: 0.75rem;
        font-size: 0.75rem;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .legend-dot {
        width: 8px;
        height: 8px;
        border-radius: 50%;
    }
    
    .legend-dot.easy {
        background: #10b981;
    }
    
    .legend-dot.moderate {
        background: #f59e0b;
    }
    
    .legend-dot.hard {
        background: #ef4444;
    }
    
    .calculator-content {
        margin: 0 !important;
        padding: 2rem !important;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box;
        background: #ffffff;
        position: static;
    }
    
    .calculator-table {
        margin: 0 0 1.5rem 0;
        border-radius: 0;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box;
        border: none;
        box-shadow: none;
        background: transparent !important;
        display: flex;
        flex-direction: column;
        gap: 1rem;
    }
    
    .calculator-table * {
        background: transparent !important;
    }
    
    .table-header {
        display: none;
    }
    
    .table-row {
        display: block !important;
        padding: 1rem;
        text-align: left;
        border: none;
        margin: 0;
        background: #f0ede8 !important; /* darker tan for better separation */
        position: relative;
        border-radius: 0;
        box-shadow: none !important;
        border: none;
        transition: none !important;
        width: 100% !important;
        box-sizing: border-box;
        overflow: hidden
    }
    
    .table-row:hover {
        background: #fafbfc !important;
        transform: none !important;
        box-shadow: none !important;
    }
    
    .table-row:last-child {
        margin-bottom: 0;
        border-bottom: 1px solid #f1f5f9 !important;
    }
    
    .credit-info {
        text-align: left;
        margin-bottom: 1rem;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box;
        background: transparent !important;
        padding: 0;
    }
    
    .credit-name {
        font-size: 1.1rem;
        margin-bottom: 0.5rem;
        justify-content: flex-start;
        flex-direction: row;
        gap: 0.75rem;
        text-align: left;
        background: transparent !important;
        padding: 0;
        border-radius: 0;
        border: none;
        background: transparent !important;
        font-weight: 700;
        color: #1e293b;
        display: flex;
        align-items: center;
    }
    
    .credit-description {
        font-size: 0.85rem;
        line-height: 1.5;
        margin-bottom: 1rem;
        padding: 0 !important;
        text-align: left;
        background: transparent !important;
        border-radius: 0 !important;
        border: none !important;
        color: #64748b;
    }
    
    /* Mobile: Right column for toggle and value */
    .toggle-container {
        float: left;
        width: 40%;
        text-align: left;
        margin-bottom: 1rem;
        background: transparent !important;
        padding: 0;
        border: none;
        border-radius: 0;
        position: relative;
    }
    
    .toggle-container::before {
        content: 'Include:';
        font-weight: 600;
        color: #374151;
        font-size: 0.9rem;
        background: transparent !important;
        flex-shrink: 0;
    }
    
    .value-column {
        float: right;
        width: 40%;
        text-align: left;
        margin-bottom: 1rem;
        position: relative;
        min-height: auto;
        background: transparent !important;
        padding: 0;
        border: none;
        border-radius: 0;
    }
    
    .value-column::before {
        content: 'Your Value:';
        font-weight: 600;
        color: #374151;
        font-size: 0.9rem;
        background: transparent !important;
        padding: 0;
        margin: 0;
        text-transform: none;
        letter-spacing: 0;
        flex-shrink: 0;
        margin-bottom: 0.5rem;
        display: block;
    }
    
    .value-input {
        justify-content: flex-start;
        margin-bottom: 0;
        position: relative;
        background: transparent !important;
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }
    
    /* Mobile input styling */
    .table-row .value-input input[type="number"] {
        width: 120px !important;
        padding: 1rem !important;
        font-size: 1.1rem !important;
        text-align: center !important;
        margin: 0 !important;
        display: block !important;
        border: 2px solid #e2e8f0;
        border-radius: 12px;
        background: white;
        font-weight: 600;
        color: #1e293b;
        box-shadow: 0 2px 4px rgba(0,0,0,0.05);
        transition: all 0.2s ease;
    }
    
    .table-row .value-input input[type="number"]:focus {
        border-color: #059669;
        box-shadow: 0 0 0 4px rgba(5, 150, 105, 0.15);
        outline: none;
    }
    
    /* Mobile placeholder styling */
    .table-row .value-placeholder {
        width: 120px !important;
        padding: 1rem !important;
        font-size: 1.1rem !important;
        position: static !important;
        opacity: 1 !important;
        background: white !important;
        text-align: center !important;
        display: block !important;
        margin: 0 !important;
        color: #9ca3af !important;
        border: 2px solid #e2e8f0;
        border-radius: 12px;
        background: white !important;
        font-weight: 600;
        box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    }
    
    .table-row .value-input.active + .value-placeholder {
        opacity: 0 !important;
        display: none !important;
    }
    
    .table-row .value-input .currency {
        left: -1rem !important;
        font-size: 1rem !important;
        background: transparent !important;
        color: #059669;
        font-weight: 700;
    }
    
    .calculator-results {
        padding: 2rem 1.5rem;
        border-radius: 0;
        background: white;
        border: 1px solid #e2e8f0;
        box-shadow: 0 8px 30px rgba(0,0,0,0.12);
        margin: 0;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box;
    }
    
    .result-row {
        padding: 1rem 0;
        text-align: left;
        border-bottom: 1px solid #f1f5f9;
    }
    
    .result-row:last-child {
        border-bottom: none;
    }
    
    .result-label {
        font-size: 1rem;
        font-weight: 600;
        color: #374151;
    }
    
    .result-value {
        font-size: 1.2rem;
        font-weight: 700;
        color: #1e293b;
    }
    
    #effective-fee {
        font-size: 1.3rem;
        padding: 1rem 1.5rem;
        min-width: 140px;
        background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
        border: 2px solid #f59e0b;
        color: #92400e;
        font-weight: 800;
        border-radius: 16px;
        text-align: center;
        display: inline-block;
        box-shadow: 
            0 8px 20px rgba(245, 158, 11, 0.3),
            inset 0 1px 0 rgba(255,255,255,0.9);
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }
    
    #effective-fee.positive {
        background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
        border-color: #f59e0b;
        color: #92400e;
    }
    
    #effective-fee.negative {
        background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
        border-color: #16a34a;
        color: #166534;
    }
    
    /* Enhanced practicality meter */
    .practicality-meter {
        width: 12px;
        height: 12px;
        border-radius: 50%;
        display: inline-block;
        position: relative;
        cursor: help;
        flex-shrink: 0;

    }
    
    .practicality-meter[data-level="easy"] {
        background: #10b981;
        box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
    }
    
    .practicality-meter[data-level="moderate"] {
        background: #f59e0b;
        box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.2);
    }
    
    .practicality-meter[data-level="hard"] {
        background: #ef4444;
        box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.2);
    }
}

@media (max-width: 480px) {
    .calculator-content {
        padding: 0 0.75rem;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box;
    }
    
    .calculator-table {
        gap: 1.25rem;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box;
    }
    
    .table-row {
        padding: 1.25rem;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box;
    }
    
    .credit-name {
        font-size: 1.2rem;
        margin-bottom: 0.5rem;
        width: 100% !important;
        box-sizing: border-box;
        color: #1e293b;
        font-weight: 700;
    }
    
    .credit-description {
        font-size: 0.85rem;
        line-height: 1.4;
        margin-bottom: 1.25rem;
        padding: 0 !important;
        width: 100% !important;
        box-sizing: border-box;
        background: transparent !important;
        border: none !important;
        border-radius: 0 !important;
        color: #64748b;
        font-weight: 400;
        max-width: 100% !important;
    }
    
    .toggle-container {
        margin-bottom: 0.5rem;
        padding: 0;
        width: 100% !important;
        box-sizing: border-box;
        display: flex;
        align-items: center;
        justify-content: flex-end;
        gap: 1rem;
        background: transparent !important;
        border: none;
        border-radius: 0;
    }
    
    .toggle-container::before {
        content: 'Include:';
        font-weight: 600;
        color: #374151;
        font-size: 0.9rem;
        background: transparent !important;
        flex-shrink: 0;
    }
    
    /* Exact desktop toggle styling for small mobile - High specificity */
    .calculator-table .table-row .toggle-container .credit-toggle {
        width: 60px !important;
        height: 30px !important;
        flex-shrink: 0 !important;
        position: relative !important;
        display: inline-block !important;
    }
    
    .calculator-table .table-row .toggle-container .credit-toggle .toggle-slider {
        position: absolute !important;
        cursor: pointer !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        background-color: #d6d3d1 !important;
        transition: .3s !important;
        border-radius: 30px !important;
    }
    
    .calculator-table .table-row .toggle-container .credit-toggle .toggle-slider:before {
        position: absolute !important;
        content: "" !important;
        height: 22px !important;
        width: 22px !important;
        left: 4px !important;
        bottom: 4px !important;
        background-color: #ffffff !important;
        transition: .3s !important;
        border-radius: 50% !important;
        box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06) !important;
    }
    
    .calculator-table .table-row .toggle-container .credit-toggle input:checked + .toggle-slider {
        background-color: #10b981 !important;
    }
    
    .calculator-table .table-row .toggle-container .credit-toggle input:checked + .toggle-slider:before {
        transform: translateX(30px) !important;
    }
    
    .value-column {
        padding: 0;
        width: 100% !important;
        box-sizing: border-box;
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 1rem;
        margin-bottom: 0;
        background: transparent !important;
        border: none;
        border-radius: 0;
    }
    
    .value-column::before {
        content: 'Your Value:';
        font-weight: 600;
        color: #374151;
        font-size: 0.9rem;
        background: transparent !important;
        padding: 0;
        margin: 0;
        text-transform: none;
        letter-spacing: 0;
        flex-shrink: 0;
    }
    
    /* Small mobile input styling */
    .table-row .value-input {
        position: relative;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .table-row .value-input input[type="number"] {
        width: 90px !important;
        padding: 0.625rem !important;
        font-size: 0.95rem !important;
        border: 2px solid #e2e8f0;
        border-radius: 8px;
        background: white;
        font-weight: 600;
        color: #1e293b;
        box-shadow: 0 2px 4px rgba(0,0,0,0.05);
        transition: all 0.2s ease;
        text-align: center;
        position: relative;
        z-index: 2;
    }
    
    .table-row .value-placeholder {
        width: 90px !important;
        padding: 0.625rem !important;
        font-size: 0.95rem !important;
        border: none !important;
        border-radius: 8px;
        background: transparent !important;
        font-weight: 600;
        color: #9ca3af;
        box-shadow: none !important;
        text-align: center;
        display: flex;
        align-items: center;
        justify-content: center;
        margin: 0;
        position: absolute;
        top: 0;
        left: 0;
        z-index: 1;
        pointer-events: none;
    }
    
    .table-row .value-input .currency {
        position: absolute;
        left: 6px !important;
        font-size: 0.9rem !important;
        color: #059669;
        font-weight: 700;
        z-index: 3;
        pointer-events: none;
    }
    
    .calculator-results {
        padding: 1.5rem 1rem;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box;
    }
    
    .result-row {
        padding: 0.75rem 0;
        width: 100% !important;
        box-sizing: border-box;
        display: grid;
        grid-template-columns: 1fr auto;
        align-items: baseline;
        gap: 0.75rem;
    }
    
    .result-label {
        font-size: 1rem;
    }
    
    .result-value {
        font-size: 1.3rem;
    }
    
    #effective-fee {
        font-size: 1.3rem;
        padding: 0;
        min-width: 0;
        text-align: right;
    }
} 

/* MOBILE FULL WIDTH ENFORCEMENT */
@media (max-width: 767px) {
    .calculator-section {
        margin: 1rem 0.35% !important;
        padding: 0 !important;
        border-radius: 12px !important;
        max-width: 99.3% !important;
        width: 99.3% !important;
        box-sizing: border-box;
        box-shadow: none !important;
        border: 1px solid #e5e7eb;
        background: #ffffff;
        position: static;
    }
    
    /* Darker tan background for individual credit cards on mobile */
    .table-row {
        background: #f0ede8 !important;
        border-radius: 8px !important;
        margin-bottom: 0.75rem !important;
        padding: 1rem !important;
        border: 1px solid #f5f3f0 !important;
    }
    
    /* Remove excessive lines */
    .table-row:last-child {
        border-bottom: 1px solid #f1f5f9 !important;
    }
    
    .calculator-table {
        border: none !important;
        background: transparent !important;
    }
    
    /* Remove all shadows from toggles and inputs */
    .toggle-slider:before,
    .calculator-table .table-row .toggle-container .credit-toggle .toggle-slider:before {
        box-shadow: none !important;
    }
    
    .value-input input[type="number"] {
        box-shadow: none !important;
    }
    
    .value-input input[type="number"]:focus {
        box-shadow: none !important;
    }
    
    .calculator-header {
        margin: 0 !important;
        padding: 1rem !important;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box;
        border-radius: 12px 12px 0 0;
        background: transparent;
        position: static;
    }
    
    .calculator-content {
        margin: 0 !important;
        padding: 1rem !important;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box;
        background: #ffffff;
        position: static;
        border-top: none;
        border-radius: 0 0 12px 12px;
    }
} 

/* ADDITIONAL MOBILE ENHANCEMENTS */
@media (max-width: 767px) {
    /* Enhanced mobile spacing and layout */
    .calculator-content {
        padding: 1rem !important;
        background: #ffffff !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box;
    }
    
    .calculator-table {
        gap: 1.5rem;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box;
    }
    
    .table-row {
        padding: 1.5rem;
        margin-bottom: 0;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box;
        border-radius: 0;
    }
    
    /* Enhanced credit name styling */
    .credit-name {
        font-size: 1.4rem;
        margin-bottom: 0.5rem;
        color: #1e293b;
        text-shadow: none;
        width: 100% !important;
        box-sizing: border-box;
        font-weight: 700;
    }
    
    /* Enhanced description styling */
    .credit-description {
        font-size: 0.9rem;
        line-height: 1.4;
        margin-bottom: 1.5rem;
        padding: 0 !important;
        text-align: left;
        background: transparent !important;
        border: none !important;
        border-radius: 0 !important;
        color: #64748b;
        font-weight: 400;
        width: 100% !important;
        box-sizing: border-box;
        max-width: 100% !important;
    }
    
    /* Mobile: Create 2x2 table layout */
    .mobile-controls-table {
        display: grid;
        grid-template-columns: 1fr 1fr;
        grid-template-rows: auto auto;
        gap: 0.5rem;
        margin-top: 0.5rem;
        width: 100%;
        background: transparent !important;
    }
    
    .mobile-label-include {
        grid-column: 1;
        grid-row: 1;
        display: flex;
        align-items: center;
        justify-content: flex-start;
        font-weight: 600;
        color: #374151;
        font-size: 0.85rem;
        background: transparent !important;
    }
    
    .mobile-label-value {
        grid-column: 1;
        grid-row: 2;
        display: flex;
        align-items: center;
        justify-content: flex-start;
        font-weight: 600;
        color: #374151;
        font-size: 0.85rem;
        background: transparent !important;
    }
    
    .toggle-container {
        grid-column: 2;
        grid-row: 1;
        display: flex;
        align-items: center;
        justify-content: flex-end;
        background: transparent !important;
        padding: 0;
        border: none;
        border-radius: 0;
        margin-bottom: 0;
    }
    
    .toggle-container::before {
        display: none;
    }
    
    /* Exact desktop toggle styling for mobile - High specificity */
    .calculator-table .table-row .toggle-container .credit-toggle {
        width: 60px !important;
        height: 30px !important;
        flex-shrink: 0 !important;
        position: relative !important;
        display: inline-block !important;
    }
    
    .calculator-table .table-row .toggle-container .credit-toggle .toggle-slider {
        position: absolute !important;
        cursor: pointer !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        background-color: #d6d3d1 !important;
        transition: .3s !important;
        border-radius: 30px !important;
    }
    
    .calculator-table .table-row .toggle-container .credit-toggle .toggle-slider:before {
        position: absolute !important;
        content: "" !important;
        height: 22px !important;
        width: 22px !important;
        left: 4px !important;
        bottom: 4px !important;
        background-color: #ffffff !important;
        transition: .3s !important;
        border-radius: 50% !important;
        box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06) !important;
    }
    
    .calculator-table .table-row .toggle-container .credit-toggle input:checked + .toggle-slider {
        background-color: #10b981 !important;
    }
    
    .calculator-table .table-row .toggle-container .credit-toggle input:checked + .toggle-slider:before {
        transform: translateX(30px) !important;
    }
    
    .value-column {
        grid-column: 2;
        grid-row: 2;
        display: flex;
        align-items: center;
        justify-content: flex-end;
        background: transparent !important;
        border: none;
        border-radius: 0;
        margin-bottom: 0;
        padding: 0;
        height: 40px;
        position: relative;
    }
    
    .value-column::before {
        display: none;
    }
    
    /* Mobile value input and placeholder styling */
    .mobile-controls-table .value-input {
        position: relative;
        display: flex;
        align-items: center;
        justify-content: flex-end;
        width: 80px;
        height: 40px;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        overflow: hidden;
    }
    
    .mobile-controls-table .value-input input[type="number"] {
        width: 80px !important;
        height: 40px !important;
        padding: 0.5rem !important;
        font-size: 1rem !important;
        font-weight: 600 !important;
        color: #1e293b;
        background: white !important;
        border: 2px solid #e5e7eb !important;
        border-radius: 8px !important;
        text-align: center !important;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        position: relative;
        z-index: 2;
        opacity: 0;
        transform: translateY(-5px);
        outline: none !important;
        box-sizing: border-box !important;
    }
    
    .mobile-controls-table .value-input input[type="number"]:focus {
        border-color: #059669 !important;
        box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.1) !important;
    }
    
    .mobile-controls-table .value-input.active input[type="number"] {
        opacity: 1;
        transform: translateY(0);
    }
    
    .mobile-controls-table .value-placeholder {
        font-size: 1rem !important;
        font-weight: 600 !important;
        color: #9ca3af !important;
        background: transparent !important;
        border: none !important;
        text-align: center !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        margin: 0 !important;
        position: absolute !important;
        opacity: 1 !important;
        pointer-events: none !important;
        transform: translateY(-2px) !important;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
        z-index: 1;
        width: 80px !important;
        height: 40px !important;
        padding: 0 !important;
        right: 0 !important;
        top: 0 !important;
        line-height: 1 !important;
    }
    
    .mobile-controls-table .value-input.active + .value-placeholder {
        opacity: 0 !important;
        transform: translateY(5px) !important;
    }
    
    /* Compact input styling */
    .table-row .value-input {
        position: relative;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .table-row .value-input input[type="number"] {
        width: 100px !important;
        padding: 0.75rem !important;
        font-size: 1rem !important;
        border: 2px solid #e2e8f0;
        border-radius: 8px;
        background: white;
        font-weight: 600;
        color: #1e293b;
        box-shadow: 0 2px 4px rgba(0,0,0,0.05);
        transition: all 0.2s ease;
        text-align: center;
        position: relative;
        z-index: 2;
    }
    
    .table-row .value-input input[type="number"]:hover {
        border-color: #cbd5e1;
        box-shadow: 0 3px 6px rgba(0,0,0,0.08);
    }
    
    .table-row .value-input input[type="number"]:focus {
        border-color: #059669;
        box-shadow: 
            0 0 0 3px rgba(5, 150, 105, 0.15),
            0 3px 6px rgba(0,0,0,0.08);
        outline: none;
    }
    
    /* Properly positioned placeholder */
    .table-row .value-placeholder {
        width: 100px !important;
        padding: 0.75rem !important;
        font-size: 1rem !important;
        border: none !important;
        border-radius: 8px;
        background: transparent !important;
        font-weight: 600;
        color: #9ca3af;
        box-shadow: none !important;
        text-align: center;
        display: flex;
        align-items: center;
        justify-content: center;
        margin: 0;
        position: absolute;
        top: 0;
        left: 0;
        z-index: 1;
        pointer-events: none;
    }
    
    /* Compact currency symbol */
    .table-row .value-input .currency {
        position: absolute;
        left: 8px !important;
        font-size: 0.95rem !important;
        color: #059669;
        font-weight: 700;
        z-index: 3;
        pointer-events: none;
    }
    
    /* Enhanced results section */
    .calculator-results {
        padding: 2rem 1.5rem;
        border-radius: 0;
        background: white;
        border: 1px solid #e2e8f0;
        box-shadow: 0 8px 30px rgba(0,0,0,0.12);
        margin: 0;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box;
    }
    
    .result-row {
        padding: 1.25rem 0;
        border-bottom: 2px solid #f1f5f9;
        width: 100% !important;
        box-sizing: border-box;
        display: grid;
        grid-template-columns: 1fr auto;
        align-items: baseline;
        gap: 0.75rem;
    }
    
    .result-label {
        font-size: 0.9rem;
        font-weight: 600;
        color: #374151;
        text-transform: uppercase;
        letter-spacing: 0.3px;
    }
    
    .result-value {
        font-size: 1.1rem;
        font-weight: 700;
        color: #0f172a;
    }
    
    #effective-fee {
        font-size: 1.2rem !important;
        padding: 0 !important;
        min-width: 0 !important;
        background: transparent !important;
        text-align: right !important;
        border: none !important;
        color: #0f172a !important;
        font-weight: 800 !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        display: inline !important;
        position: static !important;
        overflow: visible !important;
    }
    
    #effective-fee.positive {
        background: transparent !important;
        border: none !important;
        color: #059669 !important;
        box-shadow: none !important;
    }
    
    #effective-fee.negative {
        background: transparent !important;
        border: none !important;
        color: #f59e0b !important;
        box-shadow: none !important;
    }
    
    /* Enhanced practicality meter */
    .practicality-meter {
        width: 12px;
        height: 12px;
        border-radius: 50%;
        display: inline-block;
        position: relative;
        cursor: help;
        flex-shrink: 0;

    }
    
    .practicality-meter[data-level="easy"] {
        background: #10b981;
        box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
    }
    
    .practicality-meter[data-level="moderate"] {
        background: #f59e0b;
        box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.2);
    }
    
    .practicality-meter[data-level="hard"] {
        background: #ef4444;
        box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.2);
    }
}

@media (max-width: 480px) {
    .calculator-content {
        padding: 0 0.75rem;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box;
    }
    
    .calculator-table {
        gap: 1.25rem;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box;
    }
    
    .table-row {
        padding: 1rem;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box;
    }
    
    .credit-name {
        font-size: 1.1rem;
        margin-bottom: 0.5rem;
        width: 100% !important;
        box-sizing: border-box;
    }
    
    .credit-description {
        font-size: 0.85rem;
        line-height: 1.5;
        margin-bottom: 1rem;
        padding: 0 !important;
        width: 100% !important;
        box-sizing: border-box;
        background: transparent !important;
        border: none !important;
        border-radius: 0 !important;
    }
    
    .toggle-container {
        margin-bottom: 1rem;
        padding: 0.5rem !important;
        width: 100% !important;
        box-sizing: border-box;
    }
    
    .toggle-container::before {
        font-size: 0.9rem;
    }
    
    .value-column {
        padding: 0.5rem !important;
        width: 100% !important;
        box-sizing: border-box;
    }
    
    .value-column::before {
        font-size: 0.9rem;
        margin-bottom: 0.5rem;
    }
    
    /* Small mobile input sizing */
    .table-row .value-input input[type="number"] {
        width: 120px !important;
        padding: 1rem !important;
        font-size: 1.1rem !important;
    }
    
    .table-row .value-placeholder {
        width: 120px !important;
        padding: 1rem !important;
        font-size: 1.1rem !important;
    }
    
    .table-row .value-input .currency {
        left: -1.25rem !important;
        font-size: 1rem !important;
    }
    
    .calculator-results {
        padding: 1.5rem 1rem;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box;
    }
    
    .result-row {
        padding: 0.75rem 0;
        width: 100% !important;
        box-sizing: border-box;
        display: grid;
        grid-template-columns: 1fr auto;
        align-items: baseline;
        gap: 0.75rem;
    }
    
    .result-label {
        font-size: 1rem;
    }
    
    .result-value {
        font-size: 1.3rem;
    }
    
    #effective-fee {
        font-size: 1.3rem;
        padding: 0;
        min-width: 0;
        text-align: right;
    }
} 

/* Remove spinner arrows from number inputs */
.calculator-section input[type="number"]::-webkit-outer-spin-button,
.calculator-section input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.calculator-section input[type="number"] {
    -moz-appearance: textfield;
    text-align: center;
    padding: 0.875rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    color: #1e293b;
    background: white;
    width: 90px;
    outline: none;
    transition: border-color 0.2s ease;
}

.calculator-section input[type="number"]:focus {
    border-color: #059669;
    box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.1);
}

.section-toggle-icon {
    position: relative;
    color: #059669;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    width: 32px;
    height: 32px;
    background: #f0fdf4;
    border: 2px solid #059669;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(5, 150, 105, 0.2);
    flex-shrink: 0;
}

/* Apply Button Styles */
.apply-section {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border: 2px solid #059669;
    border-radius: 16px;
    margin-top: 2rem;
}

/* ==========================================================================
   iOS 26 SAFARI SPECIFIC FIXES
   ========================================================================== */

/* Fix for iOS Safari dynamic viewport and card overlay issues */
@supports (-webkit-touch-callout: none) {
    /* iOS Safari-specific fixes */
    .card-container {
        contain: layout; /* Prevent content overflow */
        isolation: isolate; /* Create new stacking context */
        padding-bottom: calc(2rem + env(safe-area-inset-bottom, 0px)); /* Add safe area padding */
    }
    
    .hero-section {
        contain: layout style paint; /* Stronger containment for hero sections */
        /* Fallback for browsers that don't support dvw */
        width: 100vw;
        margin-left: -50vw;
        margin-right: -50vw;
        /* Dynamic viewport units for iOS Safari */
        width: 100dvw;
        margin-left: -50dvw;
        margin-right: -50dvw;
    }
    
    /* Fix footer clearance on iOS Safari - iOS 26 enhanced */
    body {
        min-height: 100vh;
        min-height: 100dvh; /* Dynamic viewport height */
        min-height: 100svh; /* Small viewport height for iOS 26 stability */
        display: flex;
        flex-direction: column;
        position: relative;
        overflow-x: hidden;
    }
    
    .card-container {
        flex: 1 0 auto;
        min-height: 0; /* Allow flex shrinking */
        position: relative;
        width: 100%;
        max-width: 100vw;
        max-width: 100dvw;
    }
    
    /* iOS 26 specific footer fixes for card pages */
    footer, #footer-placeholder {
        flex-shrink: 0;
        margin-top: auto;
        position: relative !important;
        z-index: 100;
        width: 100%;
        max-width: 100vw;
        max-width: 100dvw;
    }
    
    /* Prevent content from overlapping footer */
    #footer-placeholder {
        margin-top: auto;
        flex-shrink: 0;
        position: relative;
        z-index: 10;
        clear: both;
    }
    
    /* Fix for calculator sections that might overflow */
    .calculator-section,
    .recommendation-section {
        contain: layout;
        margin-bottom: 2rem;
    }
    
    /* iOS Safari viewport height fix for mobile */
    @media (max-width: 768px) {
        .hero-section {
            /* Force recalculation on viewport change */
            height: auto;
            min-height: auto;
        }
        
        /* Add extra bottom spacing on mobile iOS */
        .card-container {
            padding-bottom: calc(3rem + env(safe-area-inset-bottom, 20px));
        }
        
        /* Ensure proper stacking context */
        .calculator-section {
            position: relative;
            z-index: 1;
        }
        
        /* Prevent any positioned elements from escaping container */
        .table-row {
            contain: layout;
            position: relative;
        }
    }
}

.apply-button-container {
    text-align: center;
    margin: 2rem 0;
}

.apply-button {
    display: inline-block;
    background: linear-gradient(135deg, #059669 0%, #10b981 100%);
    color: white;
    text-decoration: none;
    padding: 1rem 2rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.3);
    border: none;
    cursor: pointer;
}

.apply-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(5, 150, 105, 0.4);
    background: linear-gradient(135deg, #047857 0%, #059669 100%);
}

.apply-button:active {
    transform: translateY(0);
}

.apply-disclaimer {
    font-size: 0.9rem;
    color: #6b7280;
    text-align: center;
    margin-top: 1rem;
    font-style: italic;
}

/* Mobile responsive apply button */
@media (max-width: 768px) {
    .apply-button {
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
        width: 100%;
        max-width: 300px;
    }
    
    .apply-button-container {
        margin: 1.5rem 0;
    }
}