/* ============================================
   arabeuropa.online — Redesign 2026
   IBM Plex Sans Arabic | Monochrome + Red accent
   RTL-First | Mobile-First | Single-column focus
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans+Arabic:wght@300;400;500;600;700&display=swap');

:root {
  --font: 'IBM Plex Sans Arabic', 'Tajawal', sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;

  /* Palette — near-black + white + one accent */
  --c-bg: #FAFAFA;
  --c-surface: #FFFFFF;
  --c-text: #111111;
  --c-text-2: #555555;
  --c-text-3: #999999;
  --c-border: #E8E8E8;
  --c-border-subtle: #F0F0F0;
  --c-accent: #E63946;
  --c-accent-soft: rgba(230, 57, 70, 0.08);
  --c-accent-hover: #C62D3A;
  --c-tag-bg: #F2F2F2;
  --c-tag-text: #444444;
  --c-overlay: rgba(0, 0, 0, 0.04);

  /* Typography scale */
  --ts-xs: 0.75rem;
  --ts-sm: 0.8125rem;
  --ts-base: 0.9375rem;
  --ts-md: 1.0625rem;
  --ts-lg: 1.25rem;
  --ts-xl: 1.5rem;
  --ts-2xl: 1.875rem;
  --ts-3xl: 2.25rem;
  --ts-4xl: 3rem;

  /* Spacing */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 20px;
  --s-6: 24px;
  --s-8: 32px;
  --s-10: 40px;
  --s-12: 48px;
  --s-16: 64px;
  --s-20: 80px;

  /* Layout */
  --max-w: 800px;
  --max-w-wide: 1100px;
  --radius: 6px;
  --radius-full: 100px;

  /* Transitions */
  --ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ============================================
   DARK MODE
   ============================================ */
[data-theme="dark"] {
  --c-bg: #0A0A0A;
  --c-surface: #161616;
  --c-text: #E8E8E8;
  --c-text-2: #AAAAAA;
  --c-text-3: #666666;
  --c-border: #2A2A2A;
  --c-border-subtle: #1E1E1E;
  --c-accent: #FF6B6B;
  --c-accent-soft: rgba(255, 107, 107, 0.1);
  --c-accent-hover: #FF8A8A;
  --c-tag-bg: #222222;
  --c-tag-text: #BBBBBB;
  --c-overlay: rgba(255, 255, 255, 0.03);
}

/* ============================================
   RESET & BASE
   ============================================ */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; overflow-x: hidden; }

body {
  font-family: var(--font);
  background: var(--c-bg);
  color: var(--c-text);
  line-height: 1.8;
  min-height: 100vh;
  max-width: 100vw;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; }
ul, ol { list-style: none; }
button { font-family: inherit; cursor: pointer; }

.wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--s-5);
  width: 100%;
}

.wrap--wide {
  max-width: var(--max-w-wide);
}

/* Utility */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); border: 0;
}

/* ============================================
   HEADER
   ============================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--c-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* --- Top bar: logo + actions --- */
.header-top {
  border-bottom: 1px solid var(--c-border-subtle);
}

.header-inner {
  max-width: var(--max-w-wide);
  margin: 0 auto;
  padding: 0 var(--s-5);
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}

/* --- Logo --- */
.logo {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  text-decoration: none;
  flex-shrink: 0;
}

.logo-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
}

.logo-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.logo-title {
  font-size: var(--ts-lg);
  font-weight: 700;
  color: var(--c-text);
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.logo-tagline {
  font-size: var(--ts-xs);
  color: var(--c-text-3);
  font-weight: 400;
  line-height: 1;
  display: none;
}

@media (min-width: 480px) {
  .logo-tagline { display: block; }
}

/* --- Nav bar: desk tabs (always visible, scrollable on mobile) --- */
.header-nav {
  border-bottom: 1px solid var(--c-border);
  background: var(--c-surface);
}

.header-nav-inner {
  max-width: var(--max-w-wide);
  margin: 0 auto;
  padding: 0 var(--s-5);
  display: flex;
  align-items: center;
  gap: 0;
  height: 44px;
  overflow-x: auto;
  scrollbar-width: none;
}

.header-nav-inner::-webkit-scrollbar { display: none; }

/* Desktop: center the tabs */
@media (min-width: 768px) {
  .header-nav-inner {
    justify-content: center;
    gap: var(--s-1);
  }
}

.nav-tab {
  font-size: var(--ts-sm);
  font-weight: 500;
  color: var(--c-text-3);
  padding: var(--s-2) var(--s-4);
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
  text-decoration: none;
  display: flex;
  align-items: center;
  height: 100%;
}

.nav-tab:hover {
  color: var(--c-text);
}

.nav-tab.active {
  color: var(--c-accent);
  font-weight: 600;
  border-bottom-color: var(--c-accent);
}

/* Desktop: larger tab text */
@media (min-width: 768px) {
  .nav-tab {
    font-size: var(--ts-base);
    padding: var(--s-2) var(--s-5);
  }
}

.header-actions {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  flex-shrink: 0;
}

/* Header Search */
.header-search {
  display: flex;
  align-items: center;
}

.search-input {
  font-family: var(--font);
  font-size: var(--ts-sm);
  background: var(--c-overlay);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-full);
  padding: var(--s-1) var(--s-3);
  color: var(--c-text);
  width: 160px;
  transition: width 0.25s var(--ease), border-color 0.2s;
  outline: none;
  direction: rtl;
}

.search-input::placeholder {
  color: var(--c-text-3);
}

.search-input:focus {
  width: 260px;
  border-color: var(--c-accent);
}

@media (max-width: 480px) {
  .search-input { width: 100px; }
  .search-input:focus { width: 180px; }
}

/* Search Page */
.search-page {
  padding: var(--s-10) 0 var(--s-16);
}

.search-page-title {
  font-size: var(--ts-2xl);
  font-weight: 700;
  margin-bottom: var(--s-6);
}

.search-form {
  display: flex;
  gap: var(--s-2);
  margin-bottom: var(--s-6);
}

.search-form-input {
  font-family: var(--font);
  font-size: var(--ts-base);
  flex: 1;
  padding: var(--s-3) var(--s-4);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  background: var(--c-surface);
  color: var(--c-text);
  outline: none;
  direction: rtl;
}

.search-form-input:focus {
  border-color: var(--c-accent);
}

.search-form-btn {
  font-size: var(--ts-base);
  padding: var(--s-3) var(--s-6);
  background: var(--c-text);
  color: var(--c-bg);
  border: none;
  border-radius: var(--radius);
  font-weight: 500;
  transition: opacity 0.2s;
}

.search-form-btn:hover {
  opacity: 0.85;
}

.search-meta {
  font-size: var(--ts-sm);
  color: var(--c-text-2);
  margin-bottom: var(--s-6);
}

/* Theme toggle */
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: none;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-full);
  color: var(--c-text-2);
  transition: all 0.2s var(--ease);
}

.theme-toggle:hover {
  background: var(--c-overlay);
  color: var(--c-text);
}

.theme-toggle .icon-sun,
.theme-toggle .icon-moon { width: 16px; height: 16px; }
.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: block; }
[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
[data-theme="dark"] .theme-toggle .icon-moon { display: none; }

/* ============================================
   APP-LIKE BACK BUTTON (inner pages)
   ============================================ */
.page-back {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  font-size: var(--ts-sm);
  font-weight: 500;
  color: var(--c-text-3);
  margin-bottom: var(--s-4);
  padding: var(--s-3) 0;
  transition: color 0.2s var(--ease);
  cursor: pointer;
  background: none;
  border: none;
  font-family: var(--font);
  text-decoration: none;
}

.page-back:hover { color: var(--c-accent); }
.page-back svg { width: 16px; height: 16px; flex-shrink: 0; }

/* ============================================
   CATEGORY BAR — Horizontal pills
   ============================================ */
.category-bar {
  border-bottom: 1px solid var(--c-border-subtle);
  background: var(--c-bg);
  position: relative;
}

/* Scroll fade hints — wider, stronger gradient */
.category-bar::before,
.category-bar::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 48px;
  z-index: 2;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s;
}

