:root {
  color-scheme: dark;
  --sapphire-900: #010a15;
  --sapphire-800: #04152d;
  --sapphire-700: #0a244a;
  --quartz-glow: #00a3ff;
  --quartz-ice: #0055ff;
  --quartz-dim: #0c2e5e;
  --white: #f7fbff;
  --muted: #9baec5;
  --line: rgba(0, 163, 255, .2);
  --glass: rgba(10, 36, 74, .4);
  --shadow: 0 8px 32px rgba(0, 0, 0, .5);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  min-width: 320px;
  margin: 0;
  background: var(--sapphire-900);
  color: var(--white);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
main, .site-footer { position: relative; z-index: 1; }
button, input, select { font: inherit; }
button { cursor: pointer; }
a { color: inherit; }
::selection { background: var(--quartz-glow); color: var(--sapphire-900); }
:focus-visible { outline: 2px solid var(--quartz-glow); outline-offset: 4px; }
[hidden] { display: none !important; }

.container { width: min(100% - 48px, 1160px); margin-inline: auto; }
.page-glow {
  position: fixed;
  z-index: 0;
  width: 560px;
  height: 560px;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(110px);
}
.page-glow--one { top: -260px; right: -100px; background: rgba(0, 85, 255, .11); }
.page-glow--two { top: 650px; left: -270px; background: rgba(0, 163, 255, .09); }

.site-header {
  position: relative;
  z-index: 3;
  background: rgba(1, 10, 21, .8);
  border-bottom: 1px solid rgba(0, 163, 255, .1);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.header-inner { min-height: 80px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(0, 163, 255, .3);
  border-radius: 50%;
  background: rgba(255, 255, 255, .1);
  color: var(--quartz-glow);
  font-size: 13px;
  font-weight: 500;
}
.brand-name { font-size: 18px; font-weight: 300; letter-spacing: .025em; white-space: nowrap; }
.header-right { display: flex; align-items: center; gap: 30px; }
.header-kicker { color: #6885a6; font-size: 10px; font-weight: 600; letter-spacing: .19em; text-transform: uppercase; text-decoration: none; transition: color .2s; }
.header-kicker:hover { color: var(--quartz-glow); }
.header-link { color: #d5e2ef; font-size: 13px; font-weight: 600; text-decoration: none; transition: color .2s; }
.header-link:hover, .footer-inner a:hover { color: var(--quartz-glow); }
.header-link span { margin-left: 5px; color: var(--quartz-glow); }

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, .8fr);
  align-items: center;
  gap: 24px;
  min-height: 440px;
  padding: 72px 4px 56px;
}
.hero-copy { position: relative; z-index: 1; }
.eyebrow, .section-index, .overline, .result-label { color: var(--quartz-glow); font-size: 11px; font-weight: 600; letter-spacing: .18em; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; }
.eyebrow-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--quartz-glow);
  box-shadow: 0 0 13px var(--quartz-glow);
}
h1, h2, p { margin-top: 0; }
h1 {
  margin: 24px 0 22px;
  font-size: clamp(54px, 7.5vw, 94px);
  line-height: .99;
  font-weight: 300;
  letter-spacing: -.065em;
}
.text-gradient {
  background: linear-gradient(to right, #fff, var(--quartz-glow));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-description { max-width: 520px; color: #b4c4d7; font-size: 16px; line-height: 1.75; font-weight: 300; }
.hero-note { display: flex; align-items: center; gap: 12px; margin-top: 34px; color: #728ba7; font-size: 12px; letter-spacing: .02em; }
.hero-note-line { width: 34px; height: 1px; background: var(--quartz-glow); }
.hero-art { position: relative; height: 338px; display: grid; place-items: center; }
.hero-art::before {
  content: "";
  position: absolute;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 163, 255, .2) 0, rgba(0, 85, 255, .08) 40%, transparent 71%);
  filter: blur(16px);
}
.art-orbit { position: absolute; border: 1px solid rgba(0, 163, 255, .16); border-radius: 50%; }
.art-orbit--outer { width: 300px; height: 300px; }
.art-orbit--outer::before, .art-orbit--inner::after {
  content: "";
  position: absolute;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--quartz-glow);
  box-shadow: 0 0 13px var(--quartz-glow);
}
.art-orbit--outer::before { top: 28px; right: 40px; }
.art-orbit--inner { width: 226px; height: 226px; border-color: rgba(0, 163, 255, .24); }
.art-orbit--inner::after { bottom: 24px; left: 28px; width: 5px; height: 5px; }
.art-core {
  display: grid;
  place-items: center;
  width: 158px;
  height: 158px;
  border: 1px solid rgba(0, 163, 255, .42);
  border-radius: 50%;
  background: linear-gradient(145deg, rgba(12, 46, 94, .95), rgba(1, 10, 21, .95));
  box-shadow: inset 0 0 35px rgba(0, 163, 255, .08), 0 0 70px rgba(0, 85, 255, .22);
  color: #dff4ff;
  font-size: 77px;
  font-weight: 200;
  line-height: 1;
}
.art-tag {
  position: absolute;
  padding: 11px 16px;
  border: 1px solid rgba(0, 163, 255, .2);
  border-radius: 11px;
  background: rgba(10, 36, 74, .75);
  box-shadow: var(--shadow);
  color: #c7dcee;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .12em;
  backdrop-filter: blur(10px);
}
.art-tag span { margin-inline: 5px; color: var(--quartz-glow); }
.art-tag--top { top: 47px; left: 0; transform: rotate(-5deg); }
.art-tag--bottom { right: 0; bottom: 42px; transform: rotate(4deg); }

