/* The Economist-style Callouts - Updated for cache refresh v2 */
.callout-tip {
  border-left: 3px solid #2C3E50 !important; /* Charcoal gray for tips */
  background: #f8f9fa !important;
  padding: 1.5rem !important;
  margin: 2rem 0 !important;
  border-radius: 0;
}

.callout-tip h4 {
  font-size: 1.1rem !important;
  font-weight: 700 !important;
  color: #000000 !important;
  margin-bottom: 1rem !important;
}

.callout-note {
  border-left: 3px solid #007bff !important; /* Changed to blue for PaperMod theme */
  background: #f8f9fa !important;
  border-radius: 0;
}

.callout-warning {
  border-left: 3px solid #007bff !important; /* Changed to blue for PaperMod theme */
  background: #fff5f5 !important;
  border-radius: 0;
}

/* Dark mode styles */
[data-theme="dark"] .callout-tip {
  background: #2a2a2a !important;
}

[data-theme="dark"] .callout-tip h4 {
  color: #ffffff !important;
}

[data-theme="dark"] .callout-note {
  background: #2a2a2a !important;
}

[data-theme="dark"] .callout-warning {
  background: #1a1a1a !important;
}

.callout-tip ol {
  counter-reset: item;
  list-style: none;
  padding-left: 0;
}

.callout-tip ol li {
  counter-increment: item;
  margin-bottom: 1rem;
  padding-left: 2.5rem;
  position: relative;
  line-height: 1.7;
}

.callout-tip ol li::before {
  content: counter(item);
  position: absolute;
  left: 0;
  top: 0;
  background: #007bff; /* Changed to blue for PaperMod theme */
  color: white;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
}

.callout-tip ol li strong {
  color: #007bff; /* Changed to blue for PaperMod theme */
  font-weight: 700;
}

/* Stat Card Styles - The Economist Magazine Style */
.stat-card {
  background: #faf8f2; /* Economist cream background like example */
  border: 1px solid #dddddd;
  border-radius: 8px; /* Slight rounding like the example */
  padding: 2rem 1.5rem;
  margin: 2rem 0;
  font-family: ui-serif, 'Times New Roman', 'Georgia', serif;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25); /* Shadow like example shadow-2xl */
  position: relative;
  display: flex;
  align-items: flex-start;
  transition: box-shadow 0.3s ease; /* Hover effect */
}

.stat-card:hover {
  box-shadow: 0 25px 50px -12px rgba(193, 57, 43, 0.5); /* economist-red shadow on hover */
}

.stat-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 8px; /* Wider like example w-2 sm:w-3 */
  background: #c0392b; /* Economist red accent bar */
  border-radius: 8px 0 0 8px; /* Match container rounding */
}

.stat-number {
  font-size: 4rem; /* Larger like example text-4xl sm:text-5xl md:text-6xl */
  font-weight: 700; /* Bold like example */
  color: #c0392b; /* Economist red */
  margin-bottom: 0.5rem; /* mb-2 */
  font-family: ui-serif, 'Times New Roman', 'Georgia', serif;
  line-height: 1; /* leading-none */
  letter-spacing: -0.02em;
  text-align: left; /* Left align */
  display: inline-block; /* Make inline */
  margin-right: 1rem; /* Space between number and headline */
  vertical-align: top; /* Align to top */
}

.stat-number sup {
  font-size: 0.6em; /* Smaller % */
  vertical-align: super; /* Superscript */
  margin-left: 0.1em; /* Small space */
}

.stat-label {
  font-size: 0.75rem;
  font-weight: 400;
  color: #666666;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  margin-bottom: 1rem;
  font-family: 'Arial', 'Helvetica', sans-serif;
  font-variant: small-caps;
}

.stat-headline {
  font-size: 1.75rem; /* Larger like example text-xl sm:text-2xl md:text-3xl */
  font-weight: 800; /* Extrabold like example */
  color: #c0392b; /* Economist red */
  text-transform: uppercase;
  letter-spacing: 0.1em; /* Tracking-wide */
  margin: 0 0 1rem 0; /* Adjust margins for inline */
  border-bottom: 1px solid #d1d5db; /* border-gray-300 */
  padding-bottom: 0.5rem;
  font-family: ui-serif, 'Times New Roman', 'Georgia', serif;
  display: inline-block; /* Make inline */
  vertical-align: top; /* Align to top */
  line-height: 1.25; /* leading-tight */
}

.stat-description {
  font-size: 1.25rem; /* Larger like example text-lg sm:text-xl md:text-2xl */
  color: #2c3e50; /* economist-dark */
  line-height: 1.625; /* leading-relaxed */
  font-family: ui-serif, 'Times New Roman', 'Georgia', serif;
  max-width: none; /* Remove max-width for left alignment */
  margin: 1.5rem 0 0 0; /* mt-6 */
  font-weight: 400;
  text-align: left; /* Left align */
}

.stats-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  margin: 2rem 0;
  justify-content: center;
}

