/* ThinkingIF - Professional FT-Inspired Design
   Clean, refined editorial styling with perfect proportions
*/

:root {
  /* Financial Times Inspired Color Palette */
  --ft-blue: #003a70;
  --ft-blue-dark: #002347;
  --ft-blue-light: #0f5c99;
  --navy: #0a1628;
  --navy-dark: #050b14;
  
  --white: #ffffff;
  --cream: #fbf9f7;
  --gray-50: #fafbfc;
  --gray-100: #f4f5f7;
  --gray-200: #e4e6e9;
  --gray-300: #cfd2d6;
  --gray-400: #9fa4aa;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  
  --accent: #003a70;
  --accent-hover: #002347;
  
  /* Typography - FT Editorial Style */
  --font-display: 'Libre Baskerville', Georgia, serif;
  --font-body: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  
  /* Refined Spacing */
  --space-xs: 8px;
  --space-sm: 12px;
  --space-md: 20px;
  --space-lg: 32px;
  --space-xl: 48px;
  --space-2xl: 64px;
  
  /* Subtle Shadows */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.1);
  
  --transition: cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  font-family: var(--font-body);
  background: var(--white);
  color: var(--navy);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Lock page scroll when reader modal is open */
body.modal-open {
  overflow: hidden;
}

/* ========================================
   HEADER - Compact & Professional
   ======================================== */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.98);
  border-bottom: 1px solid var(--gray-200);
  backdrop-filter: blur(8px);
}

.header-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 4px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 60px;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 100%;
}

.brand-logo {
  height: 52px;
  width: auto;
  object-fit: contain;
  border-radius: 2px;
}

.brand-text h1 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.3px;
  color: var(--ft-blue);
  margin-bottom: 0;
  line-height: 1;
}

.brand-tagline {
  font-size: 10px;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  font-weight: 500;
  margin-top: 2px;
  display: block;
}

.header-nav {
  display: flex;
  gap: 24px;
  align-items: center;
}

.nav-link {
  font-size: 14px;
  font-weight: 500;
  color: var(--navy);
  text-decoration: none;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
  transition: all 0.25s var(--transition);
  white-space: nowrap;
}

.nav-link:hover {
  color: var(--ft-blue);
  border-bottom-color: var(--ft-blue);
}

/* ========================================
   FEATURED HERO - Properly Sized
   ======================================== */

.featured-hero {
  position: relative;
  height: 560px;
  margin-top: 60px;
  overflow: hidden;
  background: var(--gray-100);
}

.featured-background {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.featured-image-container {
  position: relative;
  width: 100%;
  height: 100%;
}

.featured-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.featured-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s var(--transition), opacity 0.7s ease;
}

.featured-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    rgba(0, 58, 112, 0.92) 0%,
    rgba(0, 58, 112, 0.75) 45%,
    rgba(0, 58, 112, 0.45) 75%,
    rgba(0, 58, 112, 0.15) 100%
  );
}

.featured-content-wrapper {
  position: relative;
  z-index: 2;
  height: 100%;
  max-width: 1280px;
  margin: 0 auto;
  /* Vertical padding prevents headings from feeling cramped and avoids clipping */
  padding: 56px 32px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.featured-content {
  /* Slightly wider for better line breaks on desktop */
  max-width: 680px;
  animation: fadeInUp 0.6s var(--transition);
}

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

.featured-label {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--white);
  margin-bottom: 16px;
  padding: 6px 14px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 2px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.featured-title {
  font-family: var(--font-display);
  /* Fluid sizing prevents oversized headings on large screens and keeps mobile readable */
  font-size: clamp(22px, 3vw, 36px);
  font-weight: 700;
  line-height: 1.25;
  color: var(--white);
  margin-bottom: 14px;
  letter-spacing: -0.5px;
  text-wrap: balance;
  overflow-wrap: anywhere;
}

.featured-description {
  font-size: clamp(13px, 1.2vw, 15px);
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 20px;
  max-width: 520px;
  overflow-wrap: anywhere;
}

.featured-meta {
  display: flex;
  gap: 10px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.featured-meta span {
  font-size: 12px;
  color: var(--white);
  padding: 5px 12px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 2px;
  font-weight: 500;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.featured-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  background: var(--white);
  color: var(--ft-blue);
  border: none;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s var(--transition);
  border-radius: 2px;
  letter-spacing: 0.2px;
}

.featured-cta:hover {
  background: var(--cream);
  transform: translateX(3px);
  box-shadow: var(--shadow-md);
}

/* Carousel Controls - Refined */
.featured-controls {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 28px;
}

.carousel-btn {
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.08);
  color: var(--white);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s var(--transition);
  border-radius: 2px;
  backdrop-filter: blur(8px);
  font-size: 20px;
}

.carousel-btn:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.5);
  transform: scale(1.05);
}

.carousel-indicators {
  display: flex;
  gap: 8px;
}

.carousel-indicator {
  width: 28px;
  height: 3px;
  background: rgba(255, 255, 255, 0.3);
  cursor: pointer;
  transition: all 0.3s var(--transition);
  border-radius: 2px;
}

.carousel-indicator.active {
  background: var(--white);
  width: 40px;
}

/* ========================================
   FILTERS - Cleaner & More Compact
   ======================================== */

.filters-section {
  background: var(--cream);
  border-bottom: 1px solid var(--gray-200);
  position: sticky;
  top: 61px;
  z-index: 100;
}

.filters-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 16px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.filters-left {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 8px 18px;
  background: transparent;
  border: 1px solid var(--gray-300);
  color: var(--navy);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s var(--transition);
  border-radius: 2px;
}

.filter-btn:hover {
  background: var(--white);
  border-color: var(--ft-blue);
  color: var(--ft-blue);
}

.filter-btn.active {
  background: var(--ft-blue);
  color: var(--white);
  border-color: var(--ft-blue);
}

.search-box {
  position: relative;
  min-width: 260px;
}

.search-box svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gray-400);
  pointer-events: none;
}

