:root,
[data-theme="dark"]{
  color-scheme:dark;
  --color-bg-main:#0B0E11;
  --color-bg-card:#181A20;
  --color-bg-elevated:#2B313A;
  --color-border-subtle:rgba(255,255,255,.06);
  --color-text-primary:#EAECEF;
  --color-text-secondary:#848E9C;
  /* dark: lower saturation ~12% vs pure exchange greens/reds to reduce glare */
  --color-up:#12B87A;
  --color-down:#E2556A;
  --color-grid:rgba(255,255,255,.05);
  --color-chart-bg:#181A20;
  --bg-main:var(--color-bg-main);
  --bg-card:var(--color-bg-card);
  --bg-input:var(--color-bg-elevated);
  --bg-nav:#070A0E;
  --border-color:var(--color-border-subtle);
  --text-primary:var(--color-text-primary);
  --text-secondary:var(--color-text-secondary);
  --primary-color:#3B82F6;
  --success-color:#22C55E;
  --danger-color:#EF4444;
  --card-shadow:0 17px 45px rgba(0,0,0,.27),inset 0 1px rgba(255,255,255,.035);
  --badge-ok-bg:rgba(34,211,154,.12);
  --badge-ok-fg:#22d39a;
  --badge-ok-border:rgba(34,211,154,.28);
  --badge-wait-bg:rgba(232,197,71,.12);
  --badge-wait-fg:#e8c547;
  --badge-wait-border:rgba(232,197,71,.28);
  --badge-warn-bg:rgba(239,96,96,.12);
  --badge-warn-fg:#ef6060;
  --badge-warn-border:rgba(239,96,96,.28);
  --badge-info-bg:rgba(7,140,255,.14);
  --badge-info-fg:#55adff;
  --badge-info-border:rgba(7,140,255,.28);
  --bg:var(--color-bg-main);
  --bg-soft:#11151A;
  --panel:var(--color-bg-card);
  --panel-2:var(--color-bg-elevated);
  --panel-raised:var(--color-bg-elevated);
  --text:var(--color-text-primary);
  --body:#C7CBD1;
  --muted:var(--color-text-secondary);
  --line:var(--color-border-subtle);
  --line-soft:var(--color-border-subtle);
  --blue:#2396ff;
  --blue-2:#75bdff;
  --green:var(--color-up);
  --red:var(--color-down);
  --amber:#f6bd55;
  --account-accent:var(--blue);
  --account-accent-rgb:35,150,255;
  --container:1240px;
  --radius:16px;
  --radius-small:11px;
  --shadow:0 18px 44px rgba(0,0,0,.28),0 1px 0 rgba(255,255,255,.04) inset;
  --shadow-soft:0 9px 24px rgba(0,0,0,.2),0 1px 0 rgba(255,255,255,.035) inset;
  --ccx-font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang TC","PingFang HK","PingFang SC","Hiragino Sans","Hiragino Kaku Gothic ProN","Hiragino Sans GB","Noto Sans CJK TC","Noto Sans TC","Noto Sans JP","Noto Sans KR","Noto Sans Thai","Noto Sans SC","Microsoft JhengHei UI","Microsoft JhengHei","Microsoft YaHei UI","Microsoft YaHei","Yu Gothic UI","Yu Gothic","Malgun Gothic","Apple SD Gothic Neo","Thonburi","Leelawadee UI","Tahoma",sans-serif;
}

