/* === Design Tokens — MCB Compendium === */
:root {
  /* Compendium palette — derived from the report cover */
  --ink:        #0d0e10;        /* near-black charcoal */
  --ink-soft:   #15171c;        /* raised surfaces */
  --ink-line:   #2a2e36;        /* borders */
  --bone:       #f5efe6;        /* warm cream */
  --bone-soft:  #d8d2c4;        /* secondary cream */
  --bone-mute:  rgba(245,239,230,0.55);
  --mcb-red:    #c8262e;        /* MCB brand red */
  --mcb-red-deep: #8e1a20;
  --teal:       #2d6e7e;        /* legacy data teal — desaturated */
  --teal-bright:#3da9bf;        /* live data accent */
  --gold:       #c9a04a;        /* premium accent (sparing) */
  --maroon:     #6a1b1f;        /* "Persisting Inequalities" panel */
  --deep-teal:  #0f3d44;        /* "Green Shoots" panel */

  /* === Theme tokens — switched by html[data-theme="light"] in compendium.css.
   * Default is dark (the original compendium aesthetic). Light theme keeps
   * the hero photo dark; only body chrome and the report CTA spread flip. */
  --page-bg:           var(--ink);
  --page-fg:           var(--bone);
  --page-fg-soft:      var(--bone-soft);
  --surface-feature-bg:      var(--ink);
  --surface-feature-bg-soft: var(--ink-soft);
  --surface-feature-fg:      var(--bone);
  --surface-feature-fg-soft: var(--bone-soft);
  --surface-feature-line:    var(--ink-line);
  --surface-feature-cta-bd:  var(--bone-mute);

  /* Type stacks */
  --font-display: 'Big Shoulders Display', 'Archivo Narrow', 'Helvetica Neue Condensed', sans-serif;
  --font-body:    'Manrope', -apple-system, system-ui, sans-serif;
  --font-mono:    ui-monospace, 'SF Mono', Menlo, monospace;

  /* Legacy aliases — kept for chart/explorer code compatibility */
  --primary: var(--teal);
  --primary-dark: var(--deep-teal);
  --primary-light: var(--teal-bright);
  --accent: var(--gold);
  --accent-light: #d8b461;
  --dark: var(--ink);
  --dark-soft: var(--ink-soft);
  --light: #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e1;
  --gray-500: #64748b;
  --gray-700: #334155;
  --text: #1e293b;
  --text-muted: #64748b;
  --muslim-color: var(--teal);
  --all-color: #94a3b8;
  --gradient: linear-gradient(135deg, var(--ink) 0%, var(--ink-soft) 50%, var(--ink) 100%);
  --card-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --card-shadow-lg: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
}

/* === Reset & Base === */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

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

body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--light);
  line-height: 1.6;
  overflow-x: hidden;
  font-feature-settings: "ss01", "cv11";
}

h1, h2, h3, h4 {
  font-family: var(--font-body);
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: -0.01em;
}

/* === Progress Bar === */
.progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: var(--primary);
  z-index: 1000;
  width: 0%;
  transition: width 0.1s ease;
}

/* === Navigation === */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 999;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  background: rgba(15, 23, 42, 0.9);
  backdrop-filter: blur(10px);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  color: white;
}

.nav-logo {
  height: 32px;
  width: auto;
}

.nav-links {
  display: flex;
  gap: 2rem;
}

.nav-links a {
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s;
}

.nav-links a:hover {
  color: var(--primary-light);
}

