/* ============================================
   FOR THE PEOPLE - By The People
   Professional Webapp Styles
   ============================================ */

/* Reset & Base */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { max-width: 100%; }

:root {
  --navy: #1a2744;
  --navy-dark: #0f1a2e;
  --navy-light: #2a3f66;
  --red: #b22234;
  --red-dark: #8b1a28;
  --gold: #c9a94e;
  --gold-light: #e0c76a;
  --gold-dim: rgba(201,169,78,0.4);
  --white: #ffffff;
  --off-white: #f5f3ee;
  --text: #2c2c2c;
  --text-light: #5a5a5a;
  --border: #d4d0c8;
  --shadow: 0 2px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.12);
  --radius: 6px;
  --max-width: 900px;
  --font-serif: 'Merriweather', Georgia, 'Times New Roman', serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --transition: 0.25s ease;
}

html { scroll-behavior: smooth; font-size: 17px; }

body {
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--off-white);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  padding-bottom: 96px;
  text-rendering: optimizeLegibility;
}

/* Typography */
h1, h2, h3, h4 { font-family: var(--font-serif); line-height: 1.3; color: var(--navy); text-align: left; }
h1 { font-size: 2.4rem; margin-bottom: 1.25rem; }
h2 { font-size: 1.8rem; margin: 3rem 0 1.25rem; border-bottom: 2px solid var(--gold); padding-bottom: 0.6rem; }
h3 { font-size: 1.35rem; margin: 2.5rem 0 1rem; color: var(--navy-light); }
h4 { font-size: 1.1rem; margin: 1.5rem 0 0.5rem; }

p { margin-bottom: 1.25rem; text-align: left;  line-height: 1.75; }
a { color: #1a6bb5; text-decoration: underline; transition: color var(--transition); }
a:hover { color: var(--red); }
strong { color: var(--navy); }
blockquote {
  border-left: 4px solid var(--gold);
  padding: 1.5rem 2rem;
  margin: 2rem 0;
  background: linear-gradient(135deg, #1a2f5a, #1e3a6a);
  font-style: italic;
  font-size: 1.05rem;
  line-height: 1.7;
  color: #e8e0c8;
  text-align: left;
  
  border-radius: var(--radius);
}
blockquote a { color: #8bc4f6; text-decoration: underline; }
blockquote a:hover { color: #f0d060; }
ul, ol { margin: 0.75rem 0 1.25rem 1.5rem; }
li { margin-bottom: 0.4rem; text-align: left;  }

/* ============ HEADER ============ */
.site-header {
  background: linear-gradient(135deg, var(--navy-dark) 0%, var(--navy) 60%, var(--navy-light) 100%);
  color: var(--white);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 16px rgba(0,0,0,0.3);
}

.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.site-logo svg { width: 36px; height: 36px; }

.site-title {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--white);
}

.site-subtitle {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--gold);
  opacity: 0.9;
}

.hamburger {
  display: none;
  background: none;
  border: none;
  color: var(--white);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.5rem;
}

/* Navigation */
.main-nav {
  background: rgba(0,0,0,0.15);
  border-top: 1px solid rgba(255,255,255,0.08);
}

.main-nav ul {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  max-width: 1200px;
  margin: 0 auto;
  flex-wrap: wrap;
}

.main-nav li { position: relative; }

.main-nav a {
  display: block;
  padding: 0.7rem 1.1rem;
  color: rgba(255,255,255,0.85);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.3px;
  transition: all var(--transition);
  border-bottom: 2px solid transparent;
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--white);
  background: rgba(255,255,255,0.08);
  border-bottom-color: var(--gold);
}

/* Dropdown */
.has-dropdown > a::after {
  content: ' \25BE';
  font-size: 0.7rem;
  opacity: 0.6;
}

.dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--navy);
  min-width: 260px;
  box-shadow: var(--shadow-lg);
  border-radius: 0 0 var(--radius) var(--radius);
  z-index: 100;
  list-style: none;
  padding: 0;
}

.has-dropdown:hover .dropdown { display: block; }

