/* Flux Swap — light theme: white pages, black type, one blue accent, flat surfaces. */
:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-2: #f5f7fa;      /* inputs, muted panels, alternate section bands */
  --surface-3: #eceff3;      /* hovers, chips */
  --border: #e3e6eb;
  --border-strong: #cfd4dc;
  --text: #0a0b0d;
  --text-2: #32353d;
  --muted: #5b616e;
  --accent: #1f6bff;         /* brand blue */
  --accent-hover: #1857d6;
  --accent-2: #1f6bff;       /* blue used in text */
  --accent-soft: rgba(31, 107, 255, .08);
  --green: #098551;
  --red: #cf202f;
  --dark: #0a0b0d;           /* the one dark band (CTA) */
  --radius: 16px;
  --shadow: 0 1px 2px rgba(10, 11, 13, .04), 0 8px 24px rgba(10, 11, 13, .06);
  --shadow-lg: 0 2px 4px rgba(10, 11, 13, .04), 0 16px 48px rgba(10, 11, 13, .1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
/* Lenis smooth scrolling */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }
body {
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input { font: inherit; color: inherit; background: none; border: 0; outline: none; }
[hidden] { display: none !important; }

.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.container.narrow { max-width: 860px; }

.bg-wrap { display: none; }

/* NAV */
.nav { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, .92); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid transparent; transition: border-color .2s ease; }
.nav.scrolled { border-bottom-color: var(--border); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; gap: 24px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 19px; letter-spacing: -.4px; }
.logo-mark { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; color: #fff; background: var(--accent); }
.logo-mark svg { width: 20px; height: 20px; }
.nav-links { display: flex; gap: 4px; font-size: 15px; font-weight: 500; color: var(--text-2); }
.nav-links a { display: flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 999px; transition: background-color .15s ease, color .15s ease; }
.nav-links a:hover { background: var(--surface-2); color: var(--text); }
.nav-links a.active { color: var(--text); font-weight: 600; }
.btn-nav { padding: 10px 18px; font-size: 14px; }
.logo, .nav-links a, .btn { white-space: nowrap; }
.nav-actions { display: flex; align-items: center; gap: 10px; }
.burger { display: none; width: 40px; height: 40px; flex-direction: column; justify-content: center; gap: 5px; padding: 10px; }
.burger span { display: block; height: 2px; background: var(--text); border-radius: 2px; }

/* BUTTONS — pill shaped, flat */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 14px 26px; border-radius: 999px; font-weight: 600; font-size: 15px; transition: background-color .15s ease, border-color .15s ease, color .15s ease; }
.btn-sm { padding: 8px 16px; font-size: 13px; }
.btn-primary { color: #fff; background: var(--accent); }
.btn-primary:hover:not(:disabled) { background: var(--accent-hover); }
.btn-primary:disabled { background: var(--surface-3); color: #8a8f98; cursor: not-allowed; }
.btn-ghost { background: var(--surface-3); color: var(--text); }
.btn-ghost:hover { background: #e1e5ea; }
.btn-block { width: 100%; font-size: 16px; padding: 16px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
button:focus:not(:focus-visible), a:focus:not(:focus-visible) { outline: none; }

/* HERO */
.hero { padding: 72px 0 96px; }
.hero-grid { display: grid; grid-template-columns: 1fr 460px; gap: 72px; align-items: center; }
/* Marketing copy can't be highlighted or copied with the mouse (it is still in the page source). */
.hero-copy { user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.hero-title { font-size: clamp(44px, 5.6vw, 72px); font-weight: 700; line-height: 1.02; letter-spacing: -2.8px; color: var(--text); }
.hl { color: var(--accent); }
.hl svg { display: none; }
.hero-sub { max-width: 480px; margin-top: 24px; color: var(--muted); font-size: 19px; line-height: 1.55; }
.hero-points { list-style: none; display: flex; flex-direction: column; gap: 12px; margin-top: 32px; }
.hero-points li { display: flex; align-items: center; gap: 12px; font-size: 16px; font-weight: 500; color: var(--text-2); }
.hero-points svg { flex-shrink: 0; width: 22px; height: 22px; padding: 4px; border-radius: 50%; color: var(--accent); background: var(--accent-soft); }

/* Entrance: one quiet fade for the hero, nothing per-word */
.hero-copy, .swap-card { animation: rise .6s var(--ease-out) both; }
.swap-card { animation-delay: .08s; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes draw { to { stroke-dashoffset: 0; } }

/* `html` prefix outranks component transitions so the reveal always animates. */
html [data-reveal] { opacity: 0; transform: translateY(12px); transition: opacity .6s ease, transform .6s var(--ease-out); }
html [data-reveal].in { opacity: 1; transform: none; }

/* LOADING SHIMMER */
.skeleton { display: none; border-radius: 8px; background: linear-gradient(90deg, #eceff3 25%, #f6f8fa 50%, #eceff3 75%); background-size: 200% 100%; animation: shimmer 1.2s linear infinite; }
.skeleton-amount { width: 160px; height: 32px; margin: 4px 0 2px; }
.loading .skeleton { display: block; }
.loading #getAmount, .loading #getUsd { display: none; }
.rate-line.loading { color: transparent; background: linear-gradient(90deg, #eceff3 25%, #f6f8fa 50%, #eceff3 75%); background-size: 200% 100%; animation: shimmer 1.2s linear infinite; border-radius: 6px; width: 180px; padding: 0; height: 14px; margin: 6px 4px 14px; }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* SWAP CARD */
.swap-card { position: relative; width: 100%; max-width: 460px; margin: 0 auto; background: var(--surface); border: 1px solid var(--border); border-radius: 24px; text-align: left; overflow: hidden; box-shadow: var(--shadow-lg); }
.swap-tabs { display: grid; grid-template-columns: 1fr 1fr; border-bottom: 1px solid var(--border); }
.swap-tab { padding: 16px; font-weight: 600; font-size: 15px; color: var(--muted); position: relative; transition: color .15s ease; }
.swap-tab:hover, .swap-tab.active { color: var(--text); }
.swap-tab.active::after { content: ""; position: absolute; left: 24px; right: 24px; bottom: -1px; height: 2px; background: var(--accent); }
.swap-body { padding: 18px 18px 20px; display: flex; flex-direction: column; gap: 8px; }

.rate-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.toggle { display: inline-flex; background: var(--surface-2); padding: 3px; border-radius: 999px; }
.toggle button { display: flex; align-items: center; gap: 6px; padding: 6px 14px; border-radius: 999px; font-size: 13px; font-weight: 500; color: var(--muted); transition: color .15s ease, background-color .15s ease; }
.toggle button.active { background: #fff; color: var(--text); box-shadow: 0 1px 3px rgba(10, 11, 13, .12); }
.info-btn { width: 26px; height: 26px; border-radius: 50%; background: var(--surface-2); color: var(--muted); font-size: 13px; font-weight: 600; }
.info-btn:hover { background: var(--surface-3); color: var(--text); }
.info-pop { background: var(--surface-2); border-radius: 12px; padding: 12px 14px; font-size: 13px; color: var(--text-2); display: flex; flex-direction: column; gap: 6px; }

/* PRIVATE ROUTE PICKER */
.private-modes { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 8px; }
.pmode { display: flex; flex-direction: column; gap: 4px; text-align: left; padding: 12px 14px; border-radius: 14px; border: 1.5px solid var(--border); transition: border-color .15s ease, background-color .15s ease; }
.pmode:hover { border-color: var(--border-strong); }
.pmode.active { background: var(--accent-soft); border-color: var(--accent); }
.pm-top { display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.pm-top b { font-size: 15px; }
.pm-plus { color: var(--accent); }
.pm-time { display: flex; align-items: center; gap: 4px; font-size: 12px; color: var(--muted); }
.pmode small { font-size: 12px; color: var(--muted); }
.pmode strong { font-size: 15px; font-weight: 700; }

.rate-wrap { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.how-link { font-size: 12px; font-weight: 600; color: var(--accent); white-space: nowrap; padding-bottom: 6px; }
.how-link:hover { text-decoration: underline; }

.field { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--surface-2); border: 1px solid transparent; border-radius: 16px; padding: 14px 16px; transition: border-color .15s ease, background-color .15s ease; }
.field:focus-within { background: #fff; border-color: var(--border-strong); }
.field-left { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.field label { font-size: 13px; color: var(--muted); font-weight: 500; }
.field input { font-size: 30px; font-weight: 600; letter-spacing: -.8px; width: 100%; padding: 2px 0; font-variant-numeric: tabular-nums; }
.usd { font-size: 12px; color: var(--muted); }

.coin-btn { display: flex; align-items: center; gap: 10px; background: #fff; border: 1px solid var(--border); padding: 6px 10px 6px 6px; border-radius: 999px; flex-shrink: 0; box-shadow: 0 1px 2px rgba(10, 11, 13, .05); transition: border-color .15s ease; }
.coin-btn:hover { border-color: var(--border-strong); }
.coin-btn .coin-meta { display: flex; flex-direction: column; line-height: 1.15; text-align: left; }
.coin-btn .ticker { font-weight: 600; font-size: 15px; }
.coin-btn .net { font-size: 11px; color: var(--muted); }
.coin-btn .chev { margin-left: 4px; color: var(--muted); }

.coin-icon { position: relative; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 13px; color: #fff; flex-shrink: 0; }
/* Round the image itself (anti-aliased) rather than clipping with the parent's overflow,
   which leaves jagged corners. Hide the fallback colour so it can't bleed at the rim. */
.coin-icon img { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.coin-icon:has(img) { background: transparent !important; color: transparent; }
.coin-icon.sm { width: 22px; height: 22px; font-size: 10px; }

.flip-btn { align-self: center; width: 34px; height: 34px; margin: -19px 0; z-index: 2; border-radius: 50%; background: #fff; color: var(--text); display: grid; place-items: center; border: 1px solid var(--border); box-shadow: 0 0 0 4px #fff; transition: border-color .15s ease, color .15s ease; }
.flip-btn:hover { color: var(--accent); border-color: var(--accent); }
.flip-btn svg { width: 16px; height: 16px; transition: transform .45s cubic-bezier(.4, 1.4, .5, 1); }

.rate-line { font-size: 13px; font-weight: 500; color: var(--text-2); padding: 4px 4px 10px; }

.addr-field { display: flex; align-items: center; gap: 8px; background: var(--surface-2); border-radius: 16px; padding: 4px 8px 4px 16px; border: 1px solid transparent; transition: border-color .15s ease, background-color .15s ease; }
.addr-field:focus-within { background: #fff; border-color: var(--accent); }
.addr-field input { flex: 1; padding: 14px 0; font-size: 15px; min-width: 0; }
.addr-field input::placeholder { color: #8a8f98; }
.icon-btn { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; color: var(--muted); transition: background-color .15s ease, color .15s ease; }
.icon-btn:hover { background: var(--surface-3); color: var(--text); }

.add-refund { align-self: flex-start; display: flex; gap: 8px; font-size: 13px; font-weight: 500; color: var(--accent); padding: 6px 4px 10px; }
.add-refund span { font-size: 16px; line-height: 1; }
.terms { font-size: 12px; color: var(--muted); text-align: center; margin-top: 4px; }
.terms a { color: var(--text-2); text-decoration: underline; text-underline-offset: 2px; }

/* Address validation states */
.addr-field.ok { border-color: rgba(9, 133, 81, .5); }
.addr-field.bad { border-color: var(--red); }
.addr-ok { display: none; color: var(--green); }
.addr-field.ok .addr-ok { display: grid; }
.field-msg { font-size: 12.5px; color: var(--red); padding: 0 6px; }
.field-msg:empty { display: none; }
.usd.err { color: var(--red); font-weight: 500; }

.up { color: var(--green); }
.down { color: var(--red); }

/* Dot on the rate line: green = live market data, grey = waiting / stale */
.live-dot { display: inline-block; width: 7px; height: 7px; margin-right: 7px; border-radius: 50%; background: var(--green); vertical-align: 1px; }
.live-dot.stale { background: #b5bac2; }
.rate-line.loading .live-dot { visibility: hidden; }

/* Network badge on token icons (e.g. USDT on Solana) */
.coin-ico { position: relative; display: inline-grid; flex-shrink: 0; }
.net-badge { position: absolute; right: -3px; bottom: -3px; width: 44%; height: 44%; border-radius: 50%; overflow: hidden; background: #fff; box-shadow: 0 0 0 2px #fff; }
.net-badge img { width: 100%; height: 100%; display: block; border-radius: 50%; object-fit: cover; }

/* LIVE PRICE TICKER (no longer on the page; kept harmless if re-added) */
.price-ticker { display: none; }
@keyframes scroll { to { transform: translateX(-50%); } }

/* SECTIONS — left-aligned headings, alternating white / grey bands */
.section { padding: 96px 0; }
.section-alt { background: var(--surface-2); }
.section-head { margin-bottom: 48px; max-width: 640px; }
.section-title { font-size: clamp(32px, 3.6vw, 48px); font-weight: 700; margin-bottom: 40px; letter-spacing: -1.6px; line-height: 1.08; }
.section-head .section-title { margin-bottom: 14px; }
.section-sub { color: var(--muted); font-size: 18px; line-height: 1.55; }

/* FEATURE GRID */
.bento { display: grid; grid-template-columns: 1.9fr 1fr 1fr; grid-template-rows: auto auto; gap: 20px; }
.bento-card { position: relative; overflow: hidden; background: var(--surface-2); border-radius: 24px; padding: 32px; display: flex; flex-direction: column; justify-content: flex-end; min-height: 280px; }
.bento-card h3 { font-size: 24px; font-weight: 700; letter-spacing: -.6px; line-height: 1.2; margin-bottom: 8px; }
.bento-card p { color: var(--muted); font-size: 16px; line-height: 1.55; max-width: 420px; }
.bento-routing { grid-row: span 2; justify-content: space-between; gap: 32px; }
.bento-routing h3 { font-size: 32px; letter-spacing: -1px; }
.bento-support { grid-column: 2 / span 2; }
.bento-icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; color: var(--accent); background: #fff; margin-bottom: auto; box-shadow: var(--shadow); }
.bento-icon svg { width: 22px; height: 22px; stroke-width: 4; }

.route-stack { display: flex; flex-direction: column; gap: 10px; padding: 0 24px; }
.route-row { background: #fff; border-radius: 14px; padding: 14px 18px; border: 1px solid var(--border); opacity: var(--o, 1); }
.route-row.best { margin: 4px -24px; padding: 18px 20px; border: 1.5px solid var(--accent); box-shadow: var(--shadow-lg); opacity: 1; }
.route-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.route-avatar { width: 26px; height: 26px; border-radius: 50%; background: var(--surface-3); display: grid; place-items: center; color: var(--muted); flex-shrink: 0; }
.best .route-avatar { width: 34px; height: 34px; color: #fff; background: var(--accent); }
.route-name { font-weight: 600; font-size: 14px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.best .route-name { font-size: 16px; color: var(--text); }
.route-badge { white-space: nowrap; flex-shrink: 0; display: inline-flex; align-items: center; gap: 4px; font-size: 10px; font-weight: 700; color: var(--green); background: rgba(9, 133, 81, .1); padding: 3px 8px; border-radius: 999px; letter-spacing: .3px; }
.route-amt { margin-left: auto; font-weight: 600; font-size: 14px; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.best .route-amt { font-size: 20px; color: var(--text); }
.route-amt small { font-size: 11px; font-weight: 500; color: var(--muted); margin-left: 3px; }
.route-bar { height: 6px; border-radius: 6px; background: var(--surface-3); overflow: hidden; }
.route-bar span { display: block; height: 100%; width: var(--w); border-radius: inherit; background: #c4c9d1; transform-origin: left; transform: scaleX(0); transition: transform 1.2s var(--ease-out); }
.best .route-bar span { background: var(--accent); }
.bento-routing.in .route-bar span { transform: scaleX(1); }
.route-row:nth-child(2) .route-bar span { transition-delay: .15s; }
.route-row:nth-child(3) .route-bar span { transition-delay: .3s; }
.route-row:nth-child(4) .route-bar span { transition-delay: .45s; }

.coin-rail { display: flex; flex-direction: column; gap: 10px; margin: -32px -32px auto; padding-top: 26px; padding-bottom: 32px; mask-image: linear-gradient(90deg, transparent, #000 18%, #000 82%, transparent); }
.coin-track { display: flex; gap: 10px; width: max-content; animation: scroll 40s linear infinite; }
.coin-track.reverse { animation-direction: reverse; margin-left: -29px; }
.coin-tile { width: 48px; height: 48px; border-radius: 50%; background: #fff; display: grid; place-items: center; flex-shrink: 0; box-shadow: 0 1px 3px rgba(10, 11, 13, .08); }
.coin-tile .coin-icon { width: 30px; height: 30px; }
/* Decorative coin card: no text selection, no image dragging or long-press menus */
.bento-coins { user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.bento-coins img { -webkit-user-drag: none; pointer-events: none; }

/* Support card arrow: a plain round button, not a decorative corner */
.corner-link { position: absolute; right: 28px; top: 28px; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: var(--accent); transition: background-color .15s ease; }
.corner-link:hover { background: var(--accent-hover); }
.corner-link svg { width: 18px; height: 18px; }

/* HOW IT WORKS */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.step { position: relative; background: #fff; border: 1px solid var(--border); border-radius: 24px; padding: 32px; }
.step-num { position: absolute; top: 34px; right: 32px; font-size: 13px; font-weight: 600; color: var(--muted); }
.step-icon { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: var(--accent); margin-bottom: 24px; }
.step-icon svg { width: 22px; height: 22px; }
.step h3 { font-size: 20px; font-weight: 700; margin-bottom: 8px; letter-spacing: -.4px; }
.step p { color: var(--muted); font-size: 16px; line-height: 1.55; }

/* MARKETS TABLE */
.markets { border: 1px solid var(--border); border-radius: 20px; overflow: hidden; background: #fff; }
.market-row { display: grid; grid-template-columns: minmax(180px, 2fr) 1.2fr 1fr 1.4fr 96px; align-items: center; gap: 16px; padding: 16px 24px; border-top: 1px solid var(--border); font-size: 15px; font-variant-numeric: tabular-nums; transition: background-color .15s ease; }
.market-row:hover { background: var(--surface-2); }
.markets-head { border-top: 0; padding-top: 14px; padding-bottom: 14px; font-size: 13px; font-weight: 500; color: var(--muted); background: #fff; }
.markets-head:hover { background: #fff; }
.mk-asset { display: flex; align-items: center; gap: 12px; min-width: 0; }
.mk-asset .coin-icon { width: 36px; height: 36px; }
.mk-name { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.mk-name b { font-weight: 600; }
.mk-name small { color: var(--muted); font-size: 13px; }
.mk-price { font-weight: 500; }
.mk-change { display: inline-flex; justify-self: start; font-size: 14px; font-weight: 500; }
.mk-nets { display: flex; align-items: center; color: var(--muted); font-size: 13px; }
.mk-nets .net-dot { width: 20px; height: 20px; border-radius: 50%; border: 2px solid #fff; margin-left: -6px; overflow: hidden; background: var(--surface-3); }
.mk-nets .net-dot:first-child { margin-left: 0; }
.mk-nets .net-dot img { width: 100%; height: 100%; display: block; border-radius: 50%; }
.mk-nets span { margin-left: 8px; }
.market-row .btn { justify-self: end; }
.mk-skeleton { height: 14px; border-radius: 6px; background: linear-gradient(90deg, #eceff3 25%, #f6f8fa 50%, #eceff3 75%); background-size: 200% 100%; animation: shimmer 1.2s linear infinite; }
.markets-note { margin-top: 16px; font-size: 13px; color: var(--muted); }

/* FAQ — divided list */
.faq { display: flex; flex-direction: column; border-top: 1px solid var(--border); }
.faq-item { border-bottom: 1px solid var(--border); }
.faq-q { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 24px 0; text-align: left; font-weight: 600; font-size: 18px; letter-spacing: -.3px; }
.faq-q .chev { flex-shrink: 0; color: var(--text); transition: transform .25s var(--ease-out); }
.faq-item.open .chev { transform: rotate(180deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .3s ease; color: var(--muted); font-size: 16px; line-height: 1.65; }
.faq-a p { padding: 0 0 24px; max-width: 680px; }

/* CTA — the one dark band */
.cta { text-align: left; padding: 72px 64px; border-radius: 28px; background: var(--dark); color: #fff; display: grid; grid-template-columns: 1.3fr 1fr; gap: 32px; align-items: center; }
.cta h2 { font-size: clamp(30px, 3.4vw, 44px); font-weight: 700; letter-spacing: -1.4px; line-height: 1.1; margin-bottom: 12px; grid-column: 1; }
.cta p { color: #a5abb5; font-size: 17px; grid-column: 1; max-width: 520px; }
.cta-actions { grid-column: 2; grid-row: 1 / span 2; display: flex; gap: 12px; justify-content: flex-end; flex-wrap: wrap; }
.cta .btn-ghost { background: rgba(255,255,255,.1); color: #fff; }
.cta .btn-ghost:hover { background: rgba(255,255,255,.18); }

/* FOOTER */
.footer { border-top: 1px solid var(--border); padding: 64px 0 32px; }
.footer-inner { display: flex; justify-content: space-between; gap: 48px; flex-wrap: wrap; }
.footer-brand { max-width: 300px; }
.footer-brand p { color: var(--muted); margin-top: 14px; font-size: 14px; line-height: 1.6; }
.footer-cols { display: grid; grid-template-columns: repeat(4, minmax(110px, 1fr)); gap: 40px; }
.footer-cols h4 { font-size: 14px; font-weight: 600; margin-bottom: 16px; }
.footer-cols a { display: block; color: var(--muted); font-size: 14px; margin-bottom: 12px; transition: color .15s ease; }
.footer-cols a:hover { color: var(--text); }
.footer-bottom { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--border); color: var(--muted); font-size: 13px; }
.footer-legal { max-width: 640px; font-size: 12px; line-height: 1.6; color: #8a8f98; }

/* MODAL */
.modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 16px; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(10, 11, 13, .45); }
.modal-box { position: relative; width: 100%; max-width: 420px; max-height: 80vh; display: flex; flex-direction: column; background: #fff; border-radius: 24px; padding: 24px; box-shadow: var(--shadow-lg); animation: pop .2s ease; }
@keyframes pop { from { opacity: 0; transform: scale(.97); } }
.modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.modal-head h3 { font-size: 18px; font-weight: 700; }

/* COIN PICKER SHEET */
.sheet-layer { position: absolute; inset: 0; z-index: 20; overflow: hidden; border-radius: inherit; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(10, 11, 13, .3); opacity: 0; transition: opacity .35s ease; }
.sheet { position: absolute; left: 0; right: 0; bottom: 0; top: 70px; display: flex; flex-direction: column; background: #fff; border-radius: 24px 24px 0 0; box-shadow: 0 -12px 32px rgba(10, 11, 13, .12); transform: translateY(102%); transition: transform .45s var(--ease-out); will-change: transform; }
.sheet-layer.open .sheet-backdrop { opacity: 1; }
.sheet-layer.open .sheet { transform: translateY(0); }
.sheet-grab { display: flex; justify-content: center; padding: 10px 0 8px; cursor: grab; touch-action: none; }
.sheet-grab:active { cursor: grabbing; }
.sheet-grab span { width: 36px; height: 4px; border-radius: 4px; background: #d3d7de; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 4px 16px 14px 22px; }
.sheet-head h3 { font-size: 19px; font-weight: 700; letter-spacing: -.3px; }
.sheet-search { display: flex; align-items: center; gap: 10px; margin: 0 16px 10px; padding: 0 16px; height: 48px; background: var(--surface-2); border-radius: 999px; color: var(--muted); border: 1px solid transparent; transition: border-color .15s ease, background-color .15s ease; cursor: text; }
.sheet-search:focus-within { border-color: var(--accent); background: #fff; }
.sheet-search input { flex: 1; height: 100%; font-size: 15px; color: var(--text); min-width: 0; }
.sheet-search input:focus-visible { outline: none; } /* the container border shows focus */
.sheet-search input::placeholder { color: #8a8f98; }

.coin-list { flex: 1; overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column; padding: 2px 8px 14px; scrollbar-width: thin; scrollbar-color: #d3d7de transparent; }
.coin-list::-webkit-scrollbar { width: 6px; }
.coin-list::-webkit-scrollbar-thumb { background: #d3d7de; border-radius: 6px; }
.coin-row { display: flex; align-items: center; gap: 14px; padding: 10px 14px; border-radius: 14px; text-align: left; width: 100%; transition: background-color .15s ease; }
.coin-row:hover, .coin-row.kbd { background: var(--surface-2); }
.coin-row.selected { background: var(--accent-soft); }
.coin-row .coin-icon { width: 40px; height: 40px; }
.coin-row .info { flex: 1; display: flex; flex-direction: column; line-height: 1.25; }
.coin-row .info b { font-size: 15px; font-weight: 600; }
.coin-row .info small { color: var(--muted); font-size: 13px; }
.coin-row .check { color: var(--accent); flex-shrink: 0; margin-right: 4px; }
.coin-row .price { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.25; font-variant-numeric: tabular-nums; }
.coin-row .price b { font-size: 14px; font-weight: 600; }
.coin-row .price small { font-size: 12px; }
.coin-empty { color: var(--muted); padding: 24px 12px; text-align: center; font-size: 14px; }

/* ORDER SCREEN — full page, gray canvas with white cards */
.order-page { position: fixed; inset: 0; z-index: 100; overflow-y: auto; overscroll-behavior: contain; background: #f6f7f9; }
.order-topbar { position: sticky; top: 0; z-index: 3; background: rgba(255, 255, 255, .92); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--border); }
.order-topbar-inner { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; height: 64px; }
.order-topbar .logo { justify-self: center; }
.order-topbar .icon-btn { justify-self: end; }
.order-back { justify-self: start; display: inline-flex; align-items: center; gap: 4px; padding: 8px 14px 8px 8px; border-radius: 999px; font-size: 15px; font-weight: 600; transition: background-color .15s ease; }
.order-back:hover { background: var(--surface-2); }
.order-main { max-width: 1120px; margin: 0 auto; padding: 24px 24px 40px; display: flex; flex-direction: column; gap: 16px; }
#orderBody { display: flex; flex-direction: column; gap: 16px; }

.order-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.order-title { display: flex; align-items: center; gap: 14px; min-width: 0; }
.pair-icons { display: flex; flex-shrink: 0; }
.pair-icons .coin-icon { width: 40px; height: 40px; box-shadow: 0 0 0 3px #f6f7f9; }
.pair-icons .coin-icon + .coin-icon { margin-left: -12px; }
.order-title-text { display: flex; flex-direction: column; gap: 2px; line-height: 1.2; min-width: 0; }
.order-title-text h3 { font-size: 24px; font-weight: 700; letter-spacing: -.7px; }
.order-title-text small { font-size: 14px; color: var(--muted); }
.order-status { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; font-size: 14px; font-weight: 600; color: var(--accent); background: #fff; border: 1px solid var(--border); white-space: nowrap; }
.order-status .pulse-dot { background: var(--accent); box-shadow: 0 0 0 0 rgba(31, 107, 255, .5); animation-name: pulse-blue; }
@keyframes pulse-blue { to { box-shadow: 0 0 0 7px rgba(31, 107, 255, 0); } }
.order-status.done { color: var(--green); }
.order-status.expired { color: var(--red); }
.pulse-dot { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 0 rgba(34, 197, 94, .5); animation: pulse-dot 1.6s ease-out infinite; }
@keyframes pulse-dot { to { box-shadow: 0 0 0 8px rgba(34, 197, 94, 0); } }

/* Layout: main card + sidebar */
.order-grid { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 16px; align-items: stretch; }
.o-card { background: #fff; border: 1px solid var(--border); border-radius: 24px; padding: 24px 28px; }
.o-main { display: flex; flex-direction: column; gap: 20px; }
.o-solo { max-width: 520px; width: 100%; margin: 0 auto; display: flex; flex-direction: column; gap: 20px; }
.o-side { display: flex; flex-direction: column; gap: 16px; }
.o-side .o-card { flex: 1; padding: 20px 22px; }
.o-card-title { font-size: 16px; font-weight: 700; margin-bottom: 14px; }
.demo-banner { font-size: 13px; font-weight: 500; color: #8a5a00; background: #fff6e0; border: 1px solid #f5dfa6; border-radius: 12px; padding: 10px 14px; text-align: center; }

/* Deposit card */
.dep-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.dep-top h2 { font-size: 22px; font-weight: 700; letter-spacing: -.4px; }
.dep-top p { font-size: 14px; color: var(--muted); margin-top: 2px; }
.timer-pill { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px; background: var(--surface-2); font-size: 13px; color: var(--muted); white-space: nowrap; }
.timer-pill svg { color: var(--accent); }
.timer-pill b { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }

.dep-amount { display: flex; flex-direction: column; gap: 2px; }
.pay-label { font-size: 13px; font-weight: 500; color: var(--muted); }
.pay-amount { display: inline-flex; align-items: baseline; gap: 10px; align-self: flex-start; margin-left: -8px; padding: 0 8px; border-radius: 12px; transition: background-color .15s ease; }
.pay-amount:hover { background: var(--surface-2); }
.pay-amount b { font-size: 34px; font-weight: 700; letter-spacing: -1.4px; font-variant-numeric: tabular-nums; line-height: 1.2; }
.pay-amount > span { font-size: 20px; font-weight: 600; color: var(--muted); }
.pay-amount i { align-self: center; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; color: var(--muted); transition: color .15s ease; }
.pay-amount:hover i { color: var(--accent); }
.pay-amount.copied i { color: var(--green); }
.pay-usd { font-size: 15px; color: var(--muted); font-variant-numeric: tabular-nums; }

.dep-body { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 28px; align-items: center; }
.pay-qr { position: relative; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; padding: 12px; border-radius: 20px; background: #fff; border: 1px solid var(--border); }
.qr { width: 200px; height: 200px; }
.qr img, .qr canvas { display: block; width: 200px !important; height: 200px !important; pointer-events: none; -webkit-user-drag: none; }
.qr-logo img { pointer-events: none; -webkit-user-drag: none; }
.qr-logo { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); padding: 5px; border-radius: 50%; background: #fff; line-height: 0; }
.qr-logo .coin-icon { width: 36px; height: 36px; }

.dep-fields { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.dep-field { display: flex; flex-direction: column; gap: 6px; }
.pay-k { font-size: 13px; font-weight: 500; color: var(--muted); }
.dep-field-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 50px; padding: 6px 7px 6px 14px; border: 1px solid var(--border); border-radius: 14px; }
.dep-field-row code { font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; font-size: 14px; font-weight: 500; line-height: 1.45; word-break: break-all; color: var(--text); }
.round-copy { flex-shrink: 0; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; color: var(--accent); background: var(--accent-soft); transition: background-color .15s ease, color .15s ease; }
.round-copy:hover { background: rgba(31, 107, 255, .14); }
.round-copy.copied { color: var(--green); background: rgba(9, 133, 81, .12); }
.net-val { display: inline-flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 600; }
.net-val img { width: 22px; height: 22px; border-radius: 50%; }
.net-tag { font-size: 12px; font-weight: 600; color: var(--muted); background: var(--surface-2); padding: 3px 8px; border-radius: 6px; margin-right: 6px; }

.pay-note { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; background: #fff8eb; font-size: 13px; line-height: 1.5; color: #6b4a00; }
.pay-note svg { flex-shrink: 0; margin-top: 1px; color: #b7791f; }
.pay-note b { font-weight: 600; color: #4a3300; }
.dep-foot { display: flex; flex-direction: column; gap: 16px; margin-top: auto; }
.pay-copy { display: flex; align-items: center; justify-content: center; gap: 8px; }
.pay-copy.copied { background: var(--green); }
.copy-btn { cursor: pointer; }

/* Sidebar: summary */
.sum-pair { display: flex; flex-direction: column; padding: 4px 16px; border-radius: 16px; background: var(--surface-2); }
.sum-leg { display: flex; align-items: center; gap: 12px; padding: 10px 0; }
.sum-leg .coin-icon { width: 36px; height: 36px; }
.sum-leg > div { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.sum-leg span { font-size: 12px; color: var(--muted); }
.sum-leg b { font-size: 16px; font-weight: 700; font-variant-numeric: tabular-nums; }
.sum-leg small { font-size: 12px; color: var(--muted); }
.sum-arrow { display: flex; align-items: center; gap: 12px; color: var(--muted); }
.sum-arrow::before, .sum-arrow::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.sum-arrow svg { width: 26px; height: 26px; padding: 5px; border-radius: 50%; background: #fff; border: 1px solid var(--border); }
.sum-rows { display: flex; flex-direction: column; margin-top: 8px; }
.sum-rows > div { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; font-size: 14px; }
.sum-rows > div + div { border-top: 1px solid var(--surface-3); }
.sum-rows span:first-child { color: var(--muted); flex-shrink: 0; }
.sum-rows span:last-child { text-align: right; font-weight: 500; min-width: 0; overflow-wrap: anywhere; }
.sum-rows .mono { font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; font-size: 12.5px; }
.sum-rows .free { color: var(--green); }

/* Progress strip: segmented bar with a label under each segment */
.o-card.o-progress { padding: 18px 24px 16px; }
.o-progress-now { display: none; font-size: 13px; color: var(--muted); margin-bottom: 10px; }
.o-progress-now b { color: var(--text); font-weight: 600; }
.o-steps { list-style: none; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.o-steps li { position: relative; display: flex; align-items: flex-start; gap: 10px; padding-top: 16px; min-width: 0; }
.o-steps li::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 4px; border-radius: 4px; background: var(--surface-3); transition: background-color .4s ease; }
.o-steps i { flex-shrink: 0; width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--border-strong); background: #fff; }
.o-steps div { display: flex; flex-direction: column; gap: 1px; min-width: 0; line-height: 1.3; }
.o-steps b { font-size: 14px; font-weight: 600; color: var(--muted); }
.o-steps span { font-size: 12px; color: #8a8f98; }
.o-steps li.done::before { background: var(--accent); }
.o-steps li.done i { border: 0; background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7.5' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 12px no-repeat; }
.o-steps li.active::before { background: linear-gradient(var(--accent), var(--accent)) left / 50% 100% no-repeat, var(--surface-3); }
.o-steps li.active i { border: 6px solid var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.o-steps li.failed::before { background: var(--red); }
.o-steps li.failed i { border: 6px solid var(--red); box-shadow: 0 0 0 4px rgba(207, 32, 47, .1); }
.o-steps li.done b, .o-steps li.active b { color: var(--text); }
.o-steps li.failed b { color: var(--red); }
.o-steps li.active span, .o-steps li.failed span { color: var(--muted); }

/* Sidebar: help link */
.o-help { display: flex; align-items: center; gap: 14px; padding: 16px 20px; border-radius: 20px; background: #fff; border: 1px solid var(--border); transition: border-color .15s ease; }
.o-help:hover { border-color: var(--border-strong); }
.o-help-icon { flex-shrink: 0; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; color: var(--accent); background: var(--accent-soft); }
.o-help > span:nth-child(2) { flex: 1; display: flex; flex-direction: column; line-height: 1.35; }
.o-help b { font-size: 14px; font-weight: 600; }
.o-help small { font-size: 13px; color: var(--muted); }
.o-help > svg { color: var(--muted); flex-shrink: 0; }

/* Processing / complete / expired */
.order-state { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 32px 8px 8px; animation: rise .4s ease; }
.order-state h4 { font-size: 24px; font-weight: 700; letter-spacing: -.4px; }
.order-state p { color: var(--muted); font-size: 15px; max-width: 380px; }
.state-icon { width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); margin-bottom: 8px; }
.state-icon.ok { background: rgba(9, 133, 81, .1); color: var(--green); }
.state-icon.warn { background: rgba(207, 32, 47, .08); color: var(--red); }
.state-icon .draw { stroke-dasharray: 24; stroke-dashoffset: 24; animation: draw .6s .2s ease forwards; }
.spinner { width: 30px; height: 30px; border-radius: 50%; border: 3px solid rgba(31, 107, 255, .2); border-top-color: var(--accent); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.o-main > .btn { margin-top: 4px; }

/* ORDER LOADER — plays between pressing Exchange and the order page */
.order-loader { position: fixed; inset: 0; z-index: 120; display: grid; place-items: center; padding: 16px; background: #f6f7f9; overflow: hidden; animation: ol-in .25s ease both; }
.order-loader::before { content: ""; position: absolute; width: 720px; height: 720px; border-radius: 50%; background: radial-gradient(circle, rgba(31, 107, 255, .16), rgba(31, 107, 255, 0) 62%); animation: ol-glow 2.4s ease-in-out infinite; }
.order-loader.leaving { animation: ol-out .45s var(--ease-out) forwards; }
.order-loader.leaving .ol-stage { animation: ol-stage-out .45s var(--ease-out) forwards; }
@keyframes ol-in { from { opacity: 0; } }
@keyframes ol-out { to { opacity: 0; visibility: hidden; } }
@keyframes ol-stage-out { to { opacity: 0; transform: translateY(-12px) scale(.97); } }
@keyframes ol-glow { 50% { transform: scale(1.12); opacity: .7; } }

.ol-stage { position: relative; width: min(420px, 100%); padding: 36px 32px 0; border-radius: 28px; background: #fff; border: 1px solid var(--border); box-shadow: var(--shadow-lg); text-align: center; overflow: hidden; animation: ol-pop .5s var(--ease-out) both; }
@keyframes ol-pop { from { opacity: 0; transform: translateY(20px) scale(.96); } }
.ol-stage h3 { font-size: 21px; font-weight: 700; letter-spacing: -.4px; }
.ol-stage p { margin-top: 4px; font-size: 14px; color: var(--muted); font-variant-numeric: tabular-nums; }

.ol-coins { display: flex; align-items: center; justify-content: center; margin-bottom: 24px; }
.ol-coin { position: relative; display: grid; animation: ol-bob 1.6s ease-in-out infinite; }
.ol-coin.to { animation-delay: .8s; }
.ol-coin .coin-icon { width: 56px; height: 56px; font-size: 20px; }
.ol-coin::after { content: ""; position: absolute; inset: -6px; border-radius: 50%; border: 2px solid var(--accent); opacity: 0; animation: ol-ring 1.6s ease-out infinite; }
.ol-coin.to::after { animation-delay: .8s; }
@keyframes ol-bob { 50% { transform: translateY(-4px); } }
@keyframes ol-ring { 0% { opacity: .5; transform: scale(.9); } 100% { opacity: 0; transform: scale(1.35); } }
.ol-flow { position: relative; width: 104px; height: 56px; }
.ol-flow::before { content: ""; position: absolute; left: 10px; right: 10px; top: 50%; border-top: 2px dashed var(--border-strong); }
.ol-flow span { position: absolute; top: 50%; left: 4px; width: 8px; height: 8px; margin-top: -4px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px rgba(31, 107, 255, .6); opacity: 0; animation: ol-dot 1.2s cubic-bezier(.45, 0, .55, 1) infinite; }
.ol-flow span:nth-child(2) { animation-delay: .3s; }
.ol-flow span:nth-child(3) { animation-delay: .6s; }
.ol-flow span:nth-child(4) { animation-delay: .9s; }
@keyframes ol-dot { 0% { transform: translateX(0) scale(.6); opacity: 0; } 20%, 80% { opacity: 1; transform: translateX(46px) scale(1); } 100% { transform: translateX(88px) scale(.6); opacity: 0; } }

.ol-steps { list-style: none; display: flex; flex-direction: column; gap: 4px; margin: 24px 0 28px; text-align: left; }
.ol-steps li { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 14px; font-size: 14px; font-weight: 500; color: #9aa0aa; transition: color .3s ease, background-color .3s ease; }
.ol-steps i { flex-shrink: 0; width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--border); transition: border-color .3s ease; }
.ol-steps li.active { color: var(--text); background: var(--surface-2); }
.ol-steps li.active i { border-color: var(--accent); border-right-color: transparent; animation: spin .7s linear infinite; }
.ol-steps li.done { color: var(--text); }
.ol-steps li.done i { border: 0; background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7.5' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 13px no-repeat; animation: ol-check .35s var(--ease-out); }
@keyframes ol-check { from { transform: scale(.3); } 60% { transform: scale(1.15); } }
.ol-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: var(--surface-3); }
.ol-bar span { display: block; height: 100%; width: 0; background: var(--accent); animation: ol-fill 2.1s cubic-bezier(.4, 0, .2, 1) forwards; }
@keyframes ol-fill { to { width: 100%; } }

/* Reduced motion: keep the loading screen, drop the looping/entrance motion. */
@media (prefers-reduced-motion: reduce) {
  .order-loader, .order-loader::before, .order-loader.leaving,
  .ol-stage, .ol-coin, .ol-coin::after, .ol-flow span,
  .ol-steps li.active i, .ol-steps li.done i { animation: none !important; }
  .ol-coin, .ol-flow span { opacity: 1; }
  .ol-bar span { width: 100%; animation: none; }
}

#exchangeBtn { transition: background-color .15s ease, transform .12s ease; }
#exchangeBtn:active:not(:disabled) { transform: scale(.98); }

/* RESPONSIVE */
/* Medium screens: routing card goes full width on top, the rest sit two-up below. */
@media (max-width: 1100px) {
  .nav-actions .btn-ghost { display: none; } /* Support in the menu still links to Telegram */
  .nav-links a { padding: 8px 10px; }
  .bento { grid-template-columns: 1fr 1fr; }
  .bento-routing { grid-column: 1 / -1; grid-row: auto; display: grid; grid-template-columns: 1.1fr 1fr; align-items: end; }
  .bento-support { grid-column: 1 / -1; }
}
@media (max-width: 900px) {
  .nav-links { display: none; position: absolute; top: 72px; left: 0; right: 0; flex-direction: column; gap: 0; background: #fff; padding: 8px 16px 16px; border-bottom: 1px solid var(--border); box-shadow: var(--shadow); }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 14px 12px; border-radius: 12px; }
  .burger { display: flex; }
  .hero { padding: 40px 0 64px; }
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-copy { padding-bottom: 0; }
  .section { padding: 72px 0; }
  .steps { grid-template-columns: 1fr; }
  .bento { grid-template-columns: 1fr; }
  .bento-routing { grid-row: auto; grid-column: auto; display: flex; padding: 24px; }
  .bento-routing h3 { font-size: 28px; }
  .bento-support { grid-column: auto; }
  .route-stack { padding: 0 12px; }
  .route-row.best { margin: 4px -12px; }
  .cta { grid-template-columns: 1fr; padding: 48px 28px; }
  .cta-actions { grid-column: 1; grid-row: auto; justify-content: flex-start; }
  .footer-cols { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  .market-row { grid-template-columns: minmax(0, 1.6fr) 1fr 84px; padding: 14px 16px; }
  .mk-nets, .markets-head .hide-sm, .market-row .btn { display: none; }
  .mk-change { justify-self: end; }
  .dep-body { grid-template-columns: 1fr; justify-items: center; gap: 20px; }
  .dep-fields { width: 100%; }
  /* Progress strip: bars only, current step named above */
  .o-progress-now { display: block; }
  .o-steps { gap: 4px; }
  .o-steps li { padding-top: 0; }
  .o-steps li::before { position: static; flex: 1; }
  .o-steps i, .o-steps div { display: none; }
}
/* Short laptop screens: keep the whole order on one screen */
@media (min-width: 961px) and (max-height: 860px) {
  .order-main { padding-top: 16px; padding-bottom: 24px; }
  .o-steps span, .dep-top p { display: none; }
  .o-steps li { align-items: center; }
  .dep-foot { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px; }
  .dep-foot .pay-copy { width: auto; padding: 14px 24px; }
  .pay-note { padding: 10px 12px; font-size: 12.5px; }
  .order-main, #orderBody { gap: 12px; }
  .o-side { gap: 12px; }
  .o-side .o-card { padding: 16px 20px; }
  .o-card-title { margin-bottom: 10px; }
  .sum-leg { padding: 7px 0; }
  .sum-leg small { display: none; }
  .sum-arrow svg { width: 22px; height: 22px; padding: 4px; }
  .sum-rows { margin-top: 4px; }
  .sum-rows > div { padding: 7px 0; }
  .o-help { padding: 12px 16px; }
  .o-help-icon { width: 34px; height: 34px; }
}
@media (max-width: 960px) {
  .order-grid { grid-template-columns: 1fr; max-width: 640px; margin: 0 auto; width: 100%; }
  .order-head { max-width: 640px; margin: 0 auto; width: 100%; }
  .o-side { position: static; }
}
@media (max-width: 480px) {
  .container { padding: 0 16px; }
  .field input { font-size: 24px; }
  .nav-actions .btn { display: none; }
  .pay-amount b { font-size: 32px; }
  .pay-amount > span { font-size: 20px; }
  .order-main { padding: 20px 12px 48px; gap: 16px; }
  .order-title-text h3 { font-size: 21px; }
  .order-topbar .logo { font-size: 0; gap: 0; } /* mark only */
  .o-card { padding: 20px 16px; border-radius: 20px; }
  .o-side .o-card { padding: 20px 16px; }
  .dep-top { flex-direction: column; gap: 10px; }
  .dep-amount { padding: 16px; }
  .best .route-amt { font-size: 17px; }
  .route-badge { display: none; }
  .hero-title { letter-spacing: -1.8px; }
}

/* Legal pages — served at /terms and /privacy */
.legal-page { background: var(--bg); }

.legal-hero { border-bottom: 1px solid var(--border); background: linear-gradient(180deg, var(--surface-2), var(--bg)); }
.legal-hero-inner { padding: 60px 0 40px; }
.legal-eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; letter-spacing: .8px; text-transform: uppercase; color: var(--accent-2); }
.legal-eyebrow svg { width: 15px; height: 15px; }
.legal-hero h1 { margin-top: 16px; font-size: clamp(36px, 5vw, 56px); font-weight: 700; letter-spacing: -2px; line-height: 1.04; }
.legal-updated { margin-top: 14px; color: var(--muted); font-size: 14px; }
.legal-tabs { display: inline-flex; gap: 4px; margin-top: 30px; padding: 5px; border-radius: 999px; background: var(--surface-3); font-size: 14px; font-weight: 500; }
.legal-tabs a { padding: 9px 22px; border-radius: 999px; color: var(--muted); transition: background-color .15s ease, color .15s ease; }
.legal-tabs a:hover { color: var(--text); }
.legal-tabs a.active { background: var(--surface); color: var(--text); font-weight: 600; box-shadow: var(--shadow); }

.legal-layout { display: grid; grid-template-columns: 236px minmax(0, 1fr); gap: 56px; padding: 56px 0 100px; align-items: start; }
.legal-toc { position: sticky; top: 92px; }
.legal-toc-title { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); margin-bottom: 12px; padding-left: 12px; }
.legal-toc ol { list-style: none; display: flex; flex-direction: column; gap: 1px; }
.legal-toc a { display: block; padding: 7px 12px; border-radius: 8px; font-size: 13.5px; line-height: 1.4; color: var(--muted); transition: background-color .15s ease, color .15s ease; }
.legal-toc a:hover { background: var(--surface-2); color: var(--text); }
.legal-toc a:target, .legal-toc a.active { color: var(--accent-2); font-weight: 600; }

.legal-body { max-width: 720px; }
.legal-lead { font-size: 18px; line-height: 1.7; color: var(--text-2); margin-bottom: 8px; }
.legal-body > section { scroll-margin-top: 88px; }
.legal-body > section + section { margin-top: 44px; padding-top: 44px; border-top: 1px solid var(--border); }
.legal-body h2 { display: flex; gap: 14px; align-items: baseline; font-size: 24px; font-weight: 700; letter-spacing: -.5px; margin-bottom: 16px; }
.legal-body h2 .n { flex: none; font-size: 14px; font-weight: 700; color: var(--accent-2); font-variant-numeric: tabular-nums; transform: translateY(-2px); }
.legal-body p, .legal-body li { color: var(--text-2); font-size: 16px; line-height: 1.75; }
.legal-body p + p { margin-top: 14px; }
.legal-body ul { margin: 16px 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 11px; }
.legal-body li { position: relative; padding-left: 26px; }
.legal-body li::before { content: ""; position: absolute; left: 3px; top: 10px; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.legal-body b { color: var(--text); font-weight: 600; }
.legal-body a { color: var(--accent-2); font-weight: 500; }
.legal-body a:hover { text-decoration: underline; }

.legal-footer { padding: 0 0 36px; }
.legal-footer .footer-bottom { margin-top: 0; }
.legal-footer-links { display: flex; gap: 20px; }
.legal-footer-links a:hover { color: var(--text); }

@media (max-width: 900px) {
  .legal-layout { grid-template-columns: 1fr; gap: 0; padding: 36px 0 72px; }
  .legal-toc { display: none; }
}
@media (max-width: 600px) {
  .container.narrow { padding: 0 16px; }
  .legal-hero-inner { padding: 40px 0 28px; }
  .legal-tabs { display: flex; width: 100%; }
  .legal-tabs a { flex: 1; text-align: center; padding: 10px 8px; }
  .legal-body h2 { font-size: 21px; }
}
