:root {
  --navy: #0a0f2e;
  --navy2: #111936;
  --navy3: #1a2347;
  --emerald: #00d68f;
  --emerald2: #00b377;
  --emerald-pale: rgba(0,214,143,0.1);
  --white: #f0f4ff;
  --muted: #8892b0;
  --border: rgba(255,255,255,0.08);
  --card: rgba(255,255,255,0.04);
  --card-hover: rgba(255,255,255,0.07);
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 8px 32px rgba(0,0,0,0.3);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Bricolage Grotesque', sans-serif;
  background: var(--navy);
  color: var(--white);
  min-height: 100vh;
  padding-bottom: 80px; /* space for bottom nav */
  -webkit-font-smoothing: antialiased;
}

a { color: var(--emerald); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ═══════════════════════════════════
   LOGO
═══════════════════════════════════ */
.logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none !important;
}
.logo-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--emerald), var(--emerald2));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Syne', sans-serif;
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--navy);
  flex-shrink: 0;
  box-shadow: 0 0 20px rgba(0,214,143,0.3);
}
.logo-text {
  font-family: 'Syne', sans-serif;
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--white);
  letter-spacing: -0.3px;
  line-height: 1;
}
.logo-text span { color: var(--emerald); }

/* ═══════════════════════════════════
   TOP HEADER (desktop)
═══════════════════════════════════ */
header {
  background: rgba(10,15,46,0.9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  padding: 0 1.5rem;
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.desktop-nav ul {
  display: flex;
  gap: 0.25rem;
  list-style: none;
}
.desktop-nav a {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 500;
  padding: 0.45rem 0.85rem;
  border-radius: 8px;
  transition: all 0.15s;
  text-decoration: none;
}
.desktop-nav a:hover, .desktop-nav a.active {
  color: var(--white);
  background: var(--card-hover);
}
.desktop-nav a.active { color: var(--emerald); }
@media(max-width: 720px) { .desktop-nav { display: none; } }

/* ═══════════════════════════════════
   BOTTOM NAV (mobile)
═══════════════════════════════════ */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 200;
  background: rgba(10,15,46,0.97);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--border);
  display: flex;
  padding: 0 0.5rem;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.bottom-nav a {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  padding: 0.6rem 0.25rem;
  color: var(--muted);
  font-size: 0.6rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  text-decoration: none;
  transition: all 0.15s;
  position: relative;
}
.bottom-nav a.active, .bottom-nav a:hover { color: var(--emerald); }
.bottom-nav a.active::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 32px;
  height: 2px;
  background: var(--emerald);
  border-radius: 0 0 4px 4px;
}
.bottom-nav svg {
  width: 22px;
  height: 22px;
  stroke-width: 1.8;
}
@media(min-width: 721px) { .bottom-nav { display: none; } body { padding-bottom: 0; } }

