* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary: #3b82f6;
  --primary-dark: #2563eb;
  --primary-light: #60a5fa;
  --text: #0f172a;
  --text-light: #64748b;
  --bg: #ffffff;
  --surface: #f8fafc;
  --border: #e2e8f0;
  --shadow: rgba(0, 0, 0, 0.1);
  --shadow-lg: rgba(0, 0, 0, 0.15);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Header */
.site-header {
  background: rgba(255, 255, 255, 0.95);
  border-bottom: 1px solid var(--border);
  padding: 24px 0;
  position: sticky;
  top: 0;
  z-index: 100;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.site-title {
  font-size: 32px;
  font-weight: 900;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -1.2px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  transition: opacity 0.2s;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.site-title:hover {
  opacity: 0.85;
}

.site-subtitle {
  font-size: 13px;
  font-weight: 700;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-top: 2px;
}

.site-nav {
  display: flex;
  gap: 30px;
}

.site-nav a {
  color: var(--text-light);
  text-decoration: none;
  font-weight: 600;
  transition: all 0.2s ease;
  padding: 8px 16px;
  border-radius: 8px;
}

.site-nav a:hover {
  color: var(--primary);
  background: var(--surface);
}

/* Hero Section */
.hero {
  position: relative;
  height: 80vh;
  min-height: 500px;
  max-height: 800px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
}

.hero-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.3), rgba(0,0,0,0.7));
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  color: white;
}

.hero-date {
  display: inline-block;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 20px;
  opacity: 0.9;
}

.hero-title {
  font-size: clamp(36px, 6vw, 72px);
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 24px;
  max-width: 900px;
  letter-spacing: -1.5px;
}

.hero-excerpt {
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.6;
  margin-bottom: 30px;
  max-width: 600px;
  opacity: 0.95;
}

.hero-button {
  display: inline-block;
  padding: 16px 48px;
  background: white;
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  border-radius: 12px;
  transition: all 0.2s ease;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.hero-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
}

/* Main Content */
.main-content {
  max-width: 1200px;
  margin: 60px auto;
  padding: 0 20px;
}

.section-title {
  font-size: 36px;
  font-weight: 900;
  margin-bottom: 48px;
  color: var(--text);
  letter-spacing: -1px;
}

/* Story Grid */
.story-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 30px;
  margin-bottom: 60px;
}

.story-card {
  background: var(--bg);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 2px 8px var(--shadow);
  transition: all 0.3s ease;
  animation: fadeInUp 0.6s ease-out;
  border: 1px solid var(--border);
}

.story-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 32px var(--shadow-lg);
  border-color: var(--primary-light);
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.story-image {
  width: 100%;
  height: 200px;
  overflow: hidden;
  background: var(--surface);
}

.story-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.story-card:hover .story-image img {
  transform: scale(1.05);
}

.story-content {
  padding: 25px;
}

.story-date {
  display: block;
  font-size: 13px;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
}

.story-title {
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 12px;
  line-height: 1.3;
  letter-spacing: -0.5px;
}

.story-title a {
  color: var(--text);
  text-decoration: none;
  transition: color 0.2s;
}

.story-title a:hover {
  color: var(--primary);
}

.story-excerpt {
  color: var(--text-light);
  font-size: 15px;
  line-height: 1.6;
  margin-bottom: 15px;
}

