/*
 * Theme Name: CalculatHub
 * Theme URI: https://calculathub.com
 * Author: CalculatHub Team
 * Author URI: https://calculathub.com
 * Description: Ultra-fast, glassmorphic SaaS WordPress theme for 1000+ interactive calculators. Built with pure PHP 8.x, CSS3, and Vanilla JS. No Elementor. No bloat.
 * Version: 2.0.0
 * Requires at least: 6.0
 * Tested up to: 6.5
 * Requires PHP: 8.0
 * License: GPL-2.0-or-later
 * License URI: https://www.gnu.org/licenses/gpl-2.0.html
 * Text Domain: calculathub
 * Tags: glassmorphism, saas, calculators, dark-mode, pwa
 */

/* ═══════════════════════════════════════════════
   1. DESIGN TOKENS
═══════════════════════════════════════════════ */
:root {
  /* Brand */
  --ch-primary:         #1A5BB9;
  --ch-primary-dark:    #124090;
  --ch-primary-light:   #3D7DD4;
  --ch-accent:          #FF9100;
  --ch-accent-dark:     #D97800;
  --ch-accent-light:    #FFB347;

  /* Glass */
  --ch-glass-bg:        rgba(255,255,255,0.08);
  --ch-glass-border:    rgba(255,255,255,0.18);
  --ch-glass-blur:      blur(15px);
  --ch-glass-shadow:    0 8px 32px rgba(26,91,185,0.18);

  /* Surfaces */
  --ch-surface:         #ffffff;
  --ch-surface-2:       #f4f7fc;
  --ch-surface-3:       #e8eef8;
  --ch-bg:              #f0f4ff;

  /* Text */
  --ch-text:            #0d1b2e;
  --ch-text-muted:      #5a6a84;
  --ch-text-light:      #8fa0b9;

  /* UI */
  --ch-radius:          20px;
  --ch-radius-sm:       10px;
  --ch-radius-lg:       28px;
  --ch-transition:      0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --ch-shadow:          0 4px 24px rgba(26,91,185,0.10);
  --ch-shadow-lg:       0 12px 48px rgba(26,91,185,0.18);

  /* Typography */
  --ch-font:            'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --ch-font-mono:       'JetBrains Mono', 'Courier New', monospace;

  /* Layout */
  --ch-container:       1280px;
  --ch-nav-h:           70px;
}

/* Dark Mode */
[data-theme="dark"] {
  --ch-surface:         #0d1b2e;
  --ch-surface-2:       #13263d;
  --ch-surface-3:       #1a3150;
  --ch-bg:              #091628;
  --ch-text:            #e8f0fe;
  --ch-text-muted:      #8fa0b9;
  --ch-text-light:      #5a6a84;
  --ch-glass-bg:        rgba(255,255,255,0.05);
  --ch-glass-border:    rgba(255,255,255,0.10);
  --ch-glass-shadow:    0 8px 32px rgba(0,0,0,0.40);
}

/* ═══════════════════════════════════════════════
   2. CSS RESET & BASE
═══════════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--ch-font);
  background-color: var(--ch-bg);
  color: var(--ch-text);
  line-height: 1.65;
  transition: background-color var(--ch-transition), color var(--ch-transition);
  overflow-x: hidden;
  min-height: 100vh;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--ch-primary); text-decoration: none; transition: color var(--ch-transition); }
a:hover { color: var(--ch-accent); }
button { font-family: var(--ch-font); cursor: pointer; border: none; background: none; }
ul, ol { list-style: none; }
h1,h2,h3,h4,h5,h6 { font-weight: 700; line-height: 1.25; color: var(--ch-text); }

/* ═══════════════════════════════════════════════
   3. BACKGROUND MATH ANIMATION
═══════════════════════════════════════════════ */
.ch-math-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.ch-math-symbol {
  position: absolute;
  font-size: 1.4rem;
  color: var(--ch-primary);
  opacity: 0.06;
  animation: floatSymbol linear infinite;
  user-select: none;
  filter: blur(0.5px);
}

[data-theme="dark"] .ch-math-symbol { opacity: 0.08; color: var(--ch-primary-light); }

@keyframes floatSymbol {
  0%   { transform: translateY(110vh) rotate(0deg); opacity: 0; }
  5%   { opacity: 0.07; }
  95%  { opacity: 0.07; }
  100% { transform: translateY(-10vh) rotate(720deg); opacity: 0; }
}

/* ═══════════════════════════════════════════════
   4. LAYOUT & CONTAINERS
═══════════════════════════════════════════════ */
.ch-container {
  max-width: var(--ch-container);
  margin: 0 auto;
  padding: 0 24px;
}

/* ── Global Visual Polish ── */
.ch-reveal-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.ch-reveal-up.visible {
  opacity: 1;
  transform: translateY(0);
}

