﻿/* ═══════════════════════════════════════════════════════════════
   News Network — Design System v2 (SEO + Mobile optimised)
   Palette: #0D0D0D near-black · #E8232A red · #F5F5F0 off-white
            #141414 card bg · #2A2A2A borders · #888 muted text
   Type: Arial / system sans-serif
   ═══════════════════════════════════════════════════════════════ */

/* ── Reset & Base ──────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --black:      #0D0D0D;
  --red:        #E8232A;
  --red-dark:   #B01A20;
  --white:      #F5F5F0;
  --card-bg:    #141414;
  --border:     #2A2A2A;
  --border-hover: #3a3a3a;
  --muted:      #888;
  --accent2:    #FFD600;
  --header-bg:  #0A0A0A;

  --font-display: Arial, Helvetica, sans-serif;
  --font-body:    Arial, Helvetica, sans-serif;
  --font-ui:      Arial, Helvetica, sans-serif;

  --radius: 4px;
  --transition: 220ms ease;
  --content-width: 860px;
  --site-width: 1280px;
}

/* ── Light theme ───────────────────────────────────────────── */
[data-theme="light"] {
  --black:      #FFFFFF;
  --white:      #111111;
  --card-bg:    #F2F2F2;
  --border:     #DDDDDD;
  --border-hover: #BBBBBB;
  --muted:      #666666;
  --header-bg:  #FFFFFF;
}

html {
  scroll-behavior: smooth;
  /* Prevent horizontal scroll from any overflow */
  overflow-x: hidden;
}

body {
  background: var(--black);
  color: var(--white);
  font-family: var(--font-ui);
  font-size: 16px;        /* Base 16px — Google mobile-friendly minimum */
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }

img {
  display: block;
  max-width: 100%;
  height: auto;           /* Always maintain aspect ratio */
}

/* ── Skip link for accessibility ───────────────────────────── */
.skip-link {
  position: absolute;
  top: -100%;
  left: 16px;
  padding: 8px 16px;
  background: var(--red);
  color: #fff;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: 0 0 4px 4px;
  z-index: 9999;
  transition: top 0.2s;
}
.skip-link:focus { top: 0; }

/* ── Site Header ───────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--header-bg);
  border-bottom: 2px solid var(--red);
}

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

.site-logo {
  font-family: var(--font-display);
  font-size: 2rem;
  letter-spacing: 0.04em;
  color: var(--white);
  line-height: 1;
  transition: color var(--transition);
  /* Accessible focus */
  border-radius: 2px;
}
.site-logo:hover { color: var(--red); }
.site-logo:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }

.header-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.header-tagline {
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.header-live {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  color: var(--red);
}

/* Theme toggle button */
.theme-toggle {
  background: none;
  border: 1px solid var(--border);
  color: var(--white);
  cursor: pointer;
  padding: 0 12px;
  min-height: 30px;
  border-radius: var(--radius);
  font-size: 0.72rem;
  font-weight: 600;
  font-family: var(--font-ui);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
  white-space: nowrap;
}
.theme-toggle:hover {
  background: var(--border);
  color: var(--white);
}
.theme-toggle:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }

/* Post page nav */
.header-nav {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 0.82rem;
  color: var(--muted);
}
.header-nav a:hover { color: var(--white); }
.header-nav a:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; border-radius: 2px; }

.nav-category {
  padding: 4px 10px;
  background: var(--red);
  color: var(--white);
  border-radius: 2px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ── Animations ────────────────────────────────────────────── */
@keyframes pulse-ring {
  0%   { transform: scale(0.5); opacity: 1; }
  100% { transform: scale(2.5); opacity: 0; }
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.4; }
}
@keyframes ticker {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
@keyframes fade-in-up {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

.live-dot, .pulse-dot {
  display: inline-block;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--red);
  position: relative;
  flex-shrink: 0;
  animation: pulse-dot 1.8s ease-in-out infinite;
}
.live-dot::before, .pulse-dot::before {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  background: var(--red);
  animation: pulse-ring 1.8s ease-out infinite;
}

/* ── Breaking Ticker ───────────────────────────────────────── */
.ticker-bar {
  background: var(--red);
  overflow: hidden;
  display: flex;
  align-items: center;
  height: 36px;
}

.ticker-label {
  flex-shrink: 0;
  padding: 0 16px;
  font-family: var(--font-display);
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  background: var(--header-bg);
  height: 100%;
  display: flex;
  align-items: center;
  border-right: 1px solid rgba(255,255,255,0.15);
  white-space: nowrap;
  position: relative;
  z-index: 1;
}

.ticker-track {
  display: flex;
  white-space: nowrap;
  animation: ticker 40s linear infinite;
}
.ticker-track:hover { animation-play-state: paused; }

.ticker-item {
  padding: 0 32px;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  opacity: 0.95;
}
.ticker-item::after {
  content: '·';
  margin-left: 32px;
  opacity: 0.5;
}

/* ── Hero / Featured section (index) ───────────────────────── */
.hero-section {
  border-bottom: 1px solid var(--border);
  padding: 28px 20px;
}

.hero-inner {
  max-width: var(--site-width);
  margin: 0 auto;
}

.hero-eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}

