/* Prefix for input fields (e.g., $ icon) */
.input-prefix {
  position: absolute;
  left: 0.6rem;
  top: 50%;
  transform: translateY(-50%);
  color: #00040aec;
  background: #f5f7fa;
  padding: 0.18rem 0.85rem 0.18rem 0.85rem;
  border-radius: 6px;
  font-size: 1.08rem;
  font-weight: 600;
  border-right: 1px solid var(--border);
  pointer-events: none;
  box-shadow: 0 1px 4px -2px var(--primary-glow);
  z-index: 2;
  margin-right: 0.3rem;
}

/* =============================================
   HERO SECTION
   ============================================= */
.hero-wrapper {
  width: 100%;
  max-width: 1800px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: block;
}

.hero {
  min-height: auto;
  padding: 1.5rem 0;
  width: 100%;
  max-width: 92%;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  justify-items: center;
  gap: 3rem;
  position: relative;
  z-index: 1;
}

.hero-content {
  max-width: 800px;
  width: 100%;
  text-align: left;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--primary);
  background: rgba(37, 99, 235, 0.08);
  border: 1px solid rgba(37, 99, 235, 0.15);
  padding: 0.45rem 1.2rem;
  border-radius: 99px;
  margin-bottom: 1.25rem;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 4.5vw, 3.2rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 1.25rem;
  color: var(--text-main);
}

.hero-title span {
  display: inline-block;
  white-space: normal;
}

.hero-title-accent {
  background: linear-gradient(135deg, var(--primary) 0%, #06b6d4 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.1rem;
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 650px;
  font-weight: 400;
  margin: 0;
}

.hero-visual {
  justify-self: center;
  align-self: center;
}

/* =============================================
   REFINED THEME-ALIGNED ILLUSTRATION
   ============================================= */
.hero-visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 380px;
}

.illustration-container {
  position: relative;
  width: 290px;
  height: 290px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* The Branded Circle Background */
.theme-circle {
  position: absolute;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.2) 0%, rgba(37, 99, 235, 0.05) 100%);
  border: 2px solid rgba(37, 99, 235, 0.2);
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 0 60px rgba(37, 99, 235, 0.1);
  animation: pulseGlow 4s infinite ease-in-out;
}

@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 40px rgba(37, 99, 235, 0.1); border-color: rgba(37, 99, 235, 0.1); }
  50% { box-shadow: 0 0 80px rgba(37, 99, 235, 0.3); border-color: rgba(37, 99, 235, 0.4); }
}

.theme-circle::after {
  content: "";
  position: absolute;
  top: -20%;
  right: -20%;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.03);
  transform: rotate(15deg);
}

.card-stack-flat {
  position: relative;
  width: 210px;
  height: 140px;
  z-index: 2;
  animation: stackFloat 6s infinite ease-in-out;
  transform-style: preserve-3d;
}

@keyframes stackFloat {
  0%, 100% { transform: translateY(0) rotate(0deg) rotateX(0deg); }
  50% { transform: translateY(-15px) rotate(2deg) rotateX(5deg); }
}

.flat-card {
  position: absolute;
  border-radius: 16px;
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4);
}

/* Back Card (Charcoal/Silver) */
.flat-card-back {
  width: 100%;
  height: 100%;
  background: #1e293b;
  border: 1px solid rgba(255, 255, 255, 0.1);
  top: -20px;
  left: 12px;
  transform: rotate(-12deg);
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  padding: 0.75rem;
}

.brand-dots {
  display: flex;
  margin-top: 0.2rem;
}

.b-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.b-primary {
  background: var(--primary);
  margin-right: -12px;
}

.b-white {
  background: rgba(255, 255, 255, 0.2);
}

