* { box-sizing: border-box; }
:root {
  font-family: "Microsoft YaHei", "微软雅黑", sans-serif;
  color: #0f172a;
  background: #f8fafc;
  --ak-dark-canvas: #0a0e17;
  --ak-dark-surface: #0f172a;
  --ak-dark-surface-raised: #111827;
  --ak-dark-text: #e8eef7;
  --ak-dark-text-muted: #a8b6c9;
  --ak-dark-text-faint: #91a3bc;
  --ak-dark-border: #2b3a53;
  --ak-dark-border-strong: #7186a3;
  --ak-dark-focus: #9bc0ff;
  --ak-text-muted: var(--ak-dark-text-muted);
  --ak-text-faint: var(--ak-dark-text-faint);
}
body { margin: 0; min-height: 100vh; background: #f8fafc; }
body.light-theme { --ak-text-muted: #52627a; --ak-text-faint: #5d6e85; }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
.login-view { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: linear-gradient(135deg, #020617, #1e293b); }
.login-card { width: min(420px, 100%); padding: 40px; border-radius: 20px; background: #fff; box-shadow: 0 24px 80px #02061766; }
.brand { margin: 0 0 8px; font-size: 34px; letter-spacing: -.04em; }
.muted, .small-note { color: #64748b; font-size: 14px; line-height: 1.6; }
label { display: block; margin: 20px 0 8px; color: #334155; font-size: 14px; font-weight: 700; }
input, textarea { width: 100%; border: 1px solid #cbd5e1; border-radius: 10px; padding: 12px; outline: none; background: #fff; }
input:focus, textarea:focus { border-color: #0284c7; box-shadow: 0 0 0 3px #0ea5e933; }
.primary, .secondary { border: 0; border-radius: 10px; padding: 11px 18px; font-weight: 700; }
.primary { background: #0284c7; color: #fff; }
.primary:hover { background: #0369a1; }
.secondary { background: #e2e8f0; color: #334155; }
#login-submit { width: 100%; margin-top: 24px; }
.message { margin-top: 16px; padding: 10px 12px; border-radius: 8px; background: #ecfeff; color: #155e75; font-size: 14px; }
.message.error { background: #fef2f2; color: #b91c1c; }
.shell-view { min-height: 100vh; display: grid; grid-template-columns: 240px 1fr; }
.sidebar {
  padding: 0 16px 24px;
  background: var(--ak-dark-canvas);
  border-right: 1px solid var(--ak-dark-border);
  color: var(--ak-dark-text);
}
.sidebar-brand { display: flex; align-items: center; gap: 8px; padding: 0 12px; font-size: 24px; font-weight: 900; letter-spacing: -.02em; color: #f1f5f9; }
.sidebar-brand b { color: #3b82f6; }
.sidebar-head { display: flex; align-items: center; justify-content: space-between; height: 52px; padding-right: 6px; }
.sidebar-toggle { width: 28px; height: 28px; display: grid; place-items: center; border: 0; border-radius: 6px; background: transparent; color: var(--ak-dark-text-faint); cursor: pointer; }
.sidebar-toggle:hover { background: #1e293b; color: #e2e8f0; }
.nav { display: grid; gap: 6px; }
.nav-item { display: flex; gap: 10px; align-items: center; width: 100%; padding: 11px 12px; border: 0; border-radius: 8px; background: transparent; color: #cbd5e1; text-align: left; }
.nav-item:hover, .nav-item.active { background: #1e293b; color: #fff; }
.nav-icon { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 6px; background: #334155; color: #bae6fd; font-size: 12px; font-weight: 800; }
.nav-icon svg { width: 15px; height: 15px; }
.sidebar-footer { position: fixed; bottom: 20px; width: 208px; display: flex; justify-content: space-between; align-items: center; color: #94a3b8; font-size: 13px; z-index: 1000; }
.link-button { border: 0; background: transparent; color: #7dd3fc; font-size: 13px; }
.user-menu-btn { display: flex; align-items: center; gap: 8px; width: 100%; padding: 8px 10px; border: 0; border-radius: 8px; background: transparent; color: inherit; cursor: pointer; font-family: inherit; }
.user-menu-btn:hover { background: #1e293b; }
.user-avatar { width: 28px; height: 28px; border-radius: 50%; background: #4472C4; color: #fff; display: grid; place-items: center; font-size: 13px; font-weight: 700; flex-shrink: 0; }
.user-name { flex: 1; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-chevron { flex-shrink: 0; opacity: .7; transition: transform .15s; }
.user-menu-btn[aria-expanded="true"] .user-chevron { transform: rotate(180deg); }
.user-menu { position: absolute; bottom: 64px; left: 12px; width: 280px; background: #111827; border: 1px solid #1e293b; border-radius: 10px; padding: 6px; box-shadow: 0 20px 48px rgba(0,0,0,.45); z-index: 1000; font-family: "Microsoft YaHei", "微软雅黑", sans-serif; }
.user-menu-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid #1e293b; }
.user-menu-avatar { width: 36px; height: 36px; border-radius: 50%; background: #4472C4; color: #fff; display: grid; place-items: center; font-size: 15px; font-weight: 700; flex-shrink: 0; }
.user-menu-id { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.user-menu-username { font-size: 14px; font-weight: 600; color: #f1f5f9; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-menu-expiry { font-size: 12px; color: #94a3b8; }
.user-menu-expiry b { color: #cbd5e1; font-weight: 500; }
.user-menu-body { padding: 10px 14px 8px; display: grid; gap: 14px; }
.user-menu-row { display: grid; gap: 6px; }
.user-menu-label { font-size: 11px; font-weight: 600; color: #94a3b8; letter-spacing: .04em; text-transform: uppercase; }
.ds-key-row { display: grid; gap: 8px; }
.ds-key-row input { width: 100%; padding: 9px 12px; border: 1px solid var(--ak-dark-border-strong); border-radius: 6px; background: var(--ak-dark-surface); color: #f1f5f9; font-size: 13px; font-family: inherit; box-sizing: border-box; outline: none; }
.ds-key-row input:focus { border-color: #4472C4; box-shadow: 0 0 0 3px rgba(68,114,196,.18); }
.ds-key-actions { display: flex; gap: 8px; }
.ds-key-actions .theme-opt { flex: 1; padding: 7px 0; }
.ds-key-hint { font-size: 12px; color: #94a3b8; }
.theme-switch { display: flex; gap: 4px; }
.theme-opt { flex: 1; padding: 7px 0; border: 1px solid #334155; border-radius: 6px; background: transparent; color: #cbd5e1; font-size: 13px; cursor: pointer; font-family: inherit; }
.theme-opt.on { background: #4472C4; border-color: #4472C4; color: #fff; }
.user-logout { width: calc(100% - 12px); margin: 4px 6px 6px; padding: 10px; border: 0; border-radius: 8px; background: transparent; color: #fca5a5; font-size: 14px; font-weight: 600; cursor: pointer; text-align: center; font-family: inherit; }
.user-logout:hover { background: rgba(239, 68, 68, .12); color: #fecaca; }

/* 左侧导航栏折叠态 */
body.sidebar-collapsed .shell-view { grid-template-columns: 64px 1fr; }
body.sidebar-collapsed .sidebar { padding: 0 8px 24px; }
body.sidebar-collapsed .sidebar-head { justify-content: center; padding-right: 0; }
body.sidebar-collapsed .sidebar-brand { display: none; }
body.sidebar-collapsed .nav-item { justify-content: center; padding: 11px 0; }
body.sidebar-collapsed .nav-label { display: none; }
body.sidebar-collapsed .sidebar-footer { width: 48px; }
body.sidebar-collapsed .user-name, body.sidebar-collapsed .user-chevron, body.sidebar-collapsed .user-menu { display: none; }
body.sidebar-collapsed .user-menu-btn { justify-content: center; padding: 8px 0; }
.sidebar-footer { position: fixed; bottom: 20px; width: 208px; flex-direction: column; }

/* ── 全局浅色主题（light-theme）──────────────────── */
body.light-theme .sidebar { background: #fff; color: #1f2937; border-right: 1px solid #E5E7EB; }
body.light-theme .sidebar-brand { color: #111827; }
body.light-theme .nav-item { color: #4b5563; }
body.light-theme .nav-item:hover, body.light-theme .nav-item.active { background: #f3f4f6; color: #111827; }
body.light-theme .nav-icon { background: #eef1f6; color: #4472C4; }
body.light-theme .sidebar-footer { color: #6b7280; }
body.light-theme .user-menu-btn:hover { background: #f3f4f6; }
body.light-theme .user-menu { background: #fff; border-color: #E5E7EB; box-shadow: 0 12px 32px rgba(0,0,0,.12); }
body.light-theme .user-menu-head { border-bottom-color: #E5E7EB; }
body.light-theme .user-menu-label { color: #6b7280; }
body.light-theme .user-menu-username { color: #111827; }
body.light-theme .user-menu-expiry, body.light-theme .user-menu-expiry b { color: #6b7280; }
body.light-theme .ds-key-row input { background: #fff; border-color: #D1D5DB; color: #111827; }
body.light-theme .theme-opt { border-color: #D1D5DB; color: #374151; }
body.light-theme .theme-opt.on { background: #4472C4; border-color: #4472C4; color: #fff; }
body.light-theme .user-logout { color: #dc2626; }
body.light-theme .user-logout:hover { background: #fef2f2; color: #b91c1c; }

/* ── 深色模式（默认）：内容区与各应用页深色化 ──────── */
body:not(.light-theme) { color-scheme: dark; background: var(--ak-dark-canvas); color: var(--ak-dark-text); }
body:not(.light-theme) ::selection { background: #315f9f; color: #f8fbff; }
body:not(.light-theme) :where(button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 3px solid var(--ak-dark-focus);
  outline-offset: 3px;
}
body:not(.light-theme) :where(input, textarea)::placeholder { color: var(--ak-dark-text-faint); opacity: 1; }
body:not(.light-theme) .main { background: var(--ak-dark-canvas); }
body:not(.light-theme) .content-head h1 { color: #f1f5f9; }
body:not(.light-theme) .content-head .muted { color: #94a3b8; }
body:not(.light-theme) .app-panel, body:not(.light-theme) .settings-panel { background: #111827; border-color: #1e293b; color: #e2e8f0; }
body:not(.light-theme) .app-panel h3, body:not(.light-theme) .settings-panel h3 { color: #f1f5f9; }
body:not(.light-theme) .coming-soon { color: var(--ak-dark-text-faint); }
body:not(.light-theme) .coming-soon h2 { color: #f1f5f9; }

/* TradingAgents 深色 */
body:not(.light-theme) .ta-app { background: var(--ak-dark-canvas); color: var(--ak-dark-text); }
body:not(.light-theme) .ta-panel-left, body:not(.light-theme) .ta-panel-center, body:not(.light-theme) .ta-panel-right { background: var(--ak-dark-canvas); }
body:not(.light-theme) .ta-panel-left { border-right-color: var(--ak-dark-border); }
body:not(.light-theme) .ta-panel-right { border-left-color: var(--ak-dark-border); }
body:not(.light-theme) .ta-panel-head, body:not(.light-theme) .ta-workspace-head, body:not(.light-theme) .ta-history-head, body:not(.light-theme) .ta-history-meta { border-color: var(--ak-dark-border); }
body:not(.light-theme) .ta-panel-title, body:not(.light-theme) .ta-workspace-title, body:not(.light-theme) .ta-history-title, body:not(.light-theme) .ta-field-label { color: #f1f5f9; }
body:not(.light-theme) .ta-hint { color: #94a3b8; }
body:not(.light-theme) .ta-opt { background: #111827; border-color: #1e293b; }
body:not(.light-theme) .ta-opt:hover { border-color: #475569; }
body:not(.light-theme) .ta-opt:has(input:checked) { border-color: #4472C4; background: #16233a; }
body:not(.light-theme) .ta-opt-title { color: #f1f5f9; }
body:not(.light-theme) .ta-opt-desc { color: #94a3b8; }
body:not(.light-theme) .ta-block input[type="date"], body:not(.light-theme) .ta-block input[type="password"] { background: var(--ak-dark-surface-raised); border-color: var(--ak-dark-border-strong); color: #f1f5f9; }
body:not(.light-theme) .ta-check { color: #94a3b8; }
body:not(.light-theme) .ta-btn { background: var(--ak-dark-surface-raised); border-color: var(--ak-dark-border-strong); color: var(--ak-dark-text); }
body:not(.light-theme) .ta-btn-ghost { background: transparent; }
body:not(.light-theme) .ta-btn-primary { background: #4472C4; border-color: #4472C4; color: #fff; }
body:not(.light-theme) .ta-confirm { background: #1c1917; border-color: #78350f; }
body:not(.light-theme) .ta-confirm p { color: #fde68a; }
body:not(.light-theme) .ta-note { color: var(--ak-dark-text-faint); }
body:not(.light-theme) .ta-h-item { background: var(--ak-dark-canvas); border-color: var(--ak-dark-border); }
body:not(.light-theme) .ta-h-item:hover { background: #111827; }
body:not(.light-theme) .ta-h-name { color: #f1f5f9; }
body:not(.light-theme) .ta-h-code { color: #94a3b8; }
body:not(.light-theme) .ta-h-line { color: #94a3b8; }
body:not(.light-theme) .ta-h-status { color: #cbd5e1; }
body:not(.light-theme) .ta-h-type { color: var(--ak-dark-text-faint); }
body:not(.light-theme) .ta-empty { color: var(--ak-dark-text-faint); }
body:not(.light-theme) .ta-icon-btn { color: #94a3b8; }
body:not(.light-theme) .ta-icon-btn:hover { background: #1e293b; color: #f1f5f9; }
body:not(.light-theme) .ta-text-btn { color: #7db1f7; }
body:not(.light-theme) .ta-workspace-title { color: #f1f5f9; }
body:not(.light-theme) .ta-report-frame { background: var(--ak-dark-canvas); }

/* MCP 指南深色 */
body:not(.light-theme) .md-page { background: var(--ak-dark-canvas); }
body:not(.light-theme) .md-doc { background: #111827; border-color: #1e293b; }
body:not(.light-theme) .md-title { color: #f1f5f9; }
body:not(.light-theme) .md-toolbar { border-color: #1e293b; }
body:not(.light-theme) .md-alert { background: #16233a; border-color: #334155; color: #cbd5e1; }
body:not(.light-theme) .md-alert label { color: #e2e8f0; }
body:not(.light-theme) .md-alert input { background: var(--ak-dark-surface); border-color: var(--ak-dark-border-strong); color: #f1f5f9; }
body:not(.light-theme) .md-alert input::placeholder { color: #94a3b8; opacity: 1; }
body:not(.light-theme) .md-content { color: #cbd5e1; }
body:not(.light-theme) .md-content h2, body:not(.light-theme) .md-content h3 { color: #f1f5f9; }
body:not(.light-theme) .md-content h2 { border-color: #1e293b; }
body:not(.light-theme) .md-content p { color: #cbd5e1; }
body:not(.light-theme) .md-content ul, body:not(.light-theme) .md-content ol { color: #cbd5e1; }
body:not(.light-theme) .md-content strong { color: #f1f5f9; }
body:not(.light-theme) .md-content code { background: #1e293b; color: #e2e8f0; }
body:not(.light-theme) .md-content pre { background: var(--ak-dark-canvas); border: 1px solid var(--ak-dark-border); }
body:not(.light-theme) .md-content pre code { background: transparent; color: inherit; }
body:not(.light-theme) .md-content blockquote {
  background: #16233a;
  border: 1px solid #334155;
  border-radius: 6px;
  color: #cbd5e1;
}
body:not(.light-theme) .md-content th, body:not(.light-theme) .md-content td { border-color: #1e293b; }
body:not(.light-theme) .md-content th { background: #16233a; color: #f1f5f9; }
body:not(.light-theme) .md-content tr:nth-child(even) { background: #0f172a; }
body:not(.light-theme) .md-content a { color: #7db1f7; }
body:not(.light-theme) .md-content a:hover { color: #bfdbfe; }

/* AlphaView 深色 */
body:not(.light-theme) .av-page { background: var(--ak-dark-canvas); }
body:not(.light-theme) .av-top { border-color: #1e293b; }
body:not(.light-theme) .av-hint { color: var(--ak-dark-text-muted); }
body:not(.light-theme) .av-ai-input { background: var(--ak-dark-surface-raised); border-color: var(--ak-dark-border-strong); color: #f1f5f9; }
body:not(.light-theme) .av-ai-input::placeholder { color: var(--ak-dark-text-muted); opacity: 1; }
body:not(.light-theme) .av-draw-btn { background: var(--ak-dark-surface-raised); border-color: var(--ak-dark-border-strong); color: #cbd5e1; }
body:not(.light-theme) .av-draw-btn:hover { color: #f1f5f9; border-color: #4472C4; }
body:not(.light-theme) .av-draw-btn.on { background: #4472C4; border-color: #4472C4; color: #fff; }
body:not(.light-theme) .av-top-tools .tb-group { background: var(--ak-dark-surface-raised); border: 1px solid #526783; }
body:not(.light-theme) .av-top-tools .tb-btn { color: #cbd5e1; font-weight: 600; }
body:not(.light-theme) .av-top-tools .tb-btn:hover { color: #f8fafc; background: #1e293b; }
body:not(.light-theme) .av-indices-date { color: var(--ak-dark-text-muted); }
body:not(.light-theme) .av-side { background: var(--ak-dark-canvas); border-left-color: var(--ak-dark-border); }
body:not(.light-theme) .av-side-toggle { color: #94a3b8; }
body:not(.light-theme) .av-side-toggle:hover { background: #1e293b; color: #f1f5f9; }
body:not(.light-theme) .av-tabs { border-color: #1e293b; }
body:not(.light-theme) .av-tab { color: #94a3b8; }
body:not(.light-theme) .av-tab:hover { color: #e2e8f0; }
body:not(.light-theme) .av-tab.on { color: #7db1f7; border-bottom-color: #4472C4; }
.main { min-width: 0; padding: 36px clamp(24px, 5vw, 72px); }
.content-head { margin-bottom: 28px; }
.content-head h1 { margin: 0 0 6px; font-size: 32px; letter-spacing: -.04em; }
.content { max-width: 760px; }
.app-panel, .settings-panel { padding: 28px; border: 1px solid #e2e8f0; border-radius: 14px; background: #fff; box-shadow: 0 8px 24px #0f172a0a; }
.app-panel-head { display: flex; justify-content: space-between; align-items: center; }
.app-panel h3, .settings-panel h3 { margin: 0 0 8px; font-size: 22px; }
.status-pill { padding: 5px 10px; border-radius: 999px; background: #dcfce7; color: #166534; font-size: 12px; }
.status-pill.unavailable { background: #fee2e2; color: #991b1b; }
.actions { display: flex; gap: 10px; margin-top: 20px; }

/* ── TradingAgents 三栏控制台（通顶到底，纯平铺）──── */
.ta-full {
  max-width: none;
  width: 100%;
  height: 100vh;
}
.content-wide { max-width: none; width: 100%; }
.main-flush { padding: 0 !important; }
.ta-app {
  display: flex;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #fff;
  font-family: "Microsoft YaHei", "微软雅黑", sans-serif;
  color: #1f2937;
  font-size: 16px;
  line-height: 1.75;
}

/* 左栏：操作控制台 */
.ta-panel-left {
  width: 320px;
  flex-shrink: 0;
  border-right: 1px solid #E5E7EB;
  overflow-y: auto;
  box-sizing: border-box;
}
/* 三栏 topbar 统一高度 */
.ta-panel-head, .ta-workspace-head, .ta-history-head {
  height: 52px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid #E5E7EB;
  flex-shrink: 0;
}
.ta-panel-head { justify-content: space-between; padding: 0 20px; }
.ta-panel-title { font-size: 16px; font-weight: 600; color: #111827; }
.ta-panel-left > .message { margin: 14px 20px 0; }
.ta-panel-left > .ta-block, .ta-panel-left > .ta-submit, .ta-panel-left > .ta-confirm, .ta-panel-left > .ta-note {
  margin-left: 20px;
  margin-right: 20px;
}
.ta-panel-left > .ta-block:first-of-type { margin-top: 18px; }
.ta-field-label { display: block; margin: 0 0 6px; font-size: 16px; font-weight: 500; color: #1f2937; }
.ta-date-label { display: inline-flex; align-items: center; gap: 6px; }
.ta-block { margin-bottom: 18px; }
.ta-hint { margin: 6px 0 0; color: #6B7280; font-size: 14px; line-height: 1.7; }
.ta-data-note { min-height: 20px; }
.ta-warn { color: #92400e; background: #fffbeb; border: 1px solid #fde68a; padding: 8px 10px; border-radius: 4px; }
.ta-note { margin: 12px 0 0; color: #9CA3AF; font-size: 14px; line-height: 1.7; }

.ta-opt {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 10px 12px; margin-top: 8px;
  border: 1px solid #E5E7EB; border-radius: 6px;
  cursor: pointer; background: #fff;
  transition: border-color .15s, background .15s;
}
.ta-opt:hover { border-color: #9ca3af; }
.ta-opt:has(input:checked) { border-color: #4472C4; background: #f7f9fd; }
.ta-opt input { width: auto; margin-top: 3px; accent-color: #4472C4; }
.ta-opt-body { display: grid; gap: 1px; }
.ta-opt-title { font-size: 15px; font-weight: 600; color: #111827; }
.ta-opt-desc { font-size: 13px; color: #6B7280; line-height: 1.5; }

.ta-block input[type="date"], .ta-block input[type="password"] {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #D1D5DB;
  border-radius: 6px;
  font-size: 16px;
  color: #111827;
  background: #fff;
  box-sizing: border-box;
  outline: none;
  font-family: inherit;
}
.ta-block input:focus { border-color: #4472C4; box-shadow: 0 0 0 2px #4472C41f; }
.ta-check { display: flex; align-items: flex-start; gap: 8px; margin: 10px 0 6px; font-size: 14px; color: #6B7280; line-height: 1.6; font-weight: 400; }
.ta-check input { width: auto; margin-top: 2px; accent-color: #4472C4; }
.ta-text-btn { border: 0; background: transparent; color: #4472C4; font-size: 14px; padding: 0; cursor: pointer; font-family: inherit; }
.ta-text-btn:hover { text-decoration: underline; }

.ta-btn {
  border: 1px solid #D1D5DB;
  border-radius: 6px;
  padding: 9px 16px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  background: #fff;
  color: #374151;
}
.ta-btn-primary { background: #4472C4; border-color: #4472C4; color: #fff; }
.ta-btn-primary:hover { background: #3a63b0; }
.ta-btn-ghost { background: transparent; border-color: #D1D5DB; }
.ta-submit { width: calc(100% - 40px); margin: 16px 20px 0; padding: 11px 16px; box-sizing: border-box; }
.ta-submit:disabled { opacity: .45; cursor: not-allowed; }
body:not(.light-theme) .ta-submit:disabled { opacity: .68; }
.ta-submit-status {
  width: calc(100% - 40px);
  min-height: 20px;
  margin: 8px 20px 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
  box-sizing: border-box;
}
.ta-submit-status[data-state="warning"] { color: #B45309; }
.ta-submit-status[data-state="ready"] { color: #15803D; }
body:not(.light-theme) .ta-submit-status { color: #94A3B8; }
body:not(.light-theme) .ta-submit-status[data-state="warning"] { color: #FBBF24; }
body:not(.light-theme) .ta-submit-status[data-state="ready"] { color: #4ADE80; }

.ta-confirm { margin-top: 14px; padding: 12px 14px; border: 1px solid #fde68a; border-radius: 6px; background: #fffbeb; }
.ta-confirm p { margin: 0 0 10px; color: #78350f; font-size: 14px; line-height: 1.7; }
.ta-confirm-actions { display: flex; gap: 10px; }

/* 中栏：沉浸式报告工作区 */
.ta-panel-center { flex: 1; min-width: 0; display: flex; flex-direction: column; background: #fff; }
.ta-workspace-head {
  justify-content: space-between;
  padding: 0 18px;
}
.ta-workspace-title { font-size: 22px; font-weight: 700; color: #111827; letter-spacing: -.01em; }
.ta-workspace-actions { display: flex; gap: 14px; align-items: center; }
.ta-workspace-body { flex: 1; min-height: 0; display: flex; flex-direction: column; overflow-y: auto; }
.ta-empty-state {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  color: #9ca3af; font-size: 15px;
}
.ta-report-shell {
  flex: 1;
  width: 100%;
  max-width: 1024px;
  margin: 0 auto;
  padding: 24px;
  box-sizing: border-box;
  display: flex;
}
.ta-report-frame { flex: 1; width: 100%; height: 100%; min-height: 600px; border: 0; background: #fff; }

/* 右栏：历史记录边栏 */
.ta-panel-right {
  width: 340px;
  flex-shrink: 0;
  border-left: 1px solid #E5E7EB;
  display: flex;
  flex-direction: column;
  background: #fff;
}
.ta-history-head {
  justify-content: space-between;
  padding: 0 16px;
}
.ta-history-title { font-size: 16px; font-weight: 600; color: #111827; }
.ta-history-meta {
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
  padding: 8px 16px; border-bottom: 1px solid #E5E7EB;
  color: #6B7280; font-size: 12px; flex-shrink: 0;
}
.ta-clear-btn { display: inline-flex; align-items: center; gap: 4px; }
.ta-history-list { flex: 1; overflow-y: auto; }
.ta-empty { color: #9ca3af; font-size: 14px; text-align: center; padding: 32px 0; }
.ta-h-item {
  padding: 12px 16px;
  border-bottom: 1px solid #E5E7EB;
  cursor: pointer;
  background: #fff;
  transition: background .15s;
}
.ta-h-item:hover { background: #F9FAFB; }
.ta-h-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.ta-h-name { font-size: 16px; font-weight: 600; color: #111827; line-height: 1.5; word-break: break-all; }
.ta-h-code { color: #6B7280; font-size: 14px; font-weight: 400; font-family: "Microsoft YaHei", "微软雅黑", sans-serif; }
.ta-h-ops {
  display: flex; gap: 2px; flex-shrink: 0;
  opacity: 0;
  transition: opacity .15s;
}
.ta-h-item:hover .ta-h-ops { opacity: 1; }
.ta-icon-btn {
  width: 26px; height: 26px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 0; border-radius: 5px;
  background: transparent; color: #6B7280;
  cursor: pointer;
}
.ta-icon-btn:hover { background: #F3F4F6; color: #111827; }
.ta-h-line { margin-top: 5px; font-size: 13px; color: #6B7280; line-height: 1.5; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ta-h-line-status { display: flex; align-items: center; gap: 10px; }
.ta-h-type { color: #9CA3AF; }
.ta-h-status { display: inline-flex; align-items: center; gap: 5px; color: #6B7280; }
.ta-dot { width: 7px; height: 7px; border-radius: 50%; background: #9ca3af; display: inline-block; }
.ta-h-status.queued .ta-dot { background: #eab308; }
.ta-h-status.running .ta-dot { background: #f59e0b; }
.ta-h-status.succeeded .ta-dot { background: #22c55e; }
.ta-h-status.failed .ta-dot { background: #ef4444; }
.ta-h-status.canceled .ta-dot { background: #9ca3af; }
.ta-h-error { margin-top: 6px; padding: 6px 8px; border-radius: 4px; background: #fef2f2; color: #b91c1c; font-size: 12px; line-height: 1.5; word-break: break-all; }

/* ── 数据服务：MCP 对接指南（文档中心）────────────── */
.md-page {
  height: 100%;
  overflow-y: auto;
  background: #F9FAFB;
  box-sizing: border-box;
  font-family: "Microsoft YaHei", "微软雅黑", sans-serif;
}
.md-doc {
  width: 100%;
  max-width: 896px;
  margin: 32px auto 48px;
  padding: 40px;
  background: #fff;
  border: 1px solid #E5E7EB;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .06);
  box-sizing: border-box;
}
.md-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding-bottom: 16px;
  margin-bottom: 24px;
  border-bottom: 1px solid #E5E7EB;
}
.md-title { margin: 0; font-size: 24px; font-weight: 700; color: #111827; }
.md-alert {
  background: #F5F7FA;
  border: 1px solid #c7d6f2;
  border-radius: 6px;
  padding: 14px 16px;
  margin-bottom: 24px;
  color: #374151;
  display: grid;
  gap: 8px;
}
.md-alert label { margin: 0; font-size: 14px; color: #374151; }
.md-alert input {
  padding: 10px 12px;
  border: 1px solid #D1D5DB;
  border-radius: 6px;
  font-size: 15px;
  font-family: inherit;
  box-sizing: border-box;
  width: 100%;
}
.md-alert .ta-btn { justify-self: start; }
.md-content { color: #374151; font-size: 16px; line-height: 1.75; }
.md-content h2 { font-size: 19px; font-weight: 700; color: #111827; margin: 28px 0 10px; padding-bottom: 6px; border-bottom: 1px solid #E5E7EB; }
.md-content h3 { font-size: 17px; font-weight: 600; color: #111827; margin: 20px 0 8px; }
.md-content p { margin: 10px 0; color: #4B5563; line-height: 1.75; }
.md-content ul, .md-content ol { margin: 10px 0; padding-left: 24px; color: #4B5563; }
.md-content li { margin: 4px 0; }
.md-content code {
  background: #F3F4F6;
  color: #1F2937;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 14px;
  font-family: "Microsoft YaHei", "微软雅黑", sans-serif;
  overflow-wrap: anywhere;
}
.md-content pre {
  position: relative;
  background: #111827;
  color: #E5E7EB;
  padding: 16px 18px;
  border-radius: 6px;
  overflow-x: auto;
  margin: 12px 0;
}
.md-content pre code { background: none; color: inherit; padding: 0; font-size: 14px; }
.code-copy-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(255, 255, 255, .12);
  color: #E5E7EB;
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 4px;
  font-size: 12px;
  padding: 3px 8px;
  cursor: pointer;
  font-family: "Microsoft YaHei", "微软雅黑", sans-serif;
}
.code-copy-btn:hover { background: rgba(255, 255, 255, .22); }
.code-copy-btn:focus-visible { outline: 2px solid #93c5fd; outline-offset: 2px; }
.md-content blockquote {
  background: #F5F7FA;
  border-left: 2px solid #cbd5e1;
  border-radius: 0 4px 4px 0;
  margin: 12px 0;
  padding: 8px 14px;
  color: #4B5563;
}
.md-content table { border-collapse: collapse; width: 100%; margin: 14px 0; }
.md-content th, .md-content td { border: 1px solid #E5E7EB; padding: 8px 12px; text-align: left; font-size: 15px; }
.md-content th { background: #F9FAFB; font-weight: 600; color: #111827; }
.md-content tr:nth-child(even) { background: #FAFAFA; }
.md-content a { color: #4472C4; }

@media (max-width: 720px) {
  .md-doc { margin: 0; padding: 24px 18px 32px; border-inline: 0; border-radius: 0; }
  .md-toolbar { margin-bottom: 20px; }
  .md-content table { display: block; overflow-x: auto; }
}

/* Coming Soon 占位 */
.coming-soon { min-height: 50vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; color: #9CA3AF; }
.coming-soon h2 { margin: 0; font-size: 26px; font-weight: 700; color: #111827; }
.coming-soon p { margin: 0; font-size: 16px; }

/* ── AlphaView K 线工作台 ───────────────────────── */
.av-page { position: relative; height: 100vh; overflow: hidden; display: flex; flex-direction: column; background: #fff; font-family: "Microsoft YaHei", "微软雅黑", sans-serif; }
.av-top { height: 46px; display: flex; align-items: center; gap: 8px; padding: 0 10px; border-bottom: 1px solid #E5E7EB; flex-shrink: 0; overflow-x: auto; scrollbar-width: none; }
.av-top::-webkit-scrollbar { display: none; }
.av-top ak-stock-picker { max-width: 300px; flex-shrink: 0; --ak-picker-h: 30px; }
.av-top .ta-btn { height: 30px; padding: 0 11px; font-size: 13px; font-weight: 500; display: inline-flex; align-items: center; gap: 5px; flex-shrink: 0; }
.av-market { display: flex; border: 1px solid #D1D5DB; border-radius: 6px; overflow: hidden; flex-shrink: 0; }
.av-market button { border: 0; background: #fff; color: #6B7280; font-size: 13px; font-weight: 500; padding: 0 11px; height: 30px; cursor: pointer; font-family: "Microsoft YaHei", "微软雅黑", sans-serif; }
.av-market button + button { border-left: 1px solid #E5E7EB; }
.av-market button:hover { color: #111827; background: #f3f4f6; }
.av-market button.on { background: #4472C4; color: #fff; }
.av-market button.on:hover { background: #3a63b4; color: #fff; }
.av-market button:disabled { opacity: .45; cursor: not-allowed; }
.av-market button:disabled:hover { background: #fff; color: #6B7280; }
body:not(.light-theme) .av-market { border-color: var(--ak-dark-border-strong); }
body:not(.light-theme) .av-market button { background: #111827; color: #cbd5e1; font-weight: 600; }
body:not(.light-theme) .av-market button + button { border-left-color: var(--ak-dark-border-strong); }
body:not(.light-theme) .av-market button:hover { background: #1e293b; color: #f1f5f9; }
body:not(.light-theme) .av-market button.on { background: #4472C4; color: #fff; }
body:not(.light-theme) .av-market button.on:hover { background: #3a63b4; color: #fff; }
body:not(.light-theme) .av-market button:disabled { opacity: .68; cursor: not-allowed; }
body:not(.light-theme) .av-market button:disabled:hover { background: #111827; color: var(--ak-dark-text-muted); }
.av-ai-input { padding: 8px 10px; border: 1px solid #D1D5DB; border-radius: 6px; font-size: 13px; font-family: "Microsoft YaHei", "微软雅黑", sans-serif; outline: none; width: 240px; color: #111827; background: #fff; box-sizing: border-box; }
.av-ai-input:focus { border-color: #4472C4; }
.av-draw-tools { display: flex; gap: 2px; }
.av-draw-btn { width: 30px; height: 30px; display: grid; place-items: center; border: 1px solid #D1D5DB; border-radius: 5px; background: #fff; color: #6B7280; cursor: pointer; transition: all .15s; }
.av-draw-btn:hover { color: #111827; border-color: #4472C4; }
.av-draw-btn.on { background: #4472C4; border-color: #4472C4; color: #fff; }
.av-indices-date { font-size: 12px; color: #94a3b8; padding: 3px 8px 5px; }
.av-indices-empty { color: #94a3b8; font-size: 13px; padding: 12px; margin: 0; text-align: center; }
.av-hint { color: #6B7280; font-size: 13px; margin-left: auto; flex-shrink: 0; }
.av-body { flex: 1; display: flex; min-height: 0; }
.av-chart { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.av-top-tools { display: flex; align-items: center; gap: 6px; flex-shrink: 0; overflow-x: auto; scrollbar-width: none; }
.av-top-tools::-webkit-scrollbar { display: none; }
.av-top-tools .tb-group { background: #f3f4f6; border-radius: 6px; padding: 2px; gap: 1px; display: flex; flex-shrink: 0; }
.av-top-tools .tb-btn { font-size: 13px; font-weight: 500; height: 30px; padding: 0 10px; display: inline-flex; align-items: center; gap: 4px; border-radius: 4px; border: none; cursor: pointer; background: transparent; color: #6B7280; white-space: nowrap; font-family: "Microsoft YaHei", "微软雅黑", sans-serif; }
.av-top-tools .tb-btn:hover { color: #111827; background: #e5e7eb; }
.av-top-tools .tb-btn.on { background: #4472C4; color: #fff; }
.av-top-tools .tb-btn.on-liq { background: #4472C4; color: #fff; }
.av-top-tools .tb-btn.on-ai { background: #4472C4; color: #fff; }
.av-top-tools .tb-btn.on-vp { background: #4472C4; color: #fff; }
.av-top-tools .tb-btn.on-none { background: rgba(239, 68, 68, .16); color: #fca5a5; box-shadow: inset 0 0 0 1px rgba(239, 68, 68, .4); }
.av-top-tools .tb-btn.on-none:hover { background: rgba(239, 68, 68, .28); color: #fecaca; box-shadow: inset 0 0 0 1px rgba(239, 68, 68, .55); }
.av-top-tools .tb-btn.on:hover { background: #3A63B4; }
.av-top-tools .tb-btn.on-liq:hover { background: #3A63B4; }
.av-top-tools .tb-btn.on-ai:hover { background: #3A63B4; }
.av-top-tools .tb-btn.on-vp:hover { background: #3A63B4; }
.av-top-tools .tb-select { position: relative; }
.av-top-tools .tb-select > .tb-btn { min-width: 58px; display: inline-flex; align-items: center; justify-content: center; gap: 3px; }
.av-top-tools .tb-select-menu { position: fixed; z-index: 1000; background: #111827; border: 1px solid #334155; border-radius: 6px; padding: 4px; display: flex; flex-direction: column; gap: 2px; min-width: 84px; box-shadow: 0 12px 28px rgba(0,0,0,.35); }
.av-top-tools .tb-select-opt { border: 0; background: transparent; color: #cbd5e1; font-size: 12px; font-weight: 600; padding: 6px 10px; border-radius: 4px; cursor: pointer; text-align: left; font-family: "Microsoft YaHei", "微软雅黑", sans-serif; white-space: nowrap; }
.av-top-tools .tb-select-opt:hover { background: #1e293b; color: #fff; }
.av-top-tools .tb-select-opt.on { background: #4472C4; color: #fff; }
.av-top-tools .tb-ind-panel { position: fixed; z-index: 1001; background: #111827; border: 1px solid #2a3342; border-radius: 12px; width: 560px; max-height: 76vh; overflow: hidden; box-shadow: 0 24px 64px rgba(0,0,0,.5), 0 4px 12px rgba(0,0,0,.3); display: flex; flex-direction: column; font-family: "Microsoft YaHei", "微软雅黑", sans-serif; }
.av-top-tools .tb-ind-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px 10px; }
.av-top-tools .tb-ind-title { font-size: 14px; font-weight: 600; color: #f1f5f9; letter-spacing: .2px; }
.av-top-tools .tb-ind-close { width: 28px; height: 28px; border: 0; border-radius: 6px; background: transparent; color: #94a3b8; cursor: pointer; display: grid; place-items: center; }
.av-top-tools .tb-ind-close:hover { background: #1e293b; color: #fff; }
.av-top-tools .tb-ind-search-wrap { position: relative; margin: 0 16px 12px; }
.av-top-tools .tb-ind-search-icon { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--ak-text-faint); pointer-events: none; display: grid; place-items: center; }
.av-top-tools .tb-ind-search { width: 100%; box-sizing: border-box; padding: 9px 12px 9px 32px; border: 1px solid var(--ak-dark-border-strong); border-radius: 8px; background: var(--ak-dark-canvas); color: #e5e7eb; font-size: 13px; font-family: inherit; outline: none; }
.av-top-tools .tb-ind-search:focus { border-color: #4472C4; box-shadow: 0 0 0 3px rgba(68,114,196,.15); }
.av-top-tools .tb-ind-body { display: flex; flex: 1; min-height: 0; border-top: 1px solid #1e293b; }
.av-top-tools .tb-ind-cats { width: 112px; flex-shrink: 0; border-right: 1px solid #1e293b; overflow-y: auto; padding: 8px 6px; display: flex; flex-direction: column; gap: 2px; }
.av-top-tools .tb-ind-cat { border: 0; background: transparent; color: #94a3b8; font-size: 13px; padding: 8px 12px; border-radius: 6px; cursor: pointer; text-align: left; font-family: inherit; }
.av-top-tools .tb-ind-cat:hover { background: #1e293b; color: #e5e7eb; }
.av-top-tools .tb-ind-cat.on { background: rgba(68,114,196,.16); color: #fff; font-weight: 600; }
.av-top-tools .tb-ind-items { flex: 1; overflow-y: auto; padding: 8px; display: flex; flex-direction: column; gap: 2px; min-height: 200px; max-height: 52vh; scrollbar-width: thin; }
.av-top-tools .tb-ind-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 0; border-radius: 6px; background: transparent; cursor: pointer; text-align: left; font-family: inherit; width: 100%; box-sizing: border-box; user-select: none; }
.av-top-tools .tb-ind-item:focus-visible { outline: 2px solid rgba(68,114,196,.65); outline-offset: -2px; }
.av-top-tools .tb-ind-item:hover { background: #1e293b; }
.av-top-tools .tb-ind-item.on { background: rgba(68,114,196,.12); }
.av-top-tools .tb-ind-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.av-top-tools .tb-ind-name { flex: 1; min-width: 0; font-size: 13px; font-weight: 600; color: #e5e7eb; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.av-top-tools .tb-ind-item.on .tb-ind-name { color: #fff; }
.av-top-tools .tb-ind-type { width: 46px; text-align: center; font-size: 11px; padding: 2px 0; border-radius: 4px; flex-shrink: 0; }
.av-top-tools .tb-ind-type.overlay { background: rgba(239,68,68,.14); color: #fca5a5; }
.av-top-tools .tb-ind-type.pane { background: rgba(59,130,246,.14); color: #93c5fd; }
.av-top-tools .tb-ind-gear-wrap { display: grid; place-items: center; margin-left: 2px; flex-shrink: 0; }
.av-top-tools .tb-ind-gear { width: 24px; height: 24px; border: 0; border-radius: 5px; background: transparent; color: #94a3b8; cursor: pointer; display: grid; place-items: center; padding: 0; }
.av-top-tools .tb-ind-gear:hover { background: rgba(68,114,196,.2); color: #fff; }
.av-top-tools .tb-ind-check { width: 18px; height: 18px; display: grid; place-items: center; border-radius: 50%; color: #fff; flex-shrink: 0; }
.av-top-tools .tb-ind-item.on .tb-ind-check { background: #4472C4; }
.av-top-tools .tb-ind-item-clear .tb-ind-name { color: #ef4444; }
.av-top-tools .tb-ind-empty { padding: 24px; text-align: center; color: var(--ak-text-faint); font-size: 13px; }
.av-top-tools .tb-ind-params-view { display: none; flex-direction: column; flex: 1; min-height: 0; }
.av-top-tools .tb-ind-panel.mode-params .tb-ind-params-view { display: flex; }
.av-top-tools .tb-ind-panel.mode-params .tb-ind-head,
.av-top-tools .tb-ind-panel.mode-params .tb-ind-search-wrap,
.av-top-tools .tb-ind-panel.mode-params .tb-ind-body { display: none; }
.av-top-tools .tb-ind-pv-head { display: flex; align-items: center; gap: 8px; padding: 12px 16px 10px; border-bottom: 1px solid #1e293b; }
.av-top-tools .tb-ind-pv-back { width: 28px; height: 28px; border: 0; border-radius: 6px; background: transparent; color: #94a3b8; cursor: pointer; display: grid; place-items: center; padding: 0; }
.av-top-tools .tb-ind-pv-back:hover { background: #1e293b; color: #fff; }
.av-top-tools .tb-ind-pv-title { font-size: 14px; font-weight: 600; color: #f1f5f9; }
.av-top-tools .tb-ind-pv-body { flex: 1; overflow-y: auto; padding: 10px 16px; display: flex; flex-direction: column; gap: 10px; min-height: 180px; max-height: 52vh; scrollbar-width: thin; }
.av-top-tools .tb-ind-pv-row { display: grid; grid-template-columns: 116px 1fr auto; align-items: center; gap: 10px; }
.av-top-tools .tb-ind-pv-label { font-size: 13px; font-weight: 600; color: #e5e7eb; white-space: nowrap; }
.av-top-tools .tb-ind-pv-input { width: 100%; box-sizing: border-box; padding: 8px 10px; border: 1px solid var(--ak-dark-border-strong); border-radius: 6px; background: var(--ak-dark-canvas); color: #e5e7eb; font-size: 13px; font-family: inherit; outline: none; }
.av-top-tools .tb-ind-pv-input:focus { border-color: #4472C4; box-shadow: 0 0 0 3px rgba(68,114,196,.15); }
.av-top-tools .tb-ind-pv-reset { height: 30px; padding: 0 10px; border: 1px solid #2a3342; background: transparent; color: #94a3b8; border-radius: 6px; font-size: 12px; cursor: pointer; font-family: inherit; white-space: nowrap; }
.av-top-tools .tb-ind-pv-reset:hover { border-color: #4472C4; color: #fff; }
.av-top-tools .tb-ind-pv-actions { display: flex; justify-content: flex-end; gap: 10px; padding: 12px 16px; border-top: 1px solid #1e293b; }
.av-top-tools .tb-ind-pv-btn { height: 32px; padding: 0 16px; border: 1px solid #2a3342; background: transparent; color: #e5e7eb; border-radius: 6px; font-size: 13px; font-weight: 500; cursor: pointer; font-family: "Microsoft YaHei", "微软雅黑", sans-serif; }
.av-top-tools .tb-ind-pv-btn:hover { background: #1e293b; }
.av-top-tools .tb-ind-pv-btn-primary { background: #4472C4; border-color: #4472C4; color: #fff; }
.av-top-tools .tb-ind-pv-btn-primary:hover { background: #3a63b4; }
.av-chart-area { flex: 1; position: relative; background: #0a0e17; min-height: 0; overflow-y: auto; scrollbar-width: thin; }
.av-chart-area svg { width: 100%; height: 100%; display: block; }
.av-chart-area.resizing { cursor: ns-resize; user-select: none; }
.av-side { position: relative; width: 340px; flex-shrink: 0; border-left: 1px solid #E5E7EB; display: flex; flex-direction: column; background: #fff; overflow: hidden; transition: width .18s ease; }
.av-side-toggle { width: 28px; height: 28px; display: grid; place-items: center; border: 0; border-radius: 4px; background: transparent; color: #6B7280; cursor: pointer; flex-shrink: 0; }
.av-side-toggle:hover { background: #f3f4f6; color: #111827; }
.av-side.collapsed { width: 0; border-left: 0; }
.av-watch { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.av-tabs { display: flex; border-bottom: 1px solid #E5E7EB; flex-shrink: 0; }
.av-tab { flex: 1; padding: 9px 0; border: 0; border-bottom: 2px solid transparent; background: transparent; font-size: 14px; font-weight: 600; color: #6B7280; cursor: pointer; font-family: "Microsoft YaHei", "微软雅黑", sans-serif; }
.av-tab:hover { color: #374151; }
.av-tab.on { color: #4472C4; border-bottom-color: #4472C4; }
.av-watch-list { flex: 1; min-height: 0; overflow-y: auto; }
.av-watch-list[hidden] { display: none; }
.av-watch-list.av-fade { animation: avFadeIn .3s ease; }
.av-featured { margin: 10px 12px 12px; border-top: 1px solid rgba(148,163,184,.18); padding-top: 10px; }
.av-featured-title { font-size: 12px; font-weight: 700; color: #94a3b8; margin-bottom: 4px; }
.av-featured-group { margin-bottom: 4px; }
.av-featured-label { font-size: 11px; font-weight: 600; color: #94a3b8; letter-spacing: .04em; margin: 8px 0 3px; }
.av-featured-row {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 5px 8px;
  border: 0; border-radius: 6px; background: transparent; color: inherit; cursor: pointer;
  text-align: left; font-family: "Microsoft YaHei", "微软雅黑", sans-serif; font-size: 13px;
}
.av-featured-row:hover { background: rgba(68,114,196,.1); }
.av-featured-name { flex: 1; min-width: 0; color: #e2e8f0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.light-theme .av-featured-name { color: #1f2937; }
.av-featured-price { color: #94a3b8; font-variant-numeric: tabular-nums; }
.av-featured-pct { width: 62px; text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.av-featured-pct.pos { color: #ef4444; }
.av-featured-pct.neg { color: #10b981; }
.av-featured-pct.zero { color: #94a3b8; }
@keyframes avFadeIn { from { opacity: .2; } to { opacity: 1; } }

/* AlphaView 图表工具栏/区域跟随浅色主题 */
body.light-theme .av-top-tools { background: #fff; border-bottom-color: #E5E7EB; }
body.light-theme .av-top-tools .tb-group { background: #f3f4f6; }
body.light-theme .av-top-tools .tb-btn { color: #6B7280; }
body.light-theme .av-top-tools .tb-btn:hover { color: #111827; background: #e5e7eb; }
body.light-theme .av-top-tools .tb-btn.on { background: #4472C4; color: #fff; }
body.light-theme .av-top-tools .tb-btn.on-liq { background: #4472C4; color: #fff; }
body.light-theme .av-top-tools .tb-btn.on-ai { background: #4472C4; color: #fff; }
body.light-theme .av-top-tools .tb-btn.on-vp { background: #4472C4; color: #fff; }
body.light-theme .av-top-tools .tb-btn.on:hover { background: #3A63B4; }
body.light-theme .av-top-tools .tb-btn.on-liq:hover { background: #3A63B4; }
body.light-theme .av-top-tools .tb-btn.on-ai:hover { background: #3A63B4; }
body.light-theme .av-top-tools .tb-btn.on-vp:hover { background: #3A63B4; }
body.light-theme .av-top-tools .tb-select-menu { background: #fff; border-color: #E5E7EB; box-shadow: 0 12px 28px rgba(0,0,0,.14); }
body.light-theme .av-top-tools .tb-select-opt { color: #374151; }
body.light-theme .av-top-tools .tb-select-opt:hover { background: #f3f4f6; color: #111827; }
body.light-theme .av-top-tools .tb-select-opt.on { background: #4472C4; color: #fff; }
body.light-theme .av-top-tools .tb-ind-panel { background: #fff; border-color: #E5E7EB; box-shadow: 0 24px 64px rgba(0,0,0,.18), 0 4px 12px rgba(0,0,0,.08); }
body.light-theme .av-top-tools .tb-ind-title { color: #111827; }
body.light-theme .av-top-tools .tb-ind-close { color: #6B7280; }
body.light-theme .av-top-tools .tb-ind-close:hover { background: #f3f4f6; color: #111827; }
body.light-theme .av-top-tools .tb-ind-search { background: #f3f4f6; border-color: #E5E7EB; color: #111827; }
body.light-theme .av-top-tools .tb-ind-body { border-top-color: #E5E7EB; }
body.light-theme .av-top-tools .tb-ind-cats { border-right-color: #E5E7EB; }
body.light-theme .av-top-tools .tb-ind-cat { color: #6B7280; }
body.light-theme .av-top-tools .tb-ind-cat:hover { background: #f3f4f6; color: #111827; }
body.light-theme .av-top-tools .tb-ind-cat.on { background: rgba(68,114,196,.12); color: #111827; }
body.light-theme .av-top-tools .tb-ind-item:hover { background: #f3f4f6; }
body.light-theme .av-top-tools .tb-ind-item.on { background: rgba(68,114,196,.10); }
body.light-theme .av-top-tools .tb-ind-name { color: #111827; }
body.light-theme .av-top-tools .tb-ind-item.on .tb-ind-name { color: #111827; }
body.light-theme .av-top-tools .tb-ind-type.overlay { background: rgba(239,68,68,.10); color: #dc2626; }
body.light-theme .av-top-tools .tb-ind-type.pane { background: rgba(59,130,246,.10); color: #2563eb; }
body.light-theme .av-top-tools .tb-ind-gear { color: #6B7280; }
body.light-theme .av-top-tools .tb-ind-gear:hover { background: rgba(68,114,196,.12); color: #4472C4; }
body.light-theme .av-top-tools .tb-ind-pv-head { border-bottom-color: #E5E7EB; }
body.light-theme .av-top-tools .tb-ind-pv-back { color: #6B7280; }
body.light-theme .av-top-tools .tb-ind-pv-back:hover { background: #f3f4f6; color: #111827; }
body.light-theme .av-top-tools .tb-ind-pv-title { color: #111827; }
body.light-theme .av-top-tools .tb-ind-pv-label { color: #111827; }
body.light-theme .av-top-tools .tb-ind-pv-input { background: #f3f4f6; border-color: #E5E7EB; color: #111827; }
body.light-theme .av-top-tools .tb-ind-pv-reset { border-color: #E5E7EB; color: #6B7280; }
body.light-theme .av-top-tools .tb-ind-pv-reset:hover { border-color: #4472C4; color: #4472C4; }
body.light-theme .av-top-tools .tb-ind-pv-actions { border-top-color: #E5E7EB; }
body.light-theme .av-top-tools .tb-ind-pv-btn { border-color: #E5E7EB; color: #111827; }
body.light-theme .av-top-tools .tb-ind-pv-btn:hover { background: #f3f4f6; }
body.light-theme .av-top-tools .tb-ind-pv-btn-primary { background: #4472C4; border-color: #4472C4; color: #fff; }
body.light-theme .av-top-tools .tb-ind-pv-btn-primary:hover { background: #3a63b4; }
body.light-theme .av-chart-area { background: #fff; }

/* ══ 行业轮动 · 独立页（全新视觉体系） ═══════════════════ */
.rot-app { background: var(--ak-dark-canvas); }
body.light-theme .rot-app { background: #f6f8fb; }
.rot-title { font-size: 22px; font-weight: 700; letter-spacing: -.01em; color: #e6edf7; }
body.light-theme .rot-title { color: #111827; }
.rot-sub { color: #8b9bb4; }
body.light-theme .rot-sub { color: #6b7280; }
.rot-head { border-bottom-color: #1e2a44; background: #0d1326; }
body.light-theme .rot-head { border-bottom-color: #e3e8f0; background: #fff; }
.rot-asof { color: #b9c6db; background: rgba(68,114,196,.16); border-color: rgba(68,114,196,.4); }
body.light-theme .rot-asof { color: #1f2937; background: rgba(68,114,196,.10); }

.r2 { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.r2-bar {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: nowrap;
  padding: 12px 20px;
  border-bottom: 1px solid #1e2a44;
}
body.light-theme .r2-bar { border-bottom-color: #e3e8f0; }
.r2-asof { font-size: 12px; color: #8b9bb4; font-variant-numeric: tabular-nums; white-space: nowrap; }
body.light-theme .r2-asof { color: #6b7280; }
.r2-filters { display: flex; gap: 6px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-left: auto; }
.r2-filters::-webkit-scrollbar { display: none; }
.r2-chip {
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 500;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid #26334f;
  background: transparent;
  color: #9aaac4;
  cursor: pointer;
  white-space: nowrap;
  transition: color .12s, border-color .12s, background .12s;
  font-family: "Microsoft YaHei", "微软雅黑", sans-serif;
}
.r2-chip:hover { color: #e6edf7; border-color: #3a4d74; }
.r2-chip.on { background: #4472C4; border-color: #4472C4; color: #fff; }
.r2-chip:focus-visible { outline: 2px solid rgba(68,114,196,.6); outline-offset: 1px; }
body.light-theme .r2-chip { border-color: #dbe2ec; color: #64748b; }
body.light-theme .r2-chip:hover { color: #111827; border-color: #b8c2d2; }
body.light-theme .r2-chip.on { background: #4472C4; border-color: #4472C4; color: #fff; }

.r2-play { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.r2-btn {
  height: 32px;
  padding: 0 13px;
  border: 1px solid #26334f;
  border-radius: 8px;
  background: transparent;
  color: #c6d2e6;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: "Microsoft YaHei", "微软雅黑", sans-serif;
  transition: color .12s, border-color .12s, background .12s;
}
.r2-btn:hover { color: #fff; border-color: #4472C4; background: rgba(68,114,196,.12); }
.r2-btn:focus-visible { outline: 2px solid rgba(68,114,196,.6); outline-offset: 1px; }
body.light-theme .r2-btn { border-color: #dbe2ec; color: #374151; }
body.light-theme .r2-btn:hover { color: #111827; border-color: #4472C4; background: rgba(68,114,196,.08); }
.r2-play input[type="range"] { width: 150px; accent-color: #4472C4; }
.r2-date { font-size: 12px; font-weight: 700; color: #e6edf7; min-width: 82px; font-variant-numeric: tabular-nums; }
body.light-theme .r2-date { color: #111827; }

.r2-ws { flex: 1; min-height: 0; display: flex; align-items: stretch; padding: 16px 20px 20px; }
.r2-rank {
  width: 340px;
  min-width: 240px;
  max-width: 560px;
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  border: 1px solid #1e2a44;
  border-radius: 12px;
  background: #111a2e;
  overflow: hidden;
}
body.light-theme .r2-rank { border-color: #e3e8f0; background: #fff; }
.r2-rank-head {
  display: grid;
  grid-template-columns: 26px 1fr 62px 66px 46px;
  gap: 8px;
  align-items: center;
  padding: 10px 12px;
  font-size: 11px;
  font-weight: 700;
  color: #7f90ab;
  border-bottom: 1px solid #1e2a44;
}
body.light-theme .r2-rank-head { border-bottom-color: #e3e8f0; color: #8a94a6; }
.r2-rank-head .r2-col-num, .r2-rank-head .r2-col-score { text-align: right; }
.r2-rank-list { flex: 1; min-height: 0; overflow-y: auto; padding: 6px 8px 10px; display: grid; gap: 2px; align-content: start; }
.r2-row {
  display: grid;
  grid-template-columns: 26px 1fr 62px 66px 46px;
  gap: 8px;
  align-items: center;
  width: 100%;
  padding: 7px 4px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: inherit;
  cursor: pointer;
  text-align: left;
  font-family: "Microsoft YaHei", "微软雅黑", sans-serif;
  transition: background .1s;
}
.r2-row:hover { background: rgba(68,114,196,.10); }
.r2-row.on { background: rgba(68,114,196,.18); box-shadow: inset 2px 0 0 #4472C4; }
.r2-row:focus-visible { outline: 2px solid rgba(68,114,196,.6); outline-offset: -1px; }
.r2-row-rank {
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: #1b2740;
  color: #8b9bb4;
  font-size: 11px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
body.light-theme .r2-row-rank { background: #eef1f6; color: #64748b; }
.r2-row-name { display: flex; align-items: center; gap: 7px; min-width: 0; }
.r2-row-name-txt {
  font-size: 13px;
  font-weight: 600;
  color: #e6edf7;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
body.light-theme .r2-row-name-txt { color: #1f2937; }
.r2-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.r2-dot.finance { background: #fbbf24; }
.r2-dot.tech { background: #60a5fa; }
.r2-dot.cycle { background: #fb923c; }
.r2-dot.consume { background: #f472b6; }
.r2-dot.defense { background: #34d399; }
.r2-dot.other { background: #94a3b8; }
.r2-row-num { font-size: 12px; font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
.r2-row-num.pos { color: #ef4444; }
.r2-row-num.neg { color: #10b981; }
.r2-row-num.zero { color: #8b9bb4; }
.r2-row-score { font-size: 12px; font-weight: 700; text-align: right; color: #e6edf7; font-variant-numeric: tabular-nums; }
body.light-theme .r2-row-score { color: #1f2937; }

.r2-resizer {
  flex: 0 0 14px;
  cursor: col-resize;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
  touch-action: none;
}
.r2-resizer::after { content: ""; width: 2px; height: 38px; border-radius: 2px; background: #26334f; transition: background .12s; }
.r2-resizer:hover::after, .r2-resizer.active::after { background: #4472C4; }
body.light-theme .r2-resizer::after { background: #d5dce6; }

.r2-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.r2-card {
  display: flex;
  flex-direction: column;
  min-height: 0;
  border: 1px solid #1e2a44;
  border-radius: 12px;
  background: #111a2e;
  overflow: hidden;
}
body.light-theme .r2-card { border-color: #e3e8f0; background: #fff; }
.r2-map-card { flex: 1; }
.r2-card-head {
  flex: 0 0 auto;
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid #1e2a44;
}
body.light-theme .r2-card-head { border-bottom-color: #e3e8f0; }
.r2-card-title { font-size: 13px; font-weight: 700; color: #e6edf7; }
body.light-theme .r2-card-title { color: #111827; }
.r2-card-sub { font-size: 11px; color: #7f90ab; }
body.light-theme .r2-card-sub { color: #94a3b8; }
.r2-map { flex: 1; min-height: 0; position: relative; background: var(--ak-dark-canvas); }
body.light-theme .r2-map { background: #fafbfd; }
.r2-map svg { width: 100%; height: 100%; display: block; }
.r2-label { cursor: pointer; transition: opacity .12s; }
.r2-label:hover { opacity: 1 !important; }
.r2-map-hint {
  position: absolute;
  left: 14px;
  bottom: 12px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 11px;
  color: #9aaac4;
  background: rgba(11,16,32,.72);
  border: 1px solid #1e2a44;
  backdrop-filter: blur(4px);
  pointer-events: none;
}
body.light-theme .r2-map-hint { color: #64748b; background: rgba(255,255,255,.85); border-color: #e3e8f0; }
.r2-ldot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; }
.r2-ldot.pos { background: #ef4444; }
.r2-ldot.neg { background: #10b981; }
.r2-ldot.line { background: #f59e0b; }
.r2-ldot.line5 { background: #fb923c; }
.r2-ldot.line20 { background: #c084fc; }
.r2-ldot.rs { background: #4472C4; }
.r2-ldot.bench { background: #8b9bb4; }

.r2-detail-card { flex: 0 0 auto; max-height: 46%; }
.r2-detail { overflow-y: auto; padding: 14px 16px; }
.r2-tip, .r2-loading, .r2-empty { color: #7f90ab; font-size: 13px; padding: 18px 4px; }
body.light-theme .r2-tip, body.light-theme .r2-loading, body.light-theme .r2-empty { color: #94a3b8; }
.r2-detail-head { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 12px; }
.r2-detail-title { display: flex; align-items: center; gap: 10px; min-width: 0; }
.r2-detail-name { font-size: 16px; font-weight: 800; color: #e6edf7; }
body.light-theme .r2-detail-name { color: #111827; }
.r2-style { font-size: 10px; padding: 2px 8px; border-radius: 999px; text-align: center; white-space: nowrap; font-weight: 700; }
.r2-style.finance { color: #fbbf24; background: rgba(251,191,36,.12); }
.r2-style.tech { color: #60a5fa; background: rgba(96,165,250,.12); }
.r2-style.cycle { color: #fb923c; background: rgba(251,146,60,.12); }
.r2-style.consume { color: #f472b6; background: rgba(244,114,182,.12); }
.r2-style.defense { color: #34d399; background: rgba(52,211,153,.12); }
.r2-style.other { color: #94a3b8; background: rgba(148,163,184,.12); }
.r2-chips { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.r2-chip.pos { color: #f87171; background: rgba(239,68,68,.1); border-color: rgba(239,68,68,.25); }
.r2-chip.neg { color: #34d399; background: rgba(16,185,129,.1); border-color: rgba(16,185,129,.25); }
.r2-chip.surge { color: #fbbf24; background: rgba(251,191,36,.1); border-color: rgba(251,191,36,.25); }
.r2-chip.warn { color: #a78bfa; background: rgba(167,139,250,.1); border-color: rgba(167,139,250,.25); }
.r2-kpis { display: flex; gap: 8px; flex-wrap: wrap; margin-left: auto; }
.r2-kpi {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 7px 12px;
  border: 1px solid #1e2a44;
  border-radius: 10px;
  background: #0e1626;
  min-width: 78px;
}
body.light-theme .r2-kpi { border-color: #e3e8f0; background: #f7f9fc; }
.r2-kpi-label { font-size: 10px; color: #7f90ab; }
body.light-theme .r2-kpi-label { color: #94a3b8; }
.r2-kpi b { font-size: 14px; font-weight: 800; color: #e6edf7; font-variant-numeric: tabular-nums; }
body.light-theme .r2-kpi b { color: #111827; }
.r2-kpi b.pos { color: #ef4444; }
.r2-kpi b.neg { color: #10b981; }
.r2-detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.r2-sub { border: 1px solid #1e2a44; border-radius: 10px; background: #0e1626; padding: 10px 12px; min-width: 0; }
body.light-theme .r2-sub { border-color: #e3e8f0; background: #f7f9fc; }
.r2-sub-title { font-size: 12px; font-weight: 700; color: #9aaac4; margin-bottom: 6px; }
body.light-theme .r2-sub-title { color: #64748b; }
.r2-strip svg { width: 100%; height: auto; display: block; }
.r2-strip .r2-x { font-size: 9px; fill: #7f90ab; }
body.light-theme .r2-strip .r2-x { fill: #94a3b8; }
.r2-legend { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 6px; font-size: 11px; color: #8b9bb4; }
body.light-theme .r2-legend { color: #94a3b8; }
.r2-legend-note { margin-left: auto; color: #5f6f8a; }
body.light-theme .r2-legend-note { color: #a6b0c0; }
.r2-cons { margin-top: 12px; }
.r2-etfs { margin-top: 12px; }
.r2-etf-asof { margin-left: 8px; color: var(--ak-text-faint); font-weight: 500; }
.r2-etf-scroll-hint { display: none; margin-left: 8px; color: var(--ak-text-faint); font-weight: 500; }
.r2-etf-table { border: 1px solid #1e2a44; border-radius: 10px; overflow: hidden; }
body.light-theme .r2-etf-table { border-color: #e3e8f0; }
.r2-etf-row {
  display: grid;
  grid-template-columns: minmax(150px, 1.5fr) minmax(76px, .75fr) repeat(5, minmax(78px, .7fr));
  gap: 8px;
  align-items: center;
  min-width: 760px;
  padding: 8px 11px;
  border-top: 1px solid #1e2a44;
  color: #c8d2e3;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}
.r2-etf-row:first-child { border-top: 0; }
body.light-theme .r2-etf-row { border-color: #e3e8f0; color: #475569; }
.r2-etf-head { color: #7f90ab; background: rgba(255,255,255,.025); font-size: 10px; }
body.light-theme .r2-etf-head { color: #64748b; background: #f7f9fc; }
.r2-etf-name { display: flex; flex-direction: column; min-width: 0; }
.r2-etf-name b { color: #e6edf7; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body.light-theme .r2-etf-name b { color: #111827; }
.r2-etf-name small { color: var(--ak-text-faint); margin-top: 2px; }
.r2-etf-state { display: inline-block; padding: 2px 6px; border-radius: 999px; font-style: normal; white-space: nowrap; background: rgba(148,163,184,.1); }
.r2-etf-row .pos { color: #ef4444; }
.r2-etf-row .neg { color: #10b981; }
.r2-etf-row .zero { color: #8b9bb4; }
.r2-etf-note { margin-top: 6px; color: var(--ak-text-faint); font-size: 10px; }
.r2-etf-table { overflow-x: auto; }
.r2-etf-stocks { margin-top: 14px; }
.r2-etf-stock-table { border: 1px solid #1e2a44; border-radius: 10px; overflow-x: auto; }
body.light-theme .r2-etf-stock-table { border-color: #e3e8f0; }
.r2-etf-stock-row {
  width: 100%; min-width: 650px; display: grid;
  grid-template-columns: minmax(190px, 1.7fr) repeat(2, minmax(92px, .8fr)) minmax(72px, .55fr) minmax(88px, .65fr);
  align-items: center; gap: 10px; padding: 8px 10px; border: 0; border-top: 1px solid #1e2a44;
  background: transparent; color: #aebbd0; font: inherit; font-size: 11px; text-align: left;
}
.r2-etf-stock-row[data-code] { cursor: pointer; }
.r2-etf-stock-row[data-code]:hover { background: rgba(68,114,196,.08); }
.r2-etf-stock-row:first-child { border-top: 0; }
body.light-theme .r2-etf-stock-row { border-color: #e3e8f0; color: #475569; }
.r2-etf-stock-row .pos { color: #ef4444; }
.r2-etf-stock-row .neg { color: #10b981; }
.r2-etf-stock-row .zero { color: #8b9bb4; }
.r2-cons-wrap { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.r2-cons-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 11px;
  cursor: pointer;
  border-radius: 8px;
  border: 1px solid #26334f;
  background: transparent;
  color: inherit;
  font-family: "Microsoft YaHei", "微软雅黑", sans-serif;
  transition: color .12s, border-color .12s, background .12s;
}
.r2-cons-row:hover { background: rgba(68,114,196,.12); border-color: #4472C4; }
.r2-cons-row:focus-visible { outline: 2px solid rgba(68,114,196,.6); outline-offset: 1px; }
body.light-theme .r2-cons-row { border-color: #dbe2ec; }
.r2-cons-name { font-size: 12px; font-weight: 600; color: #e6edf7; }
body.light-theme .r2-cons-name { color: #1f2937; }
.r2-cons-rel { font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }
.r2-cons-rel.pos { color: #ef4444; }
.r2-cons-rel.neg { color: #10b981; }
.r2-cons-rel.zero { color: #8b9bb4; }

.r2 ::-webkit-scrollbar { width: 8px; height: 8px; }
.r2 ::-webkit-scrollbar-thumb { background: #2c3d5e; border-radius: 8px; }
.r2 ::-webkit-scrollbar-thumb:hover { background: #3a4d74; }
.r2 ::-webkit-scrollbar-track { background: transparent; }
body.light-theme .r2 ::-webkit-scrollbar-thumb { background: #cfd7e2; }
body.light-theme .r2 ::-webkit-scrollbar-thumb:hover { background: #aab4c4; }
.r2 ::selection { background: rgba(68,114,196,.34); }

@media (max-width: 1180px) {
  .r2-ws { flex-direction: column; }
  .r2-resizer { display: none; }
  .r2-rank { width: 100% !important; max-width: none; max-height: 300px; }
  .r2-detail-grid { grid-template-columns: 1fr; }
  .r2-map-card { min-height: 380px; }
  .r2-bar { flex-wrap: wrap; }
}
@media (max-width: 600px) {
  .rot-refresh { width: 36px; padding-inline: 0; justify-content: center; }
  .rot-refresh span { display: none; }
}
@media (max-width: 720px) {
  .r2-etf-scroll-hint { display: inline; }
}

/* 右栏折叠态 */
.ta-app.history-collapsed .ta-panel-right { width: 44px; }
.ta-app.history-collapsed .ta-panel-right > :not(.ta-history-head) { display: none; }
.ta-app.history-collapsed .ta-history-head { justify-content: center; padding: 14px 0; }
.ta-app.history-collapsed .ta-history-title { display: none; }

@media (max-width: 720px) { .shell-view { grid-template-columns: 1fr; } .sidebar { padding: 16px; } .sidebar-brand { padding-bottom: 12px; } .sidebar-footer { position: static; width: auto; margin-top: 16px; } .main { padding: 24px 16px; } .user-menu { position: static; bottom: auto; left: auto; margin-top: 6px; box-shadow: none; } }
@media (max-width: 1180px) {
  .ta-full { height: auto; }
  .ta-app { flex-direction: column; overflow: visible; }
  .ta-panel-left { width: 100%; border-right: 0; border-bottom: 1px solid #E5E7EB; }
  .ta-panel-center { min-height: 70vh; }
  .ta-panel-right { width: 100%; border-left: 0; border-top: 1px solid #E5E7EB; max-height: 60vh; }
  .ta-app.history-collapsed .ta-panel-right { width: 100%; }
  .ta-app.history-collapsed .ta-panel-right > :not(.ta-history-head) { display: block; }
  .ta-app.history-collapsed .ta-history-head { justify-content: space-between; padding: 14px 16px; }
  .ta-app.history-collapsed .ta-history-title { display: block; }
}

/* ── 行情网关数据源角标 ─────────────────────────────── */
.av-source-badge {
  font-size: 11px;
  padding: 2px 9px;
  border-radius: 999px;
  white-space: nowrap;
  flex-shrink: 0;
}
.av-source-badge.live {
  color: #22c55e;
  background: rgba(34, 197, 94, .12);
  border: 1px solid rgba(34, 197, 94, .35);
}
.av-source-badge.static {
  color: #94a3b8;
  background: rgba(148, 163, 184, .12);
  border: 1px solid rgba(148, 163, 184, .3);
}

/* ── 行业资金潮汐条（K线下方）────────────────────────── */
.af-loading, .af-empty { color: #94a3b8; font-size: 13px; padding: 14px 4px; }
.af-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.af-title { font-size: 14px; font-weight: 700; color: #f1f5f9; }
.af-title em { font-style: normal; color: #94a3b8; font-weight: 400; margin-left: 4px; }
body.light-theme .af-title { color: #111827; }
.af-today { font-size: 13px; font-weight: 700; }
.af-today.pos { color: #ef4444; } /* A股惯例：涨红 */
.af-today.neg { color: #10b981; } /* 跌绿，与 K 线一致 */
.af-today.zero { color: #94a3b8; }
.af-chips { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.af-chip { font-size: 11px; padding: 2px 8px; border-radius: 999px; border: 1px solid; }
.af-chip.pos { color: #ef4444; border-color: rgba(239,68,68,.4); background: rgba(239,68,68,.1); }
.af-chip.neg { color: #10b981; border-color: rgba(16,185,129,.4); background: rgba(16,185,129,.1); }
.af-chip.surge { color: #f59e0b; border-color: rgba(245,158,11,.45); background: rgba(245,158,11,.1); }
.af-chip.warn { color: #a78bfa; border-color: rgba(167,139,250,.45); background: rgba(167,139,250,.1); }
.af-asof { font-size: 12px; color: #94a3b8; margin-left: auto; }
.af-strip { display: grid; gap: 4px; }
.af-strip svg { width: 100%; height: 132px; display: block; }
.af-x { font-size: 10px; fill: var(--ak-text-faint); }
.af-legend { font-size: 12px; color: #94a3b8; display: flex; align-items: center; gap: 6px; }
.af-legend .dot { width: 8px; height: 8px; border-radius: 2px; display: inline-block; }
.af-legend .dot.pos { background: #ef4444; }
.af-legend .dot.neg { background: #10b981; }
.af-legend .dot.line { height: 3px; border-radius: 0; background: #f59e0b; }
.af-legend .dot.line5 { height: 3px; border-radius: 0; background: #fb923c; }
.af-legend .dot.line20 { height: 3px; border-radius: 0; background: #c084fc; }
.af-legend .dot.rs { background: #4472C4; }
.af-legend .dot.bench { background: #64748b; }
.af-note { margin-left: auto; font-weight: 400; color: #7c8ba1; }
.af-strength { font-size: 11px; padding: 2px 9px; border-radius: 999px; border: 1px solid; white-space: nowrap; }
.af-strength.pos { color: #ef4444; border-color: rgba(239,68,68,.45); background: rgba(239,68,68,.1); }
.af-strength.neg { color: #10b981; border-color: rgba(16,185,129,.45); background: rgba(16,185,129,.1); }

/* ── 行业轮动分析页（RRG 相对旋转图，与 K 线图同源视觉语言）── */
.av-rotation-page {
  position: absolute;
  inset: 0;
  z-index: 90;
  background: var(--ak-dark-canvas);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
body.light-theme .av-rotation-page { background: #f8fafc; }
.arp-loading, .arp-tip { color: #94a3b8; font-size: 13px; padding: 24px 16px; }
.arp-head {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 10px 16px;
  border-bottom: 1px solid #1e293b;
}
body.light-theme .arp-head { border-bottom-color: #E5E7EB; }
.arp-back { flex-shrink: 0; }
.arp-head-title { display: flex; flex-direction: column; gap: 2px; }
.arp-title { font-size: 16px; font-weight: 700; color: #f1f5f9; }
body.light-theme .arp-title { color: #111827; }
.arp-asof { font-size: 12px; color: #94a3b8; }
.arp-style-filter { display: flex; gap: 6px; flex-wrap: wrap; margin-left: auto; }
.arp-style-chip {
  font-size: 12px;
  padding: 4px 11px;
  border-radius: 8px;
  border: 1px solid #334155;
  background: transparent;
  color: #94a3b8;
  cursor: pointer;
  transition: color .12s, border-color .12s, background .12s;
}
.arp-style-chip:hover { color: #e2e8f0; border-color: #475569; }
.arp-style-chip.on { background: #4472C4; border-color: #4472C4; color: #fff; }
.arp-play { display: flex; align-items: center; gap: 10px; }
.arp-play input[type="range"] { width: 140px; accent-color: #4472C4; }
.arp-date { font-size: 12px; font-weight: 700; color: #f1f5f9; min-width: 82px; font-variant-numeric: tabular-nums; }
body.light-theme .arp-date { color: #111827; }

.arp-body {
  flex: 1;
  min-height: 0;
  padding: 12px 16px 16px;
  display: flex;
  gap: 0;
  align-items: stretch;
}
.arp-rankcol, .arp-main { min-width: 0; min-height: 0; }
.arp-rankcol {
  width: 340px;
  min-width: 240px;
  max-width: 560px;
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  border: 1px solid #1e293b;
  border-radius: 10px;
  background: #111827;
  overflow: hidden;
}
/* 行业栏与图表之间的拖拽分隔条（可手动调整宽度） */
.arp-resizer {
  flex: 0 0 12px;
  cursor: col-resize;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
  touch-action: none;
}
.arp-resizer::after {
  content: "";
  width: 2px;
  height: 36px;
  border-radius: 2px;
  background: #334155;
  transition: background .12s;
}
.arp-resizer:hover::after,
.arp-resizer.active::after { background: #4472C4; }
body.light-theme .arp-resizer::after { background: #d1d5db; }
body.light-theme .arp-resizer:hover::after,
body.light-theme .arp-resizer.active::after { background: #4472C4; }
body.light-theme .arp-rankcol { border-color: #E5E7EB; background: #fff; }
.arp-rank-head {
  display: grid;
  grid-template-columns: 24px 1fr 54px 60px 46px;
  gap: 8px;
  padding: 9px 12px;
  font-size: 11px;
  font-weight: 700;
  color: #94a3b8;
  border-bottom: 1px solid #1e293b;
}
body.light-theme .arp-rank-head { border-bottom-color: #E5E7EB; }
.arp-rank-head span:nth-child(n + 3) { text-align: right; }
.arp-rank-list { flex: 1; min-height: 0; overflow-y: auto; padding: 4px 6px; display: grid; gap: 2px; align-content: start; }
.arp-rank-row {
  display: grid;
  grid-template-columns: 24px 1fr 54px 60px 46px;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 6px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: inherit;
  cursor: pointer;
  text-align: left;
  font-family: "Microsoft YaHei", "微软雅黑", sans-serif;
}
.arp-rank-row:hover { background: rgba(68,114,196,.1); }
.arp-rank-row.on { background: rgba(68,114,196,.18); box-shadow: inset 2px 0 0 #4472C4; }
.arp-rank-row .arp-rank {
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: #1e293b;
  color: #94a3b8;
  font-size: 11px;
  font-weight: 700;
}
body.light-theme .arp-rank-row .arp-rank { background: #eef1f6; }
.arp-rank-row .arp-name {
  font-size: 13px;
  font-weight: 600;
  color: #e2e8f0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: flex;
  align-items: center;
  gap: 6px;
}
body.light-theme .arp-rank-row .arp-name { color: #1f2937; }
.arp-style-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.arp-style-dot.finance { background: #fbbf24; }
.arp-style-dot.tech { background: #60a5fa; }
.arp-style-dot.cycle { background: #fb923c; }
.arp-style-dot.consume { background: #f472b6; }
.arp-style-dot.defense { background: #34d399; }
.arp-style-dot.other { background: #94a3b8; }
.arp-style { font-size: 10px; padding: 1px 6px; border-radius: 4px; text-align: center; white-space: nowrap; font-weight: 700; }
.arp-style.finance { color: #fbbf24; background: rgba(251,191,36,.12); }
.arp-style.tech { color: #60a5fa; background: rgba(96,165,250,.12); }
.arp-style.cycle { color: #fb923c; background: rgba(251,146,60,.12); }
.arp-style.consume { color: #f472b6; background: rgba(244,114,182,.12); }
.arp-style.defense { color: #34d399; background: rgba(52,211,153,.12); }
.arp-style.other { color: #94a3b8; background: rgba(148,163,184,.12); }
.arp-pct { font-size: 12px; font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
.arp-pct.pos { color: #ef4444; }
.arp-pct.neg { color: #10b981; }
.arp-pct.zero { color: #94a3b8; }
.arp-score { font-size: 12px; font-weight: 700; text-align: right; color: #e2e8f0; font-variant-numeric: tabular-nums; }
body.light-theme .arp-score { color: #1f2937; }

.arp-main { flex: 1 1 auto; display: flex; flex-direction: column; gap: 10px; }
.arp-rrg {
  position: relative;
  flex: 1;
  min-height: 0;
  border: 1px solid #1e293b;
  border-radius: 10px;
  background: #0a0e17;
  overflow: hidden;
}
body.light-theme .arp-rrg { border-color: #E5E7EB; background: #fff; }
.arp-rrg svg { width: 100%; height: 100%; display: block; }
.arp-label { cursor: pointer; transition: opacity .12s; }
.arp-label:hover { opacity: 1 !important; }
.arp-quad { font-size: 11px; font-weight: 700; }
.arp-axis-title { font-size: 11px; }
.arp-map-hint { position: absolute; left: 14px; bottom: 10px; font-size: 11px; color: var(--ak-text-faint); pointer-events: none; }
body.light-theme .arp-map-hint { color: #9ca3af; }

.arp-detail {
  flex: 0 0 auto;
  border: 1px solid #1e293b;
  border-radius: 10px;
  background: #111827;
  padding: 12px 14px;
  max-height: 46%;
  overflow-y: auto;
}
body.light-theme .arp-detail { border-color: #E5E7EB; background: #fff; }
.arp-detail-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.arp-detail-title { display: flex; align-items: center; gap: 8px; }
.arp-detail-name { font-size: 15px; font-weight: 800; color: #f1f5f9; }
body.light-theme .arp-detail-name { color: #111827; }
.arp-detail-stats { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: #94a3b8; }
.arp-detail-stats b { color: #e2e8f0; font-weight: 700; }
.arp-detail-stats b.pos { color: #ef4444; }
.arp-detail-stats b.neg { color: #10b981; }
body.light-theme .arp-detail-stats b { color: #1f2937; }
.arp-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-left: auto; }
.arp-detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.arp-detail-panel { min-width: 0; }
.arp-rs-head { font-size: 12px; font-weight: 700; color: #94a3b8; margin-bottom: 4px; }
.arp-cons { margin-top: 12px; }
.arp-cons-head { font-size: 12px; font-weight: 700; color: #94a3b8; margin-bottom: 6px; }
.arp-cons-row-wrap { display: flex; flex-wrap: wrap; gap: 6px; }
.arp-cons-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 10px;
  cursor: pointer;
  border-radius: 7px;
  border: 1px solid #1e293b;
  background: transparent;
  color: inherit;
  font-family: inherit;
}
body.light-theme .arp-cons-row { border-color: #E5E7EB; }
.arp-cons-row:hover { background: rgba(68,114,196,.12); border-color: #4472C4; }
.arp-cons-name { font-size: 12px; color: #e2e8f0; }
body.light-theme .arp-cons-name { color: #1f2937; }
.arp-cons-rel { font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }
.arp-cons-rel.pos { color: #ef4444; }
.arp-cons-rel.neg { color: #10b981; }
.arp-cons-rel.zero { color: #94a3b8; }

@media (max-width: 1180px) {
  .av-rotation-page { overflow: auto; }
  .arp-body { flex-direction: column; }
  .arp-resizer { display: none; }
  .arp-rankcol { width: 100% !important; max-width: none; max-height: 300px; }
  .arp-detail-grid { grid-template-columns: 1fr; }
  .arp-rrg { min-height: 380px; }
}

/* ── 行业轮动 · 独立页（从 K 线图解耦后的完整控制台）────────── */
.rot-app {
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--ak-dark-canvas);
}
body.light-theme .rot-app { background: #f8fafc; }
.rot-head {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  padding: 10px 14px;
  border-bottom: 1px solid #1e293b;
  background: rgba(255,255,255,.02);
}
body.light-theme .rot-head { border-bottom-color: #E5E7EB; background: #fff; }
.rot-head-titles { min-width: 0; }
.rot-title { margin: 0; display: flex; align-items: center; gap: 8px; font-size: 22px; font-weight: 700; letter-spacing: -.01em; color: #f1f5f9; }
body.light-theme .rot-title { color: #111827; }
.rot-beta {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  line-height: 1.5;
  padding: 1px 9px;
  border-radius: 999px;
  color: #a5b4fc;
  background: rgba(99,102,241,.12);
  border: 1px solid rgba(99,102,241,.45);
}
body.light-theme .rot-beta { color: #4f46e5; background: rgba(99,102,241,.08); }
.rot-sub { margin: 4px 0 0; font-size: 13px; color: #94a3b8; }
body.light-theme .rot-sub { color: #6b7280; }
.rot-head-actions { display: flex; align-items: center; gap: 8px; }
.rot-asof {
  font-size: 12px;
  font-weight: 600;
  color: #cbd5e1;
  background: rgba(68,114,196,.14);
  border: 1px solid rgba(68,114,196,.35);
  padding: 4px 8px;
  border-radius: 999px;
  font-variant-numeric: tabular-nums;
}
body.light-theme .rot-asof { color: #1f2937; background: rgba(68,114,196,.10); }
.rot-refresh { display: inline-flex; align-items: center; gap: 6px; }
.rot-body { flex: 1; min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
.rot-error { color: #ef4444; font-size: 14px; padding: 28px 24px; }

/* 轮动页内部细化（覆盖既有 arp 样式，提升信息密度与质感） */
.arp-head { padding: 12px 20px; gap: 12px; flex-wrap: nowrap; }
.arp-style-filter { margin-left: auto; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
.arp-style-filter::-webkit-scrollbar { display: none; }
.arp-style-chip { white-space: nowrap; flex-shrink: 0; }
.arp-play { flex-shrink: 0; }
.arp-play .ta-btn {
  height: 32px;
  padding: 0 12px;
  font-size: 13px;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.arp-head .ta-btn { height: 32px; padding: 0 12px; font-size: 13px; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; }
.arp-body { padding: 16px 20px 20px; gap: 0; }
.arp-rankcol, .arp-rrg, .arp-detail {
  border-radius: 12px;
  border-color: #1e293b;
}
body.light-theme .arp-rankcol,
body.light-theme .arp-rrg,
body.light-theme .arp-detail { border-color: #E5E7EB; }
.arp-rank-list { padding: 6px 8px 10px; }
.arp-rank-row { padding: 7px 8px; border-radius: 8px; }
.arp-rank-row:focus-visible,
.arp-style-chip:focus-visible,
.arp-cons-row:focus-visible {
  outline: 2px solid rgba(68,114,196,.55);
  outline-offset: 1px;
}
.arp-map-hint {
  background: rgba(15,23,42,.72);
  border: 1px solid #1e293b;
  padding: 4px 10px;
  border-radius: 999px;
  backdrop-filter: blur(4px);
}
body.light-theme .arp-map-hint { background: rgba(255,255,255,.8); border-color: #E5E7EB; }
.arp-detail { padding: 14px 16px; }
.arp-detail-name { font-size: 16px; }
.arp-cons-row { padding: 6px 11px; }

/* 滚动条与选中态（浏览器表面也属于设计） */
.rot-app ::-webkit-scrollbar { width: 8px; height: 8px; }
.rot-app ::-webkit-scrollbar-thumb { background: #334155; border-radius: 8px; }
.rot-app ::-webkit-scrollbar-thumb:hover { background: #475569; }
.rot-app ::-webkit-scrollbar-track { background: transparent; }
body.light-theme .rot-app ::-webkit-scrollbar-thumb { background: #d1d5db; }
body.light-theme .rot-app ::-webkit-scrollbar-thumb:hover { background: #9ca3af; }
.rot-app ::selection { background: rgba(68,114,196,.32); }

@media (max-width: 1180px) {
  .rot-app { overflow: auto; }
  .rot-body { overflow: visible; }
  .rot-head { padding: 10px 14px; }
  .arp-body { flex-direction: column; }
  .arp-resizer { display: none; }
  .arp-rankcol { width: 100% !important; max-width: none; max-height: 300px; }
  .arp-rankcol { max-height: 300px; }
  .arp-rrg { min-height: 380px; }
}

/* ══ 因子评分 · 独立证据台账 ══════════════════════════════ */
.fsp-app {
  --fsp-canvas: #0a0e17;
  --fsp-surface: #0f172a;
  --fsp-raised: #111827;
  --fsp-field: #16233a;
  --fsp-line: #2b3a53;
  --fsp-line-strong: #7186a3;
  --fsp-text: #e8eef7;
  --fsp-muted: #a8b6c9;
  --fsp-faint: #91a3bc;
  --fsp-accent: #9bc0ff;
  --fsp-accent-field: #17335f;
  --fsp-up: #ff9eaa;
  --fsp-down: #7dd3a7;
  --fsp-caution: #f3c66d;
  width: 100%;
  height: 100vh;
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--fsp-canvas);
  color: var(--fsp-text);
  font-size: 15px;
  font-family: "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
}
body.light-theme .fsp-app {
  --fsp-canvas: #f3f6fa;
  --fsp-surface: #ffffff;
  --fsp-raised: #f7f9fc;
  --fsp-field: #eaf1fb;
  --fsp-line: #d7e0eb;
  --fsp-line-strong: #70829c;
  --fsp-text: #172238;
  --fsp-muted: #52627a;
  --fsp-faint: #5d6e85;
  --fsp-accent: #255db5;
  --fsp-accent-field: #dce9fb;
  --fsp-up: #b42335;
  --fsp-down: #14734a;
  --fsp-caution: #8b5d00;
}
.fsp-app ::selection { background: var(--fsp-accent-field); color: var(--fsp-text); }
.fsp-app button, .fsp-app input, .fsp-app select { font: inherit; }
.fsp-app button { color: inherit; }
.fsp-app svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.fsp-app :where(button, input, select, [tabindex]):focus-visible { outline: 3px solid var(--fsp-accent); outline-offset: 3px; }
.fsp-app ::-webkit-scrollbar { width: 9px; height: 9px; }
.fsp-app ::-webkit-scrollbar-track { background: transparent; }
.fsp-app ::-webkit-scrollbar-thumb { background: var(--fsp-line-strong); border: 2px solid var(--fsp-canvas); border-radius: 9px; }

.fsp-header {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: minmax(280px, .9fr) minmax(520px, 1.35fr);
  align-items: end;
  gap: 32px;
  padding: 26px 28px 20px;
  border-bottom: 1px solid var(--fsp-line);
}
.fsp-heading h1 { margin: 0 0 6px; color: var(--fsp-text); font-size: clamp(21px, 2vw, 27px); line-height: 1.22; letter-spacing: -.025em; }
.fsp-heading p { margin: 0; max-width: 58ch; color: var(--fsp-muted); font-size: 15px; line-height: 1.55; }
.fsp-context { display: grid; grid-template-columns: repeat(3, minmax(100px, 1fr)) auto; align-items: end; gap: 1px; border: 1px solid var(--fsp-line); border-radius: 12px; overflow: hidden; background: var(--fsp-line); }
.fsp-context > div { min-height: 55px; display: flex; flex-direction: column; justify-content: center; gap: 4px; padding: 8px 12px; background: var(--fsp-surface); }
.fsp-context span, .fsp-field-label { color: var(--fsp-faint); font-size: 12px; font-weight: 700; line-height: 1.35; }
.fsp-context strong { color: var(--fsp-text); font-size: 12px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.fsp-method-link { align-self: stretch; min-width: 138px; display: flex; align-items: center; justify-content: center; gap: 7px; padding: 0 13px; border: 0; background: var(--fsp-surface); color: var(--fsp-accent) !important; cursor: pointer; }
.fsp-method-link:hover { background: var(--fsp-field); }

.fsp-method { flex: 0 0 auto; display: grid; grid-template-columns: .85fr 1.35fr 1fr; gap: 22px; padding: 17px 28px; border-bottom: 1px solid var(--fsp-line); background: var(--fsp-surface); }
.fsp-method[hidden] { display: none; }
.fsp-method > div { padding-right: 18px; border-right: 1px solid var(--fsp-line); }
.fsp-method > div:last-child { padding-right: 0; border-right: 0; }
.fsp-method h2 { margin: 0 0 5px; color: var(--fsp-text); font-size: 12px; line-height: 1.4; }
.fsp-method p { margin: 0; color: var(--fsp-muted); font-size: 12px; line-height: 1.6; }
.fsp-method-warning h2 { color: var(--fsp-caution); }

.fsp-toolbar { flex: 0 0 auto; display: grid; grid-template-columns: auto minmax(170px, 1fr) minmax(150px, .7fr) minmax(128px, .5fr) auto; align-items: end; gap: 12px; padding: 14px 28px 12px; }
.fsp-field, .fsp-date-control { min-width: 0; display: grid; gap: 6px; }
.fsp-field select, .fsp-input-wrap, .fsp-date-stepper { height: 42px; border: 1px solid var(--fsp-line-strong); border-radius: 8px; background: var(--fsp-raised); color: var(--fsp-text); }
.fsp-field select { width: 100%; min-width: 0; padding: 0 34px 0 11px; cursor: pointer; }
.fsp-input-wrap { display: flex; align-items: center; gap: 8px; padding: 0 11px; }
.fsp-input-wrap svg { flex: 0 0 auto; color: var(--fsp-faint); }
.fsp-input-wrap input { min-width: 0; width: 100%; height: 38px; border: 0; outline: 0; background: transparent; color: var(--fsp-text); }
.fsp-input-wrap input::placeholder { color: var(--fsp-faint); opacity: 1; }
.fsp-date-stepper { display: grid; grid-template-columns: 38px 106px 38px; align-items: center; overflow: hidden; }
.fsp-date-stepper strong { text-align: center; font-size: 15px; font-variant-numeric: tabular-nums; }
.fsp-date-stepper button { align-self: stretch; display: grid; place-items: center; border: 0; background: transparent; color: var(--fsp-muted); cursor: pointer; }
.fsp-date-stepper button:first-child { border-right: 1px solid var(--fsp-line); }
.fsp-date-stepper button:last-child { border-left: 1px solid var(--fsp-line); }
.fsp-date-stepper button:hover:not(:disabled) { background: var(--fsp-field); color: var(--fsp-accent); }
.fsp-date-stepper button:disabled { color: var(--fsp-faint); cursor: not-allowed; opacity: .55; }
.fsp-reset { height: 42px; display: flex; align-items: center; gap: 7px; padding: 0 13px; border: 1px solid transparent; border-radius: 8px; background: transparent; color: var(--fsp-muted) !important; cursor: pointer; }
.fsp-reset:hover { border-color: var(--fsp-line); background: var(--fsp-raised); color: var(--fsp-text) !important; }

.fsp-dimension-bar { flex: 0 0 auto; display: flex; align-items: center; gap: 14px; min-width: 0; padding: 0 28px 13px; }
.fsp-dimension-tabs { min-width: 0; display: flex; align-items: stretch; gap: 2px; overflow-x: auto; padding: 3px; border: 1px solid var(--fsp-line); border-radius: 8px; background: var(--fsp-surface); scrollbar-width: thin; }
.fsp-dimension-tabs button { min-width: max-content; height: 34px; display: flex; align-items: center; gap: 6px; padding: 0 12px; border: 0; border-radius: 8px; background: transparent; color: var(--fsp-muted); font-size: 12px; cursor: pointer; }
.fsp-dimension-tabs button small { color: var(--fsp-faint); font-size: 12px; font-variant-numeric: tabular-nums; }
.fsp-dimension-tabs button:hover { background: var(--fsp-raised); color: var(--fsp-text); }
.fsp-dimension-tabs button.active { background: var(--fsp-accent-field); color: var(--fsp-accent); box-shadow: inset 0 0 0 1px var(--fsp-accent); }
.fsp-dimension-tabs button.active small { color: inherit; }

.fsp-workspace { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(540px, 1fr) minmax(350px, 390px); gap: 14px; padding: 0 20px 20px; }
.fsp-ledger, .fsp-inspector { min-width: 0; min-height: 0; border: 1px solid var(--fsp-line); border-radius: 12px; background: var(--fsp-surface); }
.fsp-ledger { display: flex; flex-direction: column; overflow: hidden; }
.fsp-ledger-head { flex: 0 0 auto; display: flex; align-items: end; justify-content: space-between; gap: 16px; padding: 15px 17px 12px; border-bottom: 1px solid var(--fsp-line); }
.fsp-ledger-head h2 { margin: 0 0 3px; color: var(--fsp-text); font-size: 15px; }
.fsp-ledger-head p { margin: 0; color: var(--fsp-faint); font-size: 12px; }
.fsp-scroll-hint { display: none; color: var(--fsp-faint); font-size: 12px; }
.fsp-table-wrap { flex: 1; min-height: 0; overflow: auto; outline-offset: -3px !important; }
.fsp-table { width: 100%; min-width: 680px; border-collapse: collapse; table-layout: fixed; }
.fsp-table th, .fsp-table td { height: 49px; padding: 7px 12px; border-bottom: 1px solid var(--fsp-line); text-align: left; vertical-align: middle; }
.fsp-table thead th { position: sticky; top: 0; z-index: 2; height: 39px; background: var(--fsp-raised); color: var(--fsp-faint); font-size: 12px; font-weight: 700; }
.fsp-table th:nth-child(1) { width: 58px; }
.fsp-table th:nth-child(2) { width: 30%; }
.fsp-table th:nth-child(3) { width: 19%; }
.fsp-table th:nth-child(4) { width: 84px; }
.fsp-table th:nth-child(5) { width: 100px; }
.fsp-table th:nth-child(6) { width: 154px; }
.fsp-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.fsp-table tbody tr { transition: background-color .14s ease-out; }
.fsp-table tbody tr:hover { background: var(--fsp-raised); }
.fsp-table tbody tr.selected { background: var(--fsp-accent-field); }
.fsp-table tbody tr:last-child td { border-bottom: 0; }
.fsp-rank { color: var(--fsp-faint); font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }
.fsp-stock { width: 100%; display: grid; gap: 2px; padding: 0; border: 0; background: transparent; text-align: left; cursor: pointer; }
.fsp-stock strong { overflow: hidden; color: var(--fsp-text); font-size: 15px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.fsp-stock span, .fsp-industry { overflow: hidden; color: var(--fsp-faint); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.fsp-mobile-industry { display: none; font-style: normal; }
.fsp-mobile-score { display: none; color: var(--fsp-accent); font-size: 12px; font-style: normal; font-weight: 700; font-variant-numeric: tabular-nums; }
.fsp-market { display: inline-flex; align-items: center; justify-content: flex-end; gap: 6px; min-width: 78px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.fsp-market i, .fsp-signal i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.fsp-market.rise { color: var(--fsp-up); }
.fsp-market.fall { color: var(--fsp-down); }
.fsp-market.neutral { color: var(--fsp-faint); }
.fsp-quote-date { display: block; margin-top: 3px; color: var(--fsp-faint); font-size: 11px; font-weight: 400; white-space: nowrap; }
.fsp-quote-date.stale, .fsp-price-line small.stale { color: var(--fsp-caution); }
.fsp-score-cell { display: grid; grid-template-columns: 52px 88px; align-items: center; justify-content: end; gap: 8px; }
.fsp-score-cell strong { color: var(--fsp-text); font-size: 15px; font-variant-numeric: tabular-nums; }
.fsp-score-track { position: relative; display: block; width: 100%; height: 7px; border-radius: 999px; background: var(--fsp-line); overflow: hidden; }
.fsp-score-track::after { content: ""; position: absolute; top: 0; bottom: 0; left: 50%; width: 1px; background: var(--fsp-line-strong); }
.fsp-score-track i { position: absolute; top: 0; height: 100%; }
.fsp-score-track.high i { background: var(--fsp-accent); }
.fsp-score-track.low i { background: var(--fsp-caution); }
.fsp-skeleton i { display: block; width: 76%; height: 10px; border-radius: 999px; background: var(--fsp-line); animation: fsp-pulse 1.2s ease-in-out infinite alternate; }
.fsp-skeleton td:nth-child(n+4) i { margin-left: auto; }
@keyframes fsp-pulse { to { background: var(--fsp-line-strong); } }
@media (prefers-reduced-motion: reduce) { .fsp-skeleton i { animation: none; } }

.fsp-pagination { flex: 0 0 auto; min-height: 51px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 8px 14px; border-top: 1px solid var(--fsp-line); color: var(--fsp-faint); font-size: 12px; }
.fsp-pagination > div { display: flex; align-items: center; gap: 10px; }
.fsp-pagination strong { color: var(--fsp-muted); font-weight: 600; font-variant-numeric: tabular-nums; }
.fsp-pagination button, .fsp-table-error button, .fsp-no-results button, .fsp-fatal-panel button { min-height: 34px; padding: 0 11px; border: 1px solid var(--fsp-line-strong); border-radius: 8px; background: var(--fsp-raised); color: var(--fsp-text); cursor: pointer; }
.fsp-pagination button:hover:not(:disabled), .fsp-table-error button:hover, .fsp-no-results button:hover, .fsp-fatal-panel button:hover { border-color: var(--fsp-accent); color: var(--fsp-accent); }
.fsp-pagination button:disabled { opacity: .5; cursor: not-allowed; }

.fsp-inspector { overflow-y: auto; padding: 18px; }
.fsp-inspector-empty { min-height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 34px 22px; text-align: center; }
.fsp-empty-mark { width: 54px; height: 38px; margin-bottom: 18px; border: 1px solid var(--fsp-line-strong); border-radius: 9px; background: linear-gradient(90deg, transparent 32%, var(--fsp-line) 32% 34%, transparent 34% 65%, var(--fsp-line) 65% 67%, transparent 67%); }
.fsp-inspector-empty h2 { margin: 0 0 8px; color: var(--fsp-text); font-size: 15px; }
.fsp-inspector-empty p { max-width: 31ch; margin: 0; color: var(--fsp-muted); font-size: 12px; line-height: 1.65; }
.fsp-inspector-head { display: flex; align-items: start; justify-content: space-between; gap: 14px; }
.fsp-inspector-head h2 { margin: 0 0 4px; color: var(--fsp-text); font-size: 20px; letter-spacing: -.02em; }
.fsp-inspector-head p { margin: 0; color: var(--fsp-faint); font-size: 12px; }
.fsp-position { flex: 0 0 auto; padding: 5px 8px; border: 1px solid var(--fsp-line); border-radius: 999px; color: var(--fsp-muted); font-size: 12px; font-weight: 700; }
.fsp-price-line { display: flex; align-items: baseline; gap: 12px; margin: 18px 0; }
.fsp-price-line > div { display: grid; gap: 5px; }
.fsp-price-line > div > strong { color: var(--fsp-text); font-size: 27px; line-height: 1; font-variant-numeric: tabular-nums; }
.fsp-price-line small { color: var(--fsp-faint); font-size: 11px; }
.fsp-verdict { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 11px 12px; padding: 14px; border-radius: 9px; background: var(--fsp-raised); }
.fsp-verdict > div { display: flex; align-items: baseline; gap: 10px; }
.fsp-verdict > div span { color: var(--fsp-muted); font-size: 12px; }
.fsp-verdict > div strong { color: var(--fsp-text); font-size: 20px; font-variant-numeric: tabular-nums; }
.fsp-verdict p { grid-column: 1 / -1; margin: 0; color: var(--fsp-muted); font-size: 12px; line-height: 1.55; }
.fsp-signal { display: inline-flex; align-items: center; gap: 6px; color: var(--fsp-faint); font-size: 12px; font-weight: 700; }
.fsp-signal.high { color: var(--fsp-accent); }
.fsp-signal.low { color: var(--fsp-caution); }
.fsp-breakdown { margin-top: 22px; }
.fsp-section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.fsp-section-heading h3, .fsp-inspector-note h3 { margin: 0; color: var(--fsp-text); font-size: 15px; }
.fsp-section-heading span { color: var(--fsp-faint); font-size: 12px; }
.fsp-breakdown table { width: 100%; border-collapse: collapse; }
.fsp-coverage { margin: 10px 0 0; color: var(--fsp-muted); font-size: 12px; line-height: 1.65; }
.fsp-breakdown th, .fsp-breakdown td { padding: 8px 0; border-bottom: 1px solid var(--fsp-line); }
.fsp-breakdown th { width: 105px; text-align: left; }
.fsp-breakdown th span, .fsp-breakdown th small { display: block; }
.fsp-breakdown th span { color: var(--fsp-text); font-size: 12px; }
.fsp-breakdown th small { margin-top: 2px; color: var(--fsp-faint); font-size: 12px; font-weight: 400; }
.fsp-breakdown td:nth-child(2) { padding-right: 11px; }
.fsp-breakdown td.num { width: 48px; color: var(--fsp-text); font-size: 12px; text-align: right; font-variant-numeric: tabular-nums; }
.fsp-breakdown td.missing { color: var(--fsp-faint); font-size: 12px; }
.fsp-inspector-note { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--fsp-line); }
.fsp-inspector-note p { margin: 6px 0 0; color: var(--fsp-muted); font-size: 12px; line-height: 1.65; }
.fsp-factor-basis { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--fsp-line); }
.fsp-factor-basis summary { color: var(--fsp-accent); font-size: 12px; font-weight: 700; cursor: pointer; }
.fsp-factor-basis > p { margin: 8px 0 12px; color: var(--fsp-muted); font-size: 12px; line-height: 1.6; }
.fsp-factor-basis dl { display: grid; gap: 10px; margin: 0; }
.fsp-factor-basis dl > div { display: grid; grid-template-columns: 42px 1fr; gap: 9px; }
.fsp-factor-basis dt { color: var(--fsp-text); font-size: 12px; font-weight: 700; }
.fsp-factor-basis dd { display: flex; flex-wrap: wrap; gap: 5px; margin: 0; color: var(--fsp-faint); font-size: 11px; }
.fsp-factor-basis dd span { display: inline-flex; align-items: center; gap: 3px; padding: 2px 5px; border: 1px solid var(--fsp-line); border-radius: 8px; background: var(--fsp-raised); }
.fsp-factor-basis dd b { color: var(--fsp-accent); }
.fsp-factor-basis dd i { color: var(--fsp-faint); font-style: normal; }
.fsp-open-chart { width: fit-content; min-height: 32px; display: inline-flex; align-items: center; gap: 6px; margin: 10px 0 0; padding: 0 9px; border: 1px solid var(--fsp-line-strong); border-radius: 8px; background: transparent; color: var(--fsp-accent); font-size: 12px; font-weight: 600; cursor: pointer; }
.fsp-open-chart:hover { background: var(--fsp-raised); border-color: var(--fsp-accent); }
.fsp-app .fsp-open-chart { color: var(--fsp-accent); font-size: 12px; }
.fsp-mini-chart { margin: 0 0 18px; padding: 12px 0; border-top: 1px solid var(--fsp-line); border-bottom: 1px solid var(--fsp-line); }
.fsp-mini-chart h3 { font-size: 13px; }
.fsp-chart-body { min-height: 165px; display: flex; align-items: center; justify-content: center; gap: 10px; color: var(--fsp-muted); font-size: 12px; }
.fsp-chart-body button { min-height: 32px; padding: 0 10px; border: 1px solid var(--fsp-line-strong); border-radius: 8px; color: var(--fsp-accent); background: transparent; cursor: pointer; }
.fsp-app .fsp-mini-svg { display: block; width: 100%; height: auto; max-height: 230px; stroke: none; fill: none; }
.fsp-mini-svg text { fill: var(--fsp-faint); font-size: 11px; font-variant-numeric: tabular-nums; }
.fsp-chart-grid { stroke: var(--fsp-line); stroke-width: 1; }
.fsp-candle { stroke-width: 1; }
.fsp-candle.up { stroke: var(--fsp-up); fill: var(--fsp-up); }
.fsp-candle.down { stroke: var(--fsp-down); fill: var(--fsp-down); }

.fsp-table-error, .fsp-no-results { min-height: 230px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 24px; color: var(--fsp-muted); text-align: center; }
.fsp-table-error strong, .fsp-no-results strong { color: var(--fsp-text); font-size: 15px; }
.fsp-table-error span, .fsp-no-results span { font-size: 12px; }
.fsp-loading, .fsp-fatal { display: grid; place-items: center; }
.fsp-loading { flex: 1; gap: 12px; color: var(--fsp-muted); font-size: 15px; }
.fsp-loading-mark { width: 30px; height: 30px; border: 2px solid var(--fsp-line); border-top-color: var(--fsp-accent); border-radius: 50%; animation: fsp-spin .8s linear infinite; }
@keyframes fsp-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .fsp-loading-mark { animation: none; border-color: var(--fsp-accent); } }
.fsp-fatal-panel { max-width: 430px; display: flex; flex-direction: column; align-items: center; padding: 34px; text-align: center; }
.fsp-fatal-panel h1 { margin: 0 0 8px; color: var(--fsp-text); font-size: 20px; }
.fsp-fatal-panel p { margin: 0 0 18px; color: var(--fsp-muted); font-size: 15px; line-height: 1.6; }

@media (max-width: 1180px) {
  .fsp-app { height: auto; min-height: 100vh; overflow: visible; }
  .fsp-header { grid-template-columns: 1fr; align-items: start; gap: 16px; }
  .fsp-toolbar { grid-template-columns: auto minmax(180px, 1fr) minmax(150px, .8fr) minmax(128px, .6fr); }
  .fsp-reset { grid-column: 4; justify-self: end; }
  .fsp-workspace { grid-template-columns: 1fr; }
  .fsp-ledger { min-height: 600px; }
  .fsp-inspector { min-height: 360px; }
}

@media (max-width: 720px) {
  .fsp-header, .fsp-toolbar, .fsp-dimension-bar, .fsp-workspace { padding-left: 16px; padding-right: 16px; }
  .fsp-header { padding-top: 20px; }
  .fsp-context { grid-template-columns: repeat(2, 1fr); }
  .fsp-method-link { min-height: 48px; }
  .fsp-method { grid-template-columns: 1fr; padding: 16px; }
  .fsp-method > div { padding: 0 0 13px; border-right: 0; border-bottom: 1px solid var(--fsp-line); }
  .fsp-method > div:last-child { padding-bottom: 0; border-bottom: 0; }
  .fsp-toolbar { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: stretch; gap: 10px; }
  .fsp-date-control, .fsp-search { grid-column: 1 / -1; }
  .fsp-date-stepper { grid-template-columns: 42px 1fr 42px; }
  .fsp-reset { grid-column: 1 / -1; justify-self: end; height: 32px; }
  .fsp-dimension-bar { align-items: start; flex-direction: column; gap: 6px; }
  .fsp-dimension-tabs { width: 100%; box-sizing: border-box; }
  .fsp-workspace { padding-bottom: 16px; }
  .fsp-ledger { min-height: 560px; }
  .fsp-scroll-hint { display: none; }
  .fsp-ledger-head { align-items: center; }
  .fsp-table { min-width: 0; }
  .fsp-table th:nth-child(1) { width: 52px; }
  .fsp-table th:nth-child(2) { width: auto; }
  .fsp-table :is(th, td):nth-child(n + 3) { display: none; }
  .fsp-table th, .fsp-table td { height: 62px; }
  .fsp-table thead th { height: 38px; }
  .fsp-stock { gap: 3px; }
  .fsp-mobile-industry { display: inline; }
  .fsp-mobile-score { display: block; }
  .fsp-pagination { align-items: stretch; flex-direction: column; }
  .fsp-pagination > div { justify-content: space-between; }
  .fsp-inspector { min-height: 420px; }
}

/* ── 策略竞技场页（多策略滚动回测赛马）────────────────────── */
.av-arena-page {
  position: absolute;
  inset: 0;
  z-index: 90;
  background: var(--ak-dark-canvas);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
body.light-theme .av-arena-page { background: #f8fafc; }
.arena-loading, .arena-empty { color: #94a3b8; font-size: 13px; padding: 24px 16px; }
.arena-head {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 10px 16px;
  border-bottom: 1px solid #1e293b;
}
body.light-theme .arena-head { border-bottom-color: #E5E7EB; }
.arena-back { flex-shrink: 0; }
.arena-head-title { display: flex; flex-direction: column; gap: 2px; }
.arena-title { font-size: 16px; font-weight: 700; color: #f1f5f9; }
body.light-theme .arena-title { color: #111827; }
.arena-asof { font-size: 12px; color: #94a3b8; }
.arena-badge {
  margin-left: auto;
  font-size: 12px;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid #334155;
  color: #94a3b8;
}
.arena-body {
  flex: 1;
  min-height: 0;
  padding: 12px 16px 16px;
  display: grid;
  grid-template-columns: var(--arena-left, minmax(0, 1.25fr)) 10px minmax(260px, 1fr);
  column-gap: 4px;
  align-items: stretch;
}
.arena-left, .arena-right { min-width: 0; min-height: 0; display: flex; flex-direction: column; gap: 10px; }
.arena-splitter {
  width: 10px;
  cursor: col-resize;
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: none;
}
.arena-splitter::before {
  content: "";
  display: block;
  width: 3px;
  height: 100%;
  border-radius: 2px;
  background: #334155; /* 与 K 线主/副图分隔线 gridStrong 一致 */
  transition: background .15s;
}
.arena-splitter:hover::before,
.arena-splitter.active::before,
body.arena-dragging .arena-splitter::before { background: #4472C4; }
body.light-theme .arena-splitter::before { background: #d7dae1; }
body.arena-dragging { cursor: col-resize; user-select: none; }
.arena-cards { display: grid; gap: 8px; overflow-y: auto; padding-right: 2px; }
.arena-card {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 9px 12px;
  border: 1px solid #1e293b;
  border-radius: 10px;
  background: #111827;
  color: inherit;
  cursor: pointer;
  text-align: left;
  font-family: "Microsoft YaHei", "微软雅黑", sans-serif;
  transition: border-color .12s, background .12s;
}
body.light-theme .arena-card { border-color: #E5E7EB; background: #fff; }
.arena-card:hover { border-color: #475569; }
.arena-card.on { border-color: #4472C4; background: rgba(68,114,196,.12); }
.arena-rank {
  width: 34px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: #1e293b;
  color: #94a3b8;
  font-size: 13px;
  font-weight: 800;
}
body.light-theme .arena-rank { background: #eef1f6; }
.arena-card.on .arena-rank { background: #4472C4; color: #fff; }
.arena-card-main { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.arena-card-name { font-size: 14px; font-weight: 700; color: #f1f5f9; }
body.light-theme .arena-card-name { color: #111827; }
.arena-oos {
  margin-left: 6px;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 999px;
  vertical-align: 1px;
  color: #34d399;
  border: 1px solid rgba(52, 211, 153, .45);
  background: rgba(52, 211, 153, .1);
}
.arena-card-desc { font-size: 11px; color: var(--ak-text-faint); }
.arena-card-return { font-size: 20px; font-weight: 800; letter-spacing: -.01em; line-height: 1; text-align: right; font-variant-numeric: tabular-nums; }
.arena-card-return.pos { color: #ef4444; }
.arena-card-return.neg { color: #10b981; }
.arena-card-return-hint { display: block; font-size: 10px; font-weight: 500; letter-spacing: 0; color: var(--ak-text-faint); margin-top: 2px; }
.arena-card-risk { margin-top: 3px; font-size: 11px; color: #94a3b8; font-variant-numeric: tabular-nums; }
.arena-card-risk b { font-weight: 700; }
.arena-card-risk b.pos { color: #ef4444; }
.arena-card-risk b.neg { color: #10b981; }
.arena-card-risk-sep { margin: 0 6px; color: #334155; }
.arena-hold {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  border: 1px solid #1e293b;
  border-radius: 10px;
  background: #111827;
  overflow: hidden;
}
body.light-theme .arena-hold { border-color: #E5E7EB; background: #fff; }
.arena-hold-head { padding: 9px 12px; font-size: 12px; font-weight: 700; color: #94a3b8; border-bottom: 1px solid #1e293b; }
body.light-theme .arena-hold-head { border-bottom-color: #E5E7EB; }
.arena-hold-list { flex: 1; min-height: 0; overflow-y: auto; padding: 4px 6px; display: grid; gap: 2px; align-content: start; }
.arena-hold-row {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) 76px 60px 52px;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 7px 6px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: inherit;
  cursor: pointer;
  text-align: left;
  font-family: "Microsoft YaHei", "微软雅黑", sans-serif;
}
.arena-hold-row:hover { background: rgba(68,114,196,.1); }
.arena-hold-rank { font-size: 11px; font-weight: 700; color: var(--ak-text-faint); }
.arena-hold-name { font-size: 13px; font-weight: 600; color: #e2e8f0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.light-theme .arena-hold-name { color: #1f2937; }
.arena-hold-ind { font-size: 11px; color: #94a3b8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.arena-hold-price { font-size: 12px; font-weight: 700; color: #e2e8f0; text-align: right; font-variant-numeric: tabular-nums; }
body.light-theme .arena-hold-price { color: #1f2937; }
.arena-hold-score { font-size: 12px; font-weight: 700; color: #e2e8f0; text-align: right; font-variant-numeric: tabular-nums; }
body.light-theme .arena-hold-score { color: #1f2937; }

.arena-track {
  flex: 0 0 auto;
  max-height: 210px;
  display: flex;
  flex-direction: column;
  border: 1px solid #1e293b;
  border-radius: 10px;
  background: #111827;
  overflow: hidden;
}
.arena-track[hidden] { display: none; }
body.light-theme .arena-track { border-color: #E5E7EB; background: #fff; }
.arena-track-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 700;
  color: #94a3b8;
  border-bottom: 1px solid #1e293b;
}
body.light-theme .arena-track-head { border-bottom-color: #E5E7EB; }
.arena-track-list { flex: 1; min-height: 0; overflow-y: auto; padding: 4px 6px; display: grid; gap: 2px; align-content: start; }
.arena-track-badge { margin-left: auto; font-size: 10px; font-weight: 700; color: #94a3b8; white-space: nowrap; }
.arena-track-badge.fail { color: #f87171; }
.arena-track-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 46px 58px 54px;
  align-items: center;
  gap: 8px;
  padding: 6px 6px;
  border-radius: 7px;
}
.arena-track-row:hover { background: rgba(68,114,196,.1); }
.arena-track-name { font-size: 12px; font-weight: 600; color: #e2e8f0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.light-theme .arena-track-name { color: #1f2937; }
.arena-track-name em { display: block; font-style: normal; font-size: 10px; color: var(--ak-text-faint); font-variant-numeric: tabular-nums; }
.arena-track-excess, .arena-track-oos { font-size: 11px; font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
.arena-track-excess.pos, .arena-track-oos.pos { color: #ef4444; }
.arena-track-excess.neg, .arena-track-oos.neg { color: #10b981; }
.arena-track-oos.pos { color: #ef4444; }
.arena-track-oos.neg { color: #10b981; }
.arena-track-status {
  font-size: 10px;
  font-weight: 700;
  text-align: center;
  padding: 1px 5px;
  border-radius: 999px;
  border: 1px solid #334155;
  color: #94a3b8;
  white-space: nowrap;
}
.arena-track-status.pos { color: #34d399; border-color: rgba(52,211,153,.45); background: rgba(52,211,153,.1); }
.arena-track-status.neg { color: #f87171; border-color: rgba(248,113,113,.45); background: rgba(248,113,113,.1); }
.arena-evo {
  flex: 0 0 auto;
  border: 1px solid #1e293b;
  border-radius: 10px;
  background: #111827;
  overflow: hidden;
}
body.light-theme .arena-evo { border-color: #E5E7EB; background: #fff; }
.arena-evo-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 0;
  background: transparent;
  color: #e2e8f0;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  font-family: "Microsoft YaHei", "微软雅黑", sans-serif;
  text-align: left;
}
body.light-theme .arena-evo-toggle { color: #1f2937; }
.arena-evo-toggle:hover { background: rgba(68,114,196,.1); }
.arena-evo-badge { margin-left: auto; font-size: 11px; font-weight: 700; color: #34d399; }
.arena-evo-body { border-top: 1px solid #1e293b; padding: 8px 10px 10px; max-height: 240px; overflow-y: auto; }
body.light-theme .arena-evo-body { border-top-color: #E5E7EB; }
.arena-evo-stats { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 11px; color: #94a3b8; margin-bottom: 8px; }
.arena-evo-title { font-size: 11px; font-weight: 700; color: #94a3b8; margin: 8px 0 4px; }
.arena-evo-list { display: grid; gap: 2px; }
.arena-evo-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 40px 58px 44px;
  align-items: center;
  gap: 8px;
  padding: 4px 4px;
  border-radius: 6px;
}
.arena-evo-row:hover { background: rgba(68,114,196,.1); }
.arena-evo-name { font-size: 11px; color: #e2e8f0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.light-theme .arena-evo-name { color: #1f2937; }
.arena-evo-name em { display: block; font-style: normal; font-size: 10px; color: var(--ak-text-faint); font-variant-numeric: tabular-nums; }
.arena-evo-n { font-size: 10px; color: var(--ak-text-faint); text-align: right; }
.arena-evo-x { font-size: 11px; font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
.arena-evo-x.pos { color: #ef4444; }
.arena-evo-x.neg { color: #10b981; }
.arena-evo-t { font-size: 10px; color: var(--ak-text-faint); text-align: right; }
.arena-evo-note { margin-top: 8px; font-size: 10px; color: var(--ak-text-faint); line-height: 1.5; }

/* ── 竞技场 · 回测完整性报告 ─────────────────────────── */
.arena-integrity {
  flex: 0 0 auto;
  border: 1px solid #1e293b;
  border-radius: 10px;
  background: #111827;
  overflow: hidden;
}
body.light-theme .arena-integrity { border-color: #E5E7EB; background: #fff; }
.arena-integrity-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 0;
  background: transparent;
  color: #e2e8f0;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  font-family: "Microsoft YaHei", "微软雅黑", sans-serif;
  text-align: left;
}
body.light-theme .arena-integrity-toggle { color: #1f2937; }
.arena-integrity-toggle:hover { background: rgba(68,114,196,.1); }
.arena-integrity-badge { margin-left: auto; font-size: 11px; font-weight: 700; color: #34d399; }
.arena-integrity-badge.warn { color: #f59e0b; }
.arena-integrity-badge.fail { color: #f87171; }
.arena-integrity-body { border-top: 1px solid #1e293b; padding: 8px 10px 10px; max-height: 340px; overflow-y: auto; }
body.light-theme .arena-integrity-body { border-top-color: #E5E7EB; }
.arena-integrity-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 11px; color: #94a3b8; margin-bottom: 8px; }
.arena-integrity-meta b { color: #e2e8f0; font-weight: 700; font-variant-numeric: tabular-nums; }
body.light-theme .arena-integrity-meta b { color: #1f2937; }
.arena-integrity-checks { display: grid; gap: 4px; }
.arena-integrity-check {
  display: grid;
  grid-template-columns: 150px 54px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  padding: 6px 8px;
  border-radius: 7px;
  background: rgba(30,41,59,.55);
}
body.light-theme .arena-integrity-check { background: #f1f5f9; }
.arena-integrity-check-name { font-size: 11px; font-weight: 700; color: #e2e8f0; line-height: 1.5; }
body.light-theme .arena-integrity-check-name { color: #1f2937; }
.arena-integrity-check-status {
  font-size: 10px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 999px;
  text-align: center;
  white-space: nowrap;
}
.arena-integrity-check.pass .arena-integrity-check-status { color: #34d399; border: 1px solid rgba(52,211,153,.45); background: rgba(52,211,153,.1); }
.arena-integrity-check.warn .arena-integrity-check-status { color: #f59e0b; border: 1px solid rgba(245,158,11,.45); background: rgba(245,158,11,.1); }
.arena-integrity-check.fail .arena-integrity-check-status { color: #f87171; border: 1px solid rgba(248,113,113,.45); background: rgba(248,113,113,.1); }
.arena-integrity-check-detail { font-size: 10px; color: #94a3b8; line-height: 1.5; }
.arena-integrity-note { margin-top: 8px; font-size: 10px; color: var(--ak-text-faint); line-height: 1.5; }

/* ── 竞技场 · 专业详情折叠（隐藏技术细节）─────────────────── */
.arena-pro {
  flex: 0 0 auto;
  border: 1px solid #1e293b;
  border-radius: 10px;
  background: #111827;
  overflow: hidden;
}
body.light-theme .arena-pro { border-color: #E5E7EB; background: #fff; }
.arena-pro-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border: 0;
  background: transparent;
  color: #94a3b8;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  font-family: "Microsoft YaHei", "微软雅黑", sans-serif;
  text-align: left;
}
body.light-theme .arena-pro-toggle { color: #5b6472; }
.arena-pro-toggle:hover { background: rgba(68,114,196,.1); }
.arena-pro-toggle-label::after { content: " ▾"; font-size: 10px; }
.arena-pro-toggle[aria-expanded="true"] .arena-pro-toggle-label::after { content: " ▴"; }
.arena-pro-badge { margin-left: auto; font-size: 11px; font-weight: 700; color: #34d399; font-variant-numeric: tabular-nums; }
.arena-pro-badge.warn { color: #f59e0b; }
.arena-pro-badge.fail { color: #f87171; }
.arena-pro-body { border-top: 1px solid #1e293b; padding: 8px 10px 10px; max-height: 60vh; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; }
body.light-theme .arena-pro-body { border-top-color: #E5E7EB; }
.arena-pro-section { min-width: 0; }
.arena-pro-section-head { display: flex; align-items: center; gap: 8px; font-size: 11px; font-weight: 700; color: #94a3b8; margin-bottom: 6px; }
.arena-trend { display: inline-flex; align-items: flex-end; gap: 2px; height: 14px; }
.arena-trend i { width: 4px; border-radius: 2px; background: #334155; }
.arena-trend i.pos { background: #ef4444; }
.arena-trend i.neg { background: #10b981; }
.arena-status {
  font-size: 10px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 999px;
  white-space: nowrap;
  vertical-align: 1px;
}
.arena-card-name .arena-status { margin-left: 6px; }
.arena-status.ok { color: #34d399; border: 1px solid rgba(52,211,153,.45); background: rgba(52,211,153,.1); }
.arena-status.bad { color: #f87171; border: 1px solid rgba(248,113,113,.45); background: rgba(248,113,113,.1); }
.arena-status.flat { color: #94a3b8; border: 1px solid #334155; background: rgba(148,163,184,.08); }

.arena-right {
  border: 1px solid #1e293b;
  border-radius: 10px;
  background: #111827;
  padding: 12px;
  overflow-y: auto;
}
body.light-theme .arena-right { border-color: #E5E7EB; background: #fff; }
.arena-chart-head { font-size: 12px; font-weight: 700; color: #94a3b8; margin-bottom: 6px; }
.arena-chart-wrap { flex: 1; min-height: 380px; }
.arena-chart { width: 100%; height: 100%; min-height: 380px; }
.arena-x { font-size: 10px; fill: var(--ak-text-faint); }
.arena-y { font-size: 10px; fill: var(--ak-text-faint); font-variant-numeric: tabular-nums; }
.arena-end { font-size: 10px; font-weight: 700; }
.arena-base { font-size: 10px; fill: #94a3b8; }
.arena-legend { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.arena-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: #94a3b8;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 6px;
}
.arena-legend-item i { width: 14px; height: 3px; border-radius: 2px; display: inline-block; }
.arena-legend-item em { font-style: normal; font-weight: 700; font-variant-numeric: tabular-nums; }
.arena-legend-item em.pos { color: #ef4444; }
.arena-legend-item em.neg { color: #10b981; }
.arena-legend-item.on { color: #e2e8f0; background: rgba(68,114,196,.12); }
body.light-theme .arena-legend-item.on { color: #1f2937; }
.arena-weights { margin-top: 12px; border-top: 1px solid #1e293b; padding-top: 10px; }
body.light-theme .arena-weights { border-top-color: #E5E7EB; }
.arena-weights-head { font-size: 12px; font-weight: 700; color: #94a3b8; margin-bottom: 8px; }
.arena-weights-grid { display: grid; gap: 6px; }
.arena-weight-row { display: grid; grid-template-columns: 36px minmax(0, 1fr) 42px; align-items: center; gap: 8px; }
.arena-weight-name { font-size: 12px; color: #94a3b8; }
.arena-weight-bar { height: 6px; border-radius: 3px; background: #1e293b; overflow: hidden; display: block; }
body.light-theme .arena-weight-bar { background: #eef1f6; }
.arena-weight-bar i { display: block; height: 100%; background: #4472C4; border-radius: 3px; }
.arena-weight-row em { font-size: 12px; font-weight: 700; color: #e2e8f0; text-align: right; font-style: normal; font-variant-numeric: tabular-nums; }
body.light-theme .arena-weight-row em { color: #1f2937; }

/* ── 竞技场 · 交易明细 ─────────────────────────── */
.arena-trades { border-top: 1px solid #1e293b; padding-top: 10px; margin-top: 4px; }
body.light-theme .arena-trades { border-top-color: #E5E7EB; }
.arena-trades-head { font-size: 12px; font-weight: 700; color: #94a3b8; margin-bottom: 8px; }
.arena-trades-stats { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 11px; color: #94a3b8; margin-bottom: 8px; }
.arena-trades-stats b { color: #e2e8f0; font-weight: 700; font-variant-numeric: tabular-nums; }
body.light-theme .arena-trades-stats b { color: #1f2937; }
.arena-trades-stats b.pos { color: #ef4444; }
.arena-trades-stats b.neg { color: #10b981; }
.arena-trades-list { display: grid; gap: 2px; max-height: 260px; overflow-y: auto; }
.arena-trade-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 92px 34px 40px 54px;
  align-items: center;
  gap: 8px;
  padding: 5px 6px;
  border-radius: 7px;
}
.arena-trade-row:hover { background: rgba(68,114,196,.1); }
.arena-trade-name { font-size: 12px; font-weight: 600; color: #e2e8f0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.light-theme .arena-trade-name { color: #1f2937; }
.arena-trade-name em { display: block; font-style: normal; font-size: 10px; color: var(--ak-text-faint); font-variant-numeric: tabular-nums; }
.arena-trade-dates { font-size: 11px; color: #94a3b8; font-variant-numeric: tabular-nums; white-space: nowrap; }
.arena-trade-reason {
  font-size: 10px;
  font-weight: 700;
  color: #94a3b8;
  border: 1px solid #334155;
  border-radius: 999px;
  padding: 1px 6px;
  text-align: center;
  white-space: nowrap;
}
.arena-trade-reason.stop { color: #f87171; border-color: rgba(248,113,113,.4); background: rgba(248,113,113,.1); }
.arena-trade-reason.profit { color: #34d399; border-color: rgba(52,211,153,.4); background: rgba(52,211,153,.1); }
.arena-trade-days { font-size: 11px; color: #94a3b8; text-align: right; font-variant-numeric: tabular-nums; }
.arena-trade-pnl { font-size: 12px; font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
.arena-trade-pnl.pos { color: #ef4444; }
.arena-trade-pnl.neg { color: #10b981; }
.arena-trades-note { margin-top: 8px; font-size: 10px; color: var(--ak-text-faint); line-height: 1.5; }

@media (max-width: 1180px) {
  .av-arena-page { overflow: auto; }
  .arena-body { grid-template-columns: 1fr; }
  .arena-splitter { display: none; }
  .arena-right { min-height: 320px; }
}

/* ── 策略竞技场 · 独立页（从 K 线图解耦后的完整控制台）────────── */
.arena-app {
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--ak-dark-canvas);
}
body.light-theme .arena-app { background: #f8fafc; }
.arena-app-head {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 16px 24px;
  border-bottom: 1px solid #1e293b;
  background: rgba(255,255,255,.02);
}
body.light-theme .arena-app-head { border-bottom-color: #E5E7EB; background: #fff; }
.arena-app-titles { min-width: 0; }
.arena-app-title { margin: 0; display: flex; align-items: center; gap: 8px; font-size: 22px; font-weight: 700; letter-spacing: -.01em; color: #f1f5f9; }
body.light-theme .arena-app-title { color: #111827; }
.arena-app-beta {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  line-height: 1.5;
  padding: 1px 9px;
  border-radius: 999px;
  color: #a5b4fc;
  background: rgba(99,102,241,.12);
  border: 1px solid rgba(99,102,241,.45);
}
body.light-theme .arena-app-beta { color: #4f46e5; background: rgba(99,102,241,.08); }
.arena-app-sub { margin: 4px 0 0; font-size: 13px; color: #94a3b8; }
body.light-theme .arena-app-sub { color: #6b7280; }
.arena-app-actions { display: flex; align-items: center; gap: 12px; }
.arena-app-asof {
  font-size: 12px;
  font-weight: 600;
  color: #cbd5e1;
  background: rgba(68,114,196,.14);
  border: 1px solid rgba(68,114,196,.35);
  padding: 5px 12px;
  border-radius: 999px;
  font-variant-numeric: tabular-nums;
}
body.light-theme .arena-app-asof { color: #1f2937; background: rgba(68,114,196,.10); }
.arena-app-refresh { display: inline-flex; align-items: center; gap: 6px; }
.arena-app-body { flex: 1; min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
.arena-app-error { color: #ef4444; font-size: 14px; padding: 28px 24px; }
.arena-app ::-webkit-scrollbar { width: 8px; height: 8px; }
.arena-app ::-webkit-scrollbar-thumb { background: #334155; border-radius: 8px; }
.arena-app ::-webkit-scrollbar-thumb:hover { background: #475569; }
.arena-app ::-webkit-scrollbar-track { background: transparent; }
body.light-theme .arena-app ::-webkit-scrollbar-thumb { background: #d1d5db; }

@media (max-width: 1180px) {
  .arena-app { overflow: auto; }
  .arena-app-body { overflow: visible; }
  .arena-app-head { padding: 14px 16px; }
}

/* ── 主图叠加对比开关（顶部工具区）────────────────────── */
.av-top .ta-btn.on { color: #22c55e; border-color: rgba(34,197,94,.5); background: rgba(34,197,94,.1); }
.av-top .ta-btn:disabled { opacity: .4; cursor: not-allowed; }
body:not(.light-theme) .av-top .ta-btn:disabled { opacity: .68; }

/* ── 行业&概念 侧边栏面板（TradingView/SaaS 风格）──────── */
.av-sector-panel {
  flex-shrink: 0;
  height: 42%;
  min-height: 160px;
  display: flex;
  flex-direction: column;
  border-top: 1px solid #1e293b;
  background: var(--ak-dark-canvas);
}
body.light-theme .av-sector-panel { border-top-color: #E5E7EB; background: #fff; }
.av-sector-resize {
  flex-shrink: 0;
  height: 9px;
  cursor: row-resize;
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
}
.av-sector-resize::before {
  content: "";
  display: block;
  width: 100%;
  height: 3px;
  background: #334155; /* 与 K 线主/副图分隔线 gridStrong 一致 */
  transition: background .15s;
}
.av-sector-resize:hover::before { background: #4472C4; }
body.light-theme .av-sector-resize::before { background: #d7dae1; }
body.light-theme .av-sector-resize:hover::before { background: #4472C4; }
.av-sector-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px 6px;
  flex-shrink: 0;
}
.av-sector-title {
  flex: 1;
  font-size: 14px;
  font-weight: 700;
  color: #f1f5f9;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
body.light-theme .av-sector-title { color: #111827; }
.av-sector-back {
  border: 0;
  background: transparent;
  color: #7dd3fc;
  font-size: 13px;
  padding: 2px 6px;
  cursor: pointer;
  flex-shrink: 0;
}
body.light-theme .av-sector-back { color: #0369a1; }
.av-sector-sub {
  padding: 0 12px 6px;
  font-size: 12px;
  color: #94a3b8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex-shrink: 0;
}
.av-sector-body { flex: 1; min-height: 0; overflow-y: auto; padding: 0 10px 10px; }
.avs-loading, .avs-empty { color: #94a3b8; font-size: 13px; padding: 12px 4px; }
.avs-section { margin-top: 12px; }
.avs-section-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #94a3b8;
  margin-bottom: 6px;
}
.avs-section-note { text-transform: none; letter-spacing: 0; font-weight: 400; color: #94a3b8; margin-left: 6px; }
.avs-cards { display: grid; gap: 6px; }
.avs-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #1e293b;
  border-radius: 8px;
  background: #111827;
  color: inherit;
  cursor: pointer;
  text-align: left;
  font-family: "Microsoft YaHei", "微软雅黑", sans-serif;
  transition: border-color .15s, background .15s;
}
.avs-card:hover { border-color: #4472C4; background: #16233a; }
body.light-theme .avs-card { border-color: #E5E7EB; background: #fff; }
body.light-theme .avs-card:hover { border-color: #4472C4; background: #f3f6fc; }
.avs-card-main { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.avs-card-name { font-size: 14px; font-weight: 600; color: #f1f5f9; }
body.light-theme .avs-card-name { color: #111827; }
.avs-card-count { font-size: 12px; color: #94a3b8; }
.avs-card-side { display: flex; align-items: baseline; gap: 10px; flex-shrink: 0; }
.avs-card-pct { font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }
.avs-card-flow { font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; }
.avs-card-pct.pos, .avs-card-flow.pos { color: #ef4444; }
.avs-card-pct.neg, .avs-card-flow.neg { color: #10b981; }
.avs-list { display: grid; gap: 2px; }
.avs-cons-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 2px 8px 4px;
  font-size: 11px;
  font-weight: 600;
  color: var(--ak-text-faint);
  border-bottom: 1px solid rgba(148,163,184,.18);
  margin-bottom: 2px;
}
.avs-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 6px 8px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: inherit;
  cursor: pointer;
  text-align: left;
  font-family: "Microsoft YaHei", "微软雅黑", sans-serif;
  font-size: 13px;
}
.avs-row:hover { background: rgba(68,114,196,.1); }
.avs-row-name { flex: 1; min-width: 0; color: #e2e8f0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.light-theme .avs-row-name { color: #1f2937; }
.avs-row-count { font-size: 12px; color: #94a3b8; flex-shrink: 0; }
.avs-row-pct { width: 70px; text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; flex-shrink: 0; }
.avs-row-barwrap { width: 42px; height: 5px; border-radius: 3px; background: rgba(148,163,184,.15); overflow: hidden; flex-shrink: 0; }
.avs-row-bar { display: block; height: 100%; border-radius: 3px; }
.avs-row-bar.pos { background: #ef4444; }
.avs-row-bar.neg { background: #10b981; }
.avs-row-rel { width: 64px; text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; flex-shrink: 0; }
.avs-row-pct.pos, .avs-row-rel.pos { color: #ef4444; }
.avs-row-pct.neg, .avs-row-rel.neg { color: #10b981; }
.avs-row-pct.zero, .avs-row-rel.zero { color: #94a3b8; }
.avs-flowline { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; font-size: 13px; color: #e2e8f0; padding: 2px 4px; }
body.light-theme .avs-flowline { color: #1f2937; }
.avs-lead { font-size: 12px; color: #94a3b8; }
.avs-chips { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 6px; }
.avs-chip { font-size: 11px; padding: 2px 8px; border-radius: 999px; border: 1px solid; }
.avs-chip.pos { color: #ef4444; border-color: rgba(239,68,68,.4); }
.avs-chip.neg { color: #10b981; border-color: rgba(16,185,129,.4); }
.avs-chip.warn { color: #a78bfa; border-color: rgba(167,139,250,.45); }
.avs-evidence-row { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; padding: 6px 8px; border-radius: 6px; font-size: 12px; }
.avs-evidence-row:hover { background: rgba(68,114,196,.06); }
.avs-evidence-label { font-size: 12px; font-weight: 700; color: #e2e8f0; }
.avs-evidence-label em { font-style: normal; font-weight: 400; color: #94a3b8; margin-left: 4px; }
.avs-evidence-value { font-weight: 700; font-variant-numeric: tabular-nums; }
.avs-evidence-value.pos { color: #ef4444; }
.avs-evidence-value.neg { color: #10b981; }
.avs-evidence-reason { width: 100%; font-size: 11px; color: #94a3b8; }
body.light-theme .avs-evidence-label { color: #1f2937; }
.avs-index { display: grid; gap: 10px; }
.avs-index-main { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.avs-index-price { font-size: 22px; font-weight: 800; color: #f1f5f9; font-variant-numeric: tabular-nums; }
body.light-theme .avs-index-price { color: #111827; }
.avs-index-chg { font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }
.avs-index-chg.pos { color: #ef4444; }
.avs-index-chg.neg { color: #10b981; }
.avs-index-live { font-size: 11px; color: #22c55e; border: 1px solid rgba(34,197,94,.4); padding: 1px 8px; border-radius: 999px; }
.avs-index-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px 12px; }
.avs-index-grid span { font-size: 12px; color: #94a3b8; display: flex; justify-content: space-between; gap: 6px; }
.avs-index-grid b { color: #e2e8f0; font-weight: 600; font-variant-numeric: tabular-nums; }
body.light-theme .avs-index-grid b { color: #1f2937; }
.avs-index-grid b.pos { color: #ef4444; }
.avs-index-grid b.neg { color: #10b981; }
.avs-index-note { font-size: 11px; color: #94a3b8; border-top: 1px solid #1e293b; padding-top: 8px; }
body.light-theme .avs-index-note { border-top-color: #E5E7EB; }

/* ── 叠加对比图层 ─────────────────────────────── */
.av-compare-layer { pointer-events: none; }
.av-cmp-legend { font-family: "Microsoft YaHei", "微软雅黑", sans-serif; }
.av-cmp-legend span { white-space: nowrap; text-shadow: 0 1px 3px rgba(0,0,0,.7); }

/* ── 全局体验打磨（浏览器表面 / 焦点 / 动效 / 触控）────────── */
::selection { background: rgba(68,114,196,.35); color: inherit; }
:focus-visible { outline: 2px solid #4472C4; outline-offset: 2px; border-radius: 4px; }
input, textarea { caret-color: #4472C4; }
button { touch-action: manipulation; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #334155; border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: #475569; }
* { scrollbar-width: thin; scrollbar-color: #334155 transparent; }
body.light-theme ::-webkit-scrollbar-thumb { background: #d1d5db; }
body.light-theme ::-webkit-scrollbar-thumb:hover { background: #b6bdc9; }
body.light-theme { scrollbar-color: #d1d5db transparent; }
.ta-btn:not(:disabled):active, .avs-card:active, .avs-row:active { transform: scale(.98); }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ── A股黑名单 ────────────────────────────────── */
.blk-app { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.blk-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 20px 24px 14px; flex-shrink: 0; }
.blk-head-titles { min-width: 0; }
.blk-title { font-size: 24px; font-weight: 900; letter-spacing: -.02em; color: #f1f5f9; display: flex; align-items: center; gap: 8px; }
body.light-theme .blk-title { color: #0f172a; }
.blk-beta { font-size: 10px; font-weight: 800; padding: 2px 8px; border-radius: 999px; background: rgba(239,68,68,.14); color: #f87171; border: 1px solid rgba(239,68,68,.35); letter-spacing: .03em; }
body.light-theme .blk-beta { background: rgba(239,68,68,.1); color: #dc2626; }
.blk-sub { margin-top: 4px; font-size: 12px; color: #94a3b8; }
body.light-theme .blk-sub { color: #6b7280; }
.blk-head-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.blk-asof { font-size: 12px; color: #94a3b8; font-variant-numeric: tabular-nums; }
body.light-theme .blk-asof { color: #6b7280; }
.blk-refresh { display: inline-flex; align-items: center; gap: 5px; height: 30px; padding: 0 12px; font-size: 12px; }
.blk-body { flex: 1; min-height: 0; overflow-y: auto; padding: 0 24px 24px; }
.blk-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 18px; }
.blk-stat { background: var(--modal-bg); border: 1px solid var(--toolbar-border); border-radius: 12px; padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; }
.blk-stat-value { font-size: 26px; font-weight: 900; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.blk-stat-label { font-size: 12px; color: #94a3b8; }
body.light-theme .blk-stat-label { color: #6b7280; }
.blk-cats { display: grid; gap: 14px; margin-bottom: 18px; }
.blk-group-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.blk-group-dot { width: 8px; height: 8px; border-radius: 999px; flex-shrink: 0; }
.blk-group-name { font-size: 13px; font-weight: 800; color: #cbd5e1; margin: 0; letter-spacing: .02em; }
body.light-theme .blk-group-name { color: #374151; }
.blk-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.blk-chip { display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--toolbar-border); background: var(--tb-group-bg); color: #94a3b8; font-size: 12px; font-weight: 600; cursor: pointer; transition: all .15s; font-family: "Microsoft YaHei", "微软雅黑", sans-serif; }
.blk-chip:hover { color: #e2e8f0; border-color: #475569; }
body.light-theme .blk-chip:hover { color: #111827; border-color: #9ca3af; }
.blk-chip.on { background: rgba(239,68,68,.18); color: #fca5a5; border-color: rgba(239,68,68,.45); box-shadow: inset 0 0 0 1px rgba(239,68,68,.25); }
body.light-theme .blk-chip.on { background: rgba(239,68,68,.12); color: #dc2626; }
.blk-chip.pending { opacity: .62; }
.blk-chip-count { font-size: 11px; font-weight: 800; padding: 1px 7px; border-radius: 999px; background: rgba(148,163,184,.16); color: #cbd5e1; font-variant-numeric: tabular-nums; }
body.light-theme .blk-chip-count { color: #4b5563; }
.blk-chip.on .blk-chip-count { background: rgba(239,68,68,.25); color: #fecaca; }
body.light-theme .blk-chip.on .blk-chip-count { color: #b91c1c; }
.blk-list { background: var(--modal-bg); border: 1px solid var(--toolbar-border); border-radius: 14px; overflow: hidden; }
.blk-toolbar { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding: 14px 16px; border-bottom: 1px solid var(--toolbar-border); flex-wrap: wrap; }
.blk-toolbar-titles { min-width: 0; }
.blk-list-title { margin: 0 0 4px; font-size: 15px; font-weight: 800; color: #f1f5f9; }
body.light-theme .blk-list-title { color: #0f172a; }
.blk-list-desc { margin: 0; font-size: 12px; color: #94a3b8; line-height: 1.55; }
body.light-theme .blk-list-desc { color: #6b7280; }
.blk-note { color: #f59e0b; }
.blk-toolbar-controls { display: flex; align-items: center; gap: 8px; flex-shrink: 0; flex-wrap: wrap; }
.blk-select, .blk-input { height: 30px; border-radius: 8px; border: 1px solid var(--input-border); background: var(--input-bg); color: var(--input-fg); font-size: 12px; padding: 0 10px; outline: none; font-family: "Microsoft YaHei", "微软雅黑", sans-serif; }
.blk-select:focus, .blk-input:focus { border-color: #4472C4; box-shadow: 0 0 0 3px rgba(68,114,196,.18); }
.blk-input { width: 160px; }
.blk-search { display: inline-flex; align-items: center; height: 30px; padding: 0 14px; font-size: 12px; }
.blk-table-wrap { overflow-x: auto; }
.blk-table { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 760px; }
.blk-table th { text-align: left; padding: 9px 14px; font-size: 11px; font-weight: 700; color: #94a3b8; letter-spacing: .05em; text-transform: uppercase; border-bottom: 1px solid var(--toolbar-border); white-space: nowrap; background: rgba(148,163,184,.05); }
body.light-theme .blk-table th { color: #6b7280; }
.blk-table td { padding: 10px 14px; border-bottom: 1px solid rgba(148,163,184,.08); vertical-align: middle; }
.blk-table tbody tr:hover { background: rgba(68,114,196,.07); }
.blk-code { font-variant-numeric: tabular-nums; font-weight: 700; color: #93c5fd; white-space: nowrap; }
body.light-theme .blk-code { color: #1d4ed8; }
.blk-name { font-weight: 700; color: #f1f5f9; white-space: nowrap; }
body.light-theme .blk-name { color: #111827; }
.blk-event { display: inline-block; font-size: 11px; font-weight: 700; padding: 2px 9px; border-radius: 999px; background: rgba(239,68,68,.13); color: #f87171; border: 1px solid rgba(239,68,68,.3); white-space: nowrap; }
body.light-theme .blk-event { color: #dc2626; }
.blk-date { color: #94a3b8; font-variant-numeric: tabular-nums; white-space: nowrap; }
body.light-theme .blk-date { color: #6b7280; }
.blk-detail { color: #94a3b8; font-size: 12px; max-width: 380px; }
body.light-theme .blk-detail { color: #6b7280; }
.blk-actions { text-align: right; white-space: nowrap; }
.blk-open { display: inline-flex; align-items: center; gap: 4px; border: 1px solid rgba(68,114,196,.45); background: rgba(68,114,196,.12); color: #a5c8ff; font-size: 11px; font-weight: 700; padding: 4px 9px; border-radius: 7px; cursor: pointer; font-family: "Microsoft YaHei", "微软雅黑", sans-serif; transition: all .15s; }
.blk-open:hover { background: rgba(68,114,196,.28); color: #fff; }
body.light-theme .blk-open { color: #1d4ed8; }
.blk-pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; flex-wrap: wrap; }
.blk-pager-total { font-size: 12px; color: #94a3b8; font-variant-numeric: tabular-nums; }
body.light-theme .blk-pager-total { color: #6b7280; }
.blk-pager-btns { display: flex; gap: 8px; }
.blk-page { display: inline-flex; align-items: center; height: 30px; padding: 0 12px; font-size: 12px; }
.blk-page:disabled { opacity: .45; cursor: not-allowed; }
body:not(.light-theme) .blk-page:disabled { opacity: .68; }
.blk-loading, .blk-error { padding: 34px 16px; text-align: center; font-size: 13px; color: #94a3b8; }
body.light-theme .blk-loading, body.light-theme .blk-error { color: #6b7280; }
.blk-error { color: #f87171; }
.blk-empty { padding: 44px 20px; text-align: center; }
.blk-empty-title { margin: 0 0 6px; font-size: 15px; font-weight: 800; color: #e2e8f0; }
body.light-theme .blk-empty-title { color: #111827; }
.blk-empty-desc { margin: 0; font-size: 12px; color: #94a3b8; }
body.light-theme .blk-empty-desc { color: #6b7280; }
@media (max-width: 720px) {
  .blk-head { padding: 14px 14px 10px; flex-direction: column; }
  .blk-body { padding: 0 14px 16px; }
  .blk-stats { grid-template-columns: repeat(2, 1fr); }
  .blk-toolbar { flex-direction: column; }
  .blk-toolbar-controls { width: 100%; }
  .blk-input { flex: 1; width: auto; }
}

/* ══ 全宽研究页 · 统一页面身份栏 ══════════════════════════ */
.ak-page-head {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  padding: 14px 20px;
  border-bottom: 1px solid var(--ak-dark-border);
  background: var(--ak-dark-surface);
}
.ak-page-head .ak-page-title {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ak-dark-text);
  font-size: 22px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -.02em;
}
.ak-page-head .ak-page-beta {
  flex: 0 0 auto;
  padding: 1px 9px;
  border: 1px solid rgba(117, 167, 255, .48);
  border-radius: 999px;
  background: rgba(117, 167, 255, .12);
  color: var(--ak-dark-focus);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: .04em;
}
.ak-page-head .ak-page-sub {
  max-width: 74ch;
  margin: 4px 0 0;
  color: var(--ak-dark-text-muted);
  font-size: 13px;
  line-height: 1.5;
}
.ak-page-head .ak-page-actions { display: flex; align-items: center; gap: 8px; }
.fsp-header.ak-page-head .fsp-heading { flex: 1 1 280px; min-width: 0; }
.fsp-header.ak-page-head .fsp-context { flex: 0 1 800px; margin-left: auto; }
.fsp-header.ak-page-head .fsp-context > div { min-height: 46px; }
body.light-theme .ak-page-head { border-bottom-color: #d7e0eb; background: #fff; }
body.light-theme .ak-page-head .ak-page-title { color: #172238; }
body.light-theme .ak-page-head .ak-page-sub { color: #52627a; }
body.light-theme .ak-page-head .ak-page-beta { border-color: rgba(37, 93, 181, .38); background: #dce9fb; color: #255db5; }

@media (max-width: 1180px) {
  .ak-page-head { align-items: stretch; }
  .fsp-header.ak-page-head .fsp-context { flex-basis: 100%; margin-left: 0; }
}
@media (max-width: 720px) {
  .ak-page-head { flex-direction: column; align-items: stretch; gap: 10px; padding: 12px 14px; }
  .ak-page-head .ak-page-title { font-size: 21px; }
  .ak-page-head .ak-page-actions { justify-content: space-between; }
  .fsp-header.ak-page-head { padding: 12px 14px; }
  .fsp-header.ak-page-head .fsp-heading { flex: 0 0 auto; }
}
