/* ============================================================================
   Premium "Nepali + Mithila (Madhubani)" theme for the /rates section.
   Scoped under .rates-page so the global header/footer/other pages are untouched.
   Palette: Nepal-flag crimson, saffron gold, Mithila peacock-teal, warm cream.
   Decorative scallop/toran borders are inline SVG data-URIs (no external assets).
   ========================================================================== */

.rates-page {
  --r-crimson: #9e1b32;
  --r-crimson-2: #b8324b;
  --r-maroon: #5e0f20;
  --r-gold: #d4a017;
  --r-gold-2: #f4cd6b;
  --r-saffron: #e8932b;
  --r-teal: #0f766e;
  --r-cream: #fbf4e6;
  --r-ink: #3a241b;
  --r-line: #ecd9b0;

  /* warm parchment canvas with faint corner glows */
  background:
    radial-gradient(circle at 8% -5%, rgba(212,160,23,.14), transparent 38%),
    radial-gradient(circle at 95% 0%, rgba(158,27,50,.10), transparent 42%),
    #fbf4e6;
  padding-bottom: 40px;
}

/* ---- Decorative Mithila scallop/toran rule (reused) ---- */
.mithila-rule {
  height: 16px; margin: 26px 0; border: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='16'%3E%3Cg fill='none' stroke='%23d4a017' stroke-width='2'%3E%3Cpath d='M2 14 A8 8 0 0 1 18 14'/%3E%3Cpath d='M22 14 A8 8 0 0 1 38 14'/%3E%3C/g%3E%3Ccircle cx='10' cy='4' r='1.6' fill='%239e1b32'/%3E%3Ccircle cx='30' cy='4' r='1.6' fill='%239e1b32'/%3E%3C/svg%3E");
  background-repeat: repeat-x; background-position: center;
}