/* Front Card (Primary Blue) */
.flat-card-front {
  width: 100%;
  height: 100%;
  background: var(--primary);
  bottom: -15px;
  left: -10px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.f-stripe {
  position: absolute;
  top: 25px;
  left: 0;
  width: 100%;
  height: 35px;
  background: #0f172a;
  display: flex;
  align-items: center;
  padding: 0 1.5rem;
  gap: 8px;
}

.f-stripe-dot {
  width: 6px;
  height: 6px;
  background: white;
  border-radius: 50%;
  opacity: 0.8;
}

.f-stripe-line {
  width: 30px;
  height: 6px;
  background: white;
  border-radius: 3px;
  opacity: 0.8;
}

.f-chip {
  width: 44px;
  height: 34px;
  background: linear-gradient(135deg, #fbbf24 0%, #d97706 100%);
  border-radius: 6px;
  margin-top: 2.8rem;
  position: relative;
  overflow: hidden;
}

.f-chip::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: repeating-linear-gradient(90deg, transparent, transparent 6px, rgba(0, 0, 0, 0.1) 6px, rgba(0, 0, 0, 0.1) 7px);
}

.f-lines {
  margin-top: auto;
  align-self: flex-end;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.f-line {
  height: 4px;
  background: white;
  opacity: 0.5;
  border-radius: 2px;
}

/* Floating Coins Animation */
.floating-coins {
  position: absolute;
  top: -60px;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 5;
}

.coin {
  position: absolute;
  width: 35px;
  height: 35px;
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #78350f;
  font-size: 0.9rem;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3), 0 0 15px rgba(251, 191, 36, 0.4);
  border: 1.5px solid rgba(255, 255, 255, 0.3);
  animation: coinFloat 4s infinite ease-in-out;
  opacity: 0;
}

.coin-1 {
  top: -20px;
  left: -20px;
  animation-delay: 0s;
}

.coin-2 {
  top: -50px;
  left: 50%;
  transform: translateX(-50%);
  animation-delay: 1.5s;
  width: 40px;
  height: 40px;
  font-size: 1.1rem;
}

.coin-3 {
  top: -10px;
  right: -10px;
  animation-delay: 0.7s;
}

.coin-4 {
  top: -40px;
  right: 25%;
  animation-delay: 2.2s;
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  width: 38px;
  height: 38px;
  font-size: 1.2rem;
  color: #fff;
}

@keyframes coinFloat {
  0% {
    transform: translateY(-80px) rotateY(0deg) rotateX(0deg) scale(0);
    opacity: 0;
  }
  15% {
    opacity: 1;
    transform: translateY(-40px) rotateY(180deg) rotateX(45deg) scale(1.1);
  }
  85% {
    opacity: 1;
    transform: translateY(40px) rotateY(720deg) rotateX(90deg) scale(1);
  }
  100% {
    transform: translateY(100px) rotateY(1080deg) rotateX(135deg) scale(0);
    opacity: 0;
  }
}

@media (max-width: 1100px) {
  .illustration-container {
    width: 260px;
    height: 260px;
  }

  .card-stack-flat {
    width: 180px;
    height: 120px;
  }
}

@media (max-width: 1100px) {
  .card-pair-container {
    width: 300px;
    height: 200px;
  }
}

@media (max-width: 1100px) {
  .fintech-card {
    width: 320px;
    height: 200px;
  }
}

@media (max-width: 1100px) {
  .card-stack {
    width: 280px;
    height: 180px;
  }

  .floating-pill {
    padding: 0.4rem 0.8rem;
    font-size: 0.75rem;
  }
}

@media (max-width: 1200px) {
  .breadcrumb {
    justify-content: center;
  }
  .hero {
    grid-template-columns: 1fr;
    text-align: center;
    padding: 3.5rem 1.5rem;
    gap: 2rem;
  }

  .hero-visual {
    display: none;
  }

  .hero-content {
    margin: 0 auto;
    max-width: 800px;
  }

  .hero-eyebrow {
    justify-content: center;
  }

  .hero-subtitle {
    margin: 0 auto;
  }
}

.input-with-prefix {
  padding-left: 4.1rem !important;
}

/* Fix for category section titles (e.g., Tax Calculators, Savings & Retirement) */

.category-title {
  display: flex;
  align-items: center;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 1.25rem;
  margin-top: 1rem;
  gap: 0.7rem;
  line-height: 1.2;
  background: var(--surface);
  border-left: 6px solid var(--primary);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 0.6rem 1.2rem;
  box-shadow: 0 2px 8px -4px var(--primary-glow);
}

.category-section {
  margin-bottom: 3rem;
}

.container {
  padding: 0 1.5rem 4rem !important;
}

@media (max-width: 640px) {
  .breadcrumb {
    width: 92%;
    max-width: 92%;
    margin: 0 auto;
    font-size: 0.7rem;
    padding-top: 1rem;
    text-align: left;
  }

  .hero {
    padding: 1.25rem 0;
    width: 92%;
    max-width: 92%;
    margin: 0 auto;
    text-align: left;
  }

  .hero-content {
    margin: 0;
    width: 100%;
    max-width: 100%;
    text-align: left;
  }

  .hero-title {
    font-size: clamp(1.1rem, 5.5vw, 1.5rem);
    margin-bottom: 0.75rem;
    text-align: left;
  }

  .hero-title .hero-title-accent {
    white-space: nowrap;
    display: inline-block;
  }

  .hero-subtitle {
    font-size: 0.8rem;
    line-height: 1.4;
    max-width: 100%;
    text-align: left;
    margin: 0;
  }

  .hero-eyebrow {
    font-size: 0.6rem;
    padding: 0.35rem 0.8rem;
    justify-content: flex-start;
    width: fit-content;
    white-space: nowrap;
    max-width: none;
  }

  .category-title {
    font-size: 1.1rem;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
    gap: 0.5rem;
    padding: 0.5rem 0.7rem 0.5rem 0.7rem;
    border-left-width: 4px;
    font-weight: 600;
  }
}



@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap");
@import url("https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css");

:root {
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-soft: #3b82f6;

  --primary-glow: rgba(37, 99, 235, 0.2);
  --bg-color: #f1f5f9;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --text-main: #0b1120;
  --text-muted: #475569;
  --text-light: #94a3b8;
  --border: #e2e8f0;
  --border-focus: #94a3b8;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow:
    0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.02);
  --shadow-lg: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
  --shadow-focus: 0 0 0 4px var(--primary-glow);
  --shadow-card:
    0 4px 6px -2px rgba(0, 0, 0, 0.05), 0 12px 16px -4px rgba(0, 0, 0, 0.05);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: all 0.2s ease;
  --nav-height: 64px;

  /* Fluid Typography Scale */
  --fs-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.85rem);
  --fs-sm: clamp(0.8rem, 0.75rem + 0.3vw, 1rem);
  --fs-base: clamp(0.95rem, 0.9rem + 0.4vw, 1.1rem);
  --fs-md: clamp(1.1rem, 1rem + 0.5vw, 1.35rem);
  --fs-lg: clamp(1.5rem, 1.3rem + 1vw, 2.25rem);
  --fs-xl: clamp(2.25rem, 2rem + 2vw, 3.5rem);
}

/* =============================================
   DARK THEME OVERRIDES
   ============================================= */
[data-theme="dark"] {
  --bg-color: #0f172a;
  --surface: #1e293b;
  --surface-soft: #334155;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-light: #64748b;
  --border: #334155;
  --border-focus: #475569;
  --primary-glow: rgba(59, 130, 246, 0.15);
  --shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

[data-theme="dark"] .fin-card {
  background: #1e293b;
  border-color: #334155;
}

[data-theme="dark"] .fin-card:hover {
  border-color: var(--primary);
  background: #334155;
}

[data-theme="dark"] .result-box {
  padding: 1.5rem 1.25rem;
}


*/ .card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  max-width: 1050px;
  width: 100%;
  margin: 0 auto 2rem auto;
  padding: 1.75rem 2.25rem;
  box-shadow: var(--shadow-card);
  transition: var(--transition);
}

.card:hover {
  box-shadow: var(--shadow);
}

/* =============================================`r`n   CARDS
   ============================================= */
/* Main card class handled above */

.card:hover {
  box-shadow: var(--shadow-lg);
  border-color: var(--border-focus);
}

