/* ==========================================================================
   SIGNAL DAILY - PREMIUM STYLESHEET
   Highly Polished UI, Rich Glassmorphic Effects, Smooth Micro-Interactions,
   Advanced Responsive Layouts and Executive-Level Editorial Design.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. LOCAL WEB FONTS
   -------------------------------------------------------------------------- */
@font-face {
  font-family: "Manrope";
  src: url("./fonts/manrope-400.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Manrope";
  src: url("./fonts/manrope-500.ttf") format("truetype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Manrope";
  src: url("./fonts/manrope-600.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Manrope";
  src: url("./fonts/manrope-700.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Manrope";
  src: url("./fonts/manrope-800.ttf") format("truetype");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Space Grotesk";
  src: url("./fonts/space-grotesk-500.ttf") format("truetype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Space Grotesk";
  src: url("./fonts/space-grotesk-700.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* --------------------------------------------------------------------------
   2. DESIGN SYSTEM TOKENS & VARIABLES
   -------------------------------------------------------------------------- */
:root {
  color-scheme: dark;
  
  /* Core Palette */
  --bg-deep: #030611;
  --bg-dark: #070c1e;
  --text-primary: #f4f6fa;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  
  /* Glassmorphism & Borders */
  --glass-bg: rgba(9, 15, 34, 0.65);
  --glass-bg-soft: rgba(13, 20, 42, 0.45);
  --glass-border: rgba(255, 255, 255, 0.06);
  --glass-border-strong: rgba(255, 255, 255, 0.12);
  --glass-reflection: linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, transparent 40%, transparent 60%, rgba(255, 255, 255, 0.02) 100%);
  
  /* Brand Category Accents & Glows */
  --primary-orange: #ff5500;
  --primary-orange-glow: rgba(255, 85, 0, 0.35);
  --sand-accent: #e8c894;
  
  /* Signature Category Colors */
  --cat-webdev-ai: #00f0ff;
  --cat-webdev-ai-glow: rgba(0, 240, 255, 0.25);
  
  --cat-finance: #ffb800;
  --cat-finance-glow: rgba(255, 184, 0, 0.22);
  
  --cat-politics: #ff4655;
  --cat-politics-glow: rgba(255, 70, 85, 0.25);
  
  --cat-economy: #00ff9d;
  --cat-economy-glow: rgba(0, 255, 157, 0.22);
  
  --cat-stocks: #e5b3ff;
  --cat-stocks-glow: rgba(229, 179, 255, 0.22);
  
  --cat-self-employed: #ff00b8;
  --cat-self-employed-glow: rgba(255, 0, 184, 0.22);

  /* Layout & Shadows */
  --shadow-premium: 0 24px 60px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  --radius-xxl: 36px;
  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 12px;
  
  /* Fallbacks of old vars to ensure compatibility */
  --bg: var(--bg-deep);
  --bg-2: var(--bg-dark);
  --panel: var(--glass-bg);
  --panel-soft: var(--glass-bg-soft);
  --line: var(--glass-border);
  --line-strong: var(--glass-border-strong);
  --text: var(--text-primary);
  --muted: var(--text-secondary);
  --orange: var(--primary-orange);
  --sand: var(--sand-accent);
  --cyan: var(--cat-webdev-ai);
  --green: var(--cat-economy);
  --shadow: var(--shadow-premium);
}

/* --------------------------------------------------------------------------
   3. RESET & GLOBAL BASE STYLES
   -------------------------------------------------------------------------- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg-deep);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  line-height: 1.6;
}

/* --------------------------------------------------------------------------
   4. AMBIENT BACKGROUND & TEXTURE (Noise Grid & Orbs)
   -------------------------------------------------------------------------- */
/* Mesh Glow Effects */
body::before,
body::after {
  content: "";
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  z-index: -1;
  filter: blur(140px);
  opacity: 0.15;
}

/* Orange Orb Top-Left */
body::before {
  top: -15%;
  left: -10%;
  width: 50vw;
  height: 50vw;
  background: radial-gradient(circle, var(--primary-orange) 0%, transparent 70%);
}

/* Cyber-Blue Orb Top-Right */
body::after {
  top: 10%;
  right: -10%;
  width: 45vw;
  height: 45vw;
  background: radial-gradient(circle, var(--cat-webdev-ai) 0%, transparent 70%);
}

/* Extra Bottom Ambient Glow for Dashboard */
.app-shell::before,
.app-shell::after {
  content: "";
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  z-index: -1;
  filter: blur(160px);
  opacity: 0.12;
}

/* Magenta Orb Bottom-Left */
.app-shell::before {
  bottom: -10%;
  left: -5%;
  width: 40vw;
  height: 40vw;
  background: radial-gradient(circle, var(--cat-self-employed) 0%, transparent 70%);
}

/* Mint Green Orb Middle-Right */
.app-shell::after {
  top: 40%;
  right: -5%;
  width: 35vw;
  height: 35vw;
  background: radial-gradient(circle, var(--cat-economy) 0%, transparent 70%);
}

/* CSS-based Grid Texture Overlay */
.noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background-image: 
    linear-gradient(rgba(255, 255, 255, 0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(circle at center, black 50%, transparent 100%);
  opacity: 0.8;
}

/* Premium scrollbar styling */
::-webkit-scrollbar {
  width: 10px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: rgba(3, 6, 17, 0.4);
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  border: 2px solid var(--bg-deep);
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* Helper Class: Hidden */
.hidden {
  display: none !important;
}

/* --------------------------------------------------------------------------
   5. READING PROGRESS BAR
   -------------------------------------------------------------------------- */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  z-index: 1000;
  pointer-events: none;
  background: rgba(255, 255, 255, 0.02);
}

.reading-progress-bar {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, var(--primary-orange) 0%, var(--sand-accent) 50%, var(--cat-webdev-ai) 100%);
  box-shadow: 0 0 15px rgba(255, 85, 0, 0.5), 0 0 5px rgba(0, 240, 255, 0.3);
  transition: width 120ms ease-out;
}

/* --------------------------------------------------------------------------
   6. PREMIUM HEADER (Topline) & SEARCH BAR
   -------------------------------------------------------------------------- */
.app-shell {
  max-width: 100%;
  padding: 24px 4% 48px;
  position: relative;
}

.topline {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(auto, 620px);
  gap: 24px;
  align-items: center;
  padding: 24px 32px;
  background: var(--glass-bg);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xxl);
  box-shadow: var(--shadow-premium);
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
}

.topline::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--glass-reflection);
  pointer-events: none;
}

.wordmark-block {
  display: flex;
  flex-direction: column;
}

.wordmark {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: clamp(2.2rem, 3.8vw, 3.2rem);
  line-height: 0.95;
  letter-spacing: -0.04em;
  text-transform: uppercase;
  background: linear-gradient(135deg, var(--text-primary) 30%, #a5b4fc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

/* Pulsing Red Live Indicator next to logo */
.wordmark::after {
  content: "";
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: var(--cat-politics);
  box-shadow: 0 0 10px var(--cat-politics-glow), 0 0 2px var(--cat-politics);
  animation: livePulse 2s infinite ease-in-out;
}

@keyframes livePulse {
  0% { transform: scale(0.8); opacity: 0.5; box-shadow: 0 0 0 0 rgba(255, 70, 85, 0.7); }
  50% { transform: scale(1.2); opacity: 1; box-shadow: 0 0 0 8px rgba(255, 70, 85, 0); }
  100% { transform: scale(0.8); opacity: 0.5; box-shadow: 0 0 0 0 rgba(255, 70, 85, 0); }
}

/* Command / Search Bar */
.command-bar {
  display: flex;
  width: 100%;
  justify-content: flex-end;
}

.search-form {
  display: flex;
  gap: 12px;
  width: 100%;
}

.search-form input {
  flex: 1;
  padding: 16px 20px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--glass-border-strong);
  background: rgba(3, 6, 17, 0.5);
  color: var(--text-primary);
  font-size: 0.95rem;
  font-weight: 500;
  outline: none;
  transition: all 250ms ease;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

.search-form input:focus {
  border-color: rgba(255, 85, 0, 0.4);
  background: rgba(3, 6, 17, 0.75);
  box-shadow: 0 0 0 3px rgba(255, 85, 0, 0.15), inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

.search-form input::placeholder {
  color: var(--text-muted);
}

.search-form button,
.refresh-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 16px 24px;
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  border-radius: var(--radius-lg);
  border: none;
  cursor: pointer;
  white-space: nowrap;
  transition: all 200ms cubic-bezier(0.16, 1, 0.3, 1);
}

.search-form button {
  background: linear-gradient(135deg, var(--primary-orange) 0%, #ff7a3d 100%);
  color: #030611;
  box-shadow: 0 12px 28px rgba(255, 85, 0, 0.25);
}

.search-form button:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 36px rgba(255, 85, 0, 0.35);
  filter: brightness(1.1);
}

.search-form button:active {
  transform: translateY(0);
}

.refresh-button {
  background: var(--glass-bg-soft);
  border: 1px solid var(--glass-border);
  color: var(--text-primary);
}

.refresh-button:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--glass-border-strong);
  transform: translateY(-2px);
}

/* --------------------------------------------------------------------------
   7. HUD STRIP & CATEGORY FILTERS
   -------------------------------------------------------------------------- */
.hud-strip {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 24px;
  align-items: center;
  padding: 16px 24px;
  background: var(--glass-bg);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-premium);
  margin-bottom: 20px;
  overflow: hidden;
  position: relative;
}

.hud-strip::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--glass-reflection);
  pointer-events: none;
}

