/* ==========================================================================
   TAWSEEL SA — DIRECTION A: WISE + PRODUCT HUNT + CARDPOINTERS DESIGN SYSTEM
   Daylight Editorial & Consumer Fintech Default + Crisp Dark Mode Toggle
   ========================================================================== */

:root,
html[data-theme="light"] {
  --bg-base: #F8FAF7;
  --bg-surface: #FFFFFF;
  --bg-elevated: #F1F5F0;
  --bg-subtle: #EBF1E9;
  --bg-card-hover: #F4F8F2;
  --bg-glass: rgba(248, 250, 247, 0.88);
  --bg-footer: #0E1F14;

  --border-subtle: rgba(14, 31, 20, 0.08);
  --border-medium: rgba(14, 31, 20, 0.14);
  --border-strong: rgba(22, 163, 74, 0.32);
  --border-gold: rgba(217, 119, 6, 0.35);

  --text-primary: #0E1F14;
  --text-secondary: #3D5245;
  --text-muted: #647A6C;
  --text-on-dark: #F8FAF7;

  /* Wise Bright Lime-Emerald & Forest Accents */
  --wise-forest: #0E1F14;
  --wise-lime: #9FE870;
  --wise-lime-hover: #8ee05a;
  --wise-lime-soft: rgba(159, 232, 112, 0.25);

  --accent-emerald: #16A34A;
  --accent-emerald-bright: #15803D;
  --accent-emerald-soft: rgba(22, 163, 74, 0.10);
  --accent-emerald-pill: #DCFCE7;
  --accent-emerald-pill-text: #14532D;

  --accent-gold: #D97706;
  --accent-gold-bright: #B45309;
  --accent-gold-soft: rgba(245, 158, 11, 0.14);
  --accent-gold-pill: #FEF3C7;
  --accent-gold-pill-text: #92400E;

  --danger-soft: rgba(220, 38, 38, 0.10);
  --danger-text: #B91C1C;
  --danger-border: rgba(220, 38, 38, 0.28);

  --radius-2xl: 24px;
  --radius-xl: 20px;
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --radius-pill: 999px;

  --shadow-xs: 0 1px 2px rgba(14, 31, 20, 0.04);
  --shadow-card: 0 1px 3px rgba(14, 31, 20, 0.05), 0 10px 28px -8px rgba(14, 31, 20, 0.07);
  --shadow-card-hover: 0 4px 12px rgba(14, 31, 20, 0.07), 0 18px 36px -10px rgba(14, 31, 20, 0.11);
  --shadow-widget: 0 4px 6px -1px rgba(14, 31, 20, 0.05), 0 24px 48px -12px rgba(14, 31, 20, 0.12);
  --shadow-emerald: 0 10px 26px -6px rgba(22, 163, 74, 0.18);

  --font-sans: 'IBM Plex Sans Arabic', 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

html[data-theme="dark"] {
  --bg-base: #07120C;
  --bg-surface: #0D1E15;
  --bg-elevated: #132A1E;
  --bg-subtle: #183526;
  --bg-card-hover: #173324;
  --bg-glass: rgba(7, 18, 12, 0.86);
  --bg-footer: #040B07;

  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-medium: rgba(255, 255, 255, 0.14);
  --border-strong: rgba(159, 232, 112, 0.34);
  --border-gold: rgba(251, 191, 36, 0.38);

  --text-primary: #F3F7F4;
  --text-secondary: #A9C2B3;
  --text-muted: #708E7D;
  --text-on-dark: #F8FAF7;

  --wise-forest: #9FE870;
  --wise-lime: #9FE870;
  --wise-lime-hover: #B1F087;
  --wise-lime-soft: rgba(159, 232, 112, 0.16);

  --accent-emerald: #22C55E;
  --accent-emerald-bright: #9FE870;
  --accent-emerald-soft: rgba(34, 197, 94, 0.15);
  --accent-emerald-pill: rgba(159, 232, 112, 0.16);
  --accent-emerald-pill-text: #9FE870;

  --accent-gold: #F59E0B;
  --accent-gold-bright: #FBBF24;
  --accent-gold-soft: rgba(245, 158, 11, 0.16);
  --accent-gold-pill: rgba(245, 158, 11, 0.18);
  --accent-gold-pill-text: #FCD34D;

  --danger-soft: rgba(239, 68, 68, 0.16);
  --danger-text: #FCA5A5;
  --danger-border: rgba(239, 68, 68, 0.35);

  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-card: 0 14px 32px -10px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  --shadow-card-hover: 0 18px 38px -10px rgba(0, 0, 0, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  --shadow-widget: 0 24px 50px -12px rgba(0, 0, 0, 0.72), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  --shadow-emerald: 0 12px 30px -8px rgba(159, 232, 112, 0.18);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
  background-color: var(--bg-base);
  color: var(--text-primary);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  min-height: 100dvh;
  background-color: var(--bg-base);
  background-image:
    radial-gradient(circle at 86% 4%, rgba(159, 232, 112, 0.18), transparent 34%),
    radial-gradient(circle at 12% 14%, rgba(22, 163, 74, 0.06), transparent 32%);
  color: var(--text-primary);
  line-height: 1.6;
  padding-bottom: calc(78px + env(safe-area-inset-bottom, 0px));
  overflow-x: hidden;
  transition: background-color 0.2s ease, color 0.2s ease;
}

@media (min-width: 960px) {
  body {
    padding-bottom: 0;
  }
}

.tabular {
  font-variant-numeric: tabular-nums;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select {
  font: inherit;
  color: inherit;
}

/* Skip Link */
.skip-link {
  position: absolute;
  top: -100px;
  inset-inline-start: 16px;
  z-index: 200;
  background: var(--wise-lime);
  color: #0E1F14;
  font-weight: 700;
  padding: 10px 18px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
}

.skip-link:focus {
  top: 12px;
}

/* Layout Container */
.container {
  width: 100%;
  max-width: 1280px;
  margin-inline: auto;
  padding-inline: 16px;
}

@media (min-width: 640px) {
  .container {
    padding-inline: 24px;
  }
}

/* ==========================================================================
   STICKY TOP HEADER (MOBILE-FIRST NATIVE BAR)
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 90;
  height: 60px;
  background: var(--bg-glass);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border-bottom: 1px solid var(--border-subtle);
}

@media (min-width: 768px) {
  .site-header {
    height: 70px;
  }
}

.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

@media (min-width: 640px) {
  .header-inner {
    gap: 12px;
  }
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

@media (min-width: 640px) {
  .brand-link {
    gap: 11px;
  }
}

.brand-logo {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(14, 31, 20, 0.12);
  border: 1px solid var(--border-subtle);
}

@media (min-width: 640px) {
  .brand-logo {
    width: 40px;
    height: 40px;
    border-radius: 11px;
  }
}

.brand-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.brand-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand-name {
  font-weight: 800;
  font-size: 0.98rem;
  letter-spacing: -0.015em;
  white-space: nowrap;
  color: var(--text-primary);
}

@media (min-width: 640px) {
  .brand-name {
    font-size: 1.05rem;
    font-weight: 700;
  }
}

.brand-tag {
  display: none;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  background: var(--wise-lime);
  color: #0E1F14;
  letter-spacing: 0.04em;
}

@media (min-width: 640px) {
  .brand-tag {
    display: inline-block;
  }
}

.brand-subtitle {
  display: none;
  font-size: 0.74rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (min-width: 640px) {
  .brand-subtitle {
    display: block;
  }
}

.desktop-nav {
  display: none;
  align-items: center;
  gap: 4px;
  background: var(--bg-elevated);
  padding: 4px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-subtle);
}

@media (min-width: 992px) {
  .desktop-nav {
    display: flex;
  }
}

.nav-link {
  padding: 6px 13px;
  border-radius: var(--radius-pill);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  transition: color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
  white-space: nowrap;
}

.nav-link:hover,
.nav-link:focus-visible {
  color: var(--text-primary);
  background: var(--bg-surface);
  box-shadow: var(--shadow-xs);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

@media (min-width: 640px) {
  .header-actions {
    gap: 8px;
  }
}

.header-actions .btn-sm {
  min-height: 36px;
  padding: 6px 10px;
  gap: 5px;
}

@media (min-width: 640px) {
  .header-actions .btn-sm {
    padding: 6px 13px;
    gap: 7px;
  }
}

/* Theme toggle icon visibility */
html[data-theme="light"] .theme-icon-sun {
  display: none;
}
html[data-theme="light"] .theme-icon-moon {
  display: inline-block;
}
html[data-theme="dark"] .theme-icon-moon {
  display: none;
}
html[data-theme="dark"] .theme-icon-sun {
  display: inline-block;
}

.theme-btn-label {
  display: none;
}
@media (min-width: 640px) {
  .theme-btn-label {
    display: inline;
  }
}

/* ==========================================================================
   BUTTONS
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 18px;
  border-radius: var(--radius-pill);
  font-weight: 700;
  font-size: 0.9rem;
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.14s ease, background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.btn:active {
  transform: scale(0.97);
}

.btn-sm {
  min-height: 36px;
  padding: 6px 13px;
  font-size: 0.8rem;
  border-radius: var(--radius-pill);
}

.btn-primary {
  background: #0E1F14;
  color: #9FE870;
  border-color: #0E1F14;
  box-shadow: 0 4px 14px rgba(14, 31, 20, 0.16);
}

html[data-theme="dark"] .btn-primary {
  background: #9FE870;
  color: #0E1F14;
  border-color: #9FE870;
}

.btn-primary:hover {
  background: #163020;
  transform: translateY(-1px);
}

html[data-theme="dark"] .btn-primary:hover {
  background: #b0f285;
}

.btn-secondary {
  background: var(--bg-surface);
  color: var(--text-primary);
  border-color: var(--border-medium);
  box-shadow: var(--shadow-xs);
}

.btn-secondary:hover {
  background: var(--bg-elevated);
  border-color: var(--accent-emerald);
}

.btn-outline {
  background: var(--bg-surface);
  color: var(--text-primary);
  border-color: var(--border-medium);
  box-shadow: var(--shadow-xs);
}

.btn-outline:hover {
  background: var(--bg-elevated);
  border-color: var(--text-secondary);
}

.btn-ghost {
  background: var(--accent-emerald-pill);
  color: var(--accent-emerald-pill-text);
  border-color: var(--border-strong);
}

.btn-ghost:hover {
  opacity: 0.92;
}

.install-btn span {
  display: none;
}

@media (min-width: 640px) {
  .install-btn span {
    display: inline;
  }
}

.icon {
  flex-shrink: 0;
}

/* ==========================================================================
   HERO + WISE-STYLE INSTANT COMPARISON WIDGET ABOVE THE FOLD
   ========================================================================== */
.hero-section {
  padding-top: 16px;
  padding-bottom: 24px;
}

@media (min-width: 960px) {
  .hero-section {
    padding-top: 40px;
    padding-bottom: 48px;
  }
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

@media (min-width: 1024px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1.04fr) minmax(0, 0.96fr);
    gap: 36px;
  }
}

.hero-copy-col,
.hero-spotlight-col {
  min-width: 0;
  max-width: 100%;
}

.live-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  background: var(--bg-surface);
  border: 1px solid var(--border-medium);
  box-shadow: var(--shadow-xs);
  font-size: 0.72rem;
  color: var(--accent-emerald-bright);
  font-weight: 600;
  margin-bottom: 10px;
}

.live-status-pill #liveStatusText {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (min-width: 640px) {
  .live-status-pill {
    padding: 6px 14px;
    font-size: 0.78rem;
    margin-bottom: 16px;
  }
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #16A34A;
  flex-shrink: 0;
  box-shadow: 0 0 0 4px rgba(22, 163, 74, 0.2);
  animation: pulseDot 2.2s infinite ease-in-out;
}

