/* KE News content styles.
 *
 * Layers on top of assets/css/site-chrome.css and uses its design tokens
 * (Poppins, brand red family, ink greys, white cards on #f7f8fa). Chrome
 * classes live there; everything page-specific lives here.
 */

/* Match the main site's 1260px container (measured on the live
   keywordseverywhere.com pages, 2026-07-08, at the user's request; was
   980px). Overrides the chrome's 1140px cap project-wide so header, hero,
   sub-nav, content and footer all share one alignment. */
.container {
    max-width: 1260px;
}

/* ========================================================================
   Section sub-nav (under the hero, on every page)
   ======================================================================== */
.news-subnav {
    border-bottom: 1px solid var(--ink-200);
    margin-bottom: 4px;
}
.news-subnav ul {
    list-style: none;
    display: flex;
    gap: 2px;
    /* -1px lets the active link's 2px underline overlap the subnav's
       border-bottom. It must sit HERE, not on the links: inside the
       scroll container it would overflow by 1px, and with overflow-x
       auto the computed overflow-y is also auto, so that 1px painted a
       vertical scrollbar on classic-scrollbar platforms. */
    margin: 0 0 -1px;
    padding: 0;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
}
.news-subnav li {
    flex-shrink: 0;
}
.news-subnav a {
    display: inline-block;
    padding: 8px 12px 10px;
    font-size: 13.5px;
    font-weight: 400;
    color: var(--ink-500);
    border-bottom: 2px solid transparent;
    white-space: nowrap;
}
.news-subnav a:hover {
    color: var(--brand-red);
}
.news-subnav a.is-active {
    color: var(--brand-red);
    font-weight: 600;
    border-bottom-color: var(--brand-red);
}

/* ========================================================================
   Main column + shared text
   ======================================================================== */
.news-main {
    padding: 18px 0 56px;
}
.news-main h2 {
    font-size: 20px;
    font-weight: 600;
    color: var(--ink);
    margin: 34px 0 12px;
    letter-spacing: -0.2px;
}
.news-main h3 {
    font-size: 16.5px;
    font-weight: 600;
    color: var(--ink);
    margin: 22px 0 8px;
}
.news-main p,
.news-main li {
    font-size: 15px;
    line-height: 1.65;
}
.news-main a {
    color: var(--link);
}
.news-main a:hover {
    color: var(--link-dark);
}

.news-breadcrumb {
    font-size: 13.5px;
    margin: 4px 0 10px;
}
.news-lede {
    font-size: 17px;
    font-weight: 400;
    color: var(--ink-700);
    line-height: 1.6;
    margin: 10px 0 18px;
}

/* ========================================================================
   Meta line: last-updated + live status chip
   ======================================================================== */
.news-meta-line {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin: 6px 0 16px;
}
.news-updated,
.news-checked {
    font-size: 13.5px;
    color: var(--ink-500);
}
.news-updated time,
.news-checked time {
    font-weight: 600;
    color: var(--ink-700);
}
.news-status {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 12.5px;
    font-weight: 600;
    background: var(--good-bg);
    color: var(--good-fg);
}
.news-status--active {
    background: var(--mid-bg);
    color: var(--mid-fg);
}
.news-status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor;
    flex-shrink: 0;
}
@keyframes ke-status-pulse {
    0%   { box-shadow: 0 0 0 0 rgba(146, 64, 14, 0.4); }
    70%  { box-shadow: 0 0 0 6px rgba(146, 64, 14, 0); }
    100% { box-shadow: 0 0 0 0 rgba(146, 64, 14, 0); }
}
.news-status--active .news-status-dot {
    animation: ke-status-pulse 2s ease-out infinite;
}
@media (prefers-reduced-motion: reduce) {
    .news-status--active .news-status-dot {
        animation: none;
    }
}

/* ========================================================================
   "What changed" / "This week in search" boxes
   ======================================================================== */
.news-what-changed {
    background: #fff;
    border: 1px solid var(--ink-100);
    border-radius: var(--r);
    box-shadow: var(--shadow-sm);
    padding: 16px 20px;
    margin: 0 0 22px;
}
.news-what-changed h2 {
    display: flex;
    align-items: center;
    gap: 7px;
    margin: 0 0 8px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: var(--brand-red);
}
.news-what-changed ul {
    list-style: none;
    margin: 0;
    padding: 0;
}
.news-what-changed li {
    padding: 5px 0;
    font-size: 14.5px;
}
.news-what-changed li time {
    font-weight: 600;
    color: var(--ink-500);
    font-size: 13px;
    margin-right: 6px;
    font-feature-settings: var(--tnum);
}
.news-wc-summary {
    color: var(--ink-500);
    display: block;
    font-size: 13.5px;
    margin-top: 1px;
}
.news-week-of {
    margin: -4px 0 8px;
    font-size: 13px;
    color: var(--ink-500);
}