.hud-meta {
  display: flex;
  gap: 10px;
}

.hud-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.hud-chip strong {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.05rem;
  color: var(--sand-accent);
}

.hud-chip span {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* Dynamic Filter Pills */
.filter-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.filter-pill {
  padding: 11px 18px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  cursor: pointer;
  transition: all 200ms ease;
}

.filter-pill:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--glass-border-strong);
  color: var(--text-primary);
  transform: translateY(-1px);
}

.filter-pill.active {
  background: linear-gradient(135deg, rgba(255, 85, 0, 0.2) 0%, rgba(232, 200, 148, 0.15) 100%);
  border-color: rgba(255, 136, 0, 0.4);
  color: #fff4e5;
  box-shadow: 0 4px 15px rgba(255, 85, 0, 0.15);
  font-weight: 800;
}

/* --------------------------------------------------------------------------
   8. REAL-TIME SIGNAL STRIP (Financial/Tech Ticker)
   -------------------------------------------------------------------------- */
.signal-strip {
  margin-bottom: 24px;
}

.signal-ticker-wrap {
  padding: 16px 24px;
  background: rgba(4, 7, 18, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-premium);
  display: flex;
  align-items: center;
  gap: 20px;
  overflow: hidden;
  position: relative;
}

.signal-label {
  flex-shrink: 0;
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  padding: 6px 12px;
  border-radius: 6px;
  background: rgba(255, 85, 0, 0.1);
  border-left: 3px solid var(--primary-orange);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Custom Live pulse dot for ticker label */
.signal-label::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--primary-orange);
  box-shadow: 0 0 6px var(--primary-orange);
  animation: livePulseFast 1s infinite alternate;
}

