/* ==========================================================================
   AIRES - Minimalist Black & White Design System
   A smooth, modern interface with progressive form disclosure
   ========================================================================== */

/* --------------------------------------------------------------------------
   CSS Custom Properties (Design Tokens)
   -------------------------------------------------------------------------- */
:root {
    /* Colors - Light Mode */
    --color-bg: #ffffff;
    --color-bg-subtle: #fafafa;
    --color-bg-muted: #f5f5f5;
    --color-surface: #ffffff;
    --color-border: #e5e5e5;
    --color-border-strong: #d4d4d4;

    --color-text: #171717;
    --color-text-secondary: #525252;
    --color-text-muted: #a3a3a3;
    --color-text-inverse: #ffffff;

    --color-accent: #171717;
    --color-accent-hover: #404040;
    --color-accent-subtle: #f5f5f5;

    --color-success: #22c55e;
    --color-error: #ef4444;

    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;

    /* Typography - Classic gothic + modern blend */
    --font-sans: 'Source Sans 3', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    --font-display: 'Playfair Display', Georgia, 'Times New Roman', serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', Consolas, monospace;

    --text-xs: 0.75rem;
    --text-sm: 0.875rem;
    --text-base: 1rem;
    --text-lg: 1.125rem;
    --text-xl: 1.25rem;
    --text-2xl: 1.5rem;
    --text-3xl: 2rem;
    --text-4xl: 2.5rem;
    --text-5xl: 3rem;
    --text-6xl: 3.5rem;

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);

    /* Animation Timing */
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
    --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
    --ease-in-out: cubic-bezier(0.45, 0, 0.55, 1);
    --duration-fast: 0.2s;
    --duration-normal: 0.3s;
    --duration-slow: 0.5s;
    --duration-slower: 0.7s;
    --text-4xl: 2.5rem;

    --font-normal: 400;
    --font-medium: 500;
    --font-semibold: 600;
    --font-bold: 700;

    /* Borders & Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-full: 9999px;

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
    --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.16);

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 250ms ease;
    --transition-slow: 400ms ease;

    /* Z-index layers */
    --z-base: 0;
    --z-dropdown: 100;
    --z-sticky: 200;
    --z-modal: 300;
    --z-toast: 400;
}

/* Dark Mode */
.dark {
    --color-bg: #0a0a0a;
    --color-bg-subtle: #141414;
    --color-bg-muted: #1a1a1a;
    --color-surface: #141414;
    --color-border: #262626;
    --color-border-strong: #404040;

    --color-text: #fafafa;
    --color-text-secondary: #a3a3a3;
    --color-text-muted: #525252;
    --color-text-inverse: #171717;

    --color-accent: #fafafa;
    --color-accent-hover: #d4d4d4;
    --color-accent-subtle: #262626;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.4);
    --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.5);
}

/* --------------------------------------------------------------------------
   Base Reset
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    /* Prevent FOUC - Flash of Unstyled Content */
    color-scheme: light dark;
}

/* Prevent initial flash - set theme colors immediately */
html:not(.dark) {
    background-color: #ffffff;
    color: #1a1a1a;
}

html.dark {
    background-color: #0a0a0a;
    color: #fafafa;
}

/* --------------------------------------------------------------------------
   Typography - Organic & Dynamic
   -------------------------------------------------------------------------- */
body {
    font-family: var(--font-sans);
    font-size: var(--text-base);
    line-height: 1.6;
    color: var(--color-text);
    background: var(--color-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Light mode gradient background */
html:not(.dark) body {
    background: linear-gradient(135deg, #fafafa 0%, #ffffff 50%, #f5f5f5 100%);
    background-attachment: fixed;
}

/* Dark mode solid background */
html.dark body {
    background: #0a0a0a;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    margin: 0;
    font-family: var(--font-display);
    font-weight: var(--font-bold);
    line-height: 1.2;
    letter-spacing: -0.02em;
}

h1 {
    font-size: var(--text-3xl);
    font-weight: var(--font-bold);
}

h2 {
    font-size: var(--text-2xl);
    font-weight: 700;
}

h3 {
    font-size: var(--text-xl);
    font-weight: 600;
}

h4 {
    font-size: var(--text-lg);
    font-weight: 600;
}

p {
    margin: 0;
    line-height: 1.65;
}

a {
    color: var(--color-text);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--color-text-secondary);
}

/* Add slight text variations for organic feel */
.mode-title,
.quick-title {
    font-weight: 700;
    letter-spacing: -0.025em;
    line-height: 1.15;
}

.mode-subtitle,
.quick-subtitle {
    font-weight: 400;
    letter-spacing: -0.005em;
    opacity: 0.9;
}

.mode-card-title,
.style-name,
.tier-name {
    font-weight: 600;
    letter-spacing: -0.01em;
}

.mode-card-desc,
.style-desc,
.tier-desc {
    font-weight: 400;
    line-height: 1.5;
    letter-spacing: 0em;
}

/* City card text contrast */
.city-name {
    font-weight: 700;
    letter-spacing: -0.02em;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.city-province,
.city-tag {
    font-weight: 500;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* Button text */
button {
    font-family: inherit;
    letter-spacing: -0.01em;
}

.btn {
    font-weight: 500;
}

.btn-primary {
    font-weight: 600;
}

/* Preset Buttons */
.btn-preset {
    padding: var(--space-xs) var(--space-md);
    background: var(--color-bg-muted);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-full);
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-preset:hover {
    background: var(--color-accent);
    color: var(--color-text-inverse);
    border-color: var(--color-accent);
    transform: translateY(-1px);
}

/* Form labels with personality */
.form-label {
    font-weight: 500;
    letter-spacing: -0.005em;
}

/* --------------------------------------------------------------------------
   Layout
   -------------------------------------------------------------------------- */
.app-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: var(--space-lg);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

@media (min-width: 768px) {
    .app-container {
        padding: var(--space-2xl) var(--space-xl);
    }
}

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */
.app-header {
    text-align: center;
    margin-bottom: var(--space-2xl);
    padding-bottom: var(--space-xl);
    border-bottom: 1px solid var(--color-border);
}

.app-title {
    font-size: var(--text-3xl);
    font-weight: var(--font-bold);
    letter-spacing: -0.025em;
    margin-bottom: var(--space-sm);
}

.app-subtitle {
    font-size: var(--text-base);
    color: var(--color-text-secondary);
}

.header-actions {
    display: flex;
    justify-content: center;
    gap: var(--space-md);
    margin-top: var(--space-lg);
}

/* --------------------------------------------------------------------------
   Progress Bar
   -------------------------------------------------------------------------- */
.progress-container {
    margin-bottom: var(--space-2xl);
}

.progress-steps {
    display: flex;
    justify-content: space-between;
    position: relative;
}

.progress-steps::before {
    content: '';
    position: absolute;
    top: 16px;
    left: 40px;
    right: 40px;
    height: 2px;
    background: var(--color-border);
    z-index: 0;
}

.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
    z-index: 1;
}

.progress-dot {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-full);
    background: var(--color-bg);
    border: 2px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--text-sm);
    font-weight: var(--font-semibold);
    color: var(--color-text-muted);
    transition: all var(--transition-base);
}

.progress-step.active .progress-dot {
    background: var(--color-accent);
    border-color: var(--color-accent);
    color: var(--color-text-inverse);
}

.progress-step.completed .progress-dot {
    background: var(--color-accent);
    border-color: var(--color-accent);
    color: var(--color-text-inverse);
}

.progress-step.completed .progress-dot::after {
    content: '✓';
}

.progress-label {
    font-size: var(--text-xs);
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: color var(--transition-base);
}

.progress-step.active .progress-label,
.progress-step.completed .progress-label {
    color: var(--color-text);
}

@media (max-width: 640px) {
    .progress-label {
        display: none;
    }

    .progress-steps::before {
        left: 20px;
        right: 20px;
    }
}

/* --------------------------------------------------------------------------
   Form Steps Container
   -------------------------------------------------------------------------- */
.steps-wrapper {
    flex: 1;
}

.step-container {
    background: var(--color-surface);
    border: 2px solid var(--color-border);
    border-radius: 1rem;
    margin-bottom: var(--space-lg);
    overflow: visible;
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    transform-origin: top center;
}

html:not(.dark) .step-container {
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

html.dark .step-container {
    background: #141414;
    border-color: #262626;
}

.step-container.locked {
    opacity: 0.35;
    pointer-events: none;
    transform: scale(0.98);
}

.step-container.active {
    border-color: var(--color-accent);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    transform: scale(1);
}

html.dark .step-container.active {
    border-color: #fff;
    box-shadow: 0 8px 32px rgba(255, 255, 255, 0.08);
}

.step-container.collapsed {
    opacity: 1;
    cursor: pointer;
}

.step-container.collapsed:hover {
    border-color: var(--color-accent);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

html.dark .step-container.collapsed:hover {
    border-color: #fff;
    box-shadow: 0 6px 20px rgba(255, 255, 255, 0.06);
}

/* Content visibility with smooth animations */
.step-container .step-content {
    opacity: 1;
    max-height: none;
    padding: var(--space-lg);
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    transform: translateY(0);
    overflow: visible;
}

.step-container.collapsed .step-content,
.step-container .step-content.hidden {
    opacity: 0;
    max-height: 0;
    padding: 0 var(--space-lg);
    overflow: hidden;
    transform: translateY(-10px);
}

/* Preview shows when collapsed */
.step-container .step-preview {
    opacity: 0;
    max-height: 0;
    padding: 0 var(--space-lg);
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.step-container.collapsed .step-preview {
    opacity: 1;
    max-height: 80px;
    padding: var(--space-md) var(--space-lg);
    display: flex;
    align-items: center;
    gap: var(--space-md);
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
    background: transparent;
}

.step-preview-summary {
    font-weight: 600;
    color: var(--color-text);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.step-preview-summary::before {
    content: '✓';
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    font-size: 10px;
    background: var(--color-accent);
    color: var(--color-text-inverse);
    border-radius: 50%;
}

html.dark .step-preview-summary::before {
    background: #fff;
    color: #000;
}

/* Actions visibility */
.step-container .step-actions {
    opacity: 1;
    max-height: 200px;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) 0.1s;
}

.step-container.collapsed .step-actions,
.step-container .step-actions.hidden {
    opacity: 0;
    max-height: 0;
    margin: 0;
    padding: 0;
    border: none;
    overflow: hidden;
}

/* --------------------------------------------------------------------------
   Step Header - Redesigned
   -------------------------------------------------------------------------- */
.step-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-lg);
    background: transparent;
    border-bottom: 1px solid transparent;
    transition: all 0.3s ease;
}

.step-container.active .step-header {
    border-bottom-color: var(--color-border);
}

.step-info {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.step-badge {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--color-bg-muted);
    color: var(--color-text);
    border: 2px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--text-base);
    font-weight: 700;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.step-container.active .step-badge {
    background: var(--color-accent);
    color: var(--color-text-inverse);
    border-color: var(--color-accent);
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

html.dark .step-container.active .step-badge {
    background: #fff;
    color: #000;
    border-color: #fff;
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.15);
}

.step-container.collapsed .step-badge {
    background: var(--color-accent);
    color: var(--color-text-inverse);
    border-color: var(--color-accent);
}

html.dark .step-container.collapsed .step-badge {
    background: #fff;
    color: #000;
    border-color: #fff;
}

.step-title {
    font-size: var(--text-lg);
    font-weight: 600;
    margin: 0;
    transition: color 0.3s ease;
}

.step-container.active .step-title {
    color: var(--color-text);
}

.step-container.collapsed .step-title {
    color: var(--color-text);
}

.step-container.locked .step-title {
    color: var(--color-text-muted);
}

.step-desc {
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
    margin: 0;
    transition: opacity 0.3s ease;
}

.step-container.collapsed .step-desc {
    opacity: 0.7;
}

/* --------------------------------------------------------------------------
   Step Content
   -------------------------------------------------------------------------- */
.step-content {
    padding: var(--space-xl);
}

.step-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: var(--space-xl);
    margin-top: var(--space-lg);
    border-top: 1px solid var(--color-border);
}

/* --------------------------------------------------------------------------
   Form Elements
   -------------------------------------------------------------------------- */
.form-grid {
    display: grid;
    gap: var(--space-lg);
}

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

.form-grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.form-grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 768px) {

    .form-grid-2,
    .form-grid-3,
    .form-grid-4 {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 768px) and (max-width: 1024px) {

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

.form-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
    animation: slideInUp 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) backwards;
}