.read-more {
  color: var(--primary);
  font-weight: 700;
  text-decoration: none;
  font-size: 15px;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.read-more:hover {
  gap: 12px;
  color: var(--primary-dark);
}

/* Individual Story Page */
article {
  background: white;
  max-width: 900px;
  margin: 0 auto;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.story-header {
  max-width: 800px;
  margin: 0 auto;
  padding: 80px 60px 60px;
  text-align: center;
  background: linear-gradient(180deg, #f8fafc 0%, white 100%);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.story-header .story-date {
  margin-bottom: 24px;
  padding-bottom: 16px;
  font-size: 15px;
  font-weight: 700;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 2.5px;
  border-bottom: 2px solid #e2e8f0;
}

.story-header h1 {
  font-size: clamp(36px, 6vw, 56px);
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 28px;
  letter-spacing: -1.4px;
  color: var(--text);
}

.story-author {
  font-size: 1.05rem;
  font-weight: 600;
  color: #3b82f6;
  margin: 0;
  font-style: italic;
  display: block;
}

.story-body {
  max-width: 900px;
  margin: 0 auto;
  background: white;
}

.story-text {
  padding: 50px 60px;
  font-size: 19px;
  line-height: 1.8;
  color: var(--text);
  font-family: Georgia, 'Times New Roman', serif;
}

.story-text p {
  margin-bottom: 24px;
}

.story-text p:last-child {
  margin-bottom: 0;
}

/* Image Captions */
.image-caption {
  margin-top: 0;
  padding: 16px 20px;
  background: #ffffff;
  border-top: 1px solid #e5e7eb;
  border-bottom: 3px solid var(--primary);
  width: 100%;
}

.caption-text {
  margin: 0 0 8px 0;
  font-size: 16px;
  color: #1f2937;
  line-height: 1.6;
  font-weight: 500;
}

.caption-credit {
  margin: 0;
  font-size: 14px;
  color: #6b7280;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Swiper Carousel */
.story-carousel {
  margin: 50px 0;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
  width: 100%;
  max-width: 100%;
  height: 600px;
}

.story-carousel .swiper-wrapper {
  align-items: center;
  height: 100%;
}

.story-carousel .swiper-slide {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  background: #f8f9fa;
  width: 100%;
  height: 100%;
}

.story-carousel .swiper-slide img {
  width: 100%;
  height: 100%;
  max-height: 600px;
  object-fit: contain;
  cursor: pointer;
  display: block;
}

.story-carousel .swiper-button-next,
.story-carousel .swiper-button-prev {
  color: white;
  background: rgba(0, 0, 0, 0.5);
  width: 44px;
  height: 44px;
  border-radius: 50%;
}

.story-carousel .swiper-button-next:after,
.story-carousel .swiper-button-prev:after {
  font-size: 20px;
}

.story-carousel .swiper-button-next:hover,
.story-carousel .swiper-button-prev:hover {
  background: rgba(0, 0, 0, 0.7);
}

.story-carousel .swiper-pagination-bullet {
  width: 10px;
  height: 10px;
  background: #333;
  opacity: 0.5;
}

.story-carousel .swiper-pagination-bullet-active {
  opacity: 1;
  background: var(--primary);
}

/* Archive Page */
.archive-group {
  margin-bottom: 60px;
}

.archive-month {
  font-size: 32px;
  font-weight: 900;
  margin-bottom: 30px;
  padding-bottom: 16px;
  border-bottom: 3px solid var(--primary);
  letter-spacing: -1px;
}

/* Footer */
.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 40px 20px;
  margin-top: 80px;
  text-align: center;
  color: var(--text-light);
}

/* Responsive */
@media (max-width: 768px) {
  .site-nav {
    gap: 20px;
  }

  .hero-content {
    padding: 0 20px;
  }

  .story-grid {
    grid-template-columns: 1fr;
  }

  .story-gallery {
    grid-template-columns: 1fr;
  }

  .story-hero {
    width: 95%;
    margin: 30px auto;
  }

  article {
    margin: 20px 10px;
    border-radius: 12px;
  }

  .story-header {
    padding: 40px 24px 30px;
  }

  .story-header h1 {
    font-size: clamp(28px, 7vw, 36px);
  }

  .story-text {
    padding: 40px 30px;
    font-size: 17px;
  }

  .story-pdfs,
  .story-chart,
  .story-history,
  .comments-container {
    padding: 40px 30px;
  }

  .story-thread {
    padding: 24px 30px;
  }

  .comment {
    padding: 20px;
  }

  .comment-form {
    padding: 28px;
  }

  .thread-container,
  .history-container {
    padding: 20px;
  }
}

/* Smooth Scroll */
html {
  scroll-behavior: smooth;
}

/* Loading Lazy Images */
img[loading="lazy"] {
  opacity: 0;
  transition: opacity 0.3s;
}

img[loading="lazy"].loaded {
  opacity: 1;
}
/* Thread & History Badges */
.thread-badge,
.history-badge {
  display: inline-block;
  padding: 6px 14px;
  margin: 0 8px 12px 0;
  font-size: 13px;
  font-weight: 700;
  border-radius: 8px;
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: white;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
  transition: transform 0.2s;
}

.thread-badge:hover,
.history-badge:hover {
  transform: translateY(-2px);
}

.history-badge {
  background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
  box-shadow: 0 2px 8px rgba(139, 92, 246, 0.3);
}

.thread-container,
.history-container {
  margin: 40px 0;
  padding: 24px;
  background: #f8fafc;
  border-radius: 12px;
  border-left: 4px solid var(--primary);
}

.thread-container h3,
.history-container h3 {
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 16px;
  color: var(--text);
}

.history-container {
  border-left-color: #8b5cf6;
}

/* Thread Info */
.story-thread {
  padding: 32px 60px;
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  border-left: 6px solid #3b82f6;
  border-top: 1px solid #e5e7eb;
  border-bottom: 1px solid #e5e7eb;
}

.story-thread h3 {
  margin: 0 0 16px 0;
  color: #1e40af;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.3px;
}

.story-thread p {
  margin: 0;
  color: #475569;
  font-size: 16px;
  line-height: 1.7;
}

/* Version History Timeline */
.story-history {
  padding: 60px;
  background: #f8fafc;
  border-top: 1px solid #e5e7eb;
}

.story-history h3 {
  font-size: 28px;
  font-weight: 800;
  margin: 0 0 40px 0;
  color: #0f172a;
  padding-bottom: 16px;
  border-bottom: 4px solid #8b5cf6;
  letter-spacing: -0.8px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.history-timeline {
  position: relative;
  padding-left: 32px;
}

.history-timeline::before {
  content: '';
  position: absolute;
  left: 11px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: linear-gradient(180deg, #3b82f6 0%, #8b5cf6 100%);
}

.history-item {
  position: relative;
  margin-bottom: 24px;
}

.history-item:last-child {
  margin-bottom: 0;
}

.history-marker {
  position: absolute;
  left: -25px;
  top: 4px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #8b5cf6;
  border: 3px solid #f8fafc;
  box-shadow: 0 0 0 2px #8b5cf6;
}

.history-marker.current {
  background: #3b82f6;
  box-shadow: 0 0 0 2px #3b82f6, 0 0 12px rgba(59, 130, 246, 0.5);
}

.history-content {
  padding: 12px 16px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.history-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  color: #1e293b;
  font-size: 14px;
}

.history-meta strong {
  font-weight: 700;
}

.history-meta time {
  color: #64748b;
  font-size: 13px;
}

.history-note {
  margin: 8px 0 0 0;
  padding: 12px;
  background: #f1f5f9;
  border-radius: 6px;
  color: #475569;
  font-size: 14px;
  line-height: 1.5;
}

.history-note-title {
  margin: 12px 0 4px 0;
  font-size: 16px;
  font-weight: 600;
  color: #1e293b;
}

.audio-title {
  margin: 0 0 12px 0;
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 8px;
}

.audio-title::before {
  content: "";
}

/* Evidence Card Audio Player */
.history-audio {
  margin: 24px 0;
  background: #ffffff;
  border: 2px solid #1e293b;
  border-radius: 4px;
  position: relative;
  overflow: hidden;
  box-shadow: 
    4px 4px 0 #1e293b,
    0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Header bar with EXHIBIT label */
.history-audio::before {
  content: 'EXHIBIT: AUDIO EVIDENCE';
  display: block;
  background: #1e293b;
  color: #ffffff;
  padding: 10px 20px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  border-bottom: 2px solid #1e293b;
}

.history-audio .audio-title {
  color: #0f172a;
  font-size: 18px;
  font-weight: 700;
  margin: 20px 20px 16px 20px;
  padding-bottom: 12px;
  border-bottom: 1px dashed #cbd5e1;
  display: block;
}

.history-audio .audio-title::before {
  content: none;
}

.history-audio audio {
  width: calc(100% - 40px);
  margin: 0 20px 20px 20px;
  height: 48px;
  border-radius: 4px;
}

/* Plyr Audio Player styling */
.history-audio .plyr {
  --plyr-color-main: #1e293b;
  --plyr-control-radius: 4px;
  margin: 0 20px 20px 20px;
}

.history-audio .plyr--audio .plyr__controls {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  padding: 12px 16px;
}

.history-audio .plyr__control {
  color: #1e293b;
}

.history-audio .plyr__control:hover {
  background: #e2e8f0;
}

.history-audio .plyr__progress__buffer,
.history-audio .plyr__volume--display {
  background: #e2e8f0;
}

/* Remove the old after pseudo-element */
.history-audio::after {
  content: none;
}

/* Document reference number style */
.history-audio .audio-title::after {
  content: '';
  display: block;
  margin-top: 8px;
  font-size: 11px;
  font-weight: 400;
  color: #64748b;
  letter-spacing: 0.5px;
}

@media (max-width: 768px) {
  .history-audio {
    margin: 20px 0;
    box-shadow: 
      2px 2px 0 #1e293b,
      0 2px 8px rgba(0, 0, 0, 0.1);
  }
  
  .history-audio::before {
    padding: 8px 16px;
    font-size: 10px;
    letter-spacing: 1px;
  }
  
  .history-audio .audio-title {
    font-size: 16px;
    margin: 16px 16px 12px 16px;
  }
  
  .history-audio .plyr,
  .history-audio audio {
    margin: 0 16px 16px 16px;
    width: calc(100% - 32px);
  }
}

.history-author {
  display: block;
  margin-top: 8px;
  color: #64748b;
  font-size: 12px;
  font-style: italic;
}

/* Comments Section */
.comments-section {
  max-width: 900px;
  margin: 0 auto;
  background: white;
  border-top: 1px solid #e5e7eb;
}

.comments-container {
  padding: 60px;
}

.comments-container h2 {
  font-size: 28px;
  font-weight: 800;
  margin: 0 0 40px 0;
  color: #0f172a;
  padding-bottom: 16px;
  border-bottom: 4px solid var(--primary);
  letter-spacing: -0.8px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.comments-list {
  margin-bottom: 50px;
}

.comment {
  background: white;
  border-radius: 16px;
  padding: 0;
  margin-bottom: 24px;
  border: 1px solid #e5e7eb;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.comment:hover {
  border-color: #cbd5e1;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08), 0 0 0 1px rgba(59, 130, 246, 0.1);
  transform: translateY(-2px);
}

.comment-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 24px;
  background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
  border-bottom: 1px solid #f1f5f9;
}

.comment-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 18px;
  text-transform: uppercase;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
  letter-spacing: 0.5px;
}

.comment-avatar:nth-of-type(2n) {
  background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
  box-shadow: 0 2px 8px rgba(139, 92, 246, 0.3);
}

.comment-avatar:nth-of-type(3n) {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.comment-meta {
  flex: 1;
  min-width: 0;
}

.comment-author {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.comment-author strong {
  color: #0f172a;
  font-size: 16px;
  font-weight: 700;
}

.comment-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  color: #1e40af;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.comment-header time {
  color: #64748b;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.comment-header time::before {
  content: '•';
  color: #cbd5e1;
}

.comment-body {
  color: #334155;
  line-height: 1.7;
  font-size: 15px;
  padding: 24px;
}

.no-comments {
  text-align: center;
  padding: 60px 40px;
  color: #64748b;
  font-style: normal;
  background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
  border-radius: 16px;
  border: 2px dashed #e2e8f0;
}

.no-comments p {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: #475569;
}

.no-comments .no-comments-sub {
  margin-top: 8px;
  font-size: 14px;
  font-weight: 400;
  color: #94a3b8;
}

.comment-form {
  background: white;
  border-radius: 20px;
  padding: 40px;
  border: 1px solid #e5e7eb;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06), 0 0 0 1px rgba(59, 130, 246, 0.05);
  position: relative;
  overflow: hidden;
}

.comment-form::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #3b82f6 0%, #8b5cf6 50%, #ec4899 100%);
}

.comment-form h3 {
  font-size: 24px;
  font-weight: 800;
  margin: 0 0 32px 0;
  color: #0f172a;
  letter-spacing: -0.5px;
}

.comment-form .form-group {
  margin-bottom: 24px;
  position: relative;
}

.comment-form label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  font-size: 14px;
  color: #475569;
  letter-spacing: 0.3px;
}

.comment-form input,
.comment-form textarea {
  width: 100%;
  padding: 16px 20px;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  font-size: 15px;
  font-family: inherit;
  background: #f8fafc;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  color: #1e293b;
}

.comment-form input:hover,
.comment-form textarea:hover {
  border-color: #cbd5e1;
  background: white;
}

.comment-form input:focus,
.comment-form textarea:focus {
  outline: none;
  border-color: #3b82f6;
  background: white;
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1), 0 1px 3px rgba(0, 0, 0, 0.1);
  transform: translateY(-1px);
}

.comment-form textarea {
  resize: vertical;
  min-height: 120px;
  line-height: 1.6;
}

.char-counter {
  text-align: right;
  font-size: 12px;
  color: #94a3b8;
  margin-top: 6px;
}

.btn-submit {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: white;
  border: none;
  padding: 16px 40px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 14px rgba(59, 130, 246, 0.4);
  letter-spacing: 0.3px;
  position: relative;
  overflow: hidden;
}

.btn-submit::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.5s;
}

.btn-submit:hover::before {
  left: 100%;
}

.btn-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(59, 130, 246, 0.5);
}

.btn-submit:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.4);
}

