/* ============================================================
   /news — single-card feed that reuses the showcase visual system
   ============================================================ */

[hidden] {
    display: none !important;
}

.news {
    padding-top: 150px;
}

body[data-page="news"] .section-title {
    opacity: 1;
    transform: none;
}

.news-subtitle {
    max-width: 640px;
    margin-top: -1.5rem;
    margin-bottom: 2.5rem;
    font-size: 1.05rem;
    line-height: 1.7;
    opacity: 0.65;
}

/* Solid surface without backdrop-filter so glassmorphism stays capped to nav + modal (R-10). */
.news-feed {
    padding: 0;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.2);
}

.news-entry {
    display: block;
    width: 100%;
    padding: 1.5rem 1.75rem;
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: transparent;
    color: var(--text-color);
    text-align: left;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.25s ease;
}

.news-entry:last-child {
    border-bottom: none;
}

.news-entry:hover {
    background: rgba(255, 255, 255, 0.04);
}

.news-entry:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: -2px;
}

.news-entry-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.6rem;
}

/* Functional category tag: differentiates article domain without decorative pill styling (R-09). */
.news-label {
    display: inline-flex;
    align-items: center;
    padding: 0.22rem 0.6rem;
    border-radius: 6px;
    background: rgba(255, 51, 102, 0.14);
    color: var(--accent-color);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.news-label.is-ai {
    background: rgba(59, 130, 246, 0.14);
    color: #60a5fa;
}

.news-date {
    font-size: 0.75rem;
    letter-spacing: 0.03em;
    opacity: 0.65;
}

.news-entry h2,
.news-entry h3 {
    margin-bottom: 0.45rem;
    font-size: 1.15rem;
    line-height: 1.4;
    font-weight: 600;
}

.news-entry p {
    margin: 0;
    font-size: 0.92rem;
    line-height: 1.7;
    opacity: 0.72;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Pagination */
.news-pagination {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.75rem 1rem;
    margin-top: 1.5rem;
}

.news-page-btn {
    min-width: 44px;
    min-height: 44px;
    padding: 0.55rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-color);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.news-page-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.28);
}

.news-page-btn:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

.news-page-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.news-page-status {
    font-size: 0.85rem;
    opacity: 0.72;
}

/* Status / empty state */
.news-empty {
    padding: 4rem 1.5rem;
    text-align: center;
    line-height: 1.7;
    opacity: 0.6;
}

.news-empty a {
    color: var(--accent-color);
}

.news-status {
    margin-top: 1.5rem;
    text-align: center;
    font-size: 0.8rem;
    letter-spacing: 0.04em;
    opacity: 0.72;
}

/* Functional status banner shown only when ?preview=1 renders local unpublished drafts (R-09). */
.news-preview-badge {
    display: inline-block;
    margin-bottom: 2rem;
    padding: 0.5rem 0.9rem;
    border: 1px solid rgba(245, 158, 11, 0.45);
    border-radius: 8px;
    background: rgba(245, 158, 11, 0.08);
    color: #f59e0b;
    font-size: 0.82rem;
    font-weight: 600;
}

.logo {
    color: var(--text-color);
    text-decoration: none;
}

.nav-links a.is-current::after {
    width: 100%;
}

@media (max-width: 768px) {
    .news {
        padding-top: 120px;
    }

    .news-subtitle {
        margin-top: -1rem;
        font-size: 0.98rem;
    }

    .news-entry {
        padding: 1.25rem 1.1rem;
    }

    .news-entry h2,
.news-entry h3 {
        font-size: 1.02rem;
    }
}

html[data-theme="light"] .news-feed {
    background: #ffffff;
    border-color: rgba(0, 0, 0, 0.08);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.06);
}

html[data-theme="light"] .news-subtitle,
html[data-theme="light"] .news-status,
html[data-theme="light"] .news-empty,
html[data-theme="light"] .news-date,
html[data-theme="light"] .news-entry p,
html[data-theme="light"] .news-page-status {
    color: #000000;
}

html[data-theme="light"] .news-entry {
    border-bottom-color: rgba(0, 0, 0, 0.08);
    color: #000000;
}

html[data-theme="light"] .news-entry:hover {
    background: rgba(0, 0, 0, 0.03);
}

html[data-theme="light"] .news-status {
    opacity: 0.72;
}

html[data-theme="light"] .news-empty {
    opacity: 0.72;
}

html[data-theme="light"] .news-label {
    color: #c81042;
    background: rgba(200, 16, 66, 0.1);
}

html[data-theme="light"] .news-label.is-ai {
    color: #1d4ed8;
    background: rgba(29, 78, 216, 0.1);
}

html[data-theme="light"] .news-preview-badge {
    color: #92400e;
    background: rgba(245, 158, 11, 0.14);
    border-color: rgba(180, 83, 9, 0.45);
}

html[data-theme="light"] .news-page-btn {
    border-color: rgba(0, 0, 0, 0.15);
    background: #ffffff;
    color: #000000;
}

html[data-theme="light"] .news-page-btn:hover:not(:disabled) {
    background: rgba(0, 0, 0, 0.04);
}

html[data-theme="light"] .logo {
    color: #000000;
}

/* ============================================================
   Standalone article page (/news/<slug>/)
   ============================================================ */

.news-article-back {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    min-height: 44px;
    padding: 0.5rem 0.25rem;
    margin-bottom: 1.25rem;
    color: var(--text-color);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    opacity: 0.8;
    cursor: pointer;
    transition: opacity 0.2s ease, color 0.2s ease;
}

.news-article-back:hover {
    opacity: 1;
    color: var(--accent-color);
}

.news-article-back:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
    border-radius: 6px;
}

.news-article {
    padding: 2.25rem 2.5rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.2);
}

.news-article-header {
    padding-bottom: 1.5rem;
    margin-bottom: 1.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.news-article-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.news-article-title {
    font-family: 'Syncopate', sans-serif;
    font-size: clamp(1.35rem, 2.8vw, 2.1rem);
    line-height: 1.3;
    color: var(--accent-color);
    margin-bottom: 1rem;
    overflow-wrap: break-word;
}

.news-article-excerpt {
    font-size: 1.02rem;
    line-height: 1.7;
    opacity: 0.86;
    margin: 0;
}

.news-article-figure {
    margin: 1.5rem 0;
}

.news-article-footer {
    margin-top: 2.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    opacity: 1;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.news-article-source {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0.5rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 8px;
    color: var(--text-color);
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.news-article-source:hover {
    border-color: var(--accent-color);
    background: rgba(255, 51, 102, 0.08);
}

.news-article-source:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

.news-article-ai-note {
    font-size: 0.84rem;
    font-style: italic;
    opacity: 0.78;
    margin: 0;
}

@media (max-width: 768px) {
    .news-article {
        padding: 1.4rem 1.15rem;
    }

    .news-article-title {
        font-size: 1.25rem;
    }
}

html[data-theme="light"] .news-article {
    background: #ffffff;
    border-color: rgba(0, 0, 0, 0.08);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.06);
}

html[data-theme="light"] .news-article-header,
html[data-theme="light"] .news-article-footer {
    border-color: rgba(0, 0, 0, 0.1);
}

html[data-theme="light"] .news-article-back,
html[data-theme="light"] .news-article-excerpt,
html[data-theme="light"] .news-article-ai-note {
    color: #000000;
}

html[data-theme="light"] .news-article-source {
    color: #000000;
    border-color: rgba(0, 0, 0, 0.18);
}

html[data-theme="light"] .news-article-source:hover {
    background: rgba(255, 51, 102, 0.08);
}