.card-title {
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
}

.card-desc {
  color: var(--text-muted);
  font-size: 1.05rem;
  line-height: 1.7;
}

/* Calc category grid */

.fin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  justify-content: center;
  grid-auto-rows: 1fr;
}

@media (min-width: 1850px) {
  .fin-grid {
    grid-template-columns: repeat(5, minmax(240px, 1fr));
  }
}

@media (min-width: 2400px) {
  .fin-grid {
    grid-template-columns: repeat(6, minmax(260px, 1fr));
  }
}

@media (max-width: 1450px) {
  .fin-grid {
    grid-template-columns: repeat(3, minmax(200px, 1fr));
    gap: 1.5rem;
  }
}

@media (max-width: 900px) {
  .fin-grid {
    grid-template-columns: repeat(2, minmax(180px, 1fr));
    gap: 1rem;
  }
}

@media (max-width: 640px) {
  .fin-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
    grid-auto-rows: 1fr;
    /* Enforce uniform height on mobile as well */
  }

  .fin-card {
    padding: 1rem 1.25rem;
    display: grid !important;
    grid-template-columns: auto 1fr;
    grid-template-areas:
      "icon title"
      "desc desc";
    align-items: center;
    gap: 0.25rem 0.85rem;
  }

  .fin-category-icon {
    grid-area: icon;
    width: 38px !important;
    height: 38px !important;
    font-size: 1rem !important;
    margin-bottom: 0 !important;
    border-radius: 10px;
  }

  .fin-card h3 {
    grid-area: title;
    font-size: var(--fs-sm);
    margin-bottom: 0 !important;
  }

  .fin-card p {
    grid-area: desc;
    font-size: var(--fs-xs);
    line-height: 1.4;
    margin-top: 0.25rem;
  }
}

/* Specific 3-column layout for root index categories */
.home-calc-grid {
  grid-template-columns: repeat(3, 1fr) !important;
}

@media (max-width: 900px) {
  .home-calc-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

@media (max-width: 640px) {
  .home-calc-grid {
    grid-template-columns: 1fr !important;
  }
}

.fin-category-icon {
  width: 48px;
  height: 48px;
  background: var(--surface-soft);
  color: var(--primary);
  margin-bottom: 1rem;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 1.2rem;
  border-radius: 12px;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid var(--border);
  line-height: 1;
}

.fin-card:hover .fin-category-icon {
  background: var(--primary);
  color: white;
  border-radius: 50%;
  transform: scale(1.1) translateY(-5px);
  border-color: var(--primary);
}

.fin-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem 1.15rem;
  min-width: 200px;
  max-width: 100%;
  width: 100%;
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow);
  height: 100%;
}

.fin-card:hover {
  border-color: var(--primary);
  box-shadow: 0 15px 35px -5px rgba(0, 0, 0, 0.4);
  background: radial-gradient(circle at top left, rgba(37, 99, 235, 0.08), var(--surface));
}

.fin-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--primary), transparent);
  transition: width 0.4s ease, opacity 0.3s ease;
  opacity: 0;
  z-index: 2;
  box-shadow: 0 0 15px var(--primary);
}

.fin-card:hover::before {
  width: 80%;
  opacity: 1;
}

.fin-card:hover .fin-category-icon {
  background: var(--primary);
  color: white;
  transform: scale(1.1) translateY(-5px);
  border-color: var(--primary);
  box-shadow: 0 0 20px var(--primary-glow);
}

.fin-card h3 {
  color: var(--primary);
  font-size: var(--fs-base);
  font-weight: 600;
  margin-bottom: 0.25rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
}

.fin-card p {
  color: var(--text-muted);
  font-size: var(--fs-xs);
  line-height: 1.5;
  margin-right: 2rem;
}

.card-arrow {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--surface-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  color: var(--text-muted);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: absolute;
  bottom: 1.5rem;
  right: 1.25rem;
  opacity: 0;
  transform: translateX(-10px);
  border: 1px solid var(--border);
}

.fin-card:hover .card-arrow {
  opacity: 1;
  transform: translateX(0);
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  box-shadow: 0 0 15px var(--primary-glow);
}

/* =============================================
   FORMS
   ============================================= */
.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
  color: var(--text-main);
}

.input-field {
  width: 100%;
  padding: 0.875rem 1rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 1rem;
  transition: var(--transition);
  background: var(--surface);
  color: var(--text-main);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
  -webkit-appearance: none;
  appearance: none;
}

.input-field:hover {
  border-color: var(--text-light);
}

.input-field:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: var(--shadow-focus);
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-suffix {
  position: absolute;
  right: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
  pointer-events: none;
  background: var(--surface-soft);
  padding: 0.15rem 0.5rem;
  border-radius: 6px;
  font-size: 0.85rem;
  border-left: 1px solid var(--border);
  white-space: nowrap;
}

.input-with-suffix {
  padding-right: 4.5rem;
}

/* Segmented Control */
.box-segmented {
  background: var(--surface-soft);
  padding: 0.35rem;
  border-radius: 12px;
  display: flex;
  /* was inline-flex â€” now fills container width */
  width: 100%;
  /* full width so it can't push outer bounds */
  border: 1px solid var(--border);
  max-width: 100%;
  overflow: hidden;
}

.box-segmented .box-segmented .box-segmented input[type="radio"] {
  display: none;
}

.box-segmented input[type="radio"]:checked+span {
  background: var(--surface);
  box-shadow: 0 2px 8px -2px rgba(0, 0, 0, 0.12);
  color: var(--primary);
  font-weight: 600;
}

.box-segmented span {
  padding: 0.5rem 1rem;
  display: block;
  border-radius: 8px;
  font-size: 0.88rem;
  line-height: 1.3;
  white-space: nowrap;
  /* Use nowrap on the span only â€” the label can flex */
}

.radio-inline label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  font-weight: 500;
  color: var(--text-main);
  transition: var(--transition-fast);
}

.radio-inline label:hover {
  color: var(--primary);
}