.category-bar::before {
  right: 0;
  background: linear-gradient(to left, var(--c-bg) 20%, transparent);
}

.category-bar::after {
  left: 0;
  background: linear-gradient(to right, var(--c-bg) 20%, transparent);
}

.category-bar.has-scroll-start::after { opacity: 1; }
.category-bar.has-scroll-end::before { opacity: 1; }

/* Scroll arrow buttons — both directions */
.category-scroll {
  display: none;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--c-bg);
  color: var(--c-text-3);
  border: 1px solid var(--c-border);
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(0,0,0,0.1);
  transition: all 0.2s var(--ease);
  padding: 0;
}

.category-scroll svg { width: 14px; height: 14px; }
.category-scroll:hover {
  background: var(--c-text);
  color: var(--c-bg);
  border-color: var(--c-text);
  transform: translateY(-50%) scale(1.05);
}

/* RTL: "start" = right side, "end" = left side */
.category-scroll--start { right: 8px; }
.category-scroll--end { left: 8px; }

/* Only show when there's overflow in that direction */
.category-bar.has-scroll-start .category-scroll--start { display: flex; }
.category-bar.has-scroll-end .category-scroll--end { display: flex; }

.category-bar-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: var(--s-3) var(--s-5);
  display: flex;
  gap: var(--s-2);
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}

.category-bar-inner::-webkit-scrollbar { display: none; }

.category-bar-link {
  color: var(--c-text-3);
  font-size: var(--ts-sm);
  font-weight: 500;
  padding: 6px var(--s-4);
  white-space: nowrap;
  border-radius: var(--radius-full);
  transition: all 0.2s var(--ease);
  background: var(--c-overlay);
  border: 1px solid transparent;
}

.category-bar-link:hover {
  background: var(--c-tag-bg);
  color: var(--c-text);
  border-color: var(--c-border);
}

.category-bar-link.active {
  background: var(--c-text);
  color: var(--c-bg);
  border-color: var(--c-text);
}

/* Extra padding when scroll arrows are visible */
.category-bar.has-scroll-end .category-bar-inner { padding-left: 44px; }
.category-bar.has-scroll-start .category-bar-inner { padding-right: 44px; }

@media (max-width: 767px) {
  .category-bar-link {
    font-size: var(--ts-xs);
    padding: 5px var(--s-3);
  }
}

/* (desk-bar styles removed — replaced by desk-tabs in header) */

/* ============================================
   MAIN CONTENT AREA
   ============================================ */
main {
  flex: 1;
  padding: var(--s-8) 0;
}

/* ============================================
   HOMEPAGE HERO — Lead story + sidebar
   ============================================ */
.hero-section {
  max-width: var(--max-w-wide);
  margin: 0 auto;
  padding: 0 var(--s-5) var(--s-8);
}

.hero-grid {
  display: flex;
  flex-direction: column;
  gap: var(--s-6);
}

/* Lead story */
.hero-lead-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.hero-lead-image {
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: var(--s-5);
}

.hero-lead-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
}

.hero-lead-title {
  font-size: var(--ts-2xl);
  font-weight: 700;
  line-height: 1.4;
  color: var(--c-text);
  margin-bottom: var(--s-3);
  transition: color 0.2s var(--ease);
}

.hero-lead:hover .hero-lead-title { color: var(--c-accent); }

.hero-lead-excerpt {
  font-size: var(--ts-md);
  line-height: 1.75;
  color: var(--c-text-2);
  margin-bottom: var(--s-3);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Sidebar stories */
.hero-sidebar {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.sidebar-card {
  padding: var(--s-5) 0;
  border-bottom: 1px solid var(--c-border-subtle);
}

.sidebar-card:last-child { border-bottom: none; }

.sidebar-card-link {
  text-decoration: none;
  color: inherit;
  display: flex;
  gap: var(--s-3);
  align-items: flex-start;
}

.sidebar-card-thumb {
  width: 80px;
  height: 80px;
  flex-shrink: 0;
  border-radius: var(--radius);
  overflow: hidden;
}

.sidebar-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sidebar-card-body {
  flex: 1;
  min-width: 0;
}

.sidebar-card-title {
  font-size: var(--ts-base);
  font-weight: 700;
  line-height: 1.5;
  color: var(--c-text);
  margin-bottom: var(--s-2);
  transition: color 0.2s var(--ease);
}

.sidebar-card:hover .sidebar-card-title { color: var(--c-accent); }

.sidebar-card-excerpt {
  font-size: var(--ts-sm);
  line-height: 1.6;
  color: var(--c-text-3);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: var(--s-2);
}

/* Desktop hero: 2-column grid */
@media (min-width: 768px) {
  .hero-grid {
    display: grid;
    grid-template-columns: 3fr 2fr;
    gap: var(--s-8);
    align-items: start;
  }

  .hero-lead-title {
    font-size: var(--ts-3xl);
    line-height: 1.35;
  }

  .hero-sidebar {
    border-right: 1px solid var(--c-border-subtle);
    padding-right: var(--s-6);
  }
}

/* ============================================
   HOMEPAGE FEED — Article grid
   ============================================ */
.feed-section {
  border-top: 1px solid var(--c-border);
  padding-top: var(--s-8);
}

.feed-container {
  max-width: var(--max-w-wide);
  margin: 0 auto;
  padding: 0 var(--s-5);
}

.feed-grid {
  display: flex;
  flex-direction: column;
}

.feed-card {
  padding: var(--s-5) 0;
  border-bottom: 1px solid var(--c-border-subtle);
}

.feed-card:last-child { border-bottom: none; }

.feed-card-link {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
}

.feed-card-image {
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: var(--s-4);
}

.feed-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
}

.feed-card-title {
  font-size: var(--ts-lg);
  font-weight: 700;
  line-height: 1.5;
  color: var(--c-text);
  margin-bottom: var(--s-2);
  transition: color 0.2s var(--ease);
}

.feed-card:hover .feed-card-title { color: var(--c-accent); }

.feed-card-excerpt {
  font-size: var(--ts-sm);
  line-height: 1.7;
  color: var(--c-text-2);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: var(--s-2);
}

/* Desktop feed: 2-column grid */
@media (min-width: 768px) {
  .feed-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--s-6);
  }

  .feed-card {
    padding: var(--s-5);
    border: 1px solid var(--c-border-subtle);
    border-radius: var(--radius);
    background: var(--c-surface);
  }

  .feed-card:last-child { border-bottom: 1px solid var(--c-border-subtle); }
}

/* Large desktop: 3-column grid */
@media (min-width: 1024px) {
  .feed-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Small chip variant */
.category-chip--sm {
  font-size: 0.6875rem;
  padding: 2px var(--s-2);
}

/* ============================================
   FEATURED SECTION — Legacy (kept for compat)
   ============================================ */
.featured-section {
  padding: 0 0 var(--s-8);
}

.featured-grid {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--s-5);
  display: flex;
  flex-direction: column;
  gap: var(--s-8);
}

.featured-card {
  display: block;
}

.featured-card .card-link {
  display: block;
  color: inherit;
}