.dropdown a {
  padding: 0.6rem 1.2rem;
  font-size: 0.8rem;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

/* ============ HERO ============ */
.hero {
  background: linear-gradient(rgba(15,26,46,0.82), rgba(15,26,46,0.92)),
              url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 50"><text x="5" y="35" font-size="30" fill="rgba(255,255,255,0.03)" font-family="serif">We The People</text></svg>');
  background-size: cover;
  color: var(--white);
  text-align: center;
  padding: 4rem 2rem;
}

.hero h1 {
  font-size: 2.8rem;
  color: var(--white);
  margin-bottom: 0.5rem;
  text-shadow: 0 2px 8px rgba(0,0,0,0.3);
  text-align: center;
}

.hero .tagline {
  font-size: 1.1rem;
  color: var(--gold);
  font-family: var(--font-serif);
  font-style: italic;
  margin-bottom: 1rem;
}

.hero-divider {
  width: 80px;
  height: 3px;
  background: var(--red);
  margin: 1.5rem auto;
}

.hero p {
  max-width: 700px;
  margin: 0 auto;
  color: rgba(255,255,255,0.8);
  font-size: 0.95rem;
  line-height: 1.8;
}

/* Chapter hero */
.chapter-hero {
  padding: 3.5rem 2rem 2.5rem;
}

.chapter-hero h1 { font-size: 2.2rem; letter-spacing: -0.5px; text-align: center; }

.chapter-number {
  display: inline-block;
  background: var(--red);
  color: var(--white);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 0.3rem 1rem;
  border-radius: 3px;
  margin-bottom: 0.75rem;
}

/* ============ MAIN CONTENT ============ */
.content-wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2.5rem 2rem 4rem;
}

.content-wrap.with-sidebar {
  max-width: 1100px;
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 3rem;
}

/* Article styles */
.article-content {
  min-width: 0;
  background: var(--white);
  padding: 2rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  overflow: hidden;
}

.article-content img {
  max-width: 100%;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin: 1.5rem 0;
}

/* Source citations */
.source-box {
  background: linear-gradient(135deg, #1a2f5a, #1e3a6a);
  border: 2px solid var(--gold);
  border-left: 4px solid var(--gold);
  color: #f0ede5;
  padding: 1.25rem 1.5rem;
  border-radius: var(--radius);
  margin: 2rem 0;
  text-align: left;
  
}

.source-box h4 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #f0d060;
  margin-bottom: 0.75rem;
}

.source-box ul { margin: 0; padding-left: 1rem; }
.source-box li { font-size: 0.85rem; color: #e0dcd0; margin-bottom: 0.5rem; }
.source-box a { color: #8bc4f6; text-decoration: underline; }
.source-box a:hover { color: #f0d060; }

/* Document links */
.doc-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin: 0.5rem 0;
  transition: all var(--transition);
}

.doc-link:hover {
  border-color: var(--gold);
  box-shadow: var(--shadow);
  transform: translateX(4px);
}

.doc-link .icon { font-size: 1.3rem; }
.doc-link .name { font-weight: 600; font-size: 0.9rem; color: var(--navy); }
.doc-link .type { font-size: 0.75rem; color: var(--text-light); }

/* Key Point callout */
.key-point {
  background: linear-gradient(135deg, #1e3a6a, #2a4a7a);
  border: 2px solid var(--gold);
  color: #f0ede5;
  border-radius: var(--radius);
  padding: 1.75rem 2rem;
  margin: 2rem 0;
  text-align: left;
  
  -webkit-user-select: text;
  user-select: text;
}

.key-point strong { color: #ffffff; }
.key-point a { color: #8bc4f6; }
.key-point::before {
  content: 'KEY POINT';
  display: block;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 3px;
  color: #f0d060;
  margin-bottom: 0.75rem;
  text-align: left;
}

/* ============ TABLE OF CONTENTS ============ */
.toc {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  margin: 2rem 0;
}

.toc-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all var(--transition);
  text-decoration: none;
  color: var(--text);
}

.toc-item:hover {
  border-color: var(--gold);
  box-shadow: var(--shadow);
  transform: translateX(6px);
  color: var(--text);
}

.toc-num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--navy);
  color: var(--gold);
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 1.1rem;
  border-radius: 50%;
  flex-shrink: 0;
}

.toc-title { font-weight: 600; font-size: 1rem; }
.toc-desc { font-size: 0.8rem; color: var(--text-light); margin-top: 0.2rem; }

/* ============ SIDEBAR ============ */
.sidebar { position: sticky; top: 100px; align-self: start; }

.sidebar-section {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}

.sidebar-section h3 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--navy);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--gold);
}

.sidebar-section ul { list-style: none; margin: 0; padding: 0; }

.sidebar-section li a {
  display: block;
  padding: 0.6rem 0.75rem;
  margin-bottom: 0.35rem;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-light);
  background: rgba(0,0,0,0.03);
  border-radius: 6px;
  border-bottom: none;
  transition: background 0.15s, color 0.15s;
}

.sidebar-section li a:hover { color: var(--red); background: rgba(0,0,0,0.06); }
.sidebar-section li a.current { color: var(--navy); font-weight: 600; }