.radio-inline input[type="radio"] {
  accent-color: var(--primary);
  width: 1.1rem;
  height: 1.1rem;
}

/* Button */
.btn {
  width: 100%;
  padding: 1rem 1.5rem;
  background: linear-gradient(135deg, var(--primary), var(--primary-hover));
  color: white;
  border: none;
  border-radius: 10px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
  display: inline-block;
  text-decoration: none;
  box-shadow: 0 8px 16px -4px var(--primary-glow);
  position: relative;
  overflow: hidden;
  letter-spacing: 0.01em;
}

.btn::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transform: translate(-50%, -50%);
  transition:
    width 0.6s,
    height 0.6s;
}

.btn:hover::after {
  width: 300px;
  height: 300px;
}

.btn:hover {
  background: linear-gradient(135deg, var(--primary-hover), var(--primary));
  transform: translateY(-2px);
  box-shadow: 0 12px 20px -6px var(--primary-glow);
}

.btn:active {
  transform: translateY(0);
  box-shadow: 0 4px 12px -4px var(--primary-glow);
}

/* =============================================
   RESULT BOX
   ============================================= */
.result-box {
  display: none;
  background: linear-gradient(135deg, #eef2ff, #ffffff);
  border: 1px solid #c7d2fe;
  border-radius: 20px;
  padding: 2rem;
  margin-top: 2rem;
  box-shadow: 0 20px 30px -10px rgba(37, 99, 235, 0.1);
}

.result-box.active {
  display: block;
  animation: scaleFadeIn 0.5s cubic-bezier(0.21, 1.11, 0.32, 1.05);
}

.result-title {
  color: var(--primary);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.result-value {
  font-size: clamp(2.5rem, 8vw, 3.5rem);
  font-weight: 800;
  background: linear-gradient(135deg, var(--text-main), var(--primary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.1;
  word-break: break-word;
}

/* =============================================
   ANIMATIONS
   ============================================= */
@keyframes fadeSlideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes scaleFadeIn {
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* =============================================
   SCROLL TO TOP BUTTON
   ============================================= */
.scroll-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 50px;
  height: 50px;
  background: var(--primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: none;
  box-shadow: 0 10px 20px -5px var(--primary-glow);
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.scroll-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.scroll-top:hover {
  background: var(--primary-hover);
  transform: translateY(-5px);
  box-shadow: 0 15px 30px -5px var(--primary-glow);
}

.scroll-top i {
  font-size: 1.2rem;
}

[data-theme="dark"] .scroll-top {
  background: var(--primary-soft);
  box-shadow: 0 10px 25px -10px rgba(0, 0, 0, 0.5);
}

@media (max-width: 768px) {
  .scroll-top {
    bottom: 1.5rem;
    right: 1.5rem;
    width: 45px;
    height: 45px;
  }
}

/* =============================================
   SEO CONTENT SECTIONS
   ============================================= */
.content-section {
  margin-top: 3rem;
}

.content-section h2 {
  font-size: clamp(1.5rem, 4vw, 2rem);
  margin-bottom: 1.25rem;
  color: var(--text-main);
  font-weight: 700;
  letter-spacing: -0.02em;
  position: relative;
  padding-bottom: 0.5rem;
}

.content-section h2::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 50px;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--primary-soft));
  border-radius: 2px;
}

.content-section h3 {
  font-size: 1.2rem;
  margin: 2rem 0 0.75rem;
  color: var(--text-main);
  font-weight: 600;
}

.content-section p {
  margin-bottom: 1.25rem;
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.8;
}

.content-section ul {
  margin-left: 1.5rem;
  margin-bottom: 1.25rem;
  color: var(--text-muted);
}

.content-section li {
  margin-bottom: 0.6rem;
}

.formula-box {
  background: var(--surface-soft);
  border-left: 4px solid var(--primary);
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
  font-family: "JetBrains Mono", "Courier New", monospace;
  font-size: 1rem;
  border-radius: 0 var(--radius) var(--radius) 0;
  box-shadow: var(--shadow);
  color: var(--text-main);
  /* Allow internal scroll for very long formulas, don't let it push page width */
  overflow-x: auto;
  white-space: pre-wrap;
  /* <-- KEY FIX: was 'nowrap' which broke entire page on mobile */
  word-break: break-all;
  max-width: 100%;
}

/* =============================================
   FAQ
   ============================================= */
.faq-section {
  margin-top: 3rem;
}

.faq-item {
  margin-bottom: 1.75rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 1.75rem;
  transition: padding-left 0.2s ease;
}

.faq-item:hover {
  border-bottom-color: var(--primary);
  padding-left: 0.25rem;
}

.faq-item:last-child {
  border-bottom: none;
}

.faq-question {
  font-weight: 600;
  font-size: 1.05rem;
  margin-bottom: 0.6rem;
  color: var(--text-main);
  display: flex;
  gap: 0.5rem;
}

.faq-question::before {
  content: "Q:";
  color: var(--primary);
  font-weight: 800;
  flex-shrink: 0;
}

.faq-answer {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.7;
  padding-left: 1.5rem;
  position: relative;
}

.faq-answer::before {
  content: "A:";
  color: var(--primary-soft);
  font-weight: 600;
  position: absolute;
  left: 0;
  top: 0;
}

/* =============================================
   FOOTER
   ============================================= */


.footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--primary), transparent);
}

/* =============================================
   MISC
   ============================================= */
a {
  transition: var(--transition-fast);
}

::selection {
  background: var(--primary);
  color: white;
}

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* =============================================
   RESPONSIVE â€” TABLET  (â‰¤ 1024px)
   ============================================= */
@media (max-width: 1024px) {
  .search-bar:focus {
    width: 220px;
  }

  .main-layout {
    grid-template-columns: 1fr 260px;
    gap: 2rem;
  }
}

/* =============================================
   RESPONSIVE â€” MEDIUM  (â‰¤ 900px)
   ============================================= */
