/* =====================================================
   NEWS — extends /style.css (tokens, navbar, footer, card)
   ===================================================== */
.skip-link {
    position: absolute;
    left: 16px;
    top: -60px;
    z-index: 200;
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    background: var(--bg-surface);
    color: var(--text-primary);
    border: 1px solid var(--border-accent);
}
.skip-link:focus { top: 12px; }

.news-page #site-circuit-bg {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
}
.news-page .navbar { background: var(--nav-bg); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border-bottom: 1px solid var(--border); }
.navbar__link--active { color: var(--text-primary); background: var(--accent-dim); }

.news-main { padding-top: var(--nav-height); position: relative; z-index: 1; }
.news-main a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

/* Meta line (date + label); uses --text-secondary for AA contrast in both themes */
.news-meta { font-size: 0.85rem; font-weight: 500; color: var(--text-secondary); display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.news-meta__label { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); }

/* ── Index ── */
.news-index .section-header { margin-bottom: 48px; }
.news-list { list-style: none; display: grid; gap: 24px; }
.news-card { display: grid; grid-template-columns: 280px 1fr; gap: 28px; align-items: start; padding: 22px; }
.news-card__thumb img { width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; border-radius: var(--radius-md); border: 1px solid var(--border); }
.news-card__title { font-size: clamp(1.15rem, 2.4vw, 1.4rem); font-weight: 700; line-height: 1.3; margin: 6px 0 10px; }
.news-card__title a { color: var(--text-primary); }
.news-card__title a:hover { color: var(--accent); }
.news-card__tldr { color: var(--text-secondary); font-size: 0.95rem; margin-bottom: 12px; }
.news-card__more { font-weight: 600; font-size: 0.9rem; color: var(--accent); }

/* ── Article ── */
.news-article { max-width: 780px; padding-top: 40px; padding-bottom: 80px; }
.news-breadcrumb { margin-bottom: 28px; font-size: 0.9rem; }
.news-breadcrumb a, .news-back a { color: var(--accent); font-weight: 600; }
.news-article__title { font-size: clamp(1.7rem, 4.4vw, 2.5rem); font-weight: 800; line-height: 1.18; margin: 10px 0 14px; color: var(--text-primary); }
.news-tldr { margin: 28px 0; padding: 18px 22px; border-left: 4px solid var(--accent); background: var(--abstract-bg); border-radius: 0 var(--radius-md) var(--radius-md) 0; }
.news-tldr__heading { font-size: 0.8rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); margin-bottom: 6px; }
.news-tldr ul, .news-body ul { list-style: disc; padding-left: 1.3em; }
.news-tldr li { color: var(--text-primary); font-size: 1.05rem; }

.news-figure { margin: 32px 0; }
.news-figure img { width: 100%; height: auto; border-radius: var(--radius-md); border: 1px solid var(--border); background: #fff; }
.news-figure figcaption { margin-top: 10px; font-size: 0.85rem; font-style: italic; color: var(--text-secondary); text-align: center; }

.news-body { font-size: 1.05rem; line-height: 1.75; color: var(--text-primary); }
.news-body h2 { font-size: clamp(1.25rem, 2.8vw, 1.55rem); font-weight: 700; line-height: 1.3; margin: 44px 0 14px; scroll-margin-top: calc(var(--nav-height) + 16px); }
.news-body p, .news-body li { margin-bottom: 16px; }
.news-body li { margin-bottom: 10px; }
.news-body a, .news-note a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; overflow-wrap: anywhere; }
.news-analysis-heading { padding-top: 24px; border-top: 1px solid var(--border); }
.news-note { margin-top: 36px; font-size: 0.82rem; font-style: italic; color: var(--text-secondary); }
.news-back { margin-top: 28px; }

@media (max-width: 720px) {
    .news-card { grid-template-columns: 1fr; gap: 16px; padding: 18px; }
    .news-article { padding-top: 24px; }
    .news-body { font-size: 1rem; }
    .news-index { padding: 56px 0; }
}

/* ── End-of-article "More from News & Blog" ── */
.news-next { margin-top: 56px; padding-top: 28px; border-top: 1px solid var(--border); }
.news-next__heading { font-size: 0.8rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); margin-bottom: 18px; }
.news-next__list { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.news-next__link { display: flex; flex-direction: column; gap: 10px; height: 100%; padding: 12px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--bg-card); color: var(--text-primary); transition: border-color var(--transition), background var(--transition), transform var(--transition); }
.news-next__link:hover { border-color: var(--border-accent); background: var(--bg-card-hover); transform: translateY(-2px); }
.news-next__thumb { width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; border-radius: var(--radius-sm); border: 1px solid var(--border); }
.news-next__text { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.news-next__date { font-size: 0.78rem; font-weight: 500; color: var(--text-secondary); }
.news-next__title { font-size: 0.95rem; font-weight: 600; line-height: 1.35; }
.news-next__link:hover .news-next__title { color: var(--accent); }
.news-next__more { display: flex; flex-wrap: wrap; gap: 10px 24px; margin-top: 22px; font-size: 0.92rem; }
.news-next__more a { color: var(--accent); font-weight: 600; }

@media (max-width: 720px) {
    .news-next { margin-top: 44px; }
    .news-next__list { grid-template-columns: 1fr; gap: 12px; }
    .news-next__link { flex-direction: row; align-items: center; gap: 14px; padding: 10px; }
    .news-next__thumb { width: 96px; flex-shrink: 0; }
    .news-next__more { flex-direction: column; gap: 10px; }
}


/* ── Comparison / in-article data tables ── */
.news-table-figure { margin: 32px 0; }
.news-table-wrap {
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--bg-surface);
}
.news-table-wrap:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.news-table {
    width: 100%;
    min-width: 44rem;
    border-collapse: collapse;
    font-size: 0.86rem;
    line-height: 1.45;
    color: var(--text-primary);
}
.news-table th, .news-table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border);
    text-align: left;
    vertical-align: top;
}
.news-table thead th {
    background: var(--accent-dim);
    font-weight: 700;
    vertical-align: bottom;
}
.news-table th[scope="row"],
.news-table thead th:first-child {
    position: sticky;
    left: 0;
    z-index: 1;
    min-width: 7.5rem;
    max-width: 11rem;
    background: var(--bg-surface);
    box-shadow: 4px 0 8px -6px rgba(0, 0, 0, 0.35);
}
.news-table thead th:first-child {
    z-index: 2;
    background: color-mix(in srgb, var(--accent-dim) 80%, var(--bg-surface));
}
.news-table tbody tr:last-child th,
.news-table tbody tr:last-child td { border-bottom: 0; }
.news-table-figure figcaption {
    margin-top: 10px;
    font-size: 0.85rem;
    font-style: italic;
    color: var(--text-secondary);
    text-align: left;
}
.news-table-fallback { margin-top: 8px; font-size: 0.85rem; }
.news-table-fallback a { color: var(--accent); font-weight: 600; }

@media (max-width: 720px) {
    .news-table { font-size: 0.82rem; }
}
