html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  font-family: Roboto, sans-serif;
  background: #111;
  color: #fff;
}
.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 20px;
  background: #222;
}
.container {
  max-width: 1200px;
  margin: 20px auto;
  padding: 0 16px;
}
.card {
  background: #1a1a1a;
  padding: 20px;
  border-radius: 12px;
}
.grid {
  display: grid;
  gap: 12px;
}
.field span {
  font-size: 14px;
  color: #ccc;
}
.field input {
  width: 100%;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid #444;
  background: #000;
  color: #fff;
}
.actions {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}
.btn {
  padding: 12px 16px;
  font-size: 16px;
  border: none;
  border-radius: 8px;
  background: #38bdf8;
  color: #000;
  font-weight: bold;
  cursor: pointer;
}
.btn--ghost {
  background: transparent;
  border: 1px solid #38bdf8;
  color: #38bdf8;
}
.kpis {
  margin-top: 18px;
  display: grid;
  gap: 14px;
}
.kpi {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  background: #000;
  padding: 14px;
  border-radius: 8px;
}
.kpi span {
  font-size: 15px;
  opacity: 0.9;
}
.kpi strong {
  font-size: 18px;
  font-weight: 600;
}
.hidden {
  display: none;
}
.theme-toggle {
  background: #000;
  color: #fff;
  border: 1px solid #444;
  border-radius: 6px;
  padding: 6px 10px;
  cursor: pointer;
}
.calculators {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
  align-items: flex-start;
  margin-top: 30px;
}
.calculators .card {
  flex: 1 1 calc(33.333% - 20px);
  max-width: 360px;
  min-width: 300px;
  box-sizing: border-box;
}
.tagline {
  flex: 1;
  text-align: center;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: 0.3px;
  color: #fff;
  opacity: 0.95;
}
.page-intro {
  text-align: center;
  font-size: 17px;
  font-weight: 500;
  margin: 10px 0 22px;
  opacity: 0.85;
}
.switch {
  position: relative;
  display: inline-block;
  width: 36px;
  height: 18px;
  margin: 0 8px;
}
.switch input {
  display: none;
}
.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: #555;
  border-radius: 18px;
  transition: .3s;
}
.slider:before {
  position: absolute;
  content: "";
  height: 14px;
  width: 14px;
  left: 2px;
  bottom: 2px;
  background: white;
  border-radius: 50%;
  transition: .3s;
}
input:checked + .slider {
  background: #38bdf8;
}
input:checked + .slider:before {
  transform: translateX(18px);
}
.toggle-group {
  display: flex;
  align-items: center;
  gap: 6px;
}
#gbpLabel, #usdLabel {
  font-size: 15px;
  font-weight: 500;
  color: #fff;
  opacity: 0.85;
}
body.light {
  background: #f9f9f9;
  color: #111;
}
body.light .site-header {
  background: #fff;
  border-bottom: 1px solid #ddd;
}
body.light .tagline {
  color: #333;
}
body.light .card {
  background: #fff;
  border: 1px solid #e2e2e2;
}
body.light input,
body.light select {
  background: #fff;
  color: #111;
  border: 1px solid #bbb;
}
body.light .kpi {
  background: #fafafa;
  border: 1px solid #e2e2e2;
}
body.light .btn {
  background: #38bdf8;
  color: #000;
}
body.light .btn--ghost {
  border-color: #38bdf8;
  color: #38bdf8;
}
body.light .slider {
  background: #ccc;
}
body.light input:checked + .slider {
  background: #38bdf8;
}

/* --- ✅ FINAL MOBILE FIX (clean + merged) --- */
@media (max-width: 768px) {
  /* Stack calculators vertically */
  .calculators {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 24px !important;
    width: 100% !important;
    margin-top: 30px !important;
  }

  .calculators .card {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 0 24px 0 !important;
    padding: 22px !important;
    border-radius: 12px !important;
    box-sizing: border-box !important;
  }

  /* Center main heading */
  h1 {
    text-align: center !important;
    font-size: 20px !important;
  }

  /* Hide SEO text (quick-links, popular searches) */
  .quick-links,
  .popular-searches,
  #popular-searches {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
  }

  /* Header adjustments */
  .site-header {
    flex-wrap: wrap !important;
    text-align: center !important;
    gap: 6px !important;
  }

  .container {
    padding: 0 14px !important;
  }

  .page-intro {
    text-align: center !important;
    font-size: 15px !important;
  }

  /* Button layout */
  .actions {
    flex-direction: column !important;
    width: 100% !important;
  }

  .actions .btn,
  .actions .btn--ghost {
    width: 100% !important;
  }
}


