* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #0c5e96;
    --primary-hover: #094b77;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --gray-50: #fafbfc;
    --gray-100: #f5f7fa;
    --gray-200: #e8ecef;
    --gray-300: #dce1e6;
    --gray-600: #5a6c7d;
    --gray-700: #394b59;
    --gray-800: #29333d;
    --gray-900: #1a2128;
    --accent-blue: #4a90e2;
    --accent-teal: #00c9a7;
    --text-primary: #29333d;
    --text-secondary: #5a6c7d;
}

html {
    overflow-x: hidden;
}

body {
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
}

body {
    font-family: 'Avenir Next', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', sans-serif;
    background: #f5f7fa;
    min-height: 100vh;
    padding: 0;
    margin: 0;
    color: var(--text-primary);
    font-size: 16px;
    line-height: 1.6;
}

.container {
    margin: 0 auto;
    padding: 0;
    max-width: 100%;
    overflow-x: hidden;
}

/* Top nav bar */
.top-nav {
    background: #111111;
    color: white;
    position: sticky;
    top: 0;
    z-index: 60;
}

.top-nav-inner {
    padding: 8px 48px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-nav-logo {
    display: flex;
    align-items: center;
}

.top-nav-brand {
    height: 32px;
    width: auto;
}

.top-nav-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Shared nav item base — consistent size, spacing, hover */
.top-nav-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    color: rgba(255,255,255,0.75);
    text-decoration: none;
    border: none;
    background: none;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
    font-family: inherit;
}

.top-nav-item:hover {
    background: rgba(255,255,255,0.1);
    color: white;
}

.top-nav-item .nav-icon {
    opacity: 0.7;
}

.top-nav-item:hover .nav-icon {
    opacity: 1;
}

.top-nav-credits {
    font-size: 0.85rem;
    font-weight: 600;
    padding: 7px 14px;
    background: rgba(255,255,255,0.08);
    border-radius: 6px;
    color: rgba(255,255,255,0.75);
}

.top-nav-upgrade {
    font-size: 0.8rem;
    color: #111111;
    font-weight: 600;
    text-decoration: none;
    margin-left: 8px;
    background: #fbbf24;
    padding: 5px 14px;
    border-radius: 6px;
}

.top-nav-upgrade:hover {
    background: #f59e0b;
    color: #111111;
}

.nav-icon {
    width: 16px;
    height: 16px;
    fill: currentColor;
    vertical-align: middle;
    flex-shrink: 0;
}

.main-content {
    padding: 32px 48px;
    max-width: 1440px;
    margin: 0 auto;
}

/* Illustration Banner */
/* Hero section — positioning parent for banner + cards */
.hero-section {
    position: relative;
}

/* Hero Banner — responsive image with overlay */
.hero-banner {
    position: relative;
    min-height: 70vh;
    padding: 48px 48px 36px;
    display: flex;
    align-items: flex-start;
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero-bg-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center right;
    display: block;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to right,
        rgba(0, 0, 0, 0.45) 0%,
        rgba(0, 0, 0, 0.15) 50%,
        transparent 100%
    );
    z-index: 1;
}

.hero-banner > *:not(.hero-bg):not(.hero-overlay) {
    position: relative;
    z-index: 2;
}

.hero-left {
    max-width: 440px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Feature cards — flow naturally below the hero banner */
.features-row {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
    padding: 32px 48px;
    position: relative;
    z-index: 2;
}

.hero-text h2 {
    font-size: 1.6rem;
    font-weight: 700;
    line-height: 1.25;
    margin-bottom: 4px;
    letter-spacing: -0.5px;
    color: white;
    text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.hero-text p {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.9);
    line-height: 1.4;
    margin-bottom: 0;
    text-shadow: 0 1px 4px rgba(0,0,0,0.3);
}

/* Search card on the hero */
.hero-search-card {
    background: rgba(255, 255, 255, 0.35);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    border-radius: 12px;
    padding: 20px 24px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    max-height: none;
    overflow: visible;
    transition: background 0.3s ease, box-shadow 0.3s ease;
}

.hero-search-card.active {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.hero-search-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 12px;
}

.hero-search-card .form-group {
    margin-bottom: 10px;
}

.hero-search-card label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 4px;
}

.hero-search-card input,
.hero-search-card select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 0.95rem;
    box-sizing: border-box;
}

.hero-search-card .search-btn {
    width: 100%;
    margin-top: 8px;
}

/* Advanced options toggle */
.hero-advanced-toggle {
    background: none;
    border: none;
    color: #2563eb;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    padding: 8px 0;
    display: flex;
    align-items: center;
    gap: 4px;
}

.hero-advanced-toggle:hover {
    color: #1d4ed8;
}

.hero-advanced-toggle .toggle-arrow {
    transition: transform 0.2s ease;
    font-size: 0.75rem;
}

.hero-advanced-toggle.open .toggle-arrow {
    transform: rotate(180deg);
}

.advanced-options {
    display: none;
    border-top: 1px solid #e5e7eb;
    padding-top: 12px;
    margin-top: 4px;
}

.advanced-options.show {
    display: block;
}

.advanced-options .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    align-items: end;
}

.advanced-options .form-row .form-group {
    display: flex;
    flex-direction: column;
}

.advanced-options .form-row .form-group input,
.advanced-options .form-row .form-group select {
    margin-top: auto;
}

.advanced-options .form-group {
    margin-bottom: 12px;
}

.advanced-options label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 4px;
}

.advanced-options input,
.advanced-options select {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.9rem;
    box-sizing: border-box;
}

/* Feature Cards — 2x2 grid in the right column */
.features-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    width: 100%;
}

.feature-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    border: 1px solid var(--gray-200);
    transition: all 0.2s ease;
}

.feature-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.feature-card-icon {
    width: 48px;
    height: 48px;
    background: #eff6ff;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
}

.feature-card-icon i {
    font-size: 26px;
    color: #2563eb;
    --ph-duotone-opacity: 1;
    --ph-duotone-color: #f59e0b;
}

.feature-card h3 {
    font-size: 1.05rem;
    color: var(--text-primary);
    font-weight: 600;
    margin-bottom: 4px;
    letter-spacing: -0.3px;
}

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

.search-panel {
    background: white;
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    border: 1px solid var(--gray-200);
    position: sticky;
    top: 32px;
    max-height: calc(100vh - 64px);
    overflow-y: auto;
    grid-column: 1;
    grid-row: 1;
    align-self: start;
}

.search-panel h2 {
    font-size: 1.75rem;
    margin-bottom: 24px;
    color: var(--text-primary);
    font-weight: 600;
    letter-spacing: -0.5px;
}

.form-section {
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--gray-200);
}

.form-section:last-of-type {
    border-bottom: none;
}

.form-section h3 {
    font-size: 1.125rem;
    color: var(--text-primary);
    margin-bottom: 20px;
    font-weight: 600;
    letter-spacing: -0.3px;
}

.form-group {
    margin-bottom: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* Dual range slider */
.range-slider {
    position: relative;
    height: 36px;
    display: flex;
    align-items: center;
    touch-action: none;
}

.range-slider input[type="range"] {
    position: absolute;
    width: 100%;
    pointer-events: none;
    -webkit-appearance: none;
    appearance: none;
    background: none;
    margin: 0;
    padding: 0;
    height: 36px;
}

.range-slider input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    pointer-events: all;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary-color);
    border: 2px solid white;
    box-shadow: 0 1px 4px rgba(0,0,0,0.2);
    cursor: pointer;
    position: relative;
    z-index: 2;
}

