/* ═════════════════════════════════════════════════════════════════════
   永赢电商指数内容运营 · 设计系统 v5
   一套变量管到底：字号 7 档、中性色 4 阶文字 + 5 阶表面、1 个品牌强调色、控件 2 种高度、圆角 5 档、阴影 3 档
   基础   shadcn/ui neutral 主题与组件尺寸（按钮、输入框、标签页、徽章、表格、抽屉、提示），换算为原生 CSS
   表面   Beautiful UI：白卡片 + 1px 描边 + 极轻阴影，冷灰底色，数字等宽
   动效   Transitions.dev 配方：悬停 150ms、按压 100ms、菜单 180ms、抽屉 220ms，统一 ease-out
   数据   BeUI：固定表头、低干扰变化提示、热力格；不做数字翻滚与整表入场
   层级   品牌名 15/600 ＞ 页面标题 16/600（设置页）＞ 区块标题 13/600 ＞ 导航与正文 13/500·400 ＞ 表头与说明 12 ＞ 代码 11
   对比度 正文与说明 ≥ 4.5:1（说明色在所有底色上 ≥ 4.5）；红绿只表示涨跌与高低（红涨绿跌，估值、新高这类位置红高绿低），等待与故障用琥珀色 + 图标 + 文字
   焦点   焦点框只给键盘用户（按 Tab 后出现，点一下即收起），中性灰；开关等状态控件用墨色，橙色只留给当前位置、主要操作与可关注
   ═════════════════════════════════════════════════════════════════════ */

@font-face { font-family: "Geist"; src: url("/fonts/Geist-Variable.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url("/fonts/GeistMono-Variable.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }

:root {
  /* 奖牌（全市场名次前 3，盘中异动的胶囊和全市场榜的名次列共用）：金、银、铜各三段渐变 + 深色字 */
  --gold-1: #fbe7a1; --gold-2: #e9b93b; --gold-3: #c8911a; --gold-t: #5f4100;
  --silver-1: #f4f6f8; --silver-2: #cfd6de; --silver-3: #9aa5b1; --silver-t: #334155;
  --bronze-1: #f8d6ba; --bronze-2: #df9a64; --bronze-3: #b36a37; --bronze-t: #5a2c0c;
  color-scheme: light;

  /* 表面：页面底 → 卡片 → 卡片内次级区 → 悬停 → 按下 / 控件底槽 */
  --page: #f7f7f8;
  --surface: #ffffff;
  --inset: #fafafa;
  --hover: #f4f4f5;
  --hover-2: #e9e9ec;
  --canvas: #efeff1;
  /* 描边：控件与卡片 / 输入框悬停 / 表格行分隔 */
  --line: #e4e4e7;
  --line-strong: #d4d4d8;
  --line-soft: #f0f0f2;
  /* 文字：正文与数值 / 次要正文 / 说明与表头（所有底色上 ≥ 4.5:1）/ 图标、占位、禁用 */
  --ink: #18181b;
  --ink-2: #3f3f46;
  --ink-3: #6b6b74;
  --ink-4: #a1a1aa;

  /* 品牌：永赢橙，只用于当前位置、主要操作与可关注；实心按钮用深一档（白字 ≥ 4.5:1） */
  --brand: #fd4a0c; --brand-strong: #c93b0a; --brand-hover: #b0340a; --brand-text: #c2410c;
  --brand-tint: #fff4ee; --brand-line: #ffd6c4; --brand-ring: rgba(253, 74, 12, 0.18);

  /* 行情：红涨绿跌；等待与故障：琥珀 */
  --up-mark: #e5484d; --up: #d6333a; --up-strong: #c92a31; --up-ink: #a51f26;
  --down-mark: #18a058; --down: #0f8544; --down-strong: #0b7a3e; --down-ink: #0a6a36;
  --warn: #9a5b00; --warn-tint: #fdf6e7; --warn-line: #f0d9a8;

  /* 字体与字号：11 代码 / 12 说明与表头 / 13 正文与控件 / 14 登录输入 / 15 品牌 / 16 标题 / 20 大数字 */
  --font-sans: "Geist", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei UI", "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif;
  --font-mono: "Geist Mono", "SF Mono", ui-monospace, "PingFang SC", "Microsoft YaHei", monospace;
  --fs-11: 11px; --fs-12: 12px; --fs-13: 13px; --fs-14: 14px; --fs-15: 15px; --fs-16: 16px; --fs-20: 20px;

  /* 尺寸：控件 32 / 小控件 28 / 徽章 22；表头 38 / 行 44 */
  --h-ctl: 32px; --h-sm: 28px; --h-badge: 22px; --h-th: 38px; --row: 44px;
  /* 圆角：4 标签 / 6 徽章与小控件 / 8 控件 / 12 卡片 / 16 弹窗；pill 胶囊 */
  --r-xs: 4px; --r-chip: 6px; --r-ctl: 8px; --r-card: 12px; --r-win: 16px; --r-pill: 999px;
  /* 阴影：描边即阴影（卡片、按钮）/ 浮层（菜单）：Beautiful UI 五层超淡投影 / 弹窗与登录卡 */
  --sh-btn: 0 0 0 1px var(--line), 0 1px 2px rgba(24, 24, 27, 0.05);
  --sh-card: 0 0 0 1px var(--line), 0 1px 2px rgba(24, 24, 27, 0.04);
  --sh-md: 0 0 0 1px rgba(24, 24, 27, 0.08), 0 25px 50px rgba(0, 0, 0, 0.05), 0 12px 24px rgba(0, 0, 0, 0.04), 0 6px 12px rgba(0, 0, 0, 0.03), 0 3px 6px rgba(0, 0, 0, 0.02), 0 1.5px 3px rgba(0, 0, 0, 0.02);
  --sh-lg: 0 0 0 1px rgba(24, 24, 27, 0.06), 0 24px 64px -12px rgba(24, 24, 27, 0.24);
  /* 焦点：键盘焦点框 / 输入框聚焦环，都用中性灰 */
  --focus: #71717a;
  --ring: 0 0 0 1px var(--ink-4), 0 0 0 3px rgba(161, 161, 170, 0.28);

  /* 动效 */
  --dur-micro: 100ms; --dur-quick: 150ms; --dur-menu: 180ms; --dur-sheet: 220ms; --dur-fast: 250ms;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);

  --z-sticky: 20; --z-top: 40; --z-menu: 60; --z-dialog: 100; --z-toast: 120; --z-tip: 140;
  --topbar: 56px;                   /* 品牌行 */
  --tabbar: 44px;                   /* 导航行：四个页面 + 当前页说明与操作 */
  --head: calc(var(--topbar) + var(--tabbar));
  --chrome: var(--head);            /* 顶栏（+ 状态条）占用的高度：表格滚动区不被遮挡 */
  --wrap: 1480px;
}

