/*
 * VAULTFI CRYPTO SWITCH V3
 * Complete UI redesign.
 * Backend/API/THORChain/Turnkey logic is intentionally untouched.
 */

:root{
  --csx-ink:#111a33;
  --csx-muted:#66728e;
  --csx-line:rgba(21,31,57,.09);
  --csx-panel:rgba(255,255,255,.86);
  --csx-purple:#7257f5;
  --csx-violet:#9d52f2;
  --csx-cyan:#2bc4e8;
  --csx-pink:#df50c8;
  --csx-green:#20b88a;
  --csx-orange:#ff9a2f;
  --csx-shadow:0 22px 70px rgba(55,69,111,.11);
  --csx-radius:28px;
}

*,
*::before,
*::after{
  box-sizing:border-box;
}

html,
body{
  width:100%;
  max-width:100%;
  margin:0;
  overflow-x:hidden;
}

body.csx-body{
  color:var(--csx-ink);
  background:
    radial-gradient(circle at 5% 10%, rgba(42,199,228,.12), transparent 25%),
    radial-gradient(circle at 88% 18%, rgba(124,87,244,.14), transparent 31%),
    linear-gradient(135deg,#f2f8fb 0%,#f7f6fd 48%,#fff5fb 100%);
  min-height:100vh;
}

.csx-app{
  width:100%;
  min-height:100vh;
}

.csx-main{
  width:100%;
  margin:0;
  padding:20px 22px 108px;
}

.csx-page{
  width:min(100%,1600px);
  margin:0 auto;
  display:grid;
  gap:22px;
}

.csx-hero,
.csx-section,
.csx-engine,
.csx-stats article,
.csx-disclosure{
  border:1px solid rgba(255,255,255,.92);
  box-shadow:var(--csx-shadow);
}

/* HERO */
.csx-hero{
  position:relative;
  min-height:360px;
  overflow:hidden;
  display:grid;
  grid-template-columns:minmax(0,1.3fr) minmax(330px,.7fr);
  align-items:center;
  gap:30px;
  padding:46px 48px;
  border-radius:34px;
  background:
    linear-gradient(120deg,rgba(255,255,255,.94),rgba(249,249,255,.82)),
    linear-gradient(135deg,#fff,#eef9ff);
}

.csx-hero-grid{
  position:absolute;
  inset:0;
  background-image:
    linear-gradient(rgba(75,95,142,.045) 1px,transparent 1px),
    linear-gradient(90deg,rgba(75,95,142,.045) 1px,transparent 1px);
  background-size:42px 42px;
  mask-image:linear-gradient(90deg,#000,transparent 85%);
  pointer-events:none;
}

.csx-hero-glow{
  position:absolute;
  border-radius:50%;
  filter:blur(12px);
  pointer-events:none;
}

.csx-hero-glow-a{
  width:320px;
  height:320px;
  right:-80px;
  top:-120px;
  background:radial-gradient(circle,rgba(114,87,245,.20),rgba(114,87,245,0) 70%);
}

.csx-hero-glow-b{
  width:280px;
  height:280px;
  left:45%;
  bottom:-180px;
  background:radial-gradient(circle,rgba(43,196,232,.18),rgba(43,196,232,0) 70%);
}

.csx-hero-copy,
.csx-master{
  position:relative;
  z-index:2;
  min-width:0;
}

.csx-kicker,
.csx-eyebrow{
  color:#6e5ae7;
  font-size:11px;
  font-weight:900;
  letter-spacing:.18em;
  text-transform:uppercase;
}

.csx-kicker{
  display:flex;
  align-items:center;
  gap:9px;
  margin-bottom:12px;
}

.csx-live-dot{
  width:10px;
  height:10px;
  border-radius:50%;
  background:#c9cfdb;
  box-shadow:0 0 0 6px rgba(185,194,212,.15);
  transition:.25s ease;
}

.csx-live-dot.on{
  background:#25bc8b;
  box-shadow:0 0 0 7px rgba(37,188,139,.14),0 0 24px rgba(37,188,139,.55);
}

.csx-hero h1{
  margin:0;
  color:#121a31;
  font-size:clamp(44px,5vw,78px);
  line-height:.96;
  letter-spacing:-.055em;
}

.csx-hero h1 span{
  background:linear-gradient(90deg,var(--csx-cyan),var(--csx-purple) 55%,var(--csx-pink));
  -webkit-background-clip:text;
  background-clip:text;
  color:transparent;
}

.csx-hero-lead{
  max-width:860px;
  margin:20px 0 0;
  color:#596783;
  font-size:16px;
  line-height:1.72;
}

.csx-hero-tags{
  display:flex;
  flex-wrap:wrap;
  gap:9px;
  margin-top:24px;
}

.csx-hero-tags span{
  padding:9px 13px;
  border:1px solid rgba(111,87,231,.14);
  border-radius:999px;
  background:rgba(255,255,255,.72);
  color:#485777;
  font-size:12px;
  font-weight:800;
}

.csx-api-line{
  display:flex;
  align-items:center;
  gap:10px;
  margin-top:20px;
  color:#76829b;
  font-size:12px;
  font-weight:750;
}

.csx-api-badge{
  padding:5px 9px;
  border-radius:999px;
  background:#fff4db;
  color:#976100;
}

.csx-api-badge.ok{
  background:#def8ed;
  color:#09835d;
}

.csx-api-badge.bad{
  background:#ffe7e7;
  color:#b33c47;
}

.csx-master{
  min-height:270px;
  display:grid;
  place-items:center;
}

.csx-master-orbit{
  position:absolute;
  border:1px solid rgba(111,87,231,.12);
  border-radius:50%;
  animation:csxOrbit 13s linear infinite;
}

.csx-orbit-1{
  width:300px;
  height:300px;
}

.csx-orbit-2{
  width:230px;
  height:230px;
  animation-direction:reverse;
  animation-duration:10s;
}

.csx-master-orbit::before{
  content:"";
  position:absolute;
  width:11px;
  height:11px;
  border-radius:50%;
  top:-6px;
  left:50%;
  background:linear-gradient(135deg,var(--csx-cyan),var(--csx-purple));
  box-shadow:0 0 18px rgba(114,87,245,.45);
}

@keyframes csxOrbit{
  to{transform:rotate(360deg)}
}

.csx-master-card{
  position:relative;
  z-index:2;
  width:min(100%,310px);
  padding:24px;
  border:1px solid rgba(255,255,255,.92);
  border-radius:28px;
  background:rgba(255,255,255,.88);
  box-shadow:0 20px 50px rgba(63,71,113,.13);
  backdrop-filter:blur(18px);
}

.csx-master-top{
  display:flex;
  justify-content:space-between;
  gap:12px;
  align-items:center;
  margin-bottom:20px;
}

.csx-master-top span{
  color:#79859d;
  font-size:10px;
  font-weight:900;
  letter-spacing:.15em;
}

.csx-master-top strong{
  color:#35415f;
  font-size:12px;
}

.csx-switch{
  width:100%;
  border:0;
  padding:0;
  background:transparent;
  display:grid;
  grid-template-columns:auto 1fr;
  align-items:center;
  gap:16px;
  cursor:pointer;
}

.csx-switch:disabled{
  opacity:.55;
  cursor:not-allowed;
}

.csx-switch .vf-cs-toggle-text{
  min-width:38px;
  color:#8993a8;
  font-size:18px;
  font-weight:950;
}

.csx-switch-track{
  position:relative;
  height:58px;
  border-radius:999px;
  background:#edf0f6;
  border:1px solid rgba(34,46,75,.08);
  box-shadow:inset 0 3px 10px rgba(31,42,73,.07);
  transition:.28s ease;
}

.csx-switch-knob{
  position:absolute;
  top:6px;
  left:6px;
  width:46px;
  height:46px;
  border-radius:50%;
  background:white;
  box-shadow:0 8px 20px rgba(29,42,77,.18);
  transition:.28s cubic-bezier(.22,.8,.26,1.2);
}

.csx-switch[aria-checked="true"] .csx-switch-track{
  background:linear-gradient(90deg,var(--csx-cyan),var(--csx-purple),var(--csx-pink));
}

.csx-switch[aria-checked="true"] .csx-switch-knob{
  left:calc(100% - 52px);
}

.csx-switch[aria-checked="true"] .vf-cs-toggle-text{
  color:#6756e8;
}

.csx-master-card p{
  margin:16px 0 0;
  color:#74809a;
  font-size:12px;
  line-height:1.55;
}

/* SECTIONS */
.csx-section{
  width:100%;
  min-width:0;
  padding:30px;
  border-radius:var(--csx-radius);
  background:var(--csx-panel);
  backdrop-filter:blur(18px);
}

.csx-section-head{
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(260px,.65fr);
  gap:28px;
  align-items:end;
  margin-bottom:22px;
}

.csx-section-head-inline{
  align-items:center;
}

.csx-section-head h2,
.csx-engine h2{
  margin:6px 0 0;
  font-size:clamp(25px,3vw,36px);
  letter-spacing:-.035em;
  line-height:1.08;
}

.csx-section-head p,
.csx-engine-head p{
  margin:0;
  color:var(--csx-muted);
  font-size:14px;
  line-height:1.65;
}

/* EXPLAINER */
.csx-explainer{
  background:
    linear-gradient(135deg,rgba(255,255,255,.94),rgba(246,247,255,.92));
}

.csx-steps{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:14px;
}

.csx-step{
  position:relative;
  min-width:0;
  padding:20px;
  border:1px solid rgba(109,89,232,.11);
  border-radius:22px;
  background:rgba(255,255,255,.72);
  overflow:hidden;
  transition:.25s ease;
}

.csx-step:hover{
  transform:translateY(-3px);
  box-shadow:0 16px 32px rgba(80,81,130,.08);
}

.csx-step-no{
  position:absolute;
  right:16px;
  top:14px;
  color:#c8cce0;
  font-size:28px;
  font-weight:950;
}

.csx-step-icon{
  width:42px;
  height:42px;
  display:grid;
  place-items:center;
  border-radius:14px;
  background:linear-gradient(135deg,#ddf7ff,#eee8ff);
  color:#6956eb;
  font-size:20px;
  font-weight:900;
}

.csx-step h3{
  margin:18px 0 8px;
  font-size:16px;
}

.csx-step p{
  margin:0;
  color:var(--csx-muted);
  font-size:13px;
  line-height:1.55;
}

/* SELECTION */
.csx-selected{
  justify-self:end;
  text-align:right;
}

.csx-selected small{
  display:block;
  color:#8a94a8;
  font-size:11px;
}

.csx-selected strong{
  color:#5848d7;
  font-size:18px;
}

.csx-pairs{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:14px;
}

.csx-pair{
  position:relative;
  width:100%;
  min-width:0;
  min-height:110px;
  padding:18px;
  display:flex;
  align-items:center;
  gap:14px;
  border:1px solid rgba(33,45,77,.09);
  border-radius:22px;
  background:#fff;
  color:var(--csx-ink);
  text-align:left;
  cursor:pointer;
  transition:.25s ease;
  overflow:hidden;
}

.csx-pair::before{
  content:"";
  position:absolute;
  inset:0;
  opacity:0;
  background:linear-gradient(125deg,rgba(43,196,232,.08),rgba(114,87,245,.10),rgba(223,80,200,.06));
  transition:.25s ease;
}

.csx-pair:hover{
  transform:translateY(-2px);
  border-color:rgba(114,87,245,.24);
}

.csx-pair[aria-checked="true"]{
  border-color:rgba(114,87,245,.52);
  box-shadow:0 12px 30px rgba(114,87,245,.10);
}

.csx-pair[aria-checked="true"]::before{
  opacity:1;
}

.csx-coin,
.csx-dual,
.csx-pair-copy,
.csx-pair-check{
  position:relative;
  z-index:1;
}

.csx-coin{
  width:48px;
  height:48px;
  flex:0 0 48px;
  display:grid;
  place-items:center;
  border-radius:16px;
  color:#fff;
  font-size:21px;
  font-weight:950;
  box-shadow:0 10px 24px rgba(33,45,77,.12);
}

.csx-coin.btc{background:linear-gradient(145deg,#ffb13b,#ff8b16)}
.csx-coin.eth{background:linear-gradient(145deg,#7190ff,#5963dc)}
.csx-coin.usdt{background:linear-gradient(145deg,#30c8a2,#159c82)}
.csx-coin.mini{
  width:37px;
  height:37px;
  flex-basis:37px;
  border-radius:13px;
  font-size:16px;
}

.csx-dual{
  width:58px;
  flex:0 0 58px;
  display:flex;
  align-items:center;
}

.csx-dual .csx-coin + .csx-coin{
  margin-left:-14px;
}

.csx-pair-copy{
  min-width:0;
  flex:1;
}

.csx-pair-copy strong{
  display:block;
  font-size:15px;
}

.csx-pair-copy small{
  display:block;
  margin-top:5px;
  color:#7c879e;
  font-size:12px;
}

.csx-pair-check{
  width:27px;
  height:27px;
  display:grid;
  place-items:center;
  border-radius:50%;
  background:#eef1f6;
  color:#a8b0c0;
  font-size:13px;
  font-weight:950;
}

.csx-pair[aria-checked="true"] .csx-pair-check{
  background:linear-gradient(135deg,var(--csx-cyan),var(--csx-purple));
  color:white;
}

.csx-lock-row{
  display:grid;
  grid-template-columns:auto minmax(0,1fr) auto;
  gap:14px;
  align-items:center;
  margin-top:16px;
  padding:16px;
  border-radius:20px;
  background:linear-gradient(135deg,rgba(114,87,245,.075),rgba(43,196,232,.07));
  border:1px solid rgba(114,87,245,.10);
}

.csx-lock-icon{
  width:44px;
  height:44px;
  display:grid;
  place-items:center;
  border-radius:14px;
  background:white;
  color:#6655e6;
  font-size:20px;
  font-weight:900;
}

.csx-lock-copy{
  min-width:0;
}

.csx-lock-copy strong{
  font-size:14px;
}

.csx-lock-copy p{
  margin:5px 0 0;
  color:#687590;
  font-size:12px;
  line-height:1.5;
}

/* BUTTONS */
.csx-btn{
  min-height:44px;
  padding:0 18px;
  border-radius:14px;
  font-weight:850;
  font-size:13px;
  cursor:pointer;
  transition:.2s ease;
}

.csx-btn:disabled{
  opacity:.5;
  cursor:not-allowed;
}

.csx-btn-primary{
  border:0;
  color:#fff;
  background:linear-gradient(90deg,var(--csx-cyan),var(--csx-purple),var(--csx-pink));
  box-shadow:0 10px 24px rgba(114,87,245,.18);
}

.csx-btn-secondary{
  border:1px solid rgba(31,42,71,.10);
  color:#3f4b68;
  background:#fff;
}

.csx-btn:not(:disabled):hover{
  transform:translateY(-1px);
}

/* ENGINE */
.csx-engine{
  width:100%;
  min-width:0;
  display:grid;
  grid-template-columns:minmax(0,1fr) 340px;
  gap:0;
  overflow:hidden;
  border-radius:30px;
  background:rgba(255,255,255,.88);
}

.csx-engine-main{
  min-width:0;
  padding:28px;
}

.csx-engine-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:20px;
  margin-bottom:18px;
}

.csx-tabs{
  flex:0 0 auto;
  padding:4px;
  display:flex;
  gap:4px;
  border-radius:14px;
  background:#f0f2f7;
}

.csx-tabs button{
  min-width:58px;
  height:36px;
  border:0;
  border-radius:10px;
  background:transparent;
  color:#7b859a;
  font-weight:850;
  cursor:pointer;
}

.csx-tabs button.active{
  color:#5e4bdf;
  background:#fff;
  box-shadow:0 4px 12px rgba(51,61,92,.09);
}

.csx-chart-wrap{
  position:relative;
  width:100%;
  min-width:0;
  height:410px;
  overflow:hidden;
  border-radius:24px;
  border:1px solid rgba(28,40,70,.08);
  background:
    radial-gradient(circle at 80% 20%,rgba(114,87,245,.09),transparent 30%),
    linear-gradient(180deg,#fbfdff,#f6f8fd);
}

.csx-chart-top{
  position:absolute;
  z-index:3;
  top:18px;
  left:20px;
  right:20px;
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:14px;
}

.csx-chart-top > div{
  display:flex;
  align-items:baseline;
  gap:10px;
}

.csx-chart-top strong{
  font-size:14px;
}

.csx-chart-top span{
  color:#26375d;
  font-size:17px;
  font-weight:900;
}

.csx-chart-top small{
  color:#8290aa;
  font-size:11px;
}

.csx-chart{
  position:absolute;
  inset:58px 0 0;
  width:100%;
  height:calc(100% - 58px);
}

.csx-chart-grid line{
  stroke:rgba(78,95,130,.08);
  stroke-width:1;
}

.csx-chart-area{
  fill:url(#csxChartFill);
  opacity:0;
  transition:opacity .3s ease;
}

.csx-chart-line{
  fill:none;
  stroke:url(#csxChartStroke);
  stroke-width:4;
  vector-effect:non-scaling-stroke;
  opacity:0;
  filter:drop-shadow(0 4px 8px rgba(101,88,235,.18));
  transition:opacity .3s ease;
}

.csx-chart-point{
  fill:#fff;
  stroke:#7459f5;
  stroke-width:4;
  vector-effect:non-scaling-stroke;
  opacity:0;
}

.csx-chart-wrap.has-data .csx-chart-area,
.csx-chart-wrap.has-data .csx-chart-line,
.csx-chart-wrap.has-data .csx-chart-point{
  opacity:1;
}

.csx-chart-empty{
  position:absolute;
  z-index:2;
  inset:72px 20px 18px;
  display:grid;
  place-content:center;
  text-align:center;
  color:#67748e;
}

.csx-chart-empty strong{
  font-size:14px;
}

.csx-chart-empty small{
  margin-top:6px;
  font-size:12px;
}

.csx-chart-wrap.has-data .csx-chart-empty{
  display:none;
}

.csx-scan{
  position:absolute;
  top:62px;
  bottom:0;
  width:1px;
  left:0;
  background:linear-gradient(180deg,transparent,rgba(114,87,245,.28),transparent);
  box-shadow:0 0 20px rgba(114,87,245,.25);
  animation:csxScan 7s linear infinite;
  pointer-events:none;
}

@keyframes csxScan{
  0%{left:0;opacity:0}
  12%{opacity:1}
  88%{opacity:1}
  100%{left:100%;opacity:0}
}

.csx-signal{
  min-width:0;
  padding:28px;
  background:
    radial-gradient(circle at 100% 0,rgba(78,198,232,.14),transparent 30%),
    linear-gradient(160deg,#16224a,#111936 70%);
  color:#fff;
}

.csx-signal-orb{
  width:66px;
  height:66px;
  margin-bottom:20px;
  display:grid;
  place-items:center;
  border-radius:50%;
  background:conic-gradient(var(--csx-cyan),var(--csx-purple),var(--csx-pink),var(--csx-cyan));
  animation:csxSpin 4s linear infinite;
}

.csx-signal-orb::before{
  content:"";
  width:52px;
  height:52px;
  border-radius:50%;
  background:#172248;
}

.csx-signal-orb span{
  position:absolute;
  width:12px;
  height:12px;
  border-radius:50%;
  background:#fff;
  box-shadow:0 0 20px #fff;
}

@keyframes csxSpin{to{transform:rotate(360deg)}}

.csx-signal > small{
  color:#9da8c7;
  font-size:10px;
  font-weight:850;
  letter-spacing:.14em;
}

.csx-signal > strong{
  display:block;
  margin-top:8px;
  font-size:21px;
  line-height:1.25;
}

.csx-signal > p{
  margin:8px 0 20px;
  color:#aeb7d0;
  font-size:13px;
  line-height:1.55;
}

.csx-signal-metrics{
  display:grid;
  gap:9px;
}

.csx-signal-metrics div{
  min-width:0;
  display:flex;
  justify-content:space-between;
  gap:16px;
  padding:12px 13px;
  border:1px solid rgba(255,255,255,.08);
  border-radius:13px;
  background:rgba(255,255,255,.045);
}

.csx-signal-metrics span{
  color:#aab3ca;
  font-size:11px;
}

.csx-signal-metrics strong{
  text-align:right;
  font-size:12px;
}

.csx-monitor-status{
  margin-top:18px;
  display:flex;
  align-items:center;
  gap:8px;
  color:#b7c3dd;
  font-size:11px;
}

.csx-monitor-status span{
  width:8px;
  height:8px;
  border-radius:50%;
  background:#2bc494;
  box-shadow:0 0 14px rgba(43,196,148,.75);
}

/* STATS */
.csx-stats{
  width:100%;
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:14px;
}

.csx-stats article{
  min-width:0;
  padding:22px;
  border-radius:22px;
  background:rgba(255,255,255,.88);
}

.csx-stat-icon{
  width:38px;
  height:38px;
  display:grid;
  place-items:center;
  margin-bottom:14px;
  border-radius:12px;
  background:linear-gradient(135deg,#e7f9ff,#eee9ff);
  color:#6756e8;
  font-weight:900;
}

.csx-stats small{
  display:block;
  color:#75819a;
  font-size:11px;
}

.csx-stats strong{
  display:block;
  margin-top:5px;
  font-size:23px;
  letter-spacing:-.025em;
}

.csx-stats p{
  margin:5px 0 0;
  color:#8a94a8;
  font-size:11px;
}

/* SLEEVES */
.csx-sleeves{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:16px;
}

.csx-sleeve{
  min-width:0;
  padding:20px;
  border:1px solid rgba(33,45,77,.08);
  border-radius:22px;
  background:#fff;
}

.csx-sleeve-head{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:14px;
}

.csx-sleeve-name{
  min-width:0;
  display:flex;
  align-items:center;
  gap:12px;
}

.csx-sleeve-name strong{
  display:block;
  font-size:15px;
}

.csx-sleeve-name small{
  display:block;
  margin-top:3px;
  color:#818ba0;
  font-size:11px;
}

.csx-state-chip{
  flex:0 0 auto;
  padding:6px 9px;
  border-radius:999px;
  background:#eef1f5;
  color:#77839a;
  font-size:10px;
  font-weight:900;
}

.csx-state-chip.active{
  background:#def8ed;
  color:#07835d;
}

.csx-state-chip.protected{
  background:#e9e5ff;
  color:#624dd7;
}

.csx-sleeve-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px;
  margin-top:16px;
}

.csx-sleeve-grid div{
  min-width:0;
  padding:13px;
  border-radius:14px;
  background:#f6f8fb;
}

.csx-sleeve-grid span{
  display:block;
  color:#8590a5;
  font-size:10px;
}

.csx-sleeve-grid strong{
  display:block;
  margin-top:4px;
  overflow-wrap:anywhere;
  font-size:12px;
}

/* RECORDS */
.csx-table-wrap{
  width:100%;
  min-width:0;
  overflow-x:auto;
  -webkit-overflow-scrolling:touch;
  border:1px solid rgba(33,45,77,.08);
  border-radius:18px;
  background:#fff;
}

.csx-table{
  width:100%;
  min-width:920px;
  border-collapse:collapse;
}

.csx-table th,
.csx-table td{
  padding:14px 16px;
  border-bottom:1px solid rgba(33,45,77,.07);
  text-align:left;
  vertical-align:top;
  color:#596783;
  font-size:11px;
  line-height:1.45;
}

.csx-table th{
  background:#f7f8fb;
  color:#7a859b;
  font-size:10px;
  font-weight:900;
  letter-spacing:.04em;
  text-transform:uppercase;
}

.csx-table td strong{
  color:#202c49;
}

.vf-cs-record-status{
  display:inline-block;
  padding:4px 7px;
  border-radius:999px;
  background:#e3f8ef;
  color:#087f5b;
  font-weight:850;
}

.vf-cs-empty-row td{
  padding:28px;
  text-align:center;
  color:#98a0b2;
}

/* DISCLOSURE */
.csx-disclosure{
  display:flex;
  gap:14px;
  align-items:flex-start;
  padding:18px 20px;
  border-radius:20px;
  background:rgba(255,251,242,.88);
}

.csx-disclosure > span{
  width:34px;
  height:34px;
  flex:0 0 34px;
  display:grid;
  place-items:center;
  border-radius:50%;
  background:#fff2cc;
  color:#a77200;
  font-weight:900;
}

.csx-disclosure strong{
  font-size:13px;
}

.csx-disclosure p{
  margin:4px 0 0;
  color:#766e60;
  font-size:12px;
  line-height:1.55;
}

/* TOAST + MODAL */
.csx-toast{
  position:fixed;
  z-index:10020;
  right:18px;
  bottom:18px;
  max-width:min(420px,calc(100vw - 36px));
  padding:13px 16px;
  border-radius:14px;
  background:#17203c;
  color:#fff;
  box-shadow:0 16px 42px rgba(23,32,60,.24);
  opacity:0;
  transform:translateY(12px);
  pointer-events:none;
  transition:.22s ease;
  font-size:12px;
  font-weight:750;
}

.csx-toast.show{
  opacity:1;
  transform:translateY(0);
}

.csx-toast.bad{
  background:#9f3542;
}

.csx-modal-backdrop{
  position:fixed;
  z-index:10030;
  inset:0;
  padding:20px;
  display:grid;
  place-items:center;
  background:rgba(12,20,40,.45);
  backdrop-filter:blur(10px);
}

.csx-modal-backdrop[hidden]{
  display:none;
}

.csx-modal{
  position:relative;
  width:min(100%,560px);
  padding:28px;
  border-radius:26px;
  background:#fff;
  box-shadow:0 28px 80px rgba(24,34,64,.24);
}

.csx-modal h2{
  margin:8px 0 10px;
  font-size:26px;
  letter-spacing:-.025em;
}

.csx-modal p{
  color:#66728c;
  font-size:13px;
  line-height:1.6;
}

.csx-modal small{
  display:block;
  margin-top:14px;
  color:#8a93a6;
  font-size:11px;
}

.csx-modal-x{
  position:absolute;
  top:15px;
  right:15px;
  width:36px;
  height:36px;
  border:0;
  border-radius:12px;
  background:#f1f3f7;
  color:#626d84;
  font-size:22px;
  cursor:pointer;
}

.csx-modal-actions{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
  margin-top:18px;
}

/* TABLET */
@media(max-width:1100px){
  .csx-hero{
    grid-template-columns:minmax(0,1fr) 320px;
    padding:38px 34px;
  }

  .csx-steps{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }

  .csx-engine{
    grid-template-columns:minmax(0,1fr) 310px;
  }

  .csx-stats{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}

/* MOBILE */
@media(max-width:930px){
  .csx-main{
    width:100%;
    padding:12px 10px calc(96px + env(safe-area-inset-bottom,0px));
  }

  .csx-page{
    width:100%;
    max-width:100%;
    gap:14px;
  }

  .csx-hero{
    min-height:0;
    grid-template-columns:minmax(0,1fr);
    gap:18px;
    padding:22px 18px;
    border-radius:24px;
  }

  .csx-hero h1{
    font-size:44px;
  }

  .csx-hero-lead{
    font-size:14px;
    line-height:1.65;
  }

  .csx-master{
    min-height:220px;
  }

  .csx-master-card{
    width:min(100%,360px);
  }

  .csx-orbit-1{
    width:240px;
    height:240px;
  }

  .csx-orbit-2{
    width:180px;
    height:180px;
  }

  .csx-section{
    padding:20px 16px;
    border-radius:22px;
  }

  .csx-section-head{
    grid-template-columns:minmax(0,1fr);
    gap:8px;
    margin-bottom:16px;
  }

  .csx-section-head p{
    font-size:13px;
  }

  .csx-selected{
    justify-self:start;
    text-align:left;
  }

  .csx-steps,
  .csx-pairs,
  .csx-sleeves,
  .csx-stats{
    grid-template-columns:minmax(0,1fr);
  }

  .csx-pair{
    min-height:92px;
    padding:15px;
  }

  .csx-lock-row{
    grid-template-columns:auto minmax(0,1fr);
  }

  .csx-lock-row .csx-btn{
    grid-column:1/-1;
    width:100%;
  }

  .csx-engine{
    grid-template-columns:minmax(0,1fr);
    border-radius:22px;
  }

  .csx-engine-main{
    min-width:0;
    padding:18px 14px;
  }

  .csx-engine-head{
    align-items:flex-start;
    flex-direction:column;
  }

  .csx-tabs{
    width:100%;
  }

  .csx-tabs button{
    flex:1;
  }

  .csx-chart-wrap{
    width:100%;
    min-width:0;
    height:320px;
    border-radius:18px;
  }

  .csx-chart-top{
    left:14px;
    right:14px;
    flex-direction:column;
    gap:3px;
  }

  .csx-chart-top > div{
    flex-wrap:wrap;
  }

  .csx-chart{
    inset:80px 0 0;
    height:calc(100% - 80px);
  }

  .csx-chart-empty{
    inset:94px 14px 14px;
  }

  .csx-signal{
    padding:22px 18px;
  }

  .csx-sleeve-grid{
    grid-template-columns:minmax(0,1fr);
  }

  .csx-table-wrap{
    max-width:100%;
    overflow-x:auto;
  }

  .csx-table{
    width:max-content;
    min-width:860px;
  }

  .csx-modal-actions{
    grid-template-columns:minmax(0,1fr);
  }

  .csx-toast{
    right:10px;
    bottom:90px;
    max-width:calc(100vw - 20px);
  }
}

/* SMALL MOBILE */
@media(max-width:520px){
  .csx-main{
    padding-left:8px;
    padding-right:8px;
  }

  .csx-hero{
    padding:20px 15px;
  }

  .csx-hero h1{
    font-size:39px;
  }

  .csx-hero-tags{
    gap:7px;
  }

  .csx-hero-tags span{
    padding:8px 10px;
    font-size:10px;
  }

  .csx-section{
    padding:18px 14px;
  }

  .csx-section-head h2,
  .csx-engine h2{
    font-size:24px;
  }

  .csx-step{
    padding:17px;
  }

  .csx-master-card{
    padding:20px;
  }

  .csx-signal-metrics div{
    gap:8px;
  }
}

/* Respect reduced-motion accessibility. */
@media(prefers-reduced-motion:reduce){
  .csx-master-orbit,
  .csx-signal-orb,
  .csx-scan{
    animation:none !important;
  }

  *{
    scroll-behavior:auto !important;
  }
}

