/* ============================================================================
   MiniMax 情报站 — 扩展样式层
   基底：assets/aihot-base.css（复刻自 AIHOT 公开前端的设计系统，含 reset + 主题 token）
   本文件只写「情报站独有」的组件，全部复用基底的 CSS 变量，保证视觉一致。
   ========================================================================== */

/* ---- 覆盖基底：侧栏需容纳「MiniMax 情报站」+ 徽标 ---- */
:root,
:root[data-theme=dark],
:root[data-theme=light] { --nav-width: 224px; }

/* ---- 品牌区 ---- */
.brand-logo-sidebar { display: flex; align-items: center; gap: 9px; text-decoration: none; min-width: 0; }
.brand-mark {
    width: 26px; height: 26px; flex: none; border-radius: 7px;
    display: grid; place-items: center;
    background: linear-gradient(135deg, var(--brand-cyan-start) 0%, var(--brand-cyan82) 55%, var(--brand-cyan-end) 100%);
    color: #06212a; font-weight: 800; font-size: 13px; letter-spacing: -.04em;
    box-shadow: 0 1px 6px color-mix(in srgb, var(--brand-cyan54) 34%, transparent);
}
.brand-text { display: grid; line-height: 1.2; min-width: 0; }
.brand-text strong { font-size: 12.5px; font-weight: 650; color: var(--text-0); letter-spacing: -.01em; white-space: nowrap; }
.brand-text span { font-size: 10px; font-family: var(--font-mono); color: var(--text-2); white-space: nowrap; }

/* ---- 侧栏图标 ---- */
.side-icon { width: 15px; height: 15px; flex: none; opacity: .8; }
.side-icon svg { width: 100%; height: 100%; display: block; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.side-link-active .side-icon { opacity: 1; color: var(--theme-accent); }
.side-badge {
    margin-left: auto; flex: 0 0 auto; font-family: var(--font-mono); font-size: 10px;
    color: var(--text-2); background: var(--surface-1); border: 1px solid var(--border);
    border-radius: 5px; padding: 0 5px; line-height: 16px; white-space: nowrap;
    min-width: 26px; text-align: center; overflow: visible;
}
.side-link { min-width: 0; }
.side-label { flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; }
.side-link-active .side-badge { color: var(--theme-accent); border-color: color-mix(in srgb, var(--theme-accent) 38%, transparent); }

/* ---- 工具栏 ---- */
.toolbar-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.mm-search {
    position: relative; flex: 1 1 260px; max-width: 380px; min-width: 180px;
}
.mm-search input {
    width: 100%; box-sizing: border-box; padding: 7px 30px 7px 30px;
    background: var(--surface-1); border: 1px solid var(--border);
    border-radius: var(--radius-sm); color: var(--text-0);
    font-family: inherit; font-size: 13px; outline: none;
}
.mm-search input:focus { border-color: var(--theme-accent); }
.mm-search svg { position: absolute; left: 9px; top: 50%; transform: translateY(-50%); width: 14px; height: 14px; stroke: var(--text-2); fill: none; stroke-width: 1.8; }
.mm-search .clear { position: absolute; right: 7px; top: 50%; transform: translateY(-50%); border: 0; background: none; color: var(--text-2); cursor: pointer; font-size: 15px; line-height: 1; padding: 2px 4px; }

/* ---- 数据源切换（分段控件）---- */
.segmented-solid {
    display: inline-flex; padding: 2px; gap: 2px;
    background: var(--surface-1); border: 1px solid var(--border); border-radius: 9px;
}
.seg-solid-item {
    border: 0; background: transparent; color: var(--text-2);
    font-family: inherit; font-size: 12px; padding: 4px 11px; border-radius: 7px; cursor: pointer;
    transition: background var(--dur-fast) ease, color var(--dur-fast) ease; white-space: nowrap;
}
.seg-solid-item:hover { color: var(--text-1); }
.seg-solid-item-active { background: var(--theme-accent); color: var(--theme-accent-contrast); font-weight: 600; }

/* ---- 分区 chips ---- */
.zone-chips { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.zone-chip {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 4px 11px; border-radius: 999px; cursor: pointer;
    border: 1px solid var(--border-strong); background: var(--surface-card);
    color: var(--text-1); font-size: 12px; font-family: inherit;
    transition: all var(--dur-fast) ease;
}
.zone-chip:hover { border-color: var(--theme-accent); }
.zone-chip-on {
    background: color-mix(in srgb, var(--theme-accent) 12%, transparent);
    border-color: color-mix(in srgb, var(--theme-accent) 45%, transparent);
    color: var(--theme-accent); font-weight: 600;
}
.zone-chip .n { font-family: var(--font-mono); font-size: 10.5px; opacity: .75; }

/* ---- 信源数徽标（对齐 AIHOT 的 hot-status 视觉）---- */
.src-badge {
    display: inline-flex; align-items: center; gap: 4px; flex: none;
    padding: 1px 7px; border-radius: 4px; font-size: 10px; font-weight: 650; line-height: 1.7; white-space: nowrap;
    color: var(--accent-cyan-fg); background: color-mix(in srgb, var(--accent-cyan) 10%, transparent);
}
.src-badge-hot { color: var(--accent-amber-fg); background: color-mix(in srgb, var(--accent-amber) 12%, transparent); }

/* ---- 事件综述（AIHOT digest 风格；过长时折叠为 3 行，点击展开）---- */
.hot-digest {
    margin: 9px 0 0; padding: 9px 12px; font-size: 13px; line-height: 1.75;
    border-left: 2px solid var(--accent-cyan); border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    background: color-mix(in srgb, var(--accent-cyan) 6%, transparent); color: var(--text-1);
}
.hot-digest b { color: var(--text-0); font-weight: 650; }
.hot-digest.is-clamped {
    display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3;
    overflow: hidden; cursor: pointer; position: relative;
}
.hot-digest.is-clamped::after {
    content: "展开 ▾"; position: absolute; right: 0; bottom: 0; padding-left: 14px;
    font-size: 11px; color: var(--text-2);
    background: linear-gradient(90deg, transparent, var(--surface-card) 40%);
}

/* ---- 信源列表（hot-source-body 内）---- */
.hot-source-body ul { margin: 6px 0 0; padding-left: 16px; display: grid; gap: 3px; }
.hot-source-body li { font-size: 12px; color: var(--text-2); line-height: 1.6; }
.hot-source-body li a { color: var(--text-1); text-decoration: none; }
.hot-source-body li a:hover { color: var(--theme-accent); text-decoration: underline; }

/* ---- 动态流卡片 ---- */
.tl-title { margin: 0; font-size: 15px; font-weight: 650; line-height: 1.55; color: var(--text-0); overflow-wrap: anywhere; }
.tl-title a { color: inherit; text-decoration: none; }
.tl-title a:hover { color: var(--theme-accent); }
.tl-sum { margin: 6px 0 0; font-size: 13px; line-height: 1.7; color: var(--text-2); display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }

/* ---- 英文条目的中文翻译行（原文标题在上，AI 中文在下）---- */
.tl-cn,
.hot-rank-cn {
    margin: 4px 0 0; padding-left: 8px;
    border-left: 2px solid color-mix(in srgb, var(--theme-accent) 55%, transparent);
    font-size: 13px; line-height: 1.6; color: var(--text-1);
    display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden;
}
.hot-rank-cn { margin: 3px 0 0; font-size: 12.5px; }
.tl-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin-top: 9px; font-size: 11.5px; color: var(--text-2); }
.tl-src { font-weight: 550; color: var(--text-1); }

/* ---- 外部项目入口卡 ---- */
.proj-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.proj-card {
    display: grid; gap: 5px; padding: 14px 15px; text-decoration: none;
    border: 1px solid var(--border); border-radius: var(--radius);
    background: var(--surface-card); box-shadow: var(--shadow-card);
    transition: border-color var(--dur-base) ease, transform var(--dur-base) ease;
}
.proj-card:hover { border-color: var(--theme-accent); transform: translateY(-1px); }
.proj-card h3 { margin: 0; font-size: 14px; font-weight: 650; color: var(--text-0); display: flex; align-items: center; gap: 6px; }
.proj-card p { margin: 0; font-size: 12px; line-height: 1.6; color: var(--text-2); }
.proj-dot { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.proj-dot-on { background: var(--accent-emerald); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent-emerald) 20%, transparent); }
.proj-dot-off { background: var(--text-2); opacity: .5; }
.proj-meta { font-family: var(--font-mono); font-size: 10.5px; color: var(--text-2); }
.proj-kind { display: inline-block; font-size: 10.5px; line-height: 1; padding: 3px 7px; border-radius: 999px; background: var(--surface-2); color: var(--accent); border: 1px solid var(--border); font-weight: 600; margin-bottom: 8px; }

