/* ========================================
   FLUID LAYOUT FIX (Replacement for RESET)
======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    /* FIX: Remove 100vh and fixed attachment */
    min-height: 0; 
    height: auto !important;
    overflow: visible !important;
    background-attachment: scroll; 
    background-image: 
        radial-gradient(at 20% 10%, rgba(1, 57, 81, 0.05) 0px, transparent 50%),
        radial-gradient(at 80% 80%, rgba(212, 175, 55, 0.08) 0px, transparent 50%),
        radial-gradient(at 50% 50%, rgba(1, 57, 81, 0.03) 0px, transparent 50%);
}

/* Mobile stability guardrail */
html, body {
    max-width: 100%;
    overflow-x: hidden;
}

/* ========================================
   PROGRESS STEPS - NO STICKY
======================================== */
.progress-section {
    background: rgba(255, 255, 255, 0.95);
    border-bottom: 1px solid var(--glass-border);
    padding: 2.5rem 1rem;
    /* FIX: Remove position: sticky */
    position: relative; 
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

/* ========================================
   MAIN CONTENT - ENSURE GROWTH
======================================== */
.main-content {
    padding: 3rem 1rem;
    height: auto !important;
    overflow: visible !important;
}

.estimator-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    /* FIX: Force layout to respect content height */
    align-items: start; 
}

/* ========================================
   RESET & BASE STYLES
======================================== */
/* Note: The reset/base styles above now include the fluid layout fixes */

:root {
    /* Light Professional Theme */
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-card: #ffffff;
    --bg-card-hover: #f8fafc;
    --bg-selected: rgba(212, 175, 55, 0.08);
    
    /* Text Colors */
    --text-primary: #013951;
    --text-secondary: #64748b;
    --text-muted: #6f8095;
    
    /* Accent Colors */
    --accent-primary: #013951;
    --accent-secondary: rgba(212, 175, 55, 0.9);
    --accent-gradient: linear-gradient(135deg, #013951 0%, #025a7a 100%);
    --accent-gold: rgba(212, 175, 55, 0.9);
    --accent-gold-light: rgba(212, 175, 55, 0.15);
    --accent-success: #10b981;
    --accent-info: #3b82f6;
    
    /* Border & Divider */
    --border-color: rgba(1, 57, 81, 0.12);
    --border-color-hover: rgba(1, 57, 81, 0.24);
    
    /* Glass Effect */
    --glass-bg: rgba(255, 255, 255, 0.8);
    --glass-border: rgba(1, 57, 81, 0.12);
    
    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(1, 57, 81, 0.08);
    --shadow-md: 0 8px 24px rgba(1, 57, 81, 0.12);
    --shadow-lg: 0 16px 48px rgba(1, 57, 81, 0.15);
    --shadow-glow: 0 0 24px rgba(212, 175, 55, 0.3);
    
    /* Spacing */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
}

.progress-container {
    max-width: 1024px;
    margin: 0 auto;
}

.progress-steps {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    gap: 0.5rem;
}

.progress-line {
    position: absolute;
    top: 1.5rem;
    left: 2rem;
    right: 2rem;
    height: 3px;
    background: var(--bg-secondary);
    border-radius: 999px;
    z-index: 1;
}

.progress-line-active {
    position: absolute;
    top: 1.5rem;
    left: 2rem;
    height: 3px;
    background: var(--accent-gold);
    border-radius: 999px;
    z-index: 2;
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 16px rgba(212, 175, 55, 0.4);
}

.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 10;
    flex: 1;
}

.step-circle {
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.875rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    color: var(--text-muted);
    position: relative;
}

.step-circle::before {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-gold));
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: -1;
}

.step-circle.completed {
    background: var(--accent-primary);
    border-color: transparent;
    color: white;
    box-shadow: var(--shadow-md);
    transform: scale(1.05);
}

.step-circle.active {
    background: var(--accent-gold);
    border-color: transparent;
    color: var(--accent-primary);
    box-shadow: var(--shadow-glow);
    animation: pulse 2s ease-in-out infinite;
}

.step-circle.active::before {
    opacity: 0.2;
    animation: ping 1.5s cubic-bezier(0, 0, 0.2, 1) infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.08); }
}

@keyframes ping {
    75%, 100% {
        transform: scale(1.8);
        opacity: 0;
    }
}

.step-label {
    margin-top: 0.75rem;
    text-align: center;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-muted);
    transition: color 0.3s ease;
    letter-spacing: 0.02em;
}

.step-label.active {
    color: var(--text-primary);
}

.content-wrapper {
    max-width: 1400px;
    margin: 0 auto;
}

@media (min-width: 1024px) {
    .estimator-layout {
        grid-template-columns: 1fr 400px;
        gap: 2.5rem;
        align-items: start;
    }
}

.estimator-main {
    min-width: 0;
}

.estimator-sidebar {
    position: relative;
}

@media (min-width: 1024px) {
    .estimator-sidebar {
        position: sticky;
        top: calc(2.5rem + 100px);
    }
}

.estimator-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: 0 1px 3px rgba(1, 57, 81, 0.08);
    overflow: hidden;
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================
   STEP CONTENT
======================================== */
.step-content {
    display: none;
}

.step-content.active {
    display: block;
    animation: fadeInUp 0.65s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: opacity, transform;
}

@media (prefers-reduced-motion: reduce) {
    .step-content.active {
        animation: none !important;
    }

    .progress-line-active {
        transition: none !important;
    }

    .step-circle.active {
        animation: none !important;
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.step-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.step-header h2 {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--accent-primary);
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}

.step-header p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    font-weight: 400;
    line-height: 1.45;
}

