:root {
  --ink: #0d1b2a;
  --muted: #65758b;
  --blue: #2563eb;
  --cyan: #11b9a7;
  --line: #e7edf5;
  --bg: #eef3fb;
}

.public-rates-section {
  max-width: 1180px;
  margin: 70px auto 0;
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 28px;
  align-items: center;
}

.public-rates-section .eyebrow {
  display: inline-flex;
  padding: 8px 12px;
  border-radius: 999px;
  background: #eef6ff;
  color: var(--blue);
  font-weight: 800;
  font-size: 13px;
}

.section-copy h2 {
  font-size: 44px;
  line-height: 1.08;
  margin: 16px 0 12px;
}

.section-copy p {
  color: var(--muted);
  font-size: 17px;
  line-height: 1.6;
}

.rate-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 22px;
  box-shadow: 0 24px 70px rgba(13, 27, 42, 0.12);
}

.rate-card-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 12px;
}

.rate-card-head h3 {
  margin: 0;
  font-size: 24px;
}

.rate-card-head p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.rate-card-head a {
  color: var(--blue);
  font-weight: 800;
  text-decoration: none;
  font-size: 13px;
  white-space: nowrap;
}

/* NuavaAI segmented buttons */
.rate-type-switch {
  display: flex;
  gap: 10px;
  margin: 16px 0 18px;
  flex-wrap: wrap;
  padding: 6px;
  border-radius: 18px;
  background: #f3f6fb;
  border: 1px solid #e6edf7;
}

.rate-type-btn {
  border: 1px solid transparent;
  cursor: pointer;
  padding: 10px 18px;
  border-radius: 14px;
  background: white;
  color: #111827;
  font-size: 14px;
  font-weight: 700;
  transition: all 0.25s ease;
  box-shadow: 0 8px 18px rgba(13, 27, 42, 0.05);
}

.rate-type-btn:hover {
  transform: translateY(-2px);
  background: rgba(79, 70, 229, 0.08);
  color: #111827;
  border-color: rgba(79, 70, 229, 0.18);
}

.rate-type-btn.active {
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  color: white;
  box-shadow: 0 0 18px rgba(124, 58, 237, 0.45);
}

#publicRateBestTable {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}

#publicRateBestTable th,
#publicRateBestTable td {
  padding: 14px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

#publicRateBestTable th {
  font-size: 12px;
  text-transform: uppercase;
  color: #64748b;
  letter-spacing: 0.04em;
}

.rate-value {
  font-size: 22px;
  font-weight: 900;
  color: var(--ink);
}

.bank-name {
  display: block;
  color: var(--muted);
  font-size: 13px;
  margin-top: 4px;
}

.currency {
  font-weight: 900;
}

.pair {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-top: 4px;
}

@media (max-width: 850px) {
  .public-rates-section {
    grid-template-columns: 1fr;
    margin-top: 50px;
  }

  .section-copy h2 {
    font-size: 34px;
  }

  .rate-card-head {
    flex-direction: column;
  }

  .rate-type-switch {
    width: 100%;
  }

  .rate-type-btn {
    flex: 1;
    min-width: 120px;
  }
}
