/* ===========================
   Infinite Calculators
   Premium Design System
   =========================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

:root {
  /* Primary - Deep Ocean Blue */
  --primary-50:  #eff6ff;
  --primary-100: #dbeafe;
  --primary-200: #bfdbfe;
  --primary-300: #93c5fd;
  --primary-400: #60a5fa;
  --primary-500: #2563eb;
  --primary-600: #1d4ed8;
  --primary-700: #1e40af;
  --primary-800: #1e3a8a;
  --primary-900: #172554;

  /* Accent - Warm Amber */
  --accent-50:  #fffbeb;
  --accent-100: #fef3c7;
  --accent-200: #fde68a;
  --accent-300: #fcd34d;
  --accent-400: #fbbf24;
  --accent-500: #f59e0b;

  /* Success */
  --success-50:  #ecfdf5;
  --success-100: #d1fae5;
  --success-500: #10b981;
  --success-700: #047857;

  /* Error */
  --error-50:  #fef2f2;
  --error-100: #ffe4e6;
  --error-500: #ef4444;
  --error-700: #b91c1c;

  /* Warning */
  --warning-50:  #fffbeb;
  --warning-100: #fef3c7;
  --warning-500: #f59e0b;

  /* Neutrals */
  --gray-50:  #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e1;
  --gray-400: #94a3b8;
  --gray-500: #64748b;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1e293b;
  --gray-900: #0f172a;
  --gray-950: #020617;

  /* Surfaces */
  --bg:         #f8fafc;
  --surface:    #ffffff;
  --surface-2:  #f1f5f9;
  --border:     #e2e8f0;
  --border-2:   #cbd5e1;

  /* Text */
  --text-primary:   #0f172a;
  --text-secondary: #475569;
  --text-muted:     #94a3b8;
  --text-inverse:   #ffffff;

  /* Shadows - Layered for depth */
  --shadow-xs:  0 1px 2px rgba(0,0,0,0.05);
  --shadow-sm:  0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md:  0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -2px rgba(0,0,0,0.05);
  --shadow-lg:  0 10px 15px -3px rgba(0,0,0,0.07), 0 4px 6px -4px rgba(0,0,0,0.05);
  --shadow-xl:  0 20px 25px -5px rgba(0,0,0,0.08), 0 8px 10px -6px rgba(0,0,0,0.04);
  --shadow-2xl: 0 25px 50px -12px rgba(0,0,0,0.15);
  --shadow-inner: inset 0 2px 4px rgba(0,0,0,0.04);
  --shadow-glow: 0 0 20px rgba(37,99,235,0.15);
  --shadow-glow-lg: 0 0 40px rgba(37,99,235,0.2);

  /* Radii */
  --radius-xs: 6px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-2xl: 32px;
  --radius-full: 9999px;

  /* Transitions */
  --t-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --t:      0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --t-slow: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  --t-spring: 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ===========================
   RESET & BASE
=========================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--gray-50);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11';
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { font-family: inherit; }

/* Typography Scale */
h1 {
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.03em;
  color: var(--text-primary);
}
h2 {
  font-size: clamp(1.5rem, 3.5vw, 2.25rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}
h3 {
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}
p {
  color: var(--text-secondary);
  line-height: 1.75;
  font-size: 0.975rem;
}

/* ===========================
   HEADER / NAVIGATION
=========================== */
.site-header {
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid rgba(226,232,240,0.6);
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: box-shadow var(--t);
}
.site-header.scrolled {
  box-shadow: 0 4px 30px rgba(0,0,0,0.06);
}

.nav-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.nav-logo {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--primary-700);
  display: flex;
  align-items: center;
  gap: 10px;
  letter-spacing: -0.03em;
  transition: color var(--t);
}
.nav-logo:hover { color: var(--primary-500); }

.logo-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--primary-500), var(--primary-700));
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.1rem;
  font-weight: 900;
  box-shadow: 0 2px 8px rgba(37,99,235,0.3);
  position: relative;
}
.logo-icon::after {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(255,255,255,0.2), transparent);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
}
.nav-links a {
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--gray-500);
  transition: all var(--t-fast);
  position: relative;
}
.nav-links a:hover {
  color: var(--primary-600);
  background: var(--primary-50);
}
.nav-links a.active {
  color: var(--primary-600);
  background: var(--primary-50);
  font-weight: 600;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 10px;
  border: none;
  background: transparent;
  border-radius: var(--radius-sm);
  transition: background var(--t-fast);
}
.nav-toggle:hover { background: var(--gray-100); }
.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--gray-700);
  border-radius: 2px;
  transition: all var(--t);
  transform-origin: center;
}