.hero-description {
  font-family: var(--font-ui);
  font-size: 0.92rem;
  color: var(--muted);
  margin: 0 0 18px;
  line-height: 1.5;
}

/* ── Cards ─────────────────────────────────────────────────── */
.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  min-width: 0;           /* Prevents grid blowout */
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
  animation: fade-in-up 0.3s ease both;
}
.card:hover {
  transform: translateY(-3px);
  border-color: var(--border-hover);
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}

.card-link {
  display: flex;
  flex-direction: column;
  height: 100%;
  /* Accessible focus */
  border-radius: var(--radius);
}
.card-link:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 2px;
  border-radius: var(--radius);
}

.card-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  position: relative;
  display: flex;
  align-items: flex-start;
  padding: 10px;
  overflow: hidden;       /* Clip image zoom */
}

/* Subtle gradient over card photo so badge is readable */
.card-image-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, rgba(0,0,0,0.4) 0%, rgba(0,0,0,0.05) 55%);
  pointer-events: none;
  z-index: 0;
}

.card-image--featured { aspect-ratio: 16 / 7; }

.card-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 2px;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #fff;
  position: relative;
  z-index: 1;
  white-space: nowrap;
}

.card-body {
  padding: 14px 16px 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.card-body--featured { padding: 20px 24px 24px; }

.card-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  line-height: 1.2;
  letter-spacing: 0.02em;
  color: var(--white);
  transition: color var(--transition);
  /* Wrap long headlines cleanly */
  overflow-wrap: break-word;
  word-break: break-word;
}
.card:hover .card-title { color: var(--white); }

.card-title--featured {
  font-size: 1.75rem;
  line-height: 1.1;
}

.card-excerpt {
  font-family: var(--font-ui);
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0;
}

.card-meta {
  font-size: 0.72rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: auto;
}

.card-meta-sep { opacity: 0.4; }

.card-read-more {
  font-family: var(--font-ui);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--red);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.card:hover .card-read-more { color: var(--red-dark); }

/* ── Featured card ─────────────────────────────────────────── */
.card--featured {
  grid-column: 1 / -1;
}

@media (min-width: 900px) {
  .card--featured .card-link     { flex-direction: row; }
  .card--featured .card-image--featured {
    aspect-ratio: auto;
    min-height: 280px;
    flex: 3;
  }
  .card--featured .card-body--featured {
    flex: 2;
    justify-content: center;
  }
  .card--featured .card-title--featured { font-size: 2.1rem; }
}

/* ── Main content (index) ──────────────────────────────────── */
.main-content { padding: 28px 20px 64px; }

.main-inner {
  max-width: var(--site-width);
  margin: 0 auto;
}

/* ── Filter bar ────────────────────────────────────────────── */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}

.filter-label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-right: 4px;
}

.filter-btn {
  /* Minimum 44×44px touch target (Google mobile requirement) */
  min-height: 44px;
  padding: 0 16px;
  border-radius: 2px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 500;
  font-family: var(--font-ui);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all var(--transition);
}
.filter-btn:hover {
  border-color: var(--cat-color, var(--red));
  color: var(--white);
}
.filter-btn:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 2px;
}
.filter-btn--active {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
}

/* ── Stats bar ─────────────────────────────────────────────── */
.stats-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0 20px;
  font-size: 0.72rem;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
}

/* ── Card Grid ─────────────────────────────────────────────── */
.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  min-height: 200px;
}

@media (min-width: 480px) {
  .card-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 768px) {
  .card-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 1100px) {
  .card-grid { grid-template-columns: repeat(4, 1fr); }
}

/* ── Pagination ────────────────────────────────────────────── */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 40px;
}

.page-btn {
  min-height: 44px;
  padding: 0 20px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  color: var(--white);
  border-radius: var(--radius);
  font-family: var(--font-ui);
  font-size: 0.82rem;
  cursor: pointer;
  transition: all var(--transition);
}
.page-btn:hover:not(:disabled) {
  background: var(--red);
  border-color: var(--red);
}
.page-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}
.page-btn:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }

.page-numbers { display: flex; flex-wrap: wrap; gap: 6px; }

.page-num-btn {
  min-width: 44px; min-height: 44px;
  display: flex; align-items: center; justify-content: center;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.82rem;
  color: var(--muted);
  cursor: pointer;
  transition: all var(--transition);
}
.page-num-btn:hover { border-color: var(--red); color: var(--white); }
.page-num-btn:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
.page-num-btn--active {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
  font-weight: 600;
}

/* ══════════════════════════════════════════════════════════════
   POST PAGE
   Structure: sticky header → breadcrumb → H1 + meta → image
              → article body → back link → related → footer
   ══════════════════════════════════════════════════════════════ */
.post-page .site-header { position: sticky; }

.post-main {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 20px 64px;
}

/* ── Breadcrumb ────────────────────────────────────────────── */
.post-breadcrumb {
  padding: 14px 0 0;
  font-size: 0.75rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}
.post-breadcrumb a {
  color: var(--muted);
  transition: color var(--transition);
}
.post-breadcrumb a:hover { color: var(--white); }
.post-breadcrumb a:focus-visible { outline: 2px solid var(--red); border-radius: 2px; }
.breadcrumb-sep { opacity: 0.4; font-size: 0.7rem; }
.breadcrumb-current { color: var(--white); font-weight: 500; }

/* ── Article header (H1 + meta, above image) ───────────────── */
.post-header {
  padding: 24px 0 0;
}

.post-category-badge {
  display: inline-block;
  padding: 4px 12px;
  background: var(--red);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border-radius: 2px;
  margin-bottom: 14px;
}

/* H1 — semantically first, above the image */
.post-title {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 5vw, 3rem);
  line-height: 1.08;
  letter-spacing: 0.02em;
  color: var(--white);
  margin-bottom: 16px;
  overflow-wrap: break-word;
  word-break: break-word;
}

.post-meta {
  font-size: 0.78rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 28px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}
.post-meta-sep { opacity: 0.4; }

.post-meta-author {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ── Hero image — BELOW the H1 ─────────────────────────────── */
.post-hero-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: var(--radius);
  display: block;
  margin-bottom: 8px;
  /* Smooth load */
  background: #1a1a1a;
}