.form-group:nth-child(1) {
    animation-delay: 0.05s;
}

.form-group:nth-child(2) {
    animation-delay: 0.1s;
}

.form-group:nth-child(3) {
    animation-delay: 0.15s;
}

.form-group:nth-child(4) {
    animation-delay: 0.2s;
}

.form-group:nth-child(5) {
    animation-delay: 0.25s;
}

.form-group:nth-child(6) {
    animation-delay: 0.3s;
}

.form-group:nth-child(7) {
    animation-delay: 0.35s;
}

.form-group:nth-child(8) {
    animation-delay: 0.4s;
}

.form-label {
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    color: var(--color-text);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.form-group:focus-within .form-label {
    color: #000;
    transform: translateX(3px);
    font-weight: 600;
}

.form-input,
.form-select {
    width: 100%;
    padding: var(--space-sm) var(--space-md);
    font-size: var(--text-base);
    font-family: inherit;
    color: var(--color-text);
    background: var(--color-surface);
    border: 2px solid var(--color-border);
    border-radius: 0.75rem;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    -webkit-appearance: none;
    appearance: none;
    box-shadow: var(--shadow-sm);
}

.form-input:hover,
.form-select:hover {
    border-color: var(--color-border-strong);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
    transform: translateY(-1px);
}

.form-input:focus,
.form-select:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 4px var(--color-accent-subtle), var(--shadow-md);
    transform: translateY(-2px);
}

html:not(.dark) .form-input:focus,
html:not(.dark) .form-select:focus {
    border-color: #000;
    box-shadow: 0 0 0 4px rgba(0, 0, 0, 0.08), 0 4px 12px rgba(0, 0, 0, 0.1);
}

html.dark .form-input:focus,
html.dark .form-select:focus {
    border-color: #fff;
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.1), 0 4px 12px rgba(255, 255, 255, 0.15);
}

.form-input::placeholder {
    color: var(--color-text-muted);
}

.form-select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23a3a3a3'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    padding-right: var(--space-2xl);
    cursor: pointer;
}

/* Remove default number input spinners */
.form-input[type="number"]::-webkit-outer-spin-button,
.form-input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    appearance: none;
    margin: 0;
}

.form-input[type="number"] {
    -moz-appearance: textfield;
    appearance: textfield;
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-lg);
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    font-family: inherit;
    line-height: 1.5;
    border-radius: 0.75rem;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:active::before {
    width: 300px;
    height: 300px;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn .icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* Primary Button */
.btn-primary {
    background: linear-gradient(135deg, #000 0%, #2d2d2d 100%);
    color: #fff;
    border-color: #000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15), 0 2px 4px rgba(0, 0, 0, 0.1);
}

html.dark .btn-primary {
    background: linear-gradient(135deg, #fff 0%, #e5e5e5 100%);
    color: #000;
    border-color: #fff;
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.15), 0 2px 4px rgba(255, 255, 255, 0.1);
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2), 0 4px 8px rgba(0, 0, 0, 0.12);
}

html.dark .btn-primary:hover:not(:disabled) {
    box-shadow: 0 8px 20px rgba(255, 255, 255, 0.25), 0 4px 8px rgba(255, 255, 255, 0.15);
}

.btn-primary:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

/* Secondary Button */
.btn-secondary {
    background: transparent;
    color: var(--color-text);
    border: 2px solid var(--color-border);
    font-weight: 600;
}

.btn-secondary:hover:not(:disabled) {
    background: #000;
    color: #fff;
    border-color: #000;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
}

html.dark .btn-secondary:hover:not(:disabled) {
    background: #fff;
    color: #000;
    border-color: #fff;
    box-shadow: 0 6px 16px rgba(255, 255, 255, 0.2);
}

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

/* Ghost Button */
.btn-ghost {
    background: transparent;
    color: var(--color-text-secondary);
    border: 1px solid transparent;
    padding: var(--space-xs) var(--space-sm);
}

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

/* Icon Button */
.btn-icon {
    padding: var(--space-sm);
    background: transparent;
    border: none;
    color: var(--color-text-muted);
}

.btn-icon:hover {
    color: var(--color-text);
    background: var(--color-bg-muted);
}


/* --------------------------------------------------------------------------
   Results Area
   -------------------------------------------------------------------------- */
.results-container {
    margin-top: 1.5rem;
}

@media (max-width: 768px) {
    .results-container {
        margin-top: 1rem;
    }
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-top: 1.25rem;
    margin-bottom: 1.25rem;
}

@media (max-width: 768px) {
    .results-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
}

.result-card {
    border-radius: 1rem;
    min-height: 220px;
    padding: 1.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: 2px solid var(--color-border);
    position: relative;
}

html:not(.dark) .result-card {
    background: linear-gradient(135deg, #fafafa 0%, #f5f5f5 100%);
}

html.dark .result-card {
    background: linear-gradient(135deg, #1e1e1e 0%, #181818 100%);
}

.result-placeholder {
    text-align: center;
    padding: 1rem;
    color: var(--color-text-muted);
}

.result-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 1rem;
    opacity: 0.4;
}

.result-placeholder p {
    font-size: 0.875rem;
    opacity: 0.7;
}

/* Prediction result content */
.prediction-result-content {
    text-align: center;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.prediction-label {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    opacity: 0.7;
    margin-bottom: 0.25rem;
}

html:not(.dark) .prediction-label {
    color: #555;
}

html.dark .prediction-label {
    color: #aaa;
}

.prediction-price {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1.1;
    word-break: break-word;
    margin: 0.25rem 0;
}

html:not(.dark) .prediction-price {
    color: #0a0a0a;
}

html.dark .prediction-price {
    color: #fff;
}

.prediction-desc {
    font-size: 0.8125rem;
    opacity: 0.7;
    max-width: 280px;
    line-height: 1.5;
    margin-top: 0.25rem;
}

.prediction-mortgage-btn {
    margin-top: 1rem;
    width: 100%;
    max-width: 240px;
    padding: 0.75rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 600;
}

/* Mobile adjustments for prediction */
@media (max-width: 480px) {
    .result-card {
        min-height: 180px;
        padding: 1.25rem;
    }

    .prediction-result-content {
        padding: 1rem;
        gap: 0.5rem;
    }

    .prediction-label {
        font-size: 0.65rem;
    }

    .prediction-price {
        font-size: 2rem;
        margin: 0.125rem 0;
    }

    .prediction-desc {
        font-size: 0.75rem;
        max-width: 220px;
        margin-top: 0.125rem;
    }

    .prediction-mortgage-btn {
        padding: 0.625rem 1rem;
        font-size: 0.8125rem;
        margin-top: 0.75rem;
    }

    .result-icon {
        width: 40px;
        height: 40px;
        margin-bottom: 0.75rem;
    }
}

/* Prediction result when populated */
.result-card.has-result {
    background: var(--color-surface);
    border-color: var(--color-accent);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

html.dark .result-card.has-result {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.prediction-display {
    text-align: center;
    padding: var(--space-xl);
}

.prediction-actions {
    margin-top: var(--space-lg);
}

/* Visualization result */
.visualization-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* --------------------------------------------------------------------------
   Mortgage Section
   -------------------------------------------------------------------------- */
.mortgage-container {
    margin-top: 2rem;
    padding: 1.5rem;
    background: var(--color-surface);
    border: 2px solid var(--color-border);
    border-radius: 1rem;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

html:not(.dark) .mortgage-container {
    background: #fff;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

html.dark .mortgage-container {
    background: #141414;
    border-color: #333;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.mortgage-container.hidden {
    display: none;
}

.mortgage-header {
    margin-bottom: 1.25rem;
}

.mortgage-header h4 {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--color-text);
    margin: 0;
}

/* Mortgage form grid */
.mortgage-form-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.mortgage-form-item {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.mortgage-form-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--color-text-muted);
    text-align: center;
}

.mortgage-form-input,
.mortgage-form-select {
    width: 100%;
    height: 44px;
    padding: 0.5rem 0.75rem;
    font-size: 1rem;
    font-weight: 500;
    text-align: center;
    color: var(--color-text);
    background: var(--color-surface);
    border: 2px solid var(--color-border);
    border-radius: 0.75rem;
    transition: all 0.2s ease;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

html:not(.dark) .mortgage-form-input,
html:not(.dark) .mortgage-form-select {
    background: #f9f9f9;
    border-color: #e0e0e0;
    color: #111;
}

html.dark .mortgage-form-input,
html.dark .mortgage-form-select {
    background: #1a1a1a;
    border-color: #333;
    color: #fff;
}

.mortgage-form-input:focus,
.mortgage-form-select:focus {
    outline: none;
    border-color: var(--color-accent);
}

.mortgage-form-select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23888'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.5rem center;
    background-size: 1rem;
    padding-right: 2rem;
    cursor: pointer;
}

/* Remove number spinners */
.mortgage-form-input[type="number"]::-webkit-outer-spin-button,
.mortgage-form-input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    appearance: none;
    margin: 0;
}

.mortgage-form-input[type="number"] {
    -moz-appearance: textfield;
    appearance: textfield;
}

.mortgage-calc-btn {
    width: 100%;
    margin-top: 0.5rem;
}

/* Mortgage results */
.mortgage-results {
    margin-top: 1.5rem;
}

.mortgage-results-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    animation: slideInUp 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.mortgage-result-card {
    padding: 1.25rem 0.75rem;
    text-align: center;
    border-radius: 0.75rem;
    border: 2px solid var(--color-border);
    transition: all 0.3s ease;
}

html:not(.dark) .mortgage-result-card {
    background: #f5f5f5;
    border-color: #e0e0e0;
}

html.dark .mortgage-result-card {
    background: #1a1a1a;
    border-color: #333;
}

.mortgage-result-label {
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

html:not(.dark) .mortgage-result-label {
    color: #666;
}

html.dark .mortgage-result-label {
    color: #888;
}

.mortgage-result-value {
    font-size: 1.25rem;
    font-weight: 700;
}

html:not(.dark) .mortgage-result-value {
    color: #111;
}

html.dark .mortgage-result-value {
    color: #fff;
}

/* Responsive mortgage grid */
@media (max-width: 600px) {
    .mortgage-container {
        padding: 1.25rem;
    }

    .mortgage-form-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.625rem;
    }

    .mortgage-form-label {
        font-size: 0.7rem;
    }

    .mortgage-form-input,
    .mortgage-form-select {
        height: 40px;
        font-size: 0.9rem;
    }

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

    .mortgage-result-card:last-child {
        grid-column: span 2;
    }

    .mortgage-result-value {
        font-size: 1.1rem;
    }
}

@media (max-width: 380px) {
    .mortgage-form-grid {
        grid-template-columns: 1fr 1fr;
    }

    .mortgage-results-grid {
        grid-template-columns: 1fr;
    }

    .mortgage-result-card:last-child {
        grid-column: span 1;
    }
}

.mortgage-container .form-grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-lg);
    margin-bottom: var(--space-lg);
}

@media (max-width: 900px) {
    .mortgage-container .form-grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 500px) {
    .mortgage-container .form-grid-4 {
        grid-template-columns: 1fr;
    }
}

/* Ensure select shows full text */
.mortgage-container .form-select {
    min-width: 120px;
    padding-right: 2.5rem;
}

.mortgage-results {
    margin-top: 1.5rem;
}

.mortgage-results.hidden {
    display: none;
}

/* Mortgage results display grid */
.mortgage-results>div {
    margin-top: 0;
}

@media (max-width: 768px) {
    .mortgage-results>div {
        grid-template-columns: 1fr !important;
    }
}

.mortgage-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-lg);
    margin-bottom: var(--space-lg);
}