/* Context Indicator */
.context-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--accent-gold-light);
    border: 1px solid var(--accent-gold);
    border-radius: var(--radius-md);
    font-size: 0.82rem;
    color: var(--accent-primary);
    font-weight: 600;
    margin-top: 1rem;
}

.step-body {
    padding: 1.5rem;
}

.step-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem 2rem;
    border-top: 1px solid var(--border-color);
    background: var(--bg-secondary);
}

/* ========================================
   SERVICES GRID
======================================== */
.services-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
    margin-bottom: 2rem;
}

@media (min-width: 768px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.service-card {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 1.25rem;
    padding: 1.5rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    background: white;
    cursor: pointer;
    transition: all 0.2s ease;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--accent-gold);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.service-card:hover {
    border-color: var(--accent-gold);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(1, 57, 81, 0.08);
}

.service-card.selected {
    border-color: var(--accent-gold);
    background: white;
    box-shadow: 0 0 0 1px var(--accent-gold);
}

.service-card.selected::before {
    opacity: 0.03;
}

.service-icon {
    flex-shrink: 0;
    width: 3rem;
    height: 3rem;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary);
    color: var(--accent-primary);
    font-size: 1.5rem;
    transition: all 0.2s ease;
    position: relative;
    z-index: 1;
}

.service-card.selected .service-icon {
    background: var(--accent-gold);
    color: white;
}

.service-content {
    flex: 1;
    min-width: 0;
    position: relative;
    z-index: 1;
}

.service-content h3 {
    font-weight: 700;
    font-size: 1rem;
    color: var(--text-primary);
    margin-bottom: 0.375rem;
}

.recommended-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    margin-bottom: 0.5rem;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    background: rgba(212, 175, 55, 0.14);
    border: 1px solid rgba(212, 175, 55, 0.45);
    color: var(--accent-primary);
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.service-content p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.selection-indicator {
    flex-shrink: 0;
    width: 1.5rem;
    height: 1.5rem;
    border: 2px solid var(--border-color-hover);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    position: relative;
    z-index: 1;
}

.service-card.selected .selection-indicator {
    background: var(--accent-gold);
    border-color: var(--accent-gold);
    transform: rotate(360deg) scale(1.1);
}

.selection-dot {
    width: 0.625rem;
    height: 0.625rem;
    border-radius: 50%;
    background: var(--accent-primary);
    opacity: 0;
    transform: scale(0);
    transition: all 0.2s ease;
}

.service-card.selected .selection-dot {
    opacity: 1;
    transform: scale(1);
}

/* ========================================
   SCOPE CONFIGURATION
======================================== */
.config-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

@media (min-width: 768px) {
    .config-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .config-grid.three-col {
        grid-template-columns: repeat(3, 1fr);
    }
}

.config-option {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.625rem;
    padding: 1.25rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    background: white;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    min-height: 44px;
    touch-action: manipulation;
}

.config-option:hover {
    border-color: var(--accent-gold);
    box-shadow: 0 2px 8px rgba(1, 57, 81, 0.06);
}

.config-option.selected {
    border-color: var(--accent-gold);
    background: var(--bg-selected);
    box-shadow: 0 0 0 1px var(--accent-gold);
}

.config-option.popular {
    border-color: var(--accent-gold);
}

.popular-badge {
    position: absolute;
    top: -0.625rem;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent-gold);
    color: white;
    font-size: 0.625rem;
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.option-icon {
    font-size: 1.5rem;
}

.option-title {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9rem;
    line-height: 1.35;
}

.option-subtitle {
    font-size: 0.785rem;
    color: var(--text-secondary);
    line-height: 1.35;
    font-weight: 500;
}

.option-description {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.45;
}

.option-price {
    font-size: 0.8125rem;
    color: var(--accent-gold);
    font-weight: 600;
}

/* ========================================
   DETAILS - TABBED INTERFACE
======================================== */
.service-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 1rem 2rem 0;
    border-bottom: 1px solid var(--border-color);
    overflow: visible;
    background: rgba(1, 57, 81, 0.02);
}

.service-tabs.two-col-layout .service-tab {
    flex: 0 0 calc(50% - 0.25rem);
    max-width: calc(50% - 0.25rem);
}

.service-tab {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.85rem 1.15rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: white;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.9375rem;
    cursor: pointer;
    box-shadow: 0 1px 4px rgba(1, 57, 81, 0.06);
    transition: all 0.3s ease;
    white-space: nowrap;
    position: relative;
    margin-bottom: 0.85rem;
    min-height: 44px;
    touch-action: manipulation;
}

.details-tabs-hint {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin: 1rem 2rem 0.35rem;
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--accent-primary);
    background: rgba(212, 175, 55, 0.12);
    border: 1px solid rgba(212, 175, 55, 0.45);
    border-radius: 999px;
    padding: 0.45rem 0.9rem;
}

.service-tab:hover {
    color: var(--text-primary);
    background: var(--bg-secondary);
    border-color: var(--accent-gold);
    transform: translateY(-1px);
}

.service-tab.active {
    color: var(--accent-primary);
    border-color: var(--accent-gold);
    background: var(--bg-selected);
    box-shadow: 0 0 0 1px var(--accent-gold), 0 6px 16px rgba(212, 175, 55, 0.22);
}

.tab-icon {
    font-size: 1.125rem;
}

.tab-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.25rem;
    height: 1.25rem;
    background: var(--accent-gold);
    color: var(--accent-primary);
    border-radius: 50%;
    font-size: 0.625rem;
    font-weight: 700;
}

.service-tab.active .tab-badge {
    animation: pulse 2s ease-in-out infinite;
}

.service-tab:focus-visible {
    outline: 3px solid rgba(212, 175, 55, 0.35);
    outline-offset: 2px;
}

.tab-content {
    display: none;
    padding: 1.5rem;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.4s ease-out;
}

