:root {
  --night: #101512;
  --night-soft: #171e1a;
  --cream: #f1e9dc;
  --cream-muted: #b7ad9d;
  --gold: #c79a4a;
  --gold-light: #e1bd77;
  --line: rgba(225, 189, 119, .17);
  --panel: rgba(23, 30, 26, .78);
}

* { box-sizing: border-box; }

html { background: var(--night); }

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--cream);
  background:
    radial-gradient(circle at 82% 12%, rgba(83, 102, 82, .2), transparent 29rem),
    linear-gradient(145deg, #0d120f 0%, #121813 55%, #0c100e 100%);
  font-family: "Manrope", sans-serif;
}

.ambient {
  position: fixed;
  z-index: -1;
  border-radius: 50%;
  filter: blur(1px);
  pointer-events: none;
}

.ambient-one {
  top: -260px;
  right: -200px;
  width: 620px;
  height: 620px;
  border: 1px solid rgba(199, 154, 74, .12);
  box-shadow: inset 0 0 150px rgba(199, 154, 74, .03);
}

.ambient-two {
  bottom: -350px;
  left: -250px;
  width: 700px;
  height: 700px;
  border: 1px solid rgba(199, 154, 74, .07);
}

.site-header,
main,
footer {
  width: min(1180px, calc(100% - 48px));
  margin-inline: auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 104px;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  color: inherit;
  text-decoration: none;
}

.brand-emblem {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border: 1px solid var(--gold);
  border-radius: 50%;
  color: var(--gold-light);
  font-family: "Prata", serif;
  font-size: 26px;
}

.brand-text { display: grid; line-height: 1; }
.brand-text strong { font-family: "Prata", serif; font-size: 21px; font-weight: 400; letter-spacing: .18em; }
.brand-text small { margin-top: 8px; color: var(--cream-muted); font-size: 8px; font-weight: 600; letter-spacing: .31em; }

.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 11px 15px;
  border: 1px solid rgba(225, 189, 119, .19);
  border-radius: 999px;
  background: rgba(255, 255, 255, .025);
  color: #d7cec0;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .07em;
}

.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #62bf82;
  box-shadow: 0 0 0 5px rgba(98, 191, 130, .1);
  animation: pulse 2s infinite;
}

.live-pill.error .live-dot { background: var(--gold); box-shadow: 0 0 0 5px rgba(199, 154, 74, .1); }

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 50px;
  padding: 72px 0 52px;
}

.eyebrow,
.rates-title p {
  margin: 0 0 14px;
  color: var(--gold);
  font-family: "DM Sans", sans-serif;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .31em;
}

h1 {
  max-width: 800px;
  margin: 0;
  font-family: "Prata", serif;
  font-size: clamp(44px, 6vw, 74px);
  font-weight: 400;
  letter-spacing: -.04em;
  line-height: 1.05;
}

h1 em { color: var(--gold-light); font-style: normal; }

.intro {
  max-width: 520px;
  margin: 25px 0 0;
  color: var(--cream-muted);
  font-size: 14px;
  line-height: 1.8;
}

.update-box {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 260px;
  padding: 19px 20px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: rgba(255, 255, 255, .025);
}

.update-icon {
  display: grid;
  width: 45px;
  height: 45px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(199, 154, 74, .23);
  border-radius: 50%;
  color: var(--gold);
}

.update-icon svg,
.refresh-button svg {
  width: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.5;
}

.update-box > div:last-child { display: grid; }
.update-box span { color: var(--cream-muted); font-size: 8px; font-weight: 600; letter-spacing: .2em; }
.update-box strong { margin: 5px 0 3px; font-family: "DM Sans", sans-serif; font-size: 22px; font-weight: 500; letter-spacing: .04em; }
.update-box small { color: #817a70; font-size: 9px; }
.update-box small b { color: #aaa092; font-weight: 500; }

.rates-wrap {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
  box-shadow: 0 35px 100px rgba(0, 0, 0, .24);
  backdrop-filter: blur(12px);
}

.rates-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 26px 30px 22px;
  border-bottom: 1px solid var(--line);
}

.rates-title p { margin-bottom: 7px; font-size: 8px; }
.rates-title h2 { margin: 0; font-family: "Prata", serif; font-size: 22px; font-weight: 400; letter-spacing: -.02em; }

.refresh-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 3px;
  color: var(--cream-muted);
  background: transparent;
  cursor: pointer;
  transition: border-color .2s, color .2s;
}
.refresh-button:hover { border-color: rgba(225, 189, 119, .42); color: var(--gold-light); }
.refresh-button span { font-size: 10px; font-weight: 600; letter-spacing: .05em; }
.refresh-button.loading svg { animation: spin 1s linear infinite; }

