/* Calculatorz Global — Senior UI/UX Design System
   Modern, Trustworthy, Ultra-Fast, System-Font Aesthetics (Stripe/Linear/Wise inspired) */

:root {
  /* Brand Palette */
  --primary: #0284c7;
  --primary-hover: #0369a1;
  --primary-gradient: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  --primary-glow: rgba(2, 132, 199, 0.25);
  --primary-light: #f0f9ff;
  --primary-subtle: #e0f2fe;
  --primary-dark: #075985;

  /* Neutrals (Slate / Zinc scale) */
  --surface: #ffffff;
  --background: #f8fafc;
  --surface-alt: #f1f5f9;
  --text-main: #0f172a;
  --text-body: #334155;
  --text-muted: #64748b;
  --text-subtle: #94a3b8;
  --border-light: #e2e8f0;
  --border-subtle: #cbd5e1;

  /* Semantic Highlights */
  --success: #10b981;
  --success-bg: #ecfdf5;
  --success-border: #a7f3d0;
  --success-dark: #065f46;
  --warning: #f59e0b;
  --warning-bg: #fffbeb;
  --danger: #ef4444;
  --danger-bg: #fef2f2;
  --danger-border: #fecaca;

  /* Geometry & Layout */
  --radius-xs: 6px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --max-width: 1180px;

  /* Refined Layered Elevation Shadows */
  --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 4px 6px -1px rgba(15, 23, 42, 0.07), 0 2px 4px -2px rgba(15, 23, 42, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(15, 23, 42, 0.08), 0 4px 6px -4px rgba(15, 23, 42, 0.04);
  --shadow-xl: 0 20px 25px -5px rgba(15, 23, 42, 0.08), 0 8px 10px -6px rgba(15, 23, 42, 0.03);
  --shadow-card: 0 0 0 1px rgba(15, 23, 42, 0.06), 0 2px 4px rgba(15, 23, 42, 0.03), 0 12px 24px -4px rgba(15, 23, 42, 0.05);
  --shadow-glow: 0 0 0 4px rgba(2, 132, 199, 0.15);

  --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset & Global Typography */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, -apple-system, system-ui, sans-serif;
  color: var(--text-body);
  background-color: var(--background);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Smooth background mesh for premium feel */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100vw;
  height: 600px;
  background: radial-gradient(circle at 50% -100px, rgba(2, 132, 199, 0.07) 0%, rgba(2, 132, 199, 0.02) 40%, transparent 70%);
  pointer-events: none;
  z-index: -1;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}
a:hover {
  color: var(--primary-hover);
}

/* Header & Navigation Bar */
.site-header {
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 2px 0 rgba(15, 23, 42, 0.02);
}
.header-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text-main);
  text-decoration: none;
  letter-spacing: -0.02em;
}
.brand-logo-icon {
  width: 36px;
  height: 36px;
  background: var(--primary-gradient);
  color: #fff;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 1.2rem;
  box-shadow: 0 2px 8px var(--primary-glow);
  flex-shrink: 0;
}
.brand-name-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}
.brand-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-main);
}
.brand-tag {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--primary);
  letter-spacing: 0.08em;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.nav-link {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
  padding: 0.45rem 0.75rem;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.nav-link:hover {
  color: var(--text-main);
  background: var(--surface-alt);
  text-decoration: none;
}
.nav-link.active {
  color: var(--primary);
  background: var(--primary-light);
  box-shadow: inset 0 0 0 1px var(--primary-subtle);
  text-decoration: none;
}

/* Country Navigation Pills */
.country-pill-btn {
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.35rem 0.65rem;
  border-radius: 9999px;
  background: #fff;
  border: 1px solid var(--border-light);
  color: var(--text-body);
  transition: all var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.country-pill-btn:hover, .country-pill-btn.active {
  background: var(--primary-light);
  border-color: var(--primary-subtle);
  color: var(--primary-dark);
  text-decoration: none;
}

/* Main Container */
main {
  flex: 1;
  max-width: var(--max-width);
  width: 100%;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem 1.5rem;
}

/* Breadcrumbs with subtle glass chip */
.breadcrumbs-nav {
  margin-bottom: 1.5rem;
}
.breadcrumbs-list {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  list-style: none;
  font-size: 0.82rem;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.7);
  padding: 0.35rem 0.85rem;
  border-radius: 9999px;
  border: 1px solid var(--border-light);
}
.breadcrumbs-list a {
  color: var(--text-muted);
  font-weight: 500;
}
.breadcrumbs-list a:hover {
  color: var(--primary);
}
.breadcrumbs-separator {
  color: var(--text-subtle);
  font-size: 0.75rem;
}

/* Page Intro & Meta Headers */
.page-header-block {
  margin-bottom: 2rem;
}
.badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--primary-light);
  color: var(--primary-dark);
  border: 1px solid var(--primary-subtle);
  padding: 0.3rem 0.85rem;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: 9999px;
  margin-bottom: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Modern High-Vibe Hero Badge Pill */