.range-slider input[type="range"]::-moz-range-thumb {
    pointer-events: all;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary-color);
    border: 2px solid white;
    box-shadow: 0 1px 4px rgba(0,0,0,0.2);
    cursor: pointer;
    position: relative;
    z-index: 2;
}

.range-slider input[type="range"]::-webkit-slider-runnable-track {
    height: 6px;
    border-radius: 3px;
    background: var(--gray-200);
}

.range-slider input[type="range"]::-moz-range-track {
    height: 6px;
    border-radius: 3px;
    background: var(--gray-200);
}

.range-track {
    position: absolute;
    height: 6px;
    border-radius: 3px;
    background: var(--primary-color);
    top: 50%;
    transform: translateY(-50%);
    z-index: 1;
    pointer-events: none;
}

.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--gray-300);
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.2s ease;
    background: white;
    color: var(--text-primary);
}

.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 12px;
}

.multi-select {
    position: relative;
}

.multi-select-display {
    padding: 12px 16px;
    border: 1px solid var(--gray-300);
    border-radius: 8px;
    background: white;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1rem;
    color: var(--text-primary);
}

.multi-select-display .toggle-arrow {
    transition: transform 0.2s;
    font-size: 0.8rem;
}

.multi-select.open .multi-select-display .toggle-arrow {
    transform: rotate(180deg);
}

.multi-select-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid var(--gray-300);
    border-top: none;
    border-radius: 0 0 8px 8px;
    padding: 8px 0;
    z-index: 10;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.multi-select.open .multi-select-dropdown {
    display: block;
}

.multi-select-dropdown .checkbox-label {
    padding: 8px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    cursor: pointer;
}

.multi-select-dropdown .checkbox-label:hover {
    background: var(--gray-50);
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.85rem;
    color: var(--text-primary);
    cursor: pointer;
    font-weight: 400;
}

.checkbox-label input[type="checkbox"] {
    width: auto;
    margin: 0;
    cursor: pointer;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(12, 94, 150, 0.08);
}

.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 12px;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-weight: 400;
}

.checkbox-group input[type="checkbox"] {
    width: auto;
    margin-right: 8px;
    cursor: pointer;
}

.search-btn {
    width: 100%;
    padding: 16px 24px;
    background: linear-gradient(135deg, #0c5e96 0%, #094b77 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(12, 94, 150, 0.2);
}

.search-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(12, 94, 150, 0.3);
}

.search-btn:disabled {
    background: var(--gray-300);
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

.results-panel {
    background: white;
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    border: 1px solid var(--gray-200);
}

.results-stats {
    color: var(--text-secondary);
    font-size: 1rem;
    flex: 1;
    line-height: 1.6;
}

.download-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    background: linear-gradient(135deg, #0c5e96 0%, #094b77 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    box-shadow: 0 2px 6px rgba(12, 94, 150, 0.2);
}

.download-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(12, 94, 150, 0.3);
}

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

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

.results-grid {
    display: flex;
    flex-direction: column;
    gap: 24px;
    max-width: 100%;
}

.property-card {
    border: 1px solid var(--gray-200);
    border-radius: 12px;
    padding: 28px;
    transition: all 0.2s ease;
    cursor: pointer;
    background: white;
    min-width: 0;
    overflow: hidden;
    position: relative;
}

.property-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    transform: translateY(-2px);
}

.card-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-width: 0;
    max-width: 100%;
}

.card-row-top {
    margin-bottom: 2px;
}

.card-row-address {
    margin-bottom: 0;
    align-items: baseline;
    line-height: 1.2;
}

.property-image-container {
    margin-bottom: 15px;
    border-radius: 8px;
    overflow: hidden;
}

.property-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.property-rank {
    background: linear-gradient(135deg, #0c5e96 0%, #094b77 100%);
    color: white;
    font-weight: 600;
    font-size: 1.125rem;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(12, 94, 150, 0.2);
}

.property-info {
    flex: 1;
    margin: 0 20px;
    min-width: 0;
    overflow: hidden;
}

.property-address {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.3px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.property-details {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    line-height: 1.2;
}

.property-price {
    font-size: 1.625rem;
    font-weight: 600;
    color: var(--primary-color);
    letter-spacing: -0.5px;
    white-space: nowrap;
    flex-shrink: 0;
    line-height: 1;
}

.score-badge {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.875rem;
    margin-top: 12px;
}

.score-excellent {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.score-good {
    background: #dbeafe;
    color: #1e40af;
    border: 1px solid #bfdbfe;
}

.score-fair {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
}

.score-marginal {
    background: #fed7aa;
    color: #9a3412;
    border: 1px solid #fdba74;
}

.score-poor {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 24px 0;
    padding: 24px;
    background: var(--gray-50);
    border-radius: 12px;
}

.metric {
    text-align: center;
}

.metric-label {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    text-transform: none;
    letter-spacing: 0.8px;
    margin-bottom: 8px;
    font-weight: 500;
}

.metric-value {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.5px;
}

.metric-value.positive {
    color: var(--success-color);
}

.metric-value.negative {
    color: var(--danger-color);
}



.detail-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 15px;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    padding: 12px 16px;
    background: white;
    border-radius: 8px;
    font-size: 0.9375rem;
    border: 1px solid var(--gray-200);
}

.detail-label {
    color: var(--text-secondary);
}

.detail-value {
    font-weight: 600;
    color: var(--text-primary);
}

.strengths-concerns {
    margin-top: 15px;
}

.strengths, .concerns {
    margin-bottom: 10px;
}

.strengths h4 {
    color: var(--success-color);
    font-size: 0.9rem;
    margin-bottom: 5px;
}

.concerns h4 {
    color: var(--danger-color);
    font-size: 0.9rem;
    margin-bottom: 5px;
}

.strengths ul, .concerns ul {
    list-style: none;
    padding-left: 0;
}

.strengths li, .concerns li {
    padding: 4px 0;
    font-size: 0.85rem;
    color: var(--gray-700);
}

.strengths li::before {
    content: "✓ ";
    color: var(--success-color);
    font-weight: bold;
    margin-right: 5px;
}

.concerns li::before {
    content: "⚠ ";
    color: var(--danger-color);
    margin-right: 5px;
}

.property-link {
    display: inline-block;
    margin-top: 16px;
    padding: 12px 24px;
    background: linear-gradient(135deg, #0c5e96 0%, #094b77 100%);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9375rem;
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(12, 94, 150, 0.2);
}

.property-link:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(12, 94, 150, 0.3);
}

.error-panel {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
    padding: 24px;
    border-radius: 12px;
    text-align: center;
}

.error-topup-btn {
    display: inline-block;
    margin-top: 12px;
    padding: 10px 24px;
    background: #2563eb;
    color: #fff;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.2s;
}

.error-topup-btn:hover {
    background: #1d4ed8;
}

/* 500-Property Limit Warning */
.limit-warning {
    background: #fffbeb;
    border: 1px solid #fcd34d;
    border-radius: 12px;
    padding: 20px 24px;
    margin-bottom: 24px;
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.limit-warning-icon {
    font-size: 24px;
    flex-shrink: 0;
    line-height: 1;
}

.limit-warning-content {
    flex: 1;
}

.limit-warning-message {
    color: #92400e;
    font-weight: 600;
    font-size: 15px;
    margin-bottom: 6px;
}

.limit-warning-tip {
    color: #78350f;
    font-size: 14px;
    line-height: 1.5;
}

/* Loading Spinner */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-icon {
    width: 64px;
    height: 64px;
    animation: pulse-icon 1.4s ease-in-out infinite;
    filter: drop-shadow(0 0 12px rgba(255,255,255,0.3));
}

@keyframes pulse-icon {
    0%, 100% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.12); opacity: 1; }
}

.loading-text {
    color: white;
    font-size: 1.2rem;
    font-weight: 500;
    margin-top: 20px;
    text-align: center;
}

/* Map Styles */
.map-container {
    width: 100%;
    height: 100%;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--gray-200);
    position: relative;
    background: var(--gray-100);
}

