/* ===========================================================
   UNIFIED ARTICLE DESIGN SYSTEM — Kofi's Learning Hub
   Version: 3.0 | Warm Editorial (consistent with The Wicked System)
   =========================================================== */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,700;0,900;1,700&family=Source+Serif+4:ital,opsz,wght@0,8..60,300;0,8..60,400;0,8..60,600;1,8..60,300;1,8..60,400&family=JetBrains+Mono:wght@400;600&display=swap');

/* -----------------------------------------------------------
   CSS CUSTOM PROPERTIES - REFINED DESIGN TOKENS
   ----------------------------------------------------------- */
:root {
  /* Primary Color Palette - Sophisticated Blues & Neutrals */
  --color-primary: #2563eb;
  --color-primary-light: #3b82f6;
  --color-primary-dark: #1e40af;
  --color-primary-subtle: #dbeafe;
  
  --color-secondary: #0ea5e9;
  --color-accent: #8b5cf6;
  --color-accent-warm: #f59e0b;
  


  --primary-blue: #007bff;
  --white: #ffffff;

  /* Semantic Colors - Medical Context */
  --color-success: #059669;
  --color-success-light: #d1fae5;
  --color-warning: #d97706;
  --color-warning-light: #fef3c7;
  --color-error: #dc2626;
  --color-error-light: #fee2e2;
  --color-info: #0891b2;
  --color-info-light: #cffafe;
  
  /* Neutral Palette */
  --color-white:    #ffffff;
  --color-black:    #2c1f14;
  --color-gray-50:  #faf6ef;
  --color-gray-100: #f2ead8;
  --color-gray-200: #e2e8f0;
  --color-gray-300: #cbd5e1;
  --color-gray-400: #a08060;
  --color-gray-500: #7a5c47;
  --color-gray-600: #4a3728;
  --color-gray-700: #3d2a1e;
  --color-gray-800: #2c1f14;
  --color-gray-900: #2c1f14;

  /* Text Colors */
  --text-primary:   #2c1f14;
  --text-secondary: #4a3728;
  --text-tertiary:  #7a5c47;
  --text-muted:     #a08060;

  /* Background Colors */
  --bg-primary:   #ffffff;
  --bg-secondary: #faf6ef;
  --bg-tertiary:  #f2ead8;
  --bg-subtle:    #fafbfc;

  /* Warm article palette (used throughout) */
  --ink:        #2c1f14;
  --ink-soft:   #a57855;
  --ink-muted:  #7a5c47;
  --amber:      #c87e1a;
  --amber-pale: #f5e4c0;
  --amber-dim:  #e8c97a;
  --cream:      #faf6ef;
  --paper:      #f2ead8;
  --paper-dark: #e8dcc8;
  --dark-card:  #2c1f14;
  --red:        #b52a2a;
  --rule:       #d4c4a0;
  
  /* Premium Gradients - Subtle & Professional */
  --gradient-primary: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
  --gradient-secondary: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
  --gradient-accent: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
  --gradient-warm: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  --gradient-success: linear-gradient(135deg, #10b981 0%, #059669 100%);
  --gradient-hero: linear-gradient(135deg, rgba(37, 99, 235, 0.95) 0%, rgba(30, 64, 175, 0.95) 100%);
  --gradient-subtle: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, rgba(241, 245, 249, 0.6) 100%);
  --gradient-card: linear-gradient(135deg, #007bff 0%, #6f42c1 100%);

  /* Typography */
  --font-serif:   'Source Serif 4', Georgia, 'Cambria', 'Times New Roman', serif;
  --font-sans:    -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', 'Roboto', sans-serif;
  --font-display: 'Playfair Display', Georgia, serif;
  --font-mono:    'JetBrains Mono', 'SF Mono', 'Monaco', 'Cascadia Code', monospace;
  
  /* Font Sizes - Fluid Typography */
  --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  --text-sm: clamp(0.875rem, 0.85rem + 0.25vw, 1rem);
  --text-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --text-lg: clamp(1.125rem, 1.05rem + 0.35vw, 1.25rem);
  --text-xl: clamp(1.25rem, 1.15rem + 0.5vw, 1.5rem);
  --text-2xl: clamp(1.5rem, 1.35rem + 0.75vw, 1.875rem);
  --text-3xl: clamp(1.875rem, 1.65rem + 1vw, 2.25rem);
  --text-4xl: clamp(2.25rem, 1.95rem + 1.5vw, 3rem);
  
  /* Line Heights */
  --leading-tight: 1.25;
  --leading-snug: 1.375;
  --leading-normal: 1.5;
  --leading-relaxed: 1.625;
  --leading-loose: 1.75;
  --leading-article: 1.8;
  
  /* Spacing Scale - Harmonious Rhythm */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  
  /* Border Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-2xl: 1.5rem;
  --radius-full: 9999px;
  
  /* Shadows - Refined & Subtle */
  --shadow-xs: 0 1px 2px 0 rgba(15, 23, 42, 0.05);
  --shadow-sm: 0 1px 3px 0 rgba(15, 23, 42, 0.08), 0 1px 2px -1px rgba(15, 23, 42, 0.08);
  --shadow-md: 0 4px 6px -1px rgba(15, 23, 42, 0.08), 0 2px 4px -2px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 10px 15px -3px rgba(15, 23, 42, 0.08), 0 4px 6px -4px rgba(15, 23, 42, 0.08);
  --shadow-xl: 0 20px 25px -5px rgba(15, 23, 42, 0.08), 0 8px 10px -6px rgba(15, 23, 42, 0.08);
  --shadow-2xl: 0 25px 50px -12px rgba(15, 23, 42, 0.15);
  --shadow-inner: inset 0 2px 4px 0 rgba(15, 23, 42, 0.05);
  --shadow-highlight: 0 0 0 3px rgba(37, 99, 235, 0.1);
  
  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 400ms cubic-bezier(0.4, 0, 0.1, 1);
  
  /* Layout */
  --max-width-article: 1000px;
  --max-width-wide: 1200px;
  --max-width-full: 1600px;
  --scroll-offset: 80px;
  --content-padding: clamp(1.5rem, 5vw, 3rem);
}

/* -----------------------------------------------------------
   GLOBAL RESET & BASE STYLES
   ----------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-size: 16px;
}

body {
  font-family: var(--font-serif);
  font-size: var(--text-base);
  line-height: var(--leading-article);
  color: var(--text-primary);
  background: var(--bg-secondary);
  overflow-x: hidden;
}

/* Selection Styling */
::selection {
  background-color: var(--amber-pale);
  color: var(--ink);
  text-shadow: none;
}

::-moz-selection {
  background-color: var(--amber-pale);
  color: var(--ink);
}

/* -----------------------------------------------------------
   ARTICLE CONTAINER & LAYOUT
   ----------------------------------------------------------- */
.article-content {
  max-width: var(--max-width-article);
  width: 100%;
  margin: 0 auto;
  padding: var(--space-16) var(--space-6);
  background: var(--cream);
}

@media (min-width: 768px) {
  .article-content {
    padding: var(--space-20) var(--space-12);
    margin-top: var(--space-8);
    margin-bottom: var(--space-8);
  }
}

/* -----------------------------------------------------------
   PREMIUM LEDE / INTRODUCTION
   ----------------------------------------------------------- */
.lede-section {
  border-left: 4px solid var(--amber);
  padding: 0.25rem 0 0.25rem 2rem;
  margin-bottom: var(--space-16);
}

p.lede {
  font-family: var(--font-serif);
  font-size: var(--text-lg);
  line-height: var(--leading-loose);
  font-weight: 300;
  font-style: italic;
  color: var(--ink-soft);
}

.hero-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: var(--space-4);
  padding: 1rem 1rem;
  border-radius: 1rem;
}