@keyframes livePulseFast {
  0% { transform: scale(0.8); opacity: 0.6; }
  100% { transform: scale(1.3); opacity: 1; }
}

.headline-ticker {
  flex: 1;
  overflow: hidden;
  position: relative;
  /* Fade out edges so headlines fade into thin air elegantly */
  mask-image: linear-gradient(90deg, transparent 0%, #000 8%, #000 92%, transparent 100%);
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 8%, #000 92%, transparent 100%);
}

.headline-ticker-track {
  display: flex;
  width: max-content;
  gap: 16px;
  animation: ticker-scroll 85s linear infinite;
  padding: 4px 0;
}

.headline-ticker:hover .headline-ticker-track {
  animation-play-state: paused;
}

.ticker-link {
  min-width: 280px;
  max-width: 380px;
  padding: 10px 16px;
  font-family: "Manrope", sans-serif;
  font-size: 0.86rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: var(--radius-md);
  text-align: left;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: all 200ms ease;
}

.ticker-link:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* --------------------------------------------------------------------------
   9. EDITORIAL RAIL & MAIN DASHBOARD
   -------------------------------------------------------------------------- */
.dashboard {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

.lead-column {
  display: flex;
  flex-direction: column;
}

.editorial-rail {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
  padding: 0 4px;
}

.editorial-rail span {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--glass-border);
  color: var(--text-secondary);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

/* --------------------------------------------------------------------------
   10. MAIN CENTERPIECE: FEATURED STORY (Leitstory)
   -------------------------------------------------------------------------- */
.featured-story {
  margin-bottom: 24px;
}

.featured-card {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 32px;
  padding: 28px;
  background: var(--glass-bg);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xxl);
  box-shadow: var(--shadow-premium);
  position: relative;
  overflow: hidden;
  transition: all 400ms cubic-bezier(0.16, 1, 0.3, 1);
}

.featured-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--glass-reflection);
  pointer-events: none;
}

.featured-image-link {
  display: block;
  text-decoration: none;
  overflow: hidden;
  border-radius: var(--radius-xl);
}

.featured-image-wrap {
  position: relative;
  min-height: 440px;
  height: 100%;
  overflow: hidden;
  border-radius: var(--radius-xl);
  background: #090e1f;
  box-shadow: 0 15px 35px rgba(0,0,0,0.4);
}

.featured-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 600ms cubic-bezier(0.16, 1, 0.3, 1);
}

.featured-card:hover .featured-image {
  transform: scale(1.05);
}

/* FALLBACK COVER IMAGES (Mesh gradients) */
.featured-fallback,
.image-fallback,
.article-hero-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  padding: 24px;
  background: linear-gradient(135deg, rgba(255, 85, 0, 0.3), rgba(0, 240, 255, 0.1) 40%, rgba(9, 15, 34, 0.95) 100%);
  z-index: 1;
}