/* ============ CHAPTER NAV (prev/next) ============ */
.chapter-nav {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 2px solid var(--border);
}

.chapter-nav a {
  display: flex;
  flex-direction: column;
  padding: 1rem 1.5rem;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all var(--transition);
  min-width: 200px;
}

.chapter-nav a:hover {
  border-color: var(--gold);
  box-shadow: var(--shadow);
}

/* Share buttons - fixed floating bar */
.share-bar {
  position: fixed;
  bottom: 48px;
  left: 0;
  right: 0;
  display: flex;
  gap: 0.5rem;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1rem;
  background: linear-gradient(135deg, #1a2744, #2a3f66);
  border-top: 2px solid var(--gold);
  z-index: 999;
  flex-wrap: nowrap;
}
.share-bar span {
  font-weight: 700;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--gold);
  text-align: left !important;
  white-space: nowrap;
}
.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.4rem 0.75rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  text-decoration: none;
  color: #ffffff;
  transition: all var(--transition);
  cursor: pointer;
  border: none;
  white-space: nowrap;
}
.share-btn:hover { opacity: 0.85; color: #ffffff; }
.share-btn.truth { background: #6a3bc2; }
.share-btn.x-twitter { background: #000000; }
.share-btn.facebook { background: #1877f2; }
.share-btn.copy-link { background: #4a6a9a; }
body.dark-mode .share-bar { background: linear-gradient(135deg, #0a1020, #1a2744); }

.chapter-nav .label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-light);
}

.chapter-nav .title {
  font-weight: 600;
  color: var(--navy);
  font-size: 0.95rem;
}

.chapter-nav .next { text-align: right; margin-left: auto; }

/* ============ FOOTER ============ */
.site-footer {
  background: var(--navy-dark);
  color: rgba(255,255,255,0.7);
  padding: 2.5rem 2rem;
  text-align: center;
}

.footer-content { max-width: var(--max-width); margin: 0 auto; }

.footer-links {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.footer-links a {
  color: rgba(255,255,255,0.7);
  font-size: 0.85rem;
}

.footer-links a:hover { color: var(--gold); }

.footer-contact { font-size: 0.85rem; margin-bottom: 0.5rem; }
.footer-contact a { color: var(--gold); }

.footer-copy {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.4);
  margin-top: 1rem;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 768px) {
  .hamburger { display: block; }

  .main-nav { display: none; }
  .main-nav.open { display: block; max-height: 80vh; overflow-y: auto; }

  .main-nav ul { flex-direction: column; }

  .main-nav a { padding: 0.8rem 2rem; }

  .dropdown {
    position: static;
    box-shadow: none;
    background: rgba(0,0,0,0.1);
  }

  .has-dropdown:hover .dropdown { display: none; }
  .has-dropdown.open .dropdown { display: block; }

  .hero h1 { font-size: 2rem; }
  .hero { padding: 3rem 1.5rem; }
  .chapter-hero { padding: 2rem 1.5rem; }

  .content-wrap { padding: 1.5rem 1.25rem 3rem; }
  .content-wrap.with-sidebar {
    grid-template-columns: 1fr;
  }

  .sidebar { position: static; }

  h1 { font-size: 1.8rem; }
  h2 { font-size: 1.4rem; }

  .chapter-nav { flex-direction: row; }
  .chapter-nav a { min-width: unset; flex: 1; }
  .chapter-nav .next { text-align: right; }
}

@media (max-width: 480px) {
  .header-top { padding: 0.5rem 1rem; }
  .site-title { font-size: 1.1rem; }
  .hero h1 { font-size: 1.6rem; }

  /* Larger body text for arm's-length phone reading */
  html { font-size: 18px; }
  p, li, td, dd { font-size: 1rem; line-height: 1.8; }

  /* Tighter horizontal padding — gives more reading width */
  .content-wrap { padding: 1.25rem 1rem 3rem; }
  img { max-width: 100%; height: auto; }
  /* Tables must scroll horizontally — never clip them */
  .compare-table { overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; }
  .compare-table table { min-width: 500px; }
  /* Everything else that might overflow gets clipped */
  .key-point, .alert-box, .source-box, .fact-check, .stat-grid, .card-grid { max-width: 100%; overflow: hidden; }
  blockquote { padding: 1.25rem 1rem; }
  .key-point { padding: 1.25rem 1rem; }
  .alert-box { padding: 1rem; }
  .source-box { padding: 1rem; }
  .source-box li { font-size: 0.95rem; }

  /* Headings — tighter margins save vertical space */
  h2 { font-size: 1.35rem; margin: 2rem 0 1rem; }
  h3 { font-size: 1.15rem; margin: 1.75rem 0 0.75rem; }

  /* Stats: force within screen on phones */
  .stat-grid {
    grid-template-columns: 1fr 1fr;
    gap: 0.4rem;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }
  .stat-box {
    padding: 0.75rem 0.4rem;
    min-width: 0;
    word-break: break-word;
    overflow: hidden;
  }
  .stat-num { font-size: 1.1rem; line-height: 1.1; }
  .stat-label { font-size: 0.65rem; letter-spacing: 0; line-height: 1.3; }

  /* Doc links: bigger tap targets */
  .doc-link { padding: 1rem; min-height: 56px; }
  .doc-link .name { font-size: 1rem; }
  .doc-link .type { font-size: 0.85rem; }

  /* Tables: show swipe hint */
  .compare-table { position: relative; }
  .compare-table::after {
    content: '← swipe to scroll →';
    display: block;
    text-align: center;
    font-size: 0.75rem;
    color: var(--gold);
    padding: 0.4rem 0;
    opacity: 0.8;
  }
  table { font-size: 0.9rem; }
  th, td { padding: 0.6rem 0.75rem; }

  /* Process flow steps */
  .process-step { padding: 1rem; }

  /* Chapter nav — full width buttons */
  .chapter-nav a { padding: 0.9rem 0.75rem; font-size: 0.9rem; }
}

/* ============ PRINT ============ */
@media print {
  .site-header, .main-nav, .sidebar, .chapter-nav, .site-footer { display: none; }
  .content-wrap { max-width: 100%; padding: 0; }
  body { font-size: 11pt; }
}

/* ============ SEARCH ============ */
.search-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 2000;
  justify-content: center;
  padding-top: 15vh;
}

.search-overlay.active { display: flex; }

.search-box {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.5rem;
  width: 90%;
  max-width: 600px;
  box-shadow: var(--shadow-lg);
  max-height: 60vh;
  overflow-y: auto;
}

.search-input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  font-size: 1rem;
  font-family: var(--font-sans);
  outline: none;
  transition: border-color var(--transition);
}

.search-input:focus { border-color: var(--navy); }

.search-results { margin-top: 1rem; }

.search-result {
  padding: 0.75rem;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background var(--transition);
}

.search-result:hover { background: var(--off-white); }
.search-result .chapter { font-size: 0.75rem; color: var(--red); text-transform: uppercase; letter-spacing: 1px; }
.search-result .title { font-weight: 600; color: var(--navy); }
.search-result .excerpt { font-size: 0.85rem; color: var(--text-light); }

/* Accordion for FAQ */
.faq-item { border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 0.75rem; overflow: hidden; }
.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.25rem;
  background: var(--white);
  cursor: pointer;
  font-weight: 600;
  color: var(--navy);
  font-size: 0.95rem;
  transition: background var(--transition);
}
.faq-question:hover { background: var(--off-white); }
.faq-question::after { content: '+'; font-size: 1.3rem; color: var(--gold); transition: transform var(--transition); }
.faq-item.open .faq-question::after { content: '\2212'; }
.faq-answer {
  display: none;
  padding: 0 1.25rem 1.25rem;
  background: var(--white);
  color: var(--text-light);
  font-size: 0.9rem;
  line-height: 1.7;
  text-align: left;
  
}
.faq-item.open .faq-answer { display: block; }

/* ============ VISUAL ELEMENTS ============ */

/* Process Flow / Timeline */
.process-flow {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: 2rem 0;
}

.process-step {
  display: flex;
  gap: 1.25rem;
  padding: 1.25rem 0;
  position: relative;
}

.process-step:not(:last-child)::before {
  content: '';
  position: absolute;
  left: 19px;
  top: 3.5rem;
  bottom: 0;
  width: 2px;
  background: var(--gold);
}

.step-num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--navy);
  color: var(--gold);
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 1rem;
  border-radius: 50%;
  flex-shrink: 0;
  z-index: 1;
}