/* -----------------------------------------------------------
   SECTION STRUCTURE
   ----------------------------------------------------------- */
.section {
  margin-top: var(--space-16);
  scroll-margin-top: var(--scroll-offset);
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.section.visible {
  opacity: 1;
  transform: translateY(0);
}

.section + .section {
  margin-top: var(--space-20);
}

/* -----------------------------------------------------------
   TYPOGRAPHY HIERARCHY
   ----------------------------------------------------------- */

/* H2 - Main Section Headers */
.section h2 {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  font-weight: 700;
  line-height: var(--leading-tight);
  color: var(--ink);
  margin-bottom: var(--space-6);
  padding-bottom: var(--space-4);
  border-bottom: 2px solid var(--rule);
  position: relative;
  letter-spacing: -0.015em;
}

.section h2::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 56px;
  height: 2px;
  background: var(--amber);
}

/* H3 - Subsection Headers */
.section h3 {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 700;
  font-style: italic;
  line-height: var(--leading-snug);
  color: var(--ink);
  margin-top: var(--space-10);
  margin-bottom: var(--space-6);
  letter-spacing: -0.01em;
}

/* H4 - Minor Headers */
.section h4 {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 600;
  line-height: var(--leading-normal);
  color: var(--ink);
  margin-top: var(--space-8);
  margin-bottom: var(--space-4);
}