#map {
    width: 100%;
    height: 100%;
    position: relative;
    z-index: 1;
}

.map-controls {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 1000;
    background: white;
    padding: 10px 15px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.map-control-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--gray-700);
    font-weight: 500;
}

.map-control-toggle input[type="checkbox"] {
    cursor: pointer;
}

.custom-marker {
    background: #475569;
    border: 2px solid #64748b;
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 10px;
    color: #e0f2fe;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.custom-marker span {
    transform: rotate(45deg);
    display: block;
}

.custom-marker.adi-unknown {
    background: #64748b;
    border-color: #475569;
    color: #e2e8f0;
}

.leaflet-popup-content-wrapper {
    border-radius: 8px;
    padding: 0;
}

.leaflet-popup-content {
    margin: 0;
    min-width: 250px;
}

.map-popup {
    padding: 15px;
}

.map-popup h3 {
    margin: 0 0 10px 0;
    color: #374151;
    font-size: 16px;
}

.map-popup .popup-price {
    font-size: 20px;
    font-weight: 700;
    color: #2563eb;
    margin-bottom: 8px;
}

.map-popup .popup-details {
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 8px;
}

.map-popup .popup-cashflow {
    font-size: 16px;
    font-weight: 600;
    margin: 8px 0;
}

.map-popup .popup-cashflow.positive {
    color: #10b981;
}

.map-popup .popup-cashflow.negative {
    color: #ef4444;
}

.map-popup .popup-link {
    display: inline-block;
    margin-top: 10px;
    color: #2563eb;
    text-decoration: none;
    font-weight: 500;
}

.map-popup .popup-link:hover {
    text-decoration: underline;
}

@media (max-width: 1200px) {
    .main-content {
        grid-template-columns: 1fr;
        padding: 24px 32px;
    }

    header > div {
        padding: 24px 32px;
    }

    .search-panel {
        position: static;
        max-height: none;
    }
}

