/* CCX auth: Twilio form structure + navy/gold skin */
:root{
  --ex-navy:#071A2F;
  --ex-bg:#061421;
  --ex-card:#0C1F33;
  --ex-gold:#C9A24A;
  --ex-gold-2:#E2C87A;
  --ex-gold-d:#9A7428;
  --ex-text:#F4F7FB;
  --ex-muted:#8FA0B5;
  --ex-input-border:rgba(143,160,181,.35);
  --ex-danger:#ff8e8e;
  --ex-human-ok:#22a06b;
  --ex-font:var(--ccx-font-family,system-ui,-apple-system,"PingFang TC","Noto Sans TC","Microsoft JhengHei",sans-serif);
  --ex-display:var(--ccx-font-family,system-ui,-apple-system,"PingFang TC","Noto Sans TC","Microsoft JhengHei",sans-serif);
}
*{box-sizing:border-box}
html,body{margin:0;min-height:100%}
body.ex-body{
  min-height:100vh;
  min-height:100svh;font-family:var(--ex-font);color:var(--ex-text);
  background:var(--ex-bg);
  display:flex;flex-direction:column;
}
.ex-page{
  flex:1;
  min-height:0;
  display:grid;
  grid-template-columns:minmax(0,1.15fr) minmax(380px,.85fr);
}
.ex-view[hidden]{display:none!important}