[data-theme="light"]{
  color-scheme:light;
  --color-bg-main:#F5F5F5;
  --color-bg-card:#FFFFFF;
  --color-bg-elevated:#E9EDF2;
  --color-border-subtle:rgba(0,0,0,.06);
  --color-text-primary:#1E2329;
  --color-text-secondary:#707A8A;
  --color-up:#03A66D;
  --color-down:#CF304A;
  --color-grid:rgba(0,0,0,.05);
  --color-chart-bg:#FFFFFF;
  --bg-main:var(--color-bg-main);
  --bg-card:var(--color-bg-card);
  --bg-input:#F7F7F5;
  --bg-nav:#F1F5F9;
  --border-color:var(--color-border-subtle);
  --text-primary:var(--color-text-primary);
  --text-secondary:var(--color-text-secondary);
  --primary-color:#2B569A;
  --success-color:#16A34A;
  --danger-color:#DC2626;
  --card-shadow:0 1px 3px 0 rgba(0,0,0,.05),0 1px 2px -1px rgba(0,0,0,.05);
  --badge-ok-bg:#DCFCE7;
  --badge-ok-fg:#15803D;
  --badge-ok-border:#BBF7D0;
  --badge-wait-bg:#FEF9C3;
  --badge-wait-fg:#A16207;
  --badge-wait-border:#FDE68A;
  --badge-warn-bg:#FEE2E2;
  --badge-warn-fg:#B91C1C;
  --badge-warn-border:#FECACA;
  --badge-info-bg:#DBEAFE;
  --badge-info-fg:#1D4ED8;
  --badge-info-border:#BFDBFE;
  --bg:var(--color-bg-main);
  --bg-soft:#F3F3F1;
  --panel:var(--color-bg-card);
  --panel-2:#F7F7F5;
  --panel-raised:var(--color-bg-elevated);
  --text:var(--color-text-primary);
  --body:#37352F;
  --muted:var(--color-text-secondary);
  --line:var(--color-border-subtle);
  --line-soft:var(--color-border-subtle);
  --blue:#2B569A;
  --blue-2:#3B6CB5;
  --green:var(--color-up);
  --red:var(--color-down);
  --amber:#CA8A04;
  --account-accent:var(--primary-color);
  --account-accent-rgb:43,86,154;
  --shadow:0 1px 3px rgba(0,0,0,.06),0 8px 24px rgba(25,25,25,.04);
  --shadow-soft:0 1px 2px rgba(0,0,0,.04);
}

*{box-sizing:border-box}
html{overflow-x:hidden;scroll-behavior:smooth;background:var(--bg);font-family:var(--ccx-font-family)}
body{margin:0;min-width:320px;background:var(--bg);color:var(--body);font-family:var(--ccx-font-family);font-size:16px;line-height:1.5;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility}
body,button,input,select,textarea{font:inherit}
button,input,select,textarea{min-height:46px}
input,select,textarea{max-width:100%}
button,a{touch-action:manipulation}
button{cursor:pointer}
a{color:inherit}
img,svg,canvas{display:block;max-width:100%}
h1,h2,h3,h4,p{margin-top:0}
h1{margin-bottom:10px;color:var(--text);font-size:26px;line-height:1.2;font-weight:800;letter-spacing:0}
h2{margin-bottom:8px;color:var(--text);font-size:20px;line-height:1.28;font-weight:750;letter-spacing:0}
h3{margin-bottom:6px;color:var(--text);font-size:17px;line-height:1.35;font-weight:700}
p{margin-bottom:10px;color:var(--body);font-size:16px;line-height:1.55}
small,.helper-text{color:var(--muted);font-size:14px;line-height:1.45}
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:2px solid var(--account-accent);outline-offset:2px}

.container{width:min(var(--container),calc(100% - 32px));margin-inline:auto}
.eyebrow{display:inline-flex;align-items:center;gap:8px;margin-bottom:7px;color:var(--blue-2);font-size:14px;font-weight:750;line-height:1.2;letter-spacing:.1em;text-transform:uppercase;white-space:nowrap}
.eyebrow:before{content:"";width:18px;height:1px;background:currentColor}
.card,.surface-card,.panel{border:1px solid var(--line);border-radius:var(--radius);background:linear-gradient(145deg,rgba(255,255,255,.022),rgba(255,255,255,0) 42%),var(--panel);box-shadow:var(--shadow-soft)}
.muted{color:var(--muted)!important}
.up{color:var(--green)!important}
.down{color:var(--red)!important}