.search-box input {
  width: 100%;
  padding: 8px 12px 8px 38px;
  border: 1px solid var(--gray-300);
  background: var(--white);
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--navy);
  transition: all 0.2s var(--transition);
  border-radius: 2px;
}

.search-box input:focus {
  outline: none;
  border-color: var(--ft-blue);
  box-shadow: 0 0 0 3px rgba(0, 58, 112, 0.08);
}

.search-box input::placeholder {
  color: var(--gray-400);
}

/* Filter Options Dropdown */
.filter-options {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 32px 16px;
  background: var(--cream);
}

.filter-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-tag {
  padding: 6px 14px;
  background: var(--white);
  border: 1px solid var(--gray-300);
  color: var(--navy);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s var(--transition);
  border-radius: 2px;
}

.filter-tag:hover {
  border-color: var(--ft-blue);
  color: var(--ft-blue);
  background: var(--gray-50);
}

.filter-tag.active {
  background: var(--ft-blue);
  color: var(--white);
  border-color: var(--ft-blue);
}

/* ========================================
   INSIGHTS GRID - Better Proportions
   ======================================== */

.insights-section {
  background: var(--white);
  padding: 48px 0 80px;
}

.insights-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 32px;
}

.insights-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 28px;
}

.insight-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 2px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s var(--transition);
  display: flex;
  flex-direction: column;
}

.insight-card:hover {
  box-shadow: var(--shadow-lg);
  border-color: var(--gray-300);
  transform: translateY(-4px);
}

.insight-image-wrapper {
  position: relative;
  width: 100%;
  padding-top: 56%;
  overflow: hidden;
  background: var(--gray-100);
}

.insight-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--transition);
}

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

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

.insight-meta {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.insight-tag {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--ft-blue);
  padding: 4px 10px;
  background: rgba(0, 58, 112, 0.08);
  border-radius: 2px;
  transition: all 0.25s var(--transition);
}

.insight-tag.tag-matched {
  background: var(--ft-blue);
  color: white;
  box-shadow: 0 2px 4px rgba(0, 58, 112, 0.2);
}

.insight-title {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--navy);
  margin-bottom: 10px;
  letter-spacing: -0.3px;
}

.insight-excerpt {
  font-size: 14px;
  line-height: 1.6;
  color: var(--gray-600);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Loading & Empty States */
.loading-state,
.empty-state {
  text-align: center;
  padding: 60px 24px;
  color: var(--gray-500);
}

.loading-spinner {
  width: 40px;
  height: 40px;
  margin: 0 auto 16px;
  border: 3px solid var(--gray-200);
  border-top-color: var(--ft-blue);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

.empty-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.empty-state h3 {
  font-size: 20px;
  color: var(--navy);
  margin-bottom: 8px;
}

.empty-state p {
  font-size: 14px;
  color: var(--gray-500);
}

/* ========================================
   READER MODAL - Professional Article View
   ======================================== */

.reader-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
}

.reader-background {
  position: fixed;
  inset: 0;
  z-index: 1;
}

.reader-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.reader-video-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 35, 71, 0.92);
  backdrop-filter: blur(20px);
}

.reader-close {
  position: fixed;
  /* Sit below the fixed site-header (≈64px tall) so it's always clear of the nav */
  top: 76px;
  right: 24px;
  width: 48px;
  height: 48px;
  background: rgba(10, 22, 40, 0.82);
  border: 2px solid rgba(255, 255, 255, 0.55);
  border-radius: 50%;
  font-size: 26px;
  font-weight: 300;
  color: #fff;
  cursor: pointer;
  /* Lives in root stacking context — guaranteed above site-header (z-index:1000) */
  z-index: 99999;
  display: none; /* shown by JS when modal opens */
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-md);
  line-height: 1;
  padding: 0;
}

.reader-close:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.9);
  transform: scale(1.08);
  box-shadow: 0 4px 20px rgba(0,0,0,0.4);
}

.reader-close:active {
  transform: scale(0.96);
}

.reader-container {
  position: relative;
  z-index: 2;
  max-width: 800px;
  width: 100%;
  padding: 80px 24px 60px 24px;
  margin: 0 auto;

  /* Prevent scroll from escaping to the modal/body */
  max-height: 100vh;
  overflow: hidden;
}

.reader-article {
  background: var(--white);
  padding: 48px 56px;
  border-radius: 2px;
  box-shadow: var(--shadow-lg);
  max-width: 100%;
  overflow-wrap: break-word;
  word-wrap: break-word;
  animation: fadeInModal 0.4s ease-out;
  max-height: 85vh;
  overflow-y: auto;
  overflow-x: hidden;
  
  /* Keep scroll inside the white tile */
  overscroll-behavior: contain;
  
  /* Optional: avoid layout shift when scrollbar appears */
  scrollbar-gutter: stable;
}

/* Custom scrollbar on the white blog tile */
.reader-article::-webkit-scrollbar {
  width: 10px;
}

.reader-article::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.05);
  border-radius: 5px;
}

.reader-article::-webkit-scrollbar-thumb {
  background: rgba(0, 58, 112, 0.4);
  border-radius: 5px;
}

.reader-article::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 58, 112, 0.6);
}

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

.article-header {
  margin-bottom: 32px;
  padding-bottom: 28px;
  border-bottom: 2px solid var(--gray-200);
}

.article-meta {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.article-category {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--ft-blue);
  padding: 6px 14px;
  background: rgba(0, 58, 112, 0.08);
  border-radius: 2px;
  border: 1px solid rgba(0, 58, 112, 0.15);
}

.article-date {
  font-size: 13px;
  color: var(--gray-500);
  font-weight: 500;
}

.article-title {
  font-family: var(--font-display);
  /* Fluid sizing keeps long titles from dominating on desktop while staying readable on mobile */
  font-size: clamp(28px, 3.2vw, 40px);
  font-weight: 700;
  line-height: 1.25;
  color: var(--navy);
  margin-bottom: 16px;
  letter-spacing: -0.5px;
  max-width: 100%;
  overflow-wrap: break-word;
  word-wrap: break-word;
  text-wrap: balance;
}