.step-content h4 { margin: 0 0 0.3rem; color: var(--navy); font-size: 1rem; }
.step-content p { margin: 0; font-size: 0.9rem; color: var(--text-light); }

/* Comparison Table */
.compare-table {
  margin: 1.5rem 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow-x: auto;
}
.compare-table table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.compare-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
}
.compare-table::after {
  content: 'Scroll to view all entries \2193';
  display: block;
  position: sticky;
  bottom: 0;
  background: linear-gradient(transparent, var(--off-white) 40%);
  text-align: center;
  padding: 1.5rem 0 0.5rem;
  font-size: 0.8rem;
  color: var(--text-light);
  font-style: italic;
  pointer-events: none;
}
body.dark-mode .compare-table::after {
  background: linear-gradient(transparent, #0f1a2e 40%);
  color: #8a8a8a;
}
.compare-table::-webkit-scrollbar { width: 14px; }
.compare-table::-webkit-scrollbar-track { background: var(--red); border-radius: 0 6px 6px 0; }
.compare-table::-webkit-scrollbar-thumb { background: var(--gold); border-radius: 6px; border: 2px solid var(--red); min-height: 40px; }
.compare-table::-webkit-scrollbar-thumb:hover { background: var(--gold-light); }
.compare-table { scrollbar-width: auto; scrollbar-color: var(--gold) var(--red); }

.compare-table th {
  background: var(--navy);
  color: var(--white);
  padding: 1rem 1.25rem;
  text-align: left;
  font-weight: 600;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.compare-table td {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
  font-size: 0.95rem;
  line-height: 1.6;
}

.compare-table tr:nth-child(even) td { background: rgba(0,0,0,0.02); }

.compare-table .truth { color: var(--navy); font-weight: 600; }
.compare-table .false { color: var(--red); font-weight: 600; }
.compare-table .check { color: #2d8a4e; }
.compare-table .cross { color: var(--red); }

/* Info Cards Grid */
.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin: 1.5rem 0;
  max-width: 100%;
}

.info-card {
  background: linear-gradient(135deg, #1e3a6a, #2a4a7a);
  border: 2px solid var(--gold);
  border-radius: var(--radius);
  padding: 1.75rem 2rem;
  transition: all var(--transition);
  color: #f0ede5;
}

.info-card:hover { border-color: var(--gold-light); box-shadow: 0 4px 16px rgba(0,0,0,0.3); transform: translateY(-2px); }

.info-card .card-icon { font-size: 2.5rem; margin-bottom: 0.75rem; }
.info-card h4 { margin: 0 0 0.75rem; color: #f0d060; font-size: 1.2rem; }
.info-card p { margin: 0; font-size: 1rem; color: #e0dcd0; line-height: 1.7; text-align: left;  }
.info-card a { color: #8bc4f6; }
.info-card strong { color: #ffffff; }

/* Fact vs Fiction boxes */
.fact-check {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 1.5rem 0;
  max-width: 100%;
}

.claim-box, .fact-box, .reality-box {
  padding: 1.5rem;
  border-radius: var(--radius);
}
.claim-box p, .fact-box p, .reality-box p {
  text-align: left;
  
}
.claim-box .label, .fact-box .label, .reality-box .label,
.claim-box span, .fact-box span, .reality-box span {
  display: block;
  text-align: left !important;
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}
.claim-box strong, .fact-box strong, .reality-box strong {
  text-align: left !important;
  display: inline;
}

.claim-box {
  background: linear-gradient(135deg, #7a2030, #9a1520);
  border: 2px solid var(--gold);
  color: #f0ede5;
}
.claim-box strong { color: #ffffff; }
.claim-box a { color: #8bc4f6; }

.claim-box::before {
  content: 'THE CLAIM';
  display: block;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 3px;
  color: #f0d060;
  margin-bottom: 0.75rem;
  text-align: left;
}

.fact-box, .reality-box {
  background: linear-gradient(135deg, #1a4a2a, #2a6a3a);
  border: 2px solid var(--gold);
  color: #f0ede5;
}
.fact-box strong, .reality-box strong { color: #ffffff; }
.fact-box a, .reality-box a { color: #8bc4f6; }

.fact-box::before, .reality-box::before {
  content: 'THE FACTS';
  display: block;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 3px;
  color: #f0d060;
  margin-bottom: 0.75rem;
  text-align: left;
}

/* Timeline */
.timeline {
  position: relative;
  margin: 2rem 0;
  padding-left: 2rem;
  border-left: 3px solid var(--gold);
}

.timeline-item {
  position: relative;
  padding: 0.5rem 0 1.5rem 1.5rem;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -2.35rem;
  top: 0.7rem;
  width: 12px;
  height: 12px;
  background: var(--navy);
  border: 2px solid var(--gold);
  border-radius: 50%;
}

.timeline-date {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--red);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.timeline-title { font-weight: 600; color: var(--navy); margin: 0.2rem 0; }
.timeline-desc { font-size: 0.85rem; color: var(--text-light); margin: 0; }

/* Stat boxes */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(150px, 100%), 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}

.stat-box {
  text-align: center;
  padding: 1.5rem;
  background: linear-gradient(135deg, #1e3a6a, #2a4a7a);
  border: 2px solid var(--gold);
  border-radius: var(--radius);
  color: #f0ede5;
}

.stat-num {
  font-family: var(--font-serif);
  font-size: 2.2rem;
  font-weight: 700;
  color: #f0d060;
  line-height: 1;
}

.stat-label {
  font-size: 0.85rem;
  color: #ffffff;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 0.5rem;
  line-height: 1.4;
}

/* Warning/Alert box */
.alert-box {
  background: linear-gradient(135deg, #7a2030, #9a1520);
  border: 2px solid var(--gold);
  border-left: 4px solid var(--gold);
  color: #f0ede5;
  padding: 1.25rem 1.5rem;
  border-radius: var(--radius);
  margin: 1.5rem 0;
  text-align: left;
  
  -webkit-user-select: text;
  user-select: text;
}

.alert-box strong { color: #ffffff; }
.alert-box a { color: #8bc4f6; }
.alert-box::before {
  content: 'IMPORTANT';
  display: block;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 3px;
  color: #f0d060;
  text-align: left;
  margin-bottom: 0.5rem;
}

/* ============ DIAGRAM: Cycle/Loop ============ */
.cycle-diagram {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0;
  margin: 2rem 0;
  position: relative;
}

.cycle-step {
  width: 200px;
  text-align: center;
  padding: 1rem;
  position: relative;
}

.cycle-step .circle {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 0.75rem;
  font-size: 2rem;
  font-weight: 700;
  color: var(--white);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.cycle-step .circle.navy { background: var(--navy); }
.cycle-step .circle.red { background: var(--red); }
.cycle-step .circle.gold { background: var(--gold); color: var(--navy); }
.cycle-step .circle.dark { background: var(--navy-dark); }

.cycle-step h4 { font-size: 0.85rem; color: var(--navy); margin: 0 0 0.3rem; }
.cycle-step p { font-size: 0.75rem; color: var(--text-light); margin: 0; line-height: 1.4; }

.cycle-arrow {
  display: flex;
  align-items: center;
  font-size: 1.5rem;
  color: var(--gold);
  padding: 0 0.25rem;
}

/* ============ DIAGRAM: Propaganda Funnel ============ */
.funnel {
  margin: 2rem 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.funnel-step {
  padding: 1.25rem 1.5rem;
  margin: 0 auto;
  text-align: left;
  color: #ffffff;
  font-weight: 600;
  font-size: 1rem;
  position: relative;
  border: 2px solid rgba(255,255,255,0.2);
  border-bottom: none;
}

.funnel-step:last-child { border-bottom: 2px solid rgba(255,255,255,0.2); }

.funnel-step:nth-child(1) { background: #2a4a7a; width: 100%; border-radius: var(--radius) var(--radius) 0 0; }
.funnel-step:nth-child(2) { background: #1e3a6a; width: 92%; }
.funnel-step:nth-child(3) { background: #1a2f5a; width: 84%; }
.funnel-step:nth-child(4) { background: #7a2030; width: 76%; }
.funnel-step:nth-child(5) { background: #9a1520; width: 68%; border-radius: 0 0 var(--radius) var(--radius); }

.funnel-step strong { color: #f0d060; display: block; font-size: 1.1rem; margin-bottom: 0.3rem; }

.funnel-step small { display: block; font-weight: 400; font-size: 0.9rem; opacity: 1; margin-top: 0.25rem; color: #f0ede5; line-height: 1.4; }

/* ============ DIAGRAM: Historical Comparison ============ */
.history-compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  margin: 2rem 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.history-col {
  padding: 1.25rem;
}

.history-col.left {
  background: rgba(0,0,0,0.03);
  border-right: 1px solid var(--border);
}

.history-col h4 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin: 0 0 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--gold);
}

.history-col.left h4 { color: var(--text-light); }
.history-col.right h4 { color: var(--red); }

.history-col ul { list-style: none; margin: 0; padding: 0; }
.history-col li {
  padding: 0.5rem 0;
  font-size: 0.85rem;
  border-bottom: 1px solid rgba(0,0,0,0.05);
  color: var(--text-light);
}

/* Responsive for visual elements */
@media (max-width: 768px) {
  .fact-check { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .history-compare { grid-template-columns: 1fr; }
  .history-col.left { border-right: none; border-bottom: 1px solid var(--border); }
  .cycle-diagram { flex-direction: column; align-items: center; }
  .cycle-arrow { transform: rotate(90deg); }
}

/* ============================================
   UX ENHANCEMENTS
   ============================================ */

/* Reading time badge */
.reading-time {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.4rem 1rem;
  background: rgba(255,255,255,0.15);
  border-radius: 20px;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.85);
  font-family: var(--font-sans);
  letter-spacing: 0.02em;
}

/* Dark mode toggle */
/* Solid bottom toolbar */
.bottom-toolbar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 48px;
  background: var(--navy);
  border-top: 2px solid var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  z-index: 1001;
  padding: 0 1rem;
  box-shadow: 0 -2px 12px rgba(0,0,0,0.2);
}
.tb-btn {
  width: 40px;
  height: 36px;
  background: transparent;
  color: var(--white);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 700;
  font-family: var(--font-sans);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}
.tb-btn:hover, .tb-btn:active {
  background: var(--gold);
  color: var(--navy);
  border-color: var(--gold);
}
.tb-dark { font-size: 1.2rem; }
.tb-top { font-size: 1rem; }
.tb-back { font-size: 1rem; }

/* Progress percentage label */
.progress-pct {
  position: fixed;
  top: 5px;
  right: 1rem;
  font-size: 0.7rem;
  color: var(--red);
  font-weight: 700;
  font-family: var(--font-sans);
  z-index: 10000;
  opacity: 0;
  transition: opacity 0.3s;
}

/* ============================================
   DARK MODE
   ============================================ */
body.dark-mode {
  --text: #f0ede5;
  --text-light: #c8c4bc;
  --off-white: #121a28;
  --border: #3a5080;
  --shadow: 0 2px 12px rgba(0,0,0,0.3);
  background: #121a28;
  color: #f0ede5;
}
body.dark-mode p, body.dark-mode li, body.dark-mode td, body.dark-mode dd { color: #f0ede5; }
body.dark-mode strong { color: #ffffff; }
body.dark-mode h1, body.dark-mode h2, body.dark-mode h3, body.dark-mode h4 { color: #e8d9a0; }
body.dark-mode a { color: #8bc4f6; }
body.dark-mode a:hover { color: var(--gold-light); }

body.dark-mode .site-header { background: #0a1020; }
body.dark-mode .hero, body.dark-mode .chapter-hero { background: linear-gradient(135deg, #0a1020, #1a2744); }
body.dark-mode .hero p, body.dark-mode .chapter-hero p, body.dark-mode .tagline { color: #d0ccc0; }

body.dark-mode .article-content { background: #1a2236; border-color: #3a5080; }
body.dark-mode .sidebar { background: transparent; }
body.dark-mode .sidebar-section { background: #1a2236; border-color: #3a5080; }
body.dark-mode .sidebar-section li a { background: rgba(255,255,255,0.05); }
body.dark-mode .sidebar-section li a:hover { background: rgba(255,255,255,0.1); }

body.dark-mode .key-point { background: #1e2d45; border-color: var(--gold); color: #f0ede5; }
body.dark-mode .alert-box { background: #2a1520; border-color: var(--red); color: #f0ede5; }
body.dark-mode .source-box { background: #1a2236; border-color: #3a5080; color: #f0ede5; }

body.dark-mode .info-card { background: #1a2236; border-color: #3a5080; color: #f0ede5; }
body.dark-mode .info-card p { color: #d8d4cc; }
body.dark-mode .info-card h4 { color: #e8d9a0; }
body.dark-mode .stat-box { background: #1a2236; border-color: #3a5080; }
body.dark-mode .stat-num { color: #ffffff; }
body.dark-mode .stat-label { color: #e0dcd0; }
body.dark-mode blockquote { background: #1a2236; border-color: var(--gold); color: #e8e0c8; }

body.dark-mode table { border-color: #3a5080; }
body.dark-mode .compare-table { border-color: #3a5080; scrollbar-color: var(--gold) var(--red-dark); }
body.dark-mode .compare-table::-webkit-scrollbar { width: 14px; }
body.dark-mode .compare-table::-webkit-scrollbar-track { background: var(--red-dark); border-radius: 0 6px 6px 0; }
body.dark-mode .compare-table::-webkit-scrollbar-thumb { background: var(--gold); border-radius: 6px; border: 2px solid var(--red-dark); }
body.dark-mode .compare-table::-webkit-scrollbar-thumb:hover { background: var(--gold-light); }
body.dark-mode th { background: #0a1020; color: var(--gold); }
body.dark-mode td { border-color: #3a5080; background: #1a2236; color: #f0ede5; }
body.dark-mode tr:nth-child(even) td { background: #15202f; }

body.dark-mode .fact-check .claim-box { background: #2a1520; border-color: var(--red); color: #f0ede5; }
body.dark-mode .fact-check .claim-box strong { color: #ff9090; }
body.dark-mode .fact-check .fact-box { background: #152a20; border-color: #4a9; color: #f0ede5; }
body.dark-mode .fact-check .fact-box strong { color: #80e0a0; }
body.dark-mode .fact-check .reality-box { background: #152a20; border-color: #4a9; color: #f0ede5; }
body.dark-mode .fact-check .reality-box strong { color: #80e0a0; }
body.dark-mode .fact-check .claim-box a, body.dark-mode .fact-check .fact-box a, body.dark-mode .fact-check .reality-box a { color: #8bc4f6; }
body.dark-mode .alert-box a { color: #8bc4f6; }
body.dark-mode .key-point a { color: #8bc4f6; }
body.dark-mode .source-box a { color: #8bc4f6; }
body.dark-mode .label { color: #e8d9a0; }

/* Force all content images to be readable in dark mode */
body.dark-mode .article-content img {
  background: #ffffff;
  padding: 8px;
  border-radius: 6px;
  border: 2px solid var(--gold) !important;
}

body.dark-mode .site-footer { background: #0a1020; }
body.dark-mode .footer-links a { color: #8bc4f6; }
body.dark-mode .footer-contact, body.dark-mode .footer-copy { color: #c8c4bc; }

body.dark-mode .toc-item { background: #1a2236; border-color: #3a5080; }
body.dark-mode .toc-item:hover { background: #222f45; border-color: var(--gold); }
body.dark-mode .toc-title { color: #f0ede5; }
body.dark-mode .toc-desc { color: #c8c4bc; }
body.dark-mode .toc-num { color: #e8d9a0; }

.toc-part {
  background: linear-gradient(135deg, #1a2744, #2a3f66);
  color: var(--gold);
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 1px;
  padding: 0.75rem 1.25rem;
  margin: 1.5rem 0 0.5rem;
  border-radius: var(--radius);
  border-left: 4px solid var(--gold);
  text-align: left;
}

body.dark-mode .process-step { background: #1a2236; border-color: #3a5080; }
body.dark-mode .timeline-item { border-color: #3a5080; }
body.dark-mode .funnel-step { border-color: rgba(255,255,255,0.15); }
body.dark-mode .funnel-step strong { color: #f0d060; }
body.dark-mode .funnel-step small { color: #e0dcd0; }

body.dark-mode .chapter-nav a { color: #f0ede5; background: #1a2236; border-color: #3a5080; }
body.dark-mode .chapter-nav a:hover { border-color: var(--gold); }
body.dark-mode .doc-link { background: #1a2236; border-color: #3a5080; color: #f0ede5; }
body.dark-mode .doc-link:hover { border-color: var(--gold); }
body.dark-mode .doc-link .name { color: #f0ede5; }
body.dark-mode .doc-link .type { color: #c8c4bc; }

body.dark-mode .dark-toggle { background: #1a2236; }
body.dark-mode .font-btn { background: #1a2236; }
body.dark-mode .bottom-toolbar { background: #0f1a2e; border-top-color: var(--gold); }
body.dark-mode .tb-btn { border-color: rgba(255,255,255,0.15); }

/* Dark mode mobile */
@media (max-width: 768px) {
  .dark-toggle { top: auto; bottom: 2rem; right: 5rem; }
  .font-controls { bottom: 2rem; right: 8rem; flex-direction: row; }
  .font-btn:first-child { border-radius: 4px 0 0 4px; }
  .font-btn:last-child { border-radius: 0 4px 4px 0; }
}

/* Glossary definition list */
dl { margin: 0 0 1.5rem; }
dt { font-size: 1rem; margin: 1.25rem 0 0.25rem; padding: 0.5rem 0; border-bottom: 1px solid var(--border); }
dd { margin: 0 0 0.5rem 1.5rem; color: var(--text-light); line-height: 1.6; }
dd a { color: var(--navy-light); text-decoration: underline; }
body.dark-mode dt { border-color: #2a3f66; }
body.dark-mode dd { color: #a0a0a0; }
body.dark-mode dd a { color: #7aa3d4; }

/* Print styles */
@media print {
  .site-header, .site-footer, .bottom-toolbar,
  .reading-progress, .progress-pct,
  .hamburger, .search-overlay, .chapter-nav { display: none !important; }
  body { background: white; color: black; font-size: 12pt; }
  .article-content { max-width: 100%; padding: 0; box-shadow: none; }
  .content-wrap { display: block; }
  .sidebar { display: none; }
  a { color: #333; text-decoration: underline; }
  a::after { content: " (" attr(href) ")"; font-size: 0.8em; color: #666; }
  h2 { page-break-after: avoid; }
  .key-point, .alert-box, blockquote { page-break-inside: avoid; border: 1px solid #ccc; }
}
