/* ═══════════════════════════════════════════════════════════
   NewVib CMS — Full Design System CSS
   Inspired by lesoir.be visual structure
   Zero external frameworks — pure CSS
══════════════════════════════════════════════════════════ */

/* ── 1. CSS CUSTOM PROPERTIES (DESIGN TOKENS) ── */
:root {
  /* Brand */
  --accent:        #C8102E;
  --accent-dark:   #a00d24;
  --accent-light:  #e8384f;
  --navy:          #1a1a2e;
  --navy-light:    #2c2c48;

  /* Palette */
  --bg:            #f2f2f2;
  --surface:       #ffffff;
  --surface-2:     #fafafa;
  --border:        #e0e0e0;
  --border-dark:   #cccccc;

  /* Text */
  --text-primary:   #1a1a1a;
  --text-secondary: #555555;
  --text-muted:     #888888;
  --text-link:      #1a1a1a;
  --text-link-hover:#C8102E;

  /* Typography */
  --font-serif: 'Playfair Display', 'Georgia', 'Times New Roman', serif;
  --font-sans:  'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;

  /* Font sizes */
  --text-xs:   11px;
  --text-sm:   13px;
  --text-base: 16px;
  --text-md:   17px;
  --text-lg:   19px;
  --text-xl:   22px;
  --text-2xl:  28px;
  --text-3xl:  36px;
  --text-hero: 48px;

  /* Line heights */
  --leading-tight:  1.2;
  --leading-snug:   1.4;
  --leading-normal: 1.6;
  --leading-relaxed:1.75;

  /* Spacing */
  --s1:  4px;
  --s2:  8px;
  --s3:  12px;
  --s4:  16px;
  --s5:  24px;
  --s6:  32px;
  --s7:  48px;
  --s8:  64px;

  /* Layout */
  --max-width:    1280px;
  --sidebar-w:    300px;
  --gap:          2px;      /* lesoir.be card gap */
  --card-gap:     20px;
  --nav-h:        52px;
  --topbar-h:     40px;
  --radius:       2px;
  --radius-md:    6px;

  /* Shadows */
  --shadow-sm:  0 1px 3px rgba(0,0,0,.08);
  --shadow-md:  0 4px 12px rgba(0,0,0,.12);
  --shadow-lg:  0 8px 24px rgba(0,0,0,.16);

  /* Transitions */
  --t-fast: 150ms ease;
  --t-base: 250ms ease;
  --t-slow: 400ms ease;

  /* Ad min-heights (CLS prevention) */
  --ad-leaderboard-h:  90px;
  --ad-mrec-h:         250px;
  --ad-halfpage-h:     600px;
  --ad-incontent-h:    280px;
  --ad-billboard-h:    90px;
}

/* Dark mode */
html.dark {
  --bg:            #0f0f0f;
  --surface:       #1c1c1c;
  --surface-2:     #242424;
  --border:        #2a2a2a;
  --border-dark:   #333333;
  --text-primary:  #e8e8e8;
  --text-secondary:#aaaaaa;
  --text-muted:    #666666;
  --text-link:     #e8e8e8;
  --navy:          #111111;
}

/* ── 2. RESET + BASE ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: var(--text-base);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: var(--leading-relaxed);
  color: var(--text-primary);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  padding-bottom: 70px; /* mobile tab bar */
}

a { color: var(--text-link); text-decoration: none; transition: color var(--t-fast); }
a:hover { color: var(--text-link-hover); }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: var(--radius); }

img { max-width: 100%; height: auto; display: block; }
ul, ol { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }

/* ── 3. LAYOUT UTILITIES ── */
.page-wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--s4);
}
@media (min-width: 1024px) { .page-wrap { padding: 0 var(--s5); } }

.content-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s5);
  margin-top: var(--s5);
}
@media (min-width: 1025px) {
  .content-grid { grid-template-columns: 1fr var(--sidebar-w); gap: var(--s6); }
}

/* ── 4. READING PROGRESS BAR ── */
.reading-progress {
  position: fixed; top: 0; left: 0; right: 0; height: 3px;
  background: var(--accent); z-index: 9999; width: 0%;
  transition: width .1s linear; transform-origin: left;
}

/* ── 5. TOP BAR ── */
.topbar {
  background: var(--navy);
  color: rgba(255,255,255,.85);
  height: var(--topbar-h);
  position: relative; z-index: 200;
}
.topbar-inner {
  max-width: var(--max-width); margin: 0 auto; padding: 0 var(--s4);
  display: flex; align-items: center; justify-content: space-between;
  height: 100%; gap: var(--s4);
}
.topbar-left, .topbar-right { display: flex; align-items: center; gap: var(--s3); }
.topbar-date { font-size: var(--text-xs); opacity: .7; white-space: nowrap; }
.topbar-center { flex: 1; text-align: center; }

/* LOGO */
.site-logo {
  font-family: var(--font-serif);
  font-weight: 800; font-size: 26px;
  letter-spacing: -0.5px; color: #fff;
  white-space: nowrap;
}
.site-logo:hover { color: #fff; }
.logo-vib { color: var(--accent) !important; }
.footer-logo { font-size: 32px; }

/* Icon buttons */
.btn-icon {
  width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,.8); transition: all var(--t-fast);
  background: rgba(255,255,255,.05);
}
.btn-icon:hover { background: rgba(255,255,255,.15); color: white; }

