/* Tyson Trades Build 13.4 — global three-theme foundation.
   Loaded last on every UI page. Home character/art assets are intentionally untouched. */

html[data-theme="dark"]{
  color-scheme:dark;
  --bg:#030609;--bg-grad:#070b10;--surface:#080d13;--surface-2:#0c1219;--surface-3:#111922;
  --border:rgba(216,170,66,.25);--border-soft:rgba(216,170,66,.15);
  --text:#f8fafc;--text-dim:#d0d6de;--text-faint:#98a2ae;--heading:#fff;
  --gold:#d8aa42;--gold-bright:#f1c65d;--blue:#6f7c89;--blue-bright:#9aa6b2;
  --tt-bg:#030609;--tt-bg-2:#070b10;--tt-surface:#080d13;--tt-surface-2:#0d141c;--tt-surface-3:#111922;--tt-input:#080e15;
  --tt-border:rgba(216,170,66,.22);--tt-border-strong:rgba(241,198,93,.40);
  --tt-text:#f8fafc;--tt-text-2:#d0d6de;--tt-muted:#a3adb9;--tt-muted-2:#87929f;
  --ws-bg:#030609;--ws-panel:#080d13;--ws-panel-2:#0d141c;--ws-panel-3:#111922;
  --ws-border:rgba(216,170,66,.22);--ws-border-strong:rgba(241,198,93,.46);
  --ws-text:#f8fafc;--ws-text-2:#d0d6de;--ws-text-3:#9ca7b4;--ws-blue:#6f7c89;
}

html[data-theme="classic"]{
  color-scheme:dark;
  --bg:#030715;--bg-grad:#061027;--surface:#081225;--surface-2:#0c1830;--surface-3:#11203b;
  --border:#2a4274;--border-soft:#21345d;--text:#f8fbff;--text-dim:#c8d3e5;--text-faint:#8fa0ba;--heading:#fff;
  --gold:#d8aa42;--gold-bright:#f1c65d;--blue:#4774ff;--blue-bright:#7395ff;
  --tt-bg:#030715;--tt-bg-2:#050c1b;--tt-surface:#081225;--tt-surface-2:#0c1830;--tt-surface-3:#11203b;--tt-input:#0a1730;
  --tt-border:#2a4274;--tt-border-strong:#4774a8;--tt-text:#f8fbff;--tt-text-2:#c8d3e5;--tt-muted:#a5b2c8;--tt-muted-2:#8190aa;
  --ws-bg:#030715;--ws-panel:#081225;--ws-panel-2:#0c1830;--ws-panel-3:#11203b;
  --ws-border:#2a4274;--ws-border-strong:#4774a8;--ws-text:#f8fbff;--ws-text-2:#c8d3e5;--ws-text-3:#8fa0ba;--ws-blue:#4774ff;
}

html[data-theme="white"]{
  color-scheme:light;
  --bg:#f4f6fa;--bg-grad:#eef2f7;--surface:#fff;--surface-2:#f8fafc;--surface-3:#eef2f7;
  --border:#ccd6e2;--border-soft:#dce3eb;--text:#07182f;--text-dim:#425673;--text-faint:#687b94;--heading:#07182f;
  --gold:#b77a17;--gold-bright:#c58a24;--blue:#31558a;--blue-bright:#244c82;
  --tt-bg:#f4f6fa;--tt-bg-2:#fff;--tt-surface:#fff;--tt-surface-2:#f8fafc;--tt-surface-3:#eef2f7;--tt-input:#fff;
  --tt-border:#d3dce7;--tt-border-strong:#c9a35e;--tt-text:#07182f;--tt-text-2:#334a68;--tt-muted:#536781;--tt-muted-2:#708198;
  --ws-bg:#f4f6fa;--ws-panel:#fff;--ws-panel-2:#f8fafc;--ws-panel-3:#eef2f7;
  --ws-border:#d3dce7;--ws-border-strong:#c9a35e;--ws-text:#07182f;--ws-text-2:#425673;--ws-text-3:#687b94;--ws-blue:#31558a;
}

