/* CGBX component overrides follow the global theme tokens. */
html:is([data-cgb-theme="light"], [data-cgb-theme="beige"]) #app #main>.cx-hub[data-cgbx-page] .cgbx-v2-dashboard :is(.cx-card,.cgbx-v2-metric,.cx-services article){background:var(--theme-surface);border-color:var(--theme-line);color:var(--theme-ink);box-shadow:var(--theme-shadow)}
html:is([data-cgb-theme="light"], [data-cgb-theme="beige"]) #app #main>.cx-hub[data-cgbx-page] .cgbx-v2-dashboard :is(h2,h3,.cx-card h2,.cx-card h3){color:var(--theme-ink)}
html:is([data-cgb-theme="light"], [data-cgb-theme="beige"]) #app #main>.cx-hub[data-cgbx-page] .cgbx-v2-dashboard .cgbx-v2-ecosystem .cx-services article :is(span,p,small){color:var(--theme-muted)}
html:is([data-cgb-theme="light"], [data-cgb-theme="beige"]) #app #main>.cx-hub[data-cgbx-page] .cgbx-v2-dashboard :is(button,.btn){border-color:var(--theme-line);background:var(--theme-action);color:var(--theme-ink);box-shadow:none;text-shadow:none}
html:is([data-cgb-theme="light"], [data-cgb-theme="beige"]) #app #main>.cx-hub[data-cgbx-page] .cgbx-v2-dashboard :is(.btn.ghost,button.ghost){border-color:var(--theme-line);background:var(--theme-surface);color:var(--theme-blue)}
html:is([data-cgb-theme="light"], [data-cgb-theme="beige"]) #app #main>.cx-hub[data-cgbx-page] .cgbx-v2-dashboard .cgbx-v2-hero-actions [data-cx-view="pass"],html:is([data-cgb-theme="light"], [data-cgb-theme="beige"]) #app #main>.cx-hub[data-cgbx-page] .cgbx-v2-dashboard .cgbx-v2-sale-actions [data-cx-view="token"]{border-color:var(--theme-line);background:var(--theme-action-secondary);color:var(--theme-ink)}

