:root {
  color-scheme: dark;
  --base: #18191c;
  --header: #191a1d;
  --surface: #212327;
  --field: #191b1f;
  --line: #36383e;
  --text: #f3f1ec;
  --muted: #b0b0b3;
  --gold: #f0bf55;
  --gold-ink: #271b07;
  --danger: #ffc0ad;
  --radius: 16px;
  font: 16px/1.5 "Segoe UI", "Arial", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 96px; }
body { margin: 0; background: var(--base); color: var(--text); }
body:has(dialog[open]) { overflow: hidden; }
button, select, input { font: inherit; }
button, select, summary { cursor: pointer; }
button:disabled { cursor: default; opacity: .53; }
a { color: inherit; text-decoration: none; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible, .reserve-list:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
img { display: block; max-width: 100%; }
h1, h2, h3, p { margin: 0; }
.page-width { width: min(1184px, calc(100% - 96px)); margin-inline: auto; }

.topbar { position: sticky; top: 0; z-index: 4; background: var(--header); border-bottom: 1px solid #2c2e33; }
.topbar-inner { height: 74px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { position: relative; display: block; width: 145px; height: 43px; flex: none; overflow: hidden; border-radius: 3px; }
.brand img { width: 184px; height: 92px; max-width: none; position: absolute; inset: -25px auto auto -20px; mix-blend-mode: screen; }
.navigation, .topbar-actions, .languages { display: flex; align-items: center; }
.navigation { gap: clamp(16px, 2.4vw, 35px); font-size: .925rem; font-weight: 500; color: var(--muted); }
.navigation a:hover, .footer-links button:hover { color: var(--gold); }
.review-nav { display: none; }
body:has(#reviews:not([hidden])) .review-nav { display: inline; }
.topbar-actions { gap: 17px; }
.languages { gap: 2px; padding: 3px; border: 1px solid var(--line); border-radius: 8px; }
.languages button { color: var(--muted); background: transparent; padding: 5px 7px; border: 0; border-radius: 5px; font-size: .8rem; font-weight: 700; }
.languages button[aria-pressed="true"] { color: var(--gold); background: #373025; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 46px; padding: 10px 20px; border-radius: 9px; border: 1px solid transparent; font-weight: 700; text-align: center; transition: background-color .16s, color .16s, border-color .16s; }
.button-outline { color: var(--text); border-color: #494a50; background: transparent; }
.button-outline:hover { border-color: var(--gold); color: var(--gold); }
.status-trigger { min-height: 39px; padding: 7px 13px; white-space: nowrap; font-size: .86rem; }
.button-gold { background: var(--gold); color: var(--gold-ink); border-color: var(--gold); box-shadow: inset 0 1px #fff3; }
.button-gold:hover:not(:disabled) { background: #ffd578; border-color: #ffd578; }

.hero { position: relative; isolation: isolate; overflow: hidden; min-height: 346px; display: grid; grid-template-columns: 1.05fr 1fr; align-items: center; }
.hero-copy { z-index: 1; padding-block: 36px 39px; }
.hero h1 { font-size: clamp(3rem, 5.2vw, 4.65rem); line-height: .99; letter-spacing: -.066em; font-weight: 760; }
.gold { color: var(--gold); }
.hero p { color: #bdbdc0; font-size: 1.08rem; line-height: 1.55; max-width: 29rem; margin-block: 20px 24px; }
.hero-button { min-width: 174px; }
.hero-art { align-self: stretch; position: relative; overflow: hidden; isolation: isolate; background: radial-gradient(ellipse at 56% 55%, #3b2e1f 0%, #27221e 22%, var(--base) 64%); }
.hero-art img { position: absolute; width: min(91%, 485px); height: auto; max-width: none; left: 54%; top: 47%; transform: translate(-50%, -50%); mix-blend-mode: screen; }
.art-grid { position: absolute; inset: 3.5% 0; background-image: linear-gradient(#ab875626 1px, transparent 1px), linear-gradient(90deg, #ab875626 1px, transparent 1px); background-size: 32px 32px; mask-image: radial-gradient(ellipse at 54% 53%, #000 7%, transparent 70%); }
.art-orbit { position: absolute; top: 56%; left: 54%; border: 1px solid #c7995148; border-radius: 50%; transform: translate(-50%, -50%); }
.orbit-outer { width: 80%; height: 69%; }
.orbit-inner { width: 65%; height: 56%; border-color: #c7995138; }

.reserve-strip { min-height: 57px; display: flex; align-items: stretch; overflow: hidden; border-block: 1px solid var(--line); margin-bottom: 25px; }
.reserve-label { display: flex; align-items: center; gap: 9px; padding-right: 20px; color: var(--text); font-size: .875rem; font-weight: 700; border-right: 1px solid var(--line); }
.reserve-label::before { content: ""; width: 7px; height: 7px; display: block; border: 1px solid var(--gold); transform: rotate(45deg); }
.reserve-list { display: flex; align-items: center; flex: 1; gap: 28px; min-width: 0; padding: 8px 18px; overflow-x: auto; scrollbar-width: thin; scrollbar-color: #504433 transparent; color: var(--muted); font-size: .875rem; white-space: nowrap; font-variant-numeric: tabular-nums; }
.reserve-list > * { white-space: nowrap; flex: none; }
.reserve-list strong, .reserve-list b { color: var(--gold); margin-inline-end: 4px; font-weight: 700; }

.exchange-layout { display: grid; grid-template-columns: minmax(0, 1.66fr) minmax(0, 1fr); align-items: stretch; gap: 18px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.exchange, .order-guide { padding: clamp(20px, 2.65vw, 32px); }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.panel h2, dialog h2 { font-size: clamp(1.3rem, 2.2vw, 1.65rem); font-weight: 740; line-height: 1.16; letter-spacing: -.035em; }
.network { border: 1px solid #74613b; padding: 3px 8px; color: var(--gold); border-radius: 6px; font-size: .78rem; font-weight: 700; }
.segmented { display: flex; padding: 4px; gap: 3px; background: var(--field); border: 1px solid var(--line); border-radius: 10px; }
.segmented button { color: var(--muted); background: transparent; border: 1px solid transparent; border-radius: 7px; flex: 1; padding: 7px 5px; font-size: .93rem; font-weight: 650; }
.segmented button[aria-pressed="true"] { background: #373127; border-color: #625338; color: var(--gold); }
.amount-stack { position: relative; display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 20px; margin-top: 13px; }
.amount-box { padding: 11px 15px 10px; min-height: 91px; display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "label label" "value asset"; align-items: center; gap: 0 6px; background: var(--field); border: 1px solid var(--line); border-radius: 10px; }
.amount-box label, .amount-label { grid-area: label; color: var(--muted); font-size: .875rem; }
.amount-box input, .amount-box output { grid-area: value; min-width: 0; width: 100%; padding: 0; background: transparent; border: 0; color: var(--text); font-size: clamp(1.2rem, 2.35vw, 1.95rem); height: 1.32em; line-height: 1.24; font-weight: 700; font-variant-numeric: tabular-nums; }
.amount-box output { color: var(--gold); white-space: nowrap; overflow: auto; scrollbar-width: none; }
.asset-code { grid-area: asset; align-self: end; padding: 3px 6px; background: #2c2e34; border: 1px solid #3c3e45; color: #eeece7; border-radius: 5px; font-size: .78rem; font-weight: 720; }
.swap-button { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 33px; height: 33px; background: #2b2d32; color: var(--gold); border: 1px solid #575044; border-radius: 8px; font-size: 1.17rem; line-height: 1; }
.swap-button:hover { border-color: var(--gold); }
.exchange-options { display: flex; justify-content: space-between; align-items: end; gap: 12px; margin-block: 15px 15px; }
.currency-picker { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; color: var(--muted); font-size: .875rem; }
input:not(#amount), select { border: 1px solid var(--line); border-radius: 8px; background-color: var(--field); color: var(--text); min-width: 0; min-height: 41px; padding: 8px 11px; }
select { appearance: none; padding-right: 28px; background-image: linear-gradient(45deg, transparent 50%, #c1b6a2 50%), linear-gradient(135deg, #c1b6a2 50%, transparent 50%); background-position: calc(100% - 13px) 50%, calc(100% - 8px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }
.currency-picker select { min-width: 83px; max-width: 190px; }
.quote-data { text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; font-size: .83rem; }
.exchange-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.exchange-actions #order-open { flex: 1 0 12rem; }
.form-note { margin-top: 11px; color: var(--muted); font-size: .85rem; }
.error { margin-block: 8px; color: var(--danger); font-size: .9rem; }

.order-guide { background: linear-gradient(151deg, #252529, #202226 66%); display: flex; flex-direction: column; }
.guide-steps { padding: 0; margin: 21px 0; list-style: none; display: grid; gap: 19px; }
.guide-steps li { position: relative; display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: start; }
.step-number { display: grid; place-items: center; border: 1px solid #635437; background: #342d22; color: var(--gold); width: 32px; height: 32px; border-radius: 8px; font-size: .875rem; font-weight: 700; }
.guide-steps h3, .explain h3 { font-size: 1rem; font-weight: 700; margin-bottom: 2px; }
.guide-steps p, .explain p { color: var(--muted); }
.guide-steps p { font-size: .92rem; }
.mode-notice { margin-top: auto; padding: 11px 13px; border: 1px solid #5b4b34; border-radius: 8px; background: #30291f; color: #f3d9a1; font-size: .875rem; }

.section-block { margin-block: 49px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 15px; }
.section-heading h2 { font-size: clamp(1.65rem, 3.6vw, 2.45rem); line-height: 1.1; font-weight: 740; letter-spacing: -.047em; }
.search-wrap { position: relative; width: min(100%, 305px); align-self: end; }
.search-wrap input:not(#amount) { width: 100%; padding-left: 32px; }
.search-icon { position: absolute; pointer-events: none; inset: 13px auto auto 12px; width: 11px; height: 11px; border: 1.5px solid var(--muted); border-radius: 50%; }
.search-icon::after { content: ""; position: absolute; width: 6px; height: 1.5px; top: 8px; left: 7px; background: var(--muted); transform: rotate(45deg); }
.rates-toolbar { padding: 14px 18px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.filters { display: flex; flex-wrap: wrap; gap: 6px; }
.filters button { padding: 5px 10px; color: var(--muted); background: transparent; border: 1px solid var(--line); border-radius: 7px; font-size: .85rem; }
.filters button[aria-pressed="true"] { background: #373127; color: var(--gold); border-color: #645338; }
#rates-count { flex: none; color: var(--muted); font-size: .875rem; }
.table-wrap { overflow: auto; max-height: 405px; scrollbar-color: #5b5140 var(--field); border-radius: 0 0 var(--radius) var(--radius); }
table { width: 100%; border-collapse: separate; border-spacing: 0; text-align: left; font-variant-numeric: tabular-nums; }
th, td { padding: 10px 18px; border-top: 1px solid var(--line); }
thead th { position: sticky; z-index: 1; top: 0; background: #292b30; font-size: .875rem; color: #d3d2d3; }
th:not(:first-child), td:not(:first-child) { text-align: right; }
th[scope="row"] { font-weight: 500; }
tbody td { font-size: .94rem; }
.currency-row-button { display: inline-flex; align-items: center; text-align: left; gap: 9px; padding: 0; border: 0; background: transparent; color: var(--text); }
.currency-row-button:hover, .currency-row-button[aria-pressed="true"] { color: var(--gold); }
.currency-tag { display: inline-block; min-width: 42px; padding: 2px 6px; background: #2e3036; border: 1px solid #3f424b; border-radius: 6px; color: var(--gold); text-align: center; font-size: .79rem; font-weight: 700; }
.explain-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 14px; }
.explain { padding: 22px; }
.explain h3 { margin-bottom: 8px; }
.explain #public-cities { margin-top: 8px; }
.review { padding: 21px; overflow-wrap: anywhere; }
.review h3 { font-size: 1rem; }
.review span { color: var(--gold); font-size: .85rem; }
.review p { margin-top: 7px; color: var(--muted); }
.faq-list { padding-inline: 21px; }
.faq-list details + details { border-top: 1px solid var(--line); }
.faq-list summary { padding: 15px 0; font-weight: 650; }
.faq-list summary::marker { color: var(--gold); }
.faq-list p { max-width: 66ch; padding: 0 0 15px; color: var(--muted); }
.footer { border-top: 1px solid var(--line); background: var(--header); }
.footer-inner { min-height: 89px; display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 10px 19px; }
.footer-links button { border: 0; padding: 0; background: transparent; color: var(--muted); text-align: left; font-size: .875rem; }
.public-links { padding-block: 10px; }
.public-links h2 { font-size: .875rem; }
.public-links div { display: flex; flex-wrap: wrap; gap: 5px 12px; }
.public-links a { color: var(--gold); font-size: .85rem; }

dialog { padding: 24px; width: min(100% - 28px, 510px); max-height: calc(100% - 26px); overflow: auto; color: var(--text); background: var(--surface); border: 1px solid #4b4d55; border-radius: var(--radius); box-shadow: 0 30px 80px #0008; }
dialog::backdrop { background: #0c0d10c9; }
.dialog-heading { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 16px; }
.close-button { width: 35px; height: 35px; border-radius: 8px; border: 1px solid var(--line); background: var(--field); color: var(--text); font: inherit; font-size: 1.38rem; line-height: 1; }
.order-summary { padding: 10px 12px; border: 1px solid #514537; border-radius: 8px; color: var(--gold); background: #2b271f; margin-bottom: 14px; }
.form-field { display: grid; gap: 5px; margin-block: 10px; }
.form-field span { color: var(--muted); font-size: .875rem; }
.full-width { width: 100%; }
#order-form .full-width { margin-top: 8px; }
.status-meta { display: grid; gap: 5px; }
.status-meta select { max-width: 100%; }
.status-meta strong { color: var(--gold); }
.order-details { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; }
.order-state, .order-mode { padding: 2px 6px; border: 1px solid var(--line); background: var(--field); border-radius: 6px; font-size: .8rem; }
.order-mode, .order-logistics { color: var(--muted); }
.order-selector { display: grid; gap: 4px; }
.messages { max-height: 265px; overflow: auto; margin-block: 10px; display: grid; gap: 8px; }
.messages:empty { display: none; }
.message { max-width: min(90%, 52ch); padding: 8px 10px; background: #191b1f; border: 1px solid var(--line); border-radius: 8px; overflow-wrap: anywhere; }
.message.customer { justify-self: end; background: #322c21; }
.message p { white-space: pre-wrap; }
.message-heading { display: flex; align-items: baseline; flex-wrap: wrap; gap: 5px 9px; font-size: .84rem; }
.message time, .message small { color: var(--muted); font-size: .79rem; }
.message-form { display: flex; gap: 8px; }
.message-form input { flex: 1; }
.message-form .button { padding-inline: 12px; }
.policy-content { color: var(--muted); }
.policy-content p + p { margin-top: 8px; }
.policy-content label { display: block; margin-block: 12px; }
.policy-content button { margin-top: 10px; padding: 8px 12px; color: var(--text); background: var(--field); border: 1px solid var(--line); border-radius: 7px; }

@media (max-width: 1000px) {
  .page-width { width: min(100% - 54px, 1184px); }
  .topbar-inner { gap: 15px; }
  .navigation { gap: 14px; }
  .topbar-actions { gap: 9px; }
  body:has(#reviews:not([hidden])) .review-nav { display: none; }
}
@media (max-width: 800px) {
  .page-width { width: calc(100% - 36px); }
  .navigation { display: none; }
  .exchange-layout { grid-template-columns: minmax(0,1fr); }
  .hero { min-height: 300px; }
  .hero h1 { font-size: clamp(2.6rem, 7.3vw, 4.4rem); }
  .explain-grid { grid-template-columns: minmax(0,1fr); }
}
@media (max-width: 540px) {
  .page-width { width: calc(100% - 28px); }
  .topbar-inner { height: 63px; gap: 6px; }
  .topbar .brand { width: 104px; height: 34px; }
  .topbar .brand img { width: 137px; height: 69px; inset: -17px auto auto -16px; }
  .topbar-actions { gap: 6px; }
  .languages button { padding-inline: 4px; }
  .status-trigger { font-size: .8rem; padding-inline: 8px; min-height: 35px; }
  .hero { display: flex; align-items: center; min-height: 268px; }
  .hero-copy { flex-basis: 80%; padding-block: 29px; }
  .hero h1 { font-size: clamp(2.48rem, 10.4vw, 3.38rem); }
  .hero p { font-size: .95rem; max-width: 225px; margin-block: 13px 15px; }
  .hero-art { position: absolute; top: 9%; right: -15%; bottom: -3%; width: 75%; opacity: .48; }
  .hero-art img { left: 55%; width: 98%; top: 55%; }
  .art-orbit { opacity: .5; }
  .reserve-strip { margin-bottom: 17px; min-height: 47px; }
  .reserve-label { padding-right: 10px; }
  .reserve-list { padding-inline: 10px; gap: 14px; }
  .exchange, .order-guide { padding: 16px; }
  .amount-stack { gap: 14px; }
  .amount-box { padding: 8px; min-height: 78px; }
  .asset-code { padding-inline: 4px; }
  .swap-button { width: 26px; height: 29px; }
  .exchange-options { align-items: start; }
  .exchange-actions { flex-wrap: wrap; }
  .exchange-actions #order-open { flex-basis: 100%; }
  .exchange-actions a { flex: 1 1 130px; }
  .currency-picker { align-items: start; flex-direction: column; gap: 4px; }
  .section-block { margin-block: 32px; }
  .section-heading { align-items: stretch; flex-direction: column; gap: 10px; }
  .search-wrap { align-self: stretch; }
  .rates-toolbar, th, td { padding-inline: 9px; }
  .rates-toolbar { align-items: start; }
  .currency-row-button { gap: 4px; font-size: .84rem; }
  .currency-tag { min-width: 34px; padding-inline: 3px; }
  tbody td { font-size: .85rem; }
  .footer-inner { align-items: flex-start; flex-direction: column; padding-block: 15px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
