/**
 * Exchange — frontpage-aligned hub (hero, map frames, onboard tour)
 */
.cex-frontpage-match {
  --cex-accent: #00d4ff;
  --cex-accent-soft: rgba(0, 212, 255, 0.14);
  --cex-gold: #ffd966;
  --cex-mint: #00ff88;
}

.cex-frontpage-match .frontpage-bg {
  opacity: 0.55;
}

.cex-fp-main {
  position: relative;
  z-index: 2;
  max-width: 1180px;
  padding-bottom: 72px;
}

.cex-fp-main.cex-page {
  padding-top: 88px;
  max-width: 1180px;
}

/* Hero — cyan finance lane */
.cex-fp-hero {
  margin-bottom: 14px;
  border-color: rgba(0, 212, 255, 0.22);
  background:
    linear-gradient(135deg, rgba(0, 212, 255, 0.1), transparent 44%),
    radial-gradient(circle at 18% 72%, rgba(124, 92, 255, 0.18), transparent 38%),
    linear-gradient(145deg, rgba(6, 10, 24, 0.9), rgba(12, 16, 32, 0.82));
}

.cex-fp-hero h1 {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #b8f0ff;
}

.cex-fp-hero h1 i {
  color: var(--cex-accent);
  filter: drop-shadow(0 0 12px rgba(0, 212, 255, 0.45));
}

.cex-fp-core {
  width: min(100%, 210px);
}

.cex-fp-core .fp-core-pulse {
  font-size: 2.4rem;
}

.cex-hero-status {
  margin-top: 12px;
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.72);
}

.cex-glance-stats {
  margin-bottom: 16px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (min-width: 640px) {
  .cex-glance-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 720px) {
  .cex-glance-stats {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .cex-glance-stats {
    grid-template-columns: repeat(8, minmax(0, 1fr));
  }
}

/* Bold framed panels */
.cex-frame--bold {
  border-width: 2px;
  border-color: rgba(0, 212, 255, 0.45);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.06) inset,
    0 16px 48px rgba(0, 0, 0, 0.38),
    0 0 32px rgba(0, 212, 255, 0.08);
}

.cex-frame--bold .cex-frame-head h2,
.cex-frame--bold .cex-frame-head h3 {
  font-weight: 800;
  letter-spacing: 0.02em;
}

.cex-frame--bold .cex-frame-head h2 strong,
.cex-frame--bold .cex-frame-head h3 strong {
  color: #e8fbff;
  text-shadow: 0 0 18px rgba(0, 212, 255, 0.35);
}

.cex-account-bridge {
  margin-bottom: 18px;
  background: linear-gradient(155deg, rgba(6, 14, 32, 0.92), rgba(10, 8, 28, 0.88));
}

.cex-account-bridge-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  padding: 0 14px 14px;
}

.cex-account-card {
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.28);
}

.cex-account-kicker {
  display: block;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(0, 212, 255, 0.85);
  margin-bottom: 6px;
  font-weight: 700;
}

.cex-account-card strong {
  display: block;
  font-size: 1rem;
  color: #fff;
  margin-bottom: 4px;
  line-height: 1.35;
}

.cex-account-meta {
  display: block;
  font-size: 0.76rem;
  color: rgba(255, 255, 255, 0.55);
  margin-bottom: 8px;
}

.cex-account-link {
  display: inline-block;
  margin: 4px 8px 0 0;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--cex-accent);
  text-decoration: none;
  border-bottom: 1px solid rgba(0, 212, 255, 0.35);
}

.cex-account-link--ghost {
  color: rgba(255, 255, 255, 0.65);
  border-bottom-color: rgba(255, 255, 255, 0.2);
}

.cex-account-sync {
  margin: 0;
  padding: 0 16px 14px;
  font-size: 0.74rem;
  color: rgba(255, 255, 255, 0.48);
}

/* Hot spots */
.cex-hotshots {
  margin-bottom: 20px;
}

.cex-hotshots-title {
  margin: 0 0 6px;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.88);
}

.cex-hotshots-title strong {
  color: #b8f0ff;
}

.cex-hotshots-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
}

.cex-hotshot {
  display: flex;
  flex-direction: column;
}

.cex-hotshot-img {
  width: calc(100% - 28px);
  margin: 0 14px;
  border-radius: 12px;
  border: 1px solid rgba(0, 212, 255, 0.2);
  height: auto;
  object-fit: cover;
}