/* ---- Hero banner ---- */
.rates-hero {
  position: relative; overflow: hidden;
  margin-top: 10px; border-radius: 18px;
  padding: 30px 30px 40px;
  background:
    linear-gradient(135deg, var(--r-maroon) 0%, var(--r-crimson) 42%, var(--r-saffron) 125%);
  color: #fff;
  box-shadow: 0 14px 40px rgba(94,15,32,.28);
  border: 1px solid rgba(255,255,255,.12);
}
/* faint block-print motif overlay */
.rates-hero::before {
  content: ""; position: absolute; inset: 0; opacity: .12; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80'%3E%3Cg fill='none' stroke='%23ffffff' stroke-width='1'%3E%3Ccircle cx='40' cy='40' r='6'/%3E%3Cpath d='M40 18v8M40 54v8M18 40h8M54 40h8M25 25l5 5M55 55l-5-5M55 25l-5 5M25 55l5-5'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 80px 80px;
}
/* gold toran scallop along the bottom edge */
.rates-hero::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 12px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='36' height='12'%3E%3Cpath d='M0 12 A9 9 0 0 1 18 12 A9 9 0 0 1 36 12' fill='none' stroke='%23f4cd6b' stroke-width='2'/%3E%3C/svg%3E");
  background-repeat: repeat-x;
}
.rates-hero__date { font-size: .82rem; letter-spacing: .5px; text-transform: uppercase; color: var(--r-gold-2); font-weight: 600; }
.rates-hero h1 {
  position: relative; font-family: Merriweather, Georgia, serif; font-weight: 900;
  font-size: 2.5rem; line-height: 1.1; margin: 8px 0 8px; color: #fff;
  text-shadow: 0 2px 12px rgba(0,0,0,.25);
}
.rates-hero p { position: relative; color: #fbe6c9; max-width: 64ch; line-height: 1.6; margin: 0; }
.rates-hero__crumbs { position: relative; font-size: .78rem; color: #f3d9a6; margin-bottom: 4px; }
.rates-hero__crumbs a { color: #ffe9bf; text-decoration: none; }

/* ---- Rate cards ---- */
.rates-page .rate-cards { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); margin-top: 24px; }
.rates-page .tool-card {
  position: relative; overflow: hidden;
  background: linear-gradient(180deg, #fffdf8, #fdf4e3);
  border: 1px solid var(--r-line); border-radius: 16px;
  padding: 20px 18px 20px; text-decoration: none; color: var(--r-ink);
  box-shadow: 0 4px 16px rgba(94,15,32,.06);
  transition: transform .16s, box-shadow .16s, border-color .16s;
}
/* gold gradient accent bar on top */
.rates-page .tool-card::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 4px;
  background: linear-gradient(90deg, var(--r-crimson), var(--r-gold), var(--r-teal));
}
.rates-page .tool-card:hover { transform: translateY(-4px); box-shadow: 0 14px 30px rgba(158,27,50,.16); border-color: var(--r-gold); }
.rates-page .tool-card__emoji {
  display: inline-flex; align-items: center; justify-content: center;
  width: 46px; height: 46px; border-radius: 50%; font-size: 1.5rem; margin-bottom: 8px;
  background: radial-gradient(circle at 30% 30%, #fff7e2, #f3dca0);
  border: 1.5px solid var(--r-gold); box-shadow: 0 2px 8px rgba(212,160,23,.25);
}
.rates-page .tool-card__name { font-family: Merriweather, Georgia, serif; font-weight: 700; color: var(--r-maroon); font-size: 1.08rem; }
.rates-page .tool-card__desc { color: #6b5340; font-size: .9rem; line-height: 1.5; margin-top: 4px; }
.rates-page .tool-card__desc strong { color: var(--r-crimson); font-weight: 800; }

/* ---- Section title ---- */
.rates-page .tools-section-title {
  font-family: Merriweather, Georgia, serif; font-size: 1.25rem; font-weight: 800; color: var(--r-maroon);
  margin: 30px 0 0; padding-bottom: 8px; border-bottom: 2px solid var(--r-gold);
  display: inline-block;
}

/* ---- Forex table ---- */
.rates-page .calc-table-wrap { border: 1px solid var(--r-line); border-radius: 14px; overflow: hidden; box-shadow: 0 4px 16px rgba(94,15,32,.06); margin-top: 16px; }
.rates-page .fx-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.rates-page .fx-table thead th {
  background: linear-gradient(135deg, var(--r-crimson), var(--r-maroon)); color: #fff;
  font-weight: 700; padding: 12px 14px; text-align: right; border: 0;
}
.rates-page .fx-table thead th:first-child { text-align: left; }
.rates-page .fx-table td { padding: 11px 14px; text-align: right; border-bottom: 1px solid #f0e6d0; color: var(--r-ink); }
.rates-page .fx-table td:first-child { text-align: left; font-weight: 600; color: var(--r-maroon); }
.rates-page .fx-table tbody tr:nth-child(odd) { background: #fffdf8; }
.rates-page .fx-table tbody tr:nth-child(even) { background: #fdf4e3; }
.rates-page .fx-table tbody tr:hover { background: #fbeccb; }

/* ---- Detail page price hero ---- */
.rates-page .rate-hero {
  position: relative; overflow: hidden; margin-top: 12px; border-radius: 18px;
  padding: 30px 30px 38px; color: #fff;
  background: linear-gradient(135deg, var(--r-maroon) 0%, var(--r-crimson) 55%, #c0392b 130%);
  box-shadow: 0 14px 40px rgba(94,15,32,.28); border: 1px solid rgba(255,255,255,.1);
}
.rates-page .rate-hero::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 12px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='36' height='12'%3E%3Cpath d='M0 12 A9 9 0 0 1 18 12 A9 9 0 0 1 36 12' fill='none' stroke='%23f4cd6b' stroke-width='2'/%3E%3C/svg%3E");
  background-repeat: repeat-x;
}
.rates-page .rate-hero__big {
  font-family: Merriweather, Georgia, serif; font-weight: 900; font-size: 2.9rem; line-height: 1.05;
  background: linear-gradient(180deg, #fff 0%, var(--r-gold-2) 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  text-shadow: 0 2px 10px rgba(0,0,0,.15);
}
.rates-page .rate-hero__unit { color: #fbe6c9; font-size: 1rem; margin-top: 2px; }
.rates-page .rate-sub { display: flex; flex-wrap: wrap; gap: 10px 28px; margin-top: 18px; position: relative; }
.rates-page .rate-sub div { font-size: .95rem; color: #f7e4c4; }
.rates-page .rate-sub strong { color: #fff; }
.rates-page .rate-updated { font-size: .8rem; color: #f0d4a0; margin-top: 14px; position: relative; }

/* ---- Prose / notes ---- */
.rates-page .tools-head h1 { font-family: Merriweather, Georgia, serif; color: var(--r-maroon); }
.rates-page .tool-prose { color: #4a382b; line-height: 1.7; margin-top: 26px; }
.rates-page .tool-prose a { color: var(--r-crimson); font-weight: 600; }
.rates-page .tool-note { color: #8a735c; }
.rates-page .tools-crumbs a { color: var(--r-crimson); }

@media (max-width: 560px) {
  .rates-hero { padding: 22px 20px 32px; } .rates-hero h1 { font-size: 1.8rem; }
  .rates-page .rate-hero__big { font-size: 2.1rem; }
}