.hero-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  background: linear-gradient(135deg, rgba(2, 132, 199, 0.09) 0%, rgba(99, 102, 241, 0.09) 100%);
  color: #0369a1;
  border: 1px solid rgba(2, 132, 199, 0.24);
  padding: 0.42rem 1.15rem;
  border-radius: 9999px;
  margin-bottom: 1.35rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  box-shadow: 0 4px 14px -3px rgba(2, 132, 199, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  cursor: default;
}
.hero-badge-pill:hover {
  border-color: rgba(2, 132, 199, 0.45);
  box-shadow: 0 6px 20px -3px rgba(2, 132, 199, 0.24);
  transform: translateY(-1px);
}
.badge-pulse-indicator {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 10px;
  height: 10px;
}
.badge-pulse-ring {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: #10b981;
  opacity: 0.75;
  animation: badge-ring-pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}
.badge-pulse-dot {
  position: relative;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #059669;
}
@keyframes badge-ring-pulse {
  0% { transform: scale(0.95); opacity: 0.85; }
  60% { transform: scale(2.3); opacity: 0; }
  100% { transform: scale(0.95); opacity: 0; }
}
.badge-lead-text {
  font-weight: 800;
  color: #0284c7;
  letter-spacing: 0.04em;
}
.badge-dot-sep {
  color: #94a3b8;
  font-weight: 500;
  font-size: 0.85rem;
}
.badge-sub-text {
  color: #475569;
  font-weight: 600;
}
@media (max-width: 640px) {
  .hero-badge-pill {
    font-size: 0.72rem;
    padding: 0.35rem 0.85rem;
    gap: 0.45rem;
  }
}
h1 {
  font-size: 2.35rem;
  line-height: 1.2;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 1rem;
  letter-spacing: -0.03em;
}
.page-lead-intro {
  font-size: 1.08rem;
  line-height: 1.7;
  color: var(--text-muted);
  max-width: 900px;
}
.page-lead-intro p {
  margin-bottom: 0.75rem;
}

/* E-E-A-T Verified Trust Bar */
.eeat-meta-box {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  font-size: 0.84rem;
  color: var(--text-body);
  margin-top: 1.25rem;
  padding: 0.75rem 1.15rem;
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xs);
}
.eeat-meta-item {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}
.verified-icon {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--success-bg);
  border: 1px solid var(--success-border);
  color: var(--success);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 900;
}

/* Calculator Card UI */
.calculator-card-container {
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
  padding: 2.25rem;
  margin: 1.75rem 0 2.5rem 0;
  position: relative;
  overflow: hidden;
}
.calculator-card-container::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--primary-gradient);
}
.calc-header-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 1.25rem;
  margin-bottom: 1.75rem;
  gap: 1rem;
}
.calc-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.02em;
}

/* Segmented Unit Toggle Switch */
.unit-toggle-group {
  display: inline-flex;
  background: var(--surface-alt);
  border-radius: 9999px;
  padding: 4px;
  border: 1px solid var(--border-light);
}
.unit-toggle-btn {
  background: transparent;
  border: none;
  padding: 0.45rem 1.15rem;
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: 9999px;
  transition: all var(--transition-fast);
}
.unit-toggle-btn.active {
  background: #ffffff;
  color: var(--primary);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.1);
}

