/* ============================================================
   Design system: compact, responsive, light/dark themes
   ============================================================ */

:root {
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --radius: 14px;
  --radius-sm: 10px;
  --radius-lg: 22px;
  --shadow: 0 1px 3px rgba(16, 24, 40, .07), 0 8px 24px rgba(16, 24, 40, .06);
  --shadow-lg: 0 12px 40px rgba(16, 24, 40, .12);
  --shadow-glow: 0 0 0 1px rgba(79, 109, 245, .12), 0 8px 32px rgba(79, 109, 245, .18);
  --transition: .2s ease;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --dur: .45s;
  --dur-fast: .2s;
  --ring: 0 0 0 3px rgba(79, 109, 245, .28);

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 72px;
  --section-y: clamp(40px, 6vw, 72px);

  --bg: #f4f6fb;
  --bg-card: #ffffff;
  --bg-muted: #eef1f7;
  --bg-hover: #e8ecf5;
  --bg-wash: radial-gradient(1200px 600px at 10% -10%, rgba(79, 109, 245, .14), transparent 55%),
             radial-gradient(900px 500px at 90% 0%, rgba(154, 109, 245, .12), transparent 50%);
  --text: #131722;
  --text-muted: #667085;
  --border: #e2e6ef;
  --primary: #4f6df5;
  --primary-hover: #3d5ae8;
  --primary-soft: #eaeefe;
  --success: #12a150;
  --success-soft: #e3f7ec;
  --danger: #e5484d;
  --danger-soft: #fdebec;
  --warning: #b98900;
  --warning-soft: #fdf5dc;
  --header-bg: rgba(255, 255, 255, .82);
  --bg-video-tint: rgba(244, 246, 251, .82);
  --bg-video-opacity: .32;
}

[data-theme="dark"] {
  --bg: #0e1117;
  --bg-card: #171b24;
  --bg-muted: #1e232e;
  --bg-hover: #232936;
  --bg-wash: radial-gradient(1200px 600px at 10% -10%, rgba(109, 134, 255, .18), transparent 55%),
             radial-gradient(900px 500px at 90% 0%, rgba(154, 109, 245, .14), transparent 50%);
  --text: #e8eaf0;
  --text-muted: #8b93a5;
  --border: #262c39;
  --primary: #6d86ff;
  --primary-hover: #8299ff;
  --primary-soft: #1d2440;
  --success: #3ecf7a;
  --success-soft: #12291c;
  --danger: #ff6b6e;
  --danger-soft: #331a1c;
  --warning: #e8c256;
  --warning-soft: #2e2712;
  --header-bg: rgba(14, 17, 23, .82);
  --bg-video-tint: rgba(9, 11, 17, .78);
  --bg-video-opacity: .28;
  --shadow: 0 1px 3px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .35);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, .5);
  --shadow-glow: 0 0 0 1px rgba(109, 134, 255, .2), 0 8px 32px rgba(109, 134, 255, .22);
  --ring: 0 0 0 3px rgba(109, 134, 255, .32);
}

html.theme-animating,
html.theme-animating * {
  transition: background-color var(--dur) var(--ease), color var(--dur-fast) var(--ease),
    border-color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease) !important;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

/* Жёсткая защита от горизонтального скролла на мобильных */
html, body { max-width: 100%; overflow-x: hidden; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.55;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: background var(--transition), color var(--transition);
}

main { flex: 1; }

img { max-width: 100%; height: auto; }

/* Дети гридов/флексов не должны распирать контейнер */
.grid > *, .balances-grid > *, .tx-row > *, .site-header .container > * { min-width: 0; }
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-hover); }

.container {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 16px;
}

/* ------------------------------------------------ header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--header-bg);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.site-header .container {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 56px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 16px;
  color: var(--text);
  white-space: nowrap;
}
.brand:hover { color: var(--text); }
.brand .brand-mark {
  width: 28px; height: 28px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--primary), #9a6df5);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 14px;
  font-weight: 800;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: 8px;
}
.main-nav a {
  color: var(--text-muted);
  font-size: 14px;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  white-space: nowrap;
}
.main-nav a:hover { color: var(--text); background: var(--bg-hover); }

.header-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* theme + language switchers */
.icon-btn {
  width: 34px; height: 34px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  transition: var(--transition);
}
.icon-btn:hover { background: var(--bg-hover); }

.lang-switch { position: relative; }
.lang-switch summary {
  list-style: none;
  cursor: pointer;
  height: 34px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
}
.lang-switch summary .lang-code { line-height: 1; }
.lang-flag {
  width: 20px;
  height: 15px;
  object-fit: cover;
  border-radius: 2px;
  flex-shrink: 0;
  display: block;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .1);
}
.lang-switch summary .lang-flag {
  width: 18px;
  height: 13px;
}
[data-theme="dark"] .lang-flag {
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .12);
}
.lang-switch summary::-webkit-details-marker { display: none; }
.lang-switch[open] summary { background: var(--bg-hover); }
.lang-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  min-width: 168px;
  overflow: hidden;
  z-index: 50;
}
.lang-menu a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  color: var(--text);
  font-size: 14px;
  text-transform: none;
}
.lang-menu a:hover { background: var(--bg-hover); }
.lang-menu a.active { color: var(--primary); font-weight: 600; }

/* burger */
.burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 34px; height: 34px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  cursor: pointer;
  padding: 8px;
}
.burger span {
  display: block;
  height: 2px;
  border-radius: 2px;
  background: var(--text);
  transition: var(--transition);
}
.mobile-nav {
  display: none;
  border-top: 1px solid var(--border);
  background: var(--bg-card);
  padding: 8px 16px 14px;
}
.mobile-nav a {
  display: block;
  padding: 10px 8px;
  color: var(--text);
  font-size: 15px;
  border-radius: var(--radius-sm);
}
.mobile-nav a:hover { background: var(--bg-hover); }
body.nav-open .mobile-nav { display: block; }