/* ═══════════════════════════════════
   HERO
═══════════════════════════════════ */
.hero {
  position: relative;
  overflow: hidden;
  padding: 4rem 1.5rem 3.5rem;
  text-align: center;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 50% 0%, rgba(0,214,143,0.15) 0%, transparent 70%),
    radial-gradient(ellipse 40% 30% at 80% 50%, rgba(0,180,120,0.08) 0%, transparent 60%);
  pointer-events: none;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--emerald-pale);
  border: 1px solid rgba(0,214,143,0.3);
  color: var(--emerald);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.35rem 0.85rem;
  border-radius: 50px;
  margin-bottom: 1.25rem;
  letter-spacing: 0.3px;
}
.hero h1 {
  font-family: 'Syne', sans-serif;
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -1px;
  margin-bottom: 1rem;
}
.hero h1 em {
  font-style: normal;
  color: var(--emerald);
}
.hero p {
  color: var(--muted);
  font-size: 1rem;
  max-width: 480px;
  margin: 0 auto 2rem;
  line-height: 1.6;
}
.hero-stats {
  display: flex;
  justify-content: center;
  gap: 2.5rem;
  flex-wrap: wrap;
}
.stat-item { text-align: center; }
.stat-num {
  font-family: 'Syne', sans-serif;
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--emerald);
  display: block;
}
.stat-lbl {
  font-size: 0.75rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ═══════════════════════════════════
   TOOLS GRID
═══════════════════════════════════ */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
  max-width: 1100px;
  margin: 0 auto;
  padding: 1rem 1.25rem 2.5rem;
}
.tool-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: all 0.2s;
  text-decoration: none !important;
  display: block;
  position: relative;
  overflow: hidden;
}
.tool-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--emerald), transparent);
  opacity: 0;
  transition: opacity 0.2s;
}
.tool-card:hover {
  background: var(--card-hover);
  border-color: rgba(0,214,143,0.2);
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.3);
}
.tool-card:hover::before { opacity: 1; }
.tool-icon {
  width: 44px;
  height: 44px;
  background: var(--emerald-pale);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  margin-bottom: 1rem;
}
.tool-card h2 {
  font-family: 'Syne', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 0.4rem;
  line-height: 1.3;
}
.tool-card p {
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.5;
}
.tool-badge {
  display: inline-block;
  margin-top: 0.85rem;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--emerald);
  background: var(--emerald-pale);
  border: 1px solid rgba(0,214,143,0.2);
  padding: 0.2rem 0.6rem;
  border-radius: 50px;
  letter-spacing: 0.3px;
}
.tool-arrow {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  color: var(--muted);
  font-size: 1rem;
  transition: transform 0.15s, color 0.15s;
}
.tool-card:hover .tool-arrow { transform: translate(2px,-2px); color: var(--emerald); }

/* ═══════════════════════════════════
   PAGE LAYOUT (calculators)
═══════════════════════════════════ */
.container { max-width: 1100px; margin: 0 auto; padding: 0 1.25rem; }
.page-wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 3rem;
}

/* ═══════════════════════════════════
   BREADCRUMB
═══════════════════════════════════ */
.breadcrumb {
  font-size: 0.8rem;
  color: var(--muted);
  padding: 0.5rem 0 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--emerald); text-decoration: none; }
.breadcrumb-sep { color: rgba(255,255,255,0.2); }

/* ═══════════════════════════════════
   CALCULATOR CARD
═══════════════════════════════════ */
.calc-wrap {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  margin-bottom: 1.25rem;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}
.calc-wrap::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--emerald), var(--emerald2), transparent);
}
.calc-wrap h1 {
  font-family: 'Syne', sans-serif;
  font-size: clamp(1.3rem, 3vw, 1.7rem);
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 0.4rem;
}
.calc-wrap .subtitle {
  color: var(--muted);
  font-size: 0.88rem;
  margin-bottom: 1.75rem;
  line-height: 1.5;
}

/* ═══════════════════════════════════
   FORM
═══════════════════════════════════ */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.875rem;
  margin-bottom: 0.875rem;
}
@media(max-width: 560px) { .form-row { grid-template-columns: 1fr; } }
.form-row.single { grid-template-columns: 1fr; }

.form-group { display: flex; flex-direction: column; gap: 0.4rem; }

label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

input, select {
  padding: 0.75rem 1rem;
  background: rgba(255,255,255,0.05);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-family: 'Bricolage Grotesque', sans-serif;
  color: var(--white);
  outline: none;
  transition: border-color 0.15s, background 0.15s;
  -webkit-appearance: none;
}
input::placeholder { color: rgba(255,255,255,0.2); }
input:focus, select:focus {
  border-color: var(--emerald);
  background: rgba(0,214,143,0.05);
}
select option { background: var(--navy2); color: var(--white); }

.btn-calc {
  width: 100%;
  padding: 0.9rem;
  background: var(--emerald);
  color: var(--navy);
  border: none;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-weight: 700;
  font-family: 'Syne', sans-serif;
  cursor: pointer;
  margin-top: 0.5rem;
  transition: all 0.2s;
  letter-spacing: 0.2px;
}
.btn-calc:hover {
  background: #00f0a0;
  box-shadow: 0 0 24px rgba(0,214,143,0.4);
  transform: translateY(-1px);
}
.btn-calc:active { transform: translateY(0); }