/* Split Workbench (Easy to Use: Inputs Left, Live Results Right) */
.calc-workbench-split {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 2.25rem;
  align-items: start;
}
@media (max-width: 900px) {
  .calc-workbench-split {
    grid-template-columns: 1fr;
    gap: 1.75rem;
  }
}
.calc-inputs-pane {
  display: flex;
  flex-direction: column;
}
.calc-results-pane {
  position: sticky;
  top: 5rem;
}

/* Embedded Input Unit Badges (e.g. 70 [kg], 175 [cm]) */
.input-with-badge {
  position: relative;
  display: flex;
  align-items: center;
}
.input-with-badge .form-input {
  padding-right: 3.25rem;
  font-weight: 600;
}
.input-unit-badge {
  position: absolute;
  right: 0.75rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  background: var(--surface-alt);
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-xs);
  pointer-events: none;
  border: 1px solid var(--border-light);
}

/* Quick 1-Tap Preset Value Chips */
.quick-preset-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.preset-chip {
  background: var(--surface-alt);
  border: 1px solid var(--border-light);
  border-radius: 9999px;
  padding: 0.2rem 0.65rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-body);
  cursor: pointer;
  transition: all var(--transition-fast);
}
.preset-chip:hover {
  background: var(--primary-light);
  border-color: var(--primary-subtle);
  color: var(--primary-dark);
}

/* Stat Metric Callout Cards */
.metric-callout-card {
  background: #ffffff;
  padding: 1.25rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-xs);
  display: flex;
  flex-direction: column;
}
.metric-callout-label {
  font-size: 0.75rem;
  color: #047857;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.metric-callout-val {
  font-size: 2rem;
  font-weight: 900;
  color: #047857;
  margin-top: 0.25rem;
  letter-spacing: -0.03em;
  line-height: 1.1;
}
.metric-callout-sub {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

/* Goal Chips */
.goal-chip-card {
  background: #ffffff;
  border: 1px solid var(--border-light);
  padding: 0.75rem 0.65rem;
  border-radius: var(--radius-sm);
  text-align: center;
  box-shadow: var(--shadow-xs);
}
.goal-chip-title {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
}
.goal-chip-val {
  font-size: 1.15rem;
  font-weight: 800;
  margin-top: 0.2rem;
  letter-spacing: -0.02em;
}

/* Percentage Callout */
.pct-live-callout {
  padding: 1rem 1.25rem;
  background: var(--primary-light);
  border: 1px solid var(--primary-subtle);
  border-radius: var(--radius-md);
  font-size: 1.08rem;
}
.pct-big-num {
  color: #047857;
  font-weight: 900;
  font-size: 1.45rem;
}

/* Form Controls */
.calc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}
.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.form-label {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.01em;
}
.form-hint {
  font-size: 0.76rem;
  color: var(--text-subtle);
}
.form-input, .form-select {
  padding: 0.75rem 1rem;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  font-size: 0.98rem;
  color: var(--text-main);
  background: #ffffff;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  width: 100%;
}
.form-input:focus, .form-select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: var(--shadow-glow);
}

/* Biological Sex Buttons */
.gender-radio-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}
.gender-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  background: #ffffff;
  cursor: pointer;
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--text-body);
  transition: all var(--transition-fast);
}
.gender-btn:hover {
  background: var(--surface-alt);
}
.gender-btn.active {
  background: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary-dark);
  box-shadow: inset 0 0 0 1px var(--primary);
}

/* Buttons */
.calc-action-bar {
  margin-top: 1.75rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}
.btn-primary {
  background: var(--primary-gradient);
  color: #ffffff;
  border: none;
  padding: 0.85rem 1.85rem;
  font-size: 0.96rem;
  font-weight: 700;
  border-radius: var(--radius-sm);
  cursor: pointer;
  box-shadow: 0 4px 12px var(--primary-glow);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), opacity var(--transition-fast);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  letter-spacing: -0.01em;
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(2, 132, 199, 0.35);
  color: #ffffff;
  text-decoration: none;
}
.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background: var(--surface-alt);
  color: var(--text-body);
  border: 1px solid var(--border-light);
  padding: 0.85rem 1.5rem;
  font-size: 0.96rem;
  font-weight: 700;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.btn-secondary:hover {
  background: #e2e8f0;
  color: var(--text-main);
  text-decoration: none;
}

