/* ==========================================================================
   News  (list + article)
   Builds on the site variables in custom.css (--primary-color, --accent-color,
   --text-color, --accent-font, --default-font) and mirrors outreach.css.
   ========================================================================== */

.nw-page {
    --nw-ink: var(--primary-color, #021708);
    --nw-accent: var(--accent-color, #F26B0F);
    --nw-text: var(--text-color, #495762);
    --nw-surface: #F2F4F3;
    --nw-line: rgba(2, 23, 8, .12);
    --nw-radius-lg: 18px;
    --nw-radius-sm: 10px;
    padding: 80px 0 110px;
    background: var(--white-color, #fff);
}

.nw-page :focus-visible {
    outline: 3px solid var(--nw-accent);
    outline-offset: 3px;
    border-radius: 4px;
}

.nw-page a { text-decoration: none; }

/* ---------- Shared meta line ---------- */

.nw-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 16px;
    margin: 0 0 12px;
    font-size: 14px;
    line-height: 1.4;
    color: var(--nw-text);
}

.nw-meta time { font-weight: 600; color: var(--nw-ink); }

.nw-source {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.nw-source--ext { color: var(--nw-accent); font-weight: 600; }
.nw-source--ext i { font-size: 11px; }

/* ---------- Buttons ---------- */

.nw-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 24px;
    border-radius: 999px;
    background: var(--nw-accent);
    color: #fff;
    font-weight: 700;
    font-size: 15px;
    line-height: 1;
    transition: background-color .2s ease, color .2s ease;
}

.nw-btn:hover { background: #fff; color: var(--nw-ink); }
.nw-btn i { font-size: 12px; }

/* ---------- Lead story ---------- */

.nw-lead {
    display: grid;
    grid-template-columns: minmax(0, 1.9fr) minmax(0, 1fr);
    grid-template-areas:
        "media runners"
        "panel runners";
    column-gap: 40px;
    margin-bottom: 90px;
}

.nw-lead-media {
    grid-area: media;
    display: block;
    aspect-ratio: 3 / 2;
    overflow: hidden;
    border-radius: var(--nw-radius-lg);
    background: var(--nw-ink);
}

.nw-lead-media img,
.nw-runner-media img,
.nw-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .6s cubic-bezier(.2, .7, .2, 1);
}

.nw-lead-panel {
    grid-area: panel;
    position: relative;
    z-index: 1;
    margin: -96px 0 0 clamp(20px, 4vw, 48px);
    max-width: 640px;
    padding: 34px 38px 36px;
    background: var(--nw-ink);
    color: #fff;
    border-radius: var(--nw-radius-lg);
}

.nw-lead-kicker {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 14px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
    color: rgba(255, 255, 255, .75);
}

.nw-lead-kicker::before {
    content: '';
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--nw-accent);
    box-shadow: 0 0 0 5px rgba(242, 107, 15, .25);
}

.nw-lead-panel h2 {
    font-size: clamp(26px, 2.7vw, 38px);
    font-weight: 800;
    line-height: 1.12;
    letter-spacing: -0.015em;
    color: #fff;
    margin: 0 0 14px;
}

.nw-lead-panel h2 a { color: inherit; }
.nw-lead-panel h2 a:hover { color: var(--nw-accent); }

.nw-lead-panel .nw-meta,
.nw-lead-panel .nw-meta time { color: rgba(255, 255, 255, .8); }
.nw-lead-panel .nw-source--ext { color: #FFB27D; }

.nw-lead-excerpt {
    max-width: 60ch;
    margin: 0 0 24px;
    font-size: 16px;
    line-height: 1.65;
    color: rgba(255, 255, 255, .82);
}

.nw-runners {
    grid-area: runners;
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.nw-runner-media {
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    border-radius: var(--nw-radius-sm);
    background: var(--nw-surface);
    margin-bottom: 16px;
}

.nw-runner h3 {
    font-size: 21px;
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -0.01em;
    margin: 0 0 10px;
}

.nw-runner h3 a { color: var(--nw-ink); transition: color 0.2s ease; }

/* ---------- Toolbar: search + years ---------- */

.nw-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px 24px;
    padding: 0 0 26px;
    margin-bottom: 36px;
    border-bottom: 1px solid var(--nw-line);
    scroll-margin-top: 120px;
}

.nw-search {
    position: relative;
    display: flex;
    flex: 1 1 340px;
    max-width: 480px;
}

.nw-search > i {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--nw-text);
    font-size: 15px;
    pointer-events: none;
}

.nw-search input {
    flex: 1 1 0;
    width: 0;
    min-width: 0;
    height: 52px;
    padding: 0 16px 0 48px;
    border: 1px solid var(--nw-line);
    border-right: 0;
    border-radius: 999px 0 0 999px;
    background: var(--nw-surface);
    font-size: 16px;
    color: var(--nw-ink);
}

.nw-search input:focus { outline: none; border-color: var(--nw-ink); background: #fff; }
.nw-search input:focus-visible { outline: none; }
.nw-search:focus-within { border-radius: 999px; box-shadow: 0 0 0 3px rgba(242, 107, 15, .35); }

.nw-search button {
    height: 52px;
    padding: 0 24px;
    border: 0;
    border-radius: 0 999px 999px 0;
    background: var(--nw-ink);
    color: #fff;
    font-weight: 700;
    font-size: 15px;
}

.nw-search button:hover { background: var(--nw-accent); }

.nw-years {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.nw-years a {
    display: inline-flex;
    align-items: center;
    height: 40px;
    padding: 0 16px;
    border: 1px solid var(--nw-line);
    border-radius: 999px;
    font-size: 15px;
    font-weight: 600;
    color: var(--nw-ink);
    transition: border-color .2s ease, background-color .2s ease;
}

.nw-years a:hover { border-color: var(--nw-ink); }
.nw-years a[aria-current="true"] { background: var(--nw-ink); border-color: var(--nw-ink); color: #fff; }

.nw-results {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px 20px;
    margin: -12px 0 32px;
}

.nw-results p { margin: 0; font-size: 17px; line-height: 1.5; color: var(--nw-text); }
.nw-results strong { color: var(--nw-ink); }
.nw-results a { font-weight: 700; color: var(--nw-accent); text-decoration: underline; text-underline-offset: 3px; }

.nw-section-title {
    font-size: 30px;
    font-weight: 800;
    letter-spacing: -0.015em;
    color: var(--nw-ink);
    margin: 0 0 30px;
}

/* ---------- Story grid ---------- */

.nw-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 52px 32px;
}

.nw-card { position: relative; display: flex; flex-direction: column; }

.nw-card-media {
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    border-radius: var(--nw-radius-sm);
    background: var(--nw-surface);
    margin-bottom: 18px;
}

.nw-card h3 {
    font-size: 21px;
    font-weight: 700;
    line-height: 1.28;
    letter-spacing: -0.01em;
    margin: 0 0 10px;
}

.nw-card h3 a { color: var(--nw-ink); transition: color 0.2s ease; }

/* Whole card is clickable via the title link */
.nw-card h3 a::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
}

.nw-card p:not(.nw-meta) {
    margin: 0;
    font-size: 15.5px;
    line-height: 1.6;
    color: var(--nw-text);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.nw-card:hover .nw-card-media img,
.nw-runner:hover .nw-runner-media img,
.nw-lead-media:hover img { transform: scale(1.035); }

.nw-card:hover h3 a,
.nw-runner h3 a:hover {
    color: var(--nw-accent);
}

/* ---------- Empty state ---------- */

.nw-empty {
    max-width: 520px;
    margin: 20px auto;
    padding: 56px 32px;
    text-align: center;
    background: var(--nw-surface);
    border-radius: var(--nw-radius-lg);
}

.nw-empty i { font-size: 34px; color: var(--nw-accent); margin-bottom: 18px; }
.nw-empty h3 { font-size: 24px; color: var(--nw-ink); margin: 0 0 10px; }
.nw-empty p { margin: 0; line-height: 1.6; }
.nw-empty a { color: var(--nw-accent); font-weight: 700; text-decoration: underline; }

/* ---------- Pagination ---------- */

.nw-pagination { margin-top: 64px; }

.nw-pagination ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nw-pagination a,
.nw-pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 46px;
    height: 46px;
    padding: 0 12px;
    border-radius: 999px;
    border: 1px solid var(--nw-line);
    font-weight: 700;
    color: var(--nw-ink);
}

.nw-pagination span { border-color: transparent; }
.nw-pagination a:hover { border-color: var(--nw-ink); }
.nw-pagination a[aria-current="page"] { background: var(--nw-accent); border-color: var(--nw-accent); color: #fff; }

/* ==========================================================================
   Article
   ========================================================================== */

.nw-progress {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    z-index: 1000;
    pointer-events: none;
}

.nw-progress span {
    display: block;
    height: 100%;
    background: var(--accent-color, #F26B0F);
    transform: scaleX(0);
    transform-origin: 0 50%;
}

.nw-detail-header .nw-ph-title {
    display: inline-block;
    font-family: var(--accent-font);
    font-size: 60px;
    font-weight: 800;
    line-height: 1.2em;
    letter-spacing: -0.02em;
    color: var(--white-color, #fff);
    margin: 0 0 15px;
}

.nw-page--article { padding-top: 70px; }

.nw-article-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 64px;
    align-items: start;
}

.nw-article-head { max-width: 820px; margin-bottom: 34px; }

.nw-article-head .nw-meta { font-size: 15px; margin-bottom: 16px; }

.nw-article-head h1 {
    font-size: clamp(32px, 3.6vw, 50px);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.02em;
    color: var(--nw-ink);
    margin: 0 0 26px;
    text-wrap: balance;
}

.nw-article-image {
    margin: 0 0 44px;
    border-radius: var(--nw-radius-lg);
    overflow: hidden;
    background: var(--nw-surface);
}

.nw-article-image img { width: 100%; height: auto; display: block; }

/* ---------- Article body (CKEditor output) ---------- */

.nw-prose {
    max-width: 70ch;
    font-size: 18px;
    line-height: 1.75;
    color: #2E3A33;
}

.nw-prose p { line-height: 1.75; margin: 0 0 1.3em; }
.nw-prose > *:first-child { margin-top: 0; }

.nw-prose h2, .nw-prose h3, .nw-prose h4 {
    color: var(--nw-ink);
    letter-spacing: -0.01em;
    line-height: 1.25;
    margin: 1.8em 0 .6em;
}

.nw-prose h2 { font-size: 30px; }
.nw-prose h3 { font-size: 24px; }
.nw-prose h4 { font-size: 20px; }

.nw-prose a {
    color: var(--nw-ink);
    text-decoration: underline;
    text-decoration-color: var(--nw-accent);
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
}

.nw-prose a:hover { color: var(--nw-accent); }

.nw-prose ul, .nw-prose ol { padding-left: 1.3em; margin: 0 0 1.3em; }
.nw-prose li { margin-bottom: .45em; line-height: 1.7; }
.nw-prose li::marker { color: var(--nw-accent); }

.nw-prose blockquote {
    margin: 1.8em 0;
    padding: 6px 0 6px 26px;
    border-left: 4px solid var(--nw-accent);
    font-family: var(--accent-font);
    font-size: 23px;
    font-weight: 600;
    line-height: 1.45;
    color: var(--nw-ink);
}

.nw-prose blockquote p:last-child { margin-bottom: 0; }

.nw-prose img, .nw-prose video, .nw-prose iframe {
    max-width: 100%;
    height: auto;
    border-radius: var(--nw-radius-sm);
}

.nw-prose figure { margin: 1.8em 0; max-width: 100%; }
.nw-prose figure.image img { display: block; }
.nw-prose figcaption { font-size: 14px; color: var(--nw-text); margin-top: 8px; line-height: 1.5; }

.nw-prose table { width: 100%; border-collapse: collapse; margin: 1.5em 0; font-size: 16px; }
.nw-prose th, .nw-prose td { border-bottom: 1px solid var(--nw-line); padding: 10px 12px; text-align: left; }

/* ---------- Share ---------- */

.nw-share { display: flex; flex-wrap: wrap; gap: 10px; }

.nw-share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    height: 44px;
    padding: 0 18px;
    border: 1px solid var(--nw-line);
    border-radius: 999px;
    background: #fff;
    font-family: var(--default-font);
    font-size: 15px;
    font-weight: 700;
    color: var(--nw-ink);
    cursor: pointer;
    transition: border-color .2s ease, background-color .2s ease, color .2s ease;
}

.nw-share-btn:hover { border-color: var(--nw-ink); color: var(--nw-ink); }
.nw-share-btn[hidden] { display: none; }
.nw-share-icon { width: 44px; padding: 0; }
.nw-share-btn i { font-size: 17px; }

.nw-share-btn--wa { background: #1F7A4D; border-color: #1F7A4D; color: #fff; }
.nw-share-btn--wa:hover { background: #17603C; border-color: #17603C; color: #fff; }

.nw-share-btn.is-done { background: var(--nw-ink); border-color: var(--nw-ink); color: #fff; }

.nw-article-foot {
    max-width: 70ch;
    margin-top: 44px;
    padding: 28px 0 0;
    border-top: 1px solid var(--nw-line);
}

.nw-article-foot p {
    font-family: var(--accent-font);
    font-size: 20px;
    font-weight: 700;
    color: var(--nw-ink);
    margin: 0 0 14px;
}

/* ---------- Previous / next ---------- */

.nw-siblings {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 48px;
}

.nw-sibling {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 22px 24px;
    border-radius: var(--nw-radius-sm);
    background: var(--nw-surface);
    transition: background-color .2s ease;
}

.nw-sibling:hover { background: #E6EAE8; }
.nw-sibling--next { grid-column: 2; text-align: right; }
.nw-sibling small { display: inline-flex; gap: 8px; align-items: center; font-size: 14px; font-weight: 600; color: var(--nw-text); }
.nw-sibling--next small { justify-content: flex-end; }
.nw-sibling strong { font-family: var(--accent-font); font-size: 18px; line-height: 1.3; color: var(--nw-ink); }

/* ---------- Sidebar ---------- */

.nw-aside {
    position: sticky;
    top: 120px;
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.nw-recent h2,
.nw-cta h2 {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.01em;
    color: var(--nw-ink);
    margin: 0 0 14px;
}

.nw-recent-item {
    display: grid;
    grid-template-columns: 84px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    padding: 14px 0;
    border-top: 1px solid var(--nw-line);
}

.nw-recent-thumb {
    display: block;
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    background: var(--nw-surface);
}

.nw-recent-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

.nw-recent-item strong {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-family: var(--accent-font);
    font-size: 16px;
    font-weight: 700;
    line-height: 1.3;
    color: var(--nw-ink);
    margin-bottom: 6px;
}

.nw-recent-item time { font-size: 13px; color: var(--nw-text); line-height: 1.3; }
.nw-recent-item:hover strong { color: var(--nw-accent); }
.nw-recent-empty { margin: 0; padding: 14px 0; border-top: 1px solid var(--nw-line); }

.nw-all-link {
    display: inline-block;
    margin-top: 6px;
    padding-top: 14px;
    font-weight: 700;
    color: var(--nw-accent);
    text-decoration: underline !important;
    text-underline-offset: 3px;
}

.nw-cta {
    overflow: hidden;
    border-radius: var(--nw-radius-lg);
    background: var(--nw-ink);
}

.nw-cta-poster { display: block; }
.nw-cta-poster img { width: 100%; height: auto; display: block; }
.nw-cta-body { padding: 24px 26px 28px; }
.nw-cta h2 { color: #fff; }
.nw-cta p { color: rgba(255, 255, 255, .8); font-size: 15px; line-height: 1.6; margin: 0 0 20px; }

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1199px) {
    .nw-article-layout { grid-template-columns: minmax(0, 1fr) 300px; gap: 44px; }
}

@media (max-width: 991px) {
    .nw-page { padding: 56px 0 80px; }

    .nw-lead {
        grid-template-columns: 1fr;
        grid-template-areas: "media" "panel" "runners";
        margin-bottom: 64px;
    }

    .nw-lead-panel { margin: -70px 16px 0; padding: 28px 26px 30px; }

    .nw-runners {
        flex-direction: row;
        margin-top: 36px;
    }

    .nw-runner { flex: 1 1 0; min-width: 0; }

    .nw-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 44px 24px; }

    .nw-article-layout { grid-template-columns: 1fr; }
    .nw-aside { position: static; }
    .nw-detail-header .nw-ph-title { font-size: 46px; margin-bottom: 10px; }
}

@media (max-width: 767px) {
    .nw-lead-panel { margin: -40px 10px 0; padding: 24px 22px 26px; }
    .nw-runners { flex-direction: column; gap: 24px; }
    .nw-runner { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 14px; align-items: start; }
    .nw-runner-media { margin: 0; }
    .nw-runner h3 { font-size: 18px; }

    .nw-toolbar { flex-direction: column; align-items: stretch; }
    .nw-search { max-width: none; flex-basis: auto; width: 100%; }
    .nw-years { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
    .nw-years a { flex: 0 0 auto; }

    .nw-grid { grid-template-columns: 1fr; gap: 40px; }

    .nw-prose { font-size: 17px; }
    .nw-prose blockquote { font-size: 20px; }

    .nw-share { gap: 6px; }
    .nw-wa-pre { display: none; }
    .nw-share-btn--wa { padding: 0 16px; }
    .nw-share-btn { height: 42px; }
    .nw-share-icon, .nw-share [data-share="copy"] { width: 42px; }
    .nw-share [data-share="copy"] span { display: none; }
    .nw-share [data-share="copy"] { padding: 0; }
    .nw-share [data-share="copy"].is-done { width: auto; padding: 0 18px; }
    .nw-share [data-share="copy"].is-done span { display: inline; }

    .nw-siblings { grid-template-columns: 1fr; }
    .nw-sibling--next { grid-column: auto; }
    .nw-detail-header .nw-ph-title { font-size: 40px; }
}

@media (prefers-reduced-motion: reduce) {
    .nw-page *, .nw-progress span { transition: none !important; }
    .nw-card:hover .nw-card-media img,
    .nw-runner:hover .nw-runner-media img,
    .nw-lead-media:hover img { transform: none; }
}