.featured-card--main .featured-title {
  font-size: var(--ts-2xl);
  font-weight: 700;
  line-height: 1.4;
  color: var(--c-text);
  letter-spacing: -0.01em;
}

@media (min-width: 480px) {
  .featured-card--main .featured-title {
    font-size: var(--ts-3xl);
    line-height: 1.35;
  }
}

.featured-title {
  font-size: var(--ts-xl);
  font-weight: 700;
  line-height: 1.45;
  color: var(--c-text);
  margin-bottom: var(--s-3);
  transition: color 0.2s var(--ease);
}

.featured-card:hover .featured-title { color: var(--c-accent); }

.featured-excerpt {
  color: var(--c-text-2);
  font-size: var(--ts-base);
  line-height: 1.8;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: var(--s-3);
}

.featured-card--main .featured-excerpt {
  font-size: var(--ts-md);
}

.featured-card--main + .featured-card {
  padding-top: var(--s-8);
  border-top: 1px solid var(--c-border);
}

/* ============================================
   CATEGORY CHIP
   ============================================ */
.category-chip {
  display: inline-block;
  padding: var(--s-1) var(--s-3);
  border-radius: var(--radius-full);
  font-size: var(--ts-xs);
  font-weight: 600;
  background: var(--c-accent-soft);
  color: var(--c-accent);
  margin-bottom: var(--s-3);
  letter-spacing: 0.02em;
}

.country-chip {
  display: inline-block;
  padding: var(--s-1) var(--s-3);
  border-radius: var(--radius-full);
  font-size: 0.6875rem;
  font-weight: 500;
  background: var(--c-overlay);
  color: var(--c-text-3);
  margin-bottom: var(--s-3);
  letter-spacing: 0.02em;
}

.article-tags {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  flex-wrap: wrap;
}

.category-chip--article {
  font-size: var(--ts-sm);
  padding: var(--s-1) var(--s-4);
  margin-bottom: 0;
}

.article-tags {
  display: flex;
  gap: var(--s-2);
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: var(--s-4);
}

.topic-chip {
  display: inline-block;
  font-size: var(--ts-xs);
  font-weight: 600;
  padding: var(--s-1) var(--s-3);
  border-radius: var(--radius-full);
  white-space: nowrap;
}