/* ---- 空态 / 加载 ---- */
.mm-empty { padding: 48px 0; text-align: center; color: var(--text-2); font-size: 13.5px; }
.mm-loading { padding: 40px 0; text-align: center; color: var(--text-2); font-size: 13px; }
.spin { display: inline-block; width: 13px; height: 13px; margin-right: 7px; vertical-align: -1px;
        border: 2px solid var(--border-strong); border-top-color: var(--theme-accent); border-radius: 50%;
        animation: mmspin .7s linear infinite; }
@keyframes mmspin { to { transform: rotate(360deg); } }

/* ---- 移动端底栏（m-* 已在基底，这里只补开关按钮）---- */
.app-hamburger { display: none; }
@media (max-width: 900px) {
    .app-shell { grid-template-columns: minmax(0, 1fr); }
    .sidebar {
        position: fixed; z-index: 40; left: 0; top: 0; width: var(--nav-width);
        transform: translateX(-100%); transition: transform var(--dur-base) ease;
        background: var(--bg-0);
    }
    .sidebar.is-open { transform: translateX(0); }
    .sidebar-backdrop { position: fixed; inset: 0; z-index: 39; background: rgba(0,0,0,.42); }
    .app-hamburger {
        display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px;
        border: 1px solid var(--border); border-radius: var(--radius-sm);
        background: var(--surface-card); color: var(--text-1); font-size: 12px; cursor: pointer;
    }
    .hot-rank-row { grid-template-columns: 26px minmax(0, 1fr); gap: 12px; padding: 18px 16px; }
    .hot-rank-heat { grid-column: 2; flex-direction: row; align-items: baseline; gap: 6px; padding-top: 0; }
    .hot-rank-heat-value { font-size: 16px; }
    .drawer { width: 100%; }
}

/* ============ 视图切换 ============
   基底 .page/.hot-page 显式设了 display，会盖掉 hidden 属性 → 视图叠加。
   这里强制 [hidden] 优先，保证一次只显示一个视图。 */
[hidden] { display: none !important; }

/* ============ 收藏 / 已读 ============ */
.mm-star {
    border: 0; background: none; cursor: pointer; padding: 2px 3px; line-height: 1;
    font-size: 14px; color: var(--text-2); opacity: .55; transition: opacity var(--dur-base), color var(--dur-base);
}
.mm-star:hover { opacity: 1; color: var(--accent-amber-fg); }
.mm-star.is-on { opacity: 1; color: var(--accent-amber-fg); }
.mm-star.is-on::after { content: none; }
.is-read { opacity: .52; }
.is-read:hover { opacity: .82; }
.mm-row-actions { display: inline-flex; align-items: center; gap: 6px; margin-left: 6px; }
.mm-detail-btn {
    border: 1px solid var(--border); background: var(--surface-card); color: var(--text-2);
    border-radius: var(--radius-sm); font-size: 11px; padding: 2px 7px; cursor: pointer; line-height: 1.5;
}
.mm-detail-btn:hover { border-color: var(--theme-accent); color: var(--theme-accent); }
.unread-toggle {
    display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; color: var(--text-2);
    border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 4px 9px; cursor: pointer;
    background: var(--surface-card);
}
.unread-toggle.is-on { border-color: var(--theme-accent); color: var(--theme-accent); }

/* ============ 事件详情抽屉 ============ */
.drawer-backdrop {
    position: fixed; inset: 0; z-index: 60; background: rgba(0,0,0,.5);
    opacity: 0; pointer-events: none; visibility: hidden; transition: opacity var(--dur-base) ease, visibility 0s linear var(--dur-base);
}
.drawer-backdrop.is-open { opacity: 1; pointer-events: auto; visibility: visible; transition: opacity var(--dur-base) ease, visibility 0s; }
.drawer {
    position: fixed; z-index: 61; top: 0; right: 0; height: 100%; width: 520px; max-width: 100%;
    background: var(--bg-0); border-left: 1px solid var(--border-strong);
    transform: translateX(100%); visibility: hidden; transition: transform var(--dur-base) ease, visibility 0s linear var(--dur-base);
    display: flex; flex-direction: column; overflow: hidden;
}
.drawer.is-open { transform: translateX(0); visibility: visible; transition: transform var(--dur-base) ease, visibility 0s; }
.drawer-head {
    display: flex; align-items: flex-start; gap: 10px; padding: 16px 18px 12px;
    border-bottom: 1px solid var(--border);
}
.drawer-head h2 { margin: 0; font-size: 15px; font-weight: 650; line-height: 1.55; color: var(--text-0); }
.drawer-close {
    margin-left: auto; flex: none; border: 1px solid var(--border); background: var(--surface-card);
    color: var(--text-2); border-radius: var(--radius-sm); width: 28px; height: 28px; cursor: pointer; font-size: 15px; line-height: 1;
}
.drawer-close:hover { color: var(--text-0); border-color: var(--border-strong); }
.drawer-body { padding: 14px 18px 28px; overflow-y: auto; display: grid; gap: 14px; }
.drawer-section { display: grid; gap: 7px; }
.drawer-label { font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--text-2); }
.drawer-text { margin: 0; font-size: 13px; line-height: 1.75; color: var(--text-1); }
.drawer-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 11.5px; color: var(--text-2); }
.drawer-links { margin: 0; padding-left: 16px; display: grid; gap: 5px; }
.drawer-links li { font-size: 12.5px; line-height: 1.6; color: var(--text-2); }
.drawer-links a { color: var(--text-1); text-decoration: none; }
.drawer-links a:hover { color: var(--theme-accent); text-decoration: underline; }