.cex-hotshot-cta {
  margin-top: 10px;
  padding: 8px 14px;
  border-radius: 10px;
  border: 1px solid rgba(0, 212, 255, 0.45);
  background: rgba(0, 212, 255, 0.12);
  color: #b8f0ff;
  font-weight: 800;
  font-size: 0.78rem;
  cursor: pointer;
  font-family: inherit;
}

.cex-hotshot-cta:hover {
  background: rgba(0, 212, 255, 0.22);
}

.cex-mn2-linked-strip {
  margin-bottom: 16px;
  padding: 4px;
}

.cex-mn2-linked-strip .mn2-page-strip {
  margin: 0;
  border: none;
  background: transparent;
}

.cex-wallet.cex-frame--bold {
  padding: 16px;
}

.cex-wallet.cex-frame--bold h2 strong {
  color: #b8f0ff;
}

.cex-glance-stats.cex-stats-pulse {
  animation: cexStatsPulse 0.65s ease;
}

@keyframes cexStatsPulse {
  0% { transform: scale(1); filter: brightness(1); }
  35% { transform: scale(1.012); filter: brightness(1.1); }
  100% { transform: scale(1); filter: brightness(1); }
}

#cex-glance-mn2-stat.cex-glance-mn2-glow {
  border-color: rgba(0, 212, 255, 0.72);
  box-shadow: 0 0 28px rgba(0, 212, 255, 0.35), inset 0 0 18px rgba(0, 212, 255, 0.08);
}

#cex-glance-mn2-stat.cex-glance-mn2-glow .v {
  color: #b8f0ff;
  text-shadow: 0 0 16px rgba(0, 212, 255, 0.5);
}

/* Site map — framed overview cards */
.cex-map-strip {
  margin-bottom: 18px;
  padding: 18px 20px 20px;
  border-radius: 22px;
  border: 1px solid rgba(0, 212, 255, 0.16);
  background: linear-gradient(165deg, rgba(8, 12, 24, 0.88), rgba(14, 10, 28, 0.78));
  box-shadow: 0 14px 48px rgba(0, 0, 0, 0.32);
}

.cex-map-strip > h2 {
  margin: 0 0 6px;
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.82);
}

.cex-map-lead {
  margin: 0 0 14px;
  font-size: 0.86rem;
  color: rgba(255, 255, 255, 0.62);
  line-height: 1.45;
}

.cex-map-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
}

.cex-frame {
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.28);
  overflow: hidden;
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.cex-frame:hover {
  border-color: rgba(0, 212, 255, 0.45);
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(0, 212, 255, 0.12);
}

.cex-frame-head {
  padding: 12px 14px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, rgba(0, 212, 255, 0.08), transparent);
}

.cex-frame-head h3 {
  margin: 0 0 4px;
  font-size: 0.92rem;
  color: #d4f4ff;
  display: flex;
  align-items: center;
  gap: 8px;
}

.cex-frame-head p {
  margin: 0;
  font-size: 0.76rem;
  color: rgba(255, 255, 255, 0.58);
  line-height: 1.4;
}

.cex-frame-body {
  padding: 12px 14px 14px;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.45;
}

.cex-frame-body ul {
  margin: 0;
  padding-left: 18px;
}

.cex-frame-body li {
  margin-bottom: 4px;
}

button.cex-map-card {
  width: 100%;
  text-align: left;
  cursor: pointer;
  font: inherit;
  color: inherit;
}

.cex-map-card .cex-frame-go {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--cex-accent);
}

.cex-shortcuts-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 14px;
}

.cex-shortcuts-bar .cex-mini-link {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid rgba(0, 212, 255, 0.28);
  background: rgba(0, 212, 255, 0.06);
  text-decoration: none;
  margin: 0;
  font-size: 0.78rem;
}

.cex-shortcuts-bar .cex-mini-link:hover {
  background: rgba(0, 212, 255, 0.16);
  border-color: rgba(0, 212, 255, 0.5);
}

.cex-frontpage-match .cex-legal {
  border-radius: 14px;
  margin-bottom: 16px;
}