.featured-fallback-label,
.image-fallback-label,
.article-hero-fallback-label {
  display: inline-flex;
  padding: 10px 16px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 999px;
  background: rgba(3, 6, 17, 0.7);
  backdrop-filter: blur(12px);
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-primary);
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}

.featured-image.loaded ~ .featured-fallback,
.card-image.loaded ~ .image-fallback {
  display: none;
}

/* Featured Card Details */
.featured-body {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 6px 0;
}

.featured-meta,
.card-meta,
.article-meta {
  display: flex;
  gap: 12px;
  align-items: center;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-secondary);
}

.featured-source,
.card-source {
  color: var(--sand-accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.featured-separator,
.card-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
}

.featured-title {
  margin-top: 14px;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(1.8rem, 3.2vw, 2.8rem);
  line-height: 1.05;
  letter-spacing: -0.04em;
  font-weight: 700;
  color: var(--text-primary);
}

.featured-summary {
  margin-top: 16px;
  font-size: 0.98rem;
  line-height: 1.7;
  color: var(--text-secondary);
}

.featured-footer,
.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 24px;
  gap: 12px;
}

.featured-tag,
.topic-tag,
.reader-pill,
.article-stat {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-secondary);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

/* Category-specific styling for tag chips */
.featured-card[data-category="webdev-ai"] .featured-tag,
.news-card[data-category="webdev-ai"] .topic-tag {
  color: var(--cat-webdev-ai);
  border-color: rgba(0, 240, 255, 0.2);
  background: rgba(0, 240, 255, 0.04);
}

.featured-card[data-category="finance"] .featured-tag,
.news-card[data-category="finance"] .topic-tag {
  color: var(--cat-finance);
  border-color: rgba(255, 184, 0, 0.2);
  background: rgba(255, 184, 0, 0.04);
}

.featured-card[data-category="politics"] .featured-tag,
.news-card[data-category="politics"] .topic-tag {
  color: var(--cat-politics);
  border-color: rgba(255, 70, 85, 0.2);
  background: rgba(255, 70, 85, 0.04);
}

.featured-card[data-category="economy"] .featured-tag,
.news-card[data-category="economy"] .topic-tag {
  color: var(--cat-economy);
  border-color: rgba(0, 255, 157, 0.2);
  background: rgba(0, 255, 157, 0.04);
}

.featured-card[data-category="stocks"] .featured-tag,
.news-card[data-category="stocks"] .topic-tag {
  color: var(--cat-stocks);
  border-color: rgba(229, 179, 255, 0.2);
  background: rgba(229, 179, 255, 0.04);
}

.featured-card[data-category="self-employed"] .featured-tag,
.news-card[data-category="self-employed"] .topic-tag {
  color: var(--cat-self-employed);
  border-color: rgba(255, 0, 184, 0.2);
  background: rgba(255, 0, 184, 0.04);
}

/* Featured Story Call-to-action */
.featured-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 20px;
  background: linear-gradient(135deg, var(--sand-accent) 0%, #d4b273 100%);
  color: #030611;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(232, 200, 148, 0.2);
  transition: all 200ms cubic-bezier(0.16, 1, 0.3, 1);
}

.featured-card:hover .featured-button {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(232, 200, 148, 0.3);
  filter: brightness(1.08);
}

/* Category Glow Border hovering effect on Featured Card */
.featured-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255,255,255,0.12);
}

.featured-card[data-category="webdev-ai"]:hover { box-shadow: 0 30px 70px rgba(0, 0, 0, 0.5), 0 0 40px var(--cat-webdev-ai-glow); }
.featured-card[data-category="finance"]:hover { box-shadow: 0 30px 70px rgba(0, 0, 0, 0.5), 0 0 40px var(--cat-finance-glow); }
.featured-card[data-category="politics"]:hover { box-shadow: 0 30px 70px rgba(0, 0, 0, 0.5), 0 0 40px var(--cat-politics-glow); }
.featured-card[data-category="economy"]:hover { box-shadow: 0 30px 70px rgba(0, 0, 0, 0.5), 0 0 40px var(--cat-economy-glow); }
.featured-card[data-category="stocks"]:hover { box-shadow: 0 30px 70px rgba(0, 0, 0, 0.5), 0 0 40px var(--cat-stocks-glow); }
.featured-card[data-category="self-employed"]:hover { box-shadow: 0 30px 70px rgba(0, 0, 0, 0.5), 0 0 40px var(--cat-self-employed-glow); }

/* --------------------------------------------------------------------------
   11. DYNAMIC CATEGORY SECTIONS (Ressorts)
   -------------------------------------------------------------------------- */
.category-sections {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}

.category-panel {
  grid-column: span 6; /* 50% width on large screens (two panels per row) */
  padding: 22px;
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
  transition: all 300ms cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
}