html:is([data-cgb-theme="light"], [data-cgb-theme="beige"]) :is(#modal-root,body) dialog.terminal-dialog.cgbx-section-dialog{border-color:var(--theme-line);background:var(--theme-surface);color:var(--theme-ink)}
html:is([data-cgb-theme="light"], [data-cgb-theme="beige"]) :is(#modal-root,body) dialog.terminal-dialog.cgbx-section-dialog :is(h1,h2,h3,h4,strong,b,code){color:var(--theme-ink)}
html:is([data-cgb-theme="light"], [data-cgb-theme="beige"]) :is(#modal-root,body) dialog.terminal-dialog.cgbx-section-dialog :is(p,li,td,th,label,small,dd,dt){color:var(--theme-muted)}
html:is([data-cgb-theme="light"], [data-cgb-theme="beige"]) :is(#modal-root,body) dialog.terminal-dialog.cgbx-section-dialog .cgbx-crypto-network{background:var(--theme-surface-alt);border-color:var(--theme-line);color:var(--theme-ink)}
html:is([data-cgb-theme="light"], [data-cgb-theme="beige"]) :is(#modal-root,body) dialog.terminal-dialog.cgbx-section-dialog .cgbx-crypto-network.active{background:var(--theme-action);border-color:var(--theme-line);color:var(--theme-ink)}
html:is([data-cgb-theme="light"], [data-cgb-theme="beige"]) :is(#modal-root,body) dialog.terminal-dialog.cgbx-section-dialog .cgbx-crypto-network small{color:var(--theme-muted)}
html:is([data-cgb-theme="light"], [data-cgb-theme="beige"]) :is(#modal-root,body) dialog.terminal-dialog.cgbx-section-dialog :is(.cgbx-reference-warning,.cgbx-crypto-warning,.cgbx-crypto-payment-status){color:#9a6500}
html:is([data-cgb-theme="light"], [data-cgb-theme="beige"]) :is(#modal-root,body) dialog.terminal-dialog.cgbx-section-dialog :is(.cgbx-crypto-address,.cgbx-crypto-order dd){color:var(--theme-blue)}
html:is([data-cgb-theme="light"], [data-cgb-theme="beige"]) :is(#modal-root,body) dialog.terminal-dialog.cgbx-section-dialog .cx-card{border-color:var(--theme-line);background:var(--theme-surface);color:var(--theme-ink);box-shadow:var(--theme-shadow)}
html:is([data-cgb-theme="light"], [data-cgb-theme="beige"]) :is(#modal-root,body) dialog.terminal-dialog.cgbx-section-dialog .cx-card :is(h2,h3){color:var(--theme-ink)}
html:is([data-cgb-theme="light"], [data-cgb-theme="beige"]) :is(#modal-root,body) dialog.terminal-dialog.cgbx-section-dialog .cx-hub :is(button,.btn){border-color:var(--theme-line);background:var(--theme-action);color:var(--theme-ink)}
html:is([data-cgb-theme="light"], [data-cgb-theme="beige"]) :is(#modal-root,body) dialog.terminal-dialog.cgbx-section-dialog .cx-hub :is(button.ghost,.btn.ghost){border-color:var(--theme-line);background:var(--theme-surface);color:var(--theme-blue)}

/* The dashboard has its own hard-coded dark artwork and nested panels. */
html:is([data-cgb-theme="light"],[data-cgb-theme="beige"]) #app #main>.cx-hub[data-cgbx-page] .cgbx-v2-dashboard :is(.cgbx-v2-hero,.cgbx-v2-hero-price,.cgbx-v2-progress,.cgbx-v2-quote,.cgbx-v2-quote-input,.cgbx-v2-partner-stats>div,.cgbx-v2-facts>div,.cgbx-v2-donut>div,.cgbx-v2-admin-list>article,.cgbx-v2-hero-fact,.cgbx-v2-price-note,.cgbx-v2-metric-copy){background:var(--theme-surface);border-color:var(--theme-line);color:var(--theme-ink);box-shadow:none}
html:is([data-cgb-theme="light"],[data-cgb-theme="beige"]) #app #main>.cx-hub[data-cgbx-page] .cgbx-v2-dashboard :is(.cgbx-v2-hero-price,.cgbx-v2-progress,.cgbx-v2-quote,.cgbx-v2-quote-input,.cgbx-v2-partner-stats>div,.cgbx-v2-facts>div){background:var(--theme-surface-alt)}
html:is([data-cgb-theme="light"],[data-cgb-theme="beige"]) #app #main>.cx-hub[data-cgbx-page] .cgbx-v2-dashboard :is(h1,h2,h3,p,small,span,strong,b,em,label,code,li){color:var(--theme-ink)}
html:is([data-cgb-theme="light"],[data-cgb-theme="beige"]) #app #main>.cx-hub[data-cgbx-page] .cgbx-v2-dashboard :is(.cgbx-v2-hero-art,.cgbx-v2-orbit,.cgbx-v2-coin){background:none;border-color:var(--theme-line);box-shadow:none;text-shadow:none;filter:none}
html:is([data-cgb-theme="light"],[data-cgb-theme="beige"]) #app #main>.cx-hub[data-cgbx-page] .cgbx-v2-dashboard :is(.cgbx-v2-hero-art,.cgbx-v2-orbit,.cgbx-v2-coin)::before,
html:is([data-cgb-theme="light"],[data-cgb-theme="beige"]) #app #main>.cx-hub[data-cgbx-page] .cgbx-v2-dashboard :is(.cgbx-v2-hero-art,.cgbx-v2-orbit,.cgbx-v2-coin)::after{content:none}
html:is([data-cgb-theme="light"],[data-cgb-theme="beige"]) #app #main>.cx-hub[data-cgbx-page] .cgbx-v2-dashboard .cgbx-v2-coin img{filter:none}
html:is([data-cgb-theme="light"],[data-cgb-theme="beige"]) #app #main>.cx-hub[data-cgbx-page] .cgbx-v2-dashboard :is(.cgbx-v2-presets button,.cgbx-v2-activity-icon,.cgbx-v2-state,.cgbx-v2-metric-icon){background:var(--theme-surface-alt);border-color:var(--theme-line);color:var(--theme-ink);box-shadow:none}
html:is([data-cgb-theme="light"],[data-cgb-theme="beige"]) #app #main>.cx-hub[data-cgbx-page] .cgbx-v2-dashboard :is(.cgbx-v2-activity-list article,.cgbx-v2-progress progress){border-color:var(--theme-line);background:var(--theme-surface-alt)}
html:is([data-cgb-theme="light"],[data-cgb-theme="beige"]) #app #main>.cx-hub[data-cgbx-page] .cgbx-v2-dashboard .cgbx-v2-progress progress::-webkit-progress-bar{background:var(--theme-surface-alt)}
html:is([data-cgb-theme="light"],[data-cgb-theme="beige"]) #app #main>.cx-hub[data-cgbx-page] .cgbx-v2-dashboard .cgbx-v2-progress progress::-webkit-progress-value{background:var(--theme-action)}
html:is([data-cgb-theme="light"],[data-cgb-theme="beige"]) #app #main>.cx-hub[data-cgbx-page] .cgbx-v2-dashboard .cgbx-v2-progress progress::-moz-progress-bar{background:var(--theme-action)}
html:is([data-cgb-theme="light"],[data-cgb-theme="beige"]) #app #main>.cx-hub[data-cgbx-page] .cgbx-v2-dashboard :is(button,.btn):hover{transform:none;box-shadow:none}
html:is([data-cgb-theme="light"],[data-cgb-theme="beige"]) #app #main>.cx-hub[data-cgbx-page] .cgbx-v2-dashboard :is(button,.btn):disabled{opacity:.48;cursor:not-allowed}
/* The source declares these text colors with !important; keep the override equally narrow. */
html:is([data-cgb-theme="light"],[data-cgb-theme="beige"]) #app #main>.cx-hub[data-cgbx-page] .cgbx-v2-dashboard :is(.cgbx-v2-price-note,.cgbx-v2-metric-copy>p){color:var(--theme-ink)!important}

/* CGBX dialogs remain in the main application document; no iframe styling. */
html:is([data-cgb-theme="light"],[data-cgb-theme="beige"]) :is(#modal-root,body) dialog:is(.cgbx-crypto-dialog,.cgbx-buy-dialog,.cgbx-section-dialog){background:var(--theme-surface);border-color:var(--theme-line);color:var(--theme-ink);box-shadow:none}
html:is([data-cgb-theme="light"],[data-cgb-theme="beige"]) :is(#modal-root,body) dialog:is(.cgbx-crypto-dialog,.cgbx-buy-dialog,.cgbx-section-dialog)::backdrop{background:rgba(0,0,0,.5);backdrop-filter:none}
html:is([data-cgb-theme="light"],[data-cgb-theme="beige"]) :is(#modal-root,body) dialog:is(.cgbx-crypto-dialog,.cgbx-buy-dialog,.cgbx-section-dialog) :is(.cgbx-crypto-detail,.cgbx-crypto-amount>span,.cgbx-crypto-estimate,.cgbx-crypto-config>div,.cgbx-crypto-report input,.cgbx-v2-quote-input){background:var(--theme-surface-alt);border-color:var(--theme-line);color:var(--theme-ink)}
html:is([data-cgb-theme="light"],[data-cgb-theme="beige"]) :is(#modal-root,body) dialog:is(.cgbx-crypto-dialog,.cgbx-buy-dialog,.cgbx-section-dialog) :is(h1,h2,h3,p,small,span,strong,b,label,code,input){color:var(--theme-ink)}
html:is([data-cgb-theme="light"],[data-cgb-theme="beige"]) :is(#modal-root,body) dialog:is(.cgbx-crypto-dialog,.cgbx-buy-dialog,.cgbx-section-dialog) .cgbx-crypto-network{background:var(--theme-surface-alt)!important;border-color:var(--theme-line)!important;color:var(--theme-ink)!important}
html:is([data-cgb-theme="light"],[data-cgb-theme="beige"]) :is(#modal-root,body) dialog:is(.cgbx-crypto-dialog,.cgbx-buy-dialog,.cgbx-section-dialog) .cgbx-crypto-network.active{background:var(--theme-action)!important;border-color:var(--theme-line)!important}

/* The hero's dark gradient is a pseudo-element above its clear CSS background. */
html:is([data-cgb-theme="light"],[data-cgb-theme="beige"]) #app #main>.cx-hub[data-cgbx-page] .cgbx-v2-hero::before{content:none;background:none}
html:is([data-cgb-theme="light"],[data-cgb-theme="beige"]) #app #main>.cx-hub[data-cgbx-page] .cgbx-v2-price-head{flex-wrap:wrap}
html:is([data-cgb-theme="light"],[data-cgb-theme="beige"]) #app #main>.cx-hub[data-cgbx-page] .cgbx-v2-price-head>span{flex-shrink:0;word-break:normal;overflow-wrap:normal}
