/* -----------------------------------------------------------------
   DESIGN SYSTEM & VARIABLES
   ----------------------------------------------------------------- */
   :root {
    /* Color Palette - Refined Blue Scale */
    --primary-50: #eff6ff;
    --primary-100: #dbeafe;
    --primary-500: #3b82f6;
    --primary-600: #2563eb;
    --primary-700: #1d4ed8;
    --surface-50: #f8fafc;
    --surface-100: #f1f5f9;
    --text-main: #0f172a;
    --text-muted: #64748b;

    /* Spacing System (8pt Grid) */
    --space-xs: 0.5rem;   /* 8px */
    --space-sm: 1rem;     /* 16px */
    --space-md: 1.5rem;   /* 24px */
    --space-lg: 2.5rem;   /* 40px */
    --space-xl: 4rem;     /* 64px */
    --space-2xl: 6rem;    /* 96px */

    /* Effects */
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;
    --shadow-soft: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --shadow-hover: 0 20px 25px -5px rgba(0, 0, 0, 0.05), 0 10px 10px -5px rgba(0, 0, 0, 0.02);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* -----------------------------------------------------------------
   TYPOGRAPHY
   ----------------------------------------------------------------- */
.font-display {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    letter-spacing: -0.025em;
}

.display-1 {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-weight: 800;
    line-height: 1.1;
    color: var(--text-main);
}

.display-2 {
    font-size: clamp(1.75rem, 3vw, 2.25rem);
    font-weight: 700;
    color: var(--text-main);
}

.text-balance {
    text-wrap: balance;
}

.text-subtle {
    color: var(--text-muted);
    font-size: 1.125rem;
    line-height: 1.6;
}

/* -----------------------------------------------------------------
   COMPONENT: TOGGLE SWITCH (Pill Style)
   ----------------------------------------------------------------- */
.billing-toggle-wrapper {
    background: var(--surface-100);
    padding: 0.375rem;
    border-radius: 9999px;
    border: 1px solid #e2e8f0;
    display: inline-flex;
    position: relative;
    cursor: pointer;
    box-shadow: inset 0 2px 4px 0 rgba(0,0,0, 0.02);
}

.billing-toggle-wrapper .toggle-option {
    position: relative;
    z-index: 2;
    padding: 0.75rem 2rem;
    font-weight: 600;
    color: var(--text-muted);
    transition: color 0.3s ease;
    cursor: pointer;
    user-select: none;
    font-size: 0.95rem;
}

.billing-toggle-wrapper input[type="radio"] {
    display: none;
}

.billing-toggle-wrapper input:checked + .toggle-option {
    color: var(--primary-700);
}

/* The sliding white background pill */
.toggle-slider-bg {
    position: absolute;
    top: 0.375rem;
    left: 0.375rem;
    height: calc(100% - 0.75rem);
    width: calc(50% - 0.375rem);
    background: white;
    border-radius: 9999px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
}

/* Logic for sliding effect based on sibling checkers */
#billing-payg:checked ~ .toggle-slider-bg {
    transform: translateX(100%);
}

/* -----------------------------------------------------------------
   COMPONENT: CUSTOM SLIDER
   ----------------------------------------------------------------- */
.custom-range-slider {
    height: 8px;
    background: #e2e8f0;
    border-radius: 99px;
    position: relative;
    margin: 3rem 0 2rem;
}

.slider-fill {
    background: var(--primary-600);
    height: 100%;
    border-radius: 99px;
    position: absolute;
    top: 0;
    left: 0;
    transition: width 0.1s linear; /* Smoother drag */
}

.slider-thumb {
    width: 28px;
    height: 28px;
    background: white;
    border: 2px solid var(--primary-600);
    border-radius: 50%;
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    cursor: grab;
    z-index: 10;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.slider-thumb:active {
    cursor: grabbing;
    transform: translate(-50%, -50%) scale(1.1);
    box-shadow: 0 0 0 4px var(--primary-100);
}

/* Step Markers */
.slider-steps {
    display: flex;
    justify-content: space-between;
    margin-top: 1.5rem;
    position: relative;
}

.step-marker {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    width: 40px; /* Hit area */
}

.step-dot {
    width: 8px;
    height: 8px;
    background: #cbd5e1;
    border-radius: 50%;
    margin-bottom: 0.5rem;
    transition: var(--transition);
}

.step-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #94a3b8;
    transition: var(--transition);
}

.step-marker.active .step-dot {
    background: var(--primary-600);
    transform: scale(1.4);
}

