:root {
  --bg: #07090f;
  --bg-card: #10141f;
  --bg-slot: #0a0d16;
  --bg-slot-hover: #0e1320;
  --bg-pill: #181e2e;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);
  --text: #f3f6fc;
  --muted: #8b95ad;
  --dim: #5e677d;
  --green: #16e29c;
  --green-2: #00c48c;
  --green-soft: rgba(22, 226, 156, 0.12);
  --cyan: #38bdf8;
  --purple: #8b5cf6;
  --gold: #f59e0b;
  --red: #fb7185;
  --red-soft: rgba(251, 113, 133, 0.12);
  --radius-card: 24px;
  --radius-slot: 18px;
  --shadow-card: 0 24px 64px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.04) inset;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  background-image:
    radial-gradient(640px 420px at 50% -80px, rgba(22, 226, 156, 0.12), transparent 68%),
    radial-gradient(520px 380px at 85% 18%, rgba(139, 92, 246, 0.09), transparent 65%),
    radial-gradient(480px 360px at 12% 24%, rgba(56, 189, 248, 0.07), transparent 65%);
}

a { color: inherit; text-decoration: none; }
button, input { font-family: inherit; }

/* Hide scrollbars nicely where needed */
.num { font-variant-numeric: tabular-nums; }

/* Telegram Mini App compact mode */
body.is-tma header .nav-links,
body.is-tma .seo-longform,
body.is-tma footer { display: none; }
body.is-tma .swap-stage { padding-top: 10px; }

.container {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 18px;
}

/* =========================================================
   MINIMAL TOP HEADER (Single Connect Wallet + Currency Pill)
   ========================================================= */
