/*
Theme Name: ETS Insight Terminal App
Theme URI: https://earlytokenscanner.co.za/
Description: Safe child theme for ETS Insight Terminal adding a homepage PWA install experience without replacing scanner/dashboard templates.
Author: Early Token Scanner
Template: ets-insight-terminal
Version: 3.1.0
Text Domain: ets-insight-terminal-app
*/

/* v3.0 Command Center design tokens */
:root{
  --ets-bg:#050b09;
  --ets-surface:#091310;
  --ets-surface-2:#0e1b17;
  --ets-surface-3:#13241e;
  --ets-line:#20372f;
  --ets-line-strong:#315247;
  --ets-text:#f5fbf8;
  --ets-text-2:#c5d7d0;
  --ets-muted:#89a198;
  --ets-accent:#f6bd4a;
  --ets-positive:#52dfa9;
  --ets-danger:#ff7f7b;
  --ets-content:1440px;
}

:root{
  --ets-app-bg:#08110F;
  --ets-app-panel:#101B18;
  --ets-app-line:#263833;
  --ets-app-text:#F7FBF9;
  --ets-app-muted:#93A39D;
  --ets-app-accent:#F4B740;
}

#ets-theme-app-promo[hidden],
#ets-theme-install-help[hidden]{display:none!important}

#ets-theme-app-promo{
  position:fixed;
  left:16px;
  right:16px;
  bottom:max(18px,calc(env(safe-area-inset-bottom) + 14px));
  z-index:2147482000;
  display:flex;
  align-items:center;
  gap:12px;
  max-width:680px;
  margin:0 auto;
  padding:14px;
  box-sizing:border-box;
  border:1px solid var(--ets-app-line);
  border-radius:22px;
  background:rgba(8,17,15,.97);
  color:var(--ets-app-text);
  box-shadow:0 20px 60px rgba(0,0,0,.46);
  backdrop-filter:blur(18px);
  -webkit-backdrop-filter:blur(18px);
  font-family:inherit;
}

#ets-theme-app-promo .ets-theme-app-icon{
  width:52px;
  height:52px;
  border-radius:15px;
  flex:0 0 auto;
  object-fit:cover;
}

#ets-theme-app-promo .ets-theme-app-copy{
  min-width:0;
  flex:1;
  display:flex;
  flex-direction:column;
}

#ets-theme-app-promo .ets-theme-app-kicker{
  color:var(--ets-app-accent);
  font-size:9px;
  font-weight:900;
  letter-spacing:1.3px;
  text-transform:uppercase;
}

#ets-theme-app-promo strong{
  margin-top:3px;
  color:var(--ets-app-text);
  font-size:14px;
  line-height:1.25;
}

#ets-theme-app-promo small{
  margin-top:3px;
  color:var(--ets-app-muted);
  font-size:10px;
  line-height:1.35;
}

#ets-theme-app-promo .ets-theme-app-actions{
  display:flex;
  gap:7px;
  flex:0 0 auto;
}

#ets-theme-app-promo button,
#ets-theme-app-promo a,
#ets-theme-install-help button{
  appearance:none;
  border:0;
  border-radius:12px;
  padding:10px 12px;
  font-size:10px;
  font-weight:900;
  line-height:1;
  cursor:pointer;
  text-decoration:none!important;
}

#ets-theme-install-button{
  background:var(--ets-app-accent);
  color:#08110F;
}

#ets-theme-open-scanner{
  border:1px solid #32453E!important;
  background:#111C18;
  color:#C7D4CF;
}

#ets-theme-app-promo .ets-theme-app-close{
  position:absolute;
  top:4px;
  right:7px;
  padding:4px!important;
  background:transparent!important;
  color:#72827C!important;
  font-size:19px;
}

#ets-theme-install-help{
  position:fixed;
  inset:0;
  z-index:2147482100;
  display:flex;
  align-items:flex-end;
  justify-content:center;
  padding:16px;
  background:rgba(0,0,0,.62);
}

#ets-theme-install-help .ets-theme-help-sheet{
  width:min(100%,520px);
  box-sizing:border-box;
  padding:24px;
  border:1px solid var(--ets-app-line);
  border-radius:24px;
  background:var(--ets-app-panel);
  color:var(--ets-app-text);
  text-align:center;
  box-shadow:0 25px 80px rgba(0,0,0,.5);
}

#ets-theme-install-help img{
  width:68px;
  height:68px;
  border-radius:18px;
}

#ets-theme-install-help h3{
  margin:14px 0 7px;
  font-size:20px;
}

#ets-theme-install-help p{
  margin:0 0 16px;
  color:var(--ets-app-muted);
  font-size:12px;
  line-height:1.6;
}

#ets-theme-install-help button{
  background:var(--ets-app-accent);
  color:#08110F;
}

.ets-theme-app-home-card{
  margin:18px auto;
  max-width:1160px;
  padding:0 20px;
  box-sizing:border-box;
}

.ets-theme-app-home-card__inner{
  display:grid;
  grid-template-columns:auto 1fr auto;
  align-items:center;
  gap:16px;
  padding:18px;
  border:1px solid #2C3F38;
  border-radius:22px;
  background:linear-gradient(140deg,#0C1714,#111F1A);
  color:#F7FBF9;
}

.ets-theme-app-home-card__inner img{
  width:58px;
  height:58px;
  border-radius:16px;
}

.ets-theme-app-home-card__inner h2{
  margin:0;
  font-size:18px;
  line-height:1.2;
  color:#F7FBF9;
}

.ets-theme-app-home-card__inner p{
  margin:5px 0 0;
  color:#93A39D;
  font-size:11px;
  line-height:1.5;
}

.ets-theme-app-home-card__actions{
  display:flex;
  gap:8px;
}

.ets-theme-app-home-card__actions button,
.ets-theme-app-home-card__actions a{
  border-radius:12px;
  padding:11px 13px;
  font-size:10px;
  font-weight:900;
  text-decoration:none!important;
  cursor:pointer;
}

.ets-theme-app-home-card__actions button{
  border:0;
  background:#F4B740;
  color:#08110F;
}

.ets-theme-app-home-card__actions a{
  border:1px solid #344840;
  background:#101B18;
  color:#D1DDD8;
}

@media(max-width:640px){
  #ets-theme-app-promo{
    left:10px;
    right:10px;
    bottom:max(10px,calc(env(safe-area-inset-bottom) + 8px));
    gap:9px;
    padding:12px;
  }
  #ets-theme-app-promo .ets-theme-app-icon{width:44px;height:44px}
  #ets-theme-app-promo strong{font-size:12px}
  #ets-theme-app-promo small{font-size:9px}
  #ets-theme-open-scanner{display:none}
  #ets-theme-app-promo button{padding:10px 11px}
  .ets-theme-app-home-card{padding:0 12px}
  .ets-theme-app-home-card__inner{
    grid-template-columns:auto 1fr;
    gap:12px;
    padding:15px;
  }
  .ets-theme-app-home-card__inner img{width:50px;height:50px}
  .ets-theme-app-home-card__actions{
    grid-column:1/-1;
    width:100%;
  }
  .ets-theme-app-home-card__actions button,
  .ets-theme-app-home-card__actions a{
    flex:1;
    text-align:center;
  }
}


/* =========================================================
   ETS INSIGHT TERMINAL APP v2.2.0 — UI SUPERCHARGE
   Crisp layout / mobile-first / terminal consistency
   ========================================================= */

:root{
  --ets-bg:#07100E;
  --ets-surface:#0B1512;
  --ets-surface-2:#101D19;
  --ets-surface-3:#14231E;
  --ets-line:#22352F;
  --ets-line-strong:#314A42;
  --ets-text:#F6FAF8;
  --ets-text-2:#C7D3CF;
  --ets-muted:#879A93;
  --ets-muted-2:#667872;
  --ets-accent:#F4B740;
  --ets-positive:#4DD7A2;
  --ets-warning:#F4B740;
  --ets-danger:#FF7C78;
  --ets-radius-sm:10px;
  --ets-radius:16px;
  --ets-radius-lg:22px;
  --ets-shadow:0 16px 48px rgba(0,0,0,.26);
  --ets-shadow-soft:0 10px 30px rgba(0,0,0,.18);
  --ets-content:1180px;
}

/* Base */
html{
  background:var(--ets-bg);
  scroll-behavior:smooth;
  -webkit-text-size-adjust:100%;
  text-rendering:optimizeLegibility;
}

body.ets-ui-supercharged{
  background:
    radial-gradient(circle at 20% -10%, rgba(67,255,210,.055), transparent 28rem),
    radial-gradient(circle at 100% 5%, rgba(104,79,255,.06), transparent 24rem),
    var(--ets-bg);
  color:var(--ets-text);
  overflow-x:hidden;
}

