/* Header Styles */
header {
    background-color: #333;
    padding: 10px 0;
}

.page-loading-overlay {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, 0.34);
    backdrop-filter: blur(4px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.18s ease, visibility 0.18s ease;
    z-index: 2000;
}

.page-loading-overlay.is-visible {
    opacity: 1;
    visibility: visible;
}

.page-loading-card {
    min-width: 180px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(148, 163, 184, 0.35);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.18);
}

.page-loading-spinner {
    width: 2.2rem;
    height: 2.2rem;
    border-radius: 999px;
    border: 0.24rem solid rgba(37, 99, 235, 0.16);
    border-top-color: #2563eb;
    animation: page-loading-spin 0.8s linear infinite;
}

.page-loading-text {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 600;
    color: #1e293b;
    text-align: center;
}

body.is-page-loading {
    cursor: progress;
}

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

header nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

header nav ul li {
    margin-right: 20px;
}

header nav ul li a {
    color: white;
    text-decoration: none;
    font-size: 1.1rem;
}

header nav ul li a:hover {
    text-decoration: underline;
}

body {
    font-family: Arial, sans-serif;
    background-color: #f8f9fa;
    margin: 0;
    padding: 20px;
}

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

.summary {
    background-color: white;
    padding: 20px 22px;
    margin-bottom: 12px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.summary h2 {
    margin-top: 0;
    font-size: 2.5rem;
    margin-bottom: 12px;
}

.summary > p {
    font-size: 1.2rem;
    margin-bottom: 30px;
}

.summary-heading-label {
    margin: 0;
    font-size: 1rem;
    color: #666;
}

.summary-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-top: 12px;
}

.summary-stats div {
    text-align: left;
}

.summary-stats p {
    margin: 0;
    font-size: 1rem;
    color: #666;
    margin-bottom: 8px;
}

.summary-stats h3 {
    font-size: 2.5rem;
    margin: 0;
    font-weight: bold;
    color: #000;
}

.metric-label-mobile {
    display: none;
}

.metric-value-mobile {
    display: none;
}

.summary-metric-notes {
    margin-top: 6px;
}

.summary-grm-note {
    margin: 0;
    font-size: 0.55rem;
    line-height: 1.1;
    color: #6c757d;
}

.summary-metric-note-mobile {
    display: none;
    margin: 2px 0 0;
    font-size: 0.55rem;
    line-height: 1.1;
    color: #6c757d;
}

.source {
    margin-top: 30px;
    font-size: 0.9rem;
    color: #666;
}