/* ═══════════════════════════════════
   RESULTS
═══════════════════════════════════ */
.results {
  display: none;
  margin-top: 1.5rem;
  background: rgba(0,214,143,0.06);
  border: 1px solid rgba(0,214,143,0.2);
  border-radius: var(--radius);
  padding: 1.5rem;
  animation: fadeIn 0.3s ease;
}
@keyframes fadeIn { from { opacity:0; transform:translateY(8px); } to { opacity:1; transform:none; } }
.results.show { display: block; }
.calc-error{color:#ff6b6b;background:rgba(255,107,107,0.1);border:1px solid rgba(255,107,107,0.3);padding:0.75rem 1rem;border-radius:8px;margin-top:0.75rem;font-size:0.9rem;display:none;}
.results-title {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--emerald);
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.75rem;
}
.result-item {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1rem;
  text-align: center;
  transition: border-color 0.15s;
}
.result-item:first-child {
  border-color: rgba(0,214,143,0.3);
  background: rgba(0,214,143,0.08);
}
.result-item .val {
  font-family: 'Syne', sans-serif;
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--emerald);
  display: block;
  letter-spacing: -0.5px;
}
.result-item:first-child .val { font-size: 1.55rem; }
.result-item .lbl {
  font-size: 0.72rem;
  color: var(--muted);
  margin-top: 0.25rem;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

/* ═══════════════════════════════════
   AD SLOT
═══════════════════════════════════ */
.ad-slot {
  background: rgba(255,255,255,0.02);
  border: 1px dashed rgba(255,255,255,0.1);
  border-radius: var(--radius-sm);
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.15);
  font-size: 0.75rem;
  margin: 1.25rem 0;
  letter-spacing: 0.5px;
}

/* ═══════════════════════════════════
   OTHER TOOLS SIDEBAR
═══════════════════════════════════ */
.other-tools {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 1.25rem;
}
.other-tools h3 {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.75rem;
}
.other-tools a {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem 0;
  font-size: 0.88rem;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
  transition: color 0.15s;
  text-decoration: none;
}
.other-tools a:last-child { border-bottom: none; }
.other-tools a:hover { color: var(--emerald); }

/* ═══════════════════════════════════
   SEO CONTENT
═══════════════════════════════════ */
.seo-content {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  margin-bottom: 1.25rem;
  line-height: 1.7;
}
.seo-content h2 {
  font-family: 'Syne', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--white);
  margin: 1.5rem 0 0.6rem;
}
.seo-content h2:first-child { margin-top: 0; }
.seo-content p { color: var(--muted); font-size: 0.9rem; margin-bottom: 0.75rem; }
.seo-content ul { padding-left: 1.25rem; color: var(--muted); font-size: 0.9rem; }
.seo-content li { margin-bottom: 0.4rem; }
.seo-content strong { color: var(--white); }
.seo-content a { color: var(--emerald); }

/* ═══════════════════════════════════
   TABLE
═══════════════════════════════════ */
.table-wrap { overflow-x: auto; margin: 1rem 0; }
table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
th {
  background: rgba(0,214,143,0.1);
  color: var(--emerald);
  padding: 0.7rem 1rem;
  text-align: left;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  font-weight: 700;
}
td { padding: 0.65rem 1rem; color: var(--muted); border-bottom: 1px solid var(--border); }
tr:last-child td { border-bottom: none; }
td strong { color: var(--white); }

/* ═══════════════════════════════════
   FOOTER
═══════════════════════════════════ */
footer {
  background: var(--navy2);
  border-top: 1px solid var(--border);
  padding: 2.5rem 1.5rem;
  text-align: center;
  margin-top: 2rem;
}
.footer-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  margin-bottom: 0.75rem;
}
footer p {
  color: var(--muted);
  font-size: 0.82rem;
  margin-bottom: 0.5rem;
}
.footer-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 1rem;
}
.footer-links a { color: var(--muted); font-size: 0.8rem; }
.footer-links a:hover { color: var(--emerald); text-decoration: none; }

/* ═══════════════════════════════════
   SECTION TITLE
═══════════════════════════════════ */
.section-header {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 1.25rem 0.75rem;
}
.section-header h2 {
  font-family: 'Syne', sans-serif;
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--white);
  letter-spacing: -0.3px;
}
.section-header p { color: var(--muted); font-size: 0.85rem; margin-top: 0.25rem; }
