:root {
  /* Light Editorial Theme (Default) */
  --bg-page: #FAF8F5;
  --bg-surface: #FFFFFF;
  --bg-elevated: #F3F0EA;
  --bg-opinion: #F5F2EB;
  --text-primary: #121212;
  --text-secondary: #4A4A4A;
  --text-muted: #717171;
  --border-subtle: #E5E1D8;
  --border-strong: #1A1A1A;
  --brand-red: #C8102E;
  --brand-red-hover: #9E0B22;
  --brand-red-soft: rgba(200, 16, 46, 0.09);
  --accent-gold: #B45309;
  --shadow-card: 0 2px 10px rgba(0, 0, 0, 0.04);
  --shadow-hover: 0 10px 25px rgba(0, 0, 0, 0.08);
  --shadow-modal: 0 24px 60px rgba(0, 0, 0, 0.28);

  /* Fonts */
  --font-display: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-serif: 'Newsreader', Georgia, serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* Dynamic Reader Font Size */
  --reader-font-size: 1.1875rem;
}

[data-theme="dark"] {
  --bg-page: #0D0F12;
  --bg-surface: #15181E;
  --bg-elevated: #1E222B;
  --bg-opinion: #181C24;
  --text-primary: #F1F3F5;
  --text-secondary: #B0B7C3;
  --text-muted: #7E8796;
  --border-subtle: #262B36;
  --border-strong: #E2E8F0;
  --brand-red: #E63946;
  --brand-red-hover: #FF4D5A;
  --brand-red-soft: rgba(230, 57, 70, 0.15);
  --shadow-card: 0 2px 10px rgba(0, 0, 0, 0.3);
  --shadow-hover: 0 12px 28px rgba(0, 0, 0, 0.5);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background-color: var(--bg-page);
  color: var(--text-primary);
  font-family: var(--font-sans);
  line-height: 1.5;
  transition: background-color 0.2s ease, color 0.2s ease;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

body.modal-open {
  overflow: hidden;
}

.container {
  width: 100%;
  max-width: 1340px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ==========================================
   TOP UTILITY BAR
   ========================================== */
.utility-bar {
  background-color: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.utility-bar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 38px;
  gap: 1rem;
  flex-wrap: wrap;
}

.utility-left {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.utility-date {
  font-weight: 600;
  color: var(--text-primary);
  text-transform: capitalize;
}

.utility-divider {
  color: var(--border-subtle);
}

.feed-status {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--text-muted);
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: #10B981;
  display: inline-block;
}

.status-dot.syncing {
  background-color: #F59E0B;
  animation: pulse 1s infinite;
}

.utility-right {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.utility-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 0.25rem 0.65rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: var(--font-sans);
}

.utility-btn:hover,
.utility-btn.active {
  background-color: var(--bg-elevated);
  color: var(--text-primary);
  border-color: var(--text-muted);
}

.utility-btn.active {
  border-color: var(--brand-red);
  color: var(--brand-red);
  background-color: var(--brand-red-soft);
}

.utility-btn.icon-only {
  padding: 0.28rem 0.45rem;
}

.badge-pill {
  background-color: var(--brand-red);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.05rem 0.38rem;
  border-radius: 999px;
}

/* ==========================================
   EDITORIAL MASTHEAD
   ========================================== */
.masthead {
  background-color: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
  position: sticky;
  top: 0;
  z-index: 40;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.03);
}

.masthead-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding-top: 1.15rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--border-strong);
  gap: 1rem;
}

.masthead-left {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.edition-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--brand-red);
  text-transform: uppercase;
}

.edition-stats {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.masthead-center {
  text-align: center;
}

.brand-logo {
  text-decoration: none;
  color: var(--text-primary);
  display: inline-flex;
  flex-direction: column;
  align-items: center;
}

.brand-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3.1rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--text-primary);
}

.brand-subtitle {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.24em;
  color: var(--text-muted);
  margin-top: 0.3rem;
}

.masthead-right {
  display: flex;
  justify-content: flex-end;
}

.search-wrapper {
  position: relative;
  width: 100%;
  max-width: 280px;
}