/* H5 - Small Headers */
.section h5 {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: var(--leading-normal);
  color: var(--ink-muted);
  margin-top: var(--space-6);
  margin-bottom: var(--space-3);
}

/* Paragraphs */
.section p {
  margin: var(--space-4) 0;
  font-size: var(--text-base);
  line-height: var(--leading-article);
  color: var(--text-muted);
  text-align: left;
}

.section p + p {
  margin-top: var(--space-5);
}

/* Strong & Emphasis */
strong {
  font-weight: 600;
  color: var(--ink);
}

caption strong {
  color: var(--amber);
}

em {
  font-style: italic;
  color: #e7dbc4;
}

/* -----------------------------------------------------------
   LISTS - ENHANCED READABILITY
   ----------------------------------------------------------- */
.section ul,
.section ol {
  margin: var(--space-6) 0;
  padding-left: var(--space-8);
}

.section li {
  margin-bottom: var(--space-4);
  line-height: var(--leading-relaxed);
  color: var(--ink-soft);
}

.section li::marker {
  color: var(--amber);
  font-weight: 600;
}

.section ul li {
  list-style-type: disc;
}

.section ol li {
  list-style-type: decimal;
}

/* Nested Lists */
.section li ul,
.section li ol {
  margin-top: var(--space-3);
  margin-bottom: var(--space-3);
}

/* -----------------------------------------------------------
   CALLOUT BOXES - REFINED STYLES
   ----------------------------------------------------------- */
/* Concept / Pathophysiology — cream, amber left border */
.concept,
.pathophysiology {
  background: var(--cream);
  border-left: 3px solid var(--amber);
  padding: var(--space-6);
  margin: var(--space-6) 0;
  position: relative;
  text-align: left;
}

/* Callout — dark card, amber border, NOTE label */
.callout {
  background: var(--dark-card);
  border-left: 4px solid var(--amber);
  padding: var(--space-5) var(--space-6);
  margin: var(--space-6) 0;
  position: relative;
  color: #c8bfa8;
}

.callout::before {
  content: 'NOTE';
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.18em;
  color: var(--amber);
  display: block;
  margin-bottom: var(--space-3);
}