.topic-chip--politics { background: #EDE7F6; color: #5E35B1; }
.topic-chip--economy { background: #E3F2FD; color: #1565C0; }
.topic-chip--migration { background: #FFF3E0; color: #E65100; }
.topic-chip--rights { background: #FCE4EC; color: #C62828; }
.topic-chip--society { background: #E8F5E9; color: #2E7D32; }

[data-theme="dark"] .topic-chip--politics { background: rgba(94,53,177,0.15); color: #B39DDB; }
[data-theme="dark"] .topic-chip--economy { background: rgba(21,101,192,0.15); color: #90CAF9; }
[data-theme="dark"] .topic-chip--migration { background: rgba(230,81,0,0.15); color: #FFB74D; }
[data-theme="dark"] .topic-chip--rights { background: rgba(198,40,40,0.15); color: #EF9A9A; }
[data-theme="dark"] .topic-chip--society { background: rgba(46,125,50,0.15); color: #A5D6A7; }

/* ============================================
   CARD META
   ============================================ */
.card-meta {
  display: flex;
  align-items: center;
  gap: var(--s-4);
  margin-top: var(--s-3);
  font-size: var(--ts-xs);
  color: var(--c-text-3);
}

.meta-date, .meta-time {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.meta-date svg, .meta-time svg {
  opacity: 0.4;
  flex-shrink: 0;
}

/* Card sourcing indicators */
.card-sourcing {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  margin-top: var(--s-2);
  font-size: var(--ts-xs);
}

.card-source-count {
  color: var(--c-text-3);
}

.card-confidence {
  font-size: 0.6875rem;
  padding: 1px 6px;
  border-radius: var(--radius-full);
  font-weight: 500;
}

.card-confidence--corroborated {
  background: rgba(16, 185, 129, 0.1);
  color: #059669;
}

.card-confidence--attributed {
  background: rgba(139, 92, 246, 0.1);
  color: #7C3AED;
}

/* Correction banner */
.correction-banner {
  background: rgba(234, 179, 8, 0.1);
  border: 1px solid rgba(234, 179, 8, 0.3);
  border-radius: var(--radius);
  padding: var(--s-4) var(--s-5);
  margin-bottom: var(--s-5);
  font-size: var(--ts-sm);
  color: var(--c-text);
  line-height: 1.6;
}

.correction-banner strong {
  color: #b45309;
}

/* Source box empty state */
.source-box-empty {
  color: var(--c-text-3);
  font-size: var(--ts-sm);
  font-style: italic;
}

.meta-reading-time {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: var(--c-accent);
  font-weight: 600;
}

/* ============================================
   MONETIZATION SLOTS
   ============================================ */
.ad-slot {
  width: 100%;
  margin: var(--s-6) 0;
  overflow: hidden;
}

.ad-slot > * {
  max-width: 100%;
}

.ad-slot ins,
.ad-slot iframe {
  max-width: 100% !important;
}

.ad-slot--article-inline {
  margin-top: var(--s-7);
  margin-bottom: var(--s-7);
}

.ad-slot--in-content {
  margin: var(--s-6) 0;
}

.ad-slot--sidebar {
  margin-top: var(--s-5);
}

.ad-slot--article-end {
  margin-top: var(--s-7);
  margin-bottom: var(--s-3);
}

.ad-slot--feed {
  margin-top: var(--s-5);
  margin-bottom: var(--s-2);
}

@media (max-width: 899px) {
  .ad-slot--sidebar {
    display: none;
  }
}

@media (min-width: 768px) {
  .feed-grid .ad-slot--feed,
  .articles-grid .ad-slot--feed {
    grid-column: 1 / -1;
  }
}

/* ============================================
   ARTICLE STREAM — list layout, no boxes
   ============================================ */
.articles-grid {
  max-width: var(--max-w-wide);
  margin: 0 auto;
  padding: 0 var(--s-5);
  display: flex;
  flex-direction: column;
}

@media (min-width: 768px) {
  .articles-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--s-6);
  }

  .articles-grid .card {
    padding: var(--s-5);
    border: 1px solid var(--c-border-subtle);
    border-radius: var(--radius);
    background: var(--c-surface);
    border-bottom: 1px solid var(--c-border-subtle);
  }
}

@media (min-width: 1024px) {
  .articles-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.card {
  padding: var(--s-6) 0;
  border-bottom: 1px solid var(--c-border);
  background: none;
  display: flex;
  flex-direction: column;
}

.card:last-child { border-bottom: none; }

.card-link {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
}

.card-title {
  font-size: var(--ts-lg);
  font-weight: 700;
  color: var(--c-text);
  line-height: 1.5;
  margin-bottom: var(--s-2);
  transition: color 0.2s var(--ease);
}

.card:hover .card-title { color: var(--c-accent); }

.card-excerpt {
  color: var(--c-text-2);
  font-size: var(--ts-base);
  line-height: 1.75;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.read-more {
  color: var(--c-accent);
  font-weight: 600;
  font-size: var(--ts-xs);
}

/* Why It Matters — card inline */
.card-why {
  font-size: var(--ts-xs);
  color: var(--c-accent);
  font-weight: 500;
  margin-top: var(--s-2);
  padding: var(--s-2) var(--s-3);
  background: var(--c-accent-soft);
  border-radius: var(--radius);
  line-height: 1.6;
}

/* Expandable cards */
.card--expandable .card-expanded {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s var(--ease);
}

.card--expandable.is-expanded .card-expanded {
  margin-top: var(--s-4);
}

.card-expanded-text {
  color: var(--c-text-2);
  font-size: var(--ts-base);
  line-height: 1.8;
  margin-bottom: var(--s-4);
}

.card-full-link {
  display: inline-block;
  font-size: var(--ts-sm);
  font-weight: 600;
  color: var(--c-accent);
  margin-top: var(--s-3);
}

.card-full-link:hover { color: var(--c-accent-hover); }

/* ============================================
   CATEGORY SECTIONS (Homepage)
   ============================================ */
.category-section {
  padding: var(--s-10) 0 var(--s-4);
}

.category-section:first-child { padding-top: 0; }

.section-header {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--s-5);
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--s-4);
}

.section-title {
  font-size: var(--ts-md);
  font-weight: 700;
  color: var(--c-text);
  display: flex;
  align-items: center;
  gap: var(--s-2);
}

.section-title::before {
  content: '';
  width: 3px;
  height: 1.1em;
  background: var(--c-accent);
  border-radius: 2px;
  flex-shrink: 0;
}

.section-title a { color: var(--c-text); }
.section-title a:hover { color: var(--c-accent); }

.section-more {
  font-size: var(--ts-xs);
  font-weight: 600;
  color: var(--c-accent);
  transition: opacity 0.2s;
}

.section-more:hover { opacity: 0.7; }

.category-section .articles-grid {
  padding-top: 0;
  padding-bottom: 0;
}

/* ============================================
   ARTICLE 2-COLUMN LAYOUT
   ============================================ */
.article-layout {
  width: 100%;
  max-width: var(--max-w-wide);
  margin: 0 auto;
  padding: 0 var(--s-5);
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}

.article-main {
  flex: 1;
  min-width: 0;
  max-width: 100%;
  overflow-wrap: break-word;
}

/* Desktop: side-by-side with sticky trust sidebar */
@media (min-width: 900px) {
  .article-layout {
    flex-direction: row;
    gap: var(--s-8);
    align-items: flex-start;
  }

  .trust-sidebar {
    width: 320px;
    flex-shrink: 0;
  }
}

@media (min-width: 1100px) {
  .trust-sidebar {
    width: 340px;
  }
}

/* --- Trust sidebar sections --- */
.trust-sidebar {
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
  padding-top: var(--s-5);
}

.sidebar-section {
  border: 1px solid var(--c-border-subtle);
  border-radius: var(--radius);
  background: var(--c-surface);
  overflow: hidden;
}

.sidebar-section--open {
  border-color: var(--c-border);
}

.sidebar-section__header {
  padding: var(--s-4);
}

.sidebar-section__eyebrow {
  font-size: var(--ts-xs);
  font-weight: 600;
  color: var(--c-text-3);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: block;
  margin-bottom: var(--s-1);
}

.sidebar-section__title {
  font-size: var(--ts-sm);
  font-weight: 700;
  color: var(--c-text);
  line-height: 1.4;
}

.sidebar-section__summary {
  font-size: var(--ts-xs);
  color: var(--c-text-2);
  line-height: 1.6;
  padding: 0 var(--s-4);
  margin-bottom: var(--s-3);
}

/* Sidebar stats row */
.sidebar-stats {
  display: flex;
  gap: var(--s-3);
  padding: var(--s-3) var(--s-4);
  border-top: 1px solid var(--c-border-subtle);
  background: var(--c-overlay);
}

.sidebar-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  gap: 2px;
}

.sidebar-stat__value {
  font-size: var(--ts-lg);
  font-weight: 700;
  color: var(--c-text);
}

.sidebar-stat__label {
  font-size: 0.625rem;
  color: var(--c-text-3);
  font-weight: 500;
}

.sidebar-methodology-link {
  display: block;
  text-align: center;
  padding: var(--s-3) var(--s-4);
  font-size: var(--ts-xs);
  color: var(--c-text-3);
  font-weight: 500;
  transition: color 0.2s;
}

.sidebar-methodology-link:hover {
  color: var(--c-accent);
}

/* Collapsible toggle (details/summary) */
.sidebar-section__toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--s-3) var(--s-4);
  font-size: var(--ts-sm);
  font-weight: 600;
  color: var(--c-text);
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.sidebar-section__toggle::-webkit-details-marker { display: none; }

.sidebar-section__toggle::after {
  content: '◂';
  font-size: var(--ts-xs);
  color: var(--c-text-3);
  transition: transform 0.2s var(--ease);
  margin-right: auto;
}

details[open] > .sidebar-section__toggle::after {
  transform: rotate(-90deg);
}

/* Sidebar source list */
.sidebar-source-list {
  padding: 0 var(--s-4) var(--s-3);
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
}

.sidebar-source-link {
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-decoration: none;
  color: inherit;
  padding: var(--s-2);
  border-radius: var(--radius);
  transition: background 0.15s;
  direction: ltr;
  text-align: left;
}

.sidebar-source-link:hover {
  background: var(--c-overlay);
}

.sidebar-source-name {
  font-size: var(--ts-xs);
  font-weight: 600;
  color: var(--c-text);
  display: flex;
  align-items: center;
  gap: var(--s-2);
  direction: ltr;
  text-align: left;
}

.sidebar-source-title {
  font-size: 0.6875rem;
  color: var(--c-text-3);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  direction: ltr;
  text-align: left;
}

/* Sidebar claim lists */
.sidebar-claim-list {
  padding: 0 var(--s-4) var(--s-3);
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
  font-size: var(--ts-xs);
  color: var(--c-text-2);
  line-height: 1.6;
}

.sidebar-claim-list li {
  padding-right: var(--s-3);
  border-right: 2px solid var(--c-accent-soft);
}

.sidebar-claim-list--muted li {
  border-right-color: var(--c-border);
}

.sidebar-claim-sources {
  font-size: 0.625rem;
  color: var(--c-text-3);
  margin-right: var(--s-1);
}

.sidebar-claim-attr {
  font-size: 0.625rem;
  color: var(--c-text-3);
  display: block;
  margin-top: 2px;
}

.sidebar-note {
  font-size: var(--ts-xs);
  color: var(--c-text-3);
  line-height: 1.6;
  padding: var(--s-3) var(--s-4);
  border: 1px solid var(--c-border-subtle);
  border-radius: var(--radius);
  background: var(--c-overlay);
}

/* ============================================
   ARTICLE DETAIL PAGE
   ============================================ */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 var(--s-5); width: 100%; }
.container--narrow { max-width: var(--max-w); }
.container--wide { max-width: var(--max-w-wide); padding: 0 var(--s-5); }

.article-detail {
  padding-bottom: var(--s-12);
}

/* Breadcrumb */
.breadcrumb {
  font-size: var(--ts-xs);
  color: var(--c-text-3);
  margin-bottom: var(--s-6);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--s-2);
}

.breadcrumb a {
  color: var(--c-text-3);
  transition: color 0.2s;
}

.breadcrumb a:hover { color: var(--c-accent); }

.breadcrumb .separator {
  color: var(--c-border);
  font-size: var(--ts-xs);
}

/* Article header */
.article-header { margin-bottom: var(--s-6); }

.article-tags {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  margin-bottom: var(--s-4);
  flex-wrap: wrap;
  justify-content: flex-start;
  direction: rtl;
}

.article-title {
  font-size: var(--ts-2xl);
  font-weight: 700;
  line-height: 1.5;
  color: var(--c-text);
  letter-spacing: -0.01em;
  margin-bottom: var(--s-4);
}

@media (min-width: 480px) {
  .article-title {
    font-size: var(--ts-3xl);
    line-height: 1.4;
  }
}

.article-meta {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  font-size: var(--ts-sm);
  color: var(--c-text-3);
  margin-bottom: var(--s-2);
}

.meta-sep {
  color: var(--c-border);
}

.article-byline {
  font-size: var(--ts-xs);
  color: var(--c-text-3);
}

/* Article Hero Image */
.article-hero {
  margin: 0 0 var(--s-6);
}

.article-hero__img {
  width: 100%;
  height: auto;
  max-height: 480px;
  object-fit: cover;
  object-position: center 30%;
  border-radius: var(--radius);
  display: block;
}

.article-hero__credit {
  font-size: var(--ts-xs);
  color: var(--c-text-3);
  margin-top: var(--s-2);
  text-align: left;
  direction: ltr;
}

/* Card Thumbnail */
.card-thumb {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--radius);
  margin-bottom: var(--s-3);
}

.card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  display: block;
}

/* Why It Matters */
.why-it-matters {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  padding: var(--s-5);
  font-size: var(--ts-base);
  color: var(--c-text-2);
  line-height: 1.8;
  margin-bottom: var(--s-8);
  border-right: 3px solid var(--c-accent);
}

.why-it-matters-label {
  font-weight: 700;
  font-size: var(--ts-sm);
  color: var(--c-accent);
  display: block;
  margin-bottom: var(--s-2);
}

.why-it-matters p {
  margin: 0;
}

/* ============================================
   VERIFICATION PANEL
   ============================================ */
.verification-panel {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  padding: var(--s-5);
  margin-bottom: var(--s-8);
}

.verification-panel__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: var(--s-4);
}

.verification-panel__eyebrow {
  font-size: var(--ts-xs);
  color: var(--c-text-3);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 500;
}

.verification-panel__title {
  font-size: var(--ts-md);
  font-weight: 700;
  color: var(--c-text);
  margin-top: var(--s-1);
}

.verification-panel__link {
  font-size: var(--ts-xs);
  color: var(--c-accent);
  font-weight: 500;
  white-space: nowrap;
  flex-shrink: 0;
}

.verification-panel__summary {
  font-size: var(--ts-sm);
  color: var(--c-text-2);
  line-height: 1.7;
  margin-bottom: var(--s-4);
}

.verification-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s-3);
}

