:root {
  color-scheme: dark;
  --ink: #111210;
  --ink-soft: #1b1c19;
  --paper: #f1efe8;
  --paper-dim: #d8d5cc;
  --signal: #ff5a1f;
  --line: rgba(241, 239, 232, .16);
  --muted: #94958f;
  --safe-top: max(18px, var(--tg-content-safe-area-inset-top, env(safe-area-inset-top)));
  --safe-bottom: max(22px, var(--tg-content-safe-area-inset-bottom, env(safe-area-inset-bottom)));
  font-family: "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { background: var(--ink); }
body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background: var(--tg-theme-bg-color, var(--ink));
  color: var(--tg-theme-text-color, var(--paper));
  -webkit-font-smoothing: antialiased;
}
button, input { font: inherit; }
button { color: inherit; }

.app-shell {
  width: min(100%, 540px);
  min-height: 100vh;
  margin: 0 auto;
  padding: var(--safe-top) 18px var(--safe-bottom);
  overflow: hidden;
}

.brandbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 48px; }
.brand { display: inline-flex; gap: 9px; align-items: center; color: inherit; text-decoration: none; }
.brand-mark {
  display: grid; place-items: center; width: 34px; height: 34px;
  border: 1px solid var(--paper); font-weight: 900; font-size: 15px; letter-spacing: -2px;
}
.brand-mark span { color: var(--signal); }
.brand-name { font-weight: 900; font-size: 17px; letter-spacing: -.5px; }
.live { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; }
.live i { width: 6px; height: 6px; border-radius: 50%; background: #82e582; box-shadow: 0 0 0 4px rgba(130, 229, 130, .1); }

.hero-copy { margin: 0 2px 30px; }
.hero-copy.compact { margin-top: 36px; }
.eyebrow { margin: 0 0 12px; color: var(--signal); font-size: 11px; font-weight: 800; letter-spacing: .15em; }
h1 { margin: 0; max-width: 470px; font-size: clamp(37px, 10vw, 60px); line-height: .94; letter-spacing: -.055em; text-transform: uppercase; }
h1 em { color: var(--signal); font-style: normal; }
.hero-copy > p:last-child { max-width: 390px; margin: 18px 0 0; color: var(--muted); font-size: 15px; line-height: 1.5; }

.desk { position: relative; padding: 20px; background: var(--paper); color: var(--ink); box-shadow: 0 14px 48px rgba(0, 0, 0, .32); }
.desk::before, .receipt::before {
  content: ""; position: absolute; inset: 0 0 auto; height: 4px;
  background: var(--signal);
}
.desk-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 21px; padding-top: 5px; }
.desk-head > div { display: flex; align-items: baseline; gap: 9px; }
.desk-index { color: var(--signal); font: 800 10px/1 monospace; }
h2 { margin: 0; font-size: 16px; text-transform: uppercase; letter-spacing: -.02em; }
.rate-pill { display: flex; align-items: center; gap: 7px; min-height: 30px; padding: 7px 9px; border: 1px solid #c9c5bb; background: transparent; color: #5f605c; font-size: 10px; cursor: pointer; }
.refresh-icon { color: var(--signal); font-size: 15px; }

.direction-switch { display: grid; grid-template-columns: 1fr 1fr; padding: 3px; background: #dedbd2; }
.direction { min-height: 43px; border: 0; background: transparent; color: #696a65; font-size: 13px; font-weight: 700; cursor: pointer; }
.direction.active { background: var(--ink); color: var(--paper); }

.amount-box { display: block; margin-top: 18px; padding: 16px; border: 1px solid #c9c5bb; }
.amount-box > span:first-child, .field-title span, .settlement-row span, .result-strip span { display: block; color: #6c6c67; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.amount-row { display: flex; align-items: center; gap: 10px; margin: 5px 0 4px; }
.amount-row input { width: 100%; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 37px; font-weight: 800; letter-spacing: -.04em; }
.amount-row strong { font-size: 16px; }
#limit-hint { color: #8e8e88; font-size: 10px; }
.quick-amounts { display: flex; gap: 7px; margin: 9px 0 22px; overflow-x: auto; scrollbar-width: none; }
.quick-amounts::-webkit-scrollbar { display: none; }
.quick-amounts button { flex: 0 0 auto; padding: 7px 10px; border: 1px solid #cbc8be; background: transparent; color: #5d5e59; font-size: 11px; cursor: pointer; }

.field-title { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 9px; }
.field-title small { color: #999990; font-size: 10px; }
.network-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.network { min-width: 0; padding: 11px 8px; border: 1px solid #cbc8be; background: transparent; text-align: left; cursor: pointer; }
.network b, .network small { display: block; }
.network b { font-size: 12px; }
.network small { margin-top: 4px; overflow: hidden; color: #85867f; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.network.active { border-color: var(--signal); box-shadow: inset 0 -3px var(--signal); }

.method-field { margin-top: 22px; }
.method-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 7px; }
.method { min-width: 0; min-height: 53px; padding: 10px; border: 1px solid #cbc8be; background: transparent; color: var(--ink); text-align: left; cursor: pointer; }
.method b, .method small { display: block; }
.method b { font-size: 12px; }
.method small { margin-top: 4px; overflow: hidden; color: #85867f; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.method.active { border-color: var(--signal); background: rgba(255, 90, 31, .06); box-shadow: inset 3px 0 var(--signal); }

.settlement-row { display: grid; grid-template-columns: 34px 1fr auto; gap: 11px; align-items: center; margin-top: 20px; padding: 13px 0; border-top: 1px solid #d4d1c8; border-bottom: 1px solid #d4d1c8; }
.settlement-icon { display: grid; place-items: center; width: 34px; height: 34px; background: var(--ink); color: var(--signal); font-size: 11px; font-weight: 900; }
.settlement-row strong { display: block; margin-top: 3px; font-size: 13px; }
.settlement-row .check { color: var(--signal); font-size: 18px; }
.result-strip { display: grid; grid-template-columns: minmax(0, 1fr) 98px; gap: 12px; align-items: end; margin: 16px -20px -20px; padding: 18px 20px; background: #dcdbd4; }
.result-strip strong { display: block; margin: 5px 0 3px; font-size: 29px; letter-spacing: -.04em; }
.result-strip small { color: #7a7b75; font-size: 10px; }
.result-sparkline { width: 100%; height: 46px; overflow: visible; }
.result-sparkline path { fill: none; stroke: var(--signal); stroke-width: 2.5; vector-effect: non-scaling-stroke; }

.form-error { min-height: 16px; margin: 12px 0 0; color: #c63f13; font-size: 12px; }
.primary-button { display: flex; width: 100%; min-height: 56px; margin-top: 9px; padding: 0 18px; align-items: center; justify-content: space-between; border: 0; background: var(--signal); color: #fff; font-size: 13px; font-weight: 900; text-transform: uppercase; letter-spacing: .05em; cursor: pointer; }
.primary-button:disabled { opacity: .6; cursor: wait; }
.primary-button span { font-size: 23px; font-weight: 400; }
.trust-line { display: grid; grid-template-columns: auto 1fr auto 1fr auto; align-items: center; gap: 8px; margin: 22px 2px 0; color: var(--muted); font-size: 8px; text-transform: uppercase; }
.trust-line b { color: var(--signal); }
.trust-line i { height: 1px; background: var(--line); }

.content-section { margin-top: 72px; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.section-code { margin: 0 0 9px; color: var(--signal); font: 800 10px/1.2 monospace; letter-spacing: .12em; }
.content-section h2 { margin: 0; max-width: 380px; font-size: clamp(28px, 8vw, 43px); line-height: .98; letter-spacing: -.05em; text-transform: uppercase; }
.content-section h2 em { color: var(--signal); font-style: normal; }

.rate-board { padding-top: 26px; border-top: 1px solid var(--line); }
.period-switch { display: flex; gap: 4px; padding: 3px; border: 1px solid var(--line); }
.period { width: 40px; height: 34px; border: 0; background: transparent; color: var(--muted); font: 700 11px/1 monospace; cursor: pointer; }
.period.active { background: var(--paper); color: var(--ink); }
.rate-metrics { display: grid; grid-template-columns: 1fr .9fr 1.3fr; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.rate-metrics > div { min-width: 0; padding: 15px 10px 15px 0; }
.rate-metrics > div + div { padding-left: 12px; border-left: 1px solid var(--line); }
.rate-metrics span { display: block; margin-bottom: 6px; color: var(--muted); font-size: 9px; text-transform: uppercase; letter-spacing: .1em; }
.rate-metrics strong { display: block; overflow: hidden; font: 700 12px/1.2 monospace; text-overflow: ellipsis; white-space: nowrap; }
.rate-metrics strong.up { color: #82e582; }
.rate-metrics strong.down { color: #ff7067; }
.chart-shell { position: relative; min-height: 230px; margin-top: 14px; border-bottom: 1px solid var(--line); }
#rate-chart { display: block; width: 100%; height: 230px; overflow: visible; }
.chart-grid line { stroke: rgba(241, 239, 232, .085); stroke-width: 1; stroke-dasharray: 4 8; }
.chart-area { fill: rgba(255, 90, 31, .08); }
.chart-line { fill: none; stroke: var(--signal); stroke-width: 3; vector-effect: non-scaling-stroke; }
.chart-dot { fill: var(--paper); stroke: var(--signal); stroke-width: 3; vector-effect: non-scaling-stroke; }
.chart-axis { position: absolute; inset: auto 0 9px; display: flex; justify-content: space-between; color: #6f706a; font: 9px/1 monospace; text-transform: uppercase; }
.chart-loading { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(17, 18, 16, .84); color: var(--muted); font: 10px/1.4 monospace; letter-spacing: .08em; text-transform: uppercase; transition: opacity .18s ease; }
.chart-loading.hidden { opacity: 0; pointer-events: none; }
.chart-loading.error { color: #ff8b62; }
.chart-footer { display: flex; justify-content: space-between; gap: 20px; padding-top: 13px; color: var(--muted); font-size: 9px; line-height: 1.4; }
.chart-footer > span { display: flex; align-items: center; gap: 7px; color: var(--paper-dim); text-transform: uppercase; }
.chart-footer i { width: 6px; height: 6px; border-radius: 50%; background: #82e582; }
.chart-footer small { max-width: 210px; text-align: right; }

.process-section { position: relative; }
.process-list { border-top: 1px solid var(--line); }
.process-list article { display: grid; grid-template-columns: 42px 1fr; gap: 14px; padding: 19px 0; border-bottom: 1px solid var(--line); }
.process-list article > span { padding-top: 3px; color: var(--signal); font: 800 11px/1 monospace; }
.process-list h3 { margin: 0 0 5px; font-size: 16px; line-height: 1.2; }
.process-list p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.5; }

.service-methods { display: grid; gap: 8px; }
.service-methods button { position: relative; display: grid; grid-template-columns: 1fr auto; gap: 5px 16px; min-height: 96px; padding: 17px 48px 17px 17px; border: 1px solid var(--line); background: #171815; color: var(--paper); text-align: left; cursor: pointer; }
.service-methods .route-code { grid-column: 1 / -1; color: var(--signal); font: 800 9px/1 monospace; letter-spacing: .08em; }
.service-methods strong, .service-methods small { grid-column: 1; display: block; }
.service-methods strong { font-size: 16px; line-height: 1.15; }
.service-methods small { color: var(--muted); font-size: 11px; line-height: 1.4; }
.service-methods i { position: absolute; top: 50%; right: 17px; color: var(--signal); font-size: 20px; font-style: normal; transform: translateY(-50%); }
.service-methods button:hover, .service-methods button:focus-visible { border-color: rgba(255, 90, 31, .8); }

.international-ticket { position: relative; padding: 24px 20px 20px; overflow: hidden; border: 1px solid rgba(255, 90, 31, .48); background: #191a17; }
.international-ticket::after { content: "SWIFT / 38 / INT"; position: absolute; right: -38px; top: 43px; color: rgba(255, 90, 31, .07); font: 900 38px/1 monospace; transform: rotate(90deg); pointer-events: none; }
.international-mark { display: grid; width: 58px; height: 58px; margin-bottom: 22px; place-items: center; border: 1px solid var(--signal); color: var(--paper); font: 800 15px/.85 monospace; text-align: center; }
.international-mark span { color: var(--signal); }
.international-ticket h2 { max-width: 360px; }
.international-ticket > div > p:last-child { max-width: 390px; margin: 16px 0 0; color: var(--muted); font-size: 12px; line-height: 1.55; }
.international-facts { display: grid; margin-top: 22px; border-top: 1px dashed var(--line); }
.international-facts > span { display: flex; justify-content: space-between; gap: 18px; padding: 12px 0; border-bottom: 1px dashed var(--line); color: var(--muted); font: 9px/1.4 monospace; text-transform: uppercase; }
.international-facts strong { color: var(--paper-dim); text-align: right; }
.international-ticket .primary-button { position: relative; z-index: 1; margin-top: 20px; }

.service-ticket { position: relative; padding: 24px 20px 20px; background: var(--paper); color: var(--ink); box-shadow: 0 14px 48px rgba(0, 0, 0, .22); }
.service-ticket::before { content: ""; position: absolute; inset: 0 0 auto; height: 4px; background: var(--signal); }
.service-ticket .section-code { margin-top: 4px; }
.service-ticket h2 { max-width: 430px; font-size: clamp(31px, 8vw, 45px); }
.service-facts { display: grid; grid-template-columns: 1fr 1fr; margin-top: 24px; border-top: 1px dashed #aaa79f; border-left: 1px dashed #aaa79f; }
.service-facts div { min-height: 82px; padding: 14px; border-right: 1px dashed #aaa79f; border-bottom: 1px dashed #aaa79f; }
.service-facts span { display: block; margin-bottom: 8px; color: #777872; font: 9px/1 monospace; text-transform: uppercase; letter-spacing: .08em; }
.service-facts strong { font-size: 12px; line-height: 1.35; }
.secondary-button { display: flex; width: 100%; min-height: 52px; margin-top: 18px; padding: 0 16px; align-items: center; justify-content: space-between; border: 1px solid var(--ink); background: var(--ink); color: var(--paper); font-size: 11px; font-weight: 900; text-transform: uppercase; letter-spacing: .06em; cursor: pointer; }
.secondary-button span { color: var(--signal); font-size: 19px; }

.faq-count { flex: 0 0 auto; color: var(--muted); font: 9px/1 monospace; text-transform: uppercase; }
.faq-list { border-top: 1px solid var(--line); }
.faq-list details { border-bottom: 1px solid var(--line); }
.faq-list summary { display: grid; grid-template-columns: 29px 1fr auto; gap: 10px; align-items: center; min-height: 68px; padding: 14px 0; cursor: pointer; list-style: none; font-size: 15px; line-height: 1.2; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary > span { color: var(--signal); font: 800 10px/1 monospace; }
.faq-list summary i { color: var(--signal); font-size: 20px; font-style: normal; font-weight: 300; transition: transform .18s ease; }
.faq-list details[open] summary i { transform: rotate(45deg); }
.faq-list details p { margin: -3px 0 20px 39px; color: var(--muted); font-size: 12px; line-height: 1.6; }

.support-card { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 46px; padding: 16px; border: 1px solid rgba(255, 90, 31, .5); background: #171815; }
.support-card span { display: block; color: var(--signal); font-size: 9px; text-transform: uppercase; letter-spacing: .08em; }
.support-card strong { display: block; margin-top: 5px; font-size: 12px; }
.support-card a { display: flex; flex: 0 0 auto; gap: 10px; align-items: center; min-height: 38px; padding: 0 12px; background: var(--signal); color: white; font-size: 10px; font-weight: 900; text-decoration: none; text-transform: uppercase; }
.support-card a span { color: white; font-size: 15px; }

button:focus-visible, input:focus-visible, summary:focus-visible, a:focus-visible { outline: 2px solid var(--signal); outline-offset: 3px; }

.hidden { display: none !important; }
.back-button, .text-button { border: 0; padding: 0; background: transparent; color: var(--muted); font-size: 12px; cursor: pointer; }
.receipt { position: relative; padding: 25px 20px 20px; background: var(--paper); color: var(--ink); }
.receipt header { display: flex; justify-content: space-between; padding-bottom: 12px; border-bottom: 1px dashed #aaa79f; font: 700 9px/1.4 monospace; letter-spacing: .08em; }
.receipt-main { padding: 22px 0; }
.receipt-main span { display: block; color: #72736d; font-size: 10px; text-transform: uppercase; letter-spacing: .08em; }
.receipt-main strong { display: block; margin-top: 5px; font-size: 31px; letter-spacing: -.04em; }
.receipt-arrow { margin: 12px 0; color: var(--signal); font-size: 20px; }
.receipt dl { margin: 0; padding: 13px 0; border-top: 1px dashed #aaa79f; border-bottom: 1px dashed #aaa79f; }
.receipt dl div { display: flex; justify-content: space-between; gap: 20px; padding: 6px 0; font-size: 11px; }
.receipt dt { color: #74756f; }
.receipt dd { margin: 0; font-weight: 700; text-align: right; }
.receipt footer { padding-top: 15px; color: #777872; font-size: 9px; line-height: 1.5; }
.demo-notice { display: grid; grid-template-columns: auto 1fr; gap: 10px; margin-top: 14px; padding: 13px; border: 1px solid rgba(255, 90, 31, .4); color: var(--muted); font-size: 10px; line-height: 1.4; }
.demo-notice b { color: var(--signal); text-transform: uppercase; }

.success-screen { padding-top: 66px; text-align: center; }
.success-stamp { display: grid; width: 76px; height: 76px; margin: 0 auto 28px; place-items: center; border: 2px solid var(--signal); border-radius: 50%; color: var(--signal); font-size: 36px; }
.success-screen h1 { margin-inline: auto; }
.success-screen > p:not(.eyebrow) { max-width: 380px; margin: 20px auto; color: var(--muted); font-size: 14px; line-height: 1.5; }
.success-ticket { display: flex; justify-content: space-between; margin: 32px 0 20px; padding: 17px; border-top: 1px dashed var(--line); border-bottom: 1px dashed var(--line); font: 11px/1.4 monospace; }
.success-ticket span { color: var(--muted); }
.success-ticket strong { color: var(--signal); }
.text-button { margin-top: 18px; text-decoration: underline; text-underline-offset: 4px; }
.legal { margin-top: 38px; color: #686963; font-size: 9px; line-height: 1.6; text-align: center; text-transform: uppercase; letter-spacing: .08em; }

@media (min-width: 600px) {
  .app-shell { padding-inline: 24px; }
  .desk { padding: 26px; }
  .result-strip { margin-inline: -26px; margin-bottom: -26px; padding-inline: 26px; }
}

@media (max-width: 380px) {
  .app-shell { padding-inline: 14px; }
  .brandbar { margin-bottom: 38px; }
  .desk { padding-inline: 16px; }
  .result-strip { margin-inline: -16px; padding-inline: 16px; }
  .content-section { margin-top: 60px; }
  .section-head { align-items: flex-start; }
  .period { width: 36px; }
  .rate-metrics { grid-template-columns: 1fr 1fr; }
  .rate-metrics > div:last-child { grid-column: 1 / -1; padding-left: 0; border-top: 1px solid var(--line); border-left: 0; }
  .chart-footer { display: block; }
  .chart-footer small { display: block; margin-top: 8px; text-align: left; }
  .support-card { align-items: flex-start; }
}

@media (prefers-reduced-motion: no-preference) {
  .screen:not(.hidden) { animation: reveal .28s ease-out; }
  .refresh-icon.loading { animation: turn .8s linear infinite; }
  @keyframes reveal { from { opacity: 0; transform: translateY(7px); } }
  @keyframes turn { to { transform: rotate(360deg); } }
}