@media (max-width: 768px) {
    .mortgage-grid {
        grid-template-columns: 1fr;
    }
}

.mortgage-stat {
    text-align: center;
    padding: var(--space-lg);
    background: var(--color-bg-muted);
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
}

.mortgage-stat-label {
    font-size: var(--text-xs);
    color: var(--color-text);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: var(--space-xs);
}

.mortgage-stat-value {
    font-size: var(--text-xl);
    font-weight: var(--font-bold);
    color: var(--color-text);
}

/* ==========================================================================
   Smooth Animations - No Glitches
   ========================================================================== */

/* Smooth transitions only */
body {
    transition: background-color 0.3s ease, color 0.3s ease;
}

.btn {
    transition: all 0.2s ease;
}

.btn:hover {
    transform: translateY(-1px);
}

.form-input,
.form-select {
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

/* Simple fade for content */
.step-container {
    transition: opacity 0.3s ease;
}

/* Smooth easing functions */
:root {
    --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Key animations - kept the good ones */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        max-height: 1000px;
        transform: translateY(0);
    }
}

@keyframes shimmer {
    0% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

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

/* Animation classes - only the good ones */
.animate-fade-in {
    animation: fadeIn 0.5s var(--ease-out-expo) forwards;
}

.animate-fade-in-up {
    animation: fadeInUp 0.5s var(--ease-out-expo) forwards;
}

.animate-scale-in {
    animation: scaleIn 0.4s var(--ease-spring) forwards;
}

/* Stagger animations - faster and cleaner */
.stagger-children>*:nth-child(1) {
    animation-delay: 0ms;
}

.stagger-children>*:nth-child(2) {
    animation-delay: 50ms;
}

.stagger-children>*:nth-child(3) {
    animation-delay: 100ms;
}

.stagger-children>*:nth-child(4) {
    animation-delay: 150ms;
}

.stagger-children>*:nth-child(5) {
    animation-delay: 200ms;
}

.stagger-children>*:nth-child(6) {
    animation-delay: 250ms;
}

.stagger-children>*:nth-child(n+7) {
    animation-delay: 300ms;
}

/* HTMX loading states - smooth */
.htmx-request {
    opacity: 0.6;
    pointer-events: none;
    transition: opacity 0.3s var(--ease-out-quart);
}

.htmx-swapping {
    opacity: 0;
    transition: opacity 0.2s var(--ease-out-quart);
}

.htmx-settling {
    animation: fadeIn 0.3s var(--ease-out-quart) forwards;
}

/* Loading spinner */
.spinner {
    width: 24px;
    height: 24px;
    border: 2px solid var(--color-border);
    border-top-color: var(--color-accent);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

/* Skeleton loading */
.skeleton {
    background: linear-gradient(90deg,
            var(--color-bg-muted) 25%,
            var(--color-bg-subtle) 37%,
            var(--color-bg-muted) 63%);
    background-size: 400% 100%;
    animation: shimmer 1.4s ease infinite;
    border-radius: var(--radius-md);
}

.skeleton-text {
    height: 18px;
    margin-bottom: var(--space-sm);
    border-radius: var(--radius-sm);
}

.skeleton-text:last-child {
    width: 60%;
}

/* ==========================================================================
   Quick Guide Step Transitions
   ========================================================================== */

/* Container transitions */
#mode-container,
#quick-container,
#detailed-container,
#results-container {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Result card transitions */
.result-card {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Step content transitions */
.step-content-wrapper {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Step actions */
.step-actions {
    display: flex;
    gap: var(--space-md);
    justify-content: flex-end;
    margin-top: var(--space-lg);
    padding-top: var(--space-lg);
    border-top: 1px solid var(--color-border);
    transition: opacity 0.3s ease;
}

/* Progress step animations */
.progress-dot {
    transition: all 0.4s var(--ease-spring);
}

.progress-step.active .progress-dot {
    box-shadow: 0 0 0 4px var(--color-accent-subtle);
}

.progress-step.completed .progress-dot {
    animation: scaleIn 0.3s var(--ease-spring) forwards;
}

/* Result card animations */
.result-card {
    transition: all 0.4s var(--ease-out-expo);
}

.result-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.result-card.has-result {
    animation: scaleIn 0.5s var(--ease-spring) forwards;
}

.prediction-price {
    animation: fadeInUp 0.6s var(--ease-out-expo) 0.2s forwards;
    opacity: 0;
}

/* HTMX loading states - smoother */
.htmx-request {
    opacity: 0.6;
    pointer-events: none;
    transition: opacity 0.3s var(--ease-out-quart);
}

.htmx-swapping {
    opacity: 0;
    transition: opacity 0.2s var(--ease-out-quart);
}

.htmx-settling {
    animation: fadeIn 0.3s var(--ease-out-quart) forwards;
}

.htmx-indicator {
    display: none;
}

.htmx-request .htmx-indicator {
    display: inline-flex;
    animation: fadeIn 0.3s var(--ease-out-quart) forwards;
}

.htmx-request.htmx-indicator {
    display: inline-flex;
}

/* Loading spinner enhancement */
.spinner {
    width: 24px;
    height: 24px;
    border: 2px solid var(--color-border);
    border-top-color: var(--color-accent);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

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

/* Skeleton loading - enhanced shimmer */
.skeleton {
    background: linear-gradient(90deg,
            var(--color-bg-muted) 25%,
            var(--color-bg-subtle) 37%,
            var(--color-bg-muted) 63%);
    background-size: 400% 100%;
    animation: shimmer 1.4s ease infinite;
    border-radius: var(--radius-md);
}

@keyframes shimmer {
    0% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

.skeleton-text {
    height: 18px;
    margin-bottom: var(--space-sm);
    border-radius: var(--radius-sm);
}

.skeleton-text:last-child {
    width: 60%;
}

/* Mortgage section slide animation */
.mortgage-container {
    transition: opacity 0.4s var(--ease-out-expo), transform 0.4s var(--ease-out-expo), max-height 0.4s var(--ease-out-expo);
    will-change: opacity, transform, max-height;
}

.mortgage-container:not(.hidden) {
    animation: slideDown 0.4s var(--ease-out-expo) forwards;
}

.mortgage-stat {
    opacity: 1;
    will-change: transform, opacity;
}

.mortgage-grid .mortgage-stat:nth-child(1) {
    animation-delay: 0.1s;
}

.mortgage-grid .mortgage-stat:nth-child(2) {
    animation-delay: 0.2s;
}

.mortgage-grid .mortgage-stat:nth-child(3) {
    animation-delay: 0.3s;
}

/* --------------------------------------------------------------------------
   Theme Toggle
   -------------------------------------------------------------------------- */
.theme-toggle {
    position: fixed;
    top: var(--space-lg);
    right: var(--space-lg);
    z-index: var(--z-sticky);
}

.theme-toggle .btn-icon {
    width: 40px;
    height: 40px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-full);
    box-shadow: var(--shadow-sm);
}

.theme-toggle .btn-icon:hover {
    box-shadow: var(--shadow-md);
}

.theme-toggle .icon {
    width: 20px;
    height: 20px;
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.app-footer {
    text-align: center;
    padding: var(--space-xl) 0;
    margin-top: var(--space-2xl);
    border-top: 1px solid var(--color-border);
    color: var(--color-text-muted);
    font-size: var(--text-sm);
}

.app-footer a {
    color: var(--color-text-secondary);
    text-decoration: none;
}

.app-footer a:hover {
    color: var(--color-text);
    text-decoration: underline;
}

/* --------------------------------------------------------------------------
   Utility Classes
   -------------------------------------------------------------------------- */
.hidden {
    display: none !important;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

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

.text-muted {
    color: var(--color-text-muted);
}

.mt-lg {
    margin-top: var(--space-lg);
}

.mb-lg {
    margin-bottom: var(--space-lg);
}

/* ==========================================================================
   Quick Select Mode - Dual UX Path Styles
   ========================================================================== */

/* --------------------------------------------------------------------------
   Mode Selection Cards
   -------------------------------------------------------------------------- */
.mode-selection {
    max-width: 800px;
    margin: 0 auto;
    padding: var(--space-2xl) var(--space-lg);
}

.mode-header {
    text-align: center;
    margin-bottom: var(--space-2xl);
}

.mode-title {
    font-size: var(--text-3xl);
    font-weight: var(--font-bold);
    letter-spacing: -0.02em;
    margin-bottom: var(--space-sm);
}

.mode-subtitle {
    font-size: var(--text-lg);
    color: var(--color-text-secondary);
}

.mode-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-xl);
}

@media (max-width: 640px) {
    .mode-cards {
        grid-template-columns: 1fr;
    }
}

.mode-card {
    position: relative;
    background: var(--color-surface);
    border: 2px solid var(--color-border);
    border-radius: var(--radius-xl);
    padding: var(--space-2xl);
    text-align: center;
    cursor: pointer;
    transition: all 0.5s var(--ease-out-expo);
    overflow: hidden;
}

.mode-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent 0%, var(--color-accent-subtle) 100%);
    opacity: 0;
    transition: opacity 0.4s var(--ease-out-quart);
}

/* Mode Card - Clean Hover */
.mode-card:hover {
    border-color: var(--color-accent);
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.mode-card:hover::before {
    opacity: 1;
}

.mode-card:active {
    transform: translateY(-2px) scale(0.99);
}

.mode-card:nth-child(even):hover {
    transform: translateY(-4px);
}

.mode-card-icon {
    position: relative;
    width: 80px;
    height: 80px;
    margin: 0 auto var(--space-lg);
    background: var(--color-accent);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s var(--ease-spring);
}

.mode-card-icon svg {
    width: 36px;
    height: 36px;
    stroke: var(--color-text-inverse);
}

.mode-card:nth-child(1):hover .mode-card-icon,
.mode-card:nth-child(2):hover .mode-card-icon {
    transform: scale(1.05);
}

/* ... skipped middle content ... */

.quick-step-indicator.active {
    background: var(--color-accent);
    border-color: var(--color-accent);
    color: var(--color-text-inverse);
    /* Removed pulse animation */
    box-shadow: 0 0 0 4px var(--color-bg-muted);
}

/* ... skipped middle content ... */

.visualization-image {
    width: 100%;
    height: auto;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    margin-bottom: var(--space-sm);
    /* Removed grayscale filter */
}

/* Mortgage results */
.mortgage-result-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    /* Force 3 columns for results */
    gap: var(--space-md);
    margin-top: var(--space-lg);
    background: var(--color-surface);
    /* Ensure background matches */
    border-radius: var(--radius-md);
    padding: var(--space-md);
    border: 1px solid var(--color-border);
}

/* Mobile mortgage results */
@media (max-width: 768px) {
    .mortgage-result-grid {
        grid-template-columns: 1fr;
    }
}

.mortgage-result-item {
    background: transparent;
    padding: var(--space-sm);
    border-radius: var(--radius-sm);
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
    text-align: center;
}

.mode-card-title {
    position: relative;
    font-size: var(--text-xl);
    font-weight: var(--font-bold);
    margin-bottom: var(--space-sm);
}

.mode-card-desc {
    position: relative;
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
    line-height: 1.6;
    margin-bottom: var(--space-lg);
}

.mode-card-time {
    position: relative;
    display: inline-block;
    font-size: var(--text-xs);
    color: var(--color-text-muted);
    background: var(--color-bg-muted);
    padding: var(--space-xs) var(--space-md);
    border-radius: var(--radius-full);
}

/* --------------------------------------------------------------------------
   Quick Step Headers
   -------------------------------------------------------------------------- */
.quick-step {
    max-width: 1000px;
    margin: 0 auto;
    padding: var(--space-xl);
}

.quick-header {
    text-align: center;
    margin-bottom: var(--space-2xl);
}

.quick-progress {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-xl);
}

.quick-step-indicator {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    background: var(--color-bg-muted);
    border: 2px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--text-sm);
    font-weight: var(--font-bold);
    color: var(--color-text-muted);
    transition: all 0.4s var(--ease-spring);
}

.quick-step-indicator.active {
    background: var(--color-accent);
    border-color: var(--color-accent);
    color: var(--color-text-inverse);
    box-shadow: 0 0 0 4px var(--color-bg-muted);
}

.quick-step-indicator.completed {
    background: var(--color-accent);
    border-color: var(--color-accent);
    color: var(--color-text-inverse);
}

.quick-step-line {
    width: 40px;
    height: 2px;
    background: var(--color-border);
    transition: background 0.4s var(--ease-out-quart);
}

.quick-step-line.completed {
    background: var(--color-accent);
}

.quick-title {
    font-size: var(--text-2xl);
    font-weight: var(--font-bold);
    letter-spacing: -0.02em;
    margin-bottom: var(--space-sm);
}

.quick-subtitle {
    font-size: var(--text-base);
    color: var(--color-text-secondary);
}

.quick-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: var(--space-2xl);
    padding-top: var(--space-lg);
    border-top: 1px solid var(--color-border);
}