.article-description {
  font-size: 18px;
  line-height: 1.6;
  color: var(--gray-600);
  font-style: italic;
  max-width: 100%;
  overflow-wrap: break-word;
  word-wrap: break-word;
}

/* ========================================
   ARTICLE SHARE BAR
   ======================================== */

.article-share {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 18px;
}

.share-btn {
  display: inline-flex;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  padding: 0;
  border-radius: 2px;
  border: 1px solid var(--gray-300);
  background: var(--white);
  color: var(--navy);
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s var(--transition);
}

/* Ensure share icons render consistently (no oversized SVGs) */
.share-btn .share-icon {
  width: 18px;
  height: 18px;
  display: block;
}

.share-btn:hover {
  border-color: var(--ft-blue);
  color: var(--ft-blue);
  background: var(--gray-50);
}

.share-btn:active {
  transform: translateY(1px);
}

.share-status {
  font-size: 12px;
  color: var(--gray-500);
  margin-left: 6px;
}

/* Visually hidden (accessible) text utility.
   Keeps icon-only controls accessible without showing label text. */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.article-image-container {
  margin-bottom: 36px;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.article-image {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.3s ease;
}

.article-image:hover {
  transform: scale(1.02);
}

.article-content {
  font-size: 16px;
  line-height: 1.75;
  color: var(--navy);
  margin-bottom: 32px;
  max-width: 100%;
  overflow-wrap: break-word;
  word-wrap: break-word;
  word-break: break-word;
}

.article-content h2 {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 700;
  margin: 32px 0 16px;
  color: var(--navy);
  max-width: 100%;
  overflow-wrap: break-word;
}

.article-content h3 {
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 700;
  margin: 24px 0 12px;
  color: var(--navy);
  max-width: 100%;
  overflow-wrap: break-word;
}

.article-content p {
  margin-bottom: 20px;
  max-width: 100%;
  overflow-wrap: break-word;
  word-wrap: break-word;
}

.article-content ul,
.article-content ol {
  margin: 16px 0 20px 24px;
  max-width: 100%;
}

.article-content li {
  margin-bottom: 8px;
  overflow-wrap: break-word;
  word-wrap: break-word;
}

.article-content a {
  color: var(--ft-blue);
  text-decoration: underline;
  word-break: break-all;
}

.article-content blockquote {
  border-left: 3px solid var(--ft-blue);
  padding-left: 20px;
  margin: 24px 0;
  font-style: italic;
  color: var(--gray-600);
  max-width: 100%;
  overflow-wrap: break-word;
}

.article-content img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 24px 0;
  border-radius: 2px;
}

.article-content pre {
  background: var(--gray-100);
  padding: 16px;
  border-radius: 2px;
  overflow-x: auto;
  margin: 20px 0;
  font-size: 14px;
}

.article-content code {
  background: var(--gray-100);
  padding: 2px 6px;
  border-radius: 2px;
  font-size: 14px;
  font-family: 'Monaco', 'Courier New', monospace;
}

.article-tags {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  padding-top: 28px;
  margin-top: 32px;
  border-top: 2px solid var(--gray-200);
}

.article-tag {
  font-size: 12px;
  font-weight: 500;
  color: var(--gray-600);
  padding: 7px 14px;
  background: var(--gray-100);
  border-radius: 2px;
  border: 1px solid var(--gray-200);
  transition: all 0.2s ease;
}

.article-tag:hover {
  background: var(--gray-200);
  border-color: var(--gray-300);
}

/* ========================================
   INFO MODALS - About & Terms
   ======================================== */

.info-modal {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.info-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
}

.info-modal-content {
  position: relative;
  background: var(--white);
  max-width: 640px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  border-radius: 2px;
  box-shadow: var(--shadow-lg);
}

.info-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  background: rgba(0, 0, 0, 0.05);
  border: none;
  border-radius: 50%;
  font-size: 22px;
  font-weight: 300;
  color: var(--navy);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  line-height: 1;
  padding: 0;
  z-index: 1;
}

.info-modal-close:hover {
  background: rgba(0, 0, 0, 0.1);
  transform: rotate(90deg) scale(1.05);
}

.info-modal-body {
  padding: 44px;
}

.info-modal-body h2 {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 28px;
  letter-spacing: -0.4px;
}

.info-modal-body h3 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--navy);
  margin: 28px 0 12px;
}

.info-modal-body h4 {
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  color: var(--navy);
  margin: 20px 0 10px;
}

.info-modal-body p {
  font-size: 15px;
  line-height: 1.7;
  color: var(--gray-600);
  margin-bottom: 16px;
}

.info-modal-body ul {
  margin: 12px 0 20px 24px;
  padding: 0;
}

.info-modal-body ul li {
  font-size: 15px;
  line-height: 1.7;
  color: var(--gray-600);
  margin-bottom: 10px;
}

.info-modal-body .tagline {
  font-style: italic;
  color: var(--ft-blue);
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--gray-200);
}

/* ========================================
   FOOTER - Ultra Compact & Professional
   ======================================== */

.site-footer {
  background: linear-gradient(135deg, #003a70 0%, #002347 100%);
  color: white;
  padding: 28px 0;
  margin-top: 60px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 32px;
}

.footer-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.footer-left {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.footer-brand-name {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  color: white;
  letter-spacing: -0.2px;
}

.footer-tagline {
  font-size: 11px;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.6);
  font-style: italic;
}

.footer-links {
  display: flex;
  gap: 28px;
  align-items: center;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.2s ease;
  position: relative;
}

.footer-links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: white;
  transition: width 0.25s ease;
}

.footer-links a:hover {
  color: white;
}

.footer-links a:hover::after {
  width: 100%;
}

.footer-contact {
  color: rgba(255, 255, 255, 0.8);
  font-size: 13px;
  font-weight: 500;
}

.footer-bottom {
  padding: 16px 0 0;
  text-align: center;
}

.footer-bottom p {
  margin: 0;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.45);
  letter-spacing: 0.2px;
}

/* ========================================
   CONTACT FORM
   ======================================== */

.contact-form {
  max-width: 600px;
}