.category-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  margin-bottom: 14px;
}

.category-panel-head h3 {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
}

.category-count {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
}

.category-list {
  display: grid;
  gap: 10px;
}

.category-story {
  display: block;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  text-decoration: none;
  transition: all 200ms ease;
}

.category-story-meta {
  display: block;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.category-story strong {
  display: block;
  font-size: 0.92rem;
  line-height: 1.45;
  font-weight: 600;
  transition: color 200ms ease;
}

.category-story:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.12);
}

.category-story:hover strong {
  color: var(--sand-accent);
}

/* Color thematic headers for category panels */
.category-panel[data-category="webdev-ai"] { border-top: 3px solid var(--cat-webdev-ai); }
.category-panel[data-category="finance"] { border-top: 3px solid var(--cat-finance); }
.category-panel[data-category="politics"] { border-top: 3px solid var(--cat-politics); }
.category-panel[data-category="economy"] { border-top: 3px solid var(--cat-economy); }
.category-panel[data-category="stocks"] { border-top: 3px solid var(--cat-stocks); }
.category-panel[data-category="self-employed"] { border-top: 3px solid var(--cat-self-employed); }

.category-panel:hover {
  transform: translateY(-4px);
  border-color: rgba(255,255,255,0.12);
}

.category-panel[data-category="webdev-ai"]:hover { box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4), 0 0 25px var(--cat-webdev-ai-glow); }
.category-panel[data-category="finance"]:hover { box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4), 0 0 25px var(--cat-finance-glow); }
.category-panel[data-category="politics"]:hover { box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4), 0 0 25px var(--cat-politics-glow); }
.category-panel[data-category="economy"]:hover { box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4), 0 0 25px var(--cat-economy-glow); }
.category-panel[data-category="stocks"]:hover { box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4), 0 0 25px var(--cat-stocks-glow); }
.category-panel[data-category="self-employed"]:hover { box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4), 0 0 25px var(--cat-self-employed-glow); }

/* --------------------------------------------------------------------------
   12. MAIN CONTENT GRID: NEWS CARD
   -------------------------------------------------------------------------- */
.news-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 20px;
}

.news-card {
  grid-column: span 3;
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
  overflow: hidden;
  position: relative;
  transition: all 350ms cubic-bezier(0.16, 1, 0.3, 1);
}

.news-card-button {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  padding: 0;
  border: none;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
  outline: none;
}

/* Card layout variants based on masonry classes */
.news-card:nth-child(6n + 1),
.news-card:nth-child(6n + 4) {
  grid-column: span 6;
}

.card-image-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #090e1f;
}

/* 16:9 layout for larger cards */
.news-card:nth-child(6n + 1) .card-image-wrap,
.news-card:nth-child(6n + 4) .card-image-wrap {
  aspect-ratio: 16 / 8.5;
}

.card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 500ms cubic-bezier(0.16, 1, 0.3, 1);
}

.news-card:hover .card-image {
  transform: scale(1.05);
}

.card-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card-title {
  margin-top: 10px;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  transition: color 250ms ease;
}

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

.card-summary {
  margin-top: 10px;
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--text-secondary);
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.read-more {
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--sand-accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: gap 200ms ease;
}

.news-card:hover .read-more {
  gap: 8px;
}

/* Specific category glow shadow on hovering news-card */
.news-card:hover {
  transform: translateY(-6px);
  border-color: rgba(255,255,255,0.12);
}

.news-card[data-category="webdev-ai"]:hover { box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4), 0 0 30px var(--cat-webdev-ai-glow); }
.news-card[data-category="finance"]:hover { box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4), 0 0 30px var(--cat-finance-glow); }
.news-card[data-category="politics"]:hover { box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4), 0 0 30px var(--cat-politics-glow); }
.news-card[data-category="economy"]:hover { box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4), 0 0 30px var(--cat-economy-glow); }
.news-card[data-category="stocks"]:hover { box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4), 0 0 30px var(--cat-stocks-glow); }
.news-card[data-category="self-employed"]:hover { box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4), 0 0 30px var(--cat-self-employed-glow); }

/* Placeholder cards */
.loading-card,
.empty-state {
  grid-column: 1 / -1;
  padding: 48px;
  text-align: center;
  border: 1px dashed rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.01);
  color: var(--text-secondary);
  font-size: 1rem;
}

/* --------------------------------------------------------------------------
   13. RIGHT COLUMN: EXECUTIVE BOOKMARKS & SAVED ARTICLES
   -------------------------------------------------------------------------- */
.reader-column {
  display: flex;
  flex-direction: column;
}

.saved-shell {
  position: sticky;
  top: 24px;
  padding: 24px;
  background: var(--glass-bg);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xxl);
  box-shadow: var(--shadow-premium);
  display: flex;
  flex-direction: column;
}