@media (max-width: 768px) {
    header > div {
        padding: 24px 20px;
    }

    header h1 {
        font-size: 1.5rem;
    }

    .main-content {
        padding: 20px;
    }

    .search-panel,
    .results-panel {
        padding: 24px;
    }

    .welcome-section {
        grid-column: 1;
    }

    .hero-banner {
        padding: 24px;
    }

    .hero-left {
        max-width: 100%;
    }

    .hero-text h2 {
        font-size: 1.5rem;
    }

    .features-row {
        display: none;
    }

    .top-nav-inner {
        padding: 8px 24px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

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

    .detail-grid {
        grid-template-columns: 1fr;
    }
}

/* Pagination Controls */
.pagination-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin: 30px 0;
    padding: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.pagination-btn {
    padding: 12px 24px;
    background: linear-gradient(135deg, #0c5e96 0%, #094b77 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(12, 94, 150, 0.2);
}

.pagination-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(12, 94, 150, 0.3);
}

.pagination-btn:disabled {
    background: var(--gray-300);
    cursor: not-allowed;
    opacity: 0.5;
    box-shadow: none;
}

.page-info {
    color: var(--text-primary);
    font-size: 0.9375rem;
    font-weight: 500;
    min-width: 200px;
    text-align: center;
}

/* Results Filters */
/* ADI Legend */
.adi-legend-inner {
    background: white;
    padding: 10px 12px;
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    min-width: 180px;
}

.adi-legend-title {
    font-weight: 600;
    margin-bottom: 6px;
    font-size: 11px;
}

.adi-legend-bar {
    height: 12px;
    border-radius: 3px;
    background: linear-gradient(to right, #2166ac, #67a9cf, #d1e5f0, #fddbc7, #ef8a62, #b2182b);
}

.adi-legend-labels {
    display: flex;
    justify-content: space-between;
    font-size: 9px;
    color: #6b7280;
    margin-top: 3px;
}

@media (max-width: 1200px) {
    .adi-legend-inner {
        min-width: 120px;
        padding: 6px 8px;
    }

    .adi-legend-title {
        font-size: 9px;
        margin-bottom: 4px;
    }

    .adi-legend-bar {
        height: 8px;
    }

    .adi-legend-labels {
        font-size: 7px;
        margin-top: 2px;
    }
}

.results-filters {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 100;
    background: white;
    padding: 16px 20px;
    border-radius: 0 0 12px 12px;
    border: 1px solid var(--gray-200);
    border-top: none;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

.refine-arrow {
    display: none;
}

.refine-toggle {
    display: none;
}

.filter-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.filter-row {
    display: flex;
    gap: 12px;
}

.filter-row .filter-group {
    flex: 1;
    min-width: 0;
}

.filter-row-sliders .filter-group {
    flex: 1;
    min-width: 0;
}

.filter-group {
    display: flex;
    flex-direction: column;
}

.filter-group label {
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 6px;
}

.filter-group input[type="number"],
.filter-group input[type="text"],
.filter-group select {
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.875rem;
    transition: all 0.2s;
    width: 100%;
    background: white;
    height: 38px;
}

.filter-group input[type="number"]:focus,
.filter-group input[type="text"]:focus,
.filter-group select:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.filter-group .checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    align-items: center;
}

@media (max-width: 768px) {
    .filter-row {
        flex-direction: column;
    }
    .filter-row-4 {
        flex-wrap: wrap;
        flex-direction: row;
    }
    .filter-row-4 .filter-group {
        flex: 1 1 calc(50% - 6px);
    }
    .filter-row-sliders {
        flex-direction: column;
    }
}

.filter-btn {
    padding: 10px 24px;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.filter-btn-primary {
    background: linear-gradient(135deg, #0c5e96 0%, #094b77 100%);
    color: white;
    box-shadow: 0 2px 6px rgba(12, 94, 150, 0.2);
}

.filter-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(12, 94, 150, 0.3);
}

.filter-btn-secondary {
    background: white;
    color: var(--text-primary);
    border: 1px solid var(--gray-300);
}

.filter-btn-secondary:hover {
    background: var(--gray-50);
    border-color: var(--gray-400);
}

/* Deep Dive Button */
.deep-dive-btn {
    margin: 12px 0;
    padding: 12px 24px;
    background: linear-gradient(135deg, #4a90e2 0%, #357abd 100%);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9375rem;
    transition: all 0.2s ease;
    width: 100%;
    box-shadow: 0 2px 6px rgba(74, 144, 226, 0.2);
}

.deep-dive-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(74, 144, 226, 0.3);
}

/* Deep Dive Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease;
}

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

.modal-content {
    background: white;
    padding: 40px;
    border-radius: 12px;
    width: 90vw;
    max-width: 1100px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: slideUp 0.3s ease;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

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

.modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    color: #999;
    cursor: pointer;
    transition: color 0.2s;
}

.modal-close:hover {
    color: #333;
}

.deep-dive-results {
    font-family: inherit;
}

.deep-dive-results h3 {
    color: #1f2937;
    margin-bottom: 10px;
    font-size: 24px;
}

.deep-dive-results h4 {
    color: #374151;
    margin-top: 20px;
    margin-bottom: 10px;
    font-size: 18px;
}

.property-address {
    color: #6b7280;
    font-size: 14px;
    margin-bottom: 20px;
}

.rent-comparison,
.rental-comps,
.assessment,
.notes,
.analysis-text {
    margin: 20px 0;
    padding: 15px;
    background: #f9fafb;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.estimate-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #e5e7eb;
}

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

.estimate-row.positive {
    color: #059669;
    font-weight: 600;
}

.estimate-row.negative {
    color: #dc2626;
    font-weight: 600;
}

.estimate-label {
    color: #6b7280;
}

.estimate-value {
    font-weight: 600;
    color: #1f2937;
}

.rental-comps ul {
    list-style: none;
    padding: 0;
    margin: 10px 0;
}

.rental-comps li {
    padding: 8px 0;
    border-bottom: 1px solid #e5e7eb;
}

.rental-comps li:last-child {
    border-bottom: none;
}

.confidence {
    margin-top: 15px;
    padding: 10px;
    background: #eff6ff;
    border-radius: 6px;
    color: #1e40af;
    font-size: 14px;
}

.analysis-text pre {
    white-space: pre-wrap;
    word-wrap: break-word;
    font-family: inherit;
    font-size: 14px;
    line-height: 1.6;
    color: #374151;
    margin: 0;
}

.external-link {
    margin-top: 20px;
    text-align: center;
}

.external-link a {
    display: inline-block;
    padding: 10px 20px;
    background: #10b981;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    transition: background 0.2s;
}

.external-link a:hover {
    background: #059669;
}

.loading {
    text-align: center;
    padding: 40px;
    color: #6b7280;
    font-size: 16px;
}

.error-message {
    padding: 20px;
    background: #fef2f2;
    border-left: 4px solid #ef4444;
    border-radius: 8px;
}

.error-message h3 {
    color: #991b1b;
    margin-top: 0;
}

.error-message p {
    color: #7f1d1d;
    margin: 10px 0;
}

.error-message small {
    color: #991b1b;
    font-size: 12px;
}

/* Dual Range Slider Styles */
.range-slider-container {
    position: relative;
    height: 24px;
    touch-action: none;
}

.range-slider-thumb {
    position: absolute;
    width: 100%;
    pointer-events: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background: transparent;
    outline: none;
    top: 0;
}

/* Webkit (Chrome, Safari, Edge) */
.range-slider-thumb::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #2563eb;
    cursor: pointer;
    pointer-events: all;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: all 0.2s;
}

.range-slider-thumb::-webkit-slider-thumb:hover {
    background: #1d4ed8;
    transform: scale(1.1);
}

.range-slider-thumb::-webkit-slider-thumb:active {
    transform: scale(1.2);
}

/* Firefox */
.range-slider-thumb::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #2563eb;
    cursor: pointer;
    pointer-events: all;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: all 0.2s;
}

.range-slider-thumb::-moz-range-thumb:hover {
    background: #1d4ed8;
    transform: scale(1.1);
}

.range-slider-thumb::-moz-range-thumb:active {
    transform: scale(1.2);
}

/* Make the max slider appear on top */
.range-slider-thumb-max {
    z-index: 2;
}


/* Favorites Button Styles — extends .top-nav-item via HTML class */
.favorites-header-btn {
    /* inherits .top-nav-item base; no overrides needed */
}

.favorites-header-btn:hover {
    /* inherits .top-nav-item:hover */
}

.favorites-count {
    background: #ef4444;
    color: white;
    border-radius: 12px;
    padding: 2px 8px;
    font-size: 0.9rem;
    font-weight: 700;
    min-width: 24px;
    text-align: center;
}

.favorite-btn {
    background: transparent;
    border: 1.5px solid #d1d5db;
    color: #9ca3af;
    font-size: 1.1rem;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    flex-shrink: 0;
}

.favorite-btn:hover {
    border-color: #ef4444;
    color: #ef4444;
    transform: scale(1.1);
}

.favorite-btn.favorited {
    border-color: #ef4444;
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
}

.favorite-btn.favorited:hover {
    color: #dc2626;
    border-color: #dc2626;
}

/* Back to Search Results Button */
.back-to-search-btn {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(37, 99, 235, 0.2);
}

.back-to-search-btn:hover {
    background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
    box-shadow: 0 4px 8px rgba(37, 99, 235, 0.3);
    transform: translateY(-1px);
}

/* Scenario Planner Styles */
.scenario-planner {
    font-family: inherit;
    max-height: 80vh;
    overflow-y: auto;
}

.scenario-planner h3 {
    color: #1f2937;
    font-size: 24px;
}

.scenario-planner h4 {
    color: #374151;
    font-size: 16px;
    margin-bottom: 12px;
    font-weight: 600;
}

.scenario-inputs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.input-section {
    background: #f9fafb;
    padding: 16px;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.input-row {
    margin-bottom: 12px;
}

.input-row:last-child {
    margin-bottom: 0;
}

.input-row label {
    display: block;
    color: #6b7280;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 4px;
}

.input-row input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    transition: all 0.2s;
}

.input-row input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.scenario-results {
    background: white;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}


.metrics-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.metric-highlight {
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    padding: 16px;
    border-radius: 8px;
}

.metric-highlight.positive .metric-value {
    color: #16a34a;
}

.metric-highlight.negative .metric-value {
    color: #dc2626;
}

.metric-highlight .metric-label {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.metric-highlight .metric-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
}

.detailed-breakdown {
    margin-top: 20px;
}

.results-loading {
    text-align: center;
    color: #6b7280;
    padding: 20px;
}

/* Scenario Action Buttons */
.scenario-action-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.scenario-save-btn {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    color: white;
    box-shadow: 0 2px 4px rgba(5, 150, 105, 0.3);
}

.scenario-save-btn:hover {
    background: linear-gradient(135deg, #047857 0%, #065f46 100%);
    box-shadow: 0 4px 8px rgba(5, 150, 105, 0.4);
    transform: translateY(-1px);
}

.scenario-reset-btn {
    background: #f3f4f6;
    color: #374151;
    border: 1px solid #d1d5db;
}

.scenario-reset-btn:hover {
    background: #e5e7eb;
    border-color: #9ca3af;
}

.scenario-restore-btn {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: white;
    box-shadow: 0 2px 4px rgba(37, 99, 235, 0.3);
}

.scenario-restore-btn:hover {
    background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
    box-shadow: 0 4px 8px rgba(37, 99, 235, 0.4);
    transform: translateY(-1px);
}

/* Scenario Badge */
.scenario-badge {
    display: inline-block;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    margin-top: 6px;
}

/* Autocomplete Dropdown */
.autocomplete-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid var(--gray-300);
    border-top: none;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
    margin-top: -1px;
}

.autocomplete-item {
    padding: 12px 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid var(--gray-100);
    transition: background-color 0.15s ease;
}

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

.autocomplete-item:hover,
.autocomplete-item.selected {
    background-color: var(--gray-50);
}

.autocomplete-item-icon {
    display: none;
}

.autocomplete-item-text {
    flex: 1;
    font-size: 14px;
    color: var(--gray-900);
}

.autocomplete-item-type {
    font-size: 11px;
    color: var(--gray-500);
    text-transform: none;
    font-weight: 600;
    padding: 2px 6px;
    background: var(--gray-100);
    border-radius: 4px;
}

.autocomplete-no-results {
    padding: 16px;
    text-align: center;
    color: var(--gray-500);
    font-size: 14px;
}

/* Rental Comps Split Layout */
.comps-split-layout {
    display: flex;
    gap: 16px;
    background: #f9fafb;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 15px;
}

.comps-list {
    flex: 1;
    min-width: 0;
}

.comps-map-container {
    flex: 1;
    min-width: 0;
}

.comps-map {
    width: 100%;
    height: 100%;
    min-height: 280px;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

/* Comp map custom markers */
.comp-map-marker {
    background: none !important;
    border: none !important;
}

.marker-dot {
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-weight: 700;
    font-size: 12px;
    color: white;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    border: 2px solid white;
}

.marker-dot-target {
    width: 28px;
    height: 28px;
    background: #3b82f6;
    font-size: 14px;
}

.marker-dot-comp {
    width: 24px;
    height: 24px;
    background: #10b981;
    font-size: 11px;
}

@media (max-width: 768px) {
    .comps-split-layout {
        flex-direction: column;
    }

    .comps-map {
        min-height: 220px;
    }
}

/* ===== Results Mode (split-screen layout) ===== */

/* Compact Results Toolbar */
.refine-dropdown-wrapper {
    position: relative;
    flex-shrink: 0;
}

.results-toolbar {
    display: flex;
    align-items: center;
    padding: 6px 16px;
    background: white;
    border-radius: 8px;
    border: 1px solid var(--gray-200);
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    min-width: 0;
    max-width: 100%;
    gap: 10px;
    margin-bottom: 8px;
    overflow: hidden;
}

.toolbar-left {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.toolbar-summary {
    font-size: 0.9rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

.toolbar-summary strong {
    color: var(--text-primary);
}

.toolbar-divider {
    width: 1px;
    height: 18px;
    background: var(--gray-300);
    flex-shrink: 0;
}

.toolbar-stats {
    font-size: 0.85rem;
    color: var(--text-secondary);
    white-space: nowrap;
    flex-shrink: 0;
}

.toolbar-stats strong {
    color: var(--text-primary);
}

.toolbar-warning {
    font-size: 1rem;
    cursor: help;
    flex-shrink: 0;
    color: #f59e0b;
    line-height: 1;
}

.toolbar-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    margin-left: auto;
}

.toolbar-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 14px;
    border: 1px solid var(--gray-300);
    border-radius: 6px;
    background: white;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
    font-family: inherit;
}

.toolbar-btn:hover {
    background: var(--gray-50);
    border-color: var(--gray-600);
}

.toolbar-btn svg {
    width: 14px;
    height: 14px;
}

.toolbar-btn-primary {
    background: linear-gradient(135deg, #0c5e96 0%, #094b77 100%);
    color: white;
    border-color: transparent;
    box-shadow: 0 1px 4px rgba(12, 94, 150, 0.2);
}

.toolbar-btn-primary:hover {
    background: linear-gradient(135deg, #094b77 0%, #073d62 100%);
    border-color: transparent;
}

.toolbar-btn.active {
    background: var(--gray-100);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* Results mode: flex column filling viewport, no page scroll */
.main-content.results-mode {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 49px);
    overflow: hidden;
    max-width: 100%;
    padding: 8px 12px 0;
}

.main-content.results-mode .search-panel {
    display: none;
}

.main-content.results-mode .welcome-section {
    display: none !important;
}

.main-content.results-mode .results-panel {
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
    flex: 1;
    min-height: 0;
    overflow: hidden;
    max-width: 100%;
}

/* Split Layout */
.split-layout {
    display: flex;
    gap: 24px;
    height: 100%;
    overflow-x: hidden;
}

.split-left {
    flex: 1;
    min-width: 0;
    overflow-y: auto;
    overflow-x: hidden;
}

.split-right {
    flex: 2;
    min-width: 0;
    height: 100%;
    overflow: hidden;
}

.split-right .map-container {
    height: 100%;
}

/* Card hover highlight */
.property-card.highlighted {
    box-shadow: 0 0 0 3px #3b82f6, 0 4px 16px rgba(59, 130, 246, 0.15);
    transform: translateY(-2px);
}

/* Marker hover highlight */
.custom-marker.marker-highlighted {
    background: #3b82f6;
    border-color: #ffffff;
    color: #ffffff;
    transform: rotate(-45deg) scale(1.5);
    box-shadow: 0 0 12px rgba(59, 130, 246, 0.7);
    z-index: 10000 !important;
    transition: all 0.2s ease;
}

/* Compact card adjustments in split layout */
.split-left .results-grid {
    gap: 12px;
}

.split-left .property-card {
    padding: 16px;
}

.split-left .card-row-top {
    margin-bottom: 0;
}

.split-left .card-row-address {
    margin-bottom: 0;
}

.split-left .property-address {
    font-size: 0.95rem;
    line-height: 1.2;
}

.split-left .property-details {
    font-size: 0.8rem;
    line-height: 1.2;
}

.split-left .property-price {
    font-size: 1.25rem;
}

.split-left .property-rank {
    width: 34px;
    height: 34px;
    font-size: 0.9rem;
}

.split-left .favorite-btn {
    width: 26px;
    height: 26px;
    font-size: 0.95rem;
}

.split-left .property-image {
    height: 140px;
}

.split-left .property-image-container {
    margin-bottom: 8px;
}

.split-left .metrics-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin: 12px 0;
    padding: 14px;
}

.split-left .metric-label {
    font-size: 0.7rem;
    margin-bottom: 4px;
}

.split-left .metric-value {
    font-size: 1.1rem;
}

.split-left .comps-split-layout {
    flex-direction: column;
}

.split-left .detail-grid {
    grid-template-columns: 1fr;
}

/* Responsive: stack at < 1200px */
@media (max-width: 1200px) {
    .split-layout {
        flex-direction: column;
        gap: 0;
    }

    .split-right {
        order: -1;
        flex: none;
        height: 28vh;
        margin-bottom: 8px;
    }

    .split-left {
        flex: 1;
        min-height: 0;
    }

    .main-content.results-mode {
        max-width: 100%;
    }
}

/* Toolbar responsive */
@media (max-width: 768px) {
    .results-toolbar {
        flex-wrap: wrap;
        padding: 5px 10px;
        gap: 4px;
        margin-bottom: 6px;
    }

    .toolbar-left {
        flex: 1 1 100%;
        overflow: hidden;
    }

    .toolbar-summary {
        font-size: 0.8rem;
    }

    .toolbar-stats {
        font-size: 0.8rem;
    }

    .toolbar-actions {
        flex: 1 1 100%;
        justify-content: flex-end;
    }

    .toolbar-btn {
        padding: 4px 8px;
        font-size: 0.75rem;
    }

    .results-filters {
        padding: 12px 14px;
    }
}

/* ===== Billing Page ===== */

.billing-page {
    max-width: 960px;
    margin: 0 auto;
    padding: 24px;
}

.billing-section {
    margin-bottom: 32px;
}

.billing-heading {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--gray-800);
    margin: 0 0 16px 0;
}

.current-plan-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: white;
    padding: 20px 24px;
    border-radius: 12px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
    border: 1px solid var(--gray-200);
}

.plan-info {
    display: flex;
    align-items: center;
    gap: 16px;
}

.plan-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.05em;
}