.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 6px;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--gray-300);
  border-radius: 6px;
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--navy);
  background: var(--white);
  transition: all 0.25s var(--transition);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--ft-blue);
  box-shadow: 0 0 0 3px rgba(0, 58, 112, 0.1);
}

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%23334155' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 44px;
  cursor: pointer;
}

.form-textarea {
  resize: vertical;
  min-height: 120px;
  line-height: 1.6;
}

.form-submit {
  margin-top: 28px;
}

.btn-submit {
  width: 100%;
  padding: 14px 24px;
  background: var(--ft-blue);
  color: white;
  border: none;
  border-radius: 6px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s var(--transition);
}

.btn-submit:hover {
  background: var(--ft-blue-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 58, 112, 0.2);
}

.btn-submit:active {
  transform: translateY(0);
}

.btn-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.form-status {
  margin-top: 16px;
  padding: 12px 16px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  text-align: center;
}

.form-status.success {
  background: #d1fae5;
  color: #065f46;
  border: 1px solid #10b981;
}

.form-status.error {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #ef4444;
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

@media (max-width: 1024px) {
  .header-container,
  .filters-container,
  .insights-container,
  .footer-container {
    padding-left: 24px;
    padding-right: 24px;
  }
  
  .featured-content-wrapper {
    padding: 48px 24px;
  }
  
  .featured-hero {
    min-height: 420px;
  }

  
  .insights-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
  }
  
  .footer-content {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
  }
  
  .footer-links {
    gap: 24px;
  }
}