/* ========================================================================
   Hub directory cards (/news/ front door)
   ======================================================================== */
.news-hub-grid {
    display: grid;
    /* auto-fit (not auto-fill) so empty tracks collapse and the cards
       always fill the row at the 1260px container width. */
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 14px;
    margin: 8px 0 10px;
}
.news-hub-card {
    display: block;
    background: #fff;
    border: 1px solid var(--ink-100);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-xs);
    padding: 16px 18px;
    color: inherit;
    transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.news-hub-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
    color: inherit;
}
/* Icon and title sit on one row, vertically centered. */
.news-hub-card-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}
.news-hub-card-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    flex-shrink: 0;
}
.news-hub-card h2 {
    margin: 0;
    font-size: 15.5px;
    font-weight: 600;
    color: var(--brand-red);
}
.news-hub-card p {
    margin: 0 0 10px;
    font-size: 13.5px;
    line-height: 1.5;
    color: var(--ink-500);
}
.news-hub-card-updated {
    font-size: 12.5px;
    color: var(--ink-500);
}

/* ========================================================================
   Tables (history, availability, stats)
   ======================================================================== */
.news-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    background: #fff;
    border: 1px solid var(--ink-100);
    border-radius: var(--r);
    box-shadow: var(--shadow-xs);
    margin: 12px 0 8px;
}
.news-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}
.news-table th {
    text-align: left;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    color: var(--ink-500);
    background: var(--ink-25);
    padding: 10px 14px;
    border-bottom: 1px solid var(--ink-200);
    white-space: nowrap;
}
.news-table td {
    padding: 9px 14px;
    border-bottom: 1px solid var(--ink-100);
    vertical-align: top;
    font-feature-settings: var(--tnum);
}
.news-table tbody tr:last-child td {
    border-bottom: 0;
}
.news-table tbody tr:nth-child(even) {
    background: var(--ink-25);
}
.news-table tbody tr:hover {
    background: var(--ink-50);
}
.news-table td:first-child {
    white-space: nowrap;
}
/* Dates in table cells render as <time> (see ke_news_format_date_cell)
   and must never wrap mid-date. */
.news-table time {
    white-space: nowrap;
}

/* Colored-dot type badges inside opted-in tables (the dot carries the
   hue, the text stays ink, so color never works alone). */
.news-type-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 2px 9px 2px 8px;
    border: 1px solid var(--ink-100);
    border-radius: 999px;
    background: #fff;
    font-size: 12px;
    font-weight: 600;
    color: var(--ink-700);
    white-space: nowrap;
}
.news-type-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* ========================================================================
   Entry stream
   ======================================================================== */
.news-entries {
    margin-top: 10px;
}
.news-entry,
.news-index-item {
    background: #fff;
    border: 1px solid var(--ink-100);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-xs);
    padding: 18px 22px;
    margin: 0 0 14px;
}
/* Hub entries: calendar date chip on the left, content on the right. */
.news-entry {
    display: grid;
    grid-template-columns: 60px minmax(0, 1fr);
    gap: 4px 18px;
}
.news-entry-main {
    position: relative;
    min-width: 0;
}
.news-entry-datechip {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    align-self: start;
    width: 60px;
    padding: 8px 4px 7px;
    background: var(--ink-25);
    border: 1px solid var(--ink-100);
    border-radius: var(--r-sm);
    line-height: 1.15;
    text-align: center;
}
.news-entry-datechip-day {
    font-size: 21px;
    font-weight: 700;
    color: var(--ink);
}
.news-entry-datechip-my {
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    color: var(--ink-500);
    margin-top: 2px;
    white-space: nowrap;
}
.news-entry-head {
    display: flex;
    align-items: center;
    gap: 10px;
}
.news-entry .news-entry-head {
    margin-bottom: 6px;
}
.news-entry-head time {
    font-size: 13px;
    font-weight: 600;
    color: var(--ink-500);
    font-feature-settings: var(--tnum);
}
.news-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 2px 9px;
    border-radius: 999px;
    background: var(--ink-100);
    color: var(--ink-700);
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: 0.3px;
}
.news-chip-dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
}
.news-anchor-link {
    position: absolute;
    top: 0;
    right: 0;
    padding: 2px 4px;
    color: var(--ink-300);
    font-weight: 600;
    text-decoration: none;
}
.news-entry:hover .news-anchor-link {
    color: var(--ink-400);
}
.news-anchor-link:hover {
    color: var(--brand-red) !important;
}
.news-entry-title {
    margin: 0 0 6px !important;
    padding-right: 24px;
    font-size: 17px;
}
.news-entry-body p {
    margin: 8px 0;
    font-size: 14.5px;
}
.news-entry-body p:last-child {
    margin-bottom: 0;
}
.news-entry:target,
.news-index-item:target {
    border-color: var(--brand-red-light);
    box-shadow: 0 0 0 3px var(--brand-red-tint), var(--shadow-sm);
}