@media (max-width: 900px) {

  /* Hide desktop nav links + search, show hamburger */
  .nav-links,
  /* Full-width single column layout */
  .main-layout {
    grid-template-columns: 1fr;
  }

  /* Hide sidebar ad on tablet/mobile, it's too tall */
  .sidebar {
    display: none;
  }


}

/* =============================================
   RESPONSIVE â€” MOBILE  (â‰¤ 640px)
   ============================================= */
@media (max-width: 640px) {
  :root {
    --nav-height: 56px;
  }

  .container {
    padding: 1.25rem 1rem;
  }

  .card {
    padding: 1.5rem 1.25rem;
  }

  /* Segmented control: shrink text on tiny screens */
  .box-segmented span {
    padding: 0.5rem 0.85rem;
    font-size: 0.82rem;
  }

  /* Calc grid: single column on tiny phones */
  .fin-grid {
    grid-template-columns: 1fr;
  }

  .result-box {
    padding: 1.5rem 1.25rem;
  }

  .formula-box {
    font-size: 0.85rem;
    padding: 1rem 1.25rem;
  }



  .content-section {
    margin-top: 2rem;
  }



  /* Two-column side-by-side inputs can be very tight; allow wrap */
  div[style*="display: flex"][style*="gap: 1rem"] {
    flex-wrap: wrap;
  }
}

/* =============================================
   RESPONSIVE â€” EXTRA SMALL (â‰¤ 380px)
   ============================================= */
@media (max-width: 380px) {
  .box-segmented span {
    padding: 0.4rem 0.55rem;
    font-size: 0.75rem;
  }

  .card-title {
    font-size: 1.25rem;
  }

  .card {
    padding: 1.1rem 1rem;
  }

  .container {
    padding: 1rem 0.75rem;
  }

  .btn {
    font-size: 0.9rem;
    padding: 0.85rem 1rem;
  }

  .form-label {
    font-size: 0.82rem;
  }

  .input-field {
    padding: 0.75rem 0.85rem;
    font-size: 0.9rem;
  }
}

/* =============================================
   MOBILE FLUID FONT SCALING  (â‰¤ 640px)
   All sizes use clamp() for smooth scaling
   ============================================= */
@media (max-width: 640px) {

  /* Typography */
  body {
    font-size: 0.9rem;
    line-height: 1.55;
  }

  .card-title {
    font-size: clamp(1.2rem, 5vw, 1.65rem);
    letter-spacing: -0.01em;
  }

  .card-desc {
    font-size: clamp(0.85rem, 2.5vw, 1rem);
    line-height: 1.6;
  }

  .form-label {
    font-size: 0.85rem;
    margin-bottom: 0.35rem;
  }

  .input-field {
    padding: 0.75rem 0.9rem;
    font-size: 0.95rem;
    border-radius: 8px;
  }

  .input-with-suffix {
    padding-right: 3.8rem;
  }

  .input-suffix {
    font-size: 0.78rem;
    padding: 0.1rem 0.4rem;
    right: 0.6rem;
  }

  .btn {
    font-size: 0.95rem;
    padding: 0.9rem 1.2rem;
    border-radius: 9px;
  }

  /* Result box font sizes */
  .result-title {
    font-size: 0.75rem;
  }

  .result-value {
    font-size: clamp(2rem, 10vw, 3rem);
  }

  /* Content section */
  .content-section h2 {
    font-size: clamp(1.2rem, 5vw, 1.6rem);
  }

  .content-section h3 {
    font-size: clamp(1rem, 4vw, 1.2rem);
    margin: 1.5rem 0 0.6rem;
  }

  .content-section p,
  .content-section li {
    font-size: clamp(0.82rem, 2.5vw, 0.95rem);
    line-height: 1.7;
  }

  .formula-box {
    font-size: 0.78rem;
    padding: 0.9rem 1rem;
    line-height: 1.5;
  }

  .faq-question {
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
  }

  .faq-answer {
    font-size: 0.85rem;
    line-height: 1.65;
  }



  /* Form group spacing tighter on mobile */
  .form-group {
    margin-bottom: 1.1rem;
  }

  /* Radio inline spacing */


  .radio-inline label {
    font-size: 0.9rem;
  }

  /* Footer */


  /* Card header thinner */


  /* Result box number sub-labels */
  .result-box h3 {
    font-size: 0.95rem;
  }
}

/* =============================================
   CUSTOM CURSOR ORB + HALO
   (Injected via script.js, desktop only)
   ============================================= */
/* Hide default cursor on desktop when using custom orb */
/* Cursor visibility fix: Remove cursor: none !important */
@media (hover: hover) and (pointer: fine) {
  /* System cursor remains visible */
}

/* Main cursor orb â€” snaps instantly to mouse */
#cursor-orb {
  position: fixed;
  top: 0;
  left: 0;
  width: 18px;
  height: 18px;
  background: var(--primary);
  border-radius: 50%;
  pointer-events: none;
  z-index: 99999;
  opacity: 0;
  translate: -50% -50%;
  transition:
    opacity 0.3s ease,
    width 0.25s cubic-bezier(0.21, 1.11, 0.32, 1.05),
    height 0.25s cubic-bezier(0.21, 1.11, 0.32, 1.05),
    background 0.3s ease,
    transform 0.1s ease;
  border: 2px solid rgba(255, 255, 255, 0.8);
  will-change: transform, opacity;
}

/* Explicitly hide orb on Tablet and Mobile */
@media (max-width: 1024px) {
  #cursor-orb {
    display: none !important;
  }
}

/* Color change and slight scale on hover instead of massive growth */
#cursor-orb.hovered {
  width: 24px;
  height: 24px;
  background: #f97316;
  /* Orange hover color for contrast */
  border-color: rgba(255, 255, 255, 1);
}

/* =============================================
   WELLNESS ENHANCEMENTS
   ============================================= */

@media (max-width: 768px) {}

/* =============================================
   GAUGE CHART COMPONENT
   ============================================= */
.gauge-container {
  width: 100%;
  max-width: 450px;
  margin: 1.5rem auto 0.5rem auto;
  position: relative;
  text-align: center;
}