/* Sticky hub shell */
.cex-hub-wrap {
  position: sticky;
  top: 52px;
  z-index: 40;
  margin-bottom: 10px;
  padding: 12px 14px 10px;
  border-radius: 20px;
  border: 1px solid rgba(0, 212, 255, 0.18);
  background: linear-gradient(165deg, rgba(8, 12, 24, 0.94), rgba(14, 10, 28, 0.88));
  backdrop-filter: blur(12px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

.cex-hub-wrap-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.cex-hub-wrap-head h2 {
  margin: 0;
  font-size: 0.88rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.78);
}

.cex-hub-wrap .cex-hub-nav {
  margin-bottom: 0;
  padding-bottom: 4px;
}

.cex-hub-wrap .cex-route-note {
  margin: 8px 0 0;
}

.cex-frontpage-match .cex-hub-tab {
  border-radius: 12px;
  font-size: 0.8rem;
  padding: 8px 13px;
  border-color: rgba(0, 212, 255, 0.22);
  background: rgba(0, 212, 255, 0.05);
}

.cex-frontpage-match .cex-hub-tab.active {
  background: linear-gradient(135deg, rgba(0, 102, 204, 0.35), rgba(0, 212, 255, 0.2));
  box-shadow: 0 0 20px rgba(0, 212, 255, 0.15);
}

/* Trade desk inside frame */
.cex-trade-frame {
  margin-top: 4px;
  padding: 4px;
  border-radius: 18px;
  border: 1px solid rgba(0, 212, 255, 0.12);
  background: rgba(0, 0, 0, 0.18);
}

.cex-frontpage-match .cex-panel {
  border-color: rgba(0, 212, 255, 0.18);
  background: linear-gradient(160deg, rgba(10, 14, 28, 0.95), rgba(8, 12, 22, 0.88));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.cex-frontpage-match .cex-btn--primary {
  background: linear-gradient(135deg, #0055aa, #00d4ff);
  box-shadow: 0 8px 24px rgba(0, 212, 255, 0.25);
}

.cex-frontpage-match .cex-visual-row {
  margin: 12px 0 0;
}

.cex-frontpage-match .cex-visual-row img {
  border-color: rgba(0, 212, 255, 0.15);
  transition: transform 0.25s ease;
}

.cex-frontpage-match .cex-visual-row img:hover {
  transform: scale(1.02);
}

/* Onboard tour */
.cex-onboard[hidden] {
  display: none !important;
}

.cex-onboard {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.cex-onboard-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 8, 18, 0.82);
  backdrop-filter: blur(8px);
}

.cex-onboard-dialog {
  position: relative;
  width: min(560px, 100%);
  max-height: min(88vh, 640px);
  overflow: auto;
  border-radius: 22px;
  border: 1px solid rgba(0, 212, 255, 0.35);
  background:
    linear-gradient(145deg, rgba(10, 16, 32, 0.98), rgba(16, 12, 36, 0.96));
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.55), 0 0 40px rgba(0, 212, 255, 0.12);
}

.cex-onboard-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 22px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.cex-onboard-header h2 {
  margin: 0;
  font-size: 1.15rem;
  color: #b8f0ff;
}

.cex-onboard-step-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 4px;
}

.cex-onboard-close {
  border: none;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.4rem;
  line-height: 1;
}

.cex-onboard-close:hover {
  background: rgba(255, 80, 80, 0.2);
}

.cex-onboard-preview {
  margin: 0 22px 14px;
  border-radius: 14px;
  border: 1px solid rgba(0, 212, 255, 0.25);
  overflow: hidden;
  background: rgba(0, 0, 0, 0.35);
}

.cex-onboard-preview-head {
  padding: 10px 12px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--cex-accent);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(0, 212, 255, 0.08);
}

.cex-onboard-preview-body {
  padding: 12px 14px;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.5;
}

.cex-onboard-body {
  padding: 0 22px 16px;
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.55;
}

.cex-onboard-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 22px 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.cex-onboard-progress {
  flex: 1 1 120px;
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.cex-onboard-progress span {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #0066cc, #00d4ff);
  transition: width 0.35s ease;
}

.cex-onboard-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.cex-onboard-actions button {
  padding: 9px 16px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.82rem;
}

.cex-onboard-actions .cex-onboard-next {
  border: none;
  background: linear-gradient(135deg, #0055aa, #00d4ff);
  color: #fff;
}

.cex-onboard-actions .cex-onboard-jump {
  border-color: rgba(0, 212, 255, 0.4);
  color: #b8f0ff;
}

@media (max-width: 720px) {
  .cex-fp-main.cex-page {
    padding-top: 76px;
  }
  .cex-hub-wrap {
    top: 0;
  }
}
