/* ============================================================
   Impermanent Loss Calculator — custom styles
   Mobile-first, supplements Bootstrap 5.3
   ============================================================ */

/* ---------- Base ---------- */
body {
  background: #f8f9fa;
}

/* ---------- Navbar ---------- */
.navbar {
  box-shadow: 0 1px 0 rgba(0, 0, 0, .06);
  backdrop-filter: blur(14px);
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #2563eb, #14b8a6);
  color: #fff;
  font-weight: 800;
  font-size: .9rem;
  flex-shrink: 0;
}

/* ---------- Main container spacing ---------- */
main.container {
  padding-top: 1.25rem;
  padding-bottom: 2rem;
}

@media (min-width: 768px) {
  main.container {
    padding-top: 2.5rem;
    padding-bottom: 3rem;
  }
}

/* ---------- Page header ---------- */
main header h1 {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -.02em;
}

@media (min-width: 576px) {
  main header h1 {
    font-size: 1.75rem;
  }
}

@media (min-width: 768px) {
  main header h1 {
    font-size: 2rem;
  }
}

/* ---------- Calculator card ---------- */
.calc-card {
  border: none !important;
  border-radius: 1rem !important;
  box-shadow: 0 4px 24px rgba(0, 0, 0, .07) !important;
}

/* Compact card body on small screens */
.calc-card .card-body {
  padding: 1rem !important;
}

@media (min-width: 576px) {
  .calc-card .card-body {
    padding: 1.5rem !important;
  }
}

@media (min-width: 768px) {
  .calc-card .card-body {
    padding: 1.75rem !important;
  }
}

/* ---------- Form inputs — larger touch targets ---------- */
input.form-control {
  font-size: 1rem !important;
  min-height: 44px !important;
}

@media (min-width: 576px) {
  input.form-control {
    font-size: 1.125rem !important;
    min-height: 50px !important;
  }
}

@media (min-width: 768px) {
  input.form-control {
    font-size: 1.25rem !important;
    min-height: 52px !important;
  }
}

/* ---------- Preset buttons ---------- */
.preset-btn {
  min-height: 44px !important;
  min-width: 0 !important;
  flex: 1 1 auto;
  font-size: .8125rem;
  padding: .375rem .5rem;
}

@media (min-width: 480px) {
  .preset-btn {
    flex: 0 1 auto;
    min-width: 64px !important;
    font-size: .875rem;
    padding: .375rem .75rem;
  }
}

/* ---------- Result section ---------- */
.big-result {
  font-size: clamp(1.75rem, 8vw, 2.5rem) !important;
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.result-loss {
  color: #dc3545;
}

.result-row {
  font-size: .9375rem;
}

@media (min-width: 576px) {
  .result-row {
    font-size: 1rem;
  }
}

.result-row .value {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

/* ---------- Ad slot ---------- */
.ad-slot {
  min-height: 100px;
  background: #f1f3f5;
  border: 1px dashed #ced4da;
  border-radius: .75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #adb5bd;
  font-size: .875rem;
}

/* ---------- Content section headings ---------- */
main section h2 {
  font-size: 1.125rem;
  font-weight: 700;
}

@media (min-width: 576px) {
  main section h2 {
    font-size: 1.25rem;
  }
}

@media (min-width: 768px) {
  main section h2 {
    font-size: 1.35rem;
  }
}

main section p,
main section li {
  font-size: .9375rem;
  line-height: 1.7;
  color: #343a40;
}

@media (min-width: 768px) {
  main section p,
  main section li {
    font-size: 1rem;
  }
}

/* ---------- Code blocks ---------- */
pre {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  font-size: .8rem;
}

@media (min-width: 576px) {
  pre {
    font-size: .875rem;
  }
}

@media (min-width: 768px) {
  pre code {
    font-size: .95rem;
  }
}

/* ---------- Worked examples table ---------- */
.table-responsive {
  -webkit-overflow-scrolling: touch;
}

table.worked-examples {
  font-size: .8125rem;
}

@media (min-width: 576px) {
  table.worked-examples {
    font-size: .9375rem;
  }
}

@media (min-width: 768px) {
  table.worked-examples {
    font-size: 1rem;
  }
}

table.worked-examples td.loss {
  color: #dc3545;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* ---------- FAQ items ---------- */
main section h3.h6 {
  font-size: .9375rem;
  font-weight: 700;
}

/* ---------- Footer ---------- */
footer {
  font-size: .8125rem;
}
