/* RC10.30: Existing Personal Terminal is theme-owned, not a KK Trade shortcode.
   Only nodes identified by the terminal's own headings receive the palette.
   The gradient hero, price colors and chart visualizations remain unchanged. */
html[data-kktru-theme="dim"] [data-kkk-terminal-root],
html[data-kktru-theme="night"] [data-kkk-terminal-root],
html[data-kktru-theme="dim"] [data-kkk-terminal-frame],
html[data-kktru-theme="night"] [data-kkk-terminal-frame]{
  background-color:var(--kktru-page)!important;color:var(--kktru-ink)!important;
  border-color:var(--kktru-border)!important;box-sizing:border-box;
}
html[data-kktru-theme="dim"] [data-kkk-terminal-panel],
html[data-kktru-theme="night"] [data-kkk-terminal-panel]{
  background:var(--kktru-surface)!important;border:1px solid var(--kktru-border)!important;
  color:var(--kktru-ink)!important;box-shadow:0 9px 25px rgba(0,0,0,.12);
}
html[data-kktru-theme="dim"] [data-kkk-terminal-widget],
html[data-kktru-theme="night"] [data-kkk-terminal-widget]{
  background:var(--kktru-surface-2)!important;color:var(--kktru-ink)!important;
  border-color:var(--kktru-border)!important;
}
html[data-kktru-theme="dim"] [data-kkk-terminal-panel] :is(h2,h3,h4,h5,label),
html[data-kktru-theme="night"] [data-kkk-terminal-panel] :is(h2,h3,h4,h5,label){color:var(--kktru-ink)!important}
html[data-kktru-theme="dim"] [data-kkk-terminal-panel] :is(p,small,li,dt,dd),
html[data-kktru-theme="night"] [data-kkk-terminal-panel] :is(p,small,li,dt,dd){color:var(--kktru-muted)!important}
html[data-kktru-theme="dim"] [data-kkk-terminal-panel] :is(input,select,textarea),
html[data-kktru-theme="night"] [data-kkk-terminal-panel] :is(input,select,textarea){
  background:var(--kktru-surface-2)!important;color:var(--kktru-ink)!important;
  border:1px solid var(--kktru-border)!important;
}
/* Hardcoded pale inner rows and empty-state blocks from the earlier theme. */
html[data-kktru-theme="dim"] [data-kkk-terminal-widget] :is([class*="empty"],[class*="placeholder"],[class*="asset-row"],[class*="event-row"],[class*="watch-row"],[class*="list-row"]),
html[data-kktru-theme="night"] [data-kkk-terminal-widget] :is([class*="empty"],[class*="placeholder"],[class*="asset-row"],[class*="event-row"],[class*="watch-row"],[class*="list-row"]){
  background:var(--kktru-surface)!important;border-color:var(--kktru-border)!important;
  color:var(--kktru-ink)!important;
}
html[data-kktru-theme="dim"] [data-kkk-terminal-widget] :is(a,button):focus-visible,
html[data-kktru-theme="night"] [data-kkk-terminal-widget] :is(a,button):focus-visible{
  outline:3px solid var(--kktru-primary)!important;outline-offset:2px;
}
/* Maintain a compact layout without changing the original grid order. */
[data-kkk-terminal-root], [data-kkk-terminal-frame], [data-kkk-terminal-panel]{min-width:0;max-width:100%;}
[data-kkk-terminal-widget]{overflow-wrap:anywhere;}
@media(max-width:550px){[data-kkk-terminal-panel]{padding-inline:clamp(10px,3vw,18px)}}
@media(prefers-reduced-motion:reduce){[data-kkk-terminal-panel] *{transition:none!important}}

/* RC10.31: nested title, link, paragraph and widget text follow the selected palette.
   Do not recolor PnL values, event severity badges or image-overlay hero titles. */
html[data-kktru-theme="dim"] [data-kkk-terminal-panel] :is(h2,h3,h4,h5,strong,a:not([class*="profit"]):not([class*="loss"])),
html[data-kktru-theme="night"] [data-kkk-terminal-panel] :is(h2,h3,h4,h5,strong,a:not([class*="profit"]):not([class*="loss"])) { color:var(--kktru-ink)!important; }
html[data-kktru-theme="dim"] [data-kkk-terminal-widget] :is([class*="row"],[class*="empty"],[class*="placeholder"]),
html[data-kktru-theme="night"] [data-kkk-terminal-widget] :is([class*="row"],[class*="empty"],[class*="placeholder"]) {border-color:var(--kktru-border)!important;}