.gauge-svg {
  width: 100%;
  height: auto;
  overflow: visible;
  filter: drop-shadow(0px 8px 12px rgba(0, 0, 0, 0.06));
}

.gauge-segment {
  transition: opacity 0.3s ease;
  cursor: pointer;
}

.gauge-segment:hover {
  opacity: 0.8;
}

/* =============================================
   RESULT ACTION BAR (Copy, Share, Save, Export)
   ============================================= */
.result-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}

.action-btn {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--primary);
  height: 40px;
  padding: 0 1.25rem;
  border-radius: 99px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.action-btn i {
  font-size: 1.05rem;
  color: var(--primary);
  transition: color 0.25s ease;
}

.action-btn:hover {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  transform: scale(1.05);
  box-shadow: 0 6px 12px rgba(37, 99, 235, 0.25);
}

.action-btn:hover i {
  color: white;
}

/* =============================================
   HISTORY & SAVED MANAGER SIDEBAR
   ============================================= */
.calc-manager-overlay {
  position: fixed;
  inset: 0;
  background: rgba(11, 17, 32, 0.4);
  z-index: 10000;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.calc-manager-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.calc-manager-sidebar {
  position: fixed;
  top: 0;
  right: -100%;
  /* Use percentage for better hiding on all screens */
  width: 100%;
  max-width: 400px;
  height: 100vh;
  background: var(--surface);
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.1);
  z-index: 10001;
  transition: right 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
}

.calc-manager-sidebar.open {
  right: 0;
}

@media (max-width: 640px) {
  .calc-manager-sidebar {
    max-width: 100%;
    border-radius: 0;
  }



  .manager-content {
    padding: 1rem;
  }

  .saved-item {
    padding: 1rem;
  }
}

.manager-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.manager-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition-fast);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.manager-close:hover {
  background: var(--border);
  color: var(--text-main);
}

.manager-tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.manager-tab {
  flex: 1;
  padding: 1rem 0;
  text-align: center;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-muted);
  cursor: pointer;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  transition: var(--transition-fast);
}

.manager-tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  background: var(--surface-soft);
}

.manager-content {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem;
  background: var(--bg-color);
}

.manager-panel {
  display: none;
  flex-direction: column;
  gap: 1rem;
}

.manager-panel.active {
  display: flex;
}

.saved-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-fast);
}

.saved-item:hover {
  border-color: var(--primary-soft);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.saved-item-title {
  font-weight: 700;
  color: var(--text-main);
  font-size: 1rem;
  word-break: break-word;
}

.saved-item-date {
  font-size: 0.75rem;
  color: var(--text-light);
  white-space: nowrap;
  margin-left: 0.5rem;
}

.saved-item-expr {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
  background: var(--surface-soft);
  padding: 0.5rem;
  border-radius: 6px;
  border: 1px dashed var(--border);
  word-break: break-word;
}

.saved-item-result {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 1rem;
}

.saved-item-actions {
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
  border-top: 1px solid var(--border);
  padding-top: 0.75rem;
}

.item-btn {
  background: none;
  border: none;
  font-size: 0.9rem;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.4rem;
  border-radius: 4px;
  transition: var(--transition-fast);
}

.item-btn:hover {
  color: var(--primary);
  background: var(--surface-soft);
}

.item-btn.delete {
  color: #ef4444;
}

.item-btn.delete:hover {
  background: #fef2f2;
}

.manager-empty {
  text-align: center;
  color: var(--text-muted);
  padding: 3rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.manager-empty i {
  font-size: 3rem;
  color: var(--border);
}

.clear-history-btn {
  width: 100%;
  padding: 0.75rem;
  background: none;
  border: 1px dashed var(--border);
  color: var(--text-muted);
  border-radius: 8px;
  cursor: pointer;
  transition: var(--transition-fast);
  margin-top: 1rem;
}

.clear-history-btn:hover {
  border-color: #ef4444;
  color: #ef4444;
  background: #fef2f2;
}

/* Nav bar button for manager */
.nav-manager-btn:hover {
  background: var(--primary);
  transform: translateY(-1px);
}

@media (max-width: 640px) {
  .calc-manager-sidebar {
    max-width: 100%;
  }
}

/* =============================================
   CHART SECTION â€” Donut + Line Charts
   ============================================= */
.chart-section {
  display: none;
  max-width: 1050px;
  width: 100%;
  margin: 0 auto 2rem auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem 2rem;
  box-shadow: var(--shadow-card);
  animation: fadeSlideUp 0.5s ease-out;
}

.chart-section.active {
  display: block;
}

.chart-section-title {
  text-align: center;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
}

.chart-section-title i {
  color: var(--primary);
}

.chart-grid {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 2rem;
  align-items: start;
}

@media (max-width: 760px) {
  .chart-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

.chart-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.chart-box-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  text-align: center;
}

.chart-box canvas {
  max-height: 260px;
  width: 100% !important;
}

.chart-box-donut canvas {
  max-width: 320px;
  max-height: 280px;
}

/* Dark mode chart adjustments */
[data-theme="dark"] .chart-section {
  background: #1e293b;
  border-color: #334155;
}

[data-theme="dark"] .chart-box-title {
  color: #94a3b8;
}

/* =============================================
   CUSTOM SEARCHABLE DROPDOWN
   ============================================= */
.custom-dropdown {
  position: relative;
  width: 100%;
  user-select: none;
}

.dropdown-selected {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 1rem;
  color: var(--text-main);
  transition: all 0.2s ease;
}

.selected-text {
  display: flex;
  align-items: center;
}

.currency-flag {
  width: 24px;
  height: 18px;
  object-fit: cover;
  border-radius: 3px;
  margin-right: 0.6rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
  display: block;
  flex-shrink: 0;
  background-color: #f1f5f9;
}

.dropdown-selected:hover {
  border-color: var(--primary-hover);
}

.dropdown-selected i {
  color: var(--text-muted);
  font-size: 0.8rem;
  transition: transform 0.2s ease;
}

.custom-dropdown.open .dropdown-selected i {
  transform: rotate(180deg);
}

.custom-dropdown.open .dropdown-selected {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  margin-top: 0.4rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  display: none;
  flex-direction: column;
}

[data-theme="dark"] .dropdown-menu {
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
}

.custom-dropdown.open .dropdown-menu {
  display: flex;
  animation: dropdownFade 0.2s ease-out;
}

@keyframes dropdownFade {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.dropdown-search {
  padding: 0.75rem;
  border-bottom: 1px solid var(--border);
  background: var(--surface-soft);
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}

.dropdown-search input {
  width: 100%;
  padding: 0.6rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-family: inherit;
  background: var(--bg-main);
  color: var(--text-main);
  outline: none;
  transition: border-color 0.2s;
}

.dropdown-search input:focus {
  border-color: var(--primary);
}

.dropdown-options {
  max-height: 280px;
  overflow-y: auto;
  padding: 0.25rem 0;
}

/* Custom scrollbar for dropdown */
.dropdown-options::-webkit-scrollbar {
  width: 6px;
}

.dropdown-options::-webkit-scrollbar-track {
  background: transparent;
}

.dropdown-options::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}

.dropdown-option {
  padding: 0.6rem 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  font-size: 0.95rem;
  color: var(--text-main);
}

.dropdown-option:hover {
  background: var(--surface-soft);
}

.dropdown-option.selected {
  background: rgba(37, 99, 235, 0.08);
  color: var(--primary);
  font-weight: 600;
}

.dropdown-option strong {
  display: inline-block;
  width: 45px;
  font-weight: 600;
  color: var(--text-main);
}

.dropdown-option.selected strong {
  color: var(--primary);
}

.dropdown-option .country-name {
  color: var(--text-muted);
  margin-left: 0.25rem;
}

/* =============================================
   CHART TIME SELECTOR (Finance Style)
   ============================================= */
.chart-time-selector {
  display: flex;
  gap: 0.25rem;
  background: var(--surface-soft);
  padding: 0.25rem;
  border-radius: 20px;
}

.time-btn {
  padding: 0.35rem 0.8rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: 16px;
  transition: all 0.2s;
  user-select: none;
}

.time-btn:hover {
  color: var(--text-main);
  background: rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] .time-btn:hover {
  background: rgba(255, 255, 255, 0.05);
}

.time-btn.active {
  background: var(--surface);
  color: var(--primary);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] .time-btn.active {
  background: #334155;
  color: #fff;
}

/* Header navigation shortening */
.nav-links .nav-extra {
  display: none;
}

@media (max-width: 1550px) {}


/* Standard Mobile Menu */
.mobile-menu {
  position: fixed;
  top: var(--nav-h);
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--bg-2);
  border-top: 1px solid var(--border-solid);
  z-index: 999;
  padding: 1.25rem 1.25rem 2rem;
  transform: translateX(100%);
  opacity: 0;
  visibility: hidden;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.2);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.mobile-menu.open {
  transform: translateX(0);
  opacity: 1;
  visibility: visible;
}

/* Standard Mobile Search */
.mobile-search-wrap {
  position: relative;
  margin: -1.25rem -1.25rem 1.5rem;
  padding: 1.5rem 1.25rem;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.08), rgba(99, 102, 241, 0.02));
  border-bottom: 1px solid var(--border-solid);
  flex-shrink: 0;
}