/* ===========================
   HERO
=========================== */
.hero {
  position: relative;
  padding: 100px 32px 120px;
  text-align: center;
  overflow: hidden;
  background: linear-gradient(160deg, #f0f7ff 0%, #dbeafe 30%, #e0f2fe 60%, #f0f9ff 100%);
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 20% 20%, rgba(37,99,235,0.06) 0%, transparent 70%),
    radial-gradient(ellipse 50% 40% at 80% 80%, rgba(14,165,233,0.05) 0%, transparent 70%);
  pointer-events: none;
}
.hero::after {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(37,99,235,0.04) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.hero-content {
  max-width: 820px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(37,99,235,0.15);
  border-radius: var(--radius-full);
  padding: 6px 18px 6px 8px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--primary-700);
  margin-bottom: 28px;
  box-shadow: var(--shadow-sm);
  animation: fadeInDown 0.6s ease;
}
.hero-badge-dot {
  width: 8px;
  height: 8px;
  background: var(--success-500);
  border-radius: 50%;
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}
@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero h1 {
  margin-bottom: 24px;
  animation: fadeInUp 0.7s ease;
}
.hero h1 span {
  background: linear-gradient(135deg, var(--primary-500), var(--primary-700));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--gray-600);
  max-width: 600px;
  margin: 0 auto 44px;
  line-height: 1.75;
  animation: fadeInUp 0.8s ease;
}

.hero-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  animation: fadeInUp 0.9s ease;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 56px;
  margin-top: 72px;
  padding-top: 40px;
  border-top: 1px solid rgba(37,99,235,0.1);
  flex-wrap: wrap;
  animation: fadeInUp 1s ease;
}
.stat-item { text-align: center; }
.stat-number {
  font-size: 2rem;
  font-weight: 900;
  background: linear-gradient(135deg, var(--primary-500), var(--primary-700));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.1;
}
.stat-label {
  font-size: 0.78rem;
  color: var(--gray-400);
  margin-top: 6px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ===========================
   BUTTONS
=========================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all var(--t);
  text-decoration: none;
  font-family: inherit;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}
.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.1) 0%, transparent 50%);
  pointer-events: none;
}

.btn-primary {
  background: linear-gradient(180deg, var(--primary-500), var(--primary-600));
  color: white;
  box-shadow:
    0 1px 2px rgba(37,99,235,0.3),
    0 4px 12px rgba(37,99,235,0.2),
    inset 0 1px 0 rgba(255,255,255,0.15);
}
.btn-primary:hover {
  background: linear-gradient(180deg, var(--primary-400), var(--primary-500));
  box-shadow:
    0 2px 4px rgba(37,99,235,0.3),
    0 8px 24px rgba(37,99,235,0.25),
    inset 0 1px 0 rgba(255,255,255,0.15);
  transform: translateY(-2px);
}

.btn-secondary {
  background: white;
  color: var(--gray-700);
  border: 1.5px solid var(--gray-200);
  box-shadow: var(--shadow-sm);
}
.btn-secondary:hover {
  border-color: var(--primary-300);
  background: var(--primary-50);
  color: var(--primary-600);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-lg {
  padding: 16px 36px;
  font-size: 1rem;
  border-radius: var(--radius-lg);
  font-weight: 700;
}

.btn:active { transform: translateY(0) !important; }

/* ===========================
   LAYOUT
=========================== */
.section    { padding: 96px 32px; }
.section-sm { padding: 64px 32px; }
.container    { max-width: 1280px; margin: 0 auto; }
.container-sm { max-width: 800px; margin: 0 auto; }

.section-header {
  text-align: center;
  margin-bottom: 56px;
}
.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--primary-50);
  color: var(--primary-600);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 6px 16px;
  border-radius: var(--radius-full);
  margin-bottom: 16px;
  border: 1px solid var(--primary-100);
}
.section-header h2 { margin-bottom: 16px; }
.section-header p {
  max-width: 540px;
  margin: 0 auto;
  font-size: 1.05rem;
  color: var(--gray-500);
}