@media (min-width: 480px) {
  .verification-grid { grid-template-columns: repeat(4, 1fr); }
}

.verification-stat {
  text-align: center;
  padding: var(--s-3);
  background: var(--c-overlay);
  border-radius: var(--radius);
}

.verification-stat__label {
  display: block;
  font-size: var(--ts-xs);
  color: var(--c-text-3);
  margin-bottom: var(--s-1);
}

.verification-stat strong {
  font-size: var(--ts-md);
  color: var(--c-text);
}

/* ============================================
   ARTICLE BODY & INSIGHTS
   ============================================ */
.article-insights {
  margin-bottom: var(--s-8);
}

.article-section {
  margin-bottom: var(--s-6);
}

.article-section__title {
  font-size: var(--ts-base);
  font-weight: 700;
  color: var(--c-text);
  margin-bottom: var(--s-2);
  display: flex;
  align-items: center;
  gap: var(--s-2);
}

.article-section--summary .article-section__title::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--c-accent); flex-shrink: 0; }
.article-section--impact .article-section__title::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: #F59E0B; flex-shrink: 0; }
.article-section--action .article-section__title::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: #10B981; flex-shrink: 0; }
.article-section--claims .article-section__title::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: #3B82F6; flex-shrink: 0; }
.article-section--attributed .article-section__title::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: #8B5CF6; flex-shrink: 0; }
.article-section--questions .article-section__title::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--c-text-3); flex-shrink: 0; }

.article-section__text {
  color: var(--c-text-2);
  font-size: var(--ts-base);
  line-height: 1.8;
}

/* Claim lists */
.claim-list { display: flex; flex-direction: column; gap: var(--s-3); }

.claim-item {
  padding: var(--s-3) var(--s-4);
  background: var(--c-overlay);
  border-radius: var(--radius);
}

.claim-item--attributed {
  border-right: 2px solid #8B5CF6;
}

.claim-item__text {
  font-size: var(--ts-sm);
  color: var(--c-text);
  line-height: 1.7;
}

.claim-item__meta {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  margin-top: var(--s-2);
  flex-wrap: wrap;
}

.claim-attribution {
  font-size: var(--ts-xs);
  color: var(--c-text-3);
  font-style: italic;
}

.claim-item__sources {
  display: flex;
  gap: var(--s-1);
  flex-wrap: wrap;
  margin-top: var(--s-1);
}

.claim-source-tag {
  font-size: 0.6875rem;
  padding: 1px 6px;
  background: var(--c-tag-bg);
  color: var(--c-tag-text);
  border-radius: var(--radius-full);
  font-weight: 500;
}

.claim-source-tag--single {
  background: rgba(139, 92, 246, 0.1);
  color: #8B5CF6;
}

/* Article point lists */
.article-point-list {
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
  list-style: none;
}

.article-point-list li {
  font-size: var(--ts-sm);
  color: var(--c-text);
  line-height: 1.7;
  padding-right: var(--s-5);
  position: relative;
}

.article-point-list li::before {
  content: '';
  position: absolute;
  right: 0;
  top: 0.65em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--c-accent);
}

.article-point-list--muted li::before {
  background: var(--c-text-3);
}

/* Article content */
.article-content {
  font-size: var(--ts-md);
  line-height: 2;
  color: var(--c-text);
  margin-bottom: var(--s-8);
}

.article-content p { margin-bottom: var(--s-5); }
.article-content h2, .article-content h3 {
  font-weight: 700;
  margin-top: var(--s-8);
  margin-bottom: var(--s-3);
}
.article-content h2 { font-size: var(--ts-xl); }
.article-content h3 { font-size: var(--ts-lg); }
.article-content ul, .article-content ol {
  padding-right: var(--s-5);
  margin-bottom: var(--s-5);
}
.article-content li { margin-bottom: var(--s-2); }
.article-content a { color: var(--c-accent); text-decoration: underline; text-underline-offset: 2px; }
.article-content a:hover { color: var(--c-accent-hover); }

/* Source box */
.source-box {
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  padding: var(--s-5);
  margin-bottom: var(--s-6);
}

.source-box-header {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  font-size: var(--ts-sm);
  font-weight: 600;
  color: var(--c-text);
  margin-bottom: var(--s-4);
}

.source-box-header svg { opacity: 0.5; flex-shrink: 0; }

.source-badge {
  font-size: var(--ts-xs);
  padding: 1px 8px;
  border-radius: var(--radius-full);
  font-weight: 500;
  margin-right: auto;
}

.source-badge--corroborated {
  background: rgba(16, 185, 129, 0.1);
  color: #059669;
}

.source-badge--explainer {
  background: rgba(59, 130, 246, 0.1);
  color: #2563EB;
}

.source-badge--attributed {
  background: rgba(139, 92, 246, 0.1);
  color: #7C3AED;
}

.source-list { display: flex; flex-direction: column; gap: var(--s-3); }

.source-list li { border-bottom: 1px solid var(--c-border-subtle); padding-bottom: var(--s-3); }
.source-list li:last-child { border-bottom: none; padding-bottom: 0; }

.source-link {
  display: flex;
  flex-direction: column;
  gap: var(--s-1);
}

.source-name {
  font-size: var(--ts-xs);
  font-weight: 600;
  color: var(--c-text-2);
  display: flex;
  align-items: center;
  gap: var(--s-2);
}

.source-kind-badge {
  font-size: 0.6875rem;
  padding: 0 6px;
  border-radius: var(--radius-full);
  background: var(--c-accent-soft);
  color: var(--c-accent);
  font-weight: 500;
}