@keyframes pulseDot {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.25);
    opacity: 0.65;
  }
}

.hero-headline {
  font-size: clamp(1.45rem, 5.4vw, 2.75rem);
  font-weight: 800;
  line-height: 1.22;
  letter-spacing: -0.025em;
  text-wrap: balance;
  margin-bottom: 10px;
  color: var(--text-primary);
}

@media (min-width: 640px) {
  .hero-headline {
    line-height: 1.18;
    margin-bottom: 14px;
  }
}

.hero-subtext {
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--text-secondary);
  max-width: 60ch;
  text-wrap: pretty;
  margin-bottom: 14px;
}

@media (min-width: 640px) {
  .hero-subtext {
    font-size: 1.02rem;
    margin-bottom: 22px;
  }
}

.hero-cta-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.hero-cta-row .btn {
  min-height: 40px;
  padding: 8px 10px;
  font-size: 0.8rem;
  gap: 6px;
  width: 100%;
}

@media (min-width: 640px) {
  .hero-cta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
  }
  .hero-cta-row .btn {
    width: auto;
    min-height: 44px;
    padding: 10px 18px;
    font-size: 0.9rem;
    gap: 8px;
  }
}

/* Compact Single-Row Hero Quick-Facts Bar */
.hero-quick-facts {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  gap: 8px;
  margin-top: 12px;
  padding-bottom: 2px;
  max-width: 100%;
}

