/* News page — tight, newspaper-style layout */
.section.news-page { padding: 0 0 1.5rem; border-bottom: none; }

/* ── News page header — minimal ── */
.news-page__title {
    font-family: var(--font-heading, 'Playfair Display', serif);
    font-size: 1.5rem;
    font-weight: 800;
    line-height: 1.15;
    color: #111;
    margin: 0.75rem 0 0.5rem;
    letter-spacing: -0.02em;
}


/* Scope section headings */
.news-scope-section { margin-bottom: 1rem; }
.news-scope-section__heading { font-family: var(--font-body, 'Source Sans 3', sans-serif); font-size: 0.68rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--color-primary, #1a5276); margin: 0.75rem 0 0.4rem; padding-bottom: 0.25rem; border-bottom: 1px solid rgba(0,0,0,0.08); }

/* Articles */
.news-article { padding: 0.5rem 0; border-bottom: 1px solid rgba(0,0,0,0.06); }
.news-article:last-of-type { border-bottom: none; }

/* Lead article */
.news-article--lead { padding-bottom: 0.75rem; border-bottom: 1px solid rgba(0,0,0,0.1); margin-bottom: 0.15rem; }
.news-article--lead .news-article__image { margin-bottom: 0.5rem; }
.news-article--lead .news-article__image img { width: 100%; aspect-ratio: 16/9; object-fit: cover; border-radius: 4px; display: block; }
.news-article--lead .news-article__title { font-family: var(--font-heading, 'Playfair Display', serif); font-size: clamp(1.2rem, 2.5vw, 1.5rem); font-weight: 800; line-height: 1.2; color: #111; margin: 0 0 0.3rem; letter-spacing: -0.02em; }
.news-article--lead .news-article__summary { font-size: 0.88rem; line-height: 1.5; color: #444; margin: 0 0 0.35rem; max-width: 680px; }

/* Text-only lead */
.news-article--text-only { border-left: 3px solid var(--color-primary, #1a5276); padding-left: 1rem; }

/* Regular articles */
.news-article__title { font-family: var(--font-heading, 'Playfair Display', serif); font-size: 0.95rem; font-weight: 700; line-height: 1.25; color: #111; margin: 0 0 0.2rem; letter-spacing: -0.01em; }
.news-article__title a { color: inherit; text-decoration: none; position: relative; }
.news-article__title a::before { content: ''; position: absolute; top: 50%; left: -0.25rem; right: -0.25rem; transform: translateY(-50%); min-height: 44px; }
.news-article__title a:hover { color: var(--color-primary, #1a5276); }
.news-article__title a:visited { color: #666; }
.news-article__meta { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.15rem; }
.news-article__source { font-size: 0.7rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--color-primary, #1a5276); }
.news-article__date { font-size: 0.78rem; color: #555; }
.news-article__summary { font-size: 0.85rem; line-height: 1.5; color: #333; margin: 0 0 0.2rem; }
.news-article:not(.news-article--lead) .news-article__summary { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* Article with thumbnail */
.news-article--with-thumb { display: grid; grid-template-columns: 1fr 110px; gap: 0.75rem; align-items: start; }
.news-article__thumb { order: 1; }
.news-article__thumb img { width: 110px; height: 78px; object-fit: cover; border-radius: 3px; display: block; }
.news-article__body { min-width: 0; }

/* Article actions */
.news-article__actions { display: flex; align-items: center; gap: 0.5rem; margin-top: 0.2rem; }
.news-article__link { display: inline-block; position: relative; font-size: 0.78rem; font-weight: 700; color: var(--color-primary, #1a5276); text-decoration: none; }
.news-article__link::before { content: ''; position: absolute; top: 50%; left: -0.5rem; right: -0.5rem; transform: translateY(-50%); min-height: 44px; }
.news-article__link:hover { text-decoration: underline; }

/* RSS link — subtle icon-only, inline in tabs */
.news-page .rss-link { margin-left: auto; display: inline-flex; align-items: center; padding: 0.5rem; color: #aaa; border: none; min-height: 0; gap: 0; font-size: 0; background: none; transition: color 0.15s; }
.news-page .rss-link:hover { color: var(--color-primary, #1a5276); background: none; }
.news-page .rss-link__icon { width: 13px; height: 13px; }

/* Load more / View all */
.news-scope-section__more { display: inline-block; position: relative; font-size: 0.78rem; font-weight: 600; color: var(--color-primary, #1a5276); text-decoration: none; padding: 0.35rem 0; }
.news-scope-section__more::before { content: ''; position: absolute; top: 50%; left: -0.5rem; right: -0.5rem; transform: translateY(-50%); min-height: 44px; }
.news-scope-section__more:hover { text-decoration: underline; }
.news-load-more { display: block; width: 100%; padding: 0.5rem 1rem; background: #f8f8f8; border: 1px solid rgba(0,0,0,0.08); border-radius: 4px; font-size: 0.82rem; font-weight: 600; color: var(--color-primary, #1a5276); cursor: pointer; text-align: center; transition: background 0.15s; margin-top: 0.15rem; }
.news-load-more:hover { background: #f0ede8; }
.news-load-more__count { font-weight: 400; color: #888; font-size: 0.88rem; }

/* Desktop: lead article side-by-side */
@media (min-width: 769px) {
    .news-article--lead:not(.news-article--text-only) { display: grid; grid-template-columns: 1.2fr 1fr; gap: 1rem; align-items: start; }
    .news-article--lead .news-article__image { margin-bottom: 0; }
}

/* Mobile */
@media (max-width: 640px) {
    .news-page__title { font-size: 1.25rem; }
    .news-scope-section__heading { font-size: 0.94rem; }
    .news-article__source { font-size: 0.94rem; }
    .news-article__date { font-size: 0.94rem; }
    .news-article__summary { font-size: 0.94rem; }
    .news-article__link { font-size: 0.94rem; }
    .news-article--lead .news-article__title { font-size: 1.15rem; }
    .news-article--lead .news-article__summary { font-size: 0.94rem; }
    .news-article__title { font-size: 0.95rem; }
    .news-article--with-thumb { grid-template-columns: 1fr 70px; }
    .news-article__thumb img { width: 70px; height: 50px; }
    /* Session 11+49: bump "View all N stories" to 0.93rem phone floor (15px root → ~14px) */
    .news-scope-section__more { font-size: 0.93rem; }
}

/* ── Dark mode ── */
html[data-theme="dark"] .news-page__title { color: var(--dk-text-heading, #f0f0f2); }
html[data-theme="dark"] .news-page .rss-link { color: var(--dk-text-muted, #8e8e9a); }
html[data-theme="dark"] .news-page .rss-link:hover { color: var(--dk-link, #7ab4d9); }
html[data-theme="dark"] .news-scope-section__heading { color: var(--dk-link, #7ab4d9); border-bottom-color: var(--dk-border, #2e2e3a); }
html[data-theme="dark"] .news-article { border-bottom-color: var(--dk-border, #2e2e3a); }
html[data-theme="dark"] .news-article--lead { border-bottom-color: var(--dk-border, #2e2e3a); }
html[data-theme="dark"] .news-article--lead .news-article__title { color: var(--dk-text-heading, #f0f0f2); }
html[data-theme="dark"] .news-article--lead .news-article__summary { color: var(--dk-text, #e2e2e6); }
html[data-theme="dark"] .news-article--text-only { border-left-color: var(--dk-link, #7ab4d9); }
html[data-theme="dark"] .news-article__title { color: var(--dk-text-heading, #f0f0f2); }
html[data-theme="dark"] .news-article__title a { color: var(--dk-text-heading, #f0f0f2); }
html[data-theme="dark"] .news-article__title a:hover { color: var(--dk-link, #7ab4d9); }
html[data-theme="dark"] .news-article__title a:visited { color: #9a9aa4; }
html[data-theme="dark"] .news-article__date { color: var(--dk-text-muted, #8e8e9a); }
html[data-theme="dark"] .news-article__source { color: var(--dk-link, #7ab4d9); }
html[data-theme="dark"] .news-article__summary { color: var(--dk-text-muted, #8e8e9a); }
html[data-theme="dark"] .news-article__link { color: var(--dk-link, #7ab4d9); }
html[data-theme="dark"] .news-load-more { background: var(--dk-surface, #1c1c22); border-color: var(--dk-border, #2e2e3a); color: var(--dk-link, #7ab4d9); }
html[data-theme="dark"] .news-load-more:hover { background: var(--dk-surface-raised, #242430); }
html[data-theme="dark"] .news-load-more__count { color: var(--dk-text-muted, #8e8e9a); }
html[data-theme="dark"] .news-scope-section__more { color: var(--dk-link, #7ab4d9); }

/* ── Loading state during HTMX tab switch ── */
#news-content { transition: opacity 0.15s ease; }
.news-content--loading { opacity: 0.45; pointer-events: none; }