/* Newsletter button */
.btn-newsletter {
  display: flex; align-items: center; gap: 6px;
  background: var(--accent); color: white;
  padding: 6px 14px; border-radius: 50px;
  font-size: var(--text-xs); font-weight: 700;
  text-transform: uppercase; letter-spacing: .5px;
  white-space: nowrap; transition: background var(--t-fast);
}
.btn-newsletter:hover { background: var(--accent-dark); color: white; }
@media (max-width: 640px) { .btn-newsletter span { display: none; } }

/* ── 6. SEARCH BAR (expand) ── */
.search-bar-wrap {
  max-height: 0; overflow: hidden; opacity: 0;
  transition: max-height .3s ease, opacity .3s ease;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: relative; z-index: 190;
}
.search-bar-wrap.open { max-height: 70px; opacity: 1; }
.search-bar-inner {
  display: flex; align-items: center; gap: var(--s3);
  padding: var(--s3) var(--s4); max-width: var(--max-width);
  margin: 0 auto;
}
#searchInput {
  flex: 1; border: none; outline: none;
  font-size: var(--text-lg); font-family: inherit;
  background: transparent; color: var(--text-primary);
}
#searchClose {
  color: var(--text-muted); font-size: 18px;
  padding: 4px 8px; border-radius: var(--radius);
}
#searchClose:hover { color: var(--accent); }

/* ── 7. MAIN NAV ── */
.main-nav {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 2px 4px rgba(0,0,0,.05);
  position: sticky; top: 0; z-index: 150;
  height: var(--nav-h);
}
.nav-inner {
  display: flex; align-items: center; height: 100%; gap: var(--s4);
}
.nav-list {
  display: flex; align-items: center;
  overflow-x: auto; flex: 1; height: 100%;
  scrollbar-width: none;
}
.nav-list::-webkit-scrollbar { display: none; }
.nav-link {
  display: flex; align-items: center; height: 100%;
  padding: 0 14px; font-size: var(--text-sm); font-weight: 600;
  text-transform: uppercase; letter-spacing: .5px;
  white-space: nowrap; color: var(--text-primary);
  border-bottom: 3px solid transparent; transition: all var(--t-fast);
}
.nav-link:hover, .nav-link--active {
  color: var(--accent); border-bottom-color: var(--accent);
}
.nav-search-link {
  color: var(--text-secondary); padding: var(--s2);
  border-radius: var(--radius);
}
.nav-search-link:hover { color: var(--accent); }

/* Hamburger */
.hamburger {
  display: none; flex-direction: column; justify-content: space-between;
  width: 24px; height: 18px; padding: 0;
  flex-shrink: 0;
}
.hamburger span {
  display: block; height: 2px; background: var(--text-primary);
  border-radius: 2px; transition: all var(--t-base);
}
.hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 6px); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -6px); }
@media (max-width: 768px) { .hamburger { display: flex; } }

/* ── 8. BREAKING TICKER ── */
.breaking-ticker {
  background: var(--accent); color: white;
  display: flex; align-items: center; height: 36px;
  overflow: hidden; font-size: var(--text-sm);
}
.ticker-label {
  background: #8b0000; padding: 0 14px;
  height: 100%; display: flex; align-items: center;
  font-weight: 800; font-size: var(--text-xs);
  text-transform: uppercase; letter-spacing: 1px;
  white-space: nowrap; flex-shrink: 0;
}
.ticker-track-wrap { flex: 1; overflow: hidden; position: relative; }
.ticker-track {
  display: flex; white-space: nowrap;
  animation: ticker-scroll 40s linear infinite;
}
.ticker-track:hover { animation-play-state: paused; }
.ticker-item { padding: 0 var(--s5); display: flex; align-items: center; height: 36px; }
.ticker-item a { color: white; }
.ticker-item a:hover { text-decoration: underline; }
.ticker-sep { margin: 0 var(--s4); opacity: .5; font-size: 8px; }
@keyframes ticker-scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ── 9. MOBILE MENU ── */
.mobile-menu {
  position: fixed; top: 0; left: 0; bottom: 0; width: min(340px, 90vw);
  background: var(--navy); z-index: 1000;
  transform: translateX(-100%);
  transition: transform .35s cubic-bezier(.25,.8,.25,1);
  overflow-y: auto; display: flex; flex-direction: column;
}
.mobile-menu.open { transform: translateX(0); }
.mobile-menu-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--s5) var(--s5) var(--s4); border-bottom: 1px solid rgba(255,255,255,.1);
}
.mobile-menu-close {
  color: rgba(255,255,255,.7); font-size: 20px;
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(255,255,255,.1); display: flex; align-items: center; justify-content: center;
}
.mobile-nav-list { padding: var(--s4) 0; }
.mobile-nav-link {
  display: block; padding: var(--s3) var(--s5);
  color: rgba(255,255,255,.85); font-size: var(--text-lg); font-weight: 600;
  border-bottom: 1px solid rgba(255,255,255,.06);
  transition: all var(--t-fast);
}
.mobile-nav-link:hover { color: white; background: rgba(255,255,255,.05); padding-left: calc(var(--s5) + 4px); }
.mobile-menu-footer { margin-top: auto; padding: var(--s5); }
.mobile-social { display: flex; gap: var(--s3); flex-wrap: wrap; }
.mobile-social a { color: rgba(255,255,255,.6); font-size: var(--text-xs); }
.mobile-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.5);
  z-index: 999; display: none;
}
.mobile-overlay.show { display: block; }

