/* Base styles used across the app without needing Tailwind builds. */

html {
  font-size: 16px;
}

body {
  min-height: 100vh;
  margin: 0;
  padding: 0;
  color: var(--bpa-text-primary);
  background: radial-gradient(circle at 20% 20%, rgba(34, 197, 94, 0.08), transparent 35%),
    radial-gradient(circle at 80% 10%, rgba(56, 189, 248, 0.08), transparent 35%),
    linear-gradient(135deg, var(--bpa-bg-primary) 0%, var(--bpa-bg-secondary) 50%, var(--bpa-bg-primary) 100%);
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  /* Standard readable base size */
  font-size: 1.0625rem; /* 17px on mobile for better readability */
  line-height: 1.6; /* Optimal for reading */
}
@media (min-width: 768px) {
  body {
    font-size: 1rem; /* 16px on desktop */
    line-height: 1.6;
  }
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: "Merriweather", Georgia, serif;
  color: var(--bpa-text-primary);
  line-height: 1.3;
  margin-top: 0;
}

h1 {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 1rem;
}

h2 {
  font-size: 1.6rem;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 0.875rem;
}

h3 {
  font-size: 1.3rem;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 0.75rem;
}

h4 {
  font-size: 1.15rem;
  font-weight: 500;
  line-height: 1.4;
  margin-bottom: 0.625rem;
}

h5,
h6 {
  font-family: "Merriweather", Georgia, serif;
  font-weight: 600;
  line-height: 1.4;
}

p {
  margin-bottom: 1.1em;
  line-height: 1.6;
}

/* Long‑form content (guides, policies, puzzles) */
.bpa-prose,
.prose,
.text-content,
.article {
  max-width: 70ch;
  margin: 0 auto;
  line-height: 1.65;
}

/* Allow prose to work within containers without double padding */
.bpa-container .prose {
  padding: 0;
}

.prose.max-w-none {
  max-width: none;
}

.bpa-prose h1,
.prose h1,
.text-content h1,
.article h1 {
  font-family: "Merriweather", Georgia, serif;
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.3;
  margin-top: 0;
  margin-bottom: 1rem;
}

.bpa-prose h2,
.prose h2,
.text-content h2,
.article h2 {
  font-family: "Merriweather", Georgia, serif;
  font-size: 1.6rem;
  font-weight: 600;
  line-height: 1.3;
  margin-top: 2rem;
  margin-bottom: 0.875rem;
}

.bpa-prose h3,
.prose h3,
.text-content h3,
.article h3 {
  font-family: "Merriweather", Georgia, serif;
  font-size: 1.3rem;
  font-weight: 600;
  line-height: 1.3;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}

.bpa-prose h4,
.prose h4,
.text-content h4,
.article h4 {
  font-family: "Merriweather", Georgia, serif;
  font-size: 1.15rem;
  font-weight: 500;
  line-height: 1.4;
  margin-top: 1.25rem;
  margin-bottom: 0.625rem;
}

.bpa-prose p,
.prose p,
.text-content p,
.article p {
  margin-bottom: 1.1em;
  line-height: 1.65;
}

.bpa-prose ul,
.bpa-prose ol,
.prose ul,
.prose ol,
.text-content ul,
.text-content ol,
.article ul,
.article ol {
  margin-top: 1rem;
  margin-bottom: 1rem;
  padding-left: 1.5rem;
  line-height: 1.65;
}

.bpa-prose li,
.prose li,
.text-content li,
.article li {
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
  line-height: 1.65;
}

.bpa-prose strong,
.prose strong,
.text-content strong,
.article strong {
  font-weight: 600;
  color: var(--bpa-text-primary);
}

.bpa-prose em,
.prose em,
.text-content em,
.article em {
  font-style: italic;
}

/* Global text size scale: small / medium / large
   Applies on top of Tailwind text utilities using higher specificity and !important. */

/* Minimum text size: 12px (0.75rem) for all UI text */
* {
  font-size: inherit;
}

/* Global line-height improvements for better readability */
.text-xs {
  font-size: 0.875rem !important; /* 14px minimum - was 12px */
  line-height: 1.6;
}

.text-sm {
  font-size: 0.9375rem !important; /* 15px */
  line-height: 1.7;
}

.text-base {
  font-size: 1rem !important; /* 16px */
  line-height: 1.75;
}

.text-lg {
  font-size: 1.125rem !important; /* 18px */
  line-height: 1.75;
}

/* Merriweather for all headings and title-like elements */
h1, h2, h3, h4, h5, h6,
.bpa-card h2, .bpa-card h3, .bpa-card h4,
.bpa-prose h1, .bpa-prose h2, .bpa-prose h3, .bpa-prose h4,
.prose h1, .prose h2, .prose h3, .prose h4,
.text-content h1, .text-content h2, .text-content h3, .text-content h4,
.article h1, .article h2, .article h3, .article h4 {
  font-family: "Merriweather", Georgia, serif !important;
}

/* Apply Merriweather to title-like elements (headings in cards, sections) */
[class*="text-2xl"][class*="font-bold"],
[class*="text-3xl"][class*="font-bold"],
[class*="text-4xl"][class*="font-bold"],
[class*="text-5xl"][class*="font-bold"],
[class*="text-6xl"][class*="font-bold"],
[class*="text-xl"][class*="font-bold"],
[class*="text-lg"][class*="font-bold"] {
  font-family: "Merriweather", Georgia, serif !important;
}

/* Scale the base font size for everything (content that doesn't use Tailwind text utilities). */
.bpa-page--font-small { 
  font-size: 0.95rem; 
  line-height: 1.8;
}
.bpa-page--font-medium { 
  font-size: 1.05rem; 
  line-height: 1.75;
}
.bpa-page--font-large { 
  font-size: 1.15rem; 
  line-height: 1.7;
}

/* Ensure minimum 12px (0.75rem) for all text, even at smallest size */
.bpa-page--font-small [class*="text-\[0\.625rem\]"],
.bpa-page--font-small [class*="text-\[0\.6875rem\]"] {
  font-size: 0.75rem !important; /* Minimum 12px */
}