/* === Hero Section === */
.hero {
  min-height: 100vh;
  background: var(--gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding-top: 60px;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 80%, rgba(13, 148, 136, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(245, 158, 11, 0.1) 0%, transparent 50%);
}

.hero-content {
  text-align: center;
  color: white;
  z-index: 1;
  padding: 2rem;
  max-width: 900px;
}

.hero-badge {
  display: inline-block;
  background: rgba(13, 148, 136, 0.2);
  border: 1px solid rgba(13, 148, 136, 0.4);
  padding: 0.5rem 1rem;
  border-radius: 50px;
  font-size: 0.85rem;
  margin-bottom: 1.5rem;
  color: var(--primary-light);
}

.hero h1 {
  font-size: clamp(2.5rem, 7vw, 4.5rem);
  margin-bottom: 1rem;
  font-weight: 700;
}

.gradient-text {
  background: linear-gradient(135deg, var(--primary-light), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero .subtitle {
  font-size: 1.25rem;
  opacity: 0.8;
  margin-bottom: 3rem;
  font-weight: 400;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-bottom: 3rem;
}

.stat-card {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 16px;
  padding: 1.5rem 2rem;
  min-width: 160px;
  backdrop-filter: blur(10px);
}

.stat-icon {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.stat-number {
  display: block;
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary-light);
}

.stat-label {
  font-size: 0.8rem;
  opacity: 0.7;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.scroll-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: white;
  text-decoration: none;
  padding: 1rem 2rem;
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 50px;
  transition: all 0.3s;
}

.scroll-cta:hover {
  background: rgba(255,255,255,0.1);
  border-color: var(--primary-light);
}

.scroll-cta svg {
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(5px); }
}

/* === Scrollytelling === */
.scrolly {
  position: relative;
  background: var(--dark);
}

/* Step Indicators */
.step-indicators {
  position: fixed;
  right: 2rem;
  top: 50%;
  transform: translateY(-50%);
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.step-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255,255,255,0.3);
  border: none;
  cursor: pointer;
  transition: all 0.3s;
}

.step-dot.active {
  background: var(--primary);
  transform: scale(1.3);
}

.step-dot:hover {
  background: var(--primary-light);
}

/* Visualization Wrapper */
.viz-wrapper {
  position: sticky;
  top: 0;
  height: 100vh;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 80px 40px 40px 40px;
}

.viz-container {
  background: var(--dark-soft);
  border-radius: 24px;
  padding: 2rem;
  width: 100%;
  max-width: 800px;
  height: 500px;
  display: flex;
  flex-direction: column;
  box-shadow: var(--card-shadow-lg);
  border: 1px solid rgba(255,255,255,0.1);
}

.viz-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.viz-title {
  color: white;
  font-size: 1.25rem;
  margin: 0;
}

.viz-legend {
  display: flex;
  gap: 1.5rem;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.7);
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 3px;
}

.legend-dot.muslim { background: var(--primary); }
.legend-dot.all { background: var(--all-color); }

#main-viz {
  flex: 1;
  width: 100%;
}

/* Scroll Text */
.scroll-text {
  position: relative;
  z-index: 10;
  padding: 0 5%;
  pointer-events: none;
}

.step {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 2rem 0;
}

.step-card {
  background: white;
  padding: 2rem;
  border-radius: 20px;
  max-width: 380px;
  box-shadow: var(--card-shadow-lg);
  pointer-events: auto;
  opacity: 0.3;
  transform: translateY(20px);
  transition: all 0.4s ease;
}

.step.is-active .step-card {
  opacity: 1;
  transform: translateY(0);
}

.step-number {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--primary);
  background: rgba(13, 148, 136, 0.1);
  padding: 0.25rem 0.75rem;
  border-radius: 50px;
  margin-bottom: 1rem;
}

.step-card h2 {
  font-size: 1.5rem;
  color: var(--dark);
  margin-bottom: 1rem;
}

.step-card p {
  color: var(--gray-700);
  margin-bottom: 1rem;
  line-height: 1.7;
}

/* Step Card Elements */
.key-stat {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  padding: 1rem 1.5rem;
  border-radius: 12px;
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}

.key-number {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
}

.key-label {
  font-size: 0.9rem;
  opacity: 0.9;
}