/* ── 10. ARTICLE CARDS ── */
.card {
  background: var(--surface);
  display: flex; flex-direction: column;
  overflow: hidden;
  transition: box-shadow var(--t-fast), transform var(--t-fast);
  border-radius: var(--radius);
}
.card:hover { box-shadow: var(--shadow-md); }

.card-img-wrap {
  position: relative; aspect-ratio: 16/9;
  overflow: hidden; background: var(--border); flex-shrink: 0;
}
.card-img-wrap img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .45s ease;
}
.card:hover .card-img-wrap img { transform: scale(1.05); }

.card-body {
  padding: var(--s4); flex: 1; display: flex; flex-direction: column; gap: var(--s2);
}
.card-cat {
  display: inline-block;
  font-size: var(--text-xs); font-weight: 800;
  text-transform: uppercase; letter-spacing: .8px;
  color: var(--cat-color, var(--accent));
  transition: opacity var(--t-fast);
}
.card-cat:hover { opacity: .8; color: var(--cat-color, var(--accent)); }
.card-title {
  font-family: var(--font-serif);
  font-size: var(--text-lg); font-weight: 700;
  line-height: var(--leading-snug); color: var(--text-link);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.card-title a { color: inherit; }
.card-title a:hover { color: var(--accent); }
.card-excerpt {
  font-size: var(--text-sm); color: var(--text-secondary);
  line-height: var(--leading-normal);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  flex: 1;
}
.card-meta {
  display: flex; align-items: center; flex-wrap: wrap;
  gap: 4px; font-size: var(--text-xs); color: var(--text-muted);
  margin-top: auto;
}
.card-author { font-weight: 600; color: var(--text-secondary); }
.card-dot { color: var(--border-dark); }
.card-read { white-space: nowrap; }

/* Hero card variant */
.card--hero {
  position: relative; grid-column: 1; grid-row: 1;
  min-height: 500px;
}
.card--hero .card-img-wrap {
  aspect-ratio: unset; position: absolute; inset: 0; height: 100%;
}
.card--hero .card-img-wrap img { height: 100%; }
.card--hero .card-body {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: linear-gradient(transparent 0%, rgba(0,0,0,.3) 20%, rgba(0,0,0,.88) 100%);
  padding: var(--s6) var(--s5) var(--s5);
  z-index: 2;
}
.card--hero .card-cat { color: white; background: var(--accent); padding: 2px 8px; border-radius: 2px; }
.card--hero .card-title, .card--hero .card-excerpt, .card--hero .card-meta { color: rgba(255,255,255,.95); }
.card--hero .card-title a { color: inherit; }
.card--hero .card-title a:hover { color: rgba(255,255,255,.8); }
.card-title--hero { font-size: clamp(22px, 3.5vw, 38px); -webkit-line-clamp: 4; }
.badge-breaking {
  display: inline-block; font-size: var(--text-xs); font-weight: 800;
  background: var(--accent); color: white; padding: 2px 8px; border-radius: 2px;
  animation: blink 1.5s step-end infinite;
}
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: .5; } }

/* Hero grid layout */
.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--gap);
  margin-bottom: var(--s5);
}
@media (min-width: 768px) {
  .hero-grid { grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; }
  .card--hero { grid-row: 1 / 3; }
}
.hero-secondary { display: flex; flex-direction: column; gap: var(--gap); }
.card--secondary .card-title { font-size: var(--text-base); -webkit-line-clamp: 3; }
.card--secondary .card-excerpt { display: none; }

/* Main articles grid */
.articles-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--card-gap);
  margin-bottom: var(--s6);
}
@media (min-width: 640px)  { .articles-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1025px) { .articles-grid { grid-template-columns: repeat(3, 1fr); } }

/* Category section grid */
.section-grid {
  display: grid; grid-template-columns: 1fr; gap: var(--gap);
  margin-bottom: var(--s5);
}
@media (min-width: 640px) { .section-grid { grid-template-columns: 1.5fr 1fr; } }
.section-list { display: flex; flex-direction: column; gap: var(--gap); }
.card--list { flex-direction: row; align-items: flex-start; }
.card--list .card-img-wrap { width: 100px; min-width: 100px; aspect-ratio: 4/3; }
.card--list .card-title { font-size: var(--text-sm); -webkit-line-clamp: 3; }
.card--list .card-excerpt { display: none; }
.card--section-main .card-title { font-size: var(--text-xl); }