/* Responsive design for smaller screens */
@media (max-width: 768px) {
    .summary-stats {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .summary-stats h3 {
        font-size: 2rem;
    }

    .metric-label-desktop {
        display: none;
    }

    .metric-label-mobile {
        display: inline;
    }

    .metric-value-desktop {
        display: none;
    }

    .metric-value-mobile {
        display: inline;
    }

    .summary-metric-note-mobile {
        display: block;
    }
}

@media (max-width: 480px) {
    .summary-stats {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .summary h2 {
        font-size: 2rem;
    }
    
    .summary > p {
        font-size: 1.1rem;
    }
}

.alert {
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid transparent;
    border-radius: 4px;
}

.alert-success {
    color: #3c763d;
    background-color: #dff0d8;
    border-color: #d6e9c6;
}

.alert-danger {
    color: #a94442;
    background-color: #f2dede;
    border-color: #ebccd1;
}

.alert-info {
    color: #31708f;
    background-color: #d9edf7;
    border-color: #bce8f1;
}

/* Nearby Area Trends Styles */
.nearby-areas {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    margin-top: 20px;
}

.area-card {
    width: 18%;
    min-width: 200px;
    border: 1px solid #ccc;
    border-radius: 5px;
    padding: 15px;
    margin-bottom: 20px;
    background-color: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.area-card h3 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.area-card p {
    font-size: 1.1rem;
    font-weight: bold;
    margin-bottom: 10px;
}

.trend-chart {
    height: 100px !important;
    width: 100%;
    max-width: 200px;
    margin-bottom: 10px;
}

.explore-link {
    display: block;
    text-align: center;
    margin-top: 10px;
    color: #007bff;
    text-decoration: none;
    font-weight: bold;
}

.explore-link:hover {
    text-decoration: underline;
}

/* Responsive design for smaller screens */
@media (max-width: 1200px) {
    .area-card {
        width: 23%;
    }
}

@media (max-width: 992px) {
    .area-card {
        width: 31%;
    }
}

@media (max-width: 768px) {
    .area-card {
        width: 48%;
    }
}

@media (max-width: 576px) {
    .area-card {
        width: 100%;
    }
}

.faq-section {
    margin-top: 2rem;
    background-color: #f8f9fa;
    padding: 2rem;
    border-radius: 8px;
}

.faq-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.faq-item h3 {
    margin-bottom: 0.5rem;
    color: #333;
}

.faq-item p {
    margin: 0;
    color: #666;
}

/* New Compare Median Rent section styles */
.compare-rent {
    background-color: white;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.compare-markets {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
}

.market {
    flex: 1;
    text-align: center;
}

.vs {
    font-weight: bold;
    font-size: 1.2em;
    margin: 0 20px;
}

.rent {
    font-size: 2.5em;
    font-weight: bold;
    color: #0056b3;
    margin: 10px 0;
}

.search-form {
    display: flex;
    justify-content: center;
    margin-bottom: 10px;
}

.search-input {
    padding: 5px 10px;
    font-size: 1em;
    border: 1px solid #ccc;
    border-radius: 4px 0 0 4px;
}

.search-button {
    padding: 5px 10px;
    font-size: 1em;
    background-color: #0056b3;
    color: white;
    border: none;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
}

.search-button:hover {
    background-color: #003d82;
}

.blurred {
    position: relative;
    filter: blur(5px);
}

.blur-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.8);
    z-index: 1;
    filter: none;
}

.subscribe-link {
    filter: none;
    background: #007bff;
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
}

.subscribe-link:hover {
    background: #0056b3;
}

/* Search box styles */
.search-container {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

#results {
    position: absolute;
    width: 100%;
    background: white;
    border: 1px solid #ced4da;
    border-radius: 0 0 0.375rem 0.375rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    display: none;
    margin-top: -1px; /* Connects smoothly with the search input */
}

.result {
    padding: 0.75rem 1rem;
    margin: 0;
    cursor: pointer;
    border-bottom: 1px solid #e9ecef;
    transition: background-color 0.15s ease-in-out;
}

.result:hover {
    background-color: #f8f9fa;
    color: #0d6efd;
}

.result:last-child {
    border-bottom: none;
    border-radius: 0 0 0.375rem 0.375rem;
}

/* Ensure search input has matching styles */
#searchbox {
    border-radius: 0.375rem;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    border: 1px solid #ced4da;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
    width: 100%;
}

#searchbox:focus {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    outline: none;
    border-color: #86b7fe;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

/* Market Summary Section */
.container .summary {
    background-color: white;
    padding: 20px 22px;
    margin-bottom: 12px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.container .summary h2 {
    margin-top: 0;
    font-size: 2.5rem;
    margin-bottom: 12px;
}

.container .summary > p {
    font-size: 1.2rem;
    margin-bottom: 30px;
}

.container .summary-heading-label {
    margin: 0;
    font-size: 1rem;
    color: #666;
}

.container .summary-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-top: 12px;
}

.container .summary-stats div {
    text-align: left;
}

.container .summary-stats p {
    margin: 0;
    font-size: 1rem;
    color: #666;
    margin-bottom: 8px;
}

.container .summary-stats h3 {
    font-size: 2.5rem;
    margin: 0;
    font-weight: bold;
    color: #000;
}

.container .metric-label-mobile {
    display: none;
}

.container .metric-value-mobile {
    display: none;
}

.container .summary-metric-notes {
    margin-top: 6px;
}

.container .summary-grm-note {
    margin: 0;
    font-size: 0.55rem;
    line-height: 1.1;
    color: #6c757d;
}

.container .summary-metric-note-mobile {
    display: none;
    margin: 2px 0 0;
    font-size: 0.55rem;
    line-height: 1.1;
    color: #6c757d;
}

.container .source {
    margin-top: 30px;
    font-size: 0.9rem;
    color: #666;
}

/* Responsive design for smaller screens */
@media (max-width: 768px) {
    .container .summary-stats {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .container .summary-stats h3 {
        font-size: 2rem;
    }

    .container .metric-label-desktop {
        display: none;
    }

    .container .metric-label-mobile {
        display: inline;
    }

    .container .metric-value-desktop {
        display: none;
    }

    .container .metric-value-mobile {
        display: inline;
    }

    .container .summary-metric-note-mobile {
        display: block;
    }
}

@media (max-width: 480px) {
    .container .summary-stats {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .container .summary h2 {
        font-size: 2rem;
    }
    
    .container .summary > p {
        font-size: 1.1rem;
    }
}

/* Blog post styles */
.blog-post {
    background-color: white;
}

.blog-post header {
    background-color: transparent;  /* Override the dark background */
    padding: 0;  /* Remove default padding */
}

.blog-post h1 {
    color: #212529;  /* Dark text color for better readability */
}

.blog-post .text-muted {
    color: #6c757d !important;
}

.median-rental {
    background-color: white;
    padding: 20px;
    margin: 20px 0;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

#medianRentalChart {
    height: 400px !important;  /* Fixed height */
    width: 100% !important;
    margin: 20px 0;
}

/* Similar markets sections */
.similar-markets-sections {
    margin: 2.5rem 0 1.5rem;
    display: grid;
    gap: 1.5rem;
}

.similar-markets-tabbed {
    display: block;
    gap: 0;
}

.similar-scope-tabs {
    margin: 0;
    border-bottom: none;
    gap: 0.4rem;
    padding: 0.12rem 0.2rem 0;
    margin-top: 0;
    margin-bottom: 0;
    position: relative;
    z-index: 4;
    overflow: visible;
}

.similar-scope-tabs .nav-link#scope-county-tab {
    --tab-accent: #2a5bd7;
    --tab-accent-rgb: 42, 91, 215;
}

.similar-scope-tabs .nav-link#scope-state-tab {
    --tab-accent: #2c8b5f;
    --tab-accent-rgb: 44, 139, 95;
}

.similar-scope-tabs .nav-link#scope-nationwide-tab {
    --tab-accent: #c46a1a;
    --tab-accent-rgb: 196, 106, 26;
}