.hero-quick-facts::-webkit-scrollbar {
  display: none;
}

@media (min-width: 640px) {
  .hero-quick-facts {
    flex-wrap: wrap;
    overflow-x: visible;
    margin-top: 18px;
  }
}

.quick-fact-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  padding: 5px 11px;
  border-radius: var(--radius-pill);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-xs);
  font-size: 0.75rem;
  line-height: 1.2;
}

.quick-fact-pill strong {
  font-weight: 800;
  color: var(--text-primary);
}

.quick-fact-pill small {
  font-size: 0.68rem;
  color: var(--text-muted);
  font-weight: 600;
}

/* Scenario Pills Panel (Unified inside Wise Hero Widget) */
.finder-panel {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 10px 12px;
  margin-bottom: 10px;
  min-width: 0;
  max-width: 100%;
}

.finder-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 8px;
}

.finder-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-primary);
}

.finder-hint {
  font-size: 0.68rem;
  color: var(--accent-emerald-pill-text);
  background: var(--accent-emerald-pill);
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  font-weight: 700;
}

.scenario-pills {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  gap: 7px;
  padding-bottom: 2px;
  max-width: 100%;
}

.scenario-pills::-webkit-scrollbar {
  display: none;
}

@media (min-width: 768px) {
  .scenario-pills {
    flex-wrap: wrap;
    overflow-x: visible;
  }
}

.scenario-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  min-height: 34px;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.14s ease, background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.scen-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.45;
}

.scenario-pill:hover {
  color: var(--text-primary);
  border-color: var(--border-medium);
  background: var(--bg-card-hover);
}

.scenario-pill:active {
  transform: scale(0.96);
}

.scenario-pill.active {
  background: #0E1F14;
  color: #9FE870;
  border-color: #0E1F14;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(14, 31, 20, 0.14);
}

html[data-theme="dark"] .scenario-pill.active {
  background: #9FE870;
  color: #0E1F14;
  border-color: #9FE870;
}

.scenario-pill.active .scen-dot {
  opacity: 1;
  background: #9FE870;
}

html[data-theme="dark"] .scenario-pill.active .scen-dot {
  background: #0E1F14;
}

/* Wise-Style Hero Comparison Widget */
.wise-hero-widget {
  background: var(--bg-surface);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-xl);
  padding: 15px 14px;
  box-shadow: var(--shadow-widget);
  position: relative;
  overflow: hidden;
  min-width: 0;
  max-width: 100%;
}

@media (min-width: 640px) {
  .wise-hero-widget {
    border-radius: var(--radius-2xl);
    padding: 20px;
  }
}

.wise-hero-widget::before {
  content: '';
  position: absolute;
  top: 0;
  inset-inline: 0;
  height: 5px;
  background: linear-gradient(90deg, #16A34A, #9FE870, #16A34A);
}

.wise-widget-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
  padding-top: 4px;
}

.wise-widget-kicker {
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--accent-emerald);
  margin-bottom: 2px;
}

.wise-widget-title {
  font-size: 1.02rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.25;
}

@media (min-width: 640px) {
  .wise-widget-title {
    font-size: 1.15rem;
  }
}

.wise-live-chip {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  background: #9FE870;
  color: #0E1F14;
  letter-spacing: 0.04em;
  flex-shrink: 0;
}

.wise-quick-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 10px 12px;
  margin-bottom: 12px;
  min-width: 0;
}

.wise-sliders-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
}

.wise-select-plan-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
}

@media (min-width: 560px) {
  .wise-sliders-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
  .wise-select-plan-grid {
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.95fr);
    gap: 12px;
    align-items: end;
  }
}

.calc-pill-group.calc-pill-group-compact {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 6px;
}

.calc-pill-group-compact .calc-option-pill {
  min-height: 36px;
  padding: 5px 8px;
  font-size: 0.75rem;
  white-space: nowrap;
}

.wise-control-row {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.wise-control-label-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.wise-control-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.wise-control-val {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-primary);
  background: var(--bg-surface);
  padding: 2px 9px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-subtle);
}

/* Persistent Visitor Preferences Status Row */
.saved-prefs-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 8px;
  margin-top: 2px;
  border-top: 1px dashed var(--border-medium);
  font-size: 0.75rem;
}

.saved-prefs-bar[hidden] {
  display: none !important;
}

.saved-prefs-status {
  color: var(--accent-emerald-bright);
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.btn-reset-prefs {
  background: var(--bg-surface);
  color: var(--text-secondary);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-pill);
  padding: 3px 10px;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.btn-reset-prefs:hover {
  color: var(--text-primary);
  border-color: var(--accent-emerald);
  background: var(--bg-card-hover);
}

/* Spotlight Recommendation Card inside Wise Widget */
.spotlight-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-xl);
  padding: 13px 12px;
  box-shadow: var(--shadow-emerald);
  position: relative;
  min-width: 0;
}

@media (min-width: 640px) {
  .spotlight-card {
    padding: 16px;
  }
}

.spotlight-top-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 10px;
}

.spotlight-savings-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: #9FE870;
  color: #0E1F14;
  font-size: 0.75rem;
  font-weight: 800;
  max-width: 100%;
  box-shadow: 0 2px 8px rgba(159, 232, 112, 0.35);
}

.spotlight-rank-chip {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--accent-emerald-pill-text);
  background: var(--accent-emerald-pill);
  padding: 3px 9px;
  border-radius: var(--radius-pill);
}

.spotlight-app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.spotlight-app-id {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.spotlight-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  object-fit: cover;
  border: 1px solid rgba(14, 31, 20, 0.12);
  background: var(--bg-elevated);
  flex-shrink: 0;
  box-shadow: var(--shadow-xs);
}

@media (min-width: 640px) {
  .spotlight-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
  }
}

.spotlight-app-title {
  font-size: 1.12rem;
  font-weight: 800;
  line-height: 1.2;
  color: var(--text-primary);
}

@media (min-width: 640px) {
  .spotlight-app-title {
    font-size: 1.25rem;
  }
}

.spotlight-app-badge {
  font-size: 0.76rem;
  color: var(--accent-emerald);
  font-weight: 600;
  margin-top: 2px;
  line-height: 1.35;
}

.spotlight-reason {
  font-size: 0.82rem;
  color: var(--text-secondary);
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 9px 11px;
  margin-bottom: 10px;
  line-height: 1.5;
}