/* ── 11. SECTION HEADERS ── */
.section-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: var(--s4); padding-bottom: var(--s3);
  border-bottom: 1px solid var(--border);
}
.section-title {
  font-family: var(--font-serif); font-size: var(--text-xl); font-weight: 800;
  position: relative;
}
.section-title::before {
  content: '';
  display: block; width: 40px; height: 3px;
  background: var(--accent); margin-bottom: var(--s2);
}
.see-all {
  font-size: var(--text-xs); font-weight: 700;
  text-transform: uppercase; letter-spacing: .5px;
  color: var(--accent); white-space: nowrap;
}
.see-all:hover { color: var(--accent-dark); }
.cat-section { margin-bottom: var(--s7); }

/* Load more sentinel */
.load-more-sentinel { display: flex; justify-content: center; padding: var(--s5); }
.spinner {
  width: 36px; height: 36px; border-radius: 50%;
  border: 3px solid var(--border); border-top-color: var(--accent);
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── 12. SIDEBAR ── */
.sidebar { min-width: 0; }
.sidebar-sticky { position: sticky; top: calc(var(--nav-h) + var(--s4)); }
.widget {
  background: var(--surface); margin-bottom: var(--s4);
  border-radius: var(--radius); overflow: hidden;
}
.widget-title {
  font-size: var(--text-xs); font-weight: 800;
  text-transform: uppercase; letter-spacing: 1.5px;
  padding: var(--s2) var(--s4);
  border-top: 3px solid var(--accent);
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
}
.widget-body { padding: var(--s4); }
.trending-list { }
.trending-item {
  display: flex; gap: var(--s3);
  padding: var(--s3) var(--s4);
  border-bottom: 1px solid var(--border);
  align-items: flex-start;
}
.trending-item:last-child { border-bottom: none; }
.trending-num {
  font-size: 28px; font-weight: 900;
  color: var(--border-dark); line-height: 1;
  min-width: 32px; margin-top: 2px;
}
.trending-content { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.trending-cat {
  font-size: var(--text-xs); font-weight: 700;
  text-transform: uppercase; letter-spacing: .5px;
}
.trending-title {
  font-size: var(--text-sm); font-weight: 700;
  line-height: var(--leading-snug); color: var(--text-primary);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.trending-title:hover { color: var(--accent); }

/* Newsletter widget */
.newsletter-widget .widget-body p {
  font-size: var(--text-sm); color: var(--text-secondary); margin-bottom: var(--s3);
}

/* ── 13. AD CONTAINERS ── */
.ad-container {
  background: var(--surface-2);
  margin: var(--s5) 0;
  text-align: center; border-radius: var(--radius);
  overflow: hidden;
}
.ad-label {
  font-size: 10px; text-transform: uppercase; letter-spacing: 1px;
  color: var(--text-muted); padding: 4px; background: var(--surface-2);
}
.ad--leaderboard  { min-height: calc(var(--ad-leaderboard-h) + 20px); }
.ad--incontent    { min-height: calc(var(--ad-incontent-h) + 20px); max-width: 336px; margin: var(--s5) auto; }
.ad--mrec         { min-height: calc(var(--ad-mrec-h) + 20px); }
.ad--halfpage     { min-height: calc(var(--ad-halfpage-h) + 20px); }
.ad--billboard    { min-height: calc(var(--ad-billboard-h) + 20px); }
.ad--native       { min-height: 120px; }
.ad--interstitial { position: fixed; inset: 0; z-index: 2000; background: rgba(0,0,0,.85); display: flex; align-items: center; justify-content: center; }
.interstitial-inner { position: relative; background: var(--surface); padding: var(--s5); max-width: 360px; border-radius: var(--radius-md); }
.interstitial-close {
  position: absolute; top: var(--s2); right: var(--s2);
  background: var(--accent); color: white; padding: 4px 10px;
  font-size: var(--text-xs); border-radius: var(--radius);
}
@media (max-width: 768px) {
  .ad--leaderboard { min-height: calc(50px + 20px); } /* 320x50 mobile */
  .ad--halfpage, .ad--mrec { display: none; } /* use interstitial instead */
}

/* ── 14. ARTICLE PAGE ── */
.breadcrumb {
  padding: var(--s3) 0; font-size: var(--text-xs);
  color: var(--text-muted);
}
.breadcrumb ol { display: flex; align-items: center; gap: var(--s2); flex-wrap: wrap; }
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--accent); }

.article-main { background: var(--surface); padding: var(--s5); border-radius: var(--radius); }
@media (min-width: 768px) { .article-main { padding: var(--s6); } }

.article-labels { display: flex; align-items: center; gap: var(--s2); margin-bottom: var(--s3); }
.article-cat {
  font-size: var(--text-xs); font-weight: 800;
  text-transform: uppercase; letter-spacing: .8px;
  color: var(--cat-color, var(--accent));
}
.article-title {
  font-family: var(--font-serif);
  font-size: clamp(26px, 4.5vw, 46px);
  font-weight: 800; line-height: 1.15;
  color: var(--text-primary); margin-bottom: var(--s4);
}
.article-subtitle {
  font-size: clamp(16px, 2vw, 20px); font-weight: 400;
  color: var(--text-secondary); line-height: var(--leading-normal);
  border-left: 4px solid var(--accent); padding-left: var(--s4);
  margin-bottom: var(--s5); font-style: italic;
}

/* Author meta bar */
.article-meta-bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--s4) 0; flex-wrap: wrap; gap: var(--s4);
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
  margin-bottom: var(--s5);
}
.article-author-info { display: flex; align-items: center; gap: var(--s3); }
.author-avatar { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; background: var(--border); }
.author-avatar-placeholder {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--accent); color: white;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: var(--text-base); flex-shrink: 0;
}
.author-name { font-weight: 700; font-size: var(--text-sm); color: var(--text-primary); }
.author-name:hover { color: var(--accent); }
.article-timestamps { display: flex; align-items: center; gap: 6px; font-size: var(--text-xs); color: var(--text-muted); flex-wrap: wrap; }
.meta-sep { color: var(--border-dark); }
.updated-label { font-style: italic; }