.search-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.search-input {
  width: 100%;
  padding: 0.5rem 2rem 0.5rem 2.25rem;
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  background-color: var(--bg-page);
  color: var(--text-primary);
  font-size: 0.83rem;
  font-family: var(--font-sans);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.search-input:focus {
  outline: none;
  border-color: var(--brand-red);
  box-shadow: 0 0 0 3px var(--brand-red-soft);
}

.search-clear {
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.1rem;
  cursor: pointer;
  line-height: 1;
  padding: 0.2rem;
}

/* ==========================================
   CATEGORY NAVIGATION BAR
   ========================================== */
.category-nav-wrapper {
  background-color: var(--bg-surface);
  position: relative;
}

.category-nav-container {
  display: flex;
  align-items: center;
  position: relative;
}

.category-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 0.45rem 0;
  flex: 1;
}

.category-nav::-webkit-scrollbar {
  display: none;
}

.category-item {
  flex-shrink: 0;
}

.category-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.42rem 0.85rem;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 600;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.category-link:hover {
  color: var(--text-primary);
  background-color: var(--bg-elevated);
}

.category-link.active {
  background-color: var(--brand-red);
  color: #FFFFFF;
}

.category-count {
  font-size: 0.68rem;
  font-weight: 600;
  opacity: 0.75;
  padding: 0.05rem 0.35rem;
  border-radius: 99px;
  background-color: rgba(0, 0, 0, 0.07);
}

[data-theme="dark"] .category-count {
  background-color: rgba(255, 255, 255, 0.1);
}

.category-link.active .category-count {
  background-color: rgba(255, 255, 255, 0.22);
  color: #FFFFFF;
  opacity: 1;
}

.nav-scroll-btn {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
  box-shadow: var(--shadow-card);
  flex-shrink: 0;
  z-index: 2;
}

.nav-scroll-btn:hover {
  background-color: var(--bg-elevated);
}

/* ==========================================
   BREAKING / LATEST TICKER
   ========================================== */
.ticker-bar {
  background-color: var(--bg-elevated);
  border-bottom: 1px solid var(--border-subtle);
  padding: 0.45rem 0;
}

.ticker-inner {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  overflow: hidden;
}

.ticker-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background-color: var(--brand-red);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  padding: 0.2rem 0.55rem;
  border-radius: 3px;
  flex-shrink: 0;
}

.live-pulse {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: #fff;
  animation: pulse 1.4s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.35; transform: scale(0.85); }
}

.ticker-track {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  overflow-x: auto;
  scrollbar-width: none;
  white-space: nowrap;
}

.ticker-track::-webkit-scrollbar {
  display: none;
}

.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.8rem;
  color: var(--text-primary);
  cursor: pointer;
  background: none;
  border: none;
  font-family: var(--font-sans);
  text-align: left;
  padding: 0.1rem 0;
}

.ticker-item:hover .ticker-title {
  color: var(--brand-red);
  text-decoration: underline;
}

.ticker-time {
  font-weight: 700;
  color: var(--brand-red);
  font-size: 0.74rem;
}

.ticker-title {
  font-weight: 500;
  max-width: 340px;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ==========================================
   MAIN CONTENT & SECTION BANNERS
   ========================================== */
.main-content {
  flex: 1;
  padding-top: 1.75rem;
  padding-bottom: 3.5rem;
}

.section-banner {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding-bottom: 1rem;
  margin-bottom: 1.75rem;
  border-bottom: 2px solid var(--border-strong);
  gap: 1rem;
  flex-wrap: wrap;
}

.section-kicker {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: var(--brand-red);
  text-transform: uppercase;
  display: block;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3vw, 2.4rem);
  font-weight: 800;
  line-height: 1.1;
  margin-top: 0.15rem;
}

.section-banner-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.section-count {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
}