.gradient-text {
  background: var(--ch-accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

/* ── Global Visual Polish & Scroll Animations ── */
.ch-reveal-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.ch-reveal-up.visible {
  opacity: 1;
  transform: translateY(0);
}

.gradient-text {
  background: var(--ch-accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.ch-section { padding: 80px 0; position: relative; }
.ch-section-sm { padding: 48px 0; position: relative; }
main { padding-top: var(--ch-nav-h); min-height: 80vh; position: relative; z-index: 1; }

/* ═══════════════════════════════════════════════
   5. GLASSMORPHISM UTILITIES
═══════════════════════════════════════════════ */
.glass {
  background: var(--ch-glass-bg);
  backdrop-filter: var(--ch-glass-blur);
  -webkit-backdrop-filter: var(--ch-glass-blur);
  border: 1px solid var(--ch-glass-border);
  border-radius: var(--ch-radius);
  box-shadow: var(--ch-glass-shadow);
}

.glass-card {
  background: var(--ch-surface);
  border: 1px solid var(--ch-surface-3);
  border-radius: var(--ch-radius);
  box-shadow: var(--ch-shadow);
  transition: box-shadow var(--ch-transition), transform var(--ch-transition);
}

.glass-card:hover {
  box-shadow: var(--ch-shadow-lg);
  transform: translateY(-4px);
}

/* ═══════════════════════════════════════════════
   6. HEADER / NAV
═══════════════════════════════════════════════ */
.ch-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--ch-nav-h);
  z-index: 1000;
  background: var(--ch-glass-bg);
  backdrop-filter: var(--ch-glass-blur);
  -webkit-backdrop-filter: var(--ch-glass-blur);
  border-bottom: 1px solid var(--ch-glass-border);
  box-shadow: var(--ch-glass-shadow);
  transition: background var(--ch-transition);
}

.ch-header.scrolled {
  background: rgba(255,255,255,0.92);
}
[data-theme="dark"] .ch-header.scrolled {
  background: rgba(9,22,40,0.95);
}

.ch-header__inner {
  display: flex;
  align-items: center;
  gap: 20px;
  height: 100%;
}

.ch-logo {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.ch-logo img {
  height: 40px;
  width: auto;
}

.ch-logo__text {
  font-size: 1.5rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--ch-primary), var(--ch-accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.5px;
}

.ch-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  margin: 0 16px;
}

.ch-nav__link {
  padding: 8px 14px;
  border-radius: var(--ch-radius-sm);
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--ch-text);
  transition: all var(--ch-transition);
}

.ch-nav__link:hover,
.ch-nav__link.active {
  background: var(--ch-primary);
  color: #fff;
}

/* AJAX Search Bar */
.ch-search-wrap {
  flex: 1;
  max-width: 380px;
  position: relative;
}

.ch-search-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--ch-glass-bg);
  border: 1px solid var(--ch-glass-border);
  border-radius: 50px;
  padding: 8px 16px;
  backdrop-filter: blur(10px);
  transition: all var(--ch-transition);
}

.ch-search-bar:focus-within {
  border-color: var(--ch-primary);
  box-shadow: 0 0 0 3px rgba(26,91,185,0.15);
  background: var(--ch-surface);
}

.ch-search-bar input {
  flex: 1;
  border: none;
  background: none;
  outline: none;
  font-size: 0.9rem;
  color: var(--ch-text);
  font-family: var(--ch-font);
}

.ch-search-bar input::placeholder { color: var(--ch-text-muted); }

.ch-search-btn, .ch-voice-btn {
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  color: var(--ch-text-muted);
  transition: all var(--ch-transition);
  flex-shrink: 0;
}

.ch-search-btn:hover, .ch-voice-btn:hover { color: var(--ch-primary); }
.ch-voice-btn.listening { color: var(--ch-accent); animation: pulse 1s infinite; }

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

.ch-search-results.open { display: block; }

.ch-search-result-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--ch-surface-3);
  transition: background var(--ch-transition);
  cursor: pointer;
}

.ch-search-result-item:hover { background: var(--ch-surface-2); }
.ch-search-result-item:last-child { border-bottom: none; }

.ch-search-result-item .icon {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--ch-primary), var(--ch-primary-light));
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.ch-search-result-item .info .title { font-weight: 600; font-size: 0.9rem; }
.ch-search-result-item .info .cat { font-size: 0.75rem; color: var(--ch-text-muted); }

/* Header Actions */
.ch-header__actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.ch-theme-toggle {
  width: 36px; height: 36px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--ch-text-muted);
  transition: all var(--ch-transition);
}

.ch-theme-toggle:hover { color: var(--ch-accent); background: var(--ch-surface-2); }

.ch-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all var(--ch-transition);
  cursor: pointer;
  text-decoration: none;
}

.ch-btn-primary {
  background: linear-gradient(135deg, var(--ch-primary), var(--ch-primary-light));
  color: #fff;
  box-shadow: 0 4px 16px rgba(26,91,185,0.35);
}

.ch-btn-primary:hover {
  box-shadow: 0 8px 24px rgba(26,91,185,0.5);
  transform: translateY(-2px);
  color: #fff;
}

.ch-btn-accent {
  background: linear-gradient(135deg, var(--ch-accent), var(--ch-accent-light));
  color: #fff;
  box-shadow: 0 4px 16px rgba(255,145,0,0.35);
}

.ch-btn-accent:hover {
  box-shadow: 0 8px 24px rgba(255,145,0,0.5);
  transform: translateY(-2px);
  color: #fff;
}

.ch-btn-outline {
  border: 2px solid var(--ch-primary);
  color: var(--ch-primary);
  background: transparent;
}

.ch-btn-outline:hover {
  background: var(--ch-primary);
  color: #fff;
}

.ch-btn-ghost {
  background: var(--ch-glass-bg);
  color: var(--ch-text);
  border: 1px solid var(--ch-glass-border);
  backdrop-filter: blur(10px);
}

.ch-btn-ghost:hover {
  background: var(--ch-primary);
  color: #fff;
  border-color: var(--ch-primary);
}

/* Hamburger */
.ch-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  cursor: pointer;
}

.ch-hamburger span {
  display: block;
  width: 22px; height: 2px;
  background: var(--ch-text);
  border-radius: 2px;
  transition: all var(--ch-transition);
}

.ch-hamburger.open span:nth-child(1) { transform: rotate(45deg) translate(5px,5px); }
.ch-hamburger.open span:nth-child(2) { opacity: 0; }
.ch-hamburger.open span:nth-child(3) { transform: rotate(-45deg) translate(5px,-5px); }