.spotlight-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 10px;
}

.spotlight-stat-box {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 7px 4px;
  text-align: center;
  min-width: 0;
}

.spotlight-stat-label {
  display: block;
  font-size: 0.66rem;
  color: var(--text-muted);
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.spotlight-stat-val {
  font-weight: 700;
  font-size: 0.78rem;
  color: var(--text-primary);
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (min-width: 640px) {
  .spotlight-stat-label {
    font-size: 0.7rem;
  }
  .spotlight-stat-val {
    font-size: 0.86rem;
  }
}

.spotlight-runnerup {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px 10px;
  border-radius: var(--radius-md);
  background: var(--accent-emerald-soft);
  border: 1px solid var(--border-strong);
  font-size: 0.76rem;
  color: var(--text-secondary);
  margin-bottom: 10px;
}

.spotlight-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

@media (min-width: 480px) {
  .spotlight-actions {
    grid-template-columns: 1fr 1fr;
  }
}

.spotlight-actions .btn {
  width: 100%;
  min-height: 40px;
  font-size: 0.82rem;
}

/* Collapsible All 7 Apps Savings Breakdown Drawer inside Hero Widget */
.calc-ranking-drawer,
.hero-ranking-drawer {
  margin-top: 12px;
  border-top: 1px solid var(--border-subtle);
  padding-top: 10px;
}

.calc-ranking-toggle,
.hero-ranking-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 12px;
  border-radius: var(--radius-lg);
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  cursor: pointer;
  text-align: start;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.calc-ranking-toggle:hover,
.hero-ranking-toggle:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-medium);
}

.calc-ranking-toggle-title,
.hero-ranking-toggle-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-primary);
}

.calc-ranking-toggle-badge,
.hero-ranking-toggle-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--accent-emerald-pill-text);
  background: var(--accent-emerald-pill);
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  flex-shrink: 0;
}

.calc-ranking-toggle .chevron-icon,
.hero-ranking-toggle .chevron-icon {
  transition: transform 0.2s ease;
}

.calc-ranking-drawer.expanded .calc-ranking-toggle .chevron-icon,
.calc-ranking-drawer.open .calc-ranking-toggle .chevron-icon,
.hero-ranking-drawer.expanded .hero-ranking-toggle .chevron-icon {
  transform: rotate(180deg);
}

.calc-ranking-collapse {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.calc-ranking-collapse[hidden] {
  display: none !important;
}

/* ==========================================================================
   KEY METRICS STRIP (2x2 BENTO GRID ON MOBILE, 4-COL ON DESKTOP)
   ========================================================================== */
.metrics-strip {
  padding-block: 4px 24px;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

@media (min-width: 1024px) {
  .metrics-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
  }
}

.metric-tile {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  box-shadow: var(--shadow-card);
}

@media (min-width: 640px) {
  .metric-tile {
    padding: 15px 18px;
    gap: 4px;
  }
}

.metric-label {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-muted);
  line-height: 1.3;
}

.metric-value {
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.25;
}

.metric-sub {
  font-size: 0.68rem;
  color: var(--accent-emerald);
  font-weight: 500;
  line-height: 1.3;
}

@media (min-width: 640px) {
  .metric-label {
    font-size: 0.76rem;
  }
  .metric-value {
    font-size: 1.12rem;
  }
  .metric-sub {
    font-size: 0.74rem;
  }
}

/* ==========================================================================
   GENERIC SECTIONS & HEADERS
   ========================================================================== */
.section {
  padding-block: 32px;
  border-top: 1px solid var(--border-subtle);
}

@media (min-width: 768px) {
  .section {
    padding-block: 44px;
  }
}

.section-header {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 18px;
  min-width: 0;
}

@media (min-width: 960px) {
  .section-header {
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 24px;
  }
}

.section-header-text {
  max-width: 68ch;
  min-width: 0;
}

.section-eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--accent-emerald);
  background: var(--accent-emerald-soft);
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  margin-bottom: 8px;
}

.section-title {
  font-size: clamp(1.3rem, 4.5vw, 1.9rem);
  font-weight: 800;
  line-height: 1.22;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
  text-wrap: balance;
}

.section-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  text-wrap: pretty;
}

@media (min-width: 640px) {
  .section-desc {
    font-size: 0.94rem;
  }
}

/* View Mode Switcher for Unified #leaderboard Section */
.view-mode-switcher {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  background: var(--bg-elevated);
  padding: 4px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-medium);
  width: 100%;
}

@media (min-width: 640px) {
  .view-mode-switcher {
    width: auto;
    display: inline-flex;
  }
}

.view-switch-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 36px;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.view-switch-btn:hover {
  color: var(--text-primary);
}

.view-switch-btn.active {
  background: #0E1F14;
  color: #9FE870;
  box-shadow: var(--shadow-xs);
}

html[data-theme="dark"] .view-switch-btn.active {
  background: #9FE870;
  color: #0E1F14;
}

.sort-controls-bar {
  margin-bottom: 14px;
}

/* Sort Controls (Horizontal Swipeable Rail on Mobile) */
.sort-controls {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  min-width: 0;
  max-width: 100%;
}

@media (min-width: 640px) {
  .sort-controls {
    flex-direction: row;
    align-items: center;
    gap: 8px;
  }
}

.sort-label {
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--text-secondary);
  flex-shrink: 0;
}

.sort-pills {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  gap: 6px;
  padding-bottom: 2px;
  max-width: 100%;
}

.sort-pills::-webkit-scrollbar {
  display: none;
}

@media (min-width: 768px) {
  .sort-pills {
    flex-wrap: wrap;
    overflow-x: visible;
  }
}

.sort-pill {
  flex-shrink: 0;
  min-height: 34px;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  background: var(--bg-surface);
  border: 1px solid var(--border-medium);
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.14s ease, background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.sort-pill:active {
  transform: scale(0.96);
}

.sort-pill.active {
  background: #0E1F14;
  color: #9FE870;
  border-color: #0E1F14;
  font-weight: 700;
}

html[data-theme="dark"] .sort-pill.active {
  background: #9FE870;
  color: #0E1F14;
  border-color: #9FE870;
}

/* ==========================================================================
   PRODUCT HUNT-STYLE COMPACT LEADERBOARD (#leaderboard)
   High-density scannable rows (4-5 visible on mobile) + Expandable Drawer
   ========================================================================== */
.leaderboard-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ph-row-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
  overflow: hidden;
}

.ph-row-card:hover {
  border-color: var(--border-medium);
  box-shadow: var(--shadow-card-hover);
}