.plan-badge-free {
    background: #f3f4f6;
    color: #6b7280;
}

.plan-badge-basic {
    background: #dbeafe;
    color: #1d4ed8;
}

.plan-badge-pro {
    background: #ede9fe;
    color: #6d28d9;
}

.btn-cancel {
    background: none;
    border: 1px solid #fca5a5;
    color: #dc2626;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.85rem;
    cursor: pointer;
    font-weight: 500;
    transition: background 0.2s;
}

.btn-cancel:hover {
    background: #fef2f2;
}

/* Pricing Grid */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.pricing-card {
    background: white;
    border-radius: 12px;
    padding: 28px 24px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
    border: 1px solid var(--gray-200);
    display: flex;
    flex-direction: column;
    position: relative;
}

.pricing-card-featured {
    border-color: var(--primary-color);
    box-shadow: 0 4px 16px rgba(12, 94, 150, 0.15);
}

.pricing-card-active {
    border-color: var(--success-color);
}

.pricing-card-badge {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary-color);
    color: white;
    padding: 2px 14px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}

.pricing-card-header h3 {
    font-size: 1.1rem;
    color: var(--gray-800);
    margin: 0 0 4px 0;
}

.pricing-price {
    font-size: 2rem;
    font-weight: 800;
    color: var(--gray-900);
    margin-bottom: 16px;
}