/* Mobile Menu (Slide-out) */
.ch-mobile-menu {
  position: fixed;
  top: 0; bottom: 0; right: 0;
  width: 280px;
  background: var(--ch-glass-bg);
  backdrop-filter: var(--ch-glass-blur);
  -webkit-backdrop-filter: var(--ch-glass-blur);
  border-left: 1px solid var(--ch-glass-border);
  padding: 80px 24px 24px;
  z-index: 1001;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: -8px 0 32px rgba(0,0,0,0.15);
  transform: translateX(100%);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  visibility: hidden;
}

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

.ch-mobile-overlay {
  position: fixed;
  inset: 0;
  background: rgba(13, 27, 46, 0.3);
  backdrop-filter: blur(4px);
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all var(--ch-transition);
}

.ch-mobile-overlay.open {
  opacity: 1;
  visibility: visible;
}
.ch-mobile-menu .ch-nav__link { display: block; padding: 12px 16px; border-radius: var(--ch-radius-sm); }

/* ═══════════════════════════════════════════════
   7. HERO SECTION
═══════════════════════════════════════════════ */
.ch-hero {
  min-height: 92vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  overflow: hidden;
  padding: 60px 24px;
}

.ch-hero__gradient {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(26,91,185,0.12) 0%, transparent 70%),
              radial-gradient(ellipse 50% 40% at 80% 80%, rgba(255,145,0,0.08) 0%, transparent 60%);
  pointer-events: none;
}

.ch-hero__content { position: relative; z-index: 1; max-width: 760px; }

.ch-hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(26,91,185,0.1);
  border: 1px solid rgba(26,91,185,0.25);
  border-radius: 50px;
  padding: 6px 18px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ch-primary);
  margin-bottom: 24px;
  animation: fadeSlideUp 0.6s ease both;
}

.ch-hero h1 {
  font-size: clamp(2.2rem, 5.5vw, 4rem);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -1px;
  margin-bottom: 24px;
  animation: fadeSlideUp 0.6s 0.1s ease both;
}

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

.ch-hero__sub {
  font-size: 1.15rem;
  color: var(--ch-text-muted);
  max-width: 560px;
  margin: 0 auto 36px;
  animation: fadeSlideUp 0.6s 0.2s ease both;
}

.ch-hero__actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  animation: fadeSlideUp 0.6s 0.3s ease both;
}

.ch-hero__search {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--ch-surface);
  border: 1px solid var(--ch-surface-3);
  border-radius: 50px;
  padding: 12px 20px;
  box-shadow: var(--ch-shadow-lg);
  max-width: 520px;
  width: 100%;
  animation: fadeSlideUp 0.6s 0.4s ease both;
  margin-top: 24px;
}

.ch-hero__search input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 1rem;
  background: none;
  color: var(--ch-text);
  font-family: var(--ch-font);
}

.ch-hero__search input::placeholder { color: var(--ch-text-muted); }

.ch-hero__stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
  margin-top: 48px;
  flex-wrap: wrap;
  animation: fadeSlideUp 0.6s 0.5s ease both;
}

.ch-stat { text-align: center; }
.ch-stat__num {
  font-size: 2rem;
  font-weight: 800;
  color: var(--ch-primary);
  letter-spacing: -1px;
}
.ch-stat__label { font-size: 0.8rem; color: var(--ch-text-muted); margin-top: 2px; }

/* ═══════════════════════════════════════════════
   8. BENTO CATEGORY GRID
═══════════════════════════════════════════════ */
.ch-bento-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

@media (max-width: 900px) {
  .ch-bento-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
  .ch-bento-grid { grid-template-columns: 1fr; }
}

.ch-bento-card {
  background: var(--ch-surface);
  border: 1px solid var(--ch-surface-3);
  border-radius: var(--ch-radius);
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: all var(--ch-transition);
  cursor: pointer;
  text-decoration: none;
  color: var(--ch-text);
  position: relative;
  overflow: hidden;
}

.ch-bento-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--ch-primary), var(--ch-accent));
  transform: scaleX(0);
  transition: transform var(--ch-transition);
}

.ch-bento-card:hover { transform: translateY(-6px); box-shadow: var(--ch-shadow-lg); color: var(--ch-text); }
.ch-bento-card:hover::before { transform: scaleX(1); }

.ch-bento-card .icon {
  width: 52px; height: 52px;
  background: linear-gradient(135deg, var(--ch-primary), var(--ch-primary-light));
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  font-size: 1.3rem;
}

.ch-bento-card .name { font-weight: 700; font-size: 1rem; }
.ch-bento-card .count { font-size: 0.8rem; color: var(--ch-text-muted); }

/* ═══════════════════════════════════════════════
   9. CALCULATOR CARDS
═══════════════════════════════════════════════ */
.ch-calc-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

@media (max-width: 1024px) {
  .ch-calc-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
  .ch-calc-grid { grid-template-columns: 1fr; }
}

.ch-calc-card {
  background: var(--ch-surface);
  border: 1px solid var(--ch-surface-3);
  border-radius: var(--ch-radius);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: all var(--ch-transition);
  position: relative;
  overflow: hidden;
}

.ch-calc-card:hover { transform: translateY(-5px); box-shadow: var(--ch-shadow-lg); }

