/* =========================================================
   Market Summary - Calendar Year / YTD Comparison
   Append to or replace corresponding rules in market_summary.css
   ========================================================= */

.market-summary-page {
    width: 100%;
    max-width: 100%;
    padding-bottom: 42px;
}

.summary-hero {
    margin-bottom: 18px;
}

.summary-eyebrow,
.summary-section-label,
.metric-section-label {
    color: #6e6e73;
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.065em;
    text-transform: uppercase;
}

.summary-hero h1 {
    margin: 4px 0 0;
    color: #1d1d1f;
    font-size: clamp(1.85rem, 4vw, 2.6rem);
    font-weight: 700;
    letter-spacing: -0.035em;
}

.summary-subtitle {
    margin: 8px 0 0;
    color: #6e6e73;
    font-size: 0.98rem;
    line-height: 1.5;
}

.summary-card {
    background: rgba(255,255,255,0.92);
    border: 1px solid rgba(0,0,0,0.07);
    border-radius: 18px;
    box-shadow:
        0 1px 2px rgba(0,0,0,0.025),
        0 8px 24px rgba(0,0,0,0.04);
    overflow: hidden;
}

.info-card {
    margin-bottom: 16px;
    padding: 15px 18px;
}

.info-card strong {
    color: #1d1d1f;
    font-size: 0.9rem;
}

.info-card p {
    margin: 5px 0 0;
    color: #6e6e73;
    font-size: 0.84rem;
    line-height: 1.5;
}

.jump-card {
    padding: 15px 18px;
    margin-bottom: 30px;
}

.jump-card-title {
    margin-bottom: 10px;
    color: #1d1d1f;
    font-size: 0.88rem;
    font-weight: 650;
}

.area-jump-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.area-jump-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    padding: 7px 11px;
    background: #f5f5f7;
    border: 1px solid rgba(0,0,0,0.05);
    border-radius: 999px;
    color: #007aff;
    font-size: 0.87rem;
    font-weight: 600;
    text-decoration: none;
}

.summary-section {
    margin-bottom: 48px;
    scroll-margin-top: 20px;
}

.summary-section-heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 16px;
    margin-bottom: 12px;
}

.summary-section-heading h2 {
    margin: 3px 0 0;
    color: #1d1d1f;
    font-size: 1.38rem;
    font-weight: 700;
    letter-spacing: -0.025em;
}

.back-to-top {
    color: #007aff;
    font-size: 0.86rem;
    text-decoration: none;
}

.metric-section-label {
    margin: 28px 2px 9px;
}

.metric-description {
    display: flex;
    gap: 8px;
    align-items: baseline;
    margin: 0 2px 10px;
    color: #6e6e73;
    font-size: 0.82rem;
    line-height: 1.45;
}

.metric-description strong {
    color: #1d1d1f;
    white-space: nowrap;
}

.card-heading {
    padding: 16px 18px 12px;
}

.card-heading h3 {
    margin: 0;
    color: #1d1d1f;
    font-size: 1rem;
    font-weight: 700;
}

.card-heading p {
    margin: 4px 0 0;
    color: #6e6e73;
    font-size: 0.8rem;
    line-height: 1.45;
}

.comparison-card,
.compact-metric-card,
.chart-card,
.table-card {
    margin-bottom: 16px;
}

.comparison-table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.comparison-table {
    width: 100%;
    min-width: 650px;
    border-collapse: collapse;
}

.comparison-table th,
.comparison-table td {
    padding: 11px 14px;
    border-top: 1px solid rgba(0,0,0,0.055);
    text-align: right;
    font-size: 0.86rem;
    font-variant-numeric: tabular-nums;
}

.comparison-table th:first-child,
.comparison-table td:first-child {
    text-align: left;
}

.comparison-table thead th {
    color: #6e6e73;
    background: #fafafa;
    font-size: 0.76rem;
    font-weight: 650;
}

.comparison-table tbody th {
    color: #1d1d1f;
    font-weight: 650;
}

.metric-divider th,
.metric-divider td {
    border-top: 2px solid rgba(0,0,0,0.10);
}

.change {
    display: inline-block;
    min-width: 58px;
    padding: 4px 8px;
    border-radius: 999px;
    text-align: center;
    font-size: 0.76rem;
    font-weight: 650;
}

.change.positive {
    color: #137333;
    background: rgba(52,199,89,0.12);
}

.change.negative {
    color: #b42318;
    background: rgba(255,59,48,0.10);
}

.change.neutral {
    color: #6e6e73;
    background: #f2f2f7;
}

.chart-wrap {
    height: 330px;
    padding: 0 14px 16px;
}

.yearly-month-table {
    min-width: 520px;
}

.yearly-month-table .last-full-row {
    background: rgba(0,122,255,0.045);
}

.yearly-month-table .last-full-row th {
    color: #007aff;
}

@media (max-width: 700px) {
    .summary-card {
        border-radius: 15px;
    }

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

    .summary-subtitle {
        font-size: 0.92rem;
    }

    .metric-description {
        display: block;
    }

    .metric-description strong {
        display: block;
        margin-bottom: 2px;
    }

    .chart-wrap {
        height: 280px;
        padding: 0 8px 12px;
    }

    .comparison-table th,
    .comparison-table td {
        padding: 10px 12px;
    }
}