/* Results Display Dashboard */
.calc-results-box {
  margin-top: 2rem;
  padding: 1.75rem;
  background: linear-gradient(180deg, #f0fdf4 0%, #ecfdf5 100%);
  border: 1px solid var(--success-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  display: none;
  animation: fadeIn 0.3s ease-out;
}
.calc-results-box.visible {
  display: block;
}

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

.stat-large-num {
  font-size: 2.6rem;
  font-weight: 900;
  color: #047857;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

/* TDEE Table */
.tdee-table-container {
  overflow-x: auto;
  margin-top: 1.25rem;
  background: #ffffff;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-xs);
}
.tdee-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  text-align: left;
}
.tdee-table th {
  background: #f8fafc;
  padding: 0.85rem 1.15rem;
  border-bottom: 1px solid var(--border-light);
  font-weight: 700;
  color: var(--text-muted);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.tdee-table td {
  padding: 0.85rem 1.15rem;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-body);
}
.tdee-table tr:last-child td {
  border-bottom: none;
}
.tdee-table tr.active-row {
  background: #f0f9ff;
  font-weight: 700;
  color: var(--primary-dark);
}
.tdee-table tr.active-row td:first-child::before {
  content: "● ";
  color: var(--primary);
}

/* Content Sections (How-To, Formula, FAQs) */
.editorial-content-section {
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 2.25rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-sm);
}
.editorial-content-section h2 {
  font-size: 1.6rem;
  font-weight: 800;
  margin-bottom: 1.25rem;
  color: var(--text-main);
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.editorial-content-section h3 {
  font-size: 1.22rem;
  font-weight: 700;
  margin: 1.5rem 0 0.65rem 0;
  color: var(--text-main);
  letter-spacing: -0.01em;
}
.editorial-content-section p {
  margin-bottom: 1.15rem;
  color: var(--text-body);
  line-height: 1.75;
}
.editorial-content-section ol, .editorial-content-section ul {
  margin: 0 0 1.5rem 1.5rem;
  color: var(--text-body);
  line-height: 1.75;
}
.editorial-content-section li {
  margin-bottom: 0.65rem;
}

/* FAQ Accordion Styling */
.faq-accordion-group {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-top: 1.25rem;
}
.faq-item {
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  background: #ffffff;
  overflow: hidden;
  transition: all var(--transition-fast);
}
.faq-item:hover {
  border-color: var(--border-subtle);
  box-shadow: var(--shadow-xs);
}
.faq-summary {
  padding: 1.15rem 1.35rem;
  font-weight: 700;
  font-size: 1.02rem;
  color: var(--text-main);
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
  background: #ffffff;
  transition: background var(--transition-fast);
}
.faq-summary::-webkit-details-marker {
  display: none;
}
.faq-summary::after {
  content: "+";
  font-size: 1.35rem;
  font-weight: 400;
  color: var(--primary);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform var(--transition-fast);
}
details[open] .faq-summary::after {
  content: "−";
  background: var(--surface-alt);
  color: var(--text-muted);
}
.faq-body {
  padding: 1.15rem 1.35rem;
  color: var(--text-body);
  line-height: 1.75;
  border-top: 1px solid var(--border-light);
  background: #fafafa;
}

/* Ad Placement Containers */
.ad-placement {
  margin: 2rem auto;
  text-align: center;
  max-width: 100%;
  clear: both;
}
.ad-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-subtle);
  margin-bottom: 0.4rem;
}
.ad-placeholder {
  background: #f8fafc;
  border: 1px dashed var(--border-subtle);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  transition: border-color var(--transition-fast);
}
.ad-placeholder-text {
  font-size: 0.82rem;
  color: var(--text-subtle);
  font-weight: 600;
}