.pricing-price span {
    font-size: 0.9rem;
    font-weight: 400;
    color: var(--gray-600);
}

.pricing-features {
    list-style: none;
    padding: 0;
    margin: 0 0 24px 0;
    flex: 1;
}

.pricing-features li {
    padding: 6px 0;
    font-size: 0.9rem;
    color: var(--gray-700);
}

.pricing-features li::before {
    content: "\2713";
    margin-right: 8px;
    color: var(--success-color);
    font-weight: 700;
}

.btn-pricing {
    width: 100%;
    padding: 12px;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: background 0.2s, transform 0.1s;
}

.btn-pricing:active {
    transform: scale(0.98);
}

.btn-subscribe {
    background: var(--primary-color);
    color: white;
}

.btn-subscribe:hover {
    background: var(--primary-hover);
}

.btn-topup {
    background: #059669;
    color: white;
}

.btn-topup:hover {
    background: #047857;
}

.btn-current {
    background: var(--gray-100);
    color: var(--gray-600);
    cursor: default;
}

/* Payment History */
.payment-history-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
    border: 1px solid var(--gray-200);
    overflow: hidden;
}

.payment-table {
    width: 100%;
    border-collapse: collapse;
}

.payment-table th {
    text-align: left;
    padding: 12px 16px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--gray-600);
    text-transform: none;
    letter-spacing: 0.04em;
    background: var(--gray-50);
    border-bottom: 1px solid var(--gray-200);
}

.payment-table td {
    padding: 12px 16px;
    font-size: 0.9rem;
    color: var(--gray-700);
    border-bottom: 1px solid var(--gray-100);
}

.payment-type-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 500;
}

.payment-type-subscription {
    background: #dbeafe;
    color: #1d4ed8;
}

.payment-type-topup {
    background: #d1fae5;
    color: #047857;
}

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

    .current-plan-card {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }

    .plan-info {
        flex-direction: column;
    }
}

/* ============ Landing Page ============ */

.landing-body {
    background: #4a5f7f;
}

.landing-nav {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    padding: 0 24px;
}

.landing-nav-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 64px;
}

.landing-logo {
    display: flex;
    align-items: center;
}

.landing-brand-img {
    height: 48px;
    width: auto;
}

.landing-nav-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.landing-btn-secondary {
    color: rgba(255,255,255,0.9);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    padding: 8px 18px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.35);
    transition: background 0.15s;
}

.landing-btn-secondary:hover {
    background: rgba(255,255,255,0.12);
}

.landing-btn-primary {
    display: inline-block;
    background: #fbbf24;
    color: #fff;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 700;
    padding: 8px 20px;
    border-radius: 8px;
    transition: background 0.15s;
}

.landing-btn-primary:hover {
    background: #f0a500;
}

.landing-btn-lg {
    font-size: 1.05rem;
    padding: 14px 36px;
    border-radius: 10px;
}

/* Full-page background */
.landing-page-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

.landing-bg-img {
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.landing-nav,
.landing-hero,
.landing-steps,
.landing-cta,
.landing-footer {
    position: relative;
    z-index: 1;
}

/* Hero */
.landing-hero {
    text-align: center;
    padding: 80px 24px 64px;
    max-width: 700px;
    margin: 0 auto;
}

.landing-hero h1 {
    font-size: 2.6rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.2;
    margin-bottom: 16px;
    letter-spacing: -0.5px;
    text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.landing-hero p {
    font-size: 1.15rem;
    color: rgba(255,255,255,0.85);
    margin-bottom: 32px;
    line-height: 1.6;
    text-shadow: 0 1px 4px rgba(0,0,0,0.2);
}

/* Steps */
.landing-steps {
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(2px);
    padding: 64px 24px;
}

.landing-steps h2 {
    text-align: center;
    font-size: 1.8rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 48px;
    text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.landing-steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    max-width: 1100px;
    margin: 0 auto;
}

.landing-step {
    background: rgba(255,255,255,0.92);
    border-radius: 14px;
    padding: 32px 28px;
    text-align: center;
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
    position: relative;
}

.landing-step-number {
    position: absolute;
    top: -14px;
    left: 50%;
    transform: translateX(-50%);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--primary-color);
    color: #fff;
    font-size: 0.85rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.landing-step-icon {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 12px;
}

.landing-step h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 8px;
}

.landing-step p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 20px;
}

.landing-screenshot-placeholder {
    background: var(--gray-100);
    border: 2px dashed var(--gray-300);
    border-radius: 10px;
    padding: 48px 16px;
    color: var(--gray-600);
    font-size: 0.85rem;
}

/* CTA */
.landing-cta {
    text-align: center;
    padding: 36px 24px;
    margin-bottom: 200px;
}

.landing-cta h2 {
    font-size: 1.8rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 24px;
    text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

/* Footer */
.landing-footer {
    border-top: 1px solid rgba(255,255,255,0.2);
    padding: 24px;
    text-align: center;
}

.landing-footer-links a {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    font-size: 0.85rem;
}

.landing-footer-links a:hover {
    color: #fff;
    text-decoration: underline;
}

.landing-footer-sep {
    color: rgba(255,255,255,0.3);
    margin: 0 12px;
}

/* Compare Checkbox on Property Cards */
.compare-checkbox-container {
    position: absolute;
    bottom: 10px;
    right: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.compare-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary-color);
}

.compare-checkbox-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    cursor: pointer;
    user-select: none;
}

/* Compare Floating Toolbar */
.compare-toolbar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--gray-800);
    color: white;
    padding: 14px 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    z-index: 9999;
    box-shadow: 0 -4px 12px rgba(0,0,0,0.15);
}

.compare-btn {
    background: var(--success-color);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: opacity 0.2s;
}

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

.compare-btn:not(:disabled):hover {
    opacity: 0.9;
}