.similar-scope-tabs .nav-link {
    --tab-accent: #64748b;
    --tab-accent-rgb: 100, 116, 139;
    border: 1px solid rgba(var(--tab-accent-rgb), 0.42);
    border-bottom: 1px solid transparent;
    border-radius: 12px 12px 0 0;
    background: linear-gradient(
        180deg,
        #fcfdff 0%,
        rgba(var(--tab-accent-rgb), 0.09) 100%
    );
    color: #334155;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    text-transform: none;
    padding: 0.4rem 0.85rem;
    position: relative;
    z-index: 2;
    margin-bottom: -1px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
    transform: translateY(0);
    transition:
        transform 0.18s ease,
        box-shadow 0.18s ease,
        background 0.18s ease,
        border-color 0.18s ease;
}

.similar-scope-tabs .nav-link:hover {
    border-color: rgba(var(--tab-accent-rgb), 0.6);
    background: linear-gradient(
        180deg,
        rgba(var(--tab-accent-rgb), 0.2) 0%,
        rgba(var(--tab-accent-rgb), 0.08) 100%
    );
    transform: translateY(0);
    z-index: 5;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.similar-scope-tabs .nav-link.active {
    background: linear-gradient(
        180deg,
        rgba(var(--tab-accent-rgb), 0.23) 0%,
        #ffffff 86%
    );
    color: #1f2a44;
    border-color: rgba(var(--tab-accent-rgb), 0.68);
    border-bottom-color: #ffffff;
    transform: translateY(0);
    z-index: 6;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.92);
}

.similar-scope-tabs .nav-link:focus,
.similar-scope-tabs .nav-link:focus-visible {
    outline: none;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.92),
        0 0 0 2px rgba(var(--tab-accent-rgb), 0.22);
}

.similar-scope-content {
    margin-top: -1px;
    position: relative;
    z-index: 1;
}

.similar-markets-section {
    --scope-accent: #2a5bd7;
    --scope-accent-rgb: 42, 91, 215;
    --scope-soft: rgba(var(--scope-accent-rgb), 0.08);
    --scope-border: rgba(var(--scope-accent-rgb), 0.5);
    --scope-shadow: rgba(var(--scope-accent-rgb), 0.12);
    background: #ffffff;
    border-radius: 0 0 14px 14px;
    padding: 1.1rem 1.25rem 1.25rem;
    border: 1px solid var(--scope-border);
    border-top: none;
    box-shadow:
        0 8px 12px rgba(31, 41, 55, 0.08),
        0 6px 10px var(--scope-shadow);
    position: relative;
}

.similar-markets-section.similar-scope-county {
    --scope-accent: #2a5bd7;
    --scope-accent-rgb: 42, 91, 215;
}

.similar-markets-section.similar-scope-state {
    --scope-accent: #2c8b5f;
    --scope-accent-rgb: 44, 139, 95;
}

.similar-markets-section.similar-scope-nationwide {
    --scope-accent: #c46a1a;
    --scope-accent-rgb: 196, 106, 26;
}

.similar-markets-section::before {
    display: none;
}