/* ------------------------------------------------ buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  font-family: var(--font);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease),
    background var(--transition), color var(--transition), border-color var(--transition), opacity var(--transition);
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}
.btn:active:not(:disabled) { transform: scale(.98); }
.btn:focus-visible { outline: none; box-shadow: var(--ring); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.btn.is-loading { pointer-events: none; color: transparent !important; }
.btn.is-loading::after {
  content: "";
  position: absolute;
  width: 18px; height: 18px;
  border: 2px solid rgba(255,255,255,.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
.btn-outline.is-loading::after { border-color: rgba(79,109,245,.25); border-top-color: var(--primary); }
.btn-sm { min-height: 36px; padding: 6px 12px; font-size: 13px; }
.btn-lg { min-height: 48px; padding: 12px 26px; font-size: 15px; }
.btn-block { width: 100%; }

.btn-primary { background: linear-gradient(135deg, var(--primary), #7b6df8); color: #fff; box-shadow: 0 6px 18px rgba(79,109,245,.28); }
.btn-primary:hover { background: linear-gradient(135deg, var(--primary-hover), #6f5df0); color: #fff; box-shadow: 0 8px 22px rgba(79,109,245,.35); }
.btn-outline { background: transparent; color: var(--text); border-color: var(--border); }
.btn-outline:hover { background: var(--bg-hover); color: var(--text); }
.btn-ghost { background: transparent; color: var(--text-muted); }
.btn-ghost:hover { background: var(--bg-hover); color: var(--text); }
.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { filter: brightness(1.08); color: #fff; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { filter: brightness(1.08); color: #fff; }

/* ------------------------------------------------ cards & layout */

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
}
.card-title {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.section { padding: 32px 0; }
.section-sm { padding: 18px 0; }

.page-title {
  font-size: 24px;
  font-weight: 800;
  margin: 22px 0 14px;
}
.page-subtitle { color: var(--text-muted); margin-bottom: 20px; max-width: 640px; }

.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* ------------------------------------------------ forms */

.field { margin-bottom: 14px; }
.field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 5px;
}
.input, select.input, textarea.input {
  width: 100%;
  padding: 10px 12px;
  font-size: 14px;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: var(--transition);
  outline: none;
}
.input:focus { border-color: var(--primary); background: var(--bg-card); box-shadow: 0 0 0 3px var(--primary-soft); }
.input::placeholder { color: var(--text-muted); }

/* phone input */
.phone-group { display: flex; gap: 8px; }
.phone-group select { max-width: 130px; flex-shrink: 0; }

/* auth pages */
.auth-wrap {
  min-height: calc(100vh - 120px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
}
.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 28px;
}
.auth-card h1 { font-size: 20px; font-weight: 800; margin-bottom: 18px; text-align: center; }
.auth-foot { text-align: center; font-size: 14px; color: var(--text-muted); margin-top: 16px; }

.code-input {
  text-align: center;
  font-size: 24px;
  letter-spacing: 10px;
  font-weight: 700;
}

/* ------------------------------------------------ dashboard */