.form-note {
  margin-top: 12px;
  font-size: 13px;
  color: #64748b;
  padding: 12px 16px;
  background: #f1f5f9;
  border-radius: 8px;
  border-left: 3px solid #cbd5e1;
}

.comment-message {
  margin-top: 20px;
  padding: 16px 20px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 12px;
  animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.comment-message.success {
  background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
  color: #065f46;
  border: 1px solid #6ee7b7;
}

.comment-message.error {
  background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
  color: #991b1b;
  border: 1px solid #fca5a5;
}

/* Comment Threading & Pagination Styles */
.comment-reply {
  margin-left: 40px;
  margin-top: 12px;
  border-left-color: #94a3b8;
}

.comment-footer {
  padding: 16px 24px;
  display: flex;
  gap: 16px;
  align-items: center;
  background: #f8fafc;
  border-top: 1px solid #f1f5f9;
}

.comment-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

.btn-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  color: #64748b;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-action:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: #3b82f6;
  transform: translateY(-1px);
}

.btn-action:active {
  transform: translateY(0);
}

.btn-reply,
.btn-show-replies {
  background: transparent;
  border: none;
  color: var(--primary);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 0;
  transition: color 0.2s;
}

.btn-reply:hover,
.btn-show-replies:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

.reply-form-container {
  margin-top: 16px;
}