.button{min-height:46px;display:inline-flex;align-items:center;justify-content:center;gap:8px;padding:0 18px;border:1px solid var(--account-accent);border-radius:10px;background:var(--account-accent);box-shadow:0 8px 22px rgba(var(--account-accent-rgb),.2);color:#fff;font-size:16px;font-weight:750;line-height:1;text-decoration:none;white-space:nowrap;transition:transform .18s ease,box-shadow .18s ease,filter .18s ease,background .18s ease}
.button:hover{transform:translateY(-1px);filter:brightness(1.06);box-shadow:0 11px 28px rgba(var(--account-accent-rgb),.26)}
.button:active{transform:translateY(0)}
.button-outline{background:rgba(var(--account-accent-rgb),.06);border-color:rgba(var(--account-accent-rgb),.55);box-shadow:none;color:var(--text)}
.button-outline:hover{background:rgba(var(--account-accent-rgb),.12)}
.button-ghost{background:transparent;border-color:var(--line);box-shadow:none;color:var(--body)}
.button-ghost:hover{background:rgba(255,255,255,.05);border-color:rgba(255,255,255,.24)}
.button-small{min-height:46px;padding-inline:15px;font-size:14px}
[data-theme="light"] .card,
[data-theme="light"] .surface-card,
[data-theme="light"] .panel{
  background:var(--bg-card);
  box-shadow:var(--card-shadow);
}
[data-theme="light"] .button-ghost:hover{
  background:rgba(43,86,154,.06);
  border-color:#D5DEEA;
}

html.ccx-preview-locked,html.ccx-preview-locked body,html.ccx-preview-checking,html.ccx-preview-checking body{min-height:100%;overflow:hidden;background:#0f1118}
html.ccx-preview-locked body>:not(.ccx-preview-gate),html.ccx-preview-checking body>*{visibility:hidden!important}
html.ccx-preview-checking body{cursor:progress}
.ccx-preview-gate{position:fixed;z-index:2147483647;inset:0;display:grid;place-items:center;overflow:auto;padding:clamp(20px,5vw,54px);background:radial-gradient(circle at 18% 12%,rgba(54,211,153,.14),transparent 30%),radial-gradient(circle at 82% 85%,rgba(35,150,255,.1),transparent 32%),#0f1118;color:#c8cdd8;visibility:visible!important;opacity:1;transition:opacity .2s ease}
.ccx-preview-gate.is-leaving{opacity:0;pointer-events:none}
.ccx-preview-gate-card{width:min(100%,420px);padding:clamp(24px,5vw,36px);border:1px solid rgba(54,211,153,.25);border-radius:22px;background:linear-gradient(145deg,rgba(255,255,255,.045),transparent 38%),#1a1d29;box-shadow:0 28px 80px rgba(0,0,0,.48),inset 0 1px rgba(255,255,255,.045)}
.ccx-preview-gate-brand{display:inline-flex;align-items:baseline;gap:8px;color:#36d399;font-size:28px;font-weight:900;letter-spacing:0}
.ccx-preview-gate-brand small{color:#8a92a3;font-size:9px;font-weight:800;letter-spacing:0}
.ccx-preview-gate-kicker{margin:28px 0 8px;color:#36d399;font-size:11px;font-weight:800;letter-spacing:.16em}
.ccx-preview-gate h1{margin:0;color:#f1f1f1;font-size:30px;line-height:1.2}
.ccx-preview-gate-copy{margin:12px 0 24px;color:#9ea6b6;font-size:14px;line-height:1.7}
.ccx-preview-gate-form{display:grid;gap:10px}
.ccx-preview-gate-form label{margin-top:4px;color:#c8cdd8;font-size:13px;font-weight:750}
.ccx-preview-gate-form input{width:100%;min-height:50px;padding:0 15px;border:1px solid #343a4c;border-radius:11px;outline:0;background:#10131c;color:#f1f1f1;font:inherit;letter-spacing:0;transform:none;transition:border-color .18s ease,box-shadow .18s ease}
.ccx-preview-gate-form input[type="password"]::placeholder{opacity:.30}
.ccx-preview-gate-form input:focus{border-color:#36d399;box-shadow:0 0 0 3px rgba(54,211,153,.13)}
.ccx-preview-gate-form .button{width:100%;margin-top:4px}
.ccx-preview-gate-form .button:disabled{cursor:wait;opacity:.72}
.ccx-preview-gate-error{min-height:20px;margin:0;color:#ff7d5f;font-size:13px;line-height:1.45}
.ccx-preview-gate-note{display:block;margin-top:18px;color:#7f8798;font-size:11px;line-height:1.55;text-align:center}

.breadcrumb{display:flex;align-items:center;gap:7px;min-width:0;color:var(--muted);font-size:14px;line-height:1.35}
.breadcrumb a{color:var(--body);text-decoration:none;white-space:nowrap}
.breadcrumb a:hover{color:var(--text)}
.breadcrumb span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.breadcrumb i{font-style:normal;color:#596173}
.page-heading{display:flex;align-items:flex-end;justify-content:space-between;gap:14px;margin-bottom:14px}
.page-heading>div{min-width:0}
.page-heading p{margin:0;color:var(--muted)}

input,select,textarea{width:100%;border:1px solid var(--line);border-radius:10px;background:var(--bg-input);color:var(--text);color-scheme:inherit;outline:none;transition:border-color .18s ease,box-shadow .18s ease,background .18s ease}
input,select{padding:0 13px}
textarea{padding:11px 13px;resize:vertical}
input::placeholder,textarea::placeholder{color:var(--muted);transform:none;letter-spacing:0}
input[type="password"]::placeholder{
  opacity:.30;
  transform:none;
  letter-spacing:0;
}
input[type="password"]::-webkit-input-placeholder{
  opacity:.30;
  transform:none;
  letter-spacing:0;
}
input[type="password"]::-moz-placeholder{
  opacity:.30;
  transform:none;
  letter-spacing:0;
}
input:hover,select:hover,textarea:hover{border-color:var(--line)}
input:focus,select:focus,textarea:focus{border-color:var(--account-accent);background:var(--bg-card);box-shadow:0 0 0 3px rgba(var(--account-accent-rgb),.12)}
input[aria-invalid="true"],textarea[aria-invalid="true"]{border-color:var(--red);box-shadow:0 0 0 3px rgba(255,107,126,.1)}
input:-webkit-autofill,input:-webkit-autofill:hover,input:-webkit-autofill:focus,select:-webkit-autofill,textarea:-webkit-autofill{
  -webkit-text-fill-color:var(--text);
  caret-color:var(--text);
  box-shadow:0 0 0 1000px var(--bg-input) inset;
  transition:background-color 99999s ease-out;
}

.toast{position:fixed;left:50%;bottom:max(18px,env(safe-area-inset-bottom));z-index:300;min-width:230px;max-width:calc(100% - 24px);padding:12px 16px;border:1px solid var(--line);border-radius:12px;background:var(--panel);box-shadow:var(--shadow);color:var(--text);font-size:14px;text-align:center;opacity:0;transform:translate(-50%,12px);pointer-events:none;transition:opacity .2s ease,transform .2s ease}
.toast.show{opacity:1;transform:translate(-50%,0)}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}

@media(max-width:720px){
  .container{width:min(var(--container),calc(100% - 24px))}
  h1{font-size:26px}
  h2{font-size:20px}
  .page-heading{align-items:flex-start;flex-direction:column;gap:6px;margin-bottom:11px}
  .button{padding-inline:15px}
  :where(.card,.surface-card,.panel,article,section,form,dl,div){min-width:0}
  :where(h1,h2,h3,h4,p,span,b,strong,small,dt,dd,label,a,button){overflow-wrap:break-word}
}

@media(prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
  *,*:before,*:after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important;scroll-behavior:auto!important}
}

.ccx-theme-toggle{
  position:fixed;
  left:162px;
  bottom:18px;
  z-index:1201;
  display:grid;
  place-items:center;
  width:40px;
  min-width:40px;
  max-width:40px;
  height:40px;
  min-height:40px;
  max-height:40px;
  padding:0;
  overflow:hidden;
  border:1px solid rgba(243,193,74,.55);
  border-radius:12px;
  color:#f3c14a;
  background:#1c1508;
  box-shadow:0 10px 30px rgba(0,0,0,.28);
  font-size:18px;
  line-height:1;
  cursor:pointer;
  flex:0 0 40px;
}
.ccx-theme-toggle span{
  grid-area:1/1;
  display:grid;
  place-items:center;
  line-height:1;
  transition:opacity .32s ease,transform .32s cubic-bezier(.2,.8,.2,1);
}
.ccx-theme-toggle .ccx-theme-sun{
  opacity:1;
  transform:rotate(0) scale(1);
}
.ccx-theme-toggle .ccx-theme-moon{
  opacity:0;
  transform:rotate(-70deg) scale(.55);
}
.ccx-theme-toggle-header{
  position:static !important;
  left:auto;
  right:auto;
  bottom:auto;
  z-index:2;
  box-shadow:none;
  flex-shrink:0;
  transform:none;
}
[data-theme="light"] .ccx-theme-toggle{
  color:#2f5f9a;
  background:#e8eef8;
  border-color:#9bb6d4;
}
[data-theme="light"] .ccx-theme-toggle .ccx-theme-sun{
  opacity:0;
  transform:rotate(70deg) scale(.55);
}
[data-theme="light"] .ccx-theme-toggle .ccx-theme-moon{
  opacity:1;
  transform:rotate(0) scale(1);
}
body:has(.ccx-theme-toggle-header) .ccx-theme-toggle-dock,
body:has(.ccx-theme-toggle-header) .ccx-theme-toggle:not(.ccx-theme-toggle-header),
body.trader-body .ccx-theme-toggle-dock,
body.trader-body .ccx-theme-toggle:not(.ccx-theme-toggle-header){
  display:none !important;
}
.ccx-end-switcher{display:flex;flex-wrap:wrap;align-items:center;gap:6px}
.ccx-end-switcher a,.ccx-end-switcher .is-current{min-height:32px;padding:0 10px;border:1px solid var(--line,rgba(255,255,255,.12));border-radius:999px;color:inherit;font-size:12px;line-height:32px;text-decoration:none;white-space:nowrap}
.ccx-end-switcher .is-current{border-color:rgba(66,164,255,.55);background:rgba(66,164,255,.12)}
.ccx-end-switcher a:hover{border-color:rgba(66,164,255,.45)}
.ccx-end-switcher-bar{position:sticky;top:0;z-index:48;justify-content:center;padding:6px 12px;border-bottom:1px solid var(--line,rgba(255,255,255,.08));background:rgba(7,10,14,.92);backdrop-filter:blur(12px)}
.trader-header-tools .ccx-end-switcher,.ops-header .ccx-end-switcher{flex-wrap:nowrap}
.ops-header .ccx-end-switcher{flex:1 1 220px;min-width:0}
.auth-card .ccx-end-switcher{margin:0 0 14px}
@media (max-width:1180px){
  .trader-header-tools .ccx-end-switcher{display:none}
}
@media (max-width:900px){
  .ops-header .ccx-end-switcher{display:none}
}
.auth-end-links{grid-template-columns:1fr}

/* === W2: site background + unified logo tokens (T-CSS-01 / T-LOGO-01) === */
:root,
[data-theme="dark"]{
  --site-logo-url:url("../images/brand/logo-ccx-gold.svg");
  --logo-width:228px;
  --logo-height:52px;
  --bg-large-fallback:#181a20;
}
[data-theme="light"]{
  --site-logo-url:url("../images/brand/logo-ccx-gold.svg");
  --bg-large-fallback:#f8f9fa;
}
.bg-large{
  background-color:var(--bg-large-fallback,#181a20);
  background-repeat:no-repeat;
  background-position:center center;
  background-size:cover;
  will-change:transform;
}
.bg-pattern{
  background-repeat:repeat;
  background-size:auto;
}
.ccx-brand-lockup{
  display:inline-flex;
  align-items:center;
  gap:10px;
  min-width:0;
  color:inherit;
  text-decoration:none;
  line-height:1;
}
.ccx-brand-mark{
  display:block;
  width:40px;
  height:38px;
  flex:0 0 auto;
  object-fit:contain;
  filter:drop-shadow(0 2px 8px rgba(229,192,91,.25));
}
.ccx-brand-copy{
  display:flex;
  flex-direction:column;
  justify-content:center;
  gap:2px;
  min-width:0;
}
.ccx-brand-copy strong{
  color:#E6C15A;
  font-size:15px;
  font-weight:800;
  letter-spacing:.04em;
  white-space:nowrap;
}
.ccx-brand-copy small{
  color:#C9A24A;
  font-size:9px;
  font-weight:600;
  letter-spacing:.22em;
  text-transform:uppercase;
}
.trader-logo.ccx-brand-lockup,
.ops-logo.ccx-brand-lockup,
.auth-logo.ccx-brand-lockup{
  flex-direction:row;
  align-items:center;
  gap:10px;
}
.trader-logo .ccx-brand-copy strong,
.ops-logo .ccx-brand-copy strong{
  font-size:15px;
  font-weight:800;
  letter-spacing:.04em;
  color:#E6C15A;
}
.trader-logo .ccx-brand-copy small,
.ops-logo .ccx-brand-copy small{
  font-size:9px;
  font-weight:600;
  letter-spacing:.22em;
  color:#C9A24A;
}
.logo-wrapper{
  display:inline-flex;
  align-items:center;
  min-width:0;
}
.logo-wrapper > a{
  display:inline-flex;
  align-items:center;
  min-width:0;
  text-decoration:none;
  color:inherit;
}
.ccx-site-logo,
.ccx-site-logo-img{
  display:inline-block;
  width:var(--logo-width,210px);
  height:var(--logo-height,48px);
  background-repeat:no-repeat;
  background-size:contain;
  background-position:left center;
  filter:drop-shadow(0 2px 8px rgba(229,192,91,.25));
  -webkit-font-smoothing:antialiased;
  transform:translateZ(0);
  transition:opacity .2s ease,transform .2s ease;
}
.ccx-site-logo{
  background-image:var(--site-logo-url);
}
.ccx-site-logo-img{
  object-fit:contain;
  object-position:left center;
  vertical-align:middle;
  pointer-events:none;
}
a .ccx-site-logo:hover{
  opacity:.95;
  transform:translateZ(0) scale(1.02);
}
.ccx-site-logo.is-compact,
.ccx-site-logo-img.is-compact{
  --logo-width:176px;
  --logo-height:40px;
}
.trader-logo .ccx-site-logo,
.trader-logo .ccx-site-logo-img{
  --logo-width:188px;
  --logo-height:42px;
}
.ex-hero-brand .ccx-site-logo,
.ex-hero-brand .ccx-site-logo-img{
  --logo-width:248px;
  --logo-height:58px;
}
.site-header .ccx-site-logo,
.site-header .ccx-site-logo-img,
.site-footer .ccx-site-logo,
.site-footer .ccx-site-logo-img{
  --logo-width:210px;
  --logo-height:48px;
}