.account-hero {
  background: linear-gradient(135deg, var(--primary) 0%, #9a6df5 100%);
  border-radius: var(--radius);
  color: #fff;
  padding: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: space-between;
  align-items: center;
  box-shadow: var(--shadow-lg);
  min-width: 0;
}
.account-hero > div { min-width: 0; max-width: 100%; }
.account-hero .acc-label { font-size: 12px; opacity: .8; text-transform: uppercase; letter-spacing: .08em; }
.account-hero .acc-number { font-size: 24px; font-weight: 800; letter-spacing: .05em; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.account-hero .acc-status { font-size: 13px; opacity: .9; margin-top: 4px; }
.account-hero .acc-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.account-hero .btn { background: rgba(255,255,255,.16); color:#fff; border-color: rgba(255,255,255,.35); }
.account-hero .btn:hover { background: rgba(255,255,255,.28); }

.balances-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.balance-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  transition: var(--transition);
}
.balance-card:hover { border-color: var(--primary); box-shadow: var(--shadow); }
.balance-card .cur {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .05em;
}
.balance-card .cur .cur-ico {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
}
.balance-card .val {
  font-size: 19px;
  font-weight: 800;
  margin-top: 6px;
  font-variant-numeric: tabular-nums;
  word-break: break-all;
}
.balance-card .val-usd { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

/* rates */
.rates-list { display: flex; flex-direction: column; gap: 8px; }
.rate-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  background: var(--bg-muted);
  font-size: 13px;
}
.rate-row .rr-name { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.rate-row .rr-val { font-variant-numeric: tabular-nums; font-weight: 700; }
.rates-updated { font-size: 12px; color: var(--text-muted); margin-top: 10px; }

/* Главная: вертикальный ритм секций */
.history-filters { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.chip {
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
}
.chip:hover { border-color: var(--primary); color: var(--primary); }
.chip.active { background: var(--primary); border-color: var(--primary); color: #fff; }

.tx-list { display: flex; flex-direction: column; }
.tx-row {
  display: grid;
  grid-template-columns: 36px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 10px 4px;
  border-bottom: 1px solid var(--border);
}
.tx-row:last-child { border-bottom: none; }
.tx-ico {
  width: 34px; height: 34px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  flex-shrink: 0;
}
.tx-ico.in { background: var(--success-soft); color: var(--success); }
.tx-ico.out { background: var(--danger-soft); color: var(--danger); }
.tx-ico.dep { background: var(--primary-soft); color: var(--primary); }
.tx-main .tx-title { font-size: 14px; font-weight: 600; }
.tx-main .tx-date { font-size: 12px; color: var(--text-muted); }
.tx-amount { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tx-amount.plus { color: var(--success); }
.tx-amount.minus { color: var(--danger); }
.tx-amount .tx-cur { font-size: 11px; color: var(--text-muted); font-weight: 600; margin-left: 3px; }

.empty-state {
  text-align: center;
  color: var(--text-muted);
  padding: 32px 12px;
  font-size: 14px;
}

/* ------------------------------------------------ tabs */

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 20px; }
.tab {
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  border: none;
  background: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  font-family: var(--font);
  transition: var(--transition);
}
.tab:hover { color: var(--text); }
.tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.tab-pane { display: none; }
.tab-pane.active { display: block; }

/* method cards on deposit page */
.method-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  background: var(--bg-card);
  cursor: pointer;
  transition: var(--transition);
  position: relative;
}
.method-card:hover { border-color: var(--primary); }
.method-card.selected { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.method-card .m-ico {
  width: 38px; height: 38px;
  border-radius: var(--radius-sm);
  background: var(--primary-soft);
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  margin-bottom: 8px;
}
.method-card .m-title { font-weight: 700; font-size: 14px; margin-bottom: 3px; }
.method-card .m-text { font-size: 12.5px; color: var(--text-muted); }

/* exchanger tiles (cash page) */
.exchanger-block { max-width: 560px; }
.exchanger-intro {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 16px;
  line-height: 1.5;
}
.exchanger-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.exchanger-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 88px;
  padding: 14px 12px;
  border-radius: 10px;
  background: linear-gradient(145deg, #8b9cff 0%, #6f7ff0 100%);
  color: #fff;
  text-decoration: none;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, .22);
  box-shadow: 0 2px 10px rgba(79, 109, 245, .28);
  transition: transform var(--transition), box-shadow var(--transition), filter var(--transition);
}
.exchanger-tile:hover {
  color: #fff;
  filter: brightness(1.05);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(79, 109, 245, .38);
}
.exchanger-tile-main {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px 8px;
  line-height: 1.2;
}
.exchanger-tile .ex-cur {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: .06em;
}
.exchanger-tile .ex-word {
  font-size: 14px;
  font-weight: 700;
}
.exchanger-tile .ex-hint {
  font-size: 11px;
  font-weight: 500;
  opacity: .88;
  letter-spacing: .03em;
}
[data-theme="dark"] .exchanger-tile {
  background: linear-gradient(145deg, rgba(109, 134, 255, .72) 0%, rgba(90, 115, 230, .55) 100%);
  border-color: rgba(255, 255, 255, .14);
  box-shadow: 0 2px 12px rgba(0, 0, 0, .35);
}
[data-theme="dark"] .exchanger-tile:hover {
  box-shadow: 0 4px 18px rgba(109, 134, 255, .28);
}

/* address box */
.addr-box {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-muted);
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-size: 13px;
  word-break: break-all;
}
.addr-box .btn { flex-shrink: 0; }

/* status badges */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}
.badge-pending { background: var(--warning-soft); color: var(--warning); }
.badge-approved { background: var(--success-soft); color: var(--success); }
.badge-rejected { background: var(--danger-soft); color: var(--danger); }
.badge-muted { background: var(--bg-muted); color: var(--text-muted); }

/* ------------------------------------------------ tables */

.table-wrap { overflow-x: auto; }
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.table th {
  text-align: left;
  padding: 8px 10px;
  color: var(--text-muted);
  font-weight: 600;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.table tr:hover td { background: var(--bg-muted); }

/* ------------------------------------------------ landing */

.hero {
  padding: 40px 0 32px;
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 32px;
  align-items: center;
}
.hero h1 {
  font-size: 36px;
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -.02em;
  margin-bottom: 14px;
}
.hero p { font-size: 16px; color: var(--text-muted); margin-bottom: 22px; max-width: 480px; }
.hero-body { min-width: 0; }
.hero-cta { display: inline-flex; }
.hero-img {
  border-radius: var(--radius);
  overflow: hidden;
  line-height: 0;
}
.hero-img img {
  display: block;
  width: 100%;
  border-radius: var(--radius);
}

.section-title {
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 20px;
  letter-spacing: -.01em;
}

.feature-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px;
  border-radius: var(--radius);
  background: var(--bg-card);
  border: 1px solid var(--border);
  font-size: 14px;
}
.feature-item .f-ico {
  width: 34px; height: 34px;
  flex-shrink: 0;
  border-radius: var(--radius-sm);
  background: var(--primary-soft);
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.speed-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.speed-strip .card { font-size: 14px; display: flex; align-items: center; gap: 10px; }

.cta-band {
  background: linear-gradient(135deg, var(--primary), #9a6df5);
  border-radius: var(--radius);
  color: #fff;
  padding: 28px;
  text-align: center;
}
.cta-band h2 { font-size: 22px; margin-bottom: 8px; }
.cta-band p { opacity: .9; margin-bottom: 16px; }
.cta-band .btn { background: #fff; color: var(--primary); }

/* prose (agreements, about) */
.prose { max-width: 820px; overflow-wrap: break-word; }
.prose p { margin-bottom: 12px; color: var(--text); font-size: 14px; }
.prose h2 { font-size: 17px; font-weight: 700; margin: 20px 0 8px; }

/* review cards */
.review-card { display: flex; flex-direction: column; gap: 10px; }
.review-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.review-head .r-name { font-weight: 700; font-size: 14px; }
.review-head .r-ip { font-size: 12px; color: var(--text-muted); font-family: ui-monospace, monospace; }
.review-stars { color: #f5a623; font-size: 13px; letter-spacing: 2px; }
.review-text { font-size: 13.5px; color: var(--text-muted); }

/* ------------------------------------------------ modal & toast */

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(10, 14, 24, .55);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 16px;
}
.modal-backdrop.open { display: flex; }
.modal-box {
  width: 100%;
  max-width: 420px;
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  padding: 22px;
}
.modal-box h3 { font-size: 16px; margin-bottom: 10px; }
.modal-box .modal-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 18px; }
.modal-box { position: relative; }
.modal-close {
  position: absolute;
  top: 10px;
  right: 12px;
  border: 0;
  background: transparent;
  color: var(--text-muted);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

/* ------------------------------------------------ verification hub */
.verify-page { position: relative; overflow-x: hidden; }
.verify-main { position: relative; }
.verify-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}
.verify-container { position: relative; z-index: 1; padding-bottom: 40px; }
.verify-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(2px);
  opacity: .55;
  will-change: transform;
  animation: verify-float 18s ease-in-out infinite;
}
.verify-orb-1 {
  width: 220px; height: 220px; left: -40px; top: 40px;
  background: radial-gradient(circle at 30% 30%, rgba(165,180,252,.55), rgba(165,180,252,0));
}
.verify-orb-2 {
  width: 280px; height: 280px; right: -60px; top: 120px;
  background: radial-gradient(circle at 40% 40%, rgba(196,181,253,.5), rgba(196,181,253,0));
  animation-duration: 22s; animation-direction: reverse;
}
.verify-orb-3 {
  width: 180px; height: 180px; left: 35%; bottom: 40px;
  background: radial-gradient(circle at 50% 50%, rgba(125,211,252,.4), rgba(125,211,252,0));
  animation-duration: 26s;
}
.verify-orb-4 {
  width: 140px; height: 140px; right: 22%; top: 30px;
  background: radial-gradient(circle at 50% 50%, rgba(251,207,232,.35), rgba(251,207,232,0));
  animation-duration: 20s; animation-delay: -4s;
}
@keyframes verify-float {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  33% { transform: translate3d(18px, -14px, 0) scale(1.04); }
  66% { transform: translate3d(-14px, 12px, 0) scale(.97); }
}
@media (prefers-reduced-motion: reduce) {
  .verify-orb { animation: none; }
}
.verify-notice {
  margin-bottom: 20px;
  max-width: 860px;
  line-height: 1.55;
  font-size: 14px;
  color: var(--text-muted);
}
.verify-retention { margin-top: 8px; font-size: 13px; }
.verify-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}
.verify-tile {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 18px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-card);
  box-shadow: var(--shadow);
  min-width: 0;
}
.verify-tile-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.verify-tile-ico { font-size: 22px; line-height: 1; }
.verify-tile-title { font-size: 16px; margin: 0; line-height: 1.3; }
.verify-tile-text {
  margin: 0;
  color: var(--text-muted);
  font-size: 13.5px;
  line-height: 1.45;
  flex: 1;
}
.verify-track-meta {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
}
.verify-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.verify-modal { max-width: 560px; max-height: min(90vh, 860px); overflow: auto; }
.verify-modal-intro {
  color: var(--text-muted);
  font-size: 13.5px;
  margin: 0 0 14px;
  line-height: 1.45;
  padding-right: 18px;
}
.verify-hint {
  font-size: 12.5px;
  color: var(--text-muted);
  margin: 0 0 12px;
  line-height: 1.45;
}
.verify-pdf-row { margin-bottom: 10px; }
.check-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 13px;
  color: var(--text);
  margin: 0 0 10px;
  line-height: 1.4;
}
.check-row input { margin-top: 2px; }
.required-consent { margin: 8px 0 14px; }