.source-kind-badge--institutional {
  background: rgba(59, 130, 246, 0.1);
  color: #2563EB;
}

.source-title {
  font-size: var(--ts-sm);
  color: var(--c-text-3);
  line-height: 1.5;
}

.source-note {
  font-size: var(--ts-xs);
  color: var(--c-text-3);
  padding: var(--s-3) var(--s-4);
  background: var(--c-overlay);
  border-radius: var(--radius);
  margin-bottom: var(--s-6);
  line-height: 1.6;
}

/* Share section */
.share-section {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-3);
  padding: var(--s-5) 0;
  margin-top: var(--s-6);
  border-top: 1px solid var(--c-border);
  border-bottom: 1px solid var(--c-border);
}

.share-label {
  font-size: var(--ts-sm);
  color: var(--c-text-3);
  font-weight: 600;
}

.share-buttons {
  display: flex;
  gap: var(--s-3);
  flex-wrap: wrap;
}

.share-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: var(--c-surface);
  color: var(--c-text-2);
  cursor: pointer;
  transition: all 0.25s var(--ease);
  padding: 0;
  font-family: var(--font);
}

.share-btn svg { width: 18px; height: 18px; flex-shrink: 0; }

.share-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.share-btn--whatsapp { background: #25D366; color: white; }
.share-btn--whatsapp:hover { background: #1EBE57; color: white; }

.share-btn--telegram { background: #2AABEE; color: white; }
.share-btn--telegram:hover { background: #229ED9; color: white; }

.share-btn--x { background: var(--c-text); color: var(--c-bg); }
.share-btn--x:hover { opacity: 0.85; color: var(--c-bg); }

.share-btn--facebook { background: #1877F2; color: white; }
.share-btn--facebook:hover { background: #166FE5; color: white; }

.share-btn--copy { background: var(--c-bg-alt, #f0f0f0); color: var(--c-text-2); }
.share-btn--copy:hover { background: var(--c-border); color: var(--c-text); }
.share-btn--copy.is-copied { background: var(--c-accent); color: white; }

/* Related articles */
.related-section {
  max-width: var(--max-w-wide);
  margin: 0 auto;
  padding: var(--s-10) var(--s-5) 0;
  border-top: 1px solid var(--c-border);
}

.related-title {
  font-size: var(--ts-md);
  font-weight: 700;
  margin-bottom: var(--s-4);
  display: flex;
  align-items: center;
  gap: var(--s-2);
}

.related-title::before {
  content: '';
  width: 3px;
  height: 1.1em;
  background: var(--c-accent);
  border-radius: 2px;
}

.related-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-5);
}

@media (min-width: 600px) {
  .related-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.related-card {
  border: 1px solid var(--c-border-subtle);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow 0.2s var(--ease);
}

.related-card:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}

.related-card-link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.related-card-thumb {
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

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

.related-card-body {
  padding: var(--s-4);
}

.related-card-title {
  font-size: var(--ts-base);
  font-weight: 700;
  line-height: 1.5;
  color: var(--c-text);
  margin-top: var(--s-2);
  margin-bottom: var(--s-2);
}

.related-card-excerpt {
  font-size: var(--ts-sm);
  color: var(--c-text-2);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: var(--s-3);
}

/* ============================================
   CATEGORY HERO
   ============================================ */
.category-hero {
  padding: var(--s-8) 0 var(--s-4);
}

.category-hero .container { max-width: var(--max-w); }

.category-hero h1 {
  font-size: var(--ts-2xl);
  font-weight: 700;
  color: var(--c-text);
  letter-spacing: -0.01em;
}

/* ============================================
   DIGEST PAGE
   ============================================ */
.digest-hero {
  padding: var(--s-8) 0 var(--s-4);
}

.digest-hero .container { max-width: var(--max-w); }

.digest-hero h1 {
  font-size: var(--ts-2xl);
  font-weight: 700;
  color: var(--c-text);
  margin-bottom: var(--s-3);
}

.digest-stats {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  font-size: var(--ts-sm);
  color: var(--c-text-2);
  flex-wrap: wrap;
}

.digest-stat strong { color: var(--c-text); font-weight: 700; }
.digest-stat-sep { color: var(--c-text-3); }

.digest-category {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: var(--s-8) var(--s-5) 0;
}

.digest-category .section-header {
  padding: 0;
  margin-bottom: var(--s-3);
}

.digest-cat-count {
  font-size: var(--ts-xs);
  color: var(--c-text-3);
}

.digest-list {
  display: flex;
  flex-direction: column;
}

.digest-item {
  border-bottom: 1px solid var(--c-border-subtle);
}

.digest-item:last-child { border-bottom: none; }

.digest-item-link {
  display: block;
  padding: var(--s-4) 0;
  color: inherit;
  transition: opacity 0.2s;
}

.digest-item-link:hover { opacity: 0.7; }

.digest-item-title {
  font-size: var(--ts-base);
  font-weight: 700;
  line-height: 1.5;
  color: var(--c-text);
  margin-bottom: var(--s-1);
}

.digest-item-excerpt {
  font-size: var(--ts-sm);
  color: var(--c-text-2);
  line-height: 1.7;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: var(--s-2);
}

/* ============================================
   BADGES
   ============================================ */
.badge {
  display: inline-block;
  padding: 1px 10px;
  border-radius: var(--radius-full);
  font-size: var(--ts-xs);
  font-weight: 600;
  white-space: nowrap;
}

.badge--corroborated {
  background: rgba(16, 185, 129, 0.1);
  color: #059669;
}

/* ============================================
   STATIC PAGES
   ============================================ */
.static-page {
  padding: var(--s-8) 0 var(--s-16);
}

.page-card {
  background: none;
}

.page-card h1 {
  font-size: var(--ts-2xl);
  font-weight: 700;
  color: var(--c-text);
  margin-bottom: var(--s-8);
  letter-spacing: -0.01em;
}

.page-card h2 {
  font-size: var(--ts-lg);
  font-weight: 700;
  color: var(--c-text);
  margin-top: var(--s-8);
  margin-bottom: var(--s-3);
}

.page-card p {
  color: var(--c-text-2);
  font-size: var(--ts-base);
  line-height: 1.9;
  margin-bottom: var(--s-4);
}

.page-card ul {
  margin-bottom: var(--s-5);
}

.page-card li {
  color: var(--c-text-2);
  font-size: var(--ts-base);
  line-height: 1.8;
  padding-right: var(--s-5);
  padding-bottom: var(--s-2);
  position: relative;
}

.page-card li::before {
  content: '';
  position: absolute;
  right: 0;
  top: 0.65em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--c-accent);
}

.page-card a {
  color: var(--c-accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.page-card a:hover { color: var(--c-accent-hover); }

.page-card strong { color: var(--c-text); font-weight: 700; }

/* Contact info */
.contact-info {
  display: flex;
  flex-direction: column;
  gap: var(--s-5);
  margin: var(--s-6) 0;
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: var(--s-4);
}

.contact-item .icon {
  font-size: var(--ts-xl);
  flex-shrink: 0;
}

.contact-item strong {
  display: block;
  font-size: var(--ts-sm);
  margin-bottom: var(--s-1);
}

/* ============================================
   COMPARE PAGE
   ============================================ */
.compare-columns {
  display: flex;
  flex-direction: column;
  gap: var(--s-6);
}

@media (min-width: 768px) {
  .compare-columns {
    flex-direction: row;
    gap: var(--s-8);
  }
  .compare-column { flex: 1; }
}

.compare-column {
  padding: var(--s-5);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
}

.compare-label {
  display: inline-block;
  font-size: var(--ts-xs);
  font-weight: 600;
  padding: var(--s-1) var(--s-3);
  border-radius: var(--radius-full);
  margin-bottom: var(--s-3);
}

.compare-label--original { background: var(--c-tag-bg); color: var(--c-tag-text); }
.compare-label--rewrite { background: var(--c-accent-soft); color: var(--c-accent); }

.compare-column h2 {
  font-size: var(--ts-lg);
  font-weight: 700;
  margin-bottom: var(--s-4);
}

.compare-column .content {
  font-size: var(--ts-sm);
  line-height: 1.8;
  color: var(--c-text-2);
}

.compare-column ul { margin-top: var(--s-4); }
.compare-column li {
  font-size: var(--ts-sm);
  margin-bottom: var(--s-2);
  color: var(--c-text-2);
}
.compare-column li a { color: var(--c-accent); }

/* ============================================
   SYSTEM BANNER
   ============================================ */
.system-banner {
  border-bottom: 1px solid rgba(230, 57, 70, 0.18);
  background: linear-gradient(180deg, rgba(230, 57, 70, 0.08), rgba(230, 57, 70, 0.03));
}

.system-banner .wrap {
  padding-top: var(--s-3);
  padding-bottom: var(--s-3);
}

.system-banner p {
  color: var(--c-text);
  font-size: var(--ts-sm);
  text-align: center;
}

/* ============================================
   EMPTY STATE
   ============================================ */
.empty-state {
  text-align: center;
  padding: var(--s-16) var(--s-5);
  color: var(--c-text-3);
}

.empty-state .icon { font-size: 3rem; margin-bottom: var(--s-4); opacity: 0.4; }
.empty-state p { font-size: var(--ts-base); }

/* ============================================
   PAGINATION & SCROLL
   ============================================ */
.scroll-sentinel { height: 1px; }

.scroll-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-3);
  padding: var(--s-6);
  color: var(--c-text-3);
  font-size: var(--ts-sm);
}

.scroll-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid var(--c-border);
  border-top-color: var(--c-accent);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  padding: var(--s-8) 0;
}

.pagination a, .pagination .current {
  padding: var(--s-2) var(--s-3);
  font-size: var(--ts-sm);
  border-radius: var(--radius);
}

.pagination a { color: var(--c-text-2); }
.pagination a:hover { background: var(--c-overlay); color: var(--c-text); }
.pagination .current { background: var(--c-text); color: var(--c-bg); font-weight: 600; }

/* ============================================
   FOOTER — Minimal
   ============================================ */
.site-footer {
  margin-top: auto;
  border-top: 1px solid var(--c-border);
  padding: var(--s-10) 0 var(--s-8);
  background: var(--c-bg);
}

.footer-inner {
  max-width: var(--max-w-wide);
  margin: 0 auto;
  padding: 0 var(--s-5);
}

.footer-top {
  display: flex;
  flex-direction: column;
  gap: var(--s-8);
  margin-bottom: var(--s-8);
}

@media (min-width: 600px) {
  .footer-top {
    flex-direction: row;
    justify-content: space-between;
  }
}

.footer-brand-section {}

.footer-brand {
  font-size: var(--ts-lg);
  font-weight: 700;
  color: var(--c-text);
  margin-bottom: var(--s-1);
}

.footer-tagline-text {
  font-size: var(--ts-sm);
  color: var(--c-text-3);
  margin-bottom: var(--s-2);
}

.footer-tagline {
  font-size: var(--ts-xs);
  color: var(--c-text-3);
  line-height: 1.6;
  max-width: 320px;
}

.footer-links {
  display: flex;
  gap: var(--s-10);
}

.footer-links-group {
  flex: 1;
}

.footer-links-group h3 {
  font-size: var(--ts-xs);
  font-weight: 600;
  color: var(--c-text-3);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: var(--s-3);
}

.footer-links-group a {
  display: block;
  font-size: var(--ts-sm);
  color: var(--c-text-2);
  padding: var(--s-1) 0;
  transition: color 0.2s;
}

.footer-links-group a:hover { color: var(--c-accent); }

.footer-categories {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2);
  padding: var(--s-5) 0;
  border-top: 1px solid var(--c-border-subtle);
  margin-bottom: var(--s-5);
}

.footer-categories a {
  font-size: var(--ts-xs);
  color: var(--c-text-3);
  padding: var(--s-1) var(--s-3);
  background: var(--c-overlay);
  border-radius: var(--radius-full);
  transition: all 0.2s;
}

.footer-categories a:hover {
  background: var(--c-tag-bg);
  color: var(--c-text);
}

.footer-bottom {
  padding-top: var(--s-5);
  border-top: 1px solid var(--c-border-subtle);
}

.footer-copy {
  font-size: var(--ts-xs);
  color: var(--c-text-3);
}

/* ============================================
   COOKIE BANNER
   ============================================ */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 200;
  background: var(--c-surface);
  border-top: 1px solid var(--c-border);
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
}

.cookie-banner-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: var(--s-4) var(--s-5);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-4);
  flex-wrap: wrap;
}

.cookie-banner-inner p {
  font-size: var(--ts-xs);
  color: var(--c-text-2);
  line-height: 1.6;
  flex: 1;
  min-width: 200px;
}

.cookie-banner-inner a { color: var(--c-accent); text-decoration: underline; }

.cookie-banner-actions {
  display: flex;
  gap: var(--s-2);
  flex-shrink: 0;
}

.cookie-btn {
  font-family: var(--font);
  font-size: var(--ts-xs);
  font-weight: 600;
  padding: var(--s-2) var(--s-4);
  border-radius: var(--radius-full);
  border: none;
  cursor: pointer;
  transition: all 0.2s var(--ease);
}

.cookie-btn--accept {
  background: var(--c-text);
  color: var(--c-bg);
}

.cookie-btn--accept:hover { opacity: 0.8; }

.cookie-btn--reject {
  background: var(--c-overlay);
  color: var(--c-text-2);
  border: 1px solid var(--c-border);
}

.cookie-btn--reject:hover {
  border-color: var(--c-text-3);
  color: var(--c-text);
}

/* ============================================
   AD SLOTS
   ============================================ */
.ad-slot {
  padding: var(--s-5) 0;
}

.ad-slot-inner {
  padding: var(--s-10) var(--s-5);
  text-align: center;
  font-size: var(--ts-xs);
  color: var(--c-text-3);
  background: var(--c-overlay);
  border-radius: var(--radius);
  border: 1px dashed var(--c-border);
}

/* ============================================
   UTILITIES
   ============================================ */
.text-sm { font-size: var(--ts-sm); }
.text-secondary { color: var(--c-text-2); }
.text-muted { color: var(--c-text-3); }
.mt-sm { margin-top: var(--s-3); }
.mt-md { margin-top: var(--s-4); }
.mt-lg { margin-top: var(--s-6); }

/* ============================================
   READING PROGRESS BAR (article pages)
   ============================================ */
.reading-progress {
  position: fixed;
  top: 0;
  right: 0;
  height: 3px;
  background: var(--c-accent);
  z-index: 200;
  width: 0;
  transition: width 0.1s linear;
  will-change: width;
}

/* ============================================
   BACK TO TOP
   ============================================ */
.back-to-top {
  position: fixed;
  bottom: var(--s-6);
  left: var(--s-6);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--c-text);
  color: var(--c-bg);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all 0.3s var(--ease);
  z-index: 90;
  box-shadow: 0 2px 12px rgba(0,0,0,0.15);
}

