/**
 * CNAWS - Core Stylesheet & Theme System
 */

:root {
  --background: 210 40% 98%;
  --foreground: 222 47% 11%;
  --card: 0 0% 100%;
  --card-foreground: 222 47% 11%;
  --popover: 0 0% 100%;
  --popover-foreground: 222 47% 11%;
  --primary: 222 47% 11%;
  --primary-foreground: 210 40% 98%;
  --secondary: 210 40% 96%;
  --secondary-foreground: 222 47% 11%;
  --muted: 210 40% 96%;
  --muted-foreground: 215 16% 47%;
  --accent: 221 83% 53%;
  --accent-foreground: 210 40% 98%;
  --border: 214 32% 91%;
  --news-primary: 221 83% 53%;
  --radius: 0.75rem;
}

.dark {
  --background: 222 47% 4%;
  --foreground: 210 40% 98%;
  --card: 222 47% 6%;
  --card-foreground: 210 40% 98%;
  --popover: 222 47% 6%;
  --popover-foreground: 210 40% 98%;
  --primary: 210 40% 98%;
  --primary-foreground: 222 47% 11%;
  --secondary: 217 33% 12%;
  --secondary-foreground: 210 40% 98%;
  --muted: 217 33% 12%;
  --muted-foreground: 215 20% 65%;
  --accent: 217 33% 12%;
  --accent-foreground: 210 40% 98%;
  --border: 217 33% 14%;
  --news-primary: 221 83% 53%;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 140px;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-weight: 400;
  background-color: hsl(var(--background));
  color: hsl(var(--foreground));
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* Editorial Serif Headings (Matches live cnaws.in article titles) */
.font-serif,
h1.font-serif,
h2.font-serif,
h3.font-serif,
h4.font-serif,
p.font-serif,
span.font-serif,
.article-title-serif {
  font-family: ui-serif, Georgia, Cambria, 'Times New Roman', Times, serif !important;
}

/* Card Titles & Article Headings in Cards match live cnaws.in 1:1 (Outfit SemiBold 600 / 19px) */
.group\/card h3,
.group\/card h3 a,
article h3,
article h3 a,
.card-title,
.news-card-title,
.bbc-article-card h3,
.bbc-article-card h3 a,
[id^="article-card-"] h3,
[id^="article-card-"] h3 a {
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
  font-size: 1.1875rem !important;
  font-weight: 600 !important;
  line-height: 1.3 !important;
  color: #000000 !important;
  letter-spacing: -0.022em !important;
  -webkit-font-smoothing: antialiased !important;
  -moz-osx-font-smoothing: grayscale !important;
}

@media (max-width: 640px) {
  .group\/card h3,
  .group\/card h3 a,
  article h3,
  article h3 a,
  .card-title,
  .news-card-title,
  .bbc-article-card h3,
  .bbc-article-card h3 a,
  [id^="article-card-"] h3,
  [id^="article-card-"] h3 a {
    font-size: 1.0625rem !important;
  }
}

html.dark .group\/card h3,
html.dark .group\/card h3 a,
html.dark article h3,
html.dark article h3 a,
html.dark .card-title,
html.dark .news-card-title,
html.dark .bbc-article-card h3,
html.dark .bbc-article-card h3 a,
html.dark [id^="article-card-"] h3,
html.dark [id^="article-card-"] h3 a {
  color: rgba(255, 255, 255, 0.95) !important;
}

/* Card badges (category & department) matching live cnaws.in */
.group\/card .text-\[8px\],
article .text-\[8px\],
[id^="article-card-"] .text-\[8px\],
.group\/card .text-\[7px\],
article .text-\[7px\],
[id^="article-card-"] .text-\[7px\],
.bbc-article-card .text-\[8px\],
.bbc-article-card .text-\[7px\] {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
  font-weight: 800 !important;
}

/* Card footer author and date matching live cnaws.in */
.card-author,
.group\/card .space-y-3 a,
article .space-y-3 a,
[id^="article-card-"] .space-y-3 a,
.bbc-article-card a[href^="/author/"] {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
  font-weight: 500 !important;
  letter-spacing: 0.2em !important;
  color: #000000 !important;
}

html.dark .card-author,
html.dark .group\/card .space-y-3 a,
html.dark article .space-y-3 a,
html.dark [id^="article-card-"] .space-y-3 a,
html.dark .bbc-article-card a[href^="/author/"] {
  color: #ffffff !important;
}

.card-date,
.group\/card .space-y-3 p.italic,
article .space-y-3 p.italic,
[id^="article-card-"] .space-y-3 p.italic {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
  font-style: italic !important;
  color: #64748b !important;
}

.card-views,
.group\/card .view-count,
article .view-count,
[id^="article-card-"] .view-count {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
  font-weight: 700 !important;
}

.font-heading,
.font-outfit {
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
}

.tracking-\[0\.35em\] {
  letter-spacing: 0.35em !important;
}

.tracking-\[0\.2em\] {
  letter-spacing: 0.2em !important;
}

.tracking-\[0\.3em\] {
  letter-spacing: 0.3em !important;
}

.tracking-\[0\.12em\] {
  letter-spacing: 0.12em !important;
}

.tracking-\[0\.4em\] {
  letter-spacing: 0.4em !important;
}

/* Glassmorphism Navigation */
.header-glass {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid hsl(var(--border));
}

.dark .header-glass {
  background: rgba(8, 11, 18, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid hsl(var(--border));
}

/* Rich Text / Article Content Typography */
.article-body {
  font-size: 1.125rem;
  line-height: 1.8;
  color: hsl(var(--foreground));
}

.article-body p {
  margin-bottom: 1.75rem;
  text-align: justify;
}

.article-body h2 {
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
  font-size: 1.875rem;
  font-weight: 700;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  line-height: 1.3;
}

.article-body h3 {
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
  font-size: 1.5rem;
  font-weight: 600;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  line-height: 1.35;
}

.article-body blockquote {
  border-left: 4px solid #3b82f6;
  padding-left: 1.25rem;
  margin: 2rem 0;
  font-style: italic;
  color: hsl(var(--muted-foreground));
}

.article-body ul, .article-body ol {
  margin: 1.25rem 0 1.75rem 1.5rem;
}

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

.article-body img {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 0.75rem;
  margin: 2rem auto;
}

.article-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 2rem 0;
  font-size: 0.95rem;
}

.article-body th, .article-body td {
  border: 1px solid hsl(var(--border));
  padding: 0.75rem 1rem;
  text-align: left;
}

.article-body th {
  background-color: hsl(var(--muted));
  font-weight: 600;
}

/* Card Hover micro-interaction */
.news-card-hover {
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease;
}

.news-card-hover:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px -10px rgba(0, 0, 0, 0.15);
}