/* Share buttons */
.share-buttons { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.share-btn {
  display: flex; align-items: center; gap: 5px;
  padding: 6px 12px; border-radius: var(--radius);
  font-size: var(--text-xs); font-weight: 700;
  transition: opacity var(--t-fast); white-space: nowrap;
}
.share-btn:hover { opacity: .85; }
.share-btn span { display: none; }
@media (min-width: 640px) { .share-btn span { display: inline; } }
.share-btn--x      { background: #000; color: white; }
.share-btn--fb     { background: #1877f2; color: white; }
.share-btn--wa     { background: #25d366; color: white; }
.share-btn--copy   { background: var(--border); color: var(--text-primary); }
.share-btn--copy.copied { background: #28a745; color: white; }

/* Article figure */
.article-figure { margin: var(--s5) calc(-1 * var(--s5)); }
@media (min-width: 768px) { .article-figure { margin: var(--s5) calc(-1 * var(--s6)); } }
.article-featured-img { width: 100%; max-height: 520px; object-fit: cover; }
.article-caption { font-size: var(--text-xs); color: var(--text-muted); padding: 6px var(--s5); font-style: italic; }

/* TL;DR */
.tldr {
  background: #fff8f8; border-left: 4px solid var(--accent);
  padding: var(--s4) var(--s5); margin: var(--s5) 0;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}
html.dark .tldr { background: #1f1010; }
.tldr-label { display: block; font-size: var(--text-xs); text-transform: uppercase; letter-spacing: 1px; color: var(--accent); margin-bottom: var(--s2); font-weight: 800; }
.tldr p { font-size: var(--text-md); line-height: var(--leading-normal); color: var(--text-secondary); margin: 0; }

/* Key Facts */
.key-facts {
  background: var(--surface-2); border: 1px solid var(--border);
  padding: var(--s4) var(--s5); margin: var(--s5) 0; border-radius: var(--radius-md);
}
.key-facts-title { font-size: var(--text-sm); font-weight: 800; text-transform: uppercase; letter-spacing: 1px; color: var(--accent); margin-bottom: var(--s3); }
.key-facts-list { display: flex; flex-direction: column; gap: var(--s2); }
.key-facts-list li { font-size: var(--text-sm); color: var(--text-secondary); }
.key-facts-list strong { color: var(--text-primary); }

/* Article body typography */
.article-body {
  font-size: var(--text-md); line-height: var(--leading-relaxed);
  color: var(--text-primary); margin: var(--s5) 0;
  max-width: 72ch;
}
.article-body p { margin-bottom: var(--s5); }
.article-body h2 {
  font-family: var(--font-serif); font-size: clamp(20px, 3vw, 26px); font-weight: 700;
  margin: var(--s7) 0 var(--s4); line-height: var(--leading-tight);
  padding-bottom: var(--s2); border-bottom: 2px solid var(--accent);
}
.article-body h3 {
  font-family: var(--font-serif); font-size: clamp(18px, 2.5vw, 22px);
  font-weight: 700; margin: var(--s6) 0 var(--s3); line-height: var(--leading-snug);
}
.article-body blockquote {
  border-left: 4px solid var(--accent); margin: var(--s6) 0;
  padding: var(--s4) var(--s5); background: var(--surface-2);
  font-size: 20px; font-style: italic; color: var(--text-secondary);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}
.article-body a { color: var(--accent); text-decoration: underline; }
.article-body ul, .article-body ol { padding-left: var(--s5); margin: var(--s4) 0; }
.article-body li { margin-bottom: var(--s2); }
.article-body img { max-width: 100%; margin: var(--s5) 0; border-radius: var(--radius-md); }
.article-body strong { font-weight: 700; }
.article-body em { font-style: italic; }
.article-body figure figcaption { font-size: var(--text-xs); color: var(--text-muted); margin-top: var(--s2); font-style: italic; }

/* Sources */
.sources-section { padding: var(--s5) 0; border-top: 1px solid var(--border); margin-top: var(--s5); }
.sources-section h3 { font-size: var(--text-sm); font-weight: 800; text-transform: uppercase; letter-spacing: 1px; margin-bottom: var(--s3); }
.sources-list { list-style: decimal; padding-left: var(--s5); }
.sources-list li { font-size: var(--text-sm); color: var(--text-secondary); margin-bottom: var(--s2); }
.sources-list a { color: var(--accent); word-break: break-all; }

/* Tags */
.article-tags { display: flex; align-items: center; flex-wrap: wrap; gap: var(--s2); margin: var(--s5) 0; }
.tags-label { font-size: var(--text-xs); font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--text-muted); }
.tag-pill {
  display: inline-block; background: var(--surface-2); border: 1px solid var(--border);
  color: var(--text-secondary); font-size: var(--text-xs); font-weight: 600;
  padding: 3px 10px; border-radius: 50px; transition: all var(--t-fast);
}
.tag-pill:hover { background: var(--accent); color: white; border-color: var(--accent); }

/* FAQ */
.faq-section { margin: var(--s6) 0; }
.faq-section h2 { font-family: var(--font-serif); font-size: var(--text-xl); font-weight: 700; margin-bottom: var(--s4); }
.faq-item {
  border-bottom: 1px solid var(--border);
  padding: var(--s3) 0;
}
.faq-question {
  font-weight: 700; font-size: var(--text-base); cursor: pointer;
  padding: var(--s2) 0; color: var(--text-primary);
  list-style: none; display: flex; justify-content: space-between; align-items: center;
}
.faq-question::after { content: '+'; font-size: 20px; color: var(--accent); flex-shrink: 0; }
details[open] .faq-question::after { content: '−'; }
.faq-answer { padding: var(--s3) 0; font-size: var(--text-sm); color: var(--text-secondary); line-height: var(--leading-relaxed); }

/* Article newsletter CTA */
.article-newsletter {
  background: var(--navy); color: white; padding: var(--s5);
  border-radius: var(--radius-md); margin: var(--s6) 0;
}
.article-newsletter h3 { font-size: var(--text-lg); margin-bottom: var(--s2); }
.article-newsletter p { font-size: var(--text-sm); opacity: .8; margin-bottom: var(--s4); }
.article-newsletter-row { display: flex; gap: var(--s3); flex-wrap: wrap; }
.article-newsletter-row .nv-input { flex: 1; min-width: 200px; }

/* Author bio card */
.author-bio-card {
  display: flex; gap: var(--s4); padding: var(--s5);
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius-md); margin: var(--s5) 0;
}
@media (max-width: 480px) { .author-bio-card { flex-direction: column; } }
.author-bio-avatar img, .author-bio-initials {
  width: 64px; height: 64px; border-radius: 50%; flex-shrink: 0; object-fit: cover;
}
.author-bio-initials {
  background: var(--accent); color: white; display: flex; align-items: center;
  justify-content: center; font-weight: 800; font-size: 22px;
}
.author-bio-content { flex: 1; min-width: 0; }
.author-bio-meta { display: flex; align-items: baseline; gap: var(--s3); margin-bottom: var(--s2); flex-wrap: wrap; }
.author-bio-name { font-weight: 800; font-size: var(--text-lg); }
.author-bio-job { font-size: var(--text-xs); color: var(--text-muted); text-transform: uppercase; letter-spacing: .5px; }
.author-bio-text { font-size: var(--text-sm); color: var(--text-secondary); margin-bottom: var(--s3); line-height: var(--leading-normal); }
.author-bio-links { display: flex; gap: var(--s2); flex-wrap: wrap; }

/* Comments */
.comments-section { margin-top: var(--s6); padding-top: var(--s5); border-top: 1px solid var(--border); }
.comment-count { color: var(--text-muted); font-weight: 400; }
.comment {
  padding: var(--s4) 0; border-bottom: 1px solid var(--border);
}
.comment-meta {
  display: flex; align-items: center; gap: var(--s3);
  margin-bottom: var(--s2); font-size: var(--text-xs); color: var(--text-muted);
}
.comment-meta strong { color: var(--text-primary); font-size: var(--text-sm); }
.comment-body { font-size: var(--text-sm); line-height: var(--leading-relaxed); }
.comment-form-wrap { margin-top: var(--s5); }
.comment-form-wrap h3 { margin-bottom: var(--s3); }
.comment-form-note { font-size: var(--text-xs); color: var(--text-muted); margin-bottom: var(--s4); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s4); }
@media (max-width: 480px) { .form-row { grid-template-columns: 1fr; } }
.form-group { display: flex; flex-direction: column; gap: var(--s2); margin-bottom: var(--s4); }
.form-group label { font-size: var(--text-sm); font-weight: 600; }
.form-msg { font-size: var(--text-sm); margin-top: var(--s3); padding: var(--s2) var(--s3); border-radius: var(--radius); }
.form-msg--success { background: #d4edda; color: #155724; }
.form-msg--error   { background: #f8d7da; color: #721c24; }

/* ── 15. BUTTONS + INPUTS ── */
.btn-primary {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--accent); color: white; border: 2px solid var(--accent);
  padding: 10px 22px; font-weight: 700; font-size: var(--text-sm);
  border-radius: var(--radius); cursor: pointer; transition: all var(--t-fast);
  white-space: nowrap;
}
.btn-primary:hover { background: var(--accent-dark); border-color: var(--accent-dark); color: white; }
.btn-outline {
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent; color: var(--text-primary); border: 2px solid var(--border);
  padding: 8px 16px; font-weight: 600; font-size: var(--text-sm);
  border-radius: var(--radius); cursor: pointer; transition: all var(--t-fast);
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }
.btn-sm { padding: 6px 14px; font-size: var(--text-xs); }

.nv-input {
  width: 100%; padding: 10px 14px;
  border: 1px solid var(--border); border-radius: var(--radius);
  font-size: var(--text-sm); font-family: inherit; color: var(--text-primary);
  background: var(--surface); transition: border-color var(--t-fast);
  outline: none; -webkit-appearance: none;
}
.nv-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(200,16,46,.12); }
.nv-input::placeholder { color: var(--text-muted); }

/* ── 16. NEWSLETTER BAR ── */
.newsletter-bar {
  background: var(--navy); color: white;
  padding: var(--s7) 0; margin-top: var(--s7);
}
.newsletter-bar-inner {
  display: flex; align-items: center; flex-wrap: wrap; gap: var(--s5);
}
.newsletter-bar-copy { flex: 1; min-width: 200px; }
.newsletter-bar-copy h3 { font-family: var(--font-serif); font-size: var(--text-2xl); margin-bottom: var(--s2); }
.newsletter-bar-copy p { opacity: .8; font-size: var(--text-sm); }
.newsletter-bar-form { display: flex; gap: var(--s3); flex-wrap: wrap; flex: 1; min-width: 280px; }
.newsletter-bar-form .nv-input { flex: 1; background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.2); color: white; }
.newsletter-bar-form .nv-input::placeholder { color: rgba(255,255,255,.5); }
.newsletter-bar-msg { font-size: var(--text-sm); opacity: .9; }

/* ── 17. FOOTER ── */
.site-footer { background: var(--navy); color: rgba(255,255,255,.75); margin-top: 0; }
.footer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s5) var(--s6);
  padding-top: var(--s7); padding-bottom: var(--s7);
}
@media (min-width: 768px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; } }
.footer-brand { grid-column: 1 / -1; }
@media (min-width: 768px) { .footer-brand { grid-column: auto; } }
.footer-desc { font-size: var(--text-sm); line-height: var(--leading-relaxed); margin-top: var(--s3); opacity: .75; max-width: 300px; }
.footer-social { display: flex; gap: var(--s3); margin-top: var(--s4); flex-wrap: wrap; }
.footer-social-link {
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(255,255,255,.1); color: white;
  display: flex; align-items: center; justify-content: center;
  transition: background var(--t-fast);
}
.footer-social-link:hover { background: var(--accent); }
.footer-col h4 {
  font-size: var(--text-xs); font-weight: 800; text-transform: uppercase; letter-spacing: 1.5px;
  color: white; margin-bottom: var(--s4); padding-bottom: var(--s2);
  border-bottom: 1px solid rgba(255,255,255,.15);
}
.footer-col ul { display: flex; flex-direction: column; gap: var(--s2); }
.footer-col a { font-size: var(--text-sm); color: rgba(255,255,255,.7); transition: color var(--t-fast); }
.footer-col a:hover { color: white; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); }
.footer-bottom-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: var(--s4); padding-bottom: var(--s4);
  flex-wrap: wrap; gap: var(--s3);
}
.footer-copy { font-size: var(--text-xs); opacity: .6; }
.footer-legal { display: flex; gap: var(--s4); }
.footer-legal a { font-size: var(--text-xs); color: rgba(255,255,255,.5); }
.footer-legal a:hover { color: white; }