.ph-row-card.top-rank {
  border-color: var(--border-strong);
}

.ph-row-main {
  display: grid;
  grid-template-columns: 30px 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 10px;
}

@media (min-width: 768px) {
  .ph-row-main {
    grid-template-columns: 46px 56px minmax(0, 1.3fr) minmax(0, 1fr) auto;
    gap: 16px;
    padding: 14px 20px;
  }
}

/* Rank Medal Column */
.ph-rank-medal {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 0.76rem;
  color: var(--text-secondary);
  flex-shrink: 0;
}

@media (min-width: 768px) {
  .ph-rank-medal {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    font-size: 0.85rem;
  }
}

.ph-rank-medal.medal-1 {
  background: linear-gradient(135deg, #FEF3C7, #FDE68A);
  color: #92400E;
  border-color: #F59E0B;
}

.ph-rank-medal.medal-2 {
  background: linear-gradient(135deg, #DCFCE7, #BBF7D0);
  color: #14532D;
  border-color: #22C55E;
}

.ph-rank-medal.medal-3 {
  background: linear-gradient(135deg, #E0F2FE, #BAE6FD);
  color: #075985;
  border-color: #38BDF8;
}

/* App Store Icon with 1px inner border */
.ph-app-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  object-fit: cover;
  border: 1px solid rgba(14, 31, 20, 0.12);
  background: var(--bg-elevated);
  flex-shrink: 0;
  display: block;
}

@media (min-width: 768px) {
  .ph-app-icon {
    width: 54px;
    height: 54px;
    border-radius: 14px;
  }
}

/* Title + Handle + Tagline */
.ph-identity-col {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.ph-title-line {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.ph-app-name {
  font-size: 0.98rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.2;
}

@media (min-width: 768px) {
  .ph-app-name {
    font-size: 1.04rem;
  }
}

.ph-rating-inline-chip {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-primary);
  background: var(--bg-elevated);
  padding: 1px 7px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-subtle);
}

.ph-rating-inline-chip small {
  font-size: 0.65rem;
  color: var(--text-muted);
  font-weight: 600;
}

@media (min-width: 768px) {
  .ph-rating-inline-chip {
    display: none;
  }
}

.ph-handle-chip {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg-elevated);
  padding: 1px 7px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-subtle);
  display: none;
}

@media (min-width: 768px) {
  .ph-handle-chip {
    display: inline-flex;
  }
}

.ph-tagline {
  font-size: 0.76rem;
  color: var(--text-secondary);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  white-space: normal;
}

@media (min-width: 768px) {
  .ph-tagline {
    font-size: 0.8rem;
    white-space: nowrap;
    display: block;
    text-overflow: ellipsis;
  }
}

/* Desktop Rating Bar + Subscription Pill Column */
.ph-metrics-col {
  display: none;
  flex-direction: column;
  gap: 6px;
}

@media (min-width: 768px) {
  .ph-metrics-col {
    display: flex;
  }
}

.ph-rating-line {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 700;
}

.ph-rating-bar-track {
  width: 68px;
  height: 6px;
  border-radius: var(--radius-pill);
  background: var(--bg-elevated);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
}

.ph-rating-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #16A34A, #9FE870);
  border-radius: var(--radius-pill);
}

.ph-sub-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  background: var(--accent-emerald-pill);
  color: var(--accent-emerald-pill-text);
  width: fit-content;
}

/* Primary CTA + Expand Drawer Button */
.ph-actions-col {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.btn-ph-get {
  background: #0E1F14;
  color: #9FE870;
  font-weight: 700;
  font-size: 0.72rem;
  min-height: 32px;
  padding: 4px 9px;
  border-radius: var(--radius-pill);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  transition: transform 0.14s ease, background-color 0.15s ease;
}

@media (min-width: 768px) {
  .btn-ph-get {
    font-size: 0.78rem;
    min-height: 36px;
    padding: 6px 12px;
    gap: 5px;
  }
}

html[data-theme="dark"] .btn-ph-get {
  background: #9FE870;
  color: #0E1F14;
}

.btn-ph-get:hover {
  transform: translateY(-1px);
}

.btn-ph-drawer {
  min-height: 32px;
  padding: 5px 10px;
  border-radius: var(--radius-pill);
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 0.74rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.btn-ph-drawer-desktop {
  display: none;
}

@media (min-width: 768px) {
  .btn-ph-drawer-desktop {
    display: inline-flex;
    min-height: 36px;
  }
}

/* Mobile Compact Card Footer Bar (Subscription + Details Toggle) */
.ph-mobile-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 12px;
  background: var(--bg-elevated);
  border-top: 1px solid var(--border-subtle);
}

@media (min-width: 768px) {
  .ph-mobile-footer {
    display: none;
  }
}

.ph-sub-pill-mobile {
  font-size: 0.71rem;
  padding: 2px 8px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.btn-ph-drawer-mobile {
  background: var(--bg-surface);
  border-color: var(--border-medium);
  min-height: 30px;
  padding: 4px 10px;
  font-size: 0.72rem;
  flex-shrink: 0;
}

.btn-ph-drawer:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
}

.btn-ph-drawer svg {
  transition: transform 0.2s ease;
}

.ph-row-card.expanded .btn-ph-drawer svg {
  transform: rotate(180deg);
}

/* Expandable Drawer */
.ph-drawer {
  display: none;
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-elevated);
  padding: 14px 16px;
}

.ph-row-card.expanded .ph-drawer {
  display: block;
}

.ph-drawer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

@media (min-width: 768px) {
  .ph-drawer-grid {
    grid-template-columns: 1.2fr 1fr auto;
    align-items: center;
  }
}

.ph-drawer-sub-note {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.ph-drawer-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.category-chip {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  background: var(--bg-surface);
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
}

.ph-drawer-links {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.btn-icon-link {
  min-height: 34px;
  padding: 5px 10px;
  border-radius: var(--radius-pill);
  background: var(--bg-surface);
  border: 1px solid var(--border-medium);
  color: var(--text-secondary);
  font-size: 0.76rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: color 0.15s ease, border-color 0.15s ease, background-color 0.15s ease;
}

.btn-icon-link:hover {
  color: var(--text-primary);
  border-color: var(--accent-emerald);
}

.star-amber {
  color: #F59E0B;
}

/* ==========================================================================
   WISE-STYLE SAVINGS BREAKDOWN & CALCULATOR (#calculator)
   ========================================================================== */
.calculator-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

@media (min-width: 1024px) {
  .calculator-layout {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: 28px;
  }
}

.calc-controls-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
  max-width: 100%;
  box-shadow: var(--shadow-card);
}

@media (min-width: 640px) {
  .calc-controls-card {
    border-radius: var(--radius-2xl);
    padding: 22px;
    gap: 20px;
  }
}

.control-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.control-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.control-label {
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--text-primary);
}