.compare-cancel-btn {
    background: transparent;
    color: #ccc;
    border: 1px solid #666;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.2s;
}

.compare-cancel-btn:hover {
    background: rgba(255,255,255,0.1);
}

/* Compare Modal */
.compare-modal-content {
    max-width: 1000px;
    max-height: 85vh;
    overflow-y: auto;
}

.compare-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.compare-section-row td {
    background: var(--gray-100);
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: none;
    letter-spacing: 0.5px;
    color: var(--gray-700);
    padding: 10px 12px;
    border-bottom: 2px solid var(--gray-200);
}

.compare-label-cell {
    font-weight: 600;
    color: var(--text-secondary);
    padding: 8px 12px;
    border-bottom: 1px solid var(--gray-200);
    white-space: nowrap;
    width: 160px;
    min-width: 140px;
}

.compare-value-cell {
    padding: 8px 12px;
    border-bottom: 1px solid var(--gray-200);
    text-align: center;
    color: var(--text-primary);
}

.compare-best {
    background: #ecfdf5;
    font-weight: 600;
}

.compare-best::after {
    content: '';
}

.compare-positive {
    color: var(--success-color);
    font-weight: 600;
}

.compare-negative {
    color: var(--danger-color);
    font-weight: 600;
}

.compare-list, .compare-list-concerns {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: left;
    font-size: 0.85rem;
}

.compare-list li::before {
    content: '\2713 ';
    color: var(--success-color);
    font-weight: 700;
}

.compare-list-concerns li::before {
    content: '\26A0 ';
    color: var(--warning-color);
}

.compare-map-container {
    width: 100%;
    height: 250px;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 20px;
    border: 1px solid var(--gray-200);
}

.compare-address-cell {
    font-weight: 600;
    color: var(--primary-color);
    max-width: 200px;
    word-wrap: break-word;
}

/* Responsive */
@media (max-width: 768px) {
    .compare-modal-content {
        max-width: 95vw;
        padding: 16px;
    }

    .compare-table {
        font-size: 0.8rem;
    }

    .compare-label-cell {
        min-width: 100px;
        width: 100px;
        padding: 6px 8px;
    }

    .compare-value-cell {
        padding: 6px 8px;
    }

    .compare-toolbar {
        padding: 10px 16px;
        gap: 10px;
        flex-wrap: wrap;
    }

    .compare-map-container {
        height: 180px;
    }

    .landing-hero {
        padding: 48px 20px 40px;
    }

    .landing-hero h1 {
        font-size: 1.8rem;
    }

    .landing-steps-grid {
        grid-template-columns: 1fr;
        max-width: 400px;
    }
}

/* ============================================
   MOBILE EXPERIENCE IMPROVEMENTS
   ============================================ */

/* Hamburger button — hidden on desktop */
.hamburger-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 10;
}

.hamburger-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: white;
    margin: 5px 0;
    border-radius: 2px;
    transition: transform 0.3s, opacity 0.3s;
}

.hamburger-toggle.open span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger-toggle.open span:nth-child(2) {
    opacity: 0;
}

.hamburger-toggle.open span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile nav & hamburger */
@media (max-width: 768px) {
    .hamburger-toggle {
        display: block;
    }

    .top-nav-actions {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: linear-gradient(135deg, #0c5e96 0%, #094b77 100%);
        flex-direction: column;
        padding: 16px 24px;
        gap: 12px;
        box-shadow: 0 4px 12px rgba(0,0,0,0.15);
        z-index: 100;
    }

    .top-nav-actions.open {
        display: flex;
    }

    .top-nav-inner {
        position: relative;
    }

    .top-nav-credits {
        text-align: center;
    }

    /* Hero section mobile optimization */
    .hero-banner {
        min-height: 85vh;
        padding: 20px;
        align-items: flex-start;
    }

    .hero-left {
        max-width: 100%;
        margin-bottom: 16px;
        gap: 24px;
    }

    .hero-bg-img {
        object-position: center 40%;
    }

    .hero-overlay {
        background: linear-gradient(
            to top,
            rgba(0, 0, 0, 0.5) 0%,
            rgba(0, 0, 0, 0.15) 50%,
            transparent 100%
        );
    }

    .hero-text h2 {
        font-size: 1.3rem;
    }

    .hero-text p {
        font-size: 0.8rem;
    }

    /* Touch targets for range sliders */
    .range-slider input[type="range"]::-webkit-slider-thumb {
        width: 36px;
        height: 36px;
    }

    .range-slider input[type="range"]::-moz-range-thumb {
        width: 36px;
        height: 36px;
    }

    .range-slider-thumb::-webkit-slider-thumb {
        width: 36px !important;
        height: 36px !important;
    }

    .range-slider-thumb::-moz-range-thumb {
        width: 36px !important;
        height: 36px !important;
    }

    /* Modal padding on mobile */
    .modal-content {
        padding: 20px 16px;
        width: calc(100% - 32px);
        max-width: none;
        max-height: 90vh;
        margin: 0;
    }

    .modal-close {
        top: 10px;
        right: 14px;
        font-size: 32px;
        padding: 4px 8px;
    }

    /* Signup modal name fields stacking */
    .signup-name-row {
        flex-direction: column !important;
    }

    /* Compare toolbar safe area */
    .compare-toolbar {
        padding-bottom: calc(14px + env(safe-area-inset-bottom));
    }

    /* Compact property cards */
    .results-grid {
        gap: 12px;
    }

    .property-card {
        padding: 16px;
    }

    .card-row-top {
        margin-bottom: 4px;
    }

    .card-row-address {
        margin-bottom: 2px;
    }

    .property-rank {
        width: 32px;
        height: 32px;
        font-size: 0.875rem;
    }

    .favorite-btn {
        width: 26px;
        height: 26px;
        font-size: 0.95rem;
    }

    .property-address {
        font-size: 0.95rem;
    }

    .property-details {
        font-size: 0.8rem;
        line-height: 1.3;
    }

    .property-price {
        font-size: 1.25rem;
    }

    .score-badge {
        padding: 4px 10px;
        font-size: 0.8rem;
        margin-top: 6px;
    }

    /* Compact metrics grid */
    .metrics-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
        margin: 10px 0;
        padding: 12px;
    }

    .metric-label {
        font-size: 0.7rem;
        letter-spacing: 0.5px;
        margin-bottom: 2px;
    }

    .metric-value {
        font-size: 1.1rem;
    }


}

/* Small phone breakpoint */
@media (max-width: 480px) {
    .top-nav-brand {
        height: 28px;
    }

    .top-nav-inner {
        padding: 6px 16px;
    }

    .hero-banner {
        padding: 16px;
    }

    .hero-search-card {
        padding: 16px;
    }

    .hero-search-card h3 {
        font-size: 1rem;
    }

    .info-icon::after {
        max-width: 200px;
    }

    .main-content {
        padding: 16px;
    }

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

    .download-btn {
        font-size: 0.8rem;
        padding: 8px 12px;
    }

    .pagination-controls {
        gap: 10px;
        padding: 12px;
    }

    .pagination-btn {
        padding: 10px 16px;
        font-size: 0.85rem;
    }

    .page-info {
        font-size: 0.85rem;
        min-width: auto;
    }
}

/* =============================================
   Marketing Sections
   ============================================= */

.marketing-sections {
    font-family: 'Avenir Next', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', sans-serif;
}

.mkt-section {
    padding: 72px 48px;
}