.mobile-search-wrap>i {
  position: absolute;
  left: 1.25rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  /* Match image muted color */
  font-size: 1rem;
  z-index: 2;
}

.mobile-search-wrap input {
  width: 100%;
  height: 48px;
  padding: 0 1rem 0 3.5rem;
  background: var(--surface);
  border: 1px solid var(--border-solid);
  border-radius: 99px;
  /* Pill shape */
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 1.1rem;
  outline: none;
  transition: var(--t);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.mobile-search-wrap input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-glow);
  background: var(--surface);
}

.search-results-overlay {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  right: 0;
  background: var(--surface);
  border: 1px solid var(--border-solid);
  border-radius: var(--r);
  box-shadow: var(--shadow-lg);
  z-index: 2000;
  max-height: 420px;
  overflow-y: auto;
  display: none;
}

/* Mobile specific search result adjustments */
.mobile-search-results {
  position: absolute;
  top: calc(100% - 0.5rem);
  left: 1.25rem;
  right: 1.25rem;
  margin-top: 0.5rem;
  max-height: 60vh;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-solid);
  background: var(--surface);
  border-radius: 20px;
  z-index: 1001;
}

[data-theme="dark"] .mobile-search-wrap {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(99, 102, 241, 0.05));
}





/* =============================================
   SEARCH RESULTS
   ============================================= */
.search-results-overlay {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  right: 0;
  background: var(--surface);
  border: 1px solid var(--border-solid);
  border-radius: var(--r);
  box-shadow: var(--shadow-lg);
  z-index: 2000;
  max-height: 420px;
  overflow-y: auto;
  display: none;
}

/* Mobile specific search result adjustments */
.mobile-search-results {
  position: relative;
  top: 0;
  margin-top: 0.5rem;
  max-height: none;
  box-shadow: none;
  border: none;
  background: var(--bg-2);
  padding-bottom: 2rem;
}

.search-results-overlay.active {
  display: block;
}

.search-result-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  color: var(--text-main);
  font-size: 0.95rem;
  font-weight: 500;
  transition: var(--t);
  border-bottom: 1px solid var(--border-solid);
  cursor: pointer;
  text-decoration: none;
}

.search-result-item:last-child {
  border-bottom: none;
}

.search-result-item:hover,
.search-result-item.selected {
  background: var(--accent-glow);
  color: var(--accent);
}


.search-result-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--accent-glow);
  color: var(--accent);
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 1.15rem;
  flex-shrink: 0;
  transition: var(--t);
}

.search-result-icon i {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100%;
  height: 100%;
  margin: 0 !important;
  text-align: center;
}



.search-result-item:hover .search-result-icon,
.search-result-item.selected .search-result-icon {
  background: var(--accent) !important;
  color: white !important;
}