header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(7, 9, 15, 0.78);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1rem;
  letter-spacing: -0.02em;
}
.brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--green), #2dd4bf 55%, var(--purple));
  display: grid;
  place-items: center;
  color: #04130d;
  font-weight: 900;
  font-size: 0.85rem;
  box-shadow: 0 4px 16px rgba(22, 226, 156, 0.25);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--muted);
}
.nav-links a { transition: color 0.15s ease; }
.nav-links a:hover { color: var(--text); }

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Currency Dropdown Pill */
.fiat-wrap { position: relative; }
.fiat-trigger {
  height: 36px;
  padding: 0 12px;
  border-radius: 11px;
  border: 1px solid var(--border);
  background: var(--bg-pill);
  color: var(--text);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.fiat-trigger:hover { border-color: var(--border-strong); background: #20273b; }

.fiat-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  width: 148px;
  background: #141927;
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  padding: 5px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.55);
  display: none;
  z-index: 60;
}
.fiat-menu.open { display: block; }
.fiat-opt {
  width: 100%;
  text-align: left;
  padding: 8px 10px;
  border: none;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.fiat-opt:hover { background: rgba(255, 255, 255, 0.05); color: var(--text); }
.fiat-opt.active { background: var(--green-soft); color: var(--green); }

/* Header Connect Wallet Button */
.connect-btn {
  height: 36px;
  padding: 0 14px;
  border-radius: 11px;
  border: 1px solid rgba(22, 226, 156, 0.35);
  background: rgba(22, 226, 156, 0.12);
  color: var(--green);
  font-size: 0.82rem;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transition: all 0.15s ease;
}
.connect-btn:hover { background: rgba(22, 226, 156, 0.2); border-color: var(--green); }
.connect-btn.connected {
  border-color: rgba(56, 189, 248, 0.4);
  background: rgba(56, 189, 248, 0.12);
  color: var(--cyan);
}
.connect-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

/* =========================================================
   HERO + CENTERED FLAGSHIP SWAP STAGE
   ========================================================= */
.swap-stage {
  padding: 28px 0 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.stage-head {
  text-align: center;
  max-width: 560px;
  margin-bottom: 22px;
}
.stage-head h1 {
  font-size: clamp(1.65rem, 3.6vw, 2.35rem);
  font-weight: 900;
  letter-spacing: -0.035em;
  line-height: 1.12;
  margin-bottom: 8px;
}
.grad-text {
  background: linear-gradient(90deg, var(--green), #38bdf8 55%, #a78bfa);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.stage-head p {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
}
.stage-head strong { color: var(--text); font-weight: 700; }

/* THE SINGLE UNIFIED SWAP CARD */
.swap-card {
  width: 100%;
  max-width: 474px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 16px;
  box-shadow: var(--shadow-card);
  position: relative;
}

.card-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 2px 4px 12px;
}

.route-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.77rem;
  font-weight: 700;
  color: var(--green);
  background: var(--green-soft);
  border: 1px solid rgba(22, 226, 156, 0.24);
  padding: 5px 10px;
  border-radius: 999px;
}
.route-badge.is-bridge {
  color: var(--cyan);
  background: rgba(56, 189, 248, 0.11);
  border-color: rgba(56, 189, 248, 0.25);
}
.route-badge.is-nokyc {
  color: #c4b5fd;
  background: rgba(139, 92, 246, 0.14);
  border-color: rgba(139, 92, 246, 0.3);
}
.route-pulse {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.card-controls {
  display: flex;
  align-items: center;
  gap: 6px;
}
.icon-pill {
  height: 30px;
  padding: 0 9px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.14s ease;
}
.icon-pill:hover { color: var(--text); border-color: var(--border-strong); background: rgba(255, 255, 255, 0.06); }
.icon-pill.spinning svg { animation: spin 0.7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Slippage inline drawer */
.slippage-bar {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 11px;
  margin-bottom: 10px;
  border-radius: 12px;
  background: var(--bg-slot);
  border: 1px solid var(--border);
  font-size: 0.76rem;
  color: var(--muted);
}
.slippage-bar.open { display: flex; }
.slip-opts { display: flex; gap: 5px; }
.slip-btn {
  padding: 4px 8px;
  border-radius: 7px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 700;
  cursor: pointer;
}
.slip-btn.active {
  background: var(--green-soft);
  border-color: rgba(22, 226, 156, 0.4);
  color: var(--green);
}

/* TOKEN SLOTS (You Pay / You Receive) */
.slot {
  background: var(--bg-slot);
  border: 1px solid var(--border);
  border-radius: var(--radius-slot);
  padding: 14px 15px;
  transition: border-color 0.16s ease, background 0.16s ease;
}
.slot:focus-within {
  border-color: rgba(22, 226, 156, 0.45);
  background: var(--bg-slot-hover);
}
.slot.is-error {
  border-color: var(--red);
  box-shadow: 0 0 0 2px rgba(251, 113, 133, 0.16);
}

.slot-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 600;
}

.bal-inline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.bal-inline strong { color: var(--text); font-weight: 700; }
.bal-inline .bal-fiat { color: var(--cyan); font-weight: 600; }
.bal-edit-link {
  padding: 2px 7px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  font-size: 0.71rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.14s ease;
}
.bal-edit-link:hover { color: var(--text); border-color: var(--border-strong); }

/* Manual Balance Inline Bar */
.bal-editor {
  display: none;
  margin-bottom: 11px;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.28);
  gap: 7px;
  align-items: center;
  flex-wrap: wrap;
}
.bal-editor.open { display: flex; }
.bal-editor label {
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--cyan);
}
.bal-editor input {
  flex: 1;
  min-width: 80px;
  height: 30px;
  padding: 0 9px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #07090f;
  color: var(--text);
  font-size: 0.84rem;
  font-weight: 700;
  outline: none;
}
.bal-editor input:focus { border-color: var(--cyan); }
.bal-save-btn {
  height: 30px;
  padding: 0 11px;
  border-radius: 8px;
  border: none;
  background: var(--cyan);
  color: #031521;
  font-size: 0.74rem;
  font-weight: 800;
  cursor: pointer;
}
.bal-clear-btn {
  height: 30px;
  padding: 0 8px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  font-size: 0.73rem;
  font-weight: 700;
  cursor: pointer;
}
.bal-editor-hint {
  width: 100%;
  font-size: 0.71rem;
  color: var(--muted);
  line-height: 1.35;
}