.reply-form {
  background: #ffffff;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 16px;
}

.reply-form .form-group {
  margin-bottom: 12px;
}

.reply-form input,
.reply-form textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 15px;
  font-family: inherit;
  transition: border-color 0.2s;
}

.reply-form input:focus,
.reply-form textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.reply-form-actions {
  display: flex;
  gap: 12px;
  margin-top: 12px;
}

.btn-submit-reply,
.btn-cancel-reply {
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  font-size: 14px;
}

.btn-submit-reply {
  background: var(--primary);
  color: white;
}

.btn-submit-reply:hover {
  background: var(--primary-dark);
}

.btn-cancel-reply {
  background: #f1f5f9;
  color: var(--text);
}

.btn-cancel-reply:hover {
  background: #e2e8f0;
}

.replies-container {
  margin-top: 16px;
}

.load-more-container {
  text-align: center;
  margin: 30px 0;
}

.btn-load-more {
  padding: 12px 32px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-load-more:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

/* PDF Viewer Styles */
.story-pdfs {
  padding: 60px;
  background: #f8fafc;
  border-top: 1px solid #e5e7eb;
}

.story-pdfs h3 {
  font-size: 28px;
  font-weight: 800;
  margin: 0 0 32px 0;
  color: #0f172a;
  padding-bottom: 16px;
  border-bottom: 4px solid var(--primary);
  letter-spacing: -0.8px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.pdf-viewer-container {
  margin-bottom: 32px;
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  border: 2px solid #e5e7eb;
}

.pdf-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
}

.pdf-header h4 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
}