body.ets-ui-supercharged *,
body.ets-ui-supercharged *::before,
body.ets-ui-supercharged *::after{
  box-sizing:border-box;
}

body.ets-ui-supercharged img,
body.ets-ui-supercharged svg,
body.ets-ui-supercharged video,
body.ets-ui-supercharged canvas{
  max-width:100%;
  height:auto;
}

body.ets-ui-supercharged a{
  text-underline-offset:3px;
}

body.ets-ui-supercharged :focus-visible{
  outline:2px solid var(--ets-accent);
  outline-offset:3px;
  border-radius:6px;
}

/* Main canvas */
body.ets-ui-supercharged :where(main,.site-main,.wp-site-blocks){
  min-width:0;
}

body.ets-ui-supercharged :where(.wp-site-blocks > main,.site-main,.entry-content){
  overflow-wrap:anywhere;
}

body.ets-ui-supercharged :where(.alignwide,.ets-container,.ets-shell,.ets-content-shell,.dashboard-shell,.terminal-shell){
  width:min(calc(100% - 28px),var(--ets-content));
  margin-inline:auto;
}

/* Typography */
body.ets-ui-supercharged :where(h1,h2,h3,h4,h5,h6){
  color:var(--ets-text);
  letter-spacing:-.025em;
  text-wrap:balance;
}

body.ets-ui-supercharged h1{
  font-size:clamp(2.15rem,6vw,5.25rem);
  line-height:.98;
}

body.ets-ui-supercharged h2{
  font-size:clamp(1.55rem,3.6vw,3rem);
  line-height:1.06;
}

body.ets-ui-supercharged h3{
  font-size:clamp(1.15rem,2.2vw,1.65rem);
  line-height:1.12;
}

body.ets-ui-supercharged :where(p,li,td,th,label,input,button,select,textarea){
  font-size:clamp(.88rem,1.15vw,1rem);
}

body.ets-ui-supercharged p{
  color:var(--ets-text-2);
  line-height:1.65;
}

body.ets-ui-supercharged :where(small,.eyebrow,.kicker,.meta,.subtle,.muted){
  color:var(--ets-muted);
}

/* Crisp site/header/navigation */
body.ets-ui-supercharged :where(header.site-header,.wp-block-template-part > header,.ets-header,.terminal-header){
  position:relative;
  z-index:50;
}

body.ets-ui-supercharged :where(.site-header,.ets-header,.terminal-header){
  border-bottom:1px solid var(--ets-line);
  background:rgba(7,16,14,.92);
  backdrop-filter:blur(18px);
  -webkit-backdrop-filter:blur(18px);
}

body.ets-ui-supercharged :where(.site-header .wp-block-navigation,.ets-nav,.terminal-nav){
  gap:4px;
}

body.ets-ui-supercharged :where(.site-header .wp-block-navigation a,.ets-nav a,.terminal-nav a){
  border-radius:10px;
  padding:.65rem .8rem;
  color:var(--ets-text-2);
  font-weight:750;
  transition:background .16s ease,color .16s ease,transform .16s ease;
}

body.ets-ui-supercharged :where(.site-header .wp-block-navigation a:hover,.ets-nav a:hover,.terminal-nav a:hover){
  background:var(--ets-surface-2);
  color:var(--ets-text);
}

body.ets-ui-supercharged :where(.current-menu-item > a,.current_page_item > a,.is-active){
  color:var(--ets-accent)!important;
}

/* Hero / homepage cleanup */
body.ets-ui-supercharged :where(.wp-block-cover,.hero,.ets-hero,.terminal-hero,.homepage-hero){
  overflow:hidden;
  border-radius:clamp(18px,2vw,28px);
}

body.ets-ui-supercharged :where(.hero,.ets-hero,.terminal-hero,.homepage-hero){
  min-height:auto!important;
}

body.ets-ui-supercharged :where(.hero h1,.ets-hero h1,.terminal-hero h1,.homepage-hero h1){
  max-width:15ch;
}

body.ets-ui-supercharged :where(.hero p,.ets-hero p,.terminal-hero p,.homepage-hero p){
  max-width:62ch;
}

/* Generic premium surfaces */
body.ets-ui-supercharged :where(
  .wp-block-group.has-background,
  .ets-card,
  .token-card,
  .scanner-card,
  .opportunity-card,
  .dashboard-card,
  .metric-card,
  .panel,
  .terminal-panel,
  .research-card,
  .case-card,
  .alert-card,
  .pricing-card
){
  border:1px solid var(--ets-line);
  border-radius:var(--ets-radius);
  background:linear-gradient(155deg,var(--ets-surface-2),var(--ets-surface));
  box-shadow:var(--ets-shadow-soft);
}

body.ets-ui-supercharged :where(
  .ets-card,
  .token-card,
  .scanner-card,
  .opportunity-card,
  .dashboard-card,
  .metric-card,
  .panel,
  .terminal-panel,
  .research-card,
  .case-card,
  .alert-card,
  .pricing-card
){
  min-width:0;
  overflow:hidden;
}

body.ets-ui-supercharged :where(.card-header,.panel-header,.ets-card-header,.terminal-panel-header){
  padding:14px 16px;
  border-bottom:1px solid var(--ets-line);
}

body.ets-ui-supercharged :where(.card-body,.panel-body,.ets-card-body,.terminal-panel-body){
  padding:16px;
}

/* Grid safety */
body.ets-ui-supercharged :where(
  .wp-block-columns,
  .ets-grid,
  .dashboard-grid,
  .scanner-grid,
  .metric-grid,
  .opportunity-grid,
  .research-grid
){
  gap:14px;
}

body.ets-ui-supercharged :where(
  .wp-block-column,
  .ets-grid > *,
  .dashboard-grid > *,
  .scanner-grid > *,
  .metric-grid > *,
  .opportunity-grid > *,
  .research-grid > *
){
  min-width:0;
}

/* Buttons */
body.ets-ui-supercharged :where(
  button,
  .wp-element-button,
  .wp-block-button__link,
  .button,
  .btn,
  input[type="submit"],
  input[type="button"]
){
  border-radius:11px;
  min-height:40px;
  padding:.7rem 1rem;
  font-weight:850;
  line-height:1;
  transition:transform .14s ease,box-shadow .14s ease,background .14s ease,border-color .14s ease;
}

body.ets-ui-supercharged :where(
  button:hover,
  .wp-element-button:hover,
  .wp-block-button__link:hover,
  .button:hover,
  .btn:hover
){
  transform:translateY(-1px);
}

body.ets-ui-supercharged :where(.is-style-outline .wp-block-button__link,.btn-secondary,.button-secondary){
  border-color:var(--ets-line-strong);
  background:var(--ets-surface);
  color:var(--ets-text);
}

/* Form controls */
body.ets-ui-supercharged :where(input[type="text"],input[type="email"],input[type="search"],input[type="url"],input[type="number"],input[type="password"],select,textarea){
  width:100%;
  min-height:42px;
  border:1px solid var(--ets-line-strong);
  border-radius:11px;
  background:#0B1512;
  color:var(--ets-text);
  padding:.72rem .82rem;
  box-shadow:none;
}

body.ets-ui-supercharged :where(input,select,textarea)::placeholder{
  color:#63766F;
}

body.ets-ui-supercharged :where(input,select,textarea):focus{
  border-color:var(--ets-accent);
  outline:none;
  box-shadow:0 0 0 3px rgba(244,183,64,.12);
}

/* Tables: scanner/dashboard crispness */
body.ets-ui-supercharged :where(.wp-block-table,.table-wrap,.ets-table-wrap,.scanner-table-wrap,.dashboard-table-wrap){
  width:100%;
  max-width:100%;
  overflow-x:auto;
  -webkit-overflow-scrolling:touch;
  border:1px solid var(--ets-line);
  border-radius:var(--ets-radius);
  background:var(--ets-surface);
}

body.ets-ui-supercharged table{
  width:100%;
  border-collapse:separate;
  border-spacing:0;
  color:var(--ets-text-2);
}

body.ets-ui-supercharged table th{
  position:relative;
  background:#0D1915;
  color:#98AAA3;
  text-transform:uppercase;
  letter-spacing:.055em;
  font-size:.72rem;
  font-weight:900;
  white-space:nowrap;
}

body.ets-ui-supercharged table :where(th,td){
  padding:11px 12px;
  border-bottom:1px solid #1E302A;
  vertical-align:middle;
}