.mkt-section:nth-child(even) {
    background: white;
}

.mkt-section:nth-child(odd) {
    background: var(--gray-50);
}

.mkt-inner {
    max-width: 1100px;
    margin: 0 auto;
}

.mkt-heading {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 12px;
    line-height: 1.25;
}

.mkt-subheading {
    font-size: 1.05rem;
    color: var(--text-secondary);
    margin-bottom: 40px;
    max-width: 600px;
}

/* How It Works — steps */
.mkt-how-it-works .mkt-subheading {
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

.mkt-how-it-works .mkt-heading {
    text-align: center;
}

.mkt-steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.mkt-step {
    text-align: center;
    padding: 24px;
}

.mkt-step-number {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    font-size: 1.2rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.mkt-step h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: 8px;
}

.mkt-step p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Split layout — text + visual */
.mkt-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 56px;
    align-items: center;
}

.mkt-split-reverse {
    direction: rtl;
}

.mkt-split-reverse > * {
    direction: ltr;
}

.mkt-split-text p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 16px;
}

.mkt-checklist {
    list-style: none;
    padding: 0;
    margin: 20px 0 0 0;
}

.mkt-checklist li {
    position: relative;
    padding-left: 28px;
    margin-bottom: 12px;
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.mkt-checklist li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 4px;
    width: 18px;
    height: 18px;
    background: var(--primary-color);
    border-radius: 50%;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z'/%3E%3C/svg%3E");
    background-size: 12px;
    background-repeat: no-repeat;
    background-position: center;
}

/* Badge */
.mkt-badge-line {
    margin-bottom: 12px;
}

.mkt-badge {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--primary-color);
    background: rgba(12, 94, 150, 0.1);
    padding: 4px 10px;
    border-radius: 4px;
}

/* Metric stack visual */
.mkt-metric-stack {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.mkt-metric-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: 10px;
    padding: 16px 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.mkt-scale .mkt-metric-card {
    background: var(--gray-50);
}

.mkt-metric-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.mkt-metric-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--gray-800);
}

.mkt-metric-value.positive {
    color: var(--success-color);
}

/* Score demo visual */
.mkt-score-demo {
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: 12px;
    padding: 32px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.mkt-apri-score .mkt-score-demo {
    background: var(--gray-50);
}

.mkt-score-bar {
    height: 12px;
    background: var(--gray-200);
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 12px;
}

.mkt-score-fill {
    height: 100%;
    background: linear-gradient(90deg, #ef4444 0%, #8b5cf6 50%, var(--primary-color) 100%);
    border-radius: 6px;
}

.mkt-score-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.mkt-score-marker {
    font-weight: 700;
    color: var(--primary-color);
    font-size: 1.1rem;
}

.mkt-score-desc {
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin: 0;
}

/* Comp list visual */
.mkt-comp-list {
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.mkt-comp-item {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 12px;
    align-items: center;
    padding: 14px 20px;
    border-bottom: 1px solid var(--gray-100);
}

.mkt-comp-address {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--gray-800);
}

.mkt-comp-detail {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.mkt-comp-rent {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--primary-color);
}

.mkt-comp-footer {
    padding: 14px 20px;
    background: var(--gray-50);
    font-size: 0.9rem;
    color: var(--gray-800);
}

.mkt-comp-source {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-left: 4px;
}

/* Tools grid */
.mkt-tools .mkt-heading,
.mkt-tools .mkt-subheading {
    text-align: center;
}

.mkt-tools .mkt-subheading {
    margin-left: auto;
    margin-right: auto;
}

.mkt-tools-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.mkt-tool-card {
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: 12px;
    padding: 28px 24px;
    text-align: center;
    transition: box-shadow 0.2s ease;
}

.mkt-tool-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}

.mkt-tool-icon {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 14px;
}

.mkt-tool-card h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: 8px;
}

.mkt-tool-card p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* CTA section */
.mkt-cta {
    background: linear-gradient(135deg, #0c5e96 0%, #094b77 100%) !important;
    text-align: center;
}

.mkt-cta .mkt-heading {
    color: white;
}

.mkt-cta .mkt-subheading {
    color: rgba(255,255,255,0.8);
    margin-left: auto;
    margin-right: auto;
}

.mkt-cta-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.mkt-cta-primary {
    display: inline-block;
    background: #fbbf24;
    color: #1a2128;
    font-weight: 700;
    font-size: 1rem;
    padding: 14px 36px;
    border-radius: 8px;
    text-decoration: none;
    transition: background 0.2s ease;
}

.mkt-cta-primary:hover {
    background: #f59e0b;
}

.mkt-cta-secondary {
    display: inline-block;
    background: rgba(255,255,255,0.15);
    color: white;
    font-weight: 600;
    font-size: 1rem;
    padding: 14px 36px;
    border-radius: 8px;
    text-decoration: none;
    border: 1px solid rgba(255,255,255,0.3);
    transition: background 0.2s ease;
}

.mkt-cta-secondary:hover {
    background: rgba(255,255,255,0.25);
}

/* Hide marketing sections when results are showing */
.marketing-sections.hidden {
    display: none;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .mkt-section {
        padding: 48px 20px;
    }

    .mkt-heading {
        font-size: 1.4rem;
    }

    .mkt-steps {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .mkt-split {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .mkt-split-reverse {
        direction: ltr;
    }

    .mkt-tools-grid {
        grid-template-columns: 1fr 1fr;
        gap: 16px;
    }

    .mkt-comp-item {
        grid-template-columns: 1fr;
        gap: 4px;
    }

    .mkt-comp-rent {
        justify-self: start;
    }
}

@media (max-width: 480px) {
    .mkt-tools-grid {
        grid-template-columns: 1fr;
    }
}

/* Info icon tooltips */
.info-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 15px;
    height: 15px;
    font-size: 10px;
    font-weight: 400;
    font-style: normal;
    font-family: 'Avenir Next', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', sans-serif;
    color: #999;
    border: 1px solid #bbb;
    border-radius: 50%;
    cursor: help;
    position: relative;
    vertical-align: middle;
    line-height: 1;
    -webkit-tap-highlight-color: transparent;
    flex-shrink: 0;
}

.hero-search-card:not(.active) .info-icon {
    color: #555;
    border-color: #777;
}

.info-icon:hover,
.info-icon:focus {
    color: var(--gray-700);
    border-color: var(--gray-700);
    outline: none;
}

.info-icon::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: var(--gray-800);
    color: #fff;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 400;
    font-style: normal;
    font-family: 'Avenir Next', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', sans-serif;
    line-height: 1.4;
    white-space: normal;
    width: max-content;
    max-width: 260px;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.15s, visibility 0.15s;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0,0,0,0.18);
}

.info-icon::before {
    content: '';
    position: absolute;
    bottom: calc(100% + 2px);
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: var(--gray-800);
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.15s, visibility 0.15s;
    z-index: 100;
}

.info-icon:hover::after,
.info-icon:hover::before,
.info-icon:focus::after,
.info-icon:focus::before {
    opacity: 1;
    visibility: visible;
}

.info-icon.tooltip-right::after {
    left: 0;
    transform: translateX(0);
}

.info-icon.tooltip-right::before {
    left: 7px;
    transform: translateX(0);
}

@media (max-width: 768px) {
    .info-icon::after {
        left: 0;
        transform: translateX(0);
    }
    .info-icon::before {
        left: 7px;
        transform: translateX(0);
    }
}