.pdf-download-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.2);
  color: white;
  text-decoration: none;
  border-radius: 6px;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.2s;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.pdf-download-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
}

.pdf-download-btn::before {
  content: '⬇';
  font-size: 16px;
}

/* Organizational Table Styles */
.story-chart {
  padding: 60px;
  background: white;
  border-top: 1px solid #e5e7eb;
  border-bottom: 1px solid #e5e7eb;
}

.story-chart h3 {
  font-size: 28px;
  font-weight: 800;
  margin: 0 0 32px 0;
  color: #0f172a;
  padding-bottom: 16px;
  border-bottom: 4px solid var(--primary);
  letter-spacing: -0.8px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.chart-container {
  background: white;
  padding: 0;
  border-radius: 12px;
  overflow-x: auto;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  border: 2px solid #e5e7eb;
}

.chart-container table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}

.chart-container table thead {
  background: #f1f5f9;
}

.chart-container table th {
  padding: 14px 16px;
  text-align: left;
  font-weight: 700;
  color: #1e293b;
  border-bottom: 3px solid #cbd5e1;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.chart-container table td {
  padding: 12px 16px;
  border-bottom: 1px solid #e2e8f0;
  color: #334155;
  vertical-align: top;
}

.chart-container table tbody tr:hover {
  background: #f8fafc;
}