/* —— Left brand —— */
.ex-hero{
  position:relative;overflow:hidden;
  padding:36px 48px 28px;
  display:flex;flex-direction:column;
  background:
    radial-gradient(ellipse 70% 50% at 18% 20%,rgba(201,162,74,.1),transparent 60%),
    radial-gradient(ellipse 55% 45% at 78% 70%,rgba(40,90,140,.16),transparent 55%),
    linear-gradient(160deg,#050E1A 0%,#071A2F 45%,#0A2038 100%);
}
.ex-hero:before{
  content:"";position:absolute;inset:0;pointer-events:none;opacity:.12;
  background-image:
    linear-gradient(rgba(255,255,255,.06) 1px,transparent 1px),
    linear-gradient(90deg,rgba(255,255,255,.06) 1px,transparent 1px);
  background-size:56px 56px;
  mask-image:radial-gradient(ellipse at 30% 40%,#000 10%,transparent 70%);
}
.ex-hero:after{
  content:"";position:absolute;inset:8% 5% 20% 0;pointer-events:none;opacity:.07;
  background:
    radial-gradient(circle at 20% 40%,transparent 38%,rgba(201,162,74,.35) 39%,transparent 40%),
    radial-gradient(circle at 55% 55%,transparent 28%,rgba(201,162,74,.25) 29%,transparent 30%),
    radial-gradient(circle at 75% 30%,transparent 22%,rgba(201,162,74,.2) 23%,transparent 24%);
}
.ex-hero-brand{position:relative;z-index:1;display:flex;align-items:center;gap:12px;margin-bottom:48px}
.ex-hero-brand img.ccx-site-logo-img{width:248px;height:58px;object-fit:contain;object-position:left center}
.ex-hero-brand strong{display:block;font-family:var(--ex-display);font-size:20px;color:var(--ex-gold-2);letter-spacing:.04em;line-height:1.15}
.ex-hero-brand .ccx-brand-copy strong{color:#E6C15A}
.ex-hero-brand .ccx-brand-copy small{color:#C9A24A}
.ex-hero-copy{position:relative;z-index:1;max-width:520px;margin-bottom:28px}
.ex-hero-copy h1{
  margin:0 0 14px;font-family:var(--ex-display);
  font-size:clamp(32px,3.4vw,46px);line-height:1.2;font-weight:700;color:#fff;
}
.ex-hero-copy em{font-style:normal;color:var(--ex-gold-2)}
.ex-hero-copy p{margin:0;color:var(--ex-muted);font-size:15px;line-height:1.7;max-width:460px}

.ex-feature-row{
  position:relative;z-index:1;
  display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;
  margin-bottom:auto;
}
.ex-feature{
  display:flex;gap:10px;align-items:flex-start;
  padding:14px 12px;border-radius:10px;
  border:1px solid rgba(201,162,74,.22);
  background:rgba(0,0,0,.22);
}
.ex-feature i{
  width:28px;height:28px;flex:0 0 auto;border-radius:6px;
  background:rgba(201,162,74,.1) no-repeat center/16px;
  border:1px solid rgba(201,162,74,.28);
}
.ex-feature .i-globe{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='%23C9A24A' stroke-width='1.8' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M3 12h18M12 3a14 14 0 0 1 0 18M12 3a14 14 0 0 0 0 18'/%3E%3C/svg%3E")}
.ex-feature .i-shield{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='%23C9A24A' stroke-width='1.8' viewBox='0 0 24 24'%3E%3Cpath d='M12 3 5 6v6c0 5 3.5 8.5 7 9 3.5-.5 7-4 7-9V6l-7-3z'/%3E%3C/svg%3E")}
.ex-feature .i-chart{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='%23C9A24A' stroke-width='1.8' viewBox='0 0 24 24'%3E%3Cpath d='M4 19V9M10 19V5M16 19v-7M22 19H2'/%3E%3C/svg%3E")}
.ex-feature strong{display:block;font-size:13px;color:#fff;margin-bottom:3px;font-weight:700}
.ex-feature span{display:block;font-size:11px;color:var(--ex-muted);line-height:1.4}

.ex-curve{position:relative;z-index:1;margin:28px 0 18px;height:160px}
.ex-curve svg{width:100%;height:100%;display:block}
.ex-curve-grid path{fill:none;stroke:rgba(255,255,255,.05);stroke-width:1}
.ex-curve-tip{
  filter:drop-shadow(0 0 6px rgba(245,224,160,.85));
  transition:r .2s ease;
}
.ex-curve.is-drawing .ex-curve-tip{r:5}
.ex-stats{
  position:relative;z-index:1;
  list-style:none;margin:0;padding:0 0 8px;
  display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;
}
.ex-stats li{min-width:0}
.ex-stats b{
  display:block;font-family:var(--ex-display);font-size:20px;color:var(--ex-gold-2);
  letter-spacing:.02em;font-variant-numeric:tabular-nums;font-feature-settings:"tnum";
  min-height:1.2em;
}
.ex-stats span{display:block;margin-top:4px;font-size:11px;color:var(--ex-muted);line-height:1.35}

/* —— Right form —— */
.ex-auth{
  position:relative;
  background:linear-gradient(180deg,#081828 0%,#061421 100%);
  border-left:1px solid rgba(201,162,74,.12);
  display:flex;flex-direction:column;align-items:center;justify-content:center;
  padding:48px 36px 40px;overflow:auto;
  overscroll-behavior:contain;-webkit-overflow-scrolling:touch;
}
.ex-auth-top{
  position:absolute;top:16px;left:20px;right:20px;
  display:flex;align-items:center;justify-content:space-between;gap:12px;
  z-index:3;
}
.ex-auth-brand{
  display:inline-flex;
  align-items:center;
  flex:0 0 auto;
  pointer-events:none;
}
.ex-auth-brand.ccx-brand-lockup{
  pointer-events:none;
}
.ex-hero-brand .ccx-brand-mark{
  width:48px;
  height:46px;
}
.ex-auth-top-tools{
  display:flex;
  align-items:center;
  gap:10px;
  margin-left:auto;
}
.ex-home-btn{
  position:static;
  display:inline-flex;align-items:center;gap:4px;
  padding:8px 12px 8px 6px;
  border:1px solid rgba(255,255,255,.14);border-radius:8px;
  background:rgba(255,255,255,.04);color:#E8EEF6;
  font-size:13px;font-weight:600;text-decoration:none;line-height:1;
}
.ex-home-btn:hover{border-color:rgba(201,162,74,.45);color:var(--ex-gold-2)}
.ex-lang-slot{display:flex;align-items:center;justify-content:flex-end;min-height:36px}
.ex-lang-slot .ccx-language-switcher{position:relative;top:auto;right:auto;left:auto;bottom:auto}
html.ccx-locale-switching{cursor:progress}
html.ccx-locale-switching body{pointer-events:none}
html.ccx-locale-switching .ccx-language-switcher{pointer-events:auto}

.ex-card{
  width:min(400px,100%);
  margin-top:28px;
  padding:32px 28px 28px;
  border-radius:14px;
  border:1px solid rgba(201,162,74,.28);
  background:linear-gradient(180deg,rgba(12,31,51,.96),rgba(8,24,40,.98));
  box-shadow:0 18px 48px rgba(0,0,0,.35);
}
.ex-card h2{margin:0 0 8px;text-align:left;font-size:28px;font-weight:700;color:#fff;letter-spacing:.01em}
.ex-tagline{margin:0 0 22px;text-align:left;color:var(--ex-muted);font-size:13px;line-height:1.55}
.ex-tagline strong{color:var(--ex-gold-2);font-weight:600}

.ex-field{display:block;margin-bottom:12px}
.ex-field input,.ex-password input{
  width:100%;min-height:48px;padding:0 14px;
  border:1px solid var(--ex-input-border);border-radius:8px;
  background:rgba(0,0,0,.28);color:var(--ex-text);
  font:inherit;font-size:14px;outline:none;
  transition:border-color .15s,box-shadow .15s;
}
.ex-field input::placeholder,.ex-password input::placeholder{color:#6d7d91}
.ex-field input:focus,.ex-password input:focus{
  border-color:var(--ex-gold);
  box-shadow:0 0 0 3px rgba(201,162,74,.14);
}
.ex-password{position:relative}
.ex-password input{padding-right:46px}
.ex-eye{
  position:absolute;right:6px;top:50%;transform:translateY(-50%);
  width:34px;height:34px;border:0;border-radius:6px;cursor:pointer;background:transparent;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='%238FA0B5' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='M1 12s4-7 11-7 11 7 11 7-4 7-11 7S1 12 1 12z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E");
  background-repeat:no-repeat;background-position:center;background-size:18px;
}

/* Human verify — default NEVER green */
.ex-human{
  width:100%;
  min-height:64px;
  margin:4px 0 14px;
  padding:0 16px;
  display:flex;align-items:center;gap:14px;
  border:1px solid var(--ex-input-border);
  border-radius:8px;
  background:rgba(255,255,255,.04);
  color:#D7DEE8;
  font:inherit;font-size:14px;font-weight:500;
  text-align:left;cursor:pointer;
  transition:border-color .15s,background .15s,color .15s;
}
.ex-human:hover{border-color:rgba(201,162,74,.4)}
.ex-human-box{
  width:20px;height:20px;flex:0 0 auto;
  border:2px solid #A8B6C8;
  border-radius:3px;
  background:transparent;
}
.ex-human-text{line-height:1.3}

/* Success state only after user click */
.ex-human.is-verified{
  border-color:rgba(34,160,107,.55);
  background:rgba(34,160,107,.08);
  color:#E8F8F0;
}
.ex-human.is-verified .ex-human-box{
  border-color:var(--ex-human-ok);
  background:var(--ex-human-ok);
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 13l4 4L19 7'/%3E%3C/svg%3E");
  background-repeat:no-repeat;background-position:center;background-size:14px;
}
.ex-human.is-busy{opacity:.75;cursor:wait}
.ex-human.is-busy .ex-human-text::after{content:""; }

.ex-agree{
  display:flex;align-items:flex-start;gap:10px;
  margin:0 0 12px;font-size:12px;line-height:1.5;color:var(--ex-muted);cursor:pointer;
}
.ex-agree input{
  width:16px;height:16px;flex:0 0 auto;margin-top:2px;
  accent-color:var(--ex-gold);cursor:pointer;
}
.ex-agree a{color:var(--ex-gold);text-decoration:none;font-weight:600}
.ex-agree a:hover{text-decoration:underline}

.ex-error{min-height:18px;margin:0 0 10px;color:var(--ex-danger);font-size:13px}
.ex-btn-gold{
  width:100%;min-height:48px;border:0;border-radius:8px;cursor:pointer;
  font:inherit;font-size:15px;font-weight:700;color:#071A2F;
  background:linear-gradient(180deg,#E2C87A 0%,#C9A24A 55%,#A8842E 100%);
  box-shadow:0 8px 18px rgba(201,162,74,.22);
  transition:filter .15s,opacity .15s;
}
.ex-btn-gold:hover{filter:brightness(1.04)}
.ex-btn-gold:disabled,.ex-btn-gold[aria-busy="true"]{opacity:.72;cursor:wait}
.ex-btn-ghost{
  width:100%;min-height:44px;margin-top:10px;border-radius:8px;cursor:pointer;
  border:1px solid rgba(201,162,74,.4);background:transparent;color:var(--ex-gold-2);
  font:inherit;font-size:14px;font-weight:600;
}
.ex-switch{margin:18px 0 0;text-align:center;color:var(--ex-muted);font-size:14px}
.ex-switch button{border:0;background:none;color:var(--ex-gold);font:inherit;font-weight:700;cursor:pointer;padding:0}
.ex-forgot-row{margin:-4px 0 10px;text-align:right}
.ex-forgot{
  border:0;background:none;padding:0;cursor:pointer;
  color:var(--ex-gold);font:inherit;font-size:13px;font-weight:600;
}
.ex-forgot:hover{text-decoration:underline}

/* Login page figure 2 */
.ex-login-promo{
  width:min(920px,100%);
  margin:28px auto 0;
  padding:0 4px 8px;
}
.ex-promo-cards{
  display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;
}
.ex-promo-cards article{
  display:flex;gap:12px;align-items:flex-start;
  padding:14px 14px;border-radius:10px;
  border:1px solid rgba(201,162,74,.22);
  background:rgba(0,0,0,.22);
}
.ex-promo-cards i{
  width:34px;height:34px;flex:0 0 auto;border-radius:8px;
  border:1px solid rgba(201,162,74,.35);
  background:rgba(201,162,74,.12) no-repeat center/18px;
}
.ex-promo-cards .i-globe{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='%23C9A24A' stroke-width='1.8' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M3 12h18M12 3a14 14 0 0 1 0 18M12 3a14 14 0 0 0 0 18'/%3E%3C/svg%3E")}
.ex-promo-cards .i-bolt{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='%23C9A24A' stroke-width='1.8' viewBox='0 0 24 24'%3E%3Cpath d='M13 2 4 14h7l-1 8 10-14h-7l1-6z'/%3E%3C/svg%3E")}
.ex-promo-cards .i-safe{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='%23C9A24A' stroke-width='1.8' viewBox='0 0 24 24'%3E%3Cpath d='M12 3 5 6v6c0 5 3.5 8.5 7 9 3.5-.5 7-4 7-9V6l-7-3z'/%3E%3Cpath d='M9.5 12.5h5M12 10v5'/%3E%3C/svg%3E")}
.ex-promo-cards strong{display:block;font-size:14px;color:#fff;margin-bottom:4px;font-weight:700}
.ex-promo-cards span{display:block;font-size:12px;color:#A8B6C8;line-height:1.45}
.ex-promo-links{
  margin:18px 0 8px;display:flex;flex-wrap:wrap;justify-content:center;gap:6px 0;
  font-size:12px;
}
.ex-promo-links a{
  color:#8FA0B5;text-decoration:none;padding:0 10px;
  border-right:1px solid rgba(255,255,255,.14);
}
.ex-promo-links a:last-child{border-right:0}
.ex-promo-links a:hover{color:var(--ex-gold)}
.ex-promo-copy{margin:0;text-align:center;font-size:12px;color:#6d7d91}

.ex-dialog{
  border:0;padding:0;border-radius:14px;width:min(400px,calc(100vw - 32px));
  max-height:min(88vh,640px);max-height:min(88dvh,640px);
  overflow:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;
  background:#0d243c;color:var(--ex-text);box-shadow:0 24px 60px rgba(0,0,0,.55);
}
.ex-dialog::backdrop{background:rgba(2,8,18,.7)}
.ex-dialog-body{padding:22px}
.ex-dialog-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:8px}
.ex-dialog-head h2{margin:0;font-size:20px;color:#fff}
.ex-dialog-close{
  width:32px;height:32px;border:0;border-radius:8px;cursor:pointer;
  background:rgba(255,255,255,.06);color:#A8B6C8;font-size:20px;line-height:1;
}
.ex-dialog-close:hover{color:#fff;background:rgba(255,255,255,.1)}
.ex-dialog-desc{margin:0 0 14px;color:var(--ex-muted);font-size:13px;line-height:1.5}
.ex-dialog-desc strong{color:var(--ex-gold-2)}
.ex-reset-step[hidden]{display:none!important}
.ex-reset-ok{color:#3dd68c!important}
.ex-reset-success{
  margin:8px 0 10px;text-align:center;font-size:22px;font-weight:700;color:#3dd68c;
}

.ex-or{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:12px;margin:18px 0 12px;color:var(--ex-muted);font-size:12px}
.ex-or:before,.ex-or:after{content:"";height:1px;background:rgba(255,255,255,.1)}
.ex-social{display:grid;gap:8px}
.ex-social-btn{
  display:flex;align-items:center;justify-content:center;gap:10px;min-height:44px;
  border:1px solid rgba(255,255,255,.12);border-radius:8px;background:rgba(255,255,255,.03);
  color:#fff;font:inherit;font-size:14px;font-weight:600;cursor:pointer;
}
.ex-social-btn:hover{border-color:rgba(201,162,74,.4);background:rgba(201,162,74,.06)}
.ex-social-btn svg{width:18px;height:18px}
.ex-social-status{min-height:18px;margin:8px 0 0;text-align:center;font-size:13px;color:var(--ex-muted)}
.ex-social-status.is-error{color:var(--ex-danger)}
.ex-social-status.is-success{color:#3dd68c}

@media (max-width:1100px){
  .ex-feature-row{grid-template-columns:1fr}
  .ex-stats{grid-template-columns:repeat(2,1fr)}
}
@media (max-width:960px){
  .ex-page{grid-template-columns:1fr}
  .ex-hero{display:none}
  .ex-auth{border-left:0;min-height:calc(100vh - 52px);min-height:calc(100svh - 52px);padding:56px 18px 28px}
  .ex-auth-top{top:12px;left:12px;right:12px}
  .ex-home-btn{top:auto;left:auto}
  .ex-card{margin-top:8px;padding:26px 20px 22px}
  .ex-promo-cards{grid-template-columns:1fr}
}
@media (max-width:480px){
  .ex-card h2{font-size:24px}
}

/* Login to markets transition overlay */
.ex-transition-overlay{
  position:fixed;inset:0;z-index:9999;
  display:flex;align-items:center;justify-content:center;
  background:rgba(5,14,26,.72);
  opacity:0;pointer-events:none;
  transition:opacity .18s ease;
  backdrop-filter:blur(6px);
}
.ex-transition-overlay.is-on{opacity:1;pointer-events:auto}
.ex-transition-card{
  width:min(320px,calc(100vw - 40px));
  padding:28px 22px;border-radius:14px;text-align:center;
  border:1px solid rgba(201,162,74,.3);
  background:linear-gradient(180deg,#0d243c,#0a1b2e);
  box-shadow:0 20px 50px rgba(0,0,0,.45);
}
.ex-transition-card strong{display:block;margin:14px 0 6px;font-size:18px;color:#fff}
.ex-transition-card p{margin:0;font-size:13px;color:#8FA0B5;line-height:1.5}
.ex-transition-spin{
  display:inline-block;width:28px;height:28px;border-radius:50%;
  border:2px solid rgba(201,162,74,.25);border-top-color:#E2C87A;
  animation:exSpin .7s linear infinite;
}
@keyframes exSpin{to{transform:rotate(360deg)}}