/* ─── 基础 ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
html { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility; -webkit-text-size-adjust: 100%; scrollbar-gutter: stable; }
/* 换行时避免最后一行只剩一两个字（text-wrap: pretty）；本来就不换行的文字（white-space: nowrap）不受影响 */
body { font: 400 var(--fs-13) / 1.54 var(--font-sans); color: var(--ink); background: var(--page); min-height: 100dvh; text-wrap: pretty; }
body.sheet-open { overflow: hidden; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; }
button:disabled { cursor: not-allowed; }
a { color: inherit; text-decoration: none; }
::selection { background: color-mix(in oklab, var(--brand) 18%, white); }
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: var(--r-chip); }
/* 鼠标、手指操作不显示焦点框：只有按过 Tab（html[data-kbd]）才显示；输入框另有聚焦环 */
html:not([data-kbd]) :where(a, button, summary, [tabindex]):focus-visible { outline: none; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 8px; border: 3px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background: var(--ink-4); background-clip: padding-box; }
.mono { font-family: var(--font-mono); font-size: calc(1em - 1px); letter-spacing: -0.01em; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.sr-focusable:focus { position: fixed; left: 12px; top: 8px; width: auto; height: auto; clip: auto; z-index: 200; padding: 6px 10px; border-radius: var(--r-ctl); background: var(--surface); box-shadow: var(--sh-md); }
.up { color: var(--up); } .down { color: var(--down); } .flat { color: var(--ink-3); }
.c-brand { color: var(--brand-text); }
.muted { color: var(--ink-3); }
.small { font-size: var(--fs-12); }
.warn { color: var(--warn); }
.ic { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.ic.fill { fill: currentColor; }
.ic-sm { width: 14px; height: 14px; }
.ic-xs { width: 12px; height: 12px; stroke-width: 2; }
.spin { animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.dot-sep { margin: 0 8px; color: var(--line-strong); }

/* ─── 顶栏：第一行品牌、市场状态、设置、账号；第二行四个页面，右侧是当前页的说明与操作（页面不再重复标题） ─── */
.topbar { position: sticky; top: 0; z-index: var(--z-top); background: color-mix(in oklab, var(--surface) 94%, transparent); backdrop-filter: saturate(1.6) blur(14px); -webkit-backdrop-filter: saturate(1.6) blur(14px); box-shadow: 0 1px 0 var(--line); }
.topbar-in { max-width: var(--wrap); height: var(--topbar); margin: 0 auto; padding: 0 24px; display: flex; align-items: center; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; white-space: nowrap; color: var(--ink); }
.brand img { width: 24px; height: 24px; display: block; }
.brand b { font-size: var(--fs-15); font-weight: 600; letter-spacing: -0.01em; }
.topbar .right { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.tabbar { box-shadow: inset 0 1px 0 var(--line-soft); }
.tabbar-in { max-width: var(--wrap); height: var(--tabbar); margin: 0 auto; padding: 0 24px; display: flex; align-items: center; gap: 20px; }
.pagebar { flex: 1; min-width: 0; display: flex; justify-content: flex-end; }
.pb { display: flex; align-items: center; justify-content: flex-end; gap: 14px; min-width: 0; }
.pb .head-meta { flex: 0 1 auto; }

/* 导航：13px 中等字重，小于品牌名；当前页靠文字颜色 + 品牌色下划线，悬停浅底跟随（Transitions.dev tabs） */
.nav { position: relative; flex: none; display: flex; align-items: center; gap: 2px; height: 100%; margin-left: -10px; overflow: clip; }
.nav-item { position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 6px; height: var(--h-ctl); padding: 0 10px; border-radius: var(--r-ctl); font-size: var(--fs-13); font-weight: 500; color: var(--ink-3); white-space: nowrap; transition: color var(--dur-quick) var(--ease-out); }
.nav-item:hover, .nav-item.is-active { color: var(--ink); }
.nav-item:focus-visible { outline-offset: -2px; }
/* 导航分两组：看自己跟踪的指数（盘中异动、连涨连跌、量价估值）和全市场榜，中间一道竖线；每项带图标，当前页图标是品牌橙 */
.nav-item > .ic { color: var(--ink-4); transition: color var(--dur-quick) var(--ease-out); }
.nav-item:hover > .ic { color: var(--ink-2); }
.nav-item.is-active > .ic { color: var(--brand); }
.nav-sep { flex: none; width: 1px; height: 16px; margin: 0 8px; background: var(--line); }
/* 右上角「预警记录」：记录页，和设置、账号并排，不占主导航 */
.rec-btn { display: inline-flex; align-items: center; gap: 6px; height: var(--h-ctl); padding: 0 10px; border-radius: var(--r-ctl); font-size: var(--fs-13); font-weight: 500; white-space: nowrap; color: var(--ink-2); transition: color var(--dur-quick) var(--ease-out), background var(--dur-quick) var(--ease-out); }
.rec-btn > .ic { color: var(--ink-3); transition: color var(--dur-quick) var(--ease-out); }
.rec-btn:hover { color: var(--ink); background: var(--hover); }
.rec-btn:hover > .ic { color: var(--ink-2); }
.rec-btn.is-active { color: var(--ink); background: var(--hover); }
.rec-btn.is-active > .ic { color: var(--brand); }
.nav-hover { position: absolute; top: calc((var(--tabbar) - var(--h-ctl)) / 2); left: 0; height: var(--h-ctl); width: 0; border-radius: var(--r-ctl); background: var(--hover); opacity: 0; pointer-events: none; transition: transform var(--dur-menu) var(--ease-out), width var(--dur-menu) var(--ease-out), opacity var(--dur-quick) var(--ease-out); }
.nav-hover.is-on { opacity: 1; }
.nav-ink { position: absolute; bottom: 0; left: 0; height: 2px; width: 0; border-radius: 2px 2px 0 0; background: var(--brand); pointer-events: none; opacity: 0; transition: transform var(--dur-menu) var(--ease-out), width var(--dur-menu) var(--ease-out), opacity var(--dur-quick) var(--ease-out); }
.nav-ink.is-on { opacity: 1; }
.count { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: var(--r-pill); font-size: var(--fs-11); font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1; background: var(--brand-strong); color: #fff; }
/* 可关注数增加时角标弹一下（Transitions.dev notification badge：缩放加 2px 模糊进场），只播一次；减少时不播 */
.count.is-bump { animation: count-in var(--dur-fast) cubic-bezier(0.34, 1.36, 0.64, 1); }
@keyframes count-in { from { transform: scale(0.5); filter: blur(2px); opacity: 0; } }

/* 市场状态：一个胶囊两段 */
.markets { display: inline-flex; align-items: center; height: var(--h-ctl); margin-right: 6px; border-radius: var(--r-pill); background: var(--inset); box-shadow: inset 0 0 0 1px var(--line); font-size: var(--fs-12); color: var(--ink-3); white-space: nowrap; font-variant-numeric: tabular-nums; }
.mk { display: inline-flex; align-items: center; gap: 6px; height: 100%; padding: 0 12px; cursor: default; }
.mk + .mk { box-shadow: inset 1px 0 0 var(--line); }
.mk b { font-weight: 600; color: var(--ink); }
.mk .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--ink-4); }
.mk.is-open .dot { background: var(--brand); box-shadow: 0 0 0 3px var(--brand-ring); }
.mk.is-lunch .dot, .mk.is-pre .dot { background: var(--ink-3); }
.mk.is-warn .dot { background: var(--warn); }
.mk.is-warn .mk-s { color: var(--warn); }

.icon-btn { display: grid; place-items: center; width: var(--h-ctl); height: var(--h-ctl); border-radius: var(--r-ctl); color: var(--ink-3); transition: background var(--dur-quick) var(--ease-out), color var(--dur-quick) var(--ease-out), transform var(--dur-micro) var(--ease-out); }
.icon-btn:hover, .dd.is-open > .icon-btn { background: var(--hover); color: var(--ink); }
.icon-btn.sm { width: var(--h-sm); height: var(--h-sm); }
.icon-btn:disabled { opacity: 0.45; }
/* 按下微缩：图标按钮、星标 0.94，切换按钮 0.96，普通按钮 0.98（Beautiful UI：越小的按钮缩得越明显） */
.icon-btn:active:not(:disabled), .star:active { transform: scale(0.94); }
.dd.is-current > .icon-btn { color: var(--ink); background: var(--hover); }
.dd { position: relative; }
.user-btn { display: flex; align-items: center; gap: 8px; height: var(--h-ctl); padding: 0 8px 0 4px; border-radius: var(--r-ctl); font-size: var(--fs-13); font-weight: 500; color: var(--ink-2); transition: background var(--dur-quick) var(--ease-out), color var(--dur-quick) var(--ease-out); }
.user-btn:hover, .dd.is-open .user-btn { background: var(--hover); color: var(--ink); }
.user-btn > .ic { color: var(--ink-4); transition: transform var(--dur-menu) var(--ease-out); }
.dd.is-open .user-btn > .ic { transform: rotate(180deg); }

/* 头像：由账号生成的迷你走势图形，不用姓氏 */
.avatar-svg { display: block; flex: none; border-radius: 7px; }
.avatar { display: block; flex: none; width: 24px; height: 24px; border-radius: 7px; box-shadow: 0 0 0 1px rgba(24, 24, 27, 0.06), 0 1px 2px rgba(24, 24, 27, 0.1); }
.avatar .avatar-svg, .menu-avatar .avatar-svg { width: 100%; height: 100%; }
.menu-avatar { display: block; flex: none; width: 32px; height: 32px; border-radius: 9px; overflow: hidden; box-shadow: 0 0 0 1px rgba(24, 24, 27, 0.06); }
.who { display: flex; align-items: center; gap: 10px; }
.who .avatar-svg { border-radius: 8px; }
.who-t { display: flex; flex-direction: column; gap: 1px; min-width: 0; line-height: 1.35; }
.who-t b { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-13); font-weight: 500; color: var(--ink); white-space: nowrap; }
.who-t .mono { font-size: var(--fs-12); color: var(--ink-3); }
#tUsers .c-role { width: 180px; }
#tUsers .c-seen { width: 160px; }
#tUsers tbody td { height: 56px; }
.tbl .select { height: var(--h-sm); font-size: var(--fs-12); }

/* 下拉菜单：Transitions.dev menu-dropdown；菜单 12 − 内边距 4 = 菜单项 8，圆角同心。宽度随内容（200–320），不受触发按钮宽度限制 */
.menu { position: absolute; top: calc(100% + 6px); right: 0; z-index: var(--z-menu); width: max-content; min-width: 200px; max-width: min(320px, calc(100vw - 24px)); padding: 4px; border-radius: var(--r-card); background: var(--surface); box-shadow: var(--sh-md);
  transform-origin: top right; transform: scale(0.97) translateY(-2px); opacity: 0; pointer-events: none; visibility: hidden; transition: transform var(--dur-menu) var(--ease-out), opacity var(--dur-menu) var(--ease-out), visibility 0s linear var(--dur-menu); }
.dd.is-open .menu { transform: none; opacity: 1; pointer-events: auto; visibility: visible; transition-delay: 0s; }
.menu.is-closing { opacity: 0; transition-duration: var(--dur-quick); }
/* 收起的菜单不占位置：只「看不见」时，靠右的下拉框菜单会伸出屏幕，手机上整页能左右滑（09-27 系统运维页多出 41px）。
   打开时从 @starting-style 的样子过渡进来；不支持的浏览器直接出现 */
.dd:not(.is-open) > .menu:not(.is-closing) { display: none; }
@starting-style { .dd.is-open > .menu { transform: scale(0.97) translateY(-2px); opacity: 0; } }
.menu-head { display: flex; align-items: center; gap: 10px; padding: 8px 8px 10px; margin-bottom: 4px; box-shadow: 0 1px 0 var(--line-soft); }
.menu-head > div { flex: 1; min-width: 0; }
.menu-head b { display: block; font-size: var(--fs-13); font-weight: 600; color: var(--ink); }
.menu-head b + span { display: block; font-size: var(--fs-12); color: var(--ink-3); }
.menu-head :is(b, b + span) { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.menu-head .dice-btn { margin-left: auto; }
/* 摇骰子换头像：骰子转一圈（先快后慢，480ms），新头像从 0.6 放大淡入；账号管理里头像本身是按钮，悬停时右下角冒出小骰子。
   骰子是两颗骰子（一正一斜）的线条图标，和其他图标同尺寸、同线宽，不加底色和阴影；悬停时变深、歪一下 */
.dice-btn, .dice-btn:hover { background: none; }
.dice-btn .ic { width: 16px; height: 16px; color: var(--ink-3); transition: transform var(--dur-fast) var(--ease-out), color var(--dur-quick) var(--ease-out); }
.dice-btn:hover .ic { color: var(--ink); transform: rotate(-15deg); }
:is(.dice-btn, .av-btn).is-rolling .ic { animation: dice-roll 480ms var(--ease-out); }
@keyframes dice-roll { 0% { transform: rotate(0) scale(1); } 45% { transform: rotate(220deg) scale(0.8); } 100% { transform: rotate(360deg) scale(1); } }
.avatar-svg.av-in { animation: av-in var(--dur-fast) var(--ease-out); }
@keyframes av-in { from { opacity: 0; transform: scale(0.6) rotate(-8deg); } }
.av-btn { position: relative; flex: none; display: block; border-radius: 8px; cursor: pointer; }
.av-btn .av-dice { position: absolute; right: -5px; bottom: -5px; display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: var(--surface); box-shadow: 0 0 0 1px var(--line); color: var(--ink-2); opacity: 0; transform: scale(0.8); transition: opacity var(--dur-quick) var(--ease-out), transform var(--dur-quick) var(--ease-out); }
.av-btn .av-dice .ic { width: 13px; height: 13px; }
.av-btn:hover .av-dice, .av-btn:focus-visible .av-dice, .av-btn.is-rolling .av-dice { opacity: 1; transform: none; }
@media (hover: none) { .av-btn .av-dice { opacity: 1; transform: none; } }
.menu [role="menuitem"] { display: flex; align-items: center; gap: 10px; width: 100%; height: var(--h-ctl); padding: 0 8px; border-radius: var(--r-ctl); font-size: var(--fs-13); color: var(--ink-2); text-align: left; transition: background var(--dur-quick) var(--ease-out), color var(--dur-quick) var(--ease-out); }
/* 灰底只给鼠标悬停的那一项；当前页用加粗、深色图标和右侧圆点标出，不铺底色。
   相邻两项之间留 2px：悬停项和键盘选中项同时出现时，两块底色也不会连成一片 */
.menu [role="menuitem"]:hover { background: var(--hover); color: var(--ink); }
.menu [role="menuitem"] + [role="menuitem"] { margin-top: 2px; }
.menu a.is-active { color: var(--ink); font-weight: 600; }
.menu a.is-active::after { content: ""; flex: none; margin-left: auto; width: 6px; height: 6px; border-radius: 50%; background: var(--ink); }
.menu [role="menuitem"] .ic { width: 15px; height: 15px; color: var(--ink-3); }
.menu a.is-active .ic { color: var(--ink); }
.menu [role="menuitem"] { white-space: nowrap; }
/* 下拉框（BeUI Select，ui.js 的 niceSelect）：按钮和输入框同高同字号；选了非默认项时字变深；菜单左对齐、至少和按钮一样宽，
   从按钮下方轻轻展开；分组名小号灰字，当前项前面一个对勾 */
.nsel { display: inline-flex; min-width: 0; }
.nsel-btn { display: inline-flex; align-items: center; gap: 6px; width: 100%; height: var(--h-ctl); padding: 0 8px 0 10px; border-radius: var(--r-ctl); font-size: var(--fs-13); color: var(--ink-2); background: var(--surface); box-shadow: var(--sh-btn); white-space: nowrap;
  transition: box-shadow var(--dur-quick) var(--ease-out), background var(--dur-quick) var(--ease-out); }
.nsel-btn:hover { background: var(--hover); }
.nsel.is-set .nsel-btn { color: var(--ink); font-weight: 500; }
.nsel.is-open .nsel-btn { box-shadow: var(--ring); }
.nsel-v { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; text-align: left; }
.nsel-ic { flex: none; color: var(--ink-3); transition: rotate var(--dur-fast) var(--ease-out); }
.nsel.is-open .nsel-ic { rotate: 180deg; }
.nsel .menu { left: 0; right: auto; min-width: max(100%, 180px); max-height: min(360px, 60vh); overflow-y: auto; transform-origin: top left; }
.nsel-g { padding: 8px 8px 4px; font-size: var(--fs-11); font-weight: 600; letter-spacing: 0.04em; color: var(--ink-4); }
.nsel-menu [role="option"] { display: flex; align-items: center; gap: 8px; width: 100%; min-height: var(--h-ctl); padding: 0 10px 0 8px; border-radius: var(--r-ctl); font-size: var(--fs-13); color: var(--ink-2); text-align: left; white-space: nowrap; }
.nsel-menu [role="option"]:hover { background: var(--hover); color: var(--ink); }
.nsel-menu [role="option"][aria-selected="true"] { color: var(--ink); font-weight: 600; }
.nsel-ck { flex: none; width: 14px; height: 14px; color: var(--brand); opacity: 0; scale: 0.6; transition: opacity var(--dur-quick) var(--ease-out), scale var(--dur-quick) var(--ease-out); }
.nsel-menu [aria-selected="true"] .nsel-ck { opacity: 1; scale: 1; }

/* ─── 状态条：持续失败时一条，可重试、可关闭 ─── */
.statusbar { position: sticky; top: var(--head); z-index: calc(var(--z-top) - 1); background: var(--warn-tint); box-shadow: 0 1px 0 var(--warn-line); color: var(--warn); }
.statusbar-in { max-width: var(--wrap); margin: 0 auto; padding: 6px 24px; display: flex; align-items: center; gap: 10px; font-size: var(--fs-13); }
.sb-text { flex: 1; min-width: 0; }
.statusbar .btn { height: var(--h-sm); }

/* ─── 页面 ─── */
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 16px 24px 32px; outline: none; }
body.has-statusbar { --chrome: calc(var(--head) + 40px); }
.page { display: none; }
.page.is-active { display: block; animation: page-in var(--dur-menu) var(--ease-out); }
.page.is-active.no-in { animation: none; }
@keyframes page-in { from { opacity: 0; transform: translateX(calc(var(--dir, 0) * 6px)); } to { opacity: 1; transform: none; } }
.page-head { display: flex; align-items: center; gap: 12px; min-height: var(--h-ctl); margin-bottom: 16px; }
.page-head h1 { font-size: var(--fs-16); font-weight: 600; letter-spacing: -0.01em; line-height: 1.3; white-space: nowrap; }
.head-meta { min-width: 0; font-size: var(--fs-12); line-height: 20px; color: var(--ink-3); font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.head-meta .breadth, .head-meta .ic { vertical-align: middle; }
.head-meta b { font-weight: 600; color: var(--ink); }
.head-meta b.up { color: var(--up); } .head-meta b.down { color: var(--down); }
/* 带图标的提示：按文字基线对齐。inline-flex 的基线默认取第一个子元素，图标在前时会拿图标底边当基线，整段文字被顶高 2px */
.head-meta .warn { display: inline-flex; align-items: baseline; gap: 4px; }
.head-meta .warn > .ic { align-self: center; }
.head-meta .hm-k { margin-right: 4px; }
.head-meta .hm-g b { margin-left: 4px; }
.head-meta .hm-g + .hm-g { margin-left: 10px; }
.page-head .actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.stack { display: grid; gap: 16px; }

/* ─── 按钮与切换：shadcn Button（outline 默认 / primary / ghost；32 与 28 两种高度） ─── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: var(--h-ctl); padding: 0 12px; border-radius: var(--r-ctl); font-size: var(--fs-13); font-weight: 500; white-space: nowrap; color: var(--ink); background: var(--surface); box-shadow: var(--sh-btn);
  transition: background var(--dur-quick) var(--ease-out), box-shadow var(--dur-quick) var(--ease-out), transform var(--dur-micro) var(--ease-out), color var(--dur-quick) var(--ease-out); }
.btn:hover { background: var(--hover); }
.btn:active { transform: scale(0.98); }
.btn:disabled { color: var(--ink-4); transform: none; background: var(--surface); }
.btn .ic { width: 15px; height: 15px; color: var(--ink-3); }
.btn-primary { background: var(--brand-strong); color: #fff; box-shadow: 0 1px 2px rgba(201, 59, 10, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.16); }
.btn-primary:hover { background: var(--brand-hover); }
.btn-primary .ic { color: #fff; }
.btn-primary:disabled { background: var(--hover-2); color: var(--ink-4); box-shadow: none; }
.btn-ghost { background: transparent; box-shadow: none; color: var(--ink-2); }
.btn-ghost:hover { background: var(--hover); color: var(--ink); }
.btn-sm { height: var(--h-sm); padding: 0 10px; font-size: var(--fs-12); border-radius: var(--r-chip); gap: 5px; }
.btn-sm .ic { width: 14px; height: 14px; }
.btn.is-busy .ic-refresh { animation: spin 0.9s linear infinite; }
.btn.is-loading { color: var(--ink-4); }
.btn.is-done, .icon-btn.is-done { color: var(--ink); }
.btn.is-done .ic { color: var(--ink); }
/* 复制成功：复制图标缩小淡出、对勾放大淡入（和登录页眼睛的切换同一写法），1.6 秒后换回 */
.swap-ic { display: inline-grid; place-items: center; }
.swap-ic > .ic { grid-area: 1 / 1; transition: opacity var(--dur-quick) ease-in-out, transform var(--dur-quick) ease-in-out; }
.swap-ic > .ic + .ic, .is-done .swap-ic > .ic:first-child { opacity: 0; transform: scale(0.5); }
.is-done .swap-ic > .ic + .ic { opacity: 1; transform: none; }
.tgl { display: inline-flex; align-items: center; gap: 6px; height: var(--h-ctl); padding: 0 11px; border-radius: var(--r-ctl); font-size: var(--fs-13); font-weight: 500; color: var(--ink-2); background: var(--surface); box-shadow: var(--sh-btn); white-space: nowrap; transition: background var(--dur-quick) var(--ease-out), color var(--dur-quick) var(--ease-out), box-shadow var(--dur-quick) var(--ease-out), transform var(--dur-micro) var(--ease-out); }
.tgl:active { transform: scale(0.96); }
.tgl .ic { width: 15px; height: 15px; color: var(--ink-3); }
.tgl:hover { background: var(--hover); color: var(--ink); }
.tgl[aria-pressed="true"] { color: var(--ink); background: var(--hover-2); box-shadow: inset 0 0 0 1px var(--line-strong); }
.tgl[aria-pressed="true"] .ic { color: var(--ink); fill: currentColor; }
/* 「仅看触发」「我的关注」：和行业分组同一种灰底槽，平时灰字，打开时白色小块（同分组的选中样式），图标品牌橙 */
.tgl-group { display: inline-flex; align-items: center; gap: 2px; height: var(--h-ctl); padding: 3px; border-radius: var(--r-ctl); background: var(--canvas); }
.tgl-group .tgl { height: 100%; padding: 0 10px; gap: 5px; border-radius: calc(var(--r-ctl) - 3px); color: var(--ink-3); background: transparent; box-shadow: none; }
.tgl-group .tgl:hover { color: var(--ink); background: transparent; }
.tgl-group .tgl .ic { width: 14px; height: 14px; color: var(--ink-4); transition: color var(--dur-quick) var(--ease-out); }
.tgl-group .tgl:hover .ic { color: var(--ink-3); }
.tgl-group .tgl[aria-pressed="true"] { color: var(--ink); background: var(--surface); box-shadow: 0 1px 2px rgba(24, 24, 27, 0.08), 0 0 0 1px rgba(24, 24, 27, 0.05); }
.tgl-group .tgl[aria-pressed="true"] .ic { color: var(--brand); fill: none; }
.tgl-group .tgl[data-f="watch"][aria-pressed="true"] .ic { fill: currentColor; }
.link { display: inline-flex; align-items: center; gap: 3px; font-size: var(--fs-12); font-weight: 500; color: var(--ink-3); transition: color var(--dur-quick) var(--ease-out); }
.link:hover { color: var(--ink); }
.link .ic { width: 13px; height: 13px; transition: translate var(--dur-quick) var(--ease-out); }
.link:hover .ic { translate: 2px 0; }
.link-btn { display: inline-flex; align-items: center; gap: 3px; font-size: var(--fs-12); font-weight: 500; color: var(--brand-text); text-decoration: underline; text-underline-offset: 2px; }

/* ─── 分段控件：shadcn Tabs 底槽 + Transitions.dev 滑块；计数取自 Beautiful UI Filter Table；内外圆角同心（Rare UI：外圆角 = 内圆角 + 内边距） ─── */
.seg { position: relative; display: inline-flex; align-items: center; gap: 2px; height: var(--h-ctl); padding: 3px; border-radius: var(--r-ctl); background: var(--canvas); max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.seg::-webkit-scrollbar { display: none; }
.seg.is-more { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent); }
.seg-pill { position: absolute; top: 3px; left: 0; height: calc(100% - 6px); width: 0; border-radius: calc(var(--r-ctl) - 3px); background: var(--surface); box-shadow: 0 1px 2px rgba(24, 24, 27, 0.08), 0 0 0 1px rgba(24, 24, 27, 0.05); transition: transform var(--dur-menu) var(--ease-out), width var(--dur-menu) var(--ease-out); pointer-events: none; }
.seg button { position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 5px; height: 100%; padding: 0 10px; border-radius: calc(var(--r-ctl) - 3px); font-size: var(--fs-13); font-weight: 500; color: var(--ink-3); white-space: nowrap; transition: color var(--dur-quick) var(--ease-out); }
.seg button:hover, .seg button[aria-pressed="true"] { color: var(--ink); }
.seg button:focus-visible { outline-offset: -2px; }
.seg button i { font-style: normal; font-size: var(--fs-12); font-variant-numeric: tabular-nums; color: var(--ink-3); }
.seg .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--c, var(--ink-4)); }

/* ─── 表单：shadcn Input / Select / Switch ─── */
.input, .select { height: var(--h-ctl); padding: 0 10px; border: 0; border-radius: var(--r-ctl); outline: none; background: var(--surface); box-shadow: var(--sh-btn); font-size: var(--fs-13); color: var(--ink); transition: box-shadow var(--dur-quick) var(--ease-out); }
textarea.input { height: auto; padding: 8px 10px; line-height: 1.5; resize: vertical; }
.select { appearance: none; -webkit-appearance: none; padding-right: 28px; cursor: pointer; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%236b6b74' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6l6 -6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 8px center; }
.input:hover, .select:hover { box-shadow: 0 0 0 1px var(--line-strong), 0 1px 2px rgba(24, 24, 27, 0.05); }
.input:focus, .select:focus-visible { box-shadow: var(--ring); outline: none; }
.input::placeholder { color: var(--ink-4); }
.input[aria-invalid="true"], .num-in[aria-invalid="true"] { box-shadow: 0 0 0 1px var(--warn), 0 0 0 4px color-mix(in srgb, var(--warn) 16%, transparent) !important; }
.check { display: inline-flex; align-items: center; gap: 8px; font-size: var(--fs-12); color: var(--ink-2); cursor: pointer; user-select: none; }
/* 勾选框（BeUI Checkbox、Transitions.dev checkbox-check）：圆角方块，勾上时底色变深、对勾从左往右画出来（0.3 秒）；按下缩到 0.92；半选是一道横线 */
input[type="checkbox"] { appearance: none; -webkit-appearance: none; position: relative; display: inline-grid; place-items: center; flex: none; width: 16px; height: 16px; margin: 0; border-radius: 5px; vertical-align: middle; cursor: pointer;
  background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--line-strong); transition: background var(--dur-quick) var(--ease-out), box-shadow var(--dur-quick) var(--ease-out), scale var(--dur-micro) var(--ease-out); }
input[type="checkbox"]::before { content: ""; width: 10px; height: 10px; clip-path: inset(0 100% 0 0); transition: clip-path 300ms var(--ease-out);
  background: center / contain no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none' stroke='white' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 6.4l2.6 2.6L10 3.4'/%3E%3C/svg%3E"); }
@media (hover: hover) { input[type="checkbox"]:hover { box-shadow: inset 0 0 0 1.5px var(--ink-4); } }
input[type="checkbox"]:active { scale: 0.92; }
input[type="checkbox"]:is(:checked, :indeterminate) { background: var(--ink); box-shadow: 0 1px 2px rgba(24, 24, 27, 0.2); }
input[type="checkbox"]:checked::before { clip-path: inset(0 0 0 0); }
input[type="checkbox"]:indeterminate::before { clip-path: inset(0 0 0 0); transition: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none' stroke='white' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='M3 6h6'/%3E%3C/svg%3E"); }
input[type="checkbox"]:disabled { opacity: 0.5; cursor: not-allowed; }
/* 开关（BeUI Switch）：关着是中灰（不是浅灰，看得出是个开关），开着是深色；圆钮用略带回弹的弹簧滑过去；
   按住时圆钮朝要去的方向拉长一点，松手再弹到位 */
.switch { position: relative; flex: none; width: 36px; height: 20px; border-radius: var(--r-pill); background: color-mix(in srgb, var(--ink-4) 75%, var(--surface)); box-shadow: inset 0 1px 1px rgba(24, 24, 27, 0.08); transition: background 200ms var(--ease-out); }
.switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: var(--r-pill); background: #fff; box-shadow: 0 1px 3px rgba(24, 24, 27, 0.25), 0 0 0 0.5px rgba(24, 24, 27, 0.06);
  transition: translate 300ms cubic-bezier(0.34, 1.3, 0.64, 1), width 160ms var(--ease-out), scale var(--dur-micro) var(--ease-out); }
.switch:hover { background: color-mix(in srgb, var(--ink-3) 70%, var(--surface)); }
.switch:active::after { width: 20px; }
/* 开关（Transitions.dev toggle）：滑块略越过终点再回位；按住时滑块缩到 0.9（BeUI switch） */
.switch[aria-checked="true"] { background: var(--ink); }
.switch[aria-checked="true"]::after { translate: 16px 0; }
.switch[aria-checked="true"]:active::after { translate: 12px 0; }
.num-in { width: 48px; height: var(--h-sm); padding: 0 6px; margin: 0 3px; border: 0; border-radius: var(--r-chip); text-align: center; font-size: var(--fs-13); font-weight: 600; font-variant-numeric: tabular-nums; background: var(--surface); box-shadow: var(--sh-btn); outline: none; transition: box-shadow var(--dur-quick) var(--ease-out), background var(--dur-quick) var(--ease-out); }
.num-in:hover { box-shadow: 0 0 0 1px var(--line-strong), 0 1px 2px rgba(24, 24, 27, 0.05); }
.num-in:focus { background: var(--surface); box-shadow: var(--ring); }
.num-in.wide { width: 90px; }
/* 数字加减：输入框右侧一对上下小箭头，鼠标移上去或点进输入框时淡出来。箭头的位置一直留着、只改透明度，
   出现时不挤动旁边的字（原来从数字两侧展开，一行两个数字的会换行、整块往下跳）；触屏上不显示，点进去直接输入 */
.nstep { position: relative; display: inline-flex; vertical-align: middle; }
.nstep .num-in { width: 56px; padding: 0 16px; }
.nstep-v { position: absolute; top: 3px; right: 3px; bottom: 3px; display: grid; grid-template-rows: 1fr 1fr; gap: 1px; width: 14px; opacity: 0; transition: opacity var(--dur-quick) var(--ease-out); }
.nstep:hover .nstep-v, .nstep:focus-within .nstep-v { opacity: 1; }
.nstep-b { display: grid; place-items: center; min-height: 0; border-radius: 3px; color: var(--ink-4); transition: color var(--dur-quick) var(--ease-out), background var(--dur-quick) var(--ease-out); }
.nstep-b:hover { color: var(--ink); background: var(--hover-2); }
.nstep-b:active { background: var(--line); }
.nstep-b .ic { width: 10px; height: 10px; stroke-width: 2.4; }
.nstep-b[data-step="1"] .ic { rotate: 180deg; }
@media (pointer: coarse) { .nstep-v { display: none; } .nstep .num-in { padding: 0 6px; } }
@keyframes num-pop { 40% { scale: 1.12; } }
.num-in.is-pop { animation: num-pop 220ms var(--ease-out); }

/* ─── 卡片：Beautiful UI 白卡片 + 1px 描边 ─── */
.card { position: relative; background: var(--surface); border-radius: var(--r-card); box-shadow: var(--sh-card); }
.card-head { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 8px 16px; box-shadow: 0 1px 0 var(--line-soft); }
.card-head h3 { flex: none; font-size: var(--fs-13); font-weight: 600; white-space: nowrap; }
.card-head .sub { min-width: 0; }
.card-head .sub { font-size: var(--fs-12); color: var(--ink-3); font-variant-numeric: tabular-nums; }
.card-head .gap, .gap { margin-left: auto; }
.card-body { padding: 16px; }
.help { display: inline-grid; place-items: center; width: 18px; height: 18px; margin-left: 2px; color: var(--ink-3); cursor: help; vertical-align: -4px; border-radius: var(--r-xs); }
.help:hover { color: var(--ink); }
.help .ic { width: 14px; height: 14px; }

/* ─── 盘中异动 · 今日待处理：一张卡片，格子间细线分隔；没有待处理时收成一行 ─── */
.overview { margin-bottom: 12px; background: var(--surface); border-radius: var(--r-card); box-shadow: var(--sh-card); }
.breadth { display: inline-flex; gap: 2px; width: 64px; height: 5px; margin-left: 10px; border-radius: var(--r-pill); overflow: hidden; background: var(--canvas); cursor: default; }
.breadth i { display: block; min-width: 0; }
.breadth .u { background: var(--up-mark); } .breadth .f { background: var(--ink-4); } .breadth .d { background: var(--down-mark); }
.focus { padding: 12px 16px; }
.focus:has(.focus-list) { min-height: 104px; padding: 12px 8px 8px 16px; }
.focus-head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; min-height: 22px; padding-right: 8px; }
.focus:not(:has(.focus-list)) .focus-head { padding-right: 0; }
.focus-head h2 { font-size: var(--fs-13); font-weight: 600; color: var(--ink); white-space: nowrap; }
.focus-head .help { margin-left: 0; }
.focus-links { margin-left: auto; display: flex; align-items: center; gap: 16px; }
.focus-links a { white-space: nowrap; }
.new-chip { display: inline-flex; align-items: center; height: 20px; padding: 0 8px; border-radius: var(--r-pill); font-size: var(--fs-12); font-weight: 600; color: var(--brand-text); background: var(--brand-tint); box-shadow: inset 0 0 0 1px var(--brand-line); }
.focus-empty { display: inline-flex; align-items: center; gap: 6px; margin-left: 10px; padding-left: 12px; box-shadow: inset 1px 0 0 var(--line); font-size: var(--fs-12); color: var(--ink-3); white-space: nowrap; }
.focus-empty .ic { color: var(--ink-4); }
.focus-list { display: grid; grid-template-columns: repeat(var(--cols, 4), minmax(0, 1fr)); margin: 8px 0 0 -8px; }
.fi { position: relative; display: grid; grid-template-rows: auto auto; gap: 6px 8px; grid-template-columns: minmax(0, 1fr) auto; align-items: center; min-height: 58px; padding: 8px 12px 8px 8px; border-radius: var(--r-ctl); text-align: left; transition: background var(--dur-quick) var(--ease-out); }
.fi + .fi::before { content: ""; position: absolute; left: -1px; top: 12px; bottom: 12px; width: 1px; background: var(--line); transition: opacity var(--dur-quick) var(--ease-out); }
.fi:hover { background: var(--hover); }
.fi:hover::before, .fi:hover + .fi::before { opacity: 0; }
.fi.is-new::after { content: ""; position: absolute; left: 0; top: 12px; width: 3px; height: 16px; border-radius: 0 3px 3px 0; background: var(--brand); }
.fi-top { grid-column: 1 / -1; display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.fi-top b { font-size: var(--fs-13); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fi-top .chg { margin-left: auto; }
.fi-mid { display: flex; align-items: center; gap: 6px; min-width: 0; }
.fi-more { font-size: var(--fs-12); color: var(--ink-3); white-space: nowrap; }
/* 可关注卡片：标签右侧一条当日分时小图（和表格「今日走势」同一份数据） */
.fi-mid .spark { display: block; flex: none; margin-left: auto; }
/* 距历史高点：水下曲线（shadcn Area Chart 的渐变面积）。近 1 年每天离历史高点多远，从顶边往下挂；每行按自己这一年的范围画。
   顶边实线 = 这一年创过历史新高，虚线 = 没创过（顶边是这一年离高点最近的一天）；面积越深 = 现在离高点越远。近新高时顶边和数字变红 */
.uw { display: inline-flex; align-items: center; gap: 8px; }
.uw-val { width: 56px; text-align: right; font-variant-numeric: tabular-nums; }
.uw.is-high .uw-val { color: var(--up-strong); font-weight: 600; }
.uw-svg { display: block; flex: none; overflow: visible; }
.uw-a { fill: url(#uw-grad); }
.uw-sea { stroke: var(--ink-4); stroke-width: 1; }
.uw-sea.is-far { stroke-dasharray: 2 2; }
.uw-ln { fill: none; stroke: var(--ink-3); stroke-width: 1.25; stroke-linejoin: round; }
.uw-dot { fill: var(--ink-3); stroke: var(--surface); stroke-width: 1.5; }
.uw.is-high .uw-sea { stroke: var(--up-mark); stroke-width: 1.5; }
.uw.is-high .uw-dot { fill: var(--up-mark); }
/* 「近新高」「创新高」宽屏只给读屏（水面和数字已变红），手机上收起小图时显示出来 */
.uw-tag { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.fi-bot { display: flex; align-items: center; gap: 8px; justify-self: end; white-space: nowrap; }
.fi-bot time { font-size: var(--fs-12); color: var(--ink-3); font-variant-numeric: tabular-nums; }
.fi-rest { display: flex; flex-direction: column; justify-content: center; gap: 2px; font-size: var(--fs-12); color: var(--ink-3); }
.fi-rest b { font-size: var(--fs-13); color: var(--ink); font-weight: 600; }
.sk-fi { display: grid; align-content: center; gap: 8px; }

/* ─── 工具栏：搜索、分组、仅看触发、我的关注；筛选时写明范围 ─── */
.toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.search { position: relative; display: inline-flex; align-items: center; }
.search > .ic { position: absolute; left: 10px; width: 15px; height: 15px; color: var(--ink-4); pointer-events: none; }
.search .input { width: 240px; padding-left: 32px; }
/* 搜索框尾部的快捷键提示（shadcn Kbd：20 高、12px 中等字重、灰底）：按 / 聚焦；聚焦或已有内容时收起；触屏上不显示 */
.kbd { position: absolute; right: 7px; display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 4px; border-radius: var(--r-xs); background: var(--inset); box-shadow: inset 0 0 0 1px var(--line); font-family: inherit; font-size: var(--fs-12); font-weight: 500; line-height: 1; color: var(--ink-3); cursor: default; }
.search:focus-within .kbd, .search:has(.input:not(:placeholder-shown)) .kbd { display: none; }
@media (pointer: fine) and (min-width: 601px) { .search:not(:focus-within):has(.input:placeholder-shown) .input { padding-right: 34px; } }
@media (max-width: 600px) { .kbd { display: none; } }
/* 空的时候不给清除按钮留位置（Chrome 默认隐藏了也占宽），占位字不被截 */
.search .input:placeholder-shown::-webkit-search-cancel-button { display: none; }
.search .input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; width: 14px; height: 14px; cursor: pointer; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23a1a1aa' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M18 6L6 18M6 6l12 12'/%3E%3C/svg%3E") center / 14px no-repeat; }
.scope { margin-left: auto; font-size: var(--fs-12); color: var(--ink-3); white-space: nowrap; }
.scope:empty { display: none; }
.scope b { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.scope-f { margin-left: 6px; color: var(--ink-2); font-weight: 500; }

/* ─── 表格：shadcn Data Table；固定表头与指数列在表格自身的滚动区内，任何宽度都不丢列名 ─── */
.table-card { position: relative; background: var(--surface); border-radius: var(--r-card); box-shadow: var(--sh-card); overflow: clip; }
/* 表格右边还有列（iPad 竖屏、手机、窄窗口）：右缘一道淡淡的阴影，提示可以往右滑；滑到头就收起 */
.table-card::after { content: ""; position: absolute; top: 0; right: 0; bottom: 0; z-index: 4; width: 28px; background: linear-gradient(270deg, rgba(24, 24, 27, 0.08), rgba(24, 24, 27, 0)); opacity: 0; pointer-events: none; transition: opacity var(--dur-quick) var(--ease-out); }
.table-card:has(> .table-scroll.has-more-x:not([hidden]))::after { opacity: 1; }
.table-scroll { overflow: auto; max-height: calc(100dvh - var(--chrome) - 40px); }
.table-card:has(.pager) .table-scroll { max-height: calc(100dvh - var(--chrome) - 140px); }
.pager:empty { display: none; }
.table-scroll.is-contained { max-height: none; overscroll-behavior: contain; }
.tbl { width: 100%; border-collapse: separate; border-spacing: 0; font-size: var(--fs-13); font-variant-numeric: tabular-nums; }
.tbl thead th { position: sticky; top: 0; z-index: var(--z-sticky); height: var(--h-th); padding: 0 12px; background: var(--inset); text-align: left; vertical-align: middle; white-space: nowrap; font-size: var(--fs-12); font-weight: 500; color: var(--ink-3); box-shadow: inset 0 -1px 0 var(--line); }
.tbl tbody td { height: var(--row); padding: 4px 12px; line-height: 1.4; vertical-align: middle; box-shadow: inset 0 -1px 0 var(--line-soft); background: var(--surface); }
/* 行悬停变色不做过渡：几百行的表格滚动时，指针不停划过新行，每个格子的背景过渡都要主线程逐帧算，全市场榜会掉到 30 帧（2026-09-27 实测） */
.tbl tbody tr:last-child td { box-shadow: none; }
/* 行悬停底色只给能悬停的设备：触屏点一行打开详情再关掉后，这行不会一直发灰（BeUI use-hover-capable） */
@media (hover: hover) { .tbl tbody tr:hover td { background: var(--hover); } }
.tbl tbody tr:is(.group, .msg-row):hover td { background: var(--surface); }
.tbl .r { text-align: right; }
/* 盘中异动、量价估值：有的格子下面带一行小字，各格改为顶对齐，首行数字在同一条线上 */
#tLive tbody tr[data-key] td, #tVal tbody tr[data-key] td { vertical-align: top; padding-top: 6px; }
/* 走势图（今日走势、近 3 月）和「距历史高点」的水下曲线也靠上，和同一行的数字在一条线上；
   画不出走势时的「—」按正文一行排（20px 行高），和同一行的数字同一条基线 */
:is(#tLive, #tVal) tbody tr[data-key] td.c-spark { padding-top: 5px; }
:is(#tLive, #tVal) tbody tr[data-key] td.c-spark .spark-empty { height: 20px; }
/* 触发标签 22px 高、字 12px：上边距少 2px，标签里的字和同一行的数字同一条基线 */
:is(#tLive, #tVal) tbody tr[data-key] td.c-trig { padding-top: 4px; }
/* 涨跌数据条上下各有 1px 内边距：往上提 1px；12px 的小字格（成交额）行高小一截，往下 1px。两处的首行都和 13px 的数字同一条基线 */
:is(#tLive, #tVal) tbody tr[data-key] .chgcell { margin-top: -1px; }
:is(#tLive, #tVal) tbody tr[data-key] td.meta { padding-top: 7px; }
#tVal .uw { align-items: flex-start; }
#tVal .uw-svg { margin-top: -1px; }
.tbl td.meta { font-size: var(--fs-12); color: var(--ink-3); white-space: nowrap; }
/* 指数列固定：横向滚动时不丢 */
.tbl .c-name { position: sticky; left: 0; z-index: 2; box-shadow: inset -1px 0 0 var(--line-soft), inset 0 -1px 0 var(--line-soft); }
.tbl thead th.c-name { z-index: calc(var(--z-sticky) + 1); box-shadow: inset -1px 0 0 var(--line-soft), inset 0 -1px 0 var(--line); }
.table-scroll.is-scrolled-x .tbl .c-name { box-shadow: inset -1px 0 0 var(--line), inset 0 -1px 0 var(--line-soft), 8px 0 12px -10px rgba(24, 24, 27, 0.35); clip-path: inset(0 -16px 0 0); }
.table-scroll.is-scrolled-x .tbl thead th.c-name { box-shadow: inset -1px 0 0 var(--line), inset 0 -1px 0 var(--line), 8px 0 12px -10px rgba(24, 24, 27, 0.35); }
.tbl tr.group td { position: sticky; top: var(--h-th); z-index: 5; height: auto; padding: 7px 12px; background: var(--surface); font-size: var(--fs-12); font-weight: 600; color: var(--ink); box-shadow: inset 0 -1px 0 var(--line-soft), inset 0 1px 0 var(--line-soft); }
.tbl tr.group td span { font-weight: 400; color: var(--ink-3); margin-left: 6px; }
.tbl tr.group td .grp-in { position: sticky; left: 12px; display: inline-flex; align-items: center; margin-left: 0; font-weight: 600; color: var(--ink); }
.tbl tr.group td .grp-lv { display: inline-flex; align-items: center; height: 18px; margin-left: 8px; padding: 0 6px; border-radius: var(--r-xs); font-style: normal; font-size: var(--fs-11); font-weight: 500; color: var(--ink-2); background: var(--inset); box-shadow: inset 0 0 0 1px var(--line); }
.tbl tr.is-muted td { color: var(--ink-3); }
.tbl tr.is-muted .badge { opacity: 0.75; }
/* 点位变化：底色约 80ms 亮到 8%，再用 600ms 退掉（BeUI 盘口行：快进慢出）。
   用关键帧而不是背景过渡：悬停整行变灰时，点位列和同一行其他格同步 */
.tbl td.tick-up { animation: tick-up 680ms var(--ease-out); }
.tbl td.tick-down { animation: tick-down 680ms var(--ease-out); }
@keyframes tick-up { 12% { background: color-mix(in srgb, var(--up-mark) 8%, var(--surface)); animation-timing-function: cubic-bezier(0.4, 0, 0.6, 1); } }
@keyframes tick-down { 12% { background: color-mix(in srgb, var(--down-mark) 8%, var(--surface)); animation-timing-function: cubic-bezier(0.4, 0, 0.6, 1); } }
.msg-row td { height: auto !important; }
/* 宽屏列宽（BeUI 行情表）：固定列宽，行情刷新时各列不左右跳；数字列按内容留出基础宽度，挨着指数名排开。
   表格区比「基础宽度 + 触发列约 200px」宽出来的部分，平均加到各数据列上：浏览器开侧边栏、窗口变窄时列间距收紧，变宽时拉开，
   「触发」列不再独占右边一大片空白。按表格区自己的宽度算（容器查询，.table-scroll 是容器），不看整个窗口。
   表格区太窄放不下基础宽度时回到按内容排开、表格内横向滑动 */
:is(#tLive, #tVal) { --x: clamp(0px, calc((100cqw - var(--base) - 200px) / var(--n)), 64px); }
#tLive { --base: 1052px; --n: 8; }  /* 四个区间列各 104px：放得下「全市场 TOP 12」和前 3 的奖牌胶囊 */
#tVal { --base: 1080px; --n: 6; }
@container (min-width: 1140px) {
  #tLive { table-layout: fixed; }
  #tLive th.c-name { width: 208px; }
  #tLive th.w-chg { width: calc(100px + var(--x)); }
  #tLive th.c-spark { width: calc(120px + var(--x)); }
  #tLive th.w-px { width: calc(108px + var(--x)); }
  #tLive th.w-amt { width: calc(100px + var(--x)); }
  #tLive th.w-ret { width: calc(104px + var(--x)); }
  /* 固定列宽时触发标签放不下就换行，不让整张表横向滚动 */
  #tLive .c-trig .badges { flex-wrap: wrap; }
}
/* 连涨连跌不跟着伸缩：7 个方格挨着排成一条，指数名列留足宽度，多出来的宽度都给最右的「触发」列 */
@media (min-width: 1280px) {
  #tStreak { table-layout: fixed; }
  #tStreak th.c-name { width: 208px; }
  #tStreak th.hd { width: 56px; }
  #tStreak th.w-ret { width: 88px; }
  #tStreak th.w-stk { width: 224px; }
  #tStreak .c-trig .badges { flex-wrap: wrap; }
}
@media (min-width: 1400px) {
  #tStreak th.c-name { width: 224px; }
  #tStreak th.w-ret { width: 96px; }
  #tStreak th.w-stk { width: 232px; }
}
/* 量价估值列多、基础宽度大，表格区到 1232px 才固定列宽（触发列至少留 152px，放得下最长的「较60日高点跌超10%」） */
@container (min-width: 1232px) {
  #tVal { table-layout: fixed; }
  #tVal th.c-name { width: 208px; }
  #tVal th.w-px { width: calc(108px + var(--x)); }
  #tVal th.c-spark { width: calc(120px + var(--x)); }
  #tVal th.w-dd { width: calc(176px + var(--x)); }
  #tVal th.w-amt { width: calc(100px + var(--x)); }
  #tVal th.w-pe { width: calc(128px + var(--x)); }  /* 放得下「⏲ 09-22 · 更新延迟」 */
  #tVal th.w-pct { width: calc(240px + var(--x)); }
  /* PE 分位的轨道在窄一些的表格里跟着缩（最短 88px），给「更新延迟」和最长的触发标签腾地方 */
  #tVal .meter { display: flex; }
  #tVal .meter-track { flex: 0 1 120px; min-width: 88px; }
  #tVal .c-trig .badges { flex-wrap: wrap; }
}
/* 表格比屏幕宽时，空状态说明跟着可视区域居中，不被横向滚动裁掉 */
.table-scroll { container-type: inline-size; }
.table-scroll td[colspan] > .empty { position: sticky; left: 12px; width: calc(100cqw - 24px); }
.th-sort { display: inline-flex; align-items: center; gap: 4px; height: 26px; margin: 0 -6px; padding: 0 6px; border-radius: var(--r-chip); color: inherit; font-weight: 500; transition: color var(--dur-quick) var(--ease-out), background var(--dur-quick) var(--ease-out); }
.th-sort:hover { color: var(--ink); background: var(--hover-2); }
.th-sort .ic { width: 14px; height: 14px; opacity: 0; transition: opacity var(--dur-quick) var(--ease-out), transform var(--dur-quick) var(--ease-out); }
.th-sort:hover .ic { opacity: 0.5; }
.th-sort.is-active { color: var(--ink); }
.th-sort.is-active .ic { opacity: 1; }
.th-sort.is-asc .ic { transform: rotate(180deg); }
.tbl:not(.is-ready) .th-sort .ic { transition: none; }
.tbl th.r .th-sort { flex-direction: row-reverse; }
/* 排名变化提示：浮在表格底部，不挤动表格、不改变阅读位置 */
.reorder { position: sticky; bottom: 14px; z-index: 30; width: fit-content; margin: -46px auto 14px; display: flex; align-items: center; gap: 8px; padding: 5px 5px 5px 14px; border-radius: var(--r-pill); background: var(--ink); color: #fff; font-size: var(--fs-12); box-shadow: 0 8px 24px rgba(24, 24, 27, 0.25); white-space: nowrap; animation: bb-in var(--dur-fast) var(--ease-out); }
.reorder .btn { height: var(--h-sm); background: rgba(255, 255, 255, 0.14); color: #fff; box-shadow: none; }
.reorder .btn:hover { background: rgba(255, 255, 255, 0.24); }
.reorder .btn .ic { color: #fff; }
.reorder .icon-btn { width: var(--h-sm); height: var(--h-sm); color: rgba(255, 255, 255, 0.75); }
.reorder .icon-btn:hover { background: rgba(255, 255, 255, 0.14); color: #fff; }

/* 单元格内容 */
/* 名称和产品类型不折行也不压缩：表格按内容排开时指数列至少这么宽，放不下就整张表横向滑动，不压到旁边的方格上 */
.nm { display: flex; align-items: center; gap: 4px; min-width: 150px; }
.nm-btn { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; padding: 2px 6px; margin: -2px -6px; border-radius: var(--r-chip); text-align: left; transition: background var(--dur-quick) var(--ease-out); }
.nm-btn:hover { background: var(--hover); }
.nm-btn:hover b { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--ink-4); }
.nm-btn b { display: flex; align-items: center; gap: 6px; font-size: var(--fs-13); font-weight: 600; color: var(--ink); white-space: nowrap; }
.nm-sub { display: flex; align-items: center; line-height: 1.3; font-size: var(--fs-11); color: var(--ink-3); white-space: nowrap; }
.nm-sub > span + span::before { content: "·"; margin: 0 5px; color: var(--ink-4); }
.nm-sub .mono { font-size: var(--fs-11); }
.star { display: grid; place-items: center; flex: none; width: var(--h-sm); height: var(--h-sm); margin-left: -6px; border-radius: var(--r-chip); color: var(--ink-4); transition: color var(--dur-quick) var(--ease-out), background var(--dur-quick) var(--ease-out), transform var(--dur-micro) var(--ease-out); }
.star .ic { width: 15px; height: 15px; }
.star:hover { color: var(--ink-3); background: var(--hover); }
.star.is-on { color: var(--brand); }
.star.is-on .ic { fill: currentColor; }
/* 点亮关注时星标先缩到 0.82 再回弹（Transitions.dev like button，时长按 250ms）；取消关注不播 */
.star.is-pop { animation: star-pop var(--dur-fast) cubic-bezier(0.34, 1.56, 0.64, 1); }
@keyframes star-pop { 30% { transform: scale(0.82); } }
.cell-sub { margin-top: 1px; line-height: 1.3; font-size: var(--fs-12); color: var(--ink-3); white-space: nowrap; font-variant-numeric: tabular-nums; display: flex; align-items: center; gap: 3px; }
.r .cell-sub { justify-content: flex-end; }
.cell-sub.q-delayed, .q-delayed { color: var(--warn); }
.cell-sub.q-missing { color: var(--warn); }
.cell-sub.up { color: var(--up); } .cell-sub.down { color: var(--down); }
.cell-sub.q-provisional { color: var(--ink-2); }
.cell-sub .hi { font-weight: 500; color: var(--up-strong); }
.px { font-size: var(--fs-13); font-weight: 500; font-variant-numeric: tabular-nums; white-space: nowrap; }
.chg { font-size: var(--fs-13); font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.chg.big { font-size: var(--fs-16); }
.chg-sub { font-size: var(--fs-13); font-weight: 500; font-variant-numeric: tabular-nums; white-space: nowrap; }
.txt { font-size: var(--fs-13); }
.chgcell { position: relative; display: inline-flex; justify-content: flex-end; min-width: 72px; padding: 1px 4px; cursor: default; }
/* 最新涨跌数据条（BeUI 盘口行）：数字后面垫一条 14% 的浅红 / 浅绿底，涨跌到二档阈值（默认 5%）占满 */
.chgcell::before { content: ""; position: absolute; right: 0; top: 0; bottom: 0; width: var(--w, 0); border-radius: 3px; }
.chgcell.bar-up::before { background: color-mix(in srgb, var(--up-mark) 14%, transparent); }
.chgcell.bar-down::before { background: color-mix(in srgb, var(--down-mark) 14%, transparent); }
.chgcell .chg { position: relative; }
.spark { display: block; overflow: visible; }
.spark .base { stroke: var(--line-strong); stroke-width: 1; stroke-dasharray: 2 2; }
.spark .ln { fill: none; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.spark .end { stroke: var(--surface); stroke-width: 1.5; }
.spark.up .ln { stroke: var(--up-mark); } .spark.up .end { fill: var(--up-mark); }
.spark.down .ln { stroke: var(--down-mark); } .spark.down .end { fill: var(--down-mark); }
.spark.flat .ln { stroke: var(--ink-4); } .spark.flat .end { fill: var(--ink-4); }
.spark.big { width: 100%; height: 64px; margin: 10px 0 6px; }
.spark-empty { display: inline-flex; align-items: center; height: 26px; padding: 0 4px; color: var(--ink-4); cursor: default; }
/* PE 分位：数字在前，后面一根条（条越长分位越高）；处在低位、高位时数字和整条变绿 / 变红，并写「低位」「高位」；历史不到 2 年的写年数 */
.meter { display: inline-flex; align-items: center; gap: 10px; }
.meter-val { width: 46px; font-size: var(--fs-13); font-weight: 500; font-variant-numeric: tabular-nums; text-align: right; }
.meter.is-low .meter-val { font-weight: 600; color: var(--down-strong); }
.meter.is-high .meter-val { font-weight: 600; color: var(--up-strong); }
/* 刻度定位条（Base UI Meter 的语义、shadcn Slider 的外观，只读）：3px 轨道，两端浅绿、浅红是低位、高位区，中间一道 50% 刻度；
   7px 圆点标当前位置，中间区灰、低位绿、高位红，只描一圈白边、不加投影（一列 28 个点，轻一点才不抢眼）。不从左填满：低位和高位一样醒目 */
.meter-track { position: relative; flex: none; width: 120px; height: 14px; }
.meter-track::before { content: ""; position: absolute; left: 0; right: 0; top: 5.5px; height: 3px; border-radius: 2px;
  background: linear-gradient(90deg, color-mix(in srgb, var(--down-mark) 26%, var(--surface)) 0 var(--lo), var(--canvas) var(--lo) var(--hi), color-mix(in srgb, var(--up-mark) 26%, var(--surface)) var(--hi)); }
.meter-track i { position: absolute; left: 50%; top: 3.5px; bottom: 3.5px; width: 1px; background: var(--line-strong); }
.meter-track b { position: absolute; top: 3.5px; width: 7px; height: 7px; margin-left: -3.5px; border-radius: 50%; background: var(--ink-3); box-shadow: 0 0 0 1.5px var(--surface); }
.meter.is-low .meter-track b { background: var(--down-mark); }
.meter.is-high .meter-track b { background: var(--up-mark); }
/* 「低位」「高位」：宽屏只给读屏（颜色与位置已经说明），手机上收起轨道时显示成标签 */
.meter-tag { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.meter-yr { font-size: var(--fs-12); color: var(--ink-3); white-space: nowrap; }
.meter.is-na .meter-val { color: var(--ink-4); font-weight: 400; }

/* ─── 徽章与状态：shadcn Badge；处理状态、有效性、数据质量分开表达 ─── */
.badge { display: inline-flex; align-items: center; gap: 4px; height: var(--h-badge); padding: 0 8px; border-radius: var(--r-chip); font-size: var(--fs-12); font-weight: 500; line-height: 1; white-space: nowrap; vertical-align: middle;
  --tone: var(--ink-4); --tone-ink: var(--ink-2); color: var(--tone-ink);
  background: color-mix(in srgb, var(--tone) 9%, var(--surface)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--tone) 24%, var(--surface)); }
button.badge { cursor: pointer; transition: box-shadow var(--dur-quick) var(--ease-out), background var(--dur-quick) var(--ease-out); }
button.badge:hover { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--tone) 55%, var(--surface)); }
.badge .ic { width: 12px; height: 12px; stroke-width: 2.2; }
.badge.up { --tone: var(--up-mark); --tone-ink: var(--up-strong); }
.badge.down { --tone: var(--down-mark); --tone-ink: var(--down-strong); }
.badge.note { --tone: var(--ink-3); --tone-ink: var(--ink-2); }
.badge.rt::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--tone); flex: none; }
.badge.is-handled { --tone: var(--ink-4); --tone-ink: var(--ink-3); background: var(--inset); }
.badge.is-handled.rt::before { display: none; }
.badge.is-ignored { text-decoration: line-through; text-decoration-color: var(--ink-4); }
.badges { display: flex; align-items: center; flex-wrap: nowrap; gap: 6px; }
.tag { display: inline-flex; align-items: center; height: 18px; padding: 0 6px; border-radius: var(--r-xs); font-size: var(--fs-11); font-weight: 500; color: var(--ink-3); background: var(--inset); box-shadow: inset 0 0 0 1px var(--line); white-space: nowrap; }
.tag.hk { color: var(--ink-2); }
em.tag { font-style: normal; }
.state { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-12); font-weight: 500; white-space: nowrap; }
.state::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--c); }
.state.pending { --c: var(--brand); color: var(--brand-text); }
.state.done { --c: var(--ink); color: var(--ink); }
.state.ignored { --c: var(--ink-4); color: var(--ink-3); }
.state.upgraded { --c: var(--brand); color: var(--brand-text); font-weight: 600; }
.v { display: inline-flex; align-items: center; height: 20px; padding: 0 6px; border-radius: var(--r-xs); font-size: var(--fs-12); font-weight: 500; white-space: nowrap; }
.v-valid { color: var(--ink-2); background: var(--hover); }
.v-superseded { color: var(--ink-2); background: var(--hover); box-shadow: inset 0 0 0 1px var(--line-strong); }
.v-revoked { color: var(--ink-3); background: var(--hover); text-decoration: line-through; text-decoration-color: var(--ink-4); }
.q { display: inline-flex; align-items: center; gap: 4px; height: 20px; padding: 0 6px; border-radius: var(--r-xs); font-size: var(--fs-12); font-weight: 500; white-space: nowrap; color: var(--ink-2); background: var(--hover); }
.q.q-delayed { color: var(--warn); background: var(--warn-tint); }
.q-missing { color: var(--ink-3); }
.q-live { color: var(--brand-text); background: var(--brand-tint); }
.q-note { color: var(--warn); }
.note-mark { display: inline-flex; align-items: center; gap: 3px; font-size: var(--fs-12); color: var(--ink-3); cursor: default; }

/* ─── 连涨连跌热力格：beUI returns-calendar 的结构；平盘与缺失分别表示 ─── */
/* 色阶说明和前面的日期之间加一道竖线分开 */
.pb .heat-legend { padding-left: 14px; box-shadow: inset 1px 0 0 var(--line); }
.heat-legend { display: inline-flex; align-items: center; gap: 8px; font-size: var(--fs-12); color: var(--ink-3); font-variant-numeric: tabular-nums; }
.heat-legend .bar { width: 96px; height: 6px; border-radius: 6px; background: linear-gradient(90deg, color-mix(in srgb, var(--down-mark) 32%, var(--surface)), color-mix(in srgb, var(--down-mark) 8%, var(--surface)) 45%, var(--inset) 50%, color-mix(in srgb, var(--up-mark) 8%, var(--surface)) 55%, color-mix(in srgb, var(--up-mark) 32%, var(--surface))); box-shadow: inset 0 0 0 1px rgba(24, 24, 27, 0.06); }
.lg-swatch { display: inline-grid; place-items: center; min-width: 24px; height: 18px; padding: 0 4px; border-radius: var(--r-xs); font-size: var(--fs-11); font-weight: 600; }
.lg-swatch.flat { background: var(--inset); box-shadow: inset 0 0 0 1px var(--line-strong); color: var(--ink-2); }
.lg-swatch.miss { background: repeating-linear-gradient(-45deg, var(--inset) 0 3px, var(--surface) 3px 6px); box-shadow: inset 0 0 0 1px var(--warn-line); color: var(--warn); }
.tbl.heat td.hd { padding: 4px 2px; width: 56px; }
.tbl.heat th.hd { padding: 0 2px; text-align: center; }
.hc { position: relative; display: grid; place-items: center; width: 52px; height: 32px; margin: 0 auto; border-radius: var(--r-chip); background: var(--bg, var(--inset)); box-shadow: inset 0 0 0 1px rgba(24, 24, 27, 0.04);
  font-size: var(--fs-12); font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1.1; cursor: default; transition: box-shadow var(--dur-quick) var(--ease-out); }
/* 命中区扩到整格（格子加上下 6、左右 2 的间距）：鼠标在格子之间移动时，十字高亮和提示不闪（BeUI returns calendar） */
.hc::before { content: ""; position: absolute; inset: -6px -2px; }
.hc small { display: block; font-size: var(--fs-11); font-weight: 500; color: color-mix(in srgb, currentColor 70%, transparent); }
.hc.up { color: var(--up-ink); } .hc.down { color: var(--down-ink); }
.hc { transition: opacity var(--dur-quick) var(--ease-out); }
.tbl.heat tbody tr:hover td { background: var(--surface); }
.tbl.heat:has(.hc:hover) .hc { opacity: 0.35; }
.tbl.heat tr:has(.hc:hover) .hc { opacity: 1; }
.tbl.heat:has(td:nth-child(2) .hc:hover) td:nth-child(2) .hc, .tbl.heat:has(td:nth-child(3) .hc:hover) td:nth-child(3) .hc,
.tbl.heat:has(td:nth-child(4) .hc:hover) td:nth-child(4) .hc, .tbl.heat:has(td:nth-child(5) .hc:hover) td:nth-child(5) .hc,
.tbl.heat:has(td:nth-child(6) .hc:hover) td:nth-child(6) .hc, .tbl.heat:has(td:nth-child(7) .hc:hover) td:nth-child(7) .hc,
.tbl.heat:has(td:nth-child(8) .hc:hover) td:nth-child(8) .hc { opacity: 1; }
.tbl.heat:has(td:nth-child(2) .hc:hover) th:nth-child(2), .tbl.heat:has(td:nth-child(3) .hc:hover) th:nth-child(3),
.tbl.heat:has(td:nth-child(4) .hc:hover) th:nth-child(4), .tbl.heat:has(td:nth-child(5) .hc:hover) th:nth-child(5),
.tbl.heat:has(td:nth-child(6) .hc:hover) th:nth-child(6), .tbl.heat:has(td:nth-child(7) .hc:hover) th:nth-child(7),
.tbl.heat:has(td:nth-child(8) .hc:hover) th:nth-child(8) { color: var(--ink); }
.tbl.heat:has(td:nth-child(2) .hc:hover) th:nth-child(2) .dayhead b, .tbl.heat:has(td:nth-child(3) .hc:hover) th:nth-child(3) .dayhead b,
.tbl.heat:has(td:nth-child(4) .hc:hover) th:nth-child(4) .dayhead b, .tbl.heat:has(td:nth-child(5) .hc:hover) th:nth-child(5) .dayhead b,
.tbl.heat:has(td:nth-child(6) .hc:hover) th:nth-child(6) .dayhead b, .tbl.heat:has(td:nth-child(7) .hc:hover) th:nth-child(7) .dayhead b,
.tbl.heat:has(td:nth-child(8) .hc:hover) th:nth-child(8) .dayhead b { color: var(--ink); font-weight: 600; }
.hc.is-flat { background: var(--inset); box-shadow: inset 0 0 0 1px var(--line-strong); color: var(--ink-2); }
.hc.is-miss { background: repeating-linear-gradient(-45deg, var(--inset) 0 3px, var(--surface) 3px 6px); box-shadow: inset 0 0 0 1px var(--warn-line); color: var(--warn); }
.hc.is-empty { background: transparent; box-shadow: inset 0 0 0 1px var(--line); color: var(--ink-4); font-weight: 400; }
.dayhead { display: flex; flex-direction: column; align-items: center; line-height: 1.25; }
.dayhead b { font-weight: 500; font-variant-numeric: tabular-nums; color: var(--ink-2); }
.dayhead span { font-size: var(--fs-11); color: var(--ink-3); }
.streak { display: inline-flex; align-items: center; gap: 4px; height: var(--h-badge); padding: 0 8px; border-radius: var(--r-chip); font-size: var(--fs-12); font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.streak .ic { width: 12px; height: 12px; stroke-width: 2.2; }
.streak.up { color: var(--up-strong); background: color-mix(in srgb, var(--up-mark) 10%, var(--surface)); }
.streak.down { color: var(--down-strong); background: color-mix(in srgb, var(--down-mark) 10%, var(--surface)); }
.streak.flat { color: var(--ink-3); font-weight: 400; padding: 0; }
/* 不到第一档的连续只写字，不加底色 */
.streak.minor { background: none; padding: 0; color: var(--ink-2); font-weight: 500; }
.streak.minor .ic { color: var(--ink-3); }
/* 连续与纪录：当前连续天数 + 占同方向历史纪录的比例；接近、追平、刷新纪录时写出 */
.stk { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; cursor: default; }
.stk .streak { min-width: 86px; }
/* 连续 / 纪录：进度环（Beautiful UI ProgressRing，20px、描边 3）。转过的弧 = 已连天数 ÷ 纪录，灰色；
   接近、追平、刷新纪录时变红 / 绿。尺寸固定，「纪录 N 日」上下对齐。详情里放大到 28px，打开时画一圈进来 */
.ring { flex: none; display: block; }
.ring .rt { fill: none; stroke: var(--canvas); stroke-width: 3; }
.ring .rv { fill: none; stroke: var(--ink-4); stroke-width: 3; stroke-linecap: round; }
.ring.big .rt, .ring.big .rv { stroke-width: 4; }
.stk.up.is-near .ring .rv { stroke: var(--up-mark); }
.stk.down.is-near .ring .rv { stroke: var(--down-mark); }
.sheet-body .ring.big .rv { animation: ring-in 500ms var(--ease-out) backwards 120ms; }
@keyframes ring-in { from { stroke-dasharray: 0 100; } }
.stk-rec { font-size: var(--fs-12); color: var(--ink-3); font-variant-numeric: tabular-nums; }
.stk-rec b { font-weight: 600; }
.stk.up .stk-rec b { color: var(--up-strong); } .stk.down .stk-rec b { color: var(--down-strong); }

/* ─── 预警记录 ─── */
.sig-toolbar .search .input { width: 200px; }
.sig-segs { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.c-check { width: 40px; padding-right: 0 !important; }
.tbl .c-time { width: 72px; }
/* 列宽固定（shadcn Data Table）：骨架到出数、换页、换筛选都不跳；多出来的宽度给「触发时情况」 */
/* 表格区宽出来的部分加到「指数」「规则」两列（每列最多 72px），「触发时情况」和右边的处理按钮不再隔得老远 */
#tSig { --x: clamp(0px, calc((100cqw - 1180px) / 3), 72px); table-layout: fixed; }
#tSig .c-idx { width: calc(200px + var(--x)); }
#tSig .c-rule { width: calc(196px + var(--x)); }
#tSig .c-acts { width: 156px; }
.sig-what-m { display: none; }
/* 勾选的行整行加底色 */
#tSig tbody tr.is-sel td { background: var(--canvas); }
#tSig tbody tr.is-sel:hover td { background: var(--hover-2); }
/* 处理按钮：表格区窄时只留图标；宽时图标加字（已跟进 / 忽略 / 恢复），当前状态那格留空，三个位置不变 */
.act .act-l { display: none; }
@container (min-width: 1180px) {
  #tSig .c-acts { width: 264px; }
  #tSig .act { display: inline-flex; align-items: center; gap: 4px; width: auto; padding: 0 8px 0 6px; font-size: var(--fs-12); font-weight: 500; }
  #tSig .act .act-l { display: inline; }
  #tSig .act .ic { width: 14px; height: 14px; }
}
#tSig tbody tr:hover .act:not(.is-placeholder):hover { background: var(--hover-2); color: var(--ink); }
.c-time .tag { margin-left: 6px; }
.c-time .mono { font-size: var(--fs-12); }
.c-acts { white-space: nowrap; }
/* 整行可点开详情 */
#tSig tbody tr[data-id] { cursor: pointer; }
#tSig tbody tr[data-id]:hover td { background: var(--hover); }
.c-uacts { white-space: nowrap; }
.acts-cell { display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
.acts { display: inline-flex; align-items: center; gap: 2px; }
.act { display: inline-grid; width: var(--h-sm); height: var(--h-sm); vertical-align: middle; }
.act:hover { color: var(--ink); }
.act.is-placeholder { visibility: hidden; }
/* 状态、时段分段还没有按钮时不占位 */
.seg:not(:has(button)) { display: none; }
.sig-t-m, .nm-sub > .sig-t-m + span::before { display: none; }
/* 批量操作：勾选后浮在表格底部的深色条（shadcn Data Table 的选中操作条 + Transitions.dev 上浮），不挤动表格 */
.batchbar { position: sticky; bottom: 14px; z-index: 30; display: flex; align-items: center; gap: 6px; width: fit-content; max-width: calc(100% - 24px); margin: -58px auto 14px; padding: 6px 6px 6px 16px; border-radius: var(--r-card); background: var(--ink); color: #fafafa; font-size: var(--fs-13);
  box-shadow: 0 12px 32px -8px rgba(24, 24, 27, 0.45), inset 0 0 0 1px rgba(255, 255, 255, 0.06); animation: bb-in var(--dur-fast) var(--ease-out); }
@keyframes bb-in { from { opacity: 0; transform: translateY(8px) scale(0.98); } to { opacity: 1; transform: none; } }
/* 收起：只淡出、不反向位移（Transitions.dev texts reveal），150ms 后再隐藏 */
:is(.batchbar, .reorder).is-leaving { animation: bb-out var(--dur-quick) var(--ease-out) forwards; pointer-events: none; }
@keyframes bb-out { to { opacity: 0; } }
.table-card:has(.batchbar:not([hidden])) .table-scroll { padding-bottom: 60px; }
.batchbar .bb-n { display: inline-flex; align-items: baseline; flex-wrap: wrap; gap: 2px 8px; margin-right: 8px; white-space: nowrap; }
.batchbar .bb-n b { font-weight: 600; font-variant-numeric: tabular-nums; }
.batchbar .muted { font-size: var(--fs-12); color: #a1a1aa; }
.batchbar .link-btn { color: #fdba74; font-size: var(--fs-12); }
.batchbar .btn { height: var(--h-sm); background: rgba(255, 255, 255, 0.12); color: #fafafa; box-shadow: none; }
.batchbar .btn:hover { background: rgba(255, 255, 255, 0.2); }
.batchbar .btn .ic { color: currentColor; }
.batchbar .btn-primary { background: var(--brand-strong); }
.batchbar .btn-primary:hover { background: var(--brand-hover); }
.batchbar .btn:disabled { background: rgba(255, 255, 255, 0.08); color: rgba(255, 255, 255, 0.4); }
.batchbar .icon-btn { color: rgba(255, 255, 255, 0.7); }
.batchbar .icon-btn:hover { background: rgba(255, 255, 255, 0.14); color: #fff; }
.pager { display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding: 10px 12px; box-shadow: 0 -1px 0 var(--line); font-size: var(--fs-12); color: var(--ink-3); font-variant-numeric: tabular-nums; }
.pager span { margin-right: auto; }

/* ─── 详情面板：shadcn Sheet 结构；桌面 480px 右侧，窄屏全宽覆盖 ─── */
/* 打开 220ms、关闭 150ms（Transitions.dev：退场比进场快）；关闭过程中遮罩和面板不再接点击，点到的是下面的页面 */
.sheet-mask { position: fixed; inset: 0; z-index: calc(var(--z-dialog) - 2); background: rgba(24, 24, 27, 0.18); opacity: 0; pointer-events: none; transition: opacity var(--dur-quick) var(--ease-out); }
.sheet-mask.is-open { opacity: 1; pointer-events: auto; transition-duration: var(--dur-sheet); }
.sheet { position: fixed; top: 0; right: 0; bottom: 0; z-index: calc(var(--z-dialog) - 1); width: min(480px, 100vw); display: flex; flex-direction: column; background: var(--surface); box-shadow: -1px 0 0 var(--line), -16px 0 48px rgba(24, 24, 27, 0.14);
  transform: translateX(24px); opacity: 0; pointer-events: none; transition: transform var(--dur-quick) var(--ease-out), opacity var(--dur-quick) var(--ease-out); }
.sheet.is-open { transform: none; opacity: 1; pointer-events: auto; transition-duration: var(--dur-sheet); }
.sheet:focus, .sheet:focus-visible { outline: none; }
.sheet-head { display: flex; align-items: flex-start; gap: 10px; padding: 16px 16px 14px 20px; box-shadow: 0 1px 0 var(--line); }
.sheet-title { flex: 1; min-width: 0; }
.sheet-title h2 { font-size: var(--fs-16); font-weight: 600; letter-spacing: -0.01em; }
.sheet-sub { display: flex; align-items: center; flex-wrap: wrap; gap: 2px; margin-top: 4px; font-size: var(--fs-12); color: var(--ink-3); }
.sheet-sub .dot-sep { margin: 0 6px; }
.sheet-body { flex: 1; overflow: auto; padding: 0 20px 20px; overscroll-behavior: contain; }
/* 骨架换成内容时，前几个分区依次淡入（Transitions.dev skeleton reveal + stagger：错开 40ms，总长 300ms）；之后切换预警、改状态不重播 */
.sheet-body.is-reveal > .ds { animation: ds-in var(--dur-menu) var(--ease-out) backwards; }
.sheet-body.is-reveal > .ds:nth-child(2) { animation-delay: 40ms; }
.sheet-body.is-reveal > .ds:nth-child(3) { animation-delay: 80ms; }
.sheet-body.is-reveal > .ds:nth-child(n + 4) { animation-delay: 120ms; }
@keyframes ds-in { from { opacity: 0; transform: translateY(6px); filter: blur(2px); } }
.sheet-foot { display: flex; align-items: center; gap: 8px; padding: 12px 16px 12px 20px; box-shadow: 0 -1px 0 var(--line); background: var(--surface); }
.foot-gap { flex: 1; }
.ds { padding: 16px 0; box-shadow: 0 1px 0 var(--line-soft); }
.ds:last-child { box-shadow: none; }
.ds h3 { display: flex; align-items: center; gap: 6px; margin-bottom: 10px; font-size: var(--fs-12); font-weight: 600; color: var(--ink-3); }
.ds-note { display: flex; gap: 6px; margin-top: 10px; font-size: var(--fs-12); color: var(--ink-3); line-height: 1.5; }
.ds-note .ic { margin-top: 2px; }
.kv { display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 8px 12px; font-size: var(--fs-13); }
.kv dt { color: var(--ink-3); font-size: var(--fs-12); padding-top: 1px; }
.kv dd { min-width: 0; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.kv dd .muted { font-size: var(--fs-12); }
/* 详情 · 区间表现：发散条。中间一根零线，涨向右（红）、跌向左（绿），三个一起比，按三者里最大的缩放（至少 ±5%） */
.dv { display: inline-flex; align-items: center; gap: 12px; }
.dv .chg { display: inline-block; width: 58px; }
.dv-track { position: relative; flex: none; width: 160px; height: 12px; }
.dv-track::before { content: ""; position: absolute; left: 50%; top: 0; bottom: 0; width: 1px; background: var(--line-strong); }
.dv-track i { position: absolute; top: 3px; height: 6px; border-radius: 2px; }
.dv-track i.up { background: var(--up-mark); }
.dv-track i.down { background: var(--down-mark); }
/* 详情 · 连涨连跌「当前」：连涨连跌标签后面跟天数格和离纪录还差几天 */
.st-now { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
/* 详情 · PE 分位：表格那条刻度定位条放大（圆点 12px），下面是 PE 历史走势与低位、中位、高位三条线（口径同分位，服务端算好） */
.pe-pos { margin-top: 14px; }
.pe-head { display: grid; grid-template-columns: 88px auto minmax(0, 1fr); column-gap: 12px; align-items: baseline; }
.pe-k { font-size: var(--fs-12); color: var(--ink-3); }
.pe-v { font-size: var(--fs-20); font-weight: 600; line-height: 1.2; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.pe-pos.is-low .pe-v { color: var(--down-strong); }
.pe-pos.is-high .pe-v { color: var(--up-strong); }
.pe-track { position: relative; height: 16px; margin: 10px 6px 0; }
.pe-track::before { content: ""; position: absolute; left: 0; right: 0; top: 6.5px; height: 3px; border-radius: 2px;
  background: linear-gradient(90deg, color-mix(in srgb, var(--down-mark) 26%, var(--surface)) 0 var(--lo), var(--canvas) var(--lo) var(--hi), color-mix(in srgb, var(--up-mark) 26%, var(--surface)) var(--hi)); }
.pe-track i { position: absolute; left: 50%; top: 3px; bottom: 3px; width: 1px; background: var(--line-strong); }
.pe-track b { position: absolute; top: 3.5px; width: 9px; height: 9px; margin-left: -4.5px; border-radius: 50%; background: var(--ink-2); box-shadow: 0 0 0 2px var(--surface); }
.pe-pos.is-low .pe-track b { background: var(--down-mark); }
.pe-pos.is-high .pe-track b { background: var(--up-mark); }
.pe-scale { position: relative; height: 16px; margin: 0 6px; font-size: var(--fs-11); color: var(--ink-4); font-variant-numeric: tabular-nums; }
.pe-scale span { position: absolute; top: 2px; transform: translateX(-50%); white-space: nowrap; }
.pe-sub { margin: 14px 0 6px; font-size: var(--fs-12); color: var(--ink-3); }
.pe-chart { position: relative; height: 96px; margin-right: 76px; }
.pe-chart svg { display: block; width: 100%; height: 100%; overflow: visible; }
.pe-chart .z-hi { fill: color-mix(in srgb, var(--up-mark) 6%, var(--surface)); }
.pe-chart .z-lo { fill: color-mix(in srgb, var(--down-mark) 6%, var(--surface)); }
.pe-chart .g { stroke: var(--line-strong); stroke-width: 1; vector-effect: non-scaling-stroke; }
.pe-chart .g.mid { stroke-dasharray: 3 3; }
.pe-chart .ln { fill: none; stroke: var(--ink-3); stroke-width: 1.5; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.pe-last { position: absolute; left: 100%; width: 8px; height: 8px; margin: -4px 0 0 -4px; border-radius: 50%; background: var(--ink-2); box-shadow: 0 0 0 2px var(--surface); }
.pe-pos.is-low .pe-last { background: var(--down-mark); }
.pe-pos.is-high .pe-last { background: var(--up-mark); }
.pe-lb { position: absolute; left: calc(100% + 10px); transform: translateY(-50%); font-size: var(--fs-11); color: var(--ink-3); white-space: nowrap; font-variant-numeric: tabular-nums; }
.pe-axis { display: flex; justify-content: space-between; margin: 4px 76px 0 0; font-size: var(--fs-11); color: var(--ink-4); font-variant-numeric: tabular-nums; }
.dq-main { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.dq-px { font-size: var(--fs-20); font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.dq-px small { margin-left: 3px; font-size: var(--fs-12); font-weight: 500; color: var(--ink-3); }
.dq-meta { margin-top: 4px; font-size: var(--fs-12); color: var(--ink-3); line-height: 1.6; }
.dq-meta + .kv, .dq-meta + .spark.big { margin-top: 12px; }
.fcard { padding: 14px; border-radius: var(--r-card); background: var(--inset); box-shadow: inset 0 0 0 1px var(--line); }
.fcard-head { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.fcard-head .state { margin-left: auto; }
.fcard .kv { grid-template-columns: 72px minmax(0, 1fr); }
.note-inline { font-size: var(--fs-12); color: var(--ink-3); }
.note-field { display: grid; gap: 6px; margin-top: 12px; font-size: var(--fs-12); color: var(--ink-3); }
.note-field textarea { width: 100%; font-size: var(--fs-13); }
.callout { display: flex; gap: 8px; margin-bottom: 12px; padding: 10px 12px; border-radius: var(--r-ctl); background: var(--brand-tint); box-shadow: inset 0 0 0 1px var(--brand-line); font-size: var(--fs-12); color: var(--ink-2); }
.callout b { display: block; color: var(--brand-text); font-size: var(--fs-13); }
.callout > div > span { display: block; }
.callout.warn { background: var(--warn-tint); box-shadow: inset 0 0 0 1px var(--warn-line); }
.callout.warn b { color: var(--warn); }
.callout .ic { margin-top: 2px; color: var(--brand-text); }
.callout.warn .ic { color: var(--warn); }
.callout .up-arrow { transform: rotate(180deg); }
.callout-act { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.events { margin-top: 12px; font-size: var(--fs-12); }
.events summary { cursor: pointer; color: var(--ink-2); width: fit-content; border-radius: var(--r-xs); }
.events ol { list-style: none; display: grid; gap: 6px; margin-top: 8px; padding-left: 2px; color: var(--ink-2); }
.events time { margin-right: 8px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.batch-inline { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 12px; font-size: var(--fs-12); color: var(--ink-3); }
.batch-inline > span { margin-right: auto; }
.bi-acts { display: flex; gap: 8px; margin-left: auto; }
.sig-list { display: grid; gap: 6px; margin-top: 12px; }
.sig-chip { display: flex; align-items: center; gap: 8px; min-height: 36px; padding: 6px 10px; border-radius: var(--r-ctl); box-shadow: inset 0 0 0 1px var(--line); font-size: var(--fs-12); color: var(--ink-3); text-align: left; transition: background var(--dur-quick) var(--ease-out); }
.sig-chip:hover { background: var(--inset); }
.sig-chip .state { margin-left: auto; }
.sig-chip.is-revoked { color: var(--ink-3); }
.sig-chip.is-revoked .badge { text-decoration: line-through; }
.hc7-row { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; margin-top: 12px; }
.hc7 { display: grid; place-items: center; height: 42px; border-radius: var(--r-chip); background: var(--bg, var(--inset)); font-variant-numeric: tabular-nums; line-height: 1.15; }
.hc7 b { font-size: var(--fs-12); font-weight: 600; }
.hc7 small { font-size: var(--fs-11); color: color-mix(in srgb, currentColor 70%, transparent); }
.hc7.up { color: var(--up-ink); } .hc7.down { color: var(--down-ink); }
.hc7.flat { box-shadow: inset 0 0 0 1px var(--line-strong); }
.hc7.miss { background: repeating-linear-gradient(-45deg, var(--inset) 0 3px, var(--surface) 3px 6px); box-shadow: inset 0 0 0 1px var(--warn-line); color: var(--warn); }
.prods { list-style: none; display: grid; gap: 8px; }
.prods li { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: var(--fs-13); }
.prods .prod-n { display: flex; align-items: baseline; flex-wrap: wrap; gap: 2px 8px; min-width: 0; }
.prods .prod-n .mono { font-size: var(--fs-12); color: var(--ink-3); }
.prods .prod-t { display: inline-flex; gap: 6px; flex: none; }
.tag.pending { color: var(--warn); background: transparent; box-shadow: inset 0 0 0 1px var(--warn-line); }
.sk-block { display: grid; gap: 12px; padding: 16px 0; }
.sk-block .sk { height: 12px; }
@media (max-width: 720px) { .sheet { width: 100vw; } .kv { grid-template-columns: 84px minmax(0, 1fr); } }

/* ─── 规则设置 ─── */
/* 规则设置：宽屏分左右两栏铺满，窄屏一栏；每行 开关 | 名称 | 阈值 | 说明 四列对齐，阈值上下对得齐 */
.rules-list { display: flex; flex-direction: column; gap: 16px; }
@media (min-width: 1280px) {
  .rules-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
  .rules-col { display: grid; gap: 16px; min-width: 0; }
  .rules-list .rrow { grid-template-columns: 32px 136px 240px minmax(0, 1fr); column-gap: 12px; }
}
.rules-err { grid-column: 1 / -1; }
.rsec { background: var(--surface); border-radius: var(--r-card); box-shadow: var(--sh-card); overflow: hidden; }
.rsec-h { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 8px 16px; }
.rsec-h h3 { font-size: var(--fs-13); font-weight: 600; color: var(--ink); }
.rsec-h .sub { font-size: var(--fs-12); color: var(--ink-3); }
.rsec-h .gap { margin-left: auto; }
.rrow { display: grid; grid-template-columns: 32px 150px 236px minmax(0, 1fr); align-items: center; column-gap: 16px; min-height: 44px; padding: 6px 16px; box-shadow: inset 0 1px 0 var(--line-soft); }
.rname { font-size: var(--fs-13); font-weight: 500; color: var(--ink); white-space: nowrap; }
.rtier { margin-left: 6px; padding: 1px 5px; border-radius: var(--r-xs); font-style: normal; font-size: var(--fs-11); font-weight: 500; color: var(--ink-3); background: var(--inset); box-shadow: inset 0 0 0 1px var(--line); }
.rparams { display: flex; align-items: center; gap: 6px; font-size: var(--fs-13); color: var(--ink-2); white-space: nowrap; }
.rparams .num-in { margin: 0; }
/* 阈值小图放在输入框下面第二行，正好对着它画的那几个数（只有这几行变高） */
.rparams.has-viz { flex-wrap: wrap; row-gap: 6px; padding: 2px 0; }
.rviz { flex-basis: 100%; display: flex; align-items: center; gap: 6px; font-size: var(--fs-11); color: var(--ink-4); font-variant-numeric: tabular-nums; }
.rviz:empty { display: none; }
/* 两档刻度尺（BeUI Range Slider Ruler 的刻度，只读）：每小格一个单位、每 5 格一根长刻度；一档到二档浅灰、二档以外深灰；圆点是一档、二档 */
.tier { position: relative; flex: none; width: 150px; height: 16px; }
.tier .tk { position: absolute; left: 0; right: 0; top: 0; height: 4px; background: repeating-linear-gradient(90deg, var(--line-strong) 0 1px, transparent 1px var(--step)); }
.tier .tk5 { position: absolute; left: 0; right: 0; top: 0; height: 7px; background: repeating-linear-gradient(90deg, var(--ink-4) 0 1px, transparent 1px var(--step5)); box-shadow: inset -1px 0 0 var(--ink-4); }
.tier::after { content: ""; position: absolute; left: 0; right: 0; top: 11px; height: 3px; border-radius: 2px; background: linear-gradient(90deg, var(--canvas) 0 var(--t1), #d4d4d8 var(--t1) var(--t2), var(--ink-4) var(--t2)); }
.tier b { position: absolute; z-index: 1; top: 8.5px; width: 8px; height: 8px; margin-left: -4px; border-radius: 50%; background: var(--ink-3); box-shadow: 0 0 0 2px var(--surface); }
.tier .m1 { left: var(--t1); }
.tier .m2 { left: var(--t2); background: var(--ink); }
.rrow.is-param .tier b { box-shadow: 0 0 0 2px var(--inset); }
/* PE 标注：和量价估值表同款的分位轨道；深绿短线是「PE 分位低位」提醒的触发线 */
.pez { position: relative; flex: none; width: 150px; height: 12px; }
.pez::before { content: ""; position: absolute; left: 0; right: 0; top: 4.5px; height: 3px; border-radius: 2px; background: linear-gradient(90deg, color-mix(in srgb, var(--down-mark) 26%, var(--surface)) 0 var(--lo), var(--canvas) var(--lo) var(--hi), color-mix(in srgb, var(--up-mark) 26%, var(--surface)) var(--hi)); }
.pez i { position: absolute; left: 50%; top: 1px; bottom: 1px; width: 1px; background: var(--line-strong); }
.pez b { position: absolute; left: var(--trig); top: 0; bottom: 0; width: 2px; margin-left: -1px; border-radius: 1px; background: var(--down-strong); }
.rnote { font-size: var(--fs-12); line-height: 1.5; color: var(--ink-3); }
.rnote .pv { color: var(--ink-2); font-weight: 500; }
.rrow.is-off .rname, .rrow.is-off .rparams, .rrow.is-off .rnote { opacity: 0.45; }
.rrow.is-wide .rnote { grid-column: 3 / -1; }
.rrow.is-wide .rname { white-space: normal; }
/* 改过、还没保存的行：左侧一道墨色竖线 */
.rrow.is-dirty { box-shadow: inset 2px 0 0 var(--ink), inset 0 1px 0 var(--line-soft); }
/* 本区共用的数：灰底行放在区首，下面的规则行显示生效值（粗体，不可在行内改） */
.rrow.is-param { background: var(--inset); }
.rrow.is-param .rname { color: var(--ink-2); }
.rico { display: grid; place-items: center; width: 32px; color: var(--ink-4); }
.rparams .pv { font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.rname[data-tip] { cursor: help; }
/* 标题与「保存」在滚动时固定在顶部 */
#p-rules .page-head { position: sticky; top: calc(var(--topbar) + var(--tabbar)); z-index: 6; margin: -12px -24px 16px; padding: 12px 24px; background: var(--page); transition: box-shadow var(--dur-quick) var(--ease-out); }
#p-rules .page-head.is-stuck { box-shadow: 0 1px 0 var(--line); }
.dirty { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-12); color: var(--warn); opacity: 0; visibility: hidden; transition: opacity var(--dur-quick) var(--ease-out), visibility 0s linear var(--dur-quick); }
.dirty::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--warn); }
.dirty.is-on { opacity: 1; visibility: visible; transition-delay: 0s; }
.form-alert { display: flex; gap: 8px; margin-bottom: 12px; padding: 10px 12px; border-radius: var(--r-card); background: var(--warn-tint); box-shadow: inset 0 0 0 1px var(--warn-line); color: var(--warn); font-size: var(--fs-13); }
.form-alert ul { margin: 4px 0 0 16px; color: var(--ink-2); font-size: var(--fs-12); }

/* ─── 系统运维 ─── */
/* 从上到下：状态总览 → 状态条 → 宽屏两栏：左栏看状态，右栏放手动操作与日历。
   窄屏两栏上下接着排，阅读顺序与 Tab 顺序一致 */
.ops { display: flex; flex-direction: column; gap: 16px; }
.ops-cols { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.ops-col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
/* 系统运维、数据中台：按页面内容区自己的宽度分两栏（容器查询），浏览器开侧边栏时也是两栏；右栏占三成左右，380–460px */
.ops { container-type: inline-size; }
@container (min-width: 1160px) { .ops-cols { grid-template-columns: minmax(0, 1fr) clamp(380px, 32cqw, 460px); align-items: start; } }
.ops :is(section, details).card { scroll-margin-top: calc(var(--chrome) + 16px); }
/* 从「需要处理」跳过来：区块描边闪一下，1.4s 内退回 */
.ops .card.is-flash { animation: ops-flash 1.4s var(--ease-out); }
.ops .card:focus { outline: none; }
@keyframes ops-flash { 0%, 35% { box-shadow: 0 0 0 1px var(--warn), 0 0 0 5px color-mix(in srgb, var(--warn) 16%, transparent); } 100% { box-shadow: var(--sh-card); } }

/* 状态总览：一张横条，左侧 32px 图标框（Beautiful UI 空状态同款）+ 结论，右侧下一个到点任务；有问题时整条琥珀色、逐条列出 */
.ops-hero { display: flex; align-items: flex-start; gap: 12px; min-height: 64px; padding: 14px 16px; border-radius: var(--r-card); background: var(--surface); box-shadow: var(--sh-card); }
.hero-main { flex: 1; min-width: 0; display: flex; align-items: flex-start; gap: 12px; }
.hero-side:empty { display: none; }
.hero-ic { display: grid; place-items: center; flex: none; width: 32px; height: 32px; border-radius: var(--r-ctl); background: var(--inset); box-shadow: inset 0 0 0 1px var(--line); color: var(--ink-2); }
.hero-ic .ic { width: 17px; height: 17px; }
.hero-t { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; gap: 2px; min-height: 32px; }
.hero-t > b { font-size: var(--fs-14); font-weight: 600; line-height: 1.4; color: var(--ink); }
.hero-t > span { font-size: var(--fs-12); color: var(--ink-3); }
.hero-side { flex: none; align-self: center; margin-left: 16px; font-size: var(--fs-12); color: var(--ink-3); white-space: nowrap; font-variant-numeric: tabular-nums; }
.hero-side b { font-weight: 600; color: var(--ink); }
.ops-hero.is-warn { background: var(--warn-tint); box-shadow: inset 0 0 0 1px var(--warn-line); }
.ops-hero.is-warn .hero-ic { color: var(--warn); background: var(--surface); box-shadow: inset 0 0 0 1px var(--warn-line); }
.ops-hero.is-warn .hero-t > b { color: var(--warn); }
.ops-hero.is-warn .hero-side { align-self: flex-start; padding-top: 7px; }
.hero-list { list-style: none; display: grid; gap: 2px; margin-top: 4px; }
.hero-list li { position: relative; padding-left: 13px; font-size: var(--fs-13); line-height: 24px; color: var(--ink-2); }
.hero-list li::before { content: ""; position: absolute; left: 0; top: 10px; width: 5px; height: 5px; border-radius: 50%; background: var(--warn); }
.hero-list li > span[data-tip] { cursor: help; }
.hero-acts { display: inline-flex; gap: 12px; margin-left: 12px; white-space: nowrap; }
.hero-list .link { height: 22px; padding: 0 2px; border-radius: var(--r-xs); color: var(--warn); font-weight: 600; }
.hero-list .link:hover { color: var(--ink); }

/* 概况：四张卡片，每张下面一条小图（Beautiful UI Insight Cards 的分段条、Rare UI Step Player 的进度格），颜色和下面区块同一口径 */
.ops-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.kpi { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border-radius: var(--r-card); background: var(--surface); box-shadow: var(--sh-card); }
.kpi-l { font-size: var(--fs-12); color: var(--ink-3); }
.kpi-v { font-size: var(--fs-20); font-weight: 600; line-height: 1.2; color: var(--ink); font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.kpi-v small { font-size: var(--fs-13); font-weight: 500; color: var(--ink-3); letter-spacing: 0; }
.kpi-s { margin-top: auto; font-size: var(--fs-12); color: var(--ink-3); }
.kpi.is-warn .kpi-s, .kpi.is-bad .kpi-s { color: var(--warn); } .kpi.is-bad .kpi-s { font-weight: 600; }
.kpi.is-warn, .kpi.is-bad { background: var(--warn-tint); box-shadow: inset 0 0 0 1px var(--warn-line); }
.kpi[data-tip] { cursor: help; }
.kpi-mix, .kpi-pips, .kpi-keys { display: flex; gap: 3px; height: 8px; margin: 6px 0 4px; }
.kpi-mix { border-radius: 3px; overflow: hidden; }
.kpi-mix i { display: block; min-width: 4px; }
.kpi-mix:empty { background: var(--canvas); }
.kpi-mix .m-fresh { background: var(--line-strong); }
.kpi-mix .m-stale { background: var(--warn-line); }
.kpi-mix .m-missing { background: var(--warn); }
.pip { flex: 1; border-radius: 3px; background: var(--canvas); }
.pip.is-ok { background: var(--line-strong); }
.pip.is-retry, .pip.is-partial { background: var(--warn-line); }
.pip.is-failed, .pip.is-late { background: var(--warn); }
.pip.is-upcoming, .pip.is-due { background: var(--surface); box-shadow: inset 0 0 0 1px var(--line-strong); }
.pip.is-off { background: repeating-linear-gradient(90deg, var(--line-strong) 0 2px, transparent 2px 5px); }
/* 下一个到点任务那格：拉长，按离它的时间填品牌色（当前位置） */
.pip.is-next { flex: 3; overflow: hidden; box-shadow: inset 0 0 0 1px var(--line-strong); }
.pip.is-next b { display: block; height: 100%; border-radius: 3px; background: var(--brand); transition: width var(--dur-fast) var(--ease-out); }
.kpi-keys i { flex: 1; border-radius: 3px; background: var(--canvas); overflow: hidden; }
.kpi-keys b { display: block; height: 100%; border-radius: 3px; background: var(--ink-4); }
.kpi.is-warn .kpi-keys b { background: var(--warn); }
.kpi-keys i.is-out b { background: var(--warn); }
/* 运维页概况保持一条紧凑状态栏；详细数值留在下方可展开区块。 */
#p-ops .ops-kpis { gap: 0; border-radius: var(--r-card); background: var(--surface); box-shadow: var(--sh-card); overflow: hidden; }
#p-ops .ops-kpis .kpi { gap: 3px; min-width: 0; padding: 12px 16px; border-radius: 0; box-shadow: none; }
#p-ops .ops-kpis .kpi + .kpi { box-shadow: inset 1px 0 0 var(--line-soft); }
#p-ops .ops-kpis .kpi.is-warn, #p-ops .ops-kpis .kpi.is-bad { box-shadow: inset 1px 0 0 var(--warn-line); }
#p-ops .ops-kpis .kpi-v { font-size: var(--fs-16); line-height: 1.3; }
#p-ops .ops-kpis .kpi-s { margin-top: 0; line-height: 1.4; }
#p-ops :is(.ops-kpis, .ops-cols)[hidden] { display: none; }
#p-ops #ops-tasks[hidden] { display: none; }

/* 今日任务：竖向时间线（Beautiful UI Thinking Steps + BeUI Todo List）。节点：成功灰底白勾、整行降为次要色；等待琥珀描边时钟；失败、超时琥珀实心；
   未到时间、不运行是虚线环；「现在」之前的连线深、之后浅，「现在」是品牌色小点加细线（当前位置）。右侧小竖条是近 10 个工作日（Rare UI GitHub Activity） */
.tl { --tl-x: calc(16px + 44px + 12px + 10px); list-style: none; padding: 6px 0; }
.tl-row, .tl-now { position: relative; display: grid; grid-template-columns: 44px 20px minmax(0, 1fr) auto auto; column-gap: 12px; padding: 0 16px; }
.tl-row { align-items: start; padding-top: 10px; padding-bottom: 10px; }
.tl-row::before, .tl-row::after, .tl-now::before { content: ""; position: absolute; left: calc(var(--tl-x) - 0.75px); width: 1.5px; background: var(--ink-4); }
.tl-row::before { top: 0; height: 10px; }
.tl-row::after { top: 30px; bottom: 0; }
.tl-now::before { top: 0; bottom: 0; background: linear-gradient(180deg, var(--ink-4) 50%, var(--line) 50%); }
.tl > :first-child::before, .tl > :last-child::after { display: none; }
.tl > .tl-now:first-child::before { display: block; top: 50%; background: var(--line); }
.tl > .tl-now:last-child::before { bottom: 50%; background: var(--ink-4); }
.tl-row.is-future::before, .tl-row.is-future::after { background: var(--line); }
.tl-t { font-size: var(--fs-13); font-weight: 600; line-height: 20px; color: var(--ink); font-variant-numeric: tabular-nums; }
.tl-node { position: relative; z-index: 1; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--surface); color: var(--ink-4); }
.tl-node svg:not(.ic) { position: absolute; inset: 0; width: 20px; height: 20px; }
.tl-node .ic { width: 12px; height: 12px; stroke-width: 2.5; }
.tl-row.is-ok .tl-node { background: var(--ink-4); color: #fff; }
.tl-row.is-ok :is(.tl-t, .tl-h b) { color: var(--ink-2); font-weight: 500; }
.tl-row.is-ok .tl-sum { color: var(--ink-3); }
.tl-row.is-wait .tl-node { background: var(--warn-tint); box-shadow: inset 0 0 0 1.5px var(--warn); color: var(--warn); }
.tl-row.is-bad .tl-node { background: var(--warn); color: #fff; }
.tl-row.is-bad .tl-node .ic { width: 11px; height: 11px; margin-top: -1px; }
.tl-row.is-next .tl-node { color: var(--ink-2); }
.tl-row.is-off .tl-node { color: var(--line-strong); }
.tl-row.is-off :is(.tl-t, .tl-h b) { color: var(--ink-3); font-weight: 500; }
.tl-row.is-todo:not(.is-next) .tl-t { color: var(--ink-2); font-weight: 500; }
.tl-c { min-width: 0; }
.tl-h { display: flex; align-items: baseline; flex-wrap: wrap; gap: 0 8px; line-height: 20px; }
.tl-h b { font-size: var(--fs-13); font-weight: 600; color: var(--ink); }
.tl-what { font-size: var(--fs-12); color: var(--ink-3); }
.tl-sum { margin-top: 3px; font-size: var(--fs-12); line-height: 1.5; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.tl-sum[data-tip] { cursor: help; }
/* 近 10 个工作日：14×14 方格，一列一天；最上面一行在每周一写日期、今天写「今」（橙色）；周一前多留 6px 分开两周 */
.tl-hist { display: flex; gap: 3px; height: 14px; margin-top: 3px; margin-left: 4px; }
.tl-legend { font-size: var(--fs-11); color: var(--ink-3); white-space: nowrap; cursor: help; }
.tl-hist i { flex: none; width: 14px; border-radius: 3px; background: var(--canvas); transition: transform var(--dur-quick) var(--ease-out); }
.tl-hist i:hover { transform: scale(1.15); }
.tl-hist i.is-mon { margin-left: 6px; }
/* 日期表头：和下面的方格同宽对齐 */
.tl-days { display: grid; grid-template-columns: 44px 20px minmax(0, 1fr) auto auto; column-gap: 12px; align-items: end; padding: 2px 16px 4px; }
.tl-days .tl-dl { font-size: var(--fs-11); line-height: 14px; color: var(--ink-4); }
.tl-days .tl-hist { height: auto; margin-top: 0; }
.tl-days .tl-hist i { height: auto; background: none; overflow: visible; white-space: nowrap; font-style: normal; font-size: var(--fs-11); line-height: 14px; text-align: left; color: var(--ink-4); font-variant-numeric: tabular-nums; }
.tl-days .tl-hist i.is-today { color: var(--brand-strong); font-weight: 600; text-align: center; }
.tl-days + .tl-row::before, .tl-days + .tl-now::before { display: none; }
.tl-hist .is-ok { background: var(--line-strong); }
.tl-hist .is-part { background: var(--warn-line); }
.tl-hist .is-fail { background: var(--warn); }
.tl-hist .is-todo { background: var(--surface); box-shadow: inset 0 0 0 1px var(--line-strong); }
.tl-st { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; min-width: 120px; line-height: 20px; }
.tl-note { font-size: var(--fs-12); line-height: 1.4; color: var(--ink-3); text-align: right; white-space: nowrap; }
.tl-row.is-next .tl-note { color: var(--ink-2); font-weight: 500; }
.tl-now { align-items: center; height: 22px; }
.tl-now .tl-t { font-size: var(--fs-12); color: var(--brand-text); }
.tl-now::after { content: ""; position: absolute; z-index: 1; left: calc(var(--tl-x) - 3px); top: 8px; width: 6px; height: 6px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 3px var(--brand-ring); }
.tl-now-l { grid-column: 3 / -1; display: flex; align-items: center; gap: 8px; font-size: var(--fs-11); font-weight: 600; color: var(--brand-text); }
.tl-now-l::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, var(--brand-line), transparent); }

/* 数据源：每类一行，主源 › 补缺 › 备援 依次排开；每个来源一枚小标签带状态点（正常实心灰、近 3 天没用到空心、出错琥珀） */
.srcs { display: grid; }
.src-row { display: grid; gap: 8px; padding: 12px 16px 14px; box-shadow: inset 0 1px 0 var(--line-soft); }
.src-row:first-child { box-shadow: none; }
.src-h { display: flex; align-items: center; gap: 12px; }
.src-h b { font-size: var(--fs-13); font-weight: 600; }
.src-h .health { margin-left: auto; }
.src-flow { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.src-g { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 4px; }
.src-gl { margin-right: 2px; font-size: var(--fs-11); font-weight: 500; color: var(--ink-3); }
.src-sep, .src-then { display: inline-grid; place-items: center; color: var(--ink-4); }
.src-sep { margin: 0 2px; }
.src-note { font-size: var(--fs-12); color: var(--ink-3); }
.chip { display: inline-flex; align-items: center; gap: 6px; height: var(--h-badge); padding: 0 8px; border-radius: var(--r-chip); background: var(--inset); box-shadow: inset 0 0 0 1px var(--line); font-size: var(--fs-12); color: var(--ink); white-space: nowrap; cursor: default; transition: box-shadow var(--dur-quick) var(--ease-out); }
.chip:hover { box-shadow: inset 0 0 0 1px var(--line-strong); }
.chip small { font-size: var(--fs-11); color: var(--ink-3); }
.chip .hd { flex: none; width: 6px; height: 6px; border-radius: 50%; background: var(--ink-3); }
.chip.is-idle .hd { background: transparent; box-shadow: inset 0 0 0 1.5px var(--ink-4); }
.chip.is-na .hd { display: none; }
.chip.is-na { color: var(--ink-2); background: var(--surface); }
.chip.is-bad { color: var(--warn); background: var(--warn-tint); box-shadow: inset 0 0 0 1px var(--warn-line); font-weight: 500; }
.chip.is-bad .hd { background: var(--warn); }

/* 手动任务：shadcn Item 的列表写法——图标框 | 名称与一句话说明 | 按钮（按钮写动词）；按用途分组 */
.acts-list { padding: 2px 0 8px; }
.act-g + .act-g { margin-top: 2px; box-shadow: inset 0 1px 0 var(--line-soft); }
.act-gl { display: block; padding: 10px 16px 4px; font-size: var(--fs-11); font-weight: 600; color: var(--ink-3); }
.act-row { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; align-items: center; column-gap: 12px; min-height: 48px; padding: 5px 16px; }
.act-ic { display: grid; place-items: center; width: 28px; height: 28px; border-radius: var(--r-ctl); background: var(--inset); box-shadow: inset 0 0 0 1px var(--line); color: var(--ink-2); }
.act-ic .ic { width: 15px; height: 15px; }
.act-t { min-width: 0; }
.act-t b { display: block; font-size: var(--fs-13); font-weight: 500; line-height: 1.4; color: var(--ink); }
.act-t span { display: block; font-size: var(--fs-12); line-height: 1.45; color: var(--ink-3); }
.act-row .btn { min-width: 56px; }
.act-row .btn .spin { color: var(--ink-3); }
/* 输出：深色面板（BeUI Tool Result）。标题栏 36 高：状态点、任务名、开始时间、结果与用时，右侧再运行、复制、关闭；
   运行中是 3×3 点阵（Transitions.dev Matrix dot loader）并计时；说明里写着失败、出错的行加琥珀色左条；内容上滚后顶部 28px 渐隐 */
.term { margin: 4px 16px 16px; border-radius: var(--r-ctl); background: #18181b; box-shadow: 0 0 0 1px rgba(24, 24, 27, 0.9), 0 8px 20px -12px rgba(24, 24, 27, 0.5); overflow: hidden; }
.term-head { display: flex; align-items: center; gap: 2px; height: 36px; padding: 0 6px 0 12px; box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.08); font-size: var(--fs-12); color: #a1a1aa; }
.term-st { display: flex; align-items: center; gap: 8px; min-width: 0; margin-right: auto; white-space: nowrap; overflow: hidden; font-variant-numeric: tabular-nums; }
.term-st b { font-weight: 500; color: #fafafa; }
.ts-meta { color: #71717a; }
.ts-dot { flex: none; width: 6px; height: 6px; border-radius: 50%; background: #d4d4d8; }
.term[data-state="partial"] .ts-dot, .term[data-state="fail"] .ts-dot { background: #fbbf24; }
.term[data-state="partial"] .ts-st, .term[data-state="fail"] .ts-st { color: #fbbf24; }
.term .icon-btn { color: #a1a1aa; }
.term .icon-btn:hover { background: rgba(255, 255, 255, 0.1); color: #fafafa; }
.term .icon-btn:disabled { opacity: 0.35; background: none; }
.dots { display: grid; grid-template-columns: repeat(3, 3px); gap: 2px; flex: none; }
.dots i { width: 3px; height: 3px; border-radius: 1px; background: #a1a1aa; animation: dots 1.2s linear infinite; }
.dots i:nth-child(3n + 2) { animation-delay: 0.15s; } .dots i:nth-child(3n) { animation-delay: 0.3s; }
.dots i:nth-child(n + 4) { animation-delay: 0.15s; } .dots i:nth-child(n + 4):nth-child(3n + 2) { animation-delay: 0.3s; } .dots i:nth-child(n + 4):nth-child(3n) { animation-delay: 0.45s; }
.dots i:nth-child(n + 7) { animation-delay: 0.3s; } .dots i:nth-child(n + 7):nth-child(3n + 2) { animation-delay: 0.45s; } .dots i:nth-child(n + 7):nth-child(3n) { animation-delay: 0.6s; }
@keyframes dots { 0%, 100% { opacity: 0.25; } 30% { opacity: 1; } }
.console { margin-top: 12px; max-height: 280px; overflow: auto; padding: 12px 14px; border-radius: var(--r-ctl); background: #18181b; color: #d4d4d8; font: 400 var(--fs-12) / 1.65 var(--font-mono); white-space: pre-wrap; word-break: break-all; }
.term .console { margin: 0; max-height: 320px; padding: 10px 14px 12px; border-radius: 0; background: transparent; }
.console.is-scrolled { -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 28px); mask-image: linear-gradient(180deg, transparent 0, #000 28px); }
.console .ln { display: block; min-height: 1.65em; margin: 0 -14px; padding: 0 14px; }
.console .ln.is-bad { color: #fcd34d; background: rgba(251, 191, 36, 0.07); box-shadow: inset 3px 0 0 #fbbf24; }
.console .ln-sep { display: flex; align-items: center; gap: 8px; margin: 10px 0 6px; font-family: var(--font-sans); font-size: var(--fs-11); color: #71717a; }
.console .ln-sep::after { content: ""; flex: 1; height: 1px; background: rgba(255, 255, 255, 0.08); }
.console .ln-raw { display: block; color: #a1a1aa; }
.card-tiles { display: grid; justify-items: start; gap: 6px; margin-top: 12px; }
.term .card-tiles { margin: 0; padding: 0 14px 14px; }
.card-tiles img { display: block; width: 375px; max-width: 100%; height: auto; border-radius: var(--r-ctl); box-shadow: 0 0 0 1px var(--line); }
/* 从「需要处理」点「去补跑」：对应那一行底色闪一下 */
.act-row.is-flash { animation: row-flash 1.6s var(--ease-out); }
@keyframes row-flash { 0%, 40% { background: var(--warn-tint); } 100% { background: transparent; } }

/* 万得：每把 key 一行，7 个工作日的格子横向铺满卡片，今天的失败原因写在最右（积分不足琥珀色）；下面是三项设置。
   各行共用一张网格（.wk 是 display: contents），格子上下对齐；右侧原因列按最长的那条定宽，没有原因时不占地方 */
.wind-keys { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; align-items: center; row-gap: 8px; margin-bottom: 16px; padding-bottom: 16px; box-shadow: 0 1px 0 var(--line-soft); font-size: var(--fs-12); font-variant-numeric: tabular-nums; }
.wk-head { grid-column: 1 / -1; display: flex; justify-content: space-between; color: var(--ink-3); }
.wk { display: contents; }
.wk-n { font-weight: 500; color: var(--ink-2); }
/* 每格 52 高：柱高 = 当天调用次数（灰，7 天里最多的那天 30px），柱顶写次数，顶上一段琥珀是失败次数；当天积分用完琥珀描边、右上角写「积分用完」。
   上面一行是日期和星期，今天写「今天」 */
/* 列间距写在格子和原因上：没有原因时右侧一列宽 0，格子右边和上面「今日 N 次」对齐 */
.wk-cols { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; margin-left: 16px; }
.wk-e:not(:empty) { margin-left: 16px; }
.wk-cols i { position: relative; display: flex; flex-direction: column; justify-content: flex-end; height: 52px; border-radius: var(--r-chip); background: var(--hover); overflow: hidden; font-style: normal; }
.wk-cols b { flex: none; background: var(--ink-4); }
.wk-cols u { flex: none; background: var(--warn); }
.wk-cols em { position: absolute; left: 8px; font-style: normal; line-height: 16px; color: var(--ink-2); }
.wk-cols s { position: absolute; top: 5px; right: 8px; text-decoration: none; font-size: var(--fs-11); line-height: 16px; color: var(--warn); }
.wk-cols i.is-out { box-shadow: inset 0 0 0 1.5px var(--warn); }
.wk-days .wk-cols i { display: block; height: auto; padding-left: 8px; background: none; font-size: var(--fs-11); line-height: 16px; color: var(--ink-4); white-space: nowrap; overflow: hidden; }
.wk-days .wk-cols i.is-today { color: var(--brand-strong); font-weight: 600; }
.wk-e { color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* 按卡片宽度排：宽屏右栏（约 430px）和手机上卡片窄，格子只写次数、居中，表头只写星期，「积分用完」只留描边，原因换到格子下面一行 */
#hub-wind .card-body { container-type: inline-size; }
@container (max-width: 720px) {
  .wind-keys { grid-template-columns: 44px minmax(0, 1fr); }
  .wk-n { grid-column: 1; }
  .wk-cols, .wk-e { grid-column: 2; margin-left: 12px; }
  .wk-e:empty { display: none; }
  .wk-cols { gap: 4px; }
  .wk-cols em { left: 0; right: 0; text-align: center; }
  .wk-cols s, .wk-md { display: none; }
  .wk-days .wk-cols i { padding-left: 0; text-align: center; }
}
.wk-e.warn { color: var(--warn); }
.wk-e[data-tip] { cursor: help; }
.wk-empty { grid-column: 1 / -1; display: flex; align-items: center; gap: 6px; font-size: var(--fs-12); color: var(--ink-3); }
.params { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; }

/* 交易日历：内置年份一枚标签，缺的年份琥珀色；补录表单与列表 */
.cal-cov { display: grid; gap: 6px; margin-bottom: 16px; }
.cal-sub { font-size: var(--fs-12); line-height: 1.6; color: var(--ink-3); }
.cov-r { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.cov-m { width: 40px; font-size: var(--fs-12); font-weight: 500; color: var(--ink-2); }
.yr { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px; border-radius: var(--r-chip); background: var(--inset); box-shadow: inset 0 0 0 1px var(--line); font-size: var(--fs-12); color: var(--ink-2); font-variant-numeric: tabular-nums; }
.yr .ic { color: var(--ink-3); }
.yr.is-miss { color: var(--warn); background: var(--warn-tint); box-shadow: inset 0 0 0 1px var(--warn-line); cursor: help; }
.yr.is-miss .ic { color: var(--warn); }
.cal-form { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 10px 8px; align-items: end; }
.cal-form .input, .cal-form .select { min-width: 0; }
.cal-form .cal-note { grid-column: 1 / 3; }
.cal-form #calAdd { justify-self: start; }
.cal-list { display: grid; gap: 4px; margin-top: 14px; font-size: var(--fs-12); }
.cal-row { display: grid; grid-template-columns: 88px 40px 52px minmax(0, 1fr) auto; align-items: center; gap: 8px; }

/* 运行日志、日线覆盖：默认收起；日志里连续相同的几条合成一行，右侧 ×N */
.fold > summary { list-style: none; cursor: pointer; user-select: none; border-radius: var(--r-card); transition: background var(--dur-quick) var(--ease-out); }
.fold > summary::-webkit-details-marker { display: none; }
.fold > summary:hover { background: var(--inset); }
.fold[open] > summary { border-radius: var(--r-card) var(--r-card) 0 0; }
.fold .fold-ic { margin-left: auto; color: var(--ink-3); transition: rotate var(--dur-quick) var(--ease-out); }
.fold[open] .fold-ic { rotate: 180deg; }
.fold:not([open]) > summary { box-shadow: none; }
/* 展开收起：高度 250ms 过渡（Transitions.dev Accordion 的时长与缓动；浏览器支持 ::details-content 时生效，否则直接展开） */
.ops { interpolate-size: allow-keywords; }
.fold::details-content { block-size: 0; overflow-y: clip; transition: block-size var(--dur-fast) var(--ease-out), content-visibility var(--dur-fast) allow-discrete; }
.fold[open]::details-content { block-size: auto; }
.sum-flag { display: inline-flex; align-items: center; height: 18px; margin-left: 6px; padding: 0 6px; border-radius: var(--r-xs); font-size: var(--fs-11); font-weight: 600; color: var(--warn); background: var(--warn-tint); box-shadow: inset 0 0 0 1px var(--warn-line); }
.table-scroll.runs-scroll { max-height: 440px; }
.table-scroll.cov-scroll { max-height: 360px; }
.tbl td.c-when { white-space: nowrap; font-variant-numeric: tabular-nums; }
.tbl td.run-n { white-space: nowrap; }
.run-n .tag { margin-left: 6px; font-variant-numeric: tabular-nums; }
.tbl td.wrap-cell { white-space: normal; }
.tbl td.wrap-cell[data-tip] { cursor: help; }
.card .tbl :is(th, td):first-child { padding-left: 16px; }
.ops-ok { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; padding: 12px 16px 14px; font-size: var(--fs-13); color: var(--ink-3); }
.ops-ok .ic { color: var(--ink-3); }
.ops-ok .muted { margin-left: auto; font-size: var(--fs-12); font-variant-numeric: tabular-nums; }

/* 运行状态：正常 实心灰点 / 未到时间、不运行 空心点 / 等待、重试 琥珀点 / 失败、异常 琥珀色加粗 + 警示图标（红绿只留给行情） */
.health { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-12); color: var(--ink-2); white-space: nowrap; }
.health::before { content: ""; flex: none; width: 6px; height: 6px; border-radius: 50%; background: var(--ink-3); }
.health.is-idle { color: var(--ink-3); }
.health.is-idle::before { background: transparent; box-shadow: inset 0 0 0 1.5px var(--ink-4); }
.health.is-warn { color: var(--warn); }
.health.is-warn::before { background: var(--warn); }
.health.is-bad { color: var(--warn); font-weight: 600; }
.health.is-bad::before { display: none; }
.health .ic { width: 13px; height: 13px; stroke-width: 2; }
.health[data-tip] { cursor: help; }

/* 表单字段（运维设置、弹窗共用） */
.field label { display: block; margin-bottom: 6px; font-size: var(--fs-12); font-weight: 500; color: var(--ink-2); }
.field .control { position: relative; }
.field .input, .field .select { width: 100%; }
.field .suffix { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); font-size: var(--fs-12); color: var(--ink-3); pointer-events: none; }
.field .control:has(.suffix) .input { padding-right: 30px; }
.field .hint { margin-top: 6px; font-size: var(--fs-12); line-height: 1.5; color: var(--ink-3); }
/* 数字框不要原生上下箭头（挤在单位旁边） */
.field input[type="number"]::-webkit-inner-spin-button, .field input[type="number"]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.field input[type="number"] { -moz-appearance: textfield; }

/* ─── 提示层（shadcn Tooltip：深色）、轻提示、弹窗、骨架、空状态 ─── */
/* 宽度只看文字本身（最宽 280px），不受所在位置影响：靠屏幕右边时不会被挤窄、只剩一个字换行；多行时避免最后一行只剩一两个字 */
.tip { position: fixed; left: 0; top: 0; z-index: var(--z-tip); width: max-content; max-width: min(280px, calc(100vw - 16px)); text-wrap: pretty; padding: 8px 11px; border-radius: var(--r-ctl); background: #18181b; box-shadow: 0 8px 24px -6px rgba(24, 24, 27, 0.35); font-size: var(--fs-12); line-height: 1.6; color: #d4d4d8; pointer-events: none;
  opacity: 0; transform: translateY(3px); transition: opacity 80ms ease-out, transform 80ms ease-out; }
.tip.is-below { transform: translateY(-3px); }
.tip.is-open { opacity: 1; transform: none; transition-duration: var(--dur-quick); }
/* 已经显示时换到相邻目标：不收起重弹，直接滑过去（Transitions.dev tooltip） */
.tip.is-open.is-glide { transition: opacity var(--dur-quick) ease-out, transform var(--dur-quick) ease-out, left 160ms var(--ease-out), top 160ms var(--ease-out); }
/* 第一行标题，其余每行一条说明；只有一句时用白字 */
.tip b, .tip span { display: block; }
.tip b { margin-bottom: 2px; font-weight: 500; color: #fafafa; }
.tip span:only-child { color: #fafafa; }
.toasts { position: fixed; left: 16px; right: 16px; bottom: 24px; z-index: var(--z-toast); display: flex; flex-direction: column-reverse; align-items: center; gap: 8px; pointer-events: none; }
.toast { display: flex; align-items: center; gap: 10px; max-width: min(560px, calc(100vw - 32px)); padding: 9px 10px 9px 14px; border-radius: var(--r-card); background: #18181b; color: #fafafa; font-size: var(--fs-13); box-shadow: 0 12px 32px -8px rgba(24, 24, 27, 0.4), inset 0 0 0 1px rgba(255, 255, 255, 0.06); white-space: pre-line; pointer-events: auto;
  opacity: 0; transform: translateY(12px) scale(0.97); filter: blur(2px); transition: opacity var(--dur-quick) var(--ease-out), transform var(--dur-quick) var(--ease-out), filter var(--dur-quick) var(--ease-out); }
.toast.is-open { opacity: 1; transform: none; filter: none; transition-duration: var(--dur-fast); }
.toast .ic { color: #d4d4d8; } .toast.is-err .ic { color: #fbbf24; }
.toast-act { flex: none; height: var(--h-sm); padding: 0 10px; margin-left: 4px; border-radius: var(--r-chip); font-size: var(--fs-12); font-weight: 600; color: #fff; background: rgba(255, 255, 255, 0.14); }
.toast-act:hover { background: rgba(255, 255, 255, 0.24); }
.dlg-mask { position: fixed; inset: 0; z-index: var(--z-dialog); background: rgba(24, 24, 27, 0.24); opacity: 0; pointer-events: none; transition: opacity var(--dur-menu) var(--ease-out); }
.dlg-mask.is-open { opacity: 1; pointer-events: auto; }
.dlg { position: fixed; left: 50%; top: 40%; z-index: calc(var(--z-dialog) + 1); width: min(420px, calc(100vw - 32px)); padding: 20px 20px 16px; border-radius: var(--r-win); background: var(--surface); box-shadow: var(--sh-lg);
  translate: -50% -50%; transform: scale(0.97); opacity: 0; pointer-events: none; transition: transform var(--dur-menu) var(--ease-out), opacity var(--dur-menu) var(--ease-out); }
.dlg.is-open { transform: scale(1); opacity: 1; pointer-events: auto; }
.dlg.is-closing { opacity: 0; transition-duration: var(--dur-quick); }
.dlg h4 { font-size: var(--fs-16); font-weight: 600; }
.dlg p { margin-top: 6px; font-size: var(--fs-13); color: var(--ink-2); line-height: 1.65; white-space: pre-line; }
.dlg p:empty { display: none; }
.dlg-body { display: grid; gap: 12px; margin-top: 16px; }
.dlg-body:empty { display: none; }
.dlg .field-err, .dlg-err { display: flex; align-items: center; gap: 5px; margin-top: 6px; font-size: var(--fs-12); line-height: 1.5; color: var(--warn); }
.dlg-err { margin-top: 0; }
.dlg .field-err[hidden], .dlg-err[hidden] { display: none; }
/* 出错时报错替换字段下的规则说明，不重复写两遍 */
.dlg .field:has(.field-err:not([hidden])) .hint { display: none; }
.input.has-reveal { padding-right: 40px; }
.dlg-foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; flex-wrap: wrap; }
.tbl td.r > .sk { margin-left: auto; }
.sk { display: block; height: 9px; border-radius: 5px; background: var(--canvas); animation: sk 2s cubic-bezier(0.4, 0, 0.6, 1) infinite; }
@keyframes sk { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }
.sk-row td { height: var(--row); }
.empty { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 44px 20px; text-align: center; }
.empty .em-ic { display: grid; place-items: center; width: 32px; height: 32px; margin-bottom: 6px; border-radius: var(--r-ctl); background: var(--inset); box-shadow: 0 0 0 1px var(--line); color: var(--ink-3); }
.empty.is-err .em-ic { color: var(--warn); background: var(--warn-tint); box-shadow: inset 0 0 0 1px var(--warn-line); }
.empty b { font-size: var(--fs-13); font-weight: 600; }
.empty span { max-width: 460px; font-size: var(--fs-12); color: var(--ink-3); text-wrap: pretty; }
.empty .btn { margin-top: 8px; }

body.no-admin .admin-only { display: none !important; }
body.read-only .edit-only { display: none !important; }

@media (max-width: 1180px) {
  .rrow { grid-template-columns: 32px 150px 236px minmax(0, 1fr); column-gap: 12px; }
  .ops-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #p-ops .ops-kpis .kpi:nth-child(odd) { box-shadow: none; }
  #p-ops .ops-kpis .kpi:nth-child(n + 3) { border-top: 1px solid var(--line-soft); }
  #p-ops .ops-kpis .kpi.is-warn:nth-child(odd), #p-ops .ops-kpis .kpi.is-bad:nth-child(odd) { box-shadow: none; }
  #p-rules .page-head { margin: -12px -16px 12px; padding: 10px 16px; }
}
@media (max-width: 1320px) {
  .sig-toolbar .search .input { width: 160px; }
  #sigRule + .nsel { width: 136px; }
}
/* 平板竖屏：导航一行，当前页说明与操作另起一行占满宽度，不截断 */
@media (max-width: 900px) {
  :root { --pagebar: 40px; --head: calc(var(--topbar) + var(--tabbar) + var(--pagebar)); }
  :root:has(.pagebar:not(:has(> .pb:not([hidden])))) { --head: calc(var(--topbar) + var(--tabbar)); }
  .topbar-in, .tabbar-in { gap: 10px; padding: 0 16px; }
  .tabbar-in { flex-wrap: wrap; height: auto; column-gap: 12px; row-gap: 0; }
  .nav { height: var(--tabbar); }
  .pagebar { flex: 1 1 100%; height: var(--pagebar); justify-content: flex-start; box-shadow: inset 0 1px 0 var(--line-soft); }
  .pagebar:not(:has(> .pb:not([hidden]))) { display: none; }
  .pb { width: 100%; justify-content: space-between; }
  .wrap { padding: 12px 16px 32px; }
  .markets .mk-sub { display: none; }
  .mk { padding: 0 10px; }
  /* 工具栏：搜索框和「仅看触发」「我的关注」一行；行业分组另起一行，放不下时在分组里横向滑动；筛选范围和「清除筛选」在最后一行 */
  .toolbar[data-toolbar] { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; }
  .toolbar[data-toolbar] .search { grid-column: 1 / 3; }
  .toolbar[data-toolbar] .search .input { width: 100%; }
  .toolbar[data-toolbar] .seg { grid-row: 2; grid-column: 1 / -1; justify-self: start; }
  .toolbar[data-toolbar] .scope { grid-row: 3; grid-column: 1; margin-left: 0; overflow: hidden; text-overflow: ellipsis; }
  .toolbar[data-toolbar] [data-f="clear"] { grid-row: 3; grid-column: 2; justify-self: end; }
  .toolbar[data-toolbar] .view-seg { grid-row: 3; grid-column: 3; justify-self: end; }
  /* 全市场榜：第一行区间切换、右边列表 / 热力图；第二行搜索、右边只数 */
  .toolbar[data-toolbar="market"] { grid-template-columns: auto minmax(0, 1fr) auto; }
  .toolbar[data-toolbar="market"] .mk-period { grid-row: 1; grid-column: 1; }
  .toolbar[data-toolbar="market"] .view-seg { grid-row: 1; grid-column: 3; }
  .toolbar[data-toolbar="market"] .search { grid-row: 2; grid-column: 1 / 3; }
  .toolbar[data-toolbar="market"] .scope { grid-row: 2; grid-column: 3; justify-self: end; }
  /* 表格不挤压文字：放不下时在表格内横向滑动 */
  .table-scroll > .tbl { min-width: 760px; }
  .table-scroll > #tSig, .table-scroll.is-contained > .tbl { min-width: 640px; }
  /* 时间列收起：宽度归零而不用 display: none。固定列宽的表格里，分组行仍跨 6 列，藏掉一列会多出一个空列分走宽度 */
  #tSig .c-time { width: 0; padding: 0; overflow: hidden; visibility: hidden; }
  .sig-t-m, .nm-sub > .sig-t-m + span::before { display: inline; }
  #tSig .c-idx { width: 168px; }
  #tSig .c-rule { width: 184px; }
}
/* 窄平板：市场胶囊只留圆点，状态在悬停与首页说明行里 */
@media (max-width: 760px) { .markets .mk-s { display: none; } .rec-btn > span { display: none; } .rec-btn { width: var(--h-ctl); padding: 0; justify-content: center; } }
/* 手机：顶栏只留品牌、设置与头像（开盘状态在说明行里）；搜索框占满一行 */
@media (max-width: 600px) {
  :root { --topbar: 52px; }
  .markets { display: none; }
  #uname, .user-btn > .ic { display: none; }
  .user-btn { padding: 0 4px; }
  .brand { gap: 8px; }
  .brand b { font-size: var(--fs-14); }
  .topbar-in, .tabbar-in { padding: 0 12px; }
  .nav { margin-left: -8px; gap: 0; }
  .nav-item { padding: 0 8px; }
  .nav-item > .ic { display: none; }
  .nav-sep { margin: 0 4px; }
  .wrap { padding: 12px 12px 32px; }
  /* 规则设置：开关 + 名称一行，阈值与说明另起一行 */
  .rrow { grid-template-columns: 32px minmax(0, 1fr) auto; column-gap: 10px; row-gap: 4px; padding: 8px 12px; }
  .rrow .rparams { grid-column: 3; flex-wrap: wrap; justify-content: flex-end; white-space: normal; }
  .rrow .rnote, .rrow.is-wide .rnote { grid-column: 2 / -1; }
  .rrow .rparams:empty { display: none; }
  .rsec-h { padding: 8px 12px; }
  #p-rules .page-head { margin: -12px -12px 12px; padding: 10px 12px; }
  /* 预警记录：三组分段各一行，搜索框与规则下拉合一行 */
  .sig-toolbar .search { flex: 1 1 150px; min-width: 0; }
  .sig-toolbar .search .input { width: 100%; }
  #sigRule + .nsel { flex: 0 1 auto; min-width: 0; max-width: 48%; }
  /* 三组分段在一行里横向滑动；「触发时情况」并到规则格里，表格不用横向滑动 */
  .sig-segs { flex: 1 1 100%; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -12px; padding: 0 12px; }
  .sig-segs::-webkit-scrollbar { display: none; }
  .sig-segs > .seg { flex: none; max-width: none; overflow: visible; }
  .table-scroll > #tSig { min-width: 0; table-layout: auto; }
  #tSig .c-time { display: none; }
  #tSig :is(.c-idx, .c-rule, .c-acts) { width: auto; }
  #tSig .c-what { display: none; }
  .sig-what-m { display: block; margin-top: 4px; white-space: normal; }
  #tSig :is(th, td) { padding-left: 8px; padding-right: 8px; }
  #tSig .act.is-placeholder { display: none; }
  .batchbar { max-width: calc(100% - 16px); padding-left: 12px; gap: 4px; }
  .batchbar .btn { padding: 0 8px; }
  .batchbar :is(.bb-l, .bb-pre, .muted) { display: none; }
  /* 处理列：状态标签放在按钮上面，不和按钮挤一行把表撑宽 */
  #tSig .acts-cell { flex-direction: column; align-items: flex-end; gap: 2px; }
  .table-card:has(.pager) .table-scroll { max-height: calc(100dvh - var(--chrome) - 256px); }
  #tUsers .c-seen { display: none; }
  #tUsers .c-role { width: auto; }
  .table-scroll > #tUsers { min-width: 0; }
  #tUsers .c-uacts { position: sticky; right: 0; z-index: 2; background: var(--surface); }
  #tUsers .c-uacts .lbl { display: none; }
  .rrow .rnote:empty { display: none; }
  /* 处理列固定在右侧：横向滑动时随时可标记 */
  #tSig .c-acts { position: sticky; right: 0; z-index: 2; box-shadow: inset 1px 0 0 var(--line-soft), inset 0 -1px 0 var(--line-soft); }
  #tSig thead th.c-acts { z-index: calc(var(--z-sticky) + 1); box-shadow: inset 1px 0 0 var(--line-soft), inset 0 -1px 0 var(--line); }
  /* 固定的指数列收窄：只留名称和代码，产品类型在详情里看 */
  .nm, .nm-btn { min-width: 0; }
  .nm-btn b { flex-wrap: wrap; row-gap: 2px; }  /* 名称带「沪深港」这类标签放不下时，标签换到下一行 */
  .nm-sub > span:not(:first-child) { display: none; }
  .tbl .c-name { max-width: 150px; }
  .meter-track, .meter.is-na .meter-yr, .uw-svg { display: none; }
  /* 规则设置的阈值小图只是辅助，手机上收起，数字照旧在输入框里 */
  .rviz { display: none; }
  .rparams.has-viz { flex-wrap: nowrap; padding: 0; }
  .uw { flex-direction: column; align-items: flex-end; gap: 1px; }
  .uw-tag { position: static; width: auto; height: auto; clip-path: none; font-size: var(--fs-12); font-weight: 500; color: var(--up-strong); }
  .meter-tag { position: static; width: auto; height: 20px; display: inline-flex; align-items: center; padding: 0 6px; border-radius: var(--r-xs); clip-path: none; font-size: var(--fs-12); font-weight: 500; }
  .meter.is-low .meter-tag { color: var(--down-strong); background: color-mix(in srgb, var(--down-mark) 10%, var(--surface)); }
  .meter.is-high .meter-tag { color: var(--up-strong); background: color-mix(in srgb, var(--up-mark) 10%, var(--surface)); }
  /* 刷新只留图标，说明行放得下涨跌家数 */
  #liveRefresh { width: var(--h-sm); padding: 0; }
  .head-meta .breadth { display: none; }
  #liveRefresh .btn-t { display: none; }
  /* 可关注：格子窄，规则和时间分两行，不重叠 */
  .fi { grid-template-columns: minmax(0, 1fr); }
  .fi-bot { justify-self: start; }
  /* 系统运维：状态总览的下一个任务另起一行；时间线的结果移到内容下面，近 10 日小竖条不显示；万得失败原因另起一行 */
  .ops-hero { flex-wrap: wrap; }
  .hero-side, .ops-hero.is-warn .hero-side { flex: 1 1 100%; margin-left: 0; padding: 0 0 0 44px; white-space: normal; }
  .tl { --tl-x: calc(16px + 40px + 10px + 10px); }
  .tl-row, .tl-now { grid-template-columns: 40px 20px minmax(0, 1fr); column-gap: 10px; }
  .tl-hist, .tl-legend { display: none; }
  .tl-st { grid-column: 3; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 2px 10px; min-width: 0; margin-top: 4px; }
  .tl-note { text-align: left; white-space: normal; }
  .src-h { flex-wrap: wrap; row-gap: 4px; }
  .params { grid-template-columns: minmax(0, 1fr); }
  .cal-row { grid-template-columns: 88px 36px 48px minmax(0, 1fr) auto; }
}

/* ─── 登录：居中卡片，只保留「账号」「密码」 ─── */
html:has(.auth) { scrollbar-gutter: auto; }
body:has(.auth) { background: #faf9f7; }
/* 登录页。左边磨砂登录卡，右边用公开行情拼的看板预览（src/showcase.ts）；左上角 logo、登录卡、左下角署名对齐同一条竖线（--ax）。
   背景：暖白底，右侧几团缓慢漂移的品牌色柔光，细网格从中间往外淡出（Rare UI 的柔光、Beautiful UI 的磨砂卡片）。
   动效（Transitions.dev）：卡片浮起、内容依次显现；窗口带透视角度滑入、行依次出现、走势线画出、数字滚动到位、浮卡弹入。
   跟随指针（只在有鼠标的设备上，login.js 写 --px/--py/--mx/--my/--bx/--by）：窗口轻轻转向指针，浮卡和柔光按远近错开移动；
   登录卡描边在指针附近亮起，按钮里的高光跟着指针走（Rare UI 的 spotlight card）。登录成功：箭头换成转圈再收成对勾，页面淡出后进入看板 */
.auth { --ax: 120px; position: relative; isolation: isolate; min-height: 100dvh; overflow: hidden; background: #faf9f7; }
.auth::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; background-image: linear-gradient(rgba(24, 24, 27, 0.045) 1px, transparent 1px), linear-gradient(90deg, rgba(24, 24, 27, 0.045) 1px, transparent 1px); background-size: 48px 48px;
  -webkit-mask-image: radial-gradient(ellipse 70% 70% at 70% 45%, #000 25%, transparent 75%); mask-image: radial-gradient(ellipse 70% 70% at 70% 45%, #000 25%, transparent 75%); }
.auth-mesh { position: absolute; inset: -40px; z-index: -2; overflow: hidden; pointer-events: none; translate: calc(var(--px, 0) * -18px) calc(var(--py, 0) * -12px); transition: translate 1.6s cubic-bezier(0.2, 0.8, 0.2, 1); }
/* 柔光用分段渐变做出柔和的边，不用 blur 滤镜：大面积模糊会出一圈圈的纹，也更费性能 */
.auth-mesh i { position: absolute; border-radius: 50%; animation: auth-drift 22s ease-in-out infinite alternate; }
.auth-mesh i:nth-child(1) { width: 820px; height: 720px; right: -180px; top: -200px; background: radial-gradient(closest-side, rgba(255, 122, 61, 0.5) 0%, rgba(255, 122, 61, 0.41) 22%, rgba(255, 122, 61, 0.275) 42%, rgba(255, 122, 61, 0.14) 62%, rgba(255, 122, 61, 0.05) 80%, rgba(255, 122, 61, 0.0) 100%); }
.auth-mesh i:nth-child(2) { width: 760px; height: 760px; right: calc(22% - 100px); bottom: -320px; background: radial-gradient(closest-side, rgba(255, 179, 138, 0.55) 0%, rgba(255, 179, 138, 0.451) 22%, rgba(255, 179, 138, 0.303) 42%, rgba(255, 179, 138, 0.154) 62%, rgba(255, 179, 138, 0.055) 80%, rgba(255, 179, 138, 0.0) 100%); animation-duration: 28s; animation-delay: -6s; }
.auth-mesh i:nth-child(3) { width: 620px; height: 620px; right: calc(8% - 100px); top: calc(38% - 100px); background: radial-gradient(closest-side, rgba(253, 74, 12, 0.24) 0%, rgba(253, 74, 12, 0.197) 22%, rgba(253, 74, 12, 0.132) 42%, rgba(253, 74, 12, 0.067) 62%, rgba(253, 74, 12, 0.024) 80%, rgba(253, 74, 12, 0.0) 100%); animation-duration: 18s; animation-delay: -3s; }
.auth-mesh i:nth-child(4) { width: 720px; height: 620px; left: -220px; top: -180px; background: radial-gradient(closest-side, rgba(255, 214, 196, 0.5) 0%, rgba(255, 214, 196, 0.41) 22%, rgba(255, 214, 196, 0.275) 42%, rgba(255, 214, 196, 0.14) 62%, rgba(255, 214, 196, 0.05) 80%, rgba(255, 214, 196, 0.0) 100%); animation-duration: 26s; }
@keyframes auth-drift { to { transform: translate(-40px, 30px) scale(1.08); } }
/* 左上角 logo 加系统名：整页的标识，和卡片标题同一量级 */
.auth-brand { position: absolute; left: var(--ax); top: 36px; z-index: 1; display: flex; align-items: center; gap: 12px; font-size: 18px; font-weight: 600; letter-spacing: 0.03em; color: var(--ink); }
.auth-brand img { width: 36px; height: 36px; }
/* 登录卡：磨砂、渐变描边；顶部开市状态胶囊（和看板顶栏同一个组件），标题「欢迎回来」 */
@property --lit { syntax: "<number>"; inherits: false; initial-value: 0; }
.auth-card { position: absolute; left: var(--ax); top: 50%; z-index: 1; width: 400px; padding: 32px 36px 36px; border-radius: 24px; transform: translateY(-50%);
  background: radial-gradient(360px circle at var(--mx, 50%) var(--my, 0%), rgba(255, 138, 76, calc(var(--lit, 0) * 0.07)), transparent 70%), rgba(255, 255, 255, 0.74);
  -webkit-backdrop-filter: blur(20px) saturate(1.5); backdrop-filter: blur(20px) saturate(1.5);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.95), 0 30px 60px -28px rgba(24, 24, 27, 0.28), 0 8px 18px -10px rgba(24, 24, 27, 0.1);
  transition: --lit 500ms var(--ease-out); animation: auth-rise 800ms var(--ease-out) backwards; }
@keyframes auth-rise { from { opacity: 0; translate: 0 16px; scale: 0.985; } }
.auth-card::before, .auth-card::after { content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0); }
.auth-card::before { background: linear-gradient(170deg, rgba(255, 255, 255, 0.9), rgba(253, 74, 12, 0.28) 30%, rgba(24, 24, 27, 0.06) 60%); }
/* 描边的指针光：指针靠近卡片时亮起 */
.auth-card::after { background: radial-gradient(220px circle at var(--mx, 50%) var(--my, 0%), rgba(253, 74, 12, 0.75), rgba(253, 74, 12, 0) 70%); opacity: 0; transition: opacity 500ms var(--ease-out); }
.auth-card.is-lit { --lit: 1; }
.auth-card.is-lit::after { opacity: 1; }
.auth-mkw { margin-bottom: 20px; }
.auth-card .markets { display: inline-flex; height: 28px; margin: 0; background: rgba(24, 24, 27, 0.035); box-shadow: inset 0 0 0 1px rgba(24, 24, 27, 0.07); }
.auth-card .markets .mk-s { display: inline; }
.auth-card .mk { gap: 7px; padding: 0 12px; }
.auth-card .mk + .mk { box-shadow: inset 1px 0 0 rgba(24, 24, 27, 0.08); }
.auth-card .mk b { font-weight: 500; color: var(--ink-2); }
/* 交易中的点轻轻呼吸 */
.auth-card .mk.is-open .dot { animation: mk-breathe 2.4s ease-in-out infinite; }
@keyframes mk-breathe { 50% { box-shadow: 0 0 0 5px rgba(253, 74, 12, 0.08); } }
.auth-title { margin-bottom: 24px; font-size: 22px; line-height: 1.3; font-weight: 600; letter-spacing: 0.02em; color: var(--ink); }
.auth .field { margin-bottom: 16px; }
.auth .field label { margin-bottom: 8px; font-size: var(--fs-13); color: var(--ink-2); transition: color var(--dur-quick) var(--ease-out); }
.auth .field:focus-within label { color: var(--ink); }
.auth .control > .ic { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--ink-4); pointer-events: none; transition: color var(--dur-quick) var(--ease-out); }
.auth .control:focus-within > .ic { color: var(--brand-strong); }
.auth .input { width: 100%; height: 44px; padding: 0 14px 0 40px; font-size: var(--fs-14); border-radius: 12px; border: 1px solid rgba(24, 24, 27, 0.08); background: rgba(255, 255, 255, 0.72); box-shadow: inset 0 1px 2px rgba(24, 24, 27, 0.04);
  transition: background var(--dur-quick) var(--ease-out), border-color var(--dur-quick) var(--ease-out), box-shadow var(--dur-quick) var(--ease-out), padding var(--dur-quick) var(--ease-out); }
.auth .input:hover { border-color: rgba(24, 24, 27, 0.14); }
.auth .input:focus { background: var(--surface); border-color: rgba(253, 74, 12, 0.55); box-shadow: 0 0 0 4px rgba(253, 74, 12, 0.12); outline: none; }
/* 浏览器自动填入的账号密码：盖掉默认的浅蓝/浅黄底，和手输的一样 */
.auth .input:-webkit-autofill { -webkit-text-fill-color: var(--ink); caret-color: var(--ink); box-shadow: inset 0 0 0 40px #fff, inset 0 1px 2px rgba(24, 24, 27, 0.04); }
.auth .input:-webkit-autofill:focus { box-shadow: inset 0 0 0 40px #fff, 0 0 0 4px rgba(253, 74, 12, 0.12); }
.auth .input.has-reveal { padding-right: 46px; }
.reveal { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); display: grid; place-items: center; width: 30px; height: 30px; border-radius: var(--r-ctl); color: var(--ink-3); }
.reveal:hover { background: var(--hover-2); color: var(--ink); }
.reveal .t-icon { grid-area: 1 / 1; transition: opacity var(--dur-quick) ease-in-out, transform var(--dur-quick) ease-in-out; }
.reveal[data-state="hidden"] .t-icon[data-icon="eye-off"], .reveal[data-state="shown"] .t-icon[data-icon="eye"] { opacity: 0; transform: scale(0.5); }
/* 大写锁定：输密码时开着大写，框里眼睛左边出一个小标 */
.caps { position: absolute; right: 44px; top: 50%; display: flex; align-items: center; height: 22px; padding: 0 7px; border-radius: 6px; font-size: var(--fs-11); font-weight: 600; letter-spacing: 0.04em; white-space: nowrap; color: var(--brand-text); background: rgba(253, 74, 12, 0.08);
  opacity: 0; transform: translateY(-50%) scale(0.85); pointer-events: none; transition: opacity var(--dur-quick) var(--ease-out), transform var(--dur-quick) var(--ease-out); }
.caps:empty { display: none; }
.control.is-caps .caps { opacity: 1; transform: translateY(-50%); }
.auth .control.is-caps .input.has-reveal { padding-right: 112px; }
/* 底部一行：左边「忘记密码？」（点一下换成找谁重置），右边紧凑的登录按钮。
   出错时错误信息换到「忘记密码？」的位置，3 秒后换回：卡片不变高，输入框不挪动 */
.auth-act { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 8px; }
.auth-aside { display: grid; min-width: 0; }
.auth-aside > * { grid-area: 1 / 1; align-self: center; justify-self: start; transition: color var(--dur-quick) var(--ease-out), opacity var(--dur-quick) ease-in-out, transform var(--dur-quick) ease-in-out, filter var(--dur-quick) ease-in-out; }
.auth-err { display: flex; align-items: center; gap: 5px; font-size: var(--fs-13); line-height: 1.4; color: var(--warn); opacity: 0; transform: translateY(4px); filter: blur(2px); pointer-events: none; }
.auth-err .ic { flex: none; }
.auth-act.is-err .auth-err { opacity: 1; transform: none; filter: none; }
.auth-act.is-err .auth-forgot { opacity: 0; transform: translateY(-4px); filter: blur(2px); pointer-events: none; }
.auth-forgot { position: relative; margin-left: -8px; padding: 6px 8px; border-radius: var(--r-ctl); font-size: var(--fs-13); color: var(--ink-3); }
.auth-forgot::after { content: ""; position: absolute; left: 8px; right: 8px; bottom: 5px; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform var(--dur-fast) var(--ease-out); }
.auth-forgot:hover { color: var(--ink); }
.auth-forgot:hover::after { transform: scaleX(1); }
.auth-forgot.is-hint { color: var(--ink-2); }
.auth-forgot.is-hint::after { transform: scaleX(0); }
/* 登录按钮：品牌橙渐变、上沿内高光；指针在按钮上时一团高光跟着走，入场后扫过一道光；按下回弹。登录中箭头换成转圈，成功时收成对勾 */
.auth-go { position: relative; isolation: isolate; overflow: hidden; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-width: 128px; height: 44px; padding: 0 18px 0 22px; border-radius: 12px;
  font-size: var(--fs-14); font-weight: 600; letter-spacing: 0.08em; white-space: nowrap; color: #fff; background: linear-gradient(180deg, #ff6528, #e8450d);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), inset 0 -1px 0 rgba(122, 32, 0, 0.16), 0 1px 2px rgba(201, 59, 10, 0.32), 0 10px 22px -10px rgba(253, 74, 12, 0.8);
  transition: transform var(--dur-quick) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out), filter var(--dur-fast) var(--ease-out); }
.auth-go:hover { filter: brightness(1.04) saturate(1.04); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), inset 0 -1px 0 rgba(122, 32, 0, 0.16), 0 1px 2px rgba(201, 59, 10, 0.32), 0 14px 28px -12px rgba(253, 74, 12, 0.9); }
.auth-go:active { transform: scale(0.97); }
.auth-go:disabled { cursor: progress; }
.auth-go::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(96px circle at var(--bx, 50%) var(--by, 50%), rgba(255, 255, 255, 0.26), transparent 70%); opacity: 0; transition: opacity var(--dur-fast) var(--ease-out); }
.auth-go:hover::before { opacity: 1; }
.auth-go::after { content: ""; position: absolute; left: 0; top: 0; bottom: 0; z-index: -1; width: 40%; pointer-events: none; background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.45), transparent); transform: translateX(-130%) skewX(-18deg); animation: auth-sweep 1.1s var(--ease-out) 1.2s; }
@keyframes auth-sweep { to { transform: translateX(330%) skewX(-18deg); } }
.auth-st { display: grid; width: 16px; height: 16px; }
.auth-st > * { grid-area: 1 / 1; width: 16px; height: 16px; }
.auth-arrow { stroke-width: 2; transition: transform var(--dur-fast) var(--ease-out), opacity var(--dur-quick) var(--ease-out); }
.auth-go:hover .auth-arrow { transform: translateX(2px); }
.auth-spin { overflow: visible; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; opacity: 0; transition: opacity var(--dur-quick) var(--ease-out); }
#submit[data-state] .auth-arrow { opacity: 0; transform: translateX(8px); }
#submit[data-state] .auth-spin { opacity: 1; }
.auth-ring { stroke-dasharray: 30 44; transform-origin: 10px 10px; transition: opacity var(--dur-quick) var(--ease-out); }
#submit[data-state="busy"] .auth-ring { animation: auth-spin 800ms linear infinite; }
.auth-tick { stroke-dasharray: 15; stroke-dashoffset: 15; transition: stroke-dashoffset 240ms var(--ease-out) 60ms; }
#submit[data-state="done"] .auth-ring { opacity: 0; }
#submit[data-state="done"] .auth-tick { stroke-dashoffset: 0; }
@keyframes auth-spin { to { transform: rotate(1turn); } }
.auth-foot { position: absolute; left: var(--ax); bottom: 28px; font-size: var(--fs-12); letter-spacing: 0.04em; color: var(--ink-4); }
/* 登录成功：卡片轻轻收小淡出，预览往右退，然后进入看板 */
.auth.is-leaving .auth-card { opacity: 0; scale: 0.97; filter: blur(4px); transition: opacity 300ms var(--ease-out), scale 300ms var(--ease-out), filter 300ms var(--ease-out); }
.auth.is-leaving .sc { opacity: 0; translate: 32px 0; transition: opacity 340ms var(--ease-out), translate 340ms var(--ease-out); }
.auth.is-leaving :is(.auth-brand, .auth-foot) { opacity: 0; transition: opacity 300ms var(--ease-out); }

/* 登录后进入看板（参照发布会里「穿过光进入下一个场景」）：点登录成功的那一刻动作就开始，不等任何东西。
   1. 镜头往前推（.auth.is-going）：登录卡、预览窗口、浮卡朝镜头放大、失焦、淡去；背景的暖光扩散开，一层柔光铺满画面，
      光一直在缓缓流动，没有停住的时候。这段时间看板在后台预渲染（login.js）。
   2. 看板准备好就跳转：跳转和等待都藏在柔光里；看板从轻微放大、失焦的状态对焦出来，落定到原位（跨页面视图过渡）。
   只动 transform、opacity、filter。不支持跨页面视图过渡的浏览器光铺满后直接跳转；开了「减少动态效果」直接跳转 */
@view-transition { navigation: auto; }
@media (prefers-reduced-motion: reduce) { @view-transition { navigation: none; } }
::view-transition-old(root) { animation: vt-dissolve 420ms ease-out both; }
::view-transition-new(root) { animation: vt-focus 680ms cubic-bezier(0.22, 0.8, 0.2, 1) both; }
@keyframes vt-dissolve { to { opacity: 0; } }
@keyframes vt-focus { from { opacity: 0; transform: scale(1.035); filter: blur(12px); } 55% { filter: blur(0); } }
/* 柔光：一层半透明的暖白，底下扩散的光晕透上来，等待时画面也一直在动（整块单色，不用径向渐变，免得出一圈圈的色带） */
.auth::after { content: ""; position: absolute; inset: 0; z-index: 3; pointer-events: none; opacity: 0; background: rgba(255, 251, 248, 0.78); }
.auth.is-going::after { opacity: 1; transition: opacity 520ms cubic-bezier(0.4, 0, 0.2, 1) 120ms; }
.auth.is-going .sc-win::after { animation: none; }
.auth.is-going .auth-card { opacity: 0; scale: 1.06; filter: blur(10px); transition: opacity 380ms ease-out, scale 700ms cubic-bezier(0.3, 0, 0.2, 1), filter 380ms ease-out; }
.auth.is-going :is(.auth-brand, .auth-foot) { opacity: 0; filter: blur(6px); transition: opacity 320ms ease-out, filter 320ms ease-out; }
.auth.is-going .sc-win, .auth.is-going .sc-fc { opacity: 0; scale: 1.1; filter: blur(12px); transition: opacity 460ms ease-out 40ms, scale 800ms cubic-bezier(0.3, 0, 0.2, 1), filter 460ms ease-out 40ms; }
.auth.is-going .auth-mesh { scale: 1.6; rotate: 6deg; transition: translate 1.6s cubic-bezier(0.2, 0.8, 0.2, 1), scale 2400ms cubic-bezier(0.2, 0.6, 0.2, 1), rotate 2400ms cubic-bezier(0.2, 0.6, 0.2, 1); }
.auth.is-going::before { opacity: 0; scale: 1.12; transition: opacity 400ms ease-out, scale 900ms cubic-bezier(0.3, 0, 0.2, 1); }

/* 看板预览：透视倾斜的「盘中异动」窗口 + 涨跌家数、涨幅第一两张浮卡；按屏幕宽度分档缩放。
   窗口跟着指针轻轻转向（--px/--py 在 -1 到 1 之间），浮卡按远近错开平移；入场动画只管开始前（backwards），结束后交给过渡跟随指针 */
.sc { position: absolute; left: 40vw; top: 50%; width: 900px; height: 640px; transform: translateY(-50%) scale(var(--s, 1.08)); transform-origin: 0 50%; perspective: 2200px; pointer-events: none; user-select: none; }
.sc-win { position: absolute; left: 0; top: 30px; width: 760px; height: 610px; border-radius: 18px; background: #fff; overflow: hidden; transform-origin: 0% 50%; transform: rotateY(calc(-16deg + var(--px, 0) * 3deg)) rotateX(calc(6deg - var(--py, 0) * 2.5deg)) rotateZ(1.5deg);
  box-shadow: inset 0 0 0 1px rgba(24, 24, 27, 0.06), 0 60px 90px -40px rgba(193, 64, 10, 0.45), 0 24px 44px -24px rgba(24, 24, 27, 0.25);
  transition: transform 1.2s cubic-bezier(0.2, 0.8, 0.2, 1); animation: sc-win-in 1.1s var(--ease-out) 0.15s backwards; }
@keyframes sc-win-in { from { opacity: 0; transform: translateX(80px) rotateY(-32deg) rotateX(10deg) rotateZ(3deg); } }
.sc-win::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, 0.55) 48%, transparent 60%); transform: translateX(-100%); animation: sc-shine 7s ease-in-out 2.2s infinite; }
@keyframes sc-shine { 28%, 100% { transform: translateX(100%); } }
.sc-top-bar { display: flex; align-items: center; gap: 20px; height: 52px; padding: 0 22px; border-bottom: 1px solid #f1efee; }
.sc-top-bar img { width: 20px; height: 20px; }
/* 顶栏导航和看板一样：三个视图一组、全市场榜一组，带图标，当前页图标是品牌橙 */
.sc-tabs { display: flex; align-items: center; gap: 18px; font-size: 13px; color: var(--ink-3); }
.sc-tab { position: relative; display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.sc-tab .ic { width: 14px; height: 14px; color: var(--ink-4); }
.sc-tab.is-on { font-weight: 600; color: var(--ink); }
.sc-tab.is-on .ic { color: var(--brand); }
.sc-tab.is-on::after { content: ""; position: absolute; left: 0; right: 0; bottom: -17px; height: 2px; border-radius: 2px; background: var(--brand); }
.sc-sep { width: 1px; height: 14px; margin: 0 -4px; background: #e7e5e4; }
.sc-stamp { margin-left: auto; font-size: 12px; color: var(--ink-4); font-variant-numeric: tabular-nums; }
.sc-th, .sc-r { display: grid; grid-template-columns: 170px 96px 124px 84px 84px; gap: 18px; align-items: center; padding: 0 22px; }
.sc-th { height: 38px; font-size: 12px; color: var(--ink-4); }
.sc-th span:is(:nth-child(2), :nth-child(n+4)) { text-align: right; }
.sc-r { height: 52px; border-top: 1px solid #f4f3f2; font-variant-numeric: tabular-nums; animation: sc-row-in 0.6s var(--ease-out) calc(0.55s + var(--k) * 60ms) both; }
@keyframes sc-row-in { from { opacity: 0; transform: translateY(8px); } }
.sc-n b { display: block; font-size: 14px; font-weight: 600; color: var(--ink); white-space: nowrap; }
.sc-n span { font-size: 11.5px; color: var(--ink-4); }
.sc-spk .ar, .sc-top-spk .ar { opacity: 0.12; }
.sc-spk .ln, .sc-top-spk .ln { fill: none; stroke-width: 1.6; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 1; animation: sc-draw 1.2s var(--ease-out) calc(0.7s + var(--k, 0) * 60ms) forwards; }
.sc-spk.u, .sc-top-spk.u { fill: #e5484d; stroke: #e5484d; }
.sc-spk.d, .sc-top-spk.d { fill: #12a150; stroke: #12a150; }
@keyframes sc-draw { to { stroke-dashoffset: 0; } }
.sc-c { text-align: right; }
/* 最新涨跌：数字后面垫一条浅红 / 浅绿底（和看板同一种数据条），跟着数字滚动从右往左长出来 */
.sc-chg { position: relative; display: inline-flex; justify-content: flex-end; min-width: 80px; padding: 3px 6px; font-size: 13px; font-weight: 600; }
.sc-chg::before { content: ""; position: absolute; right: 0; top: 0; bottom: 0; width: var(--w, 0); border-radius: 4px; animation: sc-bar 0.9s var(--ease-out) calc(0.65s + var(--k, 0) * 60ms) both; }
.sc-chg .sc-num { position: relative; }
.sc-chg.u { color: #c62a2f; } .sc-chg.u::before { background: rgba(229, 72, 77, 0.14); }
.sc-chg.d { color: #0d7f40; } .sc-chg.d::before { background: rgba(18, 161, 80, 0.14); }
@keyframes sc-bar { from { width: 0; } }
.sc-q { text-align: right; font-size: 13px; font-weight: 500; color: var(--ink-3); }
.sc-q.u { color: #d4353a; } .sc-q.d { color: #0f8a46; }
/* 浮卡 */
.sc-fc { position: absolute; border-radius: 16px; background: #fff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.8), 0 0 0 1px rgba(24, 24, 27, 0.05), 0 30px 60px -24px rgba(193, 64, 10, 0.4), 0 12px 24px -14px rgba(24, 24, 27, 0.22);
  translate: calc(var(--px, 0) * var(--d)) calc(var(--py, 0) * var(--d) * 0.6); transition: translate 1.2s cubic-bezier(0.2, 0.8, 0.2, 1); animation: sc-pop 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) both; }
@keyframes sc-pop { from { opacity: 0; transform: translateY(16px) scale(0.94); } }
.sc-kpi { --d: 14px; left: -44px; bottom: 36px; width: 272px; padding: 18px 20px; animation-delay: 1.1s; }
.sc-kpi-h { font-size: 12px; color: var(--ink-3); }
.sc-kpi-v { display: flex; align-items: baseline; gap: 10px; margin: 6px 0 14px; font-variant-numeric: tabular-nums; }
.sc-kpi-v b { font-size: 28px; font-weight: 600; letter-spacing: -0.01em; }
.sc-kpi-v b.u { color: #e5484d; } .sc-kpi-v b.d { color: #12a150; margin-left: 8px; }
.sc-kpi-v em { font-style: normal; font-size: 12px; color: var(--ink-3); }
.sc-bar { display: flex; gap: 3px; height: 6px; }
.sc-bar i { display: block; border-radius: 99px; }
.sc-bar .u { background: #e5484d; } .sc-bar .f { background: #d6d3d1; } .sc-bar .d { background: #12a150; }
.sc-top { --d: 24px; right: 64px; top: -24px; width: 268px; padding: 16px 18px 12px; animation-delay: 1.3s; }
.sc-top-h { display: flex; justify-content: space-between; font-size: 12px; color: var(--ink-3); }
.sc-top > b { display: block; margin: 4px 0 2px; font-size: 15px; font-weight: 600; color: var(--ink); }
.sc-big { display: block; font-size: 24px; font-weight: 600; font-variant-numeric: tabular-nums; }
.sc-big.u { color: #e5484d; } .sc-big.d { color: #12a150; }
.sc-top-spk { display: block; margin-top: 6px; overflow: visible; }
.sc-top-spk .dot { stroke: none; }
.sc-top-spk .halo { stroke: none; opacity: 0.25; transform-origin: center; transform-box: fill-box; animation: sc-breathe 2.2s ease-in-out infinite; }
@keyframes sc-breathe { 0%, 100% { transform: scale(1); opacity: 0.28; } 50% { transform: scale(2.2); opacity: 0; } }
/* 卡片里的内容跟着卡片浮起依次显现，带一点模糊（Transitions.dev texts-reveal） */
.auth-card.stagger .st { filter: blur(3px); transition: opacity 400ms var(--ease-out), transform 400ms var(--ease-out), filter 400ms var(--ease-out); transition-delay: calc(var(--i, 0) * 60ms + 160ms); }
.auth-card.stagger.is-shown .st { filter: none; }
@media (min-width: 1700px) { .sc { --s: 1.2; left: 39vw; } .auth { --ax: 9vw; } }
@media (max-width: 1599px) { .sc { --s: 1; } }
@media (max-width: 1439px) { .sc { --s: 0.87; left: 540px; } .auth { --ax: 88px; } }
@media (max-width: 1279px) { .sc { --s: 0.7; left: clamp(470px, calc(100vw - 610px), 510px); } .auth { --ax: 64px; } }
/* 窄屏、矮屏和没有行情时：不显示预览，登录卡回到正常排布居中（手机键盘弹出时页面还能滚动） */
.auth:not(.has-sc) { display: grid; place-items: center; padding: 32px 16px 72px; }
.auth:not(.has-sc) .auth-card { position: relative; left: auto; top: auto; transform: none; width: min(400px, 100%); }
@media (max-width: 1023px), (max-height: 600px) {
  .sc { display: none; }
  .auth { display: grid; place-items: center; padding: 32px 16px 72px; }
  .auth-card { position: relative; left: auto; top: auto; transform: none; width: min(400px, 100%); }
}
@media (max-width: 1023px), (max-height: 600px) { .auth { --ax: 24px; padding-top: 88px; } .auth-brand { top: 24px; } }
@media (max-width: 360px) { .auth-card .markets .mk-s { display: none; } }
@media (max-width: 640px) { .auth-card { padding: 28px 22px 26px; border-radius: 20px; } .auth-brand { font-size: 16px; } .auth-brand img { width: 30px; height: 30px; } .auth-foot { left: 0; right: 0; text-align: center; } }
.auth .input.is-error { border-color: color-mix(in srgb, var(--warn) 65%, transparent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--warn) 14%, transparent); }
.auth .control:has(.is-error) > .ic { color: var(--warn); }
.auth .input.is-error:-webkit-autofill { box-shadow: inset 0 0 0 40px #fff, 0 0 0 4px color-mix(in srgb, var(--warn) 14%, transparent); }
.is-shaking { animation: shake 280ms linear; }
@keyframes shake {
  0% { transform: translateX(0); animation-timing-function: var(--ease-out); }
  28.57% { transform: translateX(6px); animation-timing-function: var(--ease-out); }
  57.14% { transform: translateX(-6px); animation-timing-function: var(--ease-out); }
  78.57% { transform: translateX(4px); animation-timing-function: var(--ease-out); }
  100% { transform: translateX(0); } }
.t-swap { display: inline-block; transition: transform var(--dur-quick) ease-in-out, opacity var(--dur-quick) ease-in-out, filter var(--dur-quick) ease-in-out; }
.t-swap.is-exit { transform: translateY(-4px); opacity: 0; filter: blur(2px); }
.t-swap.is-enter { transform: translateY(4px); opacity: 0; filter: blur(2px); transition: none; }
.stagger .st { opacity: 0; transform: translateY(8px); transition: opacity var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out); transition-delay: calc(var(--i, 0) * 40ms); }
.stagger.is-shown .st { opacity: 1; transform: none; }

/* 触屏（平板、手机）：按钮外观与桌面一致，不加高；只把小图标按钮的可点区域向外扩到约 44px，外观不变 */
@media (pointer: coarse) {
  .act, .star, .icon-btn { position: relative; }
  .act::after, .star::after, .icon-btn::after { content: ""; position: absolute; inset: -8px; }
  /* 输入框和下拉框不再单独放大到 16px（iPad 上会比周围的字大一截）：iOS 聚焦时的自动放大改由页面头里的 maximum-scale=1 挡住 */
  .kbd { display: none; }
}
/* 用键盘打开的菜单不做动画（BeUI context menu）：键盘操作立即响应 */
html[data-kbd] .menu { transition-duration: 0s; }

/* 减少动态：关闭位移与渐变，状态仍靠颜色、文字与图标区分 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; animation-delay: 0ms !important; transition-duration: 0.01ms !important; transition-delay: 0ms !important; scroll-behavior: auto !important; }
  .sheet { transform: none; }
}

/* 全市场前 N 小标（行情数据中台的榜）：涨幅榜红、跌幅榜绿，放在数值下一行 */


/* 全市场排名：当前区间那一列浅底，永赢跟踪的指数标「永赢」可点开详情 */
/* 列少：名次、指数、跟踪产品三列定宽，四个区间平分剩下的宽度，窗口变宽变窄时列间距一起变。
   表格区窄（iPad 竖屏、开着侧边栏）时三列收窄；再窄就保持 760px、表格内横向滑动，区间列不会挤到数字重叠 */
#tMarket { table-layout: fixed; min-width: 760px; }
#tMarket th.w-rank { width: 56px; }
#tMarket th.c-name { width: 208px; }
#tMarket th.w-trk { width: 132px; }
@container (min-width: 1100px) {
  #tMarket th.w-rank { width: 64px; }
  #tMarket th.c-name { width: 280px; }
  #tMarket th.w-trk { width: 190px; }
}
/* 手机：名次、指数两列再收窄，长名字折成两行，右边多露出一列涨跌 */
@media (max-width: 600px) {
  #tMarket { min-width: 720px; }
  #tMarket th.w-rank { width: 44px; }
  #tMarket th.c-name { width: 156px; }
  #tMarket th.w-trk { width: 116px; }
  #tMarket td .nm > b { white-space: normal; }
}
/* 当前排序那一列淡淡地垫一层灰。底色要不透明：表头固定在顶上，透明的话往上滚时下面的数字会从表头里透出来 */
#tMarket td.is-cur { background: color-mix(in srgb, var(--ink) 2.5%, var(--surface)); }
#tMarket tbody tr:hover td.is-cur { background: color-mix(in srgb, var(--ink) 2.5%, var(--hover)); }
#tMarket thead th.is-cur { background: color-mix(in srgb, var(--ink) 4%, var(--inset)); }
#tMarket .rank-n { font-variant-numeric: tabular-nums; font-weight: 500; color: var(--ink-4); }
/* 不参与当日排名的（海外、当日休市）：名次列写一个淡色小字标签，不再是一道「—」夹在奖牌中间 */
#tMarket .mk-nr { display: inline-flex; align-items: center; height: 18px; padding: 0 6px; border-radius: var(--r-xs); font-size: var(--fs-11); font-weight: 500; color: var(--ink-3); background: var(--inset); box-shadow: inset 0 0 0 1px var(--line-soft); cursor: help; }
#tMarket .mk-sep td { height: auto; padding: 10px 16px 8px; font-size: var(--fs-12); color: var(--ink-3); background: var(--inset); box-shadow: inset 0 1px 0 var(--line), inset 0 -1px 0 var(--line-soft); }
#tMarket tbody tr.mk-sep:hover td { background: var(--inset); }
#tMarket .rank-n.is-hi { font-weight: 700; color: var(--ink); }
/* 前 3 名：金银铜圆标（BeUI leaderboard） */
#tMarket .mk-medal { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; font-size: var(--fs-12); font-weight: 700; color: #fff; font-variant-numeric: tabular-nums;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 1px 3px rgba(24, 24, 27, 0.18); }
#tMarket .mk-medal.m1 { color: var(--gold-t); background: linear-gradient(135deg, var(--gold-1), var(--gold-2) 55%, var(--gold-3)); }
#tMarket .mk-medal.m2 { color: var(--silver-t); background: linear-gradient(135deg, var(--silver-1), var(--silver-2) 55%, var(--silver-3)); }
#tMarket .mk-medal.m3 { color: var(--bronze-t); background: linear-gradient(135deg, var(--bronze-1), var(--bronze-2) 55%, var(--bronze-3)); }
#tMarket .mk-medal.dn { background: var(--down); }
#tMarket td.is-cur .chgcell { min-width: 84px; padding: 3px 6px; font-weight: 600; }
/* 降噪：只有当前排序那一列用满色，其余三个区间退成浅一档的红绿，一眼先看当前这列 */
#tMarket td.r:not(.is-cur) .chg-sub { font-weight: 400; }
#tMarket td.r:not(.is-cur) .chg-sub.up { color: color-mix(in srgb, var(--up) 68%, var(--ink-3)); }
#tMarket td.r:not(.is-cur) .chg-sub.down { color: color-mix(in srgb, var(--down) 68%, var(--ink-3)); }
/* 跟踪产品：纯文字「ETF 4 · 场外 2」，不再一格两个描边小胶囊 */
#tMarket .mk-ps { font-size: var(--fs-12); color: var(--ink-3); white-space: nowrap; }
#tMarket .mk-ps b { font-weight: 600; color: var(--ink-2); font-variant-numeric: tabular-nums; }
#tMarket .mk-ps > span + span::before { content: "·"; margin: 0 6px; color: var(--ink-4); }
/* 先显示前 50 只：表尾一行说明和「展开全部」 */
#tMarket .mk-more td { height: auto; padding: 14px 16px; text-align: center; font-size: var(--fs-12); color: var(--ink-3); background: var(--surface); }
#tMarket .mk-more td > span { margin-right: 12px; }
#tMarket tbody tr.mk-more:hover td { background: var(--surface); }
/* 点表头、换板块、换区间：前十几行错峰浮现（Transitions.dev 的列表入场） */
@keyframes mk-row-in { from { opacity: 0; transform: translateY(6px); } }
#tMarket tbody.is-anim tr[style] { animation: mk-row-in 320ms var(--ease-out) backwards; animation-delay: calc(var(--i) * 18ms); }
/* 临时榜的小标签：琥珀色细描边，悬停看参与排名的只数、下次更新 */
.mk-st { display: inline-flex; align-items: center; height: 18px; padding: 0 6px; border-radius: var(--r-xs); font-size: var(--fs-11); font-weight: 500; color: var(--warn); box-shadow: inset 0 0 0 1px var(--warn-line); cursor: help; vertical-align: 1px; }
/* 板块概览卡：一排可点的小统计卡，当前选中的描边加深、底色变白；卡片放不下时横向滑动 */
.mk-groups { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(118px, 1fr); gap: 8px; margin-bottom: 12px; overflow-x: auto; scrollbar-width: none; padding: 1px; }
.mk-groups::-webkit-scrollbar { display: none; }
.mk-g { display: grid; gap: 4px; padding: 11px 12px 10px; border-radius: var(--r-card); text-align: left; background: color-mix(in srgb, var(--surface) 70%, transparent); box-shadow: inset 0 0 0 1px var(--line);
  transition: background var(--dur-quick) var(--ease-out), box-shadow var(--dur-quick) var(--ease-out), translate var(--dur-fast) var(--ease-out); }
.mk-g:hover { background: var(--surface); }
@media (hover: hover) { .mk-g:hover { translate: 0 -1px; } }
/* 选中的板块：品牌色细描边加一圈很淡的光晕，板块名变品牌色（shadcn 的 ring） */
.mk-g.is-on { background: var(--surface); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--brand) 55%, transparent), 0 0 0 3px color-mix(in srgb, var(--brand) 10%, transparent), 0 6px 16px -10px rgba(253, 74, 12, 0.35); }
.mk-g.is-on .mk-g-h b { color: var(--brand-strong); }
.mk-g-h { display: flex; align-items: baseline; justify-content: space-between; gap: 6px; }
.mk-g-h b { font-size: var(--fs-13); font-weight: 600; color: var(--ink); }
.mk-g-h i { font-style: normal; font-size: var(--fs-11); color: var(--ink-4); font-variant-numeric: tabular-nums; }
.mk-g-v { font-size: var(--fs-16); font-weight: 600; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; color: var(--ink-2); }
.mk-g-v.up { color: var(--up); } .mk-g-v.down { color: var(--down); }
.mk-g-bar { display: flex; gap: 2px; height: 4px; border-radius: 99px; overflow: hidden; background: var(--canvas); }
.mk-g-bar i { display: block; min-width: 0; flex: 0 1 0%; transition: flex-grow 420ms var(--ease-out); }
.mk-g-bar .u { background: var(--up-mark); } .mk-g-bar .d { background: var(--down-mark); }
.mk-g-n { display: flex; justify-content: space-between; font-size: var(--fs-11); color: var(--ink-4); font-variant-numeric: tabular-nums; white-space: nowrap; }
.mk-g-n .u { color: color-mix(in srgb, var(--up) 70%, var(--ink-4)); } .mk-g-n .d { color: color-mix(in srgb, var(--down) 70%, var(--ink-4)); }
/* 全市场榜工具栏：区间切换在最前（板块卡、列表、热力图都跟着它），然后搜索；只数和列表 / 热力图靠右 */
.toolbar[data-toolbar="market"] .mk-period { flex: none; }
@media (min-width: 901px) { .toolbar[data-toolbar="market"] .search .input { width: 220px; } }
/* 手机：区间切换独占一行、四个按钮等分；搜索和列表 / 热力图一行；只数最后 */
@media (max-width: 600px) {
  .toolbar[data-toolbar="market"] { grid-template-columns: minmax(0, 1fr) auto; }
  .toolbar[data-toolbar="market"] .mk-period { grid-row: 1; grid-column: 1 / -1; justify-self: stretch; }
  .toolbar[data-toolbar="market"] .mk-period button { flex: 1; justify-content: center; }
  .toolbar[data-toolbar="market"] .search { grid-row: 2; grid-column: 1; }
  .toolbar[data-toolbar="market"] .view-seg { grid-row: 2; grid-column: 2; }
  .toolbar[data-toolbar="market"] .scope { grid-row: 3; grid-column: 1 / -1; justify-self: start; }
}
#tMarket .nm { flex-wrap: wrap; gap: 6px; }
#tMarket .nm > b { font-size: var(--fs-13); font-weight: 600; color: var(--ink); white-space: nowrap; }
.tag.yy { color: var(--brand-text); background: var(--brand-tint); box-shadow: inset 0 0 0 1px var(--brand-line); }


/* ───────── 数据中台（设置菜单）：沿用系统运维的版面与积木 ─────────
   取材只借做法：Beautiful UI StatusPill / Insight Cards / ProgressRing / Tool Chips，BeUI Stateful Button / Heat Calendar / Order Book，
   Rare UI GitHub Activity / Step Player，shadcn SectionCards / Bar Chart Stacked / Marker，Transitions.dev 的 reveal、icon swap、text swap、success check。
   颜色只做点缀：正常是灰，要处理的琥珀；红绿只留给涨跌，橙色只给「今天」和主按钮。
   整段都挂在 #p-hub 下：.up、.st 这类短名字全站另有用处（.up 是「涨」的颜色类），2026-09-24 撞过两次 */
#p-hub .badge.urgent { --tone: var(--warn); --tone-ink: var(--warn); }
#p-hub .badge.digest { --tone: var(--ink-3); --tone-ink: var(--ink-2); }
#p-hub .badge.prov { background: none; box-shadow: none; outline: 1px dashed var(--line-strong); outline-offset: -1px; color: var(--ink-3); }
#p-hub .kpi-v .badge { margin-left: 4px; vertical-align: 2px; font-size: var(--fs-11); height: 18px; padding: 0 6px; }
.kpi-link { display: inline-flex; align-items: center; gap: 2px; color: inherit; text-decoration: none; }
.kpi-link:hover { color: var(--ink); }

/* 状态总览：每件事一行，徽章 + 一句话 + 邮件走到哪一步 */
#p-hub .hub-iss li { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; padding-left: 0; }
#p-hub .hub-iss li::before { display: none; }
#p-hub .hub-iss .badge { height: 20px; padding: 0 6px; font-size: var(--fs-11); }
#p-hub .iss-meta { font-size: var(--fs-12); color: var(--ink-3); font-variant-numeric: tabular-nums; }
#p-hub .hub-iss .hero-acts { margin-left: auto; }

/* 概况里的小格：全市场榜收盘实心、临时虚线；万得按项目三档灰 */
#p-hub .hub-pips .pip.is-fin { background: var(--ink-4); }
#p-hub .hub-pips .pip.is-prov { background: none; box-shadow: inset 0 0 0 1px var(--line-strong); }
.pip.is-part { background: var(--warn-line); }
#p-hub .kpi-mix.proj { gap: 2px; }
#p-hub .p-index-ops { background: var(--ink-3); }
#p-hub .p-hub { background: var(--ink-4); }
#p-hub .p-vibe { background: var(--line-strong); }

/* 发测试邮件（BeUI Stateful Button）：纸飞机 → 转圈 → 对勾；文字 150ms 上下换，对勾描线 300ms */
#p-hub .mail-btn { gap: 6px; }
#p-hub .mail-ic { display: inline-grid; place-items: center; width: 14px; height: 14px; }
#p-hub .mail-ic > * { grid-area: 1 / 1; width: 14px; height: 14px; transition: opacity 250ms ease-in-out, transform 250ms ease-in-out, filter 250ms ease-in-out; }
#p-hub .mail-ic > :not(.ic), #p-hub .mail-btn[data-state] .mail-ic > .ic { opacity: 0; transform: scale(0.25); filter: blur(2px); }
#p-hub .mail-btn[data-state="busy"] .st-ring, #p-hub .mail-btn[data-state="done"] .st-tick { opacity: 1; transform: none; filter: none; }
#p-hub .st-ring circle { fill: none; stroke: currentColor; stroke-width: 2; stroke-dasharray: 30 44; transform-origin: 10px 10px; animation: spin 0.8s linear infinite; }
#p-hub .st-tick path { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 14; stroke-dashoffset: 14; transition: stroke-dashoffset 300ms var(--ease-out) 80ms; }
#p-hub .mail-btn[data-state="done"] .st-tick path { stroke-dashoffset: 0; }
#p-hub .mail-btn[data-state]:disabled { color: var(--ink-2); opacity: 1; }

/* 提醒：每件事一行，下面一条三步小轨道（Rare UI Step Player 的点与连线）；已恢复的按天分组（shadcn Marker 分隔线） */
#p-hub .al-list { list-style: none; display: grid; }
#p-hub .al { display: grid; gap: 4px; padding: 10px 0; box-shadow: 0 1px 0 var(--line-soft); }
#p-hub .al:last-child { box-shadow: none; }
#p-hub .al-h { display: flex; align-items: center; gap: 8px; min-width: 0; }
#p-hub .al-h .badge { height: 20px; padding: 0 6px; font-size: var(--fs-11); flex: none; }
#p-hub .al-h b { font-size: var(--fs-13); font-weight: 600; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#p-hub .al.is-closed .al-h b { font-weight: 500; color: var(--ink-2); }
#p-hub .al-b { font-size: var(--fs-12); line-height: 1.6; color: var(--ink-3); text-wrap: pretty; }
#p-hub .al-steps { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 6px; font-size: var(--fs-12); color: var(--ink-3); font-variant-numeric: tabular-nums; }
#p-hub .al-steps i { flex: none; width: 6px; height: 6px; border-radius: 50%; background: var(--ink-4); }
#p-hub .al-steps i.is-wait { background: none; box-shadow: inset 0 0 0 1.5px var(--ink-4); }
#p-hub .al-steps i.is-bad { background: var(--warn); }
#p-hub .al-steps s { flex: none; width: 12px; height: 1px; background: var(--line-strong); }
#p-hub .mk-sep { display: flex; align-items: center; gap: 8px; padding: 10px 0 2px; font-size: var(--fs-11); font-weight: 600; color: var(--ink-3); list-style: none; }
#p-hub .mk-sep::before, #p-hub .mk-sep::after { content: ""; flex: 1; height: 1px; background: var(--line-soft); }
#p-hub .al-sec { margin-top: 14px; }
#p-hub .al-sl { font-size: var(--fs-12); font-weight: 600; color: var(--ink-2); }
#p-hub .ml-list { list-style: none; display: grid; margin-top: 4px; }
#p-hub .ml { display: grid; grid-template-columns: 76px minmax(0, 1fr) auto; align-items: center; gap: 10px; min-height: 30px; font-size: var(--fs-12); box-shadow: 0 1px 0 var(--line-soft); }
#p-hub .ml:last-child { box-shadow: none; }
#p-hub .ml-t { color: var(--ink-3); font-variant-numeric: tabular-nums; }
#p-hub .ml-s { color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#p-hub .al-rule { margin-top: 12px; padding-top: 10px; box-shadow: 0 -1px 0 var(--line-soft); font-size: var(--fs-12); line-height: 1.6; color: var(--ink-3); text-wrap: pretty; }
#p-hub #hubAlerts .ops-ok { padding: 2px 0 4px; }

/* 全市场榜：近 10 份一份一格（Beautiful UI Tool Chips 小块）；收盘实底，临时虚线 */
#p-hub .bd-row { list-style: none; display: grid; grid-template-columns: repeat(var(--n, 10), minmax(0, 1fr)); gap: 4px; }
#p-hub .bd { display: grid; place-items: center; align-content: center; height: 44px; border-radius: var(--r-chip); background: var(--inset); box-shadow: inset 0 0 0 1px var(--line); line-height: 1.25; font-variant-numeric: tabular-nums; cursor: help; transition: box-shadow var(--dur-quick) var(--ease-out); }
#p-hub .bd b { font-size: var(--fs-12); font-weight: 600; color: var(--ink-2); }
#p-hub .bd small { font-size: var(--fs-11); color: var(--ink-3); }
#p-hub .bd:hover { box-shadow: inset 0 0 0 1px var(--line-strong); }
#p-hub .bd.is-prov { background: var(--surface); box-shadow: none; outline: 1px dashed var(--line-strong); outline-offset: -1px; }
#p-hub .bd.is-today b { color: var(--brand-strong); }
#p-hub .bd-foot { margin-top: 10px; font-size: var(--fs-12); color: var(--ink-3); font-variant-numeric: tabular-nums; }
#p-hub .bd-foot b { font-weight: 600; color: var(--ink-2); }
#p-hub #hubBoard .ops-ok { padding: 2px 0 4px; }

/* 样本：进度环（Beautiful UI ProgressRing）+ 五个数 + 折叠的名单 */
#p-hub .smp { display: flex; align-items: center; gap: 12px; }
#p-hub .smp-ring { position: relative; flex: none; width: 44px; height: 44px; }
#p-hub .smp-ring > b { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: var(--fs-12); font-weight: 600; color: var(--ink-2); font-variant-numeric: tabular-nums; }
#p-hub .smp-ring > b small { font-size: 9px; font-weight: 500; color: var(--ink-3); }
#p-hub .ring.xl .rt, #p-hub .ring.xl .rv { stroke-width: 4; }
#p-hub .ring.xl .rv { stroke: var(--ink-3); }
#p-hub .smp-t { display: grid; gap: 2px; min-width: 0; }
#p-hub .smp-t b { font-size: var(--fs-13); font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
#p-hub .smp-t span { font-size: var(--fs-12); color: var(--ink-3); }
#p-hub .st-row { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; margin: 14px 0 6px; }
/* 统计小块只在 .st-row 里：限定范围，免得和登录页入场动画的 .st 撞名（登录卡的标题、输入框曾被套上灰框） */
#p-hub .st-row > .st { display: grid; gap: 2px; padding: 8px 10px; border-radius: var(--r-ctl); background: var(--inset); box-shadow: inset 0 0 0 1px var(--line-soft); }
#p-hub .st-row > .st[data-tip] { cursor: help; }
#p-hub .st-row > .st b { font-size: var(--fs-14); font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
#p-hub .st-row > .st span { font-size: var(--fs-11); color: var(--ink-3); white-space: nowrap; }
#p-hub .sm-fold { margin: 6px 0 2px; border-radius: var(--r-ctl); box-shadow: inset 0 0 0 1px var(--line-soft); }
#p-hub .sm-fold > summary { display: flex; align-items: center; gap: 6px; padding: 7px 10px; font-size: var(--fs-12); color: var(--ink-2); border-radius: var(--r-ctl); }
#p-hub .sm-fold .fold-in { padding: 4px 10px 10px; }
#p-hub .chips { display: flex; flex-wrap: wrap; gap: 6px; }
#p-hub #hubSample .kv-row { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 12px; padding: 8px 0; font-size: var(--fs-13); box-shadow: 0 1px 0 var(--line-soft); }
#p-hub #hubSample .kv-k { color: var(--ink-3); }
#p-hub #hubSample .kv-v { color: var(--ink-2); }
#p-hub #hubSample .hub-todo { padding-top: 10px; font-size: var(--fs-13); display: grid; gap: 6px; }
#p-hub #hubSample .hub-todo ul { list-style: none; display: grid; gap: 6px; }
#p-hub #hubSample .hub-todo li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; }
#p-hub #hubSample .hub-todo .mono { font-size: var(--fs-12); color: var(--ink-3); }

/* 万得：沿用系统运维原来的格子，按项目叠三档灰（shadcn Bar Chart Stacked）；图例兼说明 */
#p-hub .wk-legend { display: inline-flex; gap: 10px; }
#p-hub .wk-legend > span { display: inline-flex; align-items: center; gap: 4px; }
#p-hub .sw { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 6px; vertical-align: 0; }
#p-hub .wk-legend .sw { margin-right: 0; }
#p-hub .wk-cols b.p-index-ops { background: var(--ink-3); }
#p-hub .wk-cols b.p-hub { background: var(--ink-4); }
#p-hub .wk-cols b.p-vibe { background: var(--line-strong); }
#p-hub .wk-cols i { gap: 1px; }
#p-hub .wk-cols i.is-today { box-shadow: inset 0 0 0 1px var(--line-strong); }
#p-hub .wk-cols i.is-out.is-today { box-shadow: inset 0 0 0 1.5px var(--warn); }
#p-hub .wk-note { display: flex; align-items: center; gap: 6px; margin: -6px 0 12px; font-size: var(--fs-12); color: var(--ink-3); }
#p-hub .wk-empty { grid-column: 1 / -1; display: flex; align-items: center; gap: 6px; color: var(--ink-3); }
#p-hub .ds-tbl { margin-bottom: 16px; font-size: var(--fs-12); }
#p-hub .ds-tbl th { height: 30px; font-size: var(--fs-12); }
#p-hub .ds-tbl td { height: 32px; font-variant-numeric: tabular-nums; }
#p-hub .ds-tbl td:first-child { color: var(--ink-2); }
/* 上限一栏的底条：用了多少（BeUI Order Book 深度条），到八成琥珀 */
#p-hub .cap { position: relative; display: inline-flex; justify-content: flex-end; min-width: 56px; padding: 1px 6px; border-radius: 3px; cursor: help; }
#p-hub .cap::before { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--w); border-radius: 3px; background: color-mix(in srgb, var(--ink-4) 18%, transparent); transform-origin: left; }
#p-hub .cap.is-near::before { background: color-mix(in srgb, var(--warn) 18%, transparent); }
#p-hub .params-h { grid-column: 1 / -1; font-size: var(--fs-12); font-weight: 600; color: var(--ink-2); }
#p-hub #hubParams { padding-top: 14px; box-shadow: 0 -1px 0 var(--line-soft); }

/* 数据源：状态页式竖条，一天一格（GitHub Activity 的格子 + Heat Calendar 的悬停）；正常灰、部分失败浅琥珀、失败琥珀 */
#p-hub .hsrc { display: grid; grid-template-columns: minmax(76px, 1fr) minmax(0, 1.4fr) auto; align-items: center; gap: 10px 12px; margin-top: 12px; }
#p-hub .hsrc-row { display: contents; }
#p-hub .hsrc-n { min-width: 0; font-size: var(--fs-13); color: var(--ink-2); overflow-wrap: anywhere; }
#p-hub .hsrc-n small { display: block; margin-top: 2px; font-size: var(--fs-11); color: var(--ink-3); }
#p-hub .hsrc-heading { font-size: var(--fs-11); color: var(--ink-3); }
#p-hub .hsrc-note { grid-column: 1 / -1; margin-top: -4px; padding-bottom: 10px; box-shadow: 0 1px 0 var(--line-soft); font-size: var(--fs-11); color: var(--ink-3); line-height: 1.5; overflow-wrap: anywhere; }
#p-hub .hub-delivery { margin-bottom: 20px; }
#p-hub .hub-delivery > .params-h { margin-bottom: 6px; }
#p-hub .hsrc-n[data-tip] { cursor: help; }
#p-hub .hsrc-pct .badge { height: 20px; padding: 0 6px; font-size: var(--fs-11); cursor: help; }
#p-hub .hsrc-bars { display: grid; grid-template-columns: repeat(var(--n, 7), minmax(0, 1fr)); gap: 3px; height: 22px; }
#p-hub .hsrc-bars i { position: relative; border-radius: 3px; background: var(--line-strong); transition: opacity var(--dur-quick) var(--ease-out), box-shadow 120ms var(--ease-out); }
#p-hub .hsrc-bars i::before { content: ""; position: absolute; inset: -5px -2px; }
#p-hub .hsrc-bars i.is-part { background: var(--warn-line); }
#p-hub .hsrc-bars i.is-down { background: var(--warn); }
#p-hub .hsrc-bars i.is-idle { background: var(--canvas); }
#p-hub .hsrc-bars i.is-todo { background: var(--surface); box-shadow: inset 0 0 0 1px var(--line-strong); }
#p-hub .hsrc-bars:has(i:hover) i:not(:hover) { opacity: 0.35; }
#p-hub .hsrc-bars i:hover { box-shadow: 0 0 0 1.5px color-mix(in srgb, var(--ink) 55%, transparent); }
#p-hub .hsrc-pct { min-width: 36px; font-size: var(--fs-12); text-align: right; color: var(--ink-3); font-variant-numeric: tabular-nums; }
#p-hub .hsrc-pct[data-tip] { cursor: help; }
#p-hub .hsrc-pct.is-low { color: var(--warn); font-weight: 600; }
#p-hub .hsrc-foot { display: flex; justify-content: space-between; margin-top: -4px; font-size: var(--fs-11); color: var(--ink-4); }

/* 中台任务：一行一个，左边时间、右边最近一次结果 */
#p-hub .hj { list-style: none; display: grid; }
#p-hub .hj li { display: grid; grid-template-columns: 76px minmax(0, 1fr) auto; align-items: center; gap: 10px; min-height: 44px; box-shadow: 0 1px 0 var(--line-soft); }
#p-hub .hj li:last-child { box-shadow: none; }
#p-hub .hj-at { font-size: var(--fs-12); color: var(--ink-3); font-variant-numeric: tabular-nums; }
#p-hub .hj-c { display: grid; gap: 1px; min-width: 0; }
#p-hub .hj-c b { font-size: var(--fs-13); font-weight: 500; color: var(--ink); }
#p-hub .hj-c span { font-size: var(--fs-12); color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#p-hub .hj-c .hj-detail { max-width: 100%; font-size: var(--fs-11); color: var(--ink-4); }
#p-hub .hj-st { display: inline-flex; align-items: center; gap: 8px; }
#p-hub .hj-t { font-size: var(--fs-12); color: var(--ink-3); font-variant-numeric: tabular-nums; }

/* 入场（Transitions.dev skeleton reveal）：只在第一次出数时，卡片里的内容依次淡入，每块错开 40ms；格子自下而上长出来 */
#p-hub .hub.is-reveal [data-rv] > * { animation: rv-in var(--dur-fast) var(--ease-out) backwards; animation-delay: calc(var(--i, 0) * 40ms); }
@keyframes rv-in { from { opacity: 0; transform: translateY(6px); filter: blur(2px); } }
#p-hub .hub.is-reveal :is(.wk-cols i > b, #p-hub .wk-cols i > u, #p-hub .hsrc-bars i) { transform-origin: 50% 100%; animation: bar-in 200ms var(--ease-out) backwards; animation-delay: calc(var(--i, 0) * 40ms + var(--d, 0) * 1ms); }
@keyframes bar-in { from { opacity: 0; transform: scaleY(0.4); } }
#p-hub .hub.is-reveal .bd { animation: pop-in 250ms var(--ease-out) backwards; animation-delay: calc(var(--i, 0) * 40ms + var(--k, 0) * 20ms); }
@keyframes pop-in { from { opacity: 0; transform: scale(0.95); } }
#p-hub .hub.is-reveal .ring.xl .rv { animation: ring-in 500ms var(--ease-out) 120ms backwards; }
#p-hub .hub.is-reveal .cap::before { animation: depth-in 250ms var(--ease-out) backwards; animation-delay: calc(var(--i, 0) * 40ms + var(--r, 0) * 25ms); }
@keyframes depth-in { from { opacity: 0; transform: scaleX(0.85); } }
#p-hub .ops .card.is-flash { animation: ops-flash 1.4s var(--ease-out); }

@media (max-width: 720px) {
  #p-hub .st-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  #p-hub .hsrc { grid-template-columns: 64px minmax(0, 1fr) auto; }
  #p-hub .ml { grid-template-columns: 64px minmax(0, 1fr) auto; }
  #p-hub .hj li { grid-template-columns: 64px minmax(0, 1fr); }
  #p-hub .hj-st { grid-column: 2; }
  #p-hub .bd small { display: none; }
}
/* ───────── 数据中台 完 ───────── */

/* 中台阅读顺序：覆盖 → 分发 → 来源 → 任务；次级记录按需展开。 */
#p-hub { --hub-gap: 16px; --hub-row-gap: 12px; --hub-inline-gap: 8px; }
#p-hub .hub-sections, #p-hub .hub-secondary { display: grid; gap: var(--hub-gap); min-width: 0; }
#p-hub .hub-status-line { display: flex; flex-wrap: wrap; align-items: center; gap: 4px var(--hub-inline-gap); color: var(--ink-2); font-size: var(--fs-12); }
#p-hub .hub-coverage-layout { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 24px; }
#p-hub .hub-coverage-head, #p-hub .hub-coverage-row { display: grid; grid-template-columns: minmax(130px, 1fr) 110px minmax(150px, 1.15fr); gap: var(--hub-row-gap); align-items: center; }
#p-hub .hub-coverage-head { color: var(--ink-3); font-size: var(--fs-12); padding-bottom: var(--hub-inline-gap); }
#p-hub .hub-coverage-row { padding: var(--hub-row-gap) 0; border-top: 1px solid var(--line-soft); }
#p-hub .hub-coverage-row > div { display: grid; justify-items: start; gap: 4px; min-width: 0; }
#p-hub .hub-coverage-row > div > span:not(.health) { font-size: var(--fs-12); color: var(--ink-3); }
#p-hub .hub-coverage-row strong { font-size: var(--fs-20); font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
#p-hub .hub-coverage-row strong small { font-size: var(--fs-13); color: var(--ink-3); font-weight: 400; }
#p-hub .hub-next { background: var(--inset); border-radius: var(--r-ctl); padding: var(--hub-gap); align-self: start; display: grid; gap: var(--hub-row-gap); }
#p-hub .hub-next h4 { font-size: var(--fs-13); font-weight: 600; }
#p-hub .hub-next p { font-size: var(--fs-12); }
#p-hub .hub-gap-details { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 var(--hub-row-gap); align-items: start; }
#p-hub .hub-missing, #p-hub .hub-queue, #p-hub .hub-flow, #p-hub .hub-jobs { list-style: none; }
#p-hub .hub-missing li { display: flex; flex-wrap: wrap; gap: 4px var(--hub-inline-gap); justify-content: space-between; padding: 6px 0; border-bottom: 1px solid var(--line-soft); font-size: var(--fs-12); }
#p-hub .hub-gap-details > [data-fold="backfill-queue"] { grid-column: 1 / -1; }
#p-hub .hub-qg + .hub-qg { margin-top: var(--hub-gap); }
#p-hub .hub-qg-r { margin-bottom: 4px; font-size: var(--fs-12); color: var(--ink-2); overflow-wrap: anywhere; }
#p-hub .hub-queue { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 0 var(--hub-gap); }
#p-hub .hub-queue li { display: flex; flex-wrap: wrap; align-items: center; gap: 4px var(--hub-inline-gap); min-width: 0; padding: 8px 0; border-bottom: 1px solid var(--line-soft); font-size: var(--fs-12); }
#p-hub .hub-queue li b { font-weight: 600; color: var(--ink); }
#p-hub .hub-queue li small { margin-left: auto; font-variant-numeric: tabular-nums; }
#p-hub .hub-flow { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
#p-hub .hub-flow li { position: relative; display: grid; gap: 4px; background: var(--inset); border: 1px solid var(--line); border-radius: var(--r-ctl); padding: var(--hub-row-gap) var(--hub-gap); }
#p-hub .hub-flow li:not(:last-child)::after { content: '→'; position: absolute; right: -20px; top: 50%; translate: 0 -50%; color: var(--ink-3); }
#p-hub .hub-flow span, #p-hub .hub-flow small { font-size: var(--fs-12); color: var(--ink-3); }
#p-hub .hub-flow b { font-weight: 600; }
#p-hub .hub-delivery-stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--hub-gap); margin: var(--hub-gap) 0; }
#p-hub .hub-delivery-stats > div { display: grid; gap: 4px; }
#p-hub .hub-delivery-stats b { font-size: var(--fs-20); font-weight: 600; font-variant-numeric: tabular-nums; }
#p-hub .hub-delivery-stats span { font-size: var(--fs-12); color: var(--ink-3); }
#p-hub .hub-priority { display: grid; gap: var(--hub-row-gap); }
#p-hub .hub-priority > div { display: grid; grid-template-columns: 80px 1fr; gap: var(--hub-inline-gap); }
#p-hub .hub-priority dt { color: var(--ink-3); }
#p-hub .hub-priority dd { display: flex; flex-wrap: wrap; align-items: center; gap: 4px var(--hub-inline-gap); }
#p-hub .hub-priority i { font-style: normal; color: var(--ink-4); }
#p-hub .hub-source-note { color: var(--ink-3); background: var(--inset); padding: var(--hub-row-gap); border-radius: var(--r-ctl); font-size: var(--fs-12); margin-top: var(--hub-gap); }
#p-hub .hub-source-note b { color: var(--ink-2); }
#p-hub .hub-jobs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 24px; }
#p-hub .hub-jobs > li { min-width: 0; padding: var(--hub-row-gap) 0; border-bottom: 1px solid var(--line-soft); }
#p-hub .hub-job-top, #p-hub .hub-job-top > div { display: flex; align-items: center; flex-wrap: wrap; gap: var(--hub-inline-gap); }
#p-hub .hub-job-top { justify-content: space-between; margin-bottom: 4px; }
#p-hub .hub-job-top .muted, #p-hub .hub-jobs p { font-size: var(--fs-12); }
#p-hub .hub-raw { font: var(--fs-11)/1.6 var(--font-mono); white-space: pre-wrap; overflow-wrap: anywhere; color: var(--ink-3); }
#p-hub .hub-mail-action { display: flex; justify-content: flex-end; margin-top: var(--hub-gap); }
#p-hub .hub-secondary > .fold { min-width: 0; }
@container (max-width: 1000px) {
  #p-hub .hub-coverage-layout { grid-template-columns: 1fr; gap: var(--hub-row-gap); }
  #p-hub .hub-next { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #p-hub .hub-next h4 { grid-column: 1 / -1; }
}
@media (max-width: 600px) {
  #p-hub .card-head { flex-wrap: wrap; gap: 4px var(--hub-inline-gap); }
  #p-hub .card-head .sub { font-size: var(--fs-11); }
  #p-hub .hub-coverage-head { display: none; }
  #p-hub .hub-coverage-row { grid-template-columns: minmax(0, 1fr) auto; }
  #p-hub .hub-coverage-row > div:last-child { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: var(--hub-inline-gap); }
  #p-hub .hub-next, #p-hub .hub-gap-details, #p-hub .hub-flow, #p-hub .hub-jobs { grid-template-columns: minmax(0, 1fr); }
  #p-hub .hub-flow { gap: 20px; }
  #p-hub .hub-flow li:not(:last-child)::after { content: '↓'; right: 50%; top: auto; bottom: -20px; translate: 50% 0; }
  #p-hub .hub-delivery-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  #p-hub .hub-priority > div { grid-template-columns: minmax(0, 1fr); gap: 4px; }
}
#p-hub .hub-wind-table .tbl { min-width: 460px; }
#p-hub .hub-wind-table .tbl .r { white-space: nowrap; }

/* 各层折叠独立显示箭头，展开父项不改变闭合子项。 */
#p-hub .fold > summary .fold-ic { rotate: 0deg; }
#p-hub .fold[open] > summary .fold-ic { rotate: 180deg; }

/* ───────── 界面迭代（第 2.49 节）：参照 shadcn/ui、Beautiful UI、Rare UI、BeUI、Transitions.dev ───────── */
/* 统计卡（shadcn dashboard 的 section cards）：顶部一层很淡的渐变，标签前小图标，数字大一号；悬停轻轻浮起 */
.kpi { position: relative; gap: 6px; padding: 16px 18px 14px; background: linear-gradient(180deg, color-mix(in srgb, var(--ink) 2%, var(--surface)), var(--surface) 60%);
  transition: box-shadow var(--dur-fast) var(--ease-out), translate var(--dur-fast) var(--ease-out); }
.kpi-l { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; }
.kpi-l .kpi-ic { width: 14px; height: 14px; color: var(--ink-4); }
.kpi-v { font-size: 22px; letter-spacing: -0.02em; }
.kpi-s { padding-top: 8px; box-shadow: inset 0 1px 0 var(--line-soft); }
.kpi.is-warn .kpi-l .kpi-ic, .kpi.is-bad .kpi-l .kpi-ic { color: var(--warn); }
.kpi.is-warn .kpi-s, .kpi.is-bad .kpi-s { box-shadow: inset 0 1px 0 var(--warn-line); }
@media (hover: hover) { .kpi:hover { translate: 0 -1px; box-shadow: var(--sh-card), 0 8px 20px -12px rgba(24, 24, 27, 0.18); } }

/* 卡片标题前的图标方块（Rare UI 列表的图标块）：浅灰底、细描边，和标题一行对齐 */
.rsec-h .ch-ic, .card-head .ch-ic { flex: none; width: 26px; height: 26px; padding: 5px; margin-left: -2px; border-radius: 7px; color: var(--ink-2); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line), 0 1px 1px rgba(24, 24, 27, 0.04); }
.fold[open] > summary .ch-ic, .card:not(.fold) .ch-ic, .rsec-h .ch-ic { color: var(--brand-strong); }

/* 折叠卡片（Transitions.dev accordion）：悬停整条变浅灰，箭头放在一个小圆底里，展开时转过来 */
.fold .fold-ic { width: 22px; height: 22px; padding: 4px; border-radius: 50%; transition: rotate var(--dur-fast) var(--ease-out), background var(--dur-quick) var(--ease-out), color var(--dur-quick) var(--ease-out); }
.fold > summary:hover .fold-ic { color: var(--ink); background: var(--hover-2); }

/* 数据中台「数据是否齐全」：每一行数字下面一条进度（Beautiful UI progress），有缺口时琥珀色 */
#p-hub .hub-coverage-row strong { display: grid; gap: 6px; }
#p-hub .hub-meter { display: block; width: 88px; height: 4px; border-radius: 99px; background: var(--canvas); overflow: hidden; }
#p-hub .hub-meter b { display: block; width: var(--p, 0%); height: 100%; border-radius: inherit; background: var(--ink-3); transition: width 600ms var(--ease-out); }
#p-hub .hub-meter.is-gap { background: color-mix(in srgb, var(--warn) 16%, var(--surface)); }
#p-hub .hub-meter.is-gap b { background: linear-gradient(90deg, var(--warn), color-mix(in srgb, var(--warn) 70%, #f5b94a)); }
/* 卡片依次浮现（Transitions.dev stagger）：系统运维、数据中台、规则设置切进来时，卡片按顺序淡入上移，每张错开 40ms */
@keyframes card-rise { from { opacity: 0; translate: 0 6px; } }
:is(#p-ops, #p-hub).is-active .ops-col > .card, #p-hub.is-active .hub > .card, #p-rules.is-active .rsec { animation: card-rise 320ms var(--ease-out) backwards; }
:is(#p-ops, #p-hub, #p-rules).is-active :is(.card, .rsec):nth-child(2) { animation-delay: 40ms; }
:is(#p-ops, #p-hub, #p-rules).is-active :is(.card, .rsec):nth-child(3) { animation-delay: 80ms; }
:is(#p-ops, #p-hub, #p-rules).is-active :is(.card, .rsec):nth-child(4) { animation-delay: 120ms; }
:is(#p-ops, #p-hub, #p-rules).is-active :is(.card, .rsec):nth-child(n+5) { animation-delay: 160ms; }
.sig-toolbar .nsel { min-width: 132px; }
.field .nsel { display: flex; width: 100%; }
/* 统计卡右上角的状态小标签（shadcn section cards）：细描边胶囊，正常是灰，留意是琥珀描边，异常是琥珀实底 */
.kpi-b { position: absolute; top: 13px; right: 14px; display: inline-flex; align-items: center; gap: 4px; height: 20px; padding: 0 7px; border-radius: var(--r-pill); font-size: var(--fs-11); font-weight: 500; color: var(--ink-3); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.kpi-b .ic { width: 11px; height: 11px; }
.kpi.is-warn .kpi-b { color: var(--warn); box-shadow: inset 0 0 0 1px var(--warn-line); }
.kpi.is-bad .kpi-b { color: #fff; background: var(--warn); box-shadow: none; }
/* 今日任务时间轴（Rare UI Task list）：完成的节点深一点，下一个任务的节点外面一圈品牌色脉冲 */
.tl-row.is-ok .tl-node { background: var(--ink-3); }
.tl-row.is-next .tl-node::after { content: ""; position: absolute; inset: -3px; border-radius: 50%; box-shadow: 0 0 0 1.5px color-mix(in srgb, var(--brand) 55%, transparent); animation: tl-pulse 1.8s var(--ease-out) infinite; }
@keyframes tl-pulse { 0% { opacity: 1; scale: 0.9; } 100% { opacity: 0; scale: 1.5; } }
/* 数据中台「统一采集与分发」流程图（Beautiful UI Flowchart）：点阵画布上三个节点，中台节点品牌色描边；
   节点之间的连线上一粒光点从左往右流过（数据在流动）；窄屏竖排 */
#p-hub .hub-flow { gap: 44px; padding: 22px; border-radius: var(--r-card); background: radial-gradient(circle, color-mix(in srgb, var(--ink) 16%, transparent) 1px, transparent 1.3px) 0 0 / 14px 14px, var(--inset); box-shadow: inset 0 0 0 1px var(--line-soft); }
#p-hub .hub-flow li { grid-template-columns: auto minmax(0, 1fr); column-gap: 12px; row-gap: 2px; align-items: center; padding: 14px 16px; border: 0; border-radius: 12px; background: var(--surface); box-shadow: var(--sh-card), 0 8px 18px -14px rgba(24, 24, 27, 0.3); }
#p-hub .hub-flow li > :not(.hf-ic) { grid-column: 2; }
#p-hub .hub-flow .hf-ic { grid-row: 1 / span 3; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; color: var(--ink-2); background: var(--inset); box-shadow: inset 0 0 0 1px var(--line); }
#p-hub .hub-flow .hf-ic .ic { width: 18px; height: 18px; }
#p-hub .hub-flow li.is-hub { box-shadow: 0 0 0 1px color-mix(in srgb, var(--brand) 45%, transparent), 0 0 0 4px color-mix(in srgb, var(--brand) 8%, transparent), 0 10px 22px -14px rgba(253, 74, 12, 0.45); }
#p-hub .hub-flow li.is-hub .hf-ic { color: var(--brand-strong); background: color-mix(in srgb, var(--brand) 9%, var(--surface)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--brand) 25%, transparent); }
#p-hub .hub-flow li:not(:last-child)::after { content: ""; right: -44px; top: 50%; width: 44px; height: 2px; translate: 0 -50%; border-radius: 2px; color: transparent;
  background: linear-gradient(90deg, transparent 0 30%, color-mix(in srgb, var(--brand) 85%, #fff) 45%, transparent 60%) 0 0 / 300% 100% no-repeat, var(--line-strong); animation: hf-flow 1.8s linear infinite; }
#p-hub .hub-flow li:nth-child(2)::after { animation-delay: 0.9s; }
@keyframes hf-flow { from { background-position: 100% 0, 0 0; } to { background-position: 0% 0, 0 0; } }
@media (max-width: 900px) {
  #p-hub .hub-flow { gap: 32px; }
  #p-hub .hub-flow li:not(:last-child)::after { right: auto; left: 34px; top: auto; bottom: -32px; width: 2px; height: 32px; translate: 0 0;
    background: linear-gradient(180deg, transparent 0 30%, color-mix(in srgb, var(--brand) 85%, #fff) 45%, transparent 60%) 0 0 / 100% 300% no-repeat, var(--line-strong); animation-name: hf-flow-v; }
  @keyframes hf-flow-v { from { background-position: 0 100%, 0 0; } to { background-position: 0 0%, 0 0; } }
}
/* 分发数字（shadcn stats）：一条带细分隔线的统计栏，数字大、标签在下；最后两项（旧数据、失败）大于 0 时变琥珀色 */
#p-hub .hub-delivery-stats { gap: 0; margin: 16px 0; border-radius: 12px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; }
#p-hub .hub-delivery-stats > div { gap: 2px; padding: 12px 16px; }
#p-hub .hub-delivery-stats > div + div { box-shadow: inset 1px 0 0 var(--line-soft); }
#p-hub .hub-delivery-stats b { font-size: 22px; letter-spacing: -0.02em; line-height: 1.2; }
#p-hub .hub-delivery-stats > div.is-warn b { color: var(--warn); }

/* ───────── 热力图视图（heat.js）：盘中异动、全市场榜的「列表 / 热力图」切换 ─────────
   配色和「连涨连跌」的方格同一套（app.js 的 heatBg）：涨跌色（--up-mark / --down-mark）混进卡片白，浓度 8%–32% 封顶，
   文字用同色系深色、指数名用正文色；方块之间留 4px 白缝、圆角、极细描边。悬停：其他方块变淡，这一块描边加深（和连涨连跌一样） */
.table-scroll[hidden], .heatmap[hidden] { display: none !important; }
.view-seg { flex: none; }
/* 图标 + 文字，和「仅看触发」「我的关注」同一个样子：图标浅灰，选中的那项图标用品牌色 */
.view-seg button { padding: 0 10px 0 8px; }
.view-seg .ic { width: 14px; height: 14px; color: var(--ink-4); transition: color var(--dur-quick) var(--ease-out); }
.view-seg button:hover .ic { color: var(--ink-3); }
.view-seg button[aria-pressed="true"] .ic { color: var(--brand); }
/* 容器类名不能叫 .heat：连涨连跌的表格是 .tbl.heat，09-27 撞过（表格被加了内边距和容器查询，整张表缩进一圈） */
.heatmap { container-type: inline-size; padding: 14px 16px 16px; }
.heat-h { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 14px; margin-bottom: 12px; }
.heat-area { font-size: var(--fs-12); color: var(--ink-3); }
.heat-lg { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; font-size: var(--fs-11); color: var(--ink-3); font-variant-numeric: tabular-nums; }
.heat-lg i { width: 132px; height: 6px; border-radius: 99px; box-shadow: inset 0 0 0 1px rgba(24, 24, 27, 0.04);
  background: linear-gradient(90deg, color-mix(in srgb, var(--down-mark) 32%, var(--surface)), var(--inset) 50%, color-mix(in srgb, var(--up-mark) 32%, var(--surface))); }
.heat-ps { display: grid; gap: 16px; }
@container (min-width: 720px) { .heat-ps.is-split { grid-template-columns: 1fr 1fr; } }
/* 面板：浅灰底的一块「盘面」，方块之间的缝露出底色；面板头左边是「领涨 · 前 25」标签，右边写这一块的第一名 */
.hp { padding: 10px; border-radius: var(--r-card); background: var(--inset); box-shadow: inset 0 0 0 1px var(--line-soft); }
.hp-h { display: flex; align-items: center; gap: 8px; min-height: 24px; margin: 0 2px 10px; font-size: var(--fs-12); color: var(--ink-3); }
.hp-t { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: 99px; font-size: var(--fs-12); font-weight: 600; color: var(--ink-2); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.hp-t::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--ink-4); }
.hp.is-up .hp-t { color: var(--up-ink); background: color-mix(in srgb, var(--up-mark) 8%, var(--surface)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--up-mark) 22%, transparent); }
.hp.is-down .hp-t { color: var(--down-ink); background: color-mix(in srgb, var(--down-mark) 8%, var(--surface)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--down-mark) 22%, transparent); }
.hp.is-up .hp-t::before { background: var(--up-mark); } .hp.is-down .hp-t::before { background: var(--down-mark); }
.hp-l { display: inline-flex; align-items: baseline; gap: 6px; min-width: 0; margin-left: auto; white-space: nowrap; }
.hp-l .hp-nm { overflow: hidden; text-overflow: ellipsis; font-weight: 600; color: var(--ink); }
.hp-l .hp-v { font-weight: 700; font-variant-numeric: tabular-nums; }
.hp.is-up .hp-l .hp-v { color: var(--up); } .hp.is-down .hp-l .hp-v { color: var(--down); }
.hp-empty { display: grid; place-items: center; min-height: 120px; border-radius: var(--r-ctl); font-size: var(--fs-12); color: var(--ink-3); background: var(--surface); }
.heat-c { position: relative; }
.heat-ps > .empty { position: static; }
.ht { --hd: var(--ink-4); --ink-t: var(--ink-2); position: absolute; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 4px 6px; overflow: hidden; border-radius: var(--r, 8px); text-align: center; cursor: default;
  background: color-mix(in srgb, var(--hd) var(--m, 0%), var(--surface)); box-shadow: inset 0 0 0 1px rgba(24, 24, 27, 0.05);
  transition: background-color 450ms var(--ease-out), opacity 200ms var(--ease-out), box-shadow 150ms var(--ease-out); }
.ht.up { --hd: var(--up-mark); --ink-t: var(--up-ink); }
.ht.down { --hd: var(--down-mark); --ink-t: var(--down-ink); }
.ht.flat { background: var(--inset); }
.heat-c.is-morph .ht { transition: left 520ms var(--ease-out), top 520ms var(--ease-out), width 520ms var(--ease-out), height 520ms var(--ease-out), background-color 450ms var(--ease-out), opacity 200ms var(--ease-out), box-shadow 150ms var(--ease-out); }
.ht.is-link { cursor: pointer; }
.ht b { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--fs-12); font-weight: 600; line-height: 1.3; color: var(--ink); }
.ht span { font-size: var(--fs-12); font-weight: 600; line-height: 1.25; font-variant-numeric: tabular-nums; color: var(--ink-t); }
.ht.is-lg { gap: 4px; }
.ht:is(.is-md, .is-lg) b { font-size: var(--fn, var(--fs-12)); }
.ht:is(.is-md, .is-lg) span { font-size: var(--fv, var(--fs-12)); letter-spacing: -0.01em; }
.ht.is-sm { padding: 2px; }
.ht.is-sm b { display: none; }
.ht.is-sm span { font-size: var(--fs-11); }
.ht.is-xs > * { display: none; }
/* 左上角的全市场名次：中等以上的方块才写 */
.ht .ht-rk { position: absolute; top: 5px; left: 7px; font-style: normal; font-size: var(--fs-11); font-weight: 600; line-height: 1; font-variant-numeric: tabular-nums; color: color-mix(in srgb, var(--ink-t) 55%, transparent); }
.ht.is-sm .ht-rk { display: none; }
.ht.is-yy::after { content: ""; position: absolute; top: 6px; right: 6px; width: 6px; height: 6px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 1.5px var(--surface); }
.ht.is-new { animation: ht-in 360ms var(--ease-out) backwards; animation-delay: calc(var(--i, 0) * 12ms); }
@keyframes ht-in { from { opacity: 0; scale: 0.94; } }
@media (hover: hover) {
  .heat-c:has(.ht:hover) .ht:not(:hover) { opacity: 0.45; }
  .ht:hover { z-index: 2; box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--hd) 55%, transparent), 0 6px 16px -8px rgba(24, 24, 27, 0.22); }
}
.ht:focus-visible { z-index: 2; outline: 2px solid var(--focus); outline-offset: 1px; }
@media (max-width: 600px) { .heat { padding: 12px; } .heat-lg { margin-left: 0; } .heat-lg i { width: 96px; } }

/* 全市场名次（pure.js 的 rankToken）：数值下面一个榜单胶囊，只写「第 12」，涨跌看颜色；
   前 3 名实心胶囊（涨幅奖杯、跌幅下跌箭头），4–10 名浅色胶囊带一个点，11 名以后只有一行淡字 */
.rkx-col { display: inline-flex; flex-direction: column; align-items: flex-end; gap: 3px; }
.rkp { --tc: var(--ink-3); --tk: var(--ink-3); display: inline-flex; align-items: center; gap: 3px; height: 18px; padding: 0 7px; border-radius: 99px; font-size: var(--fs-11); line-height: 1; white-space: nowrap; font-variant-numeric: tabular-nums; color: var(--tk); cursor: default; }
.rkp.up { --tc: var(--up-mark); --tk: var(--up-ink); }
.rkp.down { --tc: var(--down-mark); --tk: var(--down-ink); }
.rkp em { font-style: normal; font-size: 10px; font-weight: 500; opacity: 0.78; }
.rkp b { font-weight: 700; letter-spacing: 0.01em; }
/* 三档：前 3 实心（涨幅是奖牌），4–10 浅色底，11 以后细描边 */
.rkp.t1 { color: #fff; background: var(--tc); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22); }
.rkp.t1 em { opacity: 0.9; }
.rkp.t2 { background: color-mix(in srgb, var(--tc) 12%, var(--surface)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--tc) 24%, transparent); }
.rkp.t3 { background: var(--surface); color: color-mix(in srgb, var(--tk) 85%, var(--ink-3)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--tc) 30%, var(--line)); }
.rkp.t3 b { font-weight: 600; }
/* 涨幅前 3 的奖牌：金、银、铜的金属渐变底，深色字，左边一枚小奖牌（绶带 + 奖章） */
.rkp.md { --m1: var(--gold-1); --m2: var(--gold-2); --m3: var(--gold-3); --mt: var(--gold-t); padding-left: 5px; color: var(--mt); background: linear-gradient(135deg, var(--m1), var(--m2) 55%, var(--m3)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55), inset 0 0 0 1px rgba(95, 65, 0, 0.14), 0 1px 2px rgba(95, 65, 0, 0.18); }
.rkp.md.m2 { --m1: var(--silver-1); --m2: var(--silver-2); --m3: var(--silver-3); --mt: var(--silver-t); }
.rkp.md.m3 { --m1: var(--bronze-1); --m2: var(--bronze-2); --m3: var(--bronze-3); --mt: var(--bronze-t); }
.rkp.md em { opacity: 0.8; }
.rkp-md { flex: none; width: 11px; height: 13px; margin-top: -1px; }
.rkp-md .rb { fill: color-mix(in srgb, var(--mt) 55%, var(--tc)); }
.rkp-md circle { fill: var(--m2); stroke: var(--mt); stroke-opacity: 0.45; stroke-width: 0.9; }
.rkp-md circle.hl { fill: var(--m1); stroke: none; }
.dv .rkp { margin-left: 6px; }