.stat-card-mini {
  background: #faf8f2; /* Economist cream background */
  border: 1px solid #dddddd;
  border-radius: 8px; /* Slight rounding */
  padding: 1.5rem;
  flex: 1;
  min-width: 240px;
  font-family: ui-serif, 'Times New Roman', 'Georgia', serif;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start; /* Left align content */
  transition: box-shadow 0.3s ease;
}

.stat-card-mini:hover {
  box-shadow: 0 25px 50px -12px rgba(193, 57, 43, 0.5);
}

.stat-card-mini::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 6px; /* Slightly narrower for mini */
  background: #c0392b; /* Economist red accent bar */
  border-radius: 8px 0 0 8px;
}

.stat-card-mini::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 1px;
  background: #000000;
}

.stat-card-mini .stat-number {
  font-size: 1.75rem;
  font-weight: 300;
  color: #c0392b; /* Economist red */
  margin-bottom: 0.75rem;
  font-family: ui-serif, 'Times New Roman', 'Georgia', serif;
  letter-spacing: -0.01em;
  text-align: left; /* Left align */
}

.stat-card-mini .stat-label {
  font-size: 0.7rem;
  font-weight: 400;
  color: #666666;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 0.75rem;
  font-family: 'Arial', 'Helvetica', sans-serif;
  font-variant: small-caps;
  text-align: left; /* Left align */
}

.stat-card-mini .stat-description {
  font-size: 0.85rem;
  color: #333333;
  line-height: 1.5;
  font-family: ui-serif, 'Times New Roman', 'Georgia', serif;
  font-weight: 400;
  text-align: left; /* Left align */
}

/* Dark mode for stat cards - Economist style */
[data-theme="dark"] .stat-card {
  background: #2a2a2a;
  border-color: #404040;
}

[data-theme="dark"] .stat-card::before {
  background: #c0392b; /* Keep red accent bar */
}

[data-theme="dark"] .stat-card .stat-number {
  color: #c0392b; /* Keep red stat number */
}

[data-theme="dark"] .stat-card .stat-label {
  color: #aaaaaa;
}

[data-theme="dark"] .stat-card .stat-headline {
  color: #c0392b; /* Keep red headline */
  border-bottom-color: #555555;
}

[data-theme="dark"] .stat-card .stat-description {
  color: #cccccc;
}

[data-theme="dark"] .stat-card-mini {
  background: #2a2a2a;
  border-color: #404040;
}

[data-theme="dark"] .stat-card-mini::before {
  background: #c0392b; /* Keep red accent bar */
}

[data-theme="dark"] .stat-card-mini::after {
  background: #cccccc;
}

[data-theme="dark"] .stat-card-mini .stat-number {
  color: #c0392b; /* Keep red stat number */
}

[data-theme="dark"] .stat-card-mini .stat-label {
  color: #aaaaaa;
}

[data-theme="dark"] .stat-card-mini .stat-description {
  color: #cccccc;
}

/* Pull Quote Styles - Economist style */
.pull-quote {
  font-style: italic;
  font-size: 1.15rem;
  color: #333333;
  border-left: 3px solid #000000;
  padding-left: 1.5rem;
  margin: 2rem 0;
  line-height: 1.7;
  font-family: 'Times New Roman', 'Georgia', serif;
  font-weight: 400;
  position: relative;
}

.pull-quote::before {
  content: '"';
  font-size: 2.5rem;
  color: #000000;
  position: absolute;
  left: -0.2rem;
  top: -0.3rem;
  line-height: 1;
  font-family: 'Times New Roman', 'Georgia', serif;
}

[data-theme="dark"] .pull-quote {
  color: #cccccc;
  border-left-color: #ffffff;
}

[data-theme="dark"] .pull-quote::before {
  color: #ffffff;
}

/* Collapsible Series Navigation */
.series-nav-collapsible {
  margin: 2rem 0;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  background: #f8f9fa;
}

.series-nav-summary {
  cursor: pointer;
  padding: 1rem;
  font-weight: 600;
  color: #2C3E50;
  user-select: none;
  transition: background-color 0.2s ease;
}

.series-nav-summary:hover {
  background: #e9ecef;
}

.series-nav-summary::marker {
  color: #007bff;
}

.series-nav {
  padding: 0 1rem 1rem 1rem;
}

.series-nav ul {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0 0;
}

.series-nav li {
  margin: 0.5rem 0;
  line-height: 1.4;
}

.series-nav li strong {
  color: #495057;
}

.series-nav a {
  color: #007bff;
  text-decoration: none;
}

.series-nav a:hover {
  text-decoration: underline;
}

/* Dark mode for collapsible series nav */
[data-theme="dark"] .series-nav-collapsible {
  border-color: #495057;
  background: #2a2a2a;
}

[data-theme="dark"] .series-nav-summary {
  color: #ffffff;
  background: #2a2a2a;
}

[data-theme="dark"] .series-nav-summary:hover {
  background: #3a3a3a;
}

[data-theme="dark"] .series-nav-summary::marker {
  color: #4dabf7;
}

[data-theme="dark"] .series-nav li strong {
  color: #adb5bd;
}

[data-theme="dark"] .series-nav a {
  color: #4dabf7;
}