:root {
  --ink: #14151a;
  --muted: #6a6e78;
  --line: #e2e4e9;
  --paper: #f5f6f8;
  --white: #ffffff;
  --blue: #4b67f5;
  --blue-dark: #344bd3;
  --mint: #c9f2dc;
  --card-shadow: 0 16px 40px rgba(30, 39, 75, 0.08);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Arial, Helvetica, sans-serif;
  -webkit-font-smoothing: antialiased;
}

button, input, select { font: inherit; }
button { cursor: pointer; }

.page-shell { width: min(100%, 1120px); margin: 0 auto; padding: 14px; }

.hero {
  position: relative;
  overflow: hidden;
  min-height: 330px;
  padding: clamp(30px, 6vw, 68px);
  border-radius: 24px;
  color: var(--white);
  background: linear-gradient(125deg, #172452 0%, #354cd6 54%, #5e7bff 100%);
  box-shadow: 0 18px 45px rgba(40, 58, 154, 0.22);
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(5, 12, 39, 0.35), transparent 70%);
  pointer-events: none;
}

.hero-content, .hero-badge { position: relative; z-index: 1; }
.hero-content { max-width: 610px; }
.eyebrow, .section-kicker { margin: 0 0 8px; font-size: 11px; font-weight: 800; letter-spacing: 0.12em; }
.eyebrow { color: var(--mint); }
.hero h1 { margin: 0; font-size: clamp(42px, 7vw, 76px); line-height: 0.94; letter-spacing: -0.055em; }
.hero-copy { max-width: 480px; margin: 22px 0 0; font-size: clamp(17px, 2vw, 21px); line-height: 1.45; }