/* Then gently adjust Tailwind-style utility classes on top. */
.bpa-page.bpa-page--font-small .text-xs { font-size: 1.0rem !important; line-height: 1.7 !important; }
.bpa-page.bpa-page--font-small .text-sm { font-size: 1.15rem !important; line-height: 1.75 !important; }
.bpa-page.bpa-page--font-small .text-base { font-size: 1.3rem !important; line-height: 1.8 !important; }
/* Support for rem-based arbitrary sizes */
.bpa-page.bpa-page--font-small [class*="text-\[0\.625rem\]"] { font-size: 0.875rem !important; } /* 10px equivalent, scaled up */
.bpa-page.bpa-page--font-small [class*="text-\[0\.6875rem\]"] { font-size: 0.9375rem !important; } /* 11px equivalent, scaled up */

.bpa-page.bpa-page--font-medium .text-xs { font-size: 1.1rem !important; line-height: 1.65 !important; }
.bpa-page.bpa-page--font-medium .text-sm { font-size: 1.3rem !important; line-height: 1.75 !important; }
.bpa-page.bpa-page--font-medium .text-base { font-size: 1.45rem !important; line-height: 1.8 !important; }
/* Support for rem-based arbitrary sizes */
.bpa-page.bpa-page--font-medium [class*="text-\[0\.625rem\]"] { font-size: 0.9375rem !important; } /* 10px equivalent, scaled up */
.bpa-page.bpa-page--font-medium [class*="text-\[0\.6875rem\]"] { font-size: 1.0rem !important; } /* 11px equivalent, scaled up */

.bpa-page.bpa-page--font-large .text-xs { font-size: 1.2rem !important; line-height: 1.6 !important; }
.bpa-page.bpa-page--font-large .text-sm { font-size: 1.45rem !important; line-height: 1.7 !important; }
.bpa-page.bpa-page--font-large .text-base { font-size: 1.65rem !important; line-height: 1.75 !important; }
/* Support for rem-based arbitrary sizes */
.bpa-page.bpa-page--font-large [class*="text-\[0\.625rem\]"] { font-size: 1.0rem !important; } /* 10px equivalent, scaled up */
.bpa-page.bpa-page--font-large [class*="text-\[0\.6875rem\]"] { font-size: 1.1rem !important; } /* 11px equivalent, scaled up */

.bpa-container { max-width: 1200px; margin: 0 auto; padding: 1rem 1rem; }
@media (min-width: 640px) {
  .bpa-container { padding: 1.5rem 1.5rem; }
}
@media (min-width: 1024px) {
  .bpa-container { padding: 2rem 2rem; }
}
.bpa-glass { background: rgba(15, 23, 42, 0.6); backdrop-filter: blur(12px); border: 1px solid rgba(255,255,255,0.1); border-radius: 16px; box-shadow: 0 24px 60px rgba(15,23,42,0.8); }
.bpa-glass-soft { background: rgba(15, 23, 42, 0.4); backdrop-filter: blur(12px); border: 1px solid rgba(255,255,255,0.05); border-radius: 16px; box-shadow: 0 16px 40px rgba(15,23,42,0.6); }
.bpa-chip { 
  display: inline-flex; 
  align-items: center; 
  gap: 0.35rem; 
  padding: 0.375rem 0.875rem; 
  border-radius: 9999px; 
  border: 1px solid var(--bpa-border); 
  background: rgba(30, 41, 59, 0.8); 
  font-size: 0.8125rem; 
  font-weight: 600; 
  color: var(--bpa-text-primary); 
  line-height: 1.5; 
}

/* Light theme: Navigation bar with darker background for light text */
[data-theme="light"] header,
[data-theme="light"] header.border-b,
[data-theme="light"] nav.sticky,
[data-theme="light"] .bg-slate-950\/70,
[data-theme="light"] [class*="bg-slate-950/70"] {
  background-color: rgba(15, 23, 42, 0.95) !important; /* Dark background for navigation */
  backdrop-filter: blur(12px);
  border-bottom-color: rgba(203, 213, 225, 0.2) !important;
}

/* Light theme: Navigation text - light colors (white/light gray) */
[data-theme="light"] nav .text-slate-100,
[data-theme="light"] nav .text-slate-200,
[data-theme="light"] nav .text-slate-300,
[data-theme="light"] header .text-slate-100,
[data-theme="light"] header .text-slate-200,
[data-theme="light"] header .text-slate-300 {
  color: #f1f5f9 !important; /* Light slate-100 for clear readability */
}

[data-theme="light"] nav .text-white,
[data-theme="light"] header .text-white {
  color: #ffffff !important; /* Pure white for maximum clarity */
}

/* Light theme: Navigation menu dropdown */
[data-theme="light"] .bg-slate-900,
[data-theme="light"] details .bg-slate-900,
[data-theme="light"] .bg-slate-900\/60 {
  background-color: rgba(15, 23, 42, 0.98) !important; /* Dark background */
  border-color: rgba(203, 213, 225, 0.2) !important;
}

[data-theme="light"] .hover\:bg-slate-800:hover {
  background-color: rgba(30, 41, 59, 0.8) !important; /* Darker on hover */
}

/* Light theme: Tags and chips - lighter, clearer backgrounds */
[data-theme="light"] .bpa-chip {
  background: rgba(241, 245, 249, 0.95) !important; /* Very light gray background */
  border-color: rgba(45, 55, 72, 0.25) !important; /* Clear border */
  color: var(--bpa-text-primary) !important; /* Dark text for contrast */
}

[data-theme="light"] .bg-slate-800\/80,
[data-theme="light"] [class*="bg-slate-800/80"] {
  background-color: rgba(248, 250, 252, 0.95) !important; /* Very light background */
}

[data-theme="light"] .bg-slate-900\/80,
[data-theme="light"] [class*="bg-slate-900/80"] {
  background-color: rgba(255, 255, 255, 0.98) !important; /* White background */
}