.step-marker.active .step-label {
    color: var(--primary-700);
}

/* -----------------------------------------------------------------
   COMPONENT: CARDS
   ----------------------------------------------------------------- */
.card-pricing {
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-lg);
    transition: var(--transition);
    background: white;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.card-pricing:hover {
    border-color: var(--primary-100);
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
}

.card-pricing.is-selected {
    border-color: var(--primary-600);
    background: var(--primary-50);
    box-shadow: 0 0 0 1px var(--primary-600);
}

/* -----------------------------------------------------------------
   COMPONENT: ACCORDION (FAQ)
   ----------------------------------------------------------------- */
.custom-accordion .accordion-item {
    border: none;
    background: transparent;
    margin-bottom: 1rem;
}

.custom-accordion .accordion-button {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-md) !important;
    padding: 1.5rem;
    font-weight: 600;
    color: var(--text-main);
    box-shadow: var(--shadow-soft);
}

.custom-accordion .accordion-button:not(.collapsed) {
    background: white;
    color: var(--primary-700);
    border-color: var(--primary-100);
    box-shadow: var(--shadow-soft);
}

.custom-accordion .accordion-button:focus {
    box-shadow: 0 0 0 3px var(--primary-100);
    border-color: var(--primary-600);
}

.custom-accordion .accordion-body {
    padding: 1.5rem;
    color: var(--text-muted);
    line-height: 1.7;
    background: white;
    margin-top: 0.5rem;
    border-radius: var(--radius-md);
    border: 1px solid #f1f5f9;
}

/* -----------------------------------------------------------------
   UTILITIES
   ----------------------------------------------------------------- */
.badge-modern {
    background: var(--primary-50);
    color: var(--primary-700);
    font-weight: 600;
    padding: 0.35em 0.8em;
    border-radius: 6px;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.section-spacer {
    padding-top: var(--space-lg);
    padding-bottom: var(--space-lg);
}

.save-badge {
    background: #dcfce7;
    color: #166534;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    margin-left: 0.5rem;
}

/* -----------------------------------------------------------------
   DESIGN SYSTEM & VARIABLES
   ----------------------------------------------------------------- */
   :root {
    --primary-50: #eff6ff;
    --primary-100: #dbeafe;
    --primary-500: #3b82f6;
    --primary-600: #2563eb;
    --primary-700: #1d4ed8;
    --surface-50: #f8fafc;
    --surface-100: #f1f5f9;
    --text-main: #0f172a;
    --text-muted: #64748b;

    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 1.5rem;
    --space-lg: 2.5rem;
    --space-xl: 4rem;
    --space-2xl: 6rem;

    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;
    --shadow-soft: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --shadow-hover: 0 20px 25px -5px rgba(0, 0, 0, 0.05), 0 10px 10px -5px rgba(0, 0, 0, 0.02);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* -----------------------------------------------------------------
   TYPOGRAPHY
   ----------------------------------------------------------------- */
.font-display {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    letter-spacing: -0.025em;
}

.display-1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    line-height: 1.1;
    color: var(--text-main);
}

.display-2 {
    font-size: clamp(1.5rem, 3vw, 2.25rem);
    font-weight: 700;
    color: var(--text-main);
}

.text-balance {
    text-wrap: balance;
}

.text-subtle {
    color: var(--text-muted);
    font-size: 1.125rem;
    line-height: 1.6;
}

/* -----------------------------------------------------------------
   COMPONENT: TOGGLE SWITCH
   ----------------------------------------------------------------- */
.billing-toggle-wrapper {
    background: var(--surface-100);
    padding: 0.375rem;
    border-radius: 9999px;
    border: 1px solid #e2e8f0;
    display: inline-flex;
    position: relative;
    cursor: pointer;
    box-shadow: inset 0 2px 4px 0 rgba(0,0,0, 0.02);
    max-width: 100%; /* Responsive safeguard */
}

.billing-toggle-wrapper .toggle-option {
    position: relative;
    z-index: 2;
    padding: 0.75rem 2rem;
    font-weight: 600;
    color: var(--text-muted);
    transition: color 0.3s ease;
    cursor: pointer;
    user-select: none;
    font-size: 0.95rem;
    white-space: nowrap;
}

.billing-toggle-wrapper input[type="radio"] {
    display: none;
}

.billing-toggle-wrapper input:checked + .toggle-option {
    color: var(--primary-700);
}

.toggle-slider-bg {
    position: absolute;
    top: 0.375rem;
    left: 0.375rem;
    height: calc(100% - 0.75rem);
    width: calc(50% - 0.375rem);
    background: white;
    border-radius: 9999px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
}

#billing-payg:checked ~ .toggle-slider-bg {
    transform: translateX(100%);
}