@media (max-width: 768px) {
  .header-container {
    padding: 4px 20px;
    min-height: 52px;
  }
  
  .header-nav {
    gap: 16px;
    /* Prevent nav from forcing layout overflow on small screens */
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .header-nav::-webkit-scrollbar { display: none; }
  
  .nav-link {
    font-size: 12px;
  }
  
  .brand-logo {
    height: 44px;
    width: auto;
  }
  
  .brand-text h1 {
    font-size: 18px;
  }
  
  .brand-tagline {
    font-size: 9px;
  }
  
  .featured-hero {
    min-height: 360px;
    margin-top: 60px;
  }

  .featured-content-wrapper {
    padding: 44px 20px;
  }

  .featured-content-wrapper {
    padding: 44px 20px;
  }
  
  .filters-section {
    top: 60px;
  }
  

  
  .filters-container {
    flex-direction: column;
    align-items: stretch;
    padding: 14px 20px;
  }
  
  .filters-left {
    width: 100%;
    justify-content: flex-start;
  }
  
  .search-box {
    min-width: 100%;
  }
  
  .insights-section {
    padding: 36px 0 60px;
  }
  
  .insights-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .reader-article {
    padding: 32px 28px;
  }

  /* Mobile reader ergonomics without affecting desktop styling */
  .reader-container {
    padding: 72px 20px 44px 20px;
  }

  .reader-close {
    top: calc(64px + env(safe-area-inset-top, 0px));
    right: calc(16px + env(safe-area-inset-right, 0px));
  }

  .reader-article {
    max-height: calc(100vh - 128px);
    -webkit-overflow-scrolling: touch;
  }
  
  .article-title {
    font-size: 30px;
  }
  
  .article-description {
    font-size: 17px;
  }
  
  .article-content h2 {
    font-size: 24px;
  }
  
  .article-content h3 {
    font-size: 20px;
  }
  
  .site-footer {
    padding: 24px 0;
    margin-top: 48px;
  }
  
  .footer-content {
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
  }
  
  .footer-links {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }
  
  .info-modal-body {
    padding: 32px;
  }
}

@media (max-width: 480px) {
  .header-container {
    padding: 4px 16px;
    min-height: 48px;
  }
  
  .header-nav {
    gap: 10px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .header-nav::-webkit-scrollbar { display: none; }
  
  .nav-link {
    font-size: 11px;
    padding: 4px 0;
  }
  
  .brand-logo {
    height: 40px;
    width: auto;
  }
  
  .brand-text h1 {
    font-size: 16px;
  }
  
  .brand-tagline {
    display: none;
  }
  
  .featured-hero {
    min-height: 320px;
  }

  .featured-content-wrapper {
    padding: 40px 16px;
  }

  .featured-content-wrapper {
    padding: 40px 16px;
  }

  
  .featured-controls {
    gap: 12px;
  }
  
  .carousel-btn {
    width: 36px;
    height: 36px;
    font-size: 18px;
  }
  
  .filters-left {
    gap: 6px;
  }
  
  .filter-btn {
    font-size: 12px;
    padding: 7px 14px;
  }
  
  .reader-container {
    padding: 72px 16px 44px 16px;
  }

  .reader-close {
    top: calc(60px + env(safe-area-inset-top, 0px));
    right: calc(14px + env(safe-area-inset-right, 0px));
    width: 42px;
    height: 42px;
  }
  
  .reader-article {
    max-height: calc(100vh - 128px);
    -webkit-overflow-scrolling: touch;
  }
  
  .reader-article {
    padding: 24px 20px;
  }
  
  .article-title {
    font-size: 26px;
  }
  
  .article-description {
    font-size: 16px;
  }

  .article-share {
    gap: 8px;
  }

  /* Larger tap targets on phones */
  .share-btn {
    width: 44px;
    height: 44px;
    padding: 0;
    border-radius: 999px;
  }

  /* Keep header nav usable when space is tight */
  .header-nav {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .header-nav::-webkit-scrollbar { display: none; }
  
  .article-content {
    font-size: 15px;
  }
  
  .article-content h2 {
    font-size: 22px;
  }
  
  .article-content h3 {
    font-size: 19px;
  }
  
  .footer-links {
    width: 100%;
  }
  
  .info-modal-body {
    padding: 28px 24px;
  }
}

/* ========================================
   PRINT STYLES
   ======================================== */

@media print {
  .site-header,
  .filters-section,
  .site-footer,
  .reader-close,
  .featured-controls,
  .carousel-indicators {
    display: none;
  }
  
  .reader-article {
    box-shadow: none;
    padding: 0;
  }
  
  .article-content {
    color: black;
  }
}
/* ========================================
   EMAIL GATE
   ======================================== */


/* =============================================================================
   EMAIL GATE - PREMIUM MODERN DESIGN
   ============================================================================= */


/* =============================================================================
   SITE-WIDE IMPROVED SPACING & LINE HEIGHTS
   ============================================================================= */

/* Better base typography */
body {
  line-height: 1.7;
  letter-spacing: 0.01em;
}

/* Article reader - better spacing */
.article-content {
  font-size: 1.0625rem;
  line-height: 1.9;
}

.article-content p {
  margin-bottom: 1.75rem;
  line-height: 1.9;
}

.article-content h1,
.article-content h2,
.article-content h3,
.article-content h4,
.article-content h5,
.article-content h6 {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--navy);
  margin-top: 2.75rem;
  margin-bottom: 1.5rem;
  line-height: 1.35;
}

.article-content h1 { font-size: 2rem; }
.article-content h2 { font-size: 1.75rem; }
.article-content h3 { font-size: 1.5rem; }
.article-content h4 { font-size: 1.25rem; }

.article-content ul,
.article-content ol {
  margin-bottom: 2rem;
  padding-left: 2rem;
  line-height: 1.9;
}

.article-content li {
  margin-bottom: 0.875rem;
  line-height: 1.9;
}

.article-content blockquote {
  margin: 2.75rem 0;
  padding-left: 2rem;
  line-height: 1.9;
}

/* Card spacing */
.insight-card {
  padding: 0;
}

.insight-body {
  padding: 1.5rem;
}

.insight-title {
  margin-bottom: 0.875rem;
  line-height: 1.4;
}

.insight-excerpt {
  line-height: 1.75;
  margin-bottom: 0;
}

.insight-meta {
  margin-bottom: 1rem;
  gap: 0.625rem;
}

/* Featured section */
.featured-title {
  line-height: 1.25;
  margin-bottom: 1.5rem;
}

.featured-description {
  line-height: 1.75;
  margin-bottom: 2rem;
}

.featured-meta {
  margin-bottom: 2rem;
  gap: 0.75rem;
}

/* Reader modal header */
.article-header {
  margin-bottom: 3rem;
  padding-bottom: 3rem;
}

.article-meta {
  margin-bottom: 2rem;
  gap: 1.25rem;
}

.article-title {
  margin-bottom: 1.5rem;
  line-height: 1.3;
}

.article-description {
  line-height: 1.75;
  margin-bottom: 0;
}

.article-tags {
  margin-top: 3rem;
  padding-top: 3rem;
  gap: 0.75rem;
}

/* Filter section */
.filters-container {
  padding: 2rem 1.5rem;
  gap: 2rem;
}

.filters-left {
  gap: 0.75rem;
}

.filter-btn {
  padding: 0.75rem 1.5rem;
  line-height: 1.5;
}

/* Info modals */
.info-modal-body {
  padding: 3.5rem;
}

.info-modal-body h2 {
  margin-bottom: 2rem;
  line-height: 1.3;
}

.info-modal-body h3 {
  margin-top: 3rem;
  margin-bottom: 1.5rem;
  line-height: 1.4;
}

.info-modal-body p {
  margin-bottom: 1.5rem;
  line-height: 1.8;
}

.info-modal-body ul,
.info-modal-body ol {
  margin-bottom: 2rem;
  line-height: 1.8;
}

.info-modal-body li {
  margin-bottom: 1rem;
  line-height: 1.8;
}

/* Footer */
.footer-content {
  padding-bottom: 3rem;
  gap: 3rem;
}

.footer-bottom {
  padding-top: 3rem;
}

.footer-bottom p {
  line-height: 1.6;
}

/* Form elements */
.form-group {
  margin-bottom: 2rem;
}

.form-label {
  margin-bottom: 0.75rem;
  line-height: 1.5;
}

/* Contact form in modal */
.contact-form .form-group {
  margin-bottom: 1.75rem;
}

/* Responsive spacing adjustments */
@media (max-width: 768px) {
  .article-content {
    font-size: 1rem;
  }

  .article-content p {
    margin-bottom: 1.5rem;
  }

  .article-content h1,
  .article-content h2,
  .article-content h3 {
    margin-top: 2rem;
    margin-bottom: 1.25rem;
  }

  .article-header {
    margin-bottom: 2.5rem;
    padding-bottom: 2.5rem;
  }

  .info-modal-body {
    padding: 2.5rem 2rem;
  }

  .filters-container {
    padding: 1.5rem 1rem;
    gap: 1.5rem;
  }
}

/* =============================================================================
   EMAIL GATE - PERFECTLY CENTERED + IMPROVED SPACING
   ============================================================================= */


/* =============================================================================
   SITE-WIDE IMPROVED SPACING
   ============================================================================= */

body {
  line-height: 1.7;
}

.article-content p {
  margin-bottom: 1.75rem;
  line-height: 1.9;
}

.article-content h1,
.article-content h2,
.article-content h3 {
  margin-top: 2.75rem;
  margin-bottom: 1.5rem;
  line-height: 1.35;
}

.article-content li {
  margin-bottom: 0.875rem;
  line-height: 1.9;
}

.insight-body {
  padding: 1.5rem;
}

.insight-title {
  margin-bottom: 0.875rem;
  line-height: 1.4;
}

/* =============================================================================
   EMAIL GATE - PERFECTLY CENTERED + PROPER SPACING
   ============================================================================= */

.email-gate {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  z-index: 99999;
  display: none; /* JS toggles via body.email-gate-active */
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(4, 17, 34, 0.70);
  backdrop-filter: blur(6px);
}

body.email-gate-active .email-gate {
  display: flex;
}

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

.email-gate-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(10, 22, 40, 0.97) 0%, rgba(30, 58, 95, 0.95) 100%);
  backdrop-filter: blur(12px) saturate(150%);
  -webkit-backdrop-filter: blur(12px) saturate(150%);
  z-index: 1;
}