.news-ke-angle {
    background: var(--brand-red-soft);
    border-radius: var(--r-sm);
    padding: 10px 14px;
    margin: 12px 0 4px;
}
.news-ke-angle-label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.7px;
    text-transform: uppercase;
    color: var(--brand-red);
    margin-bottom: 4px;
}
.news-ke-angle p {
    margin: 4px 0;
    font-size: 14px;
}

.news-entry-foot {
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid var(--ink-100);
    font-size: 13px;
    color: var(--ink-500);
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
}
.news-entry-more {
    font-weight: 600;
}

.news-index-item h3 {
    margin: 8px 0 4px;
    font-size: 16px;
}
.news-index-item p {
    margin: 0;
    font-size: 14px;
    color: var(--ink-500);
}

/* Archive of older entries */
.news-archive {
    margin-top: 18px;
}
.news-archive > summary {
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: var(--ink-500);
    padding: 10px 0;
}
.news-archive > summary:hover {
    color: var(--brand-red);
}
.news-archive[open] > summary {
    margin-bottom: 10px;
}

/* ========================================================================
   Evergreen sections, FAQ, timeline, sources
   ======================================================================== */
.news-section ul,
.news-section ol {
    padding-left: 22px;
}

.news-faq-item {
    background: #fff;
    border: 1px solid var(--ink-100);
    border-radius: var(--r);
    padding: 14px 18px;
    margin-bottom: 10px;
}
.news-faq-item h3 {
    margin: 0 0 6px;
    font-size: 15.5px;
}
.news-faq-answer p {
    margin: 6px 0;
    font-size: 14.5px;
}

.news-timeline {
    list-style: none;
    margin: 0;
    padding: 0;
    border-left: 2px solid var(--ink-200);
}
.news-timeline li {
    position: relative;
    padding: 0 0 16px 20px;
}
.news-timeline li::before {
    content: "";
    position: absolute;
    left: -6px;
    top: 6px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--brand-red-light);
}
.news-timeline time {
    font-size: 13px;
    font-weight: 600;
    color: var(--ink-500);
    font-feature-settings: var(--tnum);
}
.news-timeline-body {
    font-size: 14.5px;
}
.news-timeline-body p {
    margin: 4px 0;
}

.news-sources-list li {
    font-size: 14px;
    padding: 2px 0;
}

/* ========================================================================
   Graphics layer: inline SVG icons, key-numbers row, timeline strip
   (2026-07-08 design pass; palette CVD-validated, see includes/news.php)
   ======================================================================== */
.news-icon {
    flex-shrink: 0;
}
.news-faq > h2 {
    display: flex;
    align-items: center;
    gap: 8px;
}
.news-faq > h2 .news-icon {
    color: var(--brand-red);
}
.news-tip-box > .news-icon {
    vertical-align: -3px;
    margin-right: 4px;
    color: var(--ink-400);
}

/* Key-numbers row (stat tiles) under the meta line on hub pages. */
.news-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 12px;
    margin: 0 0 22px;
}
.news-stat {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid var(--ink-100);
    border-radius: var(--r);
    box-shadow: var(--shadow-xs);
    padding: 14px 18px 12px;
}
.news-stat-value {
    font-size: 30px;
    font-weight: 600;
    letter-spacing: -0.5px;
    line-height: 1.1;
    color: var(--ink);
}
.news-stat-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--ink-700);
    margin-top: 5px;
    line-height: 1.35;
}
.news-stat-sub {
    font-size: 12.5px;
    color: var(--ink-500);
    margin-top: 2px;
    line-height: 1.35;
}

/* Swimlane timeline strip above opted-in history tables. The SVG keeps a
   fixed 1000-unit viewBox and scales with the container; below 820px it
   scrolls horizontally like the tables do. */
.news-strip-wrap {
    background: #fff;
    border: 1px solid var(--ink-100);
    border-radius: var(--r);
    box-shadow: var(--shadow-xs);
    padding: 12px 16px 8px;
    margin: 12px 0 14px;
}
.news-strip-wrap figcaption {
    font-size: 13px;
    color: var(--ink-500);
    margin: 0 0 6px;
}
.news-strip-scroll {
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
}
.news-strip {
    display: block;
    width: 100%;
    min-width: 820px;
    height: auto;
}
.news-strip text {
    font-family: inherit;
}
.news-strip-hit {
    cursor: pointer;
}
/* The child pages' duration-comparison chart is narrower than the decade
   strips; let it shrink further before scrolling. */