/* Footer newsletter form */
.footer-newsletter-form .nv-input { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.15); color: white; }
.footer-newsletter-form .nv-input::placeholder { color: rgba(255,255,255,.4); }

/* ── 18. BOTTOM TAB BAR (mobile) ── */
.bottom-tabbar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 200;
  height: 60px; background: var(--surface);
  border-top: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-around;
  box-shadow: 0 -2px 12px rgba(0,0,0,.1);
}
@media (min-width: 1025px) { .bottom-tabbar { display: none; } }
body { padding-bottom: 60px; }
@media (min-width: 1025px) { body { padding-bottom: 0; } }
.tab-item {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 3px;
  color: var(--text-muted); font-size: 10px; font-weight: 600;
  min-width: 44px; min-height: 44px; padding: 4px 8px;
  border-radius: var(--radius); transition: color var(--t-fast);
}
.tab-item:hover, .tab-item--active { color: var(--accent); }

/* ── 19. BACK TO TOP ── */
.back-to-top {
  position: fixed; bottom: 80px; right: var(--s4);
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--navy); color: white;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-md); z-index: 100;
  transition: all var(--t-fast); opacity: 0; pointer-events: none;
}
.back-to-top.visible { opacity: 1; pointer-events: auto; }
.back-to-top:hover { background: var(--accent); transform: translateY(-2px); }
@media (min-width: 1025px) { .back-to-top { bottom: var(--s6); } }