.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}

.back-to-top svg { width: 18px; height: 18px; }

/* ============================================
   PAGE TRANSITIONS — fade in
   ============================================ */
main {
  animation: fadeIn 0.4s var(--ease);
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ============================================
   RELATIVE TIME BADGE
   ============================================ */
.meta-relative {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: var(--c-accent);
  font-weight: 600;
  font-size: var(--ts-xs);
}

/* ============================================
   FEATURED — stronger hierarchy
   ============================================ */
.featured-card--main {
  padding-bottom: var(--s-8);
  border-bottom: 2px solid var(--c-accent);
}

.featured-card--main .category-chip {
  background: var(--c-accent);
  color: white;
}

.featured-card--main .featured-excerpt {
  -webkit-line-clamp: 4;
}

.featured-card--main .card-meta {
  margin-top: var(--s-4);
}

/* Secondary featured cards — smaller, tighter */
.featured-card:not(.featured-card--main) .featured-title {
  font-size: var(--ts-lg);
}

.featured-card:not(.featured-card--main) .featured-excerpt {
  font-size: var(--ts-sm);
  -webkit-line-clamp: 2;
  color: var(--c-text-3);
}

/* ============================================
   AUDIO PLAYER & SENTENCE HIGHLIGHTING
   ============================================ */
.sentence {
  transition: background 0.25s ease, box-shadow 0.25s ease;
  border-radius: 4px;
  padding: 2px 4px;
  margin: 0 -4px;
}

.sentence.is-active {
  background: rgba(230, 57, 70, 0.18);
  box-shadow: 0 0 0 4px rgba(230, 57, 70, 0.18);
  border-radius: 6px;
}

[data-theme="dark"] .sentence.is-active {
  background: rgba(255, 107, 107, 0.22);
  box-shadow: 0 0 0 4px rgba(255, 107, 107, 0.22);
}

.article-audio,
.digest-audio {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  padding: var(--s-4);
  margin-bottom: var(--s-5);
}

.article-audio__label,
.digest-audio__label {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  font-weight: 600;
  font-size: var(--ts-sm);
  margin-bottom: var(--s-3);
  color: var(--c-accent);
}

.article-audio__dur {
  font-weight: 400;
  color: var(--c-text-3);
  font-size: var(--ts-xs);
}

.article-audio__player,
.digest-audio__player {
  width: 100%;
  border-radius: var(--radius);
}

.digest-audio-generate {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  margin-top: var(--s-3);
  padding: var(--s-2) var(--s-4);
  background: var(--c-accent);
  color: white;
  border-radius: var(--radius);
  font-size: var(--ts-sm);
  text-decoration: none;
  transition: opacity 0.2s;
}

.digest-audio-generate:hover {
  opacity: 0.85;
}

/* Fixed floating bottom audio player */
.audio-bar {
  position: fixed;
  bottom: var(--s-4);
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  width: min(480px, calc(100% - var(--s-6)));
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: 16px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12), 0 1px 4px rgba(0, 0, 0, 0.06);
  overflow: hidden;
  direction: rtl;
}