.email-gate-container {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 540px;
  margin: auto;
  background: linear-gradient(to bottom, #ffffff 0%, #fafbfc 100%);
  border-radius: 20px;
  box-shadow: 
    0 30px 90px rgba(0, 0, 0, 0.35),
    0 0 1px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  animation: gateSlideUp 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

@keyframes gateSlideUp {
  from {
    opacity: 0;
    transform: translateY(40px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.email-gate-content {
  padding: 56px 48px 48px;
  position: relative;
}

/* Logo section */
.gate-logo {
  text-align: center;
  margin-bottom: 32px;
  animation: gateLogoFloat 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.2s backwards;
}

@keyframes gateLogoFloat {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.gate-logo img {
  max-width: 72px;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.1));
}

/* Step animations */
.email-gate-step {
  animation: gateStepFadeIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* Typography - IMPROVED VERTICAL SPACING */
.gate-title {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 700;
  color: #0a1628;
  margin-bottom: 20px;
  line-height: 1.3;
  text-align: center;
  letter-spacing: -0.02em;
}

.gate-subtitle {
  font-size: 15px;
  color: #64748b;
  font-style: italic;
  margin-bottom: 32px;
  text-align: center;
  font-weight: 500;
  line-height: 1.6;
}

.gate-description {
  margin-bottom: 40px;
  line-height: 1.8;
  color: #475569;
  font-size: 15px;
}

.gate-description p {
  margin-bottom: 20px;
  line-height: 1.8;
}

/* Primary Button */
.gate-btn-primary {
  width: 100%;
  padding: 16px 32px;
  background: linear-gradient(135deg, #0f5c99 0%, #003a70 100%);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 
    0 4px 14px rgba(0, 58, 112, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  position: relative;
  overflow: hidden;
  line-height: 1.5;
}

.gate-btn-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, transparent 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.gate-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 
    0 8px 24px rgba(0, 58, 112, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.gate-btn-primary:hover::before {
  opacity: 1;
}

.gate-btn-primary:active {
  transform: translateY(0);
}

.gate-btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* Secondary Button */
.gate-btn-secondary {
  padding: 14px 28px;
  background: white;
  color: #0a1628;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  line-height: 1.5;
}

.gate-btn-secondary:hover {
  border-color: #cbd5e1;
  background: #f8fafc;
}

.gate-btn-group {
  display: flex;
  gap: 12px;
  margin-top: 32px;
}

.gate-btn-group .gate-btn-secondary {
  flex: 1;
}

.gate-btn-group .gate-btn-primary {
  flex: 2;
}

/* Step titles */
.gate-step-title {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 28px;
  color: #0a1628;
  text-align: center;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

/* Terms section */
.gate-terms-scroll {
  max-height: 220px;
  overflow-y: auto;
  padding: 24px;
  background: linear-gradient(to bottom, #f8fafc 0%, #f1f5f9 100%);
  border-radius: 12px;
  margin-bottom: 28px;
  font-size: 14px;
  line-height: 1.8;
  color: #475569;
  border: 1px solid #e2e8f0;
}

.gate-terms-scroll p {
  margin-bottom: 16px;
  line-height: 1.8;
}

.gate-terms-scroll::-webkit-scrollbar {
  width: 8px;
}

.gate-terms-scroll::-webkit-scrollbar-track {
  background: #e2e8f0;
  border-radius: 4px;
}

.gate-terms-scroll::-webkit-scrollbar-thumb {
  background: #94a3b8;
  border-radius: 4px;
}

.gate-terms-scroll::-webkit-scrollbar-thumb:hover {
  background: #64748b;
}

/* Checkbox */
.gate-checkbox-group {
  margin-bottom: 28px;
}

.gate-checkbox {
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  padding: 16px;
  border-radius: 12px;
  background: #f8fafc;
  border: 2px solid #e2e8f0;
  transition: all 0.2s ease;
}

.gate-checkbox:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

.gate-checkbox input {
  width: 22px;
  height: 22px;
  cursor: pointer;
  accent-color: #003a70;
  flex-shrink: 0;
}

.gate-checkbox-label {
  font-size: 14px;
  color: #334155;
  font-weight: 500;
  flex: 1;
  line-height: 1.6;
}

/* Form inputs */
.gate-form {
  margin-top: 28px;
}

.gate-input {
  width: 100%;
  padding: 16px 20px;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  font-size: 15px;
  margin-bottom: 20px;
  font-family: inherit;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  background: white;
  line-height: 1.5;
}

.gate-input:focus {
  outline: none;
  border-color: #003a70;
  box-shadow: 0 0 0 4px rgba(0, 58, 112, 0.08);
}

.gate-input::placeholder {
  color: #94a3b8;
}

/* Error message */
.gate-error {
  padding: 14px 18px;
  background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
  color: #dc2626;
  border-radius: 12px;
  font-size: 14px;
  margin-bottom: 20px;
  border: 1px solid #fecaca;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
  line-height: 1.6;
}

.gate-error::before {
  content: '⚠';
  font-size: 18px;
  flex-shrink: 0;
}

/* Success state - FIXED VERTICAL SPACING */
.gate-success-title {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 700;
  margin-bottom: 24px;
  color: #0a1628;
  text-align: center;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.gate-success-message {
  text-align: center;
  margin-bottom: 40px;
  color: #475569;
  line-height: 1.8;
  font-size: 16px;
  padding: 0 20px;
}

/* Mobile responsive */
@media (max-width: 640px) {
  .email-gate {
    padding: 16px;
  }

  .email-gate-container {
    max-width: 100%;
    margin: auto;
    border-radius: 16px;
  }

  .email-gate-content {
    padding: 40px 28px 32px;
  }

  .gate-title {
    font-size: 26px;
    margin-bottom: 16px;
  }

  .gate-step-title {
    font-size: 24px;
    margin-bottom: 20px;
  }

  .gate-success-title {
    font-size: 28px;
    margin-bottom: 20px;
  }

  .gate-success-message {
    font-size: 15px;
    margin-bottom: 32px;
    padding: 0 10px;
  }

  .gate-description {
    margin-bottom: 32px;
  }

  .gate-btn-primary {
    padding: 14px 24px;
    font-size: 15px;
  }

  .gate-btn-group {
    flex-direction: column;
    margin-top: 24px;
  }

  .gate-btn-group .gate-btn-secondary,
  .gate-btn-group .gate-btn-primary {
    flex: 1;
    width: 100%;
  }
}

/* Smooth body scroll lock */
body.email-gate-active {
  overflow: hidden;
}

/* Extra polish */
.email-gate-container::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 20px;
  background: 
    radial-gradient(circle at 20% 30%, rgba(59, 130, 246, 0.03) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(139, 92, 246, 0.03) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

/* Ensure content is above background pattern */
.email-gate-content {
  position: relative;
  z-index: 1;
}

/* Focus states for accessibility */
.gate-btn-primary:focus-visible,
.gate-btn-secondary:focus-visible,
.gate-input:focus-visible {
  outline: 3px solid rgba(0, 58, 112, 0.3);
  outline-offset: 2px;
}

/* ============================================================
   READING PROGRESS BAR
============================================================ */
.reading-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: linear-gradient(90deg, #003a70, #0f5c99);
  z-index: 99999;
  transition: width 0.08s linear;
  pointer-events: none;
}

/* ============================================================
   READ TIME  (inside article header)
============================================================ */
.article-read-time {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-body);
  font-size: 12px;
  color: rgba(255,255,255,0.55);
  margin-left: 12px;
}
.article-read-time::before {
  content: '·';
  margin-right: 3px;
  opacity: 0.5;
}

/* ============================================================
   RELATED POSTS
============================================================ */
.related-posts {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--gray-200);
}

.related-title {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gray-400);
  margin: 0 0 20px;
}

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

.related-card {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: 6px;
  overflow: hidden;
  cursor: pointer;
  transition: background 0.15s, transform 0.15s, box-shadow 0.15s;
}
.related-card:hover { background: var(--gray-100); transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.08); }
.related-card:focus { outline: 2px solid var(--ft-blue); outline-offset: 2px; }

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

.related-img-placeholder {
  width: 100%;
  height: 110px;
  background: var(--gray-100);
}

.related-body {
  padding: 12px 14px;
}

.related-card-title {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.35;
  margin: 0 0 6px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.related-read-time {
  font-family: var(--font-body);
  font-size: 11px;
  color: var(--gray-400);
}

/* ============================================================
   DARK MODE TOGGLE (header button)
============================================================ */
.dark-mode-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(10,22,40,0.18);
  border-radius: 50%;
  background: transparent;
  color: var(--navy);
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  flex-shrink: 0;
  margin-left: 12px;
}
.dark-mode-toggle:hover { background: rgba(10,22,40,0.07); color: var(--navy); }
.dark-mode-toggle .icon-moon { display: none; }
.dark-mode-toggle .icon-sun  { display: block; }

/* ============================================================
   DARK MODE  — override CSS variables on [data-theme="dark"]
   Light theme is the default; dark adds a dark overlay
============================================================ */
[data-theme="dark"] {
  --cream:     #0e1218;
  --gray-50:   #141920;
  --gray-100:  #1a2330;
  --gray-200:  #253040;
  --gray-300:  #374455;
  --gray-400:  #6b7a8d;
  --gray-500:  #94a3b8;
  --gray-600:  #cbd5e1;
  --navy:      #e2e8f0;
  --navy-dark: #f1f5f9;
  --white:     #1e2a38;
}

[data-theme="dark"] body {
  background-color: #0e1218;
  color: #e2e8f0;
}

[data-theme="dark"] .site-header {
  background: rgba(10, 14, 20, 0.97);
  border-bottom-color: rgba(255,255,255,0.07);
}

[data-theme="dark"] .dark-mode-toggle {
  border-color: rgba(255,255,255,0.2);
  color: rgba(255,255,255,0.8);
}
[data-theme="dark"] .dark-mode-toggle:hover { background: rgba(255,255,255,0.1); color: #fff; }
[data-theme="dark"] .dark-mode-toggle .icon-sun  { display: none; }
[data-theme="dark"] .dark-mode-toggle .icon-moon { display: block; }

[data-theme="dark"] .filters-section {
  background: #111827;
  border-color: rgba(255,255,255,0.06);
}

[data-theme="dark"] .filter-btn {
  background: transparent;
  color: #94a3b8;
  border-color: rgba(255,255,255,0.1);
}
[data-theme="dark"] .filter-btn.active,
[data-theme="dark"] .filter-btn:hover {
  background: #1e3a5f;
  color: #93c5fd;
  border-color: #1e3a5f;
}

[data-theme="dark"] .search-box input {
  background: #1a2330;
  border-color: rgba(255,255,255,0.1);
  color: #e2e8f0;
}
[data-theme="dark"] .search-box input::placeholder { color: #4b5563; }

[data-theme="dark"] .insights-section { background: #0e1218; }

[data-theme="dark"] .insight-card {
  background: #141920;
  border-color: rgba(255,255,255,0.07);
}
[data-theme="dark"] .insight-card:hover { background: #1a2330; border-color: rgba(255,255,255,0.14); }

[data-theme="dark"] .insight-title { color: #f1f5f9; }
[data-theme="dark"] .insight-excerpt { color: #94a3b8; }
[data-theme="dark"] .insight-tag { background: #1e2d3d; color: #60a5fa; }

[data-theme="dark"] .site-footer { background: #0a0e14; border-top-color: rgba(255,255,255,0.07); }
[data-theme="dark"] .footer-brand-name,
[data-theme="dark"] .footer-tagline { color: #94a3b8; }
[data-theme="dark"] .footer-links a  { color: #64748b; }
[data-theme="dark"] .footer-bottom p { color: #374151; }

/* ============================================================
   SKELETON LOADERS — shimmer placeholder cards
============================================================ */
@keyframes shimmer {
  0%   { background-position: -800px 0; }
  100% { background-position:  800px 0; }
}
.shimmer {
  background: linear-gradient(90deg, var(--gray-100) 25%, var(--gray-200) 50%, var(--gray-100) 75%);
  background-size: 800px 100%;
  animation: shimmer 1.4s infinite linear;
  border-radius: 2px;
}
.skeleton-card { pointer-events: none; cursor: default; }
.skeleton-image { width: 100%; padding-top: 56%; display: block; }
.skeleton-tag   { height: 18px; width: 70px; margin-bottom: 14px; }
.skeleton-title { height: 20px; width: 90%; margin-bottom: 8px; }
.skeleton-text  { height: 13px; width: 100%; margin-bottom: 6px; }

/* ============================================================
   SCROLL REVEAL — cards fade/slide in on scroll
============================================================ */
.insight-card {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease,
              box-shadow 0.3s ease, border-color 0.2s ease,
              border-left-color 0.2s ease;
}
.insight-card.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
   CATEGORY COLOR CODING — left accent border + tag colours
============================================================ */
.insight-card[data-category="current-affairs"]        { --cat-color: #d97706; }
.insight-card[data-category="alternative-perspective"] { --cat-color: #7c3aed; }
.insight-card[data-category="ai-use-cases"]           { --cat-color: #2563eb; }
.insight-card[data-category="robotics-use-cases"]     { --cat-color: #0891b2; }
.insight-card.is-visible { border-left: 3px solid var(--cat-color, var(--ft-blue)); }

.insight-tag[data-cat="current-affairs"]        { color: #d97706; background: rgba(217,119,6,.09);   }
.insight-tag[data-cat="alternative-perspective"] { color: #7c3aed; background: rgba(124,58,237,.09); }
.insight-tag[data-cat="ai-use-cases"]           { color: #2563eb; background: rgba(37,99,235,.09);  }
.insight-tag[data-cat="robotics-use-cases"]     { color: #0891b2; background: rgba(8,145,178,.09);  }

/* ============================================================
   CARD READ TIME
============================================================ */
.card-read-time {
  font-size: 11px;
  color: var(--gray-400);
  margin-top: auto;
  padding-top: 10px;
  display: block;
  font-family: var(--font-body);
}

/* ============================================================
   LOAD MORE BUTTON
============================================================ */
.load-more-wrap {
  text-align: center;
  padding: 32px 0 0;
}
.load-more-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 36px;
  background: transparent;
  border: 1.5px solid var(--ft-blue);
  color: var(--ft-blue);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  border-radius: 2px;
  transition: background 0.2s, color 0.2s;
}
.load-more-btn:hover { background: var(--ft-blue); color: var(--white); }

/* ============================================================
   CAROUSEL PROGRESS BAR — animated timer strip
============================================================ */
.carousel-progress {
  height: 2px;
  background: rgba(255,255,255,0.2);
  border-radius: 1px;
  overflow: hidden;
  margin-top: 14px;
  width: 160px;
}
.carousel-progress-fill {
  height: 100%;
  background: rgba(255,255,255,0.85);
  border-radius: 1px;
  width: 0%;
}
.carousel-progress-fill.running {
  transition: width 6s linear;
}

/* ============================================================
   BACK TO TOP — inside reader modal
============================================================ */
.reader-back-top {
  position: fixed;
  bottom: 36px;
  right: 32px;
  width: 38px;
  height: 38px;
  background: rgba(10,22,40,0.85);
  border: 1.5px solid rgba(255,255,255,0.35);
  border-radius: 50%;
  color: #fff;
  font-size: 18px;
  line-height: 1;
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 99997;
  transition: background 0.2s, transform 0.2s;
  box-shadow: 0 2px 12px rgba(0,0,0,0.3);
}
.reader-back-top:hover { background: rgba(255,255,255,0.18); transform: translateY(-2px); }
.reader-back-top.visible { display: flex; }

/* ============================================================
   TABLE OF CONTENTS
============================================================ */
.toc-panel {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-left: 3px solid var(--ft-blue);
  border-radius: 2px;
  padding: 16px 20px;
  margin-bottom: 32px;
}
.toc-heading {
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gray-400);
  margin-bottom: 10px;
}
.toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.toc-list li { margin-bottom: 4px; }
.toc-link {
  font-size: 13px;
  color: var(--gray-600);
  text-decoration: none;
  line-height: 1.5;
  display: block;
  padding: 1px 0;
  transition: color 0.15s;
}
.toc-link:hover { color: var(--ft-blue); }
.toc-link.toc-h3 { padding-left: 14px; font-size: 12px; }

/* ============================================================
   ERROR STATE
============================================================ */
.error-state-icon {
  width: 44px;
  height: 44px;
  margin: 0 auto 14px;
  color: var(--gray-300);
}
.retry-btn {
  margin-top: 16px;
  padding: 9px 28px;
  background: var(--ft-blue);
  color: #fff;
  border: none;
  border-radius: 2px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font-body);
  transition: background 0.15s;
}
.retry-btn:hover { background: var(--ft-blue-dark); }

/* ============================================================
   SUBSCRIBER COUNT in email gate
============================================================ */
.gate-sub-count {
  display: block;
  font-size: 13px;
  color: var(--gray-400);
  margin-top: 8px;
  margin-bottom: 0;
  font-family: var(--font-body);
}

/* ============================================================
   DARK MODE additions for new elements
============================================================ */
[data-theme="dark"] .toc-panel { background: #141920; border-color: rgba(255,255,255,0.08); border-left-color: #1e3a5f; }
[data-theme="dark"] .toc-heading { color: #4b5563; }
[data-theme="dark"] .toc-link { color: #94a3b8; }
[data-theme="dark"] .toc-link:hover { color: #60a5fa; }
[data-theme="dark"] .load-more-btn { border-color: #1e3a5f; color: #60a5fa; }
[data-theme="dark"] .load-more-btn:hover { background: #1e3a5f; color: #bfdbfe; }
[data-theme="dark"] .insight-card.is-visible { border-left-color: var(--cat-color, #1e3a5f); }
[data-theme="dark"] .insight-tag[data-cat] { background: rgba(255,255,255,0.07); }
[data-theme="dark"] .card-read-time { color: #4b5563; }