.ch-calc-card__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.ch-calc-card__icon {
  width: 46px; height: 46px;
  background: linear-gradient(135deg, var(--ch-primary), var(--ch-primary-light));
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.ch-calc-card__badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 50px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-premium { background: rgba(255,145,0,0.15); color: var(--ch-accent); }
.badge-free { background: rgba(26,91,185,0.1); color: var(--ch-primary); }
.badge-new { background: rgba(16,185,129,0.1); color: #10b981; }

.ch-calc-card h3 { font-size: 1.05rem; font-weight: 700; line-height: 1.3; }
.ch-calc-card p { font-size: 0.875rem; color: var(--ch-text-muted); line-height: 1.5; flex: 1; }

.ch-calc-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  border-top: 1px solid var(--ch-surface-3);
}

.ch-calc-card__meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.78rem;
  color: var(--ch-text-muted);
}

/* ═══════════════════════════════════════════════
   10. SINGLE CALCULATOR PAGE
═══════════════════════════════════════════════ */
.ch-single-calc {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 32px;
  align-items: start;
}

.ch-calc-area {
  background: var(--ch-surface);
  border: 1px solid var(--ch-surface-3);
  border-radius: var(--ch-radius-lg);
  padding: 32px;
  box-shadow: var(--ch-shadow);
}

.ch-calc-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--ch-surface-3);
}

.ch-calc-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
  border: 1.5px solid var(--ch-surface-3);
  color: var(--ch-text-muted);
  background: var(--ch-surface);
  transition: all var(--ch-transition);
}

.ch-calc-action-btn:hover { border-color: var(--ch-primary); color: var(--ch-primary); }
.ch-calc-action-btn.premium-action { border-color: var(--ch-accent); color: var(--ch-accent); }
.ch-calc-action-btn.premium-action:hover { background: var(--ch-accent); color: #fff; }

/* Premium Lock Overlay */
.ch-premium-lock {
  position: relative;
}

.ch-premium-lock .lock-overlay {
  position: absolute;
  inset: 0;
  background: rgba(var(--ch-bg), 0.85);
  backdrop-filter: blur(8px);
  border-radius: var(--ch-radius);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  z-index: 10;
  text-align: center;
  padding: 32px;
}

.ch-premium-lock .lock-overlay .lock-icon {
  width: 56px; height: 56px;
  background: linear-gradient(135deg, var(--ch-accent), var(--ch-accent-light));
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  font-size: 1.4rem;
}

/* Comparison Mode */
.ch-compare-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

/* Calculator Sidebar */
.ch-calc-sidebar {
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: sticky;
  top: calc(var(--ch-nav-h) + 20px);
}

.ch-sidebar-widget {
  background: var(--ch-surface);
  border: 1px solid var(--ch-surface-3);
  border-radius: var(--ch-radius);
  padding: 20px;
}

.ch-sidebar-widget h4 {
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 14px;
  color: var(--ch-text);
}

/* Ad Placeholder */
.ch-ad-zone {
  background: var(--ch-surface-2);
  border: 1px dashed var(--ch-surface-3);
  border-radius: var(--ch-radius-sm);
  padding: 20px;
  text-align: center;
  font-size: 0.75rem;
  color: var(--ch-text-muted);
}

/* ═══════════════════════════════════════════════
   11. BREADCRUMB
═══════════════════════════════════════════════ */
.ch-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--ch-text-muted);
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.ch-breadcrumb a { color: var(--ch-text-muted); }
.ch-breadcrumb a:hover { color: var(--ch-primary); }
.ch-breadcrumb .sep { color: var(--ch-text-light); }
.ch-breadcrumb .current { color: var(--ch-text); font-weight: 500; }

/* ═══════════════════════════════════════════════
   12. PRICING PAGE
═══════════════════════════════════════════════ */
.ch-pricing-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 48px;
}

.ch-toggle-switch {
  position: relative;
  width: 56px; height: 30px;
}

.ch-toggle-switch input { display: none; }

.ch-toggle-switch label {
  position: absolute;
  inset: 0;
  background: var(--ch-surface-3);
  border-radius: 50px;
  cursor: pointer;
  transition: background var(--ch-transition);
}

.ch-toggle-switch label::after {
  content: '';
  position: absolute;
  top: 3px; left: 3px;
  width: 24px; height: 24px;
  background: #fff;
  border-radius: 50%;
  transition: transform var(--ch-transition);
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.ch-toggle-switch input:checked + label { background: var(--ch-primary); }
.ch-toggle-switch input:checked + label::after { transform: translateX(26px); }

.ch-toggle-label {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--ch-text-muted);
}

.ch-toggle-label.active { color: var(--ch-text); }

.ch-save-badge {
  background: rgba(16,185,129,0.1);
  color: #10b981;
  padding: 3px 10px;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 700;
}

.ch-pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  align-items: start;
}

/* Adaptive Calculator Grid */
.ch-calc-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

@media (max-width: 1200px) {
  .ch-calc-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 992px) {
  .ch-calc-grid { grid-template-columns: repeat(2, 1fr); }
  .ch-pricing-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
  .ch-calc-grid { grid-template-columns: 1fr; }
  .ch-pricing-grid { grid-template-columns: 1fr; }
  
  .ch-btn {
    padding: 14px 20px;
    font-size: 1rem;
  }
  
  input, select, textarea {
    font-size: 16px !important; /* Prevent iOS zoom */
  }
}

.ch-pricing-grid.two-plans {
  grid-template-columns: repeat(2, 1fr);
  max-width: 900px;
  margin: 0 auto;
}

.ch-pricing-card {
  background: var(--ch-surface);
  border: 1px solid var(--ch-surface-3);
  border-radius: var(--ch-radius-lg);
  padding: 36px 30px;
  position: relative;
  transition: all var(--ch-transition);
  text-align: center;
}

.ch-pricing-card:hover { transform: translateY(-6px); box-shadow: var(--ch-shadow-lg); }

.ch-pricing-card.featured {
  background: linear-gradient(160deg, var(--ch-primary), var(--ch-primary-dark));
  border-color: var(--ch-primary);
  color: #fff;
  transform: scale(1.04);
}