/* --------------------------------------------------------------------------
   City Selection Cards
   -------------------------------------------------------------------------- */
.city-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-lg);
}

@media (max-width: 900px) {
    .city-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 500px) {
    .city-grid {
        grid-template-columns: 1fr;
    }
}

.city-card {
    position: relative;
    height: 160px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    text-align: left;
    transition: all 0.3s var(--ease-out-expo);
    z-index: 1;
}

.city-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
    border-color: var(--color-accent);
}

.city-card-bg {
    position: absolute;
    inset: 0;
    transition: transform 0.6s var(--ease-out-expo);
    pointer-events: none;
}

/* Removed organic alternating rotations */
.city-card:hover .city-card-bg {
    transform: scale(1.05);
}

.city-card:active {
    transform: translateY(-4px) scale(0.98);
}

.city-card.selected {
    transform: translateY(-4px);
    box-shadow: 0 0 0 3px var(--color-success), var(--shadow-xl);
}

.city-card.selected::after {
    content: '✓';
    position: absolute;
    top: 10px;
    right: 10px;
    width: 24px;
    height: 24px;
    background: var(--color-success);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 14px;
    font-weight: bold;
    z-index: 10;
}

.city-card-content {
    position: relative;
    z-index: 1;
    height: 100%;
    padding: var(--space-lg);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    color: white;
    pointer-events: none;
}

.city-province {
    font-size: var(--text-xs);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    opacity: 0.8;
    margin-bottom: var(--space-xs);
}

.city-name {
    font-size: var(--text-xl);
    font-weight: var(--font-bold);
    margin-bottom: var(--space-xs);
}

.city-tag {
    display: inline-block;
    font-size: var(--text-xs);
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(4px);
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-sm);
    width: fit-content;
}

/* City card stagger animations */
.city-grid .city-card {
    opacity: 1;
}

.city-grid .city-card:nth-child(1) {
    animation-delay: 0.05s;
}

.city-grid .city-card:nth-child(2) {
    animation-delay: 0.1s;
}

.city-grid .city-card:nth-child(3) {
    animation-delay: 0.15s;
}

.city-grid .city-card:nth-child(4) {
    animation-delay: 0.2s;
}

.city-grid .city-card:nth-child(5) {
    animation-delay: 0.25s;
}

.city-grid .city-card:nth-child(6) {
    animation-delay: 0.3s;
}

.city-grid .city-card:nth-child(7) {
    animation-delay: 0.35s;
}

.city-grid .city-card:nth-child(8) {
    animation-delay: 0.4s;
}

/* --------------------------------------------------------------------------
   City Search
   -------------------------------------------------------------------------- */
.city-search-container {
    position: relative;
}

.search-input-wrapper {
    position: relative;
}