/* Homepage Hero & Country Cards Grid */
.home-hero-section {
  text-align: center;
  padding: 3.5rem 1rem 2.5rem 1rem;
}
.home-hero-title {
  font-size: 3.2rem;
  line-height: 1.15;
  font-weight: 900;
  letter-spacing: -0.04em;
  margin-bottom: 1.1rem;
  color: var(--text-main);
}
.home-hero-lead {
  font-size: 1.18rem;
  line-height: 1.7;
  color: var(--text-muted);
  max-width: 760px;
  margin: 0 auto 2.5rem auto;
}

/* Country Cards */
.country-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1.15rem;
  margin: 2.5rem 0;
}
.country-card {
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 1.5rem 1.25rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-normal), box-shadow var(--transition-normal), border-color var(--transition-normal);
  text-decoration: none;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.country-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  text-decoration: none;
  border-color: var(--primary);
}
.country-card-flag {
  font-size: 2.8rem;
  margin-bottom: 0.65rem;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.06));
}
.country-card-name {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 0.25rem;
  letter-spacing: -0.02em;
}
.country-card-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* Interactive Filter Bar */
.search-filter-box {
  max-width: 500px;
  margin: 0 auto 2rem auto;
  position: relative;
}
.search-filter-input {
  width: 100%;
  padding: 0.85rem 1.25rem 0.85rem 2.75rem;
  border-radius: 9999px;
  border: 1px solid var(--border-light);
  font-size: 0.95rem;
  background: #ffffff;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-fast);
}
.search-filter-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: var(--shadow-glow);
}
.search-filter-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-subtle);
  font-size: 1rem;
  pointer-events: none;
}

/* Tools Grid */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.35rem;
  margin: 1.5rem 0;
}
.tool-card {
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 1.65rem;
  box-shadow: var(--shadow-card);
  transition: all var(--transition-normal);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.tool-card:hover {
  transform: translateY(-3px);
  border-color: var(--primary);
  box-shadow: var(--shadow-lg);
}
.tool-card-country-tag {
  font-size: 0.74rem;
  font-weight: 800;
  color: var(--primary-dark);
  background: var(--primary-light);
  border: 1px solid var(--primary-subtle);
  padding: 0.2rem 0.65rem;
  border-radius: 9999px;
  display: inline-block;
  margin-bottom: 0.85rem;
  width: fit-content;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.tool-card-title {
  font-size: 1.22rem;
  font-weight: 800;
  margin-bottom: 0.65rem;
  color: var(--text-main);
  letter-spacing: -0.02em;
}
.tool-card-title a {
  color: var(--text-main);
}
.tool-card-title a:hover {
  color: var(--primary);
  text-decoration: none;
}
.tool-card-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
  line-height: 1.6;
}
.tool-card-btn {
  align-self: flex-start;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: gap var(--transition-fast);
}
.tool-card:hover .tool-card-btn {
  gap: 0.55rem;
}

/* Unit Converter UI */
.converter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.75rem;
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 0.75rem;
}
.converter-tab-btn {
  background: var(--surface-alt);
  border: 1px solid var(--border-light);
  padding: 0.55rem 1.05rem;
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--text-body);
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}
.converter-tab-btn:hover {
  background: #e2e8f0;
}
.converter-tab-btn.active {
  background: var(--primary-gradient);
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 2px 6px var(--primary-glow);
}
.converter-swap-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid var(--border-light);
  background: #ffffff;
  color: var(--primary);
  font-size: 1.4rem;
  cursor: pointer;
  margin: 1.25rem auto 0 auto;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-fast);
}
.converter-swap-btn:hover {
  transform: rotate(180deg);
  background: var(--primary-light);
  border-color: var(--primary);
}

/* Percentage Calculator Cards */
.percent-mode-card {
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-xs);
  transition: border-color var(--transition-fast);
}
.percent-mode-card:hover {
  border-color: var(--border-subtle);
}
.percent-mode-title {
  font-size: 1.05rem;
  font-weight: 800;
  margin-bottom: 1rem;
  color: var(--text-main);
  letter-spacing: -0.01em;
}

