@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: #fef2f2;
    border: 1px solid #fee2e2;
    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 {
    margin-top: 4.5rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.85rem;
    line-height: 1.7;
}

.footer-slogan {
    font-weight: 500;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

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

.footer-bullet {
    margin: 0 0.5rem;
    opacity: 0.5;
}

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

.footer-links a {
    color: var(--accent-color);
    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 {
    opacity: 0.3;
    margin: 0 0.5rem;
}

.footer-copyright {
    font-size: 0.8rem;
    opacity: 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: none;
    line-height: 1.35;
}
.leader-project-addr:hover {
    text-decoration: underline;
    color: #002a73;
}

/* 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: 2rem 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/detailed_light_map.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.75; /* Higher base opacity for high definition at the bottom */
    z-index: 1;
    pointer-events: none;
}

/* Linear-gradient wash layer: opaque at the top (for legibility) and transparent at the bottom (for map definition) */
.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        to bottom,
        #f8fafc 0%,
        rgba(248, 250, 252, 0.96) 35%,
        rgba(248, 250, 252, 0.6) 70%,
        rgba(248, 250, 252, 0.15) 100%
    );
    z-index: 2;
    pointer-events: 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: 3; /* Sits above the background and gradient layer but under text */
}

.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;
}

@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;
    gap: 3.5rem;
    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 */
}

/* Two-column layout for value prop text and signup box */
.hero-main {
    display: grid;
    grid-template-columns: 1.1fr 1fr; /* Slightly larger column for headline text, right column for the signup card */
    gap: 4rem;
    align-items: start; /* Align to the top instead of center to move the text up */
}

.hero-text-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 1.25rem; /* Balanced spacing to align text with the top of the form card */
}

.hero-signup-column {
    display: flex;
    justify-content: center;
    width: 100%;
}

/* 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 (Right Column) - Signup Form Card */
.hero-signup-column .main-cta-card {
    background: #ffffff;
    border: 1px solid rgba(0, 53, 148, 0.05);
    border-top: 5px solid #003594; /* Thick brand blue top accent border */
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 25px 55px rgba(0, 53, 148, 0.08), 0 0 0 1px rgba(0, 53, 148, 0.04);
    color: #0f172a;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    text-align: left;
    width: 100%;
    max-width: 450px; /* Limit width for cleaner visual proportion */
}

/* Headline on Left (above map background) */
.hero-text-content .hero-headline {
    font-size: 2.75rem;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.04em;
    color: #0f172a; /* Deep slate color for high contrast */
    margin-bottom: 0.5rem;
    text-shadow: 0 1px 8px rgba(255, 255, 255, 0.9), 0 1px 3px rgba(255, 255, 255, 0.7); /* Light shadow overlay to make text pop over map street lines */
}

/* Subtitle on Left */
.hero-text-content .hero-subtitle {
    font-size: 1.15rem;
    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);
}

/* See Sample Link */
.hero-sample-link {
    display: block;
    color: #003594; /* Brand navy blue */
    font-weight: 700;
    text-decoration: underline;
    font-size: 1.45rem; /* Enlarger font size */
    transition: all 0.2s ease;
    width: fit-content;
    text-shadow: 0 1px 4px rgba(255, 255, 255, 0.8);
    margin-top: 0.5rem;
    margin-left: auto;
    margin-right: auto;
}

.hero-sample-link:hover {
    color: #1d4ed8; /* Vibrant hover blue */
    text-decoration: underline;
    transform: translateY(-2px); /* Subtle hover lift */
}

/* 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 */
.hero-signup-column .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;
}

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

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

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

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

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

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

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

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

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

.hero-signup-column .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 {
    max-width: 1100px;
    margin: 0 auto;
    padding: 2rem 1.5rem 3rem;
}

/* 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;
    }

    .hero-signup-column .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;
    }

    .hero-signup-column .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;
}