.dark .news-card-hover:hover {
  box-shadow: 0 12px 30px -10px rgba(0, 0, 0, 0.5);
}

/* Authentic glass-panel from live site */
.glass-panel {
  border-width: 1px;
  border-color: rgba(255, 255, 255, 0.1);
  background-color: rgba(255, 255, 255, 0.05);
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
}

/* Animate text gradient for Hero Title matching Index.tsx */
@keyframes text-gradient {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.animate-text-gradient {
  background-size: 200% auto;
  animation: text-gradient 6s linear infinite;
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
}

/* Line clamp utilities */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-4 {
  display: -webkit-box;
  -webkit-line-clamp: 4;
  line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Authentic navigation dropdown widths matching cnaws.in */
.nav-dropdown-departments {
  width: 330px !important;
  max-width: 90vw !important;
}

.nav-dropdown-categories {
  width: 270px !important;
  max-width: 90vw !important;
  max-height: 350px !important;
  overflow-y: auto !important;
}

/* Custom scrollbar matching cnaws.in */
.custom-scrollbar::-webkit-scrollbar {
  width: 6px;
}
.custom-scrollbar::-webkit-scrollbar-track {
  background: transparent;
}
.custom-scrollbar::-webkit-scrollbar-thumb {
  background: rgba(156, 163, 175, 0.5);
  border-radius: 9999px;
}
.custom-scrollbar::-webkit-scrollbar-thumb:hover {
  background: rgba(107, 114, 128, 0.8);
}

.nav-dropdown-research {
  width: 270px !important;
  max-width: 90vw !important;
}

.nav-dropdown-who {
  width: 240px !important;
  max-width: 90vw !important;
}

.nav-dropdown-map {
  width: 280px !important;
  max-width: 90vw !important;
}

/* Dark/Light Logo Toggle & Icon Display (100% reliable across all browsers) */
.cnaws-logo-dark {
  display: none !important;
}
.cnaws-logo-light {
  display: block !important;
}
.cnaws-theme-sun {
  display: none !important;
}
.cnaws-theme-moon {
  display: block !important;
}

html.dark .cnaws-logo-dark,
.dark .cnaws-logo-dark {
  display: block !important;
}
html.dark .cnaws-logo-light,
.dark .cnaws-logo-light {
  display: none !important;
}
html.dark .cnaws-theme-sun,
.dark .cnaws-theme-sun {
  display: block !important;
}
html.dark .cnaws-theme-moon,
.dark .cnaws-theme-moon {
  display: none !important;
}

/* Fallbacks for Tailwind dark: display variants */
html.dark .dark\:hidden,
.dark .dark\:hidden {
  display: none !important;
}
html.dark .dark\:block,
.dark .dark\:block {
  display: block !important;
}
html.dark .dark\:inline,
.dark .dark\:inline {
  display: inline !important;
}
html.dark .dark\:inline-block,
.dark .dark\:inline-block {
  display: inline-block !important;
}
html.dark .dark\:flex,
.dark .dark\:flex {
  display: flex !important;
}

/* Metallic / Gradient Gray Text for Headings */
.text-gradient-gray,
.dark .text-gradient-gray,
html.dark .text-gradient-gray {
  background: linear-gradient(180deg, #ffffff 0%, rgba(255, 255, 255, 0.6) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* ==========================================================================
   CNAWS Universal Motion & Scroll-Reveal System (Replica of live cnaws.in)
   ========================================================================== */

html.cnaws-motion-ready .cnaws-reveal {
  opacity: 0;
  transform: translateY(28px);
  will-change: opacity, transform;
  transition: opacity 0.65s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.65s cubic-bezier(0.16, 1, 0.3, 1);
}

html.cnaws-motion-ready .cnaws-reveal.cnaws-revealed {
  opacity: 1 !important;
  transform: translateY(0) !important;
}

/* Smooth Entrance Rise Animation */
@keyframes rise {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: none; }
}

@keyframes cnawsHeroFadeInUp {
  0% {
    opacity: 0;
    transform: translateY(28px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-rise {
  animation: rise 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.animate-hero-fade {
  animation: cnawsHeroFadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* Accessibility: respect prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  html.cnaws-motion-ready .cnaws-reveal {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

/* ====================================================================
   Author Profile Header & Sidebar Widgets (Matches live cnaws.in)
   ==================================================================== */
.author-header-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  margin-bottom: 3.5rem;
  align-items: start;
}

@media (min-width: 1024px) {
  .author-header-grid {
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
    gap: 3rem;
  }
}

.author-profile-card {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
  align-items: flex-start;
  min-width: 0;
}

@media (min-width: 640px) {
  .author-profile-card {
    flex-direction: row;
    gap: 2rem;
  }
}

.author-avatar-wrapper {
  width: 100%;
  max-width: 250px;
  flex-shrink: 0;
  aspect-ratio: 4 / 5;
  border-radius: 1rem;
  overflow: hidden;
  background-color: hsl(var(--muted));
  border: 1px solid hsl(var(--border) / 0.5);
  box-shadow: 0 4px 12px -2px rgba(0, 0, 0, 0.06);
}

.author-avatar-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.author-info-content {
  flex: 1 1 0%;
  min-width: 0;
}

.author-badge {
  display: inline-block;
  padding: 0.25rem 0.65rem;
  background-color: hsl(var(--muted));
  color: hsl(var(--muted-foreground));
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  border-radius: 0.25rem;
}

.author-name-title {
  font-family: 'Outfit', sans-serif;
  font-size: 2.25rem;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: hsl(var(--foreground));
  margin-top: 0.5rem;
  margin-bottom: 0.75rem;
}

@media (min-width: 768px) {
  .author-name-title {
    font-size: 2.75rem;
  }
}

.author-bio-text {
  font-family: 'Inter', sans-serif;
  font-size: 0.9375rem;
  line-height: 1.65;
  color: hsl(var(--muted-foreground));
  font-weight: 400;
}

.author-social-btn {
  width: 2.375rem;
  height: 2.375rem;
  border-radius: 9999px;
  border: 1px solid hsl(var(--border));
  background-color: hsl(var(--card));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: hsl(var(--muted-foreground));
  transition: all 0.2s ease;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.author-social-btn:hover {
  color: hsl(var(--foreground));
  border-color: hsl(var(--muted-foreground));
  transform: translateY(-1px);
}

.author-sidebar-widget {
  background-color: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: 1rem;
  padding: 1.5rem;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05);
}

@media (min-width: 768px) {
  .author-sidebar-widget {
    padding: 1.75rem 2rem;
  }
}

/* ====================================================================
   Floating Strategic Briefing Newsletter Widget (Capsule Palette 1:1)
   ==================================================================== */
#newsletter-floating-popup {
  background: rgba(10, 10, 10, 0.75) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-radius: 1.25rem !important;
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.05) !important;
  color: #ffffff !important;
}

#newsletter-floating-popup h4 {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
  color: #ffffff !important;
  font-weight: 700 !important;
}

#newsletter-floating-popup p {
  color: rgba(255, 255, 255, 0.7) !important;
}

#newsletter-floating-popup #popup-newsletter-email {
  background: rgba(255, 255, 255, 0.05) !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  color: #ffffff !important;
  border-radius: 0.5rem !important;
}

#newsletter-floating-popup #popup-newsletter-email::placeholder {
  color: rgba(255, 255, 255, 0.4) !important;
}

#newsletter-floating-popup #popup-newsletter-email:focus {
  border-color: rgba(255, 255, 255, 0.35) !important;
  background: rgba(255, 255, 255, 0.1) !important;
}

#newsletter-floating-popup #popup-newsletter-btn {
  background: #ffffff !important;
  color: #000000 !important;
  font-weight: 800 !important;
  border-radius: 0.5rem !important;
  transition: all 0.2s ease !important;
}