.callout p { color: #c8bfa8; }
.callout strong { color: #e8dcc8; }

/* Warning / Emergency — dark card, red border, IMPORTANT label */
.warning,
.emergency {
  background: var(--dark-card);
  border-left: 4px solid var(--red);
  padding: var(--space-5) var(--space-6);
  margin: var(--space-6) 0;
  position: relative;
  color: #c8bfa8;
}

.warning::before,
.emergency::before {
  content: 'IMPORTANT';
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.18em;
  color: var(--red);
  display: block;
  margin-bottom: var(--space-3);
}

.warning p, .emergency p { color: #c8bfa8; }
.warning strong, .emergency strong { color: #e8dcc8; }

/* Small Label Element */
.small {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink);
  background: var(--amber-pale);
  padding: 0.2rem 0.6rem;
  border: 1px solid var(--rule);
  margin-bottom: var(--space-4);
}

/* -----------------------------------------------------------
   CLINICAL HIGHLIGHT ELEMENTS
   ----------------------------------------------------------- */
.clinical-pearl {
  background: var(--cream);
  border-left: 4px solid #059669;
  padding: var(--space-4) var(--space-5);
  margin: var(--space-5) 0;
}

.high-yield {
  background: var(--amber-pale);
  border-left: 4px solid var(--amber);
  padding: var(--space-4) var(--space-5);
  margin: var(--space-5) 0;
}

.mnemonic {
  font-style: italic;
  color: var(--amber);
  font-weight: 500;
}

.emoji {
  font-size: 1.25em;
  margin-right: var(--space-2);
  vertical-align: middle;
}

/* -----------------------------------------------------------
   CARD GRIDS - MECHANISM & ADAPTATION CARDS
   ----------------------------------------------------------- */


.mechanism-card,
.adaptation-card,
.hypertrophy-card,
.hyperplasia-card,
.injury-card,
.balance-card,
.example-type {
  margin-top: 1rem;
  padding: var(--space-6);
  background: var(--cream);
  border: 1px solid var(--rule);
  border-left: 3px solid var(--amber);
  transition: all var(--transition-base);
}

.mechanism-card:hover,
.adaptation-card:hover {
  border-left-color: var(--ink);
}

.mechanism-card h3,
.adaptation-card h4 {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 700;
  font-style: italic;
  color: var(--ink);
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--rule);
}

.hypertrophy-card {
  border-top: 3px solid var(--amber);
}

.hyperplasia-card {
  border-top: 3px solid var(--amber-dim);
}

/* -----------------------------------------------------------
   TABLES - PREMIUM DESIGN
   ----------------------------------------------------------- */
.table-responsive {
  margin: var(--space-8) 0;
  overflow-x: auto;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--paper);
  font-family: var(--font-serif);
  font-size: var(--text-sm);
}

thead {
  background: var(--dark-card);
}

thead th {
  padding: var(--space-4) var(--space-5);
  text-align: left;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--amber);
  border-bottom: 2px solid var(--amber);
}

tbody tr {
  border-bottom: 1px solid var(--rule);
  transition: background-color var(--transition-fast);
}

tbody tr:hover {
  background-color: var(--paper-dark);
}

tbody tr:last-child {
  border-bottom: none;
}

tbody td {
  padding: var(--space-4) var(--space-5);
  color: var(--ink-soft);
  line-height: var(--leading-relaxed);
}

tbody td:first-child {
  font-weight: 600;
  color: var(--ink);
}

caption {
  padding: var(--space-4);
  text-align: left;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-lg);
  color: var(--ink);
  background: var(--paper-dark);
  border-bottom: 3px solid var(--amber);
}

/* Mobile Table Cards */
@media screen and (max-width: 768px) {
  .table-responsive table,
  .table-responsive thead,
  .table-responsive tbody,
  .table-responsive tr,
  .table-responsive td {
    display: block;
    width: 100%;
  }

  .table-responsive thead {
    display: none;
  }

  .table-responsive caption {
    display: block;
    background: var(--dark-card);
    color: var(--amber-pale);
    padding: var(--space-5);
  }

  .table-responsive tr {
    margin-bottom: var(--space-5);
    background: var(--paper);
    border: 1px solid var(--rule);
    overflow: hidden;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.4s ease, transform 0.4s ease;
  }
  
  .table-responsive tr.reveal {
    opacity: 1;
    transform: translateY(0);
  }

  .table-responsive td {
    display: flex;
    justify-content: space-between;
    padding: var(--space-4) !important;
    border-bottom: 1px solid var(--color-gray-100);
  }

  .table-responsive td:last-child {
    border-bottom: none;
  }

  .table-responsive td::before {
    content: attr(data-label);
    font-family: var(--font-mono);
    font-weight: 600;
    color: var(--amber);
    font-size: var(--text-xs);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    flex: 0 0 40%;
  }

  .table-responsive td:first-child {
    background: var(--paper-dark);
    font-weight: 700;
    color: var(--ink);
    font-size: var(--text-lg);
    justify-content: center;
    border-bottom: 2px solid var(--amber);
  }

  .table-responsive td:first-child::before {
    display: none;
  }
}