.tab-section {
    margin-bottom: 1.5rem;
}

.tab-section:last-child {
    margin-bottom: 0;
}

.tab-section h3 {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tab-section > p {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

/* Progress Indicator for Details */
.details-progress {
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    padding: 1rem 1.5rem;
    margin-bottom: 1.5rem;
    border-left: 3px solid var(--accent-gold);
}

.details-progress-text {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.details-progress-bar {
    width: 100%;
    height: 0.5rem;
    background: var(--border-color);
    border-radius: 999px;
    overflow: hidden;
}

.details-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-gold));
    border-radius: 999px;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Shared centered list expansion control (Industries + Add-ons) */
.list-expand-control {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-top: 1rem;
}

.list-expand-btn {
    appearance: none;
    border: 1px solid var(--border-color);
    background: white;
    color: var(--text-secondary);
    border-radius: 999px;
    padding: 0.6rem 1rem;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 44px;
}

.list-expand-btn:hover {
    border-color: var(--accent-gold);
    box-shadow: 0 4px 12px rgba(1, 57, 81, 0.1);
    transform: translateY(-1px);
    color: var(--accent-primary);
}

.list-expand-btn:focus-visible {
    outline: 3px solid rgba(212, 175, 55, 0.35);
    outline-offset: 2px;
}

.list-expand-note {
    margin-top: 0.45rem;
    font-size: 0.75rem;
    color: var(--text-muted);
    text-align: center;
}

/* ========================================
   BUTTONS
======================================== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.85rem 1.15rem;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 700;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    letter-spacing: 0.01em;
    min-height: 44px;
    touch-action: manipulation;
}

.btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none !important;
}

.btn:focus-visible,
.service-card:focus-visible,
.config-option:focus-visible,
.video-option:focus-visible,
.see-more-toggle:focus-visible,
.form-input:focus-visible {
    outline: 3px solid rgba(212, 175, 55, 0.35);
    outline-offset: 2px;
}

.btn-primary {
    background: var(--accent-gold);
    color: var(--accent-primary);
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3);
    font-weight: 700;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(212, 175, 55, 0.4);
    background: rgba(212, 175, 55, 1);
}

.btn-primary:active:not(:disabled) {
    transform: translateY(0);
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.btn-ghost:hover:not(:disabled) {
    background: var(--bg-card);
    color: var(--text-primary);
    border-color: var(--border-color-hover);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--accent-gold);
    color: var(--accent-primary);
}

.btn-outline:hover:not(:disabled) {
    background: var(--accent-gold);
    color: var(--accent-primary);
    transform: translateY(-2px);
}

/* ========================================
   SUMMARY PANEL
======================================== */
.summary-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(1, 57, 81, 0.08);
}

.summary-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-secondary);
}

.summary-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.summary-icon {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: var(--radius-sm);
    background: var(--accent-gold);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.125rem;
    color: white;
}

.summary-title h3 {
    font-size: 1.125rem;
    font-weight: 800;
    color: var(--text-primary);
}

.summary-title p {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    margin-top: 0.125rem;
}

.summary-content {
    padding: 1.5rem;
}

.services-list {
    margin-bottom: 1.5rem;
}

.service-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
    padding: 0.75rem;
    border-radius: var(--radius-sm);
    background: var(--bg-secondary);
    transition: all 0.2s ease;
}

.service-item:hover {
    background: rgba(212, 175, 55, 0.08);
}

.service-name {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    color: var(--text-primary);
    font-weight: 500;
}

.summary-details {
    padding-top: 1.25rem;
    border-top: 1px solid var(--border-color);
    margin-bottom: 1.25rem;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.875rem;
    margin-bottom: 0.75rem;
    color: var(--text-secondary);
}

.detail-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pricing-section {
    padding-top: 1.25rem;
    border-top: 1px solid var(--border-color);
}

.total-section {
    padding-top: 1.25rem;
    border-top: 2px solid var(--accent-gold);
    margin-top: 1.25rem;
}

.total-display {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.total-amount {
    font-size: clamp(1.35rem, 2.2vw, 2rem);
    font-weight: 900;
    color: var(--accent-primary);
    font-variant-numeric: tabular-nums;
    line-height: 1.05;
    letter-spacing: -0.02em;
    white-space: nowrap;
    align-self: center;
}

.total-period {
    font-size: 0.82rem;
    color: var(--text-muted);
    line-height: 1.4;
}

/* ========================================
   QUOTE REVIEW / INVOICE
======================================== */
.quote-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    max-width: 900px;
    margin: 0 auto;
}

.invoice-card {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    box-shadow: 0 1px 3px rgba(1, 57, 81, 0.08);
    margin-bottom: 2rem;
}

.invoice-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1.5rem;
    margin-bottom: 2.5rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid var(--glass-border);
}

.invoice-brand h1 {
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--accent-primary);
    margin-bottom: 0.25rem;
}