.mini-stats {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.mini-stats div {
  background: var(--gray-100);
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-size: 0.9rem;
}

.comparison {
  display: flex;
  gap: 1rem;
}

.compare-item {
  flex: 1;
  text-align: center;
  padding: 1rem;
  border-radius: 12px;
}

.compare-item.muslim {
  background: rgba(13, 148, 136, 0.1);
  border: 2px solid var(--primary);
}

.compare-item.all {
  background: var(--gray-100);
  border: 2px solid var(--gray-300);
}

.compare-value {
  display: block;
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  color: var(--dark);
}

.compare-label {
  font-size: 0.75rem;
  color: var(--gray-500);
}

.ethnicity-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.eth-tag {
  padding: 0.4rem 0.8rem;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 500;
}

.eth-tag.pakistani { background: #dcfce7; color: #166534; }
.eth-tag.bangladeshi { background: #dbeafe; color: #1e40af; }
.eth-tag.arab { background: #fef3c7; color: #92400e; }
.eth-tag.african { background: #fce7f3; color: #9d174d; }

.gap-indicator {
  margin-top: 1rem;
}

.gap-bar {
  position: relative;
  height: 40px;
  background: var(--gray-100);
  border-radius: 8px;
  overflow: hidden;
}

.gap-muslim, .gap-all {
  position: absolute;
  height: 50%;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 0.5rem;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: 4px;
}

.gap-muslim {
  top: 0;
  background: var(--primary);
  color: white;
}

.gap-all {
  bottom: 0;
  background: var(--gray-300);
  color: var(--dark);
}

.gap-label {
  display: block;
  font-size: 0.8rem;
  color: var(--gray-500);
  margin-top: 0.5rem;
}

.trend-indicator {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: rgba(13, 148, 136, 0.1);
  padding: 1rem;
  border-radius: 12px;
  color: var(--primary-dark);
  font-weight: 500;
}

.trend-arrow {
  width: 24px;
  height: 24px;
  color: var(--primary);
}

.progress-ring {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  width: 80px;
  height: 80px;
  margin: 1rem auto 0;
}

.progress-ring svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.ring-bg {
  fill: none;
  stroke: var(--gray-200);
  stroke-width: 3;
}

.ring-fill {
  fill: none;
  stroke: var(--primary);
  stroke-width: 3;
  stroke-linecap: round;
}

.ring-text {
  position: absolute;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--dark);
}

.alert-box {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  background: #fef3c7;
  border: 1px solid #f59e0b;
  padding: 1rem;
  border-radius: 12px;
  font-size: 0.9rem;
  color: #92400e;
}

.alert-icon {
  font-size: 1.2rem;
}

.summary-card .takeaway-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.takeaway {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--gray-100);
  padding: 0.75rem;
  border-radius: 10px;
  font-size: 0.85rem;
}

.takeaway-icon {
  font-size: 1.2rem;
}


/* === Data Explorer === */
.explorer {
  background: var(--light);
  padding: 5rem 2rem;
}

.explorer-header {
  text-align: center;
  margin-bottom: 3rem;
}

.explorer-header h2 {
  font-size: 2.5rem;
  color: var(--dark);
  margin-bottom: 0.5rem;
}

.explorer-header p {
  color: var(--gray-500);
  font-size: 1.1rem;
}

.explorer-tabs {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.tab-btn {
  padding: 0.75rem 1.5rem;
  border: 2px solid var(--gray-200);
  border-radius: 50px;
  background: white;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}

.tab-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.tab-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

.explorer-content {
  max-width: 1000px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2rem;
  align-items: start;
}

.explorer-viz {
  background: white;
  border-radius: 20px;
  padding: 2rem;
  min-height: 400px;
  box-shadow: var(--card-shadow);
}

.explorer-insights {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  padding: 2rem;
  border-radius: 20px;
}

.explorer-insights h4 {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  opacity: 0.8;
  margin-bottom: 1rem;
}

.explorer-insights p {
  font-size: 1.1rem;
  line-height: 1.6;
}

/* === Download Section === */
.download-section {
  background: var(--dark);
  color: white;
  padding: 4rem 2rem;
  text-align: center;
}

.download-section h2 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.download-section p {
  color: rgba(255,255,255,0.7);
  margin-bottom: 2rem;
}

.download-cards {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.download-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  padding: 1.5rem 2rem;
  border-radius: 16px;
  text-decoration: none;
  color: white;
  transition: all 0.3s;
  min-width: 150px;
}

.download-card:hover {
  background: rgba(255,255,255,0.1);
  transform: translateY(-3px);
}

.dl-icon {
  font-size: 2rem;
}

.dl-name {
  font-weight: 500;
}

.dl-size {
  font-size: 0.75rem;
  color: var(--primary-light);
  background: rgba(13, 148, 136, 0.2);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
}

/* === Deep Dive Section === */
.deep-dive {
  padding: 4rem 2rem;
  background: linear-gradient(180deg, var(--dark) 0%, var(--dark-soft) 100%);
}

.deep-dive .section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.deep-dive .section-header h2 {
  font-size: 2.5rem;
  color: white;
  margin-bottom: 0.5rem;
}

.deep-dive .section-header p {
  color: rgba(255,255,255,0.6);
  font-size: 1.1rem;
}

.deep-dive-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 16px;
  padding: 2rem;
  margin-bottom: 2rem;
  max-width: 1000px;
  margin-left: auto;
  margin-right: auto;
}

.deep-dive-card.alert-card {
  border-color: rgba(239, 68, 68, 0.3);
  background: rgba(239, 68, 68, 0.05);
}

.card-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.card-icon {
  font-size: 1.5rem;
}

.card-header h3 {
  font-size: 1.3rem;
  color: white;
  margin: 0;
}

.card-content {
  color: rgba(255,255,255,0.8);
}

.chart-container {
  min-height: 300px;
  margin-bottom: 1.5rem;
}

.card-insight {
  background: rgba(13, 148, 136, 0.1);
  border-left: 3px solid var(--primary);
  padding: 1rem 1.5rem;
  border-radius: 0 8px 8px 0;
}

.insight-highlight {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.big-number {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary-light);
}

.insight-label {
  font-size: 1rem;
  color: rgba(255,255,255,0.7);
}

/* Gap Analysis Grid */
.gap-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.gap-item {
  background: rgba(255,255,255,0.05);
  border-radius: 12px;
  padding: 1.25rem;
}

.gap-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.gap-item-title {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.7);
}

.gap-badge {
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
}

.gap-badge.positive {
  background: rgba(34, 197, 94, 0.2);
  color: #22c55e;
}

.gap-badge.negative {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
}

.gap-badge.neutral {
  background: rgba(250, 204, 21, 0.2);
  color: #facc15;
}

.gap-bars {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.gap-bar-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.gap-bar-label {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.5);
  width: 50px;
}

.gap-bar-track {
  flex: 1;
  height: 8px;
  background: rgba(255,255,255,0.1);
  border-radius: 4px;
  overflow: hidden;
}

.gap-bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.5s ease;
}

.gap-bar-fill.muslim {
  background: var(--primary);
}

.gap-bar-fill.all {
  background: var(--text-muted);
}

.gap-bar-value {
  font-size: 0.85rem;
  font-weight: 600;
  width: 40px;
  text-align: right;
}

/* Prison Stats */
.prison-viz {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-bottom: 1rem;
}

.prison-comparison {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.prison-stat {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.prison-bar {
  height: 40px;
  background: rgba(255,255,255,0.1);
  border-radius: 8px;
  position: relative;
  overflow: hidden;
}

.prison-bar .bar-fill {
  height: 100%;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 0.75rem;
  min-width: 50px;
}

.prison-bar.population .bar-fill {
  background: var(--primary);
}

.prison-bar.prison .bar-fill {
  background: #ef4444;
}

.prison-bar .bar-label {
  font-weight: 700;
  font-size: 1rem;
  color: white;
}

.stat-desc {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.6);
}

.prison-details {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.detail-item {
  display: flex;
  flex-direction: column;
}

.detail-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: #ef4444;
}

.detail-label {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.6);
}

.prison-note {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.7);
  padding-top: 1rem;
  border-top: 1px solid rgba(255,255,255,0.1);
}

