:root, :root[data-theme="midnight"] {
  color-scheme: dark;
  --kp-bg: #0b1220;
  --kp-panel: #121e30;
  --kp-raised: #19283d;
  --kp-rail: #0e1829;
  --kp-text: #edf2fa;
  --kp-muted: #afbdd0;
  --kp-line: #34465f;
  --kp-strong-line: #627a9a;
  --kp-accent: #e9c77f;
  --kp-secondary: #99c9f4;
  --kp-on-accent: #172034;
  --kp-positive: #6ee7b7;
  --kp-negative: #fda4af;
  --kp-warning: #f6d389;
  --kp-glow: rgba(213, 173, 92, .15);
  --kp-glow-secondary: rgba(72, 128, 202, .14);
  --kp-shadow: 0 18px 54px rgba(0, 0, 0, .18);
}
:root[data-theme="glacier"] {
  color-scheme: light;
  --kp-bg: #f5f6f4;
  --kp-panel: #fffefa;
  --kp-raised: #eaf1f8;
  --kp-rail: #f3f7fb;
  --kp-text: #16283e;
  --kp-muted: #485e77;
  --kp-line: #bbcbdc;
  --kp-strong-line: #7189a5;
  --kp-accent: #1755a6;
  --kp-secondary: #354e83;
  --kp-on-accent: #ffffff;
  --kp-positive: #076344;
  --kp-negative: #a5203a;
  --kp-warning: #80500b;
  --kp-glow: rgba(47, 111, 198, .1);
  --kp-glow-secondary: rgba(126, 161, 211, .16);
  --kp-shadow: 0 18px 54px rgba(36, 67, 108, .08);
}
:root[data-theme="aurora"] {
  color-scheme: dark;
  --kp-bg: #081c24;
  --kp-panel: #102c36;
  --kp-raised: #1b3947;
  --kp-rail: #0c252e;
  --kp-text: #e9f8f8;
  --kp-muted: #aec9d3;
  --kp-line: #365865;
  --kp-strong-line: #6b91a3;
  --kp-accent: #81e5d5;
  --kp-secondary: #d0b4fa;
  --kp-on-accent: #082830;
  --kp-positive: #6ee7b7;
  --kp-negative: #fda4af;
  --kp-warning: #f6d389;
  --kp-glow: rgba(69, 214, 191, .13);
  --kp-glow-secondary: rgba(163, 113, 236, .19);
  --kp-shadow: 0 18px 54px rgba(0, 0, 0, .16);
}
html[data-theme], html[data-theme] body, html[data-theme] body.dashboard-active {
  --bg: var(--kp-bg); --panel: var(--kp-panel); --panel2: var(--kp-raised);
  --text: var(--kp-text); --ink: var(--kp-text); --muted: var(--kp-muted); --line: var(--kp-line);
  --surface: var(--kp-panel); --canvas: var(--kp-bg); --green: var(--kp-accent);
  --green-soft: var(--kp-raised); --amber: var(--kp-secondary); --amber-soft: var(--kp-raised); --blue: var(--kp-secondary);
  --good: var(--kp-positive); --bad: var(--kp-negative); --warn: var(--kp-warning); --cyan: var(--kp-accent);
  --single-bg: var(--kp-bg); --single-panel: var(--kp-panel); --single-panel-deep: var(--kp-raised);
  --single-line: var(--kp-line); --single-text: var(--kp-text); --single-muted: var(--kp-muted);
  --single-gold: var(--kp-secondary); --single-cyan: var(--kp-accent);
  --single-ok: var(--kp-positive); --single-warn: var(--kp-warning); --single-bad: var(--kp-negative);
  --terminal-bg: var(--kp-bg); --terminal-panel: var(--kp-panel); --terminal-panel-2: var(--kp-raised);
  --terminal-rail: var(--kp-rail); --terminal-text: var(--kp-text); --terminal-muted: var(--kp-muted);
  --terminal-line: var(--kp-line); --terminal-line-strong: var(--kp-strong-line);
  --terminal-green: var(--kp-positive); --terminal-red: var(--kp-negative);
  --terminal-cyan: var(--kp-accent); --terminal-gold: var(--kp-warning);
}
html[data-theme] body { background: var(--kp-bg); color: var(--kp-text); font-family: "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif; }
html[data-theme] body *, html[data-theme] body *::before, html[data-theme] body *::after { animation: none !important; }
html[data-theme][data-motion="on"] body .appearance-bar::before { animation: kp-ambient-arrival 12s ease-out both !important; }
@keyframes kp-ambient-arrival { from { opacity: 0; transform: translateX(-16px); } to { opacity: .45; transform: translateX(0); } }
html[data-theme] body::before, html[data-theme] body::after { display: none; }
html[data-theme] :is(button, a, input, select, textarea):focus-visible { outline: 3px solid var(--kp-accent); outline-offset: 3px; }
.appearance-bar { position: relative; z-index: 5; display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 10px 16px; min-height: 70px; padding: 12px clamp(16px, 4vw, 56px); border-bottom: 1px solid var(--kp-line); background: var(--kp-rail); color: var(--kp-text); }
.appearance-label { margin-right: auto; color: var(--kp-muted); font-size: 12px; font-weight: 600; letter-spacing: .08em; }
.appearance-bar { isolation: isolate; background: linear-gradient(110deg, var(--kp-rail), var(--kp-panel)); }
.appearance-bar::before { content: ''; position: absolute; z-index: -1; pointer-events: none; top: 0; bottom: 0; left: 16px; width: min(180px, 45%); opacity: .45; background: radial-gradient(ellipse at center, var(--kp-glow-secondary), transparent 70%); }
.appearance-choices { display: flex; gap: 5px; }
html[data-theme] .appearance-bar button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 44px; min-width: 44px; width: auto; margin: 0; padding: 8px 11px; border: 1px solid var(--kp-line); border-radius: 9px; background: var(--kp-panel); color: var(--kp-muted); font: 600 12px/1.4 "Segoe UI", "Microsoft YaHei", sans-serif; cursor: pointer; box-shadow: none; transform: none; transition: background-color 180ms ease, border-color 180ms ease; }
html[data-theme] .appearance-bar button:hover { border-color: var(--kp-accent); }
html[data-theme] .appearance-bar button[aria-pressed="true"] { color: var(--kp-accent); border-color: var(--kp-accent); background: var(--kp-raised); }
.appearance-choices button::before { content: ''; width: 10px; height: 10px; border: 1px solid currentColor; border-radius: 50%; background: #d6b46e; }
.appearance-choices [data-theme-choice="glacier"]::before { background: #8bb5e5; }
.appearance-choices [data-theme-choice="aurora"]::before { background: #8cd9ca; }
.appearance-choices button::after { content: '✓'; width: 10px; visibility: hidden; }
.appearance-choices button[aria-pressed="true"]::after { visibility: visible; }
html[data-theme] body.dashboard-active > .appearance-bar { margin-left: 244px; }
html[data-theme] body.dashboard-active { display: flex; flex-direction: column; }
html[data-theme] body.dashboard-active > .appearance-bar { flex: 0 0 auto; }
html[data-theme] body.dashboard-active > main { flex: 1 1 0; min-height: 0; height: auto; }
html[data-theme] body.dashboard-active .dashboard { min-height: 0; height: 100%; }
@media (max-width: 900px) { html[data-theme] body.dashboard-active > .appearance-bar { margin-left: 0; } }
@media (max-width: 600px) {
  .appearance-bar { justify-content: space-between; gap: 8px; padding: 10px 14px; }
  .appearance-label { font-size: 11px; }
  .appearance-choices { order: 3; width: 100%; }
  html[data-theme] .appearance-choices button { flex: 1; padding: 9px 5px; font-size: 11px; }
}
html[data-theme] :is(.login-aurora, .login-grid-sweep, .hero-glow-line, .hero-circuit-layer, .console-scan, .holo-rings, .chart-stream, .hero-grid-bg, #single-three-scene, #spread-bg, #bg-price-label) { display: none; }
html[data-theme] body:not(.dashboard-active) { background: radial-gradient(ellipse at 15% 20%, var(--kp-glow), transparent 45%), radial-gradient(ellipse at 80% 20%, var(--kp-glow-secondary), transparent 50%), var(--kp-bg); }
html[data-theme] :is(.auth-shell, .auth-panel, .trading-hero, .market-console, .mode-card, .panel, .card, .modal-card, .modal-content, .software-version-card) { border-color: var(--kp-line); background: var(--kp-panel); color: var(--kp-text); box-shadow: var(--kp-shadow); }
html[data-theme] .auth-shell { gap: 28px; padding: 28px; border-radius: 20px; }
html[data-theme] :is(.trading-hero, .auth-panel) { border-radius: 14px; }
html[data-theme] .trading-hero { background: linear-gradient(145deg, var(--kp-raised), var(--kp-panel)); }
html[data-theme] .trading-hero::before, html[data-theme] .trading-hero::after { display: none; }
html[data-theme] :is(.brand-row h1, .pro-hero h1, .hero-title) { color: var(--kp-text); text-shadow: none; -webkit-text-fill-color: currentColor; }
html[data-theme] :is(.hero-desc, .brand p, .auth-panel label, .market-head, .depth-book, .signal-strip, .execution-flow, .admin-entry, .muted) { color: var(--kp-muted); }
html[data-theme] :is(.market-head b, .market-grid strong, .pro-hero h2, .help-link, .admin-entry a) { color: var(--kp-accent); }
html[data-theme] :is(input, select, textarea) { background: var(--kp-raised); color: var(--kp-text); border-color: var(--kp-strong-line); }
html[data-theme] input::placeholder, html[data-theme] textarea::placeholder { color: var(--kp-muted); opacity: 1; }
html[data-theme] option { color: var(--kp-text); background: var(--kp-panel); }
html[data-theme] :is(button.primary, .tabs button.active, #auth-submit) { background: var(--kp-accent); border-color: var(--kp-accent); color: var(--kp-on-accent); box-shadow: none; }
html[data-theme] :is(.tabs button, #public-observation-btn) { background: var(--kp-raised); color: var(--kp-text); border-color: var(--kp-line); }
html[data-theme] .tabs button.active { background: var(--kp-accent); color: var(--kp-on-accent); border-color: var(--kp-accent); }
html[data-theme] :is(.capability-grid > div, .execution-flow span, .signal-strip span) { color: var(--kp-text); background: var(--kp-raised); border-color: var(--kp-line); }
html[data-theme] :is(.up, .good, .positive) { color: var(--kp-positive); }
html[data-theme] :is(.down, .bad, .negative) { color: var(--kp-negative); }
html[data-theme] .public-market-grid-line { stroke: var(--kp-line); }
html[data-theme] .public-market-candle.is-up rect:not(.public-market-hit) { fill: var(--kp-panel); stroke: var(--kp-positive); stroke-width: 1.5; }
html[data-theme] :is(.public-market-expanded, dialog) { background: var(--kp-panel); color: var(--kp-text); border-color: var(--kp-line); }
html[data-theme] body.dashboard-active :is(.software-version-card, .strategy-download-card, .strategy-access-note, .intro-strategy-modal, .intro-guide-card) { background: var(--kp-panel); color: var(--kp-text); border-color: var(--kp-line); }
html[data-theme] body.dashboard-active :is(.strategy-downloads-head strong, .strategy-downloads-head h4, .software-version-card h3) { color: var(--kp-text); }
html[data-theme] body.dashboard-active :is(.strategy-downloads-head span, .strategy-downloads-head small, .software-version-note) { color: var(--kp-muted); }
html[data-theme] :is(.guide-hero, .guide-card, .guide-section, .download-product, .download-top, .login-box, .intro-product-modal-card, .intro-product-modal-body, .account-drawer) { background: var(--kp-panel); color: var(--kp-text); border-color: var(--kp-line); }
html[data-theme] :is(.guide-section h3, .guide-table th, .download-product h2, .download-product h3, .product-head h2, .intro-product-modal-card h3, .intro-product-modal-card h4) { color: var(--kp-text); }
html[data-theme] :is(.guide-table th, .guide-step div, pre, .product-badge) { background: var(--kp-raised); color: var(--kp-text); border-color: var(--kp-line); }
html[data-theme] :is(.guide-table td, .guide-table th) { border-color: var(--kp-line); }
html[data-theme] .note { color: var(--kp-warning); }
html[data-theme] :is(.intro-product-modal-card, .software-version-card) :is(p, li, small, dd) { color: var(--kp-muted); }
html[data-theme] .help-link { background: var(--kp-raised); border-color: var(--kp-line); color: var(--kp-accent); }
html[data-theme] :is(.depth-book, .depth-panel, .execution-flow) { border-color: var(--kp-line); }
html[data-theme] #login-view .execution-flow { background: var(--kp-raised); }
html[data-theme] #login-view .execution-flow i { background: var(--kp-line); }
html[data-theme] .depth-book span { background: var(--kp-raised); color: var(--kp-muted); }
@media (max-width: 600px) { html[data-theme] .auth-shell { padding: 14px; gap: 18px; } }
html[data-theme] body:has(#login-view:not(.hidden)) { background: radial-gradient(ellipse at 15% 20%, var(--kp-glow), transparent 45%), radial-gradient(ellipse at 80% 20%, var(--kp-glow-secondary), transparent 50%), var(--kp-bg); }
html[data-theme] body:has(#login-view:not(.hidden)) main { padding: 40px 24px; min-height: 0; }
html[data-theme] #login-view:not(.hidden) { min-height: 0; grid-template-columns: minmax(0, 1.1fr) minmax(320px, .8fr); align-items: center; max-width: 1160px; margin: 0 auto; perspective: none; }
html[data-theme] #login-view :is(.pro-hero, .auth-panel, .market-console.pro-console) { opacity: 1; transform: none; backdrop-filter: none; background: var(--kp-panel); border-color: var(--kp-line); box-shadow: none; }
html[data-theme] #login-view .pro-hero { padding: 28px; min-height: 0; background: linear-gradient(145deg, var(--kp-raised), var(--kp-panel)); }
html[data-theme] #login-view .auth-panel { padding: 26px; }
html[data-theme] #login-view :is(.pro-hero, .auth-panel)::before, html[data-theme] #login-view :is(.pro-hero, .auth-panel)::after { display: none; }
html[data-theme] #login-view .brand h1 { color: var(--kp-text); font-size: clamp(30px, 3.2vw, 46px); line-height: 1.2; text-shadow: none; }
html[data-theme] #login-view :is(.brand p, label, .market-head, .market-grid span) { color: var(--kp-muted); }
html[data-theme] #login-view :is(.eyebrow, .admin-entry a, .market-head b, .market-grid strong) { color: var(--kp-accent); }
html[data-theme] #login-view :is(.tabs, .admin-entry, .market-grid div, .depth-panel, .execution-flow span, .signal-strip span) { background: var(--kp-raised); color: var(--kp-text); border-color: var(--kp-line); }
html[data-theme] #login-view :is(input, select) { background: var(--kp-raised); color: var(--kp-text); border-color: var(--kp-strong-line); box-shadow: none; }
html[data-theme] #login-view .tabs button { color: var(--kp-muted); background: transparent; box-shadow: none; }
html[data-theme] #login-view :is(button.primary, .tabs button.active) { background: var(--kp-accent); color: var(--kp-on-accent); box-shadow: none; transform: none; }
html[data-theme] #login-view .brand-logo { filter: none; width: 56px; height: 56px; }
html[data-theme] #login-view .depth-panel { display: none; }
html[data-theme] body.dashboard-active #mode-detail-bar { background: var(--kp-panel); color: var(--kp-text); box-shadow: none; backdrop-filter: none; }
html[data-theme] body.dashboard-active #mode-detail-bar strong { color: var(--kp-text); text-shadow: none; }
html[data-theme] body.dashboard-active #mode-detail-bar :is(span, small, button) { color: var(--kp-muted); }
html[data-theme] body.dashboard-active .workspace-strategy-nav-head strong { color: var(--kp-text); }
html[data-theme] body.dashboard-active .workspace-strategy-nav-head span { color: var(--kp-accent); }
html[data-theme] body.dashboard-active #mode-switcher .tier-state { color: var(--kp-muted); background: var(--kp-raised); border-color: var(--kp-line); }
@media (max-width: 900px) { html[data-theme] #login-view:not(.hidden) { grid-template-columns: 1fr; max-width: 650px; } }
@media (max-width: 600px) {
  html[data-theme] body:has(#login-view:not(.hidden)) main { padding: 24px 14px; }
  html[data-theme] #login-view :is(.pro-hero, .auth-panel) { padding: 20px; }
}
html[data-theme] body.dashboard-active #workspace-content { background: linear-gradient(160deg, var(--kp-bg), var(--kp-rail)); }
html[data-theme] body.dashboard-active #mode-switcher { background: linear-gradient(180deg, var(--kp-rail), var(--kp-panel)); box-shadow: none; }
html[data-theme] body.dashboard-active .workspace-strategy-nav { border-color: var(--kp-line); }
html[data-theme] body.dashboard-active .workspace-strategy-group { background: var(--kp-panel); border-color: var(--kp-line); }
html[data-theme] body.dashboard-active:not(.workspace-home-view) .workspace-strategy-group > strong { background: var(--kp-rail); color: var(--kp-muted); }
html[data-theme] body.dashboard-active .workspace-strategy-group-toggle,
html[data-theme] body.dashboard-active .workspace-strategy-group.is-open .workspace-strategy-group-toggle { background: var(--kp-raised); color: var(--kp-text); border-color: var(--kp-line); }
html[data-theme] body.dashboard-active .workspace-strategy-group-toggle small { background: var(--kp-panel); color: var(--kp-muted); border-color: var(--kp-line); }
html[data-theme] body.dashboard-active .workspace-strategy-link { background: var(--kp-panel); color: var(--kp-text); border-color: var(--kp-line); }
html[data-theme] body.dashboard-active .workspace-strategy-link small { color: var(--kp-muted); }
html[data-theme] body.dashboard-active .workspace-strategy-link.active span { color: var(--kp-accent); }
html[data-theme] body.dashboard-active .workspace-strategy-link:is(:hover, :focus-visible),
html[data-theme] body.dashboard-active:not(.workspace-home-view) .workspace-strategy-link.active,
html[data-theme] body.dashboard-active .workspace-strategy-link.active,
html[data-theme] body.dashboard-active .workspace-strategy-group-toggle:is(:hover, :focus-visible) { background: var(--kp-raised); color: var(--kp-accent); border-color: var(--kp-accent); box-shadow: inset 3px 0 0 var(--kp-accent); }
html[data-theme] body.dashboard-active #intro-pair-list .intro-market-section,
html[data-theme] body.dashboard-active .intro-market-shell,
html[data-theme] body.dashboard-active .intro-trade-detail { background: var(--kp-rail); border-color: var(--kp-line); }
html[data-theme] body.dashboard-active #intro-pair-list .intro-market-card { background: var(--kp-panel); color: var(--kp-text); border-color: var(--kp-line); box-shadow: none; }
html[data-theme] body.dashboard-active #intro-pair-list .intro-market-card:is(:hover, :focus-visible, .selected) { background: var(--kp-raised); border-color: var(--kp-accent); }
html[data-theme] body.dashboard-active #intro-pair-list .intro-strategy-card .intro-card-summary { background: var(--kp-raised); border-color: var(--kp-line); }
html[data-theme] body.dashboard-active #intro-pair-list .intro-strategy-card .intro-card-summary > span { color: var(--kp-accent); }
html[data-theme] body.dashboard-active #intro-pair-list .intro-strategy-card .intro-card-summary strong { color: var(--kp-text); }
html[data-theme] body.dashboard-active #intro-pair-list .intro-card-range i { background: var(--kp-raised); color: var(--kp-muted); border-color: var(--kp-line); }
html[data-theme] body.dashboard-active #intro-pair-list .intro-card-top em { background: var(--kp-raised); color: var(--kp-positive); }
html[data-theme] body.dashboard-active :is(.intro-detail-toolbar, .intro-floating-pill, .intro-overview-metrics > div) { background: var(--kp-panel); border-color: var(--kp-line); }
html[data-theme] body.dashboard-active .intro-detail-toolbar > div > span,
html[data-theme] body.dashboard-active .intro-floating-pill > span,
html[data-theme] body.dashboard-active .intro-overview-metrics > div > span { color: var(--kp-muted); }
html[data-theme] body.dashboard-active :is(.intro-signal-bias, .intro-pair-close-item, .intro-ai-meter) { background: var(--kp-raised); color: var(--kp-text); border-color: var(--kp-line); }
html[data-theme] body.dashboard-active .intro-pair-close-item span { color: var(--kp-muted); }
html[data-theme] body.dashboard-active .intro-ai-meter b { color: var(--kp-text); }
html[data-theme] body.dashboard-active .intro-ai-meter.long i { background: var(--kp-positive); opacity: .12; }
html[data-theme] body.dashboard-active .intro-ai-meter.short i { background: var(--kp-negative); opacity: .12; }
html[data-theme] body.dashboard-active #intro-market-chart > .intro-market-chart { background: var(--kp-panel); border-color: var(--kp-line); }
html[data-theme] body.dashboard-active :is(.intro-auto-panel, .intro-select-label) :is(input, select) { background: var(--kp-raised); color: var(--kp-text); border-color: var(--kp-strong-line); }
html[data-theme] body.dashboard-active :is(.intro-strategy-modal, .intro-product-modal-card, .modal-card) :is(input, select, textarea) { background: var(--kp-raised); color: var(--kp-text); border-color: var(--kp-strong-line); }
html[data-theme] body.dashboard-active :is(button, input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]), select, .dashboard-nav a, .help-link),
html[data-theme] body.dashboard-active #mode-detail-bar button { min-height: 44px; }
html[data-theme] body.dashboard-active :is(button, .dashboard-nav a, .help-link) { min-width: 44px; transition: background-color 180ms ease, border-color 180ms ease; }
html[data-theme] body.dashboard-active #intro-pair-list .intro-market-card:focus-visible { outline: 3px solid var(--kp-accent); outline-offset: 3px; }
html[data-theme] body.dashboard-active :is(.intro-prob-bar i, .intro-ai-meter i, .intro-floating-pill, .intro-overview-metrics > div, .public-market-candle, .public-quote-price) { transition: none; }
html[data-motion="off"] *, html[data-motion="off"] *::before, html[data-motion="off"] *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
@media (prefers-reduced-motion: reduce) {
  html[data-theme][data-motion="on"] body .appearance-bar::before { animation: none !important; }
  html *, html *::before, html *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
html[data-theme] body.dashboard-active #trading-desk-panel { flex: 1 1 auto; min-height: 0; overflow: auto; overscroll-behavior: contain; }
html[data-theme] { scrollbar-gutter: stable; scrollbar-color: var(--kp-strong-line) var(--kp-bg); }
html[data-theme] .dashboard-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
html[data-theme] :is(.dashboard-nav, #account-appearance-slot) { min-width: 0; max-width: 100%; }
html[data-theme] #login-appearance-slot { margin-bottom: 14px; }
html[data-theme] .appearance-choices { flex-wrap: wrap; width: auto; order: initial; }
html[data-theme] .appearance-choices button { display: inline-flex; align-items: center; justify-content: center; gap: 5px; min-height: 44px; padding: 7px 9px; border: 1px solid var(--kp-line); border-radius: 6px; color: var(--kp-muted); background: var(--kp-panel); font-size: 12px; cursor: pointer; }
html[data-theme] .appearance-choices button[aria-pressed="true"] { color: var(--kp-accent); border-color: var(--kp-accent); background: var(--kp-raised); }
html[data-theme] .appearance-choices button:focus-visible { outline: 3px solid var(--kp-accent); outline-offset: 2px; }
html[data-theme] :is(.intro-product-dialog, .intro-product-modal-body) { color: var(--kp-text); background: var(--kp-panel); border-color: var(--kp-line); }
html[data-theme] .intro-product-dialog-head { background: var(--kp-raised); border-color: var(--kp-line); }
html[data-theme] .intro-product-dialog { display: flex; flex-direction: column; max-height: min(760px, calc(100dvh - 24px)); }
html[data-theme] .intro-product-dialog-head { flex: 0 0 auto; }
html[data-theme] .intro-product-modal-body { flex: 1 1 auto; min-height: 0; max-height: none; scrollbar-gutter: stable; }
html[data-theme] #intro-product-modal :is(h3, h4, strong, b, .intro-product-summary) { color: var(--kp-text); }
html[data-theme] #intro-product-modal :is(p, li, ul, small, span, td, th) { color: var(--kp-muted); }
html[data-theme] #intro-product-modal :is(.intro-product-stat-grid > div, .intro-product-risk-row, .strategy-install-guide, .strategy-download-item, .xaut-software-preview) { background: var(--kp-raised); border-color: var(--kp-line); }
html[data-theme] #intro-product-modal :is(.intro-product-section, .strategy-download-center, .intro-product-actions, table, td, th) { border-color: var(--kp-line); }
html[data-theme] #intro-product-modal :is(button:not(.primary), .strategy-download-link) { color: var(--kp-text); background: var(--kp-raised); border-color: var(--kp-strong-line); }
html[data-theme] #intro-product-modal .primary { color: var(--kp-on-accent); background: var(--kp-accent); }
html[data-theme] body.dashboard-active #intro-market-chart { min-height: 0; align-self: start; }
html[data-theme] body.dashboard-active #intro-market-chart .intro-market-chart,
html[data-theme] .intro-product-modal-body .intro-market-chart { min-height: 0; padding: 12px; gap: 8px; justify-content: start; background: var(--kp-panel); border-color: var(--kp-line); }
html[data-theme] body.dashboard-active #intro-market-chart .market-chart-current { margin-top: 0; }
html[data-theme] body.dashboard-active #intro-market-chart :is(.price-track, .market-range) { height: 28px; margin: 0; }
html[data-theme] body.dashboard-active #intro-market-chart .price-track-line,
html[data-theme] body.dashboard-active #intro-market-chart .market-range::before { top: 14px; }
html[data-theme] body.dashboard-active #intro-market-chart :is(.price-marker, .market-range-marker) { top: 7px; }
html[data-theme] body.dashboard-active #intro-market-chart .market-range-fill { top: 12px; }
html[data-theme] body.dashboard-active #intro-market-chart :is(.market-chart-note, .market-chart-empty) { margin: 0; }
html[data-theme] body.dashboard-active .intro-trade-detail { align-content: start; align-items: start; grid-auto-rows: min-content; }
html[data-theme] body.dashboard-active #intro-trade-detail {
  display: flex;
  flex-direction: column;
  align-items: stretch;
}
html[data-theme] body.dashboard-active #intro-trade-detail > .intro-workbench {
  display: grid !important;
  grid-template-columns: minmax(0, 1.6fr) minmax(300px, .72fr) !important;
  grid-template-rows: none;
  grid-template-areas: none !important;
  align-items: start;
  gap: 12px !important;
}
html[data-theme] body.dashboard-active #intro-trade-detail .intro-detail-main,
html[data-theme] body.dashboard-active #intro-trade-detail .intro-detail-side {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 12px;
}
html[data-theme] body.dashboard-active #intro-trade-detail .intro-workbench .panel { padding: 11px; }
html[data-theme] body.dashboard-active #intro-trade-detail .intro-auto-panel {
  position: static;
  align-self: stretch;
  grid-template-columns: minmax(0, 1fr) !important;
}
html[data-theme] body.dashboard-active #intro-trade-detail .intro-ai-panel,
html[data-theme] body.dashboard-active #intro-trade-detail .intro-diagnosis-panel { grid-template-columns: minmax(0, 1fr) !important; }
html[data-theme] body.dashboard-active #intro-trade-detail #intro-market-chart { align-self: stretch; margin-bottom: 0; }
@media (max-width: 900px) {
  html[data-theme] body.dashboard-active #intro-trade-detail > .intro-workbench { display: flex !important; flex-direction: column; align-items: stretch; grid-template-columns: minmax(0, 1fr) !important; }
  html[data-theme] body.dashboard-active #intro-trade-detail .intro-detail-main,
  html[data-theme] body.dashboard-active #intro-trade-detail .intro-detail-side { display: contents; }
  html[data-theme] body.dashboard-active #intro-trade-detail #intro-market-chart { order: 0; }
  html[data-theme] body.dashboard-active #intro-trade-detail #intro-strategy-mount-warning { order: 1; }
  html[data-theme] body.dashboard-active #intro-trade-detail .intro-trade-panel { order: 2; }
  html[data-theme] body.dashboard-active #intro-trade-detail .intro-auto-panel { order: 3; }
  html[data-theme] body.dashboard-active #intro-trade-detail .intro-ai-panel { order: 4; }
  html[data-theme] body.dashboard-active #intro-trade-detail .intro-diagnosis-panel { order: 5; }
  html[data-theme] body.dashboard-active #intro-trade-detail .intro-profit-panel { order: 6; }
  html[data-theme] body.dashboard-active #intro-trade-detail .intro-workbench .panel { padding: 10px; }
  html[data-theme] body.dashboard-active #intro-trade-detail .intro-auto-panel { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}
@media (max-width: 480px) {
  html[data-theme] body.dashboard-active #intro-trade-detail .intro-auto-panel { grid-template-columns: minmax(0, 1fr) !important; }
}
html[data-theme] body.dashboard-active .intro-auto-panel { height: auto; min-height: 0; max-height: none; align-self: start; align-content: start; overflow: visible; }
html[data-theme] body.dashboard-active .intro-active-stops :is(span, strong),
html[data-theme] body.dashboard-active .intro-active-stops-title { color: var(--kp-text); }
html[data-theme] body.dashboard-active :is(#intro-active-strategy-stop, #intro-active-global-stop, #intro-active-profit-stop) { color: var(--kp-text); }
html[data-theme] body.dashboard-active :is(#intro-back-btn, #intro-product-info-btn) { color: var(--kp-text); background: var(--kp-raised); border-color: var(--kp-strong-line); }
html[data-theme] body.dashboard-active .intro-actions button { color: var(--kp-text); background: var(--kp-raised); border-color: var(--kp-strong-line); }
html[data-theme] body.dashboard-active .intro-actions button.good { color: var(--kp-positive); border-color: var(--kp-positive); }
html[data-theme] body.dashboard-active .intro-actions button.danger { color: var(--kp-negative); border-color: var(--kp-negative); }
html[data-theme] body.dashboard-active #intro-market-chart :is(.market-chart-heading, .market-chart-note, .market-chart-empty, .price-key-list) { color: var(--kp-muted); }
html[data-theme] body.dashboard-active #intro-market-chart :is(.market-chart-current strong, .price-key b) { color: var(--kp-text); }
html[data-theme] .public-market-price-tick { fill: var(--kp-muted); font: 12px ui-monospace, Consolas, monospace; }
html[data-theme] .public-market-chart svg { display: block; width: 100%; height: auto; min-height: 0; aspect-ratio: auto; }
html[data-theme] .public-market-expanded .public-market-chart svg { height: clamp(250px, 52dvh, 600px); }
html[data-theme] .public-market-chart .public-market-axis { color: var(--kp-muted); overflow-wrap: anywhere; }
@media (max-width: 1280px) {
  html[data-theme] body.dashboard-active .dashboard > .topbar { grid-template-columns: minmax(0, 1fr) auto; }
  html[data-theme] body.dashboard-active .dashboard > .topbar > .dashboard-nav { grid-column: 1 / -1; grid-row: 2; }
  html[data-theme] body.dashboard-active .dashboard > .topbar > .top-actions { grid-column: 2; grid-row: 1; }
}
@media (max-width: 600px) {
  html[data-theme] .dashboard-nav { width: 100%; }
  html[data-theme] .appearance-choices button { flex: 1; font-size: 11px; }
  html[data-theme] body.dashboard-active .topbar { position: static; }
  html[data-theme] body.dashboard-active .dashboard > .topbar { grid-template-columns: minmax(0, 1fr); position: static; }
  html[data-theme] body.dashboard-active .dashboard > .topbar > .top-actions { grid-column: 1; grid-row: 3; flex-wrap: wrap; }
}