/* ===========================
   CALCULATOR CARDS GRID
=========================== */
.calc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

.calc-card {
  background: var(--surface);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 32px;
  transition: all var(--t-slow);
  position: relative;
  overflow: hidden;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
}
.calc-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary-500), var(--primary-400));
  opacity: 0;
  transition: opacity var(--t);
}
.calc-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, var(--primary-50) 0%, transparent 40%);
  opacity: 0;
  transition: opacity var(--t-slow);
  pointer-events: none;
}
.calc-card:hover {
  border-color: var(--primary-300);
  box-shadow: var(--shadow-xl), var(--shadow-glow);
  transform: translateY(-6px);
}
.calc-card:hover::before { opacity: 1; }
.calc-card:hover::after  { opacity: 1; }

.card-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  margin-bottom: 20px;
  position: relative;
  z-index: 1;
  box-shadow: var(--shadow-sm);
}
.card-icon.blue   { background: linear-gradient(135deg, #dbeafe, #bfdbfe); }
.card-icon.green  { background: linear-gradient(135deg, #d1fae5, #a7f3d0); }
.card-icon.orange { background: linear-gradient(135deg, #ffedd5, #fed7aa); }
.card-icon.sky    { background: linear-gradient(135deg, #e0f2fe, #bae6fd); }
.card-icon.rose   { background: linear-gradient(135deg, #ffe4e6, #fecdd3); }
.card-icon.teal   { background: linear-gradient(135deg, #ccfbf1, #99f6e4); }

.calc-card h3 {
  color: var(--text-primary);
  margin-bottom: 10px;
  font-size: 1.1rem;
  position: relative;
  z-index: 1;
}
.calc-card p {
  font-size: 0.875rem;
  line-height: 1.65;
  position: relative;
  z-index: 1;
  flex: 1;
}
.card-arrow {
  margin-top: 24px;
  color: var(--primary-500);
  font-weight: 600;
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
  z-index: 1;
  transition: gap var(--t);
}
.card-arrow svg {
  width: 16px;
  height: 16px;
  transition: transform var(--t);
}
.calc-card:hover .card-arrow { gap: 12px; }
.calc-card:hover .card-arrow svg { transform: translateX(3px); }

/* ===========================
   CALCULATOR PAGE HERO
=========================== */
.calc-page-hero {
  position: relative;
  background: linear-gradient(160deg, #f0f7ff 0%, #dbeafe 40%, #e0f2fe 70%, #f0f9ff 100%);
  padding: 56px 32px 40px;
  text-align: center;
  overflow: hidden;
}
.calc-page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 30% 30%, rgba(37,99,235,0.05) 0%, transparent 70%),
    radial-gradient(ellipse 40% 40% at 70% 70%, rgba(14,165,233,0.04) 0%, transparent 70%);
  pointer-events: none;
}
.calc-page-hero h1 {
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  color: var(--text-primary);
  margin-bottom: 14px;
  position: relative;
}
.calc-page-hero p {
  max-width: 560px;
  margin: 0 auto;
  font-size: 1rem;
  position: relative;
}
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  color: var(--gray-400);
  margin-bottom: 20px;
  justify-content: center;
  position: relative;
}
.breadcrumb a {
  color: var(--primary-500);
  font-weight: 600;
  transition: color var(--t-fast);
}
.breadcrumb a:hover { color: var(--primary-700); }

/* ===========================
   CALCULATOR WIDGET
=========================== */
.calc-widget-section {
  padding: 48px 32px 64px;
  margin-top: -16px;
  position: relative;
  z-index: 2;
}

.calc-widget {
  background: var(--surface);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-xl);
  padding: 44px;
  max-width: 580px;
  margin: 0 auto;
  box-shadow:
    var(--shadow-xl),
    0 0 0 1px rgba(255,255,255,0.8),
    inset 0 1px 0 rgba(255,255,255,0.9);
  position: relative;
}
.calc-widget::before {
  content: '';
  position: absolute;
  top: 0;
  left: 32px;
  right: 32px;
  height: 3px;
  background: linear-gradient(90deg, var(--primary-400), var(--primary-600), var(--primary-400));
  border-radius: 0 0 3px 3px;
}

.calc-widget-title {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 32px;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Form Elements */
.form-group { margin-bottom: 22px; }
.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 8px;
  letter-spacing: 0.01em;
}
.form-group input,
.form-group select {
  width: 100%;
  padding: 13px 18px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  font-family: inherit;
  color: var(--text-primary);
  background: var(--surface);
  transition: all var(--t-fast);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  box-shadow: var(--shadow-inner);
}
.form-group input:focus,
.form-group select:focus {
  border-color: var(--primary-400);
  box-shadow: 0 0 0 4px rgba(37,99,235,0.1), var(--shadow-inner);
}
.form-group input::placeholder { color: var(--gray-400); }
.form-group input.err {
  border-color: var(--error-500);
  box-shadow: 0 0 0 4px rgba(239,68,68,0.08);
}
.input-hint {
  font-size: 0.75rem;
  color: var(--gray-400);
  margin-top: 6px;
  font-weight: 500;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.calc-btn {
  width: 100%;
  padding: 16px;
  background: linear-gradient(180deg, var(--primary-500), var(--primary-600));
  color: white;
  border: none;
  border-radius: var(--radius-md);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: all var(--t);
  margin-top: 10px;
  box-shadow:
    0 1px 2px rgba(37,99,235,0.3),
    0 4px 14px rgba(37,99,235,0.25),
    inset 0 1px 0 rgba(255,255,255,0.15);
  letter-spacing: 0.01em;
  position: relative;
  overflow: hidden;
}
.calc-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.1) 0%, transparent 50%);
  pointer-events: none;
}
.calc-btn:hover {
  background: linear-gradient(180deg, var(--primary-400), var(--primary-500));
  box-shadow:
    0 2px 4px rgba(37,99,235,0.3),
    0 8px 24px rgba(37,99,235,0.3),
    inset 0 1px 0 rgba(255,255,255,0.15);
  transform: translateY(-2px);
}
.calc-btn:active { transform: translateY(0); }

/* Result Box */
.result-box {
  display: none;
  background: linear-gradient(160deg, var(--primary-50), #e0f2fe, var(--primary-50));
  border: 1.5px solid rgba(37,99,235,0.15);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin-top: 28px;
  animation: resultSlideUp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  overflow: hidden;
}
.result-box::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--primary-400), var(--primary-600));
}
.result-box.show { display: block; }

@keyframes resultSlideUp {
  from { opacity: 0; transform: translateY(16px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.result-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--primary-600);
  margin-bottom: 8px;
}
.result-value {
  font-size: 2.6rem;
  font-weight: 900;
  color: var(--text-primary);
  line-height: 1.1;
  letter-spacing: -0.03em;
}
.result-category {
  display: inline-block;
  margin-top: 12px;
  padding: 5px 16px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.result-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 14px;
  margin-top: 8px;
}
.result-item {
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.6);
  border-radius: var(--radius-md);
  padding: 16px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: transform var(--t-fast), box-shadow var(--t-fast);
}
.result-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.result-item-value {
  font-size: 1.35rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary-500), var(--primary-700));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.result-item-label {
  font-size: 0.7rem;
  color: var(--gray-400);
  margin-top: 4px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.result-desc {
  margin-top: 14px;
  font-size: 0.875rem;
  color: var(--gray-600);
  line-height: 1.7;
}

/* BMI Meter */
.bmi-meter-wrap { margin-top: 20px; }
.bmi-meter {
  height: 12px;
  border-radius: var(--radius-full);
  background: linear-gradient(to right,
    #3b82f6 0%, #22c55e 20%, #10b981 35%, #f59e0b 55%, #f97316 70%, #ef4444 85%, #dc2626 100%);
  position: relative;
  box-shadow: var(--shadow-inner);
}
.bmi-pointer {
  position: absolute;
  top: -6px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: white;
  border: 3px solid var(--gray-800);
  transform: translateX(-50%);
  transition: left 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.bmi-pointer::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 6px;
  height: 6px;
  background: var(--primary-500);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}
.bmi-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  font-size: 0.62rem;
  color: var(--gray-400);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* ===========================
   CONTENT / PROSE
=========================== */
.content-section {
  padding: 64px 32px;
}
.content-section.alt {
  background: var(--surface);
  border-top: 1px solid var(--gray-100);
  border-bottom: 1px solid var(--gray-100);
}
.prose {
  max-width: 760px;
  margin: 0 auto;
}
.prose h2 {
  color: var(--text-primary);
  margin: 48px 0 16px;
  position: relative;
  padding-left: 18px;
}
.prose h2::before {
  content: '';
  position: absolute;
  left: 0;
  top: 4px;
  bottom: 4px;
  width: 4px;
  background: linear-gradient(180deg, var(--primary-500), var(--primary-300));
  border-radius: 2px;
}
.prose h2:first-child { margin-top: 0; }
.prose h3 {
  color: var(--text-primary);
  margin: 32px 0 12px;
}
.prose p { margin-bottom: 18px; }
.prose ul {
  list-style: none;
  padding-left: 0;
  margin-bottom: 18px;
}
.prose ul li {
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 8px;
  padding-left: 24px;
  position: relative;
}
.prose ul li::before {
  content: '';
  position: absolute;
  left: 4px;
  top: 10px;
  width: 8px;
  height: 8px;
  background: var(--primary-100);
  border: 2px solid var(--primary-400);
  border-radius: 50%;
}

.formula-box {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-left: 4px solid var(--primary-500);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: 20px 24px;
  margin: 24px 0;
  font-family: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
  font-size: 0.88rem;
  color: var(--text-primary);
  line-height: 1.8;
  box-shadow: var(--shadow-sm);
}

/* ===========================
   FAQ
=========================== */
.faq-section { padding: 80px 32px; }
.faq-list {
  max-width: 760px;
  margin: 48px auto 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.faq-item {
  background: var(--surface);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: all var(--t);
}
.faq-item:hover {
  border-color: var(--gray-300);
  box-shadow: var(--shadow-md);
}
.faq-item.open {
  border-color: var(--primary-200);
  box-shadow: var(--shadow-md), 0 0 0 3px rgba(37,99,235,0.06);
}
.faq-question {
  width: 100%;
  text-align: left;
  padding: 20px 24px;
  background: transparent;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--gray-700);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  transition: color var(--t-fast);
}
.faq-question:hover { color: var(--primary-600); }
.faq-item.open .faq-question { color: var(--primary-600); }

.faq-icon {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  transition: all var(--t);
  color: var(--gray-400);
  line-height: 1;
  background: var(--surface);
}
.faq-item.open .faq-icon {
  transform: rotate(45deg);
  background: var(--primary-500);
  border-color: var(--primary-500);
  color: white;
}
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 0 24px;
}
.faq-item.open .faq-answer {
  max-height: 400px;
  padding: 0 24px 24px;
}
.faq-answer p {
  font-size: 0.9rem;
  line-height: 1.8;
  border-top: 1px solid var(--gray-100);
  padding-top: 16px;
  color: var(--gray-600);
}

/* ===========================
   RELATED CALCULATORS
=========================== */
.related-section {
  padding: 64px 32px;
  background: var(--surface);
  border-top: 1px solid var(--gray-100);
}
.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
  margin-top: 36px;
}
.related-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: all var(--t);
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--gray-700);
}
.related-card:hover {
  background: var(--primary-50);
  border-color: var(--primary-200);
  color: var(--primary-600);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}
.rc-icon { font-size: 1.3rem; flex-shrink: 0; }

/* ===========================
   FEATURES SECTION
=========================== */
.features-section {
  background: var(--surface);
  padding: 96px 32px;
  border-top: 1px solid var(--gray-100);
}
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 40px;
  margin-top: 56px;
}
.feature-item {
  text-align: center;
  padding: 12px;
}
.feature-icon {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, var(--primary-50), var(--primary-100));
  border: 1px solid var(--primary-100);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  margin: 0 auto 20px;
  box-shadow: var(--shadow-sm);
  transition: transform var(--t-spring), box-shadow var(--t);
}
.feature-item:hover .feature-icon {
  transform: translateY(-4px) scale(1.05);
  box-shadow: var(--shadow-lg);
}
.feature-item h3 {
  margin-bottom: 10px;
  color: var(--text-primary);
  font-size: 1.05rem;
}
.feature-item p {
  font-size: 0.875rem;
  color: var(--gray-500);
}