.search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: var(--color-text-muted);
    pointer-events: none;
}

.city-search-input {
    padding-left: 44px !important;
    font-size: var(--text-base) !important;
}

.city-search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    max-height: 280px;
    overflow-y: auto;
    z-index: var(--z-dropdown);
    margin-top: 4px;
}

.city-search-results.hidden {
    display: none;
}

.city-result-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-sm) var(--space-md);
    cursor: pointer;
    transition: background 0.15s ease;
    border-bottom: 1px solid var(--color-border);
}

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

.city-result-item:hover {
    background: var(--color-bg-muted);
}

.city-result-name {
    font-weight: var(--font-medium);
    color: var(--color-text);
}

.city-result-province {
    font-size: var(--text-sm);
    color: var(--color-text-muted);
}

.city-result-empty {
    padding: var(--space-lg);
    text-align: center;
    color: var(--color-text-muted);
}

/* Manual Selection Accordion */
.manual-selection-details {
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    margin-top: var(--space-lg);
}

.manual-selection-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-md) var(--space-lg);
    cursor: pointer;
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
    list-style: none;
}

.manual-selection-summary::-webkit-details-marker {
    display: none;
}

.manual-selection-summary .chevron-icon {
    width: 16px;
    height: 16px;
    transition: transform 0.2s ease;
}

.manual-selection-details[open] .chevron-icon {
    transform: rotate(180deg);
}

.manual-selection-details[open] .manual-selection-summary {
    border-bottom: 1px solid var(--color-border);
}

.manual-selection-details>.form-grid {
    padding: var(--space-md) var(--space-lg) var(--space-lg);
}

/* Selected Location Display */
.selected-location {
    margin-top: var(--space-lg);
    padding: var(--space-md) var(--space-lg);
    background: var(--color-bg-muted);
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
}

.selected-location.hidden {
    display: none;
}

.selected-location-content {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    color: var(--color-text);
    font-weight: var(--font-medium);
}

/* --------------------------------------------------------------------------
   Property Style Cards
   -------------------------------------------------------------------------- */
.style-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-lg);
}

@media (max-width: 900px) {
    .style-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 500px) {
    .style-grid {
        grid-template-columns: 1fr;
    }
}

.style-card {
    position: relative;
    background: var(--color-surface);
    border: 2px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    text-align: center;
    cursor: pointer;
    transition: all 0.4s var(--ease-out-expo);
}

.style-card:hover {
    border-color: var(--color-accent);
    transform: translateY(-6px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.1);
}

/* Playful rotations */
.style-card:nth-child(1):hover,
.style-card:nth-child(4):hover {
    transform: translateY(-6px) rotate(-0.8deg);
}

.style-card:nth-child(2):hover,
.style-card:nth-child(5):hover {
    transform: translateY(-6px) rotate(0deg);
}

.style-card:nth-child(3):hover,
.style-card:nth-child(6):hover {
    transform: translateY(-6px) rotate(0.8deg);
}

.style-card:active {
    transform: translateY(-3px) scale(0.98);
}

.style-card-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto var(--space-md);
    background: var(--color-bg-muted);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s var(--ease-spring);
}

.style-card-icon svg {
    width: 32px;
    height: 32px;
    stroke: var(--color-text);
}

.style-card:hover .style-card-icon {
    background: var(--color-accent);
    transform: scale(1.1) rotate(-3deg);
}

.style-card:hover .style-card-icon svg {
    stroke: var(--color-text-inverse);
}

.style-name {
    font-size: var(--text-lg);
    font-weight: var(--font-bold);
    margin-bottom: var(--space-xs);
}

.style-desc {
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
    margin-bottom: var(--space-md);
}

.style-specs {
    display: flex;
    justify-content: center;
    gap: var(--space-sm);
    font-size: var(--text-xs);
    color: var(--color-text-muted);
}

/* Style card stagger animations */
.style-grid .style-card {
    opacity: 1;
}

.style-grid .style-card:nth-child(1) {
    animation-delay: 0.05s;
}

.style-grid .style-card:nth-child(2) {
    animation-delay: 0.1s;
}

.style-grid .style-card:nth-child(3) {
    animation-delay: 0.15s;
}

.style-grid .style-card:nth-child(4) {
    animation-delay: 0.2s;
}

.style-grid .style-card:nth-child(5) {
    animation-delay: 0.25s;
}

.style-grid .style-card:nth-child(6) {
    animation-delay: 0.3s;
}

/* --------------------------------------------------------------------------
   Amenity Tier Cards
   -------------------------------------------------------------------------- */
.tier-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-lg);
}

@media (max-width: 900px) {
    .tier-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 500px) {
    .tier-grid {
        grid-template-columns: 1fr;
    }
}

.tier-card {
    position: relative;
    background: var(--color-surface);
    border: 2px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    text-align: left;
    cursor: pointer;
    transition: all 0.4s var(--ease-out-expo);
    overflow: hidden;
}

.tier-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--color-border);
    transition: background 0.3s var(--ease-out-quart);
}

.tier-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.1);
}

.tier-card:active {
    transform: translateY(-3px) scale(0.98);
}

/* Tier-specific styling */
.tier-ultra::before {
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
}

.tier-ultra:hover {
    border-color: #764ba2;
}

.tier-ultra .tier-badge {
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.tier-premium::before {
    background: linear-gradient(90deg, #f093fb 0%, #f5576c 100%);
}

.tier-premium:hover {
    border-color: #f5576c;
}

.tier-premium .tier-badge {
    background: linear-gradient(90deg, #f093fb 0%, #f5576c 100%);
    color: white;
}

.tier-standard::before {
    background: linear-gradient(90deg, #4facfe 0%, #00f2fe 100%);
}

.tier-standard:hover {
    border-color: #4facfe;
}

.tier-standard .tier-badge {
    background: linear-gradient(90deg, #4facfe 0%, #00f2fe 100%);
    color: white;
}

.tier-budget::before {
    background: linear-gradient(90deg, #a8edea 0%, #fed6e3 100%);
}

.tier-budget:hover {
    border-color: #a8edea;
}

.tier-budget .tier-badge {
    background: linear-gradient(90deg, #a8edea 0%, #fed6e3 100%);
    color: #333;
}

.tier-badge {
    display: inline-block;
    font-size: var(--text-xs);
    font-weight: var(--font-bold);
    letter-spacing: 0.1em;
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-sm);
    margin-bottom: var(--space-md);
}

.tier-name {
    font-size: var(--text-lg);
    font-weight: var(--font-bold);
    margin-bottom: var(--space-xs);
}

.tier-desc {
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
    margin-bottom: var(--space-md);
}

.tier-features {
    list-style: none;
    padding: 0;
    margin: 0;
}

.tier-features li {
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
    padding: var(--space-xs) 0;
}

/* Tier card stagger animations */
.tier-grid .tier-card {
    opacity: 1;
}

.tier-grid .tier-card:nth-child(1) {
    animation-delay: 0.05s;
}

.tier-grid .tier-card:nth-child(2) {
    animation-delay: 0.1s;
}

.tier-grid .tier-card:nth-child(3) {
    animation-delay: 0.15s;
}

.tier-grid .tier-card:nth-child(4) {
    animation-delay: 0.2s;
}

/* --------------------------------------------------------------------------
   Quick Mode Summary (before prediction)
   -------------------------------------------------------------------------- */
.quick-summary {
    max-width: 600px;
    margin: 0 auto;
    padding: var(--space-2xl);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    text-align: center;
}

.quick-summary-title {
    font-size: var(--text-xl);
    font-weight: var(--font-bold);
    margin-bottom: var(--space-lg);
}

.quick-summary-items {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    margin-bottom: var(--space-xl);
}

.quick-summary-item {
    display: flex;
    justify-content: space-between;
    padding: var(--space-md);
    background: var(--color-bg-subtle);
    border-radius: var(--radius-md);
}

.quick-summary-label {
    font-size: var(--text-sm);
    color: var(--color-text-muted);
}

.quick-summary-value {
    font-size: var(--text-sm);
    font-weight: var(--font-semibold);
}

/* Dark mode overrides for Quick Select */
.dark .city-card-bg {
    filter: brightness(0.9);
}

.dark .mode-card::before {
    background: linear-gradient(135deg, transparent 0%, rgba(255, 255, 255, 0.05) 100%);
}

/* ==========================================================================
   About Section
   ========================================================================== */
.about-section {
    max-width: 1200px;
    margin: 0 auto var(--space-2xl);
}

.about-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: var(--space-md) var(--space-lg);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    color: var(--color-text);
    font-size: var(--text-sm);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s var(--ease-out-quart);
}

.about-toggle:hover {
    background: var(--color-bg-muted);
    border-color: var(--color-accent);
}

.about-toggle svg {
    width: 16px;
    height: 16px;
    transition: transform 0.3s var(--ease-out-quart);
}

.about-content {
    margin-top: var(--space-lg);
    overflow: hidden;
    transition: all 0.4s var(--ease-out-expo);
}

.about-content.hidden {
    height: 0;
    margin-top: 0;
    opacity: 0;
}

.about-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-lg);
}

.about-card {
    padding: var(--space-xl);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    animation: fadeInUp 0.5s var(--ease-out-expo) backwards;
}

.about-card h3 {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: var(--text-lg);
    font-weight: 600;
    margin-bottom: var(--space-md);
    color: var(--color-text);
}

.about-icon {
    width: 20px;
    height: 20px;
    stroke: var(--color-accent);
}

.about-card p {
    font-size: var(--text-sm);
    line-height: 1.7;
    color: var(--color-text-secondary);
}

.about-card a {
    color: var(--color-accent);
    font-weight: 500;
    transition: opacity 0.2s;
}

.about-card a:hover {
    opacity: 0.8;
}

.about-card-full {
    grid-column: 1 / -1;
}

@media (max-width: 768px) {
    .about-grid {
        grid-template-columns: 1fr;
    }

    .about-card {
        padding: var(--space-lg);
    }
}

.dark .about-toggle {
    background: rgba(255, 255, 255, 0.05);
}

.dark .about-card {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.1);
}

/* Simple About Layout */
.about-simple {
    padding: var(--space-lg);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
}

.about-row {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-xl);
    margin-bottom: var(--space-md);
}

.about-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.about-label {
    font-size: var(--text-xs);
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.about-value {
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--color-text);
}

.about-link {
    text-decoration: underline;
    text-underline-offset: 2px;
}

.about-link:hover {
    color: var(--color-text-secondary);
}

.about-note {
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
    margin: 0;
    padding-top: var(--space-sm);
    border-top: 1px solid var(--color-border);
}

@media (max-width: 600px) {
    .about-row {
        flex-direction: column;
        gap: var(--space-md);
    }
}

/* ==========================================================================
   Form Locks & Warnings
   ========================================================================== */

/* Locked field styling */
.field-locked {
    opacity: 0.6;
    cursor: not-allowed;
    background: var(--color-bg-muted) !important;
}

.form-group.has-lock {
    position: relative;
}

/* Lock indicator badge */
.field-lock-indicator {
    position: absolute;
    top: 0;
    right: 0;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    background: var(--color-accent);
    color: var(--color-text-inverse);
    border-radius: var(--radius-sm);
    font-size: 11px;
    font-weight: 600;
    z-index: 10;
    pointer-events: none;
}

.field-lock-indicator svg {
    width: 12px;
    height: 12px;
    stroke: currentColor;
}

/* Lock tooltip */
.lock-tooltip {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 4px;
    padding: 6px 10px;
    background: rgba(0, 0, 0, 0.9);
    color: white;
    border-radius: var(--radius-sm);
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-5px);
    transition: all 0.2s var(--ease-out-quart);
    z-index: 1000;
}

