@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Lora:ital,wght@0,400;0,500;0,600;0,700;1,400&family=Caveat:wght@600;700&display=swap');

html {
    font-size: 18px;
}

:root {
    --bg-primary: #003594; /* Premium Best Buy deep blue */
    --bg-surface: rgba(0, 39, 115, 0.65); /* Premium glassmorphism dark blue surface */
    --border-color: rgba(255, 255, 255, 0.12); /* Subtle white border */
    --border-focus: #fff200; /* Vibrant Best Buy yellow */
    --text-primary: #ffffff; /* White text for contrast */
    --text-secondary: #93c5fd; /* Light sky blue subtext */
    --accent-color: #fff200; /* Vibrant Best Buy yellow */
    --accent-glow: rgba(255, 242, 0, 0.15); /* Soft yellow glow */
    --success-color: #34d399; /* Light emerald green */
    --error-color: #f87171; /* Rose red */
    --font-sans: 'Inter', sans-serif;
}

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

body {
    background-color: var(--bg-primary);
    background-image: radial-gradient(circle at 50% 0%, #0046be 0%, var(--bg-primary) 70%);
    color: var(--text-primary);
    font-family: var(--font-sans);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1.5rem;
    overflow-x: hidden;
}

.container {
    width: 100%;
    max-width: 540px;
    animation: fadeIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.brand {
    text-align: center;
    margin-bottom: 2rem;
}

.brand-name {
    font-size: 3.25rem;
    font-weight: 700;
    letter-spacing: -0.05em;
    background: linear-gradient(135deg, var(--text-primary) 30%, var(--accent-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
}

.brand-slogan {
    font-size: 0.95rem;
    font-weight: 400;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.15em;
}

.card {
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.25);
    position: relative;
    overflow: visible;
    color: #0f172a;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, rgba(255, 242, 0, 0) 0%, rgba(255, 242, 0, 0.15) 50%, rgba(255, 242, 0, 0) 100%);
}

.intro-text {
    font-size: 1.05rem;
    line-height: 1.6;
    color: #475569;
    text-align: center;
    margin-bottom: 2rem;
}

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

label {
    display: block;
    font-size: 0.95rem;
    font-weight: 500;
    color: #0f172a;
    margin-bottom: 0.25rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.hint {
    display: block;
    font-size: 0.85rem;
    color: #64748b;
    margin-bottom: 0.5rem;
    font-weight: 400;
}

.input-control {
    width: 100%;
    background: #ffffff;
    border: 1.5px solid #94a3b8;
    border-radius: 10px;
    padding: 0.85rem 1rem;
    color: #0f172a; /* Explicitly dark text inside white inputs */
    font-family: var(--font-sans);
    font-size: 1rem;
    transition: all 0.25s ease;
    outline: none;
}

.input-control:focus {
    border-color: var(--border-focus);
    background: #ffffff;
    box-shadow: 0 0 0 4px var(--accent-glow);
    color: #0f172a;
}

.input-control:user-invalid {
    border-color: var(--error-color) !important;
    background: rgba(248, 113, 113, 0.05);
    box-shadow: 0 0 0 4px rgba(248, 113, 113, 0.15) !important;
}

.input-control:user-valid {
    border-color: var(--success-color) !important;
    background: rgba(52, 211, 153, 0.05);
    box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.15) !important;
}

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

select.input-control option {
    background-color: #ffffff;
    color: #0f172a; /* Explicitly dark text in dropdown options */
}

.btn {
    width: 100%;
    background: var(--accent-color);
    color: #002270; /* Deep navy text for contrast on yellow */
    border: none;
    border-radius: 10px;
    padding: 1rem;
    font-family: var(--font-sans);
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 2rem;
    box-shadow: 0 4px 12px rgba(255, 242, 0, 0.15);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 242, 0, 0.3);
    background: #e6cb00; /* Slightly darker gold/yellow */
}

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

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.trial-box {
    background: #fffaad; /* Classic Post-it warm yellow */
    background: linear-gradient(135deg, #ffffcc 0%, #fffaad 100%);
    border: 1px solid rgba(220, 190, 80, 0.3);
    border-radius: 4px;
    padding: 2.25rem 2.25rem 1.75rem 2.25rem;
    margin-top: 2rem;
    box-shadow: 3px 12px 24px rgba(0, 0, 0, 0.16);
    position: relative;
    box-sizing: border-box;
}

/* Subtle glue strip highlight at the top */
.trial-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1.25rem;
    background: rgba(255, 255, 255, 0.25);
    border-bottom: 1px solid rgba(0, 0, 0, 0.03);
}

.cta-note {
    display: block;
    text-align: center;
    font-size: 0.9rem;
    color: #64748b;
    margin-top: 0.75rem;
    font-weight: 700;
}

.trial-info {
    display: block;
    text-align: left;
    font-family: 'Lora', Georgia, serif;
    font-size: 1.1rem;
    color: #1e293b; /* Highly legible slate-800 */
    margin-top: 0;
    line-height: 1.6;
    font-weight: 400;
}

.trial-info strong {
    color: #0f172a; /* Slate-900 for extra bold pricing contrast */
    font-weight: 700;
}


/* Spinner Styles */
.spinner {
    display: none;
    width: 1.25rem;
    height: 1.25rem;
    border: 2px solid rgba(0, 34, 112, 0.2);
    border-radius: 50%;
    border-top-color: #002270; /* Dark top border to match button text */
    animation: spin 0.8s linear infinite;
}

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

/* Success and Error Feedback Panel */
.alert {
    display: none;
    padding: 1rem;
    border-radius: 10px;
    margin-top: 1.5rem;
    font-size: 0.95rem;
    line-height: 1.5;
    animation: slideUp 0.4s ease forwards;
}

.alert-success {
    background: #ecfdf5;
    border: 1px solid #d1fae5;
    color: #065f46;
}

.alert-error {
    background: rgba(254, 242, 242, 0.98);
    border: 1px solid #fee2e2;
    border-left: 4px solid #ef4444;
    color: #991b1b;
    border-radius: 8px;
}

.alert-error a {
    color: #dc2626;
    text-decoration: underline;
    font-weight: 700;
    transition: color 0.15s ease;
}

.alert-error a:hover {
    color: #991b1b;
}

/* Success View */
.success-view {
    display: none;
    text-align: center;
    animation: scaleIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.success-icon-container {
    width: 64px;
    height: 64px;
    background: rgba(5, 150, 105, 0.08);
    border: 1.5px solid rgba(5, 150, 105, 0.2);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto 1.5rem auto;
    color: #059669;
}

.success-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.success-desc {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #475569;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

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

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

/* Responsive adjustments */
@media (max-width: 480px) {
    .card {
        padding: 1.75rem;
    }
    .brand-name {
        font-size: 2.4rem;
    }
}

/* Autocomplete Typeahead Dropdown Styles */
.autocomplete-container {
    position: relative;
    width: 100%;
}

.autocomplete-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.08);
    z-index: 1000;
    max-height: 200px;
    overflow-y: auto;
    margin-top: 4px;
    padding: 0;
    list-style: none;
}

.autocomplete-suggestion {
    padding: 10px 14px;
    font-size: 0.9rem;
    color: #334155;
    cursor: pointer;
    text-align: left;
    transition: background 0.15s ease;
    border-bottom: 1px solid #f1f5f9;
}

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

/* Google Places Autocomplete dropdown overrides */
.pac-container {
    background-color: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 8px !important;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.08) !important;
    font-family: 'Inter', sans-serif !important;
    margin-top: 4px !important;
    z-index: 99999 !important;
    border-top: none !important;
}

.pac-item {
    padding: 10px 14px !important;
    font-size: 0.9rem !important;
    color: #475569 !important;
    cursor: pointer !important;
    border-bottom: 1px solid #f1f5f9 !important;
    display: flex !important;
    align-items: center !important;
    font-family: 'Inter', sans-serif !important;
    line-height: 1.4 !important;
}

.pac-item:hover, .pac-item:focus {
    background-color: #f1f5f9 !important;
}

.pac-item-query {
    font-size: 0.9rem !important;
    color: #0f172a !important;
    font-weight: 500 !important;
}

.pac-matched {
    color: #003594 !important;
    font-weight: 600 !important;
}

.pac-icon {
    display: none !important; /* Hide Google's default pin icon to keep it clean */
}

.autocomplete-suggestion:hover,
.autocomplete-suggestion.active {
    background: #f1f5f9;
    color: #0f172a;
}

/* Footer Styles */
.site-footer {
    padding: 4rem 1.5rem;
    background: #003594; /* Match top header brand navy blue */
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.85rem;
    line-height: 1.7;
}

.footer-slogan {
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: #ffffff;
}

.footer-info {
    margin-bottom: 1rem;
    opacity: 0.85;
}

.footer-bullet {
    margin: 0 0.5rem;
    color: rgba(255, 255, 255, 0.4);
}

.footer-links {
    margin-bottom: 1.25rem;
}

.footer-links a {
    color: #93c5fd;
    text-decoration: none;
    margin: 0 0.25rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

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

.footer-divider {
    color: rgba(255, 255, 255, 0.3);
    margin: 0 0.5rem;
}

.footer-copyright {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
}

/* Promo Copy Section */
.promo-content {
    margin-bottom: 2rem;
    text-align: left;
}

#signup-form {
    background: #f1f5f9; /* Darker clean gray/slate-100 */
    border: 1px solid #cbd5e1; /* Darker border/slate-300 */
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: inset 0 2px 4px rgba(15, 23, 42, 0.03); /* Subtle inner shadow for depth */
}

.promo-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.45;
    margin-bottom: 1.25rem;
    text-align: left;
}