@media (min-width: 640px) {
  .control-label {
    font-size: 0.9rem;
  }
}

.control-value-badge {
  background: #9FE870;
  color: #0E1F14;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  font-weight: 800;
  font-size: 0.82rem;
  flex-shrink: 0;
}

.range-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 8px;
  background: var(--bg-subtle);
  border-radius: var(--radius-pill);
  outline: none;
  border: 1px solid var(--border-subtle);
  cursor: pointer;
}

.range-slider-sm {
  height: 6px;
}

.range-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #16A34A;
  border: 3px solid #FFFFFF;
  box-shadow: 0 2px 6px rgba(14, 31, 20, 0.3);
  cursor: pointer;
}

.range-slider::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #16A34A;
  border: 3px solid #FFFFFF;
  cursor: pointer;
}

.range-ticks {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  color: var(--text-muted);
  padding-inline: 2px;
}

.calc-pill-group {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

#calcPlanTypePills {
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .calc-pill-group,
  #calcPlanTypePills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }
}

.calc-option-pill {
  min-height: 36px;
  padding: 7px 10px;
  border-radius: var(--radius-pill);
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.25;
  text-align: center;
  cursor: pointer;
  transition: transform 0.14s ease, background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

@media (min-width: 640px) {
  .calc-option-pill {
    padding: 6px 13px;
    font-size: 0.82rem;
  }
}

.calc-option-pill:active {
  transform: scale(0.96);
}

.calc-option-pill.active {
  background: #0E1F14;
  color: #9FE870;
  border-color: #0E1F14;
  font-weight: 700;
}

html[data-theme="dark"] .calc-option-pill.active {
  background: #9FE870;
  color: #0E1F14;
  border-color: #9FE870;
}

.select-wrapper {
  position: relative;
  min-width: 0;
  max-width: 100%;
}

.custom-select {
  width: 100%;
  max-width: 100%;
  min-height: 40px;
  padding: 8px 12px;
  border-radius: var(--radius-md);
  background-color: var(--bg-surface);
  border: 1px solid var(--border-medium);
  color: var(--text-primary);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  outline: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  box-shadow: var(--shadow-xs);
}

.custom-select-sm {
  min-height: 36px;
  padding: 6px 10px;
  font-size: 0.78rem;
}

.custom-select:focus {
  border-color: var(--accent-emerald);
}

.custom-select option {
  background-color: var(--bg-surface);
  color: var(--text-primary);
}

/* Calculator Results & Horizontal Cost Bars */
.calc-results-col {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}

.calc-winner-banner {
  background: #0E1F14;
  color: #F8FAF7;
  border: 1px solid rgba(159, 232, 112, 0.35);
  border-radius: var(--radius-xl);
  padding: 16px 14px;
  box-shadow: var(--shadow-widget);
}

@media (min-width: 640px) {
  .calc-winner-banner {
    border-radius: var(--radius-2xl);
    padding: 20px;
  }
}

.winner-banner-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}

.winner-kicker {
  font-size: 0.74rem;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: #9FE870;
  color: #0E1F14;
}

.winner-savings-pill {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  color: #9FE870;
  background: rgba(159, 232, 112, 0.14);
  border: 1px solid rgba(159, 232, 112, 0.35);
  padding: 4px 10px;
  border-radius: var(--radius-pill);
}

.winner-main-row {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
}

@media (min-width: 640px) {
  .winner-main-row {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
  }
}

.winner-app-info {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.winner-app-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.18);
}

@media (min-width: 640px) {
  .winner-app-icon {
    width: 52px;
    height: 52px;
    border-radius: 13px;
  }
}

.winner-app-name {
  font-size: 1.18rem;
  font-weight: 800;
  color: #FFFFFF;
}

.winner-app-sub {
  font-size: 0.8rem;
  color: #A9C2B3;
  line-height: 1.4;
}

.winner-net-box {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  text-align: start;
}

@media (min-width: 640px) {
  .winner-net-box {
    padding-top: 0;
    border-top: none;
    text-align: end;
    align-items: flex-end;
    gap: 6px;
  }
}

.winner-net-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

@media (min-width: 640px) {
  .winner-net-meta {
    display: block;
  }
}

.winner-net-label {
  display: block;
  font-size: 0.73rem;
  color: #A9C2B3;
}

.winner-net-val {
  font-family: var(--font-mono);
  font-size: 1.25rem;
  font-weight: 800;
  color: #9FE870;
  display: block;
}

.winner-cta-btn {
  width: 100%;
  min-height: 40px;
}

@media (min-width: 640px) {
  .winner-cta-btn {
    width: auto;
    min-height: 36px;
  }
}

.calc-ranking-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.calc-rank-row {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: var(--shadow-xs);
}

@media (min-width: 640px) {
  .calc-rank-row {
    padding: 13px 16px;
  }
}

.calc-rank-row.rank-1 {
  border-color: var(--accent-emerald);
  background: var(--accent-emerald-soft);
}

.calc-row-top {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: flex-start;
  gap: 10px;
}

.calc-rank-num {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--text-secondary);
}

.calc-rank-row.rank-1 .calc-rank-num {
  background: #9FE870;
  color: #0E1F14;
  border-color: #16A34A;
}

.calc-row-mid {
  min-width: 0;
}

.calc-row-title-line {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.calc-row-icon {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  border: 1px solid var(--border-subtle);
}

.calc-row-name {
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--text-primary);
}

.calc-row-breakdown {
  font-size: 0.74rem;
  color: var(--text-secondary);
  margin-top: 2px;
  line-height: 1.4;
}

.calc-row-end {
  text-align: end;
  flex-shrink: 0;
}

.calc-row-saved {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--accent-emerald);
}

.calc-row-net {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--text-muted);
}

/* Wise Horizontal Cost & Savings Bar */
.wise-cost-bar-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.wise-cost-bar-track {
  flex: 1;
  height: 7px;
  border-radius: var(--radius-pill);
  background: var(--bg-subtle);
  overflow: hidden;
}