/* Light theme: Inline tags - light backgrounds */
[data-theme="light"] .inline-flex.items-center.px-2.py-1.rounded-md,
[data-theme="light"] .inline-flex.items-center.px-3.py-1\.5.rounded-md,
[data-theme="light"] span.inline-flex[class*="bg-slate"] {
  background-color: rgba(248, 250, 252, 0.95) !important; /* Very light background */
  border-color: rgba(45, 55, 72, 0.2) !important; /* Clear border */
  color: var(--bpa-text-primary) !important; /* Dark text */
}

[data-theme="light"] .inline-flex.items-center[class*="text-slate-300"],
[data-theme="light"] span[class*="text-slate-300"] {
  color: var(--bpa-text-primary) !important; /* Dark text on light tag background */
}
/* Subtitles - small, monospace, less prominent to let titles stand out */
.bpa-subtitle {
  font-family: "Courier New", Courier, "Liberation Mono", "Lucida Console", monospace;
  font-size: 0.625rem; /* 10px - very small */
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  line-height: 1.4;
  opacity: 0.7; /* Make it more subtle */
}
/* Scale subtitles with font size settings */
.bpa-page--font-small .bpa-subtitle { font-size: 0.75rem !important; }
.bpa-page--font-medium .bpa-subtitle { font-size: 0.8125rem !important; }
.bpa-page--font-large .bpa-subtitle { font-size: 0.875rem !important; }
.bpa-btn-primary { 
  display: inline-flex; 
  align-items: center; 
  justify-content: center; 
  padding: 0.75rem 1.5rem; 
  border-radius: 9999px; 
  background: var(--bpa-accent); 
  color: #0f172a; 
  font-family: "Inter", system-ui, sans-serif;
  font-weight: 700; 
  border: none; 
  cursor: pointer; 
  text-decoration: none; 
  min-height: 44px; 
  font-size: 1rem; 
}
.bpa-btn-primary:hover { background: var(--bpa-accent-hover); }
@media (min-width: 640px) {
  .bpa-btn-primary { padding: 0.5rem 1.25rem; min-height: auto; }
}
.bpa-btn-secondary { 
  display: inline-flex; 
  align-items: center; 
  justify-content: center; 
  padding: 0.75rem 1.5rem; 
  border-radius: 9999px; 
  background: rgba(15,23,42,0.6); 
  color: var(--bpa-text-primary); 
  font-family: "Inter", system-ui, sans-serif;
  font-weight: 700; 
  border: 1px solid var(--bpa-border); 
  text-decoration: none; 
  min-height: 44px; 
  font-size: 1rem; 
}
.bpa-btn-secondary:hover { border-color: var(--bpa-border); opacity: 0.9; }
@media (min-width: 640px) {
  .bpa-btn-secondary { padding: 0.5rem 1.25rem; min-height: auto; }
}
.bpa-input { width: 100%; border-radius: 12px; border: 1px solid var(--bpa-border); background: rgba(15,23,42,0.8); padding: 0.5rem 0.75rem; color: var(--bpa-text-primary); }
.bpa-label { 
  display: block; 
  font-family: "Inter", system-ui, sans-serif;
  font-size: 0.75rem; 
  font-weight: 700; 
  letter-spacing: 0.05em; 
  text-transform: uppercase; 
  color: var(--bpa-text-secondary); 
  margin-bottom: 0.25rem; 
  line-height: 1.6; 
}

