/* 个人工作台 —— 浅色暖白底 + 中行红点缀 */
:root {
  --bg: #f6f5f3;
  --card: #ffffff;
  --ink: #1f2329;
  --ink2: #4a4f57;
  --muted: #959aa3;
  --line: #e9e6e1;
  --red: #a6092e;
  --red-deep: #8c0827;
  --red-soft: #f9ecef;
  --red-line: #eccfd6;
  --up: #c0392b;
  --down: #1e8449;
  --gold: #b8860b;
  --shadow: 0 1px 2px rgba(31, 35, 41, .04), 0 4px 16px rgba(31, 35, 41, .05);
  --mono: "SF Mono", ui-monospace, Menlo, Consolas, monospace;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--bg); color: var(--ink); font-size: 14px; line-height: 1.6;
}
.hidden { display: none !important; }
button { font-family: inherit; cursor: pointer; }
input { font-family: inherit; }

/* ---------- 口令门 ---------- */
.gate {
  position: fixed; inset: 0; background: var(--bg);
  display: flex; align-items: center; justify-content: center; z-index: 99;
}
.gate-card {
  background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  box-shadow: var(--shadow); padding: 44px 40px 36px; width: 320px; text-align: center;
}
.gate-logo {
  width: 52px; height: 52px; margin: 0 auto 14px; border-radius: 13px;
  background: var(--red); color: #fff; font-size: 26px; font-family: serif;
  display: flex; align-items: center; justify-content: center;
}
.gate-card h1 { font-size: 19px; letter-spacing: 2px; }
.gate-sub { color: var(--muted); font-size: 12px; margin: 6px 0 22px; }
.gate-card input {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px;
  font-size: 15px; outline: none; text-align: center; letter-spacing: 1px; background: #fbfaf9;
}
.gate-card input:focus { border-color: var(--red); }
.gate-card button {
  width: 100%; margin-top: 12px; padding: 10px; border: 0; border-radius: 8px;
  background: var(--red); color: #fff; font-size: 15px; letter-spacing: 6px;
}
.gate-card button:hover { background: var(--red-deep); }
.gate-err { color: var(--red); font-size: 12px; margin-top: 10px; }