/* Main Input + Token Selector Row */
.slot-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.amt-col {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 4px;
}
.amt-prefix {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--muted);
  display: none;
}
.amt-prefix.show { display: inline; }

.amt-input {
  width: 100%;
  min-width: 0;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-size: 1.85rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.15;
}
.amt-input::placeholder { color: var(--dim); }
/* Hide native number spinners */
.amt-input::-webkit-outer-spin-button,
.amt-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.amt-input[type=number] { -moz-appearance: textfield; }

.out-display {
  flex: 1;
  min-width: 0;
  font-size: 1.85rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.15;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.out-display.loading {
  color: var(--muted);
  animation: pulse 1.1s ease-in-out infinite;
}
@keyframes pulse { 0%, 100% { opacity: 0.45; } 50% { opacity: 0.95; } }

/* Token Selector Pill */
.tok-btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 7px 11px 7px 8px;
  border-radius: 14px;
  border: 1px solid var(--border-strong);
  background: var(--bg-pill);
  color: var(--text);
  cursor: pointer;
  transition: all 0.15s ease;
}
.tok-btn:hover {
  background: #20283d;
  border-color: rgba(255, 255, 255, 0.22);
  transform: translateY(-1px);
}
.tok-icon {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  font-weight: 900;
  font-size: 0.78rem;
  color: #fff;
  overflow: hidden;
  position: relative;
}
.tok-icon.has-logo {
  background: rgba(255, 255, 255, 0.05) !important;
}
.tok-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 50%;
  display: block;
}
.tok-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.15;
}
.tok-sym { font-size: 0.95rem; font-weight: 800; letter-spacing: -0.01em; }
.tok-net { font-size: 0.67rem; font-weight: 600; color: var(--muted); }
.tok-chev { color: var(--muted); margin-left: 2px; }

/* Bottom Row inside You Pay: Coin/Fiat Switch + Equiv + % Presets */
.slot-foot {
  margin-top: 11px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.unit-equiv-wrap {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.unit-toggle {
  display: inline-flex;
  background: #06080e;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 2px;
}
.unit-btn {
  padding: 3px 8px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.13s ease;
}
.unit-btn.active {
  background: rgba(22, 226, 156, 0.18);
  color: var(--green);
}

.equiv-text {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--muted);
}

/* Integrated Percentage Presets Row */
.pct-strip {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 5px;
}
.pct-chip {
  height: 28px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  font-size: 0.73rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.13s ease;
}
.pct-chip:hover {
  border-color: rgba(22, 226, 156, 0.45);
  color: var(--text);
  background: rgba(22, 226, 156, 0.08);
}
.pct-chip.active {
  border-color: var(--green);
  background: rgba(22, 226, 156, 0.16);
  color: var(--green);
}
.pct-chip.max-chip {
  color: var(--gold);
  border-color: rgba(245, 158, 11, 0.28);
}
.pct-chip.max-chip:hover,
.pct-chip.max-chip.active {
  border-color: var(--gold);
  background: rgba(245, 158, 11, 0.16);
  color: #fcd34d;
}

/* Balance Guard Error Strip */
.bal-error {
  display: none;
  margin-top: 10px;
  padding: 8px 10px;
  border-radius: 11px;
  background: var(--red-soft);
  border: 1px solid rgba(251, 113, 133, 0.38);
  color: #fecdd3;
  font-size: 0.76rem;
  font-weight: 700;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.bal-error.show { display: flex; }
.fix-max-btn {
  flex-shrink: 0;
  padding: 4px 9px;
  border-radius: 7px;
  border: none;
  background: var(--red);
  color: #1c050a;
  font-size: 0.72rem;
  font-weight: 800;
  cursor: pointer;
}

/* Center Flip Divider Button */
.flip-wrap {
  height: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 3;
}
.flip-btn {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  border: 3px solid var(--bg-card);
  background: var(--bg-pill);
  color: var(--text);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: transform 0.24s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.15s ease, color 0.15s ease;
}
.flip-btn:hover {
  background: #232c44;
  color: var(--green);
}
.flip-btn.rotated { transform: rotate(180deg); }

/* Receive Savings Pill */
.save-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--green);
  font-size: 0.71rem;
  font-weight: 800;
}