.container { max-width: 1200px; margin: 0 auto; padding: 0 1rem; }
.row { display: flex; flex-wrap: wrap; margin: 0 -0.75rem; }
.col { width: 100%; padding: 0 0.75rem; }
.col-md-3 { width: 100%; padding: 0 0.75rem; }
.col-md-4 { width: 100%; padding: 0 0.75rem; }
.col-md-6 { width: 100%; padding: 0 0.75rem; }
.col-md-8 { width: 100%; padding: 0 0.75rem; }
.col-md-9 { width: 100%; padding: 0 0.75rem; }
.col-lg-8 { width: 100%; padding: 0 0.75rem; }
.col-lg-4 { width: 100%; padding: 0 0.75rem; }
.gy-3 > * { margin-top: 0.75rem; margin-bottom: 0.75rem; }
.mb-0 { margin-bottom: 0; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-5 { margin-bottom: 1.25rem; }
.mt-5 { margin-top: 1.25rem; }
.text-secondary { color: var(--bpa-text-secondary); }
.text-light { color: var(--bpa-text-primary); }
.fw-bold { font-weight: 700; }
.fw-semibold { font-weight: 600; }
.shadow-sm { box-shadow: 0 10px 25px rgba(15,23,42,0.35); }
.btn { display: inline-flex; align-items: center; justify-content: center; padding: 0.5rem 1rem; border-radius: 9999px; text-decoration: none; font-weight: 600; }
.btn-primary { background: #22c55e; color: #0f172a; }
.btn-primary:hover { background: #34d399; }
.btn-outline-light { border: 1px solid #94a3b8; color: #e2e8f0; }
.btn-outline-light:hover { border-color: #cbd5e1; }
.btn-outline-secondary { border: 1px solid #64748b; color: #e2e8f0; }
.btn-outline-secondary:hover { border-color: #94a3b8; }
.btn-sm { font-size: 0.85rem; padding: 0.35rem 0.75rem; }
.card { border-radius: 16px; background: rgba(15,23,42,0.6); border: 1px solid rgba(255,255,255,0.1); padding: 0; }
.card-body { padding: 1.25rem; }
.badge { display: inline-flex; align-items: center; padding: 0.25rem 0.75rem; border-radius: 9999px; font-size: 0.75rem; font-weight: 700; }
.text-bg-light { background: #e2e8f0; color: #0f172a; }
.text-bg-secondary { background: #475569; color: #e2e8f0; }

:root {
  /* Default theme (improved contrast) */
  --bpa-primary: #0d6efd;
  --bpa-accent: #22c55e;
  --bpa-accent-hover: #34d399;
  
  /* Background colors */
  --bpa-bg-primary: #020617;
  --bpa-bg-secondary: #0f172a;
  --bpa-bg-card: #1e293b;           /* Much brighter - was #111827 */
  --bpa-bg-card-hover: #334155;     /* For hover states */
  
  /* Text colors (improved contrast) */
  --bpa-text-primary: #f8fafc;      /* Maximum brightness for readability */
  --bpa-text-secondary: #e2e8f0;    /* Brighter secondary text */
  --bpa-text-tertiary: #cbd5e1;     /* For less important text */
  
  /* Borders - MUCH more visible */
  --bpa-border: rgba(203, 213, 225, 0.5);  /* Stronger border */
  --bpa-border-card: rgba(203, 213, 225, 0.4);  /* Much more visible card borders */
  --bpa-border-card-hover: rgba(34, 197, 94, 0.6);  /* Accent border on hover */
  
  /* Card header/footer backgrounds */
  --bpa-bg-card-header: rgba(30, 41, 59, 0.6);
  --bpa-bg-card-footer: rgba(15, 23, 42, 0.5);
  
  /* Focus ring */
  --bpa-focus-ring: #22c55e;  /* Emerald for default theme */
  
  /* Panel colors */
  --bpa-panel-bg: #1e293b;  /* slate-900 equivalent */
  --bpa-panel-text: #f8fafc;  /* white equivalent */
  --bpa-panel-text-secondary: #94a3b8;  /* slate-400 equivalent */
  --bpa-panel-text-tertiary: #cbd5e1;  /* slate-300 equivalent */
  --bpa-panel-border: #475569;  /* slate-700 equivalent */
  
  /* Option active state */
  --bpa-option-active-bg: #1e293b;  /* slate-800 equivalent */
  --bpa-option-active-text: #f1f5f9;  /* slate-100 equivalent */
  
  /* Additional background colors for default theme */
  --bpa-bg-slate-900: #0f172a;  /* slate-900 */
  --bpa-bg-slate-800: #1e293b;  /* slate-800 */
  --bpa-bg-slate-950: #020617;  /* slate-950 */
  --bpa-bg-slate-700: #334155;  /* slate-700 */
  
  /* Border colors for default theme */
  --bpa-border-slate-700: rgba(203, 213, 225, 0.5);
  --bpa-border-slate-800: rgba(203, 213, 225, 0.6);
  --bpa-border-slate-600: rgba(203, 213, 225, 0.4);
}

[data-theme="high-contrast"] {
  --bpa-bg-primary: #000000;
  --bpa-bg-secondary: #0a0a0a;
  --bpa-bg-card: #1a1a1a;
  --bpa-text-primary: #ffffff;
  --bpa-text-secondary: #e5e5e5;
  --bpa-text-tertiary: #cccccc;
  --bpa-border: rgba(255, 255, 255, 0.5);
  --bpa-border-card: rgba(255, 255, 255, 0.4);
  --bpa-accent: #00ff00;
  --bpa-accent-hover: #33ff33;
  --bpa-bg-card-header: rgba(40, 40, 40, 0.8);
  --bpa-bg-card-footer: rgba(30, 30, 30, 0.7);
  --bpa-focus-ring: #00ff00;
  --bpa-panel-bg: #1a1a1a;
  --bpa-panel-text: #ffffff;
  --bpa-panel-text-secondary: #e5e5e5;
  --bpa-panel-text-tertiary: #cccccc;
  --bpa-panel-border: rgba(255, 255, 255, 0.5);
  --bpa-option-active-bg: #2a2a2a;
  --bpa-option-active-text: #ffffff;
}

[data-theme="light"] {
  /* Light Theme Color Palette - Cohesive and Consistent */
  
  /* Base Colors - Warm off-white instead of pure white */
  --bpa-bg-primary: #fafbfc;        /* Very light warm gray */
  --bpa-bg-secondary: #f5f7fa;     /* Slightly darker warm gray */
  --bpa-bg-card: #ffffff;           /* Pure white for cards for contrast */
  
  /* Text Colors - Dark but not harsh black */
  --bpa-text-primary: #1a202c;      /* Soft black, easier on eyes */
  --bpa-text-secondary: #4a5568;    /* Medium gray for secondary text */
  --bpa-text-tertiary: #718096;     /* Lighter gray for tertiary text */
  
  /* Borders - Subtle but visible */
  --bpa-border: rgba(45, 55, 72, 0.15);      /* Soft border */
  --bpa-border-card: rgba(45, 55, 72, 0.12); /* Even softer for cards */
  
  /* Accent Colors - Adjusted for light theme */
  --bpa-accent: #047857;            /* Darker emerald for better contrast */
  --bpa-accent-hover: #059669;     /* Slightly lighter on hover */
  
  /* Card Structure */
  --bpa-bg-card-header: #f7fafc;   /* Very light gray for headers */
  --bpa-bg-card-footer: #f9fafb;   /* Slightly different for footers */
  
  /* Focus & Interactive */
  --bpa-focus-ring: #047857;        /* Darker emerald for focus */
  
  /* Panel Colors */
  --bpa-panel-bg: #ffffff;
  --bpa-panel-text: #1a202c;
  --bpa-panel-text-secondary: #4a5568;
  --bpa-panel-text-tertiary: #718096;
  --bpa-panel-border: rgba(45, 55, 72, 0.15);
  
  /* Active States */
  --bpa-option-active-bg: #e2e8f0;  /* Light gray */
  --bpa-option-active-text: #1a202c; /* Dark text */
  
  /* Background Color Mappings - Light theme palette */
  --bpa-bg-slate-900: #f5f7fa;      /* Light warm gray */
  --bpa-bg-slate-800: #edf2f7;      /* Lighter warm gray */
  --bpa-bg-slate-950: #ffffff;       /* White for darkest backgrounds */
  --bpa-bg-slate-700: #e2e8f0;      /* Medium light gray */
  
  /* Border Color Mappings */
  --bpa-border-slate-700: rgba(45, 55, 72, 0.25);  /* Visible but soft */
  --bpa-border-slate-800: rgba(45, 55, 72, 0.3);   /* Slightly stronger */
  --bpa-border-slate-600: rgba(45, 55, 72, 0.2);   /* Medium strength */
  
  /* Accent Color Palette - Adjusted for light theme */
  --bpa-emerald-50: #ecfdf5;        /* Very light emerald */
  --bpa-emerald-100: #d1fae5;       /* Light emerald */
  --bpa-emerald-200: #a7f3d0;       /* Lighter emerald */
  --bpa-emerald-300: #6ee7b7;       /* Medium light emerald */
  --bpa-emerald-400: #34d399;       /* Medium emerald */
  --bpa-emerald-500: #10b981;       /* Standard emerald */
  --bpa-emerald-600: #059669;       /* Darker emerald */
  --bpa-emerald-700: #047857;       /* Dark emerald */
  --bpa-emerald-800: #065f46;       /* Very dark emerald */
  --bpa-emerald-900: #064e3b;       /* Darkest emerald */
  --bpa-emerald-950: #022c22;       /* Almost black emerald */
  
  /* Cyan Accent Colors */
  --bpa-cyan-50: #ecfeff;
  --bpa-cyan-100: #cffafe;
  --bpa-cyan-200: #a5f3fc;
  --bpa-cyan-300: #67e8f9;
  --bpa-cyan-400: #22d3ee;
  --bpa-cyan-500: #06b6d4;
  --bpa-cyan-600: #0891b2;
  --bpa-cyan-700: #0e7490;
  --bpa-cyan-800: #155e75;
  --bpa-cyan-900: #164e63;
  --bpa-cyan-950: #083344;
  
  /* Rose/Red Accent Colors */
  --bpa-rose-50: #fff1f2;
  --bpa-rose-100: #ffe4e6;
  --bpa-rose-200: #fecdd3;
  --bpa-rose-300: #fda4af;
  --bpa-rose-400: #fb7185;
  --bpa-rose-500: #f43f5e;
  --bpa-rose-600: #e11d48;
  --bpa-rose-700: #be123c;
  --bpa-rose-800: #9f1239;
  --bpa-rose-900: #881337;
  --bpa-rose-950: #4c0519;
  
  /* Amber/Yellow Accent Colors */
  --bpa-amber-50: #fffbeb;
  --bpa-amber-100: #fef3c7;
  --bpa-amber-200: #fde68a;
  --bpa-amber-300: #fcd34d;
  --bpa-amber-400: #fbbf24;
  --bpa-amber-500: #f59e0b;
  --bpa-amber-600: #d97706;
  --bpa-amber-700: #b45309;
  --bpa-amber-800: #92400e;
  --bpa-amber-900: #78350f;
  --bpa-amber-950: #451a03;
}

/* Contrast levels */
[data-contrast="enhanced"] {
  --bpa-text-secondary: #d1d5db;    /* Even brighter */
  --bpa-border: rgba(203, 213, 225, 0.4);
}

[data-contrast="maximum"] {
  --bpa-text-secondary: #e5e7eb;    /* Maximum contrast */
  --bpa-border: rgba(203, 213, 225, 0.5);
}

[data-theme="high-contrast"][data-contrast="enhanced"],
[data-theme="high-contrast"][data-contrast="maximum"] {
  --bpa-text-secondary: #ffffff;
  --bpa-border: rgba(255, 255, 255, 0.7);
}

/* Light theme with enhanced contrast - ensure WCAG AA compliance */
[data-theme="light"][data-contrast="enhanced"] {
  --bpa-text-secondary: #334155;  /* slate-700 - darker for better contrast on white */
  --bpa-text-tertiary: #475569;   /* slate-600 - darker for better contrast */
  --bpa-border: rgba(15, 23, 42, 0.3);  /* Stronger borders */
}

[data-theme="light"][data-contrast="maximum"] {
  --bpa-text-secondary: #1e293b;  /* slate-800 - maximum contrast on white */
  --bpa-text-tertiary: #334155;   /* slate-700 - maximum contrast */
  --bpa-border: rgba(15, 23, 42, 0.4);  /* Maximum border visibility */
}

.bpa-card {
  border-radius: 1rem;
  background: var(--bpa-bg-card);
  border: 2px solid var(--bpa-border-card);  /* Thicker, more visible border */
  padding: 1.5rem;
  color: var(--bpa-text-primary);
  line-height: 1.7;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2); /* Card elevation */
  transition: all 0.2s ease;
}

.bpa-card:hover {
  border-color: var(--bpa-border-card-hover);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -2px rgba(0, 0, 0, 0.3);
  transform: translateY(-2px);
}

.bpa-card p {
  line-height: 1.7;
  color: var(--bpa-text-secondary);  /* Better contrast */
}

.bpa-card h2,
.bpa-card h3,
.bpa-card h4 {
  font-family: "Merriweather", Georgia, serif;
  line-height: 1.3;
  margin-bottom: 0.75rem;
  color: var(--bpa-text-primary);
  font-weight: 700;
}

/* Card internal structure - clear sections */
.bpa-card-header {
  background: var(--bpa-bg-card-header);
  border-bottom: 2px solid var(--bpa-border-card);
  padding: 1rem 1.25rem;
  margin: -1.5rem -1.5rem 1rem -1.5rem;  /* Extend to card edges */
  border-radius: 1rem 1rem 0 0;  /* Round top corners */
}

.bpa-card-body {
  flex: 1;
  padding: 0.5rem 0;  /* Add some vertical padding */
}

.bpa-card-footer {
  background: var(--bpa-bg-card-footer);
  border-top: 2px solid var(--bpa-border-card);
  padding: 1rem 1.25rem;
  margin: 1rem -1.5rem -1.5rem -1.5rem;  /* Extend to card edges */
  border-radius: 0 0 1rem 1rem;  /* Round bottom corners */
}

.bpa-badge {
  font-size: 0.75rem;
  border-radius: 999px;
  padding: 0.25rem 0.75rem;
  background-color: rgba(148, 163, 184, 0.2);
  color: #e5e7eb;
}

/* Theme-aware utility classes */
.bpa-panel-bg {
  background-color: var(--bpa-panel-bg);
}

.bpa-panel-text {
  color: var(--bpa-panel-text);
}

.bpa-panel-text-secondary {
  color: var(--bpa-panel-text-secondary);
}

.bpa-panel-text-tertiary {
  color: var(--bpa-panel-text-tertiary);
}

.bpa-panel-border {
  border-color: var(--bpa-panel-border);
}

.bpa-option-active {
  background-color: var(--bpa-option-active-bg) !important;
  color: var(--bpa-option-active-text) !important;
}

.bpa-focus-ring:focus-visible {
  outline: 2px solid var(--bpa-focus-ring);
  outline-offset: 2px;
}

/* Theme-aware text color utilities - replace hardcoded text-white, text-slate-* */
.bpa-text-primary {
  color: var(--bpa-text-primary) !important;
}

.bpa-text-secondary {
  color: var(--bpa-text-secondary) !important;
}

.bpa-text-tertiary {
  color: var(--bpa-text-tertiary) !important;
}

/* Override Tailwind text-white to use theme-aware color */
/* This ensures all text-white classes adapt to theme */
.text-white {
  color: var(--bpa-text-primary) !important;
}

/* Override common slate text colors to use theme-aware colors */
/* These mappings ensure WCAG AA contrast in light theme */
.text-slate-100,
.text-slate-200 {
  color: var(--bpa-text-secondary) !important;
}

.text-slate-300 {
  color: var(--bpa-text-secondary) !important;
}

.text-slate-400 {
  color: var(--bpa-text-tertiary) !important;
}

.text-slate-500 {
  color: var(--bpa-text-tertiary) !important;
}

/* Ensure headings use theme-aware colors */
h1, h2, h3, h4, h5, h6 {
  color: var(--bpa-text-primary) !important;
}

/* Ensure body text uses theme-aware colors */
body, p {
  color: var(--bpa-text-primary);
}

/* Ensure links maintain proper contrast */
a {
  color: var(--bpa-accent);
}

a:hover {
  color: var(--bpa-accent-hover);
}

/* Theme-aware background color overrides */
/* These ensure common Tailwind background classes adapt to theme */
/* Note: Tailwind opacity modifiers need special handling */
.bg-slate-900 {
  background-color: var(--bpa-bg-slate-900) !important;
}

/* Handle Tailwind opacity modifiers - Tailwind uses opacity property, not background opacity */
/* For classes with /90, /80, etc., we need to set the base color and let Tailwind handle opacity */
[class*="bg-slate-900/90"],
[class*="bg-slate-900\/90"] {
  background-color: var(--bpa-bg-slate-900) !important;
}

[class*="bg-slate-900/80"],
[class*="bg-slate-900\/80"] {
  background-color: var(--bpa-bg-slate-900) !important;
}

.bg-slate-800 {
  background-color: var(--bpa-bg-slate-800) !important;
}

[class*="bg-slate-800/50"],
[class*="bg-slate-800\/50"] {
  background-color: var(--bpa-bg-slate-800) !important;
}

[class*="bg-slate-800/30"],
[class*="bg-slate-800\/30"] {
  background-color: var(--bpa-bg-slate-800) !important;
}

.bg-slate-950 {
  background-color: var(--bpa-bg-slate-950) !important;
}

[class*="bg-slate-950/60"],
[class*="bg-slate-950\/60"] {
  background-color: var(--bpa-bg-slate-950) !important;
}

[class*="bg-slate-950/80"],
[class*="bg-slate-950\/80"] {
  background-color: var(--bpa-bg-slate-950) !important;
}

.bg-slate-700 {
  background-color: var(--bpa-bg-slate-700) !important;
}

/* Theme-aware border color overrides */
.border-slate-700 {
  border-color: var(--bpa-border-slate-700) !important;
}

[class*="border-slate-700/60"],
[class*="border-slate-700\/60"] {
  border-color: var(--bpa-border-slate-700) !important;
}

[class*="border-slate-700/50"],
[class*="border-slate-700\/50"] {
  border-color: var(--bpa-border-slate-700) !important;
}

.border-slate-800 {
  border-color: var(--bpa-border-slate-800) !important;
}

[class*="border-slate-800/80"],
[class*="border-slate-800\/80"] {
  border-color: var(--bpa-border-slate-800) !important;
}

.border-slate-600 {
  border-color: var(--bpa-border-slate-600) !important;
}

[class*="border-slate-600/60"],
[class*="border-slate-600\/60"] {
  border-color: var(--bpa-border-slate-600) !important;
}

/* Ensure backdrop blur works with theme-aware backgrounds */
.backdrop-blur-xl,
.backdrop-blur-sm {
  background-color: var(--bpa-bg-card);
}

/* Override divide colors for light theme */
.divide-slate-800 {
  border-color: var(--bpa-border-slate-800) !important;
}

/* Light Theme Accent Color Overrides - Use theme palette */
[data-theme="light"] .bg-emerald-50,
[data-theme="light"] .bg-emerald-100,
[data-theme="light"] .bg-emerald-200,
[data-theme="light"] .bg-emerald-300,
[data-theme="light"] .bg-emerald-400,
[data-theme="light"] .bg-emerald-500,
[data-theme="light"] .bg-emerald-600,
[data-theme="light"] .bg-emerald-700,
[data-theme="light"] .bg-emerald-800,
[data-theme="light"] .bg-emerald-900,
[data-theme="light"] .bg-emerald-950 {
  background-color: var(--bpa-emerald-50) !important;
}

[data-theme="light"] .bg-emerald-500\/5,
[data-theme="light"] .bg-emerald-500\/10,
[data-theme="light"] .bg-emerald-500\/20,
[data-theme="light"] .bg-emerald-500\/30 {
  background-color: var(--bpa-emerald-50) !important;
}

[data-theme="light"] .bg-emerald-950\/20,
[data-theme="light"] .bg-emerald-950\/30,
[data-theme="light"] .bg-emerald-950\/50 {
  background-color: var(--bpa-emerald-100) !important;
}

[data-theme="light"] .bg-emerald-400,
[data-theme="light"] .bg-emerald-500,
[data-theme="light"] .bg-emerald-500\/90,
[data-theme="light"] .bg-emerald-600 {
  background-color: var(--bpa-emerald-600) !important; /* Solid emerald for buttons */
}

[data-theme="light"] .text-emerald-100,
[data-theme="light"] .text-emerald-200,
[data-theme="light"] .text-emerald-300 {
  color: var(--bpa-emerald-700) !important;
}

[data-theme="light"] .text-emerald-400 {
  color: var(--bpa-emerald-600) !important;
}

[data-theme="light"] .border-emerald-400,
[data-theme="light"] .border-emerald-400\/60,
[data-theme="light"] .border-emerald-500\/40,
[data-theme="light"] .border-emerald-500\/50 {
  border-color: var(--bpa-emerald-400) !important;
}

[data-theme="light"] .border-emerald-500\/20 {
  border-color: var(--bpa-emerald-200) !important;
}

[data-theme="light"] .hover\:border-emerald-400:hover {
  border-color: var(--bpa-emerald-500) !important;
}

[data-theme="light"] .hover\:bg-emerald-950\/50:hover {
  background-color: var(--bpa-emerald-200) !important;
}

[data-theme="light"] .hover\:bg-emerald-500:hover,
[data-theme="light"] .hover\:bg-emerald-400:hover {
  background-color: var(--bpa-emerald-700) !important;
}

/* Ring colors for focus states */
[data-theme="light"] .ring-emerald-400\/40,
[data-theme="light"] .focus\:ring-emerald-400:focus,
[data-theme="light"] .focus\:ring-emerald-400:focus-visible {
  --tw-ring-color: var(--bpa-emerald-500) !important;
}

/* Shadow colors for hover effects */
[data-theme="light"] .hover\:shadow-emerald-500\/20:hover {
  box-shadow: 0 10px 15px -3px rgba(5, 120, 87, 0.1), 0 4px 6px -2px rgba(5, 120, 87, 0.05) !important;
}

[data-theme="light"] .hover\:shadow-cyan-500\/20:hover {
  box-shadow: 0 10px 15px -3px rgba(6, 182, 212, 0.1), 0 4px 6px -2px rgba(6, 182, 212, 0.05) !important;
}

/* Cyan Accent Colors for Light Theme */
[data-theme="light"] .bg-cyan-50,
[data-theme="light"] .bg-cyan-100,
[data-theme="light"] .bg-cyan-200,
[data-theme="light"] .bg-cyan-950\/20,
[data-theme="light"] .bg-cyan-950\/30,
[data-theme="light"] .bg-cyan-950\/40 {
  background-color: var(--bpa-cyan-50) !important;
}

[data-theme="light"] .text-cyan-100,
[data-theme="light"] .text-cyan-200,
[data-theme="light"] .text-cyan-300 {
  color: var(--bpa-cyan-700) !important;
}

[data-theme="light"] .border-cyan-500\/40,
[data-theme="light"] .border-cyan-500\/50 {
  border-color: var(--bpa-cyan-300) !important;
}

[data-theme="light"] .hover\:border-cyan-400:hover {
  border-color: var(--bpa-cyan-400) !important;
}

[data-theme="light"] .hover\:bg-cyan-950\/40:hover {
  background-color: var(--bpa-cyan-100) !important;
}

/* Rose/Red Accent Colors for Light Theme */
[data-theme="light"] .bg-rose-50,
[data-theme="light"] .bg-rose-100,
[data-theme="light"] .bg-rose-500,
[data-theme="light"] .bg-rose-500\/10,
[data-theme="light"] .bg-rose-500\/20,
[data-theme="light"] .bg-rose-500\/40 {
  background-color: var(--bpa-rose-50) !important;
}

[data-theme="light"] .bg-rose-500 {
  background-color: var(--bpa-rose-600) !important; /* Solid rose for indicators */
}

[data-theme="light"] .text-rose-100,
[data-theme="light"] .text-rose-200 {
  color: var(--bpa-rose-700) !important;
}

[data-theme="light"] .text-rose-300 {
  color: var(--bpa-rose-600) !important;
}

[data-theme="light"] .border-rose-500\/40,
[data-theme="light"] .border-rose-500\/50 {
  border-color: var(--bpa-rose-300) !important;
}

/* Amber/Yellow Accent Colors for Light Theme */
[data-theme="light"] .bg-amber-50,
[data-theme="light"] .bg-amber-100,
[data-theme="light"] .bg-amber-400\/40,
[data-theme="light"] .bg-amber-500,
[data-theme="light"] .bg-amber-500\/10,
[data-theme="light"] .bg-amber-950\/20 {
  background-color: var(--bpa-amber-50) !important;
}

[data-theme="light"] .bg-amber-500 {
  background-color: var(--bpa-amber-600) !important; /* Solid amber for indicators */
}

[data-theme="light"] .text-amber-300 {
  color: var(--bpa-amber-700) !important;
}

[data-theme="light"] .border-amber-400\/40,
[data-theme="light"] .border-amber-500\/40,
[data-theme="light"] .border-amber-500\/60 {
  border-color: var(--bpa-amber-400) !important;
}

/* Update body background gradient for light theme */
[data-theme="light"] body {
  background: radial-gradient(circle at 20% 20%, rgba(5, 120, 87, 0.04), transparent 35%),
    radial-gradient(circle at 80% 10%, rgba(6, 182, 212, 0.04), transparent 35%),
    linear-gradient(135deg, var(--bpa-bg-primary) 0%, var(--bpa-bg-secondary) 50%, var(--bpa-bg-primary) 100%);
}

/* Gradient overrides for light theme */
[data-theme="light"] .bg-gradient-to-r.from-emerald-500.to-emerald-400,
[data-theme="light"] .from-emerald-500,
[data-theme="light"] .to-emerald-400 {
  background-image: linear-gradient(to right, var(--bpa-emerald-600), var(--bpa-emerald-500)) !important;
}

/* Text color overrides for JavaScript-set classes */
[data-theme="light"] .text-emerald-400 {
  color: var(--bpa-emerald-600) !important;
}

[data-theme="light"] .text-rose-400 {
  color: var(--bpa-rose-600) !important;
}

/* Gradient text for Apps link in navigation */
nav a[href*="/apps"],
nav a[href*="/best-privacy-apps"] {
  background: linear-gradient(135deg, #34d399 0%, #22d3ee 50%, #60a5fa 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 700;
  transition: all 0.3s ease;
}

nav a[href*="/apps"]:hover,
nav a[href*="/best-privacy-apps"]:hover {
  background: linear-gradient(135deg, #4ade80 0%, #38bdf8 50%, #818cf8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Active state for Apps link */
nav a[href*="/apps"][aria-current="page"],
nav a[href*="/best-privacy-apps"][aria-current="page"] {
  background: linear-gradient(135deg, #10b981 0%, #06b6d4 50%, #2563eb 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Gradient accent for all app names throughout the website */
.app-name,
.bpa-app-name,
h1 .app-name,
h2 .app-name,
h3 .app-name,
h4 .app-name {
  background: linear-gradient(135deg, #34d399 0%, #22d3ee 50%, #60a5fa 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 700;
}

/* App name links */
a .app-name,
a.app-name-link {
  background: linear-gradient(135deg, #34d399 0%, #22d3ee 50%, #60a5fa 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  transition: all 0.3s ease;
}

a:hover .app-name,
a.app-name-link:hover {
  background: linear-gradient(135deg, #4ade80 0%, #38bdf8 50%, #818cf8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.bpa-comparison-table th,
.bpa-comparison-table td {
  vertical-align: middle;
}

.bpa-comparison-top-pick {
  background: linear-gradient(90deg, rgba(34, 197, 94, 0.12), transparent);
  border-top: 2px solid rgba(34, 197, 94, 0.6);
  border-bottom: 2px solid rgba(34, 197, 94, 0.6);
}

/* App Card Redesign - Privacy-First UX */

/* Enhanced card hover effects (works with existing bpa-card:hover) */
.bpa-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3), 0 10px 10px -5px rgba(0, 0, 0, 0.2) !important;
}

/* Circular Privacy Score Progress Ring */
.privacy-score-ring-bg {
  stroke: rgba(51, 65, 85, 0.3);
}

.privacy-score-ring-progress {
  stroke-linecap: round;
  transition: stroke-dashoffset 0.6s ease-in-out;
}

.privacy-score-pulse {
  animation: privacy-pulse 2s ease-in-out infinite;
}

@keyframes privacy-pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.8;
  }
}

.bpa-card:hover .privacy-score-pulse {
  animation: privacy-pulse 1s ease-in-out infinite;
}

/* Trust badge styles */
.trust-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0.5rem;
  border-radius: 0.375rem;
  font-size: 0.75rem;
  font-weight: 500;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: rgb(110, 231, 183);
}

/* Focus states for accessibility */
.bpa-card:focus-within {
  outline: 2px solid rgba(16, 185, 129, 0.5);
  outline-offset: 2px;
}

.bpa-btn-primary:focus,
.bpa-btn-secondary:focus {
  outline: 2px solid rgba(16, 185, 129, 0.5);
  outline-offset: 2px;
}

/* Story-First Card Design Styles */
.app-card-privacy-bar {
  transition: width 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Serif font for app names in cards */
.app-name {
  font-family: "Merriweather", Georgia, serif;
}

/* Warm, approachable colors for beginner-friendly design */
.bg-orange-500 {
  background-color: #f97316;
}

/* Technical details toggle animation */
[data-technical-details-target="content"] {
  transition: opacity 0.3s ease, max-height 0.3s ease;
  max-height: 2000px;
  opacity: 1;
}

[data-technical-details-target="content"].hidden {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
}

/* Improved spacing for story-first cards */
.bpa-card-body {
  padding: 1.25rem 0;
}

.bpa-card-header {
  padding-bottom: 1rem;
}

/* Badge styling for UX badges */
.ux-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  font-size: 0.75rem;
  font-weight: 500;
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid rgba(51, 65, 85, 0.5);
  color: rgb(203, 213, 225);
}

/* Good for / Think twice list styling */
.ux-list-item {
  line-height: 1.6;
}

/* Progress bar animation */
.privacy-progress-bar {
  transition: width 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Circular progress indicator for app cards */
.circular-progress {
  width: 3rem; /* 48px on mobile */
  height: 3rem;
  flex-shrink: 0;
}

@media (min-width: 640px) {
  .circular-progress {
    width: 3.5rem; /* 56px on tablet+ */
    height: 3.5rem;
  }
}

.circular-progress .progress-ring-bg {
  opacity: 0.3;
}

.circular-progress .progress-ring {
  transition: stroke-dashoffset 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.circular-progress .score-number {
  font-weight: 700;
  user-select: none;
}

/* Mobile hero helpers */
@media (max-width: 640px) {
  .bpa-hero-pill {
    min-height: 64px;
  }
  .hero-quickstart-chip {
    min-height: 44px;
  }
  /* Hide or collapse floating chat/feedback on small screens to avoid overlap */
  .intercom-lightweight-app-launcher,
  .crisp-client,
  .canny-button,
  .feedback-widget,
  .feedback-bubble,
  .feedback-button,
  .floating-feedback {
    display: none !important;
  }
}

/* Privacy Board Styles */
@import "privacy_board.css";