/* ===========================
   FOOTER
=========================== */
.site-footer {
  background: var(--gray-900);
  color: var(--gray-300);
  padding: 72px 32px 0;
  position: relative;
}
.site-footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary-400), var(--primary-600), var(--primary-400));
}

.footer-grid {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.6fr repeat(3, 1fr);
  gap: 56px;
  padding-bottom: 56px;
}
.footer-brand .nav-logo {
  color: white;
  margin-bottom: 16px;
}
.footer-brand .nav-logo .logo-icon {
  background: linear-gradient(135deg, var(--primary-500), var(--primary-700));
}
.footer-brand p {
  font-size: 0.875rem;
  color: var(--gray-400);
  line-height: 1.8;
  max-width: 280px;
}
.footer-col h4 {
  color: white;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 20px;
}
.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.footer-col ul li a {
  color: var(--gray-400);
  font-size: 0.875rem;
  transition: all var(--t-fast);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.footer-col ul li a:hover {
  color: white;
  transform: translateX(4px);
}
.footer-bottom {
  max-width: 1280px;
  margin: 0 auto;
  padding: 24px 0;
  border-top: 1px solid rgba(255,255,255,0.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.footer-bottom p {
  font-size: 0.78rem;
  color: var(--gray-500);
}
.footer-bottom a {
  color: var(--gray-400);
  font-size: 0.78rem;
  transition: color var(--t-fast);
}
.footer-bottom a:hover { color: white; }

/* ===========================
   CATEGORY TAGS
=========================== */
.tag-normal     { background: #d1fae5; color: #065f46; }
.tag-underweight{ background: #dbeafe; color: #1e40af; }
.tag-overweight { background: #ffedd5; color: #92400e; }
.tag-obese      { background: #ffe4e6; color: #9f1239; }
.tag-profit     { background: #d1fae5; color: #065f46; }
.tag-loss       { background: #ffe4e6; color: #9f1239; }
.tag-break-even { background: #e0f2fe; color: #0c4a6e; }

/* ===========================
   EMI BREAKDOWN BARS
=========================== */
.emi-breakdown { margin-top: 20px; }
.emi-bar-wrap { margin-bottom: 12px; }
.emi-bar-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 6px;
}
.emi-bar-track {
  height: 12px;
  background: var(--gray-100);
  border-radius: var(--radius-full);
  overflow: hidden;
  box-shadow: var(--shadow-inner);
}
.emi-bar-fill {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.bar-principal {
  background: linear-gradient(90deg, var(--primary-400), var(--primary-600));
}
.bar-interest {
  background: linear-gradient(90deg, var(--accent-300), var(--accent-500));
}

/* ===========================
   DISCOUNT SAVINGS HIGHLIGHT
=========================== */
.savings-highlight {
  background: linear-gradient(135deg, #d1fae5, #a7f3d0);
  border: 1.5px solid #6ee7b7;
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  margin-top: 20px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.savings-highlight::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.3), transparent);
  pointer-events: none;
}
.savings-highlight .savings-text {
  font-size: 0.8rem;
  font-weight: 700;
  color: #065f46;
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  position: relative;
}
.savings-highlight .savings-amount {
  font-size: 2rem;
  font-weight: 900;
  color: #059669;
  position: relative;
}

/* ===========================
   RESPONSIVE
=========================== */
@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 40px; }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: rgba(255,255,255,0.98);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--gray-200);
    flex-direction: column;
    padding: 12px 20px 20px;
    gap: 2px;
    box-shadow: var(--shadow-2xl);
  }
  .nav-links.open { display: flex; }
  .nav-links a { display: block; padding: 12px 16px; width: 100%; border-radius: var(--radius-sm); }
  .nav-toggle { display: flex; }

  .hero { padding: 64px 20px 80px; }
  .hero-stats { gap: 32px; }
  .calc-widget { padding: 32px 24px; }
  .form-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .footer-brand { grid-column: 1 / -1; }
  .result-value { font-size: 2rem; }
  .section { padding: 64px 20px; }
}

@media (max-width: 520px) {
  .hero-actions { flex-direction: column; align-items: center; }
  .footer-grid { grid-template-columns: 1fr; }
  .calc-grid { grid-template-columns: 1fr; }
  .hero-stats { gap: 24px; }
  .nav-container { padding: 0 16px; }
  .calc-widget { padding: 24px 18px; border-radius: var(--radius-lg); }
  .calc-widget::before { left: 18px; right: 18px; }
}