/* Conditional Recipient Address Input (Cross-Chain / No-KYC) */
.recipient-box {
  display: none;
  margin-top: 10px;
  padding: 11px 13px;
  border-radius: 15px;
  background: var(--bg-slot);
  border: 1px solid var(--border);
}
.recipient-box.show { display: block; }
.recipient-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 6px;
}
.recipient-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.recipient-row input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 0.8rem;
}
.recipient-row input::placeholder { color: var(--dim); font-family: var(--font-sans); }
.paste-btn {
  padding: 4px 9px;
  border-radius: 7px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--cyan);
  font-size: 0.72rem;
  font-weight: 800;
  cursor: pointer;
}
.paste-btn:hover { background: rgba(56, 189, 248, 0.12); }

/* Collapsible Quote & Fee Accordion */
.quote-bar {
  margin-top: 10px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
  overflow: hidden;
}
.quote-summary {
  width: 100%;
  padding: 10px 13px;
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.quote-summary strong { color: var(--text); font-weight: 700; }
.quote-details {
  display: none;
  padding: 0 13px 11px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.77rem;
}
.quote-bar.open .quote-details { display: block; }
.q-row {
  display: flex;
  justify-content: space-between;
  padding-top: 7px;
  color: var(--muted);
}
.q-row strong { color: var(--text); font-weight: 700; }
.q-row strong.good { color: var(--green); }

/* PRIMARY SWAP CTA BUTTON */
.swap-cta {
  width: 100%;
  height: 54px;
  margin-top: 12px;
  border: none;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--green), var(--green-2));
  color: #03150e;
  font-size: 1rem;
  font-weight: 900;
  letter-spacing: -0.01em;
  cursor: pointer;
  box-shadow: 0 10px 28px rgba(22, 226, 156, 0.22);
  transition: transform 0.14s ease, filter 0.14s ease, opacity 0.14s ease;
}
.swap-cta:hover:not(:disabled) { transform: translateY(-1px); filter: brightness(1.06); }
.swap-cta:active:not(:disabled) { transform: translateY(0); }
.swap-cta:disabled {
  background: #1b2234;
  color: var(--dim);
  box-shadow: none;
  cursor: not-allowed;
}

.card-trust {
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 0.72rem;
  color: var(--dim);
  font-weight: 600;
}
.card-trust span { display: inline-flex; align-items: center; gap: 4px; }

/* QUICK POPULAR ROUTE CHIPS BELOW CARD */
.quick-routes {
  width: 100%;
  max-width: 560px;
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 7px;
}
.qr-chip {
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(16, 20, 31, 0.85);
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.14s ease;
}
.qr-chip:hover,
.qr-chip.active {
  border-color: rgba(22, 226, 156, 0.45);
  background: rgba(22, 226, 156, 0.1);
  color: var(--green);
}

/* Trust Metrics Bar under Swapper */
.metrics-bar {
  width: 100%;
  max-width: 780px;
  margin-top: 22px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.metric-pill {
  padding: 11px 12px;
  border-radius: 14px;
  background: rgba(16, 20, 31, 0.65);
  border: 1px solid var(--border);
  text-align: center;
}
.metric-pill strong {
  display: block;
  font-size: 0.96rem;
  font-weight: 900;
  color: var(--text);
}
.metric-pill span {
  font-size: 0.72rem;
  color: var(--muted);
  font-weight: 600;
}

/* How It Works 3-Step Strip */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.step-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 18px 20px;
}
.step-num {
  width: 28px;
  height: 28px;
  border-radius: 9px;
  background: var(--green-soft);
  border: 1px solid rgba(22, 226, 156, 0.3);
  color: var(--green);
  font-weight: 900;
  font-size: 0.82rem;
  display: grid;
  place-items: center;
  margin-bottom: 10px;
}
.step-card h3 { font-size: 0.95rem; font-weight: 800; margin-bottom: 5px; }
.step-card p { font-size: 0.83rem; color: var(--muted); line-height: 1.48; }