.similar-markets-section h3 {
    margin: 0 0 0.9rem;
    font-size: 0.95rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #1f2a44;
    display: flex;
    align-items: center;
    gap: 0.55rem;
}

.similar-markets-section h3::before {
    content: "";
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--scope-accent);
    box-shadow: 0 0 0 4px var(--scope-soft);
}

.similar-scope-description {
    margin: 0 0 0.5rem;
    font-size: 0.8rem;
    color: #445169;
    line-height: 1.25;
}

.similar-markets-table {
    border: 1px solid #dbe3ef;
    border-radius: 10px;
    overflow-x: hidden;
    overflow-y: auto;
    max-height: var(--similar-table-max-height, none);
    overscroll-behavior: contain;
    background: #fff;
}

.similar-market-row {
    display: grid;
    grid-template-columns: minmax(250px, 2.55fr) minmax(62px, 0.58fr) minmax(46px, 0.42fr) minmax(84px, 0.82fr) minmax(52px, 0.46fr);
    gap: 0.18rem;
    align-items: center;
}

.similar-market-row-header {
    padding: 0.4rem 0.75rem;
    border-bottom: 1px solid #e5edf6;
    background: #f7faff;
    position: sticky;
    top: 0;
    z-index: 2;
}

.similar-market-row-header .similar-market-cell {
    font-size: 0.64rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #5b6b80;
}

.similar-markets-item {
    padding: 0.45rem 0.75rem;
    border-top: 1px solid #edf2f7;
    background: #fff;
    transition: background 0.15s ease;
}

.similar-markets-item:hover {
    background: #f8fbff;
}

.similar-market-cell {
    min-width: 0;
    font-size: 0.78rem;
    color: #334155;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.similar-market-display-cell {
    display: flex;
    justify-content: center;
    align-items: center;
}

.similar-market-display-toggle {
    width: 0.95rem;
    height: 0.95rem;
    margin: 0;
    cursor: pointer;
    accent-color: var(--scope-accent);
}

.similar-market-region {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
}

.similar-market-name {
    font-weight: 600;
    color: #1f2a44;
    font-size: 0.8rem;
    display: block;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    overflow-wrap: anywhere;
    word-break: break-word;
    line-height: 1.16;
}

.similar-market-name:link,
.similar-market-name:visited {
    color: #0b5ed7;
    text-decoration: underline;
}

.similar-market-name:hover,
.similar-market-name:focus {
    color: #084298;
    text-decoration: underline;
}

.similar-market-meta {
    font-size: 0.66rem;
    color: #64748b;
    font-variant-numeric: tabular-nums;
}

.similar-markets-empty {
    margin: 0;
    color: #6c7a89;
    font-style: italic;
}

/* Compare panel */
.compare-panel {
    margin: 2rem 0;
    padding: 1.5rem;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 10px 25px rgba(31, 41, 55, 0.08);
}

.compare-panel h2 {
    margin: 0 0 0.35rem;
    font-size: 1.35rem;
    color: #1f2937;
}

.compare-panel p {
    margin: 0;
    color: #4b5563;
}

.compare-panel p.compare-summary-empty {
    color: #6c7a89;
    font-style: italic;
}

.trend-summary .trend-summary-empty {
    color: #6c7a89;
    font-style: italic;
}

.compare-empty {
    padding: 0.75rem 1rem;
    border: 1px dashed #cbd5f5;
    border-radius: 12px;
    background: #f5f7ff;
    color: #44516b;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.compare-metrics {
    border: 1px solid #e5ecf6;
    border-radius: 14px;
    overflow: hidden;
}

.compare-row {
    display: grid;
    grid-template-columns: 1.15fr 1fr 1fr 0.85fr;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    align-items: center;
}

.compare-row + .compare-row {
    border-top: 1px solid #edf2f7;
}

.compare-row-header {
    background: #f3f6fb;
    align-items: start;
}

.compare-cell {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    font-size: 0.95rem;
    color: #1f2937;
}