/* -----------------------------------------------------------
   BLOCKQUOTES
   ----------------------------------------------------------- */
blockquote {
  margin: var(--space-10) 0;
  padding: var(--space-8);
  background: var(--dark-card);
  border-left: 4px solid var(--amber);
  position: relative;
}

blockquote::before {
  content: '\201C';
  position: absolute;
  top: var(--space-2);
  left: var(--space-4);
  font-size: 4rem;
  color: var(--amber);
  opacity: 0.3;
  font-family: var(--font-display);
  line-height: 1;
}

blockquote p {
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-style: italic;
  line-height: var(--leading-relaxed);
  color: #c8bfa8 !important;
  position: relative;
  z-index: 1;
}

blockquote strong { color: #eeb554; } 

/* -----------------------------------------------------------
   MISCONCEPTION SECTION
   ----------------------------------------------------------- */
.misconceptions-list {
  margin: var(--space-8) 0;
}

.misconception-item {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-left: 4px solid var(--red);
  padding: var(--space-6);
  margin-bottom: var(--space-6);
}


.misconception-header {
  display: flex;
  align-items: center;
  margin-bottom: var(--space-4);
}

.misconception-icon {
  font-size: 1.75rem;
  margin-right: var(--space-4);
  color: var(--color-error);
  flex-shrink: 0;
}

.misconception-header h4 {
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--ink);
  line-height: var(--leading-snug);
}

.misconception-content p {
  margin: var(--space-3) 0;
  line-height: var(--leading-relaxed);
  color: var(--ink-soft);
}

/* -----------------------------------------------------------
   SPECIALTY COLOR VARIANTS (AMR/Bacteria)
   ----------------------------------------------------------- */
.enzyme-degradation {
  border-top: 4px solid #d97706;
}

.target-modification {
  border-top: 4px solid #eab308;
}

.efflux-pumps {
  border-top: 4px solid #f59e0b;
}

.permeability {
  border-top: 4px solid #f97316;
}

.enzyme-degradation,
.target-modification,
.efflux-pumps,
.permeability {
  background: var(--amber-pale);
}
/* -----------------------------------------------------------
   IMAGES & CHARTS
   ----------------------------------------------------------- */
.chart-image {
  width: 100%;
  max-width: 700px;
  height: auto;
  border-radius: var(--radius-lg);
  margin: var(--space-10) auto;
  display: block;
  box-shadow: var(--shadow-md);
  transition: all var(--transition-base);
}

.chart-image:hover {
  transform: scale(1.02);
  box-shadow: var(--shadow-lg);
}
/* -----------------------------------------------------------
   UTILITY CLASSES
   ----------------------------------------------------------- */
.text-center {
  text-align: center;
}

.component-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink);
  background: var(--amber-pale);
  border: 1px solid var(--rule);
  padding: 0.2rem 0.6rem;
  margin: var(--space-1);
}

.function-icon {
  font-size: 1.5rem;
  margin-right: var(--space-3);
  vertical-align: middle;
}

/* -----------------------------------------------------------
   SCROLLBAR STYLING
   ----------------------------------------------------------- */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--paper);
}

::-webkit-scrollbar-thumb {
  background: #c8a87a;
  border-radius: var(--radius-full);
  border: 2px solid var(--paper);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--red);
}