@media (max-width: 960px) {
  .verify-grid { grid-template-columns: 1fr; }
}

.toast-wrap {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 1100;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.toast {
  background: var(--bg-card);
  color: var(--text);
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  padding: 12px 16px;
  font-size: 14px;
  max-width: 340px;
  animation: toast-in .25s ease;
}
.toast.success { border-left-color: var(--success); }
.toast.danger { border-left-color: var(--danger); }
@keyframes toast-in {
  from { transform: translateY(8px); opacity: 0; }
  to { transform: none; opacity: 1; }
}

/* ------------------------------------------------ footer */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 18px 0;
  margin-top: 40px;
  color: var(--text-muted);
  font-size: 13px;
}
.site-footer .container { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }

/* ------------------------------------------------ admin */

.admin-toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 20px 0; }
.stat-card .stat-num { font-size: 22px; font-weight: 800; }
.stat-card .stat-label { font-size: 12px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .05em; }
.w-edit { cursor: pointer; border-bottom: 1px dashed var(--primary); }
.w-edit:hover { color: var(--primary); }
.action-icons { display: flex; gap: 6px; }
.action-icons button {
  border: 1px solid var(--border);
  background: var(--bg-card);
  border-radius: 6px;
  width: 26px; height: 26px;
  font-size: 13px;
  cursor: pointer;
  color: var(--text);
  display: inline-flex; align-items: center; justify-content: center;
}
.action-icons button:hover { background: var(--bg-hover); }
.action-icons .a-plus { color: var(--success); }
.action-icons .a-minus { color: var(--danger); }

/* ------------------------------------------------ responsive */

.mobile-nav-session { border-top: 1px solid var(--border); margin-top: 6px; padding-top: 6px; }