.panel {
  position: relative;
  margin-bottom: 24px;
  padding: 38px;
  border: 1px solid var(--line);
  border-radius: 25px;
  background: var(--glass);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.panel::before {
  content: "";
  position: absolute;
  top: 28px;
  left: -1px;
  width: 2px;
  height: 52px;
  background: var(--quartz-glow);
  box-shadow: 0 0 14px var(--quartz-glow);
}
.panel-topline, .converter-heading, .subheading-row { display: flex; justify-content: space-between; gap: 24px; align-items: start; }
.panel h2, .currency-dialog h2 { margin: 11px 0 7px; font-size: clamp(26px, 3vw, 35px); font-weight: 300; letter-spacing: -.035em; }
.section-description, .subheading-note { margin-bottom: 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.date-actions { display: flex; align-items: end; gap: 9px; }
.field { display: flex; flex-direction: column; gap: 9px; min-width: 0; }
.field-label { color: #90a9c3; font-size: 10px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; }
.field input, .field select {
  width: 100%;
  min-height: 49px;
  padding: 12px 15px;
  border: 1px solid rgba(0, 163, 255, .2);
  border-radius: 11px;
  background: rgba(1, 10, 21, .6);
  color: #f3faff;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.field input:hover, .field select:hover { border-color: rgba(0, 163, 255, .45); }
.field input:focus, .field select:focus { border-color: var(--quartz-glow); box-shadow: 0 0 0 3px rgba(0, 163, 255, .11); }
.field input::placeholder { color: #5c7694; }
.field select { appearance: none; padding-right: 36px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath d='m3 6 5 5 5-5' fill='none' stroke='%2300a3ff' stroke-width='1.5'/%3E%3C/svg%3E"); background-position: right 13px center; background-repeat: no-repeat; }
.date-field { width: 176px; }
.date-field input { color-scheme: dark; }
.date-field input::-webkit-calendar-picker-indicator { cursor: pointer; opacity: .8; }
.button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 7px;
  min-height: 49px;
  padding: 12px 18px;
  border-radius: 11px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  transition: transform .25s, box-shadow .25s, background .25s, border-color .25s;
}
.button:hover { transform: translateY(-2px); }
.button:disabled { cursor: not-allowed; opacity: .45; transform: none; }
.button--quiet { border: 1px solid rgba(255, 255, 255, .15); background: rgba(255, 255, 255, .05); color: #e4f2fd; }
.button--quiet:hover { background: rgba(255, 255, 255, .1); }
.button--outline { border: 1px solid rgba(0, 163, 255, .34); background: rgba(0, 163, 255, .07); color: #c7ecff; }
.button--outline:hover { border-color: var(--quartz-glow); background: rgba(0, 163, 255, .13); }
.button-plus { color: var(--quartz-glow); font-size: 17px; line-height: 1; }
.button--primary { border: 0; background: linear-gradient(135deg, var(--quartz-ice), var(--quartz-glow)); color: #fff; box-shadow: 0 0 20px rgba(0, 163, 255, .4); }
.button--primary:hover { box-shadow: 0 0 30px rgba(0, 163, 255, .6); }

.status {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 38px;
  margin-top: 27px;
  padding: 9px 13px;
  border: 1px solid rgba(0, 163, 255, .12);
  border-radius: 9px;
  background: rgba(0, 163, 255, .055);
  color: #afc9e1;
  font-size: 12px;
  line-height: 1.5;
}
.status-dot { width: 6px; height: 6px; flex: none; border-radius: 50%; background: var(--quartz-glow); box-shadow: 0 0 8px var(--quartz-glow); }
.status--warning { border-color: rgba(251, 191, 36, .24); background: rgba(251, 191, 36, .07); color: #f4d695; }
.status--warning .status-dot { background: #fbbf24; box-shadow: 0 0 8px #fbbf24; }
.status--error { border-color: rgba(248, 113, 113, .3); background: rgba(248, 113, 113, .08); color: #ffb2b2; }
.status--error .status-dot { background: #f87171; box-shadow: 0 0 8px #f87171; }
.retry-button { margin-left: auto; padding: 3px 0 3px 10px; border: 0; background: none; color: #e9f7ff; font-size: 11px; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.subheading-row { align-items: end; margin: 34px 0 18px; }
.overline { margin-bottom: 6px; font-size: 10px; }
.rate-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.rate-card {
  min-width: 0;
  min-height: 170px;
  padding: 23px 22px;
  border: 1px solid rgba(0, 163, 255, .18);
  border-radius: 17px;
  background: linear-gradient(150deg, rgba(12, 46, 94, .67), rgba(4, 21, 45, .78));
  transition: transform .25s, border-color .25s, box-shadow .25s;
}
.rate-card:not(.rate-card--skeleton):hover { transform: translateY(-3px); border-color: rgba(0, 163, 255, .45); box-shadow: 0 10px 30px rgba(0, 0, 0, .2); }
.rate-card__top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.rate-card__code { color: var(--quartz-glow); font-size: 17px; font-weight: 500; letter-spacing: .02em; }
.rate-card__symbol { color: #49769e; font-size: 18px; font-weight: 300; }
.rate-card__name { min-height: 30px; margin: 3px 0 20px; color: #91abc5; font-size: 11px; line-height: 1.35; }
.rate-card__value { display: flex; align-items: baseline; flex-wrap: wrap; gap: 5px; color: #fff; font-size: clamp(20px, 2.3vw, 28px); font-weight: 300; letter-spacing: -.04em; overflow-wrap: anywhere; }
.rate-card__value small { color: #9cc8e8; font-size: 16px; }
.rate-card__unit { margin: 8px 0 0; color: #7394b3; font-size: 10px; line-height: 1.5; }
.rate-card--missing .rate-card__value { color: #7890a8; font-size: 17px; }
.rate-card--skeleton { position: relative; overflow: hidden; }
.rate-card--skeleton::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .035), transparent);
  animation: shimmer 1.6s infinite;
}
@keyframes shimmer { from { transform: translateX(-100%); } to { transform: translateX(100%); } }

.converter-panel { padding-bottom: 40px; }
.converter-mark { color: rgba(0, 163, 255, .55); font-size: 40px; font-weight: 200; line-height: 1; }
.converter-layout { display: grid; grid-template-columns: 1.25fr .8fr; gap: 25px; margin-top: 31px; }
.converter-fields { display: flex; flex-direction: column; gap: 21px; }
.amount-input { font-size: 23px !important; font-weight: 300 !important; letter-spacing: -.03em; }
.currency-controls { display: grid; grid-template-columns: minmax(0, 1fr) 46px minmax(0, 1fr); align-items: end; gap: 10px; }
.currency-controls .field select { min-height: 53px; }
.swap-button {
  width: 46px;
  height: 53px;
  border: 1px solid rgba(0, 163, 255, .28);
  border-radius: 11px;
  background: rgba(0, 163, 255, .09);
  color: var(--quartz-glow);
  font-size: 26px;
  transition: transform .2s, background .2s;
}
.swap-button:hover { transform: rotate(180deg); background: rgba(0, 163, 255, .16); }
.input-error { margin: -8px 0 0; color: #ffb2b2; font-size: 12px; }
.result-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 236px;
  padding: 27px;
  border: 1px solid rgba(0, 163, 255, .28);
  border-radius: 17px;
  background: radial-gradient(circle at 100% 0%, rgba(0, 85, 255, .16), transparent 55%), rgba(1, 10, 21, .57);
}
.result-label { font-size: 10px; }
.result-amount { margin: 16px 0 5px; color: #f7fcff; font-size: clamp(31px, 4vw, 47px); font-weight: 300; letter-spacing: -.055em; overflow-wrap: anywhere; }
.result-detail { margin-bottom: 0; color: #aac1d9; font-size: 12px; line-height: 1.6; }
.result-rule { height: 1px; margin: 23px 0 15px; background: linear-gradient(to right, rgba(0, 163, 255, .32), transparent); }
.result-date { margin-bottom: 0; color: #7290ae; font-size: 11px; }

.source-note { display: flex; align-items: flex-start; gap: 12px; max-width: 850px; margin: 30px auto 70px; color: #7e96ae; font-size: 11px; line-height: 1.7; }
.source-note p { margin: 0; }
.source-note a { color: #adcdec; text-underline-offset: 3px; }
.source-icon { display: grid; place-items: center; flex: none; width: 17px; height: 17px; border: 1px solid #5d86ab; border-radius: 50%; color: #a9cced; font-family: Georgia, serif; font-size: 12px; font-style: italic; }
.site-footer { border-top: 1px solid rgba(255, 255, 255, .06); background: var(--sapphire-900); }
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 20px; min-height: 76px; color: #7189a2; font-size: 11px; }
.footer-dot { display: inline-block; width: 6px; height: 6px; margin-right: 7px; border-radius: 50%; background: var(--quartz-glow); }
.footer-inner a { text-decoration: none; transition: color .2s; }
.noscript-message { position: fixed; bottom: 10px; left: 10px; right: 10px; padding: 12px; border-radius: 8px; background: #441f27; color: #fff; text-align: center; }

.currency-dialog {
  width: min(100% - 24px, 580px);
  max-height: min(85vh, 720px);
  padding: 27px;
  border: 1px solid rgba(0, 163, 255, .4);
  border-radius: 20px;
  background: #061b35;
  box-shadow: 0 26px 70px rgba(0, 0, 0, .65);
  color: var(--white);
}
.currency-dialog::backdrop { background: rgba(0, 5, 12, .73); backdrop-filter: blur(5px); }
.dialog-top { display: flex; justify-content: space-between; gap: 20px; }
.dialog-top p { margin-bottom: 0; color: var(--muted); font-size: 12px; }
.dialog-close { align-self: start; width: 34px; height: 34px; border: 1px solid rgba(255, 255, 255, .12); border-radius: 9px; background: rgba(255, 255, 255, .05); color: #bdd4eb; font-size: 23px; line-height: 1; }
.dialog-close:hover { background: rgba(255, 255, 255, .12); }
.search-field { margin: 25px 0 17px; }
.currency-options { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; max-height: 320px; overflow-y: auto; padding-right: 3px; }
.currency-option {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 10px 11px;
  border: 1px solid rgba(0, 163, 255, .12);
  border-radius: 10px;
  background: rgba(1, 10, 21, .4);
  cursor: pointer;
}
.currency-option:hover { border-color: rgba(0, 163, 255, .36); }
.currency-option input { width: 15px; height: 15px; flex: none; margin: 0; accent-color: var(--quartz-glow); }
.currency-option strong { flex: none; color: #dceefd; font-size: 12px; font-weight: 600; }
.currency-option span { min-width: 0; overflow: hidden; color: #91abc5; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.dialog-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 23px; padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, .1); color: #86a3bf; font-size: 12px; }

@media (max-width: 940px) {
  .hero { grid-template-columns: 1fr 280px; }
  .hero-art { transform: scale(.85); transform-origin: center right; }
  .rate-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .converter-layout { grid-template-columns: 1fr; }
  .result-card { min-height: 195px; }
}
@media (max-width: 700px) {
  .container { width: min(100% - 30px, 1160px); }
  .header-inner { min-height: 68px; }
  .brand-mark { width: 36px; height: 36px; font-size: 12px; }
  .brand-name { font-size: 15px; }
  .header-kicker { display: none; }
  .header-link { font-size: 11px; }
  .hero { grid-template-columns: 1fr; min-height: auto; padding: 69px 0 52px; }
  .hero-art { display: none; }
  h1 { font-size: clamp(51px, 12vw, 75px); }
  .hero-description { font-size: 14px; }
  .panel { padding: 27px 21px; }
  .panel-topline { flex-direction: column; }
  .date-actions { align-items: end; width: 100%; }
  .date-field { flex: 1; width: auto; }
  .subheading-row { align-items: start; }
  .subheading-note { display: none; }
  .button--outline { padding-inline: 11px; font-size: 11px; }
}
@media (max-width: 480px) {
  .header-link { max-width: 90px; line-height: 1.25; text-align: right; }
  .eyebrow { font-size: 9px; }
  .rate-grid { gap: 10px; }
  .rate-card { min-height: 155px; padding: 17px 14px; }
  .rate-card__value { font-size: 20px; }
  .currency-controls { grid-template-columns: 1fr 38px 1fr; gap: 6px; }
  .currency-controls .field select { padding-left: 10px; padding-right: 26px; font-size: 11px; background-position: right 8px center; }
  .swap-button { width: 38px; }
  .currency-options { grid-template-columns: 1fr; }
  .footer-inner { align-items: start; flex-direction: column; justify-content: center; gap: 6px; padding-block: 17px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