#newsletter-floating-popup #popup-newsletter-btn:hover {
  background: rgba(255, 255, 255, 0.88) !important;
  transform: translateY(-1px);
}

#newsletter-floating-popup .newsletter-popup-close {
  position: absolute !important;
  top: 14px !important;
  right: 14px !important;
  left: auto !important;
  bottom: auto !important;
  color: rgba(255, 255, 255, 0.5) !important;
  cursor: pointer !important;
  z-index: 25 !important;
}

#newsletter-floating-popup .newsletter-popup-close:hover {
  color: #ffffff !important;
}

/* ==========================================================================
   CNAWS Social Share Bar & Pill Buttons (Matches Reference 1:1)
   ========================================================================== */

.cnaws-share-wrapper {
  margin: 1.5rem 0 2rem 0;
  padding-top: 1rem;
  border-top: 1px solid #e5e7eb;
}

html.dark .cnaws-share-wrapper {
  border-top-color: rgba(255, 255, 255, 0.12);
}

.cnaws-share-bar {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  gap: 0.625rem !important; /* 10px */
}

.cnaws-share-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0.5rem !important; /* 8px gap */
  padding: 0.45rem 0.95rem !important; /* 7px 15px */
  border-radius: 0.5rem !important; /* 8px rounded */
  background-color: #f0f4f9 !important;
  border: 1px solid #dbe4ee !important;
  color: #1e293b !important;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
  font-size: 0.84rem !important; /* ~13.5px */
  font-weight: 500 !important;
  line-height: 1.2 !important;
  text-decoration: none !important;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04) !important;
  transition: all 0.15s ease-in-out !important;
  cursor: pointer !important;
  user-select: none !important;
  white-space: nowrap !important;
}