.news-strip--compact {
    min-width: 640px;
}
/* Floating tooltip for the strip dots (built by assets/js/news.js). */
.news-strip-tip {
    position: fixed;
    z-index: 200;
    pointer-events: none;
    background: var(--ink, #14181d);
    color: #fff;
    border-radius: 8px;
    padding: 7px 11px 8px;
    font-size: 12.5px;
    line-height: 1.45;
    max-width: 320px;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    transition: opacity 0.12s ease;
}
.news-strip-tip.is-visible {
    opacity: 1;
}
.news-strip-tip strong {
    display: block;
    font-size: 13px;
}
.news-strip-tip span {
    color: var(--ink-300);
}

/* ========================================================================
   Page foot: byline, tip box, cite box, links
   ======================================================================== */
.news-page-foot {
    margin-top: 40px;
    padding-top: 18px;
    border-top: 1px solid var(--ink-200);
}
.news-byline {
    font-size: 14px;
    color: var(--ink-500);
    margin-bottom: 12px;
}
.news-tip-box {
    background: #fff;
    border: 1px dashed var(--ink-300);
    border-radius: var(--r);
    padding: 12px 16px;
    font-size: 14px;
    color: var(--ink-700);
    margin-bottom: 12px;
}
.news-cite-box {
    font-size: 13px;
    color: var(--ink-500);
    margin-bottom: 12px;
}
.news-cite-box code {
    display: block;
    margin-top: 6px;
    background: var(--ink-50);
    border: 1px solid var(--ink-100);
    border-radius: var(--r-sm);
    padding: 8px 12px;
    font-family: var(--mono);
    font-size: 12px;
    line-height: 1.6;
    color: var(--ink-700);
    cursor: pointer;
    word-break: break-word;
}
.news-cite-box code.is-copied {
    border-color: var(--good-fg);
    box-shadow: 0 0 0 3px var(--good-bg);
}
.news-foot-links {
    font-size: 13.5px;
    color: var(--ink-500);
}

/* ========================================================================
   Mobile (project convention: 640px and 420px)
   ======================================================================== */
/* ========================================================================
   Author bio card (/news/author/...)
   ======================================================================== */
.news-author-card {
    display: flex;
    gap: 18px;
    align-items: flex-start;
    background: #fff;
    border: 1px solid var(--ink-100);
    border-radius: var(--r);
    padding: 18px;
    margin: 14px 0 18px;
}
.news-author-card img {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}
.news-author-card p {
    margin: 0 0 10px;
}
.news-author-card p:last-child {
    margin-bottom: 0;
}
@media (max-width: 480px) {
    .news-author-card {
        flex-direction: column;
        align-items: center;
        text-align: left;
    }
}

@media (max-width: 640px) {
    /* Hint that the sub-nav scrolls horizontally when it overflows. */
    .news-subnav .container {
        position: relative;
    }
    .news-subnav .container::after {
        content: "";
        position: absolute;
        top: 0;
        right: 0;
        bottom: 0;
        width: 28px;
        background: linear-gradient(to right, rgba(247, 248, 250, 0), #f7f8fa);
        pointer-events: none;
    }
    .news-main {
        padding: 12px 0 44px;
    }
    .news-main h2 {
        font-size: 18px;
        margin-top: 26px;
    }
    .news-entry,
    .news-index-item {
        padding: 14px 16px;
    }
    .news-entry-title {
        font-size: 15.5px;
    }
    .news-table {
        font-size: 13px;
    }
    .news-table th,
    .news-table td {
        padding: 8px 10px;
    }
    .news-hub-grid {
        grid-template-columns: 1fr 1fr;
    }
    .news-entry {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    .news-entry-datechip {
        flex-direction: row;
        align-self: flex-start;
        width: auto;
        gap: 6px;
        padding: 3px 10px;
    }
    .news-entry-datechip-day {
        font-size: 13px;
    }
    .news-entry-datechip-my {
        margin-top: 0;
        font-size: 11px;
    }
    .news-stats {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }
    .news-stat {
        padding: 12px 14px 10px;
    }
    .news-stat-value {
        font-size: 24px;
    }
}

@media (max-width: 420px) {
    .news-hub-grid {
        grid-template-columns: 1fr;
    }
    .news-meta-line {
        gap: 6px;
    }
}