/* 热度曲线 */
.heat-box { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 12px; background: var(--surface-card); }
.heat-svg { display: block; width: 100%; height: 84px; }
.heat-axis { display: flex; justify-content: space-between; font-size: 10px; color: var(--text-2); font-family: var(--font-mono); margin-top: 4px; }
.heat-empty { font-size: 12px; color: var(--text-2); padding: 6px 0; }

/* ============ 实时行情 ============ */
.quote-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.quote-card {
  border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px;
  background: var(--surface-card); transition: border-color var(--dur-base), transform var(--dur-base);
}
.quote-card:hover { border-color: var(--theme-accent); transform: translateY(-1px); }
.quote-card-featured { border-color: color-mix(in srgb, var(--theme-accent) 55%, var(--border)); box-shadow: 0 6px 22px -14px color-mix(in srgb, var(--theme-accent) 60%, transparent); }
.quote-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.quote-name { display: block; font-size: 16px; font-weight: 700; color: var(--text-0); }
.quote-code { display: block; font-size: 11.5px; color: var(--text-2); margin-top: 2px; font-family: var(--font-mono); }
.quote-err { font-size: 11px; color: var(--accent-amber-fg); }
.quote-price { font-size: 34px; font-weight: 750; line-height: 1.1; margin: 12px 0 2px; font-family: var(--font-mono); letter-spacing: -0.5px; }
.quote-price .quote-cur { font-size: 13px; font-weight: 600; color: var(--text-2); margin-left: 4px; }
.quote-chg { font-size: 14px; font-weight: 650; font-family: var(--font-mono); }
.quote-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 14px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border); }
.quote-stat { display: flex; align-items: baseline; justify-content: space-between; font-size: 12px; }
.quote-stat span { color: var(--text-2); }
.quote-stat b { color: var(--text-1); font-family: var(--font-mono); font-weight: 600; }
.quote-time { margin-top: 10px; font-size: 11px; color: var(--text-2); font-family: var(--font-mono); }
/* 红涨绿跌（A股/港股习惯） */
.up { color: #f5483b; }
.down { color: #08a05a; }
.flat { color: var(--text-1); }

/* ============ 异动监控内联状态 ============ */
.wd-detail { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--border); display: flex; flex-direction: column; gap: 6px; }
.wd-row { display: flex; align-items: baseline; gap: 8px; font-size: 12px; color: var(--text-2); }
.wd-row > span:first-child { flex: none; width: 56px; color: var(--text-2); }
.wd-row .ok { color: var(--accent-emerald); font-weight: 650; }
.wd-row .bad { color: #f5483b; font-weight: 650; }
.wd-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.wd-chip { font-style: normal; font-size: 11px; padding: 1px 8px; border-radius: 999px; background: color-mix(in srgb, var(--theme-accent) 14%, transparent); color: var(--theme-accent); font-family: var(--font-mono); }

/* ============ 顶部滚动热点条 ============ */
.top-ticker { display: flex; align-items: center; gap: 12px; padding: 8px 18px; border-bottom: 1px solid var(--border); background: color-mix(in srgb, var(--theme-accent) 8%, var(--surface)); overflow: hidden; }
.top-ticker-label { flex: 0 0 auto; font-size: 12px; font-weight: 700; color: var(--theme-accent); letter-spacing: .3px; }
.top-ticker-viewport { flex: 1 1 auto; overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent); mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent); }
.top-ticker-track { display: inline-flex; gap: 30px; white-space: nowrap; animation: tt-scroll 48s linear infinite; }
.top-ticker-viewport:hover .top-ticker-track { animation-play-state: paused; }
@keyframes tt-scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.tt-item { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: var(--text-1); }
.tt-dot { color: var(--theme-accent); font-size: 8px; }
.tt-title { font-weight: 550; }
.tt-src { font-size: 11px; color: var(--text-2); font-family: var(--font-mono); }
.tt-item.tt-hot .tt-title { color: var(--theme-accent); }

/* ============ 时间线按天折叠 ============ */
.timeline-day-head { cursor: pointer; user-select: none; }
.day-fold { margin-left: 8px; border: none; background: transparent; color: var(--text-2); font-size: 12px; cursor: pointer; transition: transform .15s ease; transform: rotate(0deg); padding: 2px 6px; border-radius: 6px; }
.day-fold:hover { background: var(--surface-2); }
.timeline-day.collapsed .day-fold { transform: rotate(-90deg); }
.timeline-day.collapsed .timeline-day-items { display: none; }

/* ============ 分类 chips ============ */
.cat-chips { margin-top: 9px; }
.cat-chips .zone-chip { border-style: dashed; }
.cat-chips .zone-chip-on { border-style: solid; }

/* ============ 来源类型 chips ============ */
.type-chips { margin-top: 9px; }
.type-chips .type-chip { font-size: 11px; opacity: .92; }