.cnaws-share-btn:hover {
  background-color: #e2eaf2 !important;
  border-color: #cbd5e1 !important;
  color: #0f172a !important;
  box-shadow: 0 2px 4px rgba(15, 23, 42, 0.08) !important;
  transform: translateY(-1px);
}

.cnaws-share-btn:active {
  transform: translateY(0);
  background-color: #d8e3ed !important;
}

.cnaws-share-btn svg,
.cnaws-share-btn .cnaws-share-icon {
  width: 0.95rem !important; /* 15px */
  height: 0.95rem !important;
  flex-shrink: 0 !important;
  display: inline-block !important;
  vertical-align: middle !important;
}

.cnaws-share-btn.copied {
  background-color: #ecfdf5 !important;
  border-color: #a7f3d0 !important;
  color: #065f46 !important;
}

/* Dark mode support */
html.dark .cnaws-share-btn {
  background-color: rgba(255, 255, 255, 0.06) !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
  color: #e2e8f0 !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2) !important;
}

html.dark .cnaws-share-btn:hover {
  background-color: rgba(255, 255, 255, 0.12) !important;
  border-color: rgba(255, 255, 255, 0.22) !important;
  color: #ffffff !important;
}

html.dark .cnaws-share-btn:active {
  background-color: rgba(255, 255, 255, 0.16) !important;
}