.saved-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  margin-bottom: 16px;
}

.saved-head .eyebrow {
  font-size: 0.68rem;
  font-weight: 800;
  color: var(--primary-orange);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.saved-head h2 {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.3rem;
  font-weight: 700;
  margin-top: 2px;
}

.saved-head .reader-pill {
  color: var(--sand-accent);
}

.saved-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}

.saved-item {
  display: block;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: var(--radius-lg);
  color: var(--text-primary);
  text-decoration: none;
  transition: all 200ms ease;
}

.saved-source {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--sand-accent);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  display: block;
  margin-bottom: 4px;
}

.saved-item strong {
  display: block;
  font-size: 0.88rem;
  line-height: 1.4;
  font-weight: 600;
  transition: color 200ms ease;
}

.saved-item:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.saved-item:hover strong {
  color: var(--primary-orange);
}

.reader-placeholder {
  padding: 24px;
  text-align: center;
  border: 1px dashed rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.01);
  color: var(--text-muted);
}

.reader-placeholder p {
  font-size: 0.86rem;
  line-height: 1.5;
}

/* --------------------------------------------------------------------------
   14. DETAIL VIEW / LONG-FORM READING EXPERIENCE (article.html)
   -------------------------------------------------------------------------- */
.article-shell {
  max-width: 100%;
  padding: 24px 4% 48px;
}

.article-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--glass-border);
}

.back-link,
.article-topbar-brand {
  display: inline-flex;
  align-items: center;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--glass-bg-soft);
  border: 1px solid var(--glass-border);
  color: var(--text-primary);
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
  transition: all 200ms ease;
}

.back-link::before {
  content: "←";
  margin-right: 8px;
  transition: transform 200ms ease;
}

.back-link:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--glass-border-strong);
  transform: translateX(-2px);
}

.back-link:hover::before {
  transform: translateX(-3px);
}

.article-topbar-brand {
  font-family: "Space Grotesk", sans-serif;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--sand-accent);
}

/* Main Layout */
.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 350px;
  gap: 28px;
}

.article-main {
  padding: 40px 48px;
  background: var(--glass-bg);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xxl);
  box-shadow: var(--shadow-premium);
}

.article-kicker {
  font-size: 0.76rem;
  font-weight: 800;
  color: var(--primary-orange);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  margin-bottom: 16px;
}

.article-title {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: clamp(2.2rem, 4.5vw, 3.8rem);
  line-height: 1.02;
  letter-spacing: -0.04em;
  color: var(--text-primary);
  margin-bottom: 20px;
}

.article-meta {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-secondary);
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  margin-bottom: 24px;
}

.article-stats {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

.article-stat {
  font-size: 0.72rem;
  font-weight: 800;
}

/* Comfortable Long-form Editorial typography */
.article-content {
  color: #dedee4;
  font-size: 1.08rem;
  line-height: 1.85;
  max-width: 920px;
}

.article-content p {
  margin-bottom: 24px;
}

/* Beautiful Drop Cap for first paragraph letter */
.article-content p:first-of-type::first-letter {
  font-family: "Space Grotesk", sans-serif;
  font-size: 3.8rem;
  font-weight: 700;
  line-height: 0.85;
  float: left;
  margin-top: 4px;
  margin-right: 12px;
  color: var(--sand-accent);
  text-shadow: 0 4px 12px rgba(232, 200, 148, 0.2);
}

.article-content h1,
.article-content h2,
.article-content h3 {
  font-family: "Space Grotesk", sans-serif;
  color: var(--text-primary);
  margin: 36px 0 16px;
  line-height: 1.2;
}

.article-content h2 { font-size: 1.6rem; }
.article-content h3 { font-size: 1.3rem; }

.article-content a {
  color: var(--sand-accent);
  text-decoration: underline;
  text-underline-offset: 4px;
  transition: color 200ms ease;
}

.article-content a:hover {
  color: var(--primary-orange);
}

.article-content blockquote {
  margin: 32px 0;
  padding: 16px 24px;
  background: rgba(255, 255, 255, 0.01);
  border-left: 4px solid var(--primary-orange);
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
  font-style: italic;
  font-size: 1.15rem;
  color: var(--text-primary);
}

/* Inline images in reader */
.article-content img {
  width: 100%;
  max-height: 520px;
  object-fit: cover;
  border-radius: var(--radius-xl);
  margin: 32px 0;
  box-shadow: 0 15px 40px rgba(0,0,0,0.5);
  border: 1px solid var(--glass-border);
}

/* Source metadata block inside article content */
.reader-note {
  margin: 32px 0;
  padding: 18px 22px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.01);
  border: 1px solid var(--glass-border);
  color: var(--text-secondary);
  font-size: 0.88rem;
  line-height: 1.6;
}