/* -----------------------------------------------------------------
   COMPONENT: CUSTOM SLIDER
   ----------------------------------------------------------------- */
.custom-range-slider {
    height: 8px;
    background: #e2e8f0;
    border-radius: 99px;
    position: relative;
    margin: 3rem 0 2rem;
    touch-action: none; /* Prevents scrolling while dragging on mobile */
}

.slider-fill {
    background: var(--primary-600);
    height: 100%;
    border-radius: 99px;
    position: absolute;
    top: 0;
    left: 0;
    transition: width 0.1s linear;
}

.slider-thumb {
    width: 28px;
    height: 28px;
    background: white;
    border: 2px solid var(--primary-600);
    border-radius: 50%;
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    cursor: grab;
    z-index: 10;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.slider-thumb:active {
    cursor: grabbing;
    transform: translate(-50%, -50%) scale(1.1);
    box-shadow: 0 0 0 4px var(--primary-100);
}

.slider-steps {
    display: flex;
    justify-content: space-between;
    margin-top: 1.5rem;
    position: relative;
}

.step-marker {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    width: 40px;
}

.step-dot {
    width: 8px;
    height: 8px;
    background: #cbd5e1;
    border-radius: 50%;
    margin-bottom: 0.5rem;
    transition: var(--transition);
}

.step-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #94a3b8;
    transition: var(--transition);
}

.step-marker.active .step-dot {
    background: var(--primary-600);
    transform: scale(1.4);
}

.step-marker.active .step-label {
    color: var(--primary-700);
}

/* -----------------------------------------------------------------
   COMPONENT: CARDS
   ----------------------------------------------------------------- */
.card-pricing {
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-lg);
    transition: var(--transition);
    background: white;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.card-pricing:hover {
    border-color: var(--primary-100);
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
}

.card-pricing.is-selected {
    border-color: var(--primary-600);
    background: var(--primary-50);
    box-shadow: 0 0 0 1px var(--primary-600);
}

/* -----------------------------------------------------------------
   COMPONENT: ACCORDION
   ----------------------------------------------------------------- */
.custom-accordion .accordion-item {
    border: none;
    background: transparent;
    margin-bottom: 1rem;
}

.custom-accordion .accordion-button {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-md) !important;
    padding: 1.5rem;
    font-weight: 600;
    color: var(--text-main);
    box-shadow: var(--shadow-soft);
}

.custom-accordion .accordion-button:not(.collapsed) {
    background: white;
    color: var(--primary-700);
    border-color: var(--primary-100);
    box-shadow: var(--shadow-soft);
}

.custom-accordion .accordion-button:focus {
    box-shadow: 0 0 0 3px var(--primary-100);
    border-color: var(--primary-600);
}

.custom-accordion .accordion-body {
    padding: 1.5rem;
    color: var(--text-muted);
    line-height: 1.7;
    background: white;
    margin-top: 0.5rem;
    border-radius: var(--radius-md);
    border: 1px solid #f1f5f9;
}

/* -----------------------------------------------------------------
   UTILITIES
   ----------------------------------------------------------------- */
.badge-modern {
    background: var(--primary-50);
    color: var(--primary-700);
    font-weight: 600;
    padding: 0.35em 0.8em;
    border-radius: 6px;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.section-spacer {
    padding-top: var(--space-lg);
    padding-bottom: var(--space-lg);
}

.save-badge {
    background: #dcfce7;
    color: #166534;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    margin-left: 0.5rem;
}

/* -----------------------------------------------------------------
   RESPONSIVE ADJUSTMENTS
   ----------------------------------------------------------------- */
@media (max-width: 576px) {
    /* Stack Pricing Cards Internal Content */
    .mobile-stack {
        flex-direction: column;
        align-items: flex-start !important;
    }
    
    .mobile-right-align {
        width: 100%;
        text-align: left !important;
        margin-top: 1rem;
        justify-content: space-between;
    }

    /* Adjust Toggle Padding */
    .billing-toggle-wrapper {
        width: 100%;
        justify-content: space-between;
    }
    
    .billing-toggle-wrapper .toggle-option {
        padding: 0.75rem 1rem;
        flex: 1;
        text-align: center;
    }

    /* Typography Tweaks */
    .display-1 {
        font-size: 2.25rem;
    }
}