/* Blog Styles */
.blog-posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
  gap: 1.75rem;
  margin: 2.5rem 0;
}
.blog-card {
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--shadow-card);
  transition: all var(--transition-normal);
}
.blog-card:hover {
  transform: translateY(-3px);
  border-color: var(--primary);
  box-shadow: var(--shadow-lg);
}
.blog-card-cat {
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--primary);
  letter-spacing: 0.06em;
  margin-bottom: 0.65rem;
}
.blog-card-title {
  font-size: 1.35rem;
  font-weight: 800;
  margin-bottom: 0.75rem;
  line-height: 1.35;
  letter-spacing: -0.02em;
}
.blog-card-title a {
  color: var(--text-main);
}
.blog-card-title a:hover {
  color: var(--primary);
  text-decoration: none;
}
.blog-card-excerpt {
  font-size: 0.92rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
  line-height: 1.65;
}

/* Admin Panel Styles */
.admin-layout {
  display: flex;
  min-height: 100vh;
  background: #f8fafc;
}
.admin-sidebar {
  width: 260px;
  background: #0f172a;
  color: #f8fafc;
  padding: 1.75rem 1.15rem;
  display: flex;
  flex-direction: column;
  border-right: 1px solid #1e293b;
}
.admin-sidebar-brand {
  font-size: 1.15rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  gap: 0.65rem;
}
.admin-menu {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  flex: 1;
}
.admin-menu-link {
  color: #94a3b8;
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  transition: all var(--transition-fast);
}
.admin-menu-link:hover, .admin-menu-link.active {
  color: #ffffff;
  background: #1e293b;
  text-decoration: none;
}
.admin-main {
  flex: 1;
  padding: 2.25rem 2.5rem;
  overflow-y: auto;
}
.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
  gap: 1rem;
}
.admin-card {
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  margin-bottom: 1.75rem;
  box-shadow: var(--shadow-sm);
}
.admin-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}
.admin-stat-card {
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}
.admin-stat-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--primary-gradient);
}
.admin-stat-val {
  font-size: 2.2rem;
  font-weight: 900;
  color: var(--primary);
  margin-bottom: 0.25rem;
  letter-spacing: -0.03em;
}
.admin-stat-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
}
.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}
.admin-table th {
  background: #f8fafc;
  padding: 0.85rem 1.15rem;
  text-align: left;
  border-bottom: 1px solid var(--border-light);
  font-weight: 700;
  color: var(--text-muted);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.admin-table td {
  padding: 0.85rem 1.15rem;
  border-bottom: 1px solid var(--border-light);
}
.status-pill {
  padding: 0.25rem 0.65rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.status-published { background: #dcfce7; color: #166534; }
.status-draft { background: #fef3c7; color: #92400e; }

/* Footer */
.site-footer {
  background: #ffffff;
  border-top: 1px solid var(--border-light);
  margin-top: auto;
  padding: 3.5rem 1.5rem 2.5rem 1.5rem;
}
.footer-container {
  max-width: var(--max-width);
  margin: 0 auto;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, 1fr);
  gap: 2.5rem;
  margin-bottom: 2.5rem;
}
.footer-col h4 {
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  font-size: 0.9rem;
}
.footer-links a {
  color: var(--text-muted);
  font-weight: 500;
}
.footer-links a:hover {
  color: var(--primary);
}
.footer-bottom {
  border-top: 1px solid var(--border-light);
  padding-top: 2rem;
  font-size: 0.85rem;
  color: var(--text-subtle);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.social-link-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--surface-alt);
  color: var(--text-muted);
  border: 1px solid var(--border-light);
  transition: all 0.2s ease;
  text-decoration: none;
}
.social-link-btn:hover {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
  transform: translateY(-2px);
}

/* Responsive */
@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  h1 { font-size: 1.85rem; }
  .home-hero-title { font-size: 2.2rem; }
  .header-container { flex-direction: column; gap: 0.85rem; align-items: flex-start; }
  .site-nav { flex-wrap: wrap; }
  .calc-header-bar { flex-direction: column; align-items: flex-start; }
  .admin-layout { flex-direction: column; }
  .admin-sidebar { width: 100%; }
  .admin-main { padding: 1.5rem; }
  .footer-grid { grid-template-columns: 1fr; }
}