@media (max-width: 960px) {
  .grid-4, .balances-grid { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .hero {
    grid-template-columns: 1fr;
    padding: 20px 0 0;
    gap: 16px;
  }
  .hero h1 { font-size: 28px; margin-bottom: 10px; }
  .hero p { margin-bottom: 0; max-width: none; }
  .hero-body { width: 100%; }
  .hero-img {
    order: -1;
    width: 100%;
    max-width: 100%;
    margin: 0;
  }
  .hero-cta {
    display: flex;
    width: 100%;
    height: 56px;
    min-height: 56px;
    margin-top: 24px;
    margin-bottom: 44px;
    padding: 0 20px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 10px;
    justify-content: center;
    align-items: center;
  }
  .hero + .section { padding-top: 0; }
  .hero + .section .section-title { margin-top: 0; margin-bottom: 16px; }

  /* Единый ритм крупных секций на главной */
  .home-main > .section {
    padding-top: 48px;
    padding-bottom: 12px;
  }
  .home-main > .hero + .section {
    padding-top: 0;
  }
  .home-main > .section:last-child {
    padding-bottom: 40px;
  }
  .home-main .section-title {
    margin-top: 0;
    margin-bottom: 18px;
  }
  .home-main .rates-updated {
    margin-top: 16px;
    margin-bottom: 0;
  }
  .home-main > .section .grid.grid-2 {
    gap: 28px;
  }
}

@media (max-width: 720px) {
  .main-nav { display: none; }
  .burger { display: flex; flex-shrink: 0; }
  .grid-2 { grid-template-columns: 1fr; }
  .speed-strip { grid-template-columns: 1fr; }
  .account-hero { padding: 16px; }
  .account-hero .acc-number { font-size: 19px; }
  .account-hero .acc-actions { width: 100%; }
  .account-hero .acc-actions .btn { flex: 1 1 auto; padding: 8px 10px; font-size: 13px; }
  .page-title { font-size: 20px; margin: 16px 0 12px; }
  .page-subtitle { font-size: 14px; margin-bottom: 14px; }
  .section { padding: 20px 0; }
  .section-sm { padding: 12px 0; }
  .home-main > .section {
    padding-top: 44px;
    padding-bottom: 10px;
  }
  .home-main > .hero + .section { padding-top: 0; }
  .home-main > .section:last-child { padding-bottom: 36px; }
  .card { padding: 16px; }
  .site-header .container { gap: 8px; }
  .cta-band { padding: 20px 16px; }
  .cta-band h2 { font-size: 18px; }
}

@media (max-width: 560px) {
  /* Кнопки сессии уходят в бургер-меню — шапка не переполняется */
  .header-actions .nav-session { display: none; }
  .brand { font-size: 15px; }
  .hero h1 { font-size: 23px; }
  .hero p { font-size: 14.5px; }
  .tabs { overflow-x: auto; scrollbar-width: none; }
  .tabs::-webkit-scrollbar { display: none; }
  .tab { padding: 9px 12px; white-space: nowrap; }
}

@media (max-width: 480px) {
  .balances-grid, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  body { font-size: 14px; }
  .container { padding: 0 12px; }
  .auth-card { padding: 18px 16px; }
  .tx-row { grid-template-columns: 30px 1fr auto; gap: 8px; }
  .card { padding: 14px; }
  .prose p { font-size: 13.5px; }
  .account-hero .acc-number { font-size: 17px; }
  .balance-card .val { font-size: 17px; }
  .modal-box { padding: 16px; }
  .toast-wrap { left: 12px; right: 12px; bottom: 12px; }
  .toast { max-width: none; }
  .addr-box { flex-direction: column; align-items: stretch; text-align: center; }
}

@media (max-width: 360px) {
  .exchanger-grid { grid-template-columns: 1fr; }
  .exchanger-tile .ex-cur { font-size: 20px; }
}

@media (max-width: 380px) {
  .site-header .container { gap: 6px; height: 52px; padding: 0 10px; }
  .brand span:last-child { font-size: 14px; }
  .icon-btn, .lang-switch summary, .burger { height: 32px; }
  .icon-btn, .burger { width: 32px; }
  .lang-switch summary { padding: 0 8px; }
  .hero h1 { font-size: 21px; }
  .account-hero .acc-actions .btn { width: 100%; flex: none; }
}

/* ------------------------------------------------ payment-methods hub */
.badge-revision { background: rgba(99, 102, 241, .15); color: #6366f1; }
.pm-page, .cash-page { position: relative; overflow-x: hidden; }
.pm-main { position: relative; min-height: 60vh; }
.pm-bg { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.pm-container { position: relative; z-index: 1; padding-bottom: 48px; }
.pm-orb {
  position: absolute; border-radius: 50%; filter: blur(2px); opacity: .5;
  will-change: transform; animation: pm-float 20s ease-in-out infinite;
}
.pm-orb-1 { width: 240px; height: 240px; left: -50px; top: 20px; background: radial-gradient(circle, rgba(165,180,252,.55), transparent 70%); }
.pm-orb-2 { width: 300px; height: 300px; right: -80px; top: 100px; background: radial-gradient(circle, rgba(196,181,253,.45), transparent 70%); animation-duration: 24s; animation-direction: reverse; }
.pm-orb-3 { width: 180px; height: 180px; left: 40%; bottom: 10px; background: radial-gradient(circle, rgba(125,211,252,.35), transparent 70%); animation-duration: 28s; }
.pm-orb-4 { width: 140px; height: 140px; right: 25%; top: 40px; background: radial-gradient(circle, rgba(251,207,232,.3), transparent 70%); animation-duration: 22s; }
@keyframes pm-float {
  0%, 100% { transform: translate3d(0,0,0) scale(1); }
  50% { transform: translate3d(12px,-16px,0) scale(1.05); }
}
@media (prefers-reduced-motion: reduce) {
  .pm-orb, .verify-orb { animation: none !important; }
  .reveal-card { animation: none !important; opacity: 1 !important; transform: none !important; }
}
.pm-notice, .pm-steps { margin-bottom: 16px; max-width: 920px; }
.pm-retention { margin-top: 8px; font-size: 13px; color: var(--text-muted); }
.pm-steps { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 10px; }
.pm-step { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--text-muted); }
.pm-step span {
  width: 28px; height: 28px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(145deg, #8b9cff, #6f7ff0); color: #fff; font-weight: 700; font-size: 12px; flex-shrink: 0;
}
.pm-flow-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.pm-flow-tabs .chip { min-height: 44px; padding: 10px 14px; text-decoration: none; display: inline-flex; align-items: center; }
.pm-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}
.pm-tile, .cash-methods .pm-tile {
  display: flex; flex-direction: column; gap: 10px; min-width: 0;
  padding: 18px 16px; border-radius: var(--radius);
  border: 1px solid var(--border); background: var(--bg-card);
  box-shadow: 0 8px 28px rgba(79, 109, 245, .08);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.pm-tile:hover, .cash-methods .method-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(79, 109, 245, .14);
  border-color: rgba(111, 127, 240, .35);
}
.cash-methods .method-card { cursor: pointer; }
.cash-methods .method-card.selected {
  border-color: var(--primary);
  box-shadow: 0 0 0 1px var(--primary), 0 12px 32px rgba(79, 109, 245, .16);
}
.pm-tile-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.pm-ico { color: var(--primary); display: inline-flex; width: 36px; height: 36px; align-items: center; justify-content: center; font-size: 22px; }
.pm-tile-title { font-size: 16px; margin: 0; line-height: 1.3; }
.pm-tile-text { margin: 0; color: var(--text-muted); font-size: 13.5px; line-height: 1.45; flex: 1; }
.pm-tile-meta { font-size: 12px; color: var(--text-muted); line-height: 1.4; }
.pm-tile .btn, .pm-actions .btn, .cash-page .btn-block { min-height: 44px; }
.pm-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.pm-modal { max-width: 560px; max-height: min(90vh, 860px); overflow: auto; width: 100%; }
.pm-modal-intro, .pm-hint { color: var(--text-muted); font-size: 13px; line-height: 1.45; margin: 0 0 12px; }
.pm-mini-steps { display: grid; gap: 6px; margin-bottom: 12px; font-size: 12.5px; color: var(--text-muted); }
.pm-mini-steps div { padding: 8px 10px; border-radius: 8px; background: var(--bg-muted); }
.pm-pdf-row { margin-bottom: 10px; }
.reveal-card { animation: reveal-up .45s ease both; }
.reveal-card:nth-child(2) { animation-delay: .04s; }
.reveal-card:nth-child(3) { animation-delay: .08s; }
.reveal-card:nth-child(4) { animation-delay: .12s; }
.reveal-card:nth-child(5) { animation-delay: .16s; }
.reveal-card:nth-child(6) { animation-delay: .2s; }
.reveal-card:nth-child(7) { animation-delay: .24s; }
.reveal-card:nth-child(8) { animation-delay: .28s; }
.reveal-card:nth-child(9) { animation-delay: .32s; }
.reveal-card:nth-child(10) { animation-delay: .36s; }
.reveal-card:nth-child(11) { animation-delay: .4s; }
.reveal-card:nth-child(12) { animation-delay: .44s; }
@keyframes reveal-up {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
.app-timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.app-timeline li {
  display: grid; gap: 2px; padding: 8px 10px; border-radius: 8px;
  background: var(--bg-muted); font-size: 12px;
}
.app-timeline .tl-date { color: var(--text-muted); }
.app-timeline .tl-action { font-weight: 700; }
.admin-timeline-row td { border-top: 0 !important; padding-top: 0 !important; }
.cash-methods { margin-bottom: 16px; }

@media (max-width: 960px) {
  .pm-grid, .pm-steps { grid-template-columns: 1fr; }
  .pm-tile .btn, .cash-page .btn-block, .pm-actions .btn, .pm-flow-tabs .chip { width: 100%; }
  .pm-actions { flex-direction: column; }
  .pm-page, .cash-page, .pm-container, .cash-page .container { overflow-x: hidden; max-width: 100%; }
  .pm-tile, .cash-methods .method-card { min-height: 44px; }
}
@media (max-width: 480px) {
  .pm-modal { max-height: 85vh; width: calc(100vw - 24px); margin: 0 auto; }
  .pm-container { padding-bottom: 32px; }
  .tabs { gap: 6px; }
  .tab { min-height: 44px; }
  .grid.grid-2 { grid-template-columns: 1fr !important; }
}
@media (max-width: 360px) {
  .page-title { font-size: 1.35rem; }
  .pm-tile-title { font-size: 15px; }
}

/* ============================================================
   Redesign system v2 — rhythm, stages, auth, home, cabinet
   ============================================================ */

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes float-soft {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(10px, -14px, 0) scale(1.04); }
}
@keyframes shimmer {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}
@keyframes stage-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(79,109,245,.35); }
  50% { box-shadow: 0 0 0 6px rgba(79,109,245,0); }
}

