/* Insights: article pages, the insights index and sector-page insight blocks.
   Built by tools/build_insights.py. Uses the variables from main.css. */

/* ── Article hero ── */
.article-hero { background: var(--charcoal); position: relative; padding: 64px 0 56px; color: var(--white); }
.article-hero::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px; background: var(--red); }
.article-hero .inner { max-width: 820px; margin: 0 auto; padding: 0 24px; }
.insights-page-inner { max-width: 1100px; margin: 0 auto; padding: 8px 24px 72px; }
.article-crumbs { font-family: 'Poppins', sans-serif; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 18px; color: rgba(255,255,255,0.7); }
.article-crumbs a { color: #ff4d6d; text-decoration: none; }
.article-crumbs a:hover { text-decoration: underline; }
.article-hero h1 { font-size: clamp(1.8rem, 4vw, 2.7rem); line-height: 1.2; color: var(--white); margin-bottom: 28px; }
.article-byline { display: flex; align-items: center; gap: 14px; font-size: 0.95rem; color: rgba(255,255,255,0.8); }
.article-byline img { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; object-position: center 15%; filter: grayscale(100%); flex: none; }
.article-byline a { color: var(--white); font-weight: 600; text-decoration: none; }
.article-byline a:hover { text-decoration: underline; }
.article-byline .byline-meta { display: block; font-size: 0.85rem; color: rgba(255,255,255,0.65); margin-top: 2px; }

/* ── Article body ── */
.article-wrap { max-width: 820px; margin: 0 auto; padding: 56px 24px 24px; }
.article-body h2 { font-size: 1.35rem; color: var(--charcoal); margin: 44px 0 14px; line-height: 1.3; }
.article-body p, .article-body li { color: #3d3d3d; line-height: 1.85; font-size: 1.04rem; }
.article-body p { margin-bottom: 18px; }
.article-body ul { margin: 0 0 22px 22px; padding: 0; }
.article-body li { margin-bottom: 10px; padding-left: 4px; }
.article-body li::marker { color: var(--red); }
.article-body strong { color: var(--charcoal); font-weight: 500; }
.article-body .article-standfirst { font-size: 1.2rem !important; line-height: 1.7; color: var(--charcoal) !important; margin-bottom: 32px; }
.key-points { background: #f7f6f4; border-left: 4px solid var(--red); padding: 24px 28px 8px; margin: 0 0 12px; }
.key-points h2 { margin: 0 0 12px; font-size: 0.8rem; letter-spacing: 0.14em; text-transform: uppercase; color: #a8002c; }
.key-points li { font-size: 1rem; }
.article-note { font-size: 0.9rem !important; color: #5c5c5c !important; border-top: 1px solid var(--border, #e5e2dd); padding-top: 18px; margin-top: 36px; font-style: italic; }

/* ── Share and author ── */
.article-share { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 28px 0 0; font-family: 'Poppins', sans-serif; font-size: 0.85rem; }
.article-share span { color: #5c5c5c; margin-right: 4px; }
.article-share a { display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border: 1px solid #cfcac3; color: var(--charcoal); text-decoration: none; border-radius: 2px; }
.article-share a:hover { border-color: var(--red); color: var(--red); }
.article-share svg { width: 16px; height: 16px; fill: currentColor; }
.author-box { display: grid; grid-template-columns: 96px 1fr; gap: 22px; align-items: start; background: #f7f6f4; padding: 26px; margin: 40px 0 0; }
.author-box img { width: 96px; height: 120px; object-fit: cover; object-position: center 15%; filter: grayscale(100%); display: block; }
.author-box .author-label { font-family: 'Poppins', sans-serif; font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: #a8002c; margin: 0 0 4px; }
.author-box h2 { font-size: 1.15rem; margin: 0 0 2px; }
.author-box h2 a { color: var(--charcoal); text-decoration: none; }
.author-box h2 a:hover { color: var(--red); }
.author-box .author-role { font-size: 0.88rem; color: #a8002c; margin: 0 0 10px; font-weight: 600; }
.author-box p { font-size: 0.95rem; line-height: 1.7; color: #3d3d3d; margin: 0; }
.article-more { max-width: 820px; margin: 0 auto; padding: 8px 24px 64px; font-family: 'Poppins', sans-serif; font-size: 0.9rem; }
.article-more a { color: #a8002c; font-weight: 600; text-decoration: none; }
.article-more a:hover { text-decoration: underline; }

/* ── Insight cards (sector pages and index) ── */
.insights-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 28px; margin-top: 36px; }
.insight-tile { background: var(--white); box-shadow: 0 2px 16px rgba(0,0,0,0.07); display: flex; flex-direction: column; }
.insight-tile--noimg { border-top: 4px solid var(--red); }
.insight-tile img { width: 100%; height: auto; aspect-ratio: 1200 / 627; object-fit: cover; display: block; }
.insight-tile-body { padding: 24px 26px 26px; display: flex; flex-direction: column; flex: 1; }
.insight-tile .insight-meta { font-family: 'Poppins', sans-serif; font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; color: #a8002c; margin: 0 0 10px; }
.insight-tile h2, .insight-tile h3 { font-size: 1.12rem; line-height: 1.35; margin: 0 0 12px; }
.insight-tile h2 a, .insight-tile h3 a { color: var(--charcoal); text-decoration: none; }
.insight-tile h2 a:hover, .insight-tile h3 a:hover { color: var(--red); }
.insight-tile p { color: #4a4a4a; line-height: 1.7; font-size: 0.95rem; margin: 0 0 18px; }
.insight-tile .insight-link { margin-top: auto; font-family: 'Poppins', sans-serif; font-size: 0.85rem; font-weight: 600; color: #a8002c; text-decoration: none; }
.insight-tile .insight-link:hover { text-decoration: underline; }

/* A single article shows as one wide feature card */
.insights-grid--single { grid-template-columns: 1fr; }
.insights-grid--single .insight-tile { flex-direction: row; }
.insights-grid--single .insight-tile > a { flex: 0 0 52%; display: flex; align-items: center; background: #1e1e1e; }
.insights-grid--single .insight-tile--noimg { border-top: 4px solid var(--red); }
.insight-tile img { height: auto; }
.insights-grid--single .insight-tile-body { padding: 32px 36px; justify-content: center; }
.insights-grid--single .insight-tile h2, .insights-grid--single .insight-tile h3 { font-size: 1.35rem; }
@media (max-width: 860px) {
  .insights-grid--single .insight-tile { flex-direction: column; }
  .insights-grid--single .insight-tile > a { flex: none; }
  .insights-grid--single .insight-tile-body { padding: 24px 26px 26px; }
}

@media (max-width: 640px) {
  .article-hero { padding: 44px 0 40px; }
  .article-wrap { padding-top: 36px; }
  .key-points { padding: 20px 20px 4px; }
  .author-box { grid-template-columns: 72px 1fr; gap: 16px; padding: 20px; }
  .author-box img { width: 72px; height: 90px; }
}

/* Sub-headings, lead sentences and pull question in articles */
.article-body h3 { font-size: 1.1rem; color: #a8002c; margin: 34px 0 10px; line-height: 1.35; }
.article-body .article-lead { font-size: 1.08rem; }
.article-body .article-standfirst + .article-standfirst { margin-top: -14px; }
.article-question { margin: 6px 0 24px; padding: 4px 0 4px 22px; border-left: 4px solid var(--red); font-family: 'Poppins', sans-serif; font-size: 1.15rem; line-height: 1.6; color: var(--charcoal); }

/* Homepage insights section */
section#insights { background: var(--white); }
.insights-all { margin-top: 32px; font-family: 'Poppins', sans-serif; font-size: 0.9rem; }
.insights-all a { color: #a8002c; font-weight: 600; text-decoration: none; }
.insights-all a:hover { text-decoration: underline; }

.article-hero--wide .inner { max-width: 1100px; }

/* Partner logos in the byline (joint articles) */
.byline-logos { display: flex; flex: none; }
.byline-logo + .byline-logo { margin-left: -8px; }
.byline-logo { width: 52px; height: 52px; border-radius: 50%; background: #fff; display: flex; align-items: center; justify-content: center; position: relative; box-shadow: 0 0 0 3px var(--charcoal); transition: transform .15s ease, box-shadow .15s ease; }
.byline-logo:hover, .byline-logo:focus-visible { transform: translateY(-2px); z-index: 1; box-shadow: 0 0 0 3px var(--charcoal), 0 0 0 6px rgba(255,77,109,.6); }
.byline-logo img { width: 34px; height: 34px; object-fit: contain; filter: none; border-radius: 0; }
.byline-logo img[src$=".svg"] { width: 26px; height: 26px; }
@media (max-width: 640px) {
  .article-byline:has(.byline-logos) { flex-wrap: wrap; }
  .article-byline:has(.byline-logos) > div { flex-basis: 100%; }
}

/* More than three stories: one row that scrolls sideways */
.insights-rail { margin-top: 36px; }
.insights-track { display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 56px) / 3); gap: 28px; overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; padding: 4px 4px 18px; margin: -4px -4px 0; scroll-padding: 0 4px; scrollbar-width: thin; scrollbar-color: #cfcac3 transparent; }
.insights-track:focus-visible { outline: 2px solid var(--red); outline-offset: 4px; }
.insights-track > .insight-tile { scroll-snap-align: start; }
.rail-controls { display: flex; justify-content: flex-end; gap: 10px; margin-top: 14px; }
.rail-controls[hidden] { display: none; }
.rail-btn { width: 46px; height: 46px; border: 1px solid #cfcac3; background: var(--white); color: var(--charcoal); font-size: 1.2rem; line-height: 1; cursor: pointer; border-radius: 2px; transition: border-color .15s, color .15s; }
.rail-btn:hover:not(:disabled), .rail-btn:focus-visible { border-color: var(--red); color: var(--red); }
.rail-btn:disabled { opacity: .35; cursor: default; }
@media (max-width: 1000px) { .insights-track { grid-auto-columns: calc((100% - 28px) / 2); } }
@media (max-width: 640px) { .insights-track { grid-auto-columns: 86%; gap: 16px; } }

/* Story photo behind the article header */
.article-hero--photo { overflow: hidden; padding: 96px 0 72px; border-top: 6px solid var(--red); }
.article-hero--photo picture { position: absolute; inset: 0; }
.article-hero--photo .article-hero-photo { width: 100%; height: 100%; object-fit: cover; object-position: center 40%; display: block; }
.article-hero--photo::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(20,20,20,.92) 0%, rgba(20,20,20,.74) 55%, rgba(20,20,20,.45) 100%), linear-gradient(0deg, rgba(20,20,20,.7) 0%, rgba(20,20,20,0) 50%); }
.article-hero--photo::before { z-index: 3; height: 6px; }
.article-hero-mark { position: absolute; right: 56px; top: 50%; transform: translateY(-50%); width: 230px; height: auto; opacity: .32; z-index: 1; pointer-events: none; }
@media (max-width: 1180px) { .article-hero-mark { display: none; } }
.article-hero--photo .inner { position: relative; z-index: 2; }
.article-hero-credit { position: absolute; right: 16px; bottom: 10px; z-index: 2; margin: 0; font-size: 0.7rem; color: rgba(255,255,255,.55); }
@media (max-width: 640px) { .article-hero--photo { padding: 64px 0 52px; } .article-hero--photo::after { background: rgba(20,20,20,.78); } }