.invoice-brand p {
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

.invoice-number {
    text-align: right;
}

.invoice-number h2 {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.invoice-number p {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
}

.invoice-section {
    margin-bottom: 1.5rem;
}

.invoice-section h3 {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.invoice-line-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--glass-border);
    gap: 2rem;
}

.invoice-line-item:last-child {
    border-bottom: none;
}

.line-item-details h4 {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.line-item-details p {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.line-item-price {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--accent-primary);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.invoice-breakdown {
    background: rgba(212, 175, 55, 0.05);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    margin-top: 1rem;
    border-left: 3px solid var(--accent-gold);
}

.breakdown-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9375rem;
    color: var(--text-secondary);
    margin-bottom: 0.625rem;
}

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

.breakdown-item span:first-child {
    font-weight: 500;
}

.breakdown-item span:last-child {
    font-weight: 600;
    color: var(--text-primary);
}

.invoice-totals {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    padding: 2rem;
    margin-top: 2.5rem;
    border: 1px solid var(--glass-border);
    box-shadow: none;
}

.total-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 1rem;
}

.total-row:last-child {
    margin-bottom: 0;
    padding-top: 1.5rem;
    margin-top: 1rem;
    border-top: 2px solid var(--accent-gold);
}

.total-label {
    font-size: 1rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.total-label.grand {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

.total-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
}

.total-value.grand {
    font-size: clamp(1.8rem, 2.8vw, 2.5rem);
    font-weight: 900;
    color: var(--accent-primary);
    letter-spacing: -0.02em;
    line-height: 1.05;
    white-space: nowrap;
}

/* ========================================
   QUOTE FORM
======================================== */
.quote-form {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
}

.quote-form h3 {
    font-size: 1.25rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    letter-spacing: 0.01em;
}

.form-input {
    width: 100%;
    padding: 1rem 1.25rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    background: white;
    font-size: 1rem;
    color: var(--text-primary);
    font-family: inherit;
    transition: all 0.3s ease;
    min-height: 44px;
}

.form-input::placeholder {
    color: #7b8ea3;
}

.form-input:focus {
    outline: none;
    border-color: var(--accent-gold);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.15);
    background: white;
}

.form-textarea {
    min-height: 6rem;
    resize: vertical;
}

.video-option {
    width: 100%;
    padding: 1.25rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    background: white;
    text-align: left;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 1.5rem;
}

.video-option:hover {
    border-color: var(--accent-gold);
    background: var(--bg-secondary);
}

.video-option.selected {
    border-color: var(--accent-gold);
    background: var(--bg-selected);
    box-shadow: 0 0 0 1px var(--accent-gold);
}

.checkbox {
    width: 1.25rem;
    height: 1.25rem;
    border: 2px solid var(--border-color-hover);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 0.125rem;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.checkbox.checked {
    background: var(--accent-gold);
    border-color: var(--accent-gold);
    transform: rotate(360deg);
}

.checkbox-check {
    color: var(--accent-primary);
    font-size: 0.75rem;
    font-weight: 900;
    opacity: 0;
    transform: scale(0);
    transition: all 0.2s ease;
}

.checkbox.checked .checkbox-check {
    opacity: 1;
    transform: scale(1);
}

.video-option-text h4 {
    font-weight: 700;
    margin-bottom: 0.375rem;
    color: var(--text-primary);
    font-size: 1rem;
}

.video-option-text p {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.form-divider {
    margin: 2rem 0;
    padding-top: 2rem;
    border-top: 1px solid var(--glass-border);
}

.form-submit-bar {
    width: 100%;
}

.form-submit-btn {
    width: 100%;
    justify-content: center;
    padding: 1rem 1.15rem;
}

/* ========================================
   HELP TEXT & NOTIFICATIONS
======================================== */
.help-banner {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(16, 185, 129, 0.1));
    border: 1px solid var(--accent-info);
    border-radius: var(--radius-md);
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.help-banner-icon {
    font-size: 1.25rem;
    flex-shrink: 0;
}

.help-banner-content p {
    font-size: 0.9375rem;
    color: var(--text-primary);
    line-height: 1.5;
    margin: 0;
}

.help-banner-content strong {
    font-weight: 600;
    color: var(--accent-primary);
}

#step-details .help-banner {
    justify-content: center;
}

#step-details .help-banner .help-banner-content p {
    text-align: center;
}

/* ========================================
   NEW FEATURES - INTEGRATED
======================================== */

/* --- Roadmap Styles (Step 5) --- */
.roadmap-box {
    background: rgba(1, 57, 81, 0.03);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    border: 1px dashed var(--accent-gold);
}

.roadmap-title {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--accent-primary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1.25rem;
    text-align: center;
}

.roadmap-steps-container {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

.roadmap-item {
    flex: 1;
    text-align: center;
    position: relative;
}

.roadmap-number {
    width: 28px;
    height: 28px;
    background: var(--accent-primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    margin: 0 auto 0.5rem;
}

.roadmap-text {
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.2;
    color: var(--text-primary);
}

.roadmap-text span {
    font-weight: 400;
    color: var(--text-muted);
    font-size: 0.7rem;
}

/* --- Psychological Pricing UI --- */
.price-anchor-note {
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    padding: 0.75rem;
    margin-bottom: 1rem;
    font-size: 0.85rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-left: 4px solid var(--accent-gold);
}

.agency-price {
    text-decoration: line-through;
    color: #dc3545; /* Red for high anchor */
    font-weight: 600;
}

.our-price {
    color: #28a745; /* Green for your price */
    font-weight: 700;
}

.bundle-highlight-box {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.1) 0%, rgba(255, 255, 255, 0) 100%);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: var(--radius-md);
    padding: 1rem;
    margin: 1rem 0;
    font-size: 0.85rem;
    color: #856404;
    line-height: 1.4;
    animation: fadeInSlide 0.4s ease-out;
}

@keyframes fadeInSlide {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- Expert Recommendations --- */
.config-option.popular-choice {
    border-color: var(--accent-gold);
    position: relative;
    overflow: hidden;
}

/* Override for capability popular badge */
.config-option .popular-badge {
    position: absolute;
    top: 0;
    right: 0;
    background: var(--accent-gold);
    color: white;
    font-size: 0.6rem;
    font-weight: 600;
    padding: 2px 8px;
    border-bottom-left-radius: 8px;
    text-transform: uppercase;
    top: -0.625rem; /* Align with existing popular badge position */
    left: auto; /* Override left positioning */
    transform: none; /* Remove transform */
    width: auto;
    height: auto;
}

.recommendation-tag {
    display: inline-block;
    background: var(--accent-primary);
    color: white;
    font-size: 0.65rem;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 5px;
    vertical-align: middle;
}

/* --- Premium Form Layout --- */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.primary-cta-btn {
    background: linear-gradient(135deg, var(--accent-primary) 0%, #025a81 100%);
    color: white;
    font-weight: 700;
    font-size: 1rem;
    padding: 1.25rem;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(1, 57, 81, 0.2);
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    width: 100%;
    justify-content: center;
}

.primary-cta-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(1, 57, 81, 0.3);
}

.btn-outline-sm {
    padding: 0.5rem 1rem;
    font-size: 0.75rem;
    border: 1px solid var(--border-color);
    background: transparent;
    cursor: pointer;
    border-radius: 6px;
    color: var(--text-secondary);
    transition: all 0.2s ease;
}

.btn-outline-sm:hover {
    border-color: var(--accent-gold);
    color: var(--accent-primary);
}

/* ========================================
   RESPONSIVE
======================================== */
@media (max-width: 1023px) {
    .estimator-layout {
        grid-template-columns: 1fr;
    }

    .estimator-sidebar {
        order: -1;
    }

    .estimator-main {
        order: 1;
    }
}

@media (max-width: 768px) {
    html, body {
        overflow-x: hidden;
    }

    #estimator-app,
    .main-content,
    .content-wrapper,
    .estimator-layout,
    .estimator-main,
    .estimator-sidebar {
        max-width: 100%;
        min-width: 0;
    }

    .progress-section {
        padding: 1.5rem 1rem;
    }

    .progress-steps {
        gap: 0;
    }
    
    .step-circle {
        width: 2.25rem;
        height: 2.25rem;
        font-size: 0.75rem;
    }
    
    .step-label {
        font-size: 0.6875rem;
        margin-top: 0.5rem;
    }

    .progress-line,
    .progress-line-active {
        left: 1rem;
        right: 1rem;
    }

    .step-header {
        padding: 1rem;
    }

    .step-header h2 {
        font-size: 1.1rem;
    }

    .step-body {
        padding: 0.85rem;
    }

    .step-footer {
        padding: 1rem;
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .step-footer .btn {
        width: 100%;
        justify-content: center;
    }
    
    .service-card {
        padding: 1.25rem;
        min-height: 44px;
    }

    .service-tabs {
        padding: 1rem 1.5rem 0;
        flex-wrap: nowrap;
        overflow-x: auto;
        overflow-y: hidden;
        scrollbar-width: none;
        -ms-overflow-style: none;
        -webkit-overflow-scrolling: touch;
    }

    .service-tabs::-webkit-scrollbar {
        display: none;
    }

    .service-tab {
        padding: 0.625rem 1rem;
        font-size: 0.875rem;
        margin-bottom: 0.75rem;
        flex: 0 0 auto;
        min-height: 44px;
        white-space: normal;
        text-align: center;
    }

    .service-tabs.two-col-layout .service-tab {
        max-width: none;
    }

    .details-tabs-hint {
        margin: 0.85rem 1.5rem 0.35rem;
        justify-content: center;
        font-size: 0.75rem;
    }

    .option-title,
    .option-subtitle,
    .option-description,
    .detail-value,
    .pricing-value,
    .total-amount {
        overflow-wrap: anywhere;
        word-break: normal;
    }

    /* Mobile font-size consistency */
    .step-header p,
    .tab-section > p,
    .help-banner-content p {
        font-size: 0.9rem;
        line-height: 1.45;
    }

    .option-price,
    .list-expand-note,
    .total-period,
    .scope-note {
        font-size: 0.78rem;
    }

    .see-more-toggle {
        font-size: 0.78rem !important;
    }

    .tab-content {
        padding: 1rem;
    }

    .invoice-card {
        padding: 1.25rem;
    }

    .summary-content {
        padding: 1rem;
    }

    .invoice-header {
        flex-direction: column;
        gap: 1.5rem;
    }

    .invoice-number {
        text-align: left;
    }

    .line-item-price {
        font-size: 1.25rem;
    }

    .total-value.grand {
        font-size: 2rem;
        white-space: normal;
        overflow-wrap: anywhere;
    }

    #step-contact .quote-form {
        position: static;
        width: 100%;
        max-width: none;
        padding: 0.75rem;
        background: transparent;
        border: none;
        box-shadow: none;
    }

    #step-contact .quote-grid {
        max-width: 100%;
        gap: 0.75rem;
    }

    #quote-form {
        width: 100%;
    }

    #step-contact .form-group {
        width: 100%;
        margin-bottom: 0.75rem;
    }

    .total-amount {
        font-size: 2rem;
    }

    .total-row.grand-total {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.35rem;
    }

    .estimator-sidebar {
        order: -1;
    }

    /* Responsive adjustments for new features */
    #step-contact .form-row {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .form-input {
        width: 100% !important;
        padding: 0.85rem 0.9rem;
        font-size: 0.95rem;
        line-height: 1.35;
    }

    .form-input::placeholder {
        font-size: 0.95rem;
    }

    .form-textarea {
        min-height: 5rem;
    }

    #step-contact .form-submit-bar {
        position: sticky;
        bottom: 0;
        left: 0;
        right: 0;
        margin: 0 -0.75rem;
        padding: 0.55rem 0.75rem calc(0.55rem + env(safe-area-inset-bottom));
        background: rgba(255, 255, 255, 0.96);
        border-top: 1px solid var(--glass-border);
        backdrop-filter: blur(3px);
        z-index: 20;
    }

    #step-contact .form-submit-btn {
        min-height: 48px;
    }

    #step-contact .help-banner,
    #step-contact .roadmap-box {
        margin-bottom: 1rem;
    }

    #step-contact .roadmap-box {
        padding: 1rem;
        background: transparent;
    }

    .roadmap-steps-container {
        flex-direction: column;
        gap: 1.5rem;
    }

    .roadmap-item {
        display: flex;
        align-items: center;
        text-align: left;
        gap: 1rem;
    }

    .roadmap-number {
        margin: 0;
        flex-shrink: 0;
    }

    .price-anchor-note {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    /* Hide hover tooltips on mobile to prevent cramped cards */
    .service-card::after,
    .config-option::after,
    .video-option::after {
        content: none;
    }
}