/* ---------- 顶栏 ---------- */
.topbar {
  height: 52px; background: var(--card); border-bottom: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 18px; position: sticky; top: 0; z-index: 10;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark {
  width: 28px; height: 28px; border-radius: 7px; background: var(--red); color: #fff;
  font-size: 15px; font-family: serif; display: flex; align-items: center; justify-content: center;
}
.brand-name { font-weight: 600; font-size: 15px; letter-spacing: 1px; }
.brand-date { color: var(--muted); font-size: 12px; margin-left: 6px; }
.topbar-right { display: flex; align-items: center; gap: 14px; }
.conn { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.conn i { width: 8px; height: 8px; border-radius: 50%; background: #c9cdd4; }
.conn.ok i { background: var(--down); }
.conn.bad i { background: var(--up); }
.conn em { font-style: normal; }
.lock-btn {
  border: 1px solid var(--line); background: #fbfaf9; border-radius: 8px;
  width: 30px; height: 30px; color: var(--ink2); font-size: 14px;
}
.lock-btn:hover { color: var(--red); border-color: var(--red-line); }

/* ---------- 行情跑马灯 ---------- */
.ticker-wrap {
  background: #fff; border-bottom: 1px solid var(--line); overflow: hidden; height: 38px;
  display: flex; align-items: center;
}
.ticker { display: flex; gap: 34px; white-space: nowrap; padding: 0 18px; width: max-content; animation: marquee 60s linear infinite; }
.ticker:hover { animation-play-state: paused; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.tk { display: inline-flex; align-items: baseline; gap: 7px; font-size: 12.5px; }
.tk b { font-weight: 500; color: var(--ink2); }
.tk .px { font-family: var(--mono); font-weight: 600; }
.tk .chg { font-family: var(--mono); font-size: 11.5px; }
.up { color: var(--up); }
.down { color: var(--down); }
.flat { color: var(--muted); }

/* ---------- 布局 ---------- */
.shell { display: flex; min-height: calc(100vh - 90px); }
.side {
  width: 148px; flex: none; background: var(--card); border-right: 1px solid var(--line);
  padding: 14px 10px; display: flex; flex-direction: column; gap: 4px;
}
.nav-btn {
  display: flex; align-items: center; gap: 9px; padding: 9px 12px; border: 0;
  background: none; border-radius: 8px; font-size: 13.5px; color: var(--ink2);
  position: relative; text-align: left;
}
.nav-btn span { width: 16px; text-align: center; color: var(--muted); }
.nav-btn:hover { background: #f5f3f1; }
.nav-btn.active { background: var(--red-soft); color: var(--red); font-weight: 600; }
.nav-btn.active span { color: var(--red); }
.main { flex: 1; padding: 18px; min-width: 0; }

/* ---------- 卡片 ---------- */
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: var(--shadow); padding: 16px 18px;
}
.card-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 12px; }
.card-head h2 { font-size: 15px; font-weight: 600; }
.card-head h2::before {
  content: ""; display: inline-block; width: 3px; height: 13px; background: var(--red);
  border-radius: 2px; margin-right: 8px; vertical-align: -1px;
}
.card-sub { color: var(--muted); font-size: 12px; }

/* ---------- 工作台网格 ---------- */
.dash-grid {
  display: grid; gap: 16px;
  grid-template-columns: minmax(380px, 1.15fr) minmax(300px, .85fr);
  grid-template-areas: "todo events" "feed surprises";
}
.todo-card { grid-area: todo; }
.events-card { grid-area: events; }
.feed-card { grid-area: feed; }
.surprise-card { grid-area: surprises; }

/* 本周待办 */
.week-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.day {
  border: 1px solid var(--line); border-radius: 8px; min-height: 92px; padding: 6px 7px;
  background: #fcfbf9; font-size: 12px;
}
.day.today { border-color: var(--red-line); background: var(--red-soft); }
.day .d-head { color: var(--muted); font-size: 11px; display: flex; justify-content: space-between; margin-bottom: 4px; }
.day.today .d-head { color: var(--red); font-weight: 600; }
.day .d-num { font-family: var(--mono); }
.t-item { display: flex; gap: 5px; align-items: flex-start; margin-bottom: 3px; line-height: 1.4; }
.t-item input[type=checkbox] { margin-top: 3px; accent-color: var(--red); flex: none; }
.t-item .tx { flex: 1; word-break: break-all; }
.t-item.done .tx { text-decoration: line-through; color: var(--muted); }
.t-item .del { border: 0; background: none; color: #c9cdd4; font-size: 11px; padding: 0 2px; flex: none; }
.t-item .del:hover { color: var(--red); }
.todo-add { display: flex; gap: 8px; margin-top: 12px; }
.todo-add input[type=date] {
  border: 1px solid var(--line); border-radius: 8px; padding: 7px 9px; font-size: 13px;
  background: #fbfaf9; color: var(--ink2); outline: none; flex: none;
}
.todo-add input[type=text] {
  flex: 1; border: 1px solid var(--line); border-radius: 8px; padding: 7px 11px;
  font-size: 13.5px; outline: none; background: #fbfaf9;
}
.todo-add input:focus, .note-add input:focus, .link-add input:focus, .note-q:focus { border-color: var(--red); }
.todo-add button, .note-add button, .link-add button {
  border: 0; border-radius: 8px; background: var(--red); color: #fff; padding: 7px 18px; font-size: 13.5px; flex: none;
}
.todo-add button:hover, .note-add button:hover, .link-add button:hover { background: var(--red-deep); }

/* 重要事件 */
.upcoming { display: flex; flex-direction: column; }
.ev {
  display: flex; gap: 11px; padding: 9px 4px; border-bottom: 1px dashed var(--line); align-items: flex-start;
}
.ev:last-child { border-bottom: 0; }
.ev .ev-date { font-family: var(--mono); font-size: 12px; color: var(--muted); flex: none; width: 44px; padding-top: 2px; }
.ev .ev-body { flex: 1; }
.ev .ev-title { font-size: 13.5px; }
.ev .ev-note { color: var(--muted); font-size: 12px; }
.ev .lv {
  flex: none; font-size: 11px; border-radius: 4px; padding: 1px 7px; margin-top: 2px;
}
.lv.high { background: var(--red); color: #fff; }
.lv.mid { background: #f4ede1; color: var(--gold); }
.lv.todo { background: #eef1f5; color: var(--ink2); }
.ev.ev-today { background: var(--red-soft); border-radius: 8px; padding-left: 8px; padding-right: 8px; }

/* 实时信息流 */
.feed { max-height: 560px; overflow-y: auto; display: flex; flex-direction: column; }
.fi { padding: 10px 6px; border-bottom: 1px solid var(--line); display: flex; gap: 12px; }
.fi:last-child { border-bottom: 0; }
.fi .fi-time { font-family: var(--mono); font-size: 12px; color: var(--muted); flex: none; width: 42px; padding-top: 2px; }
.fi .fi-body { flex: 1; min-width: 0; }
.fi .fi-head { display: flex; align-items: center; gap: 8px; margin-bottom: 2px; flex-wrap: wrap; }
.fi .fi-title { font-size: 13.5px; font-weight: 600; }
.fi .fi-text { font-size: 13px; color: var(--ink2); }
.src { font-size: 10.5px; border-radius: 4px; padding: 0 6px; flex: none; line-height: 17px; }
.src.见闻 { background: #eef1f5; color: #5a6472; }
.src.金十 { background: var(--red); color: #fff; }
.src.美联储 { background: #1f2a3d; color: #fff; }
.fi .fi-tag { font-size: 10.5px; color: var(--muted); border: 1px solid var(--line); border-radius: 4px; padding: 0 5px; line-height: 16px; }
.fi.imp { background: var(--red-soft); border-left: 3px solid var(--red); border-radius: 0 8px 8px 0; }
.feed-more { text-align: center; color: var(--muted); font-size: 12.5px; padding: 10px; cursor: pointer; border-top: 1px dashed var(--line); margin-top: 6px; }
.feed-more:hover { color: var(--red); }

/* ---------- 事件日历 ---------- */
.cal-head { align-items: center; }
.cal-head h2 { min-width: 130px; text-align: center; }
.cal-head h2::before { display: none; }
.cal-nav {
  width: 30px; height: 30px; border: 1px solid var(--line); background: #fbfaf9;
  border-radius: 8px; font-size: 16px; color: var(--ink2);
}
.cal-nav:hover { border-color: var(--red-line); color: var(--red); }
.cal-legend { margin-left: auto; color: var(--muted); font-size: 12px; display: flex; align-items: center; gap: 4px; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin: 0 3px 0 10px; }
.dot.high { background: var(--red); }
.dot.mid { background: var(--gold); }
.dot.todo { background: #8a93a3; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cal-grid .wd { text-align: center; color: var(--muted); font-size: 12px; padding: 4px 0; }
.cal-cell {
  border: 1px solid var(--line); border-radius: 8px; min-height: 64px; padding: 5px 7px;
  background: #fcfbf9; font-size: 12px;
}
.cal-cell.blank { border: 0; background: none; }
.cal-cell .c-num { font-family: var(--mono); color: var(--ink2); }
.cal-cell.today { border-color: var(--red-line); background: var(--red-soft); }
.cal-cell.today .c-num { color: var(--red); font-weight: 700; }
.cal-dots { display: flex; gap: 3px; margin-top: 5px; flex-wrap: wrap; }
.cal-ev { font-size: 11px; color: var(--ink2); line-height: 1.35; margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-ev.high { color: var(--red); font-weight: 600; }
.cal-list { display: flex; flex-direction: column; }

/* ---------- 中期选举 ---------- */
.el-head { display: flex; align-items: baseline; gap: 14px; margin-bottom: 14px; flex-wrap: wrap; }
.el-title { font-size: 18px; font-weight: 700; }
.el-title::before { content: "🗳 "; }
.el-countdown {
  background: var(--red); color: #fff; border-radius: 6px; padding: 2px 10px;
  font-size: 12.5px; font-family: var(--mono);
}
.el-refresh {
  margin-left: auto; border: 1px solid var(--red-line); background: var(--red-soft); color: var(--red);
  border-radius: 8px; padding: 6px 14px; font-size: 13px;
}
.el-refresh:hover { background: var(--red); color: #fff; }
.el-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 16px; }
.el-card h3 { font-size: 12px; color: var(--muted); font-weight: 500; letter-spacing: .5px; margin-bottom: 8px; }
.el-odds { font-size: 24px; font-weight: 700; font-family: var(--mono); }
.el-odds.rep { color: var(--up); }
.el-odds.dem { color: #2563eb; }
.el-bar { height: 7px; border-radius: 4px; background: #eef1f5; margin: 9px 0 7px; overflow: hidden; }
.el-bar i { display: block; height: 100%; border-radius: 4px; }
.el-card .card-sub { display: block; }
.scen { display: flex; justify-content: space-between; font-size: 12.5px; padding: 3.5px 0; }
.scen b { font-family: var(--mono); font-weight: 600; }
.scen:first-child { color: #2563eb; font-weight: 600; }
.kd { display: flex; gap: 8px; font-size: 12px; padding: 3px 0; align-items: baseline; }
.kd .kd-d { font-family: var(--mono); color: var(--muted); flex: none; }
.kd.done .kd-t { color: var(--muted); text-decoration: line-through; }
.kd:not(.done) .kd-t { font-weight: 600; }
.kd:not(.done) .kd-d { color: var(--red); font-weight: 700; }
.el-map-row { display: grid; grid-template-columns: 1fr 280px; gap: 16px; }
.el-map-card { padding: 8px; }
#el-map svg { width: 100%; height: auto; display: block; }
#el-map path { stroke: #fff; stroke-width: .8; cursor: pointer; transition: opacity .15s; }
#el-map path:hover { opacity: .75; }
#el-map text { font-size: 9px; fill: #fff; pointer-events: none; font-family: var(--mono); }
#el-map text.dim { fill: #9aa0a8; }
.el-side { display: flex; flex-direction: column; gap: 16px; }
.el-legend { display: flex; flex-direction: column; gap: 7px; font-size: 12.5px; color: var(--ink2); }
.el-legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 8px; vertical-align: -1px; }
.el-legend-note { color: var(--muted); font-size: 11.5px; margin-top: 10px; }
.el-d-state { font-size: 16px; font-weight: 700; margin-bottom: 4px; }
.el-d-rating { display: inline-block; border-radius: 5px; padding: 2px 9px; color: #fff; font-size: 12px; margin-bottom: 8px; }
.el-d-note { font-size: 13px; color: var(--ink2); }
.el-d-race { font-size: 12px; color: var(--muted); margin-top: 8px; font-family: var(--mono); }
.el-odds-note { font-size: 11px; color: var(--muted); margin-top: 6px; }

/* ---------- 美债面板 / 惊喜簿 ---------- */
.surprises { display: flex; flex-direction: column; max-height: 560px; overflow-y: auto; }
.sp { display: flex; align-items: baseline; gap: 9px; padding: 8px 4px; border-bottom: 1px dashed var(--line); }
.sp:last-child { border-bottom: 0; }
.sp .sp-date { font-family: var(--mono); font-size: 11.5px; color: var(--muted); flex: none; width: 40px; }
.sp .sp-name { flex: 1; font-size: 13px; min-width: 0; }
.sp .sp-name b { font-weight: 600; }
.sp .sp-name i { font-style: normal; color: var(--muted); font-size: 11.5px; }
.sp .sp-nums { font-family: var(--mono); font-size: 12px; color: var(--ink2); flex: none; }
.sp .sp-nums b { font-weight: 700; }
.sp-chip { flex: none; font-size: 11px; border-radius: 4px; padding: 1px 7px; }
.sp-chip.超预期 { background: var(--red-soft); color: var(--red); border: 1px solid var(--red-line); }
.sp-chip.不及预期 { background: #eef6f0; color: var(--down); border: 1px solid #d3e6da; }
.sp-chip.符合 { background: #f1f2f4; color: var(--muted); border: 1px solid var(--line); }

.curve-legend { display: flex; gap: 18px; font-size: 12px; color: var(--ink2); margin-top: 4px; }
.curve-legend i { display: inline-block; width: 18px; height: 3px; border-radius: 2px; margin-right: 6px; vertical-align: 3px; }
#curve-chart svg { width: 100%; height: auto; display: block; }
.bond-top { display: grid; grid-template-columns: 1.9fr 1fr; gap: 16px; }
.spread-col { display: flex; flex-direction: column; gap: 12px; }
.spread-card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: 12px 16px; flex: 1; display: flex; flex-direction: column; justify-content: center; }
.spread-card h3 { font-size: 11.5px; color: var(--muted); font-weight: 500; margin-bottom: 4px; }
.spread-card .spd-v { font-size: 21px; font-weight: 700; font-family: var(--mono); }
.spread-card .spd-v.neg { color: var(--red); }
.spread-card .spd-sub { font-size: 11.5px; color: var(--muted); margin-top: 3px; }
.inv-badge { display: inline-block; background: var(--red); color: #fff; font-size: 11px; border-radius: 4px; padding: 1px 8px; margin-left: 8px; }
.spark-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.spark { border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; background: #fcfbf9; }
.spark .spk-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 3px; }
.spark .spk-name { font-size: 12px; color: var(--muted); }
.spark .spk-v { font-family: var(--mono); font-weight: 700; font-size: 14px; }
.spark svg { width: 100%; height: 30px; display: block; }
.bond-top + .card, .card + .card { margin-top: 0; }
#view-bonds .card { margin-bottom: 16px; }
#view-bonds .bond-top { margin-bottom: 16px; }

/* 外部工具卡片 */
.ext-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.ext-tile {
  display: flex; align-items: center; gap: 13px; border: 1px solid var(--line); border-radius: 10px;
  padding: 13px 15px; text-decoration: none; color: var(--ink); background: #fcfbf9; transition: all .15s;
}
.ext-tile:hover { border-color: var(--red-line); box-shadow: var(--shadow); transform: translateY(-1px); }
.ext-badge {
  width: 42px; height: 42px; border-radius: 10px; background: var(--red); color: #fff; flex: none;
  display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700;
  font-family: var(--mono); letter-spacing: .5px;
}
.ext-body { flex: 1; min-width: 0; }
.ext-body b { display: block; font-size: 14px; }
.ext-body i { font-style: normal; font-size: 12px; color: var(--muted); }
.ext-arrow { color: var(--muted); font-size: 15px; flex: none; }
.ext-tile:hover .ext-arrow { color: var(--red); }

/* 当月待办弹层 */
.todo-more { margin-left: auto; font-size: 12.5px; color: var(--red); cursor: pointer; }
.todo-more:hover { text-decoration: underline; }
.modal { position: fixed; inset: 0; background: rgba(31, 35, 41, .35); display: flex; align-items: center; justify-content: center; z-index: 50; padding: 20px; }
.modal-card {
  background: var(--card); border-radius: 14px; box-shadow: 0 12px 48px rgba(31, 35, 41, .18);
  padding: 18px 20px; width: 520px; max-width: 100%; max-height: 76vh; display: flex; flex-direction: column;
}
.modal-close { margin-left: auto; border: 1px solid var(--line); background: #fbfaf9; border-radius: 8px; width: 30px; height: 30px; color: var(--ink2); font-size: 15px; }
.modal-close:hover { color: var(--red); border-color: var(--red-line); }
.month-list { overflow-y: auto; }
.month-day { font-size: 12px; color: var(--muted); margin: 12px 0 4px; font-family: var(--mono); }
.month-day:first-child { margin-top: 0; }
.month-day .md-count { color: var(--red); }

/* ---------- 会议纪要 ---------- */
.rec-q {
  margin-left: auto; border: 1px solid var(--line); border-radius: 8px; padding: 5px 10px;
  font-size: 13px; outline: none; background: #fbfaf9; width: 180px;
}
.rec-q:focus { border-color: var(--red); }
.records-list { display: flex; flex-direction: column; }
.rec {
  display: flex; align-items: center; gap: 12px; padding: 11px 6px;
  border-bottom: 1px dashed var(--line); cursor: pointer; border-radius: 6px;
}
.rec:last-child { border-bottom: 0; }
.rec:hover { background: #faf7f5; }
.rec .rec-title { flex: 1; min-width: 0; font-size: 14px; font-weight: 500;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rec .rec-date { font-family: var(--mono); font-size: 12px; color: var(--muted); flex: none; }
.rec .rec-dur { font-family: var(--mono); font-size: 12px; color: var(--ink2); flex: none; }
.rec .rec-cat {
  flex: none; font-size: 11px; border-radius: 4px; padding: 1px 8px;
  background: var(--red-soft); color: var(--red); border: 1px solid var(--red-line);
}
.modal-wide { width: 720px; }
.record-meta { display: flex; gap: 14px; align-items: center; color: var(--muted); font-size: 12.5px; margin-bottom: 10px; flex-wrap: wrap; }
.record-meta .rec-cat { background: var(--red-soft); color: var(--red); border: 1px solid var(--red-line); border-radius: 4px; padding: 1px 8px; font-size: 11px; }
.record-content {
  flex: 1; overflow-y: auto; white-space: normal; word-break: break-word;
  font-size: 13.5px; line-height: 1.75; color: var(--ink);
  border-top: 1px solid var(--line); padding-top: 12px; min-height: 200px;
}
.record-content h3 { font-size: 15px; margin: 16px 0 8px; color: var(--ink); }
.record-content h3::before { content: ""; display: inline-block; width: 3px; height: 12px; background: var(--red); border-radius: 2px; margin-right: 7px; vertical-align: -1px; }
.record-content h4 { font-size: 13.5px; margin: 12px 0 6px; }
.record-content h3:first-child { margin-top: 0; }
.record-content ul, .record-content ol { padding-left: 20px; margin: 6px 0; }
.record-content li { margin-bottom: 5px; }
.record-content strong { color: var(--red); font-weight: 600; }
.record-content p { margin: 6px 0; }
.record-actions { margin-top: 12px; display: flex; justify-content: flex-end; }

/* ---------- 热点话题 / 观点PK ---------- */
.topics-head { flex-wrap: wrap; gap: 10px; align-items: center; }
#topic-date { border: 1px solid var(--line); border-radius: 8px; padding: 5px 9px; font-size: 13px; background: #fbfaf9; color: var(--ink2); outline: none; }
#topic-date:focus { border-color: var(--red); }
.topic-cats { display: flex; gap: 4px; }
.topic-cats button {
  border: 1px solid var(--line); background: #fbfaf9; border-radius: 7px;
  padding: 4px 12px; font-size: 12.5px; color: var(--ink2);
}
.topic-cats button.active { background: var(--red-soft); color: var(--red); border-color: var(--red-line); font-weight: 600; }
.topic-report { margin-bottom: 6px; color: var(--muted); font-size: 12.5px; font-family: var(--mono); }
.topic-card { border: 1px solid var(--line); border-radius: 10px; padding: 11px 16px; margin-bottom: 8px; background: #fcfbf9; }
.topic-card.collapsed { padding: 9px 14px; }
.topic-card h3 { font-size: 14px; font-weight: 600; margin: 0; cursor: pointer; user-select: none; }
.topic-card h3::before { content: ""; display: inline-block; width: 3px; height: 12px; background: var(--red); border-radius: 2px; margin-right: 7px; vertical-align: -1px; }
.topic-card:not(.collapsed) h3 { margin-bottom: 8px; }
.tp-caret { display: inline-block; width: 14px; color: var(--muted); font-size: 12px; margin-right: 2px; }
.tp-more { font-size: 12px; color: var(--red); cursor: pointer; padding: 4px 0; }
.tp-more:hover { text-decoration: underline; }
.tp-secs-rest td { padding: 4px 8px 4px 0; vertical-align: top; color: var(--ink2); font-size: 12.5px; }
.tp-secs-rest td:first-child { font-family: var(--mono); white-space: nowrap; }
.tp-block { margin-bottom: 8px; }
.tp-block .tp-label { font-size: 11.5px; color: var(--red); font-weight: 600; letter-spacing: 1px; margin-bottom: 3px; }
.tp-block .tp-text { font-size: 13px; color: var(--ink2); line-height: 1.7; }
.tp-block .tp-text p { margin: 3px 0; }
.tp-secs { margin-top: 8px; border-top: 1px dashed var(--line); padding-top: 8px; }
.tp-secs table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.tp-secs th { text-align: left; color: var(--muted); font-weight: 500; padding: 3px 8px 3px 0; font-size: 11.5px; }
.tp-secs td { padding: 4px 8px 4px 0; vertical-align: top; color: var(--ink2); }
.tp-secs td:first-child { font-family: var(--mono); flex: none; white-space: nowrap; }

.debate-add { display: flex; gap: 8px; margin-bottom: 12px; }
.debate-add input {
  flex: 1; border: 1px solid var(--line); border-radius: 8px; padding: 9px 12px;
  font-size: 14px; outline: none; background: #fbfaf9;
}
.debate-add input:focus { border-color: var(--red); }
.debate-add button { border: 0; border-radius: 8px; background: var(--red); color: #fff; padding: 9px 20px; font-size: 13.5px; }
.debate-add button:hover { background: var(--red-deep); }
.debate-add button:disabled { background: #c9a7b1; cursor: wait; }
.debate-view .dv-viewpoint {
  background: var(--red-soft); border: 1px solid var(--red-line); border-radius: 10px;
  padding: 10px 14px; font-size: 14px; font-weight: 600; margin-bottom: 10px;
}
.debate-view .dv-status { color: var(--muted); font-size: 12.5px; margin-bottom: 8px; }
.debate-view .dv-content { font-size: 13.5px; line-height: 1.75; }
.debate-view .dv-content h3 { font-size: 15px; margin: 14px 0 8px; }
.debate-view .dv-content h3::before { content: ""; display: inline-block; width: 3px; height: 12px; background: var(--red); border-radius: 2px; margin-right: 7px; vertical-align: -1px; }
.debate-view .dv-content ul { padding-left: 20px; margin: 6px 0; }
.debate-view .dv-content li { margin-bottom: 5px; }
.debate-view .dv-content strong { color: var(--red); font-weight: 600; }
.debate-view .dv-content p { margin: 6px 0; }
.dh-row { display: flex; align-items: baseline; gap: 10px; padding: 9px 4px; border-bottom: 1px dashed var(--line); cursor: pointer; border-radius: 6px; }
.dh-row:hover { background: #faf7f5; }
.dh-row:last-child { border-bottom: 0; }
.dh-row .dh-time { font-family: var(--mono); font-size: 12px; color: var(--muted); flex: none; }
.dh-row .dh-v { flex: 1; min-width: 0; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dh-st { flex: none; font-size: 11px; border-radius: 4px; padding: 1px 8px; }
.dh-st.done { background: #eef6f0; color: var(--down); }
.dh-st.pending { background: #fdf3e3; color: var(--gold); }
.dh-st.timeout, .dh-st.error { background: var(--red-soft); color: var(--red); }

/* ---------- 实际利率/流动性/信用利差/拍卖 ---------- */
.liq-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.liq-tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.liq-tile { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; background: #fbfaf9; }
.liq-tile i { display: block; font-style: normal; font-size: 11px; color: var(--muted); }
.liq-tile b { font-size: 20px; font-family: var(--mono); }
.liq-row { display: flex; align-items: baseline; gap: 10px; padding: 7px 0; border-bottom: 1px dashed var(--line); }
.liq-row:last-child { border-bottom: 0; }
.liq-row span { width: 118px; flex: none; font-size: 13px; color: var(--ink2); }
.liq-row b { font-family: var(--mono); font-size: 15px; }
.liq-row i { font-style: normal; font-size: 12px; color: var(--muted); }
.liq-row b.up { color: var(--up); }
.liq-chg { font-size: 12px; font-family: var(--mono); }
.liq-chg.up { color: var(--up); } .liq-chg.down { color: var(--down); }
.liq-sparkrow { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.liq-sparkrow svg { flex: 1; height: 34px; }
.liq-sl { flex: none; width: 150px; font-size: 11px; color: var(--muted); }
.auc-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.auc-head { font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.auc-row { display: flex; align-items: baseline; gap: 8px; padding: 5px 6px; border-radius: 6px; font-size: 13px; }
.auc-row span { font-family: var(--mono); color: var(--muted); font-size: 12px; flex: none; }
.auc-row b { font-weight: 600; flex: none; white-space: nowrap; }
.auc-row i { font-style: normal; font-size: 12px; color: var(--muted); margin-left: auto; white-space: nowrap; }
.auc-row.auc-hl { background: var(--red-soft); }
.auc-row.auc-hl b { color: var(--red); }

/* ---------- A股 ---------- */
.ast-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }.ast-tile { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; background: #fbfaf9; }
.ast-t-head { display: flex; justify-content: space-between; align-items: center; }
.ast-t-name { font-size: 13px; color: var(--ink2); font-weight: 600; }
.ast-t-chg { font-size: 12px; font-family: var(--mono); }
.ast-t-chg.up, .ast-s-chg.up, b.up { color: var(--up); }
.ast-t-chg.down, .ast-s-chg.down, b.down { color: var(--down); }
.ast-t-chg.flat { color: var(--muted); }
.ast-t-px { font-size: 20px; font-weight: 700; font-family: var(--mono); padding: 2px 0 6px; }
.ast-tile svg { width: 100%; height: 36px; display: block; }
.ast-turnover { margin-left: auto; font-size: 12px; color: var(--red); font-weight: 600; }

/* ---------- 商品 ---------- */
.cmd-group { margin-bottom: 16px; }
.cmd-group:last-child { margin-bottom: 0; }
.cmd-g-name { font-size: 13px; font-weight: 700; color: var(--ink2); margin-bottom: 8px; padding-left: 2px; }

/* ---------- 美债归因 ---------- */
.attr-chips { margin-left: auto; }
.attr-summary { padding: 2px 0 10px; font-size: 13px; color: var(--ink2); }
.attr-summary b { font-family: var(--mono); }
.attr-charts { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.attr-sub { font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.attr-charts svg { width: 100%; height: auto; display: block; }
.attr-legend { display: flex; gap: 16px; font-size: 11px; color: var(--muted); padding-top: 4px; }
.attr-legend i { display: inline-block; width: 10px; height: 3px; border-radius: 2px; margin-right: 5px; vertical-align: middle; }

/* 归因图 hover 浮窗 */
.attr-tip {
  position: absolute; z-index: 5; pointer-events: none; white-space: nowrap;
  background: rgba(255,255,255,.97); border: 1px solid var(--line); border-radius: 8px;
  padding: 7px 11px; font-size: 11px; line-height: 1.8;
  box-shadow: 0 4px 16px rgba(60,40,40,.10);
}
.attr-tip .at-d { font-weight: 700; color: var(--ink); border-bottom: 1px solid var(--line); margin-bottom: 3px; padding-bottom: 2px; }
.attr-tip .at-r { display: flex; align-items: center; gap: 6px; color: var(--ink2); }
.attr-tip .at-r i { display: inline-block; width: 8px; height: 8px; border-radius: 3px; }
.attr-tip .at-r b { margin-left: auto; padding-left: 14px; font-family: var(--mono); font-weight: 600; }
.attr-tip .at-r b.at-b { color: var(--ink); font-weight: 700; }
.ast-search { display: flex; gap: 10px; margin-bottom: 12px; }
.ast-search input {
  flex: 1; max-width: 320px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px;
  font-size: 14px; outline: none; background: #fbfaf9;
}
.ast-search input:focus { border-color: var(--red); }
.ast-search button {
  padding: 8px 22px; border: 0; border-radius: 8px; background: var(--red); color: #fff; font-size: 14px;
}
.ast-search button:hover { background: var(--red-deep); }
.ast-search button:disabled { opacity: .6; cursor: default; }
.ast-s-head { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 8px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.ast-s-name { font-size: 18px; font-weight: 700; }
.ast-s-code { font-size: 12px; color: var(--muted); margin-left: 8px; font-family: var(--mono); }
.ast-s-px { font-size: 24px; font-weight: 700; font-family: var(--mono); }
.ast-s-px.up { color: var(--up); } .ast-s-px.down { color: var(--down); } .ast-s-px.flat { color: var(--ink); }
.ast-s-chg { font-size: 13px; font-family: var(--mono); margin-left: 10px; }
.ast-s-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px 20px; padding: 12px 0; }
.ast-s-stats i { display: block; font-style: normal; font-size: 11px; color: var(--muted); }
.ast-s-stats b { font-size: 14px; font-family: var(--mono); }
.ast-s-chart svg { width: 100%; height: auto; display: block; }

/* ---------- 大屏模式 ---------- */
body.tv-lock { overflow: hidden; }
.tv {
  position: fixed; inset: 0; z-index: 50; background: #0c0e12; color: #e8eaee;
  display: flex; flex-direction: column; user-select: none;
}
.tv-top {
  height: 64px; flex: none; display: flex; align-items: center; justify-content: space-between;
  padding: 0 28px; border-bottom: 1px solid #1d2129;
}
.tv-brand { display: flex; align-items: center; gap: 10px; font-size: 17px; font-weight: 600; letter-spacing: 1px; }
.tv-mark {
  width: 30px; height: 30px; border-radius: 7px; background: var(--red); color: #fff;
  font-size: 16px; font-family: serif; display: flex; align-items: center; justify-content: center;
}
.tv-clock { display: flex; align-items: baseline; gap: 12px; font-family: var(--mono); }
.tv-clock b { font-size: 26px; letter-spacing: 2px; }
.tv-clock span { font-size: 13px; color: #7d8590; }
.tv-exit {
  border: 1px solid #2a2f38; background: #15181e; color: #aeb4bf; border-radius: 8px;
  padding: 8px 16px; font-size: 14px;
}
.tv-exit:hover { color: #ff5c7a; border-color: #ff5c7a; }
.tv-screen { flex: 1; min-height: 0; padding: 26px 40px 8px; overflow: hidden; }
.tv-page { height: 100%; display: flex; flex-direction: column; animation: tv-fade .45s ease; }
@keyframes tv-fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.tv-foot { flex: none; margin-top: auto; padding: 14px 0 10px; font-size: 13px; color: #5d646f; text-align: center; }
.tv-empty { padding: 60px 0; text-align: center; color: #5d646f; font-size: 17px; }
.tv-dots { flex: none; display: flex; justify-content: center; gap: 10px; padding: 10px 0 18px; }
.tv-dot {
  border: 1px solid #2a2f38; background: transparent; color: #7d8590; border-radius: 20px;
  padding: 5px 16px; font-size: 13px;
}
.tv-dot.active { background: var(--red); border-color: var(--red); color: #fff; }

/* 屏 1：行情 */
.tv-quote-grid { flex: 1; display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; align-content: center; }
.tv-ast-grid { grid-template-columns: repeat(3, 1fr); max-width: 1200px; margin: 0 auto; width: 100%; }
.tv-q-tile svg { width: 100%; height: 32px; display: block; margin-top: 6px; }
.tv-q-tile {
  background: #14171d; border: 1px solid #1d2129; border-radius: 14px;
  padding: 22px 24px; display: flex; flex-direction: column; gap: 6px;
}
.tv-q-name { font-size: 15px; color: #8a919c; }
.tv-q-px { font-size: 34px; font-weight: 700; font-family: var(--mono); letter-spacing: .5px; }
.tv-q-chg { font-size: 18px; font-family: var(--mono); font-weight: 600; }
.tv-q-chg.up { color: #ff5c6c; }
.tv-q-chg.down { color: #2fbf71; }
.tv-q-chg.flat { color: #7d8590; }

/* 屏：商品（25 品种平铺 5 列，格子与行情屏对齐） */
.tv-cmd-grid { grid-template-columns: repeat(5, 1fr); gap: 14px; max-width: 1700px; margin: 0 auto; width: 100%; }
.tv-cmd-tile { padding: 16px 20px; gap: 4px; }
.tv-cmd-tile .tv-q-px { font-size: 28px; }
.tv-cmd-tile .tv-q-chg { font-size: 15px; }

/* 矮屏（电视/小显示器）商品屏压缩 */
@media (max-height: 840px) {
  .tv-cmd-tile { padding: 10px 16px; gap: 2px; }
  .tv-cmd-tile .tv-q-px { font-size: 22px; }
  .tv-cmd-tile .tv-q-chg { font-size: 13px; }
}

/* 屏 2：美债 */
.tv-curve-row { flex: 1; min-height: 0; display: flex; gap: 26px; align-items: center; }
.tv-curve-chart { flex: 1; min-width: 0; }
.tv-curve-chart svg { width: 100%; height: auto; }
.tv-curve-legend { display: flex; gap: 22px; justify-content: center; padding-top: 8px; font-size: 14px; color: #8a919c; }
.tv-curve-legend i { display: inline-block; width: 16px; height: 3px; border-radius: 2px; margin-right: 6px; vertical-align: middle; }
.tv-sp-col { flex: none; width: 240px; display: flex; flex-direction: column; gap: 16px; }
.tv-sp-card { background: #14171d; border: 1px solid #1d2129; border-radius: 14px; padding: 18px 20px; }
.tv-sp-name { font-size: 14px; color: #8a919c; }
.tv-sp-v { font-size: 34px; font-weight: 700; font-family: var(--mono); color: #e8eaee; }
.tv-sp-v small { font-size: 14px; color: #7d8590; margin-left: 4px; }
.tv-sp-v.neg { color: #ff5c6c; }
.tv-sp-inv { font-size: 12px; color: #ff5c6c; }

/* 屏 3：快讯 */
.tv-feed { flex: 1; min-height: 0; display: flex; flex-direction: column; justify-content: center; gap: 4px; max-width: 1100px; margin: 0 auto; width: 100%; }
.tv-fi { display: flex; gap: 18px; padding: 10px 14px; border-radius: 10px; }
.tv-fi.imp { background: rgba(166, 9, 46, .18); }
.tv-fi-time { flex: none; width: 64px; font-family: var(--mono); font-size: 15px; color: #7d8590; padding-top: 3px; }
.tv-fi-title { font-size: 17px; font-weight: 600; }
.tv-fi-text {
  font-size: 16px; color: #b8bec8; line-height: 1.55;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.tv-fi.imp .tv-fi-text { color: #e8d3d8; }

/* 屏 4：日历 */
.tv-ev-list { flex: 1; min-height: 0; display: flex; flex-direction: column; justify-content: center; gap: 8px; max-width: 1000px; margin: 0 auto; width: 100%; }
.tv-ev { display: flex; align-items: center; gap: 16px; background: #14171d; border: 1px solid #1d2129; border-radius: 12px; padding: 14px 20px; }
.tv-ev.today { border-color: var(--red); }
.tv-d { flex: none; width: 56px; text-align: center; font-size: 17px; font-family: var(--mono); color: #8a919c; }
.tv-d.today { color: #ff5c7a; }
.tv-d.tmr { color: #e0b34e; }
.tv-ev-date { flex: none; font-family: var(--mono); font-size: 14px; color: #5d646f; }
.tv-ev-lv { flex: none; font-size: 12px; border-radius: 4px; padding: 2px 8px; }
.tv-ev-lv.high { background: rgba(166, 9, 46, .3); color: #ff8fa3; }
.tv-ev-lv.mid { background: #1d2129; color: #8a919c; }
.tv-ev-title { font-size: 17px; font-weight: 600; }
.tv-ev-note { font-size: 13px; color: #7d8590; }

/* 屏 5：数据惊喜簿 */
.tv-sp-list { flex: 1; min-height: 0; display: flex; flex-direction: column; justify-content: center; gap: 8px; max-width: 1000px; margin: 0 auto; width: 100%; }
.tv-sur { display: flex; align-items: center; gap: 16px; background: #14171d; border: 1px solid #1d2129; border-radius: 12px; padding: 13px 20px; font-size: 16px; }
.tv-sur-date { flex: none; font-family: var(--mono); font-size: 14px; color: #5d646f; }
.tv-sur-name { flex: 1; font-weight: 600; }
.tv-sur-name i { font-style: normal; color: #7d8590; font-weight: 400; font-size: 14px; }
.tv-sur-nums { flex: none; color: #8a919c; font-size: 15px; }
.tv-sur-nums b { color: #e8eaee; font-family: var(--mono); }
.tv-sur-chip { flex: none; font-size: 13px; border-radius: 5px; padding: 3px 10px; }
.tv-sur-chip.up { background: rgba(192, 57, 43, .3); color: #ff8f80; }
.tv-sur-chip.down { background: rgba(30, 132, 73, .3); color: #6fd39e; }
.tv-sur-chip.flat { background: #1d2129; color: #8a919c; }

/* 屏 6：选举 */
.tv-el-count { text-align: center; font-size: 22px; color: #b8bec8; padding: 10px 0 24px; }
.tv-el-count b { font-size: 40px; color: #ff5c7a; font-family: var(--mono); padding: 0 6px; }
.tv-el-row { display: flex; gap: 24px; justify-content: center; }
.tv-el-card { width: 380px; background: #14171d; border: 1px solid #1d2129; border-radius: 14px; padding: 22px 26px; }
.tv-el-label { font-size: 14px; color: #8a919c; letter-spacing: 1px; }
.tv-el-big { font-size: 34px; font-weight: 700; font-family: var(--mono); padding: 8px 0; }
.tv-el-bar { height: 10px; border-radius: 6px; background: #1d2129; overflow: hidden; }
.tv-el-bar i { display: block; height: 100%; border-radius: 6px; }
.tv-el-sub { font-size: 13px; color: #7d8590; padding-top: 8px; }
.tv-el-scen { max-width: 560px; margin: 22px auto 0; width: 100%; }
.tv-el-scen-row { display: flex; justify-content: space-between; padding: 10px 6px; border-bottom: 1px solid #1d2129; font-size: 16px; }
.tv-el-scen-row b { font-family: var(--mono); font-size: 18px; }

@media (max-width: 900px) {
  .tv-quote-grid { grid-template-columns: repeat(2, 1fr); }
  .tv-curve-row { flex-direction: column; }
  .tv-sp-col { width: 100%; flex-direction: row; }
  .tv-sp-card { flex: 1; }
  .tv-el-row { flex-direction: column; align-items: center; }
}

/* ---------- 窄屏 ---------- */
@media (max-width: 900px) {
  .shell { flex-direction: column; }
  .side { width: 100%; flex-direction: row; border-right: 0; border-bottom: 1px solid var(--line); padding: 8px 10px; overflow-x: auto; }
  .nav-btn { flex: none; }
  .dash-grid { grid-template-columns: 1fr; grid-template-areas: "todo" "events" "feed" "surprises"; }
  .el-cards { grid-template-columns: repeat(2, 1fr); }
  .el-map-row { grid-template-columns: 1fr; }
  .spread-col { flex-direction: column; }
  .bond-top { grid-template-columns: 1fr; }
  .ext-grid { grid-template-columns: 1fr; }
  .spark-row { grid-template-columns: repeat(2, 1fr); }
  .week-grid { grid-template-columns: repeat(4, 1fr); }
  .main { padding: 12px; }
}