.btn-reset-filter {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  padding: 0.4rem 0.85rem;
  border-radius: 5px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-reset-filter:hover {
  border-color: var(--brand-red);
  color: var(--brand-red);
}

/* ==========================================
   HERO PORTADA SECTION
   ========================================== */
.hero-section {
  display: grid;
  grid-template-columns: 7fr 5fr;
  gap: 2rem;
  padding-bottom: 2.25rem;
  margin-bottom: 2.25rem;
  border-bottom: 1px solid var(--border-subtle);
}

.hero-lead-card {
  display: flex;
  flex-direction: column;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
}

.hero-lead-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.hero-lead-media {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  background-color: var(--bg-elevated);
  overflow: hidden;
}

.hero-lead-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.hero-lead-card:hover .hero-lead-media img {
  transform: scale(1.02);
}

.hero-lead-body {
  padding: 1.5rem 1.75rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.65rem;
}

.card-kicker-group {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.kicker-badge {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--brand-red);
  background-color: var(--brand-red-soft);
  padding: 0.18rem 0.55rem;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  font-family: var(--font-sans);
}

.kicker-badge:hover {
  background-color: var(--brand-red);
  color: #fff;
}

.live-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background-color: var(--brand-red);
  color: #fff;
  font-size: 0.66rem;
  font-weight: 800;
  padding: 0.15rem 0.45rem;
  border-radius: 3px;
  letter-spacing: 0.05em;
}

.hero-lead-title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 2.4vw, 2.15rem);
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-primary);
  margin-bottom: 0.85rem;
}

.hero-lead-desc {
  font-family: var(--font-serif);
  font-size: 1.08rem;
  line-height: 1.55;
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
  flex: 1;
}

.card-footer-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.78rem;
  color: var(--text-muted);
}

.author-name {
  font-weight: 600;
  color: var(--text-secondary);
}

.hero-side-stack {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.hero-side-card {
  display: grid;
  grid-template-columns: 1fr 135px;
  gap: 1rem;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 1.1rem;
  box-shadow: var(--shadow-card);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  cursor: pointer;
  flex: 1;
}

.hero-side-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.hero-side-content {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.hero-side-title {
  font-family: var(--font-display);
  font-size: 1.06rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text-primary);
  margin: 0.35rem 0 0.5rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hero-side-thumb {
  width: 135px;
  height: 105px;
  border-radius: 6px;
  overflow: hidden;
  background-color: var(--bg-elevated);
  align-self: center;
}

.hero-side-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ==========================================
   OPINION & EDITORIAL STRIP
   ========================================== */
.opinion-strip {
  background-color: var(--bg-opinion);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 1.5rem;
  margin-bottom: 2.5rem;
}

.strip-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  padding-bottom: 0.65rem;
  border-bottom: 2px solid var(--border-strong);
  gap: 1rem;
  flex-wrap: wrap;
}

.strip-title-group {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.strip-accent {
  width: 10px;
  height: 20px;
  background-color: var(--brand-red);
  display: inline-block;
  border-radius: 2px;
}

.strip-title {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
}

.opinion-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 1.25rem;
}

.opinion-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-top: 3px solid var(--brand-red);
  border-radius: 6px;
  padding: 1.15rem;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.opinion-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.opinion-title {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1.35;
  margin: 0.5rem 0 0.65rem;
  color: var(--text-primary);
}

.opinion-desc {
  font-size: 0.84rem;
  color: var(--text-secondary);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 0.9rem;
}

/* ==========================================
   MAIN NEWS GRID & CARDS
   ========================================== */
.sort-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.sort-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 500;
}

.sort-select {
  background-color: var(--bg-surface);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
  border-radius: 5px;
  padding: 0.3rem 0.6rem;
  font-size: 0.8rem;
  font-family: var(--font-sans);
  cursor: pointer;
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 1.5rem;
}

/* Compact List Mode */
.news-grid.compact-view {
  grid-template-columns: repeat(auto-fill, minmax(460px, 1fr));
  gap: 1rem;
}

.news-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-card);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
}

.news-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}

.news-card-media {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background-color: var(--bg-elevated);
  overflow: hidden;
}

.news-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.news-card:hover .news-card-media img {
  transform: scale(1.03);
}

.news-card-body {
  padding: 1.15rem 1.25rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.news-card-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text-primary);
  margin-bottom: 0.55rem;
}

.news-card-desc {
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--text-secondary);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 1rem;
  flex: 1;
}

.btn-bookmark-card {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.2rem;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s ease, background-color 0.15s ease;
}

.btn-bookmark-card:hover {
  color: var(--brand-red);
  background-color: var(--brand-red-soft);
}

.btn-bookmark-card.saved {
  color: var(--brand-red);
}

.btn-bookmark-card.saved svg {
  fill: var(--brand-red);
}

/* Compact View Card Overrides */
.news-grid.compact-view .news-card {
  flex-direction: row;
  align-items: stretch;
}