body.ets-ui-supercharged table tbody tr:last-child td{
  border-bottom:0;
}

body.ets-ui-supercharged table tbody tr:hover{
  background:rgba(255,255,255,.018);
}

/* Badges / status */
body.ets-ui-supercharged :where(.badge,.pill,.status,.tag,.chip){
  display:inline-flex;
  align-items:center;
  gap:5px;
  max-width:100%;
  border:1px solid var(--ets-line);
  border-radius:999px;
  padding:.3rem .55rem;
  background:#0D1815;
  color:var(--ets-text-2);
  font-size:.72rem;
  font-weight:850;
  white-space:nowrap;
}

body.ets-ui-supercharged :where(.status-success,.status-pass,.badge-pass,.is-positive){
  color:var(--ets-positive);
  border-color:rgba(77,215,162,.28);
  background:rgba(77,215,162,.07);
}

body.ets-ui-supercharged :where(.status-warning,.status-provisional,.badge-warning,.is-warning){
  color:var(--ets-warning);
  border-color:rgba(244,183,64,.28);
  background:rgba(244,183,64,.07);
}

body.ets-ui-supercharged :where(.status-danger,.status-fail,.badge-fail,.is-danger){
  color:var(--ets-danger);
  border-color:rgba(255,124,120,.28);
  background:rgba(255,124,120,.07);
}

/* Contract / hashes */
body.ets-ui-supercharged :where(code,.token-contract,.contract-address,.wallet-address,.mint-address){
  font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;
  overflow-wrap:anywhere;
}

/* Dashboard KPI blocks */
body.ets-ui-supercharged :where(.metric,.kpi,.stat,.dashboard-stat){
  min-width:0;
}

body.ets-ui-supercharged :where(.metric-value,.kpi-value,.stat-value){
  color:var(--ets-text);
  font-size:clamp(1.2rem,2.7vw,2rem);
  font-weight:900;
  letter-spacing:-.035em;
}

body.ets-ui-supercharged :where(.metric-label,.kpi-label,.stat-label){
  color:var(--ets-muted);
  font-size:.72rem;
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:.055em;
}

/* Scanner filters */
body.ets-ui-supercharged :where(.scanner-filters,.filter-bar,.ets-filter-bar,.toolbar,.terminal-toolbar){
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:8px;
  padding:10px;
  border:1px solid var(--ets-line);
  border-radius:14px;
  background:rgba(12,23,19,.9);
}

body.ets-ui-supercharged :where(.scanner-filters,.filter-bar,.ets-filter-bar) > *{
  min-width:0;
}

/* Modal/drawer polish */
body.ets-ui-supercharged :where(.modal,.dialog,.drawer,.sheet){
  border:1px solid var(--ets-line);
  border-radius:20px;
  background:var(--ets-surface);
  color:var(--ets-text);
  box-shadow:0 28px 90px rgba(0,0,0,.55);
}

/* WordPress admin-bar collision guard on frontend */
body.admin-bar.ets-ui-supercharged :where(.sticky,.is-sticky){
  top:32px;
}