/* LAD Comparison */
.lad-selectors {
  display: flex;
  align-items: center;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.lad-select {
  padding: 0.75rem 1rem;
  font-size: 1rem;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 8px;
  background: rgba(255,255,255,0.05);
  color: white;
  min-width: 200px;
  cursor: pointer;
}

.lad-select:focus {
  outline: none;
  border-color: var(--primary);
}

.lad-select option {
  background: var(--dark);
  color: white;
}

.vs-badge {
  font-weight: 700;
  color: var(--accent);
  font-size: 1.1rem;
}

.lad-comparison-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.lad-card {
  background: rgba(255,255,255,0.05);
  border-radius: 12px;
  padding: 1.5rem;
}

.lad-card h4 {
  font-size: 1.1rem;
  color: var(--primary-light);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.lad-metric {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.lad-metric:last-child {
  border-bottom: none;
}

.lad-metric-label {
  color: rgba(255,255,255,0.6);
  font-size: 0.9rem;
}

.lad-metric-value {
  font-weight: 600;
  color: white;
}

.placeholder-text {
  grid-column: 1 / -1;
  text-align: center;
  color: rgba(255,255,255,0.4);
  padding: 2rem;
}

/* === Footer === */
footer {
  background: var(--dark-soft);
  color: white;
  padding: 3rem 2rem 1.5rem;
}

.footer-content {
  max-width: 1000px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer-logo {
  height: 40px;
  width: auto;
  margin-bottom: 0.5rem;
}

.footer-brand p {
  color: rgba(255,255,255,0.5);
  font-size: 0.9rem;
  margin-top: 0.25rem;
}

.footer-links {
  display: flex;
  gap: 2rem;
}

.footer-links a {
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s;
}

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

.footer-bottom {
  text-align: center;
  padding-top: 1.5rem;
}

.footer-bottom p {
  color: rgba(255,255,255,0.4);
  font-size: 0.85rem;
}

/* === D3 Visualization Styles === */
.bar-muslim {
  fill: var(--muslim-color);
}

.bar-all {
  fill: var(--all-color);
}

.axis text {
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  fill: rgba(255,255,255,0.8);
}

.axis path,
.axis line {
  stroke: rgba(255,255,255,0.2);
}

.chart-title {
  font-family: var(--font-display);
  font-size: 18px;
  fill: white;
  font-weight: 600;
}

.legend-text {
  font-size: 13px;
  fill: rgba(255,255,255,0.8);
}

.annotation {
  font-size: 13px;
  fill: var(--accent);
}

/* === Responsive === */
@media (max-width: 900px) {
  .step-indicators {
    display: none;
  }

  .viz-wrapper {
    position: relative;
    height: auto;
    min-height: 400px;
    padding: 100px 1rem 2rem;
  }

  .viz-container {
    height: 350px;
  }

  .scroll-text {
    padding: 0 1rem;
  }

  .step {
    min-height: auto;
    padding: 2rem 0;
  }

  .step-card {
    max-width: 100%;
    opacity: 1;
    transform: none;
  }

  .explorer-content {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .nav-links {
    display: none;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .hero-stats {
    flex-direction: column;
    gap: 1rem;
  }

  .stat-card {
    min-width: auto;
  }

  .comparison {
    flex-direction: column;
  }

  .summary-card .takeaway-grid {
    grid-template-columns: 1fr;
  }

  .footer-content {
    flex-direction: column;
    gap: 1.5rem;
    text-align: center;
  }

  .footer-links {
    justify-content: center;
  }

  /* Deep Dive Responsive */
  .deep-dive {
    padding: 2rem 1rem;
  }

  .deep-dive .section-header h2 {
    font-size: 1.8rem;
  }

  .deep-dive-card {
    padding: 1.5rem;
  }

  .prison-viz {
    grid-template-columns: 1fr;
  }

  .lad-selectors {
    flex-direction: column;
  }

  .lad-select {
    width: 100%;
  }

  .lad-comparison-grid {
    grid-template-columns: 1fr;
  }

  .gap-grid {
    grid-template-columns: 1fr;
  }

  .big-number {
    font-size: 2rem;
  }
}