.search-result-icon i {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100%;
  height: 100%;
  margin: 0 !important;
  text-align: center;
}


.search-result-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.search-result-name {
  display: block;
}

.search-result-category {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 400;
}

/* =============================================
   SEARCH NO RESULTS OVERHAUL
   ============================================= */
.search-no-results {
  padding: 1.25rem 1rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  background: linear-gradient(180deg, var(--surface), var(--bg-2));
  border-radius: 20px;
  margin: 0.5rem;
  width: 100%;
  position: relative;
  overflow: hidden;
  animation: scaleFadeIn 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.search-no-results::before {
  content: "";
  position: absolute;
  top: -50px;
  right: -50px;
  width: 150px;
  height: 150px;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  z-index: 0;
  pointer-events: none;
}

.snr-image-wrap {
  width: 90px;
  height: 90px;
  position: relative;
  z-index: 1;
  padding: 8px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border-radius: 50%;
  box-shadow: 0 10px 30px var(--accent-glow);
  animation: snr-heartbeat 2s ease-in-out infinite;
}

.snr-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  background: var(--surface);
  border: 4px solid var(--surface);
}

@keyframes snr-heartbeat {
  0% {
    transform: scale(1);
    box-shadow: 0 10px 30px var(--accent-glow);
  }

  14% {
    transform: scale(1.05);
    box-shadow: 0 15px 40px var(--accent-glow);
  }

  28% {
    transform: scale(1);
    box-shadow: 0 10px 30px var(--accent-glow);
  }

  42% {
    transform: scale(1.05);
    box-shadow: 0 15px 40px var(--accent-glow);
  }

  70% {
    transform: scale(1);
    box-shadow: 0 10px 30px var(--accent-glow);
  }
}

.snr-title {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text-main);
  margin: 0;
  letter-spacing: -0.01em;
  z-index: 1;
}

.snr-sub {
  font-size: 0.9rem;
  color: var(--text-secondary);
  max-width: 300px;
  line-height: 1.6;
  margin: 0;
  z-index: 1;
}

.snr-sub strong {
  color: var(--accent);
  font-weight: 700;
}

.snr-tips {
  margin-top: 0.5rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem;
  padding: 1.25rem 1rem;
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  border: 1px solid var(--border-solid);
  z-index: 1;
  width: 100%;
}

[data-theme="light"] .snr-tips {
  background: rgba(0, 0, 0, 0.02);
}

.snr-tips span {
  width: 100%;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.snr-tips span::before,
.snr-tips span::after {
  content: "";
  height: 1px;
  background: var(--border-solid);
  flex: 1;
}

.snr-tips code {
  background: var(--surface);
  color: var(--text-main);
  padding: 0.5rem 1.1rem;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border: 1px solid var(--border-solid);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
  font-family: var(--font-body);
}

.snr-tips code:hover {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 8px 20px var(--accent-glow);
}

/* Match Financial Tools Container Styling for Small Screens */
@media (max-width: 992px) {
  body main.container {
      max-width: 100% !important;
      width: 100% !important;
      margin: 0 !important;
      padding: 0 1.5rem !important;
  }
}

/* =============================================
   ULTRA-MOBILE OPTIMIZATION (STUNNING AESTHETICS)
   ============================================= */
@media (max-width: 546px) {
    /* HERO TITLE - Maximum Impact */
    h1, .hero-title, .card-title, .hero-title span { font-size: 2.1rem !important; letter-spacing: -0.03em !important; line-height: 1.1 !important; }

    .hero-subtitle { font-size: 1.05rem !important; line-height: 1.6 !important; opacity: 1; }
    .hero-eyebrow { font-size: 0.9rem !important; font-weight: 700 !important; }

    /* Other Typography (Balanced) */
    h2, .section-title, .category-title { font-size: 1.4rem !important; letter-spacing: -0.01em !important; }
    h3 { font-size: 1.2rem !important; }
    h4 { font-size: 1.05rem !important; }
    p, .footer-brand p, .calc-card p, .card-desc { font-size: 0.9rem !important; line-height: 1.6 !important; opacity: 1; }
    a, .nav-links a, .footer-col a, label, .input-label, .form-label, span, .breadcrumb { font-size: 0.85rem !important; }

    /* Spacing & Layout Optimization */
    .container, .navbar-inner, .hero, .footer-inner, .faq-section-wrap, .tool-container, .card {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
        max-width: 100% !important;
        width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    .hero { padding-top: 2rem !important; padding-bottom: 2rem !important; min-height: auto !important; }
    .calc-grid, .grid, .calc-form { gap: 1rem !important; }
    .form-group { gap: 0.4rem !important; }
    
    /* Card & Component Refinement */
    .calc-card, .card, .tool-container, .result-box, .result-main, .result-item {
        padding: 1rem !important;
        border-radius: 14px !important;
        margin-bottom: 0.85rem !important;
    }
    
    .card-header { margin-bottom: 1.25rem !important; }
    .result-box { margin-top: 1.5rem !important; padding-top: 1.5rem !important; }

    /* Form Elements */
    .input-field, .search-bar, select {
        height: 44px !important;
        font-size: 0.95rem !important;
        padding: 0 0.85rem !important;
        border-radius: 10px !important;
    }

    .btn-primary, .btn-ghost, .btn-calculate, .btn-premium {
        height: 46px !important;
        padding: 0 1.25rem !important;
        font-size: 0.95rem !important;
        border-radius: 10px !important;
        width: 100% !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        margin-top: 0.4rem !important;
    }

    /* Icon & Visual Scaling */
    .category-icon, .card-icon-wrap, .logo-icon, .divider-icon-box, .feature-icon-wrap, .step-num {
        width: 36px !important;
        height: 36px !important;
        min-width: 36px !important;
        font-size: 1rem !important;
    }
    
    .logo-text { font-size: 1.1rem !important; }
    
    /* Result Specifics */
    .result-value { font-size: 2.2rem !important; }
    .result-label, .res-label { font-size: 0.75rem !important; }
}