.field-lock-indicator:hover .lock-tooltip {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* Warning styling */
.field-warning {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    margin-top: 6px;
    padding: 8px 10px;
    background: rgba(255, 193, 7, 0.1);
    border: 1px solid rgba(255, 193, 7, 0.3);
    border-radius: var(--radius-sm);
    font-size: 12px;
    color: #f59e0b;
    animation: slideDown 0.3s var(--ease-out-quart);
}

.field-warning svg {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    stroke: currentColor;
    margin-top: 1px;
}

.dark .field-warning {
    background: rgba(255, 193, 7, 0.15);
    border-color: rgba(255, 193, 7, 0.4);
}

/* Property type info banner */
.property-type-info {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-md) var(--space-lg);
    margin: var(--space-md) var(--space-lg) 0;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
    color: #3b82f6;
    animation: slideDown 0.4s var(--ease-out-expo);
}

.property-type-info svg {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    stroke: currentColor;
}

.dark .property-type-info {
    background: rgba(59, 130, 246, 0.15);
    border-color: rgba(59, 130, 246, 0.4);
}

/* Validation toast */
.validation-toast {
    position: fixed;
    top: 80px;
    right: 20px;
    max-width: 400px;
    padding: var(--space-lg);
    background: white;
    border: 2px solid #ef4444;
    border-radius: var(--radius-lg);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    z-index: 10000;
    animation: slideInRight 0.4s var(--ease-out-expo);
}

.validation-toast-header {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-md);
    color: #dc2626;
    font-size: var(--text-base);
}

.validation-toast-header svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
}

.validation-toast ul {
    margin: 0 0 var(--space-md);
    padding-left: var(--space-lg);
    font-size: var(--text-sm);
    color: var(--color-text);
}

.validation-toast li {
    margin-bottom: var(--space-xs);
}

.validation-toast button {
    width: 100%;
    padding: var(--space-sm) var(--space-md);
    background: var(--color-text);
    color: var(--color-text-inverse);
    border: none;
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s;
}

.validation-toast button:hover {
    opacity: 0.8;
}

.dark .validation-toast {
    background: var(--color-surface);
    border-color: #dc2626;
}

.dark .validation-toast button {
    background: white;
    color: black;
}

/* Slide down animation */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Slide in from right animation */
@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .validation-toast {
        left: 20px;
        right: 20px;
        max-width: none;
    }

    .field-lock-indicator {
        font-size: 10px;
        padding: 3px 6px;
    }

    .lock-tooltip {
        font-size: 11px;
    }
}

/* Quick Summary Styles */
.quick-summary-items {
    display: flex;
    gap: var(--space-xl);
    flex-wrap: wrap;
    margin-bottom: var(--space-lg);
    padding: var(--space-lg);
    background: var(--color-bg-subtle);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
}

.quick-summary-item {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.quick-summary-label {
    font-size: var(--text-xs);
    text-transform: uppercase;
    color: var(--color-text-muted);
    letter-spacing: 0.5px;
    font-weight: 600;
}

.quick-summary-value {
    font-size: var(--text-base);
    font-weight: 600;
    color: var(--color-text);
}

/* ==========================================================================
   Quick Mode Action Buttons & Results
   ========================================================================== */

/* Action buttons container */
.action-buttons {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-md);
    flex-wrap: wrap;
    margin-top: 1.5rem;
    padding-top: 1rem;
}

.action-group {
    display: flex;
    gap: var(--space-sm);
}

/* Action button styles */
.btn-action {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-md) var(--space-lg);
    font-size: var(--text-base);
    font-weight: 600;
    border: 2px solid currentColor;
    border-radius: var(--radius-lg);
    transition: all 0.3s var(--ease-out-expo);
    position: relative;
    overflow: hidden;
}

.btn-action::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: currentColor;
    transition: left 0.4s var(--ease-out-expo);
    z-index: -1;
    opacity: 0.1;
}

.btn-action:hover::before {
    left: 0;
}

.btn-predict {
    background: var(--color-accent);
    color: var(--color-text-inverse);
    border-color: var(--color-accent);
}

.btn-predict:hover {
    background: var(--color-accent-hover);
    border-color: var(--color-accent-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-visualize {
    background: transparent;
    color: var(--color-text);
    border: 2px solid var(--color-border);
}

.btn-visualize:hover {
    background: var(--color-bg-muted);
    border-color: var(--color-text);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-action:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

/* Results grid */
.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-lg);
}

/* Result card */
.result-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s var(--ease-out-quart);
}

.result-card.has-result {
    border-color: var(--color-accent);
    box-shadow: var(--shadow-md);
}

/* Result placeholder */
.result-placeholder {
    text-align: center;
    color: var(--color-text-muted);
}

.result-placeholder .result-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto var(--space-md);
    opacity: 0.3;
    stroke: var(--color-text-muted);
}

.result-placeholder p {
    font-size: var(--text-sm);
    margin: 0;
}

/* Spinner */
.spinner {
    width: 40px;
    height: 40px;
    margin: 0 auto var(--space-md);
    border: 3px solid var(--color-border);
    border-top-color: var(--color-accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Prediction display */
.prediction-display {
    text-align: center;
    width: 100%;
}

.prediction-label {
    font-size: var(--text-sm);
    color: var(--color-text-muted);
    letter-spacing: 0.5px;
    margin-bottom: var(--space-sm);
}

.prediction-price {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--color-accent);
    line-height: 1.2;
}

/* Visualization display */
.visualization-display {
    width: 100%;
}

.visualization-image {
    width: 100%;
    height: auto;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    margin-bottom: var(--space-sm);
    /* Grayscale removed */
}

.visualization-caption {
    text-align: center;
    font-size: var(--text-sm);
    color: var(--color-text-muted);
    font-style: italic;
    margin: 0;
}

/* Mortgage Button - Minimalist Override */
#quick-calculate-mortgage-btn {
    background: transparent;
    color: var(--color-text);
    border: 2px solid var(--color-text);
    width: 100%;
    margin-top: var(--space-md);
}

#quick-calculate-mortgage-btn:hover {
    background: var(--color-text);
    color: var(--color-text-inverse);
}

/* Mortgage results */
.mortgage-result-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-lg);
    margin-top: var(--space-xl);
    padding: var(--space-lg);
    background: transparent;
}

/* Mobile mortgage results */
@media (max-width: 768px) {
    .mortgage-result-grid {
        grid-template-columns: 1fr;
        gap: var(--space-md);
    }
}