/* ========================================
   MOBILE LANDSCAPE OPTIMIZATION
======================================== */
@media (max-width: 1023px) and (orientation: landscape) {
    .estimator-layout {
        grid-template-columns: 1fr 360px;
        gap: 1.5rem;
        align-items: start;
    }

    .estimator-sidebar {
        order: 2;
    }

    .estimator-main {
        order: 1;
    }

    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .config-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}


/* ========================================
   GLOBAL CARD INTERACTIVE STATES
   Targets: Services, Scope Options, and Video Options
======================================== */

/* 1. Base Transition for all cards */
.service-card, 
.config-option, 
.video-option {
    border-width: 2px;
    border-radius: var(--radius-md);
    transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease, background-color 0.18s ease !important;
    position: relative;
    user-select: none;
    min-height: 44px;
}

/* 2. Hover State - The "Lift" effect */
.service-card:hover, 
.config-option:hover, 
.video-option:hover {
    transform: translateY(-1px);
    border-color: var(--accent-gold) !important;
    box-shadow: 0 4px 12px rgba(1, 57, 81, 0.08);
}

/* 3. Click/Active State - The "Button Press" effect */
.service-card:active, 
.config-option:active, 
.video-option:active {
    transform: translateY(0) scale(0.995);
    transition: transform 0.1s !important;
}