.rates-head,
.rate-row {
  display: grid;
  grid-template-columns: 1.3fr .7fr .7fr;
  align-items: center;
}

.rates-head {
  min-height: 42px;
  padding: 0 30px;
  color: #726c63;
  background: rgba(0, 0, 0, .12);
  font-size: 8px;
  font-weight: 600;
  letter-spacing: .19em;
}

.rates-head span:not(:first-child) { text-align: right; }

.rate-row {
  min-height: 76px;
  padding: 12px 30px;
  border-top: 1px solid rgba(225, 189, 119, .1);
  transition: background .22s;
}
.rate-row:hover { background: rgba(199, 154, 74, .035); }

.rate-name {
  display: flex;
  align-items: center;
  gap: 14px;
}

.rate-symbol {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid rgba(199, 154, 74, .25);
  border-radius: 50%;
  color: var(--gold);
  font-family: "Prata", serif;
  font-size: 13px;
}

.rate-name strong { font-family: "DM Sans", sans-serif; font-size: 14px; font-weight: 500; letter-spacing: .015em; }

.price { text-align: right; white-space: nowrap; }
.price small { display: none; }
.price strong { color: #eee5d8; font-family: "DM Sans", sans-serif; font-size: 18px; font-weight: 500; font-variant-numeric: tabular-nums; }
.price em { margin-left: 5px; color: var(--gold); font-family: "Prata", serif; font-size: 12px; font-style: normal; }
.price.sell strong { color: var(--gold-light); }

.skeleton-row {
  display: grid;
  grid-template-columns: 1.3fr .7fr .7fr;
  gap: 40px;
  min-height: 76px;
  align-items: center;
  padding: 0 30px;
  border-top: 1px solid rgba(225, 189, 119, .1);
}

.skeleton-row i {
  height: 13px;
  border-radius: 8px;
  background: linear-gradient(90deg, rgba(255,255,255,.025) 25%, rgba(255,255,255,.07) 50%, rgba(255,255,255,.025) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

.error-state {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 65px 20px;
  text-align: center;
}
.error-state strong { font-family: "Prata", serif; font-size: 20px; font-weight: 400; }
.error-state span { color: var(--cream-muted); font-size: 11px; }

footer {
  display: flex;
  justify-content: space-between;
  padding: 22px 2px 28px;
  color: #716b62;
  font-size: 8px;
  font-weight: 500;
  letter-spacing: .13em;
}

@keyframes pulse { 50% { opacity: .55; } }
@keyframes shimmer { to { background-position: -200% 0; } }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 760px) {
  .site-header, main, footer { width: min(100% - 26px, 1180px); }
  .site-header { min-height: 82px; }
  .brand-emblem { width: 42px; height: 42px; font-size: 21px; }
  .brand-text strong { font-size: 16px; }
  .brand-text small { font-size: 6.5px; }
  .live-pill { padding: 9px 11px; font-size: 9px; }
  .hero { grid-template-columns: 1fr; gap: 28px; padding: 46px 3px 34px; }
  h1 { font-size: 41px; line-height: 1.11; }
  .intro { margin-top: 19px; font-size: 12px; }
  .update-box { width: 100%; }
  .rates-title { padding: 21px 18px 18px; }
  .rates-title h2 { font-size: 18px; }
  .refresh-button span { display: none; }
  .rates-head,
  .rate-row,
  .skeleton-row {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr) minmax(0, 1fr);
  }
  .rates-head {
    display: grid;
    min-height: 38px;
    padding: 0 14px;
    font-size: 7px;
    letter-spacing: .13em;
  }
  .rate-row {
    min-height: 62px;
    gap: 5px;
    padding: 10px 14px;
  }
  .rate-name {
    min-width: 0;
    gap: 0;
  }
  .rate-symbol { display: none; }
  .rate-name strong {
    overflow: hidden;
    font-size: 12px;
    line-height: 1.25;
  }
  .price { text-align: right; }
  .price small { display: none; }
  .price strong { font-size: clamp(12px, 3.7vw, 16px); }
  .price em { margin-left: 2px; font-size: 9px; }
  .skeleton-row {
    gap: 15px;
    min-height: 62px;
    padding: 0 14px;
  }
  footer { gap: 20px; line-height: 1.6; }
}