.mortgage-result-item {
    background: var(--color-bg-muted);
    padding: var(--space-lg);
    border-radius: 0.75rem;
    border: 2px solid var(--color-border);
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    text-align: center;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.mortgage-result-item:hover {
    transform: translateY(-4px);
    border-color: var(--color-accent);
    box-shadow: var(--shadow-lg);
}

html:not(.dark) .mortgage-result-item {
    background: linear-gradient(135deg, #fafafa 0%, #ffffff 100%);
}

html.dark .mortgage-result-item {
    background: linear-gradient(135deg, #1a1a1a 0%, #141414 100%);
}

.mortgage-result-label {
    font-size: 0.7rem;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 600;
}

.mortgage-result-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-text);
    line-height: 1.2;
}



/* Mobile responsiveness */
@media (max-width: 768px) {
    .action-buttons {
        flex-direction: column;
        align-items: stretch;
        gap: 0.625rem;
        margin-top: 1rem;
        margin-bottom: 1rem;
    }

    .action-buttons>.btn-secondary {
        order: 2;
        /* Move back button to bottom */
    }

    .action-buttons>.action-group {
        order: 1;
        /* Action buttons first */
    }

    .action-group {
        flex-direction: column;
        width: 100%;
        gap: 0.625rem;
    }

    .btn-action {
        width: 100%;
        justify-content: center;
        padding: 0.75rem;
        font-size: 0.9375rem;
    }

    .results-grid {
        grid-template-columns: 1fr;
        gap: 0.625rem;
        margin-top: 1rem;
    }

    .result-card {
        padding: 1.25rem;
        min-height: 180px;
    }

    .prediction-price {
        font-size: 1.75rem;
    }

    .prediction-label {
        font-size: var(--text-xs);
    }

    /* Ensure mortgage inputs stack on mobile */
    .form-grid-4 {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   Quick Navigation
   ========================================================================== */
.quick-nav {
    margin-bottom: var(--space-lg);
}

.quick-nav .nav-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
    background: transparent;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: var(--space-sm) var(--space-md);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.quick-nav .nav-btn:hover {
    background: var(--color-bg-muted);
    color: var(--color-text);
    border-color: var(--color-border-strong);
}

.quick-nav .nav-btn svg {
    width: 16px;
    height: 16px;
}

/* ==========================================================================
   Branding Badge
   ========================================================================== */
.branding-badge {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: var(--z-sticky);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 12px 20px;
    box-shadow: var(--shadow-md);
}

.badge-label {
    font-size: 11px;
    color: var(--color-text-muted);
    margin-bottom: 3px;
    letter-spacing: 0.5px;
}

.badge-link {
    font-size: 14px;
    font-weight: 600;
    color: var(--color-text);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 6px;
}

.badge-link:hover {
    color: var(--color-accent);
}

.badge-icon {
    width: 12px;
    height: 12px;
}

/* ==========================================================================
   Dark Mode Text Fixes
   ========================================================================== */
.dark .mode-card-title,
.dark .mode-card-desc {
    color: var(--color-text);
}

.dark .mode-card-desc {
    color: var(--color-text-secondary);
}

.dark .mode-card-time {
    color: var(--color-text-muted);
    background: var(--color-bg-muted);
}

/* ==========================================================================
   City Card Selection State
   ========================================================================== */
.city-card {
    position: relative;
    transition: all 0.25s ease;
}

.city-card.selected {
    outline: 3px solid var(--color-accent);
    outline-offset: 2px;
    transform: scale(1.02);
}

.city-card.selected::after {
    content: '';
    position: absolute;
    top: 12px;
    right: 12px;
    width: 24px;
    height: 24px;
    background: var(--color-accent);
    border-radius: 50%;
    z-index: 10;
}

.city-card.selected::before {
    content: '\2713';
    position: absolute;
    top: 14px;
    right: 17px;
    color: var(--color-text-inverse);
    font-size: 14px;
    font-weight: bold;
    z-index: 11;
}

/* Selected location display */
.selected-location {
    margin-top: var(--space-lg);
    padding: var(--space-md);
    background: var(--color-bg-muted);
    border: 2px solid var(--color-accent);
    border-radius: var(--radius-md);
}

.selected-location.hidden {
    display: none;
}

.selected-location-content {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-weight: 600;
    color: var(--color-text);
}

.selected-location svg {
    color: var(--color-accent);
    flex-shrink: 0;
}

/* ==========================================================================
   Step Transitions
   ========================================================================== */
.step-container {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.step-content {
    transition: opacity 0.3s ease;
}

[id$="-content-wrapper"] {
    transition: opacity 0.25s ease;
}

/* ==========================================================================
   Quick Guide Step Transitions
   ========================================================================== */
#quick-container {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

#quick-container.htmx-swapping {
    opacity: 0;
    transform: translateX(-10px);
}

#quick-container.htmx-added {
    opacity: 1;
    transform: translateX(0);
}

/* Smooth fade for step content */
.quick-step-content {
    animation: fadeInSlide 0.3s ease-out;
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================================================
   Mobile Responsive Fixes for Quick Guide
   ========================================================================== */
@media (max-width: 768px) {

    /* Quick progress indicators - scale down */
    .quick-progress {
        gap: var(--space-xs);
        margin-bottom: var(--space-lg);
    }

    .quick-step-indicator {
        width: 28px;
        height: 28px;
        font-size: var(--text-xs);
    }

    .quick-step-line {
        width: 24px;
    }

    /* Quick titles - smaller on mobile */
    .quick-title {
        font-size: var(--text-xl);
    }

    .quick-subtitle {
        font-size: var(--text-sm);
    }

    /* Quick footer - stack buttons on mobile */
    .quick-footer {
        flex-direction: column;
        gap: var(--space-md);
        align-items: stretch;
    }

    .quick-footer .btn {
        width: 100%;
        justify-content: center;
    }

    /* City cards - smaller height on mobile */
    .city-card {
        height: 120px;
    }

    .city-card-content {
        padding: var(--space-md);
    }

    .city-name {
        font-size: var(--text-lg);
    }

    .city-province {
        font-size: 10px;
    }

    .city-tag {
        font-size: 10px;
        padding: 2px 6px;
    }

    /* Style cards - compact on mobile */
    .style-card {
        padding: var(--space-lg);
    }

    .style-card-icon {
        width: 48px;
        height: 48px;
        margin-bottom: var(--space-sm);
    }

    .style-card-icon svg {
        width: 24px;
        height: 24px;
    }

    .style-name {
        font-size: var(--text-base);
    }

    .style-desc {
        font-size: var(--text-xs);
        margin-bottom: var(--space-sm);
    }

    .style-specs {
        font-size: 10px;
    }

    /* Tier cards - compact */
    .tier-card {
        padding: var(--space-lg);
    }

    .tier-name {
        font-size: var(--text-base);
    }

    .tier-desc {
        font-size: var(--text-xs);
    }

    .tier-features li {
        font-size: var(--text-xs);
    }

    /* Quick summary - full width on mobile */
    .quick-summary {
        padding: var(--space-lg);
        margin: 0 var(--space-md);
    }

    .quick-summary-title {
        font-size: var(--text-lg);
    }

    /* Action buttons - stack on mobile */
    .action-buttons {
        flex-direction: column;
        align-items: stretch;
        margin-top: 1rem;
        padding-top: 0.75rem;
        gap: 0.625rem;
    }

    .action-group {
        flex-direction: column;
        width: 100%;
        gap: 0.625rem;
    }

    .btn-action {
        width: 100%;
        justify-content: center;
        padding: 0.8125rem;
        font-size: 0.9375rem;
    }

    /* Results grid - single column */
    .results-grid {
        grid-template-columns: 1fr;
    }

    /* Quick header padding */
    .quick-header {
        padding: 0 var(--space-md);
    }
}

/* Very small screens */
@media (max-width: 380px) {
    .quick-step-indicator {
        width: 24px;
        height: 24px;
        font-size: 10px;
    }

    .quick-step-line {
        width: 16px;
    }

    .city-card {
        height: 100px;
    }

    .city-name {
        font-size: var(--text-base);
    }
}

/* ==========================================================================
   CENTRALIZED MOBILE-FIRST RESPONSIVE SYSTEM
   ========================================================================== */

/* Base mobile touch targets - minimum 44px */
@media (max-width: 768px) {

    /* All interactive elements - larger touch targets */
    button,
    .btn,
    input,
    select,
    textarea,
    .city-card,
    .style-card,
    .tier-card,
    .mode-card {
        min-height: 44px;
        min-width: 44px;
    }

    /* Larger padding for all buttons */
    .btn {
        padding: var(--space-md) var(--space-lg);
        font-size: var(--text-base);
    }

    .btn-sm {
        padding: var(--space-sm) var(--space-md);
        font-size: var(--text-sm);
    }

    /* Form inputs - full width and larger */
    input[type="text"],
    input[type="number"],
    input[type="email"],
    select,
    textarea {
        width: 100%;
        padding: var(--space-md);
        font-size: 16px;
        /* Prevents zoom on iOS */
        min-height: 44px;
    }

    /* Labels more prominent */
    .form-label {
        font-size: var(--text-sm);
        margin-bottom: var(--space-sm);
    }

    /* Container padding reduction */
    .container,
    .main-content,
    .app-container {
        padding-left: var(--space-md);
        padding-right: var(--space-md);
    }

    /* Typography scaling */
    h1,
    .h1 {
        font-size: 1.75rem;
    }

    h2,
    .h2 {
        font-size: 1.5rem;
    }

    h3,
    .h3 {
        font-size: 1.25rem;
    }

    h4,
    .h4 {
        font-size: 1.125rem;
    }

    /* Card components */
    .card,
    .result-card,
    .about-card {
        padding: var(--space-lg);
        border-radius: var(--radius-md);
    }

    /* Header scaling */
    .app-header {
        padding: var(--space-md);
    }

    .app-title {
        font-size: 1.25rem;
    }

    .app-subtitle {
        font-size: var(--text-xs);
    }

    /* Mode selection cards */
    .mode-grid {
        grid-template-columns: 1fr;
        gap: var(--space-md);
    }

    .mode-card {
        padding: var(--space-lg);
    }

    .mode-card-icon {
        width: 48px;
        height: 48px;
    }

    .mode-card-icon svg {
        width: 24px;
        height: 24px;
    }

    .mode-card-title {
        font-size: var(--text-lg);
    }

    .mode-card-desc {
        font-size: var(--text-sm);
    }

    /* Form sections */
    .section-header {
        padding: var(--space-md);
    }

    .section-title {
        font-size: var(--text-lg);
    }

    .section-subtitle {
        font-size: var(--text-sm);
    }

    /* Navigation buttons */
    .nav-buttons {
        flex-direction: column;
        gap: var(--space-md);
    }

    .nav-buttons .btn {
        width: 100%;
        justify-content: center;
    }

    /* Footer */
    .app-footer {
        padding: var(--space-lg) var(--space-md);
        font-size: var(--text-xs);
    }
}

/* ==========================================================================
   MOBILE VISUALIZATION IMPROVEMENTS
   ========================================================================== */

@media (max-width: 768px) {

    /* Visualization container */
    .viz-container,
    .visualization-display {
        width: 100%;
        overflow: hidden;
    }

    .visualization-image {
        width: 100%;
        height: auto;
        max-height: 300px;
        object-fit: contain;
        border-radius: var(--radius-md);
    }

    /* Prediction result cards */
    .prediction-result {
        padding: var(--space-lg);
    }

    .prediction-price {
        font-size: 1.75rem;
    }

    .prediction-label {
        font-size: var(--text-xs);
    }

    /* Results grid - single column */
    .results-grid {
        grid-template-columns: 1fr;
        gap: var(--space-md);
    }

    .result-card {
        min-height: 150px;
        padding: var(--space-lg);
    }

    /* Map container */
    #map-container,
    .map-wrapper {
        height: 250px;
        border-radius: var(--radius-md);
    }

    /* Charts and graphs */
    .chart-container,
    .graph-wrapper {
        height: 200px;
        padding: var(--space-md);
    }

    /* Loading states */
    .loading-spinner {
        width: 40px;
        height: 40px;
    }

    /* Error messages */
    .error-message,
    .validation-message {
        padding: var(--space-md);
        font-size: var(--text-sm);
    }

    /* Success/Info banners */
    .info-banner,
    .success-banner {
        padding: var(--space-md);
        font-size: var(--text-sm);
        flex-direction: column;
        gap: var(--space-sm);
        text-align: center;
    }
}

/* Tablet adjustments */
@media (min-width: 769px) and (max-width: 1024px) {
    .results-grid {
        grid-template-columns: repeat(2, 1fr);
    }

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

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

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

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

    .visualization-image {
        max-height: 400px;
    }
}

/* Extra small devices */
@media (max-width: 360px) {
    :root {
        --space-xs: 2px;
        --space-sm: 4px;
        --space-md: 8px;
        --space-lg: 12px;
        --space-xl: 16px;
        --space-2xl: 20px;
    }

    .btn {
        padding: var(--space-sm) var(--space-md);
        font-size: var(--text-sm);
    }

    .prediction-price {
        font-size: 1.5rem;
    }
}

/* Landscape mode on mobile */
@media (max-width: 768px) and (orientation: landscape) {

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

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

    .city-card {
        height: 100px;
    }

    #map-container {
        height: 200px;
    }
}

/* High DPI / Retina displays */
@media (-webkit-min-device-pixel-ratio: 2),
(min-resolution: 192dpi) {

    .visualization-image,
    .city-card-bg {
        image-rendering: -webkit-optimize-contrast;
    }
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ==========================================================================
   SMOOTH TRANSITIONS - Step 4 Amenities & Results Enhancement
   ========================================================================== */

/* Amenities summary styling */
.selection-summary {
    animation: slideInUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Form groups with smooth focus transitions */
.form-group {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.form-select,
.form-input {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.form-select:hover,
.form-input:hover {
    border-color: var(--color-border-strong);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.form-select:focus,
.form-input:focus {
    border-color: var(--color-accent);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    outline: none;
}

/* Details/Summary smooth expand */
details.amenities-preview summary {
    transition: all 0.3s ease;
    user-select: none;
}

details.amenities-preview summary:hover {
    background: var(--color-bg-subtle);
    padding-left: var(--space-sm);
}

details.amenities-preview summary svg {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

details.amenities-preview[open] summary svg {
    transform: rotate(180deg);
}

details.amenities-preview>div {
    animation: expandDown 0.3s ease-out;
}

@keyframes expandDown {
    from {
        opacity: 0;
        max-height: 0;
    }

    to {
        opacity: 1;
        max-height: 2000px;
    }
}

/* Result cards with smooth appearance */
.result-card {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.result-card:hover {
    transform: translateY(-4px) !important;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15) !important;
}

/* Prediction display animation */
.prediction-display {
    animation: scaleIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.85);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.prediction-price {
    animation: countUp 0.6s ease-out;
}

@keyframes countUp {
    from {
        opacity: 0;
        transform: translateY(15px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mortgage results smooth reveal */
.mortgage-result-grid {
    animation: fadeInStagger 0.4s ease-out !important;
}

@keyframes fadeInStagger {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mortgage-result-item {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    animation: slideInItem 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) backwards;
}

.mortgage-result-item:nth-child(1) {
    animation-delay: 0.1s;
}

.mortgage-result-item:nth-child(2) {
    animation-delay: 0.2s;
}

.mortgage-result-item:nth-child(3) {
    animation-delay: 0.3s;
}

@keyframes slideInItem {
    from {
        opacity: 0;
        transform: translateX(-30px) scale(0.9);
    }

    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

.mortgage-result-item:hover {
    transform: translateY(-4px) scale(1.02) !important;
    background: var(--color-bg-subtle) !important;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12) !important;
}

/* Button animations */
.btn {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    position: relative;
    overflow: hidden;
}

.btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.5s ease, height 0.5s ease;
}

.btn:active::after {
    width: 400px;
    height: 400px;
}

.btn:active {
    transform: scale(0.96) !important;
}

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

.btn-primary:hover:not(:disabled),
.btn-action:hover:not(:disabled) {
    transform: translateY(-3px) !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25) !important;
}

.btn-secondary:hover:not(:disabled) {
    transform: translateY(-2px) !important;
    background: var(--color-bg-muted) !important;
}

/* Spinner */
@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* Result placeholder pulse */
.result-placeholder {
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.6;
    }
}

/* Image smooth load */
.visualization-image {
    animation: imageFadeIn 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes imageFadeIn {
    from {
        opacity: 0;
        filter: blur(20px) brightness(1.2);
        transform: scale(1.05);
    }

    to {
        opacity: 1;
        filter: blur(0) brightness(1);
        transform: scale(1);
    }
}

/* Selection summary cards hover */
.selection-summary>div {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.selection-summary>div:hover {
    transform: translateX(6px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-color: var(--color-accent);
}

/* Price display styling for both modes */
.price-display {
    color: #000 !important;
    text-shadow: none !important;
}

html.dark .price-display {
    color: #fff !important;
    text-shadow: none !important;
}

/* Result cards for Step 4 */
.prediction-card {
    background: #ffffff;
    border: 2px solid #e5e5e5;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

html.dark .prediction-card {
    background: #1a1a1a;
    border: 2px solid #333;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.prediction-card.has-result {
    border-color: #000;
}

html.dark .prediction-card.has-result {
    border-color: #fff;
}

.visualization-card {
    background: var(--color-bg-muted);
    border: 2px solid var(--color-border);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

html.dark .visualization-card {
    background: #141414;
    border: 2px solid #333;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

/* Smooth slideInUp animation for form elements */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scale in animation for results */
@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Expand animation for step content */
@keyframes expandIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
        max-height: 0;
    }

    to {
        opacity: 1;
        transform: translateY(0);
        max-height: 2000px;
    }
}

/* Collapse animation */
@keyframes collapseOut {
    from {
        opacity: 1;
        max-height: 2000px;
    }

    to {
        opacity: 0;
        max-height: 0;
    }
}

/* Staggered reveal for form elements in steps */
.step-content .form-group {
    animation: slideInUp 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) backwards;
}

.step-content .form-group:nth-child(1) {
    animation-delay: 0.05s;
}

.step-content .form-group:nth-child(2) {
    animation-delay: 0.1s;
}

.step-content .form-group:nth-child(3) {
    animation-delay: 0.15s;
}

.step-content .form-group:nth-child(4) {
    animation-delay: 0.2s;
}

.step-content .form-group:nth-child(5) {
    animation-delay: 0.25s;
}

.step-content .form-group:nth-child(6) {
    animation-delay: 0.3s;
}

.step-content .form-group:nth-child(7) {
    animation-delay: 0.35s;
}

.step-content .form-group:nth-child(8) {
    animation-delay: 0.4s;
}

/* Smooth step actions button */
.step-actions .btn {
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.step-actions .btn:hover {
    transform: translateY(-2px);
}

.step-actions .btn:active {
    transform: translateY(0);
}

/* ==========================================================================
   Mobile Optimizations - Detailed Mode
   ========================================================================== */
@media (max-width: 768px) {

    /* Step containers - more compact on mobile */
    .step-container {
        margin-bottom: 0.75rem;
        border-radius: 0.875rem;
    }

    .step-header {
        padding: 1rem;
    }

    .step-badge {
        width: 36px;
        height: 36px;
        font-size: 0.875rem;
    }

    .step-title {
        font-size: 1rem;
    }

    .step-desc {
        font-size: 0.75rem;
        display: none;
        /* Hide description on small screens */
    }

    .step-content {
        padding: 1rem !important;
    }

    /* Enable scrolling on mobile for active steps */
    .step-container.active {
        max-height: calc(100vh - 180px);
        overflow-y: auto;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
        scroll-behavior: smooth;
    }

    .step-container.active .step-content {
        overflow: visible;
        max-height: none;
    }

    .step-preview {
        padding: 0.5rem 1rem !important;
    }

    .step-preview-summary {
        font-size: 0.8rem;
    }

    .step-preview-summary::before {
        width: 16px;
        height: 16px;
        font-size: 8px;
    }

    .step-actions {
        padding: 0.75rem 1rem 1rem;
    }

    /* Form elements on mobile */
    .form-input,
    .form-select {
        padding: 0.625rem 0.875rem;
        font-size: 1rem;
        /* Prevent zoom on iOS */
    }

    .form-label {
        font-size: 0.75rem;
    }

    /* Result cards on mobile */
    .quick-result-cards {
        flex-direction: column;
        gap: 0.75rem;
    }

    .result-card {
        width: 100%;
        min-height: 180px;
    }

    /* Footer back button on mobile */
    .step-footer {
        flex-direction: column;
        gap: 0.75rem;
    }

    .step-footer .btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .step-container {
        margin-bottom: 0.5rem;
        border-radius: 0.75rem;
    }

    .step-header {
        padding: 0.875rem;
    }

    .step-badge {
        width: 32px;
        height: 32px;
        font-size: 0.8rem;
    }

    .step-info {
        gap: 0.625rem;
    }

    .step-title {
        font-size: 0.9rem;
    }

    .step-content {
        padding: 0.875rem !important;
    }

    /* Mortgage mobile tweaks */
    .mortgage-container {
        padding: 1rem;
    }

    .mortgage-header h4 {
        font-size: 1rem;
    }
}

/* Missing class re-added for robust display */
.price-display {
    display: block;
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1.2;
    margin: 0.5rem 0;
    color: var(--color-text);
}

html.dark .price-display {
    color: #ffffff !important;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

html:not(.dark) .price-display {
    color: #000000 !important;
}