body { background-color: transparent; }

/* Global looping video background */
.site-bg {
  position: fixed; inset: 0; z-index: -2;
  overflow: hidden; pointer-events: none;
  background: var(--bg);
  isolation: isolate;
  contain: strict;
}
.site-bg-video {
  position: absolute; top: 50%; left: 50%;
  width: 100%; height: 100%;
  min-width: 100%; min-height: 100%;
  transform: translate(-50%, -50%) scale(1.08);
  object-fit: cover;
  /* No CSS filter on <video> — browsers flash unfiltered frame on tab switch */
  opacity: var(--bg-video-opacity, .38);
  z-index: 0;
}
.site-bg.is-hidden .site-bg-video {
  visibility: hidden; opacity: 0;
}
.site-bg-overlay {
  position: absolute; inset: 0; z-index: 1;
  background-image: var(--bg-wash), linear-gradient(var(--bg-video-tint), var(--bg-video-tint));
  transition: background var(--dur) var(--ease);
}
@media (prefers-reduced-motion: reduce) {
  .site-bg-video { display: none; }
}

.section {
  padding: var(--section-y) 0;
}
.section-sm { padding: var(--space-5) 0; }
.section-head {
  display: flex; flex-direction: column; gap: var(--space-2);
  margin-bottom: var(--space-5); max-width: 720px;
}
.section-kicker {
  font-size: 12px; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--primary);
}
.section-title { font-size: clamp(1.35rem, 2.4vw, 1.75rem); font-weight: 800; letter-spacing: -.02em; margin: 0; }
.section-lead { color: var(--text-muted); font-size: 15px; margin: 0; line-height: 1.55; }
.page-title { font-size: clamp(1.4rem, 2.6vw, 1.9rem); font-weight: 800; letter-spacing: -.02em; margin-bottom: 8px; }
.page-subtitle { color: var(--text-muted); margin-bottom: var(--space-5); max-width: 720px; }

.stack { display: flex; flex-direction: column; gap: var(--space-4); }
.stack-lg { gap: var(--space-6); }
.cluster { display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: center; }

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: var(--space-5);
  transition: transform var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease), border-color var(--transition);
}
.card:hover { box-shadow: var(--shadow-lg); }
.card-soft { background: color-mix(in srgb, var(--bg-card) 88%, transparent); backdrop-filter: blur(8px); }
.card-interactive:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--primary) 35%, var(--border)); }

.ico {
  width: 1.15em; height: 1.15em; display: inline-block; vertical-align: -0.15em;
  stroke: currentColor; fill: none; stroke-width: 1.8; flex-shrink: 0;
}
.ico-fill { fill: currentColor; stroke: none; }
.f-ico, .pm-ico, .m-ico, .step-ico, .method-ico {
  width: 40px; height: 40px; border-radius: 12px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--primary-soft); color: var(--primary); flex-shrink: 0;
}
.f-ico .ico, .pm-ico .ico, .m-ico .ico, .step-ico .ico, .method-ico .ico { width: 22px; height: 22px; }

/* Background orbs */
.page-shell { position: relative; overflow: hidden; }
.bg-orbs {
  position: absolute; inset: 0; pointer-events: none; z-index: 0; overflow: hidden;
}
.bg-orbs .orb {
  position: absolute; border-radius: 50%; filter: blur(2px); opacity: .45;
  will-change: transform; animation: float-soft 22s ease-in-out infinite;
  background: radial-gradient(circle, rgba(125, 150, 255, .55), transparent 70%);
}
.bg-orbs .orb-1 { width: 260px; height: 260px; left: -60px; top: 40px; }
.bg-orbs .orb-2 { width: 320px; height: 320px; right: -80px; top: 120px; animation-duration: 26s; animation-direction: reverse;
  background: radial-gradient(circle, rgba(196,181,253,.5), transparent 70%); }
.bg-orbs .orb-3 { width: 180px; height: 180px; left: 40%; bottom: 8%; animation-duration: 30s;
  background: radial-gradient(circle, rgba(125,211,252,.4), transparent 70%); }
.page-shell > .container, .page-shell > main, .page-shell .pm-container { position: relative; z-index: 1; }

/* Scroll reveal — only hide when JS opts in (progressive enhancement) */
html.reveal-ready [data-reveal]:not(.is-in) {
  opacity: 0; transform: translate3d(0, 18px, 0);
}
html.reveal-ready [data-reveal] {
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease);
}
html.reveal-ready [data-reveal].is-in { opacity: 1; transform: none; }
html.reveal-ready [data-reveal-stagger]:not(.is-in) > * {
  opacity: 0; transform: translate3d(0, 14px, 0);
}
html.reveal-ready [data-reveal-stagger] > * {
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease);
}
html.reveal-ready [data-reveal-stagger].is-in > *:nth-child(1) { transition-delay: .02s; }
html.reveal-ready [data-reveal-stagger].is-in > *:nth-child(2) { transition-delay: .06s; }
html.reveal-ready [data-reveal-stagger].is-in > *:nth-child(3) { transition-delay: .1s; }
html.reveal-ready [data-reveal-stagger].is-in > *:nth-child(4) { transition-delay: .14s; }
html.reveal-ready [data-reveal-stagger].is-in > *:nth-child(5) { transition-delay: .18s; }
html.reveal-ready [data-reveal-stagger].is-in > *:nth-child(6) { transition-delay: .22s; }
html.reveal-ready [data-reveal-stagger].is-in > *:nth-child(7) { transition-delay: .26s; }
html.reveal-ready [data-reveal-stagger].is-in > *:nth-child(8) { transition-delay: .3s; }
html.reveal-ready [data-reveal-stagger].is-in > * { opacity: 1; transform: none; }

/* Segmented control */
.segmented {
  display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px;
  background: var(--bg-muted); border-radius: 999px; border: 1px solid var(--border);
}
.segmented .seg {
  min-height: 40px; padding: 8px 16px; border: 0; border-radius: 999px;
  background: transparent; color: var(--text-muted); font: inherit; font-weight: 600;
  cursor: pointer; transition: var(--transition); text-decoration: none;
  display: inline-flex; align-items: center; justify-content: center;
}
.segmented .seg:hover { color: var(--text); }
.segmented .seg.active, .segmented a.seg.active, .segmented .chip.active {
  background: var(--bg-card); color: var(--text); box-shadow: var(--shadow);
}
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 28px; padding: 4px 10px; border-radius: 999px;
  background: var(--primary-soft); color: var(--primary); font-size: 12px; font-weight: 700;
}