.wise-cost-bar-fill {
  height: 100%;
  border-radius: var(--radius-pill);
  background: linear-gradient(90deg, #16A34A, #9FE870);
  transition: width 0.25s ease;
}

.wise-cost-math-tag {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
}

/* ==========================================================================
   CARDPOINTERS-STYLE VISUAL BANK CREDIT CARDS (#bank-radar)
   ========================================================================== */
.apple-pay-alert {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 18px;
  border-radius: var(--radius-xl);
  background: var(--accent-gold-pill);
  border: 1px solid var(--border-gold);
  margin-bottom: 22px;
}

.apple-pay-alert.apple-pay-alert-compact {
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  border-radius: var(--radius-lg);
  margin-bottom: 14px;
}

.alert-compact-icon {
  color: var(--accent-gold-pill-text);
  flex-shrink: 0;
}

.alert-compact-text {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent-gold-pill-text);
  line-height: 1.4;
}

.alert-icon-wrap {
  color: var(--accent-gold-pill-text);
  flex-shrink: 0;
  margin-top: 2px;
}

.alert-title {
  display: block;
  font-size: 0.94rem;
  font-weight: 800;
  color: var(--accent-gold-pill-text);
  margin-bottom: 4px;
}

.alert-text {
  font-size: 0.85rem;
  color: var(--text-primary);
  line-height: 1.55;
}

.filter-bar {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  gap: 8px;
  padding-bottom: 4px;
  margin-bottom: 18px;
  max-width: 100%;
}

.filter-bar::-webkit-scrollbar {
  display: none;
}

@media (min-width: 768px) {
  .filter-bar {
    flex-wrap: wrap;
    overflow-x: visible;
    margin-bottom: 22px;
  }
}

.filter-pill {
  flex-shrink: 0;
  min-height: 36px;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  background: var(--bg-surface);
  border: 1px solid var(--border-medium);
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.14s ease, background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.filter-pill:active {
  transform: scale(0.96);
}

.filter-pill.active {
  background: #0E1F14;
  color: #9FE870;
  border-color: #0E1F14;
  font-weight: 700;
}

html[data-theme="dark"] .filter-pill.active {
  background: #9FE870;
  color: #0E1F14;
  border-color: #9FE870;
}

.offers-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
}

@media (min-width: 768px) {
  .offers-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
  }
}

@media (min-width: 1140px) {
  .offers-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.offer-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-2xl);
  padding: 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  max-width: 100%;
  box-shadow: var(--shadow-card);
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

@media (min-width: 640px) {
  .offer-card {
    padding: 16px;
    gap: 14px;
  }
}

.offer-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-card-hover);
}

.offer-card.offer-card-today,
.offer-card.offer-card-mycard,
.offer-card.is-active-today,
.offer-card.is-selected-bank-card {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-emerald);
}

.today-highlight-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: var(--radius-pill);
  background: var(--accent-emerald-pill);
  color: var(--accent-emerald-pill-text);
  border: 1px solid var(--border-strong);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.35;
  align-self: flex-start;
}

@media (min-width: 960px) {
  .today-highlight-pill {
    align-self: flex-end;
  }
}

.offer-live-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
}

.offer-today-badge,
.badge-active-today {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  background: var(--accent-gold-pill);
  color: var(--accent-gold-pill-text);
  border: 1px solid var(--border-gold);
  font-size: 0.72rem;
  font-weight: 800;
  animation: pulseBadgeGlow 2.4s infinite ease-in-out;
}

@keyframes pulseBadgeGlow {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.28);
  }
  50% {
    box-shadow: 0 0 0 5px rgba(245, 158, 11, 0);
  }
}

.offer-mycard-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  background: #9FE870;
  color: #0E1F14;
  font-size: 0.72rem;
  font-weight: 800;
}

.offer-cta-action-row {
  display: flex;
  width: 100%;
}

.btn-copy-open {
  width: 100%;
  justify-content: center;
  min-height: 38px;
  font-size: 0.82rem;
}

/* Miniature Credit Card Visual (CardPointers style) */
.cp-credit-card {
  position: relative;
  border-radius: 16px;
  padding: 15px 16px;
  color: #FFFFFF;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 128px;
  box-shadow: 0 10px 24px -8px rgba(14, 31, 20, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.22);
  overflow: hidden;
}

.cp-credit-card::after {
  content: '';
  position: absolute;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.16) 0%, transparent 70%);
  top: -40px;
  inset-inline-end: -40px;
  pointer-events: none;
}

/* Bank-Specific Card Gradients */
.cp-card-alrajhi {
  background: linear-gradient(135deg, #0F2557 0%, #1D4ED8 55%, #091536 100%);
}

.cp-card-snb {
  background: linear-gradient(135deg, #064E3B 0%, #059669 58%, #022C22 100%);
}

.cp-card-albilad {
  background: linear-gradient(135deg, #7F1D1D 0%, #DC2626 55%, #450A0A 100%);
}

.cp-card-alinma {
  background: linear-gradient(135deg, #451A03 0%, #B45309 55%, #78350F 100%);
}

.cp-card-tiqmo {
  background: linear-gradient(135deg, #3B0764 0%, #7E22CE 58%, #1E1B4B 100%);
}

.cp-card-d360 {
  background: linear-gradient(135deg, #090D16 0%, #1E293B 55%, #0F172A 100%);
  border: 1px solid rgba(159, 232, 112, 0.4);
}

.cp-card-promo {
  background: linear-gradient(135deg, #0E1F14 0%, #166534 60%, #052E16 100%);
}

.cp-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  position: relative;
  z-index: 1;
}

.cp-bank-issuer {
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  color: #FFFFFF;
}

.cp-app-pill {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(6px);
  color: #FFFFFF;
}

.cp-card-mid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-block: 10px 8px;
  position: relative;
  z-index: 1;
}

/* EMV Metallic Chip */
.cp-emv-chip {
  width: 34px;
  height: 25px;
  border-radius: 5px;
  background: linear-gradient(135deg, #FDE68A 0%, #F59E0B 50%, #FDE68A 100%);
  border: 1px solid rgba(255, 255, 255, 0.45);
  position: relative;
  flex-shrink: 0;
}

.cp-emv-chip::before {
  content: '';
  position: absolute;
  inset: 5px 8px;
  border: 1px solid rgba(120, 53, 15, 0.35);
  border-radius: 2px;
}

.cp-cashback-pill {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 800;
  padding: 4px 11px;
  border-radius: var(--radius-pill);
  background: #9FE870;
  color: #0E1F14;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.cp-card-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.73rem;
  color: rgba(255, 255, 255, 0.86);
  position: relative;
  z-index: 1;
}

.cp-card-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 600;
}

.cp-network-tag {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  opacity: 0.9;
  flex-shrink: 0;
}

.offer-discount-title {
  font-size: 0.98rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.35;
}

/* Prominent Direct Card Entry Badge per Bank Offer */
.direct-card-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.35;
  padding: 4px 9px;
  border-radius: var(--radius-sm);
  background: var(--accent-gold-pill);
  color: var(--accent-gold-pill-text);
  border: 1px solid var(--border-gold);
  margin-top: 8px;
  max-width: 100%;
}

.offer-meta-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 0.79rem;
  color: var(--text-secondary);
  margin-top: 8px;
}

.offer-meta-item strong {
  color: var(--text-primary);
}

.offer-code-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  background: var(--bg-elevated);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-md);
  padding: 8px 12px;
}

.offer-code-text {
  font-family: var(--font-mono);
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: 0.03em;
}

.btn-copy-code {
  min-height: 34px;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  background: #0E1F14;
  color: #9FE870;
  border: none;
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: transform 0.14s ease, background-color 0.15s ease;
}

html[data-theme="dark"] .btn-copy-code {
  background: #9FE870;
  color: #0E1F14;
}

.btn-copy-code.copied {
  background: #16A34A !important;
  color: #FFFFFF !important;
}

.btn-copy-code:active {
  transform: scale(0.95);
}

.offer-footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border-subtle);
}