/* ── 20. COOKIE CONSENT ── */
.cookie-banner {
  position: fixed; bottom: 70px; left: var(--s4); right: var(--s4);
  max-width: 680px; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg); z-index: 500; padding: var(--s5);
  margin: 0 auto;
}
@media (min-width: 720px) { .cookie-banner { bottom: var(--s4); } }
.cookie-banner-inner p { font-size: var(--text-sm); margin-bottom: var(--s4); line-height: var(--leading-normal); }
.cookie-actions { display: flex; gap: var(--s2); flex-wrap: wrap; justify-content: flex-end; }
.cookie-modal {
  position: fixed; inset: 0; display: flex; align-items: center; justify-content: center;
  z-index: 600; padding: var(--s4);
}
.cookie-modal-inner {
  background: var(--surface); border-radius: var(--radius-md);
  padding: var(--s6); max-width: 480px; width: 100%; box-shadow: var(--shadow-lg);
}
.cookie-modal-inner h3 { font-size: var(--text-xl); margin-bottom: var(--s5); }
.cookie-pref { margin-bottom: var(--s4); }
.toggle-label {
  display: flex; align-items: center; justify-content: space-between;
  cursor: pointer; font-size: var(--text-sm);
}
.toggle-label input[type=checkbox] { position: absolute; opacity: 0; width: 0; height: 0; }
.toggle-track {
  width: 44px; height: 24px; border-radius: 12px;
  background: var(--border); transition: background var(--t-fast); flex-shrink: 0;
  position: relative;
}
.toggle-track::after {
  content: ''; position: absolute; left: 2px; top: 2px;
  width: 20px; height: 20px; border-radius: 50%;
  background: white; transition: transform var(--t-fast);
}
.toggle-label input:checked + .toggle-track { background: var(--accent); }
.toggle-label input:checked + .toggle-track::after { transform: translateX(20px); }
.toggle-label input:disabled + .toggle-track { background: var(--accent); opacity: .6; }
.cookie-modal-actions { margin-top: var(--s5); }
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 590;
}