html.dark .cnaws-share-btn.copied {
  background-color: rgba(16, 185, 129, 0.15) !important;
  border-color: rgba(16, 185, 129, 0.35) !important;
  color: #34d399 !important;
}

/* Print and PDF styling */
.cnaws-print-header,
.cnaws-print-footer {
  display: none !important;
}

@media print {
  @page {
    margin: 12mm;
  }

  *, *::before, *::after {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  /* Universal print layout resets */
  html, body {
    background-color: #ffffff !important;
    background: #ffffff !important;
    color: #0f172a !important;
    font-size: 10pt !important;
    line-height: 1.6 !important;
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
  }

  /* Force white background and dark text even if site was in dark mode */
  html.dark, body.dark, html.dark body {
    background-color: #ffffff !important;
    background: #ffffff !important;
    color: #0f172a !important;
  }

  html.dark *, html.dark p, html.dark span, html.dark div, html.dark h1, html.dark h2, html.dark h3, html.dark li {
    color: #1e293b !important;
  }

  /* Hide screen-only interactive & navigational UI */
  header, footer, nav, 
  .cnaws-share-wrapper, .cnaws-share-action-bar, 
  #article-reading-progress, button,
  .cnaws-related-articles,
  #cnaws-pdf-root,
  #cnaws-pdf-guide-toast,
  .article-hero-overlay {
    display: none !important;
  }

  /* Show elite editorial publication header & footer */
  .cnaws-print-header {
    display: block !important;
    margin-bottom: 20px !important;
    padding-bottom: 12px !important;
    border-bottom: 2px solid #0f172a !important;
    page-break-after: avoid !important;
    break-after: avoid !important;
  }

  .cnaws-print-footer {
    display: block !important;
    margin-top: 28px !important;
    padding-top: 10px !important;
    border-top: 1.5px solid #0f172a !important;
    font-size: 8pt !important;
    color: #64748b !important;
    page-break-inside: avoid !important;
    break-inside: avoid !important;
  }

  body, main, .max-w-4xl {
    max-width: 100% !important;
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  h1 {
    font-size: 21pt !important;
    line-height: 1.25 !important;
    color: #0f172a !important;
    margin: 0 0 16px 0 !important;
    page-break-after: avoid !important;
    break-after: avoid !important;
  }

  /* FIX HERO IMAGE: Remove percentage padding container hack which collapses in print */
  .article-hero-box,
  .rounded-3xl,
  [style*="padding-top: 56.25%"] {
    padding-top: 0 !important;
    height: auto !important;
    min-height: 0 !important;
    position: static !important;
    overflow: visible !important;
    background: transparent !important;
    box-shadow: none !important;
    border-radius: 8px !important;
    margin: 12px 0 20px 0 !important;
    display: block !important;
  }

  /* Hero image and all content images: ensure visible, static, and crisp */
  .article-hero-image,
  .article-hero-box img,
  .rounded-3xl img,
  [style*="padding-top: 56.25%"] img,
  .news-content img,
  .quill-content img,
  article img,
  main img {
    position: static !important;
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    max-height: 380px !important;
    object-fit: cover !important;
    border-radius: 8px !important;
    margin: 12px auto !important;
    visibility: visible !important;
    opacity: 1 !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
    page-break-inside: avoid !important;
    break-inside: avoid !important;
  }

  /* Author avatar and badges */
  .article-author-info,
  .group\/auth {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    margin-bottom: 14px !important;
  }

  .article-author-avatar,
  .group\/auth img,
  .w-11.h-11 img {
    display: inline-block !important;
    width: 38px !important;
    height: 38px !important;
    border-radius: 50% !important;
    object-fit: cover !important;
    visibility: visible !important;
    opacity: 1 !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  /* Executive Summary Box */
  .border-l-4.border-foreground,
  .border-l-4 {
    border-left: 3.5px solid #0f172a !important;
    background-color: #f8fafc !important;
    padding: 10px 14px !important;
    margin: 16px 0 20px 0 !important;
    border-radius: 0 4px 4px 0 !important;
    font-size: 10pt !important;
    line-height: 1.55 !important;
    page-break-inside: avoid !important;
    break-inside: avoid !important;
  }

  /* Article typography */
  .news-content, .quill-content {
    font-size: 10pt !important;
    line-height: 1.65 !important;
    color: #1e293b !important;
  }

  .news-content p, .quill-content p {
    margin-bottom: 10px !important;
    text-align: justify !important;
    text-justify: inter-word !important;
    color: #1e293b !important;
  }

  .news-content h2, .quill-content h2 {
    font-size: 13.5pt !important;
    font-weight: 700 !important;
    color: #0f172a !important;
    margin: 20px 0 8px 0 !important;
    padding-bottom: 4px !important;
    border-bottom: 1px solid #cbd5e1 !important;
    page-break-after: avoid !important;
    break-after: avoid !important;
  }

  .news-content h3, .quill-content h3 {
    font-size: 11.5pt !important;
    font-weight: 700 !important;
    color: #1e3a8a !important;
    margin: 14px 0 6px 0 !important;
    page-break-after: avoid !important;
    break-after: avoid !important;
  }

  .news-content blockquote, .quill-content blockquote {
    border-left: 3px solid #0284c7 !important;
    background-color: #f8fafc !important;
    padding: 8px 12px !important;
    margin: 12px 0 !important;
    font-style: normal !important;
    page-break-inside: avoid !important;
    break-inside: avoid !important;
  }

  .news-content table, .quill-content table {
    border-collapse: collapse !important;
    width: 100% !important;
    margin: 14px 0 !important;
    font-size: 8.5pt !important;
    page-break-inside: avoid !important;
    break-inside: avoid !important;
  }

  .news-content th, .quill-content th {
    background-color: #0f172a !important;
    color: #ffffff !important;
    padding: 6px 8px !important;
    border: 1px solid #0f172a !important;
    text-align: left !important;
  }

  .news-content td, .quill-content td {
    padding: 6px 8px !important;
    border: 1px solid #e2e8f0 !important;
    color: #334155 !important;
  }

  /* Author cards */
  .cnaws-author-cards {
    display: block !important;
    border-top: 1px solid #cbd5e1 !important;
    margin-top: 24px !important;
    padding-top: 16px !important;
    page-break-inside: avoid !important;
    break-inside: avoid !important;
  }
}