/* 4. Selected State - The "Button On" look */
.service-card.selected, 
.config-option.selected, 
.video-option.selected {
    background-color: var(--bg-selected) !important;
    border-color: var(--accent-gold) !important;
    box-shadow: 0 0 0 1px var(--accent-gold), 0 4px 12px rgba(212, 175, 55, 0.16) !important;
    transform: none;
}

/* 5. Tooltip Hints (Click to select / Selected) */
.service-card::after,
.config-option::after,
.video-option::after {
    content: 'Click to select';
    position: absolute;
    bottom: 8px;
    right: 12px;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
}

/* Show "Click to select" on hover if NOT selected */
.service-card:hover:not(.selected)::after,
.config-option:hover:not(.selected)::after,
.video-option:hover:not(.selected)::after {
    opacity: 1;
}

/* Show "Selected" permanently when card is active */
.service-card.selected::after,
.config-option.selected::after,
.video-option.selected::after {
    content: 'Selected';
    color: var(--accent-gold);
    opacity: 1;
}

/* Keep video option clean: no helper tooltip text */
.video-option::after,
.video-option:hover:not(.selected)::after,
.video-option.selected::after {
    content: none !important;
    opacity: 0 !important;
}

.see-more-toggle {
    min-height: 44px;
    border-radius: 8px;
}


/* ========================================
   UTILITIES
======================================== */
.hidden {
    display: none !important;
}

.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Submit-only loading overlay (real network request) */
#estimator-app.loading {
    position: relative;
    cursor: progress;
}

#estimator-app.loading::after {
    content: 'Submitting...';
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--accent-primary);
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(2px);
    border-radius: inherit;
    letter-spacing: 0.01em;
    z-index: 999;
}


/* Number Counter Animation */
@keyframes countUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.count-animation {
    animation: countUp 0.5s ease-out;
}


/* ========================================
   STEP 4 (REVIEW) + RIGHT SUMMARY — CONSISTENCY PATCH
   Append-only. Do NOT remove existing CSS.
======================================== */

/* ---------- STEP 4: Invoice structure (matches your theme tokens) ---------- */