.news-grid.compact-view .news-card-media {
  width: 150px;
  aspect-ratio: auto;
  flex-shrink: 0;
}

.news-grid.compact-view .news-card-desc {
  -webkit-line-clamp: 2;
}

/* ==========================================
   CATEGORIES DIRECTORY FOOTER
   ========================================== */
.categories-directory {
  margin-top: 3.5rem;
  padding-top: 1.5rem;
}

.directory-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.directory-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  padding: 0.5rem 0.95rem;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.15s ease;
}

.directory-chip:hover {
  border-color: var(--brand-red);
  color: var(--brand-red);
  transform: translateY(-1px);
}

.directory-chip-count {
  background-color: var(--bg-elevated);
  color: var(--text-secondary);
  font-size: 0.74rem;
  padding: 0.1rem 0.45rem;
  border-radius: 99px;
}

/* ==========================================
   FULL IN-APP ARTICLE READER MODAL
   ========================================== */
.reader-backdrop {
  position: fixed;
  inset: 0;
  background-color: rgba(10, 12, 16, 0.72);
  backdrop-filter: blur(4px);
  z-index: 100;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 1.5rem 1rem;
  overflow-y: auto;
  animation: fadeIn 0.2s ease;
}

.reader-backdrop[hidden] {
  display: none !important;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.reader-modal {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  width: 100%;
  max-width: 880px;
  box-shadow: var(--shadow-modal);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 3rem);
}

.reader-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.5rem;
  background-color: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
  gap: 1rem;
  flex-wrap: wrap;
}

.reader-btn-back {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0.35rem 0.6rem;
  border-radius: 6px;
}

.reader-btn-back:hover {
  background-color: var(--bg-elevated);
}

.reader-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.font-size-controls {
  display: inline-flex;
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  overflow: hidden;
}

.font-size-controls .reader-tool-btn {
  border: none;
  border-right: 1px solid var(--border-subtle);
  border-radius: 0;
}

.font-size-controls .reader-tool-btn:last-child {
  border-right: none;
}

.reader-tool-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background-color: var(--bg-page);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 0.35rem 0.7rem;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font-sans);
}

.reader-tool-btn:hover {
  background-color: var(--bg-elevated);
  color: var(--text-primary);
}

.reader-tool-btn.saved {
  color: var(--brand-red);
  border-color: var(--brand-red);
  background-color: var(--brand-red-soft);
}

.reader-external-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background-color: var(--brand-red);
  color: #FFFFFF;
  text-decoration: none;
  padding: 0.4rem 0.85rem;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  transition: background-color 0.15s ease;
}

.reader-external-btn:hover {
  background-color: var(--brand-red-hover);
}

.reader-scroll-container {
  overflow-y: auto;
  padding: 2.25rem 1.5rem 3rem;
}

.reader-content-wrapper {
  max-width: 680px;
  margin: 0 auto;
}