/* -----------------------------------------------------------
   ACCESSIBILITY
   ----------------------------------------------------------- */
:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* -----------------------------------------------------------
   ANIMATIONS
   ----------------------------------------------------------- */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInLeft {
  from {
    width: 0;
    opacity: 0;
  }
  to {
    width: 80px;
    opacity: 1;
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Scroll-reveal via .section.visible class (added by JS) */
.section:nth-child(1) { transition-delay: 0.05s; }
.section:nth-child(2) { transition-delay: 0.10s; }
.section:nth-child(3) { transition-delay: 0.15s; }

/* -----------------------------------------------------------
   RESPONSIVE TYPOGRAPHY ADJUSTMENTS
   ----------------------------------------------------------- */
@media (max-width: 500px) {
  .section p {
    font-size: var(--text-base);
  }
  
  .section li {
    font-size: var(--text-base);
  }
  
  .article-content {
    padding: var(--space-8) var(--space-4);
  }
}

@media (min-width: 1024px) {
  .article-content {
    max-width: var(--max-width-wide);
  }
}

/* -----------------------------------------------------------
   PRINT STYLES
   ----------------------------------------------------------- */
@media print {
  .article-content {
    max-width: 100%;
    box-shadow: none;
    padding: 0;
  }
  
  .nav-links,
  .article-navigation,
  .back-to-top {
    display: none;
  }
  
  .section {
    page-break-inside: avoid;
  }
}

/* ===========================================================
   END OF PREMIUM ARTICLE DESIGN SYSTEM
   =========================================================== */

/* -----------------------------------------------------------
   PREMIUM ARTICLE NAVIGATION (Safe Mode)
   prefix: pnd- (Premium Nav Dashboard)
   ----------------------------------------------------------- */

/* 1. CONTAINER & SCOPED VARIABLES */
.pnd-container {
  /* Strictly scoped variables - won't affect other files */
  --pnd-bg: #ffffff;
  --pnd-border: #e2e8f0;
  --pnd-primary: #2563eb; 
  --pnd-gradient: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  --pnd-text-main: #1e293b;
  --pnd-text-muted: #64748b;
  --pnd-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
  --pnd-hover-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
  --pnd-radius: 16px;
  
  /* Layout */
  margin-top: 4rem;
  padding-top: 3rem;
  border-top: 1px solid var(--pnd-border);
  display: flex;
  flex-direction: column;
  gap: 2rem;
  width: 100%;
  box-sizing: border-box;
}

/* 2. FLOW GRID (Next/Prev) */
.pnd-flow-grid {
  display: grid;
  gap: 1rem;
  width: 100%;
  grid-template-columns: 1fr; /* Mobile Default */
}

/* Card Styling */
.pnd-card {
  display: flex;
  align-items: center;
  padding: 1.25rem;
  background: var(--pnd-bg);
  border: 1px solid var(--pnd-border);
  border-radius: var(--pnd-radius);
  text-decoration: none;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  position: relative;
  overflow: hidden;
  min-height: 80px;
}

.pnd-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--pnd-hover-shadow);
  border-color: var(--pnd-primary);
}

.pnd-card:hover .pnd-icon {
  background: var(--pnd-primary);
  color: white;
  transform: scale(1.1);
}

/* Info & Text */
.pnd-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  flex: 1;
  padding: 0 1rem;
  min-width: 0;
}

.pnd-label {
  font-family: 'Poppins', sans-serif;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--pnd-text-muted);
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.pnd-title {
  font-family: 'Montserrat', sans-serif;
  color: var(--pnd-text-main);
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1.4;
}