/* --------------------------------------------------------------------------
   15. PREV / NEXT ARTICLE NAVIGATION
   -------------------------------------------------------------------------- */
.article-navigator {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 40px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 32px;
}

.nav-card {
  display: flex;
  flex-direction: column;
  padding: 18px 22px;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.02);
  text-decoration: none;
  color: var(--text-primary);
  transition: all 250ms ease;
}

.nav-card span {
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.nav-card strong {
  margin-top: 6px;
  font-size: 0.95rem;
  line-height: 1.4;
  font-weight: 600;
  transition: color 250ms ease;
}

.nav-card:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--glass-border-strong);
}

.nav-card:hover strong {
  color: var(--sand-accent);
}

/* --------------------------------------------------------------------------
   16. STICKY ARTICLE SIDEBAR
   -------------------------------------------------------------------------- */
.article-sidebar {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.sidebar-card {
  position: sticky;
  top: 24px;
  padding: 24px;
  background: var(--glass-bg);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xxl);
  box-shadow: var(--shadow-premium);
}

.related-card {
  position: static;
  margin-top: 0;
}

.sidebar-card .eyebrow {
  font-size: 0.68rem;
  font-weight: 800;
  color: var(--primary-orange);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.sidebar-title {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-top: 4px;
}

.sidebar-copy {
  margin-top: 12px;
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--text-secondary);
}

/* Sidebar CTA Buttons */
.sidebar-actions {
  display: grid;
  gap: 10px;
  margin-top: 20px;
}

.reader-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.reader-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 18px;
  border-radius: var(--radius-md);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 800;
  transition: all 200ms cubic-bezier(0.16, 1, 0.3, 1);
}

/* Main primary button in sidebar */
#originalLink.reader-link,
.reader-actions .reader-link:first-of-type {
  background: linear-gradient(135deg, var(--primary-orange) 0%, #ff7a3d 100%);
  color: #030611;
  border: none;
  box-shadow: 0 6px 18px rgba(255, 85, 0, 0.15);
  width: 100%;
  text-align: center;
}

#originalLink.reader-link:hover,
.reader-actions .reader-link:first-of-type:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(255, 85, 0, 0.25);
  filter: brightness(1.08);
}

/* Secondary glass actions */
.action-button,
.reader-actions .reader-link:nth-of-type(2) {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--glass-border);
  color: var(--text-primary);
  cursor: pointer;
  width: 100%;
}

.action-button:hover,
.reader-actions .reader-link:nth-of-type(2):hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--glass-border-strong);
  transform: translateY(-1px);
}

/* Related articles on detail page */
.related-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.related-item {
  display: block;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: var(--radius-md);
  text-decoration: none;
  color: var(--text-primary);
  transition: all 200ms ease;
}

.related-source {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--sand-accent);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  display: block;
  margin-bottom: 4px;
}

.related-item strong {
  display: block;
  font-size: 0.84rem;
  line-height: 1.4;
  font-weight: 600;
  transition: color 200ms ease;
}

.related-item:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.12);
}

.related-item:hover strong {
  color: var(--primary-orange);
}

/* --------------------------------------------------------------------------
   17. SYSTEM & DEVICE COMPATIBILITY (Media Queries)
   -------------------------------------------------------------------------- */

/* Responsive Layout: XL Screen size adjustment */
@media (max-width: 1480px) {
  .dashboard {
    grid-template-columns: 1fr;
  }
  
  .news-grid {
    gap: 16px;
  }

  .news-card {
    grid-column: span 4;
  }
  
  .news-card:nth-child(6n + 1),
  .news-card:nth-child(6n + 4) {
    grid-column: span 6;
  }
  
  .category-panel {
    grid-column: span 6;
  }
}

/* Responsive Layout: Large Tablets & Laptops */
@media (max-width: 1180px) {
  .topline {
    grid-template-columns: 1fr;
    padding: 24px;
  }
  
  .command-bar {
    justify-content: flex-start;
  }

  .dashboard,
  .article-layout {
    grid-template-columns: 1fr;
  }
  
  .saved-shell,
  .sidebar-card {
    position: static;
  }
  
  .news-grid,
  .category-sections {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 16px;
  }

  .news-card,
  .news-card:nth-child(6n + 1),
  .news-card:nth-child(6n + 4),
  .category-panel {
    grid-column: span 3;
  }
}