/* ============ 历史回看 ============ */
.hist-wrap { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 18px; align-items: start; }
.hist-days { display: flex; flex-direction: column; gap: 6px; position: sticky; top: 12px; }
.hist-day {
  text-align: left; background: var(--surface-card); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 9px 11px; cursor: pointer; color: var(--text-1);
  display: flex; flex-direction: column; gap: 3px; transition: border-color .15s, background .15s;
}
.hist-day:hover { border-color: var(--theme-accent); }
.hist-day-on { border-color: var(--theme-accent); background: color-mix(in srgb, var(--theme-accent) 10%, transparent); }
.hd-date { font-size: 12.5px; font-weight: 600; font-family: var(--font-mono); }
.hd-meta { font-size: 10.5px; color: var(--text-2); }
.hist-list { min-width: 0; }
.hist-count { font-size: 12px; color: var(--text-2); font-family: var(--font-mono); margin-bottom: 10px; }
.hist-item {
  border-bottom: 1px solid var(--border); padding: 10px 2px; display: flex; flex-direction: column; gap: 5px;
}
.hi-title { font-size: 13.5px; line-height: 1.5; color: var(--text-1); text-decoration: none; }
.hi-title:hover { color: var(--theme-accent); }
.hi-meta { display: flex; align-items: center; gap: 8px; font-size: 11px; color: var(--text-2); flex-wrap: wrap; }
.hi-desc { font-size: 12px; color: var(--text-2); line-height: 1.55; margin: 0; }
.hist-tag { font-size: 10px; padding: 1px 6px; border-radius: 999px; font-family: var(--font-mono); }
.hist-tag-mm { background: color-mix(in srgb, #12ccd8 18%, transparent); color: #12ccd8; }
.hist-tag-zp { background: color-mix(in srgb, #a78bfa 20%, transparent); color: #a78bfa; }

/* ============ AI 日报 ============ */
.daily-wrap { display: flex; flex-direction: column; gap: 18px; }
.daily-card {
  border: 1px solid var(--border); border-radius: var(--radius-md);
  background: var(--surface-card); padding: 18px 20px;
}
.daily-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 12px; }
.daily-head h2 { font-size: 16px; margin: 0; }
.daily-date { font-size: 11.5px; color: var(--text-2); }
.daily-sec { margin-top: 12px; }
.daily-sec h3 { font-size: 12.5px; color: var(--theme-accent); margin: 0 0 6px; font-weight: 600; }
.daily-sec ul { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 5px; }
.daily-sec li { font-size: 12.5px; line-height: 1.55; }
.daily-sec a { color: var(--text-1); text-decoration: none; }
.daily-sec a:hover { color: var(--theme-accent); }
.daily-src { font-size: 10.5px; color: var(--text-2); }
.daily-stats { margin-top: 14px; padding-top: 10px; border-top: 1px solid var(--border); font-size: 11px; color: var(--text-2); }

/* ============ 标的主题 ============ */
.topic-card { text-align: left; cursor: pointer; font-family: inherit; }
.topic-num { font-size: 22px !important; font-weight: 700; font-family: var(--font-mono); margin: 6px 0 2px !important; }
.topic-num span { font-size: 11px; font-weight: 400; color: var(--text-2); font-family: var(--font-body); }
.topic-mm h3 { color: #12ccd8; }
.topic-zp h3 { color: #a78bfa; }
.topic-mm { border-color: color-mix(in srgb, #12ccd8 45%, var(--border)); }
.topic-zp { border-color: color-mix(in srgb, #a78bfa 45%, var(--border)); }

/* ============ 模型榜 ============ */
.board-list { display: flex; flex-direction: column; gap: 8px; }
.board-row {
  display: grid; grid-template-columns: 34px minmax(120px, 170px) minmax(0, 1fr) 52px 74px;
  align-items: center; gap: 12px; padding: 10px 12px;
  border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-card);
}
.board-rank { font-family: var(--font-mono); font-size: 12px; color: var(--text-2); }
.board-name { font-size: 13px; font-weight: 600; }
.board-bar { height: 8px; border-radius: 999px; background: color-mix(in srgb, var(--text-2) 18%, transparent); overflow: hidden; }
.board-bar i { display: block; height: 100%; border-radius: 999px; background: var(--theme-accent); }
.board-n { font-size: 13px; text-align: right; font-weight: 600; }
.board-peak { font-size: 10.5px; color: var(--text-2); text-align: right; }
.board-row.topic-mm .board-bar i { background: #12ccd8; }
.board-row.topic-zp .board-bar i { background: #a78bfa; }

/* ============ Agent 接入 ============ */
.agent-note { font-size: 12.5px; color: var(--text-2); margin-bottom: 14px; }
.agent-list { display: flex; flex-direction: column; gap: 8px; }
.agent-row {
  display: grid; grid-template-columns: minmax(180px, 260px) minmax(0, 1fr); gap: 12px;
  align-items: center; padding: 11px 13px;
  border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-card);
}
.agent-info { display: flex; flex-direction: column; gap: 3px; }
.agent-info strong { font-size: 13px; }
.agent-desc { font-size: 11px; color: var(--text-2); line-height: 1.45; }
.agent-url {
  font-family: var(--font-mono); font-size: 11.5px; color: var(--theme-accent);
  background: color-mix(in srgb, var(--theme-accent) 10%, transparent);
  padding: 6px 9px; border-radius: 6px; overflow-x: auto; white-space: nowrap;
}
/* Agent 服务状态徽标 */
.agent-status { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 8px; margin-bottom: 16px; }
.status-badge {
  display: flex; align-items: center; gap: 9px; padding: 10px 12px;
  border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-card);
}
.status-badge .dot { width: 8px; height: 8px; border-radius: 50%; flex: 0 0 auto; }
.dot-ok { background: #2ecc71; box-shadow: 0 0 0 3px color-mix(in srgb, #2ecc71 22%, transparent); }
.status-badge strong { display: block; font-size: 12.5px; }
.status-badge span { font-size: 10.5px; color: var(--text-2); line-height: 1.4; }
/* Agent 通道分组 */
.agent-ch { margin-bottom: 16px; }
.agent-ch-h { font-size: 12.5px; font-weight: 600; color: var(--theme-accent); margin-bottom: 4px; }
.agent-ch-d { font-size: 11.5px; color: var(--text-2); margin-bottom: 9px; line-height: 1.5; }
.agent-url-row { display: flex; align-items: center; gap: 8px; min-width: 0; }
.agent-url-row .agent-url { flex: 1 1 auto; min-width: 0; }
.agent-copy {
  font-family: inherit; font-size: 11px; cursor: pointer; flex: 0 0 auto;
  padding: 5px 10px; border: 1px solid var(--border); border-radius: 6px;
  background: transparent; color: var(--text-2);
}
.agent-copy:hover { border-color: var(--theme-accent); color: var(--theme-accent); }
/* llms.txt 直达 */
.agent-llms {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 14px; margin-bottom: 16px;
  border: 1px solid color-mix(in srgb, var(--theme-accent) 40%, var(--border));
  border-radius: var(--radius-sm); background: color-mix(in srgb, var(--theme-accent) 8%, transparent);
}
.agent-llms strong { font-size: 12.5px; }
.agent-llms a { color: var(--theme-accent); font-weight: 600; text-decoration: none; font-size: 12px; }
.agent-llms a:hover { text-decoration: underline; }
.agent-llms span { font-size: 11.5px; color: var(--text-2); }
/* 恢复指引 */
.agent-recover {
  border: 1px dashed var(--border); border-radius: var(--radius-sm);
  padding: 12px 14px; background: var(--surface-card);
}
.agent-recover h4 { font-size: 12.5px; margin: 0 0 6px; }
.agent-recover ul { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; }
.agent-recover li { font-size: 11.5px; color: var(--text-2); line-height: 1.55; }
.agent-recover code { font-family: var(--font-mono); font-size: 11px; color: var(--theme-accent); }
.agent-recover a { color: var(--theme-accent); }

/* ============ 日报两栏布局（对标 AIHOT /daily 右栏归档）============ */
.daily-layout { display: flex; flex-direction: column; gap: 18px; }
.daily-layout.is-daily { flex-direction: row; align-items: flex-start; }
.daily-main { flex: 1 1 auto; min-width: 0; }
.daily-archive {
  flex: 0 0 232px; position: sticky; top: 16px;
  border: 1px solid var(--border); border-radius: var(--radius-md);
  background: var(--surface-card); padding: 14px;
  max-height: calc(100vh - 40px); overflow-y: auto;
}
.da-title { font-size: 12px; font-weight: 600; color: var(--text-2); margin-bottom: 10px; letter-spacing: .04em; }
.da-months { display: flex; flex-direction: column; gap: 12px; }
.da-month-h { font-size: 11px; color: var(--text-2); margin-bottom: 6px; }
.da-days { display: flex; flex-wrap: wrap; gap: 5px; }
.da-day {
  display: inline-flex; align-items: center; gap: 4px; cursor: pointer;
  font-family: inherit; font-size: 12px; padding: 3px 8px; border-radius: 6px;
  border: 1px solid var(--border); background: transparent; color: var(--text-1);
}
.da-day:hover { border-color: var(--theme-accent); color: var(--theme-accent); }
.da-day-on {
  background: color-mix(in srgb, var(--theme-accent) 16%, transparent);
  border-color: var(--theme-accent); color: var(--theme-accent); font-weight: 600;
}
.da-day-c { font-size: 10px; color: var(--text-2); }
.da-day-on .da-day-c { color: var(--theme-accent); }
.daily-nav { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.daily-nav-btn {
  font-family: inherit; font-size: 12px; cursor: pointer; padding: 5px 12px;
  border: 1px solid var(--border); border-radius: 999px; background: var(--surface-card); color: var(--text-1);
}
.daily-nav-btn:hover:not([disabled]) { border-color: var(--theme-accent); color: var(--theme-accent); }
.daily-nav-btn[disabled] { opacity: .4; cursor: default; }
.daily-nav-cur { font-size: 12px; color: var(--text-2); }
@media (max-width: 860px) {
  .daily-layout.is-daily { flex-direction: column; }
  .daily-archive { position: static; flex: 1 1 auto; width: 100%; max-height: none; }
}

/* ============ 热门搜索 / 命中高亮 ============ */
.hot-words { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.hw-label { font-size: 11px; color: var(--text-2); }
.hw-chip {
  font-size: 11px; padding: 2px 9px; border-radius: 999px; cursor: pointer;
  border: 1px dashed var(--border); background: transparent; color: var(--text-2);
  font-family: inherit;
}
.hw-chip:hover { border-color: var(--theme-accent); color: var(--theme-accent); border-style: solid; }
.hw-chip .n { font-family: var(--font-mono); font-size: 10px; opacity: .75; }
mark.hl {
  background: color-mix(in srgb, var(--theme-accent) 30%, transparent);
  color: inherit; padding: 0 1px; border-radius: 2px;
}

/* ============ 关于 / 隐私 / 条款 ============ */
.about-wrap { display: flex; flex-direction: column; gap: 14px; max-width: 880px; }
.about-card {
  border: 1px solid var(--border); border-radius: var(--radius-md);
  background: var(--surface-card); padding: 16px 18px;
}
.about-card h2 { font-size: 14px; margin: 0 0 10px; }
.about-card p { font-size: 12.5px; line-height: 1.7; color: var(--text-1); margin: 0 0 6px; }
.about-card ul { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 5px; }
.about-card li { font-size: 12.5px; line-height: 1.65; color: var(--text-2); }
.about-card b { color: var(--text-1); }
.about-note { font-size: 11.5px !important; color: var(--text-2) !important; margin-top: 8px; }

/* ============ 日 K 线 ============ */
.kline-section { margin-top: 24px; }
.kline-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.kline-head h2 { font-size: 14px; margin: 0; }
.kline-note { font-size: 11px; color: var(--text-2); }
.kline-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(360px, 1fr)); gap: 14px; }
.kline-card {
  border: 1px solid var(--border); border-radius: var(--radius-md);
  background: var(--surface-card); padding: 12px 14px; min-width: 0;
}
.kline-title {
  font-size: 13px; font-weight: 600; display: flex; align-items: baseline;
  gap: 8px; margin-bottom: 8px; flex-wrap: wrap;
}
.kline-title .mono { font-size: 10.5px; color: var(--text-2); font-weight: 400; }
.kline-range { font-size: 10px; color: var(--text-2); margin-left: auto; font-weight: 400; }
.kline-chart { width: 100%; height: 270px; }

/* ============ 移动端底部导航 ============ */
.mnav { display: none; }
@media (max-width: 880px) {
  .sidebar { display: none !important; }
  .app-shell-main { display: block !important; }
  .mnav {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
    background: var(--surface-card); border-top: 1px solid var(--border);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom, 0px));
  }
  .mnav-item {
    flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px;
    font-size: 10.5px; color: var(--text-2); text-decoration: none; padding: 5px 0; border-radius: 8px;
  }
  .mnav-item span { font-size: 16px; line-height: 1; }
  .mnav-item-on { color: var(--theme-accent); background: color-mix(in srgb, var(--theme-accent) 12%, transparent); }
  .app-main { padding-bottom: 76px; }
  .hist-wrap { grid-template-columns: 1fr; }
  .board-row { grid-template-columns: 28px minmax(0, 1fr) 44px; }
  .board-bar, .board-peak { display: none; }
  .agent-row { grid-template-columns: 1fr; }
  .zone-chips { overflow-x: auto; flex-wrap: nowrap; padding-bottom: 4px; }
  .zone-chips .zone-chip { white-space: nowrap; }
}

/* ============ 事件日历（v11）============ */
.calendar-page { max-width: 980px; margin: 0 auto; padding: 4px 2px 18px; }
.cal-toolbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 4px 0 14px; }
.cal-nav { width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--border-strong); background: var(--surface-card); color: var(--text-1); font-size: 18px; line-height: 1; cursor: pointer; }
.cal-nav:disabled { opacity: .35; cursor: default; }
.cal-title { font-size: 15px; font-weight: 650; color: var(--text-0); min-width: 120px; text-align: center; }
.cal-legend { margin-left: auto; font-size: 11px; color: var(--text-2); display: inline-flex; align-items: center; gap: 4px; }
.cal-dot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; vertical-align: -1px; margin: 0 2px; }
.cal-dot.cal-int-1 { background: color-mix(in srgb, var(--theme-accent) 22%, transparent); }
.cal-dot.cal-int-2 { background: color-mix(in srgb, var(--theme-accent) 45%, transparent); }
.cal-dot.cal-int-3 { background: color-mix(in srgb, var(--theme-accent) 78%, transparent); }
.cal-weekdays { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin-bottom: 6px; }
.cal-weekdays span { text-align: center; font-size: 11px; color: var(--text-2); font-weight: 600; }
.cal-cells { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cal-cell { position: relative; aspect-ratio: 1 / 0.82; border-radius: 10px; border: 1px solid var(--border); background: var(--surface-card); display: flex; flex-direction: column; justify-content: space-between; padding: 7px 8px; font-size: 12px; color: var(--text-1); }
.cal-cell.cal-empty { background: transparent; border: none; }
.cal-cell.has-events { cursor: pointer; border-color: color-mix(in srgb, var(--theme-accent) 30%, var(--border)); }
.cal-cell.has-events:hover { border-color: var(--theme-accent); }
.cal-cell.cal-int-1 { background: color-mix(in srgb, var(--theme-accent) 12%, var(--surface-card)); }
.cal-cell.cal-int-2 { background: color-mix(in srgb, var(--theme-accent) 24%, var(--surface-card)); }
.cal-cell.cal-int-3 { background: color-mix(in srgb, var(--theme-accent) 42%, var(--surface-card)); }
.cal-cell.cal-future { opacity: .4; }
.cal-cell.cal-sel { outline: 2px solid var(--theme-accent); outline-offset: 1px; }
.cal-d { font-weight: 600; color: var(--text-0); }
.cal-c { font-family: var(--font-mono); font-size: 11px; color: var(--text-1); align-self: flex-end; }
.cal-day-panel { margin-top: 18px; }
.cal-day-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; font-size: 14px; color: var(--text-0); }
.cal-clear { margin-left: auto; border: 1px solid var(--border-strong); background: var(--surface-card); color: var(--text-1); border-radius: 7px; padding: 3px 10px; cursor: pointer; }
.cal-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
@media (max-width: 520px) {
  .cal-cells, .cal-weekdays { gap: 4px; }
  .cal-cell { padding: 5px; font-size: 11px; border-radius: 8px; }
  .cal-c { font-size: 10px; }
  .cal-legend { display: none; }
}


/* ============ AI 周报 / 月报（对标 AIHOT /weekly 、/monthly）============ */
.period-chip { font-weight: 600; }
.period-list {
  display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 14px;
}
.period-item {
  flex: none; display: flex; flex-direction: column; gap: 2px; align-items: flex-start;
  padding: 7px 12px; border-radius: 9px; cursor: pointer;
  border: 1px solid var(--border-strong); background: var(--surface-card); color: var(--text-1);
}
.period-item:hover { border-color: var(--theme-accent); }
.period-item-on {
  border-color: var(--theme-accent); color: var(--text-0);
  background: color-mix(in srgb, var(--theme-accent) 14%, var(--surface-card));
}
.pi-key { font-size: 12px; font-weight: 600; }
.pi-meta { font-size: 10.5px; color: var(--text-2); font-family: var(--font-mono); }
.period-word { font-size: 11.5px; }

/* 事件生命周期状态（对标 AIHOT /hot「发酵中」）。基础 .hot-status 来自 aihot-base.css */
.hot-status-cooling { color: var(--accent-emerald-fg); background: color-mix(in srgb, var(--accent-emerald) 12%, transparent); }
.hot-status-steady { color: var(--text-1); background: color-mix(in srgb, var(--text-1) 12%, transparent); }
.heat-metrics { display: flex; gap: 14px; flex-wrap: wrap; font-family: var(--font-mono); font-size: 11.5px; color: var(--text-1); margin-top: 8px; }
.heat-metrics b { color: var(--text-0); font-weight: 600; }
.tl-report { display: flex; flex-direction: column; gap: 7px; margin-top: 6px; }
.tl-report-row { display: flex; gap: 9px; align-items: baseline; font-size: 12.5px; line-height: 1.5; }
.tl-report-row time { flex: none; font-family: var(--font-mono); font-size: 10.5px; color: var(--text-2); min-width: 42px; }
.tl-report-row a { flex: 1 1 auto; min-width: 0; color: var(--text-1); text-decoration: none; }
.tl-report-row a:hover { color: var(--theme-accent); }
.tl-report-src { flex: none; font-size: 10.5px; color: var(--text-2); }
/* 窄屏：标题独占一行，避免被 time/src 挤成逐字换行（实测 375px 下每行只有 4 个字）*/
@media (max-width: 620px) {
  .tl-report-row { flex-wrap: wrap; row-gap: 2px; }
  .tl-report-row a { flex: 1 1 100%; order: 3; }
}
.tl-report-fp { flex: none; font-size: 9.5px; padding: 0 5px; border-radius: 3px; font-weight: 650;
  color: var(--accent-cyan-fg); background: color-mix(in srgb, var(--accent-cyan) 12%, transparent); }
.related-events { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; }
.related-events a { font-size: 12.5px; color: var(--text-1); text-decoration: none; }
.related-events a:hover { color: var(--theme-accent); }

/* 轻提示（复制/导出反馈） */
.mm-toast {
  position: fixed; left: 50%; bottom: 88px; transform: translateX(-50%) translateY(8px);
  padding: 8px 16px; border-radius: 999px; font-size: 12.5px; z-index: 300;
  background: var(--surface-elevated); color: var(--text-0);
  border: 1px solid var(--border-strong); box-shadow: var(--shadow-soft);
  opacity: 0; pointer-events: none; transition: opacity .18s, transform .18s;
}
.mm-toast.is-on { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ============================================================
   v7：逐页对标 AIHOT 的补充样式
   - AI 评分 / 精选 徽标、原文外链、推荐理由
   - 热榜迷你趋势线（sparkline）
   - 日报杂志式排版
   - 更新日志红点、历史回看分页
   ============================================================ */

/* ---- AI 评分徽标（aihot_score，满分 100）---- */
.ai-score {
  display: inline-flex; align-items: center; gap: 3px;
  font-family: var(--font-mono); font-size: 10.5px; line-height: 15px;
  padding: 0 6px; border-radius: 5px; white-space: nowrap;
  border: 1px solid transparent;
}
.ai-score.score-hi {
  color: var(--accent-cyan-fg);
  background: color-mix(in srgb, var(--accent-cyan) 14%, transparent);
  border-color: color-mix(in srgb, var(--accent-cyan) 34%, transparent);
}
.ai-score.score-mid {
  color: var(--accent-amber-fg);
  background: color-mix(in srgb, var(--accent-amber) 14%, transparent);
  border-color: color-mix(in srgb, var(--accent-amber) 32%, transparent);
}
.ai-score.score-lo {
  color: var(--text-2); background: var(--surface-1); border-color: var(--border);
}

/* ---- 「精选」徽标 ---- */
.sel-badge {
  flex: none; font-size: 10px; line-height: 15px; padding: 0 5px; border-radius: 4px;
  color: var(--accent-amber-fg);
  background: color-mix(in srgb, var(--accent-amber) 15%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent-amber) 30%, transparent);
  white-space: nowrap;
}

/* ---- 原文外链（origin_url，直达媒体原文而不是 Google News 跳转壳）---- */
.origin-link {
  font-size: 10.5px; color: var(--text-2); text-decoration: none; white-space: nowrap;
  border-bottom: 1px dashed color-mix(in srgb, var(--text-2) 55%, transparent);
}
.origin-link:hover { color: var(--theme-accent); border-bottom-color: var(--theme-accent); }

/* ---- 推荐理由（aihot_reason）---- */
.hot-reason {
  margin: 6px 0 0; padding: 5px 10px;
  font-size: 12px; line-height: 1.62; color: var(--text-1);
  background: var(--surface-1);
  border-left: 2px solid color-mix(in srgb, var(--theme-accent) 42%, transparent);
  border-radius: 0 5px 5px 0;
}
.hot-reason b { color: var(--theme-accent); font-weight: 600; }

/* ---- 热榜右侧：热度数字 + 迷你趋势线（对标竞品 /hot 的 sparkline）---- */
.hot-rank-heat { gap: 4px; }
.spark-svg { display: block; opacity: .92; }
.spark-empty { font-size: 9.5px; color: var(--text-2); white-space: nowrap; }

/* ---- 更新日志「有新版本」红点 ---- */
.nav-dot {
  margin-left: auto; flex: none; width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent-rose);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent-rose) 24%, transparent);
}

/* ---- 日报 / 周报 / 月报：杂志式排版 ---- */
.daily-read { font-size: 11.5px; color: var(--text-2); margin: -2px 0 12px; }
.daily-entry {
  display: grid; grid-template-columns: 30px 1fr; gap: 8px;
  padding: 13px 0; border-top: 1px solid var(--border);
}
.daily-sec > .daily-entry:first-of-type { border-top: 0; padding-top: 4px; }
.de-no { font-size: 12px; color: var(--text-2); font-weight: 600; padding-top: 3px; }
.de-top { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; margin-bottom: 4px; }
.de-cat {
  font-size: 10.5px; line-height: 16px; padding: 0 5px; border-radius: 4px;
  color: var(--accent-amber-fg);
  background: color-mix(in srgb, var(--accent-amber) 13%, transparent);
}
.de-day, .de-n { font-size: 10.5px; color: var(--text-2); }
.de-title { margin: 0 0 5px; font-size: 14px; font-weight: 640; line-height: 1.45; }
.de-title a { color: var(--text-0); text-decoration: none; }
.de-title a:hover { color: var(--theme-accent); }
.de-sum { margin: 0 0 7px; font-size: 12.5px; line-height: 1.68; color: var(--text-1); }
.de-src { display: flex; align-items: center; gap: 9px; font-size: 11px; color: var(--text-2); }

/* ---- 历史回看：分页「加载更多」---- */
.hist-more {
  display: block; width: 100%; margin: 13px 0 4px; padding: 9px;
  background: var(--surface-1); border: 1px solid var(--border);
  border-radius: var(--radius-sm, 7px);
  color: var(--text-1); font-family: inherit; font-size: 12.5px; cursor: pointer;
  transition: border-color .15s ease, color .15s ease;
}
.hist-more:hover { border-color: var(--theme-accent); color: var(--theme-accent); }

/* 移动端：趋势线不占主位，与热度数字同排 */
@media (max-width: 720px) {
  .hot-rank-heat .spark-svg, .hot-rank-heat .spark-empty { display: none; }
}

/* ---------- 源渠道 chips（公众号 / 今日头条 / 公司官网 / 财报公告）----------
   与 .type-chips 并排两行：上排「渠道」（从哪来）、下排「来源类型」（是不是一手）。
   两排刻意用同款样式，避免视觉上主次不分（它们是正交的两维，不是层级关系）。 */
.cls-chips { margin-top: 9px; }
.cls-chips .cls-chip { font-size: 11px; opacity: .92; }
.cls-chips .cls-chip .n { opacity: .72; font-variant-numeric: tabular-nums; }
@media (max-width: 720px) {
  .cls-chips { margin-top: 7px; }
  .cls-chips .cls-chip { font-size: 10.5px; padding: 3px 7px; }
}

/* ============================================================================
   DSA 个股研报（v13，2026-09-20）
   数据源 dsa_research.json —— 宿主上的 dsa_bridge.py 只读桥接 DSA 工作台。
   版式：状态条 → 指标卡 → 分析报告 → 决策信号 → 持仓快照 → 策略库 → 自选。
   配色沿用全局口径：偏买入用红、偏卖出用绿（与行情卡红涨绿跌一致）。
   ============================================================================ */
.research-wrap { display: grid; gap: 16px; }

/* 离线圆点（.dot-ok 定义在基底，这里补反向状态） */
.dot-off { background: #e05252; box-shadow: 0 0 0 3px color-mix(in srgb, #e05252 22%, transparent); }

/* ---- 状态条 ---- */
.dsa-bar {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 10px 13px; border: 1px solid var(--border); border-radius: var(--radius-sm, 7px);
  background: var(--surface-1); font-size: 12.5px;
}
.dsa-bar .dot { width: 8px; height: 8px; border-radius: 50%; flex: 0 0 auto; }
.dsa-bar strong { font-size: 13px; color: var(--text-0); }
.dsa-bar-off { border-color: color-mix(in srgb, #e05252 34%, var(--border)); }
.dsa-bar-i { color: var(--text-2); }
.dsa-bar-i b { color: var(--text-0); font-weight: 600; }
.dsa-bar-t { margin-left: auto; color: var(--text-2); font-size: 11px; }

/* ---- 指标卡 ---- */
.dsa-metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 9px; }
.dsa-metric {
  display: grid; gap: 2px; padding: 10px 12px;
  border: 1px solid var(--border); border-radius: var(--radius-sm, 7px); background: var(--surface-1);
}
.dsa-metric-n { font-family: var(--font-mono); font-size: 18px; font-weight: 650; color: var(--text-0); font-variant-numeric: tabular-nums; }
.dsa-metric-l { font-size: 10.5px; color: var(--text-2); }

/* ---- 分区标题 ---- */
.dsa-sec { display: grid; gap: 9px; }
.dsa-sec-h { margin: 2px 0 0; font-size: 13.5px; font-weight: 650; color: var(--text-0); display: flex; align-items: baseline; gap: 8px; }
.dsa-sec-n { font-size: 10.5px; font-weight: 400; color: var(--text-2); font-family: var(--font-mono); }

/* ---- 分析报告卡 ---- */
.dsa-rep { padding: 12px 13px; border: 1px solid var(--border); border-radius: var(--radius-sm, 7px); background: var(--surface-1); }
.dsa-rep-h { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.dsa-rep-h h3 { margin: 0; font-size: 13.5px; font-weight: 650; color: var(--text-0); }
.dsa-code { font-size: 11px; color: var(--text-2); }
.dsa-rep-t { margin-left: auto; font-size: 10.5px; color: var(--text-2); }
.dsa-badge { font-size: 10.5px; padding: 1.5px 7px; border-radius: 5px; border: 1px solid var(--border); color: var(--text-1); }
.dsa-buy { color: #e05252; border-color: color-mix(in srgb, #e05252 40%, transparent); background: color-mix(in srgb, #e05252 10%, transparent); }
.dsa-sell { color: #2ecc71; border-color: color-mix(in srgb, #2ecc71 40%, transparent); background: color-mix(in srgb, #2ecc71 10%, transparent); }
.dsa-hold { color: var(--text-1); }
.dsa-score { font-size: 10.5px; font-family: var(--font-mono); color: var(--text-2); }
.dsa-rep-sum { margin: 8px 0 0; font-size: 12.5px; line-height: 1.65; color: var(--text-1); }
.dsa-rep-meta { margin-top: 7px; font-size: 11px; font-family: var(--font-mono); color: var(--text-2); }
.dsa-toggle {
  margin-top: 9px; padding: 5px 10px; font-size: 11.5px; font-family: inherit; cursor: pointer;
  background: transparent; border: 1px solid var(--border); border-radius: 6px; color: var(--theme-accent);
  transition: border-color .15s ease, background .15s ease;
}
.dsa-toggle:hover { border-color: var(--theme-accent); background: color-mix(in srgb, var(--theme-accent) 8%, transparent); }

/* 报告正文（内置极简 Markdown 渲染产物） */
.dsa-md {
  margin-top: 10px; padding: 11px 13px; max-height: 460px; overflow-y: auto;
  border-left: 2px solid var(--theme-accent); border-radius: 0 6px 6px 0;
  background: color-mix(in srgb, var(--surface-1) 70%, transparent);
  font-size: 12.5px; line-height: 1.7; color: var(--text-1);
}
.dsa-md h3, .dsa-md h4, .dsa-md h5, .dsa-md h6 { margin: 12px 0 5px; font-size: 12.5px; color: var(--text-0); }
.dsa-md h3:first-child, .dsa-md h4:first-child, .dsa-md h5:first-child { margin-top: 0; }
.dsa-md p { margin: 6px 0; }
.dsa-md ul { margin: 6px 0; padding-left: 18px; }
.dsa-md li { margin: 3px 0; }
.dsa-md code { font-family: var(--font-mono); font-size: 11.5px; background: var(--surface-1); padding: 1px 4px; border-radius: 4px; }

/* ---- 决策信号 ---- */
.dsa-sig { padding: 11px 13px; border: 1px solid var(--border); border-radius: var(--radius-sm, 7px); background: var(--surface-1); }
.dsa-sig-h { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12.5px; }
.dsa-conf { font-size: 10.5px; font-family: var(--font-mono); color: var(--text-2); }
.dsa-sig-plan { margin-top: 7px; font-size: 11.5px; color: var(--text-1); }
.dsa-sig-reason { margin: 7px 0 0; font-size: 12px; line-height: 1.6; color: var(--text-1); }
.dsa-sig-risk { margin: 5px 0 0; font-size: 11.5px; line-height: 1.6; color: var(--text-2); }

/* ---- 持仓 ---- */
.dsa-acct { margin-top: 9px; padding: 11px 13px; border: 1px solid var(--border); border-radius: var(--radius-sm, 7px); background: var(--surface-1); }
.dsa-acct-h { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12.5px; }
.dsa-acct-b { font-size: 10.5px; color: var(--text-2); }
.dsa-pos { margin-top: 8px; display: grid; gap: 1px; }
.dsa-pos-r {
  display: grid; grid-template-columns: 1.4fr 1fr .7fr 1fr 1fr; gap: 8px;
  padding: 6px 0; font-size: 11.5px; color: var(--text-1); border-top: 1px solid var(--border);
}
.dsa-pos-r:first-child { border-top: 0; }
.dsa-pos-n { color: var(--text-0); }
.dsa-pos-v, .dsa-pos-p, .dsa-pos-q { text-align: right; font-variant-numeric: tabular-nums; }
.dsa-pos-q { color: var(--text-2); }
.dsa-pos-empty { margin: 8px 0 0; font-size: 11.5px; color: var(--text-2); }

/* ---- 策略库 ---- */
.dsa-skills { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.dsa-skill { display: grid; gap: 3px; padding: 9px 11px; border: 1px solid var(--border); border-radius: var(--radius-sm, 7px); background: var(--surface-1); }
.dsa-skill b { font-size: 12px; color: var(--text-0); }
.dsa-skill span { font-size: 11px; line-height: 1.55; color: var(--text-2); }

/* ---- 自选队列 ---- */
.dsa-watch { display: flex; flex-wrap: wrap; gap: 7px; }
.dsa-w-chip { font-size: 11.5px; padding: 4px 9px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface-1); color: var(--text-0); }
.dsa-w-empty { color: var(--text-2); }

/* ---- 空态（诚实说明，不填假数据）---- */
.dsa-empty {
  padding: 20px 18px; text-align: center;
  border: 1px dashed var(--border); border-radius: var(--radius-sm, 7px);
  background: color-mix(in srgb, var(--surface-1) 55%, transparent);
}
.dsa-empty strong { display: block; margin-bottom: 7px; font-size: 13px; color: var(--text-0); }
.dsa-empty p { margin: 5px 0; font-size: 12px; line-height: 1.7; color: var(--text-2); }
.dsa-empty code { font-family: var(--font-mono); font-size: 11px; background: var(--surface-1); padding: 1px 4px; border-radius: 4px; }
.dsa-empty-sm { padding: 14px 16px; }

/* ---- 移动端 ---- */
@media (max-width: 720px) {
  .dsa-bar { gap: 8px; font-size: 11.5px; }
  .dsa-bar-t { margin-left: 0; width: 100%; }
  .dsa-metrics { grid-template-columns: repeat(auto-fit, minmax(84px, 1fr)); }
  .dsa-metric-n { font-size: 15px; }
  .dsa-rep-t { margin-left: 0; width: 100%; }
  .dsa-pos-r { grid-template-columns: 1.3fr .9fr 1fr 1fr; }
  .dsa-pos-q { display: none; }
  .dsa-md { max-height: 320px; }
}