/* Icons */
.pnd-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #f1f5f9;
  color: var(--pnd-text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

/* 3. QUIZ ACTION AREA */
.pnd-action-area {
  width: 100%;
}

.pnd-quiz-card {
  background: var(--pnd-gradient);
  border-radius: var(--pnd-radius);
  padding: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-decoration: none;
  position: relative;
  overflow: hidden;
  box-shadow: var(--pnd-shadow);
  transition: transform 0.3s ease;
}

.pnd-quiz-card:hover {
  transform: scale(1.01);
  box-shadow: var(--pnd-hover-shadow);
}

.pnd-quiz-content {
  z-index: 2;
  color: white;
  max-width: 60%;
}

.pnd-quiz-badge {
  background: rgba(255, 255, 255, 0.2);
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  backdrop-filter: blur(4px);
  display: inline-block;
  margin-bottom: 0.75rem;
}

.pnd-quiz-content h3 {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.5rem;
  font-weight: 800;
  margin: 0 0 0.5rem 0;
  color: white;
}

.pnd-quiz-content p {
  font-family: 'Poppins', sans-serif;
  font-size: 0.95rem;
  margin: 0;
  opacity: 0.9;
  color: white;
}

.pnd-quiz-button {
  z-index: 2;
  background: white;
  color: var(--pnd-primary);
  padding: 0.75rem 1.5rem;
  border-radius: 50px;
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.pnd-quiz-bg-icon {
  position: absolute;
  right: -20px;
  bottom: -30px;
  font-size: 10rem;
  color: white;
  opacity: 0.1;
  transform: rotate(-15deg);
  z-index: 1;
  transition: transform 0.5s ease;
}

.pnd-quiz-card:hover .pnd-quiz-bg-icon {
  transform: rotate(0deg) scale(1.1);
}

/* 4. UTILITY LINKS */
.pnd-utility {
  display: flex;
  justify-content: center;
  margin-top: 0.5rem;
}

.pnd-utility-link {
  color: white;
  text-decoration: none;
  font-family: 'Poppins', sans-serif;
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  transition: all 0.2s ease;
  background: #2d22a9dc;
}


.pnd-utility-link:hover {
  background: #f8fafc;
  color: var(--pnd-primary);
}

/* 5. RESPONSIVE LOGIC */

/* Desktop (Split Columns) */
@media (min-width: 769px) {
  .pnd-flow-grid {
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
  }
  
  .pnd-card {
    padding: 1.5rem;
  }
  
  .pnd-title {
    font-size: 1.1rem;
  }

  /* Safe alignment logic */
  .pnd-prev {
    grid-column: 1;
  }
  
  .pnd-next {
    grid-column: 2;
    text-align: right;
  }

  .pnd-next .pnd-info {
    align-items: flex-end;
  }
}

/* Mobile (Stacked) */
@media (max-width: 768px) {
  .pnd-card.pnd-next {
    flex-direction: row-reverse;
    justify-content: space-between; 
  }
  
  .pnd-card.pnd-prev {
    justify-content: space-between;
  }

  .pnd-quiz-card {
    flex-direction: column;
    text-align: center;
    padding: 2rem 1.5rem;
    gap: 1.5rem;
  }

  .pnd-quiz-content {
    max-width: 100%;
  }
  
  .pnd-quiz-bg-icon {
    font-size: 8rem;
    right: -10px;
    bottom: -20px;
  }
  
      .concept {
    padding: var(--space-4) var(--space-5);
  }

}   

.confidentiality-principle-card {
  background: var(--paper);
  border-top: 3px solid var(--amber);
  padding: 1.75rem 2rem;
  margin-top: 1.5rem;
}

/* -----------------------------------------------------------
   13. PREMIUM PROCESS-STEPS
   ----------------------------------------------------------- */
.process-step {
  counter-increment: process-counter;
  margin: var(--space-8) 0;
  padding-left: 60px;
  position: relative;
}

.process-step::before {
  content: counter(process-counter);
  position: absolute;
  left: 0;
  top: 0;
  width: 45px;
  height: 45px;
  background: var(--gradient-warm);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.125rem;
  font-family: var(--font-sans);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
  animation: scaleIn 0.5s var(--transition-bounce);
}

@keyframes scaleIn {
  0% {
    opacity: 0;
    transform: scale(0);
  }
  50% {
    transform: scale(1.1);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}