/* ── 21. NEWSLETTER POPUP (exit intent) ── */
.newsletter-popup {
  position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%);
  z-index: 700; width: min(480px, 90vw); background: var(--surface);
  border-radius: var(--radius-md); box-shadow: var(--shadow-lg); padding: var(--s6);
  text-align: center;
}
.popup-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.6); z-index: 699;
}
.popup-close {
  position: absolute; top: var(--s3); right: var(--s3);
  color: var(--text-muted); font-size: 18px; width: 32px; height: 32px;
  border-radius: 50%; background: var(--surface-2); display: flex; align-items: center; justify-content: center;
}
.popup-icon { font-size: 48px; margin-bottom: var(--s3); }
.newsletter-popup h3 { font-family: var(--font-serif); font-size: var(--text-2xl); margin-bottom: var(--s2); }
.newsletter-popup p { font-size: var(--text-sm); color: var(--text-secondary); margin-bottom: var(--s4); }
.popup-fine { font-size: 11px; color: var(--text-muted); margin-top: var(--s3); }

/* ── 22. CATEGORY / SEARCH / TAG PAGES ── */
.page-header {
  padding: var(--s5) 0; margin-bottom: var(--s5);
  border-bottom: 3px solid var(--accent);
}
.page-header-cat {
  display: inline-block; font-size: var(--text-xs); font-weight: 800;
  text-transform: uppercase; letter-spacing: 1px; margin-bottom: var(--s2);
  color: var(--accent);
}
.page-header h1 {
  font-family: var(--font-serif); font-size: clamp(28px, 5vw, 48px); font-weight: 800;
}
.page-header p { color: var(--text-secondary); margin-top: var(--s2); max-width: 600px; }

/* Pagination */
.pagination {
  display: flex; align-items: center; justify-content: center;
  gap: var(--s2); margin: var(--s7) 0; flex-wrap: wrap;
}
.page-link {
  min-width: 40px; height: 40px; border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  font-size: var(--text-sm); font-weight: 600;
  background: var(--surface); border: 1px solid var(--border);
  color: var(--text-primary); transition: all var(--t-fast);
}
.page-link:hover, .page-link--active {
  background: var(--accent); border-color: var(--accent); color: white;
}
.page-link--dots { border: none; background: transparent; cursor: default; }

/* ── 23. SEARCH ── */
.search-header { padding: var(--s5) 0; }
.search-form-big {
  display: flex; gap: var(--s3); margin-bottom: var(--s5);
}
.search-form-big .nv-input { font-size: var(--text-lg); }
.search-result-count { font-size: var(--text-sm); color: var(--text-muted); margin-bottom: var(--s5); }
.search-highlight { background: rgba(200,16,46,.15); color: var(--accent); padding: 1px 2px; border-radius: 2px; }

/* ── 24. ADMIN NOTICE ── */
.admin-bar {
  background: var(--accent); color: white; padding: var(--s2) var(--s4);
  text-align: center; font-size: var(--text-xs); font-weight: 600;
}
.admin-bar a { color: white; text-decoration: underline; margin-left: var(--s4); }

/* ── 25. UTILITIES ── */
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.text-accent { color: var(--accent); }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.flex { display: flex; }
.items-center { align-items: center; }
.gap-2 { gap: var(--s2); }
.gap-4 { gap: var(--s4); }

/* Print */
@media print {
  .main-nav, .topbar, .breaking-ticker, .ad-container,
  .sidebar, .newsletter-bar, .site-footer, .bottom-tabbar,
  .back-to-top, .share-buttons, .cookie-banner { display: none !important; }
  .content-grid { grid-template-columns: 1fr !important; }
  .article-body { max-width: 100%; }
}