/* ---------- Project Scope block ---------- */
.scope-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 768px) {
  .scope-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.scope-item {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
}

.scope-label {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}

.scope-value {
  font-size: 1rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.scope-note {
  margin-top: 0.35rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

/* ---------- Selected Services block (this is what looks “unstyled” in your screenshot) ---------- */
.invoice-service {
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin-bottom: 1rem;
  background: white;
}

.invoice-service:last-child {
  margin-bottom: 0;
}

.service-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 0.9rem;
  border-bottom: 1px solid var(--glass-border);
}

.service-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.service-title h4 {
  font-size: 1.125rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.01em;
  margin: 0;
}

.service-icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--radius-sm);
  background: var(--bg-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.service-price {
  font-size: 1.25rem;
  font-weight: 900;
  color: var(--accent-primary);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.price-period {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-left: 0.35rem;
}

/* Monthly badge to match your badges */
.monthly-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  font-size: 0.625rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(59, 130, 246, 0.12);
  color: var(--accent-info);
  border: 1px solid rgba(59, 130, 246, 0.35);
}

/* Breakdown list (the “Funnels & Websites +$297” rows) */
.service-breakdown {
  margin-top: 0.9rem;
  background: rgba(212, 175, 55, 0.06);
  border: 1px solid rgba(212, 175, 55, 0.22);
  border-left: 3px solid var(--accent-gold);
  border-radius: var(--radius-md);
  padding: 0.9rem 1rem;
}

.breakdown-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.45rem 0;
  margin: 0;
  border-bottom: 1px dashed rgba(1, 57, 81, 0.12);
}

.breakdown-item:last-child {
  border-bottom: none;
}

.breakdown-name {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  font-weight: 600;
}

.breakdown-price {
  font-size: 0.9375rem;
  color: var(--text-primary);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* Service Level row (Premium/Luxury) */
.service-level {
  margin-top: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 1rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
}

.level-name {
  font-size: 0.9375rem;
  font-weight: 800;
  color: var(--text-primary);
}

.level-price {
  font-size: 0.9375rem;
  font-weight: 900;
  color: var(--accent-primary);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* ---------- Totals + Bundle savings ---------- */
.discount-row .discount {
  color: #dc3545;
  font-weight: 900;
}

.bundle-savings {
  margin-top: 0.75rem;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-md);
  background: white;
  border: 1px solid var(--border-color);
}

.bundle-savings-title {
  font-size: 0.8125rem;
  font-weight: 900;
  color: var(--text-primary);
  margin-bottom: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.bundle-item {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.35rem 0;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.bundle-savings-amount {
  font-weight: 900;
  color: var(--accent-primary);
  font-variant-numeric: tabular-nums;
}

/* Western value anchor matches system */
.price-anchor {
  margin-top: 1.25rem;
  background: rgba(1, 57, 81, 0.02);
  border-top: none;
  border-right: none;
  border-bottom: none;
  border-left: 3px solid var(--accent-gold);
  border-radius: 0;
  padding: 1rem 1.25rem;
  box-shadow: none;
}

.anchor-label {
  font-size: 0.8125rem;
  font-weight: 900;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.anchor-value {
  margin-top: 0.35rem; display: inline-block; padding: 0.15rem 0.55rem; border-radius: 8px;
  font-size: 1.5rem; background: transparent;
  font-weight: 900; text-decoration: line-through; text-decoration-thickness: 2px; text-decoration-color: #dc3545;
  color: #dc3545;
  font-variant-numeric: tabular-nums;
}

.anchor-note {
  margin-top: 0.25rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* ---------- Timeline block (was showing as plain text) ---------- */
.timeline-section {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 2px solid var(--glass-border);
}

.timeline-content {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}

@media (min-width: 768px) {
  .timeline-content {
    grid-template-columns: repeat(2, 1fr);
  }
}

.timeline-item {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  padding: 1rem 1.25rem;
  border-radius: var(--radius-md);
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
}

.timeline-icon {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: var(--radius-sm);
  background: rgba(212, 175, 55, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.timeline-label {
  font-size: 0.8125rem;
  font-weight: 800;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.timeline-value {
  margin-top: 0.25rem;
  font-size: 0.9375rem;
  font-weight: 800;
  color: var(--text-primary);
}

/* ---------- RIGHT SIDE: Investment Summary consistency ---------- */

/* make the “Services (x)” header match invoice micro-headers */
.services-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  font-weight: 900;
  color: var(--text-muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

/* align prices perfectly and match numeric styling */
.service-price {
  font-variant-numeric: tabular-nums;
}

.pricing-item {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding: 0.6rem 0;
}

.pricing-label {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text-secondary);
}

.pricing-value {
  font-size: 0.95rem;
  font-weight: 900;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.pricing-item.discount .pricing-value {
  color: #dc3545;
}

/* tighten the “Base Estimate” block typography */
.total-left .total-label {
  font-size: 0.875rem;
  font-weight: 800;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.total-left .total-subtitle {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

/* ---------- Mobile spacing tweaks for Step 4 ---------- */
@media (max-width: 768px) {
  #step-review .step-body {
    padding: 0.75rem;
  }

  #step-review .invoice-card {
    padding: 1rem;
  }

  #step-review .invoice-service {
    padding: 0.75rem 0;
    margin-bottom: 0.35rem;
    background: transparent;
    border: none;
    border-top: 1px solid var(--glass-border);
    border-radius: 0;
  }

  #step-review .invoice-service-mobile {
    margin-bottom: 0.9rem;
  }

  #step-review .service-header-mobile {
    border-bottom: none;
    padding-bottom: 0.35rem;
    gap: 0.35rem;
  }

  #step-review .service-rows {
    border-top: 1px solid var(--glass-border);
    margin-top: 0.2rem;
    padding-top: 0.4rem;
  }

  #step-review .service-meta-row {
    margin-top: 0.4rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
  }

  #step-review .invoice-service:first-of-type {
    border-top: none;
    padding-top: 0.35rem;
  }

  #step-review .service-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    padding-bottom: 0.5rem;
  }

  #step-review .service-title h4 {
    font-size: 1.05rem;
    line-height: 1.25;
  }

  #step-review .service-price {
    font-size: 1rem;
    white-space: nowrap;
    overflow-wrap: normal;
  }

  .invoice-totals {
    padding: 0;
    margin-top: 1.25rem;
    background: transparent;
    border: none;
    border-radius: 0;
  }

  .total-row {
    margin-bottom: 0.75rem;
    align-items: baseline;
  }

  .total-row:last-child {
    padding-top: 1rem;
    margin-top: 0.75rem;
    border-top: 1px solid var(--border-color);
  }

  .total-label {
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.35;
  }

  .total-label.grand {
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.3;
  }

  .total-period {
    font-size: 0.82rem;
    line-height: 1.4;
  }

  .estimate-note,
  .anchor-note {
    font-size: 0.82rem;
    line-height: 1.45;
  }

  .total-value {
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.25;
  }

  .total-value.grand {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.01em;
  }

  #step-review .service-price {
    font-size: 1.125rem;
    white-space: nowrap;
    overflow-wrap: normal;
  }

  #step-review .breakdown-price {
    white-space: nowrap;
    overflow-wrap: normal;
  }

  .pricing-value {
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .total-value.grand {
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .anchor-value {
    font-size: 1.6rem;
    font-weight: 800;
    line-height: 1.15;
  }

  .price-anchor {
    margin-top: 1rem;
    background: transparent;
    border: none;
    border-left: 3px solid var(--accent-gold);
    border-radius: 0;
    padding: 0.75rem 0 0.75rem 0.9rem;
  }

  .anchor-label {
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    line-height: 1.35;
  }

  /* Flatten nested look in Step 4 service details on mobile */
  #step-review .service-breakdown {
    background: transparent;
    border: none;
    border-top: 1px solid var(--glass-border);
    border-left: none;
    border-radius: 0;
    padding: 0.6rem 0 0;
  }

  #step-review .breakdown-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 0.5rem;
    padding: 0.35rem 0;
  }

  #step-review .breakdown-name {
    font-size: 0.86rem;
    line-height: 1.35;
  }

  #step-review .breakdown-price {
    font-size: 0.86rem;
    white-space: nowrap;
    overflow-wrap: normal;
    text-align: right;
  }

  #step-review .service-level {
    margin-top: 0.65rem;
    padding: 0.5rem 0;
    background: transparent;
    border: none;
    border-top: 1px solid var(--glass-border);
    border-radius: 0;
  }

  #step-review .scope-item,
  #step-review .timeline-item {
    padding: 0.85rem 1rem;
  }
}