.hero-orb { position: absolute; border-radius: 50%; filter: blur(2px); opacity: 0.55; }
.hero-orb-one { width: 360px; height: 360px; right: -135px; top: -110px; background: radial-gradient(circle at 35% 35%, #a8b9ff, #4c64e8 60%, transparent 61%); }
.hero-orb-two { width: 210px; height: 210px; right: 155px; bottom: -155px; border: 28px solid rgba(201, 242, 220, 0.72); }
.hero-badge { position: absolute; right: clamp(26px, 5vw, 60px); bottom: 34px; display: flex; gap: 10px; align-items: center; padding: 12px 17px; border: 1px solid rgba(255,255,255,.28); border-radius: 14px; background: rgba(15, 24, 69, .2); backdrop-filter: blur(8px); }
.hero-badge span { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 50%; color: var(--blue-dark); background: var(--mint); font-weight: 800; font-size: 20px; }
.hero-badge small { font-size: 11px; line-height: 1.15; font-weight: 700; }

.content { padding: 46px clamp(4px, 3vw, 28px) 32px; }
.date-card, .converter { border-radius: 20px; background: var(--white); box-shadow: var(--card-shadow); }
.date-card { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 24px 26px; }
h2 { margin: 0; font-size: clamp(26px, 3vw, 36px); letter-spacing: -0.045em; }
.section-kicker { color: var(--blue); }

.date-control { display: flex; align-items: center; gap: 8px; padding: 11px 13px; border: 1px solid var(--line); border-radius: 12px; background: #fafbfc; }
.calendar-icon { color: var(--blue); font-weight: bold; }
input[type="date"] { border: 0; outline: 0; color: var(--ink); background: transparent; font-weight: 700; }

.rates-section { margin-top: 54px; }
.section-heading, .converter-topline { display: flex; align-items: end; justify-content: space-between; gap: 20px; }
.rates-date-label { margin: 0 0 4px; color: var(--muted); font-size: 14px; text-align: right; }
.currency-picker { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin: 22px 0; }
.currency-picker > p { margin: 0 2px 0 0; color: var(--muted); font-size: 14px; }
.toggle-list { display: flex; flex-wrap: wrap; gap: 8px; }
.toggle { position: relative; }
.toggle input { position: absolute; opacity: 0; pointer-events: none; }
.toggle span { display: block; padding: 8px 11px; border: 1px solid var(--line); border-radius: 999px; background: var(--white); color: var(--muted); font-size: 13px; font-weight: 700; transition: .18s ease; }
.toggle input:checked + span { border-color: var(--blue); color: var(--white); background: var(--blue); }

.rates-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.rate-card { min-height: 162px; padding: 19px; border-radius: 18px; background: var(--white); box-shadow: var(--card-shadow); animation: appear .3s ease both; }
.rate-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.rate-code { color: var(--blue); font-size: 13px; font-weight: 800; letter-spacing: .06em; }
.rate-flag { display: grid; min-width: 34px; height: 34px; place-items: center; border-radius: 10px; background: #eef1ff; font-size: 18px; }
.rate-name { min-height: 34px; margin: 15px 0 7px; color: var(--muted); font-size: 13px; line-height: 1.25; }
.rate-value { margin: 0; font-size: 26px; font-weight: 800; letter-spacing: -0.04em; }
.rate-unit { margin: 6px 0 0; color: var(--muted); font-size: 12px; }

.loading-state { display: flex; align-items: center; gap: 5px; min-height: 100px; color: var(--muted); font-weight: 700; }
.loading-state span { width: 5px; height: 5px; border-radius: 50%; background: var(--blue); animation: blink 1.1s infinite both; }
.loading-state span:nth-child(2) { animation-delay: .15s; }.loading-state span:nth-child(3) { animation-delay: .3s; }
.error-message { padding: 15px 18px; border-radius: 14px; color: #a33131; background: #fff0f0; line-height: 1.45; }

.converter { margin-top: 54px; padding: clamp(22px, 4vw, 34px); }
.swap-button { display: grid; width: 42px; height: 42px; place-items: center; border: 0; border-radius: 50%; color: var(--white); background: var(--blue); font-size: 21px; transition: transform .2s ease, background .2s ease; }
.swap-button:hover { background: var(--blue-dark); transform: rotate(180deg); }
.converter-fields { display: grid; grid-template-columns: 1.15fr 1fr 34px 1fr; align-items: end; gap: 12px; margin-top: 28px; }
.input-group { display: grid; gap: 8px; color: var(--muted); font-size: 13px; font-weight: 700; }
.input-group input, .input-group select { width: 100%; min-height: 50px; padding: 0 14px; border: 1px solid var(--line); border-radius: 12px; outline-color: var(--blue); color: var(--ink); background: #fafbfc; font-weight: 700; }
.conversion-arrow { padding-bottom: 14px; color: var(--blue); font-size: 27px; font-weight: 700; text-align: center; }
.result-card { display: grid; margin-top: 22px; padding: 24px; border-radius: 16px; color: var(--white); background: linear-gradient(110deg, var(--blue-dark), var(--blue)); }
.result-card p, .result-card span { margin: 0; }.result-card p { color: #dfe5ff; font-size: 13px; font-weight: 700; }.result-card output { margin: 6px 0; font-size: clamp(33px, 5vw, 50px); font-weight: 800; letter-spacing: -0.05em; }.result-card span { color: #dfe5ff; font-size: 13px; }
.source-note { margin: 30px 4px 0; color: var(--muted); font-size: 13px; line-height: 1.5; }.source-note a { color: var(--blue-dark); font-weight: 700; }

@keyframes blink { 0%, 80%, 100% { opacity: .25; transform: scale(.8); } 40% { opacity: 1; transform: scale(1); } }
@keyframes appear { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 760px) {
  .hero { min-height: 310px; }.hero-badge { right: 26px; bottom: 22px; }.content { padding-top: 34px; }
  .rates-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }.converter-fields { grid-template-columns: 1fr 1fr; }.conversion-arrow { display: none; }
}
@media (max-width: 490px) {
  .page-shell { padding: 0; }.hero { border-radius: 0 0 24px 24px; }.date-card, .section-heading { align-items: flex-start; flex-direction: column; }.rates-date-label { text-align: left; }.date-control { width: 100%; justify-content: space-between; }.converter-fields { grid-template-columns: 1fr; }.rates-grid { gap: 10px; }.rate-card { min-height: 145px; padding: 15px; }
}