.promo-list {
    list-style: none;
    padding: 0;
}

.promo-list li {
    font-size: 0.95rem;
    color: #475569;
    line-height: 1.55;
    margin-bottom: 1rem;
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
}

.promo-list li:last-child {
    margin-bottom: 0;
}

.check-icon {
    color: #10b981; /* Emerald green */
    font-weight: 700;
    font-size: 1.1rem;
    line-height: 1.2;
    flex-shrink: 0;
}

.promo-link-container {
    text-align: center;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}

.promo-sample-link {
    color: #003594;
    font-weight: 600;
    text-decoration: underline;
    font-size: 1.15rem;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    transition: color 0.2s ease;
}

.promo-sample-link:hover {
    color: #002270;
}

.form-title {
    font-size: 1.25rem;
    font-weight: 600;
    text-align: center;
    color: #0f172a;
    margin-bottom: 1.5rem;
    letter-spacing: -0.01em;
}

/* Wide Page Layout Override */
body.wide-page {
    align-items: flex-start;
    padding: 2rem 1rem;
}

.container-wide {
    width: 100%;
    max-width: 1200px;
    animation: fadeIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Header link styles for the dump page */
.header-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.back-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    transition: color 0.2s ease;
}

.back-link:hover {
    color: #ffffff;
    text-decoration: underline;
}

/* Filter Section */
.filters-card {
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 12px;
    padding: 1.25rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    margin-bottom: 1.5rem;
    color: #0f172a;
}

.filters-form {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: flex-end;
}

.filters-form .form-group {
    margin-bottom: 0;
}

.filters-form label {
    font-size: 0.8rem;
    margin-bottom: 0.35rem;
}

.filters-form .input-control {
    padding: 0.65rem 0.85rem;
    font-size: 0.9rem;
}

.filters-form .btn-filter {
    background: var(--accent-color);
    color: #002270;
    border: none;
    border-radius: 8px;
    padding: 0.65rem 1.25rem;
    font-family: var(--font-sans);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.filters-form .btn-filter:hover {
    background: #e6cb00;
    transform: translateY(-1px);
}

.filters-form .btn-reset {
    background: #e2e8f0;
    color: #334155;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 0.65rem 1.25rem;
    font-family: var(--font-sans);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.filters-form .btn-reset:hover {
    background: #cbd5e1;
    transform: translateY(-1px);
}

/* Data Table Container */
.table-card {
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    color: #0f172a;
    margin-bottom: 1.5rem;
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Table Custom Scrollbars */
.table-responsive::-webkit-scrollbar {
    height: 8px;
}

.table-responsive::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 4px;
}

.table-responsive::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.table-responsive::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

.data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.85rem;
    text-align: left;
}

.data-table th {
    background: #003594;
    color: #ffffff;
    font-weight: 600;
    padding: 0.75rem 1rem;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    border-bottom: 2px solid rgba(15, 23, 42, 0.1);
}

.data-table th:first-child {
    border-top-left-radius: 8px;
}

.data-table th:last-child {
    border-top-right-radius: 8px;
}

.data-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #e2e8f0;
    color: #334155;
    vertical-align: top;
    line-height: 1.4;
}

.data-table tr:last-child td {
    border-bottom: none;
}

.data-table tbody tr:hover td {
    background-color: #f8fafc;
}

.data-table td.permit-id {
    font-family: monospace;
    font-weight: 600;
    color: #0f172a;
}

.data-table td.permit-value {
    font-weight: 600;
    color: #0f172a;
}