.chart-container table tbody tr:last-child td {
  border-bottom: none;
}

/* Authority table row styling */
.chart-container table tbody tr.row-legal {
  background: #f0fdf4;
}

.chart-container table tbody tr.row-legal:hover {
  background: #dcfce7;
}

.chart-container table tbody tr.row-violation {
  background: #fef3c7;
  border: 2px solid #f59e0b;
}

.chart-container table tbody tr.row-violation:hover {
  background: #fde68a;
}

.chart-container table tbody tr.row-violation td {
  color: #92400e;
  font-weight: 600;
}

.chart-container table tbody tr.row-illegal {
  background: #fef2f2;
}

.chart-container table tbody tr.row-illegal:hover {
  background: #fee2e2;
}

.chart-container table tbody tr.row-illegal td {
  color: #991b1b;
}

/* Text badges for authority status */
.badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-right: 6px;
}

.badge-valid {
  background: #16a34a;
  color: white;
}

.badge-invalid {
  background: #dc2626;
  color: white;
}

.badge-violation {
  background: #f59e0b;
  color: #451a03;
}

/* Table in version history */
.history-chart {
  margin-top: 16px;
  padding: 20px;
  background: #f8fafc;
  border-radius: 10px;
  border: 2px solid #e2e8f0;
}

.history-chart .chart-title {
  margin: 0 0 16px 0;
  font-size: 16px;
  font-weight: 600;
  color: #1e40af;
  display: flex;
  align-items: center;
  gap: 6px;
}

.history-chart .chart-container {
  padding: 12px;
}

.history-chart table {
  font-size: 13px;
}

.history-chart table th {
  padding: 10px 12px;
  font-size: 12px;
}

.history-chart table td {
  padding: 8px 12px;
}

.history-chart .chart-container {
  background: white;
  padding: 16px;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
}

.pdf-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: white;
  border-bottom: 2px solid var(--border);
}

.pdf-btn {
  padding: 8px 16px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 16px;
}

.pdf-btn:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
}

.pdf-btn:disabled {
  background: var(--border);
  cursor: not-allowed;
  transform: none;
}

.pdf-page-info {
  font-weight: 600;
  color: var(--text);
  font-size: 14px;
}

.pdf-viewer {
  padding: 24px;
  background: #f5f5f5;
  display: flex;
  justify-content: center;
  min-height: 400px;
}

