/* News hub and articles. Loaded only on /news pages via $page_css. */

/* ---------- Shared pieces ---------- */

.news-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 0.85rem;
}

.news-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.24rem 0.65rem;
    border-radius: 999px;
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    background: var(--brand-soft);
    color: var(--brand);
}

.news-chip--accent {
    background: var(--navy);
    color: #ffffff;
}

.news-meta {
    margin: 0;
    font-size: 0.9rem;
    color: var(--muted);
}

.news-excerpt {
    margin: 0 0 0.9rem;
    color: var(--ink-2);
    line-height: 1.62;
}

.news-readmore {
    display: inline-flex;
    gap: 0.35rem;
    margin-top: 1.25rem;
    font-weight: 700;
    text-decoration: none;
}

.news-readmore:hover {
    text-decoration: underline;
}

/* ---------- News hub ---------- */

.news-portal {
    padding: 2.5rem 0 4.5rem;
}

.news-hub-head {
    max-width: 780px;
    margin-bottom: 2.5rem;
}

.news-eyebrow {
    margin: 0 0 0.6rem;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--brand);
}

.news-hub-head h1 {
    margin: 0 0 0.9rem;
    font-size: clamp(2.4rem, 5vw, 3.4rem);
    line-height: 1.04;
    letter-spacing: -0.02em;
    color: var(--navy);
}

.news-hub-lead {
    margin: 0;
    font-size: 1.1rem;
    line-height: 1.6;
    color: var(--muted);
}

.news-hub-count {
    margin: 1rem 0 0;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--muted);
}

.news-feature {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    margin-bottom: 3.25rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    overflow: hidden;
}

.news-feature-media,
.news-card-media {
    display: block;
    background: var(--navy);
}

.news-feature-media img,
.news-card-media img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

.news-feature-body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 2.25rem 2.5rem;
}

.news-feature h2 {
    margin: 0 0 0.9rem;
    font-size: clamp(1.6rem, 2.6vw, 2.1rem);
    line-height: 1.18;
    letter-spacing: -0.015em;
}

.news-feature h2 a,
.news-card h3 a {
    color: var(--ink);
    text-decoration: none;
}

.news-feature h2 a:hover,
.news-card h3 a:hover {
    color: var(--brand);
}

.news-section-title {
    margin: 0 0 1.5rem;
    padding-bottom: 0.8rem;
    font-size: 1.2rem;
    color: var(--navy);
    border-bottom: 1px solid var(--line);
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: 1.75rem;
}

.news-card {
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.news-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.news-card-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 1.25rem 1.35rem 1.4rem;
}

.news-card h3 {
    margin: 0 0 0.5rem;
    font-size: 1.2rem;
    line-height: 1.3;
}

.news-card .news-excerpt {
    flex: 1;
}

.news-empty {
    padding: 3rem 1.5rem;
    text-align: center;
    color: var(--muted);
    border: 1px dashed var(--line-strong);
    border-radius: var(--radius);
}

/* ---------- Article ---------- */

.news-article {
    max-width: 820px;
}

.news-crumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin: 2rem 0 1.4rem;
    font-size: 0.86rem;
    color: var(--muted);
}

.news-crumbs a {
    color: var(--muted);
    text-decoration: none;
}

.news-crumbs a:hover {
    color: var(--brand);
    text-decoration: underline;
}

.news-article h1 {
    margin: 0 0 1rem;
    font-size: clamp(2rem, 4vw, 2.85rem);
    line-height: 1.12;
    letter-spacing: -0.02em;
    color: var(--navy);
}

.news-deck {
    margin: 0 0 1.25rem;
    font-size: 1.2rem;
    line-height: 1.6;
    color: var(--ink-2);
}

.news-byline {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin: 0 0 1.9rem;
    font-size: 0.92rem;
    color: var(--muted);
}

.news-byline strong {
    color: var(--ink);
}

.news-dot {
    display: inline-block;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--line-strong);
}

.news-hero {
    margin: 0 0 2.5rem;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.news-hero img {
    display: block;
    width: 100%;
    height: auto;
}

.news-body {
    max-width: 740px;
    font-size: 1.07rem;
    line-height: 1.75;
    color: var(--ink-2);
}

.news-body p {
    margin: 0 0 1.15rem;
}

.news-body h2 {
    margin: 2.75rem 0 0.9rem;
    padding-top: 1.2rem;
    font-size: 1.55rem;
    line-height: 1.25;
    letter-spacing: -0.01em;
    color: var(--navy);
    border-top: 1px solid var(--line);
}

.news-body ul,
.news-body ol {
    margin: 0 0 1.25rem;
    padding-left: 1.3rem;
}

.news-body li {
    margin-bottom: 0.6rem;
}

.news-body strong {
    color: var(--ink);
}

.news-body a {
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

/* Key figures row */
.news-body .news-facts {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1px;
    margin: 0 0 1.5rem;
    background: var(--line);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.news-body .news-fact {
    padding: 1.2rem 1.35rem;
    background: var(--surface);
}

.news-body .news-fact-value {
    margin: 0 0 0.3rem;
    font-size: 2rem;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.02em;
    color: var(--navy);
}

.news-body .news-fact-label {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.45;
    color: var(--muted);
}

/* Callout */
.news-body .news-callout {
    margin: 1.75rem 0;
    padding: 1.1rem 1.3rem;
    background: var(--brand-soft);
    border-left: 4px solid var(--brand);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.news-body .news-callout p {
    margin: 0;
}

/* Figures and captions */
.news-body figure {
    margin: 2rem 0;
}

.news-body figure img {
    display: block;
    width: 100%;
    height: auto;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
}

.news-body figcaption {
    margin-top: 0.6rem;
    font-size: 0.88rem;
    line-height: 1.5;
    color: var(--muted);
}

/* Tables */
.news-body table {
    width: 100%;
    margin: 1.25rem 0 0.6rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    border-collapse: separate;
    border-spacing: 0;
    overflow: hidden;
    font-size: 0.92rem;
    font-variant-numeric: tabular-nums;
}

.news-body th,
.news-body td {
    padding: 0.7rem 0.85rem;
    text-align: left;
    vertical-align: top;
    border-top: 1px solid var(--line);
}

.news-body th {
    background: var(--navy);
    color: #ffffff;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.news-body tbody tr:nth-child(even) td {
    background: #f8fafc;
}

.news-body table + p {
    font-size: 0.86rem;
    color: var(--muted);
}

/* Sources footer */
.news-body .news-sources {
    margin-top: 2.5rem;
    padding-top: 1.1rem;
    font-size: 0.9rem;
    color: var(--muted);
    border-top: 1px solid var(--line);
}

/* City count list used by live report tokens */
.news-city-counts {
    padding-left: 1.2rem;
}

.news-city-counts span {
    color: var(--muted);
}

/* ---------- Small screens ---------- */

@media (max-width: 860px) {
    .news-feature {
        grid-template-columns: 1fr;
    }

    .news-feature-body {
        padding: 1.6rem 1.4rem 1.8rem;
    }
}

@media (max-width: 560px) {
    .news-body .news-facts {
        grid-template-columns: 1fr;
    }

    .news-body .news-fact-value {
        font-size: 1.7rem;
    }

    .news-body table {
        font-size: 0.82rem;
    }

    .news-body th,
    .news-body td {
        padding: 0.55rem 0.5rem;
    }
}