/* ========================================
   LOADING OVERLAY (Used on Final Submit)
======================================== */
body.is-loading {
  cursor: progress;
}

.loading-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: rgba(6, 18, 26, 0.65);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
  z-index: 99999;
}

.loading-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.loading-panel {
  width: min(420px, 100%);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  padding: 1.25rem 1.25rem 1rem;
  text-align: center;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
}

.loading-spinner {
  width: 44px;
  height: 44px;
  margin: 0 auto 0.75rem;
  border-radius: 9999px;
  border: 3px solid rgba(255, 255, 255, 0.22);
  border-top-color: var(--accent-gold);
  animation: mt-spin 0.9s linear infinite;
}

.loading-text {
  color: var(--text-primary);
  font-weight: 800;
  letter-spacing: 0.02em;
}

@keyframes mt-spin {
  to { transform: rotate(360deg); }
}


/* ========================================
   STEP TRANSITION - FADE OUT SUPPORT
   (Your CSS already fades IN via .step-content.active.
    This adds the missing fade OUT hook used by ui.js.)
======================================== */
.step-content.exiting {
    display: block;
    animation: fadeOutDown 0.26s cubic-bezier(0.22, 1, 0.36, 1) forwards;
    will-change: opacity, transform;
    pointer-events: none;
}

@keyframes fadeOutDown {
    from { opacity: 1; transform: translateY(0); }
    to   { opacity: 0; transform: translateY(10px); }
}

@media (prefers-reduced-motion: reduce) {
    .step-content.exiting {
        animation: none !important;
    }

    .service-card,
    .config-option,
    .video-option,
    .service-tab,
    .btn,
    .list-expand-btn {
        transition: none !important;
    }

    .service-card:hover,
    .config-option:hover,
    .video-option:hover,
    .service-card:active,
    .config-option:active,
    .video-option:active {
        transform: none !important;
    }
}


/* ========================================
   STEP MICROCOPY - FADE IN/OUT (Help Banner)
======================================== */
.help-banner-content p.microcopy-fade {
    transition: opacity 160ms ease, transform 160ms ease;
    will-change: opacity, transform;
}

.help-banner-content p.microcopy-fade.microcopy-hidden {
    opacity: 0;
    transform: translateY(6px);
}

@media (prefers-reduced-motion: reduce) {
    .help-banner-content p.microcopy-fade {
        transition: none !important;
    }
}

/* ========================================
   CONSOLIDATED POLISH UTILITIES
======================================== */
@media (min-width: 560px) and (max-width: 768px) {
    #industry-grid.config-grid.three-col,
    [id^="addons-"].config-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    #industry-grid .config-option {
        min-height: 150px;
        padding: 1rem;
    }
}

@media (max-width: 768px) {
    /* Step 3 swipe cue */
    .service-tabs {
        -webkit-mask-image: linear-gradient(to right, transparent 0, #000 16px, #000 calc(100% - 16px), transparent 100%);
        mask-image: linear-gradient(to right, transparent 0, #000 16px, #000 calc(100% - 16px), transparent 100%);
    }

    /* Scope/Add-ons readability */
    #industry-grid .config-option,
    [id^="addons-"].config-grid .config-option {
        gap: 0.45rem;
    }

    #industry-grid .option-icon,
    [id^="addons-"] .option-icon {
        font-size: 1.2rem;
    }

    #industry-grid .option-title,
    [id^="addons-"] .option-title {
        font-size: 0.86rem;
        line-height: 1.3;
    }

    #industry-grid .option-subtitle,
    [id^="addons-"] .option-description {
        font-size: 0.76rem;
        line-height: 1.35;
    }
}

@media (hover: none), (pointer: coarse) {
    .service-card:hover,
    .config-option:hover,
    .video-option:hover,
    .btn-primary:hover:not(:disabled),
    .list-expand-btn:hover {
        transform: none;
        box-shadow: none;
    }

    .service-card::after,
    .config-option::after,
    .video-option::after {
        content: none !important;
    }
}

/* Sidebar total overflow safety on narrow devices */
@media (max-width: 480px) {
    .summary-card .total-display {
        display: grid;
        grid-template-columns: 1fr;
        gap: 0.35rem;
        align-items: start;
    }

    .summary-card .total-right {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
    }

    .summary-card .total-amount {
        white-space: normal;
        overflow-wrap: anywhere;
        word-break: normal;
        line-height: 1.1;
        font-size: clamp(1.45rem, 7.8vw, 1.95rem);
    }
}

@media (max-width: 390px) {
    .summary-card .total-amount {
        font-size: clamp(1.32rem, 7.2vw, 1.7rem);
    }
}