.ch-pricing-card.featured:hover { transform: scale(1.04) translateY(-6px); }

.ch-pricing-card.featured h3,
.ch-pricing-card.featured p,
.ch-pricing-card.featured li { color: rgba(255,255,255,0.9); }

/* Premium Orange Glow */
.ch-premium-outer {
  border: 2px solid rgba(255, 145, 0, 0.3) !important;
  box-shadow: 0 0 20px rgba(255, 145, 0, 0.15), var(--ch-shadow) !important;
  position: relative;
}

.ch-premium-outer::after {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: var(--ch-radius-lg);
  padding: 2px;
  background: linear-gradient(135deg, var(--ch-accent), transparent, var(--ch-accent-light));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  opacity: 0.5;
}

.ch-premium-outer:hover {
  box-shadow: 0 0 30px rgba(255, 145, 0, 0.3), var(--ch-shadow-lg) !important;
  border-color: rgba(255, 145, 0, 0.6) !important;
}

.premium-subtitle {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--ch-accent);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: -8px;
  margin-bottom: 8px;
}

/* Trust Icons */
.ch-trust-icons {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
  margin-top: 50px;
  padding: 24px;
  border-top: 1px solid var(--ch-glass-border);
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ch-text-muted);
}

.trust-item i {
  font-size: 1.4rem;
  color: var(--ch-text-light);
}

.ch-best-value {
  position: absolute;
  top: -14px; left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, var(--ch-accent), var(--ch-accent-light));
  color: #fff;
  padding: 4px 20px;
  border-radius: 50px;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.ch-pricing-card .tier-name {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--ch-primary);
  margin-bottom: 8px;
}

.ch-pricing-card.featured .tier-name { color: rgba(255,255,255,0.7); }

.ch-price {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 4px;
  margin: 16px 0;
}

.ch-price .amount { font-size: 3rem; font-weight: 900; line-height: 1; }
.ch-price .period { font-size: 0.85rem; color: var(--ch-text-muted); padding-bottom: 6px; }
.ch-pricing-card.featured .ch-price .period { color: rgba(255,255,255,0.65); }

.ch-pricing-features {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 28px 0;
  text-align: left;
}

.ch-pricing-features li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  color: var(--ch-text-muted);
}

.ch-pricing-features li .check { color: #10b981; flex-shrink: 0; }
.ch-pricing-features li .cross { color: var(--ch-text-light); flex-shrink: 0; }
.ch-pricing-card.featured .ch-pricing-features li { color: rgba(255,255,255,0.85); }

/* Comparison Table */
.ch-comparison-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin-top: 60px;
}

.ch-comparison-table th,
.ch-comparison-table td {
  padding: 16px 20px;
  text-align: center;
  border-bottom: 1px solid var(--ch-surface-3);
}

.ch-comparison-table th { font-size: 0.85rem; font-weight: 700; }
.ch-comparison-table td:first-child { text-align: left; font-weight: 500; }
.ch-comparison-table th:nth-child(3) { background: rgba(26,91,185,0.06); }
.ch-comparison-table td:nth-child(3) { background: rgba(26,91,185,0.03); }
.ch-comparison-table .check-icon { color: #10b981; }
.ch-comparison-table .cross-icon { color: var(--ch-text-light); }

/* FAQ */
.ch-faq {
  max-width: 720px;
  margin: 60px auto 0;
}

.ch-faq-item {
  border: 1px solid var(--ch-surface-3);
  border-radius: var(--ch-radius-sm);
  margin-bottom: 12px;
  overflow: hidden;
}

.ch-faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  cursor: pointer;
  font-weight: 600;
  background: var(--ch-surface);
  transition: background var(--ch-transition);
}

.ch-faq-question:hover { background: var(--ch-surface-2); }
.ch-faq-question .arrow { transition: transform var(--ch-transition); color: var(--ch-text-muted); }
.ch-faq-item.open .ch-faq-question .arrow { transform: rotate(180deg); }

.ch-faq-answer {
  display: none;
  padding: 0 24px 18px;
  font-size: 0.9rem;
  color: var(--ch-text-muted);
  background: var(--ch-surface);
  line-height: 1.7;
}

.ch-faq-item.open .ch-faq-answer { display: block; }

/* ═══════════════════════════════════════════════
   13. FOOTER
═══════════════════════════════════════════════ */
.ch-footer {
  background: var(--ch-surface-2);
  border-top: 1px solid var(--ch-surface-3);
  padding: 64px 0 0;
}

.ch-footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.8fr;
  gap: 40px;
  padding-bottom: 48px;
}

.ch-footer__brand .tagline {
  font-size: 0.9rem;
  color: var(--ch-text-muted);
  margin: 12px 0 20px;
  line-height: 1.6;
}

.ch-social-links {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ch-social-link {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--ch-surface);
  border: 1px solid var(--ch-surface-3);
  display: flex; align-items: center; justify-content: center;
  color: var(--ch-text-muted);
  font-size: 0.9rem;
  transition: all var(--ch-transition);
}