/* Skeleton */
.skeleton {
  display: block; border-radius: var(--radius-sm);
  background: linear-gradient(90deg, var(--bg-muted) 25%, var(--bg-hover) 50%, var(--bg-muted) 75%);
  background-size: 200% 100%; animation: shimmer 1.2s linear infinite;
}
.skeleton-line { height: 12px; margin: 8px 0; }
.skeleton-card { height: 96px; }
.skeleton-block { min-height: 120px; }

/* Forms / errors */
.field { margin-bottom: var(--space-3); }
.field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; color: var(--text-muted); }
.input {
  width: 100%; min-height: 44px; padding: 10px 12px;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--bg-card); color: var(--text); font: inherit;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.input:focus { outline: none; border-color: var(--primary); box-shadow: var(--ring); }
.input.is-invalid { border-color: var(--danger); }
.field-error, .form-error {
  color: var(--danger); font-size: 13px; margin-top: 6px;
  display: none;
}
.field-error.is-visible, .form-error.is-visible { display: block; }
.form-error {
  padding: 10px 12px; border-radius: var(--radius-sm);
  background: var(--danger-soft); margin-bottom: var(--space-3);
}

/* Deal stages (homepage) */
.deal-steps {
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--space-3);
  counter-reset: step;
}
.deal-step {
  position: relative; padding: var(--space-4);
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow);
  display: flex; flex-direction: column; gap: 10px; min-height: 160px;
}
.deal-step .step-num {
  width: 28px; height: 28px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(145deg, #8b9cff, #6f7ff0); color: #fff;
  font-size: 12px; font-weight: 800;
}
.deal-step h3 { font-size: 15px; margin: 0; }
.deal-step p { font-size: 13px; color: var(--text-muted); margin: 0; line-height: 1.45; }
.deal-step::after {
  content: ""; position: absolute; right: -10px; top: 36px; width: 16px; height: 2px;
  background: linear-gradient(90deg, var(--primary), transparent); z-index: 1;
}
.deal-step:last-child::after { display: none; }

/* Methods grid */
.methods-grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-3);
}
.method-tile {
  display: flex; flex-direction: column; gap: 12px; min-height: 170px;
  text-decoration: none; color: inherit;
}
.method-tile h3 { margin: 0; font-size: 16px; }
.method-tile p { margin: 0; color: var(--text-muted); font-size: 13.5px; flex: 1; }
.method-tile .tile-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; }

/* Rates modern */
.rates-board {
  display: grid; grid-template-columns: 1.2fr 1fr; gap: var(--space-3);
}
.rate-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 0; border-bottom: 1px solid var(--border); gap: 12px;
}
.rate-row:last-child { border-bottom: 0; }
.rr-val { font-weight: 700; font-variant-numeric: tabular-nums; transition: color .3s; }
.rr-val.is-flash { color: var(--primary); }
.rates-updated { margin-top: var(--space-3); font-size: 12.5px; color: var(--text-muted); }

/* Advantages */
.adv-grid {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-3);
}
.adv-card { min-height: 140px; display: flex; flex-direction: column; gap: 12px; }
.adv-card p { margin: 0; font-size: 14px; color: var(--text-muted); line-height: 1.45; }

/* FAQ */
.faq-list { display: grid; gap: var(--space-2); max-width: 820px; }
.faq-item {
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--bg-card); overflow: hidden;
}
.faq-item summary {
  list-style: none; cursor: pointer; padding: 16px 18px;
  font-weight: 700; display: flex; justify-content: space-between; gap: 12px;
  min-height: 52px; align-items: center;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; color: var(--primary); font-size: 20px; font-weight: 500; }
.faq-item[open] summary::after { content: "−"; }
.faq-item .faq-body { padding: 0 18px 16px; color: var(--text-muted); font-size: 14px; line-height: 1.55; }