.vote-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

.vote-label {
  font-size: 0.73rem;
  color: var(--text-muted);
}

.btn-vote {
  min-height: 32px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: transform 0.14s ease, background-color 0.15s ease, border-color 0.15s ease;
}

.btn-vote:active {
  transform: scale(0.95);
}

.btn-vote.voted-up {
  background: var(--accent-emerald-pill);
  color: var(--accent-emerald-pill-text);
  border-color: var(--accent-emerald);
}

.btn-vote.voted-down {
  background: var(--danger-soft);
  color: var(--danger-text);
  border-color: var(--danger-border);
}

.offer-source-link {
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.offer-source-link:hover {
  color: var(--accent-emerald);
}

/* ==========================================================================
   COMPARISON TABLE & MOBILE CARDS (#comparison)
   ========================================================================== */
.table-container {
  display: none;
  overflow-x: auto;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-card);
}

@media (min-width: 960px) {
  .table-container {
    display: block;
  }
}

.comparison-table {
  width: 100%;
  border-collapse: collapse;
  text-align: start;
  font-size: 0.86rem;
}

.comparison-table th {
  background: var(--bg-elevated);
  color: var(--text-secondary);
  font-weight: 700;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-subtle);
  white-space: nowrap;
}

.comparison-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-subtle);
  vertical-align: middle;
}

.comparison-table tbody tr:last-child td {
  border-bottom: none;
}

.comparison-table tbody tr:hover {
  background: var(--bg-card-hover);
}

.table-app-cell {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
}

.table-app-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid rgba(14, 31, 20, 0.12);
}

.table-links-cell {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.btn-store {
  background: #0E1F14;
  color: #9FE870;
  font-weight: 700;
  font-size: 0.78rem;
  min-height: 34px;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

html[data-theme="dark"] .btn-store {
  background: #9FE870;
  color: #0E1F14;
}

.comparison-mobile-cards {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
}

@media (min-width: 960px) {
  .comparison-mobile-cards {
    display: none;
  }
}

.comp-mobile-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  max-width: 100%;
  box-shadow: var(--shadow-card);
}

.comp-mobile-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  background: var(--bg-elevated);
  padding: 10px;
  border-radius: var(--radius-md);
  font-size: 0.79rem;
}

/* ==========================================================================
   FOOTER (Preserves exact attribution invariants)
   ========================================================================== */
.site-footer {
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-footer);
  color: #F8FAF7;
  padding-block: 36px;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

@media (min-width: 768px) {
  .footer-inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.footer-brand-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.footer-brand-name {
  color: #FFFFFF;
}

.footer-disclaimer {
  font-size: 0.8rem;
  color: #A9C2B3;
  max-width: 60ch;
}

.footer-meta-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

@media (min-width: 768px) {
  .footer-meta-col {
    align-items: flex-end;
  }
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 0.82rem;
  color: #D1E2D7;
}

.footer-links a:hover {
  color: #9FE870;
}

.footer-sync-info {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: #86A393;
}

.footer-credit-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 2px;
  font-size: 0.82rem;
  color: #D1E2D7;
}

.footer-credit-text {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.footer-omx-link {
  font-family: var(--font-mono);
  font-weight: 700;
  color: #9FE870;
  border-bottom: 1px dashed rgba(159, 232, 112, 0.5);
  transition: color 0.15s ease, border-color 0.15s ease;
}

.footer-omx-link:hover {
  color: #FFFFFF;
  border-bottom-color: #FFFFFF;
}

.footer-credit-sep {
  color: #86A393;
  opacity: 0.6;
}

.footer-x-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  color: #FFFFFF;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.footer-x-badge:hover {
  background: #9FE870;
  border-color: #9FE870;
  color: #0E1F14;
  transform: translateY(-1px);
}

.footer-x-icon {
  flex-shrink: 0;
}

/* ==========================================================================
   MOBILE STICKY BOTTOM NAV (SAFE-AREA AWARE)
   ========================================================================== */
.mobile-bottom-nav {
  position: fixed;
  bottom: 0;
  inset-inline: 0;
  z-index: 95;
  height: calc(62px + env(safe-area-inset-bottom, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
  background: var(--bg-glass);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border-top: 1px solid var(--border-subtle);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-items: center;
  padding-inline: 8px;
}

@media (min-width: 960px) {
  .mobile-bottom-nav {
    display: none;
  }
}

.mobile-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 5px 4px;
  margin-inline: 2px;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--text-muted);
  border-radius: var(--radius-md);
  transition: background-color 0.15s ease, color 0.15s ease;
}

.mobile-nav-item:hover {
  color: var(--accent-emerald);
}

.mobile-nav-item.active {
  color: var(--accent-emerald);
  background: var(--accent-emerald-soft);
}

/* ==========================================================================
   TOAST NOTIFICATION
   ========================================================================== */
.toast-container {
  position: fixed;
  bottom: 80px;
  inset-inline-end: 20px;
  z-index: 150;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

@media (min-width: 960px) {
  .toast-container {
    bottom: 24px;
  }
}

.toast-item {
  background: #0E1F14;
  color: #FFFFFF;
  border: 1px solid #9FE870;
  border-radius: var(--radius-pill);
  padding: 11px 18px;
  font-size: 0.84rem;
  font-weight: 600;
  box-shadow: var(--shadow-widget);
  display: flex;
  align-items: center;
  gap: 10px;
  animation: toastEnter 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes toastEnter {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