.reader-meta-top {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.reader-category-badge {
  background-color: var(--brand-red);
  color: #fff;
  border: none;
  padding: 0.25rem 0.7rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  cursor: pointer;
}

.reader-reading-time {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 500;
}

.reader-headline {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3.2vw, 2.5rem);
  font-weight: 800;
  line-height: 1.18;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.reader-subheadline {
  font-family: var(--font-serif);
  font-size: 1.22rem;
  line-height: 1.5;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

.reader-byline {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 1rem 0;
  margin-bottom: 1.75rem;
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

.byline-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: var(--brand-red-soft);
  color: var(--brand-red);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.88rem;
  flex-shrink: 0;
}

.byline-details {
  display: flex;
  flex-direction: column;
}

.byline-author {
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--text-primary);
}

.byline-date {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.reader-figure {
  margin-bottom: 2rem;
}

.reader-img-wrap {
  border-radius: 8px;
  overflow: hidden;
  background-color: var(--bg-elevated);
}

.reader-img-wrap img {
  width: 100%;
  max-height: 480px;
  object-fit: cover;
  display: block;
}

.reader-figcaption {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.55rem;
  line-height: 1.4;
}

/* Rich Article HTML Body Styling */
.reader-article-body {
  font-family: var(--font-serif);
  font-size: var(--reader-font-size);
  line-height: 1.78;
  color: var(--text-primary);
}

.reader-article-body p {
  margin-bottom: 1.35rem;
}

.reader-article-body h2,
.reader-article-body h3 {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 700;
  line-height: 1.3;
  margin: 2.1rem 0 0.9rem;
  color: var(--text-primary);
  padding-top: 0.5rem;
  border-top: 1px solid var(--border-subtle);
}

.reader-article-body ul,
.reader-article-body ol {
  margin: 0 0 1.4rem 1.5rem;
}

.reader-article-body li {
  margin-bottom: 0.5rem;
}

.reader-article-body a {
  color: var(--brand-red);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.reader-article-body blockquote {
  margin: 1.75rem 0;
  padding: 1.15rem 1.35rem;
  background-color: var(--bg-elevated);
  border-left: 4px solid var(--brand-red);
  border-radius: 0 8px 8px 0;
  font-style: italic;
  font-size: 1.02rem;
}

.reader-article-body img,
.reader-article-body .article-inline-img {
  max-width: 100%;
  height: auto !important;
  border-radius: 8px;
  margin: 1.25rem 0;
  display: block;
}

.reader-article-body mark {
  background-color: rgba(245, 158, 11, 0.22);
  color: inherit;
  padding: 0.1rem 0.35rem;
  border-radius: 3px;
}

/* Related Articles inside Reader */
.reader-related {
  margin-top: 3rem;
  padding-top: 1.75rem;
  border-top: 2px solid var(--border-strong);
}

.reader-related-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

.reader-related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
}

.reader-related-card {
  background-color: var(--bg-page);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  padding: 0.9rem;
  cursor: pointer;
  transition: border-color 0.15s ease;
}

.reader-related-card:hover {
  border-color: var(--brand-red);
}

.reader-related-card h4 {
  font-family: var(--font-display);
  font-size: 0.98rem;
  line-height: 1.35;
  margin-bottom: 0.4rem;
}

.reader-related-card span {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ==========================================
   SKELETON & EMPTY STATES
   ========================================== */
.loading-skeleton {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.skeleton-hero {
  display: grid;
  grid-template-columns: 7fr 5fr;
  gap: 2rem;
}

.skeleton-side {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.skeleton-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.skeleton-box {
  background: linear-gradient(90deg, var(--bg-elevated) 25%, var(--border-subtle) 50%, var(--bg-elevated) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 8px;
}

.skeleton-lead {
  height: 440px;
}

.skeleton-card {
  height: 210px;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.empty-state {
  padding: 4rem 1rem;
  text-align: center;
}

.empty-state-box {
  max-width: 460px;
  margin: 0 auto;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 2.5rem 2rem;
}

.empty-state-box h2 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  margin-bottom: 0.65rem;
}

.empty-state-box p {
  color: var(--text-secondary);
  font-size: 0.92rem;
  margin-bottom: 1.5rem;
}

.btn-primary {
  background-color: var(--brand-red);
  color: #fff;
  border: none;
  padding: 0.6rem 1.25rem;
  border-radius: 6px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
}

.btn-primary:hover {
  background-color: var(--brand-red-hover);
}

/* ==========================================
   SITE FOOTER
   ========================================== */
.site-footer {
  background-color: var(--bg-surface);
  border-top: 2px solid var(--border-strong);
  padding: 2rem 0;
  margin-top: auto;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.footer-logo {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.2rem;
}

.footer-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.footer-desc a {
  color: var(--brand-red);
  text-decoration: none;
}

.footer-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
}

kbd {
  background-color: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  padding: 0.1rem 0.4rem;
  font-size: 0.75rem;
  font-family: monospace;
}

/* ==========================================
   RESPONSIVE BREAKPOINTS
   ========================================== */
@media (max-width: 980px) {
  .masthead-inner {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .masthead-left {
    align-items: center;
  }
  .masthead-right {
    justify-content: center;
  }
  .search-wrapper {
    max-width: 420px;
  }
  .hero-section,
  .skeleton-hero {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .hero-side-card {
    grid-template-columns: 1fr 95px;
  }
  .hero-side-thumb {
    width: 95px;
    height: 80px;
  }
  .news-grid.compact-view {
    grid-template-columns: 1fr;
  }
  .reader-backdrop {
    padding: 0;
  }
  .reader-modal {
    max-height: 100vh;
    height: 100vh;
    border-radius: 0;
  }
}