/* Reviews */
.reviews-grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-3);
}
.review-card { min-height: 180px; }
.review-stars { color: #f5a623; letter-spacing: 2px; }

/* CTA band */
.cta-band {
  background: linear-gradient(135deg, var(--primary), #9a6df5);
  border-radius: var(--radius-lg); color: #fff; padding: clamp(28px, 5vw, 48px);
  text-align: center; box-shadow: var(--shadow-glow); position: relative; overflow: hidden;
}
.cta-band::before {
  content: ""; position: absolute; inset: -40% auto auto -20%; width: 280px; height: 280px;
  background: radial-gradient(circle, rgba(255,255,255,.18), transparent 70%); pointer-events: none;
}
.cta-band h2 { font-size: clamp(1.3rem, 2.5vw, 1.8rem); margin-bottom: 8px; position: relative; }
.cta-band p { opacity: .92; margin-bottom: 18px; position: relative; }
.cta-band .btn { background: #fff; color: var(--primary); position: relative; }
.cta-band .btn:hover { background: #f4f6ff; color: var(--primary-hover); }

/* Hero redesign */
.hero-modern {
  padding: clamp(48px, 9vw, 104px) 0 clamp(32px, 5vw, 56px);
  display: block; max-width: 780px; margin: 0 auto; text-align: center;
}
.hero-modern .hero-actions,
.hero-modern .hero-trust { justify-content: center; }
.hero-modern .hero-lead { margin-left: auto; margin-right: auto; }
.hero-modern h1 {
  font-size: clamp(1.8rem, 4vw, 2.75rem); line-height: 1.12; font-weight: 800;
  letter-spacing: -.03em; margin-bottom: 14px;
}
.hero-modern .hero-lead {
  font-size: 16.5px; color: var(--text-muted); margin-bottom: 22px; max-width: 520px;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 18px; }
.hero-trust {
  display: flex; flex-wrap: wrap; gap: 10px 16px; font-size: 13px; color: var(--text-muted);
}
.hero-trust span { display: inline-flex; align-items: center; gap: 6px; }
.hero-visual {
  position: relative; border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: var(--shadow-lg); border: 1px solid var(--border);
  background: var(--bg-card); aspect-ratio: 4/3;
}
.hero-visual img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero-glow {
  position: absolute; inset: auto -20% -30% auto; width: 60%; height: 60%;
  background: radial-gradient(circle, rgba(79,109,245,.35), transparent 70%);
  pointer-events: none;
}

/* Cabinet redesign */
.dash-shell { padding-bottom: var(--space-7); }
.portfolio-hero {
  display: grid; grid-template-columns: 1.4fr 1fr; gap: var(--space-4);
  padding: var(--space-5); border-radius: var(--radius-lg);
  background: linear-gradient(145deg, color-mix(in srgb, var(--primary) 12%, var(--bg-card)), var(--bg-card));
  border: 1px solid var(--border); box-shadow: var(--shadow);
  margin-bottom: var(--space-5);
}
.portfolio-hero .acc-label { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); font-weight: 700; }
.portfolio-hero .acc-number { font-size: clamp(1.3rem, 2.5vw, 1.7rem); font-weight: 800; letter-spacing: .02em; margin: 6px 0 8px; font-variant-numeric: tabular-nums; }
.portfolio-total { font-size: clamp(1.6rem, 3vw, 2.1rem); font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.portfolio-total small { display: block; font-size: 13px; font-weight: 500; color: var(--text-muted); margin-top: 4px; }
.quick-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.dash-grid {
  display: grid; grid-template-columns: 1.6fr 1fr; gap: var(--space-4); align-items: start;
}
.balances-grid {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-3); margin-top: 12px;
}
.balance-card {
  padding: 14px; border-radius: var(--radius); background: var(--bg-card);
  border: 1px solid var(--border); transition: transform var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
}
.balance-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.balance-card .cur { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 13px; margin-bottom: 8px; }
.balance-card .val { font-size: 18px; font-weight: 800; font-variant-numeric: tabular-nums; }
.balance-card .val-usd { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.cur-ico {
  width: 28px; height: 28px; border-radius: 8px; background: var(--primary-soft);
  color: var(--primary); display: inline-flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 800;
}

/* Status stage bar */
.stage-bar {
  display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 4px;
}
.stage-dot {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 28px; padding: 4px 10px; border-radius: 999px;
  font-size: 11px; font-weight: 700; background: var(--bg-muted); color: var(--text-muted);
  border: 1px solid transparent; transition: var(--transition);
}
.stage-dot.is-done { background: var(--success-soft); color: var(--success); }
.stage-dot.is-active {
  background: var(--primary-soft); color: var(--primary); border-color: color-mix(in srgb, var(--primary) 35%, transparent);
  animation: stage-pulse 1.8s ease-in-out infinite;
}
.stage-dot.is-fail { background: var(--danger-soft); color: var(--danger); }
.request-card + .request-card { margin-top: 10px; }
.request-card { padding: 14px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-muted); }
.request-card .req-top { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.request-card .req-title { font-weight: 700; font-size: 14px; }
.request-card .req-meta { font-size: 12px; color: var(--text-muted); }

/* Auth */
.auth-page { position: relative; min-height: calc(100vh - 120px); }
.auth-page .bg-orbs { position: absolute; }
.auth-wrap {
  position: relative; z-index: 1;
  display: flex; align-items: center; justify-content: center;
  padding: clamp(24px, 5vw, 48px) 16px;
}
.auth-card {
  width: 100%; max-width: 440px; padding: clamp(22px, 4vw, 32px);
  border-radius: var(--radius-lg); background: var(--bg-card);
  border: 1px solid var(--border); box-shadow: var(--shadow-lg);
}
.auth-card h1 { font-size: 1.45rem; margin-bottom: 8px; text-align: center; }
.auth-card .auth-lead { text-align: center; color: var(--text-muted); font-size: 14px; margin-bottom: 18px; }
.auth-foot { text-align: center; margin-top: 16px; font-size: 14px; color: var(--text-muted); }
.auth-card.auth-wide { max-width: 560px; }

/* Header polish */
.main-nav a {
  position: relative; padding: 6px 2px;
}
.main-nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px;
  background: var(--primary); border-radius: 2px; transform: scaleX(0);
  transition: transform var(--dur-fast) var(--ease);
}
.main-nav a:hover::after, .main-nav a.is-active::after { transform: scaleX(1); }
.main-nav a.is-active { color: var(--primary); font-weight: 700; }
.icon-btn .ico { width: 18px; height: 18px; }
.site-footer {
  padding: 22px 0; margin-top: auto; border-top: 1px solid var(--border);
  color: var(--text-muted); font-size: 13px;
}
.site-footer .container {
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
}

/* Empty / loading */
.empty-state {
  padding: 28px 16px; text-align: center; color: var(--text-muted); font-size: 14px;
}
.tx-list { display: grid; gap: 6px; }
.tx-row {
  display: grid; grid-template-columns: 40px 1fr auto; gap: 10px; align-items: center;
  padding: 10px; border-radius: var(--radius-sm); transition: background var(--transition);
}
.tx-row:hover { background: var(--bg-muted); }
.tx-ico {
  width: 36px; height: 36px; border-radius: 10px; display: inline-flex;
  align-items: center; justify-content: center; background: var(--bg-muted); color: var(--text);
}
.tx-ico.in { background: var(--success-soft); color: var(--success); }
.tx-ico.out { background: var(--danger-soft); color: var(--danger); }
.tx-ico.dep { background: var(--primary-soft); color: var(--primary); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important; animation-iteration-count: 1 !important;
    transition-duration: .01ms !important; scroll-behavior: auto !important;
  }
  [data-reveal], [data-reveal-stagger] > * { opacity: 1 !important; transform: none !important; }
  .bg-orbs .orb, .pm-orb, .verify-orb { animation: none !important; }
  .stage-dot.is-active { animation: none !important; }
  .skeleton { animation: none !important; }
}

@media (max-width: 1100px) {
  .deal-steps { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .deal-step::after { display: none; }
  .adv-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 960px) {
  .hero-modern, .portfolio-hero, .dash-grid, .rates-board, .methods-grid, .reviews-grid {
    grid-template-columns: 1fr;
  }
  .balances-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .deal-steps { grid-template-columns: 1fr 1fr; }
  .quick-actions .btn, .hero-actions .btn { width: 100%; }
}
@media (max-width: 560px) {
  .deal-steps, .adv-grid, .methods-grid, .reviews-grid { grid-template-columns: 1fr; }
  .balances-grid { grid-template-columns: 1fr 1fr; }
  .segmented { width: 100%; }
  .segmented .seg { flex: 1; justify-content: center; }
  .auth-card { padding: 20px 16px; }
  .site-footer .container { flex-direction: column; }
}
@media (max-width: 430px) {
  .container { padding: 0 14px; }
  .portfolio-hero, .card { padding: 16px; }
  .balance-card .val { font-size: 16px; }
}
@media (max-width: 360px) {
  .container { padding: 0 12px; }
  .balances-grid { grid-template-columns: 1fr; }
  .hero-modern h1 { font-size: 1.55rem; }
}
@media (max-width: 320px) {
  .btn, .chip, .seg, .tab { min-height: 44px; }
  .page-title { font-size: 1.25rem; }
}