.fee-use-btn {
  margin-top: 6px;
  padding: 8px 14px;
  border-radius: 10px;
  border: none;
  background: linear-gradient(135deg, var(--green), var(--green-2));
  color: #03150e;
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
}
.fee-use-btn:hover { filter: brightness(1.06); }

/* Wallet Watch-Mode Input inside Modal */
.watch-box {
  padding: 12px;
  border-radius: 14px;
  background: var(--bg-slot);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.watch-box label { font-size: 0.78rem; font-weight: 800; color: var(--text); }
.watch-box p { font-size: 0.74rem; color: var(--muted); }
.watch-row { display: flex; gap: 7px; }
.watch-row input {
  flex: 1;
  min-width: 0;
  height: 38px;
  padding: 0 11px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #07090f;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 0.77rem;
  outline: none;
}
.watch-row input:focus { border-color: var(--green); }
.watch-go-btn {
  height: 38px;
  padding: 0 14px;
  border-radius: 10px;
  border: none;
  background: var(--green);
  color: #03150e;
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
}
.wallet-opt-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}
.wallet-opt-btn {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg-slot);
  color: var(--text);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.wallet-opt-btn:hover { border-color: var(--green); background: rgba(22, 226, 156, 0.08); }

/* =========================================================
   BELOW-THE-FOLD SECTIONS (Clean, Spacious, Zero Clutter)
   ========================================================= */
.ticker-strip {
  margin: 12px auto 34px;
  padding: 10px 16px;
  border-radius: 14px;
  background: rgba(16, 20, 31, 0.65);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 0.8rem;
}
.ticker-list {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}
.t-item { display: inline-flex; align-items: center; gap: 6px; }
.t-sym { color: var(--muted); font-weight: 800; }
.t-px { color: var(--text); font-weight: 700; }
.t-alt { color: var(--dim); font-size: 0.74rem; }
.t-live {
  font-size: 0.72rem;
  color: var(--green);
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

section.section {
  padding: 34px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}
.sec-title {
  font-size: 1.4rem;
  font-weight: 900;
  letter-spacing: -0.025em;
  margin-bottom: 6px;
}
.sec-sub {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 20px;
}

/* Horizontal Fee Savings Comparison Card */
.fee-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 22px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr);
  gap: 24px;
  align-items: center;
}
.fee-input-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-slot);
  border: 1px solid var(--border);
  border-radius: 13px;
  padding: 9px 13px;
  margin: 12px 0 10px;
}
.fee-input-box span.sym { color: var(--green); font-weight: 800; font-size: 1.05rem; }
.fee-input-box input {
  width: 100%;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-size: 1.15rem;
  font-weight: 800;
}
.fee-presets { display: flex; gap: 6px; }
.fee-pre {
  flex: 1;
  padding: 6px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
}
.fee-pre.active, .fee-pre:hover {
  border-color: var(--green);
  color: var(--green);
  background: var(--green-soft);
}
.fee-bars { display: flex; flex-direction: column; gap: 10px; }
.fee-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 15px;
  border-radius: 13px;
  background: var(--bg-slot);
  border: 1px solid var(--border);
  font-size: 0.88rem;
}
.fee-row.bad strong { color: var(--red); }
.fee-row.good {
  background: rgba(22, 226, 156, 0.08);
  border-color: rgba(22, 226, 156, 0.35);
}
.fee-row.good strong { color: var(--green); }
.fee-saving-banner {
  margin-top: 4px;
  padding: 12px 15px;
  border-radius: 13px;
  background: linear-gradient(135deg, rgba(22, 226, 156, 0.14), rgba(56, 189, 248, 0.08));
  border: 1px solid rgba(22, 226, 156, 0.3);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.fee-saving-banner .big { font-size: 1.25rem; font-weight: 900; color: var(--green); }
.fee-saving-banner .sub { font-size: 0.78rem; color: var(--muted); }

/* 3-Column Feature Cards */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.mini-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 20px;
}
.mini-card h3 { font-size: 0.98rem; font-weight: 800; margin-bottom: 6px; }
.mini-card p { font-size: 0.85rem; color: var(--muted); line-height: 1.5; }