.post-hero-placeholder {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  background: linear-gradient(135deg, #1a1a1a 0%, #242424 50%, #111 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
}

.post-hero-placeholder-text {
  font-size: 0.72rem;
  color: #444;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.post-hero-caption {
  font-size: 0.72rem;
  color: var(--muted);
  font-style: italic;
  margin-bottom: 32px;
  line-height: 1.5;
}

/* Image prompt notice (shown when no image generated yet) */
.image-prompt-notice {
  background: #111;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 32px;
  overflow: hidden;
}
.image-prompt-notice details { padding: 12px 16px; }
.image-prompt-notice summary {
  font-size: 0.78rem;
  color: var(--muted);
  cursor: pointer;
  user-select: none;
  min-height: 44px;
  display: flex;
  align-items: center;
}
.image-prompt-notice p {
  margin-top: 10px;
  font-size: 0.82rem;
  color: #aaa;
  font-style: italic;
  line-height: 1.6;
}

/* ── Share buttons ─────────────────────────────────────────── */
.post-share {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin: 0 0 28px;
}
.post-share-label {
  font-family: var(--font-ui);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  flex-shrink: 0;
}
.post-share-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  transition: transform var(--transition), opacity var(--transition);
  flex-shrink: 0;
}
.share-btn:hover  { transform: scale(1.12); }
.share-btn:active { transform: scale(0.95); }
.share-btn svg    { width: 19px; height: 19px; fill: #fff; }
.share-btn--whatsapp { background: #25D366; }
.share-btn--telegram { background: #229ED9; }
.share-btn--facebook { background: #1877F2; }
.share-btn--twitter  { background: #000; }
.share-btn--email    { background: #555; }
.share-btn--linkedin { background: #0A66C2; }

/* ── Article body ──────────────────────────────────────────── */
.post-article { padding: 4px 0 40px; }

.article-p {
  font-family: var(--font-body);
  font-size: 1.1rem;         /* Readable on mobile */
  line-height: 1.85;
  color: var(--white);
  margin-bottom: 24px;
  overflow-wrap: break-word;
}

/* First paragraph drop cap on desktop */
@media (min-width: 640px) {
  .post-article > .article-p:first-of-type::first-letter {
    font-family: var(--font-display);
    font-size: 3.8rem;
    line-height: 0.8;
    float: left;
    margin: 6px 10px 0 0;
    color: var(--red);
  }
}

.article-h2 {
  font-family: var(--font-display);
  font-size: 1.65rem;
  letter-spacing: 0.03em;
  color: var(--white);
  margin: 44px 0 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
  overflow-wrap: break-word;
}

.article-h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  letter-spacing: 0.03em;
  color: var(--white);
  margin: 32px 0 12px;
  overflow-wrap: break-word;
}

.article-quote {
  border-left: 3px solid var(--red);
  margin: 32px 0;
  padding: 14px 20px;
  color: var(--white);
  font-family: var(--font-body);
  font-style: italic;
  font-size: 1.1rem;
  background: var(--card-bg);
  border-radius: 0 var(--radius) var(--radius) 0;
}

/* List items */
.post-article ul,
.post-article ol {
  margin: 0 0 24px 28px;
}

.post-article li {
  font-family: var(--font-body);
  font-size: 1.05rem;
  color: var(--white);
  line-height: 1.75;
  margin-bottom: 6px;
}

.post-article strong { color: var(--white); font-weight: 600; }
.post-article em { color: var(--muted); font-style: italic; }

/* Inline links in article */
.post-article a {
  color: var(--red);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.post-article a:hover { color: #ff4a50; }

/* ── Topic tags ────────────────────────────────────────────── */
.post-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 32px 0 0;
  padding: 20px 0;
  border-top: 1px solid var(--border);
}

.post-tags-label {
  font-family: var(--font-ui);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-right: 4px;
  flex-shrink: 0;
}

.post-tag {
  font-family: var(--font-ui);
  font-size: 0.8rem;
  color: var(--muted);
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 2px;
  padding: 4px 10px;
  text-decoration: none;
  transition: var(--transition);
  white-space: nowrap;
}

.post-tag:hover {
  color: var(--white);
  border-color: var(--border-hover);
}

.post-tag--active {
  color: var(--white);
  border-color: var(--red);
  background: rgba(232, 35, 42, 0.08);
}

/* ── Author byline ─────────────────────────────────────────── */
.post-byline {
  font-family: var(--font-ui);
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 6px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.post-byline-link {
  color: var(--white);
  font-weight: 600;
  text-decoration: none;
}

.post-byline-link:hover { color: var(--red); }

.ai-disclosure { color: var(--muted); }

.ai-disclosure a {
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.ai-disclosure a:hover { color: var(--white); }

/* ── Further Reading / Sources ─────────────────────────────── */
.post-sources {
  margin: 40px 0 0;
  padding: 20px 24px;
  background: var(--card-bg);
  border-left: 3px solid var(--red);
  border-radius: var(--radius);
}

.post-sources-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--white);
  margin-bottom: 12px;
}

.sources-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sources-list li {
  font-family: var(--font-ui);
  font-size: 0.9rem;
  color: var(--muted);
  padding: 7px 0;
  border-bottom: 1px solid var(--border);
  line-height: 1.5;
}

.sources-list li:last-child { border-bottom: none; }

.sources-list a {
  color: var(--red);
  font-weight: 600;
  text-decoration: none;
}

.sources-list a:hover { text-decoration: underline; }

/* ── Back link ─────────────────────────────────────────────── */
.post-back {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.btn-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 20px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.82rem;
  color: var(--muted);
  transition: all var(--transition);
}
.btn-back:hover  { border-color: var(--red); color: var(--white); }
.btn-back:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }

/* ── Related Stories ───────────────────────────────────────── */
.related-section {
  padding: 48px 0 0;
  border-top: 1px solid var(--border);
}

.related-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}

.related-rule {
  flex: 1;
  height: 1px;
  background: var(--border);
}

.related-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  letter-spacing: 0.12em;
  color: var(--red);
  text-transform: uppercase;
  white-space: nowrap;
  flex-shrink: 0;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

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

.related-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  min-width: 0;
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}
.related-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-hover);
  box-shadow: 0 6px 20px rgba(0,0,0,0.45);
}

.related-card .card-link {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.related-card-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  position: relative;
  display: flex;
  align-items: flex-start;
  padding: 10px;
  overflow: hidden;
}

.related-card-body {
  padding: 12px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  min-width: 0;
}

.related-card-title {
  font-family: var(--font-display);
  font-size: 0.95rem;
  line-height: 1.2;
  letter-spacing: 0.02em;
  color: var(--white);
  transition: color var(--transition);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: break-word;
}
.related-card:hover .related-card-title { color: #fff; }

.related-footer {
  margin-top: 24px;
  padding-bottom: 8px;
  text-align: center;
}

.btn-all-stories {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 0 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--muted);
  background: transparent;
  transition: all var(--transition);
  letter-spacing: 0.04em;
}
.btn-all-stories:hover {
  border-color: var(--red);
  color: var(--white);
  background: rgba(232,35,42,0.06);
}
.btn-all-stories:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }

/* ── Footer ────────────────────────────────────────────────── */
.site-footer {
  background: #080808;
  border-top: 1px solid var(--border);
  padding: 40px 20px;
}

.footer-inner {
  max-width: var(--site-width);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-brand {}

.footer-logo {
  font-family: var(--font-display);
  font-size: 1.8rem;
  letter-spacing: 0.04em;
  color: var(--white);
  display: block;
  margin-bottom: 4px;
  line-height: 1;
}

.footer-tagline {
  font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  display: block;
  margin-bottom: 12px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  list-style: none;
  margin-bottom: 12px;
}
.footer-links a {
  font-size: 0.78rem;
  color: var(--muted);
  transition: color var(--transition);
}
.footer-links a:hover { color: var(--white); }

.footer-right { text-align: right; }

.footer-copy {
  font-size: 0.72rem;
  color: var(--muted);
  line-height: 1.9;
  display: block;
}

/* ── Reduced motion ────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .ticker-track { animation: none; }
  .live-dot, .pulse-dot { animation: none; }
  .live-dot::before, .pulse-dot::before { animation: none; }
  * {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

/* ── Tablet (641px – 900px) ────────────────────────────────── */
@media (min-width: 641px) and (max-width: 900px) {
  .post-title { font-size: 2.2rem; }
  .card-title--featured { font-size: 1.5rem; }
}

/* ── Mobile (≤ 640px) ──────────────────────────────────────── */
@media (max-width: 640px) {
  body { font-size: 15px; }

  .header-tagline { display: none; }
  .ticker-bar { display: none; }

  /* Post */
  .post-title { font-size: 1.75rem; }
  .article-p { font-size: 1rem; line-height: 1.75; }
  .article-h2 { font-size: 1.35rem; }
  .article-h3 { font-size: 1.1rem; }

  /* Cards */
  .card-title--featured { font-size: 1.25rem; }

  /* Pagination */
  .page-numbers { display: none; }

  /* Stats */
  .stats-bar { flex-direction: column; align-items: flex-start; gap: 4px; }

  /* Footer */
  .footer-right { display: none; }
  .footer-inner { flex-direction: column; }

  /* Related: 1 column on very small screens */
  .related-grid { grid-template-columns: 1fr; }
}

/* ── Very small (≤ 360px) ──────────────────────────────────── */
@media (max-width: 360px) {
  .header-inner { padding: 0 12px; }
  .post-main { padding: 0 12px 48px; }
  .main-content { padding: 20px 12px 48px; }
  .hero-section { padding: 20px 12px; }
}


/* ── Cookie Consent Banner ──────────────────────────────────── */
#cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #1A1A1A;
  border-top: 2px solid var(--red);
  z-index: 9999;
  transform: translateY(100%);
  transition: transform 280ms cubic-bezier(0.4, 0, 0.2, 1);
}
#cookie-banner.cookie-banner--visible { transform: translateY(0); }

.cookie-inner {
  max-width: var(--site-width);
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
.cookie-text {
  font-family: var(--font-ui);
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.5;
  flex: 1;
  min-width: 200px;
  margin: 0;
}
.cookie-link { color: var(--red); text-decoration: none; }
.cookie-link:hover { text-decoration: underline; }

.cookie-actions { display: flex; gap: 10px; flex-shrink: 0; }

.cookie-btn {
  font-family: var(--font-ui);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 8px 18px;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  min-height: 44px;
  transition: background var(--transition), color var(--transition);
}
.cookie-btn--accept { background: var(--red); color: #fff; }
.cookie-btn--accept:hover { background: var(--red-dark); }
.cookie-btn--decline {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border);
}
.cookie-btn--decline:hover { color: var(--white); border-color: var(--white); }

@media (max-width: 640px) {
  .cookie-inner { flex-direction: column; align-items: flex-start; gap: 12px; padding: 14px 16px; }
  .cookie-actions { width: 100%; }
  .cookie-btn { flex: 1; text-align: center; }
}