html[data-theme="dark"] body{
  background:radial-gradient(circle at 78% 0,rgba(216,170,66,.055),transparent 30%),#030609!important;
  color:#f8fafc!important;
}
html[data-theme="classic"] body{
  background:radial-gradient(circle at 78% 0,rgba(71,116,255,.13),transparent 32%),radial-gradient(circle at 18% 90%,rgba(216,170,66,.045),transparent 28%),#030715!important;
  color:#f8fbff!important;
}
html[data-theme="white"] body{
  background:radial-gradient(circle at 80% 0,rgba(49,85,138,.055),transparent 29%),#f4f6fa!important;
  color:#07182f!important;
}

/* Global shells and navigation */
html[data-theme="dark"] :is(.tt-navbar,.ws-sidebar,.ws-topbar,.admin-command-sidebar,.admin-command-header){background-color:rgba(4,8,12,.98)!important;border-color:rgba(216,170,66,.22)!important}
html[data-theme="classic"] :is(.tt-navbar,.ws-sidebar,.ws-topbar,.admin-command-sidebar,.admin-command-header){background-color:rgba(5,12,27,.98)!important;border-color:#2a4274!important}
html[data-theme="white"] :is(.tt-navbar,.ws-sidebar,.ws-topbar,.admin-command-sidebar,.admin-command-header){background-color:rgba(255,255,255,.98)!important;border-color:#d3dce7!important}

/* Cards and structural panels */
html[data-theme="dark"] :is(.card,.stat-card,.tt-card,.tt-panel,.tt-table-wrap,.podium-card,.support-card,.support-option,.journal-pro-strip>div,.academy-hero,.learning-cockpit,.codex-hero2,.codex-tile,.codex-daily,.codex-step,.ws-card,.ws-metric,.ws-widget,.ws-discipline-panel,.tp-panel,.modal,dialog,.admin-quick-card,.admin-system-item){
  color:#f8fafc!important;background:linear-gradient(180deg,#0b1118,#070c12)!important;border-color:rgba(216,170,66,.22)!important;
}
html[data-theme="classic"] :is(.card,.stat-card,.tt-card,.tt-panel,.tt-table-wrap,.podium-card,.support-card,.support-option,.journal-pro-strip>div,.academy-hero,.learning-cockpit,.codex-hero2,.codex-tile,.codex-daily,.codex-step,.ws-card,.ws-metric,.ws-widget,.ws-discipline-panel,.tp-panel,.modal,dialog,.admin-quick-card,.admin-system-item){
  color:#f8fbff!important;background:linear-gradient(145deg,#0a1730,#071124)!important;border-color:#2a4274!important;
}
html[data-theme="white"] :is(.card,.stat-card,.tt-card,.tt-panel,.tt-table-wrap,.podium-card,.support-card,.support-option,.journal-pro-strip>div,.academy-hero,.learning-cockpit,.codex-hero2,.codex-tile,.codex-daily,.codex-step,.ws-card,.ws-metric,.ws-widget,.ws-discipline-panel,.tp-panel,.modal,dialog,.admin-quick-card,.admin-system-item){
  color:#07182f!important;background:#fff!important;border-color:#d3dce7!important;box-shadow:0 10px 28px rgba(23,41,68,.055)!important;
}

/* Typography: prevent dark-on-dark and washed-out light mode. */
html[data-theme="dark"] :is(h1,h2,h3,h4,.card-title,.ws-card-title,.ws-metric-value,.ws-widget-value,.support-option strong,.podium-card strong){color:#fff!important}
html[data-theme="classic"] :is(h1,h2,h3,h4,.card-title,.ws-card-title,.ws-metric-value,.ws-widget-value,.support-option strong,.podium-card strong){color:#f8fbff!important}
html[data-theme="white"] :is(h1,h2,h3,h4,.card-title,.ws-card-title,.ws-metric-value,.ws-widget-value,.support-option strong,.podium-card strong){color:#07182f!important}
html[data-theme="dark"] :is(p,small,.muted,.identity-help,.tt-page-subtitle,.premium-page-hero p,.ws-card-subtitle,.ws-metric-sub,.ws-widget-note){color:#c7ced7!important}
html[data-theme="classic"] :is(p,small,.muted,.identity-help,.tt-page-subtitle,.premium-page-hero p,.ws-card-subtitle,.ws-metric-sub,.ws-widget-note){color:#b7c4d9!important}
html[data-theme="white"] :is(p,small,.muted,.identity-help,.tt-page-subtitle,.premium-page-hero p,.ws-card-subtitle,.ws-metric-sub,.ws-widget-note){color:#425673!important}

/* Forms and tables */
html[data-theme="dark"] :is(input,select,textarea){background:#080e15!important;color:#f8fafc!important;border-color:#34404c!important}
html[data-theme="classic"] :is(input,select,textarea){background:#0a1730!important;color:#f8fbff!important;border-color:#34518a!important}
html[data-theme="white"] :is(input,select,textarea){background:#fff!important;color:#07182f!important;border-color:#c8d3df!important}
html[data-theme="dark"] :is(input,textarea)::placeholder{color:#8f99a6!important}
html[data-theme="classic"] :is(input,textarea)::placeholder{color:#91a2bd!important}
html[data-theme="white"] :is(input,textarea)::placeholder{color:#78889c!important}
html[data-theme="white"] :is(th,.table-wrap th,.tt-table th){color:#536781!important}
html[data-theme="white"] :is(td,.table-wrap td,.tt-table td){color:#263d5d!important;border-color:#dce3eb!important}
html[data-theme="classic"] :is(td,.table-wrap td,.tt-table td){color:#c8d3e5!important;border-color:#21345d!important}

/* Active navigation and controls */
html[data-theme="dark"] :is(.ws-link.active,.admin-nav-btn.active){color:#f1c65d!important;background:rgba(216,170,66,.09)!important;border-color:rgba(216,170,66,.32)!important;box-shadow:inset 3px 0 #d8aa42!important}
html[data-theme="classic"] :is(.ws-link.active,.admin-nav-btn.active){color:#f1c65d!important;background:linear-gradient(90deg,rgba(71,116,255,.20),rgba(216,170,66,.07))!important;border-color:#3658ad!important;box-shadow:inset 3px 0 #4774ff!important}
html[data-theme="white"] :is(.ws-link.active,.admin-nav-btn.active){color:#a96f14!important;background:#fff7e7!important;border-color:#e2c98d!important;box-shadow:inset 3px 0 #c58a24!important}
html[data-theme="white"] :is(.btn:not(.btn-gold),.tt-btn:not(.tt-btn-primary),.ws-select){background:#fff!important;color:#152b49!important;border-color:#cbd5e1!important}
html[data-theme="classic"] :is(.btn:not(.btn-gold),.tt-btn:not(.tt-btn-primary),.ws-select){background:#0c1830!important;color:#eef4ff!important;border-color:#34518a!important}

/* Focus visibility */
html[data-theme="dark"] :is(a,button,input,select,textarea):focus-visible{outline:2px solid #f1c65d!important;outline-offset:2px}
html[data-theme="classic"] :is(a,button,input,select,textarea):focus-visible{outline:2px solid #7395ff!important;outline-offset:2px}
html[data-theme="white"] :is(a,button,input,select,textarea):focus-visible{outline:2px solid #31558a!important;outline-offset:2px}

/* Theme menu itself must remain readable in the selected palette. */
html[data-theme="dark"] .tt-theme-menu{background:#080d13!important;border-color:rgba(216,170,66,.28)!important}
html[data-theme="classic"] .tt-theme-menu{background:#071124!important;border-color:#3658ad!important}
html[data-theme="white"] .tt-theme-menu{background:#fff!important;border-color:#d3dce7!important}
html[data-theme="dark"] .tt-theme-menu button,html[data-theme="classic"] .tt-theme-menu button{color:#f8fafc!important}
html[data-theme="white"] .tt-theme-menu button{color:#07182f!important}

/* White Home protection: only the surrounding balance is refined here.
   No selectors target .home2-art or its pseudo-elements/background image. */
html[data-theme="white"] body.tt-home-v2{background-color:#f6f7fa!important}

@media(max-width:760px){
  html[data-theme] :is(.card,.support-card,.academy-hero,.learning-cockpit,.codex-hero2){box-shadow:none!important}
}

/* ======================================================================
   BUILD 17 — DARK OG RECOVERY + SEARCH CONTRAST
   Dark owns black/charcoal/gold. Royal blue remains exclusive to Classic.
   ====================================================================== */
html[data-theme="dark"]{
  --blue:#c49a3b;--blue-bright:#f1c65d;--ws-blue:#d8aa42;
  --tp-blue:#d8aa42;--tp-a-blue:#d8aa42;
  --tp-bg:#030609;--tp-panel:#080d13;--tp-panel-2:#0d141c;--tp-panel-3:#111922;
  --tp-bg-0:#030609;--tp-bg-1:#070c12;--tp-bg-2:#0b1219;--tp-bg-3:#101820;
  --tp-line:rgba(216,170,66,.17);--tp-line-strong:rgba(216,170,66,.30);
  --tp-a-bg:#030609;--tp-a-panel:#080d13;--tp-a-panel-hi:#0d141c;
  --tp-a-line:rgba(216,170,66,.18);
}

html[data-theme="dark"] :is(
  .workspace-page,.workspace-page .ws-main,.workspace-page .ws-content,
  .workspace-subpage,.admin-command-body,.admin-command-main
){background-color:#030609!important;color:#f8fafc!important}

html[data-theme="dark"] :is(
  .tp-kpi,.tp-panel,.tp-insight-item,.tp-provider-status,.tp-loading-surface,
  .journal-calendar-card,.journal-history-card,.learning-section,
  .ws-discipline-score,.ws-discipline-stat,.live-admin-card,.student-live-card,
  .resource-admin-row,.assignment-review-card,.quiz-question-admin,
  .protected-app-gate,.support-option,.table-wrap,.leader-podium>*,
  .admin-security-card,.security-control-panel,.security-session-row
){
  background:linear-gradient(180deg,#0b1118,#070c12)!important;
  border-color:rgba(216,170,66,.20)!important;
  color:#f8fafc!important;
}

html[data-theme="dark"] :is(
  .ws-select,.ws-icon-btn,.ws-profile-btn,.tt-admin-access-btn,
  .btn:not(.btn-gold),.tt-btn:not(.tt-btn-primary),.ws-mini-action
){background:#090f15!important;border-color:rgba(216,170,66,.21)!important;color:#d9dee5!important}

html[data-theme="dark"] :is(
  .ws-link:hover,.admin-nav-btn:hover,.tp-command-row:hover,.tp-command-row.selected
){background:rgba(216,170,66,.09)!important;color:#fff!important}

html[data-theme="dark"] :is(
  .ws-link.active,.admin-nav-btn.active,.tt-tabs button.active,.experience-toggle button.active
){
  background:linear-gradient(90deg,rgba(216,170,66,.14),rgba(216,170,66,.035))!important;
  border-color:rgba(241,198,93,.34)!important;color:#f1c65d!important;
  box-shadow:inset 3px 0 #d8aa42!important;
}

html[data-theme="dark"] :is(.tp-kpi,.ws-metric,.stat-card){border-top-color:rgba(241,198,93,.34)!important}
html[data-theme="dark"] :is(.table-wrap th,.tt-table th){background:#080e14!important;color:#b8c0ca!important}
html[data-theme="dark"] :is(.table-wrap td,.tt-table td){background:#070c12!important;color:#d6dce4!important;border-color:rgba(216,170,66,.12)!important}
html[data-theme="dark"] :is(.tp-bar-track,.ws-discipline-ring:before){background:#0b1118!important}

/* Workspace Ctrl/Cmd+K palette shown in the user's screenshot. */
html[data-theme="dark"] .tp-command-overlay{background:rgba(0,2,4,.74)!important}
html[data-theme="dark"] .tp-command-box{
  background:linear-gradient(180deg,#0b1118,#05090d)!important;
  border-color:rgba(216,170,66,.34)!important;
  box-shadow:0 32px 100px rgba(0,0,0,.68),0 0 32px rgba(216,170,66,.07)!important;
}
html[data-theme="dark"] .tp-command-head{border-color:rgba(216,170,66,.18)!important}
html[data-theme="dark"] .tp-command-head input{
  background:#070c12!important;color:#fff!important;border:1px solid rgba(216,170,66,.25)!important;
  border-radius:9px!important;padding:10px 12px!important;
}
html[data-theme="dark"] .tp-command-head input::placeholder{color:#9ca7b4!important;opacity:1}
html[data-theme="dark"] .tp-command-row{color:#f8fafc!important}
html[data-theme="dark"] .tp-command-row strong{color:#fff!important}
html[data-theme="dark"] .tp-command-row small{color:#aeb7c2!important}
html[data-theme="dark"] .tp-command-icon{background:#080e14!important;border-color:rgba(216,170,66,.25)!important;color:#f1c65d!important}
html[data-theme="dark"] .tp-command-row.selected{outline:1px solid rgba(216,170,66,.24)!important}

html[data-theme="classic"] .tp-command-box{background:linear-gradient(180deg,#0a1730,#061027)!important;border-color:#3658ad!important}
html[data-theme="classic"] .tp-command-head input{background:#07142c!important;color:#fff!important;border:1px solid #34518a!important;border-radius:9px!important;padding:10px 12px!important}
html[data-theme="classic"] .tp-command-head input::placeholder{color:#a8b5c9!important;opacity:1}
html[data-theme="classic"] .tp-command-row,html[data-theme="classic"] .tp-command-row strong{color:#f8fbff!important}
html[data-theme="classic"] .tp-command-row small{color:#a5b2c8!important}
html[data-theme="classic"] .tp-command-row.selected{background:rgba(71,116,255,.18)!important;outline:1px solid #3658ad!important}

html[data-theme="white"] .tp-command-overlay{background:rgba(27,40,58,.28)!important}
html[data-theme="white"] .tp-command-box{background:#fff!important;border-color:#d3dce7!important;box-shadow:0 30px 90px rgba(23,41,68,.18)!important}
html[data-theme="white"] .tp-command-head{border-color:#dce3eb!important}
html[data-theme="white"] .tp-command-head input{background:#fff!important;color:#07182f!important;border:1px solid #c8d3df!important;border-radius:9px!important;padding:10px 12px!important}
html[data-theme="white"] .tp-command-head input::placeholder{color:#687b94!important;opacity:1}
html[data-theme="white"] .tp-command-hint,html[data-theme="white"] .tp-command-row small,html[data-theme="white"] .tp-command-row em{color:#536781!important}
html[data-theme="white"] .tp-command-row,html[data-theme="white"] .tp-command-row strong{color:#07182f!important}
html[data-theme="white"] .tp-command-icon{background:#fff9eb!important;border-color:#e2c98d!important;color:#a96f14!important}
html[data-theme="white"] .tp-command-row.selected{background:#fff7e7!important;outline:1px solid #e2c98d!important}

/* Build 19 — Aether: cobalt energy, warm paper, Tyson gold. */
.tt-theme-swatch.aether{background:conic-gradient(from 35deg,#fff 0 38%,#144bd8 38% 69%,#d39b2b 69% 86%,#07172f 86%)}
html[data-theme="aether"]{
  color-scheme:light;
  --bg:#f4f6fb;--bg-2:#eef2f9;--surface:#fffdf8;--surface-2:#f7f9fd;
  --text:#071a38;--text-muted:#415978;--text-faint:#637590;
  --border:#cbd7e8;--gold:#d39b2b;--gold-bright:#efc35d;--blue:#144bd8;
  --tp-bg:#f4f6fb;--tp-surface:#fffdf8;--tp-surface-2:#f5f8fd;--tp-text:#071a38;
  --tp-muted:#415978;--tp-faint:#637590;--tp-gold:#d39b2b;--tp-gold-2:#efc35d;
  --tp-blue:#144bd8;--tp-line:#d1dbea;--tp-line-strong:#aebed5;
}
html[data-theme="aether"] body{
  background-color:#f4f6fb!important;color:#071a38!important;
  background-image:radial-gradient(circle at 84% 8%,rgba(20,75,216,.11),transparent 28%),radial-gradient(circle at 12% 68%,rgba(211,155,43,.09),transparent 26%),repeating-linear-gradient(0deg,rgba(7,26,56,.018) 0 1px,transparent 1px 5px)!important;
}
html[data-theme="aether"] :is(.tt-navbar,.ws-topbar,.admin-command-sidebar){background:rgba(255,253,248,.94)!important;border-color:#d6cba9!important;backdrop-filter:blur(18px)}
html[data-theme="aether"] :is(h1,h2,h3,h4,.tt-display,.card-title,.ws-title){color:#071a38!important}
html[data-theme="aether"] :is(p,.tt-page-subtitle,.ws-subtitle,small){color:#415978}
html[data-theme="aether"] :is(.card,.tt-card,.academy-card,.solo-panel,.growth-system,.course-sales-hero,.admin-command-section .card,.tp-panel,.tp-kpi,.ws-card,.journal-calendar-card,.journal-history-card,.learning-section,.table-wrap,.protected-app-gate){
  background:linear-gradient(145deg,rgba(255,253,248,.97),rgba(246,249,255,.96))!important;
  border-color:#cbd7e8!important;color:#071a38!important;box-shadow:0 16px 45px rgba(26,54,96,.08)!important;
}
html[data-theme="aether"] :is(input,select,textarea,.ws-select,.tp-command-head input){background:#fff!important;border-color:#bac9de!important;color:#071a38!important}
html[data-theme="aether"] :is(input,textarea)::placeholder{color:#6d7f98!important;opacity:1}
html[data-theme="aether"] :is(.tt-btn-primary,.btn-gold,.ws-primary-btn){background:linear-gradient(135deg,#f0c35a,#c98d1f)!important;color:#071426!important;border-color:#c98d1f!important}
html[data-theme="aether"] :is(.tt-btn:not(.tt-btn-primary),.btn:not(.btn-gold),.ws-icon-btn,.ws-profile-btn){background:#fffdf8!important;color:#071a38!important;border-color:#c3d0e1!important}
html[data-theme="aether"] :is(.tt-nav a.active,.tt-nav a:hover,.admin-nav-btn.active,.ws-link.active,.experience-switch button.active){color:#144bd8!important;border-color:#144bd8!important;background:rgba(20,75,216,.08)!important;box-shadow:none!important}
html[data-theme="aether"] :is(.tt-eyebrow,.admin-kicker,.ws-kicker){color:#b87b13!important}
html[data-theme="aether"] :is(.progression-bar,.quest-progress){background:#dae2ef!important}
html[data-theme="aether"] :is(.progression-bar span,.quest-progress span){background:linear-gradient(90deg,#144bd8,#3b7aff,#efc35d)!important}
html[data-theme="aether"] .tp-command-overlay{background:rgba(7,26,56,.30)!important}
html[data-theme="aether"] .tp-command-box{background:#fffdf8!important;border-color:#bdcce0!important;box-shadow:0 32px 100px rgba(15,42,81,.22)!important}
html[data-theme="aether"] .tp-command-row,html[data-theme="aether"] .tp-command-row strong{color:#071a38!important}
html[data-theme="aether"] .tp-command-row small{color:#5a6e89!important}
html[data-theme="aether"] .tp-command-row.selected{background:#edf3ff!important;outline:1px solid #94ade4!important}

/* Native shell removes duplicate website chrome and makes existing tools touch-first. */
html.tyson-native-app .navbar,html.tyson-native-app .tt-navbar,html.tyson-native-app .ws-sidebar{display:none!important}
html.tyson-native-app body{padding-top:0!important;min-width:0!important}
html.tyson-native-app :is(.app,.tt-container,.ws-main,.ws-content){width:100%!important;max-width:none!important;margin:0!important;padding:14px!important}
html.tyson-native-app :is(button,.btn,.tt-btn,input,select){min-height:46px}
html.tyson-native-app :is(.two-col,.field-row,.stat-grid,.academy-course-grid){grid-template-columns:1fr!important}
@media(max-width:700px){
  html[data-theme="aether"] .course-sales-hero{background:linear-gradient(155deg,#fffdf8,#edf3ff)!important}
  html.tyson-native-app :is(h1,.tt-display){font-size:clamp(28px,9vw,44px)!important;line-height:1.02!important}
  html.tyson-native-app :is(.card,.tt-card,.solo-panel){border-radius:18px!important}
  html.tyson-native-app table{min-width:640px}
}
