/* ===== DARK MODE TOGGLE BUTTON ===== */
.theme-toggle {
  background: none;
  border: 1.5px solid rgba(255,255,255,0.5);
  border-radius: 20px;
  color: rgba(255,255,255,0.9);
  cursor: pointer;
  padding: 0.35rem 0.7rem;
  font-size: 0.82rem;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  transition: all 0.2s;
  white-space: nowrap;
}
.theme-toggle:hover {
  background: rgba(255,255,255,0.15);
  border-color: rgba(255,255,255,0.8);
  transform: none;
  box-shadow: none;
}

/* ===== SITEWIDE HEADER STANDARDIZATION (matches index.html reference) ===== */
/* Light-mode gradient — single source of truth, local CSS no longer needed */
.site-header,
.header-top,
.header {
  background: linear-gradient(135deg, #14b8a6 0%, #0891b2 100%);
  color: white;
}
/* Uniform padding and layout */
.site-header,
.header-top,
.header {
  padding: 1rem 2rem !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  flex-wrap: nowrap !important;
  gap: 1rem !important;
}
/* Mobile: allow wrap and tighter spacing */
@media (max-width: 700px) {
  .site-header,
  .header-top,
  .header {
    flex-wrap: wrap !important;
    padding: 0.75rem 1rem !important;
  }
  .site-header-brand h1,
  .header-brand h1 {
    font-size: 1.3rem !important;
  }
  .site-nav a,
  .header-nav a {
    font-size: 0.8rem !important;
    padding: 0.3rem 0.5rem !important;
  }
}
/* Uniform brand container — flex-shrink:0 prevents brand from collapsing under flex-nowrap */
.site-header-brand,
.header-brand {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  flex-shrink: 0 !important;
  text-decoration: none !important;
}
/* Logo link — display:flex removes inline descender gap that shifts vertical alignment */
.site-header-brand > a,
.header-brand > a {
  display: flex !important;
  align-items: center !important;
  flex-shrink: 0 !important;
}
/* Uniform logo size */
.site-header-brand img,
.header-brand img,
.header img {
  height: 44px !important;
  width: 44px !important;
  display: block !important;
}
/* Uniform h1 color — some pages wrap in <a>, force same white as plain text */
.site-header-brand h1,
.site-header-brand h1 a,
.header-brand h1,
.header-brand h1 a,
.header h1,
.header h1 a {
  color: white !important;
  text-decoration: none !important;
}
/* Hide tagline under logo — index.html is the reference (no tagline in nav) */
.site-header-brand .tagline,
.header-brand .tagline,
.header-subtitle {
  display: none !important;
}
/* Uniform "AwardOptimizer" h1 size — index.html reference is 1.7rem */
.site-header-brand h1,
.header-brand h1,
.header h1 {
  font-size: 1.7rem !important;
  font-weight: 800 !important;
  margin: 0 !important;
  white-space: nowrap !important;
  line-height: 1 !important;
}

/* ===== SITEWIDE NAV STANDARDIZATION (matches index.html reference) ===== */
.site-nav,
.header-nav {
  display: flex !important;
  gap: 0.25rem !important;
  align-items: center !important;
}
.site-nav a,
.header-nav a {
  color: rgba(255, 255, 255, 0.85) !important;
  text-decoration: none !important;
  font-size: 0.95rem !important;
  font-weight: 500 !important;
  padding: 0.45rem 1rem !important;
  border-radius: 8px !important;
  transition: background 0.15s, color 0.15s !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  opacity: 1 !important;
  border-bottom: none !important;
}
.site-nav a:hover,
.site-nav a.active,
.header-nav a:hover,
.header-nav a.active {
  background: rgba(255, 255, 255, 0.2) !important;
  color: white !important;
}

/* ===== DARK MODE OVERRIDES ===== */
html[data-theme="dark"] body {
  background-color: #1a1a2e !important;
  color: #e0e0e0 !important;
}
html[data-theme="dark"] .site-header,
html[data-theme="dark"] .header-top,
html[data-theme="dark"] .header {
  background: #16213e !important;
  border-bottom: 1px solid #2a3a5c !important;
}

/* Hero sections — slightly lighter than nav to create visual separation */
html[data-theme="dark"] .page-hero,
html[data-theme="dark"] .blog-hero,
html[data-theme="dark"] .header-hero {
  background: #1a2744 !important;
}
/* Wave ::after — dark mode body color so curve blends into page */
html[data-theme="dark"] .blog-hero::after,
html[data-theme="dark"] .page-hero::after,
html[data-theme="dark"] .header-hero::after {
  background: #1a1a2e !important;
}
html[data-theme="dark"] .page-hero h2,
html[data-theme="dark"] .page-hero p,
html[data-theme="dark"] .blog-hero h2,
html[data-theme="dark"] .blog-hero p,
html[data-theme="dark"] .header-hero h2,
html[data-theme="dark"] .header-hero p {
  color: #e0e0e0 !important;
  opacity: 1 !important;
}
html[data-theme="dark"] .card {
  background: #16213e !important;
  box-shadow: 0 2px 12px rgba(0,0,0,0.3) !important;
}
html[data-theme="dark"] h1,
html[data-theme="dark"] h2,
html[data-theme="dark"] h3,
html[data-theme="dark"] h4 {
  color: #e0e0e0 !important;
}
/* Header brand h1 stays pure white in dark mode — overrides #e0e0e0 above */
html[data-theme="dark"] .site-header-brand h1,
html[data-theme="dark"] .site-header-brand h1 a,
html[data-theme="dark"] .header-brand h1,
html[data-theme="dark"] .header-brand h1 a,
html[data-theme="dark"] .header h1,
html[data-theme="dark"] .header h1 a {
  color: white !important;
}
html[data-theme="dark"] p {
  color: #c0c8d4 !important;
}
html[data-theme="dark"] label {
  color: #b0b8c4 !important;
}
html[data-theme="dark"] select,
html[data-theme="dark"] input {
  background-color: #1a1a2e !important;
  border-color: #2a3a5c !important;
  color: #e0e0e0 !important;
}
html[data-theme="dark"] a {
  color: #5cd6c8 !important;
}
html[data-theme="dark"] .site-header a,
html[data-theme="dark"] header a,
html[data-theme="dark"] .header a,
html[data-theme="dark"] .site-nav a,
html[data-theme="dark"] .header-nav a {
  color: white !important;
  text-shadow: 0 1px 3px rgba(0,0,0,0.4) !important;
}
html[data-theme="dark"] .site-nav a:hover,
html[data-theme="dark"] .site-nav a.active,
html[data-theme="dark"] .header-nav a:hover,
html[data-theme="dark"] .header-nav a.active {
  color: white !important;
  opacity: 1 !important;
}
html[data-theme="dark"] footer {
  background-color: #16213e !important;
  border-top-color: #2a3a5c !important;
  color: #8899aa !important;
}
html[data-theme="dark"] footer a {
  color: #5cd6c8 !important;
}
html[data-theme="dark"] table {
  color: #e0e0e0 !important;
}
html[data-theme="dark"] th {
  background-color: #16213e !important;
  color: #e0e0e0 !important;
  border-color: #2a3a5c !important;
}
html[data-theme="dark"] td {
  background-color: #1a1a2e !important;
  border-color: #2a3a5c !important;
  color: #d0d8e0 !important;
}
html[data-theme="dark"] .callout,
html[data-theme="dark"] blockquote {
  background: #1a2744 !important;
  border-color: #2a3a5c !important;
  color: #c0c8d4 !important;
}
html[data-theme="dark"] .cta-card {
  background: #16213e !important;
}
html[data-theme="dark"] .faq-answer {
  background: #1a2744 !important;
  color: #c0c8d4 !important;
}
html[data-theme="dark"] .hero-section,
html[data-theme="dark"] .blog-hero {
  background: linear-gradient(135deg, #0e8a7a 0%, #0b6a80 100%) !important;
}
/* Newsletter */
html[data-theme="dark"] .newsletter-section,
html[data-theme="dark"] div[style*="background:linear-gradient(135deg,#f0fdf9"] {
  background: #16213e !important;
  border-color: #2a3a5c !important;
}
/* Blog cards */
html[data-theme="dark"] .blog-card,
html[data-theme="dark"] .post-card {
  background: #16213e !important;
  box-shadow: 0 2px 12px rgba(0,0,0,0.3) !important;
  border: 1px solid #2a3a5c !important;
}
html[data-theme="dark"] .blog-card h3 a,
html[data-theme="dark"] .post-card h3 a {
  color: #e0e0e0 !important;
}
html[data-theme="dark"] .post-card-footer {
  border-top-color: #2a3a5c !important;
  color: #8899aa !important;
}
/* Result cards (index) */
html[data-theme="dark"] .result-card {
  background: #1a1a2e !important;
  border-color: #2a3a5c !important;
}
html[data-theme="dark"] .card-footer {
  background: #16213e !important;
  border-top-color: #2a3a5c !important;
}
html[data-theme="dark"] .search-mode-btn {
  color: #b0b8c4 !important;
  border-color: #2a3a5c !important;
}
html[data-theme="dark"] .search-mode-btn.active {
  background: #14b8a6 !important;
  color: white !important;
}
html[data-theme="dark"] .value-explainer {
  background: #1a2744 !important;
  border-color: #2a3a5c !important;
}
html[data-theme="dark"] .bonuses-strip {
  background: #16213e !important;
  border-color: #2a3a5c !important;
}
html[data-theme="dark"] .bonus-pill {
  background: #1a1a2e !important;
  border-color: #2a3a5c !important;
  color: #e0e0e0 !important;
}
html[data-theme="dark"] .my-points-panel {
  background: #1a1a2e !important;
  border-color: #2a3a5c !important;
}
html[data-theme="dark"] .points-clear-btn {
  border-color: #6c4444 !important;
  color: #e07070 !important;
}
/* Article meta */
html[data-theme="dark"] .article-meta {
  color: rgba(255,255,255,0.7) !important;
}
html[data-theme="dark"] .article-meta a {
  color: rgba(255,255,255,0.9) !important;
}

/* ===== CPP CALCULATOR PAGE ===== */
html[data-theme="dark"] .calculator {
  background: #16213e !important;
  box-shadow: 0 2px 12px rgba(0,0,0,0.3) !important;
}
html[data-theme="dark"] .calculator h2 {
  color: #e0e0e0 !important;
}
html[data-theme="dark"] .calculator label,
html[data-theme="dark"] .calculator .form-group label {
  color: #e0e0e0 !important;
}
/* CPP value guide table */
html[data-theme="dark"] .value-guide,
html[data-theme="dark"] .cpp-guide,
html[data-theme="dark"] .guide-table {
  background: #16213e !important;
  color: #e0e0e0 !important;
}
html[data-theme="dark"] .value-guide td,
html[data-theme="dark"] .value-guide th,
html[data-theme="dark"] .cpp-guide td,
html[data-theme="dark"] .cpp-guide th {
  color: #e0e0e0 !important;
  border-color: #2a3a5c !important;
}
html[data-theme="dark"] .result-display,
html[data-theme="dark"] .result {
  background: #1a2744 !important;
  border-color: #2a3a5c !important;
  border-left-color: #14b8a6 !important;
  color: #e0e0e0 !important;
}
html[data-theme="dark"] .result h3 {
  color: #b0b8c4 !important;
}
html[data-theme="dark"] .result .rating {
  color: #e0e0e0 !important;
}
html[data-theme="dark"] .result p {
  color: #c0c8d4 !important;
}
html[data-theme="dark"] .cpp-value {
  color: #5cd6c8 !important;
}
html[data-theme="dark"] .rating {
  color: #c0c8d4 !important;
}
/* Passengers control (index.html) */
html[data-theme="dark"] .passengers-control {
  background: #1a1a2e !important;
  border-color: #2a3a5c !important;
}
html[data-theme="dark"] .pax-label {
  color: #8899aa !important;
}
/* Calculator tables */
html[data-theme="dark"] .calculator table {
  background: #16213e !important;
  box-shadow: 0 1px 6px rgba(0,0,0,0.3) !important;
}
html[data-theme="dark"] .calculator th {
  background: #1a2744 !important;
  color: #b0b8c4 !important;
  border-bottom-color: #2a3a5c !important;
}
html[data-theme="dark"] .calculator td {
  background: #16213e !important;
  color: #e0e0e0 !important;
  border-bottom-color: #2a3a5c !important;
}
/* Keep rating badge colors readable — use double class for specificity */
html[data-theme="dark"] span.rating.excellent,
html[data-theme="dark"] .calculator span.rating.excellent {
  background: #d4edda !important;
  color: #155724 !important;
}
html[data-theme="dark"] span.rating.great,
html[data-theme="dark"] .calculator span.rating.great {
  background: #d1ecf1 !important;
  color: #0c5460 !important;
}
html[data-theme="dark"] span.rating.good,
html[data-theme="dark"] .calculator span.rating.good {
  background: #fff3cd !important;
  color: #856404 !important;
}
html[data-theme="dark"] span.rating.fair,
html[data-theme="dark"] .calculator span.rating.fair {
  background: #f8d7da !important;
  color: #721c24 !important;
}
html[data-theme="dark"] span.rating.poor,
html[data-theme="dark"] .calculator span.rating.poor {
  background: #e2e3e5 !important;
  color: #383d41 !important;
}
/* Blog CTA section — tone down in dark mode */
html[data-theme="dark"] .cta-section {
  background: linear-gradient(135deg, #0d7a6e 0%, #065a6e 100%) !important;
  box-shadow: 0 8px 32px rgba(0,0,0,0.3) !important;
}
html[data-theme="dark"] .btn-primary {
  background: rgba(255,255,255,0.15) !important;
  color: white !important;
  border: 1px solid rgba(255,255,255,0.3) !important;
}
html[data-theme="dark"] .btn-secondary {
  border-color: rgba(255,255,255,0.4) !important;
}
/* Tip box */
html[data-theme="dark"] .tip {
  background: #1a2744 !important;
  border-left-color: #f59e0b !important;
}
html[data-theme="dark"] .tip strong {
  color: #f59e0b !important;
}

/* ===== EXPLORE MAP PAGE ===== */
/* Controls bar */
html[data-theme="dark"] .controls {
  background: #16213e !important;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3) !important;
}
html[data-theme="dark"] .control-group {
  color: #e0e0e0 !important;
}
html[data-theme="dark"] .control-group label {
  color: #b0b8c4 !important;
}
html[data-theme="dark"] .control-group select {
  background: #1a1a2e !important;
  border-color: #2a3a5c !important;
  color: #e0e0e0 !important;
}
html[data-theme="dark"] #origin-input {
  background: #1a1a2e !important;
  border-color: #2a3a5c !important;
  color: #e0e0e0 !important;
}
html[data-theme="dark"] .origin-dropdown {
  background: #1a1a2e !important;
  border-color: #2a3a5c !important;
  color: #e0e0e0 !important;
}
html[data-theme="dark"] .origin-dropdown-item:hover {
  background: #2a3a5c !important;
}
/* Sidebar */
html[data-theme="dark"] .sidebar {
  background: #16213e !important;
  border-left-color: #2a3a5c !important;
}
html[data-theme="dark"] .sidebar-header {
  border-bottom-color: #2a3a5c !important;
}
html[data-theme="dark"] .sidebar-header h2 {
  color: #e0e0e0 !important;
}
html[data-theme="dark"] .sidebar-sort {
  color: #5cd6c8 !important;
}
html[data-theme="dark"] .dest-card {
  border-bottom-color: #2a3a5c !important;
}
html[data-theme="dark"] .dest-card:hover {
  background: #1a2744 !important;
}
html[data-theme="dark"] .dest-card.active {
  background: #1a2744 !important;
}
html[data-theme="dark"] .dest-card-city {
  color: #e0e0e0 !important;
}
html[data-theme="dark"] .dest-card-city .code {
  color: #8899aa !important;
}
html[data-theme="dark"] .dest-card-meta {
  color: #8899aa !important;
}
html[data-theme="dark"] .dest-card-miles {
  color: #e0e0e0 !important;
}
/* Sidebar toggle button */
html[data-theme="dark"] .sidebar-toggle {
  background: #16213e !important;
  color: #e0e0e0 !important;
  border-color: #2a3a5c !important;
}
/* Stats bar */
html[data-theme="dark"] .stats-bar {
  background: #16213e !important;
  border-color: #2a3a5c !important;
  color: #b0b8c4 !important;
}
/* Map popups */
html[data-theme="dark"] .leaflet-popup-content-wrapper {
  background: #16213e !important;
  color: #e0e0e0 !important;
}
html[data-theme="dark"] .leaflet-popup-tip {
  background: #16213e !important;
}
html[data-theme="dark"] .popup-table th {
  background: #1a2744 !important;
}
html[data-theme="dark"] .popup-table td {
  background: #16213e !important;
}

/* ===== GENERIC CATCH-ALLS ===== */
/* Any element with white background via inline styles */
html[data-theme="dark"] section {
  color: #e0e0e0 !important;
}
html[data-theme="dark"] li {
  color: #c0c8d4 !important;
}
html[data-theme="dark"] strong {
  color: #e0e0e0 !important;
}
html[data-theme="dark"] .container {
  color: #e0e0e0 !important;
}
/* Inline-styled newsletter boxes */
html[data-theme="dark"] div[style*="background:linear-gradient(135deg,#f0fdf9"],
html[data-theme="dark"] div[style*="background: linear-gradient(135deg, #f0fdf9"] {
  background: #16213e !important;
  border-color: #2a3a5c !important;
}
/* Transfer bonuses page */
html[data-theme="dark"] .bonus-card {
  background: #16213e !important;
  border-color: #2a3a5c !important;
}
html[data-theme="dark"] .filter-pill {
  background: #1a1a2e !important;
  border-color: #2a3a5c !important;
  color: #b0b8c4 !important;
}
html[data-theme="dark"] .filter-pill.active {
  background: #14b8a6 !important;
  color: white !important;
  border-color: #14b8a6 !important;
}
html[data-theme="dark"] .stats-bar {
  background: #16213e !important;
  border-color: #2a3a5c !important;
}
/* Best card offers */
html[data-theme="dark"] .offer-card {
  background: #16213e !important;
  border-color: #2a3a5c !important;
}
html[data-theme="dark"] .rank-badge {
  color: #e0e0e0 !important;
}
/* About page */
html[data-theme="dark"] .founder-card,
html[data-theme="dark"] .methodology-card,
html[data-theme="dark"] .stat-card {
  background: #16213e !important;
  border-color: #2a3a5c !important;
}
/* Contact page */
html[data-theme="dark"] .contact-card {
  background: #16213e !important;
  border-color: #2a3a5c !important;
}

/* ===== TARGETED CATCH-ALL: kill white backgrounds but preserve map markers ===== */
html[data-theme="dark"] section,
html[data-theme="dark"] main,
html[data-theme="dark"] article,
html[data-theme="dark"] aside,
html[data-theme="dark"] details,
html[data-theme="dark"] summary {
  background-color: transparent !important;
}
/* Preserve map marker backgrounds — do NOT make transparent */
html[data-theme="dark"] .price-marker.excellent {
  background: #d4edda !important;
  color: #0d6832 !important;
  border-color: #0d6832 !important;
}
html[data-theme="dark"] .price-marker.great {
  background: #e8f5e9 !important;
  color: #1a6b2a !important;
  border-color: #28a745 !important;
}
html[data-theme="dark"] .price-marker.good {
  background: #fff8e1 !important;
  color: #856404 !important;
  border-color: #e8a317 !important;
}
html[data-theme="dark"] .price-marker.fair {
  background: #fff3e0 !important;
  color: #a54200 !important;
  border-color: #e67e22 !important;
}
html[data-theme="dark"] .price-marker.poor {
  background: #f8d7da !important;
  color: #721c24 !important;
  border-color: #dc3545 !important;
}
html[data-theme="dark"] .marker-cluster {
  background: rgba(102, 126, 234, 0.25) !important;
}
html[data-theme="dark"] .marker-cluster div {
  background: linear-gradient(135deg, #14b8a6, #0891b2) !important;
  color: #fff !important;
}
/* Restore specific backgrounds we want */
html[data-theme="dark"] body {
  background-color: #1a1a2e !important;
}
html[data-theme="dark"] header {
  background: transparent !important;
}
html[data-theme="dark"] .hero-section,
html[data-theme="dark"] .blog-hero,
html[data-theme="dark"] .hero {
  background: linear-gradient(135deg, #0e8a7a 0%, #0b6a80 100%) !important;
}
html[data-theme="dark"] footer {
  background-color: #16213e !important;
}
html[data-theme="dark"] .card,
html[data-theme="dark"] .calculator,
html[data-theme="dark"] .blog-card,
html[data-theme="dark"] .offer-card,
html[data-theme="dark"] .bonus-card,
html[data-theme="dark"] .founder-card,
html[data-theme="dark"] .methodology-card,
html[data-theme="dark"] .stat-card,
html[data-theme="dark"] .contact-card,
html[data-theme="dark"] .cta-card,
html[data-theme="dark"] .result-card {
  background: #16213e !important;
}
html[data-theme="dark"] .callout,
html[data-theme="dark"] blockquote,
html[data-theme="dark"] .faq-answer,
html[data-theme="dark"] .value-explainer,
html[data-theme="dark"] .result-display {
  background: #1a2744 !important;
}
html[data-theme="dark"] .bonuses-strip,
html[data-theme="dark"] .my-points-panel,
html[data-theme="dark"] .stats-bar {
  background: #16213e !important;
}
/* Route landing page content areas */
html[data-theme="dark"] .content,
html[data-theme="dark"] .content-section,
html[data-theme="dark"] .main-content {
  background-color: transparent !important;
  color: #e0e0e0 !important;
}
/* Kill white on any element with inline white background */
html[data-theme="dark"] [style*="background: white"],
html[data-theme="dark"] [style*="background:white"],
html[data-theme="dark"] [style*="background: #fff"],
html[data-theme="dark"] [style*="background:#fff"],
html[data-theme="dark"] [style*="background-color: white"],
html[data-theme="dark"] [style*="background-color:white"],
html[data-theme="dark"] [style*="background-color: #fff"],
html[data-theme="dark"] [style*="background-color:#fff"],
html[data-theme="dark"] [style*="background: #ffffff"],
html[data-theme="dark"] [style*="background:#ffffff"],
html[data-theme="dark"] [style*="background-color: #ffffff"],
html[data-theme="dark"] [style*="background-color:#ffffff"] {
  background: #16213e !important;
}
/* Light gray backgrounds too */
html[data-theme="dark"] [style*="background: #f"],
html[data-theme="dark"] [style*="background:#f"],
html[data-theme="dark"] [style*="background-color: #f"],
html[data-theme="dark"] [style*="background-color:#f"] {
  background: #1a1a2e !important;
}
/* Blog: transfer bonus guide — math boxes & decision cards */
html[data-theme="dark"] .math-box {
  background: #0a1f2e !important;
  border-color: #14B8A6 !important;
}
html[data-theme="dark"] .math-box h4 {
  color: #2dd4bf !important;
}
html[data-theme="dark"] .math-row .label {
  color: #94a3b8 !important;
}
html[data-theme="dark"] .math-row .value {
  color: #e2e8f0 !important;
}
html[data-theme="dark"] .math-row.total,
html[data-theme="dark"] .math-row.total .value {
  color: #2dd4bf !important;
}
html[data-theme="dark"] .math-row {
  border-bottom-color: rgba(20, 184, 166, 0.15) !important;
}
html[data-theme="dark"] .decision-card.transfer-now {
  background: #052e16 !important;
  border-color: #166534 !important;
}
html[data-theme="dark"] .decision-card.wait {
  background: #1c1003 !important;
  border-color: #854d0e !important;
}
html[data-theme="dark"] .decision-card.transfer-now h4 { color: #4ade80 !important; }
html[data-theme="dark"] .decision-card.wait h4 { color: #fbbf24 !important; }
html[data-theme="dark"] .decision-card li { color: #94a3b8 !important; }
/* Blog: sweet spot cards (business class page) */
html[data-theme="dark"] .sweet-spot-card {
  background: #0d1b2a !important;
  border-color: #1e3a5f !important;
}
html[data-theme="dark"] .sweet-spot-card.legendary {
  background: #0d1b2a !important;
  border-color: #c2410c !important;
}
html[data-theme="dark"] .sweet-spot-card .miles-cost {
  color: #22d3ee !important;
}
html[data-theme="dark"] .sweet-spot-card .cpp-highlight {
  color: #34d399 !important;
}
html[data-theme="dark"] .sweet-spot-card p {
  color: #94a3b8 !important;
}
html[data-theme="dark"] .meta-tag {
  background: #1e3a5f !important;
  color: #93c5fd !important;
}
html[data-theme="dark"] .meta-tag.currency {
  background: #064e3b !important;
  color: #6ee7b7 !important;
}
/* Blog page: transfer partner tag chips */
html[data-theme="dark"] .transfer-tags span {
  background: #1e3a5f !important;
  color: #93c5fd !important;
  border-color: #2a4a7f !important;
}
html[data-theme="dark"] .transfer-tags .tag-label {
  color: #94a3b8 !important;
}
/* Blog page: "Best for" pill */
html[data-theme="dark"] .cc-card .best-for-tag {
  background: #064e3b !important;
  color: #6ee7b7 !important;
}
/* Blog page: callout boxes */
html[data-theme="dark"] .callout {
  background: #0d2137 !important;
  border-left-color: #14B8A6 !important;
}
html[data-theme="dark"] .callout p {
  color: #cbd5e1 !important;
}
html[data-theme="dark"] .callout strong {
  color: #34d399 !important;
}
html[data-theme="dark"] .callout.warning {
  background: #1c1208 !important;
  border-left-color: #f59e0b !important;
}
html[data-theme="dark"] .callout.warning strong {
  color: #fbbf24 !important;
}
/* Blog page: decision framework boxes */
html[data-theme="dark"] .decision-item {
  background: #0d1b2a !important;
}
html[data-theme="dark"] .decision-item .if-text {
  color: #64748b !important;
}
html[data-theme="dark"] .decision-item .condition {
  color: #e2e8f0 !important;
}
/* Blog page: TOC box */
html[data-theme="dark"] .toc {
  background: #0d1b2a !important;
  border-color: #1e3a5f !important;
}
html[data-theme="dark"] .toc .toc-title {
  color: #67e8f9 !important;
}
html[data-theme="dark"] .toc li,
html[data-theme="dark"] .toc li a {
  color: #7dd3fc !important;
}
html[data-theme="dark"] .toc li a:hover {
  color: #bae6fd !important;
}
/* Blog page: credit card deep-dive cards */
html[data-theme="dark"] .cc-card {
  background: #1a2744 !important;
  border-color: #2a3a5c !important;
}
html[data-theme="dark"] .cc-card.top-pick {
  background: #1a2744 !important;
  border-color: #f97316 !important;
}
html[data-theme="dark"] .cc-card h3 {
  color: #e2e8f0 !important;
}
html[data-theme="dark"] .cc-card .annual-fee {
  color: #94a3b8 !important;
}
html[data-theme="dark"] .stat-box {
  background: #0f1b2d !important;
}
html[data-theme="dark"] .stat-box .stat-label {
  color: #94a3b8 !important;
}
html[data-theme="dark"] .stat-box .stat-value {
  color: #e2e8f0 !important;
}
/* Blog: FAQ accordion */
html[data-theme="dark"] .faq-item {
  border-color: #1e3a5f !important;
}
html[data-theme="dark"] .faq-question,
html[data-theme="dark"] .faq-item .question {
  color: #e2e8f0 !important;
  background: transparent !important;
}
html[data-theme="dark"] .faq-answer,
html[data-theme="dark"] .faq-item .answer {
  color: #cbd5e1 !important;
  background: transparent !important;
}
/* Blog: comparison table header row */
html[data-theme="dark"] .comparison-table th {
  background: #0d1b2a !important;
  color: #94a3b8 !important;
  border-bottom-color: #1e3a5f !important;
}
html[data-theme="dark"] .comparison-table td {
  border-bottom-color: #1e2d45 !important;
  color: #cbd5e1 !important;
}
html[data-theme="dark"] .comparison-table td:first-child {
  color: #e2e8f0 !important;
}
html[data-theme="dark"] .comparison-table .fee-col {
  color: #93c5fd !important;
}
html[data-theme="dark"] .comparison-table tbody tr:hover td {
  background: #0d1b2a !important;
}
html[data-theme="dark"] .comparison-table th,
html[data-theme="dark"] .comparison-table td {
  border-bottom-color: #1e2d45 !important;
}
/* Explore page specific white areas */
html[data-theme="dark"] .map-container,
html[data-theme="dark"] .legend,
html[data-theme="dark"] .info-panel {
  background: #16213e !important;
  border-color: #2a3a5c !important;
  color: #e0e0e0 !important;
}
/* Form group labels on all pages */
html[data-theme="dark"] .form-group label,
html[data-theme="dark"] .form-group span {
  color: #b0b8c4 !important;
}
/* All remaining text that might be dark */
html[data-theme="dark"] span {
  color: inherit;
}
html[data-theme="dark"] small {
  color: #8899aa !important;
}

/* ===== BLOG PAGE DARK MODE OVERRIDES ===== */

/* TOC box */
html[data-theme="dark"] .toc {
  background: #16213e !important;
  border-color: #2a3a5c !important;
}
html[data-theme="dark"] .toc .toc-title {
  color: #5cd6c8 !important;
}
html[data-theme="dark"] .toc li,
html[data-theme="dark"] .toc li a {
  color: #a0c8c4 !important;
}

/* Stat boxes (credit card stats grid) */
html[data-theme="dark"] .stat-box {
  background: #1a2744 !important;
}
html[data-theme="dark"] .stat-box .stat-label {
  color: #8899aa !important;
}

/* Credit card deep-dive cards */
html[data-theme="dark"] .cc-card {
  border-color: #2a3a5c !important;
  background: #16213e !important;
}
html[data-theme="dark"] .cc-card.top-pick {
  background: linear-gradient(135deg, #1e2a44 0%, #16213e 100%) !important;
  border-color: #fd7e14 !important;
}
html[data-theme="dark"] .cc-card h3 {
  color: #e0e0e0 !important;
}
html[data-theme="dark"] .cc-card .annual-fee,
html[data-theme="dark"] .cc-card .transfer-tags .tag-label {
  color: #8899aa !important;
}
html[data-theme="dark"] .cc-card p,
html[data-theme="dark"] .cc-card li {
  color: #c0c8d4 !important;
}

/* Best-for tag (green pill badge) */
html[data-theme="dark"] .best-for-tag {
  background: #0d3321 !important;
  color: #5cd6c8 !important;
}

/* Transfer partner tags */
html[data-theme="dark"] .transfer-tags span {
  background: #1a2744 !important;
  color: #b0c8d4 !important;
}

/* Comparison table */
html[data-theme="dark"] .table-wrapper {
  border-color: #2a3a5c !important;
}
html[data-theme="dark"] .comparison-table tbody tr:hover {
  background-color: #1a2744 !important;
}
html[data-theme="dark"] .comparison-table th {
  background: #16213e !important;
  color: #c0d0e0 !important;
  border-color: #2a3a5c !important;
}
html[data-theme="dark"] .comparison-table td {
  border-color: #2a3a5c !important;
}
html[data-theme="dark"] .comparison-table .fee-col {
  color: #c0c8d4 !important;
}
html[data-theme="dark"] .comparison-table td:first-child {
  color: #e0e0e0 !important;
}

/* Decision grid (credit cards page) */
html[data-theme="dark"] .decision-item {
  background: #16213e !important;
}
html[data-theme="dark"] .decision-item .if-text {
  color: #8899aa !important;
}
html[data-theme="dark"] .decision-item .condition {
  color: #e0e0e0 !important;
}

/* FAQ items */
html[data-theme="dark"] .faq-item {
  border-bottom-color: #2a3a5c !important;
}
html[data-theme="dark"] .faq-item .question {
  color: #e0e0e0 !important;
}
html[data-theme="dark"] .faq-item .answer {
  color: #c0c8d4 !important;
}

/* Callout warning variant */
html[data-theme="dark"] .callout.warning {
  background: #2a1f10 !important;
  border-color: #f59e0b !important;
}
html[data-theme="dark"] .callout.warning strong {
  color: #fbbf24 !important;
}
html[data-theme="dark"] .callout p,
html[data-theme="dark"] .callout strong {
  color: #c0c8d4 !important;
}

/* Sweet spot cards (best-miles-for-business-class.html) */
html[data-theme="dark"] .sweet-spot-card {
  background: #16213e !important;
  border-color: #2a3a5c !important;
}
html[data-theme="dark"] .sweet-spot-card.legendary {
  background: linear-gradient(135deg, #1e2744 0%, #16213e 100%) !important;
}
html[data-theme="dark"] .sweet-spot-card h4 {
  color: #e0e0e0 !important;
}
html[data-theme="dark"] .sweet-spot-card .miles-cost {
  color: #5cd6c8 !important;
}
html[data-theme="dark"] .sweet-spot-card .meta-row,
html[data-theme="dark"] .sweet-spot-card p {
  color: #8899aa !important;
}
html[data-theme="dark"] .sweet-spot-card .cpp-highlight {
  color: #a7f3d0 !important;
}

/* Bonus cards (transfer-bonus-guide.html) */
html[data-theme="dark"] .bonus-card {
  background: #16213e !important;
  border-color: #2a3a5c !important;
}
html[data-theme="dark"] .bonus-card.active {
  background: linear-gradient(135deg, #0d2e1e 0%, #16213e 100%) !important;
  border-color: #14B8A6 !important;
}
html[data-theme="dark"] .bonus-card.historical {
  background: #1a2744 !important;
  opacity: 0.8;
}
html[data-theme="dark"] .bonus-card h4 {
  color: #e0e0e0 !important;
}
html[data-theme="dark"] .bonus-card .bonus-amount {
  color: #5cd6c8 !important;
}
html[data-theme="dark"] .bonus-card .bonus-meta,
html[data-theme="dark"] .bonus-card p {
  color: #8899aa !important;
}

/* Card h3 text (generic cards on blog pages) */
html[data-theme="dark"] .card h3 {
  color: #c0d0e0 !important;
}
html[data-theme="dark"] .card p,
html[data-theme="dark"] .card li {
  color: #c0c8d4 !important;
}

/* ===== DESTINATIONS PAGE ===== */

/* Destination cards (link cards on destinations.html) */
html[data-theme="dark"] a.dest-card {
  background: #16213e !important;
  border-top-color: #14b8a6 !important;
  box-shadow: 0 2px 12px rgba(0,0,0,0.3) !important;
}
html[data-theme="dark"] a.dest-card:hover {
  background: #1a2744 !important;
  box-shadow: 0 6px 24px rgba(0,0,0,0.4) !important;
}
html[data-theme="dark"] a.dest-card h2 {
  color: #e2e8f0 !important;
}
html[data-theme="dark"] a.dest-card .airports {
  color: #8899aa !important;
}
html[data-theme="dark"] a.dest-card .best-deal {
  background: #1a2744 !important;
}
html[data-theme="dark"] a.dest-card .best-deal strong {
  color: #5cd6c8 !important;
}
html[data-theme="dark"] a.dest-card .programs {
  color: #8899aa !important;
}
html[data-theme="dark"] a.dest-card .cta {
  color: #5cd6c8 !important;
}

/* Coming soon placeholder cards */
html[data-theme="dark"] .coming-soon-card {
  background: #111827 !important;
  border-top-color: #374151 !important;
}
html[data-theme="dark"] .coming-soon-card h2 {
  color: #4b5563 !important;
}
html[data-theme="dark"] .coming-soon-card .airports {
  color: #4b5563 !important;
}
html[data-theme="dark"] .coming-soon-card .badge {
  background: #1f2937 !important;
  color: #6b7280 !important;
}

/* Section labels */
html[data-theme="dark"] .section-label {
  color: #8899aa !important;
  border-bottom-color: #2a3a5c !important;
}

/* ===== CONTENT PAGE ELEMENTS (route landing pages, Asia, Japan, etc.) ===== */

/* Stat callout box */
html[data-theme="dark"] .stat-callout {
  background: #0d2137 !important;
  border-left-color: #3b82f6 !important;
  color: #cbd5e1 !important;
}
html[data-theme="dark"] .stat-callout strong {
  color: #60a5fa !important;
}
html[data-theme="dark"] .citation-note {
  color: #64748b !important;
}

/* CPP comparison table (inline data tables on content pages) */
html[data-theme="dark"] .cpp-comparison-table th {
  background: #16213e !important;
  color: #8899aa !important;
  border-bottom-color: #2a3a5c !important;
}
html[data-theme="dark"] .cpp-comparison-table td {
  color: #cbd5e1 !important;
  border-bottom-color: #1e2d45 !important;
}
html[data-theme="dark"] .cpp-comparison-table td:last-child {
  color: #5cd6c8 !important;
}
html[data-theme="dark"] .cpp-comparison-table caption {
  color: #c0d0e0 !important;
}
html[data-theme="dark"] .cpp-comparison-table tbody tr:hover td {
  background: #1a2744 !important;
}

/* Best value / second best row highlights */
html[data-theme="dark"] .best-value {
  background-color: #052e16 !important;
  border-left-color: #16a34a !important;
}
html[data-theme="dark"] .second-best {
  background-color: #1c1003 !important;
  border-left-color: #ca8a04 !important;
}

/* Tip box */
html[data-theme="dark"] .tip-box {
  background: #0d2137 !important;
  border-left-color: #0891b2 !important;
  color: #a7d8d0 !important;
}
html[data-theme="dark"] .tip-box strong {
  color: #5cd6c8 !important;
}

/* Warning box */
html[data-theme="dark"] .warning-box {
  background: #2a1f10 !important;
  border-left-color: #f59e0b !important;
  color: #fcd34d !important;
}
html[data-theme="dark"] .warning-box strong {
  color: #fbbf24 !important;
}

/* Destination breakdown cards (on Asia page) */
html[data-theme="dark"] .destination-card {
  background: #16213e !important;
  border-top-color: #14b8a6 !important;
}
html[data-theme="dark"] .destination-card .dest-name {
  color: #5cd6c8 !important;
}
html[data-theme="dark"] .destination-card .dest-code {
  color: #64748b !important;
}
html[data-theme="dark"] .destination-card .dest-best {
  color: #c0c8d4 !important;
}

/* Byline */
html[data-theme="dark"] .byline {
  color: #64748b !important;
  border-bottom-color: #2a3a5c !important;
}
html[data-theme="dark"] .byline a {
  color: #60a5fa !important;
}

/* FAQ item text on content pages (h3 and p used directly) */
html[data-theme="dark"] .faq-item h3 {
  color: #e2e8f0 !important;
}
html[data-theme="dark"] .faq-item p {
  color: #c0c8d4 !important;
}

/* Value badges */
html[data-theme="dark"] .value-badge {
  opacity: 0.9;
}

/* Miles cell teal — keep bright */
html[data-theme="dark"] .miles-cell {
  color: #5cd6c8 !important;
}

/* Transfer tags on comparison tables */
html[data-theme="dark"] .transfer-tags .tag {
  background: #1e3a5f !important;
  color: #93c5fd !important;
}

/* CTA card — keep gradient but darken slightly */
html[data-theme="dark"] .cta-card {
  background: linear-gradient(135deg, #0d7a6e 0%, #065a6e 100%) !important;
}

/* "More from" footer links */
html[data-theme="dark"] [style*="color:#555"] {
  color: #8899aa !important;
}

/* Transfer partner chips + expand button — cards page */
html[data-theme="dark"] .tp-chip {
  background: #1e2d40 !important;
  color: #94b8d0 !important;
}
html[data-theme="dark"] .partner-more {
  color: #5cd6c8 !important;
}

/* Explore sidebar newbie hint — dark mode */
html[data-theme="dark"] .sidebar-hint {
  background: #0d2e28 !important;
  border-color: #134e4a !important;
  color: #5eead4 !important;
}
html[data-theme="dark"] .sidebar-hint strong { color: #99f6e4 !important; }
html[data-theme="dark"] .dest-card-program-tip { border-color: #475569 !important; }

/* =====================================================
   SITE FOOTER — five-column nav + bottom bar
   Always dark (regardless of light/dark theme toggle)
   ===================================================== */
.site-footer {
  background: #0f172a;
  color: #cbd5e1;
  padding: 3.5rem 2rem 0;
  margin-top: 4rem;
}
.footer-inner {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 2rem 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid #1e293b;
}
.footer-col h4 {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #475569;
  margin: 0 0 1rem;
}
.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
.footer-col ul li a {
  color: #94a3b8;
  text-decoration: none;
  font-size: 0.85rem;
  line-height: 1.4;
  transition: color 0.15s;
}
.footer-col ul li a:hover {
  color: #5eead4;
}
/* Bottom bar — email teaser + copyright */
.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.25rem 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.footer-bonus-teaser {
  font-size: 0.82rem;
  color: #64748b;
}
.footer-bonus-teaser a {
  color: #5eead4;
  text-decoration: none;
  font-weight: 600;
}
.footer-bonus-teaser a:hover {
  text-decoration: underline;
}
.footer-copy {
  font-size: 0.75rem;
  color: #334155;
  text-align: right;
  flex: 1;
  min-width: 0;
}
/* Tablet: 3 cols */
@media (max-width: 900px) {
  .footer-inner {
    grid-template-columns: repeat(3, 1fr);
  }
}
/* Mobile: 2 cols, Legal spans full */
@media (max-width: 560px) {
  .footer-inner {
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem 1rem;
  }
  .footer-col.footer-col-legal {
    grid-column: 1 / -1;
  }
  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
  .footer-copy {
    text-align: left;
  }
}
