:root {
  color-scheme: dark;
  --bg: #060b12;
  --bg-soft: #0a121d;
  --panel: rgba(14, 24, 36, .82);
  --panel-solid: #0e1824;
  --panel-raised: #132131;
  --ink: #f2f7f6;
  --muted: #8da0aa;
  --line: rgba(153, 197, 190, .14);
  --line-strong: rgba(82, 214, 183, .28);
  --accent: #45dfb1;
  --accent-strong: #20b98e;
  --accent-soft: rgba(69, 223, 177, .1);
  --cyan: #5bc8ef;
  --amber: #f2aa52;
  --red: #ff6b63;
  --blue: #72a7ff;
  --shadow: 0 24px 80px rgba(0, 0, 0, .28);
  --radius: 18px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; overflow-x: hidden; background: var(--bg); color: var(--ink); font: 14px/1.6 Inter, "SF Pro Display", "PingFang SC", "Microsoft YaHei", sans-serif; letter-spacing: .01em; }
button, input, select, textarea { font: inherit; }
button, select { cursor: pointer; }
a { color: inherit; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.skip-link { position: fixed; left: 16px; top: -50px; z-index: 200; padding: 8px 12px; border-radius: 8px; background: var(--accent); color: #03100d; transition: top .2s; }
.skip-link:focus { top: 12px; }
.ambient { position: fixed; z-index: -3; width: 44vw; height: 44vw; border-radius: 50%; filter: blur(110px); opacity: .12; pointer-events: none; }
.ambient-one { right: -18vw; top: -20vw; background: var(--accent); }
.ambient-two { left: -24vw; top: 38vh; background: #2369a8; }
.grid-overlay { position: fixed; inset: 0; z-index: -2; opacity: .16; pointer-events: none; background-image: linear-gradient(rgba(111,164,157,.08) 1px, transparent 1px), linear-gradient(90deg, rgba(111,164,157,.08) 1px, transparent 1px); background-size: 48px 48px; mask-image: linear-gradient(to bottom, black, transparent 78%); }

.topbar { min-height: 72px; padding: 0 max(24px, calc((100vw - 1480px) / 2)); display: flex; align-items: center; gap: 22px; border-bottom: 1px solid var(--line); background: rgba(6,11,18,.78); position: sticky; top: 0; z-index: 30; backdrop-filter: blur(22px) saturate(130%); }
.brand { display: flex; align-items: center; gap: 13px; }
.brand { flex: 0 0 auto; text-decoration: none; }
.brand-mark { width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid var(--line-strong); border-radius: 12px; background: linear-gradient(145deg, rgba(69,223,177,.18), rgba(69,223,177,.04)); color: var(--accent); font-size: 26px; box-shadow: inset 0 1px rgba(255,255,255,.08), 0 0 35px rgba(69,223,177,.08); }
.brand div { display: flex; flex-direction: column; line-height: 1.15; }
.brand strong { font-size: 15px; letter-spacing: .04em; }
.brand span { color: var(--muted); font-size: 9px; margin-top: 5px; letter-spacing: .16em; }
.primary-nav { display: flex; align-items: center; justify-content: center; gap: 4px; margin: 0 auto; }
.primary-nav a { padding: 8px 10px; border-radius: 8px; color: var(--muted); font-size: 11px; font-weight: 700; text-decoration: none; white-space: nowrap; transition: color .18s, background .18s; }
.primary-nav a:hover { color: var(--ink); background: rgba(255,255,255,.04); }
.primary-nav a.active { color: var(--accent); background: var(--accent-soft); }
.top-actions { display: flex; flex: 0 0 auto; gap: 8px; align-items: center; }
/* 顶栏账号区：头像 + 用户名 + 角色标签；管理员与普通用户同一套结构，只有角色文案不同。 */
.user-chip { display: inline-flex; align-items: center; gap: 8px; padding: 3px 10px 3px 3px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255,255,255,.03); }
.user-avatar { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; border: 1px solid rgba(69,223,177,.35); background: rgba(69,223,177,.12); color: var(--accent); font-size: 11px; font-weight: 700; text-transform: uppercase; }
.user-meta { display: grid; gap: 1px; line-height: 1.15; }
.user-meta strong { color: var(--ink); font-size: 11.5px; font-weight: 600; }
.user-meta small { color: var(--muted); font-size: 9.5px; letter-spacing: .04em; }
.icon-button { display: inline-grid; place-items: center; width: 32px; height: 32px; border: 1px solid var(--line); border-radius: 8px; background: rgba(255,255,255,.03); color: #afc0c6; font-size: 14px; line-height: 1; cursor: pointer; transition: border-color .18s, color .18s, background .18s; }
.icon-button:hover { border-color: var(--line-strong); color: var(--accent); background: var(--accent-soft); }
.icon-button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.button.ghost.compact { padding: 6px 12px; font-size: 11.5px; }
@media (max-width: 760px) {
  .user-meta strong { display: none; }
  .user-chip { padding: 3px; }
}

.runtime-pill { border: 1px solid var(--line); border-radius: 999px; padding: 6px 11px; color: #afc0c6; font-size: 11px; background: rgba(255,255,255,.025); }

main { max-width: 1480px; margin: 0 auto; padding: 34px 24px 70px; }
.page-main { min-height: calc(100vh - 138px); }
.page-heading { min-height: 220px; margin-bottom: 16px; padding: 42px 48px; display: flex; align-items: center; justify-content: space-between; gap: 36px; border: 1px solid var(--line); border-radius: 22px; background: radial-gradient(circle at 88% 12%, rgba(69,223,177,.1), transparent 34%), linear-gradient(135deg, rgba(16,31,43,.96), rgba(8,17,27,.94)); box-shadow: var(--shadow); }
.page-heading h1 { font-size: clamp(34px,4vw,54px); }
.page-heading p:not(.section-index) { max-width: 760px; margin: 16px 0 0; color: var(--muted); }
.page-heading > .button { flex: 0 0 auto; text-decoration: none; }
.hero { min-height: 320px; padding: clamp(34px,4vw,56px); display: grid; grid-template-columns: minmax(0,1.35fr) minmax(320px,.65fr); gap: 56px; align-items: center; border: 1px solid var(--line); border-radius: 26px; background: radial-gradient(circle at 82% 15%, rgba(69,223,177,.12), transparent 34%), linear-gradient(135deg, rgba(16,31,43,.97), rgba(8,17,27,.96)); position: relative; overflow: hidden; box-shadow: var(--shadow); }
.hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(105deg, transparent 45%, rgba(69,223,177,.035)); pointer-events: none; }
.hero::after { content: ""; position: absolute; width: 520px; height: 520px; right: -190px; top: -280px; border: 1px solid rgba(69,223,177,.15); border-radius: 50%; box-shadow: 0 0 0 62px rgba(69,223,177,.025), 0 0 0 124px rgba(69,223,177,.018); }
.hero > div { position: relative; z-index: 1; }
.hero-kicker, .eyebrow, .section-index { color: var(--accent); font-size: 10px; font-weight: 800; letter-spacing: .18em; margin: 0 0 14px; }
.live-dot { width: 7px; height: 7px; display: inline-block; margin-right: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 5px rgba(69,223,177,.08), 0 0 18px rgba(69,223,177,.55); animation: pulse 2.4s ease-in-out infinite; }
h1 { font-size: clamp(38px,5vw,68px); line-height: 1.06; letter-spacing: -.045em; margin: 0; font-weight: 760; }
h1 em { color: var(--accent); font-style: normal; text-shadow: 0 0 40px rgba(69,223,177,.15); }
.hero > div > p { color: #9cafb6; max-width: 720px; font-size: 15px; margin: 25px 0 0; }
.hero-tags { display: flex; gap: 9px; flex-wrap: wrap; margin-top: 27px; }
.hero-tags span { padding: 6px 10px; border: 1px solid var(--line); border-radius: 7px; background: rgba(255,255,255,.025); color: #b8c8cc; font-size: 10px; letter-spacing: .08em; }
.hero-status { display: grid; gap: 10px; }
.status-card { padding: 17px; display: flex; gap: 14px; align-items: flex-start; border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,.025); transition: transform .25s ease, border-color .25s ease, background .25s ease; }
.status-card:hover { transform: translateX(-4px); border-color: var(--line-strong); background: rgba(69,223,177,.045); }
.status-icon { flex: 0 0 32px; height: 32px; display: grid; place-items: center; border-radius: 9px; background: var(--accent-soft); color: var(--accent); font: 800 10px/1 monospace; }
.status-card b, .status-card small { display: block; }
.status-card b { font-size: 13px; }
.status-card small { color: var(--muted); margin-top: 3px; font-size: 11px; }

.stats-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 12px; margin: 16px 0; }
.stat { min-height: 126px; position: relative; overflow: hidden; background: linear-gradient(145deg, rgba(18,31,45,.9), rgba(10,19,29,.9)); border: 1px solid var(--line); border-radius: 16px; padding: 20px; box-shadow: 0 14px 35px rgba(0,0,0,.13); transition: transform .22s, border-color .22s; }
.stat:hover { transform: translateY(-3px); border-color: var(--line-strong); }
.stat::after { content: ""; position: absolute; right: -22px; bottom: -48px; width: 100px; height: 100px; border: 1px solid rgba(69,223,177,.09); border-radius: 50%; }
.stat span { color: var(--muted); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; }
.stat strong { display: block; font-size: 35px; line-height: 1.1; margin-top: 9px; letter-spacing: -.04em; font-weight: 720; }
.stat small { color: var(--accent); font-size: 10px; }


.workspace-grid { display: grid; grid-template-columns: minmax(0,2fr) minmax(330px,.78fr); gap: 16px; margin: 16px 0; align-items: start; }
.config-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; margin: 16px 0; align-items: start; }
.config-grid .panel-span-2 { grid-column: 1 / -1; }

/* 定时任务总览弹窗 */
.schedule-dialog { width: min(720px, calc(100vw - 32px)); }
.schedule-overview-body { padding: 18px 22px 22px; display: grid; gap: 12px; }
.schedule-overview-list { display: grid; gap: 10px; max-height: min(56vh, 460px); overflow-y: auto; padding-right: 4px; }
.schedule-task { display: grid; gap: 9px; padding: 13px 14px; border: 1px solid var(--line); border-radius: 11px; background: rgba(255, 255, 255, .022); }
.schedule-task.paused, .schedule-task.draft { background: rgba(255, 255, 255, .012); border-style: dashed; }
.schedule-task-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.schedule-task-head strong { font-size: 13.5px; font-weight: 680; }
.schedule-state { flex: 0 0 auto; padding: 3px 9px; border-radius: 999px; background: rgba(255, 255, 255, .05); color: var(--muted); font-size: 9.5px; font-weight: 760; letter-spacing: .02em; }
.schedule-state.running { background: var(--accent-soft); color: var(--accent); }
.schedule-state.paused { background: rgba(242, 170, 82, .13); color: var(--amber); }
.schedule-state.draft { background: rgba(114, 167, 255, .12); color: var(--blue); }
.schedule-task-meta { display: flex; flex-wrap: wrap; gap: 3px 14px; color: var(--muted); font-size: 10.5px; font-variant-numeric: tabular-nums; }
.schedule-task-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.schedule-task-actions .button { min-height: 30px; padding: 6px 12px; font-size: 10.5px; }
.schedule-platforms { display: grid; gap: 6px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 9px; background: rgba(255,255,255,.02); }
.schedule-platforms-label { color: var(--muted); font-size: 9.5px; letter-spacing: .05em; }
.schedule-platform-list { display: flex; flex-wrap: wrap; gap: 6px; }
.schedule-platform { display: inline-flex; align-items: center; gap: 5px; padding: 4px 9px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255,255,255,.03); color: #b8c6c9; font-size: 10.5px; cursor: pointer; transition: border-color .16s, background .16s, color .16s; }
.schedule-platform:hover { border-color: var(--line-strong); }
.schedule-platform.on { border-color: rgba(69,223,177,.5); background: var(--accent-soft); color: var(--accent); }
.schedule-platform.disabled { opacity: .45; cursor: not-allowed; }
.source-entry-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-3, 12px); }
@media (max-width: 720px) { .source-entry-grid { grid-template-columns: 1fr; } }
.source-entry { display: grid; gap: 4px; padding: 14px 16px; text-align: left; border: 1px solid var(--line); border-radius: var(--radius-md, 10px); background: rgba(255,255,255,.02); color: var(--ink); cursor: pointer; transition: border-color .18s, background .18s; }
.source-entry:hover { border-color: rgba(69,223,177,.5); background: var(--accent-soft); }
.source-entry strong { font-size: 13px; }
.source-entry span { color: var(--muted); font-size: 11px; line-height: 1.5; }
.source-entry em { color: var(--accent); font-size: 11px; font-style: normal; letter-spacing: .04em; }
.schedule-platform input { width: 12px; height: 12px; margin: 0; accent-color: #45dfb1; }
.panel-hint { margin: 0 0 10px; padding: 7px 10px; border-left: 2px solid rgba(69,223,177,.35); border-radius: 0 6px 6px 0; background: rgba(69,223,177,.05); color: var(--muted); font-size: 10px; line-height: 1.5; }
.readiness { margin: 10px 0 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: rgba(255,255,255,.02); display: grid; gap: 8px; }
.readiness-empty { margin: 0; color: var(--muted); font-size: 10px; display: grid; gap: 8px; }
.readiness-empty p { margin: 0; }
.readiness-empty p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.65; }
.readiness-empty p strong { color: var(--ink); font-weight: 700; }
.readiness-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.readiness-chips > span { color: var(--muted); font-size: 9.5px; letter-spacing: .06em; }
.readiness-chip { padding: 4px 10px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255, 255, 255, .03); color: #c3d0d3; font-size: 10.5px; transition: border-color .18s, background .18s, color .18s; }
.readiness-chip:hover { border-color: var(--line-strong); background: var(--accent-soft); color: var(--accent); }
.readiness-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.readiness-head strong { font-size: 12px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.readiness-state { flex: 0 0 auto; padding: 2px 8px; border-radius: 999px; font-size: 9px; font-weight: 700; letter-spacing: .03em; }
.readiness-state.ok { background: rgba(69,223,177,.14); color: var(--accent); }
.readiness-state.warn { background: rgba(255,176,32,.14); color: #ffb020; }
.readiness-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.readiness-list li { display: grid; grid-template-columns: 8px auto auto minmax(0,1fr); align-items: center; gap: 6px; font-size: 10px; color: var(--muted); }
.readiness-list li b { color: var(--ink); font-size: 10px; font-weight: 600; }
.readiness-list li em { font-style: normal; font-variant-numeric: tabular-nums; color: var(--ink); }
.readiness-list li small { color: #ffb020; font-size: 9px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.readiness-dot { width: 7px; height: 7px; border-radius: 50%; background: #ffb020; }
.readiness-list li.ok .readiness-dot { background: var(--accent); }
.readiness-link { justify-self: start; color: var(--accent); font-size: 10px; text-decoration: none; border-bottom: 1px dashed rgba(69,223,177,.5); }
.readiness-link:hover { text-decoration: none; border-bottom-style: solid; }
.quick-keyword-list { display: grid; gap: 6px; margin-top: 8px; }
.quick-keyword-list .helper { margin: 0; color: var(--muted); font-size: 10px; }
.keyword-group { display: grid; gap: 4px; }
.keyword-group-label { color: var(--muted); font-size: 9.5px; letter-spacing: .06em; }
.keyword-chips { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.keyword-chip { display: inline-flex; align-items: center; gap: 2px; padding: 2px 3px 2px 8px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255,255,255,.03); color: #c3d0d3; font-size: 10px; }
.keyword-chip-remove { appearance: none; border: 0; background: none; color: var(--muted); font-size: 12px; line-height: 1; padding: 0 2px; cursor: pointer; }
.keyword-chip-remove:hover { color: #ff6b6b; }
.keyword-more { color: var(--muted); font-size: 9.5px; }
.quick-advanced { margin: 0 0 12px; border: 1px solid var(--line); border-radius: 10px; background: rgba(255,255,255,.015); }
.quick-advanced summary { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; padding: 10px 12px; cursor: pointer; list-style: none; }
.quick-advanced summary::-webkit-details-marker { display: none; }
.quick-advanced summary span { color: var(--ink); font-size: 11px; font-weight: 600; }
.quick-advanced summary small { color: var(--muted); font-size: 9px; }
.quick-advanced[open] summary { border-bottom: 1px solid var(--line); }
.quick-advanced > :not(summary) { margin: 0 12px 10px; }
.quick-advanced > :first-of-type { margin-top: 10px; }
.configuration-nav { margin: 16px 0; display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 10px; }
.configuration-nav a { min-height: 70px; padding: 14px 16px; display: flex; align-items: center; gap: 12px; border: 1px solid var(--line); border-radius: 13px; color: var(--ink); background: rgba(13,25,36,.72); text-decoration: none; transition: border-color .18s, background .18s, transform .18s; }
.configuration-nav a:hover { transform: translateY(-2px); border-color: var(--line-strong); background: var(--accent-soft); }
.configuration-nav b { color: var(--accent); font: 800 11px/1 monospace; }
.configuration-nav span { display: grid; gap: 3px; font-size: 12px; font-weight: 720; }
.configuration-nav small { color: var(--muted); font-size: 9px; font-weight: 500; }
#task-config, #keyword-config, #source-config, #integration-config { scroll-margin-top: 86px; }
.task-panel { grid-column: 1 / -1; }
#task-form { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 0 12px; align-items: start; }
#task-form .field { margin-bottom: 13px; }
#task-form .task-wide { grid-column: span 2; }
#task-form .language-field, #task-form button.task-wide { grid-column: 1 / -1; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: 0 18px 55px rgba(0,0,0,.17); backdrop-filter: blur(16px); min-width: 0; }
.panel-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 18px; }
.panel-header h2 { margin: 0; font-size: 19px; letter-spacing: -.02em; font-weight: 680; }
.panel-header span { color: var(--muted); font-size: 11px; }
.panel-header .section-index { display: block; margin-bottom: 4px; color: var(--accent); }
.compact { align-items: flex-start; }
.cache-legend { padding: 7px 10px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-size: 10px; white-space: nowrap; }
.filter-cluster { display: grid; grid-template-columns: repeat(3,minmax(105px,1fr)); gap: 7px; min-width: 500px; }
/* 情报中心：紧凑页头与指标 */
.page-heading-compact { min-height: 0; padding: 30px 38px; align-items: flex-start; }
.page-heading-compact h1 { font-size: clamp(30px, 3.2vw, 44px); }
.page-heading-compact p:not(.section-index) { margin-top: 12px; max-width: 660px; }
.heading-facts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.heading-facts span { padding: 6px 11px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255,255,255,.022); color: var(--muted); font-size: 10px; }
.heading-facts b { margin-right: 5px; color: var(--accent); font-weight: 760; }

.alert-feed-panel { overflow: hidden; border-color: rgba(114,167,255,.2); background: radial-gradient(circle at 100% 0, rgba(114,167,255,.07), transparent 32%), var(--panel); }
.alert-feed-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 16px; }
.alert-feed-header h2 { margin: 2px 0 5px; font-size: 20px; font-weight: 680; letter-spacing: -.02em; }
.alert-feed-header > div:first-child > span { color: var(--muted); font-size: 11px; }
.alert-count { display: flex; flex: 0 0 auto; flex-direction: column; align-items: flex-end; gap: 2px; padding: 9px 15px; border: 1px solid rgba(114,167,255,.22); border-radius: 12px; background: rgba(114,167,255,.06); }
.alert-count strong { color: var(--blue); font: 800 25px/1.1 monospace; font-variant-numeric: tabular-nums; }
.alert-count span { color: var(--muted); font-size: 10px; }

.alert-filter-shell { margin-bottom: 16px; padding: 14px; border: 1px solid rgba(255,255,255,.055); border-radius: 14px; background: rgba(4,12,18,.34); }
.alert-filter-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; padding-bottom: 12px; border-bottom: 1px solid rgba(255,255,255,.05); }
.alert-level-chips { display: inline-flex; align-items: center; gap: 3px; padding: 3px; border: 1px solid var(--line); border-radius: 10px; background: rgba(255,255,255,.02); }
.level-chip { min-height: 27px; padding: 4px 11px; border: 0; border-radius: 7px; background: transparent; color: var(--muted); font-size: 10px; font-weight: 760; letter-spacing: .03em; transition: color .18s, background .18s; }
.level-chip:hover { color: var(--ink); background: rgba(255,255,255,.05); }
.level-chip.is-active { color: #03120e; background: var(--accent); }
.level-chip.s0.is-active { color: #1b0705; background: var(--red); }
.level-chip.s1.is-active { color: #1a1002; background: var(--amber); }
.level-chip.s2.is-active { color: #040a18; background: var(--blue); }
.alert-filter-actions { display: flex; align-items: center; gap: 10px; min-width: 0; }
.filter-summary { max-width: 52ch; overflow: hidden; color: var(--muted); font-size: 10px; text-align: right; text-overflow: ellipsis; white-space: nowrap; }
.alert-filter-actions .button[hidden] { display: none; }

/* 情报中心筛选区重构：主筛选一行、其余收进「更多筛选」、领域 chips 独立一行 */
.filter-bar { display: grid; gap: 10px 12px; align-items: end; }
.filter-bar-primary { grid-template-columns: minmax(230px, 1.35fr) repeat(3, minmax(140px, 1fr)); }
.filter-bar-secondary { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); margin-top: 10px; }
.filter-field { display: grid; gap: 6px; min-width: 0; }
.filter-field > span { font-size: 10.5px; letter-spacing: .06em; color: #7d95a0; }
.filter-field select, .filter-field > input, .filter-field .task-combobox input { width: 100%; }
.filter-field-task .task-combobox { display: grid; }
.filter-more { margin: 10px 0 0; padding: 10px 12px; border: 1px solid rgba(255,255,255,.06); border-radius: 12px; background: rgba(255,255,255,.015); }
.filter-more > summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; cursor: pointer; font-size: 11px; color: #cfe6ec; list-style: none; }
.filter-more > summary::-webkit-details-marker { display: none; }
.filter-more > summary::after { content: '▾'; color: #6f858d; font-size: 10px; margin-left: auto; }
.filter-more[open] > summary::after { content: '▴'; }
.filter-more > summary em { font-style: normal; color: #6f858d; font-size: 10px; }
.filter-more.has-active { border-color: rgba(111, 242, 255, .28); }
.filter-more.has-active > summary em { color: #8fe6f5; }
@media (max-width: 1100px) { .filter-bar-primary { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .filter-bar-primary, .filter-bar-secondary { grid-template-columns: 1fr; } }
.alert-filter-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
.alert-filter-grid label { display: grid; gap: 6px; min-width: 0; }
.alert-filter-grid label > span { color: #8ea1a8; font-size: 10px; font-weight: 700; letter-spacing: .06em; }
.alert-filter-grid select { min-width: 0; width: 100%; font-size: 12px; border-color: rgba(255,255,255,.075); background-color: rgba(12,25,35,.9); }

.task-filter-field { min-width: 0; }
.task-combobox { position: relative; min-width: 0; }
.task-combobox input[type="search"] { width: 100%; font-size: 12px; border-color: rgba(255,255,255,.075); background-color: rgba(12,25,35,.9); }
.task-combobox-options { position: absolute; z-index: 40; top: calc(100% + 4px); left: 0; right: auto; display: grid; gap: 2px; min-width: max(100%, 240px); max-width: 340px; max-height: 240px; overflow-y: auto; padding: 4px; border: 1px solid var(--line-strong); border-radius: 10px; background: #0d1823; box-shadow: 0 18px 40px rgba(0,0,0,.45); }
.task-combobox-option { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 7px 9px; border: 0; border-radius: 7px; background: transparent; color: #c3d0d3; font-size: 11px; text-align: left; }
.task-combobox-options[hidden] { display: none; }
.task-combobox-option:hover, .task-combobox-option.active { background: var(--accent-soft); color: var(--ink); }
.task-combobox-option span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.task-combobox-option small { flex: 0 0 auto; color: var(--muted); font-size: 9px; }
.task-combobox-empty { margin: 0; padding: 8px; color: var(--muted); font-size: 10px; text-align: center; }

.alert-list-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 12px; padding-top: 12px; border-top: 1px solid rgba(255,255,255,.045); }
.alert-bulk-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.alert-bulk-actions .check-field { margin: 0; }
.alert-bulk-actions > span { color: var(--muted); font-size: 10px; }
.page-size-segment { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 3px; padding: 3px; border: 1px solid var(--line); border-radius: 9px; background: rgba(255,255,255,.018); }
.page-size-segment > span { padding: 0 8px; color: var(--muted); font-size: 10px; }
.page-size-segment button { min-width: 36px; height: 28px; border: 0; border-radius: 6px; background: transparent; color: var(--muted); font-size: 11px; font-weight: 760; font-variant-numeric: tabular-nums; }
.page-size-segment button:hover { color: var(--ink); background: rgba(255,255,255,.045); }
.page-size-segment button.active { color: #03120e; background: var(--accent); box-shadow: 0 4px 14px rgba(69,223,177,.18); }

.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.intelligence-map { margin: 16px 0; }
.classification-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 11px; }
.classification-card { min-width: 0; padding: 16px; border: 1px solid var(--line); border-radius: 13px; background: rgba(255,255,255,.018); }
.classification-card h3 { margin: 0 0 13px; color: #c9d5d8; font-size: 11px; letter-spacing: .08em; }
.metric-bars { display: grid; gap: 9px; }
.metric-row { display: grid; grid-template-columns: 72px 1fr 30px; gap: 8px; align-items: center; font-size: 10px; }
.metric-row > span { overflow: hidden; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; }
.metric-row progress { width: 100%; height: 4px; overflow: hidden; border: 0; border-radius: 999px; background: rgba(255,255,255,.06); }
.metric-row progress::-webkit-progress-bar { background: rgba(255,255,255,.06); border-radius: 999px; }
.metric-row progress::-webkit-progress-value { background: linear-gradient(90deg,var(--accent-strong),var(--cyan)); border-radius: 999px; }
.metric-row progress::-moz-progress-bar { background: var(--accent); border-radius: 999px; }
.metric-row b { color: #dce6e8; text-align: right; font: 700 10px/1 monospace; }

.field { display: grid; gap: 7px; margin-bottom: 13px; color: #96a8ae; font-size: 10px; font-weight: 700; letter-spacing: .05em; }
input, select, textarea { width: 100%; border: 1px solid var(--line); border-radius: 9px; padding: 10px 11px; color: var(--ink); background: rgba(4,10,16,.55); outline: none; transition: border-color .18s, box-shadow .18s, background .18s; }
select { color-scheme: dark; }
textarea { resize: vertical; min-height: 82px; }
input:focus, select:focus, textarea:focus { border-color: rgba(69,223,177,.58); background: rgba(7,16,23,.9); box-shadow: 0 0 0 3px rgba(69,223,177,.08); }
.schedule-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 9px; }
.check-field { display: flex; align-items: flex-start; gap: 8px; margin: 10px 0; color: var(--muted); font-size: 11px; }
.check-field input { width: auto; margin-top: 4px; accent-color: var(--accent); }
.field-set { margin: 6px 0 16px; padding: 13px 14px 4px; display: flex; flex-wrap: wrap; gap: 4px 18px; border: 1px solid var(--line); border-radius: 10px; }
.field-set legend { padding: 0 5px; color: var(--muted); font-size: 10px; font-weight: 700; }
.language-picker-summary { min-height: 42px; padding: 7px 8px 7px 12px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border: 1px solid var(--line); border-radius: 9px; background: rgba(4,10,16,.55); }
.language-picker-summary span { overflow: hidden; color: var(--ink); font-size: 11px; font-weight: 600; letter-spacing: 0; text-overflow: ellipsis; white-space: nowrap; }
.language-selector { display: grid; gap: 8px; margin-bottom: 13px; }
.language-selected { min-height: 34px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.language-selected span { padding: 5px 8px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--accent-soft); color: #c9f7e9; font-size: 9px; }
.language-selected code { color: var(--accent); }
.language-options { max-height: 240px; padding: 8px; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 5px; overflow-y: auto; border: 1px solid var(--line); border-radius: 10px; background: rgba(4,10,16,.36); }
.language-option { padding: 7px 8px; display: flex; justify-content: space-between; gap: 8px; border: 1px solid transparent; border-radius: 7px; background: transparent; color: var(--muted); text-align: left; }
.language-option:hover { background: rgba(255,255,255,.035); color: var(--ink); }
.language-option.selected { border-color: var(--line-strong); background: var(--accent-soft); color: var(--ink); }
.language-option code { color: var(--accent); font-size: 9px; }
.language-custom { display: grid; grid-template-columns: 1fr auto; gap: 7px; }
.language-selector > .helper { margin: 0; }
.integration-panel { margin-top: 16px; }
.integration-header { align-items: center; }
.integration-overview { margin: 0 0 24px; padding: 16px 18px; display: grid; grid-template-columns: repeat(3,110px) 1fr; gap: 12px; align-items: center; border: 1px solid var(--line-strong); border-radius: 13px; background: linear-gradient(120deg,rgba(69,223,177,.08),rgba(91,200,239,.035)); }
.integration-overview > div { display: grid; gap: 2px; }
.integration-overview strong { color: var(--accent); font-size: 24px; line-height: 1; }
.integration-overview span { color: var(--muted); font-size: 10px; }
.integration-overview p { margin: 0; color: #aebdc1; font-size: 11px; line-height: 1.65; }
.integration-group { margin-top: 24px; }
.integration-subheading h3 { margin: 0; font-size: 14px; }
.integration-subheading p { margin: 5px 0 0; color: var(--muted); font-size: 10px; }
.custom-integration-form { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 0 12px; }
.custom-integration-form .field { margin-bottom: 9px; }
.custom-integration-form .form-actions { grid-column: 1 / -1; }
.integration-subheading { margin: 22px 0 12px; display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.integration-subheading > span { color: var(--muted); font-size: 10px; }
.integration-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }

/* 连接能力弹窗：卡片移入弹窗，面板只留概览与状态胶囊 */
.integrations-dialog { width: min(1180px, calc(100vw - 32px)); }
.platform-access { margin-top: 20px; padding-top: 16px; border-top: 1px solid rgba(255,255,255,.06); }
.platform-access .integration-subheading { margin-top: 0; align-items: center; }
.integrations-dialog-body { display: grid; gap: 16px; max-height: min(70vh, 720px); overflow-y: auto; padding-right: 4px; }
.integration-quick { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; }
.integration-chip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid rgba(255,255,255,.07); background: rgba(255,255,255,.02); border-radius: 999px; padding: 4px 10px; font-size: 11px; color: var(--muted); }
.integration-chip b { color: #cfdadd; font-weight: 600; }
.integration-chip.configured { border-color: rgba(69,223,177,.35); color: #bff5e4; }
.integration-chip.paused { border-color: rgba(255,190,120,.28); color: #ffcf9a; }
.integration-chip.pending { border-color: rgba(255,255,255,.10); }
@media (max-width: 720px) { .integration-quick { display: grid; grid-template-columns: 1fr 1fr; } }
.integration-card { min-height: 215px; padding: 18px; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 13px; background: linear-gradient(145deg,rgba(255,255,255,.024),rgba(255,255,255,.012)); transition: border-color .18s, transform .18s; }
.integration-card:hover { transform: translateY(-2px); border-color: rgba(69,223,177,.22); }
.integration-card > div { display: flex; align-items: center; gap: 8px; }
.integration-card-heading { min-height: 28px; }
.integration-card strong { font-size: 13px; }
.integration-state { padding: 4px 7px; border-radius: 999px; background: rgba(242,170,82,.1); color: var(--amber); font-size: 9px; font-weight: 800; }
.integration-state.configured { background: var(--accent-soft); color: var(--accent); }
.integration-state.paused { background: rgba(143,160,176,.12); color: var(--muted); }
.integration-state.failed { background: rgba(255,91,112,.12); color: #ff8da0; box-shadow: inset 0 0 0 1px rgba(255,91,112,.18); }
.integration-state.untested { background: rgba(91,200,239,.11); color: #8edcf4; box-shadow: inset 0 0 0 1px rgba(91,200,239,.16); }
.integration-chip.failed { border-color: rgba(255,91,112,.26); color: #ff9aaa; }
.integration-chip.untested { border-color: rgba(91,200,239,.24); color: #8edcf4; }
.quick-capability.failed { border-color: rgba(255,91,112,.24); background: rgba(255,91,112,.045); }
.quick-capability.failed > span { background: #ff7188; box-shadow: 0 0 12px rgba(255,91,112,.45); }
.quick-capability.untested > span { background: #69c9ed; box-shadow: 0 0 12px rgba(91,200,239,.36); }
.integration-progress { margin-top: 18px; justify-content: space-between; color: var(--muted); font-size: 10px; }
.integration-progress b { color: #cbd7da; font: 750 10px/1 monospace; }
.integration-card p { display: flex; flex-wrap: wrap; gap: 5px; margin: 12px 0; }
.integration-card code { padding: 4px 6px; border-radius: 5px; background: rgba(255,255,255,.04); color: #b9c8cc; font-size: 9px; }
.integration-card small { margin-bottom: 16px; color: var(--muted); font-size: 10px; line-height: 1.5; }
.integration-card .button { margin-top: auto; }
.integration-actions { margin-top: auto; display: flex; gap: 6px; }
.integration-actions .button { flex: 1; }
.button.danger { border-color: rgba(255,107,99,.25); color: #ff938c; }
.integration-empty { grid-column: 1 / -1; }
.integration-help { margin: 16px 0 0; }
.removed-integrations { margin-top: 22px; border: 1px solid var(--line); border-radius: 11px; background: rgba(255,255,255,.012); }
.removed-integrations summary { padding: 13px 15px; color: #b7c5c9; font-size: 11px; font-weight: 700; cursor: pointer; }
.removed-integrations summary span { margin-left: 6px; color: var(--muted); }
.removed-integrations > div { padding: 0 15px 12px; display: grid; gap: 7px; }
.removed-integrations > div > div { padding: 10px 11px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border: 1px solid rgba(255,255,255,.035); border-radius: 8px; color: var(--muted); font-size: 10px; }
.app-dialog { width: min(920px,calc(100vw - 32px)); max-height: calc(100vh - 48px); padding: 0; overflow: auto; border: 1px solid var(--line-strong); border-radius: 18px; color: var(--ink); background: #0d1823; box-shadow: 0 32px 100px rgba(0,0,0,.65); }
.app-dialog::backdrop { background: rgba(2,7,11,.78); backdrop-filter: blur(10px); }
.app-dialog[open] { animation: dialog-in .18s ease-out; }
.dialog-header { position: sticky; top: 0; z-index: 2; padding: 22px 24px 18px; display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; border-bottom: 1px solid var(--line); background: rgba(13,24,35,.96); backdrop-filter: blur(14px); }
.dialog-header h2 { margin: 2px 0 5px; font-size: 21px; }
.dialog-header span { color: var(--muted); font-size: 10px; }
.dialog-close { width: 34px; height: 34px; flex: 0 0 auto; border: 1px solid var(--line); border-radius: 9px; color: var(--muted); background: rgba(255,255,255,.025); font-size: 22px; line-height: 1; }
.dialog-close:hover { border-color: var(--line-strong); color: var(--accent); }
.app-dialog > form, .app-dialog > .language-selector { margin: 0; padding: 22px 24px; }
.dialog-actions { padding-top: 16px; display: flex; justify-content: flex-end; gap: 8px; border-top: 1px solid var(--line); }
.language-dialog .language-options { max-height: min(50vh,440px); grid-template-columns: repeat(4,minmax(0,1fr)); }
.compact-dialog { width: min(680px,calc(100vw - 32px)); }

/* 精简推送：下载选择弹窗 */
.alert-download-dialog { width: min(720px, calc(100vw - 32px)); }
.alert-download-body { padding: 20px 24px 22px; }
.alert-download-search { display: block; margin-bottom: 12px; }
.alert-download-search input { width: 100%; padding: 10px 12px 10px 34px; border: 1px solid var(--line); border-radius: 10px; background: rgba(4,10,16,.6) 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='%238da0aa' stroke-width='2.4'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-3.5-3.5'/%3E%3C/svg%3E") no-repeat 12px center; color: var(--ink); font-size: 12px; }
.alert-download-search input::-webkit-search-cancel-button { cursor: pointer; }
.alert-download-summary { margin: 0 0 10px; color: var(--muted); font-size: 10px; font-variant-numeric: tabular-nums; }
.alert-download-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.alert-download-bulk { display: inline-flex; align-items: center; gap: 8px; }
.alert-download-count { color: var(--muted); font-size: 10px; font-variant-numeric: tabular-nums; }
.alert-download-list { display: grid; gap: 8px; max-height: min(52vh, 420px); overflow-y: auto; overflow-x: hidden; padding-right: 4px; }
.alert-download-head { display: flex; align-items: flex-start; gap: 10px; min-width: 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: rgba(255,255,255,.015); }
.alert-download-group.disabled .alert-download-head { opacity: .55; }
.alert-download-items li { display: grid; grid-template-columns: auto auto minmax(0,1fr); gap: 8px; min-width: 0; align-items: center; padding: 4px 5px; border-radius: 6px; cursor: pointer; }
.alert-download-items li:hover { background: rgba(255,255,255,.03); }
.alert-download-items li.selected { background: rgba(69,223,177,.07); }
.alert-download-items li input { width: 14px; height: 14px; margin: 0; padding: 0; accent-color: var(--accent); cursor: pointer; }
.alert-download-text { flex: 1 1 auto; min-width: 0; display: grid; gap: 3px; }
.alert-download-text strong { display: -webkit-box; overflow: hidden; font-size: 12.5px; font-weight: 650; line-height: 1.45; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.alert-download-text small { overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.alert-download-text em { display: -webkit-box; overflow: hidden; color: #94a6ac; font-size: 10px; font-style: normal; line-height: 1.5; -webkit-box-orient: vertical; -webkit-line-clamp: 1; }
.alert-download-group { display: grid; gap: 6px; min-width: 0; }
.alert-download-expand { flex: 0 0 auto; align-self: center; padding: 5px 10px; border: 1px solid var(--line); border-radius: 7px; background: rgba(255,255,255,.03); color: var(--accent); font-size: 10px; font-weight: 700; white-space: nowrap; }
.alert-download-expand:hover { border-color: var(--line-strong); background: var(--accent-soft); }
.alert-download-items-shell { margin: -2px 0 2px 12px; padding: 8px 8px 8px 10px; border-left: 2px solid rgba(69,223,177,.28); }
.alert-download-items { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.alert-download-item-title { overflow: hidden; color: #c3d0d3; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.translation-tag { margin-right: 6px; padding: 1px 6px; border-radius: 4px; background: rgba(69,223,177,.14); color: var(--accent); font-size: 9px; font-weight: 700; vertical-align: middle; letter-spacing: .04em; }
.alert-download-item-main { display: grid; gap: 2px; min-width: 0; }
.alert-download-item-line { display: flex; align-items: center; gap: 4px; min-width: 0; overflow: hidden; }
.alert-download-item-link { min-width: 0; text-decoration: none; }
.alert-download-item-link:hover, .alert-download-item-link:focus-visible { color: var(--accent); text-decoration: underline; }
.alert-download-item-ext { flex: 0 0 auto; color: var(--muted); font-size: 9px; }
.alert-download-items time { color: var(--muted); font-size: 9px; white-space: nowrap; }
.alert-download-loading { margin: 0; color: var(--muted); font-size: 10px; }
.alert-download-level { min-width: 30px; height: 20px; display: grid; place-items: center; border: 1px solid rgba(114,167,255,.24); border-radius: 5px; background: rgba(114,167,255,.09); color: var(--blue); font: 800 9px/1 monospace; }
.alert-download-level.s0 { border-color: rgba(255,107,99,.3); background: rgba(255,107,99,.1); color: #ffb0aa; }
.alert-download-level.s1 { border-color: rgba(242,170,82,.3); background: rgba(242,170,82,.1); color: #f6ca92; }
.alert-download-hint { margin: 12px 0 0; color: var(--muted); font-size: 10px; }
.builtin-integration-fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 0 12px; }
.builtin-integration-fields.single-field { grid-template-columns: 1fr; }
.model-select-field { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: end; gap: 8px; }
.model-select-field label { display: grid; gap: 7px; }
.model-select-field .field-help { grid-column: 1 / -1; }
.model-provider-presets { grid-column: 1 / -1; display: grid; gap: 10px; padding: 12px; border: 1px solid rgba(74,220,255,.22); border-radius: 10px; background: linear-gradient(135deg, rgba(32,205,255,.07), rgba(124,92,255,.05)); }
.model-provider-presets > div:first-child { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.model-provider-presets span { color: var(--muted); font-size: 11px; }
.model-preset-list { display: flex; flex-wrap: wrap; gap: 7px; }
.watch-profile-panel { border-color: rgba(67,221,255,.24); background: linear-gradient(145deg, rgba(5,18,31,.96), rgba(8,13,28,.93)); }
.watch-profile-panel textarea { resize: vertical; }
.watch-profile-panel .watch-confirm { margin-top: 4px; padding: 10px; border: 1px solid rgba(255,184,76,.22); border-radius: 8px; background: rgba(255,184,76,.05); }
.connection-form-section { margin-bottom: 18px; padding-bottom: 5px; border-bottom: 1px solid rgba(255,255,255,.05); }
.connection-form-section h3 { margin: 0 0 13px; color: #dce6e8; font-size: 11px; letter-spacing: .04em; }
.connection-guide { margin: 0 0 20px; padding: 15px; border: 1px solid rgba(91,200,239,.2); border-radius: 11px; background: rgba(91,200,239,.055); }
.connection-guide-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; }
.connection-guide-grid > div { min-width: 0; padding: 9px 10px; display: grid; gap: 4px; border: 1px solid rgba(255,255,255,.045); border-radius: 8px; background: rgba(3,10,16,.24); }
.connection-guide span, .connection-guide p { color: var(--muted); font-size: 9px; line-height: 1.55; }
.connection-guide-grid strong { color: #d9e9ed; font-size: 10px; }
.connection-endpoint { margin-top: 9px; padding: 9px 10px; display: grid; gap: 5px; border: 1px solid rgba(255,255,255,.045); border-radius: 8px; background: rgba(3,10,16,.24); }
.connection-endpoint code { overflow-wrap: anywhere; color: #a8e1f6; font-size: 10px; }
.connection-guide p { margin: 10px 0 0; }
.connection-guide p strong { color: #c8d8dc; }
.connection-guide a { margin-top: 10px; display: inline-flex; color: var(--blue); font-size: 10px; font-weight: 750; text-decoration: none; }
.connection-guide a:hover { text-decoration: underline; }
.field-help { margin-top: 6px; display: block; color: var(--muted); font-size: 9px; font-weight: 450; line-height: 1.5; }
.integration-panel .field { font-size: 11px; }
.integration-check { min-height: 42px; align-items: center; padding: 0 11px; border: 1px solid var(--line); border-radius: 9px; background: rgba(4,10,16,.4); }
.integration-check input { margin-top: 0; }
.secure-storage-note { margin: 3px 0 0; padding: 11px 12px; border: 1px solid rgba(69,223,177,.16); border-radius: 9px; background: var(--accent-soft); }
.configured-field { border: 1px solid rgba(69,223,177,.15); color: var(--accent) !important; }
.connection-danger { margin-top: 18px; padding: 13px 14px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border: 1px solid rgba(255,107,99,.16); border-radius: 10px; background: rgba(255,107,99,.035); }
.connection-danger > div { display: grid; gap: 3px; }
.connection-danger strong { color: #ffaaa5; font-size: 10px; }
.connection-danger span { color: var(--muted); font-size: 9px; }
.connection-switch { margin-top: 18px; padding: 13px 14px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border: 1px solid var(--line); border-radius: 10px; background: rgba(70,210,178,.035); }
.connection-switch > div { display: grid; gap: 3px; }
.connection-switch strong { color: var(--text); font-size: 10px; }
.connection-switch span { color: var(--muted); font-size: 9px; }
.compliance-note { margin-top: 20px; padding: 15px; border: 1px solid var(--line-strong); border-radius: 11px; background: var(--accent-soft); }
.compliance-note strong { color: var(--accent); font-size: 11px; }
.compliance-note p { margin: 6px 0 0; color: var(--muted); font-size: 11px; }

.button { border: 1px solid transparent; border-radius: 9px; padding: 9px 14px; font-weight: 720; font-size: 11px; letter-spacing: .03em; transition: transform .18s, border-color .18s, background .18s, box-shadow .18s; }
.button:hover { transform: translateY(-1px); }
.button.primary { background: linear-gradient(135deg,var(--accent),#2ac39b); color: #03120e; box-shadow: 0 8px 25px rgba(69,223,177,.13); }
.button.primary:hover { box-shadow: 0 10px 30px rgba(69,223,177,.22); }
.button.secondary { border-color: rgba(91,200,239,.22); background: rgba(91,200,239,.09); color: #b9e7f8; }
.button.ghost { border-color: var(--line); background: rgba(255,255,255,.025); color: #b9c8cc; }
.button.ghost:hover { border-color: var(--line-strong); background: var(--accent-soft); color: var(--accent); }
.button.small { min-height: 34px; padding: 6px 10px; font-size: 10px; }
.button.full { width: 100%; margin-top: 6px; }
.button:disabled { opacity: .4; cursor: not-allowed; transform: none; box-shadow: none; }
.helper { color: var(--muted); font-size: 10px; margin: 10px 0 17px; }

.alert-list, .document-list { display: grid; gap: 12px; }
.alert-list[aria-busy="true"], .document-list[aria-busy="true"] { opacity: .55; }
.alert-card { position: relative; overflow: hidden; padding: 16px 18px 14px 20px; display: grid; gap: 12px; border: 1px solid rgba(255,255,255,.07); border-radius: 14px; background: linear-gradient(135deg,rgba(255,255,255,.026),rgba(255,255,255,.012)); transition: border-color .18s, background .18s; }
.alert-card:hover { border-color: rgba(114,167,255,.28); background: rgba(114,167,255,.032); }
.alert-card.selected { border-color: rgba(69,223,177,.42); background: rgba(69,223,177,.05); }
.alert-card::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 3px; background: var(--blue); }
.alert-card.s0::before { background: var(--red); box-shadow: 0 0 18px rgba(255,107,99,.45); }
.alert-card.s1::before { background: var(--amber); }
.alert-card-main { display: grid; grid-template-columns: auto minmax(0,1fr) auto; gap: 14px; align-items: start; }
.level { min-width: 42px; height: 28px; display: grid; place-items: center; border: 1px solid rgba(114,167,255,.24); border-radius: 8px; background: rgba(114,167,255,.09); color: var(--blue); font: 850 11px/1 monospace; letter-spacing: .04em; }
.s0 .level { border-color: rgba(255,107,99,.28); background: rgba(255,107,99,.1); color: #ffb0aa; }
.s1 .level { border-color: rgba(242,170,82,.28); background: rgba(242,170,82,.1); color: #f6ca92; }
.s2 .level { border-color: rgba(114,167,255,.24); background: rgba(114,167,255,.1); color: #b9d0ff; }
.alert-card-body { display: grid; gap: 7px; min-width: 0; }
.alert-card h3 { margin: 0; display: -webkit-box; overflow: hidden; font-size: 14px; font-weight: 660; line-height: 1.5; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.alert-meta { display: flex; flex-wrap: wrap; gap: 5px; }
.alert-meta span { padding: 2px 7px; border-radius: 5px; background: rgba(255,255,255,.04); color: var(--muted); font-size: 10px; }
.alert-card h3, .alert-summary { max-width: 92ch; }
/* 折叠态必须真的折叠：此前 .alert-summary 没有任何行数限制，导致「展开摘要」点不点都一样。 */
.alert-summary { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.alert-summary.expanded { display: block; overflow: visible; -webkit-line-clamp: unset; }
.clamp-block { display: grid; gap: 3px; justify-items: start; min-width: 0; }
.clamp-block > p { min-width: 0; max-width: 100%; }
.clamp-block .inline-toggle { margin-top: 1px; }
.alert-reasons { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.6; }
.alert-card-footer { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding-top: 11px; border-top: 1px solid rgba(255,255,255,.05); }
.alert-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 6px; }
.document-select { display: grid; justify-items: center; padding-top: 2px; }
.document-select input { width: 16px; height: 16px; margin: 0; accent-color: var(--accent); }
.evidence-link { color: var(--accent); font-size: 10px; font-weight: 700; text-decoration: none; }
.evidence-link:hover { text-decoration: underline; }
.inline-toggle { justify-self: start; padding: 0; border: 0; background: none; color: var(--accent); font-size: 10px; font-weight: 700; }
.inline-toggle:hover { text-decoration: underline; }

/* 分页：区间摘要 + 页码窗口 + 跳页 */
.pagination-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; padding-top: 14px; border-top: 1px solid rgba(255,255,255,.05); color: var(--muted); font-size: 10px; }
.pagination-info { flex: 1 1 190px; min-width: 0; font-variant-numeric: tabular-nums; }
.pagination-pages, .page-numbers { display: inline-flex; align-items: center; gap: 4px; }
.page-step, .page-number { min-width: 32px; height: 32px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 8px; background: rgba(255,255,255,.025); color: #b9c8cc; font-size: 11px; font-weight: 700; font-variant-numeric: tabular-nums; transition: border-color .18s, background .18s, color .18s; }
.page-step:hover:not(:disabled), .page-number:hover { border-color: var(--line-strong); background: var(--accent-soft); color: var(--accent); }
.page-number.active { border-color: transparent; background: var(--accent); color: #03120e; }
.page-step:disabled { opacity: .35; cursor: not-allowed; }
.page-gap { min-width: 18px; color: var(--muted); text-align: center; }
.page-jump { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 6px; }
.page-jump input { width: 60px; height: 32px; padding: 0 6px; border: 1px solid var(--line); border-radius: 8px; background: rgba(12,25,35,.9); color: var(--ink); font-size: 11px; text-align: center; }

.document-toolbar, .document-page-controls { display: flex; align-items: center; gap: 10px; }
.document-toolbar .check-field { margin: 0; }
.document-page-controls { justify-content: space-between; margin: 0 0 12px; padding-bottom: 10px; border-bottom: 1px solid rgba(255,255,255,.045); color: var(--muted); font-size: 10px; }
.document-page-controls label { display: flex; align-items: center; gap: 7px; }
.document-page-controls select { width: auto; min-width: 88px; padding: 6px 9px; }
.document-card { display: grid; gap: 10px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 13px; background: rgba(255,255,255,.018); transition: border-color .18s, background .18s; }
.document-card:hover { border-color: rgba(114,167,255,.24); background: rgba(114,167,255,.03); }
.document-card.selected { border-color: rgba(69,223,177,.4); background: rgba(69,223,177,.045); }
.document-card-heading { display: flex; align-items: flex-start; gap: 12px; }
.document-card-heading > div { flex: 1; min-width: 0; }
.document-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 6px; }
.document-tags span { padding: 2px 7px; border-radius: 5px; background: rgba(255,255,255,.04); color: var(--muted); font-size: 10px; }
.document-tags span:first-child { color: var(--blue); font-weight: 750; letter-spacing: .06em; }
.document-card h3 { margin: 0; display: -webkit-box; overflow: hidden; font-size: 14px; font-weight: 660; line-height: 1.5; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.document-body { margin: 0; display: -webkit-box; overflow: hidden; color: #a8b8bd; font-size: 12px; line-height: 1.72; white-space: pre-wrap; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
.document-body.expanded { display: block; overflow: visible; -webkit-line-clamp: unset; }
.document-card-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; }

.alert-list.empty-state, .document-list.empty-state { display: block; padding: 0; border: 0; background: none; }
.list-empty { display: grid; justify-items: center; gap: 8px; padding: 34px 18px; border: 1px dashed var(--line); border-radius: 12px; background: rgba(255,255,255,.012); text-align: center; }
.list-empty p { margin: 0; color: var(--ink); font-size: 13px; font-weight: 650; }
.list-empty > span { color: var(--muted); font-size: 11px; }

.collection-run-list { display: grid; gap: 10px; }
.collection-run-card { padding: 15px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.018); }
.collection-run-heading { display: flex; align-items: start; justify-content: space-between; gap: 16px; }
.collection-run-heading > div:first-child { display: grid; gap: 4px; }
.collection-run-heading span { color: var(--muted); font-size: 10px; }
.run-metrics { display: grid; grid-template-columns: repeat(4,minmax(74px,1fr)); gap: 7px; }
.run-metrics span { display: grid; gap: 3px; padding: 8px 10px; border: 1px solid rgba(255,255,255,.035); border-radius: 8px; text-align: center; }
.run-metrics b { color: var(--accent); font-size: 15px; }
.collection-source-metrics { display: grid; gap: 6px; margin-top: 12px; }
.collection-source-metrics > div { display: grid; grid-template-columns: minmax(150px,.8fr) minmax(150px,.7fr) minmax(250px,1.5fr); gap: 10px; padding: 9px 10px; border-radius: 8px; background: rgba(255,255,255,.02); font-size: 10px; }
.collection-source-metrics span { color: var(--muted); }
.collection-source-metrics small { grid-column: 1 / -1; color: var(--red); }

.run-list, .source-list, .runtime-list, .report-list { display: grid; gap: 7px; }
.source-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
.run-item, .source-item, .runtime-item, .report-item { padding: 10px 11px; border: 1px solid rgba(255,255,255,.025); border-radius: 9px; background: rgba(255,255,255,.018); font-size: 10px; }
.run-item strong, .source-item strong, .report-item strong { display: block; color: #d5dfe1; }
.run-item span, .source-item span, .runtime-item span, .report-item span { color: var(--muted); }
.run-item small { display: block; margin-top: 6px; color: #ff938c; line-height: 1.45; }
.run-item.run-success, .run-item.run-cached { border-left: 2px solid rgba(69,223,177,.6); }
.run-item.run-failed { border-left: 2px solid rgba(255,107,99,.7); }
.health { float: right; font-weight: 800; color: var(--accent); }
.health.degraded, .health.blocked { color: var(--red); }
.source-approval { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 7px; margin-top: 9px; clear: both; }
.source-approval input { padding: 7px 9px; font-size: 10px; }
.keyword-cloud { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 15px; }
.tag { border: 1px solid var(--line); border-radius: 999px; padding: 4px 8px; background: rgba(255,255,255,.025); color: #aebdc1; font-size: 9px; }
.tag.sensitive { border-color: rgba(255,107,99,.2); background: rgba(255,107,99,.07); color: #ff938c; }
.tag.exclude { color: #78888e; text-decoration: line-through; }

.suggestion-list { display: grid; gap: 8px; }
.suggestion { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 13px; border: 1px solid var(--line); border-radius: 10px; background: rgba(255,255,255,.015); }
.suggestion code { color: var(--accent); font-size: 10px; }
.suggestion-actions { display: flex; flex: 0 0 auto; gap: 6px; }
.empty-state { color: var(--muted); padding: 32px 12px; text-align: center; border: 1px dashed var(--line); border-radius: 12px; background: rgba(255,255,255,.01); }
.report-links { display: flex; gap: 9px; margin-top: 6px; }
.report-links a { color: var(--accent); font-size: 9px; font-weight: 800; text-decoration: none; }
.runtime-heading { margin-top: 26px; }
.toast { position: fixed; right: 24px; top: 84px; z-index: 50; max-width: 400px; padding: 12px 15px; border: 1px solid var(--line-strong); border-radius: 10px; background: #14251f; color: #dffcf3; box-shadow: var(--shadow); transform: translateY(-10px); opacity: 0; pointer-events: none; transition: .2s; }
.toast.show { opacity: 1; transform: translateY(0); }
.toast.error { border-color: rgba(255,107,99,.35); background: #351b1c; }
.hidden { display: none !important; }
.login-layer { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 24px; background: rgba(3,8,13,.82); backdrop-filter: blur(18px); }
.login-card { width: min(420px,100%); padding: 34px; border: 1px solid var(--line-strong); border-radius: 20px; background: #0d1823; box-shadow: 0 30px 90px rgba(0,0,0,.45); }
.login-card .brand-mark { margin-bottom: 22px; }
.login-card h2 { margin: 0 0 8px; font-size: 24px; }
.login-card > p:not(.eyebrow) { color: var(--muted); margin: 0 0 24px; }

.collection-heading { min-height: 190px; }
.quick-collection-grid { display: grid; grid-template-columns: minmax(0,1.7fr) minmax(320px,.72fr); gap: 16px; margin: 16px 0; align-items: start; }
.collection-journey { position: relative; display: grid; grid-template-columns: repeat(9,auto); align-items: center; gap: 10px; margin: 14px 0 4px; padding: 14px 16px; overflow: hidden; border: 1px solid rgba(91,200,239,.2); border-radius: 14px; background: linear-gradient(105deg,rgba(6,18,28,.94),rgba(8,30,35,.84)); box-shadow: inset 0 1px 0 rgba(255,255,255,.035),0 16px 45px rgba(0,0,0,.18); }
.collection-journey::before { content: ''; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(90deg,transparent,rgba(69,223,177,.055),transparent); transform: translateX(-100%); animation: journey-scan 8s linear infinite; }
.collection-journey > div { position: relative; z-index: 1; min-width: 0; display: grid; grid-template-columns: auto 1fr; column-gap: 8px; align-items: center; }
.collection-journey > div > span { grid-row: 1 / 3; display: grid; place-items: center; width: 30px; height: 30px; border: 1px solid rgba(69,223,177,.34); border-radius: 50%; color: var(--accent); font: 800 9px/1 ui-monospace,SFMono-Regular,Consolas,monospace; box-shadow: 0 0 18px rgba(69,223,177,.09); }
.collection-journey strong { color: #e9f8fa; font-size: 11px; white-space: nowrap; }
.collection-journey small { color: var(--muted); font-size: 9px; white-space: nowrap; }
.collection-journey > i { position: relative; z-index: 1; color: rgba(91,200,239,.55); font-style: normal; font-size: 22px; }
@keyframes journey-scan { to { transform: translateX(100%); } }
@media (prefers-reduced-motion: reduce) { .collection-journey::before { animation: none; } }
.quick-collection-panel { border-color: rgba(69,223,177,.22); background: radial-gradient(circle at 100% 0, rgba(69,223,177,.07), transparent 34%), var(--panel); }
.collection-mode-switch { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 0 0 18px; padding: 5px; border: 1px solid rgba(111,242,255,.18); border-radius: 14px; background: rgba(2,10,17,.58); }
.collection-mode-switch button { display: grid; gap: 3px; min-height: 54px; padding: 9px 12px; border: 1px solid transparent; border-radius: 10px; color: var(--muted); background: transparent; cursor: pointer; font: inherit; text-align: left; }
.collection-mode-switch button small { color: rgba(190,216,226,.58); font-size: 11px; }
.collection-mode-switch button.active { color: #efffff; border-color: rgba(111,242,255,.42); background: linear-gradient(135deg, rgba(65,223,255,.14), rgba(90,111,255,.1)); box-shadow: inset 0 0 24px rgba(65,223,255,.05); }
.collection-mode-switch button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.collection-mode-panel { min-width: 0; }
.mode-intro { margin-bottom: 16px; padding: 14px 16px; border-left: 2px solid var(--accent); background: linear-gradient(90deg, rgba(65,223,255,.09), transparent); }
.mode-intro span { color: var(--accent); font: 700 10px/1.4 ui-monospace, SFMono-Regular, Consolas, monospace; letter-spacing: .14em; }
.mode-intro h3 { margin: 5px 0; font-size: 18px; }
.mode-intro p { margin: 0; color: var(--muted); line-height: 1.6; }
/* 采集中心左栏：表单与来源状态合并成一列，避免右侧长列表把左栏留出空白 */
.quick-collection-main { display: grid; gap: 16px; align-content: start; min-width: 0; }
.quick-source-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.telegram-mode-picker { align-self: end; border: 1px solid var(--line); border-radius: 9px; background: rgba(255,255,255,.018); }
.telegram-mode-picker summary { display: flex; justify-content: space-between; gap: 10px; padding: 11px 12px; cursor: pointer; list-style: none; }
.telegram-mode-picker summary::-webkit-details-marker { display: none; }
.telegram-mode-picker summary span { color: var(--muted); }
.telegram-mode-picker summary strong { color: var(--accent); font-size: 10px; text-align: right; }
.telegram-mode-options { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 7px; padding: 0 10px 10px; }
.telegram-mode-options .check-field { margin: 0; padding: 9px; border: 1px solid var(--line); border-radius: 8px; }
.quick-platform-picker { grid-column: 1 / -1; }
.quick-platform-options { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 7px; padding: 0 10px 10px; }
.quick-platform-options .check-field { margin: 0; padding: 9px; border: 1px solid var(--line); border-radius: 8px; }
.telegram-mode-options input:disabled + span { opacity: .5; }
.telegram-search-note { display: flex; gap: 10px; padding: 11px 12px; border: 1px solid rgba(69,223,177,.2); border-radius: 9px; background: rgba(69,223,177,.06); }
.telegram-search-note span { color: var(--muted); }
#quick-private-targets { min-height: 118px; }
.telegram-scope-note { display: grid; gap: 5px; padding: 13px 14px; border: 1px solid rgba(69,223,177,.2); border-radius: 10px; background: rgba(69,223,177,.05); }
.telegram-scope-note span, .telegram-search-heading span { color: var(--muted); font-size: 12px; }
.telegram-search-field { display: grid; gap: 10px; padding: 13px 14px; border: 1px solid var(--line); border-radius: 10px; }
.telegram-search-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.telegram-search-heading > div { display: grid; gap: 4px; }
.telegram-search-engine-options { display: grid; gap: 7px; }
.telegram-search-engine-options .check-field { margin: 0; }
.telegram-search-engine-list { display: grid; gap: 8px; max-height: 320px; overflow: auto; padding: 2px; }
.telegram-search-engine-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 9px; }
.telegram-search-engine-item > div:first-child { display: grid; gap: 3px; min-width: 0; }
.telegram-search-engine-item span { color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.telegram-search-engine-item-actions { display: flex; gap: 6px; flex: 0 0 auto; }
.telegram-search-engine-form-grid { display: grid; grid-template-columns: .7fr 1.3fr; gap: 10px; margin-top: 14px; }
.telegram-auth-panel { grid-column: 1 / -1; display: grid; gap: 12px; margin-top: 8px; padding: 15px; border: 1px solid rgba(69,223,177,.2); border-radius: 12px; background: rgba(69,223,177,.045); }
.telegram-auth-heading { display: flex; justify-content: space-between; gap: 14px; align-items: flex-start; }
.telegram-auth-heading > div { display: grid; gap: 6px; }
.telegram-auth-heading small { color: var(--muted); text-align: right; }
.telegram-auth-grid { display: grid; grid-template-columns: .7fr 1.4fr 1fr; gap: 9px; }
.telegram-auth-actions { display: flex; justify-content: flex-end; }
.telegram-verify-row { display: grid; grid-template-columns: 1fr auto; gap: 9px; align-items: end; }
.error-text { color: var(--red); }
.helper.error { color: var(--red); }
.quick-confirm { margin-top: 5px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 9px; background: rgba(255,255,255,.018); }
.quick-capabilities { display: grid; gap: 8px; margin-bottom: 14px; }
.quick-capability { display: flex; align-items: center; gap: 10px; padding: 11px; border: 1px solid var(--line); border-radius: 10px; background: rgba(255,255,255,.018); }
.quick-capability > span { width: 8px; height: 8px; flex: 0 0 auto; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 4px rgba(255,107,99,.08); }
.quick-capability.available > span { background: var(--accent); box-shadow: 0 0 0 4px rgba(69,223,177,.08); }
.quick-capability strong, .quick-capability small { display: block; }
.quick-capability small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.quick-result { display: grid; gap: 4px; margin-top: 12px; padding: 13px 14px; border: 1px solid rgba(69,223,177,.25); border-radius: 10px; background: rgba(69,223,177,.07); }
.quick-result.error { border-color: rgba(255,107,99,.3); background: rgba(255,107,99,.07); }
.quick-result span, .quick-result small { color: var(--muted); }
.quick-result a { color: var(--accent); font-weight: 750; text-decoration: none; }
.recent-run-heading { display: flex; justify-content: space-between; gap: 12px; margin: 22px 0 8px; }
.recent-run-heading span { color: var(--muted); font-size: 9px; }
.advanced-collection { margin: 16px 0; padding: 0; }
.advanced-collection > summary { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 18px 20px; cursor: pointer; list-style: none; }
.advanced-collection > summary::-webkit-details-marker { display: none; }
.advanced-collection > summary span:first-child { display: grid; gap: 3px; }
.advanced-collection > summary small, .advanced-collection > summary span:last-child { color: var(--muted); font-size: 10px; }
.advanced-collection[open] > summary { border-bottom: 1px solid var(--line); }
.advanced-collection-body { padding: 18px 20px 20px; }
.advanced-actions { display: flex; gap: 9px; }
.advanced-actions .button { flex: 1; }

footer { max-width: 1480px; margin: 0 auto; padding: 24px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; color: var(--muted); font-size: 10px; }

@keyframes pulse { 0%,100% { opacity: .7; transform: scale(.9); } 50% { opacity: 1; transform: scale(1.08); } }
@keyframes dialog-in { from { opacity: 0; transform: translateY(10px) scale(.985); } }
@media (prefers-reduced-motion: reduce) { *,*::before,*::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; } }
@media (max-width: 1100px) {
  .topbar { flex-wrap: wrap; padding-top: 10px; padding-bottom: 10px; }
  .primary-nav { order: 3; width: 100%; overflow-x: auto; justify-content: flex-start; scrollbar-width: thin; }
  .top-actions { margin-left: auto; }
  #runtime-pill { display: none; }
  .config-grid { grid-template-columns: 1fr 1fr; }
  .configuration-nav { grid-template-columns: repeat(2,minmax(0,1fr)); }
  #task-form, .custom-integration-form { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .language-dialog .language-options { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .classification-grid { grid-template-columns: 1fr 1fr; }
  .integration-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .hero { grid-template-columns: 1fr; gap: 34px; }
  .hero-status { grid-template-columns: repeat(3,1fr); }
  .status-card { display: block; }
  .status-icon { margin-bottom: 10px; }
  .alert-filter-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .alert-filter-head { flex-direction: column; align-items: stretch; }
  .filter-summary { max-width: none; text-align: left; white-space: normal; }
  .page-heading-compact { padding: 26px 30px; }
}
@media (max-width: 800px) {
  .topbar { padding: 0 14px; }
  .runtime-pill { display: none; }
  main { padding: 20px 13px 44px; }
  .page-heading { min-height: 0; padding: 30px 24px; display: grid; border-radius: 18px; }
  .page-heading > .button { justify-self: start; }
  .hero { border-radius: 18px; padding: 34px 24px; }
  .hero-status, .stats-grid, .classification-grid, .workspace-grid, .quick-collection-grid, .config-grid, .source-grid { grid-template-columns: 1fr; }
  .configuration-nav { grid-template-columns: 1fr 1fr; }
  .integration-overview { grid-template-columns: repeat(3,1fr); }
  .integration-overview p { grid-column: 1 / -1; }
  #task-form, .custom-integration-form { grid-template-columns: 1fr; }
  .builtin-integration-fields { grid-template-columns: 1fr; }
  .model-select-field { grid-template-columns: 1fr; }
  .telegram-auth-grid { grid-template-columns: 1fr; }
  #task-form .task-wide, #task-form .language-field, #task-form button.task-wide { grid-column: auto; }
  .language-dialog .language-options { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .panel-header { display: grid; }
  .filter-cluster { min-width: 0; width: 100%; }
  .alert-feed-header, .alert-list-toolbar { align-items: stretch; flex-direction: column; }
  .alert-filter-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .alert-card { padding: 14px 14px 12px 17px; }
  .alert-card-main { gap: 10px; }
  .alert-card-footer { flex-direction: column; align-items: stretch; gap: 10px; }
  .alert-actions { justify-content: flex-start; }
  .document-toolbar, .collection-run-heading { align-items: stretch; flex-direction: column; }
  .document-toolbar .button, .document-toolbar .check-field { align-self: flex-start; }
  .run-metrics { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .collection-source-metrics > div { grid-template-columns: 1fr; }
  .document-card { padding: 14px; }
  .document-card-heading { gap: 10px; }
  .document-card-footer { flex-wrap: wrap; }
  .integration-grid { grid-template-columns: 1fr; }
  footer { flex-direction: column; gap: 5px; }
}
@media (max-width: 480px) {
  h1 { font-size: 36px; }
  .stats-grid, .schedule-grid, .quick-source-grid { grid-template-columns: 1fr; }
  .advanced-actions { flex-direction: column; }
  .telegram-mode-options, .quick-platform-options { grid-template-columns: 1fr; }
  .language-options { grid-template-columns: 1fr; }
  .configuration-nav { grid-template-columns: 1fr; }
  .alert-filter-grid { gap: 8px; }
  .alert-card-main { grid-template-columns: minmax(0,1fr) auto; }
  .alert-card-main > .level { grid-row: 1; grid-column: 1; justify-self: start; }
  .alert-card-main > .alert-card-body { grid-row: 2; grid-column: 1 / -1; }
  .alert-card h3, .alert-summary { max-width: none; }
  .page-size-segment { align-self: flex-start; }
  .alert-download-toolbar { flex-direction: column; align-items: stretch; }
  .alert-download-bulk { justify-content: space-between; }
  .alert-download-item { grid-template-columns: auto auto minmax(0,1fr); gap: 8px; padding: 9px 10px; }
  .alert-download-body { padding: 16px 16px 18px; }
  .pagination-bar { justify-content: center; }
  .pagination-info { flex-basis: 100%; text-align: center; }
  .page-number { min-width: 30px; }
  .page-gap { min-width: 10px; }
  .page-jump { margin-left: auto; }
  .alert-feed-header { gap: 12px; }
  .connection-danger, .connection-switch { align-items: flex-start; flex-direction: column; }
  .connection-guide-grid { grid-template-columns: 1fr; }
  .dialog-actions { flex-wrap: wrap; }
  .app-dialog > form, .app-dialog > .language-selector, .dialog-header { padding-left: 16px; padding-right: 16px; }
}

/* ===== 视觉重构 v2：设计令牌 / 页面骨架 / 响应式节奏 ===== */
:root {
  --space-1: 6px;
  --space-2: 10px;
  --space-3: 14px;
  --space-4: 18px;
  --space-5: 26px;
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --hairline: rgba(255, 255, 255, .055);
  --elev-1: 0 10px 30px rgba(0, 0, 0, .18);
  --elev-2: 0 22px 60px rgba(0, 0, 0, .26);
}

/* 1. 排版基调 */
body { font-size: 13.5px; line-height: 1.68; -webkit-font-smoothing: antialiased; }
h1, h2, h3 { text-wrap: balance; }
::selection { background: rgba(69, 223, 177, .26); }
* { scrollbar-width: thin; scrollbar-color: rgba(120, 160, 158, .32) transparent; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { border-radius: 999px; background: rgba(120, 160, 158, .28); }
::-webkit-scrollbar-thumb:hover { background: rgba(120, 160, 158, .48); }

main { padding-bottom: 56px; }

/* 2. 页头：从"横幅"收敛为信息头 */
.page-heading,
.page-heading-compact {
  position: relative;
  min-height: 0;
  overflow: hidden;
  align-items: flex-start;
  gap: var(--space-4);
  padding: 24px 26px;
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 94% 6%, rgba(69, 223, 177, .13), transparent 40%),
    linear-gradient(135deg, rgba(17, 32, 45, .96), rgba(8, 16, 26, .95));
  box-shadow: var(--elev-1);
}
.page-heading::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, rgba(69, 223, 177, .55), rgba(91, 200, 239, .2), transparent 72%);
}
.page-heading h1,
.page-heading-compact h1 { font-size: clamp(23px, 2.3vw, 32px); line-height: 1.2; letter-spacing: -.02em; }
.page-heading p:not(.section-index) { margin-top: 9px; max-width: 680px; font-size: 12px; line-height: 1.7; }
.page-heading .section-index,
.page-heading .eyebrow,
.page-heading .hero-kicker { margin-bottom: 9px; font-size: 9px; letter-spacing: .18em; }
.heading-facts { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 14px; }
.heading-facts span { padding: 4px 9px; border: 1px solid var(--hairline); border-radius: 999px; background: rgba(255, 255, 255, .022); color: var(--muted); font-size: 10px; }
.heading-facts b { margin-right: 5px; color: var(--accent); font-size: 10px; font-weight: 760; }

/* 3. 首页 Hero */
.hero { min-height: 0; padding: clamp(24px, 3vw, 40px); gap: 32px; border-radius: var(--radius-lg); }
.hero > div > p { margin-top: 16px; max-width: 640px; font-size: 13px; line-height: 1.75; }
.hero-tags { gap: 7px; margin-top: 18px; }
.hero-tags span { padding: 5px 9px; font-size: 10px; }
.hero-status { gap: 8px; }
.status-card { padding: 13px 14px; gap: 11px; border-radius: 12px; }
.status-card:hover { transform: translateY(-2px); }

/* 4. 指标卡 */
.stats-grid { gap: 10px; margin: 14px 0; }
.stat { min-height: 112px; padding: 16px; border-radius: var(--radius-md); }
.stat strong { font-size: 30px; }

/* 5. 面板与栅格 */
.panel { padding: 18px; border-radius: var(--radius-md); box-shadow: var(--elev-1); }
.panel-header { gap: var(--space-3); margin-bottom: 14px; }
.panel-header h2 { font-size: 15.5px; letter-spacing: -.01em; }
.panel-header .section-index { margin-bottom: 3px; font-size: 9px; letter-spacing: .16em; }
.panel-hint { margin-bottom: 12px; font-size: 10.5px; }
.workspace-grid { grid-template-columns: minmax(0, 2.05fr) minmax(300px, .85fr); gap: var(--space-3); margin: 14px 0; }
.config-grid { gap: var(--space-3); margin: 14px 0; }
.configuration-nav { gap: 9px; margin: 14px 0; }
.configuration-nav a { min-height: 64px; padding: 12px 14px; border-radius: var(--radius-sm); }
.intelligence-map { margin: 14px 0; }
.classification-card { padding: 14px; border-radius: var(--radius-sm); }

/* 6. 情报卡 / 文档卡 */
.alert-card { padding: 14px 15px 12px 17px; gap: 10px; border-radius: var(--radius-md); }
.alert-card:hover { border-color: rgba(69, 223, 177, .22); background: linear-gradient(135deg, rgba(69, 223, 177, .05), rgba(255, 255, 255, .014)); }
.alert-card h3 { font-size: 13px; line-height: 1.55; }
.alert-summary { font-size: 11.5px; line-height: 1.72; }
.alert-meta span,
.alert-reasons { font-size: 10px; }
.alert-card-footer { gap: 8px; }
.level { min-width: 38px; height: 24px; border-radius: 7px; font-size: 10px; }
.document-card { padding: 14px 15px; border-radius: var(--radius-sm); }
.document-card:hover { border-color: var(--line-strong); }
.list-empty { padding: 28px 16px; border-radius: var(--radius-sm); }

/* 7. 表单与按钮 */
.button { border-radius: var(--radius-sm); }
.field input, .field select, .field textarea { border-radius: var(--radius-sm); }
.toast { border-radius: var(--radius-sm); }

/* 8. 响应式：平板 / 窄屏 / 手机 */
@media (max-width: 1100px) {
  .workspace-grid { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 960px) {
  .topbar { flex-wrap: wrap; gap: 8px 12px; min-height: 0; padding: 9px 12px 4px; }
  .primary-nav { order: 3; flex: 1 0 100%; margin: 0; gap: 2px; justify-content: flex-start; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; }
  .primary-nav::-webkit-scrollbar { display: none; }
  .primary-nav a { padding: 8px 10px; font-size: 11.5px; border-radius: 8px; }
  .primary-nav a.active { background: transparent; color: var(--accent); box-shadow: inset 0 -2px 0 var(--accent); }
  .top-actions { margin-left: auto; }
  main { padding: 16px 12px 44px; }
  .page-heading, .page-heading-compact { flex-direction: column; align-items: stretch; gap: 14px; padding: 20px 18px; }
  .page-heading > .button { align-self: flex-start; }
  .hero { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .hero::after { display: none; }
}

@media (max-width: 800px) {
  .page-heading, .page-heading-compact { display: flex; padding: 18px 16px; }
  .alert-card { padding: 13px 13px 11px 15px; }
  .alert-card-main { gap: 10px; }
  .document-card { padding: 13px; }
  .integration-card { min-height: 0; padding: 13px 14px; }
  .integration-card p { margin: 10px 0; }
  .integration-card small { margin-bottom: 12px; }
  .integration-progress { margin-top: 10px; }
  .integration-overview { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; padding: 13px; }
  .integration-overview strong { font-size: 20px; }
  .advanced-collection-body { padding: 14px; }
  .quick-collection-main { display: contents; }
  .quick-collection-panel { order: 1; }
  .quick-status-panel { order: 2; }
  .quick-collection-main > section.panel { order: 3; }
}

@media (max-width: 560px) {
  :root { --radius-lg: 16px; --radius-md: 13px; }
  body { font-size: 13px; }

  .brand { gap: 9px; }
  .brand-mark { width: 32px; height: 32px; border-radius: 9px; font-size: 18px; }
  .brand strong { font-size: 12.5px; letter-spacing: .02em; }
  .brand span { display: none; }
  .top-actions { gap: 6px; }
  .top-actions .button { min-height: 30px; padding: 6px 9px; font-size: 10px; }
  #current-user { display: none; }
  .quick-collection-main { display: contents; }
  .quick-collection-panel { order: 1; }
  .quick-status-panel { order: 2; }
  .quick-collection-main > section.panel { order: 3; }

  .page-heading, .page-heading-compact { gap: 10px; padding: 15px 14px; border-radius: var(--radius-md); }
  .page-heading h1, .page-heading-compact h1 { font-size: 20px; }
  .page-heading .section-index { font-size: 8.5px; letter-spacing: .14em; margin-bottom: 7px; }
  .page-heading p:not(.section-index) { margin-top: 7px; font-size: 11px; line-height: 1.6; }
  .page-heading .heading-facts { display: none; }
  .page-heading > .button { width: 100%; justify-content: center; }

  .hero { gap: 16px; padding: 18px 15px; }
  h1, .hero h1 { font-size: 24px; line-height: 1.18; }
  .hero > div > p { margin-top: 11px; font-size: 11.5px; line-height: 1.7; }
  .hero-tags { display: none; }
  .status-card { padding: 10px 11px; gap: 10px; }
  .status-card b { font-size: 12px; }
  .status-card small { font-size: 10px; }
  .status-icon { flex-basis: 28px; height: 28px; font-size: 9px; }

  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 12px 0; }
  .stat { min-height: 82px; padding: 12px; border-radius: var(--radius-sm); }
  .stat span { font-size: 9px; letter-spacing: .06em; }
  .stat strong { margin-top: 6px; font-size: 23px; }
  .stat small { font-size: 9px; }

  .panel { padding: 13px; border-radius: var(--radius-md); }
  .panel-header { margin-bottom: 11px; gap: 9px; }
  .panel-header h2 { font-size: 14px; }
  .panel-header span { font-size: 10px; }
  .field { gap: 5px; margin-bottom: 11px; }
  .field input, .field select, .field textarea { padding: 9px 10px; font-size: 12px; }
  .button { min-height: 33px; padding: 7px 11px; }

  .alert-card { padding: 12px 12px 10px 14px; gap: 9px; }
  .alert-card h3 { font-size: 12.5px; }
  .alert-summary { font-size: 11px; line-height: 1.68; }
  .alert-actions { gap: 6px; flex-wrap: wrap; }
  .alert-actions .button { min-height: 28px; padding: 5px 9px; font-size: 10px; }
  .alert-reasons { font-size: 9px; line-height: 1.55; }
  .document-card { padding: 12px; }
  .readiness { padding: 9px 10px; }
  .readiness-list li { grid-template-columns: 7px auto auto minmax(0, 1fr); gap: 5px; }
  .classification-card { padding: 12px; }
  .metric-row { grid-template-columns: 62px 1fr 26px; gap: 6px; }
  .pagination-bar { gap: 8px; }
  .pagination-bar, .alert-pagination, .document-pagination { justify-content: center; }
  .pagination-info { flex-basis: 100%; text-align: center; }
  .pagination-pages { width: 100%; flex-wrap: nowrap; justify-content: center; }
  .page-numbers { flex: 1 1 auto; min-width: 0; flex-wrap: wrap; justify-content: center; gap: 4px; }
  .page-number, .page-step { min-width: 29px; height: 29px; font-size: 10.5px; }
  .page-gap { min-width: 9px; }
  .page-jump { margin-left: auto; }
  footer { padding: 16px 12px 24px; font-size: 9.5px; }
  .toast { left: 12px; right: 12px; top: 74px; max-width: none; }

  .app-dialog { width: calc(100vw - 16px); border-radius: var(--radius-md); }
  .dialog-header { padding: 14px 14px 11px; }
  .dialog-header h2 { font-size: 16px; }
  .app-dialog > form, .app-dialog > .language-selector, .alert-download-body { padding: 14px; }
  .alert-download-items-shell { margin-left: 6px; }
  .schedule-overview-body { padding: 14px; }
  .schedule-task { padding: 11px 12px; }
  .schedule-task-meta { font-size: 10px; gap: 2px 10px; }
}

/* 多源交叉验证徽标 */
.corroboration-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .02em;
  border: 1px solid transparent;
  white-space: nowrap;
}
.corroboration-badge.multi { color: #0f5132; background: #d7f0e2; border-color: #9fd7bd; }
.corroboration-badge.dual { color: #6b4b06; background: #fdf0cf; border-color: #e6cf8f; }
.corroboration-badge.single { color: #6b7280; background: #eef1f0; border-color: #d6ddda; }
button.corroboration-badge { font: inherit; line-height: 1.5; cursor: pointer; }
button.corroboration-badge:hover, button.corroboration-badge[aria-expanded="true"] { box-shadow: 0 0 0 2px rgba(94,234,212,.35); }
.corroboration-popover {
  position: fixed;
  z-index: 60;
  display: grid;
  gap: 8px;
  padding: 11px 12px;
  border: 1px solid rgba(94,234,212,.28);
  border-radius: 12px;
  background: #0d1823;
  box-shadow: 0 18px 46px rgba(0,0,0,.6);
  color: #cfe0e4;
  font-size: 11px;
  line-height: 1.6;
  max-height: min(60vh, 420px);
  overflow: auto;
}
.corroboration-popover[hidden] { display: none; }
.corroboration-popover.is-open { animation: dialog-in .14s ease-out; }
.corroboration-pop-head { display: flex; gap: 8px; align-items: flex-start; }
.corroboration-pop-head > div { display: grid; gap: 2px; }
.corroboration-pop-head strong { color: #f2f7f6; font-size: 11.5px; }
.corroboration-pop-head span { color: #8fa3b3; font-size: 10px; }
.corroboration-pop-sources { display: flex; flex-wrap: wrap; gap: 4px; }
.corroboration-pop-sources span {
  padding: 1px 7px; border-radius: 999px; font-size: 9.5px;
  color: #9fd8c8; background: rgba(94,234,212,.1); border: 1px solid rgba(94,234,212,.22);
}
.corroboration-pop-samples { list-style: none; margin: 0; padding: 0; display: grid; gap: 5px; }
.corroboration-pop-label { margin: 0; color: #7d9398; font-size: 9.5px; }
.corroboration-pop-samples li { display: grid; gap: 1px; padding-top: 5px; border-top: 1px solid rgba(255,255,255,.06); }
.corroboration-pop-samples li:first-child { border-top: 0; padding-top: 0; }
.corroboration-pop-samples a { color: #d7e6e9; text-decoration: none; }
.corroboration-pop-samples a:hover { color: #5eead4; text-decoration: underline; }
.corroboration-pop-samples span { color: #7d9398; font-size: 9.5px; }
.corroboration-pop-empty { margin: 0; color: #ffd08a; font-size: 10px; }
.corroboration-pop-foot { margin: 0; padding-top: 6px; border-top: 1px solid rgba(255,255,255,.06); color: #6f8f92; font-size: 9.5px; }

/* 实体关联图谱：深色画布 + 发光节点 + 曲线关系 + 聚焦高亮 */
.entity-graph-dialog { width: min(720px, 94vw); }
.entity-graph-body { display: grid; gap: 10px; padding: 0 18px 4px; }
.entity-graph-canvas {
  position: relative;
  border: 1px solid rgba(94, 234, 212, .18);
  border-radius: 16px;
  background: radial-gradient(120% 90% at 50% 0%, #12212b, #070d12 72%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05), 0 18px 44px rgba(0,0,0,.45);
  overflow: hidden;
  min-height: 280px;
}
.entity-graph-canvas .helper { padding: 18px; }
.eg-svg { display: block; width: 100%; height: auto; }
.eg-node { cursor: pointer; transition: opacity .18s ease; }
.eg-node:focus { outline: none; }
.eg-label {
  fill: #dbe7ea; font-size: 11px; font-weight: 600; letter-spacing: .01em;
  paint-order: stroke; stroke: #060d13; stroke-width: 3.4px; stroke-linejoin: round;
  pointer-events: none;
}
.eg-dot, .eg-halo { transition: opacity .18s ease, stroke-width .18s ease; }
.eg-edge { transition: opacity .18s ease, stroke-opacity .18s ease; }
.eg-svg.eg-focus .eg-node.is-dim { opacity: .26; }
.eg-svg.eg-focus .eg-edge.is-dim { stroke-opacity: .05; }
.eg-svg.eg-focus .eg-edge.is-active { stroke-opacity: .92; }
.eg-node.is-active .eg-dot { stroke-width: 2.2; }
.eg-node.is-active .eg-halo { opacity: 1; }
.eg-node:hover .eg-label, .eg-node.is-active .eg-label { fill: #ffffff; }
.entity-graph-legend { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; margin: 0; }
.eg-chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 9px;
  border: 1px solid rgba(255,255,255,.1); border-radius: 999px;
  background: rgba(255,255,255,.04); color: #cfe0e4; font-size: 10.5px; font-weight: 600;
  transition: background .16s ease, border-color .16s ease, opacity .16s ease;
}
.eg-chip:hover { background: rgba(255,255,255,.09); border-color: rgba(255,255,255,.2); }
.eg-chip[aria-pressed="true"] { opacity: .45; border-style: dashed; }
.eg-chip .eg-count { color: #7f9a9f; font-variant-numeric: tabular-nums; font-weight: 500; }
.entity-graph-legend .dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; }
.entity-graph-legend .dot.org { background: #2dd4bf; box-shadow: 0 0 8px rgba(45,212,191,.55); }
.entity-graph-legend .dot.person { background: #f5a524; box-shadow: 0 0 8px rgba(245,165,36,.5); }
.entity-graph-legend .dot.place { background: #60a5fa; box-shadow: 0 0 8px rgba(96,165,250,.5); }
.entity-graph-legend .dot.channel { background: #a78bfa; box-shadow: 0 0 8px rgba(167,139,250,.5); }
.entity-graph-hint { margin: 0; color: #7d9398; font-size: 10px; }
.entity-graph-list { font-size: 11.5px; color: #b9c9cd; max-height: 190px; overflow: auto; }
.eg-detail-head { display: grid; gap: 2px; margin-bottom: 6px; }
.eg-detail-head h3 { margin: 0; font-size: 14px; color: #f2f7f6; }
.eg-badge {
  justify-self: start; padding: 1px 8px; border-radius: 999px; font-size: 9.5px; font-weight: 700;
  color: var(--eg-color, #94a3b8); border: 1px solid color-mix(in srgb, var(--eg-color, #94a3b8) 45%, transparent);
  background: color-mix(in srgb, var(--eg-color, #94a3b8) 14%, transparent);
}
.eg-detail-meta { margin: 0; color: #7d9398; font-size: 10px; }
.eg-sources { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 6px; }
.eg-source { padding: 1px 7px; border-radius: 999px; background: rgba(255,255,255,.05); color: #9db3b8; font-size: 9.5px; }
.eg-related-row { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; margin-bottom: 8px; }
.eg-related-label { color: #7d9398; font-size: 9.5px; }
.eg-related {
  display: inline-flex; align-items: baseline; gap: 4px; padding: 2px 8px;
  border: 1px solid rgba(94,234,212,.22); border-radius: 999px;
  background: rgba(94,234,212,.08); color: #a7f3e4; font-size: 10px;
}
.eg-related:hover { background: rgba(94,234,212,.16); }
.eg-related small { color: #6f8f92; font-size: 9px; }
.eg-doc-list { margin: 0; padding-left: 0; list-style: none; display: grid; gap: 5px; }
.eg-doc-list li { display: grid; gap: 1px; padding: 5px 0; border-top: 1px solid rgba(255,255,255,.05); }
.eg-doc-list li:first-child { border-top: 0; }
.eg-doc-list a { color: #cfe0e4; text-decoration: none; }
.eg-doc-list a:hover { color: #5eead4; text-decoration: underline; }
.eg-doc-list span { color: #6f8f92; font-size: 9.5px; }
@media (max-width: 480px) {
  .entity-graph-body { padding: 0 12px 2px; }
  .entity-graph-canvas { min-height: 240px; border-radius: 12px; }
  .eg-label { font-size: 10.5px; stroke-width: 3px; }
  .entity-graph-list { max-height: 220px; }
}

/* 采集统计：历史运行弹窗（页面内只留最新一次运行） */
.run-history-dialog { width: min(960px, 95vw); }
.run-history-body { display: grid; gap: 10px; }
.run-history-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
  color: #4b5751;
}
.run-history-page-size { display: inline-flex; align-items: center; gap: 6px; }
.run-history-page-size select { padding: 4px 6px; border-radius: 8px; }
.run-history-dialog .collection-run-list { max-height: 58vh; overflow: auto; padding-right: 2px; }
.run-history-dialog .collection-run-card { margin-bottom: 8px; }
@media (max-width: 640px) {
  .run-history-toolbar { flex-direction: column; align-items: flex-start; }
  .run-history-dialog .collection-run-list { max-height: 52vh; }
}

.run-history-more { white-space: nowrap; }

.run-history-controls { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.run-history-controls select { max-width: 180px; }

.run-history-search { flex: 1 1 220px; min-width: 0; display: block; }
.run-history-search input { width: 100%; padding: 6px 10px; border-radius: 10px; border: 1px solid #d6ddda; font-size: 12px; }
.run-history-search input:focus { outline: 2px solid rgba(18,99,76,.25); border-color: #12634c; }

/* 采集统计：四个指标卡片可点击查看明细 */
button.stat { text-align: left; font: inherit; color: inherit; width: 100%; cursor: pointer; display: block; }
.stat-clickable { cursor: pointer; }
.stat-clickable span, .stat-clickable small { display: block; }
.stat-clickable:hover { border-color: #45dfb1; }
.stat-clickable:focus-visible { outline: 2px solid #45dfb1; outline-offset: 2px; }
.run-metrics .is-focus { color: #45dfb1; font-weight: 700; }

/* 采集统计：单指标明细行（候选/过滤/新增/历史匹配 一一对应） */
.metric-run-row { border: 1px solid #24313d; border-radius: 12px; padding: 10px 12px; margin-bottom: 8px; background: rgba(255,255,255,.02); }
.metric-run-row.is-zero { opacity: .55; }
.metric-run-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.metric-run-head strong { font-size: 13px; }
.metric-run-head span { font-size: 11px; color: #8fa3b3; margin-left: 8px; }
.metric-run-value { display: flex; align-items: baseline; gap: 6px; white-space: nowrap; }
.metric-run-value span { font-size: 11px; color: #8fa3b3; }
.metric-run-value b { font-size: 20px; color: #45dfb1; font-variant-numeric: tabular-nums; }
.metric-run-sources { display: flex; flex-wrap: wrap; gap: 6px 12px; margin-top: 6px; font-size: 11px; color: #b7c6d1; }
.metric-run-sources strong { color: #dfe9ef; font-weight: 600; margin-right: 3px; }

/* P0-1 / P1-3：来源类型与安全领域筛选 */
.domain-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 4px 0 10px; min-width: 0; max-width: 100%; }
.domain-chip { min-height: 26px; padding: 4px 10px; border: 1px solid rgba(255,255,255,.08); border-radius: 999px; background: rgba(255,255,255,.03); color: #9fb2bd; font-size: 11px; font-weight: 650; cursor: pointer; transition: color .18s, background .18s, border-color .18s; }
.domain-chip:hover { color: var(--ink); border-color: rgba(69,223,177,.45); }
.domain-chip.is-active { color: #03120e; background: var(--accent); border-color: transparent; }
.domain-chip small { margin-left: 5px; font-size: 10px; opacity: .72; font-variant-numeric: tabular-nums; }
.domain-chip.is-active small { opacity: .85; }
#toggle-favorite-filter.is-active { color: #03120e; background: var(--accent); border-color: transparent; }
.document-filter-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.document-filter-row label { display: flex; align-items: center; gap: 6px; }
.document-filter-row .domain-chips { margin: 0; flex: 1 1 100%; min-width: 0; }

/* P1-4：关注来源与收藏情报 */
.fav-star.on { color: var(--accent); border-color: rgba(69,223,177,.45); }
.fav-star.compact { font-size: 10px; padding: 2px 8px; }
.source-favorite-row { display: flex; justify-content: flex-end; }
.favorite-body { display: grid; gap: 16px; max-height: 62vh; overflow: auto; }
.favorite-section h3 { margin: 0 0 8px; font-size: 13px; color: var(--ink); display: flex; align-items: baseline; gap: 8px; }
.favorite-section h3 small { font-size: 11px; color: var(--muted); font-weight: 500; }
.favorite-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.favorite-list li { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border: 1px solid rgba(255,255,255,.06); border-radius: 10px; background: rgba(255,255,255,.02); font-size: 12px; min-width: 0; }
.favorite-list li a { color: var(--ink); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1 1 auto; min-width: 0; }
.favorite-list li a:hover { color: var(--accent); }
.favorite-list li > span { color: var(--muted); font-size: 11px; white-space: nowrap; }
.favorite-list li .level { font-weight: 700; color: #ffc861; }
.favorite-list li .level.s0 { color: #ff7b6b; }
.favorite-list li .level.s2 { color: #7fb8ff; }

/* P0-2：报告检索与本周热门 */
.report-search { display: grid; grid-template-columns: minmax(0,1.6fr) repeat(4, minmax(0,1fr)) auto auto; gap: 8px; align-items: end; margin: 0 0 14px; }
.report-search label { display: grid; gap: 5px; min-width: 0; font-size: 10px; color: #8ea1a8; font-weight: 700; letter-spacing: .05em; }
.report-search input, .report-search select { width: 100%; min-width: 0; font-size: 12px; }
.report-popular-block { margin-bottom: 14px; padding: 10px 12px; border: 1px solid rgba(255,255,255,.06); border-radius: 12px; background: rgba(255,255,255,.02); }
.report-popular-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.report-popular-head h3 { margin: 0; font-size: 12px; letter-spacing: .06em; color: var(--ink); }
.report-popular-head span { font-size: 10px; color: var(--muted); }
.report-popular { display: grid; gap: 6px; }
.report-popular-item { display: grid; grid-template-columns: 18px minmax(0,1fr); grid-template-areas: 'index title' 'index meta'; gap: 2px 8px; padding: 7px 9px; border-radius: 10px; color: var(--ink); text-decoration: none; border: 1px solid transparent; }
.report-popular-item:hover { border-color: rgba(69,223,177,.35); background: rgba(69,223,177,.06); }
.report-popular-item b { grid-area: index; color: var(--accent); font-size: 12px; }
.report-popular-item span { grid-area: title; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.report-popular-item small { grid-area: meta; font-size: 10px; color: var(--muted); }
.report-pagination { margin-top: 10px; }
.report-snippet { margin: 6px 0 0; padding: 6px 8px; border-left: 2px solid rgba(69,223,177,.45); border-radius: 6px; background: rgba(69,223,177,.06); color: #c6d6df; font-size: 11px; line-height: 1.5; }
@media (max-width: 720px) {
  .report-search { grid-template-columns: 1fr 1fr; }
  .report-search label:first-child { grid-column: 1 / -1; }
  .favorite-list li { flex-wrap: wrap; }
}

/* ===== 视觉打磨 v3：功能闭环配套的交互与层次 ===== */

/* 1. 顶栏与导航：active 下划线 + 安装按钮 */
.primary-nav a { position: relative; }
.primary-nav a.active::after {
  content: "";
  position: absolute; left: 10px; right: 10px; bottom: 2px; height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, var(--accent), rgba(69, 223, 177, .15));
}
.brand { transition: opacity .18s; }
.brand:hover { opacity: .88; }
#pwa-install { border-color: rgba(91, 200, 239, .28); color: #b9e7f8; }
#pwa-install::before { content: "⇩ "; font-weight: 700; }

/* 2. 面板头与段落序号：统一小徽标 */
.panel-header .section-index {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 8px; border: 1px solid rgba(69, 223, 177, .22); border-radius: 999px;
  background: rgba(69, 223, 177, .07); color: var(--accent);
}
.panel-header.compact h2 { font-size: 14.5px; }

/* 3. 筛选区：紧凑节奏 + 窄屏横向滚动 */
.alert-filter-shell { padding: 13px 13px 11px; }
.alert-filter-head { flex-wrap: wrap; gap: 10px; }
.alert-filter-actions { flex-wrap: wrap; }
.filter-summary { font-variant-numeric: tabular-nums; }
.domain-chips { padding-bottom: 2px; }
@media (max-width: 560px) {
  .domain-chips {
    flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none;
    -webkit-overflow-scrolling: touch; padding-bottom: 4px;
    mask-image: linear-gradient(90deg, #000 92%, transparent);
  }
  .domain-chips::-webkit-scrollbar { display: none; }
  .domain-chip { flex: 0 0 auto; }
}

/* 4. 情报卡：等级色条 + 悬停层次 + 收藏态 */
.alert-card::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: rgba(120, 160, 158, .32);
}
.alert-card.s0::before { background: linear-gradient(180deg, #ff6b63, rgba(255, 107, 99, .25)); }
.alert-card.s1::before { background: linear-gradient(180deg, #ffc861, rgba(255, 200, 97, .25)); }
.alert-card.s2::before { background: linear-gradient(180deg, #5bc8ef, rgba(91, 200, 239, .25)); }
.alert-card:hover { transform: translateY(-1px); box-shadow: var(--elev-1); }
@media (prefers-reduced-motion: reduce) { .alert-card:hover { transform: none; } }
.alert-card h3 { font-weight: 640; }
.alert-meta { flex-wrap: wrap; row-gap: 4px; }
.alert-summary { color: #b6c7cf; }
.alert-actions { gap: 6px; }
.fav-star.on { box-shadow: inset 0 0 0 1px rgba(69, 223, 177, .28); }
.source-favorite-row { margin-left: auto; }

/* 5. 收藏弹窗：工具条 + 行悬停 */
.favorite-toolbar {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding-bottom: 10px; border-bottom: 1px solid var(--hairline);
}
.favorite-toolbar-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.favorite-list li { transition: border-color .18s, background .18s; }
.favorite-list li:hover { border-color: rgba(69, 223, 177, .28); background: rgba(69, 223, 177, .05); }
.favorite-list li a { font-weight: 560; }

/* 6. 报告档案：条目两行布局 + 预览按钮 + 摘要 */
.report-item { gap: 6px; }
.report-item > strong { font-size: 13.5px; line-height: 1.5; }
.report-item > span { font-variant-numeric: tabular-nums; }
.report-links { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 4px; }
.report-links a {
  padding: 3px 8px; border: 1px solid var(--hairline); border-radius: 7px;
  color: #a9c3cb; font-size: 10px; font-weight: 700; text-decoration: none; transition: color .18s, border-color .18s;
}
.report-links a:hover { color: var(--accent); border-color: rgba(69, 223, 177, .35); }
.report-links .button { min-height: 26px; padding: 2px 9px; font-size: 10px; }
.report-snippet { font-family: inherit; }

/* 7. 本周热门：可点击行 + 前三名奖牌色 */
.report-popular-item {
  width: 100%; text-align: left; font: inherit; cursor: pointer;
  background: transparent; border: 1px solid transparent;
  transition: border-color .18s, background .18s, transform .18s;
}
.report-popular-item:hover { transform: translateX(2px); }
.report-popular-item b {
  display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 6px;
  background: rgba(255, 255, 255, .06); color: #93a7b3; font-size: 10px; font-weight: 760;
}
.report-popular-item:nth-child(1) b { background: linear-gradient(135deg, #ffd479, #d19a2b); color: #241703; }
.report-popular-item:nth-child(2) b { background: linear-gradient(135deg, #e2e9ee, #a9b7c1); color: #1b232a; }
.report-popular-item:nth-child(3) b { background: linear-gradient(135deg, #f0b384, #b9773f); color: #241303; }
@media (prefers-reduced-motion: reduce) { .report-popular-item:hover { transform: none; } }

/* 8. 报告预览弹窗 */
.report-preview-body { display: grid; gap: 14px; max-height: 64vh; overflow: auto; padding-right: 4px; }
.preview-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.preview-chip {
  padding: 3px 9px; border: 1px solid var(--hairline); border-radius: 999px;
  background: rgba(255, 255, 255, .03); color: #b6c7cf; font-size: 10.5px; font-weight: 640;
}
.preview-chip.s0 { border-color: rgba(255, 107, 99, .35); color: #ff938c; }
.preview-chip.s1 { border-color: rgba(255, 200, 97, .35); color: #ffc861; }
.preview-section { border-left: 2px solid rgba(69, 223, 177, .3); padding-left: 12px; }
.preview-section h3 { margin: 0 0 6px; font-size: 12.5px; color: var(--accent); letter-spacing: .02em; }
.preview-section p { margin: 0 0 6px; color: #c3d2da; font-size: 11.5px; line-height: 1.75; }
.preview-section ul { margin: 0; padding-left: 16px; display: grid; gap: 5px; }
.preview-section li { color: #b6c7cf; font-size: 11.5px; line-height: 1.7; }
.report-preview-links { display: inline-flex; gap: 10px; margin-right: auto; }
.report-preview-links a { color: #a9c3cb; font-size: 11px; font-weight: 700; text-decoration: none; }
.report-preview-links a:hover { color: var(--accent); }
.report-preview-dialog { width: min(720px, 94vw); }

/* 9. 表单与按钮：焦点环 / 禁用态 */
.button:focus-visible, .domain-chip:focus-visible, .level-chip:focus-visible, .report-popular-item:focus-visible {
  outline: 2px solid rgba(69, 223, 177, .55); outline-offset: 2px;
}
.button[disabled] { opacity: .45; cursor: not-allowed; }
input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid rgba(69, 223, 177, .38); outline-offset: 1px; border-color: rgba(69, 223, 177, .45);
}

/* 10. 运行状态 / 空态 / 窄屏收尾 */
html, body { max-width: 100%; overflow-x: hidden; overflow-x: clip; }
.document-page-controls { flex-wrap: wrap; row-gap: 10px; }
.document-page-controls > * { min-width: 0; }
.document-filter-row { width: 100%; }
.stats-grid > * { min-width: 0; }
.stat { min-width: 0; }
.stat span, .stat small { overflow-wrap: anywhere; }
.primary-nav { min-width: 0; overflow-x: auto; scrollbar-width: none; }
.primary-nav::-webkit-scrollbar { display: none; }
.runtime-item { border-radius: 10px; }
.runtime-item:hover { background: rgba(255, 255, 255, .025); }
.empty-state, .list-empty { color: var(--muted); }
.list-empty .button { margin-top: 10px; }
@media (max-width: 480px) {
  .alert-filter-shell { padding: 11px 10px 9px; border-radius: 12px; }
  .alert-filter-actions { gap: 6px; }
  .alert-filter-actions .button { padding: 5px 9px; font-size: 9.5px; }
  .report-links { gap: 6px; }
  .report-links a { padding: 3px 7px; }
  .report-preview-body { max-height: 58vh; }
}

/* ===== 采集自检弹窗 ===== */
.collect-check-dialog { width: min(760px, 94vw); }
.collect-check-body { display: grid; gap: 14px; max-height: 66vh; overflow: auto; padding-right: 4px; }
.check-summary { display: flex; flex-wrap: wrap; gap: 6px; }
.check-chip { padding: 3px 9px; border: 1px solid var(--hairline); border-radius: 999px; background: rgba(255, 255, 255, .03); color: #b6c7cf; font-size: 10.5px; font-weight: 620; }
.check-chip.ok { border-color: rgba(69, 223, 177, .4); color: var(--accent); }
.check-chip.warn { border-color: rgba(255, 180, 80, .42); color: #ffc861; }
.check-chip.muted { color: #8fa3b3; }
.check-chip.include { border-color: rgba(91, 200, 239, .3); color: #b9e7f8; }
.check-chip.sensitive { border-color: rgba(255, 180, 80, .28); color: #ffd08a; }
.check-chip.exclude { border-color: rgba(255, 120, 120, .26); color: #ff9c96; }
.check-warnings { margin: 0; padding: 10px 12px 10px 26px; border: 1px solid rgba(255, 180, 80, .25); border-radius: 10px; background: rgba(255, 180, 80, .06); color: #ffd08a; font-size: 11.5px; line-height: 1.6; display: grid; gap: 4px; }
.check-block h3 { margin: 0 0 8px; font-size: 12.5px; color: var(--accent); letter-spacing: .02em; }
.check-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.check-queries { display: grid; gap: 6px; }
.check-queries code { display: block; padding: 6px 9px; border-radius: 8px; background: rgba(255, 255, 255, .04); color: #cfe6ea; font-size: 11px; line-height: 1.55; word-break: break-all; }
.check-source { display: grid; gap: 6px; padding: 10px 12px; border: 1px solid var(--hairline); border-radius: 10px; background: rgba(255, 255, 255, .02); }
.check-source-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.check-source-head strong { margin-right: 2px; font-size: 12.5px; }
.check-source-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; }
.check-error { color: #ff9c96; font-size: 11px; }
.quick-warning { color: #ffd08a; }
@media (max-width: 480px) {
  .collect-check-body { max-height: 58vh; }
  .check-queries code { font-size: 10.5px; }
}

/* ===== 来源产出与新鲜度（对标实时监控产品的“每源状态”） ===== */
.source-metrics { display: block; margin-top: 3px; color: #8fa3b3; font-size: 10.5px; letter-spacing: .01em; font-variant-numeric: tabular-nums; }
.source-output { display: inline-block; margin-left: 6px; padding: 1px 6px; border-radius: 999px; font-size: 9.5px; line-height: 1.5; white-space: nowrap; }
.source-output.warn { color: #ffd08a; background: rgba(255, 176, 74, .12); border: 1px solid rgba(255, 176, 74, .32); }
.evidence-only { color: #9fb6c9; background: rgba(159, 182, 201, .12); border: 1px solid rgba(159, 182, 201, .28); border-radius: 999px; padding: 0 6px; font-size: 10px; }
.source-item { display: grid; gap: 4px; }
.source-item .source-favorite-row { justify-self: start; }
.ingest-age { color: #8fd8c4 !important; background: rgba(69, 223, 177, .1) !important; }

/* ========================================================================
   视觉系统 v4 · 深空（Deep Space）
   目标：冷色深空底 + 极光氛围 + 玻璃质感 + 发丝级描边，冷静克制但有发光焦点。
   原则：只覆盖令牌与关键表面，不改任何结构与交互逻辑。
   ======================================================================== */
:root {
  --bg: #03060b;
  --bg-soft: #050a12;
  --panel: rgba(9, 17, 27, .74);
  --panel-solid: #08111b;
  --panel-raised: #0d1826;
  --ink: #e9f4f2;
  --muted: #8598a4;
  --line: rgba(139, 190, 184, .1);
  --line-strong: rgba(79, 240, 207, .32);
  --accent: #4ff0cf;
  --accent-strong: #16c8a2;
  --accent-soft: rgba(79, 240, 207, .085);
  --cyan: #58cdf2;
  --amber: #f5b567;
  --red: #ff6f68;
  --blue: #7aa8ff;
  --violet: #9488ff;
  --shadow: 0 44px 120px rgba(0, 0, 0, .55);
  --hairline: rgba(255, 255, 255, .05);
  --elev-1: 0 18px 44px rgba(0, 0, 0, .38);
  --elev-2: 0 34px 90px rgba(0, 0, 0, .5);
  --sheen: linear-gradient(120deg, rgba(255, 255, 255, .16), rgba(255, 255, 255, 0) 42%);
}

/* 1. 深空底 + 极光 + 颗粒 */
body {
  background:
    radial-gradient(120% 88% at 80% -12%, #0a1a25 0%, #060c14 44%, #03060b 100%) fixed,
    #03060b;
  font-feature-settings: "tnum" 0;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -4;
  pointer-events: none;
  background:
    radial-gradient(44% 36% at 90% 2%, rgba(79, 240, 207, .15), transparent 72%),
    radial-gradient(40% 38% at 2% 44%, rgba(148, 136, 255, .11), transparent 74%),
    radial-gradient(58% 42% at 52% 106%, rgba(88, 205, 242, .09), transparent 72%);
  filter: blur(4px);
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: .028;
  mix-blend-mode: screen;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
}
.ambient { filter: blur(140px); opacity: .16; }
.ambient-one { background: #4ff0cf; }
.ambient-two { background: #6b5cff; }
.grid-overlay {
  opacity: .5;
  background-image:
    linear-gradient(rgba(92, 150, 148, .055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(92, 150, 148, .055) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(120% 90% at 50% 0%, black 10%, transparent 78%);
  -webkit-mask-image: radial-gradient(120% 90% at 50% 0%, black 10%, transparent 78%);
}
::selection { background: rgba(79, 240, 207, .24); color: #f4fffd; }
* { scrollbar-color: rgba(79, 240, 207, .22) transparent; }
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-thumb { border-radius: 999px; background: rgba(79, 240, 207, .18); }
::-webkit-scrollbar-thumb:hover { background: rgba(79, 240, 207, .34); }

/* 2. 顶栏与品牌：金属光泽 + 胶囊导航 */
.topbar {
  min-height: 66px;
  border-bottom: 1px solid rgba(139, 190, 184, .08);
  background: linear-gradient(180deg, rgba(4, 9, 15, .9), rgba(4, 9, 15, .68));
  backdrop-filter: blur(26px) saturate(140%);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .04), 0 18px 44px rgba(0, 0, 0, .38);
}
.brand-mark {
  position: relative;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  border: 1px solid rgba(79, 240, 207, .3);
  background:
    radial-gradient(120% 120% at 30% 20%, rgba(79, 240, 207, .3), rgba(6, 16, 22, .9) 62%),
    linear-gradient(150deg, rgba(148, 136, 255, .18), transparent 60%);
  color: #9ffbe4;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18), 0 0 30px rgba(79, 240, 207, .16), 0 0 0 4px rgba(79, 240, 207, .03);
  text-shadow: 0 0 18px rgba(79, 240, 207, .55);
}
.brand strong { font-size: 14px; letter-spacing: .12em; text-transform: uppercase; }
.brand span { color: rgba(133, 152, 164, .9); font-size: 8.5px; letter-spacing: .24em; }
.primary-nav {
  gap: 2px;
  padding: 4px;
  border: 1px solid rgba(139, 190, 184, .08);
  border-radius: 999px;
  background: rgba(255, 255, 255, .022);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .035);
}
.primary-nav a {
  position: relative;
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 650;
  letter-spacing: .04em;
  color: rgba(168, 187, 194, .86);
}
.primary-nav a:hover { color: #f2fffd; background: rgba(255, 255, 255, .05); }
.primary-nav a.active {
  color: #061411;
  background: linear-gradient(140deg, #7ffbe0, #24d3ab 62%, #12b892);
  box-shadow: 0 6px 20px rgba(79, 240, 207, .22), inset 0 1px 0 rgba(255, 255, 255, .35);
}
.primary-nav a.active::after { display: none; }
.runtime-pill {
  border-color: rgba(139, 190, 184, .12);
  background: rgba(255, 255, 255, .03);
  color: #a9bec4;
  font-variant-numeric: tabular-nums;
}
.top-actions .button.ghost { border-color: rgba(139, 190, 184, .14); background: rgba(255, 255, 255, .028); }

/* 3. 页头与标题 */
.page-heading, .page-heading-compact, .hero {
  border: 1px solid rgba(139, 190, 184, .12);
  background:
    radial-gradient(90% 140% at 96% -20%, rgba(79, 240, 207, .16), transparent 58%),
    radial-gradient(70% 120% at 4% 120%, rgba(148, 136, 255, .1), transparent 62%),
    linear-gradient(150deg, rgba(13, 25, 37, .94), rgba(4, 9, 15, .96));
  box-shadow: var(--elev-1), inset 0 1px 0 rgba(255, 255, 255, .05);
}
.page-heading::before, .hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: var(--sheen);
  opacity: .5;
}
.page-heading::after {
  background: linear-gradient(90deg, rgba(79, 240, 207, .7), rgba(88, 205, 242, .28) 42%, transparent 76%);
}
h1 {
  background: linear-gradient(116deg, #f4fffd 0%, #c9f8ee 46%, #6fe6d0 72%, #58cdf2 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  letter-spacing: -.035em;
}
h1 em { color: var(--accent); -webkit-text-fill-color: var(--accent); text-shadow: 0 0 46px rgba(79, 240, 207, .35); }
.section-index, .eyebrow, .hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent);
  font-size: 9px;
  letter-spacing: .26em;
}
.section-index::before {
  content: "";
  width: 18px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent));
}
.page-heading p:not(.section-index), .hero > div > p { color: #9db2b8; }
.heading-facts span, .hero-tags span {
  border-color: rgba(139, 190, 184, .12);
  background: rgba(255, 255, 255, .028);
  color: #b4c8cd;
}

/* 4. 面板 / 指标卡：玻璃 + 发丝描边 + 顶部微光 */
.panel {
  position: relative;
  border: 1px solid rgba(139, 190, 184, .1);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .035), transparent 18%),
    var(--panel);
  backdrop-filter: blur(22px) saturate(130%);
  box-shadow: var(--elev-1), inset 0 1px 0 rgba(255, 255, 255, .05);
  border-radius: 16px;
}
.panel-header h2 { letter-spacing: -.005em; color: #eaf6f4; }
.stat {
  border: 1px solid rgba(139, 190, 184, .1);
  background:
    radial-gradient(120% 100% at 100% 0%, rgba(79, 240, 207, .1), transparent 58%),
    linear-gradient(160deg, rgba(12, 23, 35, .92), rgba(4, 9, 15, .94));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05), 0 16px 40px rgba(0, 0, 0, .3);
}
.stat::before {
  content: "";
  position: absolute;
  left: 16px;
  right: 16px;
  top: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(79, 240, 207, .55), transparent);
}
.stat::after { border-color: rgba(79, 240, 207, .1); }
.stat strong {
  background: linear-gradient(120deg, #f6fffd, #8ff0dc 66%, #58cdf2);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-variant-numeric: tabular-nums;
}
.stat span, .stat small { color: #8ea3aa; }

/* 5. 情报卡 / 文档卡 */
.alert-card {
  border: 1px solid rgba(255, 255, 255, .055);
  background: linear-gradient(180deg, rgba(255, 255, 255, .026), rgba(255, 255, 255, .008));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04);
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease, background .2s ease;
}
.alert-card:hover {
  transform: translateY(-1px);
  border-color: rgba(79, 240, 207, .24);
  background: linear-gradient(180deg, rgba(79, 240, 207, .05), rgba(255, 255, 255, .01));
  box-shadow: 0 16px 38px rgba(0, 0, 0, .34), inset 0 1px 0 rgba(255, 255, 255, .06);
}
.alert-card h3 { color: #eaf6f4; }
.alert-card.s0::before { box-shadow: 0 0 22px rgba(255, 111, 104, .5); }
.level {
  border-color: rgba(255, 255, 255, .1);
  background: rgba(255, 255, 255, .05);
  font-variant-numeric: tabular-nums;
}
.alert-meta span {
  background: rgba(255, 255, 255, .035);
  border: 1px solid rgba(255, 255, 255, .04);
  color: #93a8ae;
}
.document-card {
  border: 1px solid rgba(255, 255, 255, .055);
  background: linear-gradient(180deg, rgba(255, 255, 255, .024), rgba(255, 255, 255, .007));
  transition: border-color .2s ease, box-shadow .2s ease;
}
.document-card:hover { border-color: rgba(79, 240, 207, .2); box-shadow: 0 14px 34px rgba(0, 0, 0, .3); }
.document-tags span, .alert-meta span { letter-spacing: .02em; }
.list-empty {
  border: 1px dashed rgba(139, 190, 184, .16);
  background: rgba(255, 255, 255, .014);
  color: #93a8ae;
}

/* 6. 按钮 / 表单 / 弹窗 / 提示 */
.button {
  border-radius: 10px;
  letter-spacing: .04em;
  transition: transform .16s ease, box-shadow .2s ease, border-color .2s ease, background .2s ease, color .2s ease;
}
.button.primary {
  background: linear-gradient(140deg, #86ffe5, #29d6ae 58%, #0fb98f);
  color: #04140f;
  box-shadow: 0 10px 26px rgba(79, 240, 207, .22), inset 0 1px 0 rgba(255, 255, 255, .4);
}
.button.primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 38px rgba(79, 240, 207, .3), inset 0 1px 0 rgba(255, 255, 255, .45);
}
.button.secondary {
  border-color: rgba(88, 205, 242, .26);
  background: rgba(88, 205, 242, .1);
  color: #b8ecfc;
}
.button.ghost {
  border-color: rgba(139, 190, 184, .14);
  background: rgba(255, 255, 255, .03);
  color: #b7c9ce;
}
.button.ghost:hover { border-color: rgba(79, 240, 207, .34); background: rgba(79, 240, 207, .1); color: #c9fff2; }
.field input, .field select, .field textarea, input[type="search"], input[type="text"], input[type="number"], select, textarea {
  border-color: rgba(139, 190, 184, .14);
  background: rgba(3, 8, 13, .62);
  color: #e6f2f0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04);
}
.field input:focus, .field select:focus, .field textarea:focus, input:focus, select:focus, textarea:focus {
  border-color: rgba(79, 240, 207, .5);
  box-shadow: 0 0 0 3px rgba(79, 240, 207, .12), inset 0 1px 0 rgba(255, 255, 255, .05);
}
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid rgba(79, 240, 207, .75);
  outline-offset: 3px;
  box-shadow: 0 0 0 5px rgba(79, 240, 207, .1);
}
.app-dialog {
  border: 1px solid rgba(139, 190, 184, .16);
  background:
    radial-gradient(100% 70% at 100% 0%, rgba(79, 240, 207, .1), transparent 60%),
    #07101a;
  box-shadow: 0 60px 140px rgba(0, 0, 0, .72), inset 0 1px 0 rgba(255, 255, 255, .06);
}
.app-dialog::backdrop { background: rgba(1, 4, 9, .82); backdrop-filter: blur(14px) saturate(120%); }
.dialog-header { border-bottom-color: rgba(139, 190, 184, .1); background: rgba(7, 16, 26, .92); }
.toast {
  border-color: rgba(79, 240, 207, .32);
  background: rgba(7, 16, 26, .96);
  box-shadow: 0 22px 60px rgba(0, 0, 0, .55);
  color: #d8f7f0;
}
.level-chip.is-active, .page-size-segment button.active {
  color: #04140f;
  background: linear-gradient(140deg, #8bffe6, #2bd5ad 70%);
  box-shadow: 0 6px 18px rgba(79, 240, 207, .24);
}
.domain-chip, .check-chip, .filter-summary, .page-size-segment {
  border-color: rgba(139, 190, 184, .12);
}
.corroboration-badge.multi { color: #06170f; background: #9ffbe0; border-color: #57dfc1; }
.corroboration-badge.dual { color: #1d1302; background: #ffe1ab; border-color: #e8b96a; }
.corroboration-badge.single { color: #b9c7cc; background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .12); }

/* 7. 入场动效（尊重 reduced-motion） */
@keyframes v4-rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}
.page-main > section, .page-main > .workspace-grid, .page-main > .stats-grid { animation: v4-rise .46s cubic-bezier(.22, .8, .3, 1) both; }
.page-main > *:nth-child(2) { animation-delay: .05s; }
.page-main > *:nth-child(3) { animation-delay: .1s; }
.page-main > *:nth-child(4) { animation-delay: .15s; }
.page-main > *:nth-child(5) { animation-delay: .2s; }
@media (prefers-reduced-motion: reduce) {
  .page-main > * { animation: none !important; }
  .alert-card, .document-card, .button, .stat { transition: none !important; }
}

/* 8. 窄屏收口 */
@media (max-width: 960px) {
  .primary-nav { border-radius: 14px; background: rgba(255, 255, 255, .02); }
  .primary-nav a.active { box-shadow: none; }
}
@media (max-width: 480px) {
  .page-heading, .page-heading-compact, .hero { border-radius: 14px; }
  .stats-grid { gap: 8px; }
  .stat { min-height: 96px; padding: 13px; }
  .stat strong { font-size: 24px; }
}

/* ========================================================================
   视觉系统 v5 · 深空场景（Cinematic）
   v4 只换了配色；v5 补「场景」：星场、极光漂移、指针光斑、玻璃描边、
   HUD 细节与更大的字号层级。仍然只加样式，不动任何结构。
   ======================================================================== */
:root {
  --mx: 72%;
  --my: 6%;
  --font-mono: ui-monospace, "SF Mono", "JetBrains Mono", "Cascadia Code", Menlo, monospace;
}

/* 1. 天空：极光 + 指针光斑 + 暗角 + 颗粒 */
body::before {
  background:
    radial-gradient(34% 28% at var(--mx) var(--my), rgba(79, 240, 207, .16), transparent 68%),
    radial-gradient(44% 36% at 90% 2%, rgba(79, 240, 207, .16), transparent 72%),
    radial-gradient(40% 38% at 2% 44%, rgba(148, 136, 255, .13), transparent 74%),
    radial-gradient(58% 42% at 52% 106%, rgba(88, 205, 242, .1), transparent 72%);
}
body::after {
  opacity: .05;
  background-image:
    radial-gradient(circle at 50% 42%, transparent 38%, rgba(0, 0, 0, .55) 100%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 100% 100%, 140px 140px;
  mix-blend-mode: normal;
}
.ambient { opacity: .2; filter: blur(150px); will-change: transform; }
.ambient-one { animation: v5-drift-a 42s ease-in-out infinite alternate; }
.ambient-two { animation: v5-drift-b 58s ease-in-out infinite alternate; }
@keyframes v5-drift-a {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(-6vw, 5vh, 0) scale(1.14); }
}
@keyframes v5-drift-b {
  from { transform: translate3d(0, 0, 0) scale(1.06); }
  to { transform: translate3d(7vw, -6vh, 0) scale(1); }
}

/* 2. 星场与扫描光：低对比，只提供「深空」体感 */
.grid-overlay { z-index: -2; }
.grid-overlay::before {
  content: "";
  position: absolute;
  inset: -10%;
  background-image:
    radial-gradient(1px 1px at 12% 18%, rgba(226, 255, 250, .5), transparent 60%),
    radial-gradient(1px 1px at 78% 32%, rgba(191, 236, 255, .42), transparent 60%),
    radial-gradient(1.4px 1.4px at 44% 64%, rgba(255, 255, 255, .36), transparent 60%),
    radial-gradient(1px 1px at 88% 76%, rgba(196, 255, 244, .34), transparent 60%),
    radial-gradient(1px 1px at 26% 88%, rgba(255, 255, 255, .28), transparent 60%);
  background-size: 340px 340px, 420px 420px, 520px 520px, 300px 300px, 460px 460px;
  opacity: .5;
  animation: v5-stars 150s linear infinite;
}
@keyframes v5-stars {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(-120px, 90px, 0); }
}
.grid-overlay::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 38%, rgba(79, 240, 207, .05) 48%, rgba(88, 205, 242, .05) 52%, transparent 62%);
  background-size: 220% 100%;
  animation: v5-sweep 26s ease-in-out infinite;
  mask-image: linear-gradient(to bottom, black, transparent 72%);
  -webkit-mask-image: linear-gradient(to bottom, black, transparent 72%);
}
@keyframes v5-sweep {
  0%, 100% { background-position: 120% 0; }
  50% { background-position: -20% 0; }
}

/* 3. 玻璃描边：用掩膜做 1px 渐变边，替代死板的纯色 border */
.panel, .document-card, .alert-card { position: relative; isolation: isolate; }
.panel::before,
.document-card::before,
.alert-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(145deg, rgba(79, 240, 207, .4), rgba(148, 136, 255, .16) 42%, rgba(255, 255, 255, .04) 68%, transparent 88%);
  -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, linear-gradient(#000 0 0);
  mask-composite: exclude;
  pointer-events: none;
  opacity: .7;
  transition: opacity .24s ease;
}
.panel:hover::before, .alert-card:hover::after { opacity: 1; }

/* 4. 字号层级：从「仪表盘小字」推到「专业但不局促」 */
.page-heading h1, .page-heading-compact h1 { font-size: clamp(26px, 2.9vw, 40px); letter-spacing: -.03em; }
.panel-header h2 { font-size: 17px; font-weight: 640; }
.alert-card h3 { font-size: 14px; line-height: 1.5; font-weight: 660; }
.alert-summary { font-size: 12.5px; line-height: 1.75; }
.alert-meta span, .alert-reasons { font-size: 10.5px; }
.stat strong { font-size: clamp(30px, 3.2vw, 42px); }
.primary-nav a { font-size: 11px; }
.section-index, .eyebrow, .hero-kicker {
  font-family: var(--font-mono);
  letter-spacing: .3em;
  text-transform: uppercase;
}

/* 5. HUD 细节：面板序号菱形、指标角标、空态雷达 */
.panel-header h2::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 9px;
  vertical-align: 2px;
  transform: rotate(45deg);
  background: linear-gradient(135deg, #9ffbe4, #17c9a4);
  box-shadow: 0 0 12px rgba(79, 240, 207, .7), inset 0 1px 0 rgba(255, 255, 255, .6);
}
.heading-facts span::before {
  content: "";
  display: inline-block;
  width: 4px;
  height: 4px;
  margin-right: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px rgba(79, 240, 207, .8);
  vertical-align: 1px;
}
.list-empty { position: relative; overflow: hidden; }
.list-empty::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 220px;
  height: 220px;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(79, 240, 207, .16);
  border-radius: 50%;
  box-shadow: 0 0 0 44px rgba(79, 240, 207, .045), 0 0 0 88px rgba(79, 240, 207, .025);
  pointer-events: none;
}
.list-empty > * { position: relative; z-index: 1; }

/* 6. 卡面反射：左上冷光 + 底部压暗 */
.alert-card {
  background-image:
    radial-gradient(120% 90% at 0% 0%, rgba(79, 240, 207, .08), transparent 46%),
    linear-gradient(180deg, rgba(255, 255, 255, .03), rgba(6, 12, 18, .55));
}
.document-card, .source-item, .run-item, .report-item {
  background-image: radial-gradient(120% 90% at 0% 0%, rgba(148, 136, 255, .05), transparent 48%);
}
.stat {
  background-image:
    radial-gradient(130% 100% at 0% 0%, rgba(79, 240, 207, .1), transparent 52%),
    linear-gradient(160deg, rgba(13, 25, 38, .94), rgba(4, 9, 15, .96));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .07), 0 22px 50px rgba(0, 0, 0, .42);
}

/* 7. 主按钮光泽扫过（背景位移，不改结构） */
.button.primary {
  background-image:
    linear-gradient(140deg, #8bffe6, #29d6ae 56%, #0fb98f),
    linear-gradient(100deg, rgba(255, 255, 255, .55), transparent 42%);
  background-size: 100% 100%, 260% 100%;
  background-position: 0 0, 150% 0;
  background-blend-mode: screen;
  transition: background-position .55s ease, box-shadow .2s ease, transform .16s ease;
}
.button.primary:hover { background-position: 0 0, -30% 0; }

/* 8. 弹窗与浮层：顶部符印光 */
.app-dialog::before {
  content: "";
  position: absolute;
  top: 0;
  left: 18%;
  right: 18%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(79, 240, 207, .85), rgba(148, 136, 255, .5), transparent);
  pointer-events: none;
}
.dialog-header h2 { letter-spacing: .01em; }
.corroboration-popover, .toast {
  background-image: radial-gradient(120% 100% at 0% 0%, rgba(79, 240, 207, .09), transparent 62%);
}

/* 9. 动效降级 */
@media (prefers-reduced-motion: reduce) {
  .ambient-one, .ambient-two, .grid-overlay::before, .grid-overlay::after { animation: none !important; }
  body::before { transition: none; }
  .button.primary { transition: none; background-position: 0 0, 150% 0; }
}
/* 触屏小屏：大面积模糊与星场动画停掉，只保留静态氛围，避免掉帧（桌面窄面板仍保留） */
@media (max-width: 600px) and (hover: none) {
  .ambient-one, .ambient-two, .grid-overlay::before, .grid-overlay::after { animation: none !important; }
  .ambient { filter: blur(120px); opacity: .18; }
}

/* 11. 场景签名：页背景雷达弧 + 面板角标 */
.page-main { position: relative; }
.page-main::before {
  content: "";
  position: absolute;
  right: -70px;
  top: -60px;
  width: 340px;
  height: 340px;
  border-radius: 50%;
  border: 1px solid rgba(79, 240, 207, .08);
  box-shadow: 0 0 0 46px rgba(79, 240, 207, .022), 0 0 0 92px rgba(79, 240, 207, .013);
  pointer-events: none;
  z-index: -1;
}
.panel::after {
  content: "";
  position: absolute;
  inset: 9px;
  border-radius: 10px;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(79, 240, 207, .45), rgba(79, 240, 207, 0)) left top / 16px 1px no-repeat,
    linear-gradient(180deg, rgba(79, 240, 207, .45), rgba(79, 240, 207, 0)) left top / 1px 16px no-repeat,
    linear-gradient(270deg, rgba(79, 240, 207, .45), rgba(79, 240, 207, 0)) right bottom / 16px 1px no-repeat,
    linear-gradient(0deg, rgba(79, 240, 207, .45), rgba(79, 240, 207, 0)) right bottom / 1px 16px no-repeat;
  opacity: .55;
  transition: opacity .24s ease;
}
.panel:hover::after { opacity: 1; }
@media (max-width: 480px) {
  .page-main::before { right: -120px; top: -80px; width: 260px; height: 260px; }
  .panel::after { inset: 7px; }
}
@media (max-width: 480px) {
  .page-heading h1, .page-heading-compact h1 { font-size: 24px; }

  .panel-header h2 { font-size: 15.5px; }
  .alert-card h3 { font-size: 13.5px; }
  .alert-summary { font-size: 12px; }
  .stat strong { font-size: 26px; }
  .panel-header h2::before { margin-right: 7px; }
}


/* ========================================================================
   视觉系统 v6 · 冷酷仪式（Cold Ritual）
   方向：冰青 / 幽紫 / 品红三色冷光，巨型镂空字，旋转封印环，罗马式铭牌，
   以及更硬的光边与更深的黑。只加装饰层，不动数据与交互。
   ======================================================================== */
:root {
  --bg: #02040a;
  --bg-soft: #04070f;
  --panel: rgba(7, 13, 22, .76);
  --panel-solid: #060c15;
  --panel-raised: #0b1524;
  --ink: #e8f6fb;
  --muted: #7d93a6;
  --line: rgba(120, 190, 220, .1);
  --line-strong: rgba(111, 242, 255, .34);
  --accent: #6ff2ff;
  --accent-strong: #12c8e8;
  --accent-soft: rgba(111, 242, 255, .09);
  --cyan: #7ef9ff;
  --blue: #78a9ff;
  --violet: #9b8cff;
  --magenta: #ff6bd6;
  --amber: #ffc46b;
  --red: #ff5f7a;
  --shadow: 0 50px 140px rgba(0, 0, 0, .7);
}

/* 1. 更冷的天空 */
body {
  background:
    radial-gradient(120% 90% at 78% -14%, #071421 0%, #040a13 46%, #02040a 100%) fixed,
    #02040a;
}
body::before {
  background:
    radial-gradient(30% 26% at var(--mx) var(--my), rgba(111, 242, 255, .2), transparent 66%),
    radial-gradient(42% 34% at 92% 0%, rgba(111, 242, 255, .18), transparent 70%),
    radial-gradient(38% 34% at 0% 42%, rgba(155, 140, 255, .15), transparent 72%),
    radial-gradient(60% 44% at 54% 108%, rgba(255, 107, 214, .07), transparent 70%);
}
.ambient-one { background: #6ff2ff; }
.ambient-two { background: #7a5cff; }

/* 2. 仪式层：左侧刻度轨、旋转封印环、视口四角框 */
.ritual-layer { position: fixed; inset: 0; z-index: -1; pointer-events: none; }
.ritual-rail {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 38px;
  opacity: .5;
  background: repeating-linear-gradient(180deg, rgba(111, 242, 255, .24) 0 1px, transparent 1px 26px);
  border-right: 1px solid rgba(111, 242, 255, .07);
  mask-image: linear-gradient(180deg, transparent, #000 14%, #000 86%, transparent);
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 14%, #000 86%, transparent);
}
.ritual-seal {
  position: absolute;
  right: -190px;
  top: -210px;
  width: 580px;
  height: 580px;
  border-radius: 50%;
  background: conic-gradient(from 200deg,
    rgba(111, 242, 255, .6) 0deg,
    rgba(155, 140, 255, .28) 110deg,
    rgba(255, 107, 214, .22) 210deg,
    rgba(111, 242, 255, .6) 360deg);
  -webkit-mask: radial-gradient(closest-side, transparent 62%, #000 63%, #000 66%, transparent 67%);
  mask: radial-gradient(closest-side, transparent 62%, #000 63%, #000 66%, transparent 67%);
  opacity: .55;
  filter: blur(.5px) saturate(130%);
  will-change: transform;
  animation: v6-seal 76s linear infinite;
}
.ritual-seal::after {
  content: "";
  position: absolute;
  inset: 30px;
  border-radius: 50%;
  border: 1px dashed rgba(111, 242, 255, .25);
}
@keyframes v6-seal {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
.ritual-corners {
  position: absolute;
  inset: 10px;
  opacity: .5;
  background:
    linear-gradient(90deg, rgba(111, 242, 255, .5), transparent) left top / 22px 1px no-repeat,
    linear-gradient(180deg, rgba(111, 242, 255, .5), transparent) left top / 1px 22px no-repeat,
    linear-gradient(270deg, rgba(111, 242, 255, .5), transparent) right top / 22px 1px no-repeat,
    linear-gradient(180deg, rgba(111, 242, 255, .5), transparent) right top / 1px 22px no-repeat,
    linear-gradient(90deg, rgba(111, 242, 255, .5), transparent) left bottom / 22px 1px no-repeat,
    linear-gradient(0deg, rgba(111, 242, 255, .5), transparent) left bottom / 1px 22px no-repeat,
    linear-gradient(270deg, rgba(111, 242, 255, .5), transparent) right bottom / 22px 1px no-repeat,
    linear-gradient(0deg, rgba(111, 242, 255, .5), transparent) right bottom / 1px 22px no-repeat;
}

/* 3. 首页仪式序幕：贯穿整个界面的虚化水印（全局背景层，不占布局） */
.rite-scene {
  position: fixed;
  inset: 0;
  z-index: 1;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  pointer-events: none;
}
/* 巨型镂空字：铺满整屏、重度虚化，压在界面之上但不抢正文 */
.rite-word {
  display: block;
  font-family: var(--font-mono);
  font-weight: 800;
  line-height: .8;
  font-size: clamp(70px, 19.5vw, 340px);
  letter-spacing: .04em;
  white-space: nowrap;
  color: transparent;
  -webkit-text-stroke: clamp(1px, .08vw, 1.6px) rgba(111, 242, 255, .22);
  background: linear-gradient(180deg, rgba(111, 242, 255, .2), rgba(155, 140, 255, .11) 58%, rgba(255, 107, 214, .06) 84%, transparent 100%);
  -webkit-background-clip: text;
  background-clip: text;
  opacity: .6;
  filter: blur(clamp(6px, .95vw, 16px));
  text-shadow: 0 0 110px rgba(111, 242, 255, .12);
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 9%, #000 91%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0%, #000 9%, #000 91%, transparent 100%);
}
.rite-scene::before { display: none; }
.rite-scene::after {
  content: "ACCESS LEVEL · OMEGA   /   SIGNAL INTEGRITY 99.2%   /   CHANNEL 0x1F";
  display: none;
  position: absolute;
  left: 0;
  right: 0;
  bottom: clamp(14px, 3vh, 34px);
  font: 600 8.5px/1 var(--font-mono);
  letter-spacing: .34em;
  text-align: center;
  color: rgba(143, 233, 255, .42);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ritual-intro .rite-scene::after { display: block; }

/* 4. 三色冷光：标题、导航、按钮、数字 */
h1 {
  background: linear-gradient(112deg, #f6feff 0%, #c8f4ff 40%, #6ff2ff 70%, #9b8cff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 0 70px rgba(111, 242, 255, .22), 0 0 140px rgba(155, 140, 255, .14);
}
h1 em {
  color: var(--accent);
  -webkit-text-fill-color: var(--accent);
  text-shadow: 0 0 28px rgba(111, 242, 255, .55), 0 0 70px rgba(155, 140, 255, .35);
}
.stat strong {
  background: linear-gradient(120deg, #f6feff, #9df7ff 58%, #6ff2ff 82%, #9b8cff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 0 42px rgba(111, 242, 255, .25);
}
.primary-nav a.active {
  color: #02121a;
  background: linear-gradient(140deg, #a5f8ff, #3cd9f5 58%, #4f8cff);
  box-shadow: 0 8px 26px rgba(111, 242, 255, .3), inset 0 1px 0 rgba(255, 255, 255, .5);
}
.primary-nav a:hover { color: #eafcff; }
.button.primary {
  background-image:
    linear-gradient(140deg, #a5f8ff, #35d8f0 56%, #1aa8e0),
    linear-gradient(100deg, rgba(255, 255, 255, .6), transparent 42%);
  color: #04121a;
  box-shadow: 0 12px 34px rgba(111, 242, 255, .26), inset 0 1px 0 rgba(255, 255, 255, .5);
}
.button.secondary {
  border-color: rgba(155, 140, 255, .35);
  background: rgba(155, 140, 255, .12);
  color: #d9d1ff;
}
.button.ghost:hover { border-color: rgba(111, 242, 255, .45); background: rgba(111, 242, 255, .12); color: #d8fdff; }
.level-chip.is-active, .page-size-segment button.active {
  color: #04121a;
  background: linear-gradient(140deg, #a5f8ff, #3cd9f5 70%);
  box-shadow: 0 8px 22px rgba(111, 242, 255, .3);
}
.brand-mark {
  color: #d8fdff;
  border-color: rgba(111, 242, 255, .42);
  background:
    radial-gradient(120% 120% at 28% 18%, rgba(111, 242, 255, .38), rgba(4, 10, 18, .95) 62%),
    linear-gradient(150deg, rgba(155, 140, 255, .26), transparent 58%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .24), 0 0 34px rgba(111, 242, 255, .26), 0 0 0 4px rgba(111, 242, 255, .05);
  text-shadow: 0 0 20px rgba(111, 242, 255, .8);
}
.section-index, .eyebrow, .hero-kicker { color: #9df7ff; }
.section-index::before { background: linear-gradient(90deg, transparent, #6ff2ff); }

/* 5. 更硬的玻璃边：青 → 紫 → 品红的棱边 */
.panel::before,
.document-card::before,
.alert-card::after {
  background: linear-gradient(145deg, rgba(111, 242, 255, .5), rgba(155, 140, 255, .22) 40%, rgba(255, 107, 214, .12) 62%, transparent 88%);
  opacity: .8;
}
.panel:hover::before, .alert-card:hover::after { opacity: 1; }
.panel::after {
  background:
    linear-gradient(90deg, rgba(111, 242, 255, .7), rgba(111, 242, 255, 0)) left top / 18px 1px no-repeat,
    linear-gradient(180deg, rgba(111, 242, 255, .7), rgba(111, 242, 255, 0)) left top / 1px 18px no-repeat,
    linear-gradient(270deg, rgba(255, 107, 214, .6), rgba(255, 107, 214, 0)) right bottom / 18px 1px no-repeat,
    linear-gradient(0deg, rgba(255, 107, 214, .6), rgba(255, 107, 214, 0)) right bottom / 1px 18px no-repeat;
  opacity: .75;
}
.page-heading, .page-heading-compact, .hero {
  border-color: rgba(111, 242, 255, .16);
  background:
    radial-gradient(80% 130% at 98% -24%, rgba(111, 242, 255, .2), transparent 56%),
    radial-gradient(66% 120% at 0% 128%, rgba(155, 140, 255, .16), transparent 60%),
    radial-gradient(60% 80% at 100% 120%, rgba(255, 107, 214, .09), transparent 62%),
    linear-gradient(150deg, rgba(10, 20, 32, .95), rgba(2, 5, 11, .97));
  box-shadow: 0 34px 90px rgba(0, 0, 0, .6), inset 0 1px 0 rgba(255, 255, 255, .07);
}
.page-heading::after {
  background: linear-gradient(90deg, rgba(111, 242, 255, .8), rgba(155, 140, 255, .4) 46%, rgba(255, 107, 214, .18) 62%, transparent 84%);
}
.alert-card { background-image: radial-gradient(120% 90% at 0% 0%, rgba(111, 242, 255, .1), transparent 46%), linear-gradient(180deg, rgba(255, 255, 255, .03), rgba(3, 7, 12, .6)); }
.alert-card:hover { border-color: rgba(111, 242, 255, .3); box-shadow: 0 20px 48px rgba(0, 0, 0, .5), 0 0 40px rgba(111, 242, 255, .08); }
.panel-header h2::before { background: linear-gradient(135deg, #b8fbff, #2fd6f0); box-shadow: 0 0 14px rgba(111, 242, 255, .85), inset 0 1px 0 rgba(255, 255, 255, .7); }
.corroboration-badge.multi { color: #021418; background: #a5f8ff; border-color: #4fe0f7; }
.corroboration-badge.dual { color: #1a1204; background: #ffe1a8; border-color: #eac06f; }
.corroboration-badge.single { color: #c6d3dc; background: rgba(255, 255, 255, .07); border-color: rgba(255, 255, 255, .14); }

/* 6. 弹窗与浮层：符印光更强 */
.app-dialog {
  border-color: rgba(111, 242, 255, .2);
  background:
    radial-gradient(90% 60% at 100% 0%, rgba(111, 242, 255, .14), transparent 58%),
    radial-gradient(70% 50% at 0% 100%, rgba(155, 140, 255, .1), transparent 60%),
    #050b14;
  box-shadow: 0 70px 180px rgba(0, 0, 0, .8), inset 0 1px 0 rgba(255, 255, 255, .07);
}
.app-dialog::before {
  background: linear-gradient(90deg, transparent, rgba(111, 242, 255, .95), rgba(255, 107, 214, .6), transparent);
}
.dialog-header { border-bottom-color: rgba(111, 242, 255, .12); }
.toast { border-color: rgba(111, 242, 255, .4); color: #d8fdff; }

/* 7. 降级与移动端 */
@media (prefers-reduced-motion: reduce) {
  .ritual-seal { animation: none !important; }
}
@media (max-width: 960px) {
  .ritual-rail { display: none; }
  .ritual-seal { right: -260px; top: -240px; opacity: .4; }
}
@media (max-width: 600px) and (hover: none) {
  .ritual-seal { animation: none !important; }
}
@media (max-width: 480px) {
  .ritual-corners { inset: 6px; }
  .ritual-seal { right: -300px; top: -260px; width: 520px; height: 520px; }
  .rite-word { font-size: clamp(56px, 19vw, 108px); filter: blur(clamp(4px, 1.4vw, 9px)); }
  .rite-scene::after { letter-spacing: .18em; font-size: 8px; }
}

/* 6.1 每页都有的仪式细节：顶栏扫描光、铭牌数字、徽标冷光 */
.topbar { position: sticky; }
.topbar::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(111, 242, 255, .9), rgba(155, 140, 255, .75), rgba(255, 107, 214, .55), transparent);
  background-size: 220% 100%;
  opacity: .7;
  animation: v6-scan 11s linear infinite;
  pointer-events: none;
}
@keyframes v6-scan {
  from { background-position: 130% 0; }
  to { background-position: -130% 0; }
}
.heading-facts b { color: var(--accent); text-shadow: 0 0 14px rgba(111, 242, 255, .5); }

/* ========================================================================
   视觉系统 v7 · 动态态势 / 登录封印 / 开场仪式
   ======================================================================== */

/* 1. 数字孪生态势板 */
.situation-board .panel-header { align-items: flex-start; }
.board-live {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 10px;
  border: 1px solid rgba(111, 242, 255, .22);
  border-radius: 999px;
  background: rgba(111, 242, 255, .06);
  color: #b8f4ff;
  font: 600 10px/1.4 var(--font-mono);
  letter-spacing: .16em;
}
.board-live time { color: #e8f6fb; font-variant-numeric: tabular-nums; letter-spacing: .06em; }
.board-grid {
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
  gap: 14px;
  margin-bottom: 14px;
}
.board-radar { position: relative; }
.board-radar svg { display: block; width: 100%; height: auto; }
.radar-sweep { transform-origin: 120px 120px; animation: radar-spin 6.5s linear infinite; }
@keyframes radar-spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
.radar-blip { fill: #7ef9ff; filter: drop-shadow(0 0 6px rgba(111, 242, 255, .9)); animation: radar-blip 2.6s ease-in-out infinite; }
.radar-blip:nth-child(1) { animation-delay: 0s; }
.radar-blip:nth-child(2) { animation-delay: .22s; }
.radar-blip:nth-child(3) { animation-delay: .44s; }
.radar-blip:nth-child(4) { animation-delay: .66s; }
.radar-blip:nth-child(5) { animation-delay: .88s; }
.radar-blip:nth-child(6) { animation-delay: 1.1s; }
.radar-blip:nth-child(7) { animation-delay: 1.32s; }
.radar-blip:nth-child(8) { animation-delay: 1.54s; }
.radar-blip:nth-child(9) { animation-delay: 1.76s; }
.radar-blip:nth-child(10) { animation-delay: 1.98s; }
.radar-blip:nth-child(11) { animation-delay: 2.2s; }
.radar-blip:nth-child(12) { animation-delay: 2.42s; }
.radar-blip.s0 { fill: #ff5f7a; filter: drop-shadow(0 0 8px rgba(255, 95, 122, .95)); }
.radar-blip.s1 { fill: #ffc46b; filter: drop-shadow(0 0 7px rgba(255, 196, 107, .85)); }
@keyframes radar-blip {
  0%, 100% { opacity: .45; }
  45% { opacity: 1; }
}
.board-radar-meta {
  position: absolute;
  left: 50%;
  bottom: 6px;
  transform: translateX(-50%);
  display: grid;
  justify-items: center;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(4, 10, 17, .78);
  border: 1px solid rgba(111, 242, 255, .18);
  pointer-events: none;
}
.board-radar-meta strong { color: #d8fdff; font: 700 18px/1 var(--font-mono); }
.board-radar-meta span { color: #7d9398; font-size: 8.5px; letter-spacing: .22em; }
.board-counters { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.board-counter {
  position: relative;
  overflow: hidden;
  display: grid;
  gap: 2px;
  padding: 12px 13px;
  border: 1px solid rgba(111, 242, 255, .14);
  border-radius: 12px;
  background:
    radial-gradient(120% 100% at 0% 0%, rgba(111, 242, 255, .1), transparent 52%),
    linear-gradient(160deg, rgba(9, 20, 32, .9), rgba(3, 7, 13, .92));
}
.board-counter.pink { border-color: rgba(255, 95, 122, .2); background-image: radial-gradient(120% 100% at 0% 0%, rgba(255, 95, 122, .12), transparent 52%), linear-gradient(160deg, rgba(24, 9, 14, .9), rgba(6, 3, 6, .92)); }
.board-counter.violet { border-color: rgba(155, 140, 255, .2); background-image: radial-gradient(120% 100% at 0% 0%, rgba(155, 140, 255, .12), transparent 52%), linear-gradient(160deg, rgba(14, 11, 30, .9), rgba(4, 3, 10, .92)); }
.board-counter-label { color: #8fa3ad; font-size: 9.5px; letter-spacing: .18em; }
.board-counter strong {
  color: #e8f6fb;
  font: 800 30px/1.1 var(--font-mono);
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 22px rgba(111, 242, 255, .45);
}
.board-counter.pink strong { text-shadow: 0 0 22px rgba(255, 95, 122, .5); }
.board-counter.violet strong { text-shadow: 0 0 22px rgba(155, 140, 255, .5); }
.board-counter-hint { color: #6f858d; font-size: 9px; }
.board-counter-scan {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent, rgba(111, 242, 255, .16), transparent);
  transform: translateY(-100%);
  animation: counter-scan 5.5s ease-in-out infinite;
  pointer-events: none;
}
.board-counter.pink .board-counter-scan { background: linear-gradient(180deg, transparent, rgba(255, 95, 122, .16), transparent); }
@keyframes counter-scan {
  0%, 70% { transform: translateY(-100%); }
  100% { transform: translateY(100%); }
}

/* 2. 播报带 */
.board-ticker {
  position: relative;
  overflow: hidden;
  margin-top: 12px;
  padding: 9px 0;
  border-top: 1px solid rgba(111, 242, 255, .12);
  border-bottom: 1px solid rgba(111, 242, 255, .12);
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}
.board-ticker-track {
  display: flex;
  gap: 26px;
  width: max-content;
  /* 速率按「阅读舒适」定：内容宽度约 1 万像素，64s 一圈 ≈ 78 px/s（原来 22s ≈ 228 px/s 太快） */
  animation: ticker-run 64s linear infinite;
  will-change: transform;
}
@keyframes ticker-run {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #b6c9d1;
  font-size: 11px;
  white-space: nowrap;
}
.ticker-item b {
  padding: 0 5px;
  border-radius: 4px;
  font: 700 9px/1.6 var(--font-mono);
  letter-spacing: .06em;
  color: #04121a;
  background: #7ef9ff;
}
.ticker-item b.s0 { background: #ff5f7a; color: #1d0508; }
.ticker-item b.s1 { background: #ffc46b; color: #1d1204; }
.ticker-item i { color: #6f858d; font-size: 9.5px; font-style: normal; }
.ticker-item::after { content: "◆"; margin-left: 18px; color: rgba(111, 242, 255, .35); font-size: 7px; }

/* 3. 分类网格在态势板里的形态 */
.situation-board .classification-grid { margin-top: 4px; }
.situation-board .classification-card { border-color: rgba(111, 242, 255, .12); background: linear-gradient(180deg, rgba(255, 255, 255, .022), transparent 60%); }
.situation-board .metric-row progress { accent-color: #6ff2ff; }

/* 4. 登录封印仪式 */
.login-layer { background: radial-gradient(90% 70% at 50% 40%, rgba(6, 20, 30, .92), rgba(2, 4, 10, .96)); backdrop-filter: blur(10px) saturate(120%); }
.login-ritual { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; }
.login-ring {
  position: absolute;
  width: min(560px, 94vw);
  height: min(560px, 94vw);
  overflow: visible;
}
.login-ring-track, .login-ring-inner { fill: none; stroke: rgba(111, 242, 255, .12); stroke-width: 1; }
.login-ring-arm {
  fill: none;
  stroke: #6ff2ff;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-dasharray: 1118;
  stroke-dashoffset: 1118;
  transform-origin: 200px 200px;
  filter: drop-shadow(0 0 10px rgba(111, 242, 255, .7));
  animation: login-draw 2.4s cubic-bezier(.2, .8, .2, 1) forwards, login-turn 68s linear infinite;
}
.login-ring-arm-small {
  stroke: rgba(155, 140, 255, .85);
  stroke-width: 1.2;
  stroke-dasharray: 918;
  stroke-dashoffset: 918;
  animation: login-draw-small 2.8s cubic-bezier(.2, .8, .2, 1) .2s forwards, login-turn-rev 46s linear infinite;
}
@keyframes login-draw { to { stroke-dashoffset: 0; } }
@keyframes login-draw-small { to { stroke-dashoffset: 0; } }
@keyframes login-turn { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@keyframes login-turn-rev { from { transform: rotate(0deg); } to { transform: rotate(-360deg); } }
.login-wordmark {
  position: absolute;
  top: calc(50% - min(300px, 50vw));
  font: 800 clamp(30px, 6vw, 58px)/1 var(--font-mono);
  letter-spacing: .14em;
  color: transparent;
  -webkit-text-stroke: 1px rgba(111, 242, 255, .5);
  text-shadow: 0 0 40px rgba(111, 242, 255, .25);
}
.login-caption {
  position: absolute;
  top: calc(50% + min(270px, 45vw));
  font: 600 9px/1 var(--font-mono);
  letter-spacing: .34em;
  color: rgba(155, 140, 255, .8);
}
.login-card {
  position: relative;
  z-index: 1;
  border-color: rgba(111, 242, 255, .32);
  background: linear-gradient(150deg, rgba(8, 18, 28, .96), rgba(3, 7, 13, .98));
  box-shadow: 0 40px 120px rgba(0, 0, 0, .8), 0 0 60px rgba(111, 242, 255, .1), inset 0 1px 0 rgba(255, 255, 255, .08);
  backdrop-filter: blur(6px);
}
.login-corner {
  position: absolute;
  width: 26px;
  height: 26px;
  border: 1px solid rgba(111, 242, 255, .45);
}
.login-corner.tl { top: 7%; left: 7%; border-right: 0; border-bottom: 0; }
.login-corner.tr { top: 7%; right: 7%; border-left: 0; border-bottom: 0; }
.login-corner.bl { bottom: 7%; left: 7%; border-right: 0; border-top: 0; }
.login-corner.br { bottom: 7%; right: 7%; border-left: 0; border-top: 0; }

/* 5. 首页开场：封印展开 + 铭文逐字点亮（3.2s 后自动收起） */
.ritual-intro .rite-word span {
  display: inline-block;
  background: inherit;
  -webkit-background-clip: text;
  background-clip: text;
  opacity: 0;
  transform: translateY(14px) scale(1.06);
  animation: intro-letter .55s cubic-bezier(.2, .8, .2, 1) forwards;
}
.ritual-intro .rite-word span:nth-child(1) { animation-delay: 0s; }
.ritual-intro .rite-word span:nth-child(2) { animation-delay: .11s; }
.ritual-intro .rite-word span:nth-child(3) { animation-delay: .22s; }
.ritual-intro .rite-word span:nth-child(4) { animation-delay: .33s; }
.ritual-intro .rite-word span:nth-child(5) { animation-delay: .44s; }
.ritual-intro .rite-word span:nth-child(6) { animation-delay: .55s; }
.ritual-intro .rite-word span:nth-child(7) { animation-delay: .66s; }
.ritual-intro .rite-word span:nth-child(8) { animation-delay: .77s; }
.ritual-intro .rite-word span:nth-child(n+9) { animation-delay: .88s; }
@keyframes intro-letter {
  to { opacity: 1; transform: none; }
}
.ritual-intro .ritual-seal { animation: v6-seal 76s linear infinite, intro-seal 2.6s cubic-bezier(.16, .9, .2, 1) both; }
@keyframes intro-seal {
  from { transform: scale(.55) rotate(-40deg); opacity: 0; }
  60% { opacity: 1; }
  to { transform: scale(1) rotate(0deg); opacity: .55; }
}
.ritual-intro .site-glyph-gear { opacity: 1; }
.ritual-intro .rite-scene::after { animation: intro-caption 1.2s ease-out 1.15s both; }
@keyframes intro-caption {
  from { opacity: 0; letter-spacing: .6em; }
  to { opacity: 1; letter-spacing: .34em; }
}
.ritual-intro .topbar { animation: intro-bar .8s ease-out both; }
@keyframes intro-bar {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: none; }
}

/* 6. 移动端与降级 */
@media (max-width: 720px) {
  .board-grid { grid-template-columns: minmax(0, 1fr); }
  .board-radar { max-width: 260px; margin: 0 auto; }
  .board-counter strong { font-size: 26px; }
}
@media (max-width: 480px) {
  .login-wordmark { top: calc(50% - min(210px, 42vw)); font-size: 30px; }
  .login-caption { top: calc(50% + min(190px, 38vw)); letter-spacing: .2em; font-size: 8px; }
  .login-ring { width: min(420px, 96vw); height: min(420px, 96vw); }
  .board-live { font-size: 9px; padding: 4px 8px; }
  .ticker-item { font-size: 10.5px; }
}
@media (prefers-reduced-motion: reduce) {
  .radar-sweep, .radar-blip, .board-ticker-track, .board-counter-scan { animation: none !important; }
  .login-ring-arm, .login-ring-arm-small { animation: none !important; stroke-dashoffset: 0; }
  .ritual-intro .rite-word span, .ritual-intro .ritual-seal, .ritual-intro .rite-scene::after, .ritual-intro .topbar { animation: none !important; opacity: 1; }

}
.heading-facts span { border-color: rgba(111, 242, 255, .16); background: rgba(111, 242, 255, .04); }
.brand:hover .brand-mark {
  border-color: rgba(255, 107, 214, .5);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3), 0 0 40px rgba(111, 242, 255, .4), 0 0 70px rgba(255, 107, 214, .25), 0 0 0 4px rgba(111, 242, 255, .06);
}
.live-dot { box-shadow: 0 0 0 5px rgba(111, 242, 255, .1), 0 0 20px rgba(111, 242, 255, .8); }
@media (prefers-reduced-motion: reduce) {
  .topbar::after { animation: none; }
}


/* ========================================================================
   视觉系统 v8 · 数字孪生态势大屏（数据库实时聚合）
   ======================================================================== */
.situation-board { display: grid; gap: 14px; position: relative; overflow: hidden; isolation: isolate; }
/* 板级常驻氛围：极光缓慢旋转 + 下行扫描线，让「情报分类态势」本身就在动。
   全屏（is-theater）另有更强的一层，这里只做低强度底噪，不抢数据可读性。 */
.situation-board::before {
  content: "";
  position: absolute;
  inset: -30%;
  z-index: 0;
  pointer-events: none;
  background: conic-gradient(from 0deg,
    rgba(111, 242, 255, .13), transparent 42deg,
    rgba(155, 140, 255, .13) 98deg, transparent 152deg,
    rgba(255, 107, 214, .09) 212deg, transparent 270deg,
    rgba(111, 242, 255, .13) 320deg, transparent 352deg);
  filter: blur(38px);
  opacity: .72;
  animation: board-aurora 42s linear infinite;
}
.situation-board::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    repeating-linear-gradient(180deg, rgba(111, 242, 255, .032) 0 1px, transparent 1px 5px),
    linear-gradient(180deg, transparent 0%, rgba(111, 242, 255, .07) 50%, transparent 100%);
  background-size: 100% 100%, 100% 240%;
  background-position: 0 0, 0 -120%;
  opacity: .7;
  animation: board-scan 9s linear infinite;
}
.situation-board > * { position: relative; z-index: 2; }
/* 标题区流光：一条细光沿标题下缘缓慢巡游。 */
.situation-board .panel-header { position: relative; }
.situation-board .panel-header::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -7px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(111, 242, 255, .85), transparent);
  background-size: 30% 100%;
  background-repeat: no-repeat;
  animation: edge-run 7s linear infinite;
  pointer-events: none;
}
/* 每次按新数据重绘时整板扫一遍，强化「指标在实时流动」。 */
.situation-board.is-refreshing::after { animation: board-scan 1.2s linear 1; opacity: .8; }
/* 24 小时信号流：扫描光带与峰值脉冲原本只在全屏模式有，这里补到常态，让波形「在流动」。 */
.board-trend { position: relative; overflow: hidden; }
.board-trend::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 18%;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(111, 242, 255, .13), transparent);
  animation: trend-sweep 7.5s linear infinite;
}
/* 折线流动：只让「辉光层」变成沿曲线跑的光段，实线仍在下面保证可读。 */
.board-trend .signal-line-glow {
  filter: drop-shadow(0 0 6px rgba(111, 242, 255, .95));
  animation: signal-glow-breathe 4.4s ease-in-out infinite;
}
@keyframes signal-glow-breathe {
  0%, 100% { stroke-opacity: .13; }
  50% { stroke-opacity: .6; }
}
/* 折线本体呼吸：线宽缓慢起伏，两条线错峰，像在呼吸而不是闪烁。 */
.board-trend .signal-line.alert { animation: signal-line-breathe 4.4s ease-in-out infinite; }
.board-trend .signal-line.doc { animation: signal-line-breathe 4.4s ease-in-out 2.2s infinite; }
@keyframes signal-line-breathe {
  0%, 100% { stroke-width: 2.2; }
  50% { stroke-width: 3.1; }
}
/* 峰值环呼吸（SVG 圆做 scale 必须 transform-box: fill-box） */
.board-trend .signal-marker-ring {
  transform-box: fill-box;
  transform-origin: center;
  animation: signal-ring-breathe 2.8s ease-in-out infinite;
}
@keyframes signal-ring-breathe {
  0%, 100% { opacity: .3; transform: scale(.86); }
  50% { opacity: 1; transform: scale(1.2); }
}
/* 面积层呼吸更明显，让波形的「体量」也在变。 */
@keyframes signal-area-pulse { 0%, 100% { opacity: .55; } 50% { opacity: .98; } }
.board-trend .signal-area { animation: signal-area-pulse 4.2s ease-in-out infinite; }
/* KPI 卡：顶部内高光 + 外辉光，hover 提亮（原来只有描边，缺材质感）。 */
.board-kpi {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .12),
    inset 0 24px 32px -24px rgba(111, 242, 255, .45),
    0 16px 38px rgba(0, 0, 0, .42),
    0 0 0 1px rgba(111, 242, 255, .08);
  transition: box-shadow .25s ease, border-color .25s ease, transform .25s ease;
}
.board-kpi:hover {
  border-color: rgba(111, 242, 255, .42);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .18),
    inset 0 30px 38px -24px rgba(111, 242, 255, .62),
    0 20px 48px rgba(0, 0, 0, .5),
    0 0 30px rgba(111, 242, 255, .28);
  transform: translateY(-2px);
}
@media (prefers-reduced-motion: reduce) {
  .board-trend::after,
  .board-trend .signal-line-glow,
  .board-trend .signal-area { animation: none !important; opacity: .8; }
  .board-kpi { transition: none; }
}
@media (prefers-reduced-motion: reduce) {
  .situation-board::before,
  .situation-board::after,
  .situation-board .panel-header::after { animation: none !important; }
  .situation-board::after { opacity: .32; }
}
.situation-board .panel-header { align-items: flex-start; }
.board-live em {
  font-style: normal;
  color: #6f858d;
  font-size: 9px;
  letter-spacing: .06em;
}

/* KPI 条 */
.board-kpis {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}
.board-kpi {
  position: relative;
  overflow: hidden;
  display: grid;
  gap: 2px;
  padding: 11px 12px 10px;
  border: 1px solid rgba(111, 242, 255, .16);
  border-radius: 12px;
  background:
    radial-gradient(120% 100% at 0% 0%, rgba(111, 242, 255, .1), transparent 54%),
    linear-gradient(160deg, rgba(9, 20, 32, .92), rgba(3, 7, 13, .94));
}
.board-kpi.pink { border-color: rgba(255, 95, 122, .22); background-image: radial-gradient(120% 100% at 0% 0%, rgba(255, 95, 122, .13), transparent 54%), linear-gradient(160deg, rgba(26, 9, 15, .92), rgba(6, 3, 7, .94)); }
.board-kpi.violet { border-color: rgba(155, 140, 255, .22); background-image: radial-gradient(120% 100% at 0% 0%, rgba(155, 140, 255, .13), transparent 54%), linear-gradient(160deg, rgba(14, 11, 32, .92), rgba(4, 3, 11, .94)); }
.board-kpi-label { color: #8fa3ad; font-size: 9.5px; letter-spacing: .16em; }
.board-kpi-value { display: flex; align-items: baseline; gap: 4px; }
.board-kpi-value strong {
  color: #eaf8fd;
  font: 800 26px/1.15 var(--font-mono);
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 20px rgba(111, 242, 255, .45);
}
.board-kpi.pink .board-kpi-value strong { text-shadow: 0 0 20px rgba(255, 95, 122, .5); }
.board-kpi.violet .board-kpi-value strong { text-shadow: 0 0 20px rgba(155, 140, 255, .5); }
.board-kpi-value i { color: #6f858d; font-size: 9px; font-style: normal; }
.board-kpi-hint { color: #6f858d; font-size: 9px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.board-kpi-scan {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent, rgba(111, 242, 255, .14), transparent);
  transform: translateY(-100%);
  animation: counter-scan 6s ease-in-out infinite;
  pointer-events: none;
}
.board-kpi.pink .board-kpi-scan { background: linear-gradient(180deg, transparent, rgba(255, 95, 122, .14), transparent); }
.board-kpi.violet .board-kpi-scan { background: linear-gradient(180deg, transparent, rgba(155, 140, 255, .14), transparent); }

/* 主区：等级 + 24h 信号流 */
.board-main { display: grid; grid-template-columns: minmax(260px, .85fr) minmax(0, 1.55fr); gap: 12px; }
/* 等级构成与 24h 信号流等高：左面板跟随行高拉伸，内容上下分布，避免出现空块 */
.situation-board .board-main { align-items: stretch; }
.situation-board .board-main > .board-block:first-child { align-content: start; }
.situation-board .board-main > .board-block:first-child .board-mix { margin-top: auto; }
.board-lower { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.board-block {
  display: grid;
  gap: 10px;
  align-content: start;
  padding: 12px 13px;
  border: 1px solid rgba(111, 242, 255, .12);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .022), rgba(255, 255, 255, .004));
}
.board-block > header { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.board-block h3 { margin: 0; font-size: 11.5px; font-weight: 700; letter-spacing: .1em; color: #cfe6ec; }
.board-block > header span { color: #6f858d; font-size: 9.5px; font-variant-numeric: tabular-nums; }
.board-legend { display: inline-flex; align-items: center; gap: 5px; }
.board-legend .lg { width: 7px; height: 7px; border-radius: 2px; display: inline-block; }
.board-legend .lg-alert { background: #6ff2ff; box-shadow: 0 0 8px rgba(111, 242, 255, .7); }
.board-legend .lg-doc { background: #9b8cff; margin-left: 6px; box-shadow: 0 0 8px rgba(155, 140, 255, .6); }

/* 等级构成 */
.board-levels { display: grid; gap: 7px; }
.lvl-row { display: grid; grid-template-columns: 34px minmax(0, 1fr) 34px 42px; align-items: center; gap: 8px; }
.lvl-tag {
  display: inline-grid;
  place-items: center;
  height: 19px;
  border-radius: 5px;
  font: 700 9.5px/1 var(--font-mono);
  letter-spacing: .06em;
  border: 1px solid rgba(255, 255, 255, .14);
  background: rgba(255, 255, 255, .05);
  color: #cfe6ec;
}
.lvl-row.s0 .lvl-tag { color: #ffd4da; border-color: rgba(255, 95, 122, .45); background: rgba(255, 95, 122, .16); }
.lvl-row.s1 .lvl-tag { color: #ffe6bd; border-color: rgba(255, 196, 107, .45); background: rgba(255, 196, 107, .14); }
.lvl-row.s2 .lvl-tag { color: #cdefff; border-color: rgba(111, 242, 255, .4); background: rgba(111, 242, 255, .12); }
.lvl-row b { color: #e6f4f8; font: 700 12px/1 var(--font-mono); text-align: right; font-variant-numeric: tabular-nums; }
.lvl-row i { color: #7d9398; font: 500 9.5px/1 var(--font-mono); font-style: normal; text-align: right; }

/* 语言 / 来源 / 地区 chip */
.board-mix { display: grid; gap: 7px; margin-top: 2px; }
.mix-row { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; }
.mix-label { width: 30px; color: #6f858d; font-size: 9px; letter-spacing: .1em; }
.mix-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 7px;
  border: 1px solid rgba(111, 242, 255, .18);
  border-radius: 999px;
  background: rgba(111, 242, 255, .06);
  color: #b6dbe4;
  font-size: 9.5px;
}
.mix-chip.violet { border-color: rgba(155, 140, 255, .26); background: rgba(155, 140, 255, .09); color: #d2caff; }
.mix-chip.pink { border-color: rgba(255, 95, 122, .24); background: rgba(255, 95, 122, .09); color: #ffc8d1; }
.mix-chip b { font: 700 9.5px/1 var(--font-mono); color: #fff; }

/* 24h 信号流 */
.board-trend svg { display: block; width: 100%; height: 150px; }
.board-trend .bar-alert { fill: #6ff2ff; }
.board-trend .bar-doc { fill: #9b8cff; fill-opacity: .75; }
.board-trend .axis { fill: #6f858d; font: 500 8px var(--font-mono); }
.board-trend .axis-line { stroke: rgba(111, 242, 255, .2); stroke-width: 1; }

/* 排行 */
.board-ranks { display: grid; gap: 7px; }
.rank-row { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr) 30px 42px; align-items: center; gap: 8px; }
.rank-name { color: #cfe6ec; font-size: 10.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rank-name small { margin-left: 5px; color: #6f858d; font-size: 8.5px; }
.rank-row b { color: #eaf8fd; font: 700 11.5px/1 var(--font-mono); text-align: right; font-variant-numeric: tabular-nums; }
.rank-row i { color: #6f858d; font: 500 9px/1 var(--font-mono); font-style: normal; text-align: right; }

/* 进度条（原生 progress，无需内联样式） */
.board-levels progress,
.board-ranks progress {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  height: 6px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, .07);
  overflow: hidden;
}
.board-levels progress::-webkit-progress-bar,
.board-ranks progress::-webkit-progress-bar { background: rgba(255, 255, 255, .07); border-radius: 999px; }
.board-levels progress::-webkit-progress-value,
.board-ranks progress::-webkit-progress-value { border-radius: 999px; background: linear-gradient(90deg, #6ff2ff, #3cd9f5); }
.board-ranks progress::-webkit-progress-value { background: linear-gradient(90deg, #9b8cff, #6ff2ff); }
.board-levels .lvl-row.s0 progress::-webkit-progress-value { background: linear-gradient(90deg, #ff5f7a, #ff8f7a); }
.board-levels .lvl-row.s1 progress::-webkit-progress-value { background: linear-gradient(90deg, #ffc46b, #ffd89b); }
.board-levels .lvl-row.s2 progress::-webkit-progress-value { background: linear-gradient(90deg, #6ff2ff, #a5f8ff); }
.board-levels progress::-moz-progress-bar,
.board-ranks progress::-moz-progress-bar { border-radius: 999px; background: #6ff2ff; }
.board-levels .lvl-row.s0 progress::-moz-progress-bar { background: #ff5f7a; }
.board-levels .lvl-row.s1 progress::-moz-progress-bar { background: #ffc46b; }

/* 响应式 */
@media (max-width: 1100px) {
  .board-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .board-main { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 720px) {
  .board-lower { grid-template-columns: minmax(0, 1fr); }
  .board-kpi-value strong { font-size: 23px; }
  .board-trend svg { height: 132px; }
}
@media (max-width: 480px) {
  .board-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .board-kpi { padding: 10px; }
  .board-kpi-value strong { font-size: 21px; }
  .lvl-row { grid-template-columns: 30px minmax(0, 1fr) 30px 38px; gap: 6px; }
  .rank-row { grid-template-columns: minmax(0, 1fr) 64px 26px 34px; gap: 6px; }
  .board-block { padding: 10px; }
}
/* ===== 情报分类态势：全屏（剧场）模式 · 铺满整屏 + 炫光 ===== */
.board-head-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
body.board-theater { overflow: hidden; }
.situation-board.is-theater {
  position: fixed;
  inset: 0;
  z-index: 200;
  margin: 0;
  padding: clamp(12px, 1.4vw, 24px);
  border: 0;
  border-radius: 0;
  height: 100vh;
  max-height: 100vh;
  overflow: hidden;
  display: grid;
  gap: clamp(9px, 1vw, 15px);
  grid-template-rows: auto auto minmax(0, 1.12fr) minmax(0, .88fr) auto;
  align-content: stretch;
  background:
    radial-gradient(120% 90% at 82% -12%, rgba(111, 242, 255, .15), transparent 58%),
    radial-gradient(90% 80% at 8% 106%, rgba(155, 140, 255, .15), transparent 62%),
    linear-gradient(180deg, rgba(4, 10, 18, .985), rgba(2, 5, 10, .995));
  box-shadow: inset 0 0 180px rgba(111, 242, 255, .09);
  backdrop-filter: blur(10px) saturate(120%);
  animation: theater-in .28s cubic-bezier(.2, .8, .2, 1) both;
}
/* 极光层 */
.situation-board.is-theater::before {
  content: "";
  position: absolute;
  inset: -28%;
  z-index: 0;
  pointer-events: none;
  background: conic-gradient(from 0deg,
    rgba(111, 242, 255, .22), transparent 26deg,
    rgba(155, 140, 255, .2) 54deg, transparent 98deg,
    rgba(255, 107, 214, .15) 152deg, transparent 196deg,
    rgba(111, 242, 255, .22) 302deg, transparent 344deg);
  filter: blur(52px);
  opacity: .55;
  animation: board-aurora 48s linear infinite;
}
@keyframes board-aurora { to { transform: rotate(1turn); } }
/* 扫描线 + 下行扫光 */
.situation-board.is-theater::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  background:
    repeating-linear-gradient(180deg, rgba(111, 242, 255, .045) 0 1px, transparent 1px 4px),
    linear-gradient(180deg, transparent 0%, rgba(111, 242, 255, .1) 50%, transparent 100%);
  background-size: 100% 100%, 100% 220%;
  background-position: 0 0, 0 -110%;
  opacity: .55;
  animation: board-scan 9s linear infinite;
}
@keyframes board-scan { to { background-position: 0 0, 0 110%; } }
.situation-board.is-theater > * { position: relative; z-index: 2; }
@keyframes theater-in {
  from { opacity: 0; }
}

/* 行高铺满：KPI 自适应、主区与排行区均分剩余高度 */
.situation-board.is-theater .board-kpis { align-content: stretch; gap: clamp(8px, .9vw, 14px); }
.situation-board.is-theater .board-kpi {
  padding: clamp(12px, 1.1vw, 18px) clamp(13px, 1.2vw, 20px);
  align-content: center;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .07), 0 14px 36px rgba(0, 0, 0, .42);
}
.situation-board.is-theater .board-kpi-value strong { font-size: clamp(24px, 2.5vw, 36px); text-shadow: 0 0 30px rgba(111, 242, 255, .65); }
.situation-board.is-theater .board-kpi.pink .board-kpi-value strong { text-shadow: 0 0 30px rgba(255, 95, 122, .68); }
.situation-board.is-theater .board-kpi.violet .board-kpi-value strong { text-shadow: 0 0 30px rgba(155, 140, 255, .68); }
.situation-board.is-theater .board-main,
.situation-board.is-theater .board-lower { min-height: 0; gap: clamp(9px, 1vw, 15px); }
.situation-board.is-theater .board-block {
  min-height: 0;
  padding: clamp(12px, 1.1vw, 18px) clamp(13px, 1.2vw, 20px);
  grid-template-rows: auto minmax(0, 1fr);
  align-content: stretch;
  border-color: rgba(111, 242, 255, .18);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05), 0 16px 40px rgba(0, 0, 0, .35);
}
.situation-board.is-theater .board-main .board-block:first-child { grid-template-rows: auto minmax(0, 1fr) auto; }
.situation-board.is-theater .board-block > header { align-self: start; }
.situation-board.is-theater .board-block h3 { font-size: clamp(12px, 1vw, 14px); }
.situation-board.is-theater .board-levels,
.situation-board.is-theater .board-mix,
.situation-board.is-theater .board-ranks { overflow: auto; align-content: start; min-height: 0; }
.situation-board.is-theater .board-levels { gap: clamp(8px, .9vw, 14px); align-content: space-evenly; }
.situation-board.is-theater .board-levels .lvl-row { grid-template-columns: 42px minmax(0, 1fr) 44px 56px; gap: 10px; }
.situation-board.is-theater .board-levels .lvl-tag { height: 24px; font-size: 11px; }
.situation-board.is-theater .board-levels progress { height: 9px; }
.situation-board.is-theater .board-ranks { gap: clamp(6px, .8vw, 12px); align-content: space-evenly; }
.situation-board.is-theater .rank-row { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) 38px 56px; gap: 10px; }
.situation-board.is-theater .rank-name { font-size: clamp(11px, .95vw, 13px); }
.situation-board.is-theater .board-trend { min-height: 0; border-radius: 10px; background: radial-gradient(85% 130% at 50% 118%, rgba(111, 242, 255, .1), transparent 72%); }
.situation-board.is-theater .board-trend svg { height: 100%; min-height: 120px; }
.situation-board.is-theater .board-trend .bar-alert { filter: drop-shadow(0 0 7px rgba(111, 242, 255, .8)); }
.situation-board.is-theater .board-trend .bar-doc { filter: drop-shadow(0 0 7px rgba(155, 140, 255, .7)); }
.situation-board.is-theater .board-ticker { border-color: rgba(111, 242, 255, .2); box-shadow: 0 0 26px rgba(111, 242, 255, .1) inset; }

@media (max-width: 960px), (max-height: 560px) {
  .situation-board.is-theater {
    display: block;
    height: 100vh;
    max-height: 100vh;
    padding: 10px;
    overflow-y: auto;
    overflow-x: hidden;
  }
  .situation-board.is-theater > * { margin-bottom: 10px; }
  .situation-board.is-theater > *:last-child { margin-bottom: 0; }
  .situation-board.is-theater .board-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .situation-board.is-theater .board-main,
  .situation-board.is-theater .board-lower {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
    min-height: auto;
  }
  .situation-board.is-theater .board-block,
  .situation-board.is-theater .board-main .board-block:first-child {
    grid-template-rows: none;
    align-content: start;
    min-height: auto;
  }
  .situation-board.is-theater .board-trend svg { height: clamp(150px, 24vh, 240px); }
  .situation-board.is-theater .board-levels,
  .situation-board.is-theater .board-mix,
  .situation-board.is-theater .board-ranks { overflow: visible; align-content: start; }
}
@media (prefers-reduced-motion: reduce) {
  .situation-board.is-theater { animation: none; }
  .situation-board.is-theater::before,
  .situation-board.is-theater::after { animation: none; }
}

/* ===== 情报分类态势：常驻精致度（顶线、KPI 底线、进度光、播报渐隐） ===== */
.situation-board .board-block { position: relative; }
.situation-board .board-block::after {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  top: 0;
  height: 1px;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(111, 242, 255, .55) 22%, rgba(155, 140, 255, .4) 62%, transparent);
  opacity: .6;
}
.situation-board .board-kpi::after {
  content: "";
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 0;
  height: 1px;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(111, 242, 255, .75), transparent);
}
.situation-board .board-kpi.pink::after { background: linear-gradient(90deg, transparent, rgba(255, 95, 122, .8), transparent); }
.situation-board .board-kpi.violet::after { background: linear-gradient(90deg, transparent, rgba(155, 140, 255, .8), transparent); }
.board-levels progress,
.board-ranks progress { filter: drop-shadow(0 0 7px rgba(111, 242, 255, .22)); }
.board-levels progress::-webkit-progress-value,
.board-ranks progress::-webkit-progress-value { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45); }
.board-ticker {
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
}
/* ===== 情报分类态势 · 动态增强（每次数据刷新重新起势） ===== */
/* 1. 趋势柱：自下而上生长，之后轻微呼吸 */
.board-trend rect { transform-box: fill-box; transform-origin: 50% 100%; animation: bar-rise .55s cubic-bezier(.2, .8, .2, 1) both; }
.board-trend g:nth-child(2n) rect { animation-delay: .08s; }
.board-trend g:nth-child(3n) rect { animation-delay: .16s; }
.board-trend g:nth-child(4n) rect { animation-delay: .24s; }
@keyframes bar-rise { from { transform: scaleY(.04); opacity: .2; } }
.situation-board.is-theater .board-trend .bar-alert,
.situation-board.is-theater .board-trend .bar-doc { animation: bar-rise .55s cubic-bezier(.2, .8, .2, 1) both, bar-breathe 3.8s ease-in-out 1s infinite; }
@keyframes bar-breathe { 0%, 100% { opacity: .84; } 50% { opacity: 1; } }

/* 2. 图表扫描线（全屏） */
.situation-board.is-theater .board-trend { position: relative; overflow: hidden; }
.situation-board.is-theater .board-trend::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 22%;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(111, 242, 255, .18) 55%, rgba(255, 255, 255, .06) 72%, transparent);
  animation: trend-sweep 5.2s linear infinite;
}
@keyframes trend-sweep { from { transform: translateX(-110%); } to { transform: translateX(560%); } }

/* 3. 进度条：呼吸辉光（S0 走红色通道） */
.board-levels progress,
.board-ranks progress { animation: bar-glow 3.4s ease-in-out infinite; }
@keyframes bar-glow {
  0%, 100% { filter: drop-shadow(0 0 4px rgba(111, 242, 255, .18)); }
  50% { filter: drop-shadow(0 0 11px rgba(111, 242, 255, .55)); }
}
.board-levels .lvl-row.s0 progress { animation-name: bar-glow-hot; }
@keyframes bar-glow-hot {
  0%, 100% { filter: drop-shadow(0 0 4px rgba(255, 95, 122, .2)); }
  50% { filter: drop-shadow(0 0 11px rgba(255, 95, 122, .62)); }
}

/* 4. 行阶梯入场 */
.board-levels .lvl-row,
.board-ranks .rank-row,
.board-mix .mix-row { animation: row-in .42s cubic-bezier(.2, .8, .2, 1) both; }
.board-levels .lvl-row:nth-child(2),
.board-ranks .rank-row:nth-child(2),
.board-mix .mix-row:nth-child(2) { animation-delay: .07s; }
.board-levels .lvl-row:nth-child(3),
.board-ranks .rank-row:nth-child(3),
.board-mix .mix-row:nth-child(3) { animation-delay: .14s; }
.board-ranks .rank-row:nth-child(4) { animation-delay: .2s; }
.board-ranks .rank-row:nth-child(5) { animation-delay: .26s; }
@keyframes row-in { from { opacity: 0; transform: translateX(-7px); } }

/* 5. 区块顶线流光（全屏） */
.situation-board.is-theater .board-block::before {
  content: "";
  position: absolute;
  top: 0;
  left: 12%;
  right: 12%;
  height: 1px;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(111, 242, 255, .95), transparent);
  background-size: 34% 100%;
  background-repeat: no-repeat;
  animation: edge-run 4.6s linear infinite;
}
.situation-board.is-theater .board-main .board-block:nth-child(2)::before { animation-delay: -1.5s; }
.situation-board.is-theater .board-lower .board-block:nth-child(1)::before { animation-delay: -3s; }
.situation-board.is-theater .board-lower .board-block:nth-child(2)::before { animation-delay: -2.2s; }
@keyframes edge-run { from { background-position: -34% 0; } to { background-position: 134% 0; } }

/* 6. KPI 数字脉冲 + 扫描加速（全屏） */
.situation-board.is-theater .board-kpi-scan { animation-duration: 3.4s; }
.situation-board.is-theater .board-kpi-value strong { animation: kpi-pulse 2.8s ease-in-out infinite; }
@keyframes kpi-pulse {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.18); }
}

/* 7. 等级标签呼吸（全屏） */
.situation-board.is-theater .lvl-row.s0 .lvl-tag { animation: tag-pulse 2.6s ease-in-out infinite; }
.situation-board.is-theater .lvl-row.s1 .lvl-tag { animation: tag-pulse 2.6s ease-in-out .4s infinite; }
.situation-board.is-theater .lvl-row.s2 .lvl-tag { animation: tag-pulse 2.6s ease-in-out .8s infinite; }
@keyframes tag-pulse {
  0%, 100% { box-shadow: 0 0 0 rgba(255, 255, 255, 0); }
  50% { box-shadow: 0 0 14px rgba(255, 255, 255, .18); }
}

/* 8. LIVE 双环脉冲 + 播报加速（全屏） */
.situation-board.is-theater .board-live .live-dot { animation: live-pulse 2s ease-in-out infinite; }
@keyframes live-pulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(111, 242, 255, .12), 0 0 16px rgba(111, 242, 255, .65); }
  50% { box-shadow: 0 0 0 9px rgba(111, 242, 255, .04), 0 0 26px rgba(111, 242, 255, .95); }
}
.situation-board.is-theater .board-ticker-track { animation-duration: 64s; }

/* 9. chip 呼吸 */
.situation-board .mix-chip { animation: chip-glow 4.2s ease-in-out infinite; }
@keyframes chip-glow {
  0%, 100% { box-shadow: 0 0 0 rgba(111, 242, 255, 0); }
  50% { box-shadow: 0 0 12px rgba(111, 242, 255, .22); }
}

@media (prefers-reduced-motion: reduce) {
  .board-trend rect,
  .board-levels .lvl-row,
  .board-ranks .rank-row,
  .board-mix .mix-row,
  .board-levels progress,
  .board-ranks progress,
  .situation-board .mix-chip,
  .situation-board.is-theater .board-block::before,
  .situation-board.is-theater .board-trend::after,
  .situation-board.is-theater .board-kpi-value strong,
  .situation-board.is-theater .lvl-tag,
  .situation-board.is-theater .board-live .live-dot,
  .situation-board.is-theater .board-trend .bar-alert,
  .situation-board.is-theater .board-trend .bar-doc { animation: none !important; }
}
/* ===== 情报分类态势 · KPI 深度美化 + 全局错峰节奏 ===== */
/* 卡片入场：一张接一张起势，不再同帧弹出 */
.board-kpi { animation: kpi-in .62s cubic-bezier(.2, .8, .2, 1) both; }
.board-kpis .board-kpi:nth-child(2) { animation-delay: .09s; }
.board-kpis .board-kpi:nth-child(3) { animation-delay: .18s; }
.board-kpis .board-kpi:nth-child(4) { animation-delay: .27s; }
.board-kpis .board-kpi:nth-child(5) { animation-delay: .36s; }
.board-kpis .board-kpi:nth-child(6) { animation-delay: .45s; }
@keyframes kpi-in { from { opacity: 0; transform: translateY(12px) scale(.985); } }

/* 数值变动：卡片边缘亮一下再落回去 */
.board-kpi.is-bumped { animation: kpi-in .62s cubic-bezier(.2, .8, .2, 1) both, kpi-bump 1s ease-out .12s; }
@keyframes kpi-bump {
  0% { box-shadow: inset 0 0 0 1px rgba(111, 242, 255, .55), 0 0 26px rgba(111, 242, 255, .24); }
  100% { box-shadow: inset 0 0 0 1px rgba(111, 242, 255, 0), 0 0 0 rgba(111, 242, 255, 0); }
}

/* 四角标线：青 / 粉 / 紫三色分层 */
.board-kpi::before {
  content: "";
  position: absolute;
  inset: 7px;
  border-radius: 7px;
  pointer-events: none;
  opacity: .75;
  background:
    linear-gradient(90deg, rgba(111, 242, 255, .5), transparent) left top / 13px 1px no-repeat,
    linear-gradient(180deg, rgba(111, 242, 255, .5), transparent) left top / 1px 13px no-repeat,
    linear-gradient(270deg, rgba(111, 242, 255, .5), transparent) right bottom / 13px 1px no-repeat,
    linear-gradient(0deg, rgba(111, 242, 255, .5), transparent) right bottom / 1px 13px no-repeat;
}
.board-kpi.pink::before {
  background:
    linear-gradient(90deg, rgba(255, 95, 122, .55), transparent) left top / 13px 1px no-repeat,
    linear-gradient(180deg, rgba(255, 95, 122, .55), transparent) left top / 1px 13px no-repeat,
    linear-gradient(270deg, rgba(255, 95, 122, .55), transparent) right bottom / 13px 1px no-repeat,
    linear-gradient(0deg, rgba(255, 95, 122, .55), transparent) right bottom / 1px 13px no-repeat;
}
.board-kpi.violet::before {
  background:
    linear-gradient(90deg, rgba(155, 140, 255, .55), transparent) left top / 13px 1px no-repeat,
    linear-gradient(180deg, rgba(155, 140, 255, .55), transparent) left top / 1px 13px no-repeat,
    linear-gradient(270deg, rgba(155, 140, 255, .55), transparent) right bottom / 13px 1px no-repeat,
    linear-gradient(0deg, rgba(155, 140, 255, .55), transparent) right bottom / 1px 13px no-repeat;
}

/* 扫描光带：每张卡独立周期与相位，整屏不再同频闪 */
.board-kpi:nth-child(1) .board-kpi-scan { animation-duration: 5.6s; animation-delay: -.4s; }
.board-kpi:nth-child(2) .board-kpi-scan { animation-duration: 7.2s; animation-delay: -2.1s; }
.board-kpi:nth-child(3) .board-kpi-scan { animation-duration: 6.4s; animation-delay: -4.4s; }
.board-kpi:nth-child(4) .board-kpi-scan { animation-duration: 8.1s; animation-delay: -1.2s; }
.board-kpi:nth-child(5) .board-kpi-scan { animation-duration: 6.9s; animation-delay: -3.3s; }
.board-kpi:nth-child(6) .board-kpi-scan { animation-duration: 7.6s; animation-delay: -5.2s; }

/* 行与进度条错峰：等级先动、排行随后、chip 最后 */
.board-levels .lvl-row:nth-child(2) { animation-delay: .18s; }
.board-levels .lvl-row:nth-child(3) { animation-delay: .32s; }
.board-ranks .rank-row:nth-child(2) { animation-delay: .24s; }
.board-ranks .rank-row:nth-child(3) { animation-delay: .42s; }
.board-ranks .rank-row:nth-child(4) { animation-delay: .58s; }
.board-ranks .rank-row:nth-child(5) { animation-delay: .74s; }
.board-mix .mix-row:nth-child(2) { animation-delay: .2s; }
.board-mix .mix-row:nth-child(3) { animation-delay: .4s; }
.board-mix .mix-chip:nth-child(2n) { animation-delay: -1.4s; }
.board-mix .mix-chip:nth-child(3n) { animation-duration: 5.6s; animation-delay: -2.8s; }
.board-levels .lvl-row:nth-child(2) progress { animation-delay: -1.1s; }
.board-levels .lvl-row:nth-child(3) progress { animation-delay: -2.2s; }
.board-ranks .rank-row:nth-child(2) progress { animation-delay: -.9s; }
.board-ranks .rank-row:nth-child(3) progress { animation-delay: -1.8s; }
.board-ranks .rank-row:nth-child(4) progress { animation-delay: -2.6s; }
.board-ranks .rank-row:nth-child(5) progress { animation-delay: -3.4s; }

/* ===== 情报分类态势 · 常态动效与提亮（不只全屏才有） ===== */
/* 进度条流光：光带沿条形持续滑过，每行相位不同 */
.board-levels progress,
.board-ranks progress { height: 8px; }
.board-levels progress::-webkit-progress-value,
.board-ranks progress::-webkit-progress-value {
  background-image:
    linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, .55) 46%, rgba(255, 255, 255, 0) 74%),
    linear-gradient(90deg, #6ff2ff, #3cd9f5);
  background-size: 46% 100%, 100% 100%;
  background-repeat: no-repeat, no-repeat;
  background-position: -46% 0, 0 0;
  animation: bar-sheen 2.9s linear infinite;
}
.board-levels .lvl-row.s0 progress::-webkit-progress-value {
  background-image:
    linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, .5) 46%, rgba(255, 255, 255, 0) 74%),
    linear-gradient(90deg, #ff5f7a, #ff8f7a);
}
.board-levels .lvl-row.s1 progress::-webkit-progress-value {
  background-image:
    linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, .5) 46%, rgba(255, 255, 255, 0) 74%),
    linear-gradient(90deg, #ffc46b, #ffd89b);
}
.board-ranks progress::-webkit-progress-value {
  background-image:
    linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, .5) 46%, rgba(255, 255, 255, 0) 74%),
    linear-gradient(90deg, #9b8cff, #6ff2ff);
}
@keyframes bar-sheen {
  from { background-position: -46% 0, 0 0; }
  to { background-position: 146% 0, 0 0; }
}
.board-levels .lvl-row:nth-child(2) progress::-webkit-progress-value { animation-delay: -1s; }
.board-levels .lvl-row:nth-child(3) progress::-webkit-progress-value { animation-delay: -2s; }
.board-ranks .rank-row:nth-child(2n) progress::-webkit-progress-value { animation-duration: 3.5s; animation-delay: -1.1s; }
.board-ranks .rank-row:nth-child(3n) progress::-webkit-progress-value { animation-duration: 2.4s; animation-delay: -1.9s; }

/* 等级色标：实心光牌 */
.board-levels .lvl-tag { font-weight: 800; letter-spacing: .08em; }
.board-levels .lvl-row.s0 .lvl-tag {
  color: #ffe6ea;
  background: linear-gradient(160deg, rgba(255, 95, 122, .45), rgba(255, 95, 122, .12));
  box-shadow: 0 0 14px rgba(255, 95, 122, .38), inset 0 0 0 1px rgba(255, 95, 122, .55);
}
.board-levels .lvl-row.s1 .lvl-tag {
  color: #fff3de;
  background: linear-gradient(160deg, rgba(255, 196, 107, .45), rgba(255, 196, 107, .12));
  box-shadow: 0 0 14px rgba(255, 196, 107, .35), inset 0 0 0 1px rgba(255, 196, 107, .55);
}
.board-levels .lvl-row.s2 .lvl-tag {
  color: #e8fdff;
  background: linear-gradient(160deg, rgba(111, 242, 255, .42), rgba(111, 242, 255, .1));
  box-shadow: 0 0 14px rgba(111, 242, 255, .38), inset 0 0 0 1px rgba(111, 242, 255, .55);
}
.board-levels .lvl-row b { font-size: 13px; text-shadow: 0 0 14px rgba(111, 242, 255, .45); }
.board-levels .lvl-row.s0 b { text-shadow: 0 0 14px rgba(255, 95, 122, .5); }
.board-levels .lvl-row.s1 b { text-shadow: 0 0 14px rgba(255, 196, 107, .5); }
.board-levels .lvl-row i { color: #9fb6c0; }

/* 24h 信号流：网格底 + 常亮辉光 */
.board-trend {
  border-radius: 10px;
  background-image:
    repeating-linear-gradient(180deg, rgba(255, 255, 255, .05) 0 1px, transparent 1px 33.33%),
    radial-gradient(85% 130% at 50% 118%, rgba(111, 242, 255, .08), transparent 72%);
}
.board-trend .bar-alert { filter: drop-shadow(0 0 5px rgba(111, 242, 255, .75)); }
.board-trend .bar-doc { filter: drop-shadow(0 0 5px rgba(155, 140, 255, .65)); }
.board-trend .axis-line { stroke: rgba(111, 242, 255, .3); }
.board-trend .axis { fill: #7d9398; }

/* 排行与来源：行高亮 + 数字发光 */
.rank-row { padding: 2px 6px; border-radius: 8px; transition: background .18s ease; }
.rank-row:hover { background: rgba(111, 242, 255, .07); }
.rank-row b { font-size: 12.5px; color: #f2fbff; text-shadow: 0 0 12px rgba(111, 242, 255, .45); }
.rank-name { color: #dbeef5; }

/* 区块提亮：更亮的玻璃面 + 标题冷光 */
.board-block {
  border-color: rgba(111, 242, 255, .17);
  background: linear-gradient(180deg, rgba(255, 255, 255, .05), rgba(255, 255, 255, .012));
}
.board-block h3 { text-shadow: 0 0 16px rgba(111, 242, 255, .35); }

@media (prefers-reduced-motion: reduce) {
  .board-levels progress::-webkit-progress-value,
  .board-ranks progress::-webkit-progress-value { animation: none !important; }
}
/* 全屏：区块顶线各走各的节奏 */
.situation-board.is-theater .board-block::before { animation-duration: 5.4s; animation-delay: -.2s; }
.situation-board.is-theater .board-main .board-block:nth-child(2)::before { animation-duration: 4.2s; animation-delay: -1.5s; }
.situation-board.is-theater .board-lower .board-block:nth-child(1)::before { animation-duration: 6.1s; animation-delay: -3s; }
.situation-board.is-theater .board-lower .board-block:nth-child(2)::before { animation-duration: 4.8s; animation-delay: -2.2s; }

@media (prefers-reduced-motion: reduce) {
  .board-kpi,
  .board-kpi.is-bumped,
  .board-kpi .board-kpi-scan { animation: none !important; }
}
/* ===== 情报分类态势 · 更炸：面积图 + 加速流光 + 强辉光 ===== */
/* 流光提速：2.9s → 1.8s，排行行再按 2.2s / 1.6s 分速 */
.board-levels progress::-webkit-progress-value,
.board-ranks progress::-webkit-progress-value { animation-duration: 1.8s; }
.board-levels .lvl-row:nth-child(2) progress::-webkit-progress-value { animation-delay: -.6s; }
.board-levels .lvl-row:nth-child(3) progress::-webkit-progress-value { animation-delay: -1.2s; }
.board-ranks .rank-row:nth-child(2n) progress::-webkit-progress-value { animation-duration: 2.2s; animation-delay: -.8s; }
.board-ranks .rank-row:nth-child(3n) progress::-webkit-progress-value { animation-duration: 1.6s; animation-delay: -1.4s; }

/* 面积图：网格、双色折线、呼吸面、峰值环 */
.board-trend .grid-line { stroke: rgba(255, 255, 255, .06); stroke-width: 1; }
.board-trend .line-alert {
  fill: none;
  stroke: #6ff2ff;
  stroke-width: 2;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 9px rgba(111, 242, 255, .95));
}
.board-trend .line-doc {
  fill: none;
  stroke: #9b8cff;
  stroke-width: 1.6;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 9px rgba(155, 140, 255, .9));
}
.board-trend .area-alert { animation: area-breathe 5.6s ease-in-out infinite; }
.board-trend .area-doc { animation: area-breathe 7.2s ease-in-out -1.4s infinite; }
@keyframes area-breathe {
  0%, 100% { opacity: .8; }
  50% { opacity: 1; }
}
.board-trend .area-peak circle {
  fill: #f4feff;
  stroke: rgba(111, 242, 255, .9);
  stroke-width: 1.4;
  filter: drop-shadow(0 0 10px rgba(111, 242, 255, 1));
}
.board-trend .area-peak .peak-ring {
  fill: none;
  stroke: rgba(111, 242, 255, .6);
  stroke-width: 1;
  transform-box: fill-box;
  transform-origin: center;
  animation: peak-ring 2.6s ease-out infinite;
}
@keyframes peak-ring {
  0% { opacity: .9; transform: scale(.55); }
  100% { opacity: 0; transform: scale(1.95); }
}
.board-trend .area-peak text {
  fill: #eaf8ff;
  font: 700 9px var(--font-mono);
  text-shadow: 0 0 10px rgba(111, 242, 255, .95);
}
.board-trend .hit { cursor: default; }

/* 全屏图表：线更亮、面更透 */
.situation-board.is-theater .board-trend .line-alert { stroke-width: 2.4; filter: drop-shadow(0 0 13px rgba(111, 242, 255, 1)); }
.situation-board.is-theater .board-trend .line-doc { stroke-width: 2; filter: drop-shadow(0 0 13px rgba(155, 140, 255, .95)); }

@media (prefers-reduced-motion: reduce) {
  .board-trend .area-alert,
  .board-trend .area-doc,
  .board-trend .area-peak .peak-ring { animation: none !important; }
}
/* ===== 关联图谱 · 绚丽升级（雷达环 / 流动关系 / 脉冲节点） ===== */
.eg-orbit {
  fill: none;
  stroke: rgba(111, 242, 255, .12);
  stroke-width: 1;
  stroke-dasharray: 4 10;
  transform-box: fill-box;
  transform-origin: center;
  animation: eg-orbit-spin 46s linear infinite;
}
.eg-orbit.alt { stroke: rgba(155, 140, 255, .12); animation-duration: 68s; animation-direction: reverse; }
@keyframes eg-orbit-spin { to { transform: rotate(360deg); } }

.eg-edge { animation: eg-flow 2.4s linear infinite; }
@keyframes eg-flow { to { stroke-dashoffset: -24; } }
.eg-edge-label {
  fill: rgba(111, 242, 255, .62);
  font: 600 8.5px var(--font-mono);
  paint-order: stroke;
  stroke: rgba(4, 10, 16, .85);
  stroke-width: 3px;
}

.eg-pulse {
  transform-box: fill-box;
  transform-origin: center;
  animation: eg-pulse 3.6s ease-out infinite;
}
@keyframes eg-pulse {
  0% { opacity: .5; transform: scale(.82); }
  70%, 100% { opacity: 0; transform: scale(1.55); }
}
.eg-node:nth-child(2n) .eg-pulse { animation-delay: .6s; }
.eg-node:nth-child(3n) .eg-pulse { animation-delay: 1.2s; }
.eg-node:nth-child(4n) .eg-pulse { animation-delay: 1.8s; }
.eg-node:nth-child(5n) .eg-pulse { animation-delay: 2.4s; }

.eg-ring {
  transform-box: fill-box;
  transform-origin: center;
  animation: eg-ring-spin 9s linear infinite;
}
@keyframes eg-ring-spin { to { transform: rotate(360deg); } }

.eg-spec { pointer-events: none; }
.eg-glyph {
  fill: #04121a;
  font: 800 11px var(--font-mono);
  opacity: .78;
  pointer-events: none;
}
.eg-node .eg-label {
  fill: #cfe6ec;
  font: 600 10.5px var(--font-mono);
  paint-order: stroke;
  stroke: rgba(3, 9, 14, .9);
  stroke-width: 3px;
  letter-spacing: .02em;
}
.eg-node:hover .eg-dot { stroke-width: 2.4; }
.eg-node.is-hub .eg-halo { fill-opacity: .22; }
.entity-graph-canvas {
  box-shadow: inset 0 0 60px rgba(111, 242, 255, .1), 0 18px 44px rgba(0, 0, 0, .45);
}
.entity-graph-dialog .eg-svg { border-radius: 16px; }

@media (prefers-reduced-motion: reduce) {
  .eg-orbit,
  .eg-edge,
  .eg-pulse,
  .eg-ring { animation: none !important; }
}
/* ===== 24h 信号流 · 数据优先（渐变描边 / 平滑曲线 / 数值标注） ===== */
.board-trend .line-alert { stroke: url(#boardLineAlert); stroke-width: 2.2; filter: drop-shadow(0 0 10px rgba(111, 242, 255, .95)); }
.board-trend .line-doc { stroke: url(#boardLineDoc); stroke-width: 2; filter: drop-shadow(0 0 10px rgba(155, 140, 255, .9)); }
.board-trend .line-glow { fill: none; stroke-width: 7; stroke-opacity: .3; filter: blur(7px); }
.board-trend .line-glow.alert { stroke: #6ff2ff; }
.board-trend .line-glow.doc { stroke: #9b8cff; }
.board-trend .trend-y-label { fill: #6f858d; font: 500 8px var(--font-mono); }
.board-trend .trend-vgrid { stroke: rgba(111, 242, 255, .07); stroke-width: 1; stroke-dasharray: 2 6; }
.board-trend .trend-point {
  fill: #f4feff;
  stroke: rgba(111, 242, 255, .95);
  stroke-width: 1;
  filter: drop-shadow(0 0 6px rgba(111, 242, 255, .9));
}
.board-trend .trend-peak-label {
  fill: #ffffff;
  font: 700 9px var(--font-mono);
  paint-order: stroke;
  stroke: rgba(4, 10, 16, .88);
  stroke-width: 3px;
}
.situation-board.is-theater .board-trend .line-glow { stroke-width: 9; stroke-opacity: .38; }

@media (prefers-reduced-motion: reduce) {
  .board-trend .line-glow { filter: none; }
}
.board-trend .line-alert,
.board-trend .line-doc,
.board-trend .line-glow { vector-effect: non-scaling-stroke; }
/* 文档序列的数据点与数值：紫色方块，避免与青色圆点混淆 */
.board-trend .trend-point.doc {
  fill: #d9ccff;
  stroke: rgba(155, 140, 255, .95);
  stroke-width: 1;
  filter: drop-shadow(0 0 6px rgba(155, 140, 255, .9));
}
.board-trend .trend-peak-label.doc { fill: #e7dcff; stroke: rgba(6, 4, 16, .9); }
/* 图例带实时总数；青色曲线加粗，低值序列也不再被忽略 */
.board-legend { color: #9fb6c0; font-size: 9.5px; }
.board-legend b {
  margin: 0 8px 0 2px;
  color: #f2feff;
  font: 700 10px var(--font-mono);
  font-variant-numeric: tabular-nums;
}
.board-legend .lg-alert { box-shadow: 0 0 10px rgba(111, 242, 255, .9); }
.board-legend .lg-doc { box-shadow: 0 0 10px rgba(155, 140, 255, .85); }
.board-trend .line-alert { stroke-width: 2.8; filter: drop-shadow(0 0 12px rgba(111, 242, 255, 1)); }
.situation-board.is-theater .board-trend .line-alert { stroke-width: 3.2; }
/* 双 Y 轴：左右刻度配色 + 轴标签 + 文档峰值环 */
.board-trend .trend-y-label.left { fill: rgba(111, 242, 255, .78); }
.board-trend .trend-y-label.right { fill: rgba(180, 160, 255, .8); }
.board-trend .trend-axis-tag {
  font: 700 8px var(--font-mono);
  letter-spacing: .08em;
}
.board-trend .trend-axis-tag.left { fill: rgba(111, 242, 255, .8); }
.board-trend .trend-axis-tag.right { fill: rgba(180, 160, 255, .82); }
.board-trend .area-peak.doc circle {
  fill: #f0e8ff;
  stroke: rgba(155, 140, 255, .95);
  filter: drop-shadow(0 0 10px rgba(155, 140, 255, 1));
}
.board-trend .area-peak.doc .peak-ring {
  fill: none;
  stroke: rgba(155, 140, 255, .65);
}

/* 配置中心「采集平台接入」：自定义平台行（名称 / 入口 / 鉴权 / 状态 / 测试删除） */
.platform-list { display: grid; gap: 6px; }
.platform-row { display: grid; grid-template-columns: minmax(120px, 1.2fr) minmax(150px, 1.6fr) auto minmax(90px, auto) auto auto; align-items: center; gap: 10px; padding: 9px 11px; border: 1px solid rgba(255,255,255,.035); border-radius: 9px; background: rgba(255,255,255,.018); font-size: 11px; }
.platform-row:hover { border-color: rgba(69,223,177,.35); }
.platform-name { color: #d5dfe1; font-weight: 600; }
.platform-host { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.platform-host em { font-style: normal; color: #6f8794; }
.platform-method { color: #8fa3b3; font-variant-numeric: tabular-nums; }
.platform-auth { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.platform-state.on { color: var(--accent); }
.platform-state.off { color: #d8a07a; }
.platform-actions { display: flex; gap: 6px; justify-self: end; }
.platform-actions .button { padding: 3px 8px; font-size: 11px; }
@media (max-width: 720px) { .platform-row { grid-template-columns: 1fr auto; } .platform-host, .platform-method, .platform-auth { display: none; } }

/* 角色提示条：不同角色进页面就能看出自己的权限边界 */
.role-notice { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 14px; padding: 8px 12px; border: 1px solid rgba(120, 200, 255, .25); border-radius: 8px; font-size: 12px; color: #9fb8cc; background: rgba(12, 24, 38, .7); }
.role-notice[data-role="viewer"] { border-color: rgba(255, 190, 120, .35); color: #ffcf9a; }
.role-notice[data-role="analyst"] { border-color: rgba(120, 255, 200, .28); color: #9ff0d0; }

/* 用户与角色（仅管理员可见） */
.quick-advanced-trigger { display: grid; gap: 2px; justify-items: center; }
.quick-advanced-trigger small { color: var(--muted); font-size: 11px; }
.quick-advanced-dialog { width: min(720px, calc(100vw - 32px)); }
.quick-advanced-body { display: grid; gap: 14px; }
/* 「补充词表与采集平台」三步内容较长：弹窗自身固定高度、主体内部滚动、页脚常驻。
   之前弹窗是 overflow:hidden 且主体不滚，内容一长（加了风险词/排除词与已保存词表）就把
   「取消 / 保存并关闭」推到可视区之外，看起来像「没有按钮」。 */
.quick-advanced-dialog[open] { display: flex; flex-direction: column; overflow: hidden; }
.quick-advanced-dialog .dialog-header { flex: 0 0 auto; }
.quick-advanced-dialog .quick-advanced-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding-right: 4px; }
.quick-advanced-dialog .dialog-actions { flex: 0 0 auto; margin-top: 0; padding: 14px 24px 18px; background: linear-gradient(180deg, rgba(6, 12, 20, .92), rgba(4, 9, 16, .98)); }
/* 已保存词表单独限高滚动，词多时不会把步骤 2 / 3 推远。 */
.quick-advanced-dialog .quick-keyword-list { max-height: 148px; overflow-y: auto; padding-right: 2px; }
.quick-step { display: grid; gap: 8px; padding: 10px 12px; border: 1px solid rgba(120, 160, 200, .18); border-radius: 10px; }
.quick-step-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.quick-step-index { font-size: 11px; letter-spacing: .08em; color: var(--muted); }
.quick-step-head strong { font-size: 14px; display: inline-flex; align-items: center; gap: 8px; }
.quick-required { font-style: normal; font-size: 11px; padding: 1px 8px; border-radius: 999px; border: 1px solid rgba(255, 120, 120, .5); color: #ffb4b4; }
.quick-optional { font-style: normal; font-size: 11px; padding: 1px 8px; border-radius: 999px; border: 1px solid rgba(140, 180, 220, .35); color: var(--muted); }
.integration-card-inherited { border-color: rgba(120, 200, 255, .16); }
.serp-key-pool-panel { margin-top: 10px; padding: 10px 12px; border: 1px solid rgba(120, 160, 200, .18); border-radius: 8px; display: grid; gap: 8px; }
.serp-key-pool-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 13px; }
.serp-key-pool-list { margin: 0; padding-left: 18px; display: grid; gap: 4px; font-size: 12px; }
.integration-inherited { color: var(--muted); font-size: 12px; }
.user-admin-list { display: grid; gap: 8px; margin: 10px 0 14px; }
.user-admin-row { display: grid; grid-template-columns: 1fr auto auto auto auto; gap: 10px; align-items: center; padding: 8px 10px; border: 1px solid rgba(120, 160, 200, .18); border-radius: 8px; }
.user-admin-row small { display: block; color: var(--muted); font-size: 11px; }
.user-create-form { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) auto; gap: 10px; align-items: end; }
@media (max-width: 720px) { .user-admin-row { grid-template-columns: 1fr; } .user-create-form { grid-template-columns: 1fr; } }

/* 用户与角色弹窗 */
.user-dialog { width: min(680px, calc(100vw - 32px)); }
.user-dialog-body { display: grid; gap: 12px; }

/* 任务标签编辑器（采集页，任务下方） */
.task-tag-editor { margin-top: 10px; padding: 10px 12px; border: 1px solid rgba(255,255,255,.06); border-radius: 10px; background: rgba(255,255,255,.018); }
.task-tag-editor .tag-head { display: flex; flex-direction: column; gap: 2px; margin-bottom: 8px; }
.task-tag-editor .tag-head strong { font-size: 12px; color: #d5dfe1; }
.task-tag-editor .tag-head small { font-size: 11px; color: var(--muted); }
.task-tag-editor .tag-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.task-tag-editor .tag-chip { border: 1px solid rgba(255,255,255,.10); background: rgba(255,255,255,.03); color: #c8d3d6; border-radius: 999px; padding: 4px 10px; font-size: 11px; cursor: pointer; }
.task-tag-editor .tag-chip.on { border-color: rgba(69,223,177,.55); background: rgba(69,223,177,.14); color: #bff5e4; }
.task-tag-editor .tag-custom { display: flex; gap: 8px; margin-top: 9px; }
.task-tag-editor .tag-custom input { flex: 1; min-width: 0; }

/* ========================================================================
   视觉系统 V9.9 · 信息优先收敛层
   统一前序主题覆盖，提升可读性、操作层级与窄屏可用性。
   ======================================================================== */
:root {
  --ui-content: 1360px;
  --ui-text: #eef8fa;
  --ui-muted: #a7bac3;
  --ui-subtle: #8298a3;
  --ui-line: rgba(133, 220, 232, .16);
  --ui-line-strong: rgba(111, 242, 255, .3);
  --ui-panel: rgba(7, 15, 25, .9);
  --ui-surface: rgba(12, 24, 36, .78);
  --ui-focus: #8af5ff;
}

body {
  color: var(--ui-text);
  font-size: 14px;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}

main {
  width: min(100%, var(--ui-content));
  max-width: var(--ui-content);
  padding: 28px 24px 72px;
}

main > *,
.page-heading,
.hero,
.panel,
.stats-grid,
.workspace-grid,
.quick-collection-grid,
.config-grid,
.quick-collection-main,
.field,
form {
  min-width: 0;
  max-width: 100%;
}

p, h1, h2, h3, .helper, .panel-header span, .role-notice {
  overflow-wrap: anywhere;
}

.topbar {
  min-height: 70px;
  padding-inline: max(24px, calc((100vw - var(--ui-content)) / 2));
  gap: 18px;
  border-bottom-color: var(--ui-line);
  background: rgba(3, 9, 16, .9);
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 13px;
}

.primary-nav {
  gap: 3px;
  padding: 4px;
  border-color: rgba(133, 220, 232, .12);
  background: rgba(255, 255, 255, .026);
}

.primary-nav a {
  min-height: 38px;
  padding: 8px 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #aec2ca;
  font-size: 11.5px;
}

.primary-nav a.active {
  color: #031219;
  background: linear-gradient(135deg, #8af5ff, #54daf1 60%, #45c3e7);
  box-shadow: 0 8px 24px rgba(84, 218, 241, .2), inset 0 1px rgba(255, 255, 255, .55);
}

.runtime-pill { color: #bfd0d6; }

.page-heading,
.page-heading-compact,
.hero {
  margin-bottom: 18px;
  padding: 32px 36px;
  border-color: var(--ui-line);
  border-radius: 20px;
  background:
    radial-gradient(80% 130% at 100% 0%, rgba(67, 203, 226, .14), transparent 58%),
    linear-gradient(145deg, rgba(14, 27, 41, .96), rgba(4, 10, 18, .98));
}

.page-heading { min-height: 190px; }
.page-heading h1, .page-heading-compact h1 { font-size: clamp(30px, 3.1vw, 44px); }
.page-heading p:not(.section-index), .hero > div > p {
  max-width: 760px;
  color: var(--ui-muted);
  font-size: 13.5px;
}

.heading-facts span, .hero-tags span {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  color: #bfd0d6;
  border-color: var(--ui-line);
}

.panel {
  padding: 22px;
  border-color: var(--ui-line);
  border-radius: 15px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .032), transparent 22%),
    var(--ui-panel);
  box-shadow: 0 18px 50px rgba(0, 0, 0, .24), inset 0 1px rgba(255, 255, 255, .04);
}

.panel::before, .panel::after { opacity: .34; }
.panel:hover::before, .panel:hover::after { opacity: .5; }
.panel-header { margin-bottom: 16px; }
.panel-header h2 { color: #f1fbfd; font-size: 18px; }
.panel-header span, .helper, .field-help { color: var(--ui-muted); }
.helper { font-size: 11.5px; line-height: 1.65; }

.role-notice {
  max-width: 100%;
  margin-bottom: 16px;
  color: #bdd0da;
  border-color: rgba(111, 242, 255, .24);
  background: rgba(9, 23, 35, .76);
}

.stat {
  min-height: 116px;
  border-color: var(--ui-line);
  background:
    radial-gradient(100% 100% at 100% 0%, rgba(84, 218, 241, .11), transparent 60%),
    linear-gradient(155deg, rgba(12, 25, 38, .94), rgba(4, 10, 18, .98));
}

.stat span, .stat small { color: var(--ui-muted); }
.stat strong { font-size: clamp(34px, 3vw, 46px); }

.button {
  min-height: 40px;
  padding: 9px 14px;
  border-radius: 10px;
  font-size: 11.5px;
}

.button.primary {
  background: linear-gradient(135deg, #8af5ff, #55daf1 58%, #38bddf);
  color: #031219;
  box-shadow: 0 10px 28px rgba(84, 218, 241, .2), inset 0 1px rgba(255, 255, 255, .52);
}

.button.ghost { color: #c4d4da; border-color: var(--ui-line); }

.field {
  gap: 7px;
  color: #b3c7cf;
  font-size: 11px;
}

.field input,
.field select,
.field textarea,
input[type="search"],
input[type="text"],
input[type="number"],
select,
textarea {
  min-height: 44px;
  padding: 10px 12px;
  border-color: var(--ui-line);
  background: rgba(2, 8, 14, .8);
  color: #edf8fa;
  font-size: 13px;
}

input::placeholder, textarea::placeholder { color: #718894; opacity: 1; }

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline-color: var(--ui-focus);
  box-shadow: 0 0 0 4px rgba(138, 245, 255, .14);
}

.alert-card, .document-card, .collection-run-card, .source-entry {
  border-color: rgba(133, 220, 232, .13);
  background: rgba(8, 18, 29, .74);
}

.alert-card h3, .document-card h3 { color: #f2f9fb; }
.alert-summary, .document-card p, .alert-meta, .document-tags { color: var(--ui-muted); }

.empty-state, .list-empty {
  min-height: 116px;
  align-content: center;
  padding: 24px 18px;
  color: var(--ui-muted);
  border-color: rgba(133, 220, 232, .16);
  background: rgba(8, 18, 29, .5);
}

.app-dialog {
  width: min(900px, calc(100vw - 32px));
  max-height: min(88vh, 860px);
  overflow: hidden;
  border-color: var(--ui-line-strong);
  border-radius: 18px;
}

.dialog-header { padding: 20px 22px 16px; }
.dialog-header > div { min-width: 0; }
.dialog-header span { color: var(--ui-muted); font-size: 11px; }
.dialog-close { min-width: 40px; min-height: 40px; flex: 0 0 auto; }

footer {
  width: min(100%, var(--ui-content));
  max-width: var(--ui-content);
  color: var(--ui-subtle);
  border-top-color: var(--ui-line);
}

@media (max-width: 1400px) {
  .topbar {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 8px 14px;
    padding: 10px 16px 6px;
  }
  .top-actions { justify-self: end; }
  .primary-nav {
    grid-column: 1 / -1;
    order: initial;
    width: 100%;
    margin: 0;
    justify-content: flex-start;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x proximity;
  }
  .primary-nav a { scroll-snap-align: start; }
}

@media (max-width: 800px) {
  main { padding: 18px 14px 56px; }
  .page-heading, .page-heading-compact, .hero { padding: 24px 22px; }
  .page-heading { min-height: 0; }
  .workspace-grid, .quick-collection-grid, .config-grid { grid-template-columns: minmax(0, 1fr); }
  .alert-filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .quick-collection-main { display: grid; }
  .quick-collection-panel, .quick-status-panel, .quick-collection-main > section.panel { order: initial; }
}

@media (max-width: 600px) {
  body { font-size: 13.5px; }
  .topbar {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px 10px;
    padding: 8px 10px 0;
  }
  .brand { gap: 8px; }
  .brand { grid-column: 1; grid-row: 1; }
  .brand-mark { width: 34px; height: 34px; border-radius: 10px; }
  .brand strong { font-size: 13px; }
  .brand span { display: none; }
  .top-actions { grid-column: 2; grid-row: 1; gap: 6px; margin-left: 0; }
  .top-actions .button { min-height: 38px; padding-inline: 10px; }
  #runtime-pill, #current-user, #pwa-install { display: none !important; }
  .top-actions #logout { display: inline-flex; }
  .primary-nav {
    grid-column: 1 / -1;
    grid-row: 2;
    order: 0;
    margin-inline: -10px;
    width: calc(100% + 20px);
    padding: 5px 10px 7px;
    border-inline: 0;
    border-radius: 0;
    scroll-padding-inline: 10px;
    mask-image: linear-gradient(90deg, transparent, #000 12px, #000 calc(100% - 22px), transparent);
  }
  .primary-nav a { min-height: 40px; padding: 8px 13px; font-size: 11.5px; }

  main { padding: 14px 12px 48px; }
  .role-notice { display: block; padding: 10px 12px; line-height: 1.55; }
  .page-heading, .page-heading-compact, .hero {
    gap: 14px;
    padding: 20px 16px;
    border-radius: 15px;
  }
  .page-heading h1, .page-heading-compact h1, h1, .hero h1 { font-size: 28px; line-height: 1.18; }
  .page-heading p:not(.section-index), .hero > div > p { font-size: 12.5px; line-height: 1.7; }
  .page-heading > .button { width: 100%; justify-content: center; }
  .heading-facts { margin-top: 12px; gap: 6px; }
  .heading-facts span { min-height: 26px; padding: 4px 8px; font-size: 9.5px; }

  .panel { padding: 16px 14px; border-radius: 14px; }
  .panel-header { display: grid; gap: 10px; }
  .panel-header h2 { font-size: 17px; }
  .panel-header > .button, .panel-header > .filter-cluster, .run-history-controls { width: 100%; }
  .panel-header > .button { justify-content: center; }
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .stat { min-height: 96px; padding: 14px; }
  .stat strong { font-size: 30px; }

  .workspace-grid, .quick-collection-grid, .config-grid, .schedule-grid,
  .alert-filter-grid, .source-entry-grid, .quick-source-grid {
    grid-template-columns: minmax(0, 1fr) !important;
  }
  .quick-collection-main { display: grid !important; gap: 12px; }
  .quick-collection-panel, .quick-status-panel, .quick-collection-main > section.panel { order: initial !important; }

  .alert-filter-shell { padding: 12px; }
  .alert-filter-head, .alert-filter-actions, .document-page-controls,
  .document-filter-row, .advanced-actions, .dialog-actions {
    align-items: stretch;
    flex-direction: column;
  }
  .alert-filter-actions .button, .advanced-actions .button,
  .document-toolbar .button, .dialog-actions .button { width: 100%; justify-content: center; }
  .filter-cluster, .document-filter-row, .document-filter-row > *,
  .document-page-controls > *, .run-history-controls select { width: 100%; max-width: none; }

  .field input, .field select, .field textarea,
  input[type="search"], input[type="text"], input[type="number"], select, textarea {
    width: 100%;
    min-width: 0;
    font-size: 16px;
  }
  .button { min-height: 44px; }
  input[type="checkbox"], input[type="radio"] { min-height: 18px; width: 18px; }

  .app-dialog { width: calc(100vw - 16px); max-height: calc(100dvh - 16px); border-radius: 14px; }
  .dialog-header { padding: 16px 14px 13px; }
  .app-dialog > form, .app-dialog > .language-selector,
  .alert-download-body, .run-history-body, .user-dialog-body { padding: 14px; }
  .ritual-intro .rite-scene::after { display: none !important; }

  footer { padding: 18px 12px 28px; gap: 6px; line-height: 1.5; }
}

@media (prefers-contrast: more) {
  :root { --ui-muted: #c2d1d7; --ui-line: rgba(163, 235, 244, .32); }
  .button.ghost, .runtime-pill { color: #eef8fa; }
}

/* ========================================================================
   视觉系统 V10 · 情报分析工作区
   把同步状态、分析入口和关注操作从同一工具条拆开。
   ======================================================================== */
.alert-filter-head {
  display: grid;
  grid-template-columns: auto minmax(280px, 1fr);
  align-items: center;
  gap: 18px;
}

.alert-filter-status {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px 14px;
  flex-wrap: wrap;
}

.alert-filter-status .filter-summary {
  max-width: min(100%, 520px);
  color: var(--ui-subtle);
  line-height: 1.5;
  white-space: normal;
  text-align: right;
}

#alerts-filter-summary {
  padding-left: 14px;
  border-left: 1px solid var(--ui-line);
}

.alert-workspace-actions {
  margin: 0 0 14px;
  padding: 12px;
  display: grid;
  grid-template-columns: minmax(320px, 1.2fr) auto;
  gap: 12px;
  align-items: stretch;
  border: 1px solid var(--ui-line);
  border-radius: 13px;
  background: linear-gradient(135deg, rgba(84, 218, 241, .07), rgba(255, 255, 255, .018));
}

.insight-entry {
  min-width: 0;
  min-height: 64px;
  padding: 11px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border: 1px solid rgba(84, 218, 241, .28);
  border-radius: 11px;
  background: linear-gradient(135deg, rgba(84, 218, 241, .14), rgba(155, 140, 255, .07));
  color: var(--ui-text);
  text-align: left;
  cursor: pointer;
  transition: border-color .18s ease, background .18s ease, transform .18s ease;
}

.insight-entry:hover {
  transform: translateY(-1px);
  border-color: rgba(138, 245, 255, .52);
  background: linear-gradient(135deg, rgba(84, 218, 241, .2), rgba(155, 140, 255, .1));
}

.insight-entry-copy { min-width: 0; display: grid; gap: 2px; }
.insight-entry-copy strong { color: #f2fbfd; font-size: 13.5px; }
.insight-entry-copy small { color: var(--ui-muted); font-size: 11px; line-height: 1.45; }
.insight-entry-meta {
  flex: 0 0 auto;
  padding: 5px 9px;
  border: 1px solid rgba(138, 245, 255, .2);
  border-radius: 999px;
  background: rgba(3, 12, 20, .5);
  color: #b8eef7;
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}

.watchlist-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(120px, auto));
  gap: 8px;
}

.watchlist-actions .button {
  min-height: 64px;
  justify-content: center;
  gap: 9px;
}

.action-count {
  min-width: 24px;
  height: 24px;
  padding-inline: 6px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(3, 12, 20, .48);
  color: #e8fbff;
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}

#toggle-favorite-filter.favorite-filter-button.is-active {
  border-color: rgba(138, 245, 255, .5);
  background: rgba(84, 218, 241, .15);
  color: #e8fbff;
}

.entity-graph-dialog { width: min(1120px, calc(100vw - 32px)); }
.entity-graph-body { gap: 14px; padding: 16px 22px 8px; }
.entity-graph-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px 20px;
  flex-wrap: wrap;
}
.entity-graph-filters { min-width: 0; display: grid; gap: 7px; }
.entity-graph-controls { display: flex; align-items: center; gap: 9px; }
.entity-graph-controls > span {
  min-width: 138px; padding: 7px 10px; border: 1px solid rgba(111, 242, 255, .16); border-radius: 8px;
  background: rgba(4, 16, 26, .72); color: #8fb2ba; font-size: 10px; text-align: center; font-variant-numeric: tabular-nums;
}
.entity-graph-controls [data-graph-relations][aria-pressed="true"] {
  border-color: rgba(111, 242, 255, .52); background: rgba(69, 211, 234, .13); color: #e8fbff;
}
.entity-graph-toolbar .entity-graph-hint { max-width: 560px; color: var(--ui-muted); font-size: 11px; }
.entity-graph-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.75fr) minmax(280px, .75fr);
  gap: 14px;
  align-items: stretch;
}
.entity-graph-canvas { min-height: 520px; }
.entity-graph-inspector {
  min-width: 0;
  min-height: 520px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  border: 1px solid var(--ui-line);
  border-radius: 14px;
  background: rgba(5, 13, 22, .82);
}
.entity-graph-inspector-head { padding-bottom: 13px; border-bottom: 1px solid var(--ui-line); }
.entity-graph-inspector-head span { color: #7edfee; font-size: 9px; font-weight: 750; letter-spacing: .18em; }
.entity-graph-inspector-head h3 { margin: 4px 0 3px; color: #f1fbfd; font-size: 17px; }
.entity-graph-inspector-head p { margin: 0; color: var(--ui-muted); font-size: 11px; line-height: 1.55; }
.entity-graph-list { flex: 1 1 auto; max-height: 430px; padding-right: 4px; }
.eg-detail-head h3 { font-size: 18px; }
.eg-detail-meta { color: var(--ui-muted); font-size: 11px; }
.eg-doc-list { gap: 7px; }
.eg-doc-list li { padding: 8px 0; }

@media (max-width: 900px) {
  .alert-filter-head { grid-template-columns: minmax(0, 1fr); }
  .alert-filter-status { justify-content: flex-start; }
  .alert-filter-status .filter-summary { text-align: left; }
  #alerts-filter-summary { padding-left: 0; border-left: 0; }
  .alert-workspace-actions { grid-template-columns: minmax(0, 1fr); }
  .entity-graph-workspace { grid-template-columns: minmax(0, 1fr); }
  .entity-graph-canvas { min-height: 420px; }
  .entity-graph-inspector { min-height: 0; }
  .entity-graph-list { max-height: 300px; }
}

@media (max-width: 600px) {
  .alert-filter-status { display: grid; justify-content: stretch; gap: 5px; }
  .alert-workspace-actions { padding: 9px; }
  .insight-entry { min-height: 76px; align-items: flex-start; }
  .insight-entry-meta { margin-top: 2px; }
  .watchlist-actions { grid-template-columns: minmax(0, 1fr); }
  .watchlist-actions .button { min-height: 48px; }
  .entity-graph-dialog { width: calc(100vw - 12px); }
  .entity-graph-body { padding: 12px; }
  .entity-graph-toolbar { align-items: flex-start; flex-direction: column; }
  .entity-graph-controls { width: 100%; justify-content: space-between; }
  .entity-graph-canvas { min-height: 320px; }
  .entity-graph-inspector { padding: 13px; }
}

/* ========================================================================
   视觉系统 V11 · 全局体验修复
   收紧桌面信息密度，修复窄屏收缩与导航，并统一离线兜底体验。
   ======================================================================== */
html, body { max-width: 100%; }
.page-heading > div { min-width: 0; width: 100%; }
.page-heading p:not(.section-index), .hero > div > p { overflow-wrap: anywhere; }
.role-notice { width: 100%; }

@media (min-width: 801px) {
  main { padding-top: 22px; }
  .page-heading { min-height: 164px; padding: 28px 32px; }
  .page-heading-compact { padding: 28px 32px; }
  .hero { padding: 32px 36px; gap: 36px; }
  .hero h1 { font-size: clamp(42px, 4.6vw, 62px); }
}

.empty-state, .list-empty { line-height: 1.7; text-wrap: balance; }

.offline-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  overflow: hidden;
}
.offline-shell { width: min(100%, 760px); min-height: auto; margin: 0; padding: 28px; }
.offline-card {
  position: relative;
  overflow: hidden;
  padding: clamp(28px, 6vw, 52px);
  border: 1px solid var(--ui-line-strong);
  border-radius: 22px;
  background:
    radial-gradient(90% 110% at 100% 0%, rgba(84, 218, 241, .16), transparent 58%),
    linear-gradient(145deg, rgba(13, 27, 41, .97), rgba(3, 9, 16, .99));
  box-shadow: 0 34px 100px rgba(0, 0, 0, .55), inset 0 1px rgba(255, 255, 255, .06);
}
.offline-card::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 1px;
  background: linear-gradient(90deg, #8af5ff, rgba(155, 140, 255, .45), transparent 78%);
}
.offline-brand { width: max-content; margin-bottom: 56px; text-decoration: none; }
.offline-brand-copy { display: grid; gap: 2px; line-height: 1.2; }
.offline-brand-copy strong { color: #f2fbfd; font-size: 15px; letter-spacing: .08em; }
.offline-brand-copy small { color: var(--ui-subtle); font-size: 8px; letter-spacing: .16em; }
.offline-kicker { margin: 0 0 14px; color: #8af5ff; font: 750 10px/1.4 ui-monospace, SFMono-Regular, Consolas, monospace; letter-spacing: .18em; }
.offline-dot { width: 7px; height: 7px; display: inline-block; margin-right: 8px; border-radius: 50%; background: #ffb15f; box-shadow: 0 0 16px rgba(255, 177, 95, .65); }
.offline-card h1 { max-width: 540px; font-size: clamp(34px, 7vw, 58px); }
.offline-description { max-width: 590px; margin: 18px 0 0; color: var(--ui-muted); font-size: 14px; line-height: 1.8; }
.offline-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.offline-actions .button { min-width: 132px; justify-content: center; text-decoration: none; }
.offline-status { margin-top: 34px; padding-top: 18px; display: flex; flex-wrap: wrap; gap: 10px 28px; border-top: 1px solid var(--ui-line); color: var(--ui-subtle); font-size: 11px; }
.offline-status b { margin-right: 6px; color: #d9e8ec; font-weight: 650; }

@media (max-width: 600px) {
  html, body { overflow-x: clip; }
  .topbar, main, .page-main, .page-main > *, .page-heading, .page-heading-compact,
  .hero, .panel, .stats-grid, .workspace-grid, .config-grid, .quick-collection-grid,
  .quick-collection-main, .document-library, .alert-feed-panel {
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }
  .top-actions #logout { display: inline-flex !important; }
  .primary-nav { max-width: calc(100% + 20px); }
  .primary-nav a { flex: 0 0 auto; }
  .page-heading, .page-heading-compact { overflow: hidden; }
  .page-heading p:not(.section-index), .hero > div > p { width: 100%; max-width: 100%; white-space: normal; }
  .panel-header, .panel-header > div, .field, label, form { min-width: 0; max-width: 100%; }
  .role-notice { margin-bottom: 12px; }
  .alert-count { width: 100%; flex-direction: row; align-items: baseline; justify-content: flex-start; gap: 7px; }
  .alert-count strong { font-size: 22px; }
  .offline-page { align-items: start; overflow-y: auto; }
  .offline-shell { padding: 14px; }
  .offline-card { min-width: 0; padding: 24px 20px; border-radius: 16px; }
  .offline-brand { width: fit-content; max-width: 100%; margin-bottom: 42px; }
  .offline-brand > .brand-mark { display: grid; }
  .offline-brand-copy { display: grid !important; }
  .offline-brand-copy small { display: block; }
  .offline-card h1 { font-size: 34px; }
  .offline-description { font-size: 13px; }
  .offline-actions { display: grid; }
  .offline-actions .button { width: 100%; }
  .offline-status { display: grid; gap: 7px; }
}

/* ========================================================================
   采集中心 · 资源统一入口
   连接能力与来源运行状态移入同一弹窗，让主页面只保留采集和反馈主线。
   ======================================================================== */
.collection-resource-entry {
  display: grid;
  gap: 13px;
  margin-bottom: 12px;
  padding: 16px;
  border: 1px solid rgba(111, 242, 255, .22);
  border-radius: 14px;
  background:
    radial-gradient(100% 120% at 100% 0%, rgba(111, 242, 255, .11), transparent 58%),
    rgba(8, 18, 28, .78);
}
.collection-resource-heading,
.resource-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.collection-resource-heading > div,
.resource-section-head > div { min-width: 0; }
.collection-resource-heading span,
.resource-section-head > div > span {
  color: #77dce9;
  font: 700 9px/1.3 var(--font-mono);
  letter-spacing: .14em;
}
.collection-resource-heading h3,
.resource-section-head h3 { margin: 5px 0 0; color: #eefbfe; font-size: 15px; }
.resource-state {
  flex: 0 0 auto;
  padding: 4px 9px;
  border: 1px solid rgba(69, 223, 177, .32);
  border-radius: 999px;
  color: #86efd0;
  background: rgba(69, 223, 177, .1);
  font-size: 10px;
}
.resource-state.warn { color: #ffd39a; border-color: rgba(255, 177, 95, .38); background: rgba(255, 177, 95, .1); }
.resource-metrics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.resource-metrics > div {
  display: grid;
  gap: 3px;
  padding: 10px 11px;
  border: 1px solid rgba(255, 255, 255, .07);
  border-radius: 10px;
  background: rgba(255, 255, 255, .025);
}
.resource-metrics span { color: var(--ui-subtle); font-size: 10px; }
.resource-metrics strong { color: #dffaff; font: 760 19px/1.2 var(--font-mono); }
.collection-resource-entry p { margin: 0; color: var(--ui-muted); font-size: 11px; line-height: 1.65; }

.collection-resources-dialog { width: min(1120px, calc(100vw - 32px)); }
.collection-resources-dialog[open],
.integrations-dialog[open],
.entity-graph-dialog[open] {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
}
.collection-resources-body {
  min-height: 0;
  display: grid;
  gap: 16px;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 20px 22px 8px;
}
.integrations-dialog-body,
.entity-graph-body { min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.integrations-dialog-body { max-height: none; padding: 16px 22px 8px; }
.collection-resources-dialog > .dialog-actions,
.integrations-dialog > .dialog-actions,
.entity-graph-dialog > .dialog-actions {
  position: relative;
  z-index: 2;
  margin: 0;
  padding: 12px 22px;
  border-top: 1px solid var(--ui-line);
  background: rgba(3, 9, 16, .96);
}
.resource-section {
  min-width: 0;
  padding: 17px;
  border: 1px solid var(--ui-line);
  border-radius: 14px;
  background: linear-gradient(160deg, rgba(15, 29, 43, .92), rgba(6, 13, 22, .94));
}
.resource-section-head { margin-bottom: 13px; }
.resource-capability-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.resource-capability-grid .quick-capability {
  min-height: 64px;
  padding: 11px 12px;
  border: 1px solid rgba(255, 255, 255, .07);
  border-radius: 10px;
  background: rgba(255, 255, 255, .018);
}
.source-status-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-bottom: 10px; }
.source-status-summary > span {
  display: flex;
  align-items: baseline;
  gap: 6px;
  padding: 8px 10px;
  border: 1px solid rgba(255, 255, 255, .07);
  border-radius: 9px;
  color: var(--ui-muted);
  background: rgba(255, 255, 255, .02);
  font-size: 10px;
}
.source-status-summary b { color: #eaf9fc; font: 760 16px/1 var(--font-mono); }
.source-status-summary .ok { border-color: rgba(69, 223, 177, .2); color: #9fe6d1; }
.source-status-summary .warn { border-color: rgba(255, 177, 95, .25); color: #ffd09a; }
.source-status-toolbar { display: grid; grid-template-columns: minmax(0, 1fr) 190px; gap: 9px; margin-bottom: 11px; }
.source-status-toolbar label { min-width: 0; }
.source-status-toolbar input,
.source-status-toolbar select { width: 100%; min-height: 40px; }
.collection-resources-dialog .source-list { max-height: none; overflow: visible; padding-right: 4px; }
.collection-resources-dialog .source-item {
  min-width: 0;
  border-color: rgba(111, 242, 255, .12);
  background: rgba(3, 9, 16, .48);
}

/* ========================================================================
   24h 信号流 · 双轨架构
   两类数据各用一条轨道和独立比例尺，只共享时间轴。
   ======================================================================== */
.board-trend { display: grid; gap: 10px; }
.signal-flow-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px; }
.signal-flow-summary > span {
  min-width: 0;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: baseline;
  gap: 2px 6px;
  padding: 8px 10px;
  border: 1px solid rgba(111, 242, 255, .11);
  border-radius: 9px;
  background: rgba(255, 255, 255, .018);
}
.signal-flow-summary small { grid-column: 1 / -1; color: #829aa4; font-size: 8.5px; letter-spacing: .08em; }
.signal-flow-summary strong { color: #f0fcff; font: 760 16px/1 var(--font-mono); }
.signal-flow-summary em { color: #78909b; font: 500 8.5px/1.2 var(--font-mono); font-style: normal; white-space: nowrap; }
.signal-flow-canvas {
  overflow-x: auto;
  border: 1px solid rgba(111, 242, 255, .13);
  border-radius: 10px;
  background:
    linear-gradient(rgba(111, 242, 255, .025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(111, 242, 255, .025) 1px, transparent 1px),
    rgba(2, 8, 14, .52);
  background-size: 18px 18px;
}
.signal-scroll-hint { display: none; color: #8097a1; font-size: 9px; text-align: right; }
.board-trend .signal-flow-canvas svg { display: block; width: 100%; min-width: 620px; height: auto; }
.signal-lane-bg { stroke-width: 1; }
.signal-lane-bg.alert { fill: rgba(35, 156, 177, .055); stroke: rgba(111, 242, 255, .14); }
.signal-lane-bg.doc { fill: rgba(113, 91, 194, .06); stroke: rgba(155, 140, 255, .16); }
.signal-time-line { stroke: rgba(148, 190, 204, .1); stroke-width: 1; stroke-dasharray: 2 6; }
.signal-lane-line { stroke: rgba(148, 190, 204, .085); stroke-width: 1; }
.signal-lane-name { font: 720 9px var(--font-mono); letter-spacing: .08em; }
.signal-lane-name.alert { fill: #78edf8; }
.signal-lane-name.doc { fill: #b7a7ff; }
.signal-lane-max { fill: #6f858d; font: 500 8px var(--font-mono); }
.signal-area.alert { fill: url(#signalAlertArea); }

/* 24h 信号流：单图双轴（左轴情报 / 右轴文档） */
.signal-plot-bg { fill: rgba(9, 22, 31, .55); stroke: rgba(111, 242, 255, .12); stroke-width: 1; }
.signal-legend-text { fill: #8eaab4; font: 600 9px var(--font-mono); letter-spacing: .04em; }
.signal-legend-dot.alert { fill: #6ff2ff; filter: drop-shadow(0 0 5px rgba(111, 242, 255, .8)); }
.signal-legend-dot.doc { fill: #a896ff; filter: drop-shadow(0 0 5px rgba(155, 140, 255, .8)); }
.signal-axis-title { font: 700 9px var(--font-mono); letter-spacing: .1em; }
.signal-axis-title.alert { fill: #78edf8; }
.signal-axis-title.doc { fill: #b7a7ff; }
.signal-axis-tick { fill: #6f858d; font: 500 8px var(--font-mono); }
.signal-marker .signal-marker-label { font: 760 9.5px var(--font-mono); }
.signal-marker .signal-marker-label.alert { fill: #d9fbff; }
.signal-marker .signal-marker-label.doc { fill: #e6ddff; }
/* 两条曲线数值接近时会整条重叠，紫色被青色完全盖住（实测峰值都是 116）。
   因此紫色改成虚线并叠在青色之上：缝隙里能看到青色，实线处看到紫色，两条都读得出来。 */
.signal-area.doc { fill: url(#signalDocArea); mix-blend-mode: screen; opacity: .5; }
.signal-area.alert { mix-blend-mode: screen; opacity: .82; }
.signal-line,
.signal-line-glow { fill: none; vector-effect: non-scaling-stroke; }
.signal-line { stroke-width: 2.2; }
.signal-line.alert {
  stroke: url(#signalAlertLine);
  stroke-width: 2.6;
  filter: drop-shadow(0 0 8px rgba(111, 242, 255, .85));
}
.signal-line.doc {
  stroke: url(#signalDocLine);
  stroke-width: 2.4;
  stroke-linecap: round;
  filter: drop-shadow(0 0 9px rgba(155, 140, 255, .95));
}
.signal-line-glow { stroke-width: 7; opacity: .18; filter: blur(5px); }
.signal-line-glow.alert { stroke: #6ff2ff; }
.signal-line-glow.doc { stroke: #a896ff; opacity: .26; }
.signal-point.alert { fill: #dffcff; stroke: #6ff2ff; }
.signal-point.doc { fill: #f6f1ff; stroke: #a896ff; stroke-width: 1.3; }
.signal-point { stroke-width: 1; }
.signal-marker circle { fill: #f4feff; }
.signal-marker.doc circle { fill: #eee9ff; }
.signal-marker .signal-marker-ring { fill: none; stroke: rgba(111, 242, 255, .7); }
.signal-marker.doc .signal-marker-ring { stroke: rgba(155, 140, 255, .75); }
.signal-marker text {
  fill: #fff;
  font: 760 9px var(--font-mono);
  paint-order: stroke;
  stroke: rgba(2, 8, 14, .92);
  stroke-width: 3px;
}
.signal-hit { fill: transparent; pointer-events: all; }
/* 悬停读数：十字准线 + 该小时数值气泡（两条线重合时靠它读准确值） */
.signal-cursor[hidden] { display: none; }
.signal-cursor { pointer-events: none; }
.signal-cursor-line { stroke: rgba(223, 246, 251, .45); stroke-width: 1; stroke-dasharray: 3 4; }
.signal-cursor-dot.alert { fill: #dffcff; stroke: #6ff2ff; stroke-width: 1.4; }
.signal-cursor-dot.doc { fill: #f6f1ff; stroke: #a896ff; stroke-width: 1.4; }
.signal-cursor-tip-bg { fill: rgba(5, 12, 18, .95); stroke: rgba(111, 242, 255, .34); stroke-width: 1; }
.signal-cursor-tip-time { fill: #8fa7ae; font: 600 9px var(--font-mono); }
.signal-cursor-tip-value { fill: #dffbff; font: 700 10px var(--font-mono); }
.board-legend { color: #8ba1ab; letter-spacing: .04em; }

@media (max-width: 720px) {
  .collection-resources-dialog { width: calc(100vw - 16px); }
  .collection-resources-body { padding: 14px 12px 6px; }
  .resource-section { padding: 13px; }
  .resource-capability-grid,
  .source-status-summary { grid-template-columns: minmax(0, 1fr); }
  .source-status-toolbar { grid-template-columns: minmax(0, 1fr); }
  .collection-resources-dialog .source-grid { grid-template-columns: minmax(0, 1fr); }
  .collection-resources-dialog .source-list { max-height: none; overflow: visible; }
  .signal-flow-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .signal-scroll-hint { display: block; }
}

/* 连接测试结果弹窗：成功/失败都用同一个弹窗呈现，不依赖角落 toast */
.test-result-dialog { width: min(540px, calc(100vw - 32px)); }
.dialog-body { padding: 22px 24px; display: grid; gap: 8px; }
.test-result-message { margin: 0; font-size: 15px; line-height: 1.7; font-weight: 600; }
.test-result-message.ok { color: var(--accent); }
.test-result-message.err { color: #ff7a90; }

/* 重点目标监测：清单、状态和操作在一个弹窗内闭环。 */
.watch-mode-intro { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.watch-mode-intro > div { min-width: 0; }
.watch-mode-intro .button { flex: 0 0 auto; }
.watch-targets-dialog { width: min(980px, calc(100vw - 32px)); }
.watch-targets-dialog[open] { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; }
.watch-targets-body { min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 16px 22px 10px; }
.watch-targets-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 12px; }
.watch-targets-summary span {
  display: flex; align-items: baseline; gap: 7px; padding: 9px 11px;
  border: 1px solid var(--ui-line); border-radius: 10px; background: rgba(255, 255, 255, .025);
  color: var(--ui-muted); font-size: 10px;
}
.watch-targets-summary b { color: #edfaff; font: 760 18px/1 var(--font-mono); }
.watch-targets-summary .ok { border-color: rgba(69, 223, 177, .24); color: #9fe6d1; }
.watch-targets-summary .warn { border-color: rgba(255, 177, 95, .28); color: #ffd09a; }
.watch-targets-list { display: grid; gap: 10px; }
.watch-target-card {
  min-width: 0; display: grid; gap: 10px; padding: 15px;
  border: 1px solid var(--ui-line); border-radius: 13px;
  background: linear-gradient(155deg, rgba(12, 27, 41, .94), rgba(5, 12, 20, .96));
}
.watch-target-card-head, .watch-target-card-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.watch-target-card-head > div { min-width: 0; }
.watch-target-card-head span { color: #7ddce9; font-size: 9px; font-weight: 720; letter-spacing: .1em; }
.watch-target-card-head h3 { margin: 3px 0 0; color: #f1fbfd; font-size: 16px; }
.watch-target-state { flex: 0 0 auto; padding: 4px 8px; border: 1px solid; border-radius: 999px; font-size: 10px; font-style: normal; }
.watch-target-state.ok { color: #9fe6d1; border-color: rgba(69, 223, 177, .36); background: rgba(69, 223, 177, .09); }
.watch-target-state.warn { color: #ffd09a; border-color: rgba(255, 177, 95, .4); background: rgba(255, 177, 95, .09); }
.watch-target-state.paused { color: #aabac1; border-color: rgba(170, 186, 193, .24); background: rgba(170, 186, 193, .06); }
.watch-target-state.pending { color: #b8e7ef; border-color: rgba(111, 242, 255, .25); background: rgba(111, 242, 255, .06); }
.watch-target-url { min-width: 0; overflow: hidden; color: #92aeb7; font-size: 10.5px; text-overflow: ellipsis; white-space: nowrap; }
.watch-target-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px; }
.watch-target-metrics span { display: grid; gap: 2px; padding: 8px 9px; border: 1px solid rgba(255,255,255,.06); border-radius: 9px; color: var(--ui-subtle); font-size: 9px; }
.watch-target-metrics b { overflow: hidden; color: #e7f8fb; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.watch-target-error { margin: 0; padding: 8px 10px; border-radius: 8px; color: #ffc2a8; background: rgba(255, 122, 144, .07); font-size: 10.5px; }
.watch-target-card-actions small { min-width: 0; overflow: hidden; color: var(--ui-subtle); font-size: 9.5px; text-overflow: ellipsis; white-space: nowrap; }
.watch-targets-dialog > .dialog-actions { margin: 0; padding: 12px 22px; border-top: 1px solid var(--ui-line); background: rgba(3, 9, 16, .96); }
.source-entry[type="button"] { width: 100%; font: inherit; }

@media (max-width: 720px) {
  .watch-mode-intro { display: grid; }
  .watch-mode-intro .button { width: 100%; justify-content: center; }
  .watch-targets-dialog { width: calc(100vw - 16px); }
  .watch-targets-body { padding: 12px; }
  .watch-targets-summary { grid-template-columns: minmax(0, 1fr); }
  .watch-target-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .watch-target-card-actions { align-items: stretch; flex-direction: column; }
  .watch-target-card-actions .button { width: 100%; justify-content: center; }
}

/* ===== 实体关联图谱：科技感增强层 ===== */
.eg-star { fill: rgba(190, 232, 255, .62); }
.eg-stars { animation: eg-twinkle 5.5s ease-in-out infinite; }
@keyframes eg-twinkle { 0%, 100% { opacity: .5; } 50% { opacity: 1; } }
.eg-scan { animation: eg-scan 8.5s linear infinite; }
@keyframes eg-scan {
  0% { transform: translateY(-84px); opacity: 0; }
  10% { opacity: .85; }
  85% { opacity: .85; }
  100% { transform: translateY(560px); opacity: 0; }
}
.eg-aura { pointer-events: none; }
.eg-node.is-hub .eg-aura { animation: eg-aura-breathe 4.4s ease-in-out infinite; }
@keyframes eg-aura-breathe { 0%, 100% { opacity: .62; } 50% { opacity: 1; } }
.eg-ring-soft { stroke-width: .9; stroke-opacity: .3; }
.eg-node.is-hub .eg-ring-soft { stroke-opacity: .52; }
.eg-node.is-active .eg-ring-soft, .eg-node:hover .eg-ring-soft { stroke-opacity: .8; }
.eg-edge.is-strong { filter: drop-shadow(0 0 5px rgba(111, 242, 255, .55)); }
/* 连线上的流动光点：沿同一条贝塞尔路径循环，营造数据在节点间传导的观感 */
.eg-spark { fill: #f2feff; opacity: .92; pointer-events: none; filter: drop-shadow(0 0 5px rgba(111, 242, 255, .95)); }
.eg-svg.eg-focus .eg-edge.is-dim + .eg-spark { opacity: .12; }
.eg-node .eg-label { paint-order: stroke; stroke: rgba(3, 9, 14, .92); stroke-width: 3px; stroke-linejoin: round; }
.eg-label-plate {
  fill: rgba(3, 12, 20, .86); stroke: rgba(132, 231, 244, .18); stroke-width: .8;
  pointer-events: none; transition: fill .18s ease, stroke .18s ease, opacity .18s ease;
}
.eg-node:hover .eg-label-plate, .eg-node.is-active .eg-label-plate { fill: rgba(6, 24, 37, .96); stroke: rgba(132, 231, 244, .58); }
.eg-svg.eg-focus .eg-node.is-dim .eg-label-plate { opacity: .35; }
.eg-node:nth-child(3n) .eg-aura { animation-delay: -.9s; }
.eg-node:nth-child(4n) .eg-aura { animation-delay: -1.8s; }
.eg-node:nth-child(5n) .eg-aura { animation-delay: -2.6s; }
/* 四角科技框：只在画布内部画两角，避免和圆角边框打架 */
.entity-graph-canvas::before,
.entity-graph-canvas::after {
  content: "";
  position: absolute;
  width: 28px; height: 28px;
  pointer-events: none;
  border-color: rgba(111, 242, 255, .55);
  border-style: solid;
  border-width: 0;
}
.entity-graph-canvas::before { top: 9px; left: 9px; border-top-width: 1px; border-left-width: 1px; border-top-left-radius: 12px; }
.entity-graph-canvas::after { bottom: 9px; right: 9px; border-bottom-width: 1px; border-right-width: 1px; border-bottom-right-radius: 12px; }
@media (prefers-reduced-motion: reduce) {
  .eg-scan, .eg-stars, .eg-aura { animation: none !important; }
}

/* 采集闭环在窄屏改为纵向时间线，保留完整阶段信息。 */
@media (max-width: 1080px) {
  .collection-journey { grid-template-columns: 1fr; gap: 8px; }
  .collection-journey > i { display: none; }
  .collection-journey > div { grid-template-columns: 36px 1fr; padding: 4px 0; }
  .collection-journey strong, .collection-journey small { white-space: normal; }
}

/* 所有功能卡片共享清晰的键盘焦点和微弱边缘光，强化科技感但不干扰操作。 */
:where(.panel,.integration-card,.source-card,.alert-card,.evidence-card):focus-within {
  border-color: rgba(91,200,239,.42);
  box-shadow: 0 0 0 1px rgba(91,200,239,.08),0 18px 50px rgba(0,0,0,.2);
}
:where(button,a,input,select,textarea):focus-visible {
  outline: 2px solid rgba(111,242,255,.88);
  outline-offset: 3px;
}

/* ===== HUD 装饰层：四角标 + 雷达扫描环（纯装饰，不吃指针） ===== */
.situation-board > .board-hud {
  position: absolute;
  inset: 7px;
  z-index: 3;
  pointer-events: none;
  overflow: hidden;
  border-radius: 14px;
}
.board-hud .hud-corner {
  position: absolute;
  width: 28px;
  height: 28px;
  border: 2px solid rgba(111, 242, 255, .62);
  filter: drop-shadow(0 0 6px rgba(111, 242, 255, .45));
  animation: hud-breathe 4.4s ease-in-out infinite;
}
.board-hud .hud-corner.tl { top: 0; left: 0; border-right: 0; border-bottom: 0; border-top-left-radius: 12px; }
.board-hud .hud-corner.tr { top: 0; right: 0; border-left: 0; border-bottom: 0; border-top-right-radius: 12px; animation-delay: 1.1s; }
.board-hud .hud-corner.bl { bottom: 0; left: 0; border-right: 0; border-top: 0; border-bottom-left-radius: 12px; animation-delay: 2.2s; }
.board-hud .hud-corner.br { bottom: 0; right: 0; border-left: 0; border-top: 0; border-bottom-right-radius: 12px; animation-delay: 3.3s; }
@keyframes hud-breathe {
  0%, 100% { opacity: .42; filter: drop-shadow(0 0 3px rgba(111, 242, 255, .28)); }
  50% { opacity: 1; filter: drop-shadow(0 0 13px rgba(111, 242, 255, .9)); }
}

/* 雷达环：右上角 conic 扇形缓慢自转，边缘径向淡出 */
.board-hud .hud-radar {
  position: absolute;
  top: -128px;
  right: -128px;
  width: 380px;
  height: 380px;
  border-radius: 50%;
  opacity: .42;
  background: conic-gradient(from 0deg, rgba(111, 242, 255, .55), rgba(111, 242, 255, .12) 24%, transparent 46%, transparent 100%);
  -webkit-mask-image: radial-gradient(closest-side, rgba(0, 0, 0, .95), rgba(0, 0, 0, .5) 60%, transparent 84%);
  mask-image: radial-gradient(closest-side, rgba(0, 0, 0, .95), rgba(0, 0, 0, .5) 60%, transparent 84%);
  box-shadow: inset 0 0 0 1px rgba(111, 242, 255, .18);
  animation: hud-radar-spin 7.6s linear infinite;
}
.board-hud .hud-radar::after {
  content: "";
  position: absolute;
  inset: 17%;
  border-radius: 50%;
  border: 1px dashed rgba(111, 242, 255, .2);
}
.board-hud .hud-radar::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid rgba(111, 242, 255, .16);
}
@keyframes hud-radar-spin { to { transform: rotate(360deg); } }

.situation-board.is-theater .board-hud .hud-corner { border-color: rgba(111, 242, 255, .8); }
.situation-board.is-theater .board-hud .hud-radar { opacity: .55; }

/* ===== 流光提速（一眼可见） ===== */
.board-levels progress,
.board-ranks progress { animation-duration: 2.2s; }
.board-levels .lvl-row.s0 progress { animation-duration: 1.6s; }
.situation-board.is-theater .board-trend::after { animation-duration: 3.6s; }
.situation-board .board-ticker-track { animation-duration: 64s; }

@media (prefers-reduced-motion: reduce) {
  .board-hud .hud-corner,
  .board-hud .hud-radar { animation: none; opacity: .3; }
}

/* ===== 等级构成：整行呼吸 + 等级牌呼吸 + 数字呼吸 + 进度条加大振幅 ===== */
.board-levels .lvl-row {
  border-radius: 8px;
  animation: lvl-row-breathe 5.2s ease-in-out infinite;
}
.board-levels .lvl-row:nth-child(2) { animation-delay: 1.7s; }
.board-levels .lvl-row:nth-child(3) { animation-delay: 3.4s; }
@keyframes lvl-row-breathe {
  0%, 100% { background: rgba(255, 255, 255, 0); }
  50% { background: rgba(111, 242, 255, .055); }
}
.board-levels .lvl-tag { animation: lvl-tag-breathe 4.2s ease-in-out infinite; }
.board-levels .lvl-row:nth-child(2) .lvl-tag { animation-delay: 1.4s; }
.board-levels .lvl-row:nth-child(3) .lvl-tag { animation-delay: 2.8s; }
@keyframes lvl-tag-breathe {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.4); }
}
.board-levels .lvl-row b { animation: lvl-num-breathe 3.6s ease-in-out infinite; }
.board-levels .lvl-row:nth-child(2) b { animation-delay: 1.2s; }
.board-levels .lvl-row:nth-child(3) b { animation-delay: 2.4s; }
@keyframes lvl-num-breathe {
  0%, 100% { opacity: .78; }
  50% { opacity: 1; }
}
@keyframes bar-glow {
  0%, 100% { filter: drop-shadow(0 0 3px rgba(111, 242, 255, .18)) brightness(1); }
  50% { filter: drop-shadow(0 0 14px rgba(111, 242, 255, .85)) brightness(1.18); }
}
@keyframes bar-glow-hot {
  0%, 100% { filter: drop-shadow(0 0 3px rgba(255, 95, 122, .2)) brightness(1); }
  50% { filter: drop-shadow(0 0 14px rgba(255, 95, 122, .9)) brightness(1.2); }
}

/* ===== 24h 信号流：实线白轴 + 统一节点 ===== */
.board-trend .signal-axis-rule {
  stroke: rgba(255, 255, 255, .62);
  stroke-width: 1.4;
  stroke-linecap: round;
  filter: drop-shadow(0 0 4px rgba(255, 255, 255, .3));
}
.board-trend .signal-axis-rule.axis-y { stroke: rgba(255, 255, 255, .55); }
.board-trend .signal-time-line { stroke: rgba(148, 190, 204, .08); stroke-dasharray: none; }
.board-trend .signal-lane-line { stroke: rgba(255, 255, 255, .06); }
/* 所有节点同款：环 + 实心点（峰值额外带数字） */
.board-trend .signal-marker-ring {
  stroke-width: 1.3;
  transform-box: fill-box;
  transform-origin: center;
  animation: signal-ring-breathe 3.4s ease-in-out infinite;
}
.board-trend .signal-marker circle:not(.signal-marker-ring) {
  filter: drop-shadow(0 0 5px rgba(223, 252, 255, .85));
}

/* ===== 图表顶部四个指标块：科技卡片 + 入库文档紫色突出 ===== */
.signal-flow-summary > span {
  position: relative;
  padding: 7px 9px 8px;
  border-radius: 9px;
  border: 1px solid rgba(111, 242, 255, .16);
  background: linear-gradient(180deg, rgba(111, 242, 255, .07), rgba(255, 255, 255, .012));
  overflow: hidden;
  animation: summary-tile-breathe 5.2s ease-in-out infinite;
}
.signal-flow-summary > span::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 12px;
  height: 12px;
  border-top: 1px solid rgba(111, 242, 255, .5);
  border-right: 1px solid rgba(111, 242, 255, .5);
  border-top-right-radius: 9px;
  pointer-events: none;
}
.signal-flow-summary > span:nth-child(2) {
  border-color: rgba(168, 150, 255, .45);
  background: linear-gradient(180deg, rgba(155, 140, 255, .18), rgba(155, 140, 255, .03));
  animation: summary-tile-breathe-doc 3.6s ease-in-out infinite;
}
.signal-flow-summary > span:nth-child(2)::after {
  border-top-color: rgba(190, 176, 255, .85);
  border-right-color: rgba(190, 176, 255, .85);
}
.signal-flow-summary > span:nth-child(2) small { color: #bba9ff; }
.signal-flow-summary > span:nth-child(2) strong {
  color: #f3eeff;
  text-shadow: 0 0 16px rgba(168, 150, 255, .8);
}
@keyframes summary-tile-breathe {
  0%, 100% { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), 0 6px 14px rgba(0, 0, 0, .22); }
  50% { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18), 0 0 15px rgba(111, 242, 255, .16), 0 6px 14px rgba(0, 0, 0, .22); }
}
@keyframes summary-tile-breathe-doc {
  0%, 100% {
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14), 0 0 10px rgba(155, 140, 255, .14);
  }
  50% {
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .24), inset 0 14px 24px -20px rgba(168, 150, 255, .95), 0 0 26px rgba(155, 140, 255, .42);
  }
}

@media (prefers-reduced-motion: reduce) {
  .board-levels .lvl-row,
  .board-levels .lvl-tag,
  .board-levels .lvl-row b,
  .signal-flow-summary > span,
  .board-trend .signal-marker-ring { animation: none !important; }
}

/* ===== 等级构成：把呼吸做到一眼可见（徽标 / 进度条 / 行底 / 数字 / 百分比） ===== */
.board-levels .lvl-row {
  position: relative;
  padding: 2px 5px;
  animation: lvl-row-breathe 4.6s ease-in-out infinite;
}
.board-levels .lvl-row:nth-child(2) { animation-delay: 1.5s; }
.board-levels .lvl-row:nth-child(3) { animation-delay: 3s; }
@keyframes lvl-row-breathe {
  0%, 100% { background: rgba(111, 242, 255, 0); }
  50% { background: rgba(111, 242, 255, .12); }
}
/* 左侧竖条随呼吸点亮，按等级上色 */
.board-levels .lvl-row::after {
  content: "";
  position: absolute;
  left: 0;
  top: 12%;
  bottom: 12%;
  width: 3px;
  border-radius: 3px;
  pointer-events: none;
  animation: lvl-accent-breathe 4.6s ease-in-out infinite;
}
.board-levels .lvl-row.s0::after { background: linear-gradient(180deg, transparent, #ff5f7a, transparent); animation-delay: 0s; }
.board-levels .lvl-row.s1::after { background: linear-gradient(180deg, transparent, #ffc46b, transparent); animation-delay: 1.5s; }
.board-levels .lvl-row.s2::after { background: linear-gradient(180deg, transparent, #6ff2ff, transparent); animation-delay: 3s; }
@keyframes lvl-accent-breathe {
  0%, 100% { opacity: .2; box-shadow: none; }
  50% { opacity: 1; box-shadow: 0 0 12px rgba(255, 255, 255, .5); }
}
/* 等级徽标：缩放 + 亮度 + 外发光一起呼吸 */
.board-levels .lvl-tag {
  animation: lvl-tag-breathe 3.6s ease-in-out infinite;
  will-change: transform, filter;
}
.board-levels .lvl-row:nth-child(2) .lvl-tag { animation-delay: 1.2s; }
.board-levels .lvl-row:nth-child(3) .lvl-tag { animation-delay: 2.4s; }
@keyframes lvl-tag-breathe {
  0%, 100% {
    transform: scale(1);
    filter: brightness(.88);
    box-shadow: 0 0 4px rgba(255, 255, 255, .1), inset 0 0 0 1px rgba(255, 255, 255, .2);
  }
  50% {
    transform: scale(1.09);
    filter: brightness(1.5);
    box-shadow: 0 0 22px currentColor, inset 0 0 0 1px rgba(255, 255, 255, .62);
  }
}
/* 进度条：亮度 + 辉光大幅起落 */
@keyframes bar-glow {
  0%, 100% { filter: drop-shadow(0 0 2px rgba(111, 242, 255, .1)) brightness(.82); }
  50% { filter: drop-shadow(0 0 16px rgba(111, 242, 255, .95)) brightness(1.5); }
}
@keyframes bar-glow-hot {
  0%, 100% { filter: drop-shadow(0 0 2px rgba(255, 95, 122, .12)) brightness(.82); }
  50% { filter: drop-shadow(0 0 16px rgba(255, 95, 122, 1)) brightness(1.55); }
}
/* 数字与百分比 */
.board-levels .lvl-row b { animation: lvl-num-breathe 3.2s ease-in-out infinite; }
.board-levels .lvl-row:nth-child(2) b { animation-delay: 1s; }
.board-levels .lvl-row:nth-child(3) b { animation-delay: 2s; }
@keyframes lvl-num-breathe {
  0%, 100% { filter: brightness(.85); opacity: .85; }
  50% { filter: brightness(1.6); opacity: 1; }
}
.board-levels .lvl-row i { animation: lvl-pct-breathe 4s ease-in-out infinite; }
.board-levels .lvl-row:nth-child(2) i { animation-delay: 1.3s; }
.board-levels .lvl-row:nth-child(3) i { animation-delay: 2.6s; }
@keyframes lvl-pct-breathe {
  0%, 100% { opacity: .55; }
  50% { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .board-levels .lvl-row,
  .board-levels .lvl-row::after,
  .board-levels .lvl-tag,
  .board-levels .lvl-row b,
  .board-levels .lvl-row i { animation: none !important; }
}

/* 来源地区：一个框，先选大洲，再在同一个框里选国家 */
.filter-field.region-picker-field { position: relative; gap: 5px; }
.region-picker { position: relative; }
.region-picker-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  min-height: 34px;
  padding: 6px 10px;
  font: inherit;
  font-size: 12px;
  color: #dff5fb;
  text-align: left;
  background: rgba(255, 255, 255, .02);
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 10px;
  cursor: pointer;
}
.region-picker-trigger:hover { border-color: rgba(111, 242, 255, .3); }
.region-picker-trigger em { font-style: normal; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.region-picker-trigger i { color: #6ff2ff; font-style: normal; font-size: 10px; }
.region-picker-panel {
  position: absolute;
  z-index: 40;
  top: calc(100% + 4px);
  left: 0;
  min-width: 168px;
  max-height: 264px;
  overflow-y: auto;
  padding: 4px;
  background: rgba(6, 14, 20, .97);
  border: 1px solid rgba(111, 242, 255, .26);
  border-radius: 10px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, .55);
}
.region-picker-panel[hidden] { display: none; }
.region-picker-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  padding: 7px 9px;
  font: inherit;
  font-size: 12px;
  color: #d5eaf1;
  text-align: left;
  background: transparent;
  border: 0;
  border-radius: 7px;
  cursor: pointer;
}
.region-picker-item:hover, .region-picker-item:focus-visible { background: rgba(111, 242, 255, .14); color: #f2feff; }
.region-picker-item.is-back { color: #8fb4bf; border-bottom: 1px solid rgba(255, 255, 255, .08); border-radius: 7px 7px 0 0; }
.region-picker-item span[aria-hidden="true"] { color: #6ff2ff; }

/* 来源地区：与「采集来源 / 来源类型」等原生下拉完全对齐（同高、同边框、同字号） */
.filter-field.region-picker-field { gap: 6px; }
.filter-field.region-picker-field > span {
  font-size: 10.5px;
  letter-spacing: .06em;
  color: #7d95a0;
}
.region-picker { position: relative; display: grid; }
.filter-field.region-picker-field .region-picker-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  font: inherit;
  font-size: 13px;
  line-height: 22px;
  color: var(--ink);
  text-align: left;
  background: rgba(4, 10, 16, .55);
  border: 1px solid var(--line);
  border-radius: 9px;
  cursor: pointer;
  transition: border-color .18s, box-shadow .18s, background .18s;
}
.filter-field.region-picker-field .region-picker-trigger:hover { border-color: rgba(111, 242, 255, .3); }
.filter-field.region-picker-field .region-picker-trigger i {
  color: #6ff2ff;
  font-style: normal;
  font-size: 10px;
  line-height: 1;
}
.filter-field.region-picker-field .region-picker-trigger em {
  font-style: normal;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.filter-field.region-picker-field .region-picker-panel { min-width: 100%; }


/* ===== 统一层 v1：设计变量 + 组件一致性收敛（仅视觉，不改任何逻辑） ===== */
:root {
  /* 间距阶 */
  --space-1: 6px;
  --space-2: 10px;
  --space-3: 14px;
  --space-4: 18px;
  --space-5: 22px;
  /* 圆角阶 */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-pill: 999px;
  /* 尺寸 */
  --control-h: 44px;
  --control-h-sm: 34px;
  --chip-h: 28px;
  --chip-pad-x: 12px;
  --chip-gap: 8px;
  /* 字号 */
  --fs-label: 10.5px;
  --fs-body: 13px;
  --fs-sm: 11.5px;
  /* 冰青主色（与态势板同源，交互态统一用它；绿色留给状态语义） */
  --ice: #6ff2ff;
  --ice-soft: rgba(111, 242, 255, .1);
  --ice-line: rgba(111, 242, 255, .34);
}

/* ---- 1) 胶囊标签：一套尺寸、一套悬停/选中 ---- */
.domain-chip,
.mix-chip,
.readiness-chip,
.integration-chip,
.eg-chip,
.preview-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: var(--chip-h);
  padding: 0 var(--chip-pad-x);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, .03);
  color: #cfe3ea;
  font-size: var(--fs-sm);
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  transition: color .18s, background .18s, border-color .18s, box-shadow .18s;
}
.domain-chip:hover,
.mix-chip:hover,
.readiness-chip:hover,
.integration-chip:hover,
.eg-chip:hover,
.preview-chip:hover {
  border-color: var(--ice-line);
  background: var(--ice-soft);
  color: #f2feff;
}
.domain-chip.is-active,
.mix-chip.is-active,
.eg-chip[aria-pressed="false"] {
  background: var(--ice);
  border-color: transparent;
  color: #03131a;
  box-shadow: 0 0 18px rgba(111, 242, 255, .28);
}
.domain-chip small,
.mix-chip b,
.eg-count,
.readiness-chip b,
.integration-chip b {
  margin-left: 6px;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  opacity: .7;
  color: inherit;
}
.domain-chip.is-active small,
.mix-chip.is-active b { opacity: .8; }

/* 容器间距统一 */
.domain-chips,
.readiness-chips,
.preview-chips,
.mix-row,
.board-mix { gap: var(--chip-gap); }

/* ---- 2) 分段控件里的等级 chip ---- */
.level-chip {
  min-height: 30px;
  padding: 0 12px;
  border-radius: var(--radius-sm);
  font-size: var(--fs-sm);
  font-weight: 700;
  letter-spacing: .02em;
}
.alert-level-chips { padding: 3px; border-radius: 11px; }

/* 关键词 chip（带删除按钮）保持结构，只统一外观 */
.keyword-chip {
  min-height: 26px;
  border-radius: var(--radius-pill);
  font-size: var(--fs-sm);
  font-weight: 600;
}

/* ---- 3) 表单控件：同高、同圆角、同字号 ---- */
.filter-field select,
.filter-field > input,
.alert-filter-grid select,
.task-combobox input[type="search"] {
  min-height: var(--control-h);
  font-size: var(--fs-body);
  border-radius: 9px;
}
.filter-field > span,
.filter-bar .filter-field > span {
  font-size: var(--fs-label);
  letter-spacing: .06em;
  color: #7d95a0;
}
.filter-bar { gap: 10px 12px; }

/* ---- 4) 按钮：统一高度/圆角/字重；主按钮改为冰青（与态势板同源） ---- */
/* 只统一高度/圆角/字重，横向 padding 保持各按钮原有节奏，避免窄容器里被挤成两行 */
.button {
  min-height: 40px;
  border-radius: 10px;
  font-size: 12.5px;
  font-weight: 650;
  letter-spacing: .01em;
  white-space: nowrap;
}
.button.primary {
  background: linear-gradient(180deg, #8ef8ff, #4fd8ea);
  color: #03131a;
  border-color: transparent;
  box-shadow: 0 10px 26px rgba(79, 216, 234, .18);
}
.button.primary:hover { box-shadow: 0 12px 32px rgba(111, 242, 255, .28); }
.button.ghost { border-color: var(--line); }
.button.ghost:hover { border-color: var(--ice-line); background: var(--ice-soft); color: #f2feff; }
.button.small { min-height: 30px; font-size: var(--fs-sm); }
.button.ghost.compact { min-height: 30px; font-size: var(--fs-sm); }
.icon-button { width: 34px; height: 34px; border-radius: 10px; }

/* ---- 5) 卡片 / 面板：统一圆角、描边与内边距节奏 ---- */
.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  box-shadow: 0 18px 48px rgba(0, 0, 0, .22);
}
.panel > .panel-header:first-child { margin-bottom: var(--space-3); }
.board-block { padding: var(--space-3); border-radius: var(--radius-md); }

/* ---- 6) 弹窗：统一圆角与内部留白 ---- */
.app-dialog { border-radius: var(--radius-lg); }
.app-dialog .dialog-actions { gap: var(--space-2); padding: var(--space-3) var(--space-4); }

/* ---- 7) 列表 / 表格：行高与分隔线一致 ---- */
.table th,
.table td,
table th,
table td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, .05);
}
table tbody tr:hover { background: rgba(111, 242, 255, .04); }

/* ---- 8) 焦点态统一为冰青 ---- */
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
.region-picker-trigger:focus-visible {
  outline: 2px solid var(--ice);
  outline-offset: 2px;
}

/* ---- 9) 态势板（C）：间距与排版节奏收敛，动画一律保留 ---- */
.board-kpi {
  padding: 14px 16px;
  border-radius: var(--radius-md);
}
.board-kpi-label { font-size: var(--fs-label); letter-spacing: .08em; }
.board-kpi-hint { font-size: var(--fs-label); }
.board-block { gap: var(--space-2); }
.board-block > header { gap: var(--space-2); }
.board-block h3 { font-size: 12px; letter-spacing: .04em; }
.board-levels { gap: 9px; }
.board-levels .lvl-row { gap: 10px; }
.board-mix .mix-row { margin-top: 6px; }
.board-ranks { gap: 7px; }
.rank-row { gap: 10px; min-height: 26px; }
.board-ticker { padding: 10px 0; }
.board-ticker .ticker-item { font-size: var(--fs-sm); }
.board-head-actions { gap: var(--space-2); }
.board-live { font-size: var(--fs-label); }

/* 顶部账号区也走同一套胶囊尺寸 */
.user-chip {
  min-height: 34px;
  padding: 3px 12px 3px 3px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
}


/* ===== 弹窗页脚常驻：矮屏下「保存/确认」不再被挤出视口 ===== */
/* 滚动容器在 dialog 本身，页脚用 sticky 贴在可视区底部并铺一层渐变底，避免压住正文 */
.app-dialog .dialog-actions {
  position: sticky;
  bottom: 0;
  z-index: 3;
  margin-top: 4px;
  padding-top: 12px;
  padding-bottom: 4px;
  background: linear-gradient(180deg, rgba(13, 24, 35, 0), rgba(13, 24, 35, .94) 42%);
}
/* 自定义采集平台弹窗：内容区可滚，按钮永远在视野内 */
#platform-dialog .dialog-actions { position: sticky; bottom: 0; }
#platform-dialog form { padding-bottom: 2px; }

/* 矮屏（≤700px 高）收紧留白，让整张表单一屏内可见 */
@media (max-height: 700px) {
  .app-dialog {
    max-height: calc(100vh - 20px);
  }
  .app-dialog .dialog-header {
    padding: 12px 16px;
  }
  .app-dialog .dialog-body,
  #platform-dialog form {
    padding-left: 16px;
    padding-right: 16px;
  }
  #platform-dialog .schedule-grid,
  .app-dialog .schedule-grid {
    gap: 8px 10px;
  }
  .app-dialog .field input,
  .app-dialog .field select {
    min-height: 40px;
  }
}


/* ===== 内置连接配置弹窗：内容超过一屏必须能滚到底 ===== */
/* 账号授权面板（API ID / API Hash / 手机号 + 登录按钮）在图里被裁成半截：
   dialog 本身 overflow-y:hidden + 固定 max-height，内容 1205px 只显示 792px，后半段既看不到也滚不到。 */
#builtin-integration-dialog {
  overflow-y: auto;
  overscroll-behavior: contain;
  scroll-padding-bottom: 84px;
}
#builtin-integration-dialog > form { padding-bottom: 72px; }
/* 72px ≈ 常驻页脚高度：滚到底时最后一段内容正好停在页脚上方，不会留出一片空白也不会被压住。 */
/* 标题栏同样是吸顶的：聚焦/滚动到字段时留出上下安全区，避免停在标题栏或页脚后面。 */
#builtin-integration-dialog .field,
#builtin-integration-dialog .telegram-auth-panel { scroll-margin-top: 96px; scroll-margin-bottom: 76px; }
#builtin-integration-dialog .telegram-auth-panel { margin-bottom: 4px; }
#builtin-integration-dialog .telegram-auth-actions { flex-wrap: wrap; gap: 8px; }