/* Scrollbars */
body.ets-ui-supercharged *{
  scrollbar-width:thin;
  scrollbar-color:#344941 #0B1512;
}
body.ets-ui-supercharged *::-webkit-scrollbar{width:9px;height:9px}
body.ets-ui-supercharged *::-webkit-scrollbar-track{background:#0B1512}
body.ets-ui-supercharged *::-webkit-scrollbar-thumb{background:#344941;border-radius:12px;border:2px solid #0B1512}

/* Homepage app card becomes part of premium terminal language */
body.ets-ui-supercharged .ets-theme-app-home-card{
  margin-top:14px;
  margin-bottom:14px;
}
body.ets-ui-supercharged .ets-theme-app-home-card__inner{
  border-color:#334940;
  box-shadow:var(--ets-shadow-soft);
}
body.ets-ui-supercharged .ets-theme-app-home-card__inner h2{
  font-size:clamp(1rem,2vw,1.2rem);
}

/* Mobile */
@media(max-width:782px){
  body.ets-ui-supercharged{
    --ets-radius:14px;
    --ets-radius-lg:18px;
  }

  body.ets-ui-supercharged :where(.alignwide,.ets-container,.ets-shell,.ets-content-shell,.dashboard-shell,.terminal-shell){
    width:min(calc(100% - 20px),var(--ets-content));
  }

  body.ets-ui-supercharged h1{
    font-size:clamp(2rem,12vw,3.5rem);
    line-height:1;
  }

  body.ets-ui-supercharged h2{
    font-size:clamp(1.45rem,7vw,2.3rem);
  }

  body.ets-ui-supercharged :where(.hero,.ets-hero,.terminal-hero,.homepage-hero){
    padding-inline:0!important;
  }

  body.ets-ui-supercharged :where(.wp-block-columns,.dashboard-grid,.scanner-grid,.opportunity-grid,.research-grid){
    gap:10px;
  }

  body.ets-ui-supercharged :where(.wp-block-column,.dashboard-grid > *,.scanner-grid > *,.opportunity-grid > *,.research-grid > *){
    width:100%;
  }

  body.ets-ui-supercharged :where(.scanner-filters,.filter-bar,.ets-filter-bar,.toolbar,.terminal-toolbar){
    align-items:stretch;
  }

  body.ets-ui-supercharged :where(.scanner-filters,.filter-bar,.ets-filter-bar) :where(input,select,button){
    flex:1 1 140px;
  }

  body.ets-ui-supercharged table :where(th,td){
    padding:10px;
  }

  body.ets-ui-supercharged .site-header :where(.wp-block-site-logo img,.custom-logo){
    max-height:42px;
    width:auto;
  }

  /* Prevent giant homepage artwork/text from creating awkward overflow */
  body.ets-ui-supercharged :where(.wp-block-image,.hero-media,.ets-hero-media){
    max-width:100%;
    overflow:hidden;
  }

  body.ets-ui-supercharged :where(.wp-block-cover__inner-container,.hero-copy,.ets-hero-copy){
    min-width:0;
    width:100%;
  }
}

@media(max-width:480px){
  body.ets-ui-supercharged h1{
    font-size:clamp(2rem,11vw,3rem);
  }

  body.ets-ui-supercharged :where(.card-header,.panel-header,.ets-card-header,.terminal-panel-header){
    padding:12px 13px;
  }

  body.ets-ui-supercharged :where(.card-body,.panel-body,.ets-card-body,.terminal-panel-body){
    padding:13px;
  }

  body.ets-ui-supercharged :where(button,.wp-element-button,.wp-block-button__link,.button,.btn){
    min-height:42px;
  }

  body.ets-ui-supercharged .ets-theme-app-home-card__inner{
    border-radius:16px;
  }
}

/* Reduced motion */
@media(prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
  body.ets-ui-supercharged *{
    animation-duration:.01ms!important;
    animation-iteration-count:1!important;
    transition-duration:.01ms!important;
  }
}


/* v2.2.1 bottom CTA placement */
.ets-theme-app-footer-card{margin-top:28px;margin-bottom:24px;}
.ets-theme-app-footer-card[hidden]{display:none!important}


/* =========================================================
   ETS Insight Terminal App v2.3.0 — Premium Mobile Shell
   ========================================================= */

body.ets-premium-shell-v23{
  --ets-shell-black:#07100E;
  --ets-shell-panel:#0C1714;
  --ets-shell-panel-2:#101F1A;
  --ets-shell-line:#253832;
  --ets-shell-text:#F7FBF9;
  --ets-shell-muted:#91A19B;
  --ets-shell-accent:#F4B740;
}

/* Real ETS topbar/header polish */
body.ets-premium-shell-v23 .ets-topbar{
  position:sticky;
  top:0;
  z-index:1005;
  background:rgba(7,16,14,.95)!important;
  border-bottom:1px solid rgba(255,255,255,.07)!important;
  backdrop-filter:blur(18px);
  -webkit-backdrop-filter:blur(18px);
  box-shadow:0 8px 30px rgba(0,0,0,.16);
}
body.ets-premium-shell-v23 .ets-topbar :where(a,button,span){color:#D7E1DD}
body.ets-premium-shell-v23 .ets-topbar .ets-logo-img{
  width:36px;height:36px;border-radius:11px;box-shadow:0 0 0 1px rgba(255,255,255,.08)
}
body.ets-premium-shell-v23 .ets-menu-toggle{
  border-color:#31443E!important;
  background:#0D1915!important;
}
body.ets-premium-shell-v23 .ets-menu-toggle span{background:#F7FBF9!important}

/* Desktop navigation */
body.ets-premium-shell-v23 .ets-mainnav{
  background:rgba(9,18,15,.93)!important;
  border-bottom-color:#20332D!important;
  box-shadow:0 8px 28px rgba(0,0,0,.12)!important;
}
body.ets-premium-shell-v23 .ets-mainnav a,
body.ets-premium-shell-v23 .ets-nav-group-trigger{
  color:#91A19B!important;
}
body.ets-premium-shell-v23 .ets-mainnav a:hover,
body.ets-premium-shell-v23 .ets-nav-group-trigger:hover{
  background:#12201B!important;
  color:#F7FBF9!important;
}
body.ets-premium-shell-v23 .ets-mainnav a.is-current,
body.ets-premium-shell-v23 .ets-nav-group-trigger.has-current{
  background:#18231C!important;
  color:#F4B740!important;
  box-shadow:inset 0 -2px #F4B740!important;
}
body.ets-premium-shell-v23 .ets-nav-dropdown{
  background:#0C1714!important;
  border-color:#2A3D36!important;
  box-shadow:0 22px 60px rgba(0,0,0,.38)!important;
}
body.ets-premium-shell-v23 .ets-nav-dropdown a b{color:#F4F8F6!important}
body.ets-premium-shell-v23 .ets-nav-dropdown a small{color:#869891!important}

/* Page rhythm */
body.ets-premium-shell-v23 .ets-app-page{
  padding-bottom:24px;
}
body.ets-premium-shell-v23 .ets-page{
  max-width:1280px!important;
}
body.ets-premium-shell-v23 :where(.wp-block-group,.wp-block-cover,.wp-block-columns){
  scroll-margin-top:120px;
}

/* Public feed/member notices should read as deliberate app panels. */
body.ets-premium-shell-v23 :where(.ets-public-feed,.ets-member-notice,.ets-auth-notice,.ets-membership-notice){
  border:1px solid #31554E!important;
  border-radius:18px!important;
  background:linear-gradient(145deg,#0C211C,#0A1624)!important;
  color:#F5FAF8!important;
  box-shadow:0 18px 45px rgba(0,0,0,.22)!important;
}
body.ets-premium-shell-v23 :where(.ets-public-feed,.ets-member-notice,.ets-auth-notice,.ets-membership-notice) p{
  color:#AFC0BA!important;
}

/* Premium footer app CTA — intentionally at the bottom, never above the header. */
body.ets-premium-shell-v23 .ets-theme-app-footer-card{
  width:min(calc(100% - 28px),1180px);
  margin:44px auto 24px!important;
  padding:0;
}
body.ets-premium-shell-v23 .ets-theme-app-footer-card .ets-theme-app-home-card__inner{
  position:relative;
  overflow:hidden;
  grid-template-columns:auto minmax(0,1fr) auto;
  gap:20px;
  padding:24px;
  border:1px solid #365248;
  border-radius:24px;
  background:
    radial-gradient(circle at 12% 0%,rgba(244,183,64,.13),transparent 18rem),
    radial-gradient(circle at 100% 100%,rgba(68,255,210,.07),transparent 20rem),
    linear-gradient(145deg,#0C1714,#0A1512);
  box-shadow:0 20px 60px rgba(0,0,0,.26);
}
body.ets-premium-shell-v23 .ets-theme-app-footer-icon-wrap{
  width:70px;height:70px;border-radius:20px;display:grid;place-items:center;
  background:#09120F;border:1px solid #30473F;box-shadow:0 12px 30px rgba(0,0,0,.25)
}
body.ets-premium-shell-v23 .ets-theme-app-footer-icon-wrap img{width:56px;height:56px;border-radius:16px}
body.ets-premium-shell-v23 .ets-theme-app-footer-copy{min-width:0}
body.ets-premium-shell-v23 .ets-theme-app-footer-kicker{
  display:block;margin-bottom:6px;color:#F4B740;font-size:9px;font-weight:900;letter-spacing:1.4px
}
body.ets-premium-shell-v23 .ets-theme-app-footer-card h2{
  margin:0;color:#F7FBF9!important;font-size:clamp(20px,2.8vw,30px)!important;line-height:1.08
}
body.ets-premium-shell-v23 .ets-theme-app-footer-card p{
  margin:7px 0 0;color:#A6B5AF!important;font-size:12px;line-height:1.55
}
body.ets-premium-shell-v23 .ets-theme-app-footer-chips{display:flex;flex-wrap:wrap;gap:6px;margin-top:12px}
body.ets-premium-shell-v23 .ets-theme-app-footer-chips span{
  display:inline-flex;align-items:center;min-height:24px;padding:0 8px;border:1px solid #2B4039;border-radius:999px;
  background:#0B1512;color:#8FA39B;font-size:8px;font-weight:850;text-transform:uppercase;letter-spacing:.06em
}
body.ets-premium-shell-v23 .ets-theme-app-home-card__actions{align-items:center}
body.ets-premium-shell-v23 .ets-theme-app-home-card__actions button{
  box-shadow:0 10px 25px rgba(244,183,64,.17)
}

/* Fixed controls: reserve a consistent lane above the mobile nav. */
@media(max-width:900px){
  body.ets-premium-shell-v23{padding-bottom:calc(72px + env(safe-area-inset-bottom))}
  body.ets-premium-shell-v23 .ets-app-page{padding-bottom:calc(92px + env(safe-area-inset-bottom))}

  body.ets-premium-shell-v23 .ets-mainnav{
    top:58px!important;
    background:rgba(7,16,14,.985)!important;
    border-bottom-color:#20332D!important;
  }
  body.ets-premium-shell-v23 .ets-mainnav-inner{padding:10px 12px 20px!important}
  body.ets-premium-shell-v23 .ets-mainnav a,
  body.ets-premium-shell-v23 .ets-nav-group-trigger{
    min-height:44px!important;border-radius:10px!important;color:#B6C4BF!important
  }
  body.ets-premium-shell-v23 .ets-mainnav a.is-current{
    box-shadow:inset 3px 0 #F4B740!important;background:#14211C!important;color:#F4B740!important
  }
  body.ets-premium-shell-v23 .ets-nav-dropdown{
    background:transparent!important;border:0!important;box-shadow:none!important
  }

  body.ets-premium-shell-v23 .ets-mobile-nav{
    left:10px!important;right:10px!important;bottom:8px!important;
    width:auto!important;min-height:58px!important;
    border:1px solid #283B35!important;border-radius:18px!important;
    background:rgba(7,16,14,.96)!important;
    box-shadow:0 14px 40px rgba(0,0,0,.35)!important;
    backdrop-filter:blur(18px);-webkit-backdrop-filter:blur(18px);
  }
  body.ets-premium-shell-v23 .ets-mobile-nav a{
    min-height:48px!important;color:#7F918A!important;font-size:9px!important
  }
  body.ets-premium-shell-v23 .ets-mobile-nav a.active,
  body.ets-premium-shell-v23 .ets-mobile-nav a:hover{color:#F4B740!important}

  body.ets-premium-shell-v23 .ets-pwa-quick-scan{
    right:16px!important;bottom:calc(82px + env(safe-area-inset-bottom))!important;
    width:50px!important;height:50px!important;border-radius:15px!important;z-index:880!important
  }
  body.ets-premium-shell-v23 .ets-ui-history-float{
    left:16px!important;right:auto!important;bottom:calc(82px + env(safe-area-inset-bottom))!important;
    max-width:170px!important;min-height:48px!important;border-radius:15px!important;z-index:875!important
  }

  body.ets-premium-shell-v23 .ets-theme-app-footer-card{
    width:calc(100% - 20px);margin:32px auto 96px!important;
  }
  body.ets-premium-shell-v23 .ets-theme-app-footer-card .ets-theme-app-home-card__inner{
    grid-template-columns:60px minmax(0,1fr);gap:13px;padding:17px;border-radius:19px
  }
  body.ets-premium-shell-v23 .ets-theme-app-footer-icon-wrap{width:58px;height:58px;border-radius:16px}
  body.ets-premium-shell-v23 .ets-theme-app-footer-icon-wrap img{width:46px;height:46px;border-radius:13px}
  body.ets-premium-shell-v23 .ets-theme-app-home-card__actions{grid-column:1/-1;display:grid;grid-template-columns:1fr 1fr;width:100%;gap:8px}
  body.ets-premium-shell-v23 .ets-theme-app-home-card__actions button,
  body.ets-premium-shell-v23 .ets-theme-app-home-card__actions a{min-height:44px;display:flex;align-items:center;justify-content:center}
}

@media(max-width:480px){
  body.ets-premium-shell-v23 .ets-theme-app-footer-card h2{font-size:19px!important}
  body.ets-premium-shell-v23 .ets-theme-app-footer-card p{font-size:11px}
  body.ets-premium-shell-v23 .ets-theme-app-footer-chips span{font-size:7px}
}

/* =========================================================
   v3.0 — COMMAND CENTER
   ========================================================= */
body.ets-command-center-v30{
  background:
    radial-gradient(circle at 16% 0,rgba(40,210,155,.07),transparent 34rem),
    radial-gradient(circle at 92% 8%,rgba(246,189,74,.045),transparent 28rem),
    #050b09;
  color:var(--ets-text);
}

body.ets-command-center-v30 :where(.ets-page,.ets-app-page,.ets-shell,.terminal-shell,.dashboard-shell){
  width:min(calc(100% - 32px),1440px);
  margin-inline:auto;
}

body.ets-command-center-v30 :where(.ets-topbar,.site-header,.terminal-header){
  box-shadow:0 1px 0 rgba(255,255,255,.03),0 18px 60px rgba(0,0,0,.22);
}

body.ets-command-center-v30 :where(.ets-card,.token-card,.scanner-card,.opportunity-card,.dashboard-card,.metric-card,.panel,.terminal-panel,.research-card,.case-card,.alert-card,.pricing-card){
  border-color:var(--ets-line);
  background:linear-gradient(150deg,rgba(17,33,27,.96),rgba(7,16,13,.98));
  box-shadow:0 18px 55px rgba(0,0,0,.2),inset 0 1px rgba(255,255,255,.025);
  transition:border-color .18s ease,transform .18s ease,box-shadow .18s ease;
}

body.ets-command-center-v30 :where(.token-card,.opportunity-card,.dashboard-card,.metric-card,.research-card,.case-card):hover{
  border-color:#355a4d;
  transform:translateY(-2px);
  box-shadow:0 22px 64px rgba(0,0,0,.28),inset 0 1px rgba(255,255,255,.035);
}

body.ets-command-center-v30 :where(.metric-grid,.dashboard-grid,.scanner-grid,.opportunity-grid,.research-grid){
  display:grid;
  grid-template-columns:repeat(12,minmax(0,1fr));
  align-items:stretch;
}
body.ets-command-center-v30 :where(.metric-grid,.dashboard-grid) > *{grid-column:span 3}
body.ets-command-center-v30 :where(.scanner-grid,.opportunity-grid,.research-grid) > *{grid-column:span 4}

body.ets-command-center-v30 :where(.metric-value,.kpi-value,.score-value,.stat-value){
  color:#fff;
  font-variant-numeric:tabular-nums;
  letter-spacing:-.045em;
}

body.ets-command-center-v30 :where(.tabs,.ets-tabs,.filter-bar,.scanner-filters,.terminal-toolbar){
  gap:8px;
  border:1px solid var(--ets-line);
  border-radius:14px;
  padding:7px;
  background:rgba(7,16,13,.8);
}

body.ets-command-center-v30 :where(.tab,.ets-tab,.filter-chip){
  min-height:36px;
  border-radius:9px;
  color:var(--ets-muted);
}
body.ets-command-center-v30 :where(.tab.active,.ets-tab.active,.filter-chip.active,[aria-selected="true"]){
  background:#173128;
  color:var(--ets-accent);
  box-shadow:inset 0 0 0 1px #315447;
}

body.ets-command-center-v30 :where(.status-verified,.verified,.is-verified){color:var(--ets-positive)}
body.ets-command-center-v30 :where(.status-provisional,.provisional,.is-provisional){color:var(--ets-accent)}
body.ets-command-center-v30 :where(.status-disputed,.disputed,.is-disputed,.status-danger){color:var(--ets-danger)}

body.ets-command-center-v30 .ets-table-wrap{
  position:relative;
  scrollbar-width:thin;
  scrollbar-color:#315247 #091310;
}
body.ets-command-center-v30 table th{
  position:sticky;
  top:0;
  z-index:2;
  background:#0b1713;
}
body.ets-command-center-v30 table :where(th,td){font-variant-numeric:tabular-nums}
body.ets-command-center-v30 table tbody tr{transition:background .15s ease}
body.ets-command-center-v30 table tbody tr:hover{background:rgba(82,223,169,.035)}

body.ets-command-center-v30 :where(.notice,.ets-notice,.empty-state,.loading-state,.error-state){
  border:1px solid var(--ets-line);
  border-radius:14px;
  padding:14px 16px;
  background:#0b1713;
}

body.ets-command-center-v30 :where(button,.button,.btn,.wp-element-button,.wp-block-button__link){
  min-height:42px;
}
body.ets-command-center-v30 :where(.button-primary,.btn-primary,.wp-block-button:not(.is-style-outline) .wp-block-button__link){
  background:linear-gradient(135deg,#ffd06d,#e6a92f);
  color:#08110e;
  box-shadow:0 10px 28px rgba(246,189,74,.16);
}
body.ets-command-center-v30 :where(button,.button,.btn)[disabled]{
  cursor:not-allowed;
  opacity:.52;
  transform:none;
}

@media(max-width:1100px){
  body.ets-command-center-v30 :where(.metric-grid,.dashboard-grid) > *{grid-column:span 6}
  body.ets-command-center-v30 :where(.scanner-grid,.opportunity-grid,.research-grid) > *{grid-column:span 6}
}

@media(max-width:700px){
  body.ets-command-center-v30 :where(.ets-page,.ets-app-page,.ets-shell,.terminal-shell,.dashboard-shell){
    width:min(calc(100% - 20px),1440px);
  }
  body.ets-command-center-v30 :where(.metric-grid,.dashboard-grid,.scanner-grid,.opportunity-grid,.research-grid) > *{
    grid-column:1/-1;
  }
  body.ets-command-center-v30 table :where(th,td){padding:10px;font-size:.78rem}
  body.ets-command-center-v30 :where(button,.button,.btn,.wp-element-button,.wp-block-button__link){
    min-height:44px;
  }
}

/* =========================================================
   v3.0.3 — LONG-HOLD MODE MOBILE REPAIR
   ========================================================= */
body.ets-hold-mode-page .ets-hold-hero,
body.ets-hold-mode-page .ets-light-surface .ets-hold-hero{
  color:#f7fbf9!important;
  background:linear-gradient(155deg,#063344,#06111c)!important;
}
body.ets-hold-mode-page .ets-hold-hero :where(h1,h2,h3,h4,strong,b,.metric-value,.score-value){
  color:#f7fbf9!important;
  text-shadow:none!important;
}
body.ets-hold-mode-page .ets-hold-hero :where(p,li,span,small,.description,.subtitle,.muted,.meta){
  color:#b9cbc5!important;
}
body.ets-hold-mode-page .ets-hold-hero :where(.positive,.gain,.verified,.status-verified){
  color:#69efba!important;
}
body.ets-hold-mode-page .ets-hold-hero :where(.warning,.provisional,.status-provisional){
  color:#ffd36f!important;
}
body.ets-hold-mode-page .ets-hold-hero :where(.negative,.loss,.error,.disputed,.status-disputed){
  color:#ff9b98!important;
}

body.ets-hold-mode-page .ets-hold-actions{
  display:flex!important;
  flex-wrap:nowrap!important;
  align-items:center!important;
  justify-content:flex-end!important;
  gap:10px!important;
  min-width:min(100%,310px);
}
body.ets-hold-mode-page .ets-hold-action{
  width:auto!important;
  min-width:132px!important;
  max-width:none!important;
  min-height:48px!important;
  padding:12px 18px!important;
  white-space:nowrap!important;
  word-break:normal!important;
  overflow-wrap:normal!important;
  line-height:1.15!important;
}

@media(max-width:700px){
  body.ets-hold-mode-page .ets-hold-page-header{
    display:grid!important;
    grid-template-columns:minmax(0,1fr)!important;
    gap:14px!important;
    align-items:start!important;
  }
  body.ets-hold-mode-page .ets-hold-actions{
    width:100%!important;
    min-width:0!important;
    justify-content:stretch!important;
  }
  body.ets-hold-mode-page .ets-hold-action{
    flex:1 1 0!important;
    min-width:0!important;
    padding:12px 10px!important;
    font-size:.92rem!important;
  }
  body.ets-hold-mode-page .ets-hold-hero{
    padding:28px 20px!important;
  }
  body.ets-hold-mode-page .ets-hold-hero h1{
    font-size:clamp(2.25rem,12vw,4rem)!important;
    line-height:.98!important;
    overflow-wrap:normal!important;
    word-break:normal!important;
  }
}

@media(max-width:380px){
  body.ets-hold-mode-page .ets-hold-actions{flex-wrap:wrap!important}
  body.ets-hold-mode-page .ets-hold-action{flex:1 1 100%!important}
}

/* =========================================================
   v3.0.1 — TEXT CLARITY & ACCESSIBLE CONTRAST
   ========================================================= */
body.ets-command-center-v30{
  --ets-text:#ffffff;
  --ets-text-2:#d9e7e1;
  --ets-muted:#aec1ba;
  --ets-muted-2:#92aaa1;
}

/* Default copy must remain readable, including content emitted by plugins. */
body.ets-command-center-v30 :where(
  p,li,dd,dt,label,legend,figcaption,
  .description,.help-text,.helper-text,.subtitle,.subheading,
  .card-copy,.panel-copy,.token-meta,.metric-label,.stat-label
){
  color:var(--ets-text-2);
}

body.ets-command-center-v30 :where(
  h1,h2,h3,h4,h5,h6,strong,b,
  .entry-title,.page-title,.card-title,.panel-title,.token-name,
  .metric-value,.kpi-value,.score-value,.stat-value
){
  color:#fff;
}

body.ets-command-center-v30 :where(
  small,.muted,.subtle,.meta,.eyebrow,.kicker,
  .timestamp,.caption,.token-symbol,.metric-label,.stat-label
){
  color:var(--ets-muted);
}

/* Links stay visible on every dark surface. */
body.ets-command-center-v30 main a:not(.button):not(.btn):not(.wp-element-button){
  color:#79e8bd;
  text-decoration-color:rgba(121,232,189,.48);
}
body.ets-command-center-v30 main a:not(.button):not(.btn):not(.wp-element-button):hover{
  color:#b7f7df;
  text-decoration-color:currentColor;
}

/* Navigation and inactive controls: lighter than before, never dark grey. */
body.ets-command-center-v30 :where(
  .ets-mainnav a,.ets-nav-group-trigger,.ets-mobile-nav a,
  .tab,.ets-tab,.filter-chip
){
  color:#b9cbc4!important;
}
body.ets-command-center-v30 :where(
  .ets-mainnav a:hover,.ets-nav-group-trigger:hover,.ets-mobile-nav a:hover,
  .tab:hover,.ets-tab:hover,.filter-chip:hover
){
  color:#fff!important;
}

/* Tables need clear labels and values, including plugin-defined colours. */
body.ets-command-center-v30 table{color:#dce9e4}
body.ets-command-center-v30 table th{color:#bdd0c8!important}
body.ets-command-center-v30 table td{color:#e3eee9}
body.ets-command-center-v30 table td :where(span,small):not(.badge):not(.pill):not(.status):not(.tag):not(.chip){
  color:inherit;
}

/* Inputs and dropdowns: readable values, labels and hints. */
body.ets-command-center-v30 :where(
  input[type="text"],input[type="email"],input[type="search"],input[type="url"],
  input[type="number"],input[type="password"],select,textarea
){
  color:#fff!important;
  background:#08130f!important;
}
body.ets-command-center-v30 :where(input,textarea)::placeholder{
  color:#9ab0a7!important;
  opacity:1;
}
body.ets-command-center-v30 select option{
  color:#fff;
  background:#0b1713;
}

/* Notices and membership messages must not inherit dark plugin text. */
body.ets-command-center-v30 :where(
  .notice,.ets-notice,.empty-state,.loading-state,.error-state,
  .ets-public-feed,.ets-member-notice,.ets-auth-notice,.ets-membership-notice
){
  color:#e8f2ee!important;
}
body.ets-command-center-v30 :where(
  .notice,.ets-notice,.empty-state,.loading-state,.error-state,
  .ets-public-feed,.ets-member-notice,.ets-auth-notice,.ets-membership-notice
) :where(p,li,span,small){
  color:#c8d9d2!important;
}

/* Preserve semantic colours, but brighten them for the dark canvas. */
body.ets-command-center-v30 :where(.status-verified,.verified,.is-verified,.positive,.gain){
  color:#69efba!important;
}
body.ets-command-center-v30 :where(.status-provisional,.provisional,.is-provisional,.warning){
  color:#ffd36f!important;
}
body.ets-command-center-v30 :where(.status-disputed,.disputed,.is-disputed,.status-danger,.negative,.loss,.error){
  color:#ff9b98!important;
}

/* Secondary buttons previously risked dark text on dark backgrounds. */
body.ets-command-center-v30 :where(
  .btn-secondary,.button-secondary,.is-style-outline .wp-block-button__link,
  button:not(.button-primary):not(.btn-primary)
){
  color:#edf6f2;
}
body.ets-command-center-v30 :where(.button-primary,.btn-primary,.wp-block-button:not(.is-style-outline) .wp-block-button__link){
  color:#07100d!important;
}
body.ets-command-center-v30 :where(button,.button,.btn)[disabled]{
  opacity:.72;
  color:#aebfb8;
}

/* Footer and app installation panel. */
body.ets-command-center-v30 :where(footer,.site-footer,.ets-footer) :where(p,li,span,small,a){
  color:#b9cbc4;
}
body.ets-command-center-v30 :where(footer,.site-footer,.ets-footer) a:hover{color:#fff}
body.ets-command-center-v30 .ets-theme-app-footer-copy p{color:#c2d3cc}
body.ets-command-center-v30 .ets-theme-app-footer-chips span{color:#b4c8c0}

@media(forced-colors:active){
  body.ets-command-center-v30 *{forced-color-adjust:auto}
}

/* =========================================================
   v3.0.2 — ADAPTIVE LIGHT-SURFACE CONTRAST
   Homepage sections use light cards; these rules prevent white-on-white text.
   ========================================================= */
body.ets-command-center-v30 .ets-light-surface{
  --ets-local-text:#14211d;
  --ets-local-copy:#40564e;
  --ets-local-muted:#61766e;
  color:var(--ets-local-text)!important;
}
body.ets-command-center-v30 .ets-light-surface :where(
  h1,h2,h3,h4,h5,h6,strong,b,
  .entry-title,.page-title,.card-title,.panel-title,.token-name,
  .metric-value,.kpi-value,.score-value,.stat-value
){
  color:var(--ets-local-text)!important;
  text-shadow:none!important;
}
body.ets-command-center-v30 .ets-light-surface :where(
  p,li,dd,dt,label,legend,figcaption,
  .description,.help-text,.helper-text,.subtitle,.subheading,
  .card-copy,.panel-copy,.token-meta,.metric-label,.stat-label
){
  color:var(--ets-local-copy)!important;
}
body.ets-command-center-v30 .ets-light-surface :where(
  small,.muted,.subtle,.meta,.eyebrow,.kicker,.timestamp,.caption,.token-symbol
){
  color:var(--ets-local-muted)!important;
}
body.ets-command-center-v30 .ets-light-surface a:not(.button):not(.btn):not(.wp-element-button){
  color:#075fd8!important;
}
body.ets-command-center-v30 .ets-light-surface :where(.positive,.gain,.status-verified,.verified,.is-verified){
  color:#087653!important;
}
body.ets-command-center-v30 .ets-light-surface :where(.warning,.status-provisional,.provisional,.is-provisional){
  color:#805600!important;
}
body.ets-command-center-v30 .ets-light-surface :where(.negative,.loss,.error,.status-disputed,.disputed,.is-disputed){
  color:#a62d37!important;
}
body.ets-command-center-v30 .ets-light-surface :where(.badge,.pill,.status,.tag,.chip){
  color:#34463f!important;
  border-color:#c7d0cc!important;
  background:#fff!important;
}

/* Keep deliberately dark panels light-on-dark even if nested in a pale section. */
body.ets-command-center-v30 .ets-light-surface :where(
  .ets-public-feed,.ets-member-notice,.ets-auth-notice,.ets-membership-notice,
  .ets-topbar,.ets-mainnav,.ets-mobile-nav,.ets-theme-help-sheet
){
  color:#fff!important;
}
body.ets-command-center-v30 .ets-light-surface :where(
  .ets-public-feed,.ets-member-notice,.ets-auth-notice,.ets-membership-notice,
  .ets-topbar,.ets-mainnav,.ets-mobile-nav,.ets-theme-help-sheet
) :where(h1,h2,h3,h4,h5,h6,p,span,small,strong,b,a){
  color:#eef7f3!important;
}

/* The mobile public-feed notice should not cover most of the content. */
@media(max-width:700px){
  body.ets-command-center-v30 :where(.ets-public-feed,.ets-member-notice,.ets-auth-notice,.ets-membership-notice){
    max-height:min(42vh,300px);
    overflow:auto;
  }
}

/* =========================================================
   v3.1.0 — UNIFIED DARK SYSTEM
   One colour system across every ETS workspace and public page.
   ========================================================= */
body.ets-unified-dark{
  --ets-bg:#050c0a;
  --ets-surface:#091512;
  --ets-surface-2:#0e201a;
  --ets-surface-3:#142b23;
  --ets-line:#28483d;
  --ets-line-strong:#3a6555;
  --ets-text:#f8fcfa;
  --ets-text-2:#d7e5df;
  --ets-muted:#a5bbb2;
  --ets-muted-2:#8fa79e;
  --ets-accent:#f6bd4a;
  background:#050c0a!important;
  color:var(--ets-text)!important;
}

/* Convert every previously pale surface to the shared dark palette. */
body.ets-unified-dark .ets-light-surface,
body.ets-unified-dark :where(
  .wp-block-group.has-background,.wp-block-cover,
  .ets-card,.token-card,.scanner-card,.opportunity-card,.dashboard-card,
  .metric-card,.panel,.terminal-panel,.research-card,.case-card,.alert-card,
  .pricing-card,.empty-state,.loading-state,.error-state,
  .ets-workspace,.ets-inspector,.ets-preview,.terminal-preview
){
  color:var(--ets-text)!important;
  border-color:var(--ets-line)!important;
  background:linear-gradient(150deg,#0e201a,#08130f)!important;
  background-color:#0b1915!important;
  box-shadow:0 16px 48px rgba(0,0,0,.24),inset 0 1px rgba(255,255,255,.025)!important;
}

/* Global typography: no pale-on-pale or dark-on-dark inheritance. */
body.ets-unified-dark main :where(h1,h2,h3,h4,h5,h6,strong,b),
body.ets-unified-dark .ets-light-surface :where(h1,h2,h3,h4,h5,h6,strong,b){
  color:#fff!important;
  text-shadow:none!important;
}
body.ets-unified-dark main :where(
  p,li,dd,dt,label,legend,figcaption,
  .description,.help-text,.helper-text,.subtitle,.subheading,
  .card-copy,.panel-copy,.token-meta
),
body.ets-unified-dark .ets-light-surface :where(p,li,dd,dt,label,legend,figcaption){
  color:var(--ets-text-2)!important;
}
body.ets-unified-dark main :where(
  small,.muted,.subtle,.meta,.eyebrow,.kicker,.timestamp,.caption,
  .token-symbol,.metric-label,.stat-label
){
  color:var(--ets-muted)!important;
}

/* Scanner, discovery and research tables. */
body.ets-unified-dark :where(.wp-block-table,.table-wrap,.ets-table-wrap,.scanner-table-wrap,.dashboard-table-wrap){
  border-color:var(--ets-line)!important;
  background:#08130f!important;
}
body.ets-unified-dark table{
  color:#e5efe9!important;
  background:#08130f!important;
}
body.ets-unified-dark table :where(thead,th){
  color:#bdd2c9!important;
  background:#10231c!important;
}
body.ets-unified-dark table td{
  color:#e5efe9!important;
  background:#0a1713!important;
  border-color:#203b32!important;
}
body.ets-unified-dark table tbody tr:hover td{background:#11251e!important}

/* Tabs and filters use one consistent active/inactive treatment. */
body.ets-unified-dark :where(.tabs,.ets-tabs,.filter-bar,.scanner-filters,.terminal-toolbar){
  border-color:var(--ets-line)!important;
  background:#07110e!important;
}
body.ets-unified-dark :where(.tab,.ets-tab,.filter-chip,[role="tab"]){
  color:#b9ccc4!important;
  background:#0b1915!important;
  border-color:#29483d!important;
}
body.ets-unified-dark :where(.tab.active,.ets-tab.active,.filter-chip.active,[role="tab"][aria-selected="true"]){
  color:#ffd36f!important;
  background:#18362b!important;
  border-color:#4f796a!important;
}

/* Empty/loading panels shown in the supplied scanner screenshot. */
body.ets-unified-dark :where(.empty-state,.loading-state,.error-state) :where(h1,h2,h3,h4,strong,b){
  color:#fff!important;
}
body.ets-unified-dark :where(.empty-state,.loading-state,.error-state) :where(p,span,small){
  color:#c8d9d2!important;
}

/* Forms */
body.ets-unified-dark :where(input,select,textarea){
  color:#fff!important;
  background:#07110e!important;
  border-color:#36594c!important;
}
body.ets-unified-dark :where(input,textarea)::placeholder{
  color:#9eb3aa!important;
  opacity:1!important;
}

/* Links and actions */
body.ets-unified-dark main a:not(.button):not(.btn):not(.wp-element-button){
  color:#7ce9bf!important;
}
body.ets-unified-dark main a:not(.button):not(.btn):not(.wp-element-button):hover{
  color:#c0f9e3!important;
}
body.ets-unified-dark :where(.btn-secondary,.button-secondary,.is-style-outline .wp-block-button__link){
  color:#f2f8f5!important;
  background:#10221c!important;
  border-color:#3c6254!important;
}

/* Semantics are identical everywhere. */
body.ets-unified-dark :where(.positive,.gain,.verified,.is-verified,.status-verified){color:#69efba!important}
body.ets-unified-dark :where(.warning,.provisional,.is-provisional,.status-provisional){color:#ffd36f!important}
body.ets-unified-dark :where(.negative,.loss,.error,.disputed,.is-disputed,.status-disputed){color:#ff9b98!important}
body.ets-unified-dark :where(.unknown,.status-unknown){color:#b7c9c1!important}

/* Mobile dock and floating controls follow the same palette. */
body.ets-unified-dark :where(.ets-mobile-nav,.ets-ui-history-float){
  color:#eef7f3!important;
  background:rgba(5,14,11,.97)!important;
  border-color:#315146!important;
}

@media(max-width:700px){
  body.ets-unified-dark main{background:#050c0a!important}
  body.ets-unified-dark :where(.ets-card,.token-card,.scanner-card,.dashboard-card,.panel,.terminal-panel){
    border-radius:16px!important;
  }
}


/* =========================================================
   v3.1.1 — SCANNER DARK SURFACE REPAIR
   Removes legacy white workspace chrome from the parent theme.
   ========================================================= */
body.ets-unified-dark .ets-shell{
  background:#07101a!important;
  color:var(--ets-text)!important;
}
body.ets-unified-dark .ets-nav{
  background:#08130f!important;
  background-image:none!important;
  color:var(--ets-text-2)!important;
  border-color:var(--ets-line)!important;
}
body.ets-unified-dark .ets-nav :where(a,span,p,.ets-nav-title,.ets-nav-foot){
  color:#b9ccc4!important;
}
body.ets-unified-dark .ets-nav a:hover,
body.ets-unified-dark .ets-nav a.active{
  color:#7ce9bf!important;
  background:#10241d!important;
}
body.ets-unified-dark .ets-workbar,
body.ets-unified-dark .ets-filters,
body.ets-unified-dark .ets-inspector-tabs{
  background:#08130f!important;
  background-image:none!important;
  color:var(--ets-text)!important;
  border-color:var(--ets-line)!important;
}
body.ets-unified-dark .ets-workbar :where(strong,span,small){
  color:inherit!important;
}
body.ets-unified-dark .ets-filters{
  display:flex!important;
  flex-wrap:wrap!important;
  align-items:center!important;
  gap:8px!important;
}
body.ets-unified-dark .ets-filters > br{display:none!important}
body.ets-unified-dark .ets-filters select{
  flex:1 1 132px!important;
  min-width:118px!important;
  max-width:220px!important;
}
body.ets-unified-dark .ets-filters .ets-live-state{
  flex:0 0 auto!important;
  width:auto!important;
  min-width:max-content!important;
  white-space:nowrap!important;
  writing-mode:horizontal-tb!important;
  color:#9eb3aa!important;
}
body.ets-unified-dark .ets-inspector-tabs{
  overflow-x:auto!important;
  scrollbar-width:thin;
}
body.ets-unified-dark .ets-inspector-tabs button{
  flex:0 0 auto!important;
  color:#b9ccc4!important;
  background:#0b1915!important;
  border-color:#29483d!important;
}
body.ets-unified-dark .ets-inspector-tabs button.active{
  color:#ffd36f!important;
  background:#18362b!important;
  border-color:#4f796a!important;
}
body.ets-unified-dark .ets-empty{
  color:var(--ets-text-2)!important;
  background:#07110e!important;
  border-color:var(--ets-line)!important;
}
body.ets-unified-dark .ets-empty :where(strong,p,span){color:inherit!important}

@media(max-width:900px){
  body.ets-unified-dark .ets-filters select{max-width:none!important}
}


/* =========================================================
   v3.1.2 — MOBILE RESEARCH CARD CONTRAST + TAB OVERFLOW
   ========================================================= */
body.ets-unified-dark main :where(
  article,
  [class*="research-card"],
  [class*="research-item"],
  [class*="qualification-card"],
  [class*="candidate-card"]
){
  color:#f8fcfa!important;
  background:linear-gradient(150deg,#0e201a,#08130f)!important;
  background-color:#0b1915!important;
  border-color:#315146!important;
}
body.ets-unified-dark main :where(
  article,
  [class*="research-card"],
  [class*="research-item"],
  [class*="qualification-card"],
  [class*="candidate-card"]
) :where(h1,h2,h3,h4,h5,h6,strong,b){
  color:#ffffff!important;
  text-shadow:none!important;
}
body.ets-unified-dark main :where(
  article,
  [class*="research-card"],
  [class*="research-item"],
  [class*="qualification-card"],
  [class*="candidate-card"]
) :where(p,li,span,small,label){
  color:#d7e5df!important;
}
body.ets-unified-dark main :where(.positive,.gain,.verified,.status-verified){color:#69efba!important}
body.ets-unified-dark main :where(.warning,.provisional,.status-provisional){color:#ffd36f!important}
body.ets-unified-dark main :where(.negative,.loss,.error,.disputed,.status-disputed){color:#ff9b98!important}
body.ets-unified-dark main :where(.unknown,.status-unknown){color:#b7c9c1!important}

@media(max-width:700px){
  body.ets-unified-dark :where(
    .ets-mobile-tabs,.ets-app-tabs,.ets-scanner-tabs,.ets-bottom-tabs,
    [role="tablist"]
  ){
    display:flex!important;
    max-width:100vw!important;
    overflow-x:auto!important;
    overflow-y:hidden!important;
    overscroll-behavior-inline:contain;
    scrollbar-width:none;
  }
  body.ets-unified-dark :where(
    .ets-mobile-tabs,.ets-app-tabs,.ets-scanner-tabs,.ets-bottom-tabs,
    [role="tablist"]
  )::-webkit-scrollbar{display:none}
  body.ets-unified-dark :where(
    .ets-mobile-tabs,.ets-app-tabs,.ets-scanner-tabs,.ets-bottom-tabs,
    [role="tablist"]
  ) > *{
    flex:0 0 auto!important;
    min-width:max-content!important;
    white-space:nowrap!important;
  }
}

/* ETS palette repair — 2026-09-30 */
body.ets-ui-supercharged.ets-command-center-v30.ets-unified-dark{
--ets-bg:#f5f7fb;--ets-surface:#fff;--ets-surface-2:#eef2ff;--ets-surface-3:#e7ecf8;--ets-line:#dce3ef;--ets-line-strong:#b8c7dd;--ets-text:#111827;--ets-text-2:#344054;--ets-muted:#526079;--ets-muted-2:#667085;--ets-accent:#3430ed;--ets-positive:#087653;--ets-danger:#b42318;
background:#f5f7fb!important;color:#111827!important;
}
body.ets-ui-supercharged.ets-command-center-v30.ets-unified-dark :is(.ets-shell,main){background:#f5f7fb!important;color:#111827!important}
body.ets-ui-supercharged.ets-command-center-v30.ets-unified-dark :is(.ets-topbar,.ets-mainnav,.ets-nav,.ets-workbar,.ets-filters,.ets-inspector,.ets-inspector-tabs,.ets-card,.token-card,.scanner-card,.dashboard-card,.panel,.terminal-panel,.research-card,.alert-card,.pricing-card,.ets-light-surface,article){background:#fff!important;background-image:none!important;border-color:#dce3ef!important;color:#111827!important;box-shadow:0 8px 28px rgba(22,34,64,.06)!important}
body.ets-ui-supercharged.ets-command-center-v30.ets-unified-dark :is(main,.ets-topbar,.ets-mainnav,.ets-nav) :is(h1,h2,h3,h4,h5,h6,strong,b){color:#111827!important;text-shadow:none!important}
body.ets-ui-supercharged.ets-command-center-v30.ets-unified-dark :is(main,.ets-nav) :is(p,li,dd,dt,label,legend,figcaption){color:#344054!important}
body.ets-ui-supercharged.ets-command-center-v30.ets-unified-dark :is(main,.ets-nav) :is(small,.muted,.meta,.subtitle,.metric-label,.stat-label,.ets-live-state){color:#526079!important}
body.ets-ui-supercharged.ets-command-center-v30.ets-unified-dark :is(input,select,textarea){background:#fff!important;color:#111827!important;border-color:#b8c7dd!important}
body.ets-ui-supercharged.ets-command-center-v30.ets-unified-dark :is(.ets-workbar,.ets-inspector-tabs) button{background:#eef2ff!important;color:#3029c7!important;border-color:#cbd5ed!important}
body.ets-ui-supercharged.ets-command-center-v30.ets-unified-dark :is(.ets-wallet-pill,.ets-primary,.ets-btn-primary){background:#3430ed!important;color:#fff!important;border-color:#3430ed!important}
body.ets-ui-supercharged.ets-command-center-v30.ets-unified-dark :is(.ets-topbar,.ets-mainnav,.ets-nav) a{color:#344054!important}
body.ets-ui-supercharged.ets-command-center-v30.ets-unified-dark :is(.ets-nav-group-trigger,.ets-command-trigger,.ets-menu-toggle){background:#eef2ff!important;color:#3029c7!important;border-color:#cbd5ed!important}
body.ets-ui-supercharged.ets-command-center-v30.ets-unified-dark :is(.ets-nav-group-trigger,.ets-mainnav) span{color:inherit!important}
body.ets-ui-supercharged.ets-command-center-v30.ets-unified-dark .ets-empty{background:#f5f7fb!important;color:#344054!important;border-color:#dce3ef!important}
body.ets-ui-supercharged.ets-command-center-v30.ets-unified-dark table{background:#fff!important;color:#344054!important}
body.ets-ui-supercharged.ets-command-center-v30.ets-unified-dark table :is(th,thead){background:#eef2ff!important;color:#344054!important}
body.ets-ui-supercharged.ets-command-center-v30.ets-unified-dark table td{background:#fff!important;color:#344054!important;border-color:#dce3ef!important}
body.ets-ui-supercharged.ets-command-center-v30.ets-unified-dark :is(.positive,.gain,.verified,.status-verified){color:#087653!important}
body.ets-ui-supercharged.ets-command-center-v30.ets-unified-dark :is(.warning,.provisional,.status-provisional){color:#805600!important}
body.ets-ui-supercharged.ets-command-center-v30.ets-unified-dark :is(.negative,.loss,.error,.disputed,.status-disputed){color:#b42318!important}
body.ets-ui-supercharged.ets-command-center-v30.ets-unified-dark :is(.unknown,.status-unknown){color:#526079!important}
body.ets-ui-supercharged.ets-command-center-v30.ets-unified-dark .ets-filters{display:flex!important;flex-wrap:wrap!important;gap:8px!important}
body.ets-ui-supercharged.ets-command-center-v30.ets-unified-dark .ets-filters select{flex:1 1 140px!important;max-width:220px!important}
@media(max-width:700px){body.ets-ui-supercharged.ets-command-center-v30.ets-unified-dark .ets-filters select{max-width:none!important}}

body.ets-ui-supercharged.ets-command-center-v30.ets-unified-dark .ets-nav a:not(.button):not(.btn):not(.wp-element-button){display:block!important;color:#344054!important;background:transparent!important;padding:10px 12px!important;white-space:normal!important;overflow-wrap:normal!important}
body.ets-ui-supercharged.ets-command-center-v30.ets-unified-dark .ets-nav a.active:not(.button):not(.btn):not(.wp-element-button){background:#3430ed!important;color:#fff!important}
body.ets-ui-supercharged.ets-command-center-v30.ets-unified-dark .ets-nav span{color:#526079!important}
body.ets-ui-supercharged.ets-command-center-v30.ets-unified-dark .ets-inspector-tabs button.active{background:#3430ed!important;color:#fff!important}
body.ets-ui-supercharged.ets-command-center-v30.ets-unified-dark .ets-mainnav a.active{background:#eef2ff!important;color:#3029c7!important}

body.ets-ui-supercharged.ets-command-center-v30.ets-unified-dark :is(.ets-nav,.ets-mainnav,.ets-topbar,main) *{-webkit-text-fill-color:currentColor!important}