.compare-row-header .compare-cell {
    font-size: 0.85rem;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.compare-metric-label {
    font-weight: 600;
    text-transform: none;
    letter-spacing: 0;
}

.compare-row-header .compare-metric-label {
    font-weight: 700;
    color: #334155;
}

.compare-market-name {
    font-size: 1rem;
    font-weight: 600;
    color: #1f2937;
}

.compare-column-label {
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.compare-delta {
    font-weight: 600;
}

.compare-delta.is-positive {
    color: #1d9a6c;
}

.compare-delta.is-negative {
    color: #d14343;
}

.compare-compare-column {
    position: relative;
}

/* FAQ section */
.faq-section {
    margin: 2rem 0;
    background: #fff;
    border-radius: 12px;
    padding: 1rem 1.25rem;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.faq-section summary {
    cursor: pointer;
    font-size: 1.35rem;
    font-weight: 700;
    color: #1f2937;
    list-style: none;
}

.faq-section summary::-webkit-details-marker {
    display: none;
}

.faq-section summary::after {
    content: "▾";
    margin-left: 0.5rem;
    font-size: 0.9rem;
    color: #64748b;
}

.faq-section[open] summary::after {
    content: "▴";
}

.faq-list {
    margin-top: 1rem;
    display: grid;
    gap: 1rem;
}

.faq-item h3 {
    margin-bottom: 0.35rem;
    font-size: 1rem;
    color: #1f2937;
}

.faq-item p {
    margin: 0;
    color: #4b5563;
}

@media (max-width: 900px) {
    .compare-row {
        grid-template-columns: 1fr;
    }

    .compare-row-header {
        gap: 0.5rem;
    }

    .compare-row-header .compare-cell {
        text-transform: none;
        letter-spacing: 0;
    }

    .compare-row-header .compare-cell,
    .compare-row .compare-cell {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }

    .compare-row-header .compare-compare-column,
    .compare-row-header .compare-base-column {
        flex-direction: column;
        align-items: flex-start;
    }

    .compare-row-header .compare-delta-column {
        display: none;
    }

    .similar-markets-section {
        padding: 0.55rem 5px 0.65rem;
    }

    .similar-market-row {
        grid-template-columns: minmax(0, 2.9fr) minmax(0, 1fr) minmax(0, 0.72fr) minmax(0, 0.62fr) minmax(0, 0.68fr);
        gap: 0.08rem;
    }

    .similar-markets-item {
        padding: 0.36rem 0.42rem;
    }

    .similar-market-row .similar-market-cell:not(.similar-market-region):not(.similar-market-display-cell) {
        text-align: right;
        font-variant-numeric: tabular-nums;
    }

    .similar-markets-item .similar-market-region {
        display: block;
        white-space: normal;
        overflow: visible;
        text-overflow: clip;
    }

    .similar-markets-item .similar-market-name {
        display: block;
        white-space: normal;
        overflow: visible;
        text-overflow: clip;
        overflow-wrap: anywhere;
        line-height: 1.12;
    }
}

@media (max-width: 600px) {
    .similar-markets-sections {
        margin: 2rem 0 1rem;
        gap: 1.1rem;
    }

    .similar-scope-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        overflow-y: visible;
        padding-bottom: 0.2rem;
        scrollbar-width: thin;
    }

    .similar-scope-tabs .nav-link {
        white-space: nowrap;
        font-size: 0.72rem;
        padding: 0.35rem 0.7rem;
    }

    .similar-scope-tabs .nav-link.active {
        transform: translateY(0);
        box-shadow:
            inset 0 1px 0 rgba(255, 255, 255, 0.92),
            0 2px 5px rgba(31, 41, 55, 0.14);
    }

    .similar-markets-section h3 {
        font-size: 0.85rem;
    }

    .similar-markets-section {
        padding: 0.7rem 5px 0.75rem;
    }

    .similar-markets-table {
        border-left: none;
        border-right: none;
        border-radius: 0;
    }

    .similar-market-row {
        grid-template-columns: minmax(0, 2.85fr) minmax(0, 1.05fr) minmax(0, 0.78fr) minmax(0, 0.58fr) minmax(0, 0.74fr);
        gap: 0.04rem;
    }

    .similar-market-row-header .similar-market-cell {
        font-size: 0.58rem;
    }

    .similar-market-row-header {
        padding: 0.33rem 0.18rem;
    }

    .similar-markets-item {
        padding: 0.3rem 0.18rem;
    }

    .similar-market-row .similar-market-cell:not(.similar-market-region):not(.similar-market-display-cell) {
        text-align: right;
        font-variant-numeric: tabular-nums;
    }

    .similar-market-cell {
        font-size: 0.64rem;
    }

    .similar-scope-description {
        font-size: 0.68rem;
        margin-bottom: 0.35rem;
    }

    .similar-market-name {
        font-size: 0.68rem;
        white-space: normal;
        overflow: visible;
        text-overflow: clip;
        overflow-wrap: anywhere;
        line-height: 1.15;
    }

    .similar-market-region {
        display: block;
        white-space: normal;
        overflow: visible;
        text-overflow: clip;
    }

    .similar-market-meta {
        display: none;
    }

}