/* Curated Pro Trading Tools (Revenue Stacking — Clean & Non-Spammy) */
.tools-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.tool-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.tool-card:hover { border-color: rgba(22, 226, 156, 0.45); transform: translateY(-2px); }
.tool-top { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.tool-name { font-weight: 800; font-size: 0.9rem; }
.tool-desc { font-size: 0.78rem; color: var(--muted); line-height: 1.45; }
.pill {
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 800;
  background: var(--green-soft);
  color: var(--green);
  white-space: nowrap;
}
.pill.purple { background: rgba(139, 92, 246, 0.18); color: #c4b5fd; }
.pill.gold { background: rgba(245, 158, 11, 0.16); color: #fcd34d; }

/* SEO Route Links */
.routes-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.route-card {
  display: block;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 15px;
  padding: 15px;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.route-card:hover { border-color: var(--green); transform: translateY(-2px); }
.route-card .r-pair { font-weight: 800; font-size: 0.92rem; margin-bottom: 4px; }
.route-card .r-desc { font-size: 0.78rem; color: var(--muted); }

/* FAQ Grid */
.faq-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 15px;
  padding: 16px;
}
.faq-item h4 { font-size: 0.92rem; font-weight: 800; margin-bottom: 5px; }
.faq-item p { font-size: 0.83rem; color: var(--muted); }

footer {
  border-top: 1px solid var(--border);
  padding: 26px 0 38px;
  color: var(--dim);
  font-size: 0.78rem;
}
.disclaimer {
  padding: 13px 15px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  margin-bottom: 14px;
  color: var(--muted);
}
.footer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}
.footer-links { display: flex; gap: 16px; }
.footer-links a:hover { color: var(--green); }

/* =========================================================
   MODALS (Token Picker + White-Label Swap Execution Modal)
   ========================================================= */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(4, 6, 11, 0.76);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.modal-backdrop.open { display: flex; }

.modal {
  width: 100%;
  max-width: 468px;
  max-height: 86vh;
  background: #121725;
  border: 1px solid var(--border-strong);
  border-radius: 22px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.65);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.modal-head {
  padding: 16px 18px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
}
.modal-head h3 { font-size: 1rem; font-weight: 800; }
.modal-count-pill {
  font-size: 0.71rem;
  font-weight: 700;
  color: var(--green);
  background: var(--green-soft);
  padding: 2px 8px;
  border-radius: 999px;
  margin-left: 8px;
}
.modal-close {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  font-size: 1.05rem;
  cursor: pointer;
}
.modal-close:hover { color: var(--text); }

.modal-search {
  padding: 12px 16px 8px;
}
.modal-search input {
  width: 100%;
  height: 42px;
  padding: 0 13px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg-slot);
  color: var(--text);
  font-size: 0.86rem;
  outline: none;
}
.modal-search input:focus { border-color: var(--green); }

.popular-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 16px 10px;
}
.pop-tok {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px 4px 6px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  font-size: 0.74rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.12s ease;
}
.pop-tok:hover {
  border-color: var(--green);
  background: var(--green-soft);
  color: var(--green);
}
.pop-tok img, .pop-tok .pop-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  object-fit: cover;
  display: inline-grid;
  place-items: center;
  font-size: 0.62rem;
  font-weight: 900;
  color: #fff;
}

.net-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 16px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.net-tab {
  padding: 5px 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  font-size: 0.73rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.12s ease;
}
.net-tab:hover { color: var(--text); border-color: var(--border-strong); }
.net-tab.active {
  background: var(--green-soft);
  border-color: rgba(22, 226, 156, 0.4);
  color: var(--green);
}