/* Responsive Layout: Small Tablets */
@media (max-width: 980px) {
  .featured-card {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 20px;
  }
  
  .featured-image-wrap {
    min-height: 320px;
  }
  
  .news-grid,
  .category-sections {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .news-card,
  .news-card:nth-child(6n + 1),
  .news-card:nth-child(6n + 4),
  .category-panel {
    grid-column: span 1;
  }
  
  .article-main {
    padding: 32px 28px;
  }
}

/* Responsive Layout: Smart Phones */
@media (max-width: 720px) {
  .app-shell,
  .article-shell {
    padding: 12px;
  }

  .topline {
    margin-bottom: 12px;
    padding: 16px;
    border-radius: var(--radius-xl);
  }

  .wordmark {
    font-size: 1.85rem;
  }

  .search-form {
    flex-direction: column;
    gap: 8px;
  }
  
  .search-form input {
    padding: 14px 16px;
    font-size: 0.9rem;
  }

  .search-form button,
  .refresh-button {
    padding: 14px 18px;
    font-size: 0.88rem;
    width: 100%;
  }

  .hud-strip {
    display: block;
    padding: 14px;
    border-radius: var(--radius-lg);
    margin-bottom: 12px;
  }

  .hud-meta {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 12px;
  }

  .hud-chip {
    padding: 10px;
    flex-direction: column;
    align-items: center;
    border-radius: var(--radius-md);
    text-align: center;
    gap: 2px;
  }
  
  .hud-chip strong {
    font-size: 0.92rem;
  }
  
  .hud-chip span {
    font-size: 0.6rem;
  }

  /* Horizontal swipeable capsule pill filters for mobile */
  .filter-pills {
    display: flex;
    flex-wrap: nowrap;
    gap: 6px;
    overflow-x: auto;
    padding-bottom: 4px;
    justify-content: flex-start;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .filter-pills::-webkit-scrollbar,
  .category-sections::-webkit-scrollbar,
  .saved-list::-webkit-scrollbar {
    display: none;
  }

  .filter-pill {
    flex: 0 0 auto;
    padding: 8px 14px;
    font-size: 0.74rem;
  }

  .signal-strip {
    margin-bottom: 12px;
  }

  .signal-ticker-wrap {
    padding: 12px;
    border-radius: var(--radius-lg);
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .signal-label {
    font-size: 0.66rem;
    padding: 4px 8px;
  }

  .headline-ticker {
    width: 100%;
    margin-top: 2px;
  }

  .ticker-link {
    min-width: 220px;
    max-width: 220px;
    padding: 8px 12px;
    font-size: 0.78rem;
  }

  .editorial-rail {
    display: none;
  }

  .featured-card {
    padding: 14px;
    border-radius: var(--radius-xl);
  }

  .featured-image-wrap {
    min-height: 200px;
  }

  .featured-title {
    font-size: 1.6rem;
    margin-top: 10px;
  }

  .featured-summary {
    font-size: 0.88rem;
    line-height: 1.6;
    margin-top: 12px;
  }

  .featured-footer {
    margin-top: 16px;
  }

  /* horizontal swiping sections for categories on mobile */
  .category-sections {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 12px;
    padding-bottom: 10px;
    -webkit-overflow-scrolling: touch;
  }

  .category-panel,
  .category-panel:nth-child(5n + 1),
  .category-panel:nth-child(5n + 4) {
    flex: 0 0 82vw;
    min-width: 82vw;
    border-radius: var(--radius-xl);
    padding: 16px;
    grid-column: auto;
  }

  .news-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .news-card,
  .news-card:nth-child(6n + 1),
  .news-card:nth-child(6n + 4) {
    grid-column: auto;
    border-radius: var(--radius-xl);
  }

  .card-image-wrap {
    aspect-ratio: 16 / 9;
  }

  .card-body {
    padding: 16px;
  }

  .card-title {
    font-size: 1rem;
  }

  .card-summary {
    font-size: 0.86rem;
  }

  .saved-shell {
    padding: 16px;
    border-radius: var(--radius-xl);
    margin-top: 12px;
  }
  
  .saved-list {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 10px;
    padding-bottom: 6px;
    -webkit-overflow-scrolling: touch;
  }
  
  .saved-item {
    flex: 0 0 74vw;
    min-width: 74vw;
    padding: 12px;
    border-radius: var(--radius-lg);
  }

  /* Article Page adjustments */
  .article-main {
    padding: 24px 16px;
    border-radius: var(--radius-xl);
  }

  .article-title {
    font-size: 1.8rem;
  }

  .article-content {
    font-size: 0.98rem;
    line-height: 1.75;
  }

  .article-content p:first-of-type::first-letter {
    font-size: 3rem;
  }

  .article-navigator {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  
  .sidebar-card {
    padding: 18px;
    border-radius: var(--radius-xl);
  }

  .sidebar-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  #originalLink.reader-link {
    grid-column: 1 / -1;
  }
}

/* Performance and accessibility accessibility optimizations */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
  
  .headline-ticker-track {
    animation: none !important;
    flex-wrap: wrap;
    overflow-x: auto;
  }
}