[data-theme="dark"] .audio-bar {
  background: #1a1a1a;
  border-color: #2a2a2a;
  box-shadow: 0 4px 32px rgba(0, 0, 0, 0.5), 0 1px 6px rgba(0, 0, 0, 0.3);
}

/* Top progress bar spanning full width */
.audio-bar__progress-wrap {
  width: 100%;
  height: 3px;
  background: var(--c-border);
  cursor: pointer;
  position: relative;
}

.audio-bar__progress {
  height: 100%;
  background: var(--c-accent);
  width: 0%;
  transition: width 0.25s linear;
}

.audio-bar__inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-4);
  padding: var(--s-3) var(--s-4);
}

/* Rewind button */
.audio-bar__skip {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: var(--c-text-2);
  cursor: pointer;
  flex-shrink: 0;
  padding: 0;
  transition: color 0.2s, background 0.2s;
}

.audio-bar__skip:hover {
  color: var(--c-text);
  background: var(--c-bg);
}

.audio-bar__skip svg {
  width: 16px;
  height: 16px;
}

/* Play/pause button */
.audio-bar__play {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: var(--c-accent);
  color: white;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.2s, transform 0.15s;
  padding: 0;
}

.audio-bar__play:hover {
  background: var(--c-accent-hover, #c1303e);
  transform: scale(1.05);
}

.audio-bar__play:active {
  transform: scale(0.95);
}

.audio-bar__icon {
  width: 20px;
  height: 20px;
}

.audio-bar__icon--play {
  margin-right: -2px; /* optical centering for play triangle */
}

.audio-bar__icon--pause { display: none; }

.audio-bar.is-playing .audio-bar__icon--play { display: none; }
.audio-bar.is-playing .audio-bar__icon--pause { display: block; }

/* Time display */
.audio-bar__time {
  font-size: var(--ts-sm);
  color: var(--c-text-3);
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
  min-width: 6em;
  text-align: center;
  letter-spacing: 0.02em;
}

/* Label */
.audio-bar__label {
  font-size: var(--ts-xs);
  color: var(--c-text-3);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 4px;
}

.audio-bar__label svg {
  width: 20px;
  height: 20px;
  color: var(--c-accent);
}

/* Bottom padding so footer doesn't hide behind player */
body:has(.audio-bar) .site-footer {
  padding-bottom: 90px;
}

@media (max-width: 599px) {
  .audio-bar {
    bottom: var(--s-3);
    width: calc(100% - var(--s-5));
    border-radius: 14px;
  }

  .audio-bar__inner {
    gap: var(--s-2);
    padding: var(--s-2) var(--s-3);
  }

  .audio-bar__play {
    width: 40px;
    height: 40px;
  }

  .audio-bar__icon {
    width: 18px;
    height: 18px;
  }

  .audio-bar__time {
    font-size: var(--ts-xs);
  }

  .audio-bar__skip {
    width: 28px;
    height: 28px;
  }
}

/* ============================================
   PRINT
   ============================================ */
/* ============================================
   Admin Bar (public site, visible when logged in)
   ============================================ */
.admin-bar {
  background: #1e293b;
  color: #e2e8f0;
  font-size: 0.75rem;
  position: sticky;
  top: 0;
  z-index: 1001;
  padding: 0 var(--s-3);
  direction: ltr;
  text-align: left;
}

.admin-bar-inner {
  max-width: var(--max-w-wide);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: var(--s-2);
  height: 34px;
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: none;
}

.admin-bar-inner::-webkit-scrollbar { display: none; }

.admin-bar-badge {
  background: var(--c-accent);
  color: #fff;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  flex-shrink: 0;
}

.admin-bar-link {
  color: #94a3b8;
  text-decoration: none;
  transition: color 0.15s;
  flex-shrink: 0;
}

.admin-bar-link:hover { color: #e2e8f0; }

.admin-bar-actions {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  margin-left: auto;
  flex-shrink: 0;
}

.admin-bar-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #334155;
  color: #e2e8f0;
  border: none;
  padding: 4px 10px;
  border-radius: var(--radius);
  font-size: 0.7rem;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s;
  flex-shrink: 0;
  min-height: 26px;
}

.admin-bar-btn:hover { background: #475569; }
.admin-bar-btn--danger:hover { background: #991b1b; }

.admin-bar-btn--upload { cursor: pointer; }

@media (max-width: 480px) {
  .admin-bar-label { display: none; }
  .admin-bar-btn { padding: 4px 8px; }
}

@media print {
  .admin-bar, .site-header, .category-bar, .site-footer, .cookie-banner,
  .share-section, .theme-toggle, .nav-toggle, .back-to-top,
  .reading-progress, .audio-bar { display: none !important; }
  body { background: white; color: black; }
  .article-content { font-size: 12pt; }
  main { animation: none; }
}