.tok-list {
  overflow-y: auto;
  padding: 6px 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.16) transparent;
}
.tok-list::-webkit-scrollbar { width: 6px; }
.tok-list::-webkit-scrollbar-track { background: transparent; }
.tok-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 999px;
}
.tok-list::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.28); }
.tok-verified {
  display: inline-block;
  margin-left: 4px;
  font-size: 0.68rem;
  color: var(--green);
}
.tok-load-more {
  margin: 8px 6px 2px;
  padding: 9px;
  border-radius: 11px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--cyan);
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
}
.tok-load-more:hover { background: rgba(56, 189, 248, 0.12); border-color: rgba(56, 189, 248, 0.35); }
.tok-empty {
  padding: 24px 14px;
  text-align: center;
  color: var(--muted);
  font-size: 0.84rem;
}
.tok-row {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 10px;
  border: none;
  border-radius: 13px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  text-align: left;
  transition: background 0.12s ease;
}
.tok-row:hover { background: rgba(255, 255, 255, 0.05); }
.tok-row.selected { background: rgba(22, 226, 156, 0.1); }
.tok-row-left { display: flex; align-items: center; gap: 11px; }
.tok-row-name { font-size: 0.9rem; font-weight: 800; }
.tok-row-sub { font-size: 0.73rem; color: var(--muted); }
.tok-row-right { text-align: right; }
.tok-row-bal { font-size: 0.82rem; font-weight: 700; color: var(--text); }
.tok-row-px { font-size: 0.72rem; color: var(--muted); }

/* Execution Modal Body */
.exec-body {
  padding: 16px 18px 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.exec-summary {
  padding: 13px;
  border-radius: 14px;
  background: var(--bg-slot);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.exec-side { display: flex; flex-direction: column; }
.exec-side .lbl { font-size: 0.71rem; color: var(--muted); font-weight: 600; }
.exec-side .val { font-size: 1rem; font-weight: 800; }
.exec-arrow { color: var(--green); font-weight: 900; font-size: 1.1rem; }

.deposit-box {
  padding: 14px;
  border-radius: 14px;
  background: var(--bg-slot);
  border: 1px solid rgba(22, 226, 156, 0.3);
  text-align: center;
}
.deposit-qr {
  width: 156px;
  height: 156px;
  border-radius: 12px;
  background: #fff;
  padding: 8px;
  margin: 8px auto 10px;
  display: block;
}
.copy-addr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 10px;
  border-radius: 10px;
  background: #07090f;
  border: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  word-break: break-all;
  text-align: left;
}
.copy-btn {
  flex-shrink: 0;
  padding: 5px 10px;
  border-radius: 7px;
  border: none;
  background: var(--green);
  color: #03150e;
  font-size: 0.72rem;
  font-weight: 800;
  cursor: pointer;
}
.exec-frame-wrap {
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #0b101d;
}
.exec-note {
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.45;
  text-align: center;
}
.exec-primary-link {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 46px;
  border-radius: 13px;
  background: linear-gradient(135deg, var(--green), var(--green-2));
  color: #03150e;
  font-weight: 800;
  font-size: 0.9rem;
}
.exec-status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 0.8rem;
  font-weight: 700;
  background: rgba(56, 189, 248, 0.12);
  color: var(--cyan);
}
.exec-status-pill.ok { background: var(--green-soft); color: var(--green); }
.exec-status-pill.err { background: var(--red-soft); color: #fecdd3; }

@media (max-width: 880px) {
  .fee-card { grid-template-columns: 1fr; }
  .grid-3, .steps-grid { grid-template-columns: 1fr; }
  .metrics-bar { grid-template-columns: repeat(2, 1fr); }
  .tools-grid { grid-template-columns: repeat(2, 1fr); }
  .routes-grid { grid-template-columns: repeat(2, 1fr); }
  .faq-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .nav-links { display: none; }
  .swap-card { padding: 13px; }
  .amt-input, .out-display { font-size: 1.5rem; }
  .tools-grid, .routes-grid { grid-template-columns: 1fr; }
}