.pdf-canvas {
  max-width: 100%;
  height: auto;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  background: white;
}

.pdf-error {
  padding: 40px;
  text-align: center;
  color: var(--text-light);
  font-size: 16px;
}

.pdf-error a {
  color: var(--primary);
  font-weight: 600;
  text-decoration: underline;
}

/* Admin PDF Styles */
.pdf-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--surface);
  border-radius: 8px;
  border: 2px solid var(--border);
}

.pdf-icon {
  font-size: 32px;
  line-height: 1;
}

.pdf-name {
  flex: 1;
  font-weight: 600;
  color: var(--text);
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Lightbox */
.lightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  z-index: 10000;
  align-items: center;
  justify-content: center;
}

.lightbox.active {
  display: flex;
}

.lightbox-content {
  position: relative;
  max-width: 90%;
  max-height: 90%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.lightbox-content img {
  max-width: 100%;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.lightbox-counter {
  margin-top: 20px;
  color: white;
  font-size: 16px;
  font-weight: 500;
  background: rgba(0, 0, 0, 0.6);
  padding: 8px 16px;
  border-radius: 20px;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: absolute;
  background: rgba(255, 255, 255, 0.9);
  border: none;
  font-size: 36px;
  color: #333;
  cursor: pointer;
  padding: 12px 20px;
  border-radius: 8px;
  transition: background 0.2s, transform 0.2s;
  font-weight: 300;
  z-index: 10001;
}

.lightbox-close {
  top: 30px;
  right: 30px;
  font-size: 42px;
  padding: 8px 16px;
  line-height: 1;
}

.lightbox-prev {
  left: 30px;
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-next {
  right: 30px;
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
  background: white;
  transform: translateY(-50%) scale(1.1);
}

.lightbox-close:hover {
  transform: scale(1.1);
}

.lightbox-close:active,
.lightbox-prev:active,
.lightbox-next:active {
  transform: translateY(-50%) scale(0.95);
}

.lightbox-close:active {
  transform: scale(0.95);
}

@media (max-width: 768px) {
  .lightbox-close {
    top: 15px;
    right: 15px;
    font-size: 32px;
    padding: 6px 12px;
  }

  .lightbox-prev,
  .lightbox-next {
    font-size: 28px;
    padding: 8px 14px;
  }

  .lightbox-prev {
    left: 15px;
  }

  .lightbox-next {
    right: 15px;
  }

  .lightbox-counter {
    font-size: 14px;
    padding: 6px 12px;
  }
}

@media (max-width: 768px) {
  .pdf-header {
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
  }
  
  .pdf-viewer {
    padding: 16px;
  }
  
  .pdf-canvas {
    width: 100%;
  }
  
  .pdf-controls {
    padding: 12px;
    gap: 12px;
  }
  
  .pdf-btn {
    padding: 6px 12px;
    font-size: 14px;
  }
}

/* Newsletter Subscription */
.newsletter-section {
  max-width: 600px;
  margin: 0 auto 40px;
  text-align: center;
  padding: 40px 20px;
  background: var(--surface);
  border-radius: 16px;
  border: 1px solid var(--border);
}

.newsletter-section h3 {
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
}

.newsletter-section p {
  color: var(--text-light);
  margin-bottom: 24px;
  font-size: 15px;
}

.subscribe-form {
  display: flex;
  gap: 12px;
  max-width: 480px;
  margin: 0 auto;
}

.subscribe-form input[type="email"] {
  flex: 1;
  padding: 14px 18px;
  font-size: 15px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  transition: all 0.2s;
}

.subscribe-form input[type="email"]:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.subscribe-form button {
  padding: 14px 28px;
  font-size: 15px;
  font-weight: 600;
  color: white;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.subscribe-form button:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.subscribe-form button:active {
  transform: translateY(0);
}

.subscribe-message {
  margin-top: 16px;
  padding: 12px 18px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  display: none;
}

.subscribe-message.success {
  display: block;
  background: #d1fae5;
  color: #065f46;
  border: 1px solid #6ee7b7;
}

.subscribe-message.error {
  display: block;
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fca5a5;
}

@media (max-width: 768px) {
  .subscribe-form {
    flex-direction: column;
  }
  
  .newsletter-section h3 {
    font-size: 20px;
  }
}

.updated-badge {
  display: inline-block;
  background: #fef3c7;
  color: #92400e;
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 12px;
}

/* Related Stories */
.related-stories {
  background: var(--surface);
  border-left: 3px solid var(--primary);
  padding: 24px;
  margin: 40px 0;
}

.related-stories h3 {
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 16px 0;
  color: var(--text);
}

.related-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.related-list li {
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.related-list li:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.related-list a {
  display: block;
  text-decoration: none;
  color: inherit;
  transition: color 0.2s;
}

.related-list a:hover {
  color: var(--primary);
}

.related-date {
  display: block;
  font-size: 12px;
  color: var(--text-light);
  margin-bottom: 4px;
}

.related-title {
  display: block;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
}

/* Print Styles */
@media print {
  .site-header,
  .site-footer,
  .newsletter-section,
  .comments-section,
  .story-sidebar {
    display: none !important;
  }
  
  body {
    font-size: 12pt;
    line-height: 1.5;
    color: #000;
    background: #fff;
  }
  
  .story-container {
    max-width: 100%;
    padding: 0;
    margin: 0;
  }
  
  .story-content {
    max-width: 100%;
    padding: 0;
  }
  
  .story-header h1 {
    font-size: 20pt;
    page-break-after: avoid;
  }
  
  .story-body {
    max-width: 100%;
  }
  
  .story-body p {
    orphans: 3;
    widows: 3;
  }
  
  .story-body h2,
  .story-body h3 {
    page-break-after: avoid;
  }
  
  .gallery-container,
  .pdf-container {
    page-break-inside: avoid;
  }
  
  img {
    max-width: 100%;
    page-break-inside: avoid;
  }
  
  a {
    text-decoration: underline;
    color: #000;
  }
  
  a[href]:after {
    content: " (" attr(href) ")";
    font-size: 10pt;
    color: #666;
  }
}

/* Professional Modal System */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  animation: fadeIn 0.2s ease;
}

.modal-box {
  background: var(--bg);
  border-radius: 12px;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2);
  max-width: 500px;
  width: 90%;
  max-height: 90vh;
  overflow: auto;
  animation: slideUp 0.3s ease;
}

.modal-header {
  padding: 24px 24px 16px 24px;
  border-bottom: 1px solid var(--border);
}

.modal-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--text);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.modal-icon {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}

.modal-icon.success {
  background: #dcfce7;
  color: #16a34a;
}

.modal-icon.error {
  background: #fee2e2;
  color: #dc2626;
}

.modal-icon.warning {
  background: #fef3c7;
  color: #f59e0b;
}

.modal-icon.info {
  background: #dbeafe;
  color: var(--primary);
}

.modal-body {
  padding: 24px;
  color: var(--text);
  font-size: 15px;
  line-height: 1.6;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

.modal-btn {
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
}

.modal-btn-primary {
  background: var(--primary);
  color: white;
}

.modal-btn-primary:hover {
  background: var(--primary-dark);
}

.modal-btn-danger {
  background: #dc2626;
  color: white;
}

.modal-btn-danger:hover {
  background: #b91c1c;
}

.modal-btn-secondary {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
}

.modal-btn-secondary:hover {
  background: #e2e8f0;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Audio Player Styles */
.story-audio {
  margin: 40px 0;
  padding: 30px;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border: 2px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.story-audio h3 {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.story-audio h3::before {
  content: '🔊';
  font-size: 24px;
}

.plyr {
  --plyr-color-main: var(--primary);
  --plyr-control-radius: 8px;
  border-radius: 12px;
  overflow: hidden;
}

.plyr--audio .plyr__controls {
  background: white;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 15px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.plyr__control--overlaid {
  background: var(--primary);
}

.plyr__control:hover {
  background: var(--primary-light);
}

@media (max-width: 768px) {
  .story-audio {
    padding: 20px;
    margin: 30px 0;
  }
  
  .story-audio h3 {
    font-size: 18px;
  }
}