.ch-social-link:hover { background: var(--ch-primary); color: #fff; border-color: var(--ch-primary); }

.ch-footer__col h5 {
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.ch-footer__links {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ch-footer__links a {
  font-size: 0.875rem;
  color: var(--ch-text-muted);
  transition: color var(--ch-transition);
}

.ch-footer__links a:hover { color: var(--ch-primary); }

.ch-newsletter-form {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.ch-newsletter-form input {
  flex: 1;
  padding: 10px 16px;
  border: 1px solid var(--ch-surface-3);
  border-radius: 50px;
  background: var(--ch-surface);
  font-size: 0.875rem;
  color: var(--ch-text);
  font-family: var(--ch-font);
  outline: none;
  transition: border-color var(--ch-transition);
}

.ch-newsletter-form input:focus { border-color: var(--ch-primary); }

.ch-footer__bottom {
  border-top: 1px solid var(--ch-surface-3);
  padding: 20px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.ch-footer__bottom p { font-size: 0.85rem; color: var(--ch-text-muted); }

/* ═══════════════════════════════════════════════
   14. QUICK-CALC FLOATING WIDGET
═══════════════════════════════════════════════ */
.ch-quick-calc {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 9999;
}

.ch-quick-calc__fab {
  width: 58px; height: 58px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--ch-primary), var(--ch-accent));
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem;
  box-shadow: 0 0 15px rgba(255, 145, 0, 0.5);
  cursor: pointer;
  transition: all var(--ch-transition);
  border: none;
  animation: chPulse 2s infinite;
}

@keyframes chPulse {
  0% { box-shadow: 0 0 0 0 rgba(255, 145, 0, 0.6); }
  70% { box-shadow: 0 0 0 15px rgba(255, 145, 0, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 145, 0, 0); }
}

.ch-quick-calc__fab:hover { transform: scale(1.1); box-shadow: 0 10px 32px rgba(255,145,0,0.8); animation: none; }

.ch-qc-overlay {
  position: fixed;
  inset: 0;
  background: rgba(13, 27, 46, 0.4);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 9998;
  opacity: 0;
  visibility: hidden;
  transition: all var(--ch-transition);
}

.ch-qc-overlay.open {
  opacity: 1;
  visibility: visible;
}

.ch-quick-calc__panel {
  position: absolute;
  bottom: 72px;
  right: 0;
  width: 280px;
  background: var(--ch-surface);
  border: 1px solid var(--ch-surface-3);
  border-radius: var(--ch-radius-lg);
  box-shadow: var(--ch-shadow-lg);
  overflow: hidden;
  display: none;
  animation: panelSlideUp 0.2s ease;
}

.ch-quick-calc__panel.open { display: block; }

@keyframes panelSlideUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

.ch-quick-calc__display {
  background: linear-gradient(135deg, var(--ch-primary), var(--ch-primary-dark));
  padding: 20px;
  text-align: right;
  min-height: 80px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.ch-quick-calc__expr { font-size: 0.8rem; color: rgba(255,255,255,0.6); min-height: 20px; }
.ch-quick-calc__result { font-size: 2rem; font-weight: 700; color: #fff; font-family: var(--ch-font-mono); }

.ch-quick-calc__btns {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--ch-surface-3);
}

.ch-quick-calc__btn {
  padding: 16px;
  background: var(--ch-surface);
  font-size: 1rem;
  font-weight: 600;
  color: var(--ch-text);
  transition: background var(--ch-transition);
  cursor: pointer;
  border: none;
  font-family: var(--ch-font-mono);
}

.ch-quick-calc__btn:hover { background: var(--ch-surface-2); }
.ch-quick-calc__btn.op { color: var(--ch-primary); }
.ch-quick-calc__btn.clear { color: #ef4444; }
.ch-quick-calc__btn.equals { background: var(--ch-primary); color: #fff; }
.ch-quick-calc__btn.equals:hover { background: var(--ch-primary-dark); }

/* ═══════════════════════════════════════════════
   15. DASHBOARD PAGE
═══════════════════════════════════════════════ */
.ch-dashboard {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 32px;
  min-height: 600px;
}

.ch-dashboard__sidebar {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ch-dashboard__tab {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: var(--ch-radius-sm);
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--ch-text-muted);
  cursor: pointer;
  transition: all var(--ch-transition);
  border: none;
  background: none;
  width: 100%;
  text-align: left;
}

.ch-dashboard__tab:hover { background: var(--ch-surface-2); color: var(--ch-text); }
.ch-dashboard__tab.active { background: var(--ch-primary); color: #fff; }

.ch-dashboard__content { min-height: 400px; }
.ch-dashboard__panel { display: none; }
.ch-dashboard__panel.active { display: block; }

/* ═══════════════════════════════════════════════
   16. ADMIN STYLES (FRONT-FACING OVERLAYS)
═══════════════════════════════════════════════ */
.ch-embed-modal {
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: rgba(0,0,0,0.6);
  display: none;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
}

.ch-embed-modal.open { display: flex; }

.ch-embed-modal__box {
  background: var(--ch-surface);
  border-radius: var(--ch-radius-lg);
  padding: 36px;
  width: 100%;
  max-width: 560px;
  box-shadow: var(--ch-shadow-lg);
  position: relative;
}

.ch-embed-modal__close {
  position: absolute;
  top: 16px; right: 16px;
  width: 32px; height: 32px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--ch-text-muted);
  transition: all var(--ch-transition);
  cursor: pointer;
}

.ch-embed-modal__close:hover { background: var(--ch-surface-3); color: var(--ch-text); }

.ch-code-box {
  background: var(--ch-surface-2);
  border: 1px solid var(--ch-surface-3);
  border-radius: var(--ch-radius-sm);
  padding: 16px;
  font-family: var(--ch-font-mono);
  font-size: 0.82rem;
  color: var(--ch-text);
  word-break: break-all;
  margin: 16px 0;
}

/* ═══════════════════════════════════════════════
   17. ANIMATIONS & KEYFRAMES
═══════════════════════════════════════════════ */
@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(-8px); }
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255,145,0,0.4); }
  50%       { box-shadow: 0 0 0 8px rgba(255,145,0,0); }
}

@keyframes spin { to { transform: rotate(360deg); } }

.ch-reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.ch-reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ═══════════════════════════════════════════════
   18. FILTERS / TAG PILLS
═══════════════════════════════════════════════ */
.ch-filter-pills {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}

.ch-pill {
  padding: 7px 18px;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 500;
  border: 1.5px solid var(--ch-surface-3);
  color: var(--ch-text-muted);
  background: var(--ch-surface);
  cursor: pointer;
  transition: all var(--ch-transition);
}

.ch-pill:hover, .ch-pill.active {
  background: var(--ch-primary);
  border-color: var(--ch-primary);
  color: #fff;
}

/* ═══════════════════════════════════════════════
   19. UTILITY CLASSES
═══════════════════════════════════════════════ */
.text-center { text-align: center; }
.text-muted { color: var(--ch-text-muted); }
.text-sm { font-size: 0.875rem; }
.text-xs { font-size: 0.75rem; }
.fw-bold { font-weight: 700; }
.fw-900 { font-weight: 900; }
.mb-0 { margin-bottom: 0; }
.mt-0 { margin-top: 0; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mb-32 { margin-bottom: 32px; }
.pt-0 { padding-top: 0; }
.pb-0 { padding-bottom: 0; }
.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-8 { gap: 8px; }
.gap-16 { gap: 16px; }
.gap-24 { gap: 24px; }
.w-100 { width: 100%; }
.gradient-text {
  background: linear-gradient(135deg, var(--ch-primary), var(--ch-accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); border: 0;
}

/* Section Headers */
.ch-section-header { text-align: center; margin-bottom: 56px; }
.ch-section-header .label {
  display: inline-block;
  background: rgba(26,91,185,0.08);
  color: var(--ch-primary);
  border: 1px solid rgba(26,91,185,0.2);
  border-radius: 50px;
  padding: 5px 18px;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 12px;
}

.ch-section-header h2 {
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  font-weight: 900;
  letter-spacing: -0.5px;
  margin-bottom: 14px;
}

.ch-section-header p {
  font-size: 1.05rem;
  color: var(--ch-text-muted);
  max-width: 560px;
  margin: 0 auto;
}

/* Back to top */
.ch-back-top {
  width: 42px; height: 42px;
  border-radius: 50%;
  background: var(--ch-primary);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  border: none;
  box-shadow: 0 4px 16px rgba(26,91,185,0.35);
  transition: all var(--ch-transition);
  opacity: 0; visibility: hidden;
}

.ch-back-top.visible { opacity: 1; visibility: visible; }
.ch-back-top:hover { background: var(--ch-primary-dark); transform: translateY(-2px); }

/* Premium CTA stripe */
.ch-premium-stripe {
  background: linear-gradient(135deg, var(--ch-primary), var(--ch-primary-dark));
  border-radius: var(--ch-radius-lg);
  padding: 56px 48px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.ch-premium-stripe::before {
  content: '';
  position: absolute;
  top: -50%; right: -10%;
  width: 400px; height: 400px;
  background: rgba(255,145,0,0.12);
  border-radius: 50%;
}

.ch-premium-stripe h2, .ch-premium-stripe p { color: #fff; }
.ch-premium-stripe p { opacity: 0.8; margin: 16px auto 32px; max-width: 440px; }

/* ═══════════════════════════════════════════════
   20. RESPONSIVE
═══════════════════════════════════════════════ */
@media (max-width: 1100px) {
  .ch-bento-grid { grid-template-columns: repeat(2, 1fr); }
  .ch-calc-grid { grid-template-columns: repeat(2, 1fr); }
  .ch-footer__grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .ch-single-calc { grid-template-columns: 1fr; }
  .ch-calc-sidebar { position: static; }
  .ch-pricing-grid { grid-template-columns: 1fr; max-width: 420px; margin: 0 auto; }
  .ch-pricing-card.featured { transform: scale(1); }
}

@media (max-width: 768px) {
  :root { --ch-nav-h: 60px; }
  .ch-header { height: var(--ch-nav-h); }
  .ch-logo img { height: 32px; }
  .ch-nav { display: none; }
  .ch-search-wrap { display: none; }
  .ch-hamburger { display: flex; }
  .ch-bento-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .ch-calc-grid { grid-template-columns: 1fr; }
  .ch-compare-wrap { grid-template-columns: 1fr; }
  .ch-dashboard { grid-template-columns: 1fr; }
  .ch-footer__grid { grid-template-columns: 1fr; }
  .ch-section { padding: 48px 0; }
  .ch-hero { min-height: 80vh; }
  .ch-hero h1 { font-size: 2.22rem; }
  .ch-hero__stats { gap: 24px; }
  
  /* Touch-friendly inputs */
  .ch-btn, input, select, textarea {
    min-height: 48px;
    padding: 12px 20px !important;
    font-size: 16px !important; /* Prevent iOS zoom */
  }
}

@media (max-width: 480px) {
  .ch-container { padding: 0 16px; }
  .ch-bento-grid { grid-template-columns: 1fr; gap: 10px; }
  .ch-hero h1 { font-size: 1.8rem; letter-spacing: -0.5px; }
  .ch-btn { width: 100%; justify-content: center; }
  .ch-quick-calc { bottom: 16px; right: 16px; }
  .ch-quick-calc__fab { width: 50px; height: 50px; font-size: 1.1rem; }
}

/* ═══════════════════════════════════════════════
   21. PRINT STYLES
═══════════════════════════════════════════════ */
@media print {
  .ch-header, .ch-footer, .ch-quick-calc,
  .ch-calc-actions, .ch-calc-sidebar, .ch-ad-zone { display: none !important; }
  main { padding-top: 0; }
  body { background: #fff; color: #000; }
  .ch-calc-area { box-shadow: none; border: 1px solid #ddd; }
}
/* ═══════════════════════════════════════════════
   22. ADVANCED INTEGRATIONS (SEO & PRICING)
═══════════════════════════════════════════════ */

/* Breadcrumbs bar */
.ch-breadcrumbs-bar {
  background: var(--ch-surface-2);
  border-bottom: 1px solid var(--ch-surface-3);
  padding: 12px 0;
  font-size: 0.85rem;
}
.ch-breadcrumbs-bar a { color: var(--ch-text-muted); }
.ch-breadcrumbs-bar a:hover { color: var(--ch-primary); }
.ch-breadcrumbs-bar span { color: var(--ch-text-light); }
.ch-breadcrumbs-bar i { margin: 0 8px; font-size: 0.7rem; opacity: 0.5; }

/* Pricing Toggle */
.ch-pricing-toggle-wrap {
  display: flex; align-items: center; justify-content: center; gap: 16px;
  font-weight: 600;
}
.ch-pricing-toggle-wrap .active { color: var(--ch-primary); }
.ch-switch {
  position: relative; display: inline-block; width: 50px; height: 26px;
}
.ch-switch input { opacity: 0; width: 0; height: 0; }
.ch-slider {
  position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0;
  background-color: var(--ch-surface-3); transition: .4s; border-radius: 34px;
}
.ch-slider:before {
  position: absolute; content: ""; height: 18px; width: 18px; left: 4px; bottom: 4px;
  background-color: white; transition: .4s; border-radius: 50%;
}
input:checked + .ch-slider { background-color: var(--ch-primary); }
input:checked + .ch-slider:before { transform: translateX(24px); }

/* Pricing Card Enhancements */
.ch-pricing-card {
  transition: transform var(--ch-transition), box-shadow var(--ch-transition);
}
.ch-pricing-card:hover { transform: translateY(-8px); box-shadow: var(--ch-shadow-lg); }
.ch-pricing-card--popular {
  border: 2px solid var(--ch-primary);
  position: relative;
}
.popular-tag {
  position: absolute; top: -14px; left: 50%; transform: translateX(-50%);
  background: var(--ch-primary); color: #fff; padding: 4px 16px;
  border-radius: 20px; font-size: 0.75rem; font-weight: 700;
}
.ch-pricing-card .price { font-size: 2.5rem; font-weight: 800; margin: 16px 0; }
.ch-pricing-card .val { color: var(--ch-primary); }
.ch-pricing-card .dur { font-size: 1rem; color: var(--ch-text-muted); }
.ch-pricing-card ul.features { list-style: none; padding: 0; margin-bottom: 24px; text-align: left; }
.ch-pricing-card ul.features li { margin-bottom: 12px; font-size: 0.9rem; }
.ch-pricing-card ul.features li i { color: var(--ch-primary); margin-right: 8px; width: 16px; }

/* Security protection */
.ch-calc-protected { user-select: none; -webkit-user-select: none; }
/* Logo Styling */
.ch-logo__img {
  max-height: 60px;
  width: auto;
  transition: transform 0.3s ease-in-out;
  display: block;
}
.ch-logo:hover .ch-logo__img { transform: scale(1.05); }

/* Mobile Menu Header */
.ch-mobile-menu__header {
  padding: 20px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--ch-surface-3);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Login Page Logo constraint */
body.login #login h1 a {
  max-width: 100%;
}

/* ── Ultra-Modern Floating Calculator ── */
.ch-quick-calc {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 2000;
}

.ch-quick-calc__fab {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3b82f6, var(--ch-accent));
  color: #fff;
  display: flex !important; align-items: center; justify-content: center;
  font-size: 1.5rem;
  cursor: pointer;
  box-shadow: 0 0 20px rgba(59, 130, 246, 0.4);
  border: 2px solid rgba(255,255,255,0.2);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  animation: chPulseGlow 3s infinite;
}

@keyframes chPulseGlow {
  0% { transform: scale(1); box-shadow: 0 0 20px rgba(59, 130, 246, 0.4); }
  50% { transform: scale(1.05); box-shadow: 0 0 30px rgba(255, 145, 100, 0.6); }
  100% { transform: scale(1); box-shadow: 0 0 20px rgba(59, 130, 246, 0.4); }
}

.ch-quick-calc__fab:hover { transform: scale(1.1) rotate(5deg); }

.ch-qc-overlay {
  position: fixed;
  inset: 0;
  background: rgba(13, 27, 46, 0.4);
  backdrop-filter: blur(8px);
  z-index: 1999;
  opacity: 0; visibility: hidden;
  transition: all 0.4s ease;
}

.ch-qc-overlay.open { opacity: 1; visibility: visible; }

.ch-quick-calc__panel {
  position: absolute;
  bottom: 85px; right: 0;
  width: 350px;
  background: var(--ch-glass-bg);
  backdrop-filter: blur(20px);
  border: 1px solid var(--ch-glass-border);
  border-radius: 24px;
  box-shadow: var(--ch-shadow-lg);
  transform: translateY(20px) scale(0.95);
  opacity: 0; visibility: hidden;
  transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
  overflow: hidden;
}

.ch-quick-calc__panel.open {
  transform: translateY(0) scale(1);
  opacity: 1; visibility: visible;
}

/* Mobile Hamburger Animation */
.ch-hamburger span {
  transition: transform 0.3s ease, opacity 0.3s ease;
}
.ch-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.ch-hamburger.open span:nth-child(2) { opacity: 0; }
.ch-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Adaptive Grid System */
.ch-calc-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

@media (max-width: 1200px) { .ch-calc-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 992px)  { .ch-calc-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px)  { .ch-calc-grid { grid-template-columns: 1fr; } }
