/* News module - listings, cards, the story page and the page-builder
   sections. Built on the theme's tokens (--ink, --text, --muted, --line,
   --light, --blue-d, --r, --font ...) with fallbacks, so any theme that
   defines them restyles the news pages too. Text colours keep >= 4.5:1:
   --muted #5b6474 on white is 5.9:1, --blue-d #2b5fde 5.0:1, white on the
   breaking red #b42318 6.5:1, #5a4300 on #fff4d6 8.9:1. */

.nw-page { padding-top: clamp(20px, 3vw, 36px); padding-bottom: clamp(40px, 6vw, 80px); }
.nw-head { margin-bottom: clamp(20px, 3vw, 32px); }
.nw-head__title { font-size: clamp(32px, 4vw, 50px); line-height: 1.1; letter-spacing: -.02em; margin: 6px 0 10px; }
.nw-head__desc { color: var(--muted, #5b6474); font-size: 17px; max-width: 760px; margin: 0; }
.nw-crumbs { display: flex; flex-wrap: wrap; gap: 6px; font-size: 13.5px; color: var(--muted, #5b6474); margin-bottom: 10px; }
.nw-crumbs a { color: var(--muted, #5b6474); text-decoration: none; }
.nw-crumbs a:hover { color: var(--blue-d, #2b5fde); text-decoration: underline; }
.nw-crumbs [aria-hidden] { color: var(--grey, #9ca3af); }
.nw-crumbs [aria-current] { color: var(--ink, #05173a); font-weight: 500; }

/* sections bar */
.nw-sections { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 18px 0 4px; margin-top: 8px; -webkit-overflow-scrolling: touch; }
.nw-sections::-webkit-scrollbar { display: none; }
.nw-sections a { flex: none; padding: 8px 16px; border-radius: var(--pill, 999px); border: 1px solid var(--line, #e5e7eb); color: var(--ink, #05173a); text-decoration: none; font-size: 14.5px; font-weight: 500; white-space: nowrap; transition: background .2s, border-color .2s; }
.nw-sections a:hover { border-color: var(--ink, #05173a); }
.nw-sections a[aria-current] { background: var(--ink, #05173a); border-color: var(--ink, #05173a); color: #fff; }

/* search */
.nw-search { display: flex; gap: 10px; max-width: 620px; margin-top: 16px; }
.nw-search input { flex: 1; min-width: 0; height: 48px; padding: 0 18px; border: 1.5px solid var(--line, #e5e7eb); border-radius: var(--pill, 999px); font: 400 16px var(--font, sans-serif); color: var(--ink, #05173a); background: #fff; }
.nw-search input:focus { outline: none; border-color: var(--blue-d, #2b5fde); box-shadow: 0 0 0 3px rgba(43, 95, 222, .15); }
.nw-search .btn { min-height: 48px; }

/* listing + sidebar */
.nw-with-side { display: grid; gap: 40px; }
@media (min-width: 1000px) { .nw-with-side { grid-template-columns: minmax(0, 1fr) 300px; gap: 48px; } }
.nw-side { display: grid; gap: 28px; align-content: start; }
.nw-empty { padding: 40px 0; color: var(--muted, #5b6474); font-size: 17px; }
.nw-lead { margin-bottom: 36px; padding-bottom: 36px; border-bottom: 1px solid var(--line, #e5e7eb); }
.nw-feedlink a { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted, #5b6474); text-decoration: none; }
.nw-feedlink a:hover { color: var(--blue-d, #2b5fde); }

/* grids */
.nw-grid { display: grid; gap: 32px 24px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.nw-grid__full { grid-column: 1 / -1; }
@media (min-width: 760px) { .nw-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .nw-grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .nw-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.nw-list { display: grid; gap: 0; }
.nw-list > .nw-card { padding: 18px 0; border-bottom: 1px solid var(--line, #e5e7eb); }
.nw-list > .nw-card:first-child { padding-top: 0; }
@media (min-width: 900px) { .nw-list--compact { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 40px; } }

/* cards */
.nw-card { display: flex; flex-direction: column; gap: 12px; min-width: 0; position: relative; }
.nw-card__media { display: block; position: relative; overflow: hidden; border-radius: var(--r-sm, 12px); background: var(--light-2, #eef2fb); aspect-ratio: 16 / 10; }
.nw-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.nw-card:hover .nw-card__media img { transform: scale(1.035); }
.nw-card__play { position: absolute; inset-inline-start: 12px; bottom: 12px; width: 40px; height: 40px; border-radius: 50%; background: rgba(5, 23, 58, .85); color: #fff; display: grid; place-items: center; }
.nw-card__body { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.nw-card__title { font-size: 19px; line-height: 1.3; font-weight: 600; letter-spacing: -.01em; margin: 0; }
.nw-card__title a { color: var(--ink, #05173a); text-decoration: none; }
.nw-card__title a:hover { color: var(--blue-d, #2b5fde); }
.nw-card__title a::after { content: ''; position: absolute; inset: 0; } /* the whole card is the link */
.nw-card__excerpt { color: var(--text, #374151); font-size: 15px; line-height: 1.55; margin: 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.nw-kicker { position: relative; z-index: 1; align-self: flex-start; font-size: 12.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--blue-d, #2b5fde); text-decoration: none; }
.nw-kicker:hover { text-decoration: underline; }
.nw-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 13.5px; color: var(--muted, #5b6474); margin: 0; }
.nw-badge { display: inline-block; vertical-align: 2px; margin-inline-end: 8px; padding: 2px 8px; border-radius: 6px; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; line-height: 1.5; }
.nw-badge--breaking { background: #b42318; color: #fff; }
.nw-badge--sponsored { background: #fff4d6; color: #5a4300; }
.nw-card--row { flex-direction: row; gap: 16px; align-items: flex-start; }
.nw-card--row .nw-card__media { flex: 0 0 38%; max-width: 160px; aspect-ratio: 4 / 3; border-radius: 10px; }
.nw-card--row .nw-card__title { font-size: 16.5px; }
.nw-card--text .nw-card__title { font-size: 17px; }
.nw-card--lead .nw-card__title { font-size: clamp(26px, 3vw, 38px); line-height: 1.15; }
.nw-card--lead .nw-card__excerpt { font-size: 17px; -webkit-line-clamp: 4; }
.nw-card--lead .nw-card__media { aspect-ratio: 16 / 9; border-radius: var(--r, 20px); }
@media (min-width: 1000px) {
  .nw-lead .nw-card--lead { flex-direction: row; gap: 32px; align-items: center; }
  .nw-lead .nw-card--lead .nw-card__media { flex: 0 0 58%; }
}

/* widgets */
.nw-widget__title { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--ink, #05173a); padding-bottom: 12px; border-bottom: 2px solid var(--ink, #05173a); margin: 0 0 4px; }
.nw-ranked { counter-reset: rank; list-style: none; margin: 0; padding: 0; }
.nw-ranked li { counter-increment: rank; display: grid; grid-template-columns: 34px 1fr; gap: 10px; padding: 13px 0; border-bottom: 1px solid var(--line, #e5e7eb); }
.nw-ranked li::before { content: counter(rank); font-weight: 700; font-size: 24px; line-height: 1; color: var(--blue-d, #2b5fde); }
.nw-ranked a { color: var(--ink, #05173a); font-weight: 600; font-size: 15.5px; line-height: 1.35; text-decoration: none; }
.nw-ranked a:hover { color: var(--blue-d, #2b5fde); }

/* pager */
.nw-pager { display: flex; justify-content: center; align-items: center; gap: 6px; margin: 44px 0 0; flex-wrap: wrap; }
.nw-pager a, .nw-pager span { min-width: 44px; height: 44px; padding: 0 14px; border-radius: var(--pill, 999px); display: inline-flex; align-items: center; justify-content: center; font-weight: 600; font-size: 14.5px; border: 1px solid var(--line, #e5e7eb); color: var(--ink, #05173a); text-decoration: none; }
.nw-pager a:hover { border-color: var(--ink, #05173a); }
.nw-pager [aria-current] { background: var(--ink, #05173a); color: #fff; border-color: var(--ink, #05173a); }
.nw-pager .nw-pager__gap { border: 0; min-width: 20px; padding: 0; color: var(--muted, #5b6474); }

/* ── the story: meta rail / text / sidebar (premiere.media layout) ────── */
.nw-progress { position: fixed; left: 0; right: 0; top: 0; height: 3px; z-index: 70; pointer-events: none; }
.nw-progress span { display: block; height: 100%; background: var(--blue-d, #2b5fde); transform: scaleX(0); transform-origin: 0 50%; }
[dir="rtl"] .nw-progress span { transform-origin: 100% 50%; }
.nw-story { --story-main: 720px; display: grid; align-items: start; column-gap: clamp(24px, 3vw, 44px); grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "head" "rail" "main" "side"; max-width: var(--story-main); margin: clamp(20px, 3vw, 36px) auto 0; }
.nw-story__head { grid-area: head; padding-bottom: clamp(18px, 2vw, 26px); }
.nw-story__kicker { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 14px; }
.nw-story__kicker .nw-kicker { padding-bottom: 4px; border-bottom: 2px solid var(--blue-d, #2b5fde); }
.nw-story__title { font-size: clamp(30px, 3.6vw, 50px); line-height: 1.12; letter-spacing: -.02em; max-width: 1000px; text-wrap: balance; margin: 0; }
.nw-story__standfirst { font-size: clamp(18px, 1.5vw, 21px); line-height: 1.55; color: var(--text, #374151); max-width: var(--story-main); margin: 18px 0 0; }
.nw-story__rail { grid-area: rail; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 20px;
  padding: 16px 0; margin-bottom: 26px; border-top: 1px solid var(--line, #e5e7eb); border-bottom: 1px solid var(--line, #e5e7eb); }
.nw-story__main { grid-area: main; min-width: 0; }
.nw-story__side { grid-area: side; margin-top: 40px; }
.nw-byline { display: flex; align-items: center; gap: 12px; font-size: 14px; }
.nw-byline__avatar { width: 44px; height: 44px; border-radius: 50%; background: var(--light-2, #eef2fb); color: var(--ink, #05173a); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 15px; flex: none; }
.nw-byline__avatar--org { background: var(--ink, #05173a); color: #fff; }
.nw-byline__name { font-weight: 700; color: var(--ink, #05173a); display: block; }
.nw-byline__meta { font-size: 13.5px; color: var(--muted, #5b6474); display: flex; flex-wrap: wrap; gap: 2px 12px; margin-top: 2px; }
.nw-byline__meta span { display: inline-flex; align-items: center; gap: 5px; }
.nw-translations { display: flex; flex-wrap: wrap; gap: 8px; }
.nw-translations a { display: inline-flex; padding: 6px 12px; border-radius: var(--pill, 999px); background: var(--light-2, #eef2fb); color: var(--ink, #05173a); font-size: 13px; font-weight: 600; text-decoration: none; }
.nw-translations a:hover { background: var(--ink, #05173a); color: #fff; }
.nw-share { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.nw-share a, .nw-share button { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line, #e5e7eb); background: #fff; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; color: var(--ink, #05173a); transition: background .15s, color .15s; padding: 0; }
.nw-share a:hover, .nw-share button:hover, .nw-share button.is-copied { background: var(--ink, #05173a); color: #fff; border-color: var(--ink, #05173a); }
.nw-story__media { margin: 0 0 30px; }
.nw-story__media img { width: 100%; border-radius: var(--r, 20px); }
.nw-story__media figcaption { font-size: 13.5px; line-height: 1.5; color: var(--muted, #5b6474); margin-top: 10px; padding-inline-start: 12px; border-inline-start: 2px solid var(--blue-d, #2b5fde); }
.nw-video { display: inline-flex; align-items: center; gap: 10px; margin: 0 0 26px; padding: 12px 20px; border-radius: var(--pill, 999px); background: var(--ink, #05173a); color: #fff; font-weight: 600; text-decoration: none; }
.nw-video:hover { background: var(--blue-dd, #1f4fc4); color: #fff; }
.nw-prose { font-size: 18px; line-height: 1.75; color: var(--text, #374151); }
.nw-prose > p:first-of-type::first-letter { font-weight: 600; }
.nw-prose img { border-radius: var(--r-sm, 12px); height: auto; }
.nw-prose .adslot { margin: 1.8em auto; }
.nw-readalso { margin: 1.8em 0; padding: 14px 0 16px; border-top: 2px solid var(--ink, #05173a); border-bottom: 1px solid var(--line, #e5e7eb); }
.nw-readalso__label { display: block; font-size: 12.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--blue-d, #2b5fde); margin-bottom: 12px; }
.nw-readalso a { display: grid; grid-template-columns: auto 1fr; gap: 16px; align-items: center; text-decoration: none; color: var(--ink, #05173a); }
.nw-readalso img { width: 140px; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 8px; margin: 0; }
.nw-readalso b { font-size: 18px; line-height: 1.3; font-weight: 600; }
.nw-readalso a:hover b { color: var(--blue-d, #2b5fde); }
.nw-story__foot { margin-top: 36px; display: grid; gap: 22px; }
.nw-sponsor-note { margin: 0; padding: 12px 16px; border-radius: var(--r-sm, 12px); background: #fff4d6; color: #5a4300; font-size: 14.5px; }
.nw-topics h2, .nw-story__share > span { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--muted, #5b6474); margin: 0 0 12px; }
.nw-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.nw-tags a { padding: 6px 14px; border-radius: var(--pill, 999px); background: var(--light, #f8f9fd); border: 1px solid var(--line, #e5e7eb); color: var(--ink, #05173a); font-size: 14px; text-decoration: none; }
.nw-tags a:hover { border-color: var(--ink, #05173a); }
.nw-story__share { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 0; border-top: 1px solid var(--line, #e5e7eb); border-bottom: 1px solid var(--line, #e5e7eb); }
.nw-story__share > span { margin: 0; }
.nw-more-link { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 15px; color: var(--blue-d, #2b5fde); text-decoration: none; justify-self: start; }
.nw-more-link svg { transition: transform .15s; }
.nw-more-link:hover svg { transform: translateX(3px); }
[dir="rtl"] .nw-more-link svg { transform: scaleX(-1); }
[dir="rtl"] .nw-more-link:hover svg { transform: translateX(-3px) scaleX(-1); }
.nw-more { margin: clamp(48px, 6vw, 80px) 0 clamp(40px, 6vw, 80px); }
.nw-more__head h2 { font-size: clamp(24px, 2.4vw, 32px); margin: 0 0 24px; }
@media (min-width: 1000px) {
  .nw-story { max-width: 1120px; grid-template-columns: minmax(0, 1fr) 300px; grid-template-areas: "head head" "rail side" "main side"; }
  .nw-story__side { grid-row: 2 / span 2; margin-top: 0; }
}
@media (min-width: 1280px) {
  .nw-story { max-width: none; grid-template-columns: 170px minmax(0, var(--story-main)) 300px; justify-content: center; grid-template-areas: ". head head" "rail main side"; }
  .nw-story__side { grid-row: auto; position: sticky; top: 96px; }
  .nw-story__rail { position: sticky; top: 96px; flex-direction: column; align-items: flex-start; justify-content: flex-start; gap: 18px; border: 0; padding: 0; margin: 0; }
  .nw-story__rail .nw-byline { flex-direction: column; align-items: flex-start; gap: 10px; }
  .nw-story__rail .nw-byline__meta { flex-direction: column; gap: 4px; margin-top: 6px; }
  .nw-story__rail .nw-share { max-width: 130px; }
}

/* ── page-builder sections ───────────────────────────────────────────── */
.nw-sec-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 24px; margin-bottom: 32px; }
.nw-sec-head .h-section { margin: 0; }
.nw-sec-head .sec-head__intro { margin: 10px 0 0; max-width: 680px; }
.nw-featured { display: grid; gap: 32px; }
@media (min-width: 1000px) { .nw-featured { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); } }
.nw-featured__side { display: grid; gap: 20px; align-content: start; }
.nw-featured__side .nw-card + .nw-card { padding-top: 20px; border-top: 1px solid var(--line, #e5e7eb); }
.nw-strip + .nw-strip { margin-top: clamp(40px, 5vw, 64px); }
.nw-strip__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 20px; padding-bottom: 12px; margin-bottom: 24px; border-bottom: 2px solid var(--ink, #05173a); }
.nw-strip__title { font-size: clamp(22px, 2.2vw, 28px); margin: 0; }
.nw-strip__title a { color: var(--ink, #05173a); text-decoration: none; }
.nw-strip__title a:hover { color: var(--blue-d, #2b5fde); }