/* Trade Badges */
.badge {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-general { background: #dbeafe; color: #1e40af; }
.badge-roofing { background: #f3e8ff; color: #6b21a8; }
.badge-plumbing { background: #d1fae5; color: #065f46; }
.badge-hvac { background: #ffedd5; color: #9a3412; }
.badge-electrical { background: #fef9c3; color: #854d0e; }
.badge-specialty { background: #ccfbf1; color: #115e59; }

/* Pagination Section */
.pagination-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.pagination-info {
    font-size: 0.85rem;
    color: #64748b;
}

.pagination-controls {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.pagination-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
    color: #334155;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
}

.pagination-btn:hover:not(.disabled) {
    background: #f1f5f9;
    border-color: #94a3b8;
    color: #0f172a;
}

.pagination-btn.active {
    background: #003594;
    border-color: #003594;
    color: #ffffff;
}

.pagination-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #f8fafc;
}

/* Leaders Section */
.leaders-section {
    margin-bottom: 1.5rem;
}

.leaders-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.leaders-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    width: 100%;
}

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

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

.leader-card {
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 10px;
    padding: 0.85rem 1rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 95px;
    color: #0f172a;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.leader-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.18);
}

.leader-card-header {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #64748b;
    letter-spacing: 0.02em;
    margin-bottom: 0.35rem;
}

.leader-card-name {
    font-size: 0.82rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    margin-bottom: 0.35rem;
}

.leader-card-score {
    font-size: 0.75rem;
    font-weight: 600;
    color: #003594;
}

/* Category Borders */
.leader-card-general { border-top: 4px solid #003594; }
.leader-card-electrical { border-top: 4px solid #e6cb00; }
.leader-card-hvac { border-top: 4px solid #9a3412; }
.leader-card-plumbing { border-top: 4px solid #065f46; }
.leader-card-roofing { border-top: 4px solid #6b21a8; }
.leader-card-specialty { border-top: 4px solid #115e59; }

/* Empty state styling */
.leaders-placeholder-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1.5px dashed rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    padding: 1.5rem;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
}

/* Leader list rankings styles */
.leader-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 0.35rem;
}

.leader-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    border-bottom: 1px solid rgba(15, 23, 42, 0.05);
    padding-bottom: 0.35rem;
}

.leader-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.leader-rank {
    font-size: 0.7rem;
    font-weight: 700;
    color: #64748b;
    background: #f1f5f9;
    border-radius: 4px;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* Highlight rank 1 */
.leader-item:first-child .leader-rank {
    background: #fef08a; /* Soft gold background */
    color: #854d0e;
}

.leader-details {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex-grow: 1;
    flex: 1;
    padding: 0;
    margin: 0;
}

.leader-name {
    font-weight: 600;
    color: #0f172a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.leader-value {
    font-size: 0.65rem;
    font-weight: 600;
    color: #003594;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.leader-subtext {
    font-weight: normal;
    color: #64748b;
}

.leader-empty {
    color: #94a3b8;
    font-style: italic;
    font-size: 0.75rem;
    padding: 0.5rem 0;
}

/* ── Flat top-10 leaderboard (single ranked list) ── */
.leaders-flat {
    padding: 0;
}

.leaders-flat .leader-item {
    display: block;
    font-size: 0.9rem;
    padding: 0;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    margin-bottom: 0.6rem;
    overflow: hidden;
}

.leaders-flat .leader-item .leader-rank {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fef08a;
    color: #0f172a;
    font-size: 0.95rem;
    font-weight: 700;
    border-radius: 50%;
}

/* Blue header bar: rank + name + value on navy background, projects below on white */
.leader-header {
    background: #003594;
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    box-sizing: border-box;
}

.leaders-flat .leader-projects {
    padding: 0.6rem 1rem;
}

.leaders-flat .leader-name {
    font-size: 1rem;
    font-weight: 700;
    color: #ffffff;
    background: transparent;
    text-decoration: underline;
    text-decoration-color: rgba(255, 255, 255, 0.5);
    text-underline-offset: 2px;
    line-height: 1.3;
}
.leaders-flat .leader-name:hover {
    text-decoration-color: #fef08a;
    color: #fef08a;
}

.leaders-flat .leader-value {
    font-size: 0.85rem;
    display: flex;
    align-items: baseline;
    gap: 0.6rem;
    margin-left: auto;
    white-space: nowrap;
}

.leaders-flat .leader-name {
    flex: 1;
    min-width: 0;
}

.leaders-flat .leader-money {
    font-size: 1.05rem;
    color: #ffffff;
    letter-spacing: -0.01em;
}

.leaders-flat .leader-subtext {
    color: rgba(255, 255, 255, 0.7);
}

/* Nested projects under each contractor */
.leader-projects {
    margin-top: 0.6rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    padding-left: 0;
}

.leader-project {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem 0.8rem;
    border-radius: 6px;
    font-size: 0.8rem;
}

/* Zebra striping — subtle tint on even rows for horizontal scanning */
.leader-project:nth-child(even) {
    background: #fafbfc;
}


.leader-project-body {
    flex-grow: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 2px 0;
}

/* Address + distance on one line */
.leader-project-addr-line {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.leader-project-addr {
    font-size: 0.88rem;
    font-weight: 700;
    color: #003594;
    text-decoration: underline;
    text-decoration-color: #cbd5e1;
    text-underline-offset: 2px;
    line-height: 1.35;
    cursor: default;
}

/* Distance: small gray text after the address, not a badge */
.leader-project-dist {
    font-size: 0.72rem;
    font-weight: 500;
    color: #94a3b8;
    white-space: nowrap;
}

.leader-project-desc {
    font-size: 0.86rem;
    color: #334155;
    line-height: 1.5;
    margin: 6px 0;
    font-weight: 500;
}

/* Owner line — distinct color from the navy address link */
.leader-project-owner {
    font-size: 0.69rem;
    color: #94a3b8;
    line-height: 1.35;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    font-weight: 600;
    margin-top: 2px;
}
.leader-project-owner-name {
    color: #0d9488;
    text-transform: none;
    letter-spacing: 0;
    font-weight: 600;
}

.leader-project-val {
    flex-shrink: 0;
    font-weight: 700;
    color: #0f172a;
    font-size: 0.8rem;
    font-variant-numeric: tabular-nums;
    margin-top: 2px;
}

.leader-money {
    font-weight: 700;
    color: #003594;
    font-variant-numeric: tabular-nums;
}

/* Radius note under the address input */
.radius-note {
    margin: 0.6rem 0 0 0;
    font-size: 0.8rem;
    color: #64748b;
}
/* ========================================
   LANDING PAGE — Modern Hero Redesign
   ======================================== */

body.landing-page {
    display: block;
    min-height: 100vh;
    padding: 0;
}

/* Hero Layout */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6rem 1.5rem;
    position: relative;
    background-color: #f8fafc; /* Clean, light slate/white base */
    overflow-x: hidden; /* Prevent horizontal overflow from pulse rings */
}

/* Map background layer - clean light roadmap style (similar to email roadmap) */
.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('/static/light_map_bg.png');
    background-size: cover; /* Restored to cover for native crisp line resolution */
    background-position: center; /* Center alignment */
    background-repeat: no-repeat;
    opacity: 0.75; /* Higher base opacity for high definition at the bottom */
    z-index: 1;
    pointer-events: none;
}

/* Remove linear-gradient wash layer to extend the map fully left-to-right */
.hero::after {
    display: none;
}

/* Radar pulse overlays */
.radar-pulse-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    border-radius: 50%;
    z-index: 1; /* Under the card */
}

.radar-pulse-ring.ring-1 {
    width: 600px;
    height: 600px;
    border: 1px solid rgba(0, 53, 148, 0.08); /* Soft blue instead of yellow for light theme */
    animation: radarPulse 8s infinite linear;
}

.radar-pulse-ring.ring-2 {
    width: 300px;
    height: 300px;
    border: 1px solid rgba(0, 53, 148, 0.04);
    animation: radarPulse2 8s infinite linear;
}

.radar-sweep {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 550px;
    height: 550px;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 1; /* Under the card */
    background: conic-gradient(from 0deg, rgba(0, 53, 148, 0.08) 0deg, rgba(0, 53, 148, 0) 90deg);
    border-radius: 50%;
    animation: radarSweep 12s infinite linear;
}

@keyframes radarSweep {
    from {
        transform: translate(-50%, -50%) rotate(0deg);
    }
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

@keyframes radarPulse {
    0% {
        transform: translate(-50%, -50%) scale(0.6);
        opacity: 0;
    }
    10% {
        opacity: 0.15;
    }
    80% {
        opacity: 0.15;
    }
    100% {
        transform: translate(-50%, -50%) scale(1.6);
        opacity: 0;
    }
}

@keyframes radarPulse2 {
    0% {
        transform: translate(-50%, -50%) scale(0.2);
        opacity: 0;
    }
    15% {
        opacity: 0.1;
    }
    85% {
        opacity: 0.1;
    }
    100% {
        transform: translate(-50%, -50%) scale(1.2);
        opacity: 0;
    }
}

.hero-container {
    width: 100%;
    max-width: 1100px;
    display: flex;
    flex-direction: column;
    align-items: center; /* Centering children horizontally */
    gap: 3rem;
    margin: auto; /* Center safely and handle overflows gracefully */
    animation: fadeIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    position: relative;
    z-index: 10; /* Completely isolated above the overlay layers */
}

.hero-text-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.hero-signup-column {
    display: flex;
    justify-content: center;
    width: 100%;
    position: relative;
    z-index: 5;
}

/* Top Header Styles */
.top-header {
    background-color: #003594; /* Brand navy blue */
    padding: 0.85rem 1.5rem;
    width: 100%;
    box-shadow: 0 4px 15px rgba(0, 53, 148, 0.15);
    position: relative;
    z-index: 100;
}

.top-header-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.2rem;
}

.top-header-logo {
    display: block;
    height: 64px;
    width: auto;
}

.top-header-slogan {
    font-size: 0.72rem;
    font-weight: 600;
    color: #93c5fd; /* Soft sky blue */
    text-transform: uppercase;
    letter-spacing: 0.18em;
}

/* Main CTA Card in Hero - Signup Form Card */
.main-cta-card {
    position: relative;
    z-index: 5; /* Explicit relative z-index to overlay pins */
    background: #ffffff; /* Elegant brand white card background */
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(191, 219, 254, 0.6);
    border-top: 5px solid #003594; /* Thick brand blue top accent border */
    border-radius: 24px;
    padding: 2.5rem;
    box-shadow: 0 30px 60px rgba(0, 53, 148, 0.12), 0 0 0 1px rgba(0, 53, 148, 0.03);
    color: #0f172a;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    text-align: left;
    max-width: 520px; /* Increased width to make the signup form look bigger and more prominent */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.main-cta-card:hover {
    box-shadow: 0 35px 70px rgba(0, 53, 148, 0.16), 0 0 0 1px rgba(0, 53, 148, 0.04);
}

/* Headline on Left (above map background) */
.hero-text-content .hero-headline {
    font-size: 2.35rem; /* Smaller headline as requested */
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.04em;
    color: #0f172a; /* Deep slate color for high contrast */
    margin-bottom: 0.25rem;
    text-shadow: 0 1px 8px rgba(255, 255, 255, 0.9), 0 1px 3px rgba(255, 255, 255, 0.7);
}

/* Subtitle on Left */
.hero-text-content .hero-subtitle {
    font-size: 1.05rem; /* Smaller subtitle */
    line-height: 1.65;
    color: #334155; /* Darker slate for high legibility */
    font-weight: 500;
    text-shadow: 0 1px 4px rgba(255, 255, 255, 0.8);
}

/* Value Prop Checklist under Subtitle */
.hero-checklist {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin: 1.25rem 0 1.75rem;
    padding: 0;
}

.hero-checklist-item {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: #1e293b;
    line-height: 1.45;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 0.75rem 1.15rem;
    border-radius: 14px;
    border: 1px solid rgba(0, 53, 148, 0.06);
    box-shadow: 0 4px 15px rgba(0, 34, 112, 0.03);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.25s ease, background-color 0.25s ease;
}

.hero-checklist-item:hover {
    transform: translateX(6px);
    border-color: rgba(0, 53, 148, 0.18);
    background: rgba(255, 255, 255, 0.9);
}

.hero-checklist-icon {
    color: #003594;
    background: rgba(0, 53, 148, 0.08);
    padding: 4px;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* Redesigned Secondary Outlined CTA Button */
.hero-sample-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    border: 1.5px solid #003594;
    border-radius: 8px;
    color: #003594;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    background: rgba(255, 255, 255, 0.45);
    width: fit-content;
    box-shadow: 0 4px 12px rgba(0, 53, 148, 0.05);
}

.hero-sample-link:hover {
    background: #003594;
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(0, 53, 148, 0.15);
}

/* Hero Benefits Section (Bottom Row) */
.hero-benefits {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    width: 100%;
    margin-top: 1rem;
}

.benefit-card {
    background: rgba(255, 255, 255, 0.85); /* Solid premium light glassmorphic card */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(0, 53, 148, 0.08); /* Clean brand navy tint border */
    border-radius: 16px;
    padding: 1.5rem 1.75rem;
    display: flex;
    gap: 1.25rem;
    align-items: flex-start;
    box-shadow: 0 15px 35px rgba(0, 53, 148, 0.04);
    transition: transform 0.3s ease, border-color 0.3s ease, background 0.3s ease;
}

.benefit-card:hover {
    transform: translateY(-4px);
    border-color: rgba(0, 53, 148, 0.2);
    background: rgba(255, 255, 255, 0.95);
}

.benefit-icon {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    color: #003594; /* Brand navy icon */
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 53, 148, 0.06); /* Soft navy backing */
    border: 1px solid rgba(0, 53, 148, 0.12);
    border-radius: 8px;
}

.benefit-icon svg {
    width: 20px;
    height: 20px;
}

.benefit-content h3 {
    font-size: 1.05rem;
    font-weight: 700;
    color: #0f172a; /* Dark slate title */
    margin-bottom: 0.5rem;
    letter-spacing: -0.01em;
}

.benefit-content p {
    font-size: 0.88rem;
    line-height: 1.5;
    color: #475569; /* Legible slate subtext */
}

/* Sample CTA link overrides inside main card context */
.main-cta-card .sample-cta {
    display: inline-flex;
    width: 100%;
    justify-content: center;
    align-items: center;
    gap: 0.25rem;
    color: #1d4ed8;
    font-size: 0.95rem;
    font-weight: 700;
    text-decoration: underline;
    margin-top: -0.25rem;
    margin-bottom: 0.85rem;
}

.main-cta-card .sample-cta:hover {
    color: #1e40af;
}

.main-cta-card .sample-cta svg {
    width: 14px;
    height: 14px;
}

/* Card-specific Form Compression Overrides */
.main-cta-card .form-title {
    font-size: 1.15rem;
    margin-bottom: 0.75rem;
}

.main-cta-card .form-group {
    margin-bottom: 0.75rem;
}

.main-cta-card .form-group label {
    font-size: 0.85rem;
}

.main-cta-card .form-group .hint {
    font-size: 0.78rem;
    margin-bottom: 0.35rem;
}

.main-cta-card .input-control {
    padding: 0.7rem 0.85rem;
    font-size: 0.92rem;
}

.main-cta-card .btn {
    margin-top: 1rem;
    padding: 0.8rem;
    font-size: 0.98rem;
}

.main-cta-card .cta-note {
    margin-top: 0.85rem;
    font-size: 0.82rem;
}

.main-cta-card .cta-note-sub {
    margin-top: 0.45rem;
    font-size: 0.75rem;
}

/* Remove gray form box on landing page */
body.landing-page #signup-form {
    background: transparent;
    border: none;
    padding: 0;
    box-shadow: none;
}

/* CTA sub-note */
.cta-note-sub {
    margin-top: 0.35rem;
    font-weight: 500;
    font-size: 0.85rem;
    opacity: 0.7;
}

/* Pricing Banner — Post-it Note style */
.pricing-banner {
    padding: 3rem 1.5rem;
    display: flex;
    justify-content: center;
}

.pricing-container {
    max-width: 500px;
    text-align: center;
    background: #fffaad;
    background: linear-gradient(135deg, #ffffcc 0%, #fffaad 100%);
    border: 1px solid rgba(220, 190, 80, 0.3);
    border-radius: 4px;
    padding: 2.25rem 2.25rem 1.75rem 2.25rem;
    box-shadow: 3px 12px 24px rgba(0, 0, 0, 0.16);
    position: relative;
    transform: rotate(-1deg);
    font-family: 'Lora', Georgia, serif;
}

/* Subtle tape/glue strip at the top */
.pricing-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1.25rem;
    background: rgba(255, 255, 255, 0.25);
    border-bottom: 1px solid rgba(0, 0, 0, 0.03);
}

.pricing-text {
    font-size: 1.1rem;
    line-height: 1.6;
    color: #1e293b;
    font-weight: 400;
}

.pricing-text strong {
    color: #0f172a;
    font-weight: 700;
}

.pricing-sub {
    font-size: 1rem;
    color: #475569;
    margin-top: 1rem;
    font-style: italic;
    font-weight: 500;
}

/* Footer on landing page */
body.landing-page .site-footer {
    margin-top: 0;
    padding: 3rem 1.5rem 4rem;
}

/* Responsive */
@media (max-width: 900px) {
    .hero {
        padding: 3rem 1rem;
        min-height: auto;
    }

    .hero-container {
        gap: 3rem;
    }

    .hero-main {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    .hero-text-content {
        text-align: center;
        align-items: center;
        margin-top: 0;
    }

    .hero-text-content .hero-headline {
        font-size: 2.25rem;
    }

    .main-cta-card {
        max-width: 100%;
    }

    .hero-benefits {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 2rem 0.75rem;
    }

    .hero-text-content .hero-headline {
        font-size: 1.85rem;
    }

    .hero-text-content .hero-subtitle {
        font-size: 1rem;
    }

    .main-cta-card {
        padding: 1.5rem;
    }

    .pricing-container {
        padding: 2rem 1.5rem;
    }

    .pricing-text {
        font-size: 1rem;
    }

    .pricing-text strong {
        font-size: 1.15rem;
    }
}

/* ────────────────────────────────────────────────────────────
   /mvp — Email preview page
   Styled to read as a literal email digest, not a web app page.
   ──────────────────────────────────────────────────────────── */

.mvp-page {
    background: #f1f5f9;
    margin: 0;
    padding: 2rem 1rem;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: #0f172a;
}

.email-preview {
    max-width: 600px;
    margin: 0 auto;
}

/* Subject line preview (muted, like an email client header) */
.email-subject-line {
    font-size: 0.8rem;
    color: #64748b;
    padding: 0.5rem 0 1rem 0;
}
.email-subject-label {
    font-weight: 600;
    color: #475569;
    margin-right: 0.35rem;
}
.email-subject-date {
    float: right;
}

/* The email card: white body with navy header */
.email-card {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
}

/* Navy header banner */
.email-header {
    background: #003594;
    color: #ffffff;
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}
.email-header-left {
    text-align: left;
    flex-shrink: 0;
}
.email-header-right {
    text-align: right;
    flex-shrink: 1;
    min-width: 0;
}
.email-brand {
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}
.email-tagline {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(255, 255, 255, 0.75);
    margin-top: 0.25rem;
}

.email-prepared-for {
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.35;
}
.email-prepared-for strong {
    color: #fef08a;
}
.email-prepared-addr {
    font-size: 0.68rem;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 0.1rem;
}

/* Email body */
.email-body {
    padding: 1.75rem 1.5rem;
}
.email-greeting {
    font-size: 0.9rem;
    margin: 0 0 0.5rem 0;
}

.email-map {
    display: block;
    width: 100%;
    max-width: 600px;
    height: auto;
    border-radius: 8px;
    margin: 0 0 1rem 0;
    border: 1px solid #e2e8f0;
}
.email-intro {
    font-size: 0.9rem;
    line-height: 1.55;
    color: #334155;
    margin: 0 0 1.5rem 0;
}

.email-section-title {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #003594;
    padding-bottom: 0.5rem;
    margin-bottom: 0.75rem;
    border-bottom: 2px solid #003594;
}

/* Leaderboard reuses .leaders-flat but scoped tighter for email */
.email-leaderboard {
    padding: 0;
    border: none;
    box-shadow: none;
    background: transparent;
}

.email-empty {
    padding: 2rem;
    text-align: center;
    color: #94a3b8;
    font-style: italic;
    font-size: 0.9rem;
}

.email-closing {
    margin-top: 2rem;
    padding-top: 1.25rem;
    border-top: 1px solid #e2e8f0;
    font-size: 0.9rem;
    line-height: 1.55;
    color: #334155;
}

/* Footer (CAN-SPAM) */
.email-footer {
    background: #f8fafc;
    padding: 1.25rem 1.5rem;
    text-align: center;
    border-top: 1px solid #e2e8f0;
}
.email-footer-brand {
    font-weight: 700;
    color: #003594;
    font-size: 0.9rem;
    margin: 0 0 0.4rem 0;
}
.email-footer-text {
    font-size: 0.72rem;
    color: #64748b;
    line-height: 1.5;
    margin: 0 0 0.4rem 0;
}
.email-footer-address {
    font-size: 0.68rem;
    color: #94a3b8;
    margin: 0;
}
.email-unsubscribe {
    color: #003594;
    text-decoration: underline;
}

/* ========================================
   RESPONSIVE — Sample email report (mvp page)
   Scales the email content for narrow viewports
   and the modal iframe on mobile.
   ======================================== */
@media (max-width: 600px) {
    .mvp-page {
        padding: 0.75rem 0.5rem;
    }

    /* Let the email card use the full available width on small screens */
    .email-preview {
        max-width: 100%;
    }

    /* Tighten horizontal padding so content isn't crushed on phones */
    .email-header {
        padding: 0.75rem 0.9rem;
    }
    .email-body {
        padding: 1.1rem 0.9rem;
    }
    .email-footer {
        padding: 1rem 0.9rem;
    }
    .email-intro {
        font-size: 0.85rem;
    }
    .email-map {
        border-radius: 6px;
        margin-bottom: 0.75rem;
    }

    /* Contractor header row: keep rank + name stacked readable,
       value drops below on very tight widths */
    .leader-header {
        padding: 0.6rem 0.75rem;
        gap: 0.5rem;
        flex-wrap: wrap;
    }
    .leaders-flat .leader-item .leader-rank {
        width: 24px;
        height: 24px;
        font-size: 0.82rem;
    }
    .leaders-flat .leader-name {
        font-size: 0.92rem;
    }
    .leaders-flat .leader-value {
        margin-left: 0;
        width: 100%;
        justify-content: flex-end;
        padding-right: 0.1rem;
    }
    .leaders-flat .leader-money {
        font-size: 0.98rem;
    }

    /* Nested project rows: stack vertically, value wraps under */
    .leaders-flat .leader-projects {
        padding: 0.5rem 0.6rem;
    }
    .leader-project {
        flex-direction: column;
        gap: 0.35rem;
        padding: 0.6rem 0.65rem;
        font-size: 0.78rem;
    }
    .leader-project-val {
        align-self: flex-end;
        margin-top: 2px;
    }
    .leader-project-desc {
        font-size: 0.8rem;
        margin: 3px 0;
    }
    .leader-project-addr {
        font-size: 0.82rem;
    }
}

@media (max-width: 380px) {
    .mvp-page {
        padding: 0.5rem 0.25rem;
    }
    .email-header,
    .email-body,
    .email-footer {
        padding-left: 0.65rem;
        padding-right: 0.65rem;
    }
    .leader-header {
        padding: 0.5rem 0.6rem;
    }
    .leaders-flat .leader-projects {
        padding: 0.4rem 0.5rem;
    }
}

/* Modern Pricing Section & Card Styles */
.pricing-section {
    padding: 6rem 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    background: #f1f5f9; /* Solid light slate background */
    border-top: 1px solid #e2e8f0;
}

.pricing-title-modern {
    font-size: 1.8rem;
    font-weight: 800;
    text-align: center;
    color: var(--text-primary);
}

.pricing-card-modern {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 3rem 2.5rem;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    max-width: 480px;
    width: 100%;
    text-align: center;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease, border-color 0.3s ease;
    position: relative;
    overflow: hidden;
    margin-top: 1rem;
}

.pricing-card-modern:hover {
    transform: translateY(-6px);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.45);
    border-color: rgba(255, 255, 255, 0.22);
}

.pricing-card-modern::before {
    content: 'Free Trial';
    position: absolute;
    top: 22px;
    right: -32px;
    background: var(--accent-color);
    color: #002270;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    padding: 4px 32px;
    transform: rotate(45deg);
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    letter-spacing: 1px;
}

.price-modern {
    font-size: 3.8rem;
    font-weight: 800;
    color: var(--accent-color);
    margin: 1.2rem 0;
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 0.2rem;
}

.price-modern span {
    font-size: 1.1rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.price-features {
    text-align: left;
    margin: 2rem 0;
    display: flex;
    flex-direction: column;
    gap: 0.95rem;
}

.price-feature-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    font-size: 0.92rem;
    line-height: 1.45;
    color: var(--text-primary);
}

.price-feature-icon {
    color: var(--accent-color);
    flex-shrink: 0;
    margin-top: 3px;
}

.pricing-btn-modern {
    background-color: var(--accent-color);
    color: #002270;
    border: none;
    border-radius: 10px;
    padding: 1rem;
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 4px 12px rgba(255, 242, 0, 0.2);
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    text-decoration: none;
}

.pricing-btn-modern:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 242, 0, 0.35);
    background-color: #fffa66;
}

.pricing-card-modern-sub {
    font-size: 0.82rem;
    color: var(--text-secondary);
    margin-top: 1.25rem;
    line-height: 1.4;
}

/* Redesign Mockup & Trust Indicator Styles */
.hero-badge {
    align-self: flex-start;
    background: rgba(0, 53, 148, 0.08);
    color: #003594;
    padding: 0.5rem 0.85rem;
    border-radius: 99px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    margin-bottom: -0.5rem;
}

.hero-social-proof {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 0.5rem;
}

.avatar-group {
    display: flex;
    align-items: center;
}

.avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 2px solid #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 800;
    color: #ffffff;
    margin-right: -10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}

.av-1 { background: linear-gradient(135deg, #3b82f6, #1d4ed8); }
.av-2 { background: linear-gradient(135deg, #10b981, #047857); }
.av-3 { background: linear-gradient(135deg, #f59e0b, #b45309); }
.av-4 { background: linear-gradient(135deg, #ec4899, #be185d); }

.stars-group {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.stars {
    color: #fbbf24;
    font-size: 1.1rem;
    line-height: 1;
}

.rating-text {
    font-size: 0.78rem;
    font-weight: 600;
    color: #475569;
}

/* Floating Unified Map Pins (Low contrast styles to blend with the roadmap background) */
.floating-map-pin {
    position: absolute;
    z-index: 2; /* Sit behind the main signup card stack which is z-index: 5 */
    pointer-events: none;
    animation: floatPin 4s ease-in-out infinite alternate;
    opacity: 0.55; /* Reduced opacity to make them stand out less (less contrast) */
}

.unified-pin-bubble {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    background: rgba(248, 250, 252, 0.75); /* Muted, semi-transparent background to blend in */
    border: 1px solid rgba(148, 163, 184, 0.15);
    padding: 0.35rem 0.65rem;
    border-radius: 99px; /* Rounded pill style */
    box-shadow: 0 2px 6px rgba(0, 53, 148, 0.02);
    white-space: nowrap;
}

.map-pin-icon {
    width: 0.85rem;
    height: 0.85rem;
    color: #60a5fa; /* Softer, lighter brand blue for lower contrast */
    flex-shrink: 0;
}

.pin-value {
    color: #475569; /* Muted dark slate for lower contrast */
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1;
}

.pin-divider {
    color: #e2e8f0; /* Very faint divider */
    font-size: 0.72rem;
    font-weight: 400;
}

.pin-desc {
    color: #64748b; /* Softer muted gray for lower contrast */
    font-size: 0.68rem;
    font-weight: 600;
    line-height: 1;
}

/* Map positions spread randomly from end to end across the entire land map - clear of centered signup card */
.pin-1 { top: 10%; left: 2%; animation-delay: 0s; }
.pin-2 { top: 22%; left: 8.5%; animation-delay: 0.8s; }
.pin-3 { top: 34%; left: 4%; animation-delay: 1.6s; }
.pin-4 { top: 46%; left: 9.5%; animation-delay: 2.4s; }
.pin-5 { top: 58%; left: 3%; animation-delay: 1.2s; }
.pin-6 { top: 70%; left: 7.5%; animation-delay: 2.0s; }
.pin-7 { top: 82%; left: 1.5%; animation-delay: 0.4s; }
.pin-8 { top: 92%; left: 6%; animation-delay: 1.0s; }
.pin-9 { top: 12%; left: 74.5%; animation-delay: 1.8s; }
.pin-10 { top: 24%; left: 81%; animation-delay: 0.6s; }
.pin-11 { top: 36%; left: 76.5%; animation-delay: 1.4s; }
.pin-12 { top: 48%; left: 83.5%; animation-delay: 2.2s; }
.pin-13 { top: 60%; left: 75%; animation-delay: 0.2s; }
.pin-14 { top: 72%; left: 82.5%; animation-delay: 1.0s; }
.pin-15 { top: 84%; left: 78%; animation-delay: 0.5s; }
.pin-16 { top: 92%; left: 85.5%; animation-delay: 1.7s; }

@keyframes floatPin {
    from { transform: translateY(0); }
    to { transform: translateY(-5px); }
}

/* Report Preview Card */
.report-preview-card {
    margin-top: 1.5rem;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(191, 219, 254, 0.5);
    border-radius: 20px;
    padding: 1.75rem;
    box-shadow: 0 20px 40px rgba(0, 34, 112, 0.05), 0 0 0 1px rgba(0, 34, 112, 0.02);
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    max-width: 440px;
    width: 100%;
    text-align: left;
}

.preview-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.preview-category-badge {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 800;
    color: #2563eb;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 0.15rem;
}

.preview-header h3 {
    font-size: 1.25rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0;
}

.preview-date {
    font-size: 0.72rem;
    color: #64748b;
    font-weight: 500;
    margin-top: 0.15rem;
    display: block;
}

.preview-mini-map {
    width: 70px;
    height: 60px;
    background: #eff6ff;
    border-radius: 8px;
    position: relative;
    overflow: hidden;
    border: 1.5px solid #bfdbfe;
    background-image: radial-gradient(#bfdbfe 20%, transparent 20%);
    background-size: 8px 8px;
}

.map-dot {
    position: absolute;
    width: 6px;
    height: 6px;
    background: #2563eb;
    border-radius: 50%;
    box-shadow: 0 0 4px #2563eb;
}

.dot-1 { top: 25%; left: 30%; }
.dot-2 { top: 60%; left: 70%; }
.dot-3 { top: 40%; left: 55%; }
.dot-4 { top: 75%; left: 20%; }

.preview-stats {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.82rem;
    font-weight: 600;
    color: #475569;
    border-bottom: 1px dashed #e2e8f0;
    padding-bottom: 0.55rem;
}

.stat-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.stat-value {
    font-weight: 700;
    color: #0f172a;
}

.stat-value.highlight-blue { color: #2563eb; }
.stat-value.highlight-green { color: #16a34a; }

.preview-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: #0f172a;
    color: #ffffff;
    font-size: 0.85rem;
    font-weight: 700;
    padding: 0.75rem 1rem;
    border-radius: 10px;
    text-decoration: none;
    transition: background 0.2s ease, transform 0.15s ease;
}

.preview-cta:hover {
    background: #003594;
    transform: translateY(-1px);
}

/* Card Onboarding Redesign */
.form-card-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    border-bottom: 1px solid #dbeafe;
    padding-bottom: 1.25rem;
    text-align: left;
}

.header-icon-wrap {
    background: rgba(37, 99, 235, 0.08);
    color: #2563eb;
    padding: 0.65rem;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.header-titles h3 {
    font-size: 1.2rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0;
    line-height: 1.2;
}

.header-titles p {
    font-size: 0.78rem;
    color: #64748b;
    margin: 0.2rem 0 0 0;
    font-weight: 500;
    line-height: 1.3;
}

.highlight-blue-text {
    color: #2563eb;
}

.uppercase-label {
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    color: #475569;
    margin-bottom: 0.35rem;
    display: block;
}

.btn-yellow-modern {
    background: #FFF200;
    color: #002270;
    border: none;
    border-radius: 10px;
    padding: 1rem;
    font-size: 1.02rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 15px rgba(255, 242, 0, 0.35);
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin-top: 1.25rem;
}

.btn-yellow-modern:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 242, 0, 0.45);
}

.form-trust-indicators {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 1rem;
}

.trust-indicator-item {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.7rem;
    font-weight: 700;
    color: #475569;
}

.trust-indicator-icon {
    color: #16a34a;
    flex-shrink: 0;
}

.form-privacy-note {
    text-align: center;
    font-size: 0.72rem;
    color: #64748b;
    margin-top: 0.4rem;
    font-weight: 500;
}

/* Features Overview Bottom Section */
.features-overview {
    background: #ffffff;
    border-top: 1px solid #e2e8f0;
    padding: 5rem 1.5rem 4rem;
    text-align: center;
    width: 100%;
}

.features-overview-container {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3rem;
}

.features-overview-title {
    font-size: 1.8rem;
    font-weight: 800;
    color: #0f172a;
}

.features-overview-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1rem;
    width: 100%;
}

.feature-overview-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.85rem;
}

.feature-overview-icon-wrap {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.25rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.feature-overview-icon-wrap svg {
    width: 1.5rem;
    height: 1.5rem;
}

.feature-overview-card h4 {
    font-size: 0.75rem;
    font-weight: 700;
    color: #334155;
    line-height: 1.3;
    margin: 0;
    max-width: 120px;
}

.bg-blue-light { background: #eff6ff; color: #2563eb; }
.bg-yellow-light { background: #fef9c3; color: #ca8a04; }
.bg-green-light { background: #f0fdf4; color: #16a34a; }
.bg-purple-light { background: #faf5ff; color: #9333ea; }
.bg-orange-light { background: #fff7ed; color: #ea580c; }
.bg-teal-light { background: #f0fdfa; color: #0d9488; }
.bg-pink-light { background: #fdf2f8; color: #db2777; }

.features-overview-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    padding: 0.65rem 1.25rem;
    border-radius: 99px;
    font-size: 0.88rem;
    font-weight: 700;
    color: #16a34a;
    box-shadow: 0 4px 12px rgba(22, 163, 74, 0.04);
}

/* Responsive updates for features grid and map pins */
@media (max-width: 960px) {
    .features-overview-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 1.5rem;
    }
    .floating-map-pin {
        display: none !important;
    }
}
@media (max-width: 640px) {
    .features-overview-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    .form-trust-indicators {
        flex-wrap: wrap;
        gap: 0.75rem;
    }
    .trust-indicator-item {
        width: 45%;
    }
}

/* Centered Layout & Combined Hero Stack */
.main-cta-card-centered {
    max-width: 780px !important;
    width: 100%;
    margin: -4rem auto 0 auto;
    padding: 3rem !important;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    position: relative;
    z-index: 5; /* Render above the background pins */
    background: #ffffff !important; /* Elegant brand white card background */
}

.card-hero-header {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    text-align: center;
    align-items: center;
    border-bottom: none;
    padding: 1.5rem 2rem;
}

.button-subtext {
    text-align: center;
    font-size: 0.8rem;
    font-weight: 400;
    color: #94a3b8;
    margin-top: 0.75rem;
}

.subscribe-text-link {
    color: #2563eb;
    text-decoration: underline;
    font-weight: 700;
    transition: opacity 0.15s ease;
}

.subscribe-text-link:hover {
    opacity: 0.8;
}

.pricing-summary-container {
    margin-top: 2.25rem;
    background: rgba(37, 99, 235, 0.04);
    border: 1px solid rgba(37, 99, 235, 0.15);
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.pricing-summary-headline {
    font-size: 1.12rem;
    font-weight: 800;
    color: #0f172a;
    text-align: left;
    margin: 0;
    letter-spacing: -0.01em;
}

.pricing-summary-text {
    font-size: 0.98rem;
    font-weight: 500;
    color: #475569;
    text-align: left;
    line-height: 1.5;
    margin: 0.65rem 0;
}

.pricing-summary-disclaimer {
    font-size: 0.88rem;
    font-weight: 700;
    color: #64748b;
    text-align: left;
    margin: 0;
}



.card-hero-header {
    text-align: left;
}

.card-hero-header .hero-headline {
    font-size: 2.35rem;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.04em;
    color: #0f172a;
    margin: 0;
    max-width: 620px;
}

.card-hero-header .hero-headline-secondary {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -0.03em;
    color: #64748b;
    margin: 0;
}

.card-hero-header .hero-subtitle {
    font-size: 1.05rem;
    line-height: 1.6;
    color: #475569;
    margin: 0;
    max-width: 540px;
    text-align: left;
}

/* Hero CTA buttons — clean, self-contained, no inheritance from .btn */
.card-hero-header .sample-report-center {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: stretch;
    gap: 0.75rem;
    margin: 1.25rem 0 0 0;
}

/* When form-view is hidden AND success views are not active, collapse wrapper */
.signup-form-wrapper:has(#form-view[style*="display: none"]):not(:has(#success-view[style*="display: block"])):not(:has(#out-of-area-view[style*="display: block"])) {
    display: none;
}

.cta-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    padding: 0.85rem 1.5rem;
    border-radius: 10px;
    transition: all 0.2s ease;
    width: auto;
    min-width: 200px;
    line-height: 1.4;
    white-space: nowrap;
}

.cta-btn-secondary {
    background: #f1f5f9;
    color: #475569;
    border: 1.5px solid #e2e8f0;
}

.cta-btn-secondary:hover {
    background: #e2e8f0;
    transform: translateY(-1px);
}

.cta-btn-primary {
    background: #FFF200;
    color: #002270;
    border: 1.5px solid #e2b700;
    box-shadow: 0 4px 12px rgba(255, 242, 0, 0.25);
}

.cta-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(255, 242, 0, 0.35);
}

@media (max-width: 480px) {
    .card-hero-header .sample-report-center {
        flex-direction: column;
    }
    .cta-btn {
        width: 100%;
    }
}

.sample-report-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 1.3rem;
    font-weight: 700;
    color: #475569;
    text-decoration: none;
    background: #f1f5f9;
    padding: 1rem 2.5rem;
    border-radius: 99px;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    border: 1.5px solid #e2e8f0;
    min-height: 3.5rem;
    flex: 1;
    max-width: 220px;
}

.sample-report-link:hover {
    color: #1d4ed8;
    background: rgba(37, 99, 235, 0.09);
    border-color: rgba(37, 99, 235, 0.2);
    transform: translateY(-1px);
    text-decoration: none !important;
}

.sample-report-link:active {
    transform: translateY(0);
}

.sample-report-link:hover .link-arrow-icon {
    transform: translateX(4px);
}

.signup-section-title {
    text-align: center;
    font-size: 1.6rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 1.75rem 0;
    letter-spacing: -0.02em;
}

.card-hero-header .hero-social-proof {
    justify-content: center;
    margin-top: 0.5rem;
}

.report-preview-card-centered {
    margin-top: 1rem;
    max-width: 520px !important;
    margin-left: auto;
    margin-right: auto;
    position: relative;
    z-index: 5; /* Render above the background pins */
    background: rgba(255, 255, 255, 0.96) !important;
}

/* Tooltip Layout & Bubble Styles */
.label-with-tooltip {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    margin-bottom: 0.35rem;
}

.label-with-tooltip .uppercase-label {
    margin-bottom: 0 !important;
    display: inline-block;
}

.tooltip-trigger-icon {
    width: 0.95rem;
    height: 0.95rem;
    color: #64748b;
    cursor: help;
    transition: color 0.15s ease;
}

.tooltip-trigger-icon:hover {
    color: #334155;
}

.tooltip-container {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.tooltip-bubble {
    visibility: hidden;
    width: 220px;
    background-color: #0f172a;
    color: #ffffff;
    text-align: left;
    border-radius: 8px;
    padding: 0.65rem 0.85rem;
    position: absolute;
    z-index: 100;
    bottom: 135%; /* Position above the icon */
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.2s, transform 0.2s;
    font-size: 0.75rem;
    font-weight: 500;
    line-height: 1.4;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
    pointer-events: none;
    white-space: normal;
    text-transform: none; /* Do not inherit uppercase label style */
}

/* Arrow tooltip styling */
.tooltip-bubble::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: #0f172a transparent transparent transparent;
}

.tooltip-container:hover .tooltip-bubble {
    visibility: visible;
    opacity: 1;
    transform: translateX(-50%) translateY(-4px);
}

@media (max-width: 768px) {
    .main-cta-card-centered {
        padding: 2rem 1.5rem !important;
        margin: 0 auto !important;
    }
    .card-hero-header .hero-headline {
        font-size: 1.85rem;
    }